everything-dev 1.16.2 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-contract.cjs +16 -5
- package/dist/api-contract.cjs.map +1 -1
- package/dist/api-contract.mjs +16 -5
- package/dist/api-contract.mjs.map +1 -1
- package/dist/cli/init.cjs +50 -51
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +50 -51
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/sync.cjs +3 -5
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +3 -5
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/timing.cjs +30 -0
- package/dist/cli/timing.cjs.map +1 -0
- package/dist/cli/timing.mjs +27 -0
- package/dist/cli/timing.mjs.map +1 -0
- package/dist/cli/upgrade.cjs +214 -48
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +214 -48
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs +9 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +9 -0
- package/dist/cli.mjs.map +1 -1
- package/dist/components/dev-view.cjs +1 -1
- package/dist/components/dev-view.mjs +1 -1
- package/dist/components/streaming-view.cjs +1 -1
- package/dist/components/streaming-view.mjs +1 -1
- package/dist/config.cjs +125 -74
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +9 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +9 -2
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +126 -76
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +7 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +58 -13
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +58 -13
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.mjs +7 -1
- package/dist/contract.mjs.map +1 -1
- package/dist/dev-session.cjs +5 -3
- package/dist/dev-session.cjs.map +1 -1
- package/dist/dev-session.mjs +3 -3
- package/dist/dev-session.mjs.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/merge.cjs +1 -0
- package/dist/merge.mjs +1 -1
- package/dist/orchestrator.cjs +1 -1
- package/dist/orchestrator.mjs +1 -1
- package/dist/plugin.cjs +49 -37
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +44 -12
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +44 -12
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +48 -36
- package/dist/plugin.mjs.map +1 -1
- package/dist/sidebar.cjs +6 -14
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.d.cts +3 -3
- package/dist/sidebar.d.cts.map +1 -1
- package/dist/sidebar.d.mts +3 -3
- package/dist/sidebar.d.mts.map +1 -1
- package/dist/sidebar.mjs +6 -14
- package/dist/sidebar.mjs.map +1 -1
- package/dist/types.cjs +10 -16
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +56 -12
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +56 -12
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +10 -17
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api-contract.ts +21 -3
- package/src/cli/init.ts +95 -63
- package/src/cli/sync.ts +5 -8
- package/src/cli/timing.ts +36 -0
- package/src/cli/upgrade.ts +292 -56
- package/src/cli.ts +15 -0
- package/src/config.ts +250 -107
- package/src/contract.ts +8 -0
- package/src/dev-session.ts +1 -1
- package/src/plugin.ts +97 -54
- package/src/sidebar.ts +9 -31
- package/src/types.ts +10 -15
package/dist/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.cjs","names":["colors","frames","icons","gradients","findConfigPath","findCommandDescriptor","bosPlugin","parseCommandInput"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { findCommandDescriptor } from \"./cli/catalog\";\nimport { printHelp } from \"./cli/help\";\nimport { parseCommandInput } from \"./cli/parse\";\nimport { findConfigPath } from \"./config\";\nimport bosPlugin from \"./plugin\";\nimport { createPluginRuntime } from \"./sdk\";\nimport { printBanner } from \"./utils/banner\";\nimport { colors, frames, gradients, icons } from \"./utils/theme\";\n\nfunction printConfigView(result: {\n account: string;\n domain?: string;\n staging?: { domain: string };\n app: {\n host: { name?: string; development: string; production?: string };\n ui: { name?: string; development?: string; production?: string; ssr?: string };\n api: { name?: string; development?: string; production?: string; proxy?: string };\n };\n}) {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"CONFIG\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n\n console.log(` ${colors.dim(\"Account\")} ${colors.cyan(result.account)}`);\n console.log(` ${colors.dim(\"Domain\")} ${colors.white(result.domain ?? \"not configured\")}`);\n if (result.staging) {\n console.log(` ${colors.dim(\"Staging\")} ${colors.magenta(result.staging.domain)}`);\n }\n console.log();\n}\n\nfunction formatTimeAgo(isoTimestamp: string): string {\n const now = Date.now();\n const then = new Date(isoTimestamp).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n if (diffMins < 1) return \"just now\";\n if (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? \"s\" : \"\"} ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? \"s\" : \"\"} ago`;\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) return `${diffDays} day${diffDays > 1 ? \"s\" : \"\"} ago`;\n return isoTimestamp.split(\"T\")[0] ?? isoTimestamp;\n}\n\nfunction normalizeVersion(v: string): string {\n return v.replace(/^[\\^~>=v]+/, \"\").trim();\n}\n\nasync function warnIfOutdated(client: any, command: string): Promise<void> {\n if (![\"dev\", \"build\", \"start\"].includes(command)) return;\n\n try {\n const status = await client.status();\n if (status.status === \"error\" || !status.packages) return;\n\n const outdated = status.packages.filter(\n (p: { name: string; installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n\n if (outdated.length === 0) return;\n\n console.log();\n console.log(colors.yellow(` ! Outdated packages detected:`));\n for (const pkg of outdated) {\n console.log(colors.dim(` ${pkg.name} ${pkg.installed} → ${pkg.latest}`));\n }\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n console.log();\n } catch {\n // silently ignore if status check fails\n }\n}\n\nasync function main() {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return;\n }\n\n const invocationArgs = args.length > 0 ? args : [\"dev\"];\n const command = invocationArgs[0] ?? \"dev\";\n const configPath = findConfigPath();\n\n const commandMatch = findCommandDescriptor(invocationArgs);\n if (!commandMatch) {\n console.error(`Unknown command: ${command}`);\n process.exit(1);\n }\n\n const { descriptor, consumed } = commandMatch;\n const commandArgs = invocationArgs.slice(consumed);\n\n printBanner();\n\n const runtime = createPluginRuntime({\n registry: {\n bos: { module: bosPlugin },\n },\n secrets: {},\n });\n\n const pluginRuntime: any = runtime;\n const loadPlugin = pluginRuntime.usePlugin.bind(pluginRuntime);\n const plugin = await loadPlugin(\"bos\", {\n variables: {\n configPath: configPath ?? undefined,\n },\n secrets: {},\n });\n\n const client = plugin.createClient();\n\n await warnIfOutdated(client, command);\n\n try {\n const input = parseCommandInput(descriptor, commandArgs);\n const result = await (client as any)[descriptor.key](input);\n\n if (descriptor.key === \"config\") {\n if (!result.config) {\n console.error(\"No bos.config.json found\");\n process.exit(1);\n }\n\n printConfigView(result.config);\n process.stdout.write(`${JSON.stringify(result.config, null, 2)}\\n`);\n return;\n }\n\n if (descriptor.key === \"init\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Project initialized`));\n console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n console.log(` ${colors.dim(\"Directory:\")} ${result.directory}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n if (result.plugins && result.plugins.length > 0)\n console.log(` ${colors.dim(\"Plugins:\")} ${result.plugins.join(\", \")}`);\n console.log(` ${colors.dim(\"Files copied:\")} ${result.filesCopied}`);\n console.log();\n console.log(colors.dim(\" Next steps:\"));\n console.log(colors.dim(` cd ${result.directory}`));\n if (result.status === \"initialized\" && !(input as any)?.noInstall) {\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n } else {\n console.log(colors.dim(\" bun install\"));\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"sync\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no files written`));\n } else {\n console.log(colors.green(`${icons.ok} Template synced`));\n }\n if (result.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${result.updated.length} file(s)`);\n for (const f of result.updated) console.log(` ${colors.dim(f)}`);\n }\n if (result.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${result.added.length} file(s)`);\n for (const f of result.added) console.log(` ${colors.dim(f)}`);\n }\n if (result.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${result.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of result.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (result.updated.length === 0 && result.added.length === 0 && result.skipped.length === 0) {\n console.log(` ${colors.dim(\"Already up to date\")}`);\n }\n if (result.status !== \"dry-run\" && result.updated.length > 0) {\n console.log();\n console.log(colors.dim(\" Review changes — your customizations take priority:\"));\n console.log(\n colors.dim(\n \" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts — never overwritten\",\n ),\n );\n console.log(\n colors.dim(\" • ui/src/components/**, ui/src/styles.css — never overwritten\"),\n );\n console.log(\n colors.dim(\n \" • Other updated files — accept framework improvements, then restore your changes\",\n ),\n );\n console.log(colors.dim(\" • Skipped files — yours already, only update with --force\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"upgrade\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no changes applied`));\n } else {\n console.log(colors.green(`${icons.ok} Upgrade successful`));\n }\n for (const pkg of result.packages) {\n if (pkg.from && pkg.from !== pkg.to) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.from} → ${pkg.to}`);\n } else if (!pkg.from) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (new)`);\n } else {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (up to date)`);\n }\n }\n if (result.changelogUrl) {\n console.log(` ${colors.dim(\"Changelog:\")} ${result.changelogUrl}`);\n }\n if (result.availablePlugins && result.availablePlugins.length > 0) {\n console.log(` ${colors.dim(\"New parent plugins:\")} ${result.availablePlugins.join(\", \")}`);\n }\n if (result.selectedPlugins && result.selectedPlugins.length > 0) {\n console.log(` ${colors.dim(\"Added plugins:\")} ${result.selectedPlugins.join(\", \")}`);\n }\n if (result.sync) {\n const sync = result.sync;\n if (sync.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${sync.updated.length} file(s)`);\n for (const f of sync.updated) console.log(` ${colors.dim(f)}`);\n }\n if (sync.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${sync.added.length} file(s)`);\n for (const f of sync.added) console.log(` ${colors.dim(f)}`);\n }\n if (sync.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${sync.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of sync.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (\n result.status !== \"dry-run\" &&\n (sync.updated.length > 0 || sync.added.length > 0 || sync.skipped.length > 0)\n ) {\n console.log();\n console.log(colors.dim(\" Resolve differences — your code takes priority:\"));\n console.log();\n console.log(colors.dim(\" Never overwritten (safe):\"));\n console.log(\n colors.dim(\" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts\"),\n );\n console.log(colors.dim(\" • ui/src/components/**, ui/src/styles.css\"));\n console.log();\n console.log(colors.dim(\" Replaced — review and keep your changes:\"));\n console.log(\n colors.dim(\n \" • api/drizzle.config.ts, api/tsconfig.json, api/tsconfig.contract.json\",\n ),\n );\n console.log(colors.dim(\" • api/plugin.dev.ts, api/rspack.config.js\"));\n console.log(colors.dim(\" • ui/src/routes/* (core routes only)\"));\n console.log();\n console.log(colors.dim(\" Merged — your deps preserved:\"));\n console.log(colors.dim(\" • package.json, api/package.json, ui/package.json\"));\n console.log();\n console.log(colors.dim(\" Skipped — already yours:\"));\n console.log(colors.dim(\" • Use --force only if you want framework updates\"));\n }\n }\n if (result.migrated && result.migrated.length > 0) {\n console.log(` ${colors.yellow(\"Removed:\")} ${result.migrated.length} obsolete file(s)`);\n for (const f of result.migrated) console.log(` ${colors.dim(f)}`);\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"status\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"STATUS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.extends) console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n console.log();\n console.log(` ${colors.dim(\"Packages:\")}`);\n for (const pkg of result.packages) {\n const hasUpdate =\n pkg.installed &&\n pkg.latest &&\n normalizeVersion(pkg.installed) !== normalizeVersion(pkg.latest);\n const versionStr = hasUpdate\n ? `${pkg.installed} → ${pkg.latest}`\n : pkg.installed || \"not installed\";\n const label = hasUpdate ? colors.yellow(versionStr) : colors.dim(versionStr);\n console.log(` ${colors.dim(`${pkg.name}`)} ${label}`);\n }\n console.log();\n if (result.lastSync) {\n const ago = formatTimeAgo(result.lastSync);\n console.log(` ${colors.dim(\"Last sync:\")} ${ago}`);\n } else {\n console.log(` ${colors.dim(\"Last sync:\")} never`);\n }\n const envLabel =\n result.envFile === \"found\"\n ? colors.green(\"found\")\n : result.envFile === \"example-only\"\n ? colors.yellow(\"missing (only .env.example found)\")\n : colors.error(\"missing\");\n console.log(` ${colors.dim(\".env:\")} ${envLabel}`);\n if (result.parentReachable !== undefined) {\n const parentLabel = result.parentReachable\n ? colors.green(\"reachable\")\n : colors.error(\"unreachable\");\n console.log(` ${colors.dim(\"Parent:\")} ${parentLabel}`);\n }\n const hasUpdates = result.packages.some(\n (p: { installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n if (hasUpdates) {\n console.log();\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"typesGen\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Types generated`));\n if (result.source) {\n console.log(\n ` ${colors.dim(\"Mode:\")} ${result.source === \"remote\" ? colors.cyan(\"remote\") : colors.dim(\"local\")}`,\n );\n }\n if (result.generated.length > 0) {\n console.log(` ${colors.dim(\"Generated:\")}`);\n for (const f of result.generated) console.log(` ${colors.dim(f)}`);\n }\n if (result.fetched.length > 0) {\n console.log(` ${colors.dim(\"Fetched from remote:\")}`);\n for (const url of result.fetched) console.log(` ${colors.dim(url)}`);\n }\n if (result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped (local):\")}`);\n for (const s of result.skipped) console.log(` ${colors.dim(s)}`);\n }\n if (result.failed.length > 0) {\n console.log(` ${colors.yellow(\"Failed:\")}`);\n for (const f of result.failed) console.log(` ${colors.error(f)}`);\n }\n console.log();\n return;\n }\n\n if (result?.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n\n if (descriptor.key === \"keyPublish\") {\n process.stdout.write(`Generated publish key for ${result.account}\\n`);\n process.stdout.write(` Network: ${result.network}\\n`);\n process.stdout.write(` Contract: ${result.contract}\\n`);\n process.stdout.write(` Allowance: ${result.allowance}\\n`);\n process.stdout.write(` Functions: ${result.functionNames.join(\", \")}\\n`);\n process.stdout.write(` Public key: ${result.publicKey}\\n`);\n process.stdout.write(` Private key: ${result.privateKey}\\n`);\n process.stdout.write(` Copy: NEAR_PRIVATE_KEY=${result.privateKey}\\n`);\n }\n\n if (descriptor.key === \"pluginAdd\") {\n console.log();\n console.log(colors.green(`${icons.ok} Added plugin ${result.key}`));\n if (result.development) console.log(` ${colors.dim(\"Development:\")} ${result.development}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginRemove\") {\n console.log();\n console.log(colors.green(`${icons.ok} Removed plugin ${result.key}`));\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginList\") {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.config} ${gradients.cyber(\"PLUGINS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.plugins.length === 0) {\n console.log(colors.dim(\" No plugins configured\"));\n } else {\n for (const pluginItem of result.plugins) {\n console.log(` ${colors.cyan(pluginItem.key)}`);\n if (pluginItem.development)\n console.log(` ${colors.dim(\"Development:\")} ${pluginItem.development}`);\n if (pluginItem.production)\n console.log(` ${colors.dim(\"Production:\")} ${pluginItem.production}`);\n }\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginPublish\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published plugin ${result.key}`));\n if (result.path) console.log(` ${colors.dim(\"Path:\")} ${result.path}`);\n if (result.script) console.log(` ${colors.dim(\"Script:\")} bun run ${result.script}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"publish\") {\n if (result.status === \"dry-run\") {\n console.log();\n console.log(colors.cyan(`${icons.ok} Dry run complete`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n console.log();\n return;\n }\n\n if (result.status === \"published\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published successfully`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n if (result.txHash) {\n console.log(` ${colors.dim(\"Transaction:\")} ${result.txHash}`);\n }\n if (result.built && result.built.length > 0) {\n console.log(` ${colors.dim(\"Built:\")} ${result.built.join(\", \")}`);\n }\n if (result.skipped && result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped:\")} ${result.skipped.join(\", \")}`);\n }\n console.log();\n return;\n }\n }\n } catch (error) {\n console.error(`[CLI] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n}\n\nmain().catch((error) => {\n console.error(\"[CLI] Fatal error:\", error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;AAUA,SAAS,gBAAgB,QAStB;AACD,SAAQ,KAAK;AACb,SAAQ,IAAIA,qBAAO,KAAKC,qBAAO,IAAI,GAAG,CAAC,CAAC;AACxC,SAAQ,IAAI,KAAKC,oBAAM,IAAI,GAAGC,wBA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AC/D,YAAQ,IAAI,KAAKF,qBAAO,IAAI,gBAAgB,CAAC,GAAG,OAAO,cAAc;AACrE,QAAI,OAAO,OACT,SAAQ,IAAI,KAAKA,qBAAO,IAAI,eAAe,CAAC,GAAG,OAAO,SAAS;AAEjE,QAAI,OAAO,SAAS,OAAO,MAAM,SAAS,EACxC,SAAQ,IAAI,KAAKA,qBAAO,IAAI,SAAS,CAAC,GAAG,OAAO,MAAM,KAAK,KAAK,GAAG;AAErE,QAAI,OAAO,WAAW,OAAO,QAAQ,SAAS,EAC5C,SAAQ,IAAI,KAAKA,qBAAO,IAAI,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,KAAK,GAAG;AAEzE,YAAQ,KAAK;AACb;;;UAGG,OAAO;AACd,UAAQ,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GAAG;AAChF,UAAQ,KAAK,EAAE;;;AAInB,MAAM,CAAC,OAAO,UAAU;AACtB,SAAQ,MAAM,sBAAsB,MAAM;AAC1C,SAAQ,KAAK,EAAE;EACf"}
|
|
1
|
+
{"version":3,"file":"cli.cjs","names":["colors","frames","icons","gradients","formatDuration","sumPhaseDurations","findConfigPath","findCommandDescriptor","bosPlugin","parseCommandInput"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { findCommandDescriptor } from \"./cli/catalog\";\nimport { printHelp } from \"./cli/help\";\nimport { parseCommandInput } from \"./cli/parse\";\nimport { formatDuration, sumPhaseDurations } from \"./cli/timing\";\nimport { findConfigPath } from \"./config\";\nimport bosPlugin from \"./plugin\";\nimport { createPluginRuntime } from \"./sdk\";\nimport { printBanner } from \"./utils/banner\";\nimport { colors, frames, gradients, icons } from \"./utils/theme\";\n\nfunction printConfigView(result: {\n account: string;\n domain?: string;\n staging?: { domain: string };\n app: {\n host: { name?: string; development: string; production?: string };\n ui: { name?: string; development?: string; production?: string; ssr?: string };\n api: { name?: string; development?: string; production?: string; proxy?: string };\n };\n}) {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"CONFIG\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n\n console.log(` ${colors.dim(\"Account\")} ${colors.cyan(result.account)}`);\n console.log(` ${colors.dim(\"Domain\")} ${colors.white(result.domain ?? \"not configured\")}`);\n if (result.staging) {\n console.log(` ${colors.dim(\"Staging\")} ${colors.magenta(result.staging.domain)}`);\n }\n console.log();\n}\n\nfunction formatTimeAgo(isoTimestamp: string): string {\n const now = Date.now();\n const then = new Date(isoTimestamp).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n if (diffMins < 1) return \"just now\";\n if (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? \"s\" : \"\"} ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? \"s\" : \"\"} ago`;\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) return `${diffDays} day${diffDays > 1 ? \"s\" : \"\"} ago`;\n return isoTimestamp.split(\"T\")[0] ?? isoTimestamp;\n}\n\nfunction normalizeVersion(v: string): string {\n return v.replace(/^[\\^~>=v]+/, \"\").trim();\n}\n\nfunction printTimingSummary(timings: Array<{ name: string; durationMs: number }> | undefined) {\n if (!timings || timings.length === 0) return;\n\n console.log(` ${colors.dim(\"Timings:\")}`);\n for (const timing of timings) {\n console.log(` ${colors.dim(timing.name.padEnd(22))} ${formatDuration(timing.durationMs)}`);\n }\n console.log(\n ` ${colors.dim(\"total\".padEnd(22))} ${formatDuration(sumPhaseDurations(timings))}`,\n );\n}\n\nasync function warnIfOutdated(client: any, command: string): Promise<void> {\n if (![\"dev\", \"build\", \"start\"].includes(command)) return;\n\n try {\n const status = await client.status();\n if (status.status === \"error\" || !status.packages) return;\n\n const outdated = status.packages.filter(\n (p: { name: string; installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n\n if (outdated.length === 0) return;\n\n console.log();\n console.log(colors.yellow(` ! Outdated packages detected:`));\n for (const pkg of outdated) {\n console.log(colors.dim(` ${pkg.name} ${pkg.installed} → ${pkg.latest}`));\n }\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n console.log();\n } catch {\n // silently ignore if status check fails\n }\n}\n\nasync function main() {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return;\n }\n\n const invocationArgs = args.length > 0 ? args : [\"dev\"];\n const command = invocationArgs[0] ?? \"dev\";\n const configPath = findConfigPath();\n\n const commandMatch = findCommandDescriptor(invocationArgs);\n if (!commandMatch) {\n console.error(`Unknown command: ${command}`);\n process.exit(1);\n }\n\n const { descriptor, consumed } = commandMatch;\n const commandArgs = invocationArgs.slice(consumed);\n\n printBanner();\n\n const runtime = createPluginRuntime({\n registry: {\n bos: { module: bosPlugin },\n },\n secrets: {},\n });\n\n const pluginRuntime: any = runtime;\n const loadPlugin = pluginRuntime.usePlugin.bind(pluginRuntime);\n const plugin = await loadPlugin(\"bos\", {\n variables: {\n configPath: configPath ?? undefined,\n },\n secrets: {},\n });\n\n const client = plugin.createClient();\n\n await warnIfOutdated(client, command);\n\n try {\n const input = parseCommandInput(descriptor, commandArgs);\n const result = await (client as any)[descriptor.key](input);\n\n if (descriptor.key === \"config\") {\n if (!result.config) {\n console.error(\"No bos.config.json found\");\n process.exit(1);\n }\n\n printConfigView(result.config);\n process.stdout.write(`${JSON.stringify(result.config, null, 2)}\\n`);\n return;\n }\n\n if (descriptor.key === \"init\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Project initialized`));\n console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n console.log(` ${colors.dim(\"Directory:\")} ${result.directory}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n if (result.plugins && result.plugins.length > 0)\n console.log(` ${colors.dim(\"Plugins:\")} ${result.plugins.join(\", \")}`);\n console.log(` ${colors.dim(\"Files copied:\")} ${result.filesCopied}`);\n printTimingSummary(result.timings);\n console.log();\n console.log(colors.dim(\" Next steps:\"));\n console.log(colors.dim(` cd ${result.directory}`));\n if (result.status === \"initialized\" && !(input as any)?.noInstall) {\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n } else {\n console.log(colors.dim(\" bun install\"));\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"sync\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no files written`));\n } else {\n console.log(colors.green(`${icons.ok} Template synced`));\n }\n if (result.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${result.updated.length} file(s)`);\n for (const f of result.updated) console.log(` ${colors.dim(f)}`);\n }\n if (result.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${result.added.length} file(s)`);\n for (const f of result.added) console.log(` ${colors.dim(f)}`);\n }\n if (result.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${result.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of result.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (result.updated.length === 0 && result.added.length === 0 && result.skipped.length === 0) {\n console.log(` ${colors.dim(\"Already up to date\")}`);\n }\n if (result.status !== \"dry-run\" && result.updated.length > 0) {\n console.log();\n console.log(colors.dim(\" Review changes — your customizations take priority:\"));\n console.log(\n colors.dim(\n \" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts — never overwritten\",\n ),\n );\n console.log(\n colors.dim(\" • ui/src/components/**, ui/src/styles.css — never overwritten\"),\n );\n console.log(\n colors.dim(\n \" • Other updated files — accept framework improvements, then restore your changes\",\n ),\n );\n console.log(colors.dim(\" • Skipped files — yours already, only update with --force\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"upgrade\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no changes applied`));\n } else {\n console.log(colors.green(`${icons.ok} Upgrade successful`));\n }\n for (const pkg of result.packages) {\n if (pkg.from && pkg.from !== pkg.to) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.from} → ${pkg.to}`);\n } else if (!pkg.from) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (new)`);\n } else {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (up to date)`);\n }\n }\n if (result.changelogUrl) {\n console.log(` ${colors.dim(\"Changelog:\")} ${result.changelogUrl}`);\n }\n if (result.availablePlugins && result.availablePlugins.length > 0) {\n console.log(` ${colors.dim(\"New parent plugins:\")} ${result.availablePlugins.join(\", \")}`);\n }\n if (result.selectedPlugins && result.selectedPlugins.length > 0) {\n console.log(` ${colors.dim(\"Added plugins:\")} ${result.selectedPlugins.join(\", \")}`);\n }\n printTimingSummary(result.timings);\n if (result.sync) {\n const sync = result.sync;\n if (sync.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${sync.updated.length} file(s)`);\n for (const f of sync.updated) console.log(` ${colors.dim(f)}`);\n }\n if (sync.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${sync.added.length} file(s)`);\n for (const f of sync.added) console.log(` ${colors.dim(f)}`);\n }\n if (sync.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${sync.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of sync.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (\n result.status !== \"dry-run\" &&\n (sync.updated.length > 0 || sync.added.length > 0 || sync.skipped.length > 0)\n ) {\n console.log();\n console.log(colors.dim(\" Resolve differences — your code takes priority:\"));\n console.log();\n console.log(colors.dim(\" Never overwritten (safe):\"));\n console.log(\n colors.dim(\" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts\"),\n );\n console.log(colors.dim(\" • ui/src/components/**, ui/src/styles.css\"));\n console.log();\n console.log(colors.dim(\" Replaced — review and keep your changes:\"));\n console.log(\n colors.dim(\n \" • api/drizzle.config.ts, api/tsconfig.json, api/tsconfig.contract.json\",\n ),\n );\n console.log(colors.dim(\" • api/plugin.dev.ts, api/rspack.config.js\"));\n console.log(colors.dim(\" • ui/src/routes/* (core routes only)\"));\n console.log();\n console.log(colors.dim(\" Merged — your deps preserved:\"));\n console.log(colors.dim(\" • package.json, api/package.json, ui/package.json\"));\n console.log();\n console.log(colors.dim(\" Skipped — already yours:\"));\n console.log(colors.dim(\" • Use --force only if you want framework updates\"));\n }\n }\n if (result.migrated && result.migrated.length > 0) {\n console.log(` ${colors.yellow(\"Removed:\")} ${result.migrated.length} obsolete file(s)`);\n for (const f of result.migrated) console.log(` ${colors.dim(f)}`);\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"status\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"STATUS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.extends) console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n console.log();\n console.log(` ${colors.dim(\"Packages:\")}`);\n for (const pkg of result.packages) {\n const hasUpdate =\n pkg.installed &&\n pkg.latest &&\n normalizeVersion(pkg.installed) !== normalizeVersion(pkg.latest);\n const versionStr = hasUpdate\n ? `${pkg.installed} → ${pkg.latest}`\n : pkg.installed || \"not installed\";\n const label = hasUpdate ? colors.yellow(versionStr) : colors.dim(versionStr);\n console.log(` ${colors.dim(`${pkg.name}`)} ${label}`);\n }\n console.log();\n if (result.lastSync) {\n const ago = formatTimeAgo(result.lastSync);\n console.log(` ${colors.dim(\"Last sync:\")} ${ago}`);\n } else {\n console.log(` ${colors.dim(\"Last sync:\")} never`);\n }\n const envLabel =\n result.envFile === \"found\"\n ? colors.green(\"found\")\n : result.envFile === \"example-only\"\n ? colors.yellow(\"missing (only .env.example found)\")\n : colors.error(\"missing\");\n console.log(` ${colors.dim(\".env:\")} ${envLabel}`);\n if (result.parentReachable !== undefined) {\n const parentLabel = result.parentReachable\n ? colors.green(\"reachable\")\n : colors.error(\"unreachable\");\n console.log(` ${colors.dim(\"Parent:\")} ${parentLabel}`);\n }\n const hasUpdates = result.packages.some(\n (p: { installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n if (hasUpdates) {\n console.log();\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"typesGen\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Types generated`));\n if (result.source) {\n console.log(\n ` ${colors.dim(\"Mode:\")} ${result.source === \"remote\" ? colors.cyan(\"remote\") : colors.dim(\"local\")}`,\n );\n }\n if (result.generated.length > 0) {\n console.log(` ${colors.dim(\"Generated:\")}`);\n for (const f of result.generated) console.log(` ${colors.dim(f)}`);\n }\n if (result.fetched.length > 0) {\n console.log(` ${colors.dim(\"Fetched from remote:\")}`);\n for (const url of result.fetched) console.log(` ${colors.dim(url)}`);\n }\n if (result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped (local):\")}`);\n for (const s of result.skipped) console.log(` ${colors.dim(s)}`);\n }\n if (result.failed.length > 0) {\n console.log(` ${colors.yellow(\"Failed:\")}`);\n for (const f of result.failed) console.log(` ${colors.error(f)}`);\n }\n console.log();\n return;\n }\n\n if (result?.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n\n if (descriptor.key === \"keyPublish\") {\n process.stdout.write(`Generated publish key for ${result.account}\\n`);\n process.stdout.write(` Network: ${result.network}\\n`);\n process.stdout.write(` Contract: ${result.contract}\\n`);\n process.stdout.write(` Allowance: ${result.allowance}\\n`);\n process.stdout.write(` Functions: ${result.functionNames.join(\", \")}\\n`);\n process.stdout.write(` Public key: ${result.publicKey}\\n`);\n process.stdout.write(` Private key: ${result.privateKey}\\n`);\n process.stdout.write(` Copy: NEAR_PRIVATE_KEY=${result.privateKey}\\n`);\n }\n\n if (descriptor.key === \"pluginAdd\") {\n console.log();\n console.log(colors.green(`${icons.ok} Added plugin ${result.key}`));\n if (result.development) console.log(` ${colors.dim(\"Development:\")} ${result.development}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginRemove\") {\n console.log();\n console.log(colors.green(`${icons.ok} Removed plugin ${result.key}`));\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginList\") {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.config} ${gradients.cyber(\"PLUGINS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.plugins.length === 0) {\n console.log(colors.dim(\" No plugins configured\"));\n } else {\n for (const pluginItem of result.plugins) {\n console.log(` ${colors.cyan(pluginItem.key)}`);\n if (pluginItem.development)\n console.log(` ${colors.dim(\"Development:\")} ${pluginItem.development}`);\n if (pluginItem.production)\n console.log(` ${colors.dim(\"Production:\")} ${pluginItem.production}`);\n }\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginPublish\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published plugin ${result.key}`));\n if (result.path) console.log(` ${colors.dim(\"Path:\")} ${result.path}`);\n if (result.script) console.log(` ${colors.dim(\"Script:\")} bun run ${result.script}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"publish\") {\n if (result.status === \"dry-run\") {\n console.log();\n console.log(colors.cyan(`${icons.ok} Dry run complete`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n console.log();\n return;\n }\n\n if (result.status === \"published\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published successfully`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n if (result.txHash) {\n console.log(` ${colors.dim(\"Transaction:\")} ${result.txHash}`);\n }\n if (result.built && result.built.length > 0) {\n console.log(` ${colors.dim(\"Built:\")} ${result.built.join(\", \")}`);\n }\n if (result.skipped && result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped:\")} ${result.skipped.join(\", \")}`);\n }\n console.log();\n return;\n }\n }\n } catch (error) {\n console.error(`[CLI] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n}\n\nmain().catch((error) => {\n console.error(\"[CLI] Fatal error:\", error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;AAWA,SAAS,gBAAgB,QAStB;AACD,SAAQ,KAAK;AACb,SAAQ,IAAIA,qBAAO,KAAKC,qBAAO,IAAI,GAAG,CAAC,CAAC;AACxC,SAAQ,IAAI,KAAKC,oBAAM,IAAI,GAAGC,wBAAU,MAAM,SAAS,GAAG;AAC1D,SAAQ,IAAIH,qBAAO,KAAKC,qBAAO,OAAO,GAAG,CAAC,CAAC;AAC3C,SAAQ,KAAK;AAEb,SAAQ,IAAI,KAAKD,qBAAO,IAAI,UAAU,CAAC,IAAIA,qBAAO,KAAK,OAAO,QAA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AM,GAAG,mBAAmB,CAAC;AACxD,YAAQ,IAAI,KAAKF,qBAAO,IAAI,gBAAgB,CAAC,GAAG,OAAO,cAAc;AACrE,YAAQ,KAAK;AACb;;AAGF,OAAI,OAAO,WAAW,aAAa;AACjC,YAAQ,KAAK;AACb,YAAQ,IAAIA,qBAAO,MAAM,GAAGE,oBAAM,GAAG,yBAAyB,CAAC;AAC/D,YAAQ,IAAI,KAAKF,qBAAO,IAAI,gBAAgB,CAAC,GAAG,OAAO,cAAc;AACrE,QAAI,OAAO,OACT,SAAQ,IAAI,KAAKA,qBAAO,IAAI,eAAe,CAAC,GAAG,OAAO,SAAS;AAEjE,QAAI,OAAO,SAAS,OAAO,MAAM,SAAS,EACxC,SAAQ,IAAI,KAAKA,qBAAO,IAAI,SAAS,CAAC,GAAG,OAAO,MAAM,KAAK,KAAK,GAAG;AAErE,QAAI,OAAO,WAAW,OAAO,QAAQ,SAAS,EAC5C,SAAQ,IAAI,KAAKA,qBAAO,IAAI,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,KAAK,GAAG;AAEzE,YAAQ,KAAK;AACb;;;UAGG,OAAO;AACd,UAAQ,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GAAG;AAChF,UAAQ,KAAK,EAAE;;;AAInB,MAAM,CAAC,OAAO,UAAU;AACtB,SAAQ,MAAM,sBAAsB,MAAM;AAC1C,SAAQ,KAAK,EAAE;EACf"}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createPluginRuntime } from "./sdk.mjs";
|
|
3
3
|
import { findConfigPath } from "./config.mjs";
|
|
4
|
+
import { formatDuration, sumPhaseDurations } from "./cli/timing.mjs";
|
|
4
5
|
import { colors, frames, gradients, icons } from "./utils/theme.mjs";
|
|
5
6
|
import plugin_default from "./plugin.mjs";
|
|
6
7
|
import { findCommandDescriptor } from "./cli/catalog.mjs";
|
|
@@ -34,6 +35,12 @@ function formatTimeAgo(isoTimestamp) {
|
|
|
34
35
|
function normalizeVersion(v) {
|
|
35
36
|
return v.replace(/^[\^~>=v]+/, "").trim();
|
|
36
37
|
}
|
|
38
|
+
function printTimingSummary(timings) {
|
|
39
|
+
if (!timings || timings.length === 0) return;
|
|
40
|
+
console.log(` ${colors.dim("Timings:")}`);
|
|
41
|
+
for (const timing of timings) console.log(` ${colors.dim(timing.name.padEnd(22))} ${formatDuration(timing.durationMs)}`);
|
|
42
|
+
console.log(` ${colors.dim("total".padEnd(22))} ${formatDuration(sumPhaseDurations(timings))}`);
|
|
43
|
+
}
|
|
37
44
|
async function warnIfOutdated(client, command) {
|
|
38
45
|
if (![
|
|
39
46
|
"dev",
|
|
@@ -103,6 +110,7 @@ async function main() {
|
|
|
103
110
|
if (result.domain) console.log(` ${colors.dim("Domain:")} ${result.domain}`);
|
|
104
111
|
if (result.plugins && result.plugins.length > 0) console.log(` ${colors.dim("Plugins:")} ${result.plugins.join(", ")}`);
|
|
105
112
|
console.log(` ${colors.dim("Files copied:")} ${result.filesCopied}`);
|
|
113
|
+
printTimingSummary(result.timings);
|
|
106
114
|
console.log();
|
|
107
115
|
console.log(colors.dim(" Next steps:"));
|
|
108
116
|
console.log(colors.dim(` cd ${result.directory}`));
|
|
@@ -163,6 +171,7 @@ async function main() {
|
|
|
163
171
|
if (result.changelogUrl) console.log(` ${colors.dim("Changelog:")} ${result.changelogUrl}`);
|
|
164
172
|
if (result.availablePlugins && result.availablePlugins.length > 0) console.log(` ${colors.dim("New parent plugins:")} ${result.availablePlugins.join(", ")}`);
|
|
165
173
|
if (result.selectedPlugins && result.selectedPlugins.length > 0) console.log(` ${colors.dim("Added plugins:")} ${result.selectedPlugins.join(", ")}`);
|
|
174
|
+
printTimingSummary(result.timings);
|
|
166
175
|
if (result.sync) {
|
|
167
176
|
const sync = result.sync;
|
|
168
177
|
if (sync.updated.length > 0) {
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":["bosPlugin"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { findCommandDescriptor } from \"./cli/catalog\";\nimport { printHelp } from \"./cli/help\";\nimport { parseCommandInput } from \"./cli/parse\";\nimport { findConfigPath } from \"./config\";\nimport bosPlugin from \"./plugin\";\nimport { createPluginRuntime } from \"./sdk\";\nimport { printBanner } from \"./utils/banner\";\nimport { colors, frames, gradients, icons } from \"./utils/theme\";\n\nfunction printConfigView(result: {\n account: string;\n domain?: string;\n staging?: { domain: string };\n app: {\n host: { name?: string; development: string; production?: string };\n ui: { name?: string; development?: string; production?: string; ssr?: string };\n api: { name?: string; development?: string; production?: string; proxy?: string };\n };\n}) {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"CONFIG\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n\n console.log(` ${colors.dim(\"Account\")} ${colors.cyan(result.account)}`);\n console.log(` ${colors.dim(\"Domain\")} ${colors.white(result.domain ?? \"not configured\")}`);\n if (result.staging) {\n console.log(` ${colors.dim(\"Staging\")} ${colors.magenta(result.staging.domain)}`);\n }\n console.log();\n}\n\nfunction formatTimeAgo(isoTimestamp: string): string {\n const now = Date.now();\n const then = new Date(isoTimestamp).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n if (diffMins < 1) return \"just now\";\n if (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? \"s\" : \"\"} ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? \"s\" : \"\"} ago`;\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) return `${diffDays} day${diffDays > 1 ? \"s\" : \"\"} ago`;\n return isoTimestamp.split(\"T\")[0] ?? isoTimestamp;\n}\n\nfunction normalizeVersion(v: string): string {\n return v.replace(/^[\\^~>=v]+/, \"\").trim();\n}\n\nasync function warnIfOutdated(client: any, command: string): Promise<void> {\n if (![\"dev\", \"build\", \"start\"].includes(command)) return;\n\n try {\n const status = await client.status();\n if (status.status === \"error\" || !status.packages) return;\n\n const outdated = status.packages.filter(\n (p: { name: string; installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n\n if (outdated.length === 0) return;\n\n console.log();\n console.log(colors.yellow(` ! Outdated packages detected:`));\n for (const pkg of outdated) {\n console.log(colors.dim(` ${pkg.name} ${pkg.installed} → ${pkg.latest}`));\n }\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n console.log();\n } catch {\n // silently ignore if status check fails\n }\n}\n\nasync function main() {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return;\n }\n\n const invocationArgs = args.length > 0 ? args : [\"dev\"];\n const command = invocationArgs[0] ?? \"dev\";\n const configPath = findConfigPath();\n\n const commandMatch = findCommandDescriptor(invocationArgs);\n if (!commandMatch) {\n console.error(`Unknown command: ${command}`);\n process.exit(1);\n }\n\n const { descriptor, consumed } = commandMatch;\n const commandArgs = invocationArgs.slice(consumed);\n\n printBanner();\n\n const runtime = createPluginRuntime({\n registry: {\n bos: { module: bosPlugin },\n },\n secrets: {},\n });\n\n const pluginRuntime: any = runtime;\n const loadPlugin = pluginRuntime.usePlugin.bind(pluginRuntime);\n const plugin = await loadPlugin(\"bos\", {\n variables: {\n configPath: configPath ?? undefined,\n },\n secrets: {},\n });\n\n const client = plugin.createClient();\n\n await warnIfOutdated(client, command);\n\n try {\n const input = parseCommandInput(descriptor, commandArgs);\n const result = await (client as any)[descriptor.key](input);\n\n if (descriptor.key === \"config\") {\n if (!result.config) {\n console.error(\"No bos.config.json found\");\n process.exit(1);\n }\n\n printConfigView(result.config);\n process.stdout.write(`${JSON.stringify(result.config, null, 2)}\\n`);\n return;\n }\n\n if (descriptor.key === \"init\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Project initialized`));\n console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n console.log(` ${colors.dim(\"Directory:\")} ${result.directory}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n if (result.plugins && result.plugins.length > 0)\n console.log(` ${colors.dim(\"Plugins:\")} ${result.plugins.join(\", \")}`);\n console.log(` ${colors.dim(\"Files copied:\")} ${result.filesCopied}`);\n console.log();\n console.log(colors.dim(\" Next steps:\"));\n console.log(colors.dim(` cd ${result.directory}`));\n if (result.status === \"initialized\" && !(input as any)?.noInstall) {\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n } else {\n console.log(colors.dim(\" bun install\"));\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"sync\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no files written`));\n } else {\n console.log(colors.green(`${icons.ok} Template synced`));\n }\n if (result.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${result.updated.length} file(s)`);\n for (const f of result.updated) console.log(` ${colors.dim(f)}`);\n }\n if (result.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${result.added.length} file(s)`);\n for (const f of result.added) console.log(` ${colors.dim(f)}`);\n }\n if (result.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${result.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of result.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (result.updated.length === 0 && result.added.length === 0 && result.skipped.length === 0) {\n console.log(` ${colors.dim(\"Already up to date\")}`);\n }\n if (result.status !== \"dry-run\" && result.updated.length > 0) {\n console.log();\n console.log(colors.dim(\" Review changes — your customizations take priority:\"));\n console.log(\n colors.dim(\n \" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts — never overwritten\",\n ),\n );\n console.log(\n colors.dim(\" • ui/src/components/**, ui/src/styles.css — never overwritten\"),\n );\n console.log(\n colors.dim(\n \" • Other updated files — accept framework improvements, then restore your changes\",\n ),\n );\n console.log(colors.dim(\" • Skipped files — yours already, only update with --force\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"upgrade\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no changes applied`));\n } else {\n console.log(colors.green(`${icons.ok} Upgrade successful`));\n }\n for (const pkg of result.packages) {\n if (pkg.from && pkg.from !== pkg.to) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.from} → ${pkg.to}`);\n } else if (!pkg.from) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (new)`);\n } else {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (up to date)`);\n }\n }\n if (result.changelogUrl) {\n console.log(` ${colors.dim(\"Changelog:\")} ${result.changelogUrl}`);\n }\n if (result.availablePlugins && result.availablePlugins.length > 0) {\n console.log(` ${colors.dim(\"New parent plugins:\")} ${result.availablePlugins.join(\", \")}`);\n }\n if (result.selectedPlugins && result.selectedPlugins.length > 0) {\n console.log(` ${colors.dim(\"Added plugins:\")} ${result.selectedPlugins.join(\", \")}`);\n }\n if (result.sync) {\n const sync = result.sync;\n if (sync.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${sync.updated.length} file(s)`);\n for (const f of sync.updated) console.log(` ${colors.dim(f)}`);\n }\n if (sync.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${sync.added.length} file(s)`);\n for (const f of sync.added) console.log(` ${colors.dim(f)}`);\n }\n if (sync.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${sync.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of sync.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (\n result.status !== \"dry-run\" &&\n (sync.updated.length > 0 || sync.added.length > 0 || sync.skipped.length > 0)\n ) {\n console.log();\n console.log(colors.dim(\" Resolve differences — your code takes priority:\"));\n console.log();\n console.log(colors.dim(\" Never overwritten (safe):\"));\n console.log(\n colors.dim(\" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts\"),\n );\n console.log(colors.dim(\" • ui/src/components/**, ui/src/styles.css\"));\n console.log();\n console.log(colors.dim(\" Replaced — review and keep your changes:\"));\n console.log(\n colors.dim(\n \" • api/drizzle.config.ts, api/tsconfig.json, api/tsconfig.contract.json\",\n ),\n );\n console.log(colors.dim(\" • api/plugin.dev.ts, api/rspack.config.js\"));\n console.log(colors.dim(\" • ui/src/routes/* (core routes only)\"));\n console.log();\n console.log(colors.dim(\" Merged — your deps preserved:\"));\n console.log(colors.dim(\" • package.json, api/package.json, ui/package.json\"));\n console.log();\n console.log(colors.dim(\" Skipped — already yours:\"));\n console.log(colors.dim(\" • Use --force only if you want framework updates\"));\n }\n }\n if (result.migrated && result.migrated.length > 0) {\n console.log(` ${colors.yellow(\"Removed:\")} ${result.migrated.length} obsolete file(s)`);\n for (const f of result.migrated) console.log(` ${colors.dim(f)}`);\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"status\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"STATUS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.extends) console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n console.log();\n console.log(` ${colors.dim(\"Packages:\")}`);\n for (const pkg of result.packages) {\n const hasUpdate =\n pkg.installed &&\n pkg.latest &&\n normalizeVersion(pkg.installed) !== normalizeVersion(pkg.latest);\n const versionStr = hasUpdate\n ? `${pkg.installed} → ${pkg.latest}`\n : pkg.installed || \"not installed\";\n const label = hasUpdate ? colors.yellow(versionStr) : colors.dim(versionStr);\n console.log(` ${colors.dim(`${pkg.name}`)} ${label}`);\n }\n console.log();\n if (result.lastSync) {\n const ago = formatTimeAgo(result.lastSync);\n console.log(` ${colors.dim(\"Last sync:\")} ${ago}`);\n } else {\n console.log(` ${colors.dim(\"Last sync:\")} never`);\n }\n const envLabel =\n result.envFile === \"found\"\n ? colors.green(\"found\")\n : result.envFile === \"example-only\"\n ? colors.yellow(\"missing (only .env.example found)\")\n : colors.error(\"missing\");\n console.log(` ${colors.dim(\".env:\")} ${envLabel}`);\n if (result.parentReachable !== undefined) {\n const parentLabel = result.parentReachable\n ? colors.green(\"reachable\")\n : colors.error(\"unreachable\");\n console.log(` ${colors.dim(\"Parent:\")} ${parentLabel}`);\n }\n const hasUpdates = result.packages.some(\n (p: { installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n if (hasUpdates) {\n console.log();\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"typesGen\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Types generated`));\n if (result.source) {\n console.log(\n ` ${colors.dim(\"Mode:\")} ${result.source === \"remote\" ? colors.cyan(\"remote\") : colors.dim(\"local\")}`,\n );\n }\n if (result.generated.length > 0) {\n console.log(` ${colors.dim(\"Generated:\")}`);\n for (const f of result.generated) console.log(` ${colors.dim(f)}`);\n }\n if (result.fetched.length > 0) {\n console.log(` ${colors.dim(\"Fetched from remote:\")}`);\n for (const url of result.fetched) console.log(` ${colors.dim(url)}`);\n }\n if (result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped (local):\")}`);\n for (const s of result.skipped) console.log(` ${colors.dim(s)}`);\n }\n if (result.failed.length > 0) {\n console.log(` ${colors.yellow(\"Failed:\")}`);\n for (const f of result.failed) console.log(` ${colors.error(f)}`);\n }\n console.log();\n return;\n }\n\n if (result?.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n\n if (descriptor.key === \"keyPublish\") {\n process.stdout.write(`Generated publish key for ${result.account}\\n`);\n process.stdout.write(` Network: ${result.network}\\n`);\n process.stdout.write(` Contract: ${result.contract}\\n`);\n process.stdout.write(` Allowance: ${result.allowance}\\n`);\n process.stdout.write(` Functions: ${result.functionNames.join(\", \")}\\n`);\n process.stdout.write(` Public key: ${result.publicKey}\\n`);\n process.stdout.write(` Private key: ${result.privateKey}\\n`);\n process.stdout.write(` Copy: NEAR_PRIVATE_KEY=${result.privateKey}\\n`);\n }\n\n if (descriptor.key === \"pluginAdd\") {\n console.log();\n console.log(colors.green(`${icons.ok} Added plugin ${result.key}`));\n if (result.development) console.log(` ${colors.dim(\"Development:\")} ${result.development}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginRemove\") {\n console.log();\n console.log(colors.green(`${icons.ok} Removed plugin ${result.key}`));\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginList\") {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.config} ${gradients.cyber(\"PLUGINS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.plugins.length === 0) {\n console.log(colors.dim(\" No plugins configured\"));\n } else {\n for (const pluginItem of result.plugins) {\n console.log(` ${colors.cyan(pluginItem.key)}`);\n if (pluginItem.development)\n console.log(` ${colors.dim(\"Development:\")} ${pluginItem.development}`);\n if (pluginItem.production)\n console.log(` ${colors.dim(\"Production:\")} ${pluginItem.production}`);\n }\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginPublish\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published plugin ${result.key}`));\n if (result.path) console.log(` ${colors.dim(\"Path:\")} ${result.path}`);\n if (result.script) console.log(` ${colors.dim(\"Script:\")} bun run ${result.script}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"publish\") {\n if (result.status === \"dry-run\") {\n console.log();\n console.log(colors.cyan(`${icons.ok} Dry run complete`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n console.log();\n return;\n }\n\n if (result.status === \"published\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published successfully`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n if (result.txHash) {\n console.log(` ${colors.dim(\"Transaction:\")} ${result.txHash}`);\n }\n if (result.built && result.built.length > 0) {\n console.log(` ${colors.dim(\"Built:\")} ${result.built.join(\", \")}`);\n }\n if (result.skipped && result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped:\")} ${result.skipped.join(\", \")}`);\n }\n console.log();\n return;\n }\n }\n } catch (error) {\n console.error(`[CLI] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n}\n\nmain().catch((error) => {\n console.error(\"[CLI] Fatal error:\", error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;AAUA,SAAS,gBAAgB,QAStB;AACD,SAAQ,KAAK;AACb,SAAQ,IAAI,OAAO,KAAK,OAAO,IAAI,GAAG,CAAC,CAAC;AACxC,SAAQ,IAAI,KAAK,MAAM,IAAI,GAAG,UAAU,MAAM,SAAS,GAA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AAI,KAAK,OAAO,IAAI,WAAW,CAAC,GAAG,OAAO,QAAQ,KAAK,KAAK,GAAG;AAEzE,YAAQ,KAAK;AACb;;;UAGG,OAAO;AACd,UAAQ,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GAAG;AAChF,UAAQ,KAAK,EAAE;;;AAInB,MAAM,CAAC,OAAO,UAAU;AACtB,SAAQ,MAAM,sBAAsB,MAAM;AAC1C,SAAQ,KAAK,EAAE;EACf"}
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":["bosPlugin"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { findCommandDescriptor } from \"./cli/catalog\";\nimport { printHelp } from \"./cli/help\";\nimport { parseCommandInput } from \"./cli/parse\";\nimport { formatDuration, sumPhaseDurations } from \"./cli/timing\";\nimport { findConfigPath } from \"./config\";\nimport bosPlugin from \"./plugin\";\nimport { createPluginRuntime } from \"./sdk\";\nimport { printBanner } from \"./utils/banner\";\nimport { colors, frames, gradients, icons } from \"./utils/theme\";\n\nfunction printConfigView(result: {\n account: string;\n domain?: string;\n staging?: { domain: string };\n app: {\n host: { name?: string; development: string; production?: string };\n ui: { name?: string; development?: string; production?: string; ssr?: string };\n api: { name?: string; development?: string; production?: string; proxy?: string };\n };\n}) {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"CONFIG\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n\n console.log(` ${colors.dim(\"Account\")} ${colors.cyan(result.account)}`);\n console.log(` ${colors.dim(\"Domain\")} ${colors.white(result.domain ?? \"not configured\")}`);\n if (result.staging) {\n console.log(` ${colors.dim(\"Staging\")} ${colors.magenta(result.staging.domain)}`);\n }\n console.log();\n}\n\nfunction formatTimeAgo(isoTimestamp: string): string {\n const now = Date.now();\n const then = new Date(isoTimestamp).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n if (diffMins < 1) return \"just now\";\n if (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? \"s\" : \"\"} ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? \"s\" : \"\"} ago`;\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) return `${diffDays} day${diffDays > 1 ? \"s\" : \"\"} ago`;\n return isoTimestamp.split(\"T\")[0] ?? isoTimestamp;\n}\n\nfunction normalizeVersion(v: string): string {\n return v.replace(/^[\\^~>=v]+/, \"\").trim();\n}\n\nfunction printTimingSummary(timings: Array<{ name: string; durationMs: number }> | undefined) {\n if (!timings || timings.length === 0) return;\n\n console.log(` ${colors.dim(\"Timings:\")}`);\n for (const timing of timings) {\n console.log(` ${colors.dim(timing.name.padEnd(22))} ${formatDuration(timing.durationMs)}`);\n }\n console.log(\n ` ${colors.dim(\"total\".padEnd(22))} ${formatDuration(sumPhaseDurations(timings))}`,\n );\n}\n\nasync function warnIfOutdated(client: any, command: string): Promise<void> {\n if (![\"dev\", \"build\", \"start\"].includes(command)) return;\n\n try {\n const status = await client.status();\n if (status.status === \"error\" || !status.packages) return;\n\n const outdated = status.packages.filter(\n (p: { name: string; installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n\n if (outdated.length === 0) return;\n\n console.log();\n console.log(colors.yellow(` ! Outdated packages detected:`));\n for (const pkg of outdated) {\n console.log(colors.dim(` ${pkg.name} ${pkg.installed} → ${pkg.latest}`));\n }\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n console.log();\n } catch {\n // silently ignore if status check fails\n }\n}\n\nasync function main() {\n const args = process.argv.slice(2);\n\n if (args.includes(\"--help\") || args.includes(\"-h\")) {\n printHelp();\n return;\n }\n\n const invocationArgs = args.length > 0 ? args : [\"dev\"];\n const command = invocationArgs[0] ?? \"dev\";\n const configPath = findConfigPath();\n\n const commandMatch = findCommandDescriptor(invocationArgs);\n if (!commandMatch) {\n console.error(`Unknown command: ${command}`);\n process.exit(1);\n }\n\n const { descriptor, consumed } = commandMatch;\n const commandArgs = invocationArgs.slice(consumed);\n\n printBanner();\n\n const runtime = createPluginRuntime({\n registry: {\n bos: { module: bosPlugin },\n },\n secrets: {},\n });\n\n const pluginRuntime: any = runtime;\n const loadPlugin = pluginRuntime.usePlugin.bind(pluginRuntime);\n const plugin = await loadPlugin(\"bos\", {\n variables: {\n configPath: configPath ?? undefined,\n },\n secrets: {},\n });\n\n const client = plugin.createClient();\n\n await warnIfOutdated(client, command);\n\n try {\n const input = parseCommandInput(descriptor, commandArgs);\n const result = await (client as any)[descriptor.key](input);\n\n if (descriptor.key === \"config\") {\n if (!result.config) {\n console.error(\"No bos.config.json found\");\n process.exit(1);\n }\n\n printConfigView(result.config);\n process.stdout.write(`${JSON.stringify(result.config, null, 2)}\\n`);\n return;\n }\n\n if (descriptor.key === \"init\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Project initialized`));\n console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n console.log(` ${colors.dim(\"Directory:\")} ${result.directory}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n if (result.plugins && result.plugins.length > 0)\n console.log(` ${colors.dim(\"Plugins:\")} ${result.plugins.join(\", \")}`);\n console.log(` ${colors.dim(\"Files copied:\")} ${result.filesCopied}`);\n printTimingSummary(result.timings);\n console.log();\n console.log(colors.dim(\" Next steps:\"));\n console.log(colors.dim(` cd ${result.directory}`));\n if (result.status === \"initialized\" && !(input as any)?.noInstall) {\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n } else {\n console.log(colors.dim(\" bun install\"));\n console.log(colors.dim(\" docker compose up -d --wait\"));\n console.log(colors.dim(\" bun run dev\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"sync\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no files written`));\n } else {\n console.log(colors.green(`${icons.ok} Template synced`));\n }\n if (result.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${result.updated.length} file(s)`);\n for (const f of result.updated) console.log(` ${colors.dim(f)}`);\n }\n if (result.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${result.added.length} file(s)`);\n for (const f of result.added) console.log(` ${colors.dim(f)}`);\n }\n if (result.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${result.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of result.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (result.updated.length === 0 && result.added.length === 0 && result.skipped.length === 0) {\n console.log(` ${colors.dim(\"Already up to date\")}`);\n }\n if (result.status !== \"dry-run\" && result.updated.length > 0) {\n console.log();\n console.log(colors.dim(\" Review changes — your customizations take priority:\"));\n console.log(\n colors.dim(\n \" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts — never overwritten\",\n ),\n );\n console.log(\n colors.dim(\" • ui/src/components/**, ui/src/styles.css — never overwritten\"),\n );\n console.log(\n colors.dim(\n \" • Other updated files — accept framework improvements, then restore your changes\",\n ),\n );\n console.log(colors.dim(\" • Skipped files — yours already, only update with --force\"));\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"upgrade\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (result.status === \"dry-run\") {\n console.log(colors.cyan(`${icons.ok} Dry run — no changes applied`));\n } else {\n console.log(colors.green(`${icons.ok} Upgrade successful`));\n }\n for (const pkg of result.packages) {\n if (pkg.from && pkg.from !== pkg.to) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.from} → ${pkg.to}`);\n } else if (!pkg.from) {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (new)`);\n } else {\n console.log(` ${colors.dim(`${pkg.name}:`)} ${pkg.to} (up to date)`);\n }\n }\n if (result.changelogUrl) {\n console.log(` ${colors.dim(\"Changelog:\")} ${result.changelogUrl}`);\n }\n if (result.availablePlugins && result.availablePlugins.length > 0) {\n console.log(` ${colors.dim(\"New parent plugins:\")} ${result.availablePlugins.join(\", \")}`);\n }\n if (result.selectedPlugins && result.selectedPlugins.length > 0) {\n console.log(` ${colors.dim(\"Added plugins:\")} ${result.selectedPlugins.join(\", \")}`);\n }\n printTimingSummary(result.timings);\n if (result.sync) {\n const sync = result.sync;\n if (sync.updated.length > 0) {\n console.log(` ${colors.dim(\"Updated:\")} ${sync.updated.length} file(s)`);\n for (const f of sync.updated) console.log(` ${colors.dim(f)}`);\n }\n if (sync.added.length > 0) {\n console.log(` ${colors.dim(\"Added:\")} ${sync.added.length} file(s)`);\n for (const f of sync.added) console.log(` ${colors.dim(f)}`);\n }\n if (sync.skipped.length > 0) {\n console.log(\n ` ${colors.yellow(\"Skipped:\")} ${sync.skipped.length} file(s) (locally modified, use --force to overwrite)`,\n );\n for (const f of sync.skipped) console.log(` ${colors.dim(f)}`);\n }\n if (\n result.status !== \"dry-run\" &&\n (sync.updated.length > 0 || sync.added.length > 0 || sync.skipped.length > 0)\n ) {\n console.log();\n console.log(colors.dim(\" Resolve differences — your code takes priority:\"));\n console.log();\n console.log(colors.dim(\" Never overwritten (safe):\"));\n console.log(\n colors.dim(\" • api/src/contract.ts, api/src/index.ts, api/src/db/schema.ts\"),\n );\n console.log(colors.dim(\" • ui/src/components/**, ui/src/styles.css\"));\n console.log();\n console.log(colors.dim(\" Replaced — review and keep your changes:\"));\n console.log(\n colors.dim(\n \" • api/drizzle.config.ts, api/tsconfig.json, api/tsconfig.contract.json\",\n ),\n );\n console.log(colors.dim(\" • api/plugin.dev.ts, api/rspack.config.js\"));\n console.log(colors.dim(\" • ui/src/routes/* (core routes only)\"));\n console.log();\n console.log(colors.dim(\" Merged — your deps preserved:\"));\n console.log(colors.dim(\" • package.json, api/package.json, ui/package.json\"));\n console.log();\n console.log(colors.dim(\" Skipped — already yours:\"));\n console.log(colors.dim(\" • Use --force only if you want framework updates\"));\n }\n }\n if (result.migrated && result.migrated.length > 0) {\n console.log(` ${colors.yellow(\"Removed:\")} ${result.migrated.length} obsolete file(s)`);\n for (const f of result.migrated) console.log(` ${colors.dim(f)}`);\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"status\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"STATUS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.extends) console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n console.log();\n console.log(` ${colors.dim(\"Packages:\")}`);\n for (const pkg of result.packages) {\n const hasUpdate =\n pkg.installed &&\n pkg.latest &&\n normalizeVersion(pkg.installed) !== normalizeVersion(pkg.latest);\n const versionStr = hasUpdate\n ? `${pkg.installed} → ${pkg.latest}`\n : pkg.installed || \"not installed\";\n const label = hasUpdate ? colors.yellow(versionStr) : colors.dim(versionStr);\n console.log(` ${colors.dim(`${pkg.name}`)} ${label}`);\n }\n console.log();\n if (result.lastSync) {\n const ago = formatTimeAgo(result.lastSync);\n console.log(` ${colors.dim(\"Last sync:\")} ${ago}`);\n } else {\n console.log(` ${colors.dim(\"Last sync:\")} never`);\n }\n const envLabel =\n result.envFile === \"found\"\n ? colors.green(\"found\")\n : result.envFile === \"example-only\"\n ? colors.yellow(\"missing (only .env.example found)\")\n : colors.error(\"missing\");\n console.log(` ${colors.dim(\".env:\")} ${envLabel}`);\n if (result.parentReachable !== undefined) {\n const parentLabel = result.parentReachable\n ? colors.green(\"reachable\")\n : colors.error(\"unreachable\");\n console.log(` ${colors.dim(\"Parent:\")} ${parentLabel}`);\n }\n const hasUpdates = result.packages.some(\n (p: { installed?: string; latest?: string }) =>\n p.installed && p.latest && normalizeVersion(p.installed) !== normalizeVersion(p.latest),\n );\n if (hasUpdates) {\n console.log();\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"typesGen\") {\n console.log();\n if (result.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Types generated`));\n if (result.source) {\n console.log(\n ` ${colors.dim(\"Mode:\")} ${result.source === \"remote\" ? colors.cyan(\"remote\") : colors.dim(\"local\")}`,\n );\n }\n if (result.generated.length > 0) {\n console.log(` ${colors.dim(\"Generated:\")}`);\n for (const f of result.generated) console.log(` ${colors.dim(f)}`);\n }\n if (result.fetched.length > 0) {\n console.log(` ${colors.dim(\"Fetched from remote:\")}`);\n for (const url of result.fetched) console.log(` ${colors.dim(url)}`);\n }\n if (result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped (local):\")}`);\n for (const s of result.skipped) console.log(` ${colors.dim(s)}`);\n }\n if (result.failed.length > 0) {\n console.log(` ${colors.yellow(\"Failed:\")}`);\n for (const f of result.failed) console.log(` ${colors.error(f)}`);\n }\n console.log();\n return;\n }\n\n if (result?.status === \"error\") {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n\n if (descriptor.key === \"keyPublish\") {\n process.stdout.write(`Generated publish key for ${result.account}\\n`);\n process.stdout.write(` Network: ${result.network}\\n`);\n process.stdout.write(` Contract: ${result.contract}\\n`);\n process.stdout.write(` Allowance: ${result.allowance}\\n`);\n process.stdout.write(` Functions: ${result.functionNames.join(\", \")}\\n`);\n process.stdout.write(` Public key: ${result.publicKey}\\n`);\n process.stdout.write(` Private key: ${result.privateKey}\\n`);\n process.stdout.write(` Copy: NEAR_PRIVATE_KEY=${result.privateKey}\\n`);\n }\n\n if (descriptor.key === \"pluginAdd\") {\n console.log();\n console.log(colors.green(`${icons.ok} Added plugin ${result.key}`));\n if (result.development) console.log(` ${colors.dim(\"Development:\")} ${result.development}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginRemove\") {\n console.log();\n console.log(colors.green(`${icons.ok} Removed plugin ${result.key}`));\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginList\") {\n console.log();\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.config} ${gradients.cyber(\"PLUGINS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.plugins.length === 0) {\n console.log(colors.dim(\" No plugins configured\"));\n } else {\n for (const pluginItem of result.plugins) {\n console.log(` ${colors.cyan(pluginItem.key)}`);\n if (pluginItem.development)\n console.log(` ${colors.dim(\"Development:\")} ${pluginItem.development}`);\n if (pluginItem.production)\n console.log(` ${colors.dim(\"Production:\")} ${pluginItem.production}`);\n }\n }\n console.log();\n return;\n }\n\n if (descriptor.key === \"pluginPublish\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published plugin ${result.key}`));\n if (result.path) console.log(` ${colors.dim(\"Path:\")} ${result.path}`);\n if (result.script) console.log(` ${colors.dim(\"Script:\")} bun run ${result.script}`);\n if (result.production) console.log(` ${colors.dim(\"Production:\")} ${result.production}`);\n console.log();\n return;\n }\n\n if (descriptor.key === \"publish\") {\n if (result.status === \"dry-run\") {\n console.log();\n console.log(colors.cyan(`${icons.ok} Dry run complete`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n console.log();\n return;\n }\n\n if (result.status === \"published\") {\n console.log();\n console.log(colors.green(`${icons.ok} Published successfully`));\n console.log(` ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n if (result.txHash) {\n console.log(` ${colors.dim(\"Transaction:\")} ${result.txHash}`);\n }\n if (result.built && result.built.length > 0) {\n console.log(` ${colors.dim(\"Built:\")} ${result.built.join(\", \")}`);\n }\n if (result.skipped && result.skipped.length > 0) {\n console.log(` ${colors.dim(\"Skipped:\")} ${result.skipped.join(\", \")}`);\n }\n console.log();\n return;\n }\n }\n } catch (error) {\n console.error(`[CLI] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n }\n}\n\nmain().catch((error) => {\n console.error(\"[CLI] Fatal error:\", error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;AAWA,SAAS,gBAAgB,QAStB;AACD,SAAQ,KAAK;AACb,SAAQ,IAAI,OAAO,KAAK,OAAO,IAAI,GAAG,CAAC,CAAC;AACxC,SAAQ,IAAI,KAAK,MAAM,IAAI,GAAG,UAAU,MAAM,SAAS,GAAG;AAC1D,SAAQ,IAAI,OAAO,KAAK,OAAO,OAAO,GAAG,CAAC,CAAC;AAC3C,SAAQ,KAAK;AAEb,SAAQ,IAAI,KAAK,OAAO,IAAI,UAAU,CAAC,IAAI,OAAO,KAAK,OAAO,QAAQ,GAAG;AACzE,SAAQ,IAAI,KAAK,OAAO,IAAI,SAAS,CAAC,KAAK,OAAO,MAAM,OAAO,UAAU,iBAAiB,GAAG;AAC7F,KAAI,OAAO,QACT,SAAQ,IAAI,KAAK,OAAO,IAAI,UAAU,CAAC,IAAI,OAAO,QAAQ,OAAO,QAAQ,OAAO,GAAG;AAErF,SAAQ,KAAK;;AAGf,SAAS,cAAc,cAA8B;CAGnD,MAAM,SAFM,KAAK,KAAK,GACT,IAAI,KAAK,aAAa,CAAC,SAAS;CAE7C,MAAM,WAAW,KAAK,MAAM,SAAS,IAAO;AAC5C,KAAI,WAAW,EAAG,QAAO;AACzB,KAAI,WAAW,GAAI,QAAO,GAAG,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ChF,UAAQ,KAAK,EAAE;;;AAInB,MAAM,CAAC,OAAO,UAAU;AACtB,SAAQ,MAAM,sBAAsB,MAAM;AAC1C,SAAQ,KAAK,EAAE;EACf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_linkify = require('../utils/linkify.cjs');
|
|
3
2
|
const require_theme = require('../utils/theme.cjs');
|
|
3
|
+
const require_linkify = require('../utils/linkify.cjs');
|
|
4
4
|
let ink = require("ink");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { linkify } from "../utils/linkify.mjs";
|
|
2
1
|
import { colors, divider, frames, gradients, icons } from "../utils/theme.mjs";
|
|
2
|
+
import { linkify } from "../utils/linkify.mjs";
|
|
3
3
|
import { Box, Text, render, useApp, useInput } from "ink";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_linkify = require('../utils/linkify.cjs');
|
|
3
2
|
const require_theme = require('../utils/theme.cjs');
|
|
3
|
+
const require_linkify = require('../utils/linkify.cjs');
|
|
4
4
|
let chalk = require("chalk");
|
|
5
5
|
chalk = require_runtime.__toESM(chalk, 1);
|
|
6
6
|
|