@forge/bundler 7.1.1-next.4 → 7.2.0-next.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/CHANGELOG.md +51 -0
- package/out/wrapper-provider.d.ts.map +1 -1
- package/out/wrapper-provider.js +11 -5
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @forge/bundler
|
|
2
2
|
|
|
3
|
+
## 7.2.0-next.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @forge/lint@6.2.0-next.10
|
|
8
|
+
|
|
9
|
+
## 7.2.0-next.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [9afd5c3]
|
|
14
|
+
- @forge/cli-shared@9.4.0-next.8
|
|
15
|
+
- @forge/lint@6.2.0-next.9
|
|
16
|
+
|
|
17
|
+
## 7.2.0-next.8
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [ccd5143]
|
|
22
|
+
- @forge/manifest@13.3.1-next.1
|
|
23
|
+
- @forge/cli-shared@9.4.0-next.7
|
|
24
|
+
- @forge/lint@6.2.0-next.8
|
|
25
|
+
|
|
26
|
+
## 7.2.0-next.7
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [d1767a0]
|
|
31
|
+
- @forge/cli-shared@9.4.0-next.6
|
|
32
|
+
- @forge/lint@6.2.0-next.7
|
|
33
|
+
|
|
34
|
+
## 7.2.0-next.6
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [016ed9d]
|
|
39
|
+
- @forge/cli-shared@9.4.0-next.5
|
|
40
|
+
- @forge/lint@6.2.0-next.6
|
|
41
|
+
|
|
42
|
+
## 7.2.0-next.5
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- 2b13c2e: Move from node-fetch to native fetch
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [2b13c2e]
|
|
51
|
+
- @forge/cli-shared@9.4.0-next.4
|
|
52
|
+
- @forge/lint@6.2.0-next.5
|
|
53
|
+
|
|
3
54
|
## 7.1.1-next.4
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper-provider.d.ts","sourceRoot":"","sources":["../src/wrapper-provider.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,SAAS,EAGT,cAAc,
|
|
1
|
+
{"version":3,"file":"wrapper-provider.d.ts","sourceRoot":"","sources":["../src/wrapper-provider.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,SAAS,EAGT,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAW3B,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,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAChD,oBAAoB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC5D;AAOD,qBAAa,oBAAqB,YAAW,eAAe;IAExD,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBADX,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,MAAM;YAExB,cAAc;IAatB,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC;IAI/C,oBAAoB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAGjE;AAED,qBAAa,sBAAuB,YAAW,eAAe;IAKhD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc;IAJ7D,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,MAAM,CAA4B;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEM,cAAc,EAAE,cAAc;YAI/C,sBAAsB;IAgBpC,OAAO,CAAC,cAAc,CA6CpB;IAEI,qBAAqB,IAAI,OAAO,CAAC,aAAa,CAAC;IAO/C,oBAAoB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAQjE;AAED,eAAO,MAAM,kBAAkB,GAAI,sCAGhC;IACD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,cAAc,EAAE,cAAc,CAAC;CAChC,kDAQA,CAAC"}
|
package/out/wrapper-provider.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getWrapperProvider = exports.NetworkWrapperProvider = exports.LocalWrapperProvider = exports.ParseWrapperCDNIndexError = exports.WrapperNetworkError = exports.LocalWrapperNotFoundError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const url_1 = require("url");
|
|
6
7
|
const cheerio_1 = require("cheerio");
|
|
7
|
-
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
8
8
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
9
|
var RuntimeCDN;
|
|
10
10
|
(function (RuntimeCDN) {
|
|
@@ -81,16 +81,22 @@ class NetworkWrapperProvider {
|
|
|
81
81
|
if (typeof scriptPath !== 'string') {
|
|
82
82
|
throw new ParseWrapperCDNIndexError(`Unable to parse source of runtime ${scriptType}.`, requestId);
|
|
83
83
|
}
|
|
84
|
-
return new URL(scriptPath, this.cdnUrl).toString();
|
|
84
|
+
return new url_1.URL(scriptPath, this.cdnUrl).toString();
|
|
85
85
|
}
|
|
86
86
|
getFileFromCDN = async (scriptType) => {
|
|
87
87
|
try {
|
|
88
|
-
const indexResponse = await (0,
|
|
88
|
+
const indexResponse = await (0, cli_shared_1.sendWithNodeRequest)({
|
|
89
|
+
method: 'GET',
|
|
90
|
+
url: this.cdnUrl
|
|
91
|
+
});
|
|
89
92
|
if (!indexResponse.ok) {
|
|
90
93
|
throw new WrapperNetworkError(`Failed to fetch runtime component: ${this.cdnUrl} ${indexResponse.status}.`, (0, cli_shared_1.getAtlassianTraceId)(indexResponse.headers));
|
|
91
94
|
}
|
|
92
95
|
const source = await this.getScriptPathFromIndex(await indexResponse.text(), (0, cli_shared_1.getAtlassianTraceId)(indexResponse.headers), scriptType);
|
|
93
|
-
const response = await (0,
|
|
96
|
+
const response = await (0, cli_shared_1.sendWithNodeRequest)({
|
|
97
|
+
method: 'GET',
|
|
98
|
+
url: source
|
|
99
|
+
});
|
|
94
100
|
if (!response.ok) {
|
|
95
101
|
throw new WrapperNetworkError(`Failed to fetch runtime component: ${source.toString()} ${response.status}.`, (0, cli_shared_1.getAtlassianTraceId)(response.headers));
|
|
96
102
|
}
|
|
@@ -98,7 +104,7 @@ class NetworkWrapperProvider {
|
|
|
98
104
|
return {
|
|
99
105
|
script,
|
|
100
106
|
source,
|
|
101
|
-
version: new URL(source).pathname
|
|
107
|
+
version: new url_1.URL(source).pathname
|
|
102
108
|
};
|
|
103
109
|
}
|
|
104
110
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bundler",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-next.10",
|
|
4
4
|
"description": "Default bundler for Forge apps",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
22
22
|
"@babel/traverse": "^7.24.0",
|
|
23
23
|
"@babel/types": "^7.24.0",
|
|
24
|
-
"@forge/cli-shared": "9.4.0-next.
|
|
24
|
+
"@forge/cli-shared": "9.4.0-next.8",
|
|
25
25
|
"@forge/i18n": "1.0.0",
|
|
26
|
-
"@forge/lint": "6.2.0-next.
|
|
27
|
-
"@forge/manifest": "13.3.1-next.
|
|
26
|
+
"@forge/lint": "6.2.0-next.10",
|
|
27
|
+
"@forge/manifest": "13.3.1-next.1",
|
|
28
28
|
"babel-loader": "^8.3.0",
|
|
29
29
|
"cheerio": "^1.2.0",
|
|
30
30
|
"chokidar": "^4.0.3",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"html-webpack-plugin": "^5.6.3",
|
|
35
35
|
"nock": "13.5.6",
|
|
36
|
-
"node-fetch": "2.7.0",
|
|
37
36
|
"tmp": "^0.2.3",
|
|
38
37
|
"ts-loader": "^9.5.2",
|
|
39
38
|
"type-fest": "4.10.2",
|