@forge/cli-shared 0.0.0-experimental-9489df9 → 0.0.0-experimental-52c2a24
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 +599 -4
- package/out/app-logs/view-logs.js +3 -3
- package/out/apps/app-config.d.ts.map +1 -1
- package/out/apps/app-config.js +3 -2
- package/out/apps/create-app-graphql-client.d.ts.map +1 -1
- package/out/apps/create-app-graphql-client.js +6 -2
- package/out/apps/package-installer.js +1 -1
- package/out/apps/register-app.js +1 -1
- package/out/apps/template.js +12 -12
- package/out/auth/index.d.ts +0 -1
- package/out/auth/index.d.ts.map +1 -1
- package/out/auth/index.js +0 -1
- package/out/auth/personal/credential-store.d.ts +57 -0
- package/out/auth/personal/credential-store.d.ts.map +1 -0
- package/out/auth/personal/credential-store.js +188 -0
- package/out/auth/personal/index.d.ts +1 -4
- package/out/auth/personal/index.d.ts.map +1 -1
- package/out/auth/personal/index.js +1 -4
- package/out/auth/personal/login.d.ts +2 -2
- package/out/auth/personal/login.d.ts.map +1 -1
- package/out/auth/personal/login.js +1 -1
- package/out/auth/personal/logout.d.ts +2 -2
- package/out/auth/personal/logout.d.ts.map +1 -1
- package/out/auth/personal/me-graphql-client.d.ts +2 -1
- package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
- package/out/auth/personal/me-graphql-client.js +3 -2
- package/out/auth/personal/token-authenticator.d.ts +3 -3
- package/out/auth/personal/token-authenticator.d.ts.map +1 -1
- package/out/auth/personal/token-authenticator.js +5 -5
- package/out/config/config-file-section-reader.js +2 -1
- package/out/config/config-file-section-writer.js +2 -1
- package/out/config/config-file.d.ts +14 -8
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +42 -41
- package/out/config/config-section.js +2 -1
- package/out/config/config.d.ts +2 -1
- package/out/config/config.d.ts.map +1 -1
- package/out/config/config.js +4 -2
- package/out/file-system/file-system-reader.d.ts +1 -0
- package/out/file-system/file-system-reader.d.ts.map +1 -1
- package/out/file-system/file-system-reader.js +7 -7
- package/out/file-system/file-system-writer.js +1 -1
- package/out/file-system/zip-accessor.js +1 -1
- package/out/graphql/app-environment-graphql-client.d.ts +3 -2
- package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
- package/out/graphql/app-environment-graphql-client.js +3 -2
- package/out/graphql/gateway.js +5 -3
- package/out/graphql/get-mutation-error.d.ts +1 -0
- package/out/graphql/get-mutation-error.d.ts.map +1 -1
- package/out/graphql/get-mutation-error.js +3 -2
- package/out/graphql/graphql-types.d.ts +5781 -618
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +520 -22
- package/out/graphql/minimal-graphql-runner.d.ts +9 -4
- package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
- package/out/graphql/minimal-graphql-runner.js +15 -5
- package/out/graphql/mutation-aware-graphql-client.d.ts +15 -4
- package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
- package/out/graphql/mutation-aware-graphql-client.js +17 -2
- package/out/http-client/feedback-post-client.js +1 -1
- package/out/http-client/file-uploader.js +1 -1
- package/out/service/bridge-script-service.d.ts +2 -0
- package/out/service/bridge-script-service.d.ts.map +1 -1
- package/out/service/bridge-script-service.js +4 -2
- package/out/service/feature-flag-service.d.ts +18 -6
- package/out/service/feature-flag-service.d.ts.map +1 -1
- package/out/service/feature-flag-service.js +32 -8
- package/out/service/iframe-resizer-script-service.d.ts +2 -0
- package/out/service/iframe-resizer-script-service.d.ts.map +1 -1
- package/out/service/iframe-resizer-script-service.js +4 -2
- package/out/shared/error-handling.d.ts +16 -2
- package/out/shared/error-handling.d.ts.map +1 -1
- package/out/shared/error-handling.js +43 -9
- package/out/shared/index.js +1 -1
- package/out/shared/installationId.js +2 -2
- package/out/shared/pause.js +2 -1
- package/out/shared/product.d.ts +4 -1
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +15 -5
- package/out/shared/read-app-config-files.d.ts.map +1 -1
- package/out/shared/read-app-config-files.js +8 -6
- package/out/shared/validate.d.ts +1 -1
- package/out/shared/validate.d.ts.map +1 -1
- package/out/shared/validate.js +8 -3
- package/out/ui/command-line-ui.d.ts +5 -3
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +37 -10
- package/out/ui/index.d.ts +0 -1
- package/out/ui/index.d.ts.map +1 -1
- package/out/ui/index.js +0 -1
- package/out/ui/multiple-table-prompt.js +4 -2
- package/out/ui/runtime-log.d.ts.map +1 -1
- package/out/ui/runtime-log.js +10 -5
- package/out/ui/single-table-prompt.js +4 -2
- package/out/ui/table-prompt.js +1 -1
- package/out/ui/text.d.ts +59 -11
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +90 -24
- package/out/ui/ui.d.ts +11 -0
- package/out/ui/ui.d.ts.map +1 -1
- package/package.json +13 -15
- package/out/auth/credentials-store-provider.d.ts +0 -4
- package/out/auth/credentials-store-provider.d.ts.map +0 -1
- package/out/auth/credentials-store-provider.js +0 -11
- package/out/auth/personal/abstract-token-store-getter.d.ts +0 -13
- package/out/auth/personal/abstract-token-store-getter.d.ts.map +0 -1
- package/out/auth/personal/abstract-token-store-getter.js +0 -31
- package/out/auth/personal/token-store-cache.d.ts +0 -12
- package/out/auth/personal/token-store-cache.d.ts.map +0 -1
- package/out/auth/personal/token-store-cache.js +0 -41
- package/out/auth/personal/token-store-keytar.d.ts +0 -23
- package/out/auth/personal/token-store-keytar.d.ts.map +0 -1
- package/out/auth/personal/token-store-keytar.js +0 -101
- package/out/auth/personal/token-store.d.ts +0 -28
- package/out/auth/personal/token-store.d.ts.map +0 -1
- package/out/auth/personal/token-store.js +0 -21
- package/out/ui/validation-error.d.ts +0 -3
- package/out/ui/validation-error.d.ts.map +0 -1
- package/out/ui/validation-error.js +0 -6
package/out/apps/template.js
CHANGED
|
@@ -25,7 +25,7 @@ class TemplateServiceDownloader {
|
|
|
25
25
|
async download(template, zipFile) {
|
|
26
26
|
const zipUrl = this.buildZipUrl(template);
|
|
27
27
|
const fileStream = fs_1.default.createWriteStream(zipFile);
|
|
28
|
-
const response = await node_fetch_1.default(zipUrl);
|
|
28
|
+
const response = await (0, node_fetch_1.default)(zipUrl);
|
|
29
29
|
if (!response.ok) {
|
|
30
30
|
throw new NoTemplateError(template);
|
|
31
31
|
}
|
|
@@ -50,7 +50,7 @@ class ZipTemplateExtractor {
|
|
|
50
50
|
await this.moveArchiveFilesToDirectory(extractDirectory, destDirectory);
|
|
51
51
|
}
|
|
52
52
|
finally {
|
|
53
|
-
fs_extra_1.removeSync(extractDirectory);
|
|
53
|
+
(0, fs_extra_1.removeSync)(extractDirectory);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
async moveArchiveFilesToDirectory(extractDirectory, destDirectory) {
|
|
@@ -58,16 +58,16 @@ class ZipTemplateExtractor {
|
|
|
58
58
|
if (archiveChildren.length !== 1) {
|
|
59
59
|
throw new InvalidTemplateArchiveError(ui_1.Text.create.error.template.unexpectedArchiveFormat);
|
|
60
60
|
}
|
|
61
|
-
const templateRepoDirectory = path_1.resolve(extractDirectory, archiveChildren[0]);
|
|
62
|
-
const templateEntries = await ignore_walk_1.default({
|
|
61
|
+
const templateRepoDirectory = (0, path_1.resolve)(extractDirectory, archiveChildren[0]);
|
|
62
|
+
const templateEntries = await (0, ignore_walk_1.default)({
|
|
63
63
|
path: templateRepoDirectory,
|
|
64
64
|
ignoreFiles: ['.forgeignore']
|
|
65
65
|
});
|
|
66
|
-
const filteredEntries = templateEntries.filter((path) => path_1.basename(path) !== '.forgeignore');
|
|
66
|
+
const filteredEntries = templateEntries.filter((path) => (0, path_1.basename)(path) !== '.forgeignore');
|
|
67
67
|
for (const entry of filteredEntries) {
|
|
68
|
-
const entrySourceFullPath = path_1.resolve(templateRepoDirectory, entry);
|
|
69
|
-
const entryDestFullPath = path_1.resolve(destDirectory, entry);
|
|
70
|
-
fs_extra_1.moveSync(entrySourceFullPath, entryDestFullPath);
|
|
68
|
+
const entrySourceFullPath = (0, path_1.resolve)(templateRepoDirectory, entry);
|
|
69
|
+
const entryDestFullPath = (0, path_1.resolve)(destDirectory, entry);
|
|
70
|
+
(0, fs_extra_1.moveSync)(entrySourceFullPath, entryDestFullPath);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -90,7 +90,7 @@ class TemplateServiceLister {
|
|
|
90
90
|
}
|
|
91
91
|
async getAvailableTemplates() {
|
|
92
92
|
try {
|
|
93
|
-
const res = await node_fetch_1.default(new url_1.URL(TEMPLATE_MAP, TEMPLATE_SERVICE_URL));
|
|
93
|
+
const res = await (0, node_fetch_1.default)(new url_1.URL(TEMPLATE_MAP, TEMPLATE_SERVICE_URL));
|
|
94
94
|
if (!res.ok) {
|
|
95
95
|
throw new TemplateFetchError();
|
|
96
96
|
}
|
|
@@ -118,16 +118,16 @@ class ComposableTemplater {
|
|
|
118
118
|
async downloadAndExtract(template, directory) {
|
|
119
119
|
this.logger.info(ui_1.Text.create.taskTemplate.title);
|
|
120
120
|
const zipFile = tmp_1.default.fileSync({ postfix: '.zip' }).name;
|
|
121
|
-
const destDirectory = path_1.resolve(process.cwd(), directory);
|
|
121
|
+
const destDirectory = (0, path_1.resolve)(process.cwd(), directory);
|
|
122
122
|
try {
|
|
123
|
-
fs_extra_1.mkdirpSync(destDirectory);
|
|
123
|
+
(0, fs_extra_1.mkdirpSync)(destDirectory);
|
|
124
124
|
this.logger.debug(ui_1.Text.create.taskTemplate.downloading(template));
|
|
125
125
|
await this.downloader.download(template, zipFile);
|
|
126
126
|
this.logger.debug(ui_1.Text.create.taskTemplate.extracting);
|
|
127
127
|
await this.extractor.extract(zipFile, destDirectory);
|
|
128
128
|
}
|
|
129
129
|
catch (err) {
|
|
130
|
-
fs_extra_1.removeSync(destDirectory);
|
|
130
|
+
(0, fs_extra_1.removeSync)(destDirectory);
|
|
131
131
|
throw err;
|
|
132
132
|
}
|
|
133
133
|
finally {
|
package/out/auth/index.d.ts
CHANGED
package/out/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
package/out/auth/index.js
CHANGED
|
@@ -3,5 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./personal"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./authenticator"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./credentials-store-provider"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./instruction"), exports);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
2
|
+
import { Logger } from '../../ui';
|
|
3
|
+
import { CachedConf } from '../../cache';
|
|
4
|
+
import { UserError } from '../../shared';
|
|
5
|
+
export declare const EMAIL_KEY = "FORGE_EMAIL";
|
|
6
|
+
export declare const API_TOKEN_KEY = "FORGE_API_TOKEN";
|
|
7
|
+
export interface Keytar {
|
|
8
|
+
getPassword(service: string, account: string): Promise<string | null>;
|
|
9
|
+
setPassword(service: string, account: string, password: string): Promise<void>;
|
|
10
|
+
deletePassword(service: string, account: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare const personalApiCredentialsShape: t.TypeC<{
|
|
13
|
+
email: t.StringC;
|
|
14
|
+
token: t.StringC;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const personalApiCredentialsValidatedShape: t.TypeC<{
|
|
17
|
+
email: t.StringC;
|
|
18
|
+
token: t.StringC;
|
|
19
|
+
accountId: t.StringC;
|
|
20
|
+
}>;
|
|
21
|
+
export declare type PersonalApiCredentials = t.TypeOf<typeof personalApiCredentialsShape>;
|
|
22
|
+
export declare type PersonalApiCredentialsValidated = t.TypeOf<typeof personalApiCredentialsValidatedShape>;
|
|
23
|
+
export declare class NoTokenInStoreError extends UserError {
|
|
24
|
+
constructor();
|
|
25
|
+
}
|
|
26
|
+
export declare class NoKeytarError extends UserError {
|
|
27
|
+
constructor();
|
|
28
|
+
}
|
|
29
|
+
export declare class KeytarAccessError extends UserError {
|
|
30
|
+
}
|
|
31
|
+
export interface CredentialGetter {
|
|
32
|
+
getCredentials(): Promise<PersonalApiCredentialsValidated>;
|
|
33
|
+
getInstructionsWhenInvalid(): string;
|
|
34
|
+
}
|
|
35
|
+
export interface CredentialStore extends CredentialGetter {
|
|
36
|
+
setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
|
|
37
|
+
deleteCredentials(): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export declare class CredentialStoreImpl implements CredentialStore {
|
|
40
|
+
private readonly logger;
|
|
41
|
+
private readonly instructionsURL;
|
|
42
|
+
private readonly keytar;
|
|
43
|
+
private readonly cachedConfig;
|
|
44
|
+
private keytarAccount;
|
|
45
|
+
constructor(logger: Logger, instructionsURL: string, keytar: Keytar | null, cachedConfig: CachedConf);
|
|
46
|
+
private wrapKeytarError;
|
|
47
|
+
decodeCredentials(credentialsString: string | null): PersonalApiCredentialsValidated;
|
|
48
|
+
getCredentialsKeytar(keytar: Keytar): Promise<PersonalApiCredentialsValidated | undefined>;
|
|
49
|
+
popInsecurePlaintextCredentials(): PersonalApiCredentialsValidated | undefined;
|
|
50
|
+
deleteInsecurePlaintextCredentials(): void;
|
|
51
|
+
getCredentials(): Promise<PersonalApiCredentialsValidated>;
|
|
52
|
+
setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
|
|
53
|
+
deleteCredentials(): Promise<void>;
|
|
54
|
+
getInstructionsWhenInvalid(): string;
|
|
55
|
+
}
|
|
56
|
+
export declare function getCredentialStore(logger: Logger): CredentialStore;
|
|
57
|
+
//# sourceMappingURL=credential-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/credential-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAQ,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAa/C,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAUD,eAAO,MAAM,2BAA2B;;;EAGtC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;EAI/C,CAAC;AAEH,oBAAY,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAClF,oBAAY,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAEpG,qBAAa,mBAAoB,SAAQ,SAAS;;CAIjD;AAED,qBAAa,aAAc,SAAQ,SAAS;;CAI3C;AAED,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,cAAc,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC3D,0BAA0B,IAAI,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,cAAc,CAAC,WAAW,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAED,qBAAa,mBAAoB,YAAW,eAAe;IAIvD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAN/B,OAAO,CAAC,aAAa,CAAS;gBAGX,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,YAAY,EAAE,UAAU;IAK3C,OAAO,CAAC,eAAe;IAoBvB,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,+BAA+B;IAoB9E,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,+BAA+B,GAAG,SAAS,CAAC;IAehG,+BAA+B,IAAI,+BAA+B,GAAG,SAAS;IAS9E,kCAAkC,IAAI,IAAI;IAIpC,cAAc,IAAI,OAAO,CAAC,+BAA+B,CAAC;IA6B1D,cAAc,CAAC,WAAW,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3E,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYxC,0BAA0B,IAAI,MAAM;CAMrC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAKlE"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCredentialStore = exports.CredentialStoreImpl = exports.KeytarAccessError = exports.NoKeytarError = exports.NoTokenInStoreError = exports.personalApiCredentialsValidatedShape = exports.personalApiCredentialsShape = exports.API_TOKEN_KEY = exports.EMAIL_KEY = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const os_1 = require("os");
|
|
6
|
+
const Either_1 = require("fp-ts/lib/Either");
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
|
+
const ui_1 = require("../../ui");
|
|
9
|
+
const cache_1 = require("../../cache");
|
|
10
|
+
const instruction_1 = require("../instruction");
|
|
11
|
+
const graphql_1 = require("../../graphql");
|
|
12
|
+
const shared_1 = require("../../shared");
|
|
13
|
+
exports.EMAIL_KEY = 'FORGE_EMAIL';
|
|
14
|
+
exports.API_TOKEN_KEY = 'FORGE_API_TOKEN';
|
|
15
|
+
const AAID_KEY = 'FORGE_AAID';
|
|
16
|
+
const KEYTAR_SERVICE = 'Atlassian';
|
|
17
|
+
const FORGE_CLI_PACKAGE = '@forge/cli';
|
|
18
|
+
const CACHE_CREDENTIALS_KEY = 'forge-credentials';
|
|
19
|
+
var KeytarAccount;
|
|
20
|
+
(function (KeytarAccount) {
|
|
21
|
+
KeytarAccount["DEV"] = "Ecosystem-staging";
|
|
22
|
+
KeytarAccount["STG"] = "Ecosystem-staging";
|
|
23
|
+
KeytarAccount["PROD"] = "Ecosystem";
|
|
24
|
+
})(KeytarAccount || (KeytarAccount = {}));
|
|
25
|
+
function getKeytar() {
|
|
26
|
+
try {
|
|
27
|
+
return require('keytar');
|
|
28
|
+
}
|
|
29
|
+
catch (_a) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.personalApiCredentialsShape = t.type({
|
|
34
|
+
email: t.string,
|
|
35
|
+
token: t.string
|
|
36
|
+
});
|
|
37
|
+
exports.personalApiCredentialsValidatedShape = t.type({
|
|
38
|
+
email: t.string,
|
|
39
|
+
token: t.string,
|
|
40
|
+
accountId: t.string
|
|
41
|
+
});
|
|
42
|
+
class NoTokenInStoreError extends shared_1.UserError {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(ui_1.Text.error.noTokenStored);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.NoTokenInStoreError = NoTokenInStoreError;
|
|
48
|
+
class NoKeytarError extends shared_1.UserError {
|
|
49
|
+
constructor() {
|
|
50
|
+
super(ui_1.Text.error.noKeytar);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.NoKeytarError = NoKeytarError;
|
|
54
|
+
class KeytarAccessError extends shared_1.UserError {
|
|
55
|
+
}
|
|
56
|
+
exports.KeytarAccessError = KeytarAccessError;
|
|
57
|
+
class CredentialStoreImpl {
|
|
58
|
+
constructor(logger, instructionsURL, keytar, cachedConfig) {
|
|
59
|
+
this.logger = logger;
|
|
60
|
+
this.instructionsURL = instructionsURL;
|
|
61
|
+
this.keytar = keytar;
|
|
62
|
+
this.cachedConfig = cachedConfig;
|
|
63
|
+
this.keytarAccount = (0, graphql_1.getEnvironment)(KeytarAccount);
|
|
64
|
+
}
|
|
65
|
+
wrapKeytarError(e) {
|
|
66
|
+
const message = (0, shared_1.wrapError)(e).message;
|
|
67
|
+
let error;
|
|
68
|
+
const currentPlatform = (0, os_1.platform)();
|
|
69
|
+
switch (currentPlatform) {
|
|
70
|
+
case 'darwin':
|
|
71
|
+
error = ui_1.Text.error.keytarAccessError.mac(message);
|
|
72
|
+
break;
|
|
73
|
+
case 'linux':
|
|
74
|
+
error = ui_1.Text.error.keytarAccessError.linux(message);
|
|
75
|
+
break;
|
|
76
|
+
case 'win32':
|
|
77
|
+
error = ui_1.Text.error.keytarAccessError.windows(message);
|
|
78
|
+
break;
|
|
79
|
+
default:
|
|
80
|
+
error = ui_1.Text.error.keytarAccessError.other(message);
|
|
81
|
+
}
|
|
82
|
+
throw new KeytarAccessError(error);
|
|
83
|
+
}
|
|
84
|
+
decodeCredentials(credentialsString) {
|
|
85
|
+
if (!credentialsString) {
|
|
86
|
+
throw new NoTokenInStoreError();
|
|
87
|
+
}
|
|
88
|
+
let credentials;
|
|
89
|
+
try {
|
|
90
|
+
credentials = JSON.parse(credentialsString);
|
|
91
|
+
}
|
|
92
|
+
catch (_a) {
|
|
93
|
+
throw new NoTokenInStoreError();
|
|
94
|
+
}
|
|
95
|
+
const decodeResult = exports.personalApiCredentialsValidatedShape.decode(credentials);
|
|
96
|
+
if ((0, Either_1.isLeft)(decodeResult)) {
|
|
97
|
+
throw new NoTokenInStoreError();
|
|
98
|
+
}
|
|
99
|
+
return decodeResult.right;
|
|
100
|
+
}
|
|
101
|
+
async getCredentialsKeytar(keytar) {
|
|
102
|
+
let stringifiedPersonalApiCredentials;
|
|
103
|
+
try {
|
|
104
|
+
stringifiedPersonalApiCredentials = await keytar.getPassword(KEYTAR_SERVICE, this.keytarAccount);
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
this.wrapKeytarError(e);
|
|
108
|
+
}
|
|
109
|
+
if (!stringifiedPersonalApiCredentials) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
return this.decodeCredentials(stringifiedPersonalApiCredentials);
|
|
113
|
+
}
|
|
114
|
+
popInsecurePlaintextCredentials() {
|
|
115
|
+
const result = this.cachedConfig.get(CACHE_CREDENTIALS_KEY);
|
|
116
|
+
if (result) {
|
|
117
|
+
this.logger.warn(ui_1.Text.warning.plaintextCredentialsFound(this.instructionsURL));
|
|
118
|
+
this.deleteInsecurePlaintextCredentials();
|
|
119
|
+
}
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
deleteInsecurePlaintextCredentials() {
|
|
123
|
+
this.cachedConfig.delete(CACHE_CREDENTIALS_KEY);
|
|
124
|
+
}
|
|
125
|
+
async getCredentials() {
|
|
126
|
+
const plaintextCredentials = this.popInsecurePlaintextCredentials();
|
|
127
|
+
if (plaintextCredentials) {
|
|
128
|
+
if (this.keytar) {
|
|
129
|
+
await this.setCredentials(plaintextCredentials);
|
|
130
|
+
this.logger.warn(ui_1.Text.warning.plaintextCredentialsMigrated);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.logger.warn(ui_1.Text.warning.plaintextCredentialsNotMigrated);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
|
|
137
|
+
return {
|
|
138
|
+
email: process.env[exports.EMAIL_KEY],
|
|
139
|
+
token: process.env[exports.API_TOKEN_KEY],
|
|
140
|
+
accountId: process.env[AAID_KEY] || ''
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
if (this.keytar) {
|
|
144
|
+
const result = await this.getCredentialsKeytar(this.keytar);
|
|
145
|
+
if (result) {
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
throw new NoTokenInStoreError();
|
|
150
|
+
}
|
|
151
|
+
async setCredentials(credentials) {
|
|
152
|
+
if (this.keytar) {
|
|
153
|
+
try {
|
|
154
|
+
await this.keytar.setPassword(KEYTAR_SERVICE, this.keytarAccount, JSON.stringify(credentials));
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
throw new NoKeytarError();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
throw new NoKeytarError();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async deleteCredentials() {
|
|
165
|
+
if (this.keytar) {
|
|
166
|
+
try {
|
|
167
|
+
await this.keytar.deletePassword(KEYTAR_SERVICE, this.keytarAccount);
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
this.deleteInsecurePlaintextCredentials();
|
|
173
|
+
}
|
|
174
|
+
getInstructionsWhenInvalid() {
|
|
175
|
+
if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
|
|
176
|
+
return ui_1.Text.error.invalidTokenInEnv(this.instructionsURL, exports.EMAIL_KEY, exports.API_TOKEN_KEY);
|
|
177
|
+
}
|
|
178
|
+
return ui_1.Text.error.invalidTokenInKeytar;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.CredentialStoreImpl = CredentialStoreImpl;
|
|
182
|
+
function getCredentialStore(logger) {
|
|
183
|
+
const keytar = getKeytar();
|
|
184
|
+
const cachedConfig = cache_1.CachedConf.getCache(FORGE_CLI_PACKAGE);
|
|
185
|
+
const instructionsUrl = (0, instruction_1.getInstructionsUrl)((0, graphql_1.getGraphqlGateway)());
|
|
186
|
+
return new CredentialStoreImpl(logger, instructionsUrl, keytar, cachedConfig);
|
|
187
|
+
}
|
|
188
|
+
exports.getCredentialStore = getCredentialStore;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './credential-store';
|
|
2
2
|
export * from './login';
|
|
3
3
|
export * from './logout';
|
|
4
4
|
export * from './me-graphql-client';
|
|
5
5
|
export * from './token-authenticator';
|
|
6
|
-
export * from './token-store';
|
|
7
|
-
export * from './token-store-cache';
|
|
8
|
-
export * from './token-store-keytar';
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/index.ts"],"names":[],"mappings":"AAEA,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
tslib_1.__exportStar(require("./credential-store"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./login"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./logout"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./me-graphql-client"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./token-authenticator"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./token-store"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./token-store-cache"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./token-store-keytar"), exports);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GraphQLClient, User } from '../../graphql';
|
|
2
2
|
import { Logger } from '../../ui';
|
|
3
3
|
import { Authenticator } from '../../auth';
|
|
4
|
-
import {
|
|
4
|
+
import { CredentialStore, PersonalApiCredentials, PersonalApiCredentialsValidated } from './credential-store';
|
|
5
5
|
export declare class LoginCommand {
|
|
6
6
|
private readonly createGraphQLClient;
|
|
7
7
|
private readonly store;
|
|
8
8
|
private readonly logger;
|
|
9
|
-
constructor(createGraphQLClient: (authenticator: Authenticator) => GraphQLClient, store:
|
|
9
|
+
constructor(createGraphQLClient: (authenticator: Authenticator) => GraphQLClient, store: CredentialStore, logger: Logger);
|
|
10
10
|
execute(credentials: PersonalApiCredentials): Promise<{
|
|
11
11
|
user: User;
|
|
12
12
|
creds: PersonalApiCredentialsValidated;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAE9G,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,mBAAmB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,aAAa,EACpE,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM;IAGpB,OAAO,CAClB,WAAW,EAAE,sBAAsB,GAClC,OAAO,CAAC;QACT,IAAI,EAAE,IAAI,CAAC;QACX,KAAK,EAAE,+BAA+B,CAAC;QACvC,SAAS,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/B,CAAC;IAmBW,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CAUzE"}
|
|
@@ -23,7 +23,7 @@ class LoginCommand {
|
|
|
23
23
|
}
|
|
24
24
|
async getUser(credentials) {
|
|
25
25
|
const authenticator = new token_authenticator_1.PersonalTokenAuthenticator({
|
|
26
|
-
getCredentials: () =>
|
|
26
|
+
getCredentials: async () => (Object.assign(Object.assign({}, credentials), { accountId: '' })),
|
|
27
27
|
getInstructionsWhenInvalid: this.store.getInstructionsWhenInvalid
|
|
28
28
|
});
|
|
29
29
|
const graphqlClient = this.createGraphQLClient(authenticator);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CredentialStore } from './credential-store';
|
|
2
2
|
export declare class LogoutCommand {
|
|
3
3
|
private readonly store;
|
|
4
|
-
constructor(store:
|
|
4
|
+
constructor(store: CredentialStore);
|
|
5
5
|
execute(): Promise<void>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,eAAe;IAE5C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GraphQLClient, User } from '../../graphql';
|
|
2
|
+
import { UserError } from '../../shared';
|
|
2
3
|
import { Logger } from '../../ui';
|
|
3
|
-
export declare class UserNotFoundError extends
|
|
4
|
+
export declare class UserNotFoundError extends UserError {
|
|
4
5
|
}
|
|
5
6
|
export declare class MeGraphqlClient {
|
|
6
7
|
private readonly graphqlClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,
|
|
1
|
+
{"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AAEnD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,aAAa;IAAiB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAArD,aAAa,EAAE,aAAa,EAAmB,MAAM,EAAE,MAAM;IAE7E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAwBtC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MeGraphqlClient = exports.UserNotFoundError = void 0;
|
|
4
|
+
const shared_1 = require("../../shared");
|
|
4
5
|
const ui_1 = require("../../ui");
|
|
5
|
-
class UserNotFoundError extends
|
|
6
|
+
class UserNotFoundError extends shared_1.UserError {
|
|
6
7
|
}
|
|
7
8
|
exports.UserNotFoundError = UserNotFoundError;
|
|
8
9
|
class MeGraphqlClient {
|
|
@@ -28,7 +29,7 @@ class MeGraphqlClient {
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
catch (error) {
|
|
31
|
-
this.logger.debug(ui_1.errorMessage(error));
|
|
32
|
+
this.logger.debug((0, ui_1.errorMessage)(error));
|
|
32
33
|
}
|
|
33
34
|
throw new UserNotFoundError();
|
|
34
35
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PersonalApiCredentialsGetter } from './token-store';
|
|
2
1
|
import { Authenticator } from '../authenticator';
|
|
2
|
+
import { CredentialGetter } from './credential-store';
|
|
3
3
|
export declare class PersonalTokenAuthenticator implements Authenticator {
|
|
4
|
-
private readonly
|
|
5
|
-
constructor(
|
|
4
|
+
private readonly credentialStore;
|
|
5
|
+
constructor(credentialStore: CredentialGetter);
|
|
6
6
|
getAuthorizationHeader(): Promise<import("../authenticator").AuthorizationHeader>;
|
|
7
7
|
getInstructionsWhenInvalid(): string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-authenticator.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/token-authenticator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"token-authenticator.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/token-authenticator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,0BAA2B,YAAW,aAAa;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,gBAAgB;IAEjD,sBAAsB;IAO5B,0BAA0B,IAAI,MAAM;CAG5C"}
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PersonalTokenAuthenticator = void 0;
|
|
4
4
|
const authenticator_1 = require("../authenticator");
|
|
5
5
|
class PersonalTokenAuthenticator {
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(credentialStore) {
|
|
7
|
+
this.credentialStore = credentialStore;
|
|
8
8
|
}
|
|
9
9
|
async getAuthorizationHeader() {
|
|
10
|
-
const { email, token } = await this.
|
|
11
|
-
return authenticator_1.getBasicAuthorizationHeader(email, token);
|
|
10
|
+
const { email, token } = await this.credentialStore.getCredentials();
|
|
11
|
+
return (0, authenticator_1.getBasicAuthorizationHeader)(email, token);
|
|
12
12
|
}
|
|
13
13
|
getInstructionsWhenInvalid() {
|
|
14
|
-
return this.
|
|
14
|
+
return this.credentialStore.getInstructionsWhenInvalid();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.PersonalTokenAuthenticator = PersonalTokenAuthenticator;
|
|
@@ -32,6 +32,7 @@ class ShapedConfigFileSectionReader {
|
|
|
32
32
|
return this.configSectionReader.readConfigSection(this.key, this.schema);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
const configFileReaderForSection = (key, schema, configReader) => {
|
|
36
36
|
return new ShapedConfigFileSectionReader(new ConfigFileSectionReader(configReader), key, schema);
|
|
37
37
|
};
|
|
38
|
+
exports.configFileReaderForSection = configFileReaderForSection;
|
|
@@ -14,6 +14,7 @@ class ConfigFileSectionWriter {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.ConfigFileSectionWriter = ConfigFileSectionWriter;
|
|
17
|
-
|
|
17
|
+
const configFileWriterForSection = (key, schema, configWriter) => {
|
|
18
18
|
return new ConfigFileSectionWriter(key, configWriter);
|
|
19
19
|
};
|
|
20
|
+
exports.configFileWriterForSection = configFileWriterForSection;
|
|
@@ -2,15 +2,20 @@ import { Document } from 'yaml';
|
|
|
2
2
|
import { FileSystemReader, FileSystemWriter } from '../file-system';
|
|
3
3
|
import { ConfigReader, ConfigWriter } from './';
|
|
4
4
|
import { ManifestSchema, Resources } from '@forge/manifest/out/schema/manifest';
|
|
5
|
-
|
|
5
|
+
import { UserError } from '../shared';
|
|
6
|
+
export declare class ResourceDefinitionMissingError extends UserError {
|
|
6
7
|
constructor(resources: string[]);
|
|
7
8
|
}
|
|
9
|
+
export interface Handler {
|
|
10
|
+
module: string;
|
|
11
|
+
func: string;
|
|
12
|
+
}
|
|
8
13
|
export interface ConfigInteractor {
|
|
9
|
-
getAppHandlers(): Promise<Array<
|
|
14
|
+
getAppHandlers(): Promise<Array<Handler>>;
|
|
10
15
|
snapshotsEnabled(): Promise<boolean>;
|
|
11
16
|
}
|
|
12
17
|
export declare type Resource = Resources[0];
|
|
13
|
-
export declare type ResourceType = 'customUI' | 'default';
|
|
18
|
+
export declare type ResourceType = 'customUI' | 'nativeUI' | 'default';
|
|
14
19
|
export interface ResourceDetails extends Resource {
|
|
15
20
|
resourceType: ResourceType;
|
|
16
21
|
}
|
|
@@ -18,15 +23,15 @@ export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInt
|
|
|
18
23
|
private readonly fileReader;
|
|
19
24
|
private readonly fileWriter;
|
|
20
25
|
constructor(fileReader: FileSystemReader, fileWriter: FileSystemWriter);
|
|
21
|
-
getAppHandlers(): Promise<Array<
|
|
26
|
+
getAppHandlers(): Promise<Array<Handler>>;
|
|
22
27
|
readConfig(): Promise<ManifestSchema>;
|
|
23
28
|
readConfigToDocument(): Promise<Document.Parsed | undefined>;
|
|
24
29
|
snapshotsEnabled(): Promise<boolean>;
|
|
25
30
|
private makeManifestUnique;
|
|
26
31
|
prependAppNameToModules(name: string): Promise<void>;
|
|
27
|
-
writeToConfigFile<K extends string, V>(configKey: K, config: V): Promise<void>;
|
|
28
|
-
private
|
|
29
|
-
private
|
|
32
|
+
writeToConfigFile<K extends string, V extends object>(configKey: K, config: V): Promise<void>;
|
|
33
|
+
private getHostedResourceModules;
|
|
34
|
+
private assertNoMissingResources;
|
|
30
35
|
private getRemoteFromEgressPermission;
|
|
31
36
|
private instanceOfRemote;
|
|
32
37
|
getEgressPermissions(): Promise<{
|
|
@@ -37,7 +42,8 @@ export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInt
|
|
|
37
42
|
key: string;
|
|
38
43
|
name: string;
|
|
39
44
|
}>>;
|
|
40
|
-
getResources(): Promise<ResourceDetails[]>;
|
|
45
|
+
getResources(resourceTypes?: ResourceType[]): Promise<ResourceDetails[]>;
|
|
41
46
|
getConnectKey(): Promise<string | undefined>;
|
|
47
|
+
private getResourceType;
|
|
42
48
|
}
|
|
43
49
|
//# sourceMappingURL=config-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAAA,OAAa,EAAwB,QAAQ,EAAE,MAAM,MAAM,CAAC;AAI5D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,IAAI,CAAC;AAGlE,OAAO,EAEL,cAAc,EACd,SAAS,
|
|
1
|
+
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAAA,OAAa,EAAwB,QAAQ,EAAE,MAAM,MAAM,CAAC;AAI5D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,IAAI,CAAC;AAGlE,OAAO,EAEL,cAAc,EACd,SAAS,EAOV,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAmB,MAAM,WAAW,CAAC;AACvD,qBAAa,8BAA+B,SAAQ,SAAS;gBAC/C,SAAS,EAAE,MAAM,EAAE;CAGhC;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1C,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,oBAAY,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AACpC,oBAAY,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAC/D,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,qBAAa,UAAW,YAAW,YAAY,EAAE,YAAY,EAAE,gBAAgB;IACjE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAAoB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAzD,UAAU,EAAE,gBAAgB,EAAmB,UAAU,EAAE,gBAAgB;IAE3F,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAgBzC,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC;IAUrC,oBAAoB,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;IAW5D,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAMjD,OAAO,CAAC,kBAAkB;IAmBb,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAapD,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1G,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,wBAAwB;IAShC,OAAO,CAAC,6BAA6B;IAYrC,OAAO,CAAC,gBAAgB;IAIX,oBAAoB,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;IAoClF,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAe1E,YAAY,CAAC,aAAa,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAqBxE,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKzD,OAAO,CAAC,eAAe;CAcxB"}
|