mcdev 5.3.0 → 6.0.1
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 +2 -0
- package/.github/workflows/code-test.yml +2 -2
- package/.github/workflows/coverage-base-update.yml +3 -3
- package/.github/workflows/coverage-develop-branch.yml +3 -3
- package/.github/workflows/coverage-main-branch.yml +3 -3
- package/.github/workflows/coverage.yml +4 -4
- package/.github/workflows/npm-publish.yml +4 -4
- 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 +15 -15
- 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 +16 -16
- 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 +11 -9
- package/lib/util/util.js +16 -14
- package/package.json +35 -30
- package/test/general.test.js +4 -6
- package/test/mockRoot/.mcdevrc.json +1 -1
- package/test/resourceFactory.js +55 -27
- package/test/resources/9999999/asset/block-1157-retrieve-expected.html +13 -0
- package/test/resources/9999999/asset/block-1157-retrieve-expected.json +41 -0
- package/test/resources/9999999/asset/v1/content/assets/1209971/get-response.json +61 -0
- package/test/resources/9999999/asset/v1/content/assets/1295064/get-response.json +60 -0
- package/test/resources/9999999/asset/v1/content/assets/808714/get-response.json +184 -0
- package/test/resources/9999999/asset/v1/content/assets/query/post-response.json +40 -2
- package/test/resources/9999999/dataFolder/retrieve-ContentType=asset-sharedORContentType=asset-response.xml +70 -0
- package/test/type.asset.test.js +84 -0
- package/test/type.attributeGroup.test.js +5 -8
- package/test/type.attributeSet.test.js +5 -8
- package/test/type.automation.test.js +5 -10
- 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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
5
|
+
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
|
|
6
|
+
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
|
|
7
|
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
|
8
|
+
<soap:Header>
|
|
9
|
+
<wsa:Action>RetrieveResponse</wsa:Action>
|
|
10
|
+
<wsa:MessageID>urn:uuid:00106553-ac00-4e72-b387-42325fe6f93d</wsa:MessageID>
|
|
11
|
+
<wsa:RelatesTo>urn:uuid:a1dd2a9d-b696-480e-9a1b-265f262a8997</wsa:RelatesTo>
|
|
12
|
+
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
|
|
13
|
+
<wsse:Security>
|
|
14
|
+
<wsu:Timestamp wsu:Id="Timestamp-d82724f8-afc2-4461-8e3e-190aeb6d9625">
|
|
15
|
+
<wsu:Created>2024-01-08T14:30:39Z</wsu:Created>
|
|
16
|
+
<wsu:Expires>2024-01-08T14:35:39Z</wsu:Expires>
|
|
17
|
+
</wsu:Timestamp>
|
|
18
|
+
</wsse:Security>
|
|
19
|
+
</soap:Header>
|
|
20
|
+
<soap:Body>
|
|
21
|
+
<RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
|
|
22
|
+
<OverallStatus>OK</OverallStatus>
|
|
23
|
+
<RequestID>6596087d-d12f-4c9d-9353-783fe01775a3</RequestID>
|
|
24
|
+
<Results xsi:type="DataFolder">
|
|
25
|
+
<Client>
|
|
26
|
+
<ID>9999999</ID>
|
|
27
|
+
</Client>
|
|
28
|
+
<PartnerKey xsi:nil="true" />
|
|
29
|
+
<CreatedDate>2016-07-22T11:52:35.687</CreatedDate>
|
|
30
|
+
<ModifiedDate>2016-07-22T11:52:35.687</ModifiedDate>
|
|
31
|
+
<ID>89397</ID>
|
|
32
|
+
<ObjectID xsi:nil="true" />
|
|
33
|
+
<CustomerKey />
|
|
34
|
+
<ParentFolder>
|
|
35
|
+
<PartnerKey xsi:nil="true" />
|
|
36
|
+
<ID>0</ID>
|
|
37
|
+
<ObjectID xsi:nil="true" />
|
|
38
|
+
</ParentFolder>
|
|
39
|
+
<Name>Content Builder</Name>
|
|
40
|
+
<Description>The root folder for assets</Description>
|
|
41
|
+
<ContentType>asset</ContentType>
|
|
42
|
+
<IsActive>true</IsActive>
|
|
43
|
+
<IsEditable>false</IsEditable>
|
|
44
|
+
<AllowChildren>true</AllowChildren>
|
|
45
|
+
</Results>
|
|
46
|
+
<Results xsi:type="DataFolder">
|
|
47
|
+
<Client>
|
|
48
|
+
<ID>9999999</ID>
|
|
49
|
+
</Client>
|
|
50
|
+
<PartnerKey xsi:nil="true" />
|
|
51
|
+
<CreatedDate>2016-07-29T12:13:07.7</CreatedDate>
|
|
52
|
+
<ModifiedDate>2021-12-16T02:56:14.68</ModifiedDate>
|
|
53
|
+
<ID>90888</ID>
|
|
54
|
+
<ObjectID xsi:nil="true" />
|
|
55
|
+
<CustomerKey />
|
|
56
|
+
<ParentFolder>
|
|
57
|
+
<PartnerKey xsi:nil="true" />
|
|
58
|
+
<ID>89397</ID>
|
|
59
|
+
<ObjectID xsi:nil="true" />
|
|
60
|
+
</ParentFolder>
|
|
61
|
+
<Name>Test Folder</Name>
|
|
62
|
+
<Description />
|
|
63
|
+
<ContentType>asset</ContentType>
|
|
64
|
+
<IsActive>true</IsActive>
|
|
65
|
+
<IsEditable>true</IsEditable>
|
|
66
|
+
<AllowChildren>true</AllowChildren>
|
|
67
|
+
</Results>
|
|
68
|
+
</RetrieveResponseMsg>
|
|
69
|
+
</soap:Body>
|
|
70
|
+
</soap:Envelope>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import File from '../lib/util/file.js';
|
|
2
|
+
|
|
3
|
+
import chai, { assert, expect } from 'chai';
|
|
4
|
+
import chaiFiles from 'chai-files';
|
|
5
|
+
import cache from '../lib/util/cache.js';
|
|
6
|
+
import * as testUtils from './utils.js';
|
|
7
|
+
import handler from '../lib/index.js';
|
|
8
|
+
chai.use(chaiFiles);
|
|
9
|
+
const file = chaiFiles.file;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* gets file from Retrieve folder
|
|
13
|
+
*
|
|
14
|
+
* @param {string} customerKey of metadata
|
|
15
|
+
* @param {string} type of metadata
|
|
16
|
+
* @param {string} subtype of metadata
|
|
17
|
+
* @param {string} [buName] used when we need to test on ParentBU
|
|
18
|
+
* @returns {Promise.<string>} file in string form
|
|
19
|
+
*/
|
|
20
|
+
function getActualJson(customerKey, type, subtype, buName = 'testBU') {
|
|
21
|
+
return File.readJSON(
|
|
22
|
+
`./retrieve/testInstance/${buName}/${type}/${subtype}/${customerKey}.${type}-${subtype}-meta.json`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* gets file from Retrieve folder
|
|
27
|
+
*
|
|
28
|
+
* @param {string} customerKey of metadata
|
|
29
|
+
* @param {string} type of metadata
|
|
30
|
+
* @param {string} subtype of metadata
|
|
31
|
+
* @param {string} ext file extension
|
|
32
|
+
* @returns {string} file path
|
|
33
|
+
*/
|
|
34
|
+
function getActualFile(customerKey, type, subtype, ext) {
|
|
35
|
+
return `./retrieve/testInstance/testBU/${type}/${subtype}/${customerKey}.${type}-${subtype}-meta.${ext}`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
describe('type: asset', () => {
|
|
39
|
+
beforeEach(() => {
|
|
40
|
+
testUtils.mockSetup();
|
|
41
|
+
});
|
|
42
|
+
afterEach(() => {
|
|
43
|
+
testUtils.mockReset();
|
|
44
|
+
});
|
|
45
|
+
describe('Retrieve ================', () => {
|
|
46
|
+
it('Should retrieve a asset & ensure non-ssjs code is not removed', async () => {
|
|
47
|
+
// WHEN
|
|
48
|
+
const retrieve = await handler.retrieve('testInstance/testBU', ['asset']);
|
|
49
|
+
|
|
50
|
+
// THEN
|
|
51
|
+
assert.equal(process.exitCode, false, 'retrieve should not have thrown an error');
|
|
52
|
+
assert.equal(
|
|
53
|
+
retrieve['testInstance/testBU'].asset
|
|
54
|
+
? Object.keys(retrieve['testInstance/testBU'].asset).length
|
|
55
|
+
: 0,
|
|
56
|
+
3,
|
|
57
|
+
'only 3 assets expected in retrieve response'
|
|
58
|
+
);
|
|
59
|
+
// get results from cache
|
|
60
|
+
const result = cache.getCache();
|
|
61
|
+
assert.equal(
|
|
62
|
+
result.asset ? Object.keys(result.asset).length : 0,
|
|
63
|
+
3,
|
|
64
|
+
'only 3 assets expected in cache'
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
assert.deepEqual(
|
|
68
|
+
await getActualJson('mcdev-issue-1157', 'asset', 'block'),
|
|
69
|
+
await testUtils.getExpectedJson('9999999', 'asset', 'block-1157-retrieve'),
|
|
70
|
+
'returned metadata was not equal expected'
|
|
71
|
+
);
|
|
72
|
+
expect(file(getActualFile('mcdev-issue-1157', 'asset', 'block', 'html'))).to.equal(
|
|
73
|
+
file(testUtils.getExpectedFile('9999999', 'asset', 'block-1157-retrieve', 'html'))
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
assert.equal(
|
|
77
|
+
testUtils.getAPIHistoryLength(),
|
|
78
|
+
30,
|
|
79
|
+
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
|
|
80
|
+
);
|
|
81
|
+
return;
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
7
|
|
|
6
|
-
const assert = chai.assert;
|
|
7
|
-
const cache = require('../lib/util/cache');
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
|
-
|
|
11
8
|
describe('type: attributeGroup', () => {
|
|
12
9
|
beforeEach(() => {
|
|
13
10
|
testUtils.mockSetup();
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
7
|
|
|
6
|
-
const assert = chai.assert;
|
|
7
|
-
const cache = require('../lib/util/cache');
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
|
-
|
|
11
8
|
describe('type: attributeSet', () => {
|
|
12
9
|
beforeEach(() => {
|
|
13
10
|
testUtils.mockSetup();
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
|
|
6
|
-
const assert = chai.assert;
|
|
7
|
-
const expect = chai.expect;
|
|
8
7
|
const file = chaiFiles.file;
|
|
9
|
-
const cache = require('../lib/util/cache');
|
|
10
|
-
const testUtils = require('./utils');
|
|
11
|
-
const handler = require('../lib/index');
|
|
12
8
|
|
|
13
9
|
describe('type: automation', () => {
|
|
14
10
|
beforeEach(() => {
|
|
@@ -292,7 +288,6 @@ describe('type: automation', () => {
|
|
|
292
288
|
1,
|
|
293
289
|
'one automation expected'
|
|
294
290
|
);
|
|
295
|
-
testUtils.logAPIHistoryDebug();
|
|
296
291
|
// check number of API calls
|
|
297
292
|
assert.equal(
|
|
298
293
|
testUtils.getAPIHistoryLength(),
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
|
|
6
|
-
const assert = chai.assert;
|
|
7
|
-
const expect = chai.expect;
|
|
8
7
|
const file = chaiFiles.file;
|
|
9
|
-
const cache = require('../lib/util/cache');
|
|
10
|
-
const testUtils = require('./utils');
|
|
11
|
-
const handler = require('../lib/index');
|
|
12
8
|
|
|
13
9
|
describe('type: dataExtension', () => {
|
|
14
10
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: dataExtract', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: fileTransfer', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: importFile', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: journey', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
const cache = require('../lib/util/cache');
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
8
|
|
|
11
9
|
describe('type: mobileKeyword', () => {
|
|
12
10
|
beforeEach(() => {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
const cache = require('../lib/util/cache');
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
8
|
|
|
11
9
|
describe('type: mobileMessage', () => {
|
|
12
10
|
beforeEach(() => {
|
package/test/type.query.test.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
// const dir = chaiFiles.dir;
|
|
8
|
-
const cache = require('../lib/util/cache');
|
|
9
|
-
const testUtils = require('./utils');
|
|
10
|
-
const handler = require('../lib/index');
|
|
11
8
|
|
|
12
9
|
describe('type: query', () => {
|
|
13
10
|
beforeEach(() => {
|
package/test/type.script.test.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
// const dir = chaiFiles.dir;
|
|
8
|
-
const cache = require('../lib/util/cache');
|
|
9
|
-
const testUtils = require('./utils');
|
|
10
|
-
const handler = require('../lib/index');
|
|
11
8
|
|
|
12
9
|
describe('type: script', () => {
|
|
13
10
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: transactionalEmail', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: transactionalPush', () => {
|
|
10
9
|
beforeEach(() => {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
const cache = require('../lib/util/cache');
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
8
|
|
|
11
9
|
describe('type: transactionalSMS', () => {
|
|
12
10
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: triggeredSend', () => {
|
|
10
9
|
beforeEach(() => {
|
package/test/type.user.test.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const expect = chai.expect;
|
|
6
7
|
const file = chaiFiles.file;
|
|
7
|
-
|
|
8
|
-
const testUtils = require('./utils');
|
|
9
|
-
const handler = require('../lib/index');
|
|
10
|
-
const File = require('../lib/util/file');
|
|
8
|
+
import File from '../lib/util/file.js';
|
|
11
9
|
|
|
12
10
|
describe('type: user', () => {
|
|
13
11
|
beforeEach(() => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import chai, { assert } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import cache from '../lib/util/cache.js';
|
|
4
|
+
import * as testUtils from './utils.js';
|
|
5
|
+
import handler from '../lib/index.js';
|
|
4
6
|
chai.use(chaiFiles);
|
|
5
|
-
const cache = require('../lib/util/cache');
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
7
|
|
|
9
8
|
describe('type: verification', () => {
|
|
10
9
|
beforeEach(() => {
|