codex-wakatime 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # codex-wakatime
2
2
 
3
- WakaTime integration for [OpenAI Codex CLI](https://github.com/openai/codex) - Track AI coding activity and time spent.
3
+ [![npm version](https://img.shields.io/npm/v/codex-wakatime)](https://www.npmjs.com/package/codex-wakatime)
4
+ [![npm downloads](https://img.shields.io/npm/dm/codex-wakatime)](https://www.npmjs.com/package/codex-wakatime)
5
+ [![CI](https://github.com/angristan/codex-wakatime/actions/workflows/workflow.yml/badge.svg)](https://github.com/angristan/codex-wakatime/actions/workflows/workflow.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+
8
+ WakaTime integration for [OpenAI Codex CLI](https://github.com/openai/codex). Track AI coding activity and time spent.
9
+
10
+ > [!TIP]
11
+ > Also check out [opencode-wakatime](https://github.com/angristan/opencode-wakatime) for OpenCode!
4
12
 
5
13
  ## Features
6
14
 
@@ -114,7 +122,7 @@ Logs are written to `~/.wakatime/codex.log`.
114
122
 
115
123
  ```bash
116
124
  # Clone the repository
117
- git clone https://github.com/wakatime/codex-wakatime
125
+ git clone https://github.com/angristan/codex-wakatime
118
126
  cd codex-wakatime
119
127
 
120
128
  # Install dependencies
@@ -148,8 +156,6 @@ codex-wakatime/
148
156
  │ ├── options.ts # Config parsing
149
157
  │ ├── types.ts # TypeScript interfaces
150
158
  │ └── __tests__/ # Test files
151
- ├── scripts/
152
- │ └── generate-version.js
153
159
  ├── package.json
154
160
  ├── tsconfig.json
155
161
  └── biome.json
package/dist/index.cjs CHANGED
@@ -284,8 +284,8 @@ var PATTERNS = [
284
284
  /```\w*:([^\n`]+)/g,
285
285
  // Backtick paths with extension: `src/foo/bar.ts`
286
286
  /`([^`\s]+\.\w{1,6})`/g,
287
- // Action patterns: Created/Modified/Updated/Wrote/Edited/Deleted file.ts
288
- /(?:Created|Modified|Updated|Wrote|Edited|Deleted|Reading|Writing)\s+`?([^\s`\n]+\.\w{1,6})`?/gi,
287
+ // Action patterns: Read/List/Created/Modified/Updated/Wrote/Edited/Deleted file.ts
288
+ /(?:Read|List|Create|Created|Modify|Modified|Update|Updated|Write|Wrote|Edit|Edited|Delete|Deleted)\s+`?([^\s`\n]+\.\w{1,6})`?/gi,
289
289
  // File path in quotes: "src/file.ts" or 'src/file.ts'
290
290
  /["']([^"'\s]+\.\w{1,6})["']/g
291
291
  ];
@@ -427,7 +427,9 @@ function normalizeNotifyValue(value) {
427
427
  return [];
428
428
  }
429
429
  function hasNotifyEntry(entries, command) {
430
- return entries.some((entry) => typeof entry === "string" && entry === command);
430
+ return entries.some(
431
+ (entry) => typeof entry === "string" && entry === command
432
+ );
431
433
  }
432
434
  function removeNotifyEntry(entries, command) {
433
435
  return entries.filter(
@@ -641,6 +643,65 @@ function updateLastHeartbeat() {
641
643
  var import_node_child_process = require("node:child_process");
642
644
  var os6 = __toESM(require("node:os"), 1);
643
645
 
646
+ // package.json
647
+ var package_default = {
648
+ $schema: "https://json.schemastore.org/package.json",
649
+ name: "codex-wakatime",
650
+ version: "1.0.1",
651
+ description: "WakaTime plugin for OpenAI Codex CLI - Track AI coding activity and time spent",
652
+ repository: {
653
+ type: "git",
654
+ url: "https://github.com/angristan/codex-wakatime.git"
655
+ },
656
+ type: "module",
657
+ main: "dist/index.cjs",
658
+ types: "dist/index.d.ts",
659
+ bin: {
660
+ "codex-wakatime": "dist/index.cjs"
661
+ },
662
+ files: [
663
+ "dist"
664
+ ],
665
+ scripts: {
666
+ build: 'esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs --banner:js="#!/usr/bin/env node"',
667
+ typecheck: "tsc --noEmit",
668
+ lint: "biome lint .",
669
+ format: "biome format --write .",
670
+ check: "biome check .",
671
+ test: "vitest",
672
+ "test:run": "vitest run",
673
+ "test:coverage": "vitest run --coverage",
674
+ prepublishOnly: "npm run build"
675
+ },
676
+ keywords: [
677
+ "codex",
678
+ "openai",
679
+ "wakatime",
680
+ "time-tracking",
681
+ "ai",
682
+ "coding",
683
+ "productivity"
684
+ ],
685
+ author: "WakaTime",
686
+ license: "MIT",
687
+ devDependencies: {
688
+ "@biomejs/biome": "^2.3.10",
689
+ "@semantic-release/changelog": "^6.0.3",
690
+ "@semantic-release/git": "^10.0.1",
691
+ "@types/node": "^22.0.0",
692
+ "@types/which": "^3.0.0",
693
+ "@vitest/coverage-v8": "^4.0.16",
694
+ esbuild: "^0.25.0",
695
+ "semantic-release": "^25.0.2",
696
+ typescript: "^5.0.0",
697
+ vitest: "^4.0.16"
698
+ },
699
+ dependencies: {
700
+ "@iarna/toml": "^3.0.0",
701
+ which: "^4.0.0"
702
+ }
703
+ };
704
+
644
705
  // src/dependencies.ts
645
706
  var fs5 = __toESM(require("node:fs"), 1);
646
707
  var import_node_fs = require("node:fs");
@@ -913,10 +974,8 @@ var Dependencies = class {
913
974
  };
914
975
  var dependencies = new Dependencies();
915
976
 
916
- // src/version.ts
917
- var VERSION = "1.0.0";
918
-
919
977
  // src/wakatime.ts
978
+ var VERSION = package_default.version;
920
979
  function isWindows() {
921
980
  return os6.platform() === "win32";
922
981
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "codex-wakatime",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "WakaTime plugin for OpenAI Codex CLI - Track AI coding activity and time spent",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/wakatime/codex-wakatime.git"
8
+ "url": "https://github.com/angristan/codex-wakatime.git"
9
9
  },
10
10
  "type": "module",
11
11
  "main": "dist/index.cjs",
@@ -17,8 +17,7 @@
17
17
  "dist"
18
18
  ],
19
19
  "scripts": {
20
- "prebuild": "node scripts/generate-version.js",
21
- "build": "npm run prebuild && esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs --banner:js=\"#!/usr/bin/env node\"",
20
+ "build": "esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs --banner:js=\"#!/usr/bin/env node\"",
22
21
  "typecheck": "tsc --noEmit",
23
22
  "lint": "biome lint .",
24
23
  "format": "biome format --write .",
@@ -41,10 +40,13 @@
41
40
  "license": "MIT",
42
41
  "devDependencies": {
43
42
  "@biomejs/biome": "^2.3.10",
43
+ "@semantic-release/changelog": "^6.0.3",
44
+ "@semantic-release/git": "^10.0.1",
44
45
  "@types/node": "^22.0.0",
45
46
  "@types/which": "^3.0.0",
46
47
  "@vitest/coverage-v8": "^4.0.16",
47
48
  "esbuild": "^0.25.0",
49
+ "semantic-release": "^25.0.2",
48
50
  "typescript": "^5.0.0",
49
51
  "vitest": "^4.0.16"
50
52
  },