@adonisjs/repl 4.0.0-4 → 4.0.0-5
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/src/repl.d.ts +16 -0
- package/build/src/repl.js +14 -0
- package/package.json +1 -1
package/build/src/repl.d.ts
CHANGED
|
@@ -29,6 +29,22 @@ export declare class Repl {
|
|
|
29
29
|
* Register a custom loader function to be added to the context
|
|
30
30
|
*/
|
|
31
31
|
addMethod(name: string, handler: MethodCallback, options?: MethodOptions): this;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the collection of registered methods
|
|
34
|
+
*/
|
|
35
|
+
getMethods(): {
|
|
36
|
+
[name: string]: {
|
|
37
|
+
handler: MethodCallback;
|
|
38
|
+
options: MethodOptions & {
|
|
39
|
+
width: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Register a compiler. Make sure register the compiler before
|
|
45
|
+
* calling the start method
|
|
46
|
+
*/
|
|
47
|
+
useCompiler(compiler: Compiler): this;
|
|
32
48
|
/**
|
|
33
49
|
* Start the REPL server
|
|
34
50
|
*/
|
package/build/src/repl.js
CHANGED
|
@@ -282,6 +282,20 @@ export class Repl {
|
|
|
282
282
|
}
|
|
283
283
|
return this;
|
|
284
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Returns the collection of registered methods
|
|
287
|
+
*/
|
|
288
|
+
getMethods() {
|
|
289
|
+
return this.#customMethods;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Register a compiler. Make sure register the compiler before
|
|
293
|
+
* calling the start method
|
|
294
|
+
*/
|
|
295
|
+
useCompiler(compiler) {
|
|
296
|
+
this.#compiler = compiler;
|
|
297
|
+
return this;
|
|
298
|
+
}
|
|
285
299
|
/**
|
|
286
300
|
* Start the REPL server
|
|
287
301
|
*/
|