@interfere/types 9.0.0 → 9.0.3-canary.0

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.
Files changed (168) hide show
  1. package/README.md +3 -3
  2. package/dist/data/frame.cjs +1 -0
  3. package/dist/data/frame.d.cts +27 -0
  4. package/dist/data/frame.d.mts +18 -5
  5. package/dist/data/frame.mjs +2 -16
  6. package/dist/data/session.cjs +1 -0
  7. package/dist/data/session.d.cts +8 -0
  8. package/dist/data/session.d.mts +3 -2
  9. package/dist/data/session.mjs +2 -9
  10. package/dist/data/source-maps.cjs +1 -0
  11. package/dist/data/source-maps.d.cts +151 -0
  12. package/dist/data/source-maps.d.mts +138 -27
  13. package/dist/data/source-maps.mjs +2 -21
  14. package/dist/events/error.cjs +1 -0
  15. package/dist/events/error.d.cts +196 -0
  16. package/dist/events/error.d.mts +140 -35
  17. package/dist/events/error.mjs +2 -64
  18. package/dist/events/pageleave.cjs +1 -0
  19. package/dist/events/pageleave.d.cts +13 -0
  20. package/dist/events/pageleave.d.mts +3 -2
  21. package/dist/events/pageleave.mjs +2 -10
  22. package/dist/events/pageview.cjs +1 -0
  23. package/dist/events/pageview.d.cts +14 -0
  24. package/dist/events/pageview.d.mts +3 -2
  25. package/dist/events/pageview.mjs +2 -11
  26. package/dist/integrations/index.cjs +1 -0
  27. package/dist/integrations/index.d.cts +48 -0
  28. package/dist/integrations/index.d.mts +2 -1
  29. package/dist/integrations/index.mjs +2 -57
  30. package/dist/integrations/platforms/cli.cjs +1 -0
  31. package/dist/integrations/platforms/cli.d.cts +12 -0
  32. package/dist/integrations/platforms/cli.d.mts +12 -0
  33. package/dist/integrations/platforms/cli.mjs +2 -0
  34. package/dist/integrations/platforms/github.cjs +1 -0
  35. package/dist/integrations/platforms/github.d.cts +16 -0
  36. package/dist/integrations/platforms/github.d.mts +2 -1
  37. package/dist/integrations/platforms/github.mjs +2 -13
  38. package/dist/integrations/platforms/slack.cjs +1 -0
  39. package/dist/integrations/platforms/slack.d.cts +33 -0
  40. package/dist/integrations/platforms/slack.d.mts +33 -0
  41. package/dist/integrations/platforms/slack.mjs +2 -0
  42. package/dist/integrations/platforms/vercel.cjs +1 -0
  43. package/dist/integrations/platforms/vercel.d.cts +47 -0
  44. package/dist/integrations/platforms/vercel.d.mts +2 -1
  45. package/dist/integrations/platforms/vercel.mjs +2 -26
  46. package/dist/releases/definition.cjs +1 -0
  47. package/dist/releases/definition.d.cts +57 -0
  48. package/dist/releases/definition.d.mts +4 -2
  49. package/dist/releases/definition.mjs +2 -63
  50. package/dist/releases/slug.cjs +1 -0
  51. package/dist/releases/slug.d.cts +24 -0
  52. package/dist/releases/slug.d.mts +24 -0
  53. package/dist/releases/slug.mjs +2 -0
  54. package/dist/sdk/env.cjs +1 -0
  55. package/dist/sdk/env.d.cts +6 -0
  56. package/dist/sdk/env.d.mts +2 -1
  57. package/dist/sdk/env.mjs +2 -17
  58. package/dist/sdk/envelope.cjs +1 -0
  59. package/dist/sdk/envelope.d.cts +1489 -0
  60. package/dist/sdk/envelope.d.mts +163 -35
  61. package/dist/sdk/envelope.mjs +2 -114
  62. package/dist/sdk/errors.cjs +2 -0
  63. package/dist/sdk/errors.d.cts +154 -0
  64. package/dist/sdk/errors.d.mts +88 -30
  65. package/dist/sdk/errors.mjs +3 -253
  66. package/dist/sdk/geo.cjs +1 -0
  67. package/dist/sdk/geo.d.cts +11 -0
  68. package/dist/sdk/geo.d.mts +2 -1
  69. package/dist/sdk/geo.mjs +2 -17
  70. package/dist/sdk/identify.cjs +1 -0
  71. package/dist/sdk/identify.d.cts +35 -0
  72. package/dist/sdk/identify.d.mts +3 -2
  73. package/dist/sdk/identify.mjs +2 -43
  74. package/dist/sdk/plugins/context/browser.cjs +1 -0
  75. package/dist/sdk/plugins/context/browser.d.cts +92 -0
  76. package/dist/sdk/plugins/context/browser.d.mts +10 -1
  77. package/dist/sdk/plugins/context/browser.mjs +2 -81
  78. package/dist/sdk/plugins/context/edge.cjs +1 -0
  79. package/dist/sdk/plugins/context/edge.d.cts +10 -0
  80. package/dist/sdk/plugins/context/edge.d.mts +2 -1
  81. package/dist/sdk/plugins/context/edge.mjs +2 -9
  82. package/dist/sdk/plugins/context/next.cjs +1 -0
  83. package/dist/sdk/plugins/context/next.d.cts +62 -0
  84. package/dist/sdk/plugins/context/next.d.mts +2 -1
  85. package/dist/sdk/plugins/context/next.mjs +2 -50
  86. package/dist/sdk/plugins/context/node.cjs +1 -0
  87. package/dist/sdk/plugins/context/node.d.cts +13 -0
  88. package/dist/sdk/plugins/context/node.d.mts +13 -0
  89. package/dist/sdk/plugins/context/node.mjs +2 -0
  90. package/dist/sdk/plugins/manifest.cjs +1 -0
  91. package/dist/sdk/plugins/manifest.d.cts +60 -0
  92. package/dist/sdk/plugins/manifest.d.mts +7 -1
  93. package/dist/sdk/plugins/manifest.mjs +2 -62
  94. package/dist/sdk/plugins/payload/errors.cjs +1 -0
  95. package/dist/sdk/plugins/payload/errors.d.cts +65 -0
  96. package/dist/sdk/plugins/payload/errors.d.mts +29 -19
  97. package/dist/sdk/plugins/payload/errors.mjs +2 -37
  98. package/dist/sdk/plugins/payload/page-events.cjs +1 -0
  99. package/dist/sdk/plugins/payload/page-events.d.cts +20 -0
  100. package/dist/sdk/plugins/payload/page-events.d.mts +4 -3
  101. package/dist/sdk/plugins/payload/page-events.mjs +2 -25
  102. package/dist/sdk/plugins/payload/rage-click.cjs +1 -0
  103. package/dist/sdk/plugins/payload/rage-click.d.cts +16 -0
  104. package/dist/sdk/plugins/payload/rage-click.d.mts +2 -1
  105. package/dist/sdk/plugins/payload/rage-click.mjs +2 -17
  106. package/dist/sdk/plugins/payload/replay.cjs +1 -0
  107. package/dist/sdk/plugins/payload/replay.d.cts +14 -0
  108. package/dist/sdk/plugins/payload/replay.d.mts +2 -1
  109. package/dist/sdk/plugins/payload/replay.mjs +2 -17
  110. package/dist/sdk/remote-config.cjs +1 -0
  111. package/dist/sdk/remote-config.d.cts +39 -0
  112. package/dist/sdk/remote-config.d.mts +32 -4
  113. package/dist/sdk/remote-config.mjs +2 -5
  114. package/dist/sdk/runtime.cjs +1 -0
  115. package/dist/sdk/runtime.d.cts +22 -0
  116. package/dist/sdk/runtime.d.mts +2 -1
  117. package/dist/sdk/runtime.mjs +2 -35
  118. package/package.json +122 -53
  119. package/dist/data/frame.d.mts.map +0 -1
  120. package/dist/data/frame.mjs.map +0 -1
  121. package/dist/data/session.d.mts.map +0 -1
  122. package/dist/data/session.mjs.map +0 -1
  123. package/dist/data/source-maps.d.mts.map +0 -1
  124. package/dist/data/source-maps.mjs.map +0 -1
  125. package/dist/events/error.d.mts.map +0 -1
  126. package/dist/events/error.mjs.map +0 -1
  127. package/dist/events/pageleave.d.mts.map +0 -1
  128. package/dist/events/pageleave.mjs.map +0 -1
  129. package/dist/events/pageview.d.mts.map +0 -1
  130. package/dist/events/pageview.mjs.map +0 -1
  131. package/dist/integrations/index.d.mts.map +0 -1
  132. package/dist/integrations/index.mjs.map +0 -1
  133. package/dist/integrations/platforms/github.d.mts.map +0 -1
  134. package/dist/integrations/platforms/github.mjs.map +0 -1
  135. package/dist/integrations/platforms/vercel.d.mts.map +0 -1
  136. package/dist/integrations/platforms/vercel.mjs.map +0 -1
  137. package/dist/releases/definition.d.mts.map +0 -1
  138. package/dist/releases/definition.mjs.map +0 -1
  139. package/dist/sdk/env.d.mts.map +0 -1
  140. package/dist/sdk/env.mjs.map +0 -1
  141. package/dist/sdk/envelope.d.mts.map +0 -1
  142. package/dist/sdk/envelope.mjs.map +0 -1
  143. package/dist/sdk/errors.d.mts.map +0 -1
  144. package/dist/sdk/errors.mjs.map +0 -1
  145. package/dist/sdk/geo.d.mts.map +0 -1
  146. package/dist/sdk/geo.mjs.map +0 -1
  147. package/dist/sdk/identify.d.mts.map +0 -1
  148. package/dist/sdk/identify.mjs.map +0 -1
  149. package/dist/sdk/plugins/context/browser.d.mts.map +0 -1
  150. package/dist/sdk/plugins/context/browser.mjs.map +0 -1
  151. package/dist/sdk/plugins/context/edge.d.mts.map +0 -1
  152. package/dist/sdk/plugins/context/edge.mjs.map +0 -1
  153. package/dist/sdk/plugins/context/next.d.mts.map +0 -1
  154. package/dist/sdk/plugins/context/next.mjs.map +0 -1
  155. package/dist/sdk/plugins/manifest.d.mts.map +0 -1
  156. package/dist/sdk/plugins/manifest.mjs.map +0 -1
  157. package/dist/sdk/plugins/payload/errors.d.mts.map +0 -1
  158. package/dist/sdk/plugins/payload/errors.mjs.map +0 -1
  159. package/dist/sdk/plugins/payload/page-events.d.mts.map +0 -1
  160. package/dist/sdk/plugins/payload/page-events.mjs.map +0 -1
  161. package/dist/sdk/plugins/payload/rage-click.d.mts.map +0 -1
  162. package/dist/sdk/plugins/payload/rage-click.mjs.map +0 -1
  163. package/dist/sdk/plugins/payload/replay.d.mts.map +0 -1
  164. package/dist/sdk/plugins/payload/replay.mjs.map +0 -1
  165. package/dist/sdk/remote-config.d.mts.map +0 -1
  166. package/dist/sdk/remote-config.mjs.map +0 -1
  167. package/dist/sdk/runtime.d.mts.map +0 -1
  168. package/dist/sdk/runtime.mjs.map +0 -1
package/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
  <a href="https://interfere.com">
3
3
  <picture>
4
4
  <source media="(prefers-color-scheme: dark)" srcset="https://qyzkf4cgb8ydxtq1.public.blob.vercel-storage.com/v2/header/logo-dark.png">
5
- <img src="https://qyzkf4cgb8ydxtq1.public.blob.vercel-storage.com/v2/header/logo-light.png" height="64">
5
+ <img src="https://qyzkf4cgb8ydxtq1.public.blob.vercel-storage.com/v2/header/logo-light.png" height="64" alt="Interfere">
6
6
  </picture>
7
7
  </a>
8
8
  <h1 align="center">@interfere/types</h1>
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://www.npmjs.com/package/@interfere/types"><img src="https://img.shields.io/npm/v/@interfere/types.svg" /></a>
13
- <a href="https://github.com/interfere-inc/interfere/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@interfere/types.svg" /></a>
12
+ <a href="https://www.npmjs.com/package/@interfere/types"><img src="https://img.shields.io/npm/v/@interfere/types.svg" alt="npm version" /></a>
13
+ <a href="https://github.com/interfere-inc/interfere/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@interfere/types.svg" alt="License" /></a>
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const ingestedFrame=zod.z.object({id:zod.z.string().optional(),file:zod.z.string().optional(),fn:zod.z.string().optional(),line:zod.z.number().optional(),column:zod.z.number().optional(),source:zod.z.string().optional(),debugId:zod.z.string().optional()}).meta({id:`Frame`,title:`Frame`,description:`A single stack frame captured from an error.`});exports.ingestedFrame=ingestedFrame;
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/data/frame.d.ts
4
+ /**
5
+ * One stack frame as it lands at the collector — pre-source-map
6
+ * resolution. Produced by the collector's stack parser from the OTel
7
+ * `exception.stacktrace` string, supplemented by SDK-side parsed
8
+ * frames (React component stack, `window.onerror` fallback).
9
+ *
10
+ * Field names match the post-resolution `EnrichedFrame` shape so
11
+ * consumers reading "the file the frame is in" don't have to remember
12
+ * which lifecycle stage they're at. The wire format is the same
13
+ * across SDK + collector + enrichment + storage.
14
+ */
15
+ declare const ingestedFrame: z.ZodObject<{
16
+ id: z.ZodOptional<z.ZodString>;
17
+ file: z.ZodOptional<z.ZodString>;
18
+ fn: z.ZodOptional<z.ZodString>;
19
+ line: z.ZodOptional<z.ZodNumber>;
20
+ column: z.ZodOptional<z.ZodNumber>;
21
+ source: z.ZodOptional<z.ZodString>;
22
+ debugId: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ type IngestedFrame = z.infer<typeof ingestedFrame>;
25
+ //#endregion
26
+ export { IngestedFrame, ingestedFrame };
27
+ //# sourceMappingURL=frame.d.cts.map
@@ -1,14 +1,27 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/data/frame.d.ts
4
+ /**
5
+ * One stack frame as it lands at the collector — pre-source-map
6
+ * resolution. Produced by the collector's stack parser from the OTel
7
+ * `exception.stacktrace` string, supplemented by SDK-side parsed
8
+ * frames (React component stack, `window.onerror` fallback).
9
+ *
10
+ * Field names match the post-resolution `EnrichedFrame` shape so
11
+ * consumers reading "the file the frame is in" don't have to remember
12
+ * which lifecycle stage they're at. The wire format is the same
13
+ * across SDK + collector + enrichment + storage.
14
+ */
4
15
  declare const ingestedFrame: z.ZodObject<{
5
- fileName: z.ZodOptional<z.ZodString>;
6
- functionName: z.ZodOptional<z.ZodString>;
7
- lineNumber: z.ZodOptional<z.ZodNumber>;
8
- columnNumber: z.ZodOptional<z.ZodNumber>;
16
+ id: z.ZodOptional<z.ZodString>;
17
+ file: z.ZodOptional<z.ZodString>;
18
+ fn: z.ZodOptional<z.ZodString>;
19
+ line: z.ZodOptional<z.ZodNumber>;
20
+ column: z.ZodOptional<z.ZodNumber>;
9
21
  source: z.ZodOptional<z.ZodString>;
10
22
  debugId: z.ZodOptional<z.ZodString>;
11
23
  }, z.core.$strip>;
12
24
  type IngestedFrame = z.infer<typeof ingestedFrame>;
13
25
  //#endregion
14
- export { IngestedFrame, ingestedFrame };
26
+ export { IngestedFrame, ingestedFrame };
27
+ //# sourceMappingURL=frame.d.mts.map
@@ -1,16 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/data/frame.ts
3
- const ingestedFrame = z.object({
4
- fileName: z.string().optional(),
5
- functionName: z.string().optional(),
6
- lineNumber: z.number().optional(),
7
- columnNumber: z.number().optional(),
8
- source: z.string().optional(),
9
- debugId: z.string().optional()
10
- }).meta({
11
- id: "Frame",
12
- title: "Frame",
13
- description: "A single stack frame captured from an error."
14
- });
15
- //#endregion
16
- export { ingestedFrame };
1
+ import{z}from"zod";const ingestedFrame=z.object({id:z.string().optional(),file:z.string().optional(),fn:z.string().optional(),line:z.number().optional(),column:z.number().optional(),source:z.string().optional(),debugId:z.string().optional()}).meta({id:`Frame`,title:`Frame`,description:`A single stack frame captured from an error.`});export{ingestedFrame};
2
+ //# sourceMappingURL=frame.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const sessionIdSchema=zod.z.union([zod.z.uuidv7(),zod.z.templateLiteral([`server_`,zod.z.uuidv7()])]).meta({id:`SessionId`,title:`SessionId`,description:`UUIDv7 (from the client SDK) or server_<uuidv7> (server-side fallback).`}).brand();exports.sessionIdSchema=sessionIdSchema;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/data/session.d.ts
4
+ declare const sessionIdSchema: z.core.$ZodBranded<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>, "SessionId", "out">;
5
+ type SessionId = z.infer<typeof sessionIdSchema>;
6
+ //#endregion
7
+ export { SessionId, sessionIdSchema };
8
+ //# sourceMappingURL=session.d.cts.map
@@ -1,7 +1,8 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/data/session.d.ts
4
- declare const sessionIdSchema: z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>;
4
+ declare const sessionIdSchema: z.core.$ZodBranded<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>, "SessionId", "out">;
5
5
  type SessionId = z.infer<typeof sessionIdSchema>;
6
6
  //#endregion
7
- export { SessionId, sessionIdSchema };
7
+ export { SessionId, sessionIdSchema };
8
+ //# sourceMappingURL=session.d.mts.map
@@ -1,9 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/data/session.ts
3
- const sessionIdSchema = z.union([z.uuidv7(), z.templateLiteral(["server_", z.uuidv7()])]).meta({
4
- id: "SessionId",
5
- title: "SessionId",
6
- description: "UUIDv7 (from the client SDK) or server_<uuidv7> (server-side fallback)."
7
- });
8
- //#endregion
9
- export { sessionIdSchema };
1
+ import{z}from"zod";const sessionIdSchema=z.union([z.uuidv7(),z.templateLiteral([`server_`,z.uuidv7()])]).meta({id:`SessionId`,title:`SessionId`,description:`UUIDv7 (from the client SDK) or server_<uuidv7> (server-side fallback).`}).brand();export{sessionIdSchema};
2
+ //# sourceMappingURL=session.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const manifestBundlerSchema=zod.z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),objectKey:zod.z.string(),mapHash:zod.z.string()}),sourceMapManifestSchema=zod.z.object({releaseSlug:zod.z.string(),surfaceId:zod.z.string(),organizationId:zod.z.string(),bundler:manifestBundlerSchema,createdAt:zod.z.number(),files:zod.z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=zod.z.object({entries:zod.z.array(uploadSourceMapEntry),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),processed:zod.z.number().int().nonnegative(),message:zod.z.string(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=zod.z.object({path:zod.z.string().min(1),sizeBytes:zod.z.number().int().nonnegative(),hasSourcesContent:zod.z.boolean(),hasNames:zod.z.boolean(),hasFile:zod.z.boolean(),mappingsPresent:zod.z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=zod.z.object({files:zod.z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=zod.z.object({path:zod.z.string(),objectKey:zod.z.string(),presignedUrl:zod.z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=zod.z.object({uploads:zod.z.array(signSourceMapUpload),expiresAt:zod.z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=zod.z.object({files:zod.z.array(completeSourceMapFile),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`});exports.completeSourceMapFile=completeSourceMapFile,exports.completeSourceMapsRequest=completeSourceMapsRequest,exports.completeSourceMapsResponse=completeSourceMapsResponse,exports.manifestBundlerSchema=manifestBundlerSchema,exports.signSourceMapFile=signSourceMapFile,exports.signSourceMapUpload=signSourceMapUpload,exports.signSourceMapsRequest=signSourceMapsRequest,exports.signSourceMapsResponse=signSourceMapsResponse,exports.sourceMapManifestSchema=sourceMapManifestSchema,exports.uploadSourceMapEntry=uploadSourceMapEntry,exports.uploadSourceMapsMetadata=uploadSourceMapsMetadata,exports.uploadSourceMapsResponse=uploadSourceMapsResponse;
@@ -0,0 +1,151 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/data/source-maps.d.ts
4
+ /**
5
+ * Bundler that produced this release metadata. Reported back in the
6
+ * SDK `bundler` upload metric for diagnostics. Mandatory now —
7
+ * server-side suffix-matching against `chunkUrl` is uniform across
8
+ * bundlers, but knowing which bundler produced the manifest is still
9
+ * useful for diagnostics (different bundlers exhibit different stack
10
+ * shapes; we want that pivot when investigating resolution issues).
11
+ */
12
+ declare const manifestBundlerSchema: z.ZodEnum<{
13
+ rollup: "rollup";
14
+ tsc: "tsc";
15
+ turbopack: "turbopack";
16
+ webpack: "webpack";
17
+ }>;
18
+ type ManifestBundler = z.infer<typeof manifestBundlerSchema>;
19
+ declare const sourceMapManifestSchema: z.ZodObject<{
20
+ releaseSlug: z.ZodString;
21
+ surfaceId: z.ZodString;
22
+ organizationId: z.ZodString;
23
+ bundler: z.ZodEnum<{
24
+ rollup: "rollup";
25
+ tsc: "tsc";
26
+ turbopack: "turbopack";
27
+ webpack: "webpack";
28
+ }>;
29
+ createdAt: z.ZodNumber;
30
+ files: z.ZodArray<z.ZodObject<{
31
+ chunkUrl: z.ZodString;
32
+ debugId: z.ZodString;
33
+ objectKey: z.ZodString;
34
+ mapHash: z.ZodString;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
37
+ type SourceMapManifest = z.infer<typeof sourceMapManifestSchema>;
38
+ /**
39
+ * Per-entry metadata for the legacy multipart upload endpoint
40
+ * (`POST /v1/releases/:slug/source-maps`). One entry per source-map file
41
+ * in the multipart body, paired by `path` matching the multipart filename.
42
+ *
43
+ * Every entry carries `chunkUrl` (the public URL the runtime loads the
44
+ * chunk from) and `debugId` — both mandatory now. The legacy multipart
45
+ * endpoint accepts the same shape as the new presigned-URL flow.
46
+ */
47
+ declare const uploadSourceMapEntry: z.ZodObject<{
48
+ path: z.ZodString;
49
+ hash: z.ZodString;
50
+ debugId: z.ZodString;
51
+ chunkUrl: z.ZodString;
52
+ }, z.core.$strip>;
53
+ type UploadSourceMapEntry = z.infer<typeof uploadSourceMapEntry>;
54
+ /**
55
+ * Multipart metadata for the legacy upload endpoint. The `files` field
56
+ * carries the actual JSON bodies as multipart File parts; this `metadata`
57
+ * object travels alongside as a JSON-encoded form field.
58
+ *
59
+ * This endpoint is deprecated in favour of the `/sign` + direct R2 PUT
60
+ * + `/complete` flow, which scales beyond the body-size limits of any
61
+ * worker / load balancer in front of the collector. Kept for backwards
62
+ * compatibility with deployed SDKs during the deprecation window.
63
+ *
64
+ * @deprecated
65
+ */
66
+ declare const uploadSourceMapsMetadata: z.ZodObject<{
67
+ entries: z.ZodArray<z.ZodObject<{
68
+ path: z.ZodString;
69
+ hash: z.ZodString;
70
+ debugId: z.ZodString;
71
+ chunkUrl: z.ZodString;
72
+ }, z.core.$strip>>;
73
+ sourceFileCount: z.ZodOptional<z.ZodNumber>;
74
+ bundler: z.ZodEnum<{
75
+ rollup: "rollup";
76
+ tsc: "tsc";
77
+ turbopack: "turbopack";
78
+ webpack: "webpack";
79
+ }>;
80
+ }, z.core.$strip>;
81
+ type UploadSourceMapsMetadata = z.infer<typeof uploadSourceMapsMetadata>;
82
+ declare const uploadSourceMapsResponse: z.ZodObject<{
83
+ ok: z.ZodBoolean;
84
+ processed: z.ZodNumber;
85
+ message: z.ZodString;
86
+ fileCount: z.ZodNumber;
87
+ }, z.core.$strip>;
88
+ type UploadSourceMapsResponse = z.infer<typeof uploadSourceMapsResponse>;
89
+ declare const signSourceMapFile: z.ZodObject<{
90
+ path: z.ZodString;
91
+ sizeBytes: z.ZodNumber;
92
+ hasSourcesContent: z.ZodBoolean;
93
+ hasNames: z.ZodBoolean;
94
+ hasFile: z.ZodBoolean;
95
+ mappingsPresent: z.ZodBoolean;
96
+ }, z.core.$strip>;
97
+ declare const signSourceMapsRequest: z.ZodObject<{
98
+ files: z.ZodArray<z.ZodObject<{
99
+ path: z.ZodString;
100
+ sizeBytes: z.ZodNumber;
101
+ hasSourcesContent: z.ZodBoolean;
102
+ hasNames: z.ZodBoolean;
103
+ hasFile: z.ZodBoolean;
104
+ mappingsPresent: z.ZodBoolean;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>;
107
+ type SignSourceMapsRequest = z.infer<typeof signSourceMapsRequest>;
108
+ declare const signSourceMapUpload: z.ZodObject<{
109
+ path: z.ZodString;
110
+ objectKey: z.ZodString;
111
+ presignedUrl: z.ZodString;
112
+ }, z.core.$strip>;
113
+ declare const signSourceMapsResponse: z.ZodObject<{
114
+ uploads: z.ZodArray<z.ZodObject<{
115
+ path: z.ZodString;
116
+ objectKey: z.ZodString;
117
+ presignedUrl: z.ZodString;
118
+ }, z.core.$strip>>;
119
+ expiresAt: z.ZodNumber;
120
+ }, z.core.$strip>;
121
+ type SignSourceMapsResponse = z.infer<typeof signSourceMapsResponse>;
122
+ declare const completeSourceMapFile: z.ZodObject<{
123
+ path: z.ZodString;
124
+ hash: z.ZodString;
125
+ debugId: z.ZodString;
126
+ chunkUrl: z.ZodString;
127
+ }, z.core.$strip>;
128
+ declare const completeSourceMapsRequest: z.ZodObject<{
129
+ files: z.ZodArray<z.ZodObject<{
130
+ path: z.ZodString;
131
+ hash: z.ZodString;
132
+ debugId: z.ZodString;
133
+ chunkUrl: z.ZodString;
134
+ }, z.core.$strip>>;
135
+ sourceFileCount: z.ZodOptional<z.ZodNumber>;
136
+ bundler: z.ZodEnum<{
137
+ rollup: "rollup";
138
+ tsc: "tsc";
139
+ turbopack: "turbopack";
140
+ webpack: "webpack";
141
+ }>;
142
+ }, z.core.$strip>;
143
+ type CompleteSourceMapsRequest = z.infer<typeof completeSourceMapsRequest>;
144
+ declare const completeSourceMapsResponse: z.ZodObject<{
145
+ ok: z.ZodBoolean;
146
+ fileCount: z.ZodNumber;
147
+ }, z.core.$strip>;
148
+ type CompleteSourceMapsResponse = z.infer<typeof completeSourceMapsResponse>;
149
+ //#endregion
150
+ export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, manifestBundlerSchema, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
151
+ //# sourceMappingURL=source-maps.d.cts.map
@@ -1,40 +1,151 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/data/source-maps.d.ts
4
- declare const getSourceMapPath: ({
5
- organizationId,
6
- surfaceId,
7
- buildId,
8
- relativePath
9
- }: {
10
- organizationId: string;
11
- surfaceId: string;
12
- buildId: string;
13
- relativePath: string;
14
- }) => string;
4
+ /**
5
+ * Bundler that produced this release metadata. Reported back in the
6
+ * SDK `bundler` upload metric for diagnostics. Mandatory now —
7
+ * server-side suffix-matching against `chunkUrl` is uniform across
8
+ * bundlers, but knowing which bundler produced the manifest is still
9
+ * useful for diagnostics (different bundlers exhibit different stack
10
+ * shapes; we want that pivot when investigating resolution issues).
11
+ */
12
+ declare const manifestBundlerSchema: z.ZodEnum<{
13
+ rollup: "rollup";
14
+ tsc: "tsc";
15
+ turbopack: "turbopack";
16
+ webpack: "webpack";
17
+ }>;
18
+ type ManifestBundler = z.infer<typeof manifestBundlerSchema>;
15
19
  declare const sourceMapManifestSchema: z.ZodObject<{
16
- buildId: z.ZodString;
17
- releaseId: z.ZodOptional<z.ZodString>;
20
+ releaseSlug: z.ZodString;
18
21
  surfaceId: z.ZodString;
19
22
  organizationId: z.ZodString;
23
+ bundler: z.ZodEnum<{
24
+ rollup: "rollup";
25
+ tsc: "tsc";
26
+ turbopack: "turbopack";
27
+ webpack: "webpack";
28
+ }>;
20
29
  createdAt: z.ZodNumber;
21
30
  files: z.ZodArray<z.ZodObject<{
22
- relativePath: z.ZodString;
23
- generatedFile: z.ZodString;
24
- hash: z.ZodString;
31
+ chunkUrl: z.ZodString;
32
+ debugId: z.ZodString;
25
33
  objectKey: z.ZodString;
26
- debugId: z.ZodOptional<z.ZodString>;
34
+ mapHash: z.ZodString;
27
35
  }, z.core.$strip>>;
28
36
  }, z.core.$strip>;
29
37
  type SourceMapManifest = z.infer<typeof sourceMapManifestSchema>;
30
- declare const getManifestPath: ({
31
- organizationId,
32
- surfaceId,
33
- buildId
34
- }: {
35
- organizationId: string;
36
- surfaceId: string;
37
- buildId: string;
38
- }) => string;
38
+ /**
39
+ * Per-entry metadata for the legacy multipart upload endpoint
40
+ * (`POST /v1/releases/:slug/source-maps`). One entry per source-map file
41
+ * in the multipart body, paired by `path` matching the multipart filename.
42
+ *
43
+ * Every entry carries `chunkUrl` (the public URL the runtime loads the
44
+ * chunk from) and `debugId` — both mandatory now. The legacy multipart
45
+ * endpoint accepts the same shape as the new presigned-URL flow.
46
+ */
47
+ declare const uploadSourceMapEntry: z.ZodObject<{
48
+ path: z.ZodString;
49
+ hash: z.ZodString;
50
+ debugId: z.ZodString;
51
+ chunkUrl: z.ZodString;
52
+ }, z.core.$strip>;
53
+ type UploadSourceMapEntry = z.infer<typeof uploadSourceMapEntry>;
54
+ /**
55
+ * Multipart metadata for the legacy upload endpoint. The `files` field
56
+ * carries the actual JSON bodies as multipart File parts; this `metadata`
57
+ * object travels alongside as a JSON-encoded form field.
58
+ *
59
+ * This endpoint is deprecated in favour of the `/sign` + direct R2 PUT
60
+ * + `/complete` flow, which scales beyond the body-size limits of any
61
+ * worker / load balancer in front of the collector. Kept for backwards
62
+ * compatibility with deployed SDKs during the deprecation window.
63
+ *
64
+ * @deprecated
65
+ */
66
+ declare const uploadSourceMapsMetadata: z.ZodObject<{
67
+ entries: z.ZodArray<z.ZodObject<{
68
+ path: z.ZodString;
69
+ hash: z.ZodString;
70
+ debugId: z.ZodString;
71
+ chunkUrl: z.ZodString;
72
+ }, z.core.$strip>>;
73
+ sourceFileCount: z.ZodOptional<z.ZodNumber>;
74
+ bundler: z.ZodEnum<{
75
+ rollup: "rollup";
76
+ tsc: "tsc";
77
+ turbopack: "turbopack";
78
+ webpack: "webpack";
79
+ }>;
80
+ }, z.core.$strip>;
81
+ type UploadSourceMapsMetadata = z.infer<typeof uploadSourceMapsMetadata>;
82
+ declare const uploadSourceMapsResponse: z.ZodObject<{
83
+ ok: z.ZodBoolean;
84
+ processed: z.ZodNumber;
85
+ message: z.ZodString;
86
+ fileCount: z.ZodNumber;
87
+ }, z.core.$strip>;
88
+ type UploadSourceMapsResponse = z.infer<typeof uploadSourceMapsResponse>;
89
+ declare const signSourceMapFile: z.ZodObject<{
90
+ path: z.ZodString;
91
+ sizeBytes: z.ZodNumber;
92
+ hasSourcesContent: z.ZodBoolean;
93
+ hasNames: z.ZodBoolean;
94
+ hasFile: z.ZodBoolean;
95
+ mappingsPresent: z.ZodBoolean;
96
+ }, z.core.$strip>;
97
+ declare const signSourceMapsRequest: z.ZodObject<{
98
+ files: z.ZodArray<z.ZodObject<{
99
+ path: z.ZodString;
100
+ sizeBytes: z.ZodNumber;
101
+ hasSourcesContent: z.ZodBoolean;
102
+ hasNames: z.ZodBoolean;
103
+ hasFile: z.ZodBoolean;
104
+ mappingsPresent: z.ZodBoolean;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>;
107
+ type SignSourceMapsRequest = z.infer<typeof signSourceMapsRequest>;
108
+ declare const signSourceMapUpload: z.ZodObject<{
109
+ path: z.ZodString;
110
+ objectKey: z.ZodString;
111
+ presignedUrl: z.ZodString;
112
+ }, z.core.$strip>;
113
+ declare const signSourceMapsResponse: z.ZodObject<{
114
+ uploads: z.ZodArray<z.ZodObject<{
115
+ path: z.ZodString;
116
+ objectKey: z.ZodString;
117
+ presignedUrl: z.ZodString;
118
+ }, z.core.$strip>>;
119
+ expiresAt: z.ZodNumber;
120
+ }, z.core.$strip>;
121
+ type SignSourceMapsResponse = z.infer<typeof signSourceMapsResponse>;
122
+ declare const completeSourceMapFile: z.ZodObject<{
123
+ path: z.ZodString;
124
+ hash: z.ZodString;
125
+ debugId: z.ZodString;
126
+ chunkUrl: z.ZodString;
127
+ }, z.core.$strip>;
128
+ declare const completeSourceMapsRequest: z.ZodObject<{
129
+ files: z.ZodArray<z.ZodObject<{
130
+ path: z.ZodString;
131
+ hash: z.ZodString;
132
+ debugId: z.ZodString;
133
+ chunkUrl: z.ZodString;
134
+ }, z.core.$strip>>;
135
+ sourceFileCount: z.ZodOptional<z.ZodNumber>;
136
+ bundler: z.ZodEnum<{
137
+ rollup: "rollup";
138
+ tsc: "tsc";
139
+ turbopack: "turbopack";
140
+ webpack: "webpack";
141
+ }>;
142
+ }, z.core.$strip>;
143
+ type CompleteSourceMapsRequest = z.infer<typeof completeSourceMapsRequest>;
144
+ declare const completeSourceMapsResponse: z.ZodObject<{
145
+ ok: z.ZodBoolean;
146
+ fileCount: z.ZodNumber;
147
+ }, z.core.$strip>;
148
+ type CompleteSourceMapsResponse = z.infer<typeof completeSourceMapsResponse>;
39
149
  //#endregion
40
- export { SourceMapManifest, getManifestPath, getSourceMapPath, sourceMapManifestSchema };
150
+ export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, manifestBundlerSchema, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
151
+ //# sourceMappingURL=source-maps.d.mts.map
@@ -1,21 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/data/source-maps.ts
3
- const getSourceMapPath = ({ organizationId, surfaceId, buildId, relativePath }) => `source-maps/orgs/${organizationId}/surfaces/${surfaceId}/builds/${buildId}/${relativePath}`;
4
- const sourceMapManifestEntrySchema = z.object({
5
- relativePath: z.string(),
6
- generatedFile: z.string(),
7
- hash: z.string(),
8
- objectKey: z.string(),
9
- debugId: z.string().optional()
10
- });
11
- const sourceMapManifestSchema = z.object({
12
- buildId: z.string(),
13
- releaseId: z.string().optional(),
14
- surfaceId: z.string(),
15
- organizationId: z.string(),
16
- createdAt: z.number(),
17
- files: z.array(sourceMapManifestEntrySchema)
18
- });
19
- const getManifestPath = ({ organizationId, surfaceId, buildId }) => `source-maps/orgs/${organizationId}/surfaces/${surfaceId}/builds/${buildId}/_manifest.json`;
20
- //#endregion
21
- export { getManifestPath, getSourceMapPath, sourceMapManifestSchema };
1
+ import{z}from"zod";const manifestBundlerSchema=z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=z.object({chunkUrl:z.string(),debugId:z.string(),objectKey:z.string(),mapHash:z.string()}),sourceMapManifestSchema=z.object({releaseSlug:z.string(),surfaceId:z.string(),organizationId:z.string(),bundler:manifestBundlerSchema,createdAt:z.number(),files:z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=z.object({entries:z.array(uploadSourceMapEntry),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=z.object({ok:z.boolean(),processed:z.number().int().nonnegative(),message:z.string(),fileCount:z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=z.object({path:z.string().min(1),sizeBytes:z.number().int().nonnegative(),hasSourcesContent:z.boolean(),hasNames:z.boolean(),hasFile:z.boolean(),mappingsPresent:z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=z.object({files:z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=z.object({path:z.string(),objectKey:z.string(),presignedUrl:z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=z.object({uploads:z.array(signSourceMapUpload),expiresAt:z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=z.object({files:z.array(completeSourceMapFile),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=z.object({ok:z.boolean(),fileCount:z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`});export{completeSourceMapFile,completeSourceMapsRequest,completeSourceMapsResponse,manifestBundlerSchema,signSourceMapFile,signSourceMapUpload,signSourceMapsRequest,signSourceMapsResponse,sourceMapManifestSchema,uploadSourceMapEntry,uploadSourceMapsMetadata,uploadSourceMapsResponse};
2
+ //# sourceMappingURL=source-maps.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod"),_data_frame=require("#data/frame");const baseEnrichedFrameSchema=zod.z.object({ingestedId:zod.z.string(),inApp:zod.z.boolean(),file:zod.z.string().nullable(),line:zod.z.number().nullable(),column:zod.z.number().nullable(),fn:zod.z.string().nullable()}),resolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!0),originalFile:zod.z.string().nullable(),originalLine:zod.z.number().nullable(),originalColumn:zod.z.number().nullable(),originalName:zod.z.string().nullable()}),unresolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!1)}),enrichedFrameSchema=zod.z.discriminatedUnion(`resolved`,[resolvedFrameSchema,unresolvedFrameSchema]),errorMechanismSchema=zod.z.object({type:zod.z.string(),handled:zod.z.boolean(),synthetic:zod.z.boolean().optional()}),errorContextSchema=zod.z.object({framework:zod.z.string().optional(),routerKind:zod.z.enum([`Pages Router`,`App Router`]).optional(),routePath:zod.z.string().optional(),routeType:zod.z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).optional(),renderSource:zod.z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).optional(),revalidateReason:zod.z.enum([`on-demand`,`stale`]).optional(),renderType:zod.z.enum([`dynamic`,`dynamic-resume`]).optional(),requestPath:zod.z.string().optional(),requestMethod:zod.z.string().optional(),errorDigest:zod.z.string().optional()}),errorPayloadCommonSchema=zod.z.object({message:zod.z.string().nullable(),name:zod.z.string().nullable(),stack:zod.z.string().nullable(),context:errorContextSchema.optional(),mechanism:errorMechanismSchema.optional(),captureSource:zod.z.string().optional(),runtime:zod.z.string().optional(),frames:zod.z.array(_data_frame.ingestedFrame)}),errorPayloadFromErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`error`)}),errorPayloadFromNonErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`non-error`),serialized:zod.z.json()}),errorPayloadSchema=zod.z.discriminatedUnion(`capture`,[errorPayloadFromErrorSchema,errorPayloadFromNonErrorSchema]);exports.enrichedFrameSchema=enrichedFrameSchema,exports.errorContextSchema=errorContextSchema,exports.errorMechanismSchema=errorMechanismSchema,exports.errorPayloadSchema=errorPayloadSchema;