@kenkaiiii/gg-pixel 4.3.70 → 4.3.71
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/deno.d.ts +63 -0
- package/dist/deno.js +328 -0
- package/dist/deno.js.map +1 -0
- package/package.json +5 -1
package/dist/deno.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
type Level = "error" | "warning" | "fatal";
|
|
2
|
+
interface StackFrame {
|
|
3
|
+
file: string;
|
|
4
|
+
line: number;
|
|
5
|
+
col: number;
|
|
6
|
+
fn: string;
|
|
7
|
+
in_app: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface CodeContext {
|
|
10
|
+
file: string;
|
|
11
|
+
error_line: number;
|
|
12
|
+
lines: string[];
|
|
13
|
+
}
|
|
14
|
+
interface WireEvent {
|
|
15
|
+
event_id: string;
|
|
16
|
+
project_key: string;
|
|
17
|
+
fingerprint: string;
|
|
18
|
+
type: string;
|
|
19
|
+
message: string;
|
|
20
|
+
stack: StackFrame[];
|
|
21
|
+
code_context: CodeContext | null;
|
|
22
|
+
runtime: string;
|
|
23
|
+
manual_report: boolean;
|
|
24
|
+
level: Level;
|
|
25
|
+
occurred_at: string;
|
|
26
|
+
}
|
|
27
|
+
interface Sink {
|
|
28
|
+
emit(event: WireEvent): Promise<void>;
|
|
29
|
+
emitSync?(event: WireEvent): void;
|
|
30
|
+
close?(): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
interface ReportInput {
|
|
33
|
+
message: string;
|
|
34
|
+
error?: unknown;
|
|
35
|
+
level?: Level;
|
|
36
|
+
context?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface DenoAdapter {
|
|
40
|
+
report(input: ReportInput): void;
|
|
41
|
+
flush(): Promise<void>;
|
|
42
|
+
close(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const DEFAULT_INGEST_URL = "https://gg-pixel-server.buzzbeamaustralia.workers.dev";
|
|
46
|
+
interface DenoPixelOptions {
|
|
47
|
+
projectKey: string;
|
|
48
|
+
ingestUrl?: string;
|
|
49
|
+
runtime?: string;
|
|
50
|
+
sink?: Sink;
|
|
51
|
+
captureUnhandledRejections?: boolean;
|
|
52
|
+
captureUncaughtExceptions?: boolean;
|
|
53
|
+
}
|
|
54
|
+
declare function initPixel(options: DenoPixelOptions): DenoAdapter;
|
|
55
|
+
declare function reportPixel(input: {
|
|
56
|
+
message: string;
|
|
57
|
+
error?: unknown;
|
|
58
|
+
level?: "error" | "warning" | "fatal";
|
|
59
|
+
}): void;
|
|
60
|
+
declare function flushPixel(): Promise<void>;
|
|
61
|
+
declare function closePixel(): Promise<void>;
|
|
62
|
+
|
|
63
|
+
export { DEFAULT_INGEST_URL, type DenoPixelOptions, type Level, type ReportInput, type StackFrame, type WireEvent, closePixel, flushPixel, initPixel, reportPixel };
|
package/dist/deno.js
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
// src/core/stack-web.ts
|
|
2
|
+
var CHROME_FRAME = /^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+))(?:\))?\s*$/;
|
|
3
|
+
var GECKO_FRAME = /^\s*(.*?)@(.+?):(\d+)(?::(\d+))?\s*$/;
|
|
4
|
+
function parseBrowserStack(stack, sameOrigin) {
|
|
5
|
+
if (!stack) return [];
|
|
6
|
+
const frames = [];
|
|
7
|
+
for (const line of stack.split("\n")) {
|
|
8
|
+
const trimmed = line.trim();
|
|
9
|
+
if (!trimmed) continue;
|
|
10
|
+
if (!/^(?:at\s|.*@)/.test(trimmed)) continue;
|
|
11
|
+
const chrome = CHROME_FRAME.exec(line);
|
|
12
|
+
if (chrome) {
|
|
13
|
+
const fn = (chrome[1] ?? "").trim() || "<anon>";
|
|
14
|
+
const file = chrome[2];
|
|
15
|
+
if (!file) continue;
|
|
16
|
+
frames.push({
|
|
17
|
+
fn,
|
|
18
|
+
file,
|
|
19
|
+
line: Number(chrome[3]),
|
|
20
|
+
col: Number(chrome[4]),
|
|
21
|
+
in_app: isInApp(file, sameOrigin)
|
|
22
|
+
});
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const gecko = GECKO_FRAME.exec(line);
|
|
26
|
+
if (gecko) {
|
|
27
|
+
const fn = (gecko[1] ?? "").trim() || "<anon>";
|
|
28
|
+
const file = gecko[2];
|
|
29
|
+
if (!file) continue;
|
|
30
|
+
frames.push({
|
|
31
|
+
fn,
|
|
32
|
+
file,
|
|
33
|
+
line: Number(gecko[3]),
|
|
34
|
+
col: gecko[4] ? Number(gecko[4]) : 0,
|
|
35
|
+
in_app: isInApp(file, sameOrigin)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return frames;
|
|
40
|
+
}
|
|
41
|
+
function isInApp(file, sameOrigin) {
|
|
42
|
+
if (!file) return false;
|
|
43
|
+
if (/^chrome-extension:\/\//.test(file)) return false;
|
|
44
|
+
if (/^moz-extension:\/\//.test(file)) return false;
|
|
45
|
+
if (/^safari-extension:\/\//.test(file)) return false;
|
|
46
|
+
if (/^webkit-masked-url:\/\//.test(file)) return false;
|
|
47
|
+
if (file === "<anonymous>" || file === "[native code]") return false;
|
|
48
|
+
if (!sameOrigin) {
|
|
49
|
+
return /^https?:\/\//.test(file) || /^[a-z]+:\/\//.test(file) === false;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
const url = new URL(file, sameOrigin);
|
|
53
|
+
return url.origin === sameOrigin;
|
|
54
|
+
} catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/core/fingerprint-web.ts
|
|
60
|
+
function fingerprintWeb(type, stack) {
|
|
61
|
+
const top = stack[0];
|
|
62
|
+
const normalized = top ? `${type}|${normalizeFile(top.file)}|${top.fn || "<anon>"}|${top.line}` : `${type}|<no-stack>`;
|
|
63
|
+
return fnv1a64(normalized);
|
|
64
|
+
}
|
|
65
|
+
function fnv1a64(input) {
|
|
66
|
+
let hHi = 3421674724;
|
|
67
|
+
let hLo = 2216829733;
|
|
68
|
+
for (let i = 0; i < input.length; i++) {
|
|
69
|
+
const code = input.charCodeAt(i);
|
|
70
|
+
hLo ^= code & 255;
|
|
71
|
+
if (input.charCodeAt(i) > 255) hHi ^= code >>> 8 & 255;
|
|
72
|
+
const lo16 = hLo & 65535;
|
|
73
|
+
const lo32 = hLo >>> 16 & 65535;
|
|
74
|
+
const hi16 = hHi & 65535;
|
|
75
|
+
const hi32 = hHi >>> 16 & 65535;
|
|
76
|
+
let nLo = lo16 * 435;
|
|
77
|
+
let nMid = lo32 * 435 + (nLo >>> 16 & 65535);
|
|
78
|
+
let nHi = hi16 * 435 + (nMid >>> 16 & 65535);
|
|
79
|
+
let nTop = hi32 * 435 + (nHi >>> 16 & 65535);
|
|
80
|
+
nLo += lo16 * 0;
|
|
81
|
+
nMid += lo32 * 0;
|
|
82
|
+
nHi += hi16 * 0;
|
|
83
|
+
nTop += hi32 * 0;
|
|
84
|
+
nHi += lo16;
|
|
85
|
+
nTop += lo32 + (nHi >>> 16 & 65535);
|
|
86
|
+
hLo = ((nMid & 65535) << 16 | nLo & 65535) >>> 0;
|
|
87
|
+
hHi = ((nTop & 65535) << 16 | nHi & 65535) >>> 0;
|
|
88
|
+
}
|
|
89
|
+
return toHex32(hHi) + toHex32(hLo);
|
|
90
|
+
}
|
|
91
|
+
function toHex32(n) {
|
|
92
|
+
return (n >>> 0).toString(16).padStart(8, "0");
|
|
93
|
+
}
|
|
94
|
+
function normalizeFile(file) {
|
|
95
|
+
return file.replace(/\?.*$/, "").replace(/#.*$/, "");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// src/core/queue.ts
|
|
99
|
+
var MAX_BUFFER = 100;
|
|
100
|
+
var BASE_DELAY_MS = 200;
|
|
101
|
+
var MAX_DELAY_MS = 5e3;
|
|
102
|
+
var EventQueue = class {
|
|
103
|
+
constructor(sink) {
|
|
104
|
+
this.sink = sink;
|
|
105
|
+
}
|
|
106
|
+
buffer = [];
|
|
107
|
+
draining = false;
|
|
108
|
+
closed = false;
|
|
109
|
+
enqueue(event) {
|
|
110
|
+
if (this.closed) return;
|
|
111
|
+
if (this.buffer.length >= MAX_BUFFER) {
|
|
112
|
+
this.buffer.shift();
|
|
113
|
+
}
|
|
114
|
+
this.buffer.push(event);
|
|
115
|
+
void this.drain();
|
|
116
|
+
}
|
|
117
|
+
enqueueSync(event) {
|
|
118
|
+
if (this.closed) return;
|
|
119
|
+
if (this.sink.emitSync) {
|
|
120
|
+
try {
|
|
121
|
+
this.sink.emitSync(event);
|
|
122
|
+
return;
|
|
123
|
+
} catch {
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
this.enqueue(event);
|
|
127
|
+
}
|
|
128
|
+
async flush() {
|
|
129
|
+
while (this.buffer.length > 0 || this.draining) {
|
|
130
|
+
await new Promise((r) => setTimeout(r, 10));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async close() {
|
|
134
|
+
await this.flush();
|
|
135
|
+
this.closed = true;
|
|
136
|
+
if (this.sink.close) await this.sink.close();
|
|
137
|
+
}
|
|
138
|
+
async drain() {
|
|
139
|
+
if (this.draining) return;
|
|
140
|
+
this.draining = true;
|
|
141
|
+
let attempt = 0;
|
|
142
|
+
while (this.buffer.length > 0) {
|
|
143
|
+
const event = this.buffer[0];
|
|
144
|
+
try {
|
|
145
|
+
await this.sink.emit(event);
|
|
146
|
+
this.buffer.shift();
|
|
147
|
+
attempt = 0;
|
|
148
|
+
} catch (err) {
|
|
149
|
+
attempt++;
|
|
150
|
+
if (attempt >= 5) {
|
|
151
|
+
console.warn(
|
|
152
|
+
`[gg-pixel] dropping event after 5 failed deliveries: ${err instanceof Error ? err.message : String(err)}`
|
|
153
|
+
);
|
|
154
|
+
this.buffer.shift();
|
|
155
|
+
attempt = 0;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
const delay = Math.min(BASE_DELAY_MS * 2 ** (attempt - 1), MAX_DELAY_MS);
|
|
159
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
this.draining = false;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// src/adapters/deno.ts
|
|
167
|
+
function installDenoAdapter(opts) {
|
|
168
|
+
const queue = new EventQueue(opts.sink);
|
|
169
|
+
const detach = [];
|
|
170
|
+
const enqueueError = (err, level, manual) => {
|
|
171
|
+
try {
|
|
172
|
+
const event = buildEvent(err, level, manual, opts.projectKey, opts.runtime);
|
|
173
|
+
queue.enqueue(event);
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
if (opts.captureUncaughtExceptions) {
|
|
178
|
+
const handler = (e) => {
|
|
179
|
+
const errorEvent = e;
|
|
180
|
+
const err = errorEvent.error ?? errorEvent.message ?? "unknown error";
|
|
181
|
+
enqueueError(err, "fatal", false);
|
|
182
|
+
};
|
|
183
|
+
globalThis.addEventListener("error", handler);
|
|
184
|
+
detach.push(() => globalThis.removeEventListener("error", handler));
|
|
185
|
+
}
|
|
186
|
+
if (opts.captureUnhandledRejections) {
|
|
187
|
+
const handler = (e) => {
|
|
188
|
+
const ev = e;
|
|
189
|
+
enqueueError(ev.reason, "error", false);
|
|
190
|
+
};
|
|
191
|
+
globalThis.addEventListener("unhandledrejection", handler);
|
|
192
|
+
detach.push(() => globalThis.removeEventListener("unhandledrejection", handler));
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
report(input) {
|
|
196
|
+
const level = input.level ?? "error";
|
|
197
|
+
if (input.error !== void 0) {
|
|
198
|
+
try {
|
|
199
|
+
const event = buildEvent(input.error, level, true, opts.projectKey, opts.runtime);
|
|
200
|
+
if (input.message) event.message = input.message;
|
|
201
|
+
queue.enqueue(event);
|
|
202
|
+
} catch {
|
|
203
|
+
}
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const err = new Error(input.message);
|
|
207
|
+
err.name = "ManualReport";
|
|
208
|
+
enqueueError(err, level, true);
|
|
209
|
+
},
|
|
210
|
+
flush: () => queue.flush(),
|
|
211
|
+
close: async () => {
|
|
212
|
+
for (const fn of detach) fn();
|
|
213
|
+
await queue.close();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function buildEvent(err, level, manual, projectKey, runtime) {
|
|
218
|
+
const { type, message, stackString } = normalize(err);
|
|
219
|
+
const stack = parseBrowserStack(stackString);
|
|
220
|
+
return {
|
|
221
|
+
event_id: uuid(),
|
|
222
|
+
project_key: projectKey,
|
|
223
|
+
fingerprint: fingerprintWeb(type, stack),
|
|
224
|
+
type,
|
|
225
|
+
message,
|
|
226
|
+
stack,
|
|
227
|
+
code_context: null,
|
|
228
|
+
runtime,
|
|
229
|
+
manual_report: manual,
|
|
230
|
+
level,
|
|
231
|
+
occurred_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function normalize(err) {
|
|
235
|
+
if (err instanceof Error) {
|
|
236
|
+
return { type: err.name || "Error", message: err.message, stackString: err.stack };
|
|
237
|
+
}
|
|
238
|
+
if (typeof err === "string") {
|
|
239
|
+
return { type: "StringError", message: err };
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
return { type: "UnknownError", message: JSON.stringify(err) };
|
|
243
|
+
} catch {
|
|
244
|
+
return { type: "UnknownError", message: String(err) };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function uuid() {
|
|
248
|
+
const c = globalThis.crypto;
|
|
249
|
+
if (c?.randomUUID) return c.randomUUID();
|
|
250
|
+
const bytes = new Uint8Array(16);
|
|
251
|
+
if (c?.getRandomValues) c.getRandomValues(bytes);
|
|
252
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
253
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
254
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
255
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// src/core/sinks/http.ts
|
|
259
|
+
var HttpSink = class {
|
|
260
|
+
constructor(ingestUrl, fetchFn) {
|
|
261
|
+
this.ingestUrl = ingestUrl;
|
|
262
|
+
this.fetchFn = fetchFn ?? globalThis.fetch.bind(globalThis);
|
|
263
|
+
}
|
|
264
|
+
fetchFn;
|
|
265
|
+
async emit(event) {
|
|
266
|
+
const body = JSON.stringify(event);
|
|
267
|
+
const res = await this.fetchFn(this.ingestUrl, {
|
|
268
|
+
method: "POST",
|
|
269
|
+
headers: {
|
|
270
|
+
"content-type": "application/json",
|
|
271
|
+
"x-pixel-key": event.project_key
|
|
272
|
+
},
|
|
273
|
+
body,
|
|
274
|
+
keepalive: typeof window !== "undefined",
|
|
275
|
+
mode: typeof window !== "undefined" ? "cors" : void 0
|
|
276
|
+
});
|
|
277
|
+
if (!res.ok) {
|
|
278
|
+
throw new Error(`pixel ingest failed: ${res.status}`);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// src/deno.ts
|
|
284
|
+
var DEFAULT_INGEST_URL = "https://gg-pixel-server.buzzbeamaustralia.workers.dev";
|
|
285
|
+
var active = null;
|
|
286
|
+
function initPixel(options) {
|
|
287
|
+
if (active) {
|
|
288
|
+
throw new Error("gg-pixel is already initialized; call closePixel() first");
|
|
289
|
+
}
|
|
290
|
+
const sink = options.sink ?? new HttpSink(buildIngestUrl(options.ingestUrl));
|
|
291
|
+
active = installDenoAdapter({
|
|
292
|
+
projectKey: options.projectKey,
|
|
293
|
+
runtime: options.runtime ?? defaultRuntime(),
|
|
294
|
+
sink,
|
|
295
|
+
captureUnhandledRejections: options.captureUnhandledRejections ?? true,
|
|
296
|
+
captureUncaughtExceptions: options.captureUncaughtExceptions ?? true
|
|
297
|
+
});
|
|
298
|
+
return active;
|
|
299
|
+
}
|
|
300
|
+
function reportPixel(input) {
|
|
301
|
+
if (!active) return;
|
|
302
|
+
active.report(input);
|
|
303
|
+
}
|
|
304
|
+
async function flushPixel() {
|
|
305
|
+
if (!active) return;
|
|
306
|
+
await active.flush();
|
|
307
|
+
}
|
|
308
|
+
async function closePixel() {
|
|
309
|
+
if (!active) return;
|
|
310
|
+
await active.close();
|
|
311
|
+
active = null;
|
|
312
|
+
}
|
|
313
|
+
function buildIngestUrl(base) {
|
|
314
|
+
const url = (base ?? DEFAULT_INGEST_URL).replace(/\/+$/, "");
|
|
315
|
+
return `${url}/ingest`;
|
|
316
|
+
}
|
|
317
|
+
function defaultRuntime() {
|
|
318
|
+
const d = globalThis.Deno;
|
|
319
|
+
return d?.version?.deno ? `deno-${d.version.deno}` : "deno";
|
|
320
|
+
}
|
|
321
|
+
export {
|
|
322
|
+
DEFAULT_INGEST_URL,
|
|
323
|
+
closePixel,
|
|
324
|
+
flushPixel,
|
|
325
|
+
initPixel,
|
|
326
|
+
reportPixel
|
|
327
|
+
};
|
|
328
|
+
//# sourceMappingURL=deno.js.map
|
package/dist/deno.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/stack-web.ts","../src/core/fingerprint-web.ts","../src/core/queue.ts","../src/adapters/deno.ts","../src/core/sinks/http.ts","../src/deno.ts"],"sourcesContent":["import type { StackFrame } from \"./types.js\";\n\n/**\n * Cross-browser stack-trace parser.\n *\n * Browser stack formats differ wildly. We support two — that covers\n * Chrome/Edge/Safari (V8-shaped) and Firefox (Gecko-shaped). Real-world\n * coverage cited by Sentry's parsers in `packages/browser/src/stack-parsers.ts`.\n */\n\n// Chrome / V8 / Edge / modern Safari. Examples:\n// \" at fnName (https://app.com/main.js:42:13)\"\n// \" at https://app.com/main.js:42:13\"\n// \" at fnName (eval at <anonymous> (https://x/y.js:1:1), <anonymous>:1:5)\"\nconst CHROME_FRAME = /^\\s*at\\s+(?:(.+?)\\s+\\()?(?:(.+?):(\\d+):(\\d+))(?:\\))?\\s*$/;\n\n// Firefox / Gecko. Examples:\n// \"fnName@https://app.com/main.js:42:13\"\n// \"@https://app.com/main.js:42:13\"\nconst GECKO_FRAME = /^\\s*(.*?)@(.+?):(\\d+)(?::(\\d+))?\\s*$/;\n\nexport function parseBrowserStack(stack: string | undefined, sameOrigin?: string): StackFrame[] {\n if (!stack) return [];\n const frames: StackFrame[] = [];\n for (const line of stack.split(\"\\n\")) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n // Skip the leading \"TypeError: x\" header line — no `at` prefix and no `@`.\n if (!/^(?:at\\s|.*@)/.test(trimmed)) continue;\n\n const chrome = CHROME_FRAME.exec(line);\n if (chrome) {\n const fn = (chrome[1] ?? \"\").trim() || \"<anon>\";\n const file = chrome[2];\n if (!file) continue;\n frames.push({\n fn,\n file,\n line: Number(chrome[3]),\n col: Number(chrome[4]),\n in_app: isInApp(file, sameOrigin),\n });\n continue;\n }\n\n const gecko = GECKO_FRAME.exec(line);\n if (gecko) {\n const fn = (gecko[1] ?? \"\").trim() || \"<anon>\";\n const file = gecko[2];\n if (!file) continue;\n frames.push({\n fn,\n file,\n line: Number(gecko[3]),\n col: gecko[4] ? Number(gecko[4]) : 0,\n in_app: isInApp(file, sameOrigin),\n });\n }\n }\n return frames;\n}\n\n/**\n * Mark a frame as in-app when its URL matches the page's origin (or other\n * provided origin). Cross-origin scripts (CDN bundles, third-party widgets,\n * browser extensions) are framework/library noise — not the user's code.\n */\nfunction isInApp(file: string, sameOrigin?: string): boolean {\n if (!file) return false;\n // Browser-extension and inline-eval frames — never user code.\n if (/^chrome-extension:\\/\\//.test(file)) return false;\n if (/^moz-extension:\\/\\//.test(file)) return false;\n if (/^safari-extension:\\/\\//.test(file)) return false;\n if (/^webkit-masked-url:\\/\\//.test(file)) return false;\n if (file === \"<anonymous>\" || file === \"[native code]\") return false;\n\n if (!sameOrigin) {\n // No origin context — best-effort: any http(s) URL counts as in_app\n // unless we can prove otherwise.\n return /^https?:\\/\\//.test(file) || /^[a-z]+:\\/\\//.test(file) === false;\n }\n\n try {\n const url = new URL(file, sameOrigin);\n return url.origin === sameOrigin;\n } catch {\n return false;\n }\n}\n","import type { StackFrame } from \"./types.js\";\n\n/**\n * Browser-safe synchronous fingerprint.\n *\n * `node:crypto` doesn't exist in browsers, and Web Crypto's `subtle.digest`\n * is async — making the queue async would break the fast-path. Sentry's\n * browser SDK uses simple sync hashing for the same reason. Our fingerprint\n * just needs to be stable for the same inputs; cryptographic strength isn't\n * required.\n *\n * Implementation: FNV-1a 64-bit. Fast, sync, ~1KB. Output as 16-char hex.\n */\nexport function fingerprintWeb(type: string, stack: StackFrame[]): string {\n const top = stack[0];\n const normalized = top\n ? `${type}|${normalizeFile(top.file)}|${top.fn || \"<anon>\"}|${top.line}`\n : `${type}|<no-stack>`;\n return fnv1a64(normalized);\n}\n\n/** FNV-1a 64-bit hash. Returns 16-char lowercase hex. */\nexport function fnv1a64(input: string): string {\n // 64-bit math via two 32-bit halves, since JS doesn't have native u64.\n // Constants from the FNV-1a spec.\n let hHi = 0xcbf29ce4;\n let hLo = 0x84222325;\n for (let i = 0; i < input.length; i++) {\n const code = input.charCodeAt(i);\n hLo ^= code & 0xff;\n if (input.charCodeAt(i) > 0xff) hHi ^= (code >>> 8) & 0xff;\n\n // h = h * 0x100000001b3 (FNV prime), as 64-bit math:\n // The prime split into hi/lo 32-bit parts is { 0x100, 0x000001b3 }.\n const lo16 = hLo & 0xffff;\n const lo32 = (hLo >>> 16) & 0xffff;\n const hi16 = hHi & 0xffff;\n const hi32 = (hHi >>> 16) & 0xffff;\n\n let nLo = lo16 * 0x1b3;\n let nMid = lo32 * 0x1b3 + ((nLo >>> 16) & 0xffff);\n let nHi = hi16 * 0x1b3 + ((nMid >>> 16) & 0xffff);\n let nTop = hi32 * 0x1b3 + ((nHi >>> 16) & 0xffff);\n\n nLo += lo16 * 0; // *= 0x100... carry from low parts\n nMid += lo32 * 0;\n nHi += hi16 * 0;\n nTop += hi32 * 0;\n\n // Add the * 0x1_00000000_00 portion (lo16 << 32).\n nHi += lo16;\n nTop += lo32 + ((nHi >>> 16) & 0xffff);\n\n hLo = (((nMid & 0xffff) << 16) | (nLo & 0xffff)) >>> 0;\n hHi = (((nTop & 0xffff) << 16) | (nHi & 0xffff)) >>> 0;\n }\n\n return toHex32(hHi) + toHex32(hLo);\n}\n\nfunction toHex32(n: number): string {\n return (n >>> 0).toString(16).padStart(8, \"0\");\n}\n\nfunction normalizeFile(file: string): string {\n return file.replace(/\\?.*$/, \"\").replace(/#.*$/, \"\");\n}\n","import type { Sink, WireEvent } from \"./types.js\";\n\nconst MAX_BUFFER = 100;\nconst BASE_DELAY_MS = 200;\nconst MAX_DELAY_MS = 5_000;\n\nexport class EventQueue {\n private readonly buffer: WireEvent[] = [];\n private draining = false;\n private closed = false;\n\n constructor(private readonly sink: Sink) {}\n\n enqueue(event: WireEvent): void {\n if (this.closed) return;\n if (this.buffer.length >= MAX_BUFFER) {\n this.buffer.shift();\n }\n this.buffer.push(event);\n void this.drain();\n }\n\n enqueueSync(event: WireEvent): void {\n if (this.closed) return;\n if (this.sink.emitSync) {\n try {\n this.sink.emitSync(event);\n return;\n } catch {\n // fall through to async path\n }\n }\n this.enqueue(event);\n }\n\n async flush(): Promise<void> {\n while (this.buffer.length > 0 || this.draining) {\n await new Promise((r) => setTimeout(r, 10));\n }\n }\n\n async close(): Promise<void> {\n await this.flush();\n this.closed = true;\n if (this.sink.close) await this.sink.close();\n }\n\n private async drain(): Promise<void> {\n if (this.draining) return;\n this.draining = true;\n let attempt = 0;\n while (this.buffer.length > 0) {\n const event = this.buffer[0];\n try {\n await this.sink.emit(event);\n this.buffer.shift();\n attempt = 0;\n } catch (err) {\n attempt++;\n if (attempt >= 5) {\n // Drop the event but make the loss observable — silent data loss\n // from the error tracker is the worst possible failure mode.\n console.warn(\n `[gg-pixel] dropping event after 5 failed deliveries: ${\n err instanceof Error ? err.message : String(err)\n }`,\n );\n this.buffer.shift();\n attempt = 0;\n continue;\n }\n const delay = Math.min(BASE_DELAY_MS * 2 ** (attempt - 1), MAX_DELAY_MS);\n await new Promise((r) => setTimeout(r, delay));\n }\n }\n this.draining = false;\n }\n}\n","import { parseBrowserStack } from \"../core/stack-web.js\";\nimport { fingerprintWeb } from \"../core/fingerprint-web.js\";\nimport { EventQueue } from \"../core/queue.js\";\nimport type { Level, ReportInput, Sink, WireEvent } from \"../core/types.js\";\n\n/**\n * Deno adapter.\n *\n * Deno fires `error` and `unhandledrejection` events on `globalThis`\n * (the same Web events the browser uses), but doesn't have `window` or\n * `navigator`. We can hook them via `globalThis.addEventListener`.\n *\n * Deno's `error` event fires for uncaught synchronous errors. By default\n * Deno also exits the process; we capture sync via the `Sink.emitSync`\n * if the sink supports it, otherwise enqueue and hope.\n */\n\nexport interface DenoAdapterOptions {\n projectKey: string;\n runtime: string;\n sink: Sink;\n captureUnhandledRejections: boolean;\n captureUncaughtExceptions: boolean;\n}\n\nexport interface DenoAdapter {\n report(input: ReportInput): void;\n flush(): Promise<void>;\n close(): Promise<void>;\n}\n\nexport function installDenoAdapter(opts: DenoAdapterOptions): DenoAdapter {\n const queue = new EventQueue(opts.sink);\n const detach: Array<() => void> = [];\n\n const enqueueError = (err: unknown, level: Level, manual: boolean) => {\n try {\n const event = buildEvent(err, level, manual, opts.projectKey, opts.runtime);\n queue.enqueue(event);\n } catch {\n // never break the host\n }\n };\n\n if (opts.captureUncaughtExceptions) {\n const handler = (e: Event) => {\n const errorEvent = e as ErrorEvent;\n const err = errorEvent.error ?? errorEvent.message ?? \"unknown error\";\n enqueueError(err, \"fatal\", false);\n };\n globalThis.addEventListener(\"error\", handler);\n detach.push(() => globalThis.removeEventListener(\"error\", handler));\n }\n\n if (opts.captureUnhandledRejections) {\n const handler = (e: Event) => {\n const ev = e as PromiseRejectionEvent;\n enqueueError(ev.reason, \"error\", false);\n };\n globalThis.addEventListener(\"unhandledrejection\", handler);\n detach.push(() => globalThis.removeEventListener(\"unhandledrejection\", handler));\n }\n\n return {\n report(input: ReportInput) {\n const level = input.level ?? \"error\";\n if (input.error !== undefined) {\n try {\n const event = buildEvent(input.error, level, true, opts.projectKey, opts.runtime);\n if (input.message) event.message = input.message;\n queue.enqueue(event);\n } catch {\n // never break the host\n }\n return;\n }\n const err = new Error(input.message);\n err.name = \"ManualReport\";\n enqueueError(err, level, true);\n },\n flush: () => queue.flush(),\n close: async () => {\n for (const fn of detach) fn();\n await queue.close();\n },\n };\n}\n\nfunction buildEvent(\n err: unknown,\n level: Level,\n manual: boolean,\n projectKey: string,\n runtime: string,\n): WireEvent {\n const { type, message, stackString } = normalize(err);\n const stack = parseBrowserStack(stackString);\n return {\n event_id: uuid(),\n project_key: projectKey,\n fingerprint: fingerprintWeb(type, stack),\n type,\n message,\n stack,\n code_context: null,\n runtime,\n manual_report: manual,\n level,\n occurred_at: new Date().toISOString(),\n };\n}\n\nfunction normalize(err: unknown): { type: string; message: string; stackString?: string } {\n if (err instanceof Error) {\n return { type: err.name || \"Error\", message: err.message, stackString: err.stack };\n }\n if (typeof err === \"string\") {\n return { type: \"StringError\", message: err };\n }\n try {\n return { type: \"UnknownError\", message: JSON.stringify(err) };\n } catch {\n return { type: \"UnknownError\", message: String(err) };\n }\n}\n\nfunction uuid(): string {\n const c = (globalThis as { crypto?: Crypto }).crypto;\n if (c?.randomUUID) return c.randomUUID();\n const bytes = new Uint8Array(16);\n if (c?.getRandomValues) c.getRandomValues(bytes);\n bytes[6] = (bytes[6]! & 0x0f) | 0x40;\n bytes[8] = (bytes[8]! & 0x3f) | 0x80;\n const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n","import type { Sink, WireEvent } from \"../types.js\";\n\nexport class HttpSink implements Sink {\n private readonly fetchFn: typeof fetch;\n\n constructor(\n private readonly ingestUrl: string,\n fetchFn?: typeof fetch,\n ) {\n // CRITICAL: in browsers `fetch` is `window.fetch` and requires `this === window`.\n // Storing it as a property and calling via `this.fetchFn(...)` strips that\n // binding and throws \"Illegal invocation\". Bind to globalThis on assignment.\n // Tests can still inject a custom fetchFn (no binding needed for plain fns).\n this.fetchFn = fetchFn ?? globalThis.fetch.bind(globalThis);\n }\n\n async emit(event: WireEvent): Promise<void> {\n const body = JSON.stringify(event);\n // `keepalive: true` lets the request survive page unload (browser).\n // `mode: \"cors\"` is the explicit default but stating it makes the\n // intent clear and avoids surprises on stricter contexts.\n const res = await this.fetchFn(this.ingestUrl, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n \"x-pixel-key\": event.project_key,\n },\n body,\n keepalive: typeof window !== \"undefined\",\n mode: typeof window !== \"undefined\" ? \"cors\" : undefined,\n });\n if (!res.ok) {\n throw new Error(`pixel ingest failed: ${res.status}`);\n }\n }\n}\n","import { installDenoAdapter, type DenoAdapter } from \"./adapters/deno.js\";\nimport { HttpSink } from \"./core/sinks/http.js\";\nimport type { Sink } from \"./core/types.js\";\n\nexport const DEFAULT_INGEST_URL = \"https://gg-pixel-server.buzzbeamaustralia.workers.dev\";\n\nexport interface DenoPixelOptions {\n projectKey: string;\n ingestUrl?: string;\n runtime?: string;\n sink?: Sink;\n captureUnhandledRejections?: boolean;\n captureUncaughtExceptions?: boolean;\n}\n\nlet active: DenoAdapter | null = null;\n\nexport function initPixel(options: DenoPixelOptions): DenoAdapter {\n if (active) {\n throw new Error(\"gg-pixel is already initialized; call closePixel() first\");\n }\n const sink: Sink = options.sink ?? new HttpSink(buildIngestUrl(options.ingestUrl));\n active = installDenoAdapter({\n projectKey: options.projectKey,\n runtime: options.runtime ?? defaultRuntime(),\n sink,\n captureUnhandledRejections: options.captureUnhandledRejections ?? true,\n captureUncaughtExceptions: options.captureUncaughtExceptions ?? true,\n });\n return active;\n}\n\nexport function reportPixel(input: {\n message: string;\n error?: unknown;\n level?: \"error\" | \"warning\" | \"fatal\";\n}): void {\n if (!active) return;\n active.report(input);\n}\n\nexport async function flushPixel(): Promise<void> {\n if (!active) return;\n await active.flush();\n}\n\nexport async function closePixel(): Promise<void> {\n if (!active) return;\n await active.close();\n active = null;\n}\n\nfunction buildIngestUrl(base?: string): string {\n const url = (base ?? DEFAULT_INGEST_URL).replace(/\\/+$/, \"\");\n return `${url}/ingest`;\n}\n\nfunction defaultRuntime(): string {\n // Deno exposes its version on `Deno.version.deno`. Cast through unknown\n // because TypeScript doesn't see `Deno` in standard lib types.\n const d = (globalThis as { Deno?: { version?: { deno?: string } } }).Deno;\n return d?.version?.deno ? `deno-${d.version.deno}` : \"deno\";\n}\n\nexport type { Level, ReportInput, StackFrame, WireEvent } from \"./core/types.js\";\n"],"mappings":";AAcA,IAAM,eAAe;AAKrB,IAAM,cAAc;AAEb,SAAS,kBAAkB,OAA2B,YAAmC;AAC9F,MAAI,CAAC,MAAO,QAAO,CAAC;AACpB,QAAM,SAAuB,CAAC;AAC9B,aAAW,QAAQ,MAAM,MAAM,IAAI,GAAG;AACpC,UAAM,UAAU,KAAK,KAAK;AAC1B,QAAI,CAAC,QAAS;AAEd,QAAI,CAAC,gBAAgB,KAAK,OAAO,EAAG;AAEpC,UAAM,SAAS,aAAa,KAAK,IAAI;AACrC,QAAI,QAAQ;AACV,YAAM,MAAM,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK;AACvC,YAAM,OAAO,OAAO,CAAC;AACrB,UAAI,CAAC,KAAM;AACX,aAAO,KAAK;AAAA,QACV;AAAA,QACA;AAAA,QACA,MAAM,OAAO,OAAO,CAAC,CAAC;AAAA,QACtB,KAAK,OAAO,OAAO,CAAC,CAAC;AAAA,QACrB,QAAQ,QAAQ,MAAM,UAAU;AAAA,MAClC,CAAC;AACD;AAAA,IACF;AAEA,UAAM,QAAQ,YAAY,KAAK,IAAI;AACnC,QAAI,OAAO;AACT,YA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;AAEA,SAAS,eAAe,MAAuB;AAC7C,QAAM,OAAO,QAAQ,oBAAoB,QAAQ,QAAQ,EAAE;AAC3D,SAAO,GAAG,GAAG;AACf;AAEA,SAAS,iBAAyB;AAGhC,QAAM,IAAK,WAA0D;AACrE,SAAO,GAAG,SAAS,OAAO,QAAQ,EAAE,QAAQ,IAAI,KAAK;AACvD;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenkaiiii/gg-pixel",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.71",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Universal error tracking pixel optimized for autonomous coding agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"./browser": {
|
|
19
19
|
"types": "./dist/browser.d.ts",
|
|
20
20
|
"import": "./dist/browser.js"
|
|
21
|
+
},
|
|
22
|
+
"./deno": {
|
|
23
|
+
"types": "./dist/deno.d.ts",
|
|
24
|
+
"import": "./dist/deno.js"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"bin": {
|