@forge/cli-shared 10.1.0-next.5 → 10.1.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 +8 -0
- package/out/service/bridge-script-service.d.ts +1 -1
- package/out/service/bridge-script-service.d.ts.map +1 -1
- package/out/service/bridge-script-service.js +3 -3
- package/out/service/iframe-resizer-script-service.d.ts +1 -1
- package/out/service/iframe-resizer-script-service.d.ts.map +1 -1
- package/out/service/iframe-resizer-script-service.js +3 -3
- package/out/shared/load-html.d.ts +3 -0
- package/out/shared/load-html.d.ts.map +1 -0
- package/out/shared/load-html.js +4 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 10.1.0-next.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 92f0a93: Load `cheerio/slim` instead of `cheerio`, which skips parse5 and undici, to start custom UI commands faster. `@forge/manifest` now loads `cheerio` and `@sentry/node` only when it needs them, and its error messages no longer pull in the whole manifest parser.
|
|
8
|
+
- Updated dependencies [92f0a93]
|
|
9
|
+
- @forge/manifest@13.9.2-next.1
|
|
10
|
+
|
|
3
11
|
## 10.1.0-next.5
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -2,6 +2,6 @@ export declare class BridgeScriptService {
|
|
|
2
2
|
private readonly env;
|
|
3
3
|
constructor(env?: string);
|
|
4
4
|
private createBridgeCoreScriptTag;
|
|
5
|
-
injectBridgeCore(content: Buffer, onError: () => void): Buffer
|
|
5
|
+
injectBridgeCore(content: Buffer, onError: () => void): Promise<Buffer>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=bridge-script-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-script-service.d.ts","sourceRoot":"","sources":["../../src/service/bridge-script-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bridge-script-service.d.ts","sourceRoot":"","sources":["../../src/service/bridge-script-service.ts"],"names":[],"mappings":"AAKA,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,SAAwC;IAExE,OAAO,CAAC,yBAAyB;IAIpB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CAarF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { load } from 'cheerio';
|
|
2
1
|
import { CDNEnvironments, getEnvironmentConfig } from '../graphql/gateway.js';
|
|
2
|
+
import { loadHtml } from '../shared/load-html.js';
|
|
3
3
|
const BRIDGE_CORE_CDN_PATH = 'global-bridge.js';
|
|
4
4
|
const GLOBAL_FORGE_INSTALL_ID = 'forge';
|
|
5
5
|
export class BridgeScriptService {
|
|
@@ -10,8 +10,8 @@ export class BridgeScriptService {
|
|
|
10
10
|
createBridgeCoreScriptTag() {
|
|
11
11
|
return `<script src="https://${GLOBAL_FORGE_INSTALL_ID}.cdn.${this.env}.atlassian-dev.net/${BRIDGE_CORE_CDN_PATH}"></script>`;
|
|
12
12
|
}
|
|
13
|
-
injectBridgeCore(content, onError) {
|
|
14
|
-
const $ =
|
|
13
|
+
async injectBridgeCore(content, onError) {
|
|
14
|
+
const $ = await loadHtml(content);
|
|
15
15
|
if ($('html').length === 0)
|
|
16
16
|
onError();
|
|
17
17
|
let head = $('head');
|
|
@@ -2,6 +2,6 @@ export declare class IframeResizerScriptService {
|
|
|
2
2
|
private readonly env;
|
|
3
3
|
constructor(env?: string);
|
|
4
4
|
private createIframeResizerScriptTag;
|
|
5
|
-
injectIframeResizer(content: Buffer, onError: () => void): Buffer
|
|
5
|
+
injectIframeResizer(content: Buffer, onError: () => void): Promise<Buffer>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=iframe-resizer-script-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-resizer-script-service.d.ts","sourceRoot":"","sources":["../../src/service/iframe-resizer-script-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iframe-resizer-script-service.d.ts","sourceRoot":"","sources":["../../src/service/iframe-resizer-script-service.ts"],"names":[],"mappings":"AAKA,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,SAAwC;IAExE,OAAO,CAAC,4BAA4B;IAIvB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CAaxF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { load } from 'cheerio';
|
|
2
1
|
import { CDNEnvironments, getEnvironmentConfig } from '../graphql/gateway.js';
|
|
2
|
+
import { loadHtml } from '../shared/load-html.js';
|
|
3
3
|
const IFRAME_RESIZER_CDN_PATH = 'iframeResizer.contentWindow.min.js';
|
|
4
4
|
const GLOBAL_FORGE_INSTALL_ID = 'forge';
|
|
5
5
|
export class IframeResizerScriptService {
|
|
@@ -10,8 +10,8 @@ export class IframeResizerScriptService {
|
|
|
10
10
|
createIframeResizerScriptTag() {
|
|
11
11
|
return `<script async src="https://${GLOBAL_FORGE_INSTALL_ID}.cdn.${this.env}.atlassian-dev.net/${IFRAME_RESIZER_CDN_PATH}"></script>`;
|
|
12
12
|
}
|
|
13
|
-
injectIframeResizer(content, onError) {
|
|
14
|
-
const $ =
|
|
13
|
+
async injectIframeResizer(content, onError) {
|
|
14
|
+
const $ = await loadHtml(content);
|
|
15
15
|
if ($('html').length === 0)
|
|
16
16
|
onError();
|
|
17
17
|
let head = $('head');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-html.d.ts","sourceRoot":"","sources":["../../src/shared/load-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,eAAO,MAAM,QAAQ,GAAU,SAAS,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,UAAU,CAG3E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "10.1.0-next.
|
|
3
|
+
"version": "10.1.0-next.6",
|
|
4
4
|
"description": "Common functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
18
|
-
"@forge/manifest": "13.9.2-next.
|
|
18
|
+
"@forge/manifest": "13.9.2-next.1",
|
|
19
19
|
"@forge/util": "4.1.0",
|
|
20
20
|
"@forge/i18n": "1.0.2",
|
|
21
21
|
"@sentry/node": "7.106.0",
|