@pdfbutler/migration-cli 0.0.16 → 0.0.18
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 +43 -22
- package/lib/commands/butler/pb/export.js +5 -4
- 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 +33 -5
- package/lib/commands/butler/pb/import.js.map +1 -1
- package/messages/butler.pb.export.md +2 -2
- package/messages/butler.pb.import.md +23 -20
- package/oclif.manifest.json +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,8 +11,13 @@ v0.0.11 updates: <br/>
|
|
|
11
11
|
- New '-p --partial' flag. Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
|
|
12
12
|
|
|
13
13
|
v0.0.14 updates: <br/>
|
|
14
|
+
|
|
14
15
|
- The '-i --id' flag has been added to the import command to specify the IDs of the PDF Butler document configurations that require importing. This is a required flag.
|
|
15
16
|
|
|
17
|
+
v0.0.17 updates: <br/>
|
|
18
|
+
|
|
19
|
+
- The '-c' or '--clone' flag has been added to the import command. Use '-c' or '--clone' to allow inserting new DocConfigs instead of updating existing ones.
|
|
20
|
+
|
|
16
21
|
## About
|
|
17
22
|
|
|
18
23
|
@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.
|
|
@@ -70,6 +75,7 @@ $ sf butler pb import [options]
|
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
## Recommended CLI Shell:
|
|
78
|
+
|
|
73
79
|
```
|
|
74
80
|
Windows - PowerShell
|
|
75
81
|
MacOS - zsh
|
|
@@ -90,7 +96,7 @@ $ sf butler pb export [--target | -t <value>] [--id | -i <value>] [--out | -o <v
|
|
|
90
96
|
|
|
91
97
|
FLAGS
|
|
92
98
|
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
93
|
-
-i, --id=<value> The ID of the PDF Butler
|
|
99
|
+
-i, --id=<value> The ID of the PDF Butler document configuration to export.
|
|
94
100
|
For bulk export, enter multiple docuemnt configuration IDs separated by whitespaces. (Required)
|
|
95
101
|
-o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
|
|
96
102
|
-s, --stage=<value> The CADMUS stage. (Required)
|
|
@@ -117,8 +123,8 @@ DESCRIPTION
|
|
|
117
123
|
|
|
118
124
|
To initiate an export, ensure you specify the necessary parameters, including the target org, PDF Butler docuemnt configuration ID,
|
|
119
125
|
output path, define PDF Butler credentials for backend authentication, specify endpoints and stage.
|
|
120
|
-
Additionally, you have the flexibility to enable or disable backend exports,
|
|
121
|
-
ignore invalid document configurations and allow the export of document configuration files with the backend part,
|
|
126
|
+
Additionally, you have the flexibility to enable or disable backend exports,
|
|
127
|
+
ignore invalid document configurations and allow the export of document configuration files with the backend part,
|
|
122
128
|
get a more detailed log of migration process and even choose to unzip the exported configuration.
|
|
123
129
|
|
|
124
130
|
EXAMPLES
|
|
@@ -303,7 +309,7 @@ EXAMPLES
|
|
|
303
309
|
|
|
304
310
|
# Console output:
|
|
305
311
|
Error (1): One or more docConfigs have no backend.
|
|
306
|
-
|
|
312
|
+
|
|
307
313
|
Run without --partial flag (bulk export)
|
|
308
314
|
|
|
309
315
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, document_configuration_id_2'
|
|
@@ -403,7 +409,7 @@ FLAG DESCRIPTIONS
|
|
|
403
409
|
This ID uniquely identifies the configuration you want to export. It is a required parameter.
|
|
404
410
|
|
|
405
411
|
-o, --out <value>
|
|
406
|
-
Specifies the path to the folder with the exported configuration and the archive or folder name for data sources.
|
|
412
|
+
Specifies the path to the folder with the exported configuration and the archive or folder name for data sources.
|
|
407
413
|
For example, if the flag is defined with the following values '-o butler/docConfigs', the result will be the following path: ./butler/docConfigs .
|
|
408
414
|
This flag is required to determine where the exported configuration will be saved.
|
|
409
415
|
|
|
@@ -441,11 +447,11 @@ Import PDF Butler document configurations and related DataSource files.
|
|
|
441
447
|
|
|
442
448
|
```
|
|
443
449
|
USAGE
|
|
444
|
-
$ sf butler pb import [--target | -t <value>] [--id | -i <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--stage | -s <value>] [--config | -f <value>]
|
|
450
|
+
$ sf butler pb import [--target | -t <value>] [--id | -i <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--stage | -s <value>] [--config | -f <value>] [-c | --clone]
|
|
445
451
|
|
|
446
452
|
FLAGS
|
|
447
453
|
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
448
|
-
-i, --id=<value> The ID of the PDF Butler docuemnt configurations to import.
|
|
454
|
+
-i, --id=<value> The ID of the PDF Butler docuemnt configurations to import.
|
|
449
455
|
For bulk import, enter multiple docuemnt configuration IDs separated by whitespaces.(Required)
|
|
450
456
|
-a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
|
|
451
457
|
-e, --endpoint=<value> The URL PDF Butler endpoint for import. (Required)
|
|
@@ -454,10 +460,11 @@ FLAGS
|
|
|
454
460
|
EU: https://eu1.pdfbutler.com
|
|
455
461
|
APAC: https://apac1.pdfbutler.com
|
|
456
462
|
CA: https://ca1.pdfbutler.com
|
|
457
|
-
|
|
463
|
+
|
|
458
464
|
-s, --stage=<value> The CADMUS stage. (Required)
|
|
459
465
|
-f, --config=<value> The path to the directory containing configurations to import. (Required)
|
|
460
466
|
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
467
|
+
-c, --clone Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
|
|
461
468
|
|
|
462
469
|
DESCRIPTION
|
|
463
470
|
Import DocConfigs and related DataSource files into your organization.
|
|
@@ -469,24 +476,35 @@ DESCRIPTION
|
|
|
469
476
|
All the targets are required parameters.
|
|
470
477
|
|
|
471
478
|
EXAMPLE
|
|
472
|
-
Import configurations to the organization:
|
|
479
|
+
Import configurations with --clone flag to the organization:
|
|
480
|
+
|
|
481
|
+
$ sf butler pb import -t sfusername@sandbox.com -i 'document_configuration_id' -f .export_folder_name/archive_or_folder_name
|
|
482
|
+
-e 'https://eu1.pdfbutler.com' -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT' -c
|
|
483
|
+
|
|
484
|
+
#Imported:
|
|
485
|
+
Insert a new Doc config with a unique 'customerDocumentConfigId'.
|
|
486
|
+
|
|
487
|
+
Import configurations without --clone flag to the organization:
|
|
473
488
|
|
|
474
489
|
$ sf butler pb import -t sfusername@sandbox.com -i 'document_configuration_id' -f .export_folder_name/archive_or_folder_name
|
|
475
490
|
-e 'https://eu1.pdfbutler.com' -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT'
|
|
476
|
-
|
|
477
|
-
Import configurations to the organization:
|
|
478
491
|
|
|
492
|
+
#Imported:
|
|
493
|
+
Update existing Doc config based on document_configuration_id.
|
|
479
494
|
|
|
480
495
|
Bulk import configurations to the organization:
|
|
481
|
-
|
|
496
|
+
|
|
482
497
|
$ sf butler pb import -t sfusername@sandbox.com -i 'document_configuration_id document_configuration_id2' -f .export_folder_name/archive_or_folder_name
|
|
483
498
|
-e 'https://eu1.pdfbutler.com' -a 'pdf_butler_user_name-ADMIN:admin_password' -s 'UAT'
|
|
484
499
|
|
|
500
|
+
#Imported:
|
|
501
|
+
2 Doc configs, where the value of the field 'customerDocumentConfigId' is equal to document_configuration_id and document_configuration_id2, respectively.
|
|
502
|
+
|
|
485
503
|
FLAG DESCRIPTIONS
|
|
486
504
|
-t, --target <value>
|
|
487
505
|
Specifies the Salesforce org username credentials to connect to the target
|
|
488
506
|
org where the PDF Butler configurations will be imported. This flag is required for authentication.
|
|
489
|
-
|
|
507
|
+
|
|
490
508
|
-i, --id <value>
|
|
491
509
|
Specifies the unique ID of the PDF Butler document configuration to be imported.
|
|
492
510
|
This ID uniquely identifies the configuration you want to import. It is a required parameter.
|
|
@@ -507,9 +525,12 @@ FLAG DESCRIPTIONS
|
|
|
507
525
|
-f, --config <value>
|
|
508
526
|
Specifies the path to the configuration file or directory containing configurations to import.
|
|
509
527
|
This flag is required to determine which configurations to import.
|
|
510
|
-
|
|
528
|
+
|
|
511
529
|
-l, --logs
|
|
512
530
|
Use this flag to get a more detailed log of migration process.
|
|
531
|
+
|
|
532
|
+
-c, --clone
|
|
533
|
+
Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
|
|
513
534
|
```
|
|
514
535
|
|
|
515
536
|
## Typical errors and solutions
|
|
@@ -521,8 +542,8 @@ Typical errors that may occur when using the plugin and their solutions.
|
|
|
521
542
|
- EPERM operation not permitted, chmod 'path_to_directory_to_export'.
|
|
522
543
|
|
|
523
544
|
```
|
|
524
|
-
SOLUTION: error typically occurs due to insufficient permissions. To resolve it,
|
|
525
|
-
make sure you have the necessary permissions to write to the specified directory.
|
|
545
|
+
SOLUTION: error typically occurs due to insufficient permissions. To resolve it,
|
|
546
|
+
make sure you have the necessary permissions to write to the specified directory.
|
|
526
547
|
You can use the chmod command to change the directory permissions.
|
|
527
548
|
|
|
528
549
|
```
|
|
@@ -559,8 +580,8 @@ SOLUTION: Verify that the Doc Config IDs you provided are correct and exist in t
|
|
|
559
580
|
- Error (1): One or more docConfigs have no backend.
|
|
560
581
|
|
|
561
582
|
```
|
|
562
|
-
SOLUTION: This error indicates that some document configurations are missing backend part.
|
|
563
|
-
Review the document configurations and ensure that they are properly configured with the required server modules.
|
|
583
|
+
SOLUTION: This error indicates that some document configurations are missing backend part.
|
|
584
|
+
Review the document configurations and ensure that they are properly configured with the required server modules.
|
|
564
585
|
Or you can add the "-p --partial" flag to enable exporting those docconfigs that have a backend part.
|
|
565
586
|
|
|
566
587
|
```
|
|
@@ -582,7 +603,7 @@ SOLUTION: When using the --stage flag, make sure to provide a valid CADMUS stage
|
|
|
582
603
|
- Error (1): Flag --auth-env-var expects a value.
|
|
583
604
|
|
|
584
605
|
```
|
|
585
|
-
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
606
|
+
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
586
607
|
Ensure that the PDF Butler credentials is correctly set and contains the required credentials (Username and Admin password).
|
|
587
608
|
|
|
588
609
|
```
|
|
@@ -597,7 +618,7 @@ SOLUTION: When using the --endpoint flag, specify the correct endpoint URL as th
|
|
|
597
618
|
- Error (1): Response code 401 (Unauthorized).
|
|
598
619
|
|
|
599
620
|
```
|
|
600
|
-
SOLUTION: This error indicates that your request lacks proper authentication. Double-check your credentials like PDF Butler Username or PDF Butler Admin password.
|
|
621
|
+
SOLUTION: This error indicates that your request lacks proper authentication. Double-check your credentials like PDF Butler Username or PDF Butler Admin password.
|
|
601
622
|
Correct example: 'Username-ADMIN:Admin_password'
|
|
602
623
|
|
|
603
624
|
```
|
|
@@ -605,7 +626,7 @@ Correct example: 'Username-ADMIN:Admin_password'
|
|
|
605
626
|
- Error (1): System.LicenseException: The Apex Class RestImportDocConfig is part of the AppExchange Package PDF Butler, and requires a license to use.
|
|
606
627
|
|
|
607
628
|
```
|
|
608
|
-
SOLUTION: To resolve this error, you need to acquire the required license for the AppExchange Package PDF Butler to use the plugin command.
|
|
629
|
+
SOLUTION: To resolve this error, you need to acquire the required license for the AppExchange Package PDF Butler to use the plugin command.
|
|
609
630
|
Contact your Salesforce administrator or license provider to obtain the necessary license.
|
|
610
631
|
|
|
611
632
|
```
|
|
@@ -628,7 +649,7 @@ SOLUTION:
|
|
|
628
649
|
- Error (1): Flag --auth-env-var expects a value.
|
|
629
650
|
|
|
630
651
|
```
|
|
631
|
-
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
652
|
+
SOLUTION: When using the --auth-env-var flag, provide the PDF Butler credentials for backend authentication.
|
|
632
653
|
Ensure that the PDF Butler credentials is correctly set and contains the required credentials (Username and Admin password).
|
|
633
654
|
|
|
634
655
|
```
|
|
@@ -20,12 +20,12 @@ const messages = core_1.Messages.loadMessages('@pdfbutler/migration-cli', 'butle
|
|
|
20
20
|
class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
21
21
|
static getDocConfigIds(id) {
|
|
22
22
|
const docConfigIds = id.split(/([\w-]{36})/).filter((n) => n);
|
|
23
|
-
docConfigIds.
|
|
23
|
+
docConfigIds.map((docId) => {
|
|
24
24
|
if (!docId.trim()) {
|
|
25
25
|
docConfigIds.splice(docConfigIds.indexOf(docId), 1);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
if (docConfigIds.length
|
|
28
|
+
if (docConfigIds.length < 0) {
|
|
29
29
|
throw new Error('No matching Doc Configs ids found');
|
|
30
30
|
}
|
|
31
31
|
return docConfigIds;
|
|
@@ -51,7 +51,8 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
51
51
|
catch (e) {
|
|
52
52
|
throw new Error('DocConfig export has been failed');
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
const responses = await Promise.all(docConfigPromises);
|
|
55
|
+
return responses;
|
|
55
56
|
}
|
|
56
57
|
async run() {
|
|
57
58
|
const { flags } = await this.parse(ButlerPbExport);
|
|
@@ -138,7 +139,7 @@ class ButlerPbExport extends sf_plugins_core_1.SfCommand {
|
|
|
138
139
|
else {
|
|
139
140
|
const writePromises = docConfigIds.map(async (docConfigId) => {
|
|
140
141
|
const filePath = `./${outDir}/sfdc/${docConfigId}.json`;
|
|
141
|
-
const data = JSON.stringify(docConfigResponses[docConfigIds.indexOf(docConfigId)]);
|
|
142
|
+
const data = JSON.stringify(docConfigResponses[docConfigIds.indexOf(docConfigId)]) ?? '';
|
|
142
143
|
await fs_1.promises.writeFile(filePath, data);
|
|
143
144
|
});
|
|
144
145
|
await Promise.all(writePromises);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/export.ts"],"names":[],"mapp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C;IACF,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC;QAClB,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"}
|
|
@@ -16,6 +16,7 @@ export default class ButlerPbImport extends SfCommand<ButlerPbImportResult> {
|
|
|
16
16
|
config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
17
|
logs: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
18
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
19
|
+
clone: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
};
|
|
20
21
|
private static getTargetPath;
|
|
21
22
|
private static getFiles;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
4
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
9
|
+
/* eslint-disable no-console */
|
|
3
10
|
const path = require("path");
|
|
4
11
|
const fs = require("graceful-fs");
|
|
5
12
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
@@ -74,16 +81,18 @@ class ButlerPbImport extends sf_plugins_core_1.SfCommand {
|
|
|
74
81
|
}));
|
|
75
82
|
const authInfo = await core_1.AuthInfo.create({ username: flags.target });
|
|
76
83
|
const connection = await core_1.Connection.create({ authInfo });
|
|
84
|
+
let responses;
|
|
77
85
|
this.log(`Connected to ${flags.target} (${authInfo.getFields().orgId}) with API version ${connection.version}`);
|
|
78
86
|
try {
|
|
79
87
|
if (jsonArray.length > 0) {
|
|
80
|
-
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
89
|
+
responses = await Promise.all(jsonArray.map(async (jsonFile) => {
|
|
81
90
|
const sfdcConfig = JSON.parse(await fs.promises.readFile(jsonFile, 'utf8'));
|
|
82
|
-
|
|
91
|
+
return connection.apex.post(`/cadmus_core/DocConfig/Import/?isInsert=${flags.clone === undefined ? 'false' : 'true'}`, sfdcConfig, {
|
|
83
92
|
headers: { 'content-type': 'application/json' },
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
})
|
|
94
|
+
.then((data) => data);
|
|
95
|
+
}));
|
|
87
96
|
if (flags.logs)
|
|
88
97
|
this.log('Data successfully written to the target Salesforce org');
|
|
89
98
|
}
|
|
@@ -121,6 +130,20 @@ class ButlerPbImport extends sf_plugins_core_1.SfCommand {
|
|
|
121
130
|
for (const entry of zip.getEntries()) {
|
|
122
131
|
if (entry != null) {
|
|
123
132
|
zipToSend.addFile(entry.entryName, zip.readFile(entry));
|
|
133
|
+
if (flags.clone && entry.entryName === 'doc-config.json') {
|
|
134
|
+
const fileContent = zip.readFile(entry);
|
|
135
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
136
|
+
const docConfig = JSON.parse(fileContent.toString('utf-8'));
|
|
137
|
+
responses.forEach((element) => {
|
|
138
|
+
if (typeof element === 'object' && element !== null) {
|
|
139
|
+
const elementObj = element;
|
|
140
|
+
if (elementObj[docConfig.customerDocumentConfigId] !== undefined) {
|
|
141
|
+
docConfig.customerDocumentConfigId = elementObj[docConfig.customerDocumentConfigId];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
zipToSend.updateFile(entry, Buffer.from(JSON.stringify(docConfig)));
|
|
146
|
+
}
|
|
124
147
|
}
|
|
125
148
|
}
|
|
126
149
|
const txt = zip.readAsText('doc-config.json');
|
|
@@ -196,6 +219,11 @@ ButlerPbImport.flags = {
|
|
|
196
219
|
char: 'i',
|
|
197
220
|
required: true,
|
|
198
221
|
}),
|
|
222
|
+
clone: sf_plugins_core_1.Flags.boolean({
|
|
223
|
+
// eslint-disable-next-line sf-plugin/no-missing-messages
|
|
224
|
+
summary: messages.getMessage('flags.clone.summary'),
|
|
225
|
+
char: 'c',
|
|
226
|
+
}),
|
|
199
227
|
};
|
|
200
228
|
exports.default = ButlerPbImport;
|
|
201
229
|
//# sourceMappingURL=import.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/import.ts"],"names":[],"mappings":";;AAAA,6BAA8B;AAC9B,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;
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/butler/pb/import.ts"],"names":[],"mappings":";;AAAA,wDAAwD;AACxD,qEAAqE;AACrE,0DAA0D;AAC1D,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,+BAA+B;AAC/B,6BAA8B;AAC9B,kCAAmC;AACnC,iEAA+D;AAC/D,2CAAkE;AAClE,sCAAuC;AACvC,kCAAmC;AACnC,6BAAsB;AAEtB,eAAQ,CAAC,uBAAuB,CAAC,S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;QAChD,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,KAAK,EAAE,uBAAK,CAAC,OAAO,CAAC;QACnB,yDAAyD;QACzD,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACnD,IAAI,EAAE,GAAG;KACV,CAAC;CACH,CAAC;kBAhDiB,cAAc"}
|
|
@@ -4,7 +4,7 @@ Summary of a command.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
More information about a command. Don't repeat the summary.
|
|
7
|
+
More information about a command. Don't repeat the summary.
|
|
8
8
|
|
|
9
9
|
# flags.name.summary
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Description of a flag.
|
|
|
12
12
|
|
|
13
13
|
# flags.name.description
|
|
14
14
|
|
|
15
|
-
More information about a flag. Don't repeat the summary.
|
|
15
|
+
More information about a flag. Don't repeat the summary.
|
|
16
16
|
|
|
17
17
|
# examples
|
|
18
18
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
Summary of a command.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
More information about a command. Don't repeat the summary.
|
|
8
|
-
|
|
9
|
-
# flags.name.summary
|
|
10
|
-
|
|
11
|
-
Description of a flag.
|
|
12
|
-
|
|
13
|
-
# flags.name.description
|
|
14
|
-
|
|
15
|
-
More information about a flag. Don't repeat the summary.
|
|
16
|
-
|
|
17
|
-
# examples
|
|
18
|
-
|
|
19
|
-
- <%= config.bin %> <%= command.id %>
|
|
20
|
-
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Summary of a command.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
More information about a command. Don't repeat the summary.
|
|
8
|
+
|
|
9
|
+
# flags.name.summary
|
|
10
|
+
|
|
11
|
+
Description of a flag.
|
|
12
|
+
|
|
13
|
+
# flags.name.description
|
|
14
|
+
|
|
15
|
+
More information about a flag. Don't repeat the summary.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- <%= config.bin %> <%= command.id %>
|
|
21
20
|
|
|
22
21
|
# flags.target.summary
|
|
23
22
|
|
|
@@ -46,3 +45,7 @@ Summary for logs.
|
|
|
46
45
|
# flags.id.summary
|
|
47
46
|
|
|
48
47
|
Summary for id.
|
|
48
|
+
|
|
49
|
+
# flags.clone.summary
|
|
50
|
+
|
|
51
|
+
Summary for clone.
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.18",
|
|
3
3
|
"commands": {
|
|
4
4
|
"butler:pb:export": {
|
|
5
5
|
"id": "butler:pb:export",
|
|
@@ -187,6 +187,13 @@
|
|
|
187
187
|
"summary": "Summary for id.",
|
|
188
188
|
"required": true,
|
|
189
189
|
"multiple": false
|
|
190
|
+
},
|
|
191
|
+
"clone": {
|
|
192
|
+
"name": "clone",
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"char": "c",
|
|
195
|
+
"summary": "Summary for clone.",
|
|
196
|
+
"allowNo": false
|
|
190
197
|
}
|
|
191
198
|
},
|
|
192
199
|
"args": {}
|
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.18",
|
|
5
5
|
"script": {
|
|
6
6
|
"postinstall": "sf plugins link @pdfbutler/migration-cli"
|
|
7
7
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"output": []
|
|
137
137
|
},
|
|
138
138
|
"lint": {
|
|
139
|
-
"command": "eslint src
|
|
139
|
+
"command": "eslint src --color --cache --cache-location .eslintcache",
|
|
140
140
|
"files": [
|
|
141
141
|
"src/**/*.ts",
|
|
142
142
|
"test/**/*.ts",
|