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

fetch-sparql-endpoint

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-sparql-endpoint - npm Package Compare versions

Comparing version 3.2.1 to 3.3.0

4

lib/SparqlEndpointFetcher.d.ts

@@ -20,2 +20,3 @@ /// <reference types="node" />

readonly additionalUrlParams: URLSearchParams;
readonly defaultHeaders: Headers;
readonly fetchCb?: (input?: Request | string, init?: RequestInit) => Promise<Response>;

@@ -105,2 +106,3 @@ readonly sparqlParsers: {

timeout?: number;
defaultHeaders?: Headers;
/**

@@ -118,4 +120,4 @@ * A custom fetch function.

}
export declare type IUpdateTypes = {
export type IUpdateTypes = {
[K in ManagementOperation['type'] | InsertDeleteOperation['updateType']]?: boolean;
};

@@ -23,2 +23,3 @@ "use strict";

this.additionalUrlParams = args.additionalUrlParams || new URLSearchParams();
this.defaultHeaders = args.defaultHeaders || new Headers();
this.fetchCb = args.fetch;

@@ -131,5 +132,3 @@ this.sparqlJsonParser = new sparqljson_parse_1.SparqlJsonParser(args);

method: 'POST',
headers: {
'content-type': 'application/sparql-update',
},
headers: Object.assign(Object.assign({}, this.defaultHeaders), { 'content-type': 'application/sparql-update' }),
body: query,

@@ -154,3 +153,3 @@ signal: abortController.signal,

// Initiate request
const headers = new Headers();
const headers = new Headers(this.defaultHeaders);
let body;

@@ -214,3 +213,2 @@ headers.append('Accept', acceptHeader);

}
exports.SparqlEndpointFetcher = SparqlEndpointFetcher;
SparqlEndpointFetcher.CONTENTTYPE_SPARQL_JSON = 'application/sparql-results+json';

@@ -220,2 +218,3 @@ SparqlEndpointFetcher.CONTENTTYPE_SPARQL_XML = 'application/sparql-results+xml';

SparqlEndpointFetcher.CONTENTTYPE_TURTLE = 'text/turtle';
exports.SparqlEndpointFetcher = SparqlEndpointFetcher;
//# sourceMappingURL=SparqlEndpointFetcher.js.map
{
"name": "fetch-sparql-endpoint",
"version": "3.2.1",
"version": "3.3.0",
"description": "A simple, lightweight module to send queries to SPARQL endpoints and retrieve their results in a streaming fashion.",

@@ -73,3 +73,3 @@ "keywords": [

"tslint-eslint-rules": "^5.4.0",
"typescript": "^4.3.5",
"typescript": "^5.0.0",
"web-streams-node": "^0.4.0",

@@ -76,0 +76,0 @@ "webpack": "^5.73.0",

@@ -45,2 +45,3 @@ # Fetch SPARQL Endpoint

additionalUrlParams: new URLSearchParams({'infer': 'true', 'sameAs': 'false'}); // A set of additional parameters that well be added to fetchAsk, fetchBindings & fetchTriples requests
defaultHeaders: new Headers(), // Optional default headers that will be included in each request
fetch: fetch, // A custom fetch-API-supporting function

@@ -47,0 +48,0 @@ dataFactory: DataFactory, // A custom RDFJS data factory

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