@hype-stack/cli 1.3.0 → 1.3.1

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.
@@ -8,6 +8,8 @@ import { OnboardOptions } from '../types/types.js';
8
8
  * (declared per pack, see `core/env-setup.ts`) and only two kinds get asked
9
9
  * about: `required`, which is prompted, and `optional`, which is offered once per
10
10
  * feature. Defaults are copied and generated secrets are rolled, both silently.
11
+ * Values already filled in are still offered, one yes/no per feature defaulting
12
+ * to no, so re-running the command can rotate a key or revisit a skipped feature.
11
13
  *
12
14
  * Docker and database migrations are NOT part of onboarding: `create`,
13
15
  * `compose`, and `template` all run them as part of their own install flow.
@@ -1 +1 @@
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
+ {"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/commands/onboard.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAiB,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAsBpF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DhF"}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { d as e, n as t, t as n, u as r } from "../cli-CZanCLn9.js";
2
+ import { d as e, n as t, t as n, u as r } from "../cli-DaiPw0YU.js";
3
3
  import { z as i } from "zod";
4
4
  import * as a from "@sentry/node";
5
5
  //#region src/core/sentry.ts
@@ -1 +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"}
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,CAyC5B"}
@@ -25,6 +25,24 @@ export declare const BASE_ENV_SETUP: Record<string, {
25
25
  setup: EnvVarSetup;
26
26
  group?: string;
27
27
  }>;
28
+ /**
29
+ * Fallback setup requirements for the vars the packs declare in their manifests.
30
+ *
31
+ * The manifest declarations recorded in `stack.json` are the source of truth,
32
+ * but a project installed with an older CLI has nothing recorded, and hiding
33
+ * WorkOS keys or Stripe secrets from onboarding because of a version gap would
34
+ * make the command lie by omission. This table is the safety net: it mirrors
35
+ * the manifests and only kicks in for keys `stack.json` says nothing about.
36
+ *
37
+ * Unlike {@link BASE_ENV_SETUP}, these vars belong to packs the project may not
38
+ * have, so each entry is gated on its section being declared by an installed
39
+ * pack. A leftover WorkOS block after switching to Better Auth stays silent.
40
+ */
41
+ export declare const PACK_ENV_SETUP: Record<string, {
42
+ section: EnvSection;
43
+ setup: EnvVarSetup;
44
+ group?: string;
45
+ }>;
28
46
  /**
29
47
  * Flatten a pack's manifest env entries into the per-var records `stack.json`
30
48
  * carries. Plain-string vars produce nothing, which is what keeps the recorded
@@ -43,11 +61,12 @@ export declare function collectPackEnvVars(env: {
43
61
  */
44
62
  export declare function mergeEnvVars(previous: OnboardEnvVar[], next: OnboardEnvVar[]): OnboardEnvVar[];
45
63
  /**
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.
64
+ * Resolve one `.env.example` key to its setup requirement. Pack declarations
65
+ * recorded in `stack.json` win, then the base table, then the pack fallback
66
+ * table (only when its section belongs to an installed pack). Returns null for
67
+ * a plain default, which the caller copies without asking.
49
68
  */
50
- export declare function resolveEnvVarSetup(key: string, recorded: OnboardEnvVar[]): OnboardEnvVar | null;
69
+ export declare function resolveEnvVarSetup(key: string, recorded: OnboardEnvVar[], installedEnvSections?: EnvSection[]): OnboardEnvVar | null;
51
70
  /**
52
71
  * A random value for a `generated` var. URL-safe base64 over 32 bytes: long
53
72
  * enough for cookie and token signing, and free of the quoting problems that
@@ -1 +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,C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C;AAEF;;;;;;;;;;;;GAYG;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,CAatG,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;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,aAAa,EAAE,EACzB,oBAAoB,GAAE,UAAU,EAAO,GACtC,aAAa,GAAG,IAAI,CAatB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAIlF"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-CZanCLn9.js";
1
+ import { a as e, c as t, i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-DaiPw0YU.js";
2
2
  export { i as composeCommand, r as createCommand, s as createProgram, e as deployCommand, o as ensureInit, t as initCommand, n as loginCommand, a as logoutCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hype-stack/cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",