@simplysf/simply-data 1.3.1 → 1.5.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/CHANGELOG.md +18 -0
- package/README.md +48 -2
- package/lib/commands/simply/data/files/download.d.ts +14 -0
- package/lib/commands/simply/data/files/download.js +110 -0
- package/lib/commands/simply/data/files/download.js.map +1 -0
- package/lib/commands/simply/data/files/upload.js +5 -2
- package/lib/commands/simply/data/files/upload.js.map +1 -1
- package/lib/common/contentVersionTypes.d.ts +17 -7
- package/lib/common/contentVersionUtils.d.ts +2 -1
- package/lib/common/contentVersionUtils.js +10 -0
- package/lib/common/contentVersionUtils.js.map +1 -1
- package/messages/simply.data.files.download.md +33 -0
- package/npm-shrinkwrap.json +35 -2
- package/oclif.lock +22 -28
- package/oclif.manifest.json +107 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [1.5.0](https://github.com/SimplySF/simply-data/compare/1.4.0...1.5.0) (2024-05-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* fix incorrect deps ([98915e6](https://github.com/SimplySF/simply-data/commit/98915e6b7b82e711c71841d07a66cda19e36de6c))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [1.4.0](https://github.com/SimplySF/simply-data/compare/1.3.1...1.4.0) (2024-05-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add download files ([96b84cc](https://github.com/SimplySF/simply-data/commit/96b84cc7e291d186372c07ab98b932ae985c48cd))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [1.3.1](https://github.com/SimplySF/simply-data/compare/1.3.0...1.3.1) (2024-05-04)
|
|
2
20
|
|
|
3
21
|
|
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ sf plugins
|
|
|
57
57
|
|
|
58
58
|
<!-- commands -->
|
|
59
59
|
* [`sf simply data file upload`](#sf-simply-data-file-upload)
|
|
60
|
+
* [`sf simply data files download`](#sf-simply-data-files-download)
|
|
60
61
|
* [`sf simply data files upload`](#sf-simply-data-files-upload)
|
|
61
62
|
|
|
62
63
|
## `sf simply data file upload`
|
|
@@ -91,7 +92,52 @@ EXAMPLES
|
|
|
91
92
|
$ sf simply data file upload --file-path fileToUpload.txt --first-publish-location-id 0019000000DmehK --target-org myTargetOrg
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
_See code: [src/commands/simply/data/file/upload.ts](https://github.com/SimplySF/simply-data/blob/1.
|
|
95
|
+
_See code: [src/commands/simply/data/file/upload.ts](https://github.com/SimplySF/simply-data/blob/1.5.0/src/commands/simply/data/file/upload.ts)_
|
|
96
|
+
|
|
97
|
+
## `sf simply data files download`
|
|
98
|
+
|
|
99
|
+
Download files from a Salesforce org.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
USAGE
|
|
103
|
+
$ sf simply data files download -o <value> --where-content-version <value> [--json] [--flags-dir <value>] [--api-version
|
|
104
|
+
<value>] [--max-parallel-jobs <value>]
|
|
105
|
+
|
|
106
|
+
FLAGS
|
|
107
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
108
|
+
configuration variable is already set.
|
|
109
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
110
|
+
--max-parallel-jobs=<value> [default: 1] Maximum number of parallel jobs.
|
|
111
|
+
--where-content-version=<value> (required) WHERE clause for ContentVersion query.
|
|
112
|
+
|
|
113
|
+
GLOBAL FLAGS
|
|
114
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
115
|
+
--json Format output as json.
|
|
116
|
+
|
|
117
|
+
DESCRIPTION
|
|
118
|
+
Download files from a Salesforce org.
|
|
119
|
+
|
|
120
|
+
Downloads files specified by a where clause for a ContentVersion query from a Salesforce org. By default, the plugin
|
|
121
|
+
uses the REST API for the download as to allow for the streaming of large files without issue. This means that each
|
|
122
|
+
file will use one REST API request.
|
|
123
|
+
|
|
124
|
+
EXAMPLES
|
|
125
|
+
$ sf simply data files download --where-content-version "IsLatest=true" --target-org myTargetOrg
|
|
126
|
+
|
|
127
|
+
$ sf simply data files download --where-content-version "IsLatest=true" --max-parallel-jobs 5 --target-org myTargetOrg
|
|
128
|
+
|
|
129
|
+
FLAG DESCRIPTIONS
|
|
130
|
+
--max-parallel-jobs=<value> Maximum number of parallel jobs.
|
|
131
|
+
|
|
132
|
+
By default the plugin will only process a single file download at a time. You can increase this value to allow for
|
|
133
|
+
quasi concurrent downloads. Please note that setting this value too high can cause performance issues.
|
|
134
|
+
|
|
135
|
+
--where-content-version=<value> WHERE clause for ContentVersion query.
|
|
136
|
+
|
|
137
|
+
Provide a WHERE clause to allow the plugin to specify which ContentVersion records should be downloaded.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
_See code: [src/commands/simply/data/files/download.ts](https://github.com/SimplySF/simply-data/blob/1.5.0/src/commands/simply/data/files/download.ts)_
|
|
95
141
|
|
|
96
142
|
## `sf simply data files upload`
|
|
97
143
|
|
|
@@ -136,5 +182,5 @@ FLAG DESCRIPTIONS
|
|
|
136
182
|
quasi concurrent uploads. Please note that setting this value too high can cause performance issues.
|
|
137
183
|
```
|
|
138
184
|
|
|
139
|
-
_See code: [src/commands/simply/data/files/upload.ts](https://github.com/SimplySF/simply-data/blob/1.
|
|
185
|
+
_See code: [src/commands/simply/data/files/upload.ts](https://github.com/SimplySF/simply-data/blob/1.5.0/src/commands/simply/data/files/upload.ts)_
|
|
140
186
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class DataFilesDownload extends SfCommand<void> {
|
|
3
|
+
static readonly summary: string;
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
8
|
+
'max-parallel-jobs': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
|
+
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
+
'where-content-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
|
+
'flags-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024, Clay Chipps; 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 fs from 'node:fs';
|
|
8
|
+
import { createObjectCsvWriter } from 'csv-writer';
|
|
9
|
+
import PQueue from 'p-queue';
|
|
10
|
+
import { Messages } from '@salesforce/core';
|
|
11
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
12
|
+
import { downloadContentVersion } from '../../../../common/contentVersionUtils.js';
|
|
13
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
|
+
const messages = Messages.loadMessages('@simplysf/simply-data', 'simply.data.files.download');
|
|
15
|
+
export default class DataFilesDownload extends SfCommand {
|
|
16
|
+
static summary = messages.getMessage('summary');
|
|
17
|
+
static description = messages.getMessage('description');
|
|
18
|
+
static examples = messages.getMessages('examples');
|
|
19
|
+
static flags = {
|
|
20
|
+
...SfCommand.baseFlags,
|
|
21
|
+
'api-version': Flags.orgApiVersion(),
|
|
22
|
+
'max-parallel-jobs': Flags.integer({
|
|
23
|
+
summary: messages.getMessage('flags.max-parallel-jobs.summary'),
|
|
24
|
+
description: messages.getMessage('flags.max-parallel-jobs.description'),
|
|
25
|
+
default: 1,
|
|
26
|
+
}),
|
|
27
|
+
'target-org': Flags.requiredOrg(),
|
|
28
|
+
'where-content-version': Flags.string({
|
|
29
|
+
summary: messages.getMessage('flags.where-content-version.summary'),
|
|
30
|
+
description: messages.getMessage('flags.where-content-version.description'),
|
|
31
|
+
required: true,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { flags } = await this.parse(DataFilesDownload);
|
|
36
|
+
// Authorize to the target org
|
|
37
|
+
const targetOrgConnection = flags['target-org']?.getConnection(flags['api-version']);
|
|
38
|
+
if (!targetOrgConnection) {
|
|
39
|
+
throw messages.createError('error.targetOrgConnectionFailed');
|
|
40
|
+
}
|
|
41
|
+
this.spinner.start('Querying for files', '\n', { stdout: true });
|
|
42
|
+
const result = await targetOrgConnection.query(`SELECT ContentDocumentId, ContentSize, Description, FileExtension, FileType, FirstPublishLocationId, Id, IsLatest, PathOnClient, Title FROM ContentVersion WHERE ${flags['where-content-version']}`, {
|
|
43
|
+
autoFetch: true,
|
|
44
|
+
maxFetch: this.configAggregator.getInfo('org-max-query-limit').value ?? 50_000,
|
|
45
|
+
scanAll: false,
|
|
46
|
+
});
|
|
47
|
+
const contentVersionDownloads = result.records;
|
|
48
|
+
this.spinner.start('Initializing file download', '\n', { stdout: true });
|
|
49
|
+
if (!fs.existsSync('download')) {
|
|
50
|
+
fs.mkdirSync('download');
|
|
51
|
+
}
|
|
52
|
+
const successWriter = createObjectCsvWriter({
|
|
53
|
+
path: 'download/success.csv',
|
|
54
|
+
header: [
|
|
55
|
+
{ id: 'Id', title: 'Id' },
|
|
56
|
+
{ id: 'ContentDocumentId', title: 'ContentDocumentId' },
|
|
57
|
+
{ id: 'ContentSize', title: 'ContentSize' },
|
|
58
|
+
{ id: 'Description', title: 'Description' },
|
|
59
|
+
{ id: 'FileExtension', title: 'FileExtension' },
|
|
60
|
+
{ id: 'FileType', title: 'FileType' },
|
|
61
|
+
{ id: 'FirstPublishLocationId', title: 'FirstPublishLocationId' },
|
|
62
|
+
{ id: 'IsLatest', title: 'IsLatest' },
|
|
63
|
+
{ id: 'PathOnClient', title: 'PathOnClient' },
|
|
64
|
+
{ id: 'Title', title: 'Title' },
|
|
65
|
+
{ id: 'FilePath', title: 'FilePath' },
|
|
66
|
+
],
|
|
67
|
+
});
|
|
68
|
+
const errorWriter = createObjectCsvWriter({
|
|
69
|
+
path: 'download/error.csv',
|
|
70
|
+
header: [
|
|
71
|
+
{ id: 'Id', title: 'Id' },
|
|
72
|
+
{ id: 'ContentDocumentId', title: 'ContentDocumentId' },
|
|
73
|
+
{ id: 'ContentSize', title: 'ContentSize' },
|
|
74
|
+
{ id: 'Description', title: 'Description' },
|
|
75
|
+
{ id: 'FileExtension', title: 'FileExtension' },
|
|
76
|
+
{ id: 'FileType', title: 'FileType' },
|
|
77
|
+
{ id: 'FirstPublishLocationId', title: 'FirstPublishLocationId' },
|
|
78
|
+
{ id: 'IsLatest', title: 'IsLatest' },
|
|
79
|
+
{ id: 'PathOnClient', title: 'PathOnClient' },
|
|
80
|
+
{ id: 'Title', title: 'Title' },
|
|
81
|
+
{ id: 'Error', title: 'Error' },
|
|
82
|
+
],
|
|
83
|
+
});
|
|
84
|
+
this.spinner.start('Downloading files', '\n', { stdout: true });
|
|
85
|
+
const downloadQueue = new PQueue({ concurrency: flags['max-parallel-jobs'] });
|
|
86
|
+
let count = 0;
|
|
87
|
+
downloadQueue.on('add', () => {
|
|
88
|
+
this.spinner.status = `Completed: ${count}. Size: ${downloadQueue.size} Pending: ${downloadQueue.pending}\n`;
|
|
89
|
+
});
|
|
90
|
+
downloadQueue.on('completed', () => {
|
|
91
|
+
count++;
|
|
92
|
+
this.spinner.status = `Completed: ${count}. Size: ${downloadQueue.size} Pending: ${downloadQueue.pending}\n`;
|
|
93
|
+
});
|
|
94
|
+
for await (const contentVersionDownload of contentVersionDownloads) {
|
|
95
|
+
void downloadQueue.add(async () => {
|
|
96
|
+
try {
|
|
97
|
+
contentVersionDownload.FilePath = await downloadContentVersion(targetOrgConnection, contentVersionDownload, 'download');
|
|
98
|
+
await successWriter.writeRecords([contentVersionDownload]);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
contentVersionDownload.Error = error;
|
|
102
|
+
await errorWriter.writeRecords([contentVersionDownload]);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
await downloadQueue.onIdle();
|
|
107
|
+
this.spinner.stop();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/commands/simply/data/files/download.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAGnF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,CAAC;AAE9F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAe;IACrD,MAAM,CAAU,OAAO,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,cAAc,KAAK,WAAW,aAAa,CAAC,IAAI,cAAc,aAAa,CAAC,OAAO,IAAI,CAAC;QAChH,CAAC,CAAC,CAAC;QAEH,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;YACjC,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,cAAc,KAAK,WAAW,aAAa,CAAC,IAAI,cAAc,aAAa,CAAC,OAAO,IAAI,CAAC;QAChH,CAAC,CAAC,CAAC;QAEH,IAAI,KAAK,EAAE,MAAM,sBAAsB,IAAI,uBAAuB,EAAE,CAAC;YACnE,KAAK,aAAa,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;gBAChC,IAAI,CAAC;oBACH,sBAAsB,CAAC,QAAQ,GAAG,MAAM,sBAAsB,CAC5D,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,CACX,CAAC;oBACF,MAAM,aAAa,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC;gBAC7D,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,sBAAsB,CAAC,KAAK,GAAG,KAAe,CAAC;oBAC/C,MAAM,WAAW,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC"}
|
|
@@ -40,8 +40,11 @@ export default class DataFilesUpload extends SfCommand {
|
|
|
40
40
|
throw messages.createError('error.targetOrgConnectionFailed');
|
|
41
41
|
}
|
|
42
42
|
this.spinner.start('Initializing file upload', '\n', { stdout: true });
|
|
43
|
+
if (!fs.existsSync('upload')) {
|
|
44
|
+
fs.mkdirSync('upload');
|
|
45
|
+
}
|
|
43
46
|
const successWriter = createObjectCsvWriter({
|
|
44
|
-
path: 'success.csv',
|
|
47
|
+
path: 'upload/success.csv',
|
|
45
48
|
header: [
|
|
46
49
|
{ id: 'PathOnClient', title: 'PathOnClient' },
|
|
47
50
|
{ id: 'Title', title: 'Title' },
|
|
@@ -50,7 +53,7 @@ export default class DataFilesUpload extends SfCommand {
|
|
|
50
53
|
],
|
|
51
54
|
});
|
|
52
55
|
const errorWriter = createObjectCsvWriter({
|
|
53
|
-
path: 'error.csv',
|
|
56
|
+
path: 'upload/error.csv',
|
|
54
57
|
header: [
|
|
55
58
|
{ id: 'PathOnClient', title: 'PathOnClient' },
|
|
56
59
|
{ id: 'Title', title: 'Title' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../../src/commands/simply/data/files/upload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAGjF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,CAAC;AAE5F,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,SAAe;IACnD,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,Q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M,oBAAoB,CAC/C,mBAAmB,EACnB,sBAAsB,CAAC,YAAY,EACnC,sBAAsB,CAAC,KAAK,EAC5B,sBAAsB,CAAC,sBAAsB,CAC9C,CAAC;oBACF,sBAAsB,CAAC,iBAAiB,GAAG,cAAc,CAAC,iBAAiB,CAAC;oBAC5E,MAAM,aAAa,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC;gBAC7D,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,sBAAsB,CAAC,KAAK,GAAG,KAAe,CAAC;oBAC/C,MAAM,WAAW,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;QAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
export
|
|
2
|
-
ContentDocumentId
|
|
1
|
+
export type ContentVersion = {
|
|
2
|
+
ContentDocumentId: string;
|
|
3
|
+
ContentSize: string;
|
|
4
|
+
Description: string;
|
|
3
5
|
FileExtension: string;
|
|
6
|
+
FileType: string;
|
|
7
|
+
FirstPublishLocationId: string;
|
|
4
8
|
Id: string;
|
|
9
|
+
IsLatest: string;
|
|
10
|
+
PathOnClient: string;
|
|
5
11
|
Title: string;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
12
|
+
};
|
|
13
|
+
export type ContentVersionCreateRequest = {
|
|
8
14
|
FirstPublishLocationId?: string;
|
|
9
15
|
PathOnClient: string;
|
|
10
16
|
Title?: string;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
17
|
+
};
|
|
18
|
+
export type ContentVersionCreateResult = {
|
|
13
19
|
id: string;
|
|
14
20
|
success: boolean;
|
|
15
21
|
errors: string[];
|
|
16
22
|
name: string;
|
|
17
23
|
message: string;
|
|
18
|
-
}
|
|
24
|
+
};
|
|
25
|
+
export type ContentVersionDownload = ContentVersion & {
|
|
26
|
+
Error?: string;
|
|
27
|
+
FilePath?: string;
|
|
28
|
+
};
|
|
19
29
|
export type ContentVersionToUpload = {
|
|
20
30
|
ContentDocumentId?: string;
|
|
21
31
|
Error?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
|
-
import { ContentVersion } from './contentVersionTypes.js';
|
|
2
|
+
import { ContentVersion, ContentVersionDownload } from './contentVersionTypes.js';
|
|
3
|
+
export declare function downloadContentVersion(targetOrgConnection: Connection, contentVersionDownload: ContentVersionDownload, downloadDirectory: string): Promise<string>;
|
|
3
4
|
export declare function uploadContentVersion(targetOrgConnection: Connection, pathOnClient: string, title?: string, firstPublishLocationId?: string): Promise<ContentVersion>;
|
|
@@ -6,8 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import path from 'node:path';
|
|
9
|
+
import stream from 'node:stream';
|
|
9
10
|
import FormData from 'form-data';
|
|
10
11
|
import got from 'got';
|
|
12
|
+
export async function downloadContentVersion(targetOrgConnection, contentVersionDownload, downloadDirectory) {
|
|
13
|
+
const filePath = `${downloadDirectory}/${contentVersionDownload.ContentDocumentId}_${contentVersionDownload.Title.replaceAll(' ', '_')}.${contentVersionDownload.FileExtension}`;
|
|
14
|
+
await stream.promises.pipeline(got.stream(`${targetOrgConnection.baseUrl()}/sobjects/ContentVersion/${contentVersionDownload.Id}/VersionData`, {
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${targetOrgConnection.accessToken}`,
|
|
17
|
+
},
|
|
18
|
+
}), fs.createWriteStream(filePath));
|
|
19
|
+
return filePath;
|
|
20
|
+
}
|
|
11
21
|
export async function uploadContentVersion(targetOrgConnection, pathOnClient, title, firstPublishLocationId) {
|
|
12
22
|
// Check that we have access to the file
|
|
13
23
|
await fs.promises.access(pathOnClient, fs.constants.F_OK);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentVersionUtils.js","sourceRoot":"","sources":["../../src/common/contentVersionUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,GAAG,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"contentVersionUtils.js","sourceRoot":"","sources":["../../src/common/contentVersionUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,GAAG,MAAM,KAAK,CAAC;AAStB,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,mBAA+B,EAC/B,sBAA8C,EAC9C,iBAAyB;IAEzB,MAAM,QAAQ,GAAG,GAAG,iBAAiB,IACnC,sBAAsB,CAAC,iBACzB,IAAI,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,sBAAsB,CAAC,aAAa,EAAE,CAAC;IAEhG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAC5B,GAAG,CAAC,MAAM,CAAC,GAAG,mBAAmB,CAAC,OAAO,EAAE,4BAA4B,sBAAsB,CAAC,EAAE,cAAc,EAAE;QAC9G,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,mBAAmB,CAAC,WAAW,EAAE;SAC3D;KACF,CAAC,EACF,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAC/B,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,mBAA+B,EAC/B,YAAoB,EACpB,KAAc,EACd,sBAA+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
+
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.
|
|
8
|
+
|
|
9
|
+
# flags.max-parallel-jobs.summary
|
|
10
|
+
|
|
11
|
+
Maximum number of parallel jobs.
|
|
12
|
+
|
|
13
|
+
# flags.max-parallel-jobs.description
|
|
14
|
+
|
|
15
|
+
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.
|
|
16
|
+
|
|
17
|
+
# flags.where-content-version.summary
|
|
18
|
+
|
|
19
|
+
WHERE clause for ContentVersion query.
|
|
20
|
+
|
|
21
|
+
# flags.where-content-version.description
|
|
22
|
+
|
|
23
|
+
Provide a WHERE clause to allow the plugin to specify which ContentVersion records should be downloaded.
|
|
24
|
+
|
|
25
|
+
# examples
|
|
26
|
+
|
|
27
|
+
- <%= config.bin %> <%= command.id %> --where-content-version "IsLatest=true" --target-org myTargetOrg
|
|
28
|
+
|
|
29
|
+
- <%= config.bin %> <%= command.id %> --where-content-version "IsLatest=true" --max-parallel-jobs 5 --target-org myTargetOrg
|
|
30
|
+
|
|
31
|
+
# error.targetOrgConnectionFailed
|
|
32
|
+
|
|
33
|
+
Unable to establish connection to the org.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysf/simply-data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@simplysf/simply-data",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.5.0",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^3.26.4",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@simplysf/dev-scripts": "^3.0.0",
|
|
28
28
|
"@types/shelljs": "^0.8.15",
|
|
29
29
|
"eslint-plugin-sf-plugin": "^1.18.2",
|
|
30
|
+
"nock": "^13.5.4",
|
|
30
31
|
"oclif": "^4.10.1",
|
|
31
32
|
"shelljs": "^0.8.5",
|
|
32
33
|
"ts-node": "^10.9.2",
|
|
@@ -11548,6 +11549,13 @@
|
|
|
11548
11549
|
"dev": true,
|
|
11549
11550
|
"license": "MIT"
|
|
11550
11551
|
},
|
|
11552
|
+
"node_modules/json-stringify-safe": {
|
|
11553
|
+
"version": "5.0.1",
|
|
11554
|
+
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
|
11555
|
+
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
|
|
11556
|
+
"dev": true,
|
|
11557
|
+
"license": "ISC"
|
|
11558
|
+
},
|
|
11551
11559
|
"node_modules/json5": {
|
|
11552
11560
|
"version": "2.2.3",
|
|
11553
11561
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
|
@@ -12680,6 +12688,21 @@
|
|
|
12680
12688
|
"tslib": "^2.0.3"
|
|
12681
12689
|
}
|
|
12682
12690
|
},
|
|
12691
|
+
"node_modules/nock": {
|
|
12692
|
+
"version": "13.5.4",
|
|
12693
|
+
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz",
|
|
12694
|
+
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==",
|
|
12695
|
+
"dev": true,
|
|
12696
|
+
"license": "MIT",
|
|
12697
|
+
"dependencies": {
|
|
12698
|
+
"debug": "^4.1.0",
|
|
12699
|
+
"json-stringify-safe": "^5.0.1",
|
|
12700
|
+
"propagate": "^2.0.0"
|
|
12701
|
+
},
|
|
12702
|
+
"engines": {
|
|
12703
|
+
"node": ">= 10.13"
|
|
12704
|
+
}
|
|
12705
|
+
},
|
|
12683
12706
|
"node_modules/node-fetch": {
|
|
12684
12707
|
"version": "2.7.0",
|
|
12685
12708
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
|
@@ -13630,6 +13653,16 @@
|
|
|
13630
13653
|
"integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==",
|
|
13631
13654
|
"license": "MIT"
|
|
13632
13655
|
},
|
|
13656
|
+
"node_modules/propagate": {
|
|
13657
|
+
"version": "2.0.1",
|
|
13658
|
+
"resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz",
|
|
13659
|
+
"integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==",
|
|
13660
|
+
"dev": true,
|
|
13661
|
+
"license": "MIT",
|
|
13662
|
+
"engines": {
|
|
13663
|
+
"node": ">= 8"
|
|
13664
|
+
}
|
|
13665
|
+
},
|
|
13633
13666
|
"node_modules/proper-lockfile": {
|
|
13634
13667
|
"version": "4.1.2",
|
|
13635
13668
|
"resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
package/oclif.lock
CHANGED
|
@@ -5340,6 +5340,11 @@ json-stable-stringify-without-jsonify@^1.0.1:
|
|
|
5340
5340
|
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
|
5341
5341
|
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
|
|
5342
5342
|
|
|
5343
|
+
json-stringify-safe@^5.0.1:
|
|
5344
|
+
version "5.0.1"
|
|
5345
|
+
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
|
5346
|
+
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
|
|
5347
|
+
|
|
5343
5348
|
json5@^1.0.2:
|
|
5344
5349
|
version "1.0.2"
|
|
5345
5350
|
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
|
|
@@ -5966,6 +5971,15 @@ no-case@^3.0.4:
|
|
|
5966
5971
|
lower-case "^2.0.2"
|
|
5967
5972
|
tslib "^2.0.3"
|
|
5968
5973
|
|
|
5974
|
+
nock@^13.5.4:
|
|
5975
|
+
version "13.5.4"
|
|
5976
|
+
resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479"
|
|
5977
|
+
integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==
|
|
5978
|
+
dependencies:
|
|
5979
|
+
debug "^4.1.0"
|
|
5980
|
+
json-stringify-safe "^5.0.1"
|
|
5981
|
+
propagate "^2.0.0"
|
|
5982
|
+
|
|
5969
5983
|
node-fetch@^2.6.1, node-fetch@^2.6.9:
|
|
5970
5984
|
version "2.7.0"
|
|
5971
5985
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
|
@@ -6475,6 +6489,11 @@ process@^0.11.10:
|
|
|
6475
6489
|
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
|
6476
6490
|
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
|
|
6477
6491
|
|
|
6492
|
+
propagate@^2.0.0:
|
|
6493
|
+
version "2.0.1"
|
|
6494
|
+
resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45"
|
|
6495
|
+
integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==
|
|
6496
|
+
|
|
6478
6497
|
proper-lockfile@^4.1.2:
|
|
6479
6498
|
version "4.1.2"
|
|
6480
6499
|
resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f"
|
|
@@ -7101,16 +7120,7 @@ srcset@^5.0.0:
|
|
|
7101
7120
|
resolved "https://registry.yarnpkg.com/srcset/-/srcset-5.0.0.tgz#9df6c3961b5b44a02532ce6ae4544832609e2e3f"
|
|
7102
7121
|
integrity sha512-SqEZaAEhe0A6ETEa9O1IhSPC7MdvehZtCnTR0AftXk3QhY2UNgb+NApFOUPZILXk/YTDfFxMTNJOBpzrJsEdIA==
|
|
7103
7122
|
|
|
7104
|
-
"string-width-cjs@npm:string-width@^4.2.0":
|
|
7105
|
-
version "4.2.3"
|
|
7106
|
-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
|
7107
|
-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
|
7108
|
-
dependencies:
|
|
7109
|
-
emoji-regex "^8.0.0"
|
|
7110
|
-
is-fullwidth-code-point "^3.0.0"
|
|
7111
|
-
strip-ansi "^6.0.1"
|
|
7112
|
-
|
|
7113
|
-
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
|
7123
|
+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
|
7114
7124
|
version "4.2.3"
|
|
7115
7125
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
|
7116
7126
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
|
@@ -7169,14 +7179,7 @@ string_decoder@~1.1.1:
|
|
|
7169
7179
|
dependencies:
|
|
7170
7180
|
safe-buffer "~5.1.0"
|
|
7171
7181
|
|
|
7172
|
-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
|
|
7173
|
-
version "6.0.1"
|
|
7174
|
-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
|
7175
|
-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
|
7176
|
-
dependencies:
|
|
7177
|
-
ansi-regex "^5.0.1"
|
|
7178
|
-
|
|
7179
|
-
strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
|
7182
|
+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
|
7180
7183
|
version "6.0.1"
|
|
7181
7184
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
|
7182
7185
|
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
|
@@ -7714,7 +7717,7 @@ workerpool@6.2.1:
|
|
|
7714
7717
|
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
|
|
7715
7718
|
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==
|
|
7716
7719
|
|
|
7717
|
-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
|
|
7720
|
+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
|
|
7718
7721
|
version "7.0.0"
|
|
7719
7722
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
|
7720
7723
|
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
|
@@ -7732,15 +7735,6 @@ wrap-ansi@^6.2.0:
|
|
|
7732
7735
|
string-width "^4.1.0"
|
|
7733
7736
|
strip-ansi "^6.0.0"
|
|
7734
7737
|
|
|
7735
|
-
wrap-ansi@^7.0.0:
|
|
7736
|
-
version "7.0.0"
|
|
7737
|
-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
|
7738
|
-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
|
7739
|
-
dependencies:
|
|
7740
|
-
ansi-styles "^4.0.0"
|
|
7741
|
-
string-width "^4.1.0"
|
|
7742
|
-
strip-ansi "^6.0.0"
|
|
7743
|
-
|
|
7744
7738
|
wrap-ansi@^8.1.0:
|
|
7745
7739
|
version "8.1.0"
|
|
7746
7740
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
|
package/oclif.manifest.json
CHANGED
|
@@ -110,6 +110,112 @@
|
|
|
110
110
|
"upload:file:data:simply"
|
|
111
111
|
]
|
|
112
112
|
},
|
|
113
|
+
"simply:data:files:download": {
|
|
114
|
+
"aliases": [],
|
|
115
|
+
"args": {},
|
|
116
|
+
"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.",
|
|
117
|
+
"examples": [
|
|
118
|
+
"<%= config.bin %> <%= command.id %> --where-content-version \"IsLatest=true\" --target-org myTargetOrg",
|
|
119
|
+
"<%= config.bin %> <%= command.id %> --where-content-version \"IsLatest=true\" --max-parallel-jobs 5 --target-org myTargetOrg"
|
|
120
|
+
],
|
|
121
|
+
"flags": {
|
|
122
|
+
"json": {
|
|
123
|
+
"description": "Format output as json.",
|
|
124
|
+
"helpGroup": "GLOBAL",
|
|
125
|
+
"name": "json",
|
|
126
|
+
"allowNo": false,
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"flags-dir": {
|
|
130
|
+
"helpGroup": "GLOBAL",
|
|
131
|
+
"name": "flags-dir",
|
|
132
|
+
"summary": "Import flag values from a directory.",
|
|
133
|
+
"hasDynamicHelp": false,
|
|
134
|
+
"multiple": false,
|
|
135
|
+
"type": "option"
|
|
136
|
+
},
|
|
137
|
+
"api-version": {
|
|
138
|
+
"description": "Override the api version used for api requests made by this command",
|
|
139
|
+
"name": "api-version",
|
|
140
|
+
"hasDynamicHelp": false,
|
|
141
|
+
"multiple": false,
|
|
142
|
+
"type": "option"
|
|
143
|
+
},
|
|
144
|
+
"max-parallel-jobs": {
|
|
145
|
+
"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.",
|
|
146
|
+
"name": "max-parallel-jobs",
|
|
147
|
+
"summary": "Maximum number of parallel jobs.",
|
|
148
|
+
"default": 1,
|
|
149
|
+
"hasDynamicHelp": false,
|
|
150
|
+
"multiple": false,
|
|
151
|
+
"type": "option"
|
|
152
|
+
},
|
|
153
|
+
"target-org": {
|
|
154
|
+
"char": "o",
|
|
155
|
+
"name": "target-org",
|
|
156
|
+
"noCacheDefault": true,
|
|
157
|
+
"required": true,
|
|
158
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
159
|
+
"hasDynamicHelp": true,
|
|
160
|
+
"multiple": false,
|
|
161
|
+
"type": "option"
|
|
162
|
+
},
|
|
163
|
+
"where-content-version": {
|
|
164
|
+
"description": "Provide a WHERE clause to allow the plugin to specify which ContentVersion records should be downloaded.",
|
|
165
|
+
"name": "where-content-version",
|
|
166
|
+
"required": true,
|
|
167
|
+
"summary": "WHERE clause for ContentVersion query.",
|
|
168
|
+
"hasDynamicHelp": false,
|
|
169
|
+
"multiple": false,
|
|
170
|
+
"type": "option"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"hasDynamicHelp": true,
|
|
174
|
+
"hiddenAliases": [],
|
|
175
|
+
"id": "simply:data:files:download",
|
|
176
|
+
"pluginAlias": "@simplysf/simply-data",
|
|
177
|
+
"pluginName": "@simplysf/simply-data",
|
|
178
|
+
"pluginType": "core",
|
|
179
|
+
"strict": true,
|
|
180
|
+
"summary": "Download files from a Salesforce org.",
|
|
181
|
+
"enableJsonFlag": true,
|
|
182
|
+
"isESM": true,
|
|
183
|
+
"relativePath": [
|
|
184
|
+
"lib",
|
|
185
|
+
"commands",
|
|
186
|
+
"simply",
|
|
187
|
+
"data",
|
|
188
|
+
"files",
|
|
189
|
+
"download.js"
|
|
190
|
+
],
|
|
191
|
+
"aliasPermutations": [],
|
|
192
|
+
"permutations": [
|
|
193
|
+
"simply:data:files:download",
|
|
194
|
+
"data:simply:files:download",
|
|
195
|
+
"data:files:simply:download",
|
|
196
|
+
"data:files:download:simply",
|
|
197
|
+
"simply:files:data:download",
|
|
198
|
+
"files:simply:data:download",
|
|
199
|
+
"files:data:simply:download",
|
|
200
|
+
"files:data:download:simply",
|
|
201
|
+
"simply:files:download:data",
|
|
202
|
+
"files:simply:download:data",
|
|
203
|
+
"files:download:simply:data",
|
|
204
|
+
"files:download:data:simply",
|
|
205
|
+
"simply:data:download:files",
|
|
206
|
+
"data:simply:download:files",
|
|
207
|
+
"data:download:simply:files",
|
|
208
|
+
"data:download:files:simply",
|
|
209
|
+
"simply:download:data:files",
|
|
210
|
+
"download:simply:data:files",
|
|
211
|
+
"download:data:simply:files",
|
|
212
|
+
"download:data:files:simply",
|
|
213
|
+
"simply:download:files:data",
|
|
214
|
+
"download:simply:files:data",
|
|
215
|
+
"download:files:simply:data",
|
|
216
|
+
"download:files:data:simply"
|
|
217
|
+
]
|
|
218
|
+
},
|
|
113
219
|
"simply:data:files:upload": {
|
|
114
220
|
"aliases": [],
|
|
115
221
|
"args": {},
|
|
@@ -217,5 +323,5 @@
|
|
|
217
323
|
]
|
|
218
324
|
}
|
|
219
325
|
},
|
|
220
|
-
"version": "1.
|
|
326
|
+
"version": "1.5.0"
|
|
221
327
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysf/simply-data",
|
|
3
3
|
"description": "Utilities for working with data",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"bugs": "https://github.com/SimplySF/simply-data/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@simplysf/dev-scripts": "^3.0.0",
|
|
24
24
|
"@types/shelljs": "^0.8.15",
|
|
25
25
|
"eslint-plugin-sf-plugin": "^1.18.2",
|
|
26
|
+
"nock": "^13.5.4",
|
|
26
27
|
"oclif": "^4.10.1",
|
|
27
28
|
"shelljs": "^0.8.5",
|
|
28
29
|
"ts-node": "^10.9.2",
|