@bleedingdev/modern-js-create 3.4.0-ultramodern.9 → 3.5.0-ultramodern.1
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 +49 -23
- 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 +431 -0
- package/dist/cjs/ultramodern-tooling/config.cjs +172 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +87 -75
- package/dist/cjs/ultramodern-workspace/{effect-api.cjs → api.cjs} +207 -208
- 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 +128 -657
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +12 -12
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +25 -25
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +117 -0
- package/dist/cjs/ultramodern-workspace/generation-result.cjs +5 -5
- 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 +39 -12
- package/dist/cjs/ultramodern-workspace/overlays.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/package-json.cjs +58 -41
- package/dist/cjs/ultramodern-workspace/policy.cjs +4 -4
- package/dist/cjs/ultramodern-workspace/public-api.cjs +4 -0
- package/dist/cjs/ultramodern-workspace/public-surface.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/versions.cjs +15 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +120 -50
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +64 -21
- 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 +378 -0
- package/dist/esm/ultramodern-tooling/config.js +120 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +88 -79
- package/dist/esm/ultramodern-workspace/{effect-api.js → api.js} +146 -147
- 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 +130 -611
- package/dist/esm/ultramodern-workspace/demo-components.js +13 -13
- package/dist/esm/ultramodern-workspace/descriptors.js +11 -11
- package/dist/esm/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm/ultramodern-workspace/generation-result.js +6 -6
- 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 +40 -13
- package/dist/esm/ultramodern-workspace/overlays.js +2 -2
- package/dist/esm/ultramodern-workspace/package-json.js +57 -40
- package/dist/esm/ultramodern-workspace/policy.js +5 -5
- package/dist/esm/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm/ultramodern-workspace/public-surface.js +2 -2
- package/dist/esm/ultramodern-workspace/versions.js +7 -1
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +108 -34
- package/dist/esm/ultramodern-workspace/write-workspace.js +66 -26
- 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 +379 -0
- package/dist/esm-node/ultramodern-tooling/config.js +121 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +88 -79
- package/dist/esm-node/ultramodern-workspace/{effect-api.js → api.js} +146 -147
- 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 +130 -611
- package/dist/esm-node/ultramodern-workspace/demo-components.js +13 -13
- package/dist/esm-node/ultramodern-workspace/descriptors.js +11 -11
- package/dist/esm-node/ultramodern-workspace/fs-io.js +116 -2
- package/dist/esm-node/ultramodern-workspace/generation-result.js +6 -6
- 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 +40 -13
- package/dist/esm-node/ultramodern-workspace/overlays.js +2 -2
- package/dist/esm-node/ultramodern-workspace/package-json.js +57 -40
- package/dist/esm-node/ultramodern-workspace/policy.js +5 -5
- package/dist/esm-node/ultramodern-workspace/public-api.js +1 -0
- package/dist/esm-node/ultramodern-workspace/public-surface.js +2 -2
- package/dist/esm-node/ultramodern-workspace/versions.js +7 -1
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +108 -34
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +66 -26
- 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/api.d.ts +73 -0
- 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 +10 -10
- 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/package-json.d.ts +5 -4
- package/dist/types/ultramodern-workspace/public-api.d.ts +2 -0
- package/dist/types/ultramodern-workspace/types.d.ts +9 -7
- package/dist/types/ultramodern-workspace/versions.d.ts +6 -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/.github/workflows/ultramodern-workspace-gates.yml.handlebars +2 -0
- package/template-workspace/.gitignore.handlebars +3 -0
- package/template-workspace/AGENTS.md.handlebars +11 -5
- package/template-workspace/README.md.handlebars +55 -13
- 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 +7 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +77 -67
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +51 -8
- package/templates/workspace-scripts/check-ultramodern-api-boundaries.mts +366 -0
- package/templates/workspace-scripts/{check-ultramodern-i18n-boundaries.mjs → check-ultramodern-i18n-boundaries.mts} +1 -1
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +246 -9
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +277 -9
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +35 -10
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +165 -2
- package/templates/workspace-scripts/ultramodern-typecheck.mjs +4 -2
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +842 -84
- package/dist/types/ultramodern-workspace/effect-api.d.ts +0 -73
- /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,11 +1,12 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import node_fs from "node:fs";
|
|
3
|
+
import { createApiClient, createApiServiceEntry, createSharedApi, createShellApiClient } from "./api.js";
|
|
3
4
|
import { createAppEnvDts, createAppRuntimeConfig, createAppStyles, createPostcssConfig, createSharedDesignTokensCss, createShellFrameComponent, createTailwindConfig } from "./app-files.js";
|
|
4
|
-
import {
|
|
5
|
+
import { normalizeUltramodernBridgeConfig } from "./bridge-config.js";
|
|
6
|
+
import { createDevelopmentOverlay, createOwnership, createTopology, createUltramodernConfig } from "./contracts.js";
|
|
5
7
|
import { createLayout, createRemoteEntry, createRemoteExposeComponent, createRemotePage, createShellPage, createShellRemoteComponents, remoteComponentOutputPath } from "./demo-components.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { copyRootTemplate, writeFile, writeJson } from "./fs-io.js";
|
|
8
|
+
import { ULTRAMODERN_CONFIG_PATH, appHasApi, appI18nNamespace, createShellHost, sharedPackages, shellApp } from "./descriptors.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
12
|
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule, createUltramodernBuildReexportModule } from "./module-federation.js";
|
|
@@ -14,15 +15,15 @@ import { runCodeSmithOverlays } from "./overlays.js";
|
|
|
14
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 { EFFECT_VERSION, EFFECT_VITEST_VERSION, 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));
|
|
27
28
|
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.mf-types.json`, createAppMfTypesTsConfig(resolvedApp));
|
|
28
29
|
writeFile(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(resolvedApp, remotes));
|
|
@@ -50,12 +51,12 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
50
51
|
if ('shell' === resolvedApp.kind) {
|
|
51
52
|
writeAppFile('src/routes/vertical-components.tsx', createShellRemoteComponents(scope, remotes));
|
|
52
53
|
writeAppFile('src/routes/shell-frame.tsx', createShellFrameComponent());
|
|
53
|
-
writeFile(targetDir, `${resolvedApp.directory}/src/
|
|
54
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/api/vertical-clients.ts`, createShellApiClient(scope, remotes));
|
|
54
55
|
}
|
|
55
|
-
if (
|
|
56
|
-
writeFile(targetDir, `${resolvedApp.directory}/shared/
|
|
57
|
-
writeFile(targetDir, `${resolvedApp.directory}/api/
|
|
58
|
-
writeFile(targetDir, `${resolvedApp.directory}/src/
|
|
56
|
+
if (appHasApi(resolvedApp)) {
|
|
57
|
+
writeFile(targetDir, `${resolvedApp.directory}/shared/api.ts`, createSharedApi(resolvedApp));
|
|
58
|
+
writeFile(targetDir, `${resolvedApp.directory}/api/index.ts`, createApiServiceEntry(resolvedApp, '../shared/api.ts'));
|
|
59
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/api/${resolvedApp.api.stem}-client.ts`, createApiClient(resolvedApp, '../../shared/api'));
|
|
59
60
|
}
|
|
60
61
|
if ('vertical' === resolvedApp.kind) {
|
|
61
62
|
writeAppFile('src/federation-entry.tsx', createRemoteEntry(resolvedApp));
|
|
@@ -81,10 +82,36 @@ function writeSharedPackages(targetDir, scope) {
|
|
|
81
82
|
`);
|
|
82
83
|
writeFile(targetDir, 'packages/shared-design-tokens/src/tokens.css', createSharedDesignTokensCss());
|
|
83
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
|
+
}
|
|
84
110
|
function generateUltramodernWorkspace(options) {
|
|
85
111
|
const beforeFiles = createFileSnapshot(options.targetDir);
|
|
86
112
|
const scope = toPackageScope(options.packageName);
|
|
87
113
|
const packageSource = resolvePackageSource(options);
|
|
114
|
+
const bridge = normalizeUltramodernBridgeConfig(options.bridge);
|
|
88
115
|
const enableTailwind = false !== options.enableTailwind;
|
|
89
116
|
const initialVerticals = [];
|
|
90
117
|
const createdApps = [
|
|
@@ -104,39 +131,52 @@ function generateUltramodernWorkspace(options) {
|
|
|
104
131
|
nodeVersion: NODE_VERSION,
|
|
105
132
|
pnpmVersion: PNPM_VERSION,
|
|
106
133
|
nodeFetchVersion: NODE_FETCH_VERSION,
|
|
134
|
+
effectVersion: EFFECT_VERSION,
|
|
135
|
+
effectVitestVersion: EFFECT_VITEST_VERSION,
|
|
136
|
+
tanstackRouterCoreVersion: TANSTACK_ROUTER_CORE_VERSION,
|
|
107
137
|
tanstackRouterVersion: TANSTACK_ROUTER_VERSION,
|
|
108
138
|
typescriptVersion: TYPESCRIPT_VERSION,
|
|
109
139
|
tailwindEnabled: String(enableTailwind)
|
|
110
140
|
});
|
|
111
|
-
|
|
141
|
+
writePnpmWorkspacePackages(options.targetDir, bridge);
|
|
142
|
+
writeJson(options.targetDir, 'package.json', createCompactRootPackageJson(scope, packageSource, initialVerticals, bridge));
|
|
112
143
|
writeJson(options.targetDir, 'tsconfig.base.json', createTsConfigBase());
|
|
113
144
|
writeJson(options.targetDir, 'tsconfig.json', createRootTsConfig(createdApps));
|
|
114
145
|
writeJson(options.targetDir, 'topology/reference-topology.json', createTopology(scope, initialVerticals));
|
|
115
146
|
writeJson(options.targetDir, 'topology/ownership.json', createOwnership(scope, initialVerticals));
|
|
116
147
|
writeJson(options.targetDir, 'topology/local-overlays/development.json', createDevelopmentOverlay(initialVerticals));
|
|
117
|
-
writeJson(options.targetDir,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
writeApp(options.targetDir, scope, shellApp, packageSource, enableTailwind, initialVerticals);
|
|
121
|
-
for (const remote of initialVerticals)writeApp(options.targetDir, scope, remote, packageSource, enableTailwind, initialVerticals);
|
|
148
|
+
writeJson(options.targetDir, ULTRAMODERN_CONFIG_PATH, createCompactUltramodernConfig(scope, options.modernVersion, packageSource, createdApps, enableTailwind, bridge));
|
|
149
|
+
writeApp(options.targetDir, scope, shellApp, packageSource, enableTailwind, initialVerticals, bridge);
|
|
150
|
+
for (const remote of initialVerticals)writeApp(options.targetDir, scope, remote, packageSource, enableTailwind, initialVerticals, bridge);
|
|
122
151
|
writeSharedPackages(options.targetDir, scope);
|
|
123
152
|
writeGeneratedWorkspaceScripts(options.targetDir, scope, enableTailwind, initialVerticals);
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
153
|
+
const preliminaryAfterFiles = createFileSnapshot(options.targetDir);
|
|
154
|
+
const preliminaryDiff = diffFileSnapshots(beforeFiles, preliminaryAfterFiles);
|
|
155
|
+
const preliminaryResult = createGenerationResult({
|
|
127
156
|
operation: 'workspace',
|
|
128
157
|
workspaceRoot: options.targetDir,
|
|
129
158
|
packageScope: scope,
|
|
130
159
|
packageSource,
|
|
131
160
|
createdApps,
|
|
132
|
-
createdPaths,
|
|
133
|
-
rewrittenPaths
|
|
161
|
+
createdPaths: preliminaryDiff.createdPaths,
|
|
162
|
+
rewrittenPaths: preliminaryDiff.rewrittenPaths
|
|
134
163
|
});
|
|
135
164
|
runCodeSmithOverlays({
|
|
136
165
|
workspaceRoot: options.targetDir,
|
|
137
166
|
overlays: options.overlays,
|
|
138
|
-
result
|
|
167
|
+
result: preliminaryResult
|
|
168
|
+
});
|
|
169
|
+
formatGeneratedWorkspaceFiles(options.targetDir);
|
|
170
|
+
const afterFiles = createFileSnapshot(options.targetDir);
|
|
171
|
+
const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
|
|
172
|
+
return createGenerationResult({
|
|
173
|
+
operation: 'workspace',
|
|
174
|
+
workspaceRoot: options.targetDir,
|
|
175
|
+
packageScope: scope,
|
|
176
|
+
packageSource,
|
|
177
|
+
createdApps,
|
|
178
|
+
createdPaths,
|
|
179
|
+
rewrittenPaths
|
|
139
180
|
});
|
|
140
|
-
return result;
|
|
141
181
|
}
|
|
142
|
-
export { generateUltramodernWorkspace, writeApp, writeSharedPackages };
|
|
182
|
+
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, WorkspaceApi, WorkspaceApp } 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
|
+
api?: WorkspaceApi;
|
|
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,73 @@
|
|
|
1
|
+
import type { JsonValue, WorkspaceApi, WorkspaceApp } from './types';
|
|
2
|
+
export declare function verticalApiExport(service: {
|
|
3
|
+
id: string;
|
|
4
|
+
api?: WorkspaceApi;
|
|
5
|
+
}): string;
|
|
6
|
+
export declare function verticalApiGroupName(service: {
|
|
7
|
+
id: string;
|
|
8
|
+
api?: WorkspaceApi;
|
|
9
|
+
}): string;
|
|
10
|
+
export declare function verticalApiName(service: {
|
|
11
|
+
id: string;
|
|
12
|
+
api?: WorkspaceApi;
|
|
13
|
+
}): string;
|
|
14
|
+
export declare function verticalApiSchemaExport(service: {
|
|
15
|
+
id: string;
|
|
16
|
+
api?: WorkspaceApi;
|
|
17
|
+
}): string;
|
|
18
|
+
export declare function verticalApiMarkerSchemaExport(service: {
|
|
19
|
+
id: string;
|
|
20
|
+
api?: WorkspaceApi;
|
|
21
|
+
}): string;
|
|
22
|
+
export declare function verticalApiReadinessSchemaExport(service: {
|
|
23
|
+
id: string;
|
|
24
|
+
api?: WorkspaceApi;
|
|
25
|
+
}): string;
|
|
26
|
+
export declare function verticalApiErrorStem(service: {
|
|
27
|
+
id: string;
|
|
28
|
+
api?: WorkspaceApi;
|
|
29
|
+
}): string;
|
|
30
|
+
export declare function verticalApiCreatePayloadSchemaExport(service: {
|
|
31
|
+
id: string;
|
|
32
|
+
api?: WorkspaceApi;
|
|
33
|
+
}): string;
|
|
34
|
+
export declare function verticalApiNotFoundErrorExport(service: {
|
|
35
|
+
id: string;
|
|
36
|
+
api?: WorkspaceApi;
|
|
37
|
+
}): string;
|
|
38
|
+
export declare function verticalApiNotFoundSchemaExport(service: {
|
|
39
|
+
id: string;
|
|
40
|
+
api?: WorkspaceApi;
|
|
41
|
+
}): string;
|
|
42
|
+
export declare function createSharedApiImports(): string;
|
|
43
|
+
export declare function createSharedApiContract(service: {
|
|
44
|
+
id: string;
|
|
45
|
+
api?: WorkspaceApi;
|
|
46
|
+
}): string;
|
|
47
|
+
export declare function createSharedApi(service: {
|
|
48
|
+
id: string;
|
|
49
|
+
api?: WorkspaceApi;
|
|
50
|
+
}): string;
|
|
51
|
+
export declare function createApiServiceEntry(service: {
|
|
52
|
+
id: string;
|
|
53
|
+
api?: WorkspaceApi;
|
|
54
|
+
}, contractImportPath: string): string;
|
|
55
|
+
export declare function createApiClient(service: {
|
|
56
|
+
id: string;
|
|
57
|
+
api?: WorkspaceApi;
|
|
58
|
+
}, contractImportPath: string): string;
|
|
59
|
+
export declare function createShellApiClient(scope: string, remotes?: WorkspaceApp[]): string;
|
|
60
|
+
export declare function createApiReadinessContract(app: {
|
|
61
|
+
id: string;
|
|
62
|
+
api?: WorkspaceApi;
|
|
63
|
+
}): JsonValue;
|
|
64
|
+
export declare function createApiRequestContextContract(): JsonValue;
|
|
65
|
+
export declare function createApiDomainOperations(app: {
|
|
66
|
+
id: string;
|
|
67
|
+
api?: WorkspaceApi;
|
|
68
|
+
}): JsonValue;
|
|
69
|
+
export declare function apiTopologyMetadata(app: WorkspaceApp): JsonValue | undefined;
|
|
70
|
+
export declare function createApiOperationContract(target: {
|
|
71
|
+
id: string;
|
|
72
|
+
api?: WorkspaceApi;
|
|
73
|
+
}): 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
|
-
import type { Ownership,
|
|
2
|
-
export declare const
|
|
1
|
+
import type { Ownership, WorkspaceApi, WorkspaceApp } from './types';
|
|
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,19 +9,19 @@ export declare const sharedPackages: {
|
|
|
9
9
|
}[];
|
|
10
10
|
export declare function createNeutralOwnership(id: string, tier?: string): Ownership;
|
|
11
11
|
export declare function createVerticalDescriptor(name: string, port: number): WorkspaceApp;
|
|
12
|
-
export declare function
|
|
13
|
-
|
|
12
|
+
export declare function appHasApi(app: WorkspaceApp): app is WorkspaceApp & {
|
|
13
|
+
api: WorkspaceApi;
|
|
14
14
|
};
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function resolveApiPrefix(target: {
|
|
16
16
|
id: string;
|
|
17
|
-
|
|
17
|
+
api?: WorkspaceApi;
|
|
18
18
|
}): string;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function resolveApiStem(target: {
|
|
20
20
|
id: string;
|
|
21
|
-
|
|
21
|
+
api?: WorkspaceApi;
|
|
22
22
|
}): string;
|
|
23
|
-
export declare function
|
|
24
|
-
|
|
23
|
+
export declare function verticalApiApps(remotes?: WorkspaceApp[]): (WorkspaceApp & {
|
|
24
|
+
api: WorkspaceApi;
|
|
25
25
|
})[];
|
|
26
26
|
export declare function remoteDependencyAlias(remote: WorkspaceApp): string;
|
|
27
27
|
export declare function zephyrRemoteDependency(scope: string, remote: WorkspaceApp): string;
|
|
@@ -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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { UltramodernBridgeConfig } from './bridge-config';
|
|
1
2
|
import type { JsonValue, ResolvedPackageSource, WorkspaceApp } from './types';
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const createStrictTsgoTypecheckCommand: (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 = {
|
|
@@ -16,7 +17,7 @@ export declare function createAppTsConfig(app: WorkspaceApp, remotes?: Workspace
|
|
|
16
17
|
export declare function createAppMfTypesTsConfig(app: WorkspaceApp): JsonValue;
|
|
17
18
|
export declare function createSharedPackageTsConfig(packageDir: string): JsonValue;
|
|
18
19
|
export declare function createRootTsConfig(apps?: WorkspaceApp[]): JsonValue;
|
|
19
|
-
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;
|
|
20
21
|
export declare function createSharedPackage(scope: string, id: string, description: string): JsonValue;
|
|
21
22
|
export declare function createSharedContractsIndex(): string;
|
|
22
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';
|