@ngxs/websocket-plugin 3.8.2 → 18.0.0-dev.master-f4c2c19

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,258 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject, APP_INITIALIZER, NgModule } from '@angular/core';
3
- import * as i1 from '@ngxs/store';
4
- import { ofActionDispatched, getValue } from '@ngxs/store';
5
- import { Subscription } from 'rxjs';
6
- import { WebSocketSubject } from 'rxjs/webSocket';
7
-
8
- const NGXS_WEBSOCKET_OPTIONS = new InjectionToken('NGXS_WEBSOCKET_OPTIONS');
9
- function noop(..._args) {
10
- return function () { };
11
- }
12
- /**
13
- * Action to connect to the websocket. Optionally pass a URL.
14
- */
15
- class ConnectWebSocket {
16
- constructor(payload) {
17
- this.payload = payload;
18
- }
19
- }
20
- ConnectWebSocket.type = '[WebSocket] Connect';
21
- /**
22
- * Action triggered when a error ocurrs
23
- */
24
- class WebsocketMessageError {
25
- constructor(payload) {
26
- this.payload = payload;
27
- }
28
- }
29
- WebsocketMessageError.type = '[WebSocket] Message Error';
30
- /**
31
- * Action to disconnect the websocket.
32
- */
33
- class DisconnectWebSocket {
34
- }
35
- DisconnectWebSocket.type = '[WebSocket] Disconnect';
36
- /**
37
- * Action triggered when websocket is connected
38
- */
39
- class WebSocketConnected {
40
- }
41
- WebSocketConnected.type = '[WebSocket] Connected';
42
- /**
43
- * Action triggered when websocket is disconnected
44
- */
45
- class WebSocketDisconnected {
46
- }
47
- WebSocketDisconnected.type = '[WebSocket] Disconnected';
48
- /**
49
- * Action to send to the server.
50
- */
51
- class SendWebSocketMessage {
52
- constructor(payload) {
53
- this.payload = payload;
54
- }
55
- }
56
- SendWebSocketMessage.type = '[WebSocket] Send Message';
57
- /**
58
- * Action dispatched when the user tries to connect if the connection already exists.
59
- */
60
- class WebSocketConnectionUpdated {
61
- }
62
- WebSocketConnectionUpdated.type = '[WebSocket] Connection Updated';
63
- /**
64
- * This error is thrown where there is no `type` (or custom `typeKey`) property
65
- * on the message that came from the server side socket
66
- */
67
- class TypeKeyPropertyMissingError extends Error {
68
- constructor(typeKey) {
69
- super(`Property ${typeKey} is missing on the socket message`);
70
- }
71
- }
72
-
73
- class WebSocketHandler {
74
- constructor(store, actions$, options) {
75
- this.store = store;
76
- this.actions$ = actions$;
77
- this.options = options;
78
- this.socket = null;
79
- this.config = {
80
- url: this.options.url,
81
- protocol: this.options.protocol,
82
- // Default binary type is `blob` for the global `WebSocket`
83
- binaryType: this.options.binaryType,
84
- serializer: this.options.serializer,
85
- deserializer: this.options.deserializer,
86
- closeObserver: {
87
- next: () => {
88
- // ATTENTION!
89
- // See https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/dom/WebSocketSubject.ts#L340
90
- // RxJS socket emits `onComplete` event only if `event.wasClean` is truthy
91
- // and doesn't complete socket subject if it's falsy
92
- this.disconnect();
93
- }
94
- },
95
- openObserver: {
96
- next: () => this.store.dispatch(new WebSocketConnected())
97
- }
98
- };
99
- this.typeKey = this.options.typeKey;
100
- this.subscription = new Subscription();
101
- this.setupActionsListeners();
102
- }
103
- ngOnDestroy() {
104
- this.closeConnection();
105
- this.subscription.unsubscribe();
106
- }
107
- setupActionsListeners() {
108
- this.subscription.add(this.actions$.pipe(ofActionDispatched(ConnectWebSocket)).subscribe(({ payload }) => {
109
- this.connect(payload);
110
- }));
111
- this.subscription.add(this.actions$.pipe(ofActionDispatched(DisconnectWebSocket)).subscribe(() => {
112
- this.disconnect();
113
- }));
114
- this.subscription.add(this.actions$.pipe(ofActionDispatched(SendWebSocketMessage)).subscribe(({ payload }) => {
115
- this.send(payload);
116
- }));
117
- }
118
- connect(options) {
119
- this.updateConnection();
120
- // Users can pass the options in the connect method so
121
- // if options aren't available at DI bootstrap they have access
122
- // to pass them here
123
- if (options) {
124
- this.mergeConfigWithOptions(options);
125
- }
126
- this.socket = new WebSocketSubject(this.config);
127
- this.socket.subscribe({
128
- next: (message) => {
129
- const type = getValue(message, this.typeKey);
130
- if (!type) {
131
- throw new TypeKeyPropertyMissingError(this.typeKey);
132
- }
133
- this.store.dispatch(Object.assign(Object.assign({}, message), { type }));
134
- },
135
- error: (error) => {
136
- if (error instanceof CloseEvent) {
137
- this.dispatchWebSocketDisconnected();
138
- }
139
- else {
140
- this.store.dispatch(new WebsocketMessageError(error));
141
- }
142
- }
143
- });
144
- }
145
- disconnect() {
146
- if (this.socket) {
147
- this.closeConnection();
148
- this.dispatchWebSocketDisconnected();
149
- }
150
- }
151
- send(data) {
152
- if (!this.socket) {
153
- throw new Error('You must connect to the socket before sending any data');
154
- }
155
- this.socket.next(data);
156
- }
157
- /**
158
- * Don't enlarge the `connect` method
159
- */
160
- mergeConfigWithOptions(options) {
161
- if (options.url) {
162
- this.config.url = options.url;
163
- }
164
- if (options.serializer) {
165
- this.config.serializer = options.serializer;
166
- }
167
- if (options.deserializer) {
168
- this.config.deserializer = options.deserializer;
169
- }
170
- }
171
- /**
172
- * To ensure we don't have any memory leaks
173
- * e.g. if the user occasionally dispatched `ConnectWebSocket` twice
174
- * then the previous subscription will still live in the memory
175
- * to prevent such behavior - we close the previous connection if it exists
176
- */
177
- updateConnection() {
178
- if (this.socket) {
179
- this.closeConnection();
180
- this.store.dispatch(new WebSocketConnectionUpdated());
181
- }
182
- }
183
- /**
184
- * Used in many places so it's better to move the code into function
185
- */
186
- dispatchWebSocketDisconnected() {
187
- this.store.dispatch(new WebSocketDisconnected());
188
- }
189
- closeConnection() {
190
- // `socket.complete()` closes the connection
191
- // also it doesn't invoke the `onComplete` callback that we passed
192
- // into `socket.subscribe(...)`
193
- if (this.socket !== null) {
194
- this.socket.complete();
195
- this.socket = null;
196
- }
197
- }
198
- }
199
- /** @nocollapse */ WebSocketHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: WebSocketHandler, deps: [{ token: i1.Store }, { token: i1.Actions }, { token: NGXS_WEBSOCKET_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
200
- /** @nocollapse */ WebSocketHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: WebSocketHandler });
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: WebSocketHandler, decorators: [{
202
- type: Injectable
203
- }], ctorParameters: function () { return [{ type: i1.Store }, { type: i1.Actions }, { type: undefined, decorators: [{
204
- type: Inject,
205
- args: [NGXS_WEBSOCKET_OPTIONS]
206
- }] }]; } });
207
-
208
- function websocketOptionsFactory(options) {
209
- return Object.assign({ reconnectInterval: 5000, reconnectAttempts: 10, typeKey: 'type', deserializer(e) {
210
- return JSON.parse(e.data);
211
- },
212
- serializer(value) {
213
- return JSON.stringify(value);
214
- } }, options);
215
- }
216
- const USER_OPTIONS = new InjectionToken('USER_OPTIONS');
217
- class NgxsWebsocketPluginModule {
218
- static forRoot(options) {
219
- return {
220
- ngModule: NgxsWebsocketPluginModule,
221
- providers: [
222
- WebSocketHandler,
223
- {
224
- provide: USER_OPTIONS,
225
- useValue: options
226
- },
227
- {
228
- provide: NGXS_WEBSOCKET_OPTIONS,
229
- useFactory: websocketOptionsFactory,
230
- deps: [USER_OPTIONS]
231
- },
232
- {
233
- provide: APP_INITIALIZER,
234
- useFactory: noop,
235
- deps: [WebSocketHandler],
236
- multi: true
237
- }
238
- ]
239
- };
240
- }
241
- }
242
- /** @nocollapse */ NgxsWebsocketPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgxsWebsocketPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
243
- /** @nocollapse */ NgxsWebsocketPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgxsWebsocketPluginModule });
244
- /** @nocollapse */ NgxsWebsocketPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgxsWebsocketPluginModule });
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgxsWebsocketPluginModule, decorators: [{
246
- type: NgModule
247
- }] });
248
-
249
- /**
250
- * The public api for consumers of @ngxs/websocket-plugin
251
- */
252
-
253
- /**
254
- * Generated bundle index. Do not edit.
255
- */
256
-
257
- export { ConnectWebSocket, DisconnectWebSocket, NGXS_WEBSOCKET_OPTIONS, NgxsWebsocketPluginModule, SendWebSocketMessage, WebSocketConnected, WebSocketConnectionUpdated, WebSocketDisconnected, WebsocketMessageError };
258
- //# sourceMappingURL=ngxs-websocket-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngxs-websocket-plugin.js","sources":["../../../packages/websocket-plugin/src/symbols.ts","../../../packages/websocket-plugin/src/websocket-handler.ts","../../../packages/websocket-plugin/src/websocket.module.ts","../../../packages/websocket-plugin/index.ts","../../../packages/websocket-plugin/ngxs-websocket-plugin.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const NGXS_WEBSOCKET_OPTIONS = new InjectionToken('NGXS_WEBSOCKET_OPTIONS');\n\nexport interface NgxsWebsocketPluginOptions {\n /**\n * URL of the websocket.\n */\n url?: string;\n\n /**\n * Either a single protocol string or an array of protocol strings.\n * These strings are used to indicate sub-protocols, so that a single server\n * can implement multiple WebSocket sub-protocols (for example, you might want one server to be able\n * to handle different types of interactions depending on the specified protocol).\n * If you don't specify a protocol string, an empty string is assumed.\n */\n protocol?: string | string[];\n\n /**\n * Sets the `binaryType` property of the underlying WebSocket.\n */\n binaryType?: 'blob' | 'arraybuffer';\n\n /**\n * The property name to distigunish this type for the store.\n * Default: 'type'\n */\n typeKey?: string;\n\n /**\n * Interval to try and reconnect.\n * Default: 5000\n */\n reconnectInterval?: number;\n\n /**\n * Number of reconnect attemps.\n * Default: 10\n */\n reconnectAttempts?: number;\n\n /**\n * Serializer to call before sending messages\n * Default: `json.stringify`\n */\n serializer?: (data: any) => string;\n\n /**\n * Deseralizer before publishing the message.\n */\n deserializer?: (e: MessageEvent) => any;\n}\n\nexport function noop(..._args: any[]) {\n return function () {};\n}\n\n/**\n * Action to connect to the websocket. Optionally pass a URL.\n */\nexport class ConnectWebSocket {\n static readonly type = '[WebSocket] Connect';\n\n constructor(public payload?: NgxsWebsocketPluginOptions) {}\n}\n\n/**\n * Action triggered when a error ocurrs\n */\nexport class WebsocketMessageError {\n static readonly type = '[WebSocket] Message Error';\n\n constructor(public payload: any) {}\n}\n\n/**\n * Action to disconnect the websocket.\n */\nexport class DisconnectWebSocket {\n static readonly type = '[WebSocket] Disconnect';\n}\n\n/**\n * Action triggered when websocket is connected\n */\nexport class WebSocketConnected {\n static readonly type = '[WebSocket] Connected';\n}\n\n/**\n * Action triggered when websocket is disconnected\n */\nexport class WebSocketDisconnected {\n static readonly type = '[WebSocket] Disconnected';\n}\n\n/**\n * Action to send to the server.\n */\nexport class SendWebSocketMessage {\n static readonly type = '[WebSocket] Send Message';\n\n constructor(public payload: any) {}\n}\n\n/**\n * Action dispatched when the user tries to connect if the connection already exists.\n */\nexport class WebSocketConnectionUpdated {\n static readonly type = '[WebSocket] Connection Updated';\n}\n\n/**\n * This error is thrown where there is no `type` (or custom `typeKey`) property\n * on the message that came from the server side socket\n */\nexport class TypeKeyPropertyMissingError extends Error {\n constructor(typeKey: string) {\n super(`Property ${typeKey} is missing on the socket message`);\n }\n}\n","import { Injectable, Inject, OnDestroy } from '@angular/core';\nimport { Actions, Store, getValue, ofActionDispatched } from '@ngxs/store';\nimport { Subscription } from 'rxjs';\n\nimport { WebSocketSubject, WebSocketSubjectConfig } from 'rxjs/webSocket';\n\nimport {\n ConnectWebSocket,\n DisconnectWebSocket,\n SendWebSocketMessage,\n NGXS_WEBSOCKET_OPTIONS,\n NgxsWebsocketPluginOptions,\n WebsocketMessageError,\n WebSocketDisconnected,\n TypeKeyPropertyMissingError,\n WebSocketConnectionUpdated,\n WebSocketConnected\n} from './symbols';\n\n@Injectable()\nexport class WebSocketHandler implements OnDestroy {\n private socket: WebSocketSubject<any> | null = null;\n\n private config: WebSocketSubjectConfig<any> = {\n url: this.options.url!,\n protocol: this.options.protocol,\n // Default binary type is `blob` for the global `WebSocket`\n binaryType: this.options.binaryType,\n serializer: this.options.serializer,\n deserializer: this.options.deserializer,\n closeObserver: {\n next: () => {\n // ATTENTION!\n // See https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/dom/WebSocketSubject.ts#L340\n // RxJS socket emits `onComplete` event only if `event.wasClean` is truthy\n // and doesn't complete socket subject if it's falsy\n this.disconnect();\n }\n },\n openObserver: {\n next: () => this.store.dispatch(new WebSocketConnected())\n }\n };\n\n private typeKey = this.options.typeKey!;\n\n private subscription = new Subscription();\n\n constructor(\n private store: Store,\n private actions$: Actions,\n @Inject(NGXS_WEBSOCKET_OPTIONS) private options: NgxsWebsocketPluginOptions\n ) {\n this.setupActionsListeners();\n }\n\n ngOnDestroy(): void {\n this.closeConnection();\n this.subscription.unsubscribe();\n }\n\n private setupActionsListeners(): void {\n this.subscription.add(\n this.actions$.pipe(ofActionDispatched(ConnectWebSocket)).subscribe(({ payload }) => {\n this.connect(payload);\n })\n );\n\n this.subscription.add(\n this.actions$.pipe(ofActionDispatched(DisconnectWebSocket)).subscribe(() => {\n this.disconnect();\n })\n );\n\n this.subscription.add(\n this.actions$.pipe(ofActionDispatched(SendWebSocketMessage)).subscribe(({ payload }) => {\n this.send(payload);\n })\n );\n }\n\n private connect(options?: NgxsWebsocketPluginOptions): void {\n this.updateConnection();\n\n // Users can pass the options in the connect method so\n // if options aren't available at DI bootstrap they have access\n // to pass them here\n if (options) {\n this.mergeConfigWithOptions(options);\n }\n\n this.socket = new WebSocketSubject(this.config);\n\n this.socket.subscribe({\n next: (message: any) => {\n const type = getValue(message, this.typeKey);\n if (!type) {\n throw new TypeKeyPropertyMissingError(this.typeKey);\n }\n this.store.dispatch({ ...message, type });\n },\n error: (error: any) => {\n if (error instanceof CloseEvent) {\n this.dispatchWebSocketDisconnected();\n } else {\n this.store.dispatch(new WebsocketMessageError(error));\n }\n }\n });\n }\n\n private disconnect(): void {\n if (this.socket) {\n this.closeConnection();\n this.dispatchWebSocketDisconnected();\n }\n }\n\n private send(data: any): void {\n if (!this.socket) {\n throw new Error('You must connect to the socket before sending any data');\n }\n\n this.socket.next(data);\n }\n\n /**\n * Don't enlarge the `connect` method\n */\n private mergeConfigWithOptions(options: NgxsWebsocketPluginOptions): void {\n if (options.url) {\n this.config.url = options.url;\n }\n\n if (options.serializer) {\n this.config.serializer = options.serializer;\n }\n\n if (options.deserializer) {\n this.config.deserializer = options.deserializer;\n }\n }\n\n /**\n * To ensure we don't have any memory leaks\n * e.g. if the user occasionally dispatched `ConnectWebSocket` twice\n * then the previous subscription will still live in the memory\n * to prevent such behavior - we close the previous connection if it exists\n */\n private updateConnection(): void {\n if (this.socket) {\n this.closeConnection();\n this.store.dispatch(new WebSocketConnectionUpdated());\n }\n }\n\n /**\n * Used in many places so it's better to move the code into function\n */\n private dispatchWebSocketDisconnected(): void {\n this.store.dispatch(new WebSocketDisconnected());\n }\n\n private closeConnection(): void {\n // `socket.complete()` closes the connection\n // also it doesn't invoke the `onComplete` callback that we passed\n // into `socket.subscribe(...)`\n if (this.socket !== null) {\n this.socket.complete();\n this.socket = null;\n }\n }\n}\n","import { NgModule, ModuleWithProviders, APP_INITIALIZER, InjectionToken } from '@angular/core';\n\nimport { WebSocketHandler } from './websocket-handler';\nimport { NgxsWebsocketPluginOptions, NGXS_WEBSOCKET_OPTIONS, noop } from './symbols';\n\nexport function websocketOptionsFactory(options: NgxsWebsocketPluginOptions) {\n return {\n reconnectInterval: 5000,\n reconnectAttempts: 10,\n typeKey: 'type',\n deserializer(e: MessageEvent) {\n return JSON.parse(e.data);\n },\n serializer(value: any) {\n return JSON.stringify(value);\n },\n ...options\n };\n}\n\nexport const USER_OPTIONS = new InjectionToken('USER_OPTIONS');\n\n@NgModule()\nexport class NgxsWebsocketPluginModule {\n static forRoot(\n options?: NgxsWebsocketPluginOptions\n ): ModuleWithProviders<NgxsWebsocketPluginModule> {\n return {\n ngModule: NgxsWebsocketPluginModule,\n providers: [\n WebSocketHandler,\n {\n provide: USER_OPTIONS,\n useValue: options\n },\n {\n provide: NGXS_WEBSOCKET_OPTIONS,\n useFactory: websocketOptionsFactory,\n deps: [USER_OPTIONS]\n },\n {\n provide: APP_INITIALIZER,\n useFactory: noop,\n deps: [WebSocketHandler],\n multi: true\n }\n ]\n };\n }\n}\n","/**\n * The public api for consumers of @ngxs/websocket-plugin\n */\nexport * from './src/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,sBAAsB,GAAG,IAAI,cAAc,CAAC,wBAAwB,EAAE;AAoDnE,SAAA,IAAI,CAAC,GAAG,KAAY,EAAA;IAClC,OAAO,YAAA,GAAc,CAAC;AACxB,CAAC;AAED;;AAEG;MACU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CAAmB,OAAoC,EAAA;QAApC,IAAO,CAAA,OAAA,GAAP,OAAO,CAA6B;KAAI;;AAF3C,gBAAI,CAAA,IAAA,GAAG,qBAAqB,CAAC;AAK/C;;AAEG;MACU,qBAAqB,CAAA;AAGhC,IAAA,WAAA,CAAmB,OAAY,EAAA;QAAZ,IAAO,CAAA,OAAA,GAAP,OAAO,CAAK;KAAI;;AAFnB,qBAAI,CAAA,IAAA,GAAG,2BAA2B,CAAC;AAKrD;;AAEG;MACU,mBAAmB,CAAA;;AACd,mBAAI,CAAA,IAAA,GAAG,wBAAwB,CAAC;AAGlD;;AAEG;MACU,kBAAkB,CAAA;;AACb,kBAAI,CAAA,IAAA,GAAG,uBAAuB,CAAC;AAGjD;;AAEG;MACU,qBAAqB,CAAA;;AAChB,qBAAI,CAAA,IAAA,GAAG,0BAA0B,CAAC;AAGpD;;AAEG;MACU,oBAAoB,CA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