@supabase/postgrest-js 1.16.2 → 1.16.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.
@@ -1,8 +1,17 @@
1
- import type { PostgrestError as IPostgrestError } from './types';
2
- export default class PostgrestError extends Error implements IPostgrestError {
1
+ /**
2
+ * Error format
3
+ *
4
+ * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
5
+ */
6
+ export default class PostgrestError extends Error {
3
7
  details: string;
4
8
  hint: string;
5
9
  code: string;
6
- constructor(context: IPostgrestError);
10
+ constructor(context: {
11
+ message: string;
12
+ details: string;
13
+ hint: string;
14
+ code: string;
15
+ });
7
16
  }
8
17
  //# sourceMappingURL=PostgrestError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PostgrestError.d.ts","sourceRoot":"","sources":["../../src/PostgrestError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAEhE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAM,YAAW,eAAe;IAC1E,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;gBAEA,OAAO,EAAE,eAAe;CAOrC"}
1
+ {"version":3,"file":"PostgrestError.d.ts","sourceRoot":"","sources":["../../src/PostgrestError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK;IAC/C,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;gBAEA,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAOtF"}
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Error format
5
+ *
6
+ * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
7
+ */
3
8
  class PostgrestError extends Error {
4
9
  constructor(context) {
5
10
  super(context.message);
@@ -1 +1 @@
1
- {"version":3,"file":"PostgrestError.js","sourceRoot":"","sources":["../../src/PostgrestError.ts"],"names":[],"mappings":";;AAEA,MAAqB,cAAe,SAAQ,KAAK;IAK/C,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;IAC1B,CAAC;CACF;AAZD,iCAYC"}
1
+ {"version":3,"file":"PostgrestError.js","sourceRoot":"","sources":["../../src/PostgrestError.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,MAAqB,cAAe,SAAQ,KAAK;IAK/C,YAAY,OAAyE;QACnF,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;IAC1B,CAAC;CACF;AAZD,iCAYC"}
@@ -1,15 +1,5 @@
1
+ import PostgrestError from './PostgrestError';
1
2
  export declare type Fetch = typeof fetch;
2
- /**
3
- * Error format
4
- *
5
- * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
6
- */
7
- export declare type PostgrestError = {
8
- message: string;
9
- details: string;
10
- hint: string;
11
- code: string;
12
- };
13
3
  /**
14
4
  * Response format
15
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK,GAAG,OAAO,KAAK,CAAA;AAEhC;;;;GAIG;AACH,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,UAAU,qBAAqB;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;CACnB;AACD,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IACxE,KAAK,EAAE,IAAI,CAAA;IACX,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AACD,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,KAAK,EAAE,cAAc,CAAA;IACrB,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,IAAI,CAAA;CACZ;AAKD,oBAAY,uBAAuB,CAAC,CAAC,IAAI,wBAAwB,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAA;AAC/F,oBAAY,4BAA4B,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;AAC/E,oBAAY,iBAAiB,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAA;AAE/D,oBAAY,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CA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A;IACpC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CAC3C,CAAA;AAGD,oBAAY,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/postgrest-js",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Isomorphic PostgREST client",
5
5
  "keywords": [
6
6
  "postgrest",
@@ -1,11 +1,14 @@
1
- import type { PostgrestError as IPostgrestError } from './types'
2
-
3
- export default class PostgrestError extends Error implements IPostgrestError {
1
+ /**
2
+ * Error format
3
+ *
4
+ * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
5
+ */
6
+ export default class PostgrestError extends Error {
4
7
  details: string
5
8
  hint: string
6
9
  code: string
7
10
 
8
- constructor(context: IPostgrestError) {
11
+ constructor(context: { message: string; details: string; hint: string; code: string }) {
9
12
  super(context.message)
10
13
  this.name = 'PostgrestError'
11
14
  this.details = context.details
package/src/types.ts CHANGED
@@ -1,16 +1,6 @@
1
- export type Fetch = typeof fetch
1
+ import PostgrestError from './PostgrestError'
2
2
 
3
- /**
4
- * Error format
5
- *
6
- * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
7
- */
8
- export type PostgrestError = {
9
- message: string
10
- details: string
11
- hint: string
12
- code: string
13
- }
3
+ export type Fetch = typeof fetch
14
4
 
15
5
  /**
16
6
  * Response format
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.16.2'
1
+ export const version = '1.16.3'