@hype-stack/cli 1.1.1 → 1.3.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.
- package/dist/{cli-BQlmo5KI.js → cli-CZanCLn9.js} +3755 -2911
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/compose.d.ts.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/init.d.ts +10 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/install-helpers.d.ts +4 -6
- package/dist/commands/install-helpers.d.ts.map +1 -1
- package/dist/commands/onboard.d.ts +11 -4
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/template.d.ts.map +1 -1
- package/dist/config/bin.js +1 -1
- package/dist/constants/radius.d.ts +19 -0
- package/dist/constants/radius.d.ts.map +1 -0
- package/dist/core/codemods.d.ts +10 -5
- package/dist/core/codemods.d.ts.map +1 -1
- package/dist/core/customization.d.ts +90 -0
- package/dist/core/customization.d.ts.map +1 -0
- package/dist/core/env-secrets.d.ts +18 -0
- package/dist/core/env-secrets.d.ts.map +1 -0
- package/dist/core/env-setup.d.ts +63 -0
- package/dist/core/env-setup.d.ts.map +1 -0
- package/dist/core/env-status.d.ts +15 -4
- package/dist/core/env-status.d.ts.map +1 -1
- package/dist/core/installer.d.ts +14 -10
- package/dist/core/installer.d.ts.map +1 -1
- package/dist/core/merge-json.d.ts +33 -0
- package/dist/core/merge-json.d.ts.map +1 -0
- package/dist/core/onboard-env.d.ts +5 -0
- package/dist/core/onboard-env.d.ts.map +1 -1
- package/dist/deploy/dry-run.d.ts.map +1 -1
- package/dist/deploy/env-plan.d.ts +10 -1
- package/dist/deploy/env-plan.d.ts.map +1 -1
- package/dist/deploy/orchestrate.d.ts +2 -0
- package/dist/deploy/orchestrate.d.ts.map +1 -1
- package/dist/deploy/project-env.d.ts +5 -3
- package/dist/deploy/project-env.d.ts.map +1 -1
- package/dist/deploy/providers/railway.d.ts +49 -2
- package/dist/deploy/providers/railway.d.ts.map +1 -1
- package/dist/deploy/report.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +11 -0
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/tools/create-application.d.ts +9 -0
- package/dist/mcp/tools/create-application.d.ts.map +1 -1
- package/dist/radius-D2HkfJ6x.js +48 -0
- package/dist/radius.js +2 -0
- package/dist/themes.js +1 -1
- package/dist/types/types.d.ts +100 -9
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +10 -1
- /package/dist/{themes-D5OgOcBU.js → themes-CdRygcEF.js} +0 -0
package/dist/cli.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
+
import { CustomizationOptions } from './types/types';
|
|
3
|
+
/** `--mode` accepts only the two color modes a generated app can boot in. */
|
|
4
|
+
export declare function parseColorMode(value: string | undefined): "light" | "dark" | undefined;
|
|
5
|
+
/** Pull the look-and-feel flags off a parsed Commander options object. */
|
|
6
|
+
export declare function customizationFrom(options: Record<string, unknown>): CustomizationOptions;
|
|
2
7
|
export declare function createProgram(): Command;
|
|
3
8
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAyB1D,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAEtF;AAoBD,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAQxF;AAoCD,wBAAgB,aAAa,IAAI,OAAO,CA8LvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EAEb,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAqB3B,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiQhF;AA0HD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAUxG;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAIhE;AAED,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CAShE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,WAAW,CAYxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUnE,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAiS3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,iBAAiB,EAAqC,MAAM,qBAAqB,CAAC;AA6BzG,OAAO,KAAK,EAEV,aAAa,EAEb,YAAY,EACZ,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAM5B;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,iBAAiB,EAAqC,MAAM,qBAAqB,CAAC;AA6BzG,OAAO,KAAK,EAEV,aAAa,EAEb,YAAY,EACZ,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAM5B;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmK9E;AA2BD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IACjD,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,gBAAgB,EAAE,YAAY,EAAE,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG;IAC1D,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B,CAUA"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitOptions } from '../types/types.js';
|
|
1
|
+
import { CustomizationOptions, InitOptions } from '../types/types.js';
|
|
2
2
|
export declare function initCommand(options: InitOptions): Promise<void>;
|
|
3
3
|
/**
|
|
4
4
|
* Optional overrides for {@link ensureInit}. Tests inject fakes so the interactive
|
|
@@ -9,14 +9,19 @@ export interface EnsureInitRunners {
|
|
|
9
9
|
/** Returns the absolute target directory the project was scaffolded into. */
|
|
10
10
|
runCreate?: (cwd: string, opts?: ScaffoldOptions) => Promise<string>;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Options forwarded to `create` when `ensureInit` scaffolds a new project. The
|
|
14
|
+
* `default*` fields preselect the pickers (a template's canonical look), while
|
|
15
|
+
* the rest are the caller's own `--theme` / `--radius` / `--mode` flags, which
|
|
16
|
+
* skip the matching question entirely.
|
|
17
|
+
*/
|
|
18
|
+
export interface ScaffoldOptions extends CustomizationOptions {
|
|
14
19
|
/** Theme id to preselect in the picker (the template's canonical theme). */
|
|
15
20
|
defaultTheme?: string;
|
|
16
21
|
/** Color mode the scaffolded app opens in (the template's `defaultMode`). */
|
|
17
22
|
defaultMode?: "light" | "dark";
|
|
18
|
-
/** Corner roundness
|
|
19
|
-
|
|
23
|
+
/** Corner roundness to preselect in the picker (the template's `radius`). */
|
|
24
|
+
defaultRadius?: string;
|
|
20
25
|
}
|
|
21
26
|
export interface EnsureInitResult {
|
|
22
27
|
/** Absolute path to the project root the caller should work against. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAa3E,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAyFrE;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,iBAAsB,EAC/B,eAAe,CAAC,EAAE,eAAe,GAChC,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAkFlC"}
|
|
@@ -27,14 +27,12 @@ export declare function installNpmForPacks(args: {
|
|
|
27
27
|
cwd: string;
|
|
28
28
|
spinner: ReturnType<typeof p.spinner>;
|
|
29
29
|
}): Promise<void>;
|
|
30
|
-
export declare function printNextSteps(): void;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* install itself already succeeded.
|
|
31
|
+
* The commands to run after an install, in the order you actually need them.
|
|
32
|
+
* Onboarding is listed rather than offered: filling in env vars is a sit-down
|
|
33
|
+
* job most people want to do later, not while they are still picking packs.
|
|
36
34
|
*/
|
|
37
|
-
export declare function
|
|
35
|
+
export declare function printNextSteps(): void;
|
|
38
36
|
/**
|
|
39
37
|
* List the files an install skipped because their targets already existed. The installer
|
|
40
38
|
* collects these as `"<manifest target> (<reason>)"` strings, but the command only prints
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/install-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAMpC,OAAO,EAAqB,KAAK,YAAY,EAAwB,MAAM,sBAAsB,CAAC;AAIlG,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,0GAA0G;AAC1G,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAI/B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE;AAED,+FAA+F;AAC/F,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACnC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI,CAQnG;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAU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,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;CACvC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAwDvB"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { OnboardOptions } from '../types/types.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Fill in the values a person actually has to go and fetch, and nothing else.
|
|
4
|
+
*
|
|
5
|
+
* The old version walked every line of every `.env.example` and asked about all
|
|
6
|
+
* of them, which meant typing `http://localhost:4200` into a prompt that already
|
|
7
|
+
* had `http://localhost:4200` in it. Now each var carries a setup requirement
|
|
8
|
+
* (declared per pack, see `core/env-setup.ts`) and only two kinds get asked
|
|
9
|
+
* about: `required`, which is prompted, and `optional`, which is offered once per
|
|
10
|
+
* feature. Defaults are copied and generated secrets are rolled, both silently.
|
|
11
|
+
*
|
|
12
|
+
* Docker and database migrations are NOT part of onboarding: `create`,
|
|
13
|
+
* `compose`, and `template` all run them as part of their own install flow.
|
|
7
14
|
*/
|
|
8
15
|
export declare function onboardCommand(options?: OnboardOptions): Promise<void>;
|
|
9
16
|
//# sourceMappingURL=onboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/commands/onboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/commands/onboard.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAiB,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAoBpF;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAIV,sBAAsB,EAGvB,MAAM,mBAAmB,CAAC;AAoB3B;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA0VzF"}
|
package/dist/config/bin.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface RadiusPreset {
|
|
2
|
+
/** Stable id used in URLs and flags. */
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** The `--radius` CSS value this preset writes. */
|
|
6
|
+
value: string;
|
|
7
|
+
hint: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const RADIUS_PRESETS: readonly RadiusPreset[];
|
|
10
|
+
/** The `--radius` the base template ships with, and what the picker opens on. */
|
|
11
|
+
export declare const DEFAULT_RADIUS = "0.625rem";
|
|
12
|
+
/** The preset that writes `value`, when one matches exactly. */
|
|
13
|
+
export declare function findRadiusPreset(value: string): RadiusPreset | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Human label for a `--radius` value. Falls back to the raw value so a custom
|
|
16
|
+
* radius from a template manifest still reads sensibly in a picker or a log.
|
|
17
|
+
*/
|
|
18
|
+
export declare function radiusLabel(value: string): string;
|
|
19
|
+
//# sourceMappingURL=radius.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../src/constants/radius.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAOxC,CAAC;AAEX,iFAAiF;AACjF,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAGxE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
package/dist/core/codemods.d.ts
CHANGED
|
@@ -21,14 +21,19 @@ export declare function patchFrontendUrl(frontendRoutes: PackFrontendRoute[], pa
|
|
|
21
21
|
* The admin sidebar's group headers. Applied to the admin shell's nav.constants so
|
|
22
22
|
* every admin-compatible layout renders the same section labels (Analytics for the
|
|
23
23
|
* primary group, Platform for the secondary, More for the tertiary), regardless of
|
|
24
|
-
* the layout's own frontend labels.
|
|
24
|
+
* the layout's own frontend labels. The starters ship these keys in the admin
|
|
25
|
+
* message catalog, so the headers translate with the rest of the shell.
|
|
25
26
|
*/
|
|
26
27
|
export declare const ADMIN_NAV_GROUP_LABELS: NavGroupLabelsInput;
|
|
28
|
+
/** A group header: literal text, or a key resolved through the message catalog. */
|
|
29
|
+
export type NavGroupLabel = string | {
|
|
30
|
+
messageKey: string;
|
|
31
|
+
};
|
|
27
32
|
export type NavGroupLabelsInput = {
|
|
28
|
-
primary?:
|
|
29
|
-
secondary?:
|
|
30
|
-
tertiary?:
|
|
31
|
-
settings?:
|
|
33
|
+
primary?: NavGroupLabel;
|
|
34
|
+
secondary?: NavGroupLabel;
|
|
35
|
+
tertiary?: NavGroupLabel;
|
|
36
|
+
settings?: NavGroupLabel;
|
|
32
37
|
};
|
|
33
38
|
export interface SetNavGroupLabelsOptions {
|
|
34
39
|
labels: NavGroupLabelsInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemods.d.ts","sourceRoot":"","sources":["../../src/core/codemods.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,Q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;;;;;;;;;;GAcG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhG"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ColorMode } from '../constants/themes.js';
|
|
2
|
+
import { CustomizationOptions, StackConfig } from '../types/types.js';
|
|
3
|
+
/** Fully resolved look and feel, one entry per app shell. */
|
|
4
|
+
export interface Customization {
|
|
5
|
+
theme: string;
|
|
6
|
+
adminTheme: string;
|
|
7
|
+
radius: string;
|
|
8
|
+
adminRadius: string;
|
|
9
|
+
mode: ColorMode;
|
|
10
|
+
}
|
|
11
|
+
/** What the pickers open on when no flag pins a value: usually a template's manifest. */
|
|
12
|
+
export interface CustomizationDefaults {
|
|
13
|
+
theme?: string;
|
|
14
|
+
radius?: string;
|
|
15
|
+
mode?: ColorMode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Terminal preview of a corner radius. Box-drawing corners only come in square
|
|
19
|
+
* and round, so the ramp is faked with brightness: the sharper the preset, the
|
|
20
|
+
* dimmer the rounded glyph reads next to it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function radiusSwatch(value: string): string;
|
|
23
|
+
/** Radius picker options, ordered sharp to round with the CSS value as the hint. */
|
|
24
|
+
export declare function radiusChoices(): {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
hint: string;
|
|
28
|
+
}[];
|
|
29
|
+
/** Theme picker options with the light/dark chip pair prefixed to each label. */
|
|
30
|
+
export declare function themeChoices(): {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
/**
|
|
35
|
+
* Narrow the raw flag values to ones the appliers accept. An unparseable flag is
|
|
36
|
+
* dropped rather than fatal, so a typo falls back to the prompt (or the default
|
|
37
|
+
* in `--yes` mode) instead of killing a scaffold halfway through.
|
|
38
|
+
*/
|
|
39
|
+
export declare function validCustomizationFlags(options: CustomizationOptions): CustomizationOptions;
|
|
40
|
+
/** Warn once per flag the user passed that we could not parse. */
|
|
41
|
+
export declare function warnInvalidCustomizationFlags(options: CustomizationOptions): void;
|
|
42
|
+
/**
|
|
43
|
+
* True when nothing was overridden. Callers use this to leave an existing
|
|
44
|
+
* project's look untouched unless the user actually asked for a change.
|
|
45
|
+
*/
|
|
46
|
+
export declare function hasCustomizationFlags(options: CustomizationOptions): boolean;
|
|
47
|
+
/** Resolve flags + defaults without prompting. Used for `--yes` and headless runs. */
|
|
48
|
+
export declare function resolveCustomization(options: CustomizationOptions, defaults?: CustomizationDefaults): Customization;
|
|
49
|
+
/** Section divider so the frontend and admin questions read as two groups, not one long list. */
|
|
50
|
+
export declare function customizationSection(title: string, subtitle: string): void;
|
|
51
|
+
export interface PromptCustomizationArgs {
|
|
52
|
+
options: CustomizationOptions;
|
|
53
|
+
defaults?: CustomizationDefaults;
|
|
54
|
+
/** Skip every question and take flags + defaults (`--yes`, headless). */
|
|
55
|
+
skipPrompts: boolean;
|
|
56
|
+
/** Ask the admin questions. False for projects with no admin app. */
|
|
57
|
+
admin: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Extra admin questions to run when the user declines "copy frontend
|
|
60
|
+
* settings" (compose uses this for the admin layout picker). Not called when
|
|
61
|
+
* settings are copied, or when prompts are skipped.
|
|
62
|
+
*/
|
|
63
|
+
onAdminSection?: () => Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Walk the frontend section (theme, radius) and then the admin section, which
|
|
67
|
+
* opens with "copy the frontend settings?" defaulting to yes. Most people keep
|
|
68
|
+
* both apps in sync, so the common path is one keypress; saying no unfolds the
|
|
69
|
+
* admin's own theme and radius (plus whatever `onAdminSection` adds).
|
|
70
|
+
*/
|
|
71
|
+
export declare function promptCustomization(args: PromptCustomizationArgs): Promise<Customization>;
|
|
72
|
+
/** Human label for a theme id, falling back to the id for anything unknown. */
|
|
73
|
+
export declare function themeLabel(name: string): string;
|
|
74
|
+
export interface ApplyCustomizationArgs {
|
|
75
|
+
projectRoot: string;
|
|
76
|
+
config: StackConfig;
|
|
77
|
+
/**
|
|
78
|
+
* What to write. Every field is optional and an omitted one is left alone, so
|
|
79
|
+
* `compose --admin-theme ocean` retints the dashboard without touching the
|
|
80
|
+
* frontend. Mode is frontend-only; the admin app has no color-mode init.
|
|
81
|
+
*/
|
|
82
|
+
customization: Partial<Customization>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Write the look and feel into a project on disk. Missing style files downgrade
|
|
86
|
+
* to a warning: a pack install that already succeeded should not fail because a
|
|
87
|
+
* template moved its `styles.css`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function applyCustomization(args: ApplyCustomizationArgs): Promise<void>;
|
|
90
|
+
//# sourceMappingURL=customization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customization.d.ts","sourceRoot":"","sources":["../../src/core/customization.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQ3E,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,yFAAyF;AACzF,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,oFAAoF;AACpF,wBAAgB,aAAa,IAAI;IAAE,KAAK,EAAE,M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AAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BpF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StackConfig } from '../types/types.js';
|
|
2
|
+
export interface GeneratedSecret {
|
|
3
|
+
key: string;
|
|
4
|
+
/** Path of the `.env` it landed in, relative to the project root. */
|
|
5
|
+
env: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Roll a real random value for every `generated` var still sitting on its
|
|
9
|
+
* `.env.example` placeholder.
|
|
10
|
+
*
|
|
11
|
+
* Run at the end of an install, which is what makes a fresh project bootable
|
|
12
|
+
* without anyone touching `onboard`: signing and cookie secrets have no external
|
|
13
|
+
* source, so asking a human to invent one only ever produced a worse value than
|
|
14
|
+
* `randomBytes` would. Re-running is safe. A var somebody already set is left
|
|
15
|
+
* alone, because rotating it would sign out every existing session.
|
|
16
|
+
*/
|
|
17
|
+
export declare function applyGeneratedSecrets(projectRoot: string, config: StackConfig | null): Promise<GeneratedSecret[]>;
|
|
18
|
+
//# sourceMappingURL=env-secrets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-secrets.d.ts","sourceRoot":"","sources":["../../src/core/env-secrets.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,OAAO,CAAC,eAAe,EAAE,CAAC,CAwC5B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { EnvSection, EnvVarSetup, OnboardEnvVar, PackEnvExampleVar, PackEnvVar } from '../types/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Everything about deciding which env vars are worth a person's attention.
|
|
4
|
+
*
|
|
5
|
+
* The rule is subtractive: a var is silent unless something says otherwise.
|
|
6
|
+
* Packs declare their own vars in their manifest; the base template's vars are
|
|
7
|
+
* declared in {@link BASE_ENV_SETUP} below, because no pack owns them. Whatever
|
|
8
|
+
* neither covers is a working default that gets copied and never mentioned.
|
|
9
|
+
*/
|
|
10
|
+
/** Placeholder value written to `.env.example` for a var, whichever form it takes. */
|
|
11
|
+
export declare function envVarValue(entry: PackEnvExampleVar): string;
|
|
12
|
+
/** Setup requirement for a var, or null when it is a plain default. */
|
|
13
|
+
export declare function envVarSetup(entry: PackEnvExampleVar): PackEnvVar | null;
|
|
14
|
+
/**
|
|
15
|
+
* Setup requirements for the vars the base template ships in its own
|
|
16
|
+
* `.env.example`. These predate any pack and no manifest claims them, so the
|
|
17
|
+
* knowledge has to live here.
|
|
18
|
+
*
|
|
19
|
+
* Only vars needing a human are listed. The omissions are the point: app URLs,
|
|
20
|
+
* Postgres and Valkey credentials, RustFS keys, and ports all work as shipped
|
|
21
|
+
* against local Docker, so onboarding stays quiet about them.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BASE_ENV_SETUP: Record<string, {
|
|
24
|
+
section: EnvSection;
|
|
25
|
+
setup: EnvVarSetup;
|
|
26
|
+
group?: string;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Flatten a pack's manifest env entries into the per-var records `stack.json`
|
|
30
|
+
* carries. Plain-string vars produce nothing, which is what keeps the recorded
|
|
31
|
+
* list short enough to be worth reading.
|
|
32
|
+
*/
|
|
33
|
+
export declare function collectPackEnvVars(env: {
|
|
34
|
+
envExample: {
|
|
35
|
+
section: EnvSection;
|
|
36
|
+
vars: Record<string, PackEnvExampleVar>;
|
|
37
|
+
};
|
|
38
|
+
}[] | undefined): OnboardEnvVar[];
|
|
39
|
+
/**
|
|
40
|
+
* Merge recorded env vars, last writer wins per key. Reinstalling a pack, or
|
|
41
|
+
* swapping one starter for another that declares the same key, updates the
|
|
42
|
+
* entry in place rather than stacking a duplicate.
|
|
43
|
+
*/
|
|
44
|
+
export declare function mergeEnvVars(previous: OnboardEnvVar[], next: OnboardEnvVar[]): OnboardEnvVar[];
|
|
45
|
+
/**
|
|
46
|
+
* Resolve one `.env.example` key to its setup requirement. Pack declarations win
|
|
47
|
+
* over the base table so a pack can tighten a var the template ships loose.
|
|
48
|
+
* Returns null for a plain default, which the caller copies without asking.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveEnvVarSetup(key: string, recorded: OnboardEnvVar[]): OnboardEnvVar | null;
|
|
51
|
+
/**
|
|
52
|
+
* A random value for a `generated` var. URL-safe base64 over 32 bytes: long
|
|
53
|
+
* enough for cookie and token signing, and free of the quoting problems that
|
|
54
|
+
* make people hand-edit a `.env` at midnight.
|
|
55
|
+
*/
|
|
56
|
+
export declare function generateSecret(): string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether a `generated` var still needs rolling. A value the user (or a
|
|
59
|
+
* previous run) already set is left alone: regenerating it would invalidate
|
|
60
|
+
* every session signed with the old one.
|
|
61
|
+
*/
|
|
62
|
+
export declare function needsGeneratedValue(current: string, exampleValue: string): boolean;
|
|
63
|
+
//# sourceMappingURL=env-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-setup.d.ts","sourceRoot":"","sources":["../../src/core/env-setup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/G;;;;;;;GAOG;AAEH,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAE5D;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,UAAU,GAAG,IAAI,CAEvE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAItG,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE;IAAE,UAAU,EAAE;QAAE,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;KAAE,CAAA;CAAE,EAAE,GAAG,SAAS,GAClG,aAAa,EAAE,CAiBjB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAI9F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,IAAI,CAQ/F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAIlF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StackConfig } from '../types/types.js';
|
|
1
|
+
import { EnvVarSetup, StackConfig } from '../types/types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Read-only version of what `onboard` walks you through. `onboard` asks for each
|
|
4
4
|
* value; this reports which ones are still unset so an agent can tell the user
|
|
@@ -12,6 +12,15 @@ export type EnvVarState =
|
|
|
12
12
|
export interface EnvVarStatus {
|
|
13
13
|
key: string;
|
|
14
14
|
state: EnvVarState;
|
|
15
|
+
/**
|
|
16
|
+
* What this var needs from a human, or null when it is a plain default whose
|
|
17
|
+
* shipped value works as-is. Only `required` vars count toward
|
|
18
|
+
* {@link EnvStatus.missingCount}, so an agent reading this reports the four
|
|
19
|
+
* keys somebody has to go and fetch, not forty lines of localhost URLs.
|
|
20
|
+
*/
|
|
21
|
+
setup: EnvVarSetup | null;
|
|
22
|
+
/** Optional feature these vars belong to, e.g. "Google login". */
|
|
23
|
+
group?: string;
|
|
15
24
|
}
|
|
16
25
|
export interface EnvSectionStatus {
|
|
17
26
|
section: string;
|
|
@@ -31,10 +40,12 @@ export interface EnvFileStatus {
|
|
|
31
40
|
}
|
|
32
41
|
export interface EnvStatus {
|
|
33
42
|
files: EnvFileStatus[];
|
|
34
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Count of unset `required` vars in relevant sections. This is the number that
|
|
45
|
+
* matters: defaults and generated secrets resolve themselves, and an optional
|
|
46
|
+
* var left blank is a feature nobody switched on, not a problem.
|
|
47
|
+
*/
|
|
35
48
|
missingCount: number;
|
|
36
49
|
}
|
|
37
50
|
export declare function collectEnvStatus(projectRoot: string, config: StackConfig | null): Promise<EnvStatus>;
|
|
38
|
-
/** Value of `KEY` in an env file body, or "" when absent or blank. */
|
|
39
|
-
export declare function readValue(envContent: string, key: string): string;
|
|
40
51
|
//# sourceMappingURL=env-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-status.d.ts","sourceRoot":"","sources":["../../src/core/env-status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgC,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"env-status.d.ts","sourceRoot":"","sources":["../../src/core/env-status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgC,WAAW,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAM/G;;;;GAIG;AAEH,MAAM,MAAM,WAAW;AACrB,2CAA2C;AACzC,SAAS;AACX,uGAAuG;GACrG,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,WAAW,CAAC;IACnB;;;;;OAKG;IACH,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAuB1G"}
|
package/dist/core/installer.d.ts
CHANGED
|
@@ -26,8 +26,9 @@ export interface FileConflict {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Find every file that `applyPackInstall` would silently skip because its target already exists.
|
|
29
|
-
* Only `create` files can conflict: `skip-if-exists` is an intentional no-op and `merge`
|
|
30
|
-
* existing file in place. Deduplicated by resolved path so the same target is
|
|
29
|
+
* Only `create` files can conflict: `skip-if-exists` is an intentional no-op and `merge` /
|
|
30
|
+
* `merge-json` edit the existing file in place. Deduplicated by resolved path so the same target is
|
|
31
|
+
* never reported twice.
|
|
31
32
|
*/
|
|
32
33
|
export declare function findInstallConflicts(options: {
|
|
33
34
|
packs: PreparedPack[];
|
|
@@ -81,11 +82,12 @@ export declare function installPlan(options: {
|
|
|
81
82
|
slotsByPack?: Map<string, PackSlot[]>;
|
|
82
83
|
}): Promise<InstallPlanResult>;
|
|
83
84
|
/**
|
|
84
|
-
* Record a pack as installed in `stack.json`: append it to `installedPacks
|
|
85
|
-
* merge the
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
85
|
+
* Record a pack as installed in `stack.json`: append it to `installedPacks`, and
|
|
86
|
+
* merge in both the env sections and the per-var setup requirements its manifest
|
|
87
|
+
* declares. Those two lists are what `onboard` reads, so onboarding is driven by
|
|
88
|
+
* the packs actually installed instead of by whatever happens to be sitting in
|
|
89
|
+
* `.env.example`. The per-var list is the one that matters: a var missing from it
|
|
90
|
+
* is a working default nobody gets asked about.
|
|
89
91
|
*/
|
|
90
92
|
export declare function markPackInstalled(config: StackConfig, manifest: PackManifest | string, projectRoot: string): Promise<StackConfig>;
|
|
91
93
|
export interface TemplateOverlayResult {
|
|
@@ -105,9 +107,11 @@ export interface TemplateOverlayResult {
|
|
|
105
107
|
* pages and its logo SVGs) all install and win over pack equivalents, instead
|
|
106
108
|
* of silently going missing because the manifest forgot to list them.
|
|
107
109
|
*
|
|
108
|
-
* `merge
|
|
109
|
-
* meant to be
|
|
110
|
-
*
|
|
110
|
+
* `merge` and `merge-json` manifest entries are the one exception: those are
|
|
111
|
+
* fragments meant to be folded into an existing file, not copied wholesale, so
|
|
112
|
+
* they are skipped during the tree copy and applied through `installFile`. That
|
|
113
|
+
* matters most for the message catalog, where copying the template's fragment
|
|
114
|
+
* over the target would drop every key the packs contributed.
|
|
111
115
|
*
|
|
112
116
|
* It also runs the template's frontend-route, nav, and post-login-redirect
|
|
113
117
|
* codemods so the generated app knows about the new routes and sidebar entries.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/core/installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAY,YAAY,EAA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OAAO,EAAE;IAClD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwGjC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON-aware merging for files that several packs contribute to.
|
|
3
|
+
*
|
|
4
|
+
* The text `merge` strategy splices strings at a marker, which cannot work for a
|
|
5
|
+
* shared JSON document: two packs appending their own object would produce
|
|
6
|
+
* invalid JSON. Paraglide message catalogs are exactly that case, so `merge-json`
|
|
7
|
+
* parses both sides and merges them structurally instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare class JsonMergeError extends Error {
|
|
10
|
+
}
|
|
11
|
+
type JsonObject = Record<string, unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* Merge `source` into `target`, source winning on conflicts.
|
|
14
|
+
*
|
|
15
|
+
* Key order is what makes the result reviewable: keys already in the target keep
|
|
16
|
+
* their position (so a re-install produces no diff noise) and genuinely new keys
|
|
17
|
+
* append in source order. `$schema` is pinned to the top the way editors and the
|
|
18
|
+
* inlang tooling expect to find it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function deepMergeJson(target: JsonObject, source: JsonObject): JsonObject;
|
|
21
|
+
/**
|
|
22
|
+
* Merge two JSON documents given as text and render the result. Formatting is
|
|
23
|
+
* fixed at two-space indent with a trailing newline so the file matches what the
|
|
24
|
+
* repo's formatter would produce and does not churn between installs.
|
|
25
|
+
*/
|
|
26
|
+
export declare function mergeJsonContent(options: {
|
|
27
|
+
target: string;
|
|
28
|
+
source: string;
|
|
29
|
+
targetLabel: string;
|
|
30
|
+
sourceLabel: string;
|
|
31
|
+
}): string;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=merge-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-json.d.ts","sourceRoot":"","sources":["../../src/core/merge-json.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAmB1C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAwBhF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAIT"}
|
|
@@ -15,6 +15,11 @@ export interface EnvSection {
|
|
|
15
15
|
* text after the first `=` so URLs with query params survive.
|
|
16
16
|
*/
|
|
17
17
|
export declare function parseEnvExample(content: string): EnvSection[];
|
|
18
|
+
/**
|
|
19
|
+
* Value of `KEY` in an env file body, or "" when absent or blank. Commented-out
|
|
20
|
+
* lines do not count: a `# KEY=...` line is documentation, not a setting.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readEnvValue(content: string, key: string): string;
|
|
18
23
|
/**
|
|
19
24
|
* Mask a current env value for display in a prompt so a real secret is never
|
|
20
25
|
* echoed in full to the terminal (or scrollback / screen shares). Only the last
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboard-env.d.ts","sourceRoot":"","sources":["../../src/core/onboard-env.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,e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AAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA0B/E;AAED,iEAAiE;AACjE,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAInE;AAED,mFAAmF;AACnF,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E;AAED,kFAAkF;AAClF,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../src/deploy/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../src/deploy/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAgBzD,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAuH7C,CAAC"}
|
|
@@ -16,6 +16,11 @@ export interface BuildEnvPlanInput {
|
|
|
16
16
|
localEnv?: Partial<Record<DeployTarget, Record<string, string>>>;
|
|
17
17
|
/** Keys each app declares in `.env.example`, used to decide what to forward and what is missing. */
|
|
18
18
|
declaredKeys?: Partial<Record<DeployTarget, string[]>>;
|
|
19
|
+
/**
|
|
20
|
+
* Values from each app's `.env.example`, used as a starting point for keys
|
|
21
|
+
* nothing else can fill.
|
|
22
|
+
*/
|
|
23
|
+
exampleEnv?: Partial<Record<DeployTarget, Record<string, string>>>;
|
|
19
24
|
/**
|
|
20
25
|
* Keys a provider wired onto the app itself, out of band (Fly's `mpg attach`
|
|
21
26
|
* sets `DATABASE_URL` this way). Nothing local knows the value, but the app
|
|
@@ -28,6 +33,7 @@ export interface PreviewEnvPlanInput {
|
|
|
28
33
|
plan: DeployPlan;
|
|
29
34
|
localEnv?: Partial<Record<DeployTarget, Record<string, string>>>;
|
|
30
35
|
declaredKeys?: Partial<Record<DeployTarget, string[]>>;
|
|
36
|
+
exampleEnv?: Partial<Record<DeployTarget, Record<string, string>>>;
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* The env plan as it will look once the run has settled every origin and
|
|
@@ -53,7 +59,10 @@ interface ManagedEnvInput {
|
|
|
53
59
|
* empty `VITE_API_BASE_URL` over a working one.
|
|
54
60
|
*/
|
|
55
61
|
export declare function managedEnvFor(input: ManagedEnvInput): Record<string, string>;
|
|
56
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Every env var to apply to a target. What the deploy wired beats what the
|
|
64
|
+
* developer's `.env` had, which in turn beats a placeholder from `.env.example`.
|
|
65
|
+
*/
|
|
57
66
|
export declare function mergedEnv(plan: TargetEnvPlan): Record<string, string>;
|
|
58
67
|
/**
|
|
59
68
|
* Parse a `.env` file into a flat map. Handles the `export KEY=value` prefix and
|