@supabase/postgrest-js
Advanced tools
Comparing version 0.28.4 to 0.29.0
@@ -49,3 +49,7 @@ import { PostgrestBuilder, PostgrestSingleResponse } from './types'; | ||
single(): PromiseLike<PostgrestSingleResponse<T>>; | ||
/** | ||
* Set the response type to CSV. | ||
*/ | ||
csv(): this; | ||
} | ||
//# sourceMappingURL=PostgrestTransformBuilder.d.ts.map |
@@ -79,4 +79,11 @@ "use strict"; | ||
} | ||
/** | ||
* Set the response type to CSV. | ||
*/ | ||
csv() { | ||
this.headers['Accept'] = 'text/csv'; | ||
return this; | ||
} | ||
} | ||
exports.default = PostgrestTransformBuilder; | ||
//# sourceMappingURL=PostgrestTransformBuilder.js.map |
@@ -49,3 +49,3 @@ "use strict"; | ||
const text = yield res.text(); | ||
if (text && text !== '') | ||
if (text && text !== '' && this.headers['Accept'] !== 'text/csv') | ||
data = JSON.parse(text); | ||
@@ -52,0 +52,0 @@ } |
@@ -49,3 +49,7 @@ import { PostgrestBuilder, PostgrestSingleResponse } from './types'; | ||
single(): PromiseLike<PostgrestSingleResponse<T>>; | ||
/** | ||
* Set the response type to CSV. | ||
*/ | ||
csv(): this; | ||
} | ||
//# sourceMappingURL=PostgrestTransformBuilder.d.ts.map |
@@ -77,3 +77,10 @@ import { PostgrestBuilder } from './types'; | ||
} | ||
/** | ||
* Set the response type to CSV. | ||
*/ | ||
csv() { | ||
this.headers['Accept'] = 'text/csv'; | ||
return this; | ||
} | ||
} | ||
//# sourceMappingURL=PostgrestTransformBuilder.js.map |
@@ -43,3 +43,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const text = yield res.text(); | ||
if (text && text !== '') | ||
if (text && text !== '' && this.headers['Accept'] !== 'text/csv') | ||
data = JSON.parse(text); | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "@supabase/postgrest-js", | ||
"version": "0.28.4", | ||
"version": "0.29.0", | ||
"description": "Isomorphic PostgREST client", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -96,2 +96,10 @@ import { PostgrestBuilder, PostgrestSingleResponse } from './types' | ||
} | ||
/** | ||
* Set the response type to CSV. | ||
*/ | ||
csv(): this { | ||
this.headers['Accept'] = 'text/csv' | ||
return this | ||
} | ||
} |
@@ -94,3 +94,4 @@ import fetch from 'cross-fetch' | ||
const text = await res.text() | ||
if (text && text !== '') data = JSON.parse(text) | ||
if (text && text !== '' && this.headers['Accept'] !== 'text/csv') | ||
data = JSON.parse(text) | ||
} | ||
@@ -97,0 +98,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184841
3432