@adonisjs/assembler 6.1.3-23 → 6.1.3-25
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/build/index.d.ts +109 -3
- package/build/index.js +920 -11
- package/build/src/code_transformer/main.d.ts +48 -4
- package/build/src/code_transformer/main.js +394 -210
- package/build/src/types.d.ts +12 -11
- package/build/src/types.js +0 -9
- package/package.json +29 -16
- package/build/src/assets_dev_server.d.ts +0 -32
- package/build/src/assets_dev_server.js +0 -158
- package/build/src/bundler.d.ts +0 -19
- package/build/src/bundler.js +0 -205
- package/build/src/code_transformer/rc_file_transformer.d.ts +0 -43
- package/build/src/code_transformer/rc_file_transformer.js +0 -272
- package/build/src/debug.d.ts +0 -3
- package/build/src/debug.js +0 -10
- package/build/src/dev_server.d.ts +0 -47
- package/build/src/dev_server.js +0 -253
- package/build/src/helpers.d.ts +0 -50
- package/build/src/helpers.js +0 -183
- package/build/src/test_runner.d.ts +0 -47
- package/build/src/test_runner.js +0 -310
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import tsStatic from 'typescript';
|
|
2
|
+
import { Logger } from '@poppinss/cliui';
|
|
3
|
+
import { BundlerOptions, DevServerOptions, TestRunnerOptions } from './src/types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The bundler class exposes the API to build an AdonisJS project.
|
|
7
|
+
*/
|
|
8
|
+
declare class Bundler {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(cwd: URL, ts: typeof tsStatic, options: BundlerOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Set a custom CLI UI logger
|
|
13
|
+
*/
|
|
14
|
+
setLogger(logger: Logger): this;
|
|
15
|
+
/**
|
|
16
|
+
* Bundles the application to be run in production
|
|
17
|
+
*/
|
|
18
|
+
bundle(stopOnError?: boolean, client?: 'npm' | 'yarn' | 'pnpm'): Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Exposes the API to start the development. Optionally, the watch API can be
|
|
23
|
+
* used to watch for file changes and restart the development server.
|
|
24
|
+
*
|
|
25
|
+
* The Dev server performs the following actions
|
|
26
|
+
*
|
|
27
|
+
* - Assigns a random PORT, when PORT inside .env file is in use
|
|
28
|
+
* - Uses tsconfig.json file to collect a list of files to watch.
|
|
29
|
+
* - Uses metaFiles from .adonisrc.json file to collect a list of files to watch.
|
|
30
|
+
* - Restart HTTP server on every file change.
|
|
31
|
+
*/
|
|
32
|
+
declare class DevServer {
|
|
33
|
+
#private;
|
|
34
|
+
constructor(cwd: URL, options: DevServerOptions);
|
|
35
|
+
/**
|
|
36
|
+
* Set a custom CLI UI logger
|
|
37
|
+
*/
|
|
38
|
+
setLogger(logger: Logger): this;
|
|
39
|
+
/**
|
|
40
|
+
* Add listener to get notified when dev server is
|
|
41
|
+
* closed
|
|
42
|
+
*/
|
|
43
|
+
onClose(callback: (exitCode: number) => any): this;
|
|
44
|
+
/**
|
|
45
|
+
* Add listener to get notified when dev server exists
|
|
46
|
+
* with an error
|
|
47
|
+
*/
|
|
48
|
+
onError(callback: (error: any) => any): this;
|
|
49
|
+
/**
|
|
50
|
+
* Close watchers and running child processes
|
|
51
|
+
*/
|
|
52
|
+
close(): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Start the development server
|
|
55
|
+
*/
|
|
56
|
+
start(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Start the development server in watch mode
|
|
59
|
+
*/
|
|
60
|
+
startAndWatch(ts: typeof tsStatic, options?: {
|
|
61
|
+
poll: boolean;
|
|
62
|
+
}): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Exposes the API to start the development. Optionally, the watch API can be
|
|
67
|
+
* used to watch for file changes and restart the development server.
|
|
68
|
+
*
|
|
69
|
+
* The Dev server performs the following actions
|
|
70
|
+
*
|
|
71
|
+
* - Assigns a random PORT, when PORT inside .env file is in use
|
|
72
|
+
* - Uses tsconfig.json file to collect a list of files to watch.
|
|
73
|
+
* - Uses metaFiles from .adonisrc.json file to collect a list of files to watch.
|
|
74
|
+
* - Restart HTTP server on every file change.
|
|
75
|
+
*/
|
|
76
|
+
declare class TestRunner {
|
|
77
|
+
#private;
|
|
78
|
+
constructor(cwd: URL, options: TestRunnerOptions);
|
|
79
|
+
/**
|
|
80
|
+
* Set a custom CLI UI logger
|
|
81
|
+
*/
|
|
82
|
+
setLogger(logger: Logger): this;
|
|
83
|
+
/**
|
|
84
|
+
* Add listener to get notified when dev server is
|
|
85
|
+
* closed
|
|
86
|
+
*/
|
|
87
|
+
onClose(callback: (exitCode: number) => any): this;
|
|
88
|
+
/**
|
|
89
|
+
* Add listener to get notified when dev server exists
|
|
90
|
+
* with an error
|
|
91
|
+
*/
|
|
92
|
+
onError(callback: (error: any) => any): this;
|
|
93
|
+
/**
|
|
94
|
+
* Close watchers and running child processes
|
|
95
|
+
*/
|
|
96
|
+
close(): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Runs tests
|
|
99
|
+
*/
|
|
100
|
+
run(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Run tests in watch mode
|
|
103
|
+
*/
|
|
104
|
+
runAndWatch(ts: typeof tsStatic, options?: {
|
|
105
|
+
poll: boolean;
|
|
106
|
+
}): Promise<void>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { Bundler, DevServer, TestRunner };
|