@interfere/types 9.0.3-canary.2 → 9.0.3-canary.4

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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod"),_data_frame=require("#data/frame");const baseEnrichedFrameSchema=zod.z.object({ingestedId:zod.z.string(),inApp:zod.z.boolean(),file:zod.z.string().nullable(),line:zod.z.number().nullable(),column:zod.z.number().nullable(),fn:zod.z.string().nullable()}),resolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!0),originalFile:zod.z.string().nullable(),originalLine:zod.z.number().nullable(),originalColumn:zod.z.number().nullable(),originalName:zod.z.string().nullable()}),unresolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!1)}),enrichedFrameSchema=zod.z.discriminatedUnion(`resolved`,[resolvedFrameSchema,unresolvedFrameSchema]),errorMechanismSchema=zod.z.object({type:zod.z.string(),handled:zod.z.boolean(),synthetic:zod.z.boolean().optional()}),errorContextSchema=zod.z.object({framework:zod.z.string().optional(),routerKind:zod.z.enum([`Pages Router`,`App Router`]).optional(),routePath:zod.z.string().optional(),routeType:zod.z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).optional(),renderSource:zod.z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).optional(),revalidateReason:zod.z.enum([`on-demand`,`stale`]).optional(),renderType:zod.z.enum([`dynamic`,`dynamic-resume`]).optional(),requestPath:zod.z.string().optional(),requestMethod:zod.z.string().optional(),errorDigest:zod.z.string().optional()}),errorPayloadCommonSchema=zod.z.object({message:zod.z.string().nullable(),name:zod.z.string().nullable(),stack:zod.z.string().nullable(),context:errorContextSchema.optional(),mechanism:errorMechanismSchema.optional(),captureSource:zod.z.string().optional(),runtime:zod.z.string().optional(),frames:zod.z.array(_data_frame.ingestedFrame)}),errorPayloadFromErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`error`)}),errorPayloadFromNonErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`non-error`),serialized:zod.z.json()}),errorPayloadSchema=zod.z.discriminatedUnion(`capture`,[errorPayloadFromErrorSchema,errorPayloadFromNonErrorSchema]);exports.enrichedFrameSchema=enrichedFrameSchema,exports.errorContextSchema=errorContextSchema,exports.errorMechanismSchema=errorMechanismSchema,exports.errorPayloadSchema=errorPayloadSchema;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod"),_data_frame=require("#data/frame");const baseEnrichedFrameSchema=zod.z.object({ingestedId:zod.z.string(),inApp:zod.z.boolean(),file:zod.z.string().nullable(),line:zod.z.number().nullable(),column:zod.z.number().nullable(),fn:zod.z.string().nullable()}),resolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!0),filePath:zod.z.string().nullable(),fileReference:zod.z.string().nullable(),originalLine:zod.z.number().nullable(),originalColumn:zod.z.number().nullable(),originalName:zod.z.string().nullable()}),unresolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:zod.z.literal(!1)}),enrichedFrameSchema=zod.z.discriminatedUnion(`resolved`,[resolvedFrameSchema,unresolvedFrameSchema]),errorMechanismSchema=zod.z.object({type:zod.z.string(),handled:zod.z.boolean(),synthetic:zod.z.boolean().optional()}),errorContextSchema=zod.z.object({framework:zod.z.string().optional(),routerKind:zod.z.enum([`Pages Router`,`App Router`]).optional(),routePath:zod.z.string().optional(),routeType:zod.z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).optional(),renderSource:zod.z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).optional(),revalidateReason:zod.z.enum([`on-demand`,`stale`]).optional(),renderType:zod.z.enum([`dynamic`,`dynamic-resume`]).optional(),requestPath:zod.z.string().optional(),requestMethod:zod.z.string().optional(),errorDigest:zod.z.string().optional()}),errorPayloadCommonSchema=zod.z.object({message:zod.z.string().nullable(),name:zod.z.string().nullable(),stack:zod.z.string().nullable(),context:errorContextSchema.optional(),mechanism:errorMechanismSchema.optional(),captureSource:zod.z.string().optional(),runtime:zod.z.string().optional(),frames:zod.z.array(_data_frame.ingestedFrame)}),errorPayloadFromErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`error`)}),errorPayloadFromNonErrorSchema=errorPayloadCommonSchema.extend({capture:zod.z.literal(`non-error`),serialized:zod.z.json()}),errorPayloadSchema=zod.z.discriminatedUnion(`capture`,[errorPayloadFromErrorSchema,errorPayloadFromNonErrorSchema]);exports.enrichedFrameSchema=enrichedFrameSchema,exports.errorContextSchema=errorContextSchema,exports.errorMechanismSchema=errorMechanismSchema,exports.errorPayloadSchema=errorPayloadSchema;
@@ -9,7 +9,8 @@ declare const resolvedFrameSchema: z.ZodObject<{
9
9
  column: z.ZodNullable<z.ZodNumber>;
10
10
  fn: z.ZodNullable<z.ZodString>;
11
11
  resolved: z.ZodLiteral<true>;
12
- originalFile: z.ZodNullable<z.ZodString>;
12
+ filePath: z.ZodNullable<z.ZodString>;
13
+ fileReference: z.ZodNullable<z.ZodString>;
13
14
  originalLine: z.ZodNullable<z.ZodNumber>;
14
15
  originalColumn: z.ZodNullable<z.ZodNumber>;
15
16
  originalName: z.ZodNullable<z.ZodString>;
@@ -31,7 +32,8 @@ declare const enrichedFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
31
32
  column: z.ZodNullable<z.ZodNumber>;
32
33
  fn: z.ZodNullable<z.ZodString>;
33
34
  resolved: z.ZodLiteral<true>;
34
- originalFile: z.ZodNullable<z.ZodString>;
35
+ filePath: z.ZodNullable<z.ZodString>;
36
+ fileReference: z.ZodNullable<z.ZodString>;
35
37
  originalLine: z.ZodNullable<z.ZodNumber>;
36
38
  originalColumn: z.ZodNullable<z.ZodNumber>;
37
39
  originalName: z.ZodNullable<z.ZodString>;
@@ -9,7 +9,8 @@ declare const resolvedFrameSchema: z.ZodObject<{
9
9
  column: z.ZodNullable<z.ZodNumber>;
10
10
  fn: z.ZodNullable<z.ZodString>;
11
11
  resolved: z.ZodLiteral<true>;
12
- originalFile: z.ZodNullable<z.ZodString>;
12
+ filePath: z.ZodNullable<z.ZodString>;
13
+ fileReference: z.ZodNullable<z.ZodString>;
13
14
  originalLine: z.ZodNullable<z.ZodNumber>;
14
15
  originalColumn: z.ZodNullable<z.ZodNumber>;
15
16
  originalName: z.ZodNullable<z.ZodString>;
@@ -31,7 +32,8 @@ declare const enrichedFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
31
32
  column: z.ZodNullable<z.ZodNumber>;
32
33
  fn: z.ZodNullable<z.ZodString>;
33
34
  resolved: z.ZodLiteral<true>;
34
- originalFile: z.ZodNullable<z.ZodString>;
35
+ filePath: z.ZodNullable<z.ZodString>;
36
+ fileReference: z.ZodNullable<z.ZodString>;
35
37
  originalLine: z.ZodNullable<z.ZodNumber>;
36
38
  originalColumn: z.ZodNullable<z.ZodNumber>;
37
39
  originalName: z.ZodNullable<z.ZodString>;
@@ -1 +1 @@
1
- import{z}from"zod";import{ingestedFrame}from"#data/frame";const baseEnrichedFrameSchema=z.object({ingestedId:z.string(),inApp:z.boolean(),file:z.string().nullable(),line:z.number().nullable(),column:z.number().nullable(),fn:z.string().nullable()}),resolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:z.literal(!0),originalFile:z.string().nullable(),originalLine:z.number().nullable(),originalColumn:z.number().nullable(),originalName:z.string().nullable()}),unresolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:z.literal(!1)}),enrichedFrameSchema=z.discriminatedUnion(`resolved`,[resolvedFrameSchema,unresolvedFrameSchema]),errorMechanismSchema=z.object({type:z.string(),handled:z.boolean(),synthetic:z.boolean().optional()}),errorContextSchema=z.object({framework:z.string().optional(),routerKind:z.enum([`Pages Router`,`App Router`]).optional(),routePath:z.string().optional(),routeType:z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).optional(),renderSource:z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).optional(),revalidateReason:z.enum([`on-demand`,`stale`]).optional(),renderType:z.enum([`dynamic`,`dynamic-resume`]).optional(),requestPath:z.string().optional(),requestMethod:z.string().optional(),errorDigest:z.string().optional()}),errorPayloadCommonSchema=z.object({message:z.string().nullable(),name:z.string().nullable(),stack:z.string().nullable(),context:errorContextSchema.optional(),mechanism:errorMechanismSchema.optional(),captureSource:z.string().optional(),runtime:z.string().optional(),frames:z.array(ingestedFrame)}),errorPayloadFromErrorSchema=errorPayloadCommonSchema.extend({capture:z.literal(`error`)}),errorPayloadFromNonErrorSchema=errorPayloadCommonSchema.extend({capture:z.literal(`non-error`),serialized:z.json()}),errorPayloadSchema=z.discriminatedUnion(`capture`,[errorPayloadFromErrorSchema,errorPayloadFromNonErrorSchema]);export{enrichedFrameSchema,errorContextSchema,errorMechanismSchema,errorPayloadSchema};
1
+ import{z}from"zod";import{ingestedFrame}from"#data/frame";const baseEnrichedFrameSchema=z.object({ingestedId:z.string(),inApp:z.boolean(),file:z.string().nullable(),line:z.number().nullable(),column:z.number().nullable(),fn:z.string().nullable()}),resolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:z.literal(!0),filePath:z.string().nullable(),fileReference:z.string().nullable(),originalLine:z.number().nullable(),originalColumn:z.number().nullable(),originalName:z.string().nullable()}),unresolvedFrameSchema=baseEnrichedFrameSchema.extend({resolved:z.literal(!1)}),enrichedFrameSchema=z.discriminatedUnion(`resolved`,[resolvedFrameSchema,unresolvedFrameSchema]),errorMechanismSchema=z.object({type:z.string(),handled:z.boolean(),synthetic:z.boolean().optional()}),errorContextSchema=z.object({framework:z.string().optional(),routerKind:z.enum([`Pages Router`,`App Router`]).optional(),routePath:z.string().optional(),routeType:z.enum([`render`,`route`,`action`,`middleware`,`proxy`]).optional(),renderSource:z.enum([`react-server-components`,`react-server-components-payload`,`server-rendering`]).optional(),revalidateReason:z.enum([`on-demand`,`stale`]).optional(),renderType:z.enum([`dynamic`,`dynamic-resume`]).optional(),requestPath:z.string().optional(),requestMethod:z.string().optional(),errorDigest:z.string().optional()}),errorPayloadCommonSchema=z.object({message:z.string().nullable(),name:z.string().nullable(),stack:z.string().nullable(),context:errorContextSchema.optional(),mechanism:errorMechanismSchema.optional(),captureSource:z.string().optional(),runtime:z.string().optional(),frames:z.array(ingestedFrame)}),errorPayloadFromErrorSchema=errorPayloadCommonSchema.extend({capture:z.literal(`error`)}),errorPayloadFromNonErrorSchema=errorPayloadCommonSchema.extend({capture:z.literal(`non-error`),serialized:z.json()}),errorPayloadSchema=z.discriminatedUnion(`capture`,[errorPayloadFromErrorSchema,errorPayloadFromNonErrorSchema]);export{enrichedFrameSchema,errorContextSchema,errorMechanismSchema,errorPayloadSchema};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_integrations_platforms_cloudflare=require("./platforms/cloudflare.cjs"),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`}),releaseSourceProviderSchema=zod.z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),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.`}),cloudflareReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`cloudflare`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),versionId:zod.z.string().nullable(),scriptName:zod.z.string().nullable(),accountId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable()}).meta({id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`,description:`Release destination metadata for a Cloudflare Workers deployment.`}),cliReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`cli`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable()}).meta({id:`CliReleaseDestination`,title:`CliReleaseDestination`,description:`Release destination metadata from the Interfere CLI.`}),releaseDestinationMetadataSchema=zod.z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema,cloudflareReleaseDestinationSchema,cliReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),releaseDestinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ReleaseDestinationProvider`,title:`ReleaseDestinationProvider`}),configuredSourceProviderSchema=zod.z.enum([`github`]).meta({id:`ConfiguredSourceProvider`,title:`ConfiguredSourceProvider`}),configuredDestinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ConfiguredDestinationProvider`,title:`ConfiguredDestinationProvider`}),sourceProviderSchema=configuredSourceProviderSchema.meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`]).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_cloudflare.cloudflareDestinationIdEnvKeys,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options;exports.cliReleaseDestinationSchema=cliReleaseDestinationSchema,exports.cliReleaseSourceSchema=cliReleaseSourceSchema,exports.cloudflareReleaseDestinationSchema=cloudflareReleaseDestinationSchema,exports.configuredDestinationProviderSchema=configuredDestinationProviderSchema,exports.configuredSourceProviderSchema=configuredSourceProviderSchema,exports.destinationProviderSchema=destinationProviderSchema,exports.githubReleaseSourceSchema=githubReleaseSourceSchema,exports.releaseDestinationIdEnvKeys=releaseDestinationIdEnvKeys,exports.releaseDestinationMetadataSchema=releaseDestinationMetadataSchema,exports.releaseDestinationProviderSchema=releaseDestinationProviderSchema,exports.releaseSourceIdEnvKeys=releaseSourceIdEnvKeys,exports.releaseSourceMetadataSchema=releaseSourceMetadataSchema,exports.releaseSourceProviderSchema=releaseSourceProviderSchema,exports.sourceProviderSchema=sourceProviderSchema,exports.vercelReleaseDestinationSchema=vercelReleaseDestinationSchema;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_integrations_platforms_cloudflare=require("./platforms/cloudflare.cjs"),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`}),releaseSourceProviderSchema=zod.z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),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.`}),cloudflareReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`cloudflare`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),versionId:zod.z.string().nullable(),scriptName:zod.z.string().nullable(),accountId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable()}).meta({id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`,description:`Release destination metadata for a Cloudflare Workers deployment.`}),cliReleaseDestinationSchema=zod.z.object({provider:zod.z.literal(`cli`),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable()}).meta({id:`CliReleaseDestination`,title:`CliReleaseDestination`,description:`Release destination metadata from the Interfere CLI.`}),releaseDestinationMetadataSchema=zod.z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema,cloudflareReleaseDestinationSchema,cliReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),releaseDestinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ReleaseDestinationProvider`,title:`ReleaseDestinationProvider`}),configuredSourceProviderSchema=zod.z.enum([`github`]).meta({id:`ConfiguredSourceProvider`,title:`ConfiguredSourceProvider`}),configuredDestinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ConfiguredDestinationProvider`,title:`ConfiguredDestinationProvider`}),sourceProviderSchema=configuredSourceProviderSchema.meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=zod.z.enum([`vercel`,`cloudflare`]).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,...require_integrations_platforms_cloudflare.cloudflareSourceIdEnvKeys]).options,releaseDestinationIdEnvKeys=zod.z.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...require_integrations_platforms_vercel.vercelDestinationIdEnvKeys,...require_integrations_platforms_cloudflare.cloudflareDestinationIdEnvKeys,...require_integrations_platforms_github.githubSourceIdEnvKeys]).options;exports.cliReleaseDestinationSchema=cliReleaseDestinationSchema,exports.cliReleaseSourceSchema=cliReleaseSourceSchema,exports.cloudflareReleaseDestinationSchema=cloudflareReleaseDestinationSchema,exports.configuredDestinationProviderSchema=configuredDestinationProviderSchema,exports.configuredSourceProviderSchema=configuredSourceProviderSchema,exports.destinationProviderSchema=destinationProviderSchema,exports.githubReleaseSourceSchema=githubReleaseSourceSchema,exports.releaseDestinationIdEnvKeys=releaseDestinationIdEnvKeys,exports.releaseDestinationMetadataSchema=releaseDestinationMetadataSchema,exports.releaseDestinationProviderSchema=releaseDestinationProviderSchema,exports.releaseSourceIdEnvKeys=releaseSourceIdEnvKeys,exports.releaseSourceMetadataSchema=releaseSourceMetadataSchema,exports.releaseSourceProviderSchema=releaseSourceProviderSchema,exports.sourceProviderSchema=sourceProviderSchema,exports.vercelReleaseDestinationSchema=vercelReleaseDestinationSchema;
@@ -124,7 +124,7 @@ declare const destinationProviderSchema: z.ZodEnum<{
124
124
  vercel: "vercel";
125
125
  }>;
126
126
  type DestinationProvider = z.infer<typeof destinationProviderSchema>;
127
- declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
127
+ declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA" | "WORKERS_CI_COMMIT_SHA")[];
128
128
  declare const releaseDestinationIdEnvKeys: ("CF_VERSION_ID" | "GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA" | "WORKERS_CI_BUILD_UUID")[];
129
129
  //#endregion
130
130
  export { ConfiguredDestinationProvider, ConfiguredSourceProvider, DestinationProvider, ReleaseDestinationMetadata, ReleaseDestinationProvider, ReleaseSourceMetadata, ReleaseSourceProvider, SourceProvider, cliReleaseDestinationSchema, cliReleaseSourceSchema, cloudflareReleaseDestinationSchema, configuredDestinationProviderSchema, configuredSourceProviderSchema, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseDestinationProviderSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, releaseSourceProviderSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
@@ -124,7 +124,7 @@ declare const destinationProviderSchema: z.ZodEnum<{
124
124
  vercel: "vercel";
125
125
  }>;
126
126
  type DestinationProvider = z.infer<typeof destinationProviderSchema>;
127
- declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA")[];
127
+ declare const releaseSourceIdEnvKeys: ("GITHUB_SHA" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "VERCEL_GIT_COMMIT_SHA" | "WORKERS_CI_COMMIT_SHA")[];
128
128
  declare const releaseDestinationIdEnvKeys: ("CF_VERSION_ID" | "GITHUB_SHA" | "INTERFERE_DESTINATION_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "VERCEL_DEPLOYMENT_ID" | "VERCEL_GIT_COMMIT_SHA" | "WORKERS_CI_BUILD_UUID")[];
129
129
  //#endregion
130
130
  export { ConfiguredDestinationProvider, ConfiguredSourceProvider, DestinationProvider, ReleaseDestinationMetadata, ReleaseDestinationProvider, ReleaseSourceMetadata, ReleaseSourceProvider, SourceProvider, cliReleaseDestinationSchema, cliReleaseSourceSchema, cloudflareReleaseDestinationSchema, configuredDestinationProviderSchema, configuredSourceProviderSchema, destinationProviderSchema, githubReleaseSourceSchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseDestinationProviderSchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, releaseSourceProviderSchema, sourceProviderSchema, vercelReleaseDestinationSchema };
@@ -1 +1 @@
1
- import{cloudflareDestinationIdEnvKeys}from"./platforms/cloudflare.mjs";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`}),releaseSourceProviderSchema=z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),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.`}),cloudflareReleaseDestinationSchema=z.object({provider:z.literal(`cloudflare`),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),versionId:z.string().nullable(),scriptName:z.string().nullable(),accountId:z.string().nullable(),deploymentUrl:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable()}).meta({id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`,description:`Release destination metadata for a Cloudflare Workers deployment.`}),cliReleaseDestinationSchema=z.object({provider:z.literal(`cli`),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),deploymentUrl:z.string().nullable()}).meta({id:`CliReleaseDestination`,title:`CliReleaseDestination`,description:`Release destination metadata from the Interfere CLI.`}),releaseDestinationMetadataSchema=z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema,cloudflareReleaseDestinationSchema,cliReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),releaseDestinationProviderSchema=z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ReleaseDestinationProvider`,title:`ReleaseDestinationProvider`}),configuredSourceProviderSchema=z.enum([`github`]).meta({id:`ConfiguredSourceProvider`,title:`ConfiguredSourceProvider`}),configuredDestinationProviderSchema=z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ConfiguredDestinationProvider`,title:`ConfiguredDestinationProvider`}),sourceProviderSchema=configuredSourceProviderSchema.meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=z.enum([`vercel`,`cloudflare`]).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,...cloudflareDestinationIdEnvKeys,...githubSourceIdEnvKeys]).options;export{cliReleaseDestinationSchema,cliReleaseSourceSchema,cloudflareReleaseDestinationSchema,configuredDestinationProviderSchema,configuredSourceProviderSchema,destinationProviderSchema,githubReleaseSourceSchema,releaseDestinationIdEnvKeys,releaseDestinationMetadataSchema,releaseDestinationProviderSchema,releaseSourceIdEnvKeys,releaseSourceMetadataSchema,releaseSourceProviderSchema,sourceProviderSchema,vercelReleaseDestinationSchema};
1
+ import{cloudflareDestinationIdEnvKeys,cloudflareSourceIdEnvKeys}from"./platforms/cloudflare.mjs";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`}),releaseSourceProviderSchema=z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),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.`}),cloudflareReleaseDestinationSchema=z.object({provider:z.literal(`cloudflare`),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),versionId:z.string().nullable(),scriptName:z.string().nullable(),accountId:z.string().nullable(),deploymentUrl:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable()}).meta({id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`,description:`Release destination metadata for a Cloudflare Workers deployment.`}),cliReleaseDestinationSchema=z.object({provider:z.literal(`cli`),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),deploymentUrl:z.string().nullable()}).meta({id:`CliReleaseDestination`,title:`CliReleaseDestination`,description:`Release destination metadata from the Interfere CLI.`}),releaseDestinationMetadataSchema=z.discriminatedUnion(`provider`,[vercelReleaseDestinationSchema,cloudflareReleaseDestinationSchema,cliReleaseDestinationSchema]).meta({id:`ReleaseDestination`,title:`ReleaseDestination`}),releaseDestinationProviderSchema=z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ReleaseDestinationProvider`,title:`ReleaseDestinationProvider`}),configuredSourceProviderSchema=z.enum([`github`]).meta({id:`ConfiguredSourceProvider`,title:`ConfiguredSourceProvider`}),configuredDestinationProviderSchema=z.enum([`vercel`,`cloudflare`,`cli`]).meta({id:`ConfiguredDestinationProvider`,title:`ConfiguredDestinationProvider`}),sourceProviderSchema=configuredSourceProviderSchema.meta({id:`SourceProvider`,title:`SourceProvider`}),destinationProviderSchema=z.enum([`vercel`,`cloudflare`]).meta({id:`DestinationProvider`,title:`DestinationProvider`}),releaseSourceIdEnvKeys=z.enum([`NEXT_PUBLIC_INTERFERE_BUILD_ID`,`INTERFERE_SOURCE_ID`,`NEXT_BUILD_ID`,...githubSourceIdEnvKeys,...cloudflareSourceIdEnvKeys]).options,releaseDestinationIdEnvKeys=z.enum([`NEXT_PUBLIC_INTERFERE_RELEASE_ID`,`INTERFERE_DESTINATION_ID`,...vercelDestinationIdEnvKeys,...cloudflareDestinationIdEnvKeys,...githubSourceIdEnvKeys]).options;export{cliReleaseDestinationSchema,cliReleaseSourceSchema,cloudflareReleaseDestinationSchema,configuredDestinationProviderSchema,configuredSourceProviderSchema,destinationProviderSchema,githubReleaseSourceSchema,releaseDestinationIdEnvKeys,releaseDestinationMetadataSchema,releaseDestinationProviderSchema,releaseSourceIdEnvKeys,releaseSourceMetadataSchema,releaseSourceProviderSchema,sourceProviderSchema,vercelReleaseDestinationSchema};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const cloudflareDestinationIdEnvKeys=zod.z.enum([`CF_VERSION_ID`,`WORKERS_CI_BUILD_UUID`]).options,cloudflareAccountMetadata=zod.z.object({accountType:zod.z.literal(`account`),id:zod.z.string(),name:zod.z.string().nullable().default(null),avatar:zod.z.string().nullable().default(null),installationUrl:zod.z.string().nullable(),workers:zod.z.record(zod.z.string(),zod.z.string()).default({}),refreshToken:zod.z.string().nullable().default(null),versionCutoffs:zod.z.record(zod.z.string(),zod.z.string()).default({})}),cloudflareMetadataSchema=zod.z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=zod.z.object({name:zod.z.literal(`cloudflare`),metadata:cloudflareMetadataSchema});exports.cloudflareAccountMetadata=cloudflareAccountMetadata,exports.cloudflareDestinationIdEnvKeys=cloudflareDestinationIdEnvKeys,exports.cloudflareIntegration=cloudflareIntegration;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const cloudflareDestinationIdEnvKeys=zod.z.enum([`CF_VERSION_ID`,`WORKERS_CI_BUILD_UUID`]).options,cloudflareSourceIdEnvKeys=zod.z.enum([`WORKERS_CI_COMMIT_SHA`]).options,cloudflareAccountMetadata=zod.z.object({accountType:zod.z.literal(`account`),id:zod.z.string(),name:zod.z.string().nullable().default(null),avatar:zod.z.string().nullable().default(null),installationUrl:zod.z.string().nullable(),workers:zod.z.record(zod.z.string(),zod.z.string()).default({}),refreshToken:zod.z.string().nullable().default(null),versionCutoffs:zod.z.record(zod.z.string(),zod.z.string()).default({})}),cloudflareMetadataSchema=zod.z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=zod.z.object({name:zod.z.literal(`cloudflare`),metadata:cloudflareMetadataSchema});exports.cloudflareAccountMetadata=cloudflareAccountMetadata,exports.cloudflareDestinationIdEnvKeys=cloudflareDestinationIdEnvKeys,exports.cloudflareIntegration=cloudflareIntegration,exports.cloudflareSourceIdEnvKeys=cloudflareSourceIdEnvKeys;
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/integrations/platforms/cloudflare.d.ts
4
4
  declare const cloudflareDestinationIdEnvKeys: ("CF_VERSION_ID" | "WORKERS_CI_BUILD_UUID")[];
5
+ declare const cloudflareSourceIdEnvKeys: "WORKERS_CI_COMMIT_SHA"[];
5
6
  declare const cloudflareAccountMetadata: z.ZodObject<{
6
7
  accountType: z.ZodLiteral<"account">;
7
8
  id: z.ZodString;
@@ -26,4 +27,4 @@ declare const cloudflareIntegration: z.ZodObject<{
26
27
  }, z.core.$strip>], "accountType">;
27
28
  }, z.core.$strip>;
28
29
  //#endregion
29
- export { cloudflareAccountMetadata, cloudflareDestinationIdEnvKeys, cloudflareIntegration };
30
+ export { cloudflareAccountMetadata, cloudflareDestinationIdEnvKeys, cloudflareIntegration, cloudflareSourceIdEnvKeys };
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/integrations/platforms/cloudflare.d.ts
4
4
  declare const cloudflareDestinationIdEnvKeys: ("CF_VERSION_ID" | "WORKERS_CI_BUILD_UUID")[];
5
+ declare const cloudflareSourceIdEnvKeys: "WORKERS_CI_COMMIT_SHA"[];
5
6
  declare const cloudflareAccountMetadata: z.ZodObject<{
6
7
  accountType: z.ZodLiteral<"account">;
7
8
  id: z.ZodString;
@@ -26,4 +27,4 @@ declare const cloudflareIntegration: z.ZodObject<{
26
27
  }, z.core.$strip>], "accountType">;
27
28
  }, z.core.$strip>;
28
29
  //#endregion
29
- export { cloudflareAccountMetadata, cloudflareDestinationIdEnvKeys, cloudflareIntegration };
30
+ export { cloudflareAccountMetadata, cloudflareDestinationIdEnvKeys, cloudflareIntegration, cloudflareSourceIdEnvKeys };
@@ -1 +1 @@
1
- import{z}from"zod";const cloudflareDestinationIdEnvKeys=z.enum([`CF_VERSION_ID`,`WORKERS_CI_BUILD_UUID`]).options,cloudflareAccountMetadata=z.object({accountType:z.literal(`account`),id:z.string(),name:z.string().nullable().default(null),avatar:z.string().nullable().default(null),installationUrl:z.string().nullable(),workers:z.record(z.string(),z.string()).default({}),refreshToken:z.string().nullable().default(null),versionCutoffs:z.record(z.string(),z.string()).default({})}),cloudflareMetadataSchema=z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=z.object({name:z.literal(`cloudflare`),metadata:cloudflareMetadataSchema});export{cloudflareAccountMetadata,cloudflareDestinationIdEnvKeys,cloudflareIntegration};
1
+ import{z}from"zod";const cloudflareDestinationIdEnvKeys=z.enum([`CF_VERSION_ID`,`WORKERS_CI_BUILD_UUID`]).options,cloudflareSourceIdEnvKeys=z.enum([`WORKERS_CI_COMMIT_SHA`]).options,cloudflareAccountMetadata=z.object({accountType:z.literal(`account`),id:z.string(),name:z.string().nullable().default(null),avatar:z.string().nullable().default(null),installationUrl:z.string().nullable(),workers:z.record(z.string(),z.string()).default({}),refreshToken:z.string().nullable().default(null),versionCutoffs:z.record(z.string(),z.string()).default({})}),cloudflareMetadataSchema=z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=z.object({name:z.literal(`cloudflare`),metadata:cloudflareMetadataSchema});export{cloudflareAccountMetadata,cloudflareDestinationIdEnvKeys,cloudflareIntegration,cloudflareSourceIdEnvKeys};
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const API_KEY_PREFIXES=[`interfere_secret_us_`,`interfere_secret_eu_`,`interfere_ak_`],DASHBOARD_KEYS_URL=`https://interfere.com/settings/api-keys`,API_KEY_PREFIX_HINT=API_KEY_PREFIXES.map(prefix=>`\`${prefix}\``).join(` or `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,title:`API key could not be read`,details:[`INTERFERE_API_KEY was sent but the server could not read it.`,`Expected a key starting with ${API_KEY_PREFIX_HINT}.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,title:`API key rejected by server`,details:[`INTERFERE_API_KEY was sent but the server did not recognize it.`,`Verify it matches an active key at ${DASHBOARD_KEYS_URL}.`,`If you recently rotated keys, restart your build with the new value.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,title:`API key missing release scope`,details:[`INTERFERE_API_KEY was recognized but cannot publish release metadata.`,`Create or update the key with \`release:write\` scope at ${DASHBOARD_KEYS_URL}.`,`If you recently changed key scopes, restart your build with the new value.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}exports.API_KEY_PREFIXES=API_KEY_PREFIXES,exports.classifyReleasePipelineError=classifyReleasePipelineError,exports.diagnoseRelease=diagnoseRelease,exports.formatApiKeyPreview=formatApiKeyPreview,exports.isInterfereApiKey=isInterfereApiKey;
@@ -0,0 +1,23 @@
1
+ //#region src/sdk/build-diagnostics.d.ts
2
+ declare const API_KEY_PREFIXES: readonly ["interfere_secret_us_", "interfere_secret_eu_", "interfere_ak_"];
3
+ type ReleaseDiagnosticSeverity = "fatal" | "warn";
4
+ type ReleaseDiagnosticCode = "API_KEY_WRONG_PREFIX" | "API_KEY_UNREADABLE" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "RELEASE_PIPELINE_FAILED";
5
+ interface ReleaseDiagnostic {
6
+ readonly code: ReleaseDiagnosticCode;
7
+ readonly details: readonly string[];
8
+ readonly severity: ReleaseDiagnosticSeverity;
9
+ readonly title: string;
10
+ }
11
+ interface ReleaseDiagnosticContext {
12
+ readonly publicKeyEnvVar: string;
13
+ }
14
+ interface ReleaseDiagnosticInput {
15
+ readonly apiKey?: string;
16
+ readonly errorMessage?: string;
17
+ }
18
+ declare function formatApiKeyPreview(apiKey: string): string;
19
+ declare function isInterfereApiKey(apiKey: string): boolean;
20
+ declare function diagnoseRelease(code: ReleaseDiagnosticCode, ctx: ReleaseDiagnosticContext, input?: ReleaseDiagnosticInput): ReleaseDiagnostic;
21
+ declare function classifyReleasePipelineError(error: unknown): ReleaseDiagnosticCode;
22
+ //#endregion
23
+ export { API_KEY_PREFIXES, ReleaseDiagnostic, ReleaseDiagnosticCode, ReleaseDiagnosticContext, ReleaseDiagnosticInput, ReleaseDiagnosticSeverity, classifyReleasePipelineError, diagnoseRelease, formatApiKeyPreview, isInterfereApiKey };
@@ -0,0 +1,23 @@
1
+ //#region src/sdk/build-diagnostics.d.ts
2
+ declare const API_KEY_PREFIXES: readonly ["interfere_secret_us_", "interfere_secret_eu_", "interfere_ak_"];
3
+ type ReleaseDiagnosticSeverity = "fatal" | "warn";
4
+ type ReleaseDiagnosticCode = "API_KEY_WRONG_PREFIX" | "API_KEY_UNREADABLE" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "RELEASE_PIPELINE_FAILED";
5
+ interface ReleaseDiagnostic {
6
+ readonly code: ReleaseDiagnosticCode;
7
+ readonly details: readonly string[];
8
+ readonly severity: ReleaseDiagnosticSeverity;
9
+ readonly title: string;
10
+ }
11
+ interface ReleaseDiagnosticContext {
12
+ readonly publicKeyEnvVar: string;
13
+ }
14
+ interface ReleaseDiagnosticInput {
15
+ readonly apiKey?: string;
16
+ readonly errorMessage?: string;
17
+ }
18
+ declare function formatApiKeyPreview(apiKey: string): string;
19
+ declare function isInterfereApiKey(apiKey: string): boolean;
20
+ declare function diagnoseRelease(code: ReleaseDiagnosticCode, ctx: ReleaseDiagnosticContext, input?: ReleaseDiagnosticInput): ReleaseDiagnostic;
21
+ declare function classifyReleasePipelineError(error: unknown): ReleaseDiagnosticCode;
22
+ //#endregion
23
+ export { API_KEY_PREFIXES, ReleaseDiagnostic, ReleaseDiagnosticCode, ReleaseDiagnosticContext, ReleaseDiagnosticInput, ReleaseDiagnosticSeverity, classifyReleasePipelineError, diagnoseRelease, formatApiKeyPreview, isInterfereApiKey };
@@ -0,0 +1 @@
1
+ const API_KEY_PREFIXES=[`interfere_secret_us_`,`interfere_secret_eu_`,`interfere_ak_`],DASHBOARD_KEYS_URL=`https://interfere.com/settings/api-keys`,API_KEY_PREFIX_HINT=API_KEY_PREFIXES.map(prefix=>`\`${prefix}\``).join(` or `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,title:`API key could not be read`,details:[`INTERFERE_API_KEY was sent but the server could not read it.`,`Expected a key starting with ${API_KEY_PREFIX_HINT}.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,title:`API key rejected by server`,details:[`INTERFERE_API_KEY was sent but the server did not recognize it.`,`Verify it matches an active key at ${DASHBOARD_KEYS_URL}.`,`If you recently rotated keys, restart your build with the new value.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,title:`API key missing release scope`,details:[`INTERFERE_API_KEY was recognized but cannot publish release metadata.`,`Create or update the key with \`release:write\` scope at ${DASHBOARD_KEYS_URL}.`,`If you recently changed key scopes, restart your build with the new value.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}export{API_KEY_PREFIXES,classifyReleasePipelineError,diagnoseRelease,formatApiKeyPreview,isInterfereApiKey};
@@ -1,2 +1,2 @@
1
1
  Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_runtime=require("./runtime.cjs");function fromEnv(...names){return env=>{for(let name of names){let value=require_sdk_runtime.normalizeEnv(env[name]);if(value)return value}return null}}const PROVIDER_RESOLVERS={vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)],cloudflare:[fromEnv(`CLOUDFLARE_ENV`)]},UNRESOLVED_ENVIRONMENT_MESSAGE=[`Could not determine the deploy environment for this build.`,`Set INTERFERE_ENVIRONMENT (e.g. production or preview), or deploy on a platform that sets VERCEL_ENV / CLOUDFLARE_ENV.`].join(`
2
- `);var DeployEnvironmentError=class extends Error{};function resolveDeployEnvironment(env){let explicit=require_sdk_runtime.normalizeEnv(env.INTERFERE_ENVIRONMENT);if(explicit)return explicit;for(let resolvers of Object.values(PROVIDER_RESOLVERS))for(let resolve of resolvers){let value=resolve(env);if(value)return value}throw new DeployEnvironmentError(UNRESOLVED_ENVIRONMENT_MESSAGE)}exports.DeployEnvironmentError=DeployEnvironmentError,exports.resolveDeployEnvironment=resolveDeployEnvironment;
2
+ `);var DeployEnvironmentError=class extends Error{};function resolveEnvironmentValue(env){let explicit=require_sdk_runtime.normalizeEnv(env.INTERFERE_ENVIRONMENT);if(explicit)return explicit;for(let resolvers of Object.values(PROVIDER_RESOLVERS))for(let resolve of resolvers){let value=resolve(env);if(value)return value}return null}function resolveDeployEnvironment(env){let environment=resolveEnvironmentValue(env);if(!environment)throw new DeployEnvironmentError(UNRESOLVED_ENVIRONMENT_MESSAGE);if(environment.length>32)throw new DeployEnvironmentError(`Deploy environment "${environment}" is ${environment.length} characters; the maximum is 32. Set a shorter INTERFERE_ENVIRONMENT.`);return environment}function applyDeployEnvironment(destination,environment){return environment?destination.provider===`cli`?{...destination,environment}:{...destination,environment,environmentName:environment,environmentTarget:environment}:destination}exports.DEPLOY_ENVIRONMENT_MAX_LENGTH=32,exports.DeployEnvironmentError=DeployEnvironmentError,exports.applyDeployEnvironment=applyDeployEnvironment,exports.resolveDeployEnvironment=resolveDeployEnvironment;
@@ -1,5 +1,9 @@
1
+ import { ReleaseDestinationMetadata } from "../integrations/index.cjs";
2
+
1
3
  //#region src/sdk/deploy-environment.d.ts
4
+ declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
2
5
  declare class DeployEnvironmentError extends Error {}
3
6
  declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string;
7
+ declare function applyDeployEnvironment(destination: ReleaseDestinationMetadata, environment: string | null): ReleaseDestinationMetadata;
4
8
  //#endregion
5
- export { DeployEnvironmentError, resolveDeployEnvironment };
9
+ export { DEPLOY_ENVIRONMENT_MAX_LENGTH, DeployEnvironmentError, applyDeployEnvironment, resolveDeployEnvironment };
@@ -1,5 +1,9 @@
1
+ import { ReleaseDestinationMetadata } from "../integrations/index.mjs";
2
+
1
3
  //#region src/sdk/deploy-environment.d.ts
4
+ declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
2
5
  declare class DeployEnvironmentError extends Error {}
3
6
  declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string;
7
+ declare function applyDeployEnvironment(destination: ReleaseDestinationMetadata, environment: string | null): ReleaseDestinationMetadata;
4
8
  //#endregion
5
- export { DeployEnvironmentError, resolveDeployEnvironment };
9
+ export { DEPLOY_ENVIRONMENT_MAX_LENGTH, DeployEnvironmentError, applyDeployEnvironment, resolveDeployEnvironment };
@@ -1,2 +1,2 @@
1
1
  import{normalizeEnv}from"./runtime.mjs";function fromEnv(...names){return env=>{for(let name of names){let value=normalizeEnv(env[name]);if(value)return value}return null}}const PROVIDER_RESOLVERS={vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)],cloudflare:[fromEnv(`CLOUDFLARE_ENV`)]},UNRESOLVED_ENVIRONMENT_MESSAGE=[`Could not determine the deploy environment for this build.`,`Set INTERFERE_ENVIRONMENT (e.g. production or preview), or deploy on a platform that sets VERCEL_ENV / CLOUDFLARE_ENV.`].join(`
2
- `);var DeployEnvironmentError=class extends Error{};function resolveDeployEnvironment(env){let explicit=normalizeEnv(env.INTERFERE_ENVIRONMENT);if(explicit)return explicit;for(let resolvers of Object.values(PROVIDER_RESOLVERS))for(let resolve of resolvers){let value=resolve(env);if(value)return value}throw new DeployEnvironmentError(UNRESOLVED_ENVIRONMENT_MESSAGE)}export{DeployEnvironmentError,resolveDeployEnvironment};
2
+ `),DEPLOY_ENVIRONMENT_MAX_LENGTH=32;var DeployEnvironmentError=class extends Error{};function resolveEnvironmentValue(env){let explicit=normalizeEnv(env.INTERFERE_ENVIRONMENT);if(explicit)return explicit;for(let resolvers of Object.values(PROVIDER_RESOLVERS))for(let resolve of resolvers){let value=resolve(env);if(value)return value}return null}function resolveDeployEnvironment(env){let environment=resolveEnvironmentValue(env);if(!environment)throw new DeployEnvironmentError(UNRESOLVED_ENVIRONMENT_MESSAGE);if(environment.length>32)throw new DeployEnvironmentError(`Deploy environment "${environment}" is ${environment.length} characters; the maximum is 32. Set a shorter INTERFERE_ENVIRONMENT.`);return environment}function applyDeployEnvironment(destination,environment){return environment?destination.provider===`cli`?{...destination,environment}:{...destination,environment,environmentName:environment,environmentTarget:environment}:destination}export{DEPLOY_ENVIRONMENT_MAX_LENGTH,DeployEnvironmentError,applyDeployEnvironment,resolveDeployEnvironment};
@@ -13,7 +13,7 @@ import { ErrorMechanism, ExceptionValue } from "#sdk/plugins/payload/errors";
13
13
  * server wrappers)
14
14
  *
15
15
  * Leaves (`.onerror`, `.error_boundary`, `.on_request_error`, …) identify
16
- * the specific capture site, which lets the agent's skill classifier reason
16
+ * the specific capture site, which lets Interfere's skill classifier reason
17
17
  * about what "kind" of event this is without string-matching loose names.
18
18
  */
19
19
  declare const MECHANISM_TYPE: {
@@ -13,7 +13,7 @@ import { ErrorMechanism, ExceptionValue } from "#sdk/plugins/payload/errors";
13
13
  * server wrappers)
14
14
  *
15
15
  * Leaves (`.onerror`, `.error_boundary`, `.on_request_error`, …) identify
16
- * the specific capture site, which lets the agent's skill classifier reason
16
+ * the specific capture site, which lets Interfere's skill classifier reason
17
17
  * about what "kind" of event this is without string-matching loose names.
18
18
  */
19
19
  declare const MECHANISM_TYPE: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interfere/types",
3
- "version": "9.0.3-canary.2",
3
+ "version": "9.0.3-canary.4",
4
4
  "license": "MIT",
5
5
  "description": "TypeScript & Zod types for Interfere",
6
6
  "keywords": [
@@ -152,10 +152,11 @@
152
152
  "zod": "^4.4.3"
153
153
  },
154
154
  "devDependencies": {
155
+ "@interfere/sdk": "^11.0.0-canary.4",
155
156
  "@interfere/test-utils": "^9.0.0",
156
157
  "@interfere/typescript-config": "^9.0.0",
157
- "@types/node": "^25.9.3",
158
- "@typescript/native-preview": "7.0.0-dev.20260617.2",
158
+ "@types/node": "^26.0.0",
159
+ "@typescript/native-preview": "7.0.0-dev.20260623.1",
159
160
  "@vitest/coverage-v8": "4.1.9",
160
161
  "tsdown": "^0.22.2",
161
162
  "vitest": "4.1.9"