rdflib 2.2.10-4fa7e876 → 2.2.12-35ebd4c8
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/rdflib.min.js +1 -1
- package/dist/rdflib.min.js.map +1 -1
- package/esm/fetcher.js +3 -2
- package/lib/fetcher.d.ts +2 -0
- package/lib/fetcher.js +3 -2
- package/package.json +1 -1
- package/src/fetcher.ts +6 -3
package/esm/fetcher.js
CHANGED
|
@@ -692,8 +692,9 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
692
692
|
|
|
693
693
|
this.store = store || new IndexedFormula();
|
|
694
694
|
this.ns = getNS(this.store.rdfFactory);
|
|
695
|
-
this.timeout = options.timeout || 30000;
|
|
696
|
-
|
|
695
|
+
this.timeout = options.timeout || 30000; // solidFetcher is deprecated
|
|
696
|
+
|
|
697
|
+
this._fetch = options.fetch || typeof global !== 'undefined' && (global.solidFetcher || global.solidFetch) || typeof window !== 'undefined' && (window.solidFetcher || window.solidFetch) || crossFetch;
|
|
697
698
|
|
|
698
699
|
if (!this._fetch) {
|
|
699
700
|
throw new Error('No _fetch function available for Fetcher');
|
package/lib/fetcher.d.ts
CHANGED
|
@@ -48,8 +48,10 @@ declare global {
|
|
|
48
48
|
interface Window {
|
|
49
49
|
panes?: any;
|
|
50
50
|
solidFetcher?: any;
|
|
51
|
+
solidFetch?: any;
|
|
51
52
|
}
|
|
52
53
|
var solidFetcher: Function;
|
|
54
|
+
var solidFetch: Function;
|
|
53
55
|
}
|
|
54
56
|
declare type UserCallback = (ok: boolean, message: string, response?: any) => void;
|
|
55
57
|
declare type HTTPMethods = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'HEAD' | 'DELETE' | 'CONNECT' | 'TRACE' | 'OPTIONS';
|
package/lib/fetcher.js
CHANGED
|
@@ -668,8 +668,9 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
668
668
|
(0, _defineProperty2.default)(this, "fireCallbacks", void 0);
|
|
669
669
|
this.store = store || new _store.default();
|
|
670
670
|
this.ns = getNS(this.store.rdfFactory);
|
|
671
|
-
this.timeout = options.timeout || 30000;
|
|
672
|
-
|
|
671
|
+
this.timeout = options.timeout || 30000; // solidFetcher is deprecated
|
|
672
|
+
|
|
673
|
+
this._fetch = options.fetch || typeof global !== 'undefined' && (global.solidFetcher || global.solidFetch) || typeof window !== 'undefined' && (window.solidFetcher || window.solidFetch) || _crossFetch.default;
|
|
673
674
|
|
|
674
675
|
if (!this._fetch) {
|
|
675
676
|
throw new Error('No _fetch function available for Fetcher');
|
package/package.json
CHANGED
package/src/fetcher.ts
CHANGED
|
@@ -115,8 +115,10 @@ declare global {
|
|
|
115
115
|
interface Window {
|
|
116
116
|
panes?: any
|
|
117
117
|
solidFetcher?: any
|
|
118
|
+
solidFetch?: any
|
|
118
119
|
}
|
|
119
|
-
var solidFetcher:Function
|
|
120
|
+
var solidFetcher: Function
|
|
121
|
+
var solidFetch: Function
|
|
120
122
|
}
|
|
121
123
|
declare var $SolidTestEnvironment: {
|
|
122
124
|
localSiteMap?: any
|
|
@@ -754,9 +756,10 @@ export default class Fetcher implements CallbackifyInterface {
|
|
|
754
756
|
this.ns = getNS(this.store.rdfFactory)
|
|
755
757
|
this.timeout = options.timeout || 30000
|
|
756
758
|
|
|
759
|
+
// solidFetcher is deprecated
|
|
757
760
|
this._fetch = options.fetch
|
|
758
|
-
|| (typeof global !== 'undefined' && global.solidFetcher)
|
|
759
|
-
|| (typeof window !== 'undefined' && window.solidFetcher)
|
|
761
|
+
|| (typeof global !== 'undefined' && (global.solidFetcher || global.solidFetch))
|
|
762
|
+
|| (typeof window !== 'undefined' && (window.solidFetcher || window.solidFetch))
|
|
760
763
|
|| crossFetch
|
|
761
764
|
if (!this._fetch) {
|
|
762
765
|
throw new Error('No _fetch function available for Fetcher')
|