@arikajs/console 0.10.2 → 0.10.3
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/dist/Kernel.d.ts +32 -0
- package/dist/Kernel.d.ts.map +1 -0
- package/dist/Kernel.js +38 -0
- package/dist/Kernel.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
package/dist/Kernel.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CommandRegistry } from './CommandRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Base Console Kernel class.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class Kernel {
|
|
6
|
+
/**
|
|
7
|
+
* The application instance.
|
|
8
|
+
*/
|
|
9
|
+
protected app: any;
|
|
10
|
+
/**
|
|
11
|
+
* The command registry.
|
|
12
|
+
*/
|
|
13
|
+
protected registry: CommandRegistry;
|
|
14
|
+
constructor(app: any);
|
|
15
|
+
/**
|
|
16
|
+
* Register the commands for the application.
|
|
17
|
+
*/
|
|
18
|
+
protected abstract commands(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Define the application's command schedule.
|
|
21
|
+
*/
|
|
22
|
+
protected schedule(scheduler: any): void;
|
|
23
|
+
/**
|
|
24
|
+
* Handle an incoming console command.
|
|
25
|
+
*/
|
|
26
|
+
handle(args: string[]): Promise<number>;
|
|
27
|
+
/**
|
|
28
|
+
* Run the scheduler.
|
|
29
|
+
*/
|
|
30
|
+
runSchedule(): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=Kernel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kernel.d.ts","sourceRoot":"","sources":["../src/Kernel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,8BAAsB,MAAM;IACxB;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAC;gBAExB,GAAG,EAAE,GAAG;IAKpB;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEnC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAIxC;;OAEG;IACU,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAOpD;;OAEG;IACU,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAO5C"}
|
package/dist/Kernel.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Kernel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base Console Kernel class.
|
|
6
|
+
*/
|
|
7
|
+
class Kernel {
|
|
8
|
+
constructor(app) {
|
|
9
|
+
this.app = app;
|
|
10
|
+
this.registry = app.make('console.registry');
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Define the application's command schedule.
|
|
14
|
+
*/
|
|
15
|
+
schedule(scheduler) {
|
|
16
|
+
//
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Handle an incoming console command.
|
|
20
|
+
*/
|
|
21
|
+
async handle(args) {
|
|
22
|
+
this.commands();
|
|
23
|
+
// Let the registry handle the execution
|
|
24
|
+
return await this.registry.run(args);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Run the scheduler.
|
|
28
|
+
*/
|
|
29
|
+
async runSchedule() {
|
|
30
|
+
if (this.app.has('scheduler')) {
|
|
31
|
+
const scheduler = this.app.make('scheduler');
|
|
32
|
+
this.schedule(scheduler);
|
|
33
|
+
await scheduler.run();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Kernel = Kernel;
|
|
38
|
+
//# sourceMappingURL=Kernel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kernel.js","sourceRoot":"","sources":["../src/Kernel.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAsB,MAAM;IAWxB,YAAY,GAAQ;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;IAOD;;OAEG;IACO,QAAQ,CAAC,SAAc;QAC7B,EAAE;IACN,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAAC,IAAc;QAC9B,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,wCAAwC;QACxC,OAAO,MAAO,IAAI,CAAC,QAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,WAAW;QACpB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACzB,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ;AAhDD,wBAgDC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Parser = exports.Output = exports.Input = exports.CommandRegistry = exports.Command = void 0;
|
|
3
|
+
exports.Kernel = exports.Parser = exports.Output = exports.Input = exports.CommandRegistry = exports.Command = void 0;
|
|
4
4
|
var Command_1 = require("./Command");
|
|
5
5
|
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return Command_1.Command; } });
|
|
6
6
|
var CommandRegistry_1 = require("./CommandRegistry");
|
|
@@ -11,4 +11,6 @@ var Output_1 = require("./Output");
|
|
|
11
11
|
Object.defineProperty(exports, "Output", { enumerable: true, get: function () { return Output_1.Output; } });
|
|
12
12
|
var Parser_1 = require("./Parser");
|
|
13
13
|
Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return Parser_1.Parser; } });
|
|
14
|
+
var Kernel_1 = require("./Kernel");
|
|
15
|
+
Object.defineProperty(exports, "Kernel", { enumerable: true, get: function () { return Kernel_1.Kernel; } });
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arikajs/console",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "The command system for the ArikaJS framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc -p tsconfig.json",
|
|
10
|
+
"build:tests": "tsc -p tsconfig.test.json",
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"prepare": "echo skip",
|
|
13
|
+
"test": "npx tsx --test tests/**/*.test.ts",
|
|
14
|
+
"test:watch": "npx tsx --test --watch tests/**/*.test.ts",
|
|
15
|
+
"dev": "tsc -p tsconfig.json --watch"
|
|
16
|
+
},
|
|
8
17
|
"files": [
|
|
9
18
|
"dist"
|
|
10
19
|
],
|
|
@@ -33,13 +42,5 @@
|
|
|
33
42
|
"typescript": "^5.3.3",
|
|
34
43
|
"tsx": "^4.7.1"
|
|
35
44
|
},
|
|
36
|
-
"author": "Prakash Tank"
|
|
37
|
-
|
|
38
|
-
"build": "tsc -p tsconfig.json",
|
|
39
|
-
"build:tests": "tsc -p tsconfig.test.json",
|
|
40
|
-
"clean": "rm -rf dist",
|
|
41
|
-
"test": "npx tsx --test tests/**/*.test.ts",
|
|
42
|
-
"test:watch": "npx tsx --test --watch tests/**/*.test.ts",
|
|
43
|
-
"dev": "tsc -p tsconfig.json --watch"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
45
|
+
"author": "Prakash Tank"
|
|
46
|
+
}
|