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
package/lib/util/config.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
2
|
+
import { Util } from './util.js';
|
|
3
|
+
import File from './file.js';
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import semver from 'semver';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
7
10
|
/**
|
|
8
11
|
* Central class for loading and validating properties from config and auth
|
|
9
12
|
*/
|
|
@@ -300,4 +303,4 @@ const config = {
|
|
|
300
303
|
return defaultProperties;
|
|
301
304
|
},
|
|
302
305
|
};
|
|
303
|
-
|
|
306
|
+
export default config;
|
package/lib/util/devops.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
2
|
+
import File from './file.js';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import { Util } from './util.js';
|
|
6
|
+
import Cli from './cli.js';
|
|
7
|
+
import gitFactory from 'simple-git';
|
|
8
|
+
const git = gitFactory();
|
|
9
|
+
import Builder from '../Builder.js';
|
|
10
|
+
import MetadataType from '../MetadataTypeInfo.js';
|
|
11
|
+
import jsonToTable from 'json-to-table';
|
|
11
12
|
/**
|
|
12
13
|
* DevOps helper class
|
|
13
14
|
*/
|
|
@@ -570,4 +571,4 @@ const DevOps = {
|
|
|
570
571
|
},
|
|
571
572
|
};
|
|
572
573
|
|
|
573
|
-
|
|
574
|
+
export default DevOps;
|
package/lib/util/file.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* eslint-disable no-control-regex */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
5
|
+
import fs from 'fs-extra';
|
|
6
|
+
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import prettier from 'prettier';
|
|
9
|
+
import beautyAmp from 'beauty-amp-core';
|
|
10
|
+
import { Util } from './util.js';
|
|
11
|
+
import updateNotifier from 'update-notifier';
|
|
12
12
|
|
|
13
13
|
// inform user when there is an update
|
|
14
14
|
const notifier = updateNotifier({
|
|
15
|
-
pkg:
|
|
15
|
+
pkg: Util.packageJsonMcdev,
|
|
16
16
|
updateCheckInterval: 1000 * 3600 * 24, // once per day
|
|
17
17
|
});
|
|
18
18
|
// Notify using the built-in convenience method
|
|
@@ -218,9 +218,9 @@ const File = {
|
|
|
218
218
|
* @param {string} filename name of the file without suffix
|
|
219
219
|
* @param {string} filetype filetype ie. JSON or SSJS
|
|
220
220
|
* @param {string} content filecontent
|
|
221
|
-
* @returns {string} original string on error; formatted string on success
|
|
221
|
+
* @returns {Promise.<string>} original string on error; formatted string on success
|
|
222
222
|
*/
|
|
223
|
-
_beautify_prettier: function (directory, filename, filetype, content) {
|
|
223
|
+
_beautify_prettier: async function (directory, filename, filetype, content) {
|
|
224
224
|
let formatted = '';
|
|
225
225
|
try {
|
|
226
226
|
if (!FileFs.prettierConfig) {
|
|
@@ -275,13 +275,14 @@ const File = {
|
|
|
275
275
|
}
|
|
276
276
|
case 'sql': {
|
|
277
277
|
FileFs.prettierConfig.parser = 'sql';
|
|
278
|
+
FileFs.prettierConfig.plugins = ['prettier-plugin-sql'];
|
|
278
279
|
break;
|
|
279
280
|
}
|
|
280
281
|
default: {
|
|
281
282
|
FileFs.prettierConfig.parser = 'babel';
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
|
-
formatted = prettier.format(content, FileFs.prettierConfig);
|
|
285
|
+
formatted = await prettier.format(content, FileFs.prettierConfig);
|
|
285
286
|
} catch (ex) {
|
|
286
287
|
const warnMsg = `Potential Code issue found in ${this.normalizePath([
|
|
287
288
|
...directory,
|
|
@@ -506,7 +507,7 @@ const File = {
|
|
|
506
507
|
*/
|
|
507
508
|
async saveConfigFile(properties) {
|
|
508
509
|
// we want to save to save the full version here to allow us to upgrade configs properly in the future
|
|
509
|
-
properties.version =
|
|
510
|
+
properties.version = Util.packageJsonMcdev.version;
|
|
510
511
|
|
|
511
512
|
await this.writeJSONToFile('', Util.configFileName.split('.json')[0], properties);
|
|
512
513
|
Util.logger.info(`✔️ ${Util.configFileName} and ${Util.authFileName} saved successfully`);
|
|
@@ -550,4 +551,4 @@ const FileFs = { ...fs, ...File };
|
|
|
550
551
|
FileFs.prettierConfig = null;
|
|
551
552
|
FileFs.prettierConfigFileType = null;
|
|
552
553
|
|
|
553
|
-
|
|
554
|
+
export default FileFs;
|
package/lib/util/init.config.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import Cli from './cli.js';
|
|
5
|
+
import File from './file.js';
|
|
6
|
+
import config from './config.js';
|
|
7
|
+
import { Util } from './util.js';
|
|
8
|
+
import inquirer from 'inquirer';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import semver from 'semver';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* CLI helper class
|
|
@@ -425,4 +427,4 @@ const Init = {
|
|
|
425
427
|
},
|
|
426
428
|
};
|
|
427
429
|
|
|
428
|
-
|
|
430
|
+
export default Init;
|
package/lib/util/init.git.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import File from './file.js';
|
|
3
|
+
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import { Util } from './util.js';
|
|
6
|
+
import commandExists from 'command-exists';
|
|
7
|
+
import gitFactory from 'simple-git';
|
|
8
|
+
const git = gitFactory();
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* CLI helper class
|
|
@@ -259,4 +260,4 @@ const Init = {
|
|
|
259
260
|
},
|
|
260
261
|
};
|
|
261
262
|
|
|
262
|
-
|
|
263
|
+
export default Init;
|
package/lib/util/init.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
3
|
+
import Cli from './cli.js';
|
|
4
|
+
import File from './file.js';
|
|
5
|
+
import config from './config.js';
|
|
6
|
+
import InitGit from './init.git.js';
|
|
7
|
+
import InitNpm from './init.npm.js';
|
|
8
|
+
import InitConfig from './init.config.js';
|
|
9
|
+
import inquirer from 'inquirer';
|
|
10
|
+
import { Util } from './util.js';
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import path from 'node:path';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* CLI helper class
|
|
@@ -506,4 +506,4 @@ const Init = {
|
|
|
506
506
|
},
|
|
507
507
|
};
|
|
508
508
|
|
|
509
|
-
|
|
509
|
+
export default Init;
|
package/lib/util/init.npm.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import File from './file.js';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { Util } from './util.js';
|
|
6
|
+
import semver from 'semver';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* CLI helper class
|
|
@@ -79,10 +81,10 @@ const Init = {
|
|
|
79
81
|
versionsDefault[name] = Object.keys(Util.packageJsonMcdev.dependencies).includes(name)
|
|
80
82
|
? Util.packageJsonMcdev.dependencies[name]
|
|
81
83
|
: // then check mcdev.devDependencies
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
Object.keys(Util.packageJsonMcdev.devDependencies).includes(name)
|
|
85
|
+
? Util.packageJsonMcdev.devDependencies[name]
|
|
86
|
+
: // fallback to using latest version if not found
|
|
87
|
+
'latest';
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
const versionsProject = {};
|
|
@@ -154,4 +156,4 @@ const Init = {
|
|
|
154
156
|
},
|
|
155
157
|
};
|
|
156
158
|
|
|
157
|
-
|
|
159
|
+
export default Init;
|
package/lib/util/util.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import TYPE from '../../types/mcdev.d.js';
|
|
4
|
+
import MetadataDefinitions from './../MetadataTypeDefinitions.js';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
import toposort from 'toposort';
|
|
7
|
+
import winston from 'winston';
|
|
8
|
+
import child_process from 'node:child_process';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
// import just to resolve cyclical - TO DO consider if could move to file or context
|
|
11
|
+
import { readJsonSync } from 'fs-extra/esm';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* Util that contains logger and simple util methods
|
|
13
17
|
*/
|
|
14
|
-
const Util = {
|
|
18
|
+
export const Util = {
|
|
15
19
|
authFileName: '.mcdev-auth.json',
|
|
16
20
|
boilerplateDirectory: '../../boilerplate',
|
|
17
21
|
configFileName: '.mcdevrc.json',
|
|
@@ -19,7 +23,7 @@ const Util = {
|
|
|
19
23
|
standardizedSplitChar: '/',
|
|
20
24
|
/** @type {TYPE.skipInteraction} */
|
|
21
25
|
skipInteraction: false,
|
|
22
|
-
packageJsonMcdev:
|
|
26
|
+
packageJsonMcdev: readJsonSync(path.join(__dirname, '../../package.json')),
|
|
23
27
|
OPTIONS: {},
|
|
24
28
|
changedKeysMap: {},
|
|
25
29
|
/**
|
|
@@ -390,7 +394,7 @@ const Util = {
|
|
|
390
394
|
|
|
391
395
|
const processArgv = process.argv.slice(2);
|
|
392
396
|
Util.logger.debug(
|
|
393
|
-
`:: mcdev ${packageJsonMcdev.version} :: ⚡ mcdev ${processArgv.join(' ')}`
|
|
397
|
+
`:: mcdev ${Util.packageJsonMcdev.version} :: ⚡ mcdev ${processArgv.join(' ')}`
|
|
394
398
|
);
|
|
395
399
|
},
|
|
396
400
|
/**
|
|
@@ -801,9 +805,9 @@ const Util = {
|
|
|
801
805
|
// \s* whitespace characters, zero or more times
|
|
802
806
|
// [^>]*? any character that is not a >, zero or more times, un-greedily
|
|
803
807
|
// (.*) capture any character, zero or more times
|
|
804
|
-
// /
|
|
808
|
+
// /s dotall flag
|
|
805
809
|
// ideally the code looks like <script runat="server">...</script>
|
|
806
|
-
const scriptRegex = /^<\s*script [^>]*?>(.*)<\/\s*script\s*>$/
|
|
810
|
+
const scriptRegex = /^<\s*script [^>]*?>(.*)<\/\s*script\s*>$/s;
|
|
807
811
|
code = code.trim();
|
|
808
812
|
const regexMatches = scriptRegex.exec(code);
|
|
809
813
|
if (regexMatches?.length > 1) {
|
|
@@ -891,5 +895,3 @@ const Util = {
|
|
|
891
895
|
};
|
|
892
896
|
|
|
893
897
|
Util.startLogger(false, true);
|
|
894
|
-
|
|
895
|
-
module.exports = Util;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcdev",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Accenture Salesforce Marketing Cloud DevTools",
|
|
5
5
|
"author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/Accenture/sfmc-devtools.git"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/Accenture/sfmc-devtools
|
|
11
|
+
"homepage": "https://github.com/Accenture/sfmc-devtools/wiki",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/Accenture/sfmc-devtools/issues",
|
|
14
14
|
"email": "joern.berkefeld@accenture.com"
|
|
@@ -31,11 +31,17 @@
|
|
|
31
31
|
"rest"
|
|
32
32
|
],
|
|
33
33
|
"main": "./lib/index.js",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"default": "./lib/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./*": "./*.js"
|
|
39
|
+
},
|
|
34
40
|
"bin": {
|
|
35
41
|
"mcdev": "./lib/cli.js"
|
|
36
42
|
},
|
|
37
43
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
44
|
+
"node": ">=18.16.0"
|
|
39
45
|
},
|
|
40
46
|
"scripts": {
|
|
41
47
|
"start": "node lib/cli.js",
|
|
@@ -48,59 +54,57 @@
|
|
|
48
54
|
"lint-lib": "eslint lib/**/*.js",
|
|
49
55
|
"lint-type": "eslint types/*.js",
|
|
50
56
|
"lint-test": "eslint test/**/*.js",
|
|
51
|
-
"upgrade": "npm-check --update",
|
|
52
57
|
"manual-prepare": "husky install",
|
|
53
58
|
"lint-and-test": "run-s lint test",
|
|
54
59
|
"test": "mocha --reporter-option maxDiffSize=25000",
|
|
55
|
-
"coverage": "
|
|
60
|
+
"coverage": "c8 npm run test",
|
|
56
61
|
"version:major": "npm version --no-commit-hooks major",
|
|
57
62
|
"version:minor": "npm version --no-commit-hooks minor",
|
|
58
63
|
"version:patch": "npm version --no-commit-hooks patch"
|
|
59
64
|
},
|
|
60
65
|
"dependencies": {
|
|
61
66
|
"beauty-amp-core": "0.3.7",
|
|
62
|
-
"cli-progress": "3.
|
|
67
|
+
"cli-progress": "3.12.0",
|
|
63
68
|
"command-exists": "1.2.9",
|
|
64
|
-
"conf": "
|
|
69
|
+
"conf": "11.0.1",
|
|
65
70
|
"console.table": "0.10.0",
|
|
66
71
|
"deep-equal": "2.2.2",
|
|
67
|
-
"fs-extra": "11.1.
|
|
68
|
-
"inquirer": "
|
|
72
|
+
"fs-extra": "11.1.1",
|
|
73
|
+
"inquirer": "9.2.6",
|
|
69
74
|
"json-to-table": "4.2.1",
|
|
70
75
|
"mustache": "4.2.0",
|
|
71
|
-
"p-limit": "
|
|
72
|
-
"prettier": "
|
|
73
|
-
"prettier-plugin-sql": "0.
|
|
76
|
+
"p-limit": "4.0.0",
|
|
77
|
+
"prettier": "3.1.1",
|
|
78
|
+
"prettier-plugin-sql": "0.15.1",
|
|
74
79
|
"semver": "7.5.4",
|
|
75
|
-
"sfmc-sdk": "
|
|
76
|
-
"simple-git": "3.
|
|
80
|
+
"sfmc-sdk": "2.0.1",
|
|
81
|
+
"simple-git": "3.22.0",
|
|
77
82
|
"toposort": "2.0.2",
|
|
78
|
-
"update-notifier": "
|
|
79
|
-
"winston": "3.
|
|
83
|
+
"update-notifier": "6.0.2",
|
|
84
|
+
"winston": "3.11.0",
|
|
80
85
|
"yargs": "17.7.2"
|
|
81
86
|
},
|
|
82
87
|
"devDependencies": {
|
|
83
|
-
"assert": "2.
|
|
84
|
-
"axios-mock-adapter": "1.
|
|
85
|
-
"
|
|
88
|
+
"assert": "2.1.0",
|
|
89
|
+
"axios-mock-adapter": "1.22.0",
|
|
90
|
+
"c8": "8.0.1",
|
|
91
|
+
"chai": "4.3.10",
|
|
86
92
|
"chai-files": "1.4.0",
|
|
87
|
-
"eslint": "8.
|
|
93
|
+
"eslint": "8.56.0",
|
|
88
94
|
"eslint-config-prettier": "9.0.0",
|
|
89
95
|
"eslint-config-ssjs": "1.1.11",
|
|
90
|
-
"eslint-plugin-jsdoc": "
|
|
91
|
-
"eslint-plugin-mocha": "10.
|
|
92
|
-
"eslint-plugin-prettier": "
|
|
93
|
-
"eslint-plugin-unicorn": "
|
|
94
|
-
"fast-xml-parser": "4.2
|
|
96
|
+
"eslint-plugin-jsdoc": "48.0.2",
|
|
97
|
+
"eslint-plugin-mocha": "10.2.0",
|
|
98
|
+
"eslint-plugin-prettier": "5.1.2",
|
|
99
|
+
"eslint-plugin-unicorn": "50.0.1",
|
|
100
|
+
"fast-xml-parser": "4.3.2",
|
|
95
101
|
"husky": "8.0.3",
|
|
96
102
|
"jsdoc-to-markdown": "8.0.0",
|
|
97
|
-
"lint-staged": "
|
|
103
|
+
"lint-staged": "15.2.0",
|
|
98
104
|
"mocha": "10.2.0",
|
|
99
105
|
"mock-fs": "5.2.0",
|
|
100
|
-
"npm-check": "6.0.1",
|
|
101
106
|
"npm-run-all": "4.1.5",
|
|
102
|
-
"
|
|
103
|
-
"prettier-eslint": "15.0.1"
|
|
107
|
+
"prettier-eslint": "16.2.0"
|
|
104
108
|
},
|
|
105
109
|
"optionalDependencies": {
|
|
106
110
|
"fsevents": "*"
|
|
@@ -109,5 +113,6 @@
|
|
|
109
113
|
"*.{js,jsx,ts,tsx}": [
|
|
110
114
|
"eslint --fix"
|
|
111
115
|
]
|
|
112
|
-
}
|
|
116
|
+
},
|
|
117
|
+
"type": "module"
|
|
113
118
|
}
|
package/test/general.test.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import chai, { assert, expect } from 'chai';
|
|
2
|
+
import chaiFiles from 'chai-files';
|
|
3
|
+
import * as testUtils from './utils.js';
|
|
4
|
+
import handler from '../lib/index.js';
|
|
5
5
|
chai.use(chaiFiles);
|
|
6
|
-
const testUtils = require('./utils');
|
|
7
|
-
const handler = require('../lib/index');
|
|
8
6
|
|
|
9
7
|
describe('GENERAL', () => {
|
|
10
8
|
beforeEach(() => {
|