@simplysf/simply-data 1.1.9-dev.1 → 1.2.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:files:download": {
3
+ "simply:data:file:upload": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Downloads files specified by a where clause to 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.",
6
+ "description": "Uploads a file to a Salesforce org.",
7
7
  "examples": [
8
- "<%= config.bin %> <%= command.id %> --where 'IsLatest=true' --target-org myTargetOrg",
9
- "<%= config.bin %> <%= command.id %> --where 'IsLatest=true' --max-parallel-jobs 5 --target-org myTargetOrg"
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"
10
10
  ],
11
11
  "flags": {
12
12
  "json": {
@@ -16,6 +16,14 @@
16
16
  "allowNo": false,
17
17
  "type": "boolean"
18
18
  },
19
+ "flags-dir": {
20
+ "helpGroup": "GLOBAL",
21
+ "name": "flags-dir",
22
+ "summary": "Import flag values from a directory.",
23
+ "hasDynamicHelp": false,
24
+ "multiple": false,
25
+ "type": "option"
26
+ },
19
27
  "api-version": {
20
28
  "description": "Override the api version used for api requests made by this command",
21
29
  "name": "api-version",
@@ -23,11 +31,17 @@
23
31
  "multiple": false,
24
32
  "type": "option"
25
33
  },
26
- "max-parallel-jobs": {
27
- "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.",
28
- "name": "max-parallel-jobs",
29
- "summary": "Maximum number of parallel jobs.",
30
- "default": 1,
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.",
31
45
  "hasDynamicHelp": false,
32
46
  "multiple": false,
33
47
  "type": "option"
@@ -42,11 +56,9 @@
42
56
  "multiple": false,
43
57
  "type": "option"
44
58
  },
45
- "where": {
46
- "description": "Provide a WHERE clause to allow the plugin to specify which ContentVersion records should be downloaded.",
47
- "name": "where",
48
- "required": true,
49
- "summary": "WHERE clause for ContentVersion query.",
59
+ "title": {
60
+ "name": "title",
61
+ "summary": "Specify the title for the file being uploaded.",
50
62
  "hasDynamicHelp": false,
51
63
  "multiple": false,
52
64
  "type": "option"
@@ -54,12 +66,12 @@
54
66
  },
55
67
  "hasDynamicHelp": true,
56
68
  "hiddenAliases": [],
57
- "id": "simply:data:files:download",
69
+ "id": "simply:data:file:upload",
58
70
  "pluginAlias": "@simplysf/simply-data",
59
71
  "pluginName": "@simplysf/simply-data",
60
72
  "pluginType": "core",
61
73
  "strict": true,
62
- "summary": "Download files from a Salesforce org.",
74
+ "summary": "Upload a file to a Salesforce org.",
63
75
  "enableJsonFlag": true,
64
76
  "isESM": true,
65
77
  "relativePath": [
@@ -67,35 +79,35 @@
67
79
  "commands",
68
80
  "simply",
69
81
  "data",
70
- "files",
71
- "download.js"
82
+ "file",
83
+ "upload.js"
72
84
  ],
73
85
  "aliasPermutations": [],
74
86
  "permutations": [
75
- "simply:data:files:download",
76
- "data:simply:files:download",
77
- "data:files:simply:download",
78
- "data:files:download:simply",
79
- "simply:files:data:download",
80
- "files:simply:data:download",
81
- "files:data:simply:download",
82
- "files:data:download:simply",
83
- "simply:files:download:data",
84
- "files:simply:download:data",
85
- "files:download:simply:data",
86
- "files:download:data:simply",
87
- "simply:data:download:files",
88
- "data:simply:download:files",
89
- "data:download:simply:files",
90
- "data:download:files:simply",
91
- "simply:download:data:files",
92
- "download:simply:data:files",
93
- "download:data:simply:files",
94
- "download:data:files:simply",
95
- "simply:download:files:data",
96
- "download:simply:files:data",
97
- "download:files:simply:data",
98
- "download:files:data:simply"
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"
99
111
  ]
100
112
  },
101
113
  "simply:data:files:upload": {
@@ -114,6 +126,14 @@
114
126
  "allowNo": false,
115
127
  "type": "boolean"
116
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
+ },
117
137
  "api-version": {
118
138
  "description": "Override the api version used for api requests made by this command",
119
139
  "name": "api-version",
@@ -195,109 +215,7 @@
195
215
  "upload:files:simply:data",
196
216
  "upload:files:data:simply"
197
217
  ]
198
- },
199
- "simply:data:file:upload": {
200
- "aliases": [],
201
- "args": {},
202
- "description": "Uploads a file to a Salesforce org.",
203
- "examples": [
204
- "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --target-org myTargetOrg",
205
- "<%= config.bin %> <%= command.id %> --file-path fileToUpload.txt --first-publish-location-id 0019000000DmehK --target-org myTargetOrg"
206
- ],
207
- "flags": {
208
- "json": {
209
- "description": "Format output as json.",
210
- "helpGroup": "GLOBAL",
211
- "name": "json",
212
- "allowNo": false,
213
- "type": "boolean"
214
- },
215
- "api-version": {
216
- "description": "Override the api version used for api requests made by this command",
217
- "name": "api-version",
218
- "hasDynamicHelp": false,
219
- "multiple": false,
220
- "type": "option"
221
- },
222
- "file-path": {
223
- "name": "file-path",
224
- "required": true,
225
- "summary": "Path to the file to upload.",
226
- "hasDynamicHelp": false,
227
- "multiple": false,
228
- "type": "option"
229
- },
230
- "first-publish-location-id": {
231
- "name": "first-publish-location-id",
232
- "summary": "Specify a record Id that the file should be linked to.",
233
- "hasDynamicHelp": false,
234
- "multiple": false,
235
- "type": "option"
236
- },
237
- "target-org": {
238
- "char": "o",
239
- "name": "target-org",
240
- "noCacheDefault": true,
241
- "required": true,
242
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
243
- "hasDynamicHelp": true,
244
- "multiple": false,
245
- "type": "option"
246
- },
247
- "title": {
248
- "name": "title",
249
- "summary": "Specify the title for the file being uploaded.",
250
- "hasDynamicHelp": false,
251
- "multiple": false,
252
- "type": "option"
253
- }
254
- },
255
- "hasDynamicHelp": true,
256
- "hiddenAliases": [],
257
- "id": "simply:data:file:upload",
258
- "pluginAlias": "@simplysf/simply-data",
259
- "pluginName": "@simplysf/simply-data",
260
- "pluginType": "core",
261
- "strict": true,
262
- "summary": "Upload a file to a Salesforce org.",
263
- "enableJsonFlag": true,
264
- "isESM": true,
265
- "relativePath": [
266
- "lib",
267
- "commands",
268
- "simply",
269
- "data",
270
- "file",
271
- "upload.js"
272
- ],
273
- "aliasPermutations": [],
274
- "permutations": [
275
- "simply:data:file:upload",
276
- "data:simply:file:upload",
277
- "data:file:simply:upload",
278
- "data:file:upload:simply",
279
- "simply:file:data:upload",
280
- "file:simply:data:upload",
281
- "file:data:simply:upload",
282
- "file:data:upload:simply",
283
- "simply:file:upload:data",
284
- "file:simply:upload:data",
285
- "file:upload:simply:data",
286
- "file:upload:data:simply",
287
- "simply:data:upload:file",
288
- "data:simply:upload:file",
289
- "data:upload:simply:file",
290
- "data:upload:file:simply",
291
- "simply:upload:data:file",
292
- "upload:simply:data:file",
293
- "upload:data:simply:file",
294
- "upload:data:file:simply",
295
- "simply:upload:file:data",
296
- "upload:simply:file:data",
297
- "upload:file:simply:data",
298
- "upload:file:data:simply"
299
- ]
300
218
  }
301
219
  },
302
- "version": "1.1.9-dev.1"
220
+ "version": "1.2.0"
303
221
  }
package/package.json CHANGED
@@ -1,30 +1,29 @@
1
1
  {
2
2
  "name": "@simplysf/simply-data",
3
3
  "description": "Utilities for working with data",
4
- "version": "1.1.9-dev.1",
4
+ "version": "1.2.0",
5
5
  "author": "@ClayChipps",
6
6
  "bugs": "https://github.com/SimplySF/simply-data/issues",
7
7
  "dependencies": {
8
8
  "@oclif/core": "^3.25.0",
9
9
  "@salesforce/core": "^6.7.0",
10
10
  "@salesforce/kit": "^3.0.15",
11
- "@salesforce/sf-plugins-core": "^7.1.14",
11
+ "@salesforce/sf-plugins-core": "^8.0.0",
12
12
  "csv-parse": "^5.5.5",
13
13
  "csv-writer": "^1.6.0",
14
14
  "form-data": "^4.0.0",
15
15
  "got": "13.0.0",
16
- "jsforce": "2.0.0-beta.29",
17
16
  "p-queue": "^8.0.1"
18
17
  },
19
18
  "devDependencies": {
20
19
  "@oclif/plugin-command-snapshot": "^5.0.9",
21
- "@salesforce/cli-plugins-testkit": "^5.1.9",
20
+ "@salesforce/cli-plugins-testkit": "^5.1.11",
22
21
  "@salesforce/plugin-command-reference": "^3.0.70",
23
22
  "@salesforce/ts-sinon": "1.4.19",
24
23
  "@simplysf/dev-scripts": "^2.1.2",
25
24
  "@types/shelljs": "^0.8.14",
26
- "eslint-plugin-sf-plugin": "^1.17.3",
27
- "oclif": "^4.5.2",
25
+ "eslint-plugin-sf-plugin": "^1.17.4",
26
+ "oclif": "^4.6.1",
28
27
  "shelljs": "^0.8.5",
29
28
  "ts-node": "^10.9.2",
30
29
  "typescript": "^5.4.2"
@@ -1,13 +0,0 @@
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: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
- };
12
- run(): Promise<void>;
13
- }
@@ -1,100 +0,0 @@
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 { createObjectCsvWriter } from 'csv-writer';
8
- import PQueue from 'p-queue';
9
- import { Messages } from '@salesforce/core';
10
- import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
11
- import { downloadContentVersion } from '../../../../common/contentVersionUtils.js';
12
- Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
- const messages = Messages.loadMessages('@simplysf/simply-data', 'simply.data.files.download');
14
- export default class DataFilesDownload extends SfCommand {
15
- static summary = messages.getMessage('summary');
16
- static description = messages.getMessage('description');
17
- static examples = messages.getMessages('examples');
18
- static flags = {
19
- 'api-version': Flags.orgApiVersion(),
20
- 'max-parallel-jobs': Flags.integer({
21
- summary: messages.getMessage('flags.max-parallel-jobs.summary'),
22
- description: messages.getMessage('flags.max-parallel-jobs.description'),
23
- default: 1,
24
- }),
25
- 'target-org': Flags.requiredOrg(),
26
- where: Flags.string({
27
- summary: messages.getMessage('flags.where.summary'),
28
- description: messages.getMessage('flags.where.description'),
29
- required: true,
30
- }),
31
- };
32
- async run() {
33
- const { flags } = await this.parse(DataFilesDownload);
34
- // Authorize to the target org
35
- const targetOrgConnection = flags['target-org']?.getConnection(flags['api-version']);
36
- if (!targetOrgConnection) {
37
- throw messages.createError('error.targetOrgConnectionFailed');
38
- }
39
- this.spinner.start('Querying for files', '\n', { stdout: true });
40
- const query = await targetOrgConnection.autoFetchQuery(`SELECT ContentDocumentId, ContentSize, Description, FileExtension, FileType, FirstPublishLocationId, Id, IsLatest, PathOnClient, Title FROM ContentVersion WHERE ${flags.where}`);
41
- const contentVersionDownloads = query.records;
42
- this.spinner.start('Downloading files', '\n', { stdout: true });
43
- const successWriter = createObjectCsvWriter({
44
- path: 'success.csv',
45
- header: [
46
- { id: 'Id', title: 'Id' },
47
- { id: 'ContentDocumentId', title: 'ContentDocumentId' },
48
- { id: 'ContentSize', title: 'ContentSize' },
49
- { id: 'Description', title: 'Description' },
50
- { id: 'FileExtension', title: 'FileExtension' },
51
- { id: 'FileType', title: 'FileType' },
52
- { id: 'FirstPublishLocationId', title: 'FirstPublishLocationId' },
53
- { id: 'IsLatest', title: 'IsLatest' },
54
- { id: 'PathOnClient', title: 'PathOnClient' },
55
- { id: 'Title', title: 'Title' },
56
- { id: 'FilePath', title: 'FilePath' },
57
- ],
58
- });
59
- const errorWriter = createObjectCsvWriter({
60
- path: 'error.csv',
61
- header: [
62
- { id: 'Id', title: 'Id' },
63
- { id: 'ContentDocumentId', title: 'ContentDocumentId' },
64
- { id: 'ContentSize', title: 'ContentSize' },
65
- { id: 'Description', title: 'Description' },
66
- { id: 'FileExtension', title: 'FileExtension' },
67
- { id: 'FileType', title: 'FileType' },
68
- { id: 'FirstPublishLocationId', title: 'FirstPublishLocationId' },
69
- { id: 'IsLatest', title: 'IsLatest' },
70
- { id: 'PathOnClient', title: 'PathOnClient' },
71
- { id: 'Title', title: 'Title' },
72
- { id: 'Error', title: 'Error' },
73
- ],
74
- });
75
- const downloadQueue = new PQueue({ concurrency: flags['max-parallel-jobs'] });
76
- let count = 0;
77
- downloadQueue.on('add', () => {
78
- this.spinner.status = `Completed: ${count}. Size: ${downloadQueue.size} Pending: ${downloadQueue.pending}\n`;
79
- });
80
- downloadQueue.on('completed', () => {
81
- count++;
82
- this.spinner.status = `Completed: ${count}. Size: ${downloadQueue.size} Pending: ${downloadQueue.pending}\n`;
83
- });
84
- for await (const contentVersionDownload of contentVersionDownloads) {
85
- void downloadQueue.add(async () => {
86
- try {
87
- await downloadContentVersion(targetOrgConnection, contentVersionDownload);
88
- await successWriter.writeRecords([contentVersionDownload]);
89
- }
90
- catch (error) {
91
- contentVersionDownload.Error = error;
92
- await errorWriter.writeRecords([contentVersionDownload]);
93
- }
94
- });
95
- }
96
- await downloadQueue.onIdle();
97
- this.spinner.stop();
98
- }
99
- }
100
- //# sourceMappingURL=download.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/commands/simply/data/files/download.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,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,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,Q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AM,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"}
@@ -1,33 +0,0 @@
1
- # summary
2
-
3
- Download files from a Salesforce org.
4
-
5
- # description
6
-
7
- Downloads files specified by a where clause to 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.summary
18
-
19
- WHERE clause for ContentVersion query.
20
-
21
- # flags.where.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 'IsLatest=true' --target-org myTargetOrg
28
-
29
- - <%= config.bin %> <%= command.id %> --where 'IsLatest=true' --max-parallel-jobs 5 --target-org myTargetOrg
30
-
31
- # error.targetOrgConnectionFailed
32
-
33
- Unable to establish connection to the org.