@modern-js/app-tools 2.67.9 → 2.67.10

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/cjs/index.js CHANGED
@@ -53,6 +53,7 @@ var import_analyze = __toESM(require("./plugins/analyze"));
53
53
  var import_deploy = __toESM(require("./plugins/deploy"));
54
54
  var import_initialize = __toESM(require("./plugins/initialize"));
55
55
  var import_serverBuild = __toESM(require("./plugins/serverBuild"));
56
+ var import_serverRuntime = __toESM(require("./plugins/serverRuntime"));
56
57
  var import_generateWatchFiles = require("./utils/generateWatchFiles");
57
58
  var import_initAppContext = require("./utils/initAppContext");
58
59
  var import_restart = require("./utils/restart");
@@ -69,6 +70,7 @@ const appTools = (options = {
69
70
  }) => ({
70
71
  name: "@modern-js/app-tools",
71
72
  usePlugins: [
73
+ (0, import_serverRuntime.default)(),
72
74
  (0, import_compat.compatPlugin)(),
73
75
  (0, import_initialize.default)({
74
76
  bundler: (options === null || options === void 0 ? void 0 : options.bundler) && [
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var serverRuntime_exports = {};
20
+ __export(serverRuntime_exports, {
21
+ default: () => serverRuntime_default
22
+ });
23
+ module.exports = __toCommonJS(serverRuntime_exports);
24
+ var serverRuntime_default = () => ({
25
+ name: "@modern-js/plugin-server-runtime",
26
+ setup(api) {
27
+ api.config(() => ({
28
+ output: {
29
+ externals: [
30
+ {
31
+ "@modern-js/server-runtime": "@modern-js/server-runtime"
32
+ }
33
+ ]
34
+ }
35
+ }));
36
+ }
37
+ });
package/dist/esm/index.js CHANGED
@@ -14,6 +14,7 @@ import analyzePlugin from "./plugins/analyze";
14
14
  import deployPlugin from "./plugins/deploy";
15
15
  import initializePlugin from "./plugins/initialize";
16
16
  import serverBuildPlugin from "./plugins/serverBuild";
17
+ import serverRuntimePlugin from "./plugins/serverRuntime";
17
18
  import { generateWatchFiles } from "./utils/generateWatchFiles";
18
19
  import { initAppContext } from "./utils/initAppContext";
19
20
  import { restart } from "./utils/restart";
@@ -26,6 +27,7 @@ var appTools = function() {
26
27
  return {
27
28
  name: "@modern-js/app-tools",
28
29
  usePlugins: [
30
+ serverRuntimePlugin(),
29
31
  compatPlugin(),
30
32
  initializePlugin({
31
33
  bundler: (options === null || options === void 0 ? void 0 : options.bundler) && [
@@ -0,0 +1,22 @@
1
+ function serverRuntime_default() {
2
+ return {
3
+ name: "@modern-js/plugin-server-runtime",
4
+ setup: function setup(api) {
5
+ api.config(function() {
6
+ return {
7
+ output: {
8
+ externals: [
9
+ {
10
+ "@modern-js/server-runtime": "@modern-js/server-runtime"
11
+ }
12
+ ]
13
+ }
14
+ };
15
+ });
16
+ }
17
+ };
18
+ }
19
+ ;
20
+ export {
21
+ serverRuntime_default as default
22
+ };
@@ -11,6 +11,7 @@ import analyzePlugin from "./plugins/analyze";
11
11
  import deployPlugin from "./plugins/deploy";
12
12
  import initializePlugin from "./plugins/initialize";
13
13
  import serverBuildPlugin from "./plugins/serverBuild";
14
+ import serverRuntimePlugin from "./plugins/serverRuntime";
14
15
  import { generateWatchFiles } from "./utils/generateWatchFiles";
15
16
  import { initAppContext } from "./utils/initAppContext";
16
17
  import { restart } from "./utils/restart";
@@ -21,6 +22,7 @@ const appTools = (options = {
21
22
  }) => ({
22
23
  name: "@modern-js/app-tools",
23
24
  usePlugins: [
25
+ serverRuntimePlugin(),
24
26
  compatPlugin(),
25
27
  initializePlugin({
26
28
  bundler: (options === null || options === void 0 ? void 0 : options.bundler) && [
@@ -0,0 +1,17 @@
1
+ var serverRuntime_default = () => ({
2
+ name: "@modern-js/plugin-server-runtime",
3
+ setup(api) {
4
+ api.config(() => ({
5
+ output: {
6
+ externals: [
7
+ {
8
+ "@modern-js/server-runtime": "@modern-js/server-runtime"
9
+ }
10
+ ]
11
+ }
12
+ }));
13
+ }
14
+ });
15
+ export {
16
+ serverRuntime_default as default
17
+ };
@@ -0,0 +1,3 @@
1
+ import type { AppTools, CliPluginFuture } from '../types';
2
+ declare const _default: () => CliPluginFuture<AppTools<"shared">>;
3
+ export default _default;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.67.9",
18
+ "version": "2.67.10",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -91,25 +91,25 @@
91
91
  "es-module-lexer": "^1.1.0",
92
92
  "esbuild": "0.17.19",
93
93
  "esbuild-register": "^3.6.0",
94
- "flatted": "^3.2.9",
94
+ "flatted": "^3.3.3",
95
95
  "mlly": "^1.6.1",
96
96
  "ndepe": "^0.1.11",
97
97
  "pkg-types": "^1.1.0",
98
98
  "std-env": "^3.7.0",
99
- "@modern-js/core": "2.67.9",
100
- "@modern-js/node-bundle-require": "2.67.9",
101
- "@modern-js/plugin": "2.67.9",
102
- "@modern-js/plugin-data-loader": "2.67.9",
103
- "@modern-js/plugin-i18n": "2.67.9",
104
- "@modern-js/plugin-v2": "2.67.9",
105
- "@modern-js/prod-server": "2.67.9",
106
- "@modern-js/rsbuild-plugin-esbuild": "2.67.9",
107
- "@modern-js/server": "2.67.9",
108
- "@modern-js/server-core": "2.67.9",
109
- "@modern-js/server-utils": "2.67.9",
110
- "@modern-js/types": "2.67.9",
111
- "@modern-js/uni-builder": "2.67.9",
112
- "@modern-js/utils": "2.67.9"
99
+ "@modern-js/core": "2.67.10",
100
+ "@modern-js/node-bundle-require": "2.67.10",
101
+ "@modern-js/plugin": "2.67.10",
102
+ "@modern-js/plugin-data-loader": "2.67.10",
103
+ "@modern-js/plugin-i18n": "2.67.10",
104
+ "@modern-js/plugin-v2": "2.67.10",
105
+ "@modern-js/prod-server": "2.67.10",
106
+ "@modern-js/rsbuild-plugin-esbuild": "2.67.10",
107
+ "@modern-js/server": "2.67.10",
108
+ "@modern-js/server-core": "2.67.10",
109
+ "@modern-js/server-utils": "2.67.10",
110
+ "@modern-js/types": "2.67.10",
111
+ "@modern-js/uni-builder": "2.67.10",
112
+ "@modern-js/utils": "2.67.10"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@rsbuild/plugin-webpack-swc": "1.1.1",