@kitalive/sfdx-plugin 0.5.3 → 0.6.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 +58 -61
- package/lib/bulk.js +5 -9
- package/lib/bulk.js.map +1 -1
- package/lib/commands/kit/data/bulk/query.js +14 -3
- package/lib/commands/kit/data/bulk/query.js.map +1 -1
- package/lib/commands/kit/script/execute.js +8 -6
- package/lib/commands/kit/script/execute.js.map +1 -1
- package/messages/data.bulk.query.md +8 -0
- package/oclif.manifest.json +24 -87
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @kitalive/sfdx-plugin
|
|
|
17
17
|
$ sf COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ sf (--version)
|
|
20
|
-
@kitalive/sfdx-plugin/0.
|
|
20
|
+
@kitalive/sfdx-plugin/0.6.0 darwin-arm64 node-v18.16.0
|
|
21
21
|
$ sf --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ sf COMMAND
|
|
@@ -47,11 +47,12 @@ Bulk delete records by SOQL select query.
|
|
|
47
47
|
|
|
48
48
|
```
|
|
49
49
|
USAGE
|
|
50
|
-
$ sf kit data bulk delete -q <value> -o <value> [--
|
|
50
|
+
$ sf kit data bulk delete -q <value> -o <value> [--hard] [--concurrencymode <value>] [-s <value>] [-w <value>]
|
|
51
51
|
[--api-version <value>]
|
|
52
52
|
|
|
53
53
|
FLAGS
|
|
54
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
54
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
55
|
+
configuration variable is already set.
|
|
55
56
|
-q, --query=<value> (required) SOQL query to delete
|
|
56
57
|
-s, --batchsize=<value> [default: 10000] The batch size of the job
|
|
57
58
|
-w, --wait=<value> The number of minutes to wait for the command to complete before displaying the results
|
|
@@ -59,22 +60,21 @@ FLAGS
|
|
|
59
60
|
--concurrencymode=<value> [default: Parallel] The concurrency mode (Parallel or Serial) for the job
|
|
60
61
|
--hard Perform a hard delete
|
|
61
62
|
|
|
62
|
-
GLOBAL FLAGS
|
|
63
|
-
--json Format output as json.
|
|
64
|
-
|
|
65
63
|
EXAMPLES
|
|
66
64
|
Delete Opportunity records with CloseDate older than 2 years:
|
|
67
65
|
|
|
68
66
|
$ sf kit data bulk delete -q "SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:2"
|
|
69
67
|
```
|
|
70
68
|
|
|
69
|
+
_See code: [src/commands/kit/data/bulk/delete.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/bulk/delete.ts)_
|
|
70
|
+
|
|
71
71
|
## `sf kit data bulk insert`
|
|
72
72
|
|
|
73
73
|
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
USAGE
|
|
77
|
-
$ sf kit data bulk insert -s <value> -f <value> -o <value> [
|
|
77
|
+
$ sf kit data bulk insert -s <value> -f <value> -o <value> [-r <value>] [-e <value>] [-d <value>] [-q <value>]
|
|
78
78
|
[--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode <value>]
|
|
79
79
|
[--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
80
80
|
|
|
@@ -84,7 +84,8 @@ FLAGS
|
|
|
84
84
|
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
85
85
|
-f, --csvfile=<value> (required) The CSV file path that defines the records to insert
|
|
86
86
|
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
87
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
87
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
88
|
+
configuration variable is already set.
|
|
88
89
|
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
89
90
|
-r, --resultfile=<value> The CSV file path for writing the insert results
|
|
90
91
|
-s, --sobject=<value> (required) The SObject name to insert
|
|
@@ -99,9 +100,6 @@ FLAGS
|
|
|
99
100
|
--skiplines=<value> The number of lines to skip
|
|
100
101
|
--trim Trim all white space from columns
|
|
101
102
|
|
|
102
|
-
GLOBAL FLAGS
|
|
103
|
-
--json Format output as json.
|
|
104
|
-
|
|
105
103
|
DESCRIPTION
|
|
106
104
|
For information about CSV file formats, see [Prepare CSV
|
|
107
105
|
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
@@ -117,36 +115,41 @@ EXAMPLES
|
|
|
117
115
|
$ sf kit data bulk insert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
118
116
|
```
|
|
119
117
|
|
|
118
|
+
_See code: [src/commands/kit/data/bulk/insert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/bulk/insert.ts)_
|
|
119
|
+
|
|
120
120
|
## `sf kit data bulk query`
|
|
121
121
|
|
|
122
122
|
Bulk query records.
|
|
123
123
|
|
|
124
124
|
```
|
|
125
125
|
USAGE
|
|
126
|
-
$ sf kit data bulk query -q <value> -o <value> [--
|
|
126
|
+
$ sf kit data bulk query -q <value> -o <value> [-f <value>] [--all] [-w <value>] [--api-version <value>]
|
|
127
127
|
|
|
128
128
|
FLAGS
|
|
129
129
|
-f, --csvfile=<value> [default: standard output] Output csv file
|
|
130
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
130
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
131
|
+
configuration variable is already set.
|
|
131
132
|
-q, --query=<value> (required) SOQL query to export
|
|
133
|
+
-w, --wait=<value> [default: 5] The number of minutes to wait for the command to complete before displaying the
|
|
134
|
+
results
|
|
135
|
+
--all include deleted or archived records
|
|
132
136
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
133
137
|
|
|
134
|
-
GLOBAL FLAGS
|
|
135
|
-
--json Format output as json.
|
|
136
|
-
|
|
137
138
|
EXAMPLES
|
|
138
139
|
Query Account records and save to specified path:
|
|
139
140
|
|
|
140
141
|
$ sf kit data bulk query -q "SELECT Id, Name FROM Account" -f ./path/to/Account.csv
|
|
141
142
|
```
|
|
142
143
|
|
|
144
|
+
_See code: [src/commands/kit/data/bulk/query.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/bulk/query.ts)_
|
|
145
|
+
|
|
143
146
|
## `sf kit data bulk update`
|
|
144
147
|
|
|
145
148
|
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
146
149
|
|
|
147
150
|
```
|
|
148
151
|
USAGE
|
|
149
|
-
$ sf kit data bulk update -s <value> -f <value> -o <value> [
|
|
152
|
+
$ sf kit data bulk update -s <value> -f <value> -o <value> [-r <value>] [-e <value>] [-d <value>] [-q <value>]
|
|
150
153
|
[--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode <value>]
|
|
151
154
|
[--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
152
155
|
|
|
@@ -156,7 +159,8 @@ FLAGS
|
|
|
156
159
|
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
157
160
|
-f, --csvfile=<value> (required) The CSV file path that defines the records to update
|
|
158
161
|
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
159
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
162
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
163
|
+
configuration variable is already set.
|
|
160
164
|
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
161
165
|
-r, --resultfile=<value> The CSV file path for writing the update results
|
|
162
166
|
-s, --sobject=<value> (required) The SObject name to update
|
|
@@ -171,9 +175,6 @@ FLAGS
|
|
|
171
175
|
--skiplines=<value> The number of lines to skip
|
|
172
176
|
--trim Trim all white space from columns
|
|
173
177
|
|
|
174
|
-
GLOBAL FLAGS
|
|
175
|
-
--json Format output as json.
|
|
176
|
-
|
|
177
178
|
DESCRIPTION
|
|
178
179
|
For information about CSV file formats, see [Prepare CSV
|
|
179
180
|
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
@@ -189,14 +190,16 @@ EXAMPLES
|
|
|
189
190
|
$ sf kit data bulk update -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
190
191
|
```
|
|
191
192
|
|
|
193
|
+
_See code: [src/commands/kit/data/bulk/update.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/bulk/update.ts)_
|
|
194
|
+
|
|
192
195
|
## `sf kit data bulk upsert`
|
|
193
196
|
|
|
194
197
|
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
195
198
|
|
|
196
199
|
```
|
|
197
200
|
USAGE
|
|
198
|
-
$ sf kit data bulk upsert -s <value> -f <value> -o <value> -i <value> [
|
|
199
|
-
|
|
201
|
+
$ sf kit data bulk upsert -s <value> -f <value> -o <value> -i <value> [-r <value>] [-e <value>] [-d <value>] [-q
|
|
202
|
+
<value>] [--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode
|
|
200
203
|
<value>] [--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
201
204
|
|
|
202
205
|
FLAGS
|
|
@@ -206,7 +209,8 @@ FLAGS
|
|
|
206
209
|
-f, --csvfile=<value> (required) The CSV file path that defines the records to upsert
|
|
207
210
|
-i, --externalid=<value> (required) [default: Id] The column name of the external ID
|
|
208
211
|
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
209
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
212
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
213
|
+
configuration variable is already set.
|
|
210
214
|
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
211
215
|
-r, --resultfile=<value> The CSV file path for writing the upsert results
|
|
212
216
|
-s, --sobject=<value> (required) The SObject name to upsert
|
|
@@ -221,9 +225,6 @@ FLAGS
|
|
|
221
225
|
--skiplines=<value> The number of lines to skip
|
|
222
226
|
--trim Trim all white space from columns
|
|
223
227
|
|
|
224
|
-
GLOBAL FLAGS
|
|
225
|
-
--json Format output as json.
|
|
226
|
-
|
|
227
228
|
DESCRIPTION
|
|
228
229
|
For information about CSV file formats, see [Prepare CSV
|
|
229
230
|
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
@@ -240,14 +241,16 @@ EXAMPLES
|
|
|
240
241
|
-w 10
|
|
241
242
|
```
|
|
242
243
|
|
|
244
|
+
_See code: [src/commands/kit/data/bulk/upsert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/bulk/upsert.ts)_
|
|
245
|
+
|
|
243
246
|
## `sf kit data csv convert`
|
|
244
247
|
|
|
245
248
|
Convert CSV data using column mapping file or Node.js script.
|
|
246
249
|
|
|
247
250
|
```
|
|
248
251
|
USAGE
|
|
249
|
-
$ sf kit data csv convert [
|
|
250
|
-
|
|
252
|
+
$ sf kit data csv convert [-i <value>] [-o <value>] [-e <value>] [-d <value>] [-q <value>] [--skiplines <value>]
|
|
253
|
+
[--trim] [-m <value>] [-c <value>]
|
|
251
254
|
|
|
252
255
|
FLAGS
|
|
253
256
|
-c, --converter=<value> The path of the script to convert CSV rows
|
|
@@ -260,9 +263,6 @@ FLAGS
|
|
|
260
263
|
--skiplines=<value> The number of lines to skip
|
|
261
264
|
--trim Trim all white space from columns
|
|
262
265
|
|
|
263
|
-
GLOBAL FLAGS
|
|
264
|
-
--json Format output as json.
|
|
265
|
-
|
|
266
266
|
EXAMPLES
|
|
267
267
|
Convert csv file using mapping file and output to standard output:
|
|
268
268
|
|
|
@@ -273,23 +273,23 @@ EXAMPLES
|
|
|
273
273
|
$ sf kit data csv convert -i ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
+
_See code: [src/commands/kit/data/csv/convert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/data/csv/convert.ts)_
|
|
277
|
+
|
|
276
278
|
## `sf kit layout assignments deploy`
|
|
277
279
|
|
|
278
280
|
Deploy page layout assignments from JSON file.
|
|
279
281
|
|
|
280
282
|
```
|
|
281
283
|
USAGE
|
|
282
|
-
$ sf kit layout assignments deploy -f <value> -o <value> [--
|
|
284
|
+
$ sf kit layout assignments deploy -f <value> -o <value> [--api-version <value>]
|
|
283
285
|
|
|
284
286
|
FLAGS
|
|
285
287
|
-f, --file=<value> (required) [default: config/layout-assignments.json] Input file path of page layout
|
|
286
288
|
assignment settings.
|
|
287
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
289
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
290
|
+
configuration variable is already set.
|
|
288
291
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
289
292
|
|
|
290
|
-
GLOBAL FLAGS
|
|
291
|
-
--json Format output as json.
|
|
292
|
-
|
|
293
293
|
EXAMPLES
|
|
294
294
|
Deploy from the default file path to the default org:
|
|
295
295
|
|
|
@@ -304,27 +304,26 @@ EXAMPLES
|
|
|
304
304
|
$ sf kit layout assignments deploy -o me@my.org -f config/layout-assignments.sandbox.json
|
|
305
305
|
```
|
|
306
306
|
|
|
307
|
+
_See code: [src/commands/kit/layout/assignments/deploy.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/layout/assignments/deploy.ts)_
|
|
308
|
+
|
|
307
309
|
## `sf kit layout assignments retrieve`
|
|
308
310
|
|
|
309
311
|
Retrieve page layout assignments and save to JSON file.
|
|
310
312
|
|
|
311
313
|
```
|
|
312
314
|
USAGE
|
|
313
|
-
$ sf kit layout assignments retrieve -f <value> -o <value> [
|
|
314
|
-
<value>]
|
|
315
|
+
$ sf kit layout assignments retrieve -f <value> -o <value> [-p <value>] [-s <value>] [--merge] [--api-version <value>]
|
|
315
316
|
|
|
316
317
|
FLAGS
|
|
317
318
|
-f, --file=<value> (required) [default: config/layout-assignments.json] Output file path of page layout
|
|
318
319
|
assignment settings.
|
|
319
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
320
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
321
|
+
configuration variable is already set.
|
|
320
322
|
-p, --profile=<value>... [default: all profiles] Profile names to retrieve
|
|
321
323
|
-s, --sobject=<value>... [default: sobjects which have multiple layouts] SObject names to retrieve
|
|
322
324
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
323
325
|
--merge Merge retrieved configurations with existing file.
|
|
324
326
|
|
|
325
|
-
GLOBAL FLAGS
|
|
326
|
-
--json Format output as json.
|
|
327
|
-
|
|
328
327
|
EXAMPLES
|
|
329
328
|
Retrieve page layout assignments from the default org and save to the default path:
|
|
330
329
|
|
|
@@ -339,23 +338,23 @@ EXAMPLES
|
|
|
339
338
|
$ sf kit layout assignments retrieve -o me@my.org -f config/layout-assignments.sandbox.json
|
|
340
339
|
```
|
|
341
340
|
|
|
341
|
+
_See code: [src/commands/kit/layout/assignments/retrieve.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/layout/assignments/retrieve.ts)_
|
|
342
|
+
|
|
342
343
|
## `sf kit object fields describe`
|
|
343
344
|
|
|
344
345
|
Describe sobject fields information.
|
|
345
346
|
|
|
346
347
|
```
|
|
347
348
|
USAGE
|
|
348
|
-
$ sf kit object fields describe -s <value> -o <value> [
|
|
349
|
+
$ sf kit object fields describe -s <value> -o <value> [-f <value>] [--api-version <value>]
|
|
349
350
|
|
|
350
351
|
FLAGS
|
|
351
352
|
-f, --file=<value> Output csv file path
|
|
352
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
353
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
354
|
+
configuration variable is already set.
|
|
353
355
|
-s, --sobject=<value> (required) SObject name to describe
|
|
354
356
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
355
357
|
|
|
356
|
-
GLOBAL FLAGS
|
|
357
|
-
--json Format output as json.
|
|
358
|
-
|
|
359
358
|
EXAMPLES
|
|
360
359
|
Describe Account fields of the default org and save to csv file:
|
|
361
360
|
|
|
@@ -366,25 +365,25 @@ EXAMPLES
|
|
|
366
365
|
$ sf kit object fields describe -o me@my.org -s CustomObject__c --json
|
|
367
366
|
```
|
|
368
367
|
|
|
368
|
+
_See code: [src/commands/kit/object/fields/describe.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/object/fields/describe.ts)_
|
|
369
|
+
|
|
369
370
|
## `sf kit object fields setup`
|
|
370
371
|
|
|
371
372
|
Upsert and delete sobject fields from a CSV file.
|
|
372
373
|
|
|
373
374
|
```
|
|
374
375
|
USAGE
|
|
375
|
-
$ sf kit object fields setup -s <value> -f <value> -o <value> [--
|
|
376
|
+
$ sf kit object fields setup -s <value> -f <value> -o <value> [--delete] [--force] [--api-version <value>]
|
|
376
377
|
|
|
377
378
|
FLAGS
|
|
378
379
|
-f, --file=<value> (required) Input csv file path
|
|
379
|
-
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
380
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
381
|
+
configuration variable is already set.
|
|
380
382
|
-s, --sobject=<value> (required) SObject name to setup
|
|
381
383
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
382
384
|
--delete Delete fields that are not in the csv file
|
|
383
385
|
--force Do not confirm when deleting
|
|
384
386
|
|
|
385
|
-
GLOBAL FLAGS
|
|
386
|
-
--json Format output as json.
|
|
387
|
-
|
|
388
387
|
EXAMPLES
|
|
389
388
|
Upsert Account fields to the default org:
|
|
390
389
|
|
|
@@ -395,22 +394,21 @@ EXAMPLES
|
|
|
395
394
|
$ sf kit object fields setup -o me@my.org -s CustomObject__c -f path/to/custom_object_fields.csv --delete
|
|
396
395
|
```
|
|
397
396
|
|
|
397
|
+
_See code: [src/commands/kit/object/fields/setup.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/object/fields/setup.ts)_
|
|
398
|
+
|
|
398
399
|
## `sf kit script`
|
|
399
400
|
|
|
400
401
|
Execute Node.js scripts in SfCommand context.
|
|
401
402
|
|
|
402
403
|
```
|
|
403
404
|
USAGE
|
|
404
|
-
$ sf kit script [
|
|
405
|
+
$ sf kit script [-f <value>] [-o <value>] [--api-version <value>]
|
|
405
406
|
|
|
406
407
|
FLAGS
|
|
407
408
|
-f, --file=<value> The path of the Node.js script file to execute.
|
|
408
409
|
-o, --target-org=<value>
|
|
409
410
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
410
411
|
|
|
411
|
-
GLOBAL FLAGS
|
|
412
|
-
--json Format output as json.
|
|
413
|
-
|
|
414
412
|
DESCRIPTION
|
|
415
413
|
Execute Node.js scripts in SfCommand context.
|
|
416
414
|
|
|
@@ -446,16 +444,13 @@ Execute Node.js scripts in SfCommand context.
|
|
|
446
444
|
|
|
447
445
|
```
|
|
448
446
|
USAGE
|
|
449
|
-
$ sf kit script execute [
|
|
447
|
+
$ sf kit script execute [-f <value>] [-o <value>] [--api-version <value>]
|
|
450
448
|
|
|
451
449
|
FLAGS
|
|
452
450
|
-f, --file=<value> The path of the Node.js script file to execute.
|
|
453
451
|
-o, --target-org=<value>
|
|
454
452
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
455
453
|
|
|
456
|
-
GLOBAL FLAGS
|
|
457
|
-
--json Format output as json.
|
|
458
|
-
|
|
459
454
|
DESCRIPTION
|
|
460
455
|
Execute Node.js scripts in SfCommand context.
|
|
461
456
|
|
|
@@ -484,4 +479,6 @@ EXAMPLES
|
|
|
484
479
|
query a account from org in REPL
|
|
485
480
|
> await conn.query('SELECT Id, Name FROM Account LIMIT 1')
|
|
486
481
|
```
|
|
482
|
+
|
|
483
|
+
_See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.6.0/src/commands/kit/script/execute.ts)_
|
|
487
484
|
<!-- commandsstop -->
|
package/lib/bulk.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.createBulkCommand = exports.normalizeDateString = exports.bulkLoad = exp
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const core_1 = require("@salesforce/core");
|
|
7
|
+
const kit_1 = require("@salesforce/kit");
|
|
7
8
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
8
9
|
const dayjs = require("dayjs");
|
|
9
10
|
const csv = require("fast-csv");
|
|
@@ -12,15 +13,10 @@ const convert_1 = require("./commands/kit/data/csv/convert");
|
|
|
12
13
|
const utils = require("./utils");
|
|
13
14
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
15
|
const messages = core_1.Messages.loadMessages('@kitalive/sfdx-plugin', 'data.bulk');
|
|
15
|
-
function bulkQuery(conn, query) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.query(query)
|
|
20
|
-
.on('error', reject)
|
|
21
|
-
.on('record', (record) => records.push(record))
|
|
22
|
-
.on('end', () => resolve(records));
|
|
23
|
-
});
|
|
16
|
+
function bulkQuery(conn, query, options) {
|
|
17
|
+
const wait = options?.wait ?? 5;
|
|
18
|
+
conn.bulk2.pollTimeout = kit_1.Duration.minutes(wait).milliseconds;
|
|
19
|
+
return conn.bulk2.query(query, options?.all ? { scanAll: true } : {});
|
|
24
20
|
}
|
|
25
21
|
exports.bulkQuery = bulkQuery;
|
|
26
22
|
function bulkLoad(conn, sobject, operation, rows, options) {
|
package/lib/bulk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/bulk.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,6BAA6B;AAC7B,2CAAiD;AACjD,iEAIqC;AAErC,+BAA+B;AAC/B,gCAAgC;AAChC,+BAA+B;AAS/B,6DAAgE;AAChE,iCAAiC;AAEjC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/bulk.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,6BAA6B;AAC7B,2CAAiD;AACjD,yCAA2C;AAC3C,iEAIqC;AAErC,+BAA+B;AAC/B,gCAAgC;AAChC,+BAA+B;AAS/B,6DAAgE;AAChE,iCAAiC;AAEjC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC;AAmB7E,SAAgB,SAAS,CACvB,IAAgB,EAChB,KAAa,EACb,OAAsB;IAEtB,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,cAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;IAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,E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;SAC9D,CAAC;QACF,gBAAgB,EAAE,uBAAK,CAAC,MAAM,CAAC;YAC7B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;SAC/D,CAAC;QACF,SAAS,EAAE,uBAAK,CAAC,OAAO,CAAC;YACvB,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,KAAK;YACV,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;SACxD,CAAC;QACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;YAClB,IAAI,EAAE,GAAG;YACT,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;SACnD,CAAC;QACF,YAAY,EAAE,iDAA+B;QAC7C,aAAa,EAAE,uBAAK,CAAC,aAAa,EAAE;KACpC;SA2LH,CAAC;AAvPS,QAAA,iBAAiB,qBAuP1B"}
|
|
@@ -14,7 +14,10 @@ class QueryCommand extends sf_plugins_core_1.SfCommand {
|
|
|
14
14
|
const file = flags.csvfile;
|
|
15
15
|
this.spinner.start('Bulk query');
|
|
16
16
|
try {
|
|
17
|
-
const rows = await this.bulkQuery(conn, flags.query
|
|
17
|
+
const rows = await this.bulkQuery(conn, flags.query, {
|
|
18
|
+
all: flags.all,
|
|
19
|
+
wait: flags.wait,
|
|
20
|
+
});
|
|
18
21
|
if (!rows.length) {
|
|
19
22
|
this.spinner.stop('no records');
|
|
20
23
|
return rows;
|
|
@@ -36,8 +39,8 @@ class QueryCommand extends sf_plugins_core_1.SfCommand {
|
|
|
36
39
|
writeCsv(rows, stream) {
|
|
37
40
|
(0, format_1.write)(rows, { headers: true, writeBOM: true }).pipe(stream);
|
|
38
41
|
}
|
|
39
|
-
bulkQuery(conn, query) {
|
|
40
|
-
return (0, bulk_1.bulkQuery)(conn, query);
|
|
42
|
+
bulkQuery(conn, query, options) {
|
|
43
|
+
return (0, bulk_1.bulkQuery)(conn, query, options);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
QueryCommand.summary = messages.getMessage('summary');
|
|
@@ -52,6 +55,14 @@ QueryCommand.flags = {
|
|
|
52
55
|
char: 'f',
|
|
53
56
|
summary: messages.getMessage('flags.csvfile.summary'),
|
|
54
57
|
}),
|
|
58
|
+
all: sf_plugins_core_1.Flags.boolean({
|
|
59
|
+
summary: messages.getMessage('flags.all.summary'),
|
|
60
|
+
}),
|
|
61
|
+
wait: sf_plugins_core_1.Flags.integer({
|
|
62
|
+
char: 'w',
|
|
63
|
+
summary: messages.getMessage('flags.wait.summary'),
|
|
64
|
+
default: 5,
|
|
65
|
+
}),
|
|
55
66
|
'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
|
|
56
67
|
'api-version': sf_plugins_core_1.Flags.orgApiVersion(),
|
|
57
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../src/commands/kit/data/bulk/query.ts"],"names":[],"mappings":";;AAAA,8BAA8B;AAC9B,2CAA4C;AAC5C,6CAAyC;AACzC,iEAIqC;AAErC,2CAA6C;AAE7C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CACpC,uBAAuB,EACvB,iBAAiB,CAClB,CAAC;AAEF,MAAqB,YAAa,SAAQ,2BAAoB;
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../src/commands/kit/data/bulk/query.ts"],"names":[],"mappings":";;AAAA,8BAA8B;AAC9B,2CAA4C;AAC5C,6CAAyC;AACzC,iEAIqC;AAErC,2CAA6C;AAE7C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CACpC,uBAAuB,EACvB,iBAAiB,CAClB,CAAC;AAEF,MAAqB,YAAa,SAAQ,2BAAoB;IA2Br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AAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAEO,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO;QACpC,OAAO,IAAA,gBAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;;AA/DsB,oBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAEzC,qBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,kBAAK,GAAG;IAC7B,KAAK,EAAE,uBAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACpD,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtD,CAAC;IACF,GAAG,EAAE,uBAAK,CAAC,OAAO,CAAC;QACjB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;KAClD,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,OAAO,EAAE,CAAC;KACX,CAAC;IACF,YAAY,EAAE,iDAA+B;IAC7C,aAAa,EAAE,uBAAK,CAAC,aAAa,EAAE;CACrC,CAAC;kBAzBiB,YAAY"}
|
|
@@ -29,12 +29,14 @@ class ScriptExecute extends sf_plugins_core_1.SfCommand {
|
|
|
29
29
|
await func(createLoader(path.dirname(flags.file)), (0, yargs_1.default)([]).parse(argv), this, conn);
|
|
30
30
|
}
|
|
31
31
|
catch (e) {
|
|
32
|
-
const
|
|
33
|
-
const m =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const message = e.stack.split('\n')[0];
|
|
33
|
+
const m = e.stack.match(/<anonymous>:(\d+):(\d+)/);
|
|
34
|
+
if (m) {
|
|
35
|
+
const code = func.toString().split('\n')[m[1] - 1];
|
|
36
|
+
this.log(sf_plugins_core_1.StandardColors.error(`at line ${m[1] - 2}: ${message}`));
|
|
37
|
+
this.log(code);
|
|
38
|
+
this.log(sf_plugins_core_1.StandardColors.error(' '.repeat(m[2] - 1) + '^'));
|
|
39
|
+
}
|
|
38
40
|
throw e;
|
|
39
41
|
}
|
|
40
42
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../src/commands/kit/script/execute.ts"],"names":[],"mappings":";;AAAA,kCAAkC;AAClC,kCAAkC;AAClC,2CAA4C;AAC5C,iEAKqC;AACrC,+BAA+B;AAC/B,iCAA0B;AAE1B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CACpC,uBAAuB,EACvB,gBAAgB,CACjB,CAAC;AAEF,MAAqB,aAAc,SAAQ,2BAAe;IAkBjD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACpC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEvB,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;YACzC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;gB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AAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,qBAAO,GAAG,CAAC,YAAY,CAAC,CAAC;AAClC,oBAAM,GAAG,KAAK,CAAC;AAEN,mBAAK,GAAG;IAC7B,IAAI,EAAE,uBAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;KACnD,CAAC;IACF,YAAY,EAAE,iDAA+B;IAC7C,aAAa,EAAE,uBAAK,CAAC,aAAa,EAAE;CACrC,CAAC;kBAhBiB,aAAa"}
|
|
@@ -15,3 +15,11 @@ SOQL query to export
|
|
|
15
15
|
# flags.csvfile.summary
|
|
16
16
|
|
|
17
17
|
[default: standard output] Output csv file
|
|
18
|
+
|
|
19
|
+
# flags.all.summary
|
|
20
|
+
|
|
21
|
+
include deleted or archived records
|
|
22
|
+
|
|
23
|
+
# flags.wait.summary
|
|
24
|
+
|
|
25
|
+
The number of minutes to wait for the command to complete before displaying the results
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"kit:script:execute": {
|
|
5
5
|
"id": "kit:script:execute",
|
|
@@ -19,13 +19,6 @@
|
|
|
19
19
|
"query a account from org in REPL\n> await conn.query('SELECT Id, Name FROM Account LIMIT 1')"
|
|
20
20
|
],
|
|
21
21
|
"flags": {
|
|
22
|
-
"json": {
|
|
23
|
-
"name": "json",
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"description": "Format output as json.",
|
|
26
|
-
"helpGroup": "GLOBAL",
|
|
27
|
-
"allowNo": false
|
|
28
|
-
},
|
|
29
22
|
"file": {
|
|
30
23
|
"name": "file",
|
|
31
24
|
"type": "option",
|
|
@@ -65,13 +58,6 @@
|
|
|
65
58
|
"Delete Opportunity records with CloseDate older than 2 years:\n<%= config.bin %> <%= command.id %> -q \"SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:2\""
|
|
66
59
|
],
|
|
67
60
|
"flags": {
|
|
68
|
-
"json": {
|
|
69
|
-
"name": "json",
|
|
70
|
-
"type": "boolean",
|
|
71
|
-
"description": "Format output as json.",
|
|
72
|
-
"helpGroup": "GLOBAL",
|
|
73
|
-
"allowNo": false
|
|
74
|
-
},
|
|
75
61
|
"query": {
|
|
76
62
|
"name": "query",
|
|
77
63
|
"type": "option",
|
|
@@ -112,7 +98,7 @@
|
|
|
112
98
|
"name": "target-org",
|
|
113
99
|
"type": "option",
|
|
114
100
|
"char": "o",
|
|
115
|
-
"summary": "Username or alias of the target org.",
|
|
101
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
116
102
|
"required": true,
|
|
117
103
|
"multiple": false,
|
|
118
104
|
"aliases": [
|
|
@@ -143,13 +129,6 @@
|
|
|
143
129
|
"Insert MyObject__c records with convert.js:\n<%= config.bin %> <%= command.id %> -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10"
|
|
144
130
|
],
|
|
145
131
|
"flags": {
|
|
146
|
-
"json": {
|
|
147
|
-
"name": "json",
|
|
148
|
-
"type": "boolean",
|
|
149
|
-
"description": "Format output as json.",
|
|
150
|
-
"helpGroup": "GLOBAL",
|
|
151
|
-
"allowNo": false
|
|
152
|
-
},
|
|
153
132
|
"sobject": {
|
|
154
133
|
"name": "sobject",
|
|
155
134
|
"type": "option",
|
|
@@ -267,7 +246,7 @@
|
|
|
267
246
|
"name": "target-org",
|
|
268
247
|
"type": "option",
|
|
269
248
|
"char": "o",
|
|
270
|
-
"summary": "Username or alias of the target org.",
|
|
249
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
271
250
|
"required": true,
|
|
272
251
|
"multiple": false,
|
|
273
252
|
"aliases": [
|
|
@@ -298,13 +277,6 @@
|
|
|
298
277
|
"Query Account records and save to specified path:\n<%= config.bin %> <%= command.id %> -q \"SELECT Id, Name FROM Account\" -f ./path/to/Account.csv"
|
|
299
278
|
],
|
|
300
279
|
"flags": {
|
|
301
|
-
"json": {
|
|
302
|
-
"name": "json",
|
|
303
|
-
"type": "boolean",
|
|
304
|
-
"description": "Format output as json.",
|
|
305
|
-
"helpGroup": "GLOBAL",
|
|
306
|
-
"allowNo": false
|
|
307
|
-
},
|
|
308
280
|
"query": {
|
|
309
281
|
"name": "query",
|
|
310
282
|
"type": "option",
|
|
@@ -320,11 +292,25 @@
|
|
|
320
292
|
"summary": "[default: standard output] Output csv file",
|
|
321
293
|
"multiple": false
|
|
322
294
|
},
|
|
295
|
+
"all": {
|
|
296
|
+
"name": "all",
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"summary": "include deleted or archived records",
|
|
299
|
+
"allowNo": false
|
|
300
|
+
},
|
|
301
|
+
"wait": {
|
|
302
|
+
"name": "wait",
|
|
303
|
+
"type": "option",
|
|
304
|
+
"char": "w",
|
|
305
|
+
"summary": "The number of minutes to wait for the command to complete before displaying the results",
|
|
306
|
+
"multiple": false,
|
|
307
|
+
"default": 5
|
|
308
|
+
},
|
|
323
309
|
"target-org": {
|
|
324
310
|
"name": "target-org",
|
|
325
311
|
"type": "option",
|
|
326
312
|
"char": "o",
|
|
327
|
-
"summary": "Username or alias of the target org.",
|
|
313
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
328
314
|
"required": true,
|
|
329
315
|
"multiple": false,
|
|
330
316
|
"aliases": [
|
|
@@ -355,13 +341,6 @@
|
|
|
355
341
|
"Update MyObject__c records with convert.js:\n<%= config.bin %> <%= command.id %> -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10"
|
|
356
342
|
],
|
|
357
343
|
"flags": {
|
|
358
|
-
"json": {
|
|
359
|
-
"name": "json",
|
|
360
|
-
"type": "boolean",
|
|
361
|
-
"description": "Format output as json.",
|
|
362
|
-
"helpGroup": "GLOBAL",
|
|
363
|
-
"allowNo": false
|
|
364
|
-
},
|
|
365
344
|
"sobject": {
|
|
366
345
|
"name": "sobject",
|
|
367
346
|
"type": "option",
|
|
@@ -479,7 +458,7 @@
|
|
|
479
458
|
"name": "target-org",
|
|
480
459
|
"type": "option",
|
|
481
460
|
"char": "o",
|
|
482
|
-
"summary": "Username or alias of the target org.",
|
|
461
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
483
462
|
"required": true,
|
|
484
463
|
"multiple": false,
|
|
485
464
|
"aliases": [
|
|
@@ -511,13 +490,6 @@
|
|
|
511
490
|
"Upsert MyObject__c with convert.js and external ID\n<%= config.bin %> <%= command.id %> -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w 10"
|
|
512
491
|
],
|
|
513
492
|
"flags": {
|
|
514
|
-
"json": {
|
|
515
|
-
"name": "json",
|
|
516
|
-
"type": "boolean",
|
|
517
|
-
"description": "Format output as json.",
|
|
518
|
-
"helpGroup": "GLOBAL",
|
|
519
|
-
"allowNo": false
|
|
520
|
-
},
|
|
521
493
|
"sobject": {
|
|
522
494
|
"name": "sobject",
|
|
523
495
|
"type": "option",
|
|
@@ -635,7 +607,7 @@
|
|
|
635
607
|
"name": "target-org",
|
|
636
608
|
"type": "option",
|
|
637
609
|
"char": "o",
|
|
638
|
-
"summary": "Username or alias of the target org.",
|
|
610
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
639
611
|
"required": true,
|
|
640
612
|
"multiple": false,
|
|
641
613
|
"aliases": [
|
|
@@ -676,13 +648,6 @@
|
|
|
676
648
|
"Convert csv file using script and output to specified path:\n<%= config.bin %> <%= command.id %> -i ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js"
|
|
677
649
|
],
|
|
678
650
|
"flags": {
|
|
679
|
-
"json": {
|
|
680
|
-
"name": "json",
|
|
681
|
-
"type": "boolean",
|
|
682
|
-
"description": "Format output as json.",
|
|
683
|
-
"helpGroup": "GLOBAL",
|
|
684
|
-
"allowNo": false
|
|
685
|
-
},
|
|
686
651
|
"input": {
|
|
687
652
|
"name": "input",
|
|
688
653
|
"type": "option",
|
|
@@ -772,13 +737,6 @@
|
|
|
772
737
|
"Deploy from the specified file to the specified org:\n<%= config.bin %> <%= command.id %> -o me@my.org -f config/layout-assignments.sandbox.json"
|
|
773
738
|
],
|
|
774
739
|
"flags": {
|
|
775
|
-
"json": {
|
|
776
|
-
"name": "json",
|
|
777
|
-
"type": "boolean",
|
|
778
|
-
"description": "Format output as json.",
|
|
779
|
-
"helpGroup": "GLOBAL",
|
|
780
|
-
"allowNo": false
|
|
781
|
-
},
|
|
782
740
|
"file": {
|
|
783
741
|
"name": "file",
|
|
784
742
|
"type": "option",
|
|
@@ -792,7 +750,7 @@
|
|
|
792
750
|
"name": "target-org",
|
|
793
751
|
"type": "option",
|
|
794
752
|
"char": "o",
|
|
795
|
-
"summary": "Username or alias of the target org.",
|
|
753
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
796
754
|
"required": true,
|
|
797
755
|
"multiple": false,
|
|
798
756
|
"aliases": [
|
|
@@ -825,13 +783,6 @@
|
|
|
825
783
|
"Retrieve page layout assignments from the specified org and save to the specified path:\n<%= config.bin %> <%= command.id %> -o me@my.org -f config/layout-assignments.sandbox.json"
|
|
826
784
|
],
|
|
827
785
|
"flags": {
|
|
828
|
-
"json": {
|
|
829
|
-
"name": "json",
|
|
830
|
-
"type": "boolean",
|
|
831
|
-
"description": "Format output as json.",
|
|
832
|
-
"helpGroup": "GLOBAL",
|
|
833
|
-
"allowNo": false
|
|
834
|
-
},
|
|
835
786
|
"file": {
|
|
836
787
|
"name": "file",
|
|
837
788
|
"type": "option",
|
|
@@ -868,7 +819,7 @@
|
|
|
868
819
|
"name": "target-org",
|
|
869
820
|
"type": "option",
|
|
870
821
|
"char": "o",
|
|
871
|
-
"summary": "Username or alias of the target org.",
|
|
822
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
872
823
|
"required": true,
|
|
873
824
|
"multiple": false,
|
|
874
825
|
"aliases": [
|
|
@@ -900,13 +851,6 @@
|
|
|
900
851
|
"Output CustomObject__c fields of the specified org as JSON format:\n<%= config.bin %> <%= command.id %> -o me@my.org -s CustomObject__c --json"
|
|
901
852
|
],
|
|
902
853
|
"flags": {
|
|
903
|
-
"json": {
|
|
904
|
-
"name": "json",
|
|
905
|
-
"type": "boolean",
|
|
906
|
-
"description": "Format output as json.",
|
|
907
|
-
"helpGroup": "GLOBAL",
|
|
908
|
-
"allowNo": false
|
|
909
|
-
},
|
|
910
854
|
"sobject": {
|
|
911
855
|
"name": "sobject",
|
|
912
856
|
"type": "option",
|
|
@@ -926,7 +870,7 @@
|
|
|
926
870
|
"name": "target-org",
|
|
927
871
|
"type": "option",
|
|
928
872
|
"char": "o",
|
|
929
|
-
"summary": "Username or alias of the target org.",
|
|
873
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
930
874
|
"required": true,
|
|
931
875
|
"multiple": false,
|
|
932
876
|
"aliases": [
|
|
@@ -957,13 +901,6 @@
|
|
|
957
901
|
"Upsert and delete CustomObject__c fields to the specified org:\n<%= config.bin %> <%= command.id %> -o me@my.org -s CustomObject__c -f path/to/custom_object_fields.csv --delete"
|
|
958
902
|
],
|
|
959
903
|
"flags": {
|
|
960
|
-
"json": {
|
|
961
|
-
"name": "json",
|
|
962
|
-
"type": "boolean",
|
|
963
|
-
"description": "Format output as json.",
|
|
964
|
-
"helpGroup": "GLOBAL",
|
|
965
|
-
"allowNo": false
|
|
966
|
-
},
|
|
967
904
|
"sobject": {
|
|
968
905
|
"name": "sobject",
|
|
969
906
|
"type": "option",
|
|
@@ -996,7 +933,7 @@
|
|
|
996
933
|
"name": "target-org",
|
|
997
934
|
"type": "option",
|
|
998
935
|
"char": "o",
|
|
999
|
-
"summary": "Username or alias of the target org.",
|
|
936
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
1000
937
|
"required": true,
|
|
1001
938
|
"multiple": false,
|
|
1002
939
|
"aliases": [
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitalive/sfdx-plugin",
|
|
3
3
|
"description": "Kitalive SFDX plugin",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"author": "Akihiro Ono",
|
|
6
6
|
"bugs": "https://github.com/Kitalive-Inc/sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^
|
|
9
|
-
"@salesforce/core": "^
|
|
8
|
+
"@oclif/core": "^3",
|
|
9
|
+
"@salesforce/core": "^6",
|
|
10
10
|
"@salesforce/kit": "^3",
|
|
11
|
-
"@salesforce/sf-plugins-core": "^
|
|
11
|
+
"@salesforce/sf-plugins-core": "^5",
|
|
12
12
|
"dayjs": "^1.11.9",
|
|
13
13
|
"fast-csv": "^4.3.6",
|
|
14
14
|
"fs-extra": "^11.1.1",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"yargs": "^17.7.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@oclif/test": "^
|
|
22
|
-
"@salesforce/cli-plugins-testkit": "^
|
|
21
|
+
"@oclif/test": "^3",
|
|
22
|
+
"@salesforce/cli-plugins-testkit": "^5",
|
|
23
23
|
"@salesforce/dev-config": "^4",
|
|
24
|
-
"@salesforce/dev-scripts": "^
|
|
24
|
+
"@salesforce/dev-scripts": "^8",
|
|
25
25
|
"@salesforce/prettier-config": "^0.0.3",
|
|
26
26
|
"@salesforce/ts-sinon": "^1",
|
|
27
27
|
"@swc/core": "^1.3.77",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"typescript": "^5"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
54
|
+
"node": ">=18.0.0"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"/lib",
|