@adonisjs/assembler 5.9.0 → 5.9.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 (66) hide show
  1. package/build/ace-manifest.json +11 -11
  2. package/build/commands/Build.d.ts +37 -37
  3. package/build/commands/Build.js +138 -138
  4. package/build/commands/Invoke.d.ts +34 -34
  5. package/build/commands/Invoke.js +221 -221
  6. package/build/commands/Make/Base.d.ts +30 -30
  7. package/build/commands/Make/Base.js +75 -75
  8. package/build/commands/Make/Command.d.ts +35 -35
  9. package/build/commands/Make/Command.js +82 -82
  10. package/build/commands/Make/Controller.d.ts +37 -37
  11. package/build/commands/Make/Controller.js +89 -89
  12. package/build/commands/Make/Exception.d.ts +32 -32
  13. package/build/commands/Make/Exception.js +75 -75
  14. package/build/commands/Make/Listener.d.ts +30 -30
  15. package/build/commands/Make/Listener.js +70 -70
  16. package/build/commands/Make/Middleware.d.ts +31 -31
  17. package/build/commands/Make/Middleware.js +87 -87
  18. package/build/commands/Make/PreloadFile.d.ts +38 -38
  19. package/build/commands/Make/PreloadFile.js +157 -157
  20. package/build/commands/Make/Provider.d.ts +31 -31
  21. package/build/commands/Make/Provider.js +114 -114
  22. package/build/commands/Make/Suite.d.ts +41 -41
  23. package/build/commands/Make/Suite.js +120 -120
  24. package/build/commands/Make/Test.d.ts +35 -35
  25. package/build/commands/Make/Test.js +96 -96
  26. package/build/commands/Make/Validator.d.ts +31 -31
  27. package/build/commands/Make/Validator.js +71 -71
  28. package/build/commands/Make/View.d.ts +30 -30
  29. package/build/commands/Make/View.js +70 -70
  30. package/build/commands/Serve.d.ts +33 -33
  31. package/build/commands/Serve.js +112 -112
  32. package/build/commands/Test.d.ts +57 -57
  33. package/build/commands/Test.js +159 -159
  34. package/build/commands/TypeCheck.d.ts +16 -16
  35. package/build/commands/TypeCheck.js +85 -85
  36. package/build/config/paths.d.ts +7 -7
  37. package/build/config/paths.js +18 -18
  38. package/build/register.d.ts +1 -1
  39. package/build/register.js +15 -15
  40. package/build/src/AssetsBundler/index.d.ts +76 -76
  41. package/build/src/AssetsBundler/index.js +216 -216
  42. package/build/src/Compiler/index.d.ts +62 -62
  43. package/build/src/Compiler/index.js +287 -287
  44. package/build/src/Contracts/index.d.ts +8 -8
  45. package/build/src/Contracts/index.js +10 -10
  46. package/build/src/DevServer/index.d.ts +70 -70
  47. package/build/src/DevServer/index.js +306 -306
  48. package/build/src/EnvParser/index.d.ts +23 -23
  49. package/build/src/EnvParser/index.js +52 -52
  50. package/build/src/HttpServer/index.d.ts +34 -34
  51. package/build/src/HttpServer/index.js +87 -87
  52. package/build/src/Manifest/index.d.ts +32 -32
  53. package/build/src/Manifest/index.js +88 -88
  54. package/build/src/RcFile/index.d.ts +72 -72
  55. package/build/src/RcFile/index.js +174 -174
  56. package/build/src/Test/index.d.ts +75 -75
  57. package/build/src/Test/index.js +346 -346
  58. package/build/src/Test/process.d.ts +22 -22
  59. package/build/src/Test/process.js +68 -68
  60. package/build/src/Ts/index.d.ts +24 -24
  61. package/build/src/Ts/index.js +55 -55
  62. package/build/src/requireHook/index.d.ts +5 -5
  63. package/build/src/requireHook/index.js +28 -28
  64. package/build/src/requireHook/ioc-transformer.d.ts +6 -6
  65. package/build/src/requireHook/ioc-transformer.js +21 -21
  66. package/package.json +1 -1
@@ -1,159 +1,159 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/assembler
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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- var desc = Object.getOwnPropertyDescriptor(m, k);
13
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
- desc = { enumerable: true, get: function() { return m[k]; } };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }) : (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- o[k2] = m[k];
20
- }));
21
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
- Object.defineProperty(o, "default", { enumerable: true, value: v });
23
- }) : function(o, v) {
24
- o["default"] = v;
25
- });
26
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- };
32
- var __importStar = (this && this.__importStar) || function (mod) {
33
- if (mod && mod.__esModule) return mod;
34
- var result = {};
35
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
- __setModuleDefault(result, mod);
37
- return result;
38
- };
39
- var __metadata = (this && this.__metadata) || function (k, v) {
40
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- const standalone_1 = require("@adonisjs/core/build/standalone");
44
- /**
45
- * Run tests
46
- */
47
- class Test extends standalone_1.BaseCommand {
48
- constructor() {
49
- super(...arguments);
50
- /**
51
- * Arguments to pass to the `node` binary
52
- */
53
- this.nodeArgs = [];
54
- }
55
- /**
56
- * Convert command flags to test filters
57
- */
58
- getTestFilters() {
59
- const filters = {};
60
- if (this.forceExit) {
61
- filters['--force-exit'] = true;
62
- }
63
- if (this.files) {
64
- filters['--files'] = this.files;
65
- }
66
- if (this.timeout !== undefined) {
67
- filters['--timeout'] = this.timeout;
68
- }
69
- if (this.tags) {
70
- filters['--tags'] = this.tags;
71
- }
72
- if (this.suites) {
73
- filters._ = this.suites;
74
- }
75
- if (this.ignoreTags) {
76
- filters['--ignore-tags'] = this.ignoreTags;
77
- }
78
- if (this.tests) {
79
- filters['--tests'] = this.tests;
80
- }
81
- if (this.groups) {
82
- filters['--groups'] = this.groups;
83
- }
84
- return filters;
85
- }
86
- async run() {
87
- const { TestsServer } = await Promise.resolve().then(() => __importStar(require('../src/Test')));
88
- try {
89
- if (this.watch) {
90
- await new TestsServer(this.application.appRoot, this.getTestFilters(), this.nodeArgs, this.logger).watch();
91
- }
92
- else {
93
- await new TestsServer(this.application.appRoot, this.getTestFilters(), this.nodeArgs, this.logger).run();
94
- }
95
- }
96
- catch (error) {
97
- this.exitCode = 1;
98
- this.logger.fatal(error);
99
- }
100
- }
101
- }
102
- Test.commandName = 'test';
103
- Test.description = 'Run AdonisJS tests';
104
- Test.settings = {
105
- stayAlive: true,
106
- };
107
- __decorate([
108
- standalone_1.args.spread({ description: 'Run tests for only the specified suites', required: false }),
109
- __metadata("design:type", Array)
110
- ], Test.prototype, "suites", void 0);
111
- __decorate([
112
- standalone_1.flags.array({
113
- description: 'Run tests for the mentioned files only',
114
- }),
115
- __metadata("design:type", Array)
116
- ], Test.prototype, "files", void 0);
117
- __decorate([
118
- standalone_1.flags.boolean({
119
- description: 'Watch for file changes and re-run tests on file change',
120
- alias: 'w',
121
- }),
122
- __metadata("design:type", Boolean)
123
- ], Test.prototype, "watch", void 0);
124
- __decorate([
125
- standalone_1.flags.boolean({
126
- description: 'Detect file changes by polling files instead of listening to filesystem events',
127
- alias: 'p',
128
- }),
129
- __metadata("design:type", Boolean)
130
- ], Test.prototype, "poll", void 0);
131
- __decorate([
132
- standalone_1.flags.array({ description: 'CLI options to pass to the node command line' }),
133
- __metadata("design:type", Array)
134
- ], Test.prototype, "nodeArgs", void 0);
135
- __decorate([
136
- standalone_1.flags.array({ description: 'Filter tests by tags' }),
137
- __metadata("design:type", Array)
138
- ], Test.prototype, "tags", void 0);
139
- __decorate([
140
- standalone_1.flags.array({ description: 'Filter tests by ignoring tags' }),
141
- __metadata("design:type", Array)
142
- ], Test.prototype, "ignoreTags", void 0);
143
- __decorate([
144
- standalone_1.flags.array({ description: 'Filter tests by title' }),
145
- __metadata("design:type", Array)
146
- ], Test.prototype, "tests", void 0);
147
- __decorate([
148
- standalone_1.flags.array({ description: 'Filter tests by group title' }),
149
- __metadata("design:type", Array)
150
- ], Test.prototype, "groups", void 0);
151
- __decorate([
152
- standalone_1.flags.number({ description: 'Customize tests timeout' }),
153
- __metadata("design:type", Number)
154
- ], Test.prototype, "timeout", void 0);
155
- __decorate([
156
- standalone_1.flags.boolean({ description: 'Force exit the tests runner process' }),
157
- __metadata("design:type", Boolean)
158
- ], Test.prototype, "forceExit", void 0);
159
- exports.default = Test;
1
+ "use strict";
2
+ /*
3
+ * @adonisjs/assembler
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ };
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __metadata = (this && this.__metadata) || function (k, v) {
40
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ const standalone_1 = require("@adonisjs/core/build/standalone");
44
+ /**
45
+ * Run tests
46
+ */
47
+ class Test extends standalone_1.BaseCommand {
48
+ constructor() {
49
+ super(...arguments);
50
+ /**
51
+ * Arguments to pass to the `node` binary
52
+ */
53
+ this.nodeArgs = [];
54
+ }
55
+ /**
56
+ * Convert command flags to test filters
57
+ */
58
+ getTestFilters() {
59
+ const filters = {};
60
+ if (this.forceExit) {
61
+ filters['--force-exit'] = true;
62
+ }
63
+ if (this.files) {
64
+ filters['--files'] = this.files;
65
+ }
66
+ if (this.timeout !== undefined) {
67
+ filters['--timeout'] = this.timeout;
68
+ }
69
+ if (this.tags) {
70
+ filters['--tags'] = this.tags;
71
+ }
72
+ if (this.suites) {
73
+ filters._ = this.suites;
74
+ }
75
+ if (this.ignoreTags) {
76
+ filters['--ignore-tags'] = this.ignoreTags;
77
+ }
78
+ if (this.tests) {
79
+ filters['--tests'] = this.tests;
80
+ }
81
+ if (this.groups) {
82
+ filters['--groups'] = this.groups;
83
+ }
84
+ return filters;
85
+ }
86
+ async run() {
87
+ const { TestsServer } = await Promise.resolve().then(() => __importStar(require('../src/Test')));
88
+ try {
89
+ if (this.watch) {
90
+ await new TestsServer(this.application.appRoot, this.getTestFilters(), this.nodeArgs, this.logger).watch();
91
+ }
92
+ else {
93
+ await new TestsServer(this.application.appRoot, this.getTestFilters(), this.nodeArgs, this.logger).run();
94
+ }
95
+ }
96
+ catch (error) {
97
+ this.exitCode = 1;
98
+ this.logger.fatal(error);
99
+ }
100
+ }
101
+ }
102
+ Test.commandName = 'test';
103
+ Test.description = 'Run AdonisJS tests';
104
+ Test.settings = {
105
+ stayAlive: true,
106
+ };
107
+ __decorate([
108
+ standalone_1.args.spread({ description: 'Run tests for only the specified suites', required: false }),
109
+ __metadata("design:type", Array)
110
+ ], Test.prototype, "suites", void 0);
111
+ __decorate([
112
+ standalone_1.flags.array({
113
+ description: 'Run tests for the mentioned files only',
114
+ }),
115
+ __metadata("design:type", Array)
116
+ ], Test.prototype, "files", void 0);
117
+ __decorate([
118
+ standalone_1.flags.boolean({
119
+ description: 'Watch for file changes and re-run tests on file change',
120
+ alias: 'w',
121
+ }),
122
+ __metadata("design:type", Boolean)
123
+ ], Test.prototype, "watch", void 0);
124
+ __decorate([
125
+ standalone_1.flags.boolean({
126
+ description: 'Detect file changes by polling files instead of listening to filesystem events',
127
+ alias: 'p',
128
+ }),
129
+ __metadata("design:type", Boolean)
130
+ ], Test.prototype, "poll", void 0);
131
+ __decorate([
132
+ standalone_1.flags.array({ description: 'CLI options to pass to the node command line' }),
133
+ __metadata("design:type", Array)
134
+ ], Test.prototype, "nodeArgs", void 0);
135
+ __decorate([
136
+ standalone_1.flags.array({ description: 'Filter tests by tags' }),
137
+ __metadata("design:type", Array)
138
+ ], Test.prototype, "tags", void 0);
139
+ __decorate([
140
+ standalone_1.flags.array({ description: 'Filter tests by ignoring tags' }),
141
+ __metadata("design:type", Array)
142
+ ], Test.prototype, "ignoreTags", void 0);
143
+ __decorate([
144
+ standalone_1.flags.array({ description: 'Filter tests by title' }),
145
+ __metadata("design:type", Array)
146
+ ], Test.prototype, "tests", void 0);
147
+ __decorate([
148
+ standalone_1.flags.array({ description: 'Filter tests by group title' }),
149
+ __metadata("design:type", Array)
150
+ ], Test.prototype, "groups", void 0);
151
+ __decorate([
152
+ standalone_1.flags.number({ description: 'Customize tests timeout' }),
153
+ __metadata("design:type", Number)
154
+ ], Test.prototype, "timeout", void 0);
155
+ __decorate([
156
+ standalone_1.flags.boolean({ description: 'Force exit the tests runner process' }),
157
+ __metadata("design:type", Boolean)
158
+ ], Test.prototype, "forceExit", void 0);
159
+ exports.default = Test;
@@ -1,16 +1,16 @@
1
- import { BaseCommand } from '@adonisjs/core/build/standalone';
2
- /**
3
- * TypeCheck project without writing the compiled output to the disk
4
- */
5
- export default class TypeCheck extends BaseCommand {
6
- static commandName: string;
7
- static description: string;
8
- /**
9
- * Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
10
- */
11
- tsconfig: string;
12
- /**
13
- * Invoked automatically by ace
14
- */
15
- run(): Promise<void>;
16
- }
1
+ import { BaseCommand } from '@adonisjs/core/build/standalone';
2
+ /**
3
+ * TypeCheck project without writing the compiled output to the disk
4
+ */
5
+ export default class TypeCheck extends BaseCommand {
6
+ static commandName: string;
7
+ static description: string;
8
+ /**
9
+ * Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
10
+ */
11
+ tsconfig: string;
12
+ /**
13
+ * Invoked automatically by ace
14
+ */
15
+ run(): Promise<void>;
16
+ }
@@ -1,85 +1,85 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/assembler
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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- var desc = Object.getOwnPropertyDescriptor(m, k);
13
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
- desc = { enumerable: true, get: function() { return m[k]; } };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }) : (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- o[k2] = m[k];
20
- }));
21
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
- Object.defineProperty(o, "default", { enumerable: true, value: v });
23
- }) : function(o, v) {
24
- o["default"] = v;
25
- });
26
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- };
32
- var __importStar = (this && this.__importStar) || function (mod) {
33
- if (mod && mod.__esModule) return mod;
34
- var result = {};
35
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
- __setModuleDefault(result, mod);
37
- return result;
38
- };
39
- var __metadata = (this && this.__metadata) || function (k, v) {
40
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- const standalone_1 = require("@adonisjs/core/build/standalone");
44
- const paths_1 = require("../config/paths");
45
- /**
46
- * TypeCheck project without writing the compiled output to the disk
47
- */
48
- class TypeCheck extends standalone_1.BaseCommand {
49
- constructor() {
50
- super(...arguments);
51
- /**
52
- * Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
53
- */
54
- this.tsconfig = paths_1.TSCONFIG_FILE_NAME;
55
- }
56
- /**
57
- * Invoked automatically by ace
58
- */
59
- async run() {
60
- const { Compiler } = await Promise.resolve().then(() => __importStar(require('../src/Compiler')));
61
- try {
62
- const compiler = new Compiler(this.application.appRoot, [], false, this.logger, this.tsconfig);
63
- const success = await compiler.typeCheck();
64
- /**
65
- * Set exitCode based upon the typecheck status
66
- */
67
- if (!success) {
68
- this.exitCode = 1;
69
- }
70
- }
71
- catch (error) {
72
- this.logger.fatal(error);
73
- this.exitCode = 1;
74
- }
75
- }
76
- }
77
- TypeCheck.commandName = 'type-check';
78
- TypeCheck.description = 'Type check TypeScript source without writing the compiled output on disk';
79
- __decorate([
80
- standalone_1.flags.string({
81
- description: 'Path to the TypeScript project configuration file',
82
- }),
83
- __metadata("design:type", String)
84
- ], TypeCheck.prototype, "tsconfig", void 0);
85
- exports.default = TypeCheck;
1
+ "use strict";
2
+ /*
3
+ * @adonisjs/assembler
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ };
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __metadata = (this && this.__metadata) || function (k, v) {
40
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ const standalone_1 = require("@adonisjs/core/build/standalone");
44
+ const paths_1 = require("../config/paths");
45
+ /**
46
+ * TypeCheck project without writing the compiled output to the disk
47
+ */
48
+ class TypeCheck extends standalone_1.BaseCommand {
49
+ constructor() {
50
+ super(...arguments);
51
+ /**
52
+ * Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
53
+ */
54
+ this.tsconfig = paths_1.TSCONFIG_FILE_NAME;
55
+ }
56
+ /**
57
+ * Invoked automatically by ace
58
+ */
59
+ async run() {
60
+ const { Compiler } = await Promise.resolve().then(() => __importStar(require('../src/Compiler')));
61
+ try {
62
+ const compiler = new Compiler(this.application.appRoot, [], false, this.logger, this.tsconfig);
63
+ const success = await compiler.typeCheck();
64
+ /**
65
+ * Set exitCode based upon the typecheck status
66
+ */
67
+ if (!success) {
68
+ this.exitCode = 1;
69
+ }
70
+ }
71
+ catch (error) {
72
+ this.logger.fatal(error);
73
+ this.exitCode = 1;
74
+ }
75
+ }
76
+ }
77
+ TypeCheck.commandName = 'type-check';
78
+ TypeCheck.description = 'Type check TypeScript source without writing the compiled output on disk';
79
+ __decorate([
80
+ standalone_1.flags.string({
81
+ description: 'Path to the TypeScript project configuration file',
82
+ }),
83
+ __metadata("design:type", String)
84
+ ], TypeCheck.prototype, "tsconfig", void 0);
85
+ exports.default = TypeCheck;
@@ -1,7 +1,7 @@
1
- export declare const ACE_FILE_NAME = "ace";
2
- export declare const DEFAULT_BUILD_DIR = "build";
3
- export declare const RCFILE_NAME = ".adonisrc.json";
4
- export declare const ENV_FILES: string[];
5
- export declare const SERVER_ENTRY_FILE = "server.ts";
6
- export declare const TESTS_ENTRY_FILE = "test.ts";
7
- export declare const TSCONFIG_FILE_NAME = "tsconfig.json";
1
+ export declare const ACE_FILE_NAME = "ace";
2
+ export declare const DEFAULT_BUILD_DIR = "build";
3
+ export declare const RCFILE_NAME = ".adonisrc.json";
4
+ export declare const ENV_FILES: string[];
5
+ export declare const SERVER_ENTRY_FILE = "server.ts";
6
+ export declare const TESTS_ENTRY_FILE = "test.ts";
7
+ export declare const TSCONFIG_FILE_NAME = "tsconfig.json";
@@ -1,18 +1,18 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/assembler
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.TSCONFIG_FILE_NAME = exports.TESTS_ENTRY_FILE = exports.SERVER_ENTRY_FILE = exports.ENV_FILES = exports.RCFILE_NAME = exports.DEFAULT_BUILD_DIR = exports.ACE_FILE_NAME = void 0;
12
- exports.ACE_FILE_NAME = 'ace';
13
- exports.DEFAULT_BUILD_DIR = 'build';
14
- exports.RCFILE_NAME = '.adonisrc.json';
15
- exports.ENV_FILES = ['.env', '.env.testing'];
16
- exports.SERVER_ENTRY_FILE = 'server.ts';
17
- exports.TESTS_ENTRY_FILE = 'test.ts';
18
- exports.TSCONFIG_FILE_NAME = 'tsconfig.json';
1
+ "use strict";
2
+ /*
3
+ * @adonisjs/assembler
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.TSCONFIG_FILE_NAME = exports.TESTS_ENTRY_FILE = exports.SERVER_ENTRY_FILE = exports.ENV_FILES = exports.RCFILE_NAME = exports.DEFAULT_BUILD_DIR = exports.ACE_FILE_NAME = void 0;
12
+ exports.ACE_FILE_NAME = 'ace';
13
+ exports.DEFAULT_BUILD_DIR = 'build';
14
+ exports.RCFILE_NAME = '.adonisrc.json';
15
+ exports.ENV_FILES = ['.env', '.env.testing'];
16
+ exports.SERVER_ENTRY_FILE = 'server.ts';
17
+ exports.TESTS_ENTRY_FILE = 'test.ts';
18
+ exports.TSCONFIG_FILE_NAME = 'tsconfig.json';
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/build/register.js CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";
2
- /*
3
- * @adonisjs/assembler
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
11
- return (mod && mod.__esModule) ? mod : { "default": mod };
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- const requireHook_1 = __importDefault(require("./src/requireHook"));
15
- (0, requireHook_1.default)(process.env.ADONIS_ACE_CWD || process.cwd());
1
+ "use strict";
2
+ /*
3
+ * @adonisjs/assembler
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ const requireHook_1 = __importDefault(require("./src/requireHook"));
15
+ (0, requireHook_1.default)(process.env.ADONIS_ACE_CWD || process.cwd());