@salesforce/plugin-data 3.5.1 → 3.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-data",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "Plugin for salesforce data commands",
5
5
  "author": "Salesforce",
6
6
  "homepage": "https://github.com/salesforcecli/plugin-data",
@@ -109,10 +109,10 @@
109
109
  "dependencies": {
110
110
  "@jsforce/jsforce-node": "^3.2.0",
111
111
  "@oclif/core": "^4",
112
- "@salesforce/core": "^7.3.12",
113
- "@salesforce/kit": "^3.1.0",
114
- "@salesforce/sf-plugins-core": "^11.1.0",
115
- "@salesforce/ts-types": "^2.0.9",
112
+ "@salesforce/core": "^8.0.1",
113
+ "@salesforce/kit": "^3.1.6",
114
+ "@salesforce/sf-plugins-core": "^11.1.1",
115
+ "@salesforce/ts-types": "^2.0.10",
116
116
  "ansis": "^3.2.0",
117
117
  "change-case": "^5.4.4",
118
118
  "csv-parse": "^5.5.6",
@@ -120,15 +120,15 @@
120
120
  "form-data": "^4.0.0"
121
121
  },
122
122
  "devDependencies": {
123
- "@oclif/plugin-command-snapshot": "^5.2.2",
124
- "@salesforce/cli-plugins-testkit": "^5.3.12",
125
- "@salesforce/dev-scripts": "^10.2.0",
126
- "@salesforce/plugin-command-reference": "^3.1.2",
127
- "@salesforce/types": "^1.1.0",
128
- "eslint-plugin-sf-plugin": "^1.18.7",
129
- "oclif": "^4.13.2",
123
+ "@oclif/plugin-command-snapshot": "^5.2.3",
124
+ "@salesforce/cli-plugins-testkit": "^5.3.15",
125
+ "@salesforce/dev-scripts": "^10.2.2",
126
+ "@salesforce/plugin-command-reference": "^3.1.5",
127
+ "@salesforce/types": "^1.2.0",
128
+ "eslint-plugin-sf-plugin": "^1.18.9",
129
+ "oclif": "^4.13.8",
130
130
  "ts-node": "^10.9.2",
131
- "typescript": "^5.4.5"
131
+ "typescript": "^5.5.2"
132
132
  },
133
133
  "wireit": {
134
134
  "build": {
@@ -248,7 +248,7 @@
248
248
  "exports": "./lib/index.js",
249
249
  "type": "module",
250
250
  "sfdx": {
251
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.1.crt",
252
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.1.sig"
251
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.3.crt",
252
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/3.5.3.sig"
253
253
  }
254
254
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../../src/commands/data/export/beta/tree.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAgB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGhE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAEjF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAmD;IAC9E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAA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AAE,CAAC;SAChD,CAAC;QACF,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC"}
@@ -1,52 +0,0 @@
1
- /*
2
- * Copyright (c) 2020, 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 { Messages } from '@salesforce/core';
8
- import { SfCommand, Flags, arrayWithDeprecation } from '@salesforce/sf-plugins-core';
9
- import { importFromPlan } from '../../../../api/data/tree/importPlan.js';
10
- import { importFromFiles } from '../../../../api/data/tree/importFiles.js';
11
- import { orgFlags } from '../../../../flags.js';
12
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
- const messages = Messages.loadMessages('@salesforce/plugin-data', 'tree.import.beta');
14
- /**
15
- * Command that provides data import capability via the SObject Tree Save API.
16
- */
17
- export default class Import extends SfCommand {
18
- static summary = messages.getMessage('summary');
19
- static description = messages.getMessage('description');
20
- static examples = messages.getMessages('examples');
21
- // TODO: when you remove the beta state, put the force: aliases back in
22
- static state = 'beta';
23
- static flags = {
24
- ...orgFlags,
25
- files: arrayWithDeprecation({
26
- char: 'f',
27
- summary: messages.getMessage('flags.files.summary'),
28
- exactlyOne: ['files', 'plan'],
29
- aliases: ['sobjecttreefiles'],
30
- deprecateAliases: true,
31
- }),
32
- plan: Flags.file({
33
- char: 'p',
34
- summary: messages.getMessage('flags.plan.summary'),
35
- exactlyOne: ['files', 'plan'],
36
- exists: true,
37
- }),
38
- };
39
- async run() {
40
- const { flags } = await this.parse(Import);
41
- const conn = flags['target-org'].getConnection(flags['api-version']);
42
- const results = flags.plan ? await importFromPlan(conn, flags.plan) : await importFromFiles(conn, flags.files);
43
- this.styledHeader('Import Results');
44
- this.table(results, {
45
- refId: { header: 'Reference ID' },
46
- type: { header: 'Type' },
47
- id: { header: 'ID' },
48
- });
49
- return results;
50
- }
51
- }
52
- //# sourceMappingURL=tree.js.map
@@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;YACf,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAClD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;YAC7B,MAAM,EAAE,IAAI;SACb,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE3C,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QACrE,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAE/G,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YAClB,KAAK,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;YACjC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACrB,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC"}
@@ -1,43 +0,0 @@
1
- # summary
2
-
3
- Import data from one or more JSON files into an org.
4
-
5
- # description
6
-
7
- The JSON files that contain the data are in sObject tree format, which is a collection of nested, parent-child records with a single root record. Use the "<%= config.bin %> data export tree" command to generate these JSON files.
8
-
9
- If you used the --plan flag when exporting the data to generate a plan definition file, use the --plan flag to reference the file when you import. If you're not using a plan, use the --files flag to list the files. If you specify multiple JSON files that depend on each other in a parent-child relationship, be sure you list them in the correct order.
10
-
11
- # flags.files.summary
12
-
13
- Comma-separated and in-order JSON files that contain the records, in sObject tree format, that you want to insert.
14
-
15
- # flag.files.description
16
-
17
- Each file can contain up to 200 total records. For more information, see the REST API Developer Guide. (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm)
18
-
19
- # flags.plan.summary
20
-
21
- Plan definition file to insert multiple data files.
22
-
23
- # flags.plan.description
24
-
25
- Unlike the `--files` flag, the files listed in the plan definition file **can** contain more then 200 records. These will be automatically batched to comply with that limit.
26
-
27
- The file order matters--records with lookups to records in another file should be listed AFTER that file Example: you're loading Account and Contact records, and the contacts have references to those Accounts. The Accounts file should come before the Contacts file.
28
-
29
- The plan definition file has the following schema:
30
-
31
- - items(object) - SObject Type: Definition of records to be insert per SObject Type
32
- - sobject(string) - Name of SObject: Child file references must have SObject roots of this type
33
- - files(array) - Files: An array of files paths to load
34
-
35
- # examples
36
-
37
- - Import the records contained in two JSON files into the org with alias "my-scratch":
38
-
39
- <%= config.bin %> <%= command.id %> --files Contact.json,Account.json --target-org my-scratch
40
-
41
- - Import records using a plan definition file into your default org:
42
-
43
- <%= config.bin %> <%= command.id %> --plan Account-Contact-plan.json