@bleedingdev/modern-js-create 3.2.0-ultramodern.56 → 3.2.0-ultramodern.57
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/dist/index.js +11 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5392,9 +5392,9 @@ main().then(
|
|
|
5392
5392
|
);
|
|
5393
5393
|
`;
|
|
5394
5394
|
}
|
|
5395
|
-
function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind) {
|
|
5395
|
+
function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remotes = remoteApps) {
|
|
5396
5396
|
writeFileReplacing(targetDir, "scripts/assert-mf-types.mjs", createAssertMfTypesScript());
|
|
5397
|
-
writeFileReplacing(targetDir, "scripts/validate-ultramodern-workspace.mjs", createWorkspaceValidationScript(scope, enableTailwind));
|
|
5397
|
+
writeFileReplacing(targetDir, "scripts/validate-ultramodern-workspace.mjs", createWorkspaceValidationScript(scope, enableTailwind, remotes));
|
|
5398
5398
|
writeFileReplacing(targetDir, "scripts/proof-cloudflare-version.mjs", createCloudflareVersionProofScript());
|
|
5399
5399
|
}
|
|
5400
5400
|
function writeApp(targetDir, scope, app, packageSource, enableTailwind) {
|
|
@@ -5617,6 +5617,7 @@ function remoteTopologyEntry(scope, remote) {
|
|
|
5617
5617
|
...effectApiTopologyMetadata(remote) ? {
|
|
5618
5618
|
api: effectApiTopologyMetadata(remote)
|
|
5619
5619
|
} : {},
|
|
5620
|
+
cloudflare: createCloudflareDeployContract(scope, remote),
|
|
5620
5621
|
ownership: remote.ownership
|
|
5621
5622
|
};
|
|
5622
5623
|
}
|
|
@@ -5630,6 +5631,7 @@ function ownershipEntry(scope, owner) {
|
|
|
5630
5631
|
}
|
|
5631
5632
|
function remotesFromTopology(topology, ports) {
|
|
5632
5633
|
return (topology.remotes ?? []).map((remote)=>{
|
|
5634
|
+
const packageSuffix = remote.package?.split('/').at(-1) ?? remote.id;
|
|
5633
5635
|
const effectApi = remote.api?.effect ? {
|
|
5634
5636
|
stem: 'string' == typeof remote.api.effect.basePath ? remote.api.effect.basePath.split('/').filter(Boolean).at(-1) ?? remote.domain ?? String(remote.id).replace(/^remote-/, '') : remote.domain ?? String(remote.id).replace(/^remote-/, ''),
|
|
5635
5637
|
prefix: remote.api.effect.bff?.prefix ?? `/${remote.domain ?? String(remote.id).replace(/^remote-/, '')}-api`,
|
|
@@ -5640,8 +5642,8 @@ function remotesFromTopology(topology, ports) {
|
|
|
5640
5642
|
} : void 0;
|
|
5641
5643
|
return {
|
|
5642
5644
|
id: remote.id,
|
|
5643
|
-
directory: ''
|
|
5644
|
-
packageSuffix
|
|
5645
|
+
directory: 'string' == typeof remote.path ? remote.path : `apps/remotes/${packageSuffix}`,
|
|
5646
|
+
packageSuffix,
|
|
5645
5647
|
displayName: remote.id,
|
|
5646
5648
|
kind: remote.kind ?? 'vertical',
|
|
5647
5649
|
domain: remote.domain ?? String(remote.id).replace(/^remote-/, ''),
|
|
@@ -5715,16 +5717,18 @@ function addUltramodernMicroVertical(options) {
|
|
|
5715
5717
|
writeJsonFile(topologyPath, topology);
|
|
5716
5718
|
writeJsonFile(ownershipPath, ownership);
|
|
5717
5719
|
writeJsonFile(overlayPath, overlay);
|
|
5720
|
+
const updatedRemotes = remotesFromTopology(topology, overlay.ports);
|
|
5718
5721
|
writeJsonFile(node_path.join(options.workspaceRoot, GENERATED_CONTRACT_PATH), createGeneratedContract(scope, [
|
|
5719
5722
|
{
|
|
5720
5723
|
...shellApp,
|
|
5721
|
-
remoteRefs:
|
|
5724
|
+
remoteRefs: updatedRemotes.map((remote)=>remote.id)
|
|
5722
5725
|
},
|
|
5723
|
-
...
|
|
5726
|
+
...updatedRemotes
|
|
5724
5727
|
], enableTailwind));
|
|
5725
5728
|
const shellConfigPath = node_path.join(options.workspaceRoot, `${shellApp.directory}/module-federation.config.ts`);
|
|
5726
|
-
writeFileReplacing(options.workspaceRoot, `${shellApp.directory}/module-federation.config.ts`, createShellModuleFederationConfig(
|
|
5729
|
+
writeFileReplacing(options.workspaceRoot, `${shellApp.directory}/module-federation.config.ts`, createShellModuleFederationConfig(updatedRemotes));
|
|
5727
5730
|
if (!node_fs.existsSync(shellConfigPath)) throw new Error('Shell Module Federation config was not regenerated');
|
|
5731
|
+
writeGeneratedWorkspaceScripts(options.workspaceRoot, scope, enableTailwind, updatedRemotes);
|
|
5728
5732
|
addShellZephyrDependency(options.workspaceRoot, scope, remote);
|
|
5729
5733
|
addShellWorkspaceDependency(options.workspaceRoot, scope, remote);
|
|
5730
5734
|
addRootDevScript(options.workspaceRoot, scope, remote.packageSuffix, name);
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.2.0-ultramodern.
|
|
24
|
+
"version": "3.2.0-ultramodern.57",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^25.9.1",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
43
43
|
"tsx": "^4.22.3",
|
|
44
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
44
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.57"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"start": "node ./dist/index.js"
|
|
55
55
|
},
|
|
56
56
|
"ultramodern": {
|
|
57
|
-
"frameworkVersion": "3.2.0-ultramodern.
|
|
57
|
+
"frameworkVersion": "3.2.0-ultramodern.57"
|
|
58
58
|
}
|
|
59
59
|
}
|