@bleedingdev/modern-js-create 3.2.0-ultramodern.99 → 3.4.0-ultramodern.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -106
- package/bin/run.js +1 -0
- package/dist/cjs/create-package-root.cjs +63 -0
- package/dist/cjs/index.cjs +658 -0
- package/dist/cjs/locale/en.cjs +101 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +101 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +603 -0
- package/dist/cjs/ultramodern-workspace/app-files.cjs +223 -0
- package/dist/cjs/ultramodern-workspace/codesmith.cjs +134 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +837 -0
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +422 -0
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +222 -0
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +952 -0
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +191 -0
- package/dist/cjs/ultramodern-workspace/generation-result.cjs +158 -0
- package/dist/cjs/ultramodern-workspace/index.cjs +51 -0
- package/dist/cjs/ultramodern-workspace/locales.cjs +173 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +487 -0
- package/dist/cjs/ultramodern-workspace/naming.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/overlays.cjs +120 -0
- package/dist/cjs/ultramodern-workspace/package-json.cjs +406 -0
- package/dist/cjs/ultramodern-workspace/package-source.cjs +59 -0
- package/dist/cjs/ultramodern-workspace/policy.cjs +248 -0
- package/dist/cjs/ultramodern-workspace/public-api.cjs +47 -0
- package/dist/cjs/ultramodern-workspace/public-surface.cjs +268 -0
- package/dist/cjs/ultramodern-workspace/routes.cjs +375 -0
- package/dist/cjs/ultramodern-workspace/types.cjs +61 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +154 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +197 -0
- package/dist/esm/create-package-root.js +14 -0
- package/dist/esm/index.js +621 -0
- package/dist/esm/locale/en.js +63 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +63 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +511 -0
- package/dist/esm/ultramodern-workspace/app-files.js +149 -0
- package/dist/esm/ultramodern-workspace/codesmith.js +86 -0
- package/dist/esm/ultramodern-workspace/contracts.js +742 -0
- package/dist/esm/ultramodern-workspace/demo-components.js +363 -0
- package/dist/esm/ultramodern-workspace/descriptors.js +133 -0
- package/dist/esm/ultramodern-workspace/effect-api.js +854 -0
- package/dist/esm/ultramodern-workspace/fs-io.js +90 -0
- package/dist/esm/ultramodern-workspace/generation-result.js +102 -0
- package/dist/esm/ultramodern-workspace/index.js +3 -0
- package/dist/esm/ultramodern-workspace/locales.js +122 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +415 -0
- package/dist/esm/ultramodern-workspace/naming.js +71 -0
- package/dist/esm/ultramodern-workspace/overlays.js +79 -0
- package/dist/esm/ultramodern-workspace/package-json.js +338 -0
- package/dist/esm/ultramodern-workspace/package-source.js +21 -0
- package/dist/esm/ultramodern-workspace/policy.js +183 -0
- package/dist/esm/ultramodern-workspace/public-api.js +2 -0
- package/dist/esm/ultramodern-workspace/public-surface.js +183 -0
- package/dist/esm/ultramodern-workspace/routes.js +280 -0
- package/dist/esm/ultramodern-workspace/types.js +16 -0
- package/dist/esm/ultramodern-workspace/versions.js +36 -0
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +92 -0
- package/dist/esm/ultramodern-workspace/write-workspace.js +143 -0
- package/dist/esm-node/create-package-root.js +15 -0
- package/dist/esm-node/index.js +622 -0
- package/dist/esm-node/locale/en.js +64 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +64 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +512 -0
- package/dist/esm-node/ultramodern-workspace/app-files.js +150 -0
- package/dist/esm-node/ultramodern-workspace/codesmith.js +87 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +743 -0
- package/dist/esm-node/ultramodern-workspace/demo-components.js +364 -0
- package/dist/esm-node/ultramodern-workspace/descriptors.js +134 -0
- package/dist/esm-node/ultramodern-workspace/effect-api.js +855 -0
- package/dist/esm-node/ultramodern-workspace/fs-io.js +91 -0
- package/dist/esm-node/ultramodern-workspace/generation-result.js +103 -0
- package/dist/esm-node/ultramodern-workspace/index.js +4 -0
- package/dist/esm-node/ultramodern-workspace/locales.js +123 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +416 -0
- package/dist/esm-node/ultramodern-workspace/naming.js +72 -0
- package/dist/esm-node/ultramodern-workspace/overlays.js +80 -0
- package/dist/esm-node/ultramodern-workspace/package-json.js +339 -0
- package/dist/esm-node/ultramodern-workspace/package-source.js +22 -0
- package/dist/esm-node/ultramodern-workspace/policy.js +184 -0
- package/dist/esm-node/ultramodern-workspace/public-api.js +3 -0
- package/dist/esm-node/ultramodern-workspace/public-surface.js +184 -0
- package/dist/esm-node/ultramodern-workspace/routes.js +281 -0
- package/dist/esm-node/ultramodern-workspace/types.js +17 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +37 -0
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +93 -0
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +144 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +12 -8
- package/dist/types/locale/index.d.ts +125 -2
- package/dist/types/locale/zh.d.ts +12 -8
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +36 -0
- package/dist/types/ultramodern-workspace/app-files.d.ts +14 -0
- package/dist/types/ultramodern-workspace/codesmith.d.ts +53 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +21 -0
- package/dist/types/ultramodern-workspace/demo-components.d.ts +9 -0
- package/dist/types/ultramodern-workspace/descriptors.d.ts +39 -0
- package/dist/types/ultramodern-workspace/effect-api.d.ts +73 -0
- package/dist/types/ultramodern-workspace/fs-io.d.ts +18 -0
- package/dist/types/ultramodern-workspace/generation-result.d.ts +14 -0
- package/dist/types/ultramodern-workspace/index.d.ts +4 -0
- package/dist/types/ultramodern-workspace/locales.d.ts +183 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +16 -0
- package/dist/types/ultramodern-workspace/naming.d.ts +16 -0
- package/dist/types/ultramodern-workspace/overlays.d.ts +6 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +12 -0
- package/dist/types/ultramodern-workspace/package-source.d.ts +2 -0
- package/dist/types/ultramodern-workspace/policy.d.ts +60 -0
- package/dist/types/ultramodern-workspace/public-api.d.ts +3 -0
- package/dist/types/ultramodern-workspace/public-surface.d.ts +37 -0
- package/dist/types/ultramodern-workspace/routes.d.ts +25 -0
- package/dist/types/ultramodern-workspace/types.d.ts +197 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +40 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +10 -0
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -0
- package/package.json +58 -15
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +23 -10
- package/template-workspace/.mise.toml.handlebars +1 -0
- package/template-workspace/{AGENTS.md → AGENTS.md.handlebars} +20 -9
- package/template-workspace/README.md.handlebars +85 -14
- package/template-workspace/lefthook.yml +18 -4
- package/template-workspace/pnpm-workspace.yaml.handlebars +45 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +69 -75
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +8 -6
- package/templates/app/shell-frame.tsx +49 -0
- package/templates/app/ultramodern-route-head.tsx.handlebars +142 -0
- package/templates/packages/shared-contracts-index.ts +466 -0
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +69 -0
- package/templates/workspace-scripts/check-ultramodern-i18n-boundaries.mjs +9 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +529 -0
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +125 -0
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +851 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.config.mjs +7 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +223 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +986 -0
- package/dist/index.js +0 -6625
- package/dist/types/ultramodern-workspace.d.ts +0 -31
- 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 -105
- package/template/api/effect/index.ts.handlebars +0 -34
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/public/locales/cs/translation.json +0 -39
- package/template/config/public/locales/en/translation.json +0 -39
- package/template/lefthook.yml +0 -10
- package/template/modern.config.ts.handlebars +0 -71
- package/template/oxfmt.config.ts +0 -15
- package/template/oxlint.config.ts +0 -19
- package/template/package.json.handlebars +0 -66
- package/template/pnpm-workspace.yaml +0 -29
- 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 -94
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -538
- 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 -211
- package/template/src/routes/index.css.handlebars +0 -129
- 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 -78
- package/template/tsconfig.json +0 -120
- package/template-workspace/pnpm-workspace.yaml +0 -35
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import type { ResolvedUltramodernPackageSource, UltramodernPackageSourceStrategy } from '../ultramodern-package-source';
|
|
2
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
export type JsonObject = {
|
|
6
|
+
[key: string]: JsonValue;
|
|
7
|
+
};
|
|
8
|
+
export type RouteJsonLd = JsonObject | JsonObject[];
|
|
9
|
+
export declare function sortJsonValue(value: JsonValue): JsonValue;
|
|
10
|
+
export type WorkspaceApp = {
|
|
11
|
+
id: string;
|
|
12
|
+
directory: string;
|
|
13
|
+
packageSuffix: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
kind: 'shell' | 'vertical';
|
|
16
|
+
domain?: string;
|
|
17
|
+
portEnv: string;
|
|
18
|
+
port: number;
|
|
19
|
+
mfName: string;
|
|
20
|
+
exposes?: Record<string, string>;
|
|
21
|
+
effectApi?: WorkspaceEffectApi;
|
|
22
|
+
verticalRefs?: string[];
|
|
23
|
+
ownership: Ownership;
|
|
24
|
+
};
|
|
25
|
+
export type WorkspaceEffectApi = {
|
|
26
|
+
stem: string;
|
|
27
|
+
prefix: string;
|
|
28
|
+
consumedBy: string[];
|
|
29
|
+
};
|
|
30
|
+
export type ResolvedPackageSource = ResolvedUltramodernPackageSource;
|
|
31
|
+
export type Ownership = {
|
|
32
|
+
team: string;
|
|
33
|
+
slack: string;
|
|
34
|
+
pagerDuty: string;
|
|
35
|
+
runbookRef: string;
|
|
36
|
+
adrRef: string;
|
|
37
|
+
blastRadius: {
|
|
38
|
+
tier: string;
|
|
39
|
+
references: string[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare const supportedWorkspaceLanguages: readonly ['en', 'cs'];
|
|
43
|
+
export type SupportedWorkspaceLanguage = (typeof supportedWorkspaceLanguages)[number];
|
|
44
|
+
export type RoutePublicSurface = 'private-app-screen' | 'generated-public-surface' | 'explicit-public-input';
|
|
45
|
+
export type RouteOwnedI18nPath = {
|
|
46
|
+
id: string;
|
|
47
|
+
canonicalPath: string;
|
|
48
|
+
localisedPaths: Record<SupportedWorkspaceLanguage, string>;
|
|
49
|
+
titleKey: string;
|
|
50
|
+
descriptionKey: string;
|
|
51
|
+
ownerAppId: string;
|
|
52
|
+
mfBoundaryId: string;
|
|
53
|
+
namespace: string;
|
|
54
|
+
public: boolean;
|
|
55
|
+
indexable: boolean;
|
|
56
|
+
publicSurface: RoutePublicSurface;
|
|
57
|
+
jsonLd?: RouteJsonLd;
|
|
58
|
+
};
|
|
59
|
+
export type PublicRouteMetadata = {
|
|
60
|
+
canonicalPath: string;
|
|
61
|
+
id: string;
|
|
62
|
+
localisedPaths: Record<SupportedWorkspaceLanguage, string>;
|
|
63
|
+
namespace: string;
|
|
64
|
+
ownerAppId: string;
|
|
65
|
+
titleKey: string;
|
|
66
|
+
descriptionKey: string;
|
|
67
|
+
jsonLd?: RouteJsonLd;
|
|
68
|
+
};
|
|
69
|
+
export type PublicSitemapChangeFrequency = 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
70
|
+
export type PublicSurfaceSitemapFields = {
|
|
71
|
+
lastModified?: string;
|
|
72
|
+
changeFrequency?: PublicSitemapChangeFrequency;
|
|
73
|
+
priority?: number;
|
|
74
|
+
};
|
|
75
|
+
export type UltramodernWorkspaceOptions = {
|
|
76
|
+
targetDir: string;
|
|
77
|
+
packageName: string;
|
|
78
|
+
modernVersion: string;
|
|
79
|
+
enableTailwind?: boolean;
|
|
80
|
+
overlays?: UltramodernCodeSmithOverlay[];
|
|
81
|
+
packageSource?: {
|
|
82
|
+
strategy?: UltramodernPackageSourceStrategy;
|
|
83
|
+
modernPackageVersion?: string;
|
|
84
|
+
registry?: string;
|
|
85
|
+
aliasScope?: string;
|
|
86
|
+
aliasPackageNamePrefix?: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type AddUltramodernVerticalOptions = {
|
|
90
|
+
workspaceRoot: string;
|
|
91
|
+
name: string;
|
|
92
|
+
modernVersion: string;
|
|
93
|
+
enableTailwind?: boolean;
|
|
94
|
+
overlays?: UltramodernCodeSmithOverlay[];
|
|
95
|
+
packageSource?: UltramodernWorkspaceOptions['packageSource'];
|
|
96
|
+
};
|
|
97
|
+
export type UltramodernGenerationOperation = 'workspace' | 'vertical';
|
|
98
|
+
/**
|
|
99
|
+
* Stable public descriptor for an app created by the UltraModern generator.
|
|
100
|
+
* Existing fields keep their meaning across patch/minor releases; new fields
|
|
101
|
+
* may be added as the generator records more contract data.
|
|
102
|
+
*/
|
|
103
|
+
export type UltramodernGeneratedAppDescriptor = {
|
|
104
|
+
id: string;
|
|
105
|
+
directory: string;
|
|
106
|
+
packageName: string;
|
|
107
|
+
packageSuffix: string;
|
|
108
|
+
displayName: string;
|
|
109
|
+
kind: WorkspaceApp['kind'];
|
|
110
|
+
portEnv: string;
|
|
111
|
+
port: number;
|
|
112
|
+
moduleFederationName: string;
|
|
113
|
+
exposes?: Record<string, string>;
|
|
114
|
+
effectApiPrefix?: string;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Stable public warning shape for non-fatal generator decisions.
|
|
118
|
+
*/
|
|
119
|
+
export type UltramodernGenerationWarning = {
|
|
120
|
+
code: string;
|
|
121
|
+
message: string;
|
|
122
|
+
path?: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Stable public result returned by workspace generation and MicroVertical
|
|
126
|
+
* addition. The CLI ignores this object, but automation can use it instead of
|
|
127
|
+
* re-reading the workspace to discover generated paths and integration data.
|
|
128
|
+
*/
|
|
129
|
+
export type UltramodernGenerationResult = {
|
|
130
|
+
operation: UltramodernGenerationOperation;
|
|
131
|
+
workspaceRoot: string;
|
|
132
|
+
packageScope: string;
|
|
133
|
+
packageSource: ResolvedPackageSource;
|
|
134
|
+
createdApps: UltramodernGeneratedAppDescriptor[];
|
|
135
|
+
createdPaths: string[];
|
|
136
|
+
rewrittenPaths: string[];
|
|
137
|
+
assignedPorts: Record<string, number>;
|
|
138
|
+
moduleFederationNames: Record<string, string>;
|
|
139
|
+
effectApiPrefixes: Record<string, string>;
|
|
140
|
+
generatedContractPath: string;
|
|
141
|
+
warnings: UltramodernGenerationWarning[];
|
|
142
|
+
};
|
|
143
|
+
export type UltramodernCodeSmithOverlay = {
|
|
144
|
+
generator: string;
|
|
145
|
+
config?: Record<string, unknown>;
|
|
146
|
+
};
|
|
147
|
+
export type UltramodernCodeSmithOverlayRuntimeConfig = {
|
|
148
|
+
workspaceRoot: string;
|
|
149
|
+
packageScope: string;
|
|
150
|
+
operation: UltramodernGenerationOperation;
|
|
151
|
+
generatedApp?: UltramodernGeneratedAppDescriptor;
|
|
152
|
+
generatedApps: UltramodernGeneratedAppDescriptor[];
|
|
153
|
+
assignedPort?: number;
|
|
154
|
+
assignedPorts: Record<string, number>;
|
|
155
|
+
moduleFederationName?: string;
|
|
156
|
+
moduleFederationNames: Record<string, string>;
|
|
157
|
+
effectApiPrefix?: string;
|
|
158
|
+
effectApiPrefixes: Record<string, string>;
|
|
159
|
+
packageSource: ResolvedPackageSource;
|
|
160
|
+
generationResult: UltramodernGenerationResult;
|
|
161
|
+
};
|
|
162
|
+
export type UltramodernJsonMutation = {
|
|
163
|
+
path: string;
|
|
164
|
+
pointer: string;
|
|
165
|
+
description: string;
|
|
166
|
+
value?: JsonValue;
|
|
167
|
+
};
|
|
168
|
+
export type UltramodernShellDependencyChange = {
|
|
169
|
+
path: string;
|
|
170
|
+
section: 'dependencies' | 'zephyr:dependencies';
|
|
171
|
+
packageName: string;
|
|
172
|
+
version: string;
|
|
173
|
+
};
|
|
174
|
+
export type UltramodernGeneratedContractChange = {
|
|
175
|
+
path: string;
|
|
176
|
+
addedAppIds: string[];
|
|
177
|
+
shellVerticalRefs: string[];
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Stable public dry-run result for MicroVertical addition. It includes the
|
|
181
|
+
* same operation summary as a real add, plus planned JSON mutations and
|
|
182
|
+
* integration metadata that automation can inspect before writing files.
|
|
183
|
+
*/
|
|
184
|
+
export type UltramodernVerticalPlan = UltramodernGenerationResult & {
|
|
185
|
+
dryRun: true;
|
|
186
|
+
selectedPort: number;
|
|
187
|
+
moduleFederationRemote: {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
manifestUrl: string;
|
|
191
|
+
};
|
|
192
|
+
effectApiPrefix?: string;
|
|
193
|
+
jsonMutations: UltramodernJsonMutation[];
|
|
194
|
+
shellDependencyChanges: UltramodernShellDependencyChange[];
|
|
195
|
+
generatedContractChanges: UltramodernGeneratedContractChange[];
|
|
196
|
+
};
|
|
197
|
+
export declare function isRecord(value: unknown): value is Record<string, JsonValue>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every version pin and skill-repo commit hash baked into generated
|
|
3
|
+
* UltraModern workspaces lives here. Values must stay in lockstep with the
|
|
4
|
+
* checked-in templates under templates/ and template-workspace/.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TANSTACK_ROUTER_VERSION = "1.170.16";
|
|
7
|
+
export declare const MODULE_FEDERATION_VERSION = "2.6.0";
|
|
8
|
+
export declare const ZEPHYR_RSPACK_PLUGIN_VERSION = "1.1.1";
|
|
9
|
+
export declare const ZEPHYR_AGENT_VERSION = "1.1.1";
|
|
10
|
+
export declare const WRANGLER_VERSION = "4.102.0";
|
|
11
|
+
export declare const CLOUDFLARE_COMPATIBILITY_DATE = "2026-06-02";
|
|
12
|
+
export declare const TAILWIND_VERSION = "4.3.1";
|
|
13
|
+
export declare const TAILWIND_POSTCSS_VERSION = "4.3.1";
|
|
14
|
+
export declare const POSTCSS_VERSION = "8.5.15";
|
|
15
|
+
export declare const EFFECT_TSGO_VERSION = "0.14.6";
|
|
16
|
+
export declare const TYPESCRIPT_STABLE_VERSION = "6.0.3";
|
|
17
|
+
export declare const TYPESCRIPT_7_VERSION = "7.0.1-rc";
|
|
18
|
+
export declare const TYPESCRIPT_VERSION = "7.0.1-rc";
|
|
19
|
+
export declare const TYPESCRIPT_NATIVE_PREVIEW_VERSION = "7.0.0-dev.20260624.1";
|
|
20
|
+
export declare const OXLINT_VERSION = "1.71.0";
|
|
21
|
+
export declare const OXFMT_VERSION = "0.55.0";
|
|
22
|
+
export declare const ULTRACITE_VERSION = "7.8.3";
|
|
23
|
+
export declare const LEFTHOOK_VERSION = "^2.1.9";
|
|
24
|
+
export declare const I18NEXT_VERSION = "26.3.1";
|
|
25
|
+
export declare const NODE_FETCH_VERSION = "^3.3.2";
|
|
26
|
+
export declare const REACT_VERSION = "^19.2.7";
|
|
27
|
+
export declare const REACT_DOM_VERSION = "^19.2.7";
|
|
28
|
+
export declare const REACT_ROUTER_VERSION = "7.18.0";
|
|
29
|
+
export declare const TYPES_REACT_VERSION = "^19.2.17";
|
|
30
|
+
export declare const TYPES_REACT_DOM_VERSION = "^19.2.3";
|
|
31
|
+
export declare const NODE_VERSION = "26.3.0";
|
|
32
|
+
export declare const PNPM_VERSION = "11.9.0";
|
|
33
|
+
export declare const RSTACK_AGENT_SKILLS_COMMIT = "61c948b42512e223bad44b83af4080eba48b2677";
|
|
34
|
+
export declare const MODULE_FEDERATION_AGENT_SKILLS_COMMIT = "07bb5b6c43ad457609e00c081b72d4c42508ec76";
|
|
35
|
+
export declare const ultramodernWorkspaceVersions: {
|
|
36
|
+
tanstackRouter: string;
|
|
37
|
+
moduleFederation: string;
|
|
38
|
+
tailwind: string;
|
|
39
|
+
tailwindPostcss: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkspaceApp } from './types';
|
|
2
|
+
export declare function createAssertMfTypesScript(remotes?: WorkspaceApp[]): string;
|
|
3
|
+
export declare function createWorkspaceValidationScript(scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): string;
|
|
4
|
+
export declare function createWorkspaceI18nBoundaryValidationScript(): string;
|
|
5
|
+
export declare function createPublicSurfaceAssetsScript(): string;
|
|
6
|
+
export declare function createCloudflareProofHelperScript(): string;
|
|
7
|
+
export declare function createCloudflareVersionProofScript(): string;
|
|
8
|
+
export declare function createPerformanceReadinessConfigScript(): string;
|
|
9
|
+
export declare function createPerformanceReadinessScript(): string;
|
|
10
|
+
export declare function writeGeneratedWorkspaceScripts(targetDir: string, scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedPackageSource, UltramodernGenerationResult, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
|
|
2
|
+
export declare function writeApp(targetDir: string, scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
|
|
3
|
+
export declare function writeSharedPackages(targetDir: string, scope: string): void;
|
|
4
|
+
export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): UltramodernGenerationResult;
|
package/package.json
CHANGED
|
@@ -21,27 +21,69 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.
|
|
24
|
+
"version": "3.4.0-ultramodern.0",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
|
-
"main": "./dist/index.js",
|
|
26
|
+
"main": "./dist/esm-node/index.js",
|
|
27
27
|
"bin": {
|
|
28
|
-
"create": "bin/run.js"
|
|
28
|
+
"create": "bin/run.js",
|
|
29
|
+
"modern-js-create": "bin/run.js"
|
|
30
|
+
},
|
|
31
|
+
"typesVersions": {
|
|
32
|
+
"*": {
|
|
33
|
+
".": [
|
|
34
|
+
"./dist/types/index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"ultramodern-workspace": [
|
|
37
|
+
"./dist/types/ultramodern-workspace/public-api.d.ts"
|
|
38
|
+
],
|
|
39
|
+
"ultramodern-workspace/codesmith": [
|
|
40
|
+
"./dist/types/ultramodern-workspace/codesmith.d.ts"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
29
43
|
},
|
|
30
44
|
"exports": {
|
|
31
|
-
".":
|
|
45
|
+
".": {
|
|
46
|
+
"types": "./dist/types/index.d.ts",
|
|
47
|
+
"node": {
|
|
48
|
+
"import": "./dist/esm-node/index.js",
|
|
49
|
+
"require": "./dist/cjs/index.cjs"
|
|
50
|
+
},
|
|
51
|
+
"default": "./dist/esm-node/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./ultramodern-workspace": {
|
|
54
|
+
"types": "./dist/types/ultramodern-workspace/public-api.d.ts",
|
|
55
|
+
"node": {
|
|
56
|
+
"import": "./dist/esm-node/ultramodern-workspace/public-api.js",
|
|
57
|
+
"require": "./dist/cjs/ultramodern-workspace/public-api.cjs"
|
|
58
|
+
},
|
|
59
|
+
"default": "./dist/esm-node/ultramodern-workspace/public-api.js"
|
|
60
|
+
},
|
|
61
|
+
"./ultramodern-workspace/codesmith": {
|
|
62
|
+
"types": "./dist/types/ultramodern-workspace/codesmith.d.ts",
|
|
63
|
+
"node": {
|
|
64
|
+
"import": "./dist/esm-node/ultramodern-workspace/codesmith.js",
|
|
65
|
+
"require": "./dist/cjs/ultramodern-workspace/codesmith.cjs"
|
|
66
|
+
},
|
|
67
|
+
"default": "./dist/esm-node/ultramodern-workspace/codesmith.js"
|
|
68
|
+
}
|
|
32
69
|
},
|
|
33
70
|
"files": [
|
|
34
|
-
"template",
|
|
35
71
|
"template-workspace",
|
|
72
|
+
"templates",
|
|
36
73
|
"dist",
|
|
37
|
-
"bin
|
|
74
|
+
"bin"
|
|
38
75
|
],
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@modern-js/codesmith": "2.6.9",
|
|
78
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.0"
|
|
79
|
+
},
|
|
39
80
|
"devDependencies": {
|
|
40
|
-
"@rslib/core": "0.
|
|
41
|
-
"@types/node": "^
|
|
42
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
43
|
-
"tsx": "^4.22.
|
|
44
|
-
"
|
|
81
|
+
"@rslib/core": "0.23.0",
|
|
82
|
+
"@types/node": "^26.0.0",
|
|
83
|
+
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
|
84
|
+
"tsx": "^4.22.4",
|
|
85
|
+
"typescript": "^6.0.3",
|
|
86
|
+
"@scripts/rstest-config": "2.66.0"
|
|
45
87
|
},
|
|
46
88
|
"publishConfig": {
|
|
47
89
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -49,11 +91,12 @@
|
|
|
49
91
|
},
|
|
50
92
|
"modern:source": "./src/index.ts",
|
|
51
93
|
"scripts": {
|
|
52
|
-
"build": "rslib build && pnpm -w tsgo:dts \"$PWD\"",
|
|
53
|
-
"dev": "rslib build -w",
|
|
54
|
-
"start": "node ./dist/index.js"
|
|
94
|
+
"build": "rm -rf dist && rslib build -c rslibconfig.mts && pnpm -w tsgo:dts \"$PWD\"",
|
|
95
|
+
"dev": "rslib build -c rslibconfig.mts -w",
|
|
96
|
+
"start": "node ./dist/esm-node/index.js",
|
|
97
|
+
"test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
|
|
55
98
|
},
|
|
56
99
|
"ultramodern": {
|
|
57
|
-
"frameworkVersion": "3.
|
|
100
|
+
"frameworkVersion": "3.4.0-ultramodern.0"
|
|
58
101
|
}
|
|
59
102
|
}
|
|
@@ -11,17 +11,33 @@ defaults:
|
|
|
11
11
|
run:
|
|
12
12
|
shell: bash
|
|
13
13
|
|
|
14
|
-
env:
|
|
15
|
-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
16
|
-
|
|
17
14
|
concurrency:
|
|
18
15
|
group: ultramodern-workspace-gates-${{ github.workflow }}-${{ github.ref }}
|
|
19
16
|
cancel-in-progress: true
|
|
20
17
|
|
|
21
18
|
jobs:
|
|
22
|
-
|
|
19
|
+
workspace-gate:
|
|
20
|
+
name: ${{ matrix.name }}
|
|
23
21
|
runs-on: ubuntu-latest
|
|
24
22
|
timeout-minutes: 30
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
include:
|
|
27
|
+
- name: Format
|
|
28
|
+
command: pnpm format:check
|
|
29
|
+
- name: Lint
|
|
30
|
+
command: pnpm lint
|
|
31
|
+
- name: Typecheck
|
|
32
|
+
command: pnpm typecheck
|
|
33
|
+
- name: Skills
|
|
34
|
+
command: pnpm skills:check
|
|
35
|
+
- name: I18n Boundaries
|
|
36
|
+
command: pnpm i18n:boundaries
|
|
37
|
+
- name: Contract
|
|
38
|
+
command: pnpm contract:check
|
|
39
|
+
- name: Build
|
|
40
|
+
command: pnpm build
|
|
25
41
|
steps:
|
|
26
42
|
- name: Harden Runner
|
|
27
43
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
@@ -37,7 +53,7 @@ jobs:
|
|
|
37
53
|
- name: Setup Node.js
|
|
38
54
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
39
55
|
with:
|
|
40
|
-
node-version:
|
|
56
|
+
node-version: "{{nodeVersion}}"
|
|
41
57
|
|
|
42
58
|
- name: Setup mise
|
|
43
59
|
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
|
|
@@ -45,10 +61,7 @@ jobs:
|
|
|
45
61
|
- name: Install Dependencies
|
|
46
62
|
run: mise exec -- pnpm install --frozen-lockfile
|
|
47
63
|
|
|
48
|
-
- name:
|
|
49
|
-
run: mise exec -- pnpm run ultramodern:check
|
|
50
|
-
|
|
51
|
-
- name: Build Workspace Apps
|
|
64
|
+
- name: Run ${{ matrix.name }}
|
|
52
65
|
env:
|
|
53
66
|
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
54
|
-
run: mise exec --
|
|
67
|
+
run: mise exec -- ${{ matrix.command }}
|
|
@@ -6,12 +6,20 @@ instructions, not optional reading.
|
|
|
6
6
|
|
|
7
7
|
## Quality Gates
|
|
8
8
|
|
|
9
|
+
Generated workspaces target Node `>=26` and pnpm `{{pnpmVersion}}`. Keep
|
|
10
|
+
`packageManager`, `.mise.toml`, generated validation, and CI aligned to that
|
|
11
|
+
baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
12
|
+
|
|
9
13
|
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
10
14
|
- `pnpm format` runs oxfmt.
|
|
11
15
|
- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
|
|
12
|
-
- `pnpm
|
|
16
|
+
- `pnpm i18n:boundaries` verifies workspace source boundaries through `@modern-js/code-tools`.
|
|
17
|
+
- `pnpm contract:check` verifies the generated workspace contract.
|
|
18
|
+
- `pnpm mf:types` verifies Module Federation type outputs after builds.
|
|
19
|
+
- `pnpm check` is a local convenience aggregate for the primitive gates.
|
|
20
|
+
- Generated CI runs primitive gates as separate matrix jobs instead of calling `pnpm check`.
|
|
13
21
|
- Generated Codex stop hooks and subagent-stop hooks run `pnpm format && pnpm lint:fix && pnpm check`.
|
|
14
|
-
- `postinstall` formats the generated tree
|
|
22
|
+
- `postinstall` formats the generated tree and installs `lefthook`. It never clones repositories or installs system packages; agent skill repos and reference repos are explicit opt-in steps (`pnpm skills:install`, `pnpm agents:refs:install`). Generated `lefthook.yml` runs separate format and lint-fix commands on pre-commit; pre-push runs read-only primitive gates in parallel.
|
|
15
23
|
|
|
16
24
|
## Localized Routes
|
|
17
25
|
|
|
@@ -20,9 +28,12 @@ static language links, and canonical plus `hreflang` metadata. A new workspace
|
|
|
20
28
|
starts shell-only; `create <domain> --vertical` adds route-owned metadata,
|
|
21
29
|
localized resources, and Effect BFF surfaces for that domain. Runtime i18n is
|
|
22
30
|
not enabled in the starter because the current React 19 + Module Federation
|
|
23
|
-
streaming SSR stack must render predictably first.
|
|
24
|
-
`MODERN_PUBLIC_SITE_URL`
|
|
25
|
-
|
|
31
|
+
streaming SSR stack must render predictably first. Canonical and hreflang URLs
|
|
32
|
+
use `MODERN_PUBLIC_SITE_URL` only. JS/CSS/static assets use
|
|
33
|
+
`MODERN_ASSET_PREFIX`, then `ULTRAMODERN_ASSET_PREFIX`, then `/`; do not use
|
|
34
|
+
`MODERN_PUBLIC_SITE_URL` or stale public URL aliases as asset-prefix fallbacks.
|
|
35
|
+
Without an asset prefix, builds emit origin-relative asset paths so pages work
|
|
36
|
+
behind tunnels and reverse proxies.
|
|
26
37
|
|
|
27
38
|
## Required Skill Baseline
|
|
28
39
|
|
|
@@ -37,7 +48,7 @@ Use these skills when the task touches the matching subsystem:
|
|
|
37
48
|
- `rstest-best-practices`: Rstest configuration, test writing, mocking, snapshots, coverage, and CI test behavior.
|
|
38
49
|
- `mf`: Module Federation docs, Modern.js integration, DTS/type checks, shared dependency checks, runtime errors, and observability troubleshooting.
|
|
39
50
|
|
|
40
|
-
The public `module-federation/agent-skills` repository is installed
|
|
51
|
+
The public `module-federation/agent-skills` repository is installed only when you explicitly run `pnpm skills:install` (or set `ULTRAMODERN_AGENT_SKILLS=1` before `pnpm install`). Postinstall never clones repositories. `pnpm skills:install` remains strict for required public skills. `pnpm skills:check` fails when a vendored skill is missing and warns when clone-installed skills such as `mf` have not been fetched yet.
|
|
41
52
|
|
|
42
53
|
## Private Skills
|
|
43
54
|
|
|
@@ -51,12 +62,12 @@ The installer copies only the pinned private skills from `.agents/skills-lock.js
|
|
|
51
62
|
|
|
52
63
|
## Agent Reference Repositories
|
|
53
64
|
|
|
54
|
-
The workspace
|
|
65
|
+
The workspace can install read-only source references under `repos/` with the explicit `pnpm agents:refs:install` command using `git subtree add --squash`. These repositories are reference material for coding agents, not application source:
|
|
55
66
|
|
|
56
67
|
- `repos/effect` from `Effect-TS/effect`.
|
|
57
68
|
- `repos/ultramodern.js` from `BleedingDev/ultramodern.js`.
|
|
58
69
|
|
|
59
|
-
Agents may read files under `repos/` to understand upstream patterns, APIs, and project conventions. Do not edit files under `repos/`, import from them, or make production code depend on them.
|
|
70
|
+
Agents may read files under `repos/` to understand upstream patterns, APIs, and project conventions. Do not edit files under `repos/`, import from them, or make production code depend on them. `ULTRAMODERN_SKIP_AGENT_REPOS=1` disables the installer even when invoked explicitly.
|
|
60
71
|
|
|
61
72
|
## Project Priorities
|
|
62
73
|
|
|
@@ -73,4 +84,4 @@ Agents may read files under `repos/` to understand upstream patterns, APIs, and
|
|
|
73
84
|
|
|
74
85
|
## Skill Provenance
|
|
75
86
|
|
|
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`.
|
|
87
|
+
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`.
|
|
@@ -7,8 +7,8 @@ UltraModern.js 3.0 SuperApp surface and starts with an explicit shell:
|
|
|
7
7
|
|
|
8
8
|
- `apps/shell-super-app` owns shell route assembly, Module Federation host
|
|
9
9
|
wiring, shared SSR/i18n runtime setup, and the boundary debugger.
|
|
10
|
-
- `packages/shared-*` provide placeholders for cross-workspace contracts
|
|
11
|
-
design tokens
|
|
10
|
+
- `packages/shared-*` provide placeholders for cross-workspace contracts and
|
|
11
|
+
design tokens.
|
|
12
12
|
- `verticals/*` is intentionally empty until a real business domain is added.
|
|
13
13
|
|
|
14
14
|
Add a full-stack MicroVertical when the product needs one:
|
|
@@ -19,9 +19,36 @@ pnpm dlx @bleedingdev/modern-js-create payments --vertical
|
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Each added vertical owns its UI/routes, browser-safe Module Federation exposes,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
stay out of browser exposes.
|
|
22
|
+
private-first route metadata, localized URLs, public-route opt-ins, CSS prefix,
|
|
23
|
+
Effect BFF handlers, local API contract, and typed client surface. Server
|
|
24
|
+
handlers and Effect client/contract modules stay out of browser exposes.
|
|
25
|
+
|
|
26
|
+
## Private-First Public Surfaces
|
|
27
|
+
|
|
28
|
+
Generated app routes are private and non-indexable by default. Author route
|
|
29
|
+
metadata in colocated `src/routes/**/route.meta.ts` files; the scaffold
|
|
30
|
+
regenerates `src/routes/ultramodern-route-metadata.ts` as a compatibility
|
|
31
|
+
manifest for config, i18n, public head, and public surface contracts. Private
|
|
32
|
+
app, auth, tenant, dashboard, and internal routes publish no discovery output
|
|
33
|
+
unless route metadata explicitly marks them `public && indexable`. The default
|
|
34
|
+
scaffold therefore emits only a disallowing `robots.txt`; sitemap, web
|
|
35
|
+
manifest, `llms.txt`, API catalog, security.txt, and JSON-LD output stay
|
|
36
|
+
omitted until a safe public route or public docs/help/product surface exists.
|
|
37
|
+
Structured data is never inferred automatically. Add `jsonLd` explicitly in
|
|
38
|
+
route metadata for `public && indexable` routes and use
|
|
39
|
+
`src/routes/ultramodern-jsonld.ts` when the route fits the generated `WebPage`,
|
|
40
|
+
`WebApplication`, `SoftwareApplication`, `BreadcrumbList`, `FAQPage`, or
|
|
41
|
+
`Organization` helpers. Private or non-indexable routes emit no JSON-LD even
|
|
42
|
+
when they have localized paths, titles, descriptions, BFF APIs, or Module
|
|
43
|
+
Federation boundaries.
|
|
44
|
+
|
|
45
|
+
Public web artifacts are build/deploy outputs generated into `dist/public` and
|
|
46
|
+
`.output/public`, not hand-authored source files under `config/public`. Dynamic
|
|
47
|
+
public routes can expand sitemap entries through route-owned, Node-safe
|
|
48
|
+
`route.sitemap.mjs` providers beside route metadata. The public-surface
|
|
49
|
+
generator discovers those providers for dynamic public routes and still honors
|
|
50
|
+
explicit `routes.publicSurface.contentSources` entries in the generated
|
|
51
|
+
compatibility manifest.
|
|
25
52
|
|
|
26
53
|
Run the scaffold validator before adding business code and after every
|
|
27
54
|
`--vertical` mutation:
|
|
@@ -33,11 +60,24 @@ pnpm check
|
|
|
33
60
|
pnpm build
|
|
34
61
|
```
|
|
35
62
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
63
|
+
The generated toolchain baseline is Node `>=26` with pnpm `{{pnpmVersion}}`.
|
|
64
|
+
`packageManager`, `.mise.toml`, generated validation, and CI should all agree
|
|
65
|
+
on that baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
66
|
+
|
|
67
|
+
Generated CI does not call the local aggregate. It runs format, lint,
|
|
68
|
+
typecheck, skills, i18n boundary validation, contract validation, and build as
|
|
69
|
+
separate matrix jobs so failures are isolated and parallelizable.
|
|
70
|
+
|
|
71
|
+
Read-only agent reference repositories under `repos/` (Effect and
|
|
72
|
+
UltraModern.js source lookup using squashed git subtrees) are an explicit
|
|
73
|
+
opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
|
|
74
|
+
never clones repositories.
|
|
75
|
+
|
|
76
|
+
Vendored agent skills ship with the scaffold. Clone-installed skills (such as
|
|
77
|
+
the Module Federation `mf` skill) are fetched only when you explicitly run
|
|
78
|
+
`pnpm skills:install`, or when `ULTRAMODERN_AGENT_SKILLS=1` is set during
|
|
79
|
+
`pnpm install`. `pnpm skills:check` warns about missing clone-installed skills
|
|
80
|
+
without failing the gate.
|
|
41
81
|
|
|
42
82
|
The topology and ownership metadata are generated under `topology/`. The
|
|
43
83
|
workspace also ships `.github/workflows/ultramodern-workspace-gates.yml` and
|
|
@@ -53,12 +93,43 @@ development. To create a workspace that can install those packages outside the
|
|
|
53
93
|
monorepo, generate with `--ultramodern-package-source install`; generated shared
|
|
54
94
|
packages still use `workspace:*` because they are part of this workspace.
|
|
55
95
|
|
|
96
|
+
## Public URL Environment Variables
|
|
97
|
+
|
|
98
|
+
This workspace's apps must not bake absolute `http://localhost:<port>` URLs
|
|
99
|
+
into asset configuration. Public URL and asset prefix environment variables
|
|
100
|
+
have distinct roles, and stale aliases should not be carried forward when
|
|
101
|
+
regenerating or updating the workspace.
|
|
102
|
+
|
|
103
|
+
| Variable | Role | Feeds |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| `MODERN_PUBLIC_SITE_URL` | Canonical site origin for public SEO output only | Canonical, hreflang, sitemap `<loc>`, robots `Sitemap:` |
|
|
106
|
+
| `MODERN_ASSET_PREFIX` | Preferred JS/CSS/static asset prefix | Modern/Rspack-emitted asset URLs |
|
|
107
|
+
| `ULTRAMODERN_ASSET_PREFIX` | UltraModern compatibility asset prefix | Modern/Rspack-emitted asset URLs when `MODERN_ASSET_PREFIX` is unset |
|
|
108
|
+
| `ULTRAMODERN_PUBLIC_URL_<APP_ID>` | Per-app deployment/proof URL | Cloudflare proof inputs and Module Federation remote URLs |
|
|
109
|
+
|
|
110
|
+
Asset URLs use this precedence: `MODERN_ASSET_PREFIX` →
|
|
111
|
+
`ULTRAMODERN_ASSET_PREFIX` → origin-relative `/`. `MODERN_PUBLIC_SITE_URL` is
|
|
112
|
+
canonical/SEO-only and must not be used as an asset-prefix fallback.
|
|
113
|
+
SEO output uses `MODERN_PUBLIC_SITE_URL`; if it is unset, generated local and
|
|
114
|
+
preview outputs remain non-public until deployment proof provides explicit
|
|
115
|
+
public URLs.
|
|
116
|
+
|
|
117
|
+
Without public URLs configured, asset paths are origin-relative (`/`), and the
|
|
118
|
+
dev server uses `dev.assetPrefix: '/'` — so apps work through tunnels and
|
|
119
|
+
reverse proxies (ngrok, cloudflared) without triggering Chrome's Local Network
|
|
120
|
+
Access prompt or mixed-content errors. Shell-only workspaces can set
|
|
121
|
+
`MODERN_PUBLIC_SITE_URL` for SEO output without changing where assets load
|
|
122
|
+
from.
|
|
123
|
+
|
|
56
124
|
## Cloudflare Proof
|
|
57
125
|
|
|
58
126
|
Deploy the generated apps, then pass each deployed app's generated public URL
|
|
59
|
-
env key into the proof step.
|
|
60
|
-
|
|
61
|
-
|
|
127
|
+
env key into the proof step. The proof script reads the generated contract and
|
|
128
|
+
checks the live Worker surface, including public-route sitemap/robots
|
|
129
|
+
consistency, preview noindex behavior, unknown-route status, asset headers,
|
|
130
|
+
byte budgets, and public sourcemap exposure. A shell-only workspace only needs
|
|
131
|
+
the shell URL; added verticals use the same `ULTRAMODERN_PUBLIC_URL_<APP_ID>`
|
|
132
|
+
pattern with hyphens converted to underscores and uppercased.
|
|
62
133
|
|
|
63
134
|
```bash
|
|
64
135
|
pnpm cloudflare:deploy
|
|
@@ -72,7 +143,7 @@ pnpm cloudflare:proof -- --require-public-urls
|
|
|
72
143
|
| --- | --- | --- |
|
|
73
144
|
| 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 |
|
|
74
145
|
| Install failure | Check the active Node/pnpm from `mise install`; rerun `pnpm install` after the shell sees the pinned versions. | Toolchain setup |
|
|
75
|
-
| Build failure | Run `pnpm check` before `pnpm build`; fix
|
|
146
|
+
| 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 |
|
|
76
147
|
| Missing public URL | Set the env key from `.modernjs/ultramodern-generated-contract.json`, for example `ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP`. | Deployment operator |
|
|
77
148
|
| Cloudflare credentials | Confirm Wrangler credentials before `pnpm cloudflare:deploy`; local checks do not prove live Worker access. | Deployment operator |
|
|
78
149
|
| 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
|