auth0-deploy-cli 7.6.0 → 7.8.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 +7 -41
- package/.husky/pre-commit +4 -0
- package/.husky/pre-push +3 -1
- package/.prettierignore +10 -0
- package/.prettierrc.json +4 -0
- package/CHANGELOG.md +222 -7
- package/CONTRIBUTING.md +2 -2
- package/README.md +3 -0
- package/lib/args.d.ts +29 -0
- package/lib/args.js +16 -15
- package/lib/commands/export.d.ts +2 -0
- package/lib/commands/export.js +3 -3
- package/lib/commands/import.d.ts +2 -0
- package/lib/commands/import.js +6 -6
- package/lib/commands/index.d.ts +9 -0
- package/lib/commands/index.js +1 -1
- package/lib/configFactory.d.ts +7 -0
- package/lib/configFactory.js +5 -1
- package/lib/context/defaults.d.ts +1 -0
- package/lib/context/defaults.js +4 -3
- package/lib/context/directory/handlers/actions.d.ts +6 -0
- package/lib/context/directory/handlers/actions.js +3 -3
- package/lib/context/directory/handlers/attackProtection.d.ts +10 -0
- package/lib/context/directory/handlers/attackProtection.js +7 -7
- package/lib/context/directory/handlers/branding.d.ts +6 -0
- package/lib/context/directory/handlers/branding.js +6 -5
- package/lib/context/directory/handlers/clientGrants.d.ts +6 -0
- package/lib/context/directory/handlers/clientGrants.js +3 -2
- package/lib/context/directory/handlers/clients.d.ts +6 -0
- package/lib/context/directory/handlers/clients.js +1 -1
- package/lib/context/directory/handlers/connections.d.ts +6 -0
- package/lib/context/directory/handlers/connections.js +4 -2
- package/lib/context/directory/handlers/databases.d.ts +6 -0
- package/lib/context/directory/handlers/databases.js +13 -7
- package/lib/context/directory/handlers/emailProvider.d.ts +6 -0
- package/lib/context/directory/handlers/emailProvider.js +3 -2
- package/lib/context/directory/handlers/emailTemplates.d.ts +6 -0
- package/lib/context/directory/handlers/emailTemplates.js +2 -2
- package/lib/context/directory/handlers/guardianFactorProviders.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactorProviders.js +3 -2
- package/lib/context/directory/handlers/guardianFactorTemplates.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactorTemplates.js +3 -2
- package/lib/context/directory/handlers/guardianFactors.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactors.js +3 -2
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +1 -1
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +1 -1
- package/lib/context/directory/handlers/guardianPolicies.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPolicies.js +1 -1
- package/lib/context/directory/handlers/hooks.d.ts +6 -0
- package/lib/context/directory/handlers/hooks.js +2 -2
- package/lib/context/directory/handlers/index.d.ts +12 -0
- package/lib/context/directory/handlers/index.js +3 -2
- package/lib/context/directory/handlers/migrations.d.ts +6 -0
- package/lib/context/directory/handlers/organizations.d.ts +6 -0
- package/lib/context/directory/handlers/organizations.js +1 -1
- package/lib/context/directory/handlers/pages.d.ts +6 -0
- package/lib/context/directory/handlers/pages.js +2 -2
- package/lib/context/directory/handlers/resourceServers.d.ts +6 -0
- package/lib/context/directory/handlers/resourceServers.js +3 -2
- package/lib/context/directory/handlers/roles.d.ts +6 -0
- package/lib/context/directory/handlers/roles.js +1 -1
- package/lib/context/directory/handlers/rules.d.ts +6 -0
- package/lib/context/directory/handlers/rules.js +2 -2
- package/lib/context/directory/handlers/rulesConfigs.d.ts +6 -0
- package/lib/context/directory/handlers/rulesConfigs.js +3 -2
- package/lib/context/directory/handlers/tenant.d.ts +10 -0
- package/lib/context/directory/handlers/tenant.js +3 -2
- package/lib/context/directory/handlers/triggers.d.ts +6 -0
- package/lib/context/directory/index.d.ts +17 -0
- package/lib/context/directory/index.js +21 -18
- package/lib/context/index.d.ts +4 -0
- package/lib/context/index.js +83 -61
- package/lib/context/yaml/handlers/actions.d.ts +6 -0
- package/lib/context/yaml/handlers/actions.js +9 -6
- package/lib/context/yaml/handlers/attackProtection.d.ts +6 -0
- package/lib/context/yaml/handlers/attackProtection.js +1 -1
- package/lib/context/yaml/handlers/branding.d.ts +6 -0
- package/lib/context/yaml/handlers/branding.js +5 -4
- package/lib/context/yaml/handlers/clientGrants.d.ts +6 -0
- package/lib/context/yaml/handlers/clientGrants.js +2 -2
- package/lib/context/yaml/handlers/clients.d.ts +6 -0
- package/lib/context/yaml/handlers/clients.js +6 -4
- package/lib/context/yaml/handlers/connections.d.ts +6 -0
- package/lib/context/yaml/handlers/connections.js +7 -5
- package/lib/context/yaml/handlers/databases.d.ts +6 -0
- package/lib/context/yaml/handlers/databases.js +12 -8
- package/lib/context/yaml/handlers/emailProvider.d.ts +6 -0
- package/lib/context/yaml/handlers/emailProvider.js +4 -3
- package/lib/context/yaml/handlers/emailTemplates.d.ts +6 -0
- package/lib/context/yaml/handlers/emailTemplates.js +3 -3
- package/lib/context/yaml/handlers/guardianFactorProviders.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactorProviders.js +1 -1
- package/lib/context/yaml/handlers/guardianFactorTemplates.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +1 -1
- package/lib/context/yaml/handlers/guardianFactors.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactors.js +1 -1
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +1 -1
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +1 -1
- package/lib/context/yaml/handlers/guardianPolicies.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPolicies.js +1 -1
- package/lib/context/yaml/handlers/hooks.d.ts +6 -0
- package/lib/context/yaml/handlers/hooks.js +4 -3
- package/lib/context/yaml/handlers/index.d.ts +12 -0
- package/lib/context/yaml/handlers/index.js +3 -2
- package/lib/context/yaml/handlers/migrations.d.ts +6 -0
- package/lib/context/yaml/handlers/organizations.d.ts +6 -0
- package/lib/context/yaml/handlers/organizations.js +3 -3
- package/lib/context/yaml/handlers/pages.d.ts +6 -0
- package/lib/context/yaml/handlers/pages.js +3 -3
- package/lib/context/yaml/handlers/resourceServers.d.ts +6 -0
- package/lib/context/yaml/handlers/resourceServers.js +2 -2
- package/lib/context/yaml/handlers/roles.d.ts +6 -0
- package/lib/context/yaml/handlers/roles.js +3 -3
- package/lib/context/yaml/handlers/rules.d.ts +6 -0
- package/lib/context/yaml/handlers/rules.js +3 -3
- package/lib/context/yaml/handlers/rulesConfigs.d.ts +6 -0
- package/lib/context/yaml/handlers/rulesConfigs.js +2 -2
- package/lib/context/yaml/handlers/tenant.d.ts +6 -0
- package/lib/context/yaml/handlers/tenant.js +4 -3
- package/lib/context/yaml/handlers/triggers.d.ts +6 -0
- package/lib/context/yaml/handlers/triggers.js +2 -2
- package/lib/context/yaml/index.d.ts +13 -0
- package/lib/context/yaml/index.js +31 -23
- package/lib/index.d.ts +88 -0
- package/lib/index.js +25 -17
- package/lib/logger.d.ts +2 -0
- package/lib/logger.js +8 -17
- package/lib/readonly.d.ts +2 -0
- package/lib/readonly.js +11 -16
- package/lib/sessionDurationsToMinutes.d.ts +7 -0
- package/lib/sessionDurationsToMinutes.js +15 -0
- package/lib/tools/auth0/client.d.ts +2 -0
- package/lib/tools/auth0/client.js +12 -12
- package/lib/tools/auth0/handlers/actions.d.ts +95 -0
- package/lib/tools/auth0/handlers/actions.js +22 -24
- package/lib/tools/auth0/handlers/attackProtection.d.ts +28 -0
- package/lib/tools/auth0/handlers/attackProtection.js +14 -17
- package/lib/tools/auth0/handlers/branding.d.ts +27 -0
- package/lib/tools/auth0/handlers/branding.js +13 -9
- package/lib/tools/auth0/handlers/clientGrants.d.ts +32 -0
- package/lib/tools/auth0/handlers/clientGrants.js +17 -10
- package/lib/tools/auth0/handlers/clients.d.ts +23 -0
- package/lib/tools/auth0/handlers/clients.js +15 -8
- package/lib/tools/auth0/handlers/connections.d.ts +54 -0
- package/lib/tools/auth0/handlers/connections.js +30 -10
- package/lib/tools/auth0/handlers/databases.d.ts +36 -0
- package/lib/tools/auth0/handlers/databases.js +25 -13
- package/lib/tools/auth0/handlers/default.d.ts +54 -0
- package/lib/tools/auth0/handlers/default.js +62 -36
- package/lib/tools/auth0/handlers/emailProvider.d.ts +11 -0
- package/lib/tools/auth0/handlers/emailTemplates.d.ts +26 -0
- package/lib/tools/auth0/handlers/emailTemplates.js +8 -10
- package/lib/tools/auth0/handlers/guardianFactorProviders.d.ts +25 -0
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +3 -3
- package/lib/tools/auth0/handlers/guardianFactorTemplates.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +3 -3
- package/lib/tools/auth0/handlers/guardianFactors.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianFactors.js +3 -3
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +11 -10
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.d.ts +18 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +10 -9
- package/lib/tools/auth0/handlers/guardianPolicies.d.ts +23 -0
- package/lib/tools/auth0/handlers/guardianPolicies.js +5 -4
- package/lib/tools/auth0/handlers/hooks.d.ts +58 -0
- package/lib/tools/auth0/handlers/hooks.js +34 -21
- package/lib/tools/auth0/handlers/index.d.ts +129 -0
- package/lib/tools/auth0/handlers/index.js +31 -27
- package/lib/tools/auth0/handlers/migrations.d.ts +15 -0
- package/lib/tools/auth0/handlers/migrations.js +3 -2
- package/lib/tools/auth0/handlers/organizations.d.ts +51 -0
- package/lib/tools/auth0/handlers/organizations.js +62 -32
- package/lib/tools/auth0/handlers/pages.d.ts +42 -0
- package/lib/tools/auth0/handlers/pages.js +20 -14
- package/lib/tools/auth0/handlers/prompts.d.ts +11 -0
- package/lib/tools/auth0/handlers/prompts.js +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +51 -0
- package/lib/tools/auth0/handlers/resourceServers.js +22 -14
- package/lib/tools/auth0/handlers/roles.d.ts +48 -0
- package/lib/tools/auth0/handlers/roles.js +56 -32
- package/lib/tools/auth0/handlers/rules.d.ts +55 -0
- package/lib/tools/auth0/handlers/rules.js +53 -36
- package/lib/tools/auth0/handlers/rulesConfigs.d.ts +25 -0
- package/lib/tools/auth0/handlers/rulesConfigs.js +12 -6
- package/lib/tools/auth0/handlers/tenant.d.ts +11 -0
- package/lib/tools/auth0/handlers/tenant.js +8 -4
- package/lib/tools/auth0/handlers/triggers.d.ts +35 -0
- package/lib/tools/auth0/handlers/triggers.js +12 -13
- package/lib/tools/auth0/index.d.ts +15 -0
- package/lib/tools/auth0/index.js +15 -31
- package/lib/tools/auth0/schema.d.ts +15 -0
- package/lib/tools/auth0/schema.js +7 -27
- package/lib/tools/calculateChanges.d.ts +26 -0
- package/lib/tools/calculateChanges.js +12 -7
- package/lib/tools/constants.d.ts +71 -0
- package/lib/tools/constants.js +164 -161
- package/lib/tools/deploy.d.ts +3 -0
- package/lib/tools/deploy.js +3 -3
- package/lib/tools/index.d.ts +82 -0
- package/lib/tools/index.js +1 -1
- package/lib/tools/utils.d.ts +18 -0
- package/lib/tools/utils.js +68 -10
- package/lib/tools/validationError.d.ts +5 -0
- package/lib/tools/{ValidationError.js → validationError.js} +3 -1
- package/lib/types.d.ts +255 -0
- package/lib/types.js +2 -0
- package/lib/utils.d.ts +66 -0
- package/lib/utils.js +18 -25
- package/package.json +16 -7
- package/tsconfig.json +3 -4
- package/typescript-migration-progress.sh +1 -1
- package/lib/tools/logger.js +0 -15
package/lib/utils.js
CHANGED
|
@@ -3,27 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.mapClientID2NameSorted = exports.convertClientIdToName = exports.clearClientArrays = exports.ensureProp = exports.clearTenantFlags = exports.recordsSorter = exports.formatResults = exports.
|
|
6
|
+
exports.mapClientID2NameSorted = exports.convertClientIdToName = exports.clearClientArrays = exports.ensureProp = exports.clearTenantFlags = exports.recordsSorter = exports.formatResults = exports.sanitize = exports.stripIdentifiers = exports.toConfigFn = exports.existsMustBeDir = exports.dumpJSON = exports.loadJSON = exports.getFiles = exports.isFile = exports.isDirectory = void 0;
|
|
7
7
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const sanitize_filename_1 = __importDefault(require("sanitize-filename"));
|
|
10
10
|
const dot_prop_1 = __importDefault(require("dot-prop"));
|
|
11
11
|
const tools_1 = require("./tools");
|
|
12
12
|
const logger_1 = __importDefault(require("./logger"));
|
|
13
|
-
function isDirectory(
|
|
13
|
+
function isDirectory(filePath) {
|
|
14
14
|
try {
|
|
15
|
-
return fs_extra_1.default.statSync(path_1.default.resolve(
|
|
16
|
-
.isDirectory();
|
|
15
|
+
return fs_extra_1.default.statSync(path_1.default.resolve(filePath)).isDirectory();
|
|
17
16
|
}
|
|
18
17
|
catch (err) {
|
|
19
18
|
return false;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
exports.isDirectory = isDirectory;
|
|
23
|
-
function isFile(
|
|
22
|
+
function isFile(filePath) {
|
|
24
23
|
try {
|
|
25
|
-
return fs_extra_1.default.statSync(path_1.default.resolve(
|
|
26
|
-
.isFile();
|
|
24
|
+
return fs_extra_1.default.statSync(path_1.default.resolve(filePath)).isFile();
|
|
27
25
|
}
|
|
28
26
|
catch (err) {
|
|
29
27
|
return false;
|
|
@@ -32,7 +30,8 @@ function isFile(f) {
|
|
|
32
30
|
exports.isFile = isFile;
|
|
33
31
|
function getFiles(folder, exts) {
|
|
34
32
|
if (isDirectory(folder)) {
|
|
35
|
-
return fs_extra_1.default
|
|
33
|
+
return fs_extra_1.default
|
|
34
|
+
.readdirSync(folder)
|
|
36
35
|
.map((f) => path_1.default.join(folder, f))
|
|
37
36
|
.filter((f) => isFile(f) && exts.includes(path_1.default.extname(f)));
|
|
38
37
|
}
|
|
@@ -84,7 +83,7 @@ function stripIdentifiers(auth0, assets) {
|
|
|
84
83
|
'emailTemplates',
|
|
85
84
|
'guardianFactors',
|
|
86
85
|
'guardianFactorProviders',
|
|
87
|
-
'guardianFactorTemplates'
|
|
86
|
+
'guardianFactorTemplates',
|
|
88
87
|
];
|
|
89
88
|
// Optionally Strip identifiers
|
|
90
89
|
auth0.handlers.forEach((h) => {
|
|
@@ -107,12 +106,6 @@ function sanitize(str) {
|
|
|
107
106
|
return (0, sanitize_filename_1.default)(str, { replacement: '-' });
|
|
108
107
|
}
|
|
109
108
|
exports.sanitize = sanitize;
|
|
110
|
-
function hoursAsInteger(property, hours) {
|
|
111
|
-
if (Number.isInteger(hours))
|
|
112
|
-
return { [property]: hours };
|
|
113
|
-
return { [`${property}_in_minutes`]: Math.round(hours * 60) };
|
|
114
|
-
}
|
|
115
|
-
exports.hoursAsInteger = hoursAsInteger;
|
|
116
109
|
function formatResults(item) {
|
|
117
110
|
if (typeof item !== 'object') {
|
|
118
111
|
return item;
|
|
@@ -126,10 +119,12 @@ function formatResults(item) {
|
|
|
126
119
|
strategy: null,
|
|
127
120
|
script: null,
|
|
128
121
|
stage: null,
|
|
129
|
-
id: null
|
|
122
|
+
id: null,
|
|
130
123
|
};
|
|
131
124
|
const result = Object.assign({}, importantFields);
|
|
132
|
-
Object.entries(item)
|
|
125
|
+
Object.entries(item)
|
|
126
|
+
.sort()
|
|
127
|
+
.forEach(([key, value]) => {
|
|
133
128
|
result[key] = value;
|
|
134
129
|
});
|
|
135
130
|
Object.keys(importantFields).forEach((key) => {
|
|
@@ -140,12 +135,7 @@ function formatResults(item) {
|
|
|
140
135
|
}
|
|
141
136
|
exports.formatResults = formatResults;
|
|
142
137
|
function recordsSorter(a, b) {
|
|
143
|
-
const importantFields = [
|
|
144
|
-
'name',
|
|
145
|
-
'key',
|
|
146
|
-
'client_id',
|
|
147
|
-
'template'
|
|
148
|
-
];
|
|
138
|
+
const importantFields = ['name', 'key', 'client_id', 'template'];
|
|
149
139
|
for (let i = 0; i < importantFields.length; i += 1) {
|
|
150
140
|
const key = importantFields[i];
|
|
151
141
|
if (a[key] && b[key]) {
|
|
@@ -161,7 +151,8 @@ function clearTenantFlags(tenant) {
|
|
|
161
151
|
}
|
|
162
152
|
}
|
|
163
153
|
exports.clearTenantFlags = clearTenantFlags;
|
|
164
|
-
function ensureProp(obj, props
|
|
154
|
+
function ensureProp(obj, props) {
|
|
155
|
+
const value = '';
|
|
165
156
|
if (!dot_prop_1.default.has(obj, props)) {
|
|
166
157
|
dot_prop_1.default.set(obj, props, value);
|
|
167
158
|
}
|
|
@@ -169,8 +160,10 @@ function ensureProp(obj, props, value = '') {
|
|
|
169
160
|
exports.ensureProp = ensureProp;
|
|
170
161
|
function clearClientArrays(client) {
|
|
171
162
|
const propsToClear = ['allowed_clients', 'allowed_logout_urls', 'allowed_origins', 'callbacks'];
|
|
163
|
+
//If designated properties are null, set them as empty arrays instead
|
|
172
164
|
Object.keys(client).forEach((prop) => {
|
|
173
165
|
if (propsToClear.indexOf(prop) >= 0 && !client[prop]) {
|
|
166
|
+
//TODO: understand why setting as empty array instead of deleting null prop. Ex: `delete client[prop]`
|
|
174
167
|
client[prop] = [];
|
|
175
168
|
}
|
|
176
169
|
});
|
|
@@ -189,7 +182,7 @@ function convertClientIdToName(clientId, knownClients = []) {
|
|
|
189
182
|
exports.convertClientIdToName = convertClientIdToName;
|
|
190
183
|
function mapClientID2NameSorted(enabledClients, knownClients) {
|
|
191
184
|
return [
|
|
192
|
-
...(enabledClients || []).map((clientId) => convertClientIdToName(clientId, knownClients))
|
|
185
|
+
...(enabledClients || []).map((clientId) => convertClientIdToName(clientId, knownClients)),
|
|
193
186
|
].sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
|
|
194
187
|
}
|
|
195
188
|
exports.mapClientID2NameSorted = mapClientID2NameSorted;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "A command line tool for deploying updates to your Auth0 tenant",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"lint:fix": "eslint --fix --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
|
|
11
11
|
"lint": "eslint --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
|
|
12
|
+
"format": "npx prettier --write .",
|
|
12
13
|
"pretest": "rimraf ./.nyc_output",
|
|
13
14
|
"test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*'",
|
|
14
15
|
"build": "rimraf ./lib && npx tsc",
|
|
@@ -29,6 +30,9 @@
|
|
|
29
30
|
"readme": "README.md",
|
|
30
31
|
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
|
|
31
32
|
"dependencies": {
|
|
33
|
+
"@types/lodash": "^4.14.181",
|
|
34
|
+
"@types/nconf": "^0.10.2",
|
|
35
|
+
"@types/winston": "^2.4.4",
|
|
32
36
|
"ajv": "^6.12.6",
|
|
33
37
|
"auth0": "^2.40.0",
|
|
34
38
|
"dot-prop": "^5.2.0",
|
|
@@ -37,26 +41,31 @@
|
|
|
37
41
|
"js-yaml": "^4.1.0",
|
|
38
42
|
"lodash": "^4.17.20",
|
|
39
43
|
"mkdirp": "^0.5.1",
|
|
40
|
-
"nconf": "^0.11.
|
|
44
|
+
"nconf": "^0.11.4",
|
|
41
45
|
"promise-pool-executor": "^1.1.1",
|
|
42
46
|
"sanitize-filename": "^1.6.1",
|
|
43
|
-
"
|
|
47
|
+
"sinon": "^13.0.1",
|
|
48
|
+
"sinon-chai": "^3.7.0",
|
|
49
|
+
"winston": "^3.3.0",
|
|
44
50
|
"yargs": "^15.3.1"
|
|
45
51
|
},
|
|
46
52
|
"devDependencies": {
|
|
47
53
|
"@types/expect": "^24.3.0",
|
|
48
54
|
"@types/mocha": "^9.1.0",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
55
|
+
"chai": "^4.3.6",
|
|
56
|
+
"@typescript-eslint/parser": "^5.16.0",
|
|
51
57
|
"chai-as-promised": "^7.1.1",
|
|
52
58
|
"cross-env": "^3.1.4",
|
|
53
59
|
"eslint": "^7.28.0",
|
|
54
60
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
55
|
-
"eslint-
|
|
61
|
+
"eslint-config-prettier": "^8.5.0",
|
|
62
|
+
"eslint-plugin-import": "^2.25.4",
|
|
56
63
|
"husky": "^7.0.4",
|
|
57
64
|
"kacl": "^1.1.1",
|
|
58
|
-
"mocha": "^9.
|
|
65
|
+
"mocha": "^9.2.2",
|
|
59
66
|
"nyc": "^15.0.1",
|
|
67
|
+
"prettier": "^2.6.1",
|
|
68
|
+
"pretty-quick": "^3.1.3",
|
|
60
69
|
"rimraf": "^3.0.2",
|
|
61
70
|
"rmdir-sync": "^1.0.1",
|
|
62
71
|
"ts-mocha": "^9.0.2",
|
package/tsconfig.json
CHANGED
|
@@ -17,6 +17,6 @@ numJsFiles=$(find ./src -name "*.js" | wc -l | xargs)
|
|
|
17
17
|
totalNumFiles=$(expr ${numTsFiles} + ${numJsFiles})
|
|
18
18
|
percentFilesMigrated=$(expr $(expr ${numTsFiles} \* 100) / ${totalNumFiles})
|
|
19
19
|
|
|
20
|
-
echo "${numTsFiles} of ${
|
|
20
|
+
echo "${numTsFiles} of ${totalNumFiles} (${percentFilesMigrated}%) files migrated to Typescript"
|
|
21
21
|
|
|
22
22
|
echo "- - - - - - - - - - - - - - - - - - - - - -"
|
package/lib/tools/logger.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const winston = require('winston');
|
|
2
|
-
winston.emitErrs = true;
|
|
3
|
-
const logger = new winston.Logger({
|
|
4
|
-
transports: [
|
|
5
|
-
new winston.transports.Console({
|
|
6
|
-
timestamp: true,
|
|
7
|
-
level: 'info',
|
|
8
|
-
handleExceptions: true,
|
|
9
|
-
json: false,
|
|
10
|
-
colorize: true
|
|
11
|
-
})
|
|
12
|
-
],
|
|
13
|
-
exitOnError: false
|
|
14
|
-
});
|
|
15
|
-
module.exports = logger;
|