@simplysf/simply-data 1.3.0 → 1.4.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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "commands": {
3
- "simply:data:file:upload": {
3
+ "simply:data:files:download": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Uploads a file to a Salesforce org.",
6
+ "description": "Downloads files specified by a where clause for a ContentVersion query from a Salesforce org. By default, the plugin uses the REST API for the download as to allow for the streaming of large files without issue. This means that each file will use one REST API request.",
7
7
  "examples": [
8
- "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --target-org myTargetOrg",
9
- "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --first-publish-location-id 0019000000DmehK --target-org myTargetOrg"
8
+ "<%= config.bin %> <%= command.id %> --where-content-version \"IsLatest=true\" --target-org myTargetOrg",
9
+ "<%= config.bin %> <%= command.id %> --where-content-version \"IsLatest=true\" --max-parallel-jobs 5 --target-org myTargetOrg"
10
10
  ],
11
11
  "flags": {
12
12
  "json": {
@@ -31,17 +31,11 @@
31
31
  "multiple": false,
32
32
  "type": "option"
33
33
  },
34
- "file-path": {
35
- "name": "file-path",
36
- "required": true,
37
- "summary": "Path to the file to upload.",
38
- "hasDynamicHelp": false,
39
- "multiple": false,
40
- "type": "option"
41
- },
42
- "first-publish-location-id": {
43
- "name": "first-publish-location-id",
44
- "summary": "Specify a record Id that the file should be linked to.",
34
+ "max-parallel-jobs": {
35
+ "description": "By default the plugin will only process a single file download at a time. You can increase this value to allow for quasi concurrent downloads. Please note that setting this value too high can cause performance issues.",
36
+ "name": "max-parallel-jobs",
37
+ "summary": "Maximum number of parallel jobs.",
38
+ "default": 1,
45
39
  "hasDynamicHelp": false,
46
40
  "multiple": false,
47
41
  "type": "option"
@@ -56,9 +50,11 @@
56
50
  "multiple": false,
57
51
  "type": "option"
58
52
  },
59
- "title": {
60
- "name": "title",
61
- "summary": "Specify the title for the file being uploaded.",
53
+ "where-content-version": {
54
+ "description": "Provide a WHERE clause to allow the plugin to specify which ContentVersion records should be downloaded.",
55
+ "name": "where-content-version",
56
+ "required": true,
57
+ "summary": "WHERE clause for ContentVersion query.",
62
58
  "hasDynamicHelp": false,
63
59
  "multiple": false,
64
60
  "type": "option"
@@ -66,12 +62,12 @@
66
62
  },
67
63
  "hasDynamicHelp": true,
68
64
  "hiddenAliases": [],
69
- "id": "simply:data:file:upload",
65
+ "id": "simply:data:files:download",
70
66
  "pluginAlias": "@simplysf/simply-data",
71
67
  "pluginName": "@simplysf/simply-data",
72
68
  "pluginType": "core",
73
69
  "strict": true,
74
- "summary": "Upload a file to a Salesforce org.",
70
+ "summary": "Download files from a Salesforce org.",
75
71
  "enableJsonFlag": true,
76
72
  "isESM": true,
77
73
  "relativePath": [
@@ -79,35 +75,35 @@
79
75
  "commands",
80
76
  "simply",
81
77
  "data",
82
- "file",
83
- "upload.js"
78
+ "files",
79
+ "download.js"
84
80
  ],
85
81
  "aliasPermutations": [],
86
82
  "permutations": [
87
- "simply:data:file:upload",
88
- "data:simply:file:upload",
89
- "data:file:simply:upload",
90
- "data:file:upload:simply",
91
- "simply:file:data:upload",
92
- "file:simply:data:upload",
93
- "file:data:simply:upload",
94
- "file:data:upload:simply",
95
- "simply:file:upload:data",
96
- "file:simply:upload:data",
97
- "file:upload:simply:data",
98
- "file:upload:data:simply",
99
- "simply:data:upload:file",
100
- "data:simply:upload:file",
101
- "data:upload:simply:file",
102
- "data:upload:file:simply",
103
- "simply:upload:data:file",
104
- "upload:simply:data:file",
105
- "upload:data:simply:file",
106
- "upload:data:file:simply",
107
- "simply:upload:file:data",
108
- "upload:simply:file:data",
109
- "upload:file:simply:data",
110
- "upload:file:data:simply"
83
+ "simply:data:files:download",
84
+ "data:simply:files:download",
85
+ "data:files:simply:download",
86
+ "data:files:download:simply",
87
+ "simply:files:data:download",
88
+ "files:simply:data:download",
89
+ "files:data:simply:download",
90
+ "files:data:download:simply",
91
+ "simply:files:download:data",
92
+ "files:simply:download:data",
93
+ "files:download:simply:data",
94
+ "files:download:data:simply",
95
+ "simply:data:download:files",
96
+ "data:simply:download:files",
97
+ "data:download:simply:files",
98
+ "data:download:files:simply",
99
+ "simply:download:data:files",
100
+ "download:simply:data:files",
101
+ "download:data:simply:files",
102
+ "download:data:files:simply",
103
+ "simply:download:files:data",
104
+ "download:simply:files:data",
105
+ "download:files:simply:data",
106
+ "download:files:data:simply"
111
107
  ]
112
108
  },
113
109
  "simply:data:files:upload": {
@@ -215,7 +211,117 @@
215
211
  "upload:files:simply:data",
216
212
  "upload:files:data:simply"
217
213
  ]
214
+ },
215
+ "simply:data:file:upload": {
216
+ "aliases": [],
217
+ "args": {},
218
+ "description": "Uploads a file to a Salesforce org.",
219
+ "examples": [
220
+ "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --target-org myTargetOrg",
221
+ "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --first-publish-location-id 0019000000DmehK --target-org myTargetOrg"
222
+ ],
223
+ "flags": {
224
+ "json": {
225
+ "description": "Format output as json.",
226
+ "helpGroup": "GLOBAL",
227
+ "name": "json",
228
+ "allowNo": false,
229
+ "type": "boolean"
230
+ },
231
+ "flags-dir": {
232
+ "helpGroup": "GLOBAL",
233
+ "name": "flags-dir",
234
+ "summary": "Import flag values from a directory.",
235
+ "hasDynamicHelp": false,
236
+ "multiple": false,
237
+ "type": "option"
238
+ },
239
+ "api-version": {
240
+ "description": "Override the api version used for api requests made by this command",
241
+ "name": "api-version",
242
+ "hasDynamicHelp": false,
243
+ "multiple": false,
244
+ "type": "option"
245
+ },
246
+ "file-path": {
247
+ "name": "file-path",
248
+ "required": true,
249
+ "summary": "Path to the file to upload.",
250
+ "hasDynamicHelp": false,
251
+ "multiple": false,
252
+ "type": "option"
253
+ },
254
+ "first-publish-location-id": {
255
+ "name": "first-publish-location-id",
256
+ "summary": "Specify a record Id that the file should be linked to.",
257
+ "hasDynamicHelp": false,
258
+ "multiple": false,
259
+ "type": "option"
260
+ },
261
+ "target-org": {
262
+ "char": "o",
263
+ "name": "target-org",
264
+ "noCacheDefault": true,
265
+ "required": true,
266
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
267
+ "hasDynamicHelp": true,
268
+ "multiple": false,
269
+ "type": "option"
270
+ },
271
+ "title": {
272
+ "name": "title",
273
+ "summary": "Specify the title for the file being uploaded.",
274
+ "hasDynamicHelp": false,
275
+ "multiple": false,
276
+ "type": "option"
277
+ }
278
+ },
279
+ "hasDynamicHelp": true,
280
+ "hiddenAliases": [],
281
+ "id": "simply:data:file:upload",
282
+ "pluginAlias": "@simplysf/simply-data",
283
+ "pluginName": "@simplysf/simply-data",
284
+ "pluginType": "core",
285
+ "strict": true,
286
+ "summary": "Upload a file to a Salesforce org.",
287
+ "enableJsonFlag": true,
288
+ "isESM": true,
289
+ "relativePath": [
290
+ "lib",
291
+ "commands",
292
+ "simply",
293
+ "data",
294
+ "file",
295
+ "upload.js"
296
+ ],
297
+ "aliasPermutations": [],
298
+ "permutations": [
299
+ "simply:data:file:upload",
300
+ "data:simply:file:upload",
301
+ "data:file:simply:upload",
302
+ "data:file:upload:simply",
303
+ "simply:file:data:upload",
304
+ "file:simply:data:upload",
305
+ "file:data:simply:upload",
306
+ "file:data:upload:simply",
307
+ "simply:file:upload:data",
308
+ "file:simply:upload:data",
309
+ "file:upload:simply:data",
310
+ "file:upload:data:simply",
311
+ "simply:data:upload:file",
312
+ "data:simply:upload:file",
313
+ "data:upload:simply:file",
314
+ "data:upload:file:simply",
315
+ "simply:upload:data:file",
316
+ "upload:simply:data:file",
317
+ "upload:data:simply:file",
318
+ "upload:data:file:simply",
319
+ "simply:upload:file:data",
320
+ "upload:simply:file:data",
321
+ "upload:file:simply:data",
322
+ "upload:file:data:simply"
323
+ ]
218
324
  }
219
325
  },
220
- "version": "1.3.0"
326
+ "version": "1.4.0"
221
327
  }
package/package.json CHANGED
@@ -1,29 +1,31 @@
1
1
  {
2
2
  "name": "@simplysf/simply-data",
3
3
  "description": "Utilities for working with data",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "author": "@ClayChipps",
6
6
  "bugs": "https://github.com/SimplySF/simply-data/issues",
7
7
  "dependencies": {
8
+ "@jsforce/jsforce-node": "^3.2.0",
8
9
  "@oclif/core": "^3.26.4",
9
- "@salesforce/core": "^7.3.1",
10
+ "@salesforce/core": "^7.3.3",
10
11
  "@salesforce/kit": "^3.1.1",
11
12
  "@salesforce/sf-plugins-core": "^9.0.5",
12
13
  "csv-parse": "^5.5.5",
13
14
  "csv-writer": "^1.6.0",
14
15
  "form-data": "^4.0.0",
15
16
  "got": "13.0.0",
17
+ "nock": "^13.5.4",
16
18
  "p-queue": "^8.0.1"
17
19
  },
18
20
  "devDependencies": {
19
21
  "@oclif/plugin-command-snapshot": "^5.1.7",
20
- "@salesforce/cli-plugins-testkit": "^5.3.0",
22
+ "@salesforce/cli-plugins-testkit": "^5.3.1",
21
23
  "@salesforce/plugin-command-reference": "^3.0.82",
22
24
  "@salesforce/ts-sinon": "1.4.19",
23
- "@simplysf/dev-scripts": "^2.1.2",
24
- "@types/shelljs": "^0.8.14",
25
- "eslint-plugin-sf-plugin": "^1.17.5",
26
- "oclif": "^4.9.0",
25
+ "@simplysf/dev-scripts": "^3.0.0",
26
+ "@types/shelljs": "^0.8.15",
27
+ "eslint-plugin-sf-plugin": "^1.18.2",
28
+ "oclif": "^4.10.1",
27
29
  "shelljs": "^0.8.5",
28
30
  "ts-node": "^10.9.2",
29
31
  "typescript": "^5.4.5"