@bleedingdev/modern-js-create 3.2.0-ultramodern.116 → 3.2.0-ultramodern.118
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 +35 -125
- package/dist/cjs/create-package-root.cjs +1 -1
- package/dist/cjs/index.cjs +12 -606
- package/dist/cjs/locale/en.cjs +13 -20
- package/dist/cjs/locale/zh.cjs +13 -20
- package/dist/cjs/ultramodern-workspace.cjs +16 -19
- package/dist/esm/create-package-root.js +1 -1
- package/dist/esm/index.js +14 -607
- package/dist/esm/locale/en.js +13 -20
- package/dist/esm/locale/zh.js +13 -20
- package/dist/esm/ultramodern-workspace.js +17 -17
- package/dist/esm-node/create-package-root.js +1 -1
- package/dist/esm-node/index.js +14 -607
- package/dist/esm-node/locale/en.js +13 -20
- package/dist/esm-node/locale/zh.js +13 -20
- package/dist/esm-node/ultramodern-workspace.js +17 -17
- package/dist/types/locale/en.d.ts +0 -7
- package/dist/types/locale/index.d.ts +0 -14
- package/dist/types/locale/zh.d.ts +0 -7
- package/dist/types/ultramodern-workspace.d.ts +0 -1
- package/package.json +4 -5
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +22 -6
- package/template-workspace/AGENTS.md +7 -3
- package/template-workspace/README.md.handlebars +5 -1
- package/template-workspace/lefthook.yml +18 -4
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.codex/hooks.json +0 -16
- package/template/.github/renovate.json +0 -53
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -54
- package/template/.gitignore.handlebars +0 -30
- package/template/.mise.toml.handlebars +0 -2
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -23
- package/template/README.md +0 -111
- package/template/api/effect/index.ts.handlebars +0 -34
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/favicon.svg +0 -5
- package/template/config/public/assets/ultramodern-logo.svg +0 -6
- package/template/config/public/locales/cs/translation.json +0 -44
- package/template/config/public/locales/en/translation.json +0 -44
- package/template/lefthook.yml +0 -10
- package/template/modern.config.ts.handlebars +0 -78
- package/template/oxfmt.config.ts +0 -15
- package/template/oxlint.config.ts +0 -19
- package/template/package.json.handlebars +0 -69
- package/template/pnpm-workspace.yaml +0 -34
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/rstest.config.mts +0 -5
- package/template/scripts/bootstrap-agent-skills.mjs +0 -228
- package/template/scripts/check-i18n-strings.mjs +0 -3
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -658
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -3
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/[lang]/page.tsx.handlebars +0 -209
- package/template/src/routes/index.css.handlebars +0 -266
- package/template/src/routes/layout.tsx.handlebars +0 -10
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tests/tsconfig.json +0 -7
- package/template/tests/ultramodern.contract.test.ts.handlebars +0 -163
- package/template/tsconfig.json +0 -121
|
@@ -7,8 +7,6 @@ const EN_LOCALE = {
|
|
|
7
7
|
error: {
|
|
8
8
|
projectNameEmpty: 'Error: Project name cannot be empty',
|
|
9
9
|
directoryExists: 'Error: Directory "{projectName}" already exists and is not empty',
|
|
10
|
-
invalidRouter: 'Error: Unsupported router "{router}". Use "react-router" or "tanstack".',
|
|
11
|
-
invalidBffRuntime: 'Error: Unsupported BFF runtime "{runtime}". Use "hono" or "effect".',
|
|
12
10
|
legacyModernJsNotConfirmed: 'Aborted. UltraModern.js remains the default unattended setup.',
|
|
13
11
|
createFailed: 'Error creating project:'
|
|
14
12
|
},
|
|
@@ -19,41 +17,36 @@ const EN_LOCALE = {
|
|
|
19
17
|
step1: 'cd {projectName}',
|
|
20
18
|
step2: 'pnpm install',
|
|
21
19
|
step3: 'pnpm dev',
|
|
22
|
-
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nBRUTAL WARNING: YOU ARE OPTING OUT OF ULTRAMODERN.JS DEFAULTS.\nThe unattended default is the best UltraModern.js configuration:\
|
|
20
|
+
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nBRUTAL WARNING: YOU ARE OPTING OUT OF ULTRAMODERN.JS DEFAULTS.\nThe unattended default is the best UltraModern.js configuration:\na structured SuperApp workspace, presetUltramodern, TanStack Router,\nEffect BFF, Tailwind CSS v4, and the BleedingDev package cohort.\nThe original Modern.js setup is a dangerous opt-in path.\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
23
21
|
},
|
|
24
22
|
help: {
|
|
25
23
|
title: '🚀 UltraModern.js Project Creator',
|
|
26
|
-
description: 'Create a new UltraModern.js
|
|
24
|
+
description: 'Create a new UltraModern.js SuperApp workspace with the full quality baseline by default',
|
|
27
25
|
usage: '📖 Usage:',
|
|
28
26
|
usageExample: ' pnpm dlx @bleedingdev/modern-js-create [project-name] [options]',
|
|
29
27
|
options: '⚙️ Options:',
|
|
30
28
|
optionHelp: ' -h, --help Display this help message',
|
|
31
29
|
optionVersion: ' -v, --version Display version information',
|
|
32
|
-
optionLang: ' -l, --lang Set the language (zh
|
|
33
|
-
|
|
34
|
-
optionBff: ' --bff Keep Effect BFF enabled (default for UltraModern apps)',
|
|
35
|
-
optionBffRuntime: ' --bff-runtime Select BFF runtime (hono or effect)',
|
|
36
|
-
optionTailwind: ' --no-tailwind Disable default Tailwind CSS v4 scaffold',
|
|
30
|
+
optionLang: ' -l, --lang Set the language (en default; zh opt-in)',
|
|
31
|
+
optionTailwind: ' --no-tailwind Disable default Tailwind CSS v4 workspace styling',
|
|
37
32
|
optionWorkspace: ' --workspace Use workspace protocol for @modern-js dependencies (for local monorepo testing)',
|
|
38
|
-
optionUltramodernWorkspace: ' --ultramodern-workspace Generate an UltraModern SuperApp workspace (default is a full UltraModern single app)',
|
|
39
33
|
optionUltramodernPackageSource: ' --ultramodern-package-source Select UltraModern package source (workspace or install; BleedingDev defaults to install aliases)',
|
|
40
34
|
optionUltramodernPackageScope: ' --ultramodern-package-scope Publish scope for npm alias installs (for example bleedingdev)',
|
|
41
35
|
optionUltramodernPackageNamePrefix: ' --ultramodern-package-name-prefix Prefix for npm alias package names (default: modern-js-)',
|
|
42
36
|
optionVertical: ' --vertical Mutate the current existing UltraModern workspace and wire a MicroVertical named <project-name>',
|
|
43
37
|
optionLegacyModernJs: ' --legacy-modern-js Opt into the original Modern.js setup after a large warning and typed confirmation',
|
|
44
|
-
optionSub: ' -s, --sub Mark as a subproject (package in monorepo)',
|
|
45
38
|
examples: '💡 Examples:',
|
|
46
|
-
example1: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
47
|
-
example2: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
48
|
-
example3: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
39
|
+
example1: ' pnpm dlx @bleedingdev/modern-js-create my-workspace',
|
|
40
|
+
example2: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --lang zh',
|
|
41
|
+
example3: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --no-tailwind',
|
|
49
42
|
example4: ' pnpm dlx @bleedingdev/modern-js-create --help',
|
|
50
43
|
example5: ' pnpm dlx @bleedingdev/modern-js-create .',
|
|
51
|
-
example6: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
52
|
-
example7: '
|
|
53
|
-
example8: '
|
|
54
|
-
example9: '
|
|
55
|
-
example10: '
|
|
56
|
-
example11: '
|
|
44
|
+
example6: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --workspace',
|
|
45
|
+
example7: '',
|
|
46
|
+
example8: '',
|
|
47
|
+
example9: '',
|
|
48
|
+
example10: '',
|
|
49
|
+
example11: '',
|
|
57
50
|
example12: ' pnpm dlx @bleedingdev/modern-js-create catalog --vertical',
|
|
58
51
|
moreInfo: '📚 Learn more: https://modernjs.dev'
|
|
59
52
|
},
|
|
@@ -7,8 +7,6 @@ const ZH_LOCALE = {
|
|
|
7
7
|
error: {
|
|
8
8
|
projectNameEmpty: '错误: 项目名称不能为空',
|
|
9
9
|
directoryExists: '错误: 目录 "{projectName}" 已存在且不为空',
|
|
10
|
-
invalidRouter: '错误: 不支持的路由器 "{router}",请使用 "react-router" 或 "tanstack"',
|
|
11
|
-
invalidBffRuntime: '错误: 不支持的 BFF 运行时 "{runtime}",请使用 "hono" 或 "effect"',
|
|
12
10
|
legacyModernJsNotConfirmed: '已中止。UltraModern.js 仍是默认的免交互初始化方案。',
|
|
13
11
|
createFailed: '创建项目时出错:'
|
|
14
12
|
},
|
|
@@ -19,41 +17,36 @@ const ZH_LOCALE = {
|
|
|
19
17
|
step1: 'cd {projectName}',
|
|
20
18
|
step2: 'pnpm install',
|
|
21
19
|
step3: 'pnpm dev',
|
|
22
|
-
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n严重警告:你正在退出 ULTRAMODERN.JS 默认配置。\n免交互默认值是最佳 UltraModern.js 配置:\
|
|
20
|
+
legacyModernJsWarning: "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n严重警告:你正在退出 ULTRAMODERN.JS 默认配置。\n免交互默认值是最佳 UltraModern.js 配置:\n结构化 SuperApp 工作区、presetUltramodern、TanStack Router、\nEffect BFF、Tailwind CSS v4,以及 BleedingDev 包版本队列。\n原始 Modern.js 初始化是危险的显式选择路径。\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
23
21
|
},
|
|
24
22
|
help: {
|
|
25
23
|
title: '🚀 UltraModern.js 项目创建工具',
|
|
26
|
-
description: '
|
|
24
|
+
description: '默认创建带完整质量基线的 UltraModern.js SuperApp 工作区',
|
|
27
25
|
usage: '📖 用法:',
|
|
28
26
|
usageExample: ' pnpm dlx @bleedingdev/modern-js-create [项目名称] [选项]',
|
|
29
27
|
options: '⚙️ 选项:',
|
|
30
28
|
optionHelp: ' -h, --help 显示帮助信息',
|
|
31
29
|
optionVersion: ' -v, --version 显示版本信息',
|
|
32
|
-
optionLang: ' -l, --lang 设置语言 (zh
|
|
33
|
-
|
|
34
|
-
optionBff: ' --bff 保持启用 Effect BFF(UltraModern 应用默认值)',
|
|
35
|
-
optionBffRuntime: ' --bff-runtime 选择 BFF 运行时(hono 或 effect)',
|
|
36
|
-
optionTailwind: ' --no-tailwind 禁用默认 Tailwind CSS v4 模板',
|
|
30
|
+
optionLang: ' -l, --lang 设置语言 (默认 en;zh 需显式选择)',
|
|
31
|
+
optionTailwind: ' --no-tailwind 禁用默认 Tailwind CSS v4 工作区样式',
|
|
37
32
|
optionWorkspace: ' --workspace 对 @modern-js 依赖使用 workspace 协议(用于本地 monorepo 联调)',
|
|
38
|
-
optionUltramodernWorkspace: ' --ultramodern-workspace 生成 UltraModern SuperApp 工作区(默认创建完整 UltraModern 单应用)',
|
|
39
33
|
optionUltramodernPackageSource: ' --ultramodern-package-source 选择 UltraModern 依赖来源(workspace 或 install;BleedingDev 默认使用 install alias)',
|
|
40
34
|
optionUltramodernPackageScope: ' --ultramodern-package-scope npm alias 安装使用的发布 scope(例如 bleedingdev)',
|
|
41
35
|
optionUltramodernPackageNamePrefix: ' --ultramodern-package-name-prefix npm alias 包名前缀(默认:modern-js-)',
|
|
42
36
|
optionVertical: ' --vertical 修改当前已有的 UltraModern 工作区,并接入名为 <项目名称> 的 MicroVertical',
|
|
43
37
|
optionLegacyModernJs: ' --legacy-modern-js 在大型警告和输入确认后,选择原始 Modern.js 初始化',
|
|
44
|
-
optionSub: ' -s, --sub 标记为子项目(monorepo 中的子包)',
|
|
45
38
|
examples: '💡 示例:',
|
|
46
|
-
example1: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
47
|
-
example2: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
48
|
-
example3: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
39
|
+
example1: ' pnpm dlx @bleedingdev/modern-js-create my-workspace',
|
|
40
|
+
example2: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --lang zh',
|
|
41
|
+
example3: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --no-tailwind',
|
|
49
42
|
example4: ' pnpm dlx @bleedingdev/modern-js-create --help',
|
|
50
43
|
example5: ' pnpm dlx @bleedingdev/modern-js-create .',
|
|
51
|
-
example6: ' pnpm dlx @bleedingdev/modern-js-create my-
|
|
52
|
-
example7: '
|
|
53
|
-
example8: '
|
|
54
|
-
example9: '
|
|
55
|
-
example10: '
|
|
56
|
-
example11: '
|
|
44
|
+
example6: ' pnpm dlx @bleedingdev/modern-js-create my-workspace --workspace',
|
|
45
|
+
example7: '',
|
|
46
|
+
example8: '',
|
|
47
|
+
example9: '',
|
|
48
|
+
example10: '',
|
|
49
|
+
example11: '',
|
|
57
50
|
example12: ' pnpm dlx @bleedingdev/modern-js-create catalog --vertical',
|
|
58
51
|
moreInfo: '📚 更多信息: https://modernjs.dev'
|
|
59
52
|
},
|
|
@@ -64,7 +64,6 @@ const supportedWorkspaceLanguages = [
|
|
|
64
64
|
'en',
|
|
65
65
|
'cs'
|
|
66
66
|
];
|
|
67
|
-
const ULTRAMODERN_WORKSPACE_FLAG = '--ultramodern-workspace';
|
|
68
67
|
const FIRST_VERTICAL_PORT = 4101;
|
|
69
68
|
const TAILWIND_PREFIX_DIGIT_WORDS = [
|
|
70
69
|
'zero',
|
|
@@ -441,24 +440,24 @@ function createRootPackageJson(scope, packageSource, remotes = []) {
|
|
|
441
440
|
`dev:${remote.packageSuffix}`,
|
|
442
441
|
`pnpm --filter ${ultramodern_workspace_packageName(scope, remote.packageSuffix)} dev`
|
|
443
442
|
])),
|
|
444
|
-
build: `${remoteBuildPrefix}ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm
|
|
443
|
+
build: `${remoteBuildPrefix}ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm mf:types`,
|
|
445
444
|
format: "oxfmt . '!repos/**'",
|
|
446
445
|
'format:check': "oxfmt --check . '!repos/**'",
|
|
447
446
|
lint: 'oxlint apps verticals packages',
|
|
448
447
|
'lint:fix': 'oxlint apps verticals packages --fix',
|
|
449
448
|
typecheck: `pnpm -r --filter "@${scope}/*" typecheck`,
|
|
450
|
-
'cloudflare:build': `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm
|
|
449
|
+
'cloudflare:build': `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types`,
|
|
451
450
|
'cloudflare:deploy': `${remoteCloudflareDeployPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:deploy`,
|
|
452
451
|
'cloudflare:proof': "node ./scripts/proof-cloudflare-version.mjs --out .codex/reports/cloudflare-version-proof/public-url-proof.json",
|
|
453
452
|
'skills:install': "node ./scripts/bootstrap-agent-skills.mjs",
|
|
454
453
|
'skills:check': "node ./scripts/bootstrap-agent-skills.mjs --check",
|
|
455
454
|
'agents:refs:install': "node ./scripts/setup-agent-reference-repos.mjs",
|
|
456
455
|
'agents:refs:check': "node ./scripts/setup-agent-reference-repos.mjs --check",
|
|
457
|
-
'
|
|
458
|
-
'
|
|
459
|
-
'
|
|
456
|
+
'mf:types': "node ./scripts/assert-mf-types.mjs",
|
|
457
|
+
'contract:check': "node ./scripts/validate-ultramodern-workspace.mjs",
|
|
458
|
+
'i18n:boundaries': "node ./scripts/check-ultramodern-i18n-boundaries.mjs",
|
|
460
459
|
postinstall: "oxfmt . '!repos/**' && node ./scripts/bootstrap-agent-skills.mjs && node ./scripts/setup-agent-reference-repos.mjs",
|
|
461
|
-
check: 'pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && pnpm
|
|
460
|
+
check: 'pnpm format:check && pnpm lint && pnpm typecheck && pnpm skills:check && pnpm i18n:boundaries && pnpm contract:check'
|
|
462
461
|
},
|
|
463
462
|
engines: {
|
|
464
463
|
node: '>=20',
|
|
@@ -3579,8 +3578,8 @@ function createTopology(scope, remotes = []) {
|
|
|
3579
3578
|
validation: {
|
|
3580
3579
|
script: "scripts/validate-ultramodern-workspace.mjs",
|
|
3581
3580
|
commands: [
|
|
3582
|
-
'pnpm
|
|
3583
|
-
'pnpm
|
|
3581
|
+
'pnpm i18n:boundaries',
|
|
3582
|
+
'pnpm contract:check'
|
|
3584
3583
|
]
|
|
3585
3584
|
}
|
|
3586
3585
|
};
|
|
@@ -4165,8 +4164,8 @@ function createTemplateManifest(modernVersion, packageSource) {
|
|
|
4165
4164
|
expectedCommands: [
|
|
4166
4165
|
'mise install',
|
|
4167
4166
|
'pnpm install',
|
|
4168
|
-
'pnpm run
|
|
4169
|
-
'pnpm run
|
|
4167
|
+
'pnpm run i18n:boundaries',
|
|
4168
|
+
'pnpm run contract:check'
|
|
4170
4169
|
]
|
|
4171
4170
|
}
|
|
4172
4171
|
};
|
|
@@ -4278,8 +4277,8 @@ function createWorkspaceValidationScript(scope, enableTailwind, remotes = []) {
|
|
|
4278
4277
|
const oldRemotePaths = [
|
|
4279
4278
|
'apps/remotes'
|
|
4280
4279
|
];
|
|
4281
|
-
const expectedBuildScript = remotes.length > 0 ? 'ULTRAMODERN_ZEPHYR=false pnpm -r --filter "./verticals/*" run build && ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm
|
|
4282
|
-
const expectedCloudflareBuildScript = remotes.length > 0 ? 'pnpm -r --filter "./verticals/*" run cloudflare:build && pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm
|
|
4280
|
+
const expectedBuildScript = remotes.length > 0 ? 'ULTRAMODERN_ZEPHYR=false pnpm -r --filter "./verticals/*" run build && ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm mf:types' : 'ULTRAMODERN_ZEPHYR=false pnpm --filter "./apps/shell-super-app" run build && pnpm mf:types';
|
|
4281
|
+
const expectedCloudflareBuildScript = remotes.length > 0 ? 'pnpm -r --filter "./verticals/*" run cloudflare:build && pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types' : 'pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types';
|
|
4283
4282
|
const expectedCloudflareDeployScript = remotes.length > 0 ? 'pnpm -r --filter "./verticals/*" run cloudflare:deploy && pnpm --filter "./apps/shell-super-app" run cloudflare:deploy' : 'pnpm --filter "./apps/shell-super-app" run cloudflare:deploy';
|
|
4284
4283
|
const expectedCloudflareSecurity = createCloudflareSecurityContract();
|
|
4285
4284
|
return `import { execFileSync } from 'node:child_process';
|
|
@@ -4531,15 +4530,16 @@ assert(
|
|
|
4531
4530
|
'Root build script must build verticals before shell',
|
|
4532
4531
|
);
|
|
4533
4532
|
assert(rootPackage.scripts?.['cloudflare:build'] === expectedCloudflareBuildScript, 'Root cloudflare:build script is incorrect');
|
|
4534
|
-
assert(
|
|
4535
|
-
assert(rootPackage.scripts?.['
|
|
4533
|
+
assert(!('ultramodern:check' in (rootPackage.scripts ?? {})), 'Root must not expose ultramodern:check');
|
|
4534
|
+
assert(rootPackage.scripts?.['contract:check'] === 'node ./scripts/validate-ultramodern-workspace.mjs', 'Root must expose contract:check');
|
|
4535
|
+
assert(rootPackage.scripts?.['i18n:boundaries'] === 'node ./scripts/check-ultramodern-i18n-boundaries.mjs', 'Root must expose i18n:boundaries');
|
|
4536
4536
|
const i18nBoundaryScript = readText('scripts/check-ultramodern-i18n-boundaries.mjs');
|
|
4537
4537
|
assert(
|
|
4538
4538
|
i18nBoundaryScript.includes("from '@modern-js/code-tools'") &&
|
|
4539
4539
|
i18nBoundaryScript.includes('runWorkspaceSourceCheck'),
|
|
4540
4540
|
'Root i18n boundary script must call @modern-js/code-tools',
|
|
4541
4541
|
);
|
|
4542
|
-
assert(rootPackage.scripts?.['
|
|
4542
|
+
assert(rootPackage.scripts?.['mf:types'] === 'node ./scripts/assert-mf-types.mjs', 'Root must expose mf:types');
|
|
4543
4543
|
assert(rootPackage.scripts?.['cloudflare:deploy'] === expectedCloudflareDeployScript, 'Root must expose cloudflare:deploy');
|
|
4544
4544
|
assert(rootPackage.scripts?.['cloudflare:proof'] === 'node ./scripts/proof-cloudflare-version.mjs --out .codex/reports/cloudflare-version-proof/public-url-proof.json', 'Root must expose cloudflare:proof');
|
|
4545
4545
|
assert(rootPackage.scripts?.['skills:install'] === 'node ./scripts/bootstrap-agent-skills.mjs', 'Root must expose skills:install');
|
|
@@ -5561,4 +5561,4 @@ const ultramodernWorkspaceVersions = {
|
|
|
5561
5561
|
tailwind: TAILWIND_VERSION,
|
|
5562
5562
|
tailwindPostcss: TAILWIND_POSTCSS_VERSION
|
|
5563
5563
|
};
|
|
5564
|
-
export {
|
|
5564
|
+
export { addUltramodernVertical, generateUltramodernWorkspace, ultramodernWorkspaceVersions };
|
|
@@ -6,8 +6,6 @@ export declare const EN_LOCALE: {
|
|
|
6
6
|
error: {
|
|
7
7
|
projectNameEmpty: string;
|
|
8
8
|
directoryExists: string;
|
|
9
|
-
invalidRouter: string;
|
|
10
|
-
invalidBffRuntime: string;
|
|
11
9
|
legacyModernJsNotConfirmed: string;
|
|
12
10
|
createFailed: string;
|
|
13
11
|
};
|
|
@@ -29,18 +27,13 @@ export declare const EN_LOCALE: {
|
|
|
29
27
|
optionHelp: string;
|
|
30
28
|
optionVersion: string;
|
|
31
29
|
optionLang: string;
|
|
32
|
-
optionRouter: string;
|
|
33
|
-
optionBff: string;
|
|
34
|
-
optionBffRuntime: string;
|
|
35
30
|
optionTailwind: string;
|
|
36
31
|
optionWorkspace: string;
|
|
37
|
-
optionUltramodernWorkspace: string;
|
|
38
32
|
optionUltramodernPackageSource: string;
|
|
39
33
|
optionUltramodernPackageScope: string;
|
|
40
34
|
optionUltramodernPackageNamePrefix: string;
|
|
41
35
|
optionVertical: string;
|
|
42
36
|
optionLegacyModernJs: string;
|
|
43
|
-
optionSub: string;
|
|
44
37
|
examples: string;
|
|
45
38
|
example1: string;
|
|
46
39
|
example2: string;
|
|
@@ -8,8 +8,6 @@ declare const localeKeys: {
|
|
|
8
8
|
error: {
|
|
9
9
|
projectNameEmpty: string;
|
|
10
10
|
directoryExists: string;
|
|
11
|
-
invalidRouter: string;
|
|
12
|
-
invalidBffRuntime: string;
|
|
13
11
|
legacyModernJsNotConfirmed: string;
|
|
14
12
|
createFailed: string;
|
|
15
13
|
};
|
|
@@ -31,18 +29,13 @@ declare const localeKeys: {
|
|
|
31
29
|
optionHelp: string;
|
|
32
30
|
optionVersion: string;
|
|
33
31
|
optionLang: string;
|
|
34
|
-
optionRouter: string;
|
|
35
|
-
optionBff: string;
|
|
36
|
-
optionBffRuntime: string;
|
|
37
32
|
optionTailwind: string;
|
|
38
33
|
optionWorkspace: string;
|
|
39
|
-
optionUltramodernWorkspace: string;
|
|
40
34
|
optionUltramodernPackageSource: string;
|
|
41
35
|
optionUltramodernPackageScope: string;
|
|
42
36
|
optionUltramodernPackageNamePrefix: string;
|
|
43
37
|
optionVertical: string;
|
|
44
38
|
optionLegacyModernJs: string;
|
|
45
|
-
optionSub: string;
|
|
46
39
|
examples: string;
|
|
47
40
|
example1: string;
|
|
48
41
|
example2: string;
|
|
@@ -69,8 +62,6 @@ declare const localeKeys: {
|
|
|
69
62
|
error: {
|
|
70
63
|
projectNameEmpty: string;
|
|
71
64
|
directoryExists: string;
|
|
72
|
-
invalidRouter: string;
|
|
73
|
-
invalidBffRuntime: string;
|
|
74
65
|
legacyModernJsNotConfirmed: string;
|
|
75
66
|
createFailed: string;
|
|
76
67
|
};
|
|
@@ -92,18 +83,13 @@ declare const localeKeys: {
|
|
|
92
83
|
optionHelp: string;
|
|
93
84
|
optionVersion: string;
|
|
94
85
|
optionLang: string;
|
|
95
|
-
optionRouter: string;
|
|
96
|
-
optionBff: string;
|
|
97
|
-
optionBffRuntime: string;
|
|
98
86
|
optionTailwind: string;
|
|
99
87
|
optionWorkspace: string;
|
|
100
|
-
optionUltramodernWorkspace: string;
|
|
101
88
|
optionUltramodernPackageSource: string;
|
|
102
89
|
optionUltramodernPackageScope: string;
|
|
103
90
|
optionUltramodernPackageNamePrefix: string;
|
|
104
91
|
optionVertical: string;
|
|
105
92
|
optionLegacyModernJs: string;
|
|
106
|
-
optionSub: string;
|
|
107
93
|
examples: string;
|
|
108
94
|
example1: string;
|
|
109
95
|
example2: string;
|
|
@@ -6,8 +6,6 @@ export declare const ZH_LOCALE: {
|
|
|
6
6
|
error: {
|
|
7
7
|
projectNameEmpty: string;
|
|
8
8
|
directoryExists: string;
|
|
9
|
-
invalidRouter: string;
|
|
10
|
-
invalidBffRuntime: string;
|
|
11
9
|
legacyModernJsNotConfirmed: string;
|
|
12
10
|
createFailed: string;
|
|
13
11
|
};
|
|
@@ -29,18 +27,13 @@ export declare const ZH_LOCALE: {
|
|
|
29
27
|
optionHelp: string;
|
|
30
28
|
optionVersion: string;
|
|
31
29
|
optionLang: string;
|
|
32
|
-
optionRouter: string;
|
|
33
|
-
optionBff: string;
|
|
34
|
-
optionBffRuntime: string;
|
|
35
30
|
optionTailwind: string;
|
|
36
31
|
optionWorkspace: string;
|
|
37
|
-
optionUltramodernWorkspace: string;
|
|
38
32
|
optionUltramodernPackageSource: string;
|
|
39
33
|
optionUltramodernPackageScope: string;
|
|
40
34
|
optionUltramodernPackageNamePrefix: string;
|
|
41
35
|
optionVertical: string;
|
|
42
36
|
optionLegacyModernJs: string;
|
|
43
|
-
optionSub: string;
|
|
44
37
|
examples: string;
|
|
45
38
|
example1: string;
|
|
46
39
|
example2: string;
|
|
@@ -19,7 +19,6 @@ export type AddUltramodernVerticalOptions = {
|
|
|
19
19
|
enableTailwind?: boolean;
|
|
20
20
|
packageSource?: UltramodernWorkspaceOptions['packageSource'];
|
|
21
21
|
};
|
|
22
|
-
export declare const ULTRAMODERN_WORKSPACE_FLAG = "--ultramodern-workspace";
|
|
23
22
|
export declare function addUltramodernVertical(options: AddUltramodernVerticalOptions): void;
|
|
24
23
|
export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): void;
|
|
25
24
|
export declare const ultramodernWorkspaceVersions: {
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.2.0-ultramodern.
|
|
24
|
+
"version": "3.2.0-ultramodern.118",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/esm-node/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -46,13 +46,12 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
|
-
"template",
|
|
50
49
|
"template-workspace",
|
|
51
50
|
"dist",
|
|
52
|
-
"bin
|
|
51
|
+
"bin"
|
|
53
52
|
],
|
|
54
53
|
"dependencies": {
|
|
55
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
54
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.118"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
57
|
"@rslib/core": "0.21.5",
|
|
@@ -73,6 +72,6 @@
|
|
|
73
72
|
"test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
|
|
74
73
|
},
|
|
75
74
|
"ultramodern": {
|
|
76
|
-
"frameworkVersion": "3.2.0-ultramodern.
|
|
75
|
+
"frameworkVersion": "3.2.0-ultramodern.118"
|
|
77
76
|
}
|
|
78
77
|
}
|
|
@@ -19,9 +19,28 @@ concurrency:
|
|
|
19
19
|
cancel-in-progress: true
|
|
20
20
|
|
|
21
21
|
jobs:
|
|
22
|
-
|
|
22
|
+
workspace-gate:
|
|
23
|
+
name: ${{ matrix.name }}
|
|
23
24
|
runs-on: ubuntu-latest
|
|
24
25
|
timeout-minutes: 30
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
include:
|
|
30
|
+
- name: Format
|
|
31
|
+
command: pnpm format:check
|
|
32
|
+
- name: Lint
|
|
33
|
+
command: pnpm lint
|
|
34
|
+
- name: Typecheck
|
|
35
|
+
command: pnpm typecheck
|
|
36
|
+
- name: Skills
|
|
37
|
+
command: pnpm skills:check
|
|
38
|
+
- name: I18n Boundaries
|
|
39
|
+
command: pnpm i18n:boundaries
|
|
40
|
+
- name: Contract
|
|
41
|
+
command: pnpm contract:check
|
|
42
|
+
- name: Build
|
|
43
|
+
command: pnpm build
|
|
25
44
|
steps:
|
|
26
45
|
- name: Harden Runner
|
|
27
46
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
@@ -45,10 +64,7 @@ jobs:
|
|
|
45
64
|
- name: Install Dependencies
|
|
46
65
|
run: mise exec -- pnpm install --frozen-lockfile
|
|
47
66
|
|
|
48
|
-
- name:
|
|
49
|
-
run: mise exec -- pnpm run ultramodern:check
|
|
50
|
-
|
|
51
|
-
- name: Build Workspace Apps
|
|
67
|
+
- name: Run ${{ matrix.name }}
|
|
52
68
|
env:
|
|
53
69
|
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
54
|
-
run: mise exec --
|
|
70
|
+
run: mise exec -- ${{ matrix.command }}
|
|
@@ -9,9 +9,13 @@ instructions, not optional reading.
|
|
|
9
9
|
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
10
10
|
- `pnpm format` runs oxfmt.
|
|
11
11
|
- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
|
|
12
|
-
- `pnpm
|
|
12
|
+
- `pnpm i18n:boundaries` verifies workspace source boundaries through `@modern-js/code-tools`.
|
|
13
|
+
- `pnpm contract:check` verifies the generated workspace contract.
|
|
14
|
+
- `pnpm mf:types` verifies Module Federation type outputs after builds.
|
|
15
|
+
- `pnpm check` is a local convenience aggregate for the primitive gates.
|
|
16
|
+
- Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
|
|
13
17
|
- Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
|
|
14
|
-
- `postinstall` formats the generated tree, initializes Git when needed, installs agent skills and reference repos, then installs `lefthook`. Generated `lefthook.yml` runs
|
|
18
|
+
- `postinstall` formats the generated tree, initializes Git when needed, installs agent skills and reference repos, then installs `lefthook`. Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
|
|
15
19
|
|
|
16
20
|
## Localized Routes
|
|
17
21
|
|
|
@@ -73,4 +77,4 @@ Agents may read files under `repos/` to understand upstream patterns, APIs, and
|
|
|
73
77
|
|
|
74
78
|
## Skill Provenance
|
|
75
79
|
|
|
76
|
-
The vendored Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.agents/skills-lock.json`. Do not update, remove, or replace them casually. If a skill needs updating, update the lock file and run `pnpm check`.
|
|
80
|
+
The vendored Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.agents/skills-lock.json`. Do not update, remove, or replace them casually. If a skill needs updating, update the lock file and run the affected primitive gate plus `pnpm check`.
|
|
@@ -42,6 +42,10 @@ pnpm check
|
|
|
42
42
|
pnpm build
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
Generated CI does not call the local aggregate. It runs format, lint,
|
|
46
|
+
typecheck, skills, i18n boundary validation, contract validation, and build as
|
|
47
|
+
separate matrix jobs so failures are isolated and parallelizable.
|
|
48
|
+
|
|
45
49
|
By default, `pnpm install` also prepares read-only agent reference repositories
|
|
46
50
|
under `repos/` for Effect and UltraModern.js source lookup using squashed git
|
|
47
51
|
subtrees. Disable this setup with
|
|
@@ -81,7 +85,7 @@ pnpm cloudflare:proof -- --require-public-urls
|
|
|
81
85
|
| --- | --- | --- |
|
|
82
86
|
| Package cohort mismatch | Regenerate with one package source strategy, run `mise install`, then rerun `pnpm install` from the activated shell. | Generated workspace package source metadata |
|
|
83
87
|
| Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
|
|
84
|
-
| Build failure | Run `pnpm check` before `pnpm build`; fix
|
|
88
|
+
| Build failure | Run the matching primitive gate (`pnpm lint`, `pnpm typecheck`, `pnpm i18n:boundaries`, `pnpm contract:check`) before `pnpm build`; fix the owning failure first. | Owning package or generated contract |
|
|
85
89
|
| Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
|
|
86
90
|
| Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
|
|
87
91
|
| Asset or CSS 404 | Rebuild with `pnpm build` or `pnpm cloudflare:deploy` and inspect emitted Modern/Rspack asset paths instead of hardcoding CSS URLs. | Framework/runtime asset pipeline |
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
pre-commit:
|
|
2
2
|
commands:
|
|
3
|
-
|
|
4
|
-
run: pnpm format
|
|
3
|
+
format:
|
|
4
|
+
run: pnpm format
|
|
5
|
+
stage_fixed: true
|
|
6
|
+
lint-fix:
|
|
7
|
+
run: pnpm lint:fix
|
|
5
8
|
stage_fixed: true
|
|
6
9
|
|
|
7
10
|
pre-push:
|
|
11
|
+
parallel: true
|
|
8
12
|
commands:
|
|
9
|
-
|
|
10
|
-
run: pnpm check
|
|
13
|
+
format:
|
|
14
|
+
run: pnpm format:check
|
|
15
|
+
lint:
|
|
16
|
+
run: pnpm lint
|
|
17
|
+
typecheck:
|
|
18
|
+
run: pnpm typecheck
|
|
19
|
+
skills:
|
|
20
|
+
run: pnpm skills:check
|
|
21
|
+
i18n-boundaries:
|
|
22
|
+
run: pnpm i18n:boundaries
|
|
23
|
+
contract:
|
|
24
|
+
run: pnpm contract:check
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"installDir": ".agents/skills",
|
|
4
|
-
"sources": [
|
|
5
|
-
{
|
|
6
|
-
"id": "techsiocz-private",
|
|
7
|
-
"visibility": "private",
|
|
8
|
-
"repository": "https://github.com/TechsioCZ/skills",
|
|
9
|
-
"install": "clone-if-authorized",
|
|
10
|
-
"baseline": [
|
|
11
|
-
{
|
|
12
|
-
"name": "plan-graph",
|
|
13
|
-
"reason": "Build and validate DAGs from .plan.md files"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "dag",
|
|
17
|
-
"reason": "Inspect current plan frontiers and blocked lanes"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "subagent-graph",
|
|
21
|
-
"reason": "Design dependency-aware multi-agent launch graphs"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "helm",
|
|
25
|
-
"reason": "Steer already-running multi-agent work"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "debugger-mode",
|
|
29
|
-
"reason": "Run hypothesis-driven debugging with runtime evidence"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
package/template/.browserslistrc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Stop": [
|
|
3
|
-
{
|
|
4
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
5
|
-
"timeout": 600000,
|
|
6
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"SubagentStop": [
|
|
10
|
-
{
|
|
11
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
12
|
-
"timeout": 600000,
|
|
13
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"extends": [
|
|
4
|
-
"config:recommended",
|
|
5
|
-
"helpers:pinGitHubActionDigests"
|
|
6
|
-
],
|
|
7
|
-
"dependencyDashboard": true,
|
|
8
|
-
"minimumReleaseAge": "1 day",
|
|
9
|
-
"prConcurrentLimit": 5,
|
|
10
|
-
"prHourlyLimit": 2,
|
|
11
|
-
"rangeStrategy": "bump",
|
|
12
|
-
"schedule": [
|
|
13
|
-
"before 5am on monday"
|
|
14
|
-
],
|
|
15
|
-
"timezone": "Etc/UTC",
|
|
16
|
-
"packageRules": [
|
|
17
|
-
{
|
|
18
|
-
"matchManagers": [
|
|
19
|
-
"github-actions"
|
|
20
|
-
],
|
|
21
|
-
"groupName": "github-actions",
|
|
22
|
-
"labels": [
|
|
23
|
-
"dependencies",
|
|
24
|
-
"github-actions",
|
|
25
|
-
"security"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"matchManagers": [
|
|
30
|
-
"npm"
|
|
31
|
-
],
|
|
32
|
-
"matchUpdateTypes": [
|
|
33
|
-
"patch",
|
|
34
|
-
"minor"
|
|
35
|
-
],
|
|
36
|
-
"groupName": "npm minor and patch updates",
|
|
37
|
-
"labels": [
|
|
38
|
-
"dependencies",
|
|
39
|
-
"npm"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"matchUpdateTypes": [
|
|
44
|
-
"major"
|
|
45
|
-
],
|
|
46
|
-
"dependencyDashboardApproval": true,
|
|
47
|
-
"labels": [
|
|
48
|
-
"dependencies",
|
|
49
|
-
"major"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|