@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.
@@ -1,10 +1,52 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { RcFileTransformer } from './rc_file_transformer.js';
3
- import type { AddMiddlewareEntry, EnvValidationDefinition } from '../types.js';
1
+ import { Project } from 'ts-morph';
2
+ import { AppEnvironments } from '@adonisjs/application/types';
3
+ import { AddMiddlewareEntry, EnvValidationDefinition } from '../types.js';
4
+
5
+ /**
6
+ * RcFileTransformer is used to transform the `adonisrc.ts` file
7
+ * for adding new commands, providers, meta files etc
8
+ */
9
+ declare class RcFileTransformer {
10
+ #private;
11
+ constructor(cwd: URL, project: Project);
12
+ /**
13
+ * Add a new command to the rcFile
14
+ */
15
+ addCommand(commandPath: string): this;
16
+ /**
17
+ * Add a new preloaded file to the rcFile
18
+ */
19
+ addPreloadFile(modulePath: string, environments?: AppEnvironments[]): this;
20
+ /**
21
+ * Add a new provider to the rcFile
22
+ */
23
+ addProvider(providerPath: string, environments?: AppEnvironments[]): this;
24
+ /**
25
+ * Add a new meta file to the rcFile
26
+ */
27
+ addMetaFile(globPattern: string, reloadServer?: boolean): this;
28
+ /**
29
+ * Set directory name and path
30
+ */
31
+ setDirectory(key: string, value: string): this;
32
+ /**
33
+ * Set command alias
34
+ */
35
+ setCommandAlias(alias: string, command: string): this;
36
+ /**
37
+ * Add a new test suite to the rcFile
38
+ */
39
+ addSuite(suiteName: string, files: string | string[], timeout?: number): this;
40
+ /**
41
+ * Save the adonisrc.ts file
42
+ */
43
+ save(): Promise<void>;
44
+ }
45
+
4
46
  /**
5
47
  * This class is responsible for updating
6
48
  */
7
- export declare class CodeTransformer {
49
+ declare class CodeTransformer {
8
50
  #private;
9
51
  constructor(cwd: URL);
10
52
  /**
@@ -26,3 +68,5 @@ export declare class CodeTransformer {
26
68
  */
27
69
  defineEnvValidations(definition: EnvValidationDefinition): Promise<void>;
28
70
  }
71
+
72
+ export { CodeTransformer };