@pnp/graph
Advanced tools
Comparing version 4.9.0 to 4.10.0
@@ -24,3 +24,3 @@ import { isUrlAbsolute, hOP, getGUID, CopyFrom, objectDefinedNotNull, isFunc, combine, jsS } from "@pnp/core"; | ||
class BatchQueryable extends _GraphQueryable { | ||
constructor(base, requestBaseUrl = base.toUrl().replace(/[\\|/]v1\.0|beta[\\|/].*$/i || "", "")) { | ||
constructor(base, requestBaseUrl = base.toUrl().replace(/[\\|/]v1\.0|beta[\\|/].*$/i, "")) { | ||
super(requestBaseUrl, "$batch"); | ||
@@ -92,9 +92,4 @@ this.requestBaseUrl = requestBaseUrl; | ||
for (let index = 0; index < response.responses.length; index++) { | ||
const [, , , resolve, reject] = requests[index + chunkIndex]; | ||
try { | ||
resolve(response.responses[index]); | ||
} | ||
catch (e) { | ||
reject(e); | ||
} | ||
// this resolves the child request's send promise with the parsed response | ||
requests[index + chunkIndex][3](response.responses[index]); | ||
} | ||
@@ -132,4 +127,4 @@ chunkIndex += requestsChunk.length; | ||
instance.on.send.replace(async function (url, init) { | ||
const promise = new Promise((resolve, reject) => { | ||
requests.push([this, url.toString(), init, resolve, reject]); | ||
const promise = new Promise((resolve) => { | ||
requests.push([this, url.toString(), init, resolve]); | ||
}); | ||
@@ -136,0 +131,0 @@ this.log(`[batch:${batchId}] (${(new Date()).getTime()}) Adding request ${init.method} ${url.toString()} to batch.`, 0); |
export function Telemetry() { | ||
return (instance) => { | ||
instance.on.pre(async function (url, init, result) { | ||
init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/4.9.0" }; | ||
init.headers = { ...init.headers, SdkVersion: "PnPCoreJS/4.10.0" }; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/dot-notation | ||
@@ -6,0 +6,0 @@ this.log(`Request Tag: ${init.headers["SdkVersion"]}`, 0); |
{ | ||
"name": "@pnp/graph", | ||
"version": "4.9.0", | ||
"version": "4.10.0", | ||
"description": "pnp - provides a fluent interface to query the Microsoft Graph", | ||
@@ -10,4 +10,4 @@ "main": "./index.js", | ||
"tslib": "2.7.0", | ||
"@pnp/core": "4.9.0", | ||
"@pnp/queryable": "4.9.0" | ||
"@pnp/core": "4.10.0", | ||
"@pnp/queryable": "4.10.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
736745
619
11468
+ Added@pnp/core@4.10.0(transitive)
+ Added@pnp/queryable@4.10.0(transitive)
- Removed@pnp/core@4.9.0(transitive)
- Removed@pnp/queryable@4.9.0(transitive)
Updated@pnp/core@4.10.0
Updated@pnp/queryable@4.10.0