@burdenoff/be-sdk 2026.1128.3 → 2026.1130.1
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/auth/index.d.ts +1 -1
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.js +3 -2
- package/dist/graphql-DzzWneMu.js +398 -0
- package/dist/graphql-DzzWneMu.js.map +1 -0
- package/dist/{index-B-yXdMeb.d.ts → index-BFNCCa2W.d.ts} +2 -2
- package/dist/{index-cPPtZTJh.d.ts → index-BaB4Nsv7.d.ts} +1 -1
- package/dist/{index-Cx3z-7T1.d.ts → index-CjY5YV9F.d.ts} +1 -1
- package/dist/index-D56fE7tl.d.ts +64 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/pubsub-health-DCeAKI3q.js +26 -0
- package/dist/pubsub-health-DCeAKI3q.js.map +1 -0
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +8 -0
- package/dist/server/index.js.map +1 -1
- package/dist/{types-IXZyPJCR.d.ts → types-2PuLMwAy.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/graphql-DHAHHcww.js +0 -161
- package/dist/graphql-DHAHHcww.js.map +0 -1
- package/dist/index-CSRcgkVi.d.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pubsub-health-DCeAKI3q.js","names":[],"sources":["../src/graphql/pubsub-health.ts"],"sourcesContent":["/**\n * Process-wide registry of the GraphQL subscription pubsub transports.\n *\n * Every Redis Streams event target registers itself here on creation and\n * removes itself on `close()`. `createServer` reads the registry for its\n * readiness probe, so a pod whose pubsub lost Redis reports it on\n * `/health/ready` without every service wiring the check by hand.\n *\n * This module has no imports on purpose: the server imports it, and it must\n * not drag the Redis transport into services that never use subscriptions.\n */\n\n/** Minimal surface the registry needs from a pubsub transport. */\nexport interface PubSubHealthSource {\n /** True while the transport can publish to and read from Redis. */\n isHealthy(): boolean;\n /** Short human-readable state, used in the readiness error message. */\n describe(): string;\n}\n\n/** Aggregate pubsub health, as reported to readiness. */\nexport interface PubSubHealth {\n ok: boolean;\n /** `describe()` of every unhealthy transport. Empty when `ok`. */\n unhealthy: string[];\n total: number;\n}\n\nconst sources = new Set<PubSubHealthSource>();\n\n/** Register a transport. Returns a function that removes it again. */\nexport function registerPubSubHealthSource(source: PubSubHealthSource): () => void {\n sources.add(source);\n return (): void => {\n sources.delete(source);\n };\n}\n\n/**\n * Aggregate health of every registered transport, or `undefined` when the\n * process has none (a service without subscriptions has nothing to report).\n */\nexport function getPubSubHealth(): PubSubHealth | undefined {\n if (sources.size === 0) return undefined;\n const unhealthy: string[] = [];\n for (const source of sources) {\n if (!source.isHealthy()) unhealthy.push(source.describe());\n }\n return { ok: unhealthy.length === 0, unhealthy, total: sources.size };\n}\n"],"mappings":";AA4BA,MAAM,0BAAU,IAAI,IAAwB;;AAG5C,SAAgB,2BAA2B,QAAwC;CACjF,QAAQ,IAAI,MAAM;CAClB,aAAmB;EACjB,QAAQ,OAAO,MAAM;CACvB;AACF;;;;;AAMA,SAAgB,kBAA4C;CAC1D,IAAI,QAAQ,SAAS,GAAG,OAAO;CAC/B,MAAM,YAAsB,CAAC;CAC7B,KAAK,MAAM,UAAU,SACnB,IAAI,CAAC,OAAO,UAAU,GAAG,UAAU,KAAK,OAAO,SAAS,CAAC;CAE3D,OAAO;EAAE,IAAI,UAAU,WAAW;EAAG;EAAW,OAAO,QAAQ;CAAK;AACtE"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as VerifiedDelegationContext, D as WorkspaceGuardConfig, E as YogaPlugin, O as WorkspaceMembershipValidation, S as ServerInstance, T as WspaceGraphQLContext, _ as RESTEndpoint, a as IActor, b as ServerI18nConfig, c as IOrganization, d as ITenant, f as ITracking, g as PrismaClientConstructor, h as ModuleGraphConfig, i as GraphQLContext, k as createWorkspaceGuardPlugin, l as IProduct, m as JWTPayload, n as ConsentContext, o as IContextFilterInput, p as IWorkspace, r as ElysiaApp, s as IOperationContext, t as ActorProvenance, u as IProject, v as ServerConfig, w as WorkspaceSecret, x as ServerInfo, y as ServerDefinition } from "../types-
|
|
1
|
+
import { C as VerifiedDelegationContext, D as WorkspaceGuardConfig, E as YogaPlugin, O as WorkspaceMembershipValidation, S as ServerInstance, T as WspaceGraphQLContext, _ as RESTEndpoint, a as IActor, b as ServerI18nConfig, c as IOrganization, d as ITenant, f as ITracking, g as PrismaClientConstructor, h as ModuleGraphConfig, i as GraphQLContext, k as createWorkspaceGuardPlugin, l as IProduct, m as JWTPayload, n as ConsentContext, o as IContextFilterInput, p as IWorkspace, r as ElysiaApp, s as IOperationContext, t as ActorProvenance, u as IProject, v as ServerConfig, w as WorkspaceSecret, x as ServerInfo, y as ServerDefinition } from "../types-2PuLMwAy.js";
|
|
2
2
|
import { n as PrismaClientBase } from "../client-NknQrWsP.js";
|
|
3
3
|
import { a as ActorOrigin, c as readAssistantSessionAttribution, i as ASSISTANT_SESSION_ID_HEADER, l as toAssistantSessionAttribution, n as AI_ASSISTANT_ACTOR_ORIGIN, o as AssistantSessionAttribution, r as ASSISTANT_CORRELATION_ID_HEADER, s as parseAssistantSessionHeaders, t as ACTOR_ORIGIN_HEADER } from "../assistant-session-DA5ZKJOr.js";
|
|
4
4
|
import { r as I18nContext, s as LocaleCode } from "../types-DgaQqvxo.js";
|
|
5
|
-
import { $ as configureServerAuth, A as assertDsarOrchestrator, B as getContextOptions, C as DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, D as DsarOrchestratorRejectionReason, E as DsarOrchestratorOptions, F as getDelegatedPrincipal, G as PayloadTooLargeError, H as DEFAULT_RAW_BODY_MAX_BYTES, I as resolveOnBehalfOf, J as createRawBodyRouter, K as RawBodyResolution, L as ContextBuilderOptions, M as isDsarOrchestratorActor, N as resolveDsarCallerIdentity, O as ResolvedDsarCaller, P as DelegatedPrincipal, Q as resolveMaxRequestBodySize, R as buildContext, S as DSAR_ALLOWED_ORCHESTRATORS_ENV, T as DsarOrchestratorForbiddenError, U as MAX_IDLE_TIMEOUT_SECONDS, V as DEFAULT_MAX_REQUEST_BODY_SIZE, W as OrdinaryRoute, X as readBoundedRawBody, Y as extendRequestIdleTimeout, Z as resolveBodyLimitBytes, _ as MutationAuditPluginOptions, a as UserFacingErrorOptions, at as configureDefaultAuth, b as sanitizeAuditValue, c as createHumanReadableErrorPlugin, ct as generateSymmetricSecret, d as normalizeExecutionResultErrors, dt as tenantCheck, et as createServer, f as normalizeGraphQLResponse, ft as verifyJWT, g as MUTATION_AUDIT_RESOURCE_TYPE, h as MUTATION_AUDIT_ACTIVITY_TYPE, i as NormalizedErrorState, it as configureAuth, j as getAllowedDsarOrchestrators, k as VERIFIED_SERVICE_IDENTITY_HEADER, l as formatHttpError, lt as orgCheck, m as toUserFacingGraphQLError, n as HttpErrorPayload, nt as FetchWorkspaceSecretFn, o as UserFacingGraphQLError, ot as decodeJWT, p as normalizeGraphQLResponsePayload, pt as workspaceCheck, q as RawBodyRouter, r as HttpErrorResult, rt as authCheck, s as createHttpErrorResponse, st as fetchWorkspaceSecret, t as ErrorNormalizationOptions, tt as AuthConfig, u as normalizeError, ut as requireWorkspace, v as createMutationAuditPlugin, w as DsarOrchestratorContext, x as DEFAULT_DSAR_ORCHESTRATOR_ID, y as getMutationFieldNames, z as configureContext } from "../index-
|
|
5
|
+
import { $ as configureServerAuth, A as assertDsarOrchestrator, B as getContextOptions, C as DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, D as DsarOrchestratorRejectionReason, E as DsarOrchestratorOptions, F as getDelegatedPrincipal, G as PayloadTooLargeError, H as DEFAULT_RAW_BODY_MAX_BYTES, I as resolveOnBehalfOf, J as createRawBodyRouter, K as RawBodyResolution, L as ContextBuilderOptions, M as isDsarOrchestratorActor, N as resolveDsarCallerIdentity, O as ResolvedDsarCaller, P as DelegatedPrincipal, Q as resolveMaxRequestBodySize, R as buildContext, S as DSAR_ALLOWED_ORCHESTRATORS_ENV, T as DsarOrchestratorForbiddenError, U as MAX_IDLE_TIMEOUT_SECONDS, V as DEFAULT_MAX_REQUEST_BODY_SIZE, W as OrdinaryRoute, X as readBoundedRawBody, Y as extendRequestIdleTimeout, Z as resolveBodyLimitBytes, _ as MutationAuditPluginOptions, a as UserFacingErrorOptions, at as configureDefaultAuth, b as sanitizeAuditValue, c as createHumanReadableErrorPlugin, ct as generateSymmetricSecret, d as normalizeExecutionResultErrors, dt as tenantCheck, et as createServer, f as normalizeGraphQLResponse, ft as verifyJWT, g as MUTATION_AUDIT_RESOURCE_TYPE, h as MUTATION_AUDIT_ACTIVITY_TYPE, i as NormalizedErrorState, it as configureAuth, j as getAllowedDsarOrchestrators, k as VERIFIED_SERVICE_IDENTITY_HEADER, l as formatHttpError, lt as orgCheck, m as toUserFacingGraphQLError, n as HttpErrorPayload, nt as FetchWorkspaceSecretFn, o as UserFacingGraphQLError, ot as decodeJWT, p as normalizeGraphQLResponsePayload, pt as workspaceCheck, q as RawBodyRouter, r as HttpErrorResult, rt as authCheck, s as createHttpErrorResponse, st as fetchWorkspaceSecret, t as ErrorNormalizationOptions, tt as AuthConfig, u as normalizeError, ut as requireWorkspace, v as createMutationAuditPlugin, w as DsarOrchestratorContext, x as DEFAULT_DSAR_ORCHESTRATOR_ID, y as getMutationFieldNames, z as configureContext } from "../index-BaB4Nsv7.js";
|
|
6
6
|
import { t as suppressMutationAudit } from "../explicit-activity-scope-D8VeGGpt.js";
|
|
7
7
|
export { ACTOR_ORIGIN_HEADER, AI_ASSISTANT_ACTOR_ORIGIN, ASSISTANT_CORRELATION_ID_HEADER, ASSISTANT_SESSION_ID_HEADER, type ActorOrigin, type ActorProvenance, type AssistantSessionAttribution, type AuthConfig, type ConsentContext, type ContextBuilderOptions, DEFAULT_DSAR_ORCHESTRATOR_ID, DEFAULT_MAX_REQUEST_BODY_SIZE, DEFAULT_RAW_BODY_MAX_BYTES, DSAR_ALLOWED_ORCHESTRATORS_ENV, DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, type DelegatedPrincipal, type DsarOrchestratorContext, DsarOrchestratorForbiddenError, type DsarOrchestratorOptions, type DsarOrchestratorRejectionReason, type ElysiaApp, type ErrorNormalizationOptions, type FetchWorkspaceSecretFn, type GraphQLContext, type HttpErrorPayload, type HttpErrorResult, type I18nContext, type IActor, type IContextFilterInput, type IOperationContext, type IOrganization, type IProduct, type IProject, type ITenant, type ITracking, type IWorkspace, type JWTPayload, type LocaleCode, MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, type ModuleGraphConfig, type MutationAuditPluginOptions, type NormalizedErrorState, type OrdinaryRoute, PayloadTooLargeError, type PrismaClientBase, type PrismaClientConstructor, type RESTEndpoint, type RawBodyResolution, type RawBodyRouter, type ResolvedDsarCaller, type ServerConfig, type ServerDefinition, type ServerI18nConfig, type ServerInfo, type ServerInstance, type UserFacingErrorOptions, UserFacingGraphQLError, VERIFIED_SERVICE_IDENTITY_HEADER, type VerifiedDelegationContext, type WorkspaceGuardConfig, type WorkspaceMembershipValidation, type WorkspaceSecret, type WspaceGraphQLContext, type YogaPlugin, assertDsarOrchestrator, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createHttpErrorResponse, createHumanReadableErrorPlugin, createMutationAuditPlugin, createRawBodyRouter, createServer, createWorkspaceGuardPlugin, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, formatHttpError, generateSymmetricSecret, getAllowedDsarOrchestrators, getContextOptions, getDelegatedPrincipal, getMutationFieldNames, isDsarOrchestratorActor, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, orgCheck, parseAssistantSessionHeaders, readAssistantSessionAttribution, readBoundedRawBody, requireWorkspace, resolveBodyLimitBytes, resolveDsarCallerIdentity, resolveMaxRequestBodySize, resolveOnBehalfOf, sanitizeAuditValue, suppressMutationAudit, tenantCheck, toAssistantSessionAttribution, toUserFacingGraphQLError, verifyJWT, workspaceCheck };
|
package/dist/server/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { l as I18n } from "../i18n-BBMYFd0P.js";
|
|
|
6
6
|
import { l as getMetricsRegistry } from "../metrics-collector-DXQrMUle.js";
|
|
7
7
|
import { t as getWorkspaceQuotaRegistry } from "../metrics-CQaHT12m.js";
|
|
8
8
|
import { t as collectPromDefaultMetrics } from "../bun-runtime-metrics-CPy5D6NT.js";
|
|
9
|
+
import { t as getPubSubHealth } from "../pubsub-health-DCeAKI3q.js";
|
|
9
10
|
import { a as VERIFIED_SERVICE_IDENTITY_HEADER, c as isDsarOrchestratorActor, i as DsarOrchestratorForbiddenError, l as resolveDsarCallerIdentity, n as DSAR_ALLOWED_ORCHESTRATORS_ENV, o as assertDsarOrchestrator, r as DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, s as getAllowedDsarOrchestrators, t as DEFAULT_DSAR_ORCHESTRATOR_ID } from "../dsar-orchestrator-BlOSa9A_.js";
|
|
10
11
|
import { i as suppressMutationAudit, r as runInExplicitActivityScope, t as createExplicitActivityScope } from "../explicit-activity-scope-DikJ7NAE.js";
|
|
11
12
|
import { GraphQLError, Kind, OperationTypeNode } from "graphql";
|
|
@@ -1046,6 +1047,12 @@ function createReadinessProbe(deps, now = Date.now) {
|
|
|
1046
1047
|
}, now).then((r) => {
|
|
1047
1048
|
checks.eventQueue = r;
|
|
1048
1049
|
}));
|
|
1050
|
+
const pubsub = deps.pubsub?.();
|
|
1051
|
+
if (pubsub) jobs.push(runCheck("pubsub", required.has("pubsub"), async () => {
|
|
1052
|
+
if (!pubsub.ok) throw new Error(`pubsub degraded (${pubsub.unhealthy.join("; ")})`);
|
|
1053
|
+
}, now).then((r) => {
|
|
1054
|
+
checks.pubsub = r;
|
|
1055
|
+
}));
|
|
1049
1056
|
await Promise.all(jobs);
|
|
1050
1057
|
const results = Object.values(checks);
|
|
1051
1058
|
return {
|
|
@@ -1724,6 +1731,7 @@ async function createServer(definition) {
|
|
|
1724
1731
|
return;
|
|
1725
1732
|
}
|
|
1726
1733
|
},
|
|
1734
|
+
pubsub: () => getPubSubHealth(),
|
|
1727
1735
|
...config.health?.requiredDependencies ? { requiredDependencies: config.health.requiredDependencies } : {}
|
|
1728
1736
|
});
|
|
1729
1737
|
const shallow = () => livenessBody(config.serviceName, serviceVersion, (/* @__PURE__ */ new Date()).toISOString());
|