@bleedingdev/modern-js-create 3.2.0-ultramodern.101 → 3.2.0-ultramodern.102
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 +25 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -900,6 +900,12 @@ function toCamelCase(value) {
|
|
|
900
900
|
function toEnvSegment(value) {
|
|
901
901
|
return toKebabCase(value).replace(/-/g, '_').toUpperCase();
|
|
902
902
|
}
|
|
903
|
+
function createRspackUniqueName(app) {
|
|
904
|
+
return app.mfName;
|
|
905
|
+
}
|
|
906
|
+
function createRspackChunkLoadingGlobal(app) {
|
|
907
|
+
return `__ULTRAMODERN_${toEnvSegment(app.mfName)}_LOADED_CHUNKS__`;
|
|
908
|
+
}
|
|
903
909
|
function ultramodern_workspace_packageName(scope, suffix) {
|
|
904
910
|
return `@${scope}/${suffix}`;
|
|
905
911
|
}
|
|
@@ -1379,6 +1385,9 @@ ${bffPluginEntry} moduleFederationPlugin(),
|
|
|
1379
1385
|
overrideBrowserslist: ['defaults'],
|
|
1380
1386
|
},
|
|
1381
1387
|
bundlerChain: chain => {
|
|
1388
|
+
chain.output
|
|
1389
|
+
.uniqueName('${createRspackUniqueName(app)}')
|
|
1390
|
+
.chunkLoadingGlobal('${createRspackChunkLoadingGlobal(app)}');
|
|
1382
1391
|
chain.ignoreWarnings([
|
|
1383
1392
|
{
|
|
1384
1393
|
message: /the request of a dependency is an expression/u,
|
|
@@ -4051,6 +4060,12 @@ function createAppConfigContract(app) {
|
|
|
4051
4060
|
disableClientServer: true
|
|
4052
4061
|
}
|
|
4053
4062
|
},
|
|
4063
|
+
rspack: {
|
|
4064
|
+
output: {
|
|
4065
|
+
uniqueName: createRspackUniqueName(app),
|
|
4066
|
+
chunkLoadingGlobal: createRspackChunkLoadingGlobal(app)
|
|
4067
|
+
}
|
|
4068
|
+
},
|
|
4054
4069
|
html: {
|
|
4055
4070
|
outputStructure: 'flat'
|
|
4056
4071
|
},
|
|
@@ -4784,6 +4799,12 @@ const assertNotExists = relativePath => {
|
|
|
4784
4799
|
assert(!fs.existsSync(path.join(root, relativePath)), \`Unexpected \${relativePath}\`);
|
|
4785
4800
|
};
|
|
4786
4801
|
const expectedWorkerName = packageSuffix => \`\${packageScope}-\${packageSuffix}\`.slice(0, 63);
|
|
4802
|
+
const expectedChunkLoadingGlobal = mfName =>
|
|
4803
|
+
\`__ULTRAMODERN_\${mfName
|
|
4804
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1_$2')
|
|
4805
|
+
.replace(/[^a-zA-Z0-9]+/g, '_')
|
|
4806
|
+
.replace(/^_+|_+$/g, '')
|
|
4807
|
+
.toUpperCase()}_LOADED_CHUNKS__\`;
|
|
4787
4808
|
const parseSemver = version => {
|
|
4788
4809
|
const match = /^(\\d+)\\.(\\d+)\\.(\\d+)/u.exec(version);
|
|
4789
4810
|
assert(match, \`Unable to parse pnpm version: \${version}\`);
|
|
@@ -4960,6 +4981,8 @@ const shellContract = generatedContract.apps?.find(app => app.id === 'shell-supe
|
|
|
4960
4981
|
assert(shellContract?.deploy?.cloudflare?.workerName === expectedWorkerName('shell-super-app'), 'Shell Cloudflare workerName is incorrect');
|
|
4961
4982
|
assert(shellContract?.deploy?.cloudflare?.publicUrlEnv === 'ULTRAMODERN_PUBLIC_URL_SHELL_SUPER_APP', 'Shell Cloudflare public URL env is incorrect');
|
|
4962
4983
|
assert(JSON.stringify(shellContract?.deploy?.cloudflare?.compatibilityFlags) === JSON.stringify(expectedCloudflareCompatibilityFlags), 'Shell Cloudflare compatibility flags are incorrect');
|
|
4984
|
+
assert(shellContract?.config?.rspack?.output?.uniqueName === 'shellSuperApp', 'Shell Rspack uniqueName is incorrect');
|
|
4985
|
+
assert(shellContract?.config?.rspack?.output?.chunkLoadingGlobal === expectedChunkLoadingGlobal('shellSuperApp'), 'Shell Rspack chunkLoadingGlobal is incorrect');
|
|
4963
4986
|
assert(topology.shell?.cloudflare?.workerName === expectedWorkerName('shell-super-app'), 'Shell topology Cloudflare workerName is incorrect');
|
|
4964
4987
|
assert(shellContract?.styling?.federation?.owner?.id === 'shell-super-app', 'Shell CSS federation owner is missing');
|
|
4965
4988
|
assert(shellContract?.styling?.federation?.role === 'shell-base-overlay', 'Shell must own base and overlay CSS');
|
|
@@ -5008,6 +5031,8 @@ for (const vertical of fullStackVerticals) {
|
|
|
5008
5031
|
assert(contractEntry?.deploy?.cloudflare?.publicUrlEnv === \`ULTRAMODERN_PUBLIC_URL_\${vertical.id.replace(/-/g, '_').toUpperCase()}\`, \`\${vertical.id} Cloudflare public URL env is incorrect\`);
|
|
5009
5032
|
assert(JSON.stringify(contractEntry?.deploy?.cloudflare?.compatibilityFlags) === JSON.stringify(expectedCloudflareCompatibilityFlags), \`\${vertical.id} Cloudflare compatibility flags are incorrect\`);
|
|
5010
5033
|
assert(contractEntry?.deploy?.cloudflare?.routes?.effectReadiness === \`\${vertical.apiPrefix}/effect/\${vertical.stem}/readiness\`, \`\${vertical.id} Cloudflare proof readiness route is incorrect\`);
|
|
5034
|
+
assert(contractEntry?.config?.rspack?.output?.uniqueName === vertical.mfName, \`\${vertical.id} Rspack uniqueName is incorrect\`);
|
|
5035
|
+
assert(contractEntry?.config?.rspack?.output?.chunkLoadingGlobal === expectedChunkLoadingGlobal(vertical.mfName), \`\${vertical.id} Rspack chunkLoadingGlobal is incorrect\`);
|
|
5011
5036
|
assert(contractEntry?.moduleFederation?.name === vertical.mfName, \`\${vertical.id} MF name is incorrect\`);
|
|
5012
5037
|
assert(JSON.stringify(contractEntry?.moduleFederation?.exposes) === JSON.stringify(vertical.exposes), \`\${vertical.id} MF exposes are incorrect\`);
|
|
5013
5038
|
assert(contractEntry?.moduleFederation?.dts?.compilerInstance === '--package typescript -- tsc', \`\${vertical.id} must keep mandatory DTS compiler\`);
|
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.102",
|
|
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.102"
|
|
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.102"
|
|
58
58
|
}
|
|
59
59
|
}
|