Comparing version 0.0.2 to 0.0.3
@@ -93,3 +93,3 @@ import 'reflect-metadata'; | ||
} | ||
export declare class FleshlightLaunchRawCmd extends ButtplugDeviceMessage { | ||
export declare class FleshlightLaunchFW12Cmd extends ButtplugDeviceMessage { | ||
Speed: number; | ||
@@ -101,3 +101,3 @@ Position: number; | ||
} | ||
export declare class KiirooRawCmd extends ButtplugDeviceMessage { | ||
export declare class KiirooCmd extends ButtplugDeviceMessage { | ||
Position: number; | ||
@@ -114,2 +114,17 @@ DeviceIndex: number; | ||
} | ||
export declare class StopDeviceCmd extends ButtplugDeviceMessage { | ||
DeviceIndex: number; | ||
Id: number; | ||
constructor(DeviceIndex?: number, Id?: number); | ||
} | ||
export declare class StopAllDevices extends ButtplugMessage { | ||
Id: number; | ||
constructor(Id?: number); | ||
} | ||
export declare class LovenseCmd extends ButtplugDeviceMessage { | ||
Command: string; | ||
DeviceIndex: number; | ||
Id: number; | ||
constructor(Command: string, DeviceIndex?: number, Id?: number); | ||
} | ||
export declare function FromJSON(str: any): Array<ButtplugMessage>; |
@@ -224,5 +224,5 @@ 'use strict'; | ||
exports.ServerInfo = ServerInfo; | ||
var FleshlightLaunchRawCmd = (function (_super) { | ||
__extends(FleshlightLaunchRawCmd, _super); | ||
function FleshlightLaunchRawCmd(Speed, Position, DeviceIndex, Id) { | ||
var FleshlightLaunchFW12Cmd = (function (_super) { | ||
__extends(FleshlightLaunchFW12Cmd, _super); | ||
function FleshlightLaunchFW12Cmd(Speed, Position, DeviceIndex, Id) { | ||
if (DeviceIndex === void 0) { DeviceIndex = -1; } | ||
@@ -237,8 +237,8 @@ if (Id === void 0) { Id = 1; } | ||
} | ||
return FleshlightLaunchRawCmd; | ||
return FleshlightLaunchFW12Cmd; | ||
}(ButtplugDeviceMessage)); | ||
exports.FleshlightLaunchRawCmd = FleshlightLaunchRawCmd; | ||
var KiirooRawCmd = (function (_super) { | ||
__extends(KiirooRawCmd, _super); | ||
function KiirooRawCmd(Position, DeviceIndex, Id) { | ||
exports.FleshlightLaunchFW12Cmd = FleshlightLaunchFW12Cmd; | ||
var KiirooCmd = (function (_super) { | ||
__extends(KiirooCmd, _super); | ||
function KiirooCmd(Position, DeviceIndex, Id) { | ||
if (DeviceIndex === void 0) { DeviceIndex = -1; } | ||
@@ -252,5 +252,5 @@ if (Id === void 0) { Id = 1; } | ||
} | ||
return KiirooRawCmd; | ||
return KiirooCmd; | ||
}(ButtplugDeviceMessage)); | ||
exports.KiirooRawCmd = KiirooRawCmd; | ||
exports.KiirooCmd = KiirooCmd; | ||
var SingleMotorVibrateCmd = (function (_super) { | ||
@@ -270,2 +270,40 @@ __extends(SingleMotorVibrateCmd, _super); | ||
exports.SingleMotorVibrateCmd = SingleMotorVibrateCmd; | ||
var StopDeviceCmd = (function (_super) { | ||
__extends(StopDeviceCmd, _super); | ||
function StopDeviceCmd(DeviceIndex, Id) { | ||
if (DeviceIndex === void 0) { DeviceIndex = -1; } | ||
if (Id === void 0) { Id = 1; } | ||
var _this = _super.call(this, DeviceIndex, Id) || this; | ||
_this.DeviceIndex = DeviceIndex; | ||
_this.Id = Id; | ||
return _this; | ||
} | ||
return StopDeviceCmd; | ||
}(ButtplugDeviceMessage)); | ||
exports.StopDeviceCmd = StopDeviceCmd; | ||
var StopAllDevices = (function (_super) { | ||
__extends(StopAllDevices, _super); | ||
function StopAllDevices(Id) { | ||
if (Id === void 0) { Id = 1; } | ||
var _this = _super.call(this, Id) || this; | ||
_this.Id = Id; | ||
return _this; | ||
} | ||
return StopAllDevices; | ||
}(ButtplugMessage)); | ||
exports.StopAllDevices = StopAllDevices; | ||
var LovenseCmd = (function (_super) { | ||
__extends(LovenseCmd, _super); | ||
function LovenseCmd(Command, DeviceIndex, Id) { | ||
if (DeviceIndex === void 0) { DeviceIndex = -1; } | ||
if (Id === void 0) { Id = 1; } | ||
var _this = _super.call(this, DeviceIndex, Id) || this; | ||
_this.Command = Command; | ||
_this.DeviceIndex = DeviceIndex; | ||
_this.Id = Id; | ||
return _this; | ||
} | ||
return LovenseCmd; | ||
}(ButtplugDeviceMessage)); | ||
exports.LovenseCmd = LovenseCmd; | ||
var Messages = { | ||
@@ -286,5 +324,8 @@ Ok: Ok, | ||
ServerInfo: ServerInfo, | ||
FleshlightLaunchRawCmd: FleshlightLaunchRawCmd, | ||
KiirooRawCmd: KiirooRawCmd, | ||
SingleMotorVibrateCmd: SingleMotorVibrateCmd | ||
FleshlightLaunchFW12Cmd: FleshlightLaunchFW12Cmd, | ||
KiirooCmd: KiirooCmd, | ||
StopDeviceCmd: StopDeviceCmd, | ||
StopAllDevices: StopAllDevices, | ||
SingleMotorVibrateCmd: SingleMotorVibrateCmd, | ||
LovenseCmd: LovenseCmd | ||
}; | ||
@@ -291,0 +332,0 @@ function FromJSON(str) { |
@@ -170,3 +170,3 @@ "use strict"; | ||
_a.trys.push([2, 4, , 5]); | ||
return [4 /*yield*/, bp.SendDeviceMessage(x, new Messages.KiirooRawCmd(2))]; | ||
return [4 /*yield*/, bp.SendDeviceMessage(x, new Messages.KiirooCmd(2))]; | ||
case 3: | ||
@@ -173,0 +173,0 @@ _a.sent(); |
{ | ||
"name": "buttplug", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Javascript library for accessing buttplug servers via node.js or web sockets", | ||
@@ -5,0 +5,0 @@ "main": "./dist/main/src/index.js", |
@@ -142,3 +142,3 @@ 'use strict'; | ||
export class FleshlightLaunchRawCmd extends ButtplugDeviceMessage { | ||
export class FleshlightLaunchFW12Cmd extends ButtplugDeviceMessage { | ||
constructor(public Speed: number, | ||
@@ -152,3 +152,3 @@ public Position: number, | ||
export class KiirooRawCmd extends ButtplugDeviceMessage { | ||
export class KiirooCmd extends ButtplugDeviceMessage { | ||
constructor(public Position: number, | ||
@@ -169,2 +169,23 @@ public DeviceIndex: number = -1, | ||
export class StopDeviceCmd extends ButtplugDeviceMessage { | ||
constructor(public DeviceIndex: number = -1, | ||
public Id: number = 1) { | ||
super(DeviceIndex, Id); | ||
} | ||
} | ||
export class StopAllDevices extends ButtplugMessage { | ||
constructor(public Id: number = 1) { | ||
super(Id); | ||
} | ||
} | ||
export class LovenseCmd extends ButtplugDeviceMessage { | ||
constructor(public Command: string, | ||
public DeviceIndex: number = -1, | ||
public Id: number = 1) { | ||
super(DeviceIndex, Id); | ||
} | ||
} | ||
let Messages = { | ||
@@ -185,5 +206,8 @@ Ok: Ok, | ||
ServerInfo: ServerInfo, | ||
FleshlightLaunchRawCmd: FleshlightLaunchRawCmd, | ||
KiirooRawCmd: KiirooRawCmd, | ||
SingleMotorVibrateCmd: SingleMotorVibrateCmd | ||
FleshlightLaunchFW12Cmd: FleshlightLaunchFW12Cmd, | ||
KiirooCmd: KiirooCmd, | ||
StopDeviceCmd: StopDeviceCmd, | ||
StopAllDevices: StopAllDevices, | ||
SingleMotorVibrateCmd: SingleMotorVibrateCmd, | ||
LovenseCmd: LovenseCmd | ||
}; | ||
@@ -190,0 +214,0 @@ |
@@ -97,3 +97,3 @@ import * as Messages from "../../src/core/messages"; | ||
{ | ||
await bp.SendDeviceMessage(x, new Messages.KiirooRawCmd(2)); | ||
await bp.SendDeviceMessage(x, new Messages.KiirooCmd(2)); | ||
throw Error("Should've thrown!"); | ||
@@ -100,0 +100,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
773203
7871
0