@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
@@ -1,57 +1,2 @@
1
- import { githubSourceIdEnvKeys } from "./platforms/github.mjs";
2
- import { vercelDestinationIdEnvKeys } from "./platforms/vercel.mjs";
3
- import { z } from "zod";
4
- //#region src/integrations/index.ts
5
- const githubReleaseSourceSchema = z.object({
6
- provider: z.literal("github"),
7
- commitMessage: z.string(),
8
- branch: z.string(),
9
- commitSha: z.string().nullable()
10
- }).meta({
11
- id: "GithubReleaseSource",
12
- title: "GithubReleaseSource",
13
- description: "Release source metadata coming from GitHub."
14
- });
15
- const releaseSourceMetadataSchema = z.discriminatedUnion("provider", [githubReleaseSourceSchema]).meta({
16
- id: "ReleaseSource",
17
- title: "ReleaseSource"
18
- });
19
- const vercelReleaseDestinationSchema = z.object({
20
- provider: z.literal("vercel"),
21
- destinationReleaseId: z.string().nullable(),
22
- environment: z.string().nullable(),
23
- deploymentId: z.string().nullable(),
24
- deploymentUrl: z.string().nullable(),
25
- environmentName: z.string().nullable(),
26
- environmentTarget: z.string().nullable()
27
- }).meta({
28
- id: "VercelReleaseDestination",
29
- title: "VercelReleaseDestination",
30
- description: "Release destination metadata for a Vercel deployment."
31
- });
32
- const releaseDestinationMetadataSchema = z.discriminatedUnion("provider", [vercelReleaseDestinationSchema]).meta({
33
- id: "ReleaseDestination",
34
- title: "ReleaseDestination"
35
- });
36
- const sourceProviderSchema = z.enum(["github"]).meta({
37
- id: "SourceProvider",
38
- title: "SourceProvider"
39
- });
40
- const destinationProviderSchema = z.enum(["vercel"]).meta({
41
- id: "DestinationProvider",
42
- title: "DestinationProvider"
43
- });
44
- const releaseSourceIdEnvKeys = z.enum([
45
- "NEXT_PUBLIC_INTERFERE_BUILD_ID",
46
- "INTERFERE_SOURCE_ID",
47
- "NEXT_BUILD_ID",
48
- ...githubSourceIdEnvKeys
49
- ]).options;
50
- const releaseDestinationIdEnvKeys = z.enum([
51
- "NEXT_PUBLIC_INTERFERE_RELEASE_ID",
52
- "INTERFERE_DESTINATION_ID",
53
- ...vercelDestinationIdEnvKeys,
54
- ...githubSourceIdEnvKeys
55
- ]).options;
56
- //#endregion
57
- export { destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, 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,13 +1,2 @@
1
- import { z } from "zod";
2
- const githubSourceIdEnvKeys = z.enum(["VERCEL_GIT_COMMIT_SHA", "GITHUB_SHA"]).options;
3
- const githubIntegration = z.object({
4
- name: z.literal("github"),
5
- metadata: z.object({
6
- accountType: z.string(),
7
- avatarUrl: z.string().nullable().default(null),
8
- repositories: z.record(z.string(), z.string()),
9
- installationUrl: z.string().nullable()
10
- })
11
- });
12
- //#endregion
13
- export { githubIntegration, 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
@@ -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.mts.map
@@ -0,0 +1,2 @@
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,26 +1,2 @@
1
- import { z } from "zod";
2
- const vercelDestinationIdEnvKeys = z.enum(["VERCEL_DEPLOYMENT_ID"]).options;
3
- const vercelMetadataBase = z.object({
4
- avatar: z.string().nullable().default(null),
5
- name: z.string().nullable().default(null),
6
- installationUrl: z.string().nullable(),
7
- projects: z.record(z.string(), z.string()).default({})
8
- });
9
- const vercelTeamMetadata = vercelMetadataBase.extend({
10
- accountType: z.literal("team"),
11
- id: z.string(),
12
- slug: z.string()
13
- });
14
- const vercelUserMetadata = vercelMetadataBase.extend({
15
- accountType: z.literal("user"),
16
- id: z.string(),
17
- username: z.string(),
18
- email: z.string()
19
- });
20
- const vercelMetadataSchema = z.discriminatedUnion("accountType", [vercelTeamMetadata, vercelUserMetadata]);
21
- const vercelIntegration = z.object({
22
- name: z.literal("vercel"),
23
- metadata: vercelMetadataSchema
24
- });
25
- //#endregion
26
- export { vercelDestinationIdEnvKeys, vercelIntegration, vercelTeamMetadata, 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
@@ -26,6 +26,7 @@ declare const createReleaseRequest: z.ZodObject<{
26
26
  environmentTarget: z.ZodNullable<z.ZodString>;
27
27
  }, z.core.$strip>], "provider">>;
28
28
  buildId: z.ZodString;
29
+ slug: z.ZodOptional<z.ZodString>;
29
30
  producerVersion: z.ZodOptional<z.ZodString>;
30
31
  }, z.core.$strip>;
31
32
  type CreateReleaseRequest = z.infer<typeof createReleaseRequest>;
@@ -43,7 +44,7 @@ declare const createReleaseResponse: z.ZodObject<{
43
44
  }, z.core.$strip>;
44
45
  destination: z.ZodObject<{
45
46
  id: z.ZodString;
46
- slug: z.ZodString;
47
+ slug: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
47
48
  environment: z.ZodNullable<z.ZodString>;
48
49
  }, z.core.$strip>;
49
50
  build: z.ZodObject<{
@@ -52,4 +53,5 @@ declare const createReleaseResponse: z.ZodObject<{
52
53
  }, z.core.$strip>;
53
54
  type CreateReleaseResponse = z.infer<typeof createReleaseResponse>;
54
55
  //#endregion
55
- export { CreateReleaseRequest, CreateReleaseResponse, ReleaseStatus, createReleaseRequest, createReleaseResponse, releaseStatusSchema };
56
+ export { CreateReleaseRequest, CreateReleaseResponse, ReleaseStatus, createReleaseRequest, createReleaseResponse, releaseStatusSchema };
57
+ //# sourceMappingURL=definition.d.mts.map
@@ -1,63 +1,2 @@
1
- import { releaseDestinationMetadataSchema, releaseSourceMetadataSchema } from "../integrations/index.mjs";
2
- import { z } from "zod";
3
- //#region src/releases/definition.ts
4
- const releaseStatusSchema = z.enum([
5
- "pending",
6
- "building",
7
- "ready",
8
- "errored",
9
- "canceled"
10
- ]).meta({
11
- id: "ReleaseStatus",
12
- title: "ReleaseStatus"
13
- });
14
- const orgRefSchema = z.object({
15
- id: z.string(),
16
- slug: z.string()
17
- }).meta({
18
- id: "OrgRef",
19
- title: "OrgRef"
20
- });
21
- const surfaceRefSchema = z.object({
22
- id: z.string(),
23
- slug: z.string()
24
- }).meta({
25
- id: "SurfaceRef",
26
- title: "SurfaceRef"
27
- });
28
- const createReleaseRequest = z.object({
29
- source: releaseSourceMetadataSchema,
30
- destination: releaseDestinationMetadataSchema.nullable(),
31
- buildId: z.string(),
32
- producerVersion: z.string().optional()
33
- }).meta({
34
- id: "CreateReleaseRequest",
35
- title: "CreateReleaseRequest",
36
- description: "Request body for creating a release."
37
- });
38
- const createReleaseResponse = z.object({
39
- org: orgRefSchema,
40
- surface: surfaceRefSchema,
41
- source: z.object({ id: z.string() }).meta({
42
- id: "ReleaseSourceRef",
43
- title: "ReleaseSourceRef"
44
- }),
45
- destination: z.object({
46
- id: z.string(),
47
- slug: z.string(),
48
- environment: z.string().nullable()
49
- }).meta({
50
- id: "ReleaseDestinationRef",
51
- title: "ReleaseDestinationRef"
52
- }),
53
- build: z.object({ hash: z.string() }).meta({
54
- id: "ReleaseBuildRef",
55
- title: "ReleaseBuildRef"
56
- })
57
- }).meta({
58
- id: "CreateReleaseResponse",
59
- title: "CreateReleaseResponse",
60
- description: "Response body returned after creating a release."
61
- });
62
- //#endregion
63
- export { createReleaseRequest, createReleaseResponse, 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
@@ -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.mts.map
@@ -0,0 +1,2 @@
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,17 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/sdk/env.ts
3
- const interfereEnvValueSchema = z.string().trim().min(1);
4
- function parseEnvValue(value) {
5
- const parsed = interfereEnvValueSchema.safeParse(value);
6
- if (!parsed.success) return null;
7
- return parsed.data;
8
- }
9
- function readFirstEnvValue(env, keys) {
10
- for (const key of keys) {
11
- const value = parseEnvValue(env[key]);
12
- if (value !== null) return value;
13
- }
14
- return null;
15
- }
16
- //#endregion
17
- export { parseEnvValue, 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;