@claudeye/linux-arm64 1.0.4-beta.9 → 1.0.4
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/assets/standalone/.next/BUILD_ID +1 -1
- package/assets/standalone/.next/build-manifest.json +2 -2
- package/assets/standalone/.next/prerender-manifest.json +3 -3
- package/assets/standalone/.next/required-server-files.json +0 -3
- package/assets/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_global-error.html +2 -2
- package/assets/standalone/.next/server/app/_global-error.rsc +7 -7
- package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/_not-found.html +2 -2
- package/assets/standalone/.next/server/app/_not-found.rsc +14 -14
- package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/api/completed-history/route.js +1 -1
- package/assets/standalone/.next/server/app/api/queue-item/route.js +2 -2
- package/assets/standalone/.next/server/app/api/queue-status/route.js +1 -1
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +4 -4
- package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +2 -2
- package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/login.html +2 -2
- package/assets/standalone/.next/server/app/login.rsc +15 -15
- package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +15 -15
- package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +9 -9
- package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/assets/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +8 -8
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +1 -1
- package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +3 -3
- package/assets/standalone/.next/server/app/queue/page.js +2 -2
- package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/chunks/{[externals]_next_dist_db0236a7._.js → [externals]__06cd15c5._.js} +2 -2
- package/assets/standalone/.next/server/chunks/[externals]__10373a08._.js +3 -0
- package/assets/standalone/.next/server/chunks/[externals]__d78bcb54._.js +3 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__067f11b8._.js +3 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__22ffcb4e._.js +3 -0
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__3232b9b5._.js → [root-of-the-server]__292809cf._.js} +1 -1
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__bf0c3d33._.js → [root-of-the-server]__3c3ad1da._.js} +4 -4
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__6d076258._.js → [root-of-the-server]__43c4e0bc._.js} +1 -1
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__6fc9da2e._.js → [root-of-the-server]__7c44135a._.js} +1 -1
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__ffb39c82._.js → [root-of-the-server]__939bf5b3._.js} +2 -2
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__fe48bb1c._.js → [root-of-the-server]__bd194a73._.js} +2 -2
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__b2f1c82c._.js → [root-of-the-server]__ca12b24d._.js} +2 -2
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__d7355d04._.js +1 -1
- package/assets/standalone/.next/server/chunks/{[root-of-the-server]__255e6fbc._.js → [root-of-the-server]__dcb3f873._.js} +1 -1
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__e3e9ab09._.js +4 -0
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__f26a70d1._.js +3 -0
- package/assets/standalone/.next/server/chunks/_3f3c09bf._.js +1 -1
- package/assets/standalone/.next/server/chunks/_5336fde9._.js +3 -0
- package/assets/standalone/.next/server/chunks/_7e07bbd9._.js +1 -1
- package/assets/standalone/.next/server/chunks/_8f856fad._.js +1 -1
- package/assets/standalone/.next/server/chunks/{_717db053._.js → _b7316450._.js} +1 -1
- package/assets/standalone/.next/server/chunks/_b8adaa37._.js +2 -2
- package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7a66d362.js +1 -1
- package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05ab10df._.js +3 -0
- package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_20debb74._.js +3 -0
- package/assets/standalone/.next/server/chunks/package_json_4b1b4d6f._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/[externals]__10373a08._.js +3 -0
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__16a44ef3._.js → [root-of-the-server]__acea31a9._.js} +3 -3
- package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10ac3567._.js → [root-of-the-server]__c3591792._.js} +3 -3
- package/assets/standalone/.next/server/chunks/ssr/_14858238._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_19a3e694._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_1d335924._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_3dacef09._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_617143fc._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_76ab933f._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_7ae321cd._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_87e025a1._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_986c0cdb._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_c9400c33._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/_d7159840._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/_fa9c2bed._.js +2 -2
- package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_fc151dbb._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_ccc0019b._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_45f040f7._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_274ac3eb._.js +1 -1
- package/assets/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_8222e100._.js +3 -0
- package/assets/standalone/.next/server/instrumentation.js +1 -1
- package/assets/standalone/.next/server/middleware.js +2 -2
- package/assets/standalone/.next/server/pages/404.html +2 -2
- package/assets/standalone/.next/server/pages/500.html +2 -2
- package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
- package/assets/standalone/.next/server/server-reference-manifest.json +15 -15
- package/assets/standalone/.next/static/chunks/{723f2367261046f4.js → 11f25fc2615691ff.js} +1 -1
- package/assets/standalone/.next/static/chunks/{98ef6309c816722d.css → 14b2a22c2d5f76c5.css} +1 -1
- package/assets/standalone/.next/static/chunks/{d2be314c3ece3fbe.js → 2b423cf30d3964a3.js} +1 -1
- package/assets/standalone/.next/static/chunks/{97c295191089a1c2.js → 5920eabcfc97a878.js} +1 -1
- package/assets/standalone/.next/static/chunks/{dbec35204e8940b4.js → 6f48312d9fefe6e7.js} +1 -1
- package/assets/standalone/.next/static/chunks/8da8518dc46b9734.js +1 -0
- package/assets/standalone/.next/static/chunks/91129b8c2a80b1b2.js +4 -0
- package/assets/standalone/.next/static/chunks/{fd8c1fc19ac30592.js → 96e6f5987bb7f381.js} +3 -3
- package/assets/standalone/.next/static/chunks/{27fc246b001f7ba2.js → ef5e745c131e6572.js} +1 -1
- package/assets/standalone/instrumentation.node.ts +54 -0
- package/assets/standalone/package.json +3 -2
- package/assets/standalone/server.js +1 -1
- package/bin/claudeye +0 -0
- package/package.json +1 -1
- package/assets/standalone/.next/server/chunks/[externals]_posthog-node_4a68be38._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__19c9c5af._.js +0 -4
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__365c750b._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__4ea757c2._.js +0 -3
- package/assets/standalone/.next/server/chunks/[root-of-the-server]__c84cf1dc._.js +0 -3
- package/assets/standalone/.next/server/chunks/ssr/[externals]_posthog-node_4a68be38._.js +0 -3
- package/assets/standalone/.next/static/chunks/13ab76b2fb94bd45.js +0 -1
- package/assets/standalone/.next/static/chunks/3346a6085951648c.js +0 -4
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs +0 -34
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs +0 -31
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs +0 -27
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs +0 -18
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs +0 -17
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs +0 -8
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs +0 -51
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs +0 -15
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs +0 -25
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs +0 -29
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs +0 -18
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs +0 -112
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/index.mjs +0 -4
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs +0 -14
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs +0 -27
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs +0 -24
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs +0 -47
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs +0 -65
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs +0 -12
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs +0 -13
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs +0 -7
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/types.mjs +0 -9
- package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/utils.mjs +0 -23
- package/assets/standalone/node_modules/@posthog/core/dist/eventemitter.mjs +0 -18
- package/assets/standalone/node_modules/@posthog/core/dist/featureFlagUtils.mjs +0 -113
- package/assets/standalone/node_modules/@posthog/core/dist/gzip.mjs +0 -18
- package/assets/standalone/node_modules/@posthog/core/dist/index.mjs +0 -9
- package/assets/standalone/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +0 -676
- package/assets/standalone/node_modules/@posthog/core/dist/posthog-core.mjs +0 -761
- package/assets/standalone/node_modules/@posthog/core/dist/surveys/validation.mjs +0 -33
- package/assets/standalone/node_modules/@posthog/core/dist/types.mjs +0 -137
- package/assets/standalone/node_modules/@posthog/core/dist/utils/bot-detection.mjs +0 -88
- package/assets/standalone/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs +0 -41
- package/assets/standalone/node_modules/@posthog/core/dist/utils/index.mjs +0 -59
- package/assets/standalone/node_modules/@posthog/core/dist/utils/logger.mjs +0 -38
- package/assets/standalone/node_modules/@posthog/core/dist/utils/number-utils.mjs +0 -41
- package/assets/standalone/node_modules/@posthog/core/dist/utils/promise-queue.mjs +0 -27
- package/assets/standalone/node_modules/@posthog/core/dist/utils/string-utils.mjs +0 -31
- package/assets/standalone/node_modules/@posthog/core/dist/utils/type-utils.mjs +0 -82
- package/assets/standalone/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs +0 -338
- package/assets/standalone/node_modules/@posthog/core/dist/vendor/uuidv7.mjs +0 -170
- package/assets/standalone/node_modules/@posthog/core/package.json +0 -69
- package/assets/standalone/node_modules/posthog-node/dist/client.mjs +0 -718
- package/assets/standalone/node_modules/posthog-node/dist/entrypoints/index.node.mjs +0 -26
- package/assets/standalone/node_modules/posthog-node/dist/exports.mjs +0 -5
- package/assets/standalone/node_modules/posthog-node/dist/extensions/context/context.mjs +0 -28
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs +0 -31
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs +0 -69
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.js +0 -227
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs +0 -187
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.js +0 -64
- package/assets/standalone/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs +0 -30
- package/assets/standalone/node_modules/posthog-node/dist/extensions/express.mjs +0 -32
- package/assets/standalone/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs +0 -8
- package/assets/standalone/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs +0 -772
- package/assets/standalone/node_modules/posthog-node/dist/extensions/sentry-integration.mjs +0 -72
- package/assets/standalone/node_modules/posthog-node/dist/storage-memory.mjs +0 -12
- package/assets/standalone/node_modules/posthog-node/dist/types.mjs +0 -7
- package/assets/standalone/node_modules/posthog-node/dist/version.mjs +0 -2
- package/assets/standalone/node_modules/posthog-node/package.json +0 -105
- /package/assets/standalone/.next/static/{J4fam3sTS7cM1hFzhpIJy → ooDwT_B4qzYMdxRb-wV62}/_buildManifest.js +0 -0
- /package/assets/standalone/.next/static/{J4fam3sTS7cM1hFzhpIJy → ooDwT_B4qzYMdxRb-wV62}/_clientMiddlewareManifest.json +0 -0
- /package/assets/standalone/.next/static/{J4fam3sTS7cM1hFzhpIJy → ooDwT_B4qzYMdxRb-wV62}/_ssgManifest.js +0 -0
package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { isEvent } from "../../utils/index.mjs";
|
|
2
|
-
import { extractExceptionKeysForMessage } from "./utils.mjs";
|
|
3
|
-
class EventCoercer {
|
|
4
|
-
match(err) {
|
|
5
|
-
return isEvent(err);
|
|
6
|
-
}
|
|
7
|
-
coerce(evt, ctx) {
|
|
8
|
-
const constructorName = evt.constructor.name;
|
|
9
|
-
return {
|
|
10
|
-
type: constructorName,
|
|
11
|
-
value: `${constructorName} captured as exception with keys: ${extractExceptionKeysForMessage(evt)}`,
|
|
12
|
-
stack: ctx.syntheticException?.stack,
|
|
13
|
-
synthetic: true
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export { EventCoercer };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./dom-exception-coercer.mjs";
|
|
2
|
-
export * from "./error-coercer.mjs";
|
|
3
|
-
export * from "./error-event-coercer.mjs";
|
|
4
|
-
export * from "./string-coercer.mjs";
|
|
5
|
-
export * from "./object-coercer.mjs";
|
|
6
|
-
export * from "./event-coercer.mjs";
|
|
7
|
-
export * from "./primitive-coercer.mjs";
|
|
8
|
-
export * from "./promise-rejection-event.mjs";
|
package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { isEmptyString, isError, isEvent, isString } from "../../utils/index.mjs";
|
|
2
|
-
import { severityLevels } from "../types.mjs";
|
|
3
|
-
import { extractExceptionKeysForMessage } from "./utils.mjs";
|
|
4
|
-
class ObjectCoercer {
|
|
5
|
-
match(candidate) {
|
|
6
|
-
return 'object' == typeof candidate && null !== candidate;
|
|
7
|
-
}
|
|
8
|
-
coerce(candidate, ctx) {
|
|
9
|
-
const errorProperty = this.getErrorPropertyFromObject(candidate);
|
|
10
|
-
if (errorProperty) return ctx.apply(errorProperty);
|
|
11
|
-
return {
|
|
12
|
-
type: this.getType(candidate),
|
|
13
|
-
value: this.getValue(candidate),
|
|
14
|
-
stack: ctx.syntheticException?.stack,
|
|
15
|
-
level: this.isSeverityLevel(candidate.level) ? candidate.level : 'error',
|
|
16
|
-
synthetic: true
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
getType(err) {
|
|
20
|
-
return isEvent(err) ? err.constructor.name : 'Error';
|
|
21
|
-
}
|
|
22
|
-
getValue(err) {
|
|
23
|
-
if ('name' in err && 'string' == typeof err.name) {
|
|
24
|
-
let message = `'${err.name}' captured as exception`;
|
|
25
|
-
if ('message' in err && 'string' == typeof err.message) message += ` with message: '${err.message}'`;
|
|
26
|
-
return message;
|
|
27
|
-
}
|
|
28
|
-
if ('message' in err && 'string' == typeof err.message) return err.message;
|
|
29
|
-
const className = this.getObjectClassName(err);
|
|
30
|
-
const keys = extractExceptionKeysForMessage(err);
|
|
31
|
-
return `${className && 'Object' !== className ? `'${className}'` : 'Object'} captured as exception with keys: ${keys}`;
|
|
32
|
-
}
|
|
33
|
-
isSeverityLevel(x) {
|
|
34
|
-
return isString(x) && !isEmptyString(x) && severityLevels.indexOf(x) >= 0;
|
|
35
|
-
}
|
|
36
|
-
getErrorPropertyFromObject(obj) {
|
|
37
|
-
for(const prop in obj)if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
|
38
|
-
const value = obj[prop];
|
|
39
|
-
if (isError(value)) return value;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
getObjectClassName(obj) {
|
|
43
|
-
try {
|
|
44
|
-
const prototype = Object.getPrototypeOf(obj);
|
|
45
|
-
return prototype ? prototype.constructor.name : void 0;
|
|
46
|
-
} catch (e) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export { ObjectCoercer };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { isPrimitive } from "../../utils/index.mjs";
|
|
2
|
-
class PrimitiveCoercer {
|
|
3
|
-
match(candidate) {
|
|
4
|
-
return isPrimitive(candidate);
|
|
5
|
-
}
|
|
6
|
-
coerce(value, ctx) {
|
|
7
|
-
return {
|
|
8
|
-
type: 'Error',
|
|
9
|
-
value: `Primitive value captured as exception: ${String(value)}`,
|
|
10
|
-
stack: ctx.syntheticException?.stack,
|
|
11
|
-
synthetic: true
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export { PrimitiveCoercer };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { isBuiltin, isPrimitive } from "../../utils/index.mjs";
|
|
2
|
-
class PromiseRejectionEventCoercer {
|
|
3
|
-
match(err) {
|
|
4
|
-
return isBuiltin(err, 'PromiseRejectionEvent');
|
|
5
|
-
}
|
|
6
|
-
coerce(err, ctx) {
|
|
7
|
-
const reason = this.getUnhandledRejectionReason(err);
|
|
8
|
-
if (isPrimitive(reason)) return {
|
|
9
|
-
type: 'UnhandledRejection',
|
|
10
|
-
value: `Non-Error promise rejection captured with value: ${String(reason)}`,
|
|
11
|
-
stack: ctx.syntheticException?.stack,
|
|
12
|
-
synthetic: true
|
|
13
|
-
};
|
|
14
|
-
return ctx.apply(reason);
|
|
15
|
-
}
|
|
16
|
-
getUnhandledRejectionReason(error) {
|
|
17
|
-
if (isPrimitive(error)) return error;
|
|
18
|
-
try {
|
|
19
|
-
if ('reason' in error) return error.reason;
|
|
20
|
-
if ('detail' in error && 'reason' in error.detail) return error.detail.reason;
|
|
21
|
-
} catch {}
|
|
22
|
-
return error;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export { PromiseRejectionEventCoercer };
|
package/assets/standalone/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
2
|
-
class StringCoercer {
|
|
3
|
-
match(input) {
|
|
4
|
-
return 'string' == typeof input;
|
|
5
|
-
}
|
|
6
|
-
coerce(input, ctx) {
|
|
7
|
-
const [type, value] = this.getInfos(input);
|
|
8
|
-
return {
|
|
9
|
-
type: type ?? 'Error',
|
|
10
|
-
value: value ?? input,
|
|
11
|
-
stack: ctx.syntheticException?.stack,
|
|
12
|
-
synthetic: true
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
getInfos(candidate) {
|
|
16
|
-
let type = 'Error';
|
|
17
|
-
let value = candidate;
|
|
18
|
-
const groups = candidate.match(ERROR_TYPES_PATTERN);
|
|
19
|
-
if (groups) {
|
|
20
|
-
type = groups[1];
|
|
21
|
-
value = groups[2];
|
|
22
|
-
}
|
|
23
|
-
return [
|
|
24
|
-
type,
|
|
25
|
-
value
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export { StringCoercer };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
function truncate(str, max = 0) {
|
|
2
|
-
if ('string' != typeof str || 0 === max) return str;
|
|
3
|
-
return str.length <= max ? str : `${str.slice(0, max)}...`;
|
|
4
|
-
}
|
|
5
|
-
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
6
|
-
const keys = Object.keys(err);
|
|
7
|
-
keys.sort();
|
|
8
|
-
if (!keys.length) return '[object has no keys]';
|
|
9
|
-
for(let i = keys.length; i > 0; i--){
|
|
10
|
-
const serialized = keys.slice(0, i).join(', ');
|
|
11
|
-
if (!(serialized.length > maxLength)) {
|
|
12
|
-
if (i === keys.length) return serialized;
|
|
13
|
-
return serialized.length <= maxLength ? serialized : `${serialized.slice(0, maxLength)}...`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
export { extractExceptionKeysForMessage, truncate };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { isArray } from "../utils/index.mjs";
|
|
2
|
-
import { getFilenameToChunkIdMap } from "./chunk-ids.mjs";
|
|
3
|
-
const MAX_CAUSE_RECURSION = 4;
|
|
4
|
-
class ErrorPropertiesBuilder {
|
|
5
|
-
constructor(coercers, stackParser, modifiers = []){
|
|
6
|
-
this.coercers = coercers;
|
|
7
|
-
this.stackParser = stackParser;
|
|
8
|
-
this.modifiers = modifiers;
|
|
9
|
-
}
|
|
10
|
-
buildFromUnknown(input, hint = {}) {
|
|
11
|
-
const providedMechanism = hint && hint.mechanism;
|
|
12
|
-
const mechanism = providedMechanism || {
|
|
13
|
-
handled: true,
|
|
14
|
-
type: 'generic'
|
|
15
|
-
};
|
|
16
|
-
const coercingContext = this.buildCoercingContext(mechanism, hint, 0);
|
|
17
|
-
const exceptionWithCause = coercingContext.apply(input);
|
|
18
|
-
const parsingContext = this.buildParsingContext(hint);
|
|
19
|
-
const exceptionWithStack = this.parseStacktrace(exceptionWithCause, parsingContext);
|
|
20
|
-
const exceptionList = this.convertToExceptionList(exceptionWithStack, mechanism);
|
|
21
|
-
return {
|
|
22
|
-
$exception_list: exceptionList,
|
|
23
|
-
$exception_level: 'error'
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
async modifyFrames(exceptionList) {
|
|
27
|
-
for (const exc of exceptionList)if (exc.stacktrace && exc.stacktrace.frames && isArray(exc.stacktrace.frames)) exc.stacktrace.frames = await this.applyModifiers(exc.stacktrace.frames);
|
|
28
|
-
return exceptionList;
|
|
29
|
-
}
|
|
30
|
-
coerceFallback(ctx) {
|
|
31
|
-
return {
|
|
32
|
-
type: 'Error',
|
|
33
|
-
value: 'Unknown error',
|
|
34
|
-
stack: ctx.syntheticException?.stack,
|
|
35
|
-
synthetic: true
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
parseStacktrace(err, ctx) {
|
|
39
|
-
let cause;
|
|
40
|
-
if (null != err.cause) cause = this.parseStacktrace(err.cause, ctx);
|
|
41
|
-
let stack;
|
|
42
|
-
if ('' != err.stack && null != err.stack) stack = this.applyChunkIds(this.stackParser(err.stack, err.synthetic ? ctx.skipFirstLines : 0), ctx.chunkIdMap);
|
|
43
|
-
return {
|
|
44
|
-
...err,
|
|
45
|
-
cause,
|
|
46
|
-
stack
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
applyChunkIds(frames, chunkIdMap) {
|
|
50
|
-
return frames.map((frame)=>{
|
|
51
|
-
if (frame.filename && chunkIdMap) frame.chunk_id = chunkIdMap[frame.filename];
|
|
52
|
-
return frame;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
applyCoercers(input, ctx) {
|
|
56
|
-
for (const adapter of this.coercers)if (adapter.match(input)) return adapter.coerce(input, ctx);
|
|
57
|
-
return this.coerceFallback(ctx);
|
|
58
|
-
}
|
|
59
|
-
async applyModifiers(frames) {
|
|
60
|
-
let newFrames = frames;
|
|
61
|
-
for (const modifier of this.modifiers)newFrames = await modifier(newFrames);
|
|
62
|
-
return newFrames;
|
|
63
|
-
}
|
|
64
|
-
convertToExceptionList(exceptionWithStack, mechanism) {
|
|
65
|
-
const currentException = {
|
|
66
|
-
type: exceptionWithStack.type,
|
|
67
|
-
value: exceptionWithStack.value,
|
|
68
|
-
mechanism: {
|
|
69
|
-
type: mechanism.type ?? 'generic',
|
|
70
|
-
handled: mechanism.handled ?? true,
|
|
71
|
-
synthetic: exceptionWithStack.synthetic ?? false
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
if (exceptionWithStack.stack) currentException.stacktrace = {
|
|
75
|
-
type: 'raw',
|
|
76
|
-
frames: exceptionWithStack.stack
|
|
77
|
-
};
|
|
78
|
-
const exceptionList = [
|
|
79
|
-
currentException
|
|
80
|
-
];
|
|
81
|
-
if (null != exceptionWithStack.cause) exceptionList.push(...this.convertToExceptionList(exceptionWithStack.cause, {
|
|
82
|
-
...mechanism,
|
|
83
|
-
handled: true
|
|
84
|
-
}));
|
|
85
|
-
return exceptionList;
|
|
86
|
-
}
|
|
87
|
-
buildParsingContext(hint) {
|
|
88
|
-
const context = {
|
|
89
|
-
chunkIdMap: getFilenameToChunkIdMap(this.stackParser),
|
|
90
|
-
skipFirstLines: hint.skipFirstLines ?? 1
|
|
91
|
-
};
|
|
92
|
-
return context;
|
|
93
|
-
}
|
|
94
|
-
buildCoercingContext(mechanism, hint, depth = 0) {
|
|
95
|
-
const coerce = (input, depth)=>{
|
|
96
|
-
if (!(depth <= MAX_CAUSE_RECURSION)) return;
|
|
97
|
-
{
|
|
98
|
-
const ctx = this.buildCoercingContext(mechanism, hint, depth);
|
|
99
|
-
return this.applyCoercers(input, ctx);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const context = {
|
|
103
|
-
...hint,
|
|
104
|
-
syntheticException: 0 == depth ? hint.syntheticException : void 0,
|
|
105
|
-
mechanism,
|
|
106
|
-
apply: (input)=>coerce(input, depth),
|
|
107
|
-
next: (input)=>coerce(input, depth + 1)
|
|
108
|
-
};
|
|
109
|
-
return context;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
export { ErrorPropertiesBuilder };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { isUndefined } from "../../utils/index.mjs";
|
|
2
|
-
const UNKNOWN_FUNCTION = '?';
|
|
3
|
-
function createFrame(platform, filename, func, lineno, colno) {
|
|
4
|
-
const frame = {
|
|
5
|
-
platform,
|
|
6
|
-
filename,
|
|
7
|
-
function: '<anonymous>' === func ? UNKNOWN_FUNCTION : func,
|
|
8
|
-
in_app: true
|
|
9
|
-
};
|
|
10
|
-
if (!isUndefined(lineno)) frame.lineno = lineno;
|
|
11
|
-
if (!isUndefined(colno)) frame.colno = colno;
|
|
12
|
-
return frame;
|
|
13
|
-
}
|
|
14
|
-
export { UNKNOWN_FUNCTION, createFrame };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION, createFrame } from "./base.mjs";
|
|
2
|
-
import { extractSafariExtensionDetails } from "./safari.mjs";
|
|
3
|
-
const chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
4
|
-
const chromeRegex = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
|
|
5
|
-
const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
|
|
6
|
-
const chromeStackLineParser = (line, platform)=>{
|
|
7
|
-
const noFnParts = chromeRegexNoFnName.exec(line);
|
|
8
|
-
if (noFnParts) {
|
|
9
|
-
const [, filename, line, col] = noFnParts;
|
|
10
|
-
return createFrame(platform, filename, UNKNOWN_FUNCTION, +line, +col);
|
|
11
|
-
}
|
|
12
|
-
const parts = chromeRegex.exec(line);
|
|
13
|
-
if (parts) {
|
|
14
|
-
const isEval = parts[2] && 0 === parts[2].indexOf('eval');
|
|
15
|
-
if (isEval) {
|
|
16
|
-
const subMatch = chromeEvalRegex.exec(parts[2]);
|
|
17
|
-
if (subMatch) {
|
|
18
|
-
parts[2] = subMatch[1];
|
|
19
|
-
parts[3] = subMatch[2];
|
|
20
|
-
parts[4] = subMatch[3];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);
|
|
24
|
-
return createFrame(platform, filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export { chromeStackLineParser };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION, createFrame } from "./base.mjs";
|
|
2
|
-
import { extractSafariExtensionDetails } from "./safari.mjs";
|
|
3
|
-
const geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
4
|
-
const geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
|
|
5
|
-
const geckoStackLineParser = (line, platform)=>{
|
|
6
|
-
const parts = geckoREgex.exec(line);
|
|
7
|
-
if (parts) {
|
|
8
|
-
const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
|
|
9
|
-
if (isEval) {
|
|
10
|
-
const subMatch = geckoEvalRegex.exec(parts[3]);
|
|
11
|
-
if (subMatch) {
|
|
12
|
-
parts[1] = parts[1] || 'eval';
|
|
13
|
-
parts[3] = subMatch[1];
|
|
14
|
-
parts[4] = subMatch[2];
|
|
15
|
-
parts[5] = '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
let filename = parts[3];
|
|
19
|
-
let func = parts[1] || UNKNOWN_FUNCTION;
|
|
20
|
-
[func, filename] = extractSafariExtensionDetails(func, filename);
|
|
21
|
-
return createFrame(platform, filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export { geckoStackLineParser };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION } from "./base.mjs";
|
|
2
|
-
import { chromeStackLineParser } from "./chrome.mjs";
|
|
3
|
-
import { geckoStackLineParser } from "./gecko.mjs";
|
|
4
|
-
import { winjsStackLineParser } from "./winjs.mjs";
|
|
5
|
-
import { opera10StackLineParser, opera11StackLineParser } from "./opera.mjs";
|
|
6
|
-
import { nodeStackLineParser } from "./node.mjs";
|
|
7
|
-
const WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
|
|
8
|
-
const STACKTRACE_FRAME_LIMIT = 50;
|
|
9
|
-
function reverseAndStripFrames(stack) {
|
|
10
|
-
if (!stack.length) return [];
|
|
11
|
-
const localStack = Array.from(stack);
|
|
12
|
-
localStack.reverse();
|
|
13
|
-
return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame)=>({
|
|
14
|
-
...frame,
|
|
15
|
-
filename: frame.filename || getLastStackFrame(localStack).filename,
|
|
16
|
-
function: frame.function || UNKNOWN_FUNCTION
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
function getLastStackFrame(arr) {
|
|
20
|
-
return arr[arr.length - 1] || {};
|
|
21
|
-
}
|
|
22
|
-
function createDefaultStackParser() {
|
|
23
|
-
return createStackParser("web:javascript", chromeStackLineParser, geckoStackLineParser);
|
|
24
|
-
}
|
|
25
|
-
function createStackParser(platform, ...parsers) {
|
|
26
|
-
return (stack, skipFirstLines = 0)=>{
|
|
27
|
-
const frames = [];
|
|
28
|
-
const lines = stack.split('\n');
|
|
29
|
-
for(let i = skipFirstLines; i < lines.length; i++){
|
|
30
|
-
const line = lines[i];
|
|
31
|
-
if (line.length > 1024) continue;
|
|
32
|
-
const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;
|
|
33
|
-
if (!cleanedLine.match(/\S*Error: /)) {
|
|
34
|
-
for (const parser of parsers){
|
|
35
|
-
const frame = parser(cleanedLine, platform);
|
|
36
|
-
if (frame) {
|
|
37
|
-
frames.push(frame);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (frames.length >= STACKTRACE_FRAME_LIMIT) break;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return reverseAndStripFrames(frames);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export { chromeStackLineParser, createDefaultStackParser, createStackParser, geckoStackLineParser, nodeStackLineParser, opera10StackLineParser, opera11StackLineParser, reverseAndStripFrames, winjsStackLineParser };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION } from "./base.mjs";
|
|
2
|
-
const FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
3
|
-
const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
4
|
-
const nodeStackLineParser = (line, platform)=>{
|
|
5
|
-
const lineMatch = line.match(FULL_MATCH);
|
|
6
|
-
if (lineMatch) {
|
|
7
|
-
let object;
|
|
8
|
-
let method;
|
|
9
|
-
let functionName;
|
|
10
|
-
let typeName;
|
|
11
|
-
let methodName;
|
|
12
|
-
if (lineMatch[1]) {
|
|
13
|
-
functionName = lineMatch[1];
|
|
14
|
-
let methodStart = functionName.lastIndexOf('.');
|
|
15
|
-
if ('.' === functionName[methodStart - 1]) methodStart--;
|
|
16
|
-
if (methodStart > 0) {
|
|
17
|
-
object = functionName.slice(0, methodStart);
|
|
18
|
-
method = functionName.slice(methodStart + 1);
|
|
19
|
-
const objectEnd = object.indexOf('.Module');
|
|
20
|
-
if (objectEnd > 0) {
|
|
21
|
-
functionName = functionName.slice(objectEnd + 1);
|
|
22
|
-
object = object.slice(0, objectEnd);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
typeName = void 0;
|
|
26
|
-
}
|
|
27
|
-
if (method) {
|
|
28
|
-
typeName = object;
|
|
29
|
-
methodName = method;
|
|
30
|
-
}
|
|
31
|
-
if ('<anonymous>' === method) {
|
|
32
|
-
methodName = void 0;
|
|
33
|
-
functionName = void 0;
|
|
34
|
-
}
|
|
35
|
-
if (void 0 === functionName) {
|
|
36
|
-
methodName = methodName || UNKNOWN_FUNCTION;
|
|
37
|
-
functionName = typeName ? `${typeName}.${methodName}` : methodName;
|
|
38
|
-
}
|
|
39
|
-
let filename = lineMatch[2]?.startsWith('file://') ? lineMatch[2].slice(7) : lineMatch[2];
|
|
40
|
-
const isNative = 'native' === lineMatch[5];
|
|
41
|
-
if (filename?.match(/\/[A-Z]:/)) filename = filename.slice(1);
|
|
42
|
-
if (!filename && lineMatch[5] && !isNative) filename = lineMatch[5];
|
|
43
|
-
return {
|
|
44
|
-
filename: filename ? decodeURI(filename) : void 0,
|
|
45
|
-
module: void 0,
|
|
46
|
-
function: functionName,
|
|
47
|
-
lineno: _parseIntOrUndefined(lineMatch[3]),
|
|
48
|
-
colno: _parseIntOrUndefined(lineMatch[4]),
|
|
49
|
-
in_app: filenameIsInApp(filename || '', isNative),
|
|
50
|
-
platform: platform
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if (line.match(FILENAME_MATCH)) return {
|
|
54
|
-
filename: line,
|
|
55
|
-
platform: platform
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
function filenameIsInApp(filename, isNative = false) {
|
|
59
|
-
const isInternal = isNative || filename && !filename.startsWith('/') && !filename.match(/^[A-Z]:/) && !filename.startsWith('.') && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
60
|
-
return !isInternal && void 0 !== filename && !filename.includes('node_modules/');
|
|
61
|
-
}
|
|
62
|
-
function _parseIntOrUndefined(input) {
|
|
63
|
-
return parseInt(input || '', 10) || void 0;
|
|
64
|
-
}
|
|
65
|
-
export { nodeStackLineParser };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION, createFrame } from "./base.mjs";
|
|
2
|
-
const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
3
|
-
const opera10StackLineParser = (line, platform)=>{
|
|
4
|
-
const parts = opera10Regex.exec(line);
|
|
5
|
-
return parts ? createFrame(platform, parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : void 0;
|
|
6
|
-
};
|
|
7
|
-
const opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
|
|
8
|
-
const opera11StackLineParser = (line, platform)=>{
|
|
9
|
-
const parts = opera11Regex.exec(line);
|
|
10
|
-
return parts ? createFrame(platform, parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : void 0;
|
|
11
|
-
};
|
|
12
|
-
export { opera10StackLineParser, opera11StackLineParser };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION } from "./base.mjs";
|
|
2
|
-
const extractSafariExtensionDetails = (func, filename)=>{
|
|
3
|
-
const isSafariExtension = -1 !== func.indexOf('safari-extension');
|
|
4
|
-
const isSafariWebExtension = -1 !== func.indexOf('safari-web-extension');
|
|
5
|
-
return isSafariExtension || isSafariWebExtension ? [
|
|
6
|
-
-1 !== func.indexOf('@') ? func.split('@')[0] : UNKNOWN_FUNCTION,
|
|
7
|
-
isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`
|
|
8
|
-
] : [
|
|
9
|
-
func,
|
|
10
|
-
filename
|
|
11
|
-
];
|
|
12
|
-
};
|
|
13
|
-
export { extractSafariExtensionDetails };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UNKNOWN_FUNCTION, createFrame } from "./base.mjs";
|
|
2
|
-
const winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
3
|
-
const winjsStackLineParser = (line, platform)=>{
|
|
4
|
-
const parts = winjsRegex.exec(line);
|
|
5
|
-
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
6
|
-
};
|
|
7
|
-
export { winjsStackLineParser };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
class ReduceableCache {
|
|
2
|
-
constructor(_maxSize){
|
|
3
|
-
this._maxSize = _maxSize;
|
|
4
|
-
this._cache = new Map();
|
|
5
|
-
}
|
|
6
|
-
get(key) {
|
|
7
|
-
const value = this._cache.get(key);
|
|
8
|
-
if (void 0 === value) return;
|
|
9
|
-
this._cache.delete(key);
|
|
10
|
-
this._cache.set(key, value);
|
|
11
|
-
return value;
|
|
12
|
-
}
|
|
13
|
-
set(key, value) {
|
|
14
|
-
this._cache.set(key, value);
|
|
15
|
-
}
|
|
16
|
-
reduce() {
|
|
17
|
-
while(this._cache.size >= this._maxSize){
|
|
18
|
-
const value = this._cache.keys().next().value;
|
|
19
|
-
if (value) this._cache.delete(value);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export { ReduceableCache };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class SimpleEventEmitter {
|
|
2
|
-
constructor(){
|
|
3
|
-
this.events = {};
|
|
4
|
-
this.events = {};
|
|
5
|
-
}
|
|
6
|
-
on(event, listener) {
|
|
7
|
-
if (!this.events[event]) this.events[event] = [];
|
|
8
|
-
this.events[event].push(listener);
|
|
9
|
-
return ()=>{
|
|
10
|
-
this.events[event] = this.events[event].filter((x)=>x !== listener);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
emit(event, payload) {
|
|
14
|
-
for (const listener of this.events[event] || [])listener(payload);
|
|
15
|
-
for (const listener of this.events['*'] || [])listener(event, payload);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export { SimpleEventEmitter };
|