@arkstack/console 0.1.30 → 0.2.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/dist/app.d.ts +0 -10
- package/dist/index.d.ts +0 -5
- package/dist/index.js +10 -5
- package/package.json +4 -4
package/dist/app.d.ts
CHANGED
|
@@ -21,17 +21,7 @@ declare class ArkstackConsoleApp<TCore extends Core> extends CliApp {
|
|
|
21
21
|
private readonly options;
|
|
22
22
|
constructor(core: TCore, options: ConsoleAppOptions);
|
|
23
23
|
makeController: (name: string, opts: any) => string;
|
|
24
|
-
/**
|
|
25
|
-
* Normalize a file path by removing the current working directory from it.
|
|
26
|
-
*
|
|
27
|
-
* @param p
|
|
28
|
-
* @returns
|
|
29
|
-
*/
|
|
30
24
|
normalizePath: (p: string) => string;
|
|
31
|
-
/**
|
|
32
|
-
* Recursively merge defaultConfig with config from resora.config.js, giving
|
|
33
|
-
* precedence to resora.
|
|
34
|
-
*/
|
|
35
25
|
mergeConfig: () => void;
|
|
36
26
|
}
|
|
37
27
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
interface RunConsoleOptions {
|
|
3
3
|
logo?: string;
|
|
4
4
|
}
|
|
5
|
-
/**
|
|
6
|
-
* Runs the console kernel, initializing the application and registering commands.
|
|
7
|
-
*
|
|
8
|
-
* @param options
|
|
9
|
-
*/
|
|
10
5
|
declare const runConsoleKernel: (options?: RunConsoleOptions) => Promise<void>;
|
|
11
6
|
//#endregion
|
|
12
7
|
export { RunConsoleOptions, runConsoleKernel };
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var BuildCommand = class extends Command {
|
|
|
21
21
|
const child = spawn(process.platform === "win32" ? "pnpm.cmd" : "pnpm", ["exec", "tsdown"], {
|
|
22
22
|
cwd: process.cwd(),
|
|
23
23
|
stdio: "inherit",
|
|
24
|
-
env: Object.assign(
|
|
24
|
+
env: Object.assign(process.env, { NODE_ENV: "production" })
|
|
25
25
|
});
|
|
26
26
|
child.on("error", (error) => {
|
|
27
27
|
reject(error);
|
|
@@ -51,7 +51,8 @@ var DevCommand = class extends Command {
|
|
|
51
51
|
"silent"
|
|
52
52
|
], {
|
|
53
53
|
cwd: process.cwd(),
|
|
54
|
-
stdio: "inherit"
|
|
54
|
+
stdio: "inherit",
|
|
55
|
+
env: Object.assign(process.env, { NODE_ENV: "development" })
|
|
55
56
|
});
|
|
56
57
|
child.on("error", (error) => {
|
|
57
58
|
reject(error);
|
|
@@ -351,7 +352,9 @@ var logo_default = String.raw`
|
|
|
351
352
|
* @returns
|
|
352
353
|
*/
|
|
353
354
|
const loadCoreApp = async () => {
|
|
354
|
-
|
|
355
|
+
const module = await import(pathToFileURL(join(process.cwd(), "dist/core/bootstrap.js")).href);
|
|
356
|
+
globalThis.arkctx = { runtime: "CLI" };
|
|
357
|
+
return module.app;
|
|
355
358
|
};
|
|
356
359
|
/**
|
|
357
360
|
* Runs the console kernel, initializing the application and registering commands.
|
|
@@ -362,6 +365,7 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
362
365
|
loadPrototypes();
|
|
363
366
|
const app = await loadCoreApp();
|
|
364
367
|
const stubsDir = process.env.ARKSTACK_STUBS_DIR;
|
|
368
|
+
globalThis.app = () => app;
|
|
365
369
|
await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {
|
|
366
370
|
logo: options.logo ?? logo_default,
|
|
367
371
|
name: "Cmd",
|
|
@@ -384,9 +388,10 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
384
388
|
MigrationHistoryCommand$1
|
|
385
389
|
],
|
|
386
390
|
discoveryPaths: [
|
|
391
|
+
join(process.cwd(), "src", "app", "console", "commands/*.js"),
|
|
387
392
|
join(process.cwd(), "src", "app/console/commands/*.js"),
|
|
388
|
-
join(process.cwd(), "src", "app/console/commands/*.
|
|
389
|
-
join(process.cwd(), "
|
|
393
|
+
join(process.cwd(), "src", "app/console/commands/*.mjs"),
|
|
394
|
+
join(process.cwd(), "node_modules", "@arkstack/*", "dist", "commands", "*.js")
|
|
390
395
|
],
|
|
391
396
|
exceptionHandler(exception) {
|
|
392
397
|
throw exception;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Console package for Arkstack providing console-specific implementations of core Arkstack features such as routing, middleware, and database integration.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"clear-router": "^2.
|
|
45
|
+
"clear-router": "^2.3.3",
|
|
46
46
|
"arkormx": "^0.2.11"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@h3ravel/musket": "^0.10.1",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"resora": "^0.2.14",
|
|
52
|
-
"@arkstack/common": "^0.
|
|
53
|
-
"@arkstack/contract": "^0.
|
|
52
|
+
"@arkstack/common": "^0.2.0",
|
|
53
|
+
"@arkstack/contract": "^0.2.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|