codex-wrapped-noyrlimit 1.0.0 → 1.0.2
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
|
@@ -95,6 +95,14 @@ Codex Wrapped reads data from your local Codex CLI installation:
|
|
|
95
95
|
|
|
96
96
|
No data is sent anywhere. Everything is processed locally.
|
|
97
97
|
|
|
98
|
+
Token pricing for cost estimates is also local and versioned in:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
src/pricing-data.ts
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If a model is missing from that table, cost is treated as unavailable for that model until it is added in a new release.
|
|
105
|
+
|
|
98
106
|
## Building
|
|
99
107
|
|
|
100
108
|
### Development
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
import fs from "node:fs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import os from "node:os";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
11
|
|
|
12
12
|
function run(target) {
|
|
13
13
|
const result = spawnSync(target, process.argv.slice(2), {
|
|
@@ -31,34 +31,36 @@ const archMap = {
|
|
|
31
31
|
arm64: "arm64",
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
let platform = platformMap[
|
|
34
|
+
let platform = platformMap[os.platform()];
|
|
35
35
|
if (!platform) {
|
|
36
|
-
platform =
|
|
36
|
+
platform = os.platform();
|
|
37
37
|
}
|
|
38
|
-
let arch = archMap[
|
|
38
|
+
let arch = archMap[os.arch()];
|
|
39
39
|
if (!arch) {
|
|
40
|
-
arch =
|
|
40
|
+
arch = os.arch();
|
|
41
41
|
}
|
|
42
|
+
|
|
42
43
|
const base = "codex-wrapped-noyrlimit-" + platform + "-" + arch;
|
|
43
|
-
const binary =
|
|
44
|
+
const binary =
|
|
45
|
+
platform === "windows" ? "codex-wrapped-noyrlimit.exe" : "codex-wrapped-noyrlimit";
|
|
44
46
|
|
|
45
47
|
function findBinary(startDir) {
|
|
46
48
|
let current = startDir;
|
|
47
49
|
for (;;) {
|
|
48
|
-
const modules = join(current, "node_modules");
|
|
50
|
+
const modules = path.join(current, "node_modules");
|
|
49
51
|
if (fs.existsSync(modules)) {
|
|
50
52
|
const entries = fs.readdirSync(modules);
|
|
51
53
|
for (const entry of entries) {
|
|
52
54
|
if (!entry.startsWith(base)) {
|
|
53
55
|
continue;
|
|
54
56
|
}
|
|
55
|
-
const candidate = join(modules, entry, "bin", binary);
|
|
57
|
+
const candidate = path.join(modules, entry, "bin", binary);
|
|
56
58
|
if (fs.existsSync(candidate)) {
|
|
57
59
|
return candidate;
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
|
-
const parent = dirname(current);
|
|
63
|
+
const parent = path.dirname(current);
|
|
62
64
|
if (parent === current) {
|
|
63
65
|
return;
|
|
64
66
|
}
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-wrapped-noyrlimit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Generate a personalized Spotify Wrapped-style summary of your Codex usage",
|
|
5
5
|
"bin": {
|
|
6
|
-
"codex-wrapped-noyrlimit": "bin/codex-wrapped-noyrlimit"
|
|
6
|
+
"codex-wrapped-noyrlimit": "bin/codex-wrapped-noyrlimit.mjs"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"postinstall": "node ./postinstall.mjs"
|
|
10
10
|
},
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"codex-wrapped-noyrlimit-linux-arm64": "1.0.
|
|
13
|
-
"codex-wrapped-noyrlimit-linux-x64": "1.0.
|
|
14
|
-
"codex-wrapped-noyrlimit-linux-x64-baseline": "1.0.
|
|
15
|
-
"codex-wrapped-noyrlimit-linux-arm64-musl": "1.0.
|
|
16
|
-
"codex-wrapped-noyrlimit-linux-x64-musl": "1.0.
|
|
17
|
-
"codex-wrapped-noyrlimit-linux-x64-baseline-musl": "1.0.
|
|
18
|
-
"codex-wrapped-noyrlimit-darwin-arm64": "1.0.
|
|
19
|
-
"codex-wrapped-noyrlimit-darwin-x64": "1.0.
|
|
20
|
-
"codex-wrapped-noyrlimit-darwin-x64-baseline": "1.0.
|
|
21
|
-
"codex-wrapped-noyrlimit-windows-x64": "1.0.
|
|
22
|
-
"codex-wrapped-noyrlimit-windows-x64-baseline": "1.0.
|
|
12
|
+
"codex-wrapped-noyrlimit-linux-arm64": "1.0.2",
|
|
13
|
+
"codex-wrapped-noyrlimit-linux-x64": "1.0.2",
|
|
14
|
+
"codex-wrapped-noyrlimit-linux-x64-baseline": "1.0.2",
|
|
15
|
+
"codex-wrapped-noyrlimit-linux-arm64-musl": "1.0.2",
|
|
16
|
+
"codex-wrapped-noyrlimit-linux-x64-musl": "1.0.2",
|
|
17
|
+
"codex-wrapped-noyrlimit-linux-x64-baseline-musl": "1.0.2",
|
|
18
|
+
"codex-wrapped-noyrlimit-darwin-arm64": "1.0.2",
|
|
19
|
+
"codex-wrapped-noyrlimit-darwin-x64": "1.0.2",
|
|
20
|
+
"codex-wrapped-noyrlimit-darwin-x64-baseline": "1.0.2",
|
|
21
|
+
"codex-wrapped-noyrlimit-windows-x64": "1.0.2",
|
|
22
|
+
"codex-wrapped-noyrlimit-windows-x64-baseline": "1.0.2"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|