@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.120
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 +146 -74
- package/bin/run.js +0 -0
- package/dist/cjs/create-package-root.cjs +65 -0
- package/dist/cjs/index.cjs +498 -0
- package/dist/cjs/locale/en.cjs +94 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +94 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace.cjs +6797 -0
- package/dist/esm/create-package-root.js +16 -0
- package/dist/esm/index.js +461 -0
- package/dist/esm/locale/en.js +56 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +56 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace.js +6738 -0
- package/dist/esm-node/create-package-root.js +17 -0
- package/dist/esm-node/index.js +462 -0
- package/dist/esm-node/locale/en.js +57 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +57 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace.js +6739 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +7 -7
- package/dist/types/locale/index.d.ts +111 -2
- package/dist/types/locale/zh.d.ts +7 -7
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace.d.ts +12 -3
- package/package.json +33 -15
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/skills-lock.json +19 -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 +70 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +2 -0
- package/template-workspace/AGENTS.md +43 -11
- package/template-workspace/README.md.handlebars +116 -11
- package/template-workspace/lefthook.yml +24 -0
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/pnpm-workspace.yaml +31 -8
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +204 -21
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
- package/dist/index.js +0 -2626
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -30
- package/template/.gitignore.handlebars +0 -30
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -25
- package/template/README.md +0 -79
- package/template/api/effect/index.ts.handlebars +0 -23
- 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/modern.config.ts.handlebars +0 -53
- package/template/oxfmt.config.ts +0 -8
- package/template/oxlint.config.ts +0 -12
- package/template/package.json.handlebars +0 -67
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/scripts/bootstrap-agent-skills.mjs +0 -95
- package/template/scripts/check-i18n-strings.mjs +0 -83
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -178
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -1
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/index.css.handlebars +0 -129
- package/template/src/routes/layout.tsx.handlebars +0 -9
- package/template/src/routes/page.tsx.handlebars +0 -155
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tsconfig.json +0 -120
- package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
const configPath = path.resolve(process.cwd(), 'modern.config.ts');
|
|
5
|
-
const templateManifestPath = path.resolve(process.cwd(), '.modernjs/mv-template-manifest.json');
|
|
6
|
-
|
|
7
|
-
if (!fs.existsSync(configPath)) {
|
|
8
|
-
console.error('modern.config.ts not found');
|
|
9
|
-
process.exit(1);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const content = fs.readFileSync(configPath, 'utf-8');
|
|
13
|
-
const requiredTokens = [
|
|
14
|
-
'presetUltramodern(',
|
|
15
|
-
'appTools()',
|
|
16
|
-
'enableModuleFederationSSR',
|
|
17
|
-
'enableBffRequestId',
|
|
18
|
-
'enableTelemetryExporters',
|
|
19
|
-
'i18nPlugin(',
|
|
20
|
-
];
|
|
21
|
-
const missing = requiredTokens.filter((token) => !content.includes(token));
|
|
22
|
-
|
|
23
|
-
if (missing.length > 0) {
|
|
24
|
-
console.error(`Ultramodern contract check failed. Missing tokens: ${missing.join(', ')}`);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (!fs.existsSync(templateManifestPath)) {
|
|
29
|
-
console.error('.modernjs/mv-template-manifest.json not found');
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const templateManifest = JSON.parse(fs.readFileSync(templateManifestPath, 'utf-8'));
|
|
34
|
-
const requiredDeniedPaths = [
|
|
35
|
-
'.git/**',
|
|
36
|
-
'.github/**',
|
|
37
|
-
'.npmrc',
|
|
38
|
-
'.yarnrc',
|
|
39
|
-
'.env',
|
|
40
|
-
'.env.*',
|
|
41
|
-
'node_modules/**',
|
|
42
|
-
'dist/**',
|
|
43
|
-
];
|
|
44
|
-
const requiredPostMaterialization = [
|
|
45
|
-
'ultramodern-contract-check',
|
|
46
|
-
'dependency-install-with-lifecycle-deny',
|
|
47
|
-
'template-manifest-retained',
|
|
48
|
-
];
|
|
49
|
-
const requiredPaths = [
|
|
50
|
-
'AGENTS.md',
|
|
51
|
-
'.agents/skills-lock.json',
|
|
52
|
-
'oxlint.config.ts',
|
|
53
|
-
'oxfmt.config.ts',
|
|
54
|
-
'scripts/bootstrap-agent-skills.mjs',
|
|
55
|
-
'scripts/check-i18n-strings.mjs',
|
|
56
|
-
'config/public/locales/en/translation.json',
|
|
57
|
-
'config/public/locales/cs/translation.json',
|
|
58
|
-
];
|
|
59
|
-
const manifestErrors = [];
|
|
60
|
-
|
|
61
|
-
for (const requiredPath of requiredPaths) {
|
|
62
|
-
if (!fs.existsSync(path.resolve(process.cwd(), requiredPath))) {
|
|
63
|
-
console.error(`${requiredPath} not found`);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (templateManifest.schemaVersion !== 1) {
|
|
69
|
-
manifestErrors.push('schemaVersion');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (templateManifest.source?.type !== 'builtin') {
|
|
73
|
-
manifestErrors.push('source.type');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (
|
|
77
|
-
!Array.isArray(templateManifest.integrity?.checksums) ||
|
|
78
|
-
!templateManifest.integrity.checksums.some(
|
|
79
|
-
(checksum) =>
|
|
80
|
-
checksum.algorithm === 'sha256' &&
|
|
81
|
-
checksum.scope === 'source-tree' &&
|
|
82
|
-
/^[0-9a-f]{64}$/u.test(checksum.value),
|
|
83
|
-
)
|
|
84
|
-
) {
|
|
85
|
-
manifestErrors.push('integrity.checksums[source-tree]');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
for (const deniedPath of requiredDeniedPaths) {
|
|
89
|
-
if (!templateManifest.materialization?.deniedPaths?.includes(deniedPath)) {
|
|
90
|
-
manifestErrors.push(`materialization.deniedPaths:${deniedPath}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (templateManifest.lifecyclePolicy?.denyByDefault !== true) {
|
|
95
|
-
manifestErrors.push('lifecyclePolicy.denyByDefault');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
for (const token of requiredPostMaterialization) {
|
|
99
|
-
if (!templateManifest.validation?.postMaterializationValidation?.includes(token)) {
|
|
100
|
-
manifestErrors.push(`validation.postMaterializationValidation:${token}`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (manifestErrors.length > 0) {
|
|
105
|
-
console.error(
|
|
106
|
-
`Ultramodern template manifest check failed. Invalid fields: ${manifestErrors.join(', ')}`,
|
|
107
|
-
);
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const packageJson = JSON.parse(
|
|
112
|
-
fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),
|
|
113
|
-
);
|
|
114
|
-
const unresolvedTemplateMarker = String.fromCodePoint(123, 123);
|
|
115
|
-
if (JSON.stringify(packageJson).includes(unresolvedTemplateMarker)) {
|
|
116
|
-
console.error('package.json contains unresolved template markers');
|
|
117
|
-
process.exit(1);
|
|
118
|
-
}
|
|
119
|
-
const skillsLock = JSON.parse(
|
|
120
|
-
fs.readFileSync(path.resolve(process.cwd(), '.agents/skills-lock.json'), 'utf-8'),
|
|
121
|
-
);
|
|
122
|
-
const requiredScripts = {
|
|
123
|
-
format: 'oxfmt .',
|
|
124
|
-
'format:check': 'oxfmt --check .',
|
|
125
|
-
'i18n:check': 'node ./scripts/check-i18n-strings.mjs',
|
|
126
|
-
lint: 'oxlint .',
|
|
127
|
-
'lint:fix': 'oxlint . --fix',
|
|
128
|
-
'skills:check': 'node ./scripts/bootstrap-agent-skills.mjs --check',
|
|
129
|
-
'skills:install': 'node ./scripts/bootstrap-agent-skills.mjs',
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
for (const [scriptName, scriptCommand] of Object.entries(requiredScripts)) {
|
|
133
|
-
if (packageJson.scripts?.[scriptName] !== scriptCommand) {
|
|
134
|
-
console.error(`Missing or invalid package script: ${scriptName}`);
|
|
135
|
-
process.exit(1);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (
|
|
140
|
-
!packageJson.scripts?.typecheck?.includes('effect-tsgo') ||
|
|
141
|
-
!packageJson.scripts.typecheck.includes('get-exe-path')
|
|
142
|
-
) {
|
|
143
|
-
console.error('typecheck must use effect-tsgo as the TypeScript checker');
|
|
144
|
-
process.exit(1);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
for (const dependency of ['@modern-js/plugin-i18n', 'i18next', 'react-i18next']) {
|
|
148
|
-
if (!packageJson.dependencies?.[dependency]) {
|
|
149
|
-
console.error(`Missing dependency: ${dependency}`);
|
|
150
|
-
process.exit(1);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
for (const dependency of [
|
|
155
|
-
'@effect/tsgo',
|
|
156
|
-
'@typescript/native-preview',
|
|
157
|
-
'oxlint',
|
|
158
|
-
'oxfmt',
|
|
159
|
-
'ultracite',
|
|
160
|
-
]) {
|
|
161
|
-
if (!packageJson.devDependencies?.[dependency]) {
|
|
162
|
-
console.error(`Missing devDependency: ${dependency}`);
|
|
163
|
-
process.exit(1);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const privateSource = skillsLock.sources?.find(
|
|
168
|
-
(source) => source.repository === 'https://github.com/TechsioCZ/skills',
|
|
169
|
-
);
|
|
170
|
-
const privateSkills = new Set(privateSource?.baseline?.map((skill) => skill.name));
|
|
171
|
-
for (const skillName of ['plan-graph', 'dag', 'subagent-graph', 'helm', 'debugger-mode']) {
|
|
172
|
-
if (!privateSkills.has(skillName)) {
|
|
173
|
-
console.error(`Missing private skill allowlist entry: ${skillName}`);
|
|
174
|
-
process.exit(1);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
console.log('Ultramodern contract check passed.');
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{{#if useEffectBff}}import {
|
|
2
|
-
HttpApi,
|
|
3
|
-
HttpApiEndpoint,
|
|
4
|
-
HttpApiGroup,
|
|
5
|
-
Schema,
|
|
6
|
-
} from '@modern-js/plugin-bff/effect-client';
|
|
7
|
-
|
|
8
|
-
export const bffEffectApi = HttpApi.make('BffApi').add(
|
|
9
|
-
HttpApiGroup.make('greetings').add(
|
|
10
|
-
HttpApiEndpoint.get('hello', '/effect/hello', {
|
|
11
|
-
success: Schema.Struct({
|
|
12
|
-
message: Schema.String,
|
|
13
|
-
runtime: Schema.Literal('effect'),
|
|
14
|
-
}),
|
|
15
|
-
}),
|
|
16
|
-
),
|
|
17
|
-
);{{/if}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types='@modern-js/app-tools/types' />
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineRuntimeConfig } from '@modern-js/runtime';
|
|
2
|
-
import { createInstance } from 'i18next';
|
|
3
|
-
|
|
4
|
-
const i18nInstance = createInstance();
|
|
5
|
-
|
|
6
|
-
export default defineRuntimeConfig({
|
|
7
|
-
i18n: {
|
|
8
|
-
i18nInstance,
|
|
9
|
-
initOptions: {
|
|
10
|
-
defaultNS: 'translation',
|
|
11
|
-
fallbackLng: 'en',
|
|
12
|
-
interpolation: {
|
|
13
|
-
escapeValue: false,
|
|
14
|
-
},
|
|
15
|
-
ns: ['translation'],
|
|
16
|
-
supportedLngs: ['en', 'cs'],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{{#if isTanstackRouter}} router: {
|
|
20
|
-
framework: 'tanstack',
|
|
21
|
-
},
|
|
22
|
-
{{/if~}}
|
|
23
|
-
});
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
{{#if enableTailwind}}@import 'tailwindcss';
|
|
2
|
-
|
|
3
|
-
{{/if}}html,
|
|
4
|
-
body {
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
font-family:
|
|
8
|
-
PingFang SC,
|
|
9
|
-
Hiragino Sans GB,
|
|
10
|
-
Microsoft YaHei,
|
|
11
|
-
Arial,
|
|
12
|
-
sans-serif;
|
|
13
|
-
background: linear-gradient(to bottom, transparent, #fff) #eceeef;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
p {
|
|
17
|
-
margin: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
* {
|
|
21
|
-
-webkit-font-smoothing: antialiased;
|
|
22
|
-
-moz-osx-font-smoothing: grayscale;
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.container-box {
|
|
27
|
-
min-height: 100vh;
|
|
28
|
-
max-width: 100%;
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
align-items: center;
|
|
33
|
-
padding-top: 10px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
main {
|
|
37
|
-
flex: 1;
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
align-items: center;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.title {
|
|
45
|
-
display: flex;
|
|
46
|
-
margin: 4rem 0 4rem;
|
|
47
|
-
align-items: center;
|
|
48
|
-
font-size: 4rem;
|
|
49
|
-
font-weight: 600;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.logo {
|
|
53
|
-
width: 6rem;
|
|
54
|
-
margin: 7px 0 0 1rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.name {
|
|
58
|
-
color: #4ecaff;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.description {
|
|
62
|
-
text-align: center;
|
|
63
|
-
line-height: 1.5;
|
|
64
|
-
font-size: 1.3rem;
|
|
65
|
-
color: #1b3a42;
|
|
66
|
-
margin-bottom: 5rem;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.code {
|
|
70
|
-
background: #fafafa;
|
|
71
|
-
border-radius: 12px;
|
|
72
|
-
padding: 0.6rem 0.9rem;
|
|
73
|
-
font-size: 1.05rem;
|
|
74
|
-
font-family:
|
|
75
|
-
Menlo,
|
|
76
|
-
Monaco,
|
|
77
|
-
Lucida Console,
|
|
78
|
-
Liberation Mono,
|
|
79
|
-
DejaVu Sans Mono,
|
|
80
|
-
Bitstream Vera Sans Mono,
|
|
81
|
-
Courier New,
|
|
82
|
-
monospace;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.container-box .grid {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
width: 1100px;
|
|
90
|
-
margin-top: 3rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.card {
|
|
94
|
-
padding: 1.5rem;
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
height: 100px;
|
|
99
|
-
color: inherit;
|
|
100
|
-
text-decoration: none;
|
|
101
|
-
transition: 0.15s ease;
|
|
102
|
-
width: 45%;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.card:hover,
|
|
106
|
-
.card:focus {
|
|
107
|
-
transform: scale(1.05);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.card h2 {
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
font-size: 1.5rem;
|
|
114
|
-
margin: 0;
|
|
115
|
-
padding: 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.card p {
|
|
119
|
-
opacity: 0.6;
|
|
120
|
-
font-size: 0.9rem;
|
|
121
|
-
line-height: 1.5;
|
|
122
|
-
margin-top: 1rem;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.arrow-right {
|
|
126
|
-
width: 1.3rem;
|
|
127
|
-
margin-left: 0.5rem;
|
|
128
|
-
margin-top: 3px;
|
|
129
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Helmet } from '@modern-js/runtime/head';
|
|
2
|
-
import { useModernI18n } from '@modern-js/plugin-i18n/runtime';
|
|
3
|
-
{{#if useEffectBff}}import effectBff from '@api/effect/index';
|
|
4
|
-
import { Effect } from '@modern-js/plugin-bff/effect-client';
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
6
|
-
{{/if}}
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import './index.css';
|
|
9
|
-
|
|
10
|
-
const Index = () => {
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
-
const { changeLanguage, language } = useModernI18n();
|
|
13
|
-
const languageOptions = [
|
|
14
|
-
{ code: 'en', label: t('home.language.en') },
|
|
15
|
-
{ code: 'cs', label: t('home.language.cs') },
|
|
16
|
-
];
|
|
17
|
-
{{#if useEffectBff}} const [effectMessage, setEffectMessage] = useState('loading...');
|
|
18
|
-
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
let mounted = true;
|
|
21
|
-
Effect.runFork(
|
|
22
|
-
Effect.promise(() => effectBff.client.greetings.hello({})).pipe(
|
|
23
|
-
Effect.tap((data) =>
|
|
24
|
-
Effect.sync(() => {
|
|
25
|
-
if (mounted) {
|
|
26
|
-
setEffectMessage(data.message);
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
),
|
|
30
|
-
),
|
|
31
|
-
);
|
|
32
|
-
return () => {
|
|
33
|
-
mounted = false;
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
{{/if}}
|
|
37
|
-
return (
|
|
38
|
-
<div className="container-box">
|
|
39
|
-
<Helmet>
|
|
40
|
-
<link
|
|
41
|
-
rel="icon"
|
|
42
|
-
type="image/x-icon"
|
|
43
|
-
href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
|
|
44
|
-
/>
|
|
45
|
-
</Helmet>
|
|
46
|
-
<main>
|
|
47
|
-
<nav className="language-switcher" aria-label={t('home.language.switcher')}>
|
|
48
|
-
{languageOptions.map((option) => (
|
|
49
|
-
<button
|
|
50
|
-
disabled={language === option.code}
|
|
51
|
-
key={option.code}
|
|
52
|
-
onClick={() => void changeLanguage(option.code)}
|
|
53
|
-
type="button"
|
|
54
|
-
>
|
|
55
|
-
{option.label}
|
|
56
|
-
</button>
|
|
57
|
-
))}
|
|
58
|
-
</nav>
|
|
59
|
-
<div className="title">
|
|
60
|
-
{t('home.title')}
|
|
61
|
-
<img
|
|
62
|
-
alt={t('home.logoAlt')}
|
|
63
|
-
className="logo"
|
|
64
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
|
|
65
|
-
/>
|
|
66
|
-
<p className="name">{t('home.name')}</p>
|
|
67
|
-
</div>
|
|
68
|
-
<p className="description{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
69
|
-
{t('home.description.intro')} <code className="code">presetUltramodern(...)</code>{' '}
|
|
70
|
-
{/* i18n-ignore technical token */}
|
|
71
|
-
{t('home.description.afterPreset')}
|
|
72
|
-
<code className="code">modern.config.ts</code>
|
|
73
|
-
{/* i18n-ignore technical token */}
|
|
74
|
-
{t('home.description.afterConfig')}
|
|
75
|
-
<code className="code">pnpm run ultramodern:check</code>
|
|
76
|
-
{/* i18n-ignore technical token */}
|
|
77
|
-
{t('home.description.end')}
|
|
78
|
-
</p>
|
|
79
|
-
{{#if useEffectBff}}
|
|
80
|
-
<p className="description effect-message{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
81
|
-
{t('home.bff.response')} <code className="code">{effectMessage}</code>
|
|
82
|
-
</p>
|
|
83
|
-
{{/if}}
|
|
84
|
-
<div className="grid">
|
|
85
|
-
<a
|
|
86
|
-
href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"
|
|
87
|
-
target="_blank"
|
|
88
|
-
rel="noopener noreferrer"
|
|
89
|
-
className="card"
|
|
90
|
-
>
|
|
91
|
-
<h2>
|
|
92
|
-
{t('home.cards.guide.title')}
|
|
93
|
-
<img
|
|
94
|
-
alt=""
|
|
95
|
-
className="arrow-right"
|
|
96
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
97
|
-
/>
|
|
98
|
-
</h2>
|
|
99
|
-
<p>{t('home.cards.guide.body')}</p>
|
|
100
|
-
</a>
|
|
101
|
-
<a
|
|
102
|
-
href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"
|
|
103
|
-
target="_blank"
|
|
104
|
-
className="card"
|
|
105
|
-
rel="noreferrer"
|
|
106
|
-
>
|
|
107
|
-
<h2>
|
|
108
|
-
{t('home.cards.config.title')}
|
|
109
|
-
<img
|
|
110
|
-
alt=""
|
|
111
|
-
className="arrow-right"
|
|
112
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
113
|
-
/>
|
|
114
|
-
</h2>
|
|
115
|
-
<p>{t('home.cards.config.body')}</p>
|
|
116
|
-
</a>
|
|
117
|
-
<a
|
|
118
|
-
href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"
|
|
119
|
-
target="_blank"
|
|
120
|
-
className="card"
|
|
121
|
-
rel="noreferrer"
|
|
122
|
-
>
|
|
123
|
-
<h2>
|
|
124
|
-
{t('home.cards.gates.title')}
|
|
125
|
-
<img
|
|
126
|
-
alt=""
|
|
127
|
-
className="arrow-right"
|
|
128
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
129
|
-
/>
|
|
130
|
-
</h2>
|
|
131
|
-
<p>{t('home.cards.gates.body')}</p>
|
|
132
|
-
</a>
|
|
133
|
-
<a
|
|
134
|
-
href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"
|
|
135
|
-
target="_blank"
|
|
136
|
-
rel="noopener noreferrer"
|
|
137
|
-
className="card"
|
|
138
|
-
>
|
|
139
|
-
<h2>
|
|
140
|
-
{t('home.cards.bff.title')}
|
|
141
|
-
<img
|
|
142
|
-
alt=""
|
|
143
|
-
className="arrow-right"
|
|
144
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
145
|
-
/>
|
|
146
|
-
</h2>
|
|
147
|
-
<p>{t('home.cards.bff.body')}</p>
|
|
148
|
-
</a>
|
|
149
|
-
</div>
|
|
150
|
-
</main>
|
|
151
|
-
</div>
|
|
152
|
-
);
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export default Index;
|
package/template/tsconfig.json
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@modern-js/tsconfig/base",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": false,
|
|
5
|
-
"jsx": "preserve",
|
|
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,
|
|
25
|
-
"paths": {
|
|
26
|
-
"@/*": ["./src/*"],
|
|
27
|
-
"@api/*": ["./api/*"],
|
|
28
|
-
"@shared/*": ["./shared/*"]
|
|
29
|
-
},
|
|
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
|
-
]
|
|
117
|
-
},
|
|
118
|
-
"include": ["src", "api", "shared", "config", "modern.config.ts"],
|
|
119
|
-
"exclude": ["**/node_modules"]
|
|
120
|
-
}
|