@defunkt
+This is my website. I am Chris.
+diff --git a/app/README.md b/README.md similarity index 100% rename from app/README.md rename to README.md diff --git a/app/package.json b/app/package.json deleted file mode 100644 index 2c08857..0000000 --- a/app/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "pluto", - "module": "src/server.tsx", - "type": "module", - "private": true, - "scripts": { - "start": "bun src/server.tsx", - "runner": "env NODE_ENV=production bun run src/runner.ts", - "prod": "env NODE_ENV=production bun src/server.tsx", - "dev": "env BUN_HOT=1 bun --hot src/server.tsx", - "deploy": "./scripts/deploy.sh", - "push": "./scripts/deploy.sh", - "remote:install": "./scripts/remote-install.sh", - "remote:start": "./scripts/remote-start.sh", - "remote:stop": "./scripts/remote-stop.sh", - "remote:restart": "./scripts/remote-restart.sh" - }, - "peerDependencies": { - "typescript": "^5" - }, - "dependencies": { - "kleur": "^4.1.5" - } -} \ No newline at end of file diff --git a/app/tsconfig.json b/app/tsconfig.json deleted file mode 100644 index dfe7f60..0000000 --- a/app/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../tsconfig.json", - "include": ["./**/*"] - } \ No newline at end of file diff --git a/app/nose/bin/apps.tsx b/bin/apps.tsx similarity index 93% rename from app/nose/bin/apps.tsx rename to bin/apps.tsx index 1dbc9a8..74436fb 100644 --- a/app/nose/bin/apps.tsx +++ b/bin/apps.tsx @@ -1,7 +1,7 @@ // Show the webapps hosted on this NOSEputer. import { $ } from "bun" -import { apps } from "app/src/webapp" +import { apps } from "@/webapp" const devMode = process.env.NODE_ENV !== "production" diff --git a/app/nose/bin/breakout.ts b/bin/breakout.ts similarity index 100% rename from app/nose/bin/breakout.ts rename to bin/breakout.ts diff --git a/app/nose/bin/cat.ts b/bin/cat.ts similarity index 94% rename from app/nose/bin/cat.ts rename to bin/cat.ts index 43d5778..1f3c41a 100644 --- a/app/nose/bin/cat.ts +++ b/bin/cat.ts @@ -4,12 +4,12 @@ import { escapeHTML } from "bun" import { readdirSync } from "fs" import { join, extname } from "path" -import type { CommandOutput } from "app/src/shared/types" -import { NOSE_WWW } from "app/src/config" -import { isBinaryFile } from "app/src/utils" -import { highlight } from "../lib/highlight" +import type { CommandOutput } from "@/shared/types" +import { NOSE_WWW } from "@/config" +import { isBinaryFile } from "@/utils" import { projectName, projectDir } from "@/project" import { sessionGet } from "@/session" +import { highlight } from "../lib/highlight" export default async function (path: string) { const project = projectName() diff --git a/app/nose/bin/cd.ts b/bin/cd.ts similarity index 100% rename from app/nose/bin/cd.ts rename to bin/cd.ts diff --git a/app/nose/bin/counter.tsx b/bin/counter.tsx similarity index 100% rename from app/nose/bin/counter.tsx rename to bin/counter.tsx diff --git a/app/nose/bin/echo.ts b/bin/echo.ts similarity index 100% rename from app/nose/bin/echo.ts rename to bin/echo.ts diff --git a/app/nose/bin/edit.tsx b/bin/edit.tsx similarity index 86% rename from app/nose/bin/edit.tsx rename to bin/edit.tsx index fde8db3..a46f893 100644 --- a/app/nose/bin/edit.tsx +++ b/bin/edit.tsx @@ -3,10 +3,10 @@ import { readdirSync } from "fs" import { join, extname } from "path" -import type { CommandOutput } from "app/src/shared/types" -import { NOSE_WWW } from "app/src/config" -import { isBinaryFile } from "app/src/utils" -import { countChar } from "app/src/shared/utils" +import type { CommandOutput } from "@/shared/types" +import { NOSE_WWW } from "@/config" +import { isBinaryFile } from "@/utils" +import { countChar } from "@/shared/utils" import { projectName, projectDir } from "@/project" import { sessionGet } from "@/session" diff --git a/app/nose/bin/env.ts b/bin/env.ts similarity index 81% rename from app/nose/bin/env.ts rename to bin/env.ts index 700be9a..da1b76d 100644 --- a/app/nose/bin/env.ts +++ b/bin/env.ts @@ -2,7 +2,7 @@ // // Show some debugging information. -import { NOSE_STARTED, NOSE_SYS, NOSE_DIR, GIT_SHA } from "@/config" +import { NOSE_STARTED, NOSE_SYS_BIN, NOSE_DIR, GIT_SHA } from "@/config" export default function () { return [ @@ -12,7 +12,7 @@ export default function () { `USER=${process.env.USER || "(none)"}`, `PWD=${process.env.PWD || "(none)"}`, `NOSE_STARTED=${NOSE_STARTED}`, - `NOSE_SYS=${NOSE_SYS}`, + `NOSE_SYS_BIN=${NOSE_SYS_BIN}`, `NOSE_DIR=${NOSE_DIR}`, `GIT_SHA=${GIT_SHA.slice(0, 8)}`, ].join("\n") diff --git a/app/nose/bin/game.tsx b/bin/game.tsx similarity index 100% rename from app/nose/bin/game.tsx rename to bin/game.tsx diff --git a/app/nose/bin/help.ts b/bin/help.ts similarity index 100% rename from app/nose/bin/help.ts rename to bin/help.ts diff --git a/app/nose/bin/load.ts b/bin/load.ts similarity index 91% rename from app/nose/bin/load.ts rename to bin/load.ts index 95f70ca..fdf1ea8 100644 --- a/app/nose/bin/load.ts +++ b/bin/load.ts @@ -1,6 +1,6 @@ // Load a project so you can work on it. -import { apps } from "app/src/webapp" +import { apps } from "@/webapp" import { sessionGet } from "@/session" export default function (project: string) { diff --git a/app/nose/bin/ls.tsx b/bin/ls.tsx similarity index 94% rename from app/nose/bin/ls.tsx rename to bin/ls.tsx index f7bf217..24669a1 100644 --- a/app/nose/bin/ls.tsx +++ b/bin/ls.tsx @@ -1,7 +1,7 @@ // Look around. import { readdirSync } from "fs" -import { NOSE_WWW } from "app/src/config" +import { NOSE_WWW } from "@/config" import { projectName, projectDir } from "@/project" import { sessionGet } from "@/session" diff --git a/app/nose/bin/mkdir.ts b/bin/mkdir.ts similarity index 89% rename from app/nose/bin/mkdir.ts rename to bin/mkdir.ts index b24c904..2e2733f 100644 --- a/app/nose/bin/mkdir.ts +++ b/bin/mkdir.ts @@ -2,10 +2,9 @@ // // Essentially `mkdir -p`. -import { mkdirSync } from "fs" +import { mkdirSync, readdirSync } from "fs" import { join } from "path" import { projectDir } from "@/project" -import { readdirSync } from "fs" import { sessionGet } from "@/session" export default async function (path: string) { diff --git a/app/nose/bin/new.ts b/bin/new.ts similarity index 84% rename from app/nose/bin/new.ts rename to bin/new.ts index d8d7c4a..f5c2bb3 100644 --- a/app/nose/bin/new.ts +++ b/bin/new.ts @@ -4,10 +4,9 @@ import { mkdirSync, writeFileSync } from "fs" import { join } from "path" - -import { apps } from "app/src/webapp" -import { NOSE_WWW } from "app/src/config" -import { isDir } from "app/src/utils" +import { apps } from "@/webapp" +import { NOSE_WWW } from "@/config" +import { isDir } from "@/utils" import load from "./load" diff --git a/app/nose/bin/project.ts b/bin/project.ts similarity index 100% rename from app/nose/bin/project.ts rename to bin/project.ts diff --git a/app/nose/bin/projects.tsx b/bin/projects.tsx similarity index 89% rename from app/nose/bin/projects.tsx rename to bin/projects.tsx index c747c3f..af61b35 100644 --- a/app/nose/bin/projects.tsx +++ b/bin/projects.tsx @@ -1,6 +1,6 @@ // Show the projects on this NOSEputer. -import { apps } from "app/src/webapp" +import { apps } from "@/webapp" import { sessionGet } from "@/session" export default function () { diff --git a/app/nose/bin/pwd.ts b/bin/pwd.ts similarity index 100% rename from app/nose/bin/pwd.ts rename to bin/pwd.ts diff --git a/app/nose/bin/rm.ts b/bin/rm.ts similarity index 100% rename from app/nose/bin/rm.ts rename to bin/rm.ts diff --git a/app/nose/bin/rmdir.ts b/bin/rmdir.ts similarity index 100% rename from app/nose/bin/rmdir.ts rename to bin/rmdir.ts diff --git a/app/nose/bin/share.ts b/bin/share.ts similarity index 85% rename from app/nose/bin/share.ts rename to bin/share.ts index e4b572f..b6d7a36 100644 --- a/app/nose/bin/share.ts +++ b/bin/share.ts @@ -1,7 +1,7 @@ // Share a webapp with the public internet. -import { apps } from "app/src/webapp" -import { connectSneaker, sneakers, sneakerUrl } from "app/src/sneaker" +import { apps } from "@/webapp" +import { connectSneaker, sneakers, sneakerUrl } from "@/sneaker" export default async function (app: string) { if (!app) { diff --git a/app/nose/bin/snake.ts b/bin/snake.ts similarity index 100% rename from app/nose/bin/snake.ts rename to bin/snake.ts diff --git a/app/nose/bin/state.ts b/bin/state.ts similarity index 100% rename from app/nose/bin/state.ts rename to bin/state.ts diff --git a/app/nose/bin/tetris.ts b/bin/tetris.ts similarity index 100% rename from app/nose/bin/tetris.ts rename to bin/tetris.ts diff --git a/app/nose/bin/touch.ts b/bin/touch.ts similarity index 100% rename from app/nose/bin/touch.ts rename to bin/touch.ts diff --git a/app/nose/bin/unshare.ts b/bin/unshare.ts similarity index 79% rename from app/nose/bin/unshare.ts rename to bin/unshare.ts index 128f71d..5f3f07b 100644 --- a/app/nose/bin/unshare.ts +++ b/bin/unshare.ts @@ -1,7 +1,7 @@ // Stop sharing a webapp with the public internet. -import { apps } from "app/src/webapp" -import { disconnectSneaker, sneakers } from "app/src/sneaker" +import { apps } from "@/webapp" +import { disconnectSneaker, sneakers } from "@/sneaker" export default async function (app: string) { if (!app) { diff --git a/app/nose/bin/update.ts b/bin/update.ts similarity index 100% rename from app/nose/bin/update.ts rename to bin/update.ts diff --git a/app/nose/bin/uptime.ts b/bin/uptime.ts similarity index 100% rename from app/nose/bin/uptime.ts rename to bin/uptime.ts diff --git a/app/nose/lib/highlight.ts b/lib/highlight.ts similarity index 100% rename from app/nose/lib/highlight.ts rename to lib/highlight.ts diff --git a/bin/ping.ts b/nose/bin/ping.ts similarity index 100% rename from bin/ping.ts rename to nose/bin/ping.ts diff --git a/global.d.ts b/nose/global.d.ts similarity index 100% rename from global.d.ts rename to nose/global.d.ts diff --git a/nose/tsconfig.json b/nose/tsconfig.json new file mode 100644 index 0000000..387adc1 --- /dev/null +++ b/nose/tsconfig.json @@ -0,0 +1,39 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": [ + "ESNext", + "DOM" + ], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "jsx": "react-jsx", + "jsxImportSource": "hono/jsx", + "allowJs": true, + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false, + "baseUrl": ".", + "paths": { + "@utils": [ + "../src/utils.tsx" + ], + "@/*": [ + "../src/*" + ] + }, + } +} \ No newline at end of file diff --git a/nose/www/chris/pub/burger.png b/nose/www/chris/pub/burger.png new file mode 100644 index 0000000..292aef3 Binary files /dev/null and b/nose/www/chris/pub/burger.png differ diff --git a/nose/www/chris/pub/index.html b/nose/www/chris/pub/index.html new file mode 100644 index 0000000..578c6d7 --- /dev/null +++ b/nose/www/chris/pub/index.html @@ -0,0 +1,24 @@ + + +
+This is my website. I am Chris.
+
+ This is my website. I am Corey.
+
+
+
+
\ No newline at end of file
diff --git a/nose/www/hello/index.ts b/nose/www/hello/index.ts
new file mode 100644
index 0000000..5e98195
--- /dev/null
+++ b/nose/www/hello/index.ts
@@ -0,0 +1,2 @@
+export default () =>
+ "hiya"
\ No newline at end of file
diff --git a/nose/www/hello/pub/index.html b/nose/www/hello/pub/index.html
new file mode 100644
index 0000000..c1b8c83
--- /dev/null
+++ b/nose/www/hello/pub/index.html
@@ -0,0 +1,14 @@
+
+
+
+ Toy Rivian Truck
+ + + \ No newline at end of file diff --git a/www/ping.ts b/nose/www/ping.ts similarity index 100% rename from www/ping.ts rename to nose/www/ping.ts diff --git a/package.json b/package.json index 371cbef..2c08857 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,24 @@ { - "name": "nose-pluto", - "private": true, - "type": "module", - "workspaces": [ - "app" - ], - "scripts": { - "runner": "bun run --cwd ./app runner", - "dev": "bun run --cwd ./app dev", - "start": "bun run --cwd ./app start", - "push": "bun run --cwd ./app push", - "remote:install": "bun run --cwd ./app remote:install", - "remote:start": "bun run --cwd ./app remote:start", - "remote:stop": "bun run --cwd ./app remote:stop", - "remote:restart": "bun run --cwd ./app remote:restart" - }, - "dependencies": { - "hono": "^4.9.7" - }, - "devDependencies": { - "@types/bun": "latest" - }, - "alias": { - "@nose": "./app/src/helpers.tsx", - "@config": "./app/src/config.ts", - "@/*": "./app/src/*" - } + "name": "pluto", + "module": "src/server.tsx", + "type": "module", + "private": true, + "scripts": { + "start": "bun src/server.tsx", + "runner": "env NODE_ENV=production bun run src/runner.ts", + "prod": "env NODE_ENV=production bun src/server.tsx", + "dev": "env BUN_HOT=1 bun --hot src/server.tsx", + "deploy": "./scripts/deploy.sh", + "push": "./scripts/deploy.sh", + "remote:install": "./scripts/remote-install.sh", + "remote:start": "./scripts/remote-start.sh", + "remote:stop": "./scripts/remote-stop.sh", + "remote:restart": "./scripts/remote-restart.sh" + }, + "peerDependencies": { + "typescript": "^5" + }, + "dependencies": { + "kleur": "^4.1.5" } +} \ No newline at end of file diff --git a/app/public/img/.gitignore b/public/img/.gitignore similarity index 100% rename from app/public/img/.gitignore rename to public/img/.gitignore diff --git a/app/public/vendor/.gitignore b/public/vendor/.gitignore similarity index 100% rename from app/public/vendor/.gitignore rename to public/vendor/.gitignore diff --git a/app/public/vendor/C64_Pro_Mono-STYLE.woff2 b/public/vendor/C64_Pro_Mono-STYLE.woff2 similarity index 100% rename from app/public/vendor/C64_Pro_Mono-STYLE.woff2 rename to public/vendor/C64_Pro_Mono-STYLE.woff2 diff --git a/app/scripts/config.sh b/scripts/config.sh similarity index 90% rename from app/scripts/config.sh rename to scripts/config.sh index b2199d9..f72b076 100644 --- a/app/scripts/config.sh +++ b/scripts/config.sh @@ -3,5 +3,5 @@ # It isn't enough to modify this yet. # You also need to manually update the nose-pluto.service file. HOST="${HOST:-nose@nose-pluto.local}" -DEST="${DEST:-~/nose}" +DEST="${DEST:-~/.nose}" REPO="${REPO:-https://git.nose.space/defunkt/nose-pluto}" \ No newline at end of file diff --git a/app/scripts/deploy.sh b/scripts/deploy.sh similarity index 81% rename from app/scripts/deploy.sh rename to scripts/deploy.sh index c89588f..de0e728 100755 --- a/app/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -3,10 +3,10 @@ set -e # Get absolute path of this script’s directory SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/../.." +ROOT_DIR="$SCRIPT_DIR/.." # Run deploy + config with absolute paths -source "$ROOT_DIR/app/scripts/config.sh" +source "$ROOT_DIR/scripts/config.sh" # Make sure we're up-to-date git push origin main diff --git a/app/scripts/install.sh b/scripts/install.sh similarity index 100% rename from app/scripts/install.sh rename to scripts/install.sh diff --git a/app/scripts/nose-pluto.service b/scripts/nose-pluto.service similarity index 90% rename from app/scripts/nose-pluto.service rename to scripts/nose-pluto.service index 38df35f..6589637 100644 --- a/app/scripts/nose-pluto.service +++ b/scripts/nose-pluto.service @@ -5,7 +5,7 @@ Wants=network-online.target [Service] User=nose -WorkingDirectory=/home/nose/nose/app +WorkingDirectory=/home/nose/.nose/ Environment=PORT=80 Environment=NODE_ENV=production ExecStart=/home/nose/.bun/bin/bun start diff --git a/app/scripts/remote-install.sh b/scripts/remote-install.sh similarity index 51% rename from app/scripts/remote-install.sh rename to scripts/remote-install.sh index 5cfc48c..03e0f2b 100755 --- a/app/scripts/remote-install.sh +++ b/scripts/remote-install.sh @@ -3,10 +3,10 @@ set -e # Get absolute path of this script’s directory SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/../.." +ROOT_DIR="$SCRIPT_DIR/.." # Run deploy + config with absolute paths -source "$ROOT_DIR/app/scripts/config.sh" +source "$ROOT_DIR/scripts/config.sh" # Run remote install on the target -ssh "$HOST" "git clone $REPO $DEST && cd $DEST && ./app/scripts/install.sh && sudo systemctl start nose-pluto.service" +ssh "$HOST" "git clone $REPO $DEST && cd $DEST && ./scripts/install.sh && sudo systemctl start nose-pluto.service" diff --git a/app/scripts/remote-restart.sh b/scripts/remote-restart.sh similarity index 65% rename from app/scripts/remote-restart.sh rename to scripts/remote-restart.sh index cf0399e..d420ea5 100755 --- a/app/scripts/remote-restart.sh +++ b/scripts/remote-restart.sh @@ -2,8 +2,8 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/../.." +ROOT_DIR="$SCRIPT_DIR/.." -source "$ROOT_DIR/app/scripts/config.sh" +source "$ROOT_DIR/scripts/config.sh" ssh "$HOST" "sudo systemctl restart nose-pluto.service" diff --git a/app/scripts/remote-start.sh b/scripts/remote-start.sh similarity index 64% rename from app/scripts/remote-start.sh rename to scripts/remote-start.sh index bc91e5a..31dedbb 100755 --- a/app/scripts/remote-start.sh +++ b/scripts/remote-start.sh @@ -2,8 +2,8 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/../.." +ROOT_DIR="$SCRIPT_DIR/.." -source "$ROOT_DIR/app/scripts/config.sh" +source "$ROOT_DIR/scripts/config.sh" ssh "$HOST" "sudo systemctl start nose-pluto.service" diff --git a/app/scripts/remote-stop.sh b/scripts/remote-stop.sh similarity index 64% rename from app/scripts/remote-stop.sh rename to scripts/remote-stop.sh index 36176d5..c787e0e 100755 --- a/app/scripts/remote-stop.sh +++ b/scripts/remote-stop.sh @@ -2,8 +2,8 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/../.." +ROOT_DIR="$SCRIPT_DIR/.." -source "$ROOT_DIR/app/scripts/config.sh" +source "$ROOT_DIR/scripts/config.sh" ssh "$HOST" "sudo systemctl stop nose-pluto.service" diff --git a/app/src/commands.ts b/src/commands.ts similarity index 100% rename from app/src/commands.ts rename to src/commands.ts diff --git a/app/src/config.ts b/src/config.ts similarity index 73% rename from app/src/config.ts rename to src/config.ts index 60ba536..30431d4 100644 --- a/app/src/config.ts +++ b/src/config.ts @@ -3,10 +3,9 @@ import { $ } from "bun" export const NOSE_ICON = ` ͡° ͜ʖ ͡°` -export const NOSE_SYS = resolve("./nose") -export const NOSE_SYS_BIN = join(NOSE_SYS, "bin") +export const NOSE_SYS_BIN = resolve("./bin") -export const NOSE_DIR = resolve("..") +export const NOSE_DIR = resolve(process.env.NOSE_DIR || "./nose") export const NOSE_BIN = join(NOSE_DIR, "bin") export const NOSE_WWW = join(NOSE_DIR, "www") diff --git a/app/src/css/editor.css b/src/css/editor.css similarity index 100% rename from app/src/css/editor.css rename to src/css/editor.css diff --git a/app/src/css/game.css b/src/css/game.css similarity index 100% rename from app/src/css/game.css rename to src/css/game.css diff --git a/app/src/css/main.css b/src/css/main.css similarity index 100% rename from app/src/css/main.css rename to src/css/main.css diff --git a/app/src/css/reset.css b/src/css/reset.css similarity index 100% rename from app/src/css/reset.css rename to src/css/reset.css diff --git a/app/src/css/terminal.css b/src/css/terminal.css similarity index 100% rename from app/src/css/terminal.css rename to src/css/terminal.css diff --git a/app/src/dispatch.ts b/src/dispatch.ts similarity index 100% rename from app/src/dispatch.ts rename to src/dispatch.ts diff --git a/app/src/dns.ts b/src/dns.ts similarity index 100% rename from app/src/dns.ts rename to src/dns.ts diff --git a/app/src/helpers.tsx b/src/helpers.tsx similarity index 100% rename from app/src/helpers.tsx rename to src/helpers.tsx diff --git a/app/src/html/layout.tsx b/src/html/layout.tsx similarity index 100% rename from app/src/html/layout.tsx rename to src/html/layout.tsx diff --git a/app/src/html/terminal.tsx b/src/html/terminal.tsx similarity index 100% rename from app/src/html/terminal.tsx rename to src/html/terminal.tsx diff --git a/app/src/js/commands.ts b/src/js/commands.ts similarity index 100% rename from app/src/js/commands.ts rename to src/js/commands.ts diff --git a/app/src/js/completion.ts b/src/js/completion.ts similarity index 100% rename from app/src/js/completion.ts rename to src/js/completion.ts diff --git a/app/src/js/cursor.ts b/src/js/cursor.ts similarity index 100% rename from app/src/js/cursor.ts rename to src/js/cursor.ts diff --git a/app/src/js/dom.ts b/src/js/dom.ts similarity index 100% rename from app/src/js/dom.ts rename to src/js/dom.ts diff --git a/app/src/js/editor.ts b/src/js/editor.ts similarity index 100% rename from app/src/js/editor.ts rename to src/js/editor.ts diff --git a/app/src/js/focus.ts b/src/js/focus.ts similarity index 100% rename from app/src/js/focus.ts rename to src/js/focus.ts diff --git a/app/src/js/game.ts b/src/js/game.ts similarity index 100% rename from app/src/js/game.ts rename to src/js/game.ts diff --git a/app/src/js/gamepad.ts b/src/js/gamepad.ts similarity index 100% rename from app/src/js/gamepad.ts rename to src/js/gamepad.ts diff --git a/app/src/js/history.ts b/src/js/history.ts similarity index 100% rename from app/src/js/history.ts rename to src/js/history.ts diff --git a/app/src/js/hyperlink.ts b/src/js/hyperlink.ts similarity index 100% rename from app/src/js/hyperlink.ts rename to src/js/hyperlink.ts diff --git a/app/src/js/input.ts b/src/js/input.ts similarity index 100% rename from app/src/js/input.ts rename to src/js/input.ts diff --git a/app/src/js/main.ts b/src/js/main.ts similarity index 100% rename from app/src/js/main.ts rename to src/js/main.ts diff --git a/app/src/js/resize.ts b/src/js/resize.ts similarity index 100% rename from app/src/js/resize.ts rename to src/js/resize.ts diff --git a/app/src/js/scrollback.ts b/src/js/scrollback.ts similarity index 100% rename from app/src/js/scrollback.ts rename to src/js/scrollback.ts diff --git a/app/src/js/session.ts b/src/js/session.ts similarity index 100% rename from app/src/js/session.ts rename to src/js/session.ts diff --git a/app/src/js/shell.ts b/src/js/shell.ts similarity index 100% rename from app/src/js/shell.ts rename to src/js/shell.ts diff --git a/app/src/js/vram.ts b/src/js/vram.ts similarity index 100% rename from app/src/js/vram.ts rename to src/js/vram.ts diff --git a/app/src/js/websocket.ts b/src/js/websocket.ts similarity index 100% rename from app/src/js/websocket.ts rename to src/js/websocket.ts diff --git a/app/src/mutex.ts b/src/mutex.ts similarity index 100% rename from app/src/mutex.ts rename to src/mutex.ts diff --git a/src/nosedir.ts b/src/nosedir.ts new file mode 100644 index 0000000..cca6990 --- /dev/null +++ b/src/nosedir.ts @@ -0,0 +1,2 @@ +import { NOSE_DIR } from "./config"; + diff --git a/app/src/project.ts b/src/project.ts similarity index 100% rename from app/src/project.ts rename to src/project.ts diff --git a/app/src/runner.ts b/src/runner.ts similarity index 100% rename from app/src/runner.ts rename to src/runner.ts diff --git a/app/src/server.tsx b/src/server.tsx similarity index 96% rename from app/src/server.tsx rename to src/server.tsx index abe8e0a..1cf5ff1 100644 --- a/app/src/server.tsx +++ b/src/server.tsx @@ -7,7 +7,7 @@ import { prettyJSON } from "hono/pretty-json" import color from "kleur" import type { Message } from "./shared/types" -import { NOSE_ICON, NOSE_BIN, NOSE_WWW, NOSE_DATA } from "./config" +import { NOSE_ICON, NOSE_BIN, NOSE_WWW, NOSE_DATA, NOSE_DIR } from "./config" import { transpile, isFile, tilde } from "./utils" import { serveApp } from "./webapp" import { initDNS } from "./dns" @@ -155,6 +155,7 @@ if (process.env.NODE_ENV === "production") { console.log(color.cyan(NOSE_ICON)) console.log(color.blue("NOSE_DATA:"), color.yellow(tilde(NOSE_DATA))) +console.log(color.blue("NOSE_DIR:"), color.yellow(tilde(NOSE_DIR))) console.log(color.blue("NOSE_BIN:"), color.yellow(tilde(NOSE_BIN))) console.log(color.blue("NOSE_WWW:"), color.yellow(tilde(NOSE_WWW))) diff --git a/app/src/session.ts b/src/session.ts similarity index 100% rename from app/src/session.ts rename to src/session.ts diff --git a/app/src/shared/game.ts b/src/shared/game.ts similarity index 100% rename from app/src/shared/game.ts rename to src/shared/game.ts diff --git a/app/src/shared/types.ts b/src/shared/types.ts similarity index 100% rename from app/src/shared/types.ts rename to src/shared/types.ts diff --git a/app/src/shared/utils.ts b/src/shared/utils.ts similarity index 100% rename from app/src/shared/utils.ts rename to src/shared/utils.ts diff --git a/app/src/shell.ts b/src/shell.ts similarity index 100% rename from app/src/shell.ts rename to src/shell.ts diff --git a/app/src/sneaker.ts b/src/sneaker.ts similarity index 98% rename from app/src/sneaker.ts rename to src/sneaker.ts index ef57af9..70fe785 100644 --- a/app/src/sneaker.ts +++ b/src/sneaker.ts @@ -3,7 +3,7 @@ // with the public internet. It requires a sneaker server, usually hosted by us. import nose from "./server" -import { clearState, setState, getState } from "app/src/state" +import { clearState, setState, getState } from "./state" const SNEAKER_URL = "nose.space" const SNEAKER_TLS = true diff --git a/app/src/sniff.ts b/src/sniff.ts similarity index 100% rename from app/src/sniff.ts rename to src/sniff.ts diff --git a/app/src/state.ts b/src/state.ts similarity index 100% rename from app/src/state.ts rename to src/state.ts diff --git a/app/src/stream.ts b/src/stream.ts similarity index 100% rename from app/src/stream.ts rename to src/stream.ts diff --git a/app/src/utils.tsx b/src/utils.tsx similarity index 100% rename from app/src/utils.tsx rename to src/utils.tsx diff --git a/app/src/webapp.ts b/src/webapp.ts similarity index 100% rename from app/src/webapp.ts rename to src/webapp.ts diff --git a/app/src/websocket.ts b/src/websocket.ts similarity index 100% rename from app/src/websocket.ts rename to src/websocket.ts diff --git a/app/test/rng.test.ts b/test/rng.test.ts similarity index 100% rename from app/test/rng.test.ts rename to test/rng.test.ts diff --git a/tsconfig.json b/tsconfig.json index 0759a2a..baf1e57 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,10 +29,10 @@ "baseUrl": ".", "paths": { "@utils": [ - "app/src/utils.tsx" + "src/utils.tsx" ], "@/*": [ - "app/src/*" + "src/*" ] }, }