create-ailk 0.13.0 → 0.15.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 +12 -4
- package/component-catalog.json +250 -36
- package/component-catalog.md +10 -6
- package/dist/add-module.d.ts +7 -0
- package/dist/add-module.js +34 -2
- package/dist/add-route.js +18 -2
- package/dist/apply-design.d.ts +32 -2
- package/dist/apply-design.js +155 -22
- package/dist/cli.js +24 -3
- package/dist/derive-architecture.d.ts +15 -2
- package/dist/derive-architecture.js +34 -6
- package/dist/design-compile.d.ts +70 -2
- package/dist/design-compile.js +97 -1
- package/dist/design-home.d.ts +74 -0
- package/dist/design-home.js +256 -0
- package/dist/design-package.d.ts +39 -2
- package/dist/design-package.js +224 -9
- package/dist/design-presets.d.ts +17 -1
- package/dist/design-presets.js +17 -5
- package/dist/design-scaffold.d.ts +6 -25
- package/dist/design-scaffold.js +26 -74
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/lib/chrome-readers.d.ts +21 -0
- package/dist/lib/chrome-readers.js +100 -0
- package/dist/lib/design-checks.d.ts +12 -1
- package/dist/lib/design-checks.js +38 -2
- package/dist/lib/extract-module-bundle.d.ts +11 -0
- package/dist/lib/extract-module-bundle.js +36 -6
- package/dist/lib/license-key-files.d.ts +6 -1
- package/dist/lib/license-key-files.js +9 -4
- package/dist/lib/module-license-gate.d.ts +9 -0
- package/dist/lib/module-license-gate.js +18 -0
- package/dist/module-architecture.d.ts +9 -0
- package/dist/module-architecture.js +6 -0
- package/dist/parse-args.d.ts +22 -0
- package/dist/parse-args.js +73 -0
- package/dist/programmatic.d.ts +20 -0
- package/dist/programmatic.js +180 -35
- package/dist/site-chrome.d.ts +42 -0
- package/dist/site-chrome.js +140 -2
- package/dist/site-fonts.d.ts +21 -0
- package/dist/site-fonts.js +54 -0
- package/dist/site-manifest.d.ts +12 -5
- package/dist/site-manifest.js +25 -11
- package/dist/site-roster.d.ts +16 -0
- package/dist/site-roster.js +81 -0
- package/dist/starter-grid.js +15 -0
- package/dist/surfaces.js +12 -0
- package/dist/sync-routes.js +11 -2
- package/dist/team-profiles.d.ts +29 -0
- package/dist/team-profiles.js +43 -0
- package/dist/topology.d.ts +131 -0
- package/dist/topology.js +533 -0
- package/package.json +3 -3
- package/release-scope.json +1 -1
- package/site-templates/_base/content/en/TeamList/team.mdx +68 -0
- package/site-templates/_base/content/en/TeamMember/first-member.mdx +22 -0
- package/site-templates/_base/content/en/TeamMember/second-member.mdx +22 -0
- package/site-templates/_base/content/en/TeamMember/third-member.mdx +22 -0
- package/site-templates/designs/minimalism/DESIGN.md +166 -36
- package/site-templates/designs/minimalism/home/local-business-service.mdx +119 -0
- package/site-templates/designs/minimalism/home/organization-product.mdx +132 -0
- package/site-templates/designs/minimalism/home/organization-service.mdx +131 -0
- package/site-templates/designs/minimalism/home/person-service.mdx +101 -0
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +34 -1
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +20 -0
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +34 -1
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +22 -1
- package/site-templates/marketing-site-free/ailk-template.json +1 -1
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.json +34 -1
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +26 -7
- package/site-templates/shapes/local-business-service/ailk-template.json +1 -1
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +34 -1
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +26 -7
- package/site-templates/shapes/organization-service/ailk-template.json +1 -1
- package/templates/README.md +2 -0
- package/templates/apps/api/CLAUDE.md +6 -1
- package/templates/apps/api/package.json +1 -0
- package/templates/apps/api/src/__tests__/factories/agent-caller.ts +5 -1
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +10 -0
- package/templates/apps/api/src/lib/__tests__/agent-store.test.ts +114 -1
- package/templates/apps/api/src/lib/__tests__/site.test.ts +54 -0
- package/templates/apps/api/src/lib/agent-store.ts +95 -3
- package/templates/apps/api/src/lib/site.ts +37 -0
- package/templates/apps/api/src/lib/spoke-store.ts +18 -2
- package/templates/apps/api/src/middleware/__tests__/auth.bearer-path.test.ts +4 -0
- package/templates/apps/api/src/middleware/__tests__/default-tenant.test.ts +22 -0
- package/templates/apps/api/src/middleware/auth.ts +3 -0
- package/templates/apps/api/src/openapi/__tests__/openapi.test.ts +23 -0
- package/templates/apps/api/src/openapi/spec.ts +38 -2
- package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +50 -2
- package/templates/apps/api/src/routes/checkout/sessions.ts +7 -0
- package/templates/apps/api/src/routes/leads/__tests__/index.test.ts +275 -0
- package/templates/apps/api/src/routes/leads/index.ts +69 -6
- package/templates/apps/api/src/routes/webhooks/README.md +39 -0
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-site-filter.test.ts +366 -0
- package/templates/apps/api/src/routes/webhooks/stripe.ts +61 -1
- package/templates/apps/api/src/services/__tests__/lead-routing.test.ts +199 -0
- package/templates/apps/api/src/services/default-tenant.ts +41 -7
- package/templates/apps/api/src/services/lead-routing.ts +148 -29
- package/templates/apps/api/src/services/public-site-resolver.ts +48 -0
- package/templates/apps/mcp/__tests__/index.test.ts +5 -5
- package/templates/apps/mcp/package.json +1 -1
- package/templates/apps/mcp/src/index.ts +6 -4
- package/templates/apps/mcp/src/lib/content-adapter.ts +2 -2
- package/templates/apps/mcp/src/lib/topology.generated.ts +24 -0
- package/templates/apps/web/CLAUDE.md +12 -0
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +10 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/__tests__/theme-modes.test.ts +42 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/theme-modes.ts +8 -0
- package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +3 -0
- package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +3 -0
- package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +14 -1
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +66 -14
- package/templates/apps/web/app/[locale]/contact/__tests__/site-contact-lines.test.ts +163 -0
- package/templates/apps/web/app/[locale]/contact/site-contact-lines.ts +68 -0
- package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +4 -4
- package/templates/apps/web/app/[locale]/downloads/__tests__/page-renderer-migration.test.tsx +15 -3
- package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +17 -6
- package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +14 -1
- package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +4 -6
- package/templates/apps/web/app/[locale]/layout.tsx +212 -57
- package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +3 -0
- package/templates/apps/web/app/[locale]/page.tsx +37 -0
- package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +4 -6
- package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +5 -2
- package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +15 -2
- package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +43 -6
- package/templates/apps/web/app/[locale]/services/page.tsx +14 -2
- package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +45 -0
- package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +155 -0
- package/templates/apps/web/app/[locale]/team/page.tsx +49 -0
- package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +14 -1
- package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +3 -0
- package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +2 -2
- package/templates/apps/web/app/not-found.tsx +47 -0
- package/templates/apps/web/app/openapi.json/__tests__/route.test.ts +89 -1
- package/templates/apps/web/app/openapi.json/route.ts +69 -1
- package/templates/apps/web/instrumentation.ts +7 -4
- package/templates/apps/web/lib/__tests__/closing-footer-path.test.ts +96 -0
- package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +95 -0
- package/templates/apps/web/lib/__tests__/relay.test.ts +290 -0
- package/templates/apps/web/lib/__tests__/site-brand.test.ts +52 -0
- package/templates/apps/web/lib/__tests__/site-theme-head.test.ts +70 -0
- package/templates/apps/web/lib/__tests__/site-theme.test.ts +64 -1
- package/templates/apps/web/lib/closing-footer-path.ts +50 -0
- package/templates/apps/web/lib/profile-back-link.ts +51 -0
- package/templates/apps/web/lib/relay.ts +206 -2
- package/templates/apps/web/lib/site-brand.tsx +22 -1
- package/templates/apps/web/lib/site-chrome.ts +15 -0
- package/templates/apps/web/lib/site-fonts.ts +15 -0
- package/templates/apps/web/lib/site-logo.tsx +39 -1
- package/templates/apps/web/lib/site-theme-head.ts +33 -0
- package/templates/apps/web/lib/site-theme.ts +13 -1
- package/templates/apps/web/lib/topology.generated.ts +23 -0
- package/templates/apps/web/messages/en.json +7 -1
- package/templates/apps/web/package.json +1 -1
- package/templates/database/CHANGELOG.md +32 -0
- package/templates/database/__tests__/agents.db.test.ts +65 -0
- package/templates/database/__tests__/lead-idempotency-key.db.test.ts +92 -0
- package/templates/database/auth/schema.prisma +23 -0
- package/templates/database/inbox/schema.prisma +13 -0
- package/templates/database/jest.config.cjs +7 -11
- package/templates/database/migrations/20261008120000_user_last_workspace/migration.sql +35 -0
- package/templates/database/migrations/20261008130000_lead_idempotency_key/migration.sql +20 -0
- package/templates/database/migrations/20261009120000_agent_grants/migration.sql +33 -0
- package/templates/database/package.json +1 -1
- package/versions.json +35 -34
- package/site-templates/designs/minimalism/sample/README.md +0 -48
- package/site-templates/designs/minimalism/sample/content/en/HomePage/home.mdx +0 -244
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-1.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-2.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-3.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-4.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-5.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/avatar-placeholder-6.svg +0 -7
- package/site-templates/designs/minimalism/sample/public/hero-backdrop.svg +0 -17
- package/site-templates/designs/minimalism/sample/public/logo-placeholder-1.svg +0 -6
- package/site-templates/designs/minimalism/sample/public/logo-placeholder-2.svg +0 -6
- package/site-templates/designs/minimalism/sample/public/logo-placeholder-3.svg +0 -6
- package/site-templates/designs/minimalism/sample/public/wordmark-placeholder.svg +0 -28
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The seeded team (#7744 D8) — the one source of the three placeholder people
|
|
3
|
+
* the organization shapes ship.
|
|
4
|
+
*
|
|
5
|
+
* The `_base` layer installs one `TeamMember` profile per person at
|
|
6
|
+
* `/team/<slug>` and a `/team` index listing them (#7744 D4); minimalism's
|
|
7
|
+
* home seeds for the three organization shapes carry a `people` slide listing
|
|
8
|
+
* the same members, each linking to their profile. `team-profiles.test.ts`
|
|
9
|
+
* pins that every one of those seeds agrees with `TEAM_SEED_MEMBERS`.
|
|
10
|
+
*
|
|
11
|
+
* `node:fs` only: create-ailk ships one runtime dependency (`tar`), and its
|
|
12
|
+
* scaffold-time readers may not import `yaml` (see `design-package.ts`), so
|
|
13
|
+
* this module parses nothing — it only checks which profile files a site has.
|
|
14
|
+
*/
|
|
15
|
+
import { existsSync } from "node:fs";
|
|
16
|
+
import { join } from "node:path";
|
|
17
|
+
function seedMember(slug, ordinal) {
|
|
18
|
+
return {
|
|
19
|
+
slug,
|
|
20
|
+
name: `{${ordinal} team member's name}`,
|
|
21
|
+
role: "{Their title}",
|
|
22
|
+
links: [{ type: "page", url: `/team/${slug}`, label: "{View profile}" }],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The three seeded people, in seed order: slug, the seed's `title` as `name`,
|
|
27
|
+
* "{Their title}", and a page link to `/team/<slug>` labelled "{View profile}".
|
|
28
|
+
*/
|
|
29
|
+
export const TEAM_SEED_MEMBERS = [
|
|
30
|
+
seedMember("first-member", "First"),
|
|
31
|
+
seedMember("second-member", "Second"),
|
|
32
|
+
seedMember("third-member", "Third"),
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* `TEAM_SEED_MEMBERS` whose `<siteRoot>/content/en/TeamMember/<slug>.mdx`
|
|
36
|
+
* exists (without `slug`), or `undefined` when none does (person-service, or
|
|
37
|
+
* a site that deleted them). Reads, never writes.
|
|
38
|
+
*/
|
|
39
|
+
export function teamSlideMembers(siteRoot) {
|
|
40
|
+
const dir = join(siteRoot, "content", "en", "TeamMember");
|
|
41
|
+
const members = TEAM_SEED_MEMBERS.filter(({ slug }) => existsSync(join(dir, `${slug}.mdx`))).map(({ slug: _slug, ...member }) => member);
|
|
42
|
+
return members.length > 0 ? members : undefined;
|
|
43
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type ModuleName } from "./parse-args.js";
|
|
2
|
+
/** The two topologies. `hub` is the default and the only one before #7426. */
|
|
3
|
+
export declare const TOPOLOGIES: readonly ["hub", "spoke"];
|
|
4
|
+
export type Topology = (typeof TOPOLOGIES)[number];
|
|
5
|
+
/** A refusal or a malformed input this module names. */
|
|
6
|
+
export declare class TopologyError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
/** Roots no spoke carries. `apps/mcp` joins them with `--without-mcp`. */
|
|
10
|
+
export declare const SPOKE_REMOVED_ROOTS: readonly string[];
|
|
11
|
+
/** The root `--without-mcp` removes. */
|
|
12
|
+
export declare const SPOKE_MCP_ROOT = "apps/mcp";
|
|
13
|
+
/**
|
|
14
|
+
* The sign-in and database files a spoke does not carry — files and
|
|
15
|
+
* directories, scaffold-relative. Every other file that imports one of them
|
|
16
|
+
* goes with it (`spokeExclusions`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const SPOKE_REMOVAL_SEEDS: readonly string[];
|
|
19
|
+
/** The two generated seam files (D5). A seam is rewritten, never removed. */
|
|
20
|
+
export declare const WEB_SEAM_PATH = "apps/web/lib/topology.generated.ts";
|
|
21
|
+
export declare const MCP_SEAM_PATH = "apps/mcp/src/lib/topology.generated.ts";
|
|
22
|
+
export declare const SPOKE_SEAM_FILES: readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* The closure's allow-list: a file `spokeExclusions` removes must sit under
|
|
25
|
+
* one of these prefixes, or under a `__tests__/` directory. A member outside
|
|
26
|
+
* both is a defect — a shared file started importing a sign-in or database
|
|
27
|
+
* file — and `spokeExclusions` throws naming it rather than cut it silently.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SPOKE_REMOVABLE_PREFIXES: readonly string[];
|
|
30
|
+
export interface SpokeShapeOptions {
|
|
31
|
+
/** Whether the spoke keeps `apps/mcp` (the default; `--without-mcp` drops it). */
|
|
32
|
+
mcp: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** The removed roots for these options. */
|
|
35
|
+
export declare function spokeRemovedRoots(opts: SpokeShapeOptions): string[];
|
|
36
|
+
/** Whether a closure member is one the registry allows a spoke to drop. */
|
|
37
|
+
export declare function isRemovableClosureMember(path: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Every path a spoke does not carry, computed over the built `templates/`
|
|
40
|
+
* tree: the removed roots, the seeds that apply, and every source file under
|
|
41
|
+
* the kept apps that reaches a seed through relative imports, to a fixed
|
|
42
|
+
* point. Sorted; directories and files alike, matched at a directory
|
|
43
|
+
* boundary by `isSpokeExcluded` and `copyTemplate`'s `excludePaths`.
|
|
44
|
+
*
|
|
45
|
+
* The walk is the relative-import resolution `importClosure` uses
|
|
46
|
+
* (`lib/import-graph.ts`), with ONE difference: a seam file is never a
|
|
47
|
+
* candidate, so the walk never crosses it. The hub render of a seam imports
|
|
48
|
+
* a seed by design (D5); its importers keep their place on a spoke because
|
|
49
|
+
* the spoke render of the same file imports none.
|
|
50
|
+
*
|
|
51
|
+
* @throws TopologyError naming every closure member outside
|
|
52
|
+
* `SPOKE_REMOVABLE_PREFIXES` and not a test — a new shared file importing
|
|
53
|
+
* a sign-in or database file, which removing would silently break the
|
|
54
|
+
* spoke (spec § 5.3: escalate, never widen).
|
|
55
|
+
*/
|
|
56
|
+
export declare function spokeExclusions(templatesDir: string, opts: SpokeShapeOptions): string[];
|
|
57
|
+
export interface IsSpokeExcludedOptions extends SpokeShapeOptions {
|
|
58
|
+
/**
|
|
59
|
+
* The full `spokeExclusions(...)` list, when the caller computed it. Absent,
|
|
60
|
+
* only the removed roots and the seeds are checked — exact for any path
|
|
61
|
+
* that is not a file of the built `templates/` tree (a module bundle's
|
|
62
|
+
* file, a route directory), since only a template file can be a closure
|
|
63
|
+
* member.
|
|
64
|
+
*/
|
|
65
|
+
exclusions?: readonly string[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The one predicate for "a spoke does not carry this path" (the Phase 2
|
|
69
|
+
* generator contract). Scaffold-relative, `/`- or `\`-separated.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isSpokeExcluded(path: string, opts: IsSpokeExcludedOptions): boolean;
|
|
72
|
+
/** `apps/web/lib/topology.generated.ts` for `topology` (D5). */
|
|
73
|
+
export declare function renderWebSeam(topology: Topology): string;
|
|
74
|
+
/** `apps/mcp/src/lib/topology.generated.ts` for `topology` (D5). */
|
|
75
|
+
export declare function renderMcpSeam(topology: Topology): string;
|
|
76
|
+
/** `pnpm-workspace.yaml` without its `database` package entry. */
|
|
77
|
+
export declare function transformWorkspaceYaml(text: string): string;
|
|
78
|
+
/** The root `package.json` without its `db:*` scripts. */
|
|
79
|
+
export declare function transformRootPackageJson(text: string): string;
|
|
80
|
+
/** The root `tsconfig.json` without a reference under a removed root. */
|
|
81
|
+
export declare function transformRootTsconfig(text: string, opts: SpokeShapeOptions): string;
|
|
82
|
+
/**
|
|
83
|
+
* An app's `package.json` without its `@working-theory/database` dependency.
|
|
84
|
+
* @throws TopologyError when `required` and the dependency is absent.
|
|
85
|
+
*/
|
|
86
|
+
export declare function transformAppPackageJson(text: string, label: string, required: boolean): string;
|
|
87
|
+
/**
|
|
88
|
+
* Apply every D6 root-file transform to the spoke at `targetDir` (after the
|
|
89
|
+
* base copy, before any module or template layer), and write the spoke
|
|
90
|
+
* render of each seam it carries (D5).
|
|
91
|
+
* @throws TopologyError naming the file whose anchor is missing.
|
|
92
|
+
*/
|
|
93
|
+
export declare function applySpokeTransforms(targetDir: string, opts: SpokeShapeOptions): void;
|
|
94
|
+
/** The env var a spoke reaches its hub through. */
|
|
95
|
+
export declare const HUB_ORIGIN_ENV_VAR = "AILK_API_URL";
|
|
96
|
+
/**
|
|
97
|
+
* Write `AILK_API_URL=<origin>` to the spoke's `apps/web/.env.local` (D2) —
|
|
98
|
+
* the `auth-secret-file.ts` never-clobber rule: an assignment already in any
|
|
99
|
+
* env file Next loads for `apps/web` is kept, and `.env.local` stays
|
|
100
|
+
* gitignored. Never writes `AILK_SPOKE_KEY` or `AILK_VISITOR_FORWARD_KEY`:
|
|
101
|
+
* the hub issues those.
|
|
102
|
+
*/
|
|
103
|
+
export declare function writeHubOriginEnv(targetDir: string, origin: string): void;
|
|
104
|
+
/** The `hard_floors:` block a spoke's `project.yaml` carries (D9). */
|
|
105
|
+
export declare function renderSpokeHardFloors(opts: SpokeShapeOptions): string;
|
|
106
|
+
/** `project.yaml` with its `hard_floors:` block replaced by the spoke's (D9). */
|
|
107
|
+
export declare function transformProjectYaml(text: string, opts: SpokeShapeOptions): string;
|
|
108
|
+
/** The modules a spoke may carry — every slice declaring `spoke: true`. */
|
|
109
|
+
export declare function spokeModules(): ModuleName[];
|
|
110
|
+
/** The refusal for a module a spoke cannot carry, or undefined when admitted. */
|
|
111
|
+
export declare function spokeModuleRefusal(name: ModuleName): string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* The topology `<targetDir>` records. A missing manifest, or one without a
|
|
114
|
+
* `topology` key, reads as `"hub"` — every site scaffolded before #7426.
|
|
115
|
+
* @throws TopologyError on an unreadable manifest or an unknown value.
|
|
116
|
+
*/
|
|
117
|
+
export declare function readSiteTopology(targetDir: string): Topology;
|
|
118
|
+
/**
|
|
119
|
+
* Hosts a spoke may reach over plain `http:` — the set
|
|
120
|
+
* `packages/api-client/src/http.ts` sends the spoke key under. Named here
|
|
121
|
+
* rather than imported: create-ailk carries no runtime dependency.
|
|
122
|
+
*/
|
|
123
|
+
export declare const LOOPBACK_HOSTS: readonly string[];
|
|
124
|
+
/**
|
|
125
|
+
* The hub origin for a spoke: `--hub-url`, else `AILK_API_URL`. An `https:`
|
|
126
|
+
* URL, or `http:` on a loopback host, with no path but `/`, no query and no
|
|
127
|
+
* fragment — normalized to its origin with no trailing slash.
|
|
128
|
+
* @throws TopologyError naming both inputs when neither is set or the value
|
|
129
|
+
* is not such an origin. Never echoes a query or fragment.
|
|
130
|
+
*/
|
|
131
|
+
export declare function normalizeHubUrl(raw: string | undefined): string;
|