@modern-js/app-tools 2.57.1-alpha.3 → 2.57.1-alpha.5
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/plugins/deploy/platforms/netlify-entry.mjs +3 -0
- package/dist/cjs/plugins/deploy/platforms/netlify.js +4 -4
- package/dist/types/plugins/deploy/platforms/netlify-entry.d.mts +1 -0
- package/package.json +8 -8
- package/dist/cjs/plugins/deploy/platforms/netlify-entry-mjs.js +0 -28
- package/dist/types/plugins/deploy/platforms/netlify-entry-mjs.d.ts +0 -1
- /package/dist/cjs/plugins/deploy/platforms/{netlify-entry-cjs.js → netlify-entry.js} +0 -0
- /package/dist/types/plugins/deploy/platforms/{netlify-entry-cjs.d.ts → netlify-entry.d.cts} +0 -0
|
@@ -56,7 +56,7 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
|
|
|
56
56
|
const netlifyOutput = import_node_path.default.join(appDirectory, ".netlify");
|
|
57
57
|
const funcsDirectory = import_node_path.default.join(netlifyOutput, "functions");
|
|
58
58
|
const entryFilePath = import_node_path.default.join(funcsDirectory, "index.js");
|
|
59
|
-
const handlerFilePath = import_node_path.default.join(funcsDirectory, "netlify-handler.
|
|
59
|
+
const handlerFilePath = import_node_path.default.join(funcsDirectory, "netlify-handler.cjs");
|
|
60
60
|
return {
|
|
61
61
|
async prepare() {
|
|
62
62
|
await import_utils.fs.remove(netlifyOutput);
|
|
@@ -116,14 +116,14 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
|
|
|
116
116
|
const pluginsCode = `[${plugins.map((plugin, index) => {
|
|
117
117
|
return `plugin_${index}()`;
|
|
118
118
|
}).join(",")}]`;
|
|
119
|
-
let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./netlify-handler.
|
|
119
|
+
let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./netlify-handler.cjs"))).toString();
|
|
120
120
|
const serverAppContext = (0, import_utils2.serverAppContenxtTemplate)(appContext);
|
|
121
121
|
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_plugins", pluginsCode).replace("p_sharedDirectory", serverAppContext.sharedDirectory).replace("p_apiDirectory", serverAppContext.apiDirectory).replace("p_lambdaDirectory", serverAppContext.lambdaDirectory);
|
|
122
122
|
await import_utils.fs.writeFile(handlerFilePath, entryCode);
|
|
123
123
|
if (isEsmProject) {
|
|
124
|
-
await import_utils.fs.copy(import_node_path.default.join(__dirname, "./netlify-entry
|
|
124
|
+
await import_utils.fs.copy(import_node_path.default.join(__dirname, "./netlify-entry.mjs"), entryFilePath);
|
|
125
125
|
} else {
|
|
126
|
-
await import_utils.fs.copy(import_node_path.default.join(__dirname, "./netlify-entry
|
|
126
|
+
await import_utils.fs.copy(import_node_path.default.join(__dirname, "./netlify-entry.cjs"), entryFilePath);
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
async end() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default handler;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.57.1-alpha.
|
|
18
|
+
"version": "2.57.1-alpha.5",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -87,20 +87,20 @@
|
|
|
87
87
|
"mlly": "^1.6.1",
|
|
88
88
|
"pkg-types": "^1.1.0",
|
|
89
89
|
"std-env": "^3.7.0",
|
|
90
|
-
"@modern-js/node-bundle-require": "2.57.0",
|
|
91
90
|
"@modern-js/core": "2.57.0",
|
|
91
|
+
"@modern-js/node-bundle-require": "2.57.0",
|
|
92
92
|
"@modern-js/plugin": "2.57.0",
|
|
93
93
|
"@modern-js/plugin-i18n": "2.57.0",
|
|
94
|
-
"@modern-js/prod-server": "2.57.0",
|
|
95
|
-
"@modern-js/rsbuild-plugin-esbuild": "2.57.0",
|
|
96
94
|
"@modern-js/plugin-lint": "2.57.0",
|
|
95
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.57.0",
|
|
97
96
|
"@modern-js/server": "2.57.0",
|
|
98
|
-
"@modern-js/types": "2.57.0",
|
|
99
|
-
"@modern-js/server-core": "2.57.0",
|
|
100
97
|
"@modern-js/server-utils": "2.57.0",
|
|
101
|
-
"@modern-js/
|
|
98
|
+
"@modern-js/plugin-data-loader": "2.57.0",
|
|
99
|
+
"@modern-js/server-core": "2.57.0",
|
|
102
100
|
"@modern-js/uni-builder": "2.57.0",
|
|
103
|
-
"@modern-js/
|
|
101
|
+
"@modern-js/utils": "2.57.0",
|
|
102
|
+
"@modern-js/prod-server": "2.57.0",
|
|
103
|
+
"@modern-js/types": "2.57.0"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@rsbuild/plugin-swc": "1.0.1-beta.3",
|
|
@@ -1,28 +0,0 @@
|
|
|
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 netlify_entry_mjs_exports = {};
|
|
20
|
-
__export(netlify_entry_mjs_exports, {
|
|
21
|
-
handler: () => import_netlify_handler.handler
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(netlify_entry_mjs_exports);
|
|
24
|
-
var import_netlify_handler = require("./netlify-handler");
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
handler
|
|
28
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { handler } from "./netlify-handler";
|
|
File without changes
|
|
File without changes
|