@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/shared/validate.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK1B,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,GAkBxE,CAAC"}
|
package/out/shared/validate.js
CHANGED
|
@@ -3,17 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateSite = void 0;
|
|
4
4
|
const url_1 = require("url");
|
|
5
5
|
const ui_1 = require("../ui");
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const error_handling_1 = require("./error-handling");
|
|
7
|
+
const product_1 = require("./product");
|
|
8
|
+
const validateSite = (site, product) => {
|
|
8
9
|
const trySites = [site, `https://${site}`];
|
|
9
10
|
for (const trySite of trySites) {
|
|
10
11
|
try {
|
|
11
12
|
const urlObj = new url_1.URL(trySite);
|
|
13
|
+
if (product && (0, product_1.isWorkspaceProduct)(product)) {
|
|
14
|
+
return urlObj;
|
|
15
|
+
}
|
|
12
16
|
urlObj.pathname = '/';
|
|
13
17
|
return urlObj;
|
|
14
18
|
}
|
|
15
19
|
catch (_a) {
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
throw new
|
|
22
|
+
throw new error_handling_1.ValidationError(ui_1.Text.error.invalidSite);
|
|
19
23
|
};
|
|
24
|
+
exports.validateSite = validateSite;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Ora } from 'ora';
|
|
3
|
-
import { UI } from './ui';
|
|
3
|
+
import { TableCell, TableOptions, UI } from './ui';
|
|
4
4
|
export interface ProgressResult {
|
|
5
5
|
successful: boolean;
|
|
6
6
|
message: string;
|
|
@@ -9,6 +9,7 @@ export declare class CommandLineUI implements UI {
|
|
|
9
9
|
private readonly verbose;
|
|
10
10
|
private readonly logger;
|
|
11
11
|
private readonly spinner;
|
|
12
|
+
private readonly prompt;
|
|
12
13
|
private insideProgress;
|
|
13
14
|
private addedProgressPadding;
|
|
14
15
|
constructor(verbose: () => boolean, spinner?: Ora, logger?: Console);
|
|
@@ -26,11 +27,12 @@ export declare class CommandLineUI implements UI {
|
|
|
26
27
|
snapshotLog(message: string, level?: 'INFO' | 'WARNING' | 'ERROR'): void;
|
|
27
28
|
emptyLine(): void;
|
|
28
29
|
confirm(message: string): Promise<boolean>;
|
|
29
|
-
promptForText(message: string, defaultValue?: string): Promise<
|
|
30
|
-
promptForSecret(message: string): Promise<
|
|
30
|
+
promptForText(message: string, defaultValue?: string): Promise<string>;
|
|
31
|
+
promptForSecret(message: string): Promise<string>;
|
|
31
32
|
promptForList(message: string, choices: string[]): Promise<string>;
|
|
32
33
|
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number[]>;
|
|
33
34
|
promptForSingleChoiceTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number>;
|
|
35
|
+
table<Key extends string>(head: [Key, string][], data: Record<Key, TableCell>[] | undefined | null, { json, emptyMessage, preMessage, postMessage, format }?: TableOptions<Key>): void;
|
|
34
36
|
private log;
|
|
35
37
|
private logSuccess;
|
|
36
38
|
private logError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":";AAEA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAWnD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,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,MAAM;IAIpD,eAAe,CAAC,OAAO,EAAE,MAAM;IAIzB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlE,cAAc,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC;IAeP,0BAA0B,CACrC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC;IAeX,KAAK,CAAC,GAAG,SAAS,MAAM,EAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EACjD,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAW,EAAE,GAAE,YAAY,CAAC,GAAG,CAAM,GACnF,IAAI;IAqCP,OAAO,CAAC,GAAG;IAqBX,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,eAAe;YAaT,eAAe;IAa7B,OAAO,CAAC,wBAAwB;CAIjC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandLineUI = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
5
6
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
6
7
|
const ora_1 = tslib_1.__importDefault(require("ora"));
|
|
7
8
|
const log_color_1 = require("./log-color");
|
|
@@ -22,8 +23,9 @@ class CommandLineUI {
|
|
|
22
23
|
this.verbose = verbose;
|
|
23
24
|
this.insideProgress = false;
|
|
24
25
|
this.addedProgressPadding = false;
|
|
25
|
-
this.spinner = spinner || ora_1.default({ discardStdin: false });
|
|
26
|
+
this.spinner = spinner || (0, ora_1.default)({ discardStdin: false });
|
|
26
27
|
this.logger = logger || console;
|
|
28
|
+
this.prompt = inquirer_1.default.createPromptModule({ skipTTYChecks: false });
|
|
27
29
|
this.registerCustomUIElements();
|
|
28
30
|
}
|
|
29
31
|
get traceEnabled() {
|
|
@@ -111,7 +113,7 @@ class CommandLineUI {
|
|
|
111
113
|
this.log(msg);
|
|
112
114
|
}
|
|
113
115
|
error(error, { pad = true } = {}) {
|
|
114
|
-
const message = logger_1.errorMessage(error);
|
|
116
|
+
const message = (0, logger_1.errorMessage)(error);
|
|
115
117
|
const color = log_color_1.LogColor.error(message);
|
|
116
118
|
let msg = '\n' + log_color_1.LogColor.errorPrefix + color + '\n';
|
|
117
119
|
if (!pad) {
|
|
@@ -123,14 +125,14 @@ class CommandLineUI {
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
snapshotLog(message, level = 'INFO') {
|
|
126
|
-
const logMessage = runtime_log_1.formatRuntimeLogLevel(level) + ' ' + runtime_log_1.formatRuntimeLogArgs([message]);
|
|
128
|
+
const logMessage = (0, runtime_log_1.formatRuntimeLogLevel)(level) + ' ' + (0, runtime_log_1.formatRuntimeLogArgs)([message]);
|
|
127
129
|
this.log(logMessage);
|
|
128
130
|
}
|
|
129
131
|
emptyLine() {
|
|
130
132
|
this.log('');
|
|
131
133
|
}
|
|
132
134
|
async confirm(message) {
|
|
133
|
-
const { choice } = await
|
|
135
|
+
const { choice } = await this.prompt([
|
|
134
136
|
{
|
|
135
137
|
type: 'confirm',
|
|
136
138
|
name: 'choice',
|
|
@@ -147,7 +149,7 @@ class CommandLineUI {
|
|
|
147
149
|
return this.promptForString(message, true);
|
|
148
150
|
}
|
|
149
151
|
async promptForList(message, choices) {
|
|
150
|
-
const { choice } = await
|
|
152
|
+
const { choice } = await this.prompt([
|
|
151
153
|
{
|
|
152
154
|
type: 'list',
|
|
153
155
|
name: 'choice',
|
|
@@ -158,7 +160,7 @@ class CommandLineUI {
|
|
|
158
160
|
return choice;
|
|
159
161
|
}
|
|
160
162
|
async promptForTable(message, infoMessage, columns, choices) {
|
|
161
|
-
const { choice } = await
|
|
163
|
+
const { choice } = await this.prompt([
|
|
162
164
|
{
|
|
163
165
|
type: 'multiple-choice-table',
|
|
164
166
|
name: 'choice',
|
|
@@ -171,7 +173,7 @@ class CommandLineUI {
|
|
|
171
173
|
return choice;
|
|
172
174
|
}
|
|
173
175
|
async promptForSingleChoiceTable(message, infoMessage, columns, choices) {
|
|
174
|
-
const { choice } = await
|
|
176
|
+
const { choice } = await this.prompt([
|
|
175
177
|
{
|
|
176
178
|
type: 'single-choice-table',
|
|
177
179
|
name: 'choice',
|
|
@@ -183,6 +185,31 @@ class CommandLineUI {
|
|
|
183
185
|
]);
|
|
184
186
|
return choice;
|
|
185
187
|
}
|
|
188
|
+
table(head, data, { json, emptyMessage, preMessage, postMessage, format = {} } = {}) {
|
|
189
|
+
if (json) {
|
|
190
|
+
this.log(JSON.stringify(data, null, 2));
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (!data && emptyMessage) {
|
|
194
|
+
this.info(emptyMessage);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (preMessage) {
|
|
198
|
+
this.info(preMessage);
|
|
199
|
+
}
|
|
200
|
+
const table = new cli_table3_1.default(Object.assign(Object.assign({}, log_color_1.TableStyle.default), { head: head.map(([, heading]) => heading) }));
|
|
201
|
+
if (data) {
|
|
202
|
+
table.push(...data.map((row) => head.map(([key]) => {
|
|
203
|
+
const value = row[key];
|
|
204
|
+
const formatter = format[key];
|
|
205
|
+
return formatter ? formatter(value) : value;
|
|
206
|
+
})));
|
|
207
|
+
}
|
|
208
|
+
this.info(table.toString());
|
|
209
|
+
if (postMessage) {
|
|
210
|
+
this.info(postMessage);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
186
213
|
log(message, progressLogType = ProgressLogType.other) {
|
|
187
214
|
let msg = message;
|
|
188
215
|
if (this.insideProgress) {
|
|
@@ -247,7 +274,7 @@ class CommandLineUI {
|
|
|
247
274
|
}
|
|
248
275
|
}
|
|
249
276
|
async promptForString(message, secret, defaultValue) {
|
|
250
|
-
const { text } = await
|
|
277
|
+
const { text } = await this.prompt([
|
|
251
278
|
{
|
|
252
279
|
type: secret ? 'password' : 'input',
|
|
253
280
|
name: 'text',
|
|
@@ -259,8 +286,8 @@ class CommandLineUI {
|
|
|
259
286
|
return text;
|
|
260
287
|
}
|
|
261
288
|
registerCustomUIElements() {
|
|
262
|
-
|
|
263
|
-
|
|
289
|
+
this.prompt.registerPrompt('multiple-choice-table', multiple_table_prompt_1.MultipleChoiceTablePrompt);
|
|
290
|
+
this.prompt.registerPrompt('single-choice-table', single_table_prompt_1.SingleChoiceTablePrompt);
|
|
264
291
|
}
|
|
265
292
|
}
|
|
266
293
|
exports.CommandLineUI = CommandLineUI;
|
package/out/ui/index.d.ts
CHANGED
package/out/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC"}
|
package/out/ui/index.js
CHANGED
|
@@ -8,4 +8,3 @@ tslib_1.__exportStar(require("./logger"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./runtime-log"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./text"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./ui"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./validation-error"), exports);
|
|
@@ -6,7 +6,7 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
|
6
6
|
const figures_1 = tslib_1.__importDefault(require("figures"));
|
|
7
7
|
const text_1 = require("./text");
|
|
8
8
|
const table_prompt_1 = require("./table-prompt");
|
|
9
|
-
|
|
9
|
+
const getRowSymbol = (isDone, isHover, isSelected) => {
|
|
10
10
|
if (isDone) {
|
|
11
11
|
return isSelected ? figures_1.default.circleFilled : figures_1.default.circle;
|
|
12
12
|
}
|
|
@@ -14,7 +14,8 @@ exports.getRowSymbol = (isDone, isHover, isSelected) => {
|
|
|
14
14
|
return isHover ? figures_1.default.pointer : isSelected ? figures_1.default.circleFilled : figures_1.default.circle;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
exports.
|
|
17
|
+
exports.getRowSymbol = getRowSymbol;
|
|
18
|
+
const getRowFormatFn = (isDone, isHover, isSelected) => {
|
|
18
19
|
if (isDone) {
|
|
19
20
|
return isSelected ? chalk_1.default.cyan : chalk_1.default.white;
|
|
20
21
|
}
|
|
@@ -22,6 +23,7 @@ exports.getRowFormatFn = (isDone, isHover, isSelected) => {
|
|
|
22
23
|
return isHover || isSelected ? chalk_1.default.cyan : chalk_1.default.white;
|
|
23
24
|
}
|
|
24
25
|
};
|
|
26
|
+
exports.getRowFormatFn = getRowFormatFn;
|
|
25
27
|
class MultipleChoiceTablePrompt extends table_prompt_1.TablePrompt {
|
|
26
28
|
constructor(questions, readline, answers) {
|
|
27
29
|
super(questions, readline, answers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-log.d.ts","sourceRoot":"","sources":["../../src/ui/runtime-log.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CA8BhF;
|
|
1
|
+
{"version":3,"file":"runtime-log.d.ts","sourceRoot":"","sources":["../../src/ui/runtime-log.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CA8BhF;AAkBD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,MAAM,CAKlE"}
|
package/out/ui/runtime-log.js
CHANGED
|
@@ -36,16 +36,21 @@ function formatRuntimeLogLevel(level) {
|
|
|
36
36
|
}
|
|
37
37
|
exports.formatRuntimeLogLevel = formatRuntimeLogLevel;
|
|
38
38
|
function formatIfFunctionError(arg) {
|
|
39
|
-
if (arg && arg.name
|
|
40
|
-
if (arg.
|
|
41
|
-
|
|
39
|
+
if (arg && arg.name) {
|
|
40
|
+
if (arg.name === 'FUNCTION_ERR') {
|
|
41
|
+
if (arg.stack) {
|
|
42
|
+
return `${arg.message}\n${arg.stack}`;
|
|
43
|
+
}
|
|
44
|
+
return arg.message;
|
|
45
|
+
}
|
|
46
|
+
if (arg.message && arg.stack) {
|
|
47
|
+
return `${arg.name}: ${arg.message}`;
|
|
42
48
|
}
|
|
43
|
-
return arg.message;
|
|
44
49
|
}
|
|
45
50
|
return arg;
|
|
46
51
|
}
|
|
47
52
|
function formatRuntimeLogArgs(args) {
|
|
48
|
-
const string = util_1.format(...args.map(formatIfFunctionError));
|
|
53
|
+
const string = (0, util_1.format)(...args.map(formatIfFunctionError));
|
|
49
54
|
const formattedString = `${string.match(/[{[]]\n.+/) ? '\n' : ''}${string}`;
|
|
50
55
|
return formattedString;
|
|
51
56
|
}
|
|
@@ -6,12 +6,14 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
|
6
6
|
const figures_1 = tslib_1.__importDefault(require("figures"));
|
|
7
7
|
const text_1 = require("./text");
|
|
8
8
|
const table_prompt_1 = require("./table-prompt");
|
|
9
|
-
|
|
9
|
+
const getRowSymbol = (_, isHover) => {
|
|
10
10
|
return isHover ? figures_1.default.pointer : ' ';
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
12
|
+
exports.getRowSymbol = getRowSymbol;
|
|
13
|
+
const getRowFormatFn = (_, isHover) => {
|
|
13
14
|
return isHover ? chalk_1.default.cyan : chalk_1.default.white;
|
|
14
15
|
};
|
|
16
|
+
exports.getRowFormatFn = getRowFormatFn;
|
|
15
17
|
class SingleChoiceTablePrompt extends table_prompt_1.TablePrompt {
|
|
16
18
|
constructor(questions, readline, answers) {
|
|
17
19
|
super(questions, readline, answers);
|
package/out/ui/table-prompt.js
CHANGED
|
@@ -25,7 +25,7 @@ class TablePrompt extends base_1.default {
|
|
|
25
25
|
return this;
|
|
26
26
|
}
|
|
27
27
|
attachEventHandlers() {
|
|
28
|
-
const events = events_1.default(this.rl);
|
|
28
|
+
const events = (0, events_1.default)(this.rl);
|
|
29
29
|
void this.handleSubmitEvents(events.line).success.forEach(this.onSubmit.bind(this));
|
|
30
30
|
void events.normalizedUpKey.forEach(this.onUpKey.bind(this));
|
|
31
31
|
void events.normalizedDownKey.forEach(this.onDownKey.bind(this));
|
package/out/ui/text.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const capitalise: (word: string) => string;
|
|
|
4
4
|
export declare const Text: {
|
|
5
5
|
error: {
|
|
6
6
|
noKeytar: string;
|
|
7
|
-
|
|
7
|
+
noTokenStored: string;
|
|
8
8
|
keytarAccessError: {
|
|
9
9
|
other: (message: string) => string;
|
|
10
10
|
mac: (message: string) => string;
|
|
@@ -15,7 +15,7 @@ export declare const Text: {
|
|
|
15
15
|
outdatedNodeVersion: (compatibleNodeVersion: string, currentNodeVersion: string) => string;
|
|
16
16
|
invalidProduct: string;
|
|
17
17
|
invalidSite: string;
|
|
18
|
-
|
|
18
|
+
invalidTokenInKeytar: string;
|
|
19
19
|
invalidTokenInEnv: (instructionsUrl: string, emailVar: string, tokenVar: string) => string;
|
|
20
20
|
promptInputRequired: string;
|
|
21
21
|
noExecutableFile: string;
|
|
@@ -24,15 +24,20 @@ export declare const Text: {
|
|
|
24
24
|
resourceDirectoryMissing: (resourceKey: string, directory: string) => string;
|
|
25
25
|
resourceDirectoryEmpty: (resourceKey: string, directory: string) => string;
|
|
26
26
|
templateFetchFailed: string;
|
|
27
|
+
handlerFormat: (handler: string) => string;
|
|
27
28
|
};
|
|
28
29
|
warning: {
|
|
29
|
-
|
|
30
|
+
plaintextCredentialsFound: (url: string) => string;
|
|
31
|
+
plaintextCredentialsMigrated: string;
|
|
32
|
+
plaintextCredentialsNotMigrated: string;
|
|
33
|
+
unsupportedNodeVersion: (userNodeVersion: string, supportedNodeVersions: string) => string;
|
|
30
34
|
};
|
|
31
35
|
installationContext: {
|
|
32
36
|
overviewProduct: string;
|
|
33
37
|
promptProduct: string;
|
|
34
38
|
overviewSite: string;
|
|
35
39
|
promptSite: string;
|
|
40
|
+
promptWorkspace: string;
|
|
36
41
|
};
|
|
37
42
|
upgradeContext: {
|
|
38
43
|
overview: string;
|
|
@@ -41,15 +46,14 @@ export declare const Text: {
|
|
|
41
46
|
optionSite: string;
|
|
42
47
|
optionProduct: (supportedProducts: string[]) => string;
|
|
43
48
|
optionVerbose: string;
|
|
49
|
+
optionJson: string;
|
|
44
50
|
invalidCmd: (command: string) => string;
|
|
45
51
|
invalidCmdHelp: string;
|
|
46
|
-
extraArguments: (commandName: string) => string;
|
|
47
52
|
rerunningWithVerbose: string;
|
|
48
53
|
ctrlC: string;
|
|
49
|
-
deprecate: (newCommand: string) => string;
|
|
50
54
|
graphQL: {
|
|
51
55
|
request: (url: string, query: string, variables: string) => string;
|
|
52
|
-
response: (result: string, requestId?: string
|
|
56
|
+
response: (result: string, requestId?: string) => string;
|
|
53
57
|
error: string;
|
|
54
58
|
outdatedClientVersion: string;
|
|
55
59
|
};
|
|
@@ -245,6 +249,49 @@ export declare const Text: {
|
|
|
245
249
|
optionClientSecret: string;
|
|
246
250
|
promptClientSecret: string;
|
|
247
251
|
};
|
|
252
|
+
contributors: {
|
|
253
|
+
desc: string;
|
|
254
|
+
};
|
|
255
|
+
addContributor: {
|
|
256
|
+
cmd: {
|
|
257
|
+
desc: string;
|
|
258
|
+
start: string;
|
|
259
|
+
success: string;
|
|
260
|
+
};
|
|
261
|
+
overview: string;
|
|
262
|
+
optionSkipConfirmation: string;
|
|
263
|
+
optionContributorEmail: string;
|
|
264
|
+
contributorEmailInfo: string;
|
|
265
|
+
promptContributorEmail: string;
|
|
266
|
+
confirmationInfo: string;
|
|
267
|
+
learnMore: string;
|
|
268
|
+
promptConfirmation: string;
|
|
269
|
+
};
|
|
270
|
+
listContributors: {
|
|
271
|
+
cmd: {
|
|
272
|
+
desc: string;
|
|
273
|
+
};
|
|
274
|
+
banner: string;
|
|
275
|
+
noContributors: string;
|
|
276
|
+
appOwner: string;
|
|
277
|
+
userInactive: string;
|
|
278
|
+
missingAppContributors: string;
|
|
279
|
+
};
|
|
280
|
+
removeContributors: {
|
|
281
|
+
cmd: {
|
|
282
|
+
desc: string;
|
|
283
|
+
start: string;
|
|
284
|
+
success: string;
|
|
285
|
+
};
|
|
286
|
+
overview: string;
|
|
287
|
+
optionSkipConfirmation: string;
|
|
288
|
+
optionContributorEmail: string;
|
|
289
|
+
promptContributorEmail: string;
|
|
290
|
+
confirmationInfo: string;
|
|
291
|
+
promptConfirmation: string;
|
|
292
|
+
commandSuccessMessage: (name: string[]) => string;
|
|
293
|
+
addContributorMessage: string;
|
|
294
|
+
};
|
|
248
295
|
artifact: {
|
|
249
296
|
error: {
|
|
250
297
|
noDeployUrl: string;
|
|
@@ -287,9 +334,8 @@ export declare const Text: {
|
|
|
287
334
|
taskPackage: {
|
|
288
335
|
title: string;
|
|
289
336
|
archiverWarning: (err: Error) => string;
|
|
290
|
-
fileAddedToArchive: (filePath: string) => string;
|
|
291
337
|
packageBundledFiles: string;
|
|
292
|
-
packageFile: (fileName: string, filePath: string) => string;
|
|
338
|
+
packageFile: (fileName: string, filePath: string | null) => string;
|
|
293
339
|
archiveCreated: (archivePath: string) => string;
|
|
294
340
|
};
|
|
295
341
|
taskUpload: {
|
|
@@ -331,6 +377,7 @@ export declare const Text: {
|
|
|
331
377
|
};
|
|
332
378
|
error: {
|
|
333
379
|
invalidAtlassianSite: (url: URL) => string;
|
|
380
|
+
invalidWorkspace: (url: URL) => string;
|
|
334
381
|
url: (url: string) => string;
|
|
335
382
|
site: (url: string) => string;
|
|
336
383
|
alreadyInstalledError: string;
|
|
@@ -378,7 +425,7 @@ export declare const Text: {
|
|
|
378
425
|
installList: {
|
|
379
426
|
cmd: string;
|
|
380
427
|
banner: string;
|
|
381
|
-
|
|
428
|
+
noResourceId: string;
|
|
382
429
|
noInstallations: string;
|
|
383
430
|
};
|
|
384
431
|
tunnel: {
|
|
@@ -390,11 +437,11 @@ export declare const Text: {
|
|
|
390
437
|
startedTunnel: (tunnelUrl: string) => string;
|
|
391
438
|
stoppingTunnel: string;
|
|
392
439
|
stoppedTunnel: string;
|
|
440
|
+
tunnelStatusChange: (status: string) => string;
|
|
393
441
|
snapshotting: string;
|
|
394
442
|
snapshottingNoLogs: string;
|
|
395
443
|
startedInspector: (serverAddress: string) => string;
|
|
396
444
|
invoke: (requestId: string, handler: string) => string;
|
|
397
|
-
reloaded: string;
|
|
398
445
|
customUI: {
|
|
399
446
|
fileServed: (filename: string, resourceKey: string) => string;
|
|
400
447
|
fileProxied: (filename: string, resourceKey: string, tunnelPort: number) => string;
|
|
@@ -408,12 +455,13 @@ export declare const Text: {
|
|
|
408
455
|
lintFailed: string;
|
|
409
456
|
bundlingHeader: string;
|
|
410
457
|
bundlingSucceeded: string;
|
|
458
|
+
resourcesBundlingSucceeded: string;
|
|
459
|
+
functionsBundlingSucceeded: string;
|
|
411
460
|
error: {
|
|
412
461
|
create: (message: string) => string;
|
|
413
462
|
delete: (message: string) => string;
|
|
414
463
|
ngrok: string;
|
|
415
464
|
handler: {
|
|
416
|
-
format: (handler: string) => string;
|
|
417
465
|
notFound: (handler: string) => string;
|
|
418
466
|
};
|
|
419
467
|
pullDocker: string;
|
package/out/ui/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK1B,aAAK,mBAAmB,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK1B,aAAK,mBAAmB,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;AAmB3D,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAsD,CAAC;AAoDjG,eAAO,MAAM,IAAI;;;;;6BAiBM,MAAM;2BACR,MAAM;6BAGJ,MAAM;+BAEJ,MAAM;;wCAIK,MAAM,UAAU,MAAM;qDAOT,MAAM,sBAAsB,MAAM;;;;6CAa1C,MAAM,YAAY,MAAM,YAAY,MAAM;;;qCAQlD,GAAG,WAAW,QAAQ,GAAG,CAAC;kDAEb,MAAM,EAAE;gDAKV,MAAM,aAAa,MAAM;8CAG3B,MAAM,aAAa,MAAM;;iCAKtC,MAAM;;;yCAKE,MAAM;;;kDAYG,MAAM,yBAAyB,MAAM;;;;;;;;;;;;;;uCA0B9C,MAAM,EAAE;;;0BAIrB,MAAM,KAAG,MAAM;;;;;uBAQpB,MAAM,SAAS,MAAM,aAAa,MAA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