Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnp/queryable

Package Overview
Dependencies
Maintainers
13
Versions
918
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/queryable - npm Package Compare versions

Comparing version 3.0.0-v3nightly.20211002 to 3.0.0-v3nightly.20211003

8

behaviors/caching-pessimistic.js

@@ -64,3 +64,3 @@ import { isFunc, getHashCode, PnPClientStorage, getGUID, extend } from "@pnp/core";

const newExecute = extend(this, {
async execute(requestInit = { method: "GET", headers: {} }) {
async execute(userInit = { method: "GET", headers: {} }) {
setTimeout(async () => {

@@ -80,2 +80,4 @@ const requestId = getGUID();

this.emit.log(`[id:${requestId}] Emitted auth`, 0);
// we always resepect user supplied init over observer modified init
init = { ...init, ...userInit, headers: { ...init.headers, ...userInit.headers } };
this.emit.log(`[id:${requestId}] Emitting send`, 0);

@@ -89,3 +91,3 @@ let response = await this.emit.send(requestUrl, init);

[requestUrl, result] = await this.emit.post(requestUrl, result);
this.emit.log(`[id:${requestId}] Emitted post`, 0 /* Verbose */);
this.emit.log(`[id:${requestId}] Emitted post`, 0);
return result;

@@ -100,3 +102,3 @@ };

this.emit.log(`[id:${requestId}] Beginning request`, 1);
let [requestUrl, init, result] = await this.emit.pre(this.toRequestUrl(), requestInit, undefined);
let [requestUrl, init, result] = await this.emit.pre(this.toRequestUrl(), {}, undefined);
this.emit.log(`[id:${requestId}] Url: ${requestUrl}`, 1);

@@ -103,0 +105,0 @@ if (typeof result !== "undefined") {

@@ -9,4 +9,4 @@ /**

export interface IInvokable<R = any> {
<T = R>(...args: any[]): Promise<T>;
<T = R>(init?: RequestInit): Promise<T>;
}
//# sourceMappingURL=invokable.d.ts.map
{
"name": "@pnp/queryable",
"version": "3.0.0-v3nightly.20211002",
"version": "3.0.0-v3nightly.20211003",
"description": "pnp - provides shared odata functionality and base classes",

@@ -9,3 +9,3 @@ "main": "./index.js",

"tslib": "2.1.0",
"@pnp/core": "3.0.0-v3nightly.20211002"
"@pnp/core": "3.0.0-v3nightly.20211003"
},

@@ -12,0 +12,0 @@ "author": {

@@ -1,5 +0,5 @@

import { IQueryableInternal } from "./queryable.js";
import { IQueryableInternal, QueryableInit } from "./queryable.js";
export declare function queryableFactory<InstanceType extends IQueryableInternal>(constructor: {
new (init: string | IQueryableInternal<any> | [IQueryableInternal<any>, string], path?: string): InstanceType;
}): (init: string | IQueryableInternal<any> | [IQueryableInternal<any>, string], path?: string) => InstanceType;
new (init: QueryableInit, path?: string): InstanceType;
}): (init: QueryableInit, path?: string) => InstanceType;
//# sourceMappingURL=queryable-factory.d.ts.map

@@ -17,2 +17,3 @@ import { Timeline, TimelinePipe } from "@pnp/core";

};
export declare type QueryableInit = Queryable<any> | string | [Queryable<any>, string];
export declare class Queryable<R> extends Timeline<typeof DefaultMoments> implements IQueryableInternal<R> {

@@ -23,3 +24,3 @@ private _query;

protected InternalRejectEvent: symbol;
constructor(init: Queryable<any> | string | [Queryable<any>, string], path?: string);
constructor(init: QueryableInit, path?: string);
/**

@@ -45,3 +46,3 @@ * Directly concatenates the supplied string to the current url, not normalizing "/" chars

toUrl(): string;
protected execute(requestInit?: RequestInit): Promise<void>;
protected execute(userInit: RequestInit): Promise<void>;
}

@@ -48,0 +49,0 @@ /**

@@ -74,3 +74,3 @@ import { __decorate } from "tslib";

}
execute(requestInit = { method: "GET", headers: {} }) {
execute(userInit) {
setTimeout(async () => {

@@ -82,3 +82,3 @@ const requestId = getGUID();

// eslint-disable-next-line prefer-const
let [url, init, result] = await this.emit.pre(this.toRequestUrl(), requestInit, undefined);
let [url, init, result] = await this.emit.pre(this.toRequestUrl(), {}, undefined);
this.log(`[request:${requestId}] Url: ${url}`, 1);

@@ -96,2 +96,4 @@ if (typeof result !== "undefined") {

this.log(`[request:${requestId}] Emitted auth`, 0);
// we always resepect user supplied init over observer modified init
init = { ...init, ...userInit, headers: { ...init.headers, ...userInit.headers } };
this.log(`[request:${requestId}] Emitting send`, 0);

@@ -98,0 +100,0 @@ let response = await this.emit.send(requestUrl, init);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc