@pdfbutler/migration-cli 0.0.6 → 0.0.8

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 CHANGED
@@ -21,7 +21,6 @@ yarn install
21
21
  ```
22
22
 
23
23
  If you've installed Node.js on your computer, you can use npm to install Salesforce CLI:
24
-
25
24
  ```
26
25
  npm install @salesforce/cli --global
27
26
  ```
@@ -39,20 +38,24 @@ To see which versions of the core Salesforce-provided plugins are installed on y
39
38
  sf plugins --core
40
39
  ```
41
40
 
42
- After the installation is complete, you can call this plugin using its name in the terminal or command prompt. For example:
41
+ Before running commands that require access to the Salesforce org, you must be [authorized](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth.htm) in the target org.
42
+ One of the options to authorize an org is by running a CLI command and entering your credentials in the browser that automatically opens:
43
+ ```
44
+ sf org login web
45
+ ```
46
+
47
+ After the installation and authorization are complete, you can call this plugin by using its name in the terminal or command prompt to export and import PDF Butler configurations in Salesforce. For example:
43
48
 
44
49
  ```
45
50
  $ sf butler pb export [options]
46
51
  $ sf butler pb import [options]
47
52
  ```
48
53
 
49
- Now you can use this plugin to export and import PDF Butler configurations in Salesforce.
50
-
51
54
  ## Commands
52
55
 
53
56
  ## butler pb export
54
57
 
55
- Export PDF Butler configurations to a file.
58
+ Export PDF Butler configurations.
56
59
 
57
60
  ```
58
61
  USAGE
@@ -60,38 +63,38 @@ $ sf butler pb export [--target | -t <value>] [--id | -i <value>] [--out | -o <v
60
63
 
61
64
  FLAGS
62
65
  -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
63
- -i, --id=<value> The ID of the PDF Butler configuration to export. (Required)
64
- -o, --out=<value> The output file path for the exported configuration. (Required)
65
- -s, --stage=<value> The stage or environment for export. (Required)
66
- -a, --auth-env-var=<value> The environment variable name for authentication. (Required)
67
- -e, --endpoint=<value> The URL endpoint for export. (Required)
66
+ -i, --id=<value> The ID of the PDF Butler docuemnt configuration to export. (Required)
67
+ -o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
68
+ -s, --stage=<value> The CADMUS stage. (Required)
69
+ -a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
70
+ -e, --endpoint=<value> The URL PDF Butler endpoint for export. (Required)
68
71
 
69
72
  -u, --unzip Use this flag to unzip the exported configuration. (Optional)
70
- -b, --backend Use this flag to specify a backend export. (Optional)
73
+ -b, --backend Use this flag to specify PDF Butler backend export. (Optional)
71
74
 
72
75
  DESCRIPTION
73
76
  Export DocConfigs and related DataSource files from your organization.
74
77
 
75
- You must run this command from within a project.
78
+ You must run this command from the termianl.
76
79
 
77
80
  By default, all your exported data is stored in a zip file.
78
81
  To unzip the data to a directory during the export process, use the -u | flag --unzip.
79
82
 
80
- To initiate an export, ensure you specify the necessary parameters, including the target org, configuration ID,
81
- output file path, define authentication environment variables, specify endpoints and stage.
83
+ To initiate an export, ensure you specify the necessary parameters, including the target org, PDF Butler docuemnt configuration ID,
84
+ output path, define PDF Butler credentials for backend authentication, specify endpoints and stage.
82
85
  Additionally, you have the flexibility to enable or disable backend exports and even choose to unzip the exported configuration.
83
86
 
84
87
  EXAMPLES
85
88
  Run with --unzip and --backend flags
86
89
 
87
- $ sf butler pb export -t username@sandbox.com -i '61cfcb7b-10f7-****-****-***********'
88
- -o 'export1/out1' -s 'TEST' -e 'https://www.pdfbutler.com'
89
- -a 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD' -b -u
90
+ $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
91
+ -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://www.pdfbutler.com'
92
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -b -u
90
93
 
91
94
  # Created:
92
- Directory 'sfdc/export1'{
95
+ Directory 'sfdc/export_folder_name'{
93
96
  file 'docconfig.json',
94
- Unziped directory 'out1'{
97
+ Unziped directory 'archive_name'{
95
98
  Directory 'ConfigTypes',
96
99
  Directory 'DataSources',
97
100
  file 'doc-config.json',
@@ -101,13 +104,14 @@ EXAMPLES
101
104
 
102
105
  Run with --backend flag only
103
106
 
104
- $ sf butler pb export -t username@sandbox.com -i '61cfcb7b-10f7-****-****-***********'
105
- -o 'export1/out1' -s 'TEST' -e 'https://www.pdfbutler.com'
106
- -a 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD' -b
107
+ $ 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://www.pdfbutler.com'
109
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -b
107
110
 
108
111
  # Created:
109
- Directory 'sfdc/export1'{
110
- zip file'out1.zip'{
112
+ Directory 'sfdc/export_folder_name'{
113
+ file 'docconfig.json',
114
+ zip file'archive_name.zip'{
111
115
  Directory 'ConfigTypes',
112
116
  Directory 'DataSources',
113
117
  file 'doc-config.json',
@@ -117,24 +121,25 @@ EXAMPLES
117
121
 
118
122
  Run with --unzip flag only
119
123
 
120
- $ sf butler pb export -t username@sandbox.com -i '61cfcb7b-10f7-****-****-***********'
121
- -o 'export1/out1' -s 'TEST' -e 'https://www.pdfbutler.com'
122
- -a 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD' -u
124
+ $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
125
+ -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://www.pdfbutler.com'
126
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -u
123
127
 
124
128
  # Created:
125
- Directory 'sfdc/export1'{
126
- file 'doc-config.json'
129
+ Directory 'sfdc/export_folder_name'{
130
+ file 'docconfig.json',
127
131
  }
128
132
 
129
133
  Run without optional flags
130
134
 
131
- $ sf butler pb export -t username@sandbox.com -i '61cfcb7b-10f7-****-****-***********'
132
- -o 'export1/out1' -s 'TEST' -e 'https://www.pdfbutler.com'
133
- -a 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD'
135
+ $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
136
+ -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://www.pdfbutler.com'
137
+ -a 'pdf_butler_user_name-ADMIN:admin_password'
134
138
 
135
139
  # Created:
136
- Directory 'sfdc/export1'{
137
- zip file 'out1.zip'{
140
+ Directory 'sfdc/export_folder_name'{
141
+ file 'docconfig.json',
142
+ zip file 'archive_name.zip'{
138
143
  file 'doc-config.json'
139
144
  }
140
145
  }
@@ -145,28 +150,29 @@ FLAG DESCRIPTIONS
145
150
  This flag is required to authenticate and access the PDF Butler configurations.
146
151
 
147
152
  -i, --id <value>
148
- Specifies the unique ID of the PDF Butler configuration to be exported.
153
+ Specifies the unique ID of the PDF Butler document configuration to be exported.
149
154
  This ID uniquely identifies the configuration you want to export. It is a required parameter.
150
155
 
151
156
  -o, --out <value>
152
- Specifies the output file path for the exported configuration.
157
+ Specifies the path to the folder with the exported configuration and the archive or folder name for data sources. By default, a sfdc folder is created which will contain folders with exported files.
158
+ For example, if the flag is defined with the following values '-o export/out', the result will be the following path: ./sfdc/export/out .
153
159
  This flag is required to determine where the exported configuration will be saved.
154
160
 
155
161
  -s, --stage <value>
156
162
  Specifies the stage or environment for the export process.
157
- This flag helps in categorizing or labeling the exported data according to different stages of your workflow.
163
+ This flag helps in categorizing or labeling the exported data according to different stages. For example: TEST, UAT, PROD.
158
164
  It is a required parameter.
159
165
 
160
166
  -e, --endpoint <value>
161
- Specifies a URL endpoint for export. It is a required parameter.
167
+ Specifies a URL for the PDF Butler endpoint for export. For example: https://www.pdfbutler.com. It is a required parameter.
162
168
 
163
169
  -a, --auth-env-var <value>
164
- Specifies the name of the environment variable containing authentication credentials.
165
- This flag allows you to reference an environment variable that stores authentication information.
170
+ Specifies the PDF Butler credentials for backend authentication. For authenification should be used PDF butler username and admin password.
171
+ String shouldn't contain whitespase. Format: 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD'. For example: test_user_dev-ADMIN:test_pass.
166
172
  It is a required parameter.
167
173
 
168
174
  -b, --backend
169
- Enables backend export. If specified, the export operation may use a backend process for exporting the configuration.
175
+ Enables backend export. If specified, the export operation may use a PDF Butler backend process for exporting the configuration.
170
176
 
171
177
  -u, --unzip
172
178
  Use this flag to indicate that the exported configuration should be unzipped.
@@ -175,7 +181,7 @@ FLAG DESCRIPTIONS
175
181
 
176
182
  ## butler pb import
177
183
 
178
- Import PDF Butler configurations and related DataSource files.
184
+ Import PDF Butler document configurations and related DataSource files.
179
185
 
180
186
  ```
181
187
  USAGE
@@ -183,25 +189,25 @@ $ sf butler pb import [--target | -t <value>] [--auth-env-var | -a <value>] [--e
183
189
 
184
190
  FLAGS
185
191
  -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
186
- -a, --auth-env-var=<value> The environment variable name for authentication. (Required)
187
- -e, --endpoint=<value> The URL endpoint for import. (Required)
188
- -s, --stage=<value> The stage or environment for import. (Required)
189
- -f, --config=<value> The path to the configuration file or directory containing configurations to import. (Required)
192
+ -a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
193
+ -e, --endpoint=<value> The URL PDF Butler endpoint for import. (Required)
194
+ -s, --stage=<value> The CADMUS stage. (Required)
195
+ -f, --config=<value> The path to the configuration file or directory containing configurations to import. (Required)
190
196
 
191
197
  DESCRIPTION
192
198
  Import DocConfigs and related DataSource files into your organization.
193
199
 
194
- You must run this command from within a project.
200
+ You must run this command from the termianl.
195
201
 
196
202
  To initiate an import, ensure you specify the necessary parameters, including the target org,
197
- authentication environment variable, endpoint, stage, and the path to the configuration file or directory.
203
+ define PDF Butler credentials for backend authentication, endpoint, stage, and the path to the configuration file or directory.
198
204
  All the targets are required parameters.
199
205
 
200
206
  EXAMPLE
201
- Import configurations ot an organization:
207
+ Import configurations to the organization:
202
208
 
203
- $ sf butler pb import -t username@sandbox.com -f ./sfdc/export1/out1
204
- -e 'https://www.pdfbutler.com' -a 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD' -s 'UAT'
209
+ $ sf butler pb import -t sfusername@sandbox.com -f ./sfdc/export_folder_name/archive_or_folder_name
210
+ -e 'https://www.pdfbutler.com' -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT'
205
211
 
206
212
  FLAG DESCRIPTIONS
207
213
  -t, --target <value>
@@ -209,16 +215,319 @@ FLAG DESCRIPTIONS
209
215
  org where the PDF Butler configurations will be imported. This flag is required for authentication.
210
216
 
211
217
  -a, --auth-env-var <value>
212
- Specifies the name of the environment variable containing authentication credentials.
213
- This flag allows you to reference an environment variable that stores authentication information.
218
+ Specifies the PDF Butler credentials for backend authentication. For authenification should be used PDF butler username and admin password.
219
+ String shouldn't contain whitespase. Format: 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD'. For example: test_user_dev-ADMIN:test_pass.
220
+ It is a required parameter.
214
221
 
215
222
  -e, --endpoint <value>
216
223
  Specifies a URL endpoint for import. Use this flag if you need to specify a custom import endpoint.
217
224
 
218
225
  -s, --stage <value>
219
- Specifies the stage or environment for the import process. This flag helps categorize or label the imported data.
226
+ Specifies the stage or environment for the export process.
227
+ This flag helps in categorizing or labeling the exported data according to different stages. For example: TEST, UAT, PROD.
228
+ It is a required parameter.
220
229
 
221
230
  -f, --config <value>
222
231
  Specifies the path to the configuration file or directory containing configurations to import.
223
232
  This flag is required to determine which configurations to import.
224
233
  ```
234
+
235
+
236
+
237
+ # pdfbutler-migration-cli
238
+
239
+ [![NPM](https://img.shields.io/npm/v/pdfbutler-migration-cli.svg?label=pdfbutler-migration-cli)](https://www.npmjs.com/package/@pdfbutler/migration-cli) [![Downloads/week](https://img.shields.io/npm/dw/pdfbutler-migration-cli.svg)](https://www.npmjs.com/package/@pdfbutler/migration-cli) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/pdfbutler-migration-cli/main/LICENSE.txt)
240
+
241
+ ## About
242
+
243
+ @pdfbutler/migration-cli is a Salesforce plugin designed to simplify and automate the process of migrating configurations within the PDF Butler system in the Salesforce environment. PDF Butler is a powerful tool for generating and automating documents in the Salesforce platform, and the use of this CLI plugin allows users to easily manage configurations and transfer them between different Salesforce instances or projects.
244
+
245
+ ### Main features of the plugin:
246
+
247
+ Export and import configurations: The plugin enables easy export and import of PDF Butler configurations. This is particularly useful for moving settings between different Salesforce environments or projects, ensuring consistency and ease of management.
248
+ Migration customization: The plugin provides users with the ability to customize the migration process using various flags and parameters to meet individual needs. With this plugin, you can specify the target Salesforce account, use environment variables for authentication, define custom URLs for import or export, and other parameters of your choice.
249
+
250
+ ## Installation
251
+
252
+ To install this plugin, make sure you have Node.js and npm (Node Package Manager) installed on your computer. If you don't have them, you can download Node.js from the official website, and npm will be installed along with it.
253
+
254
+ ```
255
+ npm install
256
+ yarn install
257
+ ```
258
+
259
+ If you've installed Node.js on your computer, you can use npm to install Salesforce CLI:
260
+ ```
261
+ npm install @salesforce/cli --global
262
+ ```
263
+
264
+ For install the plugin run:
265
+ ```
266
+ sf plugins install @pdfbutler/migration-cli
267
+ ```
268
+ To see your installed plugins and their versions, run:
269
+ ```
270
+ sf plugins
271
+ ```
272
+ To see which versions of the core Salesforce-provided plugins are installed on your computer, run:
273
+ ```
274
+ sf plugins --core
275
+ ```
276
+
277
+ Before running commands that require access to the Salesforce org, you must be [authorized](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth.htm) in the target org.
278
+ One of the options to authorize an org is by running a CLI command and entering your credentials in the browser that automatically opens:
279
+ ```
280
+ sf org login web
281
+ ```
282
+
283
+ After the installation and authorization are complete, you can call this plugin by using its name in the terminal or command prompt to export and import PDF Butler configurations in Salesforce. For example:
284
+
285
+ ```
286
+ $ sf butler pb export [options]
287
+ $ sf butler pb import [options]
288
+ ```
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+ ## Commands
300
+
301
+ ## butler pb export
302
+
303
+ Export PDF Butler configurations.
304
+
305
+ ```
306
+ USAGE
307
+ $ sf butler pb export [--target | -t <value>] [--id | -i <value>]
308
+ [--out | -o <value>] [--stage | -s <value>] [--backend | -b]
309
+ [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--unzip | -u]
310
+
311
+
312
+
313
+ FLAGS
314
+ -t, --target=<value>
315
+ The Salesforce org username credentials to connect to the target org. (Required)
316
+ -i, --id=<value>
317
+ The ID of the PDF Butler docuemnt configuration to export. (Required)
318
+ -o, --out=<value>
319
+ The value specifies the path to the folder with the exported configuration
320
+ and archive name. (Required)
321
+ -s, --stage=<value>
322
+ The CADMUS stage. (Required)
323
+ -a, --auth-env-var=<value>
324
+ The PDF Butler credentials for backend authentication. (Required)
325
+ -e, --endpoint=<value>
326
+ The URL PDF Butler endpoint for export. (Required)
327
+
328
+ -u, --unzip
329
+ Use this flag to unzip the exported configuration. (Optional)
330
+ -b, --backend
331
+ Use this flag to specify PDF Butler backend export. (Optional)
332
+
333
+ DESCRIPTION
334
+ Export DocConfigs and related DataSource files from your organization.
335
+
336
+ You must run this command from the termianl.
337
+
338
+ By default, all your exported data is stored in a zip file.
339
+ To unzip the data to a directory during the export process,
340
+ use the -u | flag --unzip.
341
+
342
+ To initiate an export, ensure you specify the necessary parameters,
343
+ including the target org, PDF Butler docuemnt configuration ID,
344
+ output path, define PDF Butler credentials for backend authentication,
345
+ specify endpoints and stage. Additionally, you have
346
+ the flexibility to enable or disable backend exports and even
347
+ choose to unzip the exported configuration.
348
+
349
+ EXAMPLES
350
+ Run with --unzip and --backend flags
351
+
352
+ $ sf butler pb export -t sfusername@sandbox.com
353
+ -i 'document_configuration_id'
354
+ -o 'export_folder_name/archive_or_folder_name'
355
+ -s 'TEST' -e 'https://www.pdfbutler.com'
356
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -b -u
357
+
358
+ # Created:
359
+ Directory 'sfdc/export_folder_name'{
360
+ file 'docconfig.json',
361
+ Unziped directory 'archive_name'{
362
+ Directory 'ConfigTypes',
363
+ Directory 'DataSources',
364
+ file 'doc-config.json',
365
+ file 'TemplateName.docx'
366
+ }
367
+ }
368
+
369
+ Run with --backend flag only
370
+
371
+ $ sf butler pb export -t sfusername@sandbox.com
372
+ -i 'document_configuration_id'
373
+ -o 'export_folder_name/archive_or_folder_name'
374
+ -s 'TEST' -e 'https://www.pdfbutler.com'
375
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -b
376
+
377
+ # Created:
378
+ Directory 'sfdc/export_folder_name'{
379
+ file 'docconfig.json',
380
+ zip file'archive_name.zip'{
381
+ Directory 'ConfigTypes',
382
+ Directory 'DataSources',
383
+ file 'doc-config.json',
384
+ file 'TemplateName.docx'
385
+ }
386
+ }
387
+
388
+ Run with --unzip flag only
389
+
390
+ $ sf butler pb export -t sfusername@sandbox.com
391
+ -i 'document_configuration_id'
392
+ -o 'export_folder_name/archive_or_folder_name'
393
+ -s 'TEST' -e 'https://www.pdfbutler.com'
394
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -u
395
+
396
+ # Created:
397
+ Directory 'sfdc/export_folder_name'{
398
+ file 'docconfig.json',
399
+ }
400
+
401
+ Run without optional flags
402
+
403
+ $ sf butler pb export -t sfusername@sandbox.com
404
+ -i 'document_configuration_id'
405
+ -o 'export_folder_name/archive_or_folder_name'
406
+ -s 'TEST' -e 'https://www.pdfbutler.com'
407
+ -a 'pdf_butler_user_name-ADMIN:admin_password'
408
+
409
+ # Created:
410
+ Directory 'sfdc/export_folder_name'{
411
+ file 'docconfig.json',
412
+ zip file 'archive_name.zip'{
413
+ file 'doc-config.json'
414
+ }
415
+ }
416
+
417
+ FLAG DESCRIPTIONS
418
+ -t, --target <value>
419
+ Specifies the Salesforce org username credentials to connect
420
+ to the target org where the PDF Butler configurations are stored.
421
+ This flag is required to authenticate and access
422
+ the PDF Butler configurations.
423
+
424
+ -i, --id <value>
425
+ Specifies the unique ID of the PDF Butler document configuration to be
426
+ exported. This ID uniquely identifies the configuration you want
427
+ to export. It is a required parameter.
428
+
429
+ -o, --out <value>
430
+ Specifies the path to the folder with the exported configuration
431
+ and the archive or folder name for data sources. By default,
432
+ a sfdc folder is created which will contain folders with exported files.
433
+ For example, if the flag is defined with the following values
434
+ '-o export/out', the result will be the following path:
435
+ ./sfdc/export/out. This flag is required to determine
436
+ where the exported configuration will be saved.
437
+
438
+ -s, --stage <value>
439
+ Specifies the stage or environment for the export process.
440
+ This flag helps in categorizing or labeling the exported data according
441
+ to different stages. For example: TEST, UAT, PROD. It is a required
442
+ parameter.
443
+
444
+ -e, --endpoint <value>
445
+ Specifies a URL for the PDF Butler endpoint for export.
446
+ For example: https://www.pdfbutler.com. It is a required parameter.
447
+
448
+ -a, --auth-env-var <value>
449
+ Specifies the PDF Butler credentials for backend authentication.
450
+ For authenification should be used PDF butler username and admin
451
+ password. String shouldn't contain whitespase.
452
+ Format: 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD'.
453
+ For example: test_user_dev-ADMIN:test_pass. It is a required parameter.
454
+
455
+ -b, --backend
456
+ Enables backend export. If specified, the export operation may use
457
+ a PDF Butler backend process for exporting the configuration.
458
+
459
+ -u, --unzip
460
+ Use this flag to indicate that the exported configuration should be
461
+ unzipped. If specified, the exported configuration will be unzipped
462
+ after the export process is complete.
463
+ ```
464
+
465
+ ## butler pb import
466
+
467
+ Import PDF Butler document configurations and related DataSource files.
468
+
469
+ ```
470
+ USAGE
471
+ $ sf butler pb import [--target | -t <value>] [--auth-env-var | -a <value>]
472
+ [--endpoint | -e <value>] [--stage | -s <value>] [--config | -f <value>]
473
+
474
+ FLAGS
475
+ -t, --target=<value>
476
+ The Salesforce org username credentials to connect to the target org. (Required)
477
+ -a, --auth-env-var=<value>
478
+ The PDF Butler credentials for backend authentication. (Required)
479
+ -e, --endpoint=<value>
480
+ The URL PDF Butler endpoint for import. (Required)
481
+ -s, --stage=<value>
482
+ The CADMUS stage. (Required)
483
+ -f, --config=<value>
484
+ The path to the configuration file or directory containing
485
+ configurations to import. (Required)
486
+
487
+ DESCRIPTION
488
+ Import DocConfigs and related DataSource files into your organization.
489
+
490
+ You must run this command from the termianl.
491
+
492
+ To initiate an import, ensure you specify the necessary parameters,
493
+ including the target org, define PDF Butler credentials for backend
494
+ authentication, endpoint, stage, and the path to the configuration
495
+ file or directory. All the targets are required parameters.
496
+
497
+ EXAMPLE
498
+ Import configurations to the organization:
499
+
500
+ $ sf butler pb import -t sfusername@sandbox.com
501
+ -f ./sfdc/export_folder_name/archive_or_folder_name
502
+ -e 'https://www.pdfbutler.com'
503
+ -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT'
504
+
505
+ FLAG DESCRIPTIONS
506
+ -t, --target <value>
507
+ Specifies the Salesforce org username credentials to connect
508
+ to the target org where the PDF Butler configurations will be imported.
509
+ This flag is required for authentication.
510
+
511
+ -a, --auth-env-var <value>
512
+ Specifies the PDF Butler credentials for backend authentication.
513
+ For authenification should be used PDF butler username
514
+ and admin password. String shouldn't contain whitespase.
515
+ Format: 'YOUR_USERNAME + -ADMIN + ':' + YOUR_ADMIN_PASSWORD'.
516
+ For example: test_user_dev-ADMIN:test_pass.
517
+ It is a required parameter.
518
+
519
+ -e, --endpoint <value>
520
+ Specifies a URL endpoint for import. Use this flag if you need
521
+ to specify a custom import endpoint.
522
+
523
+ -s, --stage <value>
524
+ Specifies the stage or environment for the export process.
525
+ This flag helps in categorizing or labeling the exported data
526
+ according to different stages. For example: TEST, UAT, PROD.
527
+ It is a required parameter.
528
+
529
+ -f, --config <value>
530
+ Specifies the path to the configuration file or directory
531
+ containing configurations to import. This flag is required
532
+ to determine which configurations to import.
533
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/export.ts"],"names":[],"mappings":";;AAAA,2BAAoC;AACpC,6BAA8B;AAC9B,iEAA+D;AAC/D,2CAAkE;AAClE,kCAAmC;A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AAc"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.6",
2
+ "version": "0.0.8",
3
3
  "commands": {
4
4
  "butler:pb:export": {
5
5
  "id": "butler:pb:export",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pdfbutler/migration-cli",
3
3
  "description": "[![NPM](https://img.shields.io/npm/v/pdfbutler-migration-cli.svg?label=pdfbutler-migration-cli)](https://www.npmjs.com/package/pdfbutler-migration-cli) [![Downloads/week](https://img.shields.io/npm/dw/pdfbutler-migration-cli.svg)](https://npmjs.org/package/pdfbutler-migration-cli) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/pdfbutler-migration-cli/main/LICENSE.txt)",
4
- "version": "0.0.6",
4
+ "version": "0.0.8",
5
5
  "script": {
6
6
  "postinstall": "sf plugins link @pdfbutler/migration-cli"
7
7
  },
@@ -62,7 +62,8 @@
62
62
  "salesforcedx",
63
63
  "sfdx-plugin",
64
64
  "sf-plugin",
65
- "sf"
65
+ "sf",
66
+ "pdfbutler"
66
67
  ],
67
68
  "license": "BSD-3-Clause",
68
69
  "main": "lib/index.js",