@hydranium/cli 1.0.0-next.30 → 1.0.0-next.300
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 +75 -204
- package/bin/hydranium-cli.js +13 -0
- package/heap-analysis/heap/core/load.mjs +2 -2
- package/lib/cli-version.js.map +1 -1
- package/lib/cli.js +7 -2
- package/lib/cli.js.map +1 -1
- package/lib/commands/analyze-heap-args.js.map +1 -1
- package/lib/commands/analyze-heap.d.ts +3 -0
- package/lib/commands/analyze-heap.d.ts.map +1 -1
- package/lib/commands/analyze-heap.js +2 -1
- package/lib/commands/analyze-heap.js.map +1 -1
- package/lib/commands/ast-ground-truth-args.d.ts +3 -2
- package/lib/commands/ast-ground-truth-args.d.ts.map +1 -1
- package/lib/commands/ast-ground-truth-args.js +11 -9
- package/lib/commands/ast-ground-truth-args.js.map +1 -1
- package/lib/commands/ast-ground-truth-driver.js +2 -1
- package/lib/commands/ast-ground-truth-driver.js.map +1 -1
- package/lib/commands/ast-ground-truth.js +1 -1
- package/lib/commands/ast-ground-truth.js.map +1 -1
- package/lib/commands/client-session.d.ts +17 -0
- package/lib/commands/client-session.d.ts.map +1 -0
- package/lib/commands/client-session.js +27 -0
- package/lib/commands/client-session.js.map +1 -0
- package/lib/commands/create-args.d.ts +17 -0
- package/lib/commands/create-args.d.ts.map +1 -0
- package/lib/commands/create-args.js +53 -0
- package/lib/commands/create-args.js.map +1 -0
- package/lib/commands/create.d.ts +38 -0
- package/lib/commands/create.d.ts.map +1 -0
- package/lib/commands/create.js +43 -0
- package/lib/commands/create.js.map +1 -0
- package/lib/commands/delete-args.d.ts +17 -0
- package/lib/commands/delete-args.d.ts.map +1 -0
- package/lib/commands/delete-args.js +49 -0
- package/lib/commands/delete-args.js.map +1 -0
- package/lib/commands/delete.d.ts +30 -0
- package/lib/commands/delete.d.ts.map +1 -0
- package/lib/commands/delete.js +32 -0
- package/lib/commands/delete.js.map +1 -0
- package/lib/commands/generate-ast-builder.d.ts +49 -0
- package/lib/commands/generate-ast-builder.d.ts.map +1 -0
- package/lib/commands/generate-ast-builder.js +200 -0
- package/lib/commands/generate-ast-builder.js.map +1 -0
- package/lib/commands/generate-transfer-model-args.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model-args.js +11 -1
- package/lib/commands/generate-transfer-model-args.js.map +1 -1
- package/lib/commands/generate-transfer-model-config.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model-config.js +6 -3
- package/lib/commands/generate-transfer-model-config.js.map +1 -1
- package/lib/commands/generate-transfer-model.d.ts +9 -0
- package/lib/commands/generate-transfer-model.d.ts.map +1 -1
- package/lib/commands/generate-transfer-model.js +18 -4
- package/lib/commands/generate-transfer-model.js.map +1 -1
- package/lib/commands/harness-args.d.ts +44 -42
- package/lib/commands/harness-args.d.ts.map +1 -1
- package/lib/commands/harness-args.js +109 -27
- package/lib/commands/harness-args.js.map +1 -1
- package/lib/commands/headless-harness.d.ts +37 -20
- package/lib/commands/headless-harness.d.ts.map +1 -1
- package/lib/commands/headless-harness.js +68 -17
- package/lib/commands/headless-harness.js.map +1 -1
- package/lib/commands/init-args.js +6 -6
- package/lib/commands/init-args.js.map +1 -1
- package/lib/commands/init-prompt.d.ts.map +1 -1
- package/lib/commands/init-templates.d.ts +8 -10
- package/lib/commands/init-templates.d.ts.map +1 -1
- package/lib/commands/init-templates.js +261 -167
- package/lib/commands/init-templates.js.map +1 -1
- package/lib/commands/init-wizard.js +4 -4
- package/lib/commands/init-wizard.js.map +1 -1
- package/lib/commands/init-workspace.d.ts +13 -3
- package/lib/commands/init-workspace.d.ts.map +1 -1
- package/lib/commands/init-workspace.js +21 -6
- package/lib/commands/init-workspace.js.map +1 -1
- package/lib/commands/init.d.ts +16 -10
- package/lib/commands/init.d.ts.map +1 -1
- package/lib/commands/init.js +17 -15
- package/lib/commands/init.js.map +1 -1
- package/lib/commands/lint-grammar-args.d.ts +3 -2
- package/lib/commands/lint-grammar-args.d.ts.map +1 -1
- package/lib/commands/lint-grammar-args.js +13 -10
- package/lib/commands/lint-grammar-args.js.map +1 -1
- package/lib/commands/lint-grammar-driver.js +2 -1
- package/lib/commands/lint-grammar-driver.js.map +1 -1
- package/lib/commands/lint-grammar-report.js.map +1 -1
- package/lib/commands/lint-grammar.js +1 -1
- package/lib/commands/lint-grammar.js.map +1 -1
- package/lib/commands/measure-memory-args.d.ts +3 -2
- package/lib/commands/measure-memory-args.d.ts.map +1 -1
- package/lib/commands/measure-memory-args.js +22 -11
- package/lib/commands/measure-memory-args.js.map +1 -1
- package/lib/commands/measure-memory-driver.js +5 -3
- package/lib/commands/measure-memory-driver.js.map +1 -1
- package/lib/commands/measure-memory.js +1 -1
- package/lib/commands/measure-memory.js.map +1 -1
- package/lib/commands/model-docs-args.d.ts +4 -3
- package/lib/commands/model-docs-args.d.ts.map +1 -1
- package/lib/commands/model-docs-args.js +12 -10
- package/lib/commands/model-docs-args.js.map +1 -1
- package/lib/commands/model-docs-driver.js +2 -1
- package/lib/commands/model-docs-driver.js.map +1 -1
- package/lib/commands/model-docs.js +1 -1
- package/lib/commands/model-docs.js.map +1 -1
- package/lib/commands/projects-args.d.ts.map +1 -1
- package/lib/commands/projects-args.js +5 -5
- package/lib/commands/projects-args.js.map +1 -1
- package/lib/commands/projects.d.ts +3 -4
- package/lib/commands/projects.d.ts.map +1 -1
- package/lib/commands/projects.js +2 -2
- package/lib/commands/projects.js.map +1 -1
- package/lib/commands/query-args.d.ts.map +1 -1
- package/lib/commands/query-args.js +5 -5
- package/lib/commands/query-args.js.map +1 -1
- package/lib/commands/query.d.ts +3 -4
- package/lib/commands/query.d.ts.map +1 -1
- package/lib/commands/query.js +2 -2
- package/lib/commands/query.js.map +1 -1
- package/lib/commands/reflect-args.d.ts +3 -2
- package/lib/commands/reflect-args.d.ts.map +1 -1
- package/lib/commands/reflect-args.js +13 -10
- package/lib/commands/reflect-args.js.map +1 -1
- package/lib/commands/reflect-driver.js +2 -1
- package/lib/commands/reflect-driver.js.map +1 -1
- package/lib/commands/reflect-report.js.map +1 -1
- package/lib/commands/reflect.js +1 -1
- package/lib/commands/reflect.js.map +1 -1
- package/lib/commands/save-args.d.ts.map +1 -1
- package/lib/commands/save-args.js +7 -4
- package/lib/commands/save-args.js.map +1 -1
- package/lib/commands/save.d.ts +8 -4
- package/lib/commands/save.d.ts.map +1 -1
- package/lib/commands/save.js +12 -23
- package/lib/commands/save.js.map +1 -1
- package/lib/commands/validate-args.d.ts +3 -2
- package/lib/commands/validate-args.d.ts.map +1 -1
- package/lib/commands/validate-args.js +13 -10
- package/lib/commands/validate-args.js.map +1 -1
- package/lib/commands/validate-driver.js +2 -1
- package/lib/commands/validate-driver.js.map +1 -1
- package/lib/commands/validate-report.js.map +1 -1
- package/lib/commands/validate.js +1 -1
- package/lib/commands/validate.js.map +1 -1
- package/lib/commands/watch-args.d.ts.map +1 -1
- package/lib/commands/watch-args.js +6 -4
- package/lib/commands/watch-args.js.map +1 -1
- package/lib/commands/watch.d.ts +3 -4
- package/lib/commands/watch.d.ts.map +1 -1
- package/lib/commands/watch.js +20 -2
- package/lib/commands/watch.js.map +1 -1
- package/lib/driver-heap.d.ts +52 -0
- package/lib/driver-heap.d.ts.map +1 -0
- package/lib/driver-heap.js +51 -0
- package/lib/driver-heap.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/log-level.d.ts +21 -11
- package/lib/log-level.d.ts.map +1 -1
- package/lib/log-level.js +25 -14
- package/lib/log-level.js.map +1 -1
- package/lib/spawn-data-server.d.ts +9 -4
- package/lib/spawn-data-server.d.ts.map +1 -1
- package/lib/spawn-data-server.js +5 -4
- package/lib/spawn-data-server.js.map +1 -1
- package/lib/stderr-connection-logger.d.ts +12 -0
- package/lib/stderr-connection-logger.d.ts.map +1 -0
- package/lib/stderr-connection-logger.js +16 -0
- package/lib/stderr-connection-logger.js.map +1 -0
- package/lib/testing/echo-server.js +9 -1
- package/lib/testing/echo-server.js.map +1 -1
- package/package.json +50 -39
- package/src/cli.ts +7 -2
- package/src/commands/analyze-heap.ts +4 -1
- package/src/commands/ast-ground-truth-args.ts +15 -12
- package/src/commands/ast-ground-truth-driver.ts +2 -1
- package/src/commands/ast-ground-truth.ts +1 -1
- package/src/commands/client-session.ts +33 -0
- package/src/commands/create-args.ts +68 -0
- package/src/commands/create.ts +83 -0
- package/src/commands/delete-args.ts +64 -0
- package/src/commands/delete.ts +61 -0
- package/src/commands/generate-ast-builder.ts +246 -0
- package/src/commands/generate-transfer-model-args.ts +11 -1
- package/src/commands/generate-transfer-model-config.ts +6 -3
- package/src/commands/generate-transfer-model.ts +27 -4
- package/src/commands/harness-args.ts +99 -31
- package/src/commands/headless-harness.ts +86 -26
- package/src/commands/init-args.ts +6 -6
- package/src/commands/init-templates.ts +272 -169
- package/src/commands/init-wizard.ts +4 -4
- package/src/commands/init-workspace.ts +31 -7
- package/src/commands/init.ts +36 -26
- package/src/commands/lint-grammar-args.ts +17 -13
- package/src/commands/lint-grammar-driver.ts +2 -1
- package/src/commands/lint-grammar.ts +1 -1
- package/src/commands/measure-memory-args.ts +27 -14
- package/src/commands/measure-memory-driver.ts +5 -3
- package/src/commands/measure-memory.ts +1 -1
- package/src/commands/model-docs-args.ts +16 -13
- package/src/commands/model-docs-driver.ts +2 -1
- package/src/commands/model-docs.ts +1 -1
- package/src/commands/projects-args.ts +5 -4
- package/src/commands/projects.ts +4 -6
- package/src/commands/query-args.ts +5 -4
- package/src/commands/query.ts +4 -6
- package/src/commands/reflect-args.ts +17 -13
- package/src/commands/reflect-driver.ts +2 -1
- package/src/commands/reflect.ts +1 -1
- package/src/commands/save-args.ts +7 -3
- package/src/commands/save.ts +24 -27
- package/src/commands/validate-args.ts +17 -13
- package/src/commands/validate-driver.ts +2 -1
- package/src/commands/validate.ts +1 -1
- package/src/commands/watch-args.ts +6 -3
- package/src/commands/watch.ts +28 -7
- package/src/driver-heap.ts +65 -0
- package/src/index.ts +3 -0
- package/src/log-level.ts +42 -14
- package/src/spawn-data-server.ts +17 -5
- package/src/stderr-connection-logger.ts +18 -0
- package/src/testing/echo-server.ts +11 -2
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
|
|
10
10
|
import type * as HydraniumCoreNode from '@hydranium/core/node';
|
|
11
|
-
import type { LogThreshold } from '@hydranium/protocol';
|
|
12
11
|
import { spawn } from 'node:child_process';
|
|
13
12
|
import { statSync, writeFileSync } from 'node:fs';
|
|
14
13
|
import { createRequire } from 'node:module';
|
|
15
14
|
import * as path from 'node:path';
|
|
16
15
|
import { pathToFileURL } from 'node:url';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { driverHeapArgs, type HeapReading } from '../driver-heap.js';
|
|
17
|
+
import { logEnv, type LogOptions } from '../log-level.js';
|
|
18
|
+
import { IMPORT_FLAG, SERVICES_FLAG } from './harness-args.js';
|
|
19
19
|
|
|
20
20
|
/** The flag every report-producing subcommand names its destination file with. */
|
|
21
21
|
export const OUT_FILE_FLAG = '--out-file';
|
|
@@ -43,13 +43,15 @@ export interface HeadlessContext {
|
|
|
43
43
|
* its `createServices` thunk AND the `@hydranium/core/node` harness, both
|
|
44
44
|
* resolved from the HEAD's location rather than the CLI's.
|
|
45
45
|
*
|
|
46
|
-
* The module is an ESM file
|
|
47
|
-
*
|
|
46
|
+
* The module is an ESM file exporting a ZERO-ARG `createServices(): { shared }`:
|
|
47
|
+
* a compiled `lib/*.js`, or the TypeScript source when the child was started
|
|
48
|
+
* with a loader through {@link IMPORT_FLAG}. `hydranium-cli` is language-agnostic
|
|
48
49
|
* and cannot statically import a head's `create<Lang>Services`, so the dynamic
|
|
49
50
|
* import is the seam that keeps the binary head-neutral. Resolving the harness
|
|
50
|
-
* from the head's graph (via `createRequire` rooted at the head module)
|
|
51
|
-
*
|
|
52
|
-
*
|
|
51
|
+
* from the head's graph (via `createRequire` rooted at the head module) rather
|
|
52
|
+
* than from the CLI's guarantees it runs against the SAME core copy as
|
|
53
|
+
* `createServices`, which a second copy of the module would break even where
|
|
54
|
+
* both resolve.
|
|
53
55
|
*
|
|
54
56
|
* Throws a clear error when the path names no file, and when the export is
|
|
55
57
|
* missing or not a function.
|
|
@@ -64,12 +66,17 @@ export async function loadHeadlessContext(servicesModule: string): Promise<Headl
|
|
|
64
66
|
if (stats === undefined || !stats.isFile()) {
|
|
65
67
|
throw new Error(
|
|
66
68
|
`${SERVICES_FLAG} must name an existing ESM file; '${servicesModule}' resolved to ${modulePath}, ` +
|
|
67
|
-
`which is not one. Pass the head's
|
|
68
|
-
'not
|
|
69
|
+
`which is not one. Pass the path of the head's entry, e.g. \`${SERVICES_FLAG} ./lib/services.js\` — ` +
|
|
70
|
+
'not a package name.'
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
73
|
const moduleUrl = pathToFileURL(modulePath).href;
|
|
72
|
-
|
|
74
|
+
let imported: Record<string, unknown>;
|
|
75
|
+
try {
|
|
76
|
+
imported = (await import(moduleUrl)) as Record<string, unknown>;
|
|
77
|
+
} catch (err: unknown) {
|
|
78
|
+
throw withLoaderHint(err, modulePath);
|
|
79
|
+
}
|
|
73
80
|
const createServices = imported.createServices;
|
|
74
81
|
if (typeof createServices !== 'function') {
|
|
75
82
|
throw new Error(
|
|
@@ -84,6 +91,32 @@ export async function loadHeadlessContext(servicesModule: string): Promise<Headl
|
|
|
84
91
|
return { createServices: createServices as ServicesFactory, coreNode };
|
|
85
92
|
}
|
|
86
93
|
|
|
94
|
+
/** The codes Node fails a TypeScript entry with when no loader handled it, depending on its version. */
|
|
95
|
+
const UNLOADED_TYPESCRIPT_CODES: ReadonlySet<string> = new Set([
|
|
96
|
+
'ERR_UNKNOWN_FILE_EXTENSION',
|
|
97
|
+
'ERR_MODULE_NOT_FOUND',
|
|
98
|
+
'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX'
|
|
99
|
+
]);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Append a loader hint to a TypeScript entry's import failure, unless the child
|
|
103
|
+
* was started with {@link IMPORT_FLAG}, where the hint would only repeat the
|
|
104
|
+
* caller's own command. Appended rather than substituted: a loader set through
|
|
105
|
+
* `NODE_OPTIONS` does not show in `execArgv`, and under it the failure can be a
|
|
106
|
+
* missing module that only Node's own message names.
|
|
107
|
+
*/
|
|
108
|
+
function withLoaderHint(err: unknown, modulePath: string): unknown {
|
|
109
|
+
if (!(err instanceof Error) || !/\.[cm]?ts$/.test(modulePath) || !('code' in err) || typeof err.code !== 'string') {
|
|
110
|
+
return err;
|
|
111
|
+
}
|
|
112
|
+
if (!UNLOADED_TYPESCRIPT_CODES.has(err.code) || process.execArgv.some(arg => arg.startsWith(IMPORT_FLAG))) {
|
|
113
|
+
return err;
|
|
114
|
+
}
|
|
115
|
+
return new Error(`${err.message}\nA TypeScript head needs a loader registered with \`${IMPORT_FLAG}\`, e.g. \`${IMPORT_FLAG} tsx\`.`, {
|
|
116
|
+
cause: err
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
87
120
|
/**
|
|
88
121
|
* Child-side: deliver a finished report — to `outFile` when one was named, else
|
|
89
122
|
* to stdout.
|
|
@@ -129,37 +162,64 @@ export function spawnNodeChild(execArgs: string[], env?: Record<string, string>)
|
|
|
129
162
|
/** How a subcommand parent reaches its driver child; the seam `__spawnForTest` replaces. */
|
|
130
163
|
export type SpawnDriverChild = (execArgs: string[], env?: Record<string, string>) => Promise<number>;
|
|
131
164
|
|
|
132
|
-
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
165
|
+
/**
|
|
166
|
+
* What every `--services` subcommand carries for the child it spawns, on top of
|
|
167
|
+
* its own options. The log options apply to the head the driver boots; an
|
|
168
|
+
* absent one leaves the child's inherited environment alone, so an ambient
|
|
169
|
+
* variable still wins where a caller set one.
|
|
170
|
+
*/
|
|
171
|
+
export interface DriverSpawnOptions extends LogOptions {
|
|
172
|
+
/** Specifiers the driver child registers with Node's `--import`, in order, before it imports the head. */
|
|
173
|
+
readonly imports?: readonly string[];
|
|
140
174
|
/** Test-only: capture the node argv and env instead of spawning the real child. */
|
|
141
175
|
readonly __spawnForTest?: SpawnDriverChild;
|
|
176
|
+
/**
|
|
177
|
+
* Test-only: decide the heap ceiling from a stated cgroup reading rather
|
|
178
|
+
* than the machine's. Without it an argv assertion means one thing on a
|
|
179
|
+
* workstation and nothing at all under a memory limit, so a suite that
|
|
180
|
+
* asserts the ceiling is present passes vacuously in a container.
|
|
181
|
+
*/
|
|
182
|
+
readonly __heapReadingForTest?: HeapReading;
|
|
142
183
|
}
|
|
143
184
|
|
|
144
185
|
/**
|
|
145
186
|
* Parent-side: run a subcommand's driver child and propagate its exit code, so a
|
|
146
187
|
* shell or CI step sees the gate.
|
|
147
188
|
*
|
|
148
|
-
* **The log
|
|
149
|
-
* head's logger reads `
|
|
150
|
-
* which is inside the driver's dynamic import — a flag the driver
|
|
151
|
-
* arrive after the only moment it can be read. Setting
|
|
152
|
-
* exporting
|
|
153
|
-
*
|
|
189
|
+
* **The log options travel in the child's ENVIRONMENT, not its argv.** The
|
|
190
|
+
* head's logger reads its `HYDRANIUM_LOG_*` variables while `createServices`
|
|
191
|
+
* constructs it, which is inside the driver's dynamic import — a flag the driver
|
|
192
|
+
* parsed would arrive after the only moment it can be read. Setting them here
|
|
193
|
+
* rather than exporting them also leaves the CLI's own output alone, unlike
|
|
194
|
+
* ambient variables the parent would carry too.
|
|
154
195
|
*
|
|
155
196
|
* A head that binds a logger of its own decides for itself whether the flag means
|
|
156
197
|
* anything, which is the intended seam: the CLI is language-agnostic and cannot
|
|
157
198
|
* reach past `createServices`.
|
|
199
|
+
*
|
|
200
|
+
* **The heap ceiling is prepended HERE rather than passed by each subcommand.**
|
|
201
|
+
* Every caller wants the same answer to the same question, and the answer is not
|
|
202
|
+
* a constant — see {@link driverHeapArgs}. A literal at the call site is a place
|
|
203
|
+
* the container case can be missed, and the caller that misses it takes the whole
|
|
204
|
+
* cgroup down with it rather than failing on its own.
|
|
158
205
|
*/
|
|
159
206
|
export async function runDriverChild(execArgs: string[], options: DriverSpawnOptions): Promise<void> {
|
|
160
207
|
const spawnChild = options.__spawnForTest ?? spawnNodeChild;
|
|
161
|
-
const
|
|
208
|
+
const importArgs = (options.imports ?? []).map(specifier => `${IMPORT_FLAG}=${loaderSpecifier(specifier)}`);
|
|
209
|
+
const code = await spawnChild([...driverHeapArgs(options.__heapReadingForTest), ...importArgs, ...execArgs], logEnv(options));
|
|
162
210
|
if (code) {
|
|
163
211
|
process.exitCode = code;
|
|
164
212
|
}
|
|
165
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* A path, absolute or `./`/`../` relative with either separator, becomes a file
|
|
217
|
+
* URL resolved against the caller's directory. Node reads `--import` as a URL or
|
|
218
|
+
* package specifier, so it would take a Windows `C:\…` for the URL scheme `c:`
|
|
219
|
+
* and a `.\…` for a package name. Any other specifier passes through as Node
|
|
220
|
+
* reads it.
|
|
221
|
+
*/
|
|
222
|
+
function loaderSpecifier(specifier: string): string {
|
|
223
|
+
const isPath = path.isAbsolute(specifier) || /^\.\.?[\\/]/.test(specifier);
|
|
224
|
+
return isPath ? pathToFileURL(path.resolve(specifier)).href : specifier;
|
|
225
|
+
}
|
|
@@ -208,10 +208,10 @@ export const INIT_HELP: readonly string[] = [
|
|
|
208
208
|
' --force Scaffold into a non-empty directory anyway.',
|
|
209
209
|
' --monorepo Scaffold a member of the surrounding npm workspace:',
|
|
210
210
|
' tsconfig extends the root config that actually carries',
|
|
211
|
-
' compilerOptions,
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
211
|
+
' compilerOptions, and the scripts address the package by',
|
|
212
|
+
' --prefix. Errors when no ancestor declares `workspaces`.',
|
|
213
|
+
' Never writes outside the target — the root `workspaces`',
|
|
214
|
+
' entry and dependency pins are printed, not added.',
|
|
215
215
|
' --scope <@scope> npm scope for the package name, e.g. @acme. Not inferred:',
|
|
216
216
|
' a root manifest is usually named for the repo, not the',
|
|
217
217
|
' scope. The wizard offers the siblings’ scope as a default.',
|
|
@@ -233,8 +233,8 @@ export const INIT_HELP: readonly string[] = [
|
|
|
233
233
|
' (default: <project-id>-<grammar-id>).',
|
|
234
234
|
' --diagram Scaffold a GLSP diagram for that grammar. Requires',
|
|
235
235
|
' `glsp` in --heads. Derived when there is exactly one',
|
|
236
|
-
' grammar; required when there are several, because
|
|
237
|
-
' diagram
|
|
236
|
+
' grammar; required when there are several, because the',
|
|
237
|
+
' scaffolded diagram is typed over one grammar’s model.',
|
|
238
238
|
'',
|
|
239
239
|
'Example — three grammars, one with a differing extension, three heads:',
|
|
240
240
|
' hydranium-cli init ./order-flow --name OrderFlow --heads lsp,data,glsp \\',
|