@bleedingdev/modern-js-create 3.2.0-ultramodern.7 → 3.2.0-ultramodern.70
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 +120 -22
- package/dist/index.js +4890 -742
- package/dist/types/locale/en.d.ts +3 -0
- package/dist/types/locale/zh.d.ts +3 -0
- package/dist/types/ultramodern-workspace.d.ts +11 -0
- package/package.json +6 -6
- package/template/.agents/skills-lock.json +34 -0
- package/template/.codex/hooks.json +16 -0
- package/template/.github/renovate.json +53 -0
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +34 -10
- package/template/.mise.toml.handlebars +2 -0
- package/template/AGENTS.md +23 -0
- package/template/README.md +60 -34
- package/template/api/effect/index.ts.handlebars +7 -45
- package/template/config/public/locales/cs/translation.json +39 -0
- package/template/config/public/locales/en/translation.json +39 -0
- package/template/lefthook.yml +10 -0
- package/template/modern.config.ts.handlebars +44 -23
- package/template/oxfmt.config.ts +8 -0
- package/template/oxlint.config.ts +12 -0
- package/template/package.json.handlebars +50 -31
- package/template/pnpm-workspace.yaml +19 -0
- package/template/rstest.config.mts +7 -0
- package/template/scripts/bootstrap-agent-skills.mjs +135 -0
- package/template/scripts/check-i18n-strings.mjs +83 -0
- package/template/scripts/validate-ultramodern.mjs.handlebars +439 -17
- package/template/shared/effect/api.ts.handlebars +1 -2
- package/template/src/modern-app-env.d.ts +2 -0
- package/template/src/modern.runtime.ts.handlebars +17 -3
- package/template/src/routes/[lang]/page.tsx.handlebars +212 -0
- package/template/src/routes/index.css.handlebars +14 -3
- package/template/src/routes/layout.tsx.handlebars +2 -1
- package/template/tests/tsconfig.json +7 -0
- package/template/tests/ultramodern.contract.test.ts.handlebars +78 -0
- package/template/tsconfig.json +106 -2
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/skills-lock.json +58 -0
- package/template-workspace/.codex/hooks.json +16 -0
- package/template-workspace/.github/renovate.json +29 -0
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +54 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +2 -0
- package/template-workspace/AGENTS.md +52 -4
- package/template-workspace/README.md.handlebars +33 -10
- package/template-workspace/lefthook.yml +10 -0
- package/template-workspace/oxfmt.config.ts +17 -0
- package/template-workspace/oxlint.config.ts +20 -0
- package/template-workspace/pnpm-workspace.yaml +20 -10
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +163 -0
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +368 -0
- package/template/biome.json +0 -41
- package/template/src/routes/page.tsx.handlebars +0 -119
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -343
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { Helmet } from '@modern-js/runtime/head';
|
|
2
|
+
import { useModernI18n } from '@modern-js/plugin-i18n/runtime';
|
|
3
|
+
import { useLocation } from '{{routerRuntimeImport}}';
|
|
4
|
+
{{#if useEffectBff}}import effectBff from '@api/effect/index';
|
|
5
|
+
import { Effect } from '@modern-js/plugin-bff/effect-client';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
{{/if}}
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
|
|
10
|
+
const fallbackLanguage = 'en';
|
|
11
|
+
const supportedLanguages = ['en', 'cs'] as const;
|
|
12
|
+
type SupportedLanguage = (typeof supportedLanguages)[number];
|
|
13
|
+
|
|
14
|
+
const isSupportedLanguage = (value: string): value is SupportedLanguage =>
|
|
15
|
+
supportedLanguages.includes(value as SupportedLanguage);
|
|
16
|
+
|
|
17
|
+
const stripLanguagePrefix = (pathname: string) => {
|
|
18
|
+
const segments = pathname.split('/').filter(Boolean);
|
|
19
|
+
if (segments.length > 0 && isSupportedLanguage(segments[0] ?? '')) {
|
|
20
|
+
segments.shift();
|
|
21
|
+
}
|
|
22
|
+
return `/${segments.join('/')}`;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const localizedPath = (pathname: string, language: SupportedLanguage) => {
|
|
26
|
+
const pathWithoutLanguage = stripLanguagePrefix(pathname);
|
|
27
|
+
return pathWithoutLanguage === '/' ? `/${language}` : `/${language}${pathWithoutLanguage}`;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const absoluteUrl = (pathname: string) => {
|
|
31
|
+
const origin = ULTRAMODERN_SITE_URL.replace(/\/+$/u, '');
|
|
32
|
+
return `${origin}${pathname}`;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const locationSuffix = (location: { hash?: unknown; search?: unknown; searchStr?: unknown }) => {
|
|
36
|
+
const { hash, search, searchStr } = location;
|
|
37
|
+
let locationSearch = '';
|
|
38
|
+
if (typeof searchStr === 'string') {
|
|
39
|
+
locationSearch = searchStr;
|
|
40
|
+
} else if (typeof search === 'string') {
|
|
41
|
+
locationSearch = search;
|
|
42
|
+
}
|
|
43
|
+
const locationHash = typeof hash === 'string' ? hash : '';
|
|
44
|
+
return `${locationSearch}${locationHash}`;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const Index = () => {
|
|
48
|
+
const { t } = useTranslation();
|
|
49
|
+
const { language } = useModernI18n();
|
|
50
|
+
const location = useLocation();
|
|
51
|
+
const currentLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;
|
|
52
|
+
const canonicalPath = localizedPath(location.pathname, currentLanguage);
|
|
53
|
+
const suffix = locationSuffix(location);
|
|
54
|
+
const languageOptions = supportedLanguages.map((code) => ({
|
|
55
|
+
code,
|
|
56
|
+
href: `${localizedPath(location.pathname, code)}${suffix}`,
|
|
57
|
+
label: t(`home.language.${code}`),
|
|
58
|
+
}));
|
|
59
|
+
{{#if useEffectBff}} const [effectMessage, setEffectMessage] = useState('loading...');
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
let mounted = true;
|
|
63
|
+
Effect.runFork(
|
|
64
|
+
Effect.promise(() => effectBff.client.greetings.hello({})).pipe(
|
|
65
|
+
Effect.tap((data) =>
|
|
66
|
+
Effect.sync(() => {
|
|
67
|
+
if (mounted) {
|
|
68
|
+
setEffectMessage(data.message);
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
),
|
|
73
|
+
);
|
|
74
|
+
return () => {
|
|
75
|
+
mounted = false;
|
|
76
|
+
};
|
|
77
|
+
}, []);
|
|
78
|
+
{{/if}}
|
|
79
|
+
return (
|
|
80
|
+
<div className="container-box">
|
|
81
|
+
<Helmet>
|
|
82
|
+
<link
|
|
83
|
+
rel="icon"
|
|
84
|
+
type="image/x-icon"
|
|
85
|
+
href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
|
|
86
|
+
/>
|
|
87
|
+
<link rel="canonical" href={absoluteUrl(canonicalPath)} />
|
|
88
|
+
{supportedLanguages.map((code) => (
|
|
89
|
+
<link
|
|
90
|
+
href={absoluteUrl(localizedPath(location.pathname, code))}
|
|
91
|
+
hrefLang={code}
|
|
92
|
+
key={code}
|
|
93
|
+
rel="alternate"
|
|
94
|
+
/>
|
|
95
|
+
))}
|
|
96
|
+
<link
|
|
97
|
+
href={absoluteUrl(localizedPath(location.pathname, fallbackLanguage))}
|
|
98
|
+
hrefLang="x-default"
|
|
99
|
+
rel="alternate"
|
|
100
|
+
/>
|
|
101
|
+
</Helmet>
|
|
102
|
+
<main>
|
|
103
|
+
<nav className="language-switcher" aria-label={t('home.language.switcher')}>
|
|
104
|
+
{languageOptions.map((option) => (
|
|
105
|
+
<a
|
|
106
|
+
aria-current={currentLanguage === option.code ? 'page' : undefined}
|
|
107
|
+
href={option.href}
|
|
108
|
+
key={option.code}
|
|
109
|
+
>
|
|
110
|
+
{option.label}
|
|
111
|
+
</a>
|
|
112
|
+
))}
|
|
113
|
+
</nav>
|
|
114
|
+
<div className="title">
|
|
115
|
+
{t('home.title')}
|
|
116
|
+
<img
|
|
117
|
+
alt={t('home.logoAlt')}
|
|
118
|
+
className="logo"
|
|
119
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
|
|
120
|
+
/>
|
|
121
|
+
<p className="name">{t('home.name')}</p>
|
|
122
|
+
</div>
|
|
123
|
+
<p className="description{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
124
|
+
{t('home.description.intro')} <code className="code">presetUltramodern(...)</code>{' '}
|
|
125
|
+
{/* i18n-ignore technical token */}
|
|
126
|
+
{t('home.description.afterPreset')}{' '}
|
|
127
|
+
<code className="code">modern.config.ts</code>
|
|
128
|
+
{/* i18n-ignore technical token */}
|
|
129
|
+
{' '}
|
|
130
|
+
{t('home.description.afterConfig')}{' '}
|
|
131
|
+
<code className="code">pnpm run ultramodern:check</code>
|
|
132
|
+
{/* i18n-ignore technical token */}
|
|
133
|
+
{' '}
|
|
134
|
+
{t('home.description.end')}
|
|
135
|
+
</p>
|
|
136
|
+
{{#if useEffectBff}}
|
|
137
|
+
<p className="description effect-message{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
138
|
+
{t('home.bff.response')} <code className="code">{effectMessage}</code>
|
|
139
|
+
</p>
|
|
140
|
+
{{/if}}
|
|
141
|
+
<div className="grid">
|
|
142
|
+
<a
|
|
143
|
+
href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"
|
|
144
|
+
target="_blank"
|
|
145
|
+
rel="noopener noreferrer"
|
|
146
|
+
className="card"
|
|
147
|
+
>
|
|
148
|
+
<h2>
|
|
149
|
+
{t('home.cards.guide.title')}
|
|
150
|
+
<img
|
|
151
|
+
alt=""
|
|
152
|
+
className="arrow-right"
|
|
153
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
154
|
+
/>
|
|
155
|
+
</h2>
|
|
156
|
+
<p>{t('home.cards.guide.body')}</p>
|
|
157
|
+
</a>
|
|
158
|
+
<a
|
|
159
|
+
href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"
|
|
160
|
+
target="_blank"
|
|
161
|
+
className="card"
|
|
162
|
+
rel="noreferrer"
|
|
163
|
+
>
|
|
164
|
+
<h2>
|
|
165
|
+
{t('home.cards.config.title')}
|
|
166
|
+
<img
|
|
167
|
+
alt=""
|
|
168
|
+
className="arrow-right"
|
|
169
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
170
|
+
/>
|
|
171
|
+
</h2>
|
|
172
|
+
<p>{t('home.cards.config.body')}</p>
|
|
173
|
+
</a>
|
|
174
|
+
<a
|
|
175
|
+
href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"
|
|
176
|
+
target="_blank"
|
|
177
|
+
className="card"
|
|
178
|
+
rel="noreferrer"
|
|
179
|
+
>
|
|
180
|
+
<h2>
|
|
181
|
+
{t('home.cards.gates.title')}
|
|
182
|
+
<img
|
|
183
|
+
alt=""
|
|
184
|
+
className="arrow-right"
|
|
185
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
186
|
+
/>
|
|
187
|
+
</h2>
|
|
188
|
+
<p>{t('home.cards.gates.body')}</p>
|
|
189
|
+
</a>
|
|
190
|
+
<a
|
|
191
|
+
href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"
|
|
192
|
+
target="_blank"
|
|
193
|
+
rel="noopener noreferrer"
|
|
194
|
+
className="card"
|
|
195
|
+
>
|
|
196
|
+
<h2>
|
|
197
|
+
{t('home.cards.bff.title')}
|
|
198
|
+
<img
|
|
199
|
+
alt=""
|
|
200
|
+
className="arrow-right"
|
|
201
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
202
|
+
/>
|
|
203
|
+
</h2>
|
|
204
|
+
<p>{t('home.cards.bff.body')}</p>
|
|
205
|
+
</a>
|
|
206
|
+
</div>
|
|
207
|
+
</main>
|
|
208
|
+
</div>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export default Index;
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
body {
|
|
5
5
|
padding: 0;
|
|
6
6
|
margin: 0;
|
|
7
|
-
font-family:
|
|
7
|
+
font-family:
|
|
8
|
+
PingFang SC,
|
|
9
|
+
Hiragino Sans GB,
|
|
10
|
+
Microsoft YaHei,
|
|
11
|
+
Arial,
|
|
12
|
+
sans-serif;
|
|
8
13
|
background: linear-gradient(to bottom, transparent, #fff) #eceeef;
|
|
9
14
|
}
|
|
10
15
|
|
|
@@ -67,8 +72,14 @@ main {
|
|
|
67
72
|
padding: 0.6rem 0.9rem;
|
|
68
73
|
font-size: 1.05rem;
|
|
69
74
|
font-family:
|
|
70
|
-
Menlo,
|
|
71
|
-
|
|
75
|
+
Menlo,
|
|
76
|
+
Monaco,
|
|
77
|
+
Lucida Console,
|
|
78
|
+
Liberation Mono,
|
|
79
|
+
DejaVu Sans Mono,
|
|
80
|
+
Bitstream Vera Sans Mono,
|
|
81
|
+
Courier New,
|
|
82
|
+
monospace;
|
|
72
83
|
}
|
|
73
84
|
|
|
74
85
|
.container-box .grid {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { describe, expect, test } from '@rstest/core';
|
|
4
|
+
|
|
5
|
+
const root = process.cwd();
|
|
6
|
+
const readText = (relativePath: string) =>
|
|
7
|
+
fs.readFileSync(path.join(root, relativePath), 'utf-8');
|
|
8
|
+
const readJson = <T>(relativePath: string): T =>
|
|
9
|
+
JSON.parse(readText(relativePath)) as T;
|
|
10
|
+
|
|
11
|
+
describe('generated UltraModern contract', () => {
|
|
12
|
+
test('keeps localized route metadata and Rstest wiring', () => {
|
|
13
|
+
expect(fs.existsSync(path.join(root, 'src/routes/[lang]/page.tsx'))).toBe(
|
|
14
|
+
true,
|
|
15
|
+
);
|
|
16
|
+
expect(fs.existsSync(path.join(root, 'src/routes/page.tsx'))).toBe(false);
|
|
17
|
+
expect(fs.existsSync(path.join(root, 'src/routes/layout.tsx'))).toBe(true);
|
|
18
|
+
{{#if enableTailwind}}
|
|
19
|
+
expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(true);
|
|
20
|
+
expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(true);
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{#unless enableTailwind}}
|
|
23
|
+
expect(fs.existsSync(path.join(root, 'postcss.config.mjs'))).toBe(false);
|
|
24
|
+
expect(fs.existsSync(path.join(root, 'tailwind.config.ts'))).toBe(false);
|
|
25
|
+
{{/unless}}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('retains package-source metadata for generated Modern.js packages', () => {
|
|
29
|
+
const packageJson = readJson<{
|
|
30
|
+
dependencies?: Record<string, string>;
|
|
31
|
+
devDependencies?: Record<string, string>;
|
|
32
|
+
modernjs?: {
|
|
33
|
+
packageSource?: {
|
|
34
|
+
config?: string;
|
|
35
|
+
};
|
|
36
|
+
preset?: string;
|
|
37
|
+
};
|
|
38
|
+
}>('package.json');
|
|
39
|
+
const packageSource = readJson<{
|
|
40
|
+
modernPackages?: {
|
|
41
|
+
packages?: string[];
|
|
42
|
+
specifier?: string;
|
|
43
|
+
};
|
|
44
|
+
strategy?: string;
|
|
45
|
+
}>('.modernjs/ultramodern-package-source.json');
|
|
46
|
+
|
|
47
|
+
expect(packageJson.modernjs?.preset).toBe('presetUltramodern');
|
|
48
|
+
expect(packageJson.modernjs?.packageSource?.config).toBe(
|
|
49
|
+
'./.modernjs/ultramodern-package-source.json',
|
|
50
|
+
);
|
|
51
|
+
expect(packageSource.strategy).toMatch(/^(workspace|install)$/u);
|
|
52
|
+
expect(packageSource.modernPackages?.packages).toContain(
|
|
53
|
+
'@modern-js/runtime',
|
|
54
|
+
);
|
|
55
|
+
expect(packageSource.modernPackages?.packages).toContain(
|
|
56
|
+
'@modern-js/app-tools',
|
|
57
|
+
);
|
|
58
|
+
expect(packageSource.modernPackages?.packages).toContain(
|
|
59
|
+
'@modern-js/adapter-rstest',
|
|
60
|
+
);
|
|
61
|
+
expect(packageSource.modernPackages?.specifier).toBeTruthy();
|
|
62
|
+
expect(
|
|
63
|
+
packageJson.devDependencies?.['@modern-js/adapter-rstest'],
|
|
64
|
+
).toBeTruthy();
|
|
65
|
+
{{#if enableTailwind}}
|
|
66
|
+
expect(packageJson.devDependencies?.tailwindcss).toBe('^4.3.0');
|
|
67
|
+
expect(packageJson.devDependencies?.['@tailwindcss/postcss']).toBe(
|
|
68
|
+
'^4.3.0',
|
|
69
|
+
);
|
|
70
|
+
{{/if}}
|
|
71
|
+
{{#unless enableTailwind}}
|
|
72
|
+
expect(packageJson.devDependencies?.tailwindcss).toBeUndefined();
|
|
73
|
+
expect(
|
|
74
|
+
packageJson.devDependencies?.['@tailwindcss/postcss'],
|
|
75
|
+
).toBeUndefined();
|
|
76
|
+
{{/unless}}
|
|
77
|
+
});
|
|
78
|
+
});
|
package/template/tsconfig.json
CHANGED
|
@@ -3,13 +3,117 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"declaration": false,
|
|
5
5
|
"jsx": "preserve",
|
|
6
|
-
"
|
|
6
|
+
"target": "ESNext",
|
|
7
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
8
|
+
"module": "preserve",
|
|
9
|
+
"moduleResolution": "Bundler",
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"allowJs": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUncheckedIndexedAccess": true,
|
|
20
|
+
"exactOptionalPropertyTypes": true,
|
|
21
|
+
"noImplicitOverride": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
24
|
+
"noImplicitReturns": true,
|
|
7
25
|
"paths": {
|
|
8
26
|
"@/*": ["./src/*"],
|
|
9
27
|
"@api/*": ["./api/*"],
|
|
10
28
|
"@shared/*": ["./shared/*"]
|
|
11
29
|
},
|
|
12
|
-
"rootDir": "
|
|
30
|
+
"rootDir": ".",
|
|
31
|
+
"plugins": [
|
|
32
|
+
{
|
|
33
|
+
"name": "@effect/language-service",
|
|
34
|
+
"diagnostics": true,
|
|
35
|
+
"includeSuggestionsInTsc": true,
|
|
36
|
+
"ignoreEffectSuggestionsInTscExitCode": false,
|
|
37
|
+
"ignoreEffectWarningsInTscExitCode": false,
|
|
38
|
+
"ignoreEffectErrorsInTscExitCode": false,
|
|
39
|
+
"skipDisabledOptimization": true,
|
|
40
|
+
"diagnosticSeverity": {
|
|
41
|
+
"anyUnknownInErrorContext": "error",
|
|
42
|
+
"classSelfMismatch": "error",
|
|
43
|
+
"duplicatePackage": "error",
|
|
44
|
+
"effectFnImplicitAny": "error",
|
|
45
|
+
"floatingEffect": "error",
|
|
46
|
+
"genericEffectServices": "error",
|
|
47
|
+
"missingEffectContext": "error",
|
|
48
|
+
"missingEffectError": "error",
|
|
49
|
+
"missingLayerContext": "error",
|
|
50
|
+
"missingReturnYieldStar": "error",
|
|
51
|
+
"missingStarInYieldEffectGen": "error",
|
|
52
|
+
"nonObjectEffectServiceType": "error",
|
|
53
|
+
"outdatedApi": "error",
|
|
54
|
+
"overriddenSchemaConstructor": "error",
|
|
55
|
+
"catchUnfailableEffect": "error",
|
|
56
|
+
"effectFnIife": "error",
|
|
57
|
+
"effectGenUsesAdapter": "error",
|
|
58
|
+
"effectInFailure": "error",
|
|
59
|
+
"effectInVoidSuccess": "error",
|
|
60
|
+
"globalErrorInEffectCatch": "error",
|
|
61
|
+
"globalErrorInEffectFailure": "error",
|
|
62
|
+
"layerMergeAllWithDependencies": "error",
|
|
63
|
+
"lazyPromiseInEffectSync": "error",
|
|
64
|
+
"leakingRequirements": "error",
|
|
65
|
+
"multipleEffectProvide": "error",
|
|
66
|
+
"returnEffectInGen": "error",
|
|
67
|
+
"runEffectInsideEffect": "error",
|
|
68
|
+
"schemaSyncInEffect": "error",
|
|
69
|
+
"scopeInLayerEffect": "error",
|
|
70
|
+
"strictEffectProvide": "error",
|
|
71
|
+
"tryCatchInEffectGen": "error",
|
|
72
|
+
"unknownInEffectCatch": "error",
|
|
73
|
+
"asyncFunction": "error",
|
|
74
|
+
"cryptoRandomUUID": "error",
|
|
75
|
+
"cryptoRandomUUIDInEffect": "error",
|
|
76
|
+
"extendsNativeError": "error",
|
|
77
|
+
"globalConsole": "error",
|
|
78
|
+
"globalConsoleInEffect": "error",
|
|
79
|
+
"globalDate": "error",
|
|
80
|
+
"globalDateInEffect": "error",
|
|
81
|
+
"globalFetch": "error",
|
|
82
|
+
"globalFetchInEffect": "error",
|
|
83
|
+
"globalRandom": "error",
|
|
84
|
+
"globalRandomInEffect": "error",
|
|
85
|
+
"globalTimers": "error",
|
|
86
|
+
"globalTimersInEffect": "error",
|
|
87
|
+
"instanceOfSchema": "error",
|
|
88
|
+
"newPromise": "error",
|
|
89
|
+
"nodeBuiltinImport": "error",
|
|
90
|
+
"preferSchemaOverJson": "error",
|
|
91
|
+
"processEnv": "error",
|
|
92
|
+
"processEnvInEffect": "error",
|
|
93
|
+
"unsafeEffectTypeAssertion": "error",
|
|
94
|
+
"catchAllToMapError": "error",
|
|
95
|
+
"deterministicKeys": "error",
|
|
96
|
+
"effectDoNotation": "error",
|
|
97
|
+
"effectFnOpportunity": "error",
|
|
98
|
+
"effectMapFlatten": "error",
|
|
99
|
+
"effectMapVoid": "error",
|
|
100
|
+
"effectSucceedWithVoid": "error",
|
|
101
|
+
"missedPipeableOpportunity": "error",
|
|
102
|
+
"missingEffectServiceDependency": "error",
|
|
103
|
+
"nestedEffectGenYield": "error",
|
|
104
|
+
"redundantSchemaTagIdentifier": "error",
|
|
105
|
+
"schemaStructWithTag": "error",
|
|
106
|
+
"schemaUnionOfLiterals": "error",
|
|
107
|
+
"serviceNotAsClass": "error",
|
|
108
|
+
"strictBooleanExpressions": "error",
|
|
109
|
+
"unnecessaryArrowBlock": "error",
|
|
110
|
+
"unnecessaryEffectGen": "error",
|
|
111
|
+
"unnecessaryFailYieldableError": "error",
|
|
112
|
+
"unnecessaryPipe": "error",
|
|
113
|
+
"unnecessaryPipeChain": "error"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
13
117
|
},
|
|
14
118
|
"include": ["src", "api", "shared", "config", "modern.config.ts"],
|
|
15
119
|
"exclude": ["**/node_modules"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"defaultEnabled": true,
|
|
4
|
+
"strategy": "git-subtree-squash",
|
|
5
|
+
"installDir": "repos",
|
|
6
|
+
"repositories": [
|
|
7
|
+
{
|
|
8
|
+
"id": "effect",
|
|
9
|
+
"name": "Effect",
|
|
10
|
+
"url": "https://github.com/Effect-TS/effect.git",
|
|
11
|
+
"ref": "main",
|
|
12
|
+
"path": "repos/effect",
|
|
13
|
+
"readOnly": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "ultramodern-js",
|
|
17
|
+
"name": "UltraModern.js",
|
|
18
|
+
"url": "https://github.com/BleedingDev/ultramodern.js.git",
|
|
19
|
+
"ref": "main-ultramodern",
|
|
20
|
+
"path": "repos/ultramodern.js",
|
|
21
|
+
"readOnly": true
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -7,6 +7,59 @@
|
|
|
7
7
|
"licensePath": ".agents/rstackjs-agent-skills-LICENSE"
|
|
8
8
|
},
|
|
9
9
|
"installDir": ".agents/skills",
|
|
10
|
+
"sources": [
|
|
11
|
+
{
|
|
12
|
+
"id": "rstack-agent-skills",
|
|
13
|
+
"visibility": "public",
|
|
14
|
+
"repository": "https://github.com/rstackjs/agent-skills",
|
|
15
|
+
"commit": "61c948b42512e223bad44b83af4080eba48b2677",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"licensePath": ".agents/rstackjs-agent-skills-LICENSE",
|
|
18
|
+
"install": "vendored"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "module-federation-agent-skills",
|
|
22
|
+
"visibility": "public",
|
|
23
|
+
"repository": "https://github.com/module-federation/agent-skills",
|
|
24
|
+
"commit": "07bb5b6c43ad457609e00c081b72d4c42508ec76",
|
|
25
|
+
"install": "clone",
|
|
26
|
+
"baseline": [
|
|
27
|
+
{
|
|
28
|
+
"name": "mf",
|
|
29
|
+
"path": ".agents/skills/mf",
|
|
30
|
+
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "techsiocz-private",
|
|
36
|
+
"visibility": "private",
|
|
37
|
+
"repository": "https://github.com/TechsioCZ/skills",
|
|
38
|
+
"install": "clone-if-authorized",
|
|
39
|
+
"baseline": [
|
|
40
|
+
{
|
|
41
|
+
"name": "plan-graph",
|
|
42
|
+
"reason": "Build and validate DAGs from .plan.md files"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "dag",
|
|
46
|
+
"reason": "Inspect current plan frontiers and blocked lanes"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "subagent-graph",
|
|
50
|
+
"reason": "Design dependency-aware multi-agent launch graphs"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "helm",
|
|
54
|
+
"reason": "Steer already-running multi-agent work"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "debugger-mode",
|
|
58
|
+
"reason": "Run hypothesis-driven debugging with runtime evidence"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
10
63
|
"baseline": [
|
|
11
64
|
{
|
|
12
65
|
"name": "rsbuild-best-practices",
|
|
@@ -42,6 +95,11 @@
|
|
|
42
95
|
"name": "rstest-best-practices",
|
|
43
96
|
"path": ".agents/skills/rstest-best-practices",
|
|
44
97
|
"reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "mf",
|
|
101
|
+
"path": ".agents/skills/mf",
|
|
102
|
+
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
|
|
45
103
|
}
|
|
46
104
|
],
|
|
47
105
|
"excludedByDefault": [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Stop": [
|
|
3
|
+
{
|
|
4
|
+
"command": "pnpm format && pnpm lint:fix && pnpm check",
|
|
5
|
+
"timeout": 600000,
|
|
6
|
+
"statusMessage": "Running UltraModern quality gates"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"SubagentStop": [
|
|
10
|
+
{
|
|
11
|
+
"command": "pnpm format && pnpm lint:fix && pnpm check",
|
|
12
|
+
"timeout": 600000,
|
|
13
|
+
"statusMessage": "Running UltraModern quality gates"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": ["config:recommended", "helpers:pinGitHubActionDigests"],
|
|
4
|
+
"dependencyDashboard": true,
|
|
5
|
+
"minimumReleaseAge": "1 day",
|
|
6
|
+
"prConcurrentLimit": 5,
|
|
7
|
+
"prHourlyLimit": 2,
|
|
8
|
+
"rangeStrategy": "bump",
|
|
9
|
+
"schedule": ["before 5am on monday"],
|
|
10
|
+
"timezone": "Etc/UTC",
|
|
11
|
+
"packageRules": [
|
|
12
|
+
{
|
|
13
|
+
"matchManagers": ["github-actions"],
|
|
14
|
+
"groupName": "github-actions",
|
|
15
|
+
"labels": ["dependencies", "github-actions", "security"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"matchManagers": ["npm"],
|
|
19
|
+
"matchUpdateTypes": ["patch", "minor"],
|
|
20
|
+
"groupName": "npm minor and patch updates",
|
|
21
|
+
"labels": ["dependencies", "npm"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"matchUpdateTypes": ["major"],
|
|
25
|
+
"dependencyDashboardApproval": true,
|
|
26
|
+
"labels": ["dependencies", "major"]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Ultramodern Workspace Gates
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ultramodern-workspace-gates-${{ github.workflow }}-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
ultramodern-workspace-gates:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 30
|
|
25
|
+
steps:
|
|
26
|
+
- name: Harden Runner
|
|
27
|
+
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
28
|
+
with:
|
|
29
|
+
egress-policy: audit
|
|
30
|
+
|
|
31
|
+
- name: Checkout
|
|
32
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
33
|
+
with:
|
|
34
|
+
fetch-depth: 1
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
|
|
37
|
+
- name: Setup Node.js
|
|
38
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
39
|
+
with:
|
|
40
|
+
node-version: 24
|
|
41
|
+
|
|
42
|
+
- name: Setup mise
|
|
43
|
+
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
|
|
44
|
+
|
|
45
|
+
- name: Install Dependencies
|
|
46
|
+
run: mise exec -- pnpm install --frozen-lockfile
|
|
47
|
+
|
|
48
|
+
- name: Validate Ultramodern Workspace Contract
|
|
49
|
+
run: mise exec -- pnpm run ultramodern:check
|
|
50
|
+
|
|
51
|
+
- name: Build Workspace Apps
|
|
52
|
+
env:
|
|
53
|
+
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
54
|
+
run: mise exec -- pnpm build
|