rdflib 2.2.10-cdfd1f0a → 2.2.12-dd3667fc

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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @SPARQL: SPARQL text that is converted to a query object which is returned.
3
+ * @testMode: testing flag. Prevents loading of sources.
4
+ */
5
+ export default function SPARQLToQuery(SPARQL: any, testMode: any, kb: any): false | Query;
6
+ import { Query } from "./query";
@@ -0,0 +1,26 @@
1
+ export class UpdatesSocket {
2
+ constructor(parent: any, via: any);
3
+ parent: any;
4
+ via: any;
5
+ connected: boolean;
6
+ pending: {};
7
+ subscribed: {};
8
+ socket: {};
9
+ _decode(q: any): {};
10
+ _send(method: any, uri: any, data: any): any;
11
+ _subscribe(uri: any): any;
12
+ onClose(e: any): {};
13
+ onError(e: any): void;
14
+ onMessage(e: any): any;
15
+ onOpen(e: any): any[];
16
+ subscribe(uri: any): any;
17
+ }
18
+ export class UpdatesVia {
19
+ constructor(fetcher: any);
20
+ fetcher: any;
21
+ graph: {};
22
+ via: {};
23
+ onHeaders(d: any): boolean;
24
+ onUpdate(uri: any, d: any): any;
25
+ register(via: any, uri: any): any;
26
+ }
@@ -0,0 +1,50 @@
1
+ export function mediaTypeClass(mediaType: any): NamedNode;
2
+ export function linkRelationProperty(relation: any): NamedNode;
3
+ /**
4
+ * Adds callback functionality to an object.
5
+ * Callback functions are indexed by a 'hook' string.
6
+ * They return true if they want to be called again.
7
+ * @method callbackify
8
+ * @param obj {Object}
9
+ * @param callbacks {Array<string>}
10
+ */
11
+ export function callbackify(obj: any, callbacks: Array<string>): void;
12
+ /**
13
+ * Returns a DOM parser based on current runtime environment.
14
+ */
15
+ export function DOMParserFactory(): any;
16
+ export function domToString(node: any, options: any): string;
17
+ export function dumpNode(node: any, options: any, selfClosing: any, skipAttributes: any): string;
18
+ export function dtstamp(): string;
19
+ /**
20
+ * Compares statements (heavy comparison for repeatable canonical ordering)
21
+ */
22
+ export function heavyCompare(x: any, y: any, g: any, uriMap: any): any;
23
+ export function heavyCompareSPO(x: any, y: any, g: any, uriMap: any): any;
24
+ /**
25
+ * Defines a simple debugging function
26
+ * @method output
27
+ * @param o {String}
28
+ */
29
+ export function output(o: string): void;
30
+ /**
31
+ * Returns a DOM from parsex XML.
32
+ */
33
+ export function parseXML(str: any, options: any): any;
34
+ /**
35
+ * Removes all statements equal to x from a
36
+ */
37
+ export function RDFArrayRemove(a: any, x: any): void;
38
+ export function string_startswith(str: any, pref: any): boolean;
39
+ export function stackString(e: any): string;
40
+ import NamedNode from "./named-node";
41
+ import log from "./log";
42
+ import * as uri from "./uri";
43
+ export namespace string {
44
+ export { stringTemplate as template };
45
+ }
46
+ /**
47
+ * C++, python style %s -> subs
48
+ */
49
+ declare function stringTemplate(base: any, subs: any): string;
50
+ export { log, uri };
@@ -0,0 +1,11 @@
1
+ declare namespace _default {
2
+ const boolean: NamedNode;
3
+ const dateTime: NamedNode;
4
+ const decimal: NamedNode;
5
+ const double: NamedNode;
6
+ const integer: NamedNode;
7
+ const langString: NamedNode;
8
+ const string: NamedNode;
9
+ }
10
+ export default _default;
11
+ import NamedNode from "./named-node";
package/lib/xsd.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export function createXSD(localFactory?: import("./factories/factory-types").DataFactory<import("./factories/factory-types").DefaultFactoryTypes, import("./factories/factory-types").Indexable>): {
2
+ boolean: import("./named-node").default;
3
+ dateTime: import("./named-node").default;
4
+ decimal: import("./named-node").default;
5
+ double: import("./named-node").default;
6
+ integer: import("./named-node").default;
7
+ langString: import("./named-node").default;
8
+ string: import("./named-node").default;
9
+ };
10
+ export default defaultXSD;
11
+ declare namespace defaultXSD {
12
+ const boolean: import("./named-node").default;
13
+ const dateTime: import("./named-node").default;
14
+ const decimal: import("./named-node").default;
15
+ const double: import("./named-node").default;
16
+ const integer: import("./named-node").default;
17
+ const langString: import("./named-node").default;
18
+ const string: import("./named-node").default;
19
+ }
package/lib/xsd.js CHANGED
@@ -8,25 +8,19 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.createXSD = createXSD;
9
9
  exports.default = void 0;
10
10
 
11
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
-
13
11
  var _canonicalDataFactory = _interopRequireDefault(require("./factories/canonical-data-factory"));
14
12
 
15
13
  function createXSD() {
16
14
  var localFactory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _canonicalDataFactory.default;
17
-
18
- var XSD = function XSD() {
19
- (0, _classCallCheck2.default)(this, XSD);
15
+ return {
16
+ boolean: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),
17
+ dateTime: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),
18
+ decimal: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),
19
+ double: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#double"),
20
+ integer: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer"),
21
+ langString: localFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),
22
+ string: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#string")
20
23
  };
21
-
22
- XSD.boolean = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#boolean');
23
- XSD.dateTime = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#dateTime');
24
- XSD.decimal = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#decimal');
25
- XSD.double = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#double');
26
- XSD.integer = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#integer');
27
- XSD.langString = localFactory.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');
28
- XSD.string = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#string');
29
- return XSD;
30
24
  }
31
25
 
32
26
  var defaultXSD = createXSD(_canonicalDataFactory.default);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rdflib",
3
3
  "description": "an RDF library for node.js. Suitable for client and server side.",
4
- "version": "2.2.10-cdfd1f0a",
4
+ "version": "2.2.12-dd3667fc",
5
5
  "engines": {
6
6
  "node": ">=6.0"
7
7
  },
@@ -92,7 +92,7 @@
92
92
  "build": "babel src --extensions \".ts,.js\" -d lib",
93
93
  "build:esm": "babel src --extensions \".ts,.js\" --env-name esm -d esm",
94
94
  "build:browser": "webpack --progress",
95
- "build:types": "tsc --emitDeclarationOnly -d --moduleResolution node --declarationDir lib --allowJs false",
95
+ "build:types": "tsc --emitDeclarationOnly -d --moduleResolution node --declarationDir lib",
96
96
  "doc": "typedoc --out ./doc ./src/index.ts --excludePrivate --excludeInternal --tsconfig ./tsconfig.json",
97
97
  "ignore:prepublishOnly": "npm ci && npm run build && npm run build:types && npm run build:browser && npm run build:esm",
98
98
  "postversion": "git push --follow-tags",
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')