@arkstack/console-slim 0.12.36 → 0.12.37

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 (2) hide show
  1. package/dist/index.js +5 -11
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as ArkstackConsoleApp } from "./app-6GsnmZ2-.js";
3
- import { config, env, importFile, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
3
+ import { config, discoverCommands, env, importFile, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
4
4
  import { existsSync, realpathSync } from "node:fs";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import path, { join } from "node:path";
@@ -236,12 +236,12 @@ const loadCoreApp = async () => {
236
236
  const runConsoleKernel = async (options = {}) => {
237
237
  loadPrototypes();
238
238
  const app = await loadCoreApp();
239
- const dist = path.relative(Arkstack.rootDir(), outputDir());
240
239
  const stubsDir = process.env.ARKSTACK_STUBS_DIR;
241
240
  globalThis.app = () => app;
242
241
  globalThis.env = env;
243
242
  globalThis.config = config;
244
243
  globalThis.arkctx = { runtime: "CLI" };
244
+ const userCommands = await discoverCommands();
245
245
  await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {
246
246
  logo: options.logo ?? logo_default,
247
247
  name: "Cmd",
@@ -252,16 +252,10 @@ const runConsoleKernel = async (options = {}) => {
252
252
  MakeFullResource,
253
253
  DevCommand,
254
254
  BuildCommand,
255
- MakeCommand
256
- ],
257
- discoveryPaths: [
258
- join(Arkstack.rootDir(), "src", "app", "console", "commands/*.js"),
259
- join(Arkstack.rootDir(), "src", "app/console/commands/*.js"),
260
- join(Arkstack.rootDir(), "src", "app/console/commands/*.mjs"),
261
- join(Arkstack.rootDir(), dist, "app/console/commands/*.js"),
262
- join(Arkstack.rootDir(), dist, "app/console/commands/*.mjs"),
263
- join(Arkstack.rootDir(), "node_modules", "@arkstack/*", "dist", "commands", "*.js")
255
+ MakeCommand,
256
+ ...userCommands
264
257
  ],
258
+ discoveryPaths: [join(Arkstack.rootDir(), "node_modules", "@arkstack/*", "dist", "commands", "*.js")],
265
259
  exceptionHandler(exception) {
266
260
  throw exception;
267
261
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console-slim",
3
- "version": "0.12.36",
3
+ "version": "0.12.37",
4
4
  "type": "module",
5
5
  "description": "Slim console module for Arkstack, providing the command-line runtime and console integration layer.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -48,8 +48,8 @@
48
48
  "@h3ravel/musket": "^2.0.0",
49
49
  "chalk": "^5.6.2",
50
50
  "resora": "^1.3.25",
51
- "@arkstack/contract": "^0.12.36",
52
- "@arkstack/common": "^0.12.36"
51
+ "@arkstack/common": "^0.12.37",
52
+ "@arkstack/contract": "^0.12.37"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsdown",