@adonisjs/assembler 6.1.3-2 → 6.1.3-21
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 +3 -6
- package/build/index.d.ts +1 -0
- package/build/index.js +9 -0
- package/build/src/assets_dev_server.d.ts +32 -0
- package/build/src/assets_dev_server.js +158 -0
- package/build/src/bundler.d.ts +9 -0
- package/build/src/bundler.js +70 -17
- package/build/src/code_transformer/main.d.ts +28 -0
- package/build/src/code_transformer/main.js +201 -0
- package/build/src/code_transformer/rc_file_transformer.d.ts +43 -0
- package/build/src/code_transformer/rc_file_transformer.js +272 -0
- package/build/src/debug.d.ts +3 -0
- package/build/src/debug.js +10 -0
- package/build/src/dev_server.d.ts +32 -0
- package/build/src/dev_server.js +146 -179
- package/build/src/helpers.d.ts +50 -0
- package/build/src/helpers.js +183 -0
- package/build/src/test_runner.d.ts +47 -0
- package/build/src/test_runner.js +310 -0
- package/build/src/types.d.ts +102 -0
- package/build/src/types.js +8 -0
- package/package.json +52 -66
- package/build/src/parse_config.d.ts +0 -3
- package/build/src/parse_config.js +0 -15
- package/build/src/run.d.ts +0 -4
- package/build/src/run.js +0 -37
- package/build/src/watch.d.ts +0 -8
- package/build/src/watch.js +0 -12
package/build/src/run.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import type { RunOptions } from './types.js';
|
|
3
|
-
export declare function runNode(cwd: string | URL, options: RunOptions): import("execa").ExecaChildProcess<string>;
|
|
4
|
-
export declare function run(cwd: string | URL, options: Omit<RunOptions, 'nodeArgs'>): import("execa").ExecaChildProcess<string>;
|
package/build/src/run.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { execaNode, execa } from 'execa';
|
|
2
|
-
const DEFAULT_NODE_ARGS = [
|
|
3
|
-
'--loader=ts-node/esm',
|
|
4
|
-
'--no-warnings',
|
|
5
|
-
'--experimental-import-meta-resolve',
|
|
6
|
-
];
|
|
7
|
-
export function runNode(cwd, options) {
|
|
8
|
-
const childProcess = execaNode(options.script, options.scriptArgs, {
|
|
9
|
-
nodeOptions: DEFAULT_NODE_ARGS.concat(options.nodeArgs),
|
|
10
|
-
preferLocal: true,
|
|
11
|
-
windowsHide: false,
|
|
12
|
-
localDir: cwd,
|
|
13
|
-
cwd,
|
|
14
|
-
buffer: false,
|
|
15
|
-
stdio: options.stdio || 'inherit',
|
|
16
|
-
env: {
|
|
17
|
-
...(options.stdio === 'pipe' ? { FORCE_COLOR: 'true' } : {}),
|
|
18
|
-
...options.env,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
return childProcess;
|
|
22
|
-
}
|
|
23
|
-
export function run(cwd, options) {
|
|
24
|
-
const childProcess = execa(options.script, options.scriptArgs, {
|
|
25
|
-
preferLocal: true,
|
|
26
|
-
windowsHide: false,
|
|
27
|
-
localDir: cwd,
|
|
28
|
-
cwd,
|
|
29
|
-
buffer: false,
|
|
30
|
-
stdio: options.stdio || 'inherit',
|
|
31
|
-
env: {
|
|
32
|
-
...(options.stdio === 'pipe' ? { FORCE_COLOR: 'true' } : {}),
|
|
33
|
-
...options.env,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
return childProcess;
|
|
37
|
-
}
|
package/build/src/watch.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import type tsStatic from 'typescript';
|
|
3
|
-
import { Watcher } from '@poppinss/chokidar-ts';
|
|
4
|
-
import type { WatchOptions } from './types.js';
|
|
5
|
-
export declare function watch(cwd: string | URL, ts: typeof tsStatic, options: WatchOptions): {
|
|
6
|
-
watcher: Watcher;
|
|
7
|
-
chokidar: import("chokidar").FSWatcher;
|
|
8
|
-
} | undefined;
|
package/build/src/watch.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import { Watcher } from '@poppinss/chokidar-ts';
|
|
3
|
-
import { parseConfig } from './parse_config.js';
|
|
4
|
-
export function watch(cwd, ts, options) {
|
|
5
|
-
const config = parseConfig(cwd, ts);
|
|
6
|
-
if (!config) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const watcher = new Watcher(typeof cwd === 'string' ? cwd : fileURLToPath(cwd), config);
|
|
10
|
-
const chokidar = watcher.watch(['.'], { usePolling: options.poll });
|
|
11
|
-
return { watcher, chokidar };
|
|
12
|
-
}
|