@salesforce/plugin-data 3.10.0 → 3.11.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 +70 -24
- package/lib/bulkIngest.js +16 -18
- package/lib/bulkIngest.js.map +1 -1
- package/lib/bulkOperationBase.js +3 -0
- package/lib/bulkOperationBase.js.map +1 -1
- package/lib/commands/data/bulk/results.js +120 -0
- package/lib/commands/data/bulk/results.js.map +1 -0
- package/messages/bulkIngest.md +9 -6
- package/messages/data.bulk.results.md +41 -0
- package/oclif.manifest.json +84 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -76,6 +76,7 @@ sf plugins
|
|
|
76
76
|
|
|
77
77
|
<!-- commands -->
|
|
78
78
|
|
|
79
|
+
- [`sf data bulk results`](#sf-data-bulk-results)
|
|
79
80
|
- [`sf data create file`](#sf-data-create-file)
|
|
80
81
|
- [`sf data create record`](#sf-data-create-record)
|
|
81
82
|
- [`sf data delete bulk`](#sf-data-delete-bulk)
|
|
@@ -101,6 +102,51 @@ sf plugins
|
|
|
101
102
|
- [`sf force data bulk status`](#sf-force-data-bulk-status)
|
|
102
103
|
- [`sf force data bulk upsert`](#sf-force-data-bulk-upsert)
|
|
103
104
|
|
|
105
|
+
## `sf data bulk results`
|
|
106
|
+
|
|
107
|
+
Get the results of a bulk ingest job that you previously ran.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
USAGE
|
|
111
|
+
$ sf data bulk results -i <value> -o <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
112
|
+
|
|
113
|
+
FLAGS
|
|
114
|
+
-i, --job-id=<value> (required) Job ID of the bulk job.
|
|
115
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
116
|
+
configuration variable is already set.
|
|
117
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
118
|
+
|
|
119
|
+
GLOBAL FLAGS
|
|
120
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
121
|
+
--json Format output as json.
|
|
122
|
+
|
|
123
|
+
DESCRIPTION
|
|
124
|
+
Get the results of a bulk ingest job that you previously ran.
|
|
125
|
+
|
|
126
|
+
Use this command to get the complete results after running one of the CLI commands that uses Bulk API 2.0 to ingest
|
|
127
|
+
(import, update, upsert, or delete) large datasets to your org, such as "data import bulk". The previously-run bulk
|
|
128
|
+
command must have completed; if it's still processing, run the corresponding resume command first, such as "data
|
|
129
|
+
import resume." Make note of the job ID of the previous bulk command because you use it to run this command.
|
|
130
|
+
|
|
131
|
+
You can also use this command to get results from running a bulk ingest job with a different tool, such as Data
|
|
132
|
+
Loader, as long as you have the job ID. For information on Data Loader, see
|
|
133
|
+
https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader_intro.htm.
|
|
134
|
+
|
|
135
|
+
This command first displays the status of the previous bulk job, the operation that was executed in the org (such as
|
|
136
|
+
insert or hard delete), and the updated Salesforce object. The command then displays how many records were processed
|
|
137
|
+
in total, and how many were successful or failed. Finally, the output displays the names of the generated
|
|
138
|
+
CSV-formatted files that contain the specific results for each ingested record. Depending on the success or failure of
|
|
139
|
+
the bulk command, the results files can include the IDs of inserted records or the specific errors. When possible, if
|
|
140
|
+
the ingest job failed or was aborted, you also get a CSV file with the unprocessed results.
|
|
141
|
+
|
|
142
|
+
EXAMPLES
|
|
143
|
+
Get results from a bulk ingest job; use the org with alias "my-scratch":
|
|
144
|
+
|
|
145
|
+
$ sf data bulk results --job-id 7507i000fake341G --target-org my-scratch
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
_See code: [src/commands/data/bulk/results.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/bulk/results.ts)_
|
|
149
|
+
|
|
104
150
|
## `sf data create file`
|
|
105
151
|
|
|
106
152
|
Upload a local file to an org.
|
|
@@ -148,7 +194,7 @@ EXAMPLES
|
|
|
148
194
|
$ sf data create file --file path/to/astro.png --parent-id a03fakeLoJWPIA3
|
|
149
195
|
```
|
|
150
196
|
|
|
151
|
-
_See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
197
|
+
_See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/create/file.ts)_
|
|
152
198
|
|
|
153
199
|
## `sf data create record`
|
|
154
200
|
|
|
@@ -204,7 +250,7 @@ EXAMPLES
|
|
|
204
250
|
TracedEntityId=01p17000000R6bLAAS"
|
|
205
251
|
```
|
|
206
252
|
|
|
207
|
-
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
253
|
+
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/create/record.ts)_
|
|
208
254
|
|
|
209
255
|
## `sf data delete bulk`
|
|
210
256
|
|
|
@@ -262,7 +308,7 @@ FLAG DESCRIPTIONS
|
|
|
262
308
|
and can be enabled only by a system administrator.
|
|
263
309
|
```
|
|
264
310
|
|
|
265
|
-
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
311
|
+
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/delete/bulk.ts)_
|
|
266
312
|
|
|
267
313
|
## `sf data delete record`
|
|
268
314
|
|
|
@@ -323,7 +369,7 @@ EXAMPLES
|
|
|
323
369
|
$ sf data delete record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
324
370
|
```
|
|
325
371
|
|
|
326
|
-
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
372
|
+
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/delete/record.ts)_
|
|
327
373
|
|
|
328
374
|
## `sf data delete resume`
|
|
329
375
|
|
|
@@ -362,7 +408,7 @@ EXAMPLES
|
|
|
362
408
|
$ sf data delete resume --use-most-recent --target-org my-scratch
|
|
363
409
|
```
|
|
364
410
|
|
|
365
|
-
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
411
|
+
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/delete/resume.ts)_
|
|
366
412
|
|
|
367
413
|
## `sf data export bulk`
|
|
368
414
|
|
|
@@ -436,7 +482,7 @@ EXAMPLES
|
|
|
436
482
|
--result-format json --async
|
|
437
483
|
```
|
|
438
484
|
|
|
439
|
-
_See code: [src/commands/data/export/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
485
|
+
_See code: [src/commands/data/export/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/export/bulk.ts)_
|
|
440
486
|
|
|
441
487
|
## `sf data export resume`
|
|
442
488
|
|
|
@@ -472,7 +518,7 @@ EXAMPLES
|
|
|
472
518
|
$ sf data export resume --use-most-recent --target-org my-scratch
|
|
473
519
|
```
|
|
474
520
|
|
|
475
|
-
_See code: [src/commands/data/export/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
521
|
+
_See code: [src/commands/data/export/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/export/resume.ts)_
|
|
476
522
|
|
|
477
523
|
## `sf data export tree`
|
|
478
524
|
|
|
@@ -533,7 +579,7 @@ EXAMPLES
|
|
|
533
579
|
my-scratch
|
|
534
580
|
```
|
|
535
581
|
|
|
536
|
-
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
582
|
+
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/export/tree.ts)_
|
|
537
583
|
|
|
538
584
|
## `sf data get record`
|
|
539
585
|
|
|
@@ -597,7 +643,7 @@ EXAMPLES
|
|
|
597
643
|
$ sf data get record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
598
644
|
```
|
|
599
645
|
|
|
600
|
-
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
646
|
+
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/get/record.ts)_
|
|
601
647
|
|
|
602
648
|
## `sf data import bulk`
|
|
603
649
|
|
|
@@ -655,7 +701,7 @@ EXAMPLES
|
|
|
655
701
|
$ sf data import bulk --file accounts.csv --sobject Account --async
|
|
656
702
|
```
|
|
657
703
|
|
|
658
|
-
_See code: [src/commands/data/import/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
704
|
+
_See code: [src/commands/data/import/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/import/bulk.ts)_
|
|
659
705
|
|
|
660
706
|
## `sf data import resume`
|
|
661
707
|
|
|
@@ -691,7 +737,7 @@ EXAMPLES
|
|
|
691
737
|
$ sf data import resume --use-most-recent --target-org my-scratch
|
|
692
738
|
```
|
|
693
739
|
|
|
694
|
-
_See code: [src/commands/data/import/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
740
|
+
_See code: [src/commands/data/import/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/import/resume.ts)_
|
|
695
741
|
|
|
696
742
|
## `sf data import tree`
|
|
697
743
|
|
|
@@ -756,7 +802,7 @@ FLAG DESCRIPTIONS
|
|
|
756
802
|
- files(array) - Files: An array of files paths to load
|
|
757
803
|
```
|
|
758
804
|
|
|
759
|
-
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
805
|
+
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/import/tree.ts)_
|
|
760
806
|
|
|
761
807
|
## `sf data query`
|
|
762
808
|
|
|
@@ -820,7 +866,7 @@ EXAMPLES
|
|
|
820
866
|
$ sf data query --query "SELECT Id FROM Contact" --bulk --wait 0
|
|
821
867
|
```
|
|
822
868
|
|
|
823
|
-
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
869
|
+
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/query.ts)_
|
|
824
870
|
|
|
825
871
|
## `sf data query resume`
|
|
826
872
|
|
|
@@ -858,7 +904,7 @@ EXAMPLES
|
|
|
858
904
|
$ sf data query resume --bulk-query-id 7500x000005BdFzXXX
|
|
859
905
|
```
|
|
860
906
|
|
|
861
|
-
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
907
|
+
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/query/resume.ts)_
|
|
862
908
|
|
|
863
909
|
## `sf data resume`
|
|
864
910
|
|
|
@@ -895,7 +941,7 @@ EXAMPLES
|
|
|
895
941
|
$ sf data resume --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA
|
|
896
942
|
```
|
|
897
943
|
|
|
898
|
-
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
944
|
+
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/resume.ts)_
|
|
899
945
|
|
|
900
946
|
## `sf data search`
|
|
901
947
|
|
|
@@ -945,7 +991,7 @@ EXAMPLES
|
|
|
945
991
|
$ sf data search --file query.txt --target-org my-scratch --result-format csv
|
|
946
992
|
```
|
|
947
993
|
|
|
948
|
-
_See code: [src/commands/data/search.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
994
|
+
_See code: [src/commands/data/search.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/search.ts)_
|
|
949
995
|
|
|
950
996
|
## `sf data update bulk`
|
|
951
997
|
|
|
@@ -1006,7 +1052,7 @@ EXAMPLES
|
|
|
1006
1052
|
$ sf data update bulk --file accounts.csv --sobject Account --async
|
|
1007
1053
|
```
|
|
1008
1054
|
|
|
1009
|
-
_See code: [src/commands/data/update/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1055
|
+
_See code: [src/commands/data/update/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/update/bulk.ts)_
|
|
1010
1056
|
|
|
1011
1057
|
## `sf data update record`
|
|
1012
1058
|
|
|
@@ -1068,7 +1114,7 @@ EXAMPLES
|
|
|
1068
1114
|
"ExpirationDate=2017-12-01T00:58:04.000+0000"
|
|
1069
1115
|
```
|
|
1070
1116
|
|
|
1071
|
-
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1117
|
+
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/update/record.ts)_
|
|
1072
1118
|
|
|
1073
1119
|
## `sf data update resume`
|
|
1074
1120
|
|
|
@@ -1104,7 +1150,7 @@ EXAMPLES
|
|
|
1104
1150
|
$ sf data update resume --use-most-recent --target-org my-scratch
|
|
1105
1151
|
```
|
|
1106
1152
|
|
|
1107
|
-
_See code: [src/commands/data/update/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1153
|
+
_See code: [src/commands/data/update/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/update/resume.ts)_
|
|
1108
1154
|
|
|
1109
1155
|
## `sf data upsert bulk`
|
|
1110
1156
|
|
|
@@ -1157,7 +1203,7 @@ EXAMPLES
|
|
|
1157
1203
|
my-scratch
|
|
1158
1204
|
```
|
|
1159
1205
|
|
|
1160
|
-
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1206
|
+
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/upsert/bulk.ts)_
|
|
1161
1207
|
|
|
1162
1208
|
## `sf data upsert resume`
|
|
1163
1209
|
|
|
@@ -1196,7 +1242,7 @@ EXAMPLES
|
|
|
1196
1242
|
$ sf data upsert resume --use-most-recent --target-org my-scratch
|
|
1197
1243
|
```
|
|
1198
1244
|
|
|
1199
|
-
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1245
|
+
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/data/upsert/resume.ts)_
|
|
1200
1246
|
|
|
1201
1247
|
## `sf force data bulk delete`
|
|
1202
1248
|
|
|
@@ -1243,7 +1289,7 @@ EXAMPLES
|
|
|
1243
1289
|
$ sf force data bulk delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
1244
1290
|
```
|
|
1245
1291
|
|
|
1246
|
-
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1292
|
+
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/force/data/bulk/delete.ts)_
|
|
1247
1293
|
|
|
1248
1294
|
## `sf force data bulk status`
|
|
1249
1295
|
|
|
@@ -1280,7 +1326,7 @@ EXAMPLES
|
|
|
1280
1326
|
$ sf force data bulk status --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA --target-org my-scratch
|
|
1281
1327
|
```
|
|
1282
1328
|
|
|
1283
|
-
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1329
|
+
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/force/data/bulk/status.ts)_
|
|
1284
1330
|
|
|
1285
1331
|
## `sf force data bulk upsert`
|
|
1286
1332
|
|
|
@@ -1338,6 +1384,6 @@ EXAMPLES
|
|
|
1338
1384
|
--target-org my-scratch
|
|
1339
1385
|
```
|
|
1340
1386
|
|
|
1341
|
-
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/3.
|
|
1387
|
+
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/3.11.0/src/commands/force/data/bulk/upsert.ts)_
|
|
1342
1388
|
|
|
1343
1389
|
<!-- commandsstop -->
|
package/lib/bulkIngest.js
CHANGED
|
@@ -65,12 +65,10 @@ export async function bulkIngest(opts) {
|
|
|
65
65
|
stages.update(jobInfo);
|
|
66
66
|
if (jobInfo.numberRecordsFailed) {
|
|
67
67
|
stages.error();
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
job.id,
|
|
73
|
-
]);
|
|
68
|
+
throw messages.createError('error.failedRecordDetails', [jobInfo.numberRecordsFailed],
|
|
69
|
+
// remove after W-17099874 gets fixed
|
|
70
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
71
|
+
[conn.getUsername(), job.id]);
|
|
74
72
|
}
|
|
75
73
|
stages.stop();
|
|
76
74
|
return {
|
|
@@ -90,12 +88,13 @@ export async function bulkIngest(opts) {
|
|
|
90
88
|
}
|
|
91
89
|
if (jobInfo.state === 'Failed') {
|
|
92
90
|
stages.error();
|
|
93
|
-
|
|
91
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
92
|
+
throw messages.createError('error.jobFailed', [jobInfo.errorMessage], [conn.getUsername(), job.id]);
|
|
94
93
|
}
|
|
95
94
|
if (jobInfo.state === 'Aborted') {
|
|
96
95
|
stages.stop('aborted');
|
|
97
|
-
//
|
|
98
|
-
throw messages.createError('error.jobAborted', [conn.getUsername(), job.id]
|
|
96
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
97
|
+
throw messages.createError('error.jobAborted', [], [conn.getUsername(), job.id]);
|
|
99
98
|
}
|
|
100
99
|
throw err;
|
|
101
100
|
}
|
|
@@ -128,12 +127,9 @@ export async function bulkIngestResume(opts) {
|
|
|
128
127
|
stages.update(jobInfo);
|
|
129
128
|
if (jobInfo.numberRecordsFailed) {
|
|
130
129
|
stages.error();
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
conn.getUsername(),
|
|
135
|
-
job.id,
|
|
136
|
-
]);
|
|
130
|
+
throw messages.createError('error.failedRecordDetails', [jobInfo.numberRecordsFailed],
|
|
131
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
132
|
+
[conn.getUsername(), job.id]);
|
|
137
133
|
}
|
|
138
134
|
stages.stop();
|
|
139
135
|
return {
|
|
@@ -153,12 +149,14 @@ export async function bulkIngestResume(opts) {
|
|
|
153
149
|
}
|
|
154
150
|
if (jobInfo.state === 'Failed') {
|
|
155
151
|
stages.error();
|
|
156
|
-
throw messages.createError('error.jobFailed', [jobInfo.errorMessage
|
|
152
|
+
throw messages.createError('error.jobFailed', [jobInfo.errorMessage],
|
|
153
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
154
|
+
[conn.getUsername(), job.id], err);
|
|
157
155
|
}
|
|
158
156
|
if (jobInfo.state === 'Aborted') {
|
|
159
157
|
stages.stop('aborted');
|
|
160
|
-
//
|
|
161
|
-
throw messages.createError('error.jobAborted', [conn.getUsername(), job.id],
|
|
158
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
159
|
+
throw messages.createError('error.jobAborted', [], [conn.getUsername(), job.id], err);
|
|
162
160
|
}
|
|
163
161
|
throw err;
|
|
164
162
|
}
|
package/lib/bulkIngest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkIngest.js","sourceRoot":"","sources":["../src/bulkIngest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAc,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE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ase.js
CHANGED
|
@@ -47,6 +47,9 @@ export const baseFlags = {
|
|
|
47
47
|
}),
|
|
48
48
|
verbose: Flags.boolean({
|
|
49
49
|
summary: messages.getMessage('flags.verbose.summary'),
|
|
50
|
+
deprecated: {
|
|
51
|
+
message: 'The --verbose flag is deprecated and will be removed after March 2025, use "sf data bulk results" to get job results instead.',
|
|
52
|
+
},
|
|
50
53
|
}),
|
|
51
54
|
};
|
|
52
55
|
export const runBulkOperation = async ({ sobject, csvFileName, connection, wait, verbose, operation, options, cmd, }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkOperationBase.js","sourceRoot":"","sources":["../src/bulkOperationBase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,KAAK,EAAa,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAc,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EACL,MAAM,GAKP,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAwB,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEjH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAExB,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,CAAC;AAS5F,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,QAAQ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AAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;QACnG,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC;QACxD,KAAK,EAAE,kBAAkB,aAAa,CAAC,MAAM,GAAG;KACjD,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { EOL } from 'node:os';
|
|
8
|
+
import { writeFile } from 'node:fs/promises';
|
|
9
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
10
|
+
import { Messages } from '@salesforce/core';
|
|
11
|
+
import ansis from 'ansis';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-data', 'data.bulk.results');
|
|
14
|
+
export default class DataBulkResults extends SfCommand {
|
|
15
|
+
static summary = messages.getMessage('summary');
|
|
16
|
+
static description = messages.getMessage('description');
|
|
17
|
+
static examples = messages.getMessages('examples');
|
|
18
|
+
static flags = {
|
|
19
|
+
'job-id': Flags.salesforceId({
|
|
20
|
+
summary: messages.getMessage('flags.job-id.summary'),
|
|
21
|
+
char: 'i',
|
|
22
|
+
required: true,
|
|
23
|
+
startsWith: '750',
|
|
24
|
+
}),
|
|
25
|
+
'target-org': Flags.requiredOrg(),
|
|
26
|
+
'api-version': Flags.orgApiVersion(),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { flags } = await this.parse(DataBulkResults);
|
|
30
|
+
const conn = flags['target-org'].getConnection(flags['api-version']);
|
|
31
|
+
const job = conn.bulk2.job('ingest', {
|
|
32
|
+
id: flags['job-id'],
|
|
33
|
+
});
|
|
34
|
+
const jobInfo = await job.check().catch((error) => {
|
|
35
|
+
if (error.message === 'The requested resource does not exist') {
|
|
36
|
+
throw messages.createError('error.invalidId', [job.id], [conn.getUsername()]);
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
});
|
|
40
|
+
this.log(`Status: ${ansis.bold(jobInfo.state)}`);
|
|
41
|
+
this.log(`Operation: ${ansis.bold(jobInfo.operation)}`);
|
|
42
|
+
this.log(`Object: ${ansis.bold(jobInfo.object)}${EOL}`);
|
|
43
|
+
// `errorMessage` is only available for job with state = `Failed`
|
|
44
|
+
if (jobInfo.errorMessage) {
|
|
45
|
+
this.warn(`Job failed due to:${EOL}${jobInfo.errorMessage}${EOL}`);
|
|
46
|
+
}
|
|
47
|
+
if (jobInfo.numberRecordsProcessed === 0) {
|
|
48
|
+
throw messages.createError('error.noRecords');
|
|
49
|
+
}
|
|
50
|
+
this.log(`Processed records: ${ansis.bold(jobInfo.numberRecordsProcessed.toString())}`);
|
|
51
|
+
if (jobInfo.numberRecordsFailed > 0) {
|
|
52
|
+
this.log(`Failed records: ${ansis.bold(jobInfo.numberRecordsFailed.toString())}${EOL}`);
|
|
53
|
+
if (jobInfo.state === 'JobComplete') {
|
|
54
|
+
// we can only calculate successful records if the job was completed.
|
|
55
|
+
//
|
|
56
|
+
// aborted/failed jobs could have:
|
|
57
|
+
// numberRecordsProcessed = 100
|
|
58
|
+
// numberRecordsFailed = 10
|
|
59
|
+
//
|
|
60
|
+
// those 90 can be either successful or unprocessed records.
|
|
61
|
+
this.log(`Successful records: ${jobInfo.numberRecordsProcessed - jobInfo.numberRecordsFailed}${EOL}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else if (jobInfo.numberRecordsFailed === 0 && jobInfo.state === 'JobComplete') {
|
|
65
|
+
// Job was completed so there's no unprocessed records and with 0 record failures we can assume all proccesed records were successful
|
|
66
|
+
this.log(`Successful records: ${ansis.bold(jobInfo.numberRecordsProcessed.toString())}${EOL}`);
|
|
67
|
+
}
|
|
68
|
+
// `--job-id` can be an 15-18 length ID but the API always returns the 18-length one,
|
|
69
|
+
// prefer flag value for file paths so they match what the user passes.
|
|
70
|
+
const successFilePath = `${flags['job-id']}-success-records.csv`;
|
|
71
|
+
const failedFilePath = `${flags['job-id']}-failed-records.csv`;
|
|
72
|
+
const unprocessedFilePath = `${flags['job-id']}-unprocessed-records.csv`;
|
|
73
|
+
switch (jobInfo.state) {
|
|
74
|
+
case 'Open':
|
|
75
|
+
case 'UploadComplete':
|
|
76
|
+
case 'InProgress':
|
|
77
|
+
throw messages.createError('error.jobInProgress');
|
|
78
|
+
case 'JobComplete':
|
|
79
|
+
await writeFile(successFilePath, await job.getSuccessfulResults(true));
|
|
80
|
+
this.log(`Saved successful results to ${ansis.bold(successFilePath)}`);
|
|
81
|
+
if (jobInfo.numberRecordsFailed > 0) {
|
|
82
|
+
await writeFile(failedFilePath, await job.getFailedResults(true));
|
|
83
|
+
this.log(`Saved failed results to ${ansis.bold(failedFilePath)}`);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
processedRecords: jobInfo.numberRecordsProcessed,
|
|
87
|
+
successfulRecords: jobInfo.numberRecordsFailed === 0
|
|
88
|
+
? jobInfo.numberRecordsProcessed
|
|
89
|
+
: jobInfo.numberRecordsProcessed - jobInfo.numberRecordsFailed,
|
|
90
|
+
failedRecords: jobInfo.numberRecordsFailed,
|
|
91
|
+
status: jobInfo.state,
|
|
92
|
+
operation: jobInfo.operation,
|
|
93
|
+
object: jobInfo.object,
|
|
94
|
+
successFilePath,
|
|
95
|
+
failedFilePath: jobInfo.numberRecordsFailed > 0 ? failedFilePath : undefined,
|
|
96
|
+
};
|
|
97
|
+
case 'Aborted':
|
|
98
|
+
case 'Failed':
|
|
99
|
+
await writeFile(successFilePath, await job.getSuccessfulResults(true));
|
|
100
|
+
this.log(`Saved successful results to ${ansis.bold(successFilePath)}`);
|
|
101
|
+
if (jobInfo.numberRecordsFailed > 0) {
|
|
102
|
+
await writeFile(failedFilePath, await job.getFailedResults(true));
|
|
103
|
+
this.log(`Saved failed results to ${ansis.bold(failedFilePath)}`);
|
|
104
|
+
}
|
|
105
|
+
await writeFile(unprocessedFilePath, await job.getUnprocessedRecords(true));
|
|
106
|
+
this.log(`Saved unprocessed results to ${ansis.bold(unprocessedFilePath)}`);
|
|
107
|
+
return {
|
|
108
|
+
processedRecords: jobInfo.numberRecordsProcessed,
|
|
109
|
+
failedRecords: jobInfo.numberRecordsFailed,
|
|
110
|
+
status: jobInfo.state,
|
|
111
|
+
operation: jobInfo.operation,
|
|
112
|
+
object: jobInfo.object,
|
|
113
|
+
successFilePath,
|
|
114
|
+
failedFilePath: jobInfo.numberRecordsFailed > 0 ? failedFilePath : undefined,
|
|
115
|
+
unprocessedFilePath,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=results.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"results.js","sourceRoot":"","sources":["../../../../src/commands/data/bulk/results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;AAcvF,MAAM,CAAC,OAAO,OAAO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B,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,eAAe;oBACf,cAAc,EAAE,OAAO,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;oBAC5E,mBAAmB;iBACpB,CAAC;QACN,CAAC;IACH,CAAC"}
|
package/messages/bulkIngest.md
CHANGED
|
@@ -12,9 +12,10 @@ Run "sf %s --job-id %s" to resume it.
|
|
|
12
12
|
|
|
13
13
|
Job finished being processed but failed to process %s records.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
# error.failedRecordDetails.actions
|
|
16
16
|
|
|
17
|
-
sf
|
|
17
|
+
- Get the job results by running: "sf data bulk results -o %s --job-id %s".
|
|
18
|
+
- View the job in the org: "sf org open -o %s --path '/lightning/setup/AsyncApiJobStatus/page?address=%2F%s'".
|
|
18
19
|
|
|
19
20
|
# error.jobFailed
|
|
20
21
|
|
|
@@ -22,17 +23,19 @@ Job failed to be processed due to:
|
|
|
22
23
|
|
|
23
24
|
%s
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
# error.jobFailed.actions
|
|
26
27
|
|
|
27
|
-
sf
|
|
28
|
+
- Get the job results by running: "sf data bulk results -o %s --job-id %s".
|
|
29
|
+
- View the job in the org: "sf org open -o %s --path '/lightning/setup/AsyncApiJobStatus/page?address=%2F%s'".
|
|
28
30
|
|
|
29
31
|
# error.jobAborted
|
|
30
32
|
|
|
31
33
|
Job has been aborted.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
# error.jobAborted.actions
|
|
34
36
|
|
|
35
|
-
sf
|
|
37
|
+
- Get the job results by running: "sf data bulk results -o %s --job-id %s".
|
|
38
|
+
- View the job in the org: "sf org open -o %s --path '/lightning/setup/AsyncApiJobStatus/page?address=%2F%s'".
|
|
36
39
|
|
|
37
40
|
# flags.column-delimiter.summary
|
|
38
41
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Get the results of a bulk ingest job that you previously ran.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Use this command to get the complete results after running one of the CLI commands that uses Bulk API 2.0 to ingest (import, update, upsert, or delete) large datasets to your org, such as "data import bulk". The previously-run bulk command must have completed; if it's still processing, run the corresponding resume command first, such as "data import resume." Make note of the job ID of the previous bulk command because you use it to run this command.
|
|
8
|
+
|
|
9
|
+
You can also use this command to get results from running a bulk ingest job with a different tool, such as Data Loader, as long as you have the job ID. For information on Data Loader, see https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader_intro.htm.
|
|
10
|
+
|
|
11
|
+
This command first displays the status of the previous bulk job, the operation that was executed in the org (such as insert or hard delete), and the updated Salesforce object. The command then displays how many records were processed in total, and how many were successful or failed. Finally, the output displays the names of the generated CSV-formatted files that contain the specific results for each ingested record. Depending on the success or failure of the bulk command, the results files can include the IDs of inserted records or the specific errors. When possible, if the ingest job failed or was aborted, you also get a CSV file with the unprocessed results.
|
|
12
|
+
|
|
13
|
+
# flags.job-id.summary
|
|
14
|
+
|
|
15
|
+
Job ID of the bulk job.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Get results from a bulk ingest job; use the org with alias "my-scratch":
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --job-id 7507i000fake341G --target-org my-scratch
|
|
22
|
+
|
|
23
|
+
# error.jobInProgress
|
|
24
|
+
|
|
25
|
+
Job hasn't finished being processed yet.
|
|
26
|
+
|
|
27
|
+
# error.invalidId
|
|
28
|
+
|
|
29
|
+
Can't find a bulk job with ID %s.
|
|
30
|
+
|
|
31
|
+
# error.invalidId.actions
|
|
32
|
+
|
|
33
|
+
- Ensure the ID is from a previously run bulk ingest job, and not a query job.
|
|
34
|
+
|
|
35
|
+
- Run this command and verify that the job ID for the bulk command exists in your org:
|
|
36
|
+
|
|
37
|
+
sf org open --target-org %s --path "/lightning/setup/AsyncApiJobStatus/page?address=%2F750"
|
|
38
|
+
|
|
39
|
+
# error.noRecords
|
|
40
|
+
|
|
41
|
+
Unable to get results because the job processed 0 records.
|
package/oclif.manifest.json
CHANGED
|
@@ -424,6 +424,83 @@
|
|
|
424
424
|
"search:data"
|
|
425
425
|
]
|
|
426
426
|
},
|
|
427
|
+
"data:bulk:results": {
|
|
428
|
+
"aliases": [],
|
|
429
|
+
"args": {},
|
|
430
|
+
"description": "Use this command to get the complete results after running one of the CLI commands that uses Bulk API 2.0 to ingest (import, update, upsert, or delete) large datasets to your org, such as \"data import bulk\". The previously-run bulk command must have completed; if it's still processing, run the corresponding resume command first, such as \"data import resume.\" Make note of the job ID of the previous bulk command because you use it to run this command. \n\nYou can also use this command to get results from running a bulk ingest job with a different tool, such as Data Loader, as long as you have the job ID. For information on Data Loader, see https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader_intro.htm. \n\nThis command first displays the status of the previous bulk job, the operation that was executed in the org (such as insert or hard delete), and the updated Salesforce object. The command then displays how many records were processed in total, and how many were successful or failed. Finally, the output displays the names of the generated CSV-formatted files that contain the specific results for each ingested record. Depending on the success or failure of the bulk command, the results files can include the IDs of inserted records or the specific errors. When possible, if the ingest job failed or was aborted, you also get a CSV file with the unprocessed results.",
|
|
431
|
+
"examples": [
|
|
432
|
+
"Get results from a bulk ingest job; use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --job-id 7507i000fake341G --target-org my-scratch"
|
|
433
|
+
],
|
|
434
|
+
"flags": {
|
|
435
|
+
"json": {
|
|
436
|
+
"description": "Format output as json.",
|
|
437
|
+
"helpGroup": "GLOBAL",
|
|
438
|
+
"name": "json",
|
|
439
|
+
"allowNo": false,
|
|
440
|
+
"type": "boolean"
|
|
441
|
+
},
|
|
442
|
+
"flags-dir": {
|
|
443
|
+
"helpGroup": "GLOBAL",
|
|
444
|
+
"name": "flags-dir",
|
|
445
|
+
"summary": "Import flag values from a directory.",
|
|
446
|
+
"hasDynamicHelp": false,
|
|
447
|
+
"multiple": false,
|
|
448
|
+
"type": "option"
|
|
449
|
+
},
|
|
450
|
+
"job-id": {
|
|
451
|
+
"char": "i",
|
|
452
|
+
"name": "job-id",
|
|
453
|
+
"required": true,
|
|
454
|
+
"summary": "Job ID of the bulk job.",
|
|
455
|
+
"hasDynamicHelp": false,
|
|
456
|
+
"multiple": false,
|
|
457
|
+
"type": "option"
|
|
458
|
+
},
|
|
459
|
+
"target-org": {
|
|
460
|
+
"char": "o",
|
|
461
|
+
"name": "target-org",
|
|
462
|
+
"noCacheDefault": true,
|
|
463
|
+
"required": true,
|
|
464
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
465
|
+
"hasDynamicHelp": true,
|
|
466
|
+
"multiple": false,
|
|
467
|
+
"type": "option"
|
|
468
|
+
},
|
|
469
|
+
"api-version": {
|
|
470
|
+
"description": "Override the api version used for api requests made by this command",
|
|
471
|
+
"name": "api-version",
|
|
472
|
+
"hasDynamicHelp": false,
|
|
473
|
+
"multiple": false,
|
|
474
|
+
"type": "option"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"hasDynamicHelp": true,
|
|
478
|
+
"hiddenAliases": [],
|
|
479
|
+
"id": "data:bulk:results",
|
|
480
|
+
"pluginAlias": "@salesforce/plugin-data",
|
|
481
|
+
"pluginName": "@salesforce/plugin-data",
|
|
482
|
+
"pluginType": "core",
|
|
483
|
+
"strict": true,
|
|
484
|
+
"summary": "Get the results of a bulk ingest job that you previously ran.",
|
|
485
|
+
"enableJsonFlag": true,
|
|
486
|
+
"isESM": true,
|
|
487
|
+
"relativePath": [
|
|
488
|
+
"lib",
|
|
489
|
+
"commands",
|
|
490
|
+
"data",
|
|
491
|
+
"bulk",
|
|
492
|
+
"results.js"
|
|
493
|
+
],
|
|
494
|
+
"aliasPermutations": [],
|
|
495
|
+
"permutations": [
|
|
496
|
+
"data:bulk:results",
|
|
497
|
+
"bulk:data:results",
|
|
498
|
+
"bulk:results:data",
|
|
499
|
+
"data:results:bulk",
|
|
500
|
+
"results:data:bulk",
|
|
501
|
+
"results:bulk:data"
|
|
502
|
+
]
|
|
503
|
+
},
|
|
427
504
|
"data:create:file": {
|
|
428
505
|
"aliases": [],
|
|
429
506
|
"args": {},
|
|
@@ -790,6 +867,9 @@
|
|
|
790
867
|
"type": "boolean"
|
|
791
868
|
},
|
|
792
869
|
"verbose": {
|
|
870
|
+
"deprecated": {
|
|
871
|
+
"message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
|
|
872
|
+
},
|
|
793
873
|
"name": "verbose",
|
|
794
874
|
"summary": "Print verbose output of failed records if result is available.",
|
|
795
875
|
"allowNo": false,
|
|
@@ -2843,6 +2923,9 @@
|
|
|
2843
2923
|
"type": "boolean"
|
|
2844
2924
|
},
|
|
2845
2925
|
"verbose": {
|
|
2926
|
+
"deprecated": {
|
|
2927
|
+
"message": "The --verbose flag is deprecated and will be removed after March 2025, use \"sf data bulk results\" to get job results instead."
|
|
2928
|
+
},
|
|
2846
2929
|
"name": "verbose",
|
|
2847
2930
|
"summary": "Print verbose output of failed records if result is available.",
|
|
2848
2931
|
"allowNo": false,
|
|
@@ -3754,5 +3837,5 @@
|
|
|
3754
3837
|
]
|
|
3755
3838
|
}
|
|
3756
3839
|
},
|
|
3757
|
-
"version": "3.
|
|
3840
|
+
"version": "3.11.0"
|
|
3758
3841
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-data",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Plugin for salesforce data commands",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"homepage": "https://github.com/salesforcecli/plugin-data",
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
"prepack": "sf-prepack",
|
|
105
105
|
"prepare": "sf-install",
|
|
106
106
|
"test": "wireit",
|
|
107
|
+
"test:nuts": "nyc mocha \"./test/**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 20",
|
|
107
108
|
"test:nuts:bulk:import": "nyc mocha \"./test/commands/data/import/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 20",
|
|
108
109
|
"test:nuts:bulk:export": "nyc mocha \"./test/commands/data/export/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 20",
|
|
109
110
|
"test:nuts:bulk:update": "nyc mocha \"./test/commands/data/update/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 20",
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
"version": "oclif readme"
|
|
118
119
|
},
|
|
119
120
|
"dependencies": {
|
|
120
|
-
"@jsforce/jsforce-node": "^3.
|
|
121
|
+
"@jsforce/jsforce-node": "^3.6.0",
|
|
121
122
|
"@oclif/multi-stage-output": "^0.7.5",
|
|
122
123
|
"@salesforce/core": "^8.6.1",
|
|
123
124
|
"@salesforce/kit": "^3.2.2",
|
|
@@ -264,7 +265,7 @@
|
|
|
264
265
|
"exports": "./lib/index.js",
|
|
265
266
|
"type": "module",
|
|
266
267
|
"sfdx": {
|
|
267
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.
|
|
268
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.
|
|
268
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.11.0.crt",
|
|
269
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.11.0.sig"
|
|
269
270
|
}
|
|
270
271
|
}
|