@apet97/clockify-cli-115 3.0.0 → 4.0.0

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/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  Command-line interface for [Clockify](https://clockify.me/), built on
4
4
  top of `clockify-sdk-ts-115`.
5
5
 
6
- Current release: `3.0.0`. Requires Node.js `>=22.13.0` and
7
- `clockify-sdk-ts-115 ^3`.
6
+ Current release: `4.0.0`. Requires Node.js `>=22.13.0` and
7
+ `clockify-sdk-ts-115 ^4`.
8
8
 
9
9
  Two binaries, identical behavior:
10
10
 
@@ -240,7 +240,7 @@ node dist/index.js status # smoke test (or invoke installed clk115/clockify11
240
240
  ```
241
241
 
242
242
  `clockify-sdk-ts-115` is workspace-linked for local development and is a
243
- `^3` peer dependency for published consumers.
243
+ `^4` peer dependency for published consumers.
244
244
 
245
245
  ## License
246
246
 
@@ -37,9 +37,8 @@ function reconstructClientBody(current, suppliedName) {
37
37
  const address = optionalNullableClientString(current.address, "address");
38
38
  if (address !== undefined)
39
39
  body.address = address;
40
- const currencyCode = optionalClientString(current.currencyCode, "currencyCode");
41
- if (currencyCode !== undefined)
42
- body.currencyCode = currencyCode;
40
+ if (current.ccEmails != null)
41
+ body.ccEmails = current.ccEmails;
43
42
  const email = optionalNullableClientString(current.email, "email");
44
43
  if (email !== undefined)
45
44
  body.email = email;
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = "3.0.0";
1
+ export const PACKAGE_VERSION = "4.0.0";
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { realpathSync } from "node:fs";
3
3
  import { pathToFileURL } from "node:url";
4
+ import { clockifyErrorDetail } from "clockify-sdk-ts-115/errors";
4
5
  import { Command, InvalidArgumentError } from "commander";
5
6
  import { buildClient } from "./client.js";
6
7
  import { registerApiCommand } from "./commands/api.js";
@@ -154,7 +155,7 @@ export async function main(argv, services = defaultServices) {
154
155
  if (isCommanderHelpError(err)) {
155
156
  return err.exitCode ?? 0;
156
157
  }
157
- const message = err instanceof Error ? err.message : String(err);
158
+ const message = clockifyErrorDetail(err);
158
159
  const statusCode = err.statusCode;
159
160
  const flags = resolveFlagsSafe(program);
160
161
  printError(message, { mode: flags.mode, color: flags.color }, statusCode);
@@ -194,8 +195,7 @@ if (invokedDirectly) {
194
195
  main(process.argv).then((code) => {
195
196
  process.exitCode = code;
196
197
  }, (err) => {
197
- const message = err instanceof Error ? err.message : String(err);
198
- console.error(`fatal: ${message}`);
198
+ console.error(`fatal: ${clockifyErrorDetail(err)}`);
199
199
  process.exitCode = 1;
200
200
  });
201
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apet97/clockify-cli-115",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Unofficial, community-built \u2014 not affiliated with CAKE.com or Clockify. Command-line interface for Clockify, built on clockify-sdk-ts-115.",
5
5
  "license": "MIT",
6
6
  "author": "Aleksandar Petkovi\u0107 <petkovic.aleksandar037@gmail.com>",
@@ -54,7 +54,7 @@
54
54
  "zod": "^4.4.3"
55
55
  },
56
56
  "peerDependencies": {
57
- "clockify-sdk-ts-115": "^3"
57
+ "clockify-sdk-ts-115": "^4"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "^22",