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

@solid-rest/core

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-rest/core - npm Package Compare versions

Comparing version 2.1.10 to 2.1.11

46

dist/cjs/handleResponse.js

@@ -126,25 +126,27 @@ "use strict";

let $rdf = typeof window != "undefined" && window.$rdf ? window.$rdf : typeof global != "undefined" && global.$rdf ? global.$rdf : null;
async function serialize(uri, body, informat, outformat) {
return new Promise(async (resolve, reject) => {
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri, outformat, (err, str) => {
if (err) return reject(err);else return resolve(str);
});
});
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ? "" : accept;
if (this.patch && accept && accept.match) {
if (accept.match(/(text\/turtle|application\/ld\+json)/)) {
body = await serialize(this.request.url, body.toString(), this.item.contentType, accept);
} else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
/*
async function serialize(uri,body,informat,outformat){
return new Promise( async (resolve,reject)=>{
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri,outformat,(err, str)=>{
if(err) return( reject(err) );
else return( resolve(str) );
});
})
}
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ?"" :accept;
if(this.patch && accept && accept.match){
if( accept.match(/(text\/turtle|application\/ld\+json)/) ){
body = await serialize(this.request.url,body.toString(),this.item.contentType,accept)
}
else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
}
}
*/

@@ -151,0 +153,0 @@ headers.statusText = headers.statusText || statusText[headers.status];

@@ -116,25 +116,27 @@ /*

let $rdf = typeof window != "undefined" && window.$rdf ? window.$rdf : typeof global != "undefined" && global.$rdf ? global.$rdf : null;
async function serialize(uri, body, informat, outformat) {
return new Promise(async (resolve, reject) => {
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri, outformat, (err, str) => {
if (err) return reject(err);else return resolve(str);
});
});
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ? "" : accept;
if (this.patch && accept && accept.match) {
if (accept.match(/(text\/turtle|application\/ld\+json)/)) {
body = await serialize(this.request.url, body.toString(), this.item.contentType, accept);
} else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
/*
async function serialize(uri,body,informat,outformat){
return new Promise( async (resolve,reject)=>{
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri,outformat,(err, str)=>{
if(err) return( reject(err) );
else return( resolve(str) );
});
})
}
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ?"" :accept;
if(this.patch && accept && accept.match){
if( accept.match(/(text\/turtle|application\/ld\+json)/) ){
body = await serialize(this.request.url,body.toString(),this.item.contentType,accept)
}
else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
}
}
*/

@@ -141,0 +143,0 @@ headers.statusText = headers.statusText || statusText[headers.status];

@@ -135,25 +135,27 @@ (function (global, factory) {

let $rdf = typeof window != "undefined" && window.$rdf ? window.$rdf : typeof global != "undefined" && global.$rdf ? global.$rdf : null;
async function serialize(uri, body, informat, outformat) {
return new Promise(async (resolve, reject) => {
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri, outformat, (err, str) => {
if (err) return reject(err);else return resolve(str);
});
});
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ? "" : accept;
if (this.patch && accept && accept.match) {
if (accept.match(/(text\/turtle|application\/ld\+json)/)) {
body = await serialize(this.request.url, body.toString(), this.item.contentType, accept);
} else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
/*
async function serialize(uri,body,informat,outformat){
return new Promise( async (resolve,reject)=>{
let u = $rdf.sym(uri);
let kb = $rdf.graph();
await $rdf.parse(body, kb, uri, informat);
$rdf.serialize(u, kb, uri,outformat,(err, str)=>{
if(err) return( reject(err) );
else return( resolve(str) );
});
})
}
}
let accept = this.request.headers.accept || "";
accept = accept && accept.match && accept.match(/ /) ?"" :accept;
if(this.patch && accept && accept.match){
if( accept.match(/(text\/turtle|application\/ld\+json)/) ){
body = await serialize(this.request.url,body.toString(),this.item.contentType,accept)
}
else {
headers.status = "405";
headers.statusText = `Unsupported content-type in accept header : ${accept}`;
}
}
*/

@@ -160,0 +162,0 @@ headers.statusText = headers.statusText || statusText[headers.status];

{
"name": "@solid-rest/core",
"version": "2.1.10",
"version": "2.1.11",
"author": "Jeff Zucker",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -115,2 +115,4 @@ /*

let $rdf = typeof window != "undefined" && window.$rdf ? window.$rdf : typeof global != "undefined" && global.$rdf ? global.$rdf : null;
/*
async function serialize(uri,body,informat,outformat){

@@ -127,2 +129,3 @@ return new Promise( async (resolve,reject)=>{

}
let accept = this.request.headers.accept || "";

@@ -139,3 +142,3 @@ accept = accept && accept.match && accept.match(/ /) ?"" :accept;

}
*/
headers.statusText = headers.statusText || statusText[headers.status];

@@ -142,0 +145,0 @@

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