mcdev 4.1.4 → 4.1.6
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/.github/ISSUE_TEMPLATE/bug.yml +2 -0
- package/README.md +6 -6
- package/docs/dist/documentation.md +73 -165
- package/lib/cli.js +1 -1
- package/lib/index.js +5 -16
- package/lib/util/cli.js +28 -19
- package/lib/util/devops.js +2 -2
- package/lib/util/init.git.js +11 -12
- package/lib/util/init.js +28 -24
- package/package.json +3 -3
- package/test/mockRoot/.mcdevrc.json +1 -1
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ If you experience issues installing Accenture SFMC DevTools, please check out th
|
|
|
123
123
|
1. Install Accenture SFMC DevTools by running `npm install -g mcdev` (prefix with `sudo` on MacOS)
|
|
124
124
|
- If you get an error, please see the below troubleshooting section.
|
|
125
125
|
|
|
126
|
-
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.
|
|
126
|
+
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.6`).
|
|
127
127
|
|
|
128
128
|
> **_Side note for proud nerds_:**
|
|
129
129
|
>
|
|
@@ -277,10 +277,10 @@ _Note: Regardless of which tag or branch you install_
|
|
|
277
277
|
**Install specific version (using a version tag on npm):**
|
|
278
278
|
|
|
279
279
|
```bash
|
|
280
|
-
npm install -g mcdev@4.1.
|
|
280
|
+
npm install -g mcdev@4.1.6
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
**Warning**: When you used the above method to install Accenture SFMC DevTools for a specific version or tag, trying to [update Accenture SFMC DevTools](#updating-mcdev) might not download the most recently published official version but instead stay on the version or branch you previously selected (in the above examples: develop, 4.1.
|
|
283
|
+
**Warning**: When you used the above method to install Accenture SFMC DevTools for a specific version or tag, trying to [update Accenture SFMC DevTools](#updating-mcdev) might not download the most recently published official version but instead stay on the version or branch you previously selected (in the above examples: develop, 4.1.6)!
|
|
284
284
|
|
|
285
285
|
> **Note**: The version is currently _not_ updated on the developer branch until a new release is published. Hence, you will not see a change if you run `mcdev --version`.
|
|
286
286
|
|
|
@@ -476,7 +476,7 @@ Example url: `https://mcg123abcysykllg-0321cbs8bbt64.auth.marketingcloudapis.com
|
|
|
476
476
|
> You can run this command without the interactive wizard asking questions using the `--skipInteraction` (or short`--yes`/`--y`) flag. In this case, you need to provide a few values in the command:
|
|
477
477
|
>
|
|
478
478
|
> ```bash
|
|
479
|
-
> mcdev init --y.
|
|
479
|
+
> mcdev init --y.credentialName "yourCustomCredentialName" --y.client_id "yourClientIdHere" --y.client_secret "yourClientSecretHere" --y.auth_url "https://yourTenantSubdomainHere.auth.marketingcloudapis.com/" --y.gitRemoteUrl "https://my.git.server.com/myrepo.git" --y.account_id 00000000 --y.backupBUs "yes" --y.gitPush "yes"
|
|
480
480
|
> ```
|
|
481
481
|
|
|
482
482
|
#### 6.1.2. upgrade
|
|
@@ -1493,7 +1493,7 @@ Assuming you cloned Accenture SFMC DevTools into `C:\repos\sfmc-devtools\` (or `
|
|
|
1493
1493
|
|
|
1494
1494
|
This should tell npm to create a symlink to your cloned local directoty, allowing you to see updates you make in your mcdev repo instantly.
|
|
1495
1495
|
|
|
1496
|
-
To test your new **global** developer setup, run `mcdev --version` in CLI which should return the current version (e.g. `4.1.
|
|
1496
|
+
To test your new **global** developer setup, run `mcdev --version` in CLI which should return the current version (e.g. `4.1.6`). Then, go into your mcdev repo and update the version with the suffix `-dev`, e.g. to `4.1.6-dev` and then run `mcdev --version` again to verify that your change propagates instantly.
|
|
1497
1497
|
|
|
1498
1498
|
> **Not recommended:** Alternatively, you can install it locally only by opening a terminal in your project directory and executing `npm install --save-dev "C:\repos\sfmc-devtools"`
|
|
1499
1499
|
> To run the local version you need to prepend "npx" before your commands, e.g. `npx mcdev --version`
|
|
@@ -1531,7 +1531,7 @@ The following explains how you _could_ install it locally for certain edge cases
|
|
|
1531
1531
|
4. Afterwards, install Accenture SFMC DevTools by running `npm install --save-dev mcdev`
|
|
1532
1532
|
- If you get an error, please see the below troubleshooting section.
|
|
1533
1533
|
|
|
1534
|
-
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.
|
|
1534
|
+
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.6`).
|
|
1535
1535
|
|
|
1536
1536
|
### 9.3. NPM Scripts
|
|
1537
1537
|
|
|
@@ -454,10 +454,10 @@ main class
|
|
|
454
454
|
* [.createDeltaPkg(argv)](#Mcdev.createDeltaPkg) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
455
455
|
* [.selectTypes()](#Mcdev.selectTypes) ⇒ <code>Promise</code>
|
|
456
456
|
* [.explainTypes()](#Mcdev.explainTypes) ⇒ <code>void</code>
|
|
457
|
-
* [.upgrade(
|
|
457
|
+
* [.upgrade()](#Mcdev.upgrade) ⇒ <code>Promise.<boolean></code>
|
|
458
458
|
* [.retrieve(businessUnit, [selectedTypesArr], [keys], [changelogOnly])](#Mcdev.retrieve) ⇒ <code>Promise.<object></code>
|
|
459
459
|
* [.deploy(businessUnit, [selectedTypesArr], [keyArr], [fromRetrieve])](#Mcdev.deploy) ⇒ <code>Promise.<Object.<string, TYPE.MultiMetadataTypeMap>></code>
|
|
460
|
-
* [.initProject([credentialsName]
|
|
460
|
+
* [.initProject([credentialsName])](#Mcdev.initProject) ⇒ <code>Promise.<void></code>
|
|
461
461
|
* [.findBUs(credentialsName)](#Mcdev.findBUs) ⇒ <code>Promise.<void></code>
|
|
462
462
|
* [.document(businessUnit, type)](#Mcdev.document) ⇒ <code>Promise.<void></code>
|
|
463
463
|
* [.deleteByKey(businessUnit, type, customerKey)](#Mcdev.deleteByKey) ⇒ <code>Promise.<void></code>
|
|
@@ -507,7 +507,6 @@ handler for 'mcdev createDeltaPkg
|
|
|
507
507
|
| [argv.range] | <code>string</code> | git commit range into deploy directory |
|
|
508
508
|
| [argv.filter] | <code>string</code> | filter file paths that start with any |
|
|
509
509
|
| [argv.diffArr] | <code>Array.<TYPE.DeltaPkgItem></code> | list of files to include in delta package (skips git diff when provided) |
|
|
510
|
-
| [argv.skipInteraction] | <code>TYPE.skipInteraction</code> | allows to skip interactive wizard |
|
|
511
510
|
|
|
512
511
|
<a name="Mcdev.selectTypes"></a>
|
|
513
512
|
|
|
@@ -520,14 +519,9 @@ handler for 'mcdev createDeltaPkg
|
|
|
520
519
|
**Kind**: static method of [<code>Mcdev</code>](#Mcdev)
|
|
521
520
|
<a name="Mcdev.upgrade"></a>
|
|
522
521
|
|
|
523
|
-
### Mcdev.upgrade(
|
|
522
|
+
### Mcdev.upgrade() ⇒ <code>Promise.<boolean></code>
|
|
524
523
|
**Kind**: static method of [<code>Mcdev</code>](#Mcdev)
|
|
525
524
|
**Returns**: <code>Promise.<boolean></code> - success flag
|
|
526
|
-
|
|
527
|
-
| Param | Type | Description |
|
|
528
|
-
| --- | --- | --- |
|
|
529
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
530
|
-
|
|
531
525
|
<a name="Mcdev.retrieve"></a>
|
|
532
526
|
|
|
533
527
|
### Mcdev.retrieve(businessUnit, [selectedTypesArr], [keys], [changelogOnly]) ⇒ <code>Promise.<object></code>
|
|
@@ -560,7 +554,7 @@ Deploys all metadata located in the 'deploy' directory to the specified business
|
|
|
560
554
|
|
|
561
555
|
<a name="Mcdev.initProject"></a>
|
|
562
556
|
|
|
563
|
-
### Mcdev.initProject([credentialsName]
|
|
557
|
+
### Mcdev.initProject([credentialsName]) ⇒ <code>Promise.<void></code>
|
|
564
558
|
Creates template file for properties.json
|
|
565
559
|
|
|
566
560
|
**Kind**: static method of [<code>Mcdev</code>](#Mcdev)
|
|
@@ -569,7 +563,6 @@ Creates template file for properties.json
|
|
|
569
563
|
| Param | Type | Description |
|
|
570
564
|
| --- | --- | --- |
|
|
571
565
|
| [credentialsName] | <code>string</code> | identifying name of the installed package / project |
|
|
572
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
573
566
|
|
|
574
567
|
<a name="Mcdev.findBUs"></a>
|
|
575
568
|
|
|
@@ -4796,12 +4789,13 @@ CLI helper class
|
|
|
4796
4789
|
**Kind**: global constant
|
|
4797
4790
|
|
|
4798
4791
|
* [Cli](#Cli)
|
|
4799
|
-
* [.initMcdevConfig(
|
|
4800
|
-
* [.addExtraCredential(properties
|
|
4801
|
-
* [.
|
|
4792
|
+
* [.initMcdevConfig()](#Cli.initMcdevConfig) ⇒ <code>Promise.<boolean></code>
|
|
4793
|
+
* [.addExtraCredential(properties)](#Cli.addExtraCredential) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4794
|
+
* [.logExistingCredentials(properties)](#Cli.logExistingCredentials) ⇒ <code>void</code>
|
|
4795
|
+
* [.updateCredential(properties, credName)](#Cli.updateCredential) ⇒ <code>Promise.<boolean></code>
|
|
4802
4796
|
* [.getCredentialObject(properties, target, [isCredentialOnly], [allowAll])](#Cli.getCredentialObject) ⇒ <code>Promise.<TYPE.BuObject></code>
|
|
4803
4797
|
* [._selectBU(properties, [credential], [isCredentialOnly], [allowAll])](#Cli._selectBU) ⇒ <code>Promise.<Array></code>
|
|
4804
|
-
* [._setCredential(properties, [credName]
|
|
4798
|
+
* [._setCredential(properties, [credName])](#Cli._setCredential) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4805
4799
|
* [._askCredentials(properties, [credName])](#Cli._askCredentials) ⇒ <code>Promise.<object></code>
|
|
4806
4800
|
* [.selectTypes(properties, [setTypesArr])](#Cli.selectTypes) ⇒ <code>Promise.<void></code>
|
|
4807
4801
|
* [._summarizeSubtypes(responses, type)](#Cli._summarizeSubtypes) ⇒ <code>void</code>
|
|
@@ -4809,33 +4803,38 @@ CLI helper class
|
|
|
4809
4803
|
|
|
4810
4804
|
<a name="Cli.initMcdevConfig"></a>
|
|
4811
4805
|
|
|
4812
|
-
### Cli.initMcdevConfig(
|
|
4806
|
+
### Cli.initMcdevConfig() ⇒ <code>Promise.<boolean></code>
|
|
4813
4807
|
used when initially setting up a project.
|
|
4814
4808
|
loads default config and adds first credential
|
|
4815
4809
|
|
|
4816
4810
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
4817
4811
|
**Returns**: <code>Promise.<boolean></code> - success of init
|
|
4812
|
+
<a name="Cli.addExtraCredential"></a>
|
|
4813
|
+
|
|
4814
|
+
### Cli.addExtraCredential(properties) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4815
|
+
Extends template file for properties.json
|
|
4816
|
+
|
|
4817
|
+
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
4818
|
+
**Returns**: <code>Promise.<(boolean\|string)></code> - status
|
|
4818
4819
|
|
|
4819
4820
|
| Param | Type | Description |
|
|
4820
4821
|
| --- | --- | --- |
|
|
4821
|
-
|
|
|
4822
|
+
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
4822
4823
|
|
|
4823
|
-
<a name="Cli.
|
|
4824
|
+
<a name="Cli.logExistingCredentials"></a>
|
|
4824
4825
|
|
|
4825
|
-
### Cli.
|
|
4826
|
-
|
|
4826
|
+
### Cli.logExistingCredentials(properties) ⇒ <code>void</code>
|
|
4827
|
+
helper that logs to cli which credentials are already existing in our config file
|
|
4827
4828
|
|
|
4828
4829
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
4829
|
-
**Returns**: <code>Promise.<void></code> - -
|
|
4830
4830
|
|
|
4831
4831
|
| Param | Type | Description |
|
|
4832
4832
|
| --- | --- | --- |
|
|
4833
4833
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
4834
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
4835
4834
|
|
|
4836
4835
|
<a name="Cli.updateCredential"></a>
|
|
4837
4836
|
|
|
4838
|
-
### Cli.updateCredential(properties, credName
|
|
4837
|
+
### Cli.updateCredential(properties, credName) ⇒ <code>Promise.<boolean></code>
|
|
4839
4838
|
Extends template file for properties.json
|
|
4840
4839
|
update credentials
|
|
4841
4840
|
|
|
@@ -4846,7 +4845,6 @@ update credentials
|
|
|
4846
4845
|
| --- | --- | --- |
|
|
4847
4846
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
4848
4847
|
| credName | <code>string</code> | name of credential that needs updating |
|
|
4849
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
4850
4848
|
|
|
4851
4849
|
<a name="Cli.getCredentialObject"></a>
|
|
4852
4850
|
|
|
@@ -4880,7 +4878,7 @@ helps select the right credential in case of bad initial input
|
|
|
4880
4878
|
|
|
4881
4879
|
<a name="Cli._setCredential"></a>
|
|
4882
4880
|
|
|
4883
|
-
### Cli.\_setCredential(properties, [credName]
|
|
4881
|
+
### Cli.\_setCredential(properties, [credName]) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4884
4882
|
helper around _askCredentials
|
|
4885
4883
|
|
|
4886
4884
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
@@ -4890,7 +4888,6 @@ helper around _askCredentials
|
|
|
4890
4888
|
| --- | --- | --- |
|
|
4891
4889
|
| properties | <code>TYPE.Mcdevrc</code> | from config file |
|
|
4892
4890
|
| [credName] | <code>string</code> | name of credential that needs updating |
|
|
4893
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
4894
4891
|
|
|
4895
4892
|
<a name="Cli._askCredentials"></a>
|
|
4896
4893
|
|
|
@@ -4994,7 +4991,7 @@ DevOps helper class
|
|
|
4994
4991
|
* [.getDeltaList(properties, [range], [saveToDeployDir], [filterPaths])](#DevOps.getDeltaList) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
4995
4992
|
* [~delta](#DevOps.getDeltaList..delta) : <code>Array.<TYPE.DeltaPkgItem></code>
|
|
4996
4993
|
* [~copied](#DevOps.getDeltaList..copied) : <code>TYPE.DeltaPkgItem</code>
|
|
4997
|
-
* [.buildDeltaDefinitions(properties, range, [diffArr]
|
|
4994
|
+
* [.buildDeltaDefinitions(properties, range, [diffArr])](#DevOps.buildDeltaDefinitions) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
4998
4995
|
* [~deltaDeployAll](#DevOps.buildDeltaDefinitions..deltaDeployAll) : <code>Array.<TYPE.DeltaPkgItem></code>
|
|
4999
4996
|
* [.document(directory, jsonReport)](#DevOps.document) ⇒ <code>void</code>
|
|
5000
4997
|
* [.getFilesToCommit(properties, buObject, metadataType, keyArr)](#DevOps.getFilesToCommit) ⇒ <code>Promise.<Array.<string>></code>
|
|
@@ -5030,7 +5027,7 @@ Interactive commit selection if no commits are passed.
|
|
|
5030
5027
|
**Kind**: inner constant of [<code>getDeltaList</code>](#DevOps.getDeltaList)
|
|
5031
5028
|
<a name="DevOps.buildDeltaDefinitions"></a>
|
|
5032
5029
|
|
|
5033
|
-
### DevOps.buildDeltaDefinitions(properties, range, [diffArr]
|
|
5030
|
+
### DevOps.buildDeltaDefinitions(properties, range, [diffArr]) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
5034
5031
|
wrapper around DevOps.getDeltaList, Builder.buildTemplate and M
|
|
5035
5032
|
|
|
5036
5033
|
**Kind**: static method of [<code>DevOps</code>](#DevOps)
|
|
@@ -5041,7 +5038,6 @@ wrapper around DevOps.getDeltaList, Builder.buildTemplate and M
|
|
|
5041
5038
|
| properties | <code>TYPE.Mcdevrc</code> | project config file |
|
|
5042
5039
|
| range | <code>string</code> | git commit range |
|
|
5043
5040
|
| [diffArr] | <code>Array.<TYPE.DeltaPkgItem></code> | instead of running git diff the method can also get a list of files to process |
|
|
5044
|
-
| [skipInteraction] | <code>TYPE.SkipInteraction</code> | allows to skip interactive wizard |
|
|
5045
5041
|
|
|
5046
5042
|
<a name="DevOps.buildDeltaDefinitions..deltaDeployAll"></a>
|
|
5047
5043
|
|
|
@@ -5332,13 +5328,13 @@ CLI helper class
|
|
|
5332
5328
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5333
5329
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5334
5330
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5335
|
-
* [.initGitRepo(
|
|
5336
|
-
* [.gitPush(
|
|
5337
|
-
* [._addGitRemote(
|
|
5338
|
-
* [._updateGitConfigUser(
|
|
5331
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5332
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5333
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5334
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5339
5335
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5340
|
-
* [.initProject(properties, credentialName
|
|
5341
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5336
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5337
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5342
5338
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5343
5339
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5344
5340
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5416,50 +5412,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5416
5412
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5417
5413
|
<a name="Init.initGitRepo"></a>
|
|
5418
5414
|
|
|
5419
|
-
### Init.initGitRepo(
|
|
5415
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5420
5416
|
check if git repo exists and otherwise create one
|
|
5421
5417
|
|
|
5422
5418
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5423
5419
|
**Returns**: <code>Promise.<{status: string, repoName: string}></code> - success flag
|
|
5424
|
-
|
|
5425
|
-
| Param | Type | Description |
|
|
5426
|
-
| --- | --- | --- |
|
|
5427
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5428
|
-
|
|
5429
5420
|
<a name="Init.gitPush"></a>
|
|
5430
5421
|
|
|
5431
|
-
### Init.gitPush(
|
|
5422
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5432
5423
|
offer to push the new repo straight to the server
|
|
5433
5424
|
|
|
5434
5425
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5435
|
-
|
|
5436
|
-
| Param | Type | Description |
|
|
5437
|
-
| --- | --- | --- |
|
|
5438
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5439
|
-
|
|
5440
5426
|
<a name="Init._addGitRemote"></a>
|
|
5441
5427
|
|
|
5442
|
-
### Init.\_addGitRemote(
|
|
5428
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5443
5429
|
offers to add the git remote origin
|
|
5444
5430
|
|
|
5445
5431
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5446
5432
|
**Returns**: <code>string</code> - repo name (optionally)
|
|
5447
|
-
|
|
5448
|
-
| Param | Type | Description |
|
|
5449
|
-
| --- | --- | --- |
|
|
5450
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5451
|
-
|
|
5452
5433
|
<a name="Init._updateGitConfigUser"></a>
|
|
5453
5434
|
|
|
5454
|
-
### Init.\_updateGitConfigUser(
|
|
5435
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5455
5436
|
checks global config and ask to config the user info and then store it locally
|
|
5456
5437
|
|
|
5457
5438
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5458
|
-
|
|
5459
|
-
| Param | Type | Description |
|
|
5460
|
-
| --- | --- | --- |
|
|
5461
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5462
|
-
|
|
5463
5439
|
<a name="Init._getGitConfigUser"></a>
|
|
5464
5440
|
|
|
5465
5441
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5469,7 +5445,7 @@ retrieves the global user.name and user.email values
|
|
|
5469
5445
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5470
5446
|
<a name="Init.initProject"></a>
|
|
5471
5447
|
|
|
5472
|
-
### Init.initProject(properties, credentialName
|
|
5448
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5473
5449
|
Creates template file for properties.json
|
|
5474
5450
|
|
|
5475
5451
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5479,11 +5455,10 @@ Creates template file for properties.json
|
|
|
5479
5455
|
| --- | --- | --- |
|
|
5480
5456
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5481
5457
|
| credentialName | <code>string</code> | identifying name of the installed package / project |
|
|
5482
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5483
5458
|
|
|
5484
5459
|
<a name="Init._downloadAllBUs"></a>
|
|
5485
5460
|
|
|
5486
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5461
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5487
5462
|
helper for this.initProject()
|
|
5488
5463
|
|
|
5489
5464
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5493,7 +5468,6 @@ helper for this.initProject()
|
|
|
5493
5468
|
| --- | --- | --- |
|
|
5494
5469
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5495
5470
|
| gitStatus | <code>string</code> | signals what state the git repo is in |
|
|
5496
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5497
5471
|
|
|
5498
5472
|
<a name="Init.upgradeProject"></a>
|
|
5499
5473
|
|
|
@@ -5561,13 +5535,13 @@ CLI helper class
|
|
|
5561
5535
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5562
5536
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5563
5537
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5564
|
-
* [.initGitRepo(
|
|
5565
|
-
* [.gitPush(
|
|
5566
|
-
* [._addGitRemote(
|
|
5567
|
-
* [._updateGitConfigUser(
|
|
5538
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5539
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5540
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5541
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5568
5542
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5569
|
-
* [.initProject(properties, credentialName
|
|
5570
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5543
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5544
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5571
5545
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5572
5546
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5573
5547
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5645,50 +5619,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5645
5619
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5646
5620
|
<a name="Init.initGitRepo"></a>
|
|
5647
5621
|
|
|
5648
|
-
### Init.initGitRepo(
|
|
5622
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5649
5623
|
check if git repo exists and otherwise create one
|
|
5650
5624
|
|
|
5651
5625
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5652
5626
|
**Returns**: <code>Promise.<{status: string, repoName: string}></code> - success flag
|
|
5653
|
-
|
|
5654
|
-
| Param | Type | Description |
|
|
5655
|
-
| --- | --- | --- |
|
|
5656
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5657
|
-
|
|
5658
5627
|
<a name="Init.gitPush"></a>
|
|
5659
5628
|
|
|
5660
|
-
### Init.gitPush(
|
|
5629
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5661
5630
|
offer to push the new repo straight to the server
|
|
5662
5631
|
|
|
5663
5632
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5664
|
-
|
|
5665
|
-
| Param | Type | Description |
|
|
5666
|
-
| --- | --- | --- |
|
|
5667
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5668
|
-
|
|
5669
5633
|
<a name="Init._addGitRemote"></a>
|
|
5670
5634
|
|
|
5671
|
-
### Init.\_addGitRemote(
|
|
5635
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5672
5636
|
offers to add the git remote origin
|
|
5673
5637
|
|
|
5674
5638
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5675
5639
|
**Returns**: <code>string</code> - repo name (optionally)
|
|
5676
|
-
|
|
5677
|
-
| Param | Type | Description |
|
|
5678
|
-
| --- | --- | --- |
|
|
5679
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5680
|
-
|
|
5681
5640
|
<a name="Init._updateGitConfigUser"></a>
|
|
5682
5641
|
|
|
5683
|
-
### Init.\_updateGitConfigUser(
|
|
5642
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5684
5643
|
checks global config and ask to config the user info and then store it locally
|
|
5685
5644
|
|
|
5686
5645
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5687
|
-
|
|
5688
|
-
| Param | Type | Description |
|
|
5689
|
-
| --- | --- | --- |
|
|
5690
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5691
|
-
|
|
5692
5646
|
<a name="Init._getGitConfigUser"></a>
|
|
5693
5647
|
|
|
5694
5648
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5698,7 +5652,7 @@ retrieves the global user.name and user.email values
|
|
|
5698
5652
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5699
5653
|
<a name="Init.initProject"></a>
|
|
5700
5654
|
|
|
5701
|
-
### Init.initProject(properties, credentialName
|
|
5655
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5702
5656
|
Creates template file for properties.json
|
|
5703
5657
|
|
|
5704
5658
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5708,11 +5662,10 @@ Creates template file for properties.json
|
|
|
5708
5662
|
| --- | --- | --- |
|
|
5709
5663
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5710
5664
|
| credentialName | <code>string</code> | identifying name of the installed package / project |
|
|
5711
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5712
5665
|
|
|
5713
5666
|
<a name="Init._downloadAllBUs"></a>
|
|
5714
5667
|
|
|
5715
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5668
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5716
5669
|
helper for this.initProject()
|
|
5717
5670
|
|
|
5718
5671
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5722,7 +5675,6 @@ helper for this.initProject()
|
|
|
5722
5675
|
| --- | --- | --- |
|
|
5723
5676
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5724
5677
|
| gitStatus | <code>string</code> | signals what state the git repo is in |
|
|
5725
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5726
5678
|
|
|
5727
5679
|
<a name="Init.upgradeProject"></a>
|
|
5728
5680
|
|
|
@@ -5790,13 +5742,13 @@ CLI helper class
|
|
|
5790
5742
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5791
5743
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5792
5744
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5793
|
-
* [.initGitRepo(
|
|
5794
|
-
* [.gitPush(
|
|
5795
|
-
* [._addGitRemote(
|
|
5796
|
-
* [._updateGitConfigUser(
|
|
5745
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5746
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5747
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5748
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5797
5749
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5798
|
-
* [.initProject(properties, credentialName
|
|
5799
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5750
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5751
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5800
5752
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5801
5753
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5802
5754
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5874,50 +5826,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5874
5826
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5875
5827
|
<a name="Init.initGitRepo"></a>
|
|
5876
5828
|
|
|
5877
|
-
### Init.initGitRepo(
|
|
5829
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5878
5830
|
check if git repo exists and otherwise create one
|
|
5879
5831
|
|
|
5880
5832
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5881
5833
|
**Returns**: <code>Promise.<{status: string, repoName: string}></code> - success flag
|
|
5882
|
-
|
|
5883
|
-
| Param | Type | Description |
|
|
5884
|
-
| --- | --- | --- |
|
|
5885
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5886
|
-
|
|
5887
5834
|
<a name="Init.gitPush"></a>
|
|
5888
5835
|
|
|
5889
|
-
### Init.gitPush(
|
|
5836
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5890
5837
|
offer to push the new repo straight to the server
|
|
5891
5838
|
|
|
5892
5839
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5893
|
-
|
|
5894
|
-
| Param | Type | Description |
|
|
5895
|
-
| --- | --- | --- |
|
|
5896
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5897
|
-
|
|
5898
5840
|
<a name="Init._addGitRemote"></a>
|
|
5899
5841
|
|
|
5900
|
-
### Init.\_addGitRemote(
|
|
5842
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5901
5843
|
offers to add the git remote origin
|
|
5902
5844
|
|
|
5903
5845
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5904
5846
|
**Returns**: <code>string</code> - repo name (optionally)
|
|
5905
|
-
|
|
5906
|
-
| Param | Type | Description |
|
|
5907
|
-
| --- | --- | --- |
|
|
5908
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5909
|
-
|
|
5910
5847
|
<a name="Init._updateGitConfigUser"></a>
|
|
5911
5848
|
|
|
5912
|
-
### Init.\_updateGitConfigUser(
|
|
5849
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5913
5850
|
checks global config and ask to config the user info and then store it locally
|
|
5914
5851
|
|
|
5915
5852
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5916
|
-
|
|
5917
|
-
| Param | Type | Description |
|
|
5918
|
-
| --- | --- | --- |
|
|
5919
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5920
|
-
|
|
5921
5853
|
<a name="Init._getGitConfigUser"></a>
|
|
5922
5854
|
|
|
5923
5855
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5927,7 +5859,7 @@ retrieves the global user.name and user.email values
|
|
|
5927
5859
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5928
5860
|
<a name="Init.initProject"></a>
|
|
5929
5861
|
|
|
5930
|
-
### Init.initProject(properties, credentialName
|
|
5862
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5931
5863
|
Creates template file for properties.json
|
|
5932
5864
|
|
|
5933
5865
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5937,11 +5869,10 @@ Creates template file for properties.json
|
|
|
5937
5869
|
| --- | --- | --- |
|
|
5938
5870
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5939
5871
|
| credentialName | <code>string</code> | identifying name of the installed package / project |
|
|
5940
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5941
5872
|
|
|
5942
5873
|
<a name="Init._downloadAllBUs"></a>
|
|
5943
5874
|
|
|
5944
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5875
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5945
5876
|
helper for this.initProject()
|
|
5946
5877
|
|
|
5947
5878
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5951,7 +5882,6 @@ helper for this.initProject()
|
|
|
5951
5882
|
| --- | --- | --- |
|
|
5952
5883
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5953
5884
|
| gitStatus | <code>string</code> | signals what state the git repo is in |
|
|
5954
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
5955
5885
|
|
|
5956
5886
|
<a name="Init.upgradeProject"></a>
|
|
5957
5887
|
|
|
@@ -6019,13 +5949,13 @@ CLI helper class
|
|
|
6019
5949
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
6020
5950
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
6021
5951
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
6022
|
-
* [.initGitRepo(
|
|
6023
|
-
* [.gitPush(
|
|
6024
|
-
* [._addGitRemote(
|
|
6025
|
-
* [._updateGitConfigUser(
|
|
5952
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5953
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5954
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5955
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
6026
5956
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
6027
|
-
* [.initProject(properties, credentialName
|
|
6028
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5957
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5958
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
6029
5959
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
6030
5960
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
6031
5961
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -6103,50 +6033,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
6103
6033
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
6104
6034
|
<a name="Init.initGitRepo"></a>
|
|
6105
6035
|
|
|
6106
|
-
### Init.initGitRepo(
|
|
6036
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
6107
6037
|
check if git repo exists and otherwise create one
|
|
6108
6038
|
|
|
6109
6039
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6110
6040
|
**Returns**: <code>Promise.<{status: string, repoName: string}></code> - success flag
|
|
6111
|
-
|
|
6112
|
-
| Param | Type | Description |
|
|
6113
|
-
| --- | --- | --- |
|
|
6114
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6115
|
-
|
|
6116
6041
|
<a name="Init.gitPush"></a>
|
|
6117
6042
|
|
|
6118
|
-
### Init.gitPush(
|
|
6043
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
6119
6044
|
offer to push the new repo straight to the server
|
|
6120
6045
|
|
|
6121
6046
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6122
|
-
|
|
6123
|
-
| Param | Type | Description |
|
|
6124
|
-
| --- | --- | --- |
|
|
6125
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6126
|
-
|
|
6127
6047
|
<a name="Init._addGitRemote"></a>
|
|
6128
6048
|
|
|
6129
|
-
### Init.\_addGitRemote(
|
|
6049
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
6130
6050
|
offers to add the git remote origin
|
|
6131
6051
|
|
|
6132
6052
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6133
6053
|
**Returns**: <code>string</code> - repo name (optionally)
|
|
6134
|
-
|
|
6135
|
-
| Param | Type | Description |
|
|
6136
|
-
| --- | --- | --- |
|
|
6137
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6138
|
-
|
|
6139
6054
|
<a name="Init._updateGitConfigUser"></a>
|
|
6140
6055
|
|
|
6141
|
-
### Init.\_updateGitConfigUser(
|
|
6056
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
6142
6057
|
checks global config and ask to config the user info and then store it locally
|
|
6143
6058
|
|
|
6144
6059
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6145
|
-
|
|
6146
|
-
| Param | Type | Description |
|
|
6147
|
-
| --- | --- | --- |
|
|
6148
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6149
|
-
|
|
6150
6060
|
<a name="Init._getGitConfigUser"></a>
|
|
6151
6061
|
|
|
6152
6062
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -6156,7 +6066,7 @@ retrieves the global user.name and user.email values
|
|
|
6156
6066
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
6157
6067
|
<a name="Init.initProject"></a>
|
|
6158
6068
|
|
|
6159
|
-
### Init.initProject(properties, credentialName
|
|
6069
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
6160
6070
|
Creates template file for properties.json
|
|
6161
6071
|
|
|
6162
6072
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -6166,11 +6076,10 @@ Creates template file for properties.json
|
|
|
6166
6076
|
| --- | --- | --- |
|
|
6167
6077
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
6168
6078
|
| credentialName | <code>string</code> | identifying name of the installed package / project |
|
|
6169
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6170
6079
|
|
|
6171
6080
|
<a name="Init._downloadAllBUs"></a>
|
|
6172
6081
|
|
|
6173
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
6082
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
6174
6083
|
helper for this.initProject()
|
|
6175
6084
|
|
|
6176
6085
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -6180,7 +6089,6 @@ helper for this.initProject()
|
|
|
6180
6089
|
| --- | --- | --- |
|
|
6181
6090
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
6182
6091
|
| gitStatus | <code>string</code> | signals what state the git repo is in |
|
|
6183
|
-
| [skipInteraction] | <code>boolean</code> \| <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
6184
6092
|
|
|
6185
6093
|
<a name="Init.upgradeProject"></a>
|
|
6186
6094
|
|
package/lib/cli.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -50,12 +50,10 @@ class Mcdev {
|
|
|
50
50
|
into deploy directory
|
|
51
51
|
* @param {string} [argv.filter] filter file paths that start with any
|
|
52
52
|
* @param {TYPE.DeltaPkgItem[]} [argv.diffArr] list of files to include in delta package (skips git diff when provided)
|
|
53
|
-
* @param {TYPE.skipInteraction} [argv.skipInteraction] allows to skip interactive wizard
|
|
54
53
|
* @returns {Promise.<TYPE.DeltaPkgItem[]>} list of changed items
|
|
55
54
|
*/
|
|
56
55
|
static async createDeltaPkg(argv) {
|
|
57
56
|
Util.logger.info('Create Delta Package ::');
|
|
58
|
-
Mcdev.setSkipInteraction(argv.skipInteraction);
|
|
59
57
|
const properties = await config.getProperties();
|
|
60
58
|
if (!(await config.checkProperties(properties))) {
|
|
61
59
|
return null;
|
|
@@ -65,12 +63,7 @@ class Mcdev {
|
|
|
65
63
|
? // get source market and source BU from config
|
|
66
64
|
DevOps.getDeltaList(properties, argv.range, true, argv.filter)
|
|
67
65
|
: // If no custom filter was provided, use deployment marketLists & templating
|
|
68
|
-
DevOps.buildDeltaDefinitions(
|
|
69
|
-
properties,
|
|
70
|
-
argv.range,
|
|
71
|
-
argv.diffArr,
|
|
72
|
-
argv.skipInteraction
|
|
73
|
-
);
|
|
66
|
+
DevOps.buildDeltaDefinitions(properties, argv.range, argv.diffArr);
|
|
74
67
|
}
|
|
75
68
|
|
|
76
69
|
/**
|
|
@@ -90,17 +83,15 @@ class Mcdev {
|
|
|
90
83
|
Cli.explainTypes();
|
|
91
84
|
}
|
|
92
85
|
/**
|
|
93
|
-
* @param {boolean | TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
94
86
|
* @returns {Promise.<boolean>} success flag
|
|
95
87
|
*/
|
|
96
|
-
static async upgrade(
|
|
97
|
-
Mcdev.setSkipInteraction(skipInteraction);
|
|
88
|
+
static async upgrade() {
|
|
98
89
|
const properties = await config.getProperties();
|
|
99
90
|
if (!properties) {
|
|
100
91
|
Util.logger.error('No config found. Please run mcdev init');
|
|
101
92
|
return false;
|
|
102
93
|
}
|
|
103
|
-
if ((await InitGit.initGitRepo(
|
|
94
|
+
if ((await InitGit.initGitRepo()).status === 'error') {
|
|
104
95
|
return false;
|
|
105
96
|
}
|
|
106
97
|
|
|
@@ -295,14 +286,12 @@ class Mcdev {
|
|
|
295
286
|
* Creates template file for properties.json
|
|
296
287
|
*
|
|
297
288
|
* @param {string} [credentialsName] identifying name of the installed package / project
|
|
298
|
-
* @param {boolean | TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
299
289
|
* @returns {Promise.<void>} -
|
|
300
290
|
*/
|
|
301
|
-
static async initProject(credentialsName
|
|
291
|
+
static async initProject(credentialsName) {
|
|
302
292
|
Util.logger.info('mcdev:: Setting up project');
|
|
303
|
-
Mcdev.setSkipInteraction(skipInteraction);
|
|
304
293
|
const properties = await config.getProperties(!!credentialsName);
|
|
305
|
-
await Init.initProject(properties, credentialsName
|
|
294
|
+
await Init.initProject(properties, credentialsName);
|
|
306
295
|
}
|
|
307
296
|
|
|
308
297
|
/**
|
package/lib/util/cli.js
CHANGED
|
@@ -18,43 +18,52 @@ const Cli = {
|
|
|
18
18
|
* used when initially setting up a project.
|
|
19
19
|
* loads default config and adds first credential
|
|
20
20
|
*
|
|
21
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
22
21
|
* @returns {Promise.<boolean>} success of init
|
|
23
22
|
*/
|
|
24
|
-
async initMcdevConfig(
|
|
23
|
+
async initMcdevConfig() {
|
|
25
24
|
Util.logger.info('-- Initialising server connection --');
|
|
26
25
|
Util.logger.info('Please enter a name for your "Installed Package" credentials:');
|
|
27
26
|
const propertiesTemplate = await config.getDefaultProperties();
|
|
28
27
|
delete propertiesTemplate.credentials.default;
|
|
29
28
|
|
|
30
29
|
// wait for the interaction to finish or else an outer await will run before this is done
|
|
31
|
-
return this._setCredential(propertiesTemplate, null
|
|
30
|
+
return this._setCredential(propertiesTemplate, null);
|
|
32
31
|
},
|
|
33
32
|
/**
|
|
34
33
|
* Extends template file for properties.json
|
|
35
34
|
*
|
|
36
35
|
* @param {TYPE.Mcdevrc} properties config file's json
|
|
37
|
-
* @
|
|
38
|
-
* @returns {Promise.<void>} -
|
|
36
|
+
* @returns {Promise.<boolean | string>} status
|
|
39
37
|
*/
|
|
40
|
-
async addExtraCredential(properties
|
|
38
|
+
async addExtraCredential(properties) {
|
|
39
|
+
const skipInteraction = Util.skipInteraction;
|
|
41
40
|
if (!(await config.checkProperties(properties))) {
|
|
42
41
|
// return null here to avoid seeing 2 error messages for the same issue
|
|
43
42
|
return null;
|
|
44
43
|
} else {
|
|
45
|
-
|
|
46
|
-
for (const cred in properties.credentials) {
|
|
47
|
-
if (Object.prototype.hasOwnProperty.call(properties.credentials, cred)) {
|
|
48
|
-
Util.logger.info(` - ${cred}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
44
|
+
this.logExistingCredentials(properties);
|
|
51
45
|
Util.logger.info('\nPlease enter your new credentials');
|
|
52
46
|
if (skipInteraction && properties.credentials[skipInteraction.credentialName]) {
|
|
53
47
|
Util.logger.error(
|
|
54
48
|
`Credential '${skipInteraction.credentialName}' already existing. If you tried updating please provide run 'mcdev init ${skipInteraction.credentialName}'`
|
|
55
49
|
);
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return this._setCredential(properties, null);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* helper that logs to cli which credentials are already existing in our config file
|
|
57
|
+
*
|
|
58
|
+
* @param {TYPE.Mcdevrc} properties config file's json
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
logExistingCredentials(properties) {
|
|
62
|
+
Util.logger.info('Found the following credentials in your config file:');
|
|
63
|
+
for (const cred in properties.credentials) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(properties.credentials, cred)) {
|
|
65
|
+
Util.logger.info(` - ${cred}`);
|
|
56
66
|
}
|
|
57
|
-
return this._setCredential(properties, null, skipInteraction);
|
|
58
67
|
}
|
|
59
68
|
},
|
|
60
69
|
/**
|
|
@@ -63,15 +72,15 @@ const Cli = {
|
|
|
63
72
|
*
|
|
64
73
|
* @param {TYPE.Mcdevrc} properties config file's json
|
|
65
74
|
* @param {string} credName name of credential that needs updating
|
|
66
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
67
75
|
* @returns {Promise.<boolean>} success of update
|
|
68
76
|
*/
|
|
69
|
-
async updateCredential(properties, credName
|
|
77
|
+
async updateCredential(properties, credName) {
|
|
78
|
+
const skipInteraction = Util.skipInteraction;
|
|
70
79
|
if (credName) {
|
|
71
80
|
if (!skipInteraction) {
|
|
72
81
|
Util.logger.info(`Please enter the details for '${credName}'`);
|
|
73
82
|
}
|
|
74
|
-
return await this._setCredential(properties, credName
|
|
83
|
+
return await this._setCredential(properties, credName);
|
|
75
84
|
}
|
|
76
85
|
},
|
|
77
86
|
/**
|
|
@@ -226,10 +235,10 @@ const Cli = {
|
|
|
226
235
|
*
|
|
227
236
|
* @param {TYPE.Mcdevrc} properties from config file
|
|
228
237
|
* @param {string} [credName] name of credential that needs updating
|
|
229
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
230
238
|
* @returns {Promise.<boolean | string>} success of refresh or credential name
|
|
231
239
|
*/
|
|
232
|
-
async _setCredential(properties, credName
|
|
240
|
+
async _setCredential(properties, credName) {
|
|
241
|
+
const skipInteraction = Util.skipInteraction;
|
|
233
242
|
// Get user input
|
|
234
243
|
let credentialsGood = null;
|
|
235
244
|
let inputData;
|
|
@@ -246,7 +255,7 @@ const Cli = {
|
|
|
246
255
|
inputData = skipInteraction;
|
|
247
256
|
} else {
|
|
248
257
|
throw new Error(
|
|
249
|
-
'--skipInteraction flag found but
|
|
258
|
+
'--skipInteraction flag found but not defined for all required inputs: client_id,client_secret,auth_url,account_id,credentialName'
|
|
250
259
|
);
|
|
251
260
|
}
|
|
252
261
|
} else {
|
package/lib/util/devops.js
CHANGED
|
@@ -249,10 +249,10 @@ const DevOps = {
|
|
|
249
249
|
* @param {TYPE.Mcdevrc} properties project config file
|
|
250
250
|
* @param {string} range git commit range
|
|
251
251
|
* @param {TYPE.DeltaPkgItem[]} [diffArr] instead of running git diff the method can also get a list of files to process
|
|
252
|
-
* @param {TYPE.SkipInteraction} [skipInteraction] allows to skip interactive wizard
|
|
253
252
|
* @returns {Promise.<TYPE.DeltaPkgItem[]>} -
|
|
254
253
|
*/
|
|
255
|
-
async buildDeltaDefinitions(properties, range, diffArr
|
|
254
|
+
async buildDeltaDefinitions(properties, range, diffArr) {
|
|
255
|
+
const skipInteraction = Util.skipInteraction;
|
|
256
256
|
// check if sourceTargetMapping is valid
|
|
257
257
|
if (
|
|
258
258
|
!properties.options.deployment.sourceTargetMapping ||
|
package/lib/util/init.git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
const TYPE = require('../../types/mcdev.d');
|
|
2
|
+
// const TYPE = require('../../types/mcdev.d');
|
|
3
3
|
const File = require('./file');
|
|
4
4
|
const inquirer = require('inquirer');
|
|
5
5
|
const Util = require('./util');
|
|
@@ -14,10 +14,9 @@ const Init = {
|
|
|
14
14
|
/**
|
|
15
15
|
* check if git repo exists and otherwise create one
|
|
16
16
|
*
|
|
17
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
18
17
|
* @returns {Promise.<{status: string, repoName: string}>} success flag
|
|
19
18
|
*/
|
|
20
|
-
async initGitRepo(
|
|
19
|
+
async initGitRepo() {
|
|
21
20
|
const result = { status: null, repoName: null };
|
|
22
21
|
// check if git is installed (https://www.npmjs.com/package/command-exists)
|
|
23
22
|
if (!commandExists.sync('git')) {
|
|
@@ -65,10 +64,10 @@ const Init = {
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
// offer to update local user.name and user.email
|
|
68
|
-
await this._updateGitConfigUser(
|
|
67
|
+
await this._updateGitConfigUser();
|
|
69
68
|
if (newRepoInitialized) {
|
|
70
69
|
// offer to insert git remote url now
|
|
71
|
-
result.repoName = await this._addGitRemote(
|
|
70
|
+
result.repoName = await this._addGitRemote();
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
Util.logger.info('✔️ Git initialization done.');
|
|
@@ -78,10 +77,10 @@ const Init = {
|
|
|
78
77
|
/**
|
|
79
78
|
* offer to push the new repo straight to the server
|
|
80
79
|
*
|
|
81
|
-
* @param {boolean | TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
82
80
|
* @returns {void}
|
|
83
81
|
*/
|
|
84
|
-
async gitPush(
|
|
82
|
+
async gitPush() {
|
|
83
|
+
const skipInteraction = Util.skipInteraction;
|
|
85
84
|
const gitRemotes = (await git.getRemotes(true)).filter((item) => item.name === 'origin');
|
|
86
85
|
if (gitRemotes.length && gitRemotes[0].refs.push) {
|
|
87
86
|
// check if remote repo is still empty (otherwise to risky to blindly push)
|
|
@@ -111,7 +110,7 @@ const Init = {
|
|
|
111
110
|
},
|
|
112
111
|
]);
|
|
113
112
|
}
|
|
114
|
-
if (skipInteraction || responses.gitPush) {
|
|
113
|
+
if (skipInteraction.gitPush === 'yes' || responses.gitPush) {
|
|
115
114
|
Util.execSync('git', ['push', '-u', 'origin', 'master']);
|
|
116
115
|
}
|
|
117
116
|
} else if (remoteBranchesExist === true) {
|
|
@@ -124,10 +123,10 @@ const Init = {
|
|
|
124
123
|
/**
|
|
125
124
|
* offers to add the git remote origin
|
|
126
125
|
*
|
|
127
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
128
126
|
* @returns {string} repo name (optionally)
|
|
129
127
|
*/
|
|
130
|
-
async _addGitRemote(
|
|
128
|
+
async _addGitRemote() {
|
|
129
|
+
const skipInteraction = Util.skipInteraction;
|
|
131
130
|
// #1 ask if the user wants to do it now
|
|
132
131
|
let responses;
|
|
133
132
|
if (!skipInteraction) {
|
|
@@ -177,10 +176,10 @@ const Init = {
|
|
|
177
176
|
/**
|
|
178
177
|
* checks global config and ask to config the user info and then store it locally
|
|
179
178
|
*
|
|
180
|
-
* @param {boolean | TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
181
179
|
* @returns {void}
|
|
182
180
|
*/
|
|
183
|
-
async _updateGitConfigUser(
|
|
181
|
+
async _updateGitConfigUser() {
|
|
182
|
+
const skipInteraction = Util.skipInteraction;
|
|
184
183
|
const gitUser = (await this._getGitConfigUser()) || {};
|
|
185
184
|
Util.logger.info(
|
|
186
185
|
`Please confirm your Git user name & email. It should be in the format 'FirstName LastName' and 'your.email@accenture.com'. The current (potentially wrong) values are provided as default. If correct, confirm with ENTER, otherwise please update:`
|
package/lib/util/init.js
CHANGED
|
@@ -19,10 +19,10 @@ const Init = {
|
|
|
19
19
|
*
|
|
20
20
|
* @param {TYPE.Mcdevrc} properties config file's json
|
|
21
21
|
* @param {string} credentialName identifying name of the installed package / project
|
|
22
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
23
22
|
* @returns {Promise.<void>} -
|
|
24
23
|
*/
|
|
25
|
-
async initProject(properties, credentialName
|
|
24
|
+
async initProject(properties, credentialName) {
|
|
25
|
+
const skipInteraction = Util.skipInteraction;
|
|
26
26
|
if (!properties) {
|
|
27
27
|
// try to get cached properties because we return null in case of a crucial error
|
|
28
28
|
properties = config.properties;
|
|
@@ -31,29 +31,37 @@ const Init = {
|
|
|
31
31
|
if ((await File.pathExists(Util.configFileName)) && properties) {
|
|
32
32
|
// config exists
|
|
33
33
|
if (credentialName) {
|
|
34
|
-
Util.logger.info(`Updating credential '${credentialName}'`);
|
|
35
34
|
// update-credential mode
|
|
36
35
|
if (!properties.credentials[credentialName]) {
|
|
37
|
-
Util.logger.error(
|
|
36
|
+
Util.logger.error(
|
|
37
|
+
`Could not update credential '${credentialName}' because it was not found in your config. Please check your spelling and try again.`
|
|
38
|
+
);
|
|
39
|
+
Cli.logExistingCredentials(properties);
|
|
40
|
+
if (skipInteraction) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
38
43
|
const response = await Cli._selectBU(properties, null, true);
|
|
39
44
|
credentialName = response.credential;
|
|
40
45
|
}
|
|
46
|
+
Util.logger.info(`Updating existing credential '${credentialName}'`);
|
|
41
47
|
let error;
|
|
42
48
|
do {
|
|
43
49
|
error = false;
|
|
44
50
|
try {
|
|
45
|
-
const success = await Cli.updateCredential(
|
|
46
|
-
properties,
|
|
47
|
-
credentialName,
|
|
48
|
-
skipInteraction
|
|
49
|
-
);
|
|
51
|
+
const success = await Cli.updateCredential(properties, credentialName);
|
|
50
52
|
if (success) {
|
|
51
53
|
Util.logger.info(`✔️ Credential '${credentialName}' updated.`);
|
|
52
54
|
} else {
|
|
53
55
|
error = true;
|
|
54
56
|
}
|
|
55
|
-
} catch {
|
|
56
|
-
|
|
57
|
+
} catch (ex) {
|
|
58
|
+
if (skipInteraction) {
|
|
59
|
+
Util.logger.error(ex.message);
|
|
60
|
+
return;
|
|
61
|
+
} else {
|
|
62
|
+
// retry
|
|
63
|
+
error = true;
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
} while (error && !skipInteraction);
|
|
59
67
|
Util.logger.debug('reloading config');
|
|
@@ -72,11 +80,7 @@ const Init = {
|
|
|
72
80
|
do {
|
|
73
81
|
error = false;
|
|
74
82
|
try {
|
|
75
|
-
const success = await Cli.updateCredential(
|
|
76
|
-
properties,
|
|
77
|
-
badCredName,
|
|
78
|
-
skipInteraction
|
|
79
|
-
);
|
|
83
|
+
const success = await Cli.updateCredential(properties, badCredName);
|
|
80
84
|
if (success) {
|
|
81
85
|
Util.logger.info(`✔️ Credential '${badCredName}' updated.`);
|
|
82
86
|
} else {
|
|
@@ -128,10 +132,10 @@ const Init = {
|
|
|
128
132
|
}
|
|
129
133
|
let credentialName;
|
|
130
134
|
if (skipInteraction || responses.isAddCredential) {
|
|
131
|
-
credentialName = await Cli.addExtraCredential(properties
|
|
135
|
+
credentialName = await Cli.addExtraCredential(properties);
|
|
132
136
|
}
|
|
133
137
|
if (credentialName) {
|
|
134
|
-
await this._downloadAllBUs(`${credentialName}/*`, 'update'
|
|
138
|
+
await this._downloadAllBUs(`${credentialName}/*`, 'update');
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
141
|
} else {
|
|
@@ -139,7 +143,7 @@ const Init = {
|
|
|
139
143
|
// assuming it's the first time this command is run for this project
|
|
140
144
|
|
|
141
145
|
// initialize git repo
|
|
142
|
-
const initGit = await InitGit.initGitRepo(
|
|
146
|
+
const initGit = await InitGit.initGitRepo();
|
|
143
147
|
if (initGit.status === 'error') {
|
|
144
148
|
return;
|
|
145
149
|
}
|
|
@@ -152,7 +156,7 @@ const Init = {
|
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
// ask for credentials and create mcdev config
|
|
155
|
-
status = await Cli.initMcdevConfig(
|
|
159
|
+
status = await Cli.initMcdevConfig();
|
|
156
160
|
if (!status) {
|
|
157
161
|
return;
|
|
158
162
|
}
|
|
@@ -169,7 +173,7 @@ const Init = {
|
|
|
169
173
|
await this._downloadAllBUs('"*"', initGit.status);
|
|
170
174
|
|
|
171
175
|
// backup to server
|
|
172
|
-
await InitGit.gitPush(
|
|
176
|
+
await InitGit.gitPush();
|
|
173
177
|
|
|
174
178
|
// all done
|
|
175
179
|
Util.logger.info('You are now ready to work with Accenture SFMC DevTools!');
|
|
@@ -183,10 +187,10 @@ const Init = {
|
|
|
183
187
|
*
|
|
184
188
|
* @param {string} bu cred/bu or cred/* or *
|
|
185
189
|
* @param {string} gitStatus signals what state the git repo is in
|
|
186
|
-
* @param {boolean | TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
187
190
|
* @returns {Promise.<void>} -
|
|
188
191
|
*/
|
|
189
|
-
async _downloadAllBUs(bu, gitStatus
|
|
192
|
+
async _downloadAllBUs(bu, gitStatus) {
|
|
193
|
+
const skipInteraction = Util.skipInteraction;
|
|
190
194
|
let responses;
|
|
191
195
|
if (!skipInteraction) {
|
|
192
196
|
responses = await inquirer.prompt([
|
|
@@ -198,7 +202,7 @@ const Init = {
|
|
|
198
202
|
},
|
|
199
203
|
]);
|
|
200
204
|
}
|
|
201
|
-
if (skipInteraction || responses.initialRetrieveAll) {
|
|
205
|
+
if (skipInteraction.backupBUs === 'yes' || responses.initialRetrieveAll) {
|
|
202
206
|
Util.execSync('mcdev', ['retrieve', bu]);
|
|
203
207
|
|
|
204
208
|
if (gitStatus === 'init') {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcdev",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"description": "Accenture Salesforce Marketing Cloud DevTools",
|
|
5
|
-
"author": "joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
|
|
5
|
+
"author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"jsdoc-to-markdown": "7.1.1",
|
|
76
76
|
"lint-staged": "13.0.3",
|
|
77
77
|
"mocha": "10.1.0",
|
|
78
|
-
"mock-fs": "5.
|
|
78
|
+
"mock-fs": "5.2.0",
|
|
79
79
|
"npm-check": "6.0.1",
|
|
80
80
|
"npm-run-all": "4.1.5",
|
|
81
81
|
"prettier-eslint": "15.0.1"
|