@proteinjs/event 1.0.1
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/.eslintrc.js +20 -0
- package/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/CHANGELOG.md +141 -0
- package/LICENSE +21 -0
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +27 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/src/DefaultSocketIOServerFactory.d.ts +9 -0
- package/dist/src/DefaultSocketIOServerFactory.d.ts.map +1 -0
- package/dist/src/DefaultSocketIOServerFactory.js +9 -0
- package/dist/src/DefaultSocketIOServerFactory.js.map +1 -0
- package/generated/index.ts +19 -0
- package/index.ts +1 -0
- package/jest.config.js +9 -0
- package/package.json +40 -0
- package/src/DefaultSocketIOServerFactory.ts +10 -0
- package/tsconfig.json +17 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'prettier'],
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
plugins: ['@typescript-eslint', 'prettier'],
|
|
5
|
+
root: true,
|
|
6
|
+
ignorePatterns: ['**/dist/*', '**/node_modules/*', '*.md'],
|
|
7
|
+
|
|
8
|
+
rules: {
|
|
9
|
+
'prettier/prettier': ['warn'],
|
|
10
|
+
curly: ['warn'],
|
|
11
|
+
'eol-last': ['warn', 'always'],
|
|
12
|
+
'keyword-spacing': ['warn', { before: true }],
|
|
13
|
+
'no-undef': 'off',
|
|
14
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
15
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
16
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
17
|
+
'@typescript-eslint/prefer-as-const': 'off',
|
|
18
|
+
'@typescript-eslint/ban-types': 'off',
|
|
19
|
+
},
|
|
20
|
+
};
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## 1.0.1 (2024-08-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @proteinjs/event
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.5.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.4.3...@proteinjs/server-api@1.5.0) (2024-08-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add static options to server config ([d00ef75](https://github.com/brentbahry/server/commit/d00ef753af82cdca466d6bf8b273633283a7a20a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.4.2](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.4.1...@proteinjs/server-api@1.4.2) (2024-08-16)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [1.4.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.3.5...@proteinjs/server-api@1.4.0) (2024-08-02)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* added `StartupTask` ([d66616a](https://github.com/brentbahry/server/commit/d66616a2696c001c8ebef6828d319af6aeba245c))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [1.3.5](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.3.4...@proteinjs/server-api@1.3.5) (2024-07-20)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [1.3.2](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.3.1...@proteinjs/server-api@1.3.2) (2024-07-06)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# [1.3.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.2.1...@proteinjs/server-api@1.3.0) (2024-05-25)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* add feature flag abstract class ([addc243](https://github.com/brentbahry/server/commit/addc243c5f0ea4b3191f5af609cf7b34a6a9f2d6))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [1.2.1](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.2.0...@proteinjs/server-api@1.2.1) (2024-05-18)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
* global getDataByKey using wrong object to get cache ([31d9c2a](https://github.com/brentbahry/server/commit/31d9c2ae4ffa6d4b12559a091e52c68482d3d4c6))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# [1.2.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.1.5...@proteinjs/server-api@1.2.0) (2024-05-18)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
* create global data storage and cache ([52725b5](https://github.com/brentbahry/server/commit/52725b52820ae51022ef5a8132e44104e63193a9))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## [1.1.5](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.1.4...@proteinjs/server-api@1.1.5) (2024-05-16)
|
|
94
|
+
|
|
95
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## [1.1.3](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.1.2...@proteinjs/server-api@1.1.3) (2024-05-10)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Bug Fixes
|
|
105
|
+
|
|
106
|
+
* add .md file type to lint ignore files ([38899a8](https://github.com/brentbahry/server/commit/38899a83c80b3d6dc61049dc48916168985acf87))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## [1.1.2](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.1.1...@proteinjs/server-api@1.1.2) (2024-05-10)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
### Bug Fixes
|
|
116
|
+
|
|
117
|
+
* add linting and lint all files ([2b4e1e6](https://github.com/brentbahry/server/commit/2b4e1e6332e16328c3a3d3c846def74f819bbf39))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# [1.1.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.0.8...@proteinjs/server-api@1.1.0) (2024-05-06)
|
|
124
|
+
|
|
125
|
+
### Features
|
|
126
|
+
|
|
127
|
+
- `ServerConfig` now accepts a bundles directory instead of bundle paths (deprecated) so the server can support dynamic bundle names (ie. when you generate a hash as part of the bundle name for cache busting) ([f3d7cef](https://github.com/brentbahry/server/commit/f3d7cefd58cb0b220470e886e161fbc028ca2df9))
|
|
128
|
+
|
|
129
|
+
## [1.0.5](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.0.4...@proteinjs/server-api@1.0.5) (2024-04-24)
|
|
130
|
+
|
|
131
|
+
### Bug Fixes
|
|
132
|
+
|
|
133
|
+
- `ServerConfig` now requires a node_modules path to use hot client builds ([d0d14bd](https://github.com/brentbahry/server/commit/d0d14bda27e391ddb6493c714f5cf5220c1976fc))
|
|
134
|
+
|
|
135
|
+
## [1.0.2](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.0.1...@proteinjs/server-api@1.0.2) (2024-04-19)
|
|
136
|
+
|
|
137
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
|
138
|
+
|
|
139
|
+
## 1.0.1 (2024-04-19)
|
|
140
|
+
|
|
141
|
+
**Note:** Version bump only for package @proteinjs/server-api
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Brent Bahry
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,uBAAuB,CAAC;AAqB/B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Load Dependency Source Graphs */
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
require("@proteinjs/reflection");
|
|
19
|
+
/** Generate Source Graph */
|
|
20
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/event/DefaultSocketIOServerFactory\",\"value\":{\"packageName\":\"@proteinjs/event\",\"name\":\"DefaultSocketIOServerFactory\",\"filePath\":\"/home/runner/work/server/server/packages/event/src/DefaultSocketIOServerFactory.ts\",\"qualifiedName\":\"@proteinjs/event/DefaultSocketIOServerFactory\",\"properties\":[],\"methods\":[{\"name\":\"createSocketIOServer\",\"returnType\":{\"packageName\":\"\",\"name\":\"SocketIOServer\",\"filePath\":null,\"qualifiedName\":\"/SocketIOServer\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"httpServer\",\"type\":{\"packageName\":\"\",\"name\":\"HttpServer\",\"filePath\":null,\"qualifiedName\":\"/HttpServer\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"}],\"edges\":[{\"v\":\"@proteinjs/event/DefaultSocketIOServerFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"}]}";
|
|
21
|
+
/** Generate Source Links */
|
|
22
|
+
var sourceLinks = {};
|
|
23
|
+
/** Load Source Graph and Links */
|
|
24
|
+
var reflection_1 = require("@proteinjs/reflection");
|
|
25
|
+
reflection_1.SourceRepository.merge(sourceGraph, sourceLinks);
|
|
26
|
+
__exportStar(require("../index"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAG/B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,y3CAAy3C,CAAC;AAG94C,4BAA4B;AAG5B,IAAM,WAAW,GAAG,EACnB,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/DefaultSocketIOServerFactory"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Server as HttpServer } from 'http';
|
|
3
|
+
import type { Server as SocketIOServer } from 'socket.io';
|
|
4
|
+
import { Loadable } from '@proteinjs/reflection';
|
|
5
|
+
export declare const getDefaultSocketIOServerFactory: () => DefaultSocketIOServerFactory;
|
|
6
|
+
export interface DefaultSocketIOServerFactory extends Loadable {
|
|
7
|
+
createSocketIOServer(httpServer: HttpServer): SocketIOServer;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=DefaultSocketIOServerFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultSocketIOServerFactory.d.ts","sourceRoot":"","sources":["../../src/DefaultSocketIOServerFactory.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AAEnE,eAAO,MAAM,+BAA+B,oCACkE,CAAC;AAE/G,MAAM,WAAW,4BAA6B,SAAQ,QAAQ;IAC5D,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAAC;CAC9D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultSocketIOServerFactory = void 0;
|
|
4
|
+
var reflection_1 = require("@proteinjs/reflection");
|
|
5
|
+
var getDefaultSocketIOServerFactory = function () {
|
|
6
|
+
return reflection_1.SourceRepository.get().object('@proteinjs/event/DefaultSocketIOServerFactory');
|
|
7
|
+
};
|
|
8
|
+
exports.getDefaultSocketIOServerFactory = getDefaultSocketIOServerFactory;
|
|
9
|
+
//# sourceMappingURL=DefaultSocketIOServerFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultSocketIOServerFactory.js","sourceRoot":"","sources":["../../src/DefaultSocketIOServerFactory.ts"],"names":[],"mappings":";;;AAEA,oDAAmE;AAE5D,IAAM,+BAA+B,GAAG;IAC7C,OAAA,6BAAgB,CAAC,GAAG,EAAE,CAAC,MAAM,CAA+B,+CAA+C,CAAC;AAA5G,CAA4G,CAAC;AADlG,QAAA,+BAA+B,mCACmE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Load Dependency Source Graphs */
|
|
2
|
+
|
|
3
|
+
import '@proteinjs/reflection';
|
|
4
|
+
|
|
5
|
+
/** Generate Source Graph */
|
|
6
|
+
|
|
7
|
+
const sourceGraph =
|
|
8
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/event/DefaultSocketIOServerFactory","value":{"packageName":"@proteinjs/event","name":"DefaultSocketIOServerFactory","filePath":"/home/runner/work/server/server/packages/event/src/DefaultSocketIOServerFactory.ts","qualifiedName":"@proteinjs/event/DefaultSocketIOServerFactory","properties":[],"methods":[{"name":"createSocketIOServer","returnType":{"packageName":"","name":"SocketIOServer","filePath":null,"qualifiedName":"/SocketIOServer","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"httpServer","type":{"packageName":"","name":"HttpServer","filePath":null,"qualifiedName":"/HttpServer","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/reflection/Loadable"}],"edges":[{"v":"@proteinjs/event/DefaultSocketIOServerFactory","w":"@proteinjs/reflection/Loadable","value":"extends interface"}]}';
|
|
9
|
+
|
|
10
|
+
/** Generate Source Links */
|
|
11
|
+
|
|
12
|
+
const sourceLinks = {};
|
|
13
|
+
|
|
14
|
+
/** Load Source Graph and Links */
|
|
15
|
+
|
|
16
|
+
import { SourceRepository } from '@proteinjs/reflection';
|
|
17
|
+
SourceRepository.merge(sourceGraph, sourceLinks);
|
|
18
|
+
|
|
19
|
+
export * from '../index';
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/DefaultSocketIOServerFactory';
|
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proteinjs/event",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Event api",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/brentbahry/server.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/brentbahry/server/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/brentbahry/server#readme",
|
|
16
|
+
"author": "Brent Bahry",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rm -rf dist/ generated/ node_modules/",
|
|
20
|
+
"build": "reflection-build && tsc",
|
|
21
|
+
"watch": "reflection-watch"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@proteinjs/reflection": "1.1.9"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@proteinjs/reflection-build": "1.0.24",
|
|
28
|
+
"@types/node": "20.8.2",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
30
|
+
"@typescript-eslint/parser": "7.8.0",
|
|
31
|
+
"eslint": "8.57.0",
|
|
32
|
+
"eslint-config-prettier": "9.1.0",
|
|
33
|
+
"eslint-plugin-prettier": "5.1.3",
|
|
34
|
+
"socket.io": "4.7.5",
|
|
35
|
+
"typescript": "5.2.2"
|
|
36
|
+
},
|
|
37
|
+
"main": "./dist/generated/index.js",
|
|
38
|
+
"types": "./dist/generated/index.d.ts",
|
|
39
|
+
"gitHead": "20d26dfc1f1ca3090e391db15d1b3a2e8e4d8f5d"
|
|
40
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Server as HttpServer } from 'http';
|
|
2
|
+
import type { Server as SocketIOServer } from 'socket.io';
|
|
3
|
+
import { Loadable, SourceRepository } from '@proteinjs/reflection';
|
|
4
|
+
|
|
5
|
+
export const getDefaultSocketIOServerFactory = () =>
|
|
6
|
+
SourceRepository.get().object<DefaultSocketIOServerFactory>('@proteinjs/event/DefaultSocketIOServerFactory');
|
|
7
|
+
|
|
8
|
+
export interface DefaultSocketIOServerFactory extends Loadable {
|
|
9
|
+
createSocketIOServer(httpServer: HttpServer): SocketIOServer;
|
|
10
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "./",
|
|
4
|
+
"target": "es5",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"outDir": "./dist/",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"resolveJsonModule": true
|
|
16
|
+
}
|
|
17
|
+
}
|