@hype-stack/cli 0.5.19 → 0.5.21

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.
@@ -13,7 +13,7 @@ import { Prompt as O } from "@clack/core";
13
13
  import { styleText as k } from "node:util";
14
14
  import { downloadTemplate as ee } from "giget";
15
15
  //#region src/constants/constants.ts
16
- var A = "0.5.19", j = "gh:BetterTyped/hype-stack", M = "stack.json", te = "/schema/stack.json", N = "https://api.hype-stack.dev", P = "HYPE_STACK_API_URL", F = "https://www.hype-stack.dev", ne = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/, I = [
16
+ var A = "0.5.21", j = "gh:BetterTyped/hype-stack", M = "stack.json", te = "/schema/stack.json", N = "https://api.hype-stack.dev", P = "HYPE_STACK_API_URL", F = "https://www.hype-stack.dev", ne = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/, I = [
17
17
  {
18
18
  value: "cursor",
19
19
  label: "Cursor",
@@ -3847,7 +3847,11 @@ function Ya(e, t = {}) {
3847
3847
  };
3848
3848
  }
3849
3849
  function Xa(e, t, n) {
3850
- return [...e.map((e) => n.chosen.get(e.family) ?? e.default), ...t];
3850
+ let r = e.map((e) => n.chosen.get(e.family) ?? e.default), i = new Set(e.map((e) => e.family)), a = t.filter((e) => {
3851
+ let t = n.familyOf.get(e);
3852
+ return !(t && i.has(t));
3853
+ });
3854
+ return [...r, ...a];
3851
3855
  }
3852
3856
  function Za(e, t) {
3853
3857
  let n = t.familyOf.get(e);
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as e } from "../cli-ZWQz14xS.js";
2
+ import { t as e } from "../cli-CBYSIoqt.js";
3
3
  Object.freeze({ status: "aborted" });
4
4
  function t(e, t, n) {
5
5
  function r(n, r) {
@@ -23,6 +23,16 @@ export declare function buildVariantContext(slots: TemplateSlot[], choices?: Rec
23
23
  * per slot, plus the template's fixed feature packs. Order is slots first (so
24
24
  * starters/layouts land before features in the resolved plan), matching how the
25
25
  * compose picker groups them.
26
+ *
27
+ * !!! REGRESSION GUARD - READ BEFORE CHANGING !!!
28
+ * `fixedPacks` is the backend's `TemplateListItem.packs`, and that list INCLUDES the default slot
29
+ * variants (see `mapTemplate` -> `slotDefaultsAndFixedPacks` in the backend: it prepends
30
+ * `slots.map(slotDefaultPack)`). It exists for display/ownership, not for install. If we blindly
31
+ * concatenated it with the slot picks, the DEFAULT starter (Better Auth for `starter-saas`) would be
32
+ * installed alongside the variant the user actually chose. That is the "I picked WorkOS but still got
33
+ * Better Auth env + a starter-saas-betterauth overwrite prompt" bug. So we drop any fixed pack that
34
+ * belongs to a slot's family; the slot pick above is the single source of truth for that family.
35
+ * Covered by `variants.test.ts` -> "REGRESSION: a template.packs slot default never overrides the pick".
26
36
  */
27
37
  export declare function expandTemplate(slots: TemplateSlot[], fixedPacks: string[], ctx: VariantContext): string[];
28
38
  /** Swap a pack for the chosen variant of its family, or return it unchanged when it is not in a family. */
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/core/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,iFAAiF;IACjF,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,cAAc,CAa/G;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,MA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;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,YAAY,EAAE,CAK7F"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-ZWQz14xS.js";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-CBYSIoqt.js";
2
2
  export { t as composeCommand, a as createCommand, o as createProgram, e as ensureInit, r as initCommand, i as loginCommand, n as logoutCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hype-stack/cli",
3
- "version": "0.5.19",
3
+ "version": "0.5.21",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",