@bleedingdev/modern-js-create 3.2.0-ultramodern.9 → 3.2.0-ultramodern.90
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 +152 -35
- package/dist/index.js +4700 -608
- package/dist/types/locale/en.d.ts +3 -0
- package/dist/types/locale/zh.d.ts +3 -0
- package/dist/types/ultramodern-workspace.d.ts +11 -0
- package/package.json +6 -6
- package/template/.codex/hooks.json +16 -0
- package/template/.github/renovate.json +53 -0
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +34 -10
- package/template/.mise.toml.handlebars +2 -0
- package/template/AGENTS.md +9 -6
- package/template/README.md +60 -34
- package/template/api/effect/index.ts.handlebars +8 -3
- package/template/config/public/locales/cs/translation.json +39 -0
- package/template/config/public/locales/en/translation.json +39 -0
- package/template/lefthook.yml +10 -0
- package/template/modern.config.ts.handlebars +39 -24
- package/template/oxfmt.config.ts +11 -3
- package/template/oxlint.config.ts +11 -4
- package/template/package.json.handlebars +43 -34
- package/template/pnpm-workspace.yaml +29 -0
- package/template/rstest.config.mts +5 -0
- package/template/scripts/bootstrap-agent-skills.mjs +160 -35
- package/template/scripts/check-i18n-strings.mjs +94 -0
- package/template/scripts/validate-ultramodern.mjs.handlebars +387 -35
- package/template/shared/effect/api.ts.handlebars +1 -2
- package/template/src/modern-app-env.d.ts +2 -0
- package/template/src/modern.runtime.ts.handlebars +17 -3
- package/template/src/routes/[lang]/page.tsx.handlebars +211 -0
- package/template/src/routes/index.css.handlebars +14 -3
- package/template/src/routes/layout.tsx.handlebars +2 -1
- package/template/tailwind.config.ts.handlebars +1 -1
- package/template/tests/tsconfig.json +7 -0
- package/template/tests/ultramodern.contract.test.ts.handlebars +78 -0
- 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 +54 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +2 -0
- package/template-workspace/AGENTS.md +36 -5
- package/template-workspace/README.md.handlebars +61 -11
- package/template-workspace/lefthook.yml +10 -0
- package/template-workspace/oxfmt.config.ts +13 -3
- package/template-workspace/oxlint.config.ts +12 -4
- package/template-workspace/pnpm-workspace.yaml +26 -8
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +184 -26
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +368 -0
- package/template/src/routes/page.tsx.handlebars +0 -119
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -403
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
const root = process.cwd();
|
|
5
|
-
const packageScope = '{{packageScope}}';
|
|
6
|
-
const tanstackVersion = '1.170.1';
|
|
7
|
-
const rstackAgentSkillsCommit =
|
|
8
|
-
'61c948b42512e223bad44b83af4080eba48b2677';
|
|
9
|
-
const modernPackages = [
|
|
10
|
-
'@modern-js/app-tools',
|
|
11
|
-
'@modern-js/plugin-bff',
|
|
12
|
-
'@modern-js/plugin-tanstack',
|
|
13
|
-
'@modern-js/runtime',
|
|
14
|
-
];
|
|
15
|
-
const baselineAgentSkills = [
|
|
16
|
-
'rsbuild-best-practices',
|
|
17
|
-
'rspack-best-practices',
|
|
18
|
-
'rspack-tracing',
|
|
19
|
-
'rsdoctor-analysis',
|
|
20
|
-
'rslib-best-practices',
|
|
21
|
-
'rslib-modern-package',
|
|
22
|
-
'rstest-best-practices',
|
|
23
|
-
];
|
|
24
|
-
const privateAgentSkills = [
|
|
25
|
-
'plan-graph',
|
|
26
|
-
'dag',
|
|
27
|
-
'subagent-graph',
|
|
28
|
-
'helm',
|
|
29
|
-
'debugger-mode',
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
function readText(relativePath) {
|
|
33
|
-
return fs.readFileSync(path.join(root, relativePath), 'utf-8');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function readJson(relativePath) {
|
|
37
|
-
return JSON.parse(readText(relativePath));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function assert(condition, message) {
|
|
41
|
-
if (!condition) {
|
|
42
|
-
throw new Error(message);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function assertExists(relativePath) {
|
|
47
|
-
assert(fs.existsSync(path.join(root, relativePath)), `Missing ${relativePath}`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const requiredPaths = [
|
|
51
|
-
'AGENTS.md',
|
|
52
|
-
'package.json',
|
|
53
|
-
'pnpm-workspace.yaml',
|
|
54
|
-
'tsconfig.base.json',
|
|
55
|
-
'oxlint.config.ts',
|
|
56
|
-
'oxfmt.config.ts',
|
|
57
|
-
'.agents/skills-lock.json',
|
|
58
|
-
'.agents/rstackjs-agent-skills-LICENSE',
|
|
59
|
-
'.agents/skills/rsbuild-best-practices/SKILL.md',
|
|
60
|
-
'.agents/skills/rspack-best-practices/SKILL.md',
|
|
61
|
-
'.agents/skills/rspack-tracing/SKILL.md',
|
|
62
|
-
'.agents/skills/rspack-tracing/references/tracing-guide.md',
|
|
63
|
-
'.agents/skills/rspack-tracing/scripts/analyze_trace.js',
|
|
64
|
-
'.agents/skills/rsdoctor-analysis/SKILL.md',
|
|
65
|
-
'.agents/skills/rsdoctor-analysis/references/rsdoctor-data-types.md',
|
|
66
|
-
'.agents/skills/rslib-best-practices/SKILL.md',
|
|
67
|
-
'.agents/skills/rslib-modern-package/SKILL.md',
|
|
68
|
-
'.agents/skills/rstest-best-practices/SKILL.md',
|
|
69
|
-
'topology/reference-topology.json',
|
|
70
|
-
'topology/ownership.json',
|
|
71
|
-
'topology/local-overlays/development.json',
|
|
72
|
-
'.modernjs/ultramodern-workspace-template-manifest.json',
|
|
73
|
-
'.modernjs/ultramodern-package-source.json',
|
|
74
|
-
'scripts/bootstrap-agent-skills.mjs',
|
|
75
|
-
'apps/shell-super-app/package.json',
|
|
76
|
-
'apps/shell-super-app/modern.config.ts',
|
|
77
|
-
'apps/shell-super-app/module-federation.config.ts',
|
|
78
|
-
'apps/remotes/remote-commerce/package.json',
|
|
79
|
-
'apps/remotes/remote-commerce/modern.config.ts',
|
|
80
|
-
'apps/remotes/remote-commerce/module-federation.config.ts',
|
|
81
|
-
'apps/remotes/remote-identity/package.json',
|
|
82
|
-
'apps/remotes/remote-identity/modern.config.ts',
|
|
83
|
-
'apps/remotes/remote-identity/module-federation.config.ts',
|
|
84
|
-
'apps/remotes/remote-design-system/package.json',
|
|
85
|
-
'apps/remotes/remote-design-system/modern.config.ts',
|
|
86
|
-
'apps/remotes/remote-design-system/module-federation.config.ts',
|
|
87
|
-
'services/service-recommendations-effect/package.json',
|
|
88
|
-
'services/service-recommendations-effect/modern.config.ts',
|
|
89
|
-
'services/service-recommendations-effect/api/effect/index.ts',
|
|
90
|
-
'services/service-recommendations-effect/shared/effect/api.ts',
|
|
91
|
-
'packages/shared-contracts/src/index.ts',
|
|
92
|
-
'packages/shared-design-tokens/src/index.ts',
|
|
93
|
-
'packages/shared-effect-api/src/index.ts',
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
for (const requiredPath of requiredPaths) {
|
|
97
|
-
assertExists(requiredPath);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const rootPackage = readJson('package.json');
|
|
101
|
-
const packageSource = readJson('.modernjs/ultramodern-package-source.json');
|
|
102
|
-
const skillsLock = readJson('.agents/skills-lock.json');
|
|
103
|
-
const expectedModernSpecifier =
|
|
104
|
-
packageSource.strategy === 'install'
|
|
105
|
-
? packageSource.modernPackages?.specifier
|
|
106
|
-
: 'workspace:*';
|
|
107
|
-
|
|
108
|
-
function expectedModernDependency(packageName) {
|
|
109
|
-
if (packageSource.strategy !== 'install') {
|
|
110
|
-
return 'workspace:*';
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const aliasPackageName = packageSource.modernPackages?.aliases?.[packageName];
|
|
114
|
-
return aliasPackageName
|
|
115
|
-
? `npm:${aliasPackageName}@${expectedModernSpecifier}`
|
|
116
|
-
: expectedModernSpecifier;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
assert(rootPackage.private === true, 'Root package must be private');
|
|
120
|
-
assert(rootPackage.modernjs?.preset === 'presetUltramodern', 'Root must declare presetUltramodern');
|
|
121
|
-
assert(rootPackage.packageManager === 'pnpm@11.1.2', 'Root must pin pnpm 11.1.2');
|
|
122
|
-
assert(rootPackage.engines?.pnpm === '>=11.0.0', 'Root must require pnpm >=11');
|
|
123
|
-
assert(
|
|
124
|
-
rootPackage.modernjs?.packageSource?.config ===
|
|
125
|
-
'./.modernjs/ultramodern-package-source.json',
|
|
126
|
-
'Root must point to the UltraModern package source metadata',
|
|
127
|
-
);
|
|
128
|
-
assert(
|
|
129
|
-
rootPackage.modernjs?.packageSource?.strategy === packageSource.strategy,
|
|
130
|
-
'Root package source strategy must match the UltraModern package source metadata',
|
|
131
|
-
);
|
|
132
|
-
assert(
|
|
133
|
-
packageSource.strategy === 'workspace' || packageSource.strategy === 'install',
|
|
134
|
-
'Package source strategy must be workspace or install',
|
|
135
|
-
);
|
|
136
|
-
assert(
|
|
137
|
-
packageSource.generatedWorkspacePackages?.specifier === 'workspace:*',
|
|
138
|
-
'Generated shared packages must keep workspace:* links',
|
|
139
|
-
);
|
|
140
|
-
assert(
|
|
141
|
-
modernPackages.every(packageName =>
|
|
142
|
-
packageSource.modernPackages?.packages?.includes(packageName),
|
|
143
|
-
),
|
|
144
|
-
'Package source metadata must list all Modern runtime/tooling packages',
|
|
145
|
-
);
|
|
146
|
-
assert(
|
|
147
|
-
expectedModernSpecifier &&
|
|
148
|
-
packageSource.modernPackages?.specifier === expectedModernSpecifier,
|
|
149
|
-
'Package source metadata must provide a Modern package specifier',
|
|
150
|
-
);
|
|
151
|
-
assert(
|
|
152
|
-
rootPackage.scripts?.['ultramodern:check'] ===
|
|
153
|
-
'node ./scripts/validate-ultramodern-workspace.mjs',
|
|
154
|
-
'Root must expose the ultramodern:check script',
|
|
155
|
-
);
|
|
156
|
-
const requiredRootScripts = {
|
|
157
|
-
format: 'oxfmt .',
|
|
158
|
-
'format:check': 'oxfmt --check .',
|
|
159
|
-
lint: 'oxlint .',
|
|
160
|
-
'lint:fix': 'oxlint . --fix',
|
|
161
|
-
'skills:install': 'node ./scripts/bootstrap-agent-skills.mjs',
|
|
162
|
-
'skills:check': 'node ./scripts/bootstrap-agent-skills.mjs --check',
|
|
163
|
-
};
|
|
164
|
-
for (const [scriptName, scriptCommand] of Object.entries(requiredRootScripts)) {
|
|
165
|
-
assert(
|
|
166
|
-
rootPackage.scripts?.[scriptName] === scriptCommand,
|
|
167
|
-
`Root must expose ${scriptName}`,
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
for (const dependency of [
|
|
171
|
-
'@effect/tsgo',
|
|
172
|
-
'@typescript/native-preview',
|
|
173
|
-
'oxlint',
|
|
174
|
-
'oxfmt',
|
|
175
|
-
'ultracite',
|
|
176
|
-
]) {
|
|
177
|
-
assert(
|
|
178
|
-
rootPackage.devDependencies?.[dependency],
|
|
179
|
-
`Root must depend on ${dependency}`,
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const agentsInstructions = readText('AGENTS.md');
|
|
184
|
-
assert(
|
|
185
|
-
agentsInstructions.includes('UltraModern Agent Contract') &&
|
|
186
|
-
agentsInstructions.includes('Required Skill Baseline'),
|
|
187
|
-
'Root AGENTS.md must document the UltraModern agent contract',
|
|
188
|
-
);
|
|
189
|
-
assert(
|
|
190
|
-
skillsLock.source?.repository === 'https://github.com/rstackjs/agent-skills',
|
|
191
|
-
'Agent skills lock must retain the Rstack skill source repository',
|
|
192
|
-
);
|
|
193
|
-
assert(
|
|
194
|
-
skillsLock.source?.commit === rstackAgentSkillsCommit,
|
|
195
|
-
'Agent skills lock must pin the expected Rstack skill commit',
|
|
196
|
-
);
|
|
197
|
-
assert(
|
|
198
|
-
skillsLock.installDir === '.agents/skills',
|
|
199
|
-
'Agent skills lock must use .agents/skills as installDir',
|
|
200
|
-
);
|
|
201
|
-
for (const skillName of baselineAgentSkills) {
|
|
202
|
-
assert(
|
|
203
|
-
skillsLock.baseline?.some(skill => skill.name === skillName),
|
|
204
|
-
`Agent skills lock must include ${skillName}`,
|
|
205
|
-
);
|
|
206
|
-
const skillContent = readText(`.agents/skills/${skillName}/SKILL.md`);
|
|
207
|
-
assert(
|
|
208
|
-
skillContent.includes(`name: ${skillName}`),
|
|
209
|
-
`${skillName} must contain matching skill metadata`,
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
const privateSource = skillsLock.sources?.find(
|
|
213
|
-
source => source.repository === 'https://github.com/TechsioCZ/skills',
|
|
214
|
-
);
|
|
215
|
-
assert(
|
|
216
|
-
privateSource?.install === 'clone-if-authorized',
|
|
217
|
-
'Agent skills lock must configure TechsioCZ skills as clone-if-authorized',
|
|
218
|
-
);
|
|
219
|
-
for (const skillName of privateAgentSkills) {
|
|
220
|
-
assert(
|
|
221
|
-
privateSource.baseline?.some(skill => skill.name === skillName),
|
|
222
|
-
`Agent skills lock must allowlist private skill ${skillName}`,
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const appPackagePaths = [
|
|
227
|
-
'apps/shell-super-app/package.json',
|
|
228
|
-
'apps/remotes/remote-commerce/package.json',
|
|
229
|
-
'apps/remotes/remote-identity/package.json',
|
|
230
|
-
'apps/remotes/remote-design-system/package.json',
|
|
231
|
-
];
|
|
232
|
-
|
|
233
|
-
for (const packagePath of appPackagePaths) {
|
|
234
|
-
const packageJson = readJson(packagePath);
|
|
235
|
-
assert(
|
|
236
|
-
packageJson.dependencies?.['@modern-js/plugin-tanstack'] ===
|
|
237
|
-
expectedModernDependency('@modern-js/plugin-tanstack'),
|
|
238
|
-
`${packagePath} must depend on @modern-js/plugin-tanstack through ${expectedModernDependency('@modern-js/plugin-tanstack')}`,
|
|
239
|
-
);
|
|
240
|
-
assert(
|
|
241
|
-
packageJson.dependencies?.['@modern-js/runtime'] ===
|
|
242
|
-
expectedModernDependency('@modern-js/runtime'),
|
|
243
|
-
`${packagePath} must depend on @modern-js/runtime through ${expectedModernDependency('@modern-js/runtime')}`,
|
|
244
|
-
);
|
|
245
|
-
assert(
|
|
246
|
-
packageJson.devDependencies?.['@modern-js/app-tools'] ===
|
|
247
|
-
expectedModernDependency('@modern-js/app-tools'),
|
|
248
|
-
`${packagePath} must depend on @modern-js/app-tools through ${expectedModernDependency('@modern-js/app-tools')}`,
|
|
249
|
-
);
|
|
250
|
-
assert(
|
|
251
|
-
packageJson.dependencies?.[`@${packageScope}/shared-contracts`] ===
|
|
252
|
-
'workspace:*',
|
|
253
|
-
`${packagePath} must link generated shared contracts through workspace:*`,
|
|
254
|
-
);
|
|
255
|
-
assert(
|
|
256
|
-
packageJson.dependencies?.[`@${packageScope}/shared-design-tokens`] ===
|
|
257
|
-
'workspace:*',
|
|
258
|
-
`${packagePath} must link generated shared design tokens through workspace:*`,
|
|
259
|
-
);
|
|
260
|
-
assert(
|
|
261
|
-
packageJson.dependencies?.['@tanstack/react-router'] === tanstackVersion,
|
|
262
|
-
`${packagePath} must use @tanstack/react-router ${tanstackVersion}`,
|
|
263
|
-
);
|
|
264
|
-
assert(
|
|
265
|
-
packageJson.dependencies?.['@module-federation/modern-js-v3'] === '2.4.0',
|
|
266
|
-
`${packagePath} must include the Module Federation plugin`,
|
|
267
|
-
);
|
|
268
|
-
assert(
|
|
269
|
-
packageJson.modernjs?.preset === 'presetUltramodern',
|
|
270
|
-
`${packagePath} must keep presetUltramodern metadata`,
|
|
271
|
-
);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
for (const configPath of [
|
|
275
|
-
'apps/shell-super-app/modern.config.ts',
|
|
276
|
-
'apps/remotes/remote-commerce/modern.config.ts',
|
|
277
|
-
'apps/remotes/remote-identity/modern.config.ts',
|
|
278
|
-
'apps/remotes/remote-design-system/modern.config.ts',
|
|
279
|
-
]) {
|
|
280
|
-
const config = readText(configPath);
|
|
281
|
-
assert(config.includes('presetUltramodern('), `${configPath} must use presetUltramodern`);
|
|
282
|
-
assert(config.includes('tanstackRouterPlugin()'), `${configPath} must enable plugin-tanstack`);
|
|
283
|
-
assert(config.includes('moduleFederationPlugin()'), `${configPath} must enable Module Federation`);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const shellMf = readText('apps/shell-super-app/module-federation.config.ts');
|
|
287
|
-
assert(shellMf.includes("name: 'shellSuperApp'"), 'Shell MF config must name the shell');
|
|
288
|
-
assert(shellMf.includes('remoteCommerce@http://localhost:3021/mf-manifest.json'), 'Shell must reference commerce remote');
|
|
289
|
-
assert(shellMf.includes('remoteIdentity@http://localhost:3022/mf-manifest.json'), 'Shell must reference identity remote');
|
|
290
|
-
assert(shellMf.includes('remoteDesignSystem@http://localhost:3023/mf-manifest.json'), 'Shell must reference design-system remote');
|
|
291
|
-
|
|
292
|
-
const commerceMf = readText('apps/remotes/remote-commerce/module-federation.config.ts');
|
|
293
|
-
assert(commerceMf.includes("name: 'remoteCommerce'"), 'Commerce remote MF name is missing');
|
|
294
|
-
assert(commerceMf.includes('"./Widget"'), 'Commerce remote must expose a widget');
|
|
295
|
-
|
|
296
|
-
const designMf = readText('apps/remotes/remote-design-system/module-federation.config.ts');
|
|
297
|
-
assert(designMf.includes("name: 'remoteDesignSystem'"), 'Design-system remote MF name is missing');
|
|
298
|
-
assert(designMf.includes('"./Button"'), 'Design-system remote must expose Button');
|
|
299
|
-
assert(designMf.includes('"./tokens"'), 'Design-system remote must expose tokens');
|
|
300
|
-
|
|
301
|
-
const servicePackage = readJson('services/service-recommendations-effect/package.json');
|
|
302
|
-
assert(
|
|
303
|
-
servicePackage.dependencies?.['@modern-js/runtime'] ===
|
|
304
|
-
expectedModernDependency('@modern-js/runtime'),
|
|
305
|
-
`Effect service must use @modern-js/runtime through ${expectedModernDependency('@modern-js/runtime')}`,
|
|
306
|
-
);
|
|
307
|
-
assert(
|
|
308
|
-
servicePackage.devDependencies?.['@modern-js/app-tools'] ===
|
|
309
|
-
expectedModernDependency('@modern-js/app-tools'),
|
|
310
|
-
`Effect service must use @modern-js/app-tools through ${expectedModernDependency('@modern-js/app-tools')}`,
|
|
311
|
-
);
|
|
312
|
-
assert(
|
|
313
|
-
servicePackage.devDependencies?.['@modern-js/plugin-bff'] ===
|
|
314
|
-
expectedModernDependency('@modern-js/plugin-bff'),
|
|
315
|
-
`Effect service must use @modern-js/plugin-bff through ${expectedModernDependency('@modern-js/plugin-bff')}`,
|
|
316
|
-
);
|
|
317
|
-
assert(
|
|
318
|
-
servicePackage.dependencies?.[`@${packageScope}/shared-effect-api`] ===
|
|
319
|
-
'workspace:*',
|
|
320
|
-
'Effect service must link generated shared Effect API through workspace:*',
|
|
321
|
-
);
|
|
322
|
-
|
|
323
|
-
const serviceConfig = readText('services/service-recommendations-effect/modern.config.ts');
|
|
324
|
-
assert(serviceConfig.includes("runtimeFramework: 'effect'"), 'Effect service must use Effect runtime');
|
|
325
|
-
assert(serviceConfig.includes('bffPlugin()'), 'Effect service must enable bffPlugin');
|
|
326
|
-
|
|
327
|
-
const serviceEntry = readText('services/service-recommendations-effect/api/effect/index.ts');
|
|
328
|
-
assert(serviceEntry.includes('defineEffectBff'), 'Effect service must expose defineEffectBff placeholder');
|
|
329
|
-
assert(serviceEntry.includes('recommendationsEffectApi'), 'Effect service must use shared recommendations API');
|
|
330
|
-
|
|
331
|
-
const serviceApi = readText('services/service-recommendations-effect/shared/effect/api.ts');
|
|
332
|
-
assert(serviceApi.includes('HttpApi.make'), 'Effect shared API placeholder must define HttpApi');
|
|
333
|
-
|
|
334
|
-
const topology = readJson('topology/reference-topology.json');
|
|
335
|
-
assert(topology.preset === 'presetUltramodern', 'Topology must reference presetUltramodern');
|
|
336
|
-
assert(topology.shell?.id === 'shell-super-app', 'Topology shell id is incorrect');
|
|
337
|
-
assert(topology.shell?.remoteRefs?.length === 3, 'Topology shell must reference three remotes');
|
|
338
|
-
assert(topology.remotes?.length === 3, 'Topology must contain three remotes');
|
|
339
|
-
assert(
|
|
340
|
-
topology.remotes.some(
|
|
341
|
-
remote =>
|
|
342
|
-
remote.id === 'remote-design-system' &&
|
|
343
|
-
remote.kind === 'horizontal-design-system',
|
|
344
|
-
),
|
|
345
|
-
'Topology must contain the horizontal design-system remote',
|
|
346
|
-
);
|
|
347
|
-
assert(topology.effectServices?.[0]?.runtime === 'effect', 'Topology must contain an Effect service');
|
|
348
|
-
assert(topology.sharedPackages?.length === 3, 'Topology must contain shared package placeholders');
|
|
349
|
-
|
|
350
|
-
const ownership = readJson('topology/ownership.json');
|
|
351
|
-
assert(
|
|
352
|
-
ownership.owners?.some(
|
|
353
|
-
owner =>
|
|
354
|
-
owner.id === 'remote-commerce' &&
|
|
355
|
-
owner.ownership?.team === 'commerce-experience',
|
|
356
|
-
),
|
|
357
|
-
'Ownership metadata must retain commerce owner',
|
|
358
|
-
);
|
|
359
|
-
assert(
|
|
360
|
-
ownership.owners?.some(
|
|
361
|
-
owner =>
|
|
362
|
-
owner.id === 'service-recommendations-effect' &&
|
|
363
|
-
owner.package === `@${packageScope}/service-recommendations-effect`,
|
|
364
|
-
),
|
|
365
|
-
'Ownership metadata must retain Effect service owner',
|
|
366
|
-
);
|
|
367
|
-
|
|
368
|
-
const manifest = readJson('.modernjs/ultramodern-workspace-template-manifest.json');
|
|
369
|
-
assert(
|
|
370
|
-
manifest.template?.id === 'modernjs-ultramodern-superapp-workspace',
|
|
371
|
-
'Template manifest evidence is missing',
|
|
372
|
-
);
|
|
373
|
-
assert(
|
|
374
|
-
manifest.packageSource?.strategy === packageSource.strategy,
|
|
375
|
-
'Template manifest must retain the generated package source strategy',
|
|
376
|
-
);
|
|
377
|
-
assert(
|
|
378
|
-
manifest.agentSkills?.source?.commit === rstackAgentSkillsCommit,
|
|
379
|
-
'Template manifest must retain the Rstack agent skills commit',
|
|
380
|
-
);
|
|
381
|
-
assert(
|
|
382
|
-
baselineAgentSkills.every(skillName =>
|
|
383
|
-
manifest.agentSkills?.baseline?.includes(skillName),
|
|
384
|
-
),
|
|
385
|
-
'Template manifest must list every baseline agent skill',
|
|
386
|
-
);
|
|
387
|
-
assert(
|
|
388
|
-
manifest.agentSkills?.privateSource?.repository ===
|
|
389
|
-
'https://github.com/TechsioCZ/skills',
|
|
390
|
-
'Template manifest must retain the private TechsioCZ skill source',
|
|
391
|
-
);
|
|
392
|
-
assert(
|
|
393
|
-
privateAgentSkills.every(skillName =>
|
|
394
|
-
manifest.agentSkills?.privateSource?.baseline?.includes(skillName),
|
|
395
|
-
),
|
|
396
|
-
'Template manifest must list every private agent skill allowlist entry',
|
|
397
|
-
);
|
|
398
|
-
assert(
|
|
399
|
-
manifest.validation?.expectedCommands?.includes('pnpm run ultramodern:check'),
|
|
400
|
-
'Template manifest must document the validation command',
|
|
401
|
-
);
|
|
402
|
-
|
|
403
|
-
console.log('UltraModern workspace scaffold validated');
|