vortix-cli 0.1.0 → 0.1.1

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.
@@ -33,7 +33,8 @@ var en_default = {
33
33
  liveStart: "Live checks against {url} ({total})",
34
34
  liveRunning: "Live checks ({index}/{total}): {name}",
35
35
  liveDone: "Live checks done ({total})",
36
- liveNoUrl: "no live URL given \u2014 run `vortix check <url>` (or `vortix ci <url>`) to include this check"
36
+ liveNoUrl: "no live URL given \u2014 run `vortix check <url>` (or `vortix ci <url>`) to include this check",
37
+ aborted: "Aborted"
37
38
  },
38
39
  init: {
39
40
  intro: "Vortix init",
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getConfigPath,
6
6
  loadConfig,
7
7
  t
8
- } from "./chunk-KNVCFVGJ.js";
8
+ } from "./chunk-RJANEUUK.js";
9
9
 
10
10
  // src/commands/check.ts
11
11
  import * as p3 from "@clack/prompts";
@@ -2473,6 +2473,14 @@ function computeExitCode(findings, config) {
2473
2473
  }
2474
2474
  async function runVortix(config, onProgress = () => {
2475
2475
  }, liveUrl) {
2476
+ try {
2477
+ return await runVortixUnsafe(config, onProgress, liveUrl);
2478
+ } catch (error) {
2479
+ onProgress({ type: "aborted" });
2480
+ throw error;
2481
+ }
2482
+ }
2483
+ async function runVortixUnsafe(config, onProgress, liveUrl) {
2476
2484
  const adapter = resolveAdapter(config.cwd, config.target, config.build);
2477
2485
  const declaredOutputDir = path14.resolve(config.cwd, adapter.outputDir);
2478
2486
  if (config.build) {
@@ -2851,6 +2859,10 @@ function createProgressHandler(output) {
2851
2859
  case "live-done":
2852
2860
  if (event.total > 0) spin.stop(t("progress.liveDone", { total: event.total }));
2853
2861
  break;
2862
+ case "aborted":
2863
+ spin.error(t("progress.aborted"));
2864
+ bar?.error(t("progress.aborted"));
2865
+ break;
2854
2866
  }
2855
2867
  };
2856
2868
  }
@@ -3105,8 +3117,8 @@ program.command("ci").description(t("cli.ci.description")).argument("[url]", "Op
3105
3117
  await ciCommand({ url });
3106
3118
  });
3107
3119
  program.parseAsync(process.argv).catch((error) => {
3108
- console.error(pc5.red(`
3109
- ${error.message}
3110
- `));
3111
3120
  process.exitCode = 1;
3121
+ process.stderr.write(pc5.red(`
3122
+ ${error.message}
3123
+ `), () => process.exit(1));
3112
3124
  });
@@ -59,6 +59,8 @@ export type ProgressEvent = {
59
59
  } | {
60
60
  type: "live-done";
61
61
  total: number;
62
+ } | {
63
+ type: "aborted";
62
64
  };
63
65
  export type OnProgress = (event: ProgressEvent) => void;
64
66
  export declare function runVortix(config: ResolvedConfig, onProgress?: OnProgress, liveUrl?: string): Promise<RunResult>;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  defineCheck,
3
3
  defineConfig
4
- } from "./chunk-KNVCFVGJ.js";
4
+ } from "./chunk-RJANEUUK.js";
5
5
  export {
6
6
  defineCheck,
7
7
  defineConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vortix-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Vortix — Swiss-army-knife CLI for static site quality checks — performance, security, accessibility, bugs, maintainability & privacy.",
5
5
  "keywords": [
6
6
  "cli",