@forge/cli 10.12.1-next.2 → 10.13.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 +205 -0
- package/npm-shrinkwrap.json +93 -54
- package/out/autocomplete/autocomplete-config.json +23 -0
- package/out/command-line/controller/deploy-controller.d.ts +3 -1
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
- package/out/command-line/controller/deploy-controller.js +15 -6
- package/out/command-line/controller/eligibility-controller.d.ts +14 -0
- package/out/command-line/controller/eligibility-controller.d.ts.map +1 -0
- package/out/command-line/controller/eligibility-controller.js +21 -0
- package/out/command-line/controller/install-controller.d.ts +7 -1
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +55 -4
- package/out/command-line/dependency-injection.d.ts +2 -0
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +11 -5
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +2 -0
- package/out/command-line/register-eligibility-commands.d.ts +4 -0
- package/out/command-line/register-eligibility-commands.d.ts.map +1 -0
- package/out/command-line/register-eligibility-commands.js +29 -0
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +5 -1
- package/out/command-line/view/deploy-view.d.ts +2 -0
- package/out/command-line/view/deploy-view.d.ts.map +1 -1
- package/out/command-line/view/deploy-view.js +8 -0
- package/out/command-line/view/eligibility-view.d.ts +11 -0
- package/out/command-line/view/eligibility-view.d.ts.map +1 -0
- package/out/command-line/view/eligibility-view.js +25 -0
- package/out/deploy/packager/packager.d.ts +2 -4
- package/out/deploy/packager/packager.d.ts.map +1 -1
- package/out/deploy/packager/packager.js +2 -5
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
- package/out/deploy/packager/runtime-bundler.js +4 -6
- package/out/eligibility/graphql-client.d.ts +21 -0
- package/out/eligibility/graphql-client.d.ts.map +1 -0
- package/out/eligibility/graphql-client.js +74 -0
- package/out/installations/graphql-client.d.ts +1 -1
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +3 -2
- package/out/installations/install-app-site.d.ts +3 -2
- package/out/installations/install-app-site.d.ts.map +1 -1
- package/out/installations/install-app-site.js +3 -2
- package/out/service/roa-service.d.ts +18 -0
- package/out/service/roa-service.d.ts.map +1 -0
- package/out/service/roa-service.js +22 -0
- package/package.json +6 -6
- package/out/deploy/packager/nativeui-bundler.d.ts +0 -13
- package/out/deploy/packager/nativeui-bundler.d.ts.map +0 -1
- package/out/deploy/packager/nativeui-bundler.js +0 -39
|
@@ -102,7 +102,7 @@ class InstallationsGraphqlClient {
|
|
|
102
102
|
}
|
|
103
103
|
return this.cloudIdTranslator;
|
|
104
104
|
}
|
|
105
|
-
async installAppIntoSite({ environmentKey, site, product, appId, licenseOverride }) {
|
|
105
|
+
async installAppIntoSite({ environmentKey, site, product, appId, licenseOverride, overrides }) {
|
|
106
106
|
const workspaceAri = await this.buildInstallationContext(product, site);
|
|
107
107
|
const query = `
|
|
108
108
|
mutation forge_cli_installApplication($input: AppInstallationInput!) {
|
|
@@ -125,7 +125,8 @@ class InstallationsGraphqlClient {
|
|
|
125
125
|
appId,
|
|
126
126
|
environmentKey,
|
|
127
127
|
async: true,
|
|
128
|
-
licenseOverride
|
|
128
|
+
licenseOverride,
|
|
129
|
+
overrides
|
|
129
130
|
}
|
|
130
131
|
};
|
|
131
132
|
const { response: { installApp: { success, taskId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { URL } from 'url';
|
|
3
|
-
import { AppConfigProvider, LicenseOverrideState } from '@forge/cli-shared';
|
|
3
|
+
import { AppConfigProvider, EcosystemAppInstallationOverridesInput, LicenseOverrideState } from '@forge/cli-shared';
|
|
4
4
|
export interface TriggerAppSiteInstallDetails {
|
|
5
5
|
site: URL;
|
|
6
6
|
product: string;
|
|
7
7
|
environmentKey: string;
|
|
8
8
|
licenseOverride?: LicenseOverrideState;
|
|
9
|
+
overrides?: EcosystemAppInstallationOverridesInput;
|
|
9
10
|
}
|
|
10
11
|
export interface AppInstallSiteDetails extends TriggerAppSiteInstallDetails {
|
|
11
12
|
appId: string;
|
|
@@ -17,6 +18,6 @@ export declare class InstallAppSiteCommand {
|
|
|
17
18
|
private readonly getAppConfig;
|
|
18
19
|
private readonly installAppClient;
|
|
19
20
|
constructor(getAppConfig: AppConfigProvider, installAppClient: InstallAppClient);
|
|
20
|
-
execute({ environmentKey, site, product, licenseOverride }: TriggerAppSiteInstallDetails): Promise<void>;
|
|
21
|
+
execute({ environmentKey, site, product, licenseOverride, overrides }: TriggerAppSiteInstallDetails): Promise<void>;
|
|
21
22
|
}
|
|
22
23
|
//# sourceMappingURL=install-app-site.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-app-site.d.ts","sourceRoot":"","sources":["../../src/installations/install-app-site.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"install-app-site.d.ts","sourceRoot":"","sources":["../../src/installations/install-app-site.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,sCAAsC,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEpH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,sCAAsC,CAAC;CACpD;AAED,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B;IACzE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E;AAED,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBADhB,YAAY,EAAE,iBAAiB,EAC/B,gBAAgB,EAAE,gBAAgB;IAGxC,OAAO,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,4BAA4B;CAWjH"}
|
|
@@ -8,14 +8,15 @@ class InstallAppSiteCommand {
|
|
|
8
8
|
this.getAppConfig = getAppConfig;
|
|
9
9
|
this.installAppClient = installAppClient;
|
|
10
10
|
}
|
|
11
|
-
async execute({ environmentKey, site, product, licenseOverride }) {
|
|
11
|
+
async execute({ environmentKey, site, product, licenseOverride, overrides }) {
|
|
12
12
|
const { id: appId } = await this.getAppConfig();
|
|
13
13
|
return await this.installAppClient.installAppIntoSite({
|
|
14
14
|
appId,
|
|
15
15
|
environmentKey,
|
|
16
16
|
site,
|
|
17
17
|
product,
|
|
18
|
-
licenseOverride
|
|
18
|
+
licenseOverride,
|
|
19
|
+
overrides
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RoaEligibilityClient } from '../eligibility/graphql-client';
|
|
2
|
+
import { AppConfigProvider, AppEnvironmentType } from '@forge/cli-shared';
|
|
3
|
+
export interface RoaStatus {
|
|
4
|
+
isEligible: boolean;
|
|
5
|
+
reason: Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
value: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
appVersion: string;
|
|
10
|
+
environmentType: AppEnvironmentType;
|
|
11
|
+
}
|
|
12
|
+
export declare class RoaService {
|
|
13
|
+
private readonly getAppConfig;
|
|
14
|
+
private readonly roaClient;
|
|
15
|
+
constructor(getAppConfig: AppConfigProvider, roaClient: RoaEligibilityClient);
|
|
16
|
+
getEligibilityStatus(environmentKey: string, majorVersion?: number): Promise<RoaStatus>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=roa-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roa-service.d.ts","sourceRoot":"","sources":["../../src/service/roa-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,kBAAkB,CAAC;CACrC;AAED,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,oBAAoB;IAGrC,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAWrG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoaService = void 0;
|
|
4
|
+
class RoaService {
|
|
5
|
+
getAppConfig;
|
|
6
|
+
roaClient;
|
|
7
|
+
constructor(getAppConfig, roaClient) {
|
|
8
|
+
this.getAppConfig = getAppConfig;
|
|
9
|
+
this.roaClient = roaClient;
|
|
10
|
+
}
|
|
11
|
+
async getEligibilityStatus(environmentKey, majorVersion) {
|
|
12
|
+
const { id: appId } = await this.getAppConfig();
|
|
13
|
+
const data = await this.roaClient.getVersionEligibility(appId, environmentKey, majorVersion);
|
|
14
|
+
return {
|
|
15
|
+
isEligible: !!data.trustSignal?.result,
|
|
16
|
+
reason: data.trustSignal?.rules?.filter((rule) => rule.value) || [],
|
|
17
|
+
appVersion: data.appVersion,
|
|
18
|
+
environmentType: data.environmentType
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.RoaService = RoaService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.13.0",
|
|
4
4
|
"description": "A command line interface for managing Atlassian-hosted apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"postinstall": "node -e \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@forge/bundler": "4.20.1
|
|
22
|
-
"@forge/cli-shared": "6.4.0
|
|
21
|
+
"@forge/bundler": "4.20.1",
|
|
22
|
+
"@forge/cli-shared": "6.4.0",
|
|
23
23
|
"@forge/egress": "1.2.13",
|
|
24
|
-
"@forge/lint": "5.6.1
|
|
25
|
-
"@forge/manifest": "8.
|
|
24
|
+
"@forge/lint": "5.6.1",
|
|
25
|
+
"@forge/manifest": "8.1.0",
|
|
26
26
|
"@forge/runtime": "5.10.3",
|
|
27
|
-
"@forge/tunnel": "5.7.0
|
|
27
|
+
"@forge/tunnel": "5.7.0",
|
|
28
28
|
"@forge/util": "1.4.5",
|
|
29
29
|
"@sentry/node": "7.106.0",
|
|
30
30
|
"@forge/i18n": "0.0.2",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Bundler } from '@forge/bundler';
|
|
2
|
-
import { Logger, ResourceDetails } from '@forge/cli-shared';
|
|
3
|
-
import { Translations } from '@forge/manifest';
|
|
4
|
-
export interface NativeUIBundleResult {
|
|
5
|
-
nativeUiBundlesDetails: ResourceDetails[];
|
|
6
|
-
}
|
|
7
|
-
export declare class NativeUIBundler {
|
|
8
|
-
private readonly logger;
|
|
9
|
-
private readonly bundler;
|
|
10
|
-
constructor(logger: Logger, bundler: Bundler);
|
|
11
|
-
bundle(resources: ResourceDetails[], i18nConfig?: Translations): Promise<NativeUIBundleResult>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=nativeui-bundler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nativeui-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/nativeui-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,eAAe,EAAE,CAAC;CAC3C;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO;IAGtB,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,UAAU,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAgC5G"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NativeUIBundler = void 0;
|
|
4
|
-
const packager_1 = require("./packager");
|
|
5
|
-
class NativeUIBundler {
|
|
6
|
-
logger;
|
|
7
|
-
bundler;
|
|
8
|
-
constructor(logger, bundler) {
|
|
9
|
-
this.logger = logger;
|
|
10
|
-
this.bundler = bundler;
|
|
11
|
-
}
|
|
12
|
-
async bundle(resources, i18nConfig) {
|
|
13
|
-
const entryPoints = resources.map(({ key, path }) => ({
|
|
14
|
-
name: key,
|
|
15
|
-
path
|
|
16
|
-
}));
|
|
17
|
-
const nativeUiBundlesDetails = [];
|
|
18
|
-
if (entryPoints.length > 0) {
|
|
19
|
-
let bundlerOutputs;
|
|
20
|
-
try {
|
|
21
|
-
bundlerOutputs = await Promise.all(entryPoints.map((entrypoint) => this.bundler(this.logger, '', [entrypoint], i18nConfig)));
|
|
22
|
-
}
|
|
23
|
-
catch (e) {
|
|
24
|
-
throw new packager_1.BundlerError(e.message);
|
|
25
|
-
}
|
|
26
|
-
bundlerOutputs.forEach(({ outputDir }, index) => {
|
|
27
|
-
this.logger.debug(`NativeUI bundle created: ${outputDir}`);
|
|
28
|
-
nativeUiBundlesDetails.push({
|
|
29
|
-
...resources[index],
|
|
30
|
-
path: outputDir
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
nativeUiBundlesDetails
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.NativeUIBundler = NativeUIBundler;
|