@interfere/types 9.0.2 → 9.0.3-canary.1
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/README.md +1 -1
- package/dist/data/frame.cjs +1 -0
- package/dist/data/frame.d.cts +27 -0
- package/dist/data/frame.d.mts +2 -1
- package/dist/data/frame.mjs +2 -1
- package/dist/data/session.cjs +1 -0
- package/dist/data/session.d.cts +8 -0
- package/dist/data/session.d.mts +2 -1
- package/dist/data/session.mjs +2 -1
- package/dist/data/source-maps.cjs +1 -0
- package/dist/data/source-maps.d.cts +151 -0
- package/dist/data/source-maps.d.mts +7 -2
- package/dist/data/source-maps.mjs +2 -1
- package/dist/events/error.cjs +1 -0
- package/dist/events/error.d.cts +196 -0
- package/dist/events/error.d.mts +2 -1
- package/dist/events/error.mjs +2 -1
- package/dist/events/pageleave.cjs +1 -0
- package/dist/events/pageleave.d.cts +13 -0
- package/dist/events/pageleave.d.mts +2 -1
- package/dist/events/pageleave.mjs +2 -1
- package/dist/events/pageview.cjs +1 -0
- package/dist/events/pageview.d.cts +14 -0
- package/dist/events/pageview.d.mts +2 -1
- package/dist/events/pageview.mjs +2 -1
- package/dist/integrations/index.cjs +1 -0
- package/dist/integrations/index.d.cts +77 -0
- package/dist/integrations/index.d.mts +31 -1
- package/dist/integrations/index.mjs +2 -1
- package/dist/integrations/platforms/cli.cjs +1 -0
- package/dist/integrations/platforms/cli.d.cts +12 -0
- package/dist/integrations/platforms/cli.d.mts +12 -0
- package/dist/integrations/platforms/cli.mjs +2 -0
- package/dist/integrations/platforms/github.cjs +1 -0
- package/dist/integrations/platforms/github.d.cts +77 -0
- package/dist/integrations/platforms/github.d.mts +63 -1
- package/dist/integrations/platforms/github.mjs +2 -1
- package/dist/integrations/platforms/slack.cjs +1 -0
- package/dist/integrations/platforms/slack.d.cts +33 -0
- package/dist/integrations/platforms/slack.d.mts +2 -1
- package/dist/integrations/platforms/slack.mjs +2 -1
- package/dist/integrations/platforms/vercel.cjs +1 -0
- package/dist/integrations/platforms/vercel.d.cts +47 -0
- package/dist/integrations/platforms/vercel.d.mts +2 -1
- package/dist/integrations/platforms/vercel.mjs +2 -1
- package/dist/releases/definition.cjs +1 -0
- package/dist/releases/definition.d.cts +71 -0
- package/dist/releases/definition.d.mts +16 -1
- package/dist/releases/definition.mjs +2 -1
- package/dist/releases/slug.cjs +1 -0
- package/dist/releases/slug.d.cts +24 -0
- package/dist/releases/slug.d.mts +3 -1
- package/dist/releases/slug.mjs +2 -1
- package/dist/sdk/env.cjs +1 -0
- package/dist/sdk/env.d.cts +6 -0
- package/dist/sdk/env.d.mts +2 -1
- package/dist/sdk/env.mjs +2 -1
- package/dist/sdk/envelope.cjs +1 -0
- package/dist/sdk/envelope.d.cts +1441 -0
- package/dist/sdk/envelope.d.mts +14 -61
- package/dist/sdk/envelope.mjs +2 -1
- package/dist/sdk/errors.cjs +2 -0
- package/dist/sdk/errors.d.cts +156 -0
- package/dist/sdk/errors.d.mts +4 -1
- package/dist/sdk/errors.mjs +3 -2
- package/dist/sdk/geo.cjs +1 -0
- package/dist/sdk/geo.d.cts +11 -0
- package/dist/sdk/geo.d.mts +2 -1
- package/dist/sdk/geo.mjs +2 -1
- package/dist/sdk/identify.cjs +1 -0
- package/dist/sdk/identify.d.cts +35 -0
- package/dist/sdk/identify.d.mts +2 -1
- package/dist/sdk/identify.mjs +2 -1
- package/dist/sdk/plugins/context/browser.cjs +1 -0
- package/dist/sdk/plugins/context/browser.d.cts +92 -0
- package/dist/sdk/plugins/context/browser.d.mts +2 -1
- package/dist/sdk/plugins/context/browser.mjs +2 -1
- package/dist/sdk/plugins/context/edge.cjs +1 -0
- package/dist/sdk/plugins/context/edge.d.cts +10 -0
- package/dist/sdk/plugins/context/edge.d.mts +2 -1
- package/dist/sdk/plugins/context/edge.mjs +2 -1
- package/dist/sdk/plugins/context/next.cjs +1 -0
- package/dist/sdk/plugins/context/next.d.cts +62 -0
- package/dist/sdk/plugins/context/next.d.mts +2 -1
- package/dist/sdk/plugins/context/next.mjs +2 -1
- package/dist/sdk/plugins/context/node.cjs +1 -0
- package/dist/sdk/plugins/context/node.d.cts +13 -0
- package/dist/sdk/plugins/context/node.d.mts +2 -1
- package/dist/sdk/plugins/context/node.mjs +2 -1
- package/dist/sdk/plugins/manifest.cjs +1 -0
- package/dist/sdk/plugins/manifest.d.cts +60 -0
- package/dist/sdk/plugins/manifest.d.mts +2 -1
- package/dist/sdk/plugins/manifest.mjs +2 -1
- package/dist/sdk/plugins/payload/errors.cjs +1 -0
- package/dist/sdk/plugins/payload/errors.d.cts +65 -0
- package/dist/sdk/plugins/payload/errors.d.mts +2 -1
- package/dist/sdk/plugins/payload/errors.mjs +2 -1
- package/dist/sdk/plugins/payload/page-events.cjs +1 -0
- package/dist/sdk/plugins/payload/page-events.d.cts +20 -0
- package/dist/sdk/plugins/payload/page-events.d.mts +2 -1
- package/dist/sdk/plugins/payload/page-events.mjs +2 -1
- package/dist/sdk/plugins/payload/rage-click.cjs +1 -0
- package/dist/sdk/plugins/payload/rage-click.d.cts +16 -0
- package/dist/sdk/plugins/payload/rage-click.d.mts +2 -1
- package/dist/sdk/plugins/payload/rage-click.mjs +2 -1
- package/dist/sdk/plugins/payload/replay.cjs +1 -0
- package/dist/sdk/plugins/payload/replay.d.cts +14 -0
- package/dist/sdk/plugins/payload/replay.d.mts +2 -1
- package/dist/sdk/plugins/payload/replay.mjs +2 -1
- package/dist/sdk/remote-config.cjs +1 -0
- package/dist/sdk/remote-config.d.cts +39 -0
- package/dist/sdk/remote-config.d.mts +2 -1
- package/dist/sdk/remote-config.mjs +2 -1
- package/dist/sdk/runtime.cjs +1 -0
- package/dist/sdk/runtime.d.cts +41 -0
- package/dist/sdk/runtime.d.mts +27 -7
- package/dist/sdk/runtime.mjs +2 -1
- package/package.json +120 -45
- package/dist/data/frame.d.mts.map +0 -1
- package/dist/data/frame.mjs.map +0 -1
- package/dist/data/session.d.mts.map +0 -1
- package/dist/data/session.mjs.map +0 -1
- package/dist/data/source-maps.d.mts.map +0 -1
- package/dist/data/source-maps.mjs.map +0 -1
- package/dist/events/error.d.mts.map +0 -1
- package/dist/events/error.mjs.map +0 -1
- package/dist/events/pageleave.d.mts.map +0 -1
- package/dist/events/pageleave.mjs.map +0 -1
- package/dist/events/pageview.d.mts.map +0 -1
- package/dist/events/pageview.mjs.map +0 -1
- package/dist/integrations/index.d.mts.map +0 -1
- package/dist/integrations/index.mjs.map +0 -1
- package/dist/integrations/platforms/github.d.mts.map +0 -1
- package/dist/integrations/platforms/github.mjs.map +0 -1
- package/dist/integrations/platforms/slack.d.mts.map +0 -1
- package/dist/integrations/platforms/slack.mjs.map +0 -1
- package/dist/integrations/platforms/vercel.d.mts.map +0 -1
- package/dist/integrations/platforms/vercel.mjs.map +0 -1
- package/dist/releases/definition.d.mts.map +0 -1
- package/dist/releases/definition.mjs.map +0 -1
- package/dist/releases/slug.d.mts.map +0 -1
- package/dist/releases/slug.mjs.map +0 -1
- package/dist/sdk/env.d.mts.map +0 -1
- package/dist/sdk/env.mjs.map +0 -1
- package/dist/sdk/envelope.d.mts.map +0 -1
- package/dist/sdk/envelope.mjs.map +0 -1
- package/dist/sdk/errors.d.mts.map +0 -1
- package/dist/sdk/errors.mjs.map +0 -1
- package/dist/sdk/geo.d.mts.map +0 -1
- package/dist/sdk/geo.mjs.map +0 -1
- package/dist/sdk/identify.d.mts.map +0 -1
- package/dist/sdk/identify.mjs.map +0 -1
- package/dist/sdk/plugins/context/browser.d.mts.map +0 -1
- package/dist/sdk/plugins/context/browser.mjs.map +0 -1
- package/dist/sdk/plugins/context/edge.d.mts.map +0 -1
- package/dist/sdk/plugins/context/edge.mjs.map +0 -1
- package/dist/sdk/plugins/context/next.d.mts.map +0 -1
- package/dist/sdk/plugins/context/next.mjs.map +0 -1
- package/dist/sdk/plugins/context/node.d.mts.map +0 -1
- package/dist/sdk/plugins/context/node.mjs.map +0 -1
- package/dist/sdk/plugins/manifest.d.mts.map +0 -1
- package/dist/sdk/plugins/manifest.mjs.map +0 -1
- package/dist/sdk/plugins/payload/errors.d.mts.map +0 -1
- package/dist/sdk/plugins/payload/errors.mjs.map +0 -1
- package/dist/sdk/plugins/payload/page-events.d.mts.map +0 -1
- package/dist/sdk/plugins/payload/page-events.mjs.map +0 -1
- package/dist/sdk/plugins/payload/rage-click.d.mts.map +0 -1
- package/dist/sdk/plugins/payload/rage-click.mjs.map +0 -1
- package/dist/sdk/plugins/payload/replay.d.mts.map +0 -1
- package/dist/sdk/plugins/payload/replay.mjs.map +0 -1
- package/dist/sdk/remote-config.d.mts.map +0 -1
- package/dist/sdk/remote-config.mjs.map +0 -1
- package/dist/sdk/runtime.d.mts.map +0 -1
- package/dist/sdk/runtime.mjs.map +0 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const edgeContextSchema=z.object({runtime:z.literal(`edge`)}).meta({id:`EdgeContext`,title:`EdgeContext`,description:`Request context for the Edge runtime.`});export{edgeContextSchema};
|
|
2
|
+
//# sourceMappingURL=edge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const renderSourceSchema=zod.z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).meta({id:`RenderSource`,title:`RenderSource`}),renderTypeSchema=zod.z.enum([`dynamic`,`dynamic-resume`]).meta({id:`RenderType`,title:`RenderType`}),revalidateReasonSchema=zod.z.enum([`on-demand`,`stale`]).meta({id:`RevalidateReason`,title:`RevalidateReason`}),routeTypeSchema=zod.z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).meta({id:`RouteType`,title:`RouteType`}),routerKindSchema=zod.z.enum([`Pages Router`,`App Router`]).meta({id:`RouterKind`,title:`RouterKind`}),nextjsContextSchema=zod.z.object({errorDigest:zod.z.string().optional(),renderSource:renderSourceSchema.optional(),renderType:renderTypeSchema.optional(),requestMethod:zod.z.string().optional(),requestPath:zod.z.string().optional(),revalidateReason:revalidateReasonSchema.optional(),routePath:zod.z.string().optional(),routeType:routeTypeSchema.optional(),routerKind:routerKindSchema.optional(),runtime:zod.z.literal(`nextjs`)}).meta({id:`NextjsContext`,title:`NextjsContext`,description:`Request context for the Next.js runtime.`});exports.nextjsContextSchema=nextjsContextSchema,exports.renderSourceSchema=renderSourceSchema,exports.renderTypeSchema=renderTypeSchema,exports.revalidateReasonSchema=revalidateReasonSchema,exports.routeTypeSchema=routeTypeSchema,exports.routerKindSchema=routerKindSchema;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/context/next.d.ts
|
|
4
|
+
declare const renderSourceSchema: z.ZodEnum<{
|
|
5
|
+
"react-server-components": "react-server-components";
|
|
6
|
+
"react-server-components-payload": "react-server-components-payload";
|
|
7
|
+
"server-rendering": "server-rendering";
|
|
8
|
+
}>;
|
|
9
|
+
declare const renderTypeSchema: z.ZodEnum<{
|
|
10
|
+
dynamic: "dynamic";
|
|
11
|
+
"dynamic-resume": "dynamic-resume";
|
|
12
|
+
}>;
|
|
13
|
+
declare const revalidateReasonSchema: z.ZodEnum<{
|
|
14
|
+
"on-demand": "on-demand";
|
|
15
|
+
stale: "stale";
|
|
16
|
+
}>;
|
|
17
|
+
declare const routeTypeSchema: z.ZodEnum<{
|
|
18
|
+
action: "action";
|
|
19
|
+
middleware: "middleware";
|
|
20
|
+
proxy: "proxy";
|
|
21
|
+
render: "render";
|
|
22
|
+
route: "route";
|
|
23
|
+
}>;
|
|
24
|
+
declare const routerKindSchema: z.ZodEnum<{
|
|
25
|
+
"App Router": "App Router";
|
|
26
|
+
"Pages Router": "Pages Router";
|
|
27
|
+
}>;
|
|
28
|
+
declare const nextjsContextSchema: z.ZodObject<{
|
|
29
|
+
errorDigest: z.ZodOptional<z.ZodString>;
|
|
30
|
+
renderSource: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
"react-server-components": "react-server-components";
|
|
32
|
+
"react-server-components-payload": "react-server-components-payload";
|
|
33
|
+
"server-rendering": "server-rendering";
|
|
34
|
+
}>>;
|
|
35
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
dynamic: "dynamic";
|
|
37
|
+
"dynamic-resume": "dynamic-resume";
|
|
38
|
+
}>>;
|
|
39
|
+
requestMethod: z.ZodOptional<z.ZodString>;
|
|
40
|
+
requestPath: z.ZodOptional<z.ZodString>;
|
|
41
|
+
revalidateReason: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
"on-demand": "on-demand";
|
|
43
|
+
stale: "stale";
|
|
44
|
+
}>>;
|
|
45
|
+
routePath: z.ZodOptional<z.ZodString>;
|
|
46
|
+
routeType: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
action: "action";
|
|
48
|
+
middleware: "middleware";
|
|
49
|
+
proxy: "proxy";
|
|
50
|
+
render: "render";
|
|
51
|
+
route: "route";
|
|
52
|
+
}>>;
|
|
53
|
+
routerKind: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
"App Router": "App Router";
|
|
55
|
+
"Pages Router": "Pages Router";
|
|
56
|
+
}>>;
|
|
57
|
+
runtime: z.ZodLiteral<"nextjs">;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
type NextjsContext = z.infer<typeof nextjsContextSchema>;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
|
|
62
|
+
//# sourceMappingURL=next.d.cts.map
|
|
@@ -58,4 +58,5 @@ declare const nextjsContextSchema: z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>;
|
|
59
59
|
type NextjsContext = z.infer<typeof nextjsContextSchema>;
|
|
60
60
|
//#endregion
|
|
61
|
-
export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
|
|
61
|
+
export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
|
|
62
|
+
//# sourceMappingURL=next.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const renderSourceSchema=z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).meta({id:`RenderSource`,title:`RenderSource`}),renderTypeSchema=z.enum([`dynamic`,`dynamic-resume`]).meta({id:`RenderType`,title:`RenderType`}),revalidateReasonSchema=z.enum([`on-demand`,`stale`]).meta({id:`RevalidateReason`,title:`RevalidateReason`}),routeTypeSchema=z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).meta({id:`RouteType`,title:`RouteType`}),routerKindSchema=z.enum([`Pages Router`,`App Router`]).meta({id:`RouterKind`,title:`RouterKind`}),nextjsContextSchema=z.object({errorDigest:z.string().optional(),renderSource:renderSourceSchema.optional(),renderType:renderTypeSchema.optional(),requestMethod:z.string().optional(),requestPath:z.string().optional(),revalidateReason:revalidateReasonSchema.optional(),routePath:z.string().optional(),routeType:routeTypeSchema.optional(),routerKind:routerKindSchema.optional(),runtime:z.literal(`nextjs`)}).meta({id:`NextjsContext`,title:`NextjsContext`,description:`Request context for the Next.js runtime.`});export{nextjsContextSchema,renderSourceSchema,renderTypeSchema,revalidateReasonSchema,routeTypeSchema,routerKindSchema};
|
|
2
|
+
//# sourceMappingURL=next.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const nodeContextSchema=zod.z.object({errorDigest:zod.z.string().optional(),requestMethod:zod.z.string().optional(),requestPath:zod.z.string().optional(),runtime:zod.z.literal(`node`)}).meta({id:`NodeContext`,title:`NodeContext`,description:`Request context for the Node.js runtime.`});exports.nodeContextSchema=nodeContextSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/context/node.d.ts
|
|
4
|
+
declare const nodeContextSchema: z.ZodObject<{
|
|
5
|
+
errorDigest: z.ZodOptional<z.ZodString>;
|
|
6
|
+
requestMethod: z.ZodOptional<z.ZodString>;
|
|
7
|
+
requestPath: z.ZodOptional<z.ZodString>;
|
|
8
|
+
runtime: z.ZodLiteral<"node">;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type NodeContext = z.infer<typeof nodeContextSchema>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { NodeContext, nodeContextSchema };
|
|
13
|
+
//# sourceMappingURL=node.d.cts.map
|
|
@@ -9,4 +9,5 @@ declare const nodeContextSchema: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
type NodeContext = z.infer<typeof nodeContextSchema>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { NodeContext, nodeContextSchema };
|
|
12
|
+
export { NodeContext, nodeContextSchema };
|
|
13
|
+
//# sourceMappingURL=node.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const nodeContextSchema=z.object({errorDigest:z.string().optional(),requestMethod:z.string().optional(),requestPath:z.string().optional(),runtime:z.literal(`node`)}).meta({id:`NodeContext`,title:`NodeContext`,description:`Request context for the Node.js runtime.`});export{nodeContextSchema};
|
|
2
|
+
//# sourceMappingURL=node.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const CONSENT_CATEGORIES=[`necessary`,`analytics`,`replay`],PLUGIN_MANIFEST=[{consentCategory:`necessary`,defaultEnabled:!0,events:[{enrich:!0,name:`error`}],name:`errors`},{consentCategory:`analytics`,defaultEnabled:!0,events:[],name:`device`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`pageview`},{enrich:!0,name:`pageleave`},{enrich:!0,name:`ui_event`}],name:`pageEvents`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`rage_click`}],name:`rageClick`},{consentCategory:`replay`,defaultEnabled:!0,events:[{enrich:!1,name:`replay_chunk`}],name:`replay`},{consentCategory:`necessary`,defaultEnabled:!0,events:[],name:`logs`}];exports.CONSENT_CATEGORIES=CONSENT_CATEGORIES,exports.PLUGIN_MANIFEST=PLUGIN_MANIFEST;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/sdk/plugins/manifest.d.ts
|
|
2
|
+
declare const CONSENT_CATEGORIES: readonly ["necessary", "analytics", "replay"];
|
|
3
|
+
type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T> }[keyof T];
|
|
4
|
+
declare const PLUGIN_MANIFEST: readonly [{
|
|
5
|
+
readonly consentCategory: "necessary";
|
|
6
|
+
readonly defaultEnabled: true;
|
|
7
|
+
readonly events: readonly [{
|
|
8
|
+
readonly enrich: true;
|
|
9
|
+
readonly name: "error";
|
|
10
|
+
}];
|
|
11
|
+
readonly name: "errors";
|
|
12
|
+
}, {
|
|
13
|
+
readonly consentCategory: "analytics";
|
|
14
|
+
readonly defaultEnabled: true;
|
|
15
|
+
readonly events: readonly [];
|
|
16
|
+
readonly name: "device";
|
|
17
|
+
}, {
|
|
18
|
+
readonly consentCategory: "analytics";
|
|
19
|
+
readonly defaultEnabled: true;
|
|
20
|
+
readonly events: readonly [{
|
|
21
|
+
readonly enrich: true;
|
|
22
|
+
readonly name: "pageview";
|
|
23
|
+
}, {
|
|
24
|
+
readonly enrich: true;
|
|
25
|
+
readonly name: "pageleave";
|
|
26
|
+
}, {
|
|
27
|
+
readonly enrich: true;
|
|
28
|
+
readonly name: "ui_event";
|
|
29
|
+
}];
|
|
30
|
+
readonly name: "pageEvents";
|
|
31
|
+
}, {
|
|
32
|
+
readonly consentCategory: "analytics";
|
|
33
|
+
readonly defaultEnabled: true;
|
|
34
|
+
readonly events: readonly [{
|
|
35
|
+
readonly enrich: true;
|
|
36
|
+
readonly name: "rage_click";
|
|
37
|
+
}];
|
|
38
|
+
readonly name: "rageClick";
|
|
39
|
+
}, {
|
|
40
|
+
readonly consentCategory: "replay";
|
|
41
|
+
readonly defaultEnabled: true;
|
|
42
|
+
readonly events: readonly [{
|
|
43
|
+
readonly enrich: false;
|
|
44
|
+
readonly name: "replay_chunk";
|
|
45
|
+
}];
|
|
46
|
+
readonly name: "replay";
|
|
47
|
+
}, {
|
|
48
|
+
readonly consentCategory: "necessary";
|
|
49
|
+
readonly defaultEnabled: true;
|
|
50
|
+
readonly events: readonly [];
|
|
51
|
+
readonly name: "logs";
|
|
52
|
+
}];
|
|
53
|
+
type PluginManifest = typeof PLUGIN_MANIFEST;
|
|
54
|
+
type ConsentCategory = (typeof CONSENT_CATEGORIES)[number];
|
|
55
|
+
type PluginKey = PluginManifest[number]["name"];
|
|
56
|
+
type GateableCategory = Exclude<ConsentCategory, "necessary">;
|
|
57
|
+
type ConsentState = AtLeastOne<Record<GateableCategory, boolean>>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
|
|
60
|
+
//# sourceMappingURL=manifest.d.cts.map
|
|
@@ -56,4 +56,5 @@ type PluginKey = PluginManifest[number]["name"];
|
|
|
56
56
|
type GateableCategory = Exclude<ConsentCategory, "necessary">;
|
|
57
57
|
type ConsentState = AtLeastOne<Record<GateableCategory, boolean>>;
|
|
58
58
|
//#endregion
|
|
59
|
-
export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
|
|
59
|
+
export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
|
|
60
|
+
//# sourceMappingURL=manifest.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const CONSENT_CATEGORIES=[`necessary`,`analytics`,`replay`],PLUGIN_MANIFEST=[{consentCategory:`necessary`,defaultEnabled:!0,events:[{enrich:!0,name:`error`}],name:`errors`},{consentCategory:`analytics`,defaultEnabled:!0,events:[],name:`device`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`pageview`},{enrich:!0,name:`pageleave`},{enrich:!0,name:`ui_event`}],name:`pageEvents`},{consentCategory:`analytics`,defaultEnabled:!0,events:[{enrich:!0,name:`rage_click`}],name:`rageClick`},{consentCategory:`replay`,defaultEnabled:!0,events:[{enrich:!1,name:`replay_chunk`}],name:`replay`},{consentCategory:`necessary`,defaultEnabled:!0,events:[],name:`logs`}];export{CONSENT_CATEGORIES,PLUGIN_MANIFEST};
|
|
2
|
+
//# sourceMappingURL=manifest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const errorSourceSchema=zod.z.enum([`client`,`server`,`edge`]).meta({id:`ErrorSource`,title:`ErrorSource`}),errorMechanismSchema=zod.z.object({type:zod.z.string(),handled:zod.z.boolean(),synthetic:zod.z.boolean().optional()}).meta({id:`ErrorMechanism`,title:`ErrorMechanism`,description:`How the exception was captured by the SDK.`}),errorExceptionSchema=zod.z.object({kind:zod.z.literal(`error`),type:zod.z.string(),value:zod.z.string(),mechanism:errorMechanismSchema.optional(),stack:zod.z.string()}),nonErrorExceptionSchema=zod.z.object({kind:zod.z.literal(`non-error`),type:zod.z.string(),value:zod.z.string(),mechanism:errorMechanismSchema.optional(),serialized:zod.z.unknown()}),exceptionValueSchema=zod.z.union([errorExceptionSchema,nonErrorExceptionSchema]).meta({id:`Exception`,title:`Exception`,description:"A single exception. Error-shaped exceptions carry the raw `error.stack` string; non-Error rejections (e.g. `Promise.reject({ code: 401 })`) carry the structured payload as `serialized` instead."}),errorEnvelopePayloadSchema=zod.z.object({exceptions:zod.z.array(exceptionValueSchema).min(1),errorDigest:zod.z.string().optional()}).meta({id:`ErrorPayload`,title:`ErrorPayload`,description:`Payload for an error envelope.`});exports.errorEnvelopePayloadSchema=errorEnvelopePayloadSchema,exports.errorMechanismSchema=errorMechanismSchema,exports.errorSourceSchema=errorSourceSchema,exports.exceptionValueSchema=exceptionValueSchema;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/payload/errors.d.ts
|
|
4
|
+
declare const errorSourceSchema: z.ZodEnum<{
|
|
5
|
+
client: "client";
|
|
6
|
+
edge: "edge";
|
|
7
|
+
server: "server";
|
|
8
|
+
}>;
|
|
9
|
+
type ErrorSource = z.infer<typeof errorSourceSchema>;
|
|
10
|
+
declare const errorMechanismSchema: z.ZodObject<{
|
|
11
|
+
type: z.ZodString;
|
|
12
|
+
handled: z.ZodBoolean;
|
|
13
|
+
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type ErrorMechanism = z.infer<typeof errorMechanismSchema>;
|
|
16
|
+
declare const exceptionValueSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"error">;
|
|
18
|
+
type: z.ZodString;
|
|
19
|
+
value: z.ZodString;
|
|
20
|
+
mechanism: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
type: z.ZodString;
|
|
22
|
+
handled: z.ZodBoolean;
|
|
23
|
+
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
stack: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"non-error">;
|
|
28
|
+
type: z.ZodString;
|
|
29
|
+
value: z.ZodString;
|
|
30
|
+
mechanism: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
type: z.ZodString;
|
|
32
|
+
handled: z.ZodBoolean;
|
|
33
|
+
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
serialized: z.ZodUnknown;
|
|
36
|
+
}, z.core.$strip>]>;
|
|
37
|
+
type ExceptionValue = z.infer<typeof exceptionValueSchema>;
|
|
38
|
+
declare const errorEnvelopePayloadSchema: z.ZodObject<{
|
|
39
|
+
exceptions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"error">;
|
|
41
|
+
type: z.ZodString;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
mechanism: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
type: z.ZodString;
|
|
45
|
+
handled: z.ZodBoolean;
|
|
46
|
+
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
stack: z.ZodString;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"non-error">;
|
|
51
|
+
type: z.ZodString;
|
|
52
|
+
value: z.ZodString;
|
|
53
|
+
mechanism: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
type: z.ZodString;
|
|
55
|
+
handled: z.ZodBoolean;
|
|
56
|
+
synthetic: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
serialized: z.ZodUnknown;
|
|
59
|
+
}, z.core.$strip>]>>;
|
|
60
|
+
errorDigest: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
type ErrorEnvelopePayload = z.infer<typeof errorEnvelopePayloadSchema>;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
|
|
65
|
+
//# sourceMappingURL=errors.d.cts.map
|
|
@@ -61,4 +61,5 @@ declare const errorEnvelopePayloadSchema: z.ZodObject<{
|
|
|
61
61
|
}, z.core.$strip>;
|
|
62
62
|
type ErrorEnvelopePayload = z.infer<typeof errorEnvelopePayloadSchema>;
|
|
63
63
|
//#endregion
|
|
64
|
-
export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
|
|
64
|
+
export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
|
|
65
|
+
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const errorSourceSchema=z.enum([`client`,`server`,`edge`]).meta({id:`ErrorSource`,title:`ErrorSource`}),errorMechanismSchema=z.object({type:z.string(),handled:z.boolean(),synthetic:z.boolean().optional()}).meta({id:`ErrorMechanism`,title:`ErrorMechanism`,description:`How the exception was captured by the SDK.`}),errorExceptionSchema=z.object({kind:z.literal(`error`),type:z.string(),value:z.string(),mechanism:errorMechanismSchema.optional(),stack:z.string()}),nonErrorExceptionSchema=z.object({kind:z.literal(`non-error`),type:z.string(),value:z.string(),mechanism:errorMechanismSchema.optional(),serialized:z.unknown()}),exceptionValueSchema=z.union([errorExceptionSchema,nonErrorExceptionSchema]).meta({id:`Exception`,title:`Exception`,description:"A single exception. Error-shaped exceptions carry the raw `error.stack` string; non-Error rejections (e.g. `Promise.reject({ code: 401 })`) carry the structured payload as `serialized` instead."}),errorEnvelopePayloadSchema=z.object({exceptions:z.array(exceptionValueSchema).min(1),errorDigest:z.string().optional()}).meta({id:`ErrorPayload`,title:`ErrorPayload`,description:`Payload for an error envelope.`});export{errorEnvelopePayloadSchema,errorMechanismSchema,errorSourceSchema,exceptionValueSchema};
|
|
2
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const uiEventPayloadSchema=zod.z.object({event:zod.z.record(zod.z.string(),zod.z.unknown())}).meta({id:`UiEventPayload`,title:`UiEventPayload`,description:`Payload for a UI event envelope.`}),pageviewPayloadSchema=zod.z.object({url:zod.z.url(),title:zod.z.string().optional()}).meta({id:`PageviewPayload`,title:`PageviewPayload`,description:`Payload for a pageview envelope.`}),pageleavePayloadSchema=zod.z.object({url:zod.z.url(),durationMs:zod.z.number().optional()}).meta({id:`PageleavePayload`,title:`PageleavePayload`,description:`Payload for a pageleave envelope.`});exports.pageleavePayloadSchema=pageleavePayloadSchema,exports.pageviewPayloadSchema=pageviewPayloadSchema,exports.uiEventPayloadSchema=uiEventPayloadSchema;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/payload/page-events.d.ts
|
|
4
|
+
declare const uiEventPayloadSchema: z.ZodObject<{
|
|
5
|
+
event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
type UiEventPayload = z.infer<typeof uiEventPayloadSchema>;
|
|
8
|
+
declare const pageviewPayloadSchema: z.ZodObject<{
|
|
9
|
+
url: z.ZodURL;
|
|
10
|
+
title: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
type PageviewPayload = z.infer<typeof pageviewPayloadSchema>;
|
|
13
|
+
declare const pageleavePayloadSchema: z.ZodObject<{
|
|
14
|
+
url: z.ZodURL;
|
|
15
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
type PageleavePayload = z.infer<typeof pageleavePayloadSchema>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
|
|
20
|
+
//# sourceMappingURL=page-events.d.cts.map
|
|
@@ -16,4 +16,5 @@ declare const pageleavePayloadSchema: z.ZodObject<{
|
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
type PageleavePayload = z.infer<typeof pageleavePayloadSchema>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
|
|
19
|
+
export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
|
|
20
|
+
//# sourceMappingURL=page-events.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const uiEventPayloadSchema=z.object({event:z.record(z.string(),z.unknown())}).meta({id:`UiEventPayload`,title:`UiEventPayload`,description:`Payload for a UI event envelope.`}),pageviewPayloadSchema=z.object({url:z.url(),title:z.string().optional()}).meta({id:`PageviewPayload`,title:`PageviewPayload`,description:`Payload for a pageview envelope.`}),pageleavePayloadSchema=z.object({url:z.url(),durationMs:z.number().optional()}).meta({id:`PageleavePayload`,title:`PageleavePayload`,description:`Payload for a pageleave envelope.`});export{pageleavePayloadSchema,pageviewPayloadSchema,uiEventPayloadSchema};
|
|
2
|
+
//# sourceMappingURL=page-events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const rageClickPayloadSchema=zod.z.object({count:zod.z.number(),timeWindow:zod.z.number(),selector:zod.z.string(),text:zod.z.string(),x:zod.z.number(),y:zod.z.number(),timestamp:zod.z.number()}).meta({id:`RageClickPayload`,title:`RageClickPayload`,description:`Payload for a rage-click envelope.`});exports.rageClickPayloadSchema=rageClickPayloadSchema;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/payload/rage-click.d.ts
|
|
4
|
+
declare const rageClickPayloadSchema: z.ZodObject<{
|
|
5
|
+
count: z.ZodNumber;
|
|
6
|
+
timeWindow: z.ZodNumber;
|
|
7
|
+
selector: z.ZodString;
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
x: z.ZodNumber;
|
|
10
|
+
y: z.ZodNumber;
|
|
11
|
+
timestamp: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
type RageClickPayload = z.infer<typeof rageClickPayloadSchema>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { RageClickPayload, rageClickPayloadSchema };
|
|
16
|
+
//# sourceMappingURL=rage-click.d.cts.map
|
|
@@ -12,4 +12,5 @@ declare const rageClickPayloadSchema: z.ZodObject<{
|
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
type RageClickPayload = z.infer<typeof rageClickPayloadSchema>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { RageClickPayload, rageClickPayloadSchema };
|
|
15
|
+
export { RageClickPayload, rageClickPayloadSchema };
|
|
16
|
+
//# sourceMappingURL=rage-click.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const rageClickPayloadSchema=z.object({count:z.number(),timeWindow:z.number(),selector:z.string(),text:z.string(),x:z.number(),y:z.number(),timestamp:z.number()}).meta({id:`RageClickPayload`,title:`RageClickPayload`,description:`Payload for a rage-click envelope.`});export{rageClickPayloadSchema};
|
|
2
|
+
//# sourceMappingURL=rage-click.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const replayChunkPayloadSchema=zod.z.object({ts:zod.z.number(),count:zod.z.number(),events:zod.z.array(zod.z.string()),first_event_ts:zod.z.number().optional(),last_event_ts:zod.z.number().optional()}).meta({id:`ReplayChunkPayload`,title:`ReplayChunkPayload`,description:`Payload for a replay-chunk envelope.`});exports.replayChunkPayloadSchema=replayChunkPayloadSchema;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/plugins/payload/replay.d.ts
|
|
4
|
+
declare const replayChunkPayloadSchema: z.ZodObject<{
|
|
5
|
+
ts: z.ZodNumber;
|
|
6
|
+
count: z.ZodNumber;
|
|
7
|
+
events: z.ZodArray<z.ZodString>;
|
|
8
|
+
first_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
last_event_ts: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type ReplayChunkPayload = z.infer<typeof replayChunkPayloadSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ReplayChunkPayload, replayChunkPayloadSchema };
|
|
14
|
+
//# sourceMappingURL=replay.d.cts.map
|
|
@@ -10,4 +10,5 @@ declare const replayChunkPayloadSchema: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
type ReplayChunkPayload = z.infer<typeof replayChunkPayloadSchema>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { ReplayChunkPayload, replayChunkPayloadSchema };
|
|
13
|
+
export { ReplayChunkPayload, replayChunkPayloadSchema };
|
|
14
|
+
//# sourceMappingURL=replay.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const replayChunkPayloadSchema=z.object({ts:z.number(),count:z.number(),events:z.array(z.string()),first_event_ts:z.number().optional(),last_event_ts:z.number().optional()}).meta({id:`ReplayChunkPayload`,title:`ReplayChunkPayload`,description:`Payload for a replay-chunk envelope.`});export{replayChunkPayloadSchema};
|
|
2
|
+
//# sourceMappingURL=replay.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_plugins_manifest=require("./plugins/manifest.cjs");let zod=require("zod");const remotePluginConfigSchema=zod.z.object(Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.map(p=>[p.name,zod.z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=zod.z.object({plugins:remotePluginConfigSchema}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));exports.EVENT_TYPE_TO_PLUGIN=EVENT_TYPE_TO_PLUGIN,exports.remoteConfigSchema=remoteConfigSchema,exports.remotePluginConfigSchema=remotePluginConfigSchema;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventType } from "./envelope.cjs";
|
|
2
|
+
import { PluginKey } from "./plugins/manifest.cjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/sdk/remote-config.d.ts
|
|
6
|
+
type RemotePluginConfig = Partial<Record<PluginKey, boolean>>;
|
|
7
|
+
/**
|
|
8
|
+
* Closed-shape schema for the SDK's per-plugin enabled state. Derived
|
|
9
|
+
* from `PLUGIN_MANIFEST` so adding a plugin to the manifest extends
|
|
10
|
+
* this schema automatically — no separate place to keep in sync.
|
|
11
|
+
*
|
|
12
|
+
* The closed shape (vs `Record<string, boolean>`) is what makes Speakeasy
|
|
13
|
+
* generate a typed `{ errors?: boolean, replay?: boolean, ... }` instead
|
|
14
|
+
* of a generic dictionary, and lets the SDK reject typo'd plugin names
|
|
15
|
+
* before they silently drop on the wire.
|
|
16
|
+
*/
|
|
17
|
+
declare const remotePluginConfigSchema: z.ZodObject<{
|
|
18
|
+
device: z.ZodBoolean;
|
|
19
|
+
errors: z.ZodBoolean;
|
|
20
|
+
logs: z.ZodBoolean;
|
|
21
|
+
pageEvents: z.ZodBoolean;
|
|
22
|
+
rageClick: z.ZodBoolean;
|
|
23
|
+
replay: z.ZodBoolean;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const remoteConfigSchema: z.ZodObject<{
|
|
26
|
+
plugins: z.ZodObject<{
|
|
27
|
+
device: z.ZodBoolean;
|
|
28
|
+
errors: z.ZodBoolean;
|
|
29
|
+
logs: z.ZodBoolean;
|
|
30
|
+
pageEvents: z.ZodBoolean;
|
|
31
|
+
rageClick: z.ZodBoolean;
|
|
32
|
+
replay: z.ZodBoolean;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
type RemoteConfig = z.infer<typeof remoteConfigSchema>;
|
|
36
|
+
declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
|
|
39
|
+
//# sourceMappingURL=remote-config.d.cts.map
|
|
@@ -35,4 +35,5 @@ declare const remoteConfigSchema: z.ZodObject<{
|
|
|
35
35
|
type RemoteConfig = z.infer<typeof remoteConfigSchema>;
|
|
36
36
|
declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
|
|
37
37
|
//#endregion
|
|
38
|
-
export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
|
|
38
|
+
export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
|
|
39
|
+
//# sourceMappingURL=remote-config.d.mts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{PLUGIN_MANIFEST
|
|
1
|
+
import{PLUGIN_MANIFEST}from"./plugins/manifest.mjs";import{z}from"zod";const remotePluginConfigSchema=z.object(Object.fromEntries(PLUGIN_MANIFEST.map(p=>[p.name,z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=z.object({plugins:remotePluginConfigSchema}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));export{EVENT_TYPE_TO_PLUGIN,remoteConfigSchema,remotePluginConfigSchema};
|
|
2
|
+
//# sourceMappingURL=remote-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}exports.DEFAULT_ENVIRONMENT=DEFAULT_ENVIRONMENT,exports.envSchema=envSchema,exports.inferRuntime=inferRuntime,exports.normalizeEnv=normalizeEnv,exports.resolveEnvironment=resolveEnvironment,exports.runtimeSchema=runtimeSchema;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/sdk/runtime.d.ts
|
|
4
|
+
declare const envSchema: z.ZodNullable<z.ZodString>;
|
|
5
|
+
type Env = z.infer<typeof envSchema>;
|
|
6
|
+
/**
|
|
7
|
+
* Fallback environment when nothing is configured. `development` (not
|
|
8
|
+
* `production`, which is what Sentry defaults to) because the collector has
|
|
9
|
+
* an always-on per-surface environment filter — an unconfigured run is far
|
|
10
|
+
* more likely a developer's laptop than a real deploy, so a filtered-by-default
|
|
11
|
+
* label keeps local noise out of product data. A real deploy sets one of the
|
|
12
|
+
* higher-precedence signals below.
|
|
13
|
+
*/
|
|
14
|
+
declare const DEFAULT_ENVIRONMENT = "development";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the deployment environment using a precedence chain modelled on
|
|
17
|
+
* Sentry's: an explicit value (init option) wins, then a dedicated
|
|
18
|
+
* `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
|
|
19
|
+
* `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
|
|
20
|
+
*
|
|
21
|
+
* `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
|
|
22
|
+
* and prod all ship `NODE_ENV=production`), not a deploy-environment
|
|
23
|
+
* identifier. The dedicated var is the real abstraction.
|
|
24
|
+
*/
|
|
25
|
+
declare function resolveEnvironment(opts?: {
|
|
26
|
+
readonly explicit?: string | null | undefined;
|
|
27
|
+
readonly env?: Record<string, string | undefined>;
|
|
28
|
+
}): string;
|
|
29
|
+
declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
|
|
30
|
+
browser: "browser";
|
|
31
|
+
edge: "edge";
|
|
32
|
+
node: "node";
|
|
33
|
+
}>>;
|
|
34
|
+
type Runtime = z.infer<typeof runtimeSchema>;
|
|
35
|
+
declare function inferRuntime(options?: {
|
|
36
|
+
readonly nextRuntime?: unknown;
|
|
37
|
+
}): Runtime;
|
|
38
|
+
declare function normalizeEnv(value: unknown): string | null;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
|
|
41
|
+
//# sourceMappingURL=runtime.d.cts.map
|
package/dist/sdk/runtime.d.mts
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/sdk/runtime.d.ts
|
|
4
|
-
declare const envSchema: z.ZodNullable<z.
|
|
5
|
-
development: "development";
|
|
6
|
-
preview: "preview";
|
|
7
|
-
production: "production";
|
|
8
|
-
}>>;
|
|
4
|
+
declare const envSchema: z.ZodNullable<z.ZodString>;
|
|
9
5
|
type Env = z.infer<typeof envSchema>;
|
|
6
|
+
/**
|
|
7
|
+
* Fallback environment when nothing is configured. `development` (not
|
|
8
|
+
* `production`, which is what Sentry defaults to) because the collector has
|
|
9
|
+
* an always-on per-surface environment filter — an unconfigured run is far
|
|
10
|
+
* more likely a developer's laptop than a real deploy, so a filtered-by-default
|
|
11
|
+
* label keeps local noise out of product data. A real deploy sets one of the
|
|
12
|
+
* higher-precedence signals below.
|
|
13
|
+
*/
|
|
14
|
+
declare const DEFAULT_ENVIRONMENT = "development";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the deployment environment using a precedence chain modelled on
|
|
17
|
+
* Sentry's: an explicit value (init option) wins, then a dedicated
|
|
18
|
+
* `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
|
|
19
|
+
* `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
|
|
20
|
+
*
|
|
21
|
+
* `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
|
|
22
|
+
* and prod all ship `NODE_ENV=production`), not a deploy-environment
|
|
23
|
+
* identifier. The dedicated var is the real abstraction.
|
|
24
|
+
*/
|
|
25
|
+
declare function resolveEnvironment(opts?: {
|
|
26
|
+
readonly explicit?: string | null | undefined;
|
|
27
|
+
readonly env?: Record<string, string | undefined>;
|
|
28
|
+
}): string;
|
|
10
29
|
declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
|
|
11
30
|
browser: "browser";
|
|
12
31
|
edge: "edge";
|
|
@@ -16,6 +35,7 @@ type Runtime = z.infer<typeof runtimeSchema>;
|
|
|
16
35
|
declare function inferRuntime(options?: {
|
|
17
36
|
readonly nextRuntime?: unknown;
|
|
18
37
|
}): Runtime;
|
|
19
|
-
declare function normalizeEnv(value: unknown):
|
|
38
|
+
declare function normalizeEnv(value: unknown): string | null;
|
|
20
39
|
//#endregion
|
|
21
|
-
export { Env, Runtime, envSchema, inferRuntime, normalizeEnv, runtimeSchema };
|
|
40
|
+
export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
|
|
41
|
+
//# sourceMappingURL=runtime.d.mts.map
|
package/dist/sdk/runtime.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import{z}from"zod";const envSchema=z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}export{DEFAULT_ENVIRONMENT,envSchema,inferRuntime,normalizeEnv,resolveEnvironment,runtimeSchema};
|
|
2
|
+
//# sourceMappingURL=runtime.mjs.map
|