@adonisjs/core 5.4.0 → 5.5.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 (39) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +10 -2
  3. package/build/adonis-typings/ace.d.ts +5 -0
  4. package/build/adonis-typings/ace.js +8 -0
  5. package/build/adonis-typings/container.d.ts +4 -0
  6. package/build/adonis-typings/index.d.ts +2 -0
  7. package/build/adonis-typings/index.js +2 -0
  8. package/build/adonis-typings/test-utils.d.ts +23 -0
  9. package/build/adonis-typings/test-utils.js +8 -0
  10. package/build/providers/AppProvider.d.ts +10 -0
  11. package/build/providers/AppProvider.js +24 -0
  12. package/build/src/Ignitor/Ace/App/index.d.ts +8 -29
  13. package/build/src/Ignitor/Ace/App/index.js +49 -112
  14. package/build/src/Ignitor/Ace/GenerateManifest/index.d.ts +1 -1
  15. package/build/src/Ignitor/Ace/GenerateManifest/index.js +8 -15
  16. package/build/src/Ignitor/HttpServer/index.d.ts +11 -33
  17. package/build/src/Ignitor/HttpServer/index.js +20 -84
  18. package/build/src/Ignitor/Kernel/index.d.ts +56 -0
  19. package/build/src/Ignitor/Kernel/index.js +123 -0
  20. package/build/src/Ignitor/SignalsListener/index.js +14 -11
  21. package/build/src/Ignitor/index.d.ts +6 -0
  22. package/build/src/Ignitor/index.js +12 -1
  23. package/build/src/TestUtils/Ace/index.d.ts +0 -0
  24. package/build/src/TestUtils/Ace/index.js +8 -0
  25. package/build/src/TestUtils/HttpServer/index.d.ts +27 -0
  26. package/build/src/TestUtils/HttpServer/index.js +56 -0
  27. package/build/src/TestUtils/index.d.ts +24 -0
  28. package/build/src/TestUtils/index.js +43 -0
  29. package/build/src/utils/index.d.ts +13 -6
  30. package/build/src/utils/index.js +57 -10
  31. package/build/templates/contracts/env.txt +3 -3
  32. package/build/templates/env.txt +5 -5
  33. package/build/templates/tests/bootstrap.txt +71 -0
  34. package/package.json +89 -39
  35. package/README.html +0 -1160
  36. package/build/src/Ignitor/Ace/ErrorHandler/index.d.ts +0 -16
  37. package/build/src/Ignitor/Ace/ErrorHandler/index.js +0 -47
  38. package/build/src/Ignitor/HttpServer/ErrorHandler/index.d.ts +0 -16
  39. package/build/src/Ignitor/HttpServer/ErrorHandler/index.js +0 -44
@@ -1,16 +0,0 @@
1
- import { ApplicationContract } from '@ioc:Adonis/Core/Application';
2
- /**
3
- * Handles ignitor bootstrapping errors by pretty printing them in development
4
- */
5
- export declare class ErrorHandler {
6
- private application;
7
- constructor(application: ApplicationContract);
8
- /**
9
- * Pretty prints a given error on the terminal
10
- */
11
- private prettyPrintError;
12
- /**
13
- * Handles ignitor boot errors
14
- */
15
- handleError(error: any): Promise<void>;
16
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/core
4
- *
5
- * (c) Harminder Virk <virk@adonisjs.com>
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ErrorHandler = void 0;
12
- /**
13
- * Handles ignitor bootstrapping errors by pretty printing them in development
14
- */
15
- class ErrorHandler {
16
- constructor(application) {
17
- this.application = application;
18
- }
19
- /**
20
- * Pretty prints a given error on the terminal
21
- */
22
- async prettyPrintError(error) {
23
- try {
24
- const Youch = require('youch');
25
- const output = await new Youch(error, {}).toJSON();
26
- console.log(require('youch-terminal')(output));
27
- }
28
- catch (err) {
29
- console.log(error.stack);
30
- }
31
- }
32
- /**
33
- * Handles ignitor boot errors
34
- */
35
- async handleError(error) {
36
- if (typeof error.handle === 'function') {
37
- error.handle(error);
38
- }
39
- else if (this.application.inDev) {
40
- await this.prettyPrintError(error);
41
- }
42
- else {
43
- console.error(error.stack);
44
- }
45
- }
46
- }
47
- exports.ErrorHandler = ErrorHandler;
@@ -1,16 +0,0 @@
1
- import { ApplicationContract } from '@ioc:Adonis/Core/Application';
2
- /**
3
- * Handles ignitor bootstrapping errors by pretty printing them in development
4
- */
5
- export declare class ErrorHandler {
6
- private application;
7
- constructor(application: ApplicationContract);
8
- /**
9
- * Pretty prints a given error on the terminal
10
- */
11
- private prettyPrintError;
12
- /**
13
- * Handles ignitor boot errors
14
- */
15
- handleError(error: any): Promise<void>;
16
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/core
4
- *
5
- * (c) Harminder Virk <virk@adonisjs.com>
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.ErrorHandler = void 0;
12
- /**
13
- * Handles ignitor bootstrapping errors by pretty printing them in development
14
- */
15
- class ErrorHandler {
16
- constructor(application) {
17
- this.application = application;
18
- }
19
- /**
20
- * Pretty prints a given error on the terminal
21
- */
22
- async prettyPrintError(error) {
23
- try {
24
- const Youch = require('youch');
25
- const output = await new Youch(error, {}).toJSON();
26
- console.log(require('youch-terminal')(output));
27
- }
28
- catch (err) {
29
- console.log(error.stack);
30
- }
31
- }
32
- /**
33
- * Handles ignitor boot errors
34
- */
35
- async handleError(error) {
36
- if (this.application.inDev) {
37
- await this.prettyPrintError(error);
38
- }
39
- else {
40
- console.error(error.stack);
41
- }
42
- }
43
- }
44
- exports.ErrorHandler = ErrorHandler;