@forgecart/cli 2.202610280742.0 → 2.202610280926.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/init-questions.d.ts +12 -11
- package/dist/src/commands/init-questions.js +15 -23
- package/dist/src/commands/init-questions.js.map +1 -1
- package/dist/src/commands/init.d.ts +13 -13
- package/dist/src/commands/init.js +75 -144
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/refresh.d.ts +3 -3
- package/dist/src/commands/refresh.js +4 -14
- package/dist/src/commands/refresh.js.map +1 -1
- package/dist/src/commands/template-manifest.d.ts +2 -5
- package/dist/src/commands/template-manifest.js +1 -1
- package/dist/src/commands/template-manifest.js.map +1 -1
- package/dist/src/commands/type/init.input.d.ts +1 -1
- package/dist/src/commands/type/init.types.d.ts +4 -4
- package/dist/src/template/template-set.d.ts +17 -27
- package/dist/src/template/template-set.js +25 -42
- package/dist/src/template/template-set.js.map +1 -1
- package/dist/src/template/template-unavailable-error.d.ts +3 -4
- package/dist/src/template/template-unavailable-error.js +3 -4
- package/dist/src/template/template-unavailable-error.js.map +1 -1
- package/dist/src/template/type/template-set.types.d.ts +14 -17
- package/dist/src/template/type/template-set.types.js +6 -1
- package/dist/src/template/type/template-set.types.js.map +1 -1
- package/dist/src/template/util/template-identity.util.d.ts +1 -3
- package/dist/src/template/util/template-identity.util.js +0 -5
- package/dist/src/template/util/template-identity.util.js.map +1 -1
- package/package.json +1 -1
- package/templates/storefront-blank/.forgecartignore +2 -0
- package/templates/storefront-blank/Procfile +1 -0
- package/templates/storefront-blank/README.md +86 -0
- package/templates/storefront-blank/SEO-MIGRATION.md +718 -0
- package/templates/storefront-blank/_gitignore +21 -0
- package/templates/storefront-blank/next.config.js +105 -0
- package/templates/storefront-blank/package.json +35 -0
- package/templates/storefront-blank/postcss.config.js +5 -0
- package/templates/storefront-blank/src/app/%5F%5Ffc/identify/route.ts +205 -0
- package/templates/storefront-blank/src/app/%5F%5Ffc/track/route.ts +189 -0
- package/templates/storefront-blank/src/app/%5F%5Fforge_beacon/route.ts +87 -0
- package/templates/storefront-blank/src/app/api/%5F%5Fbackend/methods/route.ts +27 -0
- package/templates/storefront-blank/src/app/error.tsx +21 -0
- package/templates/storefront-blank/src/app/global-error.tsx +23 -0
- package/templates/storefront-blank/src/app/globals.css +110 -0
- package/templates/storefront-blank/src/app/layout.tsx +102 -0
- package/templates/storefront-blank/src/app/page.tsx +52 -0
- package/templates/storefront-blank/src/app/pages/[slug]/not-found.tsx +23 -0
- package/templates/storefront-blank/src/app/pages/[slug]/page.tsx +115 -0
- package/templates/storefront-blank/src/app/ping/route.ts +21 -0
- package/templates/storefront-blank/src/app/robots.ts +69 -0
- package/templates/storefront-blank/src/app/sitemap.ts +107 -0
- package/templates/storefront-blank/src/components/ForgeErrorBeacon.tsx +102 -0
- package/templates/storefront-blank/src/components/ForgeTracker.tsx +479 -0
- package/templates/storefront-blank/src/components/ForgecartDesigner.tsx +43 -0
- package/templates/storefront-blank/src/components/LocaleLink.tsx +49 -0
- package/templates/storefront-blank/src/instrumentation.ts +109 -0
- package/templates/storefront-blank/src/lib/account/account-link.ts +76 -0
- package/templates/storefront-blank/src/lib/account/account-state.ts +152 -0
- package/templates/storefront-blank/src/lib/account/register-state.ts +133 -0
- package/templates/storefront-blank/src/lib/account/reset-password-state.ts +111 -0
- package/templates/storefront-blank/src/lib/account/verify-state.ts +56 -0
- package/templates/storefront-blank/src/lib/account-actions.ts +76 -0
- package/templates/storefront-blank/src/lib/account-session.ts +114 -0
- package/templates/storefront-blank/src/lib/action-result.ts +30 -0
- package/templates/storefront-blank/src/lib/asset-alt.ts +34 -0
- package/templates/storefront-blank/src/lib/backend-actions.ts +20 -0
- package/templates/storefront-blank/src/lib/backend-client.ts +47 -0
- package/templates/storefront-blank/src/lib/cart-context.tsx +236 -0
- package/templates/storefront-blank/src/lib/checkout-session.ts +185 -0
- package/templates/storefront-blank/src/lib/content/page-metadata.ts +113 -0
- package/templates/storefront-blank/src/lib/content/render-fields.tsx +256 -0
- package/templates/storefront-blank/src/lib/content/resolve-page.ts +143 -0
- package/templates/storefront-blank/src/lib/error-messages.ts +118 -0
- package/templates/storefront-blank/src/lib/experiments.ts +333 -0
- package/templates/storefront-blank/src/lib/forgecart.ts +464 -0
- package/templates/storefront-blank/src/lib/format.ts +89 -0
- package/templates/storefront-blank/src/lib/identify-forward.ts +152 -0
- package/templates/storefront-blank/src/lib/locale/channel-locales-loader.ts +169 -0
- package/templates/storefront-blank/src/lib/locale/channel-locales-map.ts +46 -0
- package/templates/storefront-blank/src/lib/locale/channel-locales.ts +191 -0
- package/templates/storefront-blank/src/lib/locale/grammar.ts +194 -0
- package/templates/storefront-blank/src/lib/locale/localized-path.ts +55 -0
- package/templates/storefront-blank/src/lib/locale/middleware-plan.ts +107 -0
- package/templates/storefront-blank/src/lib/locale/request-binding.ts +80 -0
- package/templates/storefront-blank/src/lib/locale/request-locale.ts +66 -0
- package/templates/storefront-blank/src/lib/marketing-params.ts +213 -0
- package/templates/storefront-blank/src/lib/money.ts +50 -0
- package/templates/storefront-blank/src/lib/seo/alternates.ts +123 -0
- package/templates/storefront-blank/src/lib/seo/json-ld.ts +266 -0
- package/templates/storefront-blank/src/lib/seo/metadata.ts +419 -0
- package/templates/storefront-blank/src/lib/seo/noindex.ts +223 -0
- package/templates/storefront-blank/src/lib/seo/public-origin.ts +166 -0
- package/templates/storefront-blank/src/lib/seo/redirect-plan.ts +86 -0
- package/templates/storefront-blank/src/lib/seo/resolve-path.ts +107 -0
- package/templates/storefront-blank/src/lib/seo/scaffolded-routes.ts +83 -0
- package/templates/storefront-blank/src/lib/seo/sidecar.ts +75 -0
- package/templates/storefront-blank/src/lib/seo/site-verification.ts +98 -0
- package/templates/storefront-blank/src/lib/seo/sitemap-cache.ts +114 -0
- package/templates/storefront-blank/src/lib/seo/sitemap-entries.ts +310 -0
- package/templates/storefront-blank/src/lib/session-actions.ts +61 -0
- package/templates/storefront-blank/src/lib/session-cookies.ts +98 -0
- package/templates/storefront-blank/src/lib/shop-config.ts +51 -0
- package/templates/storefront-blank/src/lib/shop-session.ts +204 -0
- package/templates/storefront-blank/src/lib/track-forward.ts +200 -0
- package/templates/storefront-blank/src/lib/uuid.ts +19 -0
- package/templates/storefront-blank/src/middleware.ts +379 -0
- package/templates/storefront-blank/src/seo/redirects.ts +44 -0
- package/templates/storefront-blank/src/seo/static-routes.ts +12 -0
- package/templates/storefront-blank/src/server/app.module.ts +18 -0
- package/templates/storefront-blank/src/server/backend-api.ts +21 -0
- package/templates/storefront-blank/src/server/backend-method.decorator.ts +23 -0
- package/templates/storefront-blank/src/server/bootstrap.ts +122 -0
- package/templates/storefront-blank/src/server/forge/live-revision.ts +158 -0
- package/templates/storefront-blank/src/server/forgecart/forgecart-client.factory.ts +73 -0
- package/templates/storefront-blank/src/server/forgecart/forgecart.module.ts +9 -0
- package/templates/storefront-blank/src/server/runner.ts +90 -0
- package/templates/storefront-blank/src/server/types.ts +36 -0
- package/templates/storefront-blank/tsconfig.json +25 -0
- package/templates/storefront-blank-sdk-floor.json +1174 -0
- package/templates/storefront-shadcn-blank/.forgecartignore +2 -0
- package/templates/storefront-shadcn-blank/Procfile +1 -0
- package/templates/storefront-shadcn-blank/README.md +93 -0
- package/templates/storefront-shadcn-blank/SEO-MIGRATION.md +718 -0
- package/templates/storefront-shadcn-blank/_gitignore +21 -0
- package/templates/storefront-shadcn-blank/components.json +20 -0
- package/templates/storefront-shadcn-blank/next.config.js +105 -0
- package/templates/storefront-shadcn-blank/package.json +42 -0
- package/templates/storefront-shadcn-blank/postcss.config.js +5 -0
- package/templates/storefront-shadcn-blank/src/app/%5F%5Ffc/identify/route.ts +205 -0
- package/templates/storefront-shadcn-blank/src/app/%5F%5Ffc/track/route.ts +189 -0
- package/templates/storefront-shadcn-blank/src/app/%5F%5Fforge_beacon/route.ts +87 -0
- package/templates/storefront-shadcn-blank/src/app/api/%5F%5Fbackend/methods/route.ts +27 -0
- package/templates/storefront-shadcn-blank/src/app/error.tsx +23 -0
- package/templates/storefront-shadcn-blank/src/app/global-error.tsx +23 -0
- package/templates/storefront-shadcn-blank/src/app/globals.css +156 -0
- package/templates/storefront-shadcn-blank/src/app/layout.tsx +102 -0
- package/templates/storefront-shadcn-blank/src/app/page.tsx +53 -0
- package/templates/storefront-shadcn-blank/src/app/pages/[slug]/not-found.tsx +24 -0
- package/templates/storefront-shadcn-blank/src/app/pages/[slug]/page.tsx +115 -0
- package/templates/storefront-shadcn-blank/src/app/ping/route.ts +21 -0
- package/templates/storefront-shadcn-blank/src/app/robots.ts +69 -0
- package/templates/storefront-shadcn-blank/src/app/sitemap.ts +107 -0
- package/templates/storefront-shadcn-blank/src/components/ForgeErrorBeacon.tsx +102 -0
- package/templates/storefront-shadcn-blank/src/components/ForgeTracker.tsx +479 -0
- package/templates/storefront-shadcn-blank/src/components/ForgecartDesigner.tsx +43 -0
- package/templates/storefront-shadcn-blank/src/components/LocaleLink.tsx +49 -0
- package/templates/storefront-shadcn-blank/src/components/ui/alert.tsx +75 -0
- package/templates/storefront-shadcn-blank/src/components/ui/badge.tsx +40 -0
- package/templates/storefront-shadcn-blank/src/components/ui/button.tsx +64 -0
- package/templates/storefront-shadcn-blank/src/components/ui/card.tsx +28 -0
- package/templates/storefront-shadcn-blank/src/components/ui/input.tsx +26 -0
- package/templates/storefront-shadcn-blank/src/components/ui/label.tsx +22 -0
- package/templates/storefront-shadcn-blank/src/components/ui/native-select.tsx +27 -0
- package/templates/storefront-shadcn-blank/src/components/ui/skeleton.tsx +21 -0
- package/templates/storefront-shadcn-blank/src/components/ui/utils.ts +16 -0
- package/templates/storefront-shadcn-blank/src/instrumentation.ts +109 -0
- package/templates/storefront-shadcn-blank/src/lib/account/account-link.ts +76 -0
- package/templates/storefront-shadcn-blank/src/lib/account/account-state.ts +152 -0
- package/templates/storefront-shadcn-blank/src/lib/account/register-state.ts +133 -0
- package/templates/storefront-shadcn-blank/src/lib/account/reset-password-state.ts +111 -0
- package/templates/storefront-shadcn-blank/src/lib/account/verify-state.ts +56 -0
- package/templates/storefront-shadcn-blank/src/lib/account-actions.ts +76 -0
- package/templates/storefront-shadcn-blank/src/lib/account-session.ts +114 -0
- package/templates/storefront-shadcn-blank/src/lib/action-result.ts +30 -0
- package/templates/storefront-shadcn-blank/src/lib/asset-alt.ts +34 -0
- package/templates/storefront-shadcn-blank/src/lib/backend-actions.ts +20 -0
- package/templates/storefront-shadcn-blank/src/lib/backend-client.ts +47 -0
- package/templates/storefront-shadcn-blank/src/lib/cart-context.tsx +236 -0
- package/templates/storefront-shadcn-blank/src/lib/checkout-session.ts +185 -0
- package/templates/storefront-shadcn-blank/src/lib/content/page-metadata.ts +113 -0
- package/templates/storefront-shadcn-blank/src/lib/content/render-fields.tsx +256 -0
- package/templates/storefront-shadcn-blank/src/lib/content/resolve-page.ts +143 -0
- package/templates/storefront-shadcn-blank/src/lib/error-messages.ts +118 -0
- package/templates/storefront-shadcn-blank/src/lib/experiments.ts +333 -0
- package/templates/storefront-shadcn-blank/src/lib/forgecart.ts +464 -0
- package/templates/storefront-shadcn-blank/src/lib/format.ts +89 -0
- package/templates/storefront-shadcn-blank/src/lib/identify-forward.ts +152 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/channel-locales-loader.ts +169 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/channel-locales-map.ts +46 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/channel-locales.ts +191 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/grammar.ts +194 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/localized-path.ts +55 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/middleware-plan.ts +107 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/request-binding.ts +80 -0
- package/templates/storefront-shadcn-blank/src/lib/locale/request-locale.ts +66 -0
- package/templates/storefront-shadcn-blank/src/lib/marketing-params.ts +213 -0
- package/templates/storefront-shadcn-blank/src/lib/money.ts +50 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/alternates.ts +123 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/json-ld.ts +266 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/metadata.ts +419 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/noindex.ts +223 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/public-origin.ts +166 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/redirect-plan.ts +86 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/resolve-path.ts +107 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/scaffolded-routes.ts +83 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/sidecar.ts +75 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/site-verification.ts +98 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/sitemap-cache.ts +114 -0
- package/templates/storefront-shadcn-blank/src/lib/seo/sitemap-entries.ts +310 -0
- package/templates/storefront-shadcn-blank/src/lib/session-actions.ts +61 -0
- package/templates/storefront-shadcn-blank/src/lib/session-cookies.ts +98 -0
- package/templates/storefront-shadcn-blank/src/lib/shop-config.ts +51 -0
- package/templates/storefront-shadcn-blank/src/lib/shop-session.ts +204 -0
- package/templates/storefront-shadcn-blank/src/lib/track-forward.ts +200 -0
- package/templates/storefront-shadcn-blank/src/lib/uuid.ts +19 -0
- package/templates/storefront-shadcn-blank/src/middleware.ts +379 -0
- package/templates/storefront-shadcn-blank/src/seo/redirects.ts +44 -0
- package/templates/storefront-shadcn-blank/src/seo/static-routes.ts +12 -0
- package/templates/storefront-shadcn-blank/src/server/app.module.ts +18 -0
- package/templates/storefront-shadcn-blank/src/server/backend-api.ts +21 -0
- package/templates/storefront-shadcn-blank/src/server/backend-method.decorator.ts +23 -0
- package/templates/storefront-shadcn-blank/src/server/bootstrap.ts +122 -0
- package/templates/storefront-shadcn-blank/src/server/forge/live-revision.ts +158 -0
- package/templates/storefront-shadcn-blank/src/server/forgecart/forgecart-client.factory.ts +73 -0
- package/templates/storefront-shadcn-blank/src/server/forgecart/forgecart.module.ts +9 -0
- package/templates/storefront-shadcn-blank/src/server/runner.ts +90 -0
- package/templates/storefront-shadcn-blank/src/server/types.ts +36 -0
- package/templates/storefront-shadcn-blank/tsconfig.json +25 -0
- package/templates/storefront-shadcn-blank-sdk-floor.json +1174 -0
- package/templates/template-set.json +15 -0
|
@@ -27,9 +27,9 @@ import { type DesignSystemPartition } from './design-system-seat.js';
|
|
|
27
27
|
* the rewritten manifest as it stands, and the report names it beside the
|
|
28
28
|
* per-file verdicts — the seat lives in `.forgecart/`, so no verdict can —
|
|
29
29
|
* against the design system the recorded template renders. A blank workspace
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* re-renders from its UI framework's blank row like every other (#3480). The
|
|
31
|
+
* JSON report (`--json`) is the machine seam the provisioning orchestrator
|
|
32
|
+
* parses.
|
|
33
33
|
*/
|
|
34
34
|
interface RefreshOptions {
|
|
35
35
|
json?: boolean;
|
|
@@ -3,7 +3,6 @@ import { dirname, join, resolve } from 'node:path';
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import { print } from '../output.js';
|
|
5
5
|
import { TemplateSet } from '../template/template-set.js';
|
|
6
|
-
import { isBlankTemplate } from '../template/util/template-identity.util.js';
|
|
7
6
|
import { readPackageVersion } from '../version.js';
|
|
8
7
|
import { describeDesignSystem, designSystemPartition, sameDesignSystem, } from './design-system-seat.js';
|
|
9
8
|
import { PACKAGE_MANIFEST_RELPATH, adoptPackageManifest } from './package-manifest.js';
|
|
@@ -143,14 +142,10 @@ export async function runRefresh(name, options) {
|
|
|
143
142
|
const manifest = await readTemplateManifest(targetDir);
|
|
144
143
|
const template = manifestTemplate(manifest);
|
|
145
144
|
const report = emptyReport(designSystemPartition(manifest?.designSystem, template));
|
|
146
|
-
if (isBlankTemplate(template)) {
|
|
147
|
-
printReport(report, options, printBlankSummary);
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
145
|
if (!(await isFile(join(targetDir, PACKAGE_MANIFEST_RELPATH)))) {
|
|
151
146
|
throw new Error(`refresh requires an existing storefront at ${targetDir} (no package.json found).`);
|
|
152
147
|
}
|
|
153
|
-
const decisions = await decideTemplateFiles(targetDir, TemplateSet.shipped().
|
|
148
|
+
const decisions = await decideTemplateFiles(targetDir, TemplateSet.shipped().template(template).templateDir, manifest, new Set(options.adopt ?? []));
|
|
154
149
|
const nextFiles = {};
|
|
155
150
|
for (const decision of decisions) {
|
|
156
151
|
await writeDecision(targetDir, decision);
|
|
@@ -166,15 +161,15 @@ export async function runRefresh(name, options) {
|
|
|
166
161
|
};
|
|
167
162
|
await mkdir(join(targetDir, '.forgecart'), { recursive: true });
|
|
168
163
|
await writeFile(templateManifestPath(targetDir), serializeTemplateManifest(nextManifest), 'utf8');
|
|
169
|
-
printReport(report, options
|
|
164
|
+
printReport(report, options);
|
|
170
165
|
}
|
|
171
166
|
/** Print the report: the JSON line under `--json`, the human summary otherwise. */
|
|
172
|
-
function printReport(report, options
|
|
167
|
+
function printReport(report, options) {
|
|
173
168
|
if (options.json) {
|
|
174
169
|
print(JSON.stringify(report));
|
|
175
170
|
return;
|
|
176
171
|
}
|
|
177
|
-
|
|
172
|
+
printSummary(report);
|
|
178
173
|
}
|
|
179
174
|
function printSummary(report) {
|
|
180
175
|
print(`Refreshed ${String(report.rendered.length)} platform file(s).`);
|
|
@@ -192,11 +187,6 @@ function printSummary(report) {
|
|
|
192
187
|
}
|
|
193
188
|
printDesignSystemDrift(report.designSystem);
|
|
194
189
|
}
|
|
195
|
-
/** The blank workspace's summary: nothing rendered, nothing to render (#2775). */
|
|
196
|
-
function printBlankSummary(report) {
|
|
197
|
-
print('Nothing to refresh: the workspace is blank, and a blank template renders no file.');
|
|
198
|
-
printDesignSystemDrift(report.designSystem);
|
|
199
|
-
}
|
|
200
190
|
/** The line naming a recorded design system the workspace's template does not render. */
|
|
201
191
|
function printDesignSystemDrift({ recorded, rendered }) {
|
|
202
192
|
if (recorded === null || sameDesignSystem(recorded, rendered))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh.js","sourceRoot":"","sources":["../../../src/commands/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"refresh.js","sourceRoot":"","sources":["../../../src/commands/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,gCAAgC,EAChC,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAkEhC,qDAAqD;AACrD,KAAK,UAAU,MAAM,CAAC,IAAY;IACh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KAAK,CAAC,mFAAmF,CAAC,CAAC;IAC7F,CAAC;IACD,sBAAsB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAC9C,CAAC;AAED,yFAAyF;AACzF,SAAS,sBAAsB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAyB;IAC3E,IAAI,QAAQ,KAAK,IAAI,IAAI,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAAE,OAAO;IACtE,KAAK,CACH,wCAAwC,oBAAoB,CAAC,QAAQ,CAAC,IAAI;QACxE,wBAAwB,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAC5D,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC;SAC1B,WAAW,CACV,8IAA8I,CAC/I;SACA,QAAQ,CAAC,QAAQ,EAAE,2DAA2D,CAAC;SAC/E,MAAM,CACL,sBAAsB,EACtB,yEAAyE,CAC1E;SACA,MAAM,CAAC,QAAQ,EAAE,mEAAmE,CAAC;SACrF,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,OAAuB,EAAE,EAAE;QAClE,MAAM,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -22,10 +22,7 @@ export interface TemplateManifest {
|
|
|
22
22
|
*/
|
|
23
23
|
template?: TemplateIdentity;
|
|
24
24
|
generatedAt: string;
|
|
25
|
-
/**
|
|
26
|
-
* posix relpath a file renders at → sha256 hex of the rendered content. Empty
|
|
27
|
-
* for a blank workspace, whose template renders no file (#2775).
|
|
28
|
-
*/
|
|
25
|
+
/** posix relpath a file renders at → sha256 hex of the rendered content. */
|
|
29
26
|
files: Record<string, string>;
|
|
30
27
|
/**
|
|
31
28
|
* The workspace's recorded design system (#2773), absent until one is
|
|
@@ -83,7 +80,7 @@ export declare function inventoryTemplate(templateDir: string): Promise<Record<s
|
|
|
83
80
|
/**
|
|
84
81
|
* Record the just-rendered template in the workspace's manifest, under the
|
|
85
82
|
* identity that picked it, with the inventory of what the render landed
|
|
86
|
-
* ({@link inventoryTemplate}
|
|
83
|
+
* ({@link inventoryTemplate}). `designSystem` is
|
|
87
84
|
* the workspace's seat: the one it already recorded, carried over, or — on a
|
|
88
85
|
* fresh workspace — the one the scaffold's answers determine (#2808).
|
|
89
86
|
*/
|
|
@@ -137,7 +137,7 @@ export async function inventoryTemplate(templateDir) {
|
|
|
137
137
|
/**
|
|
138
138
|
* Record the just-rendered template in the workspace's manifest, under the
|
|
139
139
|
* identity that picked it, with the inventory of what the render landed
|
|
140
|
-
* ({@link inventoryTemplate}
|
|
140
|
+
* ({@link inventoryTemplate}). `designSystem` is
|
|
141
141
|
* the workspace's seat: the one it already recorded, carried over, or — on a
|
|
142
142
|
* fresh workspace — the one the scaffold's answers determine (#2808).
|
|
143
143
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-manifest.js","sourceRoot":"","sources":["../../../src/commands/template-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAyB,MAAM,yBAAyB,CAAC;AAGvF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"template-manifest.js","sourceRoot":"","sources":["../../../src/commands/template-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,M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d,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QACnD,IAAI,MAAM,CAAC,aAAa,KAAK,gCAAgC;YAAE,OAAO,IAAI,CAAC;QAC3E,OAAO;YACL,GAAG,MAAM;YACT,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS;YAC7D,YAAY,EAAE,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,SAAS;SACtE,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export interface InitQuestionsInput {
|
|
7
7
|
/** `--ui <framework>`: answers `ui-framework` — a UI framework the release ships. */
|
|
8
8
|
ui?: string;
|
|
9
|
-
/** `--example <name>`: answers `example` — an example the release ships,
|
|
9
|
+
/** `--example <name>`: answers `example` — an example the release ships, `blank` among them. */
|
|
10
10
|
example?: string;
|
|
11
11
|
/**
|
|
12
12
|
* `--catalog` / `--no-catalog`: answers `catalog`, which is asked only for an
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedTemplate, TemplateIdentity } from '../../template/type/template-set.types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The answers `forgecart init`'s questions took (#2774) — the scaffold record
|
|
4
4
|
* `.forgecart/config.json` commits for the steps that read it later.
|
|
@@ -8,10 +8,10 @@ export interface ScaffoldAnswers extends TemplateIdentity {
|
|
|
8
8
|
catalog: boolean;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* The answers a run settled, and
|
|
12
|
-
*
|
|
11
|
+
* The answers a run settled, and the row of the template set their identity
|
|
12
|
+
* renders from — every identity has one, the blank example's included (#3480).
|
|
13
13
|
*/
|
|
14
14
|
export interface SettledScaffold {
|
|
15
15
|
answers: ScaffoldAnswers;
|
|
16
|
-
|
|
16
|
+
template: ResolvedTemplate;
|
|
17
17
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ResolvedTemplate, TemplateExample, TemplateIdentity, UiFramework, UiFrameworkKit } from './type/template-set.types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The template set a CLI release ships (#2774): its UI frameworks — each with
|
|
4
|
-
* the kit its templates render (#3482) — and its
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* the kit its templates render (#3482) — and its examples, in prompt order, and
|
|
5
|
+
* the template directory of every identity it renders — read from
|
|
6
|
+
* `templates/template-set.json`, the data the release ships beside the
|
|
7
|
+
* templates. `forgecart init` derives its questions' options from it,
|
|
8
8
|
* validates `--ui` and `--example` against it and names and proves the kit a
|
|
9
|
-
* scaffold rendered from it, so a framework is added as
|
|
10
|
-
* prompt or render code. A row's `directory` is row data —
|
|
11
|
-
* storefront keeps `templates/storefront`, every
|
|
12
|
-
* `storefront
|
|
13
|
-
*
|
|
9
|
+
* scaffold rendered from it, so a framework or an example is added as data
|
|
10
|
+
* there and never as prompt or render code. A row's `directory` is row data —
|
|
11
|
+
* the existing daisyUI storefront keeps `templates/storefront`, every new row
|
|
12
|
+
* names its tree `storefront-<…>` — and nothing scans the directories (#2775).
|
|
13
|
+
* Every identity renders from its row's tree, the blank example's included: a
|
|
14
|
+
* row per UI framework, the platform plumbing with no example storefront on it
|
|
15
|
+
* (#3480).
|
|
14
16
|
*/
|
|
15
17
|
export declare class TemplateSet {
|
|
16
18
|
private readonly templatesDir;
|
|
@@ -28,12 +30,9 @@ export declare class TemplateSet {
|
|
|
28
30
|
get examples(): readonly TemplateExample[];
|
|
29
31
|
/** What `--ui` takes: every UI framework's id. */
|
|
30
32
|
get uiFrameworkIds(): string[];
|
|
31
|
-
/** What `--example` takes: every example's id
|
|
33
|
+
/** What `--example` takes: every example's id. */
|
|
32
34
|
get exampleIds(): string[];
|
|
33
|
-
/**
|
|
34
|
-
* Every identity the release renders: each row's, then blank beside each UI
|
|
35
|
-
* framework, in prompt order.
|
|
36
|
-
*/
|
|
35
|
+
/** Every identity the release renders: each row's, in the set's order. */
|
|
37
36
|
get identities(): TemplateIdentity[];
|
|
38
37
|
/**
|
|
39
38
|
* The kit the templates of `uiFramework` render (#3482): the summary init
|
|
@@ -42,17 +41,8 @@ export declare class TemplateSet {
|
|
|
42
41
|
*/
|
|
43
42
|
kitOf(uiFramework: string): UiFrameworkKit;
|
|
44
43
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* {@link TemplateUnavailableError} when the release renders no template for it.
|
|
48
|
-
*/
|
|
49
|
-
templateSource(identity: TemplateIdentity): TemplateSource;
|
|
50
|
-
/**
|
|
51
|
-
* The template directory of `identity`'s row — a
|
|
52
|
-
* {@link TemplateUnavailableError} when the set has no row for it, which a
|
|
53
|
-
* blank identity never has.
|
|
44
|
+
* The row rendering `identity`, resolved to its tree — a
|
|
45
|
+
* {@link TemplateUnavailableError} when the set has no row for it.
|
|
54
46
|
*/
|
|
55
|
-
|
|
56
|
-
/** `identity`'s row of the set — a {@link TemplateUnavailableError} when it has none. */
|
|
57
|
-
private rowOf;
|
|
47
|
+
template(identity: TemplateIdentity): ResolvedTemplate;
|
|
58
48
|
}
|
|
@@ -2,23 +2,24 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
import { dirname, join, resolve } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { TemplateUnavailableError } from './template-unavailable-error.js';
|
|
5
|
-
import { BLANK_EXAMPLE, } from './type/template-set.types.js';
|
|
6
5
|
import { UiFrameworkUnavailableError } from './ui-framework-unavailable-error.js';
|
|
7
|
-
import {
|
|
6
|
+
import { sameTemplateIdentity } from './util/template-identity.util.js';
|
|
8
7
|
/** The template set's own record, beside the templates it names. */
|
|
9
8
|
const TEMPLATE_SET_FILE = 'template-set.json';
|
|
10
9
|
/**
|
|
11
10
|
* The template set a CLI release ships (#2774): its UI frameworks — each with
|
|
12
|
-
* the kit its templates render (#3482) — and its
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* the kit its templates render (#3482) — and its examples, in prompt order, and
|
|
12
|
+
* the template directory of every identity it renders — read from
|
|
13
|
+
* `templates/template-set.json`, the data the release ships beside the
|
|
14
|
+
* templates. `forgecart init` derives its questions' options from it,
|
|
16
15
|
* validates `--ui` and `--example` against it and names and proves the kit a
|
|
17
|
-
* scaffold rendered from it, so a framework is added as
|
|
18
|
-
* prompt or render code. A row's `directory` is row data —
|
|
19
|
-
* storefront keeps `templates/storefront`, every
|
|
20
|
-
* `storefront
|
|
21
|
-
*
|
|
16
|
+
* scaffold rendered from it, so a framework or an example is added as data
|
|
17
|
+
* there and never as prompt or render code. A row's `directory` is row data —
|
|
18
|
+
* the existing daisyUI storefront keeps `templates/storefront`, every new row
|
|
19
|
+
* names its tree `storefront-<…>` — and nothing scans the directories (#2775).
|
|
20
|
+
* Every identity renders from its row's tree, the blank example's included: a
|
|
21
|
+
* row per UI framework, the platform plumbing with no example storefront on it
|
|
22
|
+
* (#3480).
|
|
22
23
|
*/
|
|
23
24
|
export class TemplateSet {
|
|
24
25
|
templatesDir;
|
|
@@ -50,19 +51,13 @@ export class TemplateSet {
|
|
|
50
51
|
get uiFrameworkIds() {
|
|
51
52
|
return this.uiFrameworks.map((framework) => framework.id);
|
|
52
53
|
}
|
|
53
|
-
/** What `--example` takes: every example's id
|
|
54
|
+
/** What `--example` takes: every example's id. */
|
|
54
55
|
get exampleIds() {
|
|
55
|
-
return
|
|
56
|
+
return this.examples.map((example) => example.id);
|
|
56
57
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Every identity the release renders: each row's, then blank beside each UI
|
|
59
|
-
* framework, in prompt order.
|
|
60
|
-
*/
|
|
58
|
+
/** Every identity the release renders: each row's, in the set's order. */
|
|
61
59
|
get identities() {
|
|
62
|
-
return
|
|
63
|
-
...this.document.templates.map(({ uiFramework, example }) => ({ uiFramework, example })),
|
|
64
|
-
...this.uiFrameworkIds.map((uiFramework) => ({ uiFramework, example: BLANK_EXAMPLE })),
|
|
65
|
-
];
|
|
60
|
+
return this.document.templates.map(({ uiFramework, example }) => ({ uiFramework, example }));
|
|
66
61
|
}
|
|
67
62
|
/**
|
|
68
63
|
* The kit the templates of `uiFramework` render (#3482): the summary init
|
|
@@ -77,31 +72,19 @@ export class TemplateSet {
|
|
|
77
72
|
return framework.kit;
|
|
78
73
|
}
|
|
79
74
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* {@link TemplateUnavailableError} when the release renders no template for it.
|
|
75
|
+
* The row rendering `identity`, resolved to its tree — a
|
|
76
|
+
* {@link TemplateUnavailableError} when the set has no row for it.
|
|
83
77
|
*/
|
|
84
|
-
|
|
85
|
-
if (isBlankTemplate(identity) && this.uiFrameworkIds.includes(identity.uiFramework)) {
|
|
86
|
-
return { kind: 'blank' };
|
|
87
|
-
}
|
|
88
|
-
const { directory } = this.rowOf(identity);
|
|
89
|
-
return { kind: 'directory', directory, templateDir: resolve(this.templatesDir, directory) };
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* The template directory of `identity`'s row — a
|
|
93
|
-
* {@link TemplateUnavailableError} when the set has no row for it, which a
|
|
94
|
-
* blank identity never has.
|
|
95
|
-
*/
|
|
96
|
-
templateDir(identity) {
|
|
97
|
-
return resolve(this.templatesDir, this.rowOf(identity).directory);
|
|
98
|
-
}
|
|
99
|
-
/** `identity`'s row of the set — a {@link TemplateUnavailableError} when it has none. */
|
|
100
|
-
rowOf(identity) {
|
|
78
|
+
template(identity) {
|
|
101
79
|
const row = this.document.templates.find((template) => sameTemplateIdentity(template, identity));
|
|
102
80
|
if (row === undefined)
|
|
103
81
|
throw new TemplateUnavailableError(identity, this.identities);
|
|
104
|
-
return
|
|
82
|
+
return {
|
|
83
|
+
uiFramework: row.uiFramework,
|
|
84
|
+
example: row.example,
|
|
85
|
+
directory: row.directory,
|
|
86
|
+
templateDir: resolve(this.templatesDir, row.directory),
|
|
87
|
+
};
|
|
105
88
|
}
|
|
106
89
|
}
|
|
107
90
|
//# sourceMappingURL=template-set.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-set.js","sourceRoot":"","sources":["../../../src/template/template-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"template-set.js","sourceRoot":"","sources":["../../../src/template/template-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAS3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,oEAAoE;AACpE,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,WAAW;IAEH;IACA;IAFnB,YACmB,YAAoB,EACpB,QAA6B;QAD7B,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAqB;IAC7C,CAAC;IAEJ;;;;OAIG;IACH,MAAM,CAAC,OAAO;QACZ,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,C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AC5B,MAAM,IAAI,2BAA2B,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,SAAS,CAAC,GAAG,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,QAA0B;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACpD,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CACzC,CAAC;QACF,IAAI,GAAG,KAAK,SAAS;YAAE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrF,OAAO;YACL,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,SAAS,CAAC;SACvD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -2,10 +2,9 @@ import type { TemplateIdentity } from './type/template-set.types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* An identity the release's template set renders no template for (#2774) —
|
|
4
4
|
* refused before the catalog question and before any file is written, behind
|
|
5
|
-
* `run`'s `Error:` on exit 1.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* flags that pick them.
|
|
5
|
+
* `run`'s `Error:` on exit 1. What is refused is a UI framework with no row for
|
|
6
|
+
* the example picked, the blank example's rows included (#3480); every refusal
|
|
7
|
+
* lists the identities the release does render, as the flags that pick them.
|
|
9
8
|
*/
|
|
10
9
|
export declare class TemplateUnavailableError extends Error {
|
|
11
10
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* An identity the release's template set renders no template for (#2774) —
|
|
3
3
|
* refused before the catalog question and before any file is written, behind
|
|
4
|
-
* `run`'s `Error:` on exit 1.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* flags that pick them.
|
|
4
|
+
* `run`'s `Error:` on exit 1. What is refused is a UI framework with no row for
|
|
5
|
+
* the example picked, the blank example's rows included (#3480); every refusal
|
|
6
|
+
* lists the identities the release does render, as the flags that pick them.
|
|
8
7
|
*/
|
|
9
8
|
export class TemplateUnavailableError extends Error {
|
|
10
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-unavailable-error.js","sourceRoot":"","sources":["../../../src/template/template-unavailable-error.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"template-unavailable-error.js","sourceRoot":"","sources":["../../../src/template/template-unavailable-error.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD;;;OAGG;IACH,YAAY,QAA0B,EAAE,QAAqC;QAC3E,MAAM,OAAO,GAAG,QAAQ;aACrB,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,QAAQ,WAAW,cAAc,OAAO,EAAE,CAAC;aAC7E,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,KAAK,CACH,yBAAyB,QAAQ,CAAC,WAAW,qBAAqB,QAAQ,CAAC,OAAO,YAAY;YAC5F,wBAAwB,OAAO,GAAG,CACrC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -31,12 +31,12 @@ export interface TemplateExample {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* The template a scaffold renders (#2774): its UI framework and the example it
|
|
34
|
-
* starts from —
|
|
35
|
-
* `forgecart refresh` re-renders from the template it names.
|
|
34
|
+
* starts from — {@link BLANK_EXAMPLE} among them. The template manifest records
|
|
35
|
+
* it, and `forgecart refresh` re-renders from the template it names.
|
|
36
36
|
*/
|
|
37
37
|
export interface TemplateIdentity {
|
|
38
38
|
uiFramework: string;
|
|
39
|
-
/** An example's id
|
|
39
|
+
/** An example's id. */
|
|
40
40
|
example: string;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -47,6 +47,11 @@ export interface TemplateIdentity {
|
|
|
47
47
|
export interface TemplateDirectory extends TemplateIdentity {
|
|
48
48
|
directory: string;
|
|
49
49
|
}
|
|
50
|
+
/** A row of the template set resolved for a render: the row, and its tree on disk. */
|
|
51
|
+
export interface ResolvedTemplate extends TemplateDirectory {
|
|
52
|
+
/** The absolute path of the row's `directory` under the release's `templates/`. */
|
|
53
|
+
templateDir: string;
|
|
54
|
+
}
|
|
50
55
|
/** `templates/template-set.json` — the template set one CLI release ships. */
|
|
51
56
|
export interface TemplateSetDocument {
|
|
52
57
|
/** In prompt order: the first is the `ui-framework` question's default. */
|
|
@@ -54,23 +59,15 @@ export interface TemplateSetDocument {
|
|
|
54
59
|
/** In prompt order: the first is the `example` question's default. */
|
|
55
60
|
examples: TemplateExample[];
|
|
56
61
|
/**
|
|
57
|
-
* Every identity the release renders from
|
|
58
|
-
*
|
|
62
|
+
* Every identity the release renders, each from its own tree — the blank
|
|
63
|
+
* example's among them, a row per UI framework (#3480).
|
|
59
64
|
*/
|
|
60
65
|
templates: TemplateDirectory[];
|
|
61
66
|
}
|
|
62
67
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
68
|
+
* The `example` answer that starts the storefront from the platform plumbing
|
|
69
|
+
* alone, with no example storefront on it — no header, no content, no cart, no
|
|
70
|
+
* example pages (#3480). Rendered from its UI framework's row like every other
|
|
71
|
+
* example; it takes no demo catalog, and its workspace seats blank content.
|
|
67
72
|
*/
|
|
68
|
-
export type TemplateSource = {
|
|
69
|
-
kind: 'blank';
|
|
70
|
-
} | {
|
|
71
|
-
kind: 'directory';
|
|
72
|
-
directory: string;
|
|
73
|
-
templateDir: string;
|
|
74
|
-
};
|
|
75
|
-
/** The `example` answer that starts the storefront from no example: blank. */
|
|
76
73
|
export declare const BLANK_EXAMPLE = "blank";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The `example` answer that starts the storefront from the platform plumbing
|
|
3
|
+
* alone, with no example storefront on it — no header, no content, no cart, no
|
|
4
|
+
* example pages (#3480). Rendered from its UI framework's row like every other
|
|
5
|
+
* example; it takes no demo catalog, and its workspace seats blank content.
|
|
6
|
+
*/
|
|
2
7
|
export const BLANK_EXAMPLE = 'blank';
|
|
3
8
|
//# sourceMappingURL=template-set.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-set.types.js","sourceRoot":"","sources":["../../../../src/template/type/template-set.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template-set.types.js","sourceRoot":"","sources":["../../../../src/template/type/template-set.types.ts"],"names":[],"mappings":"AAyEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TemplateIdentity } from '../type/template-set.types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The template a record that names no identity stands for: until #2774 every
|
|
4
4
|
* CLI rendered exactly one template, and until #2775 every workspace-pod image
|
|
@@ -7,8 +7,6 @@ import { type TemplateIdentity } from '../type/template-set.types.js';
|
|
|
7
7
|
* identity file was warmed from it.
|
|
8
8
|
*/
|
|
9
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
10
|
/** Whether two identities name the same UI framework and the same example. */
|
|
13
11
|
export declare function sameTemplateIdentity(a: TemplateIdentity, b: TemplateIdentity): boolean;
|
|
14
12
|
/** An identity in words, as a printed line names it: `daisyui/storefront`. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isJsonObject } from '../../json.js';
|
|
2
|
-
import { BLANK_EXAMPLE } from '../type/template-set.types.js';
|
|
3
2
|
/**
|
|
4
3
|
* The template a record that names no identity stands for: until #2774 every
|
|
5
4
|
* CLI rendered exactly one template, and until #2775 every workspace-pod image
|
|
@@ -11,10 +10,6 @@ export const PRE_IDENTITY_TEMPLATE = {
|
|
|
11
10
|
uiFramework: 'daisyui',
|
|
12
11
|
example: 'storefront',
|
|
13
12
|
};
|
|
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
13
|
/** Whether two identities name the same UI framework and the same example. */
|
|
19
14
|
export function sameTemplateIdentity(a, b) {
|
|
20
15
|
return a.uiFramework === b.uiFramework && a.example === b.example;
|
|
@@ -1 +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;
|
|
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;AAG7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA+B;IAC/D,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,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"}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
web: npm run start
|