diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index 980729c45..3bb46f4fe 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,3 +1,3 @@ -enhancement: ['feature/*', 'feat/*'] -bug: ['bugfix/*', 'bug/*', 'fix/*', 'hotfix/*'] -chore: ['chore/*', 'task/*'] +enhancement: ['feature/*', 'feat/*', 'copilot/feature/*'] +bug: ['bugfix/*', 'bug/*', 'fix/*', 'hotfix/*', 'copilot/bug/*'] +chore: ['chore/*', 'task/*', 'copilot/task/*'] diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 0b79c3008..bde1905e4 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,8 +8,8 @@ on: types: [published] permissions: - id-token: write # Required for OIDC - contents: read + id-token: write # Required for OIDC + contents: read jobs: build: @@ -34,3 +34,52 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm publish + - name: Close release milestone if empty + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + RELEASE_TAG: ${{ github.event.release.tag_name }} + run: | + set -euo pipefail + + owner="${REPO%%/*}" + repo="${REPO##*/}" + + milestone_title="${RELEASE_TAG#v}" + + if [ -z "${milestone_title}" ]; then + echo "Could not parse milestone version from release tag (tag=${RELEASE_TAG})." + exit 0 + fi + + milestones_json="$(gh api "repos/${owner}/${repo}/milestones?state=open&per_page=100")" + + milestone_number="$(echo "$milestones_json" | jq -r \ + --arg milestone_title "$milestone_title" \ + '.[] | select(.title == $milestone_title) | .number' \ + | head -n1)" + + if [ -z "${milestone_number}" ] || [ "${milestone_number}" = "null" ]; then + echo "No matching open milestone found for parsed version '${milestone_title}'." + exit 0 + fi + + milestone="$(gh api "repos/${owner}/${repo}/milestones/${milestone_number}")" + state="$(echo "$milestone" | jq -r '.state')" + open_issues="$(echo "$milestone" | jq -r '.open_issues')" + title="$(echo "$milestone" | jq -r '.title')" + + echo "Matched milestone #${milestone_number} '${title}' (state=${state}, open_issues=${open_issues})." + + if [ "$state" != "open" ]; then + echo "Milestone is already closed. Nothing to do." + exit 0 + fi + + if [ "$open_issues" -ne 0 ]; then + echo "Milestone has open items. Skipping close." + exit 0 + fi + + gh api -X PATCH "repos/${owner}/${repo}/milestones/${milestone_number}" -f state="closed" >/dev/null + echo "Milestone #${milestone_number} closed." diff --git a/.github/workflows/sync-milestone.yml b/.github/workflows/sync-milestone.yml new file mode 100644 index 000000000..947758af5 --- /dev/null +++ b/.github/workflows/sync-milestone.yml @@ -0,0 +1,55 @@ +name: Sync Milestone from Issue +on: + pull_request: + types: [opened, edited, reopened] + +jobs: + sync-milestone: + runs-on: ubuntu-latest + permissions: + issues: read + pull-requests: write + steps: + - name: Sync Milestone + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + OWNER: ${{ github.repository_owner }} + run: | + # 1. Get the milestone of the officially linked issues and the PR's current milestone via GraphQL + # This catches issues linked via "Fixes #123" and similar in the body or the UI sidebar. + API_RESPONSE=$(gh api graphql -f query=' + query($owner: String!, $name: String!, $pr: Int!) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pr) { + milestone { + number + } + closingIssuesReferences(first: 1) { + nodes { + milestone { + number + title + } + } + } + } + } + }' -F owner="$OWNER" -F name="${REPO#*/}" -F pr=$PR_NUMBER) + + MILESTONE_NUMBER=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.closingIssuesReferences.nodes[0].milestone.number // "null"') + MILESTONE_TITLE=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.closingIssuesReferences.nodes[0].milestone.title // "null"') + CURRENT_PR_MILESTONE=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.milestone.number // "null"') + + # 2. Check if a milestone was found + if [ "$MILESTONE_NUMBER" != "null" ] && [ -n "$MILESTONE_NUMBER" ]; then + if [ "$MILESTONE_NUMBER" = "$CURRENT_PR_MILESTONE" ]; then + echo "PR already has milestone '$MILESTONE_TITLE' set. No update needed." + else + echo "Found milestone '$MILESTONE_TITLE' from linked issue. Assigning to PR..." + gh pr edit $PR_NUMBER --milestone "$MILESTONE_TITLE" --repo "$REPO" + fi + else + echo "No milestone found on linked issues or no issues linked." + fi diff --git a/.husky/post-checkout b/.husky/post-checkout index b1ebc3d06..b12a3dc35 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -1,7 +1,7 @@ #!/bin/sh # ### git commit message template ### git config commit.template .git/templatemessage -TICKETID=`git rev-parse --abbrev-ref HEAD | LC_ALL=en_US.utf8 grep -oP '^((feature|bug|bugfix|fix|hotfix|task|chore)\/)?\K\d{1,7}' || true` +TICKETID=`git rev-parse --abbrev-ref HEAD | LC_ALL=en_US.utf8 grep -oP '^((copilot\/)?(feature|bug|bugfix|fix|hotfix|task|chore)\/)?\K\d{1,7}' || true` if [ -z "$TICKETID" ] then TICKETID="0" diff --git a/@types/lib/Retriever.d.ts.map b/@types/lib/Retriever.d.ts.map index f176853fa..7da2a9f15 100644 --- a/@types/lib/Retriever.d.ts.map +++ b/@types/lib/Retriever.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Retriever.d.ts","sourceRoot":"","sources":["../../lib/Retriever.js"],"names":[],"mappings":";uBAUa,OAAO,qBAAqB,EAAE,QAAQ;0BACtC,OAAO,qBAAqB,EAAE,WAAW;8BACzC,OAAO,qBAAqB,EAAE,eAAe;sBAC7C,OAAO,qBAAqB,EAAE,OAAO;+BACrC,OAAO,qBAAqB,EAAE,gBAAgB;mCAC9C,OAAO,qBAAqB,EAAE,oBAAoB;kCAClD,OAAO,qBAAqB,EAAE,mBAAmB;8BACjD,OAAO,qBAAqB,EAAE,eAAe;iCAC7C,OAAO,qBAAqB,EAAE,kBAAkB;oCAChD,OAAO,qBAAqB,EAAE,qBAAqB;mCACnD,OAAO,qBAAqB,EAAE,oBAAoB;gCAClD,OAAO,qBAAqB,EAAE,iBAAiB;0BAC/C,OAAO,qBAAqB,EAAE,WAAW;2BACzC,OAAO,qBAAqB,EAAE,YAAY;AAdvD;;;;;;;;;;;;;;;GAeG;AAEH;;GAEG;AACH;IACI;;;;;OAKG;IACH,wBAHW,OAAO,YACP,QAAQ,EAYlB;IATG,iDAAwB;IACxB,kDAA4B;IAC5B,oBAAkD;IAClD,oBAAkD;IAClD,iBAIE;IAGN;;;;;;;;OAQG;IACH,wBANW,MAAM,EAAE,gBACR,MAAM,EAAE,GAAG,YAAY,sBACvB,WAAW,kBACX,OAAO,GACL,OAAO,CAAE,qBAAqB,CAAC,CAmK3C;IAED;;;;;OAKG;IACH,oCAHW,MAAM,EAAE,GACN,MAAM,EAAE,CAepB;CACJ"} \ No newline at end of file +{"version":3,"file":"Retriever.d.ts","sourceRoot":"","sources":["../../lib/Retriever.js"],"names":[],"mappings":";uBAUa,OAAO,qBAAqB,EAAE,QAAQ;0BACtC,OAAO,qBAAqB,EAAE,WAAW;8BACzC,OAAO,qBAAqB,EAAE,eAAe;sBAC7C,OAAO,qBAAqB,EAAE,OAAO;+BACrC,OAAO,qBAAqB,EAAE,gBAAgB;mCAC9C,OAAO,qBAAqB,EAAE,oBAAoB;kCAClD,OAAO,qBAAqB,EAAE,mBAAmB;8BACjD,OAAO,qBAAqB,EAAE,eAAe;iCAC7C,OAAO,qBAAqB,EAAE,kBAAkB;oCAChD,OAAO,qBAAqB,EAAE,qBAAqB;mCACnD,OAAO,qBAAqB,EAAE,oBAAoB;gCAClD,OAAO,qBAAqB,EAAE,iBAAiB;0BAC/C,OAAO,qBAAqB,EAAE,WAAW;2BACzC,OAAO,qBAAqB,EAAE,YAAY;AAdvD;;;;;;;;;;;;;;;GAeG;AAEH;;GAEG;AACH;IACI;;;;;OAKG;IACH,wBAHW,OAAO,YACP,QAAQ,EAYlB;IATG,iDAAwB;IACxB,kDAA4B;IAC5B,oBAAkD;IAClD,oBAAkD;IAClD,iBAIE;IAGN;;;;;;;;OAQG;IACH,wBANW,MAAM,EAAE,gBACR,MAAM,EAAE,GAAG,YAAY,sBACvB,WAAW,kBACX,OAAO,GACL,OAAO,CAAE,qBAAqB,CAAC,CAoK3C;IAED;;;;;OAKG;IACH,oCAHW,MAAM,EAAE,GACN,MAAM,EAAE,CAepB;CACJ"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/DataExtension.d.ts b/@types/lib/metadataTypes/DataExtension.d.ts index 62969af95..dd6817b36 100644 --- a/@types/lib/metadataTypes/DataExtension.d.ts +++ b/@types/lib/metadataTypes/DataExtension.d.ts @@ -5,6 +5,7 @@ export type MetadataTypeItemDiff = import("../../types/mcdev.d.js").MetadataType export type MetadataTypeMap = import("../../types/mcdev.d.js").MetadataTypeMap; export type SoapRequestParams = import("../../types/mcdev.d.js").SoapRequestParams; export type TemplateMap = import("../../types/mcdev.d.js").TemplateMap; +export type TypeKeyCombo = import("../../types/mcdev.d.js").TypeKeyCombo; export type DataExtensionFieldItem = import("../../types/mcdev.d.js").DataExtensionFieldItem; export type DataExtensionFieldMap = import("../../types/mcdev.d.js").DataExtensionFieldMap; export type DataExtensionItem = import("../../types/mcdev.d.js").DataExtensionItem; @@ -16,6 +17,7 @@ export type DataExtensionMap = import("../../types/mcdev.d.js").DataExtensionMap * @typedef {import('../../types/mcdev.d.js').MetadataTypeMap} MetadataTypeMap * @typedef {import('../../types/mcdev.d.js').SoapRequestParams} SoapRequestParams * @typedef {import('../../types/mcdev.d.js').TemplateMap} TemplateMap + * @typedef {import('../../types/mcdev.d.js').TypeKeyCombo} TypeKeyCombo */ /** * @typedef {import('../../types/mcdev.d.js').DataExtensionFieldItem} DataExtensionFieldItem diff --git a/@types/lib/metadataTypes/DataExtension.d.ts.map b/@types/lib/metadataTypes/DataExtension.d.ts.map index 5b63fb471..b16bceaf8 100644 --- a/@types/lib/metadataTypes/DataExtension.d.ts.map +++ b/@types/lib/metadataTypes/DataExtension.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataExtension.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtension.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ED;;;;;OAKG;IACH,gCAHW,iBAAiB,GACf,OAAO,CAAE,iBAAiB,CAAC,CAiIvC;IAED;;;;;;;;OAQG;IACH,gCA2CC;IAED;;;;;;;;;OASG;IACH,8BAqEC;IAED;;;;;;;;;;;OAWG;IACH,yBAgCC;IAED;;;;;OAKG;IACH,8BAHW,gBAAgB,GACd,OAAO,CAAE,GAAG,CAAC,CAiFzB;IAYD;;;;;OAKG;IACH,oCAHW,MAAM,GACJ,OAAO,CAAE,IAAI,CAAC,CAM1B;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE;QAAC,QAAQ,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAIhE;IAED;;;;;;;;OAQG;IACH,uCALW,MAAM,QACN,MAAM,qBACN,WAAW,GACT,OAAO,CAAE;QAAC,QAAQ,EAAE,iBAAiB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAiDjE;IA6DD;;;;;;;OAOG;IACH,4BAWC;CAgHJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAjtDwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"DataExtension.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtension.js"],"names":[],"mappings":";uBAea,OAAO,wBAAwB,EAAE,QAAQ;+BACzC,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;8BACrD,OAAO,wBAAwB,EAAE,eAAe;gCAChD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OA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,yBAgCC;IAED;;;;;OAKG;IACH,8BAHW,gBAAgB,GACd,OAAO,CAAE,GAAG,CAAC,CAiFzB;IAYD;;;;;OAKG;IACH,oCAHW,MAAM,GACJ,OAAO,CAAE,IAAI,CAAC,CAM1B;IAED;;;;OAIG;IACH,2BAFa,OAAO,CAAE;QAAC,QAAQ,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAIhE;IAED;;;;;;;;OAQG;IACH,uCALW,MAAM,QACN,MAAM,qBACN,WAAW,GACT,OAAO,CAAE;QAAC,QAAQ,EAAE,iBAAiB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAiDjE;IA6DD;;;;;;;OAOG;IACH,4BAWC;CAyKJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA5wDwB,mBAAmB"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/DataExtensionField.d.ts b/@types/lib/metadataTypes/DataExtensionField.d.ts index 56f41aad3..5e8f8faf3 100644 --- a/@types/lib/metadataTypes/DataExtensionField.d.ts +++ b/@types/lib/metadataTypes/DataExtensionField.d.ts @@ -58,6 +58,29 @@ declare class DataExtensionField extends MetadataType { * @returns {Promise.} Promise of items */ static retrieveFieldsForSingleDe(customerKey: string): Promise; + /** + * determines if a dataExtension is shared (from parent BU) by checking its folder's ContentType in the parent BU folder cache + * + * @param {string} customerKey external key of single DE + * @returns {boolean} true if the DE is shared (stored on parent BU) + */ + static isSharedDe(customerKey: string): boolean; + /** + * helps retrieving fields for a single DE from parent BU. + * Use when the DE is shared (stored on parent BU) and its fields are not in the current BU's cache. + * + * @param {string} customerKey external key of single DE + * @returns {Promise.} Promise of items + */ + static retrieveFieldsForSingleSharedDe(customerKey: string): Promise; + /** + * Routes field retrieval to the correct method depending on whether the DE is local or shared. + * Use this instead of duplicating the isSharedDe() check at each call site. + * + * @param {string} customerKey external key of single DE + * @returns {Promise.} Promise of items + */ + static retrieveFieldsForSingleDeAuto(customerKey: string): Promise; /** * Retrieves all records for caching * @@ -110,6 +133,8 @@ declare class DataExtensionField extends MetadataType { static deleteByKeySOAP(customerKey: string, fieldId?: string): Promise; } declare namespace DataExtensionField { + let buObject: import("../../types/mcdev.d.js").BuObject; + let client: import("sfmc-sdk").default; let definition: { bodyIteratorField: string; dependencies: string[]; diff --git a/@types/lib/metadataTypes/DataExtensionField.d.ts.map b/@types/lib/metadataTypes/DataExtensionField.d.ts.map index 4f7cac940..313744f9b 100644 --- a/@types/lib/metadataTypes/DataExtensionField.d.ts.map +++ b/@types/lib/metadataTypes/DataExtensionField.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataExtensionField.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtensionField.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;oCAI5C,OAAO,wBAAwB,EAAE,qBAAqB;qCACtD,OAAO,wBAAwB,EAAE,sBAAsB;AAfpE;;;;;;;;;;;GAWG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;IACI,6BAAwB;IAExB;;;;;;OAMG;IACH,6BAJW,MAAM,qBACN,MAAM,EAAE,GACN,OAAO,CAAE;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAIrE;IACD;;;;OAIG;IACH,2BAFa,OAAO,CAAE,kBAAkB,CAAC,CAQxC;IACD;;;;;OAKG;IACH,8CAHW,MAAM,GACJ,OAAO,CAAE,MAAM,CAAC,CAgB5B;IAED;;;;;;OAMG;IACH,0CAJW,iBAAiB,qBACjB,MAAM,EAAE,GACN,OAAO,CAAE;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAUrE;IAED;;;;;OAKG;IACH,uCAHW,qBAAqB,GACnB,sBAAsB,EAAE,CASpC;IAED;;;;;;OAMG;IACH,uBAJW,sBAAsB,KACtB,sBAAsB,GACpB,MAAM,CAIlB;IAED;;;;;OAKG;IACH,qCAHW,sBAAsB,GACpB,sBAAsB,CAelC;IAED;;;;;;;OAOG;IACH,mDAJW,sBAAsB,EAAE,SACxB,MAAM,GACJ,OAAO,CAAE,qBAAqB,CAAC,CAgK3C;IAYD;;;;;;OAMG;IACH,oCAJW,MAAM,YACN,MAAM,GACJ,OAAO,CAAE,OAAO,CAAC,CAwH7B;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA3bwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"DataExtensionField.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/DataExtensionField.js"],"names":[],"mappings":";uBASa,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;m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E,SACxB,MAAM,GACJ,OAAO,CAAE,qBAAqB,CAAC,CAwL3C;IAYD;;;;;;OAMG;IACH,oCAJW,MAAM,YACN,MAAM,GACJ,OAAO,CAAE,OAAO,CAAC,CAwH7B;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA7iBwB,mBAAmB"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/Filter.d.ts b/@types/lib/metadataTypes/Filter.d.ts index fd703fa1c..67c923dd1 100644 --- a/@types/lib/metadataTypes/Filter.d.ts +++ b/@types/lib/metadataTypes/Filter.d.ts @@ -115,7 +115,7 @@ declare namespace Filter { bodyIteratorField: string; dependencies: string[]; dependencyGraph: { - filterDefinition: string[]; + dataFilter: string[]; dataExtension: string[]; }; hasExtended: boolean; diff --git a/@types/lib/metadataTypes/Journey.d.ts.map b/@types/lib/metadataTypes/Journey.d.ts.map index 74345e9c7..50a7a186b 100644 --- a/@types/lib/metadataTypes/Journey.d.ts.map +++ b/@types/lib/metadataTypes/Journey.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Journey.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Journey.js"],"names":[],"mappings":";uBAgBa,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;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;AAX1D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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAtxGwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"Journey.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Journey.js"],"names":[],"mappings":";uBAgBa,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;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;AAX1D;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACI;;;;;;;;OAQG;IACH,6BANW,MAAM,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CA0LxC;IA6JD;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAS1B;IAED;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAK1B;IAmBD;;;;OAIG;IACH,2CAFW,eAAe,iBAmBzB;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,OAAO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BAAmB"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/MetadataType.d.ts b/@types/lib/metadataTypes/MetadataType.d.ts index c8c3fa4d1..9549007f0 100644 --- a/@types/lib/metadataTypes/MetadataType.d.ts +++ b/@types/lib/metadataTypes/MetadataType.d.ts @@ -748,6 +748,16 @@ declare class MetadataType { * @param {TypeKeyCombo} dependentTypeKeyCombo list started in this.getDependentTypes */ static getDependentFilesExtra(metadataItem: object, dependentTypeKeyCombo: TypeKeyCombo): void; + /** + * Hook called when dependency keys were not found in the primary retrieve folder. + * Override in subtypes to show type-specific warnings (e.g. shared/synchronized dataExtensions). + * Keys returned by this method still receive the generic "not found" warning. + * Used by {@link MetadataType.getDependentFiles}. + * + * @param {string[]} notFound keys that could not be found in the retrieve folder + * @returns {Promise.} keys that should still trigger the default "not found" warning + */ + static handleNotFoundDependencies(notFound: string[]): Promise; /** * helper for {@link MetadataType.getDependentFiles} * diff --git a/@types/lib/metadataTypes/MetadataType.d.ts.map b/@types/lib/metadataTypes/MetadataType.d.ts.map index f246f1e83..bcab33ecc 100644 --- a/@types/lib/metadataTypes/MetadataType.d.ts.map +++ b/@types/lib/metadataTypes/MetadataType.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MetadataType.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/MetadataType.js"],"names":[],"mappings":";uBAmBa,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;sBAChD,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;gCACtD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAA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;;;;OAOG;IACH,0BALW,UAAU,GAAC,iBAAiB,GAAC,QAAQ,gBACrC,gBAAgB,GAAG,eAAe,aAClC,MAAM,GACJ,OAAO,CAAE,gBAAgB,GAAG,eAAe,CAAC,CAsHxD;CACJ;;;;;;;;;;;;gBAaS,GAAG;oBAIH,OAAO;iBAIP,MAAM;kBAIN,QAAQ"} \ No newline at end of file +{"version":3,"file":"MetadataType.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/MetadataType.js"],"names":[],"mappings":";uBAmBa,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;sBAChD,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;gCACtD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;2BAC5C,OAAO,wBAAwB,EAAE,YAAY;kBAC7C,OAAO,UAAU,EAAE,OAAO;uBAC1B,OAAO,wBAAwB,EAAE,QAAQ;wBACzC,OAAO,wBAAwB,EAAE,SAAS;wBAC1C,OAAO,wBAAwB,EAAE,SAAS;0CAC1C,OAAO,wBAAwB,EAAE,2BAA2B;AAazE;;;;GAIG;AACH;IACI;;;;;;;OAOG;IACH,0BALW,MAAM,gBACN,OAAO,oBACP,MAAM,EAAE,GACN,OAAO,CAAE,eAAe,CAAC,CAoDrC;IAED;;;;;;OAMG;IACH,kDAJW,MAAM,EAAE,cACR,OAAO,GACL,MAAM,EAAE,CAkBpB;IAED;;;;;;;OAOG;IACH,2BALW,eAAe,aACf,MAAM,eACN,MAAM,GACJ,OAAO,CAAE,eAAe,CAAC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gBACN,OAAO,eACP,MAAM,GACJ,OAAO,CAAE,MAAM,CAAC,CAY5B;IAED;;;;;;OAMG;IACH,gCAHW,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAe9B;IAED;;;;;;;OAOG;IACH,iCANW,MAAM,EAAE,qBACR,YAAY,iBACZ,YAAY,gBACZ,OAAO,GACL,OAAO,CAAE,YAAY,CAAC,CA0HlC;IAED;;;;;OAKG;IACH,4CAHW,MAAM,yBACN,YAAY,QAE8C;IAErE;;;;;;;;OAQG;IACH,4CAHW,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAI9B;IAED;;;;;;;OAOG;IACH,2BALW,gBAAgB,aAChB,MAAM,iBACN,MAAM,GACJ,CAAC,MAAM,CAAC,EAAE,CAUtB;IAED;;;;;;;OAOG;IACH,iCALW,GAAG,kBACH,MAAM,EAAE,iBACR,MAAM,GACJ,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAkBjC;IAED;;;;OAIG;IACH,qCAHW,eAAe,GACb,MAAM,EAAE,CA2DpB;IAED;;;;;;;OAOG;IACH,4BALW,MAAM,gBACN,gBAAgB,gBAChB,MAAM,GACJ,MAAM,CAelB;IAED;;OAEG;IACH;;;;;OAKG;IAEH;;;;;;;OAOG;IACH,0BALW,UAAU,GAAC,iBAAiB,GAAC,QAAQ,gBACrC,gBAAgB,GAAG,eAAe,aAClC,MAAM,GACJ,OAAO,CAAE,gBAAgB,GAAG,eAAe,CAAC,CAsHxD;CACJ;;;;;;;;;;;;gBAaS,GAAG;oBAIH,OAAO;iBAIP,MAAM;kBAIN,QAAQ"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/definitions/Filter.definition.d.ts b/@types/lib/metadataTypes/definitions/Filter.definition.d.ts index 418557281..a5a5fbcd5 100644 --- a/@types/lib/metadataTypes/definitions/Filter.definition.d.ts +++ b/@types/lib/metadataTypes/definitions/Filter.definition.d.ts @@ -2,7 +2,7 @@ declare namespace _default { let bodyIteratorField: string; let dependencies: string[]; namespace dependencyGraph { - let filterDefinition: string[]; + let dataFilter: string[]; let dataExtension: string[]; } let hasExtended: boolean; diff --git a/@types/lib/util/cli.d.ts.map b/@types/lib/util/cli.d.ts.map index aaf9c99b5..b1b7bf979 100644 --- a/@types/lib/util/cli.d.ts.map +++ b/@types/lib/util/cli.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../lib/util/cli.js"],"names":[],"mappings":";yBAca,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;0BAC7C,OAAO,wBAAwB,EAAE,WAAW;;IAQrD;;;;;OAKG;IACH,4BAFa,OAAO,CAAE,MAAM,GAAG,OAAO,CAAC,CAUtC;IAED;;;;;OAKG;IACH,wCAHW,OAAO,GACL,OAAO,CAAE,OAAO,GAAG,MAAM,CAAC,CAkBtC;IAED;;;;OAIG;IACH,+CAHW,MAAM,EAAE,GACN,OAAO,CAAE,OAAO,CAAC,CA0B7B;IAED;;;;;OAKG;IACH,4CAHW,OAAO,GACL,IAAI,CAShB;IAED;;;;;;;;OAQG;IACH,sCALW,OAAO,YACP,MAAM,eACN,OAAO,GACL,OAAO,CAAE,MAAM,GAAG,OAAO,CAAC,CAUtC;IAED;;;;;;;;OAQG;IACH,yCANW,OAAO,UACP,MAAM,qBACN,OAAO,GAAG,MAAM,aAChB,OAAO,GACL,OAAO,CAAE,QAAQ,CAAC,CAuE9B;IAED;;;;;;;;OAQG;IACH,+BANW,OAAO,eACP,MAAM,qBACN,OAAO,aACP,OAAO,GACL,OAAO,CAAE;QAAC,YAAY,EAAC,MAAM,CAAC;QAAC,UAAU,EAAC,MAAM,CAAA;KAAC,CAAC,CA8D9D;IAED;;;;;;;OAOG;IACH,oCALW,OAAO,aACP,MAAM,eACN,OAAO,GACL,OAAO,CAAE,OAAO,GAAG,MAAM,CAAC,CA+DtC;IAED;;;;;;OAMG;IACH,qCAJW,OAAO,aACP,MAAM,GACJ,OAAO,CAAE,MAAM,CAAC,CAwE5B;IAED;;;;;;OAMG;IACH,iCAJW,OAAO,gBACP,MAAM,EAAE,GACN,OAAO,CAAE,IAAI,CAAC,CAgG1B;IAED;;;;OAIG;IACH,yBAFa,WAAW,EAAE,CA0GzB"} \ No newline at end of file +{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../lib/util/cli.js"],"names":[],"mappings":";yBAca,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,w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js b/lib/Retriever.js index 0cab0ec5c..26ec6b3bd 100644 --- a/lib/Retriever.js +++ b/lib/Retriever.js @@ -144,9 +144,10 @@ class Retriever { ) ) { // some types exist locally and shared from other BUs (parent and siblings). those need to be put into the cache or else we wont find them when looking for dependencies + // note: retrieveSharedForCache() returns a plain metadata map, not a {metadata: ...} wrapper const cacheSharedResult = await MetadataTypeInfo[type].retrieveSharedForCache(); - cache.mergeMetadata(type, cacheSharedResult.metadata); + cache.mergeMetadata(type, cacheSharedResult); } Util.logger.info( `Retrieving: ${type}` + diff --git a/lib/index.js b/lib/index.js index 859f3cd1b..f663b71fd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1004,12 +1004,12 @@ class Mcdev { `Found ${additionalAssetDependencies.length - initialAssetNumber} additional assets linked via ContentBlockByX.` ); } - // reset cache in case this is used progammatically somehow - Asset.getJsonFromFSCache = null; // remove duplicates in main object after adding dependencies typeKeyList[depType] = [...new Set(typeKeyList[depType])]; } + // reset cache regardless of whether assets were found, to avoid stale data in programmatic use + MetadataTypeInfo['asset'].getJsonFromFSCache = null; return typeKeyList; } diff --git a/lib/metadataTypes/DataExtension.js b/lib/metadataTypes/DataExtension.js index ee4efe0e5..60d5d8ddf 100644 --- a/lib/metadataTypes/DataExtension.js +++ b/lib/metadataTypes/DataExtension.js @@ -19,6 +19,7 @@ import { checkbox } from '@inquirer/prompts'; * @typedef {import('../../types/mcdev.d.js').MetadataTypeMap} MetadataTypeMap * @typedef {import('../../types/mcdev.d.js').SoapRequestParams} SoapRequestParams * @typedef {import('../../types/mcdev.d.js').TemplateMap} TemplateMap + * @typedef {import('../../types/mcdev.d.js').TypeKeyCombo} TypeKeyCombo */ /** @@ -176,6 +177,7 @@ class DataExtension extends MetadataType { // Modify columns for update call DataExtensionField.client = this.client; DataExtensionField.properties = this.properties; + DataExtensionField.buObject = this.buObject; DataExtension.oldFields ||= {}; DataExtension.oldFields[metadataMap[metadataKey][this.definition.keyField]] = await DataExtensionField.prepareDeployColumnsOnUpdate( @@ -1663,6 +1665,63 @@ class DataExtension extends MetadataType { return super.getFilesToCommit(keyArr); } } + /** + * Hook called when dependency keys were not found in the child BU retrieve folder. + * Checks the `_ParentBU_` folder for shared or synchronized dataExtensions and emits + * readable warnings. Does NOT add the found items to the deployment package. + * Only active when running on a child BU (eid !== mid). + * Used by {@link MetadataType.getDependentFiles}. + * + * @param {string[]} notFound keys that were not found in the child BU retrieve folder + * @returns {Promise.} keys that should still trigger the default "not found" warning + */ + static async handleNotFoundDependencies(notFound) { + // on parent BU, shared DE check is not applicable + if (this.buObject.eid === this.buObject.mid) { + return notFound; + } + const parentBUPath = File.normalizePath([ + this.properties.directories.retrieve, + this.buObject.credential, + Util.parentBuName, + this.definition.type, + ]); + const stillNotFound = []; + for (const key of notFound) { + const filePath = File.normalizePath([ + parentBUPath, + File.filterIllegalFilenames(key) + '.' + this.definition.type + '-meta.json', + ]); + let metadataItem; + try { + metadataItem = await File.readJson(filePath); + } catch { + stillNotFound.push(key); + continue; + } + const contentType = metadataItem.r__folder_ContentType; + if (contentType === 'shared_dataextension') { + Util.logger.warn( + `dataExtension '${key}' is a shared dataExtension stored in _ParentBU_. It cannot be included in the child BU deployment package.` + ); + Util.logger.warn( + `References to it may need to be changed during deployment via mcdev templating or manually. To update the shared dataExtension itself, run build for the parent BU and deploy it separately.` + ); + } else if (contentType === 'synchronizeddataextension') { + Util.logger.warn( + `dataExtension '${key}' is a synchronized dataExtension stored in _ParentBU_. It cannot be included in the child BU deployment package.` + ); + Util.logger.warn( + `The reference to it likely needs to be changed during deployment via mcdev templating or manually.` + ); + } else { + // regular dataExtension found on parent BU cannot be used from a child BU; treat as not found + stillNotFound.push(key); + } + } + return stillNotFound; + } + /** * helper for {@link MetadataType.createOrUpdate} * diff --git a/lib/metadataTypes/DataExtensionField.js b/lib/metadataTypes/DataExtensionField.js index 54fddbf5b..ae387ebf7 100644 --- a/lib/metadataTypes/DataExtensionField.js +++ b/lib/metadataTypes/DataExtensionField.js @@ -4,6 +4,7 @@ import MetadataType from './MetadataType.js'; import { Util } from '../util/util.js'; import DataExtension from './DataExtension.js'; import { confirm } from '@inquirer/prompts'; +import auth from '../util/auth.js'; /** * @typedef {import('../../types/mcdev.d.js').BuObject} BuObject @@ -75,6 +76,95 @@ class DataExtensionField extends MetadataType { }, {}); } + /** + * determines if a dataExtension is shared (from parent BU) by checking its folder's ContentType in the parent BU folder cache + * + * @param {string} customerKey external key of single DE + * @returns {boolean} true if the DE is shared (stored on parent BU) + */ + static isSharedDe(customerKey) { + if (this.buObject.eid === this.buObject.mid) { + // already on parent BU, no shared DEs possible + return false; + } + const categoryId = cache.getCache().dataExtension?.[customerKey]?.CategoryID; + if (!categoryId) { + return false; + } + try { + const contentType = cache.searchForField( + 'folder', + categoryId, + 'ID', + 'ContentType', + this.buObject.eid + ); + return MetadataTypeDefinitions.folder.folderTypesFromParent.includes(contentType); + } catch { + // folder not found in parent BU cache → local DE + return false; + } + } + + /** + * helps retrieving fields for a single DE from parent BU. + * Use when the DE is shared (stored on parent BU) and its fields are not in the current BU's cache. + * + * @param {string} customerKey external key of single DE + * @returns {Promise.} Promise of items + */ + static async retrieveFieldsForSingleSharedDe(customerKey) { + if (this.buObject.eid === this.buObject.mid) { + // already on parent BU, shared retrieval is not needed - all DEs are local here + Util.logger.debug( + `DataExtensionField.retrieveFieldsForSingleSharedDe: already on parent BU, skipping for ${customerKey}` + ); + return {}; + } + if (!this.properties.credentials[this.buObject.credential]) { + Util.logger.error( + `DataExtensionField.retrieveFieldsForSingleSharedDe: credential '${this.buObject.credential}' not found in properties` + ); + return {}; + } + const buObjectBak = this.buObject; + const clientBak = this.client; + /** @type {BuObject} */ + const buObjectParentBu = { + eid: this.properties.credentials[this.buObject.credential].eid, + mid: this.properties.credentials[this.buObject.credential].eid, + businessUnit: Util.parentBuName, + credential: this.buObject.credential, + }; + try { + this.buObject = buObjectParentBu; + this.client = auth.getSDK(buObjectParentBu); + } catch (ex) { + Util.logger.error(ex.message); + this.buObject = buObjectBak; + this.client = clientBak; + return {}; + } + const fields = await this.retrieveFieldsForSingleDe(customerKey); + // revert client to current default + this.buObject = buObjectBak; + this.client = clientBak; + return fields; + } + + /** + * Routes field retrieval to the correct method depending on whether the DE is local or shared. + * Use this instead of duplicating the isSharedDe() check at each call site. + * + * @param {string} customerKey external key of single DE + * @returns {Promise.} Promise of items + */ + static async retrieveFieldsForSingleDeAuto(customerKey) { + return this.isSharedDe(customerKey) + ? this.retrieveFieldsForSingleSharedDe(customerKey) + : this.retrieveFieldsForSingleDe(customerKey); + } + /** * Retrieves all records for caching * @@ -187,6 +277,10 @@ class DataExtensionField extends MetadataType { // make sure we stringify the name in case it looked numeric and then lowercase it for easy comparison as the server is comparing field names case-insensitive existingFieldByName[(fieldsObj[key].Name + '').toLowerCase()] = fieldsObj[key]; } + // capture field names from deploy payload before the loop modifies them (for renamed fields, the original name is used) + const deployColumnNames = new Set( + deployColumns.map((item) => (item.Name + '').toLowerCase()) + ); for (let i = deployColumns.length - 1; i >= 0; i--) { const item = deployColumns[i]; // make sure we stringify the name in case it looked numeric and then lowercase it for easy comparison as the server is comparing field names case-insensitive @@ -304,6 +398,26 @@ class DataExtensionField extends MetadataType { ) ); + // warn about fields that exist on the server but are not in the deploy payload + // these fields are NOT auto-deleted to prevent unintended data loss + const removedFieldNames = Object.values(existingFieldByName) + .filter((field) => !deployColumnNames.has((field.Name + '').toLowerCase())) + .map((field) => field.Name) + .toSorted(); + if (removedFieldNames.length > 0) { + Util.logger.warn( + ` - dataExtension ${deKey}: found ${removedFieldNames.length} field${removedFieldNames.length > 1 ? 's' : ''} on the server but not in the deploy payload. Fields cannot be auto-deleted due to potential data loss. To delete them, please run:` + ); + Util.logger.info( + Util.getGrayMsg( + `mcdev delete ${this.buObject.credential}/${this.buObject.businessUnit} -m ` + + removedFieldNames + .map((name) => `dataExtensionField:"${deKey}.${name}"`) + .join(' ') + ) + ); + } + return existingFieldByName; } diff --git a/lib/metadataTypes/Journey.js b/lib/metadataTypes/Journey.js index fc5aad77a..162afe332 100644 --- a/lib/metadataTypes/Journey.js +++ b/lib/metadataTypes/Journey.js @@ -1286,25 +1286,53 @@ class Journey extends MetadataType { metadata[this.definition.keyField] }) activity-key=${activity.key}: ${ex.message}` ); + continue; } // Don't replace the field Id with the name if DE CustomerKey was not found try { + DataExtensionField.buObject = this.buObject; + DataExtensionField.client = this.client; + DataExtensionField.properties = this.properties; + let alreadyFetchedDe = false; if (!cache.getCache().dataExtensionField) { + // no dataExtensionField cache yet: retrieve fields for this specific DE tempCachedFields = true; - DataExtensionField.buObject = this.buObject; - DataExtensionField.client = this.client; - DataExtensionField.properties = this.properties; - const fields = await DataExtensionField.retrieveFieldsForSingleDe( - contactField.r__dataExtension_key - ); + alreadyFetchedDe = true; + const fields = + await DataExtensionField.retrieveFieldsForSingleDeAuto( + contactField.r__dataExtension_key + ); cache.setMetadata('dataExtensionField', fields); } - contactField.r__dataExtensionField_name = cache.searchForField( - 'dataExtensionField', - contactField.field, - 'ObjectID', - 'Name' - ); + let fieldName; + try { + fieldName = cache.searchForField( + 'dataExtensionField', + contactField.field, + 'ObjectID', + 'Name' + ); + } catch (ex) { + if (alreadyFetchedDe) { + throw ex; + } + // field not in existing cache - retrieve fields for this specific DE + const fields = + await DataExtensionField.retrieveFieldsForSingleDeAuto( + contactField.r__dataExtension_key + ); + if (Object.keys(fields).length > 0) { + cache.mergeMetadata('dataExtensionField', fields); + } + // throws if still not found, handled by outer catch + fieldName = cache.searchForField( + 'dataExtensionField', + contactField.field, + 'ObjectID', + 'Name' + ); + } + contactField.r__dataExtensionField_name = fieldName; delete contactField.field; } catch (ex) { Util.logger.warn( @@ -1751,46 +1779,61 @@ class Journey extends MetadataType { activity?.arguments?.activityData?.updateContactFields ?? []; let tempCachedFields = false; for (const contactField of contactFields) { + if (!contactField.r__dataExtension_key) { + continue; + } + contactField.dataExtensionId = cache.searchForField( + 'dataExtension', + contactField.r__dataExtension_key, + 'CustomerKey', + 'ObjectID' + ); + if (!contactField.r__dataExtensionField_name) { + continue; + } + DataExtensionField.buObject = this.buObject; + DataExtensionField.client = this.client; + DataExtensionField.properties = this.properties; + let alreadyFetchedDe = false; + if (!cache.getCache().dataExtensionField) { + // no dataExtensionField cache yet: retrieve fields for this specific DE + tempCachedFields = true; + alreadyFetchedDe = true; + const fields = await DataExtensionField.retrieveFieldsForSingleDeAuto( + contactField.r__dataExtension_key + ); + cache.setMetadata('dataExtensionField', fields); + } + let fieldObjectId; try { - contactField.dataExtensionId = cache.searchForField( - 'dataExtension', - contactField.r__dataExtension_key, + fieldObjectId = cache.searchForField( + 'dataExtensionField', + `[${contactField.r__dataExtension_key}].[${contactField.r__dataExtensionField_name}]`, 'CustomerKey', 'ObjectID' ); } catch (ex) { - Util.logger.warn( - ` - ${this.definition.type} '${metadata[this.definition.nameField]}' (${ - metadata[this.definition.keyField] - }) activity-key=${activity.key}: ${ex.message}` + // field not in existing cache - retrieve fields for this specific DE + if (alreadyFetchedDe) { + throw ex; + } + const fields = await DataExtensionField.retrieveFieldsForSingleDeAuto( + contactField.r__dataExtension_key ); - } - try { - if (!cache.getCache().dataExtensionField) { - tempCachedFields = true; - DataExtensionField.buObject = this.buObject; - DataExtensionField.client = this.client; - DataExtensionField.properties = this.properties; - const fields = await DataExtensionField.retrieveFieldsForSingleDe( - contactField.r__dataExtension_key - ); - cache.setMetadata('dataExtensionField', fields); + if (Object.keys(fields).length > 0) { + cache.mergeMetadata('dataExtensionField', fields); } - contactField.field = cache.searchForField( + // throws if still not found, handled by outer catch + fieldObjectId = cache.searchForField( 'dataExtensionField', `[${contactField.r__dataExtension_key}].[${contactField.r__dataExtensionField_name}]`, 'CustomerKey', 'ObjectID' ); - delete contactField.r__dataExtensionField_name; - delete contactField.r__dataExtension_key; - } catch (ex) { - Util.logger.warn( - ` - ${this.definition.type} '${metadata[this.definition.nameField]}'(${ - metadata[this.definition.keyField] - }) activity - key=${activity.key}: ${ex.message} ` - ); } + contactField.field = fieldObjectId; + delete contactField.r__dataExtensionField_name; + delete contactField.r__dataExtension_key; } if (tempCachedFields) { // reset dataExtensionField caching to trigger re-caching diff --git a/lib/metadataTypes/MetadataType.js b/lib/metadataTypes/MetadataType.js index ff8c65d7c..e1e5e4dff 100644 --- a/lib/metadataTypes/MetadataType.js +++ b/lib/metadataTypes/MetadataType.js @@ -2785,14 +2785,17 @@ class MetadataType { (key) => !multiTypeKeyList[this.definition.type].includes(key) ); if (notFound && notFound.length) { - Util.logger.warn( - Util.getGrayMsg( - ` ☇ skipping ${this.definition.type} dependenc${notFound.length === 1 ? 'y' : 'ies'} ${notFound.join(', ')}: Not found on your in your project folder.` - ) - ); - // make sure we don't search for it twice - notFoundList[this.definition.type] ||= []; - notFoundList[this.definition.type].push(...notFound); + const remainingNotFound = await this.handleNotFoundDependencies(notFound); + if (remainingNotFound.length) { + Util.logger.warn( + Util.getGrayMsg( + ` ☇ skipping ${this.definition.type} dependenc${remainingNotFound.length === 1 ? 'y' : 'ies'} ${remainingNotFound.join(', ')}: Not found on your in your project folder.` + ) + ); + // make sure we don't search for it twice + notFoundList[this.definition.type] ||= []; + notFoundList[this.definition.type].push(...remainingNotFound); + } } return multiTypeKeyList; } @@ -2805,6 +2808,19 @@ class MetadataType { */ static getDependentFilesExtra(metadataItem, dependentTypeKeyCombo) {} + /** + * Hook called when dependency keys were not found in the primary retrieve folder. + * Override in subtypes to show type-specific warnings (e.g. shared/synchronized dataExtensions). + * Keys returned by this method still receive the generic "not found" warning. + * Used by {@link MetadataType.getDependentFiles}. + * + * @param {string[]} notFound keys that could not be found in the retrieve folder + * @returns {Promise.} keys that should still trigger the default "not found" warning + */ + static async handleNotFoundDependencies(notFound) { + return notFound; + } + /** * helper for {@link MetadataType.getDependentFiles} * diff --git a/lib/metadataTypes/definitions/Filter.definition.js b/lib/metadataTypes/definitions/Filter.definition.js index 76ae6c136..af7ed9a9d 100644 --- a/lib/metadataTypes/definitions/Filter.definition.js +++ b/lib/metadataTypes/definitions/Filter.definition.js @@ -9,7 +9,7 @@ export default { 'folder-hidden', ], dependencyGraph: { - filterDefinition: ['r__dataFilter_key'], + dataFilter: ['r__dataFilter_key'], dataExtension: ['r__source_dataExtension_key', 'r__destination_dataExtension_key'], }, hasExtended: false, @@ -30,8 +30,7 @@ export default { maxKeyLength: 36, // confirmed max length type: 'filter', soapType: 'FilterActivity', - typeDescription: - 'Used in automations to filter lists and DEs. Depends on type "FilterDefinitions".', + typeDescription: 'Used in automations to filter lists and DEs. Depends on type "DataFilter".', typeRetrieveByDefault: true, typeCdpByDefault: true, typeName: 'Automation: Filter Activity', diff --git a/lib/util/cli.js b/lib/util/cli.js index d75a1ad15..753217a1c 100644 --- a/lib/util/cli.js +++ b/lib/util/cli.js @@ -87,6 +87,9 @@ const Cli = { return true; } else if (Util.isFalse(Util.skipInteraction?.fixKeysReretrieve)) { return false; + } else if (Util.skipInteraction) { + // generic --yes / --skipInteraction: use the confirm default (true = do re-retrieve) + return true; } else { const fixKeysReretrieve = await confirm({ message: `Do you want to re-retrieve dependent types (${dependentTypes.join( diff --git a/package-lock.json b/package-lock.json index b45cef16b..6622e5b33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,15 +16,15 @@ "console.table": "0.10.0", "deep-equal": "2.2.3", "fs-extra": "11.3.4", - "inquirer": "13.3.0", + "inquirer": "13.3.2", "json-to-table": "4.2.1", "mustache": "4.2.0", "p-limit": "7.3.0", "prettier": "3.8.1", - "prettier-plugin-sql": "0.19.2", + "prettier-plugin-sql": "0.20.0", "semver": "7.7.4", - "sfmc-sdk": "3.0.1", - "simple-git": "3.32.3", + "sfmc-sdk": "3.0.2", + "simple-git": "3.33.0", "toposort": "2.0.2", "update-notifier": "7.3.1", "winston": "3.19.0", @@ -39,23 +39,23 @@ "@types/fs-extra": "11.0.4", "@types/inquirer": "9.0.9", "@types/mocha": "10.0.8", - "@types/node": "25.3.5", + "@types/node": "25.5.0", "@types/yargs": "17.0.35", "assert": "2.1.0", "axios-mock-adapter": "2.0.0", "c8": "11.0.0", "chai": "6.2.2", "chai-files": "1.4.0", - "eslint": "10.0.3", + "eslint": "10.1.0", "eslint-config-ssjs": "2.0.0", - "eslint-plugin-jsdoc": "62.7.1", + "eslint-plugin-jsdoc": "62.8.0", "eslint-plugin-mocha": "11.2.0", "eslint-plugin-prettier": "5.5.5", "eslint-plugin-unicorn": "63.0.0", - "fast-xml-parser": "5.4.2", + "fast-xml-parser": "5.5.9", "globals": "17.4.0", "husky": "9.1.7", - "lint-staged": "16.3.2", + "lint-staged": "16.4.0", "mocha": "11.7.5", "mock-fs": "5.3.0", "npm-run-all": "4.1.5", @@ -245,13 +245,13 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz", - "integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.3.tgz", + "integrity": "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^1.1.0" + "@eslint/core": "^1.1.1" }, "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" @@ -466,24 +466,24 @@ } }, "node_modules/@inquirer/ansi": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.3.tgz", - "integrity": "sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.4.tgz", + "integrity": "sha512-DpcZrQObd7S0R/U3bFdkcT5ebRwbTTC4D3tCc1vsJizmgPLxNJBo+AAFmrZwe8zk30P2QzgzGWZ3Q9uJwWuhIg==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, "node_modules/@inquirer/checkbox": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.1.0.tgz", - "integrity": "sha512-/HjF1LN0a1h4/OFsbGKHNDtWICFU/dqXCdym719HFTyJo9IG7Otr+ziGWc9S0iQuohRZllh+WprSgd5UW5Fw0g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.1.2.tgz", + "integrity": "sha512-PubpMPO2nJgMufkoB3P2wwxNXEMUXnBIKi/ACzDUYfaoPuM7gSTmuxJeMscoLVEsR4qqrCMf5p0SiYGWnVJ8kw==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.3", - "@inquirer/core": "^11.1.5", - "@inquirer/figures": "^2.0.3", - "@inquirer/type": "^4.0.3" + "@inquirer/ansi": "^2.0.4", + "@inquirer/core": "^11.1.7", + "@inquirer/figures": "^2.0.4", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -498,13 +498,13 @@ } }, "node_modules/@inquirer/confirm": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.8.tgz", - "integrity": "sha512-Di6dgmiZ9xCSUxWUReWTqDtbhXCuG2MQm2xmgSAIruzQzBqNf49b8E07/vbCYY506kDe8BiwJbegXweG8M1klw==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.10.tgz", + "integrity": "sha512-tiNyA73pgpQ0FQ7axqtoLUe4GDYjNCDcVsbgcA5anvwg2z6i+suEngLKKJrWKJolT//GFPZHwN30binDIHgSgQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -519,14 +519,14 @@ } }, "node_modules/@inquirer/core": { - "version": "11.1.5", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.5.tgz", - "integrity": "sha512-QQPAX+lka8GyLcZ7u7Nb1h6q72iZ/oy0blilC3IB2nSt1Qqxp7akt94Jqhi/DzARuN3Eo9QwJRvtl4tmVe4T5A==", + "version": "11.1.7", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.7.tgz", + "integrity": "sha512-1BiBNDk9btIwYIzNZpkikIHXWeNzNncJePPqwDyVMhXhD1ebqbpn1mKGctpoqAbzywZfdG0O4tvmsGIcOevAPQ==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.3", - "@inquirer/figures": "^2.0.3", - "@inquirer/type": "^4.0.3", + "@inquirer/ansi": "^2.0.4", + "@inquirer/figures": "^2.0.4", + "@inquirer/type": "^4.0.4", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", @@ -545,14 +545,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.8.tgz", - "integrity": "sha512-sLcpbb9B3XqUEGrj1N66KwhDhEckzZ4nI/W6SvLXyBX8Wic3LDLENlWRvkOGpCPoserabe+MxQkpiMoI8irvyA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.10.tgz", + "integrity": "sha512-VJx4XyaKea7t8hEApTw5dxeIyMtWXre2OiyJcICCRZI4hkoHsMoCnl/KbUnJJExLbH9csLLHMVR144ZhFE1CwA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/external-editor": "^2.0.3", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/external-editor": "^2.0.4", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -567,13 +567,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.8.tgz", - "integrity": "sha512-QieW3F1prNw3j+hxO7/NKkG1pk3oz7pOB6+5Upwu3OIwADfPX0oZVppsqlL+Vl/uBHHDSOBY0BirLctLnXwGGg==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.10.tgz", + "integrity": "sha512-fC0UHJPXsTRvY2fObiwuQYaAnHrp3aDqfwKUJSdfpgv18QUG054ezGbaRNStk/BKD5IPijeMKWej8VV8O5Q/eQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -588,9 +588,9 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.3.tgz", - "integrity": "sha512-LgyI7Agbda74/cL5MvA88iDpvdXI2KuMBCGRkbCl2Dg1vzHeOgs+s0SDcXV7b+WZJrv2+ERpWSM65Fpi9VfY3w==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.4.tgz", + "integrity": "sha512-Prenuv9C1PHj2Itx0BcAOVBTonz02Hc2Nd2DbU67PdGUaqn0nPCnV34oDyyoaZHnmfRxkpuhh/u51ThkrO+RdA==", "license": "MIT", "dependencies": { "chardet": "^2.1.1", @@ -609,22 +609,22 @@ } }, "node_modules/@inquirer/figures": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.3.tgz", - "integrity": "sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.4.tgz", + "integrity": "sha512-eLBsjlS7rPS3WEhmOmh1znQ5IsQrxWzxWDxO51e4urv+iVrSnIHbq4zqJIOiyNdYLa+BVjwOtdetcQx1lWPpiQ==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" } }, "node_modules/@inquirer/input": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.8.tgz", - "integrity": "sha512-p0IJslw0AmedLEkOU+yrEX3Aj2RTpQq7ZOf8nc1DIhjzaxRWrrgeuE5Kyh39fVRgtcACaMXx/9WNo8+GjgBOfw==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.10.tgz", + "integrity": "sha512-nvZ6qEVeX/zVtZ1dY2hTGDQpVGD3R7MYPLODPgKO8Y+RAqxkrP3i/3NwF3fZpLdaMiNuK0z2NaYIx9tPwiSegQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -639,13 +639,13 @@ } }, "node_modules/@inquirer/number": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.8.tgz", - "integrity": "sha512-uGLiQah9A0F9UIvJBX52m0CnqtLaym0WpT9V4YZrjZ+YRDKZdwwoEPz06N6w8ChE2lrnsdyhY9sL+Y690Kh9gQ==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.10.tgz", + "integrity": "sha512-Ht8OQstxiS3APMGjHV0aYAjRAysidWdwurWEo2i8yI5xbhOBWqizT0+MU1S2GCcuhIBg+3SgWVjEoXgfhY+XaA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -660,14 +660,14 @@ } }, "node_modules/@inquirer/password": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.8.tgz", - "integrity": "sha512-zt1sF4lYLdvPqvmvHdmjOzuUUjuCQ897pdUCO8RbXMUDKXJTTyOQgtn23le+jwcb+MpHl3VAFvzIdxRAf6aPlA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.10.tgz", + "integrity": "sha512-QbNyvIE8q2GTqKLYSsA8ATG+eETo+m31DSR0+AU7x3d2FhaTWzqQek80dj3JGTo743kQc6mhBR0erMjYw5jQ0A==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.3", - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/ansi": "^2.0.4", + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -682,21 +682,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.3.0.tgz", - "integrity": "sha512-JAj66kjdH/F1+B7LCigjARbwstt3SNUOSzMdjpsvwJmzunK88gJeXmcm95L9nw1KynvFVuY4SzXh/3Y0lvtgSg==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.3.2.tgz", + "integrity": "sha512-yFroiSj2iiBFlm59amdTvAcQFvWS6ph5oKESls/uqPBect7rTU2GbjyZO2DqxMGuIwVA8z0P4K6ViPcd/cp+0w==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^5.1.0", - "@inquirer/confirm": "^6.0.8", - "@inquirer/editor": "^5.0.8", - "@inquirer/expand": "^5.0.8", - "@inquirer/input": "^5.0.8", - "@inquirer/number": "^4.0.8", - "@inquirer/password": "^5.0.8", - "@inquirer/rawlist": "^5.2.4", - "@inquirer/search": "^4.1.4", - "@inquirer/select": "^5.1.0" + "@inquirer/checkbox": "^5.1.2", + "@inquirer/confirm": "^6.0.10", + "@inquirer/editor": "^5.0.10", + "@inquirer/expand": "^5.0.10", + "@inquirer/input": "^5.0.10", + "@inquirer/number": "^4.0.10", + "@inquirer/password": "^5.0.10", + "@inquirer/rawlist": "^5.2.6", + "@inquirer/search": "^4.1.6", + "@inquirer/select": "^5.1.2" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -711,13 +711,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.4.tgz", - "integrity": "sha512-fTuJ5Cq9W286isLxwj6GGyfTjx1Zdk4qppVEPexFuA6yioCCXS4V1zfKroQqw7QdbDPN73xs2DiIAlo55+kBqg==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.6.tgz", + "integrity": "sha512-jfw0MLJ5TilNsa9zlJ6nmRM0ZFVZhhTICt4/6CU2Dv1ndY7l3sqqo1gIYZyMMDw0LvE1u1nzJNisfHEhJIxq5w==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -732,14 +732,14 @@ } }, "node_modules/@inquirer/search": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.4.tgz", - "integrity": "sha512-9yPTxq7LPmYjrGn3DRuaPuPbmC6u3fiWcsE9ggfLcdgO/ICHYgxq7mEy1yJ39brVvgXhtOtvDVjDh9slJxE4LQ==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.6.tgz", + "integrity": "sha512-3/6kTRae98hhDevENScy7cdFEuURnSpM3JbBNg8yfXLw88HgTOl+neUuy/l9W0No5NzGsLVydhBzTIxZP7yChQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.5", - "@inquirer/figures": "^2.0.3", - "@inquirer/type": "^4.0.3" + "@inquirer/core": "^11.1.7", + "@inquirer/figures": "^2.0.4", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -754,15 +754,15 @@ } }, "node_modules/@inquirer/select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.1.0.tgz", - "integrity": "sha512-OyYbKnchS1u+zRe14LpYrN8S0wH1vD0p2yKISvSsJdH2TpI87fh4eZdWnpdbrGauCRWDph3NwxRmM4Pcm/hx1Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.1.2.tgz", + "integrity": "sha512-kTK8YIkHV+f02y7bWCh7E0u2/11lul5WepVTclr3UMBtBr05PgcZNWfMa7FY57ihpQFQH/spLMHTcr0rXy50tA==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.3", - "@inquirer/core": "^11.1.5", - "@inquirer/figures": "^2.0.3", - "@inquirer/type": "^4.0.3" + "@inquirer/ansi": "^2.0.4", + "@inquirer/core": "^11.1.7", + "@inquirer/figures": "^2.0.4", + "@inquirer/type": "^4.0.4" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -777,9 +777,9 @@ } }, "node_modules/@inquirer/type": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.3.tgz", - "integrity": "sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.4.tgz", + "integrity": "sha512-PamArxO3cFJZoOzspzo6cxVlLeIftyBsZw/S9bKY5DzxqJVZgjoj1oP8d0rskKtp7sZxBycsoer1g6UeJV1BBA==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -1124,9 +1124,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "25.3.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz", - "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2775,16 +2775,16 @@ } }, "node_modules/eslint": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.3.tgz", - "integrity": "sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.1.0.tgz", + "integrity": "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", - "@eslint/config-helpers": "^0.5.2", + "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", @@ -2797,7 +2797,7 @@ "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", - "espree": "^11.1.1", + "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2863,9 +2863,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "62.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-62.7.1.tgz", - "integrity": "sha512-4Zvx99Q7d1uggYBUX/AIjvoyqXhluGbbKrRmG8SQTLprPFg6fa293tVJH1o1GQwNe3lUydd8ZHzn37OaSncgSQ==", + "version": "62.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-62.8.0.tgz", + "integrity": "sha512-hu3r9/6JBmPG6wTcqtYzgZAnjEG2eqRUATfkFscokESg1VDxZM21ZaMire0KjeMwfj+SXvgB4Rvh5LBuesj92w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3151,9 +3151,9 @@ } }, "node_modules/eslint/node_modules/espree": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.1.tgz", - "integrity": "sha512-AVHPqQoZYc+RUM4/3Ly5udlZY/U4LS8pIG05jEjWM2lQMU/oaZ7qshzAl2YP1tfNmXfftH3ohurfwNAug+MnsQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -3340,21 +3340,25 @@ } }, "node_modules/fast-xml-builder": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.0.0.tgz", - "integrity": "sha512-fpZuDogrAgnyt9oDDz+5DBz0zgPdPZz6D4IR7iESxRXElrlGTRkHJ9eEt+SACRJwT0FNFrt71DFQIUFBJfX/uQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", + "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "license": "MIT" + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } }, "node_modules/fast-xml-parser": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.4.2.tgz", - "integrity": "sha512-pw/6pIl4k0CSpElPEJhDppLzaixDEuWui2CUQQBH/ECDf7+y6YwA4Gf7Tyb0Rfe4DIMuZipYj4AEL0nACKglvQ==", + "version": "5.5.9", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.9.tgz", + "integrity": "sha512-jldvxr1MC6rtiZKgrFnDSvT8xuH+eJqxqOBThUVjYrxssYTo1avZLGql5l0a0BAERR01CadYzZ83kVEkbyDg+g==", + "dev": true, "funding": [ { "type": "github", @@ -3363,8 +3367,9 @@ ], "license": "MIT", "dependencies": { - "fast-xml-builder": "^1.0.0", - "strnum": "^2.1.2" + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.2.0", + "strnum": "^2.2.2" }, "bin": { "fxparser": "src/cli/cli.js" @@ -3517,10 +3522,11 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "dev": true, + "license": "ISC" }, "node_modules/fn.name": { "version": "1.1.0", @@ -4047,15 +4053,15 @@ } }, "node_modules/inquirer": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-13.3.0.tgz", - "integrity": "sha512-APTrZe9IhrsshL0u2PgmEMLP3CXDBjZ99xh5dR2+sryOt5R+JGL0KNuaTTT2lW54B9eNQDMutPR05UYTL7Xb1Q==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-13.3.2.tgz", + "integrity": "sha512-bh/OjBGxNR9qvfQj1n5bxtIF58mbOTp2InN5dKuwUK03dXcDGFsjlDinQRuXMZ4EGiJaFieUWHCAaxH2p7iUBw==", "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.3", - "@inquirer/core": "^11.1.5", - "@inquirer/prompts": "^8.3.0", - "@inquirer/type": "^4.0.3", + "@inquirer/ansi": "^2.0.4", + "@inquirer/core": "^11.1.7", + "@inquirer/prompts": "^8.3.2", + "@inquirer/type": "^4.0.4", "mute-stream": "^3.0.0", "run-async": "^4.0.6", "rxjs": "^7.8.2" @@ -4748,17 +4754,17 @@ } }, "node_modules/lint-staged": { - "version": "16.3.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.3.2.tgz", - "integrity": "sha512-xKqhC2AeXLwiAHXguxBjuChoTTWFC6Pees0SHPwOpwlvI3BH7ZADFPddAdN3pgo3aiKgPUx/bxE78JfUnxQnlg==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.4.0.tgz", + "integrity": "sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw==", "dev": true, "license": "MIT", "dependencies": { "commander": "^14.0.3", "listr2": "^9.0.5", - "micromatch": "^4.0.8", + "picomatch": "^4.0.3", "string-argv": "^0.3.2", - "tinyexec": "^1.0.2", + "tinyexec": "^1.0.4", "yaml": "^2.8.2" }, "bin": { @@ -4771,6 +4777,19 @@ "url": "https://opencollective.com/lint-staged" } }, + "node_modules/lint-staged/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/listr2": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz", @@ -5759,6 +5778,21 @@ "node": ">=8" } }, + "node_modules/path-expression-matcher": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.2.0.tgz", + "integrity": "sha512-DwmPWeFn+tq7TiyJ2CxezCAirXjFxvaiD03npak3cRjlP9+OjTmSy1EpIrEbh+l6JgUundniloMLDQ/6VTdhLQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -6084,14 +6118,14 @@ } }, "node_modules/prettier-plugin-sql": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/prettier-plugin-sql/-/prettier-plugin-sql-0.19.2.tgz", - "integrity": "sha512-DAu1Jcanpvs32OAOXsqaVXOpPs4nFLVkB3XwzRiZZVNL5/c+XdlNxWFMiMpMhYhmCG5BW3srK8mhikCOv5tPfg==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-sql/-/prettier-plugin-sql-0.20.0.tgz", + "integrity": "sha512-7GRuduJIbWd10bFfYdFuymZdcVF37ZCukiuVi2a4c5ccqjAxHQtKbK7zSKyqGrFjCOBLQVVz4BStKWV7YvxAFA==", "license": "MIT", "dependencies": { "jsox": "^1.2.123", "node-sql-parser": "^5.3.10", - "sql-formatter": "^15.6.5", + "sql-formatter": "^15.7.0", "tslib": "^2.8.1" }, "engines": { @@ -6594,13 +6628,13 @@ } }, "node_modules/sfmc-sdk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sfmc-sdk/-/sfmc-sdk-3.0.1.tgz", - "integrity": "sha512-y2NwGUm4uuPAtWEKSiI+R4dFg65bXdP4EChRYmHHxnx9e1cOXBuH9166A84MDZC/sDLQ3UBdb1l4VuQ4YLIh0A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sfmc-sdk/-/sfmc-sdk-3.0.2.tgz", + "integrity": "sha512-rfgxBvo3owYbIVRjO29UgU2lDRwDoLEptW9bvcWkKsee1Be8VytoPg/lUd5uvh3CxFD6TQy/T6dZDKu5c0eDfw==", "license": "BSD-3-Clause", "dependencies": { "axios": "^1.7.2", - "fast-xml-parser": "5.4.2", + "fast-xml-parser": "5.5.6", "p-limit": "5.0.0" }, "engines": { @@ -6608,6 +6642,26 @@ "npm": ">=9" } }, + "node_modules/sfmc-sdk/node_modules/fast-xml-parser": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.6.tgz", + "integrity": "sha512-3+fdZyBRVg29n4rXP0joHthhcHdPUHaIC16cuyyd1iLsuaO6Vea36MPrxgAzbZna8lhvZeRL8Bc9GP56/J9xEw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.1.3", + "strnum": "^2.1.2" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/sfmc-sdk/node_modules/p-limit": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", @@ -6674,9 +6728,9 @@ } }, "node_modules/simple-git": { - "version": "3.32.3", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.32.3.tgz", - "integrity": "sha512-56a5oxFdWlsGygOXHWrG+xjj5w9ZIt2uQbzqiIGdR/6i5iococ7WQ/bNPzWxCJdEUGUCmyMH0t9zMpRJTaKxmw==", + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.33.0.tgz", + "integrity": "sha512-D4V/tGC2sjsoNhoMybKyGoE+v8A60hRawKQ1iFRA1zwuDgGZCBJ4ByOzZ5J8joBbi4Oam0qiPH+GhzmSBwbJng==", "license": "MIT", "dependencies": { "@kwsites/file-exists": "^1.1.1", @@ -6972,9 +7026,9 @@ } }, "node_modules/strnum": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", - "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.2.tgz", + "integrity": "sha512-DnR90I+jtXNSTXWdwrEy9FakW7UX+qUZg28gj5fk2vxxl7uS/3bpI4fjFYVmdK9etptYBPNkpahuQnEwhwECqA==", "funding": [ { "type": "github", @@ -7152,9 +7206,9 @@ "dev": true }, "node_modules/tinyexec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", - "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", + "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 27999db79..bb32a3152 100644 --- a/package.json +++ b/package.json @@ -74,15 +74,15 @@ "console.table": "0.10.0", "deep-equal": "2.2.3", "fs-extra": "11.3.4", - "inquirer": "13.3.0", + "inquirer": "13.3.2", "json-to-table": "4.2.1", "mustache": "4.2.0", "p-limit": "7.3.0", "prettier": "3.8.1", - "prettier-plugin-sql": "0.19.2", + "prettier-plugin-sql": "0.20.0", "semver": "7.7.4", - "sfmc-sdk": "3.0.1", - "simple-git": "3.32.3", + "sfmc-sdk": "3.0.2", + "simple-git": "3.33.0", "toposort": "2.0.2", "update-notifier": "7.3.1", "winston": "3.19.0", @@ -94,23 +94,23 @@ "@types/fs-extra": "11.0.4", "@types/inquirer": "9.0.9", "@types/mocha": "10.0.8", - "@types/node": "25.3.5", + "@types/node": "25.5.0", "@types/yargs": "17.0.35", "assert": "2.1.0", "axios-mock-adapter": "2.0.0", "c8": "11.0.0", "chai": "6.2.2", "chai-files": "1.4.0", - "eslint": "10.0.3", + "eslint": "10.1.0", "eslint-config-ssjs": "2.0.0", - "eslint-plugin-jsdoc": "62.7.1", + "eslint-plugin-jsdoc": "62.8.0", "eslint-plugin-mocha": "11.2.0", "eslint-plugin-prettier": "5.5.5", "eslint-plugin-unicorn": "63.0.0", - "fast-xml-parser": "5.4.2", + "fast-xml-parser": "5.5.9", "globals": "17.4.0", "husky": "9.1.7", - "lint-staged": "16.3.2", + "lint-staged": "16.4.0", "mocha": "11.7.5", "mock-fs": "5.3.0", "npm-run-all": "4.1.5", diff --git a/test/general.test.js b/test/general.test.js index 946edab3c..3673e275e 100644 --- a/test/general.test.js +++ b/test/general.test.js @@ -60,7 +60,7 @@ describe('GENERAL', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 46, + 48, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -108,7 +108,7 @@ describe('GENERAL', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 46, + 48, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -157,7 +157,7 @@ describe('GENERAL', () => { assert.equal( testUtils.getAPIHistoryLength(), - 46, + 48, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -224,7 +224,7 @@ describe('GENERAL', () => { assert.equal( testUtils.getAPIHistoryLength(), - 82, + 84, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -284,7 +284,7 @@ describe('GENERAL', () => { assert.equal( testUtils.getAPIHistoryLength(), - 82, + 84, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -344,7 +344,7 @@ describe('GENERAL', () => { assert.equal( testUtils.getAPIHistoryLength(), - 82, + 84, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -985,7 +985,7 @@ describe('GENERAL', () => { // download first before we test buildTemplate await handler.retrieve('testInstance/testBU'); - const expectedApiCallsRetrieve = 109; + const expectedApiCallsRetrieve = 111; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, @@ -1227,7 +1227,7 @@ describe('GENERAL', () => { await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql') ).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql')); - const expectedApiCallsRetrieve = 113; + const expectedApiCallsRetrieve = 115; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, @@ -1601,7 +1601,7 @@ describe('GENERAL', () => { // download everything before we test buildTemplate await handler.retrieve('testInstance/testBU'); - const expectedApiCallsRetrieve = 109; + const expectedApiCallsRetrieve = 111; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, @@ -1812,7 +1812,7 @@ describe('GENERAL', () => { await testUtils.getActualDeployFile('testTemplated_query', 'query', 'sql') ).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'build', 'sql')); - const expectedApiCallsRetrieve = 113; + const expectedApiCallsRetrieve = 115; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, @@ -2003,7 +2003,7 @@ describe('GENERAL', () => { // download first before we test buildTemplate await handler.retrieve('testInstance/testBU'); - const expectedApiCallsRetrieve = 109; + const expectedApiCallsRetrieve = 111; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, diff --git a/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_journey_updatecontact_sharedDE.journey-meta.json b/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_journey_updatecontact_sharedDE.journey-meta.json new file mode 100644 index 000000000..69b70c96a --- /dev/null +++ b/test/mockRoot/deploy/testInstance/testBU/journey/testExisting_journey_updatecontact_sharedDE.journey-meta.json @@ -0,0 +1,108 @@ +{ + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "2024-05-04T05:54:48.027", + "modifiedDate": "2024-05-04T17:25:57.9", + "activities": [ + { + "key": "UPDATECONTACTDATAV2-1", + "name": "Update Contact - TEST", + "description": "", + "type": "UPDATECONTACTDATA", + "outcomes": [ + { + "key": "9f21d42b-4679-4561-911a-4bccf84672ba", + "arguments": {}, + "metaData": { + "invalid": false + } + } + ], + "arguments": { + "activityData": { + "updateContactFields": [ + { + "r__dataExtension_key": "testExisting_dataExtensionShared", + "r__dataExtensionField_name": "LastName", + "value": "TEST" + } + ] + } + }, + "configurationArguments": {}, + "metaData": { + "isConfigured": true + }, + "schema": { + "arguments": { + "activityData": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + }, + "contactKey": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + } + } + } + } + ], + "triggers": [ + { + "key": "TRIGGER", + "name": "TRIGGER", + "description": "", + "type": "EmailAudience", + "outcomes": [], + "arguments": {}, + "configurationArguments": {}, + "metaData": { + "r__event_key": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e", + "chainType": "None", + "configurationRequired": false, + "iconUrl": "/images/icon-data-extension.svg", + "title": "Data Extension", + "entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json", + "sourceInteractionId": "00000000-0000-0000-0000-000000000000" + } + } + ], + "goals": [], + "exits": [], + "notifiers": [], + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "status": "Draft", + "scheduledStatus": "Draft", + "r__folder_Path": "my journeys" +} diff --git a/test/resources/1111111/dataExtension/template_sharedDE-expected.json b/test/resources/1111111/dataExtension/template_sharedDE-expected.json new file mode 100644 index 000000000..ec25877ca --- /dev/null +++ b/test/resources/1111111/dataExtension/template_sharedDE-expected.json @@ -0,0 +1,53 @@ +{ + "CustomerKey": "{{{prefix}}}dataExtensionShared", + "DataRetentionPeriodLength": 6, + "Description": "{{{description}}}", + "Fields": [ + { + "DefaultValue": "", + "FieldType": "Text", + "IsPrimaryKey": false, + "IsRequired": false, + "MaxLength": 50, + "Name": "FirstName" + }, + { + "DefaultValue": "", + "FieldType": "Text", + "IsPrimaryKey": false, + "IsRequired": false, + "MaxLength": 50, + "Name": "LastName" + }, + { + "DefaultValue": "", + "FieldType": "EmailAddress", + "IsPrimaryKey": false, + "IsRequired": true, + "MaxLength": 254, + "Name": "EmailAddress" + }, + { + "DefaultValue": "", + "FieldType": "Text", + "IsPrimaryKey": true, + "IsRequired": true, + "MaxLength": 50, + "Name": "ContactKey" + } + ], + "IsSendable": true, + "IsTestable": true, + "Name": "{{{prefix}}}dataExtensionShared", + "ResetRetentionPeriodOnImport": false, + "SendableDataExtensionField": { + "Name": "ContactKey" + }, + "SendableSubscriberField": { + "Name": "Subscriber Key" + }, + "c__dataRetentionPeriodUnitOfMeasure": "Months", + "c__retentionPolicy": "individialRecords", + "r__folder_ContentType": "shared_dataextension", + "r__folder_Path": "Shared Items/Shared Data Extensions" +} diff --git a/test/resources/9999999/automation/v1/queries/get-response.json b/test/resources/9999999/automation/v1/queries/get-response.json index ddfab04e6..2cce1e65d 100644 --- a/test/resources/9999999/automation/v1/queries/get-response.json +++ b/test/resources/9999999/automation/v1/queries/get-response.json @@ -70,6 +70,23 @@ "targetUpdateTypeName": "Overwrite", "categoryId": 999, "isFrozen": false + }, + { + "queryDefinitionId": "shared-607c-4940-afef-437965094dat", + "name": "testExisting_query_SharedDE", + "key": "testExisting_query_SharedDE", + "description": "bla bla", + "queryText": "Select\n SubscriberKey as testField, Trim(last_name) AS name\nFrom\n testExisting_dataExtensionShared\nwhere\n country in ('test')\n", + "targetName": "testExisting_dataExtensionShared", + "targetKey": "testExisting_dataExtensionShared", + "targetId": "21711373-72c1-ec11-b83b-shared", + "targetDescription": "", + "createdDate": "2022-04-26T15:21:16.453", + "modifiedDate": "2022-04-26T16:02:44.01", + "targetUpdateTypeId": 0, + "targetUpdateTypeName": "Overwrite", + "categoryId": 999, + "isFrozen": false } ] } diff --git a/test/resources/9999999/interaction/v1/interactions/get-response.json b/test/resources/9999999/interaction/v1/interactions/get-response.json index 00f2e3228..721d50a36 100644 --- a/test/resources/9999999/interaction/v1/interactions/get-response.json +++ b/test/resources/9999999/interaction/v1/interactions/get-response.json @@ -1,5 +1,5 @@ { - "count": 3, + "count": 6, "page": 1, "pageSize": 500, "links": {}, @@ -206,6 +206,44 @@ "status": "Draft", "scheduledStatus": "Draft", "r__folder_Path": "my journeys" + }, + { + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "2024-05-04T05:54:48.027", + "modifiedDate": "2024-05-04T17:25:57.9", + "goals": [], + "exits": [], + "notifiers": [], + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "status": "Draft", + "scheduledStatus": "Draft", + "r__folder_Path": "my journeys" } ] -} \ No newline at end of file +} diff --git a/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact/get-response.json b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact/get-response.json index 863fea7f1..7796ba2b2 100644 --- a/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact/get-response.json +++ b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact/get-response.json @@ -27,9 +27,9 @@ "activityData": { "updateContactFields": [ { - "r__dataExtensionField_name": "LastName", - "value": "TEST", - "r__dataExtension_key": "testExisting_dataExtension" + "dataExtensionId": "21711373-72c1-ec11-b83b-48df37d1deb7", + "field": "bea0e308-5d45-4181-a673-da9972a7c674", + "value": "TEST" } ] } @@ -116,4 +116,4 @@ "status": "Draft", "definitionId": "0175b971-71a3-4d8e-98ac-48121f3fbf4f", "scheduledStatus": "Draft" -} \ No newline at end of file +} diff --git a/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/get-response.json b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/get-response.json new file mode 100644 index 000000000..c2e456d60 --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/get-response.json @@ -0,0 +1,119 @@ +{ + "id": "shared-journey-id-1234", + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "2024-05-04T05:54:48.027", + "modifiedDate": "2024-05-04T17:25:57.9", + "activities": [ + { + "key": "UPDATECONTACTDATAV2-1", + "name": "Update Contact - TEST", + "description": "", + "type": "UPDATECONTACTDATA", + "outcomes": [ + { + "key": "9f21d42b-4679-4561-911a-4bccf84672ba", + "arguments": {}, + "metaData": { + "invalid": false + } + } + ], + "arguments": { + "activityData": { + "updateContactFields": [ + { + "dataExtensionId": "21711373-72c1-ec11-b83b-shared", + "field": "shared-bea0e308-5d45-4181-a673-da9972a7c674", + "value": "TEST" + } + ] + } + }, + "configurationArguments": {}, + "metaData": { + "isConfigured": true + }, + "schema": { + "arguments": { + "activityData": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + }, + "contactKey": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + } + } + } + } + ], + "triggers": [ + { + "id": "92753481-1258-49bd-8a84-921ed63bcc2e", + "key": "TRIGGER", + "name": "TRIGGER", + "description": "", + "type": "EmailAudience", + "outcomes": [], + "arguments": {}, + "configurationArguments": {}, + "metaData": { + "eventDefinitionId": "649d512b-4d08-4eca-a14e-fc7b64b4ada8", + "eventDefinitionKey": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e", + "chainType": "None", + "configurationRequired": false, + "iconUrl": "/images/icon-data-extension.svg", + "title": "Data Extension", + "entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json", + "sourceInteractionId": "00000000-0000-0000-0000-000000000000" + } + } + ], + "goals": [], + "exits": [], + "notifiers": [], + "stats": { + "currentPopulation": 0, + "cumulativePopulation": 0, + "metGoal": 0, + "metExitCriteria": 0, + "goalPerformance": 0 + }, + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "categoryId": 6298, + "status": "Draft", + "definitionId": "shared-journey-id-1234", + "scheduledStatus": "Draft" +} diff --git a/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/put-response.json b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/put-response.json new file mode 100644 index 000000000..64b9fc122 --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/key_testExisting_journey_updatecontact_sharedDE/put-response.json @@ -0,0 +1,110 @@ +{ + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "0001-01-01T00:00:00", + "modifiedDate": "2024-05-04T17:25:57.9", + "activities": [ + { + "key": "UPDATECONTACTDATAV2-1", + "name": "Update Contact - TEST", + "description": "", + "type": "UPDATECONTACTDATA", + "outcomes": [ + { + "key": "9f21d42b-4679-4561-911a-4bccf84672ba", + "arguments": {}, + "metaData": { + "invalid": false + } + } + ], + "arguments": { + "activityData": { + "updateContactFields": [ + { + "field": "shared-bea0e308-5d45-4181-a673-da9972a7c674", + "value": "TEST", + "dataExtensionId": "21711373-72c1-ec11-b83b-shared" + } + ] + } + }, + "configurationArguments": {}, + "metaData": { + "isConfigured": true + }, + "schema": { + "arguments": { + "activityData": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + }, + "contactKey": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + } + } + } + } + ], + "triggers": [ + { + "key": "TRIGGER", + "name": "TRIGGER", + "description": "", + "type": "EmailAudience", + "outcomes": [], + "arguments": {}, + "configurationArguments": {}, + "metaData": { + "r__event_key": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e", + "chainType": "None", + "configurationRequired": false, + "iconUrl": "/images/icon-data-extension.svg", + "title": "Data Extension", + "entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json", + "sourceInteractionId": "00000000-0000-0000-0000-000000000000" + } + } + ], + "goals": [], + "exits": [], + "notifiers": [], + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "status": "Draft", + "scheduledStatus": "Draft", + "r__folder_Path": "my journeys", + "id": "shared-journey-id-1234", + "definitionId": "shared-journey-id-1234" +} diff --git a/test/resources/9999999/journey/get-updatecontact-sharedDE-expected.json b/test/resources/9999999/journey/get-updatecontact-sharedDE-expected.json new file mode 100644 index 000000000..1177e0ec9 --- /dev/null +++ b/test/resources/9999999/journey/get-updatecontact-sharedDE-expected.json @@ -0,0 +1,108 @@ +{ + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "2024-05-04T05:54:48.027", + "modifiedDate": "2024-05-04T17:25:57.9", + "activities": [ + { + "key": "UPDATECONTACTDATAV2-1", + "name": "Update Contact - TEST", + "description": "", + "type": "UPDATECONTACTDATA", + "outcomes": [ + { + "key": "9f21d42b-4679-4561-911a-4bccf84672ba", + "arguments": {}, + "metaData": { + "invalid": false + } + } + ], + "arguments": { + "activityData": { + "updateContactFields": [ + { + "r__dataExtensionField_name": "LastName", + "value": "TEST", + "r__dataExtension_key": "testExisting_dataExtensionShared" + } + ] + } + }, + "configurationArguments": {}, + "metaData": { + "isConfigured": true + }, + "schema": { + "arguments": { + "activityData": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + }, + "contactKey": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + } + } + } + } + ], + "triggers": [ + { + "key": "TRIGGER", + "name": "TRIGGER", + "description": "", + "type": "EmailAudience", + "outcomes": [], + "arguments": {}, + "configurationArguments": {}, + "metaData": { + "r__event_key": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e", + "chainType": "None", + "configurationRequired": false, + "iconUrl": "/images/icon-data-extension.svg", + "title": "Data Extension", + "entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json", + "sourceInteractionId": "00000000-0000-0000-0000-000000000000" + } + } + ], + "goals": [], + "exits": [], + "notifiers": [], + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "status": "Draft", + "scheduledStatus": "Draft", + "r__folder_Path": "my journeys" +} diff --git a/test/resources/9999999/journey/put-updatecontact-sharedDE-expected.json b/test/resources/9999999/journey/put-updatecontact-sharedDE-expected.json new file mode 100644 index 000000000..1177e0ec9 --- /dev/null +++ b/test/resources/9999999/journey/put-updatecontact-sharedDE-expected.json @@ -0,0 +1,108 @@ +{ + "key": "testExisting_journey_updatecontact_sharedDE", + "name": "testExisting_journey_updatecontact_sharedDE", + "lastPublishedDate": "0001-01-01T00:00:00", + "description": "", + "version": 1, + "workflowApiVersion": 1, + "createdDate": "2024-05-04T05:54:48.027", + "modifiedDate": "2024-05-04T17:25:57.9", + "activities": [ + { + "key": "UPDATECONTACTDATAV2-1", + "name": "Update Contact - TEST", + "description": "", + "type": "UPDATECONTACTDATA", + "outcomes": [ + { + "key": "9f21d42b-4679-4561-911a-4bccf84672ba", + "arguments": {}, + "metaData": { + "invalid": false + } + } + ], + "arguments": { + "activityData": { + "updateContactFields": [ + { + "r__dataExtensionField_name": "LastName", + "value": "TEST", + "r__dataExtension_key": "testExisting_dataExtensionShared" + } + ] + } + }, + "configurationArguments": {}, + "metaData": { + "isConfigured": true + }, + "schema": { + "arguments": { + "activityData": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + }, + "contactKey": { + "dataType": "Text", + "isNullable": false, + "direction": "In", + "readOnly": false, + "access": "Hidden" + } + } + } + } + ], + "triggers": [ + { + "key": "TRIGGER", + "name": "TRIGGER", + "description": "", + "type": "EmailAudience", + "outcomes": [], + "arguments": {}, + "configurationArguments": {}, + "metaData": { + "r__event_key": "DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e", + "chainType": "None", + "configurationRequired": false, + "iconUrl": "/images/icon-data-extension.svg", + "title": "Data Extension", + "entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json", + "sourceInteractionId": "00000000-0000-0000-0000-000000000000" + } + } + ], + "goals": [], + "exits": [], + "notifiers": [], + "entryMode": "NotSet", + "definitionType": "Multistep", + "channel": "", + "defaults": { + "email": [ + "{{Event.DEAudience-2e3c73b6-48cc-2ec0-5522-48636e1a236e.\"Email\"}}" + ], + "properties": { + "analyticsTracking": { + "enabled": true, + "analyticsType": "google", + "urlDomainsToTrack": [] + } + } + }, + "metaData": { + "dataSource": "ContactsModel", + "highThroughputSending": { + "email": false + } + }, + "executionMode": "Production", + "status": "Draft", + "scheduledStatus": "Draft", + "r__folder_Path": "my journeys" +} diff --git a/test/resources/9999999/query/get_sharedDE-expected.json b/test/resources/9999999/query/get_sharedDE-expected.json new file mode 100644 index 000000000..6e527bd01 --- /dev/null +++ b/test/resources/9999999/query/get_sharedDE-expected.json @@ -0,0 +1,11 @@ +{ + "name": "testExisting_query_SharedDE", + "key": "testExisting_query_SharedDE", + "description": "bla bla", + "r__dataExtension_key": "testExisting_dataExtensionShared", + "createdDate": "2022-04-26T15:21:16.453", + "modifiedDate": "2022-04-26T16:02:44.01", + "targetUpdateTypeName": "Overwrite", + "r__folder_Path": "Query", + "isFrozen": false +} diff --git a/test/resources/9999999/query/get_sharedDE-expected.sql b/test/resources/9999999/query/get_sharedDE-expected.sql new file mode 100644 index 000000000..c07708acb --- /dev/null +++ b/test/resources/9999999/query/get_sharedDE-expected.sql @@ -0,0 +1,7 @@ +SELECT + SubscriberKey AS testField, + TRIM(last_name) AS name +FROM + testExisting_dataExtensionShared +WHERE + country IN ('test') diff --git a/test/resources/9999999/query/template_sharedDE-expected.json b/test/resources/9999999/query/template_sharedDE-expected.json new file mode 100644 index 000000000..4b8031ca5 --- /dev/null +++ b/test/resources/9999999/query/template_sharedDE-expected.json @@ -0,0 +1,8 @@ +{ + "name": "{{{prefix}}}query_SharedDE", + "key": "{{{prefix}}}query_SharedDE", + "description": "{{{description}}}", + "r__dataExtension_key": "{{{prefix}}}dataExtensionShared", + "targetUpdateTypeName": "Overwrite", + "r__folder_Path": "Query" +} diff --git a/test/resources/9999999/query/template_sharedDE-expected.sql b/test/resources/9999999/query/template_sharedDE-expected.sql new file mode 100644 index 000000000..01f415658 --- /dev/null +++ b/test/resources/9999999/query/template_sharedDE-expected.sql @@ -0,0 +1,7 @@ +SELECT + SubscriberKey AS testField, + TRIM(last_name) AS name +FROM + {{{prefix}}}dataExtensionShared +WHERE + country IN ({{{countryCodeIn}}}) diff --git a/test/type.attributeSet.test.js b/test/type.attributeSet.test.js index 08c1302e8..dfccbb238 100644 --- a/test/type.attributeSet.test.js +++ b/test/type.attributeSet.test.js @@ -52,5 +52,46 @@ describe('type: attributeSet', () => { ); return; }); + + it('Should resolve shared dataExtensions in attributeSet when retrieved together with dataExtension', async () => { + // WHEN + // this test verifies the fix for: shared DEs not resolved if attributeSet+dataExtension is retrieved together + const retrieve = await handler.retrieve('testInstance/testBU', [ + 'dataExtension', + 'attributeSet', + ]); + + // THEN + assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error'); + assert.equal( + retrieve['testInstance/testBU'].attributeSet + ? Object.keys(retrieve['testInstance/testBU'].attributeSet).length + : 0, + 28, + 'only 28 attributeSets expected in retrieve response' + ); + // get results from cache + const result = cache.getCache(); + assert.equal( + result.attributeSet ? Object.keys(result.attributeSet).length : 0, + 28, + 'only 28 attributeSets expected in cache' + ); + + // verify that shared DE was resolved correctly in attributeSet (this is the key bug fix check) + assert.deepEqual( + await testUtils.getActualJson('testExisting_dataExtensionShared', 'attributeSet'), + await testUtils.getExpectedJson('9999999', 'attributeSet', 'retrieve'), + + 'returned metadata was not equal expected - shared DE should be resolved even when dataExtension is retrieved together with attributeSet' + ); + + assert.equal( + testUtils.getAPIHistoryLength(), + 9, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); }); }); diff --git a/test/type.automation.test.js b/test/type.automation.test.js index d2205f81d..aa901e965 100644 --- a/test/type.automation.test.js +++ b/test/type.automation.test.js @@ -681,7 +681,7 @@ describe('type: automation', () => { await handler.retrieve('testInstance/testBU'); assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error'); - const expectedApiCallsRetrieve = 109; + const expectedApiCallsRetrieve = 111; assert.equal( testUtils.getAPIHistoryLength(), expectedApiCallsRetrieve, diff --git a/test/type.journey.test.js b/test/type.journey.test.js index 54ff45e0c..5632568f7 100644 --- a/test/type.journey.test.js +++ b/test/type.journey.test.js @@ -26,7 +26,7 @@ describe('type: journey', () => { const result = cache.getCache(); assert.equal( result.journey ? Object.keys(result.journey).length : 0, - 5, + 6, 'unexpected number of journeys' ); assert.deepEqual( @@ -44,9 +44,52 @@ describe('type: journey', () => { await testUtils.getExpectedJson('9999999', 'journey', 'get-transactionalEmail'), 'returned JSON was not equal expected' ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_journey_updatecontact_sharedDE', + 'journey' + ), + await testUtils.getExpectedJson('9999999', 'journey', 'get-updatecontact-sharedDE'), + 'returned JSON was not equal expected' + ); assert.equal( testUtils.getAPIHistoryLength(), - 29, + 31, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should retrieve journeys with dataExtension type simultaneously (mcdev retrieve cred/bu -m journey dataExtension)', async () => { + // WHEN - both types at once, no keys: unrelated DEs present alongside UPDATECONTACTDATA DEs + await handler.retrieve('testInstance/testBU', ['journey', 'dataExtension']); + // THEN + assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error'); + // get results from cache + const result = cache.getCache(); + assert.equal( + result.journey ? Object.keys(result.journey).length : 0, + 6, + 'unexpected number of journeys (includes local-DE and shared-DE UPDATECONTACTDATA journeys)' + ); + // Verify UPDATECONTACTDATA activity with local DE is correctly resolved + assert.deepEqual( + await testUtils.getActualJson('testExisting_journey_updatecontact', 'journey'), + await testUtils.getExpectedJson('9999999', 'journey', 'get-updatecontact'), + 'returned JSON was not equal expected for journey with local DE updatecontact activity' + ); + // Verify UPDATECONTACTDATA activity with shared DE is correctly resolved + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_journey_updatecontact_sharedDE', + 'journey' + ), + await testUtils.getExpectedJson('9999999', 'journey', 'get-updatecontact-sharedDE'), + 'returned JSON was not equal expected for journey with shared DE updatecontact activity' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 34, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -167,6 +210,39 @@ describe('type: journey', () => { return; }); + it('Should retrieve a journey containing an UPDATECONTACTDATA activity referencing a shared DE with key', async () => { + // WHEN + await handler.retrieve( + 'testInstance/testBU', + ['journey'], + ['testExisting_journey_updatecontact_sharedDE'] + ); + // THEN + assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error'); + // get results from cache + const result = cache.getCache(); + assert.equal( + result.journey ? Object.keys(result.journey).length : 0, + 1, + 'only 1 journeys expected' + ); + + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_journey_updatecontact_sharedDE', + 'journey' + ), + await testUtils.getExpectedJson('9999999', 'journey', 'get-updatecontact-sharedDE'), + 'returned JSON was not equal expected' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 20, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + it('Should retrieve a Transactional Email journey with key', async () => { // WHEN await handler.retrieve('testInstance/testBU', ['journey'], ['testExisting_temail']); @@ -504,6 +580,32 @@ describe('type: journey', () => { ); return; }); + + it('Should update a journey with UPDATECONTACT activity referencing a shared DE', async () => { + // WHEN + await handler.deploy( + 'testInstance/testBU', + ['journey'], + ['testExisting_journey_updatecontact_sharedDE'] + ); + // THEN + assert.equal(process.exitCode, 0, 'deploy should not have thrown an error'); + // confirm updated item + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_journey_updatecontact_sharedDE', + 'journey' + ), + await testUtils.getExpectedJson('9999999', 'journey', 'put-updatecontact-sharedDE'), + 'returned metadata was not equal expected for update journey with shared DE updatecontact activity' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 22, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); }); describe('Templating ================', () => { @@ -545,7 +647,7 @@ describe('type: journey', () => { assert.equal( testUtils.getAPIHistoryLength(), - 29, + 31, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -741,7 +843,7 @@ describe('type: journey', () => { assert.equal( testUtils.getAPIHistoryLength(), - 35, + 37, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -776,7 +878,7 @@ describe('type: journey', () => { assert.equal( testUtils.getAPIHistoryLength(), - 35, + 37, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -811,7 +913,7 @@ describe('type: journey', () => { assert.equal( testUtils.getAPIHistoryLength(), - 35, + 37, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; diff --git a/test/type.query.test.js b/test/type.query.test.js index 9848483aa..f788a8a31 100644 --- a/test/type.query.test.js +++ b/test/type.query.test.js @@ -27,8 +27,8 @@ describe('type: query', () => { const result = cache.getCache(); assert.equal( result.query ? Object.keys(result.query).length : 0, - 4, - 'only 4 queries expected' + 5, + 'only 5 queries expected' ); // normal test assert.deepEqual( @@ -54,6 +54,37 @@ describe('type: query', () => { return; }); + it('Should resolve shared dataExtensions in query when retrieved together with dataExtension', async () => { + // WHEN + // this test verifies the fix for: shared DEs not resolved if query+dataExtension is retrieved together + await handler.retrieve('testInstance/testBU', ['dataExtension', 'query']); + // THEN + assert.equal(process.exitCode, 0, 'retrieve should not have thrown an error'); + // get results from cache + const result = cache.getCache(); + assert.equal( + result.query ? Object.keys(result.query).length : 0, + 5, + 'only 5 queries expected' + ); + // verify that shared DE was resolved correctly in query (this is the key bug fix check) + assert.deepEqual( + await testUtils.getActualJson('testExisting_query_SharedDE', 'query'), + await testUtils.getExpectedJson('9999999', 'query', 'get_sharedDE'), + 'returned metadata was not equal expected - shared DE should be resolved even when dataExtension is retrieved together with query' + ); + expect( + await testUtils.getActualFile('testExisting_query_SharedDE', 'query', 'sql') + ).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'get_sharedDE', 'sql')); + + assert.equal( + testUtils.getAPIHistoryLength(), + 8, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + it('Should retrieve one specific query by key', async () => { // WHEN await handler.retrieve('testInstance/testBU', ['query'], ['testExisting_query']); @@ -92,8 +123,8 @@ describe('type: query', () => { const result = cache.getCache(); assert.equal( result.query ? Object.keys(result.query).length : 0, - 4, - '4 queries in cache expected' + 5, + '5 queries in cache expected' ); assert.deepEqual( await testUtils.getActualJson('testExisting_query', 'query'), @@ -123,8 +154,8 @@ describe('type: query', () => { const result = cache.getCache(); assert.equal( result.query ? Object.keys(result.query).length : 0, - 4, - '4 queries in cache expected' + 5, + '5 queries in cache expected' ); expect(await testUtils.getActualFile('testExisting_query', 'query', 'sql')).to.not @@ -165,8 +196,8 @@ describe('type: query', () => { const result = cache.getCache(); assert.equal( result.query ? Object.keys(result.query).length : 0, - 5, - '5 queries expected in cache' + 6, + '6 queries expected in cache' ); // confirm created item assert.deepEqual( @@ -784,6 +815,72 @@ describe('type: query', () => { return; }); + it('Should warn about shared dataExtension in _ParentBU_ when running buildTemplate with --dependencies on child BU', async () => { + // Retrieve shared DEs from _ParentBU_ to disk first + await handler.retrieve('testInstance/_ParentBU_', ['dataExtension']); + assert.equal( + process.exitCode, + 0, + '_ParentBU_ retrieve should not have thrown an error' + ); + const expectedApiCallsParentBURetrieve = 4; + assert.equal( + testUtils.getAPIHistoryLength(), + expectedApiCallsParentBURetrieve, + 'Unexpected number of requests for _ParentBU_ dataExtension retrieve' + ); + + // Retrieve query from child BU (testBU) + await handler.retrieve('testInstance/testBU', ['query']); + assert.equal( + process.exitCode, + 0, + 'testBU query retrieve should not have thrown an error' + ); + const expectedApiCallsTestBURetrieve = 5; + assert.equal( + testUtils.getAPIHistoryLength() - expectedApiCallsParentBURetrieve, + expectedApiCallsTestBURetrieve, + 'Unexpected number of requests for testBU query retrieve' + ); + + // Run buildTemplate with --dependencies: shared DE must show a warning, not be included in result + handler.setOptions({ dependencies: true, skipInteraction: true }); + const templateResult = await handler.buildTemplate( + 'testInstance/testBU', + 'query', + ['testExisting_query_SharedDE'], + ['testSourceMarket'] + ); + assert.equal(process.exitCode, 0, 'buildTemplate should not have thrown an error'); + + // Verify query was templated + assert.equal( + templateResult.query ? templateResult.query.length : 0, + 1, + 'expected one query to be templated' + ); + assert.deepEqual( + await testUtils.getActualTemplateJson('testExisting_query_SharedDE', 'query'), + await testUtils.getExpectedJson('9999999', 'query', 'template_sharedDE'), + 'returned query template JSON was not equal expected' + ); + expect( + await testUtils.getActualTemplateFile('testExisting_query_SharedDE', 'query', 'sql') + ).to.equal( + await testUtils.getExpectedFile('9999999', 'query', 'template_sharedDE', 'sql') + ); + + // Verify shared DE was NOT included in template result (only a warning should be shown) + assert.equal( + templateResult.dataExtension ? templateResult.dataExtension.length : 0, + 0, + 'shared DE should not be included in the child BU template result - only a warning should be shown' + ); + + return; + }); + it('Should create a query template via buildTemplate and build it', async () => { // download first before we test buildTemplate await handler.retrieve('testInstance/testBU', ['query']);