@rockcarver/frodo-cli 0.13.3 → 0.14.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.
Files changed (124) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/package.json +14 -7
  3. package/src/app.js +0 -63
  4. package/src/cli/_template/cmd-delete.js +0 -56
  5. package/src/cli/_template/cmd-describe.js +0 -36
  6. package/src/cli/_template/cmd-export.js +0 -54
  7. package/src/cli/_template/cmd-import.js +0 -54
  8. package/src/cli/_template/cmd-list.js +0 -38
  9. package/src/cli/_template/cmd-sub1-delete.js +0 -56
  10. package/src/cli/_template/cmd-sub1-describe.js +0 -36
  11. package/src/cli/_template/cmd-sub1-export.js +0 -54
  12. package/src/cli/_template/cmd-sub1-import.js +0 -54
  13. package/src/cli/_template/cmd-sub1-list.js +0 -38
  14. package/src/cli/_template/cmd-sub1.js +0 -20
  15. package/src/cli/_template/cmd-sub2-delete.js +0 -56
  16. package/src/cli/_template/cmd-sub2-describe.js +0 -36
  17. package/src/cli/_template/cmd-sub2-export.js +0 -54
  18. package/src/cli/_template/cmd-sub2-import.js +0 -54
  19. package/src/cli/_template/cmd-sub2-list.js +0 -38
  20. package/src/cli/_template/cmd-sub2.js +0 -20
  21. package/src/cli/_template/cmd.js +0 -29
  22. package/src/cli/admin/admin-add-autoid-static-user-mapping.js +0 -40
  23. package/src/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +0 -121
  24. package/src/cli/admin/admin-get-access-token.js +0 -59
  25. package/src/cli/admin/admin-grant-oauth2-client-admin-privileges.js +0 -45
  26. package/src/cli/admin/admin-hide-generic-extension-attributes.js +0 -47
  27. package/src/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +0 -45
  28. package/src/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +0 -46
  29. package/src/cli/admin/admin-list-static-user-mappings.js +0 -53
  30. package/src/cli/admin/admin-remove-static-user-mapping.js +0 -38
  31. package/src/cli/admin/admin-repair-org-model.js +0 -47
  32. package/src/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +0 -47
  33. package/src/cli/admin/admin-show-generic-extension-attributes.js +0 -55
  34. package/src/cli/admin/admin.js +0 -94
  35. package/src/cli/app/app-delete.js +0 -56
  36. package/src/cli/app/app-describe.js +0 -36
  37. package/src/cli/app/app-export.js +0 -78
  38. package/src/cli/app/app-import.js +0 -56
  39. package/src/cli/app/app-list.js +0 -40
  40. package/src/cli/app/app.js +0 -29
  41. package/src/cli/cmd_common.js +0 -181
  42. package/src/cli/conn/conn-add.js +0 -65
  43. package/src/cli/conn/conn-delete.js +0 -22
  44. package/src/cli/conn/conn-describe.js +0 -23
  45. package/src/cli/conn/conn-list.js +0 -27
  46. package/src/cli/conn/conn.js +0 -28
  47. package/src/cli/email/email-template-export.js +0 -90
  48. package/src/cli/email/email-template-import.js +0 -90
  49. package/src/cli/email/email-template-list.js +0 -40
  50. package/src/cli/email/email-template.js +0 -16
  51. package/src/cli/email/email.js +0 -17
  52. package/src/cli/esv/esv-apply.js +0 -120
  53. package/src/cli/esv/esv-secret-create.js +0 -64
  54. package/src/cli/esv/esv-secret-delete.js +0 -65
  55. package/src/cli/esv/esv-secret-describe.js +0 -43
  56. package/src/cli/esv/esv-secret-export.js +0 -54
  57. package/src/cli/esv/esv-secret-import.js +0 -54
  58. package/src/cli/esv/esv-secret-list.js +0 -40
  59. package/src/cli/esv/esv-secret-set.js +0 -45
  60. package/src/cli/esv/esv-secret-version-activate.js +0 -53
  61. package/src/cli/esv/esv-secret-version-create.js +0 -45
  62. package/src/cli/esv/esv-secret-version-deactivate.js +0 -53
  63. package/src/cli/esv/esv-secret-version-delete.js +0 -66
  64. package/src/cli/esv/esv-secret-version-list.js +0 -41
  65. package/src/cli/esv/esv-secret-version.js +0 -20
  66. package/src/cli/esv/esv-secret.js +0 -26
  67. package/src/cli/esv/esv-variable-create.js +0 -46
  68. package/src/cli/esv/esv-variable-delete.js +0 -71
  69. package/src/cli/esv/esv-variable-describe.js +0 -43
  70. package/src/cli/esv/esv-variable-export.js +0 -54
  71. package/src/cli/esv/esv-variable-import.js +0 -54
  72. package/src/cli/esv/esv-variable-list.js +0 -40
  73. package/src/cli/esv/esv-variable-set.js +0 -62
  74. package/src/cli/esv/esv-variable.js +0 -24
  75. package/src/cli/esv/esv.js +0 -21
  76. package/src/cli/idm/idm-count.js +0 -42
  77. package/src/cli/idm/idm-export.js +0 -116
  78. package/src/cli/idm/idm-list.js +0 -40
  79. package/src/cli/idm/idm.js +0 -28
  80. package/src/cli/idp/idp-export.js +0 -90
  81. package/src/cli/idp/idp-import.js +0 -101
  82. package/src/cli/idp/idp-list.js +0 -42
  83. package/src/cli/idp/idp.js +0 -21
  84. package/src/cli/info/info.js +0 -55
  85. package/src/cli/journey/journey-delete.js +0 -78
  86. package/src/cli/journey/journey-describe.js +0 -143
  87. package/src/cli/journey/journey-export.js +0 -110
  88. package/src/cli/journey/journey-import.js +0 -127
  89. package/src/cli/journey/journey-list.js +0 -43
  90. package/src/cli/journey/journey-prune.js +0 -52
  91. package/src/cli/journey/journey.js +0 -37
  92. package/src/cli/logging/logs-list.js +0 -77
  93. package/src/cli/logging/logs-tail.js +0 -85
  94. package/src/cli/logging/logs.js +0 -21
  95. package/src/cli/realm/realm-add-custom-domain.js +0 -47
  96. package/src/cli/realm/realm-describe.js +0 -40
  97. package/src/cli/realm/realm-list.js +0 -40
  98. package/src/cli/realm/realm-remove-custom-domain.js +0 -50
  99. package/src/cli/realm/realm.js +0 -33
  100. package/src/cli/saml/saml-cot-export.js +0 -90
  101. package/src/cli/saml/saml-cot-import.js +0 -101
  102. package/src/cli/saml/saml-cot-list.js +0 -42
  103. package/src/cli/saml/saml-cot.js +0 -16
  104. package/src/cli/saml/saml-describe.js +0 -42
  105. package/src/cli/saml/saml-export.js +0 -91
  106. package/src/cli/saml/saml-import.js +0 -102
  107. package/src/cli/saml/saml-list.js +0 -42
  108. package/src/cli/saml/saml-metadata-export.js +0 -76
  109. package/src/cli/saml/saml-metadata.js +0 -12
  110. package/src/cli/saml/saml.js +0 -29
  111. package/src/cli/script/script-delete.js +0 -56
  112. package/src/cli/script/script-describe.js +0 -36
  113. package/src/cli/script/script-export.js +0 -95
  114. package/src/cli/script/script-import.js +0 -64
  115. package/src/cli/script/script-list.js +0 -42
  116. package/src/cli/script/script.js +0 -25
  117. package/src/cli/theme/theme-delete.js +0 -83
  118. package/src/cli/theme/theme-export.js +0 -107
  119. package/src/cli/theme/theme-import.js +0 -118
  120. package/src/cli/theme/theme-list.js +0 -42
  121. package/src/cli/theme/theme.js +0 -23
  122. package/src/storage/StaticStorage.js +0 -15
  123. package/src/utils/Console.js +0 -482
  124. package/tsconfig.json +0 -106
@@ -1,482 +0,0 @@
1
- import { SingleBar, Presets } from 'cli-progress';
2
- import { createSpinner } from 'nanospinner';
3
- import Table from 'cli-table3';
4
- // eslint-disable-next-line no-unused-vars
5
- import * as colors from '@colors/colors';
6
- import { state } from '@rockcarver/frodo-lib';
7
-
8
- /**
9
- * Output a data message
10
- * @param {Object} message the message
11
- */
12
- function data(message) {
13
- switch (typeof message) {
14
- case 'object':
15
- console.dir(message, { depth: 3 });
16
- break;
17
- default:
18
- console.log(message);
19
- }
20
- }
21
-
22
- /**
23
- * Output a text message
24
- * @param {Object} message the message
25
- */
26
- function text(message) {
27
- switch (typeof message) {
28
- case 'object':
29
- console.dir(message, { depth: 3 });
30
- break;
31
- default:
32
- console.error(message);
33
- }
34
- }
35
-
36
- /**
37
- * Output an info message
38
- * @param {Object} message the message
39
- */
40
- function info(message) {
41
- switch (typeof message) {
42
- case 'object':
43
- console.dir(message, { depth: 3 });
44
- break;
45
- default:
46
- console.error(message.brightCyan);
47
- }
48
- }
49
-
50
- /**
51
- * Output a warn message
52
- * @param {Object} message the message
53
- */
54
- function warn(message) {
55
- switch (typeof message) {
56
- case 'object':
57
- console.dir(message, { depth: 3 });
58
- break;
59
- default:
60
- console.error(message.yellow);
61
- }
62
- }
63
-
64
- /**
65
- * Output an error message
66
- * @param {Object} message the message
67
- */
68
- function error(message) {
69
- switch (typeof message) {
70
- case 'object':
71
- console.dir(message, { depth: 4 });
72
- break;
73
- default:
74
- console.error(message.brightRed);
75
- }
76
- }
77
-
78
- /**
79
- * Prints a string message to console
80
- *
81
- * @param {string} message The string message to print
82
- * @param {string} [type=text] "text", "info", "warn", "error" or "data". All but
83
- * type="data" will be written to stderr.
84
- * @param {boolean} [newline=true] Whether to add a new at the end of message
85
- *
86
- */
87
- export function printMessage(message, type = 'text', newline = true) {
88
- // if (state.default.session.getItem('scriptFriendly')) {
89
- switch (type) {
90
- case 'data':
91
- if (newline) {
92
- data(message);
93
- } else {
94
- process.stdout.write(message);
95
- }
96
- break;
97
- case 'text':
98
- if (newline) {
99
- text(message);
100
- } else {
101
- process.stderr.write(message);
102
- }
103
- break;
104
- case 'info':
105
- if (newline) {
106
- info(message);
107
- } else {
108
- process.stderr.write(message['brightCyan']);
109
- }
110
- break;
111
- case 'warn':
112
- if (newline) {
113
- warn(message);
114
- } else {
115
- process.stderr.write(message.yellow);
116
- }
117
- break;
118
- case 'error':
119
- if (newline) {
120
- error(message);
121
- } else {
122
- process.stderr.write(message['brightRed']);
123
- }
124
- break;
125
- default:
126
- if (newline) {
127
- error(message);
128
- } else {
129
- process.stderr.write(message['bgBrightRed']);
130
- }
131
- }
132
- }
133
-
134
- /**
135
- * Creates a progress bar on stderr
136
- *
137
- * Example:
138
- * [========================================] 100% | 49/49 | Analyzing journey - transactional_auth
139
- *
140
- * @param {Number} total The total number of entries to track progress for
141
- * @param {String} message optional progress bar message
142
- * @param {Object} options progress bar configuration options
143
- *
144
- */
145
- export function createProgressBar(
146
- total,
147
- message = null,
148
- options = {
149
- format: '[{bar}] {percentage}% | {value}/{total} | {data}',
150
- noTTYOutput: true,
151
- }
152
- ) {
153
- let opt = options;
154
- if (message == null) {
155
- opt = {
156
- format: '[{bar}] {percentage}% | {value}/{total}',
157
- noTTYOutput: true,
158
- };
159
- }
160
- let pBar = state.default.session.getItem('progressBar');
161
- if (!pBar) pBar = new SingleBar(opt, Presets.legacy); // create only when needed
162
- pBar.start(total, 0, {
163
- data: message,
164
- });
165
- state.default.session.setItem('progressBar', pBar);
166
- }
167
-
168
- /**
169
- * Updates the progress bar by 1
170
- * @param {string} message optional message to update the progress bar
171
- *
172
- */
173
- export function updateProgressBar(message = null) {
174
- const pBar = state.default.session.getItem('progressBar');
175
- if (message)
176
- pBar.increment({
177
- data: message,
178
- });
179
- else pBar.increment();
180
- }
181
-
182
- /**
183
- * Stop and hide the progress bar
184
- * @param {*} message optional message to update the progress bar
185
- */
186
- export function stopProgressBar(message = null) {
187
- const pBar = state.default.session.getItem('progressBar');
188
- if (message)
189
- pBar.update({
190
- data: message,
191
- });
192
- pBar.stop();
193
- }
194
-
195
- /**
196
- * Create the spinner
197
- * @param {String} message optional spinner message
198
- */
199
- export function showSpinner(message) {
200
- const spinner = createSpinner(message).start();
201
- state.default.session.setItem('Spinner', spinner);
202
- }
203
-
204
- /**
205
- * Stop the spinner
206
- * @param {String} message optional message to update the spinner
207
- */
208
- export function stopSpinner(message = null) {
209
- const spinner = state.default.session.getItem('Spinner');
210
- if (spinner) {
211
- let options = {};
212
- if (message) options = { text: message };
213
- spinner.stop(options);
214
- }
215
- }
216
-
217
- /**
218
- * Succeed the spinner. Stop and render success checkmark with optional message.
219
- * @param {String} message optional message to update the spinner
220
- */
221
- export function succeedSpinner(message = null) {
222
- const spinner = state.default.session.getItem('Spinner');
223
- if (spinner) {
224
- let options = {};
225
- if (message) options = { text: message };
226
- spinner.success(options);
227
- }
228
- }
229
-
230
- /**
231
- * Warn the spinner
232
- * @param {String} message optional message to update the spinner
233
- */
234
- export function warnSpinner(message = null) {
235
- const spinner = state.default.session.getItem('Spinner');
236
- if (spinner) {
237
- let options = {};
238
- if (message) options = { text: message };
239
- spinner.warn(options);
240
- }
241
- }
242
-
243
- /**
244
- * Fail the spinner
245
- * @param {String} message optional message to update the spinner
246
- */
247
- export function failSpinner(message = null) {
248
- const spinner = state.default.session.getItem('Spinner');
249
- if (spinner) {
250
- let options = {};
251
- if (message) options = { text: message };
252
- spinner.error(options);
253
- }
254
- }
255
-
256
- /**
257
- * Spin the spinner
258
- * @param {String} message optional message to update the spinner
259
- */
260
- export function spinSpinner(message = null) {
261
- const spinner = state.default.session.getItem('Spinner');
262
- if (spinner) {
263
- let options = {};
264
- if (message) options = { text: message };
265
- spinner.update(options);
266
- spinner.spin();
267
- }
268
- }
269
-
270
- export function createProgressIndicator(
271
- type = 'determinate',
272
- total = 0,
273
- message = null
274
- ) {
275
- if (type === 'determinate') {
276
- createProgressBar(total, message);
277
- } else {
278
- showSpinner(message);
279
- }
280
- }
281
-
282
- export function updateProgressIndicator(message) {
283
- const progressBar = state.default.session.getItem('progressBar');
284
- if (!progressBar) {
285
- spinSpinner(message);
286
- } else {
287
- updateProgressBar(message);
288
- }
289
- }
290
-
291
- export function stopProgressIndicator(message, status = 'none') {
292
- const progressBar = state.default.session.getItem('progressBar');
293
- if (!progressBar) {
294
- switch (status) {
295
- case 'none':
296
- stopSpinner(message);
297
- break;
298
- case 'success':
299
- succeedSpinner(message);
300
- break;
301
- case 'warn':
302
- warnSpinner(message);
303
- break;
304
- case 'fail':
305
- failSpinner(message);
306
- break;
307
- default:
308
- stopSpinner(message);
309
- break;
310
- }
311
- } else {
312
- stopProgressBar(message);
313
- }
314
- }
315
-
316
- /**
317
- * Create an empty table
318
- * @param {string[]} head header row as an array of strings
319
- * @returns {any} an empty table
320
- */
321
- export function createTable(head) {
322
- const table = new Table({
323
- head,
324
- chars: {
325
- top: '',
326
- 'top-mid': '',
327
- 'top-left': '',
328
- 'top-right': '',
329
- bottom: '',
330
- 'bottom-mid': '',
331
- 'bottom-left': '',
332
- 'bottom-right': '',
333
- left: '',
334
- 'left-mid': '',
335
- mid: '',
336
- 'mid-mid': '',
337
- right: '',
338
- 'right-mid': '',
339
- },
340
- style: { 'padding-left': 0, 'padding-right': 0, head: ['brightCyan'] },
341
- });
342
- return table;
343
- }
344
-
345
- /**
346
- * Create a new key/value table
347
- * @returns {any} an empty key/value table
348
- */
349
- export function createKeyValueTable() {
350
- const table = new Table({
351
- chars: {
352
- top: '',
353
- 'top-mid': '',
354
- 'top-left': '',
355
- 'top-right': '',
356
- bottom: '',
357
- 'bottom-mid': '',
358
- 'bottom-left': '',
359
- 'bottom-right': '',
360
- left: '',
361
- 'left-mid': '',
362
- mid: '',
363
- 'mid-mid': '',
364
- right: '',
365
- 'right-mid': '',
366
- },
367
- style: { 'padding-left': 0, 'padding-right': 0 },
368
- wordWrap: true,
369
- });
370
- return table;
371
- }
372
-
373
- /**
374
- * Helper function to determine the total depth of an object
375
- * @param {Object} object input object
376
- * @returns {Number} total depth of the input object
377
- */
378
- function getObjectDepth(object) {
379
- return Object(object) === object
380
- ? 1 + Math.max(-1, ...Object.values(object).map(getObjectDepth))
381
- : 0;
382
- }
383
-
384
- /**
385
- * Helper function to determine if an object has values
386
- * @param {Object} object input object
387
- * @returns {boolean} true of the object or any of its sub-objects contain values, false otherwise
388
- */
389
- function hasValues(object) {
390
- let has = false;
391
- const keys = Object.keys(object);
392
- for (const key of keys) {
393
- if (Object(object[key]) !== object[key]) {
394
- return true;
395
- }
396
- has = has || hasValues(object[key]);
397
- }
398
- return has;
399
- }
400
-
401
- /**
402
- * Helper function (recursive) to add rows to an object table
403
- * @param {object} object object to render
404
- * @param {number} depth total depth of initial object
405
- * @param {number} level current level
406
- * @param {any} table the object table to add the rows to
407
- * @returns the updated object table
408
- */
409
- function addRows(object, depth, level, table, keyMap) {
410
- const space = ' ';
411
- const keys = Object.keys(object);
412
- for (const key of keys) {
413
- if (Object(object[key]) !== object[key]) {
414
- if (level === 1) {
415
- table.push([
416
- keyMap[key] ? keyMap[key].brightCyan : key['brightCyan'],
417
- object[key],
418
- ]);
419
- } else {
420
- table.push([
421
- {
422
- hAlign: 'right',
423
- content: keyMap[key] ? keyMap[key].gray : key.gray,
424
- },
425
- object[key],
426
- ]);
427
- }
428
- }
429
- }
430
- for (const key of keys) {
431
- if (Object(object[key]) === object[key]) {
432
- // only print header if there are any values below
433
- if (hasValues(object[key])) {
434
- let indention = new Array(level).fill(space).join('');
435
- if (level < 3) indention = `\n${indention}`;
436
- table.push([
437
- indention.concat(
438
- keyMap[key] ? keyMap[key].brightCyan : key['brightCyan']
439
- ),
440
- '',
441
- ]);
442
- }
443
- // eslint-disable-next-line no-param-reassign
444
- table = addRows(object[key], depth, level + 1, table, keyMap);
445
- }
446
- }
447
- return table;
448
- }
449
-
450
- /**
451
- * Create and populate an object table from any JSON object. Use for describe commands.
452
- * @param {Object} object JSON object to create
453
- * @returns {any} a table that can be printed to the console
454
- */
455
- export function createObjectTable(object, keyMap = {}) {
456
- // eslint-disable-next-line no-param-reassign
457
- const depth = getObjectDepth(object);
458
- // eslint-disable-next-line no-param-reassign
459
- const level = 0;
460
- // eslint-disable-next-line no-param-reassign
461
- const table = new Table({
462
- chars: {
463
- top: '',
464
- 'top-mid': '',
465
- 'top-left': '',
466
- 'top-right': '',
467
- bottom: '',
468
- 'bottom-mid': '',
469
- 'bottom-left': '',
470
- 'bottom-right': '',
471
- left: '',
472
- 'left-mid': '',
473
- mid: '',
474
- 'mid-mid': '',
475
- right: '',
476
- 'right-mid': '',
477
- },
478
- style: { 'padding-left': 0, 'padding-right': 0, head: ['brightCyan'] },
479
- });
480
- addRows(object, depth, level + 1, table, keyMap);
481
- return table;
482
- }
package/tsconfig.json DELETED
@@ -1,106 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- "disableSolutionSearching": false /* Opt a project out of multi-project reference checking when editing. */,
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
15
- // "jsx": "preserve", /* Specify what JSX code is generated. */
16
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
17
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
18
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
19
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
20
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
21
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
22
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
23
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
24
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
25
-
26
- /* Modules */
27
- "module": "ESNext",
28
- "target": "ESNext",
29
- // "outDir": "./types",
30
- "rootDir": "./src" /* Specify the root folder within your source files. */,
31
- "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
32
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
- // "typeRoots": [] /* Specify multiple folders that act like './node_modules/@types'. */,
36
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
37
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
- // "resolveJsonModule": true, /* Enable importing .json files. */
40
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
41
-
42
- /* JavaScript Support */
43
- "allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
44
- "checkJs": true /* Enable error reporting in type-checked JavaScript files. */,
45
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
46
-
47
- /* Emit */
48
- // "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
49
- // "declarationMap": true /* Create sourcemaps for d.ts files. */,
50
- // "emitDeclarationOnly": true /* Only output d.ts files and not JavaScript files. */,
51
- // "sourceMap": true /* Create source map files for emitted JavaScript files. */,
52
- // "outFile": "./types/index.d.ts" /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */,
53
- // "removeComments": true, /* Disable emitting comments. */
54
- "noEmit": true /* Disable emitting files from a compilation. */,
55
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
57
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
58
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
59
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
61
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
62
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
63
- // "newLine": "crlf", /* Set the newline character for emitting files. */
64
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
65
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
67
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
68
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
69
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70
-
71
- /* Interop Constraints */
72
- "isolatedModules": false /* Ensure that each file can be safely transpiled without relying on other imports. */,
73
- "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
74
- "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
75
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
77
-
78
- /* Type Checking */
79
- "strict": true /* Enable all strict type-checking options. */,
80
- "noImplicitAny": false /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
81
- "strictNullChecks": false /* When type checking, take into account 'null' and 'undefined'. */,
82
- // "strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
83
- // "strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
84
- // "strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
85
- // "noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
86
- "useUnknownInCatchVariables": false /* Default catch clause variables as 'unknown' instead of 'any'. */,
87
- // "alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
88
- "noUnusedLocals": false /* Enable error reporting when local variables aren't read. */,
89
- "noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
90
- "exactOptionalPropertyTypes": false /* Interpret optional property types as written, rather than adding 'undefined'. */,
91
- "noImplicitReturns": false /* Enable error reporting for codepaths that do not explicitly return in a function. */,
92
- "noFallthroughCasesInSwitch": false /* Enable error reporting for fallthrough cases in switch statements. */,
93
- "noUncheckedIndexedAccess": false /* Add 'undefined' to a type when accessed using an index. */,
94
- "noImplicitOverride": false /* Ensure overriding members in derived classes are marked with an override modifier. */,
95
- "noPropertyAccessFromIndexSignature": false /* Enforces using indexed accessors for keys declared using an indexed type. */,
96
- // "allowUnusedLabels": false /* Disable error reporting for unused labels. */,
97
- // "allowUnreachableCode": false /* Disable error reporting for unreachable code. */,
98
-
99
- /* Completeness */
100
- "skipDefaultLibCheck": true /* Skip type checking .d.ts files that are included with TypeScript. */,
101
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
102
- },
103
- "files": ["src/app.js"],
104
- "include": ["src/**/*.js"],
105
- "exclude": ["src/**/*.test.js", "src/**/*.test_.js"]
106
- }