@bleedingdev/modern-js-create 3.2.0-ultramodern.12 → 3.2.0-ultramodern.121
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 +167 -72
- package/bin/run.js +0 -0
- package/dist/cjs/create-package-root.cjs +63 -0
- package/dist/cjs/index.cjs +528 -0
- package/dist/cjs/locale/en.cjs +93 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +93 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +337 -0
- package/dist/cjs/ultramodern-workspace/app-files.cjs +223 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +836 -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/index.cjs +48 -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/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-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 +153 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +153 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +175 -0
- package/dist/esm/create-package-root.js +14 -0
- package/dist/esm/index.js +491 -0
- package/dist/esm/locale/en.js +55 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +55 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +252 -0
- package/dist/esm/ultramodern-workspace/app-files.js +149 -0
- package/dist/esm/ultramodern-workspace/contracts.js +741 -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/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/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-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 +34 -0
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +91 -0
- package/dist/esm/ultramodern-workspace/write-workspace.js +121 -0
- package/dist/esm-node/create-package-root.js +15 -0
- package/dist/esm-node/index.js +492 -0
- package/dist/esm-node/locale/en.js +56 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +56 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +253 -0
- package/dist/esm-node/ultramodern-workspace/app-files.js +150 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +742 -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/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/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-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 +35 -0
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +92 -0
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +122 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +8 -9
- package/dist/types/locale/index.d.ts +109 -2
- package/dist/types/locale/zh.d.ts +8 -9
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +19 -0
- package/dist/types/ultramodern-workspace/app-files.d.ts +14 -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/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/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-surface.d.ts +37 -0
- package/dist/types/ultramodern-workspace/routes.d.ts +25 -0
- package/dist/types/ultramodern-workspace/types.d.ts +95 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +38 -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 +34 -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 +67 -0
- package/template-workspace/.gitignore.handlebars +5 -0
- package/template-workspace/.mise.toml.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +87 -0
- package/template-workspace/README.md.handlebars +132 -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.handlebars +40 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +184 -21
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +370 -0
- 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 +593 -0
- package/dist/index.js +0 -2626
- package/dist/types/ultramodern-workspace.d.ts +0 -20
- 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/AGENTS.md +0 -50
- package/template-workspace/pnpm-workspace.yaml +0 -17
- package/template-workspace/scripts/check-i18n-strings.mjs +0 -83
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +0 -433
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
type UltramodernPackageSourceStrategy = 'workspace' | 'install';
|
|
2
|
-
export type UltramodernWorkspaceOptions = {
|
|
3
|
-
targetDir: string;
|
|
4
|
-
packageName: string;
|
|
5
|
-
modernVersion: string;
|
|
6
|
-
packageSource?: {
|
|
7
|
-
strategy?: UltramodernPackageSourceStrategy;
|
|
8
|
-
modernPackageVersion?: string;
|
|
9
|
-
registry?: string;
|
|
10
|
-
aliasScope?: string;
|
|
11
|
-
aliasPackageNamePrefix?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const ULTRAMODERN_WORKSPACE_FLAG = "--ultramodern-workspace";
|
|
15
|
-
export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): void;
|
|
16
|
-
export declare const ultramodernWorkspaceVersions: {
|
|
17
|
-
tanstackRouter: string;
|
|
18
|
-
moduleFederation: string;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
}
|
package/template/.browserslistrc
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: Ultramodern Gates
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
pull_request:
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
ultramodern-gates:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- name: Checkout
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
|
|
14
|
-
- name: Setup pnpm
|
|
15
|
-
uses: pnpm/action-setup@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup Node.js
|
|
18
|
-
uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: 20
|
|
21
|
-
cache: pnpm
|
|
22
|
-
|
|
23
|
-
- name: Install Dependencies
|
|
24
|
-
run: pnpm install
|
|
25
|
-
|
|
26
|
-
- name: Validate Ultramodern Contract
|
|
27
|
-
run: pnpm run ultramodern:check
|
|
28
|
-
|
|
29
|
-
- name: Build
|
|
30
|
-
run: pnpm run build
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
|
|
3
|
-
.pnp
|
|
4
|
-
.pnp.js
|
|
5
|
-
.env.local
|
|
6
|
-
.env.*.local
|
|
7
|
-
.history
|
|
8
|
-
*.log*
|
|
9
|
-
|
|
10
|
-
node_modules/
|
|
11
|
-
.yarn-integrity
|
|
12
|
-
.pnpm-store/
|
|
13
|
-
*.tsbuildinfo
|
|
14
|
-
.changeset/pre.json
|
|
15
|
-
|
|
16
|
-
dist/
|
|
17
|
-
coverage/
|
|
18
|
-
release/
|
|
19
|
-
output/
|
|
20
|
-
output_resource/
|
|
21
|
-
log/
|
|
22
|
-
|
|
23
|
-
.vscode/**/*
|
|
24
|
-
!.vscode/settings.json
|
|
25
|
-
!.vscode/extensions.json
|
|
26
|
-
.idea/
|
|
27
|
-
|
|
28
|
-
**/*/typings/auto-generated
|
|
29
|
-
|
|
30
|
-
modern.config.local.*
|
package/template/.nvmrc
DELETED
package/template/AGENTS.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
## Private Skills
|
|
18
|
-
|
|
19
|
-
Private orchestration skills are not vendored into this template. If you are authorized for `TechsioCZ/skills`, run:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm skills:install
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The installer clones that private repository and copies only the allowlisted skills from `.agents/skills-lock.json`.
|
package/template/README.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# UltraModern.js 3.0 Starter
|
|
2
|
-
|
|
3
|
-
## Setup
|
|
4
|
-
|
|
5
|
-
Install the dependencies:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Get Started
|
|
12
|
-
|
|
13
|
-
Start the dev server:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm dev
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Build the app for production:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Validate the generated Ultramodern preset contract locally:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pnpm run ultramodern:check
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The generated preset defaults are opt-out. Disable specific contracts via env vars:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
MODERN_BASELINE_ENABLE_MF_SSR=false
|
|
35
|
-
MODERN_BASELINE_ENABLE_BFF_REQUEST_ID=false
|
|
36
|
-
MODERN_BASELINE_ENABLE_TELEMETRY_EXPORTERS=false
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
The generated starter also includes `.github/workflows/ultramodern-gates.yml`.
|
|
40
|
-
That workflow runs `pnpm run ultramodern:check` and `pnpm run build` on every
|
|
41
|
-
push and pull request so the `presetUltramodern(...)` contract stays explicit.
|
|
42
|
-
|
|
43
|
-
## Micro Vertical Workspaces
|
|
44
|
-
|
|
45
|
-
Inside a Micro Vertical workspace, generate shell, remote, and service packages
|
|
46
|
-
with `--sub` so the workspace root owns package-manager and CI policy:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx @modern-js/create apps/shell --router tanstack --tailwind --workspace --sub
|
|
50
|
-
npx @modern-js/create apps/remotes/catalog --router tanstack --tailwind --workspace --sub
|
|
51
|
-
npx @modern-js/create apps/remotes/design-system --router tanstack --tailwind --workspace --sub
|
|
52
|
-
npx @modern-js/create services/catalog-api --bff-runtime effect --workspace --sub
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The canonical topology is documented in
|
|
56
|
-
`docs/super-app-rfc-adr/WORKSPACE-0001-micro-vertical-workspace-scaffolding.md`.
|
|
57
|
-
Shell packages own route assembly and topology selection, remote packages own
|
|
58
|
-
route subtrees and degraded UI, service packages own Effect or explicit Hono
|
|
59
|
-
contracts, and shared packages are limited to tokens, primitives, generated
|
|
60
|
-
clients, or domain-neutral utilities.
|
|
61
|
-
|
|
62
|
-
If the design system needs independent deployment, keep it as a horizontal
|
|
63
|
-
Module Federation remote with the same topology, trust, SSR compatibility, and
|
|
64
|
-
fallback rules as the vertical remotes. Do not add a second preset or a
|
|
65
|
-
design-system-specific framework mode.
|
|
66
|
-
|
|
67
|
-
The public opinionated entrypoint is `presetUltramodern(...)`. It is the default
|
|
68
|
-
UltraModern.js SuperApp surface for Effect, TanStack, SSR, BFF, and Micro
|
|
69
|
-
Verticals.
|
|
70
|
-
|
|
71
|
-
Preview the production build locally:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
pnpm serve
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
For more information, see the
|
|
78
|
-
[UltraModern.js guide](https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html)
|
|
79
|
-
and the [UltraModern.js documentation](https://bleedingdev.github.io/ultramodern.js/).
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{{#if useEffectBff}}import {
|
|
2
|
-
Effect,
|
|
3
|
-
HttpApiBuilder,
|
|
4
|
-
Layer,
|
|
5
|
-
defineEffectBff,
|
|
6
|
-
} from '@modern-js/plugin-bff/effect-server';
|
|
7
|
-
import { bffEffectApi } from '../../shared/effect/api';
|
|
8
|
-
|
|
9
|
-
const greetingsLayer = HttpApiBuilder.group(bffEffectApi, 'greetings', (handlers) =>
|
|
10
|
-
handlers.handle('hello', () =>
|
|
11
|
-
Effect.succeed({
|
|
12
|
-
message: 'Hello from Effect HttpApi',
|
|
13
|
-
runtime: 'effect' as const,
|
|
14
|
-
}),
|
|
15
|
-
),
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const layer = HttpApiBuilder.layer(bffEffectApi).pipe(Layer.provide(greetingsLayer));
|
|
19
|
-
|
|
20
|
-
export default defineEffectBff({
|
|
21
|
-
api: bffEffectApi,
|
|
22
|
-
layer,
|
|
23
|
-
});{{/if}}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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,53 +0,0 @@
|
|
|
1
|
-
// @effect-diagnostics nodeBuiltinImport:off processEnv:off
|
|
2
|
-
import { appTools, defineConfig, presetUltramodern } from '@modern-js/app-tools';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
{{#if enableBff}}import { bffPlugin } from '@modern-js/plugin-bff';
|
|
5
|
-
{{/if}}import { i18nPlugin } from '@modern-js/plugin-i18n';
|
|
6
|
-
{{#if isTanstackRouter}}import { tanstackRouterPlugin } from '@modern-js/plugin-tanstack';
|
|
7
|
-
{{/if}}
|
|
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';
|
|
11
|
-
const enableTelemetryExporters =
|
|
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 victoriaMetricsEndpoint = process.env['MODERN_TELEMETRY_VICTORIA_ENDPOINT'];
|
|
16
|
-
|
|
17
|
-
// https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html
|
|
18
|
-
export default defineConfig(
|
|
19
|
-
presetUltramodern(
|
|
20
|
-
{
|
|
21
|
-
{{#if enableBff}} bff: {
|
|
22
|
-
{{#if useEffectBff}} effect: {
|
|
23
|
-
openapi: true,
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
{{/if}} runtimeFramework: '{{bffRuntime}}',
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
{{/if}} plugins: [
|
|
30
|
-
appTools(),
|
|
31
|
-
i18nPlugin({
|
|
32
|
-
localeDetection: {
|
|
33
|
-
fallbackLanguage: 'en',
|
|
34
|
-
languages: ['en', 'cs'],
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
{{#if isTanstackRouter}}
|
|
38
|
-
tanstackRouterPlugin(),
|
|
39
|
-
{{/if}}{{#if enableBff}}
|
|
40
|
-
bffPlugin(),
|
|
41
|
-
{{/if}} ],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
appId,
|
|
45
|
-
enableBffRequestId,
|
|
46
|
-
enableModuleFederationSSR,
|
|
47
|
-
enableTelemetryExporters,
|
|
48
|
-
telemetryFailLoudStartup,
|
|
49
|
-
...(typeof otlpEndpoint === 'string' ? { otlpEndpoint } : {}),
|
|
50
|
-
...(typeof victoriaMetricsEndpoint === 'string' ? { victoriaMetricsEndpoint } : {}),
|
|
51
|
-
},
|
|
52
|
-
),
|
|
53
|
-
);
|
package/template/oxfmt.config.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"reset": "npx rimraf node_modules ./**/node_modules",
|
|
7
|
-
"dev": "modern dev",
|
|
8
|
-
"build": "modern build",
|
|
9
|
-
"serve": "modern serve",
|
|
10
|
-
"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);\"",
|
|
11
|
-
"i18n:check": "node ./scripts/check-i18n-strings.mjs",
|
|
12
|
-
"skills:install": "node ./scripts/bootstrap-agent-skills.mjs",
|
|
13
|
-
"skills:check": "node ./scripts/bootstrap-agent-skills.mjs --check",
|
|
14
|
-
"ultramodern:check": "{{#unless isSubproject}}pnpm format:check && pnpm lint && {{/unless}}pnpm typecheck && pnpm i18n:check{{#unless isSubproject}} && pnpm skills:check{{/unless}} && node ./scripts/validate-ultramodern.mjs"{{#unless isSubproject}},
|
|
15
|
-
"format": "oxfmt .",
|
|
16
|
-
"format:check": "oxfmt --check .",
|
|
17
|
-
"lint": "oxlint .",
|
|
18
|
-
"lint:fix": "oxlint . --fix",
|
|
19
|
-
"prepare": "simple-git-hooks"{{/unless}}
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@modern-js/plugin-i18n": "{{pluginI18nVersion}}",
|
|
23
|
-
{{#if isTanstackRouter}} "@modern-js/plugin-tanstack": "{{pluginTanstackVersion}}",
|
|
24
|
-
{{/if}}
|
|
25
|
-
"@modern-js/runtime": "{{runtimeVersion}}",
|
|
26
|
-
{{#if isTanstackRouter}} "@tanstack/react-router": "1.170.1",
|
|
27
|
-
{{/if}}
|
|
28
|
-
"i18next": "26.2.0",
|
|
29
|
-
"react": "^19.2.3",
|
|
30
|
-
"react-dom": "^19.2.0",
|
|
31
|
-
"react-i18next": "17.0.8"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@effect/tsgo": "0.7.3",
|
|
35
|
-
"@modern-js/app-tools": "{{appToolsVersion}}",
|
|
36
|
-
{{#if enableBff}} "@modern-js/plugin-bff": "{{pluginBffVersion}}",
|
|
37
|
-
{{/if}} "@modern-js/tsconfig": "{{tsconfigVersion}}",
|
|
38
|
-
{{#if enableTailwind}}
|
|
39
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
40
|
-
{{/if}}
|
|
41
|
-
"@types/node": "^20",
|
|
42
|
-
"@types/react": "^19.1.8",
|
|
43
|
-
"@types/react-dom": "^19.1.6",
|
|
44
|
-
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
|
45
|
-
{{#unless isSubproject}}
|
|
46
|
-
"lint-staged": "~15.4.0",
|
|
47
|
-
"oxfmt": "0.50.0",
|
|
48
|
-
"oxlint": "1.65.0",
|
|
49
|
-
{{/unless}}{{#if enableTailwind}} "postcss": "^8.5.6",
|
|
50
|
-
{{/if}} "rimraf": "^6.0.1"{{#unless isSubproject}},
|
|
51
|
-
"simple-git-hooks": "^2.11.1"{{/unless}}{{#if enableTailwind}},
|
|
52
|
-
"tailwindcss": "^4.1.18"{{/if}}{{#unless isSubproject}},
|
|
53
|
-
"ultracite": "7.7.0"{{/unless}}
|
|
54
|
-
}{{#unless isSubproject}},
|
|
55
|
-
"simple-git-hooks": {
|
|
56
|
-
"pre-commit": "npx lint-staged"
|
|
57
|
-
},
|
|
58
|
-
"lint-staged": {
|
|
59
|
-
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
60
|
-
"oxfmt --write",
|
|
61
|
-
"oxlint --fix"
|
|
62
|
-
]
|
|
63
|
-
}{{/unless}},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=20"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { execFileSync } from 'node:child_process';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
|
|
6
|
-
const root = process.cwd();
|
|
7
|
-
const lockPath = path.join(root, '.agents/skills-lock.json');
|
|
8
|
-
const checkOnly = process.argv.includes('--check');
|
|
9
|
-
const force = process.argv.includes('--force');
|
|
10
|
-
|
|
11
|
-
const readJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
12
|
-
|
|
13
|
-
const run = (command, args, options = {}) =>
|
|
14
|
-
execFileSync(command, args, {
|
|
15
|
-
cwd: options.cwd ?? root,
|
|
16
|
-
encoding: 'utf-8',
|
|
17
|
-
stdio: options.stdio ?? ['ignore', 'pipe', 'pipe'],
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const cloneSource = (source, targetDir) => {
|
|
21
|
-
const repo = source.repository.replace(/^https:\/\/github.com\//u, '');
|
|
22
|
-
try {
|
|
23
|
-
run('gh', ['repo', 'clone', repo, targetDir, '--', '--depth', '1'], {
|
|
24
|
-
stdio: 'inherit',
|
|
25
|
-
});
|
|
26
|
-
} catch {
|
|
27
|
-
run('git', ['clone', '--depth', '1', source.repository, targetDir], {
|
|
28
|
-
stdio: 'inherit',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const resolveSkillDir = (sourceRoot, skillName) => {
|
|
34
|
-
const candidates = [
|
|
35
|
-
path.join(sourceRoot, skillName),
|
|
36
|
-
path.join(sourceRoot, 'skills', skillName),
|
|
37
|
-
path.join(sourceRoot, 'skills', 'engineering', skillName),
|
|
38
|
-
path.join(sourceRoot, 'skills', 'productivity', skillName),
|
|
39
|
-
];
|
|
40
|
-
return candidates.find((candidate) => fs.existsSync(path.join(candidate, 'SKILL.md')));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
if (!fs.existsSync(lockPath)) {
|
|
44
|
-
console.error('Missing .agents/skills-lock.json');
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const lock = readJson(lockPath);
|
|
49
|
-
const installDir = path.join(root, lock.installDir ?? '.agents/skills');
|
|
50
|
-
const privateSources = (lock.sources ?? []).filter(
|
|
51
|
-
(source) => source.install === 'clone-if-authorized',
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
if (checkOnly) {
|
|
55
|
-
const missing = privateSources.flatMap((source) =>
|
|
56
|
-
(source.baseline ?? [])
|
|
57
|
-
.map((skill) => skill.name)
|
|
58
|
-
.filter((skillName) => !fs.existsSync(path.join(installDir, skillName, 'SKILL.md'))),
|
|
59
|
-
);
|
|
60
|
-
if (missing.length > 0) {
|
|
61
|
-
console.warn(
|
|
62
|
-
`Private skills not installed: ${missing.join(', ')}. Run pnpm skills:install if you have access.`,
|
|
63
|
-
);
|
|
64
|
-
} else {
|
|
65
|
-
console.log('Agent skills are installed.');
|
|
66
|
-
}
|
|
67
|
-
process.exit(0);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
fs.mkdirSync(installDir, { recursive: true });
|
|
71
|
-
|
|
72
|
-
for (const source of privateSources) {
|
|
73
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));
|
|
74
|
-
try {
|
|
75
|
-
cloneSource(source, tempDir);
|
|
76
|
-
for (const skill of source.baseline ?? []) {
|
|
77
|
-
const sourceSkillDir = resolveSkillDir(tempDir, skill.name);
|
|
78
|
-
if (!sourceSkillDir) {
|
|
79
|
-
throw new Error(`Skill ${skill.name} not found in ${source.repository}`);
|
|
80
|
-
}
|
|
81
|
-
const targetSkillDir = path.join(installDir, skill.name);
|
|
82
|
-
if (fs.existsSync(targetSkillDir)) {
|
|
83
|
-
if (!force) {
|
|
84
|
-
console.log(`Skipping existing ${skill.name}`);
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
fs.rmSync(targetSkillDir, { force: true, recursive: true });
|
|
88
|
-
}
|
|
89
|
-
fs.cpSync(sourceSkillDir, targetSkillDir, { recursive: true });
|
|
90
|
-
console.log(`Installed ${skill.name}`);
|
|
91
|
-
}
|
|
92
|
-
} finally {
|
|
93
|
-
fs.rmSync(tempDir, { force: true, recursive: true });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
|
|
4
|
-
const root = process.cwd();
|
|
5
|
-
const scanRoots = ['src'].map((scanRoot) => path.join(root, scanRoot));
|
|
6
|
-
const ignoredDirectories = new Set(['.modern', '.modernjs', 'dist', 'node_modules']);
|
|
7
|
-
const visibleAttributePattern =
|
|
8
|
-
/\s(?:aria-label|alt|placeholder|title)=["']([^"']*[A-Za-z][^"']*)["']/gu;
|
|
9
|
-
const jsxTextPattern = />([^<>{}]*[A-Za-z][^<>{}]*)</gu;
|
|
10
|
-
|
|
11
|
-
const collectFiles = (directory) => {
|
|
12
|
-
if (!fs.existsSync(directory)) {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const files = [];
|
|
17
|
-
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
18
|
-
if (entry.isDirectory()) {
|
|
19
|
-
if (!ignoredDirectories.has(entry.name)) {
|
|
20
|
-
files.push(...collectFiles(path.join(directory, entry.name)));
|
|
21
|
-
}
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (entry.isFile() && /\.(jsx|tsx)$/u.test(entry.name) && !entry.name.endsWith('.d.ts')) {
|
|
26
|
-
files.push(path.join(directory, entry.name));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return files;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const lineNumberForIndex = (content, index) => content.slice(0, index).split('\n').length;
|
|
33
|
-
const isIgnoredLine = (content, index) => {
|
|
34
|
-
const lineStart = content.lastIndexOf('\n', index) + 1;
|
|
35
|
-
const lineEnd = content.indexOf('\n', index);
|
|
36
|
-
const currentLineEnd = lineEnd === -1 ? content.length : lineEnd;
|
|
37
|
-
const previousLineStart = content.lastIndexOf('\n', Math.max(0, lineStart - 2)) + 1;
|
|
38
|
-
const nextLineEnd = content.indexOf('\n', currentLineEnd + 1);
|
|
39
|
-
const context = content.slice(
|
|
40
|
-
previousLineStart,
|
|
41
|
-
nextLineEnd === -1 ? content.length : nextLineEnd,
|
|
42
|
-
);
|
|
43
|
-
return /i18n-ignore/u.test(context);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const violations = [];
|
|
47
|
-
for (const filePath of scanRoots.flatMap(collectFiles)) {
|
|
48
|
-
const content = fs.readFileSync(filePath, 'utf-8');
|
|
49
|
-
for (const match of content.matchAll(visibleAttributePattern)) {
|
|
50
|
-
if (!isIgnoredLine(content, match.index ?? 0)) {
|
|
51
|
-
violations.push({
|
|
52
|
-
filePath,
|
|
53
|
-
line: lineNumberForIndex(content, match.index ?? 0),
|
|
54
|
-
text: match[1].trim(),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
for (const match of content.matchAll(jsxTextPattern)) {
|
|
60
|
-
const text = match[1].replaceAll(/\s+/gu, ' ').trim();
|
|
61
|
-
if (text && !isIgnoredLine(content, match.index ?? 0)) {
|
|
62
|
-
violations.push({
|
|
63
|
-
filePath,
|
|
64
|
-
line: lineNumberForIndex(content, match.index ?? 0),
|
|
65
|
-
text,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (violations.length > 0) {
|
|
72
|
-
console.error('Hardcoded user-visible JSX strings found. Move copy to locale JSON files.');
|
|
73
|
-
for (const violation of violations) {
|
|
74
|
-
console.error(
|
|
75
|
-
`${path.relative(root, violation.filePath)}:${violation.line} ${JSON.stringify(
|
|
76
|
-
violation.text,
|
|
77
|
-
)}`,
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
process.exit(1);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
console.log('No hardcoded user-visible JSX strings found.');
|