@feathersjs/feathers 5.0.0-pre.30 → 5.0.0-pre.32
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 +16 -0
- package/README.md +4 -6
- package/lib/declarations.d.ts +9 -3
- package/lib/service.js +1 -1
- package/lib/service.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/declarations.ts +10 -3
- package/src/service.ts +2 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
# [5.0.0-pre.32](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.31...v5.0.0-pre.32) (2022-10-26)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **docs:** Review transport API docs and update Express middleware setup ([#2811](https://github.com/feathersjs/feathers/issues/2811)) ([1b97f14](https://github.com/feathersjs/feathers/commit/1b97f14d474f5613482f259eeaa585c24fcfab43))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **docs:** New website and documentation pages ([#2802](https://github.com/feathersjs/feathers/issues/2802)) ([ae85fa2](https://github.com/feathersjs/feathers/commit/ae85fa216f12f7ff5d15e7039640e27a09989ea4))
|
|
15
|
+
|
|
16
|
+
# [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **cli:** Generate full client test suite and improve typed client ([#2788](https://github.com/feathersjs/feathers/issues/2788)) ([57119b6](https://github.com/feathersjs/feathers/commit/57119b6bb2797f7297cf054268a248c093ecd538))
|
|
21
|
+
|
|
6
22
|
# [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07)
|
|
7
23
|
|
|
8
24
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -8,19 +8,17 @@
|
|
|
8
8
|
[](https://www.npmjs.com/package/@feathersjs/feathers)
|
|
9
9
|
[](https://discord.gg/qa8kez8QBx)
|
|
10
10
|
|
|
11
|
-
Feathers is a lightweight web-framework for creating real-time applications
|
|
11
|
+
Feathers is a lightweight web-framework for creating APIs and real-time applications using TypeScript or JavaScript.
|
|
12
12
|
|
|
13
|
-
Feathers can interact with any backend technology, supports
|
|
13
|
+
Feathers can interact with any backend technology, supports many databases out of the box and works with any frontend technology like React, VueJS, Angular, React Native, Android or iOS.
|
|
14
14
|
|
|
15
15
|
## Getting started
|
|
16
16
|
|
|
17
17
|
You can build your first real-time and REST API in just 4 commands:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
$ npm
|
|
21
|
-
$
|
|
22
|
-
$ cd my-new-app/
|
|
23
|
-
$ feathers generate app
|
|
20
|
+
$ npm init feathers my-new-app
|
|
21
|
+
$ cd my-new-app
|
|
24
22
|
$ npm start
|
|
25
23
|
```
|
|
26
24
|
|
package/lib/declarations.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ export interface Paginated<T> {
|
|
|
17
17
|
* Options that can be passed when registering a service via `app.use(name, service, options)`
|
|
18
18
|
*/
|
|
19
19
|
export interface ServiceOptions {
|
|
20
|
-
events?: string[];
|
|
21
|
-
methods?: string[];
|
|
22
|
-
serviceEvents?: string[];
|
|
20
|
+
events?: string[] | readonly string[];
|
|
21
|
+
methods?: string[] | readonly string[];
|
|
22
|
+
serviceEvents?: string[] | readonly string[];
|
|
23
23
|
routeParams?: {
|
|
24
24
|
[key: string]: any;
|
|
25
25
|
};
|
|
@@ -87,6 +87,12 @@ export declare type TransportConnection<Services = any> = {
|
|
|
87
87
|
Service: any;
|
|
88
88
|
service: <L extends keyof Services & string>(name: L) => keyof any extends keyof Services ? ServiceInterface : Services[L];
|
|
89
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* A real-time connection object
|
|
92
|
+
*/
|
|
93
|
+
export interface RealTimeConnection {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}
|
|
90
96
|
/**
|
|
91
97
|
* The interface for a custom service method. Can e.g. be used to type client side services.
|
|
92
98
|
*/
|
package/lib/service.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.defaultServiceArguments = {
|
|
|
12
12
|
patch: ['id', 'data', 'params'],
|
|
13
13
|
remove: ['id', 'params']
|
|
14
14
|
};
|
|
15
|
-
exports.defaultServiceMethods =
|
|
15
|
+
exports.defaultServiceMethods = ['find', 'get', 'create', 'update', 'patch', 'remove'];
|
|
16
16
|
exports.defaultEventMap = {
|
|
17
17
|
create: 'created',
|
|
18
18
|
update: 'updated',
|
package/lib/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";;;AAAA,mCAAqC;AACrC,iDAAkD;AAGrC,QAAA,OAAO,GAAG,IAAA,sBAAY,EAAC,qBAAqB,CAAC,CAAA;AAE7C,QAAA,uBAAuB,GAAG;IACrC,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;IACrB,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC;IAChC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB,CAAA;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";;;AAAA,mCAAqC;AACrC,iDAAkD;AAGrC,QAAA,OAAO,GAAG,IAAA,sBAAY,EA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
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "5.0.0-pre.
|
|
1
|
+
declare const _default: "5.0.0-pre.32";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/feathers",
|
|
3
3
|
"description": "A framework for real-time applications and REST API with JavaScript and TypeScript",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.32",
|
|
5
5
|
"homepage": "http://feathersjs.com",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
61
|
+
"@feathersjs/commons": "^5.0.0-pre.32",
|
|
62
62
|
"@feathersjs/hooks": "^0.7.5",
|
|
63
63
|
"events": "^3.3.0"
|
|
64
64
|
},
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"ts-node": "^10.9.1",
|
|
71
71
|
"typescript": "^4.8.4"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b405e205fc6d9fbd42b42c7a3f30ea4bf33d121d"
|
|
74
74
|
}
|
package/src/declarations.ts
CHANGED
|
@@ -20,9 +20,9 @@ export interface Paginated<T> {
|
|
|
20
20
|
* Options that can be passed when registering a service via `app.use(name, service, options)`
|
|
21
21
|
*/
|
|
22
22
|
export interface ServiceOptions {
|
|
23
|
-
events?: string[]
|
|
24
|
-
methods?: string[]
|
|
25
|
-
serviceEvents?: string[]
|
|
23
|
+
events?: string[] | readonly string[]
|
|
24
|
+
methods?: string[] | readonly string[]
|
|
25
|
+
serviceEvents?: string[] | readonly string[]
|
|
26
26
|
routeParams?: { [key: string]: any }
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -134,6 +134,13 @@ export type TransportConnection<Services = any> = {
|
|
|
134
134
|
) => keyof any extends keyof Services ? ServiceInterface : Services[L]
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* A real-time connection object
|
|
139
|
+
*/
|
|
140
|
+
export interface RealTimeConnection {
|
|
141
|
+
[key: string]: any
|
|
142
|
+
}
|
|
143
|
+
|
|
137
144
|
/**
|
|
138
145
|
* The interface for a custom service method. Can e.g. be used to type client side services.
|
|
139
146
|
*/
|
package/src/service.ts
CHANGED
|
@@ -12,8 +12,7 @@ export const defaultServiceArguments = {
|
|
|
12
12
|
patch: ['id', 'data', 'params'],
|
|
13
13
|
remove: ['id', 'params']
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
export const defaultServiceMethods = Object.keys(defaultServiceArguments)
|
|
15
|
+
export const defaultServiceMethods = ['find', 'get', 'create', 'update', 'patch', 'remove']
|
|
17
16
|
|
|
18
17
|
export const defaultEventMap = {
|
|
19
18
|
create: 'created',
|
|
@@ -29,7 +28,7 @@ export const protectedMethods = Object.keys(Object.prototype)
|
|
|
29
28
|
export function getHookMethods(service: any, options: ServiceOptions) {
|
|
30
29
|
const { methods } = options
|
|
31
30
|
|
|
32
|
-
return defaultServiceMethods
|
|
31
|
+
return (defaultServiceMethods as any as string[])
|
|
33
32
|
.filter((m) => typeof service[m] === 'function' && !methods.includes(m))
|
|
34
33
|
.concat(methods)
|
|
35
34
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '5.0.0-pre.
|
|
1
|
+
export default '5.0.0-pre.32'
|