codex-wrapped-christmas 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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
import fs from "node:fs";
|
|
5
|
-
import { dirname, join } from "node:path";
|
|
5
|
+
import { basename, dirname, join } from "node:path";
|
|
6
6
|
import { platform as osPlatform, arch as osArch } from "node:os";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
@@ -46,8 +46,14 @@ const binary =
|
|
|
46
46
|
function findBinary(startDir) {
|
|
47
47
|
let current = startDir;
|
|
48
48
|
for (;;) {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
49
|
+
const moduleDirs = [];
|
|
50
|
+
if (basename(current) === "node_modules") {
|
|
51
|
+
moduleDirs.push(current);
|
|
52
|
+
}
|
|
53
|
+
moduleDirs.push(join(current, "node_modules"));
|
|
54
|
+
|
|
55
|
+
for (const modules of moduleDirs) {
|
|
56
|
+
if (!fs.existsSync(modules)) continue;
|
|
51
57
|
const entries = fs.readdirSync(modules);
|
|
52
58
|
for (const entry of entries) {
|
|
53
59
|
if (!entry.startsWith(base)) {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-wrapped-christmas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Generate a personalized Spotify Wrapped-style summary of your Codex usage",
|
|
5
|
-
"bin":
|
|
6
|
-
"codex-wrapped-christmas": "./bin/codex-wrapped-christmas"
|
|
7
|
-
},
|
|
5
|
+
"bin": "bin/codex-wrapped-christmas",
|
|
8
6
|
"scripts": {
|
|
9
7
|
"postinstall": "node ./postinstall.mjs"
|
|
10
8
|
},
|