usage-board 3.1.1 → 3.1.3

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.
Files changed (41) hide show
  1. package/dist/index.mjs +1 -1
  2. package/dist/public/_nuxt/builds/latest.json +1 -1
  3. package/dist/public/_nuxt/builds/meta/16d9b7dd-abbb-4267-9366-349908b2332a.json +1 -0
  4. package/dist/server/chunks/nitro/nitro.mjs +57 -57
  5. package/dist/server/chunks/routes/api/analysis/agent/session.json.mjs +1 -1
  6. package/dist/server/chunks/routes/api/analysis/agent/token.json.mjs +1 -1
  7. package/dist/server/chunks/routes/api/analysis/cache.json.mjs +1 -1
  8. package/dist/server/chunks/routes/api/analysis/hot-project.json.mjs +1 -1
  9. package/dist/server/chunks/routes/api/analysis/model.json.mjs +1 -1
  10. package/dist/server/chunks/routes/api/analysis/overview-cards.json.mjs +1 -1
  11. package/dist/server/chunks/routes/api/analysis/session.json.mjs +1 -1
  12. package/dist/server/chunks/routes/api/analysis/token/daily.json.mjs +1 -1
  13. package/dist/server/chunks/routes/api/analysis/token.json.mjs +1 -1
  14. package/dist/server/chunks/routes/api/payload.json.mjs +1 -1
  15. package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +1 -1
  16. package/dist/server/chunks/routes/api/projects/catalog.get.mjs +1 -1
  17. package/dist/server/chunks/routes/renderer.mjs +1 -1
  18. package/dist/server/chunks/routes/ws.mjs +1 -1
  19. package/dist/server/index.mjs +1 -1
  20. package/dist/server/package.json +1 -4
  21. package/package.json +6 -5
  22. package/dist/public/_nuxt/builds/meta/6f98f1cb-266c-475e-a249-dad346a55f24.json +0 -1
  23. package/dist/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  24. package/dist/server/node_modules/better-sqlite3/lib/database.js +0 -90
  25. package/dist/server/node_modules/better-sqlite3/lib/index.js +0 -3
  26. package/dist/server/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
  27. package/dist/server/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
  28. package/dist/server/node_modules/better-sqlite3/lib/methods/function.js +0 -31
  29. package/dist/server/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
  30. package/dist/server/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
  31. package/dist/server/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
  32. package/dist/server/node_modules/better-sqlite3/lib/methods/table.js +0 -189
  33. package/dist/server/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
  34. package/dist/server/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
  35. package/dist/server/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
  36. package/dist/server/node_modules/better-sqlite3/lib/util.js +0 -12
  37. package/dist/server/node_modules/better-sqlite3/package.json +0 -59
  38. package/dist/server/node_modules/bindings/bindings.js +0 -221
  39. package/dist/server/node_modules/bindings/package.json +0 -28
  40. package/dist/server/node_modules/file-uri-to-path/index.js +0 -66
  41. package/dist/server/node_modules/file-uri-to-path/package.json +0 -32
package/dist/index.mjs CHANGED
@@ -756,7 +756,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari"
756
756
  //#endregion
757
757
  //#region package.json
758
758
  var name = "usage-board";
759
- var version = "3.1.1";
759
+ var version = "3.1.3";
760
760
  //#endregion
761
761
  //#region src/index.ts
762
762
  const cli = cac(name);
@@ -1 +1 @@
1
- {"id":"6f98f1cb-266c-475e-a249-dad346a55f24","timestamp":1779420050911}
1
+ {"id":"16d9b7dd-abbb-4267-9366-349908b2332a","timestamp":1779429199819}
@@ -0,0 +1 @@
1
+ {"id":"16d9b7dd-abbb-4267-9366-349908b2332a","timestamp":1779429199819,"prerendered":[]}
@@ -6,7 +6,7 @@ import { Buffer as Buffer$1 } from 'node:buffer';
6
6
  import { promises, existsSync, mkdirSync, readFileSync, statSync, accessSync, constants } from 'node:fs';
7
7
  import { resolve as resolve$1, dirname as dirname$1, join, sep, basename as basename$1 } from 'node:path';
8
8
  import { createHash } from 'node:crypto';
9
- import BetterSqliteDatabase from 'better-sqlite3';
9
+ import { DatabaseSync } from 'node:sqlite';
10
10
  import { glob } from 'glob';
11
11
  import chokidar from 'chokidar';
12
12
  import { homedir } from 'node:os';
@@ -4267,7 +4267,7 @@ function _expandFromEnv(value) {
4267
4267
  const _inlineRuntimeConfig = {
4268
4268
  "app": {
4269
4269
  "baseURL": "/",
4270
- "buildId": "6f98f1cb-266c-475e-a249-dad346a55f24",
4270
+ "buildId": "16d9b7dd-abbb-4267-9366-349908b2332a",
4271
4271
  "buildAssetsDir": "/_nuxt/",
4272
4272
  "cdnURL": ""
4273
4273
  },
@@ -4295,7 +4295,7 @@ const _inlineRuntimeConfig = {
4295
4295
  }
4296
4296
  },
4297
4297
  "public": {
4298
- "appVersion": "3.1.1",
4298
+ "appVersion": "3.1.3",
4299
4299
  "home": "/Users/tangchenghui"
4300
4300
  },
4301
4301
  "icon": {
@@ -4710,7 +4710,7 @@ function defineNitroPlugin(def) {
4710
4710
  }
4711
4711
 
4712
4712
  function openSqliteDatabase(location, options) {
4713
- return new BetterSqliteDatabase(location, options);
4713
+ return new DatabaseSync(location, options != null ? options : {});
4714
4714
  }
4715
4715
 
4716
4716
  const PROJECT_USAGE_PLATFORMS = [
@@ -9008,7 +9008,7 @@ const gooseUsageAdapter = {
9008
9008
  return config.goosePaths.flatMap((filePath) => toDiscoveredUsageFile(filePath, "goose"));
9009
9009
  },
9010
9010
  parseFile(filePath, resolvePricing) {
9011
- const database = openSqliteDatabase(filePath, { readonly: true });
9011
+ const database = openSqliteDatabase(filePath, { readOnly: true });
9012
9012
  try {
9013
9013
  const rows = database.prepare(GOOSE_SESSION_QUERY).all();
9014
9014
  const fragments = rows.map((row) => parseGooseRow(row, resolvePricing)).filter((entry) => entry !== null).map((entry) => {
@@ -9132,7 +9132,7 @@ const hermesUsageAdapter = {
9132
9132
  return config.hermesPaths.flatMap((filePath) => toDiscoveredUsageFile(filePath, "hermes"));
9133
9133
  },
9134
9134
  parseFile(filePath, resolvePricing) {
9135
- const database = openSqliteDatabase(filePath, { readonly: true });
9135
+ const database = openSqliteDatabase(filePath, { readOnly: true });
9136
9136
  try {
9137
9137
  const rows = database.prepare(HERMES_SESSION_QUERY).all();
9138
9138
  return rows.map((row) => parseHermesRow(row, resolvePricing)).filter((entry) => entry !== null).map((entry) => {
@@ -9252,7 +9252,7 @@ const kiloUsageAdapter = {
9252
9252
  },
9253
9253
  parseFile(filePath, resolvePricing) {
9254
9254
  var _a;
9255
- const database = openSqliteDatabase(filePath, { readonly: true });
9255
+ const database = openSqliteDatabase(filePath, { readOnly: true });
9256
9256
  try {
9257
9257
  const rows = database.prepare(KILO_MESSAGE_QUERY).all();
9258
9258
  const fragments = /* @__PURE__ */ new Map();
@@ -9585,7 +9585,7 @@ const openCodeUsageAdapter = {
9585
9585
  parseFile(filePath, resolvePricing) {
9586
9586
  var _a;
9587
9587
  if (filePath.endsWith(".db")) {
9588
- const database = openSqliteDatabase(filePath, { readonly: true });
9588
+ const database = openSqliteDatabase(filePath, { readOnly: true });
9589
9589
  try {
9590
9590
  const rows = database.prepare("SELECT id, session_id, data FROM message").all();
9591
9591
  const fragments = /* @__PURE__ */ new Map();
@@ -10799,154 +10799,154 @@ const assets = {
10799
10799
  "/logo.svg": {
10800
10800
  "type": "image/svg+xml",
10801
10801
  "etag": "\"1550-fwYFdULdJ83Qp0FjnnX31iQz9oI\"",
10802
- "mtime": "2026-05-22T03:21:01.666Z",
10802
+ "mtime": "2026-05-22T05:53:27.903Z",
10803
10803
  "size": 5456,
10804
10804
  "path": "../public/logo.svg"
10805
10805
  },
10806
10806
  "/robots.txt": {
10807
10807
  "type": "text/plain; charset=utf-8",
10808
10808
  "etag": "\"18-j8OIsL9qGDmNZ+lHhp2tyH4XtaE\"",
10809
- "mtime": "2026-05-22T03:21:01.666Z",
10809
+ "mtime": "2026-05-22T05:53:27.903Z",
10810
10810
  "size": 24,
10811
10811
  "path": "../public/robots.txt"
10812
10812
  },
10813
10813
  "/favicon.ico": {
10814
10814
  "type": "image/vnd.microsoft.icon",
10815
10815
  "etag": "\"1083e-LfyFZ+1JmdianDqe/sQN2Ou0IzQ\"",
10816
- "mtime": "2026-05-22T03:21:01.666Z",
10816
+ "mtime": "2026-05-22T05:53:27.904Z",
10817
10817
  "size": 67646,
10818
10818
  "path": "../public/favicon.ico"
10819
10819
  },
10820
10820
  "/_nuxt/B6C9KBQ4.js": {
10821
10821
  "type": "text/javascript; charset=utf-8",
10822
10822
  "etag": "\"5e1e-I40z3Xz4z7/UJG57r4vYGuEgT7c\"",
10823
- "mtime": "2026-05-22T03:21:01.661Z",
10823
+ "mtime": "2026-05-22T05:53:27.900Z",
10824
10824
  "size": 24094,
10825
10825
  "path": "../public/_nuxt/B6C9KBQ4.js"
10826
10826
  },
10827
- "/_nuxt/Bv6agYS5.js": {
10828
- "type": "text/javascript; charset=utf-8",
10829
- "etag": "\"9f6b-/oK8WDX8dj11Vq4rsvDCjR0nyFo\"",
10830
- "mtime": "2026-05-22T03:21:01.662Z",
10831
- "size": 40811,
10832
- "path": "../public/_nuxt/Bv6agYS5.js"
10833
- },
10834
10827
  "/_nuxt/BvRyOET7.js": {
10835
10828
  "type": "text/javascript; charset=utf-8",
10836
10829
  "etag": "\"760b-+u3AotZdPY2Q6cCC1nWxcJWlQgA\"",
10837
- "mtime": "2026-05-22T03:21:01.661Z",
10830
+ "mtime": "2026-05-22T05:53:27.900Z",
10838
10831
  "size": 30219,
10839
10832
  "path": "../public/_nuxt/BvRyOET7.js"
10840
10833
  },
10834
+ "/_nuxt/Bv6agYS5.js": {
10835
+ "type": "text/javascript; charset=utf-8",
10836
+ "etag": "\"9f6b-/oK8WDX8dj11Vq4rsvDCjR0nyFo\"",
10837
+ "mtime": "2026-05-22T05:53:27.900Z",
10838
+ "size": 40811,
10839
+ "path": "../public/_nuxt/Bv6agYS5.js"
10840
+ },
10841
10841
  "/_nuxt/COIbUy5w.js": {
10842
10842
  "type": "text/javascript; charset=utf-8",
10843
10843
  "etag": "\"d7b-HHVnZRYVWGAGuQkgrnXTrnj2mJI\"",
10844
- "mtime": "2026-05-22T03:21:01.661Z",
10844
+ "mtime": "2026-05-22T05:53:27.900Z",
10845
10845
  "size": 3451,
10846
10846
  "path": "../public/_nuxt/COIbUy5w.js"
10847
10847
  },
10848
- "/_nuxt/CMWftE4h.js": {
10849
- "type": "text/javascript; charset=utf-8",
10850
- "etag": "\"bc73-irs7yf0750yO82xrMn/X7jkeBxA\"",
10851
- "mtime": "2026-05-22T03:21:01.661Z",
10852
- "size": 48243,
10853
- "path": "../public/_nuxt/CMWftE4h.js"
10854
- },
10855
10848
  "/_nuxt/DFqWEFN4.js": {
10856
10849
  "type": "text/javascript; charset=utf-8",
10857
10850
  "etag": "\"14f4-HAVLxCVCXnZm0u8oApXRDBhScWE\"",
10858
- "mtime": "2026-05-22T03:21:01.661Z",
10851
+ "mtime": "2026-05-22T05:53:27.900Z",
10859
10852
  "size": 5364,
10860
10853
  "path": "../public/_nuxt/DFqWEFN4.js"
10861
10854
  },
10862
10855
  "/_nuxt/CXLmM1yO.js": {
10863
10856
  "type": "text/javascript; charset=utf-8",
10864
10857
  "etag": "\"4a32-Fw0ZEqsjg7b74APkVgMFCTcBxCQ\"",
10865
- "mtime": "2026-05-22T03:21:01.662Z",
10858
+ "mtime": "2026-05-22T05:53:27.901Z",
10866
10859
  "size": 18994,
10867
10860
  "path": "../public/_nuxt/CXLmM1yO.js"
10868
10861
  },
10862
+ "/_nuxt/CMWftE4h.js": {
10863
+ "type": "text/javascript; charset=utf-8",
10864
+ "etag": "\"bc73-irs7yf0750yO82xrMn/X7jkeBxA\"",
10865
+ "mtime": "2026-05-22T05:53:27.901Z",
10866
+ "size": 48243,
10867
+ "path": "../public/_nuxt/CMWftE4h.js"
10868
+ },
10869
10869
  "/_nuxt/DUoLvn3A.js": {
10870
10870
  "type": "text/javascript; charset=utf-8",
10871
10871
  "etag": "\"3cf2-TwHHSkH7vVlOWjAczEQy6IP+0lw\"",
10872
- "mtime": "2026-05-22T03:21:01.661Z",
10872
+ "mtime": "2026-05-22T05:53:27.900Z",
10873
10873
  "size": 15602,
10874
10874
  "path": "../public/_nuxt/DUoLvn3A.js"
10875
10875
  },
10876
10876
  "/_nuxt/DkxY2YMp.js": {
10877
10877
  "type": "text/javascript; charset=utf-8",
10878
10878
  "etag": "\"4399-3rFV4vv/KswxrAJ9NQha32buQPE\"",
10879
- "mtime": "2026-05-22T03:21:01.662Z",
10879
+ "mtime": "2026-05-22T05:53:27.900Z",
10880
10880
  "size": 17305,
10881
10881
  "path": "../public/_nuxt/DkxY2YMp.js"
10882
10882
  },
10883
10883
  "/_nuxt/D_W11Quh.js": {
10884
10884
  "type": "text/javascript; charset=utf-8",
10885
10885
  "etag": "\"11426-X4U7gtaJhTDKTtUXLGjq2GLguBo\"",
10886
- "mtime": "2026-05-22T03:21:01.662Z",
10886
+ "mtime": "2026-05-22T05:53:27.901Z",
10887
10887
  "size": 70694,
10888
10888
  "path": "../public/_nuxt/D_W11Quh.js"
10889
10889
  },
10890
10890
  "/_nuxt/HiqUua3-.js": {
10891
10891
  "type": "text/javascript; charset=utf-8",
10892
10892
  "etag": "\"2a70-eSH6QudruLCR6jtZZFjhyeyirUU\"",
10893
- "mtime": "2026-05-22T03:21:01.662Z",
10893
+ "mtime": "2026-05-22T05:53:27.901Z",
10894
10894
  "size": 10864,
10895
10895
  "path": "../public/_nuxt/HiqUua3-.js"
10896
10896
  },
10897
+ "/_nuxt/entry.vHfFzkyD.css": {
10898
+ "type": "text/css; charset=utf-8",
10899
+ "etag": "\"1d217-AX0vUIWFE2kL17zPKjOPcQBxadQ\"",
10900
+ "mtime": "2026-05-22T05:53:27.901Z",
10901
+ "size": 119319,
10902
+ "path": "../public/_nuxt/entry.vHfFzkyD.css"
10903
+ },
10897
10904
  "/_nuxt/error-404.CFBEg71j.css": {
10898
10905
  "type": "text/css; charset=utf-8",
10899
10906
  "etag": "\"97e-GvhaEAryQvrSXyDcP4RiHXzYb5o\"",
10900
- "mtime": "2026-05-22T03:21:01.662Z",
10907
+ "mtime": "2026-05-22T05:53:27.901Z",
10901
10908
  "size": 2430,
10902
10909
  "path": "../public/_nuxt/error-404.CFBEg71j.css"
10903
10910
  },
10904
- "/_nuxt/DgKrPjze.js": {
10905
- "type": "text/javascript; charset=utf-8",
10906
- "etag": "\"35466-BQwxEwkorZeoi3JtsQAovpFUAlE\"",
10907
- "mtime": "2026-05-22T03:21:01.662Z",
10908
- "size": 218214,
10909
- "path": "../public/_nuxt/DgKrPjze.js"
10910
- },
10911
10911
  "/_nuxt/error-500.BqCnH31G.css": {
10912
10912
  "type": "text/css; charset=utf-8",
10913
10913
  "etag": "\"773-Tpf6lA6A2FEDtjLyWUXKolBZ3hM\"",
10914
- "mtime": "2026-05-22T03:21:01.662Z",
10914
+ "mtime": "2026-05-22T05:53:27.902Z",
10915
10915
  "size": 1907,
10916
10916
  "path": "../public/_nuxt/error-500.BqCnH31G.css"
10917
10917
  },
10918
10918
  "/_nuxt/uHQwCIHg.js": {
10919
10919
  "type": "text/javascript; charset=utf-8",
10920
10920
  "etag": "\"eb4-eU+Hz4IGbA/36UMYmP8kZLNbF6s\"",
10921
- "mtime": "2026-05-22T03:21:01.662Z",
10921
+ "mtime": "2026-05-22T05:53:27.901Z",
10922
10922
  "size": 3764,
10923
10923
  "path": "../public/_nuxt/uHQwCIHg.js"
10924
10924
  },
10925
10925
  "/_nuxt/builds/latest.json": {
10926
10926
  "type": "application/json",
10927
- "etag": "\"47-R768XgFwS7aWo3M7f0Rd4qFvLFU\"",
10928
- "mtime": "2026-05-22T03:21:01.655Z",
10927
+ "etag": "\"47-UBVtq2y0JrXgoS8AdDZ8fO6XEMo\"",
10928
+ "mtime": "2026-05-22T05:53:27.897Z",
10929
10929
  "size": 71,
10930
10930
  "path": "../public/_nuxt/builds/latest.json"
10931
10931
  },
10932
- "/_nuxt/entry.vHfFzkyD.css": {
10933
- "type": "text/css; charset=utf-8",
10934
- "etag": "\"1d217-AX0vUIWFE2kL17zPKjOPcQBxadQ\"",
10935
- "mtime": "2026-05-22T03:21:01.663Z",
10936
- "size": 119319,
10937
- "path": "../public/_nuxt/entry.vHfFzkyD.css"
10932
+ "/_nuxt/DgKrPjze.js": {
10933
+ "type": "text/javascript; charset=utf-8",
10934
+ "etag": "\"35466-BQwxEwkorZeoi3JtsQAovpFUAlE\"",
10935
+ "mtime": "2026-05-22T05:53:27.901Z",
10936
+ "size": 218214,
10937
+ "path": "../public/_nuxt/DgKrPjze.js"
10938
10938
  },
10939
- "/_nuxt/builds/meta/6f98f1cb-266c-475e-a249-dad346a55f24.json": {
10939
+ "/_nuxt/builds/meta/16d9b7dd-abbb-4267-9366-349908b2332a.json": {
10940
10940
  "type": "application/json",
10941
- "etag": "\"58-DVRwvBoeDviTnDlPOTXbm/WD2oU\"",
10942
- "mtime": "2026-05-22T03:21:01.652Z",
10941
+ "etag": "\"58-zYnnbZF+smM7QXjnO48S8D/U2tU\"",
10942
+ "mtime": "2026-05-22T05:53:27.894Z",
10943
10943
  "size": 88,
10944
- "path": "../public/_nuxt/builds/meta/6f98f1cb-266c-475e-a249-dad346a55f24.json"
10944
+ "path": "../public/_nuxt/builds/meta/16d9b7dd-abbb-4267-9366-349908b2332a.json"
10945
10945
  },
10946
10946
  "/_nuxt/DtbPvE6R.js": {
10947
10947
  "type": "text/javascript; charset=utf-8",
10948
10948
  "etag": "\"4135e-cTbNR7mK7vcfB4JteOXxth6FUlY\"",
10949
- "mtime": "2026-05-22T03:21:01.661Z",
10949
+ "mtime": "2026-05-22T05:53:27.902Z",
10950
10950
  "size": 267102,
10951
10951
  "path": "../public/_nuxt/DtbPvE6R.js"
10952
10952
  }
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -11,7 +11,7 @@ import 'node:buffer';
11
11
  import 'node:fs';
12
12
  import 'node:path';
13
13
  import 'node:crypto';
14
- import 'better-sqlite3';
14
+ import 'node:sqlite';
15
15
  import 'glob';
16
16
  import 'chokidar';
17
17
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -7,7 +7,7 @@ import 'node:buffer';
7
7
  import 'node:fs';
8
8
  import 'node:path';
9
9
  import 'node:crypto';
10
- import 'better-sqlite3';
10
+ import 'node:sqlite';
11
11
  import 'glob';
12
12
  import 'chokidar';
13
13
  import 'node:os';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "usage-board-prod",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -15,14 +15,11 @@
15
15
  "@vue/runtime-dom": "3.5.32",
16
16
  "@vue/server-renderer": "3.5.32",
17
17
  "@vue/shared": "3.5.32",
18
- "better-sqlite3": "12.10.0",
19
- "bindings": "1.5.0",
20
18
  "chokidar": "5.0.0",
21
19
  "consola": "3.4.2",
22
20
  "devalue": "5.7.1",
23
21
  "entities": "7.0.1",
24
22
  "estree-walker": "2.0.2",
25
- "file-uri-to-path": "1.0.0",
26
23
  "glob": "13.0.6",
27
24
  "hookable": "6.1.1",
28
25
  "md5-typescript": "1.0.5",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "usage-board",
3
3
  "type": "module",
4
- "version": "3.1.1",
4
+ "version": "3.1.3",
5
5
  "packageManager": "pnpm@10.33.0",
6
6
  "description": "An all-in-one dashboard to quickly analyze token usage from local json files",
7
7
  "license": "MIT",
@@ -26,17 +26,20 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
+ "engines": {
30
+ "node": ">=22.12.0"
31
+ },
29
32
  "scripts": {
30
33
  "build": "nuxt build && tsdown && rimraf ./dist/nitro.json",
31
34
  "dev": "nuxt dev",
32
35
  "generate": "nuxt generate",
33
36
  "preview": "nuxt preview",
34
37
  "typecheck": "nuxt typecheck",
35
- "lint": "eslint .",
38
+ "lint": "nuxt prepare && eslint .",
36
39
  "lint:fix": "eslint --fix",
37
40
  "dev:cli": "tsdown -w",
38
41
  "test": "vitest",
39
- "prepare": "nuxt prepare && simple-git-hooks",
42
+ "prepare": "simple-git-hooks",
40
43
  "prepublishOnly": "pnpm build"
41
44
  },
42
45
  "publishConfig": {
@@ -44,7 +47,6 @@
44
47
  "access": "public"
45
48
  },
46
49
  "dependencies": {
47
- "better-sqlite3": "^12.10.0",
48
50
  "cac": "^7.0.0",
49
51
  "crossws": "^0.4.5",
50
52
  "glob": "^13.0.6"
@@ -63,7 +65,6 @@
63
65
  "@nuxt/icon": "^2.2.1",
64
66
  "@tailwindcss/vite": "^4.2.2",
65
67
  "@tanstack/vue-table": "^8.21.3",
66
- "@types/better-sqlite3": "^7.6.13",
67
68
  "@types/node": "^25.6.0",
68
69
  "@types/ws": "^8.18.1",
69
70
  "@unovis/ts": "^1.6.4",
@@ -1 +0,0 @@
1
- {"id":"6f98f1cb-266c-475e-a249-dad346a55f24","timestamp":1779420050911,"prerendered":[]}
@@ -1,90 +0,0 @@
1
- 'use strict';
2
- const fs = require('fs');
3
- const path = require('path');
4
- const util = require('./util');
5
- const SqliteError = require('./sqlite-error');
6
-
7
- let DEFAULT_ADDON;
8
-
9
- function Database(filenameGiven, options) {
10
- if (new.target == null) {
11
- return new Database(filenameGiven, options);
12
- }
13
-
14
- // Apply defaults
15
- let buffer;
16
- if (Buffer.isBuffer(filenameGiven)) {
17
- buffer = filenameGiven;
18
- filenameGiven = ':memory:';
19
- }
20
- if (filenameGiven == null) filenameGiven = '';
21
- if (options == null) options = {};
22
-
23
- // Validate arguments
24
- if (typeof filenameGiven !== 'string') throw new TypeError('Expected first argument to be a string');
25
- if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
26
- if ('readOnly' in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"');
27
- if ('memory' in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)');
28
-
29
- // Interpret options
30
- const filename = filenameGiven.trim();
31
- const anonymous = filename === '' || filename === ':memory:';
32
- const readonly = util.getBooleanOption(options, 'readonly');
33
- const fileMustExist = util.getBooleanOption(options, 'fileMustExist');
34
- const timeout = 'timeout' in options ? options.timeout : 5000;
35
- const verbose = 'verbose' in options ? options.verbose : null;
36
- const nativeBinding = 'nativeBinding' in options ? options.nativeBinding : null;
37
-
38
- // Validate interpreted options
39
- if (readonly && anonymous && !buffer) throw new TypeError('In-memory/temporary databases cannot be readonly');
40
- if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer');
41
- if (timeout > 0x7fffffff) throw new RangeError('Option "timeout" cannot be greater than 2147483647');
42
- if (verbose != null && typeof verbose !== 'function') throw new TypeError('Expected the "verbose" option to be a function');
43
- if (nativeBinding != null && typeof nativeBinding !== 'string' && typeof nativeBinding !== 'object') throw new TypeError('Expected the "nativeBinding" option to be a string or addon object');
44
-
45
- // Load the native addon
46
- let addon;
47
- if (nativeBinding == null) {
48
- addon = DEFAULT_ADDON || (DEFAULT_ADDON = require('bindings')('better_sqlite3.node'));
49
- } else if (typeof nativeBinding === 'string') {
50
- // See <https://webpack.js.org/api/module-variables/#__non_webpack_require__-webpack-specific>
51
- const requireFunc = typeof __non_webpack_require__ === 'function' ? __non_webpack_require__ : require;
52
- addon = requireFunc(path.resolve(nativeBinding).replace(/(\.node)?$/, '.node'));
53
- } else {
54
- // See <https://github.com/WiseLibs/better-sqlite3/issues/972>
55
- addon = nativeBinding;
56
- }
57
-
58
- if (!addon.isInitialized) {
59
- addon.setErrorConstructor(SqliteError);
60
- addon.isInitialized = true;
61
- }
62
-
63
- // Make sure the specified directory exists
64
- if (!anonymous && !filename.startsWith('file:') && !fs.existsSync(path.dirname(filename))) {
65
- throw new TypeError('Cannot open database because the directory does not exist');
66
- }
67
-
68
- Object.defineProperties(this, {
69
- [util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },
70
- ...wrappers.getters,
71
- });
72
- }
73
-
74
- const wrappers = require('./methods/wrappers');
75
- Database.prototype.prepare = wrappers.prepare;
76
- Database.prototype.transaction = require('./methods/transaction');
77
- Database.prototype.pragma = require('./methods/pragma');
78
- Database.prototype.backup = require('./methods/backup');
79
- Database.prototype.serialize = require('./methods/serialize');
80
- Database.prototype.function = require('./methods/function');
81
- Database.prototype.aggregate = require('./methods/aggregate');
82
- Database.prototype.table = require('./methods/table');
83
- Database.prototype.loadExtension = wrappers.loadExtension;
84
- Database.prototype.exec = wrappers.exec;
85
- Database.prototype.close = wrappers.close;
86
- Database.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;
87
- Database.prototype.unsafeMode = wrappers.unsafeMode;
88
- Database.prototype[util.inspect] = require('./methods/inspect');
89
-
90
- module.exports = Database;
@@ -1,3 +0,0 @@
1
- 'use strict';
2
- module.exports = require('./database');
3
- module.exports.SqliteError = require('./sqlite-error');