@bleedingdev/modern-js-app-tools 3.9.0-ultramodern.3 → 3.9.0-ultramodern.4

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.
@@ -61,7 +61,7 @@ const serverAppContextTemplate = (appContext)=>{
61
61
  };
62
62
  const genPluginImportsCode = (plugins, isESM = false)=>plugins.map(([name, options], index)=>{
63
63
  const im = isESM ? `import * as plugin_${index}_ns from '${name}'` : `const plugin_${index}_ns = require('${name}')`;
64
- return `${im};const plugin_${index} = plugin_${index}_ns.default || plugin_${index}_ns`;
64
+ return `${im};const plugin_${index} = typeof plugin_${index}_ns === 'function' ? plugin_${index}_ns : typeof plugin_${index}_ns.default === 'function' ? plugin_${index}_ns.default : plugin_${index}_ns.default?.default`;
65
65
  }).join(';\n');
66
66
  const getPluginsCode = (plugins)=>`[${plugins.map(([, options], index)=>`plugin_${index}(${options ? JSON.stringify(options) : ''})`).join(',')}]`;
67
67
  const getServerConfigPath = (meta)=>`path.join(__dirname, "${utils_namespaceObject.SERVER_DIR}", "${meta}.server")`;
@@ -45,9 +45,11 @@ const external_node_fs_namespaceObject = require("node:fs");
45
45
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
46
46
  const external_node_path_namespaceObject = require("node:path");
47
47
  var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
48
+ const native_type_checker_namespaceObject = require("@modern-js/app-tools-extensions/native-type-checker");
48
49
  const release_identity_namespaceObject = require("@modern-js/app-tools-extensions/release-identity");
49
50
  const cli_namespaceObject = require("@modern-js/plugin/cli");
50
51
  const core_namespaceObject = require("@rsbuild/core");
52
+ const build_environment_js_namespaceObject = require("./config/build-environment.js");
51
53
  const ultramodernReleaseEnvelope_js_namespaceObject = require("./plugins/ultramodernReleaseEnvelope.js");
52
54
  var ultramodernReleaseEnvelope_js_default = /*#__PURE__*/ __webpack_require__.n(ultramodernReleaseEnvelope_js_namespaceObject);
53
55
  const DEFAULT_OTLP_ENDPOINT = 'http://127.0.0.1:4318/v1/logs';
@@ -130,7 +132,12 @@ const createPresetUltramodernConfig = (options = {})=>{
130
132
  } : {}
131
133
  },
132
134
  tools: {
133
- bundlerChain: setReactRouterBridgeSafeAliases,
135
+ bundlerChain: (chain, utils)=>{
136
+ setReactRouterBridgeSafeAliases(chain, utils);
137
+ (0, native_type_checker_namespaceObject.configureUltramodernTypeChecker)(chain, utils.CHAIN_ID.PLUGIN.TS_CHECKER, (from)=>(0, build_environment_js_namespaceObject.resolveEffectTsgoCompiler)({
138
+ from
139
+ }));
140
+ },
134
141
  lightningcssLoader: true,
135
142
  ...bundledReleaseIdentity ? {
136
143
  rspack: (config)=>{
@@ -15,7 +15,7 @@ const serverAppContextTemplate = (appContext)=>{
15
15
  };
16
16
  const genPluginImportsCode = (plugins, isESM = false)=>plugins.map(([name, options], index)=>{
17
17
  const im = isESM ? `import * as plugin_${index}_ns from '${name}'` : `const plugin_${index}_ns = require('${name}')`;
18
- return `${im};const plugin_${index} = plugin_${index}_ns.default || plugin_${index}_ns`;
18
+ return `${im};const plugin_${index} = typeof plugin_${index}_ns === 'function' ? plugin_${index}_ns : typeof plugin_${index}_ns.default === 'function' ? plugin_${index}_ns.default : plugin_${index}_ns.default?.default`;
19
19
  }).join(';\n');
20
20
  const getPluginsCode = (plugins)=>`[${plugins.map(([, options], index)=>`plugin_${index}(${options ? JSON.stringify(options) : ''})`).join(',')}]`;
21
21
  const getServerConfigPath = (meta)=>`path.join(__dirname, "${SERVER_DIR}", "${meta}.server")`;
@@ -1,8 +1,10 @@
1
1
  import node_fs from "node:fs";
2
2
  import node_path from "node:path";
3
+ import { configureUltramodernTypeChecker } from "@modern-js/app-tools-extensions/native-type-checker";
3
4
  import { resolveUltramodernReleaseIdentity } from "@modern-js/app-tools-extensions/release-identity";
4
5
  import { mergeConfig } from "@modern-js/plugin/cli";
5
6
  import { rspack } from "@rsbuild/core";
7
+ import { resolveEffectTsgoCompiler } from "./config/build-environment.mjs";
6
8
  const DEFAULT_OTLP_ENDPOINT = 'http://127.0.0.1:4318/v1/logs';
7
9
  const DEFAULT_VICTORIA_METRICS_ENDPOINT = 'http://127.0.0.1:8428/api/v1/import/prometheus';
8
10
  const resolveReactRouterPackageDir = (appDirectory)=>{
@@ -83,7 +85,12 @@ const createPresetUltramodernConfig = (options = {})=>{
83
85
  } : {}
84
86
  },
85
87
  tools: {
86
- bundlerChain: setReactRouterBridgeSafeAliases,
88
+ bundlerChain: (chain, utils)=>{
89
+ setReactRouterBridgeSafeAliases(chain, utils);
90
+ configureUltramodernTypeChecker(chain, utils.CHAIN_ID.PLUGIN.TS_CHECKER, (from)=>resolveEffectTsgoCompiler({
91
+ from
92
+ }));
93
+ },
87
94
  lightningcssLoader: true,
88
95
  ...bundledReleaseIdentity ? {
89
96
  rspack: (config)=>{
@@ -16,7 +16,7 @@ const serverAppContextTemplate = (appContext)=>{
16
16
  };
17
17
  const genPluginImportsCode = (plugins, isESM = false)=>plugins.map(([name, options], index)=>{
18
18
  const im = isESM ? `import * as plugin_${index}_ns from '${name}'` : `const plugin_${index}_ns = require('${name}')`;
19
- return `${im};const plugin_${index} = plugin_${index}_ns.default || plugin_${index}_ns`;
19
+ return `${im};const plugin_${index} = typeof plugin_${index}_ns === 'function' ? plugin_${index}_ns : typeof plugin_${index}_ns.default === 'function' ? plugin_${index}_ns.default : plugin_${index}_ns.default?.default`;
20
20
  }).join(';\n');
21
21
  const getPluginsCode = (plugins)=>`[${plugins.map(([, options], index)=>`plugin_${index}(${options ? JSON.stringify(options) : ''})`).join(',')}]`;
22
22
  const getServerConfigPath = (meta)=>`path.join(__dirname, "${SERVER_DIR}", "${meta}.server")`;
@@ -1,9 +1,11 @@
1
1
  import "node:module";
2
2
  import node_fs from "node:fs";
3
3
  import node_path from "node:path";
4
+ import { configureUltramodernTypeChecker } from "@modern-js/app-tools-extensions/native-type-checker";
4
5
  import { resolveUltramodernReleaseIdentity } from "@modern-js/app-tools-extensions/release-identity";
5
6
  import { mergeConfig } from "@modern-js/plugin/cli";
6
7
  import { rspack } from "@rsbuild/core";
8
+ import { resolveEffectTsgoCompiler } from "./config/build-environment.mjs";
7
9
  const DEFAULT_OTLP_ENDPOINT = 'http://127.0.0.1:4318/v1/logs';
8
10
  const DEFAULT_VICTORIA_METRICS_ENDPOINT = 'http://127.0.0.1:8428/api/v1/import/prometheus';
9
11
  const resolveReactRouterPackageDir = (appDirectory)=>{
@@ -84,7 +86,12 @@ const createPresetUltramodernConfig = (options = {})=>{
84
86
  } : {}
85
87
  },
86
88
  tools: {
87
- bundlerChain: setReactRouterBridgeSafeAliases,
89
+ bundlerChain: (chain, utils)=>{
90
+ setReactRouterBridgeSafeAliases(chain, utils);
91
+ configureUltramodernTypeChecker(chain, utils.CHAIN_ID.PLUGIN.TS_CHECKER, (from)=>resolveEffectTsgoCompiler({
92
+ from
93
+ }));
94
+ },
88
95
  lightningcssLoader: true,
89
96
  ...bundledReleaseIdentity ? {
90
97
  rspack: (config)=>{
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.9.0-ultramodern.3",
20
+ "version": "3.9.0-ultramodern.4",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "exports": {
@@ -134,18 +134,18 @@
134
134
  "@babel/traverse": "^8.0.4",
135
135
  "@babel/types": "^8.0.4",
136
136
  "@loadable/component": "5.16.7",
137
- "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.3",
138
- "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.3",
139
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.9.0-ultramodern.3",
140
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.3",
141
- "@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.9.0-ultramodern.3",
142
- "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.3",
143
- "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.3",
144
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.3",
145
- "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.3",
146
- "@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.9.0-ultramodern.3",
147
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.3",
148
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.3",
137
+ "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.4",
138
+ "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.4",
139
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.9.0-ultramodern.4",
140
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.4",
141
+ "@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.9.0-ultramodern.4",
142
+ "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.4",
143
+ "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.4",
144
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.4",
145
+ "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.4",
146
+ "@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.9.0-ultramodern.4",
147
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.4",
148
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.4",
149
149
  "@rsbuild/core": "2.2.3",
150
150
  "@swc/core": "1.16.2",
151
151
  "@swc/helpers": "^0.5.23",