buttplug 3.1.1 → 3.2.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/.eslintrc.js +13 -8
- package/CHANGELOG.md +16 -0
- package/README.md +24 -25
- package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.d.ts +13 -16
- package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js +23 -52
- package/dist/main/src/client/ButtplugBrowserWebsocketClientConnector.js.map +1 -1
- package/dist/main/src/client/ButtplugClientConnectorException.d.ts +11 -11
- package/dist/main/src/client/ButtplugClientConnectorException.js +41 -41
- package/dist/main/src/client/ButtplugClientDevice.d.ts +67 -67
- package/dist/main/src/client/ButtplugClientDevice.js +324 -324
- package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.d.ts +18 -18
- package/dist/main/src/client/ButtplugNodeWebsocketClientConnector.js +19 -19
- package/dist/main/src/client/Client.d.ts +41 -40
- package/dist/main/src/client/Client.js +240 -235
- package/dist/main/src/client/Client.js.map +1 -1
- package/dist/main/src/client/IButtplugClientConnector.d.ts +16 -16
- package/dist/main/src/client/IButtplugClientConnector.js +9 -9
- package/dist/main/src/core/Exceptions.d.ts +36 -36
- package/dist/main/src/core/Exceptions.js +106 -106
- package/dist/main/src/core/Logging.d.ts +112 -112
- package/dist/main/src/core/Logging.js +170 -170
- package/dist/main/src/core/Logging.js.map +1 -1
- package/dist/main/src/core/MessageUtils.d.ts +9 -9
- package/dist/main/src/core/MessageUtils.js +58 -58
- package/dist/main/src/core/Messages.d.ts +275 -275
- package/dist/main/src/core/Messages.js +429 -429
- package/dist/main/src/core/Messages.js.map +1 -1
- package/dist/main/src/index.d.ts +18 -18
- package/dist/main/src/index.js +34 -34
- package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.d.ts +22 -22
- package/dist/main/src/utils/ButtplugBrowserWebsocketConnector.js +95 -95
- package/dist/main/src/utils/ButtplugMessageSorter.d.ts +19 -19
- package/dist/main/src/utils/ButtplugMessageSorter.js +81 -81
- package/dist/main/src/utils/Utils.d.ts +1 -1
- package/dist/main/src/utils/Utils.js +7 -7
- package/dist/web/buttplug.js +38 -7126
- package/dist/web/buttplug.mjs +2254 -0
- package/dist/web/client/ButtplugBrowserWebsocketClientConnector.d.ts +13 -0
- package/dist/web/client/ButtplugClientConnectorException.d.ts +11 -0
- package/dist/web/client/ButtplugClientDevice.d.ts +67 -0
- package/dist/web/client/ButtplugNodeWebsocketClientConnector.d.ts +18 -0
- package/dist/web/client/Client.d.ts +41 -0
- package/dist/web/client/IButtplugClientConnector.d.ts +16 -0
- package/dist/web/core/Exceptions.d.ts +36 -0
- package/dist/web/core/Logging.d.ts +112 -0
- package/dist/web/core/MessageUtils.d.ts +9 -0
- package/dist/web/core/Messages.d.ts +274 -0
- package/dist/web/index.d.ts +18 -0
- package/dist/web/utils/ButtplugBrowserWebsocketConnector.d.ts +22 -0
- package/dist/web/utils/ButtplugMessageSorter.d.ts +19 -0
- package/dist/web/utils/Utils.d.ts +1 -0
- package/package.json +23 -53
- package/src/client/ButtplugBrowserWebsocketClientConnector.ts +2 -24
- package/src/client/ButtplugClientDevice.ts +1 -1
- package/src/client/Client.ts +12 -6
- package/src/client/IButtplugClientConnector.ts +4 -4
- package/src/core/MessageUtils.ts +1 -1
- package/src/utils/ButtplugBrowserWebsocketConnector.ts +12 -12
- package/vite.config.ts +26 -0
- package/.github/FUNDING.yml +0 -5
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -17
- package/.github/workflows/docs.yaml +0 -29
- package/azure-pipelines.yml +0 -19
- package/dist/web/buttplug.min.js +0 -3
- package/dist/web/buttplug.min.js.LICENSE.txt +0 -31
- package/dist/web/buttplug.min.js.map +0 -1
- package/jest-puppeteer.config.js +0 -5
- package/rollup.config.js +0 -55
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
-
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
-
* project root for full license information.
|
|
5
|
-
*
|
|
6
|
-
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
import { ButtplugBrowserWebsocketClientConnector } from './ButtplugBrowserWebsocketClientConnector';
|
|
9
|
-
export declare class ButtplugNodeWebsocketClientConnector extends ButtplugBrowserWebsocketClientConnector {
|
|
10
|
-
protected _websocketConstructor: {
|
|
11
|
-
new (url: string | URL, protocols?: string | string[] | undefined): WebSocket;
|
|
12
|
-
prototype: WebSocket;
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
};
|
|
18
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
+
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
+
* project root for full license information.
|
|
5
|
+
*
|
|
6
|
+
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
+
*/
|
|
8
|
+
import { ButtplugBrowserWebsocketClientConnector } from './ButtplugBrowserWebsocketClientConnector';
|
|
9
|
+
export declare class ButtplugNodeWebsocketClientConnector extends ButtplugBrowserWebsocketClientConnector {
|
|
10
|
+
protected _websocketConstructor: {
|
|
11
|
+
new (url: string | URL, protocols?: string | string[] | undefined): WebSocket;
|
|
12
|
+
prototype: WebSocket;
|
|
13
|
+
readonly CONNECTING: 0;
|
|
14
|
+
readonly OPEN: 1;
|
|
15
|
+
readonly CLOSING: 2;
|
|
16
|
+
readonly CLOSED: 3;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
-
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
-
* project root for full license information.
|
|
5
|
-
*
|
|
6
|
-
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
'use strict';
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ButtplugNodeWebsocketClientConnector = void 0;
|
|
11
|
-
const ButtplugBrowserWebsocketClientConnector_1 = require("./ButtplugBrowserWebsocketClientConnector");
|
|
12
|
-
const ws_1 = require("ws");
|
|
13
|
-
class ButtplugNodeWebsocketClientConnector extends ButtplugBrowserWebsocketClientConnector_1.ButtplugBrowserWebsocketClientConnector {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this._websocketConstructor = ws_1.WebSocket;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ButtplugNodeWebsocketClientConnector = ButtplugNodeWebsocketClientConnector;
|
|
1
|
+
/*!
|
|
2
|
+
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
+
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
+
* project root for full license information.
|
|
5
|
+
*
|
|
6
|
+
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ButtplugNodeWebsocketClientConnector = void 0;
|
|
11
|
+
const ButtplugBrowserWebsocketClientConnector_1 = require("./ButtplugBrowserWebsocketClientConnector");
|
|
12
|
+
const ws_1 = require("ws");
|
|
13
|
+
class ButtplugNodeWebsocketClientConnector extends ButtplugBrowserWebsocketClientConnector_1.ButtplugBrowserWebsocketClientConnector {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this._websocketConstructor = ws_1.WebSocket;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ButtplugNodeWebsocketClientConnector = ButtplugNodeWebsocketClientConnector;
|
|
20
20
|
//# sourceMappingURL=ButtplugNodeWebsocketClientConnector.js.map
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
-
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
-
* project root for full license information.
|
|
5
|
-
*
|
|
6
|
-
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
import { ButtplugLogger } from '../core/Logging';
|
|
10
|
-
import { EventEmitter } from 'eventemitter3';
|
|
11
|
-
import { ButtplugClientDevice } from './ButtplugClientDevice';
|
|
12
|
-
import { IButtplugClientConnector } from './IButtplugClientConnector';
|
|
13
|
-
import * as Messages from '../core/Messages';
|
|
14
|
-
export declare class ButtplugClient extends EventEmitter {
|
|
15
|
-
protected _pingTimer: NodeJS.Timeout | null;
|
|
16
|
-
protected _connector: IButtplugClientConnector | null;
|
|
17
|
-
protected _devices: Map<number, ButtplugClientDevice>;
|
|
18
|
-
protected _clientName: string;
|
|
19
|
-
protected _logger: ButtplugLogger;
|
|
20
|
-
protected _isScanning: boolean;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
get
|
|
24
|
-
get
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
protected
|
|
33
|
-
protected
|
|
34
|
-
protected
|
|
35
|
-
protected
|
|
36
|
-
protected
|
|
37
|
-
protected
|
|
38
|
-
protected
|
|
39
|
-
protected
|
|
40
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Buttplug JS Source Code File - Visit https://buttplug.io for more info about
|
|
3
|
+
* the project. Licensed under the BSD 3-Clause license. See LICENSE file in the
|
|
4
|
+
* project root for full license information.
|
|
5
|
+
*
|
|
6
|
+
* @copyright Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference types="node" />
|
|
9
|
+
import { ButtplugLogger } from '../core/Logging';
|
|
10
|
+
import { EventEmitter } from 'eventemitter3';
|
|
11
|
+
import { ButtplugClientDevice } from './ButtplugClientDevice';
|
|
12
|
+
import { IButtplugClientConnector } from './IButtplugClientConnector';
|
|
13
|
+
import * as Messages from '../core/Messages';
|
|
14
|
+
export declare class ButtplugClient extends EventEmitter {
|
|
15
|
+
protected _pingTimer: NodeJS.Timeout | null;
|
|
16
|
+
protected _connector: IButtplugClientConnector | null;
|
|
17
|
+
protected _devices: Map<number, ButtplugClientDevice>;
|
|
18
|
+
protected _clientName: string;
|
|
19
|
+
protected _logger: ButtplugLogger;
|
|
20
|
+
protected _isScanning: boolean;
|
|
21
|
+
private _sorter;
|
|
22
|
+
constructor(clientName?: string);
|
|
23
|
+
get connected(): boolean;
|
|
24
|
+
get devices(): ButtplugClientDevice[];
|
|
25
|
+
get isScanning(): boolean;
|
|
26
|
+
connect: (connector: IButtplugClientConnector) => Promise<void>;
|
|
27
|
+
disconnect: () => Promise<void>;
|
|
28
|
+
startScanning: () => Promise<void>;
|
|
29
|
+
stopScanning: () => Promise<void>;
|
|
30
|
+
stopAllDevices: () => Promise<void>;
|
|
31
|
+
private sendDeviceMessage;
|
|
32
|
+
protected disconnectHandler: () => void;
|
|
33
|
+
protected parseMessages: (msgs: Messages.ButtplugMessage[]) => void;
|
|
34
|
+
protected initializeConnection: () => Promise<boolean>;
|
|
35
|
+
protected requestDeviceList: () => Promise<void>;
|
|
36
|
+
protected shutdownConnection: () => Promise<void>;
|
|
37
|
+
protected sendMessage(msg: Messages.ButtplugMessage): Promise<Messages.ButtplugMessage>;
|
|
38
|
+
protected checkConnector(): void;
|
|
39
|
+
protected sendMsgExpectOk: (msg: Messages.ButtplugMessage) => Promise<void>;
|
|
40
|
+
protected sendDeviceMessageClosure: (device: ButtplugClientDevice, msg: Messages.ButtplugDeviceMessage) => Promise<Messages.ButtplugMessage>;
|
|
41
|
+
}
|