fuzzyworld

nuts / commit

Deploy to apps.fuzzyworld.net with fuzzyworld-tools

cf658d5b6caa11fd0a42df3629f30c06299b207c · Pavel Safronov · 2026-10-26 18:24:59 -0700 · parents 728d72e20eb4

Deploy to apps.fuzzyworld.net with fuzzyworld-tools

Adds the fuzzyworld package.json section, a deploy script (fw deploy) and the fuzzyworld-tools dependency, and points gitlab.io / gitlab.com links at apps.fuzzyworld.net and code.fuzzyworld.net.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 index.html              |  8 ++++----
 package.json            |  8 +++++++-
 pnpm-lock.yaml          | 11 +++++++++++
 public/site.webmanifest |  3 ++-
 src/compat.ts           |  4 ++--
 src/share.ts            |  2 +-
 vite.config.ts          |  4 ++--
 7 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/index.html b/index.html
index 26e920d..96ee472 100644
--- a/index.html
+++ b/index.html
@@ -19,8 +19,8 @@
     <!-- Open Graph -->
     <meta property="og:title" content="Nuts" />
     <meta property="og:description" content="A box of nuts bouncing around with haptic feedback." />
-    <meta property="og:image" content="https://pavelsafronov.gitlab.io/nuts/og-image.png" />
-    <meta property="og:url" content="https://pavelsafronov.gitlab.io/nuts/" />
+    <meta property="og:image" content="https://apps.fuzzyworld.net/nuts/og-image.png" />
+    <meta property="og:url" content="https://apps.fuzzyworld.net/nuts/" />
     <meta name="twitter:card" content="summary_large_image" />
 
     <link rel="stylesheet" href="/src/style.css" />
@@ -102,9 +102,9 @@
             </div>
 
             <div class="panel-links">
-                <a href="https://pavelsafronov.gitlab.io/nuts/" target="_blank" rel="noopener">Live app</a>
+                <a href="https://apps.fuzzyworld.net/nuts/" target="_blank" rel="noopener">Live app</a>
                 <span aria-hidden="true">·</span>
-                <a href="https://gitlab.com/PavelSafronov/nuts" target="_blank" rel="noopener">Source</a>
+                <a href="https://code.fuzzyworld.net/nuts/" target="_blank" rel="noopener">Source</a>
             </div>
             <p class="attribution">
                 Icon by <a href="https://www.flaticon.com/search?author_id=296&style_id=1001&type=standard"
diff --git a/package.json b/package.json
index 541c631..e5dbd63 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,8 @@
         "preview": "vite preview",
         "generate-icons": "tsx scripts/generate-icons.ts",
         "screenshot": "tsx scripts/screenshot.ts",
-        "diff-screenshots": "tsx scripts/diff.ts"
+        "diff-screenshots": "tsx scripts/diff.ts",
+        "deploy": "fw deploy"
     },
     "dependencies": {
         "matter-js": "^0.19.0",
@@ -24,6 +25,7 @@
         "@types/qrcode": "^1.5.6",
         "@vitejs/plugin-basic-ssl": "^2.3.0",
         "ffmpeg-static": "^5.3.0",
+        "fuzzyworld-tools": "git+https://code.fuzzyworld.net/fuzzyworld-tools.git#semver:^1.0.0",
         "pixelmatch": "^7.1.0",
         "playwright": "^1.59.1",
         "pngjs": "^7.0.0",
@@ -32,5 +34,9 @@
         "typescript": "^5.4.0",
         "vite": "^5.2.0",
         "vite-plugin-qrcode": "^0.4.1"
+    },
+    "fuzzyworld": {
+        "app": "nuts",
+        "title": "Nuts"
     }
 }
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 36f88cb..0b20b19 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -36,6 +36,9 @@ importers:
       ffmpeg-static:
         specifier: ^5.3.0
         version: 5.3.0
+      fuzzyworld-tools:
+        specifier: git+https://code.fuzzyworld.net/fuzzyworld-tools.git#semver:^1.0.0
+        version: git+https://code.fuzzyworld.net/fuzzyworld-tools.git#a16979609b26948136bda7b4ff9279bd4cf592b9
       pixelmatch:
         specifier: ^7.1.0
         version: 7.1.0
@@ -746,6 +749,12 @@ packages:
     engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
     os: [darwin]
 
+  fuzzyworld-tools@git+https://code.fuzzyworld.net/fuzzyworld-tools.git#a16979609b26948136bda7b4ff9279bd4cf592b9:
+    resolution: {commit: a16979609b26948136bda7b4ff9279bd4cf592b9, repo: https://code.fuzzyworld.net/fuzzyworld-tools.git, type: git}
+    version: 1.0.1
+    engines: {node: '>=18'}
+    hasBin: true
+
   get-caller-file@2.0.5:
     resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
     engines: {node: 6.* || 8.* || >= 10.*}
@@ -1451,6 +1460,8 @@ snapshots:
   fsevents@2.3.3:
     optional: true
 
+  fuzzyworld-tools@git+https://code.fuzzyworld.net/fuzzyworld-tools.git#a16979609b26948136bda7b4ff9279bd4cf592b9: {}
+
   get-caller-file@2.0.5: {}
 
   get-tsconfig@4.13.7:
diff --git a/public/site.webmanifest b/public/site.webmanifest
index c1ae7fd..4da79fe 100644
--- a/public/site.webmanifest
+++ b/public/site.webmanifest
@@ -1,4 +1,5 @@
 {
+    "id": "./",
     "name": "Nuts",
     "short_name": "Nuts",
     "description": "A box of nuts bouncing around with haptic feedback.",
@@ -27,4 +28,4 @@
             "purpose": "any"
         }
     ]
-}
\ No newline at end of file
+}
diff --git a/src/compat.ts b/src/compat.ts
index e08244b..e08e4a5 100644
--- a/src/compat.ts
+++ b/src/compat.ts
@@ -55,9 +55,9 @@ export function showUnsupportedWall(reason: string): void {
         <div style="font-size:72px;line-height:1;filter:grayscale(1) opacity(0.4)">🔩</div>
         <h1 style="color:#fff;font-size:28px;font-weight:700;margin:0">${headline}</h1>
         <p style="color:#666;font-size:16px;line-height:1.6;margin:0;white-space:pre-line">${body}</p>
-        <a href="https://pavelsafronov.gitlab.io/nuts/"
+        <a href="https://apps.fuzzyworld.net/nuts/"
            style="margin-top:8px;color:#c8a84b;font-size:13px;opacity:0.6;text-decoration:none">
-          pavelsafronov.gitlab.io/nuts
+          apps.fuzzyworld.net/nuts
         </a>
       </div>`
 }
diff --git a/src/share.ts b/src/share.ts
index c787024..9b6f51d 100644
--- a/src/share.ts
+++ b/src/share.ts
@@ -56,7 +56,7 @@ export function decodeNuts(encoded: string): SharedNut[] | null {
     }
 }
 
-const BASE_URL = 'https://pavelsafronov.gitlab.io/nuts/'
+const BASE_URL = 'https://apps.fuzzyworld.net/nuts/'
 const MAX_URL_LENGTH = 1800  // comfortable QR limit at medium error-correction
 
 /**
diff --git a/vite.config.ts b/vite.config.ts
index fe40fe6..e0eb47d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -7,6 +7,7 @@ import { readdirSync, readFileSync, existsSync, mkdirSync } from 'node:fs'
 import { join, dirname } from 'node:path'
 import { createRequire } from 'node:module'
 import { tmpdir } from 'node:os'
+import fuzzyworld from 'fuzzyworld-tools/vite'
 
 const require = createRequire(import.meta.url)
 // eslint-disable-next-line @typescript-eslint/no-require-imports
@@ -115,12 +116,11 @@ function remoteLog(): Plugin {
 }
 
 export default defineConfig({
-    base: './',
     build: {
         outDir: 'dist',
     },
     server: {
         host: true, // listen on 0.0.0.0 so the phone can reach it
     },
-    plugins: [sounds(), remoteLog(), basicSsl(), qrcode()],
+    plugins: [fuzzyworld(), sounds(), remoteLog(), basicSsl(), qrcode()],
 })