@arkstack/console 0.3.5 → 0.3.7
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/index.js +6 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as ArkstackConsoleApp } from "./app-DtecNuLP.js";
|
|
3
|
+
import { config, env, loadPrototypes, outputDir } from "@arkstack/common";
|
|
3
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
-
import { loadPrototypes, outputDir } from "@arkstack/common";
|
|
5
5
|
import path, { join } from "node:path";
|
|
6
6
|
import { MakeResource } from "resora";
|
|
7
7
|
import { realpathSync } from "node:fs";
|
|
@@ -352,9 +352,8 @@ var logo_default = String.raw`
|
|
|
352
352
|
* @returns
|
|
353
353
|
*/
|
|
354
354
|
const loadCoreApp = async () => {
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
return module.app;
|
|
355
|
+
const dist = path.relative(process.cwd(), outputDir());
|
|
356
|
+
return (await import(pathToFileURL(join(process.cwd(), `${dist}/core/bootstrap.js`)).href)).app;
|
|
358
357
|
};
|
|
359
358
|
/**
|
|
360
359
|
* Runs the console kernel, initializing the application and registering commands.
|
|
@@ -367,6 +366,9 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
367
366
|
const dist = path.relative(process.cwd(), outputDir());
|
|
368
367
|
const stubsDir = process.env.ARKSTACK_STUBS_DIR;
|
|
369
368
|
globalThis.app = () => app;
|
|
369
|
+
globalThis.env = env;
|
|
370
|
+
globalThis.config = config;
|
|
371
|
+
globalThis.arkctx = { runtime: "CLI" };
|
|
370
372
|
await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {
|
|
371
373
|
logo: options.logo ?? logo_default,
|
|
372
374
|
name: "Cmd",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/console",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
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",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@h3ravel/musket": "^0.10.1",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"resora": "^0.2.14",
|
|
52
|
-
"@arkstack/common": "^0.3.
|
|
53
|
-
"@arkstack/contract": "^0.3.
|
|
52
|
+
"@arkstack/common": "^0.3.7",
|
|
53
|
+
"@arkstack/contract": "^0.3.7"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|