Skip to content

Commit a52b56b

Browse files
committed
Add skeleton for high performance websocket transport
1 parent 7efa8c7 commit a52b56b

File tree

6 files changed

+127
-0
lines changed

6 files changed

+127
-0
lines changed

packages/ws/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Feathers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

packages/ws/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# @feathersjs/ws
2+
3+
[![CI](https://github.com/feathersjs/feathers/workflows/CI/badge.svg)](https://github.com/feathersjs/feathers/actions?query=workflow%3ACI)
4+
[![Dependency Status](https://img.shields.io/david/feathersjs/feathers.svg?style=flat-square&path=packages/ws)](https://david-dm.org/feathersjs/feathers?path=packages/ws)
5+
[![Download Status](https://img.shields.io/npm/dm/@feathersjs/ws.svg?style=flat-square)](https://www.npmjs.com/package/@feathersjs/ws)
6+
7+
> A high performance Feathers websocket transport
8+
9+
## Installation
10+
11+
```
12+
npm install @feathersjs/ws --save
13+
```
14+
15+
## Documentation
16+
17+
Refer to the [Feathers documentation](https://docs.feathersjs.com) for more details.
18+
19+
## License
20+
21+
Copyright (c) 2021 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
22+
23+
Licensed under the [MIT license](LICENSE).

packages/ws/package.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "@feathersjs/ws",
3+
"description": "A high performance Feathers websocket transport",
4+
"version": "0.0.0",
5+
"homepage": "https://feathersjs.com",
6+
"main": "lib/",
7+
"keywords": [
8+
"feathers",
9+
"feathers-plugin"
10+
],
11+
"license": "MIT",
12+
"funding": {
13+
"type": "github",
14+
"url": "https://github.com/sponsors/daffl"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git://github.com/feathersjs/feathers.git"
19+
},
20+
"author": {
21+
"name": "Feathers contributors",
22+
"email": "hello@feathersjs.com",
23+
"url": "https://feathersjs.com"
24+
},
25+
"contributors": [],
26+
"bugs": {
27+
"url": "https://github.com/feathersjs/feathers/issues"
28+
},
29+
"engines": {
30+
"node": ">= 12"
31+
},
32+
"files": [
33+
"CHANGELOG.md",
34+
"LICENSE",
35+
"README.md",
36+
"src/**",
37+
"lib/**",
38+
"*.d.ts",
39+
"*.js"
40+
],
41+
"scripts": {
42+
"prepublish": "npm run compile",
43+
"compile": "shx rm -rf lib/ && tsc",
44+
"test": "mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
45+
},
46+
"directories": {
47+
"lib": "lib"
48+
},
49+
"publishConfig": {
50+
"access": "public"
51+
},
52+
"dependencies": {
53+
},
54+
"devDependencies": {
55+
"@types/mocha": "^9.0.0",
56+
"@types/node": "^16.9.4",
57+
"mocha": "^9.1.1",
58+
"shx": "^0.3.3",
59+
"ts-node": "^10.2.1",
60+
"typescript": "^4.4.3"
61+
}
62+
}

packages/ws/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function hello () {
2+
return 'Hello';
3+
}

packages/ws/test/index.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import assert from 'assert';
2+
import { hello } from '../src';
3+
4+
describe('@feathersjs/ws', () => {
5+
it('initializes', async () => {
6+
assert.strictEqual(hello(), 'Hello');
7+
});
8+
});

packages/ws/tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig",
3+
"include": [
4+
"src/**/*.ts"
5+
],
6+
"compilerOptions": {
7+
"outDir": "lib"
8+
}
9+
}

0 commit comments

Comments
 (0)