@parall/cli 1.74.0 → 1.76.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 (78) hide show
  1. package/dist/commands/approvals.d.ts.map +1 -1
  2. package/dist/commands/approvals.js +40 -13
  3. package/dist/commands/apps-action-local.d.ts +6 -1
  4. package/dist/commands/apps-action-local.d.ts.map +1 -1
  5. package/dist/commands/apps-action-local.js +11 -2
  6. package/dist/commands/apps-actions-sdk.generated.d.ts +1 -1
  7. package/dist/commands/apps-actions-sdk.generated.d.ts.map +1 -1
  8. package/dist/commands/apps-actions-sdk.generated.js +1 -1
  9. package/dist/commands/apps-actions.d.ts.map +1 -1
  10. package/dist/commands/apps-actions.js +13 -15
  11. package/dist/commands/apps-add.d.ts +6 -0
  12. package/dist/commands/apps-add.d.ts.map +1 -0
  13. package/dist/commands/apps-add.js +93 -0
  14. package/dist/commands/apps-args.d.ts +22 -0
  15. package/dist/commands/apps-args.d.ts.map +1 -0
  16. package/dist/commands/apps-args.js +62 -0
  17. package/dist/commands/apps-blocks.d.ts +96 -0
  18. package/dist/commands/apps-blocks.d.ts.map +1 -0
  19. package/dist/commands/apps-blocks.js +196 -0
  20. package/dist/commands/apps-check.d.ts.map +1 -1
  21. package/dist/commands/apps-check.js +8 -3
  22. package/dist/commands/apps-db.d.ts +3 -1
  23. package/dist/commands/apps-db.d.ts.map +1 -1
  24. package/dist/commands/apps-db.js +4 -7
  25. package/dist/commands/apps-dev-server.d.ts +3 -0
  26. package/dist/commands/apps-dev-server.d.ts.map +1 -1
  27. package/dist/commands/apps-dev-server.js +4 -0
  28. package/dist/commands/apps-dev-vars.d.ts +38 -0
  29. package/dist/commands/apps-dev-vars.d.ts.map +1 -0
  30. package/dist/commands/apps-dev-vars.js +107 -0
  31. package/dist/commands/apps-dev.d.ts.map +1 -1
  32. package/dist/commands/apps-dev.js +2 -1
  33. package/dist/commands/apps-local-runner.generated.d.ts +2 -1
  34. package/dist/commands/apps-local-runner.generated.d.ts.map +1 -1
  35. package/dist/commands/apps-local-runner.generated.js +2 -1
  36. package/dist/commands/apps-publish.d.ts +3 -1
  37. package/dist/commands/apps-publish.d.ts.map +1 -1
  38. package/dist/commands/apps-publish.js +27 -23
  39. package/dist/commands/apps-scaffold-actions.d.ts +4 -9
  40. package/dist/commands/apps-scaffold-actions.d.ts.map +1 -1
  41. package/dist/commands/apps-scaffold-actions.js +4 -163
  42. package/dist/commands/apps-scaffold.d.ts +5 -4
  43. package/dist/commands/apps-scaffold.d.ts.map +1 -1
  44. package/dist/commands/apps-scaffold.js +24 -144
  45. package/dist/commands/apps-template.d.ts +15 -0
  46. package/dist/commands/apps-template.d.ts.map +1 -0
  47. package/dist/commands/apps-template.js +105 -0
  48. package/dist/commands/apps-templates.gen.d.ts +5 -0
  49. package/dist/commands/apps-templates.gen.d.ts.map +1 -0
  50. package/dist/commands/apps-templates.gen.js +540 -0
  51. package/dist/commands/apps.d.ts +5 -4
  52. package/dist/commands/apps.d.ts.map +1 -1
  53. package/dist/commands/apps.js +42 -44
  54. package/dist/commands/comments.d.ts.map +1 -1
  55. package/dist/commands/comments.js +3 -2
  56. package/dist/commands/db-plane.d.ts +5 -14
  57. package/dist/commands/db-plane.d.ts.map +1 -1
  58. package/dist/commands/db-plane.js +63 -32
  59. package/dist/commands/db-target.d.ts +22 -0
  60. package/dist/commands/db-target.d.ts.map +1 -0
  61. package/dist/commands/db-target.js +43 -0
  62. package/dist/commands/dbs.d.ts +3 -6
  63. package/dist/commands/dbs.d.ts.map +1 -1
  64. package/dist/commands/dbs.js +28 -34
  65. package/dist/commands/secrets.d.ts +3 -0
  66. package/dist/commands/secrets.d.ts.map +1 -0
  67. package/dist/commands/secrets.js +66 -0
  68. package/dist/index.js +18 -2
  69. package/dist/lib/approvers.d.ts +12 -0
  70. package/dist/lib/approvers.d.ts.map +1 -0
  71. package/dist/lib/approvers.js +48 -0
  72. package/dist/lib/output.d.ts +30 -0
  73. package/dist/lib/output.d.ts.map +1 -1
  74. package/dist/lib/output.js +99 -6
  75. package/dist/lib/update-check.d.ts +4 -0
  76. package/dist/lib/update-check.d.ts.map +1 -1
  77. package/dist/lib/update-check.js +3 -1
  78. package/package.json +25 -5
@@ -0,0 +1,62 @@
1
+ import { stripPrllScheme } from '../lib/output.js';
2
+ /** How the Mini App commands take their app and their output path. Agents
3
+ * reach for both spellings of each — publish and rollback name the app
4
+ * with --app while the other commands take it as the first argument, and
5
+ * --out / --output are both common — so each command accepts either form,
6
+ * and both when they agree. publish is the exception: its argument is the
7
+ * build directory, so its app stays --app. The forms each command
8
+ * documented first keep working unchanged. */
9
+ /** Adds the app as an optional first argument and as --app. */
10
+ export function withApp(cmd) {
11
+ return cmd
12
+ .argument('[appId]', 'App ID (app_… or prll://app_…); or pass --app')
13
+ .option('--app <appId>', 'App ID, in place of the argument');
14
+ }
15
+ function clean(value) {
16
+ const id = value === undefined ? '' : stripPrllScheme(value.trim());
17
+ return id === '' ? undefined : id;
18
+ }
19
+ const NAME_THE_APP = 'Name the app: as the first argument (app_… or prll://app_…) or with --app';
20
+ /** The app a command names, as the argument or --app. */
21
+ export function appIdFrom(positional, flag) {
22
+ const arg = clean(positional);
23
+ const opt = clean(flag);
24
+ if (arg && opt && arg !== opt) {
25
+ throw new Error(`Name the app once: the argument says ${arg}, --app says ${opt}`);
26
+ }
27
+ const id = arg ?? opt;
28
+ if (!id)
29
+ throw new Error(NAME_THE_APP);
30
+ return id;
31
+ }
32
+ /** The app and the argument after it (`authors add <app> <user>`, `action
33
+ * run <app> <name>`). With --app, a lone argument is the second one — even
34
+ * when it reads like the app: an action may be named like its app's ID. */
35
+ export function appAndArg(first, second, flag, what) {
36
+ const opt = clean(flag);
37
+ if (!opt) {
38
+ const app = clean(first);
39
+ if (!app)
40
+ throw new Error(NAME_THE_APP);
41
+ if (second === undefined || second === '')
42
+ throw new Error(`Pass the ${what} after the app`);
43
+ return [app, second];
44
+ }
45
+ if (second !== undefined) {
46
+ // Two arguments: the first is the app, and must be the same one.
47
+ if (clean(first) !== opt) {
48
+ throw new Error(`Name the app once: the argument says ${clean(first)}, --app says ${opt}`);
49
+ }
50
+ return [opt, second];
51
+ }
52
+ if (first === undefined || first === '')
53
+ throw new Error(`Pass the ${what}`);
54
+ return [opt, first];
55
+ }
56
+ /** --out and --output name the same path. */
57
+ export function outputPath(opts) {
58
+ if (opts.out !== undefined && opts.output !== undefined && opts.out !== opts.output) {
59
+ throw new Error('Pass --out or --output, not both');
60
+ }
61
+ return opts.out ?? opts.output;
62
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * The @parall blocks `parall app add` installs: ready-made pages wired end
3
+ * to end — page components, an actions file, schema SQL and manifest
4
+ * declarations. Each block is a shadcn registry item (registry-item.json
5
+ * format, files inlined) shipped inside the CLI, so installing one needs no
6
+ * network and matches the CLI's version. What shadcn has no field for — the
7
+ * manifest declarations, where the page and actions plug in, the SQL file —
8
+ * rides in meta.parall.
9
+ */
10
+ export interface RegistryFile {
11
+ path: string;
12
+ type: string;
13
+ target: string;
14
+ content: string;
15
+ }
16
+ export interface ParallBlockMeta {
17
+ /** The page entry: an import line and the expression added to the pages
18
+ * list in src/pages.tsx. */
19
+ page: {
20
+ import: string;
21
+ entry: string;
22
+ };
23
+ /** The actions entry: an import line and the spread added to
24
+ * defineActions in actions/index.ts. */
25
+ actions: {
26
+ import: string;
27
+ entry: string;
28
+ };
29
+ /** Merged into public/manifest.json actions.functions. */
30
+ functions: Record<string, unknown>;
31
+ /** The schema file to apply with `parall app db exec --file`. */
32
+ sql: string;
33
+ }
34
+ export interface RegistryItem {
35
+ $schema?: string;
36
+ name: string;
37
+ type: string;
38
+ title: string;
39
+ description: string;
40
+ author?: string;
41
+ /** npm packages, pinned as name@version. */
42
+ dependencies?: string[];
43
+ registryDependencies?: string[];
44
+ files: RegistryFile[];
45
+ docs?: string;
46
+ meta: {
47
+ parall: ParallBlockMeta;
48
+ };
49
+ }
50
+ export declare function findBlock(name: string): RegistryItem | undefined;
51
+ export declare function blockNames(): string[];
52
+ /** What `parall app add --list` prints. */
53
+ export declare function listBlocks(): {
54
+ name: string;
55
+ title: string;
56
+ description: string;
57
+ actions: string[];
58
+ dependencies: string[];
59
+ files: string[];
60
+ }[];
61
+ export interface BlockPlan {
62
+ block: string;
63
+ dir: string;
64
+ files: Array<{
65
+ path: string;
66
+ content: string;
67
+ state: 'create' | 'overwrite' | 'unchanged';
68
+ }>;
69
+ /** Files that exist with other content (refused without --force). */
70
+ conflicts: string[];
71
+ dependencies: {
72
+ added: Record<string, string>;
73
+ kept: Record<string, string>;
74
+ };
75
+ actions: {
76
+ added: string[];
77
+ unchanged: string[];
78
+ conflicts: string[];
79
+ };
80
+ /** Rewritten files: the manifest, package.json and the two plug-in points. */
81
+ edits: Array<{
82
+ path: string;
83
+ content: string;
84
+ }>;
85
+ /** Steps left to the author when a plug-in marker is missing. */
86
+ manual: string[];
87
+ sql: string;
88
+ }
89
+ /** Plans adding a block to the project in dir without writing anything. */
90
+ export declare function planBlock(dir: string, block: RegistryItem, options?: {
91
+ force?: boolean;
92
+ }): Promise<BlockPlan>;
93
+ /** Writes a plan; refuses one with conflicts. */
94
+ export declare function applyBlock(plan: BlockPlan): Promise<void>;
95
+ export declare function conflictMessage(plan: BlockPlan): string;
96
+ //# sourceMappingURL=apps-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps-blocks.d.ts","sourceRoot":"","sources":["../../src/commands/apps-blocks.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B;gCAC4B;IAC5B,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC;4CACwC;IACxC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QAAE,MAAM,EAAE,eAAe,CAAA;KAAE,CAAC;CACnC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEhE;AAED,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED,2CAA2C;AAC3C,wBAAgB,UAAU;;;;;;;IASzB;AAsBD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAA;KAAE,CAAC,CAAC;IAC7F,qEAAqE;IACrE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IAC9E,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvE,8EAA8E;IAC9E,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,iEAAiE;IACjE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb;AAWD,2EAA2E;AAC3E,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,OAAO,CAAC,SAAS,CAAC,CAmGpB;AAkCD,iDAAiD;AACjD,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAWvD"}
@@ -0,0 +1,196 @@
1
+ import { promises as fs } from 'node:fs';
2
+ import { dirname, join, resolve, sep } from 'node:path';
3
+ import { sortKeys } from './apps-template.js';
4
+ import { TEMPLATE_BLOCKS } from './apps-templates.gen.js';
5
+ export function findBlock(name) {
6
+ return TEMPLATE_BLOCKS.find((block) => block.name === name);
7
+ }
8
+ export function blockNames() {
9
+ return TEMPLATE_BLOCKS.map((block) => block.name);
10
+ }
11
+ /** What `parall app add --list` prints. */
12
+ export function listBlocks() {
13
+ return TEMPLATE_BLOCKS.map((block) => ({
14
+ name: block.name,
15
+ title: block.title,
16
+ description: block.description,
17
+ actions: Object.keys(block.meta.parall.functions),
18
+ dependencies: block.dependencies ?? [],
19
+ files: block.files.map((file) => file.target),
20
+ }));
21
+ }
22
+ // What a project must have for a block to plug in: the --actions scaffold
23
+ // with its shell, hooks and UI primitives.
24
+ const REQUIRED = [
25
+ 'package.json',
26
+ 'public/manifest.json',
27
+ 'actions/index.ts',
28
+ 'actions/people.ts',
29
+ 'src/pages.tsx',
30
+ 'src/hooks/use-action.ts',
31
+ 'src/hooks/use-people.ts',
32
+ 'src/components/ui/button.tsx',
33
+ ];
34
+ const MARKERS = {
35
+ pageImports: '// parall:page-imports',
36
+ pages: '// parall:pages',
37
+ actionImports: '// parall:action-imports',
38
+ actions: '// parall:actions',
39
+ };
40
+ async function readIfExists(path) {
41
+ try {
42
+ return await fs.readFile(path, 'utf8');
43
+ }
44
+ catch (err) {
45
+ if (err.code === 'ENOENT')
46
+ return undefined;
47
+ throw err;
48
+ }
49
+ }
50
+ /** Plans adding a block to the project in dir without writing anything. */
51
+ export async function planBlock(dir, block, options = {}) {
52
+ const root = resolve(dir);
53
+ const missing = [];
54
+ for (const path of REQUIRED) {
55
+ if ((await readIfExists(join(root, path))) === undefined)
56
+ missing.push(path);
57
+ }
58
+ if (missing.length > 0) {
59
+ throw new Error(`${root} is not a Mini App project with actions (missing ${missing.join(', ')}). Blocks plug into the scaffold of \`parall app init <dir> --actions\`.`);
60
+ }
61
+ const meta = block.meta.parall;
62
+ const plan = {
63
+ block: block.name,
64
+ dir: root,
65
+ files: [],
66
+ conflicts: [],
67
+ dependencies: { added: {}, kept: {} },
68
+ actions: { added: [], unchanged: [], conflicts: [] },
69
+ edits: [],
70
+ manual: [],
71
+ sql: meta.sql,
72
+ };
73
+ for (const file of block.files) {
74
+ const target = join(root, file.target);
75
+ if (!target.startsWith(root + sep))
76
+ throw new Error(`block file escapes the project: ${file.target}`);
77
+ const current = await readIfExists(target);
78
+ if (current === undefined) {
79
+ plan.files.push({ path: file.target, content: file.content, state: 'create' });
80
+ }
81
+ else if (current === file.content) {
82
+ plan.files.push({ path: file.target, content: file.content, state: 'unchanged' });
83
+ }
84
+ else {
85
+ plan.files.push({ path: file.target, content: file.content, state: 'overwrite' });
86
+ if (!options.force)
87
+ plan.conflicts.push(file.target);
88
+ }
89
+ }
90
+ // public/manifest.json: declare the block's actions.
91
+ const manifestPath = 'public/manifest.json';
92
+ const manifest = JSON.parse((await readIfExists(join(root, manifestPath))) ?? '{}');
93
+ if (!manifest.actions || typeof manifest.actions !== 'object') {
94
+ throw new Error(`${manifestPath} declares no actions; blocks plug into the scaffold of \`parall app init <dir> --actions\``);
95
+ }
96
+ manifest.actions.functions ??= {};
97
+ for (const [name, declaration] of Object.entries(meta.functions)) {
98
+ const current = manifest.actions.functions[name];
99
+ if (current === undefined) {
100
+ plan.actions.added.push(name);
101
+ }
102
+ else if (JSON.stringify(current) === JSON.stringify(declaration)) {
103
+ plan.actions.unchanged.push(name);
104
+ continue;
105
+ }
106
+ else if (!options.force) {
107
+ plan.actions.conflicts.push(name);
108
+ continue;
109
+ }
110
+ else {
111
+ plan.actions.added.push(name);
112
+ }
113
+ manifest.actions.functions[name] = declaration;
114
+ }
115
+ if (plan.actions.added.length > 0) {
116
+ plan.edits.push({ path: manifestPath, content: `${JSON.stringify(manifest, null, 2)}\n` });
117
+ }
118
+ // package.json: add the block's packages at its pinned versions; a
119
+ // package the project already has keeps its version.
120
+ const pkg = JSON.parse((await readIfExists(join(root, 'package.json'))) ?? '{}');
121
+ pkg.dependencies ??= {};
122
+ for (const spec of block.dependencies ?? []) {
123
+ const at = spec.lastIndexOf('@');
124
+ const name = at > 0 ? spec.slice(0, at) : spec;
125
+ const version = at > 0 ? spec.slice(at + 1) : 'latest';
126
+ const have = pkg.dependencies[name] ?? pkg.devDependencies?.[name];
127
+ if (have === undefined) {
128
+ pkg.dependencies[name] = version;
129
+ plan.dependencies.added[name] = version;
130
+ }
131
+ else if (have !== version) {
132
+ plan.dependencies.kept[name] = have;
133
+ }
134
+ }
135
+ if (Object.keys(plan.dependencies.added).length > 0) {
136
+ pkg.dependencies = sortKeys(pkg.dependencies);
137
+ plan.edits.push({ path: 'package.json', content: `${JSON.stringify(pkg, null, 2)}\n` });
138
+ }
139
+ // The two plug-in points.
140
+ await plugIn(plan, root, 'actions/index.ts', meta.actions, MARKERS.actionImports, MARKERS.actions);
141
+ await plugIn(plan, root, 'src/pages.tsx', meta.page, MARKERS.pageImports, MARKERS.pages);
142
+ return plan;
143
+ }
144
+ /** Adds an import above importMarker and an entry above entryMarker, unless
145
+ * already there. Without the markers it leaves the file alone and records a
146
+ * manual step. */
147
+ async function plugIn(plan, root, path, spec, importMarker, entryMarker) {
148
+ const source = (await readIfExists(join(root, path))) ?? '';
149
+ const lines = source.split('\n');
150
+ const hasImport = lines.some((line) => line.trim() === spec.import);
151
+ const hasEntry = lines.some((line) => line.trim().replace(/,$/, '') === spec.entry);
152
+ if (hasImport && hasEntry)
153
+ return;
154
+ const importAt = lines.findIndex((line) => line.trim().startsWith(importMarker));
155
+ const entryAt = lines.findIndex((line) => line.trim().startsWith(entryMarker));
156
+ if (importAt === -1 || entryAt === -1) {
157
+ plan.manual.push(`${path}: add \`${spec.import}\` and \`${spec.entry},\``);
158
+ return;
159
+ }
160
+ const indent = lines[entryAt]?.match(/^\s*/)?.[0] ?? '';
161
+ // Insert the later marker first so the earlier index stays valid.
162
+ const inserts = [];
163
+ if (!hasImport)
164
+ inserts.push([importAt, spec.import]);
165
+ if (!hasEntry)
166
+ inserts.push([entryAt, `${indent}${spec.entry},`]);
167
+ inserts.sort(([a], [b]) => b - a);
168
+ for (const [at, line] of inserts)
169
+ lines.splice(at, 0, line);
170
+ plan.edits.push({ path, content: lines.join('\n') });
171
+ }
172
+ /** Writes a plan; refuses one with conflicts. */
173
+ export async function applyBlock(plan) {
174
+ if (plan.conflicts.length > 0 || plan.actions.conflicts.length > 0) {
175
+ throw new Error(conflictMessage(plan));
176
+ }
177
+ for (const file of plan.files) {
178
+ if (file.state === 'unchanged')
179
+ continue;
180
+ const target = join(plan.dir, file.path);
181
+ await fs.mkdir(dirname(target), { recursive: true });
182
+ await fs.writeFile(target, file.content);
183
+ }
184
+ for (const edit of plan.edits)
185
+ await fs.writeFile(join(plan.dir, edit.path), edit.content);
186
+ }
187
+ export function conflictMessage(plan) {
188
+ const parts = [];
189
+ if (plan.conflicts.length > 0) {
190
+ parts.push(`these files exist with other content: ${plan.conflicts.join(', ')}`);
191
+ }
192
+ if (plan.actions.conflicts.length > 0) {
193
+ parts.push(`public/manifest.json declares these actions differently: ${plan.actions.conflicts.join(', ')}`);
194
+ }
195
+ return `cannot add ${plan.block}: ${parts.join('; ')}. Nothing was written; rerun with --force to overwrite them.`;
196
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"apps-check.d.ts","sourceRoot":"","sources":["../../src/commands/apps-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC;;;;;4BAK4B;AAC5B,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,QAYnD;AAED,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAWD;;+EAE+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBrE;AAED;cACc;AACd,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAkDjF;AAED;;gDAEgD;AAChD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAWtD"}
1
+ {"version":3,"file":"apps-check.d.ts","sourceRoot":"","sources":["../../src/commands/apps-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC;;;;;4BAK4B;AAC5B,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,QAsBnD;AAED,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAWD;;+EAE+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBrE;AAED;cACc;AACd,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAkDjF;AAED;;gDAEgD;AAChD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAWtD"}
@@ -14,10 +14,15 @@ export function registerAppCheckCommand(app) {
14
14
  app
15
15
  .command('check')
16
16
  .description("Check a built bundle's action module against its manifest")
17
- .argument('[dir]', 'The built bundle directory', 'dist')
18
- .action(async (dir) => {
17
+ .argument('[dir]', 'The built bundle directory (default: dist)')
18
+ .option('--dist <dir>', 'The built bundle directory, in place of the argument')
19
+ .option('--app <appId>', 'Not needed: the check reads only the local build (accepted so a publish command line works here)')
20
+ .action(async (dir, opts) => {
19
21
  try {
20
- printJson({ ok: true, ...(await checkActions(resolve(dir))) });
22
+ if (dir !== undefined && opts.dist !== undefined && resolve(dir) !== resolve(opts.dist)) {
23
+ throw new Error(`Name the build once: the argument says ${dir}, --dist says ${opts.dist}`);
24
+ }
25
+ printJson({ ok: true, ...(await checkActions(resolve(dir ?? opts.dist ?? 'dist'))) });
21
26
  }
22
27
  catch (err) {
23
28
  printError(err);
@@ -3,6 +3,8 @@ export { parseParams } from './db-plane.js';
3
3
  /** `parall app db …`: the app alias of the data plane — the same operations
4
4
  * as `parall db …` on the app's Database, with the app recorded on every
5
5
  * log row; the same construction-surface rule applies (attached-app author
6
- * or org owner/admin). Writes through an archived app are refused. */
6
+ * or org owner/admin). Writes through an archived app are refused. Both
7
+ * groups take the same target forms (db-target.ts): an app given here runs
8
+ * through the app, a Database ID or name on the Database. */
7
9
  export declare function registerAppDBCommands(app: Command): void;
8
10
  //# sourceMappingURL=apps-db.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apps-db.d.ts","sourceRoot":"","sources":["../../src/commands/apps-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;sEAGsE;AACtE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,QASjD"}
1
+ {"version":3,"file":"apps-db.d.ts","sourceRoot":"","sources":["../../src/commands/apps-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;6DAK6D;AAC7D,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,QAKjD"}
@@ -1,17 +1,14 @@
1
- import { stripPrllScheme } from '../lib/output.js';
2
1
  import { registerDataPlaneCommands } from './db-plane.js';
3
2
  export { parseParams } from './db-plane.js';
4
3
  /** `parall app db …`: the app alias of the data plane — the same operations
5
4
  * as `parall db …` on the app's Database, with the app recorded on every
6
5
  * log row; the same construction-surface rule applies (attached-app author
7
- * or org owner/admin). Writes through an archived app are refused. */
6
+ * or org owner/admin). Writes through an archived app are refused. Both
7
+ * groups take the same target forms (db-target.ts): an app given here runs
8
+ * through the app, a Database ID or name on the Database. */
8
9
  export function registerAppDBCommands(app) {
9
10
  const db = app
10
11
  .command('db')
11
12
  .description("Query and change an app's Database (alias of `parall db`)");
12
- registerDataPlaneCommands(db, {
13
- flag: '--app <appId>',
14
- flagHelp: 'App ID (app_… or prll://app_…)',
15
- resolve: async (_ctx, opts) => ({ kind: 'app', id: stripPrllScheme(opts.app ?? '') }),
16
- });
13
+ registerDataPlaneCommands(db, { primary: 'app' });
17
14
  }
@@ -29,6 +29,9 @@ export interface DevCallAnswer {
29
29
  };
30
30
  duration_ms: number;
31
31
  }
32
+ /** Printed when `parall app dev` starts: it is a server, and an agent that
33
+ * waits for it to return waits until its tool gives up. */
34
+ export declare const DEV_LONG_RUNNING_HINT = " This keeps running until stopped: from a script or an agent, start it in the background (parall app dev \u2026 > dev.log 2>&1 &). To check one action, parall app action run <app> <name> --local runs it and returns.";
32
35
  export declare function serveAppDev(dist: string, port: number, appId: string): Promise<void>;
33
36
  /** The deployment's files-worker origin, the one outside source the
34
37
  * apps-worker lets a page load images from (attachment images the platform
@@ -1 +1 @@
1
- {"version":3,"file":"apps-dev-server.d.ts","sourceRoot":"","sources":["../../src/commands/apps-dev-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAK/D;;;;;;;;;mCASmC;AAEnC,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAC7E,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB;AAKD,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoF1F;AAED;;;;mEAImE;AACnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQrD;AAcD;iDACiD;AACjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9E"}
1
+ {"version":3,"file":"apps-dev-server.d.ts","sourceRoot":"","sources":["../../src/commands/apps-dev-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAK/D;;;;;;;;;mCASmC;AAEnC,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAC7E,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB;AAKD;2DAC2D;AAC3D,eAAO,MAAM,qBAAqB,6NACqL,CAAC;AAExN,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqF1F;AAED;;;;mEAImE;AACnE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQrD;AAcD;iDACiD;AACjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9E"}
@@ -8,6 +8,9 @@ import { readLocalAction, runLocalAction } from './apps-action-local.js';
8
8
  import { devAppHostPage } from './apps-dev-page.js';
9
9
  const MAX_BODY_BYTES = 1 << 20;
10
10
  const MAX_CONSOLE_CHARS = 8000;
11
+ /** Printed when `parall app dev` starts: it is a server, and an agent that
12
+ * waits for it to return waits until its tool gives up. */
13
+ export const DEV_LONG_RUNNING_HINT = ' This keeps running until stopped: from a script or an agent, start it in the background (parall app dev … > dev.log 2>&1 &). To check one action, parall app action run <app> <name> --local runs it and returns.';
11
14
  export async function serveAppDev(dist, port, appId) {
12
15
  const { client, orgId } = resolveCredentials();
13
16
  const apiUrl = process.env.PRLL_API_URL ?? '';
@@ -87,6 +90,7 @@ export async function serveAppDev(dist, port, appId) {
87
90
  console.error(`Mini App dev host: http://127.0.0.1:${port}/?t=${token}`);
88
91
  console.error(` ${app.name} (${app.id}) from ${dist}, page on http://127.0.0.1:${appPort}`);
89
92
  console.error(" Actions run on this machine against the app's real Database: writes are real. Ctrl-C to stop.");
93
+ console.error(DEV_LONG_RUNNING_HINT);
90
94
  }
91
95
  /** The deployment's files-worker origin, the one outside source the
92
96
  * apps-worker lets a page load images from (attachment images the platform
@@ -0,0 +1,38 @@
1
+ /** The project's `.dev.vars` — Workers' convention for secrets in local
2
+ * development — read for a local run (`parall app action run --local`,
3
+ * `parall app dev --app`): its values are the action's `ctx.env` there, as
4
+ * the app's secrets are in a deployed run
5
+ * (docs/engineering-design/mini-app-network-design.md §7.6). The server
6
+ * never sends secret values back, so this file is the local copy; it stays
7
+ * on this machine (the scaffold's .gitignore lists it) and its values are
8
+ * never printed.
9
+ *
10
+ * The platform's rules for a secret apply, so what runs locally can run
11
+ * deployed: names `^[A-Z_][A-Z0-9_]{0,127}$`, values trimmed, non-empty,
12
+ * without NUL, at most 8 KiB each and 64 KiB in all. A line the platform
13
+ * could never hold is skipped with a warning that gives its number, never
14
+ * its text; a value over a size limit stops the run. */
15
+ export declare const DEV_VARS_FILE = ".dev.vars";
16
+ /** One assignment: its value as dotenv reads it, and the line it starts on. */
17
+ export interface DevVar {
18
+ value: string;
19
+ line: number;
20
+ }
21
+ export interface ParsedDevVars {
22
+ /** The assignments, later ones winning. */
23
+ vars: Map<string, DevVar>;
24
+ /** Lines with an `=` that hold no assignment (`API KEY=…`): neither blank,
25
+ * a comment, nor part of an assignment's quoted value. */
26
+ unread: number[];
27
+ }
28
+ /** parseDevVars reads a .dev.vars file in dotenv's format. */
29
+ export declare function parseDevVars(text: string): ParsedDevVars;
30
+ export interface DevVars {
31
+ /** What ctx.env gets. */
32
+ env: Record<string, string>;
33
+ /** The lines skipped, in order: each one's number and why. */
34
+ skipped: string[];
35
+ }
36
+ /** readDevVars reads projectDir's .dev.vars; no file, no secrets. */
37
+ export declare function readDevVars(projectDir: string): Promise<DevVars>;
38
+ //# sourceMappingURL=apps-dev-vars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps-dev-vars.d.ts","sourceRoot":"","sources":["../../src/commands/apps-dev-vars.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;wDAawD;AAExD,eAAO,MAAM,aAAa,cAAc,CAAC;AAezC,+EAA+E;AAC/E,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B;8DAC0D;IAC1D,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAiCxD;AAED,MAAM,WAAW,OAAO;IACtB,yBAAyB;IACzB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qEAAqE;AACrE,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA8CtE"}
@@ -0,0 +1,107 @@
1
+ import { promises as fs } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ /** The project's `.dev.vars` — Workers' convention for secrets in local
4
+ * development — read for a local run (`parall app action run --local`,
5
+ * `parall app dev --app`): its values are the action's `ctx.env` there, as
6
+ * the app's secrets are in a deployed run
7
+ * (docs/engineering-design/mini-app-network-design.md §7.6). The server
8
+ * never sends secret values back, so this file is the local copy; it stays
9
+ * on this machine (the scaffold's .gitignore lists it) and its values are
10
+ * never printed.
11
+ *
12
+ * The platform's rules for a secret apply, so what runs locally can run
13
+ * deployed: names `^[A-Z_][A-Z0-9_]{0,127}$`, values trimmed, non-empty,
14
+ * without NUL, at most 8 KiB each and 64 KiB in all. A line the platform
15
+ * could never hold is skipped with a warning that gives its number, never
16
+ * its text; a value over a size limit stops the run. */
17
+ export const DEV_VARS_FILE = '.dev.vars';
18
+ const NAME = /^[A-Z_][A-Z0-9_]{0,127}$/;
19
+ const NAME_RULE = 'secret names are A–Z, 0–9 and _, not starting with a digit';
20
+ const VALUE_MAX_BYTES = 8 * 1024;
21
+ const TOTAL_MAX_BYTES = 64 * 1024;
22
+ // One assignment as dotenv reads it: optional `export`, a name, `=`, and a
23
+ // single-, double- or backtick-quoted value (which may span lines) or an
24
+ // unquoted one up to a `#` comment. The name is whatever stands before the
25
+ // `=`, so one the platform could never hold (`API@KEY=…`) is still read, and
26
+ // then skipped with a warning.
27
+ const LINE = /^[ \t]*(?:export[ \t]+)?([^\s=#]+)[ \t]*=[ \t]*('(?:\\'|[^'])*'|"(?:\\"|[^"])*"|`(?:\\`|[^`])*`|[^#\n]*)[ \t]*(?:#[^\n]*)?$/gm;
28
+ /** parseDevVars reads a .dev.vars file in dotenv's format. */
29
+ export function parseDevVars(text) {
30
+ const vars = new Map();
31
+ const normalized = text.replace(/\r\n?/g, '\n');
32
+ const read = new Set();
33
+ let line = 1;
34
+ let scanned = 0;
35
+ for (const m of normalized.matchAll(LINE)) {
36
+ const [whole, name, raw] = m;
37
+ for (; scanned < m.index; scanned++)
38
+ if (normalized[scanned] === '\n')
39
+ line++;
40
+ // A quoted value may span lines; every line it covers is read.
41
+ const last = line + whole.split('\n').length - 1;
42
+ for (let l = line; l <= last; l++)
43
+ read.add(l);
44
+ let value = raw.trim();
45
+ const quote = value[0];
46
+ if (value.length >= 2 &&
47
+ (quote === '"' || quote === "'" || quote === '`') &&
48
+ value.endsWith(quote)) {
49
+ value = value.slice(1, -1);
50
+ if (quote === '"') {
51
+ value = value.replace(/\\([nrt"\\])/g, (_, c) => c === 'n' ? '\n' : c === 'r' ? '\r' : c === 't' ? '\t' : c);
52
+ }
53
+ }
54
+ vars.set(name, { value, line });
55
+ }
56
+ const unread = normalized.split('\n').flatMap((row, i) => {
57
+ const t = row.trim();
58
+ return read.has(i + 1) || !t.includes('=') || t.startsWith('#') ? [] : [i + 1];
59
+ });
60
+ return { vars, unread };
61
+ }
62
+ /** readDevVars reads projectDir's .dev.vars; no file, no secrets. */
63
+ export async function readDevVars(projectDir) {
64
+ let text;
65
+ try {
66
+ text = await fs.readFile(join(projectDir, DEV_VARS_FILE), 'utf8');
67
+ }
68
+ catch (err) {
69
+ if (err.code === 'ENOENT')
70
+ return { env: {}, skipped: [] };
71
+ throw err;
72
+ }
73
+ const env = {};
74
+ const { vars, unread } = parseDevVars(text);
75
+ // A warning gives the line, never its text: what stands before an `=` may
76
+ // be part of a value written across lines (`API_KEY=`, then `abcDEF12345==`
77
+ // on the next), whatever it looks like.
78
+ const skips = unread.map((line) => [line, `not an assignment; ${NAME_RULE}`]);
79
+ let total = 0;
80
+ for (const [name, { value: raw, line }] of vars) {
81
+ if (!NAME.test(name)) {
82
+ skips.push([line, NAME_RULE]);
83
+ continue;
84
+ }
85
+ const value = raw.trim();
86
+ if (value === '' || value.includes('\0')) {
87
+ skips.push([line, 'the value is empty or contains NUL']);
88
+ continue;
89
+ }
90
+ const bytes = Buffer.byteLength(value, 'utf8');
91
+ if (bytes > VALUE_MAX_BYTES) {
92
+ throw new Error(`${DEV_VARS_FILE}: ${name} is ${bytes} bytes; a secret may be at most ${VALUE_MAX_BYTES}`);
93
+ }
94
+ total += Buffer.byteLength(name, 'utf8') + bytes;
95
+ Object.defineProperty(env, name, {
96
+ value,
97
+ enumerable: true,
98
+ writable: true,
99
+ configurable: true,
100
+ });
101
+ }
102
+ if (total > TOTAL_MAX_BYTES) {
103
+ throw new Error(`${DEV_VARS_FILE}: ${total} bytes in all; an app's secrets may be at most ${TOTAL_MAX_BYTES}`);
104
+ }
105
+ const skipped = skips.sort(([a], [b]) => a - b).map(([line, why]) => `line ${line} (${why})`);
106
+ return { env, skipped };
107
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"apps-dev.d.ts","sourceRoot":"","sources":["../../src/commands/apps-dev.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;sEAIsE;AACtE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,QAyCjD"}
1
+ {"version":3,"file":"apps-dev.d.ts","sourceRoot":"","sources":["../../src/commands/apps-dev.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;sEAIsE;AACtE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,QA0CjD"}
@@ -2,7 +2,7 @@ import { promises as fs } from 'node:fs';
2
2
  import { createServer } from 'node:http';
3
3
  import { extname, join, normalize, resolve, sep } from 'node:path';
4
4
  import { printError, stripPrllScheme } from '../lib/output.js';
5
- import { serveAppDev } from './apps-dev-server.js';
5
+ import { DEV_LONG_RUNNING_HINT, serveAppDev } from './apps-dev-server.js';
6
6
  /** `parall app dev`: a local host page speaking the same bridge as the
7
7
  * Parall hosts, for an author (often an agent with a headless browser) to
8
8
  * look at the built page before publishing. With --app the page also calls
@@ -40,6 +40,7 @@ export function registerAppDevCommand(app) {
40
40
  });
41
41
  console.error(`Mini App dev host: http://127.0.0.1:${port}/ (serving ${dist})`);
42
42
  console.error('The host page answers parall.ready() with a local dev viewer; Ctrl-C to stop.');
43
+ console.error(DEV_LONG_RUNNING_HINT);
43
44
  }
44
45
  catch (err) {
45
46
  printError(err);