@arkstack/console 0.18.10 → 0.18.11

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.
@@ -3,7 +3,6 @@ import { existsSync } from "node:fs";
3
3
  import path, { join } from "node:path";
4
4
  import { Arkstack } from "@arkstack/contract";
5
5
  import { CliApp, applyRuntimeConfig, getDefaultConfig } from "resora";
6
- import { disposeArkormRuntime } from "arkormx";
7
6
 
8
7
  //#region dist/config.js
9
8
  const defaultConfig = (app) => {
@@ -34,6 +33,7 @@ var ArkstackConsoleApp = class extends CliApp {
34
33
  }
35
34
  registerMusketListeners(musket) {
36
35
  musket.afterHandle.on(async () => {
36
+ const { disposeArkormRuntime } = await import("arkormx");
37
37
  await disposeArkormRuntime();
38
38
  process.exit(0);
39
39
  });
package/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as ArkstackConsoleApp } from "./app-PTVpM6JK.js";
1
+ import { t as ArkstackConsoleApp } from "./app-CRl3y16D.js";
2
2
 
3
3
  export { ArkstackConsoleApp };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { t as ArkstackConsoleApp } from "./app-PTVpM6JK.js";
2
+ import { t as ArkstackConsoleApp } from "./app-CRl3y16D.js";
3
3
  import { n as loadPackageSetups, t as groupPublishables } from "./helpers-BfDN6Q79.js";
4
4
  import { n as BaseTCConfig, r as TSConfig, t as BuildInterfaces } from "./BuildInterfaces-BeMseJhx.js";
5
5
  import { createRequire } from "node:module";
6
- import { Publisher, abort, abortIf, assertFound, config as config$1, discoverCommands, env, importFile, initializeGlobalContext, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
6
+ import { Logger, Publisher, abort, abortIf, assertFound, config as config$1, discoverCommands, env, importFile, initializeGlobalContext, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
7
7
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
8
8
  import { fileURLToPath, pathToFileURL } from "node:url";
9
9
  import path, { dirname, join } from "node:path";
@@ -265,10 +265,13 @@ var MakeController = class extends Command {
265
265
  this.app.command = this;
266
266
  if (!this.argument("name")) return void this.error("Error: Controller name is required.");
267
267
  const name = this.app.makeController(this.argument("name"), this.options());
268
- const { CliApp } = await import("arkormx");
269
- const app = new CliApp();
270
- app.command = this;
271
- const model = this.option("model") ? app.makeModel(this.option("model"), this.options()) : null;
268
+ let model = {};
269
+ try {
270
+ const { CliApp } = await import("arkormx");
271
+ const app = new CliApp();
272
+ app.command = this;
273
+ model = this.option("model") ? app.makeModel(this.option("model"), this.options()) : null;
274
+ } catch {}
272
275
  this.success("Controller created successfully!");
273
276
  [
274
277
  ["Controller", name],
@@ -276,7 +279,7 @@ var MakeController = class extends Command {
276
279
  model?.factory ? ["Factory", model.factory.path] : "",
277
280
  model?.seeder ? ["Seeder", model.seeder.path] : "",
278
281
  model?.migration ? ["Migration", model.migration.path] : ""
279
- ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name, path)));
282
+ ].filter(Boolean).map(([name, path]) => this.success(Logger.splitLogger(name, path)));
280
283
  }
281
284
  };
282
285
 
@@ -309,12 +312,15 @@ var MakeFullResource = class extends Command {
309
312
  api: true,
310
313
  force: this.option("force")
311
314
  }));
312
- const { CliApp } = await import("arkormx");
313
- const app = new CliApp();
314
- const model = this.option("model") ? app.makeModel(this.argument("prefix"), {
315
- ...this.options(),
316
- force: false
317
- }) : null;
315
+ let model = {};
316
+ try {
317
+ const { CliApp } = await import("arkormx");
318
+ const app = new CliApp();
319
+ model = this.option("model") ? app.makeModel(this.argument("prefix"), {
320
+ ...this.options(),
321
+ force: false
322
+ }) : null;
323
+ } catch {}
318
324
  this.success("Created full resource set:");
319
325
  [
320
326
  ["Resource", res.path],
@@ -324,7 +330,7 @@ var MakeFullResource = class extends Command {
324
330
  model?.factory ? ["Factory", model.factory.path] : "",
325
331
  model?.seeder ? ["Seeder", model.seeder.path] : "",
326
332
  model?.migration ? ["Migration", model.migration.path] : ""
327
- ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name, path)));
333
+ ].filter(Boolean).map(([name, path]) => this.success(Logger.splitLogger(name, path)));
328
334
  }
329
335
  };
330
336
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console",
3
- "version": "0.18.10",
3
+ "version": "0.18.11",
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",
@@ -42,7 +42,7 @@
42
42
  "peerDependencies": {
43
43
  "arkormx": "^2.12.8",
44
44
  "clear-router": "^2.9.3",
45
- "@arkstack/database": "^0.18.10"
45
+ "@arkstack/database": "^0.18.11"
46
46
  },
47
47
  "dependencies": {
48
48
  "@ngrok/ngrok": "^1.7.0",
@@ -51,8 +51,8 @@
51
51
  "chalk": "^5.6.2",
52
52
  "resora": "^1.3.34",
53
53
  "ts-morph": "^28.0.0",
54
- "@arkstack/common": "^0.18.10",
55
- "@arkstack/contract": "^0.18.10"
54
+ "@arkstack/common": "^0.18.11",
55
+ "@arkstack/contract": "^0.18.11"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@arkstack/database": {