@mondaydotcomorg/atp-server 0.19.9 → 0.19.10

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/index.js CHANGED
@@ -7340,7 +7340,11 @@ var SandboxBuilder = class {
7340
7340
  sensitivityLevel: metadata?.sensitivityLevel
7341
7341
  });
7342
7342
  }
7343
- const result = await handler(input);
7343
+ const handlerContext = {
7344
+ metadata,
7345
+ requestContext: config.requestContext
7346
+ };
7347
+ const result = await handler(input, handlerContext);
7344
7348
  try {
7345
7349
  storeAPICallResult({
7346
7350
  type: "api",
@@ -11031,7 +11035,8 @@ async function handleExecute(ctx, executor, stateManager, config, auditSink, ses
11031
11035
  clientServices,
11032
11036
  provenanceMode: requestConfig.provenanceMode || config.execution.provenanceMode || ProvenanceMode.NONE,
11033
11037
  securityPolicies: config.execution.securityPolicies || [],
11034
- provenanceHints: requestConfig.provenanceHints
11038
+ provenanceHints: requestConfig.provenanceHints,
11039
+ requestContext: requestConfig.requestContext
11035
11040
  };
11036
11041
  let hintMap;
11037
11042
  const prelimExecutionId = nanoid();
@@ -20841,7 +20846,7 @@ function buildSchema(source, options) {
20841
20846
  });
20842
20847
  }
20843
20848
  __name(buildSchema, "buildSchema");
20844
- async function resolveHeaders(options, params) {
20849
+ async function resolveHeaders(options, params, executionContext) {
20845
20850
  const headers = {};
20846
20851
  if (options.headers) {
20847
20852
  Object.assign(headers, options.headers);
@@ -20854,7 +20859,7 @@ async function resolveHeaders(options, params) {
20854
20859
  Object.assign(headers, authHeaders);
20855
20860
  }
20856
20861
  if (options.headerProvider) {
20857
- const context = options.contextProvider ? await options.contextProvider() : void 0;
20862
+ const context = options.contextProvider ? await options.contextProvider(executionContext) : void 0;
20858
20863
  const dynamicHeaders = await options.headerProvider(params, context);
20859
20864
  Object.assign(headers, dynamicHeaders);
20860
20865
  }
@@ -21063,7 +21068,7 @@ function convertFieldToFunction(type, fieldName, field, url, options) {
21063
21068
  context.metadata.graphql_query = query;
21064
21069
  context.metadata.graphql_variables = variables;
21065
21070
  }
21066
- const headers = await resolveHeaders(options, paramsObj);
21071
+ const headers = await resolveHeaders(options, paramsObj, context);
21067
21072
  const response = await fetch(url, {
21068
21073
  method: "POST",
21069
21074
  headers: {