@interfere/types 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/data/frame.d.cts +0 -1
  2. package/dist/data/frame.d.mts +0 -1
  3. package/dist/data/session.d.cts +0 -1
  4. package/dist/data/session.d.mts +0 -1
  5. package/dist/data/source-maps.d.cts +0 -1
  6. package/dist/data/source-maps.d.mts +0 -1
  7. package/dist/events/error.d.cts +0 -1
  8. package/dist/events/error.d.mts +0 -1
  9. package/dist/events/pageleave.d.cts +0 -1
  10. package/dist/events/pageleave.d.mts +0 -1
  11. package/dist/events/pageview.d.cts +0 -1
  12. package/dist/events/pageview.d.mts +0 -1
  13. package/dist/integrations/index.d.cts +0 -1
  14. package/dist/integrations/index.d.mts +0 -1
  15. package/dist/integrations/platforms/cli.d.cts +0 -1
  16. package/dist/integrations/platforms/cli.d.mts +0 -1
  17. package/dist/integrations/platforms/cloudflare.d.cts +0 -1
  18. package/dist/integrations/platforms/cloudflare.d.mts +0 -1
  19. package/dist/integrations/platforms/github.cjs +1 -1
  20. package/dist/integrations/platforms/github.d.cts +0 -1
  21. package/dist/integrations/platforms/github.d.mts +0 -1
  22. package/dist/integrations/platforms/github.mjs +1 -1
  23. package/dist/integrations/platforms/slack.d.cts +0 -1
  24. package/dist/integrations/platforms/slack.d.mts +0 -1
  25. package/dist/integrations/platforms/vercel.cjs +1 -1
  26. package/dist/integrations/platforms/vercel.d.cts +4 -5
  27. package/dist/integrations/platforms/vercel.d.mts +4 -5
  28. package/dist/integrations/platforms/vercel.mjs +1 -1
  29. package/dist/releases/definition.d.cts +0 -1
  30. package/dist/releases/definition.d.mts +0 -1
  31. package/dist/releases/slug.d.cts +0 -1
  32. package/dist/releases/slug.d.mts +0 -1
  33. package/dist/sdk/build-diagnostics.cjs +1 -1
  34. package/dist/sdk/build-diagnostics.mjs +1 -1
  35. package/dist/sdk/cli-destination.d.cts +0 -1
  36. package/dist/sdk/cli-destination.d.mts +0 -1
  37. package/dist/sdk/deploy-environment.d.cts +0 -1
  38. package/dist/sdk/deploy-environment.d.mts +0 -1
  39. package/dist/sdk/envelope.d.cts +0 -1
  40. package/dist/sdk/envelope.d.mts +0 -1
  41. package/dist/sdk/errors.d.cts +2 -2
  42. package/dist/sdk/errors.d.mts +2 -2
  43. package/dist/sdk/geo.d.cts +0 -1
  44. package/dist/sdk/geo.d.mts +0 -1
  45. package/dist/sdk/identify.d.cts +0 -1
  46. package/dist/sdk/identify.d.mts +0 -1
  47. package/dist/sdk/injected-globals.cjs +1 -0
  48. package/dist/sdk/injected-globals.d.cts +10 -0
  49. package/dist/sdk/injected-globals.d.mts +10 -0
  50. package/dist/sdk/injected-globals.mjs +1 -0
  51. package/dist/sdk/log-sourcing.cjs +1 -0
  52. package/dist/sdk/log-sourcing.d.cts +32 -0
  53. package/dist/sdk/log-sourcing.d.mts +32 -0
  54. package/dist/sdk/log-sourcing.mjs +1 -0
  55. package/dist/sdk/plugins/context/browser.d.cts +0 -1
  56. package/dist/sdk/plugins/context/browser.d.mts +0 -1
  57. package/dist/sdk/plugins/context/edge.d.cts +0 -1
  58. package/dist/sdk/plugins/context/edge.d.mts +0 -1
  59. package/dist/sdk/plugins/context/next.d.cts +0 -1
  60. package/dist/sdk/plugins/context/next.d.mts +0 -1
  61. package/dist/sdk/plugins/context/node.d.cts +0 -1
  62. package/dist/sdk/plugins/context/node.d.mts +0 -1
  63. package/dist/sdk/plugins/manifest.d.cts +1 -1
  64. package/dist/sdk/plugins/manifest.d.mts +1 -1
  65. package/dist/sdk/plugins/payload/errors.d.cts +0 -1
  66. package/dist/sdk/plugins/payload/errors.d.mts +0 -1
  67. package/dist/sdk/plugins/payload/page-events.d.cts +0 -1
  68. package/dist/sdk/plugins/payload/page-events.d.mts +0 -1
  69. package/dist/sdk/plugins/payload/rage-click.d.cts +0 -1
  70. package/dist/sdk/plugins/payload/rage-click.d.mts +0 -1
  71. package/dist/sdk/plugins/payload/replay.d.cts +0 -1
  72. package/dist/sdk/plugins/payload/replay.d.mts +0 -1
  73. package/dist/sdk/remote-config.cjs +1 -1
  74. package/dist/sdk/remote-config.d.cts +16 -2
  75. package/dist/sdk/remote-config.d.mts +16 -2
  76. package/dist/sdk/remote-config.mjs +1 -1
  77. package/dist/sdk/runtime.d.cts +0 -1
  78. package/dist/sdk/runtime.d.mts +0 -1
  79. package/dist/sdk/server-tracing.cjs +1 -0
  80. package/dist/sdk/server-tracing.d.cts +41 -0
  81. package/dist/sdk/server-tracing.d.mts +41 -0
  82. package/dist/sdk/server-tracing.mjs +1 -0
  83. package/package.json +4 -4
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/frame.d.ts
4
3
  /**
5
4
  * One stack frame as it lands at the collector — pre-source-map
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/frame.d.ts
4
3
  /**
5
4
  * One stack frame as it lands at the collector — pre-source-map
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/session.d.ts
4
3
  declare const sessionIdSchema: z.core.$ZodBranded<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>, "SessionId", "out">;
5
4
  type SessionId = z.infer<typeof sessionIdSchema>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/session.d.ts
4
3
  declare const sessionIdSchema: z.core.$ZodBranded<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>, "SessionId", "out">;
5
4
  type SessionId = z.infer<typeof sessionIdSchema>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/source-maps.d.ts
4
3
  /**
5
4
  * Bundler that produced this release metadata. Reported back in the
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/data/source-maps.d.ts
4
3
  /**
5
4
  * Bundler that produced this release metadata. Reported back in the
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/error.d.ts
4
3
  declare const resolvedFrameSchema: z.ZodObject<{
5
4
  ingestedId: z.ZodString;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/error.d.ts
4
3
  declare const resolvedFrameSchema: z.ZodObject<{
5
4
  ingestedId: z.ZodString;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/pageleave.d.ts
4
3
  declare const pageleaveFactsPayloadSchema: z.ZodObject<{
5
4
  url: z.ZodURL;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/pageleave.d.ts
4
3
  declare const pageleaveFactsPayloadSchema: z.ZodObject<{
5
4
  url: z.ZodURL;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/pageview.d.ts
4
3
  declare const pageviewFactsPayloadSchema: z.ZodObject<{
5
4
  url: z.ZodURL;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/events/pageview.d.ts
4
3
  declare const pageviewFactsPayloadSchema: z.ZodObject<{
5
4
  url: z.ZodURL;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/index.d.ts
4
3
  declare const githubReleaseSourceSchema: z.ZodObject<{
5
4
  provider: z.ZodLiteral<"github">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/index.d.ts
4
3
  declare const githubReleaseSourceSchema: z.ZodObject<{
5
4
  provider: z.ZodLiteral<"github">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/cli.d.ts
4
3
  declare const cliIntegration: z.ZodObject<{
5
4
  name: z.ZodLiteral<"cli">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/cli.d.ts
4
3
  declare const cliIntegration: z.ZodObject<{
5
4
  name: z.ZodLiteral<"cli">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/cloudflare.d.ts
4
3
  declare const cloudflareDestinationIdEnvKeys: ("CF_VERSION_ID" | "WORKERS_CI_BUILD_UUID")[];
5
4
  declare const cloudflareSourceIdEnvKeys: "WORKERS_CI_COMMIT_SHA"[];
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/cloudflare.d.ts
4
3
  declare const cloudflareDestinationIdEnvKeys: ("CF_VERSION_ID" | "WORKERS_CI_BUILD_UUID")[];
5
4
  declare const cloudflareSourceIdEnvKeys: "WORKERS_CI_COMMIT_SHA"[];
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=zod.z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=zod.z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=zod.z.object({accountType:zod.z.string(),avatarUrl:zod.z.string().nullable().default(null),repositories:zod.z.record(zod.z.string(),zod.z.string()),installationUrl:zod.z.string().nullable(),host:zod.z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=zod.z.object({name:zod.z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=zod.z.object({name:zod.z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=zod.z.object({name:zod.z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host);return HOST_URL_RESOLVERS[input.flavor??detectGithubHostFlavor(host)](host)}exports.GITHUB_COM_API_BASE_URL=GITHUB_COM_API_BASE_URL,exports.GITHUB_COM_HOST=GITHUB_COM_HOST,exports.GITHUB_COM_WEB_BASE_URL=GITHUB_COM_WEB_BASE_URL,exports.PROVIDER_FLAVOR=PROVIDER_FLAVOR,exports.detectGithubHostFlavor=detectGithubHostFlavor,exports.gheCloudIntegration=gheCloudIntegration,exports.gheServerIntegration=gheServerIntegration,exports.githubFamilyProviders=githubFamilyProviders,exports.githubHostFlavorSchema=githubHostFlavorSchema,exports.githubIntegration=githubIntegration,exports.githubSourceIdEnvKeys=githubSourceIdEnvKeys,exports.normalizeGithubHost=normalizeGithubHost,exports.providerFromHost=providerFromHost,exports.resolveGithubHostUrls=resolveGithubHostUrls;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=zod.z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=zod.z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=zod.z.object({accountType:zod.z.string(),avatarUrl:zod.z.string().nullable().default(null),repositories:zod.z.record(zod.z.string(),zod.z.string()),installationUrl:zod.z.string().nullable(),host:zod.z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=zod.z.object({name:zod.z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=zod.z.object({name:zod.z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=zod.z.object({name:zod.z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host),flavor=input.flavor??detectGithubHostFlavor(host);return HOST_URL_RESOLVERS[flavor](host)}exports.GITHUB_COM_API_BASE_URL=GITHUB_COM_API_BASE_URL,exports.GITHUB_COM_HOST=GITHUB_COM_HOST,exports.GITHUB_COM_WEB_BASE_URL=GITHUB_COM_WEB_BASE_URL,exports.PROVIDER_FLAVOR=PROVIDER_FLAVOR,exports.detectGithubHostFlavor=detectGithubHostFlavor,exports.gheCloudIntegration=gheCloudIntegration,exports.gheServerIntegration=gheServerIntegration,exports.githubFamilyProviders=githubFamilyProviders,exports.githubHostFlavorSchema=githubHostFlavorSchema,exports.githubIntegration=githubIntegration,exports.githubSourceIdEnvKeys=githubSourceIdEnvKeys,exports.normalizeGithubHost=normalizeGithubHost,exports.providerFromHost=providerFromHost,exports.resolveGithubHostUrls=resolveGithubHostUrls;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/github.d.ts
4
3
  declare const githubSourceIdEnvKeys: ("GITHUB_SHA" | "VERCEL_GIT_COMMIT_SHA")[];
5
4
  declare const githubHostFlavorSchema: z.ZodEnum<{
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/github.d.ts
4
3
  declare const githubSourceIdEnvKeys: ("GITHUB_SHA" | "VERCEL_GIT_COMMIT_SHA")[];
5
4
  declare const githubHostFlavorSchema: z.ZodEnum<{
@@ -1 +1 @@
1
- import{z}from"zod";const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=z.object({accountType:z.string(),avatarUrl:z.string().nullable().default(null),repositories:z.record(z.string(),z.string()),installationUrl:z.string().nullable(),host:z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=z.object({name:z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=z.object({name:z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=z.object({name:z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host);return HOST_URL_RESOLVERS[input.flavor??detectGithubHostFlavor(host)](host)}export{GITHUB_COM_API_BASE_URL,GITHUB_COM_HOST,GITHUB_COM_WEB_BASE_URL,PROVIDER_FLAVOR,detectGithubHostFlavor,gheCloudIntegration,gheServerIntegration,githubFamilyProviders,githubHostFlavorSchema,githubIntegration,githubSourceIdEnvKeys,normalizeGithubHost,providerFromHost,resolveGithubHostUrls};
1
+ import{z}from"zod";const HOST_REGEX=/^https?:\/\//,PATH_REGEX=/\/.*$/,githubSourceIdEnvKeys=z.enum([`VERCEL_GIT_COMMIT_SHA`,`GITHUB_SHA`]).options,githubHostFlavorSchema=z.enum([`github_com`,`ghe_cloud`,`ghe_server`]),GITHUB_COM_HOST=`github.com`,GITHUB_COM_API_BASE_URL=`https://api.github.com`,GITHUB_COM_WEB_BASE_URL=`https://github.com`,githubMetadata=z.object({accountType:z.string(),avatarUrl:z.string().nullable().default(null),repositories:z.record(z.string(),z.string()),installationUrl:z.string().nullable(),host:z.string().default(GITHUB_COM_HOST),flavor:githubHostFlavorSchema.default(`github_com`)}),githubIntegration=z.object({name:z.literal(`github`),metadata:githubMetadata}),gheCloudIntegration=z.object({name:z.literal(`ghe_cloud`),metadata:githubMetadata}),gheServerIntegration=z.object({name:z.literal(`ghe_server`),metadata:githubMetadata}),githubFamilyProviders=[githubIntegration.shape.name.value,gheCloudIntegration.shape.name.value,gheServerIntegration.shape.name.value],PROVIDER_FLAVOR={github:`github_com`,ghe_cloud:`ghe_cloud`,ghe_server:`ghe_server`};function normalizeGithubHost(host){return host.trim().toLowerCase().replace(HOST_REGEX,``).replace(PATH_REGEX,``)}function detectGithubHostFlavor(host){let normalized=normalizeGithubHost(host);return normalized===`github.com`?`github_com`:normalized.endsWith(`.ghe.com`)?`ghe_cloud`:`ghe_server`}function providerFromHost(host){let flavor=detectGithubHostFlavor(normalizeGithubHost(host));return flavor===`github_com`?`github`:flavor}const HOST_URL_RESOLVERS={github_com:()=>({host:GITHUB_COM_HOST,flavor:`github_com`,apiBaseUrl:GITHUB_COM_API_BASE_URL,webBaseUrl:GITHUB_COM_WEB_BASE_URL}),ghe_cloud:host=>({host,flavor:`ghe_cloud`,apiBaseUrl:`https://api.${host}`,webBaseUrl:`https://${host}`}),ghe_server:host=>({host,flavor:`ghe_server`,apiBaseUrl:`https://${host}/api/v3`,webBaseUrl:`https://${host}`})};function resolveGithubHostUrls(input){let host=normalizeGithubHost(input.host),flavor=input.flavor??detectGithubHostFlavor(host);return HOST_URL_RESOLVERS[flavor](host)}export{GITHUB_COM_API_BASE_URL,GITHUB_COM_HOST,GITHUB_COM_WEB_BASE_URL,PROVIDER_FLAVOR,detectGithubHostFlavor,gheCloudIntegration,gheServerIntegration,githubFamilyProviders,githubHostFlavorSchema,githubIntegration,githubSourceIdEnvKeys,normalizeGithubHost,providerFromHost,resolveGithubHostUrls};
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/slack.d.ts
4
3
  declare const routableCategorySchema: z.ZodEnum<{
5
4
  collaboration: "collaboration";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/slack.d.ts
4
3
  declare const routableCategorySchema: z.ZodEnum<{
5
4
  collaboration: "collaboration";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const vercelDestinationIdEnvKeys=zod.z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=zod.z.object({avatar:zod.z.string().nullable().default(null),name:zod.z.string().nullable().default(null),installationUrl:zod.z.string().nullable(),projects:zod.z.record(zod.z.string(),zod.z.string()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`team`),id:zod.z.string(),slug:zod.z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`user`),id:zod.z.string(),username:zod.z.string(),email:zod.z.string()}),vercelMetadataSchema=zod.z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=zod.z.object({name:zod.z.literal(`vercel`),metadata:vercelMetadataSchema});exports.vercelDestinationIdEnvKeys=vercelDestinationIdEnvKeys,exports.vercelIntegration=vercelIntegration,exports.vercelTeamMetadata=vercelTeamMetadata,exports.vercelUserMetadata=vercelUserMetadata;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const vercelDestinationIdEnvKeys=zod.z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=zod.z.object({avatar:zod.z.string().nullable().default(null),name:zod.z.string().nullable().default(null),installationUrl:zod.z.string().nullable(),projects:zod.z.record(zod.z.string(),zod.z.string().nullable()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`team`),id:zod.z.string(),slug:zod.z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:zod.z.literal(`user`),id:zod.z.string(),username:zod.z.string(),email:zod.z.string()}),vercelMetadataSchema=zod.z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=zod.z.object({name:zod.z.literal(`vercel`),metadata:vercelMetadataSchema});exports.vercelDestinationIdEnvKeys=vercelDestinationIdEnvKeys,exports.vercelIntegration=vercelIntegration,exports.vercelTeamMetadata=vercelTeamMetadata,exports.vercelUserMetadata=vercelUserMetadata;
@@ -1,12 +1,11 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/vercel.d.ts
4
3
  declare const vercelDestinationIdEnvKeys: "VERCEL_DEPLOYMENT_ID"[];
5
4
  declare const vercelTeamMetadata: z.ZodObject<{
6
5
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
7
6
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
7
  installationUrl: z.ZodNullable<z.ZodString>;
9
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
8
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
10
9
  accountType: z.ZodLiteral<"team">;
11
10
  id: z.ZodString;
12
11
  slug: z.ZodString;
@@ -15,7 +14,7 @@ declare const vercelUserMetadata: z.ZodObject<{
15
14
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
16
15
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
16
  installationUrl: z.ZodNullable<z.ZodString>;
18
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
17
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
19
18
  accountType: z.ZodLiteral<"user">;
20
19
  id: z.ZodString;
21
20
  username: z.ZodString;
@@ -27,7 +26,7 @@ declare const vercelIntegration: z.ZodObject<{
27
26
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
28
27
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
28
  installationUrl: z.ZodNullable<z.ZodString>;
30
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
29
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
31
30
  accountType: z.ZodLiteral<"team">;
32
31
  id: z.ZodString;
33
32
  slug: z.ZodString;
@@ -35,7 +34,7 @@ declare const vercelIntegration: z.ZodObject<{
35
34
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
35
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
36
  installationUrl: z.ZodNullable<z.ZodString>;
38
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
37
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
39
38
  accountType: z.ZodLiteral<"user">;
40
39
  id: z.ZodString;
41
40
  username: z.ZodString;
@@ -1,12 +1,11 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/integrations/platforms/vercel.d.ts
4
3
  declare const vercelDestinationIdEnvKeys: "VERCEL_DEPLOYMENT_ID"[];
5
4
  declare const vercelTeamMetadata: z.ZodObject<{
6
5
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
7
6
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
8
7
  installationUrl: z.ZodNullable<z.ZodString>;
9
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
8
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
10
9
  accountType: z.ZodLiteral<"team">;
11
10
  id: z.ZodString;
12
11
  slug: z.ZodString;
@@ -15,7 +14,7 @@ declare const vercelUserMetadata: z.ZodObject<{
15
14
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
16
15
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
16
  installationUrl: z.ZodNullable<z.ZodString>;
18
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
17
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
19
18
  accountType: z.ZodLiteral<"user">;
20
19
  id: z.ZodString;
21
20
  username: z.ZodString;
@@ -27,7 +26,7 @@ declare const vercelIntegration: z.ZodObject<{
27
26
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
28
27
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
28
  installationUrl: z.ZodNullable<z.ZodString>;
30
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
29
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
31
30
  accountType: z.ZodLiteral<"team">;
32
31
  id: z.ZodString;
33
32
  slug: z.ZodString;
@@ -35,7 +34,7 @@ declare const vercelIntegration: z.ZodObject<{
35
34
  avatar: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
35
  name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
36
  installationUrl: z.ZodNullable<z.ZodString>;
38
- projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
37
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
39
38
  accountType: z.ZodLiteral<"user">;
40
39
  id: z.ZodString;
41
40
  username: z.ZodString;
@@ -1 +1 @@
1
- import{z}from"zod";const vercelDestinationIdEnvKeys=z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=z.object({avatar:z.string().nullable().default(null),name:z.string().nullable().default(null),installationUrl:z.string().nullable(),projects:z.record(z.string(),z.string()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:z.literal(`team`),id:z.string(),slug:z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:z.literal(`user`),id:z.string(),username:z.string(),email:z.string()}),vercelMetadataSchema=z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=z.object({name:z.literal(`vercel`),metadata:vercelMetadataSchema});export{vercelDestinationIdEnvKeys,vercelIntegration,vercelTeamMetadata,vercelUserMetadata};
1
+ import{z}from"zod";const vercelDestinationIdEnvKeys=z.enum([`VERCEL_DEPLOYMENT_ID`]).options,vercelMetadataBase=z.object({avatar:z.string().nullable().default(null),name:z.string().nullable().default(null),installationUrl:z.string().nullable(),projects:z.record(z.string(),z.string().nullable()).default({})}),vercelTeamMetadata=vercelMetadataBase.extend({accountType:z.literal(`team`),id:z.string(),slug:z.string()}),vercelUserMetadata=vercelMetadataBase.extend({accountType:z.literal(`user`),id:z.string(),username:z.string(),email:z.string()}),vercelMetadataSchema=z.discriminatedUnion(`accountType`,[vercelTeamMetadata,vercelUserMetadata]),vercelIntegration=z.object({name:z.literal(`vercel`),metadata:vercelMetadataSchema});export{vercelDestinationIdEnvKeys,vercelIntegration,vercelTeamMetadata,vercelUserMetadata};
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/releases/definition.d.ts
4
3
  declare const releaseStatusSchema: z.ZodEnum<{
5
4
  building: "building";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/releases/definition.d.ts
4
3
  declare const releaseStatusSchema: z.ZodEnum<{
5
4
  building: "building";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/releases/slug.d.ts
4
3
  declare const releaseSlugSchema: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
5
4
  type ReleaseSlug = z.infer<typeof releaseSlugSchema>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/releases/slug.d.ts
4
3
  declare const releaseSlugSchema: z.core.$ZodBranded<z.ZodTemplateLiteral<`rel_${string}`>, "ReleaseSlug", "out">;
5
4
  type ReleaseSlug = z.infer<typeof releaseSlugSchema>;
@@ -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 `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,title:`API key could not be read`,details:[`INTERFERE_API_KEY was sent but the server could not read it.`,`Expected a key starting with ${API_KEY_PREFIX_HINT}.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,title:`API key rejected by server`,details:[`INTERFERE_API_KEY was sent but the server did not recognize it.`,`Verify it matches an active key at ${DASHBOARD_KEYS_URL}.`,`If you recently rotated keys, restart your build with the new value.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,title:`API key missing release scope`,details:[`INTERFERE_API_KEY was recognized but cannot publish release metadata.`,`Create or update the key with \`release:write\` scope at ${DASHBOARD_KEYS_URL}.`,`If you recently changed key scopes, restart your build with the new value.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}exports.API_KEY_PREFIXES=API_KEY_PREFIXES,exports.classifyReleasePipelineError=classifyReleasePipelineError,exports.diagnoseRelease=diagnoseRelease,exports.formatApiKeyPreview=formatApiKeyPreview,exports.isInterfereApiKey=isInterfereApiKey;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const API_KEY_PREFIXES=[`interfere_secret_us_`,`interfere_secret_eu_`,`interfere_ak_`],DASHBOARD_KEYS_URL=`https://interfere.com/settings/api-keys`,API_KEY_PREFIX_HINT=API_KEY_PREFIXES.map(prefix=>`\`${prefix}\``).join(` or `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,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}.`,`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,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.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,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.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}exports.API_KEY_PREFIXES=API_KEY_PREFIXES,exports.classifyReleasePipelineError=classifyReleasePipelineError,exports.diagnoseRelease=diagnoseRelease,exports.formatApiKeyPreview=formatApiKeyPreview,exports.isInterfereApiKey=isInterfereApiKey;
@@ -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 `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,title:`API key could not be read`,details:[`INTERFERE_API_KEY was sent but the server could not read it.`,`Expected a key starting with ${API_KEY_PREFIX_HINT}.`,`If you set a publishable key (\`interfere_pub_us_*\`, \`interfere_pub_eu_*\`, or legacy \`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new API key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,title:`API key rejected by server`,details:[`INTERFERE_API_KEY was sent but the server did not recognize it.`,`Verify it matches an active key at ${DASHBOARD_KEYS_URL}.`,`If you recently rotated keys, restart your build with the new value.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,title:`API key missing release scope`,details:[`INTERFERE_API_KEY was recognized but cannot publish release metadata.`,`Create or update the key with \`release:write\` scope at ${DASHBOARD_KEYS_URL}.`,`If you recently changed key scopes, restart your build with the new value.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}export{API_KEY_PREFIXES,classifyReleasePipelineError,diagnoseRelease,formatApiKeyPreview,isInterfereApiKey};
1
+ const API_KEY_PREFIXES=[`interfere_secret_us_`,`interfere_secret_eu_`,`interfere_ak_`],DASHBOARD_KEYS_URL=`https://interfere.com/settings/api-keys`,API_KEY_PREFIX_HINT=API_KEY_PREFIXES.map(prefix=>`\`${prefix}\``).join(` or `);function formatApiKeyPreview(apiKey){let preview=apiKey.slice(0,12);return apiKey.length>12?`${preview}...`:preview}function isInterfereApiKey(apiKey){return API_KEY_PREFIXES.some(prefix=>apiKey.startsWith(prefix))}const CATALOG={API_KEY_WRONG_PREFIX:(ctx,input)=>({code:`API_KEY_WRONG_PREFIX`,severity:`fatal`,title:`INTERFERE_API_KEY has wrong prefix`,details:[`Expected a key starting with ${API_KEY_PREFIX_HINT} but got \`${formatApiKeyPreview(input.apiKey??``)}\`.`,`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_UNREADABLE:ctx=>({code:`API_KEY_UNREADABLE`,severity:`fatal`,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}.`,`If you set a public key (\`interfere_public_us_*\`, \`interfere_public_eu_*\`, or legacy \`interfere_pub_*\`/\`interfere_pk_*\`), put it in \`${ctx.publicKeyEnvVar}\` instead.`,`Generate a new secret key at ${DASHBOARD_KEYS_URL}.`]}),API_KEY_REJECTED:()=>({code:`API_KEY_REJECTED`,severity:`fatal`,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.`]}),API_KEY_SCOPE_MISMATCH:()=>({code:`API_KEY_SCOPE_MISMATCH`,severity:`fatal`,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.`]}),RELEASE_PIPELINE_FAILED:(_ctx,input)=>({code:`RELEASE_PIPELINE_FAILED`,severity:`warn`,title:`Skipping release pipeline`,details:[`Interfere failed to process this release.`,`Events from this release will be ingested, but ignored as finding when generating insights.`,`Please check https://status.interfere.com for any outages, or contact support@interfere.com if the problem persists.`,`Error: ${input.errorMessage??`<unknown>`}`]})};function diagnoseRelease(code,ctx,input={}){return CATALOG[code](ctx,input)}const COLLECTOR_CODE_TO_DIAGNOSTIC={COLLECTOR_AUTH_MISSING:`API_KEY_UNREADABLE`,COLLECTOR_AUTH_AK_INVALID:`API_KEY_REJECTED`,COLLECTOR_AUTH_AK_SCOPE_MISMATCH:`API_KEY_SCOPE_MISMATCH`};function classifyReleasePipelineError(error){if(typeof error!=`object`||!error)return`RELEASE_PIPELINE_FAILED`;let{code}=error;return typeof code==`string`?COLLECTOR_CODE_TO_DIAGNOSTIC[code]??`RELEASE_PIPELINE_FAILED`:`RELEASE_PIPELINE_FAILED`}export{API_KEY_PREFIXES,classifyReleasePipelineError,diagnoseRelease,formatApiKeyPreview,isInterfereApiKey};
@@ -1,6 +1,5 @@
1
1
  import { ReleaseDestinationMetadata } from "../integrations/index.cjs";
2
2
  import { ReleaseSlug } from "../releases/slug.cjs";
3
-
4
3
  //#region src/sdk/cli-destination.d.ts
5
4
  declare function resolveCliReleaseDestination(env: Record<string, string | undefined>, releaseSlug: ReleaseSlug): ReleaseDestinationMetadata;
6
5
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { ReleaseDestinationMetadata } from "../integrations/index.mjs";
2
2
  import { ReleaseSlug } from "../releases/slug.mjs";
3
-
4
3
  //#region src/sdk/cli-destination.d.ts
5
4
  declare function resolveCliReleaseDestination(env: Record<string, string | undefined>, releaseSlug: ReleaseSlug): ReleaseDestinationMetadata;
6
5
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { ReleaseDestinationMetadata } from "../integrations/index.cjs";
2
-
3
2
  //#region src/sdk/deploy-environment.d.ts
4
3
  declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
5
4
  declare class DeployEnvironmentError extends Error {}
@@ -1,5 +1,4 @@
1
1
  import { ReleaseDestinationMetadata } from "../integrations/index.mjs";
2
-
3
2
  //#region src/sdk/deploy-environment.d.ts
4
3
  declare const DEPLOY_ENVIRONMENT_MAX_LENGTH = 32;
5
4
  declare class DeployEnvironmentError extends Error {}
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/envelope.d.ts
4
3
  /**
5
4
  * Indicates how the sessionId was resolved on the server.
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/envelope.d.ts
4
3
  /**
5
4
  * Indicates how the sessionId was resolved on the server.
@@ -1,6 +1,5 @@
1
1
  import { IngestedFrame } from "#data/frame";
2
2
  import { ErrorMechanism, ExceptionValue } from "#sdk/plugins/payload/errors";
3
-
4
3
  //#region src/sdk/errors.d.ts
5
4
  /**
6
5
  * Structured taxonomy of capture sources, tagged onto each
@@ -48,7 +47,8 @@ declare const MECHANISM_TYPE: {
48
47
  readonly unhandledRejection: "auto.node.global_handlers.unhandled_rejection";
49
48
  };
50
49
  readonly manual: {
51
- /** Customer called `capture(error)` from `@interfere/react/api`. */readonly capture: "manual.api.capture";
50
+ /** Customer called `capture(error)` from `@interfere/react/api`. */
51
+ readonly capture: "manual.api.capture";
52
52
  };
53
53
  };
54
54
  /**
@@ -1,6 +1,5 @@
1
1
  import { IngestedFrame } from "#data/frame";
2
2
  import { ErrorMechanism, ExceptionValue } from "#sdk/plugins/payload/errors";
3
-
4
3
  //#region src/sdk/errors.d.ts
5
4
  /**
6
5
  * Structured taxonomy of capture sources, tagged onto each
@@ -48,7 +47,8 @@ declare const MECHANISM_TYPE: {
48
47
  readonly unhandledRejection: "auto.node.global_handlers.unhandled_rejection";
49
48
  };
50
49
  readonly manual: {
51
- /** Customer called `capture(error)` from `@interfere/react/api`. */readonly capture: "manual.api.capture";
50
+ /** Customer called `capture(error)` from `@interfere/react/api`. */
51
+ readonly capture: "manual.api.capture";
52
52
  };
53
53
  };
54
54
  /**
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/geo.d.ts
4
3
  declare const cloudflareTraceSchema: z.ZodObject<{
5
4
  loc: z.ZodString;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/geo.d.ts
4
3
  declare const cloudflareTraceSchema: z.ZodObject<{
5
4
  loc: z.ZodString;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/identify.d.ts
4
3
  declare const identifySourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
4
  type: z.ZodLiteral<"clerk">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/identify.d.ts
4
3
  declare const identifySourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
4
  type: z.ZodLiteral<"clerk">;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),exports.API_URL_GLOBAL=`__INTERFERE_API_URL__`,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__`;
@@ -0,0 +1,10 @@
1
+ //#region src/sdk/injected-globals.d.ts
2
+ declare const API_URL_GLOBAL = "__INTERFERE_API_URL__";
3
+ declare const ENVIRONMENT_GLOBAL = "__INTERFERE_ENVIRONMENT__";
4
+ declare const FORCE_ENABLE_GLOBAL = "__INTERFERE_FORCE_ENABLE__";
5
+ declare const INGEST_URL_GLOBAL = "__INTERFERE_INGEST_URL__";
6
+ declare const PUBLIC_KEY_GLOBAL = "__INTERFERE_PUBLIC_KEY__";
7
+ declare const RELEASE_SLUG_GLOBAL = "__INTERFERE_RELEASE_SLUG__";
8
+ declare const SDK_STACK_GLOBAL = "__INTERFERE_SDK_STACK__";
9
+ //#endregion
10
+ export { API_URL_GLOBAL, ENVIRONMENT_GLOBAL, FORCE_ENABLE_GLOBAL, INGEST_URL_GLOBAL, PUBLIC_KEY_GLOBAL, RELEASE_SLUG_GLOBAL, SDK_STACK_GLOBAL };
@@ -0,0 +1,10 @@
1
+ //#region src/sdk/injected-globals.d.ts
2
+ declare const API_URL_GLOBAL = "__INTERFERE_API_URL__";
3
+ declare const ENVIRONMENT_GLOBAL = "__INTERFERE_ENVIRONMENT__";
4
+ declare const FORCE_ENABLE_GLOBAL = "__INTERFERE_FORCE_ENABLE__";
5
+ declare const INGEST_URL_GLOBAL = "__INTERFERE_INGEST_URL__";
6
+ declare const PUBLIC_KEY_GLOBAL = "__INTERFERE_PUBLIC_KEY__";
7
+ declare const RELEASE_SLUG_GLOBAL = "__INTERFERE_RELEASE_SLUG__";
8
+ declare const SDK_STACK_GLOBAL = "__INTERFERE_SDK_STACK__";
9
+ //#endregion
10
+ export { API_URL_GLOBAL, ENVIRONMENT_GLOBAL, FORCE_ENABLE_GLOBAL, INGEST_URL_GLOBAL, PUBLIC_KEY_GLOBAL, RELEASE_SLUG_GLOBAL, SDK_STACK_GLOBAL };
@@ -0,0 +1 @@
1
+ const API_URL_GLOBAL=`__INTERFERE_API_URL__`,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,ENVIRONMENT_GLOBAL,FORCE_ENABLE_GLOBAL,INGEST_URL_GLOBAL,PUBLIC_KEY_GLOBAL,RELEASE_SLUG_GLOBAL,SDK_STACK_GLOBAL};
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_runtime=require("./runtime.cjs");let zod=require("zod");const LOG_SOURCING_ENV_VAR=`INTERFERE_LOG_SOURCING`,LOG_SOURCING_GLOBAL=`__INTERFERE_LOG_SOURCING__`,logSourcingModeSchema=zod.z.enum([`sdk`,`drain`]);function resolveLogSourcingMode(opts){let injected=logSourcingModeSchema.safeParse(require_sdk_runtime.normalizeEnv(opts?.injected));if(injected.success)return injected.data;let fromEnv=logSourcingModeSchema.safeParse(require_sdk_runtime.normalizeEnv(opts?.env?.[LOG_SOURCING_ENV_VAR]));return fromEnv.success?fromEnv.data:`sdk`}function readLogSourcingMode(env=typeof process>`u`?void 0:process.env){let injected=globalThis[LOG_SOURCING_GLOBAL];return resolveLogSourcingMode({injected:typeof injected==`string`?injected:void 0,env})}exports.DEFAULT_LOG_SOURCING_MODE=`sdk`,exports.LOG_SOURCING_ENV_VAR=LOG_SOURCING_ENV_VAR,exports.LOG_SOURCING_GLOBAL=LOG_SOURCING_GLOBAL,exports.logSourcingModeSchema=logSourcingModeSchema,exports.readLogSourcingMode=readLogSourcingMode,exports.resolveLogSourcingMode=resolveLogSourcingMode;
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ //#region src/sdk/log-sourcing.d.ts
3
+ declare const LOG_SOURCING_ENV_VAR = "INTERFERE_LOG_SOURCING";
4
+ /**
5
+ * Global stamped into the server bundle at build time (via `withInterfere`'s
6
+ * value-injection loader) from the surface's remote config. Read at cold
7
+ * start so the mode is known synchronously, before the console bridge and
8
+ * logger provider register.
9
+ */
10
+ declare const LOG_SOURCING_GLOBAL = "__INTERFERE_LOG_SOURCING__";
11
+ declare const logSourcingModeSchema: z.ZodEnum<{
12
+ drain: "drain";
13
+ sdk: "sdk";
14
+ }>;
15
+ /**
16
+ * How the server-side SDK sources logs.
17
+ *
18
+ * - `sdk`: the SDK intercepts `console.*` (`bridgeConsoleToOtel`) and ships
19
+ * log records through its own OTLP log exporter.
20
+ * - `drain`: the SDK does not intercept `console.*` and does not register a
21
+ * logger provider; a platform log drain (e.g. Vercel) captures stdout
22
+ * out-of-process and posts records to the collector directly.
23
+ */
24
+ type LogSourcingMode = z.infer<typeof logSourcingModeSchema>;
25
+ declare const DEFAULT_LOG_SOURCING_MODE = "sdk";
26
+ declare function resolveLogSourcingMode(opts?: {
27
+ readonly injected?: string | null | undefined;
28
+ readonly env?: Record<string, string | undefined> | undefined;
29
+ }): LogSourcingMode;
30
+ declare function readLogSourcingMode(env?: Record<string, string | undefined> | undefined): LogSourcingMode;
31
+ //#endregion
32
+ export { DEFAULT_LOG_SOURCING_MODE, LOG_SOURCING_ENV_VAR, LOG_SOURCING_GLOBAL, LogSourcingMode, logSourcingModeSchema, readLogSourcingMode, resolveLogSourcingMode };
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ //#region src/sdk/log-sourcing.d.ts
3
+ declare const LOG_SOURCING_ENV_VAR = "INTERFERE_LOG_SOURCING";
4
+ /**
5
+ * Global stamped into the server bundle at build time (via `withInterfere`'s
6
+ * value-injection loader) from the surface's remote config. Read at cold
7
+ * start so the mode is known synchronously, before the console bridge and
8
+ * logger provider register.
9
+ */
10
+ declare const LOG_SOURCING_GLOBAL = "__INTERFERE_LOG_SOURCING__";
11
+ declare const logSourcingModeSchema: z.ZodEnum<{
12
+ drain: "drain";
13
+ sdk: "sdk";
14
+ }>;
15
+ /**
16
+ * How the server-side SDK sources logs.
17
+ *
18
+ * - `sdk`: the SDK intercepts `console.*` (`bridgeConsoleToOtel`) and ships
19
+ * log records through its own OTLP log exporter.
20
+ * - `drain`: the SDK does not intercept `console.*` and does not register a
21
+ * logger provider; a platform log drain (e.g. Vercel) captures stdout
22
+ * out-of-process and posts records to the collector directly.
23
+ */
24
+ type LogSourcingMode = z.infer<typeof logSourcingModeSchema>;
25
+ declare const DEFAULT_LOG_SOURCING_MODE = "sdk";
26
+ declare function resolveLogSourcingMode(opts?: {
27
+ readonly injected?: string | null | undefined;
28
+ readonly env?: Record<string, string | undefined> | undefined;
29
+ }): LogSourcingMode;
30
+ declare function readLogSourcingMode(env?: Record<string, string | undefined> | undefined): LogSourcingMode;
31
+ //#endregion
32
+ export { DEFAULT_LOG_SOURCING_MODE, LOG_SOURCING_ENV_VAR, LOG_SOURCING_GLOBAL, LogSourcingMode, logSourcingModeSchema, readLogSourcingMode, resolveLogSourcingMode };
@@ -0,0 +1 @@
1
+ import{normalizeEnv}from"./runtime.mjs";import{z}from"zod";const LOG_SOURCING_ENV_VAR=`INTERFERE_LOG_SOURCING`,LOG_SOURCING_GLOBAL=`__INTERFERE_LOG_SOURCING__`,logSourcingModeSchema=z.enum([`sdk`,`drain`]),DEFAULT_LOG_SOURCING_MODE=`sdk`;function resolveLogSourcingMode(opts){let injected=logSourcingModeSchema.safeParse(normalizeEnv(opts?.injected));if(injected.success)return injected.data;let fromEnv=logSourcingModeSchema.safeParse(normalizeEnv(opts?.env?.[LOG_SOURCING_ENV_VAR]));return fromEnv.success?fromEnv.data:`sdk`}function readLogSourcingMode(env=typeof process>`u`?void 0:process.env){let injected=globalThis[LOG_SOURCING_GLOBAL];return resolveLogSourcingMode({injected:typeof injected==`string`?injected:void 0,env})}export{DEFAULT_LOG_SOURCING_MODE,LOG_SOURCING_ENV_VAR,LOG_SOURCING_GLOBAL,logSourcingModeSchema,readLogSourcingMode,resolveLogSourcingMode};
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/browser.d.ts
4
3
  declare const deviceMetadataSchema: z.ZodObject<{
5
4
  browser: z.ZodObject<{
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/browser.d.ts
4
3
  declare const deviceMetadataSchema: z.ZodObject<{
5
4
  browser: z.ZodObject<{
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/edge.d.ts
4
3
  declare const edgeContextSchema: z.ZodObject<{
5
4
  runtime: z.ZodLiteral<"edge">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/edge.d.ts
4
3
  declare const edgeContextSchema: z.ZodObject<{
5
4
  runtime: z.ZodLiteral<"edge">;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/next.d.ts
4
3
  declare const renderSourceSchema: z.ZodEnum<{
5
4
  "react-server-components": "react-server-components";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/next.d.ts
4
3
  declare const renderSourceSchema: z.ZodEnum<{
5
4
  "react-server-components": "react-server-components";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/node.d.ts
4
3
  declare const nodeContextSchema: z.ZodObject<{
5
4
  errorDigest: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/context/node.d.ts
4
3
  declare const nodeContextSchema: z.ZodObject<{
5
4
  errorDigest: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  //#region src/sdk/plugins/manifest.d.ts
2
2
  declare const CONSENT_CATEGORIES: readonly ["necessary", "analytics", "replay"];
3
- type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T> }[keyof T];
3
+ type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T>; }[keyof T];
4
4
  declare const PLUGIN_MANIFEST: readonly [{
5
5
  readonly consentCategory: "necessary";
6
6
  readonly defaultEnabled: true;
@@ -1,6 +1,6 @@
1
1
  //#region src/sdk/plugins/manifest.d.ts
2
2
  declare const CONSENT_CATEGORIES: readonly ["necessary", "analytics", "replay"];
3
- type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T> }[keyof T];
3
+ type AtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<T>; }[keyof T];
4
4
  declare const PLUGIN_MANIFEST: readonly [{
5
5
  readonly consentCategory: "necessary";
6
6
  readonly defaultEnabled: true;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/errors.d.ts
4
3
  declare const errorSourceSchema: z.ZodEnum<{
5
4
  client: "client";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/errors.d.ts
4
3
  declare const errorSourceSchema: z.ZodEnum<{
5
4
  client: "client";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/page-events.d.ts
4
3
  declare const uiEventPayloadSchema: z.ZodObject<{
5
4
  event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/page-events.d.ts
4
3
  declare const uiEventPayloadSchema: z.ZodObject<{
5
4
  event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/rage-click.d.ts
4
3
  declare const rageClickPayloadSchema: z.ZodObject<{
5
4
  count: z.ZodNumber;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/rage-click.d.ts
4
3
  declare const rageClickPayloadSchema: z.ZodObject<{
5
4
  count: z.ZodNumber;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/replay.d.ts
4
3
  declare const replayChunkPayloadSchema: z.ZodObject<{
5
4
  ts: z.ZodNumber;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/plugins/payload/replay.d.ts
4
3
  declare const replayChunkPayloadSchema: z.ZodObject<{
5
4
  ts: z.ZodNumber;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_plugins_manifest=require("./plugins/manifest.cjs");let zod=require("zod");const remotePluginConfigSchema=zod.z.object(Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.map(p=>[p.name,zod.z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=zod.z.object({plugins:remotePluginConfigSchema,ingestUrl:zod.z.url().optional()}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));exports.EVENT_TYPE_TO_PLUGIN=EVENT_TYPE_TO_PLUGIN,exports.remoteConfigSchema=remoteConfigSchema,exports.remotePluginConfigSchema=remotePluginConfigSchema;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_log_sourcing=require("./log-sourcing.cjs"),require_sdk_plugins_manifest=require("./plugins/manifest.cjs"),require_sdk_server_tracing=require("./server-tracing.cjs");let zod=require("zod");const remotePluginConfigSchema=zod.z.object(Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.map(p=>[p.name,zod.z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=zod.z.object({plugins:remotePluginConfigSchema,ingestUrl:zod.z.url().optional(),serverTracing:require_sdk_server_tracing.serverTracingModeSchema.optional(),logSourcing:require_sdk_log_sourcing.logSourcingModeSchema.optional()}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),PLUGINS_GLOBAL=`__INTERFERE_PLUGINS__`;function readBakedPlugins(){let injected=globalThis[PLUGINS_GLOBAL];if(injected==null)return null;let parsed=remotePluginConfigSchema.safeParse(injected);return parsed.success?parsed.data:null}const EVENT_TYPE_TO_PLUGIN=Object.fromEntries(require_sdk_plugins_manifest.PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));exports.EVENT_TYPE_TO_PLUGIN=EVENT_TYPE_TO_PLUGIN,exports.PLUGINS_GLOBAL=PLUGINS_GLOBAL,exports.readBakedPlugins=readBakedPlugins,exports.remoteConfigSchema=remoteConfigSchema,exports.remotePluginConfigSchema=remotePluginConfigSchema;
@@ -1,7 +1,6 @@
1
1
  import { EventType } from "./envelope.cjs";
2
2
  import { PluginKey } from "./plugins/manifest.cjs";
3
3
  import { z } from "zod";
4
-
5
4
  //#region src/sdk/remote-config.d.ts
6
5
  type RemotePluginConfig = Partial<Record<PluginKey, boolean>>;
7
6
  /**
@@ -32,8 +31,23 @@ declare const remoteConfigSchema: z.ZodObject<{
32
31
  replay: z.ZodBoolean;
33
32
  }, z.core.$strip>;
34
33
  ingestUrl: z.ZodOptional<z.ZodURL>;
34
+ serverTracing: z.ZodOptional<z.ZodEnum<{
35
+ drain: "drain";
36
+ full: "full";
37
+ }>>;
38
+ logSourcing: z.ZodOptional<z.ZodEnum<{
39
+ drain: "drain";
40
+ sdk: "sdk";
41
+ }>>;
35
42
  }, z.core.$strip>;
36
43
  type RemoteConfig = z.infer<typeof remoteConfigSchema>;
44
+ /**
45
+ * Global stamped into the bundle at build time (Next `withInterfere`) with the
46
+ * surface's resolved plugin config. Its presence signals the build-time
47
+ * `/v2/config` fetch succeeded, so the runtime config fetch can be skipped.
48
+ */
49
+ declare const PLUGINS_GLOBAL = "__INTERFERE_PLUGINS__";
50
+ declare function readBakedPlugins(): RemotePluginConfig | null;
37
51
  declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
38
52
  //#endregion
39
- export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
53
+ export { EVENT_TYPE_TO_PLUGIN, PLUGINS_GLOBAL, RemoteConfig, RemotePluginConfig, readBakedPlugins, remoteConfigSchema, remotePluginConfigSchema };
@@ -1,7 +1,6 @@
1
1
  import { EventType } from "./envelope.mjs";
2
2
  import { PluginKey } from "./plugins/manifest.mjs";
3
3
  import { z } from "zod";
4
-
5
4
  //#region src/sdk/remote-config.d.ts
6
5
  type RemotePluginConfig = Partial<Record<PluginKey, boolean>>;
7
6
  /**
@@ -32,8 +31,23 @@ declare const remoteConfigSchema: z.ZodObject<{
32
31
  replay: z.ZodBoolean;
33
32
  }, z.core.$strip>;
34
33
  ingestUrl: z.ZodOptional<z.ZodURL>;
34
+ serverTracing: z.ZodOptional<z.ZodEnum<{
35
+ drain: "drain";
36
+ full: "full";
37
+ }>>;
38
+ logSourcing: z.ZodOptional<z.ZodEnum<{
39
+ drain: "drain";
40
+ sdk: "sdk";
41
+ }>>;
35
42
  }, z.core.$strip>;
36
43
  type RemoteConfig = z.infer<typeof remoteConfigSchema>;
44
+ /**
45
+ * Global stamped into the bundle at build time (Next `withInterfere`) with the
46
+ * surface's resolved plugin config. Its presence signals the build-time
47
+ * `/v2/config` fetch succeeded, so the runtime config fetch can be skipped.
48
+ */
49
+ declare const PLUGINS_GLOBAL = "__INTERFERE_PLUGINS__";
50
+ declare function readBakedPlugins(): RemotePluginConfig | null;
37
51
  declare const EVENT_TYPE_TO_PLUGIN: Record<EventType, PluginKey>;
38
52
  //#endregion
39
- export { EVENT_TYPE_TO_PLUGIN, RemoteConfig, RemotePluginConfig, remoteConfigSchema, remotePluginConfigSchema };
53
+ export { EVENT_TYPE_TO_PLUGIN, PLUGINS_GLOBAL, RemoteConfig, RemotePluginConfig, readBakedPlugins, remoteConfigSchema, remotePluginConfigSchema };
@@ -1 +1 @@
1
- import{PLUGIN_MANIFEST}from"./plugins/manifest.mjs";import{z}from"zod";const remotePluginConfigSchema=z.object(Object.fromEntries(PLUGIN_MANIFEST.map(p=>[p.name,z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=z.object({plugins:remotePluginConfigSchema,ingestUrl:z.url().optional()}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),EVENT_TYPE_TO_PLUGIN=Object.fromEntries(PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));export{EVENT_TYPE_TO_PLUGIN,remoteConfigSchema,remotePluginConfigSchema};
1
+ import{logSourcingModeSchema}from"./log-sourcing.mjs";import{PLUGIN_MANIFEST}from"./plugins/manifest.mjs";import{serverTracingModeSchema}from"./server-tracing.mjs";import{z}from"zod";const remotePluginConfigSchema=z.object(Object.fromEntries(PLUGIN_MANIFEST.map(p=>[p.name,z.boolean()]))).meta({id:`RemotePluginConfig`,title:`RemotePluginConfig`}),remoteConfigSchema=z.object({plugins:remotePluginConfigSchema,ingestUrl:z.url().optional(),serverTracing:serverTracingModeSchema.optional(),logSourcing:logSourcingModeSchema.optional()}).meta({id:`RemoteConfig`,title:`RemoteConfig`}),PLUGINS_GLOBAL=`__INTERFERE_PLUGINS__`;function readBakedPlugins(){let injected=globalThis[PLUGINS_GLOBAL];if(injected==null)return null;let parsed=remotePluginConfigSchema.safeParse(injected);return parsed.success?parsed.data:null}const EVENT_TYPE_TO_PLUGIN=Object.fromEntries(PLUGIN_MANIFEST.flatMap(plugin=>plugin.events.map(event=>[event.name,plugin.name])));export{EVENT_TYPE_TO_PLUGIN,PLUGINS_GLOBAL,readBakedPlugins,remoteConfigSchema,remotePluginConfigSchema};
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/runtime.d.ts
4
3
  declare const envSchema: z.ZodNullable<z.ZodString>;
5
4
  type Env = z.infer<typeof envSchema>;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/sdk/runtime.d.ts
4
3
  declare const envSchema: z.ZodNullable<z.ZodString>;
5
4
  type Env = z.infer<typeof envSchema>;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_sdk_runtime=require("./runtime.cjs");let zod=require("zod");const SERVER_TRACING_ENV_VAR=`INTERFERE_SERVER_TRACING`,SERVER_TRACING_GLOBAL=`__INTERFERE_SERVER_TRACING__`,serverTracingModeSchema=zod.z.enum([`full`,`drain`]),DEFAULT_SERVER_TRACING_MODE=`full`;function resolveServerTracingMode(opts){let injected=serverTracingModeSchema.safeParse(require_sdk_runtime.normalizeEnv(opts?.injected));if(injected.success)return injected.data;let fromEnv=serverTracingModeSchema.safeParse(require_sdk_runtime.normalizeEnv(opts?.env?.[SERVER_TRACING_ENV_VAR]));return fromEnv.success?fromEnv.data:DEFAULT_SERVER_TRACING_MODE}function readServerTracingMode(env=typeof process>`u`?void 0:process.env){let injected=globalThis[SERVER_TRACING_GLOBAL];return resolveServerTracingMode({injected:typeof injected==`string`?injected:void 0,env})}exports.DEFAULT_SERVER_TRACING_MODE=DEFAULT_SERVER_TRACING_MODE,exports.SERVER_TRACING_ENV_VAR=SERVER_TRACING_ENV_VAR,exports.SERVER_TRACING_GLOBAL=SERVER_TRACING_GLOBAL,exports.readServerTracingMode=readServerTracingMode,exports.resolveServerTracingMode=resolveServerTracingMode,exports.serverTracingModeSchema=serverTracingModeSchema;
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ //#region src/sdk/server-tracing.d.ts
3
+ declare const SERVER_TRACING_ENV_VAR = "INTERFERE_SERVER_TRACING";
4
+ /**
5
+ * Global stamped into the server bundle at build time (via `withInterfere`'s
6
+ * value-injection loader) from the surface's remote config. Read at cold
7
+ * start so the mode is known synchronously, before instrumentation registers.
8
+ */
9
+ declare const SERVER_TRACING_GLOBAL = "__INTERFERE_SERVER_TRACING__";
10
+ declare const serverTracingModeSchema: z.ZodEnum<{
11
+ drain: "drain";
12
+ full: "full";
13
+ }>;
14
+ /**
15
+ * How the server-side SDK sources traces.
16
+ *
17
+ * - `full`: the SDK runs its own outbound HTTP (undici) instrumentation and
18
+ * exports spans directly.
19
+ * - `drain`: the SDK skips outbound HTTP instrumentation and defers
20
+ * server/edge traces to a platform trace drain, removing the per-fetch span
21
+ * creation from the request hot path.
22
+ */
23
+ type ServerTracingMode = z.infer<typeof serverTracingModeSchema>;
24
+ declare const DEFAULT_SERVER_TRACING_MODE = "full";
25
+ /**
26
+ * Resolve the server tracing mode: the build-injected value wins, then the
27
+ * `INTERFERE_SERVER_TRACING` env var, then {@link DEFAULT_SERVER_TRACING_MODE}.
28
+ * Unrecognised values fall through to the next source.
29
+ */
30
+ declare function resolveServerTracingMode(opts?: {
31
+ readonly injected?: string | null | undefined;
32
+ readonly env?: Record<string, string | undefined> | undefined;
33
+ }): ServerTracingMode;
34
+ /**
35
+ * Server-runtime convenience over {@link resolveServerTracingMode}: reads the
36
+ * build-injected {@link SERVER_TRACING_GLOBAL} global and falls back to
37
+ * `process.env`. Zero-touch — no code option required.
38
+ */
39
+ declare function readServerTracingMode(env?: Record<string, string | undefined> | undefined): ServerTracingMode;
40
+ //#endregion
41
+ export { DEFAULT_SERVER_TRACING_MODE, SERVER_TRACING_ENV_VAR, SERVER_TRACING_GLOBAL, ServerTracingMode, readServerTracingMode, resolveServerTracingMode, serverTracingModeSchema };
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ //#region src/sdk/server-tracing.d.ts
3
+ declare const SERVER_TRACING_ENV_VAR = "INTERFERE_SERVER_TRACING";
4
+ /**
5
+ * Global stamped into the server bundle at build time (via `withInterfere`'s
6
+ * value-injection loader) from the surface's remote config. Read at cold
7
+ * start so the mode is known synchronously, before instrumentation registers.
8
+ */
9
+ declare const SERVER_TRACING_GLOBAL = "__INTERFERE_SERVER_TRACING__";
10
+ declare const serverTracingModeSchema: z.ZodEnum<{
11
+ drain: "drain";
12
+ full: "full";
13
+ }>;
14
+ /**
15
+ * How the server-side SDK sources traces.
16
+ *
17
+ * - `full`: the SDK runs its own outbound HTTP (undici) instrumentation and
18
+ * exports spans directly.
19
+ * - `drain`: the SDK skips outbound HTTP instrumentation and defers
20
+ * server/edge traces to a platform trace drain, removing the per-fetch span
21
+ * creation from the request hot path.
22
+ */
23
+ type ServerTracingMode = z.infer<typeof serverTracingModeSchema>;
24
+ declare const DEFAULT_SERVER_TRACING_MODE = "full";
25
+ /**
26
+ * Resolve the server tracing mode: the build-injected value wins, then the
27
+ * `INTERFERE_SERVER_TRACING` env var, then {@link DEFAULT_SERVER_TRACING_MODE}.
28
+ * Unrecognised values fall through to the next source.
29
+ */
30
+ declare function resolveServerTracingMode(opts?: {
31
+ readonly injected?: string | null | undefined;
32
+ readonly env?: Record<string, string | undefined> | undefined;
33
+ }): ServerTracingMode;
34
+ /**
35
+ * Server-runtime convenience over {@link resolveServerTracingMode}: reads the
36
+ * build-injected {@link SERVER_TRACING_GLOBAL} global and falls back to
37
+ * `process.env`. Zero-touch — no code option required.
38
+ */
39
+ declare function readServerTracingMode(env?: Record<string, string | undefined> | undefined): ServerTracingMode;
40
+ //#endregion
41
+ export { DEFAULT_SERVER_TRACING_MODE, SERVER_TRACING_ENV_VAR, SERVER_TRACING_GLOBAL, ServerTracingMode, readServerTracingMode, resolveServerTracingMode, serverTracingModeSchema };
@@ -0,0 +1 @@
1
+ import{normalizeEnv}from"./runtime.mjs";import{z}from"zod";const SERVER_TRACING_ENV_VAR=`INTERFERE_SERVER_TRACING`,SERVER_TRACING_GLOBAL=`__INTERFERE_SERVER_TRACING__`,serverTracingModeSchema=z.enum([`full`,`drain`]),DEFAULT_SERVER_TRACING_MODE=`full`;function resolveServerTracingMode(opts){let injected=serverTracingModeSchema.safeParse(normalizeEnv(opts?.injected));if(injected.success)return injected.data;let fromEnv=serverTracingModeSchema.safeParse(normalizeEnv(opts?.env?.[SERVER_TRACING_ENV_VAR]));return fromEnv.success?fromEnv.data:DEFAULT_SERVER_TRACING_MODE}function readServerTracingMode(env=typeof process>`u`?void 0:process.env){let injected=globalThis[SERVER_TRACING_GLOBAL];return resolveServerTracingMode({injected:typeof injected==`string`?injected:void 0,env})}export{DEFAULT_SERVER_TRACING_MODE,SERVER_TRACING_ENV_VAR,SERVER_TRACING_GLOBAL,readServerTracingMode,resolveServerTracingMode,serverTracingModeSchema};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interfere/types",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "license": "MIT",
5
5
  "description": "TypeScript & Zod types for Interfere",
6
6
  "keywords": [
@@ -152,9 +152,9 @@
152
152
  "zod": "^4.4.3"
153
153
  },
154
154
  "devDependencies": {
155
- "@interfere/sdk": "^11.0.0-canary.7",
156
- "@interfere/test-utils": "^9.0.1-canary.2",
157
- "@interfere/typescript-config": "^9.0.1-canary.1",
155
+ "@interfere/sdk": "^11.0.3",
156
+ "@interfere/test-utils": "^9.0.4",
157
+ "@interfere/typescript-config": "^9.0.1",
158
158
  "@types/node": "^26.1.0",
159
159
  "@typescript/native-preview": "7.0.0-dev.20260701.1",
160
160
  "@vitest/coverage-v8": "4.1.9",