@lunora/cli 1.0.0-alpha.5 → 1.0.0-alpha.6
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 +50 -10
- package/dist/index.d.ts +50 -10
- package/dist/index.mjs +5 -5
- package/dist/packem_chunks/handler.mjs +2 -2
- package/dist/packem_chunks/handler14.mjs +1 -1
- package/dist/packem_chunks/handler16.mjs +1 -1
- package/dist/packem_chunks/handler18.mjs +1 -1
- package/dist/packem_chunks/handler19.mjs +1 -1
- package/dist/packem_chunks/handler2.mjs +1 -1
- package/dist/packem_chunks/handler21.mjs +1 -1
- package/dist/packem_chunks/handler5.mjs +1 -1
- package/dist/packem_chunks/handler6.mjs +1 -1
- package/dist/packem_chunks/planDevCommand.mjs +4 -48
- package/dist/packem_chunks/runDeployCommand.mjs +1 -1
- package/dist/packem_chunks/runInitCommand.mjs +459 -35
- package/dist/packem_chunks/runMigrateGenerateCommand.mjs +4 -4
- package/dist/packem_chunks/runResetCommand.mjs +1 -1
- package/dist/packem_shared/{COMMANDS-DXaq12xm.mjs → COMMANDS-Bn8luojF.mjs} +10 -2
- package/dist/packem_shared/{commands-B9nASOYd.mjs → commands-DqsEzojt.mjs} +2 -2
- package/dist/packem_shared/detect-package-manager-DYp7n3mJ.mjs +61 -0
- package/dist/packem_shared/{diffSnapshots-RR2ZE8Ya.mjs → diffSnapshots-BeDvvNiF.mjs} +1 -1
- package/dist/packem_shared/{runAddCommand-BF7XreDW.mjs → runAddCommand-G544_v6e.mjs} +1 -1
- package/dist/packem_shared/{schemaIrToSnapshot-aBTo7TM5.mjs → schemaIrToSnapshot-DdsljJT-.mjs} +1 -1
- package/dist/packem_shared/{tui-prompts-Bm15GPJA.mjs → tui-prompts-XHFxlOg5.mjs} +41 -1
- package/package.json +3 -5
- /package/dist/packem_shared/{defaultSpawner-DxI3mebw.mjs → createRecordingSpawner-DxI3mebw.mjs} +0 -0
package/dist/bin.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -496,15 +496,28 @@ declare const runDevCommand: (options: DevCommandOptions) => Promise<{
|
|
|
496
496
|
/** `lunora dev` handler (lazy-loaded via the command's `loader`). */
|
|
497
497
|
/** Supported CI providers. */
|
|
498
498
|
type CiProvider = "github" | "gitlab";
|
|
499
|
+
type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
500
|
+
/** True when `manager` is on PATH — probed by running `<manager> --version`. Injectable for tests. */
|
|
501
|
+
type PackageManagerProbe = (manager: PackageManager) => boolean;
|
|
502
|
+
/**
|
|
503
|
+
* The package managers actually installed on this machine, in preference order
|
|
504
|
+
* ({@link INSTALL_PREFERENCE} — pnpm > bun > yarn > npm). The first entry is the
|
|
505
|
+
* recommended default for the install prompt; the whole list is what the user
|
|
506
|
+
* picks from. Empty when none are found.
|
|
507
|
+
*/
|
|
499
508
|
/** A registry item a feature can install. */
|
|
500
509
|
type FeatureItem = "auth" | "auth-auth0" | "auth-clerk" | "mail";
|
|
501
510
|
/** The auth-provider choices offered for `add auth` / the init auth prompt. Each value is a registry item name. */
|
|
502
511
|
|
|
503
|
-
/**
|
|
504
|
-
|
|
512
|
+
/**
|
|
513
|
+
* A feature offered in the post-scaffold multi-select. `auth`/`email` carry a
|
|
514
|
+
* sub-prompt or alias; every other value IS the registry item name applied
|
|
515
|
+
* directly (`storage` → the `storage` registry item, etc.).
|
|
516
|
+
*/
|
|
517
|
+
type StackFeature = "auth" | "backup" | "crons" | "email" | "presence" | "ratelimit" | "storage";
|
|
505
518
|
interface OfferDeps {
|
|
506
519
|
/** Apply one or more registry items into the new project; resolves `true` on success. */
|
|
507
|
-
apply: (names: ReadonlyArray<
|
|
520
|
+
apply: (names: ReadonlyArray<string>) => Promise<boolean>;
|
|
508
521
|
/** When `false`, skip all prompts and print the later-setup hint. */
|
|
509
522
|
interactive: boolean;
|
|
510
523
|
logger: Logger;
|
|
@@ -526,13 +539,14 @@ interface OfferDeps {
|
|
|
526
539
|
}) => Promise<FeatureItem | undefined>;
|
|
527
540
|
}
|
|
528
541
|
/**
|
|
529
|
-
* Offer the stack features (
|
|
530
|
-
* multi-select after a successful scaffold. When auth
|
|
531
|
-
* single-select chooses the provider (email+password /
|
|
532
|
-
* maps to the `mail` item
|
|
533
|
-
*
|
|
542
|
+
* Offer the stack features (auth, email, storage, rate limiting, crons,
|
|
543
|
+
* presence, backups) in ONE multi-select after a successful scaffold. When auth
|
|
544
|
+
* is picked, a follow-up single-select chooses the provider (email+password /
|
|
545
|
+
* Clerk / Auth0); email maps to the `mail` item; every other feature value is
|
|
546
|
+
* applied as its registry item directly. Picked items are applied in selection
|
|
547
|
+
* order. Non-interactive: prints how to add them later and changes nothing.
|
|
534
548
|
*/
|
|
535
|
-
type Template = "astro" | "next" | "nuxt" | "standalone" | "sveltekit" | "tanstack-start-react" | "tanstack-start-solid"
|
|
549
|
+
type Template = "analog" | "astro" | "next" | "nuxt" | "react-router" | "standalone" | "sveltekit" | "tanstack-start-react" | "tanstack-start-solid";
|
|
536
550
|
interface InitCommandOptions {
|
|
537
551
|
/**
|
|
538
552
|
* When true, accept `--source` values that don't start with `gh:` /
|
|
@@ -559,6 +573,15 @@ interface InitCommandOptions {
|
|
|
559
573
|
*/
|
|
560
574
|
inPlace?: boolean;
|
|
561
575
|
/**
|
|
576
|
+
* Inject the post-scaffold install offer's prompts (tests). When set, the
|
|
577
|
+
* offer runs regardless of TTY: `confirmInstall` drives the yes/no, and
|
|
578
|
+
* `selectManager` picks among the detected managers.
|
|
579
|
+
*/
|
|
580
|
+
installPrompt?: {
|
|
581
|
+
confirmInstall: () => Promise<boolean>;
|
|
582
|
+
selectManager: (managers: ReadonlyArray<PackageManager>) => Promise<PackageManager>;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
562
585
|
* Force the post-scaffold "add auth / email?" offer on (the `--interactive`
|
|
563
586
|
* flag). When omitted, the offer runs only when stdin is a TTY. `--yes`
|
|
564
587
|
* suppresses it regardless. Has no effect once {@link prompt} is injected.
|
|
@@ -567,6 +590,14 @@ interface InitCommandOptions {
|
|
|
567
590
|
logger: Logger;
|
|
568
591
|
name?: string;
|
|
569
592
|
/**
|
|
593
|
+
* Local directory holding create-vite bases (one `template-<id>/` subdir per
|
|
594
|
+
* framework). When set with `vite`, the overlay copies the base from disk
|
|
595
|
+
* instead of fetching `create-vite` over the network — offline mode + tests.
|
|
596
|
+
*/
|
|
597
|
+
overlayBaseFrom?: string;
|
|
598
|
+
/** Probe for which package managers are installed (tests). Defaults to a real `<pm> --version` check. */
|
|
599
|
+
packageManagerProbe?: PackageManagerProbe;
|
|
600
|
+
/**
|
|
570
601
|
* Inject the offer's prompts (tests). When set, the offer is treated as
|
|
571
602
|
* interactive regardless of TTY, and these drive the feature multi-select
|
|
572
603
|
* and the auth-provider sub-select.
|
|
@@ -590,7 +621,16 @@ interface InitCommandOptions {
|
|
|
590
621
|
* instead to skip the network.
|
|
591
622
|
*/
|
|
592
623
|
source?: string;
|
|
624
|
+
/** Spawner for the post-scaffold dependency install (tests inject a recording stub). Defaults to a real subprocess. */
|
|
625
|
+
spawner?: Spawner;
|
|
593
626
|
templateType?: Template;
|
|
627
|
+
/**
|
|
628
|
+
* Scaffold via the **create-vite overlay** for this framework (`react`,
|
|
629
|
+
* `vue`, `solid`, `svelte`, `vanilla`) instead of a bespoke template: fetch
|
|
630
|
+
* the official create-vite base and apply the Lunora layer on top. Takes
|
|
631
|
+
* precedence over `templateType`.
|
|
632
|
+
*/
|
|
633
|
+
vite?: string;
|
|
594
634
|
/** Suppress the offer entirely (the `--yes` flag): scaffold only, print the later-setup hint. */
|
|
595
635
|
yes?: boolean;
|
|
596
636
|
}
|
|
@@ -605,7 +645,7 @@ interface InitCommandResult {
|
|
|
605
645
|
* scaffold's exit code.
|
|
606
646
|
*/
|
|
607
647
|
declare const runInitCommand: (options: InitCommandOptions) => Promise<InitCommandResult>;
|
|
608
|
-
/** Narrow a raw `--template` value to a known {@link Template}
|
|
648
|
+
/** Narrow a raw `--template` value to a known {@link Template}. */
|
|
609
649
|
interface MigrateGenerateCommandOptions {
|
|
610
650
|
cwd?: string;
|
|
611
651
|
logger: Logger;
|
package/dist/index.d.ts
CHANGED
|
@@ -496,15 +496,28 @@ declare const runDevCommand: (options: DevCommandOptions) => Promise<{
|
|
|
496
496
|
/** `lunora dev` handler (lazy-loaded via the command's `loader`). */
|
|
497
497
|
/** Supported CI providers. */
|
|
498
498
|
type CiProvider = "github" | "gitlab";
|
|
499
|
+
type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
500
|
+
/** True when `manager` is on PATH — probed by running `<manager> --version`. Injectable for tests. */
|
|
501
|
+
type PackageManagerProbe = (manager: PackageManager) => boolean;
|
|
502
|
+
/**
|
|
503
|
+
* The package managers actually installed on this machine, in preference order
|
|
504
|
+
* ({@link INSTALL_PREFERENCE} — pnpm > bun > yarn > npm). The first entry is the
|
|
505
|
+
* recommended default for the install prompt; the whole list is what the user
|
|
506
|
+
* picks from. Empty when none are found.
|
|
507
|
+
*/
|
|
499
508
|
/** A registry item a feature can install. */
|
|
500
509
|
type FeatureItem = "auth" | "auth-auth0" | "auth-clerk" | "mail";
|
|
501
510
|
/** The auth-provider choices offered for `add auth` / the init auth prompt. Each value is a registry item name. */
|
|
502
511
|
|
|
503
|
-
/**
|
|
504
|
-
|
|
512
|
+
/**
|
|
513
|
+
* A feature offered in the post-scaffold multi-select. `auth`/`email` carry a
|
|
514
|
+
* sub-prompt or alias; every other value IS the registry item name applied
|
|
515
|
+
* directly (`storage` → the `storage` registry item, etc.).
|
|
516
|
+
*/
|
|
517
|
+
type StackFeature = "auth" | "backup" | "crons" | "email" | "presence" | "ratelimit" | "storage";
|
|
505
518
|
interface OfferDeps {
|
|
506
519
|
/** Apply one or more registry items into the new project; resolves `true` on success. */
|
|
507
|
-
apply: (names: ReadonlyArray<
|
|
520
|
+
apply: (names: ReadonlyArray<string>) => Promise<boolean>;
|
|
508
521
|
/** When `false`, skip all prompts and print the later-setup hint. */
|
|
509
522
|
interactive: boolean;
|
|
510
523
|
logger: Logger;
|
|
@@ -526,13 +539,14 @@ interface OfferDeps {
|
|
|
526
539
|
}) => Promise<FeatureItem | undefined>;
|
|
527
540
|
}
|
|
528
541
|
/**
|
|
529
|
-
* Offer the stack features (
|
|
530
|
-
* multi-select after a successful scaffold. When auth
|
|
531
|
-
* single-select chooses the provider (email+password /
|
|
532
|
-
* maps to the `mail` item
|
|
533
|
-
*
|
|
542
|
+
* Offer the stack features (auth, email, storage, rate limiting, crons,
|
|
543
|
+
* presence, backups) in ONE multi-select after a successful scaffold. When auth
|
|
544
|
+
* is picked, a follow-up single-select chooses the provider (email+password /
|
|
545
|
+
* Clerk / Auth0); email maps to the `mail` item; every other feature value is
|
|
546
|
+
* applied as its registry item directly. Picked items are applied in selection
|
|
547
|
+
* order. Non-interactive: prints how to add them later and changes nothing.
|
|
534
548
|
*/
|
|
535
|
-
type Template = "astro" | "next" | "nuxt" | "standalone" | "sveltekit" | "tanstack-start-react" | "tanstack-start-solid"
|
|
549
|
+
type Template = "analog" | "astro" | "next" | "nuxt" | "react-router" | "standalone" | "sveltekit" | "tanstack-start-react" | "tanstack-start-solid";
|
|
536
550
|
interface InitCommandOptions {
|
|
537
551
|
/**
|
|
538
552
|
* When true, accept `--source` values that don't start with `gh:` /
|
|
@@ -559,6 +573,15 @@ interface InitCommandOptions {
|
|
|
559
573
|
*/
|
|
560
574
|
inPlace?: boolean;
|
|
561
575
|
/**
|
|
576
|
+
* Inject the post-scaffold install offer's prompts (tests). When set, the
|
|
577
|
+
* offer runs regardless of TTY: `confirmInstall` drives the yes/no, and
|
|
578
|
+
* `selectManager` picks among the detected managers.
|
|
579
|
+
*/
|
|
580
|
+
installPrompt?: {
|
|
581
|
+
confirmInstall: () => Promise<boolean>;
|
|
582
|
+
selectManager: (managers: ReadonlyArray<PackageManager>) => Promise<PackageManager>;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
562
585
|
* Force the post-scaffold "add auth / email?" offer on (the `--interactive`
|
|
563
586
|
* flag). When omitted, the offer runs only when stdin is a TTY. `--yes`
|
|
564
587
|
* suppresses it regardless. Has no effect once {@link prompt} is injected.
|
|
@@ -567,6 +590,14 @@ interface InitCommandOptions {
|
|
|
567
590
|
logger: Logger;
|
|
568
591
|
name?: string;
|
|
569
592
|
/**
|
|
593
|
+
* Local directory holding create-vite bases (one `template-<id>/` subdir per
|
|
594
|
+
* framework). When set with `vite`, the overlay copies the base from disk
|
|
595
|
+
* instead of fetching `create-vite` over the network — offline mode + tests.
|
|
596
|
+
*/
|
|
597
|
+
overlayBaseFrom?: string;
|
|
598
|
+
/** Probe for which package managers are installed (tests). Defaults to a real `<pm> --version` check. */
|
|
599
|
+
packageManagerProbe?: PackageManagerProbe;
|
|
600
|
+
/**
|
|
570
601
|
* Inject the offer's prompts (tests). When set, the offer is treated as
|
|
571
602
|
* interactive regardless of TTY, and these drive the feature multi-select
|
|
572
603
|
* and the auth-provider sub-select.
|
|
@@ -590,7 +621,16 @@ interface InitCommandOptions {
|
|
|
590
621
|
* instead to skip the network.
|
|
591
622
|
*/
|
|
592
623
|
source?: string;
|
|
624
|
+
/** Spawner for the post-scaffold dependency install (tests inject a recording stub). Defaults to a real subprocess. */
|
|
625
|
+
spawner?: Spawner;
|
|
593
626
|
templateType?: Template;
|
|
627
|
+
/**
|
|
628
|
+
* Scaffold via the **create-vite overlay** for this framework (`react`,
|
|
629
|
+
* `vue`, `solid`, `svelte`, `vanilla`) instead of a bespoke template: fetch
|
|
630
|
+
* the official create-vite base and apply the Lunora layer on top. Takes
|
|
631
|
+
* precedence over `templateType`.
|
|
632
|
+
*/
|
|
633
|
+
vite?: string;
|
|
594
634
|
/** Suppress the offer entirely (the `--yes` flag): scaffold only, print the later-setup hint. */
|
|
595
635
|
yes?: boolean;
|
|
596
636
|
}
|
|
@@ -605,7 +645,7 @@ interface InitCommandResult {
|
|
|
605
645
|
* scaffold's exit code.
|
|
606
646
|
*/
|
|
607
647
|
declare const runInitCommand: (options: InitCommandOptions) => Promise<InitCommandResult>;
|
|
608
|
-
/** Narrow a raw `--template` value to a known {@link Template}
|
|
648
|
+
/** Narrow a raw `--template` value to a known {@link Template}. */
|
|
609
649
|
interface MigrateGenerateCommandOptions {
|
|
610
650
|
cwd?: string;
|
|
611
651
|
logger: Logger;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-
|
|
1
|
+
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-Bn8luojF.mjs';
|
|
2
2
|
export { runCodegenCommand } from './packem_chunks/runCodegenCommand.mjs';
|
|
3
3
|
export { DEFAULT_IMPORT_BATCH_SIZE, runExportCommand, runImportCommand } from './packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
4
4
|
export { runDeployCommand } from './packem_chunks/runDeployCommand.mjs';
|
|
@@ -10,10 +10,10 @@ 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-BuzF6-t2.mjs';
|
|
12
12
|
export { createLogger, pail } from './packem_shared/createLogger-CHPNjFw2.mjs';
|
|
13
|
-
export { diffSnapshots, renderAddColumn, renderCreateIndex, renderCreateTable, renderDropIndex, renderDropTable, renderMigrationFile, validatorKindToSqlType } from './packem_shared/diffSnapshots-
|
|
14
|
-
export { default as schemaIrToSnapshot } from './packem_shared/schemaIrToSnapshot-
|
|
15
|
-
export { createRecordingSpawner, defaultSpawner } from './packem_shared/
|
|
13
|
+
export { diffSnapshots, renderAddColumn, renderCreateIndex, renderCreateTable, renderDropIndex, renderDropTable, renderMigrationFile, validatorKindToSqlType } from './packem_shared/diffSnapshots-BeDvvNiF.mjs';
|
|
14
|
+
export { default as schemaIrToSnapshot } from './packem_shared/schemaIrToSnapshot-DdsljJT-.mjs';
|
|
15
|
+
export { createRecordingSpawner, defaultSpawner } from './packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
16
16
|
export { default as parseManifest } from './packem_shared/parseManifest--vZf2FY1.mjs';
|
|
17
17
|
export { REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, validateWranglerProject as validateWrangler, validateWranglerConfig } from '@lunora/config';
|
|
18
18
|
export { buildRegistryIndex } from './packem_shared/buildRegistryIndex-BcYe607_.mjs';
|
|
19
|
-
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-
|
|
19
|
+
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-DqsEzojt.mjs';
|
|
@@ -2,9 +2,9 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { findWranglerFile } from '@lunora/config';
|
|
3
3
|
import { join } from '@visulima/path';
|
|
4
4
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
5
|
-
import { t as tuiSelect } from '../packem_shared/tui-prompts-
|
|
5
|
+
import { t as tuiSelect } from '../packem_shared/tui-prompts-XHFxlOg5.mjs';
|
|
6
6
|
import { n as normalizeFeature, E as EMAIL_ITEM, D as DEFAULT_AUTH_ITEM, p as promptAuthProvider, A as AUTH_PROVIDER_OPTIONS } from '../packem_shared/features-ocSSpZtS.mjs';
|
|
7
|
-
import { r as runAddCommand } from '../packem_shared/commands-
|
|
7
|
+
import { r as runAddCommand } from '../packem_shared/commands-DqsEzojt.mjs';
|
|
8
8
|
|
|
9
9
|
const providerToItem = (provider) => {
|
|
10
10
|
const value = provider.trim().toLowerCase();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readLinkedProject } from '@lunora/config';
|
|
2
2
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
3
|
-
import { defaultSpawner } from '../packem_shared/
|
|
3
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
4
4
|
|
|
5
5
|
const LOG_FORMATS = /* @__PURE__ */ new Set(["json", "pretty"]);
|
|
6
6
|
const runLogsCommand = async (options) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
2
|
-
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-
|
|
2
|
+
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-DqsEzojt.mjs';
|
|
3
3
|
|
|
4
4
|
const execute = defineHandler(({ argument, cwd, logger, options }) => {
|
|
5
5
|
const subcommand = argument[0];
|
|
@@ -7,7 +7,7 @@ import { join } from '@visulima/path';
|
|
|
7
7
|
import { Project } from 'ts-morph';
|
|
8
8
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
9
9
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
10
|
-
import { a as tuiConfirm } from '../packem_shared/tui-prompts-
|
|
10
|
+
import { a as tuiConfirm } from '../packem_shared/tui-prompts-XHFxlOg5.mjs';
|
|
11
11
|
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
12
12
|
import { runResetCommand } from './runResetCommand.mjs';
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@ import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
|
5
5
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
6
6
|
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-7gyGR3h8.mjs';
|
|
7
7
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
8
|
-
import { defaultSpawner } from '../packem_shared/
|
|
8
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
9
9
|
import { validateWranglerProject } from '@lunora/config';
|
|
10
10
|
|
|
11
11
|
const runTypecheckStep = async (cwd, spawner) => {
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
5
|
-
import { defaultSpawner } from '../packem_shared/
|
|
5
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
6
6
|
|
|
7
7
|
const walk = (root) => {
|
|
8
8
|
const entries = [];
|
|
@@ -2,7 +2,7 @@ import { writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_VARS_EXAMPLE_FILE, parseDevVariableEntries, isPlaceholderValue } from '@lunora/config';
|
|
4
4
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
5
|
-
import { defaultSpawner } from '../packem_shared/
|
|
5
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
6
6
|
import { execFile } from 'node:child_process';
|
|
7
7
|
|
|
8
8
|
const execCode = (error) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
2
2
|
import { i as isDockerAvailable } from '../packem_shared/docker-hMQ97KSQ.mjs';
|
|
3
|
-
import { defaultSpawner } from '../packem_shared/
|
|
3
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
4
4
|
|
|
5
5
|
const SUBCOMMANDS = /* @__PURE__ */ new Set(["build", "delete", "images", "info", "list", "push"]);
|
|
6
6
|
const NEEDS_DOCKER = /* @__PURE__ */ new Set(["build", "push"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
2
|
-
import { defaultSpawner } from '../packem_shared/
|
|
2
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
3
3
|
|
|
4
4
|
const withEnv = (args, env) => {
|
|
5
5
|
if (env !== void 0) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import { detectAgentRules, inferLunoraBindings, packageNamesFromBindings, ensureDevVarsExample, ensureDevVariables, isInteractive, DEV_VARS_FILE, DEV_VARS_EXAMPLE_FILE, claimAgentRulesHint, AGENT_RULES_HINT, materializeRemoteWranglerConfig, formatLunoraEvent
|
|
2
|
+
import { detectAgentRules, resolveRemoteEnabled, readProjectRemotePreference, inferLunoraBindings, packageNamesFromBindings, ensureDevVarsExample, ensureDevVariables, isInteractive, DEV_VARS_FILE, DEV_VARS_EXAMPLE_FILE, claimAgentRulesHint, AGENT_RULES_HINT, materializeRemoteWranglerConfig, formatLunoraEvent } from '@lunora/config';
|
|
3
3
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
4
|
-
import { existsSync, watch
|
|
4
|
+
import { existsSync, watch } from 'node:fs';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { runCodegen } from '@lunora/codegen';
|
|
7
7
|
import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { d as detectPackageManager, e as execArgsFor } from '../packem_shared/detect-package-manager-DYp7n3mJ.mjs';
|
|
9
9
|
import { createServer, request } from 'node:http';
|
|
10
10
|
import { connect } from 'node:net';
|
|
11
11
|
import { loadStudioAssets, studioAssetsStamp, renderStudioHtml, resolveAdminToken, SCHEMA_EDIT_ENDPOINT, POLICY_SCAFFOLD_ENDPOINT, SEED_ENDPOINT, serveJsonHandler, handleSchemaEditRequest, handlePolicyScaffoldRequest, handleSeedRequest } from '@lunora/config/studio-host';
|
|
12
|
-
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-
|
|
12
|
+
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-XHFxlOg5.mjs';
|
|
13
13
|
|
|
14
14
|
const DEFAULT_DEBOUNCE_MS = 100;
|
|
15
15
|
const PATH_SEGMENT_SEPARATOR = /[/\\]/u;
|
|
@@ -71,50 +71,6 @@ const startCodegenWatch = (options) => {
|
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
const FALLBACK = "pnpm";
|
|
75
|
-
const KNOWN_MANAGERS = ["pnpm", "yarn", "npm", "bun"];
|
|
76
|
-
const parseDeclaredManager = (declared) => {
|
|
77
|
-
if (typeof declared !== "string") {
|
|
78
|
-
return void 0;
|
|
79
|
-
}
|
|
80
|
-
return KNOWN_MANAGERS.find((manager) => declared.startsWith(`${manager}@`));
|
|
81
|
-
};
|
|
82
|
-
const readDeclaredManager = (directory) => {
|
|
83
|
-
const candidate = join$1(directory, "package.json");
|
|
84
|
-
if (!existsSync(candidate)) {
|
|
85
|
-
return void 0;
|
|
86
|
-
}
|
|
87
|
-
try {
|
|
88
|
-
const parsed = JSON.parse(readFileSync(candidate, "utf8"));
|
|
89
|
-
return parseDeclaredManager(parsed.packageManager);
|
|
90
|
-
} catch {
|
|
91
|
-
return void 0;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
const detectPackageManager = (startDirectory) => {
|
|
95
|
-
let directory = startDirectory;
|
|
96
|
-
while (directory && directory !== dirname(directory)) {
|
|
97
|
-
const declared = readDeclaredManager(directory);
|
|
98
|
-
if (declared !== void 0) {
|
|
99
|
-
return declared;
|
|
100
|
-
}
|
|
101
|
-
directory = dirname(directory);
|
|
102
|
-
}
|
|
103
|
-
return FALLBACK;
|
|
104
|
-
};
|
|
105
|
-
const execArgsFor = (manager, command, args) => {
|
|
106
|
-
if (manager === "yarn") {
|
|
107
|
-
return { args: [command, ...args], command: "yarn" };
|
|
108
|
-
}
|
|
109
|
-
if (manager === "bun") {
|
|
110
|
-
return { args: ["x", command, ...args], command: "bun" };
|
|
111
|
-
}
|
|
112
|
-
if (manager === "npm") {
|
|
113
|
-
return { args: ["--", command, ...args], command: "npx" };
|
|
114
|
-
}
|
|
115
|
-
return { args: ["exec", command, ...args], command: "pnpm" };
|
|
116
|
-
};
|
|
117
|
-
|
|
118
74
|
const PROXY_PREFIX = "/_lunora";
|
|
119
75
|
const pathnameOf = (url) => {
|
|
120
76
|
const queryIndex = url.indexOf("?");
|
|
@@ -10,7 +10,7 @@ import { d as defineHandler } from '../packem_shared/command-BDXcJCCJ.mjs';
|
|
|
10
10
|
import { a as isRailpackAvailable, i as isDockerAvailable } from '../packem_shared/docker-hMQ97KSQ.mjs';
|
|
11
11
|
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-7gyGR3h8.mjs';
|
|
12
12
|
import { containerBuildTag } from '@lunora/container';
|
|
13
|
-
import { defaultSpawner } from '../packem_shared/
|
|
13
|
+
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
14
14
|
import { r as resolveWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
15
15
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
16
16
|
import { runMigrateDataCommand } from './runMigrateGenerateCommand.mjs';
|