@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.121
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 +167 -72
- package/bin/run.js +0 -0
- package/dist/cjs/create-package-root.cjs +63 -0
- package/dist/cjs/index.cjs +528 -0
- package/dist/cjs/locale/en.cjs +93 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +93 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +337 -0
- package/dist/cjs/ultramodern-workspace/app-files.cjs +223 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +836 -0
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +422 -0
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +222 -0
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +952 -0
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +191 -0
- package/dist/cjs/ultramodern-workspace/index.cjs +48 -0
- package/dist/cjs/ultramodern-workspace/locales.cjs +173 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +487 -0
- package/dist/cjs/ultramodern-workspace/naming.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/package-json.cjs +406 -0
- package/dist/cjs/ultramodern-workspace/package-source.cjs +59 -0
- package/dist/cjs/ultramodern-workspace/policy.cjs +248 -0
- package/dist/cjs/ultramodern-workspace/public-surface.cjs +268 -0
- package/dist/cjs/ultramodern-workspace/routes.cjs +375 -0
- package/dist/cjs/ultramodern-workspace/types.cjs +61 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +153 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +153 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +175 -0
- package/dist/esm/create-package-root.js +14 -0
- package/dist/esm/index.js +491 -0
- package/dist/esm/locale/en.js +55 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +55 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +252 -0
- package/dist/esm/ultramodern-workspace/app-files.js +149 -0
- package/dist/esm/ultramodern-workspace/contracts.js +741 -0
- package/dist/esm/ultramodern-workspace/demo-components.js +363 -0
- package/dist/esm/ultramodern-workspace/descriptors.js +133 -0
- package/dist/esm/ultramodern-workspace/effect-api.js +854 -0
- package/dist/esm/ultramodern-workspace/fs-io.js +90 -0
- package/dist/esm/ultramodern-workspace/index.js +3 -0
- package/dist/esm/ultramodern-workspace/locales.js +122 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +415 -0
- package/dist/esm/ultramodern-workspace/naming.js +71 -0
- package/dist/esm/ultramodern-workspace/package-json.js +338 -0
- package/dist/esm/ultramodern-workspace/package-source.js +21 -0
- package/dist/esm/ultramodern-workspace/policy.js +183 -0
- package/dist/esm/ultramodern-workspace/public-surface.js +183 -0
- package/dist/esm/ultramodern-workspace/routes.js +280 -0
- package/dist/esm/ultramodern-workspace/types.js +16 -0
- package/dist/esm/ultramodern-workspace/versions.js +34 -0
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +91 -0
- package/dist/esm/ultramodern-workspace/write-workspace.js +121 -0
- package/dist/esm-node/create-package-root.js +15 -0
- package/dist/esm-node/index.js +492 -0
- package/dist/esm-node/locale/en.js +56 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +56 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +253 -0
- package/dist/esm-node/ultramodern-workspace/app-files.js +150 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +742 -0
- package/dist/esm-node/ultramodern-workspace/demo-components.js +364 -0
- package/dist/esm-node/ultramodern-workspace/descriptors.js +134 -0
- package/dist/esm-node/ultramodern-workspace/effect-api.js +855 -0
- package/dist/esm-node/ultramodern-workspace/fs-io.js +91 -0
- package/dist/esm-node/ultramodern-workspace/index.js +4 -0
- package/dist/esm-node/ultramodern-workspace/locales.js +123 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +416 -0
- package/dist/esm-node/ultramodern-workspace/naming.js +72 -0
- package/dist/esm-node/ultramodern-workspace/package-json.js +339 -0
- package/dist/esm-node/ultramodern-workspace/package-source.js +22 -0
- package/dist/esm-node/ultramodern-workspace/policy.js +184 -0
- package/dist/esm-node/ultramodern-workspace/public-surface.js +184 -0
- package/dist/esm-node/ultramodern-workspace/routes.js +281 -0
- package/dist/esm-node/ultramodern-workspace/types.js +17 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +35 -0
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +92 -0
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +122 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +8 -9
- package/dist/types/locale/index.d.ts +109 -2
- package/dist/types/locale/zh.d.ts +8 -9
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +19 -0
- package/dist/types/ultramodern-workspace/app-files.d.ts +14 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +21 -0
- package/dist/types/ultramodern-workspace/demo-components.d.ts +9 -0
- package/dist/types/ultramodern-workspace/descriptors.d.ts +39 -0
- package/dist/types/ultramodern-workspace/effect-api.d.ts +73 -0
- package/dist/types/ultramodern-workspace/fs-io.d.ts +18 -0
- package/dist/types/ultramodern-workspace/index.d.ts +4 -0
- package/dist/types/ultramodern-workspace/locales.d.ts +183 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +16 -0
- package/dist/types/ultramodern-workspace/naming.d.ts +16 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +12 -0
- package/dist/types/ultramodern-workspace/package-source.d.ts +2 -0
- package/dist/types/ultramodern-workspace/policy.d.ts +60 -0
- package/dist/types/ultramodern-workspace/public-surface.d.ts +37 -0
- package/dist/types/ultramodern-workspace/routes.d.ts +25 -0
- package/dist/types/ultramodern-workspace/types.d.ts +95 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +38 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +10 -0
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -0
- package/package.json +34 -15
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/skills-lock.json +19 -0
- package/template-workspace/.codex/hooks.json +16 -0
- package/template-workspace/.github/renovate.json +29 -0
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +67 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +87 -0
- package/template-workspace/README.md.handlebars +132 -11
- package/template-workspace/lefthook.yml +24 -0
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/pnpm-workspace.yaml.handlebars +40 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +184 -21
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
- package/templates/app/shell-frame.tsx +49 -0
- package/templates/app/ultramodern-route-head.tsx.handlebars +142 -0
- package/templates/packages/shared-contracts-index.ts +466 -0
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +69 -0
- package/templates/workspace-scripts/check-ultramodern-i18n-boundaries.mjs +9 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +529 -0
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +125 -0
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +851 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.config.mjs +7 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +223 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +593 -0
- package/dist/index.js +0 -2626
- package/dist/types/ultramodern-workspace.d.ts +0 -20
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -30
- package/template/.gitignore.handlebars +0 -30
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -25
- package/template/README.md +0 -79
- package/template/api/effect/index.ts.handlebars +0 -23
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/public/locales/cs/translation.json +0 -39
- package/template/config/public/locales/en/translation.json +0 -39
- package/template/modern.config.ts.handlebars +0 -53
- package/template/oxfmt.config.ts +0 -8
- package/template/oxlint.config.ts +0 -12
- package/template/package.json.handlebars +0 -67
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/scripts/bootstrap-agent-skills.mjs +0 -95
- package/template/scripts/check-i18n-strings.mjs +0 -83
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -178
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -1
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/index.css.handlebars +0 -129
- package/template/src/routes/layout.tsx.handlebars +0 -9
- package/template/src/routes/page.tsx.handlebars +0 -155
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tsconfig.json +0 -120
- package/template-workspace/AGENTS.md +0 -50
- package/template-workspace/pnpm-workspace.yaml +0 -17
- package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
import { ULTRAMODERN_WORKSPACE_MODERN_PACKAGES, WORKSPACE_PACKAGE_VERSION, createModernPackagesMetadata, modernPackageVersion } from "../ultramodern-package-source.js";
|
|
2
|
+
import { appHasEffectApi, appI18nNamespace, createCloudflarePublicUrlEnv, createCloudflareWorkerName, createModuleFederationRemoteContracts, createShellHost, effectApiPrefix, sharedPackages, shellApp, verticalEffectApps } from "./descriptors.js";
|
|
3
|
+
import { createEffectDomainOperations, createEffectOperationContract, createEffectReadinessContract, createEffectRequestContextContract, effectApiTopologyMetadata } from "./effect-api.js";
|
|
4
|
+
import { fileTemplatesDir, hashTemplateTree, workspaceTemplateDir } from "./fs-io.js";
|
|
5
|
+
import { createBuildMarker } from "./module-federation.js";
|
|
6
|
+
import { createRspackChunkLoadingGlobal, createRspackUniqueName, packageName, tailwindPrefixForApp } from "./naming.js";
|
|
7
|
+
import { createCloudflareDeployContract, createCloudflareSecurityContract } from "./policy.js";
|
|
8
|
+
import { createPublicWebAppArtifacts } from "./public-surface.js";
|
|
9
|
+
import { createLocalisedUrlsMap, createPublicRouteMetadata, createRouteOwnedI18nPaths } from "./routes.js";
|
|
10
|
+
import { CLOUDFLARE_COMPATIBILITY_DATE, I18NEXT_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION } from "./versions.js";
|
|
11
|
+
const baselineAgentSkills = [
|
|
12
|
+
'rsbuild-best-practices',
|
|
13
|
+
'rspack-best-practices',
|
|
14
|
+
'rspack-tracing',
|
|
15
|
+
'rsdoctor-analysis',
|
|
16
|
+
'rslib-best-practices',
|
|
17
|
+
'rslib-modern-package',
|
|
18
|
+
'rstest-best-practices'
|
|
19
|
+
];
|
|
20
|
+
const moduleFederationAgentSkills = [
|
|
21
|
+
'mf'
|
|
22
|
+
];
|
|
23
|
+
const privateAgentSkills = [
|
|
24
|
+
'plan-graph',
|
|
25
|
+
'dag',
|
|
26
|
+
'subagent-graph',
|
|
27
|
+
'helm',
|
|
28
|
+
'debugger-mode'
|
|
29
|
+
];
|
|
30
|
+
function createTopology(scope, remotes = []) {
|
|
31
|
+
const shellHost = createShellHost(remotes);
|
|
32
|
+
return {
|
|
33
|
+
schemaVersion: 1,
|
|
34
|
+
id: 'ultramodern-superapp-workspace-reference-topology',
|
|
35
|
+
description: 'Generated UltraModern SuperApp shell that can grow by adding full-stack verticals.',
|
|
36
|
+
preset: 'presetUltramodern',
|
|
37
|
+
shell: {
|
|
38
|
+
id: shellApp.id,
|
|
39
|
+
kind: 'shell',
|
|
40
|
+
package: packageName(scope, shellApp.packageSuffix),
|
|
41
|
+
verticalRefs: shellHost.verticalRefs,
|
|
42
|
+
moduleFederation: {
|
|
43
|
+
role: 'host',
|
|
44
|
+
name: shellApp.mfName,
|
|
45
|
+
remotes: createModuleFederationRemoteContracts(shellHost, remotes),
|
|
46
|
+
ssr: true,
|
|
47
|
+
sharedContractVersion: 'mf-ssr-contract-v1'
|
|
48
|
+
},
|
|
49
|
+
cloudflare: createCloudflareDeployContract(scope, shellApp),
|
|
50
|
+
ownership: shellApp.ownership
|
|
51
|
+
},
|
|
52
|
+
verticals: remotes.map((vertical)=>({
|
|
53
|
+
id: vertical.id,
|
|
54
|
+
kind: vertical.kind,
|
|
55
|
+
domain: vertical.domain,
|
|
56
|
+
package: packageName(scope, vertical.packageSuffix),
|
|
57
|
+
path: vertical.directory,
|
|
58
|
+
moduleFederation: {
|
|
59
|
+
role: 'remote',
|
|
60
|
+
name: vertical.mfName,
|
|
61
|
+
manifestUrl: `http://localhost:${vertical.port}/mf-manifest.json`,
|
|
62
|
+
exposes: Object.keys(vertical.exposes ?? {}),
|
|
63
|
+
...vertical.verticalRefs?.length ? {
|
|
64
|
+
verticalRefs: vertical.verticalRefs,
|
|
65
|
+
remotes: createModuleFederationRemoteContracts(vertical)
|
|
66
|
+
} : {},
|
|
67
|
+
ssr: true,
|
|
68
|
+
fallbackTelemetryEvent: 'modernjs:mv-runtime-parity',
|
|
69
|
+
sharedContractVersion: 'mf-ssr-contract-v1'
|
|
70
|
+
},
|
|
71
|
+
...effectApiTopologyMetadata(vertical) ? {
|
|
72
|
+
api: effectApiTopologyMetadata(vertical)
|
|
73
|
+
} : {},
|
|
74
|
+
cloudflare: createCloudflareDeployContract(scope, vertical),
|
|
75
|
+
ownership: vertical.ownership
|
|
76
|
+
})),
|
|
77
|
+
sharedPackages: sharedPackages.map((sharedPackage)=>({
|
|
78
|
+
id: sharedPackage.id,
|
|
79
|
+
package: packageName(scope, sharedPackage.id),
|
|
80
|
+
path: sharedPackage.directory,
|
|
81
|
+
description: sharedPackage.description
|
|
82
|
+
})),
|
|
83
|
+
validation: {
|
|
84
|
+
script: "scripts/validate-ultramodern-workspace.mjs",
|
|
85
|
+
commands: [
|
|
86
|
+
'pnpm i18n:boundaries',
|
|
87
|
+
'pnpm contract:check'
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function createOwnership(scope, remotes = []) {
|
|
93
|
+
return {
|
|
94
|
+
schemaVersion: 1,
|
|
95
|
+
preset: 'presetUltramodern',
|
|
96
|
+
owners: [
|
|
97
|
+
shellApp,
|
|
98
|
+
...remotes,
|
|
99
|
+
...sharedPackages.map((sharedPackage)=>({
|
|
100
|
+
id: sharedPackage.id,
|
|
101
|
+
packageSuffix: sharedPackage.id,
|
|
102
|
+
directory: sharedPackage.directory,
|
|
103
|
+
ownership: {
|
|
104
|
+
team: 'super-app-platform',
|
|
105
|
+
slack: '#super-app-platform',
|
|
106
|
+
pagerDuty: 'pd-super-app-platform',
|
|
107
|
+
runbookRef: `runbooks/wave2/${sharedPackage.id}.md`,
|
|
108
|
+
adrRef: 'docs/super-app-rfc-adr/wave2/reference-topology.md#shared-packages',
|
|
109
|
+
blastRadius: {
|
|
110
|
+
tier: 'tier-1-shared-contract',
|
|
111
|
+
references: [
|
|
112
|
+
'docs/super-app-rfc-adr/wave2/blast-radius.md#shared-packages'
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}))
|
|
117
|
+
].map((owner)=>({
|
|
118
|
+
id: owner.id,
|
|
119
|
+
package: packageName(scope, owner.packageSuffix),
|
|
120
|
+
path: owner.directory,
|
|
121
|
+
ownership: owner.ownership
|
|
122
|
+
}))
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function createDevelopmentOverlay(remotes = []) {
|
|
126
|
+
return {
|
|
127
|
+
schemaVersion: 1,
|
|
128
|
+
environment: 'development',
|
|
129
|
+
preset: 'presetUltramodern',
|
|
130
|
+
ports: Object.fromEntries([
|
|
131
|
+
shellApp,
|
|
132
|
+
...remotes
|
|
133
|
+
].map((app)=>[
|
|
134
|
+
app.id,
|
|
135
|
+
app.port
|
|
136
|
+
])),
|
|
137
|
+
manifests: Object.fromEntries(remotes.map((remote)=>[
|
|
138
|
+
remote.id,
|
|
139
|
+
`http://localhost:${remote.port}/mf-manifest.json`
|
|
140
|
+
])),
|
|
141
|
+
apis: Object.fromEntries(verticalEffectApps(remotes).map((app)=>[
|
|
142
|
+
app.id,
|
|
143
|
+
`http://localhost:${app.port}${effectApiPrefix(app)}`
|
|
144
|
+
]))
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function createPackageSourceMetadata(scope, packageSource) {
|
|
148
|
+
return {
|
|
149
|
+
schemaVersion: 1,
|
|
150
|
+
strategy: packageSource.strategy,
|
|
151
|
+
modernPackages: createModernPackagesMetadata(ULTRAMODERN_WORKSPACE_MODERN_PACKAGES, packageSource),
|
|
152
|
+
generatedWorkspacePackages: {
|
|
153
|
+
packages: sharedPackages.map((sharedPackage)=>packageName(scope, sharedPackage.id)),
|
|
154
|
+
specifier: WORKSPACE_PACKAGE_VERSION
|
|
155
|
+
},
|
|
156
|
+
validation: {
|
|
157
|
+
validator: "scripts/validate-ultramodern-workspace.mjs",
|
|
158
|
+
strategyAwareChecks: [
|
|
159
|
+
'generated-validator'
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function createAppConfigContract(app) {
|
|
165
|
+
return {
|
|
166
|
+
preset: 'presetUltramodern',
|
|
167
|
+
plugins: [
|
|
168
|
+
'appTools',
|
|
169
|
+
'tanstackRouterPlugin',
|
|
170
|
+
'i18nPlugin',
|
|
171
|
+
...appHasEffectApi(app) ? [
|
|
172
|
+
'bffPlugin'
|
|
173
|
+
] : [],
|
|
174
|
+
'moduleFederationPlugin',
|
|
175
|
+
'zephyrRspackPlugin'
|
|
176
|
+
],
|
|
177
|
+
dev: {
|
|
178
|
+
assetPrefix: '/'
|
|
179
|
+
},
|
|
180
|
+
output: {
|
|
181
|
+
assetPrefix: {
|
|
182
|
+
envFallbackOrder: [
|
|
183
|
+
'MODERN_ASSET_PREFIX',
|
|
184
|
+
'ULTRAMODERN_ASSET_PREFIX'
|
|
185
|
+
],
|
|
186
|
+
default: '/'
|
|
187
|
+
},
|
|
188
|
+
disableTsChecker: true,
|
|
189
|
+
distPath: {
|
|
190
|
+
html: './'
|
|
191
|
+
},
|
|
192
|
+
polyfill: 'off',
|
|
193
|
+
splitRouteChunks: true
|
|
194
|
+
},
|
|
195
|
+
performance: {
|
|
196
|
+
readinessDiagnostics: {
|
|
197
|
+
default: 'enabled',
|
|
198
|
+
optOut: {
|
|
199
|
+
env: 'ULTRAMODERN_PERFORMANCE_READINESS_DIAGNOSTICS=false',
|
|
200
|
+
config: "scripts/ultramodern-performance-readiness.config.mjs"
|
|
201
|
+
},
|
|
202
|
+
report: '.codex/reports/performance-readiness/ultramodern-performance-readiness.json',
|
|
203
|
+
failOn: 'framework-invariant'
|
|
204
|
+
},
|
|
205
|
+
rsdoctor: {
|
|
206
|
+
enabledByEnv: 'ULTRAMODERN_RSDOCTOR=true',
|
|
207
|
+
disableClientServer: true
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
rspack: {
|
|
211
|
+
output: {
|
|
212
|
+
uniqueName: createRspackUniqueName(app),
|
|
213
|
+
chunkLoadingGlobal: createRspackChunkLoadingGlobal(app)
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
html: {
|
|
217
|
+
outputStructure: 'flat'
|
|
218
|
+
},
|
|
219
|
+
source: {
|
|
220
|
+
mainEntryName: 'index',
|
|
221
|
+
siteUrl: {
|
|
222
|
+
envFallbackOrder: [
|
|
223
|
+
'MODERN_PUBLIC_SITE_URL',
|
|
224
|
+
createCloudflarePublicUrlEnv(app),
|
|
225
|
+
'ULTRAMODERN_CLOUDFLARE_WORKERS_DEV_SUBDOMAIN',
|
|
226
|
+
app.portEnv
|
|
227
|
+
],
|
|
228
|
+
defaultLocalhostPort: app.port
|
|
229
|
+
},
|
|
230
|
+
siteUrlGlobal: 'ULTRAMODERN_SITE_URL'
|
|
231
|
+
},
|
|
232
|
+
...appHasEffectApi(app) ? {
|
|
233
|
+
bff: {
|
|
234
|
+
runtimeFramework: 'effect',
|
|
235
|
+
prefix: app.effectApi.prefix,
|
|
236
|
+
openapi: '/openapi.json'
|
|
237
|
+
}
|
|
238
|
+
} : {}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function createPerformanceReadinessContract() {
|
|
242
|
+
return {
|
|
243
|
+
schemaVersion: 1,
|
|
244
|
+
default: 'enabled',
|
|
245
|
+
mode: 'diagnostic',
|
|
246
|
+
scope: 'ultramodern-generated-and-framework-owned',
|
|
247
|
+
report: {
|
|
248
|
+
script: "scripts/ultramodern-performance-readiness.mjs",
|
|
249
|
+
config: "scripts/ultramodern-performance-readiness.config.mjs",
|
|
250
|
+
defaultPath: '.codex/reports/performance-readiness/ultramodern-performance-readiness.json',
|
|
251
|
+
deterministic: true
|
|
252
|
+
},
|
|
253
|
+
optOut: {
|
|
254
|
+
env: 'ULTRAMODERN_PERFORMANCE_READINESS_DIAGNOSTICS=false',
|
|
255
|
+
config: {
|
|
256
|
+
path: "scripts/ultramodern-performance-readiness.config.mjs",
|
|
257
|
+
field: 'enabled',
|
|
258
|
+
value: false
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
failurePolicy: {
|
|
262
|
+
defaultFailOn: 'framework-invariant',
|
|
263
|
+
allowedValues: [
|
|
264
|
+
'framework-invariant',
|
|
265
|
+
'never'
|
|
266
|
+
],
|
|
267
|
+
rejects: [
|
|
268
|
+
'accessibility-certification',
|
|
269
|
+
'product-ui-scoring',
|
|
270
|
+
'marketing-copy-scoring',
|
|
271
|
+
'broad-compliance-engine',
|
|
272
|
+
'rsdoctor-artifact-revival'
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
signals: [
|
|
276
|
+
{
|
|
277
|
+
id: 'bfcache',
|
|
278
|
+
title: 'BFCache diagnostics',
|
|
279
|
+
ownedCheck: 'generated-runtime-static-analysis',
|
|
280
|
+
invariant: 'Generated UltraModern files must not install beforeunload or unload handlers.'
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
id: 'core-web-vitals-rum',
|
|
284
|
+
title: 'Core Web Vitals/RUM readiness',
|
|
285
|
+
ownedCheck: 'preset-telemetry-contract',
|
|
286
|
+
invariant: 'UltraModern preset telemetry must remain enabled by default without requiring local collectors.'
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: 'duplicate-prefetch-warmup',
|
|
290
|
+
title: 'Duplicate prefetch/warmup waste',
|
|
291
|
+
ownedCheck: 'topology-and-route-contract',
|
|
292
|
+
invariant: 'Generated route URLs, remote refs, and manifest URLs must stay deterministic and duplicate-free.'
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: 'cache-policy-sanity',
|
|
296
|
+
title: 'Cache policy sanity',
|
|
297
|
+
ownedCheck: 'generated-cloudflare-contract',
|
|
298
|
+
invariant: 'Generated Cloudflare contracts must retain CSS cache-control and public-surface cache expectations.'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
id: 'save-data-behavior',
|
|
302
|
+
title: 'Save-Data behavior',
|
|
303
|
+
ownedCheck: 'framework-router-contract',
|
|
304
|
+
invariant: 'Automatic framework warmup must remain skippable by browser Save-Data policy.'
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: 'cloudflare-ssr-cache-hints',
|
|
308
|
+
title: 'Cloudflare SSR response and caching hints',
|
|
309
|
+
ownedCheck: 'generated-cloudflare-proof-contract',
|
|
310
|
+
invariant: 'Generated Cloudflare SSR proof routes and response/cache hint contracts must be present.'
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
function cssLayerName(app) {
|
|
316
|
+
if ('shell' === app.kind) return 'ultramodern-shell-base';
|
|
317
|
+
return `ultramodern-vertical-${app.domain ?? app.id}`;
|
|
318
|
+
}
|
|
319
|
+
function cssRole(app) {
|
|
320
|
+
if ('shell' === app.kind) return 'shell-base-overlay';
|
|
321
|
+
return 'vertical-css';
|
|
322
|
+
}
|
|
323
|
+
function cssClassPrefix(app) {
|
|
324
|
+
return `${tailwindPrefixForApp(app)}:`;
|
|
325
|
+
}
|
|
326
|
+
function createCssDedupeContract(scope) {
|
|
327
|
+
return {
|
|
328
|
+
strategy: 'shared-token-package-plus-css-content-hash',
|
|
329
|
+
sharedPackage: packageName(scope, 'shared-design-tokens'),
|
|
330
|
+
sharedLayers: [
|
|
331
|
+
'ultramodern-shared-tokens'
|
|
332
|
+
],
|
|
333
|
+
runtimeLoad: 'once-per-content-hash',
|
|
334
|
+
duplicateBaseStylesAllowed: false
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function createCssSsrContract(app) {
|
|
338
|
+
return {
|
|
339
|
+
cloudflare: true,
|
|
340
|
+
firstPaintRequired: true,
|
|
341
|
+
linkEmission: 'modern-ssr-css-assets',
|
|
342
|
+
verticalCss: 'shell' === app.kind ? 'host-preloads-shell-and-shared-css' : 'federated-manifest-owned-css'
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function createAppCssFederationContract(scope, app) {
|
|
346
|
+
const ownedLayers = 'shell' === app.kind ? [
|
|
347
|
+
'ultramodern-shell-base',
|
|
348
|
+
'ultramodern-shell-overlay'
|
|
349
|
+
] : [
|
|
350
|
+
cssLayerName(app)
|
|
351
|
+
];
|
|
352
|
+
return {
|
|
353
|
+
owner: {
|
|
354
|
+
id: app.id,
|
|
355
|
+
package: packageName(scope, app.packageSuffix),
|
|
356
|
+
team: app.ownership.team
|
|
357
|
+
},
|
|
358
|
+
role: cssRole(app),
|
|
359
|
+
rootSelector: `[data-app-id="${app.id}"]`,
|
|
360
|
+
classPrefix: cssClassPrefix(app),
|
|
361
|
+
layers: {
|
|
362
|
+
shared: [
|
|
363
|
+
'ultramodern-shared-tokens'
|
|
364
|
+
],
|
|
365
|
+
owned: ownedLayers,
|
|
366
|
+
imports: 'shell' === app.kind ? [
|
|
367
|
+
'ultramodern-shared-tokens'
|
|
368
|
+
] : [
|
|
369
|
+
'ultramodern-shared-tokens'
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
entrypoints: {
|
|
373
|
+
layoutImport: 'src/routes/layout.tsx',
|
|
374
|
+
css: [
|
|
375
|
+
'src/routes/index.css'
|
|
376
|
+
],
|
|
377
|
+
...'shell' !== app.kind ? {
|
|
378
|
+
federationEntry: 'src/federation-entry.tsx'
|
|
379
|
+
} : {}
|
|
380
|
+
},
|
|
381
|
+
assets: {
|
|
382
|
+
shared: [
|
|
383
|
+
`${packageName(scope, 'shared-design-tokens')}/tokens.css`
|
|
384
|
+
],
|
|
385
|
+
owned: [
|
|
386
|
+
'src/routes/index.css'
|
|
387
|
+
],
|
|
388
|
+
emittedBy: 'modern-rspack-css-extraction',
|
|
389
|
+
contentHash: true
|
|
390
|
+
},
|
|
391
|
+
dedupe: createCssDedupeContract(scope),
|
|
392
|
+
ssr: createCssSsrContract(app)
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function createCssFederationContract(scope) {
|
|
396
|
+
return {
|
|
397
|
+
schemaVersion: 1,
|
|
398
|
+
sharedDesignTokens: {
|
|
399
|
+
owner: {
|
|
400
|
+
id: 'shared-design-tokens',
|
|
401
|
+
package: packageName(scope, 'shared-design-tokens'),
|
|
402
|
+
team: 'super-app-platform'
|
|
403
|
+
},
|
|
404
|
+
role: 'shared-design-tokens',
|
|
405
|
+
rootSelector: ':root',
|
|
406
|
+
classPrefix: '--um-',
|
|
407
|
+
layers: {
|
|
408
|
+
owned: [
|
|
409
|
+
'ultramodern-shared-tokens'
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
entrypoints: {
|
|
413
|
+
css: [
|
|
414
|
+
'packages/shared-design-tokens/src/tokens.css'
|
|
415
|
+
],
|
|
416
|
+
typescript: [
|
|
417
|
+
'packages/shared-design-tokens/src/index.ts'
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
assets: {
|
|
421
|
+
exports: [
|
|
422
|
+
'./tokens.css'
|
|
423
|
+
],
|
|
424
|
+
css: [
|
|
425
|
+
'packages/shared-design-tokens/src/tokens.css'
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
dedupe: createCssDedupeContract(scope),
|
|
429
|
+
ssr: {
|
|
430
|
+
cloudflare: true,
|
|
431
|
+
firstPaintRequired: true,
|
|
432
|
+
importedByApps: true
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
ownershipRules: {
|
|
436
|
+
shell: [
|
|
437
|
+
'base',
|
|
438
|
+
'overlay'
|
|
439
|
+
],
|
|
440
|
+
verticals: [
|
|
441
|
+
'vertical-css'
|
|
442
|
+
],
|
|
443
|
+
forbiddenVerticalLayers: [
|
|
444
|
+
'ultramodern-shell-base',
|
|
445
|
+
'ultramodern-shell-overlay'
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function createStylingContract(scope, app, enableTailwind) {
|
|
451
|
+
return {
|
|
452
|
+
tailwind: enableTailwind,
|
|
453
|
+
...enableTailwind ? {
|
|
454
|
+
postcssPlugins: [
|
|
455
|
+
'@tailwindcss/postcss'
|
|
456
|
+
],
|
|
457
|
+
prefix: tailwindPrefixForApp(app),
|
|
458
|
+
source: '..',
|
|
459
|
+
sourceMode: 'source(none)'
|
|
460
|
+
} : {},
|
|
461
|
+
federation: createAppCssFederationContract(scope, app)
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
function createAppGeneratedContract(scope, app, apps, enableTailwind) {
|
|
465
|
+
const appWithResolvedRefs = 'shell' === app.kind ? {
|
|
466
|
+
...app,
|
|
467
|
+
verticalRefs: apps.filter((candidate)=>'shell' !== candidate.kind).map((candidate)=>candidate.id)
|
|
468
|
+
} : app;
|
|
469
|
+
const publicWeb = createPublicWebAppArtifacts(app);
|
|
470
|
+
const consumedRemotes = createModuleFederationRemoteContracts(appWithResolvedRefs, apps);
|
|
471
|
+
return {
|
|
472
|
+
id: app.id,
|
|
473
|
+
package: packageName(scope, app.packageSuffix),
|
|
474
|
+
path: app.directory,
|
|
475
|
+
kind: app.kind,
|
|
476
|
+
config: createAppConfigContract(app),
|
|
477
|
+
styling: createStylingContract(scope, app, enableTailwind),
|
|
478
|
+
deploy: {
|
|
479
|
+
target: 'cloudflare',
|
|
480
|
+
cloudflare: createCloudflareDeployContract(scope, app),
|
|
481
|
+
worker: {
|
|
482
|
+
compatibilityDate: CLOUDFLARE_COMPATIBILITY_DATE,
|
|
483
|
+
name: createCloudflareWorkerName(scope, app),
|
|
484
|
+
security: createCloudflareSecurityContract(),
|
|
485
|
+
ssr: true
|
|
486
|
+
},
|
|
487
|
+
output: {
|
|
488
|
+
flat: true,
|
|
489
|
+
htmlDistPath: './'
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
ssr: {
|
|
493
|
+
mode: 'string',
|
|
494
|
+
moduleFederationAppSSR: true
|
|
495
|
+
},
|
|
496
|
+
i18n: {
|
|
497
|
+
plugin: '@modern-js/plugin-i18n',
|
|
498
|
+
backend: {
|
|
499
|
+
enabled: true,
|
|
500
|
+
loadPath: '/locales/{{lng}}/{{ns}}.json'
|
|
501
|
+
},
|
|
502
|
+
reactI18next: false,
|
|
503
|
+
languages: [
|
|
504
|
+
'en',
|
|
505
|
+
'cs'
|
|
506
|
+
],
|
|
507
|
+
fallbackLanguage: 'en',
|
|
508
|
+
namespace: appI18nNamespace(app),
|
|
509
|
+
namespaces: [
|
|
510
|
+
appI18nNamespace(app),
|
|
511
|
+
'translation'
|
|
512
|
+
],
|
|
513
|
+
publicDir: [
|
|
514
|
+
'./locales',
|
|
515
|
+
'./assets'
|
|
516
|
+
],
|
|
517
|
+
localisedUrls: createLocalisedUrlsMap(app),
|
|
518
|
+
resourceOwnership: {
|
|
519
|
+
ownerAppId: app.id,
|
|
520
|
+
source: 'route-owned',
|
|
521
|
+
staticJson: `./locales/{lng}/${appI18nNamespace(app)}.json`
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
routes: {
|
|
525
|
+
source: 'route-owned',
|
|
526
|
+
metadataAuthoring: 'colocated-route-meta',
|
|
527
|
+
generatedManifest: true,
|
|
528
|
+
metadataExport: './src/routes/ultramodern-route-metadata',
|
|
529
|
+
localisedUrls: createLocalisedUrlsMap(app),
|
|
530
|
+
owned: createRouteOwnedI18nPaths(app),
|
|
531
|
+
publicRoutes: createPublicRouteMetadata(app),
|
|
532
|
+
privateByDefault: true,
|
|
533
|
+
publicnessDefault: 'private-app-screen',
|
|
534
|
+
generatedRouteMap: true,
|
|
535
|
+
manualOverrides: [],
|
|
536
|
+
publicHead: publicWeb.publicHead,
|
|
537
|
+
publicSurface: publicWeb.publicSurface
|
|
538
|
+
},
|
|
539
|
+
moduleFederation: {
|
|
540
|
+
name: app.mfName,
|
|
541
|
+
...appWithResolvedRefs.verticalRefs?.length ? {
|
|
542
|
+
verticalRefs: appWithResolvedRefs.verticalRefs,
|
|
543
|
+
remotes: consumedRemotes
|
|
544
|
+
} : {},
|
|
545
|
+
exposes: Object.keys(app.exposes ?? {}),
|
|
546
|
+
dts: {
|
|
547
|
+
displayErrorInTerminal: true,
|
|
548
|
+
compilerInstance: 'tsgo'
|
|
549
|
+
},
|
|
550
|
+
browserSafeExposesOnly: true,
|
|
551
|
+
zephyrRspackPlugin: ZEPHYR_RSPACK_PLUGIN_VERSION
|
|
552
|
+
},
|
|
553
|
+
marker: {
|
|
554
|
+
appId: app.id,
|
|
555
|
+
packageName: packageName(scope, app.packageSuffix),
|
|
556
|
+
version: '0.1.0',
|
|
557
|
+
build: createBuildMarker(scope, app),
|
|
558
|
+
deployProfile: 'cloudflare-ssr-mf-effect-v1',
|
|
559
|
+
uiSurface: 'ui',
|
|
560
|
+
...appHasEffectApi(app) ? {
|
|
561
|
+
apiSurface: 'effect-bff'
|
|
562
|
+
} : {}
|
|
563
|
+
},
|
|
564
|
+
...appHasEffectApi(app) ? {
|
|
565
|
+
effect: {
|
|
566
|
+
runtime: 'effect',
|
|
567
|
+
import: '@modern-js/plugin-bff/effect-edge',
|
|
568
|
+
prefix: app.effectApi.prefix,
|
|
569
|
+
openapi: '/openapi.json',
|
|
570
|
+
workerEntry: 'worker/__modern_bff_effect.js',
|
|
571
|
+
contract: './shared/effect/api',
|
|
572
|
+
client: './effect/client',
|
|
573
|
+
readiness: createEffectReadinessContract(app),
|
|
574
|
+
requestContext: createEffectRequestContextContract(),
|
|
575
|
+
domainOperations: createEffectDomainOperations(app),
|
|
576
|
+
...createEffectOperationContract(app)
|
|
577
|
+
}
|
|
578
|
+
} : {}
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
function createGeneratedContract(scope, apps = [
|
|
582
|
+
createShellHost()
|
|
583
|
+
], enableTailwind = true) {
|
|
584
|
+
return {
|
|
585
|
+
schemaVersion: 1,
|
|
586
|
+
profile: 'cloudflare-ssr-mf-effect-v1',
|
|
587
|
+
packageManager: {
|
|
588
|
+
source: 'package.json',
|
|
589
|
+
manager: 'pnpm',
|
|
590
|
+
version: PNPM_VERSION,
|
|
591
|
+
toolchain: 'mise'
|
|
592
|
+
},
|
|
593
|
+
node: {
|
|
594
|
+
source: 'package.json engines.node and .mise.toml',
|
|
595
|
+
version: NODE_VERSION,
|
|
596
|
+
engineRange: '>=26',
|
|
597
|
+
toolchain: 'mise'
|
|
598
|
+
},
|
|
599
|
+
versions: {
|
|
600
|
+
typescript: TYPESCRIPT_VERSION,
|
|
601
|
+
typescriptNativePreview: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
|
|
602
|
+
moduleFederation: MODULE_FEDERATION_VERSION,
|
|
603
|
+
tanstackRouter: TANSTACK_ROUTER_VERSION,
|
|
604
|
+
i18next: I18NEXT_VERSION,
|
|
605
|
+
zephyrRspackPlugin: ZEPHYR_RSPACK_PLUGIN_VERSION,
|
|
606
|
+
zephyrAgent: ZEPHYR_AGENT_VERSION,
|
|
607
|
+
wrangler: WRANGLER_VERSION
|
|
608
|
+
},
|
|
609
|
+
performanceReadiness: createPerformanceReadinessContract(),
|
|
610
|
+
cssFederation: createCssFederationContract(scope),
|
|
611
|
+
apps: apps.map((app)=>createAppGeneratedContract(scope, app, apps, enableTailwind))
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
function createTemplateManifest(modernVersion, packageSource) {
|
|
615
|
+
return {
|
|
616
|
+
schemaVersion: 1,
|
|
617
|
+
template: {
|
|
618
|
+
id: 'modernjs-ultramodern-superapp-workspace',
|
|
619
|
+
version: modernVersion,
|
|
620
|
+
displayName: 'Modern.js UltraModern SuperApp Workspace',
|
|
621
|
+
description: 'Growable SuperApp shell, shared packages, and topology skeleton.',
|
|
622
|
+
compatibilityLane: 'ultramodern-mv',
|
|
623
|
+
minimumModernVersion: modernVersion
|
|
624
|
+
},
|
|
625
|
+
source: {
|
|
626
|
+
type: 'builtin',
|
|
627
|
+
name: 'modernjs-ultramodern-superapp-workspace',
|
|
628
|
+
repositoryPath: 'packages/toolkit/create/template-workspace',
|
|
629
|
+
generator: 'packages/toolkit/create/src/ultramodern-workspace/'
|
|
630
|
+
},
|
|
631
|
+
integrity: {
|
|
632
|
+
checksums: [
|
|
633
|
+
{
|
|
634
|
+
algorithm: 'sha256',
|
|
635
|
+
value: hashTemplateTree(workspaceTemplateDir),
|
|
636
|
+
scope: 'source-tree'
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
algorithm: 'sha256',
|
|
640
|
+
value: hashTemplateTree(fileTemplatesDir),
|
|
641
|
+
scope: 'file-templates-tree'
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
provenance: {
|
|
645
|
+
kind: 'repo-local',
|
|
646
|
+
issuer: '@modern-js/create',
|
|
647
|
+
subject: 'packages/toolkit/create/template-workspace'
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
materialization: {
|
|
651
|
+
targetRoot: 'generated-project-root',
|
|
652
|
+
allowedPaths: [
|
|
653
|
+
'.agents/**',
|
|
654
|
+
'.codex/**',
|
|
655
|
+
'.github/**',
|
|
656
|
+
'.gitignore',
|
|
657
|
+
'.mise.toml',
|
|
658
|
+
'.modernjs/**',
|
|
659
|
+
'AGENTS.md',
|
|
660
|
+
'README.md',
|
|
661
|
+
'apps/**',
|
|
662
|
+
'packages/**',
|
|
663
|
+
'lefthook.yml',
|
|
664
|
+
'package.json',
|
|
665
|
+
'oxfmt.config.ts',
|
|
666
|
+
'oxlint.config.ts',
|
|
667
|
+
'pnpm-workspace.yaml',
|
|
668
|
+
"scripts/**",
|
|
669
|
+
'topology/**',
|
|
670
|
+
'tsconfig.base.json'
|
|
671
|
+
],
|
|
672
|
+
deniedPaths: [
|
|
673
|
+
'.git/**',
|
|
674
|
+
'.npmrc',
|
|
675
|
+
'.yarnrc',
|
|
676
|
+
'.env',
|
|
677
|
+
'.env.*',
|
|
678
|
+
'node_modules/**',
|
|
679
|
+
'dist/**'
|
|
680
|
+
],
|
|
681
|
+
overwritePolicy: 'deny-existing'
|
|
682
|
+
},
|
|
683
|
+
packageSource: {
|
|
684
|
+
strategy: packageSource.strategy,
|
|
685
|
+
config: '.modernjs/ultramodern-package-source.json',
|
|
686
|
+
modernPackageSpecifier: modernPackageVersion(packageSource),
|
|
687
|
+
generatedWorkspacePackageSpecifier: WORKSPACE_PACKAGE_VERSION
|
|
688
|
+
},
|
|
689
|
+
agentSkills: {
|
|
690
|
+
installDir: '.agents/skills',
|
|
691
|
+
source: {
|
|
692
|
+
repository: 'https://github.com/rstackjs/agent-skills',
|
|
693
|
+
commit: RSTACK_AGENT_SKILLS_COMMIT,
|
|
694
|
+
license: 'MIT',
|
|
695
|
+
licensePath: '.agents/rstackjs-agent-skills-LICENSE'
|
|
696
|
+
},
|
|
697
|
+
baseline: baselineAgentSkills,
|
|
698
|
+
moduleFederationSource: {
|
|
699
|
+
repository: 'https://github.com/module-federation/agent-skills',
|
|
700
|
+
commit: MODULE_FEDERATION_AGENT_SKILLS_COMMIT,
|
|
701
|
+
install: 'clone',
|
|
702
|
+
baseline: moduleFederationAgentSkills
|
|
703
|
+
},
|
|
704
|
+
privateSource: {
|
|
705
|
+
repository: 'https://github.com/TechsioCZ/skills',
|
|
706
|
+
install: 'clone-if-authorized',
|
|
707
|
+
baseline: privateAgentSkills
|
|
708
|
+
},
|
|
709
|
+
lockFile: '.agents/skills-lock.json'
|
|
710
|
+
},
|
|
711
|
+
validation: {
|
|
712
|
+
schemaValidation: true,
|
|
713
|
+
sourceValidation: [
|
|
714
|
+
'source-type-supported',
|
|
715
|
+
'checksum-verified',
|
|
716
|
+
'provenance-present'
|
|
717
|
+
],
|
|
718
|
+
materializationValidation: [
|
|
719
|
+
'path-boundary-policy',
|
|
720
|
+
'path-boundary-denylist',
|
|
721
|
+
'no-path-traversal',
|
|
722
|
+
'no-absolute-paths',
|
|
723
|
+
'overwrite-policy-enforced'
|
|
724
|
+
],
|
|
725
|
+
postMaterializationValidation: [
|
|
726
|
+
'ultramodern-workspace-contract-check',
|
|
727
|
+
'github-workflow-security-enforced',
|
|
728
|
+
'pnpm-11-policy-enforced',
|
|
729
|
+
'template-manifest-retained'
|
|
730
|
+
],
|
|
731
|
+
expectedCommands: [
|
|
732
|
+
'mise install',
|
|
733
|
+
'pnpm install',
|
|
734
|
+
'pnpm run i18n:boundaries',
|
|
735
|
+
'pnpm run contract:check',
|
|
736
|
+
'pnpm run performance:readiness'
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
export { baselineAgentSkills, createAppConfigContract, createAppCssFederationContract, createAppGeneratedContract, createCssDedupeContract, createCssFederationContract, createCssSsrContract, createDevelopmentOverlay, createGeneratedContract, createOwnership, createPackageSourceMetadata, createPerformanceReadinessContract, createStylingContract, createTemplateManifest, createTopology, cssClassPrefix, cssLayerName, cssRole, moduleFederationAgentSkills, privateAgentSkills };
|