@nwire/cli 0.7.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.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/dist/__tests__/doctor.test.d.ts +10 -0
  4. package/dist/__tests__/doctor.test.d.ts.map +1 -0
  5. package/dist/__tests__/doctor.test.js +105 -0
  6. package/dist/__tests__/doctor.test.js.map +1 -0
  7. package/dist/cache-runner.d.ts +2 -0
  8. package/dist/cache-runner.d.ts.map +1 -0
  9. package/dist/cache-runner.js +58 -0
  10. package/dist/cache-runner.js.map +1 -0
  11. package/dist/cli.d.ts +16 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +67 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/commands/build.d.ts +13 -0
  16. package/dist/commands/build.d.ts.map +1 -0
  17. package/dist/commands/build.js +74 -0
  18. package/dist/commands/build.js.map +1 -0
  19. package/dist/commands/cache.d.ts +6 -0
  20. package/dist/commands/cache.d.ts.map +1 -0
  21. package/dist/commands/cache.js +27 -0
  22. package/dist/commands/cache.js.map +1 -0
  23. package/dist/commands/check.d.ts +6 -0
  24. package/dist/commands/check.d.ts.map +1 -0
  25. package/dist/commands/check.js +21 -0
  26. package/dist/commands/check.js.map +1 -0
  27. package/dist/commands/dev.d.ts +11 -0
  28. package/dist/commands/dev.d.ts.map +1 -0
  29. package/dist/commands/dev.js +165 -0
  30. package/dist/commands/dev.js.map +1 -0
  31. package/dist/commands/doctor.d.ts +59 -0
  32. package/dist/commands/doctor.d.ts.map +1 -0
  33. package/dist/commands/doctor.js +399 -0
  34. package/dist/commands/doctor.js.map +1 -0
  35. package/dist/commands/fmt.d.ts +13 -0
  36. package/dist/commands/fmt.d.ts.map +1 -0
  37. package/dist/commands/fmt.js +33 -0
  38. package/dist/commands/fmt.js.map +1 -0
  39. package/dist/commands/greeting.d.ts +6 -0
  40. package/dist/commands/greeting.d.ts.map +1 -0
  41. package/dist/commands/greeting.js +25 -0
  42. package/dist/commands/greeting.js.map +1 -0
  43. package/dist/commands/infra.d.ts +14 -0
  44. package/dist/commands/infra.d.ts.map +1 -0
  45. package/dist/commands/infra.js +146 -0
  46. package/dist/commands/infra.js.map +1 -0
  47. package/dist/commands/lint.d.ts +12 -0
  48. package/dist/commands/lint.d.ts.map +1 -0
  49. package/dist/commands/lint.js +32 -0
  50. package/dist/commands/lint.js.map +1 -0
  51. package/dist/commands/logs.d.ts +21 -0
  52. package/dist/commands/logs.d.ts.map +1 -0
  53. package/dist/commands/logs.js +73 -0
  54. package/dist/commands/logs.js.map +1 -0
  55. package/dist/commands/ls.d.ts +5 -0
  56. package/dist/commands/ls.d.ts.map +1 -0
  57. package/dist/commands/ls.js +26 -0
  58. package/dist/commands/ls.js.map +1 -0
  59. package/dist/commands/please.d.ts +13 -0
  60. package/dist/commands/please.d.ts.map +1 -0
  61. package/dist/commands/please.js +46 -0
  62. package/dist/commands/please.js.map +1 -0
  63. package/dist/commands/ps.d.ts +6 -0
  64. package/dist/commands/ps.d.ts.map +1 -0
  65. package/dist/commands/ps.js +21 -0
  66. package/dist/commands/ps.js.map +1 -0
  67. package/dist/commands/run.d.ts +19 -0
  68. package/dist/commands/run.d.ts.map +1 -0
  69. package/dist/commands/run.js +112 -0
  70. package/dist/commands/run.js.map +1 -0
  71. package/dist/commands/studio.d.ts +9 -0
  72. package/dist/commands/studio.d.ts.map +1 -0
  73. package/dist/commands/studio.js +46 -0
  74. package/dist/commands/studio.js.map +1 -0
  75. package/dist/commands/test.d.ts +26 -0
  76. package/dist/commands/test.d.ts.map +1 -0
  77. package/dist/commands/test.js +143 -0
  78. package/dist/commands/test.js.map +1 -0
  79. package/dist/index.d.ts +11 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +11 -0
  82. package/dist/index.js.map +1 -0
  83. package/dist/kernel-instance.d.ts +8 -0
  84. package/dist/kernel-instance.d.ts.map +1 -0
  85. package/dist/kernel-instance.js +13 -0
  86. package/dist/kernel-instance.js.map +1 -0
  87. package/dist/lib/colors.d.ts +19 -0
  88. package/dist/lib/colors.d.ts.map +1 -0
  89. package/dist/lib/colors.js +18 -0
  90. package/dist/lib/colors.js.map +1 -0
  91. package/dist/lib/exec.d.ts +30 -0
  92. package/dist/lib/exec.d.ts.map +1 -0
  93. package/dist/lib/exec.js +58 -0
  94. package/dist/lib/exec.js.map +1 -0
  95. package/dist/lib/process-state.d.ts +30 -0
  96. package/dist/lib/process-state.d.ts.map +1 -0
  97. package/dist/lib/process-state.js +68 -0
  98. package/dist/lib/process-state.js.map +1 -0
  99. package/dist/lib/project.d.ts +15 -0
  100. package/dist/lib/project.d.ts.map +1 -0
  101. package/dist/lib/project.js +52 -0
  102. package/dist/lib/project.js.map +1 -0
  103. package/dist/lib/run-task.d.ts +32 -0
  104. package/dist/lib/run-task.d.ts.map +1 -0
  105. package/dist/lib/run-task.js +70 -0
  106. package/dist/lib/run-task.js.map +1 -0
  107. package/dist/lib/vite-node.d.ts +10 -0
  108. package/dist/lib/vite-node.d.ts.map +1 -0
  109. package/dist/lib/vite-node.js +14 -0
  110. package/dist/lib/vite-node.js.map +1 -0
  111. package/dist/load-config.d.ts +27 -0
  112. package/dist/load-config.d.ts.map +1 -0
  113. package/dist/load-config.js +38 -0
  114. package/dist/load-config.js.map +1 -0
  115. package/dist/ls-runner.d.ts +2 -0
  116. package/dist/ls-runner.d.ts.map +1 -0
  117. package/dist/ls-runner.js +55 -0
  118. package/dist/ls-runner.js.map +1 -0
  119. package/dist/ui/dev-dashboard.d.ts +23 -0
  120. package/dist/ui/dev-dashboard.d.ts.map +1 -0
  121. package/dist/ui/dev-dashboard.js +53 -0
  122. package/dist/ui/dev-dashboard.js.map +1 -0
  123. package/dist/ui/greeting.d.ts +16 -0
  124. package/dist/ui/greeting.d.ts.map +1 -0
  125. package/dist/ui/greeting.js +16 -0
  126. package/dist/ui/greeting.js.map +1 -0
  127. package/dist/ui/process-table.d.ts +13 -0
  128. package/dist/ui/process-table.d.ts.map +1 -0
  129. package/dist/ui/process-table.js +26 -0
  130. package/dist/ui/process-table.js.map +1 -0
  131. package/package.json +49 -0
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `nwire fmt` — passthrough to `oxfmt` wrapped in a listr2 task so the
3
+ * output shape matches `lint`, `check`, and `build`. Honors any
4
+ * oxfmt config in the consumer's project.
5
+ */
6
+ export declare const fmtCommand: import("citty").CommandDef<{
7
+ check: {
8
+ type: "boolean";
9
+ description: string;
10
+ default: false;
11
+ };
12
+ }>;
13
+ //# sourceMappingURL=fmt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fmt.d.ts","sourceRoot":"","sources":["../../src/commands/fmt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,eAAO,MAAM,UAAU;;;;;;EAwBrB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `nwire fmt` — passthrough to `oxfmt` wrapped in a listr2 task so the
3
+ * output shape matches `lint`, `check`, and `build`. Honors any
4
+ * oxfmt config in the consumer's project.
5
+ */
6
+ import { defineCommand } from "citty";
7
+ import { runTaskList } from "../lib/run-task.js";
8
+ export const fmtCommand = defineCommand({
9
+ meta: {
10
+ name: "fmt",
11
+ description: "Format the project with oxfmt",
12
+ },
13
+ args: {
14
+ check: {
15
+ type: "boolean",
16
+ description: "Check formatting without writing changes",
17
+ default: false,
18
+ },
19
+ },
20
+ async run({ args, rawArgs }) {
21
+ const passthrough = rawArgs.filter((a) => a !== "--check" && a !== "-c");
22
+ const oxfmtArgs = args.check ? ["--check", ...passthrough] : passthrough;
23
+ const code = await runTaskList([
24
+ {
25
+ title: args.check ? "oxfmt --check" : "oxfmt",
26
+ command: "pnpm",
27
+ args: ["exec", "oxfmt", ...oxfmtArgs],
28
+ },
29
+ ]);
30
+ process.exit(code);
31
+ },
32
+ });
33
+ //# sourceMappingURL=fmt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fmt.js","sourceRoot":"","sources":["../../src/commands/fmt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;IACtC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,+BAA+B;KAC7C;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,KAAK;SACf;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QACzE,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QACzE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B;gBACE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO;gBAC7C,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;aACtC;SACF,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `nwire` (no args) — branded greeting + project summary, rendered with
3
+ * ink so the panel is a single declarative tree we can grow over time.
4
+ */
5
+ export declare const greetingCommand: import("citty").CommandDef<import("citty").ArgsDef>;
6
+ //# sourceMappingURL=greeting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greeting.d.ts","sourceRoot":"","sources":["../../src/commands/greeting.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,eAAO,MAAM,eAAe,qDAgB1B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * `nwire` (no args) — branded greeting + project summary, rendered with
4
+ * ink so the panel is a single declarative tree we can grow over time.
5
+ */
6
+ import { defineCommand } from "citty";
7
+ import { render } from "ink";
8
+ import { detectProject } from "../lib/project.js";
9
+ import { Greeting } from "../ui/greeting.js";
10
+ const CLI_VERSION = "0.1.0";
11
+ export const greetingCommand = defineCommand({
12
+ meta: {
13
+ name: "greeting",
14
+ description: "Show project status",
15
+ },
16
+ async run() {
17
+ const project = detectProject();
18
+ const { waitUntilExit, unmount } = render(_jsx(Greeting, { project: project, version: CLI_VERSION }), { exitOnCtrlC: true });
19
+ // Greeting is a one-shot render — unmount immediately so the process
20
+ // exits without keeping stdin in raw mode.
21
+ unmount();
22
+ await waitUntilExit().catch(() => { });
23
+ },
24
+ });
25
+ //# sourceMappingURL=greeting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greeting.js","sourceRoot":"","sources":["../../src/commands/greeting.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,WAAW,GAAG,OAAO,CAAC;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;IAC3C,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,qBAAqB;KACnC;IACD,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;QAChC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,MAAM,CACvC,KAAC,QAAQ,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAI,EACpD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CAAC;QACF,qEAAqE;QACrE,2CAA2C;QAC3C,OAAO,EAAE,CAAC;QACV,MAAM,aAAa,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `nwire infra` — manage the project's docker-compose-backed services
3
+ * (Postgres, Redis, Mongo, Mailhog, Logto). Wraps `docker compose` so
4
+ * contributors don't need to remember the exact subcommands.
5
+ *
6
+ * nwire infra up # start everything in the background
7
+ * nwire infra up logto # start only listed services
8
+ * nwire infra down # stop, keep volumes
9
+ * nwire infra reset # stop + remove volumes (fresh DB next start)
10
+ * nwire infra ps # status table
11
+ * nwire infra logs <svc> # tail one service's logs
12
+ */
13
+ export declare const infraCommand: import("citty").CommandDef<import("citty").ArgsDef>;
14
+ //# sourceMappingURL=infra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infra.d.ts","sourceRoot":"","sources":["../../src/commands/infra.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgDH,eAAO,MAAM,YAAY,qDA0FvB,CAAC"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * `nwire infra` — manage the project's docker-compose-backed services
3
+ * (Postgres, Redis, Mongo, Mailhog, Logto). Wraps `docker compose` so
4
+ * contributors don't need to remember the exact subcommands.
5
+ *
6
+ * nwire infra up # start everything in the background
7
+ * nwire infra up logto # start only listed services
8
+ * nwire infra down # stop, keep volumes
9
+ * nwire infra reset # stop + remove volumes (fresh DB next start)
10
+ * nwire infra ps # status table
11
+ * nwire infra logs <svc> # tail one service's logs
12
+ */
13
+ import { defineCommand } from "citty";
14
+ import { spawn } from "node:child_process";
15
+ import { existsSync } from "node:fs";
16
+ import { resolve } from "node:path";
17
+ import { palette } from "../lib/colors.js";
18
+ /**
19
+ * Build the `docker compose` command. When `withTelemetry` is set AND
20
+ * `docker-compose.telemetry.yml` exists, include it via `-f` overlay so
21
+ * Vector + GreptimeDB come up alongside the base stack.
22
+ */
23
+ function runCompose(args, withTelemetry) {
24
+ const composeArgs = ["compose"];
25
+ if (withTelemetry) {
26
+ const telemetryPath = resolve(process.cwd(), "docker-compose.telemetry.yml");
27
+ if (existsSync(telemetryPath)) {
28
+ composeArgs.push("-f", "docker-compose.yml", "-f", "docker-compose.telemetry.yml");
29
+ }
30
+ }
31
+ return new Promise((resolveExit) => {
32
+ const child = spawn("docker", [...composeArgs, ...args], {
33
+ stdio: "inherit",
34
+ cwd: process.cwd(),
35
+ });
36
+ child.on("close", (code) => resolveExit(code ?? 1));
37
+ child.on("error", (err) => {
38
+ // eslint-disable-next-line no-console
39
+ console.error(palette.err("nwire infra:") + ` ${err.message}`);
40
+ resolveExit(1);
41
+ });
42
+ });
43
+ }
44
+ function ensureCompose() {
45
+ const composePath = resolve(process.cwd(), "docker-compose.yml");
46
+ if (existsSync(composePath))
47
+ return true;
48
+ // eslint-disable-next-line no-console
49
+ console.error(palette.err("nwire infra:") +
50
+ ` no docker-compose.yml found at ${composePath}. ` +
51
+ `Run from the project root.`);
52
+ return false;
53
+ }
54
+ export const infraCommand = defineCommand({
55
+ meta: {
56
+ name: "infra",
57
+ description: "Manage local services (Postgres, Redis, Mongo, Logto, etc.)",
58
+ },
59
+ subCommands: {
60
+ up: defineCommand({
61
+ meta: { name: "up", description: "Start services in the background" },
62
+ args: {
63
+ services: {
64
+ type: "positional",
65
+ required: false,
66
+ description: "Specific services to start",
67
+ },
68
+ telemetry: {
69
+ type: "boolean",
70
+ default: false,
71
+ description: "Also start Vector + GreptimeDB (docker-compose.telemetry.yml)",
72
+ },
73
+ },
74
+ async run({ args, rawArgs }) {
75
+ if (!ensureCompose())
76
+ process.exit(1);
77
+ const services = rawArgs.filter((a) => !a.startsWith("-"));
78
+ process.exit(await runCompose(["up", "-d", ...services], Boolean(args.telemetry)));
79
+ },
80
+ }),
81
+ down: defineCommand({
82
+ meta: { name: "down", description: "Stop services (keeps data volumes)" },
83
+ args: {
84
+ telemetry: { type: "boolean", default: false, description: "Also stop telemetry services" },
85
+ },
86
+ async run({ args }) {
87
+ if (!ensureCompose())
88
+ process.exit(1);
89
+ process.exit(await runCompose(["down"], Boolean(args.telemetry)));
90
+ },
91
+ }),
92
+ reset: defineCommand({
93
+ meta: { name: "reset", description: "Stop + delete all volumes (DESTRUCTIVE)" },
94
+ args: {
95
+ telemetry: { type: "boolean", default: false, description: "Also reset telemetry volumes" },
96
+ },
97
+ async run({ args }) {
98
+ if (!ensureCompose())
99
+ process.exit(1);
100
+ process.exit(await runCompose(["down", "-v"], Boolean(args.telemetry)));
101
+ },
102
+ }),
103
+ ps: defineCommand({
104
+ meta: { name: "ps", description: "Show service status" },
105
+ args: {
106
+ telemetry: { type: "boolean", default: false, description: "Include telemetry services" },
107
+ },
108
+ async run({ args }) {
109
+ if (!ensureCompose())
110
+ process.exit(1);
111
+ process.exit(await runCompose(["ps"], Boolean(args.telemetry)));
112
+ },
113
+ }),
114
+ logs: defineCommand({
115
+ meta: { name: "logs", description: "Tail a service's logs" },
116
+ args: {
117
+ service: { type: "positional", required: true, description: "Service name" },
118
+ telemetry: {
119
+ type: "boolean",
120
+ default: false,
121
+ description: "Resolve telemetry services too",
122
+ },
123
+ },
124
+ async run({ args }) {
125
+ if (!ensureCompose())
126
+ process.exit(1);
127
+ process.exit(await runCompose(["logs", "-f", String(args.service)], Boolean(args.telemetry)));
128
+ },
129
+ }),
130
+ },
131
+ async run({ rawArgs }) {
132
+ // No subcommand → print help
133
+ if (rawArgs.length === 0) {
134
+ // eslint-disable-next-line no-console
135
+ console.log(`${palette.bold("nwire infra")} — manage local services\n\n` +
136
+ ` ${palette.brand("up")} start everything in the background\n` +
137
+ ` ${palette.brand("down")} stop services (keeps volumes)\n` +
138
+ ` ${palette.brand("reset")} stop + delete volumes (fresh DB)\n` +
139
+ ` ${palette.brand("ps")} show service status\n` +
140
+ ` ${palette.brand("logs")} tail a service's logs (logs <svc>)\n\n` +
141
+ ` Add ${palette.accent("--telemetry")} to any subcommand to include\n` +
142
+ ` Vector + GreptimeDB from docker-compose.telemetry.yml.\n`);
143
+ }
144
+ },
145
+ });
146
+ //# sourceMappingURL=infra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infra.js","sourceRoot":"","sources":["../../src/commands/infra.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;;;GAIG;AACH,SAAS,UAAU,CAAC,IAAuB,EAAE,aAAsB;IACjE,MAAM,WAAW,GAAa,CAAC,SAAS,CAAC,CAAC;IAC1C,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,8BAA8B,CAAC,CAAC;QAC7E,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,8BAA8B,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC,EAAE;YACvD,KAAK,EAAE,SAAS;YAChB,GA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AC,CAAC,CAAC;gBACtC,OAAO,CAAC,IAAI,CACV,MAAM,UAAU,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAChF,CAAC;YACJ,CAAC;SACF,CAAC;KACH;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE;QACnB,6BAA6B;QAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,sCAAsC;YACtC,OAAO,CAAC,GAAG,CACT,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,8BAA8B;gBAC1D,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,2CAA2C;gBACnE,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,oCAAoC;gBAC9D,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,sCAAsC;gBACjE,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B;gBACpD,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,2CAA2C;gBACrE,SAAS,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,iCAAiC;gBACvE,4DAA4D,CAC/D,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `nwire lint` — passthrough to `oxlint` wrapped in a listr2 task.
3
+ * Honors the consumer project's oxlint config.
4
+ */
5
+ export declare const lintCommand: import("citty").CommandDef<{
6
+ fix: {
7
+ type: "boolean";
8
+ description: string;
9
+ default: false;
10
+ };
11
+ }>;
12
+ //# sourceMappingURL=lint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,WAAW;;;;;;EAwBtB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * `nwire lint` — passthrough to `oxlint` wrapped in a listr2 task.
3
+ * Honors the consumer project's oxlint config.
4
+ */
5
+ import { defineCommand } from "citty";
6
+ import { runTaskList } from "../lib/run-task.js";
7
+ export const lintCommand = defineCommand({
8
+ meta: {
9
+ name: "lint",
10
+ description: "Lint the project with oxlint",
11
+ },
12
+ args: {
13
+ fix: {
14
+ type: "boolean",
15
+ description: "Apply auto-fixable lint suggestions",
16
+ default: false,
17
+ },
18
+ },
19
+ async run({ args, rawArgs }) {
20
+ const passthrough = rawArgs.filter((a) => a !== "--fix");
21
+ const oxlintArgs = args.fix ? ["--fix", ...passthrough] : passthrough;
22
+ const code = await runTaskList([
23
+ {
24
+ title: args.fix ? "oxlint --fix" : "oxlint",
25
+ command: "pnpm",
26
+ args: ["exec", "oxlint", ...oxlintArgs],
27
+ },
28
+ ]);
29
+ process.exit(code);
30
+ },
31
+ });
32
+ //# sourceMappingURL=lint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACvC,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,8BAA8B;KAC5C;IACD,IAAI,EAAE;QACJ,GAAG,EAAE;YACH,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE,KAAK;SACf;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QACtE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B;gBACE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ;gBAC3C,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;aACxC;SACF,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `nwire logs <id> [-f]` — print or tail logs for a supervised process.
3
+ *
4
+ * `<id>` may be the full UUID or any unique prefix. Without `-f`, the
5
+ * entire captured log is printed. With `-f`, the command tails new output
6
+ * until the user hits Ctrl+C.
7
+ */
8
+ export declare const logsCommand: import("citty").CommandDef<{
9
+ id: {
10
+ type: "positional";
11
+ required: true;
12
+ description: string;
13
+ };
14
+ follow: {
15
+ type: "boolean";
16
+ alias: string;
17
+ description: string;
18
+ default: false;
19
+ };
20
+ }>;
21
+ //# sourceMappingURL=logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/commands/logs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,eAAO,MAAM,WAAW;;;;;;;;;;;;EAgEtB,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * `nwire logs <id> [-f]` — print or tail logs for a supervised process.
3
+ *
4
+ * `<id>` may be the full UUID or any unique prefix. Without `-f`, the
5
+ * entire captured log is printed. With `-f`, the command tails new output
6
+ * until the user hits Ctrl+C.
7
+ */
8
+ import { defineCommand } from "citty";
9
+ import { existsSync, readFileSync } from "node:fs";
10
+ import { spawn } from "node:child_process";
11
+ import { palette } from "../lib/colors.js";
12
+ import { listRecords } from "../lib/process-state.js";
13
+ export const logsCommand = defineCommand({
14
+ meta: {
15
+ name: "logs",
16
+ description: "Print or tail logs for a supervised process",
17
+ },
18
+ args: {
19
+ id: {
20
+ type: "positional",
21
+ required: true,
22
+ description: "Process id (or prefix) from `nwire ps`",
23
+ },
24
+ follow: {
25
+ type: "boolean",
26
+ alias: "f",
27
+ description: "Follow new log lines as they arrive",
28
+ default: false,
29
+ },
30
+ },
31
+ async run({ args }) {
32
+ const wanted = String(args.id);
33
+ const records = listRecords(process.cwd());
34
+ const matches = records.filter((r) => r.id.startsWith(wanted));
35
+ if (matches.length === 0) {
36
+ // eslint-disable-next-line no-console
37
+ console.error(palette.err("nwire logs:") +
38
+ ` no process matched "${wanted}". Run \`nwire ps\` to list active processes.`);
39
+ process.exit(1);
40
+ }
41
+ if (matches.length > 1) {
42
+ // eslint-disable-next-line no-console
43
+ console.error(palette.err("nwire logs:") +
44
+ ` "${wanted}" is ambiguous (${matches.length} matches). Provide a longer id prefix.`);
45
+ process.exit(1);
46
+ }
47
+ const record = matches[0];
48
+ if (!existsSync(record.logPath)) {
49
+ // eslint-disable-next-line no-console
50
+ console.error(palette.err("nwire logs:") + ` log file missing at ${record.logPath}`);
51
+ process.exit(1);
52
+ }
53
+ if (!args.follow) {
54
+ process.stdout.write(readFileSync(record.logPath, "utf8"));
55
+ process.exit(0);
56
+ }
57
+ // `tail -F` follows the file across truncations/recreations and is
58
+ // available on every supported developer platform.
59
+ const child = spawn("tail", ["-F", record.logPath], { stdio: "inherit" });
60
+ const stop = (signal) => {
61
+ try {
62
+ child.kill(signal);
63
+ }
64
+ catch {
65
+ // gone
66
+ }
67
+ };
68
+ process.on("SIGINT", () => stop("SIGINT"));
69
+ process.on("SIGTERM", () => stop("SIGTERM"));
70
+ child.on("exit", (code) => process.exit(code ?? 0));
71
+ },
72
+ });
73
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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Q,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * `nwire ls` — lists every discovered wire and every action.
3
+ */
4
+ export declare const lsCommand: import("citty").CommandDef<import("citty").ArgsDef>;
5
+ //# sourceMappingURL=ls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../src/commands/ls.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,SAAS,qDAcpB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `nwire ls` — lists every discovered wire and every action.
3
+ */
4
+ import { defineCommand } from "citty";
5
+ import { resolve, dirname } from "node:path";
6
+ import { existsSync } from "node:fs";
7
+ import { fileURLToPath } from "node:url";
8
+ import { palette } from "../lib/colors.js";
9
+ import { viteNode } from "../lib/vite-node.js";
10
+ const here = dirname(fileURLToPath(import.meta.url));
11
+ export const lsCommand = defineCommand({
12
+ meta: {
13
+ name: "ls",
14
+ description: "List discovered wires + actions",
15
+ },
16
+ async run({ rawArgs }) {
17
+ const builderPath = resolve(here, "..", "ls-runner.js");
18
+ if (!existsSync(builderPath)) {
19
+ // eslint-disable-next-line no-console
20
+ console.error(palette.err("nwire ls:") + ` ls runner missing at ${builderPath}`);
21
+ process.exit(1);
22
+ }
23
+ process.exit(viteNode(builderPath, rawArgs));
24
+ },
25
+ });
26
+ //# sourceMappingURL=ls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ls.js","sourceRoot":"","sources":["../../src/commands/ls.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,iCAAiC;KAC/C;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE;QACnB,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC7B,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,yBAAyB,WAAW,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `nwire please [...args]` — the ace proxy that runs app commands via the
3
+ * project's `apps/<app>/run.please.ts` wire. Replaces the older `call`
4
+ * command; one entry, every domain action reachable.
5
+ */
6
+ export declare const pleaseCommand: import("citty").CommandDef<{
7
+ passthrough: {
8
+ type: "positional";
9
+ required: false;
10
+ description: string;
11
+ };
12
+ }>;
13
+ //# sourceMappingURL=please.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"please.d.ts","sourceRoot":"","sources":["../../src/commands/please.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,eAAO,MAAM,aAAa;;;;;;EAuBxB,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `nwire please [...args]` — the ace proxy that runs app commands via the
3
+ * project's `apps/<app>/run.please.ts` wire. Replaces the older `call`
4
+ * command; one entry, every domain action reachable.
5
+ */
6
+ import { defineCommand } from "citty";
7
+ import { resolve } from "node:path";
8
+ import { existsSync, readdirSync } from "node:fs";
9
+ import { palette } from "../lib/colors.js";
10
+ import { viteNode } from "../lib/vite-node.js";
11
+ function findPleaseEntry(cwd) {
12
+ const appsDir = resolve(cwd, "apps");
13
+ if (!existsSync(appsDir))
14
+ return undefined;
15
+ for (const entry of readdirSync(appsDir, { withFileTypes: true })) {
16
+ if (!entry.isDirectory())
17
+ continue;
18
+ const candidate = resolve(appsDir, entry.name, "run.please.ts");
19
+ if (existsSync(candidate))
20
+ return candidate;
21
+ }
22
+ return undefined;
23
+ }
24
+ export const pleaseCommand = defineCommand({
25
+ meta: {
26
+ name: "please",
27
+ description: "Run an app command via the please wire",
28
+ },
29
+ args: {
30
+ passthrough: {
31
+ type: "positional",
32
+ required: false,
33
+ description: "Command name + JSON args, forwarded to the please wire",
34
+ },
35
+ },
36
+ async run({ rawArgs }) {
37
+ const pleasePath = findPleaseEntry(process.cwd());
38
+ if (!pleasePath) {
39
+ // eslint-disable-next-line no-console
40
+ console.error(palette.err("nwire please:") + " no apps/*/run.please.ts found in this project");
41
+ process.exit(1);
42
+ }
43
+ process.exit(viteNode(pleasePath, rawArgs));
44
+ },
45
+ });
46
+ //# sourceMappingURL=please.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"please.js","sourceRoot":"","sources":["../../src/commands/please.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,a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GAAG,gDAAgD,CAChF,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `nwire ps` — list supervised processes for the project. Reads every
3
+ * record under `.nwire/processes/*.json` and renders an ink table.
4
+ */
5
+ export declare const psCommand: import("citty").CommandDef<import("citty").ArgsDef>;
6
+ //# sourceMappingURL=ps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ps.d.ts","sourceRoot":"","sources":["../../src/commands/ps.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AASH,eAAO,MAAM,SAAS,qDAUpB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * `nwire ps` — list supervised processes for the project. Reads every
4
+ * record under `.nwire/processes/*.json` and renders an ink table.
5
+ */
6
+ import { defineCommand } from "citty";
7
+ import { render } from "ink";
8
+ import { listRecords } from "../lib/process-state.js";
9
+ import { ProcessTable } from "../ui/process-table.js";
10
+ export const psCommand = defineCommand({
11
+ meta: {
12
+ name: "ps",
13
+ description: "List supervised Nwire processes",
14
+ },
15
+ async run() {
16
+ const records = listRecords(process.cwd());
17
+ const { waitUntilExit } = render(_jsx(ProcessTable, { records: records }));
18
+ await waitUntilExit();
19
+ },
20
+ });
21
+ //# sourceMappingURL=ps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ps.js","sourceRoot":"","sources":["../../src/commands/ps.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,iCAAiC;KAC/C;IACD,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC;QACrE,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `nwire run <wire>` — boot one wire by name with stdio passthrough.
3
+ *
4
+ * nwire run main → apps/main/{run,main}.ts
5
+ * nwire run main.please → apps/main/run.please.ts
6
+ *
7
+ * Prints a branded banner so the user sees what's starting, then hands
8
+ * stdio straight through to the child (runApp's boot banner shows the
9
+ * actual port, docs URL, etc.). Same banner UX as `nwire dev`; only
10
+ * difference is `dev` adds `--watch` and reloads on change.
11
+ */
12
+ export declare const runCommand: import("citty").CommandDef<{
13
+ wire: {
14
+ type: "positional";
15
+ required: true;
16
+ description: string;
17
+ };
18
+ }>;
19
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,eAAO,MAAM,UAAU;;;;;;EAmGrB,CAAC"}