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.
- package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/workflows/coverage-base-update.yml +2 -2
- package/.github/workflows/coverage.yml +1 -1
- package/@types/lib/metadataTypes/Folder.d.ts +1 -0
- package/@types/lib/metadataTypes/Folder.d.ts.map +1 -1
- package/@types/lib/metadataTypes/definitions/Folder.definition.d.ts +1 -0
- package/lib/metadataTypes/Folder.js +33 -20
- package/lib/metadataTypes/definitions/Folder.definition.js +2 -0
- package/package.json +4 -4
- package/test/mockRoot/.mcdevrc.json +1 -1
|
@@ -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@
|
|
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@
|
|
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@
|
|
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' }}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Folder.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Folder.js"],"names":[],"mappings":";uBASa,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;gCACnD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;AAVzD;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH;IACI;;;;;;;;OAQG;IACH,6BANW,MAAM,qBACN,MAAM,EAAE,eACR,MAAM,EAAE,QACR,MAAM,gBA8HhB;IAED;;;;;;OAMG;IACH,4BAJW,IAAI,GAAG,MAAM,EAAE,eACf,MAAM,EAAE,gBAKlB;IAED;;;;;;;OAOG;IACH,wBAHW,eAAe,GACb,QAAS,MAAM,CAAC,CA8J5B;IAED;;;;;OAKG;IACH,6BAHW,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Folder.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Folder.js"],"names":[],"mappings":";uBASa,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;gCACnD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;AAVzD;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH;IACI;;;;;;;;OAQG;IACH,6BANW,MAAM,qBACN,MAAM,EAAE,eACR,MAAM,EAAE,QACR,MAAM,gBA8HhB;IAED;;;;;;OAMG;IACH,4BAJW,IAAI,GAAG,MAAM,EAAE,eACf,MAAM,EAAE,gBAKlB;IAED;;;;;;;OAOG;IACH,wBAHW,eAAe,GACb,QAAS,MAAM,CAAC,CA8J5B;IAED;;;;;OAKG;IACH,6BAHW,gBAAgB,gBA4D1B;IAED;;;;;OAKG;IACH,6BAHW,gBAAgB,gBAyB1B;IAED;;;;;OAKG;IACH,gCAHW,gBAAgB,GACd,QAAS,gBAAgB,CAAC,CAgDtC;IAED;;;;;;OAMG;IACH,0BAJW,MAAM,gBACN,OAAO,GACL,QAAS,eAAe,CAAC,CAkErC;IAED;;;;;;;OAOG;IACH,yCALW,MAAM,EAAE,qBACR,OAAO,oBACP,MAAM,EAAE,GACN,QAAS,MAAM,CAAC,CA+B5B;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"}
|
|
@@ -351,29 +351,42 @@ class Folder extends MetadataType {
|
|
|
351
351
|
}
|
|
352
352
|
const path = metadataEntry.Path;
|
|
353
353
|
try {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
-
|
|
374
|
-
|
|
374
|
+
Util.logger.info(` - created folder: ${path}`);
|
|
375
|
+
return returnObject;
|
|
376
|
+
} else {
|
|
377
|
+
throw new Error(response);
|
|
378
|
+
}
|
|
375
379
|
} else {
|
|
376
|
-
|
|
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.
|
|
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": "
|
|
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.
|
|
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.
|
|
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",
|