@bleedingdev/modern-js-ultramodern-app-tools 3.9.0-ultramodern.7 → 3.9.0-ultramodern.9
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.
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ function() {
|
|
3
|
+
return "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
4
|
+
}();
|
|
2
5
|
var __webpack_require__ = {};
|
|
3
6
|
(()=>{
|
|
4
7
|
__webpack_require__.n = (module)=>{
|
|
@@ -47,6 +50,8 @@ const backend_federation_build_namespaceObject = require("@modern-js/app-tools-e
|
|
|
47
50
|
var backend_federation_build_default = /*#__PURE__*/ __webpack_require__.n(backend_federation_build_namespaceObject);
|
|
48
51
|
const cloudflare_builder_namespaceObject = require("@modern-js/app-tools-extensions/cloudflare-builder");
|
|
49
52
|
const plugin_namespaceObject = require("@modern-js/app-tools-extensions/deploy-output/plugin");
|
|
53
|
+
const policy_defaults_namespaceObject = require("@modern-js/app-tools-extensions/policy-defaults");
|
|
54
|
+
const runtime_package_resolution_namespaceObject = require("@modern-js/app-tools-extensions/runtime-package-resolution");
|
|
50
55
|
const i18n_integration_namespaceObject = require("@modern-js/i18n-integration");
|
|
51
56
|
const external_release_envelope_plugin_js_namespaceObject = require("./release-envelope-plugin.js");
|
|
52
57
|
const external_router_integration_plugin_js_namespaceObject = require("./router-integration-plugin.js");
|
|
@@ -66,29 +71,42 @@ const ultramodernAppTools = ()=>({
|
|
|
66
71
|
(0, external_release_envelope_plugin_js_namespaceObject.ultramodernReleaseEnvelopePlugin)()
|
|
67
72
|
],
|
|
68
73
|
setup (api) {
|
|
74
|
+
const runtimeModuleDirectories = (0, runtime_package_resolution_namespaceObject.collectRuntimePackageModuleDirectories)([
|
|
75
|
+
policy_defaults_namespaceObject.RENDERER_EXTENSIONS_PACKAGE,
|
|
76
|
+
'@modern-js/i18n-integration'
|
|
77
|
+
], __rslib_import_meta_url__);
|
|
69
78
|
api.modifyResolvedConfig((config)=>{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
...
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
const builderPlugins = [
|
|
80
|
+
...config.builderPlugins ?? [],
|
|
81
|
+
...runtimeModuleDirectories.length > 0 ? [
|
|
82
|
+
(0, runtime_package_resolution_namespaceObject.createRuntimePackageResolutionPlugin)(runtimeModuleDirectories)
|
|
83
|
+
] : [],
|
|
84
|
+
...config.server?.rsc ? [] : [
|
|
75
85
|
(0, external_rsc_disabled_plugin_js_namespaceObject.rscDisabledRuntimePlugin)()
|
|
76
86
|
]
|
|
87
|
+
];
|
|
88
|
+
return {
|
|
89
|
+
...config,
|
|
90
|
+
builderPlugins
|
|
77
91
|
};
|
|
78
92
|
});
|
|
79
93
|
api._internalServerPlugins(({ plugins })=>{
|
|
80
94
|
const name = '@modern-js/ultramodern-app-tools/server-plugin';
|
|
81
|
-
|
|
95
|
+
const renamed = plugins.map((plugin)=>plugin.name === policy_defaults_namespaceObject.SERVER_EXTENSIONS_PLUGIN_NAME ? {
|
|
96
|
+
...plugin,
|
|
97
|
+
name
|
|
98
|
+
} : plugin);
|
|
99
|
+
if (!renamed.some((plugin)=>plugin.name === name)) renamed.push({
|
|
82
100
|
name
|
|
83
101
|
});
|
|
84
102
|
return {
|
|
85
|
-
plugins
|
|
103
|
+
plugins: renamed
|
|
86
104
|
};
|
|
87
105
|
});
|
|
88
106
|
api._internalRuntimePlugins(({ entrypoint, plugins })=>{
|
|
89
|
-
plugins.push({
|
|
107
|
+
if (!plugins.some((plugin)=>plugin.path === policy_defaults_namespaceObject.RENDERER_EXTENSIONS_PACKAGE)) plugins.push({
|
|
90
108
|
name: 'rendererHead',
|
|
91
|
-
path:
|
|
109
|
+
path: policy_defaults_namespaceObject.RENDERER_EXTENSIONS_PACKAGE,
|
|
92
110
|
config: {}
|
|
93
111
|
});
|
|
94
112
|
return {
|
|
@@ -2,6 +2,8 @@ import { appTools } from "@modern-js/app-tools";
|
|
|
2
2
|
import backend_federation_build from "@modern-js/app-tools-extensions/backend-federation-build";
|
|
3
3
|
import { createCloudflareBuilderPlugin } from "@modern-js/app-tools-extensions/cloudflare-builder";
|
|
4
4
|
import { createDeployOutputAliasesPlugin } from "@modern-js/app-tools-extensions/deploy-output/plugin";
|
|
5
|
+
import { RENDERER_EXTENSIONS_PACKAGE, SERVER_EXTENSIONS_PLUGIN_NAME } from "@modern-js/app-tools-extensions/policy-defaults";
|
|
6
|
+
import { collectRuntimePackageModuleDirectories, createRuntimePackageResolutionPlugin } from "@modern-js/app-tools-extensions/runtime-package-resolution";
|
|
5
7
|
import { ultramodernI18nIntegrationPlugin } from "@modern-js/i18n-integration";
|
|
6
8
|
import { ultramodernReleaseEnvelopePlugin } from "./release-envelope-plugin.mjs";
|
|
7
9
|
import { ultramodernRouterIntegrationPlugin } from "./router-integration-plugin.mjs";
|
|
@@ -20,29 +22,42 @@ const ultramodernAppTools = ()=>({
|
|
|
20
22
|
ultramodernReleaseEnvelopePlugin()
|
|
21
23
|
],
|
|
22
24
|
setup (api) {
|
|
25
|
+
const runtimeModuleDirectories = collectRuntimePackageModuleDirectories([
|
|
26
|
+
RENDERER_EXTENSIONS_PACKAGE,
|
|
27
|
+
'@modern-js/i18n-integration'
|
|
28
|
+
], import.meta.url);
|
|
23
29
|
api.modifyResolvedConfig((config)=>{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
const builderPlugins = [
|
|
31
|
+
...config.builderPlugins ?? [],
|
|
32
|
+
...runtimeModuleDirectories.length > 0 ? [
|
|
33
|
+
createRuntimePackageResolutionPlugin(runtimeModuleDirectories)
|
|
34
|
+
] : [],
|
|
35
|
+
...config.server?.rsc ? [] : [
|
|
29
36
|
rscDisabledRuntimePlugin()
|
|
30
37
|
]
|
|
38
|
+
];
|
|
39
|
+
return {
|
|
40
|
+
...config,
|
|
41
|
+
builderPlugins
|
|
31
42
|
};
|
|
32
43
|
});
|
|
33
44
|
api._internalServerPlugins(({ plugins })=>{
|
|
34
45
|
const name = '@modern-js/ultramodern-app-tools/server-plugin';
|
|
35
|
-
|
|
46
|
+
const renamed = plugins.map((plugin)=>plugin.name === SERVER_EXTENSIONS_PLUGIN_NAME ? {
|
|
47
|
+
...plugin,
|
|
48
|
+
name
|
|
49
|
+
} : plugin);
|
|
50
|
+
if (!renamed.some((plugin)=>plugin.name === name)) renamed.push({
|
|
36
51
|
name
|
|
37
52
|
});
|
|
38
53
|
return {
|
|
39
|
-
plugins
|
|
54
|
+
plugins: renamed
|
|
40
55
|
};
|
|
41
56
|
});
|
|
42
57
|
api._internalRuntimePlugins(({ entrypoint, plugins })=>{
|
|
43
|
-
plugins.push({
|
|
58
|
+
if (!plugins.some((plugin)=>plugin.path === RENDERER_EXTENSIONS_PACKAGE)) plugins.push({
|
|
44
59
|
name: 'rendererHead',
|
|
45
|
-
path:
|
|
60
|
+
path: RENDERER_EXTENSIONS_PACKAGE,
|
|
46
61
|
config: {}
|
|
47
62
|
});
|
|
48
63
|
return {
|
|
@@ -3,6 +3,8 @@ import { appTools } from "@modern-js/app-tools";
|
|
|
3
3
|
import backend_federation_build from "@modern-js/app-tools-extensions/backend-federation-build";
|
|
4
4
|
import { createCloudflareBuilderPlugin } from "@modern-js/app-tools-extensions/cloudflare-builder";
|
|
5
5
|
import { createDeployOutputAliasesPlugin } from "@modern-js/app-tools-extensions/deploy-output/plugin";
|
|
6
|
+
import { RENDERER_EXTENSIONS_PACKAGE, SERVER_EXTENSIONS_PLUGIN_NAME } from "@modern-js/app-tools-extensions/policy-defaults";
|
|
7
|
+
import { collectRuntimePackageModuleDirectories, createRuntimePackageResolutionPlugin } from "@modern-js/app-tools-extensions/runtime-package-resolution";
|
|
6
8
|
import { ultramodernI18nIntegrationPlugin } from "@modern-js/i18n-integration";
|
|
7
9
|
import { ultramodernReleaseEnvelopePlugin } from "./release-envelope-plugin.mjs";
|
|
8
10
|
import { ultramodernRouterIntegrationPlugin } from "./router-integration-plugin.mjs";
|
|
@@ -21,29 +23,42 @@ const ultramodernAppTools = ()=>({
|
|
|
21
23
|
ultramodernReleaseEnvelopePlugin()
|
|
22
24
|
],
|
|
23
25
|
setup (api) {
|
|
26
|
+
const runtimeModuleDirectories = collectRuntimePackageModuleDirectories([
|
|
27
|
+
RENDERER_EXTENSIONS_PACKAGE,
|
|
28
|
+
'@modern-js/i18n-integration'
|
|
29
|
+
], import.meta.url);
|
|
24
30
|
api.modifyResolvedConfig((config)=>{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
const builderPlugins = [
|
|
32
|
+
...config.builderPlugins ?? [],
|
|
33
|
+
...runtimeModuleDirectories.length > 0 ? [
|
|
34
|
+
createRuntimePackageResolutionPlugin(runtimeModuleDirectories)
|
|
35
|
+
] : [],
|
|
36
|
+
...config.server?.rsc ? [] : [
|
|
30
37
|
rscDisabledRuntimePlugin()
|
|
31
38
|
]
|
|
39
|
+
];
|
|
40
|
+
return {
|
|
41
|
+
...config,
|
|
42
|
+
builderPlugins
|
|
32
43
|
};
|
|
33
44
|
});
|
|
34
45
|
api._internalServerPlugins(({ plugins })=>{
|
|
35
46
|
const name = '@modern-js/ultramodern-app-tools/server-plugin';
|
|
36
|
-
|
|
47
|
+
const renamed = plugins.map((plugin)=>plugin.name === SERVER_EXTENSIONS_PLUGIN_NAME ? {
|
|
48
|
+
...plugin,
|
|
49
|
+
name
|
|
50
|
+
} : plugin);
|
|
51
|
+
if (!renamed.some((plugin)=>plugin.name === name)) renamed.push({
|
|
37
52
|
name
|
|
38
53
|
});
|
|
39
54
|
return {
|
|
40
|
-
plugins
|
|
55
|
+
plugins: renamed
|
|
41
56
|
};
|
|
42
57
|
});
|
|
43
58
|
api._internalRuntimePlugins(({ entrypoint, plugins })=>{
|
|
44
|
-
plugins.push({
|
|
59
|
+
if (!plugins.some((plugin)=>plugin.path === RENDERER_EXTENSIONS_PACKAGE)) plugins.push({
|
|
45
60
|
name: 'rendererHead',
|
|
46
|
-
path:
|
|
61
|
+
path: RENDERER_EXTENSIONS_PACKAGE,
|
|
47
62
|
config: {}
|
|
48
63
|
});
|
|
49
64
|
return {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/solutions/ultramodern-app-tools"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"version": "3.9.0-ultramodern.
|
|
14
|
+
"version": "3.9.0-ultramodern.9",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"src"
|
|
@@ -62,26 +62,26 @@
|
|
|
62
62
|
"node": ">=26.7.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.0-ultramodern.
|
|
66
|
-
"@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.
|
|
67
|
-
"@modern-js/i18n-integration": "npm:@bleedingdev/modern-js-i18n-integration@3.9.0-ultramodern.
|
|
68
|
-
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.
|
|
69
|
-
"@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.0-ultramodern.
|
|
70
|
-
"@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.0-ultramodern.
|
|
71
|
-
"@modern-js/runtime-renderer-extensions": "npm:@bleedingdev/modern-js-runtime-renderer-extensions@3.9.0-ultramodern.
|
|
72
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.
|
|
73
|
-
"@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.
|
|
65
|
+
"@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.0-ultramodern.9",
|
|
66
|
+
"@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.9",
|
|
67
|
+
"@modern-js/i18n-integration": "npm:@bleedingdev/modern-js-i18n-integration@3.9.0-ultramodern.9",
|
|
68
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.9",
|
|
69
|
+
"@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.0-ultramodern.9",
|
|
70
|
+
"@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.0-ultramodern.9",
|
|
71
|
+
"@modern-js/runtime-renderer-extensions": "npm:@bleedingdev/modern-js-runtime-renderer-extensions@3.9.0-ultramodern.9",
|
|
72
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.9",
|
|
73
|
+
"@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.9",
|
|
74
74
|
"@rsbuild/core": "2.2.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@modern-js/backend-federation-contracts": "npm:@bleedingdev/modern-js-backend-federation-contracts@3.9.0-ultramodern.
|
|
78
|
-
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.
|
|
79
|
-
"@modern-js/plugin-bff": "npm:@bleedingdev/modern-js-plugin-bff@3.9.0-ultramodern.
|
|
80
|
-
"@modern-js/plugin-tanstack": "npm:@bleedingdev/modern-js-plugin-tanstack@3.9.0-ultramodern.
|
|
81
|
-
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.
|
|
82
|
-
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.
|
|
83
|
-
"@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.0-ultramodern.
|
|
84
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.
|
|
77
|
+
"@modern-js/backend-federation-contracts": "npm:@bleedingdev/modern-js-backend-federation-contracts@3.9.0-ultramodern.9",
|
|
78
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.9",
|
|
79
|
+
"@modern-js/plugin-bff": "npm:@bleedingdev/modern-js-plugin-bff@3.9.0-ultramodern.9",
|
|
80
|
+
"@modern-js/plugin-tanstack": "npm:@bleedingdev/modern-js-plugin-tanstack@3.9.0-ultramodern.9",
|
|
81
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.9",
|
|
82
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.9",
|
|
83
|
+
"@modern-js/tsconfig": "npm:@bleedingdev/modern-js-tsconfig@3.9.0-ultramodern.9",
|
|
84
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.9",
|
|
85
85
|
"@rslib/core": "1.0.0",
|
|
86
86
|
"@scripts/rstest-config": "2.66.0",
|
|
87
87
|
"@types/node": "^26.4.1",
|
|
@@ -2,6 +2,14 @@ import { type AppTools, appTools, type CliPlugin } from '@modern-js/app-tools';
|
|
|
2
2
|
import backendFederationBuildPlugin from '@modern-js/app-tools-extensions/backend-federation-build';
|
|
3
3
|
import { createCloudflareBuilderPlugin } from '@modern-js/app-tools-extensions/cloudflare-builder';
|
|
4
4
|
import { createDeployOutputAliasesPlugin } from '@modern-js/app-tools-extensions/deploy-output/plugin';
|
|
5
|
+
import {
|
|
6
|
+
RENDERER_EXTENSIONS_PACKAGE,
|
|
7
|
+
SERVER_EXTENSIONS_PLUGIN_NAME,
|
|
8
|
+
} from '@modern-js/app-tools-extensions/policy-defaults';
|
|
9
|
+
import {
|
|
10
|
+
collectRuntimePackageModuleDirectories,
|
|
11
|
+
createRuntimePackageResolutionPlugin,
|
|
12
|
+
} from '@modern-js/app-tools-extensions/runtime-package-resolution';
|
|
5
13
|
import { ultramodernI18nIntegrationPlugin } from '@modern-js/i18n-integration';
|
|
6
14
|
import { ultramodernReleaseEnvelopePlugin } from './release-envelope-plugin';
|
|
7
15
|
import { ultramodernRouterIntegrationPlugin } from './router-integration-plugin';
|
|
@@ -30,29 +38,54 @@ export const ultramodernAppTools = (): CliPlugin<AppTools> => ({
|
|
|
30
38
|
ultramodernReleaseEnvelopePlugin(),
|
|
31
39
|
],
|
|
32
40
|
setup(api) {
|
|
41
|
+
// The composed runtime packages are dependencies of this package, not of
|
|
42
|
+
// the app that composes it. Contribute the directories that host them so
|
|
43
|
+
// the generated `runtime-register.js` resolves them under an isolated
|
|
44
|
+
// (pnpm) linker without the app having to declare them itself.
|
|
45
|
+
const runtimeModuleDirectories = collectRuntimePackageModuleDirectories(
|
|
46
|
+
[RENDERER_EXTENSIONS_PACKAGE, '@modern-js/i18n-integration'],
|
|
47
|
+
import.meta.url,
|
|
48
|
+
);
|
|
49
|
+
|
|
33
50
|
api.modifyResolvedConfig(config => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
51
|
+
const builderPlugins = [
|
|
52
|
+
...(config.builderPlugins ?? []),
|
|
53
|
+
...(runtimeModuleDirectories.length > 0
|
|
54
|
+
? [createRuntimePackageResolutionPlugin(runtimeModuleDirectories)]
|
|
55
|
+
: []),
|
|
56
|
+
...(config.server?.rsc ? [] : [rscDisabledRuntimePlugin()]),
|
|
57
|
+
];
|
|
58
|
+
return { ...config, builderPlugins };
|
|
42
59
|
});
|
|
43
60
|
api._internalServerPlugins(({ plugins }) => {
|
|
61
|
+
// `appTools()` already registered the fork's server policy under its own
|
|
62
|
+
// specifier. An app that composes this package declares *this* package,
|
|
63
|
+
// so the descriptor is renamed rather than duplicated: both specifiers
|
|
64
|
+
// export the same server plugin, and this one is the one such an app can
|
|
65
|
+
// always resolve.
|
|
44
66
|
const name = '@modern-js/ultramodern-app-tools/server-plugin';
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
const renamed = plugins.map(plugin =>
|
|
68
|
+
plugin.name === SERVER_EXTENSIONS_PLUGIN_NAME
|
|
69
|
+
? { ...plugin, name }
|
|
70
|
+
: plugin,
|
|
71
|
+
);
|
|
72
|
+
if (!renamed.some(plugin => plugin.name === name)) {
|
|
73
|
+
renamed.push({ name });
|
|
47
74
|
}
|
|
48
|
-
return { plugins };
|
|
75
|
+
return { plugins: renamed };
|
|
49
76
|
});
|
|
50
77
|
api._internalRuntimePlugins(({ entrypoint, plugins }) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
78
|
+
// Same story for the renderer descriptor: `appTools()` already appended
|
|
79
|
+
// it unless the app opted out.
|
|
80
|
+
if (
|
|
81
|
+
!plugins.some(plugin => plugin.path === RENDERER_EXTENSIONS_PACKAGE)
|
|
82
|
+
) {
|
|
83
|
+
plugins.push({
|
|
84
|
+
name: 'rendererHead',
|
|
85
|
+
path: RENDERER_EXTENSIONS_PACKAGE,
|
|
86
|
+
config: {},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
56
89
|
return { entrypoint, plugins };
|
|
57
90
|
});
|
|
58
91
|
},
|