@burdenoff/be-sdk 2026.1008.1 → 2026.1008.3

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.
@@ -1,5 +1,5 @@
1
- export { BaseModuleExporter, PaginationService, convertToCSV, csvToJSON, estimateCSVSize, getCSVHeaders, parseCSV, triggerExportJob } from '../chunk-RFXAHMY4.js';
2
- import '../chunk-L22J3BYR.js';
1
+ export { BaseModuleExporter, PaginationService, convertToCSV, csvToJSON, estimateCSVSize, getCSVHeaders, parseCSV, triggerExportJob } from '../chunk-MYK6X4RS.js';
2
+ import '../chunk-BOKCGHLE.js';
3
3
  import '../chunk-KXY4RSYI.js';
4
4
  import '../chunk-FZRODKIN.js';
5
5
  import '../chunk-5NT2OEDQ.js';
@@ -1,4 +1,4 @@
1
- export { CircuitState, GatewayClient, GatewayError, GatewayErrorType, createGatewayClient, createGatewayClientFromEnv } from '../chunk-L22J3BYR.js';
1
+ export { CircuitState, GatewayClient, GatewayError, GatewayErrorType, createGatewayClient, createGatewayClientFromEnv } from '../chunk-BOKCGHLE.js';
2
2
  export { security_exports as Security } from '../chunk-KXY4RSYI.js';
3
3
  import '../chunk-FZRODKIN.js';
4
4
  import '../chunk-5NT2OEDQ.js';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ export { instrumentation_exports as Instrumentation } from './chunk-E5DTAGCA.js'
14
14
  export { middleware_exports as Middleware } from './chunk-ELU7VL3E.js';
15
15
  import { TenantNotificationsModule, NotificationsModule } from './chunk-INAZ3PKF.js';
16
16
  export { tenant_notifications_exports as Notifications, NotificationsModule } from './chunk-INAZ3PKF.js';
17
- export { export_exports as Export } from './chunk-RFXAHMY4.js';
17
+ export { export_exports as Export } from './chunk-MYK6X4RS.js';
18
18
  export { feature_flags_exports as FeatureFlags } from './chunk-UNASM5VJ.js';
19
19
  import { GraphModule } from './chunk-VVBA3LQV.js';
20
20
  export { graph_exports as Graph, GraphModule } from './chunk-VVBA3LQV.js';
@@ -27,11 +27,11 @@ export { graphql_exports as GraphQL } from './chunk-KMNSVLDS.js';
27
27
  import './chunk-MWPYA2HD.js';
28
28
  import './chunk-LKCBI6B2.js';
29
29
  export { i18n_exports as I18n, createTranslator, getLanguage, getLocale, hasI18n, t } from './chunk-EBDHIL7V.js';
30
- export { init_exports as Init } from './chunk-7WLOO2VU.js';
30
+ export { init_exports as Init } from './chunk-3CUOJTE3.js';
31
31
  export { RESOURCE_CAP_DEFAULTS, ResourceCapExceededError, ResourceCapsModule, configureResourceCaps, getResourceCaps } from './chunk-MZCBEJ67.js';
32
32
  import './chunk-AWPNRV3L.js';
33
- import { GatewayClient, GatewayError, GatewayErrorType } from './chunk-L22J3BYR.js';
34
- export { gateway_exports as Gateway } from './chunk-L22J3BYR.js';
33
+ import { GatewayClient, GatewayError, GatewayErrorType } from './chunk-BOKCGHLE.js';
34
+ export { gateway_exports as Gateway } from './chunk-BOKCGHLE.js';
35
35
  import './chunk-KXY4RSYI.js';
36
36
  import './chunk-FZRODKIN.js';
37
37
  export { layer_exports as Layer } from './chunk-5NT2OEDQ.js';
@@ -45,8 +45,8 @@ export { cache_exports as Cache } from './chunk-PVNNVIIA.js';
45
45
  import { disposeAll } from './chunk-KO2ZXZ7W.js';
46
46
  export { lifecycle_exports as Lifecycle, disposeAll, getRegisteredDisposableCount, registerDisposable, unregisterDisposable } from './chunk-KO2ZXZ7W.js';
47
47
  import './chunk-A5F6Z5UE.js';
48
- export { captcha_exports as Captcha, isCaptchaEnabled, verifyCaptcha, verifyCaptchaIfEnabled } from './chunk-YMZEUTD2.js';
49
48
  export { createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces } from './chunk-KJOSPVB2.js';
49
+ export { captcha_exports as Captcha, isCaptchaEnabled, verifyCaptcha, verifyCaptchaIfEnabled } from './chunk-YMZEUTD2.js';
50
50
  export { crypto_exports as Crypto } from './chunk-SBS4S2PJ.js';
51
51
  import { DatabaseModule } from './chunk-UD5PPGVU.js';
52
52
  export { DatabaseModule } from './chunk-UD5PPGVU.js';
@@ -1,7 +1,7 @@
1
- export { getSDKState, initializeBurdenoffSDK, isSDKInitialized, resetSDK } from '../chunk-7WLOO2VU.js';
1
+ export { getSDKState, initializeBurdenoffSDK, isSDKInitialized, resetSDK } from '../chunk-3CUOJTE3.js';
2
2
  import '../chunk-MZCBEJ67.js';
3
3
  import '../chunk-AWPNRV3L.js';
4
- import '../chunk-L22J3BYR.js';
4
+ import '../chunk-BOKCGHLE.js';
5
5
  import '../chunk-KXY4RSYI.js';
6
6
  import '../chunk-FZRODKIN.js';
7
7
  import '../chunk-5NT2OEDQ.js';
@@ -1,7 +1,7 @@
1
1
  import { createHumanReadableErrorPlugin, formatHttpError, normalizeGraphQLResponse, createHttpErrorResponse } from '../chunk-6GL4SLU7.js';
2
2
  export { UserFacingGraphQLError, createHttpErrorResponse, createHumanReadableErrorPlugin, createWorkspaceGuardPlugin, formatHttpError, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, toUserFacingGraphQLError } from '../chunk-6GL4SLU7.js';
3
3
  import { getWorkspaceQuotaRegistry } from '../chunk-WTEHAVBX.js';
4
- import { setWorkspaceContext } from '../chunk-CYY4VIRK.js';
4
+ import { setWorkspaceContext, withWorkspaceContext } from '../chunk-CYY4VIRK.js';
5
5
  import { I18n } from '../chunk-EBDHIL7V.js';
6
6
  import { getMetricsRegistry } from '../chunk-AWPNRV3L.js';
7
7
  import { ContextManager } from '../chunk-RZOFS2BQ.js';
@@ -501,6 +501,71 @@ function getContextOptions() {
501
501
  }
502
502
  __name(getContextOptions, "getContextOptions");
503
503
 
504
+ // src/server/workspace-execution-context.ts
505
+ function record(value) {
506
+ return typeof value === "object" && value !== null && !Array.isArray(value);
507
+ }
508
+ __name(record, "record");
509
+ function string(value) {
510
+ return typeof value === "string" && value.length > 0 ? value : void 0;
511
+ }
512
+ __name(string, "string");
513
+ function id(value) {
514
+ return record(value) ? string(value["id"]) : void 0;
515
+ }
516
+ __name(id, "id");
517
+ function executionContext(value) {
518
+ if (!record(value)) return {};
519
+ return {
520
+ workspaceId: id(value["workspace"]),
521
+ tenantId: id(value["tenant"]),
522
+ organizationId: id(value["organization"]),
523
+ projectId: id(value["project"]),
524
+ actorId: id(value["actor"]),
525
+ actorType: record(value["actor"]) ? string(value["actor"]["type"]) : void 0,
526
+ onBehalfOf: string(value["onBehalfOf"])
527
+ };
528
+ }
529
+ __name(executionContext, "executionContext");
530
+ function scopedIterable(source, scope) {
531
+ return {
532
+ [Symbol.asyncIterator]() {
533
+ const iterator = source[Symbol.asyncIterator]();
534
+ const finish = iterator.return?.bind(iterator);
535
+ const fail = iterator.throw?.bind(iterator);
536
+ return {
537
+ next: /* @__PURE__ */ __name((...args) => withWorkspaceContext(scope, async () => iterator.next(...args)), "next"),
538
+ return: finish ? (value) => withWorkspaceContext(scope, async () => finish(value)) : void 0,
539
+ throw: fail ? (error) => withWorkspaceContext(scope, async () => fail(error)) : void 0
540
+ };
541
+ }
542
+ };
543
+ }
544
+ __name(scopedIterable, "scopedIterable");
545
+ function createWorkspaceExecutionContextPlugin() {
546
+ return {
547
+ onExecute({ executeFn, setExecuteFn }) {
548
+ setExecuteFn((args) => {
549
+ const scope = executionContext(args.contextValue);
550
+ return withWorkspaceContext(scope, async () => {
551
+ const result = await executeFn(args);
552
+ return Symbol.asyncIterator in result ? scopedIterable(result, scope) : result;
553
+ });
554
+ });
555
+ },
556
+ onSubscribe({ subscribeFn, setSubscribeFn }) {
557
+ setSubscribeFn((args) => {
558
+ const scope = executionContext(args.contextValue);
559
+ return withWorkspaceContext(scope, async () => {
560
+ const result = await subscribeFn(args);
561
+ return Symbol.asyncIterator in result ? scopedIterable(result, scope) : result;
562
+ });
563
+ });
564
+ }
565
+ };
566
+ }
567
+ __name(createWorkspaceExecutionContextPlugin, "createWorkspaceExecutionContextPlugin");
568
+
504
569
  // src/server/security.ts
505
570
  var LOCALHOST_ORIGINS = [
506
571
  "http://localhost:3000",
@@ -818,7 +883,9 @@ async function createServer(definition) {
818
883
  }),
819
884
  ...workspaceGuardPlugins,
820
885
  responseHeadersPlugin,
821
- ...yogaPlugins || []
886
+ ...yogaPlugins || [],
887
+ // Consumers such as GraphQL Modules replace execute/subscribe; bind their final functions.
888
+ createWorkspaceExecutionContextPlugin()
822
889
  ],
823
890
  context: /* @__PURE__ */ __name(async ({ request }) => {
824
891
  const defaultContext = await buildContext(request);