@interfere/types 10.2.2 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/session.cjs +1 -1
- package/dist/data/session.d.cts +2 -1
- package/dist/data/session.d.mts +2 -1
- package/dist/data/session.mjs +1 -1
- package/dist/data/source-map-batch.cjs +1 -1
- package/dist/data/source-map-batch.mjs +1 -1
- package/dist/integrations/index.cjs +1 -1
- package/dist/integrations/index.d.cts +4 -0
- package/dist/integrations/index.d.mts +4 -0
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/platforms/cloudflare.cjs +1 -1
- package/dist/integrations/platforms/cloudflare.d.cts +6 -2
- package/dist/integrations/platforms/cloudflare.d.mts +6 -2
- package/dist/integrations/platforms/cloudflare.mjs +1 -1
- package/dist/internal/runtime-inference.cjs +1 -0
- package/dist/internal/runtime-inference.d.cts +11 -0
- package/dist/internal/runtime-inference.d.mts +11 -0
- package/dist/internal/runtime-inference.mjs +1 -0
- package/dist/releases/build-telemetry.cjs +1 -1
- package/dist/releases/build-telemetry.d.cts +1 -0
- package/dist/releases/build-telemetry.d.mts +1 -0
- package/dist/releases/build-telemetry.mjs +1 -1
- package/dist/releases/definition.d.cts +2 -0
- package/dist/releases/definition.d.mts +2 -0
- package/dist/sdk/build-diagnostics.cjs +1 -1
- package/dist/sdk/build-diagnostics.d.cts +37 -14
- package/dist/sdk/build-diagnostics.d.mts +37 -14
- package/dist/sdk/build-diagnostics.mjs +1 -1
- package/dist/sdk/deploy-environment.cjs +1 -2
- package/dist/sdk/deploy-environment.d.cts +3 -1
- package/dist/sdk/deploy-environment.d.mts +3 -1
- package/dist/sdk/deploy-environment.mjs +1 -2
- package/dist/sdk/envelope.d.cts +12 -12
- package/dist/sdk/envelope.d.mts +12 -12
- package/dist/sdk/errors.d.cts +3 -34
- package/dist/sdk/errors.d.mts +3 -34
- package/dist/sdk/injected-globals.cjs +1 -1
- package/dist/sdk/injected-globals.d.cts +1 -0
- package/dist/sdk/injected-globals.d.mts +1 -0
- package/dist/sdk/injected-globals.mjs +1 -1
- package/dist/sdk/runtime.cjs +1 -1
- package/dist/sdk/runtime.mjs +1 -1
- package/dist/sdk/service-name.cjs +1 -0
- package/dist/sdk/service-name.d.cts +8 -0
- package/dist/sdk/service-name.d.mts +8 -0
- package/dist/sdk/service-name.mjs +1 -0
- package/dist/sdk/throw-site.cjs +2 -0
- package/dist/sdk/throw-site.d.cts +14 -0
- package/dist/sdk/throw-site.d.mts +14 -0
- package/dist/sdk/throw-site.mjs +2 -0
- package/dist/sdk/url-redaction.cjs +1 -0
- package/dist/sdk/url-redaction.d.cts +58 -0
- package/dist/sdk/url-redaction.d.mts +58 -0
- package/dist/sdk/url-redaction.mjs +1 -0
- package/package.json +11 -12
package/dist/data/session.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const storedSessionIdSchema=zod.z.string().min(1).brand(),wireSessionIdSchema=zod.z.union([zod.z.uuidv7(),zod.z.templateLiteral([`server_`,zod.z.uuidv7()])]),sessionIdSchema=storedSessionIdSchema.and(wireSessionIdSchema).meta({description:`UUIDv7 (from the client SDK) or server_<uuidv7> (server-side fallback).`,id:`SessionId`,title:`SessionId`});exports.sessionIdSchema=sessionIdSchema,exports.storedSessionIdSchema=storedSessionIdSchema;
|
package/dist/data/session.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/data/session.d.ts
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const storedSessionIdSchema: z.core.$ZodBranded<z.ZodString, "SessionId", "out">;
|
|
4
|
+
export declare const sessionIdSchema: z.ZodIntersection<z.core.$ZodBranded<z.ZodString, "SessionId", "out">, z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>>;
|
|
4
5
|
export type SessionId = z.infer<typeof sessionIdSchema>;
|
|
5
6
|
//#endregion
|
package/dist/data/session.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/data/session.d.ts
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const storedSessionIdSchema: z.core.$ZodBranded<z.ZodString, "SessionId", "out">;
|
|
4
|
+
export declare const sessionIdSchema: z.ZodIntersection<z.core.$ZodBranded<z.ZodString, "SessionId", "out">, z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>>;
|
|
4
5
|
export type SessionId = z.infer<typeof sessionIdSchema>;
|
|
5
6
|
//#endregion
|
package/dist/data/session.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"zod";const
|
|
1
|
+
import{z}from"zod";const storedSessionIdSchema=z.string().min(1).brand(),wireSessionIdSchema=z.union([z.uuidv7(),z.templateLiteral([`server_`,z.uuidv7()])]),sessionIdSchema=storedSessionIdSchema.and(wireSessionIdSchema).meta({description:`UUIDv7 (from the client SDK) or server_<uuidv7> (server-side fallback).`,id:`SessionId`,title:`SessionId`});export{sessionIdSchema,storedSessionIdSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});async function sourceMapBatchDigest(batch){let files=batch.files.toSorted((left,right)=>left.path<right.path?-1:Number(left.path>right.path)),content=JSON.stringify({bundler:batch.bundler,sourceFileCount:batch.sourceFileCount??null,files:files.map(({path,hash,debugId,chunkUrl})=>[path,hash,debugId,chunkUrl])}),digest=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(content));return
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let _interfere_helpers_hex=require("@interfere/helpers/hex");async function sourceMapBatchDigest(batch){let files=batch.files.toSorted((left,right)=>left.path<right.path?-1:Number(left.path>right.path)),content=JSON.stringify({bundler:batch.bundler,sourceFileCount:batch.sourceFileCount??null,files:files.map(({path,hash,debugId,chunkUrl})=>[path,hash,debugId,chunkUrl])}),digest=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(content));return(0,_interfere_helpers_hex.bytesToHex)(digest)}exports.sourceMapBatchDigest=sourceMapBatchDigest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
async function sourceMapBatchDigest(batch){let files=batch.files.toSorted((left,right)=>left.path<right.path?-1:Number(left.path>right.path)),content=JSON.stringify({bundler:batch.bundler,sourceFileCount:batch.sourceFileCount??null,files:files.map(({path,hash,debugId,chunkUrl})=>[path,hash,debugId,chunkUrl])}),digest=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(content));return
|
|
1
|
+
import{bytesToHex}from"@interfere/helpers/hex";async function sourceMapBatchDigest(batch){let files=batch.files.toSorted((left,right)=>left.path<right.path?-1:Number(left.path>right.path)),content=JSON.stringify({bundler:batch.bundler,sourceFileCount:batch.sourceFileCount??null,files:files.map(({path,hash,debugId,chunkUrl})=>[path,hash,debugId,chunkUrl])}),digest=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(content));return bytesToHex(digest)}export{sourceMapBatchDigest};
|
|
@@ -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({branch:zod.z.string(),commitMessage:zod.z.string(),commitSha:zod.z.string().nullable(),provider:zod.z.literal(`github`),runId:zod.z.string().nullable().optional(),runUrl:zod.z.string().nullable().optional(),runnerName:zod.z.string().nullable().optional()}).meta({description:`Release source metadata coming from GitHub.`,id:`GithubReleaseSource`,title:`GithubReleaseSource`}),cliReleaseSourceSchema=zod.z.object({commitMessage:zod.z.string().nullable(),commitRef:zod.z.string().nullable(),commitSha:zod.z.string().nullable(),commitUrl:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable().optional(),environment:zod.z.string().nullable().optional(),provider:zod.z.literal(`cli`),runId:zod.z.string().nullable(),runUrl:zod.z.string().nullable(),runnerName:zod.z.string().nullable()}).meta({description:`Release source metadata from the Interfere CLI.`,id:`CliReleaseSource`,title:`CliReleaseSource`}),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({deploymentId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable(),provider:zod.z.literal(`vercel`)}).meta({description:`Release destination metadata for a Vercel deployment.`,id:`VercelReleaseDestination`,title:`VercelReleaseDestination`}),cloudflareReleaseDestinationSchema=zod.z.object({accountId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable(),provider:zod.z.literal(`cloudflare`),scriptName:zod.z.string().nullable(),versionId:zod.z.string().nullable()}).meta({description:`Release destination metadata for a Cloudflare Workers deployment.`,id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`}),cliReleaseDestinationSchema=zod.z.object({deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),provider:zod.z.literal(`cli`)}).meta({description:`Release destination metadata from the Interfere CLI.`,id:`CliReleaseDestination`,title:`CliReleaseDestination`}),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`,`ghe_cloud`,`ghe_server`]).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;
|
|
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({branch:zod.z.string(),commitMessage:zod.z.string(),commitSha:zod.z.string().nullable(),provider:zod.z.literal(`github`),runId:zod.z.string().nullable().optional(),runUrl:zod.z.string().nullable().optional(),runnerName:zod.z.string().nullable().optional()}).meta({description:`Release source metadata coming from GitHub.`,id:`GithubReleaseSource`,title:`GithubReleaseSource`}),cliReleaseSourceSchema=zod.z.object({commitMessage:zod.z.string().nullable(),commitRef:zod.z.string().nullable(),commitSha:zod.z.string().nullable(),commitUrl:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable().optional(),environment:zod.z.string().nullable().optional(),provider:zod.z.literal(`cli`),runId:zod.z.string().nullable(),runUrl:zod.z.string().nullable(),runnerName:zod.z.string().nullable()}).meta({description:`Release source metadata from the Interfere CLI.`,id:`CliReleaseSource`,title:`CliReleaseSource`}),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({deploymentId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable(),provider:zod.z.literal(`vercel`)}).meta({description:`Release destination metadata for a Vercel deployment.`,id:`VercelReleaseDestination`,title:`VercelReleaseDestination`}),cloudflareReleaseDestinationSchema=zod.z.object({accountId:zod.z.string().nullable(),deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),environmentName:zod.z.string().nullable(),environmentTarget:zod.z.string().nullable(),provider:zod.z.literal(`cloudflare`),deploymentId:zod.z.string().nullable().optional(),trafficPercentage:zod.z.number().min(0).max(100).nullable().optional(),scriptName:zod.z.string().nullable(),versionId:zod.z.string().nullable()}).meta({description:`Release destination metadata for a Cloudflare Workers deployment.`,id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`}),cliReleaseDestinationSchema=zod.z.object({deploymentUrl:zod.z.string().nullable(),destinationReleaseId:zod.z.string().nullable(),environment:zod.z.string().nullable(),provider:zod.z.literal(`cli`)}).meta({description:`Release destination metadata from the Interfere CLI.`,id:`CliReleaseDestination`,title:`CliReleaseDestination`}),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`,`ghe_cloud`,`ghe_server`]).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;
|
|
@@ -64,6 +64,8 @@ export declare const cloudflareReleaseDestinationSchema: z.ZodObject<{
|
|
|
64
64
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
65
65
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
66
66
|
provider: z.ZodLiteral<"cloudflare">;
|
|
67
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
67
69
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
68
70
|
versionId: z.ZodNullable<z.ZodString>;
|
|
69
71
|
}, z.core.$strip>;
|
|
@@ -89,6 +91,8 @@ export declare const releaseDestinationMetadataSchema: z.ZodDiscriminatedUnion<[
|
|
|
89
91
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
90
92
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
91
93
|
provider: z.ZodLiteral<"cloudflare">;
|
|
94
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92
96
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
93
97
|
versionId: z.ZodNullable<z.ZodString>;
|
|
94
98
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -64,6 +64,8 @@ export declare const cloudflareReleaseDestinationSchema: z.ZodObject<{
|
|
|
64
64
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
65
65
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
66
66
|
provider: z.ZodLiteral<"cloudflare">;
|
|
67
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
67
69
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
68
70
|
versionId: z.ZodNullable<z.ZodString>;
|
|
69
71
|
}, z.core.$strip>;
|
|
@@ -89,6 +91,8 @@ export declare const releaseDestinationMetadataSchema: z.ZodDiscriminatedUnion<[
|
|
|
89
91
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
90
92
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
91
93
|
provider: z.ZodLiteral<"cloudflare">;
|
|
94
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92
96
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
93
97
|
versionId: z.ZodNullable<z.ZodString>;
|
|
94
98
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
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({branch:z.string(),commitMessage:z.string(),commitSha:z.string().nullable(),provider:z.literal(`github`),runId:z.string().nullable().optional(),runUrl:z.string().nullable().optional(),runnerName:z.string().nullable().optional()}).meta({description:`Release source metadata coming from GitHub.`,id:`GithubReleaseSource`,title:`GithubReleaseSource`}),cliReleaseSourceSchema=z.object({commitMessage:z.string().nullable(),commitRef:z.string().nullable(),commitSha:z.string().nullable(),commitUrl:z.string().nullable(),deploymentUrl:z.string().nullable().optional(),environment:z.string().nullable().optional(),provider:z.literal(`cli`),runId:z.string().nullable(),runUrl:z.string().nullable(),runnerName:z.string().nullable()}).meta({description:`Release source metadata from the Interfere CLI.`,id:`CliReleaseSource`,title:`CliReleaseSource`}),releaseSourceMetadataSchema=z.discriminatedUnion(`provider`,[githubReleaseSourceSchema,cliReleaseSourceSchema]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),releaseSourceProviderSchema=z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),vercelReleaseDestinationSchema=z.object({deploymentId:z.string().nullable(),deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable(),provider:z.literal(`vercel`)}).meta({description:`Release destination metadata for a Vercel deployment.`,id:`VercelReleaseDestination`,title:`VercelReleaseDestination`}),cloudflareReleaseDestinationSchema=z.object({accountId:z.string().nullable(),deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable(),provider:z.literal(`cloudflare`),scriptName:z.string().nullable(),versionId:z.string().nullable()}).meta({description:`Release destination metadata for a Cloudflare Workers deployment.`,id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`}),cliReleaseDestinationSchema=z.object({deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),provider:z.literal(`cli`)}).meta({description:`Release destination metadata from the Interfere CLI.`,id:`CliReleaseDestination`,title:`CliReleaseDestination`}),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`,`ghe_cloud`,`ghe_server`]).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
|
+
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({branch:z.string(),commitMessage:z.string(),commitSha:z.string().nullable(),provider:z.literal(`github`),runId:z.string().nullable().optional(),runUrl:z.string().nullable().optional(),runnerName:z.string().nullable().optional()}).meta({description:`Release source metadata coming from GitHub.`,id:`GithubReleaseSource`,title:`GithubReleaseSource`}),cliReleaseSourceSchema=z.object({commitMessage:z.string().nullable(),commitRef:z.string().nullable(),commitSha:z.string().nullable(),commitUrl:z.string().nullable(),deploymentUrl:z.string().nullable().optional(),environment:z.string().nullable().optional(),provider:z.literal(`cli`),runId:z.string().nullable(),runUrl:z.string().nullable(),runnerName:z.string().nullable()}).meta({description:`Release source metadata from the Interfere CLI.`,id:`CliReleaseSource`,title:`CliReleaseSource`}),releaseSourceMetadataSchema=z.discriminatedUnion(`provider`,[githubReleaseSourceSchema,cliReleaseSourceSchema]).meta({id:`ReleaseSource`,title:`ReleaseSource`}),releaseSourceProviderSchema=z.enum([`github`,`cli`]).meta({id:`ReleaseSourceProvider`,title:`ReleaseSourceProvider`}),vercelReleaseDestinationSchema=z.object({deploymentId:z.string().nullable(),deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable(),provider:z.literal(`vercel`)}).meta({description:`Release destination metadata for a Vercel deployment.`,id:`VercelReleaseDestination`,title:`VercelReleaseDestination`}),cloudflareReleaseDestinationSchema=z.object({accountId:z.string().nullable(),deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),environmentName:z.string().nullable(),environmentTarget:z.string().nullable(),provider:z.literal(`cloudflare`),deploymentId:z.string().nullable().optional(),trafficPercentage:z.number().min(0).max(100).nullable().optional(),scriptName:z.string().nullable(),versionId:z.string().nullable()}).meta({description:`Release destination metadata for a Cloudflare Workers deployment.`,id:`CloudflareReleaseDestination`,title:`CloudflareReleaseDestination`}),cliReleaseDestinationSchema=z.object({deploymentUrl:z.string().nullable(),destinationReleaseId:z.string().nullable(),environment:z.string().nullable(),provider:z.literal(`cli`)}).meta({description:`Release destination metadata from the Interfere CLI.`,id:`CliReleaseDestination`,title:`CliReleaseDestination`}),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`,`ghe_cloud`,`ghe_server`]).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,cloudflareSourceIdEnvKeys=zod.z.enum([`WORKERS_CI_COMMIT_SHA`]).options,cloudflareAccountMetadata=zod.z.object({accountType:zod.z.literal(`account`),avatar:zod.z.string().nullable().default(null),id:zod.z.string(),installationUrl:zod.z.string().nullable(),name:zod.z.string().nullable().default(null),
|
|
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`),avatar:zod.z.string().nullable().default(null),id:zod.z.string(),installationUrl:zod.z.string().nullable(),name:zod.z.string().nullable().default(null),deploymentCutoffs:zod.z.record(zod.z.string(),zod.z.string()).optional(),versionCutoffs:zod.z.record(zod.z.string(),zod.z.string()).default({}),workers:zod.z.record(zod.z.string(),zod.z.string()).default({}),assetsOnlyWorkers:zod.z.array(zod.z.string()).optional(),workersDiscoveredAt:zod.z.number().int().nonnegative().optional()}),cloudflareMetadataSchema=zod.z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=zod.z.object({metadata:cloudflareMetadataSchema,name:zod.z.literal(`cloudflare`)});exports.cloudflareAccountMetadata=cloudflareAccountMetadata,exports.cloudflareDestinationIdEnvKeys=cloudflareDestinationIdEnvKeys,exports.cloudflareIntegration=cloudflareIntegration,exports.cloudflareSourceIdEnvKeys=cloudflareSourceIdEnvKeys;
|
|
@@ -8,9 +8,11 @@ export declare const cloudflareAccountMetadata: z.ZodObject<{
|
|
|
8
8
|
id: z.ZodString;
|
|
9
9
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
10
10
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
|
-
|
|
11
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
12
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
13
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
|
+
assetsOnlyWorkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
workersDiscoveredAt: z.ZodOptional<z.ZodNumber>;
|
|
14
16
|
}, z.core.$strip>;
|
|
15
17
|
export declare const cloudflareIntegration: z.ZodObject<{
|
|
16
18
|
metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -19,9 +21,11 @@ export declare const cloudflareIntegration: z.ZodObject<{
|
|
|
19
21
|
id: z.ZodString;
|
|
20
22
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
21
23
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
|
|
24
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
25
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
26
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
+
assetsOnlyWorkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
+
workersDiscoveredAt: z.ZodOptional<z.ZodNumber>;
|
|
25
29
|
}, z.core.$strip>], "accountType">;
|
|
26
30
|
name: z.ZodLiteral<"cloudflare">;
|
|
27
31
|
}, z.core.$strip>;
|
|
@@ -8,9 +8,11 @@ export declare const cloudflareAccountMetadata: z.ZodObject<{
|
|
|
8
8
|
id: z.ZodString;
|
|
9
9
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
10
10
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
|
-
|
|
11
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
12
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
13
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
|
+
assetsOnlyWorkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
workersDiscoveredAt: z.ZodOptional<z.ZodNumber>;
|
|
14
16
|
}, z.core.$strip>;
|
|
15
17
|
export declare const cloudflareIntegration: z.ZodObject<{
|
|
16
18
|
metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -19,9 +21,11 @@ export declare const cloudflareIntegration: z.ZodObject<{
|
|
|
19
21
|
id: z.ZodString;
|
|
20
22
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
21
23
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
|
|
24
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
25
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
26
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
+
assetsOnlyWorkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
+
workersDiscoveredAt: z.ZodOptional<z.ZodNumber>;
|
|
25
29
|
}, z.core.$strip>], "accountType">;
|
|
26
30
|
name: z.ZodLiteral<"cloudflare">;
|
|
27
31
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
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`),avatar:z.string().nullable().default(null),id:z.string(),installationUrl:z.string().nullable(),name:z.string().nullable().default(null),
|
|
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`),avatar:z.string().nullable().default(null),id:z.string(),installationUrl:z.string().nullable(),name:z.string().nullable().default(null),deploymentCutoffs:z.record(z.string(),z.string()).optional(),versionCutoffs:z.record(z.string(),z.string()).default({}),workers:z.record(z.string(),z.string()).default({}),assetsOnlyWorkers:z.array(z.string()).optional(),workersDiscoveredAt:z.number().int().nonnegative().optional()}),cloudflareMetadataSchema=z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=z.object({metadata:cloudflareMetadataSchema,name:z.literal(`cloudflare`)});export{cloudflareAccountMetadata,cloudflareDestinationIdEnvKeys,cloudflareIntegration,cloudflareSourceIdEnvKeys};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function inferRuntimeFromEvidence(evidence){return evidence.hasWindow&&evidence.hasDocument&&evidence.hasNavigator?`browser`:typeof evidence.edgeRuntime==`string`||evidence.nextRuntime===`edge`?`edge`:typeof evidence.nodeVersion==`string`?`node`:null}exports.inferRuntimeFromEvidence=inferRuntimeFromEvidence;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/internal/runtime-inference.d.ts
|
|
2
|
+
interface RuntimeEvidence {
|
|
3
|
+
hasWindow: boolean;
|
|
4
|
+
hasDocument: boolean;
|
|
5
|
+
hasNavigator: boolean;
|
|
6
|
+
edgeRuntime?: unknown;
|
|
7
|
+
nodeVersion?: unknown;
|
|
8
|
+
nextRuntime?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export declare function inferRuntimeFromEvidence(evidence: RuntimeEvidence): "browser" | "edge" | "node" | null;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/internal/runtime-inference.d.ts
|
|
2
|
+
interface RuntimeEvidence {
|
|
3
|
+
hasWindow: boolean;
|
|
4
|
+
hasDocument: boolean;
|
|
5
|
+
hasNavigator: boolean;
|
|
6
|
+
edgeRuntime?: unknown;
|
|
7
|
+
nodeVersion?: unknown;
|
|
8
|
+
nextRuntime?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export declare function inferRuntimeFromEvidence(evidence: RuntimeEvidence): "browser" | "edge" | "node" | null;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function inferRuntimeFromEvidence(evidence){return evidence.hasWindow&&evidence.hasDocument&&evidence.hasNavigator?`browser`:typeof evidence.edgeRuntime==`string`||evidence.nextRuntime===`edge`?`edge`:typeof evidence.nodeVersion==`string`?`node`:null}export{inferRuntimeFromEvidence};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const releaseBuildResultSchema=zod.z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=zod.z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=zod.z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});exports.faultForBuildResult=faultForBuildResult,exports.releaseBuildFaultSchema=releaseBuildFaultSchema,exports.releaseBuildResultSchema=releaseBuildResultSchema,exports.releaseBuildStepSchema=releaseBuildStepSchema;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const releaseBuildResultSchema=zod.z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`api_key_surface_required`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=zod.z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`api_key_surface_required`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=zod.z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});exports.faultForBuildResult=faultForBuildResult,exports.releaseBuildFaultSchema=releaseBuildFaultSchema,exports.releaseBuildResultSchema=releaseBuildResultSchema,exports.releaseBuildStepSchema=releaseBuildStepSchema;
|
|
@@ -9,6 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
export declare const releaseBuildResultSchema: z.ZodEnum<{
|
|
10
10
|
api_key_rejected: "api_key_rejected";
|
|
11
11
|
api_key_scope_mismatch: "api_key_scope_mismatch";
|
|
12
|
+
api_key_surface_required: "api_key_surface_required";
|
|
12
13
|
api_key_unreadable: "api_key_unreadable";
|
|
13
14
|
api_key_wrong_prefix: "api_key_wrong_prefix";
|
|
14
15
|
client_maps_unmapped: "client_maps_unmapped";
|
|
@@ -9,6 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
export declare const releaseBuildResultSchema: z.ZodEnum<{
|
|
10
10
|
api_key_rejected: "api_key_rejected";
|
|
11
11
|
api_key_scope_mismatch: "api_key_scope_mismatch";
|
|
12
|
+
api_key_surface_required: "api_key_surface_required";
|
|
12
13
|
api_key_unreadable: "api_key_unreadable";
|
|
13
14
|
api_key_wrong_prefix: "api_key_wrong_prefix";
|
|
14
15
|
client_maps_unmapped: "client_maps_unmapped";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"zod";const releaseBuildResultSchema=z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});export{faultForBuildResult,releaseBuildFaultSchema,releaseBuildResultSchema,releaseBuildStepSchema};
|
|
1
|
+
import{z}from"zod";const releaseBuildResultSchema=z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`api_key_surface_required`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`api_key_surface_required`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});export{faultForBuildResult,releaseBuildFaultSchema,releaseBuildResultSchema,releaseBuildStepSchema};
|
|
@@ -26,6 +26,8 @@ export declare const createReleaseRequest: z.ZodObject<{
|
|
|
26
26
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
27
27
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
28
28
|
provider: z.ZodLiteral<"cloudflare">;
|
|
29
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
29
31
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
30
32
|
versionId: z.ZodNullable<z.ZodString>;
|
|
31
33
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -26,6 +26,8 @@ export declare const createReleaseRequest: z.ZodObject<{
|
|
|
26
26
|
environmentName: z.ZodNullable<z.ZodString>;
|
|
27
27
|
environmentTarget: z.ZodNullable<z.ZodString>;
|
|
28
28
|
provider: z.ZodLiteral<"cloudflare">;
|
|
29
|
+
deploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
trafficPercentage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
29
31
|
scriptName: z.ZodNullable<z.ZodString>;
|
|
30
32
|
versionId: z.ZodNullable<z.ZodString>;
|
|
31
33
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1 +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 `)
|
|
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 `),BUILD_CONTINUES=`The build continues, but this release has no source maps in Interfere.`;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))}function publicKeyHint(ctx){return`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`}function checkReleaseConfig(ctx,input){let{apiKey,commitSha,releaseSlug}=input;return apiKey?isInterfereApiKey(apiKey)?commitSha&&releaseSlug?{status:`ok`,apiKey,commitSha,releaseSlug}:{status:`fail`,title:`Commit SHA missing`,details:[`Could not resolve a commit SHA from environment variables or git.`,"Set `INTERFERE_SOURCE_ID`, ensure your CI exposes its git SHA env var (e.g. `VERCEL_GIT_COMMIT_SHA`, `GITHUB_SHA`), or run inside a git checkout."]}:{status:`fail`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(apiKey)}\`.`,publicKeyHint(ctx),`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}:{status:`skip`,title:`Skipping release`,details:[`INTERFERE_API_KEY is not set, so this build has no release or source maps in Interfere.`,`Set INTERFERE_API_KEY on builds that you deploy.`,`See: ${ctx.docsUrl}`]}}const CATALOG={API_KEY_NETWORK_DENIED:()=>({code:`API_KEY_NETWORK_DENIED`,severity:`error`,title:`Build machine blocked by network policy`,details:[`INTERFERE_API_KEY was recognized, but the workspace network policy blocks this build machine.`,`Allow your CI egress IPs or ASN under Network access at https://interfere.com/settings/security.`,BUILD_CONTINUES]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`error`,title:`Secret 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.`,BUILD_CONTINUES]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`error`,title:`Secret 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.`,BUILD_CONTINUES]}),API_KEY_SURFACE_REQUIRED:ctx=>({code:`API_KEY_SURFACE_REQUIRED`,severity:`error`,title:`Public key needed for a workspace secret key`,details:[`INTERFERE_API_KEY is a workspace secret key, so the build must also name the app it publishes for.`,`Set \`${ctx.publicKeyEnvVar}\` to this app's public key on the build machine.`,BUILD_CONTINUES]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`error`,title:`Secret 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}.`,publicKeyHint(ctx),`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`,BUILD_CONTINUES]}),RELEASE_PIPELINE_FAILED:(_ctx,errorMessage)=>({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: ${errorMessage}`]})},API_CODE_TO_DIAGNOSTIC=new Map(Object.entries({AUTH_AK_INVALID:`API_KEY_REJECTED`,AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`,AUTH_AK_SURFACE_REQUIRED:`API_KEY_SURFACE_REQUIRED`,AUTH_MISSING:`API_KEY_UNREADABLE`,NETWORK_ACCESS_DENIED:`API_KEY_NETWORK_DENIED`}));function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let body=`body`in error?error.body:void 0;if(typeof body!=`object`||!body)return`RELEASE_PIPELINE_FAILED`;let code=`code`in body?body.code:void 0;return typeof code==`string`?API_CODE_TO_DIAGNOSTIC.get(code)??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}function diagnoseRelease(ctx,error){let errorMessage=error instanceof Error?error.message:String(error);return CATALOG[classifyReleasePipelineError(error)](ctx,errorMessage)}exports.API_KEY_PREFIXES=API_KEY_PREFIXES,exports.checkReleaseConfig=checkReleaseConfig,exports.classifyReleasePipelineError=classifyReleasePipelineError,exports.diagnoseRelease=diagnoseRelease,exports.formatApiKeyPreview=formatApiKeyPreview,exports.isInterfereApiKey=isInterfereApiKey;
|
|
@@ -1,22 +1,45 @@
|
|
|
1
|
+
import { ReleaseSlug } from "../releases/slug.cjs";
|
|
1
2
|
//#region src/sdk/build-diagnostics.d.ts
|
|
2
3
|
export declare const API_KEY_PREFIXES: readonly ["interfere_secret_us_", "interfere_secret_eu_", "interfere_ak_"];
|
|
3
|
-
export type ReleaseDiagnosticSeverity = "fatal" | "warn";
|
|
4
|
-
export type ReleaseDiagnosticCode = "API_KEY_WRONG_PREFIX" | "API_KEY_UNREADABLE" | "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "RELEASE_PIPELINE_FAILED";
|
|
5
|
-
export interface ReleaseDiagnostic {
|
|
6
|
-
readonly code: ReleaseDiagnosticCode;
|
|
7
|
-
readonly details: readonly string[];
|
|
8
|
-
readonly severity: ReleaseDiagnosticSeverity;
|
|
9
|
-
readonly title: string;
|
|
10
|
-
}
|
|
11
4
|
export interface ReleaseDiagnosticContext {
|
|
12
5
|
readonly publicKeyEnvVar: string;
|
|
13
|
-
|
|
14
|
-
export interface ReleaseDiagnosticInput {
|
|
15
|
-
readonly apiKey?: string;
|
|
16
|
-
readonly errorMessage?: string;
|
|
6
|
+
readonly docsUrl: string;
|
|
17
7
|
}
|
|
18
8
|
export declare function formatApiKeyPreview(apiKey: string): string;
|
|
19
9
|
export declare function isInterfereApiKey(apiKey: string): boolean;
|
|
20
|
-
export declare function
|
|
21
|
-
|
|
10
|
+
export declare function checkReleaseConfig(ctx: ReleaseDiagnosticContext, input: {
|
|
11
|
+
readonly apiKey: string | null | undefined;
|
|
12
|
+
readonly commitSha: string | null;
|
|
13
|
+
readonly releaseSlug: ReleaseSlug | null;
|
|
14
|
+
}): {
|
|
15
|
+
status: "skip";
|
|
16
|
+
title: string;
|
|
17
|
+
details: string[];
|
|
18
|
+
apiKey?: never;
|
|
19
|
+
commitSha?: never;
|
|
20
|
+
releaseSlug?: never;
|
|
21
|
+
} | {
|
|
22
|
+
status: "fail";
|
|
23
|
+
title: string;
|
|
24
|
+
details: string[];
|
|
25
|
+
apiKey?: never;
|
|
26
|
+
commitSha?: never;
|
|
27
|
+
releaseSlug?: never;
|
|
28
|
+
} | {
|
|
29
|
+
title?: never;
|
|
30
|
+
details?: never;
|
|
31
|
+
status: "ok";
|
|
32
|
+
apiKey: string;
|
|
33
|
+
commitSha: string;
|
|
34
|
+
releaseSlug: `rel_${string}` & import("zod").$brand<"ReleaseSlug">;
|
|
35
|
+
};
|
|
36
|
+
export type ReleaseDiagnosticCode = "API_KEY_UNREADABLE" | "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "API_KEY_SURFACE_REQUIRED" | "RELEASE_PIPELINE_FAILED";
|
|
37
|
+
export interface ReleaseDiagnostic {
|
|
38
|
+
readonly code: ReleaseDiagnosticCode;
|
|
39
|
+
readonly details: readonly string[];
|
|
40
|
+
readonly severity: "error" | "warn";
|
|
41
|
+
readonly title: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function classifyReleasePipelineError(error: unknown): "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "API_KEY_SURFACE_REQUIRED" | "API_KEY_UNREADABLE" | "RELEASE_PIPELINE_FAILED";
|
|
44
|
+
export declare function diagnoseRelease(ctx: ReleaseDiagnosticContext, error: unknown): ReleaseDiagnostic;
|
|
22
45
|
//#endregion
|
|
@@ -1,22 +1,45 @@
|
|
|
1
|
+
import { ReleaseSlug } from "../releases/slug.mjs";
|
|
1
2
|
//#region src/sdk/build-diagnostics.d.ts
|
|
2
3
|
export declare const API_KEY_PREFIXES: readonly ["interfere_secret_us_", "interfere_secret_eu_", "interfere_ak_"];
|
|
3
|
-
export type ReleaseDiagnosticSeverity = "fatal" | "warn";
|
|
4
|
-
export type ReleaseDiagnosticCode = "API_KEY_WRONG_PREFIX" | "API_KEY_UNREADABLE" | "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "RELEASE_PIPELINE_FAILED";
|
|
5
|
-
export interface ReleaseDiagnostic {
|
|
6
|
-
readonly code: ReleaseDiagnosticCode;
|
|
7
|
-
readonly details: readonly string[];
|
|
8
|
-
readonly severity: ReleaseDiagnosticSeverity;
|
|
9
|
-
readonly title: string;
|
|
10
|
-
}
|
|
11
4
|
export interface ReleaseDiagnosticContext {
|
|
12
5
|
readonly publicKeyEnvVar: string;
|
|
13
|
-
|
|
14
|
-
export interface ReleaseDiagnosticInput {
|
|
15
|
-
readonly apiKey?: string;
|
|
16
|
-
readonly errorMessage?: string;
|
|
6
|
+
readonly docsUrl: string;
|
|
17
7
|
}
|
|
18
8
|
export declare function formatApiKeyPreview(apiKey: string): string;
|
|
19
9
|
export declare function isInterfereApiKey(apiKey: string): boolean;
|
|
20
|
-
export declare function
|
|
21
|
-
|
|
10
|
+
export declare function checkReleaseConfig(ctx: ReleaseDiagnosticContext, input: {
|
|
11
|
+
readonly apiKey: string | null | undefined;
|
|
12
|
+
readonly commitSha: string | null;
|
|
13
|
+
readonly releaseSlug: ReleaseSlug | null;
|
|
14
|
+
}): {
|
|
15
|
+
status: "skip";
|
|
16
|
+
title: string;
|
|
17
|
+
details: string[];
|
|
18
|
+
apiKey?: never;
|
|
19
|
+
commitSha?: never;
|
|
20
|
+
releaseSlug?: never;
|
|
21
|
+
} | {
|
|
22
|
+
status: "fail";
|
|
23
|
+
title: string;
|
|
24
|
+
details: string[];
|
|
25
|
+
apiKey?: never;
|
|
26
|
+
commitSha?: never;
|
|
27
|
+
releaseSlug?: never;
|
|
28
|
+
} | {
|
|
29
|
+
title?: never;
|
|
30
|
+
details?: never;
|
|
31
|
+
status: "ok";
|
|
32
|
+
apiKey: string;
|
|
33
|
+
commitSha: string;
|
|
34
|
+
releaseSlug: `rel_${string}` & import("zod").$brand<"ReleaseSlug">;
|
|
35
|
+
};
|
|
36
|
+
export type ReleaseDiagnosticCode = "API_KEY_UNREADABLE" | "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "API_KEY_SURFACE_REQUIRED" | "RELEASE_PIPELINE_FAILED";
|
|
37
|
+
export interface ReleaseDiagnostic {
|
|
38
|
+
readonly code: ReleaseDiagnosticCode;
|
|
39
|
+
readonly details: readonly string[];
|
|
40
|
+
readonly severity: "error" | "warn";
|
|
41
|
+
readonly title: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function classifyReleasePipelineError(error: unknown): "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "API_KEY_SURFACE_REQUIRED" | "API_KEY_UNREADABLE" | "RELEASE_PIPELINE_FAILED";
|
|
44
|
+
export declare function diagnoseRelease(ctx: ReleaseDiagnosticContext, error: unknown): ReleaseDiagnostic;
|
|
22
45
|
//#endregion
|
|
@@ -1 +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 `)
|
|
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 `),BUILD_CONTINUES=`The build continues, but this release has no source maps in Interfere.`;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))}function publicKeyHint(ctx){return`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`}function checkReleaseConfig(ctx,input){let{apiKey,commitSha,releaseSlug}=input;return apiKey?isInterfereApiKey(apiKey)?commitSha&&releaseSlug?{status:`ok`,apiKey,commitSha,releaseSlug}:{status:`fail`,title:`Commit SHA missing`,details:[`Could not resolve a commit SHA from environment variables or git.`,"Set `INTERFERE_SOURCE_ID`, ensure your CI exposes its git SHA env var (e.g. `VERCEL_GIT_COMMIT_SHA`, `GITHUB_SHA`), or run inside a git checkout."]}:{status:`fail`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(apiKey)}\`.`,publicKeyHint(ctx),`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}:{status:`skip`,title:`Skipping release`,details:[`INTERFERE_API_KEY is not set, so this build has no release or source maps in Interfere.`,`Set INTERFERE_API_KEY on builds that you deploy.`,`See: ${ctx.docsUrl}`]}}const CATALOG={API_KEY_NETWORK_DENIED:()=>({code:`API_KEY_NETWORK_DENIED`,severity:`error`,title:`Build machine blocked by network policy`,details:[`INTERFERE_API_KEY was recognized, but the workspace network policy blocks this build machine.`,`Allow your CI egress IPs or ASN under Network access at https://interfere.com/settings/security.`,BUILD_CONTINUES]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`error`,title:`Secret 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.`,BUILD_CONTINUES]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`error`,title:`Secret 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.`,BUILD_CONTINUES]}),API_KEY_SURFACE_REQUIRED:ctx=>({code:`API_KEY_SURFACE_REQUIRED`,severity:`error`,title:`Public key needed for a workspace secret key`,details:[`INTERFERE_API_KEY is a workspace secret key, so the build must also name the app it publishes for.`,`Set \`${ctx.publicKeyEnvVar}\` to this app's public key on the build machine.`,BUILD_CONTINUES]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`error`,title:`Secret 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}.`,publicKeyHint(ctx),`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`,BUILD_CONTINUES]}),RELEASE_PIPELINE_FAILED:(_ctx,errorMessage)=>({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: ${errorMessage}`]})},API_CODE_TO_DIAGNOSTIC=new Map(Object.entries({AUTH_AK_INVALID:`API_KEY_REJECTED`,AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`,AUTH_AK_SURFACE_REQUIRED:`API_KEY_SURFACE_REQUIRED`,AUTH_MISSING:`API_KEY_UNREADABLE`,NETWORK_ACCESS_DENIED:`API_KEY_NETWORK_DENIED`}));function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let body=`body`in error?error.body:void 0;if(typeof body!=`object`||!body)return`RELEASE_PIPELINE_FAILED`;let code=`code`in body?body.code:void 0;return typeof code==`string`?API_CODE_TO_DIAGNOSTIC.get(code)??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}function diagnoseRelease(ctx,error){let errorMessage=error instanceof Error?error.message:String(error);return CATALOG[classifyReleasePipelineError(error)](ctx,errorMessage)}export{API_KEY_PREFIXES,checkReleaseConfig,classifyReleasePipelineError,diagnoseRelease,formatApiKeyPreview,isInterfereApiKey};
|
|
@@ -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={cloudflare:[fromEnv(`CLOUDFLARE_ENV`)],vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)]}
|
|
2
|
-
`);var DeployEnvironmentError=class extends Error{name=`DeployEnvironmentError`};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
|
+
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={cloudflare:[fromEnv(`CLOUDFLARE_ENV`)],vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)]};var DeployEnvironmentError=class extends Error{name=`DeployEnvironmentError`};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)return null;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;
|
|
@@ -4,7 +4,7 @@ export declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
|
|
|
4
4
|
export declare class DeployEnvironmentError extends Error {
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string;
|
|
7
|
+
export declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string | null;
|
|
8
8
|
export declare function applyDeployEnvironment(destination: ReleaseDestinationMetadata, environment: string | null): {
|
|
9
9
|
deploymentId: string | null;
|
|
10
10
|
deploymentUrl: string | null;
|
|
@@ -21,6 +21,8 @@ export declare function applyDeployEnvironment(destination: ReleaseDestinationMe
|
|
|
21
21
|
environmentName: string | null;
|
|
22
22
|
environmentTarget: string | null;
|
|
23
23
|
provider: "cloudflare";
|
|
24
|
+
deploymentId?: string | null | undefined;
|
|
25
|
+
trafficPercentage?: number | null | undefined;
|
|
24
26
|
scriptName: string | null;
|
|
25
27
|
versionId: string | null;
|
|
26
28
|
} | {
|
|
@@ -4,7 +4,7 @@ export declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
|
|
|
4
4
|
export declare class DeployEnvironmentError extends Error {
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string;
|
|
7
|
+
export declare function resolveDeployEnvironment(env: Record<string, string | undefined>): string | null;
|
|
8
8
|
export declare function applyDeployEnvironment(destination: ReleaseDestinationMetadata, environment: string | null): {
|
|
9
9
|
deploymentId: string | null;
|
|
10
10
|
deploymentUrl: string | null;
|
|
@@ -21,6 +21,8 @@ export declare function applyDeployEnvironment(destination: ReleaseDestinationMe
|
|
|
21
21
|
environmentName: string | null;
|
|
22
22
|
environmentTarget: string | null;
|
|
23
23
|
provider: "cloudflare";
|
|
24
|
+
deploymentId?: string | null | undefined;
|
|
25
|
+
trafficPercentage?: number | null | undefined;
|
|
24
26
|
scriptName: string | null;
|
|
25
27
|
versionId: string | null;
|
|
26
28
|
} | {
|
|
@@ -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={cloudflare:[fromEnv(`CLOUDFLARE_ENV`)],vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)]},
|
|
2
|
-
`),DEPLOY_ENVIRONMENT_MAX_LENGTH=32;var DeployEnvironmentError=class extends Error{name=`DeployEnvironmentError`};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};
|
|
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={cloudflare:[fromEnv(`CLOUDFLARE_ENV`)],vercel:[fromEnv(`VERCEL_TARGET_ENV`,`VERCEL_ENV`)]},DEPLOY_ENVIRONMENT_MAX_LENGTH=32;var DeployEnvironmentError=class extends Error{name=`DeployEnvironmentError`};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)return null;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};
|