@feathersjs/rest-client 5.0.39 → 6.0.0-pre.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,61 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 6.0.0-pre.0 (2026-01-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Change this reference in client libraries to explicitly passed app ([#1597](https://github.com/feathersjs/feathers/issues/1597)) ([4e4d10a](https://github.com/feathersjs/feathers/commit/4e4d10a4531db1b69ee1ea7e0df8c199a98b6f49))
11
+ - **client:** Add underscored methods to clients ([#3176](https://github.com/feathersjs/feathers/issues/3176)) ([f3c01f7](https://github.com/feathersjs/feathers/commit/f3c01f7b8266bfc642c55b77ba8e5bb333542630))
12
+ - **client:** Replace placeholders in URL with route params ([#3270](https://github.com/feathersjs/feathers/issues/3270)) ([a0624eb](https://github.com/feathersjs/feathers/commit/a0624eb5a7919aa1b179a71beb1c1b9cab574525))
13
+ - **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
14
+ - **core:** Improve hook missing parameter message by adding the service name ([#1703](https://github.com/feathersjs/feathers/issues/1703)) ([2331c2a](https://github.com/feathersjs/feathers/commit/2331c2a3dd70d432db7d62a76ed805d359cbbba5))
15
+ - **core:** Update to latest feathersjs/hooks ([#3434](https://github.com/feathersjs/feathers/issues/3434)) ([1499ccc](https://github.com/feathersjs/feathers/commit/1499ccc41fb3ebba97b2c84e0cb19bc48ad3c651))
16
+ - **dependencies:** Fix transport-commons dependency and update other dependencies ([#2284](https://github.com/feathersjs/feathers/issues/2284)) ([05b03b2](https://github.com/feathersjs/feathers/commit/05b03b27b40604d956047e3021d8053c3a137616))
17
+ - **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
18
+ - **dependencies:** Update all dependencies ([#3139](https://github.com/feathersjs/feathers/issues/3139)) ([f24276e](https://github.com/feathersjs/feathers/commit/f24276e9a909e2e58a0730c730258ce1f70f4028))
19
+ - **dependencies:** Update all dependencies ([#3545](https://github.com/feathersjs/feathers/issues/3545)) ([221b92b](https://github.com/feathersjs/feathers/commit/221b92bb0ee5d54fb1036742968797cb02e56da2))
20
+ - **dependencies:** Update all dependencies ([#3625](https://github.com/feathersjs/feathers/issues/3625)) ([2698e4e](https://github.com/feathersjs/feathers/commit/2698e4e2996fbf479d82435938d907bc3d5b583a))
21
+ - **dependencies:** Update dependencies ([#3571](https://github.com/feathersjs/feathers/issues/3571)) ([ad611cb](https://github.com/feathersjs/feathers/commit/ad611cb6ffb1dc31d603ba5817331318c5a23217))
22
+ - **express:** Ensure Express options can be set before configuring REST transport ([#2655](https://github.com/feathersjs/feathers/issues/2655)) ([c9b8f74](https://github.com/feathersjs/feathers/commit/c9b8f74a0196acb99be44ac5e0fff3f1128288cd))
23
+ - **knex:** Update all dependencies and Knex peer ([#3308](https://github.com/feathersjs/feathers/issues/3308)) ([d2f9860](https://github.com/feathersjs/feathers/commit/d2f986036c4741cce2339d8abbcc6b2eb037a12a))
24
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/99748032a6571a792883be31ec955a749629d0da))
25
+ - Make sure all Readme files are up to date ([#3154](https://github.com/feathersjs/feathers/issues/3154)) ([a5f0b38](https://github.com/feathersjs/feathers/commit/a5f0b38bbf2a11486415a39533bcc6c67fb51e3e))
26
+ - **rest-client:** Allow to customize getting the query ([#1594](https://github.com/feathersjs/feathers/issues/1594)) ([5f21272](https://github.com/feathersjs/feathers/commit/5f212729849414c4da6f0d51edd1986feca992ee))
27
+ - **rest-client:** Handle non-JSON errors with fetch adapter ([#2086](https://github.com/feathersjs/feathers/issues/2086)) ([e24217a](https://github.com/feathersjs/feathers/commit/e24217ad1e784ad71cd9d64fe1727dd02f039991))
28
+ - **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
29
+ - **typescript:** Overall typing improvements ([#2478](https://github.com/feathersjs/feathers/issues/2478)) ([b8eb804](https://github.com/feathersjs/feathers/commit/b8eb804158556d9651a8607e3c3fda15e0bfd110))
30
+ - Update adapter common tests ([#1135](https://github.com/feathersjs/feathers/issues/1135)) ([8166dda](https://github.com/feathersjs/feathers/commit/8166ddad144350f224d0fd9fc66084d28706326c))
31
+ - Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00776f7301d9349e6d652656ee80b1cb556))
32
+ - Update all dependencies ([#3024](https://github.com/feathersjs/feathers/issues/3024)) ([283dc47](https://github.com/feathersjs/feathers/commit/283dc4798d85584bc031e6e54b83b4ea77d1edd0))
33
+ - Update all dependencies ([#3613](https://github.com/feathersjs/feathers/issues/3613)) ([5136bbd](https://github.com/feathersjs/feathers/commit/5136bbd2e2eeb4e6579e07c9e914006629542363))
34
+ - Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f62d0f338fb59bd0d39952d99c2904a0c3f))
35
+ - Update dependencies ([#3584](https://github.com/feathersjs/feathers/issues/3584)) ([119fa4e](https://github.com/feathersjs/feathers/commit/119fa4e1ade8b0078aa235083d566e2538b3a084))
36
+ - Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7ff7b0f9f94aa6fa8e29d0c816469c9b8ab))
37
+ - Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
38
+ - Use `export =` in TypeScript definitions ([#1285](https://github.com/feathersjs/feathers/issues/1285)) ([12d0f4b](https://github.com/feathersjs/feathers/commit/12d0f4b9e4ce5d6771163a41ebe58cf83af342c7))
39
+
40
+ ### Features
41
+
42
+ - **adapter-commons:** Add support for params.adapter option and move memory adapter to @feathersjs/memory ([#2367](https://github.com/feathersjs/feathers/issues/2367)) ([a43e7da](https://github.com/feathersjs/feathers/commit/a43e7da22b6b981a96d1321736ea9a0cb924fb4f))
43
+ - Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd671301ae0463968ade0f6eb0c82356adcc89d))
44
+ - Authentication v3 core server implementation ([#1205](https://github.com/feathersjs/feathers/issues/1205)) ([1bd7591](https://github.com/feathersjs/feathers/commit/1bd7591548da58c1c0facb2a733ce32524743ff3))
45
+ - **cli:** Add typed client to a generated app ([#2669](https://github.com/feathersjs/feathers/issues/2669)) ([5b801b5](https://github.com/feathersjs/feathers/commit/5b801b5017ddc3eaa95622b539f51d605916bc86))
46
+ - **client:** Improve client side custom method support ([#2654](https://github.com/feathersjs/feathers/issues/2654)) ([c138acf](https://github.com/feathersjs/feathers/commit/c138acf50affbe6b66177d084d3c7a3e9220f09f))
47
+ - **core:** Allow to unregister services at runtime ([#2756](https://github.com/feathersjs/feathers/issues/2756)) ([d16601f](https://github.com/feathersjs/feathers/commit/d16601f2277dca5357866ffdefba2a611f6dc7fa))
48
+ - **core:** Public custom service methods ([#2270](https://github.com/feathersjs/feathers/issues/2270)) ([e65abfb](https://github.com/feathersjs/feathers/commit/e65abfb5388df6c19a11c565cf1076a29f32668d))
49
+ - ES module v5 compatibility layer for v6 ([#3607](https://github.com/feathersjs/feathers/issues/3607)) ([1dfff88](https://github.com/feathersjs/feathers/commit/1dfff8832eedca895eeaafd7f3acf0f8a27be23c))
50
+ - **express, koa:** make transports similar ([#2486](https://github.com/feathersjs/feathers/issues/2486)) ([26aa937](https://github.com/feathersjs/feathers/commit/26aa937c114fb8596dfefc599b1f53cead69c159))
51
+ - Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
52
+ - **generators:** Move core code generators to shared generators package ([#2982](https://github.com/feathersjs/feathers/issues/2982)) ([0328d22](https://github.com/feathersjs/feathers/commit/0328d2292153870bc43958f73d2c6f288a8cec17))
53
+ - **rest-client:** Allow for customising rest clients ([#1780](https://github.com/feathersjs/feathers/issues/1780)) ([c5cfec7](https://github.com/feathersjs/feathers/commit/c5cfec7a4aafcaffaab0cdacb9b5d297ff20320f))
54
+ - **typescript:** Improve adapter typings ([#2605](https://github.com/feathersjs/feathers/issues/2605)) ([3b2ca0a](https://github.com/feathersjs/feathers/commit/3b2ca0a6a8e03e8390272c4d7e930b4bffdaacf5))
55
+ - **typescript:** Improve params and query typeability ([#2600](https://github.com/feathersjs/feathers/issues/2600)) ([df28b76](https://github.com/feathersjs/feathers/commit/df28b7619161f1df5e700326f52cca1a92dc5d28))
56
+
57
+ ### BREAKING CHANGES
58
+
59
+ - All packages are now ES modules only
60
+
6
61
  ## [5.0.39](https://github.com/feathersjs/feathers/compare/v5.0.38...v5.0.39) (2026-01-31)
7
62
 
8
63
  **Note:** Version bump only for package @feathersjs/rest-client
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024 Feathers Contributors
3
+ Copyright (c) 2025 Feathers Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
package/README.md CHANGED
@@ -18,6 +18,6 @@ Refer to the [Feathers REST client API documentation](https://feathersjs.com/api
18
18
 
19
19
  ## License
20
20
 
21
- Copyright (c) 2024 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
21
+ Copyright (c) 2025 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
22
22
 
23
23
  Licensed under the [MIT license](LICENSE).
package/lib/axios.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Params } from '@feathersjs/feathers';
2
- import { Base, RestClientParams } from './base';
1
+ import type { Params } from '@feathersjs/feathers';
2
+ import { Base, RestClientParams } from './base.js';
3
3
  export declare class AxiosClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<T, D, P> {
4
4
  request(options: any, params: RestClientParams): any;
5
5
  }
package/lib/axios.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AxiosClient = void 0;
4
- const base_1 = require("./base");
5
- class AxiosClient extends base_1.Base {
1
+ import { Base } from './base.js';
2
+ export class AxiosClient extends Base {
6
3
  request(options, params) {
7
4
  const config = Object.assign({
8
5
  url: options.url,
@@ -21,5 +18,4 @@ class AxiosClient extends base_1.Base {
21
18
  });
22
19
  }
23
20
  }
24
- exports.AxiosClient = AxiosClient;
25
21
  //# sourceMappingURL=axios.js.map
package/lib/axios.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"axios.js","sourceRoot":"","sources":["../src/axios.ts"],"names":[],"mappings":";;;AACA,iCAA+C;AAE/C,MAAa,WAA0E,SAAQ,WAAa;IAC1G,OAAO,CAAC,OAAY,EAAE,MAAwB;QAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAC1B;YACE,GAAG,EAAE,OAAO,CAAC,GAAG;YA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MAAM,CAAC;aACf,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;aAC5B,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;YACpB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAA;YAExC,MAAM,QAAQ,YAAY,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAA;QACxE,CAAC,CAAC,CAAA;IACN,CAAC;CACF"}
package/lib/base.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Params, Id, Query, NullableId, ServiceInterface } from '@feathersjs/feathers';
1
+ import type { Params, Id, Query, NullableId, ServiceInterface } from '@feathersjs/feathers';
2
2
  export interface RestClientParams extends Params {
3
3
  connection?: any;
4
4
  }
package/lib/base.js CHANGED
@@ -1,21 +1,15 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Base = void 0;
7
- const qs_1 = __importDefault(require("qs"));
8
- const errors_1 = require("@feathersjs/errors");
9
- const commons_1 = require("@feathersjs/commons");
1
+ import qs from 'qs';
2
+ import { Unavailable, convert } from '@feathersjs/errors';
3
+ import { _, stripSlashes } from '@feathersjs/commons';
10
4
  function toError(error) {
11
5
  if (error.code === 'ECONNREFUSED') {
12
- throw new errors_1.Unavailable(error.message, commons_1._.pick(error, 'address', 'port', 'config'));
6
+ throw new Unavailable(error.message, _.pick(error, 'address', 'port', 'config'));
13
7
  }
14
- throw (0, errors_1.convert)(error);
8
+ throw convert(error);
15
9
  }
16
- class Base {
10
+ export class Base {
17
11
  constructor(settings) {
18
- this.name = (0, commons_1.stripSlashes)(settings.name);
12
+ this.name = stripSlashes(settings.name);
19
13
  this.options = settings.options;
20
14
  this.connection = settings.connection;
21
15
  this.base = `${settings.base}/${this.name}`;
@@ -35,7 +29,7 @@ class Base {
35
29
  }
36
30
  getQuery(query) {
37
31
  if (Object.keys(query).length !== 0) {
38
- const queryString = qs_1.default.stringify(query);
32
+ const queryString = qs.stringify(query);
39
33
  return `?${queryString}`;
40
34
  }
41
35
  return '';
@@ -136,5 +130,4 @@ class Base {
136
130
  return this._remove(id, params);
137
131
  }
138
132
  }
139
- exports.Base = Base;
140
133
  //# sourceMappingURL=base.js.map
package/lib/base.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AAEnB,+CAAyD;AACzD,iDAAqD;AAErD,SAAS,OAAO,CAAC,KAA+B;IAC9C,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QAClC,MAAM,IAAI,oBAAW,CAAC,KAAK,CAAC,OAAO,EAAE,WAAC,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;IAClF,CAAC;IAED,MAAM,IAAA,gBAAO,EAAC,KAAK,CAAC,CAAA;AACtB,CAAC;AAaD,MAAsB,IAAI;IAUxB,YAAY,QAA4B;QACtC,IAAI,CAAC,IAAI,GAAG,IAAA,sBAAY,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;QAC/B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAA;QACrC,IAAI,CAAC,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,CAAC,KAAY,EAAE,EAA2B,EAAE,KAAiC;QAClF,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAA;QAEnB,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CA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ch.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Params } from '@feathersjs/feathers';
2
- import { Base, RestClientParams } from './base';
1
+ import type { Params } from '@feathersjs/feathers';
2
+ import { Base, RestClientParams } from './base.js';
3
3
  export declare class FetchClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<T, D, P> {
4
4
  request(options: any, params: RestClientParams): any;
5
5
  checkStatus(response: any): any;
package/lib/fetch.js CHANGED
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FetchClient = void 0;
4
- const errors_1 = require("@feathersjs/errors");
5
- const base_1 = require("./base");
6
- class FetchClient extends base_1.Base {
1
+ import { errors } from '@feathersjs/errors';
2
+ import { Base } from './base.js';
3
+ export class FetchClient extends Base {
7
4
  request(options, params) {
8
5
  const fetchOptions = Object.assign({}, options, params.connection);
9
6
  fetchOptions.headers = Object.assign({
@@ -28,7 +25,7 @@ class FetchClient extends base_1.Base {
28
25
  return response
29
26
  .json()
30
27
  .catch(() => {
31
- const ErrorClass = errors_1.errors[response.status] || Error;
28
+ const ErrorClass = errors[response.status] || Error;
32
29
  return new ErrorClass('JSON parsing error');
33
30
  })
34
31
  .then((error) => {
@@ -37,5 +34,4 @@ class FetchClient extends base_1.Base {
37
34
  });
38
35
  }
39
36
  }
40
- exports.FetchClient = FetchClient;
41
37
  //# sourceMappingURL=fetch.js.map
package/lib/fetch.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAE3C,iCAA+C;AAE/C,MAAa,WAA0E,SAAQ,WAAa;IAC1G,OAAO,CAAC,OAAY,EAAE,MAAwB;QAC5C,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;QAElE,YAAY,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,C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AC,CAAA;IACN,CAAC;CACF"}
package/lib/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { TransportConnection } from '@feathersjs/feathers';
2
- import { Base } from './base';
3
- import { AxiosClient } from './axios';
4
- import { FetchClient } from './fetch';
5
- import { SuperagentClient } from './superagent';
1
+ import type { TransportConnection } from '@feathersjs/feathers';
2
+ import { Base } from './base.js';
3
+ import { AxiosClient } from './axios.js';
4
+ import { FetchClient } from './fetch.js';
5
+ import { SuperagentClient } from './superagent.js';
6
6
  export { AxiosClient, FetchClient, SuperagentClient };
7
7
  export type Handler<ServiceTypes> = (connection: any, options?: any, Service?: any) => TransportConnection<ServiceTypes>;
8
8
  export interface Transport<ServiceTypes> {
package/lib/index.js CHANGED
@@ -1,22 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuperagentClient = exports.FetchClient = exports.AxiosClient = void 0;
4
- exports.default = restClient;
5
- const feathers_1 = require("@feathersjs/feathers");
6
- const base_1 = require("./base");
7
- const axios_1 = require("./axios");
8
- Object.defineProperty(exports, "AxiosClient", { enumerable: true, get: function () { return axios_1.AxiosClient; } });
9
- const fetch_1 = require("./fetch");
10
- Object.defineProperty(exports, "FetchClient", { enumerable: true, get: function () { return fetch_1.FetchClient; } });
11
- const superagent_1 = require("./superagent");
12
- Object.defineProperty(exports, "SuperagentClient", { enumerable: true, get: function () { return superagent_1.SuperagentClient; } });
1
+ import { defaultServiceMethods } from '@feathersjs/feathers';
2
+ import { Base } from './base.js';
3
+ import { AxiosClient } from './axios.js';
4
+ import { FetchClient } from './fetch.js';
5
+ import { SuperagentClient } from './superagent.js';
6
+ export { AxiosClient, FetchClient, SuperagentClient };
13
7
  const transports = {
14
- superagent: superagent_1.SuperagentClient,
15
- fetch: fetch_1.FetchClient,
16
- axios: axios_1.AxiosClient
8
+ superagent: SuperagentClient,
9
+ fetch: FetchClient,
10
+ axios: AxiosClient
17
11
  };
18
- function restClient(base = '') {
19
- const result = { Base: base_1.Base };
12
+ export default function restClient(base = '') {
13
+ const result = { Base };
20
14
  Object.keys(transports).forEach((key) => {
21
15
  result[key] = function (connection, options = {}, Service = transports[key]) {
22
16
  if (!connection) {
@@ -36,8 +30,8 @@ function restClient(base = '') {
36
30
  app.rest = connection;
37
31
  app.defaultService = defaultService;
38
32
  app.mixins.unshift((service, _location, options) => {
39
- if (options && options.methods && service instanceof base_1.Base) {
40
- const customMethods = options.methods.filter((name) => !feathers_1.defaultServiceMethods.includes(name));
33
+ if (options && options.methods && service instanceof Base) {
34
+ const customMethods = options.methods.filter((name) => !defaultServiceMethods.includes(name));
41
35
  service.methods(...customMethods);
42
36
  }
43
37
  });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA6BA,6BA0CC;AAvED,mDAA8F;AAE9F,iCAA6B;AAC7B,mCAAqC;AAI5B,4FAJA,mBAAW,OAIA;AAHpB,mCAAqC;AAGf,4FAHb,mBAAW,OAGa;AAFjC,6CAA+C;AAEZ,iGAF1B,6BAAgB,OAE0B;AAEnD,MAAM,UAAU,GAAG;IACjB,UAAU,EAAE,6BAAgB;IAC5B,KAAK,EAAE,mBAAW;IAClB,KAAK,EAAE,mBAAW;CACnB,CAAA;AAgBD,SAAwB,UAAU,CAAqB,IAAI,GAAG,EAAE;IAC9D,MAAM,MAAM,GAAQ,EAAE,IAAI,EAAJ,WAAI,EAAE,CAAA;IAE5B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACtC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,UAAe,EAAE,UAAe,EAAE,EAAE,UAAiB,UAAkB,CAAC,GAAG,CAAC;YAClG,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,sCAAsC,CAAC,CAAA;YAC/D,CAAC;YAED,IAAI,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,CAAA;YAED,MAAM,UAAU,GAAG,CAAC,GAAgC,EAAE,EAAE;gBACtD,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC3B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAA;gBACvE,CAAC;gBAED,GAAG,CAAC,IAAI,GAAG,UAAU,CAAA;gBACrB,GAAG,CAAC,cAAc,GAAG,cAAc,CAAA;gBACnC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;oBACjD,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,YAAY,IAAI,EAAE,CAAC;wBAC1D,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;wBAE7F,OAAO,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,CAAA;oBACnC,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC,CAAA;YAED,UAAU,CAAC,OAAO,GAAG,OAAO,CAAA;YAC5B,UAAU,CAAC,OAAO,GAAG,cAAc,CAAA;YAEnC,OAAO,UAAU,CAAA;QACnB,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,MAAiC,CAAA;AAC1C,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;AAC5D,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Params } from '@feathersjs/feathers';
2
- import { Base, RestClientParams } from './base';
1
+ import type { Params } from '@feathersjs/feathers';
2
+ import { Base, RestClientParams } from './base.js';
3
3
  export declare class SuperagentClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<T, D, P> {
4
4
  request(options: any, params: RestClientParams): Promise<unknown>;
5
5
  }
package/lib/superagent.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuperagentClient = void 0;
4
- const base_1 = require("./base");
5
- class SuperagentClient extends base_1.Base {
1
+ import { Base } from './base.js';
2
+ export class SuperagentClient extends Base {
6
3
  request(options, params) {
7
4
  const superagent = this.connection(options.method, options.url)
8
5
  .set(this.options.headers || {})
@@ -30,5 +27,4 @@ class SuperagentClient extends base_1.Base {
30
27
  });
31
28
  }
32
29
  }
33
- exports.SuperagentClient = SuperagentClient;
34
30
  //# sourceMappingURL=superagent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"superagent.js","sourceRoot":"","sources":["../src/superagent.ts"],"names":[],"mappings":";;;AACA,iCAA+C;AAE/C,MAAa,gBAA+E,SAAQ,WAInG;IACC,OAAO,CAAC,OAAY,EAAE,MAAwB;QAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC;aAC5D,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;aAC/B,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC;aACjC,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;aAC5B,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;aAC1B,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,CAAA;QAE/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;YAE/B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC/B,CAAC;YAED,UAAU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,CAAA;YAE/B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC/B,CAAC;YAED,UAAU,CAAC,GAAG,CAAC,UAAU,KAAU,EAAE,GAAQ;gBAC3C,IAAI,KAAK,EAAE,CAAC;oBACV,IAAI,CAAC;wBACH,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;wBAC/B,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;wBACvC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;oBAC3B,CAAC;oBAAC,OAAO,CAAM,EAAE,CAAC,CAAA,CAAC;oBAEnB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;gBACtB,CAAC;gBAED,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA;YAC1B,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@feathersjs/rest-client",
3
3
  "description": "REST client services for different Ajax libraries",
4
- "version": "5.0.39",
4
+ "version": "6.0.0-pre.0",
5
5
  "homepage": "https://feathersjs.com",
6
- "main": "lib/",
7
- "types": "lib/",
6
+ "main": "lib/index.js",
7
+ "type": "module",
8
8
  "keywords": [
9
9
  "feathers",
10
10
  "feathers-plugin"
@@ -29,7 +29,7 @@
29
29
  "url": "https://github.com/feathersjs/feathers/issues"
30
30
  },
31
31
  "engines": {
32
- "node": ">= 12"
32
+ "node": ">= 20"
33
33
  },
34
34
  "files": [
35
35
  "CHANGELOG.md",
@@ -53,28 +53,26 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@feathersjs/commons": "^5.0.39",
57
- "@feathersjs/errors": "^5.0.39",
58
- "@feathersjs/feathers": "^5.0.39",
56
+ "@feathersjs/commons": "^6.0.0-pre.0",
57
+ "@feathersjs/errors": "^6.0.0-pre.0",
58
+ "@feathersjs/feathers": "^6.0.0-pre.0",
59
59
  "@types/superagent": "^8.1.9",
60
60
  "qs": "^6.14.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@feathersjs/express": "^5.0.39",
64
- "@feathersjs/memory": "^5.0.39",
65
- "@feathersjs/tests": "^5.0.39",
63
+ "@feathersjs/express": "^6.0.0-pre.0",
64
+ "@feathersjs/memory": "^6.0.0-pre.0",
65
+ "@feathersjs/tests": "^6.0.0-pre.0",
66
66
  "@types/mocha": "^10.0.10",
67
67
  "@types/node": "^25.1.0",
68
- "@types/node-fetch": "^2.6.13",
69
68
  "@types/qs": "^6.14.0",
70
69
  "axios": "^1.13.4",
71
70
  "mocha": "^11.7.5",
72
- "node-fetch": "^2.6.1",
73
71
  "rxjs": "^7.8.2",
74
72
  "shx": "^0.4.0",
75
73
  "superagent": "^10.3.0",
76
74
  "ts-node": "^10.9.2",
77
75
  "typescript": "^5.9.3"
78
76
  },
79
- "gitHead": "e4c0dac68b00615c7bc4724871375a14863a2447"
77
+ "gitHead": "8fad4bb3d393794fb98fa5fe7cfc327661fedbd2"
80
78
  }
package/src/axios.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Params } from '@feathersjs/feathers'
2
- import { Base, RestClientParams } from './base'
1
+ import type { Params } from '@feathersjs/feathers'
2
+ import { Base, RestClientParams } from './base.js'
3
3
 
4
4
  export class AxiosClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<T, D, P> {
5
5
  request(options: any, params: RestClientParams) {
package/src/base.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import qs from 'qs'
2
- import { Params, Id, Query, NullableId, ServiceInterface } from '@feathersjs/feathers'
2
+ import type { Params, Id, Query, NullableId, ServiceInterface } from '@feathersjs/feathers'
3
3
  import { Unavailable, convert } from '@feathersjs/errors'
4
4
  import { _, stripSlashes } from '@feathersjs/commons'
5
5
 
package/src/fetch.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { errors } from '@feathersjs/errors'
2
- import { Params } from '@feathersjs/feathers'
3
- import { Base, RestClientParams } from './base'
2
+ import type { Params } from '@feathersjs/feathers'
3
+ import { Base, RestClientParams } from './base.js'
4
4
 
5
5
  export class FetchClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<T, D, P> {
6
6
  request(options: any, params: RestClientParams) {
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Application, TransportConnection, defaultServiceMethods } from '@feathersjs/feathers'
2
-
3
- import { Base } from './base'
4
- import { AxiosClient } from './axios'
5
- import { FetchClient } from './fetch'
6
- import { SuperagentClient } from './superagent'
1
+ import type { Application, TransportConnection } from '@feathersjs/feathers'
2
+ import { defaultServiceMethods } from '@feathersjs/feathers'
3
+ import { Base } from './base.js'
4
+ import { AxiosClient } from './axios.js'
5
+ import { FetchClient } from './fetch.js'
6
+ import { SuperagentClient } from './superagent.js'
7
7
 
8
8
  export { AxiosClient, FetchClient, SuperagentClient }
9
9
 
package/src/superagent.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Params } from '@feathersjs/feathers'
2
- import { Base, RestClientParams } from './base'
1
+ import type { Params } from '@feathersjs/feathers'
2
+ import { Base, RestClientParams } from './base.js'
3
3
 
4
4
  export class SuperagentClient<T = any, D = Partial<T>, P extends Params = RestClientParams> extends Base<
5
5
  T,