@capawesome/cli 2.1.2 → 2.1.3-dev.faa7c38.1756672647

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [2.1.3](https://github.com/capawesome-team/cli/compare/v2.1.2...v2.1.3) (2025-08-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * capture only the first argument ([99d3892](https://github.com/capawesome-team/cli/commit/99d3892b99727ac95d3511da6c3dbfd39bad4ee4))
11
+ * do not capture validation errors ([a8b89bc](https://github.com/capawesome-team/cli/commit/a8b89bcae7b9b2698857507a8ef030a6b443d711))
12
+
5
13
  ## [2.1.2](https://github.com/capawesome-team/cli/compare/v2.1.1...v2.1.2) (2025-08-27)
6
14
 
7
15
 
@@ -1,7 +1,9 @@
1
+ import { createRequire } from 'module';
1
2
  import { defineCommand } from '@robingenz/zli';
2
3
  import consola from 'consola';
3
4
  import systeminformation from 'systeminformation';
4
- import pkg from '../../package.json' with { type: 'json' };
5
+ const require = createRequire(import.meta.url);
6
+ const pkg = require('../../package.json');
5
7
  export default defineCommand({
6
8
  description: 'Prints out neccessary information for debugging',
7
9
  action: async (options, args) => {
package/dist/index.js CHANGED
@@ -6,7 +6,10 @@ import { defineConfig, processConfig, ZliError } from '@robingenz/zli';
6
6
  import * as Sentry from '@sentry/node';
7
7
  import { AxiosError } from 'axios';
8
8
  import consola from 'consola';
9
- import pkg from '../package.json' with { type: 'json' };
9
+ import { ZodError } from 'zod';
10
+ import { createRequire } from 'module';
11
+ const require = createRequire(import.meta.url);
12
+ const pkg = require('../package.json');
10
13
  const config = defineConfig({
11
14
  meta: {
12
15
  name: pkg.name,
@@ -38,6 +41,10 @@ const captureException = async (error) => {
38
41
  if (error instanceof ZliError) {
39
42
  return;
40
43
  }
44
+ // Ignore validation errors
45
+ if (error instanceof ZodError) {
46
+ return;
47
+ }
41
48
  // Ignore failed HTTP requests
42
49
  if (error instanceof AxiosError) {
43
50
  return;
@@ -50,7 +57,9 @@ const captureException = async (error) => {
50
57
  dsn: 'https://19f30f2ec4b91899abc33818568ceb42@o4507446340747264.ingest.de.sentry.io/4508506426966096',
51
58
  release: pkg.version,
52
59
  });
53
- Sentry.setTag('cli_command', process.argv.slice(2).join(' '));
60
+ if (process.argv.slice(2).length > 0) {
61
+ Sentry.setTag('cli_command', process.argv.slice(2)[0]);
62
+ }
54
63
  Sentry.captureException(error);
55
64
  await Sentry.close();
56
65
  };
@@ -1,6 +1,8 @@
1
+ import { createRequire } from 'module';
1
2
  import { defineConfig, processConfig } from '@robingenz/zli';
2
3
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
3
- import pkg from '../package.json' with { type: 'json' };
4
+ const require = createRequire(import.meta.url);
5
+ const pkg = require('../package.json');
4
6
  const config = defineConfig({
5
7
  meta: {
6
8
  name: pkg.name,
@@ -1,6 +1,8 @@
1
+ import { createRequire } from 'module';
1
2
  import consola from 'consola';
2
3
  import * as semver from 'semver';
3
- import pkg from '../../package.json' with { type: 'json' };
4
+ const require = createRequire(import.meta.url);
5
+ const pkg = require('../../package.json');
4
6
  import httpClient from '../utils/http-client.js';
5
7
  class UpdateServiceImpl {
6
8
  httpClient;
@@ -1,7 +1,9 @@
1
+ import { createRequire } from 'module';
1
2
  import configService from '../services/config.js';
2
3
  import axios from 'axios';
3
4
  import axiosRetry from 'axios-retry';
4
- import pkg from '../../package.json' with { type: 'json' };
5
+ const require = createRequire(import.meta.url);
6
+ const pkg = require('../../package.json');
5
7
  // Register middleware to retry failed requests
6
8
  axiosRetry(axios, {
7
9
  retries: 3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/cli",
3
- "version": "2.1.2",
3
+ "version": "2.1.3-dev.faa7c38.1756672647",
4
4
  "description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
5
5
  "type": "module",
6
6
  "scripts": {