auth0-deploy-cli 7.4.0 → 7.5.2
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/.circleci/config.yml +15 -0
- package/.eslintrc +66 -17
- package/.github/CODEOWNERS +1 -0
- package/.husky/pre-commit +2 -0
- package/CHANGELOG.md +27 -2
- package/lib/args.js +94 -81
- package/lib/commands/export.js +54 -78
- package/lib/commands/import.js +46 -70
- package/lib/commands/index.js +11 -20
- package/lib/configFactory.js +19 -27
- package/lib/context/defaults.js +18 -41
- package/lib/context/directory/handlers/actions.js +77 -107
- package/lib/context/directory/handlers/attackProtection.js +59 -0
- package/lib/context/directory/handlers/clientGrants.js +45 -54
- package/lib/context/directory/handlers/clients.js +60 -79
- package/lib/context/directory/handlers/connections.js +65 -89
- package/lib/context/directory/handlers/databases.js +91 -123
- package/lib/context/directory/handlers/emailProvider.js +46 -57
- package/lib/context/directory/handlers/emailTemplates.js +67 -80
- package/lib/context/directory/handlers/guardianFactorProviders.js +41 -49
- package/lib/context/directory/handlers/guardianFactorTemplates.js +41 -49
- package/lib/context/directory/handlers/guardianFactors.js +41 -49
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +40 -50
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +40 -50
- package/lib/context/directory/handlers/guardianPolicies.js +40 -50
- package/lib/context/directory/handlers/hooks.js +55 -70
- package/lib/context/directory/handlers/index.js +53 -123
- package/lib/context/directory/handlers/migrations.js +36 -41
- package/lib/context/directory/handlers/organizations.js +54 -69
- package/lib/context/directory/handlers/pages.js +72 -86
- package/lib/context/directory/handlers/resourceServers.js +41 -49
- package/lib/context/directory/handlers/roles.js +49 -62
- package/lib/context/directory/handlers/rules.js +52 -68
- package/lib/context/directory/handlers/rulesConfigs.js +33 -32
- package/lib/context/directory/handlers/tenant.js +52 -47
- package/lib/context/directory/handlers/triggers.js +39 -54
- package/lib/context/directory/index.js +113 -101
- package/lib/context/index.js +96 -105
- package/lib/context/yaml/handlers/actions.js +71 -88
- package/lib/context/yaml/handlers/attackProtection.js +29 -0
- package/lib/context/yaml/handlers/clientGrants.js +36 -29
- package/lib/context/yaml/handlers/clients.js +61 -76
- package/lib/context/yaml/handlers/connections.js +76 -103
- package/lib/context/yaml/handlers/databases.js +64 -79
- package/lib/context/yaml/handlers/emailProvider.js +33 -30
- package/lib/context/yaml/handlers/emailTemplates.js +45 -54
- package/lib/context/yaml/handlers/guardianFactorProviders.js +27 -18
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +27 -18
- package/lib/context/yaml/handlers/guardianFactors.js +27 -18
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +27 -20
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +27 -20
- package/lib/context/yaml/handlers/guardianPolicies.js +27 -20
- package/lib/context/yaml/handlers/hooks.js +57 -67
- package/lib/context/yaml/handlers/index.js +53 -123
- package/lib/context/yaml/handlers/migrations.js +23 -24
- package/lib/context/yaml/handlers/organizations.js +40 -38
- package/lib/context/yaml/handlers/pages.js +49 -58
- package/lib/context/yaml/handlers/resourceServers.js +27 -18
- package/lib/context/yaml/handlers/roles.js +34 -24
- package/lib/context/yaml/handlers/rules.js +48 -58
- package/lib/context/yaml/handlers/rulesConfigs.js +27 -18
- package/lib/context/yaml/handlers/tenant.js +44 -30
- package/lib/context/yaml/handlers/triggers.js +32 -23
- package/lib/context/yaml/index.js +127 -142
- package/lib/index.js +73 -79
- package/lib/logger.js +18 -22
- package/lib/readonly.js +74 -66
- package/lib/tools/ValidationError.js +8 -13
- package/lib/tools/auth0/client.js +143 -133
- package/lib/tools/auth0/handlers/actions.js +231 -243
- package/lib/tools/auth0/handlers/attackProtection.js +86 -0
- package/lib/tools/auth0/handlers/branding.js +47 -46
- package/lib/tools/auth0/handlers/clientGrants.js +118 -116
- package/lib/tools/auth0/handlers/clients.js +72 -90
- package/lib/tools/auth0/handlers/connections.js +150 -118
- package/lib/tools/auth0/handlers/databases.js +127 -124
- package/lib/tools/auth0/handlers/default.js +186 -189
- package/lib/tools/auth0/handlers/emailProvider.js +67 -78
- package/lib/tools/auth0/handlers/emailTemplates.js +116 -92
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +66 -81
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +60 -71
- package/lib/tools/auth0/handlers/guardianFactors.js +56 -63
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +80 -79
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +77 -76
- package/lib/tools/auth0/handlers/guardianPolicies.js +59 -62
- package/lib/tools/auth0/handlers/hooks.js +201 -227
- package/lib/tools/auth0/handlers/index.js +53 -111
- package/lib/tools/auth0/handlers/migrations.js +99 -79
- package/lib/tools/auth0/handlers/organizations.js +225 -247
- package/lib/tools/auth0/handlers/pages.js +116 -154
- package/lib/tools/auth0/handlers/prompts.js +47 -46
- package/lib/tools/auth0/handlers/resourceServers.js +88 -112
- package/lib/tools/auth0/handlers/roles.js +203 -220
- package/lib/tools/auth0/handlers/rules.js +168 -189
- package/lib/tools/auth0/handlers/rulesConfigs.js +54 -63
- package/lib/tools/auth0/handlers/tenant.js +88 -64
- package/lib/tools/auth0/handlers/triggers.js +126 -126
- package/lib/tools/auth0/index.js +92 -85
- package/lib/tools/auth0/schema.js +39 -31
- package/lib/tools/constants.js +111 -21
- package/lib/tools/deploy.js +35 -32
- package/lib/tools/index.js +19 -32
- package/lib/tools/logger.js +11 -12
- package/lib/tools/utils.js +255 -282
- package/lib/utils.js +167 -190
- package/package.json +10 -16
- package/tsconfig.json +17 -0
- package/typescript-migration-progress.sh +22 -0
- package/.babelrc +0 -17
- package/.nyc_output/597f412e-a239-4319-ad5b-ddb87fc39e67.json +0 -1
- package/.nyc_output/processinfo/597f412e-a239-4319-ad5b-ddb87fc39e67.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
package/lib/tools/constants.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const constants = {};
|
|
7
4
|
constants.RULES_DIRECTORY = 'rules';
|
|
8
|
-
constants.RULES_STAGES = [
|
|
9
|
-
|
|
5
|
+
constants.RULES_STAGES = [
|
|
6
|
+
'login_success'
|
|
7
|
+
];
|
|
8
|
+
constants.DEFAULT_RULE_STAGE = constants.RULES_STAGES[0]; // eslint-disable-line
|
|
10
9
|
constants.HOOKS_HIDDEN_SECRET_VALUE = '_VALUE_NOT_SHOWN_';
|
|
11
10
|
constants.HOOKS_DIRECTORY = 'hooks';
|
|
12
11
|
constants.ACTIONS_DIRECTORY = 'actions';
|
|
@@ -17,13 +16,40 @@ constants.PAGE_LOGIN = 'login';
|
|
|
17
16
|
constants.PAGE_PASSWORD_RESET = 'password_reset';
|
|
18
17
|
constants.PAGE_GUARDIAN_MULTIFACTOR = 'guardian_multifactor';
|
|
19
18
|
constants.PAGE_ERROR = 'error_page';
|
|
20
|
-
constants.PAGE_NAMES = [
|
|
19
|
+
constants.PAGE_NAMES = [
|
|
20
|
+
constants.PAGE_GUARDIAN_MULTIFACTOR + '.html',
|
|
21
|
+
constants.PAGE_GUARDIAN_MULTIFACTOR + '.json',
|
|
22
|
+
constants.PAGE_PASSWORD_RESET + '.html',
|
|
23
|
+
constants.PAGE_PASSWORD_RESET + '.json',
|
|
24
|
+
constants.PAGE_LOGIN + '.html',
|
|
25
|
+
constants.PAGE_LOGIN + '.json',
|
|
26
|
+
constants.PAGE_ERROR + '.html',
|
|
27
|
+
constants.PAGE_ERROR + '.json'
|
|
28
|
+
];
|
|
21
29
|
constants.DATABASE_CONNECTIONS_DIRECTORY = 'database-connections';
|
|
22
30
|
constants.DATABASE_SCRIPTS_CHANGE_EMAIL = 'change_email';
|
|
23
31
|
constants.DATABASE_SCRIPTS_GET_USER = 'get_user';
|
|
24
|
-
constants.DATABASE_SCRIPTS = [
|
|
25
|
-
constants.
|
|
26
|
-
|
|
32
|
+
constants.DATABASE_SCRIPTS = [
|
|
33
|
+
constants.DATABASE_SCRIPTS_GET_USER,
|
|
34
|
+
'create',
|
|
35
|
+
'verify',
|
|
36
|
+
'login',
|
|
37
|
+
'change_password',
|
|
38
|
+
'delete',
|
|
39
|
+
constants.DATABASE_SCRIPTS_CHANGE_EMAIL
|
|
40
|
+
];
|
|
41
|
+
constants.DATABASE_SCRIPTS_NO_IMPORT = [
|
|
42
|
+
constants.DATABASE_SCRIPTS_GET_USER,
|
|
43
|
+
'create',
|
|
44
|
+
'verify',
|
|
45
|
+
'login',
|
|
46
|
+
'change_password',
|
|
47
|
+
'delete'
|
|
48
|
+
];
|
|
49
|
+
constants.DATABASE_SCRIPTS_IMPORT = [
|
|
50
|
+
constants.DATABASE_SCRIPTS_GET_USER,
|
|
51
|
+
'login'
|
|
52
|
+
];
|
|
27
53
|
constants.EMAIL_TEMPLATES_DIRECTORY = 'emails';
|
|
28
54
|
constants.EMAIL_VERIFY = 'verify_email';
|
|
29
55
|
constants.EMAIL_VERIFY_BY_CODE = 'verify_email_by_code';
|
|
@@ -36,21 +62,84 @@ constants.EMAIL_CHANGE_PASSWORD = 'change_password';
|
|
|
36
62
|
constants.EMAIL_PASSWORD_RESET = 'password_reset';
|
|
37
63
|
constants.EMAIL_MFA_OOB_CODE = 'mfa_oob_code';
|
|
38
64
|
constants.EMAIL_USER_INVITATION = 'user_invitation';
|
|
39
|
-
constants.EMAIL_TEMPLATES_NAMES = [
|
|
40
|
-
constants.
|
|
41
|
-
constants.
|
|
65
|
+
constants.EMAIL_TEMPLATES_NAMES = [
|
|
66
|
+
constants.EMAIL_VERIFY + '.json',
|
|
67
|
+
constants.EMAIL_VERIFY + '.html',
|
|
68
|
+
constants.EMAIL_VERIFY_BY_CODE + '.json',
|
|
69
|
+
constants.EMAIL_VERIFY_BY_CODE + '.html',
|
|
70
|
+
constants.EMAIL_RESET + '.json',
|
|
71
|
+
constants.EMAIL_RESET + '.html',
|
|
72
|
+
constants.EMAIL_WELCOME + '.json',
|
|
73
|
+
constants.EMAIL_WELCOME + '.html',
|
|
74
|
+
constants.EMAIL_BLOCKED + '.json',
|
|
75
|
+
constants.EMAIL_BLOCKED + '.html',
|
|
76
|
+
constants.EMAIL_STOLEN_CREDENTIALS + '.json',
|
|
77
|
+
constants.EMAIL_STOLEN_CREDENTIALS + '.html',
|
|
78
|
+
constants.EMAIL_ENROLLMENT + '.json',
|
|
79
|
+
constants.EMAIL_ENROLLMENT + '.html',
|
|
80
|
+
constants.EMAIL_CHANGE_PASSWORD + '.json',
|
|
81
|
+
constants.EMAIL_CHANGE_PASSWORD + '.html',
|
|
82
|
+
constants.EMAIL_PASSWORD_RESET + '.json',
|
|
83
|
+
constants.EMAIL_PASSWORD_RESET + '.html',
|
|
84
|
+
constants.EMAIL_MFA_OOB_CODE + '.json',
|
|
85
|
+
constants.EMAIL_MFA_OOB_CODE + '.html',
|
|
86
|
+
constants.EMAIL_USER_INVITATION + '.json',
|
|
87
|
+
constants.EMAIL_USER_INVITATION + '.html'
|
|
88
|
+
];
|
|
89
|
+
constants.EMAIL_TEMPLATES_TYPES = [
|
|
90
|
+
'verify_email',
|
|
91
|
+
'verify_email_by_code',
|
|
92
|
+
'reset_email',
|
|
93
|
+
'welcome_email',
|
|
94
|
+
'blocked_account',
|
|
95
|
+
'stolen_credentials',
|
|
96
|
+
'enrollment_email',
|
|
97
|
+
'mfa_oob_code',
|
|
98
|
+
'change_password',
|
|
99
|
+
'password_reset',
|
|
100
|
+
'user_invitation'
|
|
101
|
+
];
|
|
102
|
+
constants.ACTIONS_TRIGGERS = [
|
|
103
|
+
'post-login',
|
|
104
|
+
'credentials-exchange',
|
|
105
|
+
'pre-user-registration',
|
|
106
|
+
'post-user-registration',
|
|
107
|
+
'post-change-password',
|
|
108
|
+
'send-phone-message'
|
|
109
|
+
];
|
|
42
110
|
constants.GUARDIAN_DIRECTORY = 'guardian';
|
|
43
111
|
constants.GUARDIAN_FACTORS_DIRECTORY = 'factors';
|
|
44
112
|
constants.GUARDIAN_PROVIDERS_DIRECTORY = 'providers';
|
|
45
113
|
constants.GUARDIAN_TEMPLATES_DIRECTORY = 'templates';
|
|
46
|
-
constants.GUARDIAN_FACTORS = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
114
|
+
constants.GUARDIAN_FACTORS = [
|
|
115
|
+
'sms',
|
|
116
|
+
'push-notification',
|
|
117
|
+
'otp',
|
|
118
|
+
'email',
|
|
119
|
+
'duo',
|
|
120
|
+
'webauthn-roaming',
|
|
121
|
+
'webauthn-platform',
|
|
122
|
+
'recovery-code'
|
|
123
|
+
];
|
|
124
|
+
constants.GUARDIAN_POLICIES = [
|
|
125
|
+
'all-applications',
|
|
126
|
+
'confidence-score'
|
|
127
|
+
];
|
|
128
|
+
constants.GUARDIAN_PHONE_PROVIDERS = [
|
|
129
|
+
'auth0',
|
|
130
|
+
'twilio',
|
|
131
|
+
'phone-message-hook'
|
|
132
|
+
];
|
|
133
|
+
constants.GUARDIAN_PHONE_MESSAGE_TYPES = [
|
|
134
|
+
'sms',
|
|
135
|
+
'voice'
|
|
136
|
+
];
|
|
137
|
+
constants.GUARDIAN_FACTOR_TEMPLATES = [
|
|
138
|
+
'sms'
|
|
139
|
+
];
|
|
51
140
|
constants.GUARDIAN_FACTOR_PROVIDERS = {
|
|
52
|
-
|
|
53
|
-
|
|
141
|
+
sms: ['twilio'],
|
|
142
|
+
'push-notification': ['sns']
|
|
54
143
|
};
|
|
55
144
|
constants.RESOURCE_SERVERS_DIRECTORY = 'resource-servers';
|
|
56
145
|
constants.RESOURCE_SERVERS_CLIENT_NAME = 'resourceServers';
|
|
@@ -65,4 +154,5 @@ constants.CONNECTIONS_CLIENT_NAME = 'connections';
|
|
|
65
154
|
constants.CONNECTIONS_ID_NAME = 'id';
|
|
66
155
|
constants.CONCURRENT_CALLS = 5;
|
|
67
156
|
constants.ROLES_DIRECTORY = 'roles';
|
|
68
|
-
|
|
157
|
+
constants.ATTACK_PROTECTION_DIRECTORY = 'attack-protection';
|
|
158
|
+
exports.default = constants;
|
package/lib/tools/deploy.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const auth0_1 = __importDefault(require("./auth0"));
|
|
16
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
17
|
+
function deploy(assets, client, config) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
// Setup log level
|
|
20
|
+
logger_1.default.transports.console.level = process.env.AUTH0_DEBUG === 'true' ? 'debug' : 'info';
|
|
21
|
+
logger_1.default.info('Getting access token for ' + config('AUTH0_CLIENT_ID') + '/' + config('AUTH0_DOMAIN'));
|
|
22
|
+
const auth0 = new auth0_1.default(client, assets, config);
|
|
23
|
+
// Validate Assets
|
|
24
|
+
yield auth0.validate();
|
|
25
|
+
// Process changes
|
|
26
|
+
yield auth0.processChanges();
|
|
27
|
+
return auth0.handlers.reduce((accum, h) => {
|
|
28
|
+
accum[h.type] = {
|
|
29
|
+
deleted: h.deleted,
|
|
30
|
+
created: h.created,
|
|
31
|
+
updated: h.updated
|
|
32
|
+
};
|
|
33
|
+
return accum;
|
|
34
|
+
}, {});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
6
37
|
exports.default = deploy;
|
|
7
|
-
|
|
8
|
-
var _auth = require("./auth0");
|
|
9
|
-
|
|
10
|
-
var _auth2 = _interopRequireDefault(_auth);
|
|
11
|
-
|
|
12
|
-
var _logger = require("./logger");
|
|
13
|
-
|
|
14
|
-
var _logger2 = _interopRequireDefault(_logger);
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
async function deploy(assets, client, config) {
|
|
19
|
-
_logger2.default.transports.console.level = process.env.AUTH0_DEBUG === 'true' ? 'debug' : 'info';
|
|
20
|
-
|
|
21
|
-
_logger2.default.info('Getting access token for ' + config('AUTH0_CLIENT_ID') + '/' + config('AUTH0_DOMAIN'));
|
|
22
|
-
|
|
23
|
-
const auth0 = new _auth2.default(client, assets, config);
|
|
24
|
-
await auth0.validate();
|
|
25
|
-
await auth0.processChanges();
|
|
26
|
-
return auth0.handlers.reduce((accum, h) => {
|
|
27
|
-
accum[h.type] = {
|
|
28
|
-
deleted: h.deleted,
|
|
29
|
-
created: h.created,
|
|
30
|
-
updated: h.updated
|
|
31
|
-
};
|
|
32
|
-
return accum;
|
|
33
|
-
}, {});
|
|
34
|
-
}
|
package/lib/tools/index.js
CHANGED
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.Auth0 = exports.loadFileAndReplaceKeywords = exports.keywordReplace = exports.deploy = exports.constants =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _auth = require("./auth0");
|
|
17
|
-
|
|
18
|
-
var _auth2 = _interopRequireDefault(_auth);
|
|
19
|
-
|
|
20
|
-
var _utils = require("./utils");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Auth0 = exports.loadFileAndReplaceKeywords = exports.keywordReplace = exports.deploy = exports.constants = void 0;
|
|
7
|
+
const constants_1 = __importDefault(require("./constants"));
|
|
8
|
+
exports.constants = constants_1.default;
|
|
9
|
+
const deploy_1 = __importDefault(require("./deploy"));
|
|
10
|
+
exports.deploy = deploy_1.default;
|
|
11
|
+
const auth0_1 = __importDefault(require("./auth0"));
|
|
12
|
+
exports.Auth0 = auth0_1.default;
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
Object.defineProperty(exports, "keywordReplace", { enumerable: true, get: function () { return utils_1.keywordReplace; } });
|
|
15
|
+
Object.defineProperty(exports, "loadFileAndReplaceKeywords", { enumerable: true, get: function () { return utils_1.loadFileAndReplaceKeywords; } });
|
|
24
16
|
exports.default = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
constants: constants_1.default,
|
|
18
|
+
deploy: deploy_1.default,
|
|
19
|
+
keywordReplace: utils_1.keywordReplace,
|
|
20
|
+
loadFileAndReplaceKeywords: utils_1.loadFileAndReplaceKeywords,
|
|
21
|
+
Auth0: auth0_1.default
|
|
30
22
|
};
|
|
31
|
-
exports.constants = _constants2.default;
|
|
32
|
-
exports.deploy = _deploy2.default;
|
|
33
|
-
exports.keywordReplace = _utils.keywordReplace;
|
|
34
|
-
exports.loadFileAndReplaceKeywords = _utils.loadFileAndReplaceKeywords;
|
|
35
|
-
exports.Auth0 = _auth2.default;
|
package/lib/tools/logger.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
const winston = require('winston');
|
|
4
|
-
|
|
5
2
|
winston.emitErrs = true;
|
|
6
3
|
const logger = new winston.Logger({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
15
14
|
});
|
|
16
|
-
module.exports = logger;
|
|
15
|
+
module.exports = logger;
|