@adonisjs/assembler 5.9.5 → 6.1.0-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.
- package/LICENSE.md +1 -1
- package/README.md +24 -37
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/src/bundler.d.ts +10 -0
- package/build/src/bundler.js +143 -0
- package/build/src/dev_server.d.ts +15 -0
- package/build/src/dev_server.js +214 -0
- package/build/src/run.d.ts +3 -0
- package/build/src/run.js +19 -0
- package/build/src/types.d.ts +26 -0
- package/build/src/watch.d.ts +8 -0
- package/build/src/watch.js +18 -0
- package/package.json +77 -99
- package/build/ace-manifest.json +0 -521
- package/build/commands/Build.d.ts +0 -37
- package/build/commands/Build.js +0 -138
- package/build/commands/Invoke.d.ts +0 -34
- package/build/commands/Invoke.js +0 -234
- package/build/commands/Make/Base.d.ts +0 -30
- package/build/commands/Make/Base.js +0 -75
- package/build/commands/Make/Command.d.ts +0 -35
- package/build/commands/Make/Command.js +0 -82
- package/build/commands/Make/Controller.d.ts +0 -37
- package/build/commands/Make/Controller.js +0 -89
- package/build/commands/Make/Exception.d.ts +0 -32
- package/build/commands/Make/Exception.js +0 -75
- package/build/commands/Make/Listener.d.ts +0 -30
- package/build/commands/Make/Listener.js +0 -70
- package/build/commands/Make/Middleware.d.ts +0 -31
- package/build/commands/Make/Middleware.js +0 -87
- package/build/commands/Make/PreloadFile.d.ts +0 -38
- package/build/commands/Make/PreloadFile.js +0 -157
- package/build/commands/Make/Provider.d.ts +0 -31
- package/build/commands/Make/Provider.js +0 -114
- package/build/commands/Make/Suite.d.ts +0 -41
- package/build/commands/Make/Suite.js +0 -120
- package/build/commands/Make/Test.d.ts +0 -35
- package/build/commands/Make/Test.js +0 -96
- package/build/commands/Make/Validator.d.ts +0 -31
- package/build/commands/Make/Validator.js +0 -71
- package/build/commands/Make/View.d.ts +0 -30
- package/build/commands/Make/View.js +0 -70
- package/build/commands/Serve.d.ts +0 -33
- package/build/commands/Serve.js +0 -112
- package/build/commands/Test.d.ts +0 -57
- package/build/commands/Test.js +0 -159
- package/build/commands/TypeCheck.d.ts +0 -16
- package/build/commands/TypeCheck.js +0 -85
- package/build/config/paths.d.ts +0 -7
- package/build/config/paths.js +0 -18
- package/build/register.js +0 -15
- package/build/src/AssetsBundler/index.d.ts +0 -76
- package/build/src/AssetsBundler/index.js +0 -216
- package/build/src/Compiler/index.d.ts +0 -62
- package/build/src/Compiler/index.js +0 -287
- package/build/src/Contracts/index.d.ts +0 -8
- package/build/src/Contracts/index.js +0 -10
- package/build/src/DevServer/index.d.ts +0 -70
- package/build/src/DevServer/index.js +0 -306
- package/build/src/EnvParser/index.d.ts +0 -21
- package/build/src/EnvParser/index.js +0 -48
- package/build/src/HttpServer/index.d.ts +0 -34
- package/build/src/HttpServer/index.js +0 -87
- package/build/src/Manifest/index.d.ts +0 -32
- package/build/src/Manifest/index.js +0 -88
- package/build/src/RcFile/index.d.ts +0 -72
- package/build/src/RcFile/index.js +0 -174
- package/build/src/Test/index.d.ts +0 -75
- package/build/src/Test/index.js +0 -346
- package/build/src/Test/process.d.ts +0 -22
- package/build/src/Test/process.js +0 -68
- package/build/src/Ts/index.d.ts +0 -24
- package/build/src/Ts/index.js +0 -55
- package/build/src/requireHook/index.d.ts +0 -5
- package/build/src/requireHook/index.js +0 -28
- package/build/src/requireHook/ioc-transformer.d.ts +0 -6
- package/build/src/requireHook/ioc-transformer.js +0 -21
- package/build/templates/command.txt +0 -33
- package/build/templates/controller.txt +0 -3
- package/build/templates/event-listener.txt +0 -3
- package/build/templates/exception.txt +0 -15
- package/build/templates/middleware.txt +0 -8
- package/build/templates/preload-file.txt +0 -9
- package/build/templates/provider.txt +0 -40
- package/build/templates/resource-controller.txt +0 -17
- package/build/templates/self-handle-exception.txt +0 -32
- package/build/templates/test-entrypoint.txt +0 -45
- package/build/templates/test.txt +0 -5
- package/build/templates/tests/bootstrap.txt +0 -69
- package/build/templates/tests/functional/hello_world_api.spec.txt +0 -8
- package/build/templates/tests/functional/hello_world_slim.spec.txt +0 -8
- package/build/templates/tests/functional/hello_world_web.spec.txt +0 -8
- package/build/templates/tests-contract.txt +0 -18
- package/build/templates/validator.txt +0 -40
- package/build/templates/view.txt +0 -0
- package/build/templates/webpack.config.txt +0 -214
- /package/build/{register.d.ts → src/types.js} +0 -0
package/build/ace-manifest.json
DELETED
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"commands": {
|
|
3
|
-
"build": {
|
|
4
|
-
"settings": {},
|
|
5
|
-
"commandPath": "./commands/Build",
|
|
6
|
-
"commandName": "build",
|
|
7
|
-
"description": "Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore",
|
|
8
|
-
"args": [],
|
|
9
|
-
"aliases": [],
|
|
10
|
-
"flags": [
|
|
11
|
-
{
|
|
12
|
-
"name": "production",
|
|
13
|
-
"propertyName": "production",
|
|
14
|
-
"type": "boolean",
|
|
15
|
-
"description": "Build for production",
|
|
16
|
-
"alias": "prod"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "assets",
|
|
20
|
-
"propertyName": "assets",
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"description": "Build frontend assets when webpack encore is installed. Use --no-assets to disable"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "ignore-ts-errors",
|
|
26
|
-
"propertyName": "ignoreTsErrors",
|
|
27
|
-
"type": "boolean",
|
|
28
|
-
"description": "Ignore typescript errors and complete the build process"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "tsconfig",
|
|
32
|
-
"propertyName": "tsconfig",
|
|
33
|
-
"type": "string",
|
|
34
|
-
"description": "Path to the TypeScript project configuration file"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "encore-args",
|
|
38
|
-
"propertyName": "encoreArgs",
|
|
39
|
-
"type": "array",
|
|
40
|
-
"description": "CLI options to pass to the encore command line"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "client",
|
|
44
|
-
"propertyName": "client",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"description": "Select the package manager to decide which lock file to copy to the build folder"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"configure": {
|
|
51
|
-
"settings": {},
|
|
52
|
-
"commandPath": "./commands/Invoke",
|
|
53
|
-
"commandName": "configure",
|
|
54
|
-
"description": "Configure one or more AdonisJS packages",
|
|
55
|
-
"args": [
|
|
56
|
-
{
|
|
57
|
-
"type": "spread",
|
|
58
|
-
"propertyName": "packages",
|
|
59
|
-
"name": "packages",
|
|
60
|
-
"required": true,
|
|
61
|
-
"description": "Name of the package(s) you want to configure"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"aliases": [
|
|
65
|
-
"invoke"
|
|
66
|
-
],
|
|
67
|
-
"flags": []
|
|
68
|
-
},
|
|
69
|
-
"make:command": {
|
|
70
|
-
"settings": {},
|
|
71
|
-
"commandPath": "./commands/Make/Command",
|
|
72
|
-
"commandName": "make:command",
|
|
73
|
-
"description": "Make a new ace command",
|
|
74
|
-
"args": [
|
|
75
|
-
{
|
|
76
|
-
"type": "string",
|
|
77
|
-
"propertyName": "name",
|
|
78
|
-
"name": "name",
|
|
79
|
-
"required": true,
|
|
80
|
-
"description": "Name of the command class"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"aliases": [],
|
|
84
|
-
"flags": [
|
|
85
|
-
{
|
|
86
|
-
"name": "exact",
|
|
87
|
-
"propertyName": "exact",
|
|
88
|
-
"type": "boolean",
|
|
89
|
-
"description": "Create the command with the exact name as provided",
|
|
90
|
-
"alias": "e"
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
"make:controller": {
|
|
95
|
-
"settings": {},
|
|
96
|
-
"commandPath": "./commands/Make/Controller",
|
|
97
|
-
"commandName": "make:controller",
|
|
98
|
-
"description": "Make a new HTTP controller",
|
|
99
|
-
"args": [
|
|
100
|
-
{
|
|
101
|
-
"type": "string",
|
|
102
|
-
"propertyName": "name",
|
|
103
|
-
"name": "name",
|
|
104
|
-
"required": true,
|
|
105
|
-
"description": "Name of the controller class"
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
"aliases": [],
|
|
109
|
-
"flags": [
|
|
110
|
-
{
|
|
111
|
-
"name": "resource",
|
|
112
|
-
"propertyName": "resource",
|
|
113
|
-
"type": "boolean",
|
|
114
|
-
"description": "Add resourceful methods to the controller class",
|
|
115
|
-
"alias": "r"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "exact",
|
|
119
|
-
"propertyName": "exact",
|
|
120
|
-
"type": "boolean",
|
|
121
|
-
"description": "Create the controller with the exact name as provided",
|
|
122
|
-
"alias": "e"
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
"make:exception": {
|
|
127
|
-
"settings": {},
|
|
128
|
-
"commandPath": "./commands/Make/Exception",
|
|
129
|
-
"commandName": "make:exception",
|
|
130
|
-
"description": "Make a new custom exception class",
|
|
131
|
-
"args": [
|
|
132
|
-
{
|
|
133
|
-
"type": "string",
|
|
134
|
-
"propertyName": "name",
|
|
135
|
-
"name": "name",
|
|
136
|
-
"required": true,
|
|
137
|
-
"description": "Name of the exception class"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"aliases": [],
|
|
141
|
-
"flags": [
|
|
142
|
-
{
|
|
143
|
-
"name": "self-handle",
|
|
144
|
-
"propertyName": "selfHandle",
|
|
145
|
-
"type": "boolean",
|
|
146
|
-
"description": "Add the handle method to self handle the exception"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "exact",
|
|
150
|
-
"propertyName": "exact",
|
|
151
|
-
"type": "boolean",
|
|
152
|
-
"description": "Create the exception class with the exact name as provided",
|
|
153
|
-
"alias": "e"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
"make:listener": {
|
|
158
|
-
"settings": {},
|
|
159
|
-
"commandPath": "./commands/Make/Listener",
|
|
160
|
-
"commandName": "make:listener",
|
|
161
|
-
"description": "Make a new event listener class",
|
|
162
|
-
"args": [
|
|
163
|
-
{
|
|
164
|
-
"type": "string",
|
|
165
|
-
"propertyName": "name",
|
|
166
|
-
"name": "name",
|
|
167
|
-
"required": true,
|
|
168
|
-
"description": "Name of the event listener class"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"aliases": [],
|
|
172
|
-
"flags": [
|
|
173
|
-
{
|
|
174
|
-
"name": "exact",
|
|
175
|
-
"propertyName": "exact",
|
|
176
|
-
"type": "boolean",
|
|
177
|
-
"description": "Create the listener with the exact name as provided",
|
|
178
|
-
"alias": "e"
|
|
179
|
-
}
|
|
180
|
-
]
|
|
181
|
-
},
|
|
182
|
-
"make:middleware": {
|
|
183
|
-
"settings": {},
|
|
184
|
-
"commandPath": "./commands/Make/Middleware",
|
|
185
|
-
"commandName": "make:middleware",
|
|
186
|
-
"description": "Make a new middleware",
|
|
187
|
-
"args": [
|
|
188
|
-
{
|
|
189
|
-
"type": "string",
|
|
190
|
-
"propertyName": "name",
|
|
191
|
-
"name": "name",
|
|
192
|
-
"required": true,
|
|
193
|
-
"description": "Name of the middleware class"
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"aliases": [],
|
|
197
|
-
"flags": [
|
|
198
|
-
{
|
|
199
|
-
"name": "exact",
|
|
200
|
-
"propertyName": "exact",
|
|
201
|
-
"type": "boolean",
|
|
202
|
-
"description": "Create the middleware with the exact name as provided",
|
|
203
|
-
"alias": "e"
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
},
|
|
207
|
-
"make:prldfile": {
|
|
208
|
-
"settings": {},
|
|
209
|
-
"commandPath": "./commands/Make/PreloadFile",
|
|
210
|
-
"commandName": "make:prldfile",
|
|
211
|
-
"description": "Make a new preload file",
|
|
212
|
-
"args": [
|
|
213
|
-
{
|
|
214
|
-
"type": "string",
|
|
215
|
-
"propertyName": "name",
|
|
216
|
-
"name": "name",
|
|
217
|
-
"required": true,
|
|
218
|
-
"description": "Name of the file"
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"aliases": [],
|
|
222
|
-
"flags": [
|
|
223
|
-
{
|
|
224
|
-
"name": "environment",
|
|
225
|
-
"propertyName": "environment",
|
|
226
|
-
"type": "array",
|
|
227
|
-
"description": "Define the preload file environment. Accepted values \"console,web,repl,test\""
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
},
|
|
231
|
-
"make:provider": {
|
|
232
|
-
"settings": {},
|
|
233
|
-
"commandPath": "./commands/Make/Provider",
|
|
234
|
-
"commandName": "make:provider",
|
|
235
|
-
"description": "Make a new provider class",
|
|
236
|
-
"args": [
|
|
237
|
-
{
|
|
238
|
-
"type": "string",
|
|
239
|
-
"propertyName": "name",
|
|
240
|
-
"name": "name",
|
|
241
|
-
"required": true,
|
|
242
|
-
"description": "Name of the provider class"
|
|
243
|
-
}
|
|
244
|
-
],
|
|
245
|
-
"aliases": [],
|
|
246
|
-
"flags": [
|
|
247
|
-
{
|
|
248
|
-
"name": "ace",
|
|
249
|
-
"propertyName": "ace",
|
|
250
|
-
"type": "boolean",
|
|
251
|
-
"description": "Register provider under the ace providers array"
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
"name": "exact",
|
|
255
|
-
"propertyName": "exact",
|
|
256
|
-
"type": "boolean",
|
|
257
|
-
"description": "Create the provider with the exact name as provided",
|
|
258
|
-
"alias": "e"
|
|
259
|
-
}
|
|
260
|
-
]
|
|
261
|
-
},
|
|
262
|
-
"make:suite": {
|
|
263
|
-
"settings": {},
|
|
264
|
-
"commandPath": "./commands/Make/Suite",
|
|
265
|
-
"commandName": "make:suite",
|
|
266
|
-
"description": "Create a new test suite",
|
|
267
|
-
"args": [
|
|
268
|
-
{
|
|
269
|
-
"type": "string",
|
|
270
|
-
"propertyName": "suite",
|
|
271
|
-
"name": "suite",
|
|
272
|
-
"required": true,
|
|
273
|
-
"description": "Name of the test suite"
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"type": "string",
|
|
277
|
-
"propertyName": "location",
|
|
278
|
-
"name": "location",
|
|
279
|
-
"required": false,
|
|
280
|
-
"description": "Path to the test suite directory"
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
"aliases": [],
|
|
284
|
-
"flags": [
|
|
285
|
-
{
|
|
286
|
-
"name": "with-example-test",
|
|
287
|
-
"propertyName": "withExampleTest",
|
|
288
|
-
"type": "boolean",
|
|
289
|
-
"description": "Add a sample test file"
|
|
290
|
-
}
|
|
291
|
-
]
|
|
292
|
-
},
|
|
293
|
-
"make:test": {
|
|
294
|
-
"settings": {},
|
|
295
|
-
"commandPath": "./commands/Make/Test",
|
|
296
|
-
"commandName": "make:test",
|
|
297
|
-
"description": "Make a new test",
|
|
298
|
-
"args": [
|
|
299
|
-
{
|
|
300
|
-
"type": "string",
|
|
301
|
-
"propertyName": "suite",
|
|
302
|
-
"name": "suite",
|
|
303
|
-
"required": true,
|
|
304
|
-
"description": "Name of the test suite"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"type": "string",
|
|
308
|
-
"propertyName": "name",
|
|
309
|
-
"name": "name",
|
|
310
|
-
"required": true,
|
|
311
|
-
"description": "Name of the test file"
|
|
312
|
-
}
|
|
313
|
-
],
|
|
314
|
-
"aliases": [],
|
|
315
|
-
"flags": [
|
|
316
|
-
{
|
|
317
|
-
"name": "exact",
|
|
318
|
-
"propertyName": "exact",
|
|
319
|
-
"type": "boolean",
|
|
320
|
-
"description": "Create the test file with the exact name as provided",
|
|
321
|
-
"alias": "e"
|
|
322
|
-
}
|
|
323
|
-
]
|
|
324
|
-
},
|
|
325
|
-
"make:validator": {
|
|
326
|
-
"settings": {},
|
|
327
|
-
"commandPath": "./commands/Make/Validator",
|
|
328
|
-
"commandName": "make:validator",
|
|
329
|
-
"description": "Make a new validator",
|
|
330
|
-
"args": [
|
|
331
|
-
{
|
|
332
|
-
"type": "string",
|
|
333
|
-
"propertyName": "name",
|
|
334
|
-
"name": "name",
|
|
335
|
-
"required": true,
|
|
336
|
-
"description": "Name of the validator class"
|
|
337
|
-
}
|
|
338
|
-
],
|
|
339
|
-
"aliases": [],
|
|
340
|
-
"flags": [
|
|
341
|
-
{
|
|
342
|
-
"name": "exact",
|
|
343
|
-
"propertyName": "exact",
|
|
344
|
-
"type": "boolean",
|
|
345
|
-
"description": "Create the validator with the exact name as provided",
|
|
346
|
-
"alias": "e"
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
},
|
|
350
|
-
"make:view": {
|
|
351
|
-
"settings": {},
|
|
352
|
-
"commandPath": "./commands/Make/View",
|
|
353
|
-
"commandName": "make:view",
|
|
354
|
-
"description": "Make a new view template",
|
|
355
|
-
"args": [
|
|
356
|
-
{
|
|
357
|
-
"type": "string",
|
|
358
|
-
"propertyName": "name",
|
|
359
|
-
"name": "name",
|
|
360
|
-
"required": true,
|
|
361
|
-
"description": "Name of the view"
|
|
362
|
-
}
|
|
363
|
-
],
|
|
364
|
-
"aliases": [],
|
|
365
|
-
"flags": [
|
|
366
|
-
{
|
|
367
|
-
"name": "exact",
|
|
368
|
-
"propertyName": "exact",
|
|
369
|
-
"type": "boolean",
|
|
370
|
-
"description": "Create the template file with the exact name as provided",
|
|
371
|
-
"alias": "e"
|
|
372
|
-
}
|
|
373
|
-
]
|
|
374
|
-
},
|
|
375
|
-
"serve": {
|
|
376
|
-
"settings": {
|
|
377
|
-
"stayAlive": true
|
|
378
|
-
},
|
|
379
|
-
"commandPath": "./commands/Serve",
|
|
380
|
-
"commandName": "serve",
|
|
381
|
-
"description": "Start the AdonisJS HTTP server, along with the file watcher. Also starts the webpack dev server when webpack encore is installed",
|
|
382
|
-
"args": [],
|
|
383
|
-
"aliases": [],
|
|
384
|
-
"flags": [
|
|
385
|
-
{
|
|
386
|
-
"name": "assets",
|
|
387
|
-
"propertyName": "assets",
|
|
388
|
-
"type": "boolean",
|
|
389
|
-
"description": "Start webpack dev server when encore is installed. Use \"--no-assets\" to disable"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"name": "watch",
|
|
393
|
-
"propertyName": "watch",
|
|
394
|
-
"type": "boolean",
|
|
395
|
-
"description": "Watch for file changes and re-start the HTTP server on change",
|
|
396
|
-
"alias": "w"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"name": "poll",
|
|
400
|
-
"propertyName": "poll",
|
|
401
|
-
"type": "boolean",
|
|
402
|
-
"description": "Detect file changes by polling files instead of listening to filesystem events",
|
|
403
|
-
"alias": "p"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"name": "node-args",
|
|
407
|
-
"propertyName": "nodeArgs",
|
|
408
|
-
"type": "array",
|
|
409
|
-
"description": "CLI options to pass to the node command line"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"name": "encore-args",
|
|
413
|
-
"propertyName": "encoreArgs",
|
|
414
|
-
"type": "array",
|
|
415
|
-
"description": "CLI options to pass to the encore command line"
|
|
416
|
-
}
|
|
417
|
-
]
|
|
418
|
-
},
|
|
419
|
-
"test": {
|
|
420
|
-
"settings": {
|
|
421
|
-
"stayAlive": true
|
|
422
|
-
},
|
|
423
|
-
"commandPath": "./commands/Test",
|
|
424
|
-
"commandName": "test",
|
|
425
|
-
"description": "Run AdonisJS tests",
|
|
426
|
-
"args": [
|
|
427
|
-
{
|
|
428
|
-
"type": "spread",
|
|
429
|
-
"propertyName": "suites",
|
|
430
|
-
"name": "suites",
|
|
431
|
-
"required": false,
|
|
432
|
-
"description": "Run tests for only the specified suites"
|
|
433
|
-
}
|
|
434
|
-
],
|
|
435
|
-
"aliases": [],
|
|
436
|
-
"flags": [
|
|
437
|
-
{
|
|
438
|
-
"name": "files",
|
|
439
|
-
"propertyName": "files",
|
|
440
|
-
"type": "array",
|
|
441
|
-
"description": "Run tests for the mentioned files only"
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
"name": "watch",
|
|
445
|
-
"propertyName": "watch",
|
|
446
|
-
"type": "boolean",
|
|
447
|
-
"description": "Watch for file changes and re-run tests on file change",
|
|
448
|
-
"alias": "w"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"name": "poll",
|
|
452
|
-
"propertyName": "poll",
|
|
453
|
-
"type": "boolean",
|
|
454
|
-
"description": "Detect file changes by polling files instead of listening to filesystem events",
|
|
455
|
-
"alias": "p"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
"name": "node-args",
|
|
459
|
-
"propertyName": "nodeArgs",
|
|
460
|
-
"type": "array",
|
|
461
|
-
"description": "CLI options to pass to the node command line"
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"name": "tags",
|
|
465
|
-
"propertyName": "tags",
|
|
466
|
-
"type": "array",
|
|
467
|
-
"description": "Filter tests by tags"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"name": "ignore-tags",
|
|
471
|
-
"propertyName": "ignoreTags",
|
|
472
|
-
"type": "array",
|
|
473
|
-
"description": "Filter tests by ignoring tags"
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"name": "tests",
|
|
477
|
-
"propertyName": "tests",
|
|
478
|
-
"type": "array",
|
|
479
|
-
"description": "Filter tests by title"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "groups",
|
|
483
|
-
"propertyName": "groups",
|
|
484
|
-
"type": "array",
|
|
485
|
-
"description": "Filter tests by group title"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"name": "timeout",
|
|
489
|
-
"propertyName": "timeout",
|
|
490
|
-
"type": "number",
|
|
491
|
-
"description": "Customize tests timeout"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"name": "force-exit",
|
|
495
|
-
"propertyName": "forceExit",
|
|
496
|
-
"type": "boolean",
|
|
497
|
-
"description": "Force exit the tests runner process"
|
|
498
|
-
}
|
|
499
|
-
]
|
|
500
|
-
},
|
|
501
|
-
"type-check": {
|
|
502
|
-
"settings": {},
|
|
503
|
-
"commandPath": "./commands/TypeCheck",
|
|
504
|
-
"commandName": "type-check",
|
|
505
|
-
"description": "Type check TypeScript source without writing the compiled output on disk",
|
|
506
|
-
"args": [],
|
|
507
|
-
"aliases": [],
|
|
508
|
-
"flags": [
|
|
509
|
-
{
|
|
510
|
-
"name": "tsconfig",
|
|
511
|
-
"propertyName": "tsconfig",
|
|
512
|
-
"type": "string",
|
|
513
|
-
"description": "Path to the TypeScript project configuration file"
|
|
514
|
-
}
|
|
515
|
-
]
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
"aliases": {
|
|
519
|
-
"invoke": "configure"
|
|
520
|
-
}
|
|
521
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '@adonisjs/core/build/standalone';
|
|
2
|
-
/**
|
|
3
|
-
* Compile typescript project Javascript
|
|
4
|
-
*/
|
|
5
|
-
export default class Build extends BaseCommand {
|
|
6
|
-
static commandName: string;
|
|
7
|
-
static description: string;
|
|
8
|
-
/**
|
|
9
|
-
* Build for production
|
|
10
|
-
*/
|
|
11
|
-
production: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Bundle frontend assets. Defaults to true
|
|
14
|
-
*/
|
|
15
|
-
assets: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Ignore ts errors and complete the build process. Defaults to false
|
|
18
|
-
*/
|
|
19
|
-
ignoreTsErrors: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
|
|
22
|
-
*/
|
|
23
|
-
tsconfig: string;
|
|
24
|
-
/**
|
|
25
|
-
* Arguments to pass to the `encore` binary
|
|
26
|
-
*/
|
|
27
|
-
encoreArgs: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Select the client for deciding the lock file to copy to the
|
|
30
|
-
* build folder
|
|
31
|
-
*/
|
|
32
|
-
client: string;
|
|
33
|
-
/**
|
|
34
|
-
* Invoked automatically by ace
|
|
35
|
-
*/
|
|
36
|
-
run(): Promise<void>;
|
|
37
|
-
}
|
package/build/commands/Build.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
43
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
const has_yarn_1 = __importDefault(require("has-yarn"));
|
|
47
|
-
const standalone_1 = require("@adonisjs/core/build/standalone");
|
|
48
|
-
const paths_1 = require("../config/paths");
|
|
49
|
-
/**
|
|
50
|
-
* Compile typescript project Javascript
|
|
51
|
-
*/
|
|
52
|
-
class Build extends standalone_1.BaseCommand {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
/**
|
|
56
|
-
* Bundle frontend assets. Defaults to true
|
|
57
|
-
*/
|
|
58
|
-
this.assets = true;
|
|
59
|
-
/**
|
|
60
|
-
* Path to the TypeScript project configuration file. Defaults to "tsconfig.json"
|
|
61
|
-
*/
|
|
62
|
-
this.tsconfig = paths_1.TSCONFIG_FILE_NAME;
|
|
63
|
-
/**
|
|
64
|
-
* Arguments to pass to the `encore` binary
|
|
65
|
-
*/
|
|
66
|
-
this.encoreArgs = [];
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Invoked automatically by ace
|
|
70
|
-
*/
|
|
71
|
-
async run() {
|
|
72
|
-
const { Compiler } = await Promise.resolve().then(() => __importStar(require('../src/Compiler')));
|
|
73
|
-
/**
|
|
74
|
-
* Deciding the client to use for installing dependencies
|
|
75
|
-
*/
|
|
76
|
-
this.client = this.client || (0, has_yarn_1.default)(this.application.appRoot) ? 'yarn' : 'npm';
|
|
77
|
-
if (this.client !== 'npm' && this.client !== 'yarn') {
|
|
78
|
-
this.logger.warning('--client must be set to "npm" or "yarn"');
|
|
79
|
-
this.exitCode = 1;
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Stop on error when "ignoreTsErrors" is not set
|
|
84
|
-
*/
|
|
85
|
-
const stopOnError = !this.ignoreTsErrors;
|
|
86
|
-
try {
|
|
87
|
-
const compiler = new Compiler(this.application.appRoot, this.encoreArgs, this.assets, this.logger, this.tsconfig);
|
|
88
|
-
const compiled = this.production
|
|
89
|
-
? await compiler.compileForProduction(stopOnError, this.client)
|
|
90
|
-
: await compiler.compile(stopOnError);
|
|
91
|
-
/**
|
|
92
|
-
* Set exitCode based upon the compiled status
|
|
93
|
-
*/
|
|
94
|
-
if (!compiled) {
|
|
95
|
-
this.exitCode = 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
this.logger.fatal(error);
|
|
100
|
-
this.exitCode = 1;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
Build.commandName = 'build';
|
|
105
|
-
Build.description = 'Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore';
|
|
106
|
-
__decorate([
|
|
107
|
-
standalone_1.flags.boolean({ description: 'Build for production', alias: 'prod' }),
|
|
108
|
-
__metadata("design:type", Boolean)
|
|
109
|
-
], Build.prototype, "production", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
standalone_1.flags.boolean({
|
|
112
|
-
description: 'Build frontend assets when webpack encore is installed. Use --no-assets to disable',
|
|
113
|
-
}),
|
|
114
|
-
__metadata("design:type", Boolean)
|
|
115
|
-
], Build.prototype, "assets", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
standalone_1.flags.boolean({
|
|
118
|
-
description: 'Ignore typescript errors and complete the build process',
|
|
119
|
-
}),
|
|
120
|
-
__metadata("design:type", Boolean)
|
|
121
|
-
], Build.prototype, "ignoreTsErrors", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
standalone_1.flags.string({
|
|
124
|
-
description: 'Path to the TypeScript project configuration file',
|
|
125
|
-
}),
|
|
126
|
-
__metadata("design:type", String)
|
|
127
|
-
], Build.prototype, "tsconfig", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
standalone_1.flags.array({ description: 'CLI options to pass to the encore command line' }),
|
|
130
|
-
__metadata("design:type", Array)
|
|
131
|
-
], Build.prototype, "encoreArgs", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
standalone_1.flags.string({
|
|
134
|
-
description: 'Select the package manager to decide which lock file to copy to the build folder',
|
|
135
|
-
}),
|
|
136
|
-
__metadata("design:type", String)
|
|
137
|
-
], Build.prototype, "client", void 0);
|
|
138
|
-
exports.default = Build;
|