@forge/bundler 4.11.1-next.2 → 4.11.1-next.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.
- package/CHANGELOG.md +15 -0
- package/out/config/node.d.ts.map +1 -1
- package/out/config/node.js +0 -13
- package/out/stubs/wrapper.js +6 -8
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @forge/bundler
|
|
2
2
|
|
|
3
|
+
## 4.11.1-next.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @forge/cli-shared@3.17.2-next.2
|
|
8
|
+
- @forge/lint@3.6.5-next.2
|
|
9
|
+
|
|
10
|
+
## 4.11.1-next.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 89e0c881: Use \_HANDLER to determine functions to expose on Node runtime
|
|
15
|
+
- Updated dependencies [89e0c881]
|
|
16
|
+
- @forge/runtime@4.4.7-next.0
|
|
17
|
+
|
|
3
18
|
## 4.11.1-next.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/out/config/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/config/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/config/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAIpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,eAAO,MAAM,yBAAyB,gBACvB,mBAAmB,EAAE,UAC1B,aAAa,KACpB,mBAkCF,CAAC"}
|
package/out/config/node.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNodeRuntimeBuildConfig = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
|
|
4
|
-
const webpack_1 = require("webpack");
|
|
5
4
|
const common_1 = require("./common");
|
|
6
5
|
exports.NODE_WEBPACK_CONFIG_NAME = 'node-runtime';
|
|
7
6
|
const getNodeRuntimeBuildConfig = (entrypoints, config) => {
|
|
@@ -14,18 +13,6 @@ const getNodeRuntimeBuildConfig = (entrypoints, config) => {
|
|
|
14
13
|
}
|
|
15
14
|
webpackConfig.entry = newEntries;
|
|
16
15
|
webpackConfig.target = 'node18';
|
|
17
|
-
const defineExports = ({ filename }) => {
|
|
18
|
-
const entryName = filename.replace(/\.js$/, '');
|
|
19
|
-
const entrypoint = entrypoints.find((e) => e.name === entryName);
|
|
20
|
-
if (entrypoint) {
|
|
21
|
-
return `__BUNDLED_EXPORTS__ = ${JSON.stringify(entrypoint.functions)};`;
|
|
22
|
-
}
|
|
23
|
-
return '';
|
|
24
|
-
};
|
|
25
|
-
webpackConfig.plugins.push(new webpack_1.BannerPlugin({
|
|
26
|
-
banner: defineExports,
|
|
27
|
-
raw: true
|
|
28
|
-
}));
|
|
29
16
|
webpackConfig.name = exports.NODE_WEBPACK_CONFIG_NAME;
|
|
30
17
|
webpackConfig.module.rules.push({
|
|
31
18
|
test: /\.m?js$/,
|
package/out/stubs/wrapper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a, _b;
|
|
2
|
+
var _a, _b, _c, _d;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const api_1 = require("@forge/api");
|
|
5
5
|
const runtime_1 = require("@forge/runtime");
|
|
@@ -11,9 +11,9 @@ const realRequire = eval('require');
|
|
|
11
11
|
if (!realRequire) {
|
|
12
12
|
throw new Error(`Unexpected require: ${realRequire}`);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
16
|
-
throw new Error('Expected to find
|
|
14
|
+
const handler = (_b = (_a = process.env._HANDLER) === null || _a === void 0 ? void 0 : _a.split('.')) === null || _b === void 0 ? void 0 : _b[1];
|
|
15
|
+
if (!handler) {
|
|
16
|
+
throw new Error('Expected to find function handler name in _HANDLER environment variable.');
|
|
17
17
|
}
|
|
18
18
|
const adapter = (name) => {
|
|
19
19
|
return async (lambdaEvent, lambdaContext) => {
|
|
@@ -70,7 +70,5 @@ const adapter = (name) => {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
(
|
|
74
|
-
|
|
75
|
-
exports[ownExport] = adapter(ownExport);
|
|
76
|
-
}
|
|
73
|
+
(_d = (_c = process).setSourceMapsEnabled) === null || _d === void 0 ? void 0 : _d.call(_c, true);
|
|
74
|
+
exports[handler] = adapter(handler);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bundler",
|
|
3
|
-
"version": "4.11.1-next.
|
|
3
|
+
"version": "4.11.1-next.4",
|
|
4
4
|
"description": "Default bundler for Forge apps",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@babel/preset-typescript": "^7.22.5",
|
|
22
22
|
"@forge/api": "2.18.4",
|
|
23
23
|
"@forge/babel-plugin-transform-ui": "1.1.6",
|
|
24
|
-
"@forge/cli-shared": "3.17.2-next.
|
|
25
|
-
"@forge/lint": "3.6.5-next.
|
|
26
|
-
"@forge/runtime": "4.4.
|
|
24
|
+
"@forge/cli-shared": "3.17.2-next.2",
|
|
25
|
+
"@forge/lint": "3.6.5-next.2",
|
|
26
|
+
"@forge/runtime": "4.4.7-next.0",
|
|
27
27
|
"@forge/util": "1.3.1",
|
|
28
28
|
"assert": "^2.0.0",
|
|
29
29
|
"babel-loader": "^8.3.0",
|