sf-raven 1.0.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -1
- package/bin/dev.js +8 -0
- package/lib/commands/raven/audit/display.d.ts +3 -3
- package/lib/commands/raven/audit/display.js +62 -53
- package/lib/commands/raven/audit/display.js.map +1 -1
- package/lib/commands/raven/deploy/cancel.d.ts +15 -0
- package/lib/commands/raven/deploy/cancel.js +185 -0
- package/lib/commands/raven/deploy/cancel.js.map +1 -0
- package/lib/commands/raven/event/subscribe.d.ts +4 -4
- package/lib/commands/raven/event/subscribe.js +52 -43
- package/lib/commands/raven/event/subscribe.js.map +1 -1
- package/lib/commands/raven/object/display/fields.d.ts +2 -2
- package/lib/commands/raven/object/display/fields.js +46 -37
- package/lib/commands/raven/object/display/fields.js.map +1 -1
- package/lib/commands/raven/object/display/recordtypes.d.ts +2 -2
- package/lib/commands/raven/object/display/recordtypes.js +46 -37
- package/lib/commands/raven/object/display/recordtypes.js.map +1 -1
- package/lib/commands/raven/pull/remote.d.ts +14 -0
- package/lib/commands/raven/pull/remote.js +64 -0
- package/lib/commands/raven/pull/remote.js.map +1 -0
- package/lib/commands/raven/pull.d.ts +15 -0
- package/lib/commands/raven/pull.js +64 -0
- package/lib/commands/raven/pull.js.map +1 -0
- package/lib/commands/raven/query/ids.d.ts +28 -0
- package/lib/commands/raven/query/ids.js +246 -0
- package/lib/commands/raven/query/ids.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/pull.d.ts +10 -0
- package/lib/shared/pull.js +242 -0
- package/lib/shared/pull.js.map +1 -0
- package/messages/raven.deploy.cancel.md +73 -0
- package/messages/raven.pull.md +57 -0
- package/messages/raven.pull.remote.md +45 -0
- package/messages/raven.query.ids.md +85 -0
- package/oclif.lock +7697 -0
- package/oclif.manifest.json +429 -86
- package/package.json +45 -38
package/README.md
CHANGED
|
@@ -43,6 +43,23 @@ Full details, usage, examples etc are further down, or can be accessed via `--he
|
|
|
43
43
|
- [sf raven event subscribe](#sf-raven-event-subscribe)
|
|
44
44
|
- Subscribe to Platform Events.
|
|
45
45
|
|
|
46
|
+
#### sf raven deploy
|
|
47
|
+
|
|
48
|
+
- [sf raven deploy cancel](#sf-raven-deploy-cancel)
|
|
49
|
+
- Cancel a pending or in-progress Salesforce deploy.
|
|
50
|
+
|
|
51
|
+
#### sf raven query
|
|
52
|
+
|
|
53
|
+
- [sf raven query ids](#sf-raven-query-ids)
|
|
54
|
+
- Run a SOQL query against a large list of Salesforce IDs.
|
|
55
|
+
|
|
56
|
+
#### sf raven pull
|
|
57
|
+
|
|
58
|
+
- [sf raven pull](#sf-raven-pull)
|
|
59
|
+
- Pull local Salesforce metadata paths into the project.
|
|
60
|
+
- [sf raven pull remote](#sf-raven-pull-remote)
|
|
61
|
+
- Pull Salesforce metadata that exists in the org but not locally.
|
|
62
|
+
|
|
46
63
|
<!-- #### sfdx:raven:utils
|
|
47
64
|
* [sfdx raven:utils:deploy:branch2org](#sfdx-ravenutilsdeploybranch2org)
|
|
48
65
|
* Deploy a git branch to an org
|
|
@@ -55,7 +72,7 @@ Full details, usage, examples etc are further down, or can be accessed via `--he
|
|
|
55
72
|
|
|
56
73
|
### Quick Install
|
|
57
74
|
|
|
58
|
-
Assuming you already have the [
|
|
75
|
+
Assuming you already have the [sf cli](https://developer.salesforce.com/tools/salesforcecli) installed, the plugin can be installed by running:
|
|
59
76
|
|
|
60
77
|
`sf plugins install sf-raven`
|
|
61
78
|
|
|
@@ -169,6 +186,112 @@ Person Account PersonAccount 0124J000000YYYYDEF
|
|
|
169
186
|
...
|
|
170
187
|
```
|
|
171
188
|
|
|
189
|
+
## sf raven pull
|
|
190
|
+
|
|
191
|
+
Pull Salesforce metadata into the local project.
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
USAGE
|
|
195
|
+
$ sf raven pull [--json] [-o <value>] [-a]
|
|
196
|
+
|
|
197
|
+
FLAGS
|
|
198
|
+
-a, --all Retrieve all local package directories instead of selecting a path with fzf.
|
|
199
|
+
-o, --target-org=<value> Login username or alias for the target org. Uses the default org when omitted.
|
|
200
|
+
|
|
201
|
+
GLOBAL FLAGS
|
|
202
|
+
--json Format output as json.
|
|
203
|
+
|
|
204
|
+
DESCRIPTION
|
|
205
|
+
Refresh local Salesforce metadata from an authenticated org. Without --all, local metadata paths are loaded into fzf so you can choose one or more files or directories to retrieve. Press Tab to select multiple paths, then Enter to retrieve them together. With --all, each package directory from sfdx-project.json is retrieved.
|
|
206
|
+
|
|
207
|
+
EXAMPLES
|
|
208
|
+
$ sf raven pull
|
|
209
|
+
|
|
210
|
+
$ sf raven pull --target-org dev
|
|
211
|
+
|
|
212
|
+
$ sf raven pull --all
|
|
213
|
+
|
|
214
|
+
$ sf raven pull --target-org dev --all
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## sf raven pull remote
|
|
218
|
+
|
|
219
|
+
Pull Salesforce metadata that exists in the org but not locally.
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
USAGE
|
|
223
|
+
$ sf raven pull remote [--json] [-o <value>]
|
|
224
|
+
|
|
225
|
+
FLAGS
|
|
226
|
+
-o, --target-org=<value> Login username or alias for the target org. Uses the default org when omitted.
|
|
227
|
+
|
|
228
|
+
GLOBAL FLAGS
|
|
229
|
+
--json Format output as json.
|
|
230
|
+
|
|
231
|
+
DESCRIPTION
|
|
232
|
+
List supported metadata components that exist in the target org but are not present in the local project. Org-only components are prefixed with a cloud marker in fzf. Press Tab to select multiple components, then Enter to retrieve them.
|
|
233
|
+
|
|
234
|
+
EXAMPLES
|
|
235
|
+
$ sf raven pull remote
|
|
236
|
+
|
|
237
|
+
$ sf raven pull remote --target-org dev
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## sf raven deploy cancel
|
|
241
|
+
|
|
242
|
+
Cancel a pending or in-progress Salesforce deploy.
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
USAGE
|
|
246
|
+
$ sf raven deploy cancel [--json] [-o <value>]
|
|
247
|
+
|
|
248
|
+
FLAGS
|
|
249
|
+
-o, --target-org=<value> Login username or alias for the target org. Uses the default org when omitted.
|
|
250
|
+
|
|
251
|
+
GLOBAL FLAGS
|
|
252
|
+
--json Format output as json.
|
|
253
|
+
|
|
254
|
+
DESCRIPTION
|
|
255
|
+
Query the target org for pending or in-progress deploy requests, select one from an interactive list, confirm the cancellation, and submit an asynchronous deploy cancel request.
|
|
256
|
+
|
|
257
|
+
EXAMPLES
|
|
258
|
+
$ sf raven deploy cancel
|
|
259
|
+
|
|
260
|
+
$ sf raven deploy cancel --target-org dev
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## sf raven query ids
|
|
264
|
+
|
|
265
|
+
Run a SOQL query against a large list of Salesforce IDs.
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
USAGE
|
|
269
|
+
$ sf raven query ids -f <value> -q <value> [--json] [-o <value>] [-b <value>] [-c <value>] [-l <value>]
|
|
270
|
+
|
|
271
|
+
FLAGS
|
|
272
|
+
-b, --batch-size=<value> Number of IDs to include in each query batch. By default, batches are sized to fit Salesforce URI limits.
|
|
273
|
+
-c, --csv=<value> Path to write query results as CSV. When supplied, table output is suppressed.
|
|
274
|
+
-f, --file=<value> (required) Path to a file containing one Salesforce ID per row.
|
|
275
|
+
-l, --limit=<value> Process only the first N unique valid IDs from the file.
|
|
276
|
+
-o, --target-org=<value> Login username or alias for the target org. Uses the default org when omitted.
|
|
277
|
+
-q, --query=<value> (required) SOQL query to run. Must include the {ids} placeholder where the ID list should be inserted.
|
|
278
|
+
|
|
279
|
+
GLOBAL FLAGS
|
|
280
|
+
--json Format output as json.
|
|
281
|
+
|
|
282
|
+
DESCRIPTION
|
|
283
|
+
Read Salesforce IDs from a file, deduplicate and validate them, split them into safe query batches, and run a SOQL query with the IDs inserted at the {ids} placeholder.
|
|
284
|
+
|
|
285
|
+
EXAMPLES
|
|
286
|
+
$ sf raven query ids --file account-ids.txt --query "SELECT Id, Name FROM Account WHERE Id IN {ids}"
|
|
287
|
+
|
|
288
|
+
$ sf raven query ids --file account-ids.txt --query "SELECT Id, Name FROM Opportunity WHERE AccountId IN {ids}"
|
|
289
|
+
|
|
290
|
+
$ sf raven query ids --file account-ids.txt --query "SELECT Id, Name FROM Account WHERE Id IN {ids}" --limit 25
|
|
291
|
+
|
|
292
|
+
$ sf raven query ids --file account-ids.txt --query "SELECT Id, Name FROM Account WHERE Id IN {ids}" --csv results.csv
|
|
293
|
+
```
|
|
294
|
+
|
|
172
295
|
## sf raven audit display
|
|
173
296
|
|
|
174
297
|
Show recent entries in the Setup Audit Trail.
|
package/bin/dev.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
|
|
2
|
+
// eslint-disable-next-line node/shebang
|
|
3
|
+
async function main() {
|
|
4
|
+
const { execute } = await import('@oclif/core');
|
|
5
|
+
await execute({ development: true, dir: import.meta.url });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
await main();
|
|
@@ -7,9 +7,9 @@ export default class AuditDisplay extends SfCommand<AuditDisplayResult> {
|
|
|
7
7
|
static readonly description: string;
|
|
8
8
|
static readonly examples: string[];
|
|
9
9
|
static readonly flags: {
|
|
10
|
-
'target-org': import("@oclif/core/
|
|
11
|
-
username: import("@oclif/core/
|
|
12
|
-
limit: import("@oclif/core/
|
|
10
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
username: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
};
|
|
14
14
|
run(): Promise<AuditDisplayResult>;
|
|
15
15
|
}
|
|
@@ -1,78 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { SfCommand, Flags, Ux } from '@salesforce/sf-plugins-core';
|
|
11
|
+
import { Messages } from '@salesforce/core';
|
|
12
|
+
import dayjs from 'dayjs';
|
|
13
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
|
+
const messages = Messages.loadMessages('sf-raven', 'raven.audit.display');
|
|
15
|
+
class AuditDisplay extends SfCommand {
|
|
16
|
+
run() {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
this.spinner.start('Loading...');
|
|
19
|
+
const { flags } = yield this.parse(AuditDisplay);
|
|
20
|
+
const ux = new Ux({ jsonEnabled: this.jsonEnabled() });
|
|
21
|
+
const org = flags['target-org'];
|
|
22
|
+
const conn = org.getConnection();
|
|
23
|
+
let query = '';
|
|
24
|
+
if (flags.username) {
|
|
25
|
+
query = `SELECT CreatedDate, CreatedBy.Username,
|
|
18
26
|
Section, Display, DelegateUser
|
|
19
27
|
FROM SetupAuditTrail
|
|
20
28
|
WHERE CreatedBy.Username = '${flags.username}'
|
|
21
29
|
ORDER BY CreatedDate DESC
|
|
22
30
|
LIMIT ${flags.limit}`;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
query = `SELECT CreatedDate, CreatedBy.Username,
|
|
26
34
|
Section, Display, DelegateUser
|
|
27
35
|
FROM SetupAuditTrail
|
|
28
36
|
ORDER BY CreatedDate DESC
|
|
29
37
|
LIMIT ${flags.limit}`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
}
|
|
39
|
+
const result = (yield conn.query(query));
|
|
40
|
+
result.records.forEach((record) => {
|
|
41
|
+
record.CreatedDate = dayjs(record.CreatedDate).format('YYYY-MM-DD HH:mm:ss');
|
|
42
|
+
});
|
|
43
|
+
this.spinner.stop();
|
|
44
|
+
// Return table of fields
|
|
45
|
+
ux.table(result.records, {
|
|
46
|
+
createdDate: {
|
|
47
|
+
header: 'Date',
|
|
48
|
+
get: (row) => row.CreatedDate,
|
|
49
|
+
},
|
|
50
|
+
createdBy: {
|
|
51
|
+
header: 'Username',
|
|
52
|
+
get: (row) => { var _a; return (_a = row.CreatedBy) === null || _a === void 0 ? void 0 : _a.Username; },
|
|
53
|
+
},
|
|
54
|
+
section: {
|
|
55
|
+
header: 'Type',
|
|
56
|
+
get: (row) => row.Section,
|
|
57
|
+
},
|
|
58
|
+
display: {
|
|
59
|
+
header: 'Action',
|
|
60
|
+
get: (row) => row.Display,
|
|
61
|
+
},
|
|
62
|
+
delegateUser: {
|
|
63
|
+
header: 'Delegate User',
|
|
64
|
+
get: (row) => row.DelegateUser,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
return result;
|
|
58
68
|
});
|
|
59
|
-
return result;
|
|
60
69
|
}
|
|
61
70
|
}
|
|
62
71
|
AuditDisplay.summary = messages.getMessage('summary');
|
|
63
72
|
AuditDisplay.description = messages.getMessage('description');
|
|
64
73
|
AuditDisplay.examples = messages.getMessages('examples');
|
|
65
74
|
AuditDisplay.flags = {
|
|
66
|
-
'target-org':
|
|
75
|
+
'target-org': Flags.requiredOrg({
|
|
67
76
|
summary: messages.getMessage('flags.target-org.summary'),
|
|
68
77
|
char: 'o',
|
|
69
78
|
required: true,
|
|
70
79
|
}),
|
|
71
|
-
username:
|
|
80
|
+
username: Flags.string({
|
|
72
81
|
summary: messages.getMessage('flags.username.summary'),
|
|
73
82
|
char: 'u',
|
|
74
83
|
}),
|
|
75
|
-
limit:
|
|
84
|
+
limit: Flags.integer({
|
|
76
85
|
summary: messages.getMessage('flags.limit.summary'),
|
|
77
86
|
char: 'l',
|
|
78
87
|
min: 1,
|
|
@@ -80,5 +89,5 @@ AuditDisplay.flags = {
|
|
|
80
89
|
default: 20,
|
|
81
90
|
}),
|
|
82
91
|
};
|
|
83
|
-
|
|
92
|
+
export default AuditDisplay;
|
|
84
93
|
//# sourceMappingURL=display.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/raven/audit/display.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/raven/audit/display.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5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KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;QACnB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACnD,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,EAAE;KACZ,CAAC;CACH,CAAC;eAtBiB,YAAY"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type DeployCancelResult = {
|
|
3
|
+
cancelled: boolean;
|
|
4
|
+
jobId?: string;
|
|
5
|
+
targetOrg?: string;
|
|
6
|
+
};
|
|
7
|
+
export default class DeployCancel extends SfCommand<DeployCancelResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<DeployCancelResult>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { spawn } from 'node:child_process';
|
|
11
|
+
import select, { Separator } from '@inquirer/select';
|
|
12
|
+
import { Messages } from '@salesforce/core';
|
|
13
|
+
import { Flags, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
14
|
+
import dayjs from 'dayjs';
|
|
15
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
16
|
+
const messages = Messages.loadMessages('sf-raven', 'raven.deploy.cancel');
|
|
17
|
+
const cancelSelection = 'cancel';
|
|
18
|
+
class DeployCancel extends SfCommand {
|
|
19
|
+
run() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const { flags } = yield this.parse(DeployCancel);
|
|
22
|
+
const ux = new Ux({ jsonEnabled: this.jsonEnabled() });
|
|
23
|
+
const org = flags['target-org'];
|
|
24
|
+
if (org == null) {
|
|
25
|
+
throw messages.createError('error.noTargetOrg');
|
|
26
|
+
}
|
|
27
|
+
const targetOrg = org.getUsername();
|
|
28
|
+
if (targetOrg == null) {
|
|
29
|
+
throw messages.createError('error.noTargetOrg');
|
|
30
|
+
}
|
|
31
|
+
ux.spinner.start(messages.getMessage('info.loadingDeploys'));
|
|
32
|
+
let deployRequests;
|
|
33
|
+
try {
|
|
34
|
+
deployRequests = yield getActiveDeployRequests(org.getConnection());
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
ux.spinner.stop();
|
|
38
|
+
}
|
|
39
|
+
if (deployRequests.length === 0) {
|
|
40
|
+
ux.log(messages.getMessage('info.noDeploys'));
|
|
41
|
+
return {
|
|
42
|
+
cancelled: false,
|
|
43
|
+
targetOrg,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const selectedDeployRequest = yield selectDeployRequest(deployRequests);
|
|
47
|
+
if (selectedDeployRequest === cancelSelection || selectedDeployRequest == null) {
|
|
48
|
+
ux.log(messages.getMessage('info.noSelection'));
|
|
49
|
+
return {
|
|
50
|
+
cancelled: false,
|
|
51
|
+
targetOrg,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const confirmed = yield this.confirm({
|
|
55
|
+
message: messages.getMessage('prompt.confirmCancel', [selectedDeployRequest.Id]),
|
|
56
|
+
defaultAnswer: false,
|
|
57
|
+
});
|
|
58
|
+
if (!confirmed) {
|
|
59
|
+
ux.log(messages.getMessage('info.cancelAborted'));
|
|
60
|
+
return {
|
|
61
|
+
cancelled: false,
|
|
62
|
+
jobId: selectedDeployRequest.Id,
|
|
63
|
+
targetOrg,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const exitCode = yield cancelDeploy(selectedDeployRequest.Id, targetOrg);
|
|
67
|
+
if (exitCode !== 0) {
|
|
68
|
+
throw messages.createError('error.cancelFailed', [exitCode.toString()]);
|
|
69
|
+
}
|
|
70
|
+
ux.log(messages.getMessage('info.cancelSubmitted', [selectedDeployRequest.Id]));
|
|
71
|
+
return {
|
|
72
|
+
cancelled: true,
|
|
73
|
+
jobId: selectedDeployRequest.Id,
|
|
74
|
+
targetOrg,
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
DeployCancel.summary = messages.getMessage('summary');
|
|
80
|
+
DeployCancel.description = messages.getMessage('description');
|
|
81
|
+
DeployCancel.examples = messages.getMessages('examples');
|
|
82
|
+
DeployCancel.flags = {
|
|
83
|
+
'target-org': Flags.optionalOrg({
|
|
84
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
85
|
+
char: 'o',
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
export default DeployCancel;
|
|
89
|
+
const getActiveDeployRequests = (connection) => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
|
+
const result = yield connection.tooling.query(`
|
|
91
|
+
SELECT Id, Status, StartDate,
|
|
92
|
+
NumberComponentsDeployed, NumberComponentsTotal, NumberComponentErrors,
|
|
93
|
+
NumberTestsCompleted, NumberTestsTotal, NumberTestErrors
|
|
94
|
+
FROM DeployRequest
|
|
95
|
+
WHERE Status IN ('InProgress', 'Pending')
|
|
96
|
+
ORDER BY StartDate DESC
|
|
97
|
+
`);
|
|
98
|
+
return result.records;
|
|
99
|
+
});
|
|
100
|
+
const formatDeployRequest = (deployRequest) => {
|
|
101
|
+
if (deployRequest.Status === 'Pending') {
|
|
102
|
+
return [deployRequest.Status, deployRequest.Id].join(' | ');
|
|
103
|
+
}
|
|
104
|
+
const startDate = deployRequest.StartDate == null ? messages.getMessage('label.unknownStartDate') : dayjs(deployRequest.StartDate).format('DD/MM/YYYY HH:mm');
|
|
105
|
+
return [
|
|
106
|
+
startDate,
|
|
107
|
+
deployRequest.Status,
|
|
108
|
+
deployRequest.Id,
|
|
109
|
+
`Metadata: ${formatProgress(deployRequest.NumberComponentsDeployed, deployRequest.NumberComponentsTotal, deployRequest.NumberComponentErrors)}`,
|
|
110
|
+
`Apex Tests: ${formatProgress(deployRequest.NumberTestsCompleted, deployRequest.NumberTestsTotal, deployRequest.NumberTestErrors)}`,
|
|
111
|
+
].join(' | ');
|
|
112
|
+
};
|
|
113
|
+
const selectDeployRequest = (deployRequests) => __awaiter(void 0, void 0, void 0, function* () {
|
|
114
|
+
try {
|
|
115
|
+
return yield select({
|
|
116
|
+
message: messages.getMessage('prompt.selectDeploy'),
|
|
117
|
+
choices: getDeployChoices(deployRequests),
|
|
118
|
+
pageSize: 10,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
if (isPromptForceCloseError(error)) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const getDeployChoices = (deployRequests) => {
|
|
129
|
+
const inProgressDeployRequests = deployRequests.filter((deployRequest) => deployRequest.Status === 'InProgress');
|
|
130
|
+
const pendingDeployRequests = deployRequests.filter((deployRequest) => deployRequest.Status === 'Pending');
|
|
131
|
+
return [
|
|
132
|
+
{ name: messages.getMessage('label.cancel'), value: cancelSelection },
|
|
133
|
+
new Separator(),
|
|
134
|
+
...getGroupedDeployChoices(messages.getMessage('label.inProgress'), inProgressDeployRequests),
|
|
135
|
+
...getGroupedDeployChoices(messages.getMessage('label.pending'), pendingDeployRequests),
|
|
136
|
+
];
|
|
137
|
+
};
|
|
138
|
+
const getGroupedDeployChoices = (label, deployRequests) => deployRequests.length === 0
|
|
139
|
+
? []
|
|
140
|
+
: [
|
|
141
|
+
new Separator(label),
|
|
142
|
+
...deployRequests.map((deployRequest) => ({
|
|
143
|
+
name: formatDeployRequest(deployRequest),
|
|
144
|
+
value: deployRequest,
|
|
145
|
+
})),
|
|
146
|
+
];
|
|
147
|
+
const isPromptForceCloseError = (error) => error instanceof Error && error.message.includes('User force closed the prompt');
|
|
148
|
+
const formatProgress = (completed, total, errors) => {
|
|
149
|
+
const completedValue = completed !== null && completed !== void 0 ? completed : 0;
|
|
150
|
+
const totalValue = total !== null && total !== void 0 ? total : 0;
|
|
151
|
+
const errorValue = errors !== null && errors !== void 0 ? errors : 0;
|
|
152
|
+
const percentage = totalValue > 0 ? Math.floor((completedValue / totalValue) * 100) : 0;
|
|
153
|
+
return `${completedValue}/${totalValue} (${percentage}% - ${errorValue} errors)`;
|
|
154
|
+
};
|
|
155
|
+
const cancelDeploy = (jobId, targetOrg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
156
|
+
var _a;
|
|
157
|
+
const result = yield runChildProcess((_a = process.env.SF_BINPATH) !== null && _a !== void 0 ? _a : 'sf', [
|
|
158
|
+
'project',
|
|
159
|
+
'deploy',
|
|
160
|
+
'cancel',
|
|
161
|
+
'--job-id',
|
|
162
|
+
jobId,
|
|
163
|
+
'--target-org',
|
|
164
|
+
targetOrg,
|
|
165
|
+
'--async',
|
|
166
|
+
]);
|
|
167
|
+
return result.exitCode;
|
|
168
|
+
});
|
|
169
|
+
const runChildProcess = (command, args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
170
|
+
return new Promise((resolve, reject) => {
|
|
171
|
+
const childProcess = spawn(command, args, {
|
|
172
|
+
stdio: 'inherit',
|
|
173
|
+
env: process.env,
|
|
174
|
+
});
|
|
175
|
+
childProcess.on('error', (error) => {
|
|
176
|
+
reject(error);
|
|
177
|
+
});
|
|
178
|
+
childProcess.on('close', (code) => {
|
|
179
|
+
resolve({
|
|
180
|
+
exitCode: code !== null && code !== void 0 ? code : 0,
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
//# sourceMappingURL=cancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../src/commands/raven/deploy/cancel.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;AAkC1E,MAAM,eAAe,GAAG,QAAiB,CAAC;AAK1C,MAAqB,YAAa,SAAQ,SAA6B;IAYxD,GAAG;;YACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACjD,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YACvD,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;YAEhC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;gBAChB,MAAM,QAAQ,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;YAClD,CAAC;YAED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,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC;aACpB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAA;EAAA,CAAC"}
|
|
@@ -7,10 +7,10 @@ export default class EventSubscribe extends SfCommand<EventSubscribeResult> {
|
|
|
7
7
|
static readonly description: string;
|
|
8
8
|
static readonly examples: string[];
|
|
9
9
|
static readonly flags: {
|
|
10
|
-
'target-org': import("@oclif/core/
|
|
11
|
-
event: import("@oclif/core/
|
|
12
|
-
replayid: import("@oclif/core/
|
|
13
|
-
timeout: import("@oclif/core/
|
|
10
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
event: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
replayid: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
};
|
|
15
15
|
run(): Promise<EventSubscribeResult>;
|
|
16
16
|
}
|