@forgecart/cli 2.202610040759.0 → 2.202610041623.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/src/commands/__test__/cli-harness.d.ts +22 -1
- package/dist/src/commands/__test__/cli-harness.js +26 -3
- package/dist/src/commands/__test__/cli-harness.js.map +1 -1
- package/dist/src/commands/design-system-seat.d.ts +8 -5
- package/dist/src/commands/design-system-seat.js +6 -8
- package/dist/src/commands/design-system-seat.js.map +1 -1
- package/dist/src/commands/init-questions.d.ts +3 -2
- package/dist/src/commands/init-questions.js +5 -4
- package/dist/src/commands/init-questions.js.map +1 -1
- package/dist/src/commands/init.d.ts +25 -12
- package/dist/src/commands/init.js +186 -64
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/refresh.d.ts +5 -3
- package/dist/src/commands/refresh.js +40 -16
- package/dist/src/commands/refresh.js.map +1 -1
- package/dist/src/commands/template-manifest.d.ts +18 -9
- package/dist/src/commands/template-manifest.js +22 -17
- package/dist/src/commands/template-manifest.js.map +1 -1
- package/dist/src/commands/type/init.types.d.ts +6 -3
- package/dist/src/template/template-set.d.ts +22 -7
- package/dist/src/template/template-set.js +36 -11
- package/dist/src/template/template-set.js.map +1 -1
- package/dist/src/template/template-unavailable-error.d.ts +5 -6
- package/dist/src/template/template-unavailable-error.js +6 -14
- package/dist/src/template/template-unavailable-error.js.map +1 -1
- package/dist/src/template/type/template-set.types.d.ts +20 -2
- package/dist/src/template/type/template-set.types.js.map +1 -1
- package/dist/src/template/util/template-identity.util.d.ts +23 -0
- package/dist/src/template/util/template-identity.util.js +41 -0
- package/dist/src/template/util/template-identity.util.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type TemplateIdentity } from '../type/template-set.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The template a record that names no identity stands for: until #2774 every
|
|
4
|
+
* CLI rendered exactly one template, and until #2775 every workspace-pod image
|
|
5
|
+
* warmed exactly that one — the daisyUI storefront. A template manifest
|
|
6
|
+
* without an identity was rendered from it, and a warmed template without an
|
|
7
|
+
* identity file was warmed from it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PRE_IDENTITY_TEMPLATE: Readonly<TemplateIdentity>;
|
|
10
|
+
/** Whether `identity` names a blank storefront: no example, so no template to render (#2775). */
|
|
11
|
+
export declare function isBlankTemplate(identity: TemplateIdentity): boolean;
|
|
12
|
+
/** Whether two identities name the same UI framework and the same example. */
|
|
13
|
+
export declare function sameTemplateIdentity(a: TemplateIdentity, b: TemplateIdentity): boolean;
|
|
14
|
+
/** An identity in words, as a printed line names it: `daisyui/storefront`. */
|
|
15
|
+
export declare function describeTemplateIdentity({ uiFramework, example }: TemplateIdentity): string;
|
|
16
|
+
/**
|
|
17
|
+
* The identity a stored value records — a warmed template's identity file, a
|
|
18
|
+
* manifest's `template` — or null when it records none: absent, or not an
|
|
19
|
+
* object carrying both ids as strings. Shape-only, like the design-system
|
|
20
|
+
* seat's reader: which identities a release renders is the template set's to
|
|
21
|
+
* say.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseTemplateIdentity(value: unknown): TemplateIdentity | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isJsonObject } from '../../json.js';
|
|
2
|
+
import { BLANK_EXAMPLE } from '../type/template-set.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The template a record that names no identity stands for: until #2774 every
|
|
5
|
+
* CLI rendered exactly one template, and until #2775 every workspace-pod image
|
|
6
|
+
* warmed exactly that one — the daisyUI storefront. A template manifest
|
|
7
|
+
* without an identity was rendered from it, and a warmed template without an
|
|
8
|
+
* identity file was warmed from it.
|
|
9
|
+
*/
|
|
10
|
+
export const PRE_IDENTITY_TEMPLATE = {
|
|
11
|
+
uiFramework: 'daisyui',
|
|
12
|
+
example: 'storefront',
|
|
13
|
+
};
|
|
14
|
+
/** Whether `identity` names a blank storefront: no example, so no template to render (#2775). */
|
|
15
|
+
export function isBlankTemplate(identity) {
|
|
16
|
+
return identity.example === BLANK_EXAMPLE;
|
|
17
|
+
}
|
|
18
|
+
/** Whether two identities name the same UI framework and the same example. */
|
|
19
|
+
export function sameTemplateIdentity(a, b) {
|
|
20
|
+
return a.uiFramework === b.uiFramework && a.example === b.example;
|
|
21
|
+
}
|
|
22
|
+
/** An identity in words, as a printed line names it: `daisyui/storefront`. */
|
|
23
|
+
export function describeTemplateIdentity({ uiFramework, example }) {
|
|
24
|
+
return `${uiFramework}/${example}`;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The identity a stored value records — a warmed template's identity file, a
|
|
28
|
+
* manifest's `template` — or null when it records none: absent, or not an
|
|
29
|
+
* object carrying both ids as strings. Shape-only, like the design-system
|
|
30
|
+
* seat's reader: which identities a release renders is the template set's to
|
|
31
|
+
* say.
|
|
32
|
+
*/
|
|
33
|
+
export function parseTemplateIdentity(value) {
|
|
34
|
+
if (!isJsonObject(value))
|
|
35
|
+
return null;
|
|
36
|
+
const { uiFramework, example } = value;
|
|
37
|
+
if (typeof uiFramework !== 'string' || typeof example !== 'string')
|
|
38
|
+
return null;
|
|
39
|
+
return { uiFramework, example };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=template-identity.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-identity.util.js","sourceRoot":"","sources":["../../../../src/template/util/template-identity.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAyB,MAAM,+BAA+B,CAAC;AAErF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA+B;IAC/D,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,iGAAiG;AACjG,MAAM,UAAU,eAAe,CAAC,QAA0B;IACxD,OAAO,QAAQ,CAAC,OAAO,KAAK,aAAa,CAAC;AAC5C,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,oBAAoB,CAAC,CAAmB,EAAE,CAAmB;IAC3E,OAAO,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;AACpE,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,wBAAwB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAoB;IACjF,OAAO,GAAG,WAAW,IAAI,OAAO,EAAE,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACvC,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAChF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC"}
|