@bleedingdev/modern-js-create 3.4.0-ultramodern.2 → 3.4.0-ultramodern.20
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 +13 -11
- package/dist/cjs/index.cjs +37 -4
- package/dist/cjs/locale/en.cjs +12 -2
- package/dist/cjs/locale/zh.cjs +12 -2
- package/dist/cjs/ultramodern-tooling/commands.cjs +185 -0
- package/dist/cjs/ultramodern-tooling/config.cjs +172 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +79 -61
- package/dist/cjs/ultramodern-workspace/bridge-config.cjs +327 -0
- package/dist/cjs/ultramodern-workspace/codesmith.cjs +1 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +121 -648
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +26 -33
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +4 -4
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +230 -100
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +117 -0
- package/dist/cjs/ultramodern-workspace/generation-result.cjs +1 -1
- package/dist/cjs/ultramodern-workspace/index.cjs +4 -0
- package/dist/cjs/ultramodern-workspace/mf-validation.cjs +571 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +51 -20
- package/dist/cjs/ultramodern-workspace/package-json.cjs +62 -19
- package/dist/cjs/ultramodern-workspace/policy.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/public-api.cjs +4 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +5 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +80 -43
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +63 -20
- package/dist/esm/index.js +37 -4
- package/dist/esm/locale/en.js +12 -2
- package/dist/esm/locale/zh.js +12 -2
- package/dist/esm/ultramodern-tooling/commands.js +132 -0
- package/dist/esm/ultramodern-tooling/config.js +120 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +81 -66
- package/dist/esm/ultramodern-workspace/bridge-config.js +270 -0
- package/dist/esm/ultramodern-workspace/codesmith.js +1 -0
- package/dist/esm/ultramodern-workspace/contracts.js +124 -603
- package/dist/esm/ultramodern-workspace/demo-components.js +26 -33
- package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm/ultramodern-workspace/effect-api.js +230 -100
- package/dist/esm/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm/ultramodern-workspace/generation-result.js +2 -2
- package/dist/esm/ultramodern-workspace/index.js +1 -0
- package/dist/esm/ultramodern-workspace/mf-validation.js +516 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +49 -21
- package/dist/esm/ultramodern-workspace/package-json.js +60 -20
- package/dist/esm/ultramodern-workspace/policy.js +2 -2
- package/dist/esm/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm/ultramodern-workspace/versions.js +3 -1
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +78 -26
- package/dist/esm/ultramodern-workspace/write-workspace.js +67 -27
- package/dist/esm-node/index.js +37 -4
- package/dist/esm-node/locale/en.js +12 -2
- package/dist/esm-node/locale/zh.js +12 -2
- package/dist/esm-node/ultramodern-tooling/commands.js +133 -0
- package/dist/esm-node/ultramodern-tooling/config.js +121 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +81 -66
- package/dist/esm-node/ultramodern-workspace/bridge-config.js +271 -0
- package/dist/esm-node/ultramodern-workspace/codesmith.js +1 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +124 -603
- package/dist/esm-node/ultramodern-workspace/demo-components.js +26 -33
- package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm-node/ultramodern-workspace/effect-api.js +230 -100
- package/dist/esm-node/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm-node/ultramodern-workspace/generation-result.js +2 -2
- package/dist/esm-node/ultramodern-workspace/index.js +1 -0
- package/dist/esm-node/ultramodern-workspace/mf-validation.js +517 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +49 -21
- package/dist/esm-node/ultramodern-workspace/package-json.js +60 -20
- package/dist/esm-node/ultramodern-workspace/policy.js +2 -2
- package/dist/esm-node/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +3 -1
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +78 -26
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +67 -27
- package/dist/types/locale/en.d.ts +10 -0
- package/dist/types/locale/index.d.ts +20 -0
- package/dist/types/locale/zh.d.ts +10 -0
- package/dist/types/ultramodern-tooling/commands.d.ts +1 -0
- package/dist/types/ultramodern-tooling/config.d.ts +43 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +5 -2
- package/dist/types/ultramodern-workspace/bridge-config.d.ts +64 -0
- package/dist/types/ultramodern-workspace/codesmith.d.ts +1 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +2 -17
- package/dist/types/ultramodern-workspace/descriptors.d.ts +1 -1
- package/dist/types/ultramodern-workspace/fs-io.d.ts +1 -0
- package/dist/types/ultramodern-workspace/index.d.ts +2 -0
- package/dist/types/ultramodern-workspace/mf-validation.d.ts +27 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +1 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +5 -3
- package/dist/types/ultramodern-workspace/public-api.d.ts +2 -0
- package/dist/types/ultramodern-workspace/types.d.ts +2 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +2 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +2 -7
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -2
- package/package.json +5 -3
- package/template-workspace/{.agents → .codex}/skills-lock.json +12 -12
- package/template-workspace/.gitignore.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +11 -5
- package/template-workspace/README.md.handlebars +15 -12
- package/template-workspace/oxfmt.config.ts +1 -0
- package/template-workspace/oxlint.config.ts +1 -0
- package/template-workspace/patches/@tanstack__router-core@1.171.13.patch +51 -0
- package/template-workspace/pnpm-workspace.yaml.handlebars +12 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +96 -69
- package/templates/app/shell-frame.tsx +1 -2
- package/templates/app/ultramodern-route-head.tsx.handlebars +5 -6
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +59 -7
- package/templates/workspace-scripts/check-ultramodern-api-boundaries.mjs +339 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +245 -8
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +276 -8
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +35 -10
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +164 -1
- package/templates/workspace-scripts/ultramodern-typecheck.mjs +4 -2
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +949 -63
- /package/template-workspace/{.agents → .codex}/rstackjs-agent-skills-LICENSE +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsbuild-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/command-map.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/common-analysis-patterns.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-common.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-rspack.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor-webpack.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/install-rsdoctor.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rsdoctor-analysis/references/rsdoctor-data-types.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rslib-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rslib-modern-package/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-best-practices/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/SKILL.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/bottlenecks.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/references/tracing-guide.md +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rspack-tracing/scripts/analyze_trace.js +0 -0
- /package/template-workspace/{.agents → .codex}/skills/rstest-best-practices/SKILL.md +0 -0
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import node_fs from "node:fs";
|
|
3
3
|
import { createAppEnvDts, createAppRuntimeConfig, createAppStyles, createPostcssConfig, createSharedDesignTokensCss, createShellFrameComponent, createTailwindConfig } from "./app-files.js";
|
|
4
|
-
import {
|
|
4
|
+
import { normalizeUltramodernBridgeConfig } from "./bridge-config.js";
|
|
5
|
+
import { createDevelopmentOverlay, createOwnership, createTopology, createUltramodernConfig } from "./contracts.js";
|
|
5
6
|
import { createLayout, createRemoteEntry, createRemoteExposeComponent, createRemotePage, createShellPage, createShellRemoteComponents, remoteComponentOutputPath } from "./demo-components.js";
|
|
6
|
-
import {
|
|
7
|
+
import { ULTRAMODERN_CONFIG_PATH, appHasEffectApi, appI18nNamespace, createShellHost, sharedPackages, shellApp } from "./descriptors.js";
|
|
7
8
|
import { createEffectClient, createEffectServiceEntry, createEffectSharedApi, createShellEffectClient } from "./effect-api.js";
|
|
8
|
-
import { copyRootTemplate, writeFile, writeJson } from "./fs-io.js";
|
|
9
|
+
import { copyRootTemplate, formatGeneratedWorkspaceFiles, writeFile, writeFileReplacing, writeJson } from "./fs-io.js";
|
|
9
10
|
import { createFileSnapshot, createGenerationResult, diffFileSnapshots } from "./generation-result.js";
|
|
10
11
|
import { createAppPublicLocaleMessages } from "./locales.js";
|
|
11
|
-
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule } from "./module-federation.js";
|
|
12
|
+
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule, createUltramodernBuildReexportModule } from "./module-federation.js";
|
|
12
13
|
import { assertUniqueTailwindPrefixes, toPackageScope } from "./naming.js";
|
|
13
14
|
import { runCodeSmithOverlays } from "./overlays.js";
|
|
14
|
-
import { createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig, createSharedContractsIndex, createSharedPackage, createSharedPackageTsConfig, createTsConfigBase } from "./package-json.js";
|
|
15
|
+
import { createAppMfTypesTsConfig, createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig, createSharedContractsIndex, createSharedPackage, createSharedPackageTsConfig, createTsConfigBase } from "./package-json.js";
|
|
15
16
|
import { resolvePackageSource } from "./package-source.js";
|
|
16
17
|
import { createPublicWebAppArtifacts } from "./public-surface.js";
|
|
17
|
-
import { NODE_FETCH_VERSION, NODE_VERSION, PNPM_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_VERSION } from "./versions.js";
|
|
18
|
+
import { NODE_FETCH_VERSION, NODE_VERSION, PNPM_VERSION, TANSTACK_ROUTER_CORE_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_VERSION } from "./versions.js";
|
|
18
19
|
import { writeGeneratedWorkspaceScripts } from "./workspace-scripts.js";
|
|
19
|
-
function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes = []) {
|
|
20
|
+
function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes = [], bridge) {
|
|
20
21
|
const resolvedApp = 'shell' === app.kind ? createShellHost(remotes) : app;
|
|
21
22
|
const publicWeb = createPublicWebAppArtifacts(resolvedApp);
|
|
22
23
|
const writeAppFile = (relativePath, content)=>{
|
|
23
24
|
writeFile(targetDir, `${resolvedApp.directory}/${relativePath}`, content);
|
|
24
25
|
};
|
|
25
|
-
writeJson(targetDir, `${resolvedApp.directory}/package.json`, createAppPackage(scope, resolvedApp, packageSource, enableTailwind, remotes));
|
|
26
|
+
writeJson(targetDir, `${resolvedApp.directory}/package.json`, createAppPackage(scope, resolvedApp, packageSource, enableTailwind, remotes, bridge));
|
|
26
27
|
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`, createAppTsConfig(resolvedApp, remotes));
|
|
28
|
+
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.mf-types.json`, createAppMfTypesTsConfig(resolvedApp));
|
|
27
29
|
writeFile(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(resolvedApp, remotes));
|
|
28
|
-
writeFile(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`,
|
|
30
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, createUltramodernBuildReexportModule());
|
|
31
|
+
writeFile(targetDir, `${resolvedApp.directory}/shared/ultramodern-build.ts`, createUltramodernBuildModule(scope, resolvedApp));
|
|
29
32
|
writeFile(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
|
|
30
33
|
writeFile(targetDir, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
|
|
31
34
|
writeFile(targetDir, publicWeb.routeHeadFile.path, publicWeb.routeHeadFile.content);
|
|
@@ -48,12 +51,12 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
48
51
|
if ('shell' === resolvedApp.kind) {
|
|
49
52
|
writeAppFile('src/routes/vertical-components.tsx', createShellRemoteComponents(scope, remotes));
|
|
50
53
|
writeAppFile('src/routes/shell-frame.tsx', createShellFrameComponent());
|
|
51
|
-
writeFile(targetDir, `${resolvedApp.directory}/src/
|
|
54
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/api/vertical-clients.ts`, createShellEffectClient(scope, remotes));
|
|
52
55
|
}
|
|
53
56
|
if (appHasEffectApi(resolvedApp)) {
|
|
54
|
-
writeFile(targetDir, `${resolvedApp.directory}/shared/
|
|
55
|
-
writeFile(targetDir, `${resolvedApp.directory}/api/
|
|
56
|
-
writeFile(targetDir, `${resolvedApp.directory}/src/
|
|
57
|
+
writeFile(targetDir, `${resolvedApp.directory}/shared/api.ts`, createEffectSharedApi(resolvedApp));
|
|
58
|
+
writeFile(targetDir, `${resolvedApp.directory}/api/index.ts`, createEffectServiceEntry(resolvedApp, '../shared/api.ts'));
|
|
59
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/api/${resolvedApp.effectApi.stem}-client.ts`, createEffectClient(resolvedApp, '../../shared/api'));
|
|
57
60
|
}
|
|
58
61
|
if ('vertical' === resolvedApp.kind) {
|
|
59
62
|
writeAppFile('src/federation-entry.tsx', createRemoteEntry(resolvedApp));
|
|
@@ -79,10 +82,36 @@ function writeSharedPackages(targetDir, scope) {
|
|
|
79
82
|
`);
|
|
80
83
|
writeFile(targetDir, 'packages/shared-design-tokens/src/tokens.css', createSharedDesignTokensCss());
|
|
81
84
|
}
|
|
85
|
+
function createCompactRootPackageJson(scope, packageSource, remotes, bridge) {
|
|
86
|
+
const rootPackage = createRootPackageJson(scope, packageSource, remotes, bridge);
|
|
87
|
+
if (rootPackage.modernjs?.packageSource && 'object' == typeof rootPackage.modernjs.packageSource) rootPackage.modernjs.packageSource.config = `./${ULTRAMODERN_CONFIG_PATH}`;
|
|
88
|
+
return rootPackage;
|
|
89
|
+
}
|
|
90
|
+
function createCompactUltramodernConfig(scope, modernVersion, packageSource, apps = [
|
|
91
|
+
createShellHost()
|
|
92
|
+
], enableTailwind = true, bridge) {
|
|
93
|
+
const config = createUltramodernConfig(scope, modernVersion, packageSource, apps, enableTailwind, bridge);
|
|
94
|
+
if (config.packageSource && 'object' == typeof config.packageSource && !Array.isArray(config.packageSource)) delete config.packageSource.metadata;
|
|
95
|
+
return config;
|
|
96
|
+
}
|
|
97
|
+
function writePnpmWorkspacePackages(targetDir, bridge) {
|
|
98
|
+
if (!bridge) return;
|
|
99
|
+
const pnpmWorkspacePath = `${targetDir}/pnpm-workspace.yaml`;
|
|
100
|
+
const pnpmWorkspace = node_fs.readFileSync(pnpmWorkspacePath, 'utf-8');
|
|
101
|
+
const packages = [
|
|
102
|
+
'apps/*',
|
|
103
|
+
'verticals/*',
|
|
104
|
+
'packages/*',
|
|
105
|
+
...bridge.workspacePackages.map((entry)=>entry.pattern)
|
|
106
|
+
];
|
|
107
|
+
const renderedPackages = packages.map((pattern)=>` - ${pattern}`).join('\n');
|
|
108
|
+
writeFileReplacing(targetDir, 'pnpm-workspace.yaml', pnpmWorkspace.replace(/^packages:\n(?: {2}- .+\n)+/u, `packages:\n${renderedPackages}\n`));
|
|
109
|
+
}
|
|
82
110
|
function generateUltramodernWorkspace(options) {
|
|
83
111
|
const beforeFiles = createFileSnapshot(options.targetDir);
|
|
84
112
|
const scope = toPackageScope(options.packageName);
|
|
85
113
|
const packageSource = resolvePackageSource(options);
|
|
114
|
+
const bridge = normalizeUltramodernBridgeConfig(options.bridge);
|
|
86
115
|
const enableTailwind = false !== options.enableTailwind;
|
|
87
116
|
const initialVerticals = [];
|
|
88
117
|
const createdApps = [
|
|
@@ -102,39 +131,50 @@ function generateUltramodernWorkspace(options) {
|
|
|
102
131
|
nodeVersion: NODE_VERSION,
|
|
103
132
|
pnpmVersion: PNPM_VERSION,
|
|
104
133
|
nodeFetchVersion: NODE_FETCH_VERSION,
|
|
134
|
+
tanstackRouterCoreVersion: TANSTACK_ROUTER_CORE_VERSION,
|
|
105
135
|
tanstackRouterVersion: TANSTACK_ROUTER_VERSION,
|
|
106
136
|
typescriptVersion: TYPESCRIPT_VERSION,
|
|
107
137
|
tailwindEnabled: String(enableTailwind)
|
|
108
138
|
});
|
|
109
|
-
|
|
139
|
+
writePnpmWorkspacePackages(options.targetDir, bridge);
|
|
140
|
+
writeJson(options.targetDir, 'package.json', createCompactRootPackageJson(scope, packageSource, initialVerticals, bridge));
|
|
110
141
|
writeJson(options.targetDir, 'tsconfig.base.json', createTsConfigBase());
|
|
111
142
|
writeJson(options.targetDir, 'tsconfig.json', createRootTsConfig(createdApps));
|
|
112
143
|
writeJson(options.targetDir, 'topology/reference-topology.json', createTopology(scope, initialVerticals));
|
|
113
144
|
writeJson(options.targetDir, 'topology/ownership.json', createOwnership(scope, initialVerticals));
|
|
114
145
|
writeJson(options.targetDir, 'topology/local-overlays/development.json', createDevelopmentOverlay(initialVerticals));
|
|
115
|
-
writeJson(options.targetDir,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
writeApp(options.targetDir, scope, shellApp, packageSource, enableTailwind, initialVerticals);
|
|
119
|
-
for (const remote of initialVerticals)writeApp(options.targetDir, scope, remote, packageSource, enableTailwind, initialVerticals);
|
|
146
|
+
writeJson(options.targetDir, ULTRAMODERN_CONFIG_PATH, createCompactUltramodernConfig(scope, options.modernVersion, packageSource, createdApps, enableTailwind, bridge));
|
|
147
|
+
writeApp(options.targetDir, scope, shellApp, packageSource, enableTailwind, initialVerticals, bridge);
|
|
148
|
+
for (const remote of initialVerticals)writeApp(options.targetDir, scope, remote, packageSource, enableTailwind, initialVerticals, bridge);
|
|
120
149
|
writeSharedPackages(options.targetDir, scope);
|
|
121
150
|
writeGeneratedWorkspaceScripts(options.targetDir, scope, enableTailwind, initialVerticals);
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
151
|
+
const preliminaryAfterFiles = createFileSnapshot(options.targetDir);
|
|
152
|
+
const preliminaryDiff = diffFileSnapshots(beforeFiles, preliminaryAfterFiles);
|
|
153
|
+
const preliminaryResult = createGenerationResult({
|
|
125
154
|
operation: 'workspace',
|
|
126
155
|
workspaceRoot: options.targetDir,
|
|
127
156
|
packageScope: scope,
|
|
128
157
|
packageSource,
|
|
129
158
|
createdApps,
|
|
130
|
-
createdPaths,
|
|
131
|
-
rewrittenPaths
|
|
159
|
+
createdPaths: preliminaryDiff.createdPaths,
|
|
160
|
+
rewrittenPaths: preliminaryDiff.rewrittenPaths
|
|
132
161
|
});
|
|
133
162
|
runCodeSmithOverlays({
|
|
134
163
|
workspaceRoot: options.targetDir,
|
|
135
164
|
overlays: options.overlays,
|
|
136
|
-
result
|
|
165
|
+
result: preliminaryResult
|
|
166
|
+
});
|
|
167
|
+
formatGeneratedWorkspaceFiles(options.targetDir);
|
|
168
|
+
const afterFiles = createFileSnapshot(options.targetDir);
|
|
169
|
+
const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
|
|
170
|
+
return createGenerationResult({
|
|
171
|
+
operation: 'workspace',
|
|
172
|
+
workspaceRoot: options.targetDir,
|
|
173
|
+
packageScope: scope,
|
|
174
|
+
packageSource,
|
|
175
|
+
createdApps,
|
|
176
|
+
createdPaths,
|
|
177
|
+
rewrittenPaths
|
|
137
178
|
});
|
|
138
|
-
return result;
|
|
139
179
|
}
|
|
140
|
-
export { generateUltramodernWorkspace, writeApp, writeSharedPackages };
|
|
180
|
+
export { createCompactUltramodernConfig, generateUltramodernWorkspace, writeApp, writeSharedPackages };
|
|
@@ -38,6 +38,16 @@ export declare const EN_LOCALE: {
|
|
|
38
38
|
optionUltramodernPackageRegistry: string;
|
|
39
39
|
optionUltramodernPackageScope: string;
|
|
40
40
|
optionUltramodernPackageNamePrefix: string;
|
|
41
|
+
optionBridge: string;
|
|
42
|
+
optionBridgeParentRoot: string;
|
|
43
|
+
optionBridgeWorkspacePackage: string;
|
|
44
|
+
optionBridgeWorkspacePackageName: string;
|
|
45
|
+
optionBridgeTestAlias: string;
|
|
46
|
+
optionBridgeDependency: string;
|
|
47
|
+
optionBridgeLockfilePolicy: string;
|
|
48
|
+
optionBridgeGate: string;
|
|
49
|
+
optionBridgeGateCwd: string;
|
|
50
|
+
optionBridgeReactSingleton: string;
|
|
41
51
|
optionVertical: string;
|
|
42
52
|
optionVerticalName: string;
|
|
43
53
|
optionDryRun: string;
|
|
@@ -40,6 +40,16 @@ declare const localeKeys: {
|
|
|
40
40
|
optionUltramodernPackageRegistry: string;
|
|
41
41
|
optionUltramodernPackageScope: string;
|
|
42
42
|
optionUltramodernPackageNamePrefix: string;
|
|
43
|
+
optionBridge: string;
|
|
44
|
+
optionBridgeParentRoot: string;
|
|
45
|
+
optionBridgeWorkspacePackage: string;
|
|
46
|
+
optionBridgeWorkspacePackageName: string;
|
|
47
|
+
optionBridgeTestAlias: string;
|
|
48
|
+
optionBridgeDependency: string;
|
|
49
|
+
optionBridgeLockfilePolicy: string;
|
|
50
|
+
optionBridgeGate: string;
|
|
51
|
+
optionBridgeGateCwd: string;
|
|
52
|
+
optionBridgeReactSingleton: string;
|
|
43
53
|
optionVertical: string;
|
|
44
54
|
optionVerticalName: string;
|
|
45
55
|
optionDryRun: string;
|
|
@@ -101,6 +111,16 @@ declare const localeKeys: {
|
|
|
101
111
|
optionUltramodernPackageRegistry: string;
|
|
102
112
|
optionUltramodernPackageScope: string;
|
|
103
113
|
optionUltramodernPackageNamePrefix: string;
|
|
114
|
+
optionBridge: string;
|
|
115
|
+
optionBridgeParentRoot: string;
|
|
116
|
+
optionBridgeWorkspacePackage: string;
|
|
117
|
+
optionBridgeWorkspacePackageName: string;
|
|
118
|
+
optionBridgeTestAlias: string;
|
|
119
|
+
optionBridgeDependency: string;
|
|
120
|
+
optionBridgeLockfilePolicy: string;
|
|
121
|
+
optionBridgeGate: string;
|
|
122
|
+
optionBridgeGateCwd: string;
|
|
123
|
+
optionBridgeReactSingleton: string;
|
|
104
124
|
optionVertical: string;
|
|
105
125
|
optionVerticalName: string;
|
|
106
126
|
optionDryRun: string;
|
|
@@ -38,6 +38,16 @@ export declare const ZH_LOCALE: {
|
|
|
38
38
|
optionUltramodernPackageRegistry: string;
|
|
39
39
|
optionUltramodernPackageScope: string;
|
|
40
40
|
optionUltramodernPackageNamePrefix: string;
|
|
41
|
+
optionBridge: string;
|
|
42
|
+
optionBridgeParentRoot: string;
|
|
43
|
+
optionBridgeWorkspacePackage: string;
|
|
44
|
+
optionBridgeWorkspacePackageName: string;
|
|
45
|
+
optionBridgeTestAlias: string;
|
|
46
|
+
optionBridgeDependency: string;
|
|
47
|
+
optionBridgeLockfilePolicy: string;
|
|
48
|
+
optionBridgeGate: string;
|
|
49
|
+
optionBridgeGateCwd: string;
|
|
50
|
+
optionBridgeReactSingleton: string;
|
|
41
51
|
optionVertical: string;
|
|
42
52
|
optionVerticalName: string;
|
|
43
53
|
optionDryRun: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runUltramodernToolingCli(args: string[], workspaceRoot?: any): Promise<number>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type UltramodernBridgeConfig } from '../ultramodern-workspace/bridge-config';
|
|
2
|
+
import type { ResolvedPackageSource, WorkspaceApp, WorkspaceEffectApi } from '../ultramodern-workspace/types';
|
|
3
|
+
export type UltramodernToolingConfigSource = 'compact';
|
|
4
|
+
export type UltramodernToolingConfigApp = {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: WorkspaceApp['kind'];
|
|
7
|
+
path: string;
|
|
8
|
+
package?: string;
|
|
9
|
+
packageSuffix?: string;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
domain?: string;
|
|
12
|
+
port?: number;
|
|
13
|
+
portEnv?: string;
|
|
14
|
+
moduleFederation?: {
|
|
15
|
+
role?: 'host' | 'remote';
|
|
16
|
+
name?: string;
|
|
17
|
+
exposes?: string[];
|
|
18
|
+
exposePaths?: Record<string, string>;
|
|
19
|
+
verticalRefs?: string[];
|
|
20
|
+
hostOnly?: boolean;
|
|
21
|
+
noExposes?: boolean;
|
|
22
|
+
};
|
|
23
|
+
effectApi?: WorkspaceEffectApi;
|
|
24
|
+
};
|
|
25
|
+
export type UltramodernToolingConfig = {
|
|
26
|
+
schemaVersion: number;
|
|
27
|
+
profile?: string;
|
|
28
|
+
source: UltramodernToolingConfigSource;
|
|
29
|
+
sourcePath: string;
|
|
30
|
+
workspace: {
|
|
31
|
+
packageScope: string;
|
|
32
|
+
};
|
|
33
|
+
packageSource?: ResolvedPackageSource;
|
|
34
|
+
features: {
|
|
35
|
+
tailwind: boolean;
|
|
36
|
+
};
|
|
37
|
+
bridge?: UltramodernBridgeConfig;
|
|
38
|
+
topology: {
|
|
39
|
+
apps: UltramodernToolingConfigApp[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare function readUltramodernConfig(workspaceRoot?: any): UltramodernToolingConfig;
|
|
43
|
+
export declare function workspaceAppsFromToolingConfig(config: UltramodernToolingConfig): WorkspaceApp[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UltramodernBridgeConfig } from './bridge-config';
|
|
1
2
|
import type { AddUltramodernVerticalOptions, JsonValue, Ownership, ResolvedPackageSource, UltramodernGenerationResult, UltramodernVerticalPlan, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
|
|
2
3
|
export type AddUltramodernVerticalPreflight = {
|
|
3
4
|
name: string;
|
|
@@ -11,16 +12,18 @@ export type AddUltramodernVerticalPreflight = {
|
|
|
11
12
|
overlay: Record<string, any>;
|
|
12
13
|
packageSource: ResolvedPackageSource;
|
|
13
14
|
enableTailwind: boolean;
|
|
15
|
+
bridge?: UltramodernBridgeConfig;
|
|
14
16
|
vertical: WorkspaceApp;
|
|
15
17
|
updatedVerticals: WorkspaceApp[];
|
|
16
18
|
};
|
|
17
19
|
export declare function existingPackageSource(workspaceRoot: string, modernVersion: string, packageSource?: UltramodernWorkspaceOptions['packageSource']): ResolvedPackageSource;
|
|
18
20
|
export declare function existingTailwindEnabled(workspaceRoot: string): boolean;
|
|
21
|
+
export declare function existingBridgeConfig(workspaceRoot: string): UltramodernBridgeConfig | undefined;
|
|
19
22
|
export declare function assertValidVerticalName(name: string): string;
|
|
20
23
|
export declare function nextAvailablePort(ports: Record<string, unknown>): number;
|
|
21
24
|
export declare function assertCanCreate(workspaceRoot: string, relativePath: string): void;
|
|
22
|
-
export declare function updateRootWorkspaceScripts(workspaceRoot: string, scope: string, packageSource: ResolvedPackageSource, remotes: WorkspaceApp[]): void;
|
|
23
|
-
export declare function rewriteShellAppFiles(workspaceRoot: string, scope: string, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes: WorkspaceApp[]): void;
|
|
25
|
+
export declare function updateRootWorkspaceScripts(workspaceRoot: string, scope: string, packageSource: ResolvedPackageSource, remotes: WorkspaceApp[], bridge?: UltramodernBridgeConfig): void;
|
|
26
|
+
export declare function rewriteShellAppFiles(workspaceRoot: string, scope: string, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes: WorkspaceApp[], bridge?: UltramodernBridgeConfig): void;
|
|
24
27
|
export declare function addShellZephyrDependency(workspaceRoot: string, scope: string, remote: WorkspaceApp): void;
|
|
25
28
|
export declare function addShellWorkspaceDependency(workspaceRoot: string, scope: string, remote: WorkspaceApp): void;
|
|
26
29
|
export declare function verticalTopologyEntry(scope: string, vertical: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const ultramodernBridgeCliFlags: {
|
|
2
|
+
readonly enabled: '--bridge';
|
|
3
|
+
readonly parentRoot: '--bridge-parent-root';
|
|
4
|
+
readonly workspacePackage: '--bridge-workspace-package';
|
|
5
|
+
readonly workspacePackageName: '--bridge-workspace-package-name';
|
|
6
|
+
readonly testAlias: '--bridge-test-alias';
|
|
7
|
+
readonly dependency: '--bridge-dependency';
|
|
8
|
+
readonly lockfilePolicy: '--bridge-lockfile-policy';
|
|
9
|
+
readonly gate: '--bridge-gate';
|
|
10
|
+
readonly gateCwd: '--bridge-gate-cwd';
|
|
11
|
+
readonly reactSingleton: '--bridge-react-singleton';
|
|
12
|
+
};
|
|
13
|
+
export declare const ultramodernBridgeCliValueFlags: readonly ["--bridge-parent-root", "--bridge-workspace-package", "--bridge-workspace-package-name", "--bridge-test-alias", "--bridge-dependency", "--bridge-lockfile-policy", "--bridge-gate", "--bridge-gate-cwd", "--bridge-react-singleton"];
|
|
14
|
+
export declare const ultramodernBridgeCliBooleanFlags: readonly ["--bridge"];
|
|
15
|
+
export declare const ultramodernBridgeLockfilePolicies: readonly ['nested', 'parent'];
|
|
16
|
+
export type UltramodernBridgeLockfilePolicy = (typeof ultramodernBridgeLockfilePolicies)[number];
|
|
17
|
+
export type UltramodernBridgeTestAlias = {
|
|
18
|
+
alias: string;
|
|
19
|
+
target: string;
|
|
20
|
+
};
|
|
21
|
+
export type UltramodernBridgeWorkspacePackage = {
|
|
22
|
+
pattern: string;
|
|
23
|
+
packageNames?: string[];
|
|
24
|
+
testAliases?: UltramodernBridgeTestAlias[];
|
|
25
|
+
};
|
|
26
|
+
export type UltramodernBridgeGate = {
|
|
27
|
+
name: string;
|
|
28
|
+
command: string;
|
|
29
|
+
cwd?: string;
|
|
30
|
+
};
|
|
31
|
+
export type UltramodernBridgeConfig = {
|
|
32
|
+
enabled: true;
|
|
33
|
+
parentRoot: string;
|
|
34
|
+
workspacePackages: UltramodernBridgeWorkspacePackage[];
|
|
35
|
+
dependencies: string[];
|
|
36
|
+
lockfilePolicy: UltramodernBridgeLockfilePolicy;
|
|
37
|
+
gates: UltramodernBridgeGate[];
|
|
38
|
+
reactSingletons: string[];
|
|
39
|
+
};
|
|
40
|
+
export type UltramodernBridgeWorkspacePackageInput = {
|
|
41
|
+
pattern: string;
|
|
42
|
+
packageNames?: readonly string[];
|
|
43
|
+
testAliases?: readonly UltramodernBridgeTestAlias[];
|
|
44
|
+
};
|
|
45
|
+
export type UltramodernBridgeGateInput = {
|
|
46
|
+
name: string;
|
|
47
|
+
command: string;
|
|
48
|
+
cwd?: string;
|
|
49
|
+
};
|
|
50
|
+
export type UltramodernEnabledBridgeConfigInput = {
|
|
51
|
+
enabled?: true;
|
|
52
|
+
parentRoot: string;
|
|
53
|
+
workspacePackages: readonly UltramodernBridgeWorkspacePackageInput[];
|
|
54
|
+
dependencies: readonly string[];
|
|
55
|
+
lockfilePolicy?: UltramodernBridgeLockfilePolicy;
|
|
56
|
+
gates: readonly UltramodernBridgeGateInput[];
|
|
57
|
+
reactSingletons?: readonly string[];
|
|
58
|
+
};
|
|
59
|
+
export type UltramodernBridgeConfigInput = UltramodernEnabledBridgeConfigInput | {
|
|
60
|
+
enabled: false;
|
|
61
|
+
};
|
|
62
|
+
export declare function hasUltramodernBridgeCliOptions(args: string[]): boolean;
|
|
63
|
+
export declare function parseUltramodernBridgeCliOptions(args: string[]): UltramodernBridgeConfig | undefined;
|
|
64
|
+
export declare function normalizeUltramodernBridgeConfig(bridge: UltramodernBridgeConfigInput | undefined): UltramodernBridgeConfig | undefined;
|
|
@@ -12,6 +12,7 @@ export type UltramodernCodeSmithConfig = {
|
|
|
12
12
|
tailwind?: boolean;
|
|
13
13
|
dryRun?: boolean;
|
|
14
14
|
logResult?: boolean;
|
|
15
|
+
bridge?: UltramodernWorkspaceOptions['bridge'];
|
|
15
16
|
overlays?: UltramodernWorkspaceOptions['overlays'];
|
|
16
17
|
packageSource?: UltramodernWorkspaceOptions['packageSource'];
|
|
17
18
|
packageSourceStrategy?: NonNullable<UltramodernWorkspaceOptions['packageSource']>['strategy'];
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
+
import type { UltramodernBridgeConfig } from './bridge-config';
|
|
1
2
|
import type { JsonValue, ResolvedPackageSource, WorkspaceApp } from './types';
|
|
2
|
-
export declare const baselineAgentSkills: string[];
|
|
3
|
-
export declare const moduleFederationAgentSkills: string[];
|
|
4
|
-
export declare const privateAgentSkills: string[];
|
|
5
3
|
export declare function createTopology(scope: string, remotes?: WorkspaceApp[]): JsonValue;
|
|
6
4
|
export declare function createOwnership(scope: string, remotes?: WorkspaceApp[]): JsonValue;
|
|
7
5
|
export declare function createDevelopmentOverlay(remotes?: WorkspaceApp[]): JsonValue;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function createAppConfigContract(app: WorkspaceApp): JsonValue;
|
|
10
|
-
export declare function createPerformanceReadinessContract(): JsonValue;
|
|
11
|
-
export declare function cssLayerName(app: WorkspaceApp): string;
|
|
12
|
-
export declare function cssRole(app: WorkspaceApp): string;
|
|
13
|
-
export declare function cssClassPrefix(app: WorkspaceApp): string;
|
|
14
|
-
export declare function createCssDedupeContract(scope: string): JsonValue;
|
|
15
|
-
export declare function createCssSsrContract(app: WorkspaceApp): JsonValue;
|
|
16
|
-
export declare function createAppCssFederationContract(scope: string, app: WorkspaceApp): JsonValue;
|
|
17
|
-
export declare function createCssFederationContract(scope: string): JsonValue;
|
|
18
|
-
export declare function createStylingContract(scope: string, app: WorkspaceApp, enableTailwind: boolean): JsonValue;
|
|
19
|
-
export declare function createAppGeneratedContract(scope: string, app: WorkspaceApp, apps: WorkspaceApp[], enableTailwind: boolean): JsonValue;
|
|
20
|
-
export declare function createGeneratedContract(scope: string, apps?: WorkspaceApp[], enableTailwind?: boolean): JsonValue;
|
|
21
|
-
export declare function createTemplateManifest(modernVersion: string, packageSource: ResolvedPackageSource): JsonValue;
|
|
6
|
+
export declare function createUltramodernConfig(scope: string, modernVersion: string, packageSource: ResolvedPackageSource, apps?: WorkspaceApp[], enableTailwind?: boolean, bridge?: UltramodernBridgeConfig): JsonValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ownership, WorkspaceApp, WorkspaceEffectApi } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ULTRAMODERN_CONFIG_PATH = ".modernjs/ultramodern.json";
|
|
3
3
|
export declare const shellApp: WorkspaceApp;
|
|
4
4
|
export declare function createShellHost(remotes?: WorkspaceApp[]): WorkspaceApp;
|
|
5
5
|
export declare const sharedPackages: {
|
|
@@ -9,6 +9,7 @@ export declare function ensureInsideRoot(root: string, targetPath: string): void
|
|
|
9
9
|
export declare function writeFile(targetDir: string, relativePath: string, content: string): void;
|
|
10
10
|
export declare function writeFileReplacing(targetDir: string, relativePath: string, content: string): void;
|
|
11
11
|
export declare function writeJson(targetDir: string, relativePath: string, value: JsonValue): void;
|
|
12
|
+
export declare function formatGeneratedWorkspaceFiles(targetDir: string, relativePaths?: readonly string[]): void;
|
|
12
13
|
export declare function renderTemplate(template: string, data: Record<string, string>): string;
|
|
13
14
|
export declare function collectTemplateFiles(dir: string): string[];
|
|
14
15
|
export declare function hashFile(filePath: string): string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { addUltramodernVertical, planUltramodernVertical, } from './add-vertical';
|
|
2
|
+
export type { UltramodernBridgeConfig, UltramodernBridgeConfigInput, UltramodernBridgeGate, UltramodernBridgeGateInput, UltramodernBridgeLockfilePolicy, UltramodernBridgeTestAlias, UltramodernBridgeWorkspacePackage, UltramodernBridgeWorkspacePackageInput, UltramodernEnabledBridgeConfigInput, } from './bridge-config';
|
|
3
|
+
export { normalizeUltramodernBridgeConfig } from './bridge-config';
|
|
2
4
|
export type { AddUltramodernVerticalOptions, UltramodernCodeSmithOverlay, UltramodernCodeSmithOverlayRuntimeConfig, UltramodernGeneratedAppDescriptor, UltramodernGeneratedContractChange, UltramodernGenerationOperation, UltramodernGenerationResult, UltramodernGenerationWarning, UltramodernJsonMutation, UltramodernShellDependencyChange, UltramodernVerticalPlan, UltramodernWorkspaceOptions, } from './types';
|
|
3
5
|
export { ultramodernWorkspaceVersions } from './versions';
|
|
4
6
|
export { generateUltramodernWorkspace } from './write-workspace';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ModuleFederationConfigInspection = {
|
|
2
|
+
appDir: string;
|
|
3
|
+
configPath: string;
|
|
4
|
+
dts: {
|
|
5
|
+
compilerInstance?: string;
|
|
6
|
+
tsConfigPath?: string;
|
|
7
|
+
};
|
|
8
|
+
exposes: string[];
|
|
9
|
+
hostOnlyNoExposes: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type ModuleFederationDiscoveredConfig = {
|
|
12
|
+
appDir: string;
|
|
13
|
+
configPath: string;
|
|
14
|
+
};
|
|
15
|
+
export type ModuleFederationValidationResult = {
|
|
16
|
+
configCount: number;
|
|
17
|
+
exposedAppCount: number;
|
|
18
|
+
hostOnlyAppCount: number;
|
|
19
|
+
apps: ModuleFederationConfigInspection[];
|
|
20
|
+
};
|
|
21
|
+
export type ModuleFederationValidationOptions = {
|
|
22
|
+
workspaceRoot: string;
|
|
23
|
+
appDirs?: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare function discoverModuleFederationConfigs(options: ModuleFederationValidationOptions): ModuleFederationDiscoveredConfig[];
|
|
26
|
+
export declare function inspectModuleFederationConfigSource(source: string, appDir: string, configPath: string): ModuleFederationConfigInspection;
|
|
27
|
+
export declare function validateModuleFederationTypes(options: ModuleFederationValidationOptions): ModuleFederationValidationResult;
|
|
@@ -13,4 +13,5 @@ export declare function createUltramodernBuildModule(scope: string, app: {
|
|
|
13
13
|
id: string;
|
|
14
14
|
packageSuffix: string;
|
|
15
15
|
}): string;
|
|
16
|
+
export declare function createUltramodernBuildReexportModule(): string;
|
|
16
17
|
export declare function createRemoteModuleFederationConfig(scope: string, app: WorkspaceApp, remotes?: WorkspaceApp[]): string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { UltramodernBridgeConfig } from './bridge-config';
|
|
1
2
|
import type { JsonValue, ResolvedPackageSource, WorkspaceApp } from './types';
|
|
2
3
|
export declare const createEffectTsgoTypecheckCommand: (packageDir: string) => string;
|
|
3
4
|
export declare const effectDiagnostics: string[];
|
|
4
|
-
export declare function appDependencies(scope: string, packageSource: ResolvedPackageSource, app: WorkspaceApp, remotes?: WorkspaceApp[]): Record<string, string>;
|
|
5
|
+
export declare function appDependencies(scope: string, packageSource: ResolvedPackageSource, app: WorkspaceApp, remotes?: WorkspaceApp[], bridge?: UltramodernBridgeConfig): Record<string, string>;
|
|
5
6
|
export declare function appDevDependencies(packageSource: ResolvedPackageSource, enableTailwind: boolean): Record<string, string>;
|
|
6
|
-
export declare function createRootPackageJson(scope: string, packageSource: ResolvedPackageSource, remotes?: WorkspaceApp[]): JsonValue;
|
|
7
|
+
export declare function createRootPackageJson(scope: string, packageSource: ResolvedPackageSource, remotes?: WorkspaceApp[], bridge?: UltramodernBridgeConfig): JsonValue;
|
|
7
8
|
export declare function createZephyrDependencies(scope: string, app: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
8
9
|
export declare function createTsConfigBase(): JsonValue;
|
|
9
10
|
type CreatePackageTsConfigOptions = {
|
|
@@ -13,9 +14,10 @@ type CreatePackageTsConfigOptions = {
|
|
|
13
14
|
};
|
|
14
15
|
export declare function createPackageTsConfig(packageDir: string, options?: CreatePackageTsConfigOptions | boolean): JsonValue;
|
|
15
16
|
export declare function createAppTsConfig(app: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
17
|
+
export declare function createAppMfTypesTsConfig(app: WorkspaceApp): JsonValue;
|
|
16
18
|
export declare function createSharedPackageTsConfig(packageDir: string): JsonValue;
|
|
17
19
|
export declare function createRootTsConfig(apps?: WorkspaceApp[]): JsonValue;
|
|
18
|
-
export declare function createAppPackage(scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[]): JsonValue;
|
|
20
|
+
export declare function createAppPackage(scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[], bridge?: UltramodernBridgeConfig): JsonValue;
|
|
19
21
|
export declare function createSharedPackage(scope: string, id: string, description: string): JsonValue;
|
|
20
22
|
export declare function createSharedContractsIndex(): string;
|
|
21
23
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { addUltramodernVertical, planUltramodernVertical, } from './add-vertical';
|
|
2
|
+
export type { UltramodernBridgeConfig, UltramodernBridgeConfigInput, UltramodernBridgeGate, UltramodernBridgeGateInput, UltramodernBridgeLockfilePolicy, UltramodernBridgeTestAlias, UltramodernBridgeWorkspacePackage, UltramodernBridgeWorkspacePackageInput, UltramodernEnabledBridgeConfigInput, } from './bridge-config';
|
|
3
|
+
export { normalizeUltramodernBridgeConfig } from './bridge-config';
|
|
2
4
|
export type { AddUltramodernVerticalOptions, UltramodernCodeSmithOverlay, UltramodernCodeSmithOverlayRuntimeConfig, UltramodernGeneratedAppDescriptor, UltramodernGeneratedContractChange, UltramodernGenerationOperation, UltramodernGenerationResult, UltramodernGenerationWarning, UltramodernJsonMutation, UltramodernShellDependencyChange, UltramodernVerticalPlan, UltramodernWorkspaceOptions, } from './types';
|
|
3
5
|
export { generateUltramodernWorkspace } from './write-workspace';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ResolvedUltramodernPackageSource, UltramodernPackageSourceStrategy } from '../ultramodern-package-source';
|
|
2
|
+
import type { UltramodernBridgeConfigInput } from './bridge-config';
|
|
2
3
|
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
4
|
[key: string]: JsonValue;
|
|
4
5
|
};
|
|
@@ -78,6 +79,7 @@ export type UltramodernWorkspaceOptions = {
|
|
|
78
79
|
modernVersion: string;
|
|
79
80
|
enableTailwind?: boolean;
|
|
80
81
|
overlays?: UltramodernCodeSmithOverlay[];
|
|
82
|
+
bridge?: UltramodernBridgeConfigInput;
|
|
81
83
|
packageSource?: {
|
|
82
84
|
strategy?: UltramodernPackageSourceStrategy;
|
|
83
85
|
modernPackageVersion?: string;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* checked-in templates under templates/ and template-workspace/.
|
|
5
5
|
*/
|
|
6
6
|
export declare const TANSTACK_ROUTER_VERSION = "1.170.16";
|
|
7
|
+
export declare const TANSTACK_ROUTER_CORE_VERSION = "1.171.13";
|
|
7
8
|
export declare const MODULE_FEDERATION_VERSION = "2.6.0";
|
|
8
9
|
export declare const ZEPHYR_RSPACK_PLUGIN_VERSION = "1.1.1";
|
|
9
10
|
export declare const ZEPHYR_AGENT_VERSION = "1.1.1";
|
|
@@ -33,6 +34,7 @@ export declare const RSTACK_AGENT_SKILLS_COMMIT = "61c948b42512e223bad44b83af408
|
|
|
33
34
|
export declare const MODULE_FEDERATION_AGENT_SKILLS_COMMIT = "07bb5b6c43ad457609e00c081b72d4c42508ec76";
|
|
34
35
|
export declare const ultramodernWorkspaceVersions: {
|
|
35
36
|
tanstackRouter: string;
|
|
37
|
+
tanstackRouterCore: string;
|
|
36
38
|
moduleFederation: string;
|
|
37
39
|
tailwind: string;
|
|
38
40
|
tailwindPostcss: string;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { WorkspaceApp } from './types';
|
|
2
|
-
export declare function createAssertMfTypesScript(remotes?: WorkspaceApp[]): string;
|
|
3
2
|
export declare function createWorkspaceValidationScript(scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): string;
|
|
4
3
|
export declare function createWorkspaceI18nBoundaryValidationScript(): string;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function createCloudflareProofHelperScript(): string;
|
|
7
|
-
export declare function createCloudflareVersionProofScript(): string;
|
|
4
|
+
export declare function createWorkspaceApiBoundaryValidationScript(): string;
|
|
8
5
|
export declare function createPerformanceReadinessConfigScript(): string;
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function createUltramodernTypecheckScript(): string;
|
|
11
|
-
export declare function writeGeneratedWorkspaceScripts(targetDir: string, scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
|
|
6
|
+
export declare function writeGeneratedWorkspaceScripts(targetDir: string, _scope: string, _enableTailwind: boolean, _remotes?: WorkspaceApp[]): void;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { UltramodernBridgeConfig } from './bridge-config';
|
|
2
|
+
import type { JsonValue, ResolvedPackageSource, UltramodernGenerationResult, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
|
|
3
|
+
export declare function writeApp(targetDir: string, scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[], bridge?: UltramodernBridgeConfig): void;
|
|
3
4
|
export declare function writeSharedPackages(targetDir: string, scope: string): void;
|
|
5
|
+
export declare function createCompactUltramodernConfig(scope: string, modernVersion: string, packageSource: ResolvedPackageSource, apps?: WorkspaceApp[], enableTailwind?: boolean, bridge?: UltramodernBridgeConfig): JsonValue;
|
|
4
6
|
export declare function generateUltramodernWorkspace(options: UltramodernWorkspaceOptions): UltramodernGenerationResult;
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.4.0-ultramodern.
|
|
24
|
+
"version": "3.4.0-ultramodern.20",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/esm-node/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
],
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@modern-js/codesmith": "2.6.9",
|
|
78
|
-
"
|
|
78
|
+
"oxfmt": "0.55.0",
|
|
79
|
+
"ultracite": "7.8.3",
|
|
80
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.20"
|
|
79
81
|
},
|
|
80
82
|
"devDependencies": {
|
|
81
83
|
"@rslib/core": "0.23.0",
|
|
@@ -97,6 +99,6 @@
|
|
|
97
99
|
"test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
|
|
98
100
|
},
|
|
99
101
|
"ultramodern": {
|
|
100
|
-
"frameworkVersion": "3.4.0-ultramodern.
|
|
102
|
+
"frameworkVersion": "3.4.0-ultramodern.20"
|
|
101
103
|
}
|
|
102
104
|
}
|