@arkstack/console 0.17.18 → 0.17.20

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.
@@ -2,7 +2,7 @@ import { r as resolveStubsDir } from "./helpers-BfDN6Q79.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import path, { join } from "node:path";
4
4
  import { Arkstack } from "@arkstack/contract";
5
- import { CliApp } from "resora";
5
+ import { CliApp, applyRuntimeConfig, getDefaultConfig } from "resora";
6
6
  import { disposeArkormRuntime } from "arkormx";
7
7
 
8
8
  //#region dist/config.js
@@ -80,6 +80,7 @@ var ArkstackConsoleApp = class extends CliApp {
80
80
  */
81
81
  mergeConfig = () => {
82
82
  this.config = {
83
+ ...getDefaultConfig(),
83
84
  ...defaultConfig(this.core),
84
85
  ...this.config,
85
86
  stubs: {
@@ -87,6 +88,12 @@ var ArkstackConsoleApp = class extends CliApp {
87
88
  ...this.config?.stubs
88
89
  }
89
90
  };
91
+ try {
92
+ applyRuntimeConfig({
93
+ ...this.config,
94
+ ...config("resources", {})
95
+ });
96
+ } catch {}
90
97
  };
91
98
  };
92
99
 
package/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as ArkstackConsoleApp } from "./app-CJ5PtXEI.js";
1
+ import { t as ArkstackConsoleApp } from "./app-PTVpM6JK.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-CJ5PtXEI.js";
2
+ import { t as ArkstackConsoleApp } from "./app-PTVpM6JK.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, discoverCommands, env, importFile, initializeGlobalContext, loadPrototypes, outputDir, rebuildOutput } from "@arkstack/common";
6
+ import { 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";
@@ -70,10 +70,7 @@ var DevCommand = class DevCommand extends Command {
70
70
  domain: env("NGROK_DOMAIN")
71
71
  });
72
72
  const url = tunnel.url();
73
- if (url) {
74
- vars.TUNNEL_URL = url;
75
- console.log(`Traffic has been tunnelled to ${url}`);
76
- }
73
+ if (url) vars.TUNNEL_URL = url;
77
74
  }
78
75
  const [command, args] = bin ? [process.execPath, [
79
76
  bin,
@@ -296,6 +293,12 @@ var MakeFullResource = class extends Command {
296
293
  `;
297
294
  description = "Create a full new set of API resources (Controller, Resource, Collection)";
298
295
  async handle() {
296
+ try {
297
+ applyRuntimeConfig({
298
+ ...getDefaultConfig(),
299
+ ...config("resources", {})
300
+ });
301
+ } catch {}
299
302
  this.app.command = this;
300
303
  const res = this.app.makeResource(this.argument("prefix"), { force: this.option("force") });
301
304
  const col = this.app.makeResource(this.argument("prefix") + "Collection", {
@@ -332,7 +335,7 @@ var MakeResource$1 = class extends MakeResource {
332
335
  try {
333
336
  applyRuntimeConfig({
334
337
  ...getDefaultConfig(),
335
- ...config("resources", {})
338
+ ...config$1("resources", {})
336
339
  });
337
340
  } catch {}
338
341
  return super.handle();
@@ -617,7 +620,7 @@ const runConsoleKernel = async (options = {}) => {
617
620
  const stubsDir = process.env.ARKSTACK_STUBS_DIR;
618
621
  globalThis.app = () => app;
619
622
  globalThis.env = env;
620
- globalThis.config = config;
623
+ globalThis.config = config$1;
621
624
  globalThis.str = str;
622
625
  globalThis.abort = abort;
623
626
  globalThis.abortIf = abortIf;
package/dist/prepare.js CHANGED
@@ -73,6 +73,8 @@ var ArkormArtifacts = class ArkormArtifacts {
73
73
 
74
74
  //#endregion
75
75
  //#region dist/prepare.js
76
+ if (!globalThis.env) globalThis.env = (await import("@arkstack/common")).env;
77
+ if (!globalThis.config) globalThis.config = (await import("@arkstack/common")).config;
76
78
  if (!existsSync(path.join(Arkstack.rootDir(), ".arkstack/build"))) mkdirSync(path.join(Arkstack.rootDir(), ".arkstack/build"), { recursive: true });
77
79
  if (!process.env.NODE_CI) {
78
80
  BuildInterfaces.configs();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console",
3
- "version": "0.17.18",
3
+ "version": "0.17.20",
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.17.18"
45
+ "@arkstack/database": "^0.17.20"
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.17.18",
55
- "@arkstack/contract": "^0.17.18"
54
+ "@arkstack/common": "^0.17.20",
55
+ "@arkstack/contract": "^0.17.20"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@arkstack/database": {