create-ailk 0.37.1 → 0.38.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/README.md +129 -0
- package/component-catalog.json +44 -6
- package/component-catalog.md +6 -5
- package/dist/add-module.js +16 -1
- package/dist/add-route.d.ts +2 -2
- package/dist/add-route.js +18 -11
- package/dist/cli.js +52 -0
- package/dist/declined-routes.d.ts +13 -0
- package/dist/declined-routes.js +74 -0
- package/dist/derive-architecture.d.ts +0 -6
- package/dist/derive-architecture.js +9 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/language-import.d.ts +93 -0
- package/dist/language-import.js +270 -43
- package/dist/lib/import-mdx.js +1 -1
- package/dist/lib/scaffold-render-sweep.d.ts +6 -3
- package/dist/lib/scaffold-render-sweep.js +8 -4
- package/dist/migrate-content.d.ts +6 -2
- package/dist/migrate-content.js +62 -5
- package/dist/module-architecture.js +139 -103
- package/dist/paid-sections.d.ts +13 -0
- package/dist/paid-sections.js +35 -5
- package/dist/programmatic.js +6 -16
- package/dist/remove-module.js +67 -0
- package/dist/routes.d.ts +103 -0
- package/dist/routes.js +708 -0
- package/dist/site-manifest.js +1 -1
- package/dist/site-roster.d.ts +2 -1
- package/dist/site-roster.js +30 -8
- package/dist/spoke-checkout.d.ts +28 -27
- package/dist/spoke-checkout.js +71 -102
- package/dist/surfaces.d.ts +18 -0
- package/dist/surfaces.js +47 -282
- package/dist/sync-routes.d.ts +14 -1
- package/dist/sync-routes.js +86 -5
- package/dist/topology.d.ts +15 -1
- package/dist/topology.js +20 -4
- package/dist/update.d.ts +17 -2
- package/dist/update.js +480 -77
- package/package.json +3 -3
- package/templates/README.md +1 -1
- package/templates/apps/mcp/CLAUDE.md +5 -3
- package/templates/apps/web/CLAUDE.md +62 -20
- package/templates/apps/web/account.config.tsx +101 -0
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +3 -161
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +3 -139
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +3 -406
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +2 -190
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +3 -182
- package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +8 -420
- package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +8 -214
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +8 -115
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +2 -80
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +8 -121
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +3 -154
- package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +7 -149
- package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +3 -143
- package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +3 -126
- package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +8 -302
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +2 -102
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +3 -240
- package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +3 -131
- package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +2 -24
- package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +3 -60
- package/templates/apps/web/app/[locale]/layout.tsx +45 -28
- package/templates/apps/web/app/apple-icon.tsx +72 -0
- package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +22 -12
- package/templates/apps/web/app/og/__tests__/__snapshots__/card.test.tsx.snap +3 -0
- package/templates/apps/web/app/og/__tests__/card.test.tsx +129 -0
- package/templates/apps/web/app/og/__tests__/route.test.ts +3 -4
- package/templates/apps/web/app/og/route.tsx +155 -72
- package/templates/apps/web/app/sitemap.xml/__tests__/site-listing.test.ts +12 -0
- package/templates/apps/web/i18n/request.ts +44 -1
- package/templates/apps/web/jest.config.cjs +13 -1
- package/templates/apps/web/lib/__tests__/auth-phone.test.ts +11 -0
- package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +70 -0
- package/templates/apps/web/lib/__tests__/nav-label-keys.test.ts +14 -0
- package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +148 -61
- package/templates/apps/web/lib/__tests__/served-pages.test.ts +77 -0
- package/templates/apps/web/lib/__tests__/server-api.test.ts +37 -5
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +26 -13
- package/templates/apps/web/lib/listings.tsx +2 -2
- package/templates/apps/web/lib/nav-label-keys.ts +16 -2
- package/templates/apps/web/lib/paid-section-contracts.ts +35 -6
- package/templates/apps/web/lib/paid-sections.generated.ts +8 -0
- package/templates/apps/web/lib/profile-back-link.ts +105 -32
- package/templates/apps/web/lib/served-pages.ts +95 -0
- package/templates/apps/web/lib/site-brand.tsx +3 -5
- package/templates/apps/web/messages/en.json +8 -684
- package/templates/apps/web/middleware.ts +3 -1
- package/templates/apps/web/next.config.mjs +27 -0
- package/templates/apps/web/package.json +1 -0
- package/templates/customizations.yaml +9 -0
- package/templates/package.json +3 -1
- package/templates/tools/lint-architecture.ts +164 -11
- package/versions.json +48 -47
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/account-frame-sign-out.test.tsx +0 -175
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/agreements-prompt.test.tsx +0 -301
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/billing.test.tsx +0 -515
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/general.test.tsx +0 -883
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/hub-mode.test.tsx +0 -758
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +0 -264
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout-sign-out.test.tsx +0 -167
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +0 -730
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +0 -355
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-popups.test.tsx +0 -97
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/notifications.test.tsx +0 -375
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/onboarding.test.tsx +0 -323
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +0 -1208
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/popups.test.tsx +0 -418
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/privacy.test.tsx +0 -462
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/rich-translator.ts +0 -63
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/security.test.tsx +0 -406
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +0 -93
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/support.test.tsx +0 -208
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/thread.test.tsx +0 -340
- package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +0 -182
- package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +0 -353
- package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +0 -57
- package/templates/apps/web/app/[locale]/(authed)/account/agreements-actions.ts +0 -58
- package/templates/apps/web/app/[locale]/(authed)/account/agreements-gate.ts +0 -61
- package/templates/apps/web/app/[locale]/(authed)/account/agreements-prompt.tsx +0 -184
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/__tests__/page.test.tsx +0 -426
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/appointments-data.ts +0 -76
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/pay-form.tsx +0 -65
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/review-form.tsx +0 -172
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/file-route.test.ts +0 -333
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/page.test.tsx +0 -936
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/pay.test.tsx +0 -193
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/review.test.tsx +0 -476
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-actions.ts +0 -184
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-data.ts +0 -197
- package/templates/apps/web/app/[locale]/(authed)/account/billing/__tests__/offerings.test.ts +0 -99
- package/templates/apps/web/app/[locale]/(authed)/account/billing/offerings.ts +0 -123
- package/templates/apps/web/app/[locale]/(authed)/account/billing-source.ts +0 -303
- package/templates/apps/web/app/[locale]/(authed)/account/components/request-quote.tsx +0 -274
- package/templates/apps/web/app/[locale]/(authed)/account/error-row.tsx +0 -35
- package/templates/apps/web/app/[locale]/(authed)/account/for-you-labels.ts +0 -36
- package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/phone-verification.test.tsx +0 -215
- package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/seam-imports.test.ts +0 -65
- package/templates/apps/web/app/[locale]/(authed)/account/general/account-name.ts +0 -36
- package/templates/apps/web/app/[locale]/(authed)/account/general/billing-anchor.tsx +0 -27
- package/templates/apps/web/app/[locale]/(authed)/account/general/contact-actions.ts +0 -149
- package/templates/apps/web/app/[locale]/(authed)/account/general/contact-details.tsx +0 -42
- package/templates/apps/web/app/[locale]/(authed)/account/general/deletion-request.tsx +0 -132
- package/templates/apps/web/app/[locale]/(authed)/account/general/phone-actions.ts +0 -122
- package/templates/apps/web/app/[locale]/(authed)/account/general/phone-verification.tsx +0 -215
- package/templates/apps/web/app/[locale]/(authed)/account/general/photo-actions.ts +0 -73
- package/templates/apps/web/app/[locale]/(authed)/account/general/profile-form.tsx +0 -107
- package/templates/apps/web/app/[locale]/(authed)/account/general/profile-source.ts +0 -87
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/__tests__/route.test.ts +0 -215
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/member-thread-composer.tsx +0 -43
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-data.ts +0 -88
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-write.ts +0 -31
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/invitation-id.test.ts +0 -35
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/page.test.tsx +0 -266
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/actions.ts +0 -116
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/invitation-id.ts +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/new-actions.ts +0 -219
- package/templates/apps/web/app/[locale]/(authed)/account/new-menu.tsx +0 -365
- package/templates/apps/web/app/[locale]/(authed)/account/new-popups.tsx +0 -86
- package/templates/apps/web/app/[locale]/(authed)/account/onboarding/actions.ts +0 -120
- package/templates/apps/web/app/[locale]/(authed)/account/onboarding/onboarding-form.tsx +0 -322
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/__tests__/export-route.test.ts +0 -173
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/actions.ts +0 -103
- package/templates/apps/web/app/[locale]/(authed)/account/profile-actions.ts +0 -116
- package/templates/apps/web/app/[locale]/(authed)/account/retry-button.tsx +0 -27
- package/templates/apps/web/app/[locale]/(authed)/account/security/__tests__/hub-variant.test.tsx +0 -258
- package/templates/apps/web/app/[locale]/(authed)/account/security/security-panel.tsx +0 -130
- package/templates/apps/web/app/[locale]/(authed)/account/security/security-source.ts +0 -92
- package/templates/apps/web/app/[locale]/(authed)/account/settings-frame.tsx +0 -121
- package/templates/apps/web/app/[locale]/(authed)/account/sign-in-method.ts +0 -37
- package/templates/apps/web/app/[locale]/(authed)/account/support/support-form.tsx +0 -98
- package/templates/apps/web/app/[locale]/(authed)/account/support-actions.ts +0 -100
- package/templates/apps/web/app/[locale]/checkout/__tests__/pages.test.tsx +0 -139
- package/templates/apps/web/app/[locale]/checkout/__tests__/thank-you-account.test.tsx +0 -146
- package/templates/apps/web/app/[locale]/checkout/thank-you/page.tsx +0 -114
- package/templates/apps/web/app/[locale]/checkout/unavailable/page.tsx +0 -51
- package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +0 -614
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.count.test.tsx +0 -43
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.deliverable.test.tsx +0 -214
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.ending.test.tsx +0 -197
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +0 -286
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.permalink.test.tsx +0 -520
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.test.tsx +0 -376
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.thanks-by-tier.test.tsx +0 -306
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/account-invite.actions.test.ts +0 -69
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/flow.actions.test.ts +0 -398
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +0 -704
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/save.actions.test.ts +0 -173
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/two-route-tool.test.tsx +0 -141
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/verify.test.tsx +0 -249
- package/templates/apps/web/app/[locale]/flows/[slug]/account-invite.actions.ts +0 -35
- package/templates/apps/web/app/[locale]/flows/[slug]/email-moment.ts +0 -92
- package/templates/apps/web/app/[locale]/flows/[slug]/flow.actions.ts +0 -177
- package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +0 -472
- package/templates/apps/web/app/[locale]/flows/[slug]/page.tsx +0 -48
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/LevelChart.tsx +0 -100
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsCard.tsx +0 -99
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +0 -820
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsEmailStep.tsx +0 -203
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.no-commerce.test.tsx +0 -194
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.report.test.tsx +0 -284
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/by-result.test.tsx +0 -302
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/cards.test.tsx +0 -402
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/landing.test.tsx +0 -293
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/page.test.tsx +0 -485
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/score.test.tsx +0 -231
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/checkout-seam.ts +0 -74
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/meeting-seam.ts +0 -36
- package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/page.tsx +0 -420
- package/templates/apps/web/app/[locale]/flows/[slug]/save.actions.ts +0 -85
- package/templates/apps/web/app/[locale]/flows/[slug]/served-flow.ts +0 -91
- package/templates/apps/web/app/[locale]/flows/[slug]/start/page.tsx +0 -32
- package/templates/apps/web/app/[locale]/flows/[slug]/verify/page.tsx +0 -153
- package/templates/apps/web/app/[locale]/flows/[slug]/verify.actions.ts +0 -151
- package/templates/apps/web/app/[locale]/meet/confirmed/BookingHandOff.tsx +0 -128
- package/templates/apps/web/app/[locale]/meet/confirmed/__tests__/BookingHandOff.test.tsx +0 -126
- package/templates/apps/web/app/[locale]/purchase/__tests__/cancel.test.tsx +0 -162
- package/templates/apps/web/app/[locale]/purchase/__tests__/module-scope.test.ts +0 -68
- package/templates/apps/web/app/[locale]/purchase/__tests__/success.test.tsx +0 -411
- package/templates/apps/web/app/[locale]/purchase/cancel/page.tsx +0 -115
- package/templates/apps/web/app/[locale]/purchase/success/page.tsx +0 -348
- package/templates/apps/web/lib/__tests__/account-config.test.ts +0 -704
- package/templates/apps/web/lib/account-config.ts +0 -678
- package/templates/apps/web/lib/checkout-config.ts +0 -16
- package/templates/apps/web/src/lib/__tests__/commerce-sections.test.ts +0 -57
- package/templates/apps/web/src/lib/commerce-sections.ts +0 -55
package/dist/migrate-content.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `create-ailk migrate-content [<dir>] [--apply] [--api-url <origin>]
|
|
3
|
-
* [--workspace <id>]` — import an existing site's
|
|
4
|
-
* workspace (#10207)
|
|
3
|
+
* [--workspace <id>] [--language-seed <file>]` — import an existing site's
|
|
4
|
+
* MDX pages into its workspace (#10207), and with `--language-seed` a Language
|
|
5
|
+
* seed file's topics (lang-topic-fields).
|
|
5
6
|
*
|
|
6
7
|
* The same import as `seed-workspace` — `importMdx` over `<dir>/content`, and
|
|
7
8
|
* the docs-blog tree `<dir>/apps/web/content` when it exists (#10701), with
|
|
@@ -31,9 +32,10 @@
|
|
|
31
32
|
* Pure module: no `import.meta.url`, so jest can import it directly. Spec:
|
|
32
33
|
* docs/specs/10207-create-ailk-migrate-content-import-spec.md.
|
|
33
34
|
*/
|
|
35
|
+
import { readFileSync } from "node:fs";
|
|
34
36
|
import { join, resolve } from "node:path";
|
|
35
37
|
import { parseArgs } from "node:util";
|
|
36
|
-
import { languageLines, languageOffLine, withLanguage, } from "./language-import.js";
|
|
38
|
+
import { languageLines, languageOffLine, seedTopics, seedTopicsOf, topicSeedLines, withLanguage, } from "./language-import.js";
|
|
37
39
|
import { formatImportMdxReport, importMdx, isDirectory, loadSiteMdxAdapter, outcomePath, } from "./lib/import-mdx.js";
|
|
38
40
|
import { ParseError } from "./parse-args.js";
|
|
39
41
|
import { AGENT_KEY_ENV_VAR, WORKSPACE_ID_ENV_VAR } from "./seed-workspace.js";
|
|
@@ -143,6 +145,7 @@ export async function migrateContent(opts) {
|
|
|
143
145
|
throw err;
|
|
144
146
|
refuse(`the API origin must be an https: origin (http: only on a loopback host) with no path, query, fragment or credentials (from ${source}).`);
|
|
145
147
|
}
|
|
148
|
+
const topics = opts.languageSeed === undefined ? undefined : readSeedTopics(opts.languageSeed);
|
|
146
149
|
const at = `workspace ${workspaceId} at ${origin} (from ${source}).`;
|
|
147
150
|
onLine(apply
|
|
148
151
|
? `Migrating ${opts.targetDir} into ${at}`
|
|
@@ -215,16 +218,57 @@ export async function migrateContent(opts) {
|
|
|
215
218
|
onLine(languageOffLine(off));
|
|
216
219
|
if (language !== undefined)
|
|
217
220
|
languageLines(language, apply).forEach(onLine);
|
|
221
|
+
// lang-topic-fields — a seed file's topics, each one Topic, after the pages.
|
|
222
|
+
let seeded;
|
|
223
|
+
if (topics !== undefined) {
|
|
224
|
+
if (topics.length === 0) {
|
|
225
|
+
onLine("language: the seed file has no topics");
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
seeded = await seedTopics(topics, {
|
|
229
|
+
apiOrigin: origin,
|
|
230
|
+
workspaceId,
|
|
231
|
+
apiKey,
|
|
232
|
+
locale: LOCALE,
|
|
233
|
+
fetch: transport,
|
|
234
|
+
apply,
|
|
235
|
+
...(opts.sleep !== undefined && { sleep: opts.sleep }),
|
|
236
|
+
onLine,
|
|
237
|
+
});
|
|
238
|
+
topicSeedLines(seeded, apply).forEach(onLine);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
218
241
|
return {
|
|
219
242
|
result,
|
|
220
|
-
exitCode: failed > 0 ? 1 : 0,
|
|
243
|
+
exitCode: failed > 0 || (seeded?.counts.failed ?? 0) > 0 ? 1 : 0,
|
|
221
244
|
...(language !== undefined && { language }),
|
|
245
|
+
...(seeded !== undefined && { topics: seeded }),
|
|
222
246
|
};
|
|
223
247
|
}
|
|
248
|
+
/** A seed file's checked `topics[]`; any unreadable or refused file is refused before a request. */
|
|
249
|
+
function readSeedTopics(path) {
|
|
250
|
+
let seed;
|
|
251
|
+
try {
|
|
252
|
+
seed = JSON.parse(readFileSync(resolve(path), "utf8"));
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
refuse(`--language-seed ${path} is not a readable JSON file.`);
|
|
256
|
+
}
|
|
257
|
+
const locale = seed?.locale;
|
|
258
|
+
if (locale !== undefined && locale !== LOCALE) {
|
|
259
|
+
refuse(`--language-seed ${path} is for another locale; this import writes ${LOCALE}.`);
|
|
260
|
+
}
|
|
261
|
+
try {
|
|
262
|
+
return seedTopicsOf(seed);
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
refuse(`${err.message}.`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
224
268
|
export const MIGRATE_CONTENT_HELP = `create-ailk migrate-content — import an existing site's pages into its workspace.
|
|
225
269
|
|
|
226
270
|
Usage:
|
|
227
|
-
AILK_AGENT_KEY=<key> create-ailk migrate-content [<dir>] [--apply] [--api-url <origin>] [--workspace <wksp_id>]
|
|
271
|
+
AILK_AGENT_KEY=<key> create-ailk migrate-content [<dir>] [--apply] [--api-url <origin>] [--workspace <wksp_id>] [--language-seed <file>]
|
|
228
272
|
|
|
229
273
|
Arguments:
|
|
230
274
|
<dir> The site. Defaults to the current dir.
|
|
@@ -238,6 +282,9 @@ Options:
|
|
|
238
282
|
(http: on localhost or 127.0.0.1).
|
|
239
283
|
--workspace <wksp_id> The workspace the pages are written to. Else
|
|
240
284
|
AILK_WORKSPACE_ID.
|
|
285
|
+
--language-seed <file> A Language seed file (language/<entity>.json).
|
|
286
|
+
Each of its topics becomes one Topic holding all
|
|
287
|
+
its keywords. Its items are not read.
|
|
241
288
|
-h, --help Show this help.
|
|
242
289
|
|
|
243
290
|
Each content/en/<Type>/<slug>.mdx page (and each legacy
|
|
@@ -256,6 +303,14 @@ the FAQ page's words (the glossary page's, for a term). Lines prefixed
|
|
|
256
303
|
language: report each item, and each page the database read will not show
|
|
257
304
|
as its file does. An API with no Language collection leaves them inline.
|
|
258
305
|
|
|
306
|
+
With --language-seed, each topic in the seed file is written after the
|
|
307
|
+
pages as one Topic: its name, its pillar page, and every keyword with its
|
|
308
|
+
monthly searches and as-of date, its primary marked. A Topic the workspace
|
|
309
|
+
already holds keeps its spelling, notes and newer numbers, and gains what it
|
|
310
|
+
lacks. Lines prefixed language: topic/ report each one; a second --apply
|
|
311
|
+
reports every topic unchanged. A seed file that is not readable, or whose
|
|
312
|
+
topics the hub would refuse, is refused before anything is sent.
|
|
313
|
+
|
|
259
314
|
When the site has apps/web/content, each blog post and docs page in it is
|
|
260
315
|
written too: apps/web/content/en/blog/<slug>.mdx (or <slug>/index.mdx) as a
|
|
261
316
|
BlogPosting, or one series down, blog/<series>/<post>.mdx, as a BlogPosting
|
|
@@ -293,6 +348,7 @@ export function parseMigrateContentArgs(argv) {
|
|
|
293
348
|
apply: { type: "boolean", default: false },
|
|
294
349
|
"api-url": { type: "string" },
|
|
295
350
|
workspace: { type: "string" },
|
|
351
|
+
"language-seed": { type: "string" },
|
|
296
352
|
help: { type: "boolean", default: false, short: "h" },
|
|
297
353
|
},
|
|
298
354
|
});
|
|
@@ -309,6 +365,7 @@ export function parseMigrateContentArgs(argv) {
|
|
|
309
365
|
apply: parsed.values.apply === true,
|
|
310
366
|
apiUrl: parsed.values["api-url"],
|
|
311
367
|
workspaceId: parsed.values.workspace,
|
|
368
|
+
languageSeed: parsed.values["language-seed"],
|
|
312
369
|
help: parsed.values.help === true,
|
|
313
370
|
};
|
|
314
371
|
}
|
|
@@ -264,6 +264,7 @@ export const MODULE_SLICES = {
|
|
|
264
264
|
// ── docs-blog — Pro module: both fumadocs surfaces (D-46) ────────────────
|
|
265
265
|
"docs-blog": {
|
|
266
266
|
spoke: true,
|
|
267
|
+
paidSectionsPackage: "@working-theory/ui-docs-blog",
|
|
267
268
|
webImports: [WEB_AUTH_ADAPTER_IMPORT, "packages/fumadocs-schema"],
|
|
268
269
|
packages: {
|
|
269
270
|
"fumadocs-schema": {
|
|
@@ -292,22 +293,23 @@ export const MODULE_SLICES = {
|
|
|
292
293
|
// SOURCE files only (the rule above): the three `content/en/**` MDX files
|
|
293
294
|
// and every test/story companion carry the `oss: false` marker but are not
|
|
294
295
|
// listed here.
|
|
296
|
+
//
|
|
297
|
+
// #11254 (ADR 0040) — the `/docs` and `/blog` pages and their loaders
|
|
298
|
+
// (the runtime source and the two route adapters) ship in
|
|
299
|
+
// @working-theory/ui-docs-blog, whose routes.json names them;
|
|
300
|
+
// `create-ailk routes --write` mounts them once it is installed. What the
|
|
301
|
+
// site keeps is built from its own content: the Fumadocs source pair and
|
|
302
|
+
// the codegen stub below, which reach the pages through the typed
|
|
303
|
+
// `docs-blog.config.tsx`, delivered by this bundle.
|
|
295
304
|
ownedFiles: [
|
|
296
|
-
// The two route surfaces the module mounts.
|
|
297
|
-
"apps/web/app/[locale]/blog/[[...slug]]/page.tsx",
|
|
298
|
-
"apps/web/app/[locale]/docs/[[...slug]]/page.tsx",
|
|
299
305
|
// The Fumadocs source pair — both whole, both loaders (D3).
|
|
300
306
|
"apps/web/source.config.ts",
|
|
301
307
|
"apps/web/lib/source.ts",
|
|
302
|
-
// The
|
|
303
|
-
// CONTENT_ADAPTER=database (#5878). Listed explicitly: the exclusion
|
|
304
|
-
// closure grows over DEPENDENTS, not dependencies, so being imported by
|
|
305
|
-
// `lib/source.ts` does not pull this file into the bundle by itself.
|
|
306
|
-
"apps/web/lib/runtime-source.ts",
|
|
307
|
-
// The route adapters and the jest stub for the codegen output.
|
|
308
|
-
"apps/web/lib/blog-list-data.ts",
|
|
309
|
-
"apps/web/lib/blog-post-data.ts",
|
|
308
|
+
// The jest stub for the codegen output.
|
|
310
309
|
"apps/web/lib/__mocks__/source-server.js",
|
|
310
|
+
// #11254 D3 — the docs and blog pages' typed config
|
|
311
|
+
// (`defineDocsBlogConfig`), the host seam the generated route files pass in.
|
|
312
|
+
"apps/web/docs-blog.config.tsx",
|
|
311
313
|
// The module's own /llms.txt variant; the bundle installs it onto
|
|
312
314
|
// app/llms.txt/route.ts (#5365 D9, install-path mapping owned by #5373).
|
|
313
315
|
"apps/web/lib/slices/docs-blog/llms-route.ts",
|
|
@@ -920,9 +922,10 @@ export const MODULE_SLICES = {
|
|
|
920
922
|
// apps/api or database — the routes, services/scheduling (the provider
|
|
921
923
|
// client and the only reader of the credential), the Cal.com webhook —
|
|
922
924
|
// and the (authed)/appointments page. What lands is the web tier: the
|
|
923
|
-
//
|
|
924
|
-
//
|
|
925
|
-
//
|
|
925
|
+
// @working-theory/ui-scheduling dependency (`patches` below), whose
|
|
926
|
+
// booking pages `create-ailk routes --write` mounts (#11252), the site's
|
|
927
|
+
// scheduling.config.tsx, plus the three MCP tools when apps/mcp is kept.
|
|
928
|
+
// Every booking call then reaches the hub with the spoke key.
|
|
926
929
|
spoke: true,
|
|
927
930
|
apps: {
|
|
928
931
|
api: {
|
|
@@ -1002,19 +1005,16 @@ export const MODULE_SLICES = {
|
|
|
1002
1005
|
// consumer — unlike packages/validation below, a strip tool CAN delete
|
|
1003
1006
|
// exactly these files without touching anything another module needs.
|
|
1004
1007
|
//
|
|
1005
|
-
//
|
|
1006
|
-
//
|
|
1007
|
-
//
|
|
1008
|
-
//
|
|
1009
|
-
//
|
|
1010
|
-
//
|
|
1011
|
-
//
|
|
1012
|
-
//
|
|
1013
|
-
//
|
|
1014
|
-
//
|
|
1015
|
-
// configured owner rather than reading one of its own. The create-ailk
|
|
1016
|
-
// scaffolder already gates the whole `meet` route surface (src/surfaces.ts),
|
|
1017
|
-
// so all three pages arrive and depart together.
|
|
1008
|
+
// The booking pages — /meet, /meet/[slug], /meet/confirmed and /private,
|
|
1009
|
+
// their index frame and their meetings builder — are NOT listed: they
|
|
1010
|
+
// ship in @working-theory/ui-scheduling (#11252, ADR 0040), whose
|
|
1011
|
+
// routes.json names them, and a site's app/[locale]/meet/ and
|
|
1012
|
+
// app/[locale]/private/ hold only the route files `create-ailk routes
|
|
1013
|
+
// --write` generates once the package is installed. Those two
|
|
1014
|
+
// directories are EXCLUDE_TEMPLATE_DIRS entries, so no template copies
|
|
1015
|
+
// them; the site's scheduling.config.tsx, which the generated files
|
|
1016
|
+
// import, is listed below so the bundle delivers it and the Free template
|
|
1017
|
+
// never carries it.
|
|
1018
1018
|
//
|
|
1019
1019
|
// packages/sections-registry/src/registry.ts (the `booker:` entry) and
|
|
1020
1020
|
// packages/validation/src/schemas/page-sections.ts (BookerSectionDataSchema,
|
|
@@ -1052,28 +1052,13 @@ export const MODULE_SLICES = {
|
|
|
1052
1052
|
// deliberately NOT listed here: they ship, and listing one would take the
|
|
1053
1053
|
// whole dispatch table with it.
|
|
1054
1054
|
ownedFiles: [
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
"apps/web/
|
|
1058
|
-
// #
|
|
1059
|
-
//
|
|
1060
|
-
//
|
|
1061
|
-
|
|
1062
|
-
"apps/web/lib/__tests__/meetings.test.tsx",
|
|
1063
|
-
"apps/web/lib/__tests__/meetings.fixtures.ts",
|
|
1064
|
-
"apps/web/app/[locale]/meet/meeting-index.tsx",
|
|
1065
|
-
"apps/web/app/[locale]/private/page.tsx",
|
|
1066
|
-
"apps/web/app/[locale]/private/__tests__/page.test.tsx",
|
|
1067
|
-
"apps/web/app/[locale]/private/__tests__/sitemap.test.ts",
|
|
1068
|
-
// #11013 D-K — the results page's Meeting-card half: the scheduling
|
|
1069
|
-
// layout one segment above commerce's `results/[payload]/layout.tsx`,
|
|
1070
|
-
// its client provider and the layout's own suite, listed individually
|
|
1071
|
-
// (a co-located suite is not swept by `EXCLUDE_TEMPLATE_DIRS`). The
|
|
1072
|
-
// page reads the meeting through `results/[payload]/meeting-seam.ts`,
|
|
1073
|
-
// the base half, so no signal-collectors file imports `lib/meetings`.
|
|
1074
|
-
"apps/web/app/[locale]/flows/[slug]/results/layout.tsx",
|
|
1075
|
-
"apps/web/app/[locale]/flows/[slug]/results/ResultsMeetingsProvider.tsx",
|
|
1076
|
-
"apps/web/app/[locale]/flows/[slug]/results/__tests__/layout.test.tsx",
|
|
1055
|
+
// #11252 D3 — the booking pages' typed config (`defineSchedulingConfig`),
|
|
1056
|
+
// the host seam the generated meet and private route files pass in.
|
|
1057
|
+
"apps/web/scheduling.config.tsx",
|
|
1058
|
+
// #11251 D3, D5 — the results page's Meeting-card half (#11013 D-K)
|
|
1059
|
+
// ships in `@working-theory/ui-signal-collectors`, gated by the site
|
|
1060
|
+
// config's `meetings` slot (`SCHEDULING_PAGES`), so this module owns no
|
|
1061
|
+
// flows file.
|
|
1077
1062
|
// #6086 (brief H7) — the SITE's appointments page, the visible half of
|
|
1078
1063
|
// the read above. The co-located suite is listed EXPLICITLY alongside
|
|
1079
1064
|
// its page: `EXCLUDE_TEMPLATE_DIRS` below drops only the three
|
|
@@ -1087,7 +1072,7 @@ export const MODULE_SLICES = {
|
|
|
1087
1072
|
],
|
|
1088
1073
|
// pageContributions (spec 5478; parent § D6 shape 1) — the meeting
|
|
1089
1074
|
// index, the meeting page, the confirmation page and the private index
|
|
1090
|
-
// (#8843 D8), whose route files
|
|
1075
|
+
// (#8843 D8), whose route files the package's manifest names (#11252). No
|
|
1091
1076
|
// row names seed content: all four render from the /v1/schedule/*
|
|
1092
1077
|
// routes, not from an MDX file.
|
|
1093
1078
|
pageContributions: [
|
|
@@ -1100,9 +1085,14 @@ export const MODULE_SLICES = {
|
|
|
1100
1085
|
// it renders from `/v1/schedule/appointments`, not from an MDX file.
|
|
1101
1086
|
{ route: "/appointments" },
|
|
1102
1087
|
],
|
|
1088
|
+
// #11252 D4 — the paid-sections registry's `loadUiScheduling()` row: the
|
|
1089
|
+
// `schedule` catalog `apps/web/i18n/request.ts` merges under the site's,
|
|
1090
|
+
// a stub answering null where the site does not carry the package.
|
|
1091
|
+
paidSectionsPackage: "@working-theory/ui-scheduling",
|
|
1103
1092
|
// patches (#5581 U3, D5) — delivers the extracted component package to a
|
|
1104
1093
|
// keyed scaffold's apps/web, mirroring the signal-collectors slice's
|
|
1105
|
-
// identical merge-keys op below.
|
|
1094
|
+
// identical merge-keys op below. It is also what lets `routes --write`
|
|
1095
|
+
// find the package's manifest once installed (#11252).
|
|
1106
1096
|
patches: [
|
|
1107
1097
|
{
|
|
1108
1098
|
target: "apps/web/package.json",
|
|
@@ -1239,7 +1229,8 @@ export const MODULE_SLICES = {
|
|
|
1239
1229
|
// installs through the spoke filter (`isSpokeExcluded`) and the D10
|
|
1240
1230
|
// remap (`spokeDestination`); every part of the slice lands as follows:
|
|
1241
1231
|
//
|
|
1242
|
-
//
|
|
1232
|
+
// the flows route files (generated, #11251) written by `routes --write`;
|
|
1233
|
+
// the spoke's `results` entries not carried
|
|
1243
1234
|
// apps/web/app/[locale]/reports/**, the ReportPage + ReportsList seeds
|
|
1244
1235
|
// dropped (`SPOKE_EXCLUDED_MODULE_PATHS`,
|
|
1245
1236
|
// 2026-10-09): the reader links a report's
|
|
@@ -1288,40 +1279,29 @@ export const MODULE_SLICES = {
|
|
|
1288
1279
|
"apps/web/app/[locale]/(authed)/waitlist/components/SignupsTable.tsx",
|
|
1289
1280
|
"apps/web/app/[locale]/(authed)/waitlist/components/WaitlistComparisonTabs.tsx",
|
|
1290
1281
|
"apps/web/app/[locale]/(authed)/waitlist/components/status-badges.tsx",
|
|
1291
|
-
//
|
|
1292
|
-
//
|
|
1293
|
-
//
|
|
1294
|
-
//
|
|
1295
|
-
//
|
|
1296
|
-
//
|
|
1297
|
-
//
|
|
1298
|
-
|
|
1299
|
-
//
|
|
1300
|
-
//
|
|
1301
|
-
//
|
|
1302
|
-
//
|
|
1303
|
-
//
|
|
1304
|
-
//
|
|
1305
|
-
// and — more importantly — would silently strip a REAL consumer's
|
|
1306
|
-
// `sync-routes` tool of the ability to ever restore these files after
|
|
1307
|
-
// scaffolding, since that tool diffs against `templates/` alone and has
|
|
1308
|
-
// no module/licence concept of its own (empirically found, #5366 resume
|
|
1309
|
-
// pass). `projects/apply/ListingApplicationClient.tsx` below is
|
|
1310
|
-
// different in kind: it sits under the UNRELATED "projects" content
|
|
1311
|
-
// surface's URL segment, which `excludedRoutePaths` does not gate on
|
|
1312
|
-
// signal-collectors at all, so it genuinely needs `ownedFiles` to be
|
|
1313
|
-
// excluded from a keyless scaffold — see `sync-routes.ts`'s
|
|
1314
|
-
// `NESTED_FOREIGN_MODULE_ENTRIES` for the companion fix that keeps its
|
|
1315
|
-
// presence from falsely reading as "projects carried".
|
|
1282
|
+
// #11251 (ADR 0040 phase 3) — the flows pages ship in
|
|
1283
|
+
// `@working-theory/ui-signal-collectors`: a site's
|
|
1284
|
+
// `apps/web/app/[locale]/flows/` holds only the six route files
|
|
1285
|
+
// `create-ailk routes --write` generates from the package's
|
|
1286
|
+
// `routes.json` (after the install; `EXCLUDE_TEMPLATE_DIRS` keeps the
|
|
1287
|
+
// tree out of the snapshot), so this module owns no flows file. It owns
|
|
1288
|
+
// the site's one typed config the generated files import.
|
|
1289
|
+
"apps/web/signal-collectors.config.tsx",
|
|
1290
|
+
// `projects/apply/ListingApplicationClient.tsx` sits under the
|
|
1291
|
+
// UNRELATED "projects" content surface's URL segment, which
|
|
1292
|
+
// `excludedRoutePaths` does not gate on signal-collectors at all, so it
|
|
1293
|
+
// needs `ownedFiles` to be excluded from a keyless scaffold — see
|
|
1294
|
+
// `sync-routes.ts`'s `NESTED_FOREIGN_MODULE_ENTRIES` for the companion
|
|
1295
|
+
// fix that keeps its presence from falsely reading as "projects carried".
|
|
1316
1296
|
"apps/web/app/[locale]/projects/apply/ListingApplicationClient.tsx",
|
|
1317
1297
|
// #8840 D11/D13 — the Job application magnet's two walks. Same kind as
|
|
1318
1298
|
// `projects/apply` above: they sit under the UNRELATED "careers"
|
|
1319
1299
|
// surface's URL segment, which `excludedRoutePaths` does not gate on
|
|
1320
1300
|
// signal-collectors, so `ownedFiles` keeps them out of a keyless
|
|
1321
1301
|
// scaffold, and `NESTED_FOREIGN_MODULE_ENTRIES` keeps their presence
|
|
1322
|
-
// from reading as "careers carried".
|
|
1323
|
-
//
|
|
1324
|
-
//
|
|
1302
|
+
// from reading as "careers carried". The renderer they mount is the
|
|
1303
|
+
// package's `@working-theory/ui-signal-collectors/pages/flows/[slug]/magnet-page`
|
|
1304
|
+
// (#11251 D7).
|
|
1325
1305
|
"apps/web/app/[locale]/careers/apply/page.tsx",
|
|
1326
1306
|
"apps/web/app/[locale]/careers/[slug]/apply/page.tsx",
|
|
1327
1307
|
// #9287 DD10 — the trial magnet pair. Its own `trial` route segment,
|
|
@@ -1368,18 +1348,12 @@ export const MODULE_SLICES = {
|
|
|
1368
1348
|
// `packages/ui`. A section is vocabulary; the ROUTE is the module.
|
|
1369
1349
|
],
|
|
1370
1350
|
// pageContributions (spec 5478; parent § D6 shape 2) — the three flow
|
|
1371
|
-
// routes
|
|
1372
|
-
//
|
|
1373
|
-
//
|
|
1374
|
-
//
|
|
1375
|
-
//
|
|
1376
|
-
//
|
|
1377
|
-
// without commerce 404'd a finished recommending flow; it now ships here,
|
|
1378
|
-
// and commerce's bundle adds only the checkout half
|
|
1379
|
-
// (`commerce.ownedFiles`: `results/[payload]/layout.tsx` and
|
|
1380
|
-
// `checkout.actions.ts`). Declaring the rows here changes none of it: a
|
|
1381
|
-
// contribution is data, and which delivery shape carries the code is a
|
|
1382
|
-
// property of the module, not of the contribution.
|
|
1351
|
+
// routes. ROWS AND SEED ONLY: this module's route code is not in
|
|
1352
|
+
// `ownedFiles` — it ships in `@working-theory/ui-signal-collectors`, and
|
|
1353
|
+
// a scaffold's route files are generated from the package's manifest
|
|
1354
|
+
// (#11251). Declaring the rows here changes none of it: a contribution is
|
|
1355
|
+
// data, and which delivery shape carries the code is a property of the
|
|
1356
|
+
// module, not of the contribution.
|
|
1383
1357
|
pageContributions: [
|
|
1384
1358
|
{ route: "/flows/[slug]" },
|
|
1385
1359
|
{ route: "/flows/[slug]/start" },
|
|
@@ -1468,6 +1442,23 @@ export const MODULE_SLICES = {
|
|
|
1468
1442
|
},
|
|
1469
1443
|
],
|
|
1470
1444
|
},
|
|
1445
|
+
// #11251 D8 — the flows pages read the site through the package's
|
|
1446
|
+
// `/site` seam, answered by the site's signal-collectors.config.tsx.
|
|
1447
|
+
// next.config.mjs aliases it unconditionally; the keyless template's
|
|
1448
|
+
// jest.config.cjs carries no signal-collectors mapper
|
|
1449
|
+
// (transformPaidUiPackages), so a keyed scaffold's jest gets it here —
|
|
1450
|
+
// without it every suite that reaches a flow read hits the throwing stub.
|
|
1451
|
+
{
|
|
1452
|
+
target: "apps/web/jest.config.cjs",
|
|
1453
|
+
kind: "jest-config",
|
|
1454
|
+
ops: [
|
|
1455
|
+
{
|
|
1456
|
+
op: "add-module-name-mapper",
|
|
1457
|
+
pattern: "^@working-theory/ui-signal-collectors/site$",
|
|
1458
|
+
value: "<rootDir>/signal-collectors.config.tsx",
|
|
1459
|
+
},
|
|
1460
|
+
],
|
|
1461
|
+
},
|
|
1471
1462
|
// #9460 DD6 — the two MCP packs above, as apps/mcp dependencies.
|
|
1472
1463
|
{
|
|
1473
1464
|
target: "apps/mcp/package.json",
|
|
@@ -1512,10 +1503,13 @@ export const MODULE_SLICES = {
|
|
|
1512
1503
|
// dev/purchase, spoke-intake Rule 3). What lands
|
|
1513
1504
|
// is the scaffold-commerce skill, the commerce-boundary rule and the
|
|
1514
1505
|
// @working-theory/ui-commerce dependency (`patches` below). A spoke sells
|
|
1515
|
-
// through its hub's Offerings buy route (#9142)
|
|
1516
|
-
//
|
|
1517
|
-
//
|
|
1518
|
-
//
|
|
1506
|
+
// through its hub's Offerings buy route (#9142). The checkout and
|
|
1507
|
+
// purchase return pages ship in that package (#11253, ADR 0040), whose
|
|
1508
|
+
// routes.json names them; `create-ailk routes --write` mounts them once
|
|
1509
|
+
// it is installed. The site's commerce.config.tsx and its stamp
|
|
1510
|
+
// lib/checkout-config.ts are `ownedFiles` below, so the bundle delivers
|
|
1511
|
+
// both to every commerce site and `writeSpokeCheckoutSlice`
|
|
1512
|
+
// (`spoke-checkout.ts`, #8748) stamps the latter in place on a spoke.
|
|
1519
1513
|
spoke: true,
|
|
1520
1514
|
paidSectionsPackage: "@working-theory/ui-commerce",
|
|
1521
1515
|
apps: {
|
|
@@ -1592,16 +1586,21 @@ export const MODULE_SLICES = {
|
|
|
1592
1586
|
// + the slice's own re-export entry point) moved to
|
|
1593
1587
|
// packages-paid/ui-commerce; the package is delivered to a keyed
|
|
1594
1588
|
// scaffold via `patches` below, not via `ownedFiles`/`installMap` (D5).
|
|
1595
|
-
// #
|
|
1596
|
-
//
|
|
1597
|
-
// checkout
|
|
1598
|
-
//
|
|
1599
|
-
//
|
|
1600
|
-
|
|
1601
|
-
"apps/web/app/[locale]/flows/[slug]/results/[payload]/layout.tsx",
|
|
1589
|
+
// #11251 D3, D4 — the flow results page's checkout half (#6786) ships
|
|
1590
|
+
// in `@working-theory/ui-signal-collectors`, gated by the site config's
|
|
1591
|
+
// `checkout` slot; commerce's part of it is the price card,
|
|
1592
|
+
// `FlowResultsPriceCard` in `@working-theory/ui-commerce`, which the
|
|
1593
|
+
// slot loads through the paid-sections registry. Without commerce the
|
|
1594
|
+
// page renders, offering Book a Call for every fit.
|
|
1602
1595
|
"apps/web/app/[locale]/dev/purchase/page.tsx",
|
|
1603
1596
|
"apps/web/app/[locale]/dev/purchase/error.tsx",
|
|
1604
1597
|
"apps/web/app/[locale]/dev/purchase/purchase.actions.ts",
|
|
1598
|
+
// #11253 D3, D6 — the checkout and purchase pages' typed config
|
|
1599
|
+
// (`defineCommerceConfig`), the host seam the generated route files pass
|
|
1600
|
+
// in, and the checkout stamp it reads, which every commerce site now
|
|
1601
|
+
// carries (read on a spoke only; a hub's checkout pages 404 first).
|
|
1602
|
+
"apps/web/commerce.config.tsx",
|
|
1603
|
+
"apps/web/lib/checkout-config.ts",
|
|
1605
1604
|
],
|
|
1606
1605
|
// The scaffold-commerce authoring skill (D-47, #5449): moved by `git mv`
|
|
1607
1606
|
// out of the Free starter's `templates/.claude/skills/` (never stripped —
|
|
@@ -1870,6 +1869,43 @@ export const EXCLUDE_TEMPLATE_DIRS = [
|
|
|
1870
1869
|
"apps/web/app/[locale]/pricing/__tests__/monorepo-only.test.tsx",
|
|
1871
1870
|
"apps/web/app/[locale]/pricing/__tests__/__snapshots__/monorepo-only.test.tsx.snap",
|
|
1872
1871
|
"apps/web/lib/__tests__/hub-children.test.tsx",
|
|
1872
|
+
// #11227 (ADR 0040 phase 1) — the member account area ships in
|
|
1873
|
+
// `@working-theory/account`, its own suites with it. These are THIS
|
|
1874
|
+
// monorepo's integration suites: each mounts the package's pages through
|
|
1875
|
+
// the generated route files and the site's own account.config.tsx and
|
|
1876
|
+
// auth seam, so the account tests live once, here, never in a scaffold.
|
|
1877
|
+
// The parked `account/connect` page is the site's own and keeps its suite.
|
|
1878
|
+
"apps/web/app/[locale]/(authed)/account/__tests__",
|
|
1879
|
+
"apps/web/app/[locale]/(authed)/account/appointments/__tests__",
|
|
1880
|
+
"apps/web/app/[locale]/(authed)/account/artifacts/__tests__",
|
|
1881
|
+
"apps/web/app/[locale]/(authed)/account/billing/__tests__",
|
|
1882
|
+
"apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/__tests__",
|
|
1883
|
+
"apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__",
|
|
1884
|
+
"apps/web/app/[locale]/(authed)/account/privacy/__tests__",
|
|
1885
|
+
"apps/web/app/[locale]/(authed)/account/security/__tests__",
|
|
1886
|
+
// #11251 (ADR 0040 phase 3) — the flows pages ship in
|
|
1887
|
+
// `@working-theory/ui-signal-collectors`; a scaffold's flows route files
|
|
1888
|
+
// are generated from its `routes.json` after the install, never copied.
|
|
1889
|
+
"apps/web/app/[locale]/flows",
|
|
1890
|
+
// #11252 (ADR 0040 rule 3) — the booking pages ship in
|
|
1891
|
+
// `@working-theory/ui-scheduling`; these directories hold the route files
|
|
1892
|
+
// of that optional package, written by `routes --write` at scaffold time
|
|
1893
|
+
// (after `--install`) and in `update`, never snapshotted. The private
|
|
1894
|
+
// index's `sitemap.test.ts` is this monorepo's integration suite.
|
|
1895
|
+
"apps/web/app/[locale]/meet",
|
|
1896
|
+
"apps/web/app/[locale]/private",
|
|
1897
|
+
// #11253 (ADR 0040 rule 3) — the checkout and purchase return pages ship in
|
|
1898
|
+
// `@working-theory/ui-commerce`; these directories hold the route files of
|
|
1899
|
+
// that optional package, written by `routes --write` at scaffold time
|
|
1900
|
+
// (after `--install`), in `update` and by `add-module`, never snapshotted.
|
|
1901
|
+
"apps/web/app/[locale]/checkout",
|
|
1902
|
+
"apps/web/app/[locale]/purchase",
|
|
1903
|
+
// #11254 (ADR 0040 rule 3) — the docs and blog pages ship in
|
|
1904
|
+
// `@working-theory/ui-docs-blog`; these directories hold the route files of
|
|
1905
|
+
// that optional package, written by `routes --write` at scaffold time
|
|
1906
|
+
// (after `--install`), in `update` and by `add-module`, never snapshotted.
|
|
1907
|
+
"apps/web/app/[locale]/docs",
|
|
1908
|
+
"apps/web/app/[locale]/blog",
|
|
1873
1909
|
];
|
|
1874
1910
|
export function paidModuleTemplateExclusions(snapshotRoots, repoRoot) {
|
|
1875
1911
|
const roots = new Set(snapshotRoots);
|
package/dist/paid-sections.d.ts
CHANGED
|
@@ -81,3 +81,16 @@ export declare function writePaidMcpTools(targetDir: string): "added" | "updated
|
|
|
81
81
|
* absent — a scaffold with no web app.
|
|
82
82
|
*/
|
|
83
83
|
export declare function writePaidSections(targetDir: string): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The registry rendered from `targetDir`'s own `apps/web/package.json`, or
|
|
86
|
+
* `undefined` for a scaffold with no web app. `create-ailk update` resolves a
|
|
87
|
+
* written file's imports of it against this render, never the site's copy
|
|
88
|
+
* on disk, which a release that added a loader has not yet rewritten (#11394).
|
|
89
|
+
*/
|
|
90
|
+
export declare function renderSitePaidSections(targetDir: string): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Write the registry alone, from `targetDir`'s own `apps/web/package.json` —
|
|
93
|
+
* `create-ailk update` rewrites it every run (#11394). Answers the
|
|
94
|
+
* `writeModuleFlags` shape.
|
|
95
|
+
*/
|
|
96
|
+
export declare function writePaidSectionsRegistry(targetDir: string): "added" | "updated" | "unchanged" | undefined;
|
package/dist/paid-sections.js
CHANGED
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
* every layer (snapshot transform, module `patches`, `add-module`) already
|
|
16
16
|
* keeps true. The monorepo's committed copy is the render with every row
|
|
17
17
|
* present and is pinned byte-equal by `__tests__/paid-sections.test.ts`.
|
|
18
|
+
* Besides section registration, a row can carry a page package's message
|
|
19
|
+
* catalog: `apps/web/i18n/request.ts` merges `loadUiSignalCollectors()`'s
|
|
20
|
+
* flows strings and `loadUiScheduling()`'s `schedule` strings (#11252) under
|
|
21
|
+
* the site's own, and a stub's `null` merges nothing.
|
|
18
22
|
*
|
|
19
23
|
* Its sibling, `apps/web/lib/modules.generated.ts` (#8843 D10), is the
|
|
20
24
|
* module-presence flag: `SCHEDULING_PAGES` is true exactly when the site
|
|
@@ -292,14 +296,40 @@ export function writePaidMcpTools(targetDir) {
|
|
|
292
296
|
* absent — a scaffold with no web app.
|
|
293
297
|
*/
|
|
294
298
|
export function writePaidSections(targetDir) {
|
|
299
|
+
if (writePaidSectionsRegistry(targetDir) === undefined)
|
|
300
|
+
return false;
|
|
301
|
+
writeModuleFlags(targetDir);
|
|
302
|
+
writePaidMcpTools(targetDir);
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* The registry rendered from `targetDir`'s own `apps/web/package.json`, or
|
|
307
|
+
* `undefined` for a scaffold with no web app. `create-ailk update` resolves a
|
|
308
|
+
* written file's imports of it against this render, never the site's copy
|
|
309
|
+
* on disk, which a release that added a loader has not yet rewritten (#11394).
|
|
310
|
+
*/
|
|
311
|
+
export function renderSitePaidSections(targetDir) {
|
|
295
312
|
const deps = webDependencies(targetDir, "paid-sections registry");
|
|
296
313
|
if (deps === undefined)
|
|
297
|
-
return
|
|
314
|
+
return undefined;
|
|
298
315
|
const present = new Set(paidSectionRows()
|
|
299
316
|
.map((row) => row.package)
|
|
300
317
|
.filter((name) => Object.hasOwn(deps, name)));
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
318
|
+
return renderPaidSections(present);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Write the registry alone, from `targetDir`'s own `apps/web/package.json` —
|
|
322
|
+
* `create-ailk update` rewrites it every run (#11394). Answers the
|
|
323
|
+
* `writeModuleFlags` shape.
|
|
324
|
+
*/
|
|
325
|
+
export function writePaidSectionsRegistry(targetDir) {
|
|
326
|
+
const next = renderSitePaidSections(targetDir);
|
|
327
|
+
if (next === undefined)
|
|
328
|
+
return undefined;
|
|
329
|
+
const path = join(targetDir, PAID_SECTIONS_PATH);
|
|
330
|
+
const before = existsSync(path) ? readFileSync(path, "utf8") : undefined;
|
|
331
|
+
if (before === next)
|
|
332
|
+
return "unchanged";
|
|
333
|
+
writeFileSync(path, next);
|
|
334
|
+
return before === undefined ? "added" : "updated";
|
|
305
335
|
}
|
package/dist/programmatic.js
CHANGED
|
@@ -45,7 +45,7 @@ import { SITE_CHROME_PATH, renderSiteChrome, resolveSiteChrome, } from "./site-c
|
|
|
45
45
|
import { SITE_FONTS_PATH, renderSiteFonts } from "./site-fonts.js";
|
|
46
46
|
import { planSiteManifest } from "./site-manifest.js";
|
|
47
47
|
import { SITE_ROSTER_PATH, planHomeRecord, planSiteManifestDesign, readSiteRoster, withMeetPlaceholderSeeds, } from "./site-roster.js";
|
|
48
|
-
import {
|
|
48
|
+
import { dropSpokeCheckoutDependency, spokeCheckoutSite, spokeEnvRowOptions, writeSpokeCheckoutSlice, } from "./spoke-checkout.js";
|
|
49
49
|
import { GATEABLE_SURFACES, NAV_CONFIG_PATH, excludedRoutePaths, isUnservedSurfaceContent, isUnservedSurfaceRoute, renderNavConfig, resolveSurfaces, surfacesNamedByRoutes, } from "./surfaces.js";
|
|
50
50
|
import { syncRoutes } from "./sync-routes.js";
|
|
51
51
|
import { BASE_LAYER_DIR, SHAPE_STARTERS, isOwnTree, shippedManifestPath, TEMPLATE_MANIFESTS, TemplateError, mergeRoster, resolveTemplate, resolveTemplateLineage, rosterDeclares, templateDelivery, templateTreeDir, } from "./template-manifest.js";
|
|
@@ -185,9 +185,6 @@ export function scaffoldSync(opts, copied) {
|
|
|
185
185
|
...(spoke !== undefined
|
|
186
186
|
? spokeExclusions(TEMPLATES_DIR, spoke)
|
|
187
187
|
: SPOKE_ONLY_FILES),
|
|
188
|
-
// #8748 D3 — the standard spoke checkout lands only through
|
|
189
|
-
// `writeSpokeCheckoutSlice`, on a spoke carrying commerce.
|
|
190
|
-
...SPOKE_CHECKOUT_TEMPLATE_PATHS,
|
|
191
188
|
],
|
|
192
189
|
markers: buildScaffoldMarkers(projectName),
|
|
193
190
|
...(copied !== undefined
|
|
@@ -819,26 +816,19 @@ export async function scaffold(opts) {
|
|
|
819
816
|
writeFileSync(rosterPath, manifestText);
|
|
820
817
|
}
|
|
821
818
|
}
|
|
822
|
-
// #7838 D8 — a commerce spoke's own checkout
|
|
823
|
-
//
|
|
824
|
-
//
|
|
825
|
-
//
|
|
826
|
-
//
|
|
827
|
-
// recorded like the base copy's, so `update` keeps it current.
|
|
819
|
+
// #7838 D8 — a commerce spoke's own checkout stamp, once every layer has
|
|
820
|
+
// landed: the commerce bundle delivered `lib/checkout-config.ts` with the
|
|
821
|
+
// placeholder stamp, and this stamps it in place (#11253 D6). The return
|
|
822
|
+
// pages ship in `@working-theory/ui-commerce` and mount through
|
|
823
|
+
// `routes --write` after the install (#11253).
|
|
828
824
|
// #8217 D8 — a spoke that signs in through its hub also gets the billing
|
|
829
825
|
// action and the web seam render that reaches it.
|
|
830
826
|
const spokeCommerce = spoke !== undefined && result.modules.includes("commerce");
|
|
831
827
|
if (spokeCommerce) {
|
|
832
828
|
writeSpokeCheckoutSlice(result.targetDir, {
|
|
833
829
|
site: spokeCheckoutSite(projectName),
|
|
834
|
-
projectName,
|
|
835
830
|
versions,
|
|
836
|
-
templatesDir: TEMPLATES_DIR,
|
|
837
831
|
signIn: spoke.signIn,
|
|
838
|
-
onWrite: (relPath, bytes) => {
|
|
839
|
-
if (isRecordable(relPath))
|
|
840
|
-
copied.set(relPath, sha256Hex(bytes));
|
|
841
|
-
},
|
|
842
832
|
});
|
|
843
833
|
}
|
|
844
834
|
// #6944 — the manifest records what this scaffold IS, once every layer has
|