@bleedingdev/modern-js-create 3.2.0-ultramodern.99 → 3.4.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 +281 -106
- package/bin/run.js +1 -0
- package/dist/cjs/create-package-root.cjs +63 -0
- package/dist/cjs/index.cjs +658 -0
- package/dist/cjs/locale/en.cjs +101 -0
- package/dist/cjs/locale/index.cjs +50 -0
- package/dist/cjs/locale/zh.cjs +101 -0
- package/dist/cjs/ultramodern-package-source.cjs +135 -0
- package/dist/cjs/ultramodern-workspace/add-vertical.cjs +603 -0
- package/dist/cjs/ultramodern-workspace/app-files.cjs +223 -0
- package/dist/cjs/ultramodern-workspace/codesmith.cjs +134 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +837 -0
- package/dist/cjs/ultramodern-workspace/demo-components.cjs +422 -0
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +222 -0
- package/dist/cjs/ultramodern-workspace/effect-api.cjs +952 -0
- package/dist/cjs/ultramodern-workspace/fs-io.cjs +191 -0
- package/dist/cjs/ultramodern-workspace/generation-result.cjs +158 -0
- package/dist/cjs/ultramodern-workspace/index.cjs +51 -0
- package/dist/cjs/ultramodern-workspace/locales.cjs +173 -0
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +487 -0
- package/dist/cjs/ultramodern-workspace/naming.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/overlays.cjs +120 -0
- package/dist/cjs/ultramodern-workspace/package-json.cjs +406 -0
- package/dist/cjs/ultramodern-workspace/package-source.cjs +59 -0
- package/dist/cjs/ultramodern-workspace/policy.cjs +248 -0
- package/dist/cjs/ultramodern-workspace/public-api.cjs +47 -0
- package/dist/cjs/ultramodern-workspace/public-surface.cjs +268 -0
- package/dist/cjs/ultramodern-workspace/routes.cjs +375 -0
- package/dist/cjs/ultramodern-workspace/types.cjs +61 -0
- package/dist/cjs/ultramodern-workspace/versions.cjs +161 -0
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +154 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +197 -0
- package/dist/esm/create-package-root.js +14 -0
- package/dist/esm/index.js +621 -0
- package/dist/esm/locale/en.js +63 -0
- package/dist/esm/locale/index.js +9 -0
- package/dist/esm/locale/zh.js +63 -0
- package/dist/esm/ultramodern-package-source.js +63 -0
- package/dist/esm/ultramodern-workspace/add-vertical.js +511 -0
- package/dist/esm/ultramodern-workspace/app-files.js +149 -0
- package/dist/esm/ultramodern-workspace/codesmith.js +86 -0
- package/dist/esm/ultramodern-workspace/contracts.js +742 -0
- package/dist/esm/ultramodern-workspace/demo-components.js +363 -0
- package/dist/esm/ultramodern-workspace/descriptors.js +133 -0
- package/dist/esm/ultramodern-workspace/effect-api.js +854 -0
- package/dist/esm/ultramodern-workspace/fs-io.js +90 -0
- package/dist/esm/ultramodern-workspace/generation-result.js +102 -0
- package/dist/esm/ultramodern-workspace/index.js +3 -0
- package/dist/esm/ultramodern-workspace/locales.js +122 -0
- package/dist/esm/ultramodern-workspace/module-federation.js +415 -0
- package/dist/esm/ultramodern-workspace/naming.js +71 -0
- package/dist/esm/ultramodern-workspace/overlays.js +79 -0
- package/dist/esm/ultramodern-workspace/package-json.js +338 -0
- package/dist/esm/ultramodern-workspace/package-source.js +21 -0
- package/dist/esm/ultramodern-workspace/policy.js +183 -0
- package/dist/esm/ultramodern-workspace/public-api.js +2 -0
- package/dist/esm/ultramodern-workspace/public-surface.js +183 -0
- package/dist/esm/ultramodern-workspace/routes.js +280 -0
- package/dist/esm/ultramodern-workspace/types.js +16 -0
- package/dist/esm/ultramodern-workspace/versions.js +36 -0
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +92 -0
- package/dist/esm/ultramodern-workspace/write-workspace.js +143 -0
- package/dist/esm-node/create-package-root.js +15 -0
- package/dist/esm-node/index.js +622 -0
- package/dist/esm-node/locale/en.js +64 -0
- package/dist/esm-node/locale/index.js +10 -0
- package/dist/esm-node/locale/zh.js +64 -0
- package/dist/esm-node/ultramodern-package-source.js +64 -0
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +512 -0
- package/dist/esm-node/ultramodern-workspace/app-files.js +150 -0
- package/dist/esm-node/ultramodern-workspace/codesmith.js +87 -0
- package/dist/esm-node/ultramodern-workspace/contracts.js +743 -0
- package/dist/esm-node/ultramodern-workspace/demo-components.js +364 -0
- package/dist/esm-node/ultramodern-workspace/descriptors.js +134 -0
- package/dist/esm-node/ultramodern-workspace/effect-api.js +855 -0
- package/dist/esm-node/ultramodern-workspace/fs-io.js +91 -0
- package/dist/esm-node/ultramodern-workspace/generation-result.js +103 -0
- package/dist/esm-node/ultramodern-workspace/index.js +4 -0
- package/dist/esm-node/ultramodern-workspace/locales.js +123 -0
- package/dist/esm-node/ultramodern-workspace/module-federation.js +416 -0
- package/dist/esm-node/ultramodern-workspace/naming.js +72 -0
- package/dist/esm-node/ultramodern-workspace/overlays.js +80 -0
- package/dist/esm-node/ultramodern-workspace/package-json.js +339 -0
- package/dist/esm-node/ultramodern-workspace/package-source.js +22 -0
- package/dist/esm-node/ultramodern-workspace/policy.js +184 -0
- package/dist/esm-node/ultramodern-workspace/public-api.js +3 -0
- package/dist/esm-node/ultramodern-workspace/public-surface.js +184 -0
- package/dist/esm-node/ultramodern-workspace/routes.js +281 -0
- package/dist/esm-node/ultramodern-workspace/types.js +17 -0
- package/dist/esm-node/ultramodern-workspace/versions.js +37 -0
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +93 -0
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +144 -0
- package/dist/types/create-package-root.d.ts +1 -0
- package/dist/types/locale/en.d.ts +12 -8
- package/dist/types/locale/index.d.ts +125 -2
- package/dist/types/locale/zh.d.ts +12 -8
- package/dist/types/ultramodern-package-source.d.ts +28 -0
- package/dist/types/ultramodern-workspace/add-vertical.d.ts +36 -0
- package/dist/types/ultramodern-workspace/app-files.d.ts +14 -0
- package/dist/types/ultramodern-workspace/codesmith.d.ts +53 -0
- package/dist/types/ultramodern-workspace/contracts.d.ts +21 -0
- package/dist/types/ultramodern-workspace/demo-components.d.ts +9 -0
- package/dist/types/ultramodern-workspace/descriptors.d.ts +39 -0
- package/dist/types/ultramodern-workspace/effect-api.d.ts +73 -0
- package/dist/types/ultramodern-workspace/fs-io.d.ts +18 -0
- package/dist/types/ultramodern-workspace/generation-result.d.ts +14 -0
- package/dist/types/ultramodern-workspace/index.d.ts +4 -0
- package/dist/types/ultramodern-workspace/locales.d.ts +183 -0
- package/dist/types/ultramodern-workspace/module-federation.d.ts +16 -0
- package/dist/types/ultramodern-workspace/naming.d.ts +16 -0
- package/dist/types/ultramodern-workspace/overlays.d.ts +6 -0
- package/dist/types/ultramodern-workspace/package-json.d.ts +12 -0
- package/dist/types/ultramodern-workspace/package-source.d.ts +2 -0
- package/dist/types/ultramodern-workspace/policy.d.ts +60 -0
- package/dist/types/ultramodern-workspace/public-api.d.ts +3 -0
- package/dist/types/ultramodern-workspace/public-surface.d.ts +37 -0
- package/dist/types/ultramodern-workspace/routes.d.ts +25 -0
- package/dist/types/ultramodern-workspace/types.d.ts +197 -0
- package/dist/types/ultramodern-workspace/versions.d.ts +40 -0
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +10 -0
- package/dist/types/ultramodern-workspace/write-workspace.d.ts +4 -0
- package/package.json +58 -15
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +23 -10
- package/template-workspace/.mise.toml.handlebars +1 -0
- package/template-workspace/{AGENTS.md → AGENTS.md.handlebars} +20 -9
- package/template-workspace/README.md.handlebars +85 -14
- package/template-workspace/lefthook.yml +18 -4
- package/template-workspace/pnpm-workspace.yaml.handlebars +45 -0
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +69 -75
- package/template-workspace/scripts/setup-agent-reference-repos.mjs +8 -6
- package/templates/app/shell-frame.tsx +49 -0
- package/templates/app/ultramodern-route-head.tsx.handlebars +142 -0
- package/templates/packages/shared-contracts-index.ts +466 -0
- package/templates/workspace-scripts/assert-mf-types.mjs.handlebars +69 -0
- package/templates/workspace-scripts/check-ultramodern-i18n-boundaries.mjs +9 -0
- package/templates/workspace-scripts/generate-public-surface-assets.mjs +529 -0
- package/templates/workspace-scripts/proof-cloudflare-version.mjs +125 -0
- package/templates/workspace-scripts/ultramodern-cloudflare-proof.mjs +851 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.config.mjs +7 -0
- package/templates/workspace-scripts/ultramodern-performance-readiness.mjs +223 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +986 -0
- package/dist/index.js +0 -6625
- package/dist/types/ultramodern-workspace.d.ts +0 -31
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.codex/hooks.json +0 -16
- package/template/.github/renovate.json +0 -53
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -54
- package/template/.gitignore.handlebars +0 -30
- package/template/.mise.toml.handlebars +0 -2
- package/template/.nvmrc +0 -2
- package/template/AGENTS.md +0 -23
- package/template/README.md +0 -105
- package/template/api/effect/index.ts.handlebars +0 -34
- package/template/api/lambda/hello.ts.handlebars +0 -6
- package/template/config/public/locales/cs/translation.json +0 -39
- package/template/config/public/locales/en/translation.json +0 -39
- package/template/lefthook.yml +0 -10
- package/template/modern.config.ts.handlebars +0 -71
- package/template/oxfmt.config.ts +0 -15
- package/template/oxlint.config.ts +0 -19
- package/template/package.json.handlebars +0 -66
- package/template/pnpm-workspace.yaml +0 -29
- package/template/postcss.config.mjs.handlebars +0 -6
- package/template/rstest.config.mts +0 -5
- package/template/scripts/bootstrap-agent-skills.mjs +0 -228
- package/template/scripts/check-i18n-strings.mjs +0 -94
- package/template/scripts/validate-ultramodern.mjs.handlebars +0 -538
- package/template/shared/effect/api.ts.handlebars +0 -17
- package/template/src/modern-app-env.d.ts +0 -3
- package/template/src/modern.runtime.ts.handlebars +0 -23
- package/template/src/routes/[lang]/page.tsx.handlebars +0 -211
- package/template/src/routes/index.css.handlebars +0 -129
- package/template/src/routes/layout.tsx.handlebars +0 -10
- package/template/tailwind.config.ts.handlebars +0 -10
- package/template/tests/tsconfig.json +0 -7
- package/template/tests/ultramodern.contract.test.ts.handlebars +0 -78
- package/template/tsconfig.json +0 -120
- package/template-workspace/pnpm-workspace.yaml +0 -35
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import node_fs from "node:fs";
|
|
3
|
+
import { createAppEnvDts, createAppRuntimeConfig, createAppStyles, createPostcssConfig, createSharedDesignTokensCss, createShellFrameComponent, createTailwindConfig } from "./app-files.js";
|
|
4
|
+
import { createDevelopmentOverlay, createGeneratedContract, createOwnership, createPackageSourceMetadata, createTemplateManifest, createTopology } from "./contracts.js";
|
|
5
|
+
import { createLayout, createRemoteEntry, createRemoteExposeComponent, createRemotePage, createShellPage, createShellRemoteComponents, remoteComponentOutputPath } from "./demo-components.js";
|
|
6
|
+
import { GENERATED_CONTRACT_PATH, appHasEffectApi, appI18nNamespace, createShellHost, sharedPackages, shellApp } from "./descriptors.js";
|
|
7
|
+
import { createEffectClient, createEffectServiceEntry, createEffectSharedApi, createShellEffectClient } from "./effect-api.js";
|
|
8
|
+
import { copyRootTemplate, writeFile, writeJson } from "./fs-io.js";
|
|
9
|
+
import { createFileSnapshot, createGenerationResult, diffFileSnapshots } from "./generation-result.js";
|
|
10
|
+
import { createAppPublicLocaleMessages } from "./locales.js";
|
|
11
|
+
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule } from "./module-federation.js";
|
|
12
|
+
import { assertUniqueTailwindPrefixes, relativeRootFor, toPackageScope } from "./naming.js";
|
|
13
|
+
import { runCodeSmithOverlays } from "./overlays.js";
|
|
14
|
+
import { createAppPackage, createPackageTsConfig, createRootPackageJson, createSharedContractsIndex, createSharedPackage, createTsConfigBase } from "./package-json.js";
|
|
15
|
+
import { resolvePackageSource } from "./package-source.js";
|
|
16
|
+
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 { writeGeneratedWorkspaceScripts } from "./workspace-scripts.js";
|
|
19
|
+
function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes = []) {
|
|
20
|
+
const resolvedApp = 'shell' === app.kind ? createShellHost(remotes) : app;
|
|
21
|
+
const publicWeb = createPublicWebAppArtifacts(resolvedApp);
|
|
22
|
+
const writeAppFile = (relativePath, content)=>{
|
|
23
|
+
writeFile(targetDir, `${resolvedApp.directory}/${relativePath}`, content);
|
|
24
|
+
};
|
|
25
|
+
writeJson(targetDir, `${resolvedApp.directory}/package.json`, createAppPackage(scope, resolvedApp, packageSource, enableTailwind, remotes));
|
|
26
|
+
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`, createPackageTsConfig(resolvedApp.directory, appHasEffectApi(resolvedApp)));
|
|
27
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(resolvedApp, remotes));
|
|
28
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, createUltramodernBuildModule(scope, resolvedApp));
|
|
29
|
+
writeFile(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
|
|
30
|
+
writeFile(targetDir, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
|
|
31
|
+
writeFile(targetDir, publicWeb.routeHeadFile.path, publicWeb.routeHeadFile.content);
|
|
32
|
+
writeFile(targetDir, `${resolvedApp.directory}/modern.config.ts`, createAppModernConfig(scope, resolvedApp));
|
|
33
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/modern.runtime.ts`, createAppRuntimeConfig(resolvedApp, scope, remotes));
|
|
34
|
+
writeJson(targetDir, `${resolvedApp.directory}/locales/en/translation.json`, createAppPublicLocaleMessages(resolvedApp, 'en', remotes));
|
|
35
|
+
writeJson(targetDir, `${resolvedApp.directory}/locales/en/${appI18nNamespace(resolvedApp)}.json`, createAppPublicLocaleMessages(resolvedApp, 'en', remotes));
|
|
36
|
+
writeJson(targetDir, `${resolvedApp.directory}/locales/cs/translation.json`, createAppPublicLocaleMessages(resolvedApp, 'cs', remotes));
|
|
37
|
+
writeJson(targetDir, `${resolvedApp.directory}/locales/cs/${appI18nNamespace(resolvedApp)}.json`, createAppPublicLocaleMessages(resolvedApp, 'cs', remotes));
|
|
38
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/routes/index.css`, createAppStyles(enableTailwind, scope, resolvedApp));
|
|
39
|
+
if (enableTailwind) {
|
|
40
|
+
writeFile(targetDir, `${resolvedApp.directory}/postcss.config.mjs`, createPostcssConfig());
|
|
41
|
+
writeFile(targetDir, `${resolvedApp.directory}/tailwind.config.ts`, createTailwindConfig());
|
|
42
|
+
}
|
|
43
|
+
writeFile(targetDir, `${resolvedApp.directory}/module-federation.config.ts`, 'shell' === resolvedApp.kind ? createShellModuleFederationConfig(scope, remotes) : createRemoteModuleFederationConfig(scope, resolvedApp, remotes));
|
|
44
|
+
writeAppFile('src/routes/layout.tsx', createLayout(resolvedApp.id));
|
|
45
|
+
writeAppFile('src/routes/[lang]/page.tsx', 'shell' === resolvedApp.kind ? createShellPage(remotes) : createRemotePage(resolvedApp));
|
|
46
|
+
for (const generatedFile of publicWeb.routeMetaFiles)writeFile(targetDir, generatedFile.path, generatedFile.content);
|
|
47
|
+
for (const generatedFile of publicWeb.routeAliasFiles)writeFile(targetDir, generatedFile.path, generatedFile.content);
|
|
48
|
+
if ('shell' === resolvedApp.kind) {
|
|
49
|
+
writeAppFile('src/routes/vertical-components.tsx', createShellRemoteComponents(scope, remotes));
|
|
50
|
+
writeAppFile('src/routes/shell-frame.tsx', createShellFrameComponent());
|
|
51
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/effect/vertical-clients.ts`, createShellEffectClient(scope, remotes));
|
|
52
|
+
}
|
|
53
|
+
if (appHasEffectApi(resolvedApp)) {
|
|
54
|
+
writeFile(targetDir, `${resolvedApp.directory}/shared/effect/api.ts`, createEffectSharedApi(resolvedApp));
|
|
55
|
+
writeFile(targetDir, `${resolvedApp.directory}/api/effect/index.ts`, createEffectServiceEntry(resolvedApp, '../../shared/effect/api.ts'));
|
|
56
|
+
writeFile(targetDir, `${resolvedApp.directory}/src/effect/${resolvedApp.effectApi.stem}-client.ts`, createEffectClient(resolvedApp, '../../shared/effect/api'));
|
|
57
|
+
}
|
|
58
|
+
if ('vertical' === resolvedApp.kind) {
|
|
59
|
+
writeAppFile('src/federation-entry.tsx', createRemoteEntry(resolvedApp));
|
|
60
|
+
for (const expose of Object.keys(resolvedApp.exposes ?? {})){
|
|
61
|
+
const outputPath = remoteComponentOutputPath(resolvedApp, expose);
|
|
62
|
+
if (outputPath) writeAppFile(outputPath.slice(resolvedApp.directory.length + 1), createRemoteExposeComponent(resolvedApp, expose));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function writeSharedPackages(targetDir, scope) {
|
|
67
|
+
for (const sharedPackage of sharedPackages){
|
|
68
|
+
writeJson(targetDir, `${sharedPackage.directory}/package.json`, createSharedPackage(scope, sharedPackage.id, sharedPackage.description));
|
|
69
|
+
writeJson(targetDir, `${sharedPackage.directory}/tsconfig.json`, {
|
|
70
|
+
extends: `${relativeRootFor(sharedPackage.directory)}/tsconfig.base.json`,
|
|
71
|
+
include: [
|
|
72
|
+
'src'
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
writeFile(targetDir, 'packages/shared-contracts/src/index.ts', createSharedContractsIndex());
|
|
77
|
+
writeFile(targetDir, 'packages/shared-design-tokens/src/index.ts', `export const sharedDesignTokens = {
|
|
78
|
+
color: {
|
|
79
|
+
accent: '#2f8f68',
|
|
80
|
+
foreground: '#133225',
|
|
81
|
+
surface: '#f6fbf7',
|
|
82
|
+
},
|
|
83
|
+
} as const;
|
|
84
|
+
`);
|
|
85
|
+
writeFile(targetDir, 'packages/shared-design-tokens/src/tokens.css', createSharedDesignTokensCss());
|
|
86
|
+
}
|
|
87
|
+
function generateUltramodernWorkspace(options) {
|
|
88
|
+
const beforeFiles = createFileSnapshot(options.targetDir);
|
|
89
|
+
const scope = toPackageScope(options.packageName);
|
|
90
|
+
const packageSource = resolvePackageSource(options);
|
|
91
|
+
const enableTailwind = false !== options.enableTailwind;
|
|
92
|
+
const initialVerticals = [];
|
|
93
|
+
const createdApps = [
|
|
94
|
+
createShellHost(initialVerticals),
|
|
95
|
+
...initialVerticals
|
|
96
|
+
];
|
|
97
|
+
assertUniqueTailwindPrefixes([
|
|
98
|
+
shellApp,
|
|
99
|
+
...initialVerticals
|
|
100
|
+
]);
|
|
101
|
+
node_fs.mkdirSync(options.targetDir, {
|
|
102
|
+
recursive: true
|
|
103
|
+
});
|
|
104
|
+
copyRootTemplate(options.targetDir, {
|
|
105
|
+
packageName: options.packageName,
|
|
106
|
+
packageScope: scope,
|
|
107
|
+
nodeVersion: NODE_VERSION,
|
|
108
|
+
pnpmVersion: PNPM_VERSION,
|
|
109
|
+
nodeFetchVersion: NODE_FETCH_VERSION,
|
|
110
|
+
tanstackRouterVersion: TANSTACK_ROUTER_VERSION,
|
|
111
|
+
typescriptVersion: TYPESCRIPT_VERSION,
|
|
112
|
+
tailwindEnabled: String(enableTailwind)
|
|
113
|
+
});
|
|
114
|
+
writeJson(options.targetDir, 'package.json', createRootPackageJson(scope, packageSource, initialVerticals));
|
|
115
|
+
writeJson(options.targetDir, 'tsconfig.base.json', createTsConfigBase());
|
|
116
|
+
writeJson(options.targetDir, 'topology/reference-topology.json', createTopology(scope, initialVerticals));
|
|
117
|
+
writeJson(options.targetDir, 'topology/ownership.json', createOwnership(scope, initialVerticals));
|
|
118
|
+
writeJson(options.targetDir, 'topology/local-overlays/development.json', createDevelopmentOverlay(initialVerticals));
|
|
119
|
+
writeJson(options.targetDir, '.modernjs/ultramodern-workspace-template-manifest.json', createTemplateManifest(options.modernVersion, packageSource));
|
|
120
|
+
writeJson(options.targetDir, '.modernjs/ultramodern-package-source.json', createPackageSourceMetadata(scope, packageSource));
|
|
121
|
+
writeJson(options.targetDir, GENERATED_CONTRACT_PATH, createGeneratedContract(scope, createdApps, enableTailwind));
|
|
122
|
+
writeApp(options.targetDir, scope, shellApp, packageSource, enableTailwind, initialVerticals);
|
|
123
|
+
for (const remote of initialVerticals)writeApp(options.targetDir, scope, remote, packageSource, enableTailwind, initialVerticals);
|
|
124
|
+
writeSharedPackages(options.targetDir, scope);
|
|
125
|
+
writeGeneratedWorkspaceScripts(options.targetDir, scope, enableTailwind, initialVerticals);
|
|
126
|
+
const afterFiles = createFileSnapshot(options.targetDir);
|
|
127
|
+
const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
|
|
128
|
+
const result = createGenerationResult({
|
|
129
|
+
operation: 'workspace',
|
|
130
|
+
workspaceRoot: options.targetDir,
|
|
131
|
+
packageScope: scope,
|
|
132
|
+
packageSource,
|
|
133
|
+
createdApps,
|
|
134
|
+
createdPaths,
|
|
135
|
+
rewrittenPaths
|
|
136
|
+
});
|
|
137
|
+
runCodeSmithOverlays({
|
|
138
|
+
workspaceRoot: options.targetDir,
|
|
139
|
+
overlays: options.overlays,
|
|
140
|
+
result
|
|
141
|
+
});
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
export { generateUltramodernWorkspace, writeApp, writeSharedPackages };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveCreatePackageRoot(fromDir: string): string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export declare const EN_LOCALE: {
|
|
2
2
|
prompt: {
|
|
3
3
|
projectName: string;
|
|
4
|
+
legacyModernJsConfirmation: string;
|
|
4
5
|
};
|
|
5
6
|
error: {
|
|
6
7
|
projectNameEmpty: string;
|
|
7
8
|
directoryExists: string;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
verticalNameMissing: string;
|
|
10
|
+
verticalNameAmbiguous: string;
|
|
11
|
+
legacyModernJsNotConfirmed: string;
|
|
10
12
|
createFailed: string;
|
|
11
13
|
};
|
|
12
14
|
message: {
|
|
@@ -16,6 +18,7 @@ export declare const EN_LOCALE: {
|
|
|
16
18
|
step1: string;
|
|
17
19
|
step2: string;
|
|
18
20
|
step3: string;
|
|
21
|
+
legacyModernJsWarning: string;
|
|
19
22
|
};
|
|
20
23
|
help: {
|
|
21
24
|
title: string;
|
|
@@ -26,17 +29,20 @@ export declare const EN_LOCALE: {
|
|
|
26
29
|
optionHelp: string;
|
|
27
30
|
optionVersion: string;
|
|
28
31
|
optionLang: string;
|
|
29
|
-
|
|
32
|
+
optionTailwind: string;
|
|
30
33
|
optionBff: string;
|
|
31
34
|
optionBffRuntime: string;
|
|
32
|
-
optionTailwind: string;
|
|
33
35
|
optionWorkspace: string;
|
|
34
|
-
optionUltramodernWorkspace: string;
|
|
35
36
|
optionUltramodernPackageSource: string;
|
|
37
|
+
optionUltramodernPackageVersion: string;
|
|
38
|
+
optionUltramodernPackageRegistry: string;
|
|
36
39
|
optionUltramodernPackageScope: string;
|
|
37
40
|
optionUltramodernPackageNamePrefix: string;
|
|
38
41
|
optionVertical: string;
|
|
39
|
-
|
|
42
|
+
optionVerticalName: string;
|
|
43
|
+
optionDryRun: string;
|
|
44
|
+
optionCodeSmithOverlay: string;
|
|
45
|
+
optionLegacyModernJs: string;
|
|
40
46
|
examples: string;
|
|
41
47
|
example1: string;
|
|
42
48
|
example2: string;
|
|
@@ -48,8 +54,6 @@ export declare const EN_LOCALE: {
|
|
|
48
54
|
example8: string;
|
|
49
55
|
example9: string;
|
|
50
56
|
example10: string;
|
|
51
|
-
example11: string;
|
|
52
|
-
example12: string;
|
|
53
57
|
moreInfo: string;
|
|
54
58
|
};
|
|
55
59
|
version: {
|
|
@@ -1,3 +1,126 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
1
|
+
import { I18n } from '@modern-js/i18n-utils';
|
|
2
|
+
declare const i18n: I18n;
|
|
3
|
+
declare const localeKeys: {
|
|
4
|
+
prompt: {
|
|
5
|
+
projectName: string;
|
|
6
|
+
legacyModernJsConfirmation: string;
|
|
7
|
+
};
|
|
8
|
+
error: {
|
|
9
|
+
projectNameEmpty: string;
|
|
10
|
+
directoryExists: string;
|
|
11
|
+
verticalNameMissing: string;
|
|
12
|
+
verticalNameAmbiguous: string;
|
|
13
|
+
legacyModernJsNotConfirmed: string;
|
|
14
|
+
createFailed: string;
|
|
15
|
+
};
|
|
16
|
+
message: {
|
|
17
|
+
welcome: string;
|
|
18
|
+
success: string;
|
|
19
|
+
nextSteps: string;
|
|
20
|
+
step1: string;
|
|
21
|
+
step2: string;
|
|
22
|
+
step3: string;
|
|
23
|
+
legacyModernJsWarning: string;
|
|
24
|
+
};
|
|
25
|
+
help: {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
usage: string;
|
|
29
|
+
usageExample: string;
|
|
30
|
+
options: string;
|
|
31
|
+
optionHelp: string;
|
|
32
|
+
optionVersion: string;
|
|
33
|
+
optionLang: string;
|
|
34
|
+
optionTailwind: string;
|
|
35
|
+
optionBff: string;
|
|
36
|
+
optionBffRuntime: string;
|
|
37
|
+
optionWorkspace: string;
|
|
38
|
+
optionUltramodernPackageSource: string;
|
|
39
|
+
optionUltramodernPackageVersion: string;
|
|
40
|
+
optionUltramodernPackageRegistry: string;
|
|
41
|
+
optionUltramodernPackageScope: string;
|
|
42
|
+
optionUltramodernPackageNamePrefix: string;
|
|
43
|
+
optionVertical: string;
|
|
44
|
+
optionVerticalName: string;
|
|
45
|
+
optionDryRun: string;
|
|
46
|
+
optionCodeSmithOverlay: string;
|
|
47
|
+
optionLegacyModernJs: string;
|
|
48
|
+
examples: string;
|
|
49
|
+
example1: string;
|
|
50
|
+
example2: string;
|
|
51
|
+
example3: string;
|
|
52
|
+
example4: string;
|
|
53
|
+
example5: string;
|
|
54
|
+
example6: string;
|
|
55
|
+
example7: string;
|
|
56
|
+
example8: string;
|
|
57
|
+
example9: string;
|
|
58
|
+
example10: string;
|
|
59
|
+
moreInfo: string;
|
|
60
|
+
};
|
|
61
|
+
version: {
|
|
62
|
+
message: string;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
prompt: {
|
|
66
|
+
projectName: string;
|
|
67
|
+
legacyModernJsConfirmation: string;
|
|
68
|
+
};
|
|
69
|
+
error: {
|
|
70
|
+
projectNameEmpty: string;
|
|
71
|
+
directoryExists: string;
|
|
72
|
+
verticalNameMissing: string;
|
|
73
|
+
verticalNameAmbiguous: string;
|
|
74
|
+
legacyModernJsNotConfirmed: string;
|
|
75
|
+
createFailed: string;
|
|
76
|
+
};
|
|
77
|
+
message: {
|
|
78
|
+
welcome: string;
|
|
79
|
+
success: string;
|
|
80
|
+
nextSteps: string;
|
|
81
|
+
step1: string;
|
|
82
|
+
step2: string;
|
|
83
|
+
step3: string;
|
|
84
|
+
legacyModernJsWarning: string;
|
|
85
|
+
};
|
|
86
|
+
help: {
|
|
87
|
+
title: string;
|
|
88
|
+
description: string;
|
|
89
|
+
usage: string;
|
|
90
|
+
usageExample: string;
|
|
91
|
+
options: string;
|
|
92
|
+
optionHelp: string;
|
|
93
|
+
optionVersion: string;
|
|
94
|
+
optionLang: string;
|
|
95
|
+
optionTailwind: string;
|
|
96
|
+
optionBff: string;
|
|
97
|
+
optionBffRuntime: string;
|
|
98
|
+
optionWorkspace: string;
|
|
99
|
+
optionUltramodernPackageSource: string;
|
|
100
|
+
optionUltramodernPackageVersion: string;
|
|
101
|
+
optionUltramodernPackageRegistry: string;
|
|
102
|
+
optionUltramodernPackageScope: string;
|
|
103
|
+
optionUltramodernPackageNamePrefix: string;
|
|
104
|
+
optionVertical: string;
|
|
105
|
+
optionVerticalName: string;
|
|
106
|
+
optionDryRun: string;
|
|
107
|
+
optionCodeSmithOverlay: string;
|
|
108
|
+
optionLegacyModernJs: string;
|
|
109
|
+
examples: string;
|
|
110
|
+
example1: string;
|
|
111
|
+
example2: string;
|
|
112
|
+
example3: string;
|
|
113
|
+
example4: string;
|
|
114
|
+
example5: string;
|
|
115
|
+
example6: string;
|
|
116
|
+
example7: string;
|
|
117
|
+
example8: string;
|
|
118
|
+
example9: string;
|
|
119
|
+
example10: string;
|
|
120
|
+
moreInfo: string;
|
|
121
|
+
};
|
|
122
|
+
version: {
|
|
123
|
+
message: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
3
126
|
export { i18n, localeKeys };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export declare const ZH_LOCALE: {
|
|
2
2
|
prompt: {
|
|
3
3
|
projectName: string;
|
|
4
|
+
legacyModernJsConfirmation: string;
|
|
4
5
|
};
|
|
5
6
|
error: {
|
|
6
7
|
projectNameEmpty: string;
|
|
7
8
|
directoryExists: string;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
verticalNameMissing: string;
|
|
10
|
+
verticalNameAmbiguous: string;
|
|
11
|
+
legacyModernJsNotConfirmed: string;
|
|
10
12
|
createFailed: string;
|
|
11
13
|
};
|
|
12
14
|
message: {
|
|
@@ -16,6 +18,7 @@ export declare const ZH_LOCALE: {
|
|
|
16
18
|
step1: string;
|
|
17
19
|
step2: string;
|
|
18
20
|
step3: string;
|
|
21
|
+
legacyModernJsWarning: string;
|
|
19
22
|
};
|
|
20
23
|
help: {
|
|
21
24
|
title: string;
|
|
@@ -26,17 +29,20 @@ export declare const ZH_LOCALE: {
|
|
|
26
29
|
optionHelp: string;
|
|
27
30
|
optionVersion: string;
|
|
28
31
|
optionLang: string;
|
|
29
|
-
|
|
32
|
+
optionTailwind: string;
|
|
30
33
|
optionBff: string;
|
|
31
34
|
optionBffRuntime: string;
|
|
32
|
-
optionTailwind: string;
|
|
33
35
|
optionWorkspace: string;
|
|
34
|
-
optionUltramodernWorkspace: string;
|
|
35
36
|
optionUltramodernPackageSource: string;
|
|
37
|
+
optionUltramodernPackageVersion: string;
|
|
38
|
+
optionUltramodernPackageRegistry: string;
|
|
36
39
|
optionUltramodernPackageScope: string;
|
|
37
40
|
optionUltramodernPackageNamePrefix: string;
|
|
38
41
|
optionVertical: string;
|
|
39
|
-
|
|
42
|
+
optionVerticalName: string;
|
|
43
|
+
optionDryRun: string;
|
|
44
|
+
optionCodeSmithOverlay: string;
|
|
45
|
+
optionLegacyModernJs: string;
|
|
40
46
|
examples: string;
|
|
41
47
|
example1: string;
|
|
42
48
|
example2: string;
|
|
@@ -48,8 +54,6 @@ export declare const ZH_LOCALE: {
|
|
|
48
54
|
example8: string;
|
|
49
55
|
example9: string;
|
|
50
56
|
example10: string;
|
|
51
|
-
example11: string;
|
|
52
|
-
example12: string;
|
|
53
57
|
moreInfo: string;
|
|
54
58
|
};
|
|
55
59
|
version: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const WORKSPACE_PACKAGE_VERSION = "workspace:*";
|
|
2
|
+
export declare const BLEEDINGDEV_CREATE_PACKAGE = "@bleedingdev/modern-js-create";
|
|
3
|
+
export declare const BLEEDINGDEV_PACKAGE_SCOPE = "bleedingdev";
|
|
4
|
+
export declare const BLEEDINGDEV_PACKAGE_NAME_PREFIX = "modern-js-";
|
|
5
|
+
export declare const BLEEDINGDEV_FRAMEWORK_VERSION_ENV = "MODERN_CREATE_ULTRAMODERN_FRAMEWORK_VERSION";
|
|
6
|
+
export declare const ULTRAMODERN_SINGLE_APP_MODERN_PACKAGES: readonly ['@modern-js/create', '@modern-js/code-tools', '@modern-js/runtime', '@modern-js/app-tools', '@modern-js/tsconfig', '@modern-js/plugin-i18n', '@modern-js/plugin-tanstack', '@modern-js/plugin-bff', '@modern-js/adapter-rstest'];
|
|
7
|
+
export declare const ULTRAMODERN_WORKSPACE_MODERN_PACKAGES: readonly ['@modern-js/create', '@modern-js/code-tools', '@modern-js/app-tools', '@modern-js/plugin-bff', '@modern-js/plugin-i18n', '@modern-js/plugin-tanstack', '@modern-js/runtime'];
|
|
8
|
+
export type UltramodernPackageSourceStrategy = 'workspace' | 'install';
|
|
9
|
+
export type ResolvedUltramodernPackageSource = {
|
|
10
|
+
strategy: UltramodernPackageSourceStrategy;
|
|
11
|
+
modernPackageVersion: string;
|
|
12
|
+
registry?: string;
|
|
13
|
+
aliasScope?: string;
|
|
14
|
+
aliasPackageNamePrefix?: string;
|
|
15
|
+
};
|
|
16
|
+
export type UltramodernModernPackagesMetadata = {
|
|
17
|
+
packages: string[];
|
|
18
|
+
specifier: string;
|
|
19
|
+
registry?: string;
|
|
20
|
+
aliases?: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
export declare function modernPackageVersion(packageSource: ResolvedUltramodernPackageSource): string;
|
|
23
|
+
export declare function modernAliasPackageName(packageName: string, packageSource: ResolvedUltramodernPackageSource): string;
|
|
24
|
+
export declare function modernPackageSpecifier(packageName: string, packageSource: ResolvedUltramodernPackageSource): string;
|
|
25
|
+
export declare function modernPackageAliases(packageNames: readonly string[], packageSource: ResolvedUltramodernPackageSource): Record<string, string> | undefined;
|
|
26
|
+
export declare function createModernPackagesMetadata(packageNames: readonly string[], packageSource: ResolvedUltramodernPackageSource, options?: {
|
|
27
|
+
includeAliases?: boolean;
|
|
28
|
+
}): UltramodernModernPackagesMetadata;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AddUltramodernVerticalOptions, JsonValue, Ownership, ResolvedPackageSource, UltramodernGenerationResult, UltramodernVerticalPlan, UltramodernWorkspaceOptions, WorkspaceApp } from './types';
|
|
2
|
+
export type AddUltramodernVerticalPreflight = {
|
|
3
|
+
name: string;
|
|
4
|
+
scope: string;
|
|
5
|
+
topologyPath: string;
|
|
6
|
+
ownershipPath: string;
|
|
7
|
+
overlayPath: string;
|
|
8
|
+
rootPackage: Record<string, any>;
|
|
9
|
+
topology: Record<string, any>;
|
|
10
|
+
ownership: Record<string, any>;
|
|
11
|
+
overlay: Record<string, any>;
|
|
12
|
+
packageSource: ResolvedPackageSource;
|
|
13
|
+
enableTailwind: boolean;
|
|
14
|
+
vertical: WorkspaceApp;
|
|
15
|
+
updatedVerticals: WorkspaceApp[];
|
|
16
|
+
};
|
|
17
|
+
export declare function existingPackageSource(workspaceRoot: string, modernVersion: string, packageSource?: UltramodernWorkspaceOptions['packageSource']): ResolvedPackageSource;
|
|
18
|
+
export declare function existingTailwindEnabled(workspaceRoot: string): boolean;
|
|
19
|
+
export declare function assertValidVerticalName(name: string): string;
|
|
20
|
+
export declare function nextAvailablePort(ports: Record<string, unknown>): number;
|
|
21
|
+
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;
|
|
24
|
+
export declare function addShellZephyrDependency(workspaceRoot: string, scope: string, remote: WorkspaceApp): void;
|
|
25
|
+
export declare function addShellWorkspaceDependency(workspaceRoot: string, scope: string, remote: WorkspaceApp): void;
|
|
26
|
+
export declare function verticalTopologyEntry(scope: string, vertical: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
27
|
+
export declare function ownershipEntry(scope: string, owner: {
|
|
28
|
+
id: string;
|
|
29
|
+
packageSuffix: string;
|
|
30
|
+
directory: string;
|
|
31
|
+
ownership: Ownership;
|
|
32
|
+
}): JsonValue;
|
|
33
|
+
export declare function verticalsFromTopology(topology: Record<string, any>, ports: Record<string, unknown>): WorkspaceApp[];
|
|
34
|
+
export declare function prepareAddUltramodernVertical(options: AddUltramodernVerticalOptions): AddUltramodernVerticalPreflight;
|
|
35
|
+
export declare function planUltramodernVertical(options: AddUltramodernVerticalOptions): UltramodernVerticalPlan;
|
|
36
|
+
export declare function addUltramodernVertical(options: AddUltramodernVerticalOptions): UltramodernGenerationResult;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JsonValue, WorkspaceApp } from './types';
|
|
2
|
+
export declare function createBoundaryDebugMetadata(scope: string, remotes?: WorkspaceApp[]): JsonValue;
|
|
3
|
+
export declare function createAppEnvDts(app: WorkspaceApp, remotes?: WorkspaceApp[]): string;
|
|
4
|
+
export declare function createAppRuntimeConfig(app: WorkspaceApp, scope: string, remotes?: WorkspaceApp[]): string;
|
|
5
|
+
export declare function createCssTokenImport(scope: string): string;
|
|
6
|
+
export declare function createTailwindImport(prefix: string): string;
|
|
7
|
+
export declare function createShellStyles(enableTailwind: boolean, scope: string): string;
|
|
8
|
+
export declare function createRemoteStyles(enableTailwind: boolean, scope: string, app: WorkspaceApp): string;
|
|
9
|
+
export declare function createAppStyles(enableTailwind: boolean, scope: string, app: WorkspaceApp): string;
|
|
10
|
+
export declare function createPostcssConfig(): string;
|
|
11
|
+
export declare function createTailwindConfig(): string;
|
|
12
|
+
export declare function createSharedDesignTokensCss(): string;
|
|
13
|
+
export declare function createRouteHeadModule(app: WorkspaceApp): string;
|
|
14
|
+
export declare function createShellFrameComponent(): string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { UltramodernGenerationResult, UltramodernVerticalPlan, UltramodernWorkspaceOptions } from './public-api';
|
|
2
|
+
export type UltramodernCodeSmithMode = 'workspace' | 'vertical';
|
|
3
|
+
export type UltramodernCodeSmithConfig = {
|
|
4
|
+
mode?: UltramodernCodeSmithMode;
|
|
5
|
+
name?: string;
|
|
6
|
+
targetName?: string;
|
|
7
|
+
packageName?: string;
|
|
8
|
+
targetDir?: string;
|
|
9
|
+
workspaceRoot?: string;
|
|
10
|
+
modernVersion?: string;
|
|
11
|
+
enableTailwind?: boolean;
|
|
12
|
+
tailwind?: boolean;
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
logResult?: boolean;
|
|
15
|
+
overlays?: UltramodernWorkspaceOptions['overlays'];
|
|
16
|
+
packageSource?: UltramodernWorkspaceOptions['packageSource'];
|
|
17
|
+
packageSourceStrategy?: NonNullable<UltramodernWorkspaceOptions['packageSource']>['strategy'];
|
|
18
|
+
modernPackageVersion?: string;
|
|
19
|
+
registry?: string;
|
|
20
|
+
aliasScope?: string;
|
|
21
|
+
aliasPackageNamePrefix?: string;
|
|
22
|
+
};
|
|
23
|
+
export type UltramodernCodeSmithResult = UltramodernGenerationResult | UltramodernVerticalPlan;
|
|
24
|
+
type CodeSmithPromptQuestion = {
|
|
25
|
+
type: 'input' | 'list';
|
|
26
|
+
name: string;
|
|
27
|
+
message: string;
|
|
28
|
+
choices?: string[];
|
|
29
|
+
};
|
|
30
|
+
type CodeSmithPrompt = (questions: CodeSmithPromptQuestion[]) => Promise<Record<string, unknown>>;
|
|
31
|
+
type CodeSmithLogger = {
|
|
32
|
+
info?: (...messages: unknown[]) => void;
|
|
33
|
+
};
|
|
34
|
+
export type UltramodernCodeSmithContext = {
|
|
35
|
+
config?: UltramodernCodeSmithConfig;
|
|
36
|
+
data?: Record<string, unknown>;
|
|
37
|
+
materials?: {
|
|
38
|
+
default?: {
|
|
39
|
+
basePath?: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
prompt?: CodeSmithPrompt;
|
|
43
|
+
inquirer?: {
|
|
44
|
+
prompt?: CodeSmithPrompt;
|
|
45
|
+
};
|
|
46
|
+
logger?: CodeSmithLogger;
|
|
47
|
+
};
|
|
48
|
+
export type UltramodernCodeSmithRuntime = {
|
|
49
|
+
outputPath?: string;
|
|
50
|
+
logger?: CodeSmithLogger;
|
|
51
|
+
};
|
|
52
|
+
export default function ultramodernCodeSmithAdapter(context: UltramodernCodeSmithContext, runtime?: UltramodernCodeSmithRuntime): Promise<UltramodernCodeSmithResult>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
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
|
+
export declare function createTopology(scope: string, remotes?: WorkspaceApp[]): JsonValue;
|
|
6
|
+
export declare function createOwnership(scope: string, remotes?: WorkspaceApp[]): JsonValue;
|
|
7
|
+
export declare function createDevelopmentOverlay(remotes?: WorkspaceApp[]): JsonValue;
|
|
8
|
+
export declare function createPackageSourceMetadata(scope: string, packageSource: ResolvedPackageSource): JsonValue;
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkspaceApp } from './types';
|
|
2
|
+
export declare function createShellPage(remotes?: WorkspaceApp[]): string;
|
|
3
|
+
export declare function createShellRemoteComponents(scope: string, remotes?: WorkspaceApp[]): string;
|
|
4
|
+
export declare function createRemotePage(app: WorkspaceApp): string;
|
|
5
|
+
export declare function createLayout(appId: string): string;
|
|
6
|
+
export declare function createRemoteEntry(app: WorkspaceApp): string;
|
|
7
|
+
export declare function createRemoteWidget(app: WorkspaceApp): string;
|
|
8
|
+
export declare function createRemoteExposeComponent(app: WorkspaceApp, expose: string): string;
|
|
9
|
+
export declare function remoteComponentOutputPath(app: WorkspaceApp, expose: string): string | undefined;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Ownership, WorkspaceApp, WorkspaceEffectApi } from './types';
|
|
2
|
+
export declare const GENERATED_CONTRACT_PATH = ".modernjs/ultramodern-generated-contract.json";
|
|
3
|
+
export declare const shellApp: WorkspaceApp;
|
|
4
|
+
export declare function createShellHost(remotes?: WorkspaceApp[]): WorkspaceApp;
|
|
5
|
+
export declare const sharedPackages: {
|
|
6
|
+
id: string;
|
|
7
|
+
directory: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function createNeutralOwnership(id: string, tier?: string): Ownership;
|
|
11
|
+
export declare function createVerticalDescriptor(name: string, port: number): WorkspaceApp;
|
|
12
|
+
export declare function appHasEffectApi(app: WorkspaceApp): app is WorkspaceApp & {
|
|
13
|
+
effectApi: WorkspaceEffectApi;
|
|
14
|
+
};
|
|
15
|
+
export declare function effectApiPrefix(target: {
|
|
16
|
+
id: string;
|
|
17
|
+
effectApi?: WorkspaceEffectApi;
|
|
18
|
+
}): string;
|
|
19
|
+
export declare function effectApiStem(target: {
|
|
20
|
+
id: string;
|
|
21
|
+
effectApi?: WorkspaceEffectApi;
|
|
22
|
+
}): string;
|
|
23
|
+
export declare function verticalEffectApps(remotes?: WorkspaceApp[]): (WorkspaceApp & {
|
|
24
|
+
effectApi: WorkspaceEffectApi;
|
|
25
|
+
})[];
|
|
26
|
+
export declare function remoteDependencyAlias(remote: WorkspaceApp): string;
|
|
27
|
+
export declare function zephyrRemoteDependency(scope: string, remote: WorkspaceApp): string;
|
|
28
|
+
export declare function resolveRemoteRefs(app: WorkspaceApp, remotes?: WorkspaceApp[]): WorkspaceApp[];
|
|
29
|
+
export declare function createRemoteManifestEnv(remote: WorkspaceApp): string;
|
|
30
|
+
export declare function createModuleFederationRemoteContracts(app: WorkspaceApp, remotes?: WorkspaceApp[]): {
|
|
31
|
+
id: string;
|
|
32
|
+
alias: string;
|
|
33
|
+
name: string;
|
|
34
|
+
manifestEnv: string;
|
|
35
|
+
manifestUrl: string;
|
|
36
|
+
}[];
|
|
37
|
+
export declare function createCloudflareWorkerName(scope: string, app: WorkspaceApp): string;
|
|
38
|
+
export declare function createCloudflarePublicUrlEnv(app: WorkspaceApp): string;
|
|
39
|
+
export declare function appI18nNamespace(app: WorkspaceApp): string;
|