@forge/bundler 4.12.0-next.9 → 4.12.1-next.0
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 +265 -0
- package/out/config/node.d.ts +8 -8
- package/out/config/node.d.ts.map +1 -1
- package/out/config/node.js +31 -16
- package/package.json +18 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,270 @@
|
|
|
1
1
|
# @forge/bundler
|
|
2
2
|
|
|
3
|
+
## 4.12.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 521fda43: Bumping dependencies via Renovate:
|
|
8
|
+
|
|
9
|
+
- @babel/core
|
|
10
|
+
- @babel/traverse
|
|
11
|
+
- @babel/types
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [521fda43]
|
|
14
|
+
- Updated dependencies [fe74dfbd]
|
|
15
|
+
- @forge/babel-plugin-transform-ui@1.1.8-next.0
|
|
16
|
+
- @forge/cli-shared@3.18.1-next.0
|
|
17
|
+
- @forge/lint@3.6.7-next.0
|
|
18
|
+
|
|
19
|
+
## 4.12.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 424cf45e: Use CDN packaged wrapper script for the node runtime
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- ccc113ec: Bumping dependencies via Renovate:
|
|
28
|
+
|
|
29
|
+
- @types/node
|
|
30
|
+
|
|
31
|
+
- 82f09e75: Bumping dependencies via Renovate:
|
|
32
|
+
|
|
33
|
+
- @types/react
|
|
34
|
+
|
|
35
|
+
- e3260cf8: Bumping dependencies via Renovate:
|
|
36
|
+
|
|
37
|
+
- @types/node
|
|
38
|
+
|
|
39
|
+
- 9f70463a: Bumping dependencies via Renovate:
|
|
40
|
+
|
|
41
|
+
- node-fetch
|
|
42
|
+
|
|
43
|
+
- 934c16e2: Bumping dependencies via Renovate:
|
|
44
|
+
|
|
45
|
+
- @atlassian/xen-test-util
|
|
46
|
+
|
|
47
|
+
- bf0a343b: Bumping dependencies via Renovate:
|
|
48
|
+
|
|
49
|
+
- @types/jest
|
|
50
|
+
|
|
51
|
+
- fbb55b2c: Bumping dependencies via Renovate:
|
|
52
|
+
|
|
53
|
+
- @babel/core
|
|
54
|
+
- @babel/plugin-transform-class-static-block
|
|
55
|
+
- @babel/plugin-transform-numeric-separator
|
|
56
|
+
- @babel/plugin-transform-optional-chaining
|
|
57
|
+
- @babel/preset-typescript
|
|
58
|
+
- @babel/traverse
|
|
59
|
+
- @babel/types
|
|
60
|
+
|
|
61
|
+
- 770654be: Change supported Node versions to 18 and 20
|
|
62
|
+
- d42bc08d: Bumping dependencies via Renovate:
|
|
63
|
+
|
|
64
|
+
- @babel/core
|
|
65
|
+
- @babel/plugin-transform-optional-chaining
|
|
66
|
+
- @babel/plugin-transform-react-jsx
|
|
67
|
+
- @babel/preset-typescript
|
|
68
|
+
- @babel/traverse
|
|
69
|
+
- @babel/types
|
|
70
|
+
|
|
71
|
+
- 902c23c0: Fetch wrapper directly from CDN instead of Launchdarkly
|
|
72
|
+
- e87a2d8e: Bumping dependencies via Renovate:
|
|
73
|
+
|
|
74
|
+
- prettier
|
|
75
|
+
|
|
76
|
+
- edf4f2c5: Bumping dependencies via Renovate:
|
|
77
|
+
|
|
78
|
+
- webpack-bundle-analyzer
|
|
79
|
+
|
|
80
|
+
- bdb0f05b: Bumping dependencies via Renovate:
|
|
81
|
+
|
|
82
|
+
- @atlassian/xen-test-util
|
|
83
|
+
|
|
84
|
+
- eb261114: Bumping dependencies via Renovate:
|
|
85
|
+
|
|
86
|
+
- eslint
|
|
87
|
+
|
|
88
|
+
- 9b9f58d3: Bumping dependencies via Renovate:
|
|
89
|
+
|
|
90
|
+
- @types/node
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [ccc113ec]
|
|
93
|
+
- Updated dependencies [e3260cf8]
|
|
94
|
+
- Updated dependencies [9f70463a]
|
|
95
|
+
- Updated dependencies [424cf45e]
|
|
96
|
+
- Updated dependencies [934c16e2]
|
|
97
|
+
- Updated dependencies [bf0a343b]
|
|
98
|
+
- Updated dependencies [fbb55b2c]
|
|
99
|
+
- Updated dependencies [9a78932b]
|
|
100
|
+
- Updated dependencies [770654be]
|
|
101
|
+
- Updated dependencies [d8672a76]
|
|
102
|
+
- Updated dependencies [d42bc08d]
|
|
103
|
+
- Updated dependencies [347359bf]
|
|
104
|
+
- Updated dependencies [45147109]
|
|
105
|
+
- Updated dependencies [ffb75e7f]
|
|
106
|
+
- Updated dependencies [b22ff2d0]
|
|
107
|
+
- Updated dependencies [c992d38e]
|
|
108
|
+
- Updated dependencies [bdb0f05b]
|
|
109
|
+
- Updated dependencies [9b9f58d3]
|
|
110
|
+
- @forge/api@2.19.0
|
|
111
|
+
- @forge/cli-shared@3.18.0
|
|
112
|
+
- @forge/lint@3.6.6
|
|
113
|
+
- @forge/babel-plugin-transform-ui@1.1.7
|
|
114
|
+
- @forge/node-runtime@0.1.2
|
|
115
|
+
|
|
116
|
+
## 4.12.0-next.24
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- Updated dependencies [ffb75e7f]
|
|
121
|
+
- @forge/cli-shared@3.18.0-next.15
|
|
122
|
+
- @forge/lint@3.6.6-next.15
|
|
123
|
+
|
|
124
|
+
## 4.12.0-next.23
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [b22ff2d0]
|
|
129
|
+
- @forge/cli-shared@3.18.0-next.14
|
|
130
|
+
- @forge/lint@3.6.6-next.14
|
|
131
|
+
|
|
132
|
+
## 4.12.0-next.22
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- d42bc08d: Bumping dependencies via Renovate:
|
|
137
|
+
|
|
138
|
+
- @babel/core
|
|
139
|
+
- @babel/plugin-transform-optional-chaining
|
|
140
|
+
- @babel/plugin-transform-react-jsx
|
|
141
|
+
- @babel/preset-typescript
|
|
142
|
+
- @babel/traverse
|
|
143
|
+
- @babel/types
|
|
144
|
+
|
|
145
|
+
- Updated dependencies [d42bc08d]
|
|
146
|
+
- @forge/babel-plugin-transform-ui@1.1.7-next.1
|
|
147
|
+
|
|
148
|
+
## 4.12.0-next.21
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies [c992d38e]
|
|
153
|
+
- @forge/node-runtime@0.1.2-next.9
|
|
154
|
+
|
|
155
|
+
## 4.12.0-next.20
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- @forge/cli-shared@3.18.0-next.13
|
|
160
|
+
- @forge/lint@3.6.6-next.13
|
|
161
|
+
|
|
162
|
+
## 4.12.0-next.19
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- 770654be: Change supported Node versions to 18 and 20
|
|
167
|
+
- Updated dependencies [770654be]
|
|
168
|
+
- @forge/node-runtime@0.1.2-next.8
|
|
169
|
+
- @forge/api@2.19.0-next.6
|
|
170
|
+
|
|
171
|
+
## 4.12.0-next.18
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- 902c23c0: Fetch wrapper directly from CDN instead of Launchdarkly
|
|
176
|
+
|
|
177
|
+
## 4.12.0-next.17
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- e3260cf: Bumping dependencies via Renovate:
|
|
182
|
+
|
|
183
|
+
- @types/node
|
|
184
|
+
|
|
185
|
+
- Updated dependencies [e3260cf]
|
|
186
|
+
- @forge/api@2.19.0-next.5
|
|
187
|
+
- @forge/cli-shared@3.18.0-next.12
|
|
188
|
+
- @forge/node-runtime@0.1.2-next.7
|
|
189
|
+
- @forge/lint@3.6.6-next.12
|
|
190
|
+
|
|
191
|
+
## 4.12.0-next.16
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- Updated dependencies [347359b]
|
|
196
|
+
- @forge/api@2.19.0-next.4
|
|
197
|
+
- @forge/node-runtime@0.1.2-next.6
|
|
198
|
+
|
|
199
|
+
## 4.12.0-next.15
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- @forge/node-runtime@0.1.2-next.5
|
|
204
|
+
|
|
205
|
+
## 4.12.0-next.14
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- @forge/cli-shared@3.18.0-next.11
|
|
210
|
+
- @forge/lint@3.6.6-next.11
|
|
211
|
+
|
|
212
|
+
## 4.12.0-next.13
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- @forge/cli-shared@3.18.0-next.10
|
|
217
|
+
- @forge/lint@3.6.6-next.10
|
|
218
|
+
|
|
219
|
+
## 4.12.0-next.12
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- ccc113ec: Bumping dependencies via Renovate:
|
|
224
|
+
|
|
225
|
+
- @types/node
|
|
226
|
+
|
|
227
|
+
- 934c16e2: Bumping dependencies via Renovate:
|
|
228
|
+
|
|
229
|
+
- @atlassian/xen-test-util
|
|
230
|
+
|
|
231
|
+
- Updated dependencies [ccc113ec]
|
|
232
|
+
- Updated dependencies [934c16e2]
|
|
233
|
+
- @forge/api@2.18.6-next.3
|
|
234
|
+
- @forge/cli-shared@3.18.0-next.9
|
|
235
|
+
- @forge/lint@3.6.6-next.9
|
|
236
|
+
- @forge/node-runtime@0.1.2-next.4
|
|
237
|
+
|
|
238
|
+
## 4.12.0-next.11
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- edf4f2c5: Bumping dependencies via Renovate:
|
|
243
|
+
|
|
244
|
+
- webpack-bundle-analyzer
|
|
245
|
+
|
|
246
|
+
- eb261114: Bumping dependencies via Renovate:
|
|
247
|
+
|
|
248
|
+
- eslint
|
|
249
|
+
|
|
250
|
+
- Updated dependencies [45147109]
|
|
251
|
+
- @forge/cli-shared@3.18.0-next.8
|
|
252
|
+
- @forge/lint@3.6.6-next.8
|
|
253
|
+
|
|
254
|
+
## 4.12.0-next.10
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- 9f70463: Bumping dependencies via Renovate:
|
|
259
|
+
|
|
260
|
+
- node-fetch
|
|
261
|
+
|
|
262
|
+
- Updated dependencies [9f70463]
|
|
263
|
+
- @forge/api@2.18.6-next.2
|
|
264
|
+
- @forge/cli-shared@3.18.0-next.7
|
|
265
|
+
- @forge/lint@3.6.6-next.7
|
|
266
|
+
- @forge/node-runtime@0.1.2-next.3
|
|
267
|
+
|
|
3
268
|
## 4.12.0-next.9
|
|
4
269
|
|
|
5
270
|
### Minor Changes
|
package/out/config/node.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { CommonWebpackConfig, ConfigBuilder, FunctionsEntryPoint } from './common';
|
|
2
|
-
import { BaseError,
|
|
2
|
+
import { BaseError, FileSystemReader, UserError } from '@forge/cli-shared';
|
|
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 class LocalWrapperNotFoundError extends UserError {
|
|
6
6
|
constructor();
|
|
7
7
|
}
|
|
8
8
|
export declare class WrapperNetworkError extends BaseError {
|
|
9
|
-
constructor(message: string);
|
|
9
|
+
constructor(message: string, requestId?: string);
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
12
|
-
constructor();
|
|
11
|
+
export declare class ParseWrapperCDNIndexError extends BaseError {
|
|
12
|
+
constructor(message: string, requestId: string | undefined);
|
|
13
13
|
}
|
|
14
14
|
export interface WrapperProvider {
|
|
15
15
|
getNodeRuntimeWrapper(): Promise<string>;
|
|
@@ -20,13 +20,13 @@ export declare class LocalWrapperProvider implements WrapperProvider {
|
|
|
20
20
|
getNodeRuntimeWrapper(): Promise<string>;
|
|
21
21
|
}
|
|
22
22
|
export declare class NetworkWrapperProvider implements WrapperProvider {
|
|
23
|
-
private readonly
|
|
23
|
+
private readonly cdnUrl;
|
|
24
24
|
private wrapper;
|
|
25
|
-
constructor(
|
|
25
|
+
constructor(cdnUrl: string);
|
|
26
|
+
private getWrapperPathFromIndex;
|
|
26
27
|
getNodeRuntimeWrapper(): Promise<string>;
|
|
27
28
|
}
|
|
28
|
-
export declare const getWrapperProvider: ({
|
|
29
|
-
featureFlags: FeatureFlagReader;
|
|
29
|
+
export declare const getWrapperProvider: ({ fileSystemReader }: {
|
|
30
30
|
fileSystemReader: FileSystemReader;
|
|
31
31
|
}) => Promise<LocalWrapperProvider | NetworkWrapperProvider>;
|
|
32
32
|
export declare const getNodeRuntimeBuildConfig: (wrapperProvider: WrapperProvider) => (entrypoints: FunctionsEntryPoint[], config: ConfigBuilder) => CommonWebpackConfig;
|
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":"AACA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/config/node.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAuB,MAAM,mBAAmB,CAAC;AAGhG,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAIpD,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,MAAM,WAAW,eAAe;IAC9B,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,qBAAa,oBAAqB,YAAW,eAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB;IACzD,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;CAO/C;AAED,qBAAa,sBAAuB,YAAW,eAAe;IAEhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IADnC,OAAO,CAAC,OAAO,CAAqB;gBACP,MAAM,EAAE,MAAM;YAE7B,uBAAuB;IAS/B,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;CAmC/C;AAED,eAAO,MAAM,kBAAkB;sBAAoD,gBAAgB;4DAMlG,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBAClB,eAAe,mBACnB,mBAAmB,EAAE,UAAU,aAAa,KAAG,mBA6C5D,CAAC"}
|
package/out/config/node.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.
|
|
3
|
+
exports.getNodeRuntimeBuildConfig = exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = exports.NODE_WEBPACK_USER_CODE_DIR = exports.NODE_WEBPACK_CONFIG_NAME = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const node_runtime_1 = require("@forge/node-runtime");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
8
8
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
|
+
const cheerio_1 = tslib_1.__importDefault(require("cheerio"));
|
|
9
10
|
exports.NODE_WEBPACK_CONFIG_NAME = 'node-runtime';
|
|
10
11
|
exports.NODE_WEBPACK_USER_CODE_DIR = 'bundled';
|
|
12
|
+
const FORGE_RUNTIME_CDN = 'https://forge-node-runtime.prod-east.frontend.public.atl-paas.net/';
|
|
11
13
|
class LocalWrapperNotFoundError extends cli_shared_1.UserError {
|
|
12
14
|
constructor() {
|
|
13
15
|
super('Local node runtime wrapper not found.');
|
|
@@ -15,17 +17,17 @@ class LocalWrapperNotFoundError extends cli_shared_1.UserError {
|
|
|
15
17
|
}
|
|
16
18
|
exports.LocalWrapperNotFoundError = LocalWrapperNotFoundError;
|
|
17
19
|
class WrapperNetworkError extends cli_shared_1.BaseError {
|
|
18
|
-
constructor(message) {
|
|
20
|
+
constructor(message, requestId) {
|
|
19
21
|
super(undefined, message);
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
exports.WrapperNetworkError = WrapperNetworkError;
|
|
23
|
-
class
|
|
24
|
-
constructor() {
|
|
25
|
-
super(
|
|
25
|
+
class ParseWrapperCDNIndexError extends cli_shared_1.BaseError {
|
|
26
|
+
constructor(message, requestId) {
|
|
27
|
+
super(requestId, message);
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
exports.
|
|
30
|
+
exports.ParseWrapperCDNIndexError = ParseWrapperCDNIndexError;
|
|
29
31
|
class LocalWrapperProvider {
|
|
30
32
|
constructor(filesystemReader) {
|
|
31
33
|
this.filesystemReader = filesystemReader;
|
|
@@ -40,36 +42,49 @@ class LocalWrapperProvider {
|
|
|
40
42
|
}
|
|
41
43
|
exports.LocalWrapperProvider = LocalWrapperProvider;
|
|
42
44
|
class NetworkWrapperProvider {
|
|
43
|
-
constructor(
|
|
44
|
-
this.
|
|
45
|
+
constructor(cdnUrl) {
|
|
46
|
+
this.cdnUrl = cdnUrl;
|
|
47
|
+
}
|
|
48
|
+
async getWrapperPathFromIndex(htmlContent, requestId) {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
const html = cheerio_1.default.load(htmlContent);
|
|
51
|
+
const wrapperPath = (_c = (_b = (_a = html('script')) === null || _a === void 0 ? void 0 : _a.get()) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.attribs['src'];
|
|
52
|
+
if (typeof wrapperPath !== 'string') {
|
|
53
|
+
throw new ParseWrapperCDNIndexError('Unable to parse source of runtime component.', requestId);
|
|
54
|
+
}
|
|
55
|
+
return new URL(wrapperPath, this.cdnUrl).toString();
|
|
45
56
|
}
|
|
46
57
|
async getNodeRuntimeWrapper() {
|
|
47
58
|
if (this.wrapper) {
|
|
48
59
|
return this.wrapper;
|
|
49
60
|
}
|
|
50
61
|
try {
|
|
51
|
-
const
|
|
62
|
+
const indexResponse = await (0, node_fetch_1.default)(this.cdnUrl);
|
|
63
|
+
if (!indexResponse.ok) {
|
|
64
|
+
throw new WrapperNetworkError(`Failed to fetch runtime component: ${this.cdnUrl} ${indexResponse.status}.`, (0, cli_shared_1.getAtlassianTraceId)(indexResponse.headers));
|
|
65
|
+
}
|
|
66
|
+
const wrapperUrl = await this.getWrapperPathFromIndex(await indexResponse.text(), (0, cli_shared_1.getAtlassianTraceId)(indexResponse.headers));
|
|
67
|
+
const response = await (0, node_fetch_1.default)(wrapperUrl);
|
|
52
68
|
if (!response.ok) {
|
|
53
|
-
throw new WrapperNetworkError(`Failed to fetch runtime component: ${
|
|
69
|
+
throw new WrapperNetworkError(`Failed to fetch runtime component: ${wrapperUrl.toString()} ${response.status}.`, (0, cli_shared_1.getAtlassianTraceId)(response.headers));
|
|
54
70
|
}
|
|
55
71
|
this.wrapper = await response.text();
|
|
56
72
|
return this.wrapper;
|
|
57
73
|
}
|
|
58
74
|
catch (e) {
|
|
75
|
+
if (e instanceof ParseWrapperCDNIndexError) {
|
|
76
|
+
throw e;
|
|
77
|
+
}
|
|
59
78
|
throw new WrapperNetworkError(e instanceof Error ? e.message : 'Networking error when retrieving runtime component, retry the command.');
|
|
60
79
|
}
|
|
61
80
|
}
|
|
62
81
|
}
|
|
63
82
|
exports.NetworkWrapperProvider = NetworkWrapperProvider;
|
|
64
|
-
const getWrapperProvider = async ({
|
|
83
|
+
const getWrapperProvider = async ({ fileSystemReader }) => {
|
|
65
84
|
if (process.env.FORGE_USE_LOCAL_WRAPPER === 'true') {
|
|
66
85
|
return new LocalWrapperProvider(fileSystemReader);
|
|
67
86
|
}
|
|
68
|
-
|
|
69
|
-
if (typeof wrapperUrl === 'string') {
|
|
70
|
-
return new NetworkWrapperProvider(wrapperUrl);
|
|
71
|
-
}
|
|
72
|
-
throw new WrapperNotAvailableError();
|
|
87
|
+
return new NetworkWrapperProvider(FORGE_RUNTIME_CDN);
|
|
73
88
|
};
|
|
74
89
|
exports.getWrapperProvider = getWrapperProvider;
|
|
75
90
|
const getNodeRuntimeBuildConfig = (wrapperProvider) => (entrypoints, config) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bundler",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.1-next.0",
|
|
4
4
|
"description": "Default bundler for Forge apps",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -12,32 +12,33 @@
|
|
|
12
12
|
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@babel/core": "^7.22.
|
|
15
|
+
"@babel/core": "^7.22.17",
|
|
16
16
|
"@babel/plugin-transform-class-properties": "^7.22.5",
|
|
17
17
|
"@babel/plugin-transform-class-static-block": "^7.22.11",
|
|
18
18
|
"@babel/plugin-transform-numeric-separator": "^7.22.11",
|
|
19
|
-
"@babel/plugin-transform-optional-chaining": "^7.22.
|
|
20
|
-
"@babel/plugin-transform-react-jsx": "^7.22.
|
|
21
|
-
"@babel/preset-typescript": "^7.22.
|
|
22
|
-
"@forge/api": "2.
|
|
23
|
-
"@forge/babel-plugin-transform-ui": "1.1.
|
|
24
|
-
"@forge/cli-shared": "3.18.
|
|
25
|
-
"@forge/lint": "3.6.
|
|
26
|
-
"@forge/node-runtime": "0.1.2
|
|
19
|
+
"@babel/plugin-transform-optional-chaining": "^7.22.15",
|
|
20
|
+
"@babel/plugin-transform-react-jsx": "^7.22.15",
|
|
21
|
+
"@babel/preset-typescript": "^7.22.15",
|
|
22
|
+
"@forge/api": "2.19.0",
|
|
23
|
+
"@forge/babel-plugin-transform-ui": "1.1.8-next.0",
|
|
24
|
+
"@forge/cli-shared": "3.18.1-next.0",
|
|
25
|
+
"@forge/lint": "3.6.7-next.0",
|
|
26
|
+
"@forge/node-runtime": "0.1.2",
|
|
27
27
|
"@forge/util": "1.3.1",
|
|
28
28
|
"assert": "^2.0.0",
|
|
29
29
|
"babel-loader": "^8.3.0",
|
|
30
30
|
"browserify-zlib": "^0.2.0",
|
|
31
31
|
"buffer": "^6.0.3",
|
|
32
32
|
"chalk": "^2.4.2",
|
|
33
|
+
"cheerio": "^0.22.0",
|
|
33
34
|
"console-browserify": "^1.2.0",
|
|
34
35
|
"crypto-browserify": "^3.12.0",
|
|
35
36
|
"events": "^3.3.0",
|
|
36
37
|
"html-webpack-plugin": "^5.5.3",
|
|
37
38
|
"inherits": "^2.0.4",
|
|
38
39
|
"memfs": "^3.5.3",
|
|
39
|
-
"nock": "
|
|
40
|
-
"node-fetch": "2.
|
|
40
|
+
"nock": "13.3.3",
|
|
41
|
+
"node-fetch": "2.7.0",
|
|
41
42
|
"os-browserify": "^0.3.0",
|
|
42
43
|
"path-browserify": "^1.0.1",
|
|
43
44
|
"process": "^0.11.10",
|
|
@@ -53,20 +54,20 @@
|
|
|
53
54
|
"url": "^0.11.1",
|
|
54
55
|
"util": "^0.12.5",
|
|
55
56
|
"webpack": "5.88.2",
|
|
56
|
-
"webpack-bundle-analyzer": "^4.9.
|
|
57
|
+
"webpack-bundle-analyzer": "^4.9.1",
|
|
57
58
|
"whatwg-url": "^7.1.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@atlassian/xen-test-util": "^3.0.
|
|
61
|
-
"@forge/runtime": "5.0.1
|
|
61
|
+
"@atlassian/xen-test-util": "^3.0.5",
|
|
62
|
+
"@forge/runtime": "5.0.1",
|
|
62
63
|
"@types/jest": "^29.5.4",
|
|
63
|
-
"@types/node": "14.18.
|
|
64
|
+
"@types/node": "14.18.58",
|
|
64
65
|
"@types/react": "^17.0.65",
|
|
65
66
|
"@types/readable-stream": "^2.3.15",
|
|
66
67
|
"@types/webpack-bundle-analyzer": "^4.6.0",
|
|
67
68
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
68
69
|
"@typescript-eslint/parser": "^5.62.0",
|
|
69
|
-
"eslint": "^8.
|
|
70
|
+
"eslint": "^8.48.0",
|
|
70
71
|
"eslint-config-prettier": "^9.0.0",
|
|
71
72
|
"eslint-plugin-prettier": "^5.0.0",
|
|
72
73
|
"jest-matcher-specific-error": "^1.0.0",
|