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.
Files changed (216) hide show
  1. package/.eslintrc +7 -41
  2. package/.husky/pre-commit +4 -0
  3. package/.husky/pre-push +3 -1
  4. package/.prettierignore +10 -0
  5. package/.prettierrc.json +4 -0
  6. package/CHANGELOG.md +222 -7
  7. package/CONTRIBUTING.md +2 -2
  8. package/README.md +3 -0
  9. package/lib/args.d.ts +29 -0
  10. package/lib/args.js +16 -15
  11. package/lib/commands/export.d.ts +2 -0
  12. package/lib/commands/export.js +3 -3
  13. package/lib/commands/import.d.ts +2 -0
  14. package/lib/commands/import.js +6 -6
  15. package/lib/commands/index.d.ts +9 -0
  16. package/lib/commands/index.js +1 -1
  17. package/lib/configFactory.d.ts +7 -0
  18. package/lib/configFactory.js +5 -1
  19. package/lib/context/defaults.d.ts +1 -0
  20. package/lib/context/defaults.js +4 -3
  21. package/lib/context/directory/handlers/actions.d.ts +6 -0
  22. package/lib/context/directory/handlers/actions.js +3 -3
  23. package/lib/context/directory/handlers/attackProtection.d.ts +10 -0
  24. package/lib/context/directory/handlers/attackProtection.js +7 -7
  25. package/lib/context/directory/handlers/branding.d.ts +6 -0
  26. package/lib/context/directory/handlers/branding.js +6 -5
  27. package/lib/context/directory/handlers/clientGrants.d.ts +6 -0
  28. package/lib/context/directory/handlers/clientGrants.js +3 -2
  29. package/lib/context/directory/handlers/clients.d.ts +6 -0
  30. package/lib/context/directory/handlers/clients.js +1 -1
  31. package/lib/context/directory/handlers/connections.d.ts +6 -0
  32. package/lib/context/directory/handlers/connections.js +4 -2
  33. package/lib/context/directory/handlers/databases.d.ts +6 -0
  34. package/lib/context/directory/handlers/databases.js +13 -7
  35. package/lib/context/directory/handlers/emailProvider.d.ts +6 -0
  36. package/lib/context/directory/handlers/emailProvider.js +3 -2
  37. package/lib/context/directory/handlers/emailTemplates.d.ts +6 -0
  38. package/lib/context/directory/handlers/emailTemplates.js +2 -2
  39. package/lib/context/directory/handlers/guardianFactorProviders.d.ts +6 -0
  40. package/lib/context/directory/handlers/guardianFactorProviders.js +3 -2
  41. package/lib/context/directory/handlers/guardianFactorTemplates.d.ts +6 -0
  42. package/lib/context/directory/handlers/guardianFactorTemplates.js +3 -2
  43. package/lib/context/directory/handlers/guardianFactors.d.ts +6 -0
  44. package/lib/context/directory/handlers/guardianFactors.js +3 -2
  45. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
  46. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +1 -1
  47. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
  48. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +1 -1
  49. package/lib/context/directory/handlers/guardianPolicies.d.ts +6 -0
  50. package/lib/context/directory/handlers/guardianPolicies.js +1 -1
  51. package/lib/context/directory/handlers/hooks.d.ts +6 -0
  52. package/lib/context/directory/handlers/hooks.js +2 -2
  53. package/lib/context/directory/handlers/index.d.ts +12 -0
  54. package/lib/context/directory/handlers/index.js +3 -2
  55. package/lib/context/directory/handlers/migrations.d.ts +6 -0
  56. package/lib/context/directory/handlers/organizations.d.ts +6 -0
  57. package/lib/context/directory/handlers/organizations.js +1 -1
  58. package/lib/context/directory/handlers/pages.d.ts +6 -0
  59. package/lib/context/directory/handlers/pages.js +2 -2
  60. package/lib/context/directory/handlers/resourceServers.d.ts +6 -0
  61. package/lib/context/directory/handlers/resourceServers.js +3 -2
  62. package/lib/context/directory/handlers/roles.d.ts +6 -0
  63. package/lib/context/directory/handlers/roles.js +1 -1
  64. package/lib/context/directory/handlers/rules.d.ts +6 -0
  65. package/lib/context/directory/handlers/rules.js +2 -2
  66. package/lib/context/directory/handlers/rulesConfigs.d.ts +6 -0
  67. package/lib/context/directory/handlers/rulesConfigs.js +3 -2
  68. package/lib/context/directory/handlers/tenant.d.ts +10 -0
  69. package/lib/context/directory/handlers/tenant.js +3 -2
  70. package/lib/context/directory/handlers/triggers.d.ts +6 -0
  71. package/lib/context/directory/index.d.ts +17 -0
  72. package/lib/context/directory/index.js +21 -18
  73. package/lib/context/index.d.ts +4 -0
  74. package/lib/context/index.js +83 -61
  75. package/lib/context/yaml/handlers/actions.d.ts +6 -0
  76. package/lib/context/yaml/handlers/actions.js +9 -6
  77. package/lib/context/yaml/handlers/attackProtection.d.ts +6 -0
  78. package/lib/context/yaml/handlers/attackProtection.js +1 -1
  79. package/lib/context/yaml/handlers/branding.d.ts +6 -0
  80. package/lib/context/yaml/handlers/branding.js +5 -4
  81. package/lib/context/yaml/handlers/clientGrants.d.ts +6 -0
  82. package/lib/context/yaml/handlers/clientGrants.js +2 -2
  83. package/lib/context/yaml/handlers/clients.d.ts +6 -0
  84. package/lib/context/yaml/handlers/clients.js +6 -4
  85. package/lib/context/yaml/handlers/connections.d.ts +6 -0
  86. package/lib/context/yaml/handlers/connections.js +7 -5
  87. package/lib/context/yaml/handlers/databases.d.ts +6 -0
  88. package/lib/context/yaml/handlers/databases.js +12 -8
  89. package/lib/context/yaml/handlers/emailProvider.d.ts +6 -0
  90. package/lib/context/yaml/handlers/emailProvider.js +4 -3
  91. package/lib/context/yaml/handlers/emailTemplates.d.ts +6 -0
  92. package/lib/context/yaml/handlers/emailTemplates.js +3 -3
  93. package/lib/context/yaml/handlers/guardianFactorProviders.d.ts +6 -0
  94. package/lib/context/yaml/handlers/guardianFactorProviders.js +1 -1
  95. package/lib/context/yaml/handlers/guardianFactorTemplates.d.ts +6 -0
  96. package/lib/context/yaml/handlers/guardianFactorTemplates.js +1 -1
  97. package/lib/context/yaml/handlers/guardianFactors.d.ts +6 -0
  98. package/lib/context/yaml/handlers/guardianFactors.js +1 -1
  99. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
  100. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +1 -1
  101. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
  102. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +1 -1
  103. package/lib/context/yaml/handlers/guardianPolicies.d.ts +6 -0
  104. package/lib/context/yaml/handlers/guardianPolicies.js +1 -1
  105. package/lib/context/yaml/handlers/hooks.d.ts +6 -0
  106. package/lib/context/yaml/handlers/hooks.js +4 -3
  107. package/lib/context/yaml/handlers/index.d.ts +12 -0
  108. package/lib/context/yaml/handlers/index.js +3 -2
  109. package/lib/context/yaml/handlers/migrations.d.ts +6 -0
  110. package/lib/context/yaml/handlers/organizations.d.ts +6 -0
  111. package/lib/context/yaml/handlers/organizations.js +3 -3
  112. package/lib/context/yaml/handlers/pages.d.ts +6 -0
  113. package/lib/context/yaml/handlers/pages.js +3 -3
  114. package/lib/context/yaml/handlers/resourceServers.d.ts +6 -0
  115. package/lib/context/yaml/handlers/resourceServers.js +2 -2
  116. package/lib/context/yaml/handlers/roles.d.ts +6 -0
  117. package/lib/context/yaml/handlers/roles.js +3 -3
  118. package/lib/context/yaml/handlers/rules.d.ts +6 -0
  119. package/lib/context/yaml/handlers/rules.js +3 -3
  120. package/lib/context/yaml/handlers/rulesConfigs.d.ts +6 -0
  121. package/lib/context/yaml/handlers/rulesConfigs.js +2 -2
  122. package/lib/context/yaml/handlers/tenant.d.ts +6 -0
  123. package/lib/context/yaml/handlers/tenant.js +4 -3
  124. package/lib/context/yaml/handlers/triggers.d.ts +6 -0
  125. package/lib/context/yaml/handlers/triggers.js +2 -2
  126. package/lib/context/yaml/index.d.ts +13 -0
  127. package/lib/context/yaml/index.js +31 -23
  128. package/lib/index.d.ts +88 -0
  129. package/lib/index.js +25 -17
  130. package/lib/logger.d.ts +2 -0
  131. package/lib/logger.js +8 -17
  132. package/lib/readonly.d.ts +2 -0
  133. package/lib/readonly.js +11 -16
  134. package/lib/sessionDurationsToMinutes.d.ts +7 -0
  135. package/lib/sessionDurationsToMinutes.js +15 -0
  136. package/lib/tools/auth0/client.d.ts +2 -0
  137. package/lib/tools/auth0/client.js +12 -12
  138. package/lib/tools/auth0/handlers/actions.d.ts +95 -0
  139. package/lib/tools/auth0/handlers/actions.js +22 -24
  140. package/lib/tools/auth0/handlers/attackProtection.d.ts +28 -0
  141. package/lib/tools/auth0/handlers/attackProtection.js +14 -17
  142. package/lib/tools/auth0/handlers/branding.d.ts +27 -0
  143. package/lib/tools/auth0/handlers/branding.js +13 -9
  144. package/lib/tools/auth0/handlers/clientGrants.d.ts +32 -0
  145. package/lib/tools/auth0/handlers/clientGrants.js +17 -10
  146. package/lib/tools/auth0/handlers/clients.d.ts +23 -0
  147. package/lib/tools/auth0/handlers/clients.js +15 -8
  148. package/lib/tools/auth0/handlers/connections.d.ts +54 -0
  149. package/lib/tools/auth0/handlers/connections.js +30 -10
  150. package/lib/tools/auth0/handlers/databases.d.ts +36 -0
  151. package/lib/tools/auth0/handlers/databases.js +25 -13
  152. package/lib/tools/auth0/handlers/default.d.ts +54 -0
  153. package/lib/tools/auth0/handlers/default.js +62 -36
  154. package/lib/tools/auth0/handlers/emailProvider.d.ts +11 -0
  155. package/lib/tools/auth0/handlers/emailTemplates.d.ts +26 -0
  156. package/lib/tools/auth0/handlers/emailTemplates.js +8 -10
  157. package/lib/tools/auth0/handlers/guardianFactorProviders.d.ts +25 -0
  158. package/lib/tools/auth0/handlers/guardianFactorProviders.js +3 -3
  159. package/lib/tools/auth0/handlers/guardianFactorTemplates.d.ts +21 -0
  160. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +3 -3
  161. package/lib/tools/auth0/handlers/guardianFactors.d.ts +21 -0
  162. package/lib/tools/auth0/handlers/guardianFactors.js +3 -3
  163. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.d.ts +21 -0
  164. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +11 -10
  165. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.d.ts +18 -0
  166. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +10 -9
  167. package/lib/tools/auth0/handlers/guardianPolicies.d.ts +23 -0
  168. package/lib/tools/auth0/handlers/guardianPolicies.js +5 -4
  169. package/lib/tools/auth0/handlers/hooks.d.ts +58 -0
  170. package/lib/tools/auth0/handlers/hooks.js +34 -21
  171. package/lib/tools/auth0/handlers/index.d.ts +129 -0
  172. package/lib/tools/auth0/handlers/index.js +31 -27
  173. package/lib/tools/auth0/handlers/migrations.d.ts +15 -0
  174. package/lib/tools/auth0/handlers/migrations.js +3 -2
  175. package/lib/tools/auth0/handlers/organizations.d.ts +51 -0
  176. package/lib/tools/auth0/handlers/organizations.js +62 -32
  177. package/lib/tools/auth0/handlers/pages.d.ts +42 -0
  178. package/lib/tools/auth0/handlers/pages.js +20 -14
  179. package/lib/tools/auth0/handlers/prompts.d.ts +11 -0
  180. package/lib/tools/auth0/handlers/prompts.js +1 -0
  181. package/lib/tools/auth0/handlers/resourceServers.d.ts +51 -0
  182. package/lib/tools/auth0/handlers/resourceServers.js +22 -14
  183. package/lib/tools/auth0/handlers/roles.d.ts +48 -0
  184. package/lib/tools/auth0/handlers/roles.js +56 -32
  185. package/lib/tools/auth0/handlers/rules.d.ts +55 -0
  186. package/lib/tools/auth0/handlers/rules.js +53 -36
  187. package/lib/tools/auth0/handlers/rulesConfigs.d.ts +25 -0
  188. package/lib/tools/auth0/handlers/rulesConfigs.js +12 -6
  189. package/lib/tools/auth0/handlers/tenant.d.ts +11 -0
  190. package/lib/tools/auth0/handlers/tenant.js +8 -4
  191. package/lib/tools/auth0/handlers/triggers.d.ts +35 -0
  192. package/lib/tools/auth0/handlers/triggers.js +12 -13
  193. package/lib/tools/auth0/index.d.ts +15 -0
  194. package/lib/tools/auth0/index.js +15 -31
  195. package/lib/tools/auth0/schema.d.ts +15 -0
  196. package/lib/tools/auth0/schema.js +7 -27
  197. package/lib/tools/calculateChanges.d.ts +26 -0
  198. package/lib/tools/calculateChanges.js +12 -7
  199. package/lib/tools/constants.d.ts +71 -0
  200. package/lib/tools/constants.js +164 -161
  201. package/lib/tools/deploy.d.ts +3 -0
  202. package/lib/tools/deploy.js +3 -3
  203. package/lib/tools/index.d.ts +82 -0
  204. package/lib/tools/index.js +1 -1
  205. package/lib/tools/utils.d.ts +18 -0
  206. package/lib/tools/utils.js +68 -10
  207. package/lib/tools/validationError.d.ts +5 -0
  208. package/lib/tools/{ValidationError.js → validationError.js} +3 -1
  209. package/lib/types.d.ts +255 -0
  210. package/lib/types.js +2 -0
  211. package/lib/utils.d.ts +66 -0
  212. package/lib/utils.js +18 -25
  213. package/package.json +16 -7
  214. package/tsconfig.json +3 -4
  215. package/typescript-migration-progress.sh +1 -1
  216. 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.hoursAsInteger = exports.sanitize = exports.stripIdentifiers = exports.toConfigFn = exports.existsMustBeDir = exports.dumpJSON = exports.loadJSON = exports.getFiles = exports.isFile = exports.isDirectory = void 0;
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(f) {
13
+ function isDirectory(filePath) {
14
14
  try {
15
- return fs_extra_1.default.statSync(path_1.default.resolve(f))
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(f) {
22
+ function isFile(filePath) {
24
23
  try {
25
- return fs_extra_1.default.statSync(path_1.default.resolve(f))
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.readdirSync(folder)
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).sort().forEach(([key, value]) => {
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, value = '') {
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.6.0",
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.0",
44
+ "nconf": "^0.11.4",
41
45
  "promise-pool-executor": "^1.1.1",
42
46
  "sanitize-filename": "^1.6.1",
43
- "winston": "^2.3.0",
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
- "@typescript-eslint/parser": "^5.14.0",
50
- "chai": "^4.1.2",
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-plugin-import": "^2.20.2",
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.1.3",
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
@@ -10,9 +10,8 @@
10
10
  "forceConsistentCasingInFileNames": true,
11
11
  "strict": false,
12
12
  "strictNullChecks": true,
13
- "skipLibCheck": true
13
+ "skipLibCheck": true,
14
+ "declaration": true
14
15
  },
15
- "include": [
16
- "src/**/*"
17
- ]
16
+ "include": ["src/**/*"]
18
17
  }
@@ -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 ${numJsFiles} (${percentFilesMigrated}%) files migrated to Typescript"
20
+ echo "${numTsFiles} of ${totalNumFiles} (${percentFilesMigrated}%) files migrated to Typescript"
21
21
 
22
22
  echo "- - - - - - - - - - - - - - - - - - - - - -"
@@ -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;