silvery 0.16.6 → 0.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/README.md CHANGED
@@ -74,7 +74,7 @@ Along the way, three principles emerged. Take the best from the web, stay true t
74
74
  ### Next steps
75
75
 
76
76
  - [Quick start](https://silvery.dev/getting-started/quick-start) — install, first app, deploy
77
- - [Interactive examples](https://silvery.dev/examples) — `npx silvery examples` to try them locally
77
+ - [Interactive examples](https://silvery.dev/examples) — `npx @silvery/examples` to try them locally
78
78
  - [Silvery vs Ink](https://silvery.dev/guide/silvery-vs-ink) — feature comparison and migration guide
79
79
 
80
80
  ## Packages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silvery",
3
- "version": "0.16.6",
3
+ "version": "0.17.0",
4
4
  "description": "React for modern terminal apps \u2014 powerful apps, polished UIs, proudly terminal",
5
5
  "keywords": [
6
6
  "ansi",
@@ -30,16 +30,12 @@
30
30
  "type": "git",
31
31
  "url": "https://github.com/beorn/silvery.git"
32
32
  },
33
- "bin": {
34
- "silvery": "./bin/silvery.js"
35
- },
36
33
  "workspaces": [
37
34
  "packages/*",
38
35
  "!packages/examples",
39
36
  "!examples"
40
37
  ],
41
38
  "files": [
42
- "bin",
43
39
  "dist/**/*.js",
44
40
  "src",
45
41
  "README.md",
package/bin/silvery.js DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{resolve,dirname,join}from"node:path";import{readFileSync,existsSync}from"node:fs";import{spawn}from"node:child_process";import{fileURLToPath}from"node:url";var __filename2=fileURLToPath(import.meta.url),__dirname2=dirname(__filename2);function findPackageRoot(startDir){let dir=startDir;for(let i=0;i<10;i++){let pkg=join(dir,"package.json");if(existsSync(pkg))try{if(JSON.parse(readFileSync(pkg,"utf8")).name==="silvery")return dir}catch{}let parent=dirname(dir);if(parent===dir)break;dir=parent}return dirname(startDir)}var runtime=typeof globalThis.Bun<"u"?"bun":"node",root=findPackageRoot(__dirname2),args=process.argv.slice(2),examplesCli=resolve(root,"packages/examples/bin/cli.ts");if(args.includes("--version")||args.includes("-v")){let pkg=JSON.parse(readFileSync(resolve(root,"package.json"),"utf8"));console.log(`silvery ${pkg.version}`),process.exit(0)}var delegateArgs=args[0]==="examples"?args.slice(1):args,runArgs=runtime==="bun"?["run",examplesCli,...delegateArgs]:[examplesCli,...delegateArgs],proc=spawn(runtime,runArgs,{stdio:"inherit"});proc.on("exit",(code)=>process.exit(code??1));
3
-
4
- //# debugId=BD6B672EEBA48F8E64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["silvery.ts"],
4
- "sourcesContent": [
5
- "#!/usr/bin/env node\n/**\n * silvery CLI — delegates to @silvery/examples\n * Works on both Node.js 23.6+ and Bun.\n */\nimport { resolve, dirname, join } from \"node:path\"\nimport { readFileSync, existsSync } from \"node:fs\"\nimport { spawn } from \"node:child_process\"\nimport { fileURLToPath } from \"node:url\"\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\n// Find package root by walking up looking for package.json with name \"silvery\"\nfunction findPackageRoot(startDir: string): string {\n let dir = startDir\n for (let i = 0; i < 10; i++) {\n const pkg = join(dir, \"package.json\")\n if (existsSync(pkg)) {\n try {\n const json = JSON.parse(readFileSync(pkg, \"utf8\")) as { name?: string }\n if (json.name === \"silvery\") return dir\n } catch {}\n }\n const parent = dirname(dir)\n if (parent === dir) break\n dir = parent\n }\n return dirname(startDir)\n}\n\n// Detect runtime for spawning child processes\nconst runtime = typeof globalThis.Bun !== \"undefined\" ? \"bun\" : \"node\"\n\nconst root = findPackageRoot(__dirname)\nconst args = process.argv.slice(2)\nconst examplesCli = resolve(root, \"packages/examples/bin/cli.ts\")\n\nif (args.includes(\"--version\") || args.includes(\"-v\")) {\n const pkg = JSON.parse(readFileSync(resolve(root, \"package.json\"), \"utf8\")) as { version?: string }\n console.log(`silvery ${pkg.version}`)\n process.exit(0)\n}\n\n// Strip \"examples\" subcommand — the examples CLI handles bare args as example names\nconst delegateArgs = args[0] === \"examples\" ? args.slice(1) : args\n\nconst runArgs = runtime === \"bun\" ? [\"run\", examplesCli, ...delegateArgs] : [examplesCli, ...delegateArgs]\nconst proc = spawn(runtime, runArgs, {\n stdio: \"inherit\",\n})\nproc.on(\"exit\", (code) => process.exit(code ?? 1))\n"
6
- ],
7
- "mappings": ";AAKA,4CACA,6CACA,sCACA,oCAEA,IAAM,YAAa,cAAc,YAAY,GAAG,EAC1C,WAAY,QAAQ,WAAU,EAGpC,SAAS,eAAe,CAAC,SAA0B,CACjD,IAAI,IAAM,SACV,QAAS,EAAI,EAAG,EAAI,GAAI,IAAK,CAC3B,IAAM,IAAM,KAAK,IAAK,cAAc,EACpC,GAAI,WAAW,GAAG,EAChB,GAAI,CAEF,GADa,KAAK,MAAM,aAAa,IAAK,MAAM,CAAC,EACxC,OAAS,UAAW,OAAO,IACpC,KAAM,EAEV,IAAM,OAAS,QAAQ,GAAG,EAC1B,GAAI,SAAW,IAAK,MACpB,IAAM,OAER,OAAO,QAAQ,QAAQ,EAIzB,IAAM,QAAU,OAAO,WAAW,IAAQ,IAAc,MAAQ,OAE1D,KAAO,gBAAgB,UAAS,EAChC,KAAO,QAAQ,KAAK,MAAM,CAAC,EAC3B,YAAc,QAAQ,KAAM,8BAA8B,EAEhE,GAAI,KAAK,SAAS,WAAW,GAAK,KAAK,SAAS,IAAI,EAAG,CACrD,IAAM,IAAM,KAAK,MAAM,aAAa,QAAQ,KAAM,cAAc,EAAG,MAAM,CAAC,EAC1E,QAAQ,IAAI,WAAW,IAAI,SAAS,EACpC,QAAQ,KAAK,CAAC,EAIhB,IAAM,aAAe,KAAK,KAAO,WAAa,KAAK,MAAM,CAAC,EAAI,KAExD,QAAU,UAAY,MAAQ,CAAC,MAAO,YAAa,GAAG,YAAY,EAAI,CAAC,YAAa,GAAG,YAAY,EACnG,KAAO,MAAM,QAAS,QAAS,CACnC,MAAO,SACT,CAAC,EACD,KAAK,GAAG,OAAQ,CAAC,OAAS,QAAQ,KAAK,MAAQ,CAAC,CAAC",
8
- "debugId": "BD6B672EEBA48F8E64756E2164756E21",
9
- "names": []
10
- }
package/bin/silvery.ts DELETED
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * silvery CLI — delegates to @silvery/examples
4
- * Works on both Node.js 23.6+ and Bun.
5
- */
6
- import { resolve, dirname, join } from "node:path"
7
- import { readFileSync, existsSync } from "node:fs"
8
- import { spawn } from "node:child_process"
9
- import { fileURLToPath } from "node:url"
10
-
11
- const __filename = fileURLToPath(import.meta.url)
12
- const __dirname = dirname(__filename)
13
-
14
- // Find package root by walking up looking for package.json with name "silvery"
15
- function findPackageRoot(startDir: string): string {
16
- let dir = startDir
17
- for (let i = 0; i < 10; i++) {
18
- const pkg = join(dir, "package.json")
19
- if (existsSync(pkg)) {
20
- try {
21
- const json = JSON.parse(readFileSync(pkg, "utf8")) as { name?: string }
22
- if (json.name === "silvery") return dir
23
- } catch {}
24
- }
25
- const parent = dirname(dir)
26
- if (parent === dir) break
27
- dir = parent
28
- }
29
- return dirname(startDir)
30
- }
31
-
32
- // Detect runtime for spawning child processes
33
- const runtime = typeof globalThis.Bun !== "undefined" ? "bun" : "node"
34
-
35
- const root = findPackageRoot(__dirname)
36
- const args = process.argv.slice(2)
37
- const examplesCli = resolve(root, "packages/examples/bin/cli.ts")
38
-
39
- if (args.includes("--version") || args.includes("-v")) {
40
- const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")) as { version?: string }
41
- console.log(`silvery ${pkg.version}`)
42
- process.exit(0)
43
- }
44
-
45
- // Strip "examples" subcommand — the examples CLI handles bare args as example names
46
- const delegateArgs = args[0] === "examples" ? args.slice(1) : args
47
-
48
- const runArgs = runtime === "bun" ? ["run", examplesCli, ...delegateArgs] : [examplesCli, ...delegateArgs]
49
- const proc = spawn(runtime, runArgs, {
50
- stdio: "inherit",
51
- })
52
- proc.on("exit", (code) => process.exit(code ?? 1))