create-ailk 0.39.0 → 0.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/component-catalog.json +1 -1
- package/component-catalog.md +1 -1
- package/dist/add-route.js +15 -0
- package/dist/body-heading.d.ts +2 -1
- package/dist/body-heading.js +31 -3
- package/dist/module-architecture.js +0 -3
- package/dist/remove-module.js +13 -4
- package/dist/routes.d.ts +7 -0
- package/dist/routes.js +1 -1
- package/dist/site-roster.js +7 -1
- package/dist/surfaces.d.ts +2 -0
- package/dist/surfaces.js +59 -172
- package/package.json +3 -3
- package/templates/apps/web/CLAUDE.md +19 -2
- package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +3 -2
- package/templates/apps/web/__tests__/__mocks__/next-intl.ts +3 -2
- package/templates/apps/web/app/[locale]/layout.tsx +42 -25
- package/templates/apps/web/app/api/revalidate/__tests__/route.test.ts +56 -1
- package/templates/apps/web/app/api/revalidate/route.ts +45 -4
- package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +53 -0
- package/templates/apps/web/app/llms.txt/route.ts +5 -2
- package/templates/apps/web/i18n/request.ts +5 -1
- package/templates/apps/web/jest.config.cjs +6 -0
- package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
- package/templates/apps/web/lib/__tests__/hub-site-config.test.ts +239 -0
- package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
- package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
- package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
- package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +58 -0
- package/templates/apps/web/lib/__tests__/served-pages.test.ts +163 -20
- package/templates/apps/web/lib/__tests__/site-brand.test.ts +77 -0
- package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +64 -0
- package/templates/apps/web/lib/__tests__/site-identity-feature-list.test.ts +115 -3
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
- package/templates/apps/web/lib/hub-site-config.ts +151 -0
- package/templates/apps/web/lib/in-page-magnet.ts +2 -2
- package/templates/apps/web/lib/pricing-page.ts +3 -3
- package/templates/apps/web/lib/profile-back-link.ts +49 -12
- package/templates/apps/web/lib/served-pages.ts +144 -39
- package/templates/apps/web/lib/site-brand.tsx +66 -0
- package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +25 -5
- package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +21 -5
- package/templates/apps/web/lib/site-header.ts +1 -1
- package/templates/apps/web/lib/site-identity.ts +38 -2
- package/templates/apps/web/messages/en.json +3 -119
- package/templates/apps/web/next.config.mjs +7 -0
- package/templates/apps/web/package.json +1 -0
- package/templates/apps/web/site-pages.config.tsx +85 -0
- package/templates/tools/body-heading.ts +30 -3
- package/versions.json +50 -49
- package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
- package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
- package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
- package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
- package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
- package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
- package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
- package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
- package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
- package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
- package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
- package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
- package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
- package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
- package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
- package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
- package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
- package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
- package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
- package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
- package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
- package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
- package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
- package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
- package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
- package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
- package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
- package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
- package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
- package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
- package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
- package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
- package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
- package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
- package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
- package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
- package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
- package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
- package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
- package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
- package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
- package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
- package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
- package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
- package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
- package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
- package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
- package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
- package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
- package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
- package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
- package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
- package/templates/apps/web/app/[locale]/page.tsx +0 -147
- package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
- package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
- package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
- package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
- package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
- package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
- package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
- package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
- package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
- package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
- package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
- package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
- package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
- package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
- package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
- package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
- package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
- package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
- package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
- package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
- package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
- package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
- package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
- package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
- package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
- package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
- package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
- package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
- package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
- package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
- package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
- package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
- package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
- package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
- package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
- package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
- package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
- package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
- package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
- package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
- package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
- package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
- package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
- package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
- package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
- package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
- package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
- package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
- package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
- package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
- package/templates/apps/web/lib/hub-children.tsx +0 -351
- package/templates/apps/web/lib/meet-placeholder.ts +0 -5
- package/templates/apps/web/lib/posting-title.ts +0 -39
- package/templates/apps/web/lib/route-family.ts +0 -69
- package/templates/apps/web/lib/service-listing.ts +0 -89
- package/templates/apps/web/lib/template-listing.ts +0 -169
- package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
- package/templates/apps/web/src/lib/lead-write.ts +0 -90
package/component-catalog.json
CHANGED
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"tier": "sections",
|
|
370
370
|
"sourcePath": "packages/ui/src/sections/DocumentViewerClient.tsx",
|
|
371
371
|
"importPath": "@working-theory/ui/sections",
|
|
372
|
-
"exported":
|
|
372
|
+
"exported": true,
|
|
373
373
|
"description": "The interactive shell for DocumentViewer. Split out of DocumentViewer.tsx (which stays RSC) for the same reason AlertSection composes AlertSectionDismissIsland: interactivity is contained to one client island.",
|
|
374
374
|
"descriptionSource": "doc-comment",
|
|
375
375
|
"descriptionGrade": "weak",
|
package/component-catalog.md
CHANGED
|
@@ -82,7 +82,7 @@ Import: `import { X } from "@working-theory/ui/sections";` (or from the `@workin
|
|
|
82
82
|
| `DocumentChassis` | A long-read document page (privacy policy, terms, DPA, working agreement) — chrome-free header + optional stat strip + a sticky numbered section nav beside continuous prose; one document per page/route. The authored `sections` list drives both the nav and the body. | MDX `type: document-chassis` |
|
|
83
83
|
| `DocumentViewer` | A paginated document embedded in a page (a report, a client deliverable) — use for a 10-50 page PDF at a closed 16:9 (deck) or letter (portrait) geometry, rendered by a dynamically-imported PDF.js so it never enters the main bundle. `src` accepts a public path or the authenticated `/v1/deliverables/:grantId` route. Not for long-read prose — that is `document-chassis`. | MDX `type: document-viewer` |
|
|
84
84
|
| `DocumentViewerCanvas` | The PDF.js renderer for DocumentViewer. This file is reached ONLY via the dynamic import in DocumentViewerClient.tsx — that is deliberate: the static `import "pdfjs-dist"` below is what lands in this file's own route-split chunk instead of the main bundle (a static import of the renderer is a spec violation, not a style preference). | internal — compose from `packages/ui/src/sections/DocumentViewerCanvas.tsx` |
|
|
85
|
-
| `DocumentViewerClient` | The interactive shell for DocumentViewer. Split out of DocumentViewer.tsx (which stays RSC) for the same reason AlertSection composes AlertSectionDismissIsland: interactivity is contained to one client island. *(weak)* |
|
|
85
|
+
| `DocumentViewerClient` | The interactive shell for DocumentViewer. Split out of DocumentViewer.tsx (which stays RSC) for the same reason AlertSection composes AlertSectionDismissIsland: interactivity is contained to one client island. *(weak)* | `import { DocumentViewerClient } from "@working-theory/ui/sections"` |
|
|
86
86
|
| `FAQ` | Question-and-answer pairs — use to pre-empt buyer objections that are naturally phrased as questions. | MDX `type: faq` · `import { FAQ } from "@working-theory/ui/sections"` |
|
|
87
87
|
| `Feature` | A multi-item benefit/feature highlight grid — use to walk through several product capabilities. | MDX `type: feature` |
|
|
88
88
|
| `FormLightbox` | The VideoLightbox dialog shell hosting a StepFlow instead of a video: a trigger (e.g. a "Let's Start" Button — any focusable element the caller supplies) opens the SAME StepFlow inside a Radix Dialog on the dimmed/blurred backdrop shared with VideoLightbox/SpotlightPanel. | `import { FormLightbox } from "@working-theory/ui/sections"` |
|
package/dist/add-route.js
CHANGED
|
@@ -48,6 +48,7 @@ import { appendEnvRows } from "./lib/declared-env.js";
|
|
|
48
48
|
import { ENV_CATALOG } from "./lib/env-catalog.js";
|
|
49
49
|
import { diffTwoStrings, } from "./lib/extract-module-bundle.js";
|
|
50
50
|
import { ParseError } from "./parse-args.js";
|
|
51
|
+
import { RoutesRefusedError, writeRoutes } from "./routes.js";
|
|
51
52
|
import { substituteMarkers } from "./substitute.js";
|
|
52
53
|
import { GATEABLE_SURFACES, MODULE_SURFACES, parseSurfaces, resolveSurfaces, } from "./surfaces.js";
|
|
53
54
|
import { syncRoutes } from "./sync-routes.js";
|
|
@@ -138,6 +139,20 @@ export function addRouteToScaffold(opts) {
|
|
|
138
139
|
if (spoke !== undefined) {
|
|
139
140
|
appendEnvRows(targetAbs, { topology: "spoke", catalog: ENV_CATALOG });
|
|
140
141
|
}
|
|
142
|
+
// #11259 D5 — a surface's pages may ship in a site-gated page package
|
|
143
|
+
// (`@working-theory/site-pages`), whose route files the generator writes
|
|
144
|
+
// once the header above declares the surface: as `add-module` does, write
|
|
145
|
+
// them now on a site that has the package installed (nothing otherwise —
|
|
146
|
+
// the site's `routes --write` lands them after the install). A refusal is
|
|
147
|
+
// the site's own `routes --check` to name.
|
|
148
|
+
try {
|
|
149
|
+
for (const path of writeRoutes(targetAbs).written)
|
|
150
|
+
report.push({ path, action: "written" });
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
if (!(err instanceof RoutesRefusedError))
|
|
154
|
+
throw err;
|
|
155
|
+
}
|
|
141
156
|
return { targetDir: targetAbs, route, surfaces, report, routes };
|
|
142
157
|
}
|
|
143
158
|
/** The site's `architecture.yaml`, after checking `targetAbs` is a scaffold. */
|
package/dist/body-heading.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export type MdxBodyRule = Map<string, "always" | "unless-sections">;
|
|
|
5
5
|
* naming `bodyMode: "mdx-body"`. A call whose `bodyMode` sits in a conditional
|
|
6
6
|
* spread is `"unless-sections"`, any other `"always"`; `"always"` wins when two
|
|
7
7
|
* routes name one type. A content hub's `HubConfig` reads the same way, from
|
|
8
|
-
* its `body`. A
|
|
8
|
+
* its `body`. A generated route file reads as the package page it re-exports
|
|
9
|
+
* (`pageSource`). A missing `apps/web/app` gives an empty map.
|
|
9
10
|
*/
|
|
10
11
|
export declare function mdxBodyRule(appsRoot: string): MdxBodyRule;
|
|
11
12
|
/** The routes' own `composed` test: mdx-body unless `sections` is a non-empty array. */
|
package/dist/body-heading.js
CHANGED
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
* file from source.
|
|
26
26
|
*/
|
|
27
27
|
import { existsSync, lstatSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
28
|
-
import {
|
|
28
|
+
import { createRequire } from "node:module";
|
|
29
|
+
import { join, resolve } from "node:path";
|
|
29
30
|
// The `renderPage({ … })` discovery regexes of `tools/lint-mdx-body-compiles.ts`.
|
|
30
31
|
const RENDER_PAGE_CALL_RE = /renderPage\s*\(\s*\{[\s\S]*?\}\s*\)/g;
|
|
31
32
|
const TYPE_RE = /type\s*:\s*["']([A-Za-z]+)["']/;
|
|
@@ -53,12 +54,39 @@ function pageFiles(dir, out = []) {
|
|
|
53
54
|
}
|
|
54
55
|
return out;
|
|
55
56
|
}
|
|
57
|
+
// A route file `create-ailk routes` generated (#11259 D8): its header line
|
|
58
|
+
// (after an optional `// oss: false` marker) and the package page it re-exports.
|
|
59
|
+
const GENERATED_ROUTE_HEADER = "// Generated by create-ailk routes from ";
|
|
60
|
+
const OSS_FALSE_MARKER = "// oss: false";
|
|
61
|
+
const GENERATED_FROM_RE = /\bfrom\s+"(@working-theory\/[^"]+)"/;
|
|
62
|
+
/**
|
|
63
|
+
* A page file's own source. A generated route file is followed to the package
|
|
64
|
+
* page it re-exports, resolved from the site's `apps/web` as Next resolves it
|
|
65
|
+
* (#11259 D8: the base pages ship in `@working-theory/site-pages`); one whose
|
|
66
|
+
* package is not installed reads as itself.
|
|
67
|
+
*/
|
|
68
|
+
function pageSource(file, webDir) {
|
|
69
|
+
const text = readFileSync(file, "utf8");
|
|
70
|
+
const [line1 = "", line2 = ""] = text.split("\n", 2);
|
|
71
|
+
if (!(line1 === OSS_FALSE_MARKER ? line2 : line1).startsWith(GENERATED_ROUTE_HEADER))
|
|
72
|
+
return text;
|
|
73
|
+
const specifier = GENERATED_FROM_RE.exec(text)?.[1];
|
|
74
|
+
if (specifier === undefined)
|
|
75
|
+
return text;
|
|
76
|
+
try {
|
|
77
|
+
return readFileSync(createRequire(resolve(webDir, "package.json")).resolve(specifier), "utf8");
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return text;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
56
83
|
/**
|
|
57
84
|
* Scan `<appsRoot>/apps/web/app/**\/page.{ts,tsx}` for `renderPage({…})` calls
|
|
58
85
|
* naming `bodyMode: "mdx-body"`. A call whose `bodyMode` sits in a conditional
|
|
59
86
|
* spread is `"unless-sections"`, any other `"always"`; `"always"` wins when two
|
|
60
87
|
* routes name one type. A content hub's `HubConfig` reads the same way, from
|
|
61
|
-
* its `body`. A
|
|
88
|
+
* its `body`. A generated route file reads as the package page it re-exports
|
|
89
|
+
* (`pageSource`). A missing `apps/web/app` gives an empty map.
|
|
62
90
|
*/
|
|
63
91
|
export function mdxBodyRule(appsRoot) {
|
|
64
92
|
const rule = new Map();
|
|
@@ -66,7 +94,7 @@ export function mdxBodyRule(appsRoot) {
|
|
|
66
94
|
if (!existsSync(appDir))
|
|
67
95
|
return rule;
|
|
68
96
|
for (const file of pageFiles(appDir)) {
|
|
69
|
-
const source =
|
|
97
|
+
const source = pageSource(file, join(appsRoot, "apps", "web"));
|
|
70
98
|
if (HUB_INPUT_RE.test(source)) {
|
|
71
99
|
const types = [...source.matchAll(HUB_LIST_TYPE_RE)];
|
|
72
100
|
const bodies = [...source.matchAll(HUB_BODY_RE)];
|
|
@@ -1866,9 +1866,6 @@ export const EXCLUDE_TEMPLATE_DIRS = [
|
|
|
1866
1866
|
"apps/mcp/__tests__/workspace-surface.test.ts",
|
|
1867
1867
|
"apps/mcp/__tests__/parity.test.ts",
|
|
1868
1868
|
"apps/mcp/__tests__/workspace-oauth.test.ts",
|
|
1869
|
-
"apps/web/app/[locale]/pricing/__tests__/monorepo-only.test.tsx",
|
|
1870
|
-
"apps/web/app/[locale]/pricing/__tests__/__snapshots__/monorepo-only.test.tsx.snap",
|
|
1871
|
-
"apps/web/lib/__tests__/hub-children.test.tsx",
|
|
1872
1869
|
// #11227 (ADR 0040 phase 1) — the member account area ships in
|
|
1873
1870
|
// `@working-theory/account`, its own suites with it. These are THIS
|
|
1874
1871
|
// monorepo's integration suites: each mounts the package's pages through
|
package/dist/remove-module.js
CHANGED
|
@@ -42,7 +42,7 @@ import { deriveArchitecture } from "./derive-architecture.js";
|
|
|
42
42
|
import { MODULE_SLICES, normalizeModules } from "./module-architecture.js";
|
|
43
43
|
import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH, writePaidSections, } from "./paid-sections.js";
|
|
44
44
|
import { ParseError, parseModules } from "./parse-args.js";
|
|
45
|
-
import { isGenerated, isRecordedRoute } from "./routes.js";
|
|
45
|
+
import { isGenerated, isRecordedRoute, siteGate } from "./routes.js";
|
|
46
46
|
import { SITE_ROSTER_PATH, readSiteRoster, webDependencies } from "./site-roster.js";
|
|
47
47
|
import { HUB_KEPT_ROUTE_DIRS, MODULE_SURFACES, PAGE_PACKAGE_ROUTES, ROUTE_ROOT, resolveSurfaces, } from "./surfaces.js";
|
|
48
48
|
import { BASE_LAYER_DIR, templateTreeDir } from "./template-manifest.js";
|
|
@@ -504,14 +504,23 @@ export function removeModuleFromScaffold(opts) {
|
|
|
504
504
|
}
|
|
505
505
|
// #11259 D6 — a carried page package's pages under a kept group are kept
|
|
506
506
|
// too: the snapshot holds none of its generated route files, so a site
|
|
507
|
-
// whose routes are not yet written has no `(auth)/sign-in` on disk.
|
|
507
|
+
// whose routes are not yet written has no `(auth)/sign-in` on disk. So
|
|
508
|
+
// is a kept legal dir's page (`privacy`, `terms`, `working-agreement`,
|
|
509
|
+
// from @working-theory/site-pages) the site's header still carries.
|
|
508
510
|
const carried = webDependencies(targetDir);
|
|
511
|
+
const gate = siteGate(targetDir);
|
|
509
512
|
for (const row of PAGE_PACKAGE_ROUTES) {
|
|
510
513
|
if (!carried.has(row.package))
|
|
511
514
|
continue;
|
|
512
515
|
for (const page of row.pages) {
|
|
513
|
-
|
|
514
|
-
|
|
516
|
+
if (row.siteGated && !gate(`${ROUTE_ROOT}/${page}/page.tsx`))
|
|
517
|
+
continue;
|
|
518
|
+
const [group = "", segment] = page.split("/");
|
|
519
|
+
if (!HUB_KEPT_ROUTE_DIRS.includes(group))
|
|
520
|
+
continue;
|
|
521
|
+
if (!group.startsWith("("))
|
|
522
|
+
keptSegments.add(group);
|
|
523
|
+
else if (segment !== undefined)
|
|
515
524
|
keptSegments.add(segment);
|
|
516
525
|
}
|
|
517
526
|
}
|
package/dist/routes.d.ts
CHANGED
|
@@ -104,6 +104,13 @@ export interface RoutesDrift {
|
|
|
104
104
|
/** The manifest entries in force — recorded ones included, not-carried ones not. */
|
|
105
105
|
generated: number;
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether a `siteGated` manifest's entry at `sitePath` is a route of the site
|
|
109
|
+
* (#11259 D5): not inside the public tree on a site without `marketing`, and
|
|
110
|
+
* not under a gateable surface the site's `# Surfaces:` header leaves out. A
|
|
111
|
+
* site with no readable header carries every surface.
|
|
112
|
+
*/
|
|
113
|
+
export declare function siteGate(siteDir: string): (sitePath: string) => boolean;
|
|
107
114
|
/** The count check mode fails on: missing, stale and stray route files, orphaned overrides and missing seam aliases. */
|
|
108
115
|
export declare function routesFailing(drift: RoutesDrift): number;
|
|
109
116
|
/** How the site's route files and message overrides differ from the installed page packages. `routesFailing` zero means in sync. */
|
package/dist/routes.js
CHANGED
|
@@ -634,7 +634,7 @@ function plan(siteDir) {
|
|
|
634
634
|
* not under a gateable surface the site's `# Surfaces:` header leaves out. A
|
|
635
635
|
* site with no readable header carries every surface.
|
|
636
636
|
*/
|
|
637
|
-
function siteGate(siteDir) {
|
|
637
|
+
export function siteGate(siteDir) {
|
|
638
638
|
const noPublicTree = publicTreeRemoved(siteDir);
|
|
639
639
|
let surfaces;
|
|
640
640
|
const archPath = join(siteDir, "architecture.yaml");
|
package/dist/site-roster.js
CHANGED
|
@@ -36,6 +36,7 @@ import { diffTwoStrings } from "./lib/extract-module-bundle.js";
|
|
|
36
36
|
import { publicTreeRemoved } from "./lib/site-modules.js";
|
|
37
37
|
import { MODULE_SLICES, normalizeModules, } from "./module-architecture.js";
|
|
38
38
|
import { substituteMarkers } from "./substitute.js";
|
|
39
|
+
import { siteGate } from "./routes.js";
|
|
39
40
|
import { isUnservedSurfaceContent, PAGE_PACKAGE_ROUTES, pagePackageOfRoute, resolveSurfaces } from "./surfaces.js";
|
|
40
41
|
import { BASE_LAYER_DIR, SHAPE_STARTERS, TEMPLATE_MANIFESTS, resolveTemplate, rosterDeclares, shippedManifestPath, templateTreeDir, } from "./template-manifest.js";
|
|
41
42
|
import { isSpokeExcluded, readSpokeShape, } from "./topology.js";
|
|
@@ -671,11 +672,16 @@ export function servedRoutes(targetDir, spoke) {
|
|
|
671
672
|
}
|
|
672
673
|
const carried = webDependencies(targetDir);
|
|
673
674
|
const shape = spoke === undefined ? readSpokeShape(targetDir) : spoke;
|
|
675
|
+
const gate = siteGate(targetDir);
|
|
674
676
|
for (const row of PAGE_PACKAGE_ROUTES) {
|
|
675
677
|
if (!carried.has(row.package))
|
|
676
678
|
continue;
|
|
677
679
|
for (const page of row.pages) {
|
|
678
|
-
|
|
680
|
+
const sitePath = `apps/web/app/[locale]/${page}`;
|
|
681
|
+
// #11259 D5 — a siteGated package's page the generator leaves `not carried` is not served.
|
|
682
|
+
if (row.siteGated && !gate(`${sitePath}/page.tsx`))
|
|
683
|
+
continue;
|
|
684
|
+
if (!shape || !isSpokeExcluded(sitePath, shape))
|
|
679
685
|
add(page);
|
|
680
686
|
}
|
|
681
687
|
}
|
package/dist/surfaces.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export declare const PAGE_PACKAGE_ROUTES: readonly {
|
|
|
50
50
|
prefix: string;
|
|
51
51
|
siteOwned: readonly string[];
|
|
52
52
|
pages: readonly string[];
|
|
53
|
+
/** The manifest's `"siteGated": true` (#11259 D5): its pages are served only where the site selected them. */
|
|
54
|
+
siteGated?: true;
|
|
53
55
|
}[];
|
|
54
56
|
/** The page package that ships `route` (a ROUTE_ROOT-relative dir), or `undefined` when no page package does. */
|
|
55
57
|
export declare function pagePackageOfRoute(route: string): string | undefined;
|
package/dist/surfaces.js
CHANGED
|
@@ -88,6 +88,36 @@ export function isRemovedPublicRoutePath(destRel) {
|
|
|
88
88
|
return false;
|
|
89
89
|
return !HUB_KEPT_ROUTE_DIRS.includes(rest[0]);
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* #11259 — `@working-theory/site-pages`'s prefixes and the directories of its
|
|
93
|
+
* pages under them (its `routes.json`; the locale-root home page has no
|
|
94
|
+
* route directory). `PAGE_PACKAGE_ROUTES` holds one row per prefix.
|
|
95
|
+
*/
|
|
96
|
+
const SITE_PAGES_PREFIXES = [
|
|
97
|
+
"(authed)/leads", "[slug]", "about", "alternatives", "careers", "case-studies", "clients",
|
|
98
|
+
"contact", "courses", "events", "faq", "features", "for", "glossary", "how-to", "integrations",
|
|
99
|
+
"launch-service", "newsletter", "partners", "portfolio", "pricing", "privacy", "products",
|
|
100
|
+
"projects", "purchase-policy", "resources", "services", "software", "team", "tech-articles",
|
|
101
|
+
"templates", "terms", "testimonials", "thanks", "unsubscribe", "vs", "whitepapers",
|
|
102
|
+
"working-agreement",
|
|
103
|
+
];
|
|
104
|
+
const SITE_PAGES_PAGES = [
|
|
105
|
+
"(authed)/leads", "[slug]", "[slug]/[detail]", "about", "about/[slug]", "alternatives",
|
|
106
|
+
"careers", "careers/[slug]", "careers/[slug]/[action]", "case-studies", "case-studies/[slug]",
|
|
107
|
+
"clients", "contact", "courses", "courses/[slug]", "events", "events/[slug]", "faq", "features",
|
|
108
|
+
"features/[slug]", "for", "for/[slug]", "glossary", "how-to", "how-to/[slug]", "integrations",
|
|
109
|
+
"integrations/[slug]", "launch-service", "newsletter", "partners", "partners/[slug]",
|
|
110
|
+
"portfolio", "portfolio/[slug]", "pricing", "pricing/[slug]", "privacy", "products",
|
|
111
|
+
"products/[slug]", "projects", "projects/[slug]", "purchase-policy", "resources",
|
|
112
|
+
"resources/[slug]", "services", "services/[slug]", "services/[slug]/[child]", "software",
|
|
113
|
+
"software/[slug]", "team", "team/[slug]", "tech-articles", "tech-articles/[slug]", "templates",
|
|
114
|
+
"templates/[slug]", "terms", "testimonials", "thanks/[slug]", "unsubscribe", "vs/[slug]",
|
|
115
|
+
"whitepapers", "whitepapers/[slug]", "working-agreement",
|
|
116
|
+
];
|
|
117
|
+
// The manifest's two `siteOwned` routing files' directories, and
|
|
118
|
+
// `projects/apply` — a module directory under the `projects` prefix with no
|
|
119
|
+
// routing file (the signal-collectors client wrapper), which the site keeps.
|
|
120
|
+
const SITE_PAGES_SITE_OWNED = ["careers/apply", "careers/[slug]/apply", "projects/apply"];
|
|
91
121
|
/**
|
|
92
122
|
* The route trees a page package ships (ADR 0040): the package's pages
|
|
93
123
|
* mount through the route files `create-ailk routes` generates from its
|
|
@@ -167,6 +197,19 @@ export const PAGE_PACKAGE_ROUTES = [
|
|
|
167
197
|
// one entry per prefix of the package's two-prefix manifest.
|
|
168
198
|
{ package: "@working-theory/ui-docs-blog", prefix: "docs", siteOwned: [], pages: ["docs/[[...slug]]"] },
|
|
169
199
|
{ package: "@working-theory/ui-docs-blog", prefix: "blog", siteOwned: [], pages: ["blog/[[...slug]]"] },
|
|
200
|
+
// #11259 — the base website pages; likewise absent from the snapshot, one
|
|
201
|
+
// entry per prefix of the package's 38-prefix manifest. Gated on the
|
|
202
|
+
// site's surfaces and public tree, as the generator gates them.
|
|
203
|
+
...SITE_PAGES_PREFIXES.map((prefix) => {
|
|
204
|
+
const under = (path) => path === prefix || path.startsWith(`${prefix}/`);
|
|
205
|
+
return {
|
|
206
|
+
package: "@working-theory/site-pages",
|
|
207
|
+
prefix,
|
|
208
|
+
siteOwned: SITE_PAGES_SITE_OWNED.filter(under),
|
|
209
|
+
pages: SITE_PAGES_PAGES.filter(under),
|
|
210
|
+
siteGated: true,
|
|
211
|
+
};
|
|
212
|
+
}),
|
|
170
213
|
];
|
|
171
214
|
/** The page package that ships `route` (a ROUTE_ROOT-relative dir), or `undefined` when no page package does. */
|
|
172
215
|
export function pagePackageOfRoute(route) {
|
|
@@ -719,108 +762,36 @@ export function isUnservedSurfaceRoute(path, enabled) {
|
|
|
719
762
|
* (#4891, 0.14.0) are attributable.
|
|
720
763
|
*/
|
|
721
764
|
export const ROUTE_SINCE = {
|
|
722
|
-
|
|
723
|
-
|
|
765
|
+
// #11251 — no `flows/…` key: the flows route files are generated from
|
|
766
|
+
// `@working-theory/ui-signal-collectors`'s manifest (`create-ailk routes`),
|
|
767
|
+
// never synced from the snapshot.
|
|
768
|
+
// #11252 — no `meet…` or `private` key: the booking pages' route files are
|
|
769
|
+
// generated from `@working-theory/ui-scheduling`'s manifest (`create-ailk
|
|
770
|
+
// routes`), never synced from the snapshot.
|
|
771
|
+
// #11253 — no `purchase/…` key: the checkout return pair's route files are
|
|
772
|
+
// generated from `@working-theory/ui-commerce`'s manifest (`create-ailk
|
|
773
|
+
// routes`), never synced from the snapshot.
|
|
774
|
+
// #11259 D6 — no key under `@working-theory/site-pages`'s 38 prefixes but
|
|
775
|
+
// the three module routes that stay the site's (`careers/apply`,
|
|
776
|
+
// `careers/[slug]/apply`, `projects/apply`): the base pages' route files are
|
|
777
|
+
// generated from its manifest, never synced from the snapshot.
|
|
724
778
|
"blog/[[...slug]]": "0.0.0",
|
|
725
|
-
careers: "0.0.0",
|
|
726
|
-
"careers/[slug]": "0.0.0",
|
|
727
779
|
// #8840 D11 — the Job application magnet's two walks, signal-collectors
|
|
728
780
|
// slice files. Genuinely new, so they attach at the fixed group's next
|
|
729
781
|
// release line, the same rule #8661 D10 applied.
|
|
730
782
|
"careers/apply": "0.44.0",
|
|
731
783
|
"careers/[slug]/apply": "0.44.0",
|
|
732
|
-
// #8849 D7 — the Free apply page, a core file of the careers surface.
|
|
733
|
-
"careers/[slug]/[action]": "0.44.0",
|
|
734
|
-
"case-studies": "0.0.0",
|
|
735
|
-
"case-studies/[slug]": "0.0.0",
|
|
736
|
-
clients: "0.0.0",
|
|
737
|
-
contact: "0.0.0",
|
|
738
|
-
courses: "0.0.0",
|
|
739
|
-
"courses/[slug]": "0.0.0",
|
|
740
784
|
"dev/purchase": "0.0.0",
|
|
741
785
|
"docs/[[...slug]]": "0.0.0",
|
|
742
786
|
downloads: "0.0.0",
|
|
743
787
|
// #8848 D12 — the per-slug redirect into `/reports/<slug>`, a
|
|
744
788
|
// signal-collectors slice file at the fixed group's next release line.
|
|
745
789
|
"downloads/[slug]": "0.44.0",
|
|
746
|
-
events: "0.0.0",
|
|
747
|
-
"events/[slug]": "0.0.0",
|
|
748
|
-
// #6721 — the feature pages, a new route pair at today's line.
|
|
749
|
-
features: "0.27.0",
|
|
750
|
-
"features/[slug]": "0.27.0",
|
|
751
|
-
faq: "0.0.0",
|
|
752
|
-
// #11251 — no `flows/…` key: the flows route files are generated from
|
|
753
|
-
// `@working-theory/ui-signal-collectors`'s manifest (`create-ailk routes`),
|
|
754
|
-
// never synced from the snapshot.
|
|
755
|
-
// #6658 — genuinely new route directories (D4, D5), attaching at today's
|
|
756
|
-
// fixed-group version, the same "attach at today's version" rule #6084,
|
|
757
|
-
// #5977, #5678, #5479, #5371 and #5048 applied. `book-a-call` was a third
|
|
758
|
-
// such entry, retired by #6897 D10.
|
|
759
|
-
glossary: "0.26.0",
|
|
760
|
-
"how-to": "0.0.0",
|
|
761
|
-
"how-to/[slug]": "0.0.0",
|
|
762
|
-
integrations: "0.0.0",
|
|
763
|
-
"integrations/[slug]": "0.0.0",
|
|
764
|
-
"launch-service": "0.0.0",
|
|
765
|
-
// #11252 — no `meet…` or `private` key: the booking pages' route files are
|
|
766
|
-
// generated from `@working-theory/ui-scheduling`'s manifest (`create-ailk
|
|
767
|
-
// routes`), never synced from the snapshot.
|
|
768
|
-
newsletter: "0.26.0",
|
|
769
|
-
partners: "0.0.0",
|
|
770
|
-
"partners/[slug]": "0.0.0",
|
|
771
|
-
// #5479 — three genuinely new route directories, so they attach at today's
|
|
772
|
-
// fixed-group version rather than the "predates the manifest" 0.0.0 above,
|
|
773
|
-
// the same rule #5048 ("projects/apply") and #5014 ("(authed)") applied.
|
|
774
|
-
// #6687 — the before/after portfolio, a new route pair at today's line.
|
|
775
|
-
portfolio: "0.27.0",
|
|
776
|
-
"portfolio/[slug]": "0.27.0",
|
|
777
|
-
pricing: "0.22.0",
|
|
778
|
-
// #10044 D9 — a pricing page per offering. Genuinely new, so it attaches at
|
|
779
|
-
// the fixed group's next release line (the line `templates` attached at).
|
|
780
|
-
"pricing/[slug]": "0.50.0",
|
|
781
|
-
privacy: "0.22.0",
|
|
782
|
-
products: "0.0.0",
|
|
783
|
-
"products/[slug]": "0.0.0",
|
|
784
|
-
projects: "0.0.0",
|
|
785
|
-
"projects/[slug]": "0.0.0",
|
|
786
790
|
// #5048 — the founder-application reference mount. It carries the client
|
|
787
791
|
// wrapper only and no `page.tsx`: a route needs a question set, and a
|
|
788
792
|
// question set is the SITE's content. A scaffolded site adds its own route
|
|
789
793
|
// beside this file and passes its own config.
|
|
790
794
|
"projects/apply": "0.18.0",
|
|
791
|
-
// #11253 — no `purchase/…` key: the checkout return pair's route files are
|
|
792
|
-
// generated from `@working-theory/ui-commerce`'s manifest (`create-ailk
|
|
793
|
-
// routes`), never synced from the snapshot.
|
|
794
|
-
resources: "0.0.0",
|
|
795
|
-
"resources/[slug]": "0.0.0",
|
|
796
|
-
services: "0.0.0",
|
|
797
|
-
"services/[slug]": "0.0.0",
|
|
798
|
-
// #10043 D11 — a Service under its category. Genuinely new, so it attaches
|
|
799
|
-
// at the fixed group's next release line (the line `templates` attached at).
|
|
800
|
-
"services/[slug]/[child]": "0.50.0",
|
|
801
|
-
software: "0.0.0",
|
|
802
|
-
"software/[slug]": "0.0.0",
|
|
803
|
-
// #7744 — the team profile pages, a new route pair at today's line.
|
|
804
|
-
team: "0.35.0",
|
|
805
|
-
"team/[slug]": "0.35.0",
|
|
806
|
-
"tech-articles": "0.0.0",
|
|
807
|
-
"tech-articles/[slug]": "0.0.0",
|
|
808
|
-
terms: "0.22.0",
|
|
809
|
-
testimonials: "0.0.0",
|
|
810
|
-
"thanks/[slug]": "0.14.0",
|
|
811
|
-
// #6878 — the persona family, renamed from `use-cases`/`use-cases/[slug]`.
|
|
812
|
-
// Attaches at today's fixed-group version, the same "attach at today's
|
|
813
|
-
// version" rule #6084, #5977, #5678, #5479, #5371 and #5048 applied.
|
|
814
|
-
for: "0.28.0",
|
|
815
|
-
"for/[slug]": "0.28.0",
|
|
816
|
-
// #6878 D9 — the comparison hub/spoke pair.
|
|
817
|
-
alternatives: "0.28.0",
|
|
818
|
-
"vs/[slug]": "0.28.0",
|
|
819
|
-
whitepapers: "0.0.0",
|
|
820
|
-
"whitepapers/[slug]": "0.0.0",
|
|
821
|
-
// #8661 D10 — the working-agreement page. Genuinely new, so it attaches at
|
|
822
|
-
// the fixed group's next release line, the same rule #7430 applied.
|
|
823
|
-
"working-agreement": "0.42.0",
|
|
824
795
|
// #5014 — the (authed) route GROUP: layout.tsx sits directly under
|
|
825
796
|
// "(authed)" (a Next.js route group — its parens are not a URL segment);
|
|
826
797
|
// account/ and waitlist/ are its two syncable sub-trees.
|
|
@@ -858,7 +829,6 @@ export const ROUTE_SINCE = {
|
|
|
858
829
|
// unsubscribe landing every signed link calls. Genuinely new, so they
|
|
859
830
|
// attach at today's fixed-group version, the same rule #8339 applied.
|
|
860
831
|
"(authed)/account/privacy": "0.40.0",
|
|
861
|
-
unsubscribe: "0.40.0",
|
|
862
832
|
// #8234 — the member Artifacts pages and a version's file route. Genuinely
|
|
863
833
|
// new, so they attach at today's fixed-group version, the same rule #7430
|
|
864
834
|
// applied.
|
|
@@ -886,18 +856,6 @@ export const ROUTE_SINCE = {
|
|
|
886
856
|
// opens. Genuinely new, so it attaches at the fixed group's next release
|
|
887
857
|
// line.
|
|
888
858
|
"(authed)/account/inbox/thread": "0.60.0",
|
|
889
|
-
// #10051 D9 — the templates route family. Genuinely new, so it attaches at
|
|
890
|
-
// the fixed group's next release line.
|
|
891
|
-
templates: "0.50.0",
|
|
892
|
-
"templates/[slug]": "0.50.0",
|
|
893
|
-
// The leads inbox (#5678). The ROUTE ships in every scaffold, Free
|
|
894
|
-
// included — lead capture is a never-gate surface, so reading a lead back
|
|
895
|
-
// is one too. Whether it shows a ROW is a separate question with two
|
|
896
|
-
// deployment preconditions (a resolvable workspace, and a `siteId` that
|
|
897
|
-
// equals a workspace id); both fail empty, never wide. See
|
|
898
|
-
// `packages/api/src/services/leads-inbox.ts` § "What it takes for this to
|
|
899
|
-
// return anything".
|
|
900
|
-
"(authed)/leads": "0.24.0",
|
|
901
859
|
// #5371 — the workspace module's three settings routes. Genuinely new route
|
|
902
860
|
// directories, so they attach at today's fixed-group version rather than the
|
|
903
861
|
// "predates the manifest" 0.0.0 above, the same rule #5479 and #5048 applied.
|
|
@@ -947,14 +905,6 @@ export const ROUTE_SINCE = {
|
|
|
947
905
|
"(auth)/verify-email": "0.24.0",
|
|
948
906
|
// #10357 D13 — the MCP consent step.
|
|
949
907
|
"(auth)/consent": "0.53.0",
|
|
950
|
-
// #5469 D2 — the generic `[slug]` content route. A genuinely new route
|
|
951
|
-
// directory, so it attaches at today's fixed-group version, the same rule
|
|
952
|
-
// #5479, #5371 and #5048 applied.
|
|
953
|
-
"[slug]": "0.23.0",
|
|
954
|
-
// #6897 D2 — the Free /meet/<slug> placeholder detail route. A genuinely
|
|
955
|
-
// new route directory, so it attaches at today's fixed-group version, the
|
|
956
|
-
// same rule applied above.
|
|
957
|
-
"[slug]/[detail]": "0.28.0",
|
|
958
908
|
};
|
|
959
909
|
/**
|
|
960
910
|
* Surface id of the registry that owns `routeDir` (ROUTE_ROOT-relative): the
|
|
@@ -977,7 +927,6 @@ export function surfaceForRouteDir(routeDir) {
|
|
|
977
927
|
/** #9746 D10 — what each Magnets and Meetings tab page imports beside itself. */
|
|
978
928
|
const ADMIN_PANEL_ROUTE_DEPENDENCIES = [
|
|
979
929
|
"apps/web/lib/server-api.ts",
|
|
980
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
981
930
|
`${ROUTE_ROOT}/(authed)/admin/admin-nav.ts`,
|
|
982
931
|
`${ROUTE_ROOT}/(authed)/admin/admin-panels.tsx`,
|
|
983
932
|
];
|
|
@@ -1006,11 +955,6 @@ export const ROUTE_DEPENDENCIES = {
|
|
|
1006
955
|
// reader.
|
|
1007
956
|
"(auth)": ["apps/web/lib/site-brand.tsx", "apps/web/lib/site-logo.tsx"],
|
|
1008
957
|
"(auth)/sign-in": ["apps/web/lib/auth-env.ts"],
|
|
1009
|
-
// #10051 D9 — the /templates hub imports the route-family helper and the
|
|
1010
|
-
// template-listing mapping, its detail route the mapping; each lists both
|
|
1011
|
-
// so the pair travels together to a site scaffolded before them.
|
|
1012
|
-
templates: ["apps/web/lib/route-family.ts", "apps/web/lib/template-listing.ts"],
|
|
1013
|
-
"templates/[slug]": ["apps/web/lib/route-family.ts", "apps/web/lib/template-listing.ts"],
|
|
1014
958
|
// #8765 D8/D9 — the sign-up page links its agreements through the one
|
|
1015
959
|
// localized policy map; the carried-cookie mint (`sign-up.actions.ts`) is
|
|
1016
960
|
// deleted, since the server now refuses and records the agreements.
|
|
@@ -1030,33 +974,28 @@ export const ROUTE_DEPENDENCIES = {
|
|
|
1030
974
|
],
|
|
1031
975
|
"(authed)/admin": [
|
|
1032
976
|
"apps/web/lib/server-api.ts",
|
|
1033
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
1034
977
|
// #9746 D8 — the shared nav every /admin tab imports.
|
|
1035
978
|
`${ROUTE_ROOT}/(authed)/admin/admin-nav.ts`,
|
|
1036
979
|
],
|
|
1037
|
-
"(authed)/leads": ["apps/web/lib/server-api.ts"],
|
|
1038
980
|
// #5977 — the editor routes' own imports, read from their sources: both
|
|
1039
981
|
// pages call `forwardedCookieInit`/`unwrapApiResult` from `lib/server-api`
|
|
1040
|
-
// and render the shared `ForbiddenState` on the tenant guard's 403
|
|
1041
|
-
//
|
|
982
|
+
// and render the shared `ForbiddenState` on the tenant guard's 403 (from
|
|
983
|
+
// `@working-theory/site-pages/lib/forbidden-state` since #11259, which every
|
|
984
|
+
// site installs, so it is no file dependency). Declared for registry
|
|
1042
985
|
// completeness; inert in practice while the routes are excluded from the
|
|
1043
986
|
// snapshot (see ROUTE_SINCE above).
|
|
1044
987
|
"(authed)/edit": [
|
|
1045
988
|
"apps/web/lib/server-api.ts",
|
|
1046
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
1047
989
|
],
|
|
1048
990
|
"(authed)/edit/[type]/[slug]": [
|
|
1049
991
|
"apps/web/lib/server-api.ts",
|
|
1050
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
1051
992
|
],
|
|
1052
993
|
"(authed)/admin/site": [
|
|
1053
994
|
"apps/web/lib/server-api.ts",
|
|
1054
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
1055
995
|
`${ROUTE_ROOT}/(authed)/admin/admin-nav.ts`,
|
|
1056
996
|
],
|
|
1057
997
|
"(authed)/admin/team": [
|
|
1058
998
|
"apps/web/lib/server-api.ts",
|
|
1059
|
-
`${ROUTE_ROOT}/(authed)/waitlist/components/ForbiddenState.tsx`,
|
|
1060
999
|
`${ROUTE_ROOT}/(authed)/admin/admin-nav.ts`,
|
|
1061
1000
|
],
|
|
1062
1001
|
// #9746 D10 — the Magnets and Meetings tabs: the nav plus the client
|
|
@@ -1068,44 +1007,6 @@ export const ROUTE_DEPENDENCIES = {
|
|
|
1068
1007
|
// #9851 D7 — the Integrations tab: the nav plus the Slack bindings.
|
|
1069
1008
|
"(authed)/admin/integrations": ADMIN_PANEL_ROUTE_DEPENDENCIES,
|
|
1070
1009
|
"(authed)/waitlist": ["apps/web/lib/server-api.ts"],
|
|
1071
|
-
// #8927 D8 — /pricing maps the Offerings shown set through the mapper.
|
|
1072
|
-
// #9480 — and reads its browser-facing API origin through the topology seam
|
|
1073
|
-
// (#7874 D12), so a spoke with /pricing reads no refused name. Every
|
|
1074
|
-
// scaffold since #7874 already carries its own render of the seam, and a
|
|
1075
|
-
// dependency copy never overwrites, so this entry admits the import; it
|
|
1076
|
-
// never replaces a spoke's render with the template's hub one.
|
|
1077
|
-
pricing: [
|
|
1078
|
-
"apps/web/lib/offerings-pricing.ts",
|
|
1079
|
-
"apps/web/lib/api-origin.generated.ts",
|
|
1080
|
-
// #10044 D9 — the shared Pricing render and the offering pages' list.
|
|
1081
|
-
"apps/web/lib/pricing-page.ts",
|
|
1082
|
-
"apps/web/lib/route-family.ts",
|
|
1083
|
-
],
|
|
1084
|
-
// #10044 D9 — one offering's pricing page renders through the same lib,
|
|
1085
|
-
// which imports the route-family helper's `DetailPage` type.
|
|
1086
|
-
"pricing/[slug]": [
|
|
1087
|
-
"apps/web/lib/offerings-pricing.ts",
|
|
1088
|
-
"apps/web/lib/api-origin.generated.ts",
|
|
1089
|
-
"apps/web/lib/pricing-page.ts",
|
|
1090
|
-
"apps/web/lib/route-family.ts",
|
|
1091
|
-
],
|
|
1092
|
-
// #10043 D11 — the services hub maps its links through the services
|
|
1093
|
-
// listing; a service page lists its category's children through it and the
|
|
1094
|
-
// route-family helper, and the nested route redirects with it. The
|
|
1095
|
-
// listing reads the base from `services-path.ts`, which the middleware
|
|
1096
|
-
// already carries; it is listed so a site whose middleware predates it
|
|
1097
|
-
// still compiles (a dependency copy never overwrites).
|
|
1098
|
-
services: ["apps/web/lib/service-listing.ts", "apps/web/lib/services-path.ts"],
|
|
1099
|
-
"services/[slug]": [
|
|
1100
|
-
"apps/web/lib/route-family.ts",
|
|
1101
|
-
"apps/web/lib/service-listing.ts",
|
|
1102
|
-
"apps/web/lib/services-path.ts",
|
|
1103
|
-
],
|
|
1104
|
-
"services/[slug]/[child]": [
|
|
1105
|
-
"apps/web/lib/route-family.ts",
|
|
1106
|
-
"apps/web/lib/service-listing.ts",
|
|
1107
|
-
"apps/web/lib/services-path.ts",
|
|
1108
|
-
],
|
|
1109
1010
|
};
|
|
1110
1011
|
/**
|
|
1111
1012
|
* i18n message namespaces (dot-path into `apps/web/messages/<locale>.json`) a
|
|
@@ -1129,7 +1030,6 @@ export const ROUTE_MESSAGE_NAMESPACES = {
|
|
|
1129
1030
|
// #9966 D2 — the hub's consent page reads its own namespace.
|
|
1130
1031
|
"(authed)/account/connect": ["hubConnect"],
|
|
1131
1032
|
"(authed)/admin": ["admin"],
|
|
1132
|
-
"(authed)/leads": ["leadsInbox"],
|
|
1133
1033
|
// #5977 — every string on both editor routes comes from the `edit`
|
|
1134
1034
|
// namespace (spec 5872 D10).
|
|
1135
1035
|
"(authed)/edit": ["edit"],
|
|
@@ -1142,19 +1042,6 @@ export const ROUTE_MESSAGE_NAMESPACES = {
|
|
|
1142
1042
|
"(authed)/admin/meetings/[slug]": ["admin"],
|
|
1143
1043
|
"(authed)/admin/integrations": ["admin"],
|
|
1144
1044
|
"(authed)/waitlist": ["waitlistDashboard.gate"],
|
|
1145
|
-
// #7744 — the /team hub's empty state reads the `team` namespace.
|
|
1146
|
-
team: ["team"],
|
|
1147
|
-
// #8438 D21 — the unsubscribe landing's own namespace.
|
|
1148
|
-
unsubscribe: ["unsubscribe"],
|
|
1149
|
-
// #8927 D6 — the Offerings cards' CTA, recommendation and period phrases.
|
|
1150
|
-
// #10044 D8 — the offering pricing pages list's heading and link label.
|
|
1151
|
-
pricing: ["pricing", "pricingOfferings", "pricingPages"],
|
|
1152
|
-
"pricing/[slug]": ["pricing", "pricingOfferings"],
|
|
1153
|
-
// #10051 D8 — the /templates cards, actions and empty state.
|
|
1154
|
-
templates: ["templates"],
|
|
1155
|
-
"templates/[slug]": ["templates"],
|
|
1156
|
-
// #10043 D11 — a category's list of its services (heading, link label).
|
|
1157
|
-
"services/[slug]": ["services"],
|
|
1158
1045
|
};
|
|
1159
1046
|
/** Template-relative path of the generated site-nav registry. */
|
|
1160
1047
|
export const NAV_CONFIG_PATH = "apps/web/lib/nav-config.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ailk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"description": "Scaffolder for AI Launch Kit — `pnpm create ailk@latest <dir>` produces a starter repo consuming @working-theory/* from npm (per ADR 0007).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"tar": "^7.5.21"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@working-theory/schema": "0.
|
|
32
|
-
"@working-theory/templates": "0.
|
|
31
|
+
"@working-theory/schema": "0.65.0",
|
|
32
|
+
"@working-theory/templates": "0.65.0"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|