@interfere/types 10.2.2 → 10.3.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/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 +4 -0
- package/dist/integrations/platforms/cloudflare.d.mts +4 -0
- 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/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 +36 -13
- package/dist/sdk/build-diagnostics.d.mts +36 -13
- 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/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/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 +3 -3
|
@@ -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),refreshToken:zod.z.string().nullable().default(null),versionCutoffs:zod.z.record(zod.z.string(),zod.z.string()).default({}),workers:zod.z.record(zod.z.string(),zod.z.string()).default({})}),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;
|
|
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),refreshToken: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({}),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;
|
|
@@ -9,8 +9,10 @@ export declare const cloudflareAccountMetadata: z.ZodObject<{
|
|
|
9
9
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
10
10
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
11
|
refreshToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
13
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
14
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, 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<{
|
|
@@ -20,8 +22,10 @@ export declare const cloudflareIntegration: z.ZodObject<{
|
|
|
20
22
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
21
23
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
22
24
|
refreshToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
26
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
27
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, 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>;
|
|
@@ -9,8 +9,10 @@ export declare const cloudflareAccountMetadata: z.ZodObject<{
|
|
|
9
9
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
10
10
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
11
|
refreshToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
13
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
14
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, 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<{
|
|
@@ -20,8 +22,10 @@ export declare const cloudflareIntegration: z.ZodObject<{
|
|
|
20
22
|
installationUrl: z.ZodNullable<z.ZodString>;
|
|
21
23
|
name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
22
24
|
refreshToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
deploymentCutoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
26
|
versionCutoffs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
27
|
workers: z.ZodDefault<z.ZodRecord<z.ZodString, 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),refreshToken:z.string().nullable().default(null),versionCutoffs:z.record(z.string(),z.string()).default({}),workers:z.record(z.string(),z.string()).default({})}),cloudflareMetadataSchema=z.discriminatedUnion(`accountType`,[cloudflareAccountMetadata]),cloudflareIntegration=z.object({metadata:cloudflareMetadataSchema,name:z.literal(`cloudflare`)});export{cloudflareAccountMetadata,cloudflareDestinationIdEnvKeys,cloudflareIntegration,cloudflareSourceIdEnvKeys};
|
|
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),refreshToken: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({}),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};
|
|
@@ -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_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_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
|
|
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" | "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
|
+
}
|
|
21
43
|
export declare function classifyReleasePipelineError(error: unknown): "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "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
|
|
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" | "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
|
+
}
|
|
21
43
|
export declare function classifyReleasePipelineError(error: unknown): "API_KEY_NETWORK_DENIED" | "API_KEY_REJECTED" | "API_KEY_SCOPE_MISMATCH" | "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_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_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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),exports.API_URL_GLOBAL=`__INTERFERE_API_URL__`,exports.BUILD_MARKER_GLOBAL=`__INTERFERE_BUILD__`,exports.ENVIRONMENT_GLOBAL=`__INTERFERE_ENVIRONMENT__`,exports.FORCE_ENABLE_GLOBAL=`__INTERFERE_FORCE_ENABLE__`,exports.INGEST_URL_GLOBAL=`__INTERFERE_INGEST_URL__`,exports.PUBLIC_KEY_GLOBAL=`__INTERFERE_PUBLIC_KEY__`,exports.RELEASE_SLUG_GLOBAL=`__INTERFERE_RELEASE_SLUG__`,exports.SDK_STACK_GLOBAL=`__INTERFERE_SDK_STACK__`;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),exports.API_URL_GLOBAL=`__INTERFERE_API_URL__`,exports.BUILD_MARKER_GLOBAL=`__INTERFERE_BUILD__`,exports.DISABLED_GLOBAL=`__INTERFERE_DISABLED__`,exports.ENVIRONMENT_GLOBAL=`__INTERFERE_ENVIRONMENT__`,exports.FORCE_ENABLE_GLOBAL=`__INTERFERE_FORCE_ENABLE__`,exports.INGEST_URL_GLOBAL=`__INTERFERE_INGEST_URL__`,exports.PUBLIC_KEY_GLOBAL=`__INTERFERE_PUBLIC_KEY__`,exports.RELEASE_SLUG_GLOBAL=`__INTERFERE_RELEASE_SLUG__`,exports.SDK_STACK_GLOBAL=`__INTERFERE_SDK_STACK__`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/sdk/injected-globals.d.ts
|
|
2
2
|
export declare const API_URL_GLOBAL = "__INTERFERE_API_URL__";
|
|
3
3
|
export declare const BUILD_MARKER_GLOBAL = "__INTERFERE_BUILD__";
|
|
4
|
+
export declare const DISABLED_GLOBAL = "__INTERFERE_DISABLED__";
|
|
4
5
|
export declare const ENVIRONMENT_GLOBAL = "__INTERFERE_ENVIRONMENT__";
|
|
5
6
|
export declare const FORCE_ENABLE_GLOBAL = "__INTERFERE_FORCE_ENABLE__";
|
|
6
7
|
export declare const INGEST_URL_GLOBAL = "__INTERFERE_INGEST_URL__";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/sdk/injected-globals.d.ts
|
|
2
2
|
export declare const API_URL_GLOBAL = "__INTERFERE_API_URL__";
|
|
3
3
|
export declare const BUILD_MARKER_GLOBAL = "__INTERFERE_BUILD__";
|
|
4
|
+
export declare const DISABLED_GLOBAL = "__INTERFERE_DISABLED__";
|
|
4
5
|
export declare const ENVIRONMENT_GLOBAL = "__INTERFERE_ENVIRONMENT__";
|
|
5
6
|
export declare const FORCE_ENABLE_GLOBAL = "__INTERFERE_FORCE_ENABLE__";
|
|
6
7
|
export declare const INGEST_URL_GLOBAL = "__INTERFERE_INGEST_URL__";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const API_URL_GLOBAL=`__INTERFERE_API_URL__`,BUILD_MARKER_GLOBAL=`__INTERFERE_BUILD__`,ENVIRONMENT_GLOBAL=`__INTERFERE_ENVIRONMENT__`,FORCE_ENABLE_GLOBAL=`__INTERFERE_FORCE_ENABLE__`,INGEST_URL_GLOBAL=`__INTERFERE_INGEST_URL__`,PUBLIC_KEY_GLOBAL=`__INTERFERE_PUBLIC_KEY__`,RELEASE_SLUG_GLOBAL=`__INTERFERE_RELEASE_SLUG__`,SDK_STACK_GLOBAL=`__INTERFERE_SDK_STACK__`;export{API_URL_GLOBAL,BUILD_MARKER_GLOBAL,ENVIRONMENT_GLOBAL,FORCE_ENABLE_GLOBAL,INGEST_URL_GLOBAL,PUBLIC_KEY_GLOBAL,RELEASE_SLUG_GLOBAL,SDK_STACK_GLOBAL};
|
|
1
|
+
const API_URL_GLOBAL=`__INTERFERE_API_URL__`,BUILD_MARKER_GLOBAL=`__INTERFERE_BUILD__`,DISABLED_GLOBAL=`__INTERFERE_DISABLED__`,ENVIRONMENT_GLOBAL=`__INTERFERE_ENVIRONMENT__`,FORCE_ENABLE_GLOBAL=`__INTERFERE_FORCE_ENABLE__`,INGEST_URL_GLOBAL=`__INTERFERE_INGEST_URL__`,PUBLIC_KEY_GLOBAL=`__INTERFERE_PUBLIC_KEY__`,RELEASE_SLUG_GLOBAL=`__INTERFERE_RELEASE_SLUG__`,SDK_STACK_GLOBAL=`__INTERFERE_SDK_STACK__`;export{API_URL_GLOBAL,BUILD_MARKER_GLOBAL,DISABLED_GLOBAL,ENVIRONMENT_GLOBAL,FORCE_ENABLE_GLOBAL,INGEST_URL_GLOBAL,PUBLIC_KEY_GLOBAL,RELEASE_SLUG_GLOBAL,SDK_STACK_GLOBAL};
|
package/dist/sdk/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const envSchema=zod.z.string().min(1).nullable().meta({description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`).",id:`Environment`,title:`Environment`}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({description:`JavaScript runtime the SDK is running in.`,id:`Runtime`,title:`Runtime`}),globalScope=globalThis;function readProcessEnv(){return globalScope.process?.env}function inferRuntime(options){return globalScope.window!==void 0
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_internal_runtime_inference=require("../internal/runtime-inference.cjs");let zod=require("zod");const envSchema=zod.z.string().min(1).nullable().meta({description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`).",id:`Environment`,title:`Environment`}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=zod.z.enum([`browser`,`node`,`edge`]).nullable().meta({description:`JavaScript runtime the SDK is running in.`,id:`Runtime`,title:`Runtime`}),globalScope=globalThis;function readProcessEnv(){return globalScope.process?.env}function inferRuntime(options){return require_internal_runtime_inference.inferRuntimeFromEvidence({hasWindow:globalScope.window!==void 0,hasDocument:globalScope.document!==void 0,hasNavigator:globalScope.navigator!==void 0,edgeRuntime:globalScope.EdgeRuntime,nodeVersion:globalScope.process?.versions?.node,nextRuntime:options?.nextRuntime})}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}exports.DEFAULT_ENVIRONMENT=DEFAULT_ENVIRONMENT,exports.envSchema=envSchema,exports.inferRuntime=inferRuntime,exports.normalizeEnv=normalizeEnv,exports.readProcessEnv=readProcessEnv,exports.resolveEnvironment=resolveEnvironment,exports.runtimeSchema=runtimeSchema;
|
package/dist/sdk/runtime.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"zod";const envSchema=z.string().min(1).nullable().meta({description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`).",id:`Environment`,title:`Environment`}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({description:`JavaScript runtime the SDK is running in.`,id:`Runtime`,title:`Runtime`}),globalScope=globalThis;function readProcessEnv(){return globalScope.process?.env}function inferRuntime(options){return globalScope.window!==void 0
|
|
1
|
+
import{inferRuntimeFromEvidence}from"../internal/runtime-inference.mjs";import{z}from"zod";const envSchema=z.string().min(1).nullable().meta({description:"Deployment environment the SDK is running in. Free-form label (e.g. `production`, `preview`, `staging`, `development`).",id:`Environment`,title:`Environment`}),DEFAULT_ENVIRONMENT=`development`,ENVIRONMENT_ENV_VARS=[`INTERFERE_ENVIRONMENT`,`VERCEL_ENV`,`NODE_ENV`];function resolveEnvironment(opts){let env=opts?.env??{},explicit=normalizeEnv(opts?.explicit);if(explicit)return explicit;for(let key of ENVIRONMENT_ENV_VARS){let value=normalizeEnv(env[key]);if(value)return value}return DEFAULT_ENVIRONMENT}const runtimeSchema=z.enum([`browser`,`node`,`edge`]).nullable().meta({description:`JavaScript runtime the SDK is running in.`,id:`Runtime`,title:`Runtime`}),globalScope=globalThis;function readProcessEnv(){return globalScope.process?.env}function inferRuntime(options){return inferRuntimeFromEvidence({hasWindow:globalScope.window!==void 0,hasDocument:globalScope.document!==void 0,hasNavigator:globalScope.navigator!==void 0,edgeRuntime:globalScope.EdgeRuntime,nodeVersion:globalScope.process?.versions?.node,nextRuntime:options?.nextRuntime})}function normalizeEnv(value){if(typeof value!=`string`)return null;let env=value.trim().toLowerCase();return env.length>0?env:null}export{DEFAULT_ENVIRONMENT,envSchema,inferRuntime,normalizeEnv,readProcessEnv,resolveEnvironment,runtimeSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const URL_ATTRIBUTE_KEYS=[`http.referrer`,`http.request.header.referer`,`http.target`,`http.url`,`url.full`,`url.original`,`url.path`],URL_PARTS_RE=/^(?<base>[^?#]*)(?:\?(?<query>[^#]*))?(?<fragment>#.*)?$/su,ABSOLUTE_URL_RE=/https?:\/\/[^\s"'<>]+/giu,REDACTED=`REDACTED`,SENSITIVE_NAMES=new Set([`awsaccesskeyid`,`code`,`key`,`sig`]),SENSITIVE_TERMS=[`api_key`,`apikey`,`auth`,`credential`,`passwd`,`password`,`secret`,`session`,`signature`,`token`];function isSensitiveName(name){return SENSITIVE_NAMES.has(name)||SENSITIVE_TERMS.some(term=>name.includes(term))}function resolveUrlRedaction(option={}){if(option===!0||option===!1)return{fragment:option,redactsValue:()=>option};let allow=option.allow&&new Set(option.allow.map(name=>name.toLowerCase())),deny=new Set(option.deny?.map(name=>name.toLowerCase()));return{fragment:option.fragment??!1,redactsValue:name=>deny.has(name)||(allow?!allow.has(name):isSensitiveName(name))}}function decodeName(name){try{return decodeURIComponent(name).toLowerCase()}catch{return name.toLowerCase()}}function redactQuery(query,policy){return query.split(`&`).map(parameter=>{let separator=parameter.indexOf(`=`),name=separator===-1?parameter:parameter.slice(0,separator);return parameter&&policy.redactsValue(decodeName(name))?separator===-1?REDACTED:`${name}=${REDACTED}`:parameter}).join(`&`)}function redactCredentials(base){return base.replace(/^(?<scheme>[a-z][\d+.a-z-]*:\/\/)[^/@:]*:[^/@]*@/iu,`$<scheme>${REDACTED}:${REDACTED}@`).replace(/^(?<scheme>[a-z][\d+.a-z-]*:\/\/)[^/@:]*@/iu,`$<scheme>${REDACTED}@`)}function redactUrl(url,policy){let{base=``,fragment=``,query}=URL_PARTS_RE.exec(url)?.groups??{};return[redactCredentials(base),query===void 0?``:`?${redactQuery(query,policy)}`,policy.fragment?``:fragment].join(``)}function redactMessage(message,policy){return message.replaceAll(ABSOLUTE_URL_RE,url=>redactUrl(url,policy))}function redactSpanName(name,policy){return name.split(` `).map(token=>token.startsWith(`/`)||token.includes(`://`)?redactUrl(token,policy):token).join(` `)}const exceptionChainSchema=zod.z.array(zod.z.looseObject({stack:zod.z.string().optional(),value:zod.z.string().optional()}));function redactExceptionChain(chain,policy){try{let entries=exceptionChainSchema.parse(JSON.parse(chain));for(let entry of entries)if(entry.value!==void 0){let value=redactMessage(entry.value,policy);entry.stack=entry.stack?.replace(entry.value,value),entry.value=value}return JSON.stringify(entries)}catch{return chain}}function rewrite(attributes,key,redact){let value=attributes[key];typeof value==`string`?attributes[key]=redact(value):typeof value==`object`&&(attributes[key]=value.map(item=>typeof item==`string`?redact(item):item))}function redactAttributes(attributes,policy){for(let key of URL_ATTRIBUTE_KEYS)rewrite(attributes,key,url=>redactUrl(url,policy));rewrite(attributes,`url.query`,query=>redactQuery(query,policy)),policy.fragment&&delete attributes[`url.fragment`],rewrite(attributes,`exception.message`,message=>{let redacted=redactMessage(message,policy);return rewrite(attributes,`exception.stacktrace`,stack=>stack.replace(message,redacted)),redacted}),rewrite(attributes,`interfere.exception.chain`,chain=>redactExceptionChain(chain,policy)),rewrite(attributes,`interfere.exception.serialized`,serialized=>redactMessage(serialized,policy))}function redactSpan(span,policy){redactAttributes(span.attributes,policy);for(let event of span.events)event.attributes&&redactAttributes(event.attributes,policy)}function createUrlRedactionSpanProcessor(policy){return{async forceFlush(){await Promise.resolve()},onEnd(span){redactSpan(span,policy)},onEnding(span){span.updateName(redactSpanName(span.name,policy)),span.status.message!==void 0&&span.setStatus({...span.status,message:redactMessage(span.status.message,policy)}),redactSpan(span,policy)},onStart:()=>void 0,async shutdown(){await Promise.resolve()}}}exports.createUrlRedactionSpanProcessor=createUrlRedactionSpanProcessor,exports.redactUrl=redactUrl,exports.resolveUrlRedaction=resolveUrlRedaction;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/sdk/url-redaction.d.ts
|
|
2
|
+
/** Query parameters and fragments to redact in SDK telemetry. Parameter names match case-insensitively. */
|
|
3
|
+
export interface UrlRedactionOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Parameters whose values are kept. Every other value becomes `REDACTED`,
|
|
6
|
+
* including the built-in sensitive names unless they are listed here.
|
|
7
|
+
*/
|
|
8
|
+
allow?: string[];
|
|
9
|
+
/** Parameters whose values become `REDACTED` in addition to the built-in sensitive names. */
|
|
10
|
+
deny?: string[];
|
|
11
|
+
/** Remove fragments, including hash-router paths. Defaults to `false`. */
|
|
12
|
+
fragment?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Omit to redact the values of built-in sensitive query parameters such as
|
|
16
|
+
* `token`, `password` and `sig`. `true` redacts every value and removes
|
|
17
|
+
* fragments. `false` keeps query values. URL credentials are always redacted.
|
|
18
|
+
*/
|
|
19
|
+
export type UrlRedactionOption = boolean | UrlRedactionOptions;
|
|
20
|
+
export interface UrlRedactionPolicy {
|
|
21
|
+
readonly fragment: boolean;
|
|
22
|
+
readonly redactsValue: (name: string) => boolean;
|
|
23
|
+
}
|
|
24
|
+
type AttributeScalar = boolean | number | string;
|
|
25
|
+
type SpanAttributes = Record<string, AttributeScalar | readonly (AttributeScalar | null | undefined)[] | undefined>;
|
|
26
|
+
interface RedactableSpan {
|
|
27
|
+
attributes: SpanAttributes;
|
|
28
|
+
events: readonly {
|
|
29
|
+
attributes?: SpanAttributes | undefined;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
interface EndingSpan extends RedactableSpan {
|
|
34
|
+
name: string;
|
|
35
|
+
setStatus: (status: {
|
|
36
|
+
code: number;
|
|
37
|
+
message: string;
|
|
38
|
+
}) => void;
|
|
39
|
+
status: {
|
|
40
|
+
code: number;
|
|
41
|
+
message?: string;
|
|
42
|
+
};
|
|
43
|
+
updateName: (name: string) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function resolveUrlRedaction(option?: UrlRedactionOption): {
|
|
46
|
+
fragment: boolean;
|
|
47
|
+
redactsValue: (name: string) => boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare function redactUrl(url: string, policy: UrlRedactionPolicy): string;
|
|
50
|
+
/** Redacts URL attributes, URL-bearing span names and absolute URLs in exception messages in `onEnding`, before any processor exports the span. */
|
|
51
|
+
export declare function createUrlRedactionSpanProcessor(policy: UrlRedactionPolicy): {
|
|
52
|
+
forceFlush(): Promise<void>;
|
|
53
|
+
onEnd(span: RedactableSpan): void;
|
|
54
|
+
onEnding(span: EndingSpan): void;
|
|
55
|
+
onStart: () => undefined;
|
|
56
|
+
shutdown(): Promise<void>;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/sdk/url-redaction.d.ts
|
|
2
|
+
/** Query parameters and fragments to redact in SDK telemetry. Parameter names match case-insensitively. */
|
|
3
|
+
export interface UrlRedactionOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Parameters whose values are kept. Every other value becomes `REDACTED`,
|
|
6
|
+
* including the built-in sensitive names unless they are listed here.
|
|
7
|
+
*/
|
|
8
|
+
allow?: string[];
|
|
9
|
+
/** Parameters whose values become `REDACTED` in addition to the built-in sensitive names. */
|
|
10
|
+
deny?: string[];
|
|
11
|
+
/** Remove fragments, including hash-router paths. Defaults to `false`. */
|
|
12
|
+
fragment?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Omit to redact the values of built-in sensitive query parameters such as
|
|
16
|
+
* `token`, `password` and `sig`. `true` redacts every value and removes
|
|
17
|
+
* fragments. `false` keeps query values. URL credentials are always redacted.
|
|
18
|
+
*/
|
|
19
|
+
export type UrlRedactionOption = boolean | UrlRedactionOptions;
|
|
20
|
+
export interface UrlRedactionPolicy {
|
|
21
|
+
readonly fragment: boolean;
|
|
22
|
+
readonly redactsValue: (name: string) => boolean;
|
|
23
|
+
}
|
|
24
|
+
type AttributeScalar = boolean | number | string;
|
|
25
|
+
type SpanAttributes = Record<string, AttributeScalar | readonly (AttributeScalar | null | undefined)[] | undefined>;
|
|
26
|
+
interface RedactableSpan {
|
|
27
|
+
attributes: SpanAttributes;
|
|
28
|
+
events: readonly {
|
|
29
|
+
attributes?: SpanAttributes | undefined;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
interface EndingSpan extends RedactableSpan {
|
|
34
|
+
name: string;
|
|
35
|
+
setStatus: (status: {
|
|
36
|
+
code: number;
|
|
37
|
+
message: string;
|
|
38
|
+
}) => void;
|
|
39
|
+
status: {
|
|
40
|
+
code: number;
|
|
41
|
+
message?: string;
|
|
42
|
+
};
|
|
43
|
+
updateName: (name: string) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function resolveUrlRedaction(option?: UrlRedactionOption): {
|
|
46
|
+
fragment: boolean;
|
|
47
|
+
redactsValue: (name: string) => boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare function redactUrl(url: string, policy: UrlRedactionPolicy): string;
|
|
50
|
+
/** Redacts URL attributes, URL-bearing span names and absolute URLs in exception messages in `onEnding`, before any processor exports the span. */
|
|
51
|
+
export declare function createUrlRedactionSpanProcessor(policy: UrlRedactionPolicy): {
|
|
52
|
+
forceFlush(): Promise<void>;
|
|
53
|
+
onEnd(span: RedactableSpan): void;
|
|
54
|
+
onEnding(span: EndingSpan): void;
|
|
55
|
+
onStart: () => undefined;
|
|
56
|
+
shutdown(): Promise<void>;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"zod";const URL_ATTRIBUTE_KEYS=[`http.referrer`,`http.request.header.referer`,`http.target`,`http.url`,`url.full`,`url.original`,`url.path`],URL_PARTS_RE=/^(?<base>[^?#]*)(?:\?(?<query>[^#]*))?(?<fragment>#.*)?$/su,ABSOLUTE_URL_RE=/https?:\/\/[^\s"'<>]+/giu,REDACTED=`REDACTED`,SENSITIVE_NAMES=new Set([`awsaccesskeyid`,`code`,`key`,`sig`]),SENSITIVE_TERMS=[`api_key`,`apikey`,`auth`,`credential`,`passwd`,`password`,`secret`,`session`,`signature`,`token`];function isSensitiveName(name){return SENSITIVE_NAMES.has(name)||SENSITIVE_TERMS.some(term=>name.includes(term))}function resolveUrlRedaction(option={}){if(option===!0||option===!1)return{fragment:option,redactsValue:()=>option};let allow=option.allow&&new Set(option.allow.map(name=>name.toLowerCase())),deny=new Set(option.deny?.map(name=>name.toLowerCase()));return{fragment:option.fragment??!1,redactsValue:name=>deny.has(name)||(allow?!allow.has(name):isSensitiveName(name))}}function decodeName(name){try{return decodeURIComponent(name).toLowerCase()}catch{return name.toLowerCase()}}function redactQuery(query,policy){return query.split(`&`).map(parameter=>{let separator=parameter.indexOf(`=`),name=separator===-1?parameter:parameter.slice(0,separator);return parameter&&policy.redactsValue(decodeName(name))?separator===-1?REDACTED:`${name}=${REDACTED}`:parameter}).join(`&`)}function redactCredentials(base){return base.replace(/^(?<scheme>[a-z][\d+.a-z-]*:\/\/)[^/@:]*:[^/@]*@/iu,`$<scheme>${REDACTED}:${REDACTED}@`).replace(/^(?<scheme>[a-z][\d+.a-z-]*:\/\/)[^/@:]*@/iu,`$<scheme>${REDACTED}@`)}function redactUrl(url,policy){let{base=``,fragment=``,query}=URL_PARTS_RE.exec(url)?.groups??{};return[redactCredentials(base),query===void 0?``:`?${redactQuery(query,policy)}`,policy.fragment?``:fragment].join(``)}function redactMessage(message,policy){return message.replaceAll(ABSOLUTE_URL_RE,url=>redactUrl(url,policy))}function redactSpanName(name,policy){return name.split(` `).map(token=>token.startsWith(`/`)||token.includes(`://`)?redactUrl(token,policy):token).join(` `)}const exceptionChainSchema=z.array(z.looseObject({stack:z.string().optional(),value:z.string().optional()}));function redactExceptionChain(chain,policy){try{let entries=exceptionChainSchema.parse(JSON.parse(chain));for(let entry of entries)if(entry.value!==void 0){let value=redactMessage(entry.value,policy);entry.stack=entry.stack?.replace(entry.value,value),entry.value=value}return JSON.stringify(entries)}catch{return chain}}function rewrite(attributes,key,redact){let value=attributes[key];typeof value==`string`?attributes[key]=redact(value):typeof value==`object`&&(attributes[key]=value.map(item=>typeof item==`string`?redact(item):item))}function redactAttributes(attributes,policy){for(let key of URL_ATTRIBUTE_KEYS)rewrite(attributes,key,url=>redactUrl(url,policy));rewrite(attributes,`url.query`,query=>redactQuery(query,policy)),policy.fragment&&delete attributes[`url.fragment`],rewrite(attributes,`exception.message`,message=>{let redacted=redactMessage(message,policy);return rewrite(attributes,`exception.stacktrace`,stack=>stack.replace(message,redacted)),redacted}),rewrite(attributes,`interfere.exception.chain`,chain=>redactExceptionChain(chain,policy)),rewrite(attributes,`interfere.exception.serialized`,serialized=>redactMessage(serialized,policy))}function redactSpan(span,policy){redactAttributes(span.attributes,policy);for(let event of span.events)event.attributes&&redactAttributes(event.attributes,policy)}function createUrlRedactionSpanProcessor(policy){return{async forceFlush(){await Promise.resolve()},onEnd(span){redactSpan(span,policy)},onEnding(span){span.updateName(redactSpanName(span.name,policy)),span.status.message!==void 0&&span.setStatus({...span.status,message:redactMessage(span.status.message,policy)}),redactSpan(span,policy)},onStart:()=>void 0,async shutdown(){await Promise.resolve()}}}export{createUrlRedactionSpanProcessor,redactUrl,resolveUrlRedaction};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/types",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "TypeScript & Zod types for Interfere",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logging",
|
|
@@ -156,9 +156,9 @@
|
|
|
156
156
|
"@interfere/typescript-config": "^9.0.2",
|
|
157
157
|
"@interfere/vitest-config": "0.0.0",
|
|
158
158
|
"@types/node": "^26.4.1",
|
|
159
|
-
"@vitest/coverage-v8": "5.0.
|
|
159
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
160
160
|
"tsdown": "^0.23.0",
|
|
161
161
|
"typescript": "^7.0.2",
|
|
162
|
-
"vitest": "5.0.
|
|
162
|
+
"vitest": "5.0.5"
|
|
163
163
|
}
|
|
164
164
|
}
|