@supabase/postgrest-js 1.16.1 → 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"}
@@ -3,14 +3,16 @@ import PostgrestQueryBuilder from './PostgrestQueryBuilder';
3
3
  import PostgrestFilterBuilder from './PostgrestFilterBuilder';
4
4
  import PostgrestTransformBuilder from './PostgrestTransformBuilder';
5
5
  import PostgrestBuilder from './PostgrestBuilder';
6
- export { PostgrestClient, PostgrestQueryBuilder, PostgrestFilterBuilder, PostgrestTransformBuilder, PostgrestBuilder, };
6
+ import PostgrestError from './PostgrestError';
7
+ export { PostgrestClient, PostgrestQueryBuilder, PostgrestFilterBuilder, PostgrestTransformBuilder, PostgrestBuilder, PostgrestError, };
7
8
  declare const _default: {
8
9
  PostgrestClient: typeof PostgrestClient;
9
10
  PostgrestQueryBuilder: typeof PostgrestQueryBuilder;
10
11
  PostgrestFilterBuilder: typeof PostgrestFilterBuilder;
11
12
  PostgrestTransformBuilder: typeof PostgrestTransformBuilder;
12
13
  PostgrestBuilder: typeof PostgrestBuilder;
14
+ PostgrestError: typeof PostgrestError;
13
15
  };
14
16
  export default _default;
15
- export type { PostgrestResponse, PostgrestResponseFailure, PostgrestResponseSuccess, PostgrestSingleResponse, PostgrestMaybeSingleResponse, PostgrestError, } from './types';
17
+ export type { PostgrestResponse, PostgrestResponseFailure, PostgrestResponseSuccess, PostgrestSingleResponse, PostgrestMaybeSingleResponse, } from './types';
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,sBAAsB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,yBAAyB,MAAM,6BAA6B,CAAA;AACnE,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,GACjB,CAAA;;;;;;;;AACD,wBAMC;AACD,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,cAAc,GACf,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,sBAAsB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,yBAAyB,MAAM,6BAA6B,CAAA;AACnE,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,GACf,CAAA;;;;;;;;;AACD,wBAOC;AACD,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,SAAS,CAAA"}
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PostgrestBuilder = exports.PostgrestTransformBuilder = exports.PostgrestFilterBuilder = exports.PostgrestQueryBuilder = exports.PostgrestClient = void 0;
6
+ exports.PostgrestError = exports.PostgrestBuilder = exports.PostgrestTransformBuilder = exports.PostgrestFilterBuilder = exports.PostgrestQueryBuilder = exports.PostgrestClient = void 0;
7
7
  // Always update wrapper.mjs when updating this file.
8
8
  const PostgrestClient_1 = __importDefault(require("./PostgrestClient"));
9
9
  exports.PostgrestClient = PostgrestClient_1.default;
@@ -15,11 +15,14 @@ const PostgrestTransformBuilder_1 = __importDefault(require("./PostgrestTransfor
15
15
  exports.PostgrestTransformBuilder = PostgrestTransformBuilder_1.default;
16
16
  const PostgrestBuilder_1 = __importDefault(require("./PostgrestBuilder"));
17
17
  exports.PostgrestBuilder = PostgrestBuilder_1.default;
18
+ const PostgrestError_1 = __importDefault(require("./PostgrestError"));
19
+ exports.PostgrestError = PostgrestError_1.default;
18
20
  exports.default = {
19
21
  PostgrestClient: PostgrestClient_1.default,
20
22
  PostgrestQueryBuilder: PostgrestQueryBuilder_1.default,
21
23
  PostgrestFilterBuilder: PostgrestFilterBuilder_1.default,
22
24
  PostgrestTransformBuilder: PostgrestTransformBuilder_1.default,
23
25
  PostgrestBuilder: PostgrestBuilder_1.default,
26
+ PostgrestError: PostgrestError_1.default,
24
27
  };
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAqD;AACrD,wEAA+C;AAO7C,0BAPK,yBAAe,CAOL;AANjB,oFAA2D;AAOzD,gCAPK,+BAAqB,CAOL;AANvB,sFAA6D;AAO3D,iCAPK,gCAAsB,CAOL;AANxB,4FAAmE;AAOjE,oCAPK,mCAAyB,CAOL;AAN3B,0EAAiD;AAO/C,2BAPK,0BAAgB,CAOL;AAElB,kBAAe;IACb,eAAe,EAAf,yBAAe;IACf,qBAAqB,EAArB,+BAAqB;IACrB,sBAAsB,EAAtB,gCAAsB;IACtB,yBAAyB,EAAzB,mCAAyB;IACzB,gBAAgB,EAAhB,0BAAgB;CACjB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAqD;AACrD,wEAA+C;AAQ7C,0BARK,yBAAe,CAQL;AAPjB,oFAA2D;AAQzD,gCARK,+BAAqB,CAQL;AAPvB,sFAA6D;AAQ3D,iCARK,gCAAsB,CAQL;AAPxB,4FAAmE;AAQjE,oCARK,mCAAyB,CAQL;AAP3B,0EAAiD;AAQ/C,2BARK,0BAAgB,CAQL;AAPlB,sEAA6C;AAQ3C,yBARK,wBAAc,CAQL;AAEhB,kBAAe;IACb,eAAe,EAAf,yBAAe;IACf,qBAAqB,EAArB,+BAAqB;IACrB,sBAAsB,EAAtB,gCAAsB;IACtB,yBAAyB,EAAzB,mCAAyB;IACzB,gBAAgB,EAAhB,0BAAgB;IAChB,cAAc,EAAd,wBAAc;CACf,CAAA"}
@@ -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,CAA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BAAuB,CAAA;AAExE,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,oBAAY,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;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.1",
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/index.ts CHANGED
@@ -4,6 +4,7 @@ import PostgrestQueryBuilder from './PostgrestQueryBuilder'
4
4
  import PostgrestFilterBuilder from './PostgrestFilterBuilder'
5
5
  import PostgrestTransformBuilder from './PostgrestTransformBuilder'
6
6
  import PostgrestBuilder from './PostgrestBuilder'
7
+ import PostgrestError from './PostgrestError'
7
8
 
8
9
  export {
9
10
  PostgrestClient,
@@ -11,6 +12,7 @@ export {
11
12
  PostgrestFilterBuilder,
12
13
  PostgrestTransformBuilder,
13
14
  PostgrestBuilder,
15
+ PostgrestError,
14
16
  }
15
17
  export default {
16
18
  PostgrestClient,
@@ -18,6 +20,7 @@ export default {
18
20
  PostgrestFilterBuilder,
19
21
  PostgrestTransformBuilder,
20
22
  PostgrestBuilder,
23
+ PostgrestError,
21
24
  }
22
25
  export type {
23
26
  PostgrestResponse,
@@ -25,5 +28,4 @@ export type {
25
28
  PostgrestResponseSuccess,
26
29
  PostgrestSingleResponse,
27
30
  PostgrestMaybeSingleResponse,
28
- PostgrestError,
29
31
  } from './types'
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.1'
1
+ export const version = '1.16.3'