@zerooneit/expressive-tea 1.2.0 → 1.2.3
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/.circleci/config.yml +49 -0
- package/README.md +122 -35
- package/SECURITY.md +20 -0
- package/classes/Boot.d.ts +2 -0
- package/classes/Boot.js +53 -20
- package/classes/MetaData.js +9 -9
- package/decorators/annotations.js +1 -0
- package/decorators/module.js +5 -4
- package/decorators/proxy.d.ts +13 -0
- package/decorators/proxy.js +70 -0
- package/decorators/router.js +23 -15
- package/decorators/server.d.ts +14 -4
- package/decorators/server.js +38 -10
- package/exceptions/BootLoaderExceptions.js +1 -0
- package/exceptions/RequestExceptions.js +1 -0
- package/helpers/decorators.js +1 -0
- package/helpers/object-helper.d.ts +1 -0
- package/helpers/object-helper.js +10 -3
- package/helpers/server.d.ts +1 -1
- package/helpers/server.js +7 -6
- package/images/announcement-01.png +0 -0
- package/images/logo-sticky-01.png +0 -0
- package/images/logo-wp-01.png +0 -0
- package/libs/constants.d.ts +31 -6
- package/libs/constants.js +34 -0
- package/libs/interfaces.d.ts +14 -2
- package/libs/types.d.ts +2 -0
- package/package.json +30 -35
- package/services/DependencyInjection.js +2 -1
- package/services/WebsocketService.d.ts +19 -0
- package/services/WebsocketService.js +40 -0
- package/.chglog/CHANGELOG.tpl.md +0 -24
- package/.chglog/config.yml +0 -40
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiInject = exports.InjectTagged = exports.InjectNamed = exports.Inject = void 0;
|
|
3
4
|
const inversify_1 = require("inversify");
|
|
4
5
|
const inversify_inject_decorators_1 = require("inversify-inject-decorators");
|
|
5
6
|
const rootContainer = new inversify_1.Container({
|
|
6
7
|
autoBindInjectable: true
|
|
7
8
|
});
|
|
8
|
-
const lazyDecorators = inversify_inject_decorators_1.default(rootContainer);
|
|
9
|
+
const lazyDecorators = (0, inversify_inject_decorators_1.default)(rootContainer);
|
|
9
10
|
/**
|
|
10
11
|
* @module Services
|
|
11
12
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import WebSocket from 'ws';
|
|
4
|
+
import * as http from 'http';
|
|
5
|
+
import * as https from 'https';
|
|
6
|
+
export default class WebsocketService {
|
|
7
|
+
static instance: WebsocketService;
|
|
8
|
+
private readonly ws;
|
|
9
|
+
private readonly wss;
|
|
10
|
+
httpServer: http.Server;
|
|
11
|
+
httpsServer: https.Server;
|
|
12
|
+
isDetached: boolean;
|
|
13
|
+
constructor(ws: WebSocket.Server | never, wss?: WebSocket.Server | never);
|
|
14
|
+
getWebsocket(serverKind: http.Server | https.Server): WebSocket.Server;
|
|
15
|
+
setHttpServer(server: http.Server | https.Server): void;
|
|
16
|
+
static getInstance(ws?: WebSocket.Server, wss?: WebSocket.Server): WebsocketService;
|
|
17
|
+
static init(ws: WebSocket.Server, wss?: WebSocket.Server): void;
|
|
18
|
+
static clear(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const https = require("https");
|
|
4
|
+
class WebsocketService {
|
|
5
|
+
constructor(ws, wss) {
|
|
6
|
+
this.isDetached = false;
|
|
7
|
+
if (WebsocketService.instance) {
|
|
8
|
+
return WebsocketService.instance;
|
|
9
|
+
}
|
|
10
|
+
this.ws = ws;
|
|
11
|
+
this.wss = wss;
|
|
12
|
+
WebsocketService.instance = this;
|
|
13
|
+
}
|
|
14
|
+
getWebsocket(serverKind) {
|
|
15
|
+
return (serverKind instanceof https.Server) ? this.wss : this.ws;
|
|
16
|
+
}
|
|
17
|
+
setHttpServer(server) {
|
|
18
|
+
if (server instanceof https.Server) {
|
|
19
|
+
this.httpsServer = server;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.httpServer = server;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
static getInstance(ws, wss) {
|
|
26
|
+
if (!WebsocketService.instance) {
|
|
27
|
+
WebsocketService.instance = new WebsocketService(ws, wss);
|
|
28
|
+
}
|
|
29
|
+
return WebsocketService.instance;
|
|
30
|
+
}
|
|
31
|
+
static init(ws, wss) {
|
|
32
|
+
if (!WebsocketService.instance) {
|
|
33
|
+
WebsocketService.instance = new WebsocketService(ws, wss);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
static clear() {
|
|
37
|
+
delete WebsocketService.instance;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = WebsocketService;
|
package/.chglog/CHANGELOG.tpl.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{{ range .Versions }}
|
|
2
|
-
<a name="{{ .Tag.Name }}"></a>
|
|
3
|
-
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}
|
|
4
|
-
|
|
5
|
-
> {{ datetime "2006-01-02" .Tag.Date }}
|
|
6
|
-
|
|
7
|
-
{{ range .CommitGroups -}}
|
|
8
|
-
### {{ .Title }}
|
|
9
|
-
|
|
10
|
-
{{ range .Commits -}}
|
|
11
|
-
* [{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ .Subject }}
|
|
12
|
-
{{ end }}
|
|
13
|
-
{{ end -}}
|
|
14
|
-
|
|
15
|
-
{{- if .NoteGroups -}}
|
|
16
|
-
{{ range .NoteGroups -}}
|
|
17
|
-
### {{ .Title }}
|
|
18
|
-
|
|
19
|
-
{{ range .Notes }}
|
|
20
|
-
{{ .Body }}
|
|
21
|
-
{{ end }}
|
|
22
|
-
{{ end -}}
|
|
23
|
-
{{ end -}}
|
|
24
|
-
{{ end -}}
|
package/.chglog/config.yml
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
style: github
|
|
2
|
-
template: CHANGELOG.tpl.md
|
|
3
|
-
info:
|
|
4
|
-
title: CHANGELOG
|
|
5
|
-
repository_url: https://github.com/Zero-OneiT/expresive-tea
|
|
6
|
-
options:
|
|
7
|
-
commits:
|
|
8
|
-
# filters:
|
|
9
|
-
# Type:
|
|
10
|
-
# - feat
|
|
11
|
-
# - fix
|
|
12
|
-
# - perf
|
|
13
|
-
# - refactor
|
|
14
|
-
commit_groups:
|
|
15
|
-
title_maps:
|
|
16
|
-
HOTFIX: Hot Fixes
|
|
17
|
-
MAINTENANCE: Maintenance
|
|
18
|
-
ARCHIRECTURE: Architecture
|
|
19
|
-
RELEASE: Release Work
|
|
20
|
-
BUGFIX: Bug Fixing
|
|
21
|
-
BUG: Bug Fixing
|
|
22
|
-
REFACTOR: Refactored Code
|
|
23
|
-
REFACTORING: Refactored Code
|
|
24
|
-
DOCUMENTATION: Documentation
|
|
25
|
-
DOCUMENTATIOM: Documentation
|
|
26
|
-
IMPROVEMENT: Code Improvement
|
|
27
|
-
TEST: Test Engine
|
|
28
|
-
FEATURE: Features
|
|
29
|
-
BADGES: Badges
|
|
30
|
-
ENGINE: Engines Work
|
|
31
|
-
CORE: Framework Core
|
|
32
|
-
PLUGIN: Plugin Engine
|
|
33
|
-
header:
|
|
34
|
-
pattern: "^\\[(\\w*)\\]\\s(.*)$"
|
|
35
|
-
pattern_maps:
|
|
36
|
-
- Type
|
|
37
|
-
- Subject
|
|
38
|
-
notes:
|
|
39
|
-
keywords:
|
|
40
|
-
- BREAKING CHANGE
|