@h3ravel/console 11.0.0 → 11.0.1

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.
Files changed (48) hide show
  1. package/README.md +13 -1
  2. package/dist/Commands/Command.cjs +104 -0
  3. package/dist/Commands/Command.js +7 -0
  4. package/dist/Commands/MakeCommand.cjs +433 -0
  5. package/dist/Commands/MakeCommand.js +9 -0
  6. package/dist/Commands/MigrateCommand.cjs +202 -0
  7. package/dist/Commands/MigrateCommand.js +8 -0
  8. package/dist/Commands/ServeCommand.cjs +159 -0
  9. package/dist/Commands/ServeCommand.js +8 -0
  10. package/dist/Contracts/ICommand.cjs +18 -0
  11. package/dist/Contracts/ICommand.js +1 -0
  12. package/dist/IO/app.cjs +934 -0
  13. package/dist/IO/app.js +17 -0
  14. package/dist/IO/providers.cjs +909 -0
  15. package/dist/IO/providers.js +16 -0
  16. package/dist/Kernel.cjs +892 -0
  17. package/dist/Kernel.js +14 -0
  18. package/dist/Musket.cjs +837 -0
  19. package/dist/Musket.js +13 -0
  20. package/dist/Providers/ConsoleServiceProvider.cjs +904 -0
  21. package/dist/Providers/ConsoleServiceProvider.js +15 -0
  22. package/dist/Signature.cjs +172 -0
  23. package/dist/Signature.js +7 -0
  24. package/dist/Utils.cjs +218 -0
  25. package/dist/Utils.js +9 -0
  26. package/dist/chunk-3FVPHQCH.js +151 -0
  27. package/dist/chunk-FOSDCKCR.js +106 -0
  28. package/dist/chunk-IGEFNODG.js +22 -0
  29. package/dist/chunk-KMIFCLXG.js +16 -0
  30. package/dist/chunk-NADN2PHB.js +0 -0
  31. package/dist/chunk-O45AB4MX.js +83 -0
  32. package/dist/chunk-PMV4TMFS.js +151 -0
  33. package/dist/chunk-POF4JGTX.js +186 -0
  34. package/dist/chunk-SHUYVCID.js +6 -0
  35. package/dist/chunk-SP4JKAUC.js +63 -0
  36. package/dist/chunk-TN5SV7LF.js +133 -0
  37. package/dist/chunk-UCOXL3OM.js +0 -0
  38. package/dist/chunk-URLTFJET.js +68 -0
  39. package/dist/chunk-XSL373TG.js +36 -0
  40. package/dist/index.cjs +889 -3
  41. package/dist/index.d.cts +306 -2
  42. package/dist/index.d.ts +306 -2
  43. package/dist/index.js +43 -15
  44. package/dist/run.cjs +1 -0
  45. package/dist/run.js +1 -0
  46. package/package.json +21 -4
  47. package/dist/index.cjs.map +0 -1
  48. package/dist/index.js.map +0 -1
@@ -0,0 +1,68 @@
1
+ import {
2
+ Musket
3
+ } from "./chunk-TN5SV7LF.js";
4
+ import {
5
+ Utils
6
+ } from "./chunk-POF4JGTX.js";
7
+ import {
8
+ __name
9
+ } from "./chunk-SHUYVCID.js";
10
+
11
+ // src/Kernel.ts
12
+ import { mkdir } from "fs/promises";
13
+ import path from "path";
14
+ var Kernel = class _Kernel {
15
+ static {
16
+ __name(this, "Kernel");
17
+ }
18
+ app;
19
+ cwd;
20
+ output = Utils.output();
21
+ basePath = "";
22
+ modulePath;
23
+ consolePath;
24
+ modulePackage;
25
+ consolePackage;
26
+ constructor(app, basePath) {
27
+ this.app = app;
28
+ }
29
+ static init(app) {
30
+ const instance = new _Kernel(app);
31
+ Promise.all([
32
+ instance.loadRequirements()
33
+ ]).then(([e]) => e.run());
34
+ }
35
+ async run() {
36
+ await Musket.parse(this);
37
+ process.exit(0);
38
+ }
39
+ async ensureDirectoryExists(dir) {
40
+ await mkdir(dir, {
41
+ recursive: true
42
+ });
43
+ }
44
+ async loadRequirements() {
45
+ this.cwd = path.join(process.cwd(), this.basePath);
46
+ this.modulePath = Utils.findModulePkg("@h3ravel/core", this.cwd) ?? "";
47
+ this.consolePath = Utils.findModulePkg("@h3ravel/console", this.cwd) ?? "";
48
+ try {
49
+ this.modulePackage = await import(path.join(this.modulePath, "package.json"));
50
+ } catch {
51
+ this.modulePackage = {
52
+ version: "N/A"
53
+ };
54
+ }
55
+ try {
56
+ this.consolePackage = await import(path.join(this.consolePath, "package.json"));
57
+ } catch {
58
+ this.consolePackage = {
59
+ version: "N/A"
60
+ };
61
+ }
62
+ return this;
63
+ }
64
+ };
65
+
66
+ export {
67
+ Kernel
68
+ };
@@ -0,0 +1,36 @@
1
+ import {
2
+ providers_default
3
+ } from "./chunk-KMIFCLXG.js";
4
+ import {
5
+ Kernel
6
+ } from "./chunk-URLTFJET.js";
7
+ import {
8
+ __name
9
+ } from "./chunk-SHUYVCID.js";
10
+
11
+ // src/IO/app.ts
12
+ import { Application } from "@h3ravel/core";
13
+ import { EventEmitter } from "events";
14
+ var app_default = class {
15
+ static {
16
+ __name(this, "default");
17
+ }
18
+ async bootstrap() {
19
+ const app = new Application(process.cwd());
20
+ app.registerProviders(providers_default);
21
+ await app.registerConfiguredProviders();
22
+ await app.boot();
23
+ new Kernel(app);
24
+ new EventEmitter().once("SIGINT", () => process.exit(0));
25
+ process.on("SIGINT", () => {
26
+ process.exit(0);
27
+ });
28
+ process.on("SIGTERM", () => {
29
+ process.exit(0);
30
+ });
31
+ }
32
+ };
33
+
34
+ export {
35
+ app_default
36
+ };