mcdev 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +4 -4
- package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +2 -2
- package/.github/workflows/coverage-develop-branch.yml +0 -2
- package/.github/workflows/coverage-main-branch.yml +0 -2
- package/.github/workflows/coverage.yml +0 -2
- package/.husky/post-checkout +1 -0
- package/.husky/post-merge +1 -0
- package/.vscode/extensions.json +4 -0
- package/docs/dist/documentation.md +633 -286
- package/lib/Deployer.js +25 -25
- package/lib/MetadataTypeDefinitions.js +1 -1
- package/lib/MetadataTypeInfo.js +1 -1
- package/lib/Retriever.js +1 -1
- package/lib/cli.js +159 -9
- package/lib/index.js +395 -95
- package/lib/metadataTypes/Asset.js +10 -11
- package/lib/metadataTypes/AttributeGroup.js +76 -2
- package/lib/metadataTypes/AttributeSet.js +260 -0
- package/lib/metadataTypes/Automation.js +413 -96
- package/lib/metadataTypes/DataExtension.js +2 -2
- package/lib/metadataTypes/DataExtensionField.js +1 -1
- package/lib/metadataTypes/Event.js +2 -3
- package/lib/metadataTypes/Folder.js +1 -1
- package/lib/metadataTypes/Journey.js +5 -6
- package/lib/metadataTypes/MetadataType.js +149 -49
- package/lib/metadataTypes/MobileKeyword.js +8 -8
- package/lib/metadataTypes/MobileMessage.js +5 -5
- package/lib/metadataTypes/Query.js +26 -10
- package/lib/metadataTypes/Script.js +3 -3
- package/lib/metadataTypes/TransactionalSMS.js +5 -5
- package/lib/metadataTypes/TriggeredSend.js +25 -50
- package/lib/metadataTypes/User.js +7 -4
- package/lib/metadataTypes/definitions/AttributeGroup.definition.js +117 -106
- package/lib/metadataTypes/definitions/{SetDefinition.definition.js → AttributeSet.definition.js} +54 -27
- package/lib/metadataTypes/definitions/Automation.definition.js +22 -15
- package/lib/metadataTypes/definitions/ImportFile.definition.js +36 -6
- package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -0
- package/lib/util/cache.js +9 -4
- package/lib/util/cli.js +40 -0
- package/lib/util/file.js +2 -2
- package/lib/util/init.js +84 -0
- package/lib/util/util.js +121 -13
- package/package.json +11 -11
- package/test/mockRoot/.mcdevrc.json +1 -1
- package/test/mockRoot/deploy/testInstance/testBU/automation/testExisting_automation.automation-meta.json +1 -2
- package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json +5 -6
- package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testExisting_dataExtract.dataExtract-meta.json +35 -0
- package/test/mockRoot/deploy/testInstance/testBU/dataExtract/testNew_dataExtract.dataExtract-meta.json +35 -0
- package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testExisting_fileTransfer.fileTransfer-meta.json +17 -0
- package/test/mockRoot/deploy/testInstance/testBU/fileTransfer/testNew_fileTransfer.fileTransfer-meta.json +17 -0
- package/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile.importFile-meta.json +29 -0
- package/test/mockRoot/deploy/testInstance/testBU/importFile/testNew_importFile.importFile-meta.json +29 -0
- package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.json +11 -0
- package/test/mockRoot/deploy/testInstance/testBU/query/testExisting_query_fixKeys.query-meta.sql +6 -0
- package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.json +6 -0
- package/test/mockRoot/deploy/testInstance/testBU/script/testExisting_script.script-meta.ssjs +1 -0
- package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.json +6 -0
- package/test/mockRoot/deploy/testInstance/testBU/script/testNew_script.script-meta.ssjs +1 -0
- package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testExisting_triggeredSend.triggeredSend-meta.json +29 -0
- package/test/mockRoot/deploy/testInstance/testBU/triggeredSend/testNew_triggeredSend.triggeredSend-meta.json +29 -0
- package/test/resourceFactory.js +77 -12
- package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDCustomerKey=testExisting_userANDEmaillike@-response.xml +27 -0
- package/test/resources/1111111/accountUser/retrieve-ActiveFlag=falseANDEmaillike@-response.xml +156 -0
- package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +87 -0
- package/test/resources/1111111/accountUser/retrieve-ActiveFlag=trueANDEmaillike@-response.xml +156 -0
- package/test/resources/1111111/accountUser/retrieve-CustomerKey=testExisting_userANDActiveFlag=trueANDEmailisNullORNamelikeapp userANDMustChangePassword=false-response.xml +27 -0
- package/test/resources/1111111/accountUserAccount/retrieve-AccountUser.AccountUserID=700301950-response.xml +60 -0
- package/test/resources/1111111/user/retrieve-expected.md +4 -2
- package/test/resources/9999999/attributeGroup/retrieve-expected.json +25 -0
- package/test/resources/9999999/attributeSet/retrieve-expected.json +748 -0
- package/test/resources/9999999/automation/build-expected.json +1 -2
- package/test/resources/9999999/automation/create-expected.json +7 -8
- package/test/resources/9999999/automation/create-testNew_automation-expected.md +4 -4
- package/test/resources/9999999/automation/patch_fixKeys-pause-expected.json +44 -0
- package/test/resources/9999999/automation/patch_fixKeys-schedule-expected.json +44 -0
- package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
- package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_pause-response.xml +42 -0
- package/test/resources/9999999/automation/perform-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +42 -0
- package/test/resources/9999999/automation/perform-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +42 -0
- package/test/resources/9999999/automation/retrieve-expected.json +1 -2
- package/test/resources/9999999/automation/retrieve-testExisting_automation-expected.md +2 -2
- package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
- package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-ad2e-pause-response.xml +38 -0
- package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_pause-response.xml +52 -0
- package/test/resources/9999999/automation/schedule-08afb0e2-b00a-4c88-fixKey_schedule-response.xml +52 -0
- package/test/resources/9999999/automation/schedule-a8afb0e2-b00a-4c88-ad2e-1f7f8788c560-response.xml +52 -0
- package/test/resources/9999999/automation/template-expected.json +1 -2
- package/test/resources/9999999/automation/update-expected.json +1 -2
- package/test/resources/9999999/automation/update-testExisting_automation-expected.md +2 -2
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/get-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-pause/patch-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/get-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_pause/patch-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/get-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-fixKey_schedule/patch-response.json +85 -0
- package/test/resources/9999999/automation/v1/automations/a8afb0e2-b00a-4c88-ad2e-1f7f8788c560/get-response.json +1 -1
- package/test/resources/9999999/automation/v1/automations/post-response.json +20 -19
- package/test/resources/9999999/automation/v1/dataextracts/56c5370a-f988-4f36-b0ee-0f876573f6d7/patch-response.json +38 -0
- package/test/resources/9999999/automation/v1/dataextracts/post-response.json +38 -0
- package/test/resources/9999999/automation/v1/dataextracttypes/get-response.json +50 -0
- package/test/resources/9999999/automation/v1/filetransfers/72c328ac-f5b0-4e37-91d3-a775666f15a6/patch-response.json +18 -0
- package/test/resources/9999999/automation/v1/filetransfers/post-response.json +18 -0
- package/test/resources/9999999/automation/v1/ftplocations/get-response.json +18 -0
- package/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b/patch-response.json +31 -0
- package/test/resources/9999999/automation/v1/imports/get-response.json +1 -1
- package/test/resources/9999999/automation/v1/imports/post-response.json +30 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dae/actions/start/post-response.txt +1 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/get-response.json +17 -0
- package/test/resources/9999999/automation/v1/queries/549f0568-607c-4940-afef-437965094dat_fixKeys/patch-response.json +18 -0
- package/test/resources/9999999/automation/v1/queries/get-response.json +18 -1
- package/test/resources/9999999/automation/v1/scripts/39f6a488-20eb-4ba0-b0b9-023725b574e4/patch-response.json +10 -0
- package/test/resources/9999999/automation/v1/scripts/get-response.json +12 -2
- package/test/resources/9999999/automation/v1/scripts/post-response.json +10 -0
- package/test/resources/9999999/dataExtension/retrieve-Name=testExisting_dataExtension-response.xml +52 -0
- package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testExisting_dataExtension-response.xml +98 -0
- package/test/resources/9999999/dataExtensionField/retrieve-DataExtension.CustomerKey=testNew_dataExtensionORDataExtension.CustomerKey=testExisting_dataExtension-response.xml +99 -0
- package/test/resources/9999999/dataExtract/build-expected.json +35 -0
- package/test/resources/9999999/dataExtract/get-expected.json +39 -0
- package/test/resources/9999999/dataExtract/patch-expected.json +37 -0
- package/test/resources/9999999/dataExtract/post-expected.json +37 -0
- package/test/resources/9999999/dataExtract/template-expected.json +35 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=contextual_suppression_listORContentType=publicationORContentType=suppression_listORContentType=mysubsORContentType=list-response.xml +136 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=ssjsactivity-response.xml +48 -0
- package/test/resources/9999999/dataFolder/retrieve-ContentType=triggered_send_journeybuilderORContentType=triggered_sendORContentType=hidden-response.xml +276 -0
- package/test/resources/9999999/dataFolder/retrieve-response.xml +23 -0
- package/test/resources/9999999/email/retrieve-response.xml +203 -0
- package/test/resources/9999999/fileTransfer/build-expected.json +15 -0
- package/test/resources/9999999/fileTransfer/get-expected.json +17 -0
- package/test/resources/9999999/fileTransfer/patch-expected.json +17 -0
- package/test/resources/9999999/fileTransfer/post-expected.json +17 -0
- package/test/resources/9999999/fileTransfer/template-expected.json +15 -0
- package/test/resources/9999999/hub/v1/contacts/schema/attributeGroups/get-response.json +585 -0
- package/test/resources/9999999/hub/v1/contacts/schema/setDefinitions/get-response.json +19807 -0
- package/test/resources/9999999/importFile/build-expected.json +27 -0
- package/test/resources/9999999/importFile/get-expected.json +29 -0
- package/test/resources/9999999/importFile/patch-expected.json +29 -0
- package/test/resources/9999999/importFile/post-expected.json +29 -0
- package/test/resources/9999999/importFile/template-expected.json +27 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_pause-response.xml +32 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixKey_schedule-response.xml +32 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_paused-response.xml +32 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_fixedKey_scheduled-response.xml +32 -0
- package/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_pause-response.xml +30 -0
- package/test/resources/9999999/program/retrieve-response.xml +21 -3
- package/test/resources/9999999/query/patch_fixKeys-expected.json +11 -0
- package/test/resources/9999999/query/patch_fixKeys-expected.sql +6 -0
- package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixKeysANDStatus=Active-response.xml +30 -0
- package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testExisting_query_fixedKeysANDStatus=Active-response.xml +30 -0
- package/test/resources/9999999/queryDefinition/retrieve-CustomerKey=testNew_queryANDStatus=Active-response.xml +30 -0
- package/test/resources/9999999/script/build-expected.json +6 -0
- package/test/resources/9999999/script/build-expected.ssjs +1 -0
- package/test/resources/9999999/script/get-expected.json +8 -0
- package/test/resources/9999999/script/get-expected.ssjs +1 -0
- package/test/resources/9999999/script/get_noScriptTag-expected.html +1 -0
- package/test/resources/9999999/script/get_noScriptTag-expected.json +8 -0
- package/test/resources/9999999/script/patch-expected.json +8 -0
- package/test/resources/9999999/script/patch-expected.ssjs +1 -0
- package/test/resources/9999999/script/post-expected.json +8 -0
- package/test/resources/9999999/script/post-expected.ssjs +1 -0
- package/test/resources/9999999/script/template-expected.json +6 -0
- package/test/resources/9999999/script/template-expected.ssjs +1 -0
- package/test/resources/9999999/triggeredSend/build-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/get-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/patch-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/post-expected.json +29 -0
- package/test/resources/9999999/triggeredSend/template-expected.json +29 -0
- package/test/resources/9999999/triggeredSendDefinition/create-response.xml +75 -0
- package/test/resources/9999999/triggeredSendDefinition/delete-response.xml +36 -0
- package/test/resources/9999999/triggeredSendDefinition/{retrieve-response.xml → retrieve-TriggeredSendStatusINNew,Active,Inactive,Moved,Canceled-response.xml} +4 -4
- package/test/resources/9999999/triggeredSendDefinition/update-response.xml +74 -0
- package/test/type.attributeGroup.test.js +55 -0
- package/test/type.attributeSet.test.js +55 -0
- package/test/type.automation.test.js +638 -11
- package/test/type.dataExtension.test.js +0 -1
- package/test/type.dataExtract.test.js +187 -0
- package/test/type.fileTransfer.test.js +185 -0
- package/test/type.importFile.test.js +186 -0
- package/test/type.mobileKeyword.test.js +0 -1
- package/test/type.query.test.js +464 -13
- package/test/type.script.test.js +367 -0
- package/test/type.triggeredSend.test.js +152 -0
- package/test/type.user.test.js +22 -10
- package/test/utils.js +4 -1
- package/lib/metadataTypes/SetDefinition.js +0 -37
- /package/test/resources/1111111/accountUser/{retrieve-response.xml → retrieve-ActiveFlag=trueANDCustomerKey=testExisting_userANDEmaillike@-response.xml} +0 -0
- /package/test/resources/1111111/accountUserAccount/{retrieve-response.xml → retrieve-AccountUser.AccountUserIDIN700301950,700301951,7471228-response.xml} +0 -0
- /package/test/resources/1111111/businessUnit/{retrieve-response.xml → retrieve-ID=1111111-response.xml} +0 -0
- /package/test/resources/1111111/list/{retrieve-response.xml → retrieve-CustomerKey=All SubscribersORListName=All Subscribers-response.xml} +0 -0
- /package/test/resources/1111111/role/{retrieve-response.xml → retrieve-IsPrivate=false-response.xml} +0 -0
- /package/test/resources/9999999/emailSendDefinition/{retrieve-response.xml → retrieve-IsPlatformObject=falseANDDescriptionnotEqualsSFSendDefinition-response.xml} +0 -0
- /package/test/resources/9999999/queryDefinition/{retrieve-response.xml → retrieve-CustomerKey=testExisting_queryANDStatus=Active-response.xml} +0 -0
package/lib/util/cli.js
CHANGED
|
@@ -53,6 +53,46 @@ const Cli = {
|
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param {TYPE.SupportedMetadataTypes} type limit execution to given metadata type
|
|
60
|
+
* @param {TYPE.SupportedMetadataTypes[]} dependentTypes types that depent on type
|
|
61
|
+
* @returns {Promise.<boolean>} true if user wants to continue with retrieve
|
|
62
|
+
*/
|
|
63
|
+
async postFixKeysReretrieve(type, dependentTypes) {
|
|
64
|
+
if (Util.isTrue(Util.skipInteraction?.fixKeysReretrieve)) {
|
|
65
|
+
return true;
|
|
66
|
+
} else if (Util.isFalse(Util.skipInteraction?.fixKeysReretrieve)) {
|
|
67
|
+
return false;
|
|
68
|
+
} else {
|
|
69
|
+
const now = await inquirer.prompt([
|
|
70
|
+
{
|
|
71
|
+
type: 'confirm',
|
|
72
|
+
name: 'fixKeysReretrieve',
|
|
73
|
+
message: `Do you want to re-retrieve dependent types (${dependentTypes.join(
|
|
74
|
+
', '
|
|
75
|
+
)}) now?`,
|
|
76
|
+
default: true,
|
|
77
|
+
},
|
|
78
|
+
]);
|
|
79
|
+
if (Util.OPTIONS._multiBuExecution) {
|
|
80
|
+
const remember = await inquirer.prompt([
|
|
81
|
+
{
|
|
82
|
+
type: 'confirm',
|
|
83
|
+
name: 'rememberFixKeysReretrieve',
|
|
84
|
+
message: `Remember answer for other BUs?`,
|
|
85
|
+
default: true,
|
|
86
|
+
},
|
|
87
|
+
]);
|
|
88
|
+
if (remember.rememberFixKeysReretrieve) {
|
|
89
|
+
Util.skipInteraction ||= {};
|
|
90
|
+
Util.skipInteraction.fixKeysReretrieve = now.fixKeysReretrieve;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return now.fixKeysReretrieve;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
56
96
|
/**
|
|
57
97
|
* helper that logs to cli which credentials are already existing in our config file
|
|
58
98
|
*
|
package/lib/util/file.js
CHANGED
|
@@ -381,7 +381,7 @@ const File = {
|
|
|
381
381
|
* @param {string | string[]} directory directory where the file is stored
|
|
382
382
|
* @param {string} filename name of the file without '.json' ending
|
|
383
383
|
* @param {string} filetype filetype suffix
|
|
384
|
-
* @param {string} [encoding
|
|
384
|
+
* @param {string} [encoding] read file with encoding (defaults to utf-8)
|
|
385
385
|
* @returns {Promise.<string> | void} file contents; void on error
|
|
386
386
|
*/
|
|
387
387
|
readFilteredFilename: function (directory, filename, filetype, encoding) {
|
|
@@ -514,7 +514,7 @@ const File = {
|
|
|
514
514
|
/**
|
|
515
515
|
* Initalises Prettier formatting lib async.
|
|
516
516
|
*
|
|
517
|
-
* @param {string} [filetype
|
|
517
|
+
* @param {string} [filetype] filetype ie. JSON or SSJS
|
|
518
518
|
* @returns {Promise.<boolean>} success of config load
|
|
519
519
|
*/
|
|
520
520
|
async initPrettier(filetype = 'html') {
|
package/lib/util/init.js
CHANGED
|
@@ -8,6 +8,8 @@ const InitNpm = require('./init.npm');
|
|
|
8
8
|
const InitConfig = require('./init.config');
|
|
9
9
|
const inquirer = require('inquirer');
|
|
10
10
|
const Util = require('./util');
|
|
11
|
+
const fs = require('node:fs');
|
|
12
|
+
const path = require('node:path');
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* CLI helper class
|
|
@@ -22,6 +24,10 @@ const Init = {
|
|
|
22
24
|
* @returns {Promise.<void>} -
|
|
23
25
|
*/
|
|
24
26
|
async initProject(properties, credentialName) {
|
|
27
|
+
if (!(await Init._checkPathForCloud())) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
const skipInteraction = Util.skipInteraction;
|
|
26
32
|
if (!properties) {
|
|
27
33
|
// try to get cached properties because we return null in case of a crucial error
|
|
@@ -192,6 +198,10 @@ const Init = {
|
|
|
192
198
|
* @returns {Promise.<void>} -
|
|
193
199
|
*/
|
|
194
200
|
async joinProject() {
|
|
201
|
+
if (!(await Init._checkPathForCloud())) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
195
205
|
const responses = await inquirer.prompt([
|
|
196
206
|
{
|
|
197
207
|
type: 'confirm',
|
|
@@ -217,6 +227,9 @@ const Init = {
|
|
|
217
227
|
]);
|
|
218
228
|
const repoName = gitRepoQs.gitRepoUrl.split('/').pop().replace('.git', '');
|
|
219
229
|
// clone repo into current folder
|
|
230
|
+
Util.logger.info(
|
|
231
|
+
'Cloning initiated. You might be asked for your Git credentials in a pop-up window in a few seconds.'
|
|
232
|
+
);
|
|
220
233
|
Util.execSync(
|
|
221
234
|
'git',
|
|
222
235
|
[
|
|
@@ -227,6 +240,16 @@ const Init = {
|
|
|
227
240
|
gitRepoQs.gitRepoUrl,
|
|
228
241
|
].filter(Boolean)
|
|
229
242
|
);
|
|
243
|
+
|
|
244
|
+
if (!fs.existsSync(repoName)) {
|
|
245
|
+
Util.logger.error(
|
|
246
|
+
'Could not clone repository. Please check your Git-Repository URL as well as your credentials and try again.'
|
|
247
|
+
);
|
|
248
|
+
Util.logger.info(
|
|
249
|
+
'Check if you need an "API-Token" instead of your normal user password to authenticate'
|
|
250
|
+
);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
230
253
|
// make sure we switch to the new subfolder or else the rest will fail
|
|
231
254
|
process.chdir(repoName);
|
|
232
255
|
|
|
@@ -357,6 +380,10 @@ const Init = {
|
|
|
357
380
|
* @returns {Promise.<boolean>} success flag
|
|
358
381
|
*/
|
|
359
382
|
async upgradeProject(properties, initial, repoName) {
|
|
383
|
+
if (!(await Init._checkPathForCloud())) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
|
|
360
387
|
let status;
|
|
361
388
|
const versionBeforeUpgrade = properties?.version || '0.0.0';
|
|
362
389
|
if (!initial) {
|
|
@@ -390,9 +417,66 @@ const Init = {
|
|
|
390
417
|
|
|
391
418
|
return true;
|
|
392
419
|
},
|
|
420
|
+
/**
|
|
421
|
+
* check if git repo is being saved on a cloud service and warn the user
|
|
422
|
+
*
|
|
423
|
+
* @private
|
|
424
|
+
* @returns {void} throws errors if problems were found
|
|
425
|
+
*/
|
|
426
|
+
async _checkPathForCloud() {
|
|
427
|
+
const absolutePath = path.resolve('');
|
|
428
|
+
// popular cloud services and their respective default name for the absolute path
|
|
429
|
+
// * CloudDocs is the default folder name for iCloud
|
|
430
|
+
const cloudServices = ['Dropbox', 'OneDrive', 'Google Drive', 'iCloud', 'CloudDocs'];
|
|
431
|
+
let cloudServiceFound = false;
|
|
432
|
+
for (const variable in cloudServices) {
|
|
433
|
+
if (absolutePath.includes(cloudServices[variable])) {
|
|
434
|
+
Util.logger.warn(
|
|
435
|
+
`It seems your project folder will be synchronized via '${
|
|
436
|
+
cloudServices[variable] === 'CloudDocs' ? 'iCloud' : cloudServices[variable]
|
|
437
|
+
}'. This can reduce the overall performance of your computer due to conflicts with Git.`
|
|
438
|
+
);
|
|
439
|
+
Util.logger.warn(
|
|
440
|
+
`We strongly recommend moving your project folder outside of the '${
|
|
441
|
+
cloudServices[variable] === 'CloudDocs' ? 'iCloud' : cloudServices[variable]
|
|
442
|
+
}' folder.`
|
|
443
|
+
);
|
|
444
|
+
cloudServiceFound = true;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
if (!cloudServiceFound && absolutePath.includes(process.env.USERPROFILE)) {
|
|
448
|
+
// warn user to not place project folder into user profile folder
|
|
449
|
+
Util.logger.warn(
|
|
450
|
+
`It seems your project folder is located in your user profile's default folder which is often synchronized to webservices like ${cloudServices.join(
|
|
451
|
+
', '
|
|
452
|
+
)}. This can reduce the overall performance of your computer due to conflicts between with Git.`
|
|
453
|
+
);
|
|
454
|
+
Util.logger.warn(
|
|
455
|
+
`We strongly recommend moving your project folder outside of this folder.`
|
|
456
|
+
);
|
|
457
|
+
cloudServiceFound = true;
|
|
458
|
+
}
|
|
459
|
+
if (cloudServiceFound) {
|
|
460
|
+
const responses = await inquirer.prompt([
|
|
461
|
+
{
|
|
462
|
+
type: 'confirm',
|
|
463
|
+
name: 'ignoreCloudWarning',
|
|
464
|
+
message: 'Do you want to continue anyways?',
|
|
465
|
+
default: false,
|
|
466
|
+
},
|
|
467
|
+
]);
|
|
468
|
+
if (!responses.ignoreCloudWarning) {
|
|
469
|
+
Util.logger.error('Exiting due to cloud service warning');
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
return true;
|
|
474
|
+
},
|
|
475
|
+
|
|
393
476
|
/**
|
|
394
477
|
* finds credentials that are set up in config but not in auth file
|
|
395
478
|
*
|
|
479
|
+
* @private
|
|
396
480
|
* @param {TYPE.Mcdevrc} properties javascript object in .mcdevrc.json
|
|
397
481
|
* @returns {string[]} list of credential names
|
|
398
482
|
*/
|
package/lib/util/util.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
const TYPE = require('../../types/mcdev.d');
|
|
4
4
|
const MetadataDefinitions = require('./../MetadataTypeDefinitions');
|
|
5
5
|
const packageJsonMcdev = require('../../package.json');
|
|
6
|
+
const child_process = require('node:child_process');
|
|
6
7
|
const process = require('node:process');
|
|
7
8
|
const toposort = require('toposort');
|
|
8
9
|
const winston = require('winston');
|
|
9
|
-
const child_process = require('node:child_process');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Util that contains logger and simple util methods
|
|
@@ -80,6 +80,7 @@ const Util = {
|
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
+
|
|
83
84
|
/**
|
|
84
85
|
* ensure provided MarketList exists and it's content including markets and BUs checks out
|
|
85
86
|
*
|
|
@@ -130,29 +131,32 @@ const Util = {
|
|
|
130
131
|
* @returns {void}
|
|
131
132
|
*/
|
|
132
133
|
signalFatalError() {
|
|
133
|
-
Util.logger.debug('Util.signalFataError() sets process.exitCode = 1');
|
|
134
|
-
process.exitCode
|
|
134
|
+
Util.logger.debug('Util.signalFataError() sets process.exitCode = 1 unless already set');
|
|
135
|
+
process.exitCode ||= 1;
|
|
135
136
|
},
|
|
136
137
|
/**
|
|
137
|
-
* SFMC accepts multiple true values for Boolean attributes for which we are checking here
|
|
138
|
+
* SFMC accepts multiple true values for Boolean attributes for which we are checking here.
|
|
139
|
+
* The same problem occurs when evaluating boolean CLI flags
|
|
138
140
|
*
|
|
139
141
|
* @param {*} attrValue value
|
|
140
142
|
* @returns {boolean} attribute value == true ? true : false
|
|
141
143
|
*/
|
|
142
144
|
isTrue(attrValue) {
|
|
143
|
-
return ['true', 'TRUE', 'True', '1', 1, 'Y', true].includes(attrValue);
|
|
145
|
+
return ['true', 'TRUE', 'True', '1', 1, 'Y', 'y', true].includes(attrValue);
|
|
144
146
|
},
|
|
145
147
|
/**
|
|
146
|
-
* SFMC accepts multiple false values for Boolean attributes for which we are checking here
|
|
148
|
+
* SFMC accepts multiple false values for Boolean attributes for which we are checking here.
|
|
149
|
+
* The same problem occurs when evaluating boolean CLI flags
|
|
147
150
|
*
|
|
148
151
|
* @param {*} attrValue value
|
|
149
152
|
* @returns {boolean} attribute value == false ? true : false
|
|
150
153
|
*/
|
|
151
154
|
isFalse(attrValue) {
|
|
152
|
-
return ['false', 'FALSE', 'False', '0', 0, 'N', false].includes(attrValue);
|
|
155
|
+
return ['false', 'FALSE', 'False', '0', 0, 'N', 'n', false].includes(attrValue);
|
|
153
156
|
},
|
|
157
|
+
|
|
154
158
|
/**
|
|
155
|
-
* helper for
|
|
159
|
+
* helper for Mcdev.retrieve, Mcdev.retrieveAsTemplate and Mcdev.deploy
|
|
156
160
|
*
|
|
157
161
|
* @param {TYPE.SupportedMetadataTypes} selectedType type or type-subtype
|
|
158
162
|
* @param {boolean} [handleOutside] if the API reponse is irregular this allows you to handle it outside of this generic method
|
|
@@ -229,7 +233,7 @@ const Util = {
|
|
|
229
233
|
/**
|
|
230
234
|
* wrapper around our standard winston logging to console and logfile
|
|
231
235
|
*
|
|
232
|
-
* @param {boolean} [noLogFile
|
|
236
|
+
* @param {boolean} [noLogFile] optional flag to indicate if we should log to file; CLI logs are always on
|
|
233
237
|
* @returns {object} initiated logger for console and file
|
|
234
238
|
*/
|
|
235
239
|
_createNewLoggerTransport: function (noLogFile = false) {
|
|
@@ -242,13 +246,21 @@ const Util = {
|
|
|
242
246
|
// debug: 5,
|
|
243
247
|
// silly: 6
|
|
244
248
|
// }
|
|
249
|
+
if (
|
|
250
|
+
process.env.VSCODE_AMD_ENTRYPOINT === 'vs/workbench/api/node/extensionHostProcess' ||
|
|
251
|
+
process.env.VSCODE_CRASH_REPORTER_PROCESS_TYPE === 'extensionHost'
|
|
252
|
+
) {
|
|
253
|
+
Util.OPTIONS.noLogColors = true;
|
|
254
|
+
}
|
|
245
255
|
const logFileName = new Date().toISOString().split(':').join('.');
|
|
246
256
|
const transports = {
|
|
247
257
|
console: new winston.transports.Console({
|
|
248
258
|
// Write logs to Console
|
|
249
259
|
level: Util.OPTIONS.loggerLevel || 'info',
|
|
250
260
|
format: winston.format.combine(
|
|
251
|
-
|
|
261
|
+
Util.OPTIONS.noLogColors
|
|
262
|
+
? winston.format.uncolorize()
|
|
263
|
+
: winston.format.colorize(),
|
|
252
264
|
winston.format.timestamp({ format: 'HH:mm:ss' }),
|
|
253
265
|
winston.format.simple(),
|
|
254
266
|
winston.format.printf(
|
|
@@ -263,6 +275,7 @@ const Util = {
|
|
|
263
275
|
filename: 'logs/' + logFileName + '.log',
|
|
264
276
|
level: 'debug', // log everything
|
|
265
277
|
format: winston.format.combine(
|
|
278
|
+
winston.format.uncolorize(),
|
|
266
279
|
winston.format.timestamp({ format: 'HH:mm:ss.SSS' }),
|
|
267
280
|
winston.format.simple(),
|
|
268
281
|
winston.format.printf(
|
|
@@ -274,7 +287,9 @@ const Util = {
|
|
|
274
287
|
// Write logs to additional error-logfile for better visibility of errors
|
|
275
288
|
filename: 'logs/' + logFileName + '-errors.log',
|
|
276
289
|
level: 'error', // only log errors
|
|
290
|
+
lazy: true, // if true, log files will be created on demand, not at the initialization time.
|
|
277
291
|
format: winston.format.combine(
|
|
292
|
+
winston.format.uncolorize(),
|
|
278
293
|
winston.format.timestamp({ format: 'HH:mm:ss.SSS' }),
|
|
279
294
|
winston.format.simple(),
|
|
280
295
|
winston.format.printf(
|
|
@@ -296,8 +311,8 @@ const Util = {
|
|
|
296
311
|
/**
|
|
297
312
|
* initiate winston logger
|
|
298
313
|
*
|
|
299
|
-
* @param {boolean} [restart
|
|
300
|
-
* @param {boolean} [noLogFile
|
|
314
|
+
* @param {boolean} [restart] if true, logger will be restarted; otherwise, an existing logger will be used
|
|
315
|
+
* @param {boolean} [noLogFile] if false, logger will log to file; otherwise, only to console
|
|
301
316
|
* @returns {void}
|
|
302
317
|
*/
|
|
303
318
|
startLogger: function (restart = false, noLogFile = false) {
|
|
@@ -438,6 +453,7 @@ const Util = {
|
|
|
438
453
|
}
|
|
439
454
|
return str;
|
|
440
455
|
},
|
|
456
|
+
|
|
441
457
|
/**
|
|
442
458
|
* get key of an object based on the first matching value
|
|
443
459
|
*
|
|
@@ -454,6 +470,31 @@ const Util = {
|
|
|
454
470
|
throw new Error(`${val} not found in object`);
|
|
455
471
|
},
|
|
456
472
|
|
|
473
|
+
/**
|
|
474
|
+
*helper for Mcdev.fixKeys. Retrieve dependent metadata
|
|
475
|
+
*
|
|
476
|
+
* @param {string} fixedType type of the metadata passed as a parameter to fixKeys function
|
|
477
|
+
* @returns {string[]} array of types that depend on the given type
|
|
478
|
+
*/
|
|
479
|
+
getDependentMetadata(fixedType) {
|
|
480
|
+
const dependencies = new Set();
|
|
481
|
+
|
|
482
|
+
for (const dependentType of Object.keys(MetadataDefinitions)) {
|
|
483
|
+
if (MetadataDefinitions[dependentType].dependencies.includes(fixedType)) {
|
|
484
|
+
// fixedType was found as a dependency of dependentType
|
|
485
|
+
dependencies.add(dependentType);
|
|
486
|
+
} else if (
|
|
487
|
+
MetadataDefinitions[dependentType].dependencies.some((dependency) =>
|
|
488
|
+
dependency.startsWith(fixedType + '-')
|
|
489
|
+
)
|
|
490
|
+
) {
|
|
491
|
+
// if MetadataTypeDefinitions[dependentType].dependencies start with type then also add dependentType to the set; use some to check if any of the dependencies start with type
|
|
492
|
+
dependencies.add(dependentType);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return [...dependencies];
|
|
496
|
+
},
|
|
497
|
+
|
|
457
498
|
/**
|
|
458
499
|
* Returns Order in which metadata needs to be retrieved/deployed
|
|
459
500
|
*
|
|
@@ -736,7 +777,7 @@ const Util = {
|
|
|
736
777
|
});
|
|
737
778
|
},
|
|
738
779
|
/**
|
|
739
|
-
* helper for
|
|
780
|
+
* helper for Asset.extractCode and Script.prepExtractedCode to determine if a code block is a valid SSJS block
|
|
740
781
|
*
|
|
741
782
|
* @example the following is invalid:
|
|
742
783
|
* <script runat="server">
|
|
@@ -780,6 +821,73 @@ const Util = {
|
|
|
780
821
|
// no script found
|
|
781
822
|
return null;
|
|
782
823
|
},
|
|
824
|
+
/**
|
|
825
|
+
* allows us to filter just like with SQL's LIKE operator
|
|
826
|
+
*
|
|
827
|
+
* @param {string} testString field value to test
|
|
828
|
+
* @param {string} search search string in SQL LIKE format
|
|
829
|
+
* @returns {boolean} true if testString matches search
|
|
830
|
+
*/
|
|
831
|
+
stringLike(testString, search) {
|
|
832
|
+
if (typeof search !== 'string' || this === null) {
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
// Remove special chars
|
|
836
|
+
search = search.replaceAll(
|
|
837
|
+
new RegExp('([\\.\\\\\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:\\-])', 'g'),
|
|
838
|
+
'\\$1'
|
|
839
|
+
);
|
|
840
|
+
// Replace % and _ with equivalent regex
|
|
841
|
+
search = search.replaceAll('%', '.*').replaceAll('_', '.');
|
|
842
|
+
// Check matches
|
|
843
|
+
return new RegExp('^' + search + '$', 'gi').test(testString);
|
|
844
|
+
},
|
|
845
|
+
/**
|
|
846
|
+
* returns true if no LIKE filter is defined or if all filters match
|
|
847
|
+
*
|
|
848
|
+
* @param {TYPE.MetadataTypeItem} metadata a single metadata item
|
|
849
|
+
* @param {object} [filters] only used in recursive calls
|
|
850
|
+
* @returns {boolean} true if no LIKE filter is defined or if all filters match
|
|
851
|
+
*/
|
|
852
|
+
fieldsLike(metadata, filters) {
|
|
853
|
+
if (metadata.json && metadata.codeArr) {
|
|
854
|
+
// Compensate for CodeExtractItem format
|
|
855
|
+
metadata = metadata.json;
|
|
856
|
+
}
|
|
857
|
+
filters ||= Util.OPTIONS.like;
|
|
858
|
+
if (!filters) {
|
|
859
|
+
return true;
|
|
860
|
+
}
|
|
861
|
+
const fields = Object.keys(filters);
|
|
862
|
+
return fields.every((field) => {
|
|
863
|
+
// to allow passing in an array via cli, e.g. --like=field1,field2, we need to convert comma separated lists into arrays
|
|
864
|
+
const filter =
|
|
865
|
+
typeof filters[field] === 'string' && filters[field].includes(',')
|
|
866
|
+
? filters[field].split(',')
|
|
867
|
+
: filters[field];
|
|
868
|
+
if (Array.isArray(metadata[field])) {
|
|
869
|
+
return metadata[field].some((f) => Util.fieldsLike(f, filter));
|
|
870
|
+
} else {
|
|
871
|
+
if (typeof filter === 'string') {
|
|
872
|
+
return Util.stringLike(metadata[field], filter);
|
|
873
|
+
} else if (Array.isArray(filter)) {
|
|
874
|
+
return filter.some((f) => Util.stringLike(metadata[field], f));
|
|
875
|
+
} else if (typeof filter === 'object') {
|
|
876
|
+
return Util.fieldsLike(metadata[field], filter);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return false;
|
|
880
|
+
});
|
|
881
|
+
},
|
|
882
|
+
/**
|
|
883
|
+
* helper used by SOAP methods to ensure the type always uses an upper-cased first letter
|
|
884
|
+
*
|
|
885
|
+
* @param {string} str string to capitalize
|
|
886
|
+
* @returns {string} str with first letter capitalized
|
|
887
|
+
*/
|
|
888
|
+
capitalizeFirstLetter(str) {
|
|
889
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
890
|
+
},
|
|
783
891
|
};
|
|
784
892
|
|
|
785
893
|
Util.startLogger(false, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcdev",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Accenture Salesforce Marketing Cloud DevTools",
|
|
5
5
|
"author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"command-exists": "1.2.9",
|
|
64
64
|
"conf": "10.2.0",
|
|
65
65
|
"console.table": "0.10.0",
|
|
66
|
-
"deep-equal": "2.2.
|
|
66
|
+
"deep-equal": "2.2.2",
|
|
67
67
|
"fs-extra": "11.1.0",
|
|
68
68
|
"inquirer": "8.2.5",
|
|
69
69
|
"json-to-table": "4.2.1",
|
|
@@ -71,30 +71,30 @@
|
|
|
71
71
|
"p-limit": "3.1.0",
|
|
72
72
|
"prettier": "2.8.8",
|
|
73
73
|
"prettier-plugin-sql": "0.14.0",
|
|
74
|
-
"semver": "7.5.
|
|
74
|
+
"semver": "7.5.4",
|
|
75
75
|
"sfmc-sdk": "1.0.1",
|
|
76
76
|
"simple-git": "3.18.0",
|
|
77
77
|
"toposort": "2.0.2",
|
|
78
78
|
"update-notifier": "5.1.0",
|
|
79
|
-
"winston": "3.
|
|
79
|
+
"winston": "3.10.0",
|
|
80
80
|
"yargs": "17.7.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"assert": "2.0.0",
|
|
84
|
-
"axios-mock-adapter": "1.21.
|
|
84
|
+
"axios-mock-adapter": "1.21.5",
|
|
85
85
|
"chai": "4.3.7",
|
|
86
86
|
"chai-files": "1.4.0",
|
|
87
|
-
"eslint": "8.
|
|
88
|
-
"eslint-config-prettier": "
|
|
87
|
+
"eslint": "8.46.0",
|
|
88
|
+
"eslint-config-prettier": "9.0.0",
|
|
89
89
|
"eslint-config-ssjs": "1.1.11",
|
|
90
|
-
"eslint-plugin-jsdoc": "46.
|
|
90
|
+
"eslint-plugin-jsdoc": "46.4.6",
|
|
91
91
|
"eslint-plugin-mocha": "10.1.0",
|
|
92
92
|
"eslint-plugin-prettier": "4.2.1",
|
|
93
|
-
"eslint-plugin-unicorn": "
|
|
94
|
-
"fast-xml-parser": "4.2.
|
|
93
|
+
"eslint-plugin-unicorn": "48.0.0",
|
|
94
|
+
"fast-xml-parser": "4.2.7",
|
|
95
95
|
"husky": "8.0.3",
|
|
96
96
|
"jsdoc-to-markdown": "8.0.0",
|
|
97
|
-
"lint-staged": "13.2.
|
|
97
|
+
"lint-staged": "13.2.3",
|
|
98
98
|
"mocha": "10.2.0",
|
|
99
99
|
"mock-fs": "5.2.0",
|
|
100
100
|
"npm-check": "6.0.1",
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"endDate": "2022-07-30T00:00:00",
|
|
8
8
|
"icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1",
|
|
9
9
|
"startDate": "2022-07-30T00:00:00",
|
|
10
|
-
"timezoneName": "W. Europe Standard Time"
|
|
11
|
-
"typeId": 3
|
|
10
|
+
"timezoneName": "W. Europe Standard Time"
|
|
12
11
|
},
|
|
13
12
|
"status": "PausedSchedule",
|
|
14
13
|
"steps": [
|
package/test/mockRoot/deploy/testInstance/testBU/automation/testNew_automation.automation-meta.json
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
"name": "testNew_automation",
|
|
5
5
|
"r__folder_Path": "my automations",
|
|
6
6
|
"schedule": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"timezoneName": "W. Europe Standard Time"
|
|
11
|
-
"typeId": 3
|
|
7
|
+
"startDate": "2020-05-14T02:30:32.11",
|
|
8
|
+
"endDate": "2079-06-06T21:00:00",
|
|
9
|
+
"icalRecur": "FREQ=MINUTELY;UNTIL=20790607T050000;INTERVAL=5",
|
|
10
|
+
"timezoneName": "W. Europe Standard Time"
|
|
12
11
|
},
|
|
13
|
-
"status": "
|
|
12
|
+
"status": "Scheduled",
|
|
14
13
|
"steps": [
|
|
15
14
|
{
|
|
16
15
|
"activities": [
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testExisting_dataExtract",
|
|
3
|
+
"key": "testExisting_dataExtract",
|
|
4
|
+
"description": "updated on deploy",
|
|
5
|
+
"r__dataExtractType_name": "Data Extension Extract",
|
|
6
|
+
"fileSpec": "testExisting-%%Year%%-%%Month%%-%%Day%%",
|
|
7
|
+
"intervalType": 0,
|
|
8
|
+
"dataFields": [
|
|
9
|
+
{
|
|
10
|
+
"name": "ColumnDelimiter",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"value": ","
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "DECustomerKey",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"value": "testExisting_dataExtension"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "HasColumnHeaders",
|
|
21
|
+
"type": "bool",
|
|
22
|
+
"value": "False"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "TextQualified",
|
|
26
|
+
"type": "bool",
|
|
27
|
+
"value": "False"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "UsesLineFeed",
|
|
31
|
+
"type": "bool",
|
|
32
|
+
"value": "False"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testNew_dataExtract",
|
|
3
|
+
"key": "testNew_dataExtract",
|
|
4
|
+
"description": "created via deploy",
|
|
5
|
+
"r__dataExtractType_name": "Data Extension Extract",
|
|
6
|
+
"fileSpec": "testNew-%%Year%%-%%Month%%-%%Day%%",
|
|
7
|
+
"intervalType": 0,
|
|
8
|
+
"dataFields": [
|
|
9
|
+
{
|
|
10
|
+
"name": "ColumnDelimiter",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"value": ","
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "DECustomerKey",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"value": "testExisting_dataExtension"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "HasColumnHeaders",
|
|
21
|
+
"type": "bool",
|
|
22
|
+
"value": "False"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "TextQualified",
|
|
26
|
+
"type": "bool",
|
|
27
|
+
"value": "False"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "UsesLineFeed",
|
|
31
|
+
"type": "bool",
|
|
32
|
+
"value": "False"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"createdDate": "2022-11-09T05:31:56.477",
|
|
3
|
+
"customerKey": "testExisting_fileTransfer",
|
|
4
|
+
"description": "17.11.2022",
|
|
5
|
+
"fileSpec": "%%Year%% updated via deploy",
|
|
6
|
+
"isCompressed": false,
|
|
7
|
+
"isEncrypted": false,
|
|
8
|
+
"isFileSpecLocalized": false,
|
|
9
|
+
"isPgp": false,
|
|
10
|
+
"isUpload": true,
|
|
11
|
+
"maxFileAge": 0,
|
|
12
|
+
"maxFileAgeScheduleOffset": 0,
|
|
13
|
+
"maxImportFrequency": 0,
|
|
14
|
+
"modifiedDate": "2022-11-17T07:13:20.05",
|
|
15
|
+
"name": "testExisting_fileTransfer",
|
|
16
|
+
"r__fileLocation_name": "ExactTarget Enhanced FTP"
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"createdDate": "2022-11-09T05:31:56.477",
|
|
3
|
+
"customerKey": "testNew_fileTransfer",
|
|
4
|
+
"description": "17.11.2022",
|
|
5
|
+
"fileSpec": "%%Year%% created on deploy",
|
|
6
|
+
"isCompressed": false,
|
|
7
|
+
"isEncrypted": false,
|
|
8
|
+
"isFileSpecLocalized": false,
|
|
9
|
+
"isPgp": false,
|
|
10
|
+
"isUpload": true,
|
|
11
|
+
"maxFileAge": 0,
|
|
12
|
+
"maxFileAgeScheduleOffset": 0,
|
|
13
|
+
"maxImportFrequency": 0,
|
|
14
|
+
"modifiedDate": "2022-11-17T07:13:20.05",
|
|
15
|
+
"name": "testNew_fileTransfer",
|
|
16
|
+
"r__fileLocation_name": "ExactTarget Enhanced FTP"
|
|
17
|
+
}
|