mcdev 3.0.1 → 3.1.1

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.
Files changed (42) hide show
  1. package/.eslintrc.json +1 -1
  2. package/.github/ISSUE_TEMPLATE/bug.yml +72 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. package/.github/ISSUE_TEMPLATE/task.md +10 -0
  5. package/.github/PULL_REQUEST_TEMPLATE.md +11 -0
  6. package/.issuetracker +11 -3
  7. package/.vscode/settings.json +3 -3
  8. package/CHANGELOG.md +103 -1
  9. package/README.md +245 -141
  10. package/boilerplate/config.json +3 -2
  11. package/docs/dist/documentation.md +803 -337
  12. package/lib/Deployer.js +4 -1
  13. package/lib/MetadataTypeDefinitions.js +1 -0
  14. package/lib/MetadataTypeInfo.js +1 -0
  15. package/lib/Retriever.js +32 -17
  16. package/lib/cli.js +295 -0
  17. package/lib/index.js +774 -1019
  18. package/lib/metadataTypes/AccountUser.js +389 -0
  19. package/lib/metadataTypes/Asset.js +20 -12
  20. package/lib/metadataTypes/Automation.js +115 -52
  21. package/lib/metadataTypes/DataExtension.js +159 -113
  22. package/lib/metadataTypes/DataExtensionField.js +134 -4
  23. package/lib/metadataTypes/Folder.js +66 -69
  24. package/lib/metadataTypes/ImportFile.js +4 -6
  25. package/lib/metadataTypes/MetadataType.js +136 -67
  26. package/lib/metadataTypes/Query.js +2 -3
  27. package/lib/metadataTypes/Role.js +13 -8
  28. package/lib/metadataTypes/definitions/AccountUser.definition.js +227 -0
  29. package/lib/metadataTypes/definitions/Asset.definition.js +1 -0
  30. package/lib/metadataTypes/definitions/Campaign.definition.js +1 -1
  31. package/lib/metadataTypes/definitions/DataExtension.definition.js +1 -1
  32. package/lib/metadataTypes/definitions/DataExtensionField.definition.js +1 -1
  33. package/lib/metadataTypes/definitions/Folder.definition.js +1 -1
  34. package/lib/metadataTypes/definitions/ImportFile.definition.js +2 -1
  35. package/lib/metadataTypes/definitions/Script.definition.js +5 -5
  36. package/lib/retrieveChangelog.js +96 -0
  37. package/lib/util/cli.js +4 -6
  38. package/lib/util/init.git.js +2 -1
  39. package/lib/util/util.js +31 -15
  40. package/package.json +19 -23
  41. package/img/README.md/troubleshoot-nodejs-postinstall.jpg +0 -0
  42. package/postinstall.js +0 -41
package/.eslintrc.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "SharedArrayBuffer": "readonly"
12
12
  },
13
13
  "parserOptions": {
14
- "ecmaVersion": 2018,
14
+ "ecmaVersion": 2020,
15
15
  "sourceType": "module"
16
16
  },
17
17
  "rules": {
@@ -0,0 +1,72 @@
1
+ name: 🐞 Bug
2
+ description: File a bug/issue
3
+ title: "[BUG] <title>"
4
+ labels: [bug, NEW]
5
+ body:
6
+ - type: checkboxes
7
+ attributes:
8
+ label: Is there an existing issue for this?
9
+ description: Please [search here](https://github.com/Accenture/sfmc-devtools/issues) to see if an issue already exists for your problem.
10
+ options:
11
+ - label: I have searched the existing issues
12
+ required: true
13
+ - type: textarea
14
+ attributes:
15
+ label: Current Behavior
16
+ description: A clear & concise description of what you're experiencing.
17
+ validations:
18
+ required: false
19
+ - type: textarea
20
+ attributes:
21
+ label: Expected Behavior
22
+ description: A clear & concise description of what you expected to happen.
23
+ validations:
24
+ required: false
25
+ - type: textarea
26
+ attributes:
27
+ label: Steps To Reproduce
28
+ description: Steps to reproduce the behavior.
29
+ value: |
30
+ 1. Go to '...'
31
+ 2. Click on '....'
32
+ 3. Run '...'
33
+ 4. See error...
34
+ validations:
35
+ required: false
36
+ - type: dropdown
37
+ id: version
38
+ attributes:
39
+ label: Version
40
+ description: What version of our software are you running? (mcdev --version)
41
+ options:
42
+ - 3.1.0 (Default)
43
+ - 3.0.3
44
+ - 3.0.2
45
+ - 3.0.1
46
+ - develop-branch
47
+ validations:
48
+ required: true
49
+ - type: textarea
50
+ attributes:
51
+ label: Environment
52
+ description: |
53
+ examples:
54
+ - **Operating system (Windows/Mac/Linux/...)**: Windows 10
55
+ - **Node (node --version)**: 13.14.0
56
+ - **npm (npm --version)**: 7.6.3
57
+ value: |
58
+ - OS:
59
+ - Node:
60
+ - npm:
61
+ validations:
62
+ required: false
63
+ - type: checkboxes
64
+ attributes:
65
+ label: Participation
66
+ options:
67
+ - label: I am willing to submit a pull request for this issue.
68
+ required: false
69
+ - type: textarea
70
+ attributes:
71
+ label: Additional comments
72
+ description: Is there anything else that's important for the team to know?
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE] "
5
+ labels: NEW, enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: Task
3
+ about: Technical improvements without functional impact / changes to the Documentation
4
+ title: "[TASK] "
5
+ labels: NEW, chores
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## What is the purpose of this pull request? (put an "X" next to an item)
4
4
 
5
+ _Please delete options that are not relevant._
6
+
5
7
  - [ ] Documentation update
6
8
  - [ ] Bug fix
7
9
  - [ ] New metadata support
@@ -17,3 +19,12 @@
17
19
  ## Is there anything you'd like reviewers to focus on?
18
20
 
19
21
  ...
22
+
23
+ ## Checklist
24
+
25
+ - [ ] I have performed a self-review of my own code
26
+ - [ ] I have commented my code, particularly in hard-to-understand areas
27
+ - [ ] ESLint & Prettier are not outputting errors or warnings
28
+ - [ ] README.md updated (if applicable)
29
+ - [ ] CHANGELOG.md updated
30
+ - [ ] ran `npm run docs` to update developer docs
package/.issuetracker CHANGED
@@ -2,6 +2,14 @@
2
2
  #
3
3
  # (note that '\' need to be escaped).
4
4
 
5
- [issuetracker "Jira Rule"]
6
- regex = "CSCLSROZ-(\\d+)"
7
- url = "https://alm.accenture.com/jira/browse/CSCLSROZ-$1"
5
+ [issuetracker "Accenture Jira Rule"]
6
+ regex = "(CSCLSROZ)-(\\d+)"
7
+ url = "https://alm.accenture.com/jira/browse/$1-$2"
8
+
9
+ [issuetracker "GitHub Pull Request Rule"]
10
+ regex = "pull request #(\\d+)"
11
+ url = "https://github.com/Accenture/sfmc-devtools/pull/$1"
12
+
13
+ [issuetracker "GitHub Issue Rule"]
14
+ regex = "#(\\d+)"
15
+ url = "https://github.com/Accenture/sfmc-devtools/issues/$1"
@@ -12,9 +12,10 @@
12
12
  "javascript.validate.enable": false,
13
13
  "markdown.extension.italic.indicator": "_",
14
14
  "markdown.extension.list.indentationSize": "adaptive",
15
- "markdown.extension.tableFormatter.enabled": false,
16
15
  "markdown.extension.toc.levels": "2..6",
17
16
  "markdown.extension.toc.orderedList": false,
17
+ "markdown.extension.toc.slugifyMode": "github",
18
+ "markdown.extension.tableFormatter.enabled": false,
18
19
  "sql-formatter.indent": " ",
19
20
  "sql-formatter.uppercase": true,
20
21
  "[html]": {
@@ -30,14 +31,13 @@
30
31
  "editor.defaultFormatter": "esbenp.prettier-vscode"
31
32
  },
32
33
  "[markdown]": {
33
- "editor.defaultFormatter": "esbenp.prettier-vscode"
34
+ "editor.defaultFormatter": "yzhang.markdown-all-in-one"
34
35
  },
35
36
  "[typescript]": {
36
37
  "editor.defaultFormatter": "esbenp.prettier-vscode"
37
38
  },
38
39
  "markdown-toc.orderedList": true,
39
40
  "markdown-toc.insertAnchor": true,
40
- "markdown-toc.anchorMode": "gitlab.com",
41
41
  "outline.showProperties": false,
42
42
  "outline.showVariables": false,
43
43
  "breadcrumbs.showVariables": false,
package/CHANGELOG.md CHANGED
@@ -4,7 +4,109 @@ Accenture SFMC DevTools follows [semantic versioning](https://semver.org/).
4
4
 
5
5
  ---
6
6
 
7
- ## 3.0.1 - 2021-04-11
7
+ ## [3.1.1](https://github.com/Accenture/sfmc-devtools/compare/v3.1.0...v3.1.1) - 2022-01-10
8
+
9
+ **Bugfixes:**
10
+
11
+ - [#160](https://github.com/Accenture/sfmc-devtools/issues/160) mcdev outputs bogus text since dependency colorjs got corrupted ( [background story](https://www.theverge.com/2022/1/9/22874949/developer-corrupts-open-source-libraries-projects-affected))
12
+
13
+ **Chores:**
14
+
15
+ - bumped cli-progress to 3.10.0 (removes colors dependency)
16
+ - bumped winston to 3.3.4 (removes colors dependency)
17
+
18
+ ---
19
+
20
+ ## [3.1.0](https://github.com/Accenture/sfmc-devtools/compare/v3.0.3...v3.1.0) - 2021-12-27
21
+
22
+ **Features:**
23
+
24
+ - [#55](https://github.com/Accenture/sfmc-devtools/issues/55) added user / roles documentation
25
+ - [#64](https://github.com/Accenture/sfmc-devtools/issues/64) Added `accountUser` (system users) support (retrieve)
26
+ - [#103](https://github.com/Accenture/sfmc-devtools/issues/103) Add rename `dataExtensionField` option (via Name_new)
27
+ - [#130](https://github.com/Accenture/sfmc-devtools/issues/130) offer `retrieveChangelog` option to other node packages including mcdev (see [retrieveChangelog.js](/lib/retrieveChangelog.js) for a how-to)
28
+ - [#133](https://github.com/Accenture/sfmc-devtools/issues/133) `dataExtensionField` validation during DE update (see [README](README.md#722-addingupdating-fields-on-existing-data-extensions) for details)
29
+ - [#136](https://github.com/Accenture/sfmc-devtools/issues/136) enable including mcdev in other node packages (see [README](README.md#26-using-mcdev-in-other-node-packages) for a how-to)
30
+ - [#144](https://github.com/Accenture/sfmc-devtools/issues/144) added file type .ai to `asset` - thanks to @fbellgr
31
+
32
+ **Bugfixes:**
33
+
34
+ - [#112](https://github.com/Accenture/sfmc-devtools/issues/112) add (unknown) new type 783 to defintion of `importFile`
35
+ - [#117](https://github.com/Accenture/sfmc-devtools/issues/117) `queries` not deployable when target is `shared DE`
36
+ - [#118](https://github.com/Accenture/sfmc-devtools/issues/118) `automation` start not auto-retried during deploy
37
+ - [#119](https://github.com/Accenture/sfmc-devtools/issues/119) fixed `list` dependency for importFile
38
+ - [#122](https://github.com/Accenture/sfmc-devtools/issues/122) ECONNRESET on caching metadata during deploy
39
+ - [#128](https://github.com/Accenture/sfmc-devtools/issues/128) `dataExtension` json not equal for retrieve/deploy
40
+ - [#129](https://github.com/Accenture/sfmc-devtools/issues/129) `script` json not equal for retrieve/deploy
41
+ - [#140](https://github.com/Accenture/sfmc-devtools/issues/140) avoid issues when retrieving `dataExtensions` that do not have a folder ID (edge case) - thanks to @fbellgr
42
+ - [#144](https://github.com/Accenture/sfmc-devtools/issues/144) improved handling high volumes of `asset` - thanks to @fbellgr
43
+ - [#149](https://github.com/Accenture/sfmc-devtools/issues/149) handle errors on upsert of data extensions gracefully
44
+
45
+ **Chores:**
46
+
47
+ - [#5](https://github.com/Accenture/sfmc-devtools/issues/5) removed postinstall msg after npm 7 dropped support for that
48
+ - [#127](https://github.com/Accenture/sfmc-devtools/issues/127) bad message "info: updated automation: undefined"
49
+ - [#132](https://github.com/Accenture/sfmc-devtools/issues/132) `dataExtension.SendableSubscriberField.Name` now has a slightly more readable value
50
+ - [#137](https://github.com/Accenture/sfmc-devtools/issues/137) docs for installing a specific version were incorrect
51
+ - [#138](https://github.com/Accenture/sfmc-devtools/issues/138) make issues and pull requests clickable in gitfork
52
+ - change `mcdev document` to take the cred/BU first and then the type to align it with other commands
53
+ - improved error handling of `document role` command
54
+ - bumped cli-progress to 3.9.1
55
+ - bumped eslint to 8.4.1
56
+ - bumped eslint-plugin-mocha to 10.0.1
57
+ - bumped eslint-plugin-prettier to 4.0.0
58
+ - bumped fs-extra to 10.0.0
59
+ - bumped husky to 7.0.4
60
+ - bumped inquirer to 8.2.0
61
+ - bumped jsdoc-to-markdown to 7.1.0
62
+ - bumped lint-staged to 12.1.2
63
+ - bumped mocha to 9.1.3
64
+ - bumped mustache to 4.2.0
65
+ - bumped prettier to 2.5.1
66
+ - bumped semver to 7.3.5
67
+ - bumped simple-git to 2.48.0
68
+ - bumped yargs to 17.3.0
69
+ - [#146](https://github.com/Accenture/sfmc-devtools/issues/146) remove AccountUser retrieve as a default retrieve option
70
+
71
+ ---
72
+
73
+ ## [3.0.3](https://github.com/Accenture/sfmc-devtools/compare/v3.0.2...v3.0.3) - 2021-08-11
74
+
75
+ **Bugfixes:**
76
+
77
+ - [#100](https://github.com/Accenture/sfmc-devtools/issues/100) Handle ECONNRESET errors across various types (incl. Data Extensions)
78
+ - [#102](https://github.com/Accenture/sfmc-devtools/issues/102) block deployment attempt for synchronized Data Extensions with proper error message
79
+ - [#104](https://github.com/Accenture/sfmc-devtools/issues/104) block deployment of shared data extensions on child BUs (existing solution broke somewhere down the line)
80
+
81
+ **Chores:**
82
+
83
+ - [#107](https://github.com/Accenture/sfmc-devtools/issues/107) rewrite folder to use generic update/create to help with ECONNRESET issue
84
+ - [#108](https://github.com/Accenture/sfmc-devtools/issues/108) return full API error messages for create & update via SOAP
85
+ - [#110](https://github.com/Accenture/sfmc-devtools/issues/110) improve error message for missing dependencies
86
+ - bumped jsdoc-to-markdown to 7.0.1
87
+ - bumped eslint-plugin-mocha to 9.0.0
88
+ - bumped eslint-plugin-prettier to 3.4.0
89
+ - bumped eslint-config-prettier to 8.3.0
90
+ - bumped eslint to 7.32.0
91
+ - enhanced Pull Request Template with note on `npm run docs`
92
+
93
+ ---
94
+
95
+ ## [3.0.2](https://github.com/Accenture/sfmc-devtools/compare/v3.0.1...v3.0.2) - 2021-08-03
96
+
97
+ **Bugfixes:**
98
+
99
+ - [#26](https://github.com/Accenture/sfmc-devtools/issues/26) retrieving asset subtypes via r ... asset-xyz actually saves result to disk
100
+ - [#45](https://github.com/Accenture/sfmc-devtools/issues/45) connection errors for automations fixed
101
+ - [#46](https://github.com/Accenture/sfmc-devtools/issues/46) (temp fix) campaigns break entire retrieve - disabled for now
102
+ - [#48](https://github.com/Accenture/sfmc-devtools/issues/48) connection errors for dataExtensions and other types are now handled gracefully
103
+ - [#49](https://github.com/Accenture/sfmc-devtools/issues/49) connection errors for asset subtypes no longer restart downloading all subtypes
104
+ - [#51](https://github.com/Accenture/sfmc-devtools/issues/51) retrieving asset subtypes now always uses the default list of subtypes
105
+ - [#52](https://github.com/Accenture/sfmc-devtools/issues/52) no more endless retries in case of connection errors
106
+
107
+ ---
108
+
109
+ ## [3.0.1](https://github.com/Accenture/sfmc-devtools/compare/v3.0.0...v3.0.1) - 2021-04-11
8
110
 
9
111
  **Bugfixes:**
10
112