{"version":3,"file":"consts.cjs","names":["logPrefix: string"],"sources":["../../src/helpers/consts.ts"],"sourcesContent":["/**\n * Keys for accessing query parameters included in requests from Inngest to run\n * functions.\n *\n * Used internally to create handlers using `InngestCommHandler`, but can be\n * imported to be used if creating a custom handler outside of the package.\n *\n * @public\n */\nexport enum queryKeys {\n  DeployId = \"deployId\",\n  FnId = \"fnId\",\n  Probe = \"probe\",\n  StepId = \"stepId\",\n}\n\nexport enum probe {\n  Trust = \"trust\",\n}\n\nexport enum envKeys {\n  InngestSigningKey = \"INNGEST_SIGNING_KEY\",\n  InngestSigningKeyFallback = \"INNGEST_SIGNING_KEY_FALLBACK\",\n  InngestEventKey = \"INNGEST_EVENT_KEY\",\n\n  /**\n   * @deprecated Removed in v3. Use {@link InngestBaseUrl} instead.\n   */\n  InngestDevServerUrl = \"INNGEST_DEVSERVER_URL\",\n  InngestEnvironment = \"INNGEST_ENV\",\n  InngestBaseUrl = \"INNGEST_BASE_URL\",\n  InngestEventApiBaseUrl = \"INNGEST_EVENT_API_BASE_URL\",\n  InngestApiBaseUrl = \"INNGEST_API_BASE_URL\",\n  InngestServeHost = \"INNGEST_SERVE_HOST\", // Deprecated, use INNGEST_SERVE_ORIGIN\n  InngestServePath = \"INNGEST_SERVE_PATH\",\n  InngestServeOrigin = \"INNGEST_SERVE_ORIGIN\",\n  InngestStreaming = \"INNGEST_STREAMING\",\n  InngestDevMode = \"INNGEST_DEV\",\n  InngestAllowInBandSync = \"INNGEST_ALLOW_IN_BAND_SYNC\",\n  InngestConnectMaxWorkerConcurrency = \"INNGEST_CONNECT_MAX_WORKER_CONCURRENCY\",\n  InngestConnectIsolateExecution = \"INNGEST_CONNECT_ISOLATE_EXECUTION\",\n  InngestConnectGatewayUrl = \"INNGEST_CONNECT_GATEWAY_URL\",\n\n  /**\n   * @deprecated It's unknown what this env var was used for, but we do not\n   * provide explicit support for it. Prefer using `INNGEST_ENV` instead.\n   */\n  BranchName = \"BRANCH_NAME\",\n\n  /**\n   * The git branch of the commit the deployment was triggered by. Example:\n   * `improve-about-page`.\n   *\n   * {@link https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#system-environment-variables}\n   */\n  VercelBranch = \"VERCEL_GIT_COMMIT_REF\",\n\n  /**\n   * Expected to be `\"1\"` if defined.\n   */\n  IsVercel = \"VERCEL\",\n\n  /**\n   * The branch name of the current deployment. May only be accessible at build\n   * time, but included here just in case.\n   *\n   * {@link https://developers.cloudflare.com/pages/platform/build-configuration/#environment-variables}\n   */\n  CloudflarePagesBranch = \"CF_PAGES_BRANCH\",\n\n  /**\n   * Expected to be `\"1\"` if defined.\n   */\n  IsCloudflarePages = \"CF_PAGES\",\n\n  /**\n   * The branch name of the deployment from Git to Netlify, if available.\n   *\n   * {@link https://docs.netlify.com/configure-builds/environment-variables/#git-metadata}\n   */\n  NetlifyBranch = \"BRANCH\",\n\n  /**\n   * Expected to be `\"true\"` if defined.\n   */\n  IsNetlify = \"NETLIFY\",\n\n  /**\n   * The Git branch for a service or deploy.\n   *\n   * {@link https://render.com/docs/environment-variables#all-services}\n   */\n  RenderBranch = \"RENDER_GIT_BRANCH\",\n\n  /**\n   * Expected to be `\"true\"` if defined.\n   */\n  IsRender = \"RENDER\",\n\n  /**\n   * The branch that triggered the deployment. Example: `main`\n   *\n   * {@link https://docs.railway.app/develop/variables#railway-provided-variables}\n   */\n  RailwayBranch = \"RAILWAY_GIT_BRANCH\",\n\n  /**\n   * The railway environment for the deployment. Example: `production`\n   *\n   * {@link https://docs.railway.app/develop/variables#railway-provided-variables}\n   */\n  RailwayEnvironment = \"RAILWAY_ENVIRONMENT\",\n\n  VercelEnvKey = \"VERCEL_ENV\",\n\n  /**\n   * Standard Node.js environment indicator (e.g. `\"production\"`, `\"development\"`,\n   * `\"test\"`). Read by some framework adapters to choose the request scheme,\n   * and by prod-mode inference.\n   */\n  NodeEnv = \"NODE_ENV\",\n\n  /**\n   * Netlify's deploy context (e.g. `\"production\"`, `\"deploy-preview\"`). Used\n   * for prod-mode inference.\n   *\n   * {@link https://docs.netlify.com/configure-builds/environment-variables/#build-metadata}\n   */\n  Context = \"CONTEXT\",\n\n  /**\n   * Generic environment name used by some platforms to indicate prod vs\n   * non-prod (e.g. `\"production\"`).\n   */\n  Environment = \"ENVIRONMENT\",\n\n  /**\n   * Set by Deno Deploy. Its presence indicates a Deno Deploy environment,\n   * which we treat as prod.\n   *\n   * {@link https://docs.deno.com/deploy/manual/environment-variables/}\n   */\n  DenoDeployment = \"DENO_DEPLOYMENT_ID\",\n\n  OpenAiApiKey = \"OPENAI_API_KEY\",\n  GeminiApiKey = \"GEMINI_API_KEY\",\n  AnthropicApiKey = \"ANTHROPIC_API_KEY\",\n\n  /**\n   * Framework-prefixed variants of Inngest env vars. CRA's `REACT_APP_` and\n   * Next's `NEXT_PUBLIC_` prefixes expose env vars to bundled client code, so\n   * we accept the prefixed forms in addition to the canonical names.\n   */\n  ReactAppInngestBaseUrl = \"REACT_APP_INNGEST_BASE_URL\",\n  ReactAppInngestDevMode = \"REACT_APP_INNGEST_DEV\",\n  NextPublicInngestBaseUrl = \"NEXT_PUBLIC_INNGEST_BASE_URL\",\n  NextPublicInngestDevMode = \"NEXT_PUBLIC_INNGEST_DEV\",\n}\n\n/**\n * Keys for accessing headers included in requests from Inngest to run\n * functions.\n *\n * Used internally to create handlers using `InngestCommHandler`, but can be\n * imported to be used if creating a custom handler outside of the package.\n *\n * @public\n */\nexport enum headerKeys {\n  ContentType = \"content-type\",\n  Host = \"host\",\n  ForwardedFor = \"x-forwarded-for\",\n  RealIp = \"x-real-ip\",\n  Location = \"location\",\n  ContentLength = \"content-length\",\n  Signature = \"x-inngest-signature\",\n  SdkVersion = \"x-inngest-sdk\",\n  Environment = \"x-inngest-env\",\n  Platform = \"x-inngest-platform\",\n  Framework = \"x-inngest-framework\",\n  NoRetry = \"x-inngest-no-retry\",\n  RequestId = \"x-request-id\",\n  InngestJobId = \"x-inngest-job-id\",\n  RequestVersion = \"x-inngest-req-version\",\n  RetryAfter = \"retry-after\",\n  InngestServerKind = \"x-inngest-server-kind\",\n  InngestExpectedServerKind = \"x-inngest-expected-server-kind\",\n  InngestSyncKind = \"x-inngest-sync-kind\",\n  EventIdSeed = \"x-inngest-event-id-seed\",\n  TraceParent = \"traceparent\",\n  TraceState = \"tracestate\",\n  InngestRunId = \"x-run-id\",\n  InngestStepId = \"x-inngest-step-id\",\n  InngestForceStepPlan = \"x-inngest-force-step-plan\",\n  SdkHandled = \"x-inngest-sdk-handled\",\n}\n\n/**\n * Headers that are forwarded from the original request when an Inngest function\n * is invoked.\n */\nexport const forwardedHeaders = [headerKeys.TraceParent, headerKeys.TraceState];\n\nexport const defaultInngestApiBaseUrl = \"https://api.inngest.com/\";\nexport const defaultInngestEventBaseUrl = \"https://inn.gs/\";\nexport const defaultDevServerHost = \"http://localhost:8288/\";\n\n/**\n * Events that Inngest may send internally that can be used to trigger\n * functions.\n *\n * @public\n */\nexport enum internalEvents {\n  /**\n   * A function has failed after exhausting all available retries. This event\n   * will contain the original event and the error that caused the failure.\n   */\n  FunctionFailed = \"inngest/function.failed\",\n  FunctionInvoked = \"inngest/function.invoked\",\n  FunctionFinished = \"inngest/function.finished\",\n  FunctionCancelled = \"inngest/function.cancelled\",\n  ScheduledTimer = \"inngest/scheduled.timer\",\n  HttpRequest = \"inngest/http.request\",\n\n  /**\n   * Triggers a deferred function. The backend emits this.\n   */\n  DeferredSchedule = \"inngest/deferred.schedule\",\n}\n\nexport const logPrefix: string = \"[Inngest]\";\n\nexport const debugPrefix = \"inngest\";\n\nexport const dummyEventKey = \"NO_EVENT_KEY_SET\";\n\nexport enum serverKind {\n  Dev = \"dev\",\n  Cloud = \"cloud\",\n}\n\nexport enum syncKind {\n  InBand = \"in_band\",\n  OutOfBand = \"out_of_band\",\n}\n\n/**\n * The execution models the SDK is aware of.\n *\n * This is used in a number of places to ensure all execution versions are\n * accounted for for a given operation.\n */\nexport enum ExecutionVersion {\n  /**\n   * Uses a more flexible approach to execution and is more lenient about\n   * determinism, allowing non-step async actions and non-determinism.\n   *\n   * Nowhere near as stubborn about determinism and so can silently migrate\n   * between versions after bug fixes.\n   */\n  V1 = 1,\n\n  /**\n   * Identical to V1, but allows the Executor to optimize parallel calls, hugely\n   * reducing traffic going to/from the SDK.\n   */\n  V2 = 2,\n}\n\n/**\n * Default maximum number of retries for function/step executions.\n */\nexport const defaultMaxRetries = 3;\n"],"mappings":";;;;;;;;;;;AASA,IAAY,kDAAL;AACL;AACA;AACA;AACA;;;AAGF,IAAY,0CAAL;AACL;;;AAGF,IAAY,8CAAL;AACL;AACA;AACA;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAMA;;;;;;;AAQA;;;;AAKA;;;;;;;AAQA;;;;AAKA;;;;;;AAOA;;;;AAKA;;;;;;AAOA;;;;AAKA;;;;;;AAOA;;;;;;AAOA;AAEA;;;;;;AAOA;;;;;;;AAQA;;;;;AAMA;;;;;;;AAQA;AAEA;AACA;AACA;;;;;;AAOA;AACA;AACA;AACA;;;;;;;;;;;;AAYF,IAAY,oDAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOF,MAAa,mBAAmB,CAAC,WAAW,aAAa,WAAW,WAAW;AAE/E,MAAa,2BAA2B;AACxC,MAAa,6BAA6B;AAC1C,MAAa,uBAAuB;;;;;;;AAQpC,IAAY,4DAAL;;;;;AAKL;AACA;AACA;AACA;AACA;AACA;;;;AAKA;;;AAGF,MAAaA,YAAoB;AAEjC,MAAa,cAAc;AAE3B,MAAa,gBAAgB;AAO7B,IAAY,gDAAL;AACL;AACA;;;;;;;;;AASF,IAAY,gEAAL;;;;;;;;AAQL;;;;;AAMA;;;;;;AAMF,MAAa,oBAAoB"}