token-usage-dashboard 1.0.19 → 1.0.21
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/build/adapter-node.js +1 -1
- package/build/client/_app/immutable/chunks/C1sJReAz.js +3 -0
- package/build/client/_app/immutable/chunks/C1sJReAz.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1sJReAz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C2_oK6Yg.js → CY61d4eO.js} +1 -1
- package/build/client/_app/immutable/chunks/CY61d4eO.js.br +0 -0
- package/build/client/_app/immutable/chunks/CY61d4eO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DkRfJXwX.js → DqDXC22T.js} +1 -1
- package/build/client/_app/immutable/chunks/DqDXC22T.js.br +0 -0
- package/build/client/_app/immutable/chunks/DqDXC22T.js.gz +0 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js +1 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js.br +1 -0
- package/build/client/_app/immutable/chunks/MCCUCfWF.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DGKqaBO1.js → app.c-l2PDnA.js} +2 -2
- package/build/client/_app/immutable/entry/app.c-l2PDnA.js.br +0 -0
- package/build/client/_app/immutable/entry/app.c-l2PDnA.js.gz +0 -0
- package/build/client/_app/immutable/entry/{start.BPslY-3R.js → start.Ch_y930O.js} +2 -2
- package/build/client/_app/immutable/entry/start.Ch_y930O.js.br +3 -0
- package/build/client/_app/immutable/entry/start.Ch_y930O.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js +1 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.C6Tx-XmR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.CArPcl3H.js → 1.Be7Mrr0U.js} +1 -1
- package/build/client/_app/immutable/nodes/1.Be7Mrr0U.js.br +3 -0
- package/build/client/_app/immutable/nodes/1.Be7Mrr0U.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js +2 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.ByGQ00I8.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/adapter-index.js +1 -2
- package/build/server/adapter-node-env.js +1 -2
- package/build/server/adapter-node-handler.js +4 -8
- package/build/server/chunks/config.js +1 -2
- package/build/server/chunks/functions.js +1 -2
- package/build/server/chunks/instance.js +33 -63
- package/build/server/chunks/internal.js +33 -65
- package/build/server/chunks/navigation.js +1 -2
- package/build/server/chunks/queries.js +10 -20
- package/build/server/chunks/range.js +3 -6
- package/build/server/chunks/refresh.js +2 -4
- package/build/server/chunks/request.js +1 -2
- package/build/server/chunks/server-errors.js +2 -4
- package/build/server/chunks/server.js +0 -1
- package/build/server/chunks/server2.js +17 -38
- package/build/server/chunks/shared.js +1 -2
- package/build/server/chunks/uneval.js +3 -6
- package/build/server/entries/endpoints/api/refresh/_server.ts.js +1 -2
- package/build/server/entries/endpoints/api/settings/_server.ts.js +1 -2
- package/build/server/entries/endpoints/api/usage/_server.ts.js +1 -2
- package/build/server/entries/fallbacks/error.svelte.js +2 -4
- package/build/server/entries/hooks.server.js +1 -2
- package/build/server/entries/pages/_layout.svelte.js +1 -2
- package/build/server/entries/pages/_page.server.ts.js +1 -2
- package/build/server/entries/pages/_page.svelte.js +24 -44
- package/build/server/index.js +1 -2
- package/build/server/manifest-full.js +1 -1
- package/build/server/manifest.js +1 -1
- package/build/server/nodes/0.js +1 -1
- package/build/server/nodes/1.js +1 -1
- package/build/server/nodes/2.js +1 -1
- package/build/server/remote-entry.js +7 -14
- package/build/server/server.js +1 -1
- package/package.json +1 -1
- package/build/client/_app/immutable/chunks/BLLqPIda.js +0 -3
- package/build/client/_app/immutable/chunks/BLLqPIda.js.br +0 -0
- package/build/client/_app/immutable/chunks/BLLqPIda.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C2_oK6Yg.js.br +0 -0
- package/build/client/_app/immutable/chunks/C2_oK6Yg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ChHPZo_0.js +0 -1
- package/build/client/_app/immutable/chunks/ChHPZo_0.js.br +0 -1
- package/build/client/_app/immutable/chunks/ChHPZo_0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkRfJXwX.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkRfJXwX.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DGKqaBO1.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DGKqaBO1.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BPslY-3R.js.br +0 -2
- package/build/client/_app/immutable/entry/start.BPslY-3R.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js +0 -1
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.yxxqRuA2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CArPcl3H.js.br +0 -1
- package/build/client/_app/immutable/nodes/1.CArPcl3H.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.tImriDO_.js +0 -2
- package/build/client/_app/immutable/nodes/2.tImriDO_.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.tImriDO_.js.gz +0 -0
|
@@ -2,7 +2,7 @@ import { a as SvelteKitError, i as Redirect, n as HandledHttpError, o as Validat
|
|
|
2
2
|
import { W as request_store_after_await, X as url_search_unavailable_prerender, Z as capture_error, h as handle_error_hook_failed, i as action_response_not_serializable, n as action_default_with_named, r as action_name_reserved, s as action_throw_fail, t as action_data_not_serializable, v as load_not_plain_object, y as load_not_serializable } from "./server-errors.js";
|
|
3
3
|
import { a as is_buffer, c as is_valid_array_len, d as valid_array_indices, f as MAX_ARRAY_INDEX, i as get_type, l as stringify_key, n as DevalueError, o as is_plain_object$1, r as enumerable_symbols, s as is_valid_array_index, t as uneval$1, u as stringify_string } from "./uneval.js";
|
|
4
4
|
import { n as noop } from "./functions.js";
|
|
5
|
-
|
|
5
|
+
// node_modules/@sveltejs/kit/src/messages/internal/shared.js
|
|
6
6
|
/**
|
|
7
7
|
* Whether shared errors include their full text on the server even though `DEV` is false. This is
|
|
8
8
|
* enabled while the app is being built (analysed or prerendered)
|
|
@@ -31,12 +31,10 @@ var app_dir = "_app";
|
|
|
31
31
|
function set_assets(path) {
|
|
32
32
|
assets = path;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/dev.js
|
|
34
|
+
// node_modules/@sveltejs/kit/src/runtime/server/dev.js
|
|
36
35
|
var symbol = Symbol.for("sveltekit.global_state");
|
|
37
36
|
globalThis[symbol] ??= {};
|
|
38
|
-
|
|
39
|
-
//#region node_modules/@sveltejs/kit/src/runtime/utils.js
|
|
37
|
+
// node_modules/@sveltejs/kit/src/runtime/utils.js
|
|
40
38
|
var text_encoder$1 = new TextEncoder();
|
|
41
39
|
/**
|
|
42
40
|
* `ReadableStream.from`, for runtimes that don't support it (as of writing, every Bun release)
|
|
@@ -94,8 +92,7 @@ function base64_decode(encoded) {
|
|
|
94
92
|
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
95
93
|
return bytes;
|
|
96
94
|
}
|
|
97
|
-
|
|
98
|
-
//#region node_modules/@sveltejs/kit/src/pathname.js
|
|
95
|
+
// node_modules/@sveltejs/kit/src/pathname.js
|
|
99
96
|
var DATA_SUFFIX = "/__data.json";
|
|
100
97
|
var HTML_DATA_SUFFIX = ".html__data.json";
|
|
101
98
|
/** @param {string} pathname */
|
|
@@ -138,8 +135,7 @@ function strip_resolution_suffix(pathname) {
|
|
|
138
135
|
if (pathname.endsWith(HTML_ROUTE_SUFFIX)) return pathname.slice(0, -15) + ".html";
|
|
139
136
|
return pathname.slice(0, -11);
|
|
140
137
|
}
|
|
141
|
-
|
|
142
|
-
//#region node_modules/@sveltejs/kit/src/constants.js
|
|
138
|
+
// node_modules/@sveltejs/kit/src/constants.js
|
|
143
139
|
/**
|
|
144
140
|
* A fake asset path used in `vite dev` and `vite preview`, so that we can
|
|
145
141
|
* serve local assets while verifying that requests are correctly prefixed
|
|
@@ -175,8 +171,7 @@ var IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
|
|
|
175
171
|
* is stored in this header.
|
|
176
172
|
*/
|
|
177
173
|
var REROUTED_URL_HEADER = "x-sveltekit-rerouted-url";
|
|
178
|
-
|
|
179
|
-
//#region node_modules/@sveltejs/kit/src/exports/internal/server/event.js
|
|
174
|
+
// node_modules/@sveltejs/kit/src/exports/internal/server/event.js
|
|
180
175
|
/** @import { RequestEvent } from '@sveltejs/kit' */
|
|
181
176
|
/** @import { RequestStore } from 'types' */
|
|
182
177
|
/** @import { AsyncLocalStorage } from 'node:async_hooks' */
|
|
@@ -209,8 +204,7 @@ function with_request_store(store, fn) {
|
|
|
209
204
|
if (!IN_WEBCONTAINER) sync_store = null;
|
|
210
205
|
}
|
|
211
206
|
}
|
|
212
|
-
|
|
213
|
-
//#region node_modules/@sveltejs/kit/src/telemetry.js
|
|
207
|
+
// node_modules/@sveltejs/kit/src/telemetry.js
|
|
214
208
|
/** @import { Span, SpanContext } from '@opentelemetry/api' */
|
|
215
209
|
/**
|
|
216
210
|
* @type {Span}
|
|
@@ -258,8 +252,7 @@ var noop_span_context = {
|
|
|
258
252
|
spanId: "",
|
|
259
253
|
traceFlags: 0
|
|
260
254
|
};
|
|
261
|
-
|
|
262
|
-
//#region node_modules/@sveltejs/kit/src/exports/internal/server/telemetry.js
|
|
255
|
+
// node_modules/@sveltejs/kit/src/exports/internal/server/telemetry.js
|
|
263
256
|
/** @import { Tracer, SpanStatusCode, PropagationAPI, ContextAPI } from '@opentelemetry/api' */
|
|
264
257
|
/** @import { RecordSpan } from 'types' */
|
|
265
258
|
/** @type {Promise<{ tracer: Tracer, SpanStatusCode: typeof SpanStatusCode, propagation: PropagationAPI, context: ContextAPI }> | null} */
|
|
@@ -314,8 +307,7 @@ async function record_span({ name, attributes, fn }) {
|
|
|
314
307
|
}
|
|
315
308
|
});
|
|
316
309
|
}
|
|
317
|
-
|
|
318
|
-
//#region node_modules/@sveltejs/kit/src/exports/internal/server/index.js
|
|
310
|
+
// node_modules/@sveltejs/kit/src/exports/internal/server/index.js
|
|
319
311
|
/**
|
|
320
312
|
* @template {{ tracing: { enabled: boolean, root: Span, current: Span } }} T
|
|
321
313
|
* @param {T} event_like
|
|
@@ -331,8 +323,7 @@ function merge_tracing(event_like, current) {
|
|
|
331
323
|
}
|
|
332
324
|
};
|
|
333
325
|
}
|
|
334
|
-
|
|
335
|
-
//#region node_modules/@sveltejs/kit/src/messages/shared-errors.js
|
|
326
|
+
// node_modules/@sveltejs/kit/src/messages/shared-errors.js
|
|
336
327
|
/**
|
|
337
328
|
* Invalid array key `%key%`
|
|
338
329
|
* @param {{ "key": string }} _values
|
|
@@ -450,8 +441,7 @@ function url_hash_unavailable(_values) {
|
|
|
450
441
|
if (verbose) throw_error("url_hash_unavailable", `Cannot access \`event.url.hash\`. Consider using \`page.url.hash\` inside a component instead`, url_hash_unavailable);
|
|
451
442
|
throw new Error("https://svelte.dev/e/kit/url_hash_unavailable");
|
|
452
443
|
}
|
|
453
|
-
|
|
454
|
-
//#region node_modules/@sveltejs/kit/src/utils/url.js
|
|
444
|
+
// node_modules/@sveltejs/kit/src/utils/url.js
|
|
455
445
|
/**
|
|
456
446
|
* Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1
|
|
457
447
|
* @type {RegExp}
|
|
@@ -575,8 +565,7 @@ function allow_nodejs_console_log(url) {
|
|
|
575
565
|
return inspect(new URL(url), opts);
|
|
576
566
|
};
|
|
577
567
|
}
|
|
578
|
-
|
|
579
|
-
//#region node_modules/@sveltejs/kit/src/messages/shared-warnings.js
|
|
568
|
+
// node_modules/@sveltejs/kit/src/messages/shared-warnings.js
|
|
580
569
|
/**
|
|
581
570
|
* `%route%`: Calling `depends('%dependency%')` will throw an error in Firefox because `%scheme%` is a special URI scheme
|
|
582
571
|
* @param {{ "route": string; "dependency": string; "scheme": string }} _values
|
|
@@ -584,8 +573,7 @@ function allow_nodejs_console_log(url) {
|
|
|
584
573
|
function depends_special_scheme(_values) {
|
|
585
574
|
console.warn("https://svelte.dev/e/kit/depends_special_scheme");
|
|
586
575
|
}
|
|
587
|
-
|
|
588
|
-
//#region node_modules/@sveltejs/kit/src/exports/index.js
|
|
576
|
+
// node_modules/@sveltejs/kit/src/exports/index.js
|
|
589
577
|
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
590
578
|
var text_encoder = new TextEncoder();
|
|
591
579
|
/**
|
|
@@ -683,8 +671,7 @@ function text(body, init) {
|
|
|
683
671
|
headers
|
|
684
672
|
});
|
|
685
673
|
}
|
|
686
|
-
|
|
687
|
-
//#region node_modules/@sveltejs/kit/src/utils/routing.js
|
|
674
|
+
// node_modules/@sveltejs/kit/src/utils/routing.js
|
|
688
675
|
/** @import { ParamMatcher, ParamValue } from '@sveltejs/kit/params' */
|
|
689
676
|
var escape_sequence_pattern = /\[([ux])\+([^\]]+)\]/;
|
|
690
677
|
/**
|
|
@@ -766,11 +753,9 @@ function find_route(path, routes, matchers) {
|
|
|
766
753
|
}
|
|
767
754
|
return null;
|
|
768
755
|
}
|
|
769
|
-
|
|
770
|
-
//#region .svelte-kit/generated/build/shared/error-template.js
|
|
756
|
+
// .svelte-kit/generated/build/shared/error-template.js
|
|
771
757
|
var error_template_default = ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
|
|
772
|
-
|
|
773
|
-
//#region .svelte-kit/generated/build/server.js
|
|
758
|
+
// .svelte-kit/generated/build/server.js
|
|
774
759
|
var options = {
|
|
775
760
|
app_template_contains_nonce: false,
|
|
776
761
|
csp: {
|
|
@@ -808,8 +793,7 @@ async function get_hooks() {
|
|
|
808
793
|
transport
|
|
809
794
|
};
|
|
810
795
|
}
|
|
811
|
-
|
|
812
|
-
//#region node_modules/devalue/src/base64.js
|
|
796
|
+
// node_modules/devalue/src/base64.js
|
|
813
797
|
/** @type {(array_buffer: ArrayBuffer) => string} */
|
|
814
798
|
function encode_native(array_buffer) {
|
|
815
799
|
return new Uint8Array(array_buffer).toBase64();
|
|
@@ -849,8 +833,7 @@ var native = typeof Uint8Array.fromBase64 === "function";
|
|
|
849
833
|
var buffer = typeof process === "object" && process.versions?.node !== void 0;
|
|
850
834
|
var encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
|
|
851
835
|
var decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
|
|
852
|
-
|
|
853
|
-
//#region node_modules/devalue/src/operations.js
|
|
836
|
+
// node_modules/devalue/src/operations.js
|
|
854
837
|
/**
|
|
855
838
|
* Merges caller-provided operation overrides over the defaults. Iterating the
|
|
856
839
|
* default keys (rather than the override's own keys) means nullish members
|
|
@@ -958,8 +941,7 @@ var default_parse_operations = /* @__PURE__ */ Object.freeze({
|
|
|
958
941
|
map.set(key, value);
|
|
959
942
|
}
|
|
960
943
|
});
|
|
961
|
-
|
|
962
|
-
//#region node_modules/devalue/src/parse.js
|
|
944
|
+
// node_modules/devalue/src/parse.js
|
|
963
945
|
/**
|
|
964
946
|
* Revive a value serialized with `devalue.stringify`
|
|
965
947
|
* @param {string} serialized
|
|
@@ -1123,8 +1105,7 @@ function unflatten(parsed, revivers, options) {
|
|
|
1123
1105
|
}
|
|
1124
1106
|
return hydrate(0);
|
|
1125
1107
|
}
|
|
1126
|
-
|
|
1127
|
-
//#region node_modules/devalue/src/stringify.js
|
|
1108
|
+
// node_modules/devalue/src/stringify.js
|
|
1128
1109
|
/**
|
|
1129
1110
|
* Turn a value into a JSON string that can be parsed with `devalue.parse`
|
|
1130
1111
|
* @param {any} value
|
|
@@ -1352,8 +1333,7 @@ function stringify_primitive(thing) {
|
|
|
1352
1333
|
if (type === "bigint") return `["BigInt","${thing}"]`;
|
|
1353
1334
|
return String(thing);
|
|
1354
1335
|
}
|
|
1355
|
-
|
|
1356
|
-
//#region node_modules/@sveltejs/kit/src/runtime/form-utils.js
|
|
1336
|
+
// node_modules/@sveltejs/kit/src/runtime/form-utils.js
|
|
1357
1337
|
/** @import { BinaryFormMeta, InternalRemoteFormIssue } from 'types' */
|
|
1358
1338
|
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
1359
1339
|
/**
|
|
@@ -1939,8 +1919,7 @@ function build_path_string(path) {
|
|
|
1939
1919
|
else result += result === "" ? segment : "." + segment;
|
|
1940
1920
|
return result;
|
|
1941
1921
|
}
|
|
1942
|
-
|
|
1943
|
-
//#region node_modules/@sveltejs/kit/src/utils/http.js
|
|
1922
|
+
// node_modules/@sveltejs/kit/src/utils/http.js
|
|
1944
1923
|
/**
|
|
1945
1924
|
* Given an Accept header and a list of possible content types, pick
|
|
1946
1925
|
* the most suitable one to respond with
|
|
@@ -1996,8 +1975,7 @@ function matches_content_type(header, ...types) {
|
|
|
1996
1975
|
function is_form_content_type(request) {
|
|
1997
1976
|
return matches_content_type(request.headers.get("content-type"), "application/x-www-form-urlencoded", "multipart/form-data", "text/plain", BINARY_FORM_CONTENT_TYPE);
|
|
1998
1977
|
}
|
|
1999
|
-
|
|
2000
|
-
//#region node_modules/@sveltejs/kit/src/runtime/app/internal/transport.js
|
|
1978
|
+
// node_modules/@sveltejs/kit/src/runtime/app/internal/transport.js
|
|
2001
1979
|
/** @import { Transport } from '@sveltejs/kit/hooks' */
|
|
2002
1980
|
/** @type {(thing: any) => string} */
|
|
2003
1981
|
var uneval = () => {
|
|
@@ -2036,8 +2014,7 @@ function init_transport(transport) {
|
|
|
2036
2014
|
stringify = (data) => stringify$1(data, encoders);
|
|
2037
2015
|
parse = (data) => parse$1(data, decoders);
|
|
2038
2016
|
}
|
|
2039
|
-
|
|
2040
|
-
//#region node_modules/@sveltejs/kit/src/runtime/shared.js
|
|
2017
|
+
// node_modules/@sveltejs/kit/src/runtime/shared.js
|
|
2041
2018
|
/**
|
|
2042
2019
|
* @param {string} route_id
|
|
2043
2020
|
* @param {string} dep
|
|
@@ -2240,8 +2217,7 @@ function split_remote_key(key) {
|
|
|
2240
2217
|
payload: key.slice(i + 1)
|
|
2241
2218
|
};
|
|
2242
2219
|
}
|
|
2243
|
-
|
|
2244
|
-
//#region node_modules/@sveltejs/kit/src/utils/error.js
|
|
2220
|
+
// node_modules/@sveltejs/kit/src/utils/error.js
|
|
2245
2221
|
/**
|
|
2246
2222
|
* @param {Error} error
|
|
2247
2223
|
* @param {string} stack
|
|
@@ -2275,8 +2251,7 @@ function normalize_error(error) {
|
|
|
2275
2251
|
function get_status(error) {
|
|
2276
2252
|
return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
2277
2253
|
}
|
|
2278
|
-
|
|
2279
|
-
//#region node_modules/@sveltejs/kit/src/messages/server-warnings.js
|
|
2254
|
+
// node_modules/@sveltejs/kit/src/messages/server-warnings.js
|
|
2280
2255
|
/**
|
|
2281
2256
|
* `cache-control` header contains empty directives. (While parsing `%value%`.)
|
|
2282
2257
|
* @param {{ "value": string }} _values
|
|
@@ -2354,8 +2329,7 @@ function streaming_without_csr(_values) {
|
|
|
2354
2329
|
function transform_page_chunk_comments(_values) {
|
|
2355
2330
|
console.warn("https://svelte.dev/e/kit/transform_page_chunk_comments");
|
|
2356
2331
|
}
|
|
2357
|
-
|
|
2358
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/errors.js
|
|
2332
|
+
// node_modules/@sveltejs/kit/src/runtime/server/errors.js
|
|
2359
2333
|
/**
|
|
2360
2334
|
* @param {import('@sveltejs/kit').RequestEvent} event
|
|
2361
2335
|
* @param {import('types').RequestState} state
|
|
@@ -2459,8 +2433,7 @@ function log_handle_error_hook_failure(error, hook_error) {
|
|
|
2459
2433
|
if (error instanceof SvelteKitError) console.error(`Original error: ${error.status} ${error.text}: ${error.message}`);
|
|
2460
2434
|
else console.error("Original error:", error);
|
|
2461
2435
|
}
|
|
2462
|
-
|
|
2463
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/utils.js
|
|
2436
|
+
// node_modules/@sveltejs/kit/src/runtime/server/utils.js
|
|
2464
2437
|
/**
|
|
2465
2438
|
* @param {Partial<Record<import('types').HttpMethod, any>>} mod
|
|
2466
2439
|
* @param {import('types').HttpMethod} method
|
|
@@ -2491,7 +2464,7 @@ function redirect_response(status, location) {
|
|
|
2491
2464
|
* @param {Response} response
|
|
2492
2465
|
*/
|
|
2493
2466
|
function with_version_header(response) {
|
|
2494
|
-
response.headers.set("x-sveltekit-version", "
|
|
2467
|
+
response.headers.set("x-sveltekit-version", "1793232173383");
|
|
2495
2468
|
return response;
|
|
2496
2469
|
}
|
|
2497
2470
|
/**
|
|
@@ -2550,8 +2523,7 @@ function get_node_type(node_id) {
|
|
|
2550
2523
|
function count_non_ssi_comments(str) {
|
|
2551
2524
|
return (str.match(/<!--(?!#)/g) ?? []).length;
|
|
2552
2525
|
}
|
|
2553
|
-
|
|
2554
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/page/actions.js
|
|
2526
|
+
// node_modules/@sveltejs/kit/src/runtime/server/page/actions.js
|
|
2555
2527
|
/** @import { RequestEvent, Actions } from '@sveltejs/kit' */
|
|
2556
2528
|
/** @import { ActionResult } from '$app/forms' */
|
|
2557
2529
|
/** @import { SSRNode, ServerNode, ServerActionResult } from 'types' */
|
|
@@ -2764,8 +2736,7 @@ function try_serialize(data, fn, route_id) {
|
|
|
2764
2736
|
throw error;
|
|
2765
2737
|
}
|
|
2766
2738
|
}
|
|
2767
|
-
|
|
2768
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/remote-functions.js
|
|
2739
|
+
// node_modules/@sveltejs/kit/src/runtime/server/remote-functions.js
|
|
2769
2740
|
/** @import { RequestEvent } from '@sveltejs/kit' */
|
|
2770
2741
|
/** @import { RemoteForm } from '$app/server' */
|
|
2771
2742
|
/** @import { RemoteFormInternals, RemoteFunctionData, RemoteFunctionResponse, RemoteInternals, RequestState, ServerActionResult } from 'types' */
|
|
@@ -3146,8 +3117,7 @@ function get_remote_id(url) {
|
|
|
3146
3117
|
function get_remote_action(url) {
|
|
3147
3118
|
return url.searchParams.get("/remote");
|
|
3148
3119
|
}
|
|
3149
|
-
|
|
3150
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/sourcemaps.js
|
|
3120
|
+
// node_modules/@sveltejs/kit/src/runtime/server/sourcemaps.js
|
|
3151
3121
|
var fs = globalThis.process?.getBuiltinModule?.("node:fs");
|
|
3152
3122
|
var url = globalThis.process?.getBuiltinModule?.("node:url");
|
|
3153
3123
|
var path = globalThis.process?.getBuiltinModule?.("node:path");
|
|
@@ -3260,8 +3230,7 @@ function trace(file, line, column) {
|
|
|
3260
3230
|
if (source) return { file: source };
|
|
3261
3231
|
return null;
|
|
3262
3232
|
}
|
|
3263
|
-
|
|
3264
|
-
//#region node_modules/@sveltejs/kit/src/runtime/server/internal.js
|
|
3233
|
+
// node_modules/@sveltejs/kit/src/runtime/server/internal.js
|
|
3265
3234
|
var styleText = globalThis.process?.getBuiltinModule?.("node:util")?.styleText ?? ((_format, text) => text);
|
|
3266
3235
|
var read_implementation = false;
|
|
3267
3236
|
var manifest = false;
|
|
@@ -3317,7 +3286,6 @@ function format_response(status, request) {
|
|
|
3317
3286
|
} else log += requested;
|
|
3318
3287
|
return log;
|
|
3319
3288
|
}
|
|
3320
|
-
//#endregion
|
|
3321
3289
|
export { parse as $, cache_control_empty_directive as A, try_get_request_store as At, get_status as B, add_resolution_suffix as Bt, has_prerendered_path as C, resolve as Ct, throw_devalue_error as D, otel as Dt, serialize_uses as E, merge_tracing as Et, form_action_error_without_ssr as F, MUTATIVE_METHODS as Ft, fetch_cache_url as G, base64_encode as Gt, INVALIDATED_PARAM as H, has_resolution_suffix as Ht, load_tracking_after_return as I, PAGE_METHODS as It, validate_depends as J, app_dir as Jt, parse_remote_arg as K, stream_text as Kt, ssr_fetch_eager as L, REROUTED_URL_HEADER as Lt, content_type_invalid as M, BODY_DEPENDENT_METHODS as Mt, cookie_path_mismatch as N, ENDPOINT_METHODS as Nt, with_version_header as O, record_span as Ot, form_action_data_without_ssr as P, IN_WEBCONTAINER as Pt, init_transport as Q, streaming_without_csr as R, SVELTE_KIT_ASSETS as Rt, get_node_type as S, relative_pathname as St, redirect_response as T, invalid_export_location as Tt, TRAILING_SLASH_PARAM as U, strip_data_suffix as Ut, normalize_error as V, has_data_suffix as Vt, create_remote_key as W, strip_resolution_suffix as Wt, encoders as X, set_assets as Xt, validate_load_response as Y, assets as Yt, has_custom_transporters as Z, enable_verbose_errors as Zt, handle_action_request as _, SCHEME as _t, set_hooks as a, deep_set as at, uneval_action_response as b, make_trackable as bt, fix_stack_trace as c, parse_form_key as ct, get_remote_action as d, get_hooks as dt, stringify as et, get_remote_id as f, options as ft, handle_action_json_request as g, text as gt, action_json_redirect as h, isRedirect as ht, read_implementation as i, create_field_proxy as it, cache_control_invalid_directive as j, with_request_store as jt, handle_error_and_jsonify as k, get_request_store as kt, set_fix_stack_trace as l, split_path as lt, handle_remote_form_post as m, error as mt, hooks as n, is_form_content_type as nt, set_manifest as o, flatten_issues as ot, handle_remote_call as p, find_route as pt, stringify_remote_arg as q, text_encoder$1 as qt, manifest as r, negotiate as rt, set_read_implementation as s, normalize_issue as st, format_response as t, uneval as tt, collect_remote_data as u, stringify$1 as ut, is_action_json_request as v, decode_pathname as vt, method_not_allowed as w, invalid_export as wt, count_non_ssi_comments as x, normalize_path as xt, is_action_request as y, disable_search as yt, transform_page_chunk_comments as z, add_data_suffix as zt };
|
|
3322
3290
|
|
|
3323
3291
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as noop, t as disallow_on_server } from "./functions.js";
|
|
2
|
-
|
|
2
|
+
// node_modules/@sveltejs/kit/src/runtime/app/navigation/server.js
|
|
3
3
|
var afterNavigate = noop;
|
|
4
4
|
disallow_on_server("disableScrollHandling", "()");
|
|
5
5
|
disallow_on_server("goto");
|
|
@@ -10,7 +10,6 @@ disallow_on_server("preloadCode");
|
|
|
10
10
|
disallow_on_server("preloadData");
|
|
11
11
|
disallow_on_server("pushState");
|
|
12
12
|
disallow_on_server("replaceState");
|
|
13
|
-
//#endregion
|
|
14
13
|
export { afterNavigate as t };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=navigation.js.map
|
|
@@ -4,7 +4,7 @@ import { basename, dirname, join } from "node:path";
|
|
|
4
4
|
import { DatabaseSync } from "node:sqlite";
|
|
5
5
|
import { existsSync, mkdirSync } from "node:fs";
|
|
6
6
|
import { homedir } from "node:os";
|
|
7
|
-
|
|
7
|
+
// src/lib/server/config.ts
|
|
8
8
|
var home = homedir();
|
|
9
9
|
var env = (name, fallback) => (process.env[name] || "").trim() || fallback;
|
|
10
10
|
var dataHome = env("XDG_DATA_HOME", join(home, ".local", "share"));
|
|
@@ -19,8 +19,7 @@ var config = {
|
|
|
19
19
|
openRouterKey: env("OPENROUTER_API_KEY", ""),
|
|
20
20
|
scanIntervalMs: Number(env("AIUSAGE_SCAN_INTERVAL", "120")) * 1e3
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
//#region src/lib/server/db.ts
|
|
22
|
+
// src/lib/server/db.ts
|
|
24
23
|
/** Bump to throw away scanned rows and read every source file again. */
|
|
25
24
|
var SCHEMA = 2;
|
|
26
25
|
var META = "create table if not exists meta (key text primary key, value text not null)";
|
|
@@ -118,8 +117,7 @@ function readMeta(key) {
|
|
|
118
117
|
function writeMeta(key, value) {
|
|
119
118
|
db().prepare("insert into meta (key, value) values (?, ?) on conflict(key) do update set value = excluded.value").run(key, value);
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
//#region src/lib/server/sources/types.ts
|
|
120
|
+
// src/lib/server/sources/types.ts
|
|
123
121
|
/** Lines that can't be parsed are skipped: a half-written tail is normal, not a fault. */
|
|
124
122
|
function* jsonLines(text, needle) {
|
|
125
123
|
for (const line of text.split("\n")) {
|
|
@@ -132,8 +130,7 @@ function* jsonLines(text, needle) {
|
|
|
132
130
|
}
|
|
133
131
|
}
|
|
134
132
|
var num = (value) => typeof value === "number" && value > 0 ? value : 0;
|
|
135
|
-
|
|
136
|
-
//#region src/lib/server/sources/claude.ts
|
|
133
|
+
// src/lib/server/sources/claude.ts
|
|
137
134
|
/**
|
|
138
135
|
* A streaming message is rewritten in place under one `message.id`, so the caller keeps the
|
|
139
136
|
* highest value it has seen per field. Session comes off the line, never the filename, or a
|
|
@@ -190,8 +187,7 @@ function names(text) {
|
|
|
190
187
|
...typed
|
|
191
188
|
};
|
|
192
189
|
}
|
|
193
|
-
|
|
194
|
-
//#region src/lib/server/sources/codex.ts
|
|
190
|
+
// src/lib/server/sources/codex.ts
|
|
195
191
|
var label = (minutes) => {
|
|
196
192
|
if (minutes === 300) return "Codex 5-hour";
|
|
197
193
|
if (minutes === 10080) return "Codex weekly";
|
|
@@ -209,8 +205,7 @@ function window(id, limit, plan, seenAt) {
|
|
|
209
205
|
seen_at: seenAt
|
|
210
206
|
};
|
|
211
207
|
}
|
|
212
|
-
|
|
213
|
-
//#region src/lib/server/sources/index.ts
|
|
208
|
+
// src/lib/server/sources/index.ts
|
|
214
209
|
var SOURCES = [
|
|
215
210
|
claudeCode,
|
|
216
211
|
{
|
|
@@ -299,8 +294,7 @@ var SOURCES = [
|
|
|
299
294
|
}
|
|
300
295
|
}
|
|
301
296
|
];
|
|
302
|
-
|
|
303
|
-
//#region src/lib/server/problems.ts
|
|
297
|
+
// src/lib/server/problems.ts
|
|
304
298
|
var seen = /* @__PURE__ */ new Map();
|
|
305
299
|
/** Keyed on id so a fault that repeats every scan stays one row in the panel. */
|
|
306
300
|
function report(problem) {
|
|
@@ -314,8 +308,7 @@ function resolve(id) {
|
|
|
314
308
|
}
|
|
315
309
|
var problems = () => [...seen.values()].sort((a, b) => b.at - a.at);
|
|
316
310
|
var describe = (error) => error instanceof Error ? error.message : String(error);
|
|
317
|
-
|
|
318
|
-
//#region src/lib/server/scan.ts
|
|
311
|
+
// src/lib/server/scan.ts
|
|
319
312
|
var running = null;
|
|
320
313
|
var last = [];
|
|
321
314
|
var finishedAt = 0;
|
|
@@ -436,8 +429,7 @@ var scanState = () => ({
|
|
|
436
429
|
scannedAt: finishedAt,
|
|
437
430
|
busy: running !== null
|
|
438
431
|
});
|
|
439
|
-
|
|
440
|
-
//#region src/lib/server/settings.ts
|
|
432
|
+
// src/lib/server/settings.ts
|
|
441
433
|
var DEFAULTS = {
|
|
442
434
|
theme: "auto",
|
|
443
435
|
range: "30d",
|
|
@@ -475,8 +467,7 @@ function saveSettings(patch) {
|
|
|
475
467
|
return next;
|
|
476
468
|
}
|
|
477
469
|
var priceOverrides = () => settings().prices;
|
|
478
|
-
|
|
479
|
-
//#region src/lib/server/queries.ts
|
|
470
|
+
// src/lib/server/queries.ts
|
|
480
471
|
var empty = () => ({
|
|
481
472
|
input: 0,
|
|
482
473
|
output: 0,
|
|
@@ -717,7 +708,6 @@ function rollup(filters) {
|
|
|
717
708
|
problems: problems()
|
|
718
709
|
};
|
|
719
710
|
}
|
|
720
|
-
//#endregion
|
|
721
711
|
export { scan as a, resolve as c, settings as i, db as l, usage as n, describe as o, saveSettings as r, report as s, clearUsageMemo as t, config as u };
|
|
722
712
|
|
|
723
713
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/themes.ts
|
|
2
2
|
var THEMES = [
|
|
3
3
|
{
|
|
4
4
|
id: "auto",
|
|
@@ -37,8 +37,7 @@ var THEMES = [
|
|
|
37
37
|
label: "Solarized dark"
|
|
38
38
|
}
|
|
39
39
|
];
|
|
40
|
-
|
|
41
|
-
//#region src/lib/pricing.ts
|
|
40
|
+
// src/lib/pricing.ts
|
|
42
41
|
/** Dollars per million. Anthropic bills cache reads at a tenth and 5m writes at 1.25x. */
|
|
43
42
|
var anthropic = (input, output, read = .1) => ({
|
|
44
43
|
input,
|
|
@@ -105,8 +104,7 @@ function costOf(model, tokens, overrides = {}) {
|
|
|
105
104
|
return (tokens.input * rate.input + tokens.output * rate.output + tokens.cache_read * rate.cacheRead + short * rate.cacheWrite + tokens.cache_write_long * rate.cacheWrite * LONG_WRITE) / 1e6;
|
|
106
105
|
}
|
|
107
106
|
var totalOf = (tokens) => tokens.input + tokens.output + tokens.cache_read + tokens.cache_write;
|
|
108
|
-
|
|
109
|
-
//#region src/lib/range.ts
|
|
107
|
+
// src/lib/range.ts
|
|
110
108
|
var RANGES = [
|
|
111
109
|
{
|
|
112
110
|
id: "today",
|
|
@@ -158,7 +156,6 @@ function resolveRange(id, now = Date.now()) {
|
|
|
158
156
|
range: range.id
|
|
159
157
|
};
|
|
160
158
|
}
|
|
161
|
-
//#endregion
|
|
162
159
|
export { costOf as a, RATES as i, rangeLabel as n, totalOf as o, resolveRange as r, THEMES as s, RANGES as t };
|
|
163
160
|
|
|
164
161
|
//# sourceMappingURL=range.js.map
|
|
@@ -2,7 +2,7 @@ import { a as scan, c as resolve, i as settings, l as db, n as usage, o as descr
|
|
|
2
2
|
import { r as resolveRange } from "./range.js";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
|
|
5
|
+
// src/lib/server/windows.ts
|
|
6
6
|
var ENDPOINT = "https://api.anthropic.com/api/oauth/usage";
|
|
7
7
|
var LABELS = {
|
|
8
8
|
five_hour: ["Claude 5-hour", 300],
|
|
@@ -69,8 +69,7 @@ async function refreshClaudeWindows(force = false) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/lib/server/refresh.ts
|
|
72
|
+
// src/lib/server/refresh.ts
|
|
74
73
|
var timer = null;
|
|
75
74
|
async function refresh(force = false) {
|
|
76
75
|
await Promise.all([scan().catch((error) => report({
|
|
@@ -101,7 +100,6 @@ function boot() {
|
|
|
101
100
|
timer.unref?.();
|
|
102
101
|
refresh();
|
|
103
102
|
}
|
|
104
|
-
//#endregion
|
|
105
103
|
export { refresh as n, boot as t };
|
|
106
104
|
|
|
107
105
|
//# sourceMappingURL=refresh.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as settings } from "./queries.js";
|
|
2
2
|
import { r as resolveRange } from "./range.js";
|
|
3
|
-
|
|
3
|
+
// src/lib/server/request.ts
|
|
4
4
|
function filtersFrom(url) {
|
|
5
5
|
const id = url.searchParams.get("range") || settings().range;
|
|
6
6
|
const { from, to, range } = resolveRange(id);
|
|
@@ -14,7 +14,6 @@ function filtersFrom(url) {
|
|
|
14
14
|
projects: list("projects")
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { filtersFrom as t };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=request.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// node_modules/@sveltejs/kit/src/messages/internal/server.js
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {{ cause?: unknown; stackless?: boolean }} ServerThrowOptions
|
|
4
4
|
*/
|
|
@@ -30,8 +30,7 @@ function capture_error(fn) {
|
|
|
30
30
|
return error;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
//#region node_modules/@sveltejs/kit/src/messages/server-errors.js
|
|
33
|
+
// node_modules/@sveltejs/kit/src/messages/server-errors.js
|
|
35
34
|
/** @import { ServerThrowOptions } from './internal/server.js' */
|
|
36
35
|
/**
|
|
37
36
|
* Data returned from action inside `%id%` is not serializable: %message%
|
|
@@ -483,7 +482,6 @@ function state_read_outside_render(_values, options) {
|
|
|
483
482
|
function url_search_unavailable_prerender(_values, options) {
|
|
484
483
|
throw_error("url_search_unavailable_prerender", `Cannot access \`url.${_values.property}\` on a page with prerendering enabled`, options, url_search_unavailable_prerender);
|
|
485
484
|
}
|
|
486
|
-
//#endregion
|
|
487
485
|
export { remote_cookie_forbidden as A, remote_requested_context as B, prerender_endpoint_methods as C, remote_command_method as D, prerender_template_nonce as E, remote_query_live_no_value as F, server_api_unavailable as G, remote_requested_invalid_query as H, remote_query_live_not_iterable as I, ssr_fetch_relative_url as J, set_headers_after_response as K, remote_query_prerender as L, remote_form_fail as M, remote_headers_forbidden as N, remote_command_readonly as O, remote_invalid_validator as P, remote_request_property as R, prerender_actions as S, prerender_nonce as T, remote_requested_wrong_method as U, remote_requested_invalid_limit as V, request_store_after_await as W, url_search_unavailable_prerender as X, state_read_outside_render as Y, capture_error as Z, load_fetch_cors as _, action_return_error as a, load_promise_not_serializable as b, client_address_unsupported as c, cookies_set_after_response as d, csp_report_only_missing_report as f, header_already_set as g, handle_error_hook_failed as h, action_response_not_serializable as i, remote_cookie_path_relative as j, remote_command_render as k, cookie_too_large as l, fetch_response_decoded as m, action_default_with_named as n, action_return_redirect as o, endpoint_invalid_response as p, set_headers_cookie as q, action_name_reserved as r, action_throw_fail as s, action_data_not_serializable as t, cookies_serialize_before_route as u, load_not_plain_object as v, prerender_endpoint_not_prerenderable as w, load_response_header_not_serialized as x, load_not_serializable as y, remote_requested_async_validator as z };
|
|
488
486
|
|
|
489
487
|
//# sourceMappingURL=server-errors.js.map
|