@h3ravel/console 11.0.5 → 11.1.0
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/bin/fire.cjs +2 -0
- package/bin/fire.js +2 -0
- package/dist/Utils-7OrjoB1C.d.cts +22 -0
- package/dist/Utils-B1kpj9-1.cjs +130 -0
- package/dist/Utils-B1kpj9-1.cjs.map +1 -0
- package/dist/Utils-DAJvoXlr.js +86 -0
- package/dist/Utils-DAJvoXlr.js.map +1 -0
- package/dist/Utils-DxnHOGMz.d.ts +22 -0
- package/dist/Utils.cjs +3 -217
- package/dist/Utils.d.cts +2 -0
- package/dist/Utils.d.ts +2 -0
- package/dist/Utils.js +3 -9
- package/dist/index.cjs +885 -921
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +270 -290
- package/dist/index.d.ts +270 -290
- package/dist/index.js +899 -44
- package/dist/index.js.map +1 -0
- package/package.json +36 -19
- package/bin/run.cjs +0 -26
- package/bin/run.js +0 -26
- package/dist/Commands/Command.cjs +0 -104
- package/dist/Commands/Command.js +0 -7
- package/dist/Commands/MakeCommand.cjs +0 -433
- package/dist/Commands/MakeCommand.js +0 -9
- package/dist/Commands/MigrateCommand.cjs +0 -202
- package/dist/Commands/MigrateCommand.js +0 -8
- package/dist/Commands/ServeCommand.cjs +0 -159
- package/dist/Commands/ServeCommand.js +0 -8
- package/dist/Contracts/ICommand.cjs +0 -18
- package/dist/Contracts/ICommand.js +0 -1
- package/dist/IO/app.cjs +0 -935
- package/dist/IO/app.js +0 -17
- package/dist/IO/providers.cjs +0 -911
- package/dist/IO/providers.js +0 -16
- package/dist/Kernel.cjs +0 -892
- package/dist/Kernel.js +0 -14
- package/dist/Musket.cjs +0 -837
- package/dist/Musket.js +0 -13
- package/dist/Providers/ConsoleServiceProvider.cjs +0 -904
- package/dist/Providers/ConsoleServiceProvider.js +0 -15
- package/dist/Signature.cjs +0 -172
- package/dist/Signature.js +0 -7
- package/dist/chunk-2O2AYFAG.js +0 -63
- package/dist/chunk-3FVPHQCH.js +0 -151
- package/dist/chunk-3VCNSA6P.js +0 -14
- package/dist/chunk-3WHUADTN.js +0 -6
- package/dist/chunk-6OCHCPBP.js +0 -36
- package/dist/chunk-CTQ6DUT2.js +0 -8
- package/dist/chunk-E5XIGIEX.js +0 -14
- package/dist/chunk-FOSDCKCR.js +0 -106
- package/dist/chunk-GVGO5OAK.js +0 -8
- package/dist/chunk-GXRCTWKL.js +0 -16
- package/dist/chunk-HVKW7JK4.js +0 -8
- package/dist/chunk-IGEFNODG.js +0 -22
- package/dist/chunk-JXL4VJHZ.js +0 -36
- package/dist/chunk-KMIFCLXG.js +0 -16
- package/dist/chunk-M4ZRDJJ2.js +0 -68
- package/dist/chunk-MAQAT3PU.js +0 -32
- package/dist/chunk-NADN2PHB.js +0 -0
- package/dist/chunk-O45AB4MX.js +0 -83
- package/dist/chunk-P7M5PEDY.js +0 -18
- package/dist/chunk-PMV4TMFS.js +0 -151
- package/dist/chunk-POF4JGTX.js +0 -186
- package/dist/chunk-RRP7K5LI.js +0 -36
- package/dist/chunk-SHUYVCID.js +0 -6
- package/dist/chunk-SP4JKAUC.js +0 -63
- package/dist/chunk-TJZCDDEV.js +0 -36
- package/dist/chunk-TN5SV7LF.js +0 -133
- package/dist/chunk-U6TOLKGJ.js +0 -22
- package/dist/chunk-UCOXL3OM.js +0 -0
- package/dist/chunk-URLTFJET.js +0 -68
- package/dist/chunk-XCOSZXAE.js +0 -133
- package/dist/chunk-XSL373TG.js +0 -36
- package/dist/chunk-YAYU7VOK.js +0 -8
- package/dist/chunk-ZTIO25VB.js +0 -8
- package/dist/run.cjs +0 -929
- package/dist/run.js +0 -14
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConsoleServiceProvider
|
|
3
|
-
} from "../chunk-U6TOLKGJ.js";
|
|
4
|
-
import "../chunk-M4ZRDJJ2.js";
|
|
5
|
-
import "../chunk-XCOSZXAE.js";
|
|
6
|
-
import "../chunk-FOSDCKCR.js";
|
|
7
|
-
import "../chunk-2O2AYFAG.js";
|
|
8
|
-
import "../chunk-3FVPHQCH.js";
|
|
9
|
-
import "../chunk-PMV4TMFS.js";
|
|
10
|
-
import "../chunk-POF4JGTX.js";
|
|
11
|
-
import "../chunk-O45AB4MX.js";
|
|
12
|
-
import "../chunk-SHUYVCID.js";
|
|
13
|
-
export {
|
|
14
|
-
ConsoleServiceProvider
|
|
15
|
-
};
|
package/dist/Signature.cjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/Signature.ts
|
|
22
|
-
var Signature_exports = {};
|
|
23
|
-
__export(Signature_exports, {
|
|
24
|
-
Signature: () => Signature
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(Signature_exports);
|
|
27
|
-
var Signature = class _Signature {
|
|
28
|
-
static {
|
|
29
|
-
__name(this, "Signature");
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Helper to parse options inside a block of text
|
|
33
|
-
*
|
|
34
|
-
* @param block
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
static parseOptions(block) {
|
|
38
|
-
const options = [];
|
|
39
|
-
const regex = /\{([^{}]+(?:\{[^{}]*\}[^{}]*)*)\}/g;
|
|
40
|
-
let match;
|
|
41
|
-
while ((match = regex.exec(block)) !== null) {
|
|
42
|
-
const shared = "^" === match[1][0] || /:[#^]/.test(match[1]);
|
|
43
|
-
const isHidden = ([
|
|
44
|
-
"#",
|
|
45
|
-
"^"
|
|
46
|
-
].includes(match[1][0]) || /:[#^]/.test(match[1])) && !shared;
|
|
47
|
-
const content = match[1].trim().replace(/[#^]/, "");
|
|
48
|
-
const colonIndex = content.indexOf(":");
|
|
49
|
-
if (colonIndex === -1) {
|
|
50
|
-
options.push({
|
|
51
|
-
name: content
|
|
52
|
-
});
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
const namePart = content.substring(0, colonIndex).trim();
|
|
56
|
-
let rest = content.substring(colonIndex + 1).trim();
|
|
57
|
-
let description = rest;
|
|
58
|
-
let nestedOptions;
|
|
59
|
-
const pipeIndex = rest.indexOf("|");
|
|
60
|
-
if (pipeIndex !== -1) {
|
|
61
|
-
description = rest.substring(0, pipeIndex).trim();
|
|
62
|
-
const nestedText = rest.substring(pipeIndex + 1).trim();
|
|
63
|
-
const cleanedNestedText = nestedText.replace(/^\{/, "").trim();
|
|
64
|
-
nestedOptions = _Signature.parseOptions("{" + cleanedNestedText + "}");
|
|
65
|
-
} else {
|
|
66
|
-
description = description.trim();
|
|
67
|
-
}
|
|
68
|
-
let name = namePart;
|
|
69
|
-
let required = /[^a-zA-Z0-9_|-]/.test(name);
|
|
70
|
-
let multiple = false;
|
|
71
|
-
if (name.endsWith("?*")) {
|
|
72
|
-
required = false;
|
|
73
|
-
multiple = true;
|
|
74
|
-
name = name.slice(0, -2);
|
|
75
|
-
} else if (name.endsWith("*")) {
|
|
76
|
-
multiple = true;
|
|
77
|
-
name = name.slice(0, -1);
|
|
78
|
-
} else if (name.endsWith("?")) {
|
|
79
|
-
required = false;
|
|
80
|
-
name = name.slice(0, -1);
|
|
81
|
-
}
|
|
82
|
-
const isFlag = name.startsWith("--");
|
|
83
|
-
let flags;
|
|
84
|
-
let defaultValue;
|
|
85
|
-
if (isFlag) {
|
|
86
|
-
const flagParts = name.split("|").map((s) => s.trim());
|
|
87
|
-
flags = [];
|
|
88
|
-
for (let part of flagParts) {
|
|
89
|
-
if (part.startsWith("--") && part.slice(2).length === 1) {
|
|
90
|
-
part = "-" + part.slice(2);
|
|
91
|
-
} else if (part.startsWith("-") && !part.startsWith("--") && part.slice(1).length > 1) {
|
|
92
|
-
part = "--" + part.slice(1);
|
|
93
|
-
} else if (!part.startsWith("-") && part.slice(1).length > 1) {
|
|
94
|
-
part = "--" + part;
|
|
95
|
-
}
|
|
96
|
-
const eqIndex = part.indexOf("=");
|
|
97
|
-
if (eqIndex !== -1) {
|
|
98
|
-
flags.push(part.substring(0, eqIndex));
|
|
99
|
-
const val = part.substring(eqIndex + 1);
|
|
100
|
-
if (val === "*") {
|
|
101
|
-
defaultValue = [];
|
|
102
|
-
} else if (val === "true" || val === "false" || !val && !required) {
|
|
103
|
-
defaultValue = val === "true";
|
|
104
|
-
} else if (!isNaN(Number(val))) {
|
|
105
|
-
defaultValue = Number(val);
|
|
106
|
-
} else {
|
|
107
|
-
defaultValue = val;
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
flags.push(part);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
options.push({
|
|
115
|
-
name: isFlag ? flags[flags.length - 1] : name,
|
|
116
|
-
required,
|
|
117
|
-
multiple,
|
|
118
|
-
description,
|
|
119
|
-
flags,
|
|
120
|
-
shared,
|
|
121
|
-
isFlag,
|
|
122
|
-
isHidden,
|
|
123
|
-
defaultValue,
|
|
124
|
-
nestedOptions
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
return options;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Helper to parse a command's signature
|
|
131
|
-
*
|
|
132
|
-
* @param signature
|
|
133
|
-
* @param commandClass
|
|
134
|
-
* @returns
|
|
135
|
-
*/
|
|
136
|
-
static parseSignature(signature, commandClass) {
|
|
137
|
-
const lines = signature.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
|
|
138
|
-
const isHidden = [
|
|
139
|
-
"#",
|
|
140
|
-
"^"
|
|
141
|
-
].includes(lines[0][0]) || /:[#^]/.test(lines[0]);
|
|
142
|
-
const baseCommand = lines[0].replace(/[^\w=:-]/g, "");
|
|
143
|
-
const description = commandClass.getDescription();
|
|
144
|
-
const isNamespaceCommand = baseCommand.endsWith(":");
|
|
145
|
-
const rest = lines.slice(1).join(" ");
|
|
146
|
-
const allOptions = _Signature.parseOptions(rest);
|
|
147
|
-
if (isNamespaceCommand) {
|
|
148
|
-
return {
|
|
149
|
-
baseCommand: baseCommand.slice(0, -1),
|
|
150
|
-
isNamespaceCommand,
|
|
151
|
-
subCommands: allOptions.filter((e) => !e.flags && !e.isHidden),
|
|
152
|
-
description,
|
|
153
|
-
commandClass,
|
|
154
|
-
options: allOptions.filter((e) => !!e.flags),
|
|
155
|
-
isHidden
|
|
156
|
-
};
|
|
157
|
-
} else {
|
|
158
|
-
return {
|
|
159
|
-
baseCommand,
|
|
160
|
-
isNamespaceCommand,
|
|
161
|
-
options: allOptions,
|
|
162
|
-
description,
|
|
163
|
-
commandClass,
|
|
164
|
-
isHidden
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
170
|
-
0 && (module.exports = {
|
|
171
|
-
Signature
|
|
172
|
-
});
|
package/dist/Signature.js
DELETED
package/dist/chunk-2O2AYFAG.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Command
|
|
3
|
-
} from "./chunk-O45AB4MX.js";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-SHUYVCID.js";
|
|
7
|
-
|
|
8
|
-
// src/Commands/ServeCommand.ts
|
|
9
|
-
import { spawn } from "child_process";
|
|
10
|
-
var ServeCommand = class extends Command {
|
|
11
|
-
static {
|
|
12
|
-
__name(this, "ServeCommand");
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The name and signature of the console command.
|
|
16
|
-
*
|
|
17
|
-
* @var string
|
|
18
|
-
*/
|
|
19
|
-
signature = "serve";
|
|
20
|
-
/**
|
|
21
|
-
* The console command description.
|
|
22
|
-
*
|
|
23
|
-
* @var string
|
|
24
|
-
*/
|
|
25
|
-
description = "Start the Developement Server";
|
|
26
|
-
async handle() {
|
|
27
|
-
try {
|
|
28
|
-
await this.serve();
|
|
29
|
-
} catch (e) {
|
|
30
|
-
this.kernel.output.error(e);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async serve() {
|
|
34
|
-
const child = spawn("tsup-node", {
|
|
35
|
-
stdio: "inherit",
|
|
36
|
-
shell: true,
|
|
37
|
-
env: Object.assign({}, process.env, {
|
|
38
|
-
NODE_ENV: "development"
|
|
39
|
-
}),
|
|
40
|
-
detached: true
|
|
41
|
-
});
|
|
42
|
-
const cleanup = /* @__PURE__ */ __name(() => {
|
|
43
|
-
console.log(111111);
|
|
44
|
-
if (child.pid) {
|
|
45
|
-
process.kill(child.pid, "SIGTERM");
|
|
46
|
-
}
|
|
47
|
-
}, "cleanup");
|
|
48
|
-
process.on("SIGINT", () => child.kill("SIGINT"));
|
|
49
|
-
process.on("SIGTERM", () => child.kill("SIGTERM"));
|
|
50
|
-
process.on("SIGINT", () => {
|
|
51
|
-
cleanup();
|
|
52
|
-
process.exit(0);
|
|
53
|
-
});
|
|
54
|
-
process.on("SIGTERM", () => {
|
|
55
|
-
cleanup();
|
|
56
|
-
process.exit(0);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
ServeCommand
|
|
63
|
-
};
|
package/dist/chunk-3FVPHQCH.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-SHUYVCID.js";
|
|
4
|
-
|
|
5
|
-
// src/Signature.ts
|
|
6
|
-
var Signature = class _Signature {
|
|
7
|
-
static {
|
|
8
|
-
__name(this, "Signature");
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Helper to parse options inside a block of text
|
|
12
|
-
*
|
|
13
|
-
* @param block
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
static parseOptions(block) {
|
|
17
|
-
const options = [];
|
|
18
|
-
const regex = /\{([^{}]+(?:\{[^{}]*\}[^{}]*)*)\}/g;
|
|
19
|
-
let match;
|
|
20
|
-
while ((match = regex.exec(block)) !== null) {
|
|
21
|
-
const shared = "^" === match[1][0] || /:[#^]/.test(match[1]);
|
|
22
|
-
const isHidden = ([
|
|
23
|
-
"#",
|
|
24
|
-
"^"
|
|
25
|
-
].includes(match[1][0]) || /:[#^]/.test(match[1])) && !shared;
|
|
26
|
-
const content = match[1].trim().replace(/[#^]/, "");
|
|
27
|
-
const colonIndex = content.indexOf(":");
|
|
28
|
-
if (colonIndex === -1) {
|
|
29
|
-
options.push({
|
|
30
|
-
name: content
|
|
31
|
-
});
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
const namePart = content.substring(0, colonIndex).trim();
|
|
35
|
-
let rest = content.substring(colonIndex + 1).trim();
|
|
36
|
-
let description = rest;
|
|
37
|
-
let nestedOptions;
|
|
38
|
-
const pipeIndex = rest.indexOf("|");
|
|
39
|
-
if (pipeIndex !== -1) {
|
|
40
|
-
description = rest.substring(0, pipeIndex).trim();
|
|
41
|
-
const nestedText = rest.substring(pipeIndex + 1).trim();
|
|
42
|
-
const cleanedNestedText = nestedText.replace(/^\{/, "").trim();
|
|
43
|
-
nestedOptions = _Signature.parseOptions("{" + cleanedNestedText + "}");
|
|
44
|
-
} else {
|
|
45
|
-
description = description.trim();
|
|
46
|
-
}
|
|
47
|
-
let name = namePart;
|
|
48
|
-
let required = /[^a-zA-Z0-9_|-]/.test(name);
|
|
49
|
-
let multiple = false;
|
|
50
|
-
if (name.endsWith("?*")) {
|
|
51
|
-
required = false;
|
|
52
|
-
multiple = true;
|
|
53
|
-
name = name.slice(0, -2);
|
|
54
|
-
} else if (name.endsWith("*")) {
|
|
55
|
-
multiple = true;
|
|
56
|
-
name = name.slice(0, -1);
|
|
57
|
-
} else if (name.endsWith("?")) {
|
|
58
|
-
required = false;
|
|
59
|
-
name = name.slice(0, -1);
|
|
60
|
-
}
|
|
61
|
-
const isFlag = name.startsWith("--");
|
|
62
|
-
let flags;
|
|
63
|
-
let defaultValue;
|
|
64
|
-
if (isFlag) {
|
|
65
|
-
const flagParts = name.split("|").map((s) => s.trim());
|
|
66
|
-
flags = [];
|
|
67
|
-
for (let part of flagParts) {
|
|
68
|
-
if (part.startsWith("--") && part.slice(2).length === 1) {
|
|
69
|
-
part = "-" + part.slice(2);
|
|
70
|
-
} else if (part.startsWith("-") && !part.startsWith("--") && part.slice(1).length > 1) {
|
|
71
|
-
part = "--" + part.slice(1);
|
|
72
|
-
} else if (!part.startsWith("-") && part.slice(1).length > 1) {
|
|
73
|
-
part = "--" + part;
|
|
74
|
-
}
|
|
75
|
-
const eqIndex = part.indexOf("=");
|
|
76
|
-
if (eqIndex !== -1) {
|
|
77
|
-
flags.push(part.substring(0, eqIndex));
|
|
78
|
-
const val = part.substring(eqIndex + 1);
|
|
79
|
-
if (val === "*") {
|
|
80
|
-
defaultValue = [];
|
|
81
|
-
} else if (val === "true" || val === "false" || !val && !required) {
|
|
82
|
-
defaultValue = val === "true";
|
|
83
|
-
} else if (!isNaN(Number(val))) {
|
|
84
|
-
defaultValue = Number(val);
|
|
85
|
-
} else {
|
|
86
|
-
defaultValue = val;
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
flags.push(part);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
options.push({
|
|
94
|
-
name: isFlag ? flags[flags.length - 1] : name,
|
|
95
|
-
required,
|
|
96
|
-
multiple,
|
|
97
|
-
description,
|
|
98
|
-
flags,
|
|
99
|
-
shared,
|
|
100
|
-
isFlag,
|
|
101
|
-
isHidden,
|
|
102
|
-
defaultValue,
|
|
103
|
-
nestedOptions
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return options;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Helper to parse a command's signature
|
|
110
|
-
*
|
|
111
|
-
* @param signature
|
|
112
|
-
* @param commandClass
|
|
113
|
-
* @returns
|
|
114
|
-
*/
|
|
115
|
-
static parseSignature(signature, commandClass) {
|
|
116
|
-
const lines = signature.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
|
|
117
|
-
const isHidden = [
|
|
118
|
-
"#",
|
|
119
|
-
"^"
|
|
120
|
-
].includes(lines[0][0]) || /:[#^]/.test(lines[0]);
|
|
121
|
-
const baseCommand = lines[0].replace(/[^\w=:-]/g, "");
|
|
122
|
-
const description = commandClass.getDescription();
|
|
123
|
-
const isNamespaceCommand = baseCommand.endsWith(":");
|
|
124
|
-
const rest = lines.slice(1).join(" ");
|
|
125
|
-
const allOptions = _Signature.parseOptions(rest);
|
|
126
|
-
if (isNamespaceCommand) {
|
|
127
|
-
return {
|
|
128
|
-
baseCommand: baseCommand.slice(0, -1),
|
|
129
|
-
isNamespaceCommand,
|
|
130
|
-
subCommands: allOptions.filter((e) => !e.flags && !e.isHidden),
|
|
131
|
-
description,
|
|
132
|
-
commandClass,
|
|
133
|
-
options: allOptions.filter((e) => !!e.flags),
|
|
134
|
-
isHidden
|
|
135
|
-
};
|
|
136
|
-
} else {
|
|
137
|
-
return {
|
|
138
|
-
baseCommand,
|
|
139
|
-
isNamespaceCommand,
|
|
140
|
-
options: allOptions,
|
|
141
|
-
description,
|
|
142
|
-
commandClass,
|
|
143
|
-
isHidden
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export {
|
|
150
|
-
Signature
|
|
151
|
-
};
|
package/dist/chunk-3VCNSA6P.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConsoleServiceProvider
|
|
3
|
-
} from "./chunk-U6TOLKGJ.js";
|
|
4
|
-
|
|
5
|
-
// src/IO/providers.ts
|
|
6
|
-
import { DatabaseServiceProvider } from "@h3ravel/database";
|
|
7
|
-
var providers_default = [
|
|
8
|
-
DatabaseServiceProvider,
|
|
9
|
-
ConsoleServiceProvider
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
providers_default
|
|
14
|
-
};
|
package/dist/chunk-3WHUADTN.js
DELETED
package/dist/chunk-6OCHCPBP.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
providers_default
|
|
3
|
-
} from "./chunk-E5XIGIEX.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
|
-
};
|
package/dist/chunk-CTQ6DUT2.js
DELETED
package/dist/chunk-E5XIGIEX.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConsoleServiceProvider
|
|
3
|
-
} from "./chunk-IGEFNODG.js";
|
|
4
|
-
|
|
5
|
-
// src/IO/providers.ts
|
|
6
|
-
import { DatabaseServiceProvider } from "@h3ravel/database";
|
|
7
|
-
var providers_default = [
|
|
8
|
-
DatabaseServiceProvider,
|
|
9
|
-
ConsoleServiceProvider
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
providers_default
|
|
14
|
-
};
|
package/dist/chunk-FOSDCKCR.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Command
|
|
3
|
-
} from "./chunk-O45AB4MX.js";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-SHUYVCID.js";
|
|
7
|
-
|
|
8
|
-
// src/Commands/MigrateCommand.ts
|
|
9
|
-
import { arquebus } from "@h3ravel/arquebus";
|
|
10
|
-
var MigrateCommand = class extends Command {
|
|
11
|
-
static {
|
|
12
|
-
__name(this, "MigrateCommand");
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The name and signature of the console command.
|
|
16
|
-
*
|
|
17
|
-
* @var string
|
|
18
|
-
*/
|
|
19
|
-
signature = `migrate:
|
|
20
|
-
{fresh : Drop all tables and re-run all migrations.}
|
|
21
|
-
{install : Create the migration repository.}
|
|
22
|
-
{refresh : Reset and re-run all migrations.}
|
|
23
|
-
{reset : Rollback all database migrations.}
|
|
24
|
-
{rollback : Rollback the last database migration.}
|
|
25
|
-
{status : Show the status of each migration.}
|
|
26
|
-
{publish : Publish any migration files from installed packages.}
|
|
27
|
-
{^--s|seed : Seed the database}
|
|
28
|
-
`;
|
|
29
|
-
/**
|
|
30
|
-
* The console command description.
|
|
31
|
-
*
|
|
32
|
-
* @var string
|
|
33
|
-
*/
|
|
34
|
-
description = "Run all pending migrations.";
|
|
35
|
-
/**
|
|
36
|
-
* Execute the console command.
|
|
37
|
-
*/
|
|
38
|
-
async handle() {
|
|
39
|
-
const command = this.dictionary.name ?? this.dictionary.baseCommand;
|
|
40
|
-
const methods = {
|
|
41
|
-
migrate: "migrateRun",
|
|
42
|
-
fresh: "migrateFresh",
|
|
43
|
-
install: "migrateInstall",
|
|
44
|
-
refresh: "migrateRefresh",
|
|
45
|
-
reset: "migrateReset",
|
|
46
|
-
rollback: "migrateRollback",
|
|
47
|
-
status: "migrateStatus",
|
|
48
|
-
publish: "migratePublish"
|
|
49
|
-
};
|
|
50
|
-
await this?.[methods[command]]();
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Run all pending migrations.
|
|
54
|
-
*/
|
|
55
|
-
async migrateRun() {
|
|
56
|
-
this.kernel.output.success(`Running migrations are not yet supported.`);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Drop all tables and re-run all migrations.
|
|
60
|
-
*/
|
|
61
|
-
async migrateFresh() {
|
|
62
|
-
this.kernel.output.success(`Drop all tables and re-run all migrations.`);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Create the migration repository.
|
|
66
|
-
*/
|
|
67
|
-
async migrateInstall() {
|
|
68
|
-
this.kernel.output.success(`Create the migration repository.`);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Reset and re-run all migrations.
|
|
72
|
-
*/
|
|
73
|
-
async migrateRefresh() {
|
|
74
|
-
this.kernel.output.success(`Resetting and re-running migrations is not yet supported.`);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Rollback all database migrations.
|
|
78
|
-
*/
|
|
79
|
-
async migrateReset() {
|
|
80
|
-
this.kernel.output.success(`Rolling back all migration is not yet supported.`);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Rollback the last database migration.
|
|
84
|
-
*/
|
|
85
|
-
async migrateRollback() {
|
|
86
|
-
this.kernel.output.success(`Rolling back the last migration is not yet supported.`);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Show the status of each migration.
|
|
90
|
-
*/
|
|
91
|
-
async migrateStatus() {
|
|
92
|
-
const path = app_path();
|
|
93
|
-
console.log(arquebus.connection());
|
|
94
|
-
this.kernel.output.success(`Show the status of each migration.`);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Publish any migration files from installed packages.
|
|
98
|
-
*/
|
|
99
|
-
async migratePublish() {
|
|
100
|
-
this.kernel.output.success(`Publish any migration files from installed packages.`);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export {
|
|
105
|
-
MigrateCommand
|
|
106
|
-
};
|
package/dist/chunk-GVGO5OAK.js
DELETED
package/dist/chunk-GXRCTWKL.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConsoleServiceProvider
|
|
3
|
-
} from "./chunk-U6TOLKGJ.js";
|
|
4
|
-
|
|
5
|
-
// src/IO/providers.ts
|
|
6
|
-
import { ConfigServiceProvider } from "@h3ravel/config";
|
|
7
|
-
import { DatabaseServiceProvider } from "@h3ravel/database";
|
|
8
|
-
var providers_default = [
|
|
9
|
-
ConfigServiceProvider,
|
|
10
|
-
DatabaseServiceProvider,
|
|
11
|
-
ConsoleServiceProvider
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
providers_default
|
|
16
|
-
};
|
package/dist/chunk-HVKW7JK4.js
DELETED
package/dist/chunk-IGEFNODG.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Kernel
|
|
3
|
-
} from "./chunk-URLTFJET.js";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-SHUYVCID.js";
|
|
7
|
-
|
|
8
|
-
// src/Providers/ConsoleServiceProvider.ts
|
|
9
|
-
import { ServiceProvider } from "@h3ravel/core";
|
|
10
|
-
var ConsoleServiceProvider = class extends ServiceProvider {
|
|
11
|
-
static {
|
|
12
|
-
__name(this, "ConsoleServiceProvider");
|
|
13
|
-
}
|
|
14
|
-
static priority = 992;
|
|
15
|
-
register() {
|
|
16
|
-
Kernel.init(this.app);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
ConsoleServiceProvider
|
|
22
|
-
};
|
package/dist/chunk-JXL4VJHZ.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
providers_default
|
|
3
|
-
} from "./chunk-P7M5PEDY.js";
|
|
4
|
-
import {
|
|
5
|
-
Kernel
|
|
6
|
-
} from "./chunk-M4ZRDJJ2.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
|
-
};
|