@lunora/cli 1.0.0-alpha.57 → 1.0.0-alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +1 -1
- package/dist/index.d.mts +36 -10
- package/dist/index.d.ts +36 -10
- package/dist/index.mjs +7 -7
- package/dist/packem_chunks/handler.mjs +4 -4
- package/dist/packem_chunks/handler10.mjs +2 -2
- package/dist/packem_chunks/handler11.mjs +2 -2
- package/dist/packem_chunks/handler12.mjs +1 -1
- package/dist/packem_chunks/handler13.mjs +1 -1
- package/dist/packem_chunks/handler14.mjs +1 -1
- package/dist/packem_chunks/handler15.mjs +2 -2
- package/dist/packem_chunks/handler16.mjs +2 -2
- package/dist/packem_chunks/handler17.mjs +2 -2
- package/dist/packem_chunks/handler18.mjs +1 -1
- package/dist/packem_chunks/handler19.mjs +2 -2
- package/dist/packem_chunks/handler2.mjs +2 -2
- package/dist/packem_chunks/handler20.mjs +4 -4
- package/dist/packem_chunks/handler21.mjs +2 -2
- package/dist/packem_chunks/handler3.mjs +6 -3
- package/dist/packem_chunks/handler4.mjs +2 -2
- package/dist/packem_chunks/handler5.mjs +2 -2
- package/dist/packem_chunks/handler6.mjs +2 -2
- package/dist/packem_chunks/handler7.mjs +2 -2
- package/dist/packem_chunks/handler8.mjs +1 -1
- package/dist/packem_chunks/handler9.mjs +2 -2
- package/dist/packem_chunks/planDevCommand.mjs +498 -29
- package/dist/packem_chunks/runCodegenCommand.mjs +3 -3
- package/dist/packem_chunks/runDeployCommand.mjs +4 -4
- package/dist/packem_chunks/runInitCommand.mjs +5 -5
- package/dist/packem_chunks/runMigrateGenerateCommand.mjs +5 -4
- package/dist/packem_chunks/runResetCommand.mjs +1 -1
- package/dist/packem_chunks/runRpcCommand.mjs +3 -2
- package/dist/packem_shared/{COMMANDS-B0ftFD_3.mjs → COMMANDS-0BD3K1pb.mjs} +43 -3
- package/dist/packem_shared/{DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs → DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs} +3 -2
- package/dist/packem_shared/{api-spec-CtA6ilu4.mjs → api-spec-Bx0iKbxA.mjs} +3 -1
- package/dist/packem_shared/{buildRegistryIndex-BcYe607_.mjs → buildRegistryIndex-CqM5FwGI.mjs} +1 -1
- package/dist/packem_shared/{command-D3lB_4Az.mjs → command-lYnl4QyF.mjs} +1 -1
- package/dist/packem_shared/{commands-BK6Pt3Ni.mjs → commands-vnRRkhNE.mjs} +12 -9
- package/dist/packem_shared/{createLogger-B40gPzQo.mjs → createLogger-CIWSHrTL.mjs} +33 -6
- package/dist/packem_shared/{createRecordingSpawner-DxI3mebw.mjs → createRecordingSpawner-Cw5Iu73G.mjs} +12 -2
- package/dist/packem_shared/{open-url-Dfq6fAyT.mjs → open-url-4PBLY9X0.mjs} +3 -2
- package/dist/packem_shared/{output-format-wUvAN6AL.mjs → output-format-B4642rjE.mjs} +1 -1
- package/dist/packem_shared/{parseManifest--vZf2FY1.mjs → parseManifest-BBrXCg9V.mjs} +16 -9
- package/dist/packem_shared/runAddCommand-BCcJzs_k.mjs +4 -0
- package/dist/packem_shared/{storage-C8SAm5zu.mjs → storage-bGfgwOgF.mjs} +1 -1
- package/package.json +7 -6
- package/skills/lunora-quickstart/SKILL.md +25 -5
- package/dist/packem_shared/runAddCommand-DWjH0Heb.mjs +0 -4
package/dist/bin.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -49,6 +49,15 @@ interface PailLogger {
|
|
|
49
49
|
success: (message: string) => void;
|
|
50
50
|
warn: (message: string) => void;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Minimal reporter shape consumed by `createPail`. We re-declare it locally
|
|
54
|
+
* because `@visulima/pail`'s `reporter/*` entrypoints ship a packaging bug:
|
|
55
|
+
* their `index.d.ts` re-exports `./json-reporter.d.ts` / `./pretty-reporter.d.ts`,
|
|
56
|
+
* but the real declaration files are suffixed (`*.server.d.ts`). `tsc` tolerates
|
|
57
|
+
* the dangling re-export, but the type-aware linter resolves `JsonReporter` /
|
|
58
|
+
* `PrettyReporter` to an unresolved type. Constructing them through this typed
|
|
59
|
+
* factory keeps every call site safe.
|
|
60
|
+
*/
|
|
52
61
|
declare const createLogger: () => Logger;
|
|
53
62
|
/**
|
|
54
63
|
* Logger whose every channel writes to `process.stderr`. Used by commands in
|
|
@@ -442,6 +451,16 @@ interface StudioServerHandle {
|
|
|
442
451
|
/** The URL to open in a browser. */
|
|
443
452
|
url: string;
|
|
444
453
|
}
|
|
454
|
+
/**
|
|
455
|
+
* How the dev child runs. `wrangler` is the classic `lunora dev` stack
|
|
456
|
+
* (wrangler worker + embedded studio + codegen watch). `vite` is a project on
|
|
457
|
+
* `@lunora/vite`: the Vite plugin already runs the worker, studio, and codegen
|
|
458
|
+
* inside the Vite dev server, so `lunora dev` runs the project's own dev
|
|
459
|
+
* script and gets out of the way — that's what makes `--background` / `stop` /
|
|
460
|
+
* `status` / `logs` work uniformly for Vite projects too.
|
|
461
|
+
*/
|
|
462
|
+
type DevFlavor = "vite" | "wrangler";
|
|
463
|
+
/** Detect the dev flavor: a declared `@lunora/vite` dependency means Vite owns the dev server. */
|
|
445
464
|
/** A running worker child the orchestrator controls: send signals, await its exit. */
|
|
446
465
|
interface WorkerProcess {
|
|
447
466
|
/** Resolves with the worker's exit code (1 if it failed to start). */
|
|
@@ -464,6 +483,8 @@ interface DevCommandOptions {
|
|
|
464
483
|
ensureExample?: typeof ensureDevVarsExample;
|
|
465
484
|
/** Injection seam for tests — defaults to the real empty-secret/admin-token filler. */
|
|
466
485
|
fillSecrets?: typeof fillDevSecrets;
|
|
486
|
+
/** Dev flavor override (tests / callers that already detected it) — defaults to {@link detectDevFlavor}. */
|
|
487
|
+
flavor?: DevFlavor;
|
|
467
488
|
logger: Logger;
|
|
468
489
|
/** Injection seam for tests — defaults to the real remote-config materializer. */
|
|
469
490
|
materializeRemote?: typeof materializeRemoteWranglerConfig;
|
|
@@ -498,12 +519,16 @@ interface DevRemotePlan {
|
|
|
498
519
|
}
|
|
499
520
|
interface DevCommandPlan {
|
|
500
521
|
codegenEnabled: boolean;
|
|
522
|
+
/** Which stack the child runs — see {@link DevFlavor}. */
|
|
523
|
+
flavor: DevFlavor;
|
|
501
524
|
/**
|
|
502
|
-
* One-line redirect hint printed when a
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
525
|
+
* One-line redirect hint printed when a meta-framework is detected on the
|
|
526
|
+
* wrangler flavor: without `@lunora/vite` in the dependencies the worker
|
|
527
|
+
* still runs *inside* the framework's dev server, so the user should run
|
|
528
|
+
* their framework dev script for the full app. `undefined` for the vite
|
|
529
|
+
* flavor (`lunora dev` already runs the project's dev script there) and
|
|
530
|
+
* for a standalone project. Purely informational: the wrangler spawn runs
|
|
531
|
+
* regardless.
|
|
507
532
|
*/
|
|
508
533
|
frameworkHint?: string;
|
|
509
534
|
/** The remote-binding decision: which D1/KV/R2 bindings hit the deployed worker. */
|
|
@@ -512,7 +537,7 @@ interface DevCommandPlan {
|
|
|
512
537
|
studioPort: number;
|
|
513
538
|
workerOrigin: string;
|
|
514
539
|
workerPort: number;
|
|
515
|
-
/** The single child process `lunora dev` spawns: `wrangler dev
|
|
540
|
+
/** The single child process `lunora dev` spawns: `wrangler dev` (or `vite dev` for the vite flavor). */
|
|
516
541
|
wrangler: SpawnDescriptor & {
|
|
517
542
|
tag: string;
|
|
518
543
|
};
|
|
@@ -526,10 +551,11 @@ interface DevCommandPlan {
|
|
|
526
551
|
* to remote, the args stay empty and dev runs fully local.
|
|
527
552
|
*/
|
|
528
553
|
/**
|
|
529
|
-
* Plan `lunora dev
|
|
530
|
-
* child process. Vite
|
|
531
|
-
*
|
|
532
|
-
*
|
|
554
|
+
* Plan `lunora dev`. Wrangler flavor: the worker runs via `wrangler dev` and
|
|
555
|
+
* nothing else as a child process. Vite flavor (`@lunora/vite` declared): the
|
|
556
|
+
* plugin already runs the worker inside the Vite dev server, so the one child
|
|
557
|
+
* is the project's own dev script (`vite dev`, `astro dev`, …) and every CLI
|
|
558
|
+
* sibling is disabled. Pure + synchronous so it's unit-testable.
|
|
533
559
|
*/
|
|
534
560
|
declare const planDevCommand: (options: DevCommandOptions) => DevCommandPlan;
|
|
535
561
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,15 @@ interface PailLogger {
|
|
|
49
49
|
success: (message: string) => void;
|
|
50
50
|
warn: (message: string) => void;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Minimal reporter shape consumed by `createPail`. We re-declare it locally
|
|
54
|
+
* because `@visulima/pail`'s `reporter/*` entrypoints ship a packaging bug:
|
|
55
|
+
* their `index.d.ts` re-exports `./json-reporter.d.ts` / `./pretty-reporter.d.ts`,
|
|
56
|
+
* but the real declaration files are suffixed (`*.server.d.ts`). `tsc` tolerates
|
|
57
|
+
* the dangling re-export, but the type-aware linter resolves `JsonReporter` /
|
|
58
|
+
* `PrettyReporter` to an unresolved type. Constructing them through this typed
|
|
59
|
+
* factory keeps every call site safe.
|
|
60
|
+
*/
|
|
52
61
|
declare const createLogger: () => Logger;
|
|
53
62
|
/**
|
|
54
63
|
* Logger whose every channel writes to `process.stderr`. Used by commands in
|
|
@@ -442,6 +451,16 @@ interface StudioServerHandle {
|
|
|
442
451
|
/** The URL to open in a browser. */
|
|
443
452
|
url: string;
|
|
444
453
|
}
|
|
454
|
+
/**
|
|
455
|
+
* How the dev child runs. `wrangler` is the classic `lunora dev` stack
|
|
456
|
+
* (wrangler worker + embedded studio + codegen watch). `vite` is a project on
|
|
457
|
+
* `@lunora/vite`: the Vite plugin already runs the worker, studio, and codegen
|
|
458
|
+
* inside the Vite dev server, so `lunora dev` runs the project's own dev
|
|
459
|
+
* script and gets out of the way — that's what makes `--background` / `stop` /
|
|
460
|
+
* `status` / `logs` work uniformly for Vite projects too.
|
|
461
|
+
*/
|
|
462
|
+
type DevFlavor = "vite" | "wrangler";
|
|
463
|
+
/** Detect the dev flavor: a declared `@lunora/vite` dependency means Vite owns the dev server. */
|
|
445
464
|
/** A running worker child the orchestrator controls: send signals, await its exit. */
|
|
446
465
|
interface WorkerProcess {
|
|
447
466
|
/** Resolves with the worker's exit code (1 if it failed to start). */
|
|
@@ -464,6 +483,8 @@ interface DevCommandOptions {
|
|
|
464
483
|
ensureExample?: typeof ensureDevVarsExample;
|
|
465
484
|
/** Injection seam for tests — defaults to the real empty-secret/admin-token filler. */
|
|
466
485
|
fillSecrets?: typeof fillDevSecrets;
|
|
486
|
+
/** Dev flavor override (tests / callers that already detected it) — defaults to {@link detectDevFlavor}. */
|
|
487
|
+
flavor?: DevFlavor;
|
|
467
488
|
logger: Logger;
|
|
468
489
|
/** Injection seam for tests — defaults to the real remote-config materializer. */
|
|
469
490
|
materializeRemote?: typeof materializeRemoteWranglerConfig;
|
|
@@ -498,12 +519,16 @@ interface DevRemotePlan {
|
|
|
498
519
|
}
|
|
499
520
|
interface DevCommandPlan {
|
|
500
521
|
codegenEnabled: boolean;
|
|
522
|
+
/** Which stack the child runs — see {@link DevFlavor}. */
|
|
523
|
+
flavor: DevFlavor;
|
|
501
524
|
/**
|
|
502
|
-
* One-line redirect hint printed when a
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
525
|
+
* One-line redirect hint printed when a meta-framework is detected on the
|
|
526
|
+
* wrangler flavor: without `@lunora/vite` in the dependencies the worker
|
|
527
|
+
* still runs *inside* the framework's dev server, so the user should run
|
|
528
|
+
* their framework dev script for the full app. `undefined` for the vite
|
|
529
|
+
* flavor (`lunora dev` already runs the project's dev script there) and
|
|
530
|
+
* for a standalone project. Purely informational: the wrangler spawn runs
|
|
531
|
+
* regardless.
|
|
507
532
|
*/
|
|
508
533
|
frameworkHint?: string;
|
|
509
534
|
/** The remote-binding decision: which D1/KV/R2 bindings hit the deployed worker. */
|
|
@@ -512,7 +537,7 @@ interface DevCommandPlan {
|
|
|
512
537
|
studioPort: number;
|
|
513
538
|
workerOrigin: string;
|
|
514
539
|
workerPort: number;
|
|
515
|
-
/** The single child process `lunora dev` spawns: `wrangler dev
|
|
540
|
+
/** The single child process `lunora dev` spawns: `wrangler dev` (or `vite dev` for the vite flavor). */
|
|
516
541
|
wrangler: SpawnDescriptor & {
|
|
517
542
|
tag: string;
|
|
518
543
|
};
|
|
@@ -526,10 +551,11 @@ interface DevCommandPlan {
|
|
|
526
551
|
* to remote, the args stay empty and dev runs fully local.
|
|
527
552
|
*/
|
|
528
553
|
/**
|
|
529
|
-
* Plan `lunora dev
|
|
530
|
-
* child process. Vite
|
|
531
|
-
*
|
|
532
|
-
*
|
|
554
|
+
* Plan `lunora dev`. Wrangler flavor: the worker runs via `wrangler dev` and
|
|
555
|
+
* nothing else as a child process. Vite flavor (`@lunora/vite` declared): the
|
|
556
|
+
* plugin already runs the worker inside the Vite dev server, so the one child
|
|
557
|
+
* is the project's own dev script (`vite dev`, `astro dev`, …) and every CLI
|
|
558
|
+
* sibling is disabled. Pure + synchronous so it's unit-testable.
|
|
533
559
|
*/
|
|
534
560
|
declare const planDevCommand: (options: DevCommandOptions) => DevCommandPlan;
|
|
535
561
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-
|
|
1
|
+
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-0BD3K1pb.mjs';
|
|
2
2
|
export { runCodegenCommand } from './packem_chunks/runCodegenCommand.mjs';
|
|
3
|
-
export { DEFAULT_IMPORT_BATCH_SIZE, runExportCommand, runImportCommand } from './packem_shared/DEFAULT_IMPORT_BATCH_SIZE-
|
|
3
|
+
export { DEFAULT_IMPORT_BATCH_SIZE, runExportCommand, runImportCommand } from './packem_shared/DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs';
|
|
4
4
|
export { runDeployCommand } from './packem_chunks/runDeployCommand.mjs';
|
|
5
5
|
export { planDevCommand, runDevCommand } from './packem_chunks/planDevCommand.mjs';
|
|
6
6
|
export { runInitCommand } from './packem_chunks/runInitCommand.mjs';
|
|
@@ -9,11 +9,11 @@ export { runResetCommand } from './packem_chunks/runResetCommand.mjs';
|
|
|
9
9
|
export { runRpcCommand } from './packem_chunks/runRpcCommand.mjs';
|
|
10
10
|
export { default as parseArgs } from './packem_shared/parseArgs-YXFuKdEk.mjs';
|
|
11
11
|
export { insertSchemaExtension } from './packem_shared/insertSchemaExtension-DAqbfr9Z.mjs';
|
|
12
|
-
export { createLogger, pail } from './packem_shared/createLogger-
|
|
12
|
+
export { createLogger, pail } from './packem_shared/createLogger-CIWSHrTL.mjs';
|
|
13
13
|
export { diffSnapshots, renderAddColumn, renderCreateIndex, renderCreateTable, renderDropIndex, renderDropTable, renderMigrationFile, validatorKindToSqlType } from './packem_shared/diffSnapshots-BeDvvNiF.mjs';
|
|
14
14
|
export { default as schemaIrToSnapshot } from './packem_shared/schemaIrToSnapshot-DdsljJT-.mjs';
|
|
15
|
-
export { createRecordingSpawner, defaultSpawner } from './packem_shared/createRecordingSpawner-
|
|
16
|
-
export { default as parseManifest } from './packem_shared/parseManifest
|
|
15
|
+
export { createRecordingSpawner, defaultSpawner } from './packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
16
|
+
export { default as parseManifest } from './packem_shared/parseManifest-BBrXCg9V.mjs';
|
|
17
17
|
export { REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, validateWranglerProject as validateWrangler, validateWranglerConfig } from '@lunora/config';
|
|
18
|
-
export { buildRegistryIndex } from './packem_shared/buildRegistryIndex-
|
|
19
|
-
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-
|
|
18
|
+
export { buildRegistryIndex } from './packem_shared/buildRegistryIndex-CqM5FwGI.mjs';
|
|
19
|
+
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-vnRRkhNE.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { findWranglerFile } from '@lunora/config';
|
|
3
3
|
import { join, basename } from '@visulima/path';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
-
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
|
+
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-B4642rjE.mjs';
|
|
6
6
|
import { t as tuiText, a as tuiSelect } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
7
|
-
import { n as normalizeFeature, E as EMAIL_ITEM, s as sanitizeBucketName, d as deriveBucketName, p as promptBucketName, r as resolveTypedDestination, M as MAIL_DESTINATION_PROMPT, a as sanitizeDatabaseName, b as deriveDatabaseName, c as promptDatabaseName, D as DEFAULT_AUTH_ITEM, e as promptAuthProvider, A as AUTH_PROVIDER_OPTIONS, w as withStorageBucketName, f as withMailDestination, g as withAuthDatabaseName } from '../packem_shared/storage-
|
|
8
|
-
import { r as runAddCommand } from '../packem_shared/commands-
|
|
7
|
+
import { n as normalizeFeature, E as EMAIL_ITEM, s as sanitizeBucketName, d as deriveBucketName, p as promptBucketName, r as resolveTypedDestination, M as MAIL_DESTINATION_PROMPT, a as sanitizeDatabaseName, b as deriveDatabaseName, c as promptDatabaseName, D as DEFAULT_AUTH_ITEM, e as promptAuthProvider, A as AUTH_PROVIDER_OPTIONS, w as withStorageBucketName, f as withMailDestination, g as withAuthDatabaseName } from '../packem_shared/storage-bGfgwOgF.mjs';
|
|
8
|
+
import { r as runAddCommand } from '../packem_shared/commands-vnRRkhNE.mjs';
|
|
9
9
|
|
|
10
10
|
const providerToItem = (provider) => {
|
|
11
11
|
const value = provider.trim().toLowerCase();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
2
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
3
|
-
import { runExportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-
|
|
3
|
+
import { runExportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs';
|
|
4
4
|
|
|
5
5
|
const execute = defineHandler(
|
|
6
6
|
({ argument, cwd, logger, options }) => runExportCommand({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
2
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
3
|
-
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-
|
|
3
|
+
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs';
|
|
4
4
|
|
|
5
5
|
const execute = defineHandler(({ argument, cwd, logger, options }) => {
|
|
6
6
|
const file = argument[0];
|
|
@@ -4,7 +4,7 @@ import { discoverSchema } from '@lunora/codegen';
|
|
|
4
4
|
import { readLinkedProject } from '@lunora/config';
|
|
5
5
|
import { parse } from 'jsonc-parser';
|
|
6
6
|
import { Project } from 'ts-morph';
|
|
7
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
7
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
8
8
|
|
|
9
9
|
const findWranglerFile = (projectRoot) => {
|
|
10
10
|
for (const candidate of ["wrangler.jsonc", "wrangler.json"]) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveAdminBaseUrl } from '../packem_shared/admin-url-4UzT-CI4.mjs';
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
3
3
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
4
4
|
|
|
5
5
|
const GET_FUNCTION_STATS_OP = "__lunora_admin__:getFunctionStats";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, rmSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { writeLinkedProject, LINKED_PROJECT_FILE } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
5
|
import { r as readWranglerName } from '../packem_shared/wrangler-name-cy4yhm9j.mjs';
|
|
6
6
|
|
|
7
7
|
const isValidWorkerUrl = (value) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readLinkedProject } from '@lunora/config';
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
3
3
|
import { e as execArgsFor, d as detectPackageManager } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
4
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
4
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
5
5
|
|
|
6
6
|
const LOG_FORMATS = /* @__PURE__ */ new Set(["json", "pretty"]);
|
|
7
7
|
const runLogsCommand = async (options) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { runCodegen } from '@lunora/codegen';
|
|
2
2
|
import { validateWranglerProject, inferLunoraBindings, reconcileWranglerBindings } from '@lunora/config';
|
|
3
|
-
import { p as parseApiSpec } from '../packem_shared/api-spec-
|
|
3
|
+
import { p as parseApiSpec } from '../packem_shared/api-spec-Bx0iKbxA.mjs';
|
|
4
4
|
import { r as renderCodegenFailure } from '../packem_shared/codegen-error-DJG-ghs_.mjs';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
6
6
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
7
7
|
|
|
8
8
|
const provisionBindings = async (cwd, logger) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
-
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
|
+
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-vnRRkhNE.mjs';
|
|
3
3
|
|
|
4
4
|
const execute = defineHandler(({ argument, cwd, logger, options }) => {
|
|
5
5
|
const subcommand = argument[0];
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, writeFileSy
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { AGENT_RULES_DIR, detectAgentRules, LUNORA_SKILL_NAMES } from '@lunora/config';
|
|
4
4
|
import { join, relative, dirname } from '@visulima/path';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
6
6
|
|
|
7
7
|
const resolveBundledSkillsDirectory = (startDirectory = dirname(fileURLToPath(import.meta.url))) => {
|
|
8
8
|
let directory = startDirectory;
|
|
@@ -5,10 +5,10 @@ import { discoverSchema, schemaFromIr } from '@lunora/codegen';
|
|
|
5
5
|
import { seedPlan } from '@lunora/seed';
|
|
6
6
|
import { join } from '@visulima/path';
|
|
7
7
|
import { Project } from 'ts-morph';
|
|
8
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
8
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
9
9
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
10
10
|
import { b as tuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
11
|
-
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-
|
|
11
|
+
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs';
|
|
12
12
|
import { runResetCommand } from './runResetCommand.mjs';
|
|
13
13
|
|
|
14
14
|
const isLocalUrl = (url) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mkdtempSync, rmSync, existsSync, readdirSync, statSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join, relative } from 'node:path';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
5
|
import { e as execArgsFor, d as detectPackageManager } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
6
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
6
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
7
7
|
|
|
8
8
|
const walk = (root) => {
|
|
9
9
|
const entries = [];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { runCodegen } from '@lunora/codegen';
|
|
4
|
-
import { p as parseApiSpec } from '../packem_shared/api-spec-
|
|
4
|
+
import { p as parseApiSpec } from '../packem_shared/api-spec-Bx0iKbxA.mjs';
|
|
5
5
|
import { a as renderCodegenHint } from '../packem_shared/codegen-error-DJG-ghs_.mjs';
|
|
6
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
6
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
7
7
|
import { e as execArgsFor, d as detectPackageManager } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
8
|
-
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-
|
|
8
|
+
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-B4642rjE.mjs';
|
|
9
9
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
10
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
10
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
11
11
|
import { validateWranglerProject } from '@lunora/config';
|
|
12
12
|
|
|
13
13
|
const runTypecheckStep = async (cwd, spawner) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFileSync, existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { parse } from 'jsonc-parser';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
-
import { o as openUrl } from '../packem_shared/open-url-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
|
+
import { o as openUrl } from '../packem_shared/open-url-4PBLY9X0.mjs';
|
|
6
6
|
|
|
7
7
|
const DEFAULT_DEV_PORT = 8787;
|
|
8
8
|
const STUDIO_PATH = "/_lunora/studio";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
+
import { LunoraError } from '@lunora/errors';
|
|
4
5
|
import { r as resolveAdminBaseUrl } from '../packem_shared/admin-url-4UzT-CI4.mjs';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
6
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
6
7
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
7
|
-
import { runExportCommand, runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-
|
|
8
|
+
import { runExportCommand, runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-CRQmmBZM.mjs';
|
|
8
9
|
|
|
9
10
|
const DEFAULT_BACKUP_DIR = ".lunora-backups";
|
|
10
11
|
const MANIFEST_FILE = "manifest.json";
|
|
@@ -22,7 +23,9 @@ const readManifest = async (directory) => {
|
|
|
22
23
|
parsed = JSON.parse(await readFile(path, "utf8"));
|
|
23
24
|
} catch (error) {
|
|
24
25
|
const message = error instanceof Error ? error.message : String(error);
|
|
25
|
-
throw new
|
|
26
|
+
throw new LunoraError("INTERNAL", `backup: ${path} exists but is not valid JSON (${message}) — refusing to overwrite it; fix or remove it manually`, {
|
|
27
|
+
cause: error
|
|
28
|
+
});
|
|
26
29
|
}
|
|
27
30
|
if (!Array.isArray(parsed)) {
|
|
28
31
|
throw new TypeError(`backup: ${path} exists but is not a JSON array — refusing to overwrite it; fix or remove it manually`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as parseApiSpec } from '../packem_shared/api-spec-
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { p as parseApiSpec } from '../packem_shared/api-spec-Bx0iKbxA.mjs';
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
3
3
|
import { runDeployCommand } from './runDeployCommand.mjs';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_OUT_DIR = ".lunora/build";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
2
|
import { e as execArgsFor, d as detectPackageManager } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
3
3
|
import { i as isDockerAvailable } from '../packem_shared/docker-hMQ97KSQ.mjs';
|
|
4
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
4
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
5
5
|
|
|
6
6
|
const SUBCOMMANDS = /* @__PURE__ */ new Set(["build", "delete", "images", "info", "list", "push"]);
|
|
7
7
|
const NEEDS_DOCKER = /* @__PURE__ */ new Set(["build", "push"]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
2
|
import { e as execArgsFor, d as detectPackageManager } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
3
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
3
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
4
4
|
|
|
5
5
|
const withEnv = (args, env) => {
|
|
6
6
|
if (env !== void 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
-
import { o as openUrl } from '../packem_shared/open-url-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
2
|
+
import { o as openUrl } from '../packem_shared/open-url-4PBLY9X0.mjs';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_DOCS_URL = "https://lunora.anolilab.dev/docs";
|
|
5
5
|
const trimSlashes = (value) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { findWranglerFile, readWranglerJsonc, validateWranglerConfig, isPlaceholderValue, DEV_VARS_FILE, parseDevVariableEntries, inferLunoraBindings } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
5
|
|
|
6
6
|
const SECRET_KEY_PATTERN = /(?:KEY|PASSWORD|SECRET|TOKEN)$/u;
|
|
7
7
|
const isD1PlaceholderId = (databaseId) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, generateSecretValue, DEV_VARS_EXAMPLE_FILE, parseDevVariableEntries, isPlaceholderValue, packageNamesFromBindings, inferLunoraBindings, requiredSecrets, isMintableSecretKey } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-lYnl4QyF.mjs';
|
|
5
5
|
import { d as detectPackageManager, e as execArgsFor } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
6
|
-
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-
|
|
6
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-Cw5Iu73G.mjs';
|
|
7
7
|
import { l as listRemoteSecrets } from '../packem_shared/wrangler-secrets-P2_ZUR-k.mjs';
|
|
8
8
|
|
|
9
9
|
const NEWLINE_PRESENT = /[\r\n]/u;
|