@bleedingdev/modern-js-create 3.2.0-ultramodern.2 → 3.2.0-ultramodern.21
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 +12 -0
- package/dist/index.js +676 -198
- package/package.json +5 -2
- package/template/.agents/skills-lock.json +34 -0
- package/template/.github/renovate.json +53 -0
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +26 -4
- package/template/AGENTS.md +27 -0
- package/template/README.md +7 -3
- 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/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 +56 -27
- package/template/pnpm-workspace.yaml +24 -0
- package/template/rstest.config.mts +7 -0
- package/template/scripts/bootstrap-agent-skills.mjs +95 -0
- package/template/scripts/check-i18n-strings.mjs +83 -0
- package/template/scripts/validate-ultramodern.mjs.handlebars +350 -16
- 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 +211 -0
- package/template/src/routes/index.css.handlebars +14 -3
- package/template/src/routes/layout.tsx.handlebars +1 -1
- package/template/tests/tsconfig.json +7 -0
- package/template/tests/ultramodern.contract.test.ts +67 -0
- package/template/tsconfig.json +106 -2
- package/template-workspace/.agents/agent-reference-repos.json +24 -0
- package/template-workspace/.agents/rstackjs-agent-skills-LICENSE +21 -0
- package/template-workspace/.agents/skills/rsbuild-best-practices/SKILL.md +57 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/SKILL.md +96 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/command-map.md +113 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/common-analysis-patterns.md +190 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-common.md +88 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-rspack.md +138 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-webpack.md +71 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor.md +39 -0
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/rsdoctor-data-types.md +103 -0
- package/template-workspace/.agents/skills/rslib-best-practices/SKILL.md +58 -0
- package/template-workspace/.agents/skills/rslib-modern-package/SKILL.md +173 -0
- package/template-workspace/.agents/skills/rspack-best-practices/SKILL.md +70 -0
- package/template-workspace/.agents/skills/rspack-tracing/SKILL.md +75 -0
- package/template-workspace/.agents/skills/rspack-tracing/references/bottlenecks.md +47 -0
- package/template-workspace/.agents/skills/rspack-tracing/references/tracing-guide.md +38 -0
- package/template-workspace/.agents/skills/rspack-tracing/scripts/analyze_trace.js +184 -0
- package/template-workspace/.agents/skills/rstest-best-practices/SKILL.md +133 -0
- package/template-workspace/.agents/skills-lock.json +95 -0
- package/template-workspace/.github/renovate.json +29 -0
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +52 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/AGENTS.md +61 -0
- package/template-workspace/README.md.handlebars +11 -1
- package/template-workspace/oxfmt.config.ts +16 -0
- package/template-workspace/oxlint.config.ts +19 -0
- package/template-workspace/pnpm-workspace.yaml +24 -6
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +95 -0
- package/template-workspace/scripts/check-i18n-strings.mjs +83 -0
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +364 -0
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +405 -59
- package/template/biome.json +0 -41
- package/template/src/routes/page.tsx.handlebars +0 -119
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.2.0-ultramodern.
|
|
24
|
+
"version": "3.2.0-ultramodern.21",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^25.8.0",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260516.1",
|
|
43
43
|
"tsx": "^4.22.0",
|
|
44
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
44
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.17"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -52,5 +52,8 @@
|
|
|
52
52
|
"build": "rslib build && pnpm -w tsgo:dts \"$PWD\"",
|
|
53
53
|
"dev": "rslib build -w",
|
|
54
54
|
"start": "node ./dist/index.js"
|
|
55
|
+
},
|
|
56
|
+
"ultramodern": {
|
|
57
|
+
"frameworkVersion": "3.2.0-ultramodern.17"
|
|
55
58
|
}
|
|
56
59
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"installDir": ".agents/skills",
|
|
4
|
+
"sources": [
|
|
5
|
+
{
|
|
6
|
+
"id": "techsiocz-private",
|
|
7
|
+
"visibility": "private",
|
|
8
|
+
"repository": "https://github.com/TechsioCZ/skills",
|
|
9
|
+
"install": "clone-if-authorized",
|
|
10
|
+
"baseline": [
|
|
11
|
+
{
|
|
12
|
+
"name": "plan-graph",
|
|
13
|
+
"reason": "Build and validate DAGs from .plan.md files"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "dag",
|
|
17
|
+
"reason": "Inspect current plan frontiers and blocked lanes"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "subagent-graph",
|
|
21
|
+
"reason": "Design dependency-aware multi-agent launch graphs"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "helm",
|
|
25
|
+
"reason": "Steer already-running multi-agent work"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "debugger-mode",
|
|
29
|
+
"reason": "Run hypothesis-driven debugging with runtime evidence"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": [
|
|
4
|
+
"config:recommended",
|
|
5
|
+
"helpers:pinGitHubActionDigests"
|
|
6
|
+
],
|
|
7
|
+
"dependencyDashboard": true,
|
|
8
|
+
"minimumReleaseAge": "1 day",
|
|
9
|
+
"prConcurrentLimit": 5,
|
|
10
|
+
"prHourlyLimit": 2,
|
|
11
|
+
"rangeStrategy": "bump",
|
|
12
|
+
"schedule": [
|
|
13
|
+
"before 5am on monday"
|
|
14
|
+
],
|
|
15
|
+
"timezone": "Etc/UTC",
|
|
16
|
+
"packageRules": [
|
|
17
|
+
{
|
|
18
|
+
"matchManagers": [
|
|
19
|
+
"github-actions"
|
|
20
|
+
],
|
|
21
|
+
"groupName": "github-actions",
|
|
22
|
+
"labels": [
|
|
23
|
+
"dependencies",
|
|
24
|
+
"github-actions",
|
|
25
|
+
"security"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"matchManagers": [
|
|
30
|
+
"npm"
|
|
31
|
+
],
|
|
32
|
+
"matchUpdateTypes": [
|
|
33
|
+
"patch",
|
|
34
|
+
"minor"
|
|
35
|
+
],
|
|
36
|
+
"groupName": "npm minor and patch updates",
|
|
37
|
+
"labels": [
|
|
38
|
+
"dependencies",
|
|
39
|
+
"npm"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"matchUpdateTypes": [
|
|
44
|
+
"major"
|
|
45
|
+
],
|
|
46
|
+
"dependencyDashboardApproval": true,
|
|
47
|
+
"labels": [
|
|
48
|
+
"dependencies",
|
|
49
|
+
"major"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -4,27 +4,49 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
pull_request:
|
|
6
6
|
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
defaults:
|
|
11
|
+
run:
|
|
12
|
+
shell: bash
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ultramodern-gates-${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
7
18
|
jobs:
|
|
8
19
|
ultramodern-gates:
|
|
9
20
|
runs-on: ubuntu-latest
|
|
21
|
+
timeout-minutes: 20
|
|
10
22
|
steps:
|
|
23
|
+
- name: Harden Runner
|
|
24
|
+
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
25
|
+
with:
|
|
26
|
+
egress-policy: audit
|
|
27
|
+
|
|
11
28
|
- name: Checkout
|
|
12
|
-
uses: actions/checkout@v4
|
|
29
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 1
|
|
32
|
+
persist-credentials: false
|
|
13
33
|
|
|
14
34
|
- name: Setup pnpm
|
|
15
|
-
uses: pnpm/action-setup@v4
|
|
35
|
+
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
|
|
16
36
|
|
|
17
37
|
- name: Setup Node.js
|
|
18
|
-
uses: actions/setup-node@v4
|
|
38
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
19
39
|
with:
|
|
20
40
|
node-version: 20
|
|
21
41
|
cache: pnpm
|
|
22
42
|
|
|
23
43
|
- name: Install Dependencies
|
|
24
|
-
run: pnpm install
|
|
44
|
+
run: pnpm install --frozen-lockfile
|
|
25
45
|
|
|
26
46
|
- name: Validate Ultramodern Contract
|
|
27
47
|
run: pnpm run ultramodern:check
|
|
28
48
|
|
|
29
49
|
- name: Build
|
|
50
|
+
env:
|
|
51
|
+
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
30
52
|
run: pnpm run build
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# UltraModern Agent Contract
|
|
2
|
+
|
|
3
|
+
This project is generated for Codex-first UltraModern.js work.
|
|
4
|
+
|
|
5
|
+
## Quality Gates
|
|
6
|
+
|
|
7
|
+
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
8
|
+
- `pnpm format` runs oxfmt.
|
|
9
|
+
- `pnpm typecheck` runs effect-tsgo as the TypeScript checker.
|
|
10
|
+
- `pnpm i18n:check` rejects hardcoded user-visible JSX text.
|
|
11
|
+
- `pnpm ultramodern:check` verifies the generated contract.
|
|
12
|
+
|
|
13
|
+
## Internationalization
|
|
14
|
+
|
|
15
|
+
Runtime i18n is enabled by default. Agents must put user-visible UI copy in `config/public/locales/<lang>/translation.json` and render it through `react-i18next` or `@modern-js/plugin-i18n/runtime`. Do not add hardcoded JSX text, `aria-label`, `title`, `alt`, or `placeholder` strings unless the value is a non-translatable technical token.
|
|
16
|
+
|
|
17
|
+
Routes are locale-prefixed by default through `localePathRedirect: true`. Keep localized pages under `src/routes/[lang]`, use links for language switching, and preserve canonical plus `hreflang` metadata. Production builds fail unless `MODERN_PUBLIC_SITE_URL` is set, so deployed canonical URLs always use the production origin.
|
|
18
|
+
|
|
19
|
+
## Private Skills
|
|
20
|
+
|
|
21
|
+
Private orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm skills:install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.
|
package/template/README.md
CHANGED
|
@@ -36,9 +36,13 @@ MODERN_BASELINE_ENABLE_BFF_REQUEST_ID=false
|
|
|
36
36
|
MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS=false
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
The generated starter also includes `.github/workflows/ultramodern-gates.yml
|
|
40
|
-
|
|
41
|
-
push and pull request
|
|
39
|
+
The generated starter also includes `.github/workflows/ultramodern-gates.yml`
|
|
40
|
+
and `.github/renovate.json`. The workflow runs `pnpm run ultramodern:check` and
|
|
41
|
+
`pnpm run build` on every push and pull request with read-only permissions,
|
|
42
|
+
commit-pinned actions, frozen installs, and StepSecurity audit-mode runner
|
|
43
|
+
hardening. Renovate is configured for dependency dashboard review, one-day
|
|
44
|
+
release age, grouped updates, action digest pinning, and manual approval for
|
|
45
|
+
major upgrades.
|
|
42
46
|
|
|
43
47
|
## Micro Vertical Workspaces
|
|
44
48
|
|
|
@@ -2,60 +2,22 @@
|
|
|
2
2
|
Effect,
|
|
3
3
|
HttpApiBuilder,
|
|
4
4
|
Layer,
|
|
5
|
-
Schema,
|
|
6
|
-
ServiceMap,
|
|
7
5
|
defineEffectBff,
|
|
8
6
|
} from '@modern-js/plugin-bff/effect-server';
|
|
9
7
|
import { bffEffectApi } from '../../shared/effect/api';
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
'GreetingUnavailableError',
|
|
13
|
-
{
|
|
14
|
-
message: Schema.String,
|
|
15
|
-
},
|
|
16
|
-
) {}
|
|
17
|
-
|
|
18
|
-
class GreetingService extends ServiceMap.Service<GreetingService>()('GreetingService', {
|
|
19
|
-
make: Effect.succeed({
|
|
20
|
-
hello: Effect.fn('GreetingService.hello')(function* () {
|
|
21
|
-
if (Date.now() < 0) {
|
|
22
|
-
return yield* Effect.fail(
|
|
23
|
-
new GreetingUnavailableError({
|
|
24
|
-
message: 'Greeting service is unavailable',
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
message: 'Hello from Effect HttpApi',
|
|
31
|
-
runtime: 'effect' as const,
|
|
32
|
-
};
|
|
33
|
-
}),
|
|
34
|
-
}),
|
|
35
|
-
}) {
|
|
36
|
-
static readonly layer = Layer.effect(this, this.make);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const greetingsLayer = HttpApiBuilder.group(bffEffectApi, 'greetings', handlers =>
|
|
9
|
+
const greetingsLayer = HttpApiBuilder.group(bffEffectApi, 'greetings', (handlers) =>
|
|
40
10
|
handlers.handle('hello', () =>
|
|
41
|
-
|
|
42
|
-
Effect
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
runtime: 'effect' as const,
|
|
46
|
-
}),
|
|
47
|
-
),
|
|
48
|
-
),
|
|
11
|
+
Effect.succeed({
|
|
12
|
+
message: 'Hello from Effect HttpApi',
|
|
13
|
+
runtime: 'effect' as const,
|
|
14
|
+
}),
|
|
49
15
|
),
|
|
50
16
|
);
|
|
51
17
|
|
|
52
|
-
const layer = HttpApiBuilder.layer(bffEffectApi).pipe(
|
|
53
|
-
Layer.provide(greetingsLayer),
|
|
54
|
-
Layer.provide(GreetingService.layer),
|
|
55
|
-
);
|
|
18
|
+
const layer = HttpApiBuilder.layer(bffEffectApi).pipe(Layer.provide(greetingsLayer));
|
|
56
19
|
|
|
57
20
|
export default defineEffectBff({
|
|
58
21
|
api: bffEffectApi,
|
|
59
22
|
layer,
|
|
60
|
-
});
|
|
61
|
-
{{/if}}
|
|
23
|
+
});{{/if}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"bff": {
|
|
4
|
+
"response": "Odpoved Effect HttpApi:"
|
|
5
|
+
},
|
|
6
|
+
"cards": {
|
|
7
|
+
"bff": {
|
|
8
|
+
"body": "Pouzivej Effect jako hlavni BFF cestu, Hono nech jako explicitni zalozni volbu.",
|
|
9
|
+
"title": "BFF + Effect"
|
|
10
|
+
},
|
|
11
|
+
"config": {
|
|
12
|
+
"body": "Upravuj vygenerovane vychozi hodnoty v modern.config.ts.",
|
|
13
|
+
"title": "Konfigurace presetUltramodern"
|
|
14
|
+
},
|
|
15
|
+
"gates": {
|
|
16
|
+
"body": "Starter obsahuje PR workflow pro ultramodern:check a build.",
|
|
17
|
+
"title": "Ultramodern kontroly"
|
|
18
|
+
},
|
|
19
|
+
"guide": {
|
|
20
|
+
"body": "Projdi si verejny preset pripraveny pro MV, TanStack a Effect.",
|
|
21
|
+
"title": "UltraModern.js pruvodce"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"afterConfig": ", udrzuj",
|
|
26
|
+
"afterPreset": "profil. Zacni v",
|
|
27
|
+
"end": "zelene a lad vygenerovany preset jen tam, kde aplikace potrebuje mekci cestu.",
|
|
28
|
+
"intro": "Tento starter prinasi verejny"
|
|
29
|
+
},
|
|
30
|
+
"language": {
|
|
31
|
+
"cs": "Cestina",
|
|
32
|
+
"en": "Anglictina",
|
|
33
|
+
"switcher": "Jazyk"
|
|
34
|
+
},
|
|
35
|
+
"logoAlt": "Logo UltraModern.js",
|
|
36
|
+
"name": "presetUltramodern",
|
|
37
|
+
"title": "UltraModern.js 3.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"bff": {
|
|
4
|
+
"response": "Effect HttpApi response:"
|
|
5
|
+
},
|
|
6
|
+
"cards": {
|
|
7
|
+
"bff": {
|
|
8
|
+
"body": "Keep Effect as the preferred BFF lane while Hono stays an explicit fallback.",
|
|
9
|
+
"title": "BFF + Effect"
|
|
10
|
+
},
|
|
11
|
+
"config": {
|
|
12
|
+
"body": "Tune the generated defaults in modern.config.ts.",
|
|
13
|
+
"title": "Configure presetUltramodern"
|
|
14
|
+
},
|
|
15
|
+
"gates": {
|
|
16
|
+
"body": "The starter includes a PR workflow for ultramodern:check and build.",
|
|
17
|
+
"title": "Ultramodern Gates"
|
|
18
|
+
},
|
|
19
|
+
"guide": {
|
|
20
|
+
"body": "Review the MV-first, TanStack-ready, Effect-ready public preset.",
|
|
21
|
+
"title": "UltraModern.js Guide"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"afterConfig": ", keep",
|
|
26
|
+
"afterPreset": "profile. Start in",
|
|
27
|
+
"end": "green, and tune the generated preset only where your app needs a softer lane.",
|
|
28
|
+
"intro": "This starter ships the public"
|
|
29
|
+
},
|
|
30
|
+
"language": {
|
|
31
|
+
"cs": "Czech",
|
|
32
|
+
"en": "English",
|
|
33
|
+
"switcher": "Language"
|
|
34
|
+
},
|
|
35
|
+
"logoAlt": "UltraModern.js Logo",
|
|
36
|
+
"name": "presetUltramodern",
|
|
37
|
+
"title": "UltraModern.js 3.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,41 +1,62 @@
|
|
|
1
|
+
// @effect-diagnostics nodeBuiltinImport:off processEnv:off
|
|
1
2
|
import { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
{{#if enableBff}}import { bffPlugin } from '@modern-js/plugin-bff';
|
|
4
|
-
{{/if}}
|
|
5
|
+
{{/if}}import { i18nPlugin } from '@modern-js/plugin-i18n';
|
|
6
|
+
{{#if isTanstackRouter}}import { tanstackRouterPlugin } from '@modern-js/plugin-tanstack';
|
|
5
7
|
{{/if}}
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
process.env.MODERN_BASELINE_ENABLE_MF_SSR !== 'false';
|
|
10
|
-
const enableBffRequestId =
|
|
11
|
-
process.env.MODERN_BASELINE_ENABLE_BFF_REQUEST_ID !== 'false';
|
|
8
|
+
const appId = process.env['MODERN_BASELINE_APP_ID'] || path.basename(process.cwd());
|
|
9
|
+
const enableModuleFederationSSR = process.env['MODERN_BASELINE_ENABLE_MF_SSR'] !== 'false';
|
|
10
|
+
const enableBffRequestId = process.env['MODERN_BASELINE_ENABLE_BFF_REQUEST_ID'] !== 'false';
|
|
12
11
|
const enableTelemetryExporters =
|
|
13
|
-
process.env
|
|
14
|
-
const telemetryFailLoudStartup =
|
|
15
|
-
|
|
12
|
+
process.env['MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS'] !== 'false';
|
|
13
|
+
const telemetryFailLoudStartup = process.env['MODERN_TELEMETRY_FAIL_LOUD_STARTUP'] !== 'false';
|
|
14
|
+
const otlpEndpoint = process.env['MODERN_TELEMETRY_OTLP_ENDPOINT'];
|
|
15
|
+
const configuredSiteUrl = process.env['MODERN_PUBLIC_SITE_URL'];
|
|
16
|
+
const hasConfiguredSiteUrl = typeof configuredSiteUrl === 'string' && configuredSiteUrl.length > 0;
|
|
17
|
+
const isProductionBuild =
|
|
18
|
+
process.env['NODE_ENV'] === 'production' || process.argv.includes('build');
|
|
19
|
+
|
|
20
|
+
if (isProductionBuild && !hasConfiguredSiteUrl) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
'MODERN_PUBLIC_SITE_URL must be set for production builds so canonical and hreflang URLs use the deployed origin.',
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const siteUrl = hasConfiguredSiteUrl ? configuredSiteUrl : 'http://localhost:8080';
|
|
27
|
+
const victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];
|
|
16
28
|
|
|
17
29
|
// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html
|
|
18
30
|
export default defineConfig(
|
|
19
31
|
presetUltramodern(
|
|
20
32
|
{
|
|
21
|
-
|
|
33
|
+
{{#if enableBff}} bff: {
|
|
34
|
+
{{#if useEffectBff}} effect: {
|
|
35
|
+
openapi: true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
{{/if}} runtimeFramework: '{{bffRuntime}}',
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
{{/if}} plugins: [
|
|
22
42
|
appTools(),
|
|
43
|
+
i18nPlugin({
|
|
44
|
+
localeDetection: {
|
|
45
|
+
fallbackLanguage: 'en',
|
|
46
|
+
languages: ['en', 'cs'],
|
|
47
|
+
localePathRedirect: true,
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
23
50
|
{{#if isTanstackRouter}}
|
|
24
51
|
tanstackRouterPlugin(),
|
|
25
52
|
{{/if}}{{#if enableBff}}
|
|
26
53
|
bffPlugin(),
|
|
27
|
-
{{/if}}
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
runtimeFramework: '{{bffRuntime}}',
|
|
32
|
-
{{#if useEffectBff}}
|
|
33
|
-
effect: {
|
|
34
|
-
openapi: true,
|
|
54
|
+
{{/if}} ],
|
|
55
|
+
source: {
|
|
56
|
+
globalVars: {
|
|
57
|
+
ULTRAMODERN_SITE_URL: siteUrl,
|
|
35
58
|
},
|
|
36
|
-
{{/if}}
|
|
37
59
|
},
|
|
38
|
-
{{/if}}
|
|
39
60
|
},
|
|
40
61
|
{
|
|
41
62
|
appId,
|
|
@@ -43,8 +64,8 @@ export default defineConfig(
|
|
|
43
64
|
enableModuleFederationSSR,
|
|
44
65
|
enableTelemetryExporters,
|
|
45
66
|
telemetryFailLoudStartup,
|
|
46
|
-
otlpEndpoint:
|
|
47
|
-
victoriaMetricsEndpoint:
|
|
67
|
+
...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),
|
|
68
|
+
...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),
|
|
48
69
|
},
|
|
49
70
|
),
|
|
50
71
|
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
import core from 'ultracite/oxlint/core';
|
|
3
|
+
import react from 'ultracite/oxlint/react';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
env: {
|
|
7
|
+
browser: true,
|
|
8
|
+
node: true,
|
|
9
|
+
},
|
|
10
|
+
extends: [core, react],
|
|
11
|
+
ignorePatterns: ['dist', 'node_modules', '.modern', '.modernjs', '**/routeTree.gen.ts'],
|
|
12
|
+
});
|
|
@@ -1,47 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{packageName}}",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@11.1.2",
|
|
4
7
|
"scripts": {
|
|
5
8
|
"reset": "npx rimraf node_modules ./**/node_modules",
|
|
6
9
|
"dev": "modern dev",
|
|
7
10
|
"build": "modern build",
|
|
8
11
|
"serve": "modern serve",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
12
|
+
"test": "rstest run",
|
|
13
|
+
"typecheck": "node -e \"const fs = require('node:fs'); const { execFileSync, spawnSync } = require('node:child_process'); const bin = execFileSync('effect-tsgo', ['get-exe-path'], { encoding: 'utf8' }).trim(); if (process.platform !== 'win32') fs.chmodSync(bin, 0o755); const result = spawnSync(bin, ['--noEmit', '-p', 'tsconfig.json'], { stdio: 'inherit' }); process.exit(result.status ?? 1);\"",
|
|
14
|
+
"i18n:check": "node ./scripts/check-i18n-strings.mjs",
|
|
15
|
+
{{#unless isSubproject}}
|
|
16
|
+
"skills:install": "node ./scripts/bootstrap-agent-skills.mjs",
|
|
17
|
+
"skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",
|
|
18
|
+
{{/unless}}
|
|
19
|
+
"ultramodern:check": "{{#unless isSubproject}}pnpm format:check && pnpm lint && {{/unless}}pnpm typecheck && pnpm i18n:check && pnpm test{{#unless isSubproject}} && pnpm skills:check{{/unless}} && node ./scripts/validate-ultramodern.mjs"{{#unless isSubproject}},
|
|
20
|
+
"format": "oxfmt .",
|
|
21
|
+
"format:check": "oxfmt --check .",
|
|
22
|
+
"lint": "oxlint .",
|
|
23
|
+
"lint:fix": "oxlint . --fix",
|
|
11
24
|
"prepare": "simple-git-hooks"{{/unless}}
|
|
12
25
|
},
|
|
13
|
-
"engines": {
|
|
14
|
-
"node": ">=20"
|
|
15
|
-
}{{#unless isSubproject}},
|
|
16
|
-
"lint-staged": {
|
|
17
|
-
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
18
|
-
"biome check --files-ignore-unknown=true"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"simple-git-hooks": {
|
|
22
|
-
"pre-commit": "npx lint-staged"
|
|
23
|
-
}{{/unless}},
|
|
24
26
|
"dependencies": {
|
|
25
|
-
"@modern-js/
|
|
26
|
-
"@modern-js/plugin-tanstack": "{{
|
|
27
|
-
|
|
27
|
+
"@modern-js/plugin-i18n": "{{pluginI18nVersion}}",
|
|
28
|
+
{{#if isTanstackRouter}} "@modern-js/plugin-tanstack": "{{pluginTanstackVersion}}",
|
|
29
|
+
{{/if}}
|
|
30
|
+
"@modern-js/runtime": "{{runtimeVersion}}",
|
|
31
|
+
{{#if isTanstackRouter}} "@tanstack/react-router": "1.170.1",
|
|
32
|
+
{{/if}}
|
|
33
|
+
"i18next": "26.2.0",
|
|
28
34
|
"react": "^19.2.3",
|
|
29
|
-
"react-dom": "^19.2.0"
|
|
35
|
+
"react-dom": "^19.2.0",
|
|
36
|
+
"react-i18next": "17.0.8"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@modern-js/
|
|
34
|
-
"@modern-js/
|
|
39
|
+
"@effect/tsgo": "0.7.3",
|
|
40
|
+
"@modern-js/adapter-rstest": "{{adapterRstestVersion}}",
|
|
41
|
+
"@modern-js/app-tools": "{{appToolsVersion}}",
|
|
42
|
+
{{#if enableBff}} "@modern-js/plugin-bff": "{{pluginBffVersion}}",
|
|
43
|
+
{{/if}} "@modern-js/tsconfig": "{{tsconfigVersion}}",
|
|
44
|
+
"@rstest/core": "0.10.0",
|
|
45
|
+
{{#if enableTailwind}}
|
|
35
46
|
"@tailwindcss/postcss": "^4.1.18",
|
|
36
|
-
|
|
37
|
-
"tailwindcss": "^4.1.18"{{/if}}{{#unless isSubproject}},
|
|
38
|
-
"@biomejs/biome": "1.9.4"{{/unless}},
|
|
39
|
-
"@typescript/native-preview": "7.0.0-dev.20260516.1",
|
|
47
|
+
{{/if}}
|
|
40
48
|
"@types/node": "^20",
|
|
41
49
|
"@types/react": "^19.1.8",
|
|
42
|
-
"@types/react-dom": "^19.1.6"
|
|
50
|
+
"@types/react-dom": "^19.1.6",
|
|
51
|
+
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
|
52
|
+
"happy-dom": "^20.8.9",
|
|
53
|
+
{{#unless isSubproject}}
|
|
43
54
|
"lint-staged": "~15.4.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
55
|
+
"oxfmt": "0.50.0",
|
|
56
|
+
"oxlint": "1.65.0",
|
|
57
|
+
{{/unless}}{{#if enableTailwind}} "postcss": "^8.5.6",
|
|
58
|
+
{{/if}} "rimraf": "^6.0.1"{{#unless isSubproject}},
|
|
59
|
+
"simple-git-hooks": "^2.11.1"{{/unless}}{{#if enableTailwind}},
|
|
60
|
+
"tailwindcss": "^4.1.18"{{/if}}{{#unless isSubproject}},
|
|
61
|
+
"ultracite": "7.7.0"{{/unless}}
|
|
62
|
+
}{{#unless isSubproject}},
|
|
63
|
+
"simple-git-hooks": {
|
|
64
|
+
"pre-commit": "npx lint-staged"
|
|
65
|
+
},
|
|
66
|
+
"lint-staged": {
|
|
67
|
+
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
68
|
+
"oxfmt --write",
|
|
69
|
+
"oxlint --fix"
|
|
70
|
+
]
|
|
71
|
+
}{{/unless}},
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": ">=20",
|
|
74
|
+
"pnpm": ">=11.0.0"
|
|
46
75
|
}
|
|
47
76
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
minimumReleaseAge: 1440
|
|
2
|
+
minimumReleaseAgeStrict: true
|
|
3
|
+
minimumReleaseAgeIgnoreMissingTime: false
|
|
4
|
+
minimumReleaseAgeExclude:
|
|
5
|
+
- '@modern-js/*'
|
|
6
|
+
- '@bleedingdev/*'
|
|
7
|
+
- '@effect/tsgo'
|
|
8
|
+
- '@effect/tsgo-*'
|
|
9
|
+
- '@typescript/native-preview'
|
|
10
|
+
- '@typescript/native-preview-*'
|
|
11
|
+
trustPolicy: no-downgrade
|
|
12
|
+
trustPolicyIgnoreAfter: 1440
|
|
13
|
+
blockExoticSubdeps: true
|
|
14
|
+
engineStrict: true
|
|
15
|
+
pmOnFail: error
|
|
16
|
+
verifyDepsBeforeRun: error
|
|
17
|
+
strictDepBuilds: true
|
|
18
|
+
|
|
19
|
+
allowBuilds:
|
|
20
|
+
'@swc/core': true
|
|
21
|
+
core-js: true
|
|
22
|
+
esbuild: true
|
|
23
|
+
msgpackr-extract: true
|
|
24
|
+
simple-git-hooks: true
|