@bleedingdev/modern-js-create 3.4.0-ultramodern.2 → 3.4.0-ultramodern.20
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 +13 -11
- package/dist/cjs/index.cjs +37 -4
- package/dist/cjs/locale/en.cjs +12 -2
- package/dist/cjs/locale/zh.cjs +12 -2
- package/dist/cjs/ultramodern-tooling/commands.cjs +185 -0
- package/dist/cjs/ultramodern-tooling/config.cjs +172 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +79 -61
- package/dist/cjs/ultramodern-workspace/bridge-config.cjs +327 -0
- package/dist/cjs/ultramodern-workspace/codesmith.cjs +1 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +121 -648
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +26 -33
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +4 -4
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +230 -100
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +117 -0
- package/dist/cjs/ultramodern-workspace/generation-result.cjs +1 -1
- package/dist/cjs/ultramodern-workspace/index.cjs +4 -0
- package/dist/cjs/ultramodern-workspace/mf-validation.cjs +571 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +51 -20
- package/dist/cjs/ultramodern-workspace/package-json.cjs +62 -19
- package/dist/cjs/ultramodern-workspace/policy.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/public-api.cjs +4 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +5 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +80 -43
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +63 -20
- package/dist/esm/index.js +37 -4
- package/dist/esm/locale/en.js +12 -2
- package/dist/esm/locale/zh.js +12 -2
- package/dist/esm/ultramodern-tooling/commands.js +132 -0
- package/dist/esm/ultramodern-tooling/config.js +120 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +81 -66
- package/dist/esm/ultramodern-workspace/bridge-config.js +270 -0
- package/dist/esm/ultramodern-workspace/codesmith.js +1 -0
- package/dist/esm/ultramodern-workspace/contracts.js +124 -603
- package/dist/esm/ultramodern-workspace/demo-components.js +26 -33
- package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm/ultramodern-workspace/effect-api.js +230 -100
- package/dist/esm/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm/ultramodern-workspace/generation-result.js +2 -2
- package/dist/esm/ultramodern-workspace/index.js +1 -0
- package/dist/esm/ultramodern-workspace/mf-validation.js +516 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +49 -21
- package/dist/esm/ultramodern-workspace/package-json.js +60 -20
- package/dist/esm/ultramodern-workspace/policy.js +2 -2
- package/dist/esm/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm/ultramodern-workspace/versions.js +3 -1
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +78 -26
- package/dist/esm/ultramodern-workspace/write-workspace.js +67 -27
- package/dist/esm-node/index.js +37 -4
- package/dist/esm-node/locale/en.js +12 -2
- package/dist/esm-node/locale/zh.js +12 -2
- package/dist/esm-node/ultramodern-tooling/commands.js +133 -0
- package/dist/esm-node/ultramodern-tooling/config.js +121 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +81 -66
- package/dist/esm-node/ultramodern-workspace/bridge-config.js +271 -0
- package/dist/esm-node/ultramodern-workspace/codesmith.js +1 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +124 -603
- package/dist/esm-node/ultramodern-workspace/demo-components.js +26 -33
- package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm-node/ultramodern-workspace/effect-api.js +230 -100
- package/dist/esm-node/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm-node/ultramodern-workspace/generation-result.js +2 -2
- package/dist/esm-node/ultramodern-workspace/index.js +1 -0
- package/dist/esm-node/ultramodern-workspace/mf-validation.js +517 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +49 -21
- package/dist/esm-node/ultramodern-workspace/package-json.js +60 -20
- package/dist/esm-node/ultramodern-workspace/policy.js +2 -2
- package/dist/esm-node/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +3 -1
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +78 -26
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +67 -27
- package/dist/types/locale/en.d.ts +10 -0
- package/dist/types/locale/index.d.ts +20 -0
- package/dist/types/locale/zh.d.ts +10 -0
- package/dist/types/ultramodern-tooling/commands.d.ts +1 -0
- package/dist/types/ultramodern-tooling/config.d.ts +43 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +5 -2
- package/dist/types/ultramodern-workspace/bridge-config.d.ts +64 -0
- package/dist/types/ultramodern-workspace/codesmith.d.ts +1 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +2 -17
- package/dist/types/ultramodern-workspace/descriptors.d.ts +1 -1
- package/dist/types/ultramodern-workspace/fs-io.d.ts +1 -0
- package/dist/types/ultramodern-workspace/index.d.ts +2 -0
- package/dist/types/ultramodern-workspace/mf-validation.d.ts +27 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +1 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +5 -3
- package/dist/types/ultramodern-workspace/public-api.d.ts +2 -0
- package/dist/types/ultramodern-workspace/types.d.ts +2 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +2 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +2 -7
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -2
- package/package.json +5 -3
- package/template-workspace/{.agents → .codex}/skills-lock.json +12 -12
- package/template-workspace/.gitignore.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +11 -5
- package/template-workspace/README.md.handlebars +15 -12
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/patches/@tanstack__router-core@1.171.13.patch +51 -0
- package/template-workspace/pnpm-workspace.yaml.handlebars +12 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +96 -69
- package/templates/app/shell-frame.tsx +1 -2
- package/templates/app/ultramodern-route-head.tsx.handlebars +5 -6
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +59 -7
- package/templates/workspace-scripts/check-ultramodern-api-boundaries.mjs +339 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +245 -8
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +276 -8
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +35 -10
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +164 -1
- package/templates/workspace-scripts/ultramodern-typecheck.mjs +4 -2
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +949 -63
- /package/template-workspace/{.agents → .codex}/rstackjs-agent-skills-LICENSE +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsbuild-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/command-map.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/common-analysis-patterns.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-common.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-rspack.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-webpack.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/rsdoctor-data-types.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rslib-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rslib-modern-package/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/bottlenecks.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/tracing-guide.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/scripts/analyze_trace.js +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rstest-best-practices/SKILL.md +0 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"repository": "https://github.com/rstackjs/agent-skills",
|
|
5
5
|
"commit": "61c948b42512e223bad44b83af4080eba48b2677",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"licensePath": ".
|
|
7
|
+
"licensePath": ".codex/rstackjs-agent-skills-LICENSE"
|
|
8
8
|
},
|
|
9
|
-
"installDir": ".
|
|
9
|
+
"installDir": ".codex/skills",
|
|
10
10
|
"sources": [
|
|
11
11
|
{
|
|
12
12
|
"id": "rstack-agent-skills",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"repository": "https://github.com/rstackjs/agent-skills",
|
|
15
15
|
"commit": "61c948b42512e223bad44b83af4080eba48b2677",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"licensePath": ".
|
|
17
|
+
"licensePath": ".codex/rstackjs-agent-skills-LICENSE",
|
|
18
18
|
"install": "vendored"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"baseline": [
|
|
27
27
|
{
|
|
28
28
|
"name": "mf",
|
|
29
|
-
"path": ".
|
|
29
|
+
"path": ".codex/skills/mf",
|
|
30
30
|
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
@@ -63,42 +63,42 @@
|
|
|
63
63
|
"baseline": [
|
|
64
64
|
{
|
|
65
65
|
"name": "rsbuild-best-practices",
|
|
66
|
-
"path": ".
|
|
66
|
+
"path": ".codex/skills/rsbuild-best-practices",
|
|
67
67
|
"reason": "Modern.js application build configuration and Rsbuild troubleshooting"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"name": "rspack-best-practices",
|
|
71
|
-
"path": ".
|
|
71
|
+
"path": ".codex/skills/rspack-best-practices",
|
|
72
72
|
"reason": "Rspack bundling, CSS, asset, profiling, and production behavior"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"name": "rspack-tracing",
|
|
76
|
-
"path": ".
|
|
76
|
+
"path": ".codex/skills/rspack-tracing",
|
|
77
77
|
"reason": "Trace-backed Rspack failure and performance debugging"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "rsdoctor-analysis",
|
|
81
|
-
"path": ".
|
|
81
|
+
"path": ".codex/skills/rsdoctor-analysis",
|
|
82
82
|
"reason": "Evidence-backed bundle composition, duplication, and retained-module analysis"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"name": "rslib-best-practices",
|
|
86
|
-
"path": ".
|
|
86
|
+
"path": ".codex/skills/rslib-best-practices",
|
|
87
87
|
"reason": "Rslib shared package and design-system library authoring"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"name": "rslib-modern-package",
|
|
91
|
-
"path": ".
|
|
91
|
+
"path": ".codex/skills/rslib-modern-package",
|
|
92
92
|
"reason": "Modern package contracts, exports, declarations, side effects, and release readiness"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "rstest-best-practices",
|
|
96
|
-
"path": ".
|
|
96
|
+
"path": ".codex/skills/rstest-best-practices",
|
|
97
97
|
"reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "mf",
|
|
101
|
-
"path": ".
|
|
101
|
+
"path": ".codex/skills/mf",
|
|
102
102
|
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
|
|
103
103
|
}
|
|
104
104
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# UltraModern Agent Contract
|
|
2
2
|
|
|
3
3
|
This workspace is generated as an agent-ready UltraModern.js SuperApp shell.
|
|
4
|
-
|
|
4
|
+
Codex should treat the files under `.codex/skills` as local project
|
|
5
5
|
instructions, not optional reading.
|
|
6
6
|
|
|
7
7
|
## Quality Gates
|
|
@@ -19,7 +19,7 @@ baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
|
19
19
|
- `pnpm check` is a local convenience aggregate for the primitive gates.
|
|
20
20
|
- Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
|
|
21
21
|
- Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
|
|
22
|
-
- `postinstall` formats the generated tree and installs `lefthook`. It never
|
|
22
|
+
- `postinstall` formats the generated tree, installs/updates pinned Codex skills, and installs `lefthook`. It never installs system packages. Clone-backed public skills are attempted by default; offline clone failures are advisory. Reference repos remain an explicit `pnpm agents:refs:install` step. Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
|
|
23
23
|
|
|
24
24
|
## Localized Routes
|
|
25
25
|
|
|
@@ -48,7 +48,13 @@ Use these skills when the task touches the matching subsystem:
|
|
|
48
48
|
- `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
|
|
49
49
|
- `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Skill bodies are lockfile-pinned in `.codex/skills-lock.json` and installed
|
|
52
|
+
into the repo-owned `.codex/skills` directory by default. The installer updates
|
|
53
|
+
only pinned skill directories and preserves unrelated user skills already
|
|
54
|
+
present under `.codex/skills`. Set `ULTRAMODERN_SKIP_CODEX_SKILLS=1` or
|
|
55
|
+
`ULTRAMODERN_CODEX_SKILLS=0` to opt out during install. `pnpm skills:check` is
|
|
56
|
+
advisory when local skill bodies are missing so offline CI can still run the
|
|
57
|
+
normal gate.
|
|
52
58
|
|
|
53
59
|
## Private Skills
|
|
54
60
|
|
|
@@ -58,7 +64,7 @@ ScriptedAlchemy/TechsioCZ skills are private and are cloned only when the curren
|
|
|
58
64
|
pnpm skills:install
|
|
59
65
|
```
|
|
60
66
|
|
|
61
|
-
The installer copies only the pinned private skills from `.
|
|
67
|
+
The installer copies only the pinned private skills from `.codex/skills-lock.json`: `plan-graph`, `dag`, `subagent-graph`, `helm`, and `debugger-mode`.
|
|
62
68
|
|
|
63
69
|
## Agent Reference Repositories
|
|
64
70
|
|
|
@@ -85,4 +91,4 @@ Agents may read files under `repos/` to understand upstream patterns, APIs, and
|
|
|
85
91
|
|
|
86
92
|
## Skill Provenance
|
|
87
93
|
|
|
88
|
-
The
|
|
94
|
+
The Rstack skills, public Module Federation skill, and private TechsioCZ skill set are pinned in `.codex/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`.
|
|
@@ -80,11 +80,14 @@ UltraModern.js source lookup using squashed git subtrees) are an explicit
|
|
|
80
80
|
opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
|
|
81
81
|
never clones repositories.
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
Codex skill bodies are lockfile-pinned in `.codex/skills-lock.json` and
|
|
84
|
+
repo-owned under `.codex/skills`. `pnpm install` runs the bootstrap by default:
|
|
85
|
+
vendored pinned skills are copied locally, clone-backed public skills are
|
|
86
|
+
fetched when network access is available, and offline clone failures remain
|
|
87
|
+
advisory. Existing unrelated `.codex/skills/*` directories are preserved. Set
|
|
88
|
+
`ULTRAMODERN_SKIP_CODEX_SKILLS=1` or `ULTRAMODERN_CODEX_SKILLS=0` to opt out.
|
|
89
|
+
`pnpm skills:check` is advisory when local skill bodies are missing so offline
|
|
90
|
+
CI can still run the normal gate.
|
|
88
91
|
|
|
89
92
|
The topology and ownership metadata are generated under `topology/`. The
|
|
90
93
|
workspace also ships `.github/workflows/ultramodern-workspace-gates.yml` and
|
|
@@ -93,12 +96,12 @@ actions, frozen installs, StepSecurity audit-mode runner hardening, dependency
|
|
|
93
96
|
dashboard review, one-day release age, grouped updates, and manual approval for
|
|
94
97
|
major upgrades.
|
|
95
98
|
|
|
96
|
-
Package source
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
Package source provenance is recorded in `.modernjs/ultramodern.json`. The
|
|
100
|
+
default strategy keeps UltraModern.js runtime and tooling packages on
|
|
101
|
+
`workspace:*` for monorepo development. To create a workspace that can install
|
|
102
|
+
those packages outside the monorepo, generate with
|
|
103
|
+
`--ultramodern-package-source install`; generated shared packages still use
|
|
104
|
+
`workspace:*` because they are part of this workspace.
|
|
102
105
|
|
|
103
106
|
## Public URL Environment Variables
|
|
104
107
|
|
|
@@ -151,7 +154,7 @@ pnpm cloudflare:proof -- --require-public-urls
|
|
|
151
154
|
| 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 |
|
|
152
155
|
| Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
|
|
153
156
|
| 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 |
|
|
154
|
-
| Missing public URL | Set the env key
|
|
157
|
+
| Missing public URL | Set the app public URL env key recorded in `.modernjs/ultramodern.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
|
|
155
158
|
| Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
|
|
156
159
|
| 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 |
|
|
157
160
|
| Federation manifest failure | Run the shell and vertical build scripts, then check each deployed `/mf-manifest.json` URL used by the shell. | Module Federation owner |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
diff --git a/dist/cjs/load-matches.cjs b/dist/cjs/load-matches.cjs
|
|
2
|
+
index c09976a80c2c112b7dac6f941e643c81eeaf8d52..ec5156d89e9c5924a9ec0c19aad79711124f9ff4 100644
|
|
3
|
+
--- a/dist/cjs/load-matches.cjs
|
|
4
|
+
+++ b/dist/cjs/load-matches.cjs
|
|
5
|
+
@@ -442,0 +443 @@
|
|
6
|
+
+ if (!match) return;
|
|
7
|
+
@@ -472,0 +474 @@
|
|
8
|
+
+ if (!match) return inner.matches[index];
|
|
9
|
+
@@ -487,0 +490 @@
|
|
10
|
+
+ if (!match) return inner.matches[index];
|
|
11
|
+
@@ -503 +506 @@
|
|
12
|
+
- return inner.router.getMatch(matchId);
|
|
13
|
+
+ return inner.router.getMatch(matchId) ?? inner.matches[index];
|
|
14
|
+
diff --git a/dist/esm/load-matches.js b/dist/esm/load-matches.js
|
|
15
|
+
index bcea2e0d88d037a01b93bf36dd6e643f98028e83..57484bf2825dab47030a1d4f905b9fb2e6067310 100644
|
|
16
|
+
--- a/dist/esm/load-matches.js
|
|
17
|
+
+++ b/dist/esm/load-matches.js
|
|
18
|
+
@@ -442,0 +443 @@
|
|
19
|
+
+ if (!match) return;
|
|
20
|
+
@@ -472,0 +474 @@
|
|
21
|
+
+ if (!match) return inner.matches[index];
|
|
22
|
+
@@ -487,0 +490 @@
|
|
23
|
+
+ if (!match) return inner.matches[index];
|
|
24
|
+
@@ -503 +506 @@
|
|
25
|
+
- return inner.router.getMatch(matchId);
|
|
26
|
+
+ return inner.router.getMatch(matchId) ?? inner.matches[index];
|
|
27
|
+
diff --git a/src/load-matches.ts b/src/load-matches.ts
|
|
28
|
+
index f901a0c97ddf0618dd83229ac260277b46e2676d..76674e01e89ac2cbaba4d776c2be3bf0e3fdb432 100644
|
|
29
|
+
--- a/src/load-matches.ts
|
|
30
|
+
+++ b/src/load-matches.ts
|
|
31
|
+
@@ -838 +838,4 @@
|
|
32
|
+
- const match = inner.router.getMatch(matchId)!
|
|
33
|
+
+ const match = inner.router.getMatch(matchId)
|
|
34
|
+
+ if (!match) {
|
|
35
|
+
+ return
|
|
36
|
+
+ }
|
|
37
|
+
@@ -906 +909,4 @@
|
|
38
|
+
- const match = inner.router.getMatch(matchId)!
|
|
39
|
+
+ const match = inner.router.getMatch(matchId)
|
|
40
|
+
+ if (!match) {
|
|
41
|
+
+ return inner.matches[index]!
|
|
42
|
+
+ }
|
|
43
|
+
@@ -936 +942,4 @@
|
|
44
|
+
- const match = inner.router.getMatch(matchId)!
|
|
45
|
+
+ const match = inner.router.getMatch(matchId)
|
|
46
|
+
+ if (!match) {
|
|
47
|
+
+ return inner.matches[index]!
|
|
48
|
+
+ }
|
|
49
|
+
@@ -955 +964 @@
|
|
50
|
+
- return inner.router.getMatch(matchId)!
|
|
51
|
+
+ return inner.router.getMatch(matchId) ?? inner.matches[index]!
|
|
@@ -14,6 +14,14 @@ minimumReleaseAgeExclude:
|
|
|
14
14
|
- '@typescript/native-preview'
|
|
15
15
|
- '@typescript/native-preview-*'
|
|
16
16
|
- '@types/react'
|
|
17
|
+
- '@rsbuild/core'
|
|
18
|
+
- '@rsbuild/plugin-react'
|
|
19
|
+
- '@rsbuild/plugin-type-check'
|
|
20
|
+
- '@rspack/binding'
|
|
21
|
+
- '@rspack/binding-*'
|
|
22
|
+
- '@rspack/core'
|
|
23
|
+
- '@rspack/plugin-react-refresh'
|
|
24
|
+
- 'ts-checker-rspack-plugin'
|
|
17
25
|
trustPolicy: no-downgrade
|
|
18
26
|
trustPolicyIgnoreAfter: 1440
|
|
19
27
|
blockExoticSubdeps: true
|
|
@@ -33,6 +41,7 @@ peerDependencyRules:
|
|
|
33
41
|
|
|
34
42
|
overrides:
|
|
35
43
|
'@tanstack/react-router': {{tanstackRouterVersion}}
|
|
44
|
+
'@tanstack/router-core': {{tanstackRouterCoreVersion}}
|
|
36
45
|
node-fetch: '{{nodeFetchVersion}}'
|
|
37
46
|
|
|
38
47
|
allowBuilds:
|
|
@@ -43,3 +52,6 @@ allowBuilds:
|
|
|
43
52
|
msgpackr-extract: true
|
|
44
53
|
sharp: true
|
|
45
54
|
workerd: true
|
|
55
|
+
|
|
56
|
+
patchedDependencies:
|
|
57
|
+
'@tanstack/router-core@{{tanstackRouterCoreVersion}}': patches/@tanstack__router-core@{{tanstackRouterCoreVersion}}.patch
|
|
@@ -2,31 +2,51 @@ import { execFileSync } from 'node:child_process';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
|
|
6
7
|
const root = process.cwd();
|
|
7
|
-
const
|
|
8
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const templateWorkspaceDir = path.resolve(scriptDir, '..');
|
|
10
|
+
const vendoredSkillsDir = path.join(templateWorkspaceDir, '.codex/skills');
|
|
11
|
+
const lockPath = path.join(root, '.codex/skills-lock.json');
|
|
8
12
|
const checkOnly = process.argv.includes('--check');
|
|
9
|
-
const force = process.argv.includes('--force');
|
|
10
13
|
const postinstall = process.argv.includes('--postinstall');
|
|
11
14
|
const truthy = value => /^(1|true|yes|on)$/i.test(String(value ?? ''));
|
|
12
15
|
const falsy = value => /^(0|false|no|off)$/i.test(String(value ?? ''));
|
|
13
16
|
const skipRequested =
|
|
14
|
-
truthy(process.env.
|
|
15
|
-
falsy(process.env.
|
|
17
|
+
truthy(process.env.ULTRAMODERN_SKIP_CODEX_SKILLS) ||
|
|
18
|
+
falsy(process.env.ULTRAMODERN_CODEX_SKILLS);
|
|
16
19
|
const cloneTimeoutMs = Number.parseInt(
|
|
17
|
-
process.env.
|
|
20
|
+
process.env.ULTRAMODERN_CODEX_SKILLS_CLONE_TIMEOUT_MS ?? '60000',
|
|
18
21
|
10,
|
|
19
22
|
);
|
|
20
23
|
|
|
21
24
|
const readJson = filePath => JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
22
25
|
|
|
23
|
-
const
|
|
24
|
-
|
|
26
|
+
const commandOverrideEnv = {
|
|
27
|
+
gh: 'ULTRAMODERN_GH_BIN',
|
|
28
|
+
git: 'ULTRAMODERN_GIT_BIN',
|
|
29
|
+
lefthook: 'ULTRAMODERN_LEFTHOOK_BIN',
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const resolveCommand = command => {
|
|
33
|
+
const overrideEnv = commandOverrideEnv[command];
|
|
34
|
+
return overrideEnv ? (process.env[overrideEnv] ?? command) : command;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const requiresCommandShell = command =>
|
|
38
|
+
process.platform === 'win32' && /\.(?:bat|cmd)$/iu.test(command);
|
|
39
|
+
|
|
40
|
+
const run = (command, args, options = {}) => {
|
|
41
|
+
const resolvedCommand = resolveCommand(command);
|
|
42
|
+
return execFileSync(resolvedCommand, args, {
|
|
25
43
|
cwd: options.cwd ?? root,
|
|
26
44
|
encoding: 'utf-8',
|
|
45
|
+
shell: requiresCommandShell(resolvedCommand),
|
|
27
46
|
stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],
|
|
28
47
|
timeout: options.timeout,
|
|
29
48
|
});
|
|
49
|
+
};
|
|
30
50
|
|
|
31
51
|
const commandExists = command => {
|
|
32
52
|
try {
|
|
@@ -43,7 +63,7 @@ const requireGit = () => {
|
|
|
43
63
|
}
|
|
44
64
|
|
|
45
65
|
throw new Error(
|
|
46
|
-
'Git is required to install
|
|
66
|
+
'Git is required to install clone-backed Codex skills. Install git yourself (for example "brew install git" or "sudo apt-get install git") and run pnpm skills:install again. This script never installs system packages on your behalf.',
|
|
47
67
|
);
|
|
48
68
|
};
|
|
49
69
|
|
|
@@ -155,31 +175,42 @@ const resolveSkillDir = (sourceRoot, skillName) => {
|
|
|
155
175
|
};
|
|
156
176
|
|
|
157
177
|
if (!fs.existsSync(lockPath)) {
|
|
158
|
-
console.error('Missing .
|
|
178
|
+
console.error('Missing .codex/skills-lock.json');
|
|
159
179
|
process.exit(1);
|
|
160
180
|
}
|
|
161
181
|
|
|
162
182
|
const lock = readJson(lockPath);
|
|
163
|
-
const installDir = path.join(root, lock.installDir ?? '.
|
|
183
|
+
const installDir = path.join(root, lock.installDir ?? '.codex/skills');
|
|
164
184
|
const sources = lock.sources ?? [];
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
);
|
|
185
|
+
const vendoredSources = sources.filter(source => source.install === 'vendored');
|
|
186
|
+
const cloneSources = sources.filter(source => source.install === 'clone');
|
|
168
187
|
const optionalCloneSources = sources.filter(
|
|
169
188
|
source => source.install === 'clone-if-authorized',
|
|
170
189
|
);
|
|
171
|
-
const
|
|
172
|
-
[...
|
|
173
|
-
(source.baseline ?? []).map(skill => skill.name),
|
|
190
|
+
const explicitSourceSkillNames = new Set(
|
|
191
|
+
[...vendoredSources, ...cloneSources, ...optionalCloneSources].flatMap(
|
|
192
|
+
source => (source.baseline ?? []).map(skill => skill.name),
|
|
174
193
|
),
|
|
175
194
|
);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
195
|
+
const skillsForSource = source =>
|
|
196
|
+
source.baseline ??
|
|
197
|
+
(source.install === 'vendored'
|
|
198
|
+
? (lock.baseline ?? []).filter(
|
|
199
|
+
skill => !explicitSourceSkillNames.has(skill.name),
|
|
200
|
+
)
|
|
201
|
+
: []);
|
|
202
|
+
const lockedSkillNames = (lock.baseline ?? []).map(skill => skill.name);
|
|
203
|
+
const installedSkillNames = () =>
|
|
204
|
+
lockedSkillNames.filter(skillName =>
|
|
205
|
+
fs.existsSync(path.join(installDir, skillName, 'SKILL.md')),
|
|
206
|
+
);
|
|
207
|
+
const missingSkillNames = () =>
|
|
208
|
+
lockedSkillNames.filter(
|
|
209
|
+
skillName => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md')),
|
|
210
|
+
);
|
|
180
211
|
|
|
181
212
|
if (skipRequested) {
|
|
182
|
-
const reason = '
|
|
213
|
+
const reason = 'Codex skills bootstrap skipped by environment';
|
|
183
214
|
if (checkOnly) {
|
|
184
215
|
console.log(reason);
|
|
185
216
|
process.exit(0);
|
|
@@ -190,80 +221,76 @@ if (skipRequested) {
|
|
|
190
221
|
}
|
|
191
222
|
|
|
192
223
|
if (checkOnly) {
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
skillName => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md')),
|
|
197
|
-
);
|
|
198
|
-
const missingCloneInstalled = [
|
|
199
|
-
...requiredCloneSources,
|
|
200
|
-
...optionalCloneSources,
|
|
201
|
-
].flatMap(source =>
|
|
202
|
-
(source.baseline ?? [])
|
|
203
|
-
.map(skill => skill.name)
|
|
204
|
-
.filter(
|
|
205
|
-
skillName =>
|
|
206
|
-
!fs.existsSync(path.join(installDir, skillName, 'SKILL.md')),
|
|
207
|
-
),
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
if (missingVendored.length > 0) {
|
|
211
|
-
console.error(
|
|
212
|
-
`Required agent skills not installed: ${missingVendored.join(', ')}. Run pnpm skills:install.`,
|
|
213
|
-
);
|
|
214
|
-
process.exit(1);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (missingCloneInstalled.length > 0) {
|
|
224
|
+
const missing = missingSkillNames();
|
|
225
|
+
const installed = installedSkillNames();
|
|
226
|
+
if (missing.length > 0) {
|
|
218
227
|
console.log(
|
|
219
|
-
`Advisory:
|
|
228
|
+
`Advisory: pinned Codex skills are not installed: ${missing.join(', ')}. This is expected in offline postinstall runs and fresh check-only CI; run pnpm skills:install when you need local skill bodies.`,
|
|
220
229
|
);
|
|
221
230
|
} else {
|
|
222
|
-
console.log('All pinned
|
|
231
|
+
console.log('All pinned Codex skills are installed.');
|
|
232
|
+
}
|
|
233
|
+
if (installed.length > 0) {
|
|
234
|
+
console.log(`Installed Codex skills: ${installed.join(', ')}.`);
|
|
223
235
|
}
|
|
224
236
|
process.exit(0);
|
|
225
237
|
}
|
|
226
238
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
|
|
239
|
+
fs.mkdirSync(installDir, { recursive: true });
|
|
240
|
+
|
|
241
|
+
const installSkillFromDir = (sourceSkillDir, skillName) => {
|
|
242
|
+
const targetSkillDir = path.join(installDir, skillName);
|
|
243
|
+
if (path.resolve(sourceSkillDir) === path.resolve(targetSkillDir)) {
|
|
244
|
+
console.log(`Pinned Codex skill ${skillName} is already present`);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (fs.existsSync(targetSkillDir)) {
|
|
248
|
+
removeTree(targetSkillDir);
|
|
249
|
+
}
|
|
250
|
+
fs.mkdirSync(path.dirname(targetSkillDir), { recursive: true });
|
|
251
|
+
fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });
|
|
252
|
+
console.log(`Installed Codex skill ${skillName}`);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
for (const source of vendoredSources) {
|
|
256
|
+
for (const skill of skillsForSource(source)) {
|
|
257
|
+
const sourceSkillDir = resolveSkillDir(vendoredSkillsDir, skill.name);
|
|
258
|
+
if (!sourceSkillDir) {
|
|
259
|
+
throw new Error(
|
|
260
|
+
`Vendored Codex skill ${skill.name} not found in ${vendoredSkillsDir}`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
installSkillFromDir(sourceSkillDir, skill.name);
|
|
264
|
+
}
|
|
233
265
|
}
|
|
234
266
|
|
|
235
|
-
|
|
236
|
-
|
|
267
|
+
const cloneInstallSources = postinstall
|
|
268
|
+
? cloneSources
|
|
269
|
+
: [...cloneSources, ...optionalCloneSources];
|
|
237
270
|
|
|
238
|
-
for (const source of
|
|
271
|
+
for (const source of cloneInstallSources) {
|
|
239
272
|
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));
|
|
240
273
|
try {
|
|
241
274
|
try {
|
|
275
|
+
requireGit();
|
|
242
276
|
cloneSource(source, tempDir);
|
|
243
277
|
} catch (error) {
|
|
244
278
|
if (source.install === 'clone-if-authorized' || postinstall) {
|
|
245
|
-
console.warn(
|
|
279
|
+
console.warn(
|
|
280
|
+
`Advisory: unable to install Codex skills from ${source.repository}; ${error.message}. Offline postinstall may continue. Run pnpm skills:install later when network access is available.`,
|
|
281
|
+
);
|
|
246
282
|
continue;
|
|
247
283
|
}
|
|
248
284
|
throw error;
|
|
249
285
|
}
|
|
250
|
-
for (const skill of source
|
|
286
|
+
for (const skill of skillsForSource(source)) {
|
|
251
287
|
const sourceSkillDir = resolveSkillDir(tempDir, skill.name);
|
|
252
288
|
if (!sourceSkillDir) {
|
|
253
289
|
throw new Error(
|
|
254
290
|
`Skill ${skill.name} not found in ${source.repository}`,
|
|
255
291
|
);
|
|
256
292
|
}
|
|
257
|
-
|
|
258
|
-
if (fs.existsSync(targetSkillDir)) {
|
|
259
|
-
if (!force) {
|
|
260
|
-
console.log(`Skipping existing ${skill.name}`);
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
removeTree(targetSkillDir);
|
|
264
|
-
}
|
|
265
|
-
fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });
|
|
266
|
-
console.log(`Installed ${skill.name}`);
|
|
293
|
+
installSkillFromDir(sourceSkillDir, skill.name);
|
|
267
294
|
}
|
|
268
295
|
} finally {
|
|
269
296
|
removeTree(tempDir);
|
|
@@ -7,8 +7,7 @@ interface ShellFrameProps {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export default function ShellFrame({ children }: ShellFrameProps) {
|
|
10
|
-
const {
|
|
11
|
-
const t = i18nInstance['t'].bind(i18nInstance);
|
|
10
|
+
const { language, t } = useModernI18n();
|
|
12
11
|
const { alternates } = useLocalizedLocation();
|
|
13
12
|
|
|
14
13
|
return (
|
|
@@ -104,8 +104,7 @@ const sanitiseJsonLd = (value: RouteJsonLd) =>
|
|
|
104
104
|
JSON.stringify(value).replaceAll('<', '\\u003c');
|
|
105
105
|
|
|
106
106
|
export const UltramodernRouteHead = () => {
|
|
107
|
-
const {
|
|
108
|
-
const t = i18nInstance['t'].bind(i18nInstance);
|
|
107
|
+
const { language, t } = useModernI18n();
|
|
109
108
|
const { canonical, alternates } = useLocalizedLocation();
|
|
110
109
|
const route = resolveRouteMetadata(canonical);
|
|
111
110
|
const title = route === undefined ? appName : t(route.titleKey);
|
|
@@ -116,7 +115,7 @@ export const UltramodernRouteHead = () => {
|
|
|
116
115
|
const jsonLd = route?.jsonLd;
|
|
117
116
|
|
|
118
117
|
return (
|
|
119
|
-
<Helmet htmlAttributes={{ lang:
|
|
118
|
+
<Helmet htmlAttributes={{ lang: language ?? fallbackLanguage }}>
|
|
120
119
|
<title>{title}</title>
|
|
121
120
|
<meta content={description} name="description" />
|
|
122
121
|
<meta content={indexable ? 'index, follow' : 'noindex, nofollow'} name="robots" />
|
|
@@ -140,13 +139,13 @@ export const UltramodernRouteHead = () => {
|
|
|
140
139
|
<meta content={description} property="og:description" />
|
|
141
140
|
<meta content={canonicalUrl} property="og:url" />
|
|
142
141
|
<meta content="website" property="og:type" />
|
|
143
|
-
<meta content={
|
|
142
|
+
<meta content={language ?? fallbackLanguage} property="og:locale" />
|
|
144
143
|
<meta content="summary_large_image" name="twitter:card" />
|
|
145
144
|
<meta content={title} name="twitter:title" />
|
|
146
145
|
<meta content={description} name="twitter:description" />
|
|
147
|
-
{jsonLd
|
|
146
|
+
{jsonLd === undefined ? null : (
|
|
148
147
|
<script type="application/ld+json">{sanitiseJsonLd(jsonLd)}</script>
|
|
149
|
-
)
|
|
148
|
+
)}
|
|
150
149
|
</>
|
|
151
150
|
)}
|
|
152
151
|
</Helmet>
|