@arkstack/console 0.14.3 → 0.14.14

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 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -95,10 +95,12 @@ var KeyGenerateCommand = class KeyGenerateCommand extends Command {
95
95
  signature = `key:generate
96
96
  {--show : Display the generated key instead of writing it to the .env file.}
97
97
  {--force : Overwrite the existing APP_KEY without confirmation.}
98
+ {--ignore : Ignore existing APP_KEY without confirmation.}
98
99
  `;
99
100
  description = "Set the application key (APP_KEY).";
100
101
  async handle() {
101
102
  const key = this.generateKey();
103
+ const ignore = this.option("ignore");
102
104
  if (this.option("show")) {
103
105
  this.line(key);
104
106
  return;
@@ -109,9 +111,9 @@ var KeyGenerateCommand = class KeyGenerateCommand extends Command {
109
111
  return;
110
112
  }
111
113
  const contents = readFileSync(envPath, "utf-8");
112
- if (KeyGenerateCommand.hasEnvValue(contents, "APP_KEY") && !this.option("force")) {
113
- if (!await this.confirm("An application key already exists. Overwrite it?", false)) {
114
- this.info("Application key generation aborted.");
114
+ if (KeyGenerateCommand.hasEnvValue(contents, "APP_KEY") && !this.option("force") || ignore) {
115
+ if (!(!ignore ? await this.confirm("An application key already exists. Overwrite it?", false) : false) || ignore) {
116
+ this.info(`Application key generation ${ignore ? "skipped" : "aborted"}.`);
115
117
  return;
116
118
  }
117
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console",
3
- "version": "0.14.3",
3
+ "version": "0.14.14",
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.26",
53
53
  "ts-morph": "^28.0.0",
54
- "@arkstack/common": "^0.14.3",
55
- "@arkstack/contract": "^0.14.3"
54
+ "@arkstack/common": "^0.14.14",
55
+ "@arkstack/contract": "^0.14.14"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",