iosignal 4.0.0 → 4.5.0
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/.vscode/settings.json +1 -1
- package/README.md +0 -2
- package/dist/io.d.ts +11 -9
- package/dist/io.js +5 -5
- package/dist/io.js.map +1 -1
- package/dist/io.min.js +5 -5
- package/dist/io.min.js.map +1 -1
- package/dist/iosignal.js +278 -242
- package/dist/types/client/IOCore.d.ts +12 -10
- package/dist/types/common/constants.d.ts +27 -37
- package/index.js +4 -3
- package/package.json +1 -1
- package/src/auth/BohoAuth.js +48 -11
- package/src/auth/{Auth_File.js → key_providers/FileKeyProvider.js} +8 -20
- package/src/auth/{Auth_Redis.js → key_providers/RedisKeyProvider.js} +4 -7
- package/src/auth/key_providers/StringKeyProvider.js +54 -0
- package/src/client/IOCongSocket.js +5 -3
- package/src/client/IOCore.js +64 -65
- package/src/client/IOWS.js +5 -3
- package/src/client/browser/IOWebSocket.js +5 -3
- package/src/common/constants.js +31 -44
- package/src/common/util.js +3 -0
- package/src/server/Manager.js +4 -4
- package/src/server/Remote.js +4 -1
- package/src/server/RemoteCore.js +23 -17
- package/src/server/Server.js +7 -7
- package/README.en.md +0 -56
- package/auth_file_sample.js +0 -23
- package/auth_file_sample.json +0 -13
- package/src/auth/Auth_Env.js +0 -76
package/.vscode/settings.json
CHANGED
package/README.md
CHANGED
package/dist/io.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
|
|
|
162
162
|
/**
|
|
163
163
|
* Disables auto-reconnect and closes the current connection.
|
|
164
164
|
* The instance can be re-opened manually later. For complete cleanup, use destroy().
|
|
165
|
-
|
|
165
|
+
*/
|
|
166
166
|
stop(): void;
|
|
167
167
|
/**
|
|
168
168
|
* Permanently destroys the instance, cleaning up all resources.
|
|
@@ -194,18 +194,18 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
|
|
|
194
194
|
onClose(): void;
|
|
195
195
|
/**
|
|
196
196
|
* Manually logs in with provided ID and key.
|
|
197
|
-
* @param {string} id - The user ID.
|
|
197
|
+
* @param {string} id - The user ID. or 'id.key'
|
|
198
198
|
* @param {string} key - The user key.
|
|
199
|
-
* @returns {
|
|
199
|
+
* @returns {this}
|
|
200
200
|
*/
|
|
201
|
-
login(id: string, key: string):
|
|
201
|
+
login(id: string, key: string): this;
|
|
202
202
|
/**
|
|
203
203
|
* Sets up authentication for auto-login.
|
|
204
|
-
* @param {string} id - The user ID.
|
|
204
|
+
* @param {string} id - The user ID. or 'id.Key'
|
|
205
205
|
* @param {string} key - The user key.
|
|
206
|
-
* @returns {
|
|
206
|
+
* @returns {this}
|
|
207
207
|
*/
|
|
208
|
-
auth(id: string, key: string):
|
|
208
|
+
auth(id: string, key: string): this;
|
|
209
209
|
/**
|
|
210
210
|
* Handles incoming data from the WebSocket.
|
|
211
211
|
* @param {Buffer} buffer - The incoming data buffer.
|
|
@@ -264,10 +264,12 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
|
|
|
264
264
|
*/
|
|
265
265
|
testPromise(buffer: Buffer$1): void;
|
|
266
266
|
/**
|
|
267
|
-
*
|
|
267
|
+
* alias of signal()
|
|
268
|
+
* Sends a signal with a tag and arguments.
|
|
269
|
+
* @param {string} tag - The signal tag.
|
|
268
270
|
* @param {...any} args - Arguments for the signal.
|
|
269
271
|
*/
|
|
270
|
-
publish(...args: any[]): void;
|
|
272
|
+
publish(tag: string, ...args: any[]): void;
|
|
271
273
|
/**
|
|
272
274
|
* Sends a signal with a tag and arguments.
|
|
273
275
|
* @param {string} tag - The signal tag.
|