rdf-test-suite 2.1.2 → 2.1.3

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/lib/Util.js CHANGED
@@ -122,7 +122,8 @@ class Util {
122
122
  }
123
123
  }
124
124
  }
125
- const cachePathLocal = options.cachePath ? options.cachePath + encodeURIComponent(url) : null;
125
+ const encodedUrl = encodeURIComponent(url);
126
+ const cachePathLocal = options.cachePath && encodedUrl.length <= 255 ? options.cachePath + encodedUrl : null;
126
127
  if (cachePathLocal && (0, fs_1.existsSync)(cachePathLocal)) {
127
128
  // Read from cache
128
129
  return {
package/lib/Util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Util.js","sourceRoot":"","sources":["Util.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAgG;AAChG,qEAAqD;AAErD,qEAAqD;AACrD,mCAAmC;AACnC,iEAA4D;AAC5D,2EAAsE;AACtE,6EAAoE;AAEpE,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAa,IAAI;IAoBf;;;;;OAKG;IACI,MAAM,CAAC,mBAAmB,CAAC,GAAW,EAAE,OAAgB;QAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAChD,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;eAC5F,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;eACpE,SAAS,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,gBAAgB,CAAC,GAAW;QACxC,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,C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,GAAW,SAAS,CAAC;AAChC,cAAS,GAAW,UAAU,CAAC;AAC/B,gBAAW,GAAW,UAAU,CAAC;AACjC,iBAAY,GAAW,UAAU,CAAC;AAClC,eAAU,GAAW,UAAU,CAAC;AAChC,kBAAa,GAAW,UAAU,CAAC;AACnC,eAAU,GAAW,UAAU,CAAC;AAChC,eAAU,GAAW,UAAU,CAAC;AAEpB,6BAAwB,GAAkC;IAClF,MAAM,EAAE,qBAAqB;IAC7B,EAAE,EAAE,qBAAqB;IACzB,EAAE,EAAE,uBAAuB;IAC3B,GAAG,EAAE,iCAAiC;IACtC,GAAG,EAAE,gCAAgC;IACrC,GAAG,EAAE,aAAa;CACnB,CAAC","sourcesContent":["import {createReadStream, createWriteStream, existsSync, readFileSync, writeFileSync} from \"fs\";\nimport {JsonLdParser} from \"jsonld-streaming-parser\";\nimport * as RDF from \"@rdfjs/types\";\nimport {RdfXmlParser} from \"rdfxml-streaming-parser\";\nimport {PassThrough} from \"stream\";\nimport {DocumentLoaderCached} from \"./DocumentLoaderCached\";\nimport {GeneralizedN3StreamParser} from \"./GeneralizedN3StreamParser\";\nimport {ReadableWebToNodeStream} from 'readable-web-to-node-stream';\n\n// tslint:disable-next-line:no-var-requires\nconst isStream = require('is-stream');\n\n/**\n * Utility functions\n */\nexport class Util {\n\n public static COLOR_RESET: string = '\\x1b[0m';\n public static COLOR_RED: string = '\\x1b[31m';\n public static COLOR_GREEN: string = '\\x1b[32m';\n public static COLOR_YELLOW: string = '\\x1b[33m';\n public static COLOR_BLUE: string = '\\x1b[34m';\n public static COLOR_MAGENTA: string = '\\x1b[35m';\n public static COLOR_CYAN: string = '\\x1b[36m';\n public static COLOR_GRAY: string = '\\x1b[90m';\n\n protected static readonly EXTENSION_TO_CONTENTTYPE: {[extension: string]: string} = {\n jsonld: 'application/ld+json',\n nq: 'application/n-quads',\n nt: 'application/n-triples',\n srj: 'application/sparql-results+json',\n srx: 'application/sparql-results+xml',\n ttl: 'text/turtle',\n };\n\n /**\n * Determine the content type of the given URL based on the headers.\n * @param {string} url The URL to get the content type from.\n * @param {Headers} headers The headers of the given URL.\n * @return {string} The content type.\n */\n public static identifyContentType(url: string, headers: Headers): string {\n const contentType = headers.get('Content-Type');\n return (contentType && contentType.indexOf('application/octet-stream') < 0 ? contentType : false)\n || Util.EXTENSION_TO_CONTENTTYPE[url.substr(url.lastIndexOf('\\.') + 1)]\n || 'unknown';\n }\n\n /**\n * Convert https to http\n * @param {string} url A URL.\n * @return {string} An http URL.\n */\n public static normalizeBaseUrl(url: string) {\n if (url.startsWith('https://')) {\n return url.replace('https', 'http');\n }\n return url;\n }\n\n /**\n * Fetch the given RDF document and parse it.\n * @param {string} url A URL.\n * @param {IFetchOptions} options Options for fetching.\n * @return {Promise<[string , Stream]>} A promise resolving to a pair of a URL and a parsed RDF stream.\n */\n public static async fetchRdf(url: string, options: IFetchOptions = {}): Promise<[string, RDF.Stream]> {\n const response = await Util.fetchCached(url, options);\n const contentType = Util.identifyContentType(response.url, response.headers);\n return [response.url, Util.parseRdfRaw(contentType,\n options.normalizeUrl ? Util.normalizeBaseUrl(response.url) : response.url, response.body, options)];\n }\n\n /**\n * Parses RDF based on the content type.\n * @param {string} contentType The content type of the given text stream.\n * @param {string} baseIRI The base IRI of the stream.\n * @param {NodeJS.ReadableStream} data Text stream in a certain RDF serialization.\n * @param {IFetchOptions} options Options for fetching.\n * @return {Stream} A parsed RDF stream.\n */\n public static parseRdfRaw(contentType: string, baseIRI: string,\n data: NodeJS.ReadableStream, options: IFetchOptions = {}): RDF.Stream {\n if (contentType.indexOf('application/x-turtle') >= 0\n || contentType.indexOf('text/turtle') >= 0\n || contentType.indexOf('application/n-triples') >= 0\n || contentType.indexOf('application/n-quads') >= 0\n || contentType.indexOf('application/trig') >= 0) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: contentType, }));\n }\n if (contentType.indexOf('application/rdf+xml') >= 0) {\n return data.pipe(new RdfXmlParser({ baseIRI }));\n }\n if (contentType.indexOf('application/ld+json') >= 0) {\n const documentLoader = new DocumentLoaderCached(options);\n return data.pipe(new JsonLdParser({ baseIRI, documentLoader }));\n }\n if (baseIRI.endsWith('.ttl')) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: 'text/turtle', }));\n }\n if (baseIRI.endsWith('.trig')) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: 'application/trig', }));\n }\n\n throw new Error(`Could not parse the RDF serialization ${contentType} on ${baseIRI}`);\n }\n\n /**\n * Fetch the given URL or retrieve it from a local file cache.\n * @param {string} url The URL to fetch.\n * @param {IFetchOptions} options Options for fetching.\n * @param {RequestInit} init Fetch init options.\n * @return {Promise<IFetchResponse>} A promise resolving to the response.\n */\n public static async fetchCached(url: string, options: IFetchOptions = {},\n init?: RequestInit): Promise<IFetchResponse> {\n // First check local file mappings\n if (options.urlToFileMappings) {\n for (const urlToFileMapping of options.urlToFileMappings) {\n if (url.startsWith(urlToFileMapping.url)) {\n let pathSuffix = url.substr(urlToFileMapping.url.length);\n\n // Remove hashes from path\n const hashPos = pathSuffix.indexOf('#');\n if (hashPos >= 0) {\n pathSuffix = pathSuffix.substr(0, hashPos);\n }\n\n // Resolve file path\n const filePath = urlToFileMapping.path + pathSuffix;\n if (!existsSync(filePath)) {\n throw new Error(`Could not find file ` + filePath);\n }\n return {\n body: createReadStream(filePath),\n headers: new Headers({}),\n url: urlToFileMapping.url + pathSuffix,\n };\n }\n }\n }\n\n const cachePathLocal: string = options.cachePath ? options.cachePath + encodeURIComponent(url) : null;\n if (cachePathLocal && existsSync(cachePathLocal)) {\n // Read from cache\n return {\n body: createReadStream(cachePathLocal),\n headers: new Headers(JSON.parse(readFileSync(cachePathLocal + '.headers', { encoding: 'utf8' }))),\n url: readFileSync(cachePathLocal + '.url', { encoding: 'utf8' }),\n };\n } else {\n // Do actual fetch\n const response = await fetch(url, init);\n if (!response.ok) {\n throw new Error(`Could not find ${url}`);\n }\n /* istanbul ignore next */\n const body: NodeJS.ReadableStream = isStream(response.body) || response.body === null ?\n <any> response.body :\n new ReadableWebToNodeStream(response.body);\n const body1 = body.pipe(new PassThrough());\n const body2 = body.pipe(new PassThrough());\n\n // Remove unneeded headers (copy to make sure the Headers object is not immutable)\n const headers = new Headers(response.headers);\n headers.delete('content-length');\n headers.delete('content-encoding');\n\n if (cachePathLocal) {\n // Save in cache\n const writeStream = createWriteStream(cachePathLocal, 'utf8');\n body1.pipe(writeStream);\n await new Promise((resolve) => setImmediate(resolve)); // To fix the problem of files being empty sometimes\n try {\n writeFileSync(cachePathLocal + '.url', response.url || url);\n const headersRaw: any = {};\n headers.forEach((value: string, key: string) => headersRaw[key] = value);\n writeFileSync(cachePathLocal + '.headers', JSON.stringify(headersRaw));\n } catch (error) {\n // Silently ignore errors if name is too long\n if (error.code === 'ENAMETOOLONG') {\n console.error(error.toString());\n } else {\n throw error;\n }\n }\n }\n\n return {\n body: body2,\n headers: headers,\n url: response.url || url,\n };\n }\n }\n\n /**\n * Resolve all values in a hash.\n * @param {{[p: string]: Promise<T>}} data A hash with promise values.\n * @return {Promise<{[p: string]: T}>} A hash with resolved promise values.\n */\n public static async promiseValues<T>(data: {[id: string]: Promise<T>}): Promise<{[id: string]: T}> {\n const newData: {[id: string]: T} = {};\n for (const key in data) {\n newData[key] = await data[key];\n }\n return newData;\n }\n\n /**\n * Convert a license string to a URI.\n * @param {string} license A license string.\n * @return {string} A license URI.\n */\n public static licenseToUri(license: string) {\n // TODO: make this more error-prone like here:\n // https://github.com/LinkedSoftwareDependencies/npm-extraction-server/blob/master/lib/npm/NpmContext.js#L151\n return 'http://opensource.org/licenses/' + license;\n }\n\n /**\n * Return a string in a given color\n * @param str The string that should be printed in\n * @param color A given color\n */\n public static withColor(str: any, color: string) {\n return `${color}${str}${Util.COLOR_RESET}`;\n }\n\n}\n\n/**\n * A fetch response.\n */\nexport interface IFetchResponse {\n body: NodeJS.ReadableStream;\n headers: Headers;\n url: string;\n}\n\nexport interface IFetchOptions {\n /**\n * The base directory to cache files in. If falsy, then no cache will be used.\n */\n cachePath?: string;\n /**\n * If the base URL should be converted from https to http.\n */\n normalizeUrl?: boolean;\n /**\n * URL to local path mapping.\n */\n urlToFileMappings?: { url: string, path: string }[];\n}\n"]}
1
+ {"version":3,"file":"Util.js","sourceRoot":"","sources":["Util.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAgG;AAChG,qEAAqD;AAErD,qEAAqD;AACrD,mCAAmC;AACnC,iEAA4D;AAC5D,2EAAsE;AACtE,6EAAoE;AAEpE,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAa,IAAI;IAoBf;;;;;OAKG;IACI,MAAM,CAAC,mBAAmB,CAAC,GAAW,EAAE,OAAgB;QAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAChD,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;eAC5F,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;eACpE,SAAS,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,gBAAgB,CAAC,GAAW;QACxC,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAO,QAAQ;6DAAC,GAAW,EAAE,UAAyB,EAAE;YACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACtD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ChC,eAAU,GAAW,UAAU,CAAC;AAEpB,6BAAwB,GAAkC;IAClF,MAAM,EAAE,qBAAqB;IAC7B,EAAE,EAAE,qBAAqB;IACzB,EAAE,EAAE,uBAAuB;IAC3B,GAAG,EAAE,iCAAiC;IACtC,GAAG,EAAE,gCAAgC;IACrC,GAAG,EAAE,aAAa;CACnB,CAAC","sourcesContent":["import {createReadStream, createWriteStream, existsSync, readFileSync, writeFileSync} from \"fs\";\nimport {JsonLdParser} from \"jsonld-streaming-parser\";\nimport * as RDF from \"@rdfjs/types\";\nimport {RdfXmlParser} from \"rdfxml-streaming-parser\";\nimport {PassThrough} from \"stream\";\nimport {DocumentLoaderCached} from \"./DocumentLoaderCached\";\nimport {GeneralizedN3StreamParser} from \"./GeneralizedN3StreamParser\";\nimport {ReadableWebToNodeStream} from 'readable-web-to-node-stream';\n\n// tslint:disable-next-line:no-var-requires\nconst isStream = require('is-stream');\n\n/**\n * Utility functions\n */\nexport class Util {\n\n public static COLOR_RESET: string = '\\x1b[0m';\n public static COLOR_RED: string = '\\x1b[31m';\n public static COLOR_GREEN: string = '\\x1b[32m';\n public static COLOR_YELLOW: string = '\\x1b[33m';\n public static COLOR_BLUE: string = '\\x1b[34m';\n public static COLOR_MAGENTA: string = '\\x1b[35m';\n public static COLOR_CYAN: string = '\\x1b[36m';\n public static COLOR_GRAY: string = '\\x1b[90m';\n\n protected static readonly EXTENSION_TO_CONTENTTYPE: {[extension: string]: string} = {\n jsonld: 'application/ld+json',\n nq: 'application/n-quads',\n nt: 'application/n-triples',\n srj: 'application/sparql-results+json',\n srx: 'application/sparql-results+xml',\n ttl: 'text/turtle',\n };\n\n /**\n * Determine the content type of the given URL based on the headers.\n * @param {string} url The URL to get the content type from.\n * @param {Headers} headers The headers of the given URL.\n * @return {string} The content type.\n */\n public static identifyContentType(url: string, headers: Headers): string {\n const contentType = headers.get('Content-Type');\n return (contentType && contentType.indexOf('application/octet-stream') < 0 ? contentType : false)\n || Util.EXTENSION_TO_CONTENTTYPE[url.substr(url.lastIndexOf('\\.') + 1)]\n || 'unknown';\n }\n\n /**\n * Convert https to http\n * @param {string} url A URL.\n * @return {string} An http URL.\n */\n public static normalizeBaseUrl(url: string) {\n if (url.startsWith('https://')) {\n return url.replace('https', 'http');\n }\n return url;\n }\n\n /**\n * Fetch the given RDF document and parse it.\n * @param {string} url A URL.\n * @param {IFetchOptions} options Options for fetching.\n * @return {Promise<[string , Stream]>} A promise resolving to a pair of a URL and a parsed RDF stream.\n */\n public static async fetchRdf(url: string, options: IFetchOptions = {}): Promise<[string, RDF.Stream]> {\n const response = await Util.fetchCached(url, options);\n const contentType = Util.identifyContentType(response.url, response.headers);\n return [response.url, Util.parseRdfRaw(contentType,\n options.normalizeUrl ? Util.normalizeBaseUrl(response.url) : response.url, response.body, options)];\n }\n\n /**\n * Parses RDF based on the content type.\n * @param {string} contentType The content type of the given text stream.\n * @param {string} baseIRI The base IRI of the stream.\n * @param {NodeJS.ReadableStream} data Text stream in a certain RDF serialization.\n * @param {IFetchOptions} options Options for fetching.\n * @return {Stream} A parsed RDF stream.\n */\n public static parseRdfRaw(contentType: string, baseIRI: string,\n data: NodeJS.ReadableStream, options: IFetchOptions = {}): RDF.Stream {\n if (contentType.indexOf('application/x-turtle') >= 0\n || contentType.indexOf('text/turtle') >= 0\n || contentType.indexOf('application/n-triples') >= 0\n || contentType.indexOf('application/n-quads') >= 0\n || contentType.indexOf('application/trig') >= 0) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: contentType, }));\n }\n if (contentType.indexOf('application/rdf+xml') >= 0) {\n return data.pipe(new RdfXmlParser({ baseIRI }));\n }\n if (contentType.indexOf('application/ld+json') >= 0) {\n const documentLoader = new DocumentLoaderCached(options);\n return data.pipe(new JsonLdParser({ baseIRI, documentLoader }));\n }\n if (baseIRI.endsWith('.ttl')) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: 'text/turtle', }));\n }\n if (baseIRI.endsWith('.trig')) {\n return data.pipe(new GeneralizedN3StreamParser({ baseIRI, format: 'application/trig', }));\n }\n\n throw new Error(`Could not parse the RDF serialization ${contentType} on ${baseIRI}`);\n }\n\n /**\n * Fetch the given URL or retrieve it from a local file cache.\n * @param {string} url The URL to fetch.\n * @param {IFetchOptions} options Options for fetching.\n * @param {RequestInit} init Fetch init options.\n * @return {Promise<IFetchResponse>} A promise resolving to the response.\n */\n public static async fetchCached(url: string, options: IFetchOptions = {},\n init?: RequestInit): Promise<IFetchResponse> {\n // First check local file mappings\n if (options.urlToFileMappings) {\n for (const urlToFileMapping of options.urlToFileMappings) {\n if (url.startsWith(urlToFileMapping.url)) {\n let pathSuffix = url.substr(urlToFileMapping.url.length);\n\n // Remove hashes from path\n const hashPos = pathSuffix.indexOf('#');\n if (hashPos >= 0) {\n pathSuffix = pathSuffix.substr(0, hashPos);\n }\n\n // Resolve file path\n const filePath = urlToFileMapping.path + pathSuffix;\n if (!existsSync(filePath)) {\n throw new Error(`Could not find file ` + filePath);\n }\n return {\n body: createReadStream(filePath),\n headers: new Headers({}),\n url: urlToFileMapping.url + pathSuffix,\n };\n }\n }\n }\n\n const encodedUrl = encodeURIComponent(url);\n const cachePathLocal: string = options.cachePath && encodedUrl.length <= 255 ? options.cachePath + encodedUrl : null;\n if (cachePathLocal && existsSync(cachePathLocal)) {\n // Read from cache\n return {\n body: createReadStream(cachePathLocal),\n headers: new Headers(JSON.parse(readFileSync(cachePathLocal + '.headers', { encoding: 'utf8' }))),\n url: readFileSync(cachePathLocal + '.url', { encoding: 'utf8' }),\n };\n } else {\n // Do actual fetch\n const response = await fetch(url, init);\n if (!response.ok) {\n throw new Error(`Could not find ${url}`);\n }\n /* istanbul ignore next */\n const body: NodeJS.ReadableStream = isStream(response.body) || response.body === null ?\n <any> response.body :\n new ReadableWebToNodeStream(response.body);\n const body1 = body.pipe(new PassThrough());\n const body2 = body.pipe(new PassThrough());\n\n // Remove unneeded headers (copy to make sure the Headers object is not immutable)\n const headers = new Headers(response.headers);\n headers.delete('content-length');\n headers.delete('content-encoding');\n\n if (cachePathLocal) {\n // Save in cache\n const writeStream = createWriteStream(cachePathLocal, 'utf8');\n body1.pipe(writeStream);\n await new Promise((resolve) => setImmediate(resolve)); // To fix the problem of files being empty sometimes\n try {\n writeFileSync(cachePathLocal + '.url', response.url || url);\n const headersRaw: any = {};\n headers.forEach((value: string, key: string) => headersRaw[key] = value);\n writeFileSync(cachePathLocal + '.headers', JSON.stringify(headersRaw));\n } catch (error) {\n // Silently ignore errors if name is too long\n if (error.code === 'ENAMETOOLONG') {\n console.error(error.toString());\n } else {\n throw error;\n }\n }\n }\n\n return {\n body: body2,\n headers: headers,\n url: response.url || url,\n };\n }\n }\n\n /**\n * Resolve all values in a hash.\n * @param {{[p: string]: Promise<T>}} data A hash with promise values.\n * @return {Promise<{[p: string]: T}>} A hash with resolved promise values.\n */\n public static async promiseValues<T>(data: {[id: string]: Promise<T>}): Promise<{[id: string]: T}> {\n const newData: {[id: string]: T} = {};\n for (const key in data) {\n newData[key] = await data[key];\n }\n return newData;\n }\n\n /**\n * Convert a license string to a URI.\n * @param {string} license A license string.\n * @return {string} A license URI.\n */\n public static licenseToUri(license: string) {\n // TODO: make this more error-prone like here:\n // https://github.com/LinkedSoftwareDependencies/npm-extraction-server/blob/master/lib/npm/NpmContext.js#L151\n return 'http://opensource.org/licenses/' + license;\n }\n\n /**\n * Return a string in a given color\n * @param str The string that should be printed in\n * @param color A given color\n */\n public static withColor(str: any, color: string) {\n return `${color}${str}${Util.COLOR_RESET}`;\n }\n\n}\n\n/**\n * A fetch response.\n */\nexport interface IFetchResponse {\n body: NodeJS.ReadableStream;\n headers: Headers;\n url: string;\n}\n\nexport interface IFetchOptions {\n /**\n * The base directory to cache files in. If falsy, then no cache will be used.\n */\n cachePath?: string;\n /**\n * If the base URL should be converted from https to http.\n */\n normalizeUrl?: boolean;\n /**\n * URL to local path mapping.\n */\n urlToFileMappings?: { url: string, path: string }[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdf-test-suite",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "Executes the RDF and SPARQL test suites.",
5
5
  "keywords": [
6
6
  "sparql",