mcdev 8.1.0 → 8.2.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 (56) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yml +2 -0
  2. package/.github/workflows/code-test.yml +2 -2
  3. package/.github/workflows/coverage-base-update.yml +3 -3
  4. package/.github/workflows/coverage-develop-branch.yml +3 -3
  5. package/.github/workflows/coverage-main-branch.yml +3 -3
  6. package/.github/workflows/coverage.yml +4 -4
  7. package/.github/workflows/npm-publish.yml +4 -4
  8. package/@types/lib/MetadataTypeDefinitions.d.ts +2 -0
  9. package/@types/lib/MetadataTypeDefinitions.d.ts.map +1 -1
  10. package/@types/lib/MetadataTypeInfo.d.ts +2 -0
  11. package/@types/lib/MetadataTypeInfo.d.ts.map +1 -1
  12. package/@types/lib/index.d.ts.map +1 -1
  13. package/@types/lib/metadataTypes/Asset.d.ts.map +1 -1
  14. package/@types/lib/metadataTypes/Automation.d.ts.map +1 -1
  15. package/@types/lib/metadataTypes/DataExtension.d.ts.map +1 -1
  16. package/@types/lib/metadataTypes/DataExtensionField.d.ts.map +1 -1
  17. package/@types/lib/metadataTypes/Journey.d.ts.map +1 -1
  18. package/@types/lib/metadataTypes/MetadataType.d.ts.map +1 -1
  19. package/@types/lib/metadataTypes/TriggeredSendSummary.d.ts +257 -0
  20. package/@types/lib/metadataTypes/TriggeredSendSummary.d.ts.map +1 -0
  21. package/@types/lib/metadataTypes/definitions/TriggeredSendSummary.definition.d.ts +208 -0
  22. package/@types/lib/metadataTypes/definitions/TriggeredSendSummary.definition.d.ts.map +1 -0
  23. package/@types/lib/util/devops.d.ts +2 -1
  24. package/@types/lib/util/devops.d.ts.map +1 -1
  25. package/@types/lib/util/util.d.ts +2 -1
  26. package/@types/lib/util/util.d.ts.map +1 -1
  27. package/lib/MetadataTypeDefinitions.js +2 -0
  28. package/lib/MetadataTypeInfo.js +2 -0
  29. package/lib/cli.js +5 -0
  30. package/lib/index.js +26 -4
  31. package/lib/metadataTypes/Asset.js +30 -7
  32. package/lib/metadataTypes/Automation.js +4 -2
  33. package/lib/metadataTypes/DataExtension.js +19 -12
  34. package/lib/metadataTypes/DataExtensionField.js +4 -3
  35. package/lib/metadataTypes/Folder.js +1 -1
  36. package/lib/metadataTypes/Journey.js +12 -2
  37. package/lib/metadataTypes/MetadataType.js +8 -2
  38. package/lib/metadataTypes/TriggeredSendSummary.js +102 -0
  39. package/lib/metadataTypes/definitions/TriggeredSendSummary.definition.js +211 -0
  40. package/lib/util/devops.js +29 -9
  41. package/lib/util/util.js +13 -4
  42. package/package.json +10 -10
  43. package/test/mockRoot/.mcdevrc.json +1 -1
  44. package/test/resources/1111111/dataFolder/retrieve-ContentTypeINdataextension,hidden,queryactivity,salesforcedataextension,shared_data,shared_dataextension,shared_salesforcedataextension,synchronizeddataextension-response.xml +26 -0
  45. package/test/resources/9999999/automation/create-testNew_automation-expected.md +1 -1
  46. package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +1 -1
  47. package/test/resources/9999999/automation/update-testExisting_automation-expected.md +1 -1
  48. package/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_Multistep/put-response.json +1 -1
  49. package/test/resources/9999999/interaction/v1/interactions/key_testExisting_temail/put-response-paused.json +1 -1
  50. package/test/resources/9999999/interaction/v1/interactions/key_testExisting_temail/put-response.json +1 -1
  51. package/test/resources/9999999/interaction/v1/interactions/key_testExisting_temail_notPublished/put-response.json +1 -1
  52. package/test/resources/9999999/triggeredSendSummary/get-expected.json +24 -0
  53. package/test/resources/9999999/triggeredSendSummary/retrieve-response.xml +49 -0
  54. package/test/type.dataExtension.test.js +41 -0
  55. package/test/type.journey.test.js +37 -2
  56. package/test/type.triggeredSendSummary.test.js +45 -0
@@ -0,0 +1,208 @@
1
+ declare namespace _default {
2
+ let bodyIteratorField: string;
3
+ let dependencies: string[];
4
+ namespace dependencyGraph {
5
+ let triggeredSend: string[];
6
+ }
7
+ let filter: {};
8
+ let hasExtended: boolean;
9
+ let idField: string;
10
+ let keepId: boolean;
11
+ let keyIsFixed: boolean;
12
+ let keyField: string;
13
+ let nameField: string;
14
+ let folderIdField: string;
15
+ let createdDateField: any;
16
+ let createdNameField: any;
17
+ let lastmodDateField: any;
18
+ let lastmodNameField: any;
19
+ let restPagination: any;
20
+ let maxKeyLength: number;
21
+ let type: string;
22
+ let soapType: string;
23
+ let typeDescription: string;
24
+ let typeRetrieveByDefault: boolean;
25
+ let typeCdpByDefault: boolean;
26
+ let typeName: string;
27
+ let fields: {
28
+ Bounces: {
29
+ isCreateable: boolean;
30
+ isUpdateable: boolean;
31
+ retrieving: boolean;
32
+ templating: boolean;
33
+ };
34
+ Clicks: {
35
+ isCreateable: boolean;
36
+ isUpdateable: boolean;
37
+ retrieving: boolean;
38
+ templating: boolean;
39
+ };
40
+ 'Client.ID': {
41
+ isCreateable: boolean;
42
+ isUpdateable: boolean;
43
+ retrieving: boolean;
44
+ templating: boolean;
45
+ };
46
+ Conversions: {
47
+ isCreateable: boolean;
48
+ isUpdateable: boolean;
49
+ retrieving: boolean;
50
+ templating: boolean;
51
+ };
52
+ CustomerKey: {
53
+ isCreateable: boolean;
54
+ isUpdateable: boolean;
55
+ retrieving: boolean;
56
+ templating: boolean;
57
+ };
58
+ FTAFEmailsSent: {
59
+ isCreateable: boolean;
60
+ isUpdateable: boolean;
61
+ retrieving: boolean;
62
+ templating: boolean;
63
+ };
64
+ FTAFOptIns: {
65
+ isCreateable: boolean;
66
+ isUpdateable: boolean;
67
+ retrieving: boolean;
68
+ templating: boolean;
69
+ };
70
+ FTAFRequests: {
71
+ isCreateable: boolean;
72
+ isUpdateable: boolean;
73
+ retrieving: boolean;
74
+ templating: boolean;
75
+ };
76
+ ID: {
77
+ isCreateable: boolean;
78
+ isUpdateable: boolean;
79
+ retrieving: boolean;
80
+ templating: boolean;
81
+ };
82
+ InProcess: {
83
+ isCreateable: boolean;
84
+ isUpdateable: boolean;
85
+ retrieving: boolean;
86
+ templating: boolean;
87
+ };
88
+ NotSentDueToError: {
89
+ isCreateable: boolean;
90
+ isUpdateable: boolean;
91
+ retrieving: boolean;
92
+ templating: boolean;
93
+ };
94
+ NotSentDueToOptOut: {
95
+ isCreateable: boolean;
96
+ isUpdateable: boolean;
97
+ retrieving: boolean;
98
+ templating: boolean;
99
+ };
100
+ NotSentDueToUndeliverable: {
101
+ isCreateable: boolean;
102
+ isUpdateable: boolean;
103
+ retrieving: boolean;
104
+ templating: boolean;
105
+ };
106
+ ObjectID: {
107
+ isCreateable: boolean;
108
+ isUpdateable: boolean;
109
+ retrieving: boolean;
110
+ templating: boolean;
111
+ };
112
+ Opens: {
113
+ isCreateable: boolean;
114
+ isUpdateable: boolean;
115
+ retrieving: boolean;
116
+ templating: boolean;
117
+ };
118
+ OptOuts: {
119
+ isCreateable: boolean;
120
+ isUpdateable: boolean;
121
+ retrieving: boolean;
122
+ templating: boolean;
123
+ };
124
+ Owner: {
125
+ isCreateable: boolean;
126
+ isUpdateable: boolean;
127
+ retrieving: boolean;
128
+ templating: boolean;
129
+ };
130
+ PartnerKey: {
131
+ isCreateable: boolean;
132
+ isUpdateable: boolean;
133
+ retrieving: boolean;
134
+ templating: boolean;
135
+ };
136
+ PartnerProperties: {
137
+ isCreateable: boolean;
138
+ isUpdateable: boolean;
139
+ retrieving: boolean;
140
+ templating: boolean;
141
+ };
142
+ Queued: {
143
+ isCreateable: boolean;
144
+ isUpdateable: boolean;
145
+ retrieving: boolean;
146
+ templating: boolean;
147
+ };
148
+ Sent: {
149
+ isCreateable: boolean;
150
+ isUpdateable: boolean;
151
+ retrieving: boolean;
152
+ templating: boolean;
153
+ };
154
+ SurveyResponses: {
155
+ isCreateable: boolean;
156
+ isUpdateable: boolean;
157
+ retrieving: boolean;
158
+ templating: boolean;
159
+ };
160
+ UniqueClicks: {
161
+ isCreateable: boolean;
162
+ isUpdateable: boolean;
163
+ retrieving: boolean;
164
+ templating: boolean;
165
+ };
166
+ UniqueConversions: {
167
+ isCreateable: boolean;
168
+ isUpdateable: boolean;
169
+ retrieving: boolean;
170
+ templating: boolean;
171
+ };
172
+ UniqueOpens: {
173
+ isCreateable: boolean;
174
+ isUpdateable: boolean;
175
+ retrieving: boolean;
176
+ templating: boolean;
177
+ };
178
+ CorrelationID: {
179
+ isCreateable: boolean;
180
+ isUpdateable: boolean;
181
+ retrieving: boolean;
182
+ templating: boolean;
183
+ };
184
+ CreatedDate: {
185
+ isCreateable: boolean;
186
+ isUpdateable: boolean;
187
+ retrieving: boolean; /** Listed in the type documentation but not retrievable */
188
+ templating: boolean;
189
+ };
190
+ ModifiedDate: {
191
+ isCreateable: boolean;
192
+ isUpdateable: boolean;
193
+ retrieving: boolean; /** Listed in the type documentation but not retrievable */
194
+ templating: boolean;
195
+ };
196
+ r__triggeredSend_name: {
197
+ skipValidation: boolean;
198
+ };
199
+ r__triggeredSend_key: {
200
+ skipValidation: boolean;
201
+ };
202
+ r__folder_Path: {
203
+ skipValidation: boolean;
204
+ };
205
+ };
206
+ }
207
+ export default _default;
208
+ //# sourceMappingURL=TriggeredSendSummary.definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggeredSendSummary.definition.d.ts","sourceRoot":"","sources":["../../../../lib/metadataTypes/definitions/TriggeredSendSummary.definition.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAqM8B,2DAA2D;;;;;;iCAM3D,2DAA2D"}
@@ -43,10 +43,11 @@ declare namespace DevOps {
43
43
  * create markdown file for deployment listing
44
44
  *
45
45
  * @param {string} directory -
46
+ * @param {string} filterPathsCSV -
46
47
  * @param {object} jsonReport -
47
48
  * @returns {void}
48
49
  */
49
- function document(directory: string, jsonReport: object): void;
50
+ function document(directory: string, filterPathsCSV: string, jsonReport: object): void;
50
51
  /**
51
52
  * should return only the json for all but asset, query and script that are saved as multiple files
52
53
  * additionally, the documentation for dataExtension and automation should be returned
@@ -1 +1 @@
1
- {"version":3,"file":"devops.d.ts","sourceRoot":"","sources":["../../../lib/util/devops.js"],"names":[],"mappings":";yBAea,OAAO,wBAAwB,EAAE,UAAU;uBAC3C,OAAO,wBAAwB,EAAE,QAAQ;oBACzC,OAAO,wBAAwB,EAAE,KAAK;0BACtC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;2BAChD,OAAO,wBAAwB,EAAE,YAAY;sBAC7C,OAAO,wBAAwB,EAAE,OAAO;+BACxC,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;oCACnD,OAAO,wBAAwB,EAAE,qBAAqB;mCACtD,OAAO,wBAAwB,EAAE,oBAAoB;gCACrD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;;IAOtD;;;;;;;;;;OAUG;IACH,kCAPW,OAAO,UACP,MAAM,oBACN,OAAO,mBACP,MAAM,kBACN,MAAM,GACJ,OAAO,CAAE,YAAY,EAAE,CAAC,CA0WpC;IAED;;;;;;;;OAQG;IACH,2CANW,OAAO,SACP,MAAM,YACN,YAAY,EAAE,kBACd,MAAM,GACJ,OAAO,CAAE,YAAY,EAAE,CAAC,CAsJpC;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,cACN,MAAM,GACJ,IAAI,CA4BhB;IAED;;;;;;;;;OASG;IACH,sCANW,OAAO,YACP,QAAQ,gBACR,MAAM,UACN,MAAM,EAAE,GACN,OA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CAM9B;IACD;;;;;;;OAOG;IACH,4CALW,YAAY,EAAE,gBACd,MAAM,cACN,OAAO,gBACP,MAAM,QAgGhB"}
@@ -328,10 +328,11 @@ export namespace Util {
328
328
  * returns true if no LIKE filter is defined or if all filters match
329
329
  *
330
330
  * @param {MetadataTypeItem} metadata a single metadata item
331
+ * @param {object} definition type definition
331
332
  * @param {object} [filters] only used in recursive calls
332
333
  * @returns {boolean} true if no LIKE filter is defined or if all filters match
333
334
  */
334
- function fieldsLike(metadata: MetadataTypeItem, filters?: object): boolean;
335
+ function fieldsLike(metadata: MetadataTypeItem, definition: object, filters?: object): boolean;
335
336
  /**
336
337
  * helper used by SOAP methods to ensure the type always uses an upper-cased first letter
337
338
  *
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../lib/util/util.js"],"names":[],"mappings":";;;;;;;yBA+Ce,eAAe;;;;;IAO1B;;;;;;OAMG;IACH;;sBAHW,MAAM,EAAE;;MAalB;IAED;;;;;;OAMG;IACH,iCAJW,MAAM,EAAE,UACR,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;OAMG;IACH,sCAJW,MAAM,EAAE,UACR,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,cACN,OAAO,GACL,OAAO,CAcnB;IAED;;;;;;OAMG;IACH,oCAJW,MAAM,EAAE,cACR,OAAO,GACL,OAAO,CAYnB;IAED;;;;;OAKG;IACH,kCAHW,MAAM,cACN,OAAO,QAqCjB;IACD;;;;;;OAMG;IACH,oDALW,MAAM,GAAG,YAAY,WACrB,MAAM,EAAE,gBACR,MAAM,GACJ,YAAY,GAAG,SAAS,CAwBpC;IAED;;;;OAIG;IACH,6BAFa,IAAI,CAKhB;IAED;;;;;;OAMG;IACH,2BAHW,GAAC,GACC,OAAO,CAInB;IAED;;;;;;OAMG;IACH,4BAHW,GAAC,GACC,OAAO,CAInB;IAQQ,wBAJE,MAAM,GAAG,MAAM,GAAG,OAA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,EAAE,WAAW;qBAC5C,OAAO,wBAAwB,EAAE,MAAM;sBACvC,OAAO,wBAAwB,EAAE,OAAO;+BACxC,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;oCACnD,OAAO,wBAAwB,EAAE,qBAAqB;mCACtD,OAAO,wBAAwB,EAAE,oBAAoB;8BACrD,OAAO,wBAAwB,EAAE,eAAe;gCAChD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;uBAC7C,OAAO,wBAAwB,EAAE,QAAQ"}
@@ -37,6 +37,7 @@ import transactionalEmail from './metadataTypes/definitions/TransactionalEmail.d
37
37
  import transactionalPush from './metadataTypes/definitions/TransactionalPush.definition.js';
38
38
  import transactionalSMS from './metadataTypes/definitions/TransactionalSMS.definition.js';
39
39
  import triggeredSend from './metadataTypes/definitions/TriggeredSend.definition.js';
40
+ import triggeredSendSummary from './metadataTypes/definitions/TriggeredSendSummary.definition.js';
40
41
  import user from './metadataTypes/definitions/User.definition.js';
41
42
  import verification from './metadataTypes/definitions/Verification.definition.js';
42
43
 
@@ -81,6 +82,7 @@ export default {
81
82
  transactionalPush,
82
83
  transactionalSMS,
83
84
  triggeredSend,
85
+ triggeredSendSummary,
84
86
  user,
85
87
  verification,
86
88
  };
@@ -36,6 +36,7 @@ import transactionalEmail from './metadataTypes/TransactionalEmail.js';
36
36
  import transactionalPush from './metadataTypes/TransactionalPush.js';
37
37
  import transactionalSMS from './metadataTypes/TransactionalSMS.js';
38
38
  import triggeredSend from './metadataTypes/TriggeredSend.js';
39
+ import triggeredSendSummary from './metadataTypes/TriggeredSendSummary.js';
39
40
  import user from './metadataTypes/User.js';
40
41
  import verification from './metadataTypes/Verification.js';
41
42
 
@@ -79,6 +80,7 @@ export default {
79
80
  transactionalPush,
80
81
  transactionalSMS,
81
82
  triggeredSend,
83
+ triggeredSendSummary,
82
84
  user,
83
85
  verification,
84
86
  };
package/lib/cli.js CHANGED
@@ -68,6 +68,11 @@ yargs(hideBin(process.argv))
68
68
  group: 'Options for retrieve:',
69
69
  describe:
70
70
  'allows overwriting options.formatOnSave from the config file. Disable formatting via --no-format',
71
+ })
72
+ .option('purge', {
73
+ type: 'boolean',
74
+ group: 'Options for retrieve:',
75
+ describe: 'deletes the relevant retrieve folder before retrieving',
71
76
  }),
72
77
  (argv) => {
73
78
  Mcdev.setOptions(argv);
package/lib/index.js CHANGED
@@ -436,9 +436,30 @@ class Mcdev {
436
436
  const areKeySet = Array.isArray(selectedTypesArr)
437
437
  ? !!keys
438
438
  : selectedTypesArr[selectedType] !== null;
439
- if (!areKeySet) {
440
- // dont delete directories if we are just re-retrieving a single file
441
- await File.remove(File.normalizePath(removePathArr));
439
+ if ((!areKeySet && !Util.OPTIONS.like) || Util.OPTIONS.purge) {
440
+ Util.logger.debug(`:: Cleaning output folder for ${selectedType}`);
441
+ // dont delete directories if we are just re-retrieving a single file or if we are re-retrieving only files matching the --like criteria
442
+ let isCleaned = false;
443
+ const MAX_RETRIES = 10;
444
+ let retryCount = 0;
445
+ do {
446
+ try {
447
+ await File.remove(File.normalizePath(removePathArr));
448
+ isCleaned = true;
449
+ } catch (ex) {
450
+ // to avoid EBUSY: resource busy or locked errors on Windows, we retry after a short wait
451
+ retryCount++;
452
+ if (retryCount >= MAX_RETRIES) {
453
+ Util.logger.error(
454
+ `Failed to clean output folder for ${selectedType} after ${MAX_RETRIES} attempts: ${ex && ex.message ? ex.message : ex}`
455
+ );
456
+ break;
457
+ }
458
+ await Util.sleep(100);
459
+ }
460
+ } while (!isCleaned);
461
+ } else {
462
+ Util.logger.debug(`:: NOT cleaning output folder for ${selectedType}`);
442
463
  }
443
464
  }
444
465
  }
@@ -2097,7 +2118,8 @@ class Mcdev {
2097
2118
  );
2098
2119
  // reactivate logging
2099
2120
  Util.setLoggingLevel({});
2100
- if (Util.fieldsLike(metadataMap[originalKey])) {
2121
+
2122
+ if (Util.fieldsLike(metadataMap[originalKey], MetadataTypeDefinitions[selectedType])) {
2101
2123
  keyArr.push(originalKey);
2102
2124
  }
2103
2125
  }
@@ -493,6 +493,7 @@ class Asset extends MetadataType {
493
493
 
494
494
  // only when we save results do we need the complete metadata or files. caching can skip these
495
495
  if (retrieveDir && !Array.isArray(subType)) {
496
+ let downloadedItemsMap = {};
496
497
  if (items.length > 0) {
497
498
  for (const item of items) {
498
499
  if (item.customerKey.trim() !== item.customerKey) {
@@ -504,13 +505,21 @@ class Asset extends MetadataType {
504
505
  }
505
506
  }
506
507
  // we have to wait on execution or it potentially causes memory reference issues when changing between BUs
507
- await this.requestAndSaveExtended(items, subType, retrieveDir, templateVariables);
508
+ downloadedItemsMap = await this.requestAndSaveExtended(
509
+ items,
510
+ subType,
511
+ retrieveDir,
512
+ templateVariables
513
+ );
508
514
  }
509
515
  // always show the summary even if we already had the progress bar in the console
510
- Util.logger.info(` Downloaded asset${subType ? '-' + subType : ''}: ${items.length}`);
516
+ Util.logger.info(
517
+ ` Downloaded asset${subType ? '-' + subType : ''}: ${Object.keys(downloadedItemsMap).length}`
518
+ );
519
+ return Object.values(downloadedItemsMap);
520
+ } else {
521
+ return items;
511
522
  }
512
-
513
- return items;
514
523
  }
515
524
 
516
525
  /**
@@ -541,6 +550,7 @@ class Asset extends MetadataType {
541
550
  const completed = [];
542
551
  const failed = [];
543
552
  const metadataMap = {};
553
+ let filterCounter = 0;
544
554
 
545
555
  // put in do loop to manage issues with connection timeout
546
556
  do {
@@ -550,7 +560,7 @@ class Asset extends MetadataType {
550
560
  try {
551
561
  const rateLimit = pLimit(5);
552
562
 
553
- const promiseMap = await Promise.all(
563
+ await Promise.all(
554
564
  items.map((item, index) =>
555
565
  rateLimit(async () => {
556
566
  const metadataMapSaveSingle = {};
@@ -586,15 +596,23 @@ class Asset extends MetadataType {
586
596
  }
587
597
  completed.push(item.id);
588
598
  if (metadataMapSaveSingle[item.customerKey]) {
589
- await this.saveResults(
599
+ const savedItem = await this.saveResults(
590
600
  metadataMapSaveSingle,
591
601
  retrieveDir,
592
602
  'asset-' + subType,
593
603
  templateVariables
594
604
  );
605
+ if (!savedItem[item.customerKey]) {
606
+ // filtered by like-option
607
+ delete metadataMap[item.customerKey];
608
+ filterCounter++;
609
+ }
595
610
  }
596
611
  // update the current value in your application..
597
612
  extendedBar.increment();
613
+ if (metadataMap[item.customerKey]) {
614
+ return metadataMap[item.customerKey];
615
+ }
598
616
  })
599
617
  )
600
618
  );
@@ -602,7 +620,12 @@ class Asset extends MetadataType {
602
620
  // stop the progress bar
603
621
  extendedBar.stop();
604
622
  Asset._resetLogLevel(loggerLevelBak, failed);
605
- return promiseMap;
623
+ if (filterCounter) {
624
+ Util.logger.info(
625
+ ` - Filtered ${this.definition.type}-${subType}: ${filterCounter} (downloaded but not saved to disk)`
626
+ );
627
+ }
628
+ return metadataMap;
606
629
  } catch (ex) {
607
630
  extendedBar.stop();
608
631
  Asset._resetLogLevel(loggerLevelBak, failed);
@@ -1474,7 +1474,7 @@ class Automation extends MetadataType {
1474
1474
  }
1475
1475
  const frequency = ical.FREQ.slice(0, -2).toLowerCase();
1476
1476
 
1477
- output += `* Recurrance: `;
1477
+ output += `* Recurrence: `;
1478
1478
  output +=
1479
1479
  ical.COUNT == 1
1480
1480
  ? 'run only once'
@@ -1636,9 +1636,11 @@ class Automation extends MetadataType {
1636
1636
  // as part of retrieve & manual execution we could face an empty folder
1637
1637
  return;
1638
1638
  }
1639
+
1640
+ const docLimit = pLimit(100);
1639
1641
  await Promise.all(
1640
1642
  Object.keys(metadata).map((key) =>
1641
- this._writeDoc(docPath + '/', key, metadata[key], 'md')
1643
+ docLimit(() => this._writeDoc(docPath + '/', key, metadata[key], 'md'))
1642
1644
  )
1643
1645
  );
1644
1646
  }
@@ -1422,6 +1422,9 @@ class DataExtension extends MetadataType {
1422
1422
  'IsNullable',
1423
1423
  'DefaultValue',
1424
1424
  ];
1425
+
1426
+ const docLimit = pLimit(100);
1427
+
1425
1428
  return Promise.all(
1426
1429
  Object.keys(metadataMap).map((key) => {
1427
1430
  if (metadataMap[key]?.Fields?.length) {
@@ -1437,21 +1440,25 @@ class DataExtension extends MetadataType {
1437
1440
  }
1438
1441
 
1439
1442
  if (['html', 'both'].includes(this.properties.options.documentType)) {
1440
- return this._writeDoc(
1441
- docPath + '/',
1442
- key,
1443
- metadataMap[key],
1444
- 'html',
1445
- columnsToPrint
1443
+ return docLimit(() =>
1444
+ this._writeDoc(
1445
+ docPath + '/',
1446
+ key,
1447
+ metadataMap[key],
1448
+ 'html',
1449
+ columnsToPrint
1450
+ )
1446
1451
  );
1447
1452
  }
1448
1453
  if (['md', 'both'].includes(this.properties.options.documentType)) {
1449
- return this._writeDoc(
1450
- docPath + '/',
1451
- key,
1452
- metadataMap[key],
1453
- 'md',
1454
- columnsToPrint
1454
+ return docLimit(() =>
1455
+ this._writeDoc(
1456
+ docPath + '/',
1457
+ key,
1458
+ metadataMap[key],
1459
+ 'md',
1460
+ columnsToPrint
1461
+ )
1455
1462
  );
1456
1463
  }
1457
1464
  }
@@ -388,7 +388,6 @@ class DataExtensionField extends MetadataType {
388
388
  try {
389
389
  // ! we really do need to delete from DataExtension not DataExtensionField here!
390
390
  await this.client.soap.delete('DataExtension', keyObj, null);
391
-
392
391
  if (!fieldId) {
393
392
  Util.logger.info(
394
393
  ` - deleted ${this.definition.type}: ${item.deKey}.${item.fieldName}`
@@ -397,9 +396,11 @@ class DataExtensionField extends MetadataType {
397
396
  fieldDeletedFromDEKeys.push(item.deKey);
398
397
  // return true;
399
398
  } catch (ex) {
400
- const errorMsg = ex.results?.length
399
+ const errorMsg = ex?.results?.length
401
400
  ? `${ex.results[0].StatusMessage} (Code ${ex.results[0].ErrorCode})`
402
- : ex.message;
401
+ : ex?.json?.Results?.length
402
+ ? `${ex.json.Results[0].StatusMessage} (Code ${ex.json.Results[0].ErrorCode})`
403
+ : ex.message;
403
404
  Util.logger.error(
404
405
  `- error deleting ${this.definition.type} ${item.deKey}.${item.fieldName}: ${errorMsg}`
405
406
  );
@@ -714,7 +714,7 @@ class Folder extends MetadataType {
714
714
  ),
715
715
  options
716
716
  );
717
- return response.Results;
717
+ return response.Results ?? [];
718
718
  }
719
719
 
720
720
  /**
@@ -1884,6 +1884,13 @@ class Journey extends MetadataType {
1884
1884
  // nothing to do. skip here to avoid unnecessary logs / api calls
1885
1885
  return;
1886
1886
  }
1887
+ // override the response from update by createdDate from cache (the date from update-response is incorrect)
1888
+ for (const [key, journey] of Object.entries(upsertResults)) {
1889
+ const cachedJourney = cache.getByKey(this.definition.type, key);
1890
+ if (cachedJourney) {
1891
+ journey.createdDate = cachedJourney.createdDate;
1892
+ }
1893
+ }
1887
1894
  let postDeployFlags = 0;
1888
1895
  if (Util.OPTIONS.publish) {
1889
1896
  postDeployFlags++;
@@ -2554,9 +2561,12 @@ class Journey extends MetadataType {
2554
2561
  break;
2555
2562
  }
2556
2563
  default: {
2557
- throw new Error(
2558
- `${this.definition.type} type ${journey.definitionType} not supported yet by validate method`
2564
+ Util.logger.info(
2565
+ Util.getGrayMsg(
2566
+ ` ☇ skipping ${this.definition.type} ${key}: type ${journey.definitionType} not supported yet by validate method`
2567
+ )
2559
2568
  );
2569
+ continue;
2560
2570
  }
2561
2571
  }
2562
2572
  } // for loop
@@ -2080,6 +2080,12 @@ class MetadataType {
2080
2080
  subtypeExtension,
2081
2081
  templateVariables
2082
2082
  );
2083
+ if (!savedResults[originalKey]) {
2084
+ // happens in case like-filter struck
2085
+ delete savedResults[originalKey];
2086
+ filterCounter++;
2087
+ continue;
2088
+ }
2083
2089
  } catch (ex) {
2084
2090
  Util.logger.debug(JSON.stringify(savedResults[originalKey]));
2085
2091
  Util.logger.errorStack(
@@ -2126,7 +2132,7 @@ class MetadataType {
2126
2132
  // normalize results[metadataEntry]
2127
2133
  results[originalKey] = postRetrieveData.json;
2128
2134
 
2129
- if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
2135
+ if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey], this.definition)) {
2130
2136
  Util.logger.debug(`Filtered ${originalKey} because of --like option`);
2131
2137
  return;
2132
2138
  }
@@ -2161,7 +2167,7 @@ class MetadataType {
2161
2167
  templateVariables
2162
2168
  );
2163
2169
  }
2164
- if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
2170
+ if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey], this.definition)) {
2165
2171
  Util.logger.debug(`Filtered ${originalKey} because of --like option`);
2166
2172
  return;
2167
2173
  }