@salesforce/analytics 1.3.19 → 1.4.1
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/LICENSE.txt +1 -1
- package/README.md +2 -2
- package/lib/commands/analytics/app/create.d.ts +21 -18
- package/lib/commands/analytics/app/create.js +118 -123
- package/lib/commands/analytics/app/create.js.map +1 -1
- package/lib/commands/analytics/app/decouple.d.ts +11 -11
- package/lib/commands/analytics/app/decouple.js +30 -36
- package/lib/commands/analytics/app/decouple.js.map +1 -1
- package/lib/commands/analytics/app/delete.d.ts +10 -11
- package/lib/commands/analytics/app/delete.js +30 -45
- package/lib/commands/analytics/app/delete.js.map +1 -1
- package/lib/commands/analytics/app/display.d.ts +12 -11
- package/lib/commands/analytics/app/display.js +46 -60
- package/lib/commands/analytics/app/display.js.map +1 -1
- package/lib/commands/analytics/app/list.d.ts +20 -13
- package/lib/commands/analytics/app/list.js +31 -33
- package/lib/commands/analytics/app/list.js.map +1 -1
- package/lib/commands/analytics/app/update.d.ts +18 -14
- package/lib/commands/analytics/app/update.js +53 -56
- package/lib/commands/analytics/app/update.js.map +1 -1
- package/lib/commands/analytics/asset/publisher/create.d.ts +9 -9
- package/lib/commands/analytics/asset/publisher/create.js +23 -28
- package/lib/commands/analytics/asset/publisher/create.js.map +1 -1
- package/lib/commands/analytics/asset/publisher/delete.d.ts +10 -10
- package/lib/commands/analytics/asset/publisher/delete.js +29 -34
- package/lib/commands/analytics/asset/publisher/delete.js.map +1 -1
- package/lib/commands/analytics/asset/publisher/deleteall.d.ts +10 -11
- package/lib/commands/analytics/asset/publisher/deleteall.js +30 -45
- package/lib/commands/analytics/asset/publisher/deleteall.js.map +1 -1
- package/lib/commands/analytics/asset/publisher/list.d.ts +14 -10
- package/lib/commands/analytics/asset/publisher/list.js +35 -39
- package/lib/commands/analytics/asset/publisher/list.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/cancel.d.ts +9 -9
- package/lib/commands/analytics/autoinstall/app/cancel.js +23 -28
- package/lib/commands/analytics/autoinstall/app/cancel.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/create.d.ts +21 -18
- package/lib/commands/analytics/autoinstall/app/create.js +94 -102
- package/lib/commands/analytics/autoinstall/app/create.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/delete.d.ts +14 -13
- package/lib/commands/analytics/autoinstall/app/delete.js +55 -61
- package/lib/commands/analytics/autoinstall/app/delete.js.map +1 -1
- package/lib/commands/analytics/autoinstall/app/update.d.ts +16 -15
- package/lib/commands/analytics/autoinstall/app/update.js +72 -78
- package/lib/commands/analytics/autoinstall/app/update.js.map +1 -1
- package/lib/commands/analytics/autoinstall/display.d.ts +11 -11
- package/lib/commands/analytics/autoinstall/display.js +55 -67
- package/lib/commands/analytics/autoinstall/display.js.map +1 -1
- package/lib/commands/analytics/autoinstall/list.d.ts +18 -10
- package/lib/commands/analytics/autoinstall/list.js +32 -32
- package/lib/commands/analytics/autoinstall/list.js.map +1 -1
- package/lib/commands/analytics/dashboard/history/list.d.ts +15 -10
- package/lib/commands/analytics/dashboard/history/list.js +31 -32
- package/lib/commands/analytics/dashboard/history/list.js.map +1 -1
- package/lib/commands/analytics/dashboard/history/revert.d.ts +11 -11
- package/lib/commands/analytics/dashboard/history/revert.js +38 -43
- package/lib/commands/analytics/dashboard/history/revert.js.map +1 -1
- package/lib/commands/analytics/dashboard/list.d.ts +17 -9
- package/lib/commands/analytics/dashboard/list.js +39 -42
- package/lib/commands/analytics/dashboard/list.js.map +1 -1
- package/lib/commands/analytics/dashboard/update.d.ts +11 -11
- package/lib/commands/analytics/dashboard/update.js +38 -43
- package/lib/commands/analytics/dashboard/update.js.map +1 -1
- package/lib/commands/analytics/dataflow/history/list.d.ts +14 -10
- package/lib/commands/analytics/dataflow/history/list.js +31 -32
- package/lib/commands/analytics/dataflow/history/list.js.map +1 -1
- package/lib/commands/analytics/dataflow/history/revert.d.ts +11 -11
- package/lib/commands/analytics/dataflow/history/revert.js +38 -43
- package/lib/commands/analytics/dataflow/history/revert.js.map +1 -1
- package/lib/commands/analytics/dataflow/job/display.d.ts +11 -10
- package/lib/commands/analytics/dataflow/job/display.js +28 -37
- package/lib/commands/analytics/dataflow/job/display.js.map +1 -1
- package/lib/commands/analytics/dataflow/job/list.d.ts +17 -10
- package/lib/commands/analytics/dataflow/job/list.js +30 -31
- package/lib/commands/analytics/dataflow/job/list.js.map +1 -1
- package/lib/commands/analytics/dataflow/job/stop.d.ts +11 -10
- package/lib/commands/analytics/dataflow/job/stop.js +23 -28
- package/lib/commands/analytics/dataflow/job/stop.js.map +1 -1
- package/lib/commands/analytics/dataflow/list.d.ts +15 -9
- package/lib/commands/analytics/dataflow/list.js +23 -23
- package/lib/commands/analytics/dataflow/list.js.map +1 -1
- package/lib/commands/analytics/dataflow/start.d.ts +11 -10
- package/lib/commands/analytics/dataflow/start.js +23 -28
- package/lib/commands/analytics/dataflow/start.js.map +1 -1
- package/lib/commands/analytics/dataflow/update.d.ts +13 -12
- package/lib/commands/analytics/dataflow/update.js +43 -48
- package/lib/commands/analytics/dataflow/update.js.map +1 -1
- package/lib/commands/analytics/dataset/display.d.ts +12 -11
- package/lib/commands/analytics/dataset/display.js +46 -56
- package/lib/commands/analytics/dataset/display.js.map +1 -1
- package/lib/commands/analytics/dataset/list.d.ts +16 -9
- package/lib/commands/analytics/dataset/list.js +30 -33
- package/lib/commands/analytics/dataset/list.js.map +1 -1
- package/lib/commands/analytics/dataset/rows/fetch.d.ts +15 -14
- package/lib/commands/analytics/dataset/rows/fetch.js +57 -86
- package/lib/commands/analytics/dataset/rows/fetch.js.map +1 -1
- package/lib/commands/analytics/enable.d.ts +14 -12
- package/lib/commands/analytics/enable.js +53 -54
- package/lib/commands/analytics/enable.js.map +1 -1
- package/lib/commands/analytics/lens/history/list.d.ts +14 -10
- package/lib/commands/analytics/lens/history/list.js +31 -32
- package/lib/commands/analytics/lens/history/list.js.map +1 -1
- package/lib/commands/analytics/lens/history/revert.d.ts +11 -11
- package/lib/commands/analytics/lens/history/revert.js +38 -43
- package/lib/commands/analytics/lens/history/revert.js.map +1 -1
- package/lib/commands/analytics/lens/list.d.ts +14 -9
- package/lib/commands/analytics/lens/list.js +24 -24
- package/lib/commands/analytics/lens/list.js.map +1 -1
- package/lib/commands/analytics/query.d.ts +19 -18
- package/lib/commands/analytics/query.js +71 -97
- package/lib/commands/analytics/query.js.map +1 -1
- package/lib/commands/analytics/recipe/list.d.ts +16 -10
- package/lib/commands/analytics/recipe/list.js +24 -24
- package/lib/commands/analytics/recipe/list.js.map +1 -1
- package/lib/commands/analytics/recipe/start.d.ts +11 -10
- package/lib/commands/analytics/recipe/start.js +24 -29
- package/lib/commands/analytics/recipe/start.js.map +1 -1
- package/lib/commands/analytics/template/create.d.ts +13 -13
- package/lib/commands/analytics/template/create.js +59 -60
- package/lib/commands/analytics/template/create.js.map +1 -1
- package/lib/commands/analytics/template/delete.d.ts +13 -12
- package/lib/commands/analytics/template/delete.js +51 -61
- package/lib/commands/analytics/template/delete.js.map +1 -1
- package/lib/commands/analytics/template/display.d.ts +12 -11
- package/lib/commands/analytics/template/display.js +41 -51
- package/lib/commands/analytics/template/display.js.map +1 -1
- package/lib/commands/analytics/template/lint.d.ts +12 -11
- package/lib/commands/analytics/template/lint.js +53 -60
- package/lib/commands/analytics/template/lint.js.map +1 -1
- package/lib/commands/analytics/template/list.d.ts +22 -13
- package/lib/commands/analytics/template/list.js +55 -59
- package/lib/commands/analytics/template/list.js.map +1 -1
- package/lib/commands/analytics/template/update.d.ts +18 -15
- package/lib/commands/analytics/template/update.js +77 -89
- package/lib/commands/analytics/template/update.js.map +1 -1
- package/lib/commands/analytics/template/validate.d.ts +13 -12
- package/lib/commands/analytics/template/validate.js +62 -70
- package/lib/commands/analytics/template/validate.js.map +1 -1
- package/lib/commands/analytics.d.ts +4 -2
- package/lib/commands/analytics.js +14 -10
- package/lib/commands/analytics.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/lib/analytics/app/folder.d.ts +4 -3
- package/lib/lib/analytics/app/folder.js +27 -27
- package/lib/lib/analytics/app/folder.js.map +1 -1
- package/lib/lib/analytics/autoinstall/autoinstall.d.ts +6 -6
- package/lib/lib/analytics/autoinstall/autoinstall.js +30 -31
- package/lib/lib/analytics/autoinstall/autoinstall.js.map +1 -1
- package/lib/lib/analytics/constants.js +3 -6
- package/lib/lib/analytics/constants.js.map +1 -1
- package/lib/lib/analytics/dashboard/dashboard.d.ts +2 -2
- package/lib/lib/analytics/dashboard/dashboard.js +17 -19
- package/lib/lib/analytics/dashboard/dashboard.js.map +1 -1
- package/lib/lib/analytics/dataflow/dataflow.d.ts +2 -2
- package/lib/lib/analytics/dataflow/dataflow.js +29 -29
- package/lib/lib/analytics/dataflow/dataflow.js.map +1 -1
- package/lib/lib/analytics/dataset/dataset.js +21 -22
- package/lib/lib/analytics/dataset/dataset.js.map +1 -1
- package/lib/lib/analytics/event/appStreaming.d.ts +4 -5
- package/lib/lib/analytics/event/appStreaming.js +69 -63
- package/lib/lib/analytics/event/appStreaming.js.map +1 -1
- package/lib/lib/analytics/event/waveAssetEvent.d.ts +1 -1
- package/lib/lib/analytics/event/waveAssetEvent.js +22 -15
- package/lib/lib/analytics/event/waveAssetEvent.js.map +1 -1
- package/lib/lib/analytics/lens/lens.d.ts +2 -2
- package/lib/lib/analytics/lens/lens.js +14 -16
- package/lib/lib/analytics/lens/lens.js.map +1 -1
- package/lib/lib/analytics/publisher/publisher.d.ts +2 -2
- package/lib/lib/analytics/publisher/publisher.js +18 -18
- package/lib/lib/analytics/publisher/publisher.js.map +1 -1
- package/lib/lib/analytics/query/query.d.ts +13 -13
- package/lib/lib/analytics/query/query.js +72 -78
- package/lib/lib/analytics/query/query.js.map +1 -1
- package/lib/lib/analytics/recipe/recipe.d.ts +3 -2
- package/lib/lib/analytics/recipe/recipe.js +15 -15
- package/lib/lib/analytics/recipe/recipe.js.map +1 -1
- package/lib/lib/analytics/request.d.ts +5 -5
- package/lib/lib/analytics/request.js +8 -34
- package/lib/lib/analytics/request.js.map +1 -1
- package/lib/lib/analytics/template/lint.d.ts +3 -3
- package/lib/lib/analytics/template/lint.js +11 -11
- package/lib/lib/analytics/template/lint.js.map +1 -1
- package/lib/lib/analytics/template/validate.d.ts +3 -3
- package/lib/lib/analytics/template/validate.js +11 -11
- package/lib/lib/analytics/template/validate.js.map +1 -1
- package/lib/lib/analytics/template/wavetemplate.d.ts +4 -4
- package/lib/lib/analytics/template/wavetemplate.js +28 -22
- package/lib/lib/analytics/template/wavetemplate.js.map +1 -1
- package/lib/lib/analytics/utils.d.ts +31 -4
- package/lib/lib/analytics/utils.js +73 -23
- package/lib/lib/analytics/utils.js.map +1 -1
- package/messages/app.json +2 -1
- package/messages/asset.json +2 -1
- package/messages/autoinstall.json +2 -1
- package/messages/dashboard.json +2 -1
- package/messages/dataflow.json +1 -0
- package/messages/dataset.json +2 -1
- package/messages/history.json +2 -0
- package/messages/lens.json +3 -2
- package/messages/lint.json +3 -1
- package/messages/recipe.json +1 -0
- package/messages/template.json +2 -1
- package/messages/validate.json +2 -0
- package/oclif.lock +9262 -0
- package/oclif.manifest.json +3900 -1
- package/package.json +159 -60
|
@@ -1,107 +1,101 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
import { Flags, SfCommand, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
9
|
+
import AutoInstall from '../../../../lib/analytics/autoinstall/autoinstall.js';
|
|
10
|
+
import { DEF_APP_CREATE_UPDATE_TIMEOUT, DEF_POLLING_INTERVAL, MIN_POLLING_INTERVAL, } from '../../../../lib/analytics/constants.js';
|
|
11
|
+
import { commandUx, numberFlag, throwWithData } from '../../../../lib/analytics/utils.js';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/analytics', 'autoinstall');
|
|
14
|
+
export default class Update extends SfCommand {
|
|
15
|
+
static summary = messages.getMessage('updateCommandDescription');
|
|
16
|
+
static description = messages.getMessage('updateCommandLongDescription');
|
|
17
|
+
static examples = [
|
|
18
|
+
'$ sfdx analytics:autoinstall:app:update -t templateid -f folderid',
|
|
19
|
+
'$ sfdx analytics:autoinstall:app:update -n templatename -f folderid',
|
|
20
|
+
];
|
|
21
|
+
static flags = {
|
|
22
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
|
23
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
|
24
|
+
templateid: Flags.salesforceId({
|
|
25
|
+
char: 't',
|
|
26
|
+
summary: messages.getMessage('templateidFlagDescription'),
|
|
27
|
+
description: messages.getMessage('templateidFlagLongDescription'),
|
|
28
|
+
exclusive: ['templatename'],
|
|
29
|
+
}),
|
|
30
|
+
templatename: Flags.string({
|
|
31
|
+
char: 'n',
|
|
32
|
+
summary: messages.getMessage('templatenameFlagDescription'),
|
|
33
|
+
description: messages.getMessage('templatenameFlagLongDescription'),
|
|
34
|
+
exclusive: ['templateid'],
|
|
35
|
+
}),
|
|
36
|
+
folderid: Flags.salesforceId({
|
|
37
|
+
char: 'f',
|
|
38
|
+
required: true,
|
|
39
|
+
summary: messages.getMessage('folderidFlagDescription'),
|
|
40
|
+
description: messages.getMessage('folderidFlagLongDescription'),
|
|
41
|
+
}),
|
|
42
|
+
async: Flags.boolean({
|
|
43
|
+
char: 'a',
|
|
44
|
+
summary: messages.getMessage('appUpdateAsyncDescription'),
|
|
45
|
+
description: messages.getMessage('appUpdateAsyncLongDescription'),
|
|
46
|
+
}),
|
|
47
|
+
wait: numberFlag({
|
|
48
|
+
char: 'w',
|
|
49
|
+
summary: messages.getMessage('autoInstallWaitDescription'),
|
|
50
|
+
description: messages.getMessage('autoInstallWaitLongDescription', [DEF_APP_CREATE_UPDATE_TIMEOUT]),
|
|
51
|
+
min: 0,
|
|
52
|
+
default: DEF_APP_CREATE_UPDATE_TIMEOUT,
|
|
53
|
+
}),
|
|
54
|
+
pollinterval: Flags.integer({
|
|
55
|
+
char: 'p',
|
|
56
|
+
summary: messages.getMessage('autoInstallPollIntervalDescription'),
|
|
57
|
+
description: messages.getMessage('autoInstallPollIntervalLongDescription', [DEF_POLLING_INTERVAL]),
|
|
58
|
+
min: MIN_POLLING_INTERVAL,
|
|
59
|
+
default: DEF_POLLING_INTERVAL,
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
20
62
|
async run() {
|
|
21
|
-
|
|
22
|
-
const templateInput = (
|
|
63
|
+
const { flags } = await this.parse(Update);
|
|
64
|
+
const templateInput = (flags.templateid ?? flags.templatename);
|
|
23
65
|
if (!templateInput) {
|
|
24
|
-
throw new
|
|
66
|
+
throw new SfError(messages.getMessage('missingRequiredField'));
|
|
25
67
|
}
|
|
26
|
-
const autoinstall = new
|
|
27
|
-
const autoInstallId = await autoinstall.update(templateInput,
|
|
28
|
-
if (
|
|
29
|
-
this.
|
|
68
|
+
const autoinstall = new AutoInstall(flags['target-org'].getConnection(flags['api-version']));
|
|
69
|
+
const autoInstallId = await autoinstall.update(templateInput, flags.folderid);
|
|
70
|
+
if (flags.async || flags.wait <= 0) {
|
|
71
|
+
this.log(messages.getMessage('appUpdateRequestSuccess', [autoInstallId]));
|
|
30
72
|
}
|
|
31
73
|
else if (autoInstallId) {
|
|
32
74
|
// otherwise start polling the request
|
|
33
75
|
const finalRequest = await autoinstall.pollRequest(autoInstallId, {
|
|
34
|
-
timeoutMs:
|
|
35
|
-
pauseMs:
|
|
36
|
-
timeoutMessage: r =>
|
|
37
|
-
ux: this
|
|
38
|
-
startMesg: messages.getMessage('startRequestPolling', [autoInstallId])
|
|
76
|
+
timeoutMs: flags.wait * 60 * 1000,
|
|
77
|
+
pauseMs: flags.pollinterval,
|
|
78
|
+
timeoutMessage: (r) => throwWithData(messages.getMessage('requestPollingTimeout', [autoInstallId, r?.requestStatus ?? '']), r),
|
|
79
|
+
ux: commandUx(this),
|
|
80
|
+
startMesg: messages.getMessage('startRequestPolling', [autoInstallId]),
|
|
39
81
|
});
|
|
40
|
-
const status =
|
|
82
|
+
const status = finalRequest.requestStatus?.toLocaleLowerCase();
|
|
41
83
|
if (status === 'success') {
|
|
42
|
-
this.
|
|
84
|
+
this.log(messages.getMessage('appUpdateSuccess', [finalRequest.folderId, autoInstallId]));
|
|
43
85
|
return finalRequest;
|
|
44
86
|
}
|
|
45
87
|
else if (status === 'cancelled') {
|
|
46
|
-
|
|
88
|
+
throwWithData(messages.getMessage('requestCancelled', [autoInstallId]), finalRequest);
|
|
47
89
|
}
|
|
48
90
|
else {
|
|
49
|
-
|
|
91
|
+
throwWithData(messages.getMessage('appUpdateFailed', [autoInstallId]), finalRequest);
|
|
50
92
|
}
|
|
51
93
|
}
|
|
52
94
|
else {
|
|
53
95
|
// we should always get an auto-install-request id back, but fail if we don't
|
|
54
|
-
throw new
|
|
96
|
+
throw new SfError(messages.getMessage('appUpdateFailed', ['']));
|
|
55
97
|
}
|
|
56
98
|
return autoInstallId;
|
|
57
99
|
}
|
|
58
100
|
}
|
|
59
|
-
exports.default = Update;
|
|
60
|
-
Update.description = messages.getMessage('updateCommandDescription');
|
|
61
|
-
Update.longDescription = messages.getMessage('updateCommandLongDescription');
|
|
62
|
-
Update.examples = [
|
|
63
|
-
'$ sfdx analytics:autoinstall:app:update -t templateid -f folderid',
|
|
64
|
-
'$ sfdx analytics:autoinstall:app:update -n templatename -f folderid'
|
|
65
|
-
];
|
|
66
|
-
Update.flagsConfig = {
|
|
67
|
-
templateid: command_1.flags.id({
|
|
68
|
-
char: 't',
|
|
69
|
-
description: messages.getMessage('templateidFlagDescription'),
|
|
70
|
-
longDescription: messages.getMessage('templateidFlagLongDescription'),
|
|
71
|
-
exclusive: ['templatename']
|
|
72
|
-
}),
|
|
73
|
-
templatename: command_1.flags.string({
|
|
74
|
-
char: 'n',
|
|
75
|
-
description: messages.getMessage('templatenameFlagDescription'),
|
|
76
|
-
longDescription: messages.getMessage('templatenameFlagLongDescription'),
|
|
77
|
-
exclusive: ['templateid']
|
|
78
|
-
}),
|
|
79
|
-
folderid: command_1.flags.id({
|
|
80
|
-
char: 'f',
|
|
81
|
-
required: true,
|
|
82
|
-
description: messages.getMessage('folderidFlagDescription'),
|
|
83
|
-
longDescription: messages.getMessage('folderidFlagLongDescription')
|
|
84
|
-
}),
|
|
85
|
-
async: command_1.flags.boolean({
|
|
86
|
-
char: 'a',
|
|
87
|
-
description: messages.getMessage('appUpdateAsyncDescription'),
|
|
88
|
-
longDescription: messages.getMessage('appUpdateAsyncLongDescription')
|
|
89
|
-
}),
|
|
90
|
-
wait: command_1.flags.number({
|
|
91
|
-
char: 'w',
|
|
92
|
-
description: messages.getMessage('autoInstallWaitDescription'),
|
|
93
|
-
longDescription: messages.getMessage('autoInstallWaitLongDescription', [constants_1.DEF_APP_CREATE_UPDATE_TIMEOUT]),
|
|
94
|
-
min: 0,
|
|
95
|
-
default: constants_1.DEF_APP_CREATE_UPDATE_TIMEOUT
|
|
96
|
-
}),
|
|
97
|
-
pollinterval: command_1.flags.number({
|
|
98
|
-
char: 'p',
|
|
99
|
-
description: messages.getMessage('autoInstallPollIntervalDescription'),
|
|
100
|
-
longDescription: messages.getMessage('autoInstallPollIntervalLongDescription', [constants_1.DEF_POLLING_INTERVAL]),
|
|
101
|
-
min: constants_1.MIN_POLLING_INTERVAL,
|
|
102
|
-
default: constants_1.DEF_POLLING_INTERVAL
|
|
103
|
-
})
|
|
104
|
-
};
|
|
105
|
-
Update.requiresUsername = true;
|
|
106
|
-
Update.requiresProject = false;
|
|
107
101
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/autoinstall/app/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/autoinstall/app/update.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,SAAS,EACT,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,WAA4C,MAAM,sDAAsD,CAAC;AAChH,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAE1F,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;AAE/E,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAsD;IACjF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC1E,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAElF,MAAM,CAAU,QAAQ,GAAG;QAChC,mEAAmE;QACnE,qEAAqE;KACtE,CAAC;IAEK,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,+BAA+B;QAC7C,aAAa,EAAE,iCAAiC;Q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CAAC,aAAa,EAAE,CAAC,EAAE,aAAa,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBACzG,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC;gBACnB,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,aAAa,CAAC,CAAC;aACvE,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,EAAE,iBAAiB,EAAE,CAAC;YAC/D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;gBAC1F,OAAO,YAAY,CAAC;YACtB,CAAC;iBAAM,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YACxF,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YACvF,CAAC;QACH,CAAC;aAAM,CAAC;YACN,6EAA6E;YAC7E,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AutoInstallRequestType } from '../../../lib/analytics/autoinstall/autoinstall';
|
|
3
|
-
export default class Display extends
|
|
4
|
-
static
|
|
5
|
-
static
|
|
6
|
-
static examples: string[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { AutoInstallRequestType } from '../../../lib/analytics/autoinstall/autoinstall.js';
|
|
3
|
+
export default class Display extends SfCommand<AutoInstallRequestType> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
+
autoinstallid: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
|
+
applog: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
10
12
|
};
|
|
11
|
-
protected static requiresUsername: boolean;
|
|
12
|
-
protected static requiresProject: boolean;
|
|
13
13
|
run(): Promise<AutoInstallRequestType>;
|
|
14
14
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const autoinstall_1 = __importDefault(require("../../../lib/analytics/autoinstall/autoinstall"));
|
|
17
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
-
const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'autoinstall');
|
|
7
|
+
import { Flags, SfCommand, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import moment from 'moment';
|
|
11
|
+
import AutoInstall from '../../../lib/analytics/autoinstall/autoinstall.js';
|
|
12
|
+
import { generateTableColumns } from '../../../lib/analytics/utils.js';
|
|
13
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
|
+
const messages = Messages.loadMessages('@salesforce/analytics', 'autoinstall');
|
|
19
15
|
function blue(s) {
|
|
20
|
-
return process.platform !== 'win32' ?
|
|
16
|
+
return process.platform !== 'win32' ? chalk.blue(s) : s;
|
|
21
17
|
}
|
|
22
18
|
function formatDate(s) {
|
|
23
19
|
try {
|
|
@@ -33,22 +29,42 @@ function formatDate(s) {
|
|
|
33
29
|
function colorStatus(s) {
|
|
34
30
|
if (s && process.platform !== 'win32') {
|
|
35
31
|
if (s === 'Failed' || s === 'Cancelled' || s === 'Skipped') {
|
|
36
|
-
return
|
|
32
|
+
return chalk.red(s);
|
|
37
33
|
}
|
|
38
34
|
else if (s === 'Success' || s === 'New') {
|
|
39
|
-
return
|
|
35
|
+
return chalk.green(s);
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
return s;
|
|
43
39
|
}
|
|
44
|
-
class Display extends
|
|
40
|
+
export default class Display extends SfCommand {
|
|
41
|
+
static summary = messages.getMessage('displayCommandDescription');
|
|
42
|
+
static description = messages.getMessage('displayCommandLongDescription');
|
|
43
|
+
static examples = ['$ sfdx analytics:autoinstall:display -i id'];
|
|
44
|
+
static flags = {
|
|
45
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
|
46
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
|
47
|
+
autoinstallid: Flags.salesforceId({
|
|
48
|
+
char: 'i',
|
|
49
|
+
required: true,
|
|
50
|
+
summary: messages.getMessage('autoinstallidFlagDescription'),
|
|
51
|
+
description: messages.getMessage('autoinstallidFlagLongDescription'),
|
|
52
|
+
}),
|
|
53
|
+
applog: Flags.boolean({
|
|
54
|
+
char: 'a',
|
|
55
|
+
required: false,
|
|
56
|
+
default: false,
|
|
57
|
+
summary: messages.getMessage('applogFlagDescription'),
|
|
58
|
+
description: messages.getMessage('applogFlagLongDescription'),
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
45
61
|
async run() {
|
|
46
|
-
|
|
47
|
-
const autoinstall = new
|
|
48
|
-
const autoinstallRep = await autoinstall.fetch(
|
|
62
|
+
const { flags } = await this.parse(Display);
|
|
63
|
+
const autoinstall = new AutoInstall(flags['target-org'].getConnection(flags['api-version']));
|
|
64
|
+
const autoinstallRep = await autoinstall.fetch(flags.autoinstallid);
|
|
49
65
|
// force:org:display does a blue chalk on the headers, so do it here, too
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
66
|
+
this.styledHeader(blue(messages.getMessage('displayDetailHeader')));
|
|
67
|
+
this.table([
|
|
52
68
|
{ key: 'Id', value: autoinstallRep.id },
|
|
53
69
|
{ key: 'Request Type', value: autoinstallRep.requestType },
|
|
54
70
|
{ key: 'Request Name', value: autoinstallRep.requestName },
|
|
@@ -57,60 +73,32 @@ class Display extends command_1.SfdxCommand {
|
|
|
57
73
|
{ key: 'Folder ID', value: autoinstallRep.folderId },
|
|
58
74
|
{ key: 'Folder Label', value: autoinstallRep.folderLabel },
|
|
59
75
|
{ key: 'Template Version', value: autoinstallRep.templateVersion },
|
|
60
|
-
{ key: 'Template Description', value:
|
|
61
|
-
{ key: 'Template Label', value:
|
|
62
|
-
{ key: 'Template Namespace', value:
|
|
63
|
-
{ key: 'Template Asset Version', value:
|
|
64
|
-
{ key: 'Template Type', value:
|
|
76
|
+
{ key: 'Template Description', value: autoinstallRep.requestTemplate?.description },
|
|
77
|
+
{ key: 'Template Label', value: autoinstallRep.requestTemplate?.label },
|
|
78
|
+
{ key: 'Template Namespace', value: autoinstallRep.requestTemplate?.namespace },
|
|
79
|
+
{ key: 'Template Asset Version', value: autoinstallRep.requestTemplate?.assetVersion },
|
|
80
|
+
{ key: 'Template Type', value: autoinstallRep.requestTemplate?.templateType },
|
|
65
81
|
{ key: 'Request Log', value: autoinstallRep.requestLog },
|
|
66
|
-
{ key: 'Created By', value:
|
|
82
|
+
{ key: 'Created By', value: autoinstallRep.createdBy?.name },
|
|
67
83
|
{ key: 'Created Date', value: formatDate(autoinstallRep.createdDate) },
|
|
68
|
-
{ key: 'Last Modified By', value:
|
|
69
|
-
{ key: 'Last Modified Date', value: formatDate(autoinstallRep.lastModifiedDate) }
|
|
70
|
-
],
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
if (this.flags.applog) {
|
|
77
|
-
this.ux.styledHeader(blue(messages.getMessage('displayLogHeader')));
|
|
78
|
-
if (!((_h = autoinstallRep.appFromRequest) === null || _h === void 0 ? void 0 : _h.appLog) ||
|
|
79
|
-
!Array.isArray((_j = autoinstallRep.appFromRequest) === null || _j === void 0 ? void 0 : _j.appLog) ||
|
|
84
|
+
{ key: 'Last Modified By', value: autoinstallRep.lastModifiedBy?.name },
|
|
85
|
+
{ key: 'Last Modified Date', value: formatDate(autoinstallRep.lastModifiedDate) },
|
|
86
|
+
], generateTableColumns(['key', 'value']));
|
|
87
|
+
if (flags.applog) {
|
|
88
|
+
this.styledHeader(blue(messages.getMessage('displayLogHeader')));
|
|
89
|
+
if (!autoinstallRep.appFromRequest?.appLog ||
|
|
90
|
+
!Array.isArray(autoinstallRep.appFromRequest?.appLog) ||
|
|
80
91
|
autoinstallRep.appFromRequest.appLog.length <= 0) {
|
|
81
|
-
this.
|
|
92
|
+
this.log(messages.getMessage('displayNoLogAvailable'));
|
|
82
93
|
}
|
|
83
94
|
else {
|
|
84
|
-
const data =
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
this.
|
|
88
|
-
columns: [{ key: 'message', label: 'Message' }]
|
|
89
|
-
});
|
|
95
|
+
const data = autoinstallRep.appFromRequest.appLog?.map((line) => ({
|
|
96
|
+
message: (typeof line === 'string' ? line : line.message) || '',
|
|
97
|
+
}));
|
|
98
|
+
this.table(data, generateTableColumns(['message']));
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
101
|
return autoinstallRep;
|
|
93
102
|
}
|
|
94
103
|
}
|
|
95
|
-
exports.default = Display;
|
|
96
|
-
Display.description = messages.getMessage('displayCommandDescription');
|
|
97
|
-
Display.longDescription = messages.getMessage('displayCommandLongDescription');
|
|
98
|
-
Display.examples = ['$ sfdx analytics:autoinstall:display -i id'];
|
|
99
|
-
Display.flagsConfig = {
|
|
100
|
-
autoinstallid: command_1.flags.id({
|
|
101
|
-
char: 'i',
|
|
102
|
-
required: true,
|
|
103
|
-
description: messages.getMessage('autoinstallidFlagDescription'),
|
|
104
|
-
longDescription: messages.getMessage('autoinstallidFlagLongDescription')
|
|
105
|
-
}),
|
|
106
|
-
applog: command_1.flags.boolean({
|
|
107
|
-
char: 'a',
|
|
108
|
-
required: false,
|
|
109
|
-
default: false,
|
|
110
|
-
description: messages.getMessage('applogFlagDescription'),
|
|
111
|
-
longDescription: messages.getMessage('applogFlagLongDescription')
|
|
112
|
-
})
|
|
113
|
-
};
|
|
114
|
-
Display.requiresUsername = true;
|
|
115
|
-
Display.requiresProject = false;
|
|
116
104
|
//# sourceMappingURL=display.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/analytics/autoinstall/display.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/analytics/autoinstall/display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,SAAS,EACT,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AA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
-
export default class List extends
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class List extends SfCommand<Array<{
|
|
3
|
+
id?: string;
|
|
4
|
+
requestType?: string;
|
|
5
|
+
requestName?: string;
|
|
6
|
+
requestStatus?: string;
|
|
7
|
+
templateApiName?: string;
|
|
8
|
+
folderId?: string;
|
|
9
|
+
folderLabel?: string;
|
|
10
|
+
}>> {
|
|
11
|
+
static readonly summary: string;
|
|
12
|
+
static readonly description: string;
|
|
13
|
+
static readonly examples: string[];
|
|
14
|
+
static readonly flags: {
|
|
15
|
+
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
16
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
17
|
+
};
|
|
10
18
|
run(): Promise<{
|
|
11
19
|
id: string | undefined;
|
|
12
20
|
requestType: string | undefined;
|
|
13
21
|
requestName: string | undefined;
|
|
14
|
-
requestStatus: import("../../../lib/analytics/autoinstall/autoinstall").AutoInstallStatus | undefined;
|
|
22
|
+
requestStatus: import("../../../lib/analytics/autoinstall/autoinstall.js").AutoInstallStatus | undefined;
|
|
15
23
|
templateApiName: string | undefined;
|
|
16
24
|
folderId: string | undefined;
|
|
17
25
|
folderLabel: string | undefined;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
import { SfCommand, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import AutoInstall from '../../../lib/analytics/autoinstall/autoinstall.js';
|
|
10
|
+
import { generateTableColumns } from '../../../lib/analytics/utils.js';
|
|
11
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/analytics', 'autoinstall');
|
|
13
|
+
export default class List extends SfCommand {
|
|
14
|
+
static summary = messages.getMessage('listCommandDescription');
|
|
15
|
+
static description = messages.getMessage('listCommandLongDescription');
|
|
16
|
+
static examples = ['$ sfdx analytics:autoinstall:list'];
|
|
17
|
+
static flags = {
|
|
18
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
|
19
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
|
20
|
+
};
|
|
18
21
|
async run() {
|
|
19
|
-
const
|
|
20
|
-
const
|
|
22
|
+
const { flags } = await this.parse(List);
|
|
23
|
+
const autoinstall = new AutoInstall(flags['target-org'].getConnection(flags['api-version']));
|
|
24
|
+
const autoinstalls = ((await autoinstall.list()) || []).map((request) => ({
|
|
21
25
|
id: request.id,
|
|
22
26
|
requestType: request.requestType,
|
|
23
27
|
requestName: request.requestName,
|
|
24
28
|
requestStatus: request.requestStatus,
|
|
25
29
|
templateApiName: request.templateApiName,
|
|
26
30
|
folderId: request.folderId,
|
|
27
|
-
folderLabel: request.folderLabel
|
|
31
|
+
folderLabel: request.folderLabel,
|
|
28
32
|
}));
|
|
29
|
-
if (autoinstalls.length) {
|
|
30
|
-
this.
|
|
33
|
+
if (autoinstalls.length > 0) {
|
|
34
|
+
this.styledHeader(messages.getMessage('autoinstallsFound', [autoinstalls.length]));
|
|
35
|
+
this.table(autoinstalls, generateTableColumns([
|
|
36
|
+
'id',
|
|
37
|
+
'requestType',
|
|
38
|
+
'requestName',
|
|
39
|
+
'requestStatus',
|
|
40
|
+
'templateApiName',
|
|
41
|
+
'folderId',
|
|
42
|
+
'folderLabel',
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.log(messages.getMessage('noResultsFound'));
|
|
31
47
|
}
|
|
32
48
|
return autoinstalls;
|
|
33
49
|
}
|
|
34
50
|
}
|
|
35
|
-
exports.default = List;
|
|
36
|
-
List.description = messages.getMessage('listCommandDescription');
|
|
37
|
-
List.longDescription = messages.getMessage('listCommandLongDescription');
|
|
38
|
-
List.examples = ['$ sfdx analytics:autoinstall:list'];
|
|
39
|
-
List.flagsConfig = {};
|
|
40
|
-
List.requiresUsername = true;
|
|
41
|
-
List.requiresProject = false;
|
|
42
|
-
List.tableColumnData = [
|
|
43
|
-
'id',
|
|
44
|
-
'requestType',
|
|
45
|
-
'requestName',
|
|
46
|
-
'requestStatus',
|
|
47
|
-
'templateApiName',
|
|
48
|
-
'folderId',
|
|
49
|
-
'folderLabel'
|
|
50
|
-
];
|
|
51
51
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/analytics/autoinstall/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/analytics/autoinstall/list.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,WAAW,MAAM,mDAAmD,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,QAAQ,CAAC,kCAAkC,CAAC,MAA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,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACnF,IAAI,CAAC,KAAK,CACR,YAAY,EACZ,oBAAoB,CAAC;gBACnB,IAAI;gBACJ,aAAa;gBACb,aAAa;gBACb,eAAe;gBACf,iBAAiB;gBACjB,UAAU;gBACV,aAAa;aACd,CAAC,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class List extends
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class List extends SfCommand<Array<{
|
|
3
|
+
historyid?: string;
|
|
4
|
+
dashboardid: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
isCurrent: string;
|
|
8
|
+
}>> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
14
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
15
|
+
dashboardid: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
8
16
|
};
|
|
9
|
-
protected static requiresUsername: boolean;
|
|
10
|
-
protected static requiresProject: boolean;
|
|
11
|
-
protected static tableColumnData: string[];
|
|
12
17
|
run(): Promise<{
|
|
13
18
|
historyid: string | undefined;
|
|
14
19
|
dashboardid: string;
|