@interfere/types 9.0.3-canary.0 → 9.0.3-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
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>
13
+ <a href="https://interfere.ghe.com/interfere/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">
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_integrations_platforms_github=require("./platforms/github.cjs"),require_integrations_platforms_vercel=require("./platforms/vercel.cjs");let zod=require("zod");const githubReleaseSourceSchema=zod.z.object({provider:zod.z.literal(`github`),commitMessage:zod.z.string(),branch:zod.z.string(),commitSha:zod.z.string().nullable()}).meta({id:`GithubReleaseSource`,title:`GithubReleaseSource`,description:`Release source metadata coming from GitHub.`}),releaseSourceMetadataSchema=zod.z.discriminatedUnion(`provider`,[githubReleaseSourceSchema]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),vercelReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`vercel`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),deploymentId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable()}).meta({id:`VercelReleaseDestination`,title:`VercelReleaseDestination`,description:`Release destination metadata for a Vercel deployment.`}),releaseDestinationMetadataSchema=zod.z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),sourceProviderSchema=zod.z.enum([`github`]).meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=zod.z.enum([`vercel`]).meta({id:`DestinationProvider`,title:`DestinationProvider`}),releaseSourceIdEnvKeys=zod.z.enum([`NEXT_PUBLIC_INTERFERE_BUILD_ID`,`INTERFERE_SOURCE_ID`,`NEXT_BUILD_ID`,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options,releaseDestinationIdEnvKeys=zod.z.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...require_integrations_platforms_vercel.vercelDestinationIdEnvKeys,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options;exports.destinationProviderSchema=destinationProviderSchema,exports.githubReleaseSourceSchema=githubReleaseSourceSchema,exports.releaseDestinationIdEnvKeys=releaseDestinationIdEnvKeys,exports.releaseDestinationMetadataSchema=releaseDestinationMetadataSchema,exports.releaseSourceIdEnvKeys=releaseSourceIdEnvKeys,exports.releaseSourceMetadataSchema=releaseSourceMetadataSchema,exports.sourceProviderSchema=sourceProviderSchema,exports.vercelReleaseDestinationSchema=vercelReleaseDestinationSchema;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_integrations_platforms_github=require("./platforms/github.cjs"),require_integrations_platforms_vercel=require("./platforms/vercel.cjs");let zod=require("zod");const githubReleaseSourceSchema=zod.z.object({provider:zod.z.literal(`github`),commitMessage:zod.z.string(),branch:zod.z.string(),commitSha:zod.z.string().nullable(),runnerName:zod.z.string().nullable().optional(),runId:zod.z.string().nullable().optional(),runUrl:zod.z.string().nullable().optional()}).meta({id:`GithubReleaseSource`,title:`GithubReleaseSource`,description:`Release source metadata coming from GitHub.`}),cliReleaseSourceSchema=zod.z.object({provider:zod.z.literal(`cli`),commitSha:zod.z.string().nullable(),commitRef:zod.z.string().nullable(),commitMessage:zod.z.string().nullable(),commitUrl:zod.z.string().nullable(),runnerName:zod.z.string().nullable(),runId:zod.z.string().nullable(),runUrl:zod.z.string().nullable(),environment:zod.z.string().nullable().optional(),deploymentUrl:zod.z.string().nullable().optional()}).meta({id:`CliReleaseSource`,title:`CliReleaseSource`,description:`Release source metadata from the Interfere CLI.`}),releaseSourceMetadataSchema=zod.z.discriminatedUnion(`provider`,[githubReleaseSourceSchema,cliReleaseSourceSchema]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),vercelReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`vercel`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),deploymentId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable()}).meta({id:`VercelReleaseDestination`,title:`VercelReleaseDestination`,description:`Release destination metadata for a Vercel deployment.`}),releaseDestinationMetadataSchema=zod.z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),sourceProviderSchema=zod.z.enum([`github`]).meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=zod.z.enum([`vercel`]).meta({id:`DestinationProvider`,title:`DestinationProvider`}),releaseSourceIdEnvKeys=zod.z.enum([`NEXT_PUBLIC_INTERFERE_BUILD_ID`,`INTERFERE_SOURCE_ID`,`NEXT_BUILD_ID`,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options,releaseDestinationIdEnvKeys=zod.z.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...require_integrations_platforms_vercel.vercelDestinationIdEnvKeys,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options;exports.cliReleaseSourceSchema=cliReleaseSourceSchema,exports.destinationProviderSchema=destinationProviderSchema,exports.githubReleaseSourceSchema=githubReleaseSourceSchema,exports.releaseDestinationIdEnvKeys=releaseDestinationIdEnvKeys,exports.releaseDestinationMetadataSchema=releaseDestinationMetadataSchema,exports.releaseSourceIdEnvKeys=releaseSourceIdEnvKeys,exports.releaseSourceMetadataSchema=releaseSourceMetadataSchema,exports.sourceProviderSchema=sourceProviderSchema,exports.vercelReleaseDestinationSchema=vercelReleaseDestinationSchema;
@@ -6,12 +6,41 @@ declare const githubReleaseSourceSchema: z.ZodObject<{
6
6
  commitMessage: z.ZodString;
7
7
  branch: z.ZodString;
8
8
  commitSha: z.ZodNullable<z.ZodString>;
9
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ }, z.core.$strip>;
13
+ declare const cliReleaseSourceSchema: z.ZodObject<{
14
+ provider: z.ZodLiteral<"cli">;
15
+ commitSha: z.ZodNullable<z.ZodString>;
16
+ commitRef: z.ZodNullable<z.ZodString>;
17
+ commitMessage: z.ZodNullable<z.ZodString>;
18
+ commitUrl: z.ZodNullable<z.ZodString>;
19
+ runnerName: z.ZodNullable<z.ZodString>;
20
+ runId: z.ZodNullable<z.ZodString>;
21
+ runUrl: z.ZodNullable<z.ZodString>;
22
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
24
  }, z.core.$strip>;
10
25
  declare const releaseSourceMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
26
  provider: z.ZodLiteral<"github">;
12
27
  commitMessage: z.ZodString;
13
28
  branch: z.ZodString;
14
29
  commitSha: z.ZodNullable<z.ZodString>;
30
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ provider: z.ZodLiteral<"cli">;
35
+ commitSha: z.ZodNullable<z.ZodString>;
36
+ commitRef: z.ZodNullable<z.ZodString>;
37
+ commitMessage: z.ZodNullable<z.ZodString>;
38
+ commitUrl: z.ZodNullable<z.ZodString>;
39
+ runnerName: z.ZodNullable<z.ZodString>;
40
+ runId: z.ZodNullable<z.ZodString>;
41
+ runUrl: z.ZodNullable<z.ZodString>;
42
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
44
  }, z.core.$strip>], "provider">;
16
45
  type ReleaseSourceMetadata = z.infer<typeof releaseSourceMetadataSchema>;
17
46
  declare const vercelReleaseDestinationSchema: z.ZodObject<{
@@ -44,5 +73,5 @@ type DestinationProvider = z.infer<typeof destinationProviderSchema>;
44
73
  declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
45
74
  declare const releaseDestinationIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA")[];
46
75
  //#endregion
47
- export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
76
+ export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, cliReleaseSourceSchema, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
48
77
  //# sourceMappingURL=index.d.cts.map
@@ -6,12 +6,41 @@ declare const githubReleaseSourceSchema: z.ZodObject<{
6
6
  commitMessage: z.ZodString;
7
7
  branch: z.ZodString;
8
8
  commitSha: z.ZodNullable<z.ZodString>;
9
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ }, z.core.$strip>;
13
+ declare const cliReleaseSourceSchema: z.ZodObject<{
14
+ provider: z.ZodLiteral<"cli">;
15
+ commitSha: z.ZodNullable<z.ZodString>;
16
+ commitRef: z.ZodNullable<z.ZodString>;
17
+ commitMessage: z.ZodNullable<z.ZodString>;
18
+ commitUrl: z.ZodNullable<z.ZodString>;
19
+ runnerName: z.ZodNullable<z.ZodString>;
20
+ runId: z.ZodNullable<z.ZodString>;
21
+ runUrl: z.ZodNullable<z.ZodString>;
22
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
24
  }, z.core.$strip>;
10
25
  declare const releaseSourceMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
26
  provider: z.ZodLiteral<"github">;
12
27
  commitMessage: z.ZodString;
13
28
  branch: z.ZodString;
14
29
  commitSha: z.ZodNullable<z.ZodString>;
30
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ provider: z.ZodLiteral<"cli">;
35
+ commitSha: z.ZodNullable<z.ZodString>;
36
+ commitRef: z.ZodNullable<z.ZodString>;
37
+ commitMessage: z.ZodNullable<z.ZodString>;
38
+ commitUrl: z.ZodNullable<z.ZodString>;
39
+ runnerName: z.ZodNullable<z.ZodString>;
40
+ runId: z.ZodNullable<z.ZodString>;
41
+ runUrl: z.ZodNullable<z.ZodString>;
42
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
44
  }, z.core.$strip>], "provider">;
16
45
  type ReleaseSourceMetadata = z.infer<typeof releaseSourceMetadataSchema>;
17
46
  declare const vercelReleaseDestinationSchema: z.ZodObject<{
@@ -44,5 +73,5 @@ type DestinationProvider = z.infer<typeof destinationProviderSchema>;
44
73
  declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
45
74
  declare const releaseDestinationIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA")[];
46
75
  //#endregion
47
- export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
76
+ export { DestinationProvider, ReleaseDestinationMetadata, ReleaseSourceMetadata, SourceProvider, cliReleaseSourceSchema, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
48
77
  //# sourceMappingURL=index.d.mts.map
@@ -1,2 +1,2 @@
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};
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(),runnerName:z.string().nullable().optional(),runId:z.string().nullable().optional(),runUrl:z.string().nullable().optional()}).meta({id:`GithubReleaseSource`,title:`GithubReleaseSource`,description:`Release source metadata coming from GitHub.`}),cliReleaseSourceSchema=z.object({provider:z.literal(`cli`),commitSha:z.string().nullable(),commitRef:z.string().nullable(),commitMessage:z.string().nullable(),commitUrl:z.string().nullable(),runnerName:z.string().nullable(),runId:z.string().nullable(),runUrl:z.string().nullable(),environment:z.string().nullable().optional(),deploymentUrl:z.string().nullable().optional()}).meta({id:`CliReleaseSource`,title:`CliReleaseSource`,description:`Release source metadata from the Interfere CLI.`}),releaseSourceMetadataSchema=z.discriminatedUnion(`provider`,[githubReleaseSourceSchema,cliReleaseSourceSchema]).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{cliReleaseSourceSchema,destinationProviderSchema,githubReleaseSourceSchema,releaseDestinationIdEnvKeys,releaseDestinationMetadataSchema,releaseSourceIdEnvKeys,releaseSourceMetadataSchema,sourceProviderSchema,vercelReleaseDestinationSchema};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=zod.z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=zod.z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=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(),host:zod.z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=zod.z.object({name:zod.z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=zod.z.object({name:zod.z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=zod.z.object({name:zod.z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host);return HOST_URL_RESOLVERS[input.flavor??detectGithubHostFlavor(host)](host)}exports.GITHUB_COM_API_BASE_URL=GITHUB_COM_API_BASE_URL,exports.GITHUB_COM_HOST=GITHUB_COM_HOST,exports.GITHUB_COM_WEB_BASE_URL=GITHUB_COM_WEB_BASE_URL,exports.PROVIDER_FLAVOR=PROVIDER_FLAVOR,exports.detectGithubHostFlavor=detectGithubHostFlavor,exports.gheCloudIntegration=gheCloudIntegration,exports.gheServerIntegration=gheServerIntegration,exports.githubFamilyProviders=githubFamilyProviders,exports.githubHostFlavorSchema=githubHostFlavorSchema,exports.githubIntegration=githubIntegration,exports.githubSourceIdEnvKeys=githubSourceIdEnvKeys,exports.normalizeGithubHost=normalizeGithubHost,exports.providerFromHost=providerFromHost,exports.resolveGithubHostUrls=resolveGithubHostUrls;
@@ -2,6 +2,15 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/integrations/platforms/github.d.ts
4
4
  declare const githubSourceIdEnvKeys: ("GITHUB_SHA" | "VERCEL_GIT_COMMIT_SHA")[];
5
+ declare const githubHostFlavorSchema: z.ZodEnum<{
6
+ ghe_cloud: "ghe_cloud";
7
+ ghe_server: "ghe_server";
8
+ github_com: "github_com";
9
+ }>;
10
+ type GithubHostFlavor = z.infer<typeof githubHostFlavorSchema>;
11
+ declare const GITHUB_COM_HOST = "github.com";
12
+ declare const GITHUB_COM_API_BASE_URL = "https://api.github.com";
13
+ declare const GITHUB_COM_WEB_BASE_URL = "https://github.com";
5
14
  declare const githubIntegration: z.ZodObject<{
6
15
  name: z.ZodLiteral<"github">;
7
16
  metadata: z.ZodObject<{
@@ -9,8 +18,60 @@ declare const githubIntegration: z.ZodObject<{
9
18
  avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
19
  repositories: z.ZodRecord<z.ZodString, z.ZodString>;
11
20
  installationUrl: z.ZodNullable<z.ZodString>;
21
+ host: z.ZodDefault<z.ZodString>;
22
+ flavor: z.ZodDefault<z.ZodEnum<{
23
+ ghe_cloud: "ghe_cloud";
24
+ ghe_server: "ghe_server";
25
+ github_com: "github_com";
26
+ }>>;
12
27
  }, z.core.$strip>;
13
28
  }, z.core.$strip>;
29
+ declare const gheCloudIntegration: z.ZodObject<{
30
+ name: z.ZodLiteral<"ghe_cloud">;
31
+ metadata: z.ZodObject<{
32
+ accountType: z.ZodString;
33
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
34
+ repositories: z.ZodRecord<z.ZodString, z.ZodString>;
35
+ installationUrl: z.ZodNullable<z.ZodString>;
36
+ host: z.ZodDefault<z.ZodString>;
37
+ flavor: z.ZodDefault<z.ZodEnum<{
38
+ ghe_cloud: "ghe_cloud";
39
+ ghe_server: "ghe_server";
40
+ github_com: "github_com";
41
+ }>>;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
44
+ declare const gheServerIntegration: z.ZodObject<{
45
+ name: z.ZodLiteral<"ghe_server">;
46
+ metadata: z.ZodObject<{
47
+ accountType: z.ZodString;
48
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ repositories: z.ZodRecord<z.ZodString, z.ZodString>;
50
+ installationUrl: z.ZodNullable<z.ZodString>;
51
+ host: z.ZodDefault<z.ZodString>;
52
+ flavor: z.ZodDefault<z.ZodEnum<{
53
+ ghe_cloud: "ghe_cloud";
54
+ ghe_server: "ghe_server";
55
+ github_com: "github_com";
56
+ }>>;
57
+ }, z.core.$strip>;
58
+ }, z.core.$strip>;
59
+ declare const githubFamilyProviders: readonly ["github", "ghe_cloud", "ghe_server"];
60
+ type GithubFamilyProvider = (typeof githubFamilyProviders)[number];
61
+ declare const PROVIDER_FLAVOR: Record<GithubFamilyProvider, GithubHostFlavor>;
62
+ interface GithubHostUrls {
63
+ apiBaseUrl: string;
64
+ flavor: GithubHostFlavor;
65
+ host: string;
66
+ webBaseUrl: string;
67
+ }
68
+ declare function normalizeGithubHost(host: string): string;
69
+ declare function detectGithubHostFlavor(host: string): GithubHostFlavor;
70
+ declare function providerFromHost(host: string): GithubFamilyProvider;
71
+ declare function resolveGithubHostUrls(input: {
72
+ host: string;
73
+ flavor?: GithubHostFlavor;
74
+ }): GithubHostUrls;
14
75
  //#endregion
15
- export { githubIntegration, githubSourceIdEnvKeys };
76
+ export { GITHUB_COM_API_BASE_URL, GITHUB_COM_HOST, GITHUB_COM_WEB_BASE_URL, GithubFamilyProvider, GithubHostFlavor, GithubHostUrls, PROVIDER_FLAVOR, detectGithubHostFlavor, gheCloudIntegration, gheServerIntegration, githubFamilyProviders, githubHostFlavorSchema, githubIntegration, githubSourceIdEnvKeys, normalizeGithubHost, providerFromHost, resolveGithubHostUrls };
16
77
  //# sourceMappingURL=github.d.cts.map
@@ -2,6 +2,15 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/integrations/platforms/github.d.ts
4
4
  declare const githubSourceIdEnvKeys: ("GITHUB_SHA" | "VERCEL_GIT_COMMIT_SHA")[];
5
+ declare const githubHostFlavorSchema: z.ZodEnum<{
6
+ ghe_cloud: "ghe_cloud";
7
+ ghe_server: "ghe_server";
8
+ github_com: "github_com";
9
+ }>;
10
+ type GithubHostFlavor = z.infer<typeof githubHostFlavorSchema>;
11
+ declare const GITHUB_COM_HOST = "github.com";
12
+ declare const GITHUB_COM_API_BASE_URL = "https://api.github.com";
13
+ declare const GITHUB_COM_WEB_BASE_URL = "https://github.com";
5
14
  declare const githubIntegration: z.ZodObject<{
6
15
  name: z.ZodLiteral<"github">;
7
16
  metadata: z.ZodObject<{
@@ -9,8 +18,60 @@ declare const githubIntegration: z.ZodObject<{
9
18
  avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
19
  repositories: z.ZodRecord<z.ZodString, z.ZodString>;
11
20
  installationUrl: z.ZodNullable<z.ZodString>;
21
+ host: z.ZodDefault<z.ZodString>;
22
+ flavor: z.ZodDefault<z.ZodEnum<{
23
+ ghe_cloud: "ghe_cloud";
24
+ ghe_server: "ghe_server";
25
+ github_com: "github_com";
26
+ }>>;
12
27
  }, z.core.$strip>;
13
28
  }, z.core.$strip>;
29
+ declare const gheCloudIntegration: z.ZodObject<{
30
+ name: z.ZodLiteral<"ghe_cloud">;
31
+ metadata: z.ZodObject<{
32
+ accountType: z.ZodString;
33
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
34
+ repositories: z.ZodRecord<z.ZodString, z.ZodString>;
35
+ installationUrl: z.ZodNullable<z.ZodString>;
36
+ host: z.ZodDefault<z.ZodString>;
37
+ flavor: z.ZodDefault<z.ZodEnum<{
38
+ ghe_cloud: "ghe_cloud";
39
+ ghe_server: "ghe_server";
40
+ github_com: "github_com";
41
+ }>>;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
44
+ declare const gheServerIntegration: z.ZodObject<{
45
+ name: z.ZodLiteral<"ghe_server">;
46
+ metadata: z.ZodObject<{
47
+ accountType: z.ZodString;
48
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ repositories: z.ZodRecord<z.ZodString, z.ZodString>;
50
+ installationUrl: z.ZodNullable<z.ZodString>;
51
+ host: z.ZodDefault<z.ZodString>;
52
+ flavor: z.ZodDefault<z.ZodEnum<{
53
+ ghe_cloud: "ghe_cloud";
54
+ ghe_server: "ghe_server";
55
+ github_com: "github_com";
56
+ }>>;
57
+ }, z.core.$strip>;
58
+ }, z.core.$strip>;
59
+ declare const githubFamilyProviders: readonly ["github", "ghe_cloud", "ghe_server"];
60
+ type GithubFamilyProvider = (typeof githubFamilyProviders)[number];
61
+ declare const PROVIDER_FLAVOR: Record<GithubFamilyProvider, GithubHostFlavor>;
62
+ interface GithubHostUrls {
63
+ apiBaseUrl: string;
64
+ flavor: GithubHostFlavor;
65
+ host: string;
66
+ webBaseUrl: string;
67
+ }
68
+ declare function normalizeGithubHost(host: string): string;
69
+ declare function detectGithubHostFlavor(host: string): GithubHostFlavor;
70
+ declare function providerFromHost(host: string): GithubFamilyProvider;
71
+ declare function resolveGithubHostUrls(input: {
72
+ host: string;
73
+ flavor?: GithubHostFlavor;
74
+ }): GithubHostUrls;
14
75
  //#endregion
15
- export { githubIntegration, githubSourceIdEnvKeys };
76
+ export { GITHUB_COM_API_BASE_URL, GITHUB_COM_HOST, GITHUB_COM_WEB_BASE_URL, GithubFamilyProvider, GithubHostFlavor, GithubHostUrls, PROVIDER_FLAVOR, detectGithubHostFlavor, gheCloudIntegration, gheServerIntegration, githubFamilyProviders, githubHostFlavorSchema, githubIntegration, githubSourceIdEnvKeys, normalizeGithubHost, providerFromHost, resolveGithubHostUrls };
16
77
  //# sourceMappingURL=github.d.mts.map
@@ -1,2 +1,2 @@
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};
1
+ import{z}from"zod";const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=z.object({accountType:z.string(),avatarUrl:z.string().nullable().default(null),repositories:z.record(z.string(),z.string()),installationUrl:z.string().nullable(),host:z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=z.object({name:z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=z.object({name:z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=z.object({name:z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host);return HOST_URL_RESOLVERS[input.flavor??detectGithubHostFlavor(host)](host)}export{GITHUB_COM_API_BASE_URL,GITHUB_COM_HOST,GITHUB_COM_WEB_BASE_URL,PROVIDER_FLAVOR,detectGithubHostFlavor,gheCloudIntegration,gheServerIntegration,githubFamilyProviders,githubHostFlavorSchema,githubIntegration,githubSourceIdEnvKeys,normalizeGithubHost,providerFromHost,resolveGithubHostUrls};
2
2
  //# sourceMappingURL=github.mjs.map
@@ -15,6 +15,20 @@ declare const createReleaseRequest: z.ZodObject<{
15
15
  commitMessage: z.ZodString;
16
16
  branch: z.ZodString;
17
17
  commitSha: z.ZodNullable<z.ZodString>;
18
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ provider: z.ZodLiteral<"cli">;
23
+ commitSha: z.ZodNullable<z.ZodString>;
24
+ commitRef: z.ZodNullable<z.ZodString>;
25
+ commitMessage: z.ZodNullable<z.ZodString>;
26
+ commitUrl: z.ZodNullable<z.ZodString>;
27
+ runnerName: z.ZodNullable<z.ZodString>;
28
+ runId: z.ZodNullable<z.ZodString>;
29
+ runUrl: z.ZodNullable<z.ZodString>;
30
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
32
  }, z.core.$strip>], "provider">;
19
33
  destination: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
20
34
  provider: z.ZodLiteral<"vercel">;
@@ -15,6 +15,20 @@ declare const createReleaseRequest: z.ZodObject<{
15
15
  commitMessage: z.ZodString;
16
16
  branch: z.ZodString;
17
17
  commitSha: z.ZodNullable<z.ZodString>;
18
+ runnerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ runUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ provider: z.ZodLiteral<"cli">;
23
+ commitSha: z.ZodNullable<z.ZodString>;
24
+ commitRef: z.ZodNullable<z.ZodString>;
25
+ commitMessage: z.ZodNullable<z.ZodString>;
26
+ commitUrl: z.ZodNullable<z.ZodString>;
27
+ runnerName: z.ZodNullable<z.ZodString>;
28
+ runId: z.ZodNullable<z.ZodString>;
29
+ runUrl: z.ZodNullable<z.ZodString>;
30
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
32
  }, z.core.$strip>], "provider">;
19
33
  destination: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
20
34
  provider: z.ZodLiteral<"vercel">;
@@ -180,11 +180,7 @@ declare const errorEnvelopeSchema: z.ZodObject<{
180
180
  requestPath: z.ZodOptional<z.ZodString>;
181
181
  runtime: z.ZodLiteral<"node">;
182
182
  }, z.core.$strip>], "runtime">>;
183
- environment: z.ZodNullable<z.ZodEnum<{
184
- development: "development";
185
- preview: "preview";
186
- production: "production";
187
- }>>;
183
+ environment: z.ZodNullable<z.ZodString>;
188
184
  producerVersion: z.ZodOptional<z.ZodString>;
189
185
  releaseId: z.ZodNullable<z.ZodString>;
190
186
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -311,11 +307,7 @@ declare const pageviewEnvelopeSchema: z.ZodObject<{
311
307
  requestPath: z.ZodOptional<z.ZodString>;
312
308
  runtime: z.ZodLiteral<"node">;
313
309
  }, z.core.$strip>], "runtime">>;
314
- environment: z.ZodNullable<z.ZodEnum<{
315
- development: "development";
316
- preview: "preview";
317
- production: "production";
318
- }>>;
310
+ environment: z.ZodNullable<z.ZodString>;
319
311
  producerVersion: z.ZodOptional<z.ZodString>;
320
312
  releaseId: z.ZodNullable<z.ZodString>;
321
313
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -422,11 +414,7 @@ declare const pageleaveEnvelopeSchema: z.ZodObject<{
422
414
  requestPath: z.ZodOptional<z.ZodString>;
423
415
  runtime: z.ZodLiteral<"node">;
424
416
  }, z.core.$strip>], "runtime">>;
425
- environment: z.ZodNullable<z.ZodEnum<{
426
- development: "development";
427
- preview: "preview";
428
- production: "production";
429
- }>>;
417
+ environment: z.ZodNullable<z.ZodString>;
430
418
  producerVersion: z.ZodOptional<z.ZodString>;
431
419
  releaseId: z.ZodNullable<z.ZodString>;
432
420
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -533,11 +521,7 @@ declare const uiEventEnvelopeSchema: z.ZodObject<{
533
521
  requestPath: z.ZodOptional<z.ZodString>;
534
522
  runtime: z.ZodLiteral<"node">;
535
523
  }, z.core.$strip>], "runtime">>;
536
- environment: z.ZodNullable<z.ZodEnum<{
537
- development: "development";
538
- preview: "preview";
539
- production: "production";
540
- }>>;
524
+ environment: z.ZodNullable<z.ZodString>;
541
525
  producerVersion: z.ZodOptional<z.ZodString>;
542
526
  releaseId: z.ZodNullable<z.ZodString>;
543
527
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -643,11 +627,7 @@ declare const replayChunkEnvelopeSchema: z.ZodObject<{
643
627
  requestPath: z.ZodOptional<z.ZodString>;
644
628
  runtime: z.ZodLiteral<"node">;
645
629
  }, z.core.$strip>], "runtime">>;
646
- environment: z.ZodNullable<z.ZodEnum<{
647
- development: "development";
648
- preview: "preview";
649
- production: "production";
650
- }>>;
630
+ environment: z.ZodNullable<z.ZodString>;
651
631
  producerVersion: z.ZodOptional<z.ZodString>;
652
632
  releaseId: z.ZodNullable<z.ZodString>;
653
633
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -757,11 +737,7 @@ declare const rageClickEnvelopeSchema: z.ZodObject<{
757
737
  requestPath: z.ZodOptional<z.ZodString>;
758
738
  runtime: z.ZodLiteral<"node">;
759
739
  }, z.core.$strip>], "runtime">>;
760
- environment: z.ZodNullable<z.ZodEnum<{
761
- development: "development";
762
- preview: "preview";
763
- production: "production";
764
- }>>;
740
+ environment: z.ZodNullable<z.ZodString>;
765
741
  producerVersion: z.ZodOptional<z.ZodString>;
766
742
  releaseId: z.ZodNullable<z.ZodString>;
767
743
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -873,11 +849,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
873
849
  requestPath: z.ZodOptional<z.ZodString>;
874
850
  runtime: z.ZodLiteral<"node">;
875
851
  }, z.core.$strip>], "runtime">>;
876
- environment: z.ZodNullable<z.ZodEnum<{
877
- development: "development";
878
- preview: "preview";
879
- production: "production";
880
- }>>;
852
+ environment: z.ZodNullable<z.ZodString>;
881
853
  producerVersion: z.ZodOptional<z.ZodString>;
882
854
  releaseId: z.ZodNullable<z.ZodString>;
883
855
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1003,11 +975,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1003
975
  requestPath: z.ZodOptional<z.ZodString>;
1004
976
  runtime: z.ZodLiteral<"node">;
1005
977
  }, z.core.$strip>], "runtime">>;
1006
- environment: z.ZodNullable<z.ZodEnum<{
1007
- development: "development";
1008
- preview: "preview";
1009
- production: "production";
1010
- }>>;
978
+ environment: z.ZodNullable<z.ZodString>;
1011
979
  producerVersion: z.ZodOptional<z.ZodString>;
1012
980
  releaseId: z.ZodNullable<z.ZodString>;
1013
981
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1113,11 +1081,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1113
1081
  requestPath: z.ZodOptional<z.ZodString>;
1114
1082
  runtime: z.ZodLiteral<"node">;
1115
1083
  }, z.core.$strip>], "runtime">>;
1116
- environment: z.ZodNullable<z.ZodEnum<{
1117
- development: "development";
1118
- preview: "preview";
1119
- production: "production";
1120
- }>>;
1084
+ environment: z.ZodNullable<z.ZodString>;
1121
1085
  producerVersion: z.ZodOptional<z.ZodString>;
1122
1086
  releaseId: z.ZodNullable<z.ZodString>;
1123
1087
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1223,11 +1187,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1223
1187
  requestPath: z.ZodOptional<z.ZodString>;
1224
1188
  runtime: z.ZodLiteral<"node">;
1225
1189
  }, z.core.$strip>], "runtime">>;
1226
- environment: z.ZodNullable<z.ZodEnum<{
1227
- development: "development";
1228
- preview: "preview";
1229
- production: "production";
1230
- }>>;
1190
+ environment: z.ZodNullable<z.ZodString>;
1231
1191
  producerVersion: z.ZodOptional<z.ZodString>;
1232
1192
  releaseId: z.ZodNullable<z.ZodString>;
1233
1193
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1332,11 +1292,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1332
1292
  requestPath: z.ZodOptional<z.ZodString>;
1333
1293
  runtime: z.ZodLiteral<"node">;
1334
1294
  }, z.core.$strip>], "runtime">>;
1335
- environment: z.ZodNullable<z.ZodEnum<{
1336
- development: "development";
1337
- preview: "preview";
1338
- production: "production";
1339
- }>>;
1295
+ environment: z.ZodNullable<z.ZodString>;
1340
1296
  producerVersion: z.ZodOptional<z.ZodString>;
1341
1297
  releaseId: z.ZodNullable<z.ZodString>;
1342
1298
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1445,11 +1401,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1445
1401
  requestPath: z.ZodOptional<z.ZodString>;
1446
1402
  runtime: z.ZodLiteral<"node">;
1447
1403
  }, z.core.$strip>], "runtime">>;
1448
- environment: z.ZodNullable<z.ZodEnum<{
1449
- development: "development";
1450
- preview: "preview";
1451
- production: "production";
1452
- }>>;
1404
+ environment: z.ZodNullable<z.ZodString>;
1453
1405
  producerVersion: z.ZodOptional<z.ZodString>;
1454
1406
  releaseId: z.ZodNullable<z.ZodString>;
1455
1407
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -180,11 +180,7 @@ declare const errorEnvelopeSchema: z.ZodObject<{
180
180
  requestPath: z.ZodOptional<z.ZodString>;
181
181
  runtime: z.ZodLiteral<"node">;
182
182
  }, z.core.$strip>], "runtime">>;
183
- environment: z.ZodNullable<z.ZodEnum<{
184
- development: "development";
185
- preview: "preview";
186
- production: "production";
187
- }>>;
183
+ environment: z.ZodNullable<z.ZodString>;
188
184
  producerVersion: z.ZodOptional<z.ZodString>;
189
185
  releaseId: z.ZodNullable<z.ZodString>;
190
186
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -311,11 +307,7 @@ declare const pageviewEnvelopeSchema: z.ZodObject<{
311
307
  requestPath: z.ZodOptional<z.ZodString>;
312
308
  runtime: z.ZodLiteral<"node">;
313
309
  }, z.core.$strip>], "runtime">>;
314
- environment: z.ZodNullable<z.ZodEnum<{
315
- development: "development";
316
- preview: "preview";
317
- production: "production";
318
- }>>;
310
+ environment: z.ZodNullable<z.ZodString>;
319
311
  producerVersion: z.ZodOptional<z.ZodString>;
320
312
  releaseId: z.ZodNullable<z.ZodString>;
321
313
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -422,11 +414,7 @@ declare const pageleaveEnvelopeSchema: z.ZodObject<{
422
414
  requestPath: z.ZodOptional<z.ZodString>;
423
415
  runtime: z.ZodLiteral<"node">;
424
416
  }, z.core.$strip>], "runtime">>;
425
- environment: z.ZodNullable<z.ZodEnum<{
426
- development: "development";
427
- preview: "preview";
428
- production: "production";
429
- }>>;
417
+ environment: z.ZodNullable<z.ZodString>;
430
418
  producerVersion: z.ZodOptional<z.ZodString>;
431
419
  releaseId: z.ZodNullable<z.ZodString>;
432
420
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -533,11 +521,7 @@ declare const uiEventEnvelopeSchema: z.ZodObject<{
533
521
  requestPath: z.ZodOptional<z.ZodString>;
534
522
  runtime: z.ZodLiteral<"node">;
535
523
  }, z.core.$strip>], "runtime">>;
536
- environment: z.ZodNullable<z.ZodEnum<{
537
- development: "development";
538
- preview: "preview";
539
- production: "production";
540
- }>>;
524
+ environment: z.ZodNullable<z.ZodString>;
541
525
  producerVersion: z.ZodOptional<z.ZodString>;
542
526
  releaseId: z.ZodNullable<z.ZodString>;
543
527
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -643,11 +627,7 @@ declare const replayChunkEnvelopeSchema: z.ZodObject<{
643
627
  requestPath: z.ZodOptional<z.ZodString>;
644
628
  runtime: z.ZodLiteral<"node">;
645
629
  }, z.core.$strip>], "runtime">>;
646
- environment: z.ZodNullable<z.ZodEnum<{
647
- development: "development";
648
- preview: "preview";
649
- production: "production";
650
- }>>;
630
+ environment: z.ZodNullable<z.ZodString>;
651
631
  producerVersion: z.ZodOptional<z.ZodString>;
652
632
  releaseId: z.ZodNullable<z.ZodString>;
653
633
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -757,11 +737,7 @@ declare const rageClickEnvelopeSchema: z.ZodObject<{
757
737
  requestPath: z.ZodOptional<z.ZodString>;
758
738
  runtime: z.ZodLiteral<"node">;
759
739
  }, z.core.$strip>], "runtime">>;
760
- environment: z.ZodNullable<z.ZodEnum<{
761
- development: "development";
762
- preview: "preview";
763
- production: "production";
764
- }>>;
740
+ environment: z.ZodNullable<z.ZodString>;
765
741
  producerVersion: z.ZodOptional<z.ZodString>;
766
742
  releaseId: z.ZodNullable<z.ZodString>;
767
743
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -873,11 +849,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
873
849
  requestPath: z.ZodOptional<z.ZodString>;
874
850
  runtime: z.ZodLiteral<"node">;
875
851
  }, z.core.$strip>], "runtime">>;
876
- environment: z.ZodNullable<z.ZodEnum<{
877
- development: "development";
878
- preview: "preview";
879
- production: "production";
880
- }>>;
852
+ environment: z.ZodNullable<z.ZodString>;
881
853
  producerVersion: z.ZodOptional<z.ZodString>;
882
854
  releaseId: z.ZodNullable<z.ZodString>;
883
855
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1003,11 +975,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1003
975
  requestPath: z.ZodOptional<z.ZodString>;
1004
976
  runtime: z.ZodLiteral<"node">;
1005
977
  }, z.core.$strip>], "runtime">>;
1006
- environment: z.ZodNullable<z.ZodEnum<{
1007
- development: "development";
1008
- preview: "preview";
1009
- production: "production";
1010
- }>>;
978
+ environment: z.ZodNullable<z.ZodString>;
1011
979
  producerVersion: z.ZodOptional<z.ZodString>;
1012
980
  releaseId: z.ZodNullable<z.ZodString>;
1013
981
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1113,11 +1081,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1113
1081
  requestPath: z.ZodOptional<z.ZodString>;
1114
1082
  runtime: z.ZodLiteral<"node">;
1115
1083
  }, z.core.$strip>], "runtime">>;
1116
- environment: z.ZodNullable<z.ZodEnum<{
1117
- development: "development";
1118
- preview: "preview";
1119
- production: "production";
1120
- }>>;
1084
+ environment: z.ZodNullable<z.ZodString>;
1121
1085
  producerVersion: z.ZodOptional<z.ZodString>;
1122
1086
  releaseId: z.ZodNullable<z.ZodString>;
1123
1087
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1223,11 +1187,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1223
1187
  requestPath: z.ZodOptional<z.ZodString>;
1224
1188
  runtime: z.ZodLiteral<"node">;
1225
1189
  }, z.core.$strip>], "runtime">>;
1226
- environment: z.ZodNullable<z.ZodEnum<{
1227
- development: "development";
1228
- preview: "preview";
1229
- production: "production";
1230
- }>>;
1190
+ environment: z.ZodNullable<z.ZodString>;
1231
1191
  producerVersion: z.ZodOptional<z.ZodString>;
1232
1192
  releaseId: z.ZodNullable<z.ZodString>;
1233
1193
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1332,11 +1292,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1332
1292
  requestPath: z.ZodOptional<z.ZodString>;
1333
1293
  runtime: z.ZodLiteral<"node">;
1334
1294
  }, z.core.$strip>], "runtime">>;
1335
- environment: z.ZodNullable<z.ZodEnum<{
1336
- development: "development";
1337
- preview: "preview";
1338
- production: "production";
1339
- }>>;
1295
+ environment: z.ZodNullable<z.ZodString>;
1340
1296
  producerVersion: z.ZodOptional<z.ZodString>;
1341
1297
  releaseId: z.ZodNullable<z.ZodString>;
1342
1298
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1445,11 +1401,7 @@ declare const envelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1445
1401
  requestPath: z.ZodOptional<z.ZodString>;
1446
1402
  runtime: z.ZodLiteral<"node">;
1447
1403
  }, z.core.$strip>], "runtime">>;
1448
- environment: z.ZodNullable<z.ZodEnum<{
1449
- development: "development";
1450
- preview: "preview";
1451
- production: "production";
1452
- }>>;
1404
+ environment: z.ZodNullable<z.ZodString>;
1453
1405
  producerVersion: z.ZodOptional<z.ZodString>;
1454
1406
  releaseId: z.ZodNullable<z.ZodString>;
1455
1407
  runtime: z.ZodNullable<z.ZodEnum<{
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`,fetchFailedResponse:`auto.browser.fetch.failed_response`,xhrFailedResponse:`auto.browser.xhr.failed_response`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
2
2
  `)){let line=rawLine.trim();if(!line)continue;let match=COMPONENT_STACK_RE.exec(line);if(!match)continue;let[,name,fileName,lineStr,colStr]=match;if(!name)continue;let frame={id:`react-${frames.length}`,fn:name};fileName&&(frame.file=fileName),lineStr&&(frame.line=Number(lineStr)),colStr&&(frame.column=Number(colStr)),frames.push(frame)}return frames}function toError(error){return error instanceof Error?error:typeof error==`string`?Error(error):typeof error==`object`&&error?tryUnwrapNestedError(error)||tagAsNonError(safeJson(error)??String(error)):tagAsNonError(String(error))}function tryUnwrapNestedError(record){if(record.cause instanceof Error)return record.cause;for(let value of Object.values(record))if(value instanceof Error)return value}function tagAsNonError(message){let e=Error(message);return e.name=`NonError`,e}function safeJson(value){try{return JSON.stringify(value)}catch{return null}}function classify(value){if(value===null)return`null`;let t=typeof value;if(t!==`object`)return t;let tag=Object.prototype.toString.call(value).slice(8,-1);return tag===`Object`?`PlainObject`:tag}function describe(value){if(value==null)return`Non-Error captured: ${String(value)}`;if(typeof value==`object`){let keys=Object.keys(value).sort();return keys.length===0?`Non-Error captured: empty object`:`Non-Error captured with keys: ${keys.join(`, `)}`}return`Non-Error captured: ${String(value)}`}function serializeBoundedDepth(value,maxDepth){let seen=new WeakSet,walk=(current,depth)=>{if(current===null)return null;let t=typeof current;if(t===`string`||t===`number`||t===`boolean`)return current;if(t===`undefined`)return;if(t===`function`||t===`symbol`||t===`bigint`)return String(current);if(depth>maxDepth)return`[depth-limit]`;if(seen.has(current))return`[circular]`;if(seen.add(current),Array.isArray(current))return current.map(item=>walk(item,depth+1));let out={};for(let[k,v]of Object.entries(current))out[k]=walk(v,depth+1);return out};return walk(value,0)}function toException(value){if(value instanceof Error)return value;if(typeof value==`string`)return Error(value);if(typeof value==`object`&&value){let nested=tryUnwrapNestedError(value);if(nested)return nested}return{kind:`non-error`,type:classify(value),value:describe(value),serialized:serializeBoundedDepth(value,4)}}function isNonErrorException(value){return typeof value==`object`&&!!value&&value.kind===`non-error`}function toExceptions(value,mechanism){if(isNonErrorException(value))return[{kind:`non-error`,type:value.type,value:value.value,mechanism,serialized:value.serialized}];let exceptions=[],current=value;for(let depth=0;current&&depth<5;depth+=1)exceptions.push({kind:`error`,type:current.name,value:current.message,mechanism:depth===0?mechanism:void 0,stack:current.stack??``}),current=current.cause instanceof Error?current.cause:void 0;return exceptions}exports.MECHANISM_TYPE=MECHANISM_TYPE,exports.isNonErrorException=isNonErrorException,exports.parseReactComponentStack=parseReactComponentStack,exports.shouldDropBrowserExtensionNoise=shouldDropBrowserExtensionNoise,exports.shouldDropUnresolvableStack=shouldDropUnresolvableStack,exports.toError=toError,exports.toException=toException,exports.toExceptions=toExceptions;
@@ -21,6 +21,8 @@ declare const MECHANISM_TYPE: {
21
21
  readonly onerror: "auto.browser.global_handlers.onerror";
22
22
  readonly onunhandledrejection: "auto.browser.global_handlers.onunhandledrejection";
23
23
  readonly consoleError: "auto.browser.console.error";
24
+ readonly fetchFailedResponse: "auto.browser.fetch.failed_response";
25
+ readonly xhrFailedResponse: "auto.browser.xhr.failed_response";
24
26
  };
25
27
  readonly react: {
26
28
  readonly errorBoundary: "auto.function.react.error_boundary";
@@ -21,6 +21,8 @@ declare const MECHANISM_TYPE: {
21
21
  readonly onerror: "auto.browser.global_handlers.onerror";
22
22
  readonly onunhandledrejection: "auto.browser.global_handlers.onunhandledrejection";
23
23
  readonly consoleError: "auto.browser.console.error";
24
+ readonly fetchFailedResponse: "auto.browser.fetch.failed_response";
25
+ readonly xhrFailedResponse: "auto.browser.xhr.failed_response";
24
26
  };
25
27
  readonly react: {
26
28
  readonly errorBoundary: "auto.function.react.error_boundary";
@@ -1,3 +1,3 @@
1
- const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
1
+ const MECHANISM_TYPE={browser:{onerror:`auto.browser.global_handlers.onerror`,onunhandledrejection:`auto.browser.global_handlers.onunhandledrejection`,consoleError:`auto.browser.console.error`,fetchFailedResponse:`auto.browser.fetch.failed_response`,xhrFailedResponse:`auto.browser.xhr.failed_response`},react:{errorBoundary:`auto.function.react.error_boundary`,captureBoundary:`auto.function.react.capture_boundary`,caughtError:`auto.function.react.caught_error`,uncaughtError:`auto.function.react.uncaught_error`,recoverableError:`auto.function.react.recoverable_error`},nextjs:{onRequestError:`auto.function.nextjs.on_request_error`,captureError:`auto.function.nextjs.capture_error`},node:{captureError:`auto.function.node.capture_error`,uncaughtException:`auto.node.global_handlers.uncaught_exception`,unhandledRejection:`auto.node.global_handlers.unhandled_rejection`},manual:{capture:`manual.api.capture`}},EXTENSION_URL_RE=/\b(?:chrome|moz|safari-web|safari|ms-browser|webkit-masked)-(?:extension|url):\/\//;function shouldDropBrowserExtensionNoise(stacks){return stacks.some(stack=>EXTENSION_URL_RE.test(stack))}const HAS_SOURCE_LOCATION_RE=/(?:https?|file|blob|webpack-internal):\/\/|\sat\s+[\w$.<>]+\s+\([^)]+:\d/;function shouldDropUnresolvableStack(stacks){if(stacks.length===0)return!1;for(let stack of stacks)if(HAS_SOURCE_LOCATION_RE.test(stack))return!1;return!0}const COMPONENT_STACK_RE=/^(?:in|at)\s+([^\s(]+)(?:\s+\(([^\s:)]+):(\d+)(?::(\d+))?\))?/;function parseReactComponentStack(componentStack){let frames=[];for(let rawLine of componentStack.split(`
2
2
  `)){let line=rawLine.trim();if(!line)continue;let match=COMPONENT_STACK_RE.exec(line);if(!match)continue;let[,name,fileName,lineStr,colStr]=match;if(!name)continue;let frame={id:`react-${frames.length}`,fn:name};fileName&&(frame.file=fileName),lineStr&&(frame.line=Number(lineStr)),colStr&&(frame.column=Number(colStr)),frames.push(frame)}return frames}function toError(error){return error instanceof Error?error:typeof error==`string`?Error(error):typeof error==`object`&&error?tryUnwrapNestedError(error)||tagAsNonError(safeJson(error)??String(error)):tagAsNonError(String(error))}function tryUnwrapNestedError(record){if(record.cause instanceof Error)return record.cause;for(let value of Object.values(record))if(value instanceof Error)return value}function tagAsNonError(message){let e=Error(message);return e.name=`NonError`,e}function safeJson(value){try{return JSON.stringify(value)}catch{return null}}function classify(value){if(value===null)return`null`;let t=typeof value;if(t!==`object`)return t;let tag=Object.prototype.toString.call(value).slice(8,-1);return tag===`Object`?`PlainObject`:tag}function describe(value){if(value==null)return`Non-Error captured: ${String(value)}`;if(typeof value==`object`){let keys=Object.keys(value).sort();return keys.length===0?`Non-Error captured: empty object`:`Non-Error captured with keys: ${keys.join(`, `)}`}return`Non-Error captured: ${String(value)}`}function serializeBoundedDepth(value,maxDepth){let seen=new WeakSet,walk=(current,depth)=>{if(current===null)return null;let t=typeof current;if(t===`string`||t===`number`||t===`boolean`)return current;if(t===`undefined`)return;if(t===`function`||t===`symbol`||t===`bigint`)return String(current);if(depth>maxDepth)return`[depth-limit]`;if(seen.has(current))return`[circular]`;if(seen.add(current),Array.isArray(current))return current.map(item=>walk(item,depth+1));let out={};for(let[k,v]of Object.entries(current))out[k]=walk(v,depth+1);return out};return walk(value,0)}function toException(value){if(value instanceof Error)return value;if(typeof value==`string`)return Error(value);if(typeof value==`object`&&value){let nested=tryUnwrapNestedError(value);if(nested)return nested}return{kind:`non-error`,type:classify(value),value:describe(value),serialized:serializeBoundedDepth(value,4)}}function isNonErrorException(value){return typeof value==`object`&&!!value&&value.kind===`non-error`}function toExceptions(value,mechanism){if(isNonErrorException(value))return[{kind:`non-error`,type:value.type,value:value.value,mechanism,serialized:value.serialized}];let exceptions=[],current=value;for(let depth=0;current&&depth<5;depth+=1)exceptions.push({kind:`error`,type:current.name,value:current.message,mechanism:depth===0?mechanism:void 0,stack:current.stack??``}),current=current.cause instanceof Error?current.cause:void 0;return exceptions}export{MECHANISM_TYPE,isNonErrorException,parseReactComponentStack,shouldDropBrowserExtensionNoise,shouldDropUnresolvableStack,toError,toException,toExceptions};
3
3
  //# sourceMappingURL=errors.mjs.map
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.enum([`development`,`preview`,`production`]).nullable().meta({id:`Environment`,title:`Environment`,description:`Deployment environment the SDK is running in.`}),runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.toLowerCase();return envSchema.safeParse(env).success?env:null}exports.envSchema=envSchema,exports.inferRuntime=inferRuntime,exports.normalizeEnv=normalizeEnv,exports.runtimeSchema=runtimeSchema;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}exports.DEFAULT_ENVIRONMENT=DEFAULT_ENVIRONMENT,exports.envSchema=envSchema,exports.inferRuntime=inferRuntime,exports.normalizeEnv=normalizeEnv,exports.resolveEnvironment=resolveEnvironment,exports.runtimeSchema=runtimeSchema;
@@ -1,12 +1,31 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/sdk/runtime.d.ts
4
- declare const envSchema: z.ZodNullable<z.ZodEnum<{
5
- development: "development";
6
- preview: "preview";
7
- production: "production";
8
- }>>;
4
+ declare const envSchema: z.ZodNullable<z.ZodString>;
9
5
  type Env = z.infer<typeof envSchema>;
6
+ /**
7
+ * Fallback environment when nothing is configured. `development` (not
8
+ * `production`, which is what Sentry defaults to) because the collector has
9
+ * an always-on per-surface environment filter — an unconfigured run is far
10
+ * more likely a developer's laptop than a real deploy, so a filtered-by-default
11
+ * label keeps local noise out of product data. A real deploy sets one of the
12
+ * higher-precedence signals below.
13
+ */
14
+ declare const DEFAULT_ENVIRONMENT = "development";
15
+ /**
16
+ * Resolve the deployment environment using a precedence chain modelled on
17
+ * Sentry's: an explicit value (init option) wins, then a dedicated
18
+ * `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
19
+ * `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
20
+ *
21
+ * `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
22
+ * and prod all ship `NODE_ENV=production`), not a deploy-environment
23
+ * identifier. The dedicated var is the real abstraction.
24
+ */
25
+ declare function resolveEnvironment(opts?: {
26
+ readonly explicit?: string | null | undefined;
27
+ readonly env?: Record<string, string | undefined>;
28
+ }): string;
10
29
  declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
11
30
  browser: "browser";
12
31
  edge: "edge";
@@ -16,7 +35,7 @@ type Runtime = z.infer<typeof runtimeSchema>;
16
35
  declare function inferRuntime(options?: {
17
36
  readonly nextRuntime?: unknown;
18
37
  }): Runtime;
19
- declare function normalizeEnv(value: unknown): Env;
38
+ declare function normalizeEnv(value: unknown): string | null;
20
39
  //#endregion
21
- export { Env, Runtime, envSchema, inferRuntime, normalizeEnv, runtimeSchema };
40
+ export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
22
41
  //# sourceMappingURL=runtime.d.cts.map
@@ -1,12 +1,31 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/sdk/runtime.d.ts
4
- declare const envSchema: z.ZodNullable<z.ZodEnum<{
5
- development: "development";
6
- preview: "preview";
7
- production: "production";
8
- }>>;
4
+ declare const envSchema: z.ZodNullable<z.ZodString>;
9
5
  type Env = z.infer<typeof envSchema>;
6
+ /**
7
+ * Fallback environment when nothing is configured. `development` (not
8
+ * `production`, which is what Sentry defaults to) because the collector has
9
+ * an always-on per-surface environment filter — an unconfigured run is far
10
+ * more likely a developer's laptop than a real deploy, so a filtered-by-default
11
+ * label keeps local noise out of product data. A real deploy sets one of the
12
+ * higher-precedence signals below.
13
+ */
14
+ declare const DEFAULT_ENVIRONMENT = "development";
15
+ /**
16
+ * Resolve the deployment environment using a precedence chain modelled on
17
+ * Sentry's: an explicit value (init option) wins, then a dedicated
18
+ * `INTERFERE_ENVIRONMENT`, then platform signals (`VERCEL_ENV`), then
19
+ * `NODE_ENV` as a last-resort fallback, then {@link DEFAULT_ENVIRONMENT}.
20
+ *
21
+ * `NODE_ENV` is deliberately last: it's a build-mode flag (staging, preview,
22
+ * and prod all ship `NODE_ENV=production`), not a deploy-environment
23
+ * identifier. The dedicated var is the real abstraction.
24
+ */
25
+ declare function resolveEnvironment(opts?: {
26
+ readonly explicit?: string | null | undefined;
27
+ readonly env?: Record<string, string | undefined>;
28
+ }): string;
10
29
  declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
11
30
  browser: "browser";
12
31
  edge: "edge";
@@ -16,7 +35,7 @@ type Runtime = z.infer<typeof runtimeSchema>;
16
35
  declare function inferRuntime(options?: {
17
36
  readonly nextRuntime?: unknown;
18
37
  }): Runtime;
19
- declare function normalizeEnv(value: unknown): Env;
38
+ declare function normalizeEnv(value: unknown): string | null;
20
39
  //#endregion
21
- export { Env, Runtime, envSchema, inferRuntime, normalizeEnv, runtimeSchema };
40
+ export { DEFAULT_ENVIRONMENT, Env, Runtime, envSchema, inferRuntime, normalizeEnv, resolveEnvironment, runtimeSchema };
22
41
  //# sourceMappingURL=runtime.d.mts.map
@@ -1,2 +1,2 @@
1
- import{z}from"zod";const envSchema=z.enum([`development`,`preview`,`production`]).nullable().meta({id:`Environment`,title:`Environment`,description:`Deployment environment the SDK is running in.`}),runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.toLowerCase();return envSchema.safeParse(env).success?env:null}export{envSchema,inferRuntime,normalizeEnv,runtimeSchema};
1
+ import{z}from"zod";const envSchema=z.string().min(1).nullable().meta({id:`Environment`,title:`Environment`,description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`)."}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({id:`Runtime`,title:`Runtime`,description:`JavaScript runtime the SDK is running in.`});function inferRuntime(options){return typeof window<`u`&&typeof document<`u`&&typeof navigator<`u`?`browser`:typeof globalThis.EdgeRuntime==`string`||options?.nextRuntime===`edge`?`edge`:typeof process<`u`&&typeof process.versions?.node==`string`?`node`:null}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}export{DEFAULT_ENVIRONMENT,envSchema,inferRuntime,normalizeEnv,resolveEnvironment,runtimeSchema};
2
2
  //# sourceMappingURL=runtime.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interfere/types",
3
- "version": "9.0.3-canary.0",
3
+ "version": "9.0.3-canary.1",
4
4
  "license": "MIT",
5
5
  "description": "TypeScript & Zod types for Interfere",
6
6
  "keywords": [
@@ -15,7 +15,7 @@
15
15
  "author": "Interfere <support@interfere.com> (https://interfere.com)",
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "git+https://github.com/interfere-inc/interfere.git",
18
+ "url": "git+https://interfere.ghe.com/interfere/interfere.git",
19
19
  "directory": "src/packages/public/types"
20
20
  },
21
21
  "files": [
@@ -168,7 +168,7 @@
168
168
  "scripts": {
169
169
  "build": "tsdown",
170
170
  "test": "vitest run",
171
- "typecheck": "tsgo --noEmit --incremental"
171
+ "typecheck": "tsgo --noEmit"
172
172
  },
173
173
  "dependencies": {
174
174
  "zod": "^4.4.3"
@@ -177,9 +177,9 @@
177
177
  "@interfere/test-utils": "^9.0.0",
178
178
  "@interfere/typescript-config": "^9.0.0",
179
179
  "@types/node": "^24.12.0",
180
- "@typescript/native-preview": "7.0.0-dev.20260522.1",
181
- "@vitest/coverage-v8": "^4.1.6",
182
- "tsdown": "^0.22.0",
183
- "vitest": "^4.1.6"
180
+ "@typescript/native-preview": "7.0.0-dev.20260601.1",
181
+ "@vitest/coverage-v8": "4.1.8",
182
+ "tsdown": "0.22.1",
183
+ "vitest": "4.1.8"
184
184
  }
185
185
  }