@arkstack/console 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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as ArkstackConsoleApp } from "./app-DnaQWE9q.js";
3
3
  import { n as BaseTCConfig, r as TSConfig, t as BuildInterfaces } from "./BuildInterfaces-CsZ3Uerb.js";
4
- import { abort, abortIf, assertFound, config, env, importFile, initializeGlobalContext, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
4
+ import { abort, abortIf, assertFound, config, discoverCommands, env, importFile, initializeGlobalContext, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
5
5
  import { existsSync, realpathSync } from "node:fs";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import path, { join } from "node:path";
@@ -300,7 +300,6 @@ const loadCoreApp = async () => {
300
300
  const runConsoleKernel = async (options = {}) => {
301
301
  loadPrototypes();
302
302
  const app = await loadCoreApp();
303
- const dist = path.relative(Arkstack.rootDir(), outputDir());
304
303
  const stubsDir = process.env.ARKSTACK_STUBS_DIR;
305
304
  globalThis.app = () => app;
306
305
  globalThis.env = env;
@@ -311,6 +310,7 @@ const runConsoleKernel = async (options = {}) => {
311
310
  globalThis.assertFound = assertFound;
312
311
  globalThis.arkctx = { runtime: "CLI" };
313
312
  await initializeGlobalContext();
313
+ const userCommands = await discoverCommands();
314
314
  await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {
315
315
  logo: options.logo ?? logo_default,
316
316
  name: "Cmd",
@@ -321,16 +321,10 @@ const runConsoleKernel = async (options = {}) => {
321
321
  MakeFullResource,
322
322
  DevCommand,
323
323
  BuildCommand,
324
- MakeCommand
325
- ],
326
- discoveryPaths: [
327
- join(Arkstack.rootDir(), "src", "app", "console", "commands/*.js"),
328
- join(Arkstack.rootDir(), "src", "app/console/commands/*.js"),
329
- join(Arkstack.rootDir(), "src", "app/console/commands/*.mjs"),
330
- join(Arkstack.rootDir(), dist, "app/console/commands/*.js"),
331
- join(Arkstack.rootDir(), dist, "app/console/commands/*.mjs"),
332
- join(Arkstack.rootDir(), "node_modules", "@arkstack/*", "dist", "commands", "*.js")
324
+ MakeCommand,
325
+ ...userCommands
333
326
  ],
327
+ discoveryPaths: [join(Arkstack.rootDir(), "node_modules", "@arkstack/*", "dist", "commands", "*.js")],
334
328
  exceptionHandler(exception) {
335
329
  throw exception;
336
330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console",
3
- "version": "0.12.36",
3
+ "version": "0.12.37",
4
4
  "type": "module",
5
5
  "description": "Console module for Arkstack, providing the command-line runtime and console integration layer.",
6
6
  "homepage": "https://arkstack.toneflix.net/guide/cli",
@@ -51,8 +51,8 @@
51
51
  "chalk": "^5.6.2",
52
52
  "resora": "^1.3.25",
53
53
  "ts-morph": "^28.0.0",
54
- "@arkstack/common": "^0.12.36",
55
- "@arkstack/contract": "^0.12.36"
54
+ "@arkstack/common": "^0.12.37",
55
+ "@arkstack/contract": "^0.12.37"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",