@forge/bundler 4.17.6-next.4 → 4.18.0-next.6
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 +21 -0
- package/out/config/node.d.ts +1 -2
- package/out/config/node.d.ts.map +1 -1
- package/out/config/node.js +4 -9
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @forge/bundler
|
|
2
2
|
|
|
3
|
+
## 4.18.0-next.6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4117f97: Bump cheerio from version 0.22 to version 1.0
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [4117f97]
|
|
12
|
+
- @forge/cli-shared@5.4.0-next.5
|
|
13
|
+
- @forge/lint@5.3.2-next.5
|
|
14
|
+
|
|
15
|
+
## 4.17.6-next.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6c9b381: Update comment referent to node-runtime (no code change)
|
|
20
|
+
- eaa03f9: Remove FORGE_USE_LOCAL_WRAPPER variable, LocalWrapperProvider only works when FORGE_WRAPPER_PATH is set
|
|
21
|
+
- Updated dependencies [6c9b381]
|
|
22
|
+
- @forge/api@3.9.1-next.0
|
|
23
|
+
|
|
3
24
|
## 4.17.6-next.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/out/config/node.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { CommonWebpackConfig, ConfigBuilder, FunctionsEntryPoint } from './commo
|
|
|
3
3
|
export declare const NODE_WEBPACK_CONFIG_NAME = "node-runtime";
|
|
4
4
|
export declare const NODE_WEBPACK_USER_CODE_DIR = "bundled";
|
|
5
5
|
export declare const NODE_RUNTIME_VERSION_FILE = "runtime.json";
|
|
6
|
-
export declare const LOCAL_WRAPPER_PATH: string;
|
|
7
6
|
export declare class LocalWrapperNotFoundError extends UserError {
|
|
8
7
|
constructor();
|
|
9
8
|
}
|
|
@@ -23,7 +22,7 @@ export interface WrapperProvider {
|
|
|
23
22
|
export declare class LocalWrapperProvider implements WrapperProvider {
|
|
24
23
|
private readonly filesystemReader;
|
|
25
24
|
private readonly path;
|
|
26
|
-
constructor(filesystemReader: FileSystemReader, path
|
|
25
|
+
constructor(filesystemReader: FileSystemReader, path: string);
|
|
27
26
|
getNodeRuntimeWrapper(): Promise<WrapperScript>;
|
|
28
27
|
}
|
|
29
28
|
export declare class NetworkWrapperProvider implements WrapperProvider {
|
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":"AAGA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAA6C,MAAM,mBAAmB,CAAC;AAEtH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAWxD,qBAAa,yBAA0B,SAAQ,SAAS;;CAIvD;AAED,qBAAa,mBAAoB,SAAQ,SAAS;gBACpC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;CAGhD;AAED,qBAAa,yBAA0B,SAAQ,SAAS;gBAC1C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS;CAG3D;AAED,oBAAY,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CACjD;AAED,qBAAa,oBAAqB,YAAW,eAAe;IAExD,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBADJ,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,MAAM;IAEzB,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC;CAUtD;AAED,qBAAa,sBAAuB,YAAW,eAAe;IAC5D,OAAO,CAAC,OAAO,CAA4B;IAC3C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;;YAKX,uBAAuB;IAS/B,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC;CAuCtD;AAED,eAAO,MAAM,kBAAkB;sBAA8C,gBAAgB;mDAQ5F,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBAClB,eAAe,mBACnB,mBAAmB,EAAE,UAAU,aAAa,KAAG,mBA4D5D,CAAC"}
|
package/out/config/node.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = exports.
|
|
3
|
+
exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = exports.NODE_RUNTIME_VERSION_FILE = exports.NODE_WEBPACK_USER_CODE_DIR = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const cheerio_1 = tslib_1.__importDefault(require("cheerio"));
|
|
5
|
+
const cheerio_1 = require("cheerio");
|
|
7
6
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
8
7
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
8
|
const common_1 = require("./common");
|
|
@@ -18,7 +17,6 @@ var RuntimeCDN;
|
|
|
18
17
|
RuntimeCDN["FEDRAMP_MODERATE_STAGING"] = "https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/";
|
|
19
18
|
RuntimeCDN["FEDRAMP_MODERATE_PROD"] = "https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/";
|
|
20
19
|
})(RuntimeCDN || (RuntimeCDN = {}));
|
|
21
|
-
exports.LOCAL_WRAPPER_PATH = path_1.default.resolve(__dirname, '..', '..', '..', 'forge-node-runtime', 'dist', 'wrapper.js');
|
|
22
20
|
class LocalWrapperNotFoundError extends cli_shared_1.UserError {
|
|
23
21
|
constructor() {
|
|
24
22
|
super('Local node runtime wrapper not found.');
|
|
@@ -40,7 +38,7 @@ exports.ParseWrapperCDNIndexError = ParseWrapperCDNIndexError;
|
|
|
40
38
|
class LocalWrapperProvider {
|
|
41
39
|
filesystemReader;
|
|
42
40
|
path;
|
|
43
|
-
constructor(filesystemReader, path
|
|
41
|
+
constructor(filesystemReader, path) {
|
|
44
42
|
this.filesystemReader = filesystemReader;
|
|
45
43
|
this.path = path;
|
|
46
44
|
}
|
|
@@ -63,7 +61,7 @@ class NetworkWrapperProvider {
|
|
|
63
61
|
this.cdnUrl = (0, cli_shared_1.getEnvironmentConfig)(RuntimeCDN);
|
|
64
62
|
}
|
|
65
63
|
async getWrapperPathFromIndex(htmlContent, requestId) {
|
|
66
|
-
const html = cheerio_1.
|
|
64
|
+
const html = (0, cheerio_1.load)(htmlContent, { xml: { xmlMode: false } });
|
|
67
65
|
const wrapperPath = html('script')?.get()?.[0]?.attribs['src'];
|
|
68
66
|
if (typeof wrapperPath !== 'string') {
|
|
69
67
|
throw new ParseWrapperCDNIndexError('Unable to parse source of runtime component.', requestId);
|
|
@@ -101,9 +99,6 @@ class NetworkWrapperProvider {
|
|
|
101
99
|
}
|
|
102
100
|
exports.NetworkWrapperProvider = NetworkWrapperProvider;
|
|
103
101
|
const getWrapperProvider = ({ fileSystemReader }) => {
|
|
104
|
-
if (process.env.FORGE_USE_LOCAL_WRAPPER === 'true') {
|
|
105
|
-
return new LocalWrapperProvider(fileSystemReader);
|
|
106
|
-
}
|
|
107
102
|
if (process.env.FORGE_WRAPPER_PATH) {
|
|
108
103
|
return new LocalWrapperProvider(fileSystemReader, process.env.FORGE_WRAPPER_PATH);
|
|
109
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bundler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.0-next.6",
|
|
4
4
|
"description": "Default bundler for Forge apps",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
20
20
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
21
21
|
"@babel/preset-typescript": "^7.23.3",
|
|
22
|
-
"@forge/api": "3.9.0",
|
|
22
|
+
"@forge/api": "3.9.1-next.0",
|
|
23
23
|
"@forge/babel-plugin-transform-ui": "1.1.18",
|
|
24
|
-
"@forge/cli-shared": "5.4.0-next.
|
|
25
|
-
"@forge/lint": "5.3.2-next.
|
|
24
|
+
"@forge/cli-shared": "5.4.0-next.5",
|
|
25
|
+
"@forge/lint": "5.3.2-next.5",
|
|
26
26
|
"@forge/util": "1.4.4",
|
|
27
27
|
"assert": "^2.1.0",
|
|
28
28
|
"babel-loader": "^8.3.0",
|
|
29
29
|
"browserify-zlib": "^0.2.0",
|
|
30
30
|
"buffer": "^6.0.3",
|
|
31
31
|
"chalk": "^4.1.2",
|
|
32
|
-
"cheerio": "^0.
|
|
32
|
+
"cheerio": "^1.0.0",
|
|
33
33
|
"console-browserify": "^1.2.0",
|
|
34
34
|
"crypto-browserify": "^3.12.0",
|
|
35
35
|
"events": "^3.3.0",
|