Skip to content

Commit ef1f69f

Browse files
authored
Add TypeScript typings (#159)
1 parent 37bbbc4 commit ef1f69f

9 files changed

Lines changed: 1432 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
node-version: [13.x,15.x]
8+
node-version: [15.x]
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: Use Node.js ${{ matrix.node-version }}

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@
66

77
> Synchronize service events between application instances
88
9+
<!-- TOC -->
10+
11+
- [Feathers sync](#feathers-sync)
12+
- [About](#about)
13+
- [Usage](#usage)
14+
- [`app.sync`](#appsync)
15+
- [Disabling synchronization](#disabling-synchronization)
16+
- [Adapters](#adapters)
17+
- [Redis](#redis)
18+
- [AMQP](#amqp)
19+
- [NATS](#nats)
20+
- [How it works](#how-it-works)
21+
- [Caveat: Listening to service events](#caveat-listening-to-service-events)
22+
- [Custom Serializer / Deserializer](#custom-serializer--deserializer)
23+
- [Writing custom adapters](#writing-custom-adapters)
24+
- [License](#license)
25+
26+
<!-- /TOC -->
27+
928
## About
1029

1130
When running multiple instances of your Feathers application (e.g. on several Heroku Dynos), service events (`created`, `updated`, `patched`, `removed` and any custom defined events) do not get propagated to other instances.
@@ -189,6 +208,6 @@ The `data` for the `sync-in` event should be in the same form as the one that is
189208

190209
## License
191210

192-
Copyright (c) 2019 Feathers contributors
211+
Copyright (c) 2021 Feathers contributors
193212

194213
Licensed under the [MIT license](LICENSE).

lib/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ const adaptors = {
1212
};
1313

1414
const { SYNC } = core;
15-
16-
module.exports = options => {
15+
const init = options => {
1716
const { uri, deserialize, serialize } = options;
1817

1918
if (!uri) {
@@ -45,4 +44,9 @@ module.exports = options => {
4544
});
4645
};
4746

48-
Object.assign(module.exports, adaptors, { SYNC });
47+
module.exports = init;
48+
49+
Object.assign(module.exports, adaptors, {
50+
default: init,
51+
SYNC
52+
});

0 commit comments

Comments
 (0)