@interfere/types 9.0.3-canary.0 → 9.0.3-canary.2
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.d.cts +1 -2
- package/dist/data/frame.d.mts +1 -2
- package/dist/data/frame.mjs +1 -2
- package/dist/data/session.d.cts +1 -2
- package/dist/data/session.d.mts +1 -2
- package/dist/data/session.mjs +1 -2
- package/dist/data/source-maps.d.cts +1 -2
- package/dist/data/source-maps.d.mts +1 -2
- package/dist/data/source-maps.mjs +1 -2
- package/dist/events/error.d.cts +1 -2
- package/dist/events/error.d.mts +1 -2
- package/dist/events/error.mjs +1 -2
- package/dist/events/pageleave.d.cts +1 -2
- package/dist/events/pageleave.d.mts +1 -2
- package/dist/events/pageleave.mjs +1 -2
- package/dist/events/pageview.d.cts +1 -2
- package/dist/events/pageview.d.mts +1 -2
- package/dist/events/pageview.mjs +1 -2
- package/dist/integrations/index.cjs +1 -1
- package/dist/integrations/index.d.cts +85 -3
- package/dist/integrations/index.d.mts +85 -3
- package/dist/integrations/index.mjs +1 -2
- package/dist/integrations/platforms/cli.d.cts +1 -2
- package/dist/integrations/platforms/cli.d.mts +1 -2
- package/dist/integrations/platforms/cli.mjs +1 -2
- package/dist/integrations/platforms/cloudflare.cjs +1 -0
- package/dist/integrations/platforms/cloudflare.d.cts +29 -0
- package/dist/integrations/platforms/cloudflare.d.mts +29 -0
- package/dist/integrations/platforms/cloudflare.mjs +1 -0
- package/dist/integrations/platforms/github.cjs +1 -1
- package/dist/integrations/platforms/github.d.cts +62 -2
- package/dist/integrations/platforms/github.d.mts +62 -2
- package/dist/integrations/platforms/github.mjs +1 -2
- package/dist/integrations/platforms/slack.d.cts +1 -2
- package/dist/integrations/platforms/slack.d.mts +1 -2
- package/dist/integrations/platforms/slack.mjs +1 -2
- package/dist/integrations/platforms/vercel.d.cts +1 -2
- package/dist/integrations/platforms/vercel.d.mts +1 -2
- package/dist/integrations/platforms/vercel.mjs +1 -2
- package/dist/releases/definition.d.cts +30 -2
- package/dist/releases/definition.d.mts +30 -2
- package/dist/releases/definition.mjs +1 -2
- package/dist/releases/slug.d.cts +1 -2
- package/dist/releases/slug.d.mts +1 -2
- package/dist/releases/slug.mjs +1 -2
- package/dist/sdk/cli-destination.cjs +1 -0
- package/dist/sdk/cli-destination.d.cts +7 -0
- package/dist/sdk/cli-destination.d.mts +7 -0
- package/dist/sdk/cli-destination.mjs +1 -0
- package/dist/sdk/deploy-environment.cjs +2 -0
- package/dist/sdk/deploy-environment.d.cts +5 -0
- package/dist/sdk/deploy-environment.d.mts +5 -0
- package/dist/sdk/deploy-environment.mjs +2 -0
- package/dist/sdk/env.d.cts +1 -2
- package/dist/sdk/env.d.mts +1 -2
- package/dist/sdk/env.mjs +1 -2
- package/dist/sdk/envelope.d.cts +13 -62
- package/dist/sdk/envelope.d.mts +13 -62
- package/dist/sdk/envelope.mjs +1 -2
- package/dist/sdk/errors.cjs +1 -1
- package/dist/sdk/errors.d.cts +9 -2
- package/dist/sdk/errors.d.mts +9 -2
- package/dist/sdk/errors.mjs +2 -3
- package/dist/sdk/geo.d.cts +1 -2
- package/dist/sdk/geo.d.mts +1 -2
- package/dist/sdk/geo.mjs +1 -2
- package/dist/sdk/identify.d.cts +1 -2
- package/dist/sdk/identify.d.mts +1 -2
- package/dist/sdk/identify.mjs +1 -2
- package/dist/sdk/plugins/context/browser.d.cts +1 -2
- package/dist/sdk/plugins/context/browser.d.mts +1 -2
- package/dist/sdk/plugins/context/browser.mjs +1 -2
- package/dist/sdk/plugins/context/edge.d.cts +1 -2
- package/dist/sdk/plugins/context/edge.d.mts +1 -2
- package/dist/sdk/plugins/context/edge.mjs +1 -2
- package/dist/sdk/plugins/context/next.d.cts +1 -2
- package/dist/sdk/plugins/context/next.d.mts +1 -2
- package/dist/sdk/plugins/context/next.mjs +1 -2
- package/dist/sdk/plugins/context/node.d.cts +1 -2
- package/dist/sdk/plugins/context/node.d.mts +1 -2
- package/dist/sdk/plugins/context/node.mjs +1 -2
- package/dist/sdk/plugins/manifest.d.cts +1 -2
- package/dist/sdk/plugins/manifest.d.mts +1 -2
- package/dist/sdk/plugins/manifest.mjs +1 -2
- package/dist/sdk/plugins/payload/errors.d.cts +1 -2
- package/dist/sdk/plugins/payload/errors.d.mts +1 -2
- package/dist/sdk/plugins/payload/errors.mjs +1 -2
- package/dist/sdk/plugins/payload/page-events.d.cts +1 -2
- package/dist/sdk/plugins/payload/page-events.d.mts +1 -2
- package/dist/sdk/plugins/payload/page-events.mjs +1 -2
- package/dist/sdk/plugins/payload/rage-click.d.cts +1 -2
- package/dist/sdk/plugins/payload/rage-click.d.mts +1 -2
- package/dist/sdk/plugins/payload/rage-click.mjs +1 -2
- package/dist/sdk/plugins/payload/replay.d.cts +1 -2
- package/dist/sdk/plugins/payload/replay.d.mts +1 -2
- package/dist/sdk/plugins/payload/replay.mjs +1 -2
- package/dist/sdk/remote-config.d.cts +1 -2
- package/dist/sdk/remote-config.d.mts +1 -2
- package/dist/sdk/remote-config.mjs +1 -2
- package/dist/sdk/runtime.cjs +1 -1
- package/dist/sdk/runtime.d.cts +26 -8
- package/dist/sdk/runtime.d.mts +26 -8
- package/dist/sdk/runtime.mjs +1 -2
- package/package.json +8 -30
package/dist/sdk/envelope.d.mts
CHANGED
|
@@ -180,11 +180,7 @@ declare const errorEnvelopeSchema: z.ZodObject<{
|
|
|
180
180
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
181
181
|
runtime: z.ZodLiteral<"node">;
|
|
182
182
|
}, z.core.$strip>], "runtime">>;
|
|
183
|
-
environment: z.ZodNullable<z.
|
|
184
|
-
development: "development";
|
|
185
|
-
preview: "preview";
|
|
186
|
-
production: "production";
|
|
187
|
-
}>>;
|
|
183
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
188
184
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
189
185
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
190
186
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -311,11 +307,7 @@ declare const pageviewEnvelopeSchema: z.ZodObject<{
|
|
|
311
307
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
312
308
|
runtime: z.ZodLiteral<"node">;
|
|
313
309
|
}, z.core.$strip>], "runtime">>;
|
|
314
|
-
environment: z.ZodNullable<z.
|
|
315
|
-
development: "development";
|
|
316
|
-
preview: "preview";
|
|
317
|
-
production: "production";
|
|
318
|
-
}>>;
|
|
310
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
319
311
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
320
312
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
321
313
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -422,11 +414,7 @@ declare const pageleaveEnvelopeSchema: z.ZodObject<{
|
|
|
422
414
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
423
415
|
runtime: z.ZodLiteral<"node">;
|
|
424
416
|
}, z.core.$strip>], "runtime">>;
|
|
425
|
-
environment: z.ZodNullable<z.
|
|
426
|
-
development: "development";
|
|
427
|
-
preview: "preview";
|
|
428
|
-
production: "production";
|
|
429
|
-
}>>;
|
|
417
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
430
418
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
431
419
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
432
420
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -533,11 +521,7 @@ declare const uiEventEnvelopeSchema: z.ZodObject<{
|
|
|
533
521
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
534
522
|
runtime: z.ZodLiteral<"node">;
|
|
535
523
|
}, z.core.$strip>], "runtime">>;
|
|
536
|
-
environment: z.ZodNullable<z.
|
|
537
|
-
development: "development";
|
|
538
|
-
preview: "preview";
|
|
539
|
-
production: "production";
|
|
540
|
-
}>>;
|
|
524
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
541
525
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
542
526
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
543
527
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -643,11 +627,7 @@ declare const replayChunkEnvelopeSchema: z.ZodObject<{
|
|
|
643
627
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
644
628
|
runtime: z.ZodLiteral<"node">;
|
|
645
629
|
}, z.core.$strip>], "runtime">>;
|
|
646
|
-
environment: z.ZodNullable<z.
|
|
647
|
-
development: "development";
|
|
648
|
-
preview: "preview";
|
|
649
|
-
production: "production";
|
|
650
|
-
}>>;
|
|
630
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
651
631
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
652
632
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
653
633
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -757,11 +737,7 @@ declare const rageClickEnvelopeSchema: z.ZodObject<{
|
|
|
757
737
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
758
738
|
runtime: z.ZodLiteral<"node">;
|
|
759
739
|
}, z.core.$strip>], "runtime">>;
|
|
760
|
-
environment: z.ZodNullable<z.
|
|
761
|
-
development: "development";
|
|
762
|
-
preview: "preview";
|
|
763
|
-
production: "production";
|
|
764
|
-
}>>;
|
|
740
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
765
741
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
766
742
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
767
743
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -873,11 +849,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
873
849
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
874
850
|
runtime: z.ZodLiteral<"node">;
|
|
875
851
|
}, z.core.$strip>], "runtime">>;
|
|
876
|
-
environment: z.ZodNullable<z.
|
|
877
|
-
development: "development";
|
|
878
|
-
preview: "preview";
|
|
879
|
-
production: "production";
|
|
880
|
-
}>>;
|
|
852
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
881
853
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
882
854
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
883
855
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1003,11 +975,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1003
975
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
1004
976
|
runtime: z.ZodLiteral<"node">;
|
|
1005
977
|
}, z.core.$strip>], "runtime">>;
|
|
1006
|
-
environment: z.ZodNullable<z.
|
|
1007
|
-
development: "development";
|
|
1008
|
-
preview: "preview";
|
|
1009
|
-
production: "production";
|
|
1010
|
-
}>>;
|
|
978
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
1011
979
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
1012
980
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
1013
981
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1113,11 +1081,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1113
1081
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
1114
1082
|
runtime: z.ZodLiteral<"node">;
|
|
1115
1083
|
}, z.core.$strip>], "runtime">>;
|
|
1116
|
-
environment: z.ZodNullable<z.
|
|
1117
|
-
development: "development";
|
|
1118
|
-
preview: "preview";
|
|
1119
|
-
production: "production";
|
|
1120
|
-
}>>;
|
|
1084
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
1121
1085
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
1122
1086
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
1123
1087
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1223,11 +1187,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1223
1187
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
1224
1188
|
runtime: z.ZodLiteral<"node">;
|
|
1225
1189
|
}, z.core.$strip>], "runtime">>;
|
|
1226
|
-
environment: z.ZodNullable<z.
|
|
1227
|
-
development: "development";
|
|
1228
|
-
preview: "preview";
|
|
1229
|
-
production: "production";
|
|
1230
|
-
}>>;
|
|
1190
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
1231
1191
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
1232
1192
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
1233
1193
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1332,11 +1292,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1332
1292
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
1333
1293
|
runtime: z.ZodLiteral<"node">;
|
|
1334
1294
|
}, z.core.$strip>], "runtime">>;
|
|
1335
|
-
environment: z.ZodNullable<z.
|
|
1336
|
-
development: "development";
|
|
1337
|
-
preview: "preview";
|
|
1338
|
-
production: "production";
|
|
1339
|
-
}>>;
|
|
1295
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
1340
1296
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
1341
1297
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
1342
1298
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1445,11 +1401,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1445
1401
|
requestPath: z.ZodOptional<z.ZodString>;
|
|
1446
1402
|
runtime: z.ZodLiteral<"node">;
|
|
1447
1403
|
}, z.core.$strip>], "runtime">>;
|
|
1448
|
-
environment: z.ZodNullable<z.
|
|
1449
|
-
development: "development";
|
|
1450
|
-
preview: "preview";
|
|
1451
|
-
production: "production";
|
|
1452
|
-
}>>;
|
|
1404
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
1453
1405
|
producerVersion: z.ZodOptional<z.ZodString>;
|
|
1454
1406
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
1455
1407
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1485,5 +1437,4 @@ type Envelope<T extends EventType | undefined = undefined> = T extends EventType
|
|
|
1485
1437
|
}> : EnvelopeBase;
|
|
1486
1438
|
type EnvelopePayload<T extends EventType> = Envelope<T>["payload"];
|
|
1487
1439
|
//#endregion
|
|
1488
|
-
export { Envelope, EnvelopeContext, EnvelopePayload, EventType, SessionSource, envelopeContextSchema, envelopeSchema, errorEnvelopeSchema, pageleaveEnvelopeSchema, pageviewEnvelopeSchema, rageClickEnvelopeSchema, replayChunkEnvelopeSchema, sessionSourceSchema, uiEventEnvelopeSchema };
|
|
1489
|
-
//# sourceMappingURL=envelope.d.mts.map
|
|
1440
|
+
export { Envelope, EnvelopeContext, EnvelopePayload, EventType, SessionSource, envelopeContextSchema, envelopeSchema, errorEnvelopeSchema, pageleaveEnvelopeSchema, pageviewEnvelopeSchema, rageClickEnvelopeSchema, replayChunkEnvelopeSchema, sessionSourceSchema, uiEventEnvelopeSchema };
|
package/dist/sdk/envelope.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{z}from"zod";import{sessionIdSchema}from"#data/session";import{browserContextSchema}from"#sdk/plugins/context/browser";import{edgeContextSchema}from"#sdk/plugins/context/edge";import{nextjsContextSchema}from"#sdk/plugins/context/next";import{nodeContextSchema}from"#sdk/plugins/context/node";import{errorEnvelopePayloadSchema}from"#sdk/plugins/payload/errors";import{pageleavePayloadSchema,pageviewPayloadSchema,uiEventPayloadSchema}from"#sdk/plugins/payload/page-events";import{rageClickPayloadSchema}from"#sdk/plugins/payload/rage-click";import{replayChunkPayloadSchema}from"#sdk/plugins/payload/replay";import{envSchema,runtimeSchema}from"#sdk/runtime";const sessionSourceSchema=z.enum([`header`,`async_context`,`fallback`,`client`]).optional().meta({id:`SessionSource`,title:`SessionSource`,description:`How the server resolved the sessionId for this envelope.`}),envelopeContextSchema=z.discriminatedUnion(`runtime`,[browserContextSchema,nextjsContextSchema,edgeContextSchema,nodeContextSchema]).meta({id:`EnvelopeContext`,title:`EnvelopeContext`,description:`Runtime-specific request context attached to every envelope.`}),envelopeHeadersShape={buildId:z.string(),clientTs:z.int(),context:envelopeContextSchema.optional(),environment:envSchema,producerVersion:z.string().optional(),releaseId:z.string().nullable(),runtime:runtimeSchema,sdkStack:z.array(z.string()).optional(),sessionId:sessionIdSchema.nullable(),sessionSource:sessionSourceSchema,uuid:z.uuidv7(),v:z.literal(0)},errorEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`error`),payload:errorEnvelopePayloadSchema}).meta({id:`ErrorEnvelope`,title:`ErrorEnvelope`}),pageviewEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`pageview`),payload:pageviewPayloadSchema}).meta({id:`PageviewEnvelope`,title:`PageviewEnvelope`}),pageleaveEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`pageleave`),payload:pageleavePayloadSchema}).meta({id:`PageleaveEnvelope`,title:`PageleaveEnvelope`}),uiEventEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`ui_event`),payload:uiEventPayloadSchema}).meta({id:`UiEventEnvelope`,title:`UiEventEnvelope`}),replayChunkEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`replay_chunk`),payload:replayChunkPayloadSchema}).meta({id:`ReplayChunkEnvelope`,title:`ReplayChunkEnvelope`}),rageClickEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`rage_click`),payload:rageClickPayloadSchema}).meta({id:`RageClickEnvelope`,title:`RageClickEnvelope`}),envelopeSchema=z.discriminatedUnion(`type`,[errorEnvelopeSchema,pageviewEnvelopeSchema,pageleaveEnvelopeSchema,uiEventEnvelopeSchema,replayChunkEnvelopeSchema,rageClickEnvelopeSchema]).meta({id:`Envelope`,title:`Envelope`,description:`A single event envelope accepted by the collector.`});export{envelopeContextSchema,envelopeSchema,errorEnvelopeSchema,pageleaveEnvelopeSchema,pageviewEnvelopeSchema,rageClickEnvelopeSchema,replayChunkEnvelopeSchema,sessionSourceSchema,uiEventEnvelopeSchema};
|
|
2
|
-
//# sourceMappingURL=envelope.mjs.map
|
|
1
|
+
import{z}from"zod";import{sessionIdSchema}from"#data/session";import{browserContextSchema}from"#sdk/plugins/context/browser";import{edgeContextSchema}from"#sdk/plugins/context/edge";import{nextjsContextSchema}from"#sdk/plugins/context/next";import{nodeContextSchema}from"#sdk/plugins/context/node";import{errorEnvelopePayloadSchema}from"#sdk/plugins/payload/errors";import{pageleavePayloadSchema,pageviewPayloadSchema,uiEventPayloadSchema}from"#sdk/plugins/payload/page-events";import{rageClickPayloadSchema}from"#sdk/plugins/payload/rage-click";import{replayChunkPayloadSchema}from"#sdk/plugins/payload/replay";import{envSchema,runtimeSchema}from"#sdk/runtime";const sessionSourceSchema=z.enum([`header`,`async_context`,`fallback`,`client`]).optional().meta({id:`SessionSource`,title:`SessionSource`,description:`How the server resolved the sessionId for this envelope.`}),envelopeContextSchema=z.discriminatedUnion(`runtime`,[browserContextSchema,nextjsContextSchema,edgeContextSchema,nodeContextSchema]).meta({id:`EnvelopeContext`,title:`EnvelopeContext`,description:`Runtime-specific request context attached to every envelope.`}),envelopeHeadersShape={buildId:z.string(),clientTs:z.int(),context:envelopeContextSchema.optional(),environment:envSchema,producerVersion:z.string().optional(),releaseId:z.string().nullable(),runtime:runtimeSchema,sdkStack:z.array(z.string()).optional(),sessionId:sessionIdSchema.nullable(),sessionSource:sessionSourceSchema,uuid:z.uuidv7(),v:z.literal(0)},errorEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`error`),payload:errorEnvelopePayloadSchema}).meta({id:`ErrorEnvelope`,title:`ErrorEnvelope`}),pageviewEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`pageview`),payload:pageviewPayloadSchema}).meta({id:`PageviewEnvelope`,title:`PageviewEnvelope`}),pageleaveEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`pageleave`),payload:pageleavePayloadSchema}).meta({id:`PageleaveEnvelope`,title:`PageleaveEnvelope`}),uiEventEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`ui_event`),payload:uiEventPayloadSchema}).meta({id:`UiEventEnvelope`,title:`UiEventEnvelope`}),replayChunkEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`replay_chunk`),payload:replayChunkPayloadSchema}).meta({id:`ReplayChunkEnvelope`,title:`ReplayChunkEnvelope`}),rageClickEnvelopeSchema=z.object({...envelopeHeadersShape,type:z.literal(`rage_click`),payload:rageClickPayloadSchema}).meta({id:`RageClickEnvelope`,title:`RageClickEnvelope`}),envelopeSchema=z.discriminatedUnion(`type`,[errorEnvelopeSchema,pageviewEnvelopeSchema,pageleaveEnvelopeSchema,uiEventEnvelopeSchema,replayChunkEnvelopeSchema,rageClickEnvelopeSchema]).meta({id:`Envelope`,title:`Envelope`,description:`A single event envelope accepted by the collector.`});export{envelopeContextSchema,envelopeSchema,errorEnvelopeSchema,pageleaveEnvelopeSchema,pageviewEnvelopeSchema,rageClickEnvelopeSchema,replayChunkEnvelopeSchema,sessionSourceSchema,uiEventEnvelopeSchema};
|
package/dist/sdk/errors.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`,fetchFailedResponse:`auto.browser.fetch.failed_response`,fetchNetworkError:`auto.browser.fetch.network_error`,xhrFailedResponse:`auto.browser.xhr.failed_response`,xhrNetworkError:`auto.browser.xhr.network_error`,securityPolicyViolation:`auto.browser.security_policy.violation`,resourceError:`auto.browser.resource.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`,proxy:`auto.function.nextjs.proxy`,serverAction:`auto.function.nextjs.server_action`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
|
|
2
2
|
`)){let line=rawLine.trim();if(!line)continue;let match=COMPONENT_STACK_RE.exec(line);if(!match)continue;let[,name,fileName,lineStr,colStr]=match;if(!name)continue;let frame={id:`react-${frames.length}`,fn:name};fileName&&(frame.file=fileName),lineStr&&(frame.line=Number(lineStr)),colStr&&(frame.column=Number(colStr)),frames.push(frame)}return frames}function toError(error){return error instanceof Error?error:typeof error==`string`?Error(error):typeof error==`object`&&error?tryUnwrapNestedError(error)||tagAsNonError(safeJson(error)??String(error)):tagAsNonError(String(error))}function tryUnwrapNestedError(record){if(record.cause instanceof Error)return record.cause;for(let value of Object.values(record))if(value instanceof Error)return value}function tagAsNonError(message){let e=Error(message);return e.name=`NonError`,e}function safeJson(value){try{return JSON.stringify(value)}catch{return null}}function classify(value){if(value===null)return`null`;let t=typeof value;if(t!==`object`)return t;let tag=Object.prototype.toString.call(value).slice(8,-1);return tag===`Object`?`PlainObject`:tag}function describe(value){if(value==null)return`Non-Error captured: ${String(value)}`;if(typeof value==`object`){let keys=Object.keys(value).sort();return keys.length===0?`Non-Error captured: empty object`:`Non-Error captured with keys: ${keys.join(`, `)}`}return`Non-Error captured: ${String(value)}`}function serializeBoundedDepth(value,maxDepth){let seen=new WeakSet,walk=(current,depth)=>{if(current===null)return null;let t=typeof current;if(t===`string`||t===`number`||t===`boolean`)return current;if(t===`undefined`)return;if(t===`function`||t===`symbol`||t===`bigint`)return String(current);if(depth>maxDepth)return`[depth-limit]`;if(seen.has(current))return`[circular]`;if(seen.add(current),Array.isArray(current))return current.map(item=>walk(item,depth+1));let out={};for(let[k,v]of Object.entries(current))out[k]=walk(v,depth+1);return out};return walk(value,0)}function toException(value){if(value instanceof Error)return value;if(typeof value==`string`)return Error(value);if(typeof value==`object`&&value){let nested=tryUnwrapNestedError(value);if(nested)return nested}return{kind:`non-error`,type:classify(value),value:describe(value),serialized:serializeBoundedDepth(value,4)}}function isNonErrorException(value){return typeof value==`object`&&!!value&&value.kind===`non-error`}function toExceptions(value,mechanism){if(isNonErrorException(value))return[{kind:`non-error`,type:value.type,value:value.value,mechanism,serialized:value.serialized}];let exceptions=[],current=value;for(let depth=0;current&&depth<5;depth+=1)exceptions.push({kind:`error`,type:current.name,value:current.message,mechanism:depth===0?mechanism:void 0,stack:current.stack??``}),current=current.cause instanceof Error?current.cause:void 0;return exceptions}exports.MECHANISM_TYPE=MECHANISM_TYPE,exports.isNonErrorException=isNonErrorException,exports.parseReactComponentStack=parseReactComponentStack,exports.shouldDropBrowserExtensionNoise=shouldDropBrowserExtensionNoise,exports.shouldDropUnresolvableStack=shouldDropUnresolvableStack,exports.toError=toError,exports.toException=toException,exports.toExceptions=toExceptions;
|
package/dist/sdk/errors.d.cts
CHANGED
|
@@ -21,6 +21,12 @@ declare const MECHANISM_TYPE: {
|
|
|
21
21
|
readonly onerror: "auto.browser.global_handlers.onerror";
|
|
22
22
|
readonly onunhandledrejection: "auto.browser.global_handlers.onunhandledrejection";
|
|
23
23
|
readonly consoleError: "auto.browser.console.error";
|
|
24
|
+
readonly fetchFailedResponse: "auto.browser.fetch.failed_response";
|
|
25
|
+
readonly fetchNetworkError: "auto.browser.fetch.network_error";
|
|
26
|
+
readonly xhrFailedResponse: "auto.browser.xhr.failed_response";
|
|
27
|
+
readonly xhrNetworkError: "auto.browser.xhr.network_error";
|
|
28
|
+
readonly securityPolicyViolation: "auto.browser.security_policy.violation";
|
|
29
|
+
readonly resourceError: "auto.browser.resource.error";
|
|
24
30
|
};
|
|
25
31
|
readonly react: {
|
|
26
32
|
readonly errorBoundary: "auto.function.react.error_boundary";
|
|
@@ -32,6 +38,8 @@ declare const MECHANISM_TYPE: {
|
|
|
32
38
|
readonly nextjs: {
|
|
33
39
|
readonly onRequestError: "auto.function.nextjs.on_request_error";
|
|
34
40
|
readonly captureError: "auto.function.nextjs.capture_error";
|
|
41
|
+
readonly proxy: "auto.function.nextjs.proxy";
|
|
42
|
+
readonly serverAction: "auto.function.nextjs.server_action";
|
|
35
43
|
};
|
|
36
44
|
readonly node: {
|
|
37
45
|
readonly captureError: "auto.function.node.capture_error";
|
|
@@ -150,5 +158,4 @@ declare function isNonErrorException(value: unknown): value is NonErrorException
|
|
|
150
158
|
*/
|
|
151
159
|
declare function toExceptions(value: Error | NonErrorException, mechanism: ErrorMechanism): ExceptionValue[];
|
|
152
160
|
//#endregion
|
|
153
|
-
export { MECHANISM_TYPE, NonErrorException, isNonErrorException, parseReactComponentStack, shouldDropBrowserExtensionNoise, shouldDropUnresolvableStack, toError, toException, toExceptions };
|
|
154
|
-
//# sourceMappingURL=errors.d.cts.map
|
|
161
|
+
export { MECHANISM_TYPE, NonErrorException, isNonErrorException, parseReactComponentStack, shouldDropBrowserExtensionNoise, shouldDropUnresolvableStack, toError, toException, toExceptions };
|
package/dist/sdk/errors.d.mts
CHANGED
|
@@ -21,6 +21,12 @@ declare const MECHANISM_TYPE: {
|
|
|
21
21
|
readonly onerror: "auto.browser.global_handlers.onerror";
|
|
22
22
|
readonly onunhandledrejection: "auto.browser.global_handlers.onunhandledrejection";
|
|
23
23
|
readonly consoleError: "auto.browser.console.error";
|
|
24
|
+
readonly fetchFailedResponse: "auto.browser.fetch.failed_response";
|
|
25
|
+
readonly fetchNetworkError: "auto.browser.fetch.network_error";
|
|
26
|
+
readonly xhrFailedResponse: "auto.browser.xhr.failed_response";
|
|
27
|
+
readonly xhrNetworkError: "auto.browser.xhr.network_error";
|
|
28
|
+
readonly securityPolicyViolation: "auto.browser.security_policy.violation";
|
|
29
|
+
readonly resourceError: "auto.browser.resource.error";
|
|
24
30
|
};
|
|
25
31
|
readonly react: {
|
|
26
32
|
readonly errorBoundary: "auto.function.react.error_boundary";
|
|
@@ -32,6 +38,8 @@ declare const MECHANISM_TYPE: {
|
|
|
32
38
|
readonly nextjs: {
|
|
33
39
|
readonly onRequestError: "auto.function.nextjs.on_request_error";
|
|
34
40
|
readonly captureError: "auto.function.nextjs.capture_error";
|
|
41
|
+
readonly proxy: "auto.function.nextjs.proxy";
|
|
42
|
+
readonly serverAction: "auto.function.nextjs.server_action";
|
|
35
43
|
};
|
|
36
44
|
readonly node: {
|
|
37
45
|
readonly captureError: "auto.function.node.capture_error";
|
|
@@ -150,5 +158,4 @@ declare function isNonErrorException(value: unknown): value is NonErrorException
|
|
|
150
158
|
*/
|
|
151
159
|
declare function toExceptions(value: Error | NonErrorException, mechanism: ErrorMechanism): ExceptionValue[];
|
|
152
160
|
//#endregion
|
|
153
|
-
export { MECHANISM_TYPE, NonErrorException, isNonErrorException, parseReactComponentStack, shouldDropBrowserExtensionNoise, shouldDropUnresolvableStack, toError, toException, toExceptions };
|
|
154
|
-
//# sourceMappingURL=errors.d.mts.map
|
|
161
|
+
export { MECHANISM_TYPE, NonErrorException, isNonErrorException, parseReactComponentStack, shouldDropBrowserExtensionNoise, shouldDropUnresolvableStack, toError, toException, toExceptions };
|
package/dist/sdk/errors.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
|
|
2
|
-
`)){let line=rawLine.trim();if(!line)continue;let match=COMPONENT_STACK_RE.exec(line);if(!match)continue;let[,name,fileName,lineStr,colStr]=match;if(!name)continue;let frame={id:`react-${frames.length}`,fn:name};fileName&&(frame.file=fileName),lineStr&&(frame.line=Number(lineStr)),colStr&&(frame.column=Number(colStr)),frames.push(frame)}return frames}function toError(error){return error instanceof Error?error:typeof error==`string`?Error(error):typeof error==`object`&&error?tryUnwrapNestedError(error)||tagAsNonError(safeJson(error)??String(error)):tagAsNonError(String(error))}function tryUnwrapNestedError(record){if(record.cause instanceof Error)return record.cause;for(let value of Object.values(record))if(value instanceof Error)return value}function tagAsNonError(message){let e=Error(message);return e.name=`NonError`,e}function safeJson(value){try{return JSON.stringify(value)}catch{return null}}function classify(value){if(value===null)return`null`;let t=typeof value;if(t!==`object`)return t;let tag=Object.prototype.toString.call(value).slice(8,-1);return tag===`Object`?`PlainObject`:tag}function describe(value){if(value==null)return`Non-Error captured: ${String(value)}`;if(typeof value==`object`){let keys=Object.keys(value).sort();return keys.length===0?`Non-Error captured: empty object`:`Non-Error captured with keys: ${keys.join(`, `)}`}return`Non-Error captured: ${String(value)}`}function serializeBoundedDepth(value,maxDepth){let seen=new WeakSet,walk=(current,depth)=>{if(current===null)return null;let t=typeof current;if(t===`string`||t===`number`||t===`boolean`)return current;if(t===`undefined`)return;if(t===`function`||t===`symbol`||t===`bigint`)return String(current);if(depth>maxDepth)return`[depth-limit]`;if(seen.has(current))return`[circular]`;if(seen.add(current),Array.isArray(current))return current.map(item=>walk(item,depth+1));let out={};for(let[k,v]of Object.entries(current))out[k]=walk(v,depth+1);return out};return walk(value,0)}function toException(value){if(value instanceof Error)return value;if(typeof value==`string`)return Error(value);if(typeof value==`object`&&value){let nested=tryUnwrapNestedError(value);if(nested)return nested}return{kind:`non-error`,type:classify(value),value:describe(value),serialized:serializeBoundedDepth(value,4)}}function isNonErrorException(value){return typeof value==`object`&&!!value&&value.kind===`non-error`}function toExceptions(value,mechanism){if(isNonErrorException(value))return[{kind:`non-error`,type:value.type,value:value.value,mechanism,serialized:value.serialized}];let exceptions=[],current=value;for(let depth=0;current&&depth<5;depth+=1)exceptions.push({kind:`error`,type:current.name,value:current.message,mechanism:depth===0?mechanism:void 0,stack:current.stack??``}),current=current.cause instanceof Error?current.cause:void 0;return exceptions}export{MECHANISM_TYPE,isNonErrorException,parseReactComponentStack,shouldDropBrowserExtensionNoise,shouldDropUnresolvableStack,toError,toException,toExceptions};
|
|
3
|
-
//# sourceMappingURL=errors.mjs.map
|
|
1
|
+
const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`,fetchFailedResponse:`auto.browser.fetch.failed_response`,fetchNetworkError:`auto.browser.fetch.network_error`,xhrFailedResponse:`auto.browser.xhr.failed_response`,xhrNetworkError:`auto.browser.xhr.network_error`,securityPolicyViolation:`auto.browser.security_policy.violation`,resourceError:`auto.browser.resource.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`,proxy:`auto.function.nextjs.proxy`,serverAction:`auto.function.nextjs.server_action`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
|
|
2
|
+
`)){let line=rawLine.trim();if(!line)continue;let match=COMPONENT_STACK_RE.exec(line);if(!match)continue;let[,name,fileName,lineStr,colStr]=match;if(!name)continue;let frame={id:`react-${frames.length}`,fn:name};fileName&&(frame.file=fileName),lineStr&&(frame.line=Number(lineStr)),colStr&&(frame.column=Number(colStr)),frames.push(frame)}return frames}function toError(error){return error instanceof Error?error:typeof error==`string`?Error(error):typeof error==`object`&&error?tryUnwrapNestedError(error)||tagAsNonError(safeJson(error)??String(error)):tagAsNonError(String(error))}function tryUnwrapNestedError(record){if(record.cause instanceof Error)return record.cause;for(let value of Object.values(record))if(value instanceof Error)return value}function tagAsNonError(message){let e=Error(message);return e.name=`NonError`,e}function safeJson(value){try{return JSON.stringify(value)}catch{return null}}function classify(value){if(value===null)return`null`;let t=typeof value;if(t!==`object`)return t;let tag=Object.prototype.toString.call(value).slice(8,-1);return tag===`Object`?`PlainObject`:tag}function describe(value){if(value==null)return`Non-Error captured: ${String(value)}`;if(typeof value==`object`){let keys=Object.keys(value).sort();return keys.length===0?`Non-Error captured: empty object`:`Non-Error captured with keys: ${keys.join(`, `)}`}return`Non-Error captured: ${String(value)}`}function serializeBoundedDepth(value,maxDepth){let seen=new WeakSet,walk=(current,depth)=>{if(current===null)return null;let t=typeof current;if(t===`string`||t===`number`||t===`boolean`)return current;if(t===`undefined`)return;if(t===`function`||t===`symbol`||t===`bigint`)return String(current);if(depth>maxDepth)return`[depth-limit]`;if(seen.has(current))return`[circular]`;if(seen.add(current),Array.isArray(current))return current.map(item=>walk(item,depth+1));let out={};for(let[k,v]of Object.entries(current))out[k]=walk(v,depth+1);return out};return walk(value,0)}function toException(value){if(value instanceof Error)return value;if(typeof value==`string`)return Error(value);if(typeof value==`object`&&value){let nested=tryUnwrapNestedError(value);if(nested)return nested}return{kind:`non-error`,type:classify(value),value:describe(value),serialized:serializeBoundedDepth(value,4)}}function isNonErrorException(value){return typeof value==`object`&&!!value&&value.kind===`non-error`}function toExceptions(value,mechanism){if(isNonErrorException(value))return[{kind:`non-error`,type:value.type,value:value.value,mechanism,serialized:value.serialized}];let exceptions=[],current=value;for(let depth=0;current&&depth<5;depth+=1)exceptions.push({kind:`error`,type:current.name,value:current.message,mechanism:depth===0?mechanism:void 0,stack:current.stack??``}),current=current.cause instanceof Error?current.cause:void 0;return exceptions}export{MECHANISM_TYPE,isNonErrorException,parseReactComponentStack,shouldDropBrowserExtensionNoise,shouldDropUnresolvableStack,toError,toException,toExceptions};
|
package/dist/sdk/geo.d.cts
CHANGED
|
@@ -7,5 +7,4 @@ declare const cloudflareTraceSchema: z.ZodObject<{
|
|
|
7
7
|
type CloudflareTrace = z.infer<typeof cloudflareTraceSchema>;
|
|
8
8
|
declare function extractCountryHeader(request: Request): string | null;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { CloudflareTrace, cloudflareTraceSchema, extractCountryHeader };
|
|
11
|
-
//# sourceMappingURL=geo.d.cts.map
|
|
10
|
+
export { CloudflareTrace, cloudflareTraceSchema, extractCountryHeader };
|
package/dist/sdk/geo.d.mts
CHANGED
|
@@ -7,5 +7,4 @@ declare const cloudflareTraceSchema: z.ZodObject<{
|
|
|
7
7
|
type CloudflareTrace = z.infer<typeof cloudflareTraceSchema>;
|
|
8
8
|
declare function extractCountryHeader(request: Request): string | null;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { CloudflareTrace, cloudflareTraceSchema, extractCountryHeader };
|
|
11
|
-
//# sourceMappingURL=geo.d.mts.map
|
|
10
|
+
export { CloudflareTrace, cloudflareTraceSchema, extractCountryHeader };
|
package/dist/sdk/geo.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{z}from"zod";const cloudflareTraceSchema=z.object({loc:z.string().length(2)}).loose(),GEO_COUNTRY_HEADERS=[`cf-ipcountry`,`x-vercel-ip-country`,`x-country-code`];function extractCountryHeader(request){for(let header of GEO_COUNTRY_HEADERS){let value=request.headers.get(header);if(value&&value.length===2)return value.toUpperCase()}return null}export{cloudflareTraceSchema,extractCountryHeader};
|
|
2
|
-
//# sourceMappingURL=geo.mjs.map
|
|
1
|
+
import{z}from"zod";const cloudflareTraceSchema=z.object({loc:z.string().length(2)}).loose(),GEO_COUNTRY_HEADERS=[`cf-ipcountry`,`x-vercel-ip-country`,`x-country-code`];function extractCountryHeader(request){for(let header of GEO_COUNTRY_HEADERS){let value=request.headers.get(header);if(value&&value.length===2)return value.toUpperCase()}return null}export{cloudflareTraceSchema,extractCountryHeader};
|
package/dist/sdk/identify.d.cts
CHANGED
|
@@ -31,5 +31,4 @@ declare const identifyParamsSchema: z.ZodObject<{
|
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
type IdentifyParams = z.infer<typeof identifyParamsSchema>;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { IdentifyParams, IdentifySource, identifyParamsSchema, identifySourceSchema };
|
|
35
|
-
//# sourceMappingURL=identify.d.cts.map
|
|
34
|
+
export { IdentifyParams, IdentifySource, identifyParamsSchema, identifySourceSchema };
|
package/dist/sdk/identify.d.mts
CHANGED
|
@@ -31,5 +31,4 @@ declare const identifyParamsSchema: z.ZodObject<{
|
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
type IdentifyParams = z.infer<typeof identifyParamsSchema>;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { IdentifyParams, IdentifySource, identifyParamsSchema, identifySourceSchema };
|
|
35
|
-
//# sourceMappingURL=identify.d.mts.map
|
|
34
|
+
export { IdentifyParams, IdentifySource, identifyParamsSchema, identifySourceSchema };
|
package/dist/sdk/identify.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{z}from"zod";const identifySourceSchema=z.discriminatedUnion(`type`,[z.object({type:z.literal(`clerk`),name:z.literal(`Clerk`)}).meta({id:`ClerkIdentifySource`,title:`ClerkIdentifySource`}),z.object({type:z.literal(`auth0`),name:z.literal(`Auth0`)}).meta({id:`Auth0IdentifySource`,title:`Auth0IdentifySource`}),z.object({type:z.literal(`custom`),name:z.string()}).meta({id:`CustomIdentifySource`,title:`CustomIdentifySource`})]).meta({id:`IdentifySource`,title:`IdentifySource`,description:`Auth provider that surfaced this identification.`}),traitsSchema=z.record(z.string(),z.unknown()).meta({id:`IdentifyTraits`,title:`IdentifyTraits`,description:`Free-form key/value bag of user attributes attached when identifying a session.`}),identifyParamsSchema=z.object({avatar:z.string().optional(),email:z.email().optional(),identifier:z.string(),name:z.string().optional(),source:identifySourceSchema,traits:traitsSchema.optional()}).meta({id:`IdentifyParams`,title:`IdentifyParams`,description:`User attributes attached when identifying a session.`});export{identifyParamsSchema,identifySourceSchema};
|
|
2
|
-
//# sourceMappingURL=identify.mjs.map
|
|
1
|
+
import{z}from"zod";const identifySourceSchema=z.discriminatedUnion(`type`,[z.object({type:z.literal(`clerk`),name:z.literal(`Clerk`)}).meta({id:`ClerkIdentifySource`,title:`ClerkIdentifySource`}),z.object({type:z.literal(`auth0`),name:z.literal(`Auth0`)}).meta({id:`Auth0IdentifySource`,title:`Auth0IdentifySource`}),z.object({type:z.literal(`custom`),name:z.string()}).meta({id:`CustomIdentifySource`,title:`CustomIdentifySource`})]).meta({id:`IdentifySource`,title:`IdentifySource`,description:`Auth provider that surfaced this identification.`}),traitsSchema=z.record(z.string(),z.unknown()).meta({id:`IdentifyTraits`,title:`IdentifyTraits`,description:`Free-form key/value bag of user attributes attached when identifying a session.`}),identifyParamsSchema=z.object({avatar:z.string().optional(),email:z.email().optional(),identifier:z.string(),name:z.string().optional(),source:identifySourceSchema,traits:traitsSchema.optional()}).meta({id:`IdentifyParams`,title:`IdentifyParams`,description:`User attributes attached when identifying a session.`});export{identifyParamsSchema,identifySourceSchema};
|
|
@@ -88,5 +88,4 @@ declare const browserContextSchema: z.ZodObject<{
|
|
|
88
88
|
}, z.core.$strip>;
|
|
89
89
|
type BrowserContext = z.infer<typeof browserContextSchema>;
|
|
90
90
|
//#endregion
|
|
91
|
-
export { BrowserContext, BrowserMetadata, DeviceMetadata, browserContextSchema, deviceMetadataSchema };
|
|
92
|
-
//# sourceMappingURL=browser.d.cts.map
|
|
91
|
+
export { BrowserContext, BrowserMetadata, DeviceMetadata, browserContextSchema, deviceMetadataSchema };
|
|
@@ -88,5 +88,4 @@ declare const browserContextSchema: z.ZodObject<{
|
|
|
88
88
|
}, z.core.$strip>;
|
|
89
89
|
type BrowserContext = z.infer<typeof browserContextSchema>;
|
|
90
90
|
//#endregion
|
|
91
|
-
export { BrowserContext, BrowserMetadata, DeviceMetadata, browserContextSchema, deviceMetadataSchema };
|
|
92
|
-
//# sourceMappingURL=browser.d.mts.map
|
|
91
|
+
export { BrowserContext, BrowserMetadata, DeviceMetadata, browserContextSchema, deviceMetadataSchema };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{z}from"zod";const deviceBrowserSchema=z.object({major:z.string().optional(),name:z.string().optional(),type:z.string().optional(),version:z.string().optional(),fullVersion:z.string().optional()}).meta({id:`DeviceBrowser`,title:`DeviceBrowser`}),deviceCpuSchema=z.object({architecture:z.string().optional(),bitness:z.string().optional()}).meta({id:`DeviceCpu`,title:`DeviceCpu`}),deviceInfoSchema=z.object({model:z.string().optional(),type:z.string().optional(),vendor:z.string().optional()}).meta({id:`DeviceInfo`,title:`DeviceInfo`}),deviceEngineSchema=z.object({name:z.string().optional(),version:z.string().optional()}).meta({id:`DeviceEngine`,title:`DeviceEngine`}),deviceOsSchema=z.object({name:z.string().optional(),version:z.string().optional(),versionFull:z.string().optional()}).meta({id:`DeviceOs`,title:`DeviceOs`}),deviceMetadataSchema=z.object({browser:deviceBrowserSchema,cpu:deviceCpuSchema,device:deviceInfoSchema,engine:deviceEngineSchema,os:deviceOsSchema,ua:z.string(),frozenUa:z.boolean().optional()}).meta({id:`DeviceMetadata`,title:`DeviceMetadata`,description:`Device/browser metadata extracted from the user agent.`}),displayScreenSchema=z.object({height:z.number(),width:z.number(),orientation:z.string().optional()}).meta({id:`Screen`,title:`Screen`}),displaySchema=z.object({screen:displayScreenSchema}).meta({id:`Display`,title:`Display`}),browserMetadataSchema=z.object({language:z.string().optional(),timezone:z.string().optional(),display:displaySchema}).meta({id:`BrowserMetadata`,title:`BrowserMetadata`,description:`Browser locale and display metadata.`}),browserContextSchema=z.object({runtime:z.literal(`browser`),browser:browserMetadataSchema.nullable(),device:deviceMetadataSchema.nullable()}).meta({id:`BrowserContext`,title:`BrowserContext`,description:`Request context for the browser runtime.`});export{browserContextSchema,deviceMetadataSchema};
|
|
2
|
-
//# sourceMappingURL=browser.mjs.map
|
|
1
|
+
import{z}from"zod";const deviceBrowserSchema=z.object({major:z.string().optional(),name:z.string().optional(),type:z.string().optional(),version:z.string().optional(),fullVersion:z.string().optional()}).meta({id:`DeviceBrowser`,title:`DeviceBrowser`}),deviceCpuSchema=z.object({architecture:z.string().optional(),bitness:z.string().optional()}).meta({id:`DeviceCpu`,title:`DeviceCpu`}),deviceInfoSchema=z.object({model:z.string().optional(),type:z.string().optional(),vendor:z.string().optional()}).meta({id:`DeviceInfo`,title:`DeviceInfo`}),deviceEngineSchema=z.object({name:z.string().optional(),version:z.string().optional()}).meta({id:`DeviceEngine`,title:`DeviceEngine`}),deviceOsSchema=z.object({name:z.string().optional(),version:z.string().optional(),versionFull:z.string().optional()}).meta({id:`DeviceOs`,title:`DeviceOs`}),deviceMetadataSchema=z.object({browser:deviceBrowserSchema,cpu:deviceCpuSchema,device:deviceInfoSchema,engine:deviceEngineSchema,os:deviceOsSchema,ua:z.string(),frozenUa:z.boolean().optional()}).meta({id:`DeviceMetadata`,title:`DeviceMetadata`,description:`Device/browser metadata extracted from the user agent.`}),displayScreenSchema=z.object({height:z.number(),width:z.number(),orientation:z.string().optional()}).meta({id:`Screen`,title:`Screen`}),displaySchema=z.object({screen:displayScreenSchema}).meta({id:`Display`,title:`Display`}),browserMetadataSchema=z.object({language:z.string().optional(),timezone:z.string().optional(),display:displaySchema}).meta({id:`BrowserMetadata`,title:`BrowserMetadata`,description:`Browser locale and display metadata.`}),browserContextSchema=z.object({runtime:z.literal(`browser`),browser:browserMetadataSchema.nullable(),device:deviceMetadataSchema.nullable()}).meta({id:`BrowserContext`,title:`BrowserContext`,description:`Request context for the browser runtime.`});export{browserContextSchema,deviceMetadataSchema};
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -58,5 +58,4 @@ 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 };
|
|
62
|
-
//# sourceMappingURL=next.d.cts.map
|
|
61
|
+
export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
|
|
@@ -58,5 +58,4 @@ 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 };
|
|
62
|
-
//# sourceMappingURL=next.d.mts.map
|
|
61
|
+
export { NextjsContext, nextjsContextSchema, renderSourceSchema, renderTypeSchema, revalidateReasonSchema, routeTypeSchema, routerKindSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -9,5 +9,4 @@ 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 };
|
|
13
|
-
//# sourceMappingURL=node.d.cts.map
|
|
12
|
+
export { NodeContext, nodeContextSchema };
|
|
@@ -9,5 +9,4 @@ 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 };
|
|
13
|
-
//# sourceMappingURL=node.d.mts.map
|
|
12
|
+
export { NodeContext, nodeContextSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -56,5 +56,4 @@ 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 };
|
|
60
|
-
//# sourceMappingURL=manifest.d.cts.map
|
|
59
|
+
export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
|
|
@@ -56,5 +56,4 @@ 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 };
|
|
60
|
-
//# sourceMappingURL=manifest.d.mts.map
|
|
59
|
+
export { CONSENT_CATEGORIES, ConsentCategory, ConsentState, GateableCategory, PLUGIN_MANIFEST, PluginKey, PluginManifest };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -61,5 +61,4 @@ 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 };
|
|
65
|
-
//# sourceMappingURL=errors.d.cts.map
|
|
64
|
+
export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
|
|
@@ -61,5 +61,4 @@ 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 };
|
|
65
|
-
//# sourceMappingURL=errors.d.mts.map
|
|
64
|
+
export { ErrorEnvelopePayload, ErrorMechanism, ErrorSource, ExceptionValue, errorEnvelopePayloadSchema, errorMechanismSchema, errorSourceSchema, exceptionValueSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -16,5 +16,4 @@ 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 };
|
|
20
|
-
//# sourceMappingURL=page-events.d.cts.map
|
|
19
|
+
export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
|
|
@@ -16,5 +16,4 @@ 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 };
|
|
20
|
-
//# sourceMappingURL=page-events.d.mts.map
|
|
19
|
+
export { PageleavePayload, PageviewPayload, UiEventPayload, pageleavePayloadSchema, pageviewPayloadSchema, uiEventPayloadSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -12,5 +12,4 @@ 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 };
|
|
16
|
-
//# sourceMappingURL=rage-click.d.cts.map
|
|
15
|
+
export { RageClickPayload, rageClickPayloadSchema };
|
|
@@ -12,5 +12,4 @@ 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 };
|
|
16
|
-
//# sourceMappingURL=rage-click.d.mts.map
|
|
15
|
+
export { RageClickPayload, rageClickPayloadSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -10,5 +10,4 @@ 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 };
|
|
14
|
-
//# sourceMappingURL=replay.d.cts.map
|
|
13
|
+
export { ReplayChunkPayload, replayChunkPayloadSchema };
|
|
@@ -10,5 +10,4 @@ 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 };
|
|
14
|
-
//# sourceMappingURL=replay.d.mts.map
|
|
13
|
+
export { ReplayChunkPayload, replayChunkPayloadSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -35,5 +35,4 @@ 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 };
|
|
39
|
-
//# sourceMappingURL=remote-config.d.cts.map
|
|
38
|
+
export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
|
|
@@ -35,5 +35,4 @@ 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 };
|
|
39
|
-
//# sourceMappingURL=remote-config.d.mts.map
|
|
38
|
+
export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
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};
|
package/dist/sdk/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.
|
|
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;
|