@mondaydotcomorg/atp-client 0.23.2 → 0.24.0
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/core/in-process-session.d.ts.map +1 -1
- package/dist/core/in-process-session.js +22 -2
- package/dist/core/in-process-session.js.map +1 -1
- package/dist/core/index.cjs +13 -4
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +13 -4
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/core/in-process-session.ts +29 -2
package/dist/index.js
CHANGED
|
@@ -360,25 +360,29 @@ var InProcessSession = class extends BaseSession {
|
|
|
360
360
|
}
|
|
361
361
|
async explore(path, options) {
|
|
362
362
|
await this.ensureInitialized();
|
|
363
|
+
const { headers: callerHeaders, ...body } = options ?? {};
|
|
363
364
|
const ctx = await this.createContext({
|
|
364
365
|
method: "POST",
|
|
365
366
|
path: "/api/explore",
|
|
366
367
|
body: {
|
|
367
368
|
path,
|
|
368
|
-
...
|
|
369
|
-
}
|
|
369
|
+
...body
|
|
370
|
+
},
|
|
371
|
+
headers: callerHeaders
|
|
370
372
|
});
|
|
371
373
|
return await this.server.handleExplore(ctx);
|
|
372
374
|
}
|
|
373
375
|
async execute(code, config) {
|
|
374
376
|
await this.ensureInitialized();
|
|
377
|
+
const rc = config?.requestContext ?? {};
|
|
375
378
|
const ctx = await this.createContext({
|
|
376
379
|
method: "POST",
|
|
377
380
|
path: "/api/execute",
|
|
378
381
|
body: {
|
|
379
382
|
code,
|
|
380
383
|
config
|
|
381
|
-
}
|
|
384
|
+
},
|
|
385
|
+
headers: rc.headers
|
|
382
386
|
});
|
|
383
387
|
return await this.server.handleExecute(ctx);
|
|
384
388
|
}
|
|
@@ -418,11 +422,16 @@ var InProcessSession = class extends BaseSession {
|
|
|
418
422
|
error: /* @__PURE__ */ __name(() => {
|
|
419
423
|
}, "error")
|
|
420
424
|
};
|
|
425
|
+
const sessionHeaders = await this.prepareHeaders(options.method, options.path, options.body);
|
|
426
|
+
const mergedHeaders = options.headers ? {
|
|
427
|
+
...sessionHeaders,
|
|
428
|
+
...options.headers
|
|
429
|
+
} : sessionHeaders;
|
|
421
430
|
return {
|
|
422
431
|
method: options.method,
|
|
423
432
|
path: options.path,
|
|
424
433
|
query: options.query || {},
|
|
425
|
-
headers:
|
|
434
|
+
headers: mergedHeaders,
|
|
426
435
|
body: options.body,
|
|
427
436
|
clientId: this.clientId,
|
|
428
437
|
clientToken: this.clientToken,
|