reeeeeboooot
This commit is contained in:
parent
dc92594219
commit
1c3dd16517
|
|
@ -1,5 +1,5 @@
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
import { apps } from "@/webapp"
|
import { apps } from "app/src/webapp"
|
||||||
|
|
||||||
const devMode = process.env.BUN_HOT
|
const devMode = process.env.BUN_HOT
|
||||||
|
|
||||||
|
|
@ -2,11 +2,11 @@ import { escapeHTML } from "bun"
|
||||||
import { readdirSync } from "fs"
|
import { readdirSync } from "fs"
|
||||||
import { join, extname } from "path"
|
import { join, extname } from "path"
|
||||||
|
|
||||||
import type { CommandOutput } from "@/shared/types"
|
import type { CommandOutput } from "app/src/shared/types"
|
||||||
import { NOSE_WWW } from "@/config"
|
import { NOSE_WWW } from "app/src/config"
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
import { appPath } from "@/webapp"
|
import { appPath } from "app/src/webapp"
|
||||||
import { isBinaryFile } from "@/utils"
|
import { isBinaryFile } from "app/src/utils"
|
||||||
import { highlight } from "../lib/highlight"
|
import { highlight } from "../lib/highlight"
|
||||||
|
|
||||||
export default async function (path: string) {
|
export default async function (path: string) {
|
||||||
|
|
@ -2,12 +2,12 @@ import { escapeHTML } from "bun"
|
||||||
import { readdirSync } from "fs"
|
import { readdirSync } from "fs"
|
||||||
import { join, extname } from "path"
|
import { join, extname } from "path"
|
||||||
|
|
||||||
import type { CommandOutput } from "@/shared/types"
|
import type { CommandOutput } from "app/src/shared/types"
|
||||||
import { NOSE_WWW } from "@/config"
|
import { NOSE_WWW } from "app/src/config"
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
import { appPath } from "@/webapp"
|
import { appPath } from "app/src/webapp"
|
||||||
import { isBinaryFile } from "@/utils"
|
import { isBinaryFile } from "app/src/utils"
|
||||||
import { countChar } from "@/shared/utils"
|
import { countChar } from "app/src/shared/utils"
|
||||||
|
|
||||||
export default async function (path: string) {
|
export default async function (path: string) {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { apps } from "@/webapp"
|
import { apps } from "app/src/webapp"
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
|
|
||||||
export default function (project: string) {
|
export default function (project: string) {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { readdirSync } from "fs"
|
import { readdirSync } from "fs"
|
||||||
import { NOSE_WWW } from "@/config"
|
import { NOSE_WWW } from "app/src/config"
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
import { appPath } from "@/webapp"
|
import { appPath } from "app/src/webapp"
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { mkdirSync, writeFileSync } from "fs"
|
import { mkdirSync, writeFileSync } from "fs"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
|
|
||||||
import { apps } from "@/webapp"
|
import { apps } from "app/src/webapp"
|
||||||
import { NOSE_WWW } from "@/config"
|
import { NOSE_WWW } from "app/src/config"
|
||||||
import { isDir } from "@utils"
|
import { isDir } from "app/src/utils"
|
||||||
|
|
||||||
import load from "./load"
|
import load from "./load"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { apps } from "@/webapp"
|
import { apps } from "app/src/webapp"
|
||||||
import { getState } from "@/state"
|
import { getState } from "app/src/state"
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const state = getState()
|
const state = getState()
|
||||||
22
app/package.json
Normal file
22
app/package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ export const NOSE_ICON = ` ͡° ͜ʖ ͡°`
|
||||||
export const NOSE_SYS = resolve("./nose")
|
export const NOSE_SYS = resolve("./nose")
|
||||||
export const NOSE_SYS_BIN = join(NOSE_SYS, "bin")
|
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("..")
|
||||||
export const NOSE_DIR = resolve(join(homedir, "nose"))
|
|
||||||
export const NOSE_BIN = join(NOSE_DIR, "bin")
|
export const NOSE_BIN = join(NOSE_DIR, "bin")
|
||||||
export const NOSE_WWW = join(NOSE_DIR, "www")
|
export const NOSE_WWW = join(NOSE_DIR, "www")
|
||||||
4
app/tsconfig.json
Normal file
4
app/tsconfig.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"include": ["./**/*"]
|
||||||
|
}
|
||||||
2
bin/ping.ts
Normal file
2
bin/ping.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
export default () =>
|
||||||
|
"pong"
|
||||||
15
bun.lock
15
bun.lock
|
|
@ -2,14 +2,19 @@
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pluto",
|
"name": "nose-pluto",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hono": "^4.9.7",
|
"hono": "^4.9.7",
|
||||||
"kleur": "^4.1.5",
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"name": "pluto",
|
||||||
|
"dependencies": {
|
||||||
|
"kleur": "^4.1.5",
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5",
|
"typescript": "^5",
|
||||||
},
|
},
|
||||||
|
|
@ -18,7 +23,7 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"@types/bun": ["@types/bun@1.2.22", "", { "dependencies": { "bun-types": "1.2.22" } }, "sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA=="],
|
"@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=="],
|
"@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=="],
|
"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=="],
|
"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=="],
|
"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=="],
|
"undici-types": ["undici-types@7.12.0", "", {}, "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ=="],
|
||||||
|
|
|
||||||
0
nose/global.d.ts → global.d.ts
vendored
0
nose/global.d.ts → global.d.ts
vendored
35
package.json
35
package.json
|
|
@ -1,31 +1,24 @@
|
||||||
{
|
{
|
||||||
"name": "pluto",
|
"name": "nose-pluto",
|
||||||
"module": "src/server.tsx",
|
|
||||||
"type": "module",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"workspaces": [
|
||||||
|
"app"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bun src/server.tsx",
|
"dev": "bun run --cwd ./app dev",
|
||||||
"dev": "env BUN_HOT=1 bun --hot src/server.tsx",
|
"start": "bun run --cwd ./app start",
|
||||||
"deploy": "./scripts/deploy.sh",
|
"build": "bun run --cwd ./app build"
|
||||||
"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"
|
|
||||||
},
|
},
|
||||||
"alias": {
|
"dependencies": {
|
||||||
"@utils": "./src/utils.tsx",
|
"hono": "^4.9.7"
|
||||||
"@config": "./src/config.ts",
|
|
||||||
"@/*": "./src/*"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest"
|
"@types/bun": "latest"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"alias": {
|
||||||
"typescript": "^5"
|
"@utils": "./app/src/utils.tsx",
|
||||||
},
|
"@config": "./app/src/config.ts",
|
||||||
"dependencies": {
|
"@/*": "./app/src/*"
|
||||||
"hono": "^4.9.7",
|
|
||||||
"kleur": "^4.1.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -29,10 +29,10 @@
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@utils": [
|
"@utils": [
|
||||||
"src/utils.tsx"
|
"app/src/utils.tsx"
|
||||||
],
|
],
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"src/*"
|
"app/src/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
www/ping.ts
Normal file
2
www/ping.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
export default () =>
|
||||||
|
"pong"
|
||||||
Loading…
Reference in New Issue
Block a user