@easy-web/core 1.5.0 → 1.7.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 +100 -2
- package/dist/contracts/capabilities.d.ts +38 -0
- package/dist/contracts/capabilities.d.ts.map +1 -1
- package/dist/contracts/content-composition.d.ts +144 -0
- package/dist/contracts/content-composition.d.ts.map +1 -0
- package/dist/contracts/content-composition.js +143 -0
- package/dist/contracts/content-composition.js.map +1 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/traits.d.ts +98 -0
- package/dist/contracts/traits.d.ts.map +1 -0
- package/dist/contracts/traits.js +84 -0
- package/dist/contracts/traits.js.map +1 -0
- package/dist/demo/demo-content.d.ts +37 -0
- package/dist/demo/demo-content.d.ts.map +1 -0
- package/dist/demo/demo-content.js +171 -0
- package/dist/demo/demo-content.js.map +1 -0
- package/dist/demo/index.d.ts +3 -0
- package/dist/demo/index.d.ts.map +1 -0
- package/dist/demo/index.js +3 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/legal-shells.d.ts +18 -0
- package/dist/demo/legal-shells.d.ts.map +1 -0
- package/dist/demo/legal-shells.js +40 -0
- package/dist/demo/legal-shells.js.map +1 -0
- package/dist/i18n/cli-catalogs.d.ts +42 -0
- package/dist/i18n/cli-catalogs.d.ts.map +1 -0
- package/dist/i18n/cli-catalogs.js +29 -0
- package/dist/i18n/cli-catalogs.js.map +1 -0
- package/dist/i18n/create-localization.d.ts +37 -0
- package/dist/i18n/create-localization.d.ts.map +1 -0
- package/dist/i18n/create-localization.js +68 -0
- package/dist/i18n/create-localization.js.map +1 -0
- package/dist/i18n/explicit-formatters.d.ts +20 -0
- package/dist/i18n/explicit-formatters.d.ts.map +1 -0
- package/dist/i18n/explicit-formatters.js +18 -0
- package/dist/i18n/explicit-formatters.js.map +1 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +4 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/locale-inputs.d.ts +18 -0
- package/dist/i18n/locale-inputs.d.ts.map +1 -0
- package/dist/i18n/locale-inputs.js +73 -0
- package/dist/i18n/locale-inputs.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/recipes/admission.d.ts +161 -0
- package/dist/recipes/admission.d.ts.map +1 -0
- package/dist/recipes/admission.js +85 -0
- package/dist/recipes/admission.js.map +1 -0
- package/dist/recipes/graph.d.ts +101 -0
- package/dist/recipes/graph.d.ts.map +1 -0
- package/dist/recipes/graph.js +166 -0
- package/dist/recipes/graph.js.map +1 -0
- package/dist/recipes/index.d.ts +9 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/index.js +9 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/recipes/mermaid.d.ts +3 -0
- package/dist/recipes/mermaid.d.ts.map +1 -0
- package/dist/recipes/mermaid.js +79 -0
- package/dist/recipes/mermaid.js.map +1 -0
- package/dist/recipes/registry.d.ts +82 -0
- package/dist/recipes/registry.d.ts.map +1 -0
- package/dist/recipes/registry.js +40 -0
- package/dist/recipes/registry.js.map +1 -0
- package/dist/recipes/schema.d.ts +129 -0
- package/dist/recipes/schema.d.ts.map +1 -0
- package/dist/recipes/schema.js +41 -0
- package/dist/recipes/schema.js.map +1 -0
- package/dist/recipes/serialize.d.ts +20 -0
- package/dist/recipes/serialize.d.ts.map +1 -0
- package/dist/recipes/serialize.js +56 -0
- package/dist/recipes/serialize.js.map +1 -0
- package/dist/recipes/shell-recipe.d.ts +59 -0
- package/dist/recipes/shell-recipe.d.ts.map +1 -0
- package/dist/recipes/shell-recipe.js +145 -0
- package/dist/recipes/shell-recipe.js.map +1 -0
- package/dist/recipes/types.d.ts +72 -0
- package/dist/recipes/types.d.ts.map +1 -0
- package/dist/recipes/types.js +13 -0
- package/dist/recipes/types.js.map +1 -0
- package/dist/schemas/galleries.d.ts +2 -2
- package/dist/seo/build-info-manifest.d.ts +45 -0
- package/dist/seo/build-info-manifest.d.ts.map +1 -0
- package/dist/seo/build-info-manifest.js +39 -0
- package/dist/seo/build-info-manifest.js.map +1 -0
- package/dist/seo/build-info.d.ts +3 -0
- package/dist/seo/build-info.d.ts.map +1 -0
- package/dist/seo/build-info.js +45 -0
- package/dist/seo/build-info.js.map +1 -0
- package/dist/seo/index.d.ts +4 -0
- package/dist/seo/index.d.ts.map +1 -1
- package/dist/seo/index.js +25 -2
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/routes/robots-txt.d.ts.map +1 -1
- package/dist/seo/routes/robots-txt.js +3 -1
- package/dist/seo/routes/robots-txt.js.map +1 -1
- package/dist/seo/routes/version-json.d.ts +4 -0
- package/dist/seo/routes/version-json.d.ts.map +1 -0
- package/dist/seo/routes/version-json.js +11 -0
- package/dist/seo/routes/version-json.js.map +1 -0
- package/package.json +17 -1
- package/src/components/DemoLegalShell.astro +36 -0
- package/src/contracts/__tests__/content-composition.test.ts +170 -0
- package/src/contracts/capabilities.ts +49 -0
- package/src/contracts/content-composition.ts +176 -0
- package/src/contracts/index.ts +2 -0
- package/src/contracts/traits.ts +107 -0
- package/src/demo/__tests__/demo-content.test.ts +107 -0
- package/src/demo/demo-content.ts +210 -0
- package/src/demo/index.ts +2 -0
- package/src/demo/legal-shells.ts +52 -0
- package/src/i18n/__tests__/create-localization.test.ts +138 -0
- package/src/i18n/__tests__/explicit-formatters.test.ts +82 -0
- package/src/i18n/cli-catalogs.ts +44 -0
- package/src/i18n/create-localization.ts +67 -0
- package/src/i18n/explicit-formatters.ts +36 -0
- package/src/i18n/index.ts +4 -0
- package/src/i18n/locale-inputs.ts +73 -0
- package/src/index.ts +1 -0
- package/src/recipes/__tests__/graph.test.ts +139 -0
- package/src/recipes/__tests__/protocol.test.ts +180 -0
- package/src/recipes/__tests__/serialize.test.ts +128 -0
- package/src/recipes/__tests__/shell-recipe.test.ts +75 -0
- package/src/recipes/admission.ts +77 -0
- package/src/recipes/graph.ts +244 -0
- package/src/recipes/index.ts +8 -0
- package/src/recipes/mermaid.ts +75 -0
- package/src/recipes/registry.ts +48 -0
- package/src/recipes/schema.ts +53 -0
- package/src/recipes/serialize.ts +77 -0
- package/src/recipes/shell-recipe.ts +162 -0
- package/src/recipes/types.ts +63 -0
- package/src/seo/__tests__/build-info-html.test.ts +19 -0
- package/src/seo/__tests__/build-info-integration.test.ts +107 -0
- package/src/seo/__tests__/build-info.test.ts +86 -0
- package/src/seo/__tests__/robots-txt.test.ts +8 -0
- package/src/seo/build-info-manifest.ts +49 -0
- package/src/seo/build-info.ts +44 -0
- package/src/seo/index.ts +28 -3
- package/src/seo/routes/robots-txt.ts +3 -1
- package/src/seo/routes/version-json.ts +13 -0
- package/src/seo/routes/version.astro +42 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { GraphResult, ResolvedCapabilityGraph, ResolvedContributionNode } from './graph.js';
|
|
2
|
+
export declare const CAPABILITY_GRAPH_SCHEMA_VERSION: 1;
|
|
3
|
+
export interface CapabilityGraphDocument {
|
|
4
|
+
readonly schemaVersion: 1;
|
|
5
|
+
readonly recipes: ResolvedCapabilityGraph['recipes'];
|
|
6
|
+
readonly capabilities: ResolvedCapabilityGraph['capabilities'];
|
|
7
|
+
readonly requirements: ResolvedCapabilityGraph['requirements'];
|
|
8
|
+
readonly contentTypes: ResolvedCapabilityGraph['contentTypes'];
|
|
9
|
+
readonly fixedPages: readonly ResolvedContributionNode[];
|
|
10
|
+
readonly bindings: readonly ResolvedContributionNode[];
|
|
11
|
+
readonly adaptations: ResolvedCapabilityGraph['adaptations'];
|
|
12
|
+
}
|
|
13
|
+
export type GraphSerializationError = {
|
|
14
|
+
readonly code: 'private-value-detected';
|
|
15
|
+
readonly path: string;
|
|
16
|
+
};
|
|
17
|
+
/** Pure projection of a resolved graph into a stable, inspectable document. Excludes file/dependency/configuration contributions. */
|
|
18
|
+
export declare function toCapabilityGraphDocument(graph: ResolvedCapabilityGraph): GraphResult<CapabilityGraphDocument, GraphSerializationError>;
|
|
19
|
+
export declare function serializeCapabilityGraphJson(document: CapabilityGraphDocument): string;
|
|
20
|
+
//# sourceMappingURL=serialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/recipes/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEjG,eAAO,MAAM,+BAA+B,EAAG,CAAU,CAAC;AAE1D,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACrD,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAC/D,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACzD,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACvD,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;CAChE;AAED,MAAM,MAAM,uBAAuB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AA8BzG,qIAAqI;AACrI,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,uBAAuB,GAC/B,WAAW,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAwB/D;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,uBAAuB,GAAG,MAAM,CAEtF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const CAPABILITY_GRAPH_SCHEMA_VERSION = 1;
|
|
2
|
+
const PRIVATE_PATTERNS = [
|
|
3
|
+
/[^\s@]+@[^\s@]+\.[^\s@]+/,
|
|
4
|
+
/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/,
|
|
5
|
+
/[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,
|
|
6
|
+
/[A-Za-z0-9]{40,}/,
|
|
7
|
+
];
|
|
8
|
+
function scanForPrivateValues(value, path) {
|
|
9
|
+
if (typeof value === 'string') {
|
|
10
|
+
for (const pattern of PRIVATE_PATTERNS)
|
|
11
|
+
if (pattern.test(value))
|
|
12
|
+
return path;
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
if (Array.isArray(value)) {
|
|
16
|
+
for (let i = 0; i < value.length; i++) {
|
|
17
|
+
const hit = scanForPrivateValues(value[i], `${path}[${i}]`);
|
|
18
|
+
if (hit)
|
|
19
|
+
return hit;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
if (value && typeof value === 'object') {
|
|
24
|
+
for (const [key, val] of Object.entries(value)) {
|
|
25
|
+
const hit = scanForPrivateValues(val, path ? `${path}.${key}` : key);
|
|
26
|
+
if (hit)
|
|
27
|
+
return hit;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
/** Pure projection of a resolved graph into a stable, inspectable document. Excludes file/dependency/configuration contributions. */
|
|
33
|
+
export function toCapabilityGraphDocument(graph) {
|
|
34
|
+
const isAdaptationTarget = new Set(graph.adaptations.map((adaptation) => adaptation.id));
|
|
35
|
+
const nonFileContributions = graph.contributions.filter((contribution) => contribution.kind !== 'file' && contribution.kind !== 'dependency' && contribution.kind !== 'configuration');
|
|
36
|
+
const fixedPages = nonFileContributions.filter((contribution) => contribution.kind === 'route');
|
|
37
|
+
const bindings = nonFileContributions.filter((contribution) => contribution.kind === 'binding' && !isAdaptationTarget.has(contribution.id));
|
|
38
|
+
const document = {
|
|
39
|
+
schemaVersion: CAPABILITY_GRAPH_SCHEMA_VERSION,
|
|
40
|
+
recipes: graph.recipes,
|
|
41
|
+
capabilities: graph.capabilities,
|
|
42
|
+
requirements: graph.requirements,
|
|
43
|
+
contentTypes: graph.contentTypes,
|
|
44
|
+
fixedPages,
|
|
45
|
+
bindings,
|
|
46
|
+
adaptations: graph.adaptations,
|
|
47
|
+
};
|
|
48
|
+
const hitPath = scanForPrivateValues(document, '');
|
|
49
|
+
if (hitPath)
|
|
50
|
+
return { ok: false, error: { code: 'private-value-detected', path: hitPath } };
|
|
51
|
+
return { ok: true, value: document };
|
|
52
|
+
}
|
|
53
|
+
export function serializeCapabilityGraphJson(document) {
|
|
54
|
+
return JSON.stringify(document, null, 2);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=serialize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/recipes/serialize.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAU,CAAC;AAe1D,MAAM,gBAAgB,GAAsB;IACxC,0BAA0B;IAC1B,6EAA6E;IAC7E,8BAA8B;IAC9B,kBAAkB;CACrB,CAAC;AAEF,SAAS,oBAAoB,CAAC,KAAc,EAAE,IAAY;IACtD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,KAAK,MAAM,OAAO,IAAI,gBAAgB;YAAE,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;QAC7E,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,KAA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AE,CAAC,YAAY,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IAChG,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,CACxC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAChG,CAAC;IAEF,MAAM,QAAQ,GAA4B;QACtC,aAAa,EAAE,+BAA+B;QAC9C,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,UAAU;QACV,QAAQ;QACR,WAAW,EAAE,KAAK,CAAC,WAAW;KACjC,CAAC;IAEF,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACnD,IAAI,OAAO;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;IAC5F,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,QAAiC;IAC1E,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
export declare const SHELL_RECIPE_ID = "site.shell";
|
|
3
|
+
declare const shellOptionsSchema: z.ZodObject<{
|
|
4
|
+
siteName: z.ZodDefault<z.ZodString>;
|
|
5
|
+
defaultLocale: z.ZodDefault<z.ZodString>;
|
|
6
|
+
noIndex: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type ShellRecipeOptions = z.infer<typeof shellOptionsSchema>;
|
|
9
|
+
export declare function buildShellFiles(rawOptions: unknown): readonly {
|
|
10
|
+
path: string;
|
|
11
|
+
content: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const shellRecipe: {
|
|
14
|
+
id: string;
|
|
15
|
+
version: string;
|
|
16
|
+
protocolVersion: 1;
|
|
17
|
+
compatibleCliRange: string;
|
|
18
|
+
compatibleRuntimeRange: string;
|
|
19
|
+
provides: string[];
|
|
20
|
+
requires: never[];
|
|
21
|
+
conflicts: never[];
|
|
22
|
+
order: {
|
|
23
|
+
priority: number;
|
|
24
|
+
key: string;
|
|
25
|
+
};
|
|
26
|
+
optionsSchema: z.ZodObject<{
|
|
27
|
+
siteName: z.ZodDefault<z.ZodString>;
|
|
28
|
+
defaultLocale: z.ZodDefault<z.ZodString>;
|
|
29
|
+
noIndex: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
outputContributions: ({
|
|
32
|
+
kind: "configuration";
|
|
33
|
+
id: string;
|
|
34
|
+
target: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "dependency";
|
|
37
|
+
id: string;
|
|
38
|
+
target: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: "file";
|
|
41
|
+
id: string;
|
|
42
|
+
target: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: "route";
|
|
45
|
+
id: string;
|
|
46
|
+
target: string;
|
|
47
|
+
})[];
|
|
48
|
+
validators: never[];
|
|
49
|
+
generate: (context: {
|
|
50
|
+
options?: unknown;
|
|
51
|
+
}) => {
|
|
52
|
+
files: readonly {
|
|
53
|
+
path: string;
|
|
54
|
+
content: string;
|
|
55
|
+
}[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export default shellRecipe;
|
|
59
|
+
//# sourceMappingURL=shell-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/shell-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAG9B,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,QAAA,MAAM,kBAAkB;;;;kBAItB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AA6GpE,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,GAAG,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAajG;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuBA;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;;kBAtC0B,MAAM;qBAAW,MAAM;;;CAuChD,CAAC;AAE/C,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
export const SHELL_RECIPE_ID = 'site.shell';
|
|
3
|
+
const shellOptionsSchema = z.strictObject({
|
|
4
|
+
siteName: z.string().min(1).default('Example Site'),
|
|
5
|
+
defaultLocale: z.string().default('en'),
|
|
6
|
+
noIndex: z.boolean().default(false),
|
|
7
|
+
});
|
|
8
|
+
const PLACEHOLDER_SITE_URL = 'https://replace-with-your-domain.example';
|
|
9
|
+
function astroConfig(options) {
|
|
10
|
+
return `import { defineConfig } from 'astro/config';
|
|
11
|
+
import easyWebSeo from '@easy-web/core/seo';
|
|
12
|
+
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
site: ${JSON.stringify(PLACEHOLDER_SITE_URL)},
|
|
15
|
+
integrations: [
|
|
16
|
+
easyWebSeo({ noIndex: ${options.noIndex ? 'true' : 'false'} }),
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
const packageJsonFragment = `${JSON.stringify({
|
|
22
|
+
type: 'module',
|
|
23
|
+
scripts: { dev: 'astro dev', build: 'astro build', preview: 'astro preview' },
|
|
24
|
+
dependencies: { '@easy-web/core': '^1.5.0', astro: '^7.3.5' },
|
|
25
|
+
devDependencies: { typescript: '^5.5.0' },
|
|
26
|
+
}, null, 2)}\n`;
|
|
27
|
+
const pnpmWorkspace = `allowBuilds:
|
|
28
|
+
esbuild: true
|
|
29
|
+
sharp: true
|
|
30
|
+
`;
|
|
31
|
+
function baseLayout(options) {
|
|
32
|
+
return `---
|
|
33
|
+
import PageShell from '@easy-web/core/components/PageShell.astro';
|
|
34
|
+
import Header from '@easy-web/core/components/Header.astro';
|
|
35
|
+
import Footer from '@easy-web/core/components/Footer.astro';
|
|
36
|
+
|
|
37
|
+
interface Props {
|
|
38
|
+
title: string;
|
|
39
|
+
}
|
|
40
|
+
const { title } = Astro.props;
|
|
41
|
+
const siteName = ${JSON.stringify(options.siteName)};
|
|
42
|
+
const currentLang = ${JSON.stringify(options.defaultLocale)};
|
|
43
|
+
const navItems = [{ label: 'Home', href: '/' }];
|
|
44
|
+
---
|
|
45
|
+
<!doctype html>
|
|
46
|
+
<html lang=${JSON.stringify(options.defaultLocale)}>
|
|
47
|
+
<head>
|
|
48
|
+
<meta charset="utf-8" />
|
|
49
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
50
|
+
<title>{title}</title>
|
|
51
|
+
</head>
|
|
52
|
+
<body>
|
|
53
|
+
<PageShell lang={currentLang}>
|
|
54
|
+
<Header
|
|
55
|
+
slot="header"
|
|
56
|
+
lang={currentLang}
|
|
57
|
+
siteName={siteName}
|
|
58
|
+
navItems={navItems}
|
|
59
|
+
currentLang={currentLang}
|
|
60
|
+
pathname={Astro.url.pathname}
|
|
61
|
+
brandHref="/"
|
|
62
|
+
locales={[currentLang]}
|
|
63
|
+
/>
|
|
64
|
+
<slot />
|
|
65
|
+
<Footer slot="footer" lang={currentLang} siteName={siteName} legalLinks={[
|
|
66
|
+
{ label: 'Imprint (sample)', href: '/imprint' },
|
|
67
|
+
{ label: 'Privacy (sample)', href: '/privacy' },
|
|
68
|
+
]} />
|
|
69
|
+
</PageShell>
|
|
70
|
+
</body>
|
|
71
|
+
</html>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
function homePage(options) {
|
|
75
|
+
return `---
|
|
76
|
+
import Base from '../layouts/Base.astro';
|
|
77
|
+
---
|
|
78
|
+
<Base title=${JSON.stringify(options.siteName)}>
|
|
79
|
+
<h1>Welcome</h1>
|
|
80
|
+
<p>This is a generated placeholder home page. Replace this content before production.</p>
|
|
81
|
+
</Base>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
function notFoundPage(options) {
|
|
85
|
+
return `---
|
|
86
|
+
import Base from '../layouts/Base.astro';
|
|
87
|
+
import NotFound from '@easy-web/core/components/NotFound.astro';
|
|
88
|
+
---
|
|
89
|
+
<Base title="Page not found">
|
|
90
|
+
<NotFound currentLang=${JSON.stringify(options.defaultLocale)} defaultLocale=${JSON.stringify(options.defaultLocale)} />
|
|
91
|
+
</Base>
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
const localizedPaths = `import type { LocalizedPathGroup } from '@easy-web/core/i18n';
|
|
95
|
+
|
|
96
|
+
export const localizedPaths: readonly LocalizedPathGroup[] = [];
|
|
97
|
+
`;
|
|
98
|
+
const robotsTxt = `Disallow: /admin/
|
|
99
|
+
Sitemap: ${PLACEHOLDER_SITE_URL}/sitemap-index.xml
|
|
100
|
+
`;
|
|
101
|
+
const gitignore = `node_modules
|
|
102
|
+
dist
|
|
103
|
+
.astro
|
|
104
|
+
`;
|
|
105
|
+
export function buildShellFiles(rawOptions) {
|
|
106
|
+
const options = shellOptionsSchema.parse(rawOptions ?? {});
|
|
107
|
+
return [
|
|
108
|
+
{ path: 'astro.config.mjs', content: astroConfig(options) },
|
|
109
|
+
{ path: 'package.json', content: packageJsonFragment },
|
|
110
|
+
{ path: 'pnpm-workspace.yaml', content: pnpmWorkspace },
|
|
111
|
+
{ path: 'src/layouts/Base.astro', content: baseLayout(options) },
|
|
112
|
+
{ path: 'src/pages/index.astro', content: homePage(options) },
|
|
113
|
+
{ path: 'src/pages/404.astro', content: notFoundPage(options) },
|
|
114
|
+
{ path: 'src/lib/localized-paths.ts', content: localizedPaths },
|
|
115
|
+
{ path: 'public/robots.txt', content: robotsTxt },
|
|
116
|
+
{ path: '.gitignore', content: gitignore },
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
export const shellRecipe = {
|
|
120
|
+
id: SHELL_RECIPE_ID,
|
|
121
|
+
version: '1.5.0',
|
|
122
|
+
protocolVersion: 1,
|
|
123
|
+
compatibleCliRange: '^0.1.0',
|
|
124
|
+
compatibleRuntimeRange: '^1.5.0',
|
|
125
|
+
provides: [SHELL_RECIPE_ID],
|
|
126
|
+
requires: [],
|
|
127
|
+
conflicts: [],
|
|
128
|
+
order: { priority: 0, key: 'shell' },
|
|
129
|
+
optionsSchema: shellOptionsSchema,
|
|
130
|
+
outputContributions: [
|
|
131
|
+
{ kind: 'configuration', id: 'shell.astro-config', target: 'astro.config.mjs' },
|
|
132
|
+
{ kind: 'dependency', id: 'shell.dependencies', target: 'package.json' },
|
|
133
|
+
{ kind: 'configuration', id: 'shell.pnpm-workspace', target: 'pnpm-workspace.yaml' },
|
|
134
|
+
{ kind: 'file', id: 'shell.base-layout', target: 'src/layouts/Base.astro' },
|
|
135
|
+
{ kind: 'route', id: 'shell.home', target: '/' },
|
|
136
|
+
{ kind: 'route', id: 'shell.404', target: '/404' },
|
|
137
|
+
{ kind: 'file', id: 'shell.localized-paths', target: 'src/lib/localized-paths.ts' },
|
|
138
|
+
{ kind: 'file', id: 'shell.robots', target: 'public/robots.txt' },
|
|
139
|
+
{ kind: 'file', id: 'shell.gitignore', target: '.gitignore' },
|
|
140
|
+
],
|
|
141
|
+
validators: [],
|
|
142
|
+
generate: (context) => ({ files: buildShellFiles(context.options) }),
|
|
143
|
+
};
|
|
144
|
+
export default shellRecipe;
|
|
145
|
+
//# sourceMappingURL=shell-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-recipe.js","sourceRoot":"","sources":["../../src/recipes/shell-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAG9B,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAE5C,MAAM,kBAAkB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACtC,CAAC,CAAC;AAIH,MAAM,oBAAoB,GAAG,0CAA0C,CAAC;AAExE,SAAS,WAAW,CAAC,OAA2B;IAC5C,OAAO;;;;UAID,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;;4BAElB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;;;CAG7D,CAAC;AACF,CAAC;AAED,MAAM,mBAAmB,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;IAC1C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE;IAC7E,YAAY,EAAE,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC7D,eAAe,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;CAC5C,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AAEhB,MAAM,aAAa,GAAG;;;CAGrB,CAAC;AA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B,EAAE,MAAM,EAAE,4BAA4B,EAAE;QACnF,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,EAAE;QACjE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAAE;KAChE;IACD,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE,CAAC,OAA8B,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;CACjD,CAAC;AAE/C,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
import { recipeValidatorDescriptorSchema } from './schema.js';
|
|
3
|
+
import type { RecipeOutputContribution } from './schema.js';
|
|
4
|
+
export interface RecipeGeneratedFile {
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly content: string | Uint8Array;
|
|
7
|
+
}
|
|
8
|
+
/** Hooks return output data; they receive no filesystem/process/target-node_modules access. */
|
|
9
|
+
export interface RecipeGenerationContext<Options = unknown> {
|
|
10
|
+
readonly options: Options;
|
|
11
|
+
readonly capabilities: readonly string[];
|
|
12
|
+
readonly contributions: readonly RecipeOutputContribution[];
|
|
13
|
+
}
|
|
14
|
+
export interface RecipeGenerationOutput {
|
|
15
|
+
readonly files: readonly RecipeGeneratedFile[];
|
|
16
|
+
}
|
|
17
|
+
export type RecipeGenerateHook<Options = unknown> = (context: RecipeGenerationContext<Options>) => RecipeGenerationOutput | Promise<RecipeGenerationOutput>;
|
|
18
|
+
export interface RecipeValidationContext<Options = unknown> extends RecipeGenerationContext<Options> {
|
|
19
|
+
readonly output?: RecipeGenerationOutput;
|
|
20
|
+
}
|
|
21
|
+
export interface RecipeValidationIssue {
|
|
22
|
+
readonly code: string;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
readonly path?: string;
|
|
25
|
+
}
|
|
26
|
+
export type RecipeValidateHook<Options = unknown> = (context: RecipeValidationContext<Options>) => readonly RecipeValidationIssue[] | Promise<readonly RecipeValidationIssue[]>;
|
|
27
|
+
/** Shape admission never calls options parsing, validators or generation hooks. */
|
|
28
|
+
export declare const recipeMetadataSchema: z.ZodReadonly<z.ZodObject<{
|
|
29
|
+
optionsSchema: z.ZodInstanceOf<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
30
|
+
validators: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
phase: z.ZodEnum<{
|
|
33
|
+
output: "output";
|
|
34
|
+
options: "options";
|
|
35
|
+
}>;
|
|
36
|
+
validate: z.ZodCustom<RecipeValidateHook<unknown>, RecipeValidateHook<unknown>>;
|
|
37
|
+
}, z.core.$strict>>>>;
|
|
38
|
+
generate: z.ZodCustom<RecipeGenerateHook<unknown>, RecipeGenerateHook<unknown>>;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
version: z.ZodString;
|
|
41
|
+
protocolVersion: z.ZodLiteral<1>;
|
|
42
|
+
compatibleCliRange: z.ZodString;
|
|
43
|
+
compatibleRuntimeRange: z.ZodString;
|
|
44
|
+
provides: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
45
|
+
requires: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
46
|
+
conflicts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
47
|
+
order: z.ZodReadonly<z.ZodObject<{
|
|
48
|
+
priority: z.ZodNumber;
|
|
49
|
+
key: z.ZodString;
|
|
50
|
+
}, z.core.$strict>>;
|
|
51
|
+
outputContributions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
52
|
+
kind: z.ZodEnum<{
|
|
53
|
+
file: "file";
|
|
54
|
+
dependency: "dependency";
|
|
55
|
+
route: "route";
|
|
56
|
+
content: "content";
|
|
57
|
+
binding: "binding";
|
|
58
|
+
configuration: "configuration";
|
|
59
|
+
}>;
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
target: z.ZodString;
|
|
62
|
+
}, z.core.$strict>>>>;
|
|
63
|
+
}, z.core.$strict>>;
|
|
64
|
+
/** Typed recipe implementations can use their own inferred Zod options. */
|
|
65
|
+
export type RecipeMetadata<Options = unknown> = Omit<z.infer<typeof recipeMetadataSchema>, 'optionsSchema' | 'generate' | 'validators'> & {
|
|
66
|
+
readonly optionsSchema: z.ZodType<Options>;
|
|
67
|
+
readonly generate: RecipeGenerateHook<Options>;
|
|
68
|
+
readonly validators: readonly (z.infer<typeof recipeValidatorDescriptorSchema> & {
|
|
69
|
+
readonly validate: RecipeValidateHook<Options>;
|
|
70
|
+
})[];
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/recipes/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAC9B,OAAO,EAEH,+BAA+B,EAClC,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;CACzC;AAED,+FAA+F;AAC/F,MAAM,WAAW,uBAAuB,CAAC,OAAO,GAAG,OAAO;IACtD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC/D;AAED,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAClD;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EAAE,CAAC;CACR,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
import { recipeMetadataFields, recipeValidatorDescriptorSchema, } from './schema.js';
|
|
3
|
+
const validatorSchema = recipeValidatorDescriptorSchema.unwrap().extend({
|
|
4
|
+
validate: z.custom((value) => typeof value === 'function'),
|
|
5
|
+
}).readonly();
|
|
6
|
+
/** Shape admission never calls options parsing, validators or generation hooks. */
|
|
7
|
+
export const recipeMetadataSchema = z.strictObject({
|
|
8
|
+
...recipeMetadataFields,
|
|
9
|
+
optionsSchema: z.instanceof(z.ZodType),
|
|
10
|
+
validators: z.array(validatorSchema).readonly(),
|
|
11
|
+
generate: z.custom((value) => typeof value === 'function'),
|
|
12
|
+
}).readonly();
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/recipes/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAC9B,OAAO,EACH,oBAAoB,EACpB,+BAA+B,GAClC,MAAM,aAAa,CAAC;AAqCrB,MAAM,eAAe,GAAG,+BAA+B,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAqB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC;CACjF,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEd,mFAAmF;AACnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/C,GAAG,oBAAoB;IACvB,aAAa,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAqB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC;CACjF,CAAC,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -63,10 +63,10 @@ declare const galleryHeroSliderSchema: z.ZodObject<{
|
|
|
63
63
|
autoplay: z.ZodDefault<z.ZodBoolean>;
|
|
64
64
|
interval: z.ZodDefault<z.ZodNumber>;
|
|
65
65
|
height: z.ZodDefault<z.ZodEnum<{
|
|
66
|
+
full: "full";
|
|
66
67
|
sm: "sm";
|
|
67
68
|
md: "md";
|
|
68
69
|
lg: "lg";
|
|
69
|
-
full: "full";
|
|
70
70
|
}>>;
|
|
71
71
|
slides: z.ZodArray<z.ZodObject<{
|
|
72
72
|
src: z.ZodString;
|
|
@@ -205,10 +205,10 @@ export declare const gallerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
205
205
|
autoplay: z.ZodDefault<z.ZodBoolean>;
|
|
206
206
|
interval: z.ZodDefault<z.ZodNumber>;
|
|
207
207
|
height: z.ZodDefault<z.ZodEnum<{
|
|
208
|
+
full: "full";
|
|
208
209
|
sm: "sm";
|
|
209
210
|
md: "md";
|
|
210
211
|
lg: "lg";
|
|
211
|
-
full: "full";
|
|
212
212
|
}>>;
|
|
213
213
|
slides: z.ZodArray<z.ZodObject<{
|
|
214
214
|
src: z.ZodString;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
declare const packageIdSchema: z.ZodEnum<{
|
|
3
|
+
core: "core";
|
|
4
|
+
auth: "auth";
|
|
5
|
+
"cms-adapters": "cms-adapters";
|
|
6
|
+
swa: "swa";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const buildInfoOptionsSchema: z.ZodReadonly<z.ZodObject<{
|
|
9
|
+
site: z.ZodString;
|
|
10
|
+
packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
11
|
+
core: "core";
|
|
12
|
+
auth: "auth";
|
|
13
|
+
"cms-adapters": "cms-adapters";
|
|
14
|
+
swa: "swa";
|
|
15
|
+
}>>>>;
|
|
16
|
+
releaseId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
json: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, z.core.$strict>>;
|
|
19
|
+
export type BuildInfoPackageId = z.infer<typeof packageIdSchema>;
|
|
20
|
+
export type BuildInfoOptions = z.infer<typeof buildInfoOptionsSchema>;
|
|
21
|
+
export declare const exactVersionSchema: z.ZodString;
|
|
22
|
+
declare const manifestSchema: z.ZodReadonly<z.ZodObject<{
|
|
23
|
+
schema: z.ZodLiteral<"easy-web/build-info">;
|
|
24
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
25
|
+
site: z.ZodString;
|
|
26
|
+
releaseId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
easyWeb: z.ZodReadonly<z.ZodObject<{
|
|
28
|
+
version: z.ZodString;
|
|
29
|
+
packages: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
30
|
+
core: "core";
|
|
31
|
+
auth: "auth";
|
|
32
|
+
"cms-adapters": "cms-adapters";
|
|
33
|
+
swa: "swa";
|
|
34
|
+
}>>>;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
export type BuildInfoManifest = z.infer<typeof manifestSchema>;
|
|
38
|
+
export declare class BuildInfoError extends Error {
|
|
39
|
+
readonly detail: string;
|
|
40
|
+
constructor(detail: string);
|
|
41
|
+
}
|
|
42
|
+
export declare function serializeBuildInfo(manifest: BuildInfoManifest): string;
|
|
43
|
+
export declare function readBuildInfo(): BuildInfoManifest;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=build-info-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info-manifest.d.ts","sourceRoot":"","sources":["../../src/seo/build-info-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,QAAA,MAAM,eAAe;;;;;EAAkD,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;;;;;;;;;mBAKtB,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,kBAAkB,aAE9B,CAAC;AAEF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;mBASP,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D,qBAAa,cAAe,SAAQ,KAAK;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM;CAItC;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAEtE;AAED,wBAAgB,aAAa,IAAI,iBAAiB,CAIjD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'astro/zod';
|
|
2
|
+
const packageIdSchema = z.enum(['core', 'auth', 'cms-adapters', 'swa']);
|
|
3
|
+
const publicLabelSchema = z.string().min(1).max(120)
|
|
4
|
+
.refine((value) => value === value.trim() && !/[\p{Cc}\p{Cf}\p{Cs}\p{Zl}\p{Zp}]/u.test(value), 'must be trimmed printable text');
|
|
5
|
+
export const buildInfoOptionsSchema = z.strictObject({
|
|
6
|
+
site: publicLabelSchema,
|
|
7
|
+
packages: z.array(packageIdSchema).readonly().optional(),
|
|
8
|
+
releaseId: publicLabelSchema.optional(),
|
|
9
|
+
json: z.boolean().optional(),
|
|
10
|
+
}).readonly();
|
|
11
|
+
export const exactVersionSchema = z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/);
|
|
12
|
+
const manifestSchema = z.strictObject({
|
|
13
|
+
schema: z.literal('easy-web/build-info'),
|
|
14
|
+
schemaVersion: z.literal(1),
|
|
15
|
+
site: publicLabelSchema,
|
|
16
|
+
releaseId: publicLabelSchema.optional(),
|
|
17
|
+
easyWeb: z.strictObject({
|
|
18
|
+
version: exactVersionSchema,
|
|
19
|
+
packages: z.array(packageIdSchema).readonly(),
|
|
20
|
+
}).readonly(),
|
|
21
|
+
}).readonly();
|
|
22
|
+
export class BuildInfoError extends Error {
|
|
23
|
+
detail;
|
|
24
|
+
constructor(detail) {
|
|
25
|
+
super(`@easy-web/core: buildInfo ${detail}`);
|
|
26
|
+
this.detail = detail;
|
|
27
|
+
this.name = 'BuildInfoError';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function serializeBuildInfo(manifest) {
|
|
31
|
+
return `${JSON.stringify(manifest)}\n`;
|
|
32
|
+
}
|
|
33
|
+
export function readBuildInfo() {
|
|
34
|
+
const serialized = process.env.EASY_WEB_SEO_BUILD_INFO;
|
|
35
|
+
if (!serialized)
|
|
36
|
+
throw new BuildInfoError('manifest is unavailable; enable easyWebSeo({ buildInfo }).');
|
|
37
|
+
return manifestSchema.parse(JSON.parse(serialized));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=build-info-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info-manifest.js","sourceRoot":"","sources":["../../src/seo/build-info-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;AACxE,MAAM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,EAAE,CAAC,CAAC;QAD5B,WAAM,GAAN,MAAM,CAAQ;QAE/B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IACjC,CAAC;CACJ;AAED,MAAM,UAAU,kBAAkB,CAAC,QAA2B;IAC1D,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,aAAa;IACzB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;IACvD,IAAI,CAAC,UAAU;QAAE,MAAM,IAAI,cAAc,CAAC,4DAA4D,CAAC,CAAC;IACxG,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info.d.ts","sourceRoot":"","sources":["../../src/seo/build-info.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,KAAK,iBAAiB,EACzB,MAAM,0BAA0B,CAAC;AAmBlC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAiB9E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { z } from 'astro/zod';
|
|
5
|
+
import { BuildInfoError, buildInfoOptionsSchema, exactVersionSchema, } from './build-info-manifest.js';
|
|
6
|
+
const packageSchema = z.object({ name: z.string(), version: exactVersionSchema });
|
|
7
|
+
function installedPackage(id, root) {
|
|
8
|
+
const name = `@easy-web/${id}`;
|
|
9
|
+
let folder = fileURLToPath(root);
|
|
10
|
+
let manifestPath = join(folder, 'node_modules', name, 'package.json');
|
|
11
|
+
while (!existsSync(manifestPath)) {
|
|
12
|
+
const parent = dirname(folder);
|
|
13
|
+
if (parent === folder)
|
|
14
|
+
throw new BuildInfoError(`${name} must be installed in the site before it can be enabled.`);
|
|
15
|
+
folder = parent;
|
|
16
|
+
manifestPath = join(folder, 'node_modules', name, 'package.json');
|
|
17
|
+
}
|
|
18
|
+
const result = packageSchema.safeParse(JSON.parse(readFileSync(manifestPath, 'utf8')));
|
|
19
|
+
if (!result.success || result.data.name !== name)
|
|
20
|
+
throw new BuildInfoError(`${name} artifact must contain its package identity and an exact version.`);
|
|
21
|
+
return result.data;
|
|
22
|
+
}
|
|
23
|
+
export function buildInfoManifest(input, root) {
|
|
24
|
+
const parsed = buildInfoOptionsSchema.safeParse(input);
|
|
25
|
+
if (!parsed.success)
|
|
26
|
+
throw new BuildInfoError(`options are invalid: ${parsed.error.message}`);
|
|
27
|
+
const options = parsed.data;
|
|
28
|
+
const core = packageSchema.parse(JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8')));
|
|
29
|
+
if (core.name !== '@easy-web/core')
|
|
30
|
+
throw new BuildInfoError('core artifact identity is invalid.');
|
|
31
|
+
const packages = Object.freeze([...new Set(['core', ...(options.packages ?? [])])].sort());
|
|
32
|
+
for (const id of packages) {
|
|
33
|
+
if (id === 'core')
|
|
34
|
+
continue;
|
|
35
|
+
const installed = installedPackage(id, root);
|
|
36
|
+
if (installed.version !== core.version)
|
|
37
|
+
throw new BuildInfoError(`${installed.name} version must match core version ${core.version}.`);
|
|
38
|
+
}
|
|
39
|
+
return Object.freeze({
|
|
40
|
+
schema: 'easy-web/build-info', schemaVersion: 1, site: options.site,
|
|
41
|
+
...(options.releaseId === undefined ? {} : { releaseId: options.releaseId }),
|
|
42
|
+
easyWeb: Object.freeze({ version: core.version, packages }),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=build-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../src/seo/build-info.ts"],"names":[],"mappings":"AAAA,OA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AAE,qBAAqB,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI;QACnE,GAAG,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;QAC5E,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;KAC9D,CAAC,CAAC;AACP,CAAC"}
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { AstroIntegration } from 'astro';
|
|
2
2
|
import { type LocalizedPathGroup } from '../i18n/index.js';
|
|
3
|
+
import { type BuildInfoOptions } from './build-info-manifest.js';
|
|
4
|
+
export type { BuildInfoOptions, BuildInfoPackageId, BuildInfoManifest } from './build-info-manifest.js';
|
|
3
5
|
export type { LocalizedPathGroup };
|
|
4
6
|
export type Options = {
|
|
7
|
+
/** Public labels only; these routes are public, not protected by crawler directives. */
|
|
8
|
+
readonly buildInfo?: BuildInfoOptions;
|
|
5
9
|
noIndex?: boolean;
|
|
6
10
|
sitemapLocales?: Record<string, string>;
|
|
7
11
|
/**
|
package/dist/seo/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,kBAAkB,CAAA;AAIzB,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAElC,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC;;;;;;;;;;OAUG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