From aa9384ead9596a186f7bc8380efaceeafc213e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Berkefeld?= Date: Tue, 7 Jan 2025 14:17:01 +0100 Subject: [PATCH] #1859: refactoring --- @types/lib/metadataTypes/DataExtract.d.ts.map | 2 +- @types/lib/metadataTypes/SendClassification.d.ts | 7 +++++++ @types/lib/metadataTypes/SendClassification.d.ts.map | 2 +- lib/metadataTypes/DataExtract.js | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/@types/lib/metadataTypes/DataExtract.d.ts.map b/@types/lib/metadataTypes/DataExtract.d.ts.map index 40d9c0b35..608794978 100644 --- a/@types/lib/metadataTypes/DataExtract.d.ts.map +++ b/@types/lib/metadataTypes/DataExtract.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataExtract.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtract.js"],"names":[],"mappings":";uBAQa,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;;;;;;;;;OASG;IACH,6BANW,MAAM,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CAIxC;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE,kBAAkB,CAAC,CAIxC;IAED;;;;;;;OAOG;IACH,uCALW,MAAM,QACN,MAAM,qBACN,WAAW,GACT,OAAO,CAAE,mBAAmB,CAAC,CA4CzC;IAED;;;;;OAKG;IACH,2BAHW,gBAAgB,gBAK1B;IAED;;;;;OAKG;IACH,2BAHW,gBAAgB,gBAQ1B;IAED;;;;;OAKG;IACH,gCAHW,gBAAgB,GACd,gBAAgB,CAW5B;IACD;;;;;OAKG;IACH,sCAHW,eAAe,GACb,OAAO,CAAE,IAAI,CAAC,CAY1B;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,gBAAgB,CA8C5B;IAED;;;;;;OAMG;IACH,6CASC;CAiBJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAjPwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"DataExtract.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtract.js"],"names":[],"mappings":";uBAQa,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;;;;;;;;;OASG;IACH,6BANW,MAAM,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CAIxC;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE,kBAAkB,CAAC,CAIxC;IAED;;;;;;;OAOG;IACH,uCALW,MAAM,QACN,MAAM,qBACN,WAAW,GACT,OAAO,CAAE,mBAAmB,CAAC,CA4CzC;IAED;;;;;OAKG;IACH,2BAHW,gBAAgB,gBAK1B;IAED;;;;;OAKG;IACH,2BAHW,gBAAgB,gBAQ1B;IAED;;;;;OAKG;IACH,gCAHW,gBAAgB,GACd,gBAAgB,CAW5B;IAED;;;;;OAKG;IACH,sCAHW,eAAe,GACb,OAAO,CAAE,IAAI,CAAC,CAc1B;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,gBAAgB,CA8C5B;IAED;;;;;;OAMG;IACH,6CASC;CAiBJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBApPwB,mBAAmB"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/SendClassification.d.ts b/@types/lib/metadataTypes/SendClassification.d.ts index f91278750..20c58c504 100644 --- a/@types/lib/metadataTypes/SendClassification.d.ts +++ b/@types/lib/metadataTypes/SendClassification.d.ts @@ -64,6 +64,13 @@ declare class SendClassification extends MetadataType { * @returns {Promise.} Promise */ static preDeployTasks(metadata: MetadataTypeItem): Promise; + /** + * Gets executed after deployment of metadata type + * + * @param {MetadataTypeMap} upsertResults metadata mapped by their keyField as returned by update/create + * @returns {Promise.} - + */ + static postDeployTasks(upsertResults: MetadataTypeMap): Promise; /** * manages post retrieve steps * diff --git a/@types/lib/metadataTypes/SendClassification.d.ts.map b/@types/lib/metadataTypes/SendClassification.d.ts.map index 2c5918396..82ed3d8b0 100644 --- a/@types/lib/metadataTypes/SendClassification.d.ts.map +++ b/@types/lib/metadataTypes/SendClassification.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SendClassification.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/SendClassification.js"],"names":[],"mappings":";uBAOa,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,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CAexC;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE,kBAAkB,CAAC,CAWxC;IAED;;;;;OAKG;IACH,4BAHW,gBAAgB,gBAK1B;IAED;;;;;OAKG;IACH,4BAHW,gBAAgB,gBAK1B;IAYD;;;;;OAKG;IACH,gCAHW,gBAAgB,GACd,OAAO,CAAE,gBAAgB,CAAC,CAgCtC;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,gBAAgB,CAqC5B;IAED;;;;OAIG;IACH,gDAFW,gBAAgB,QAW1B;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA7LwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"SendClassification.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/SendClassification.js"],"names":[],"mappings":";uBAOa,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,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CAexC;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE,kBAAkB,CAAC,CAWxC;IAED;;;;;OAKG;IACH,4BAHW,gBAAgB,gBAK1B;IAED;;;;;OAKG;IACH,4BAHW,gBAAgB,gBAK1B;IAYD;;;;;OAKG;IACH,gCAHW,gBAAgB,GACd,OAAO,CAAE,gBAAgB,CAAC,CAgCtC;IAED;;;;;OAKG;IACH,sCAHW,eAAe,GACb,OAAO,CAAE,IAAI,CAAC,CAc1B;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,gBAAgB,CAqC5B;IAED;;;;OAIG;IACH,gDAFW,gBAAgB,QAW1B;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAjNwB,mBAAmB"} \ No newline at end of file diff --git a/lib/metadataTypes/DataExtract.js b/lib/metadataTypes/DataExtract.js index 4fe95f594..d55289603 100644 --- a/lib/metadataTypes/DataExtract.js +++ b/lib/metadataTypes/DataExtract.js @@ -138,6 +138,7 @@ class DataExtract extends MetadataType { delete metadata.r__dataExtractType_name; return metadata; } + /** * Gets executed after deployment of metadata type * @@ -146,7 +147,9 @@ class DataExtract extends MetadataType { */ static async postDeployTasks(upsertResults) { // re-retrieve all upserted items to ensure we have all fields (createdDate and modifiedDate are otherwise not present) - Util.logger.debug('Retrieving all dataExtracts post-deploy to ensure we have all fields'); + Util.logger.debug( + `Caching all ${this.definition.type} post-deploy to ensure we have all fields` + ); const typeCache = await this.retrieveForCache(); // update values in upsertResults with retrieved values before saving to disk for (const key of Object.keys(upsertResults)) {