mcdev 5.3.0 → 6.0.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 +1 -1
- package/.github/ISSUE_TEMPLATE/bug.yml +1 -0
- package/.github/workflows/code-test.yml +1 -1
- package/.github/workflows/coverage-base-update.yml +1 -1
- package/.github/workflows/coverage-develop-branch.yml +2 -2
- package/.github/workflows/coverage-main-branch.yml +2 -2
- package/.github/workflows/coverage.yml +2 -2
- package/.github/workflows/npm-publish.yml +2 -2
- package/.prettierrc +7 -0
- package/docs/dist/documentation.md +9 -494
- package/jsconfig.json +5 -1
- package/lib/Builder.js +8 -8
- package/lib/Deployer.js +10 -10
- package/lib/MetadataTypeDefinitions.js +73 -39
- package/lib/MetadataTypeInfo.js +72 -38
- package/lib/Retriever.js +8 -8
- package/lib/cli.js +6 -6
- package/lib/index.js +24 -17
- package/lib/metadataTypes/Asset.js +12 -10
- package/lib/metadataTypes/AttributeGroup.js +7 -6
- package/lib/metadataTypes/AttributeSet.js +8 -7
- package/lib/metadataTypes/Automation.js +8 -8
- package/lib/metadataTypes/Campaign.js +7 -6
- package/lib/metadataTypes/ContentArea.js +7 -6
- package/lib/metadataTypes/DataExtension.js +16 -16
- package/lib/metadataTypes/DataExtensionField.js +6 -5
- package/lib/metadataTypes/DataExtensionTemplate.js +5 -4
- package/lib/metadataTypes/DataExtract.js +8 -7
- package/lib/metadataTypes/DataExtractType.js +5 -4
- package/lib/metadataTypes/Discovery.js +6 -5
- package/lib/metadataTypes/Email.js +6 -5
- package/lib/metadataTypes/EmailSend.js +7 -6
- package/lib/metadataTypes/Event.js +8 -7
- package/lib/metadataTypes/FileLocation.js +5 -4
- package/lib/metadataTypes/FileTransfer.js +8 -7
- package/lib/metadataTypes/Filter.js +5 -4
- package/lib/metadataTypes/Folder.js +9 -8
- package/lib/metadataTypes/ImportFile.js +8 -7
- package/lib/metadataTypes/Journey.js +9 -8
- package/lib/metadataTypes/List.js +9 -8
- package/lib/metadataTypes/MetadataType.js +37 -29
- package/lib/metadataTypes/MobileCode.js +5 -4
- package/lib/metadataTypes/MobileKeyword.js +8 -7
- package/lib/metadataTypes/MobileMessage.js +8 -7
- package/lib/metadataTypes/Query.js +9 -8
- package/lib/metadataTypes/Role.js +8 -7
- package/lib/metadataTypes/Script.js +7 -6
- package/lib/metadataTypes/SendClassification.js +5 -4
- package/lib/metadataTypes/TransactionalEmail.js +8 -7
- package/lib/metadataTypes/TransactionalMessage.js +6 -5
- package/lib/metadataTypes/TransactionalPush.js +7 -6
- package/lib/metadataTypes/TransactionalSMS.js +9 -8
- package/lib/metadataTypes/TriggeredSend.js +15 -12
- package/lib/metadataTypes/User.js +8 -7
- package/lib/metadataTypes/Verification.js +8 -8
- package/lib/metadataTypes/definitions/Asset.definition.js +1 -1
- package/lib/metadataTypes/definitions/AttributeGroup.definition.js +1 -1
- package/lib/metadataTypes/definitions/AttributeSet.definition.js +1 -1
- package/lib/metadataTypes/definitions/Automation.definition.js +1 -1
- package/lib/metadataTypes/definitions/Campaign.definition.js +1 -1
- package/lib/metadataTypes/definitions/ContentArea.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtension.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtensionField.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtensionTemplate.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtract.definition.js +1 -1
- package/lib/metadataTypes/definitions/DataExtractType.definition.js +1 -1
- package/lib/metadataTypes/definitions/Discovery.definition.js +1 -1
- package/lib/metadataTypes/definitions/Email.definition.js +1 -1
- package/lib/metadataTypes/definitions/EmailSend.definition.js +1 -1
- package/lib/metadataTypes/definitions/Event.definition.js +1 -1
- package/lib/metadataTypes/definitions/FileLocation.definition.js +1 -1
- package/lib/metadataTypes/definitions/FileTransfer.definition.js +1 -1
- package/lib/metadataTypes/definitions/Filter.definition.js +1 -1
- package/lib/metadataTypes/definitions/Folder.definition.js +1 -1
- package/lib/metadataTypes/definitions/ImportFile.definition.js +1 -1
- package/lib/metadataTypes/definitions/Journey.definition.js +1 -1
- package/lib/metadataTypes/definitions/List.definition.js +1 -1
- package/lib/metadataTypes/definitions/MobileCode.definition.js +1 -1
- package/lib/metadataTypes/definitions/MobileKeyword.definition.js +1 -1
- package/lib/metadataTypes/definitions/MobileMessage.definition.js +1 -1
- package/lib/metadataTypes/definitions/Query.definition.js +1 -1
- package/lib/metadataTypes/definitions/Role.definition.js +1 -1
- package/lib/metadataTypes/definitions/Script.definition.js +1 -1
- package/lib/metadataTypes/definitions/SendClassification.definition.js +1 -1
- package/lib/metadataTypes/definitions/TransactionalEmail.definition.js +1 -1
- package/lib/metadataTypes/definitions/TransactionalPush.definition.js +1 -1
- package/lib/metadataTypes/definitions/TransactionalSMS.definition.js +1 -1
- package/lib/metadataTypes/definitions/TriggeredSend.definition.js +1 -1
- package/lib/metadataTypes/definitions/User.definition.js +1 -1
- package/lib/metadataTypes/definitions/Verification.definition.js +1 -1
- package/lib/retrieveChangelog.js +4 -3
- package/lib/util/auth.js +11 -8
- package/lib/util/businessUnit.js +5 -5
- package/lib/util/cache.js +3 -3
- package/lib/util/cli.js +15 -13
- package/lib/util/config.js +10 -7
- package/lib/util/devops.js +12 -11
- package/lib/util/file.js +15 -14
- package/lib/util/init.config.js +11 -9
- package/lib/util/init.git.js +8 -7
- package/lib/util/init.js +12 -12
- package/lib/util/init.npm.js +7 -5
- package/lib/util/util.js +14 -12
- package/package.json +31 -26
- package/test/general.test.js +4 -6
- package/test/mockRoot/.mcdevrc.json +1 -1
- package/test/resourceFactory.js +52 -26
- package/test/type.attributeGroup.test.js +5 -8
- package/test/type.attributeSet.test.js +5 -8
- package/test/type.automation.test.js +5 -9
- package/test/type.dataExtension.test.js +5 -9
- package/test/type.dataExtract.test.js +5 -6
- package/test/type.fileTransfer.test.js +5 -6
- package/test/type.importFile.test.js +5 -6
- package/test/type.journey.test.js +5 -6
- package/test/type.mobileKeyword.test.js +5 -7
- package/test/type.mobileMessage.test.js +5 -7
- package/test/type.query.test.js +5 -8
- package/test/type.script.test.js +5 -8
- package/test/type.transactionalEmail.test.js +5 -6
- package/test/type.transactionalPush.test.js +5 -6
- package/test/type.transactionalSMS.test.js +5 -7
- package/test/type.triggeredSend.test.js +5 -6
- package/test/type.user.test.js +6 -8
- package/test/type.verification.test.js +5 -6
- package/test/utils.js +61 -47
- package/types/mcdev.d.js +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* DataExtract MetadataType
|
|
@@ -160,6 +160,7 @@ class DataExtract extends MetadataType {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// Assign definition to static attributes
|
|
163
|
-
|
|
163
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
164
|
+
DataExtract.definition = MetadataTypeDefinitions.dataExtract;
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
export default DataExtract;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* DataExtractType MetadataType
|
|
@@ -34,6 +34,7 @@ class DataExtractType extends MetadataType {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// Assign definition to static attributes
|
|
37
|
-
|
|
37
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
38
|
+
DataExtractType.definition = MetadataTypeDefinitions.dataExtractType;
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
export default DataExtractType;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ImportFile MetadataType
|
|
@@ -48,6 +48,7 @@ class Discovery extends MetadataType {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// Assign definition to static attributes
|
|
51
|
-
|
|
51
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
52
|
+
Discovery.definition = MetadataTypeDefinitions.discovery;
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
export default Discovery;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Email MetadataType
|
|
@@ -87,6 +87,7 @@ class Email extends MetadataType {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// Assign definition to static attributes
|
|
90
|
-
|
|
90
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
91
|
+
Email.definition = MetadataTypeDefinitions.email;
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
export default Email;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import cache from '../util/cache.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* MessageSendActivity MetadataType
|
|
@@ -292,6 +292,7 @@ class EmailSend extends MetadataType {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
// Assign definition to static attributes
|
|
295
|
-
|
|
295
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
296
|
+
EmailSend.definition = MetadataTypeDefinitions.emailSend;
|
|
296
297
|
|
|
297
|
-
|
|
298
|
+
export default EmailSend;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Event MetadataType
|
|
@@ -213,6 +213,7 @@ class Event extends MetadataType {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// Assign definition to static attributes
|
|
216
|
-
|
|
216
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
217
|
+
Event.definition = MetadataTypeDefinitions.event;
|
|
217
218
|
|
|
218
|
-
|
|
219
|
+
export default Event;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* ImportFile MetadataType
|
|
@@ -34,6 +34,7 @@ class FtpLocation extends MetadataType {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// Assign definition to static attributes
|
|
37
|
-
|
|
37
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
38
|
+
FtpLocation.definition = MetadataTypeDefinitions.fileLocation;
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
export default FtpLocation;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* FileTransfer MetadataType
|
|
@@ -165,6 +165,7 @@ class FileTransfer extends MetadataType {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
// Assign definition to static attributes
|
|
168
|
-
|
|
168
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
169
|
+
FileTransfer.definition = MetadataTypeDefinitions.fileTransfer;
|
|
169
170
|
|
|
170
|
-
|
|
171
|
+
export default FileTransfer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Filter MetadataType
|
|
@@ -27,6 +27,7 @@ class Filter extends MetadataType {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Assign definition to static attributes
|
|
30
|
-
|
|
30
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
31
|
+
Filter.definition = MetadataTypeDefinitions.filter;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
export default Filter;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import toposort from 'toposort';
|
|
6
|
+
import { Util } from '../util/util.js';
|
|
7
|
+
import File from '../util/file.js';
|
|
8
|
+
import cache from '../util/cache.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Folder MetadataType
|
|
@@ -629,6 +629,7 @@ class Folder extends MetadataType {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
// Assign definition to static attributes
|
|
632
|
-
|
|
632
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
633
|
+
Folder.definition = MetadataTypeDefinitions.folder;
|
|
633
634
|
|
|
634
|
-
|
|
635
|
+
export default Folder;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ImportFile MetadataType
|
|
@@ -232,6 +232,7 @@ class ImportFile extends MetadataType {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
// Assign definition to static attributes
|
|
235
|
-
|
|
235
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
236
|
+
ImportFile.definition = MetadataTypeDefinitions.importFile;
|
|
236
237
|
|
|
237
|
-
|
|
238
|
+
export default ImportFile;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import TransactionalEmail from './TransactionalEmail.js';
|
|
6
|
+
import { Util } from '../util/util.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
|
+
import File from '../util/file.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Journey MetadataType
|
|
@@ -936,6 +936,7 @@ class Journey extends MetadataType {
|
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
// Assign definition to static attributes
|
|
939
|
-
|
|
939
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
940
|
+
Journey.definition = MetadataTypeDefinitions.journey;
|
|
940
941
|
|
|
941
|
-
|
|
942
|
+
export default Journey;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import Folder from './Folder.js';
|
|
6
|
+
import { Util } from '../util/util.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
|
+
import auth from '../util/auth.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* List MetadataType
|
|
@@ -205,6 +205,7 @@ class List extends MetadataType {
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
// Assign definition to static attributes
|
|
208
|
-
|
|
208
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
209
|
+
List.definition = MetadataTypeDefinitions.list;
|
|
209
210
|
|
|
210
|
-
|
|
211
|
+
export default List;
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* in the generic version of the method
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
11
|
+
|
|
12
|
+
import { Util } from '../util/util.js';
|
|
13
|
+
import File from '../util/file.js';
|
|
14
|
+
import cache from '../util/cache.js';
|
|
15
|
+
import deepEqual from 'deep-equal';
|
|
16
|
+
import pLimit from 'p-limit';
|
|
17
|
+
import Mustache from 'mustache';
|
|
18
18
|
/**
|
|
19
19
|
* ensure that Mustache does not escape any characters
|
|
20
20
|
*
|
|
@@ -1648,27 +1648,35 @@ class MetadataType {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
|
|
1650
1650
|
const postRetrieveData = results[originalKey];
|
|
1651
|
+
// normalize results[metadataEntry]
|
|
1652
|
+
results[originalKey] = postRetrieveData.json;
|
|
1653
|
+
|
|
1654
|
+
if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
|
|
1655
|
+
Util.logger.debug(`Filtered ${originalKey} because of --like option`);
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1651
1659
|
if (postRetrieveData.subFolder) {
|
|
1652
1660
|
// very complex types have their own subfolder
|
|
1653
1661
|
baseDir.push(...postRetrieveData.subFolder);
|
|
1654
1662
|
}
|
|
1655
1663
|
// save extracted scripts
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1664
|
+
await Promise.all(
|
|
1665
|
+
postRetrieveData.codeArr.map(async (script) => {
|
|
1666
|
+
const dir = [...baseDir];
|
|
1667
|
+
if (script.subFolder) {
|
|
1668
|
+
// some files shall be saved in yet a deeper subfolder
|
|
1669
|
+
dir.push(...script.subFolder);
|
|
1670
|
+
}
|
|
1671
|
+
return File.writePrettyToFile(
|
|
1672
|
+
dir,
|
|
1673
|
+
script.fileName + subtypeExtension,
|
|
1674
|
+
script.fileExt,
|
|
1675
|
+
script.content,
|
|
1676
|
+
templateVariables
|
|
1677
|
+
);
|
|
1678
|
+
})
|
|
1679
|
+
);
|
|
1672
1680
|
} else {
|
|
1673
1681
|
// not a complex type, run the the entire JSON through templating
|
|
1674
1682
|
// replace market values with template variable placeholders
|
|
@@ -1678,12 +1686,12 @@ class MetadataType {
|
|
|
1678
1686
|
templateVariables
|
|
1679
1687
|
);
|
|
1680
1688
|
}
|
|
1689
|
+
if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
|
|
1690
|
+
Util.logger.debug(`Filtered ${originalKey} because of --like option`);
|
|
1691
|
+
continue;
|
|
1692
|
+
}
|
|
1681
1693
|
}
|
|
1682
1694
|
|
|
1683
|
-
if (Util.OPTIONS.like && !Util.fieldsLike(results[originalKey])) {
|
|
1684
|
-
Util.logger.debug(`Filtered ${originalKey} because of --like option`);
|
|
1685
|
-
continue;
|
|
1686
|
-
}
|
|
1687
1695
|
// we dont store Id on local disk, but we need it for caching logic,
|
|
1688
1696
|
// so its in retrieve but not in save. Here we put into the clone so that the original
|
|
1689
1697
|
// object used for caching doesnt have the Id removed.
|
|
@@ -2184,4 +2192,4 @@ MetadataType.subType = null;
|
|
|
2184
2192
|
*/
|
|
2185
2193
|
MetadataType.buObject = null;
|
|
2186
2194
|
|
|
2187
|
-
|
|
2195
|
+
export default MetadataType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* MobileCode MetadataType
|
|
@@ -39,6 +39,7 @@ class MobileCode extends MetadataType {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Assign definition to static attributes
|
|
42
|
-
|
|
42
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
43
|
+
MobileCode.definition = MetadataTypeDefinitions.mobileCode;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
export default MobileCode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* MobileKeyword MetadataType
|
|
@@ -549,6 +549,7 @@ class MobileKeyword extends MetadataType {
|
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
// Assign definition to static attributes
|
|
552
|
-
|
|
552
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
553
|
+
MobileKeyword.definition = MetadataTypeDefinitions.mobileKeyword;
|
|
553
554
|
|
|
554
|
-
|
|
555
|
+
export default MobileKeyword;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* MobileMessage MetadataType
|
|
@@ -460,6 +460,7 @@ class MobileMessage extends MetadataType {
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
// Assign definition to static attributes
|
|
463
|
-
|
|
463
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
464
|
+
MobileMessage.definition = MetadataTypeDefinitions.mobileMessage;
|
|
464
465
|
|
|
465
|
-
|
|
466
|
+
export default MobileMessage;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import { Util } from '../util/util.js';
|
|
5
|
+
import MetadataType from './MetadataType.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
|
+
import Mustache from 'mustache';
|
|
9
9
|
/**
|
|
10
10
|
* ensure that Mustache does not escape any characters
|
|
11
11
|
*
|
|
@@ -471,6 +471,7 @@ class Query extends MetadataType {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
// Assign definition & cache to static attributes
|
|
474
|
-
|
|
474
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
475
|
+
Query.definition = MetadataTypeDefinitions.query;
|
|
475
476
|
|
|
476
|
-
|
|
477
|
+
export default Query;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ImportFile MetadataType
|
|
@@ -325,6 +325,7 @@ class Role extends MetadataType {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
// Assign definition to static attributes
|
|
328
|
-
|
|
328
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
329
|
+
Role.definition = MetadataTypeDefinitions.role;
|
|
329
330
|
|
|
330
|
-
|
|
331
|
+
export default Role;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
|
+
import { Util } from '../util/util.js';
|
|
6
|
+
import File from '../util/file.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Script MetadataType
|
|
@@ -327,6 +327,7 @@ class Script extends MetadataType {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
// Assign definition & cache to static attributes
|
|
330
|
-
|
|
330
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
331
|
+
Script.definition = MetadataTypeDefinitions.script;
|
|
331
332
|
|
|
332
|
-
|
|
333
|
+
export default Script;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataType from './MetadataType.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* SendClassification MetadataType
|
|
@@ -35,6 +35,7 @@ class SendClassification extends MetadataType {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// Assign definition to static attributes
|
|
38
|
-
|
|
38
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
39
|
+
SendClassification.definition = MetadataTypeDefinitions.sendClassification;
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
export default SendClassification;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import TransactionalMessage from './TransactionalMessage.js';
|
|
5
|
+
import Journey from './Journey.js';
|
|
6
|
+
import { Util } from '../util/util.js';
|
|
7
|
+
import cache from '../util/cache.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* TransactionalEmail MetadataType
|
|
@@ -220,7 +221,6 @@ class TransactionalEmail extends TransactionalMessage {
|
|
|
220
221
|
false
|
|
221
222
|
);
|
|
222
223
|
if (isDeleted && journeyKey) {
|
|
223
|
-
const Journey = require('./Journey');
|
|
224
224
|
Util.logger.info(
|
|
225
225
|
` - deleted ${Journey.definition.type}: ${journeyKey} (SFMC auto-deletes the related journey of ${this.definition.type} ${key})`
|
|
226
226
|
);
|
|
@@ -234,6 +234,7 @@ class TransactionalEmail extends TransactionalMessage {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// Assign definition to static attributes
|
|
237
|
-
|
|
237
|
+
import MetadataTypeDefinitions from '../MetadataTypeDefinitions.js';
|
|
238
|
+
TransactionalEmail.definition = MetadataTypeDefinitions.transactionalEmail;
|
|
238
239
|
|
|
239
|
-
|
|
240
|
+
export default TransactionalEmail;
|