quotacap 0.0.32 → 0.0.33
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/dist/runtime/versions.js +18 -3
- package/dist/service/macos.js +4 -1
- package/dist/version.js +1 -1
- package/dist/web/vite.config.d.ts +2 -0
- package/dist/web/vite.config.js +20 -0
- package/package.json +7 -2
package/dist/runtime/versions.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// string order.
|
|
4
4
|
export function parseVersion(v) {
|
|
5
5
|
const s = v.startsWith("v") ? v.slice(1) : v;
|
|
6
|
-
|
|
6
|
+
const match = s.match(/^(\d+(?:\.\d+)*)(?:-[0-9a-fA-F]{7,40}(?:-dirty)?)?$/);
|
|
7
|
+
if (!match || !match[1])
|
|
7
8
|
return null;
|
|
8
|
-
return
|
|
9
|
+
return match[1].split(".").map(Number);
|
|
9
10
|
}
|
|
10
11
|
export function compareVersions(a, b) {
|
|
11
12
|
const pa = parseVersion(a);
|
|
@@ -18,7 +19,21 @@ export function compareVersions(a, b) {
|
|
|
18
19
|
if (x !== y)
|
|
19
20
|
return x < y ? -1 : 1;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
if (a === b)
|
|
23
|
+
return 0;
|
|
24
|
+
const aNorm = a.startsWith("v") ? a.slice(1) : a;
|
|
25
|
+
const bNorm = b.startsWith("v") ? b.slice(1) : b;
|
|
26
|
+
if (aNorm === bNorm)
|
|
27
|
+
return 0;
|
|
28
|
+
const aHasSuffix = aNorm.includes("-");
|
|
29
|
+
const bHasSuffix = bNorm.includes("-");
|
|
30
|
+
if (!aHasSuffix && !bHasSuffix)
|
|
31
|
+
return 0;
|
|
32
|
+
if (aHasSuffix && !bHasSuffix)
|
|
33
|
+
return 1;
|
|
34
|
+
if (!aHasSuffix && bHasSuffix)
|
|
35
|
+
return -1;
|
|
36
|
+
return aNorm < bNorm ? -1 : 1;
|
|
22
37
|
}
|
|
23
38
|
if (a === b)
|
|
24
39
|
return 0;
|
package/dist/service/macos.js
CHANGED
|
@@ -254,7 +254,10 @@ function bootoutQuiet(run, uid, print) {
|
|
|
254
254
|
run(["bootout", bootoutTarget(uid)]);
|
|
255
255
|
}
|
|
256
256
|
catch (e) {
|
|
257
|
-
|
|
257
|
+
// "No such process" is launchd's other not-running signal: the job record
|
|
258
|
+
// exists but its process is already gone. Same goal state as a missing
|
|
259
|
+
// record, so tolerate it the same way (systemd's stopQuiet already does).
|
|
260
|
+
if (/could not find service|no such process/i.test(String(e?.message ?? e))) {
|
|
258
261
|
print("service job is not loaded; nothing to stop");
|
|
259
262
|
return;
|
|
260
263
|
}
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by scripts/build-embed.mjs — do not edit
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.33";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
// HMR iteration (`npm run dev:web`): the dashboard fetches same-origin /api/*,
|
|
6
|
+
// so forward API traffic to a locally running daemon. Override when the daemon
|
|
7
|
+
// binds somewhere other than the default 8787.
|
|
8
|
+
const devApi = process.env.QUOTACAP_DEV_API || "http://127.0.0.1:8787";
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
plugins: [react()],
|
|
11
|
+
root: path.dirname(fileURLToPath(import.meta.url)),
|
|
12
|
+
build: { outDir: "dist" },
|
|
13
|
+
server: {
|
|
14
|
+
port: 5173,
|
|
15
|
+
proxy: {
|
|
16
|
+
"/api": devApi,
|
|
17
|
+
"/health": devApi,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quotacap",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "Local quota tracker for AI coding plans with a dashboard, CLI, MCP server, and next-plan recommendations.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -46,7 +46,12 @@
|
|
|
46
46
|
"test": "vitest run",
|
|
47
47
|
"test:smoke": "playwright test -c tests/smoke/playwright.config.ts",
|
|
48
48
|
"prepublishOnly": "npm run build",
|
|
49
|
-
"dev": "
|
|
49
|
+
"dev": "node scripts/dev.mjs",
|
|
50
|
+
"dev:daemon": "tsx --watch src/cli/index.ts daemon --foreground",
|
|
51
|
+
"dev:web": "vite --config web/vite.config.ts",
|
|
52
|
+
"cli": "tsx src/cli/index.ts",
|
|
53
|
+
"install:local": "node scripts/install-local.mjs",
|
|
54
|
+
"start": "npm run build && node dist/cli/index.js daemon --foreground"
|
|
50
55
|
},
|
|
51
56
|
"dependencies": {
|
|
52
57
|
"commander": "^15.0.0",
|