@pnp/queryable
Advanced tools
Comparing version 3.0.0-v3nightly.20210911 to 3.0.0-v3nightly.20210921
@@ -13,6 +13,7 @@ export * from "./add-prop.js"; | ||
export * from "./behaviors/caching.js"; | ||
export * from "./behaviors/cachingPessimistic.js"; | ||
export * from "./behaviors/caching-pessimistic.js"; | ||
export * from "./behaviors/inject-headers.js"; | ||
export * from "./behaviors/parsers.js"; | ||
export * from "./behaviors/queryable-copyfrom.js"; | ||
export * from "./behaviors/timeout.js"; | ||
export * from "./behaviors/throw.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -13,6 +13,7 @@ export * from "./add-prop.js"; | ||
export * from "./behaviors/caching.js"; | ||
export * from "./behaviors/cachingPessimistic.js"; | ||
export * from "./behaviors/caching-pessimistic.js"; | ||
export * from "./behaviors/inject-headers.js"; | ||
export * from "./behaviors/parsers.js"; | ||
export * from "./behaviors/queryable-copyfrom.js"; | ||
export * from "./behaviors/timeout.js"; | ||
export * from "./behaviors/throw.js"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pnp/queryable", | ||
"version": "3.0.0-v3nightly.20210911", | ||
"version": "3.0.0-v3nightly.20210921", | ||
"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.20210911" | ||
"@pnp/core": "3.0.0-v3nightly.20210921" | ||
}, | ||
@@ -12,0 +12,0 @@ "author": { |
@@ -18,4 +18,6 @@ import { Timeline } from "@pnp/core"; | ||
export declare class Queryable<R> extends Timeline<typeof DefaultMoments> implements IQueryableInternal<R> { | ||
private _query; | ||
protected _url: string; | ||
private _query; | ||
protected InternalResolveEvent: symbol; | ||
protected InternalRejectEvent: symbol; | ||
constructor(init: Queryable<any> | string, path?: string); | ||
@@ -22,0 +24,0 @@ /** |
@@ -13,4 +13,6 @@ import { __decorate } from "tslib"; | ||
let Queryable = class Queryable extends Timeline { | ||
_query; | ||
_url; | ||
_query; | ||
InternalResolveEvent = Symbol.for("Queryable_Resolve"); | ||
InternalRejectEvent = Symbol.for("Queryable_Reject"); | ||
constructor(init, path) { | ||
@@ -25,5 +27,2 @@ let url = ""; | ||
url = combine(_url, path); | ||
// TODO:: doesn't work due to data event (maybe others) | ||
// pre, post, send, auth, error, log | ||
// data | ||
observers = init.observers; | ||
@@ -80,2 +79,3 @@ } | ||
this.log(`[request:${requestId}] Emitting data`, 0); | ||
this.emit[this.InternalResolveEvent](result); | ||
this.emit.data(result); | ||
@@ -102,5 +102,11 @@ this.log(`[request:${requestId}] Emitted data`, 0); | ||
this.log(`[request:${requestId}] Emitting data`, 0); | ||
this.emit[this.InternalResolveEvent](result); | ||
this.emit.data(result); | ||
this.log(`[request:${requestId}] Emitted data`, 0); | ||
} | ||
else { | ||
// we need to resolve the promise, perhaps this queryable doesn't return a result | ||
// but hasn't produced an error | ||
this.emit[this.InternalResolveEvent](result); | ||
} | ||
} | ||
@@ -110,2 +116,3 @@ catch (e) { | ||
// anything that throws we emit and continue | ||
this.emit[this.InternalRejectEvent](e); | ||
this.error(e); | ||
@@ -119,4 +126,4 @@ this.log(`[request:${requestId}] Emitted error: "${e.message || e}"`, 3); | ||
return new Promise((resolve, reject) => { | ||
this.on.data(resolve); | ||
this.on.error(reject); | ||
this.on[this.InternalResolveEvent].replace(resolve); | ||
this.on[this.InternalRejectEvent].replace(reject); | ||
}); | ||
@@ -123,0 +130,0 @@ } |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72445
63
826
+ Added@pnp/core@3.0.0-v3nightly.20210921(transitive)
- Removed@pnp/core@3.0.0-v3nightly.20210911(transitive)