@bleedingdev/modern-js-create 3.4.0-ultramodern.0 → 3.4.0-ultramodern.2
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 +7 -7
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +18 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +3 -3
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +10 -1
- package/dist/cjs/ultramodern-workspace/package-json.cjs +74 -13
- package/dist/cjs/ultramodern-workspace/versions.cjs +1 -5
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +7 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +3 -7
- package/dist/esm/ultramodern-workspace/add-vertical.js +19 -1
- package/dist/esm/ultramodern-workspace/contracts.js +4 -4
- package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm/ultramodern-workspace/module-federation.js +10 -1
- package/dist/esm/ultramodern-workspace/package-json.js +62 -10
- package/dist/esm/ultramodern-workspace/versions.js +2 -3
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +5 -1
- package/dist/esm/ultramodern-workspace/write-workspace.js +5 -9
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +19 -1
- package/dist/esm-node/ultramodern-workspace/contracts.js +4 -4
- package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm-node/ultramodern-workspace/module-federation.js +10 -1
- package/dist/esm-node/ultramodern-workspace/package-json.js +62 -10
- package/dist/esm-node/ultramodern-workspace/versions.js +2 -3
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +5 -1
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +5 -9
- package/dist/types/ultramodern-workspace/package-json.d.ts +11 -2
- package/dist/types/ultramodern-workspace/versions.d.ts +1 -2
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +1 -0
- package/package.json +4 -4
- package/template-workspace/AGENTS.md.handlebars +2 -1
- package/template-workspace/README.md.handlebars +7 -0
- package/template-workspace/oxfmt.config.ts +3 -1
- package/template-workspace/oxlint.config.ts +3 -1
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +23 -8
- package/templates/app/ultramodern-route-head.tsx.handlebars +20 -8
- package/templates/packages/shared-contracts-index.ts +206 -272
- package/templates/workspace-scripts/ultramodern-typecheck.mjs +197 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +104 -2
|
@@ -68,6 +68,13 @@ Generated CI does not call the local aggregate. It runs format, lint,
|
|
|
68
68
|
typecheck, skills, i18n boundary validation, contract validation, and build as
|
|
69
69
|
separate matrix jobs so failures are isolated and parallelizable.
|
|
70
70
|
|
|
71
|
+
Type checking is TS7-first. `pnpm typecheck` runs
|
|
72
|
+
`scripts/ultramodern-typecheck.mjs` in TS-Go build mode over
|
|
73
|
+
`tsconfig.json` project references, with native-preview `--checkers` and
|
|
74
|
+
`--builders` enabled by default. `@typescript/native-preview` is the TS7 latest
|
|
75
|
+
dev compiler lane. The classic `typescript` package is pinned to latest TS6
|
|
76
|
+
only where compatibility peers or tooling still require it.
|
|
77
|
+
|
|
71
78
|
Read-only agent reference repositories under `repos/` (Effect and
|
|
72
79
|
UltraModern.js source lookup using squashed git subtrees) are an explicit
|
|
73
80
|
opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
|
|
@@ -5,13 +5,15 @@ export default defineConfig({
|
|
|
5
5
|
extends: [ultracite],
|
|
6
6
|
ignorePatterns: [
|
|
7
7
|
'.agents',
|
|
8
|
+
'.output',
|
|
8
9
|
'**/*.json',
|
|
9
10
|
'dist',
|
|
10
11
|
'node_modules',
|
|
11
12
|
'repos/**',
|
|
12
13
|
'.modern',
|
|
13
14
|
'.modernjs',
|
|
14
|
-
'**/
|
|
15
|
+
'**/modern-tanstack/**',
|
|
16
|
+
'**/routeTree.gen.*',
|
|
15
17
|
],
|
|
16
18
|
singleQuote: true,
|
|
17
19
|
});
|
|
@@ -10,11 +10,13 @@ export default defineConfig({
|
|
|
10
10
|
extends: [core, react],
|
|
11
11
|
ignorePatterns: [
|
|
12
12
|
'.agents',
|
|
13
|
+
'.output',
|
|
13
14
|
'dist',
|
|
14
15
|
'node_modules',
|
|
15
16
|
'repos/**',
|
|
16
17
|
'.modern',
|
|
17
18
|
'.modernjs',
|
|
18
|
-
'**/
|
|
19
|
+
'**/modern-tanstack/**',
|
|
20
|
+
'**/routeTree.gen.*',
|
|
19
21
|
],
|
|
20
22
|
});
|
|
@@ -47,17 +47,18 @@ const requireGit = () => {
|
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const gitTopLevel = () => {
|
|
51
51
|
try {
|
|
52
|
-
return run('git', ['rev-parse', '--
|
|
52
|
+
return run('git', ['rev-parse', '--show-toplevel']).trim();
|
|
53
53
|
} catch {
|
|
54
|
-
return
|
|
54
|
+
return undefined;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const initializeGitRepository = () => {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const topLevel = gitTopLevel();
|
|
60
|
+
if (topLevel !== undefined) {
|
|
61
|
+
return path.resolve(topLevel) === root;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
try {
|
|
@@ -66,9 +67,24 @@ const initializeGitRepository = () => {
|
|
|
66
67
|
run('git', ['init'], { stdio: 'inherit' });
|
|
67
68
|
run('git', ['branch', '-M', 'main'], { stdio: 'inherit' });
|
|
68
69
|
}
|
|
70
|
+
return true;
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
const installLefthook = () => {
|
|
74
|
+
if (!commandExists('git')) {
|
|
75
|
+
console.warn(
|
|
76
|
+
'Skipping lefthook hook installation because git is not available. Install git and run lefthook install from the generated workspace root to enable local hooks.',
|
|
77
|
+
);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!initializeGitRepository()) {
|
|
82
|
+
console.log(
|
|
83
|
+
'Skipping lefthook hook installation because this generated workspace is nested inside another Git worktree. Run git init from the generated workspace root before installing hooks if you want workspace-local hooks.',
|
|
84
|
+
);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
72
88
|
try {
|
|
73
89
|
run('lefthook', ['install'], { stdio: 'inherit' });
|
|
74
90
|
} catch (error) {
|
|
@@ -199,8 +215,8 @@ if (checkOnly) {
|
|
|
199
215
|
}
|
|
200
216
|
|
|
201
217
|
if (missingCloneInstalled.length > 0) {
|
|
202
|
-
console.
|
|
203
|
-
`
|
|
218
|
+
console.log(
|
|
219
|
+
`Advisory: clone-installed agent skills are not present: ${missingCloneInstalled.join(', ')}. This is expected in CI, nested generated workspaces, and postinstall-only installs; run pnpm skills:install when you need those skills.`,
|
|
204
220
|
);
|
|
205
221
|
} else {
|
|
206
222
|
console.log('All pinned agent skills are installed.');
|
|
@@ -218,7 +234,6 @@ if (postinstall && !cloneOptIn) {
|
|
|
218
234
|
|
|
219
235
|
fs.mkdirSync(installDir, { recursive: true });
|
|
220
236
|
requireGit();
|
|
221
|
-
initializeGitRepository();
|
|
222
237
|
|
|
223
238
|
for (const source of [...requiredCloneSources, ...optionalCloneSources]) {
|
|
224
239
|
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));
|
|
@@ -9,11 +9,17 @@ const appName = {{appDisplayNameJson}};
|
|
|
9
9
|
const fallbackLanguage = 'en';
|
|
10
10
|
const supportedLanguages = ['en', 'cs'] as const;
|
|
11
11
|
type SupportedLanguage = (typeof supportedLanguages)[number];
|
|
12
|
-
type
|
|
12
|
+
type GeneratedRouteMetadata = (typeof ultramodernRouteMetadata)[number];
|
|
13
|
+
type RouteMetadata = Omit<
|
|
14
|
+
GeneratedRouteMetadata,
|
|
15
|
+
'indexable' | 'jsonLd' | 'public'
|
|
16
|
+
> & {
|
|
17
|
+
readonly indexable: boolean;
|
|
13
18
|
readonly jsonLd?: RouteJsonLd;
|
|
19
|
+
readonly public: boolean;
|
|
14
20
|
};
|
|
15
21
|
|
|
16
|
-
const routeMetadata
|
|
22
|
+
const routeMetadata: readonly RouteMetadata[] = ultramodernRouteMetadata;
|
|
17
23
|
|
|
18
24
|
const isSupportedLanguage = (value: string): value is SupportedLanguage =>
|
|
19
25
|
supportedLanguages.includes(value as SupportedLanguage);
|
|
@@ -84,6 +90,11 @@ const resolveRouteMetadata = (pathname: string) => {
|
|
|
84
90
|
return routeMetadata[0];
|
|
85
91
|
};
|
|
86
92
|
|
|
93
|
+
const isPublicIndexableRoute = (
|
|
94
|
+
route: RouteMetadata | undefined,
|
|
95
|
+
): route is RouteMetadata =>
|
|
96
|
+
route !== undefined && route.public && route.indexable;
|
|
97
|
+
|
|
87
98
|
const absoluteUrl = (pathname: string) => {
|
|
88
99
|
const origin = ULTRAMODERN_SITE_URL.replace(/\/+$/u, '');
|
|
89
100
|
return `${origin}${pathname}`;
|
|
@@ -97,11 +108,12 @@ export const UltramodernRouteHead = () => {
|
|
|
97
108
|
const t = i18nInstance['t'].bind(i18nInstance);
|
|
98
109
|
const { canonical, alternates } = useLocalizedLocation();
|
|
99
110
|
const route = resolveRouteMetadata(canonical);
|
|
100
|
-
const title = route ? t(route.titleKey)
|
|
101
|
-
const description =
|
|
111
|
+
const title = route === undefined ? appName : t(route.titleKey);
|
|
112
|
+
const description =
|
|
113
|
+
route === undefined ? appName : t(route.descriptionKey);
|
|
102
114
|
const canonicalUrl = absoluteUrl(alternates[fallbackLanguage] ?? `/${fallbackLanguage}`);
|
|
103
|
-
const indexable = route
|
|
104
|
-
const jsonLd =
|
|
115
|
+
const indexable = isPublicIndexableRoute(route);
|
|
116
|
+
const jsonLd = route?.jsonLd;
|
|
105
117
|
|
|
106
118
|
return (
|
|
107
119
|
<Helmet htmlAttributes={{ lang: i18nInstance.language ?? fallbackLanguage }}>
|
|
@@ -132,9 +144,9 @@ export const UltramodernRouteHead = () => {
|
|
|
132
144
|
<meta content="summary_large_image" name="twitter:card" />
|
|
133
145
|
<meta content={title} name="twitter:title" />
|
|
134
146
|
<meta content={description} name="twitter:description" />
|
|
135
|
-
{jsonLd
|
|
147
|
+
{jsonLd !== undefined ? (
|
|
136
148
|
<script type="application/ld+json">{sanitiseJsonLd(jsonLd)}</script>
|
|
137
|
-
)}
|
|
149
|
+
) : null}
|
|
138
150
|
</>
|
|
139
151
|
)}
|
|
140
152
|
</Helmet>
|