@interfere/types 9.0.2 → 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 (173) hide show
  1. package/dist/data/frame.cjs +1 -0
  2. package/dist/data/frame.d.cts +27 -0
  3. package/dist/data/frame.d.mts +2 -1
  4. package/dist/data/frame.mjs +2 -1
  5. package/dist/data/session.cjs +1 -0
  6. package/dist/data/session.d.cts +8 -0
  7. package/dist/data/session.d.mts +2 -1
  8. package/dist/data/session.mjs +2 -1
  9. package/dist/data/source-maps.cjs +1 -0
  10. package/dist/data/source-maps.d.cts +151 -0
  11. package/dist/data/source-maps.d.mts +7 -2
  12. package/dist/data/source-maps.mjs +2 -1
  13. package/dist/events/error.cjs +1 -0
  14. package/dist/events/error.d.cts +196 -0
  15. package/dist/events/error.d.mts +2 -1
  16. package/dist/events/error.mjs +2 -1
  17. package/dist/events/pageleave.cjs +1 -0
  18. package/dist/events/pageleave.d.cts +13 -0
  19. package/dist/events/pageleave.d.mts +2 -1
  20. package/dist/events/pageleave.mjs +2 -1
  21. package/dist/events/pageview.cjs +1 -0
  22. package/dist/events/pageview.d.cts +14 -0
  23. package/dist/events/pageview.d.mts +2 -1
  24. package/dist/events/pageview.mjs +2 -1
  25. package/dist/integrations/index.cjs +1 -0
  26. package/dist/integrations/index.d.cts +48 -0
  27. package/dist/integrations/index.d.mts +2 -1
  28. package/dist/integrations/index.mjs +2 -1
  29. package/dist/integrations/platforms/cli.cjs +1 -0
  30. package/dist/integrations/platforms/cli.d.cts +12 -0
  31. package/dist/integrations/platforms/cli.d.mts +12 -0
  32. package/dist/integrations/platforms/cli.mjs +2 -0
  33. package/dist/integrations/platforms/github.cjs +1 -0
  34. package/dist/integrations/platforms/github.d.cts +16 -0
  35. package/dist/integrations/platforms/github.d.mts +2 -1
  36. package/dist/integrations/platforms/github.mjs +2 -1
  37. package/dist/integrations/platforms/slack.cjs +1 -0
  38. package/dist/integrations/platforms/slack.d.cts +33 -0
  39. package/dist/integrations/platforms/slack.d.mts +2 -1
  40. package/dist/integrations/platforms/slack.mjs +2 -1
  41. package/dist/integrations/platforms/vercel.cjs +1 -0
  42. package/dist/integrations/platforms/vercel.d.cts +47 -0
  43. package/dist/integrations/platforms/vercel.d.mts +2 -1
  44. package/dist/integrations/platforms/vercel.mjs +2 -1
  45. package/dist/releases/definition.cjs +1 -0
  46. package/dist/releases/definition.d.cts +57 -0
  47. package/dist/releases/definition.d.mts +2 -1
  48. package/dist/releases/definition.mjs +2 -1
  49. package/dist/releases/slug.cjs +1 -0
  50. package/dist/releases/slug.d.cts +24 -0
  51. package/dist/releases/slug.d.mts +3 -1
  52. package/dist/releases/slug.mjs +2 -1
  53. package/dist/sdk/env.cjs +1 -0
  54. package/dist/sdk/env.d.cts +6 -0
  55. package/dist/sdk/env.d.mts +2 -1
  56. package/dist/sdk/env.mjs +2 -1
  57. package/dist/sdk/envelope.cjs +1 -0
  58. package/dist/sdk/envelope.d.cts +1489 -0
  59. package/dist/sdk/envelope.d.mts +2 -1
  60. package/dist/sdk/envelope.mjs +2 -1
  61. package/dist/sdk/errors.cjs +2 -0
  62. package/dist/sdk/errors.d.cts +154 -0
  63. package/dist/sdk/errors.d.mts +2 -1
  64. package/dist/sdk/errors.mjs +3 -2
  65. package/dist/sdk/geo.cjs +1 -0
  66. package/dist/sdk/geo.d.cts +11 -0
  67. package/dist/sdk/geo.d.mts +2 -1
  68. package/dist/sdk/geo.mjs +2 -1
  69. package/dist/sdk/identify.cjs +1 -0
  70. package/dist/sdk/identify.d.cts +35 -0
  71. package/dist/sdk/identify.d.mts +2 -1
  72. package/dist/sdk/identify.mjs +2 -1
  73. package/dist/sdk/plugins/context/browser.cjs +1 -0
  74. package/dist/sdk/plugins/context/browser.d.cts +92 -0
  75. package/dist/sdk/plugins/context/browser.d.mts +2 -1
  76. package/dist/sdk/plugins/context/browser.mjs +2 -1
  77. package/dist/sdk/plugins/context/edge.cjs +1 -0
  78. package/dist/sdk/plugins/context/edge.d.cts +10 -0
  79. package/dist/sdk/plugins/context/edge.d.mts +2 -1
  80. package/dist/sdk/plugins/context/edge.mjs +2 -1
  81. package/dist/sdk/plugins/context/next.cjs +1 -0
  82. package/dist/sdk/plugins/context/next.d.cts +62 -0
  83. package/dist/sdk/plugins/context/next.d.mts +2 -1
  84. package/dist/sdk/plugins/context/next.mjs +2 -1
  85. package/dist/sdk/plugins/context/node.cjs +1 -0
  86. package/dist/sdk/plugins/context/node.d.cts +13 -0
  87. package/dist/sdk/plugins/context/node.d.mts +2 -1
  88. package/dist/sdk/plugins/context/node.mjs +2 -1
  89. package/dist/sdk/plugins/manifest.cjs +1 -0
  90. package/dist/sdk/plugins/manifest.d.cts +60 -0
  91. package/dist/sdk/plugins/manifest.d.mts +2 -1
  92. package/dist/sdk/plugins/manifest.mjs +2 -1
  93. package/dist/sdk/plugins/payload/errors.cjs +1 -0
  94. package/dist/sdk/plugins/payload/errors.d.cts +65 -0
  95. package/dist/sdk/plugins/payload/errors.d.mts +2 -1
  96. package/dist/sdk/plugins/payload/errors.mjs +2 -1
  97. package/dist/sdk/plugins/payload/page-events.cjs +1 -0
  98. package/dist/sdk/plugins/payload/page-events.d.cts +20 -0
  99. package/dist/sdk/plugins/payload/page-events.d.mts +2 -1
  100. package/dist/sdk/plugins/payload/page-events.mjs +2 -1
  101. package/dist/sdk/plugins/payload/rage-click.cjs +1 -0
  102. package/dist/sdk/plugins/payload/rage-click.d.cts +16 -0
  103. package/dist/sdk/plugins/payload/rage-click.d.mts +2 -1
  104. package/dist/sdk/plugins/payload/rage-click.mjs +2 -1
  105. package/dist/sdk/plugins/payload/replay.cjs +1 -0
  106. package/dist/sdk/plugins/payload/replay.d.cts +14 -0
  107. package/dist/sdk/plugins/payload/replay.d.mts +2 -1
  108. package/dist/sdk/plugins/payload/replay.mjs +2 -1
  109. package/dist/sdk/remote-config.cjs +1 -0
  110. package/dist/sdk/remote-config.d.cts +39 -0
  111. package/dist/sdk/remote-config.d.mts +2 -1
  112. package/dist/sdk/remote-config.mjs +2 -1
  113. package/dist/sdk/runtime.cjs +1 -0
  114. package/dist/sdk/runtime.d.cts +22 -0
  115. package/dist/sdk/runtime.d.mts +2 -1
  116. package/dist/sdk/runtime.mjs +2 -1
  117. package/package.json +115 -40
  118. package/dist/data/frame.d.mts.map +0 -1
  119. package/dist/data/frame.mjs.map +0 -1
  120. package/dist/data/session.d.mts.map +0 -1
  121. package/dist/data/session.mjs.map +0 -1
  122. package/dist/data/source-maps.d.mts.map +0 -1
  123. package/dist/data/source-maps.mjs.map +0 -1
  124. package/dist/events/error.d.mts.map +0 -1
  125. package/dist/events/error.mjs.map +0 -1
  126. package/dist/events/pageleave.d.mts.map +0 -1
  127. package/dist/events/pageleave.mjs.map +0 -1
  128. package/dist/events/pageview.d.mts.map +0 -1
  129. package/dist/events/pageview.mjs.map +0 -1
  130. package/dist/integrations/index.d.mts.map +0 -1
  131. package/dist/integrations/index.mjs.map +0 -1
  132. package/dist/integrations/platforms/github.d.mts.map +0 -1
  133. package/dist/integrations/platforms/github.mjs.map +0 -1
  134. package/dist/integrations/platforms/slack.d.mts.map +0 -1
  135. package/dist/integrations/platforms/slack.mjs.map +0 -1
  136. package/dist/integrations/platforms/vercel.d.mts.map +0 -1
  137. package/dist/integrations/platforms/vercel.mjs.map +0 -1
  138. package/dist/releases/definition.d.mts.map +0 -1
  139. package/dist/releases/definition.mjs.map +0 -1
  140. package/dist/releases/slug.d.mts.map +0 -1
  141. package/dist/releases/slug.mjs.map +0 -1
  142. package/dist/sdk/env.d.mts.map +0 -1
  143. package/dist/sdk/env.mjs.map +0 -1
  144. package/dist/sdk/envelope.d.mts.map +0 -1
  145. package/dist/sdk/envelope.mjs.map +0 -1
  146. package/dist/sdk/errors.d.mts.map +0 -1
  147. package/dist/sdk/errors.mjs.map +0 -1
  148. package/dist/sdk/geo.d.mts.map +0 -1
  149. package/dist/sdk/geo.mjs.map +0 -1
  150. package/dist/sdk/identify.d.mts.map +0 -1
  151. package/dist/sdk/identify.mjs.map +0 -1
  152. package/dist/sdk/plugins/context/browser.d.mts.map +0 -1
  153. package/dist/sdk/plugins/context/browser.mjs.map +0 -1
  154. package/dist/sdk/plugins/context/edge.d.mts.map +0 -1
  155. package/dist/sdk/plugins/context/edge.mjs.map +0 -1
  156. package/dist/sdk/plugins/context/next.d.mts.map +0 -1
  157. package/dist/sdk/plugins/context/next.mjs.map +0 -1
  158. package/dist/sdk/plugins/context/node.d.mts.map +0 -1
  159. package/dist/sdk/plugins/context/node.mjs.map +0 -1
  160. package/dist/sdk/plugins/manifest.d.mts.map +0 -1
  161. package/dist/sdk/plugins/manifest.mjs.map +0 -1
  162. package/dist/sdk/plugins/payload/errors.d.mts.map +0 -1
  163. package/dist/sdk/plugins/payload/errors.mjs.map +0 -1
  164. package/dist/sdk/plugins/payload/page-events.d.mts.map +0 -1
  165. package/dist/sdk/plugins/payload/page-events.mjs.map +0 -1
  166. package/dist/sdk/plugins/payload/rage-click.d.mts.map +0 -1
  167. package/dist/sdk/plugins/payload/rage-click.mjs.map +0 -1
  168. package/dist/sdk/plugins/payload/replay.d.mts.map +0 -1
  169. package/dist/sdk/plugins/payload/replay.mjs.map +0 -1
  170. package/dist/sdk/remote-config.d.mts.map +0 -1
  171. package/dist/sdk/remote-config.mjs.map +0 -1
  172. package/dist/sdk/runtime.d.mts.map +0 -1
  173. package/dist/sdk/runtime.mjs.map +0 -1
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/index.d.ts
4
+ declare const githubReleaseSourceSchema: z.ZodObject<{
5
+ provider: z.ZodLiteral<"github">;
6
+ commitMessage: z.ZodString;
7
+ branch: z.ZodString;
8
+ commitSha: z.ZodNullable<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ declare const releaseSourceMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
+ provider: z.ZodLiteral<"github">;
12
+ commitMessage: z.ZodString;
13
+ branch: z.ZodString;
14
+ commitSha: z.ZodNullable<z.ZodString>;
15
+ }, z.core.$strip>], "provider">;
16
+ type ReleaseSourceMetadata = z.infer<typeof releaseSourceMetadataSchema>;
17
+ declare const vercelReleaseDestinationSchema: z.ZodObject<{
18
+ provider: z.ZodLiteral<"vercel">;
19
+ destinationReleaseId: z.ZodNullable<z.ZodString>;
20
+ environment: z.ZodNullable<z.ZodString>;
21
+ deploymentId: z.ZodNullable<z.ZodString>;
22
+ deploymentUrl: z.ZodNullable<z.ZodString>;
23
+ environmentName: z.ZodNullable<z.ZodString>;
24
+ environmentTarget: z.ZodNullable<z.ZodString>;
25
+ }, z.core.$strip>;
26
+ declare const releaseDestinationMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ provider: z.ZodLiteral<"vercel">;
28
+ destinationReleaseId: z.ZodNullable<z.ZodString>;
29
+ environment: z.ZodNullable<z.ZodString>;
30
+ deploymentId: z.ZodNullable<z.ZodString>;
31
+ deploymentUrl: z.ZodNullable<z.ZodString>;
32
+ environmentName: z.ZodNullable<z.ZodString>;
33
+ environmentTarget: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>], "provider">;
35
+ type ReleaseDestinationMetadata = z.infer<typeof releaseDestinationMetadataSchema>;
36
+ declare const sourceProviderSchema: z.ZodEnum<{
37
+ github: "github";
38
+ }>;
39
+ type SourceProvider = z.infer<typeof sourceProviderSchema>;
40
+ declare const destinationProviderSchema: z.ZodEnum<{
41
+ vercel: "vercel";
42
+ }>;
43
+ type DestinationProvider = z.infer<typeof destinationProviderSchema>;
44
+ declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
45
+ declare const releaseDestinationIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA")[];
46
+ //#endregion
47
+ export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
48
+ //# sourceMappingURL=index.d.cts.map
@@ -44,4 +44,5 @@ type DestinationProvider = z.infer<typeof destinationProviderSchema>;
44
44
  declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
45
45
  declare const releaseDestinationIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA")[];
46
46
  //#endregion
47
- export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
47
+ export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
48
+ //# sourceMappingURL=index.d.mts.map
@@ -1 +1,2 @@
1
- import{githubSourceIdEnvKeys as e}from"./platforms/github.mjs";import{vercelDestinationIdEnvKeys as t}from"./platforms/vercel.mjs";import{z as n}from"zod";const r=n.object({provider:n.literal(`github`),commitMessage:n.string(),branch:n.string(),commitSha:n.string().nullable()}).meta({id:`GithubReleaseSource`,title:`GithubReleaseSource`,description:`Release source metadata coming from GitHub.`}),i=n.discriminatedUnion(`provider`,[r]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),a=n.object({provider:n.literal(`vercel`),destinationReleaseId:n.string().nullable(),environment:n.string().nullable(),deploymentId:n.string().nullable(),deploymentUrl:n.string().nullable(),environmentName:n.string().nullable(),environmentTarget:n.string().nullable()}).meta({id:`VercelReleaseDestination`,title:`VercelReleaseDestination`,description:`Release destination metadata for a Vercel deployment.`}),o=n.discriminatedUnion(`provider`,[a]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),s=n.enum([`github`]).meta({id:`SourceProvider`,title:`SourceProvider`}),c=n.enum([`vercel`]).meta({id:`DestinationProvider`,title:`DestinationProvider`}),l=n.enum([`NEXT_PUBLIC_INTERFERE_BUILD_ID`,`INTERFERE_SOURCE_ID`,`NEXT_BUILD_ID`,...e]).options,u=n.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...t,...e]).options;export{c as destinationProviderSchema,r as githubReleaseSourceSchema,u as releaseDestinationIdEnvKeys,o as releaseDestinationMetadataSchema,l as releaseSourceIdEnvKeys,i as releaseSourceMetadataSchema,s as sourceProviderSchema,a as vercelReleaseDestinationSchema};
1
+ import{githubSourceIdEnvKeys}from"./platforms/github.mjs";import{vercelDestinationIdEnvKeys}from"./platforms/vercel.mjs";import{z}from"zod";const githubReleaseSourceSchema=z.object({provider:z.literal(`github`),commitMessage:z.string(),branch:z.string(),commitSha:z.string().nullable()}).meta({id:`GithubReleaseSource`,title:`GithubReleaseSource`,description:`Release source metadata coming from GitHub.`}),releaseSourceMetadataSchema=z.discriminatedUnion(`provider`,[githubReleaseSourceSchema]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),vercelReleaseDestinationSchema=z.object({provider:z.literal(`vercel`),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),deploymentId:z.string().nullable(),deploymentUrl:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable()}).meta({id:`VercelReleaseDestination`,title:`VercelReleaseDestination`,description:`Release destination metadata for a Vercel deployment.`}),releaseDestinationMetadataSchema=z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),sourceProviderSchema=z.enum([`github`]).meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=z.enum([`vercel`]).meta({id:`DestinationProvider`,title:`DestinationProvider`}),releaseSourceIdEnvKeys=z.enum([`NEXT_PUBLIC_INTERFERE_BUILD_ID`,`INTERFERE_SOURCE_ID`,`NEXT_BUILD_ID`,...githubSourceIdEnvKeys]).options,releaseDestinationIdEnvKeys=z.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...vercelDestinationIdEnvKeys,...githubSourceIdEnvKeys]).options;export{destinationProviderSchema,githubReleaseSourceSchema,releaseDestinationIdEnvKeys,releaseDestinationMetadataSchema,releaseSourceIdEnvKeys,releaseSourceMetadataSchema,sourceProviderSchema,vercelReleaseDestinationSchema};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const cliIntegration=zod.z.object({name:zod.z.literal(`cli`),metadata:zod.z.object({installationUrl:zod.z.string().nullable().default(null)})});exports.cliIntegration=cliIntegration;
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/platforms/cli.d.ts
4
+ declare const cliIntegration: z.ZodObject<{
5
+ name: z.ZodLiteral<"cli">;
6
+ metadata: z.ZodObject<{
7
+ installationUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
+ }, z.core.$strip>;
9
+ }, z.core.$strip>;
10
+ //#endregion
11
+ export { cliIntegration };
12
+ //# sourceMappingURL=cli.d.cts.map
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/platforms/cli.d.ts
4
+ declare const cliIntegration: z.ZodObject<{
5
+ name: z.ZodLiteral<"cli">;
6
+ metadata: z.ZodObject<{
7
+ installationUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
+ }, z.core.$strip>;
9
+ }, z.core.$strip>;
10
+ //#endregion
11
+ export { cliIntegration };
12
+ //# sourceMappingURL=cli.d.mts.map
@@ -0,0 +1,2 @@
1
+ import{z}from"zod";const cliIntegration=z.object({name:z.literal(`cli`),metadata:z.object({installationUrl:z.string().nullable().default(null)})});export{cliIntegration};
2
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const githubSourceIdEnvKeys=zod.z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubIntegration=zod.z.object({name:zod.z.literal(`github`),metadata:zod.z.object({accountType:zod.z.string(),avatarUrl:zod.z.string().nullable().default(null),repositories:zod.z.record(zod.z.string(),zod.z.string()),installationUrl:zod.z.string().nullable()})});exports.githubIntegration=githubIntegration,exports.githubSourceIdEnvKeys=githubSourceIdEnvKeys;
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/platforms/github.d.ts
4
+ declare const githubSourceIdEnvKeys: ("GITHUB_SHA" | "VERCEL_GIT_COMMIT_SHA")[];
5
+ declare const githubIntegration: z.ZodObject<{
6
+ name: z.ZodLiteral<"github">;
7
+ metadata: z.ZodObject<{
8
+ accountType: z.ZodString;
9
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
+ repositories: z.ZodRecord<z.ZodString, z.ZodString>;
11
+ installationUrl: z.ZodNullable<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ }, z.core.$strip>;
14
+ //#endregion
15
+ export { githubIntegration, githubSourceIdEnvKeys };
16
+ //# sourceMappingURL=github.d.cts.map
@@ -12,4 +12,5 @@ declare const githubIntegration: z.ZodObject<{
12
12
  }, z.core.$strip>;
13
13
  }, z.core.$strip>;
14
14
  //#endregion
15
- export { githubIntegration, githubSourceIdEnvKeys };
15
+ export { githubIntegration, githubSourceIdEnvKeys };
16
+ //# sourceMappingURL=github.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,n=e.object({name:e.literal(`github`),metadata:e.object({accountType:e.string(),avatarUrl:e.string().nullable().default(null),repositories:e.record(e.string(),e.string()),installationUrl:e.string().nullable()})});export{n as githubIntegration,t as githubSourceIdEnvKeys};
1
+ import{z}from"zod";const githubSourceIdEnvKeys=z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubIntegration=z.object({name:z.literal(`github`),metadata:z.object({accountType:z.string(),avatarUrl:z.string().nullable().default(null),repositories:z.record(z.string(),z.string()),installationUrl:z.string().nullable()})});export{githubIntegration,githubSourceIdEnvKeys};
2
+ //# sourceMappingURL=github.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const routableCategorySchema=zod.z.enum([`problems`,`team`,`collaboration`]),slackChatRoutingEntrySchema=zod.z.object({channelId:zod.z.string(),channelName:zod.z.string()}),slackIntegration=zod.z.object({name:zod.z.literal(`slack`),metadata:zod.z.object({teamId:zod.z.string(),teamName:zod.z.string(),installationUrl:zod.z.string().nullable(),chatRouting:zod.z.partialRecord(routableCategorySchema,slackChatRoutingEntrySchema).default({})})});exports.routableCategorySchema=routableCategorySchema,exports.slackChatRoutingEntrySchema=slackChatRoutingEntrySchema,exports.slackIntegration=slackIntegration;
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/platforms/slack.d.ts
4
+ declare const routableCategorySchema: z.ZodEnum<{
5
+ collaboration: "collaboration";
6
+ problems: "problems";
7
+ team: "team";
8
+ }>;
9
+ type RoutableCategory = z.infer<typeof routableCategorySchema>;
10
+ declare const slackChatRoutingEntrySchema: z.ZodObject<{
11
+ channelId: z.ZodString;
12
+ channelName: z.ZodString;
13
+ }, z.core.$strip>;
14
+ type SlackChatRoutingEntry = z.infer<typeof slackChatRoutingEntrySchema>;
15
+ declare const slackIntegration: z.ZodObject<{
16
+ name: z.ZodLiteral<"slack">;
17
+ metadata: z.ZodObject<{
18
+ teamId: z.ZodString;
19
+ teamName: z.ZodString;
20
+ installationUrl: z.ZodNullable<z.ZodString>;
21
+ chatRouting: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
22
+ collaboration: "collaboration";
23
+ problems: "problems";
24
+ team: "team";
25
+ }> & z.core.$partial, z.ZodObject<{
26
+ channelId: z.ZodString;
27
+ channelName: z.ZodString;
28
+ }, z.core.$strip>>>;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>;
31
+ //#endregion
32
+ export { RoutableCategory, SlackChatRoutingEntry, routableCategorySchema, slackChatRoutingEntrySchema, slackIntegration };
33
+ //# sourceMappingURL=slack.d.cts.map
@@ -29,4 +29,5 @@ declare const slackIntegration: z.ZodObject<{
29
29
  }, z.core.$strip>;
30
30
  }, z.core.$strip>;
31
31
  //#endregion
32
- export { RoutableCategory, SlackChatRoutingEntry, routableCategorySchema, slackChatRoutingEntrySchema, slackIntegration };
32
+ export { RoutableCategory, SlackChatRoutingEntry, routableCategorySchema, slackChatRoutingEntrySchema, slackIntegration };
33
+ //# sourceMappingURL=slack.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`problems`,`team`,`collaboration`]),n=e.object({channelId:e.string(),channelName:e.string()}),r=e.object({name:e.literal(`slack`),metadata:e.object({teamId:e.string(),teamName:e.string(),installationUrl:e.string().nullable(),chatRouting:e.partialRecord(t,n).default({})})});export{t as routableCategorySchema,n as slackChatRoutingEntrySchema,r as slackIntegration};
1
+ import{z}from"zod";const routableCategorySchema=z.enum([`problems`,`team`,`collaboration`]),slackChatRoutingEntrySchema=z.object({channelId:z.string(),channelName:z.string()}),slackIntegration=z.object({name:z.literal(`slack`),metadata:z.object({teamId:z.string(),teamName:z.string(),installationUrl:z.string().nullable(),chatRouting:z.partialRecord(routableCategorySchema,slackChatRoutingEntrySchema).default({})})});export{routableCategorySchema,slackChatRoutingEntrySchema,slackIntegration};
2
+ //# sourceMappingURL=slack.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const vercelDestinationIdEnvKeys=zod.z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=zod.z.object({avatar:zod.z.string().nullable().default(null),name:zod.z.string().nullable().default(null),installationUrl:zod.z.string().nullable(),projects:zod.z.record(zod.z.string(),zod.z.string()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`team`),id:zod.z.string(),slug:zod.z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`user`),id:zod.z.string(),username:zod.z.string(),email:zod.z.string()}),vercelMetadataSchema=zod.z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=zod.z.object({name:zod.z.literal(`vercel`),metadata:vercelMetadataSchema});exports.vercelDestinationIdEnvKeys=vercelDestinationIdEnvKeys,exports.vercelIntegration=vercelIntegration,exports.vercelTeamMetadata=vercelTeamMetadata,exports.vercelUserMetadata=vercelUserMetadata;
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/integrations/platforms/vercel.d.ts
4
+ declare const vercelDestinationIdEnvKeys: "VERCEL_DEPLOYMENT_ID"[];
5
+ declare const vercelTeamMetadata: z.ZodObject<{
6
+ avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
7
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
+ installationUrl: z.ZodNullable<z.ZodString>;
9
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
10
+ accountType: z.ZodLiteral<"team">;
11
+ id: z.ZodString;
12
+ slug: z.ZodString;
13
+ }, z.core.$strip>;
14
+ declare const vercelUserMetadata: z.ZodObject<{
15
+ avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
16
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
+ installationUrl: z.ZodNullable<z.ZodString>;
18
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
19
+ accountType: z.ZodLiteral<"user">;
20
+ id: z.ZodString;
21
+ username: z.ZodString;
22
+ email: z.ZodString;
23
+ }, z.core.$strip>;
24
+ declare const vercelIntegration: z.ZodObject<{
25
+ name: z.ZodLiteral<"vercel">;
26
+ metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
28
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
+ installationUrl: z.ZodNullable<z.ZodString>;
30
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ accountType: z.ZodLiteral<"team">;
32
+ id: z.ZodString;
33
+ slug: z.ZodString;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
+ name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
+ installationUrl: z.ZodNullable<z.ZodString>;
38
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
39
+ accountType: z.ZodLiteral<"user">;
40
+ id: z.ZodString;
41
+ username: z.ZodString;
42
+ email: z.ZodString;
43
+ }, z.core.$strip>], "accountType">;
44
+ }, z.core.$strip>;
45
+ //#endregion
46
+ export { vercelDestinationIdEnvKeys, vercelIntegration, vercelTeamMetadata, vercelUserMetadata };
47
+ //# sourceMappingURL=vercel.d.cts.map
@@ -43,4 +43,5 @@ declare const vercelIntegration: z.ZodObject<{
43
43
  }, z.core.$strip>], "accountType">;
44
44
  }, z.core.$strip>;
45
45
  //#endregion
46
- export { vercelDestinationIdEnvKeys, vercelIntegration, vercelTeamMetadata, vercelUserMetadata };
46
+ export { vercelDestinationIdEnvKeys, vercelIntegration, vercelTeamMetadata, vercelUserMetadata };
47
+ //# sourceMappingURL=vercel.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.enum([`VERCEL_DEPLOYMENT_ID`]).options,n=e.object({avatar:e.string().nullable().default(null),name:e.string().nullable().default(null),installationUrl:e.string().nullable(),projects:e.record(e.string(),e.string()).default({})}),r=n.extend({accountType:e.literal(`team`),id:e.string(),slug:e.string()}),i=n.extend({accountType:e.literal(`user`),id:e.string(),username:e.string(),email:e.string()}),a=e.discriminatedUnion(`accountType`,[r,i]),o=e.object({name:e.literal(`vercel`),metadata:a});export{t as vercelDestinationIdEnvKeys,o as vercelIntegration,r as vercelTeamMetadata,i as vercelUserMetadata};
1
+ import{z}from"zod";const vercelDestinationIdEnvKeys=z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=z.object({avatar:z.string().nullable().default(null),name:z.string().nullable().default(null),installationUrl:z.string().nullable(),projects:z.record(z.string(),z.string()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:z.literal(`team`),id:z.string(),slug:z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:z.literal(`user`),id:z.string(),username:z.string(),email:z.string()}),vercelMetadataSchema=z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=z.object({name:z.literal(`vercel`),metadata:vercelMetadataSchema});export{vercelDestinationIdEnvKeys,vercelIntegration,vercelTeamMetadata,vercelUserMetadata};
2
+ //# sourceMappingURL=vercel.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_integrations_index=require("../integrations/index.cjs"),require_releases_slug=require("./slug.cjs");let zod=require("zod");const releaseStatusSchema=zod.z.enum([`pending`,`building`,`ready`,`errored`,`canceled`]).meta({id:`ReleaseStatus`,title:`ReleaseStatus`}),orgRefSchema=zod.z.object({id:zod.z.string(),slug:zod.z.string()}).meta({id:`OrgRef`,title:`OrgRef`}),surfaceRefSchema=zod.z.object({id:zod.z.string(),slug:zod.z.string()}).meta({id:`SurfaceRef`,title:`SurfaceRef`}),createReleaseRequest=zod.z.object({source:require_integrations_index.releaseSourceMetadataSchema,destination:require_integrations_index.releaseDestinationMetadataSchema.nullable(),buildId:zod.z.string(),slug:zod.z.string().optional(),producerVersion:zod.z.string().optional()}).meta({id:`CreateReleaseRequest`,title:`CreateReleaseRequest`,description:`Request body for creating a release.`}),createReleaseResponse=zod.z.object({org:orgRefSchema,surface:surfaceRefSchema,source:zod.z.object({id:zod.z.string()}).meta({id:`ReleaseSourceRef`,title:`ReleaseSourceRef`}),destination:zod.z.object({id:zod.z.string(),slug:require_releases_slug.releaseSlugSchema,environment:zod.z.string().nullable()}).meta({id:`ReleaseDestinationRef`,title:`ReleaseDestinationRef`}),build:zod.z.object({hash:zod.z.string()}).meta({id:`ReleaseBuildRef`,title:`ReleaseBuildRef`})}).meta({id:`CreateReleaseResponse`,title:`CreateReleaseResponse`,description:`Response body returned after creating a release.`});exports.createReleaseRequest=createReleaseRequest,exports.createReleaseResponse=createReleaseResponse,exports.releaseStatusSchema=releaseStatusSchema;
@@ -0,0 +1,57 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/releases/definition.d.ts
4
+ declare const releaseStatusSchema: z.ZodEnum<{
5
+ building: "building";
6
+ canceled: "canceled";
7
+ errored: "errored";
8
+ pending: "pending";
9
+ ready: "ready";
10
+ }>;
11
+ type ReleaseStatus = z.infer<typeof releaseStatusSchema>;
12
+ declare const createReleaseRequest: z.ZodObject<{
13
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
14
+ provider: z.ZodLiteral<"github">;
15
+ commitMessage: z.ZodString;
16
+ branch: z.ZodString;
17
+ commitSha: z.ZodNullable<z.ZodString>;
18
+ }, z.core.$strip>], "provider">;
19
+ destination: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
20
+ provider: z.ZodLiteral<"vercel">;
21
+ destinationReleaseId: z.ZodNullable<z.ZodString>;
22
+ environment: z.ZodNullable<z.ZodString>;
23
+ deploymentId: z.ZodNullable<z.ZodString>;
24
+ deploymentUrl: z.ZodNullable<z.ZodString>;
25
+ environmentName: z.ZodNullable<z.ZodString>;
26
+ environmentTarget: z.ZodNullable<z.ZodString>;
27
+ }, z.core.$strip>], "provider">>;
28
+ buildId: z.ZodString;
29
+ slug: z.ZodOptional<z.ZodString>;
30
+ producerVersion: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ type CreateReleaseRequest = z.infer<typeof createReleaseRequest>;
33
+ declare const createReleaseResponse: z.ZodObject<{
34
+ org: z.ZodObject<{
35
+ id: z.ZodString;
36
+ slug: z.ZodString;
37
+ }, z.core.$strip>;
38
+ surface: z.ZodObject<{
39
+ id: z.ZodString;
40
+ slug: z.ZodString;
41
+ }, z.core.$strip>;
42
+ source: z.ZodObject<{
43
+ id: z.ZodString;
44
+ }, z.core.$strip>;
45
+ destination: z.ZodObject<{
46
+ id: z.ZodString;
47
+ slug: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
48
+ environment: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ build: z.ZodObject<{
51
+ hash: z.ZodString;
52
+ }, z.core.$strip>;
53
+ }, z.core.$strip>;
54
+ type CreateReleaseResponse = z.infer<typeof createReleaseResponse>;
55
+ //#endregion
56
+ export { CreateReleaseRequest, CreateReleaseResponse, ReleaseStatus, createReleaseRequest, createReleaseResponse, releaseStatusSchema };
57
+ //# sourceMappingURL=definition.d.cts.map
@@ -53,4 +53,5 @@ declare const createReleaseResponse: z.ZodObject<{
53
53
  }, z.core.$strip>;
54
54
  type CreateReleaseResponse = z.infer<typeof createReleaseResponse>;
55
55
  //#endregion
56
- export { CreateReleaseRequest, CreateReleaseResponse, ReleaseStatus, createReleaseRequest, createReleaseResponse, releaseStatusSchema };
56
+ export { CreateReleaseRequest, CreateReleaseResponse, ReleaseStatus, createReleaseRequest, createReleaseResponse, releaseStatusSchema };
57
+ //# sourceMappingURL=definition.d.mts.map
@@ -1 +1,2 @@
1
- import{releaseDestinationMetadataSchema as e,releaseSourceMetadataSchema as t}from"../integrations/index.mjs";import{releaseSlugSchema as n}from"./slug.mjs";import{z as r}from"zod";const i=r.enum([`pending`,`building`,`ready`,`errored`,`canceled`]).meta({id:`ReleaseStatus`,title:`ReleaseStatus`}),a=r.object({id:r.string(),slug:r.string()}).meta({id:`OrgRef`,title:`OrgRef`}),o=r.object({id:r.string(),slug:r.string()}).meta({id:`SurfaceRef`,title:`SurfaceRef`}),s=r.object({source:t,destination:e.nullable(),buildId:r.string(),slug:r.string().optional(),producerVersion:r.string().optional()}).meta({id:`CreateReleaseRequest`,title:`CreateReleaseRequest`,description:`Request body for creating a release.`}),c=r.object({org:a,surface:o,source:r.object({id:r.string()}).meta({id:`ReleaseSourceRef`,title:`ReleaseSourceRef`}),destination:r.object({id:r.string(),slug:n,environment:r.string().nullable()}).meta({id:`ReleaseDestinationRef`,title:`ReleaseDestinationRef`}),build:r.object({hash:r.string()}).meta({id:`ReleaseBuildRef`,title:`ReleaseBuildRef`})}).meta({id:`CreateReleaseResponse`,title:`CreateReleaseResponse`,description:`Response body returned after creating a release.`});export{s as createReleaseRequest,c as createReleaseResponse,i as releaseStatusSchema};
1
+ import{releaseDestinationMetadataSchema,releaseSourceMetadataSchema}from"../integrations/index.mjs";import{releaseSlugSchema}from"./slug.mjs";import{z}from"zod";const releaseStatusSchema=z.enum([`pending`,`building`,`ready`,`errored`,`canceled`]).meta({id:`ReleaseStatus`,title:`ReleaseStatus`}),orgRefSchema=z.object({id:z.string(),slug:z.string()}).meta({id:`OrgRef`,title:`OrgRef`}),surfaceRefSchema=z.object({id:z.string(),slug:z.string()}).meta({id:`SurfaceRef`,title:`SurfaceRef`}),createReleaseRequest=z.object({source:releaseSourceMetadataSchema,destination:releaseDestinationMetadataSchema.nullable(),buildId:z.string(),slug:z.string().optional(),producerVersion:z.string().optional()}).meta({id:`CreateReleaseRequest`,title:`CreateReleaseRequest`,description:`Request body for creating a release.`}),createReleaseResponse=z.object({org:orgRefSchema,surface:surfaceRefSchema,source:z.object({id:z.string()}).meta({id:`ReleaseSourceRef`,title:`ReleaseSourceRef`}),destination:z.object({id:z.string(),slug:releaseSlugSchema,environment:z.string().nullable()}).meta({id:`ReleaseDestinationRef`,title:`ReleaseDestinationRef`}),build:z.object({hash:z.string()}).meta({id:`ReleaseBuildRef`,title:`ReleaseBuildRef`})}).meta({id:`CreateReleaseResponse`,title:`CreateReleaseResponse`,description:`Response body returned after creating a release.`});export{createReleaseRequest,createReleaseResponse,releaseStatusSchema};
2
+ //# sourceMappingURL=definition.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const SLUG_PREFIX=`rel_`,releaseSlugSchema=zod.z.templateLiteral([SLUG_PREFIX,zod.z.string().regex(/^[0-9a-f]{16}$/)]).brand(),LOCAL_DEV_RELEASE_SLUG=releaseSlugSchema.parse(`rel_0000000000000000`);function deriveReleaseSlug(commitSha){return releaseSlugSchema.parse(`${SLUG_PREFIX}${commitSha.toLowerCase().slice(0,16)}`)}exports.LOCAL_DEV_RELEASE_SLUG=LOCAL_DEV_RELEASE_SLUG,exports.deriveReleaseSlug=deriveReleaseSlug,exports.releaseSlugSchema=releaseSlugSchema;
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/releases/slug.d.ts
4
+ declare const releaseSlugSchema: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
5
+ type ReleaseSlug = z.infer<typeof releaseSlugSchema>;
6
+ declare const LOCAL_DEV_RELEASE_SLUG: `rel_${string}` & z.core.$brand<"ReleaseSlug">;
7
+ /**
8
+ * Derives a release slug from a commit SHA. Both ends of the wire — the
9
+ * build step that stamps the slug into the bundle, and any server-side
10
+ * upsert that reaches the same commit — compute the same `rel_<16hex>`
11
+ * shape with no shared secret, so no round-trip negotiation is needed.
12
+ *
13
+ * Git commit SHAs are uniformly distributed hex; the leading 16 chars give
14
+ * 64 bits of entropy, which is the same width the collector regex enforces.
15
+ * Cross-surface collisions on the same commit are intentional (eyeball-
16
+ * correlate slug to commit) — lookups are scoped by `(surfaceId, slug)`.
17
+ *
18
+ * Return type is `ReleaseSlug` (template-literal branded) so consumers
19
+ * can pass the result into branded sites without a re-validate.
20
+ */
21
+ declare function deriveReleaseSlug(commitSha: string): ReleaseSlug;
22
+ //#endregion
23
+ export { LOCAL_DEV_RELEASE_SLUG, ReleaseSlug, deriveReleaseSlug, releaseSlugSchema };
24
+ //# sourceMappingURL=slug.d.cts.map
@@ -3,6 +3,7 @@ import { z } from "zod";
3
3
  //#region src/releases/slug.d.ts
4
4
  declare const releaseSlugSchema: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
5
5
  type ReleaseSlug = z.infer<typeof releaseSlugSchema>;
6
+ declare const LOCAL_DEV_RELEASE_SLUG: `rel_${string}` & z.core.$brand<"ReleaseSlug">;
6
7
  /**
7
8
  * Derives a release slug from a commit SHA. Both ends of the wire — the
8
9
  * build step that stamps the slug into the bundle, and any server-side
@@ -19,4 +20,5 @@ type ReleaseSlug = z.infer<typeof releaseSlugSchema>;
19
20
  */
20
21
  declare function deriveReleaseSlug(commitSha: string): ReleaseSlug;
21
22
  //#endregion
22
- export { ReleaseSlug, deriveReleaseSlug, releaseSlugSchema };
23
+ export { LOCAL_DEV_RELEASE_SLUG, ReleaseSlug, deriveReleaseSlug, releaseSlugSchema };
24
+ //# sourceMappingURL=slug.d.mts.map
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=`rel_`,n=e.templateLiteral([t,e.string().regex(/^[0-9a-f]{16}$/)]).brand();function r(e){return n.parse(`${t}${e.toLowerCase().slice(0,16)}`)}export{r as deriveReleaseSlug,n as releaseSlugSchema};
1
+ import{z}from"zod";const SLUG_PREFIX=`rel_`,releaseSlugSchema=z.templateLiteral([SLUG_PREFIX,z.string().regex(/^[0-9a-f]{16}$/)]).brand(),LOCAL_DEV_RELEASE_SLUG=releaseSlugSchema.parse(`rel_0000000000000000`);function deriveReleaseSlug(commitSha){return releaseSlugSchema.parse(`${SLUG_PREFIX}${commitSha.toLowerCase().slice(0,16)}`)}export{LOCAL_DEV_RELEASE_SLUG,deriveReleaseSlug,releaseSlugSchema};
2
+ //# sourceMappingURL=slug.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const interfereEnvValueSchema=require("zod").z.string().trim().min(1);function parseEnvValue(value){let parsed=interfereEnvValueSchema.safeParse(value);return parsed.success?parsed.data:null}function readFirstEnvValue(env,keys){for(let key of keys){let value=parseEnvValue(env[key]);if(value!==null)return value}return null}exports.parseEnvValue=parseEnvValue,exports.readFirstEnvValue=readFirstEnvValue;
@@ -0,0 +1,6 @@
1
+ //#region src/sdk/env.d.ts
2
+ declare function parseEnvValue(value: unknown): string | null;
3
+ declare function readFirstEnvValue(env: Record<string, string | undefined>, keys: readonly string[]): string | null;
4
+ //#endregion
5
+ export { parseEnvValue, readFirstEnvValue };
6
+ //# sourceMappingURL=env.d.cts.map
@@ -2,4 +2,5 @@
2
2
  declare function parseEnvValue(value: unknown): string | null;
3
3
  declare function readFirstEnvValue(env: Record<string, string | undefined>, keys: readonly string[]): string | null;
4
4
  //#endregion
5
- export { parseEnvValue, readFirstEnvValue };
5
+ export { parseEnvValue, readFirstEnvValue };
6
+ //# sourceMappingURL=env.d.mts.map
package/dist/sdk/env.mjs CHANGED
@@ -1 +1,2 @@
1
- import{z as e}from"zod";const t=e.string().trim().min(1);function n(e){let n=t.safeParse(e);return n.success?n.data:null}function r(e,t){for(let r of t){let t=n(e[r]);if(t!==null)return t}return null}export{n as parseEnvValue,r as readFirstEnvValue};
1
+ import{z}from"zod";const interfereEnvValueSchema=z.string().trim().min(1);function parseEnvValue(value){let parsed=interfereEnvValueSchema.safeParse(value);return parsed.success?parsed.data:null}function readFirstEnvValue(env,keys){for(let key of keys){let value=parseEnvValue(env[key]);if(value!==null)return value}return null}export{parseEnvValue,readFirstEnvValue};
2
+ //# sourceMappingURL=env.mjs.map
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod"),_data_session=require("#data/session"),_sdk_plugins_context_browser=require("#sdk/plugins/context/browser"),_sdk_plugins_context_edge=require("#sdk/plugins/context/edge"),_sdk_plugins_context_next=require("#sdk/plugins/context/next"),_sdk_plugins_context_node=require("#sdk/plugins/context/node"),_sdk_plugins_payload_errors=require("#sdk/plugins/payload/errors"),_sdk_plugins_payload_page_events=require("#sdk/plugins/payload/page-events"),_sdk_plugins_payload_rage_click=require("#sdk/plugins/payload/rage-click"),_sdk_plugins_payload_replay=require("#sdk/plugins/payload/replay"),_sdk_runtime=require("#sdk/runtime");const sessionSourceSchema=zod.z.enum([`header`,`async_context`,`fallback`,`client`]).optional().meta({id:`SessionSource`,title:`SessionSource`,description:`How the server resolved the sessionId for this envelope.`}),envelopeContextSchema=zod.z.discriminatedUnion(`runtime`,[_sdk_plugins_context_browser.browserContextSchema,_sdk_plugins_context_next.nextjsContextSchema,_sdk_plugins_context_edge.edgeContextSchema,_sdk_plugins_context_node.nodeContextSchema]).meta({id:`EnvelopeContext`,title:`EnvelopeContext`,description:`Runtime-specific request context attached to every envelope.`}),envelopeHeadersShape={buildId:zod.z.string(),clientTs:zod.z.int(),context:envelopeContextSchema.optional(),environment:_sdk_runtime.envSchema,producerVersion:zod.z.string().optional(),releaseId:zod.z.string().nullable(),runtime:_sdk_runtime.runtimeSchema,sdkStack:zod.z.array(zod.z.string()).optional(),sessionId:_data_session.sessionIdSchema.nullable(),sessionSource:sessionSourceSchema,uuid:zod.z.uuidv7(),v:zod.z.literal(0)},errorEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`error`),payload:_sdk_plugins_payload_errors.errorEnvelopePayloadSchema}).meta({id:`ErrorEnvelope`,title:`ErrorEnvelope`}),pageviewEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`pageview`),payload:_sdk_plugins_payload_page_events.pageviewPayloadSchema}).meta({id:`PageviewEnvelope`,title:`PageviewEnvelope`}),pageleaveEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`pageleave`),payload:_sdk_plugins_payload_page_events.pageleavePayloadSchema}).meta({id:`PageleaveEnvelope`,title:`PageleaveEnvelope`}),uiEventEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`ui_event`),payload:_sdk_plugins_payload_page_events.uiEventPayloadSchema}).meta({id:`UiEventEnvelope`,title:`UiEventEnvelope`}),replayChunkEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`replay_chunk`),payload:_sdk_plugins_payload_replay.replayChunkPayloadSchema}).meta({id:`ReplayChunkEnvelope`,title:`ReplayChunkEnvelope`}),rageClickEnvelopeSchema=zod.z.object({...envelopeHeadersShape,type:zod.z.literal(`rage_click`),payload:_sdk_plugins_payload_rage_click.rageClickPayloadSchema}).meta({id:`RageClickEnvelope`,title:`RageClickEnvelope`}),envelopeSchema=zod.z.discriminatedUnion(`type`,[errorEnvelopeSchema,pageviewEnvelopeSchema,pageleaveEnvelopeSchema,uiEventEnvelopeSchema,replayChunkEnvelopeSchema,rageClickEnvelopeSchema]).meta({id:`Envelope`,title:`Envelope`,description:`A single event envelope accepted by the collector.`});exports.envelopeContextSchema=envelopeContextSchema,exports.envelopeSchema=envelopeSchema,exports.errorEnvelopeSchema=errorEnvelopeSchema,exports.pageleaveEnvelopeSchema=pageleaveEnvelopeSchema,exports.pageviewEnvelopeSchema=pageviewEnvelopeSchema,exports.rageClickEnvelopeSchema=rageClickEnvelopeSchema,exports.replayChunkEnvelopeSchema=replayChunkEnvelopeSchema,exports.sessionSourceSchema=sessionSourceSchema,exports.uiEventEnvelopeSchema=uiEventEnvelopeSchema;