mcdev 4.1.4 → 4.1.5
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 +1 -0
- package/README.md +6 -6
- package/docs/dist/documentation.md +62 -166
- package/lib/cli.js +1 -1
- package/lib/index.js +5 -16
- package/lib/util/cli.js +10 -11
- package/lib/util/devops.js +2 -2
- package/lib/util/init.git.js +12 -13
- package/lib/util/init.js +13 -21
- package/package.json +2 -2
- 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.5`).
|
|
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.5
|
|
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.5)!
|
|
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.5`). Then, go into your mcdev repo and update the version with the suffix `-dev`, e.g. to `4.1.5-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.5`).
|
|
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,12 @@ CLI helper class
|
|
|
4796
4789
|
**Kind**: global constant
|
|
4797
4790
|
|
|
4798
4791
|
* [Cli](#Cli)
|
|
4799
|
-
* [.initMcdevConfig(
|
|
4800
|
-
* [.addExtraCredential(properties
|
|
4801
|
-
* [.updateCredential(properties, credName
|
|
4792
|
+
* [.initMcdevConfig()](#Cli.initMcdevConfig) ⇒ <code>Promise.<boolean></code>
|
|
4793
|
+
* [.addExtraCredential(properties)](#Cli.addExtraCredential) ⇒ <code>Promise.<void></code>
|
|
4794
|
+
* [.updateCredential(properties, credName)](#Cli.updateCredential) ⇒ <code>Promise.<boolean></code>
|
|
4802
4795
|
* [.getCredentialObject(properties, target, [isCredentialOnly], [allowAll])](#Cli.getCredentialObject) ⇒ <code>Promise.<TYPE.BuObject></code>
|
|
4803
4796
|
* [._selectBU(properties, [credential], [isCredentialOnly], [allowAll])](#Cli._selectBU) ⇒ <code>Promise.<Array></code>
|
|
4804
|
-
* [._setCredential(properties, [credName]
|
|
4797
|
+
* [._setCredential(properties, [credName])](#Cli._setCredential) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4805
4798
|
* [._askCredentials(properties, [credName])](#Cli._askCredentials) ⇒ <code>Promise.<object></code>
|
|
4806
4799
|
* [.selectTypes(properties, [setTypesArr])](#Cli.selectTypes) ⇒ <code>Promise.<void></code>
|
|
4807
4800
|
* [._summarizeSubtypes(responses, type)](#Cli._summarizeSubtypes) ⇒ <code>void</code>
|
|
@@ -4809,20 +4802,15 @@ CLI helper class
|
|
|
4809
4802
|
|
|
4810
4803
|
<a name="Cli.initMcdevConfig"></a>
|
|
4811
4804
|
|
|
4812
|
-
### Cli.initMcdevConfig(
|
|
4805
|
+
### Cli.initMcdevConfig() ⇒ <code>Promise.<boolean></code>
|
|
4813
4806
|
used when initially setting up a project.
|
|
4814
4807
|
loads default config and adds first credential
|
|
4815
4808
|
|
|
4816
4809
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
4817
4810
|
**Returns**: <code>Promise.<boolean></code> - success of init
|
|
4818
|
-
|
|
4819
|
-
| Param | Type | Description |
|
|
4820
|
-
| --- | --- | --- |
|
|
4821
|
-
| [skipInteraction] | <code>TYPE.skipInteraction</code> | signals what to insert automatically for things usually asked via wizard |
|
|
4822
|
-
|
|
4823
4811
|
<a name="Cli.addExtraCredential"></a>
|
|
4824
4812
|
|
|
4825
|
-
### Cli.addExtraCredential(properties
|
|
4813
|
+
### Cli.addExtraCredential(properties) ⇒ <code>Promise.<void></code>
|
|
4826
4814
|
Extends template file for properties.json
|
|
4827
4815
|
|
|
4828
4816
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
@@ -4831,11 +4819,10 @@ Extends template file for properties.json
|
|
|
4831
4819
|
| Param | Type | Description |
|
|
4832
4820
|
| --- | --- | --- |
|
|
4833
4821
|
| 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
4822
|
|
|
4836
4823
|
<a name="Cli.updateCredential"></a>
|
|
4837
4824
|
|
|
4838
|
-
### Cli.updateCredential(properties, credName
|
|
4825
|
+
### Cli.updateCredential(properties, credName) ⇒ <code>Promise.<boolean></code>
|
|
4839
4826
|
Extends template file for properties.json
|
|
4840
4827
|
update credentials
|
|
4841
4828
|
|
|
@@ -4846,7 +4833,6 @@ update credentials
|
|
|
4846
4833
|
| --- | --- | --- |
|
|
4847
4834
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
4848
4835
|
| 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
4836
|
|
|
4851
4837
|
<a name="Cli.getCredentialObject"></a>
|
|
4852
4838
|
|
|
@@ -4880,7 +4866,7 @@ helps select the right credential in case of bad initial input
|
|
|
4880
4866
|
|
|
4881
4867
|
<a name="Cli._setCredential"></a>
|
|
4882
4868
|
|
|
4883
|
-
### Cli.\_setCredential(properties, [credName]
|
|
4869
|
+
### Cli.\_setCredential(properties, [credName]) ⇒ <code>Promise.<(boolean\|string)></code>
|
|
4884
4870
|
helper around _askCredentials
|
|
4885
4871
|
|
|
4886
4872
|
**Kind**: static method of [<code>Cli</code>](#Cli)
|
|
@@ -4890,7 +4876,6 @@ helper around _askCredentials
|
|
|
4890
4876
|
| --- | --- | --- |
|
|
4891
4877
|
| properties | <code>TYPE.Mcdevrc</code> | from config file |
|
|
4892
4878
|
| [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
4879
|
|
|
4895
4880
|
<a name="Cli._askCredentials"></a>
|
|
4896
4881
|
|
|
@@ -4994,7 +4979,7 @@ DevOps helper class
|
|
|
4994
4979
|
* [.getDeltaList(properties, [range], [saveToDeployDir], [filterPaths])](#DevOps.getDeltaList) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
4995
4980
|
* [~delta](#DevOps.getDeltaList..delta) : <code>Array.<TYPE.DeltaPkgItem></code>
|
|
4996
4981
|
* [~copied](#DevOps.getDeltaList..copied) : <code>TYPE.DeltaPkgItem</code>
|
|
4997
|
-
* [.buildDeltaDefinitions(properties, range, [diffArr]
|
|
4982
|
+
* [.buildDeltaDefinitions(properties, range, [diffArr])](#DevOps.buildDeltaDefinitions) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
4998
4983
|
* [~deltaDeployAll](#DevOps.buildDeltaDefinitions..deltaDeployAll) : <code>Array.<TYPE.DeltaPkgItem></code>
|
|
4999
4984
|
* [.document(directory, jsonReport)](#DevOps.document) ⇒ <code>void</code>
|
|
5000
4985
|
* [.getFilesToCommit(properties, buObject, metadataType, keyArr)](#DevOps.getFilesToCommit) ⇒ <code>Promise.<Array.<string>></code>
|
|
@@ -5030,7 +5015,7 @@ Interactive commit selection if no commits are passed.
|
|
|
5030
5015
|
**Kind**: inner constant of [<code>getDeltaList</code>](#DevOps.getDeltaList)
|
|
5031
5016
|
<a name="DevOps.buildDeltaDefinitions"></a>
|
|
5032
5017
|
|
|
5033
|
-
### DevOps.buildDeltaDefinitions(properties, range, [diffArr]
|
|
5018
|
+
### DevOps.buildDeltaDefinitions(properties, range, [diffArr]) ⇒ <code>Promise.<Array.<TYPE.DeltaPkgItem>></code>
|
|
5034
5019
|
wrapper around DevOps.getDeltaList, Builder.buildTemplate and M
|
|
5035
5020
|
|
|
5036
5021
|
**Kind**: static method of [<code>DevOps</code>](#DevOps)
|
|
@@ -5041,7 +5026,6 @@ wrapper around DevOps.getDeltaList, Builder.buildTemplate and M
|
|
|
5041
5026
|
| properties | <code>TYPE.Mcdevrc</code> | project config file |
|
|
5042
5027
|
| range | <code>string</code> | git commit range |
|
|
5043
5028
|
| [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
5029
|
|
|
5046
5030
|
<a name="DevOps.buildDeltaDefinitions..deltaDeployAll"></a>
|
|
5047
5031
|
|
|
@@ -5332,13 +5316,13 @@ CLI helper class
|
|
|
5332
5316
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5333
5317
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5334
5318
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5335
|
-
* [.initGitRepo(
|
|
5336
|
-
* [.gitPush(
|
|
5337
|
-
* [._addGitRemote(
|
|
5338
|
-
* [._updateGitConfigUser(
|
|
5319
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5320
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5321
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5322
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5339
5323
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5340
|
-
* [.initProject(properties, credentialName
|
|
5341
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5324
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5325
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5342
5326
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5343
5327
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5344
5328
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5416,50 +5400,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5416
5400
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5417
5401
|
<a name="Init.initGitRepo"></a>
|
|
5418
5402
|
|
|
5419
|
-
### Init.initGitRepo(
|
|
5403
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5420
5404
|
check if git repo exists and otherwise create one
|
|
5421
5405
|
|
|
5422
5406
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5423
5407
|
**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
5408
|
<a name="Init.gitPush"></a>
|
|
5430
5409
|
|
|
5431
|
-
### Init.gitPush(
|
|
5410
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5432
5411
|
offer to push the new repo straight to the server
|
|
5433
5412
|
|
|
5434
5413
|
**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
5414
|
<a name="Init._addGitRemote"></a>
|
|
5441
5415
|
|
|
5442
|
-
### Init.\_addGitRemote(
|
|
5416
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5443
5417
|
offers to add the git remote origin
|
|
5444
5418
|
|
|
5445
5419
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5446
5420
|
**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
5421
|
<a name="Init._updateGitConfigUser"></a>
|
|
5453
5422
|
|
|
5454
|
-
### Init.\_updateGitConfigUser(
|
|
5423
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5455
5424
|
checks global config and ask to config the user info and then store it locally
|
|
5456
5425
|
|
|
5457
5426
|
**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
5427
|
<a name="Init._getGitConfigUser"></a>
|
|
5464
5428
|
|
|
5465
5429
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5469,7 +5433,7 @@ retrieves the global user.name and user.email values
|
|
|
5469
5433
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5470
5434
|
<a name="Init.initProject"></a>
|
|
5471
5435
|
|
|
5472
|
-
### Init.initProject(properties, credentialName
|
|
5436
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5473
5437
|
Creates template file for properties.json
|
|
5474
5438
|
|
|
5475
5439
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5479,11 +5443,10 @@ Creates template file for properties.json
|
|
|
5479
5443
|
| --- | --- | --- |
|
|
5480
5444
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5481
5445
|
| 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
5446
|
|
|
5484
5447
|
<a name="Init._downloadAllBUs"></a>
|
|
5485
5448
|
|
|
5486
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5449
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5487
5450
|
helper for this.initProject()
|
|
5488
5451
|
|
|
5489
5452
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5493,7 +5456,6 @@ helper for this.initProject()
|
|
|
5493
5456
|
| --- | --- | --- |
|
|
5494
5457
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5495
5458
|
| 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
5459
|
|
|
5498
5460
|
<a name="Init.upgradeProject"></a>
|
|
5499
5461
|
|
|
@@ -5561,13 +5523,13 @@ CLI helper class
|
|
|
5561
5523
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5562
5524
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5563
5525
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5564
|
-
* [.initGitRepo(
|
|
5565
|
-
* [.gitPush(
|
|
5566
|
-
* [._addGitRemote(
|
|
5567
|
-
* [._updateGitConfigUser(
|
|
5526
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5527
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5528
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5529
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5568
5530
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5569
|
-
* [.initProject(properties, credentialName
|
|
5570
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5531
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5532
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5571
5533
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5572
5534
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5573
5535
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5645,50 +5607,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5645
5607
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5646
5608
|
<a name="Init.initGitRepo"></a>
|
|
5647
5609
|
|
|
5648
|
-
### Init.initGitRepo(
|
|
5610
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5649
5611
|
check if git repo exists and otherwise create one
|
|
5650
5612
|
|
|
5651
5613
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5652
5614
|
**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
5615
|
<a name="Init.gitPush"></a>
|
|
5659
5616
|
|
|
5660
|
-
### Init.gitPush(
|
|
5617
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5661
5618
|
offer to push the new repo straight to the server
|
|
5662
5619
|
|
|
5663
5620
|
**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
5621
|
<a name="Init._addGitRemote"></a>
|
|
5670
5622
|
|
|
5671
|
-
### Init.\_addGitRemote(
|
|
5623
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5672
5624
|
offers to add the git remote origin
|
|
5673
5625
|
|
|
5674
5626
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5675
5627
|
**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
5628
|
<a name="Init._updateGitConfigUser"></a>
|
|
5682
5629
|
|
|
5683
|
-
### Init.\_updateGitConfigUser(
|
|
5630
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5684
5631
|
checks global config and ask to config the user info and then store it locally
|
|
5685
5632
|
|
|
5686
5633
|
**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
5634
|
<a name="Init._getGitConfigUser"></a>
|
|
5693
5635
|
|
|
5694
5636
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5698,7 +5640,7 @@ retrieves the global user.name and user.email values
|
|
|
5698
5640
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5699
5641
|
<a name="Init.initProject"></a>
|
|
5700
5642
|
|
|
5701
|
-
### Init.initProject(properties, credentialName
|
|
5643
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5702
5644
|
Creates template file for properties.json
|
|
5703
5645
|
|
|
5704
5646
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5708,11 +5650,10 @@ Creates template file for properties.json
|
|
|
5708
5650
|
| --- | --- | --- |
|
|
5709
5651
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5710
5652
|
| 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
5653
|
|
|
5713
5654
|
<a name="Init._downloadAllBUs"></a>
|
|
5714
5655
|
|
|
5715
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5656
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5716
5657
|
helper for this.initProject()
|
|
5717
5658
|
|
|
5718
5659
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5722,7 +5663,6 @@ helper for this.initProject()
|
|
|
5722
5663
|
| --- | --- | --- |
|
|
5723
5664
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5724
5665
|
| 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
5666
|
|
|
5727
5667
|
<a name="Init.upgradeProject"></a>
|
|
5728
5668
|
|
|
@@ -5790,13 +5730,13 @@ CLI helper class
|
|
|
5790
5730
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
5791
5731
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
5792
5732
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
5793
|
-
* [.initGitRepo(
|
|
5794
|
-
* [.gitPush(
|
|
5795
|
-
* [._addGitRemote(
|
|
5796
|
-
* [._updateGitConfigUser(
|
|
5733
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5734
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5735
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5736
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
5797
5737
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
5798
|
-
* [.initProject(properties, credentialName
|
|
5799
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5738
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5739
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
5800
5740
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
5801
5741
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
5802
5742
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -5874,50 +5814,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
5874
5814
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
5875
5815
|
<a name="Init.initGitRepo"></a>
|
|
5876
5816
|
|
|
5877
|
-
### Init.initGitRepo(
|
|
5817
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5878
5818
|
check if git repo exists and otherwise create one
|
|
5879
5819
|
|
|
5880
5820
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5881
5821
|
**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
5822
|
<a name="Init.gitPush"></a>
|
|
5888
5823
|
|
|
5889
|
-
### Init.gitPush(
|
|
5824
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
5890
5825
|
offer to push the new repo straight to the server
|
|
5891
5826
|
|
|
5892
5827
|
**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
5828
|
<a name="Init._addGitRemote"></a>
|
|
5899
5829
|
|
|
5900
|
-
### Init.\_addGitRemote(
|
|
5830
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
5901
5831
|
offers to add the git remote origin
|
|
5902
5832
|
|
|
5903
5833
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
5904
5834
|
**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
5835
|
<a name="Init._updateGitConfigUser"></a>
|
|
5911
5836
|
|
|
5912
|
-
### Init.\_updateGitConfigUser(
|
|
5837
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
5913
5838
|
checks global config and ask to config the user info and then store it locally
|
|
5914
5839
|
|
|
5915
5840
|
**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
5841
|
<a name="Init._getGitConfigUser"></a>
|
|
5922
5842
|
|
|
5923
5843
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -5927,7 +5847,7 @@ retrieves the global user.name and user.email values
|
|
|
5927
5847
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
5928
5848
|
<a name="Init.initProject"></a>
|
|
5929
5849
|
|
|
5930
|
-
### Init.initProject(properties, credentialName
|
|
5850
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
5931
5851
|
Creates template file for properties.json
|
|
5932
5852
|
|
|
5933
5853
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5937,11 +5857,10 @@ Creates template file for properties.json
|
|
|
5937
5857
|
| --- | --- | --- |
|
|
5938
5858
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
5939
5859
|
| 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
5860
|
|
|
5942
5861
|
<a name="Init._downloadAllBUs"></a>
|
|
5943
5862
|
|
|
5944
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
5863
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
5945
5864
|
helper for this.initProject()
|
|
5946
5865
|
|
|
5947
5866
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -5951,7 +5870,6 @@ helper for this.initProject()
|
|
|
5951
5870
|
| --- | --- | --- |
|
|
5952
5871
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
5953
5872
|
| 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
5873
|
|
|
5956
5874
|
<a name="Init.upgradeProject"></a>
|
|
5957
5875
|
|
|
@@ -6019,13 +5937,13 @@ CLI helper class
|
|
|
6019
5937
|
* [._getForcedUpdateList(projectVersion)](#Init._getForcedUpdateList) ⇒ <code>Promise.<Array.<string>></code>
|
|
6020
5938
|
* [._createIdeConfigFile(fileNameArr, relevantForcedUpdates, [boilerplateFileContent])](#Init._createIdeConfigFile) ⇒ <code>Promise.<boolean></code>
|
|
6021
5939
|
* [.upgradeAuthFile()](#Init.upgradeAuthFile) ⇒ <code>Promise.<boolean></code>
|
|
6022
|
-
* [.initGitRepo(
|
|
6023
|
-
* [.gitPush(
|
|
6024
|
-
* [._addGitRemote(
|
|
6025
|
-
* [._updateGitConfigUser(
|
|
5940
|
+
* [.initGitRepo()](#Init.initGitRepo) ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
5941
|
+
* [.gitPush()](#Init.gitPush) ⇒ <code>void</code>
|
|
5942
|
+
* [._addGitRemote()](#Init._addGitRemote) ⇒ <code>string</code>
|
|
5943
|
+
* [._updateGitConfigUser()](#Init._updateGitConfigUser) ⇒ <code>void</code>
|
|
6026
5944
|
* [._getGitConfigUser()](#Init._getGitConfigUser) ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
6027
|
-
* [.initProject(properties, credentialName
|
|
6028
|
-
* [._downloadAllBUs(bu, gitStatus
|
|
5945
|
+
* [.initProject(properties, credentialName)](#Init.initProject) ⇒ <code>Promise.<void></code>
|
|
5946
|
+
* [._downloadAllBUs(bu, gitStatus)](#Init._downloadAllBUs) ⇒ <code>Promise.<void></code>
|
|
6029
5947
|
* [.upgradeProject(properties, [initial], [repoName])](#Init.upgradeProject) ⇒ <code>Promise.<boolean></code>
|
|
6030
5948
|
* [._getMissingCredentials(properties)](#Init._getMissingCredentials) ⇒ <code>Array.<string></code>
|
|
6031
5949
|
* [.installDependencies([repoName])](#Init.installDependencies) ⇒ <code>Promise.<boolean></code>
|
|
@@ -6103,50 +6021,30 @@ helper method for this.upgradeProject that upgrades project config if needed
|
|
|
6103
6021
|
**Returns**: <code>Promise.<boolean></code> - returns true if worked without errors
|
|
6104
6022
|
<a name="Init.initGitRepo"></a>
|
|
6105
6023
|
|
|
6106
|
-
### Init.initGitRepo(
|
|
6024
|
+
### Init.initGitRepo() ⇒ <code>Promise.<{status: string, repoName: string}></code>
|
|
6107
6025
|
check if git repo exists and otherwise create one
|
|
6108
6026
|
|
|
6109
6027
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6110
6028
|
**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
6029
|
<a name="Init.gitPush"></a>
|
|
6117
6030
|
|
|
6118
|
-
### Init.gitPush(
|
|
6031
|
+
### Init.gitPush() ⇒ <code>void</code>
|
|
6119
6032
|
offer to push the new repo straight to the server
|
|
6120
6033
|
|
|
6121
6034
|
**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
6035
|
<a name="Init._addGitRemote"></a>
|
|
6128
6036
|
|
|
6129
|
-
### Init.\_addGitRemote(
|
|
6037
|
+
### Init.\_addGitRemote() ⇒ <code>string</code>
|
|
6130
6038
|
offers to add the git remote origin
|
|
6131
6039
|
|
|
6132
6040
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
6133
6041
|
**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
6042
|
<a name="Init._updateGitConfigUser"></a>
|
|
6140
6043
|
|
|
6141
|
-
### Init.\_updateGitConfigUser(
|
|
6044
|
+
### Init.\_updateGitConfigUser() ⇒ <code>void</code>
|
|
6142
6045
|
checks global config and ask to config the user info and then store it locally
|
|
6143
6046
|
|
|
6144
6047
|
**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
6048
|
<a name="Init._getGitConfigUser"></a>
|
|
6151
6049
|
|
|
6152
6050
|
### Init.\_getGitConfigUser() ⇒ <code>Promise.<{'user.name': string, 'user.email': string}></code>
|
|
@@ -6156,7 +6054,7 @@ retrieves the global user.name and user.email values
|
|
|
6156
6054
|
**Returns**: <code>Promise.<{'user.name': string, 'user.email': string}></code> - user.name and user.email
|
|
6157
6055
|
<a name="Init.initProject"></a>
|
|
6158
6056
|
|
|
6159
|
-
### Init.initProject(properties, credentialName
|
|
6057
|
+
### Init.initProject(properties, credentialName) ⇒ <code>Promise.<void></code>
|
|
6160
6058
|
Creates template file for properties.json
|
|
6161
6059
|
|
|
6162
6060
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -6166,11 +6064,10 @@ Creates template file for properties.json
|
|
|
6166
6064
|
| --- | --- | --- |
|
|
6167
6065
|
| properties | <code>TYPE.Mcdevrc</code> | config file's json |
|
|
6168
6066
|
| 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
6067
|
|
|
6171
6068
|
<a name="Init._downloadAllBUs"></a>
|
|
6172
6069
|
|
|
6173
|
-
### Init.\_downloadAllBUs(bu, gitStatus
|
|
6070
|
+
### Init.\_downloadAllBUs(bu, gitStatus) ⇒ <code>Promise.<void></code>
|
|
6174
6071
|
helper for this.initProject()
|
|
6175
6072
|
|
|
6176
6073
|
**Kind**: static method of [<code>Init</code>](#Init)
|
|
@@ -6180,7 +6077,6 @@ helper for this.initProject()
|
|
|
6180
6077
|
| --- | --- | --- |
|
|
6181
6078
|
| bu | <code>string</code> | cred/bu or cred/* or * |
|
|
6182
6079
|
| 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
6080
|
|
|
6185
6081
|
<a name="Init.upgradeProject"></a>
|
|
6186
6082
|
|
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,26 +18,25 @@ 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
|
-
* @param {TYPE.skipInteraction} [skipInteraction] signals what to insert automatically for things usually asked via wizard
|
|
38
36
|
* @returns {Promise.<void>} -
|
|
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;
|
|
@@ -54,7 +53,7 @@ const Cli = {
|
|
|
54
53
|
`Credential '${skipInteraction.credentialName}' already existing. If you tried updating please provide run 'mcdev init ${skipInteraction.credentialName}'`
|
|
55
54
|
);
|
|
56
55
|
}
|
|
57
|
-
return this._setCredential(properties, null
|
|
56
|
+
return this._setCredential(properties, null);
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
/**
|
|
@@ -63,15 +62,15 @@ const Cli = {
|
|
|
63
62
|
*
|
|
64
63
|
* @param {TYPE.Mcdevrc} properties config file's json
|
|
65
64
|
* @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
65
|
* @returns {Promise.<boolean>} success of update
|
|
68
66
|
*/
|
|
69
|
-
async updateCredential(properties, credName
|
|
67
|
+
async updateCredential(properties, credName) {
|
|
68
|
+
const skipInteraction = Util.skipInteraction;
|
|
70
69
|
if (credName) {
|
|
71
70
|
if (!skipInteraction) {
|
|
72
71
|
Util.logger.info(`Please enter the details for '${credName}'`);
|
|
73
72
|
}
|
|
74
|
-
return await this._setCredential(properties, credName
|
|
73
|
+
return await this._setCredential(properties, credName);
|
|
75
74
|
}
|
|
76
75
|
},
|
|
77
76
|
/**
|
|
@@ -226,10 +225,10 @@ const Cli = {
|
|
|
226
225
|
*
|
|
227
226
|
* @param {TYPE.Mcdevrc} properties from config file
|
|
228
227
|
* @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
228
|
* @returns {Promise.<boolean | string>} success of refresh or credential name
|
|
231
229
|
*/
|
|
232
|
-
async _setCredential(properties, credName
|
|
230
|
+
async _setCredential(properties, credName) {
|
|
231
|
+
const skipInteraction = Util.skipInteraction;
|
|
233
232
|
// Get user input
|
|
234
233
|
let credentialsGood = null;
|
|
235
234
|
let inputData;
|
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)
|
|
@@ -101,7 +100,7 @@ const Init = {
|
|
|
101
100
|
`Your remote Git repository is still empty and ready to store your initial backup. Hint: This is the server version of the repo which you share with your team.`
|
|
102
101
|
);
|
|
103
102
|
let responses;
|
|
104
|
-
if (!skipInteraction) {
|
|
103
|
+
if (!skipInteraction || !skipInteraction.gitPush !== 'yes') {
|
|
105
104
|
responses = await inquirer.prompt([
|
|
106
105
|
{
|
|
107
106
|
type: 'confirm',
|
|
@@ -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;
|
|
@@ -42,11 +42,7 @@ const Init = {
|
|
|
42
42
|
do {
|
|
43
43
|
error = false;
|
|
44
44
|
try {
|
|
45
|
-
const success = await Cli.updateCredential(
|
|
46
|
-
properties,
|
|
47
|
-
credentialName,
|
|
48
|
-
skipInteraction
|
|
49
|
-
);
|
|
45
|
+
const success = await Cli.updateCredential(properties, credentialName);
|
|
50
46
|
if (success) {
|
|
51
47
|
Util.logger.info(`✔️ Credential '${credentialName}' updated.`);
|
|
52
48
|
} else {
|
|
@@ -72,11 +68,7 @@ const Init = {
|
|
|
72
68
|
do {
|
|
73
69
|
error = false;
|
|
74
70
|
try {
|
|
75
|
-
const success = await Cli.updateCredential(
|
|
76
|
-
properties,
|
|
77
|
-
badCredName,
|
|
78
|
-
skipInteraction
|
|
79
|
-
);
|
|
71
|
+
const success = await Cli.updateCredential(properties, badCredName);
|
|
80
72
|
if (success) {
|
|
81
73
|
Util.logger.info(`✔️ Credential '${badCredName}' updated.`);
|
|
82
74
|
} else {
|
|
@@ -128,10 +120,10 @@ const Init = {
|
|
|
128
120
|
}
|
|
129
121
|
let credentialName;
|
|
130
122
|
if (skipInteraction || responses.isAddCredential) {
|
|
131
|
-
credentialName = await Cli.addExtraCredential(properties
|
|
123
|
+
credentialName = await Cli.addExtraCredential(properties);
|
|
132
124
|
}
|
|
133
125
|
if (credentialName) {
|
|
134
|
-
await this._downloadAllBUs(`${credentialName}/*`, 'update'
|
|
126
|
+
await this._downloadAllBUs(`${credentialName}/*`, 'update');
|
|
135
127
|
}
|
|
136
128
|
}
|
|
137
129
|
} else {
|
|
@@ -139,7 +131,7 @@ const Init = {
|
|
|
139
131
|
// assuming it's the first time this command is run for this project
|
|
140
132
|
|
|
141
133
|
// initialize git repo
|
|
142
|
-
const initGit = await InitGit.initGitRepo(
|
|
134
|
+
const initGit = await InitGit.initGitRepo();
|
|
143
135
|
if (initGit.status === 'error') {
|
|
144
136
|
return;
|
|
145
137
|
}
|
|
@@ -152,7 +144,7 @@ const Init = {
|
|
|
152
144
|
}
|
|
153
145
|
|
|
154
146
|
// ask for credentials and create mcdev config
|
|
155
|
-
status = await Cli.initMcdevConfig(
|
|
147
|
+
status = await Cli.initMcdevConfig();
|
|
156
148
|
if (!status) {
|
|
157
149
|
return;
|
|
158
150
|
}
|
|
@@ -169,7 +161,7 @@ const Init = {
|
|
|
169
161
|
await this._downloadAllBUs('"*"', initGit.status);
|
|
170
162
|
|
|
171
163
|
// backup to server
|
|
172
|
-
await InitGit.gitPush(
|
|
164
|
+
await InitGit.gitPush();
|
|
173
165
|
|
|
174
166
|
// all done
|
|
175
167
|
Util.logger.info('You are now ready to work with Accenture SFMC DevTools!');
|
|
@@ -183,12 +175,12 @@ const Init = {
|
|
|
183
175
|
*
|
|
184
176
|
* @param {string} bu cred/bu or cred/* or *
|
|
185
177
|
* @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
178
|
* @returns {Promise.<void>} -
|
|
188
179
|
*/
|
|
189
|
-
async _downloadAllBUs(bu, gitStatus
|
|
180
|
+
async _downloadAllBUs(bu, gitStatus) {
|
|
181
|
+
const skipInteraction = Util.skipInteraction;
|
|
190
182
|
let responses;
|
|
191
|
-
if (!skipInteraction) {
|
|
183
|
+
if (!skipInteraction || skipInteraction.backupBUs !== 'yes') {
|
|
192
184
|
responses = await inquirer.prompt([
|
|
193
185
|
{
|
|
194
186
|
type: 'confirm',
|
|
@@ -198,7 +190,7 @@ const Init = {
|
|
|
198
190
|
},
|
|
199
191
|
]);
|
|
200
192
|
}
|
|
201
|
-
if (skipInteraction || responses.initialRetrieveAll) {
|
|
193
|
+
if (skipInteraction.backupBUs === 'yes' || responses.initialRetrieveAll) {
|
|
202
194
|
Util.execSync('mcdev', ['retrieve', bu]);
|
|
203
195
|
|
|
204
196
|
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.5",
|
|
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",
|