reeeeeboooot

This commit is contained in:
Chris Wanstrath 2025-09-22 14:55:32 -07:00
parent dc92594219
commit 1c3dd16517
63 changed files with 89 additions and 60 deletions

View File

@ -1,5 +1,5 @@
import { $ } from "bun"
import { apps } from "@/webapp"
import { apps } from "app/src/webapp"
const devMode = process.env.BUN_HOT

View File

@ -2,11 +2,11 @@ import { escapeHTML } from "bun"
import { readdirSync } from "fs"
import { join, extname } from "path"
import type { CommandOutput } from "@/shared/types"
import { NOSE_WWW } from "@/config"
import { getState } from "@/state"
import { appPath } from "@/webapp"
import { isBinaryFile } from "@/utils"
import type { CommandOutput } from "app/src/shared/types"
import { NOSE_WWW } from "app/src/config"
import { getState } from "app/src/state"
import { appPath } from "app/src/webapp"
import { isBinaryFile } from "app/src/utils"
import { highlight } from "../lib/highlight"
export default async function (path: string) {

View File

@ -2,12 +2,12 @@ import { escapeHTML } from "bun"
import { readdirSync } from "fs"
import { join, extname } from "path"
import type { CommandOutput } from "@/shared/types"
import { NOSE_WWW } from "@/config"
import { getState } from "@/state"
import { appPath } from "@/webapp"
import { isBinaryFile } from "@/utils"
import { countChar } from "@/shared/utils"
import type { CommandOutput } from "app/src/shared/types"
import { NOSE_WWW } from "app/src/config"
import { getState } from "app/src/state"
import { appPath } from "app/src/webapp"
import { isBinaryFile } from "app/src/utils"
import { countChar } from "app/src/shared/utils"
export default async function (path: string) {
const state = getState()

View File

@ -1,5 +1,5 @@
import { apps } from "@/webapp"
import { getState } from "@/state"
import { apps } from "app/src/webapp"
import { getState } from "app/src/state"
export default function (project: string) {
const state = getState()

View File

@ -1,7 +1,7 @@
import { readdirSync } from "fs"
import { NOSE_WWW } from "@/config"
import { getState } from "@/state"
import { appPath } from "@/webapp"
import { NOSE_WWW } from "app/src/config"
import { getState } from "app/src/state"
import { appPath } from "app/src/webapp"
export default function () {
const state = getState()

View File

@ -1,9 +1,9 @@
import { mkdirSync, writeFileSync } from "fs"
import { join } from "path"
import { apps } from "@/webapp"
import { NOSE_WWW } from "@/config"
import { isDir } from "@utils"
import { apps } from "app/src/webapp"
import { NOSE_WWW } from "app/src/config"
import { isDir } from "app/src/utils"
import load from "./load"

View File

@ -1,4 +1,4 @@
import { getState } from "@/state"
import { getState } from "app/src/state"
export default function () {
const state = getState()

View File

@ -1,5 +1,5 @@
import { apps } from "@/webapp"
import { getState } from "@/state"
import { apps } from "app/src/webapp"
import { getState } from "app/src/state"
export default function () {
const state = getState()

22
app/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "pluto",
"module": "src/server.tsx",
"type": "module",
"private": true,
"scripts": {
"start": "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"
}
}

View File

@ -5,7 +5,6 @@ export const NOSE_ICON = ` ͡° ͜ʖ ͡°`
export const NOSE_SYS = resolve("./nose")
export const NOSE_SYS_BIN = join(NOSE_SYS, "bin")
const homedir = process.platform === "darwin" ? `/Users/${process.env.USER}` : `/home/${process.env.USER}`
export const NOSE_DIR = resolve(join(homedir, "nose"))
export const NOSE_DIR = resolve("..")
export const NOSE_BIN = join(NOSE_DIR, "bin")
export const NOSE_WWW = join(NOSE_DIR, "www")

4
app/tsconfig.json Normal file
View File

@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["./**/*"]
}

2
bin/ping.ts Normal file
View File

@ -0,0 +1,2 @@
export default () =>
"pong"

View File

@ -2,14 +2,19 @@
"lockfileVersion": 1,
"workspaces": {
"": {
"name": "pluto",
"name": "nose-pluto",
"dependencies": {
"hono": "^4.9.7",
"kleur": "^4.1.5",
},
"devDependencies": {
"@types/bun": "latest",
},
},
"app": {
"name": "pluto",
"dependencies": {
"kleur": "^4.1.5",
},
"peerDependencies": {
"typescript": "^5",
},
@ -18,7 +23,7 @@
"packages": {
"@types/bun": ["@types/bun@1.2.22", "", { "dependencies": { "bun-types": "1.2.22" } }, "sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA=="],
"@types/node": ["@types/node@24.5.0", "", { "dependencies": { "undici-types": "~7.12.0" } }, "sha512-y1dMvuvJspJiPSDZUQ+WMBvF7dpnEqN4x9DDC9ie5Fs/HUZJA3wFp7EhHoVaKX/iI0cRoECV8X2jL8zi0xrHCg=="],
"@types/node": ["@types/node@24.5.2", "", { "dependencies": { "undici-types": "~7.12.0" } }, "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ=="],
"@types/react": ["@types/react@19.1.13", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-hHkbU/eoO3EG5/MZkuFSKmYqPbSVk5byPFa3e7y/8TybHiLMACgI8seVYlicwk7H5K/rI2px9xrQp/C+AUDTiQ=="],
@ -26,10 +31,12 @@
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
"hono": ["hono@4.9.7", "", {}, "sha512-t4Te6ERzIaC48W3x4hJmBwgNlLhmiEdEE5ViYb02ffw4ignHNHa5IBtPjmbKstmtKa8X6C35iWwK4HaqvrzG9w=="],
"hono": ["hono@4.9.8", "", {}, "sha512-JW8Bb4RFWD9iOKxg5PbUarBYGM99IcxFl2FPBo2gSJO11jjUDqlP1Bmfyqt8Z/dGhIQ63PMA9LdcLefXyIasyg=="],
"kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],
"pluto": ["pluto@workspace:app"],
"typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
"undici-types": ["undici-types@7.12.0", "", {}, "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ=="],

View File

View File

@ -1,31 +1,24 @@
{
"name": "pluto",
"module": "src/server.tsx",
"type": "module",
"name": "nose-pluto",
"private": true,
"type": "module",
"workspaces": [
"app"
],
"scripts": {
"start": "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"
"dev": "bun run --cwd ./app dev",
"start": "bun run --cwd ./app start",
"build": "bun run --cwd ./app build"
},
"alias": {
"@utils": "./src/utils.tsx",
"@config": "./src/config.ts",
"@/*": "./src/*"
"dependencies": {
"hono": "^4.9.7"
},
"devDependencies": {
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5"
},
"dependencies": {
"hono": "^4.9.7",
"kleur": "^4.1.5"
"alias": {
"@utils": "./app/src/utils.tsx",
"@config": "./app/src/config.ts",
"@/*": "./app/src/*"
}
}
}

View File

@ -29,10 +29,10 @@
"baseUrl": ".",
"paths": {
"@utils": [
"src/utils.tsx"
"app/src/utils.tsx"
],
"@/*": [
"src/*"
"app/src/*"
]
},
}

2
www/ping.ts Normal file
View File

@ -0,0 +1,2 @@
export default () =>
"pong"