@salesforce/plugin-data 2.5.18 → 2.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
CHANGED
|
@@ -145,7 +145,7 @@ EXAMPLES
|
|
|
145
145
|
TracedEntityId=01p17000000R6bLAAS"
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
148
|
+
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/create/record.ts)_
|
|
149
149
|
|
|
150
150
|
## `sf data:delete:bulk`
|
|
151
151
|
|
|
@@ -189,7 +189,7 @@ EXAMPLES
|
|
|
189
189
|
$ sf data:delete:bulk --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
192
|
+
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/delete/bulk.ts)_
|
|
193
193
|
|
|
194
194
|
## `sf data:delete:record`
|
|
195
195
|
|
|
@@ -247,7 +247,7 @@ EXAMPLES
|
|
|
247
247
|
$ sf data:delete:record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
250
|
+
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/delete/record.ts)_
|
|
251
251
|
|
|
252
252
|
## `sf data:delete:resume`
|
|
253
253
|
|
|
@@ -284,7 +284,7 @@ EXAMPLES
|
|
|
284
284
|
$ sf data:delete:resume --use-most-recent --target-org my-scratch
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
287
|
+
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/delete/resume.ts)_
|
|
288
288
|
|
|
289
289
|
## `sf data:export:tree`
|
|
290
290
|
|
|
@@ -341,7 +341,7 @@ EXAMPLES
|
|
|
341
341
|
my-scratch
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
344
|
+
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/export/tree.ts)_
|
|
345
345
|
|
|
346
346
|
## `sf data:get:record`
|
|
347
347
|
|
|
@@ -402,7 +402,7 @@ EXAMPLES
|
|
|
402
402
|
$ sf data:get:record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
403
403
|
```
|
|
404
404
|
|
|
405
|
-
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
405
|
+
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/get/record.ts)_
|
|
406
406
|
|
|
407
407
|
## `sf data:import:tree`
|
|
408
408
|
|
|
@@ -452,7 +452,7 @@ EXAMPLES
|
|
|
452
452
|
$ sf data:import:tree --plan Account-Contact-plan.json
|
|
453
453
|
```
|
|
454
454
|
|
|
455
|
-
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
455
|
+
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/import/tree.ts)_
|
|
456
456
|
|
|
457
457
|
## `sf data:query`
|
|
458
458
|
|
|
@@ -514,7 +514,7 @@ EXAMPLES
|
|
|
514
514
|
$ sf data:query --query "SELECT Id FROM Contact" --bulk --wait 0
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
-
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
517
|
+
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/query.ts)_
|
|
518
518
|
|
|
519
519
|
## `sf data:query:resume`
|
|
520
520
|
|
|
@@ -550,7 +550,7 @@ EXAMPLES
|
|
|
550
550
|
$ sf data:query:resume --bulk-query-id 7500x000005BdFzXXX
|
|
551
551
|
```
|
|
552
552
|
|
|
553
|
-
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
553
|
+
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/query/resume.ts)_
|
|
554
554
|
|
|
555
555
|
## `sf data:resume`
|
|
556
556
|
|
|
@@ -585,7 +585,7 @@ EXAMPLES
|
|
|
585
585
|
$ sf data:resume --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA
|
|
586
586
|
```
|
|
587
587
|
|
|
588
|
-
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
588
|
+
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/resume.ts)_
|
|
589
589
|
|
|
590
590
|
## `sf data:update:record`
|
|
591
591
|
|
|
@@ -645,7 +645,7 @@ EXAMPLES
|
|
|
645
645
|
"ExpirationDate=2017-12-01T00:58:04.000+0000"
|
|
646
646
|
```
|
|
647
647
|
|
|
648
|
-
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
648
|
+
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/update/record.ts)_
|
|
649
649
|
|
|
650
650
|
## `sf data:upsert:bulk`
|
|
651
651
|
|
|
@@ -696,7 +696,7 @@ EXAMPLES
|
|
|
696
696
|
my-scratch
|
|
697
697
|
```
|
|
698
698
|
|
|
699
|
-
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
699
|
+
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/upsert/bulk.ts)_
|
|
700
700
|
|
|
701
701
|
## `sf data:upsert:resume`
|
|
702
702
|
|
|
@@ -733,7 +733,7 @@ EXAMPLES
|
|
|
733
733
|
$ sf data:upsert:resume --use-most-recent --target-org my-scratch
|
|
734
734
|
```
|
|
735
735
|
|
|
736
|
-
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
736
|
+
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/data/upsert/resume.ts)_
|
|
737
737
|
|
|
738
738
|
## `sf force:data:bulk:delete`
|
|
739
739
|
|
|
@@ -777,7 +777,7 @@ EXAMPLES
|
|
|
777
777
|
$ sf force:data:bulk:delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
778
778
|
```
|
|
779
779
|
|
|
780
|
-
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
780
|
+
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/force/data/bulk/delete.ts)_
|
|
781
781
|
|
|
782
782
|
## `sf force:data:bulk:status`
|
|
783
783
|
|
|
@@ -812,7 +812,7 @@ EXAMPLES
|
|
|
812
812
|
$ sf force:data:bulk:status --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA --target-org my-scratch
|
|
813
813
|
```
|
|
814
814
|
|
|
815
|
-
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
815
|
+
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/force/data/bulk/status.ts)_
|
|
816
816
|
|
|
817
817
|
## `sf force:data:bulk:upsert`
|
|
818
818
|
|
|
@@ -868,6 +868,6 @@ EXAMPLES
|
|
|
868
868
|
--target-org my-scratch
|
|
869
869
|
```
|
|
870
870
|
|
|
871
|
-
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/2.
|
|
871
|
+
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.0/src/commands/force/data/bulk/upsert.ts)_
|
|
872
872
|
|
|
873
873
|
<!-- commandsstop -->
|
|
@@ -19,14 +19,11 @@ const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'tree.i
|
|
|
19
19
|
class Import extends sf_plugins_core_1.SfCommand {
|
|
20
20
|
async run() {
|
|
21
21
|
const { flags } = await this.parse(Import);
|
|
22
|
-
const logger = await core_1.Logger.child('Import');
|
|
23
22
|
const importApi = new importApi_1.ImportApi(flags['target-org'], this.config.bin, this.config.pjson.oclif.topicSeparator ?? ':');
|
|
24
23
|
if (flags['config-help']) {
|
|
25
24
|
// Display config help and return
|
|
26
25
|
const schema = importApi.getSchema();
|
|
27
|
-
|
|
28
|
-
new core_1.SchemaPrinter(logger, schema).getLines().forEach((line) => this.log(line));
|
|
29
|
-
}
|
|
26
|
+
this.log(messages.getMessage('schema-help'));
|
|
30
27
|
return schema;
|
|
31
28
|
}
|
|
32
29
|
const importConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../src/commands/data/import/tree.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../src/commands/data/import/tree.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4C;AAC5C,mDAA0D;AAC1D,iEAAqF;AACrF,gEAA2E;AAC3E,0CAA0C;AAE1C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAA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AC7C,aAAa,EAAE,uBAAK,CAAC,OAAO,CAAC;QAC3B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QACzD,OAAO,EAAE,CAAC,YAAY,CAAC;QACvB,gBAAgB,EAAE,IAAI;KACvB,CAAC;CACH,CAAC"}
|
package/messages/tree.import.md
CHANGED
|
@@ -35,3 +35,14 @@ Display schema information for the --plan configuration file to stdout; if you s
|
|
|
35
35
|
- Import records using a plan definition file into your default org:
|
|
36
36
|
|
|
37
37
|
<%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json
|
|
38
|
+
|
|
39
|
+
# schema-help
|
|
40
|
+
|
|
41
|
+
schema(array) - Data Import Plan: Schema for SFDX Toolbelt's data import plan JSON.
|
|
42
|
+
|
|
43
|
+
- items(object) - SObject Type: Definition of records to be insert per SObject Type
|
|
44
|
+
- sobject(string) - Name of SObject: Child file references must have SObject roots of this type
|
|
45
|
+
- saveRefs(boolean) - Save References: Post-save, save references (Name/ID) to be used for reference replacement in subsequent saves. Applies to all data files for this SObject type.
|
|
46
|
+
- resolveRefs(boolean) - Resolve References: Pre-save, replace @<reference> with ID from previous save. Applies to all data files for this SObject type.
|
|
47
|
+
- files(array) - Files: An array of files paths to load
|
|
48
|
+
- items(string|object) - Filepath: Filepath string or object to point to a JSON or XML file having data defined in SObject Tree format.
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-data",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Plugin for salesforce data commands",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -118,13 +118,13 @@
|
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@oclif/plugin-command-snapshot": "^4.0.13",
|
|
121
|
-
"@salesforce/cli-plugins-testkit": "^4.4.
|
|
121
|
+
"@salesforce/cli-plugins-testkit": "^4.4.7",
|
|
122
122
|
"@salesforce/dev-config": "^4.0.1",
|
|
123
123
|
"@salesforce/dev-scripts": "^5.11.0",
|
|
124
|
-
"@salesforce/plugin-command-reference": "^3.0.
|
|
124
|
+
"@salesforce/plugin-command-reference": "^3.0.41",
|
|
125
125
|
"@salesforce/plugin-settings": "^1.4.33",
|
|
126
126
|
"@salesforce/prettier-config": "^0.0.3",
|
|
127
|
-
"@salesforce/ts-sinon": "^1.4.
|
|
127
|
+
"@salesforce/ts-sinon": "^1.4.17",
|
|
128
128
|
"@swc/core": "1.3.31",
|
|
129
129
|
"@types/chai-as-promised": "^7.1.6",
|
|
130
130
|
"@types/shelljs": "^0.8.13",
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
},
|
|
262
262
|
"sfdx": {
|
|
263
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/2.
|
|
264
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/2.
|
|
263
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/2.6.0.crt",
|
|
264
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/2.6.0.sig"
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"type": "array",
|
|
5
5
|
"title": "Data Import Plan",
|
|
6
|
-
"description": "Schema for
|
|
6
|
+
"description": "Schema for data import plan JSON.",
|
|
7
7
|
"items": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"title": "SObject Type",
|