@pdfbutler/migration-cli 0.0.12 → 0.0.13
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 +93 -54
- package/lib/commands/butler/pb/export.js +8 -10
- package/lib/commands/butler/pb/export.js.map +1 -1
- package/lib/commands/butler/pb/import.d.ts +1 -0
- package/lib/commands/butler/pb/import.js +17 -3
- package/lib/commands/butler/pb/import.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,11 +83,16 @@ FLAGS
|
|
|
83
83
|
-s, --stage=<value> The CADMUS stage. (Required)
|
|
84
84
|
-a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
|
|
85
85
|
-e, --endpoint=<value> The URL PDF Butler endpoint for export. (Required)
|
|
86
|
+
Please use the following region-specific URLs on the region in which you registered:
|
|
87
|
+
US: https://us1.pdfbutler.com
|
|
88
|
+
EU: https://eu1.pdfbutler.com
|
|
89
|
+
APAC: https://apac1.pdfbutler.com
|
|
90
|
+
CA: https://ca1.pdfbutler.com
|
|
86
91
|
|
|
87
92
|
-u, --unzip Use this flag to unzip the exported configuration. (Optional)
|
|
88
93
|
-b, --backend Use this flag to disable PDF Butler backend export. (Optional)
|
|
89
94
|
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
90
|
-
-p, --partial Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
|
|
95
|
+
-p, --partial Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part. (Optional)
|
|
91
96
|
|
|
92
97
|
DESCRIPTION
|
|
93
98
|
Export DocConfigs and related DataSource files from your organization.
|
|
@@ -99,35 +104,39 @@ DESCRIPTION
|
|
|
99
104
|
|
|
100
105
|
To initiate an export, ensure you specify the necessary parameters, including the target org, PDF Butler docuemnt configuration ID,
|
|
101
106
|
output path, define PDF Butler credentials for backend authentication, specify endpoints and stage.
|
|
102
|
-
Additionally, you have the flexibility to enable or disable backend exports,
|
|
107
|
+
Additionally, you have the flexibility to enable or disable backend exports,
|
|
108
|
+
ignore invalid document configurations and allow the export of document configuration files with the backend part,
|
|
109
|
+
get a more detailed log of migration process and even choose to unzip the exported configuration.
|
|
103
110
|
|
|
104
111
|
EXAMPLES
|
|
105
112
|
Run with --backend flag only
|
|
106
113
|
|
|
107
114
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
108
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
115
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
109
116
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -b
|
|
110
117
|
|
|
111
118
|
# Console output:
|
|
112
119
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
113
120
|
|
|
114
121
|
# Created:
|
|
115
|
-
Directory 'sfdc
|
|
122
|
+
Directory 'export_folder_name/archive_or_folder_name/sfdc'{
|
|
116
123
|
file 'docconfig_id.json'
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
Run without --backend flag
|
|
120
127
|
|
|
121
128
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
122
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
129
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
123
130
|
-a 'pdf_butler_user_name-ADMIN:admin_password'
|
|
124
131
|
|
|
125
132
|
# Console output:
|
|
126
133
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
127
134
|
|
|
128
135
|
# Created:
|
|
129
|
-
Directory '
|
|
130
|
-
|
|
136
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
137
|
+
Directory 'sfdc'{
|
|
138
|
+
file 'docconfig_id.json',
|
|
139
|
+
},
|
|
131
140
|
zip file'docconfig_id.zip'{
|
|
132
141
|
Directory 'ConfigTypes',
|
|
133
142
|
Directory 'DataSources',
|
|
@@ -139,15 +148,17 @@ EXAMPLES
|
|
|
139
148
|
Run with --unzip flag only
|
|
140
149
|
|
|
141
150
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
142
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
151
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
143
152
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -u
|
|
144
153
|
|
|
145
154
|
# Console output:
|
|
146
155
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
147
156
|
|
|
148
157
|
# Created:
|
|
149
|
-
Directory '
|
|
150
|
-
|
|
158
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
159
|
+
Directory 'sfdc'{
|
|
160
|
+
file 'docconfig_id.json',
|
|
161
|
+
},
|
|
151
162
|
Unziped directory 'docconfig_id'{
|
|
152
163
|
Directory 'ConfigTypes',
|
|
153
164
|
Directory 'DataSources',
|
|
@@ -159,15 +170,17 @@ EXAMPLES
|
|
|
159
170
|
Run without --unzip flag
|
|
160
171
|
|
|
161
172
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
162
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
173
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
163
174
|
-a 'pdf_butler_user_name-ADMIN:admin_password'
|
|
164
175
|
|
|
165
176
|
# Console output:
|
|
166
177
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
167
178
|
|
|
168
179
|
# Created:
|
|
169
|
-
Directory '
|
|
170
|
-
|
|
180
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
181
|
+
Directory 'sfdc'{
|
|
182
|
+
file 'docconfig_id.json',
|
|
183
|
+
},
|
|
171
184
|
zip file'docconfig_id.zip'{
|
|
172
185
|
Directory 'ConfigTypes',
|
|
173
186
|
Directory 'DataSources',
|
|
@@ -179,7 +192,7 @@ EXAMPLES
|
|
|
179
192
|
Run with --logs flag only
|
|
180
193
|
|
|
181
194
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
182
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
195
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
183
196
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -l
|
|
184
197
|
|
|
185
198
|
# Console output:
|
|
@@ -191,8 +204,10 @@ EXAMPLES
|
|
|
191
204
|
Archive unzipped and recorded locally
|
|
192
205
|
|
|
193
206
|
# Created:
|
|
194
|
-
Directory '
|
|
195
|
-
|
|
207
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
208
|
+
Directory 'sfdc'{
|
|
209
|
+
file 'docconfig_id.json',
|
|
210
|
+
},
|
|
196
211
|
zip file'docconfig_id.zip'{
|
|
197
212
|
Directory 'ConfigTypes',
|
|
198
213
|
Directory 'DataSources',
|
|
@@ -204,15 +219,17 @@ EXAMPLES
|
|
|
204
219
|
Run without --logs flag
|
|
205
220
|
|
|
206
221
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
207
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
222
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
208
223
|
-a 'pdf_butler_user_name-ADMIN:admin_password'
|
|
209
224
|
|
|
210
225
|
# Console output:
|
|
211
226
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
212
227
|
|
|
213
228
|
# Created:
|
|
214
|
-
Directory '
|
|
215
|
-
|
|
229
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
230
|
+
Directory 'sfdc'{
|
|
231
|
+
file 'docconfig_id.json',
|
|
232
|
+
},
|
|
216
233
|
zip file'docconfig_id.zip'{
|
|
217
234
|
Directory 'ConfigTypes',
|
|
218
235
|
Directory 'DataSources',
|
|
@@ -224,15 +241,17 @@ EXAMPLES
|
|
|
224
241
|
Run with --partial flag only and docconfig with backend part
|
|
225
242
|
|
|
226
243
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
227
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
244
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
228
245
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -p
|
|
229
246
|
|
|
230
247
|
# Console output:
|
|
231
248
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
232
249
|
|
|
233
250
|
# Created:
|
|
234
|
-
Directory '
|
|
235
|
-
|
|
251
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
252
|
+
Directory 'sfdc'{
|
|
253
|
+
file 'docconfig_id.json',
|
|
254
|
+
},
|
|
236
255
|
zip file'docconfig_id.zip'{
|
|
237
256
|
Directory 'ConfigTypes',
|
|
238
257
|
Directory 'DataSources',
|
|
@@ -241,19 +260,21 @@ EXAMPLES
|
|
|
241
260
|
}
|
|
242
261
|
}
|
|
243
262
|
|
|
244
|
-
Run with --partial flag only
|
|
263
|
+
Run with --partial flag only
|
|
245
264
|
|
|
246
|
-
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1,
|
|
247
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
265
|
+
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, invalid_document_configuration_id_2'
|
|
266
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
248
267
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -p
|
|
249
268
|
|
|
250
269
|
# Console output:
|
|
251
270
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
252
271
|
|
|
253
272
|
# Created:
|
|
254
|
-
Directory '
|
|
255
|
-
|
|
256
|
-
|
|
273
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
274
|
+
Directory 'sfdc'{
|
|
275
|
+
file 'docconfig_id_1.json',
|
|
276
|
+
},
|
|
277
|
+
zip file'docconfig_id_1.zip'{
|
|
257
278
|
Directory 'ConfigTypes',
|
|
258
279
|
Directory 'DataSources',
|
|
259
280
|
file 'doc-config.json',
|
|
@@ -261,10 +282,10 @@ EXAMPLES
|
|
|
261
282
|
}
|
|
262
283
|
}
|
|
263
284
|
|
|
264
|
-
Run without --partial flag
|
|
285
|
+
Run without --partial flag
|
|
265
286
|
|
|
266
|
-
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1,
|
|
267
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
287
|
+
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, invalid_document_configuration_id_2'
|
|
288
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
268
289
|
-a 'pdf_butler_user_name-ADMIN:admin_password'
|
|
269
290
|
|
|
270
291
|
# Console output:
|
|
@@ -273,21 +294,21 @@ EXAMPLES
|
|
|
273
294
|
Run with --backend flag and other optional flags
|
|
274
295
|
|
|
275
296
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
276
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
297
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
277
298
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -b [-u | -l | -p]
|
|
278
299
|
|
|
279
300
|
# Console output:
|
|
280
301
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
281
302
|
|
|
282
303
|
# Created:
|
|
283
|
-
Directory 'sfdc
|
|
284
|
-
file '
|
|
304
|
+
Directory 'export_folder_name/archive_or_folder_name/sfdc'{
|
|
305
|
+
file 'docconfig_id_1.json'
|
|
285
306
|
}
|
|
286
307
|
|
|
287
308
|
Run with --unzip and --logs flags
|
|
288
309
|
|
|
289
310
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
290
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
311
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
291
312
|
-a 'pdf_butler_user_name-ADMIN:admin_password' -u -l
|
|
292
313
|
|
|
293
314
|
# Console output:
|
|
@@ -299,9 +320,11 @@ EXAMPLES
|
|
|
299
320
|
Archive unzipped and recorded locally
|
|
300
321
|
|
|
301
322
|
# Created:
|
|
302
|
-
Directory '
|
|
303
|
-
|
|
304
|
-
|
|
323
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
324
|
+
Directory 'sfdc'{
|
|
325
|
+
file 'document_configuration_id.json',
|
|
326
|
+
},
|
|
327
|
+
Unziped directory 'document_configuration_id'{
|
|
305
328
|
Directory 'ConfigTypes',
|
|
306
329
|
Directory 'DataSources',
|
|
307
330
|
file 'doc-config.json',
|
|
@@ -312,16 +335,18 @@ EXAMPLES
|
|
|
312
335
|
Run without optional flags
|
|
313
336
|
|
|
314
337
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
315
|
-
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://
|
|
338
|
+
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
316
339
|
-a 'pdf_butler_user_name-ADMIN:admin_password'
|
|
317
340
|
|
|
318
341
|
# Console output:
|
|
319
342
|
Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
|
|
320
343
|
|
|
321
344
|
# Created:
|
|
322
|
-
Directory '
|
|
323
|
-
|
|
324
|
-
|
|
345
|
+
Directory 'export_folder_name/archive_or_folder_name'{
|
|
346
|
+
Directory 'sfdc'{
|
|
347
|
+
file 'document_configuration_id.json',
|
|
348
|
+
},
|
|
349
|
+
zip file'document_configuration_id.zip'{
|
|
325
350
|
Directory 'ConfigTypes',
|
|
326
351
|
Directory 'DataSources',
|
|
327
352
|
file 'doc-config.json',
|
|
@@ -339,8 +364,8 @@ FLAG DESCRIPTIONS
|
|
|
339
364
|
This ID uniquely identifies the configuration you want to export. It is a required parameter.
|
|
340
365
|
|
|
341
366
|
-o, --out <value>
|
|
342
|
-
Specifies the path to the folder with the exported configuration and the archive or folder name for data sources.
|
|
343
|
-
For example, if the flag is defined with the following values '-o
|
|
367
|
+
Specifies the path to the folder with the exported configuration and the archive or folder name for data sources.
|
|
368
|
+
For example, if the flag is defined with the following values '-o butler/docConfigs', the result will be the following path: ./butler/docConfigs .
|
|
344
369
|
This flag is required to determine where the exported configuration will be saved.
|
|
345
370
|
|
|
346
371
|
-s, --stage <value>
|
|
@@ -349,7 +374,7 @@ FLAG DESCRIPTIONS
|
|
|
349
374
|
It is a required parameter.
|
|
350
375
|
|
|
351
376
|
-e, --endpoint <value>
|
|
352
|
-
Specifies a URL for the PDF Butler endpoint for export. For example: https://
|
|
377
|
+
Specifies a URL for the PDF Butler endpoint for export. For example: https://eu1.pdfbutler.com. It is a required parameter.
|
|
353
378
|
|
|
354
379
|
-a, --auth-env-var <value>
|
|
355
380
|
Specifies the PDF Butler credentials for backend authentication. For authenification should be used PDF butler username and admin password.
|
|
@@ -383,9 +408,15 @@ FLAGS
|
|
|
383
408
|
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
384
409
|
-a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
|
|
385
410
|
-e, --endpoint=<value> The URL PDF Butler endpoint for import. (Required)
|
|
411
|
+
Please use the following region-specific URLs on the region in which you registered:
|
|
412
|
+
US: https://us1.pdfbutler.com
|
|
413
|
+
EU: https://eu1.pdfbutler.com
|
|
414
|
+
APAC: https://apac1.pdfbutler.com
|
|
415
|
+
CA: https://ca1.pdfbutler.com
|
|
416
|
+
|
|
386
417
|
-s, --stage=<value> The CADMUS stage. (Required)
|
|
387
418
|
-f, --config=<value> The path to the directory containing configurations to import. (Required)
|
|
388
|
-
-l, --logs
|
|
419
|
+
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
389
420
|
|
|
390
421
|
DESCRIPTION
|
|
391
422
|
Import DocConfigs and related DataSource files into your organization.
|
|
@@ -399,8 +430,8 @@ DESCRIPTION
|
|
|
399
430
|
EXAMPLE
|
|
400
431
|
Import configurations to the organization:
|
|
401
432
|
|
|
402
|
-
$ sf butler pb import -t sfusername@sandbox.com -f
|
|
403
|
-
-e 'https://
|
|
433
|
+
$ sf butler pb import -t sfusername@sandbox.com -f .export_folder_name/archive_or_folder_name
|
|
434
|
+
-e 'https://eu1.pdfbutler.com' -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT'
|
|
404
435
|
|
|
405
436
|
FLAG DESCRIPTIONS
|
|
406
437
|
-t, --target <value>
|
|
@@ -437,7 +468,9 @@ Typical errors that may occur when using the plugin and their solutions.
|
|
|
437
468
|
- EPERM operation not permitted, chmod 'path_to_directory_to_export'.
|
|
438
469
|
|
|
439
470
|
```
|
|
440
|
-
SOLUTION: error typically occurs due to insufficient permissions. To resolve it,
|
|
471
|
+
SOLUTION: error typically occurs due to insufficient permissions. To resolve it,
|
|
472
|
+
make sure you have the necessary permissions to write to the specified directory.
|
|
473
|
+
You can use the chmod command to change the directory permissions.
|
|
441
474
|
|
|
442
475
|
```
|
|
443
476
|
|
|
@@ -472,7 +505,9 @@ SOLUTION: Verify that the Doc Config IDs you provided are correct and exist in t
|
|
|
472
505
|
- Error (1): One or more docConfigs have no backend.
|
|
473
506
|
|
|
474
507
|
```
|
|
475
|
-
SOLUTION: This error indicates that some document configurations are missing backend part.
|
|
508
|
+
SOLUTION: This error indicates that some document configurations are missing backend part.
|
|
509
|
+
Review the document configurations and ensure that they are properly configured with the required server modules.
|
|
510
|
+
Or you can add the "-p --partial" flag to enable exporting those docconfigs that have a backend part.
|
|
476
511
|
|
|
477
512
|
```
|
|
478
513
|
|
|
@@ -493,7 +528,8 @@ SOLUTION: When using the --stage flag, make sure to provide a valid CADMUS stage
|
|
|
493
528
|
- Error (1): Flag --auth-env-var expects a value.
|
|
494
529
|
|
|
495
530
|
```
|
|
496
|
-
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
531
|
+
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
532
|
+
Ensure that the PDF Butler credentials is correctly set and contains the required credentials (Username and Admin password).
|
|
497
533
|
|
|
498
534
|
```
|
|
499
535
|
|
|
@@ -507,14 +543,16 @@ SOLUTION: When using the --endpoint flag, specify the correct endpoint URL as th
|
|
|
507
543
|
- Error (1): Response code 401 (Unauthorized).
|
|
508
544
|
|
|
509
545
|
```
|
|
510
|
-
SOLUTION: This error indicates that your request lacks proper authentication. Double-check your credentials like PDF Butler Username or PDF Butler Admin password.
|
|
546
|
+
SOLUTION: This error indicates that your request lacks proper authentication. Double-check your credentials like PDF Butler Username or PDF Butler Admin password.
|
|
547
|
+
Correct example: 'Username-ADMIN:Admin_password'
|
|
511
548
|
|
|
512
549
|
```
|
|
513
550
|
|
|
514
551
|
- Error (1): System.LicenseException: The Apex Class RestImportDocConfig is part of the AppExchange Package PDF Butler, and requires a license to use.
|
|
515
552
|
|
|
516
553
|
```
|
|
517
|
-
SOLUTION: To resolve this error, you need to acquire the required license for the AppExchange Package PDF Butler to use the plugin command.
|
|
554
|
+
SOLUTION: To resolve this error, you need to acquire the required license for the AppExchange Package PDF Butler to use the plugin command.
|
|
555
|
+
Contact your Salesforce administrator or license provider to obtain the necessary license.
|
|
518
556
|
|
|
519
557
|
```
|
|
520
558
|
|
|
@@ -536,7 +574,8 @@ SOLUTION:
|
|
|
536
574
|
- Error (1): Flag --auth-env-var expects a value.
|
|
537
575
|
|
|
538
576
|
```
|
|
539
|
-
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
577
|
+
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
578
|
+
Ensure that the PDF Butler credentials is correctly set and contains the required credentials (Username and Admin password).
|
|
540
579
|
|
|
541
580
|
```
|
|
542
581
|
|
|
@@ -11,7 +11,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
12
12
|
/* eslint-disable no-console */
|
|
13
13
|
const fs_1 = require("fs");
|
|
14
|
-
const path = require("path");
|
|
15
14
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
16
15
|
const core_1 = require("@salesforce/core");
|
|
17
16
|
const AdmZip = require("adm-zip");
|
|
@@ -56,8 +55,7 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
56
55
|
}
|
|
57
56
|
async run() {
|
|
58
57
|
const { flags } = await this.parse(ButlerPbExport);
|
|
59
|
-
const
|
|
60
|
-
const outDir = path.dirname(outFile);
|
|
58
|
+
const outDir = flags.out;
|
|
61
59
|
let docConfigIds = [];
|
|
62
60
|
let docConfigResponses = [];
|
|
63
61
|
try {
|
|
@@ -101,10 +99,10 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
101
99
|
else {
|
|
102
100
|
zipMap = new Map();
|
|
103
101
|
}
|
|
104
|
-
await fs_1.promises.mkdir(
|
|
102
|
+
await fs_1.promises.mkdir(`./${outDir}/sfdc`, { recursive: true });
|
|
105
103
|
if (flags.logs) {
|
|
106
104
|
try {
|
|
107
|
-
await fs_1.promises.access(
|
|
105
|
+
await fs_1.promises.access(`./${outDir}`, fs_1.promises.constants.R_OK | fs_1.promises.constants.W_OK);
|
|
108
106
|
this.log('User has read/write permissions');
|
|
109
107
|
}
|
|
110
108
|
catch (err) {
|
|
@@ -114,8 +112,8 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
114
112
|
if (zipMap.size > 0) {
|
|
115
113
|
if (flags.unzip) {
|
|
116
114
|
const extractionAndWritePromises = Array.from(zipMap.entries()).map(async ([key, value]) => {
|
|
117
|
-
value.extractAllTo(
|
|
118
|
-
const filePath =
|
|
115
|
+
value.extractAllTo(`./${outDir}/${key}`, false);
|
|
116
|
+
const filePath = `./${outDir}/sfdc/${key}.json`;
|
|
119
117
|
const data = JSON.stringify(docConfigResponses[docConfigIds.indexOf(key)]);
|
|
120
118
|
await fs_1.promises.writeFile(filePath, data);
|
|
121
119
|
});
|
|
@@ -130,8 +128,8 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
130
128
|
zipToExport.addFile(entry.entryName, value.readFile(entry));
|
|
131
129
|
}
|
|
132
130
|
zipToExport.addFile('sfdc/docconfig.json', Buffer.from(JSON.stringify(docConfigResponses[docConfigIds.indexOf(key)])));
|
|
133
|
-
const zipPromise = fs_1.promises.writeFile(
|
|
134
|
-
const jsonPromise = fs_1.promises.writeFile(
|
|
131
|
+
const zipPromise = fs_1.promises.writeFile(`./${outDir}/${key}.zip`, zipToExport.toBuffer());
|
|
132
|
+
const jsonPromise = fs_1.promises.writeFile(`./${outDir}/sfdc/${key}.json`, JSON.stringify(docConfigResponses[docConfigIds.indexOf(key)]));
|
|
135
133
|
await Promise.all([zipPromise, jsonPromise]);
|
|
136
134
|
});
|
|
137
135
|
await Promise.all(zipAndWritePromises);
|
|
@@ -139,7 +137,7 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
139
137
|
}
|
|
140
138
|
else {
|
|
141
139
|
const writePromises = docConfigIds.map(async (docConfigId) => {
|
|
142
|
-
const filePath =
|
|
140
|
+
const filePath = `./${outDir}/sfdc/${docConfigId}.json`;
|
|
143
141
|
const data = JSON.stringify(docConfigResponses[docConfigIds.indexOf(docConfigId)]);
|
|
144
142
|
await fs_1.promises.writeFile(filePath, data);
|
|
145
143
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/export.ts"],"names":[],"mappings":";;AAAA,2DAA2D;AAC3D,0DAA0D;AAC1D,qEAAqE;AACrE,sDAAsD;AACtD,+DAA+D;AAC/D,kDAAkD;AAClD,qDAAqD;AACrD,qCAAqC;AACrC,uDAAuD;AACvD,+BAA+B;AAC/B,2BAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/export.ts"],"names":[],"mappings":";;AAAA,2DAA2D;AAC3D,0DAA0D;AAC1D,qEAAqE;AACrE,sDAAsD;AACtD,+DAA+D;AAC/D,kDAAkD;AAClD,qDAAqD;AACrD,qCAAqC;AACrC,uDAAuD;AACvD,+BAA+B;AAC/B,2BAAoC;AACpC,iEAA+D;AAC/D,2CAAkE;AAClE,kCAAmC;AACnC,6BAAsB;AAGtB,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAMvF,MAAqB,cAAe,SAAQ,2BAAiB;IA2DjD,MAAM,CAAC,eAAe,CAAC,EAAU;QACrC,MAAM,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAE9D,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE;gBACf,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC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,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,IAAI,EAAE,GAAG;KACV,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,IAAI,EAAE,GAAG;KACV,CAAC;CACH,CAAC;kBAzDiB,cAAc"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const path = require("path");
|
|
4
3
|
const fs = require("graceful-fs");
|
|
5
4
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
6
5
|
const core_1 = require("@salesforce/core");
|
|
@@ -27,13 +26,26 @@ class ButlerPbImport extends sf_plugins_core_1.SfCommand {
|
|
|
27
26
|
}
|
|
28
27
|
throw new Error('Unsupported record type');
|
|
29
28
|
}
|
|
29
|
+
static getFiles(dir, files) {
|
|
30
|
+
const fileList = fs.readdirSync(dir, { withFileTypes: true });
|
|
31
|
+
for (const file of fileList) {
|
|
32
|
+
const name = `${dir}/${file.name}`;
|
|
33
|
+
if (fs.statSync(name).isDirectory() && file.name === 'sfdc') {
|
|
34
|
+
ButlerPbImport.getFiles(name, files);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
files.push(name);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return files;
|
|
41
|
+
}
|
|
30
42
|
async run() {
|
|
31
43
|
const { flags } = await this.parse(ButlerPbImport);
|
|
32
44
|
const zipArray = [];
|
|
33
45
|
const jsonArray = [];
|
|
34
|
-
const files =
|
|
46
|
+
const files = ButlerPbImport.getFiles(`${flags.config}`, []);
|
|
35
47
|
await Promise.all(files.map((fileName) => {
|
|
36
|
-
const fullPath =
|
|
48
|
+
const fullPath = fileName;
|
|
37
49
|
if (fileName.endsWith('.json')) {
|
|
38
50
|
jsonArray.push(fullPath);
|
|
39
51
|
}
|
|
@@ -60,6 +72,8 @@ class ButlerPbImport extends sf_plugins_core_1.SfCommand {
|
|
|
60
72
|
catch (e) {
|
|
61
73
|
throw new Error('Failed to write data to the target Salesforce org');
|
|
62
74
|
}
|
|
75
|
+
if (flags.logs)
|
|
76
|
+
this.log(`zipArray.length - ${zipArray.length}`);
|
|
63
77
|
if (zipArray.length === 0 || !flags.endpoint) {
|
|
64
78
|
return { success: false };
|
|
65
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/import.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/import.ts"],"names":[],"mappings":";;AAAA,kCAAmC;AACnC,iEAA+D;AAC/D,2CAAkE;AAClE,sCAAuC;AACvC,kCAAmC;AACnC,6BAAsB;AAEtB,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAMvF,MAAqB,cAAe,SAAQ,2BAA+B;IAwCjE,MAAM,CAAC,aAAa,CAAC,UAAkB;QAC7C,QAAQ,UAAU,EAAE;YAClB,KAAK,OAAO;gBACV,OAAO,0BAA0B,CAAC;YACpC,KAAK,MAAM;gBACT,OAAO,sBAAsB,CAAC;YAChC,KAAK,MAAM;gBACT,OAAO,2BAA2B,CAAC;YACrC,KAAK,KAAK;gBACR,OAAO,0BAA0B,CAAC;YACpC,KAAK,OAAO;gBACV,OAAO,sBAAsB,CAAC;YAChC,KAAK,KAAK;gBACR,OAAO,0BAA0B,CAAC;SACrC;QACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAC,GAAW,EAAE,KAAe;QAClD,MAAM,QAAQ,GAAG,EAAE,CAAC,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Ac"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfbutler/migration-cli",
|
|
3
3
|
"description": "[](https://www.npmjs.com/package/pdfbutler-migration-cli) [](https://npmjs.org/package/pdfbutler-migration-cli) [](https://raw.githubusercontent.com/salesforcecli/pdfbutler-migration-cli/main/LICENSE.txt)",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"script": {
|
|
6
6
|
"postinstall": "sf plugins link @pdfbutler/migration-cli"
|
|
7
7
|
},
|