mcdev 7.0.1 → 7.0.2

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.
@@ -39,6 +39,7 @@ body:
39
39
  label: Version
40
40
  description: What version of our software are you running? (mcdev --version)
41
41
  options:
42
+ - 7.0.2
42
43
  - 7.0.1
43
44
  - 7.0.0
44
45
  - 6.0.2
@@ -24,7 +24,7 @@ jobs:
24
24
  git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1000
25
25
 
26
26
  - name: Download artifact for base branch
27
- uses: dawidd6/action-download-artifact@v3
27
+ uses: dawidd6/action-download-artifact@v6
28
28
  continue-on-error: true
29
29
  with:
30
30
  workflow: ${{ github.event.pull_request.base.ref == 'main' && 'coverage-main-branch.yml' || github.event.pull_request.base.ref == 'develop' && 'coverage-develop-branch.yml' || 'coverage.yml' }}
@@ -35,7 +35,7 @@ jobs:
35
35
  search_artifacts: true
36
36
 
37
37
  - name: Download artifact for to be merged branch
38
- uses: dawidd6/action-download-artifact@v3
38
+ uses: dawidd6/action-download-artifact@v6
39
39
  continue-on-error: true
40
40
  with:
41
41
  workflow: 'coverage.yml'
@@ -56,7 +56,7 @@ jobs:
56
56
  GITHUB_TOKEN: ${{ github.token }}
57
57
 
58
58
  - name: Download artifact for base branch if available, previous
59
- uses: dawidd6/action-download-artifact@v3
59
+ uses: dawidd6/action-download-artifact@v6
60
60
  continue-on-error: true
61
61
  with:
62
62
  workflow: ${{ github.event.pull_request.base.ref == 'main' && 'coverage-main-branch.yml' || github.event.pull_request.base.ref == 'develop' && 'coverage-develop-branch.yml' || 'coverage.yml' }}
@@ -115,6 +115,7 @@ declare namespace Folder {
115
115
  dependencies: any[];
116
116
  subTypes: string[];
117
117
  deployFolderTypes: string[];
118
+ deployFolderTypesRest: string[];
118
119
  deployFolderBlacklist: string[];
119
120
  folderTypesFromParent: string[];
120
121
  hasExtended: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Folder.d.ts","sourceRoot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B;IACD;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,gBAAgB,CAI5B;IACD;;;;;;;OAOG;IACH,4BALW,eAAe,eACf,MAAM,OACN,MAAM,GAAG,MAAM,GACb,QAAS,MAAM,CAAC,CAuD5B;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA3pBwB,mBAAmB"}
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  let dependencies: any[];
4
4
  let subTypes: string[];
5
5
  let deployFolderTypes: string[];
6
+ let deployFolderTypesRest: string[];
6
7
  let deployFolderBlacklist: string[];
7
8
  let folderTypesFromParent: string[];
8
9
  let hasExtended: boolean;
@@ -351,29 +351,42 @@ class Folder extends MetadataType {
351
351
  }
352
352
  const path = metadataEntry.Path;
353
353
  try {
354
- // * We tried using the SOAP endpoint for creating folders but that did not support folders for automations nor journeys. This rest endpoint seems to cover everything though
355
- const restPayload = {
356
- parentCatId: metadataEntry.ParentFolder.ID,
357
- name: metadataEntry.Name,
358
- catType: metadataEntry.ContentType,
359
- };
360
- const response = await super.createREST(restPayload, '/email/v1/category', true);
361
- if (response?.objectId) {
362
- // convert the response to the same format as the SOAP response
363
- metadataEntry.ID = response.objectId;
364
- // the following is a bit of a hack to make the response look like the SOAP response; not sure if we actually need that anywhere like this --> future developers feel free to double check
365
- const returnObject = {
366
- Results: [
367
- {
368
- Object: metadataEntry,
369
- },
370
- ],
354
+ if (this.definition.deployFolderTypesRest.includes(metadataEntry.ContentType)) {
355
+ // * The SOAP endpoint for creating folders does not support folders for automations nor journeys. The Rest endpoint on the other hand errors out on certain characters in the folder names that are actually valid. We therefore only use Rest for the folder types that are not supported by SOAP.
356
+ const restPayload = {
357
+ parentCatId: metadataEntry.ParentFolder.ID,
358
+ name: metadataEntry.Name,
359
+ catType: metadataEntry.ContentType,
371
360
  };
361
+ const response = await super.createREST(restPayload, '/email/v1/category', true);
362
+ if (response?.objectId) {
363
+ // convert the response to the same format as the SOAP response
364
+ metadataEntry.ID = response.objectId;
365
+ // the following is a bit of a hack to make the response look like the SOAP response; not sure if we actually need that anywhere like this --> future developers feel free to double check
366
+ const returnObject = {
367
+ Results: [
368
+ {
369
+ Object: metadataEntry,
370
+ },
371
+ ],
372
+ };
372
373
 
373
- Util.logger.info(` - created folder: ${path}`);
374
- return returnObject;
374
+ Util.logger.info(` - created folder: ${path}`);
375
+ return returnObject;
376
+ } else {
377
+ throw new Error(response);
378
+ }
375
379
  } else {
376
- throw new Error(response);
380
+ const response = await super.createSOAP(metadataEntry, true);
381
+ if (response) {
382
+ response.Results[0].Object = metadataEntry;
383
+ response.Results[0].Object.ID = response.Results[0].NewID;
384
+ response.Results[0].Object.CustomerKey = metadataEntry.CustomerKey;
385
+ delete response.Results[0].Object.$;
386
+
387
+ Util.logger.info(` - created folder: ${path}`);
388
+ return response;
389
+ }
377
390
  }
378
391
  } catch (ex) {
379
392
  if (ex?.results) {
@@ -4,6 +4,7 @@ export default {
4
4
  subTypes: [
5
5
  'asset-shared',
6
6
  'asset',
7
+ 'automations',
7
8
  'contextual_suppression_list',
8
9
  'dataextension',
9
10
  'filteractivity',
@@ -52,6 +53,7 @@ export default {
52
53
  'triggered_send_journeybuilder',
53
54
  'triggered_send',
54
55
  ],
56
+ deployFolderTypesRest: ['automations', 'journey', 'triggered_send_journeybuilder'],
55
57
  deployFolderBlacklist: [
56
58
  // lower-case values!
57
59
  'shared data extensions',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcdev",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Accenture Salesforce Marketing Cloud DevTools",
5
5
  "author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
6
6
  "license": "MIT",
@@ -67,7 +67,7 @@
67
67
  "beauty-amp-core2": "0.4.9",
68
68
  "cli-progress": "3.12.0",
69
69
  "command-exists": "1.2.9",
70
- "conf": "12.0.0",
70
+ "conf": "13.0.1",
71
71
  "console.table": "0.10.0",
72
72
  "deep-equal": "2.2.3",
73
73
  "fs-extra": "11.2.0",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/mocha": "10.0.6",
90
- "@types/node": "20.14.2",
90
+ "@types/node": "20.14.9",
91
91
  "assert": "2.1.0",
92
92
  "axios-mock-adapter": "1.22.0",
93
93
  "c8": "10.0.0",
@@ -102,7 +102,7 @@
102
102
  "eslint-plugin-unicorn": "53.0.0",
103
103
  "fast-xml-parser": "4.4.0",
104
104
  "husky": "9.0.11",
105
- "lint-staged": "15.2.5",
105
+ "lint-staged": "15.2.7",
106
106
  "mocha": "10.4.0",
107
107
  "mock-fs": "5.2.0",
108
108
  "npm-run-all": "4.1.5",
@@ -100,5 +100,5 @@
100
100
  "verification"
101
101
  ]
102
102
  },
103
- "version": "7.0.1"
103
+ "version": "7.0.2"
104
104
  }