@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.
@@ -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;
@@ -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 -}}
@@ -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