diff --git a/@types/lib/index.d.ts.map b/@types/lib/index.d.ts.map index ec4c21b31..46000031f 100644 --- a/@types/lib/index.d.ts.map +++ b/@types/lib/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":";uBAwBa,OAAO,qBAAqB,EAAE,QAAQ;0BACtC,OAAO,qBAAqB,EAAE,WAAW;8BACzC,OAAO,qBAAqB,EAAE,eAAe;2BAC7C,OAAO,qBAAqB,EAAE,YAAY;sBAC1C,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;8BAClD,OAAO,qBAAqB,EAAE,eAAe;gCAC7C,OAAO,qBAAqB,EAAE,iBAAiB;0BAC/C,OAAO,qBAAqB,EAAE,WAAW;2BACzC,OAAO,qBAAqB,EAAE,YAAY;0BAC1C,OAAO,qBAAqB,EAAE,WAAW;0CACzC,OAAO,qBAAqB,EAAE,2BAA2B;AAlBtE;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH;IACI;;OAEG;IACH,kBAFa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,4CAHW,eAAe,GACb,IAAI,CAIhB;IAED;;;;;;;;OAQG;IACH,6BALG;QAAuB,MAAM,GAArB,OAAO;QACQ,OAAO,GAAtB,OAAO;QACQ,KAAK,GAApB,OAAO;KACf,GAAU,IAAI,CAIhB;IAED;;;;;OAKG;IACH,wBAHW,MAAM,GACJ,IAAI,CAyDhB;IAED;;;;;;;;;;OAUG;IACH,4BAPG;QAAsB,KAAK,GAAnB,MAAM;QAEQ,MAAM,GAApB,MAA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iBACN,MAAM,EAAE,GAAG,YAAY,SACvB,MAAM,EAAE,GACN,OAAO,CAAE;YAAQ,MAAM,GAAE,MAAM;KAAC,CAAC,CA4E7C;IAED;;;;;;;;OAQG;IACH,qCANW,SAAS,GAAC,OAAO,GAAC,MAAM,GAAC,SAAS,GAAC,UAAU,GAAC,SAAS,GAAC,oBAAoB,gBAC5E,MAAM,kBACN,MAAM,EAAE,GAAG,YAAY,SACvB,MAAM,EAAE,GACN,OAAO,CAAE;YAAQ,MAAM,GAAE;gBAAQ,MAAM,GAAE,MAAM,EAAE;SAAC;KAAC,CAAC,CAiNhE;IAED;;;;;;;;;OASG;IACH,mCAPW,SAAS,GAAC,OAAO,GAAC,MAAM,GAAC,SAAS,GAAC,UAAU,GAAC,SAAS,GAAC,oBAAoB,QAC5E,MAAM,MACN,MAAM,SACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAuD9B;IAED;;;;;;OAMG;IACH,kDAJW,MAAM,YACN,QAAQ,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CA0D9B;IAED;;;;;;;;OAQG;IACH,6BANW,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CA0E9B;IAED;;;;;;;;OAQG;IACH,wCANW,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAyE9B;IAED;;;;;;;OAOG;IACH,yCALW,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,uBACzB,MAAM,EAAE,cACR,OAAO,GACL,YAAY,CA4FxB;CACJ"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 41c9b59a4..cf8c2cbf5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2221,36 +2221,53 @@ class Mcdev { } const metadataOptionMap = metadataOption.map((item) => { const itemArr = item.split(':'); + const type = itemArr.shift(); switch (itemArr.length) { - case 1: { - return { type: itemArr[0] }; + case 0: { + // no ":" found + return { type }; } - case 2: { + case 1: { + // 1 ":" found if (allowedIdentifiers.includes('key')) { - return { type: itemArr[0], key: itemArr[1] }; + return { type, key: itemArr[0] }; } break; } - case 3: { - switch (itemArr[1]) { + default: { + // 2 or more ":" found + switch (itemArr[0]) { case 'key': case 'k': { if (allowedIdentifiers.includes('key')) { - return { type: itemArr[0], key: itemArr[2] }; + // remove k/key + itemArr.shift(); + return { type, key: itemArr.join(':') }; } break; } case 'id': case 'i': { if (allowedIdentifiers.includes('id')) { - return { type: itemArr[0], id: itemArr[2] }; + // remove i/id + itemArr.shift(); + return { type, id: itemArr.join(':') }; } break; } case 'name': case 'n': { if (allowedIdentifiers.includes('name')) { - return { type: itemArr[0], name: itemArr[2] }; + // remove n/name + itemArr.shift(); + return { type, name: itemArr.join(':') }; + } + break; + } + default: { + // assume ":" is part of the key (e.g. possible for DE-fields) + if (allowedIdentifiers.includes('key')) { + return { type, key: itemArr.join(':') }; } } }