Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buttplug-wasm

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buttplug-wasm - npm Package Compare versions

Comparing version 1.0.0-beta5 to 1.0.0-beta6

dist/module/web_index.d.ts

8

CHANGELOG.md

@@ -1,3 +0,9 @@

# 1.0.0 Beta 5 (2020/12/13)
# 1.0.0 Beta 6 (2020/12/20)
## Bugfixes
- Fix webpack build/load strategies for static (CDN loadable) web package.
# 1.0.0 Beta 5 (2020/12/19)
## Features

@@ -4,0 +10,0 @@

import { ButtplugEmbeddedConnectorOptions, ButtplugWebsocketConnectorOptions } from "./connectors";
import { ButtplugMessageSorter } from "./sorter";
import { Buttplug } from "./buttplug_ffi";
export declare function buttplugInit(): Promise<void>;
export declare function connectEmbedded(sorter: ButtplugMessageSorter, clientPtr: number, options: ButtplugEmbeddedConnectorOptions): Promise<Buttplug.ButtplugFFIServerMessage>;

@@ -5,0 +6,0 @@ export declare function connectWebsocket(sorter: ButtplugMessageSorter, clientPtr: number, options: ButtplugWebsocketConnectorOptions): Promise<Buttplug.ButtplugFFIServerMessage>;

@@ -1,3 +0,31 @@

import { buttplug_create_client, buttplug_free_client, buttplug_parse_client_message, buttplug_activate_env_logger, buttplug_free_device, buttplug_create_device, buttplug_parse_device_message } from "./buttplug-rs-ffi/buttplug_rs_ffi";
import { Buttplug } from "./buttplug_ffi";
function must_run_init_1(a) {
throw new Error("Must run buttplugInit() async before calling any Buttplug methods!");
}
function must_run_init_2(a, b) {
throw new Error("Must run buttplugInit() async before calling any Buttplug methods!");
}
// import { buttplug_create_client, buttplug_free_client, buttplug_parse_client_message, buttplug_activate_env_logger, buttplug_free_device, buttplug_create_device, buttplug_parse_device_message } from "./buttplug-rs-ffi/buttplug_rs_ffi";
let buttplug_create_client = must_run_init_2;
let buttplug_free_client = must_run_init_1;
let buttplug_parse_client_message = must_run_init_2;
let buttplug_activate_env_logger = must_run_init_1;
let buttplug_free_device = must_run_init_1;
let buttplug_create_device = must_run_init_2;
let buttplug_parse_device_message = must_run_init_2;
export async function buttplugInit() {
console.log("trying to load new path?!");
let index = await import(/* webpackPrefetch: 1 */ "./buttplug-rs-ffi/buttplug_rs_ffi").catch((e) => {
console.log(e);
return Promise.reject(e);
});
console.log(index);
buttplug_create_client = index.buttplug_create_client;
buttplug_free_client = index.buttplug_free_client;
buttplug_parse_client_message = index.buttplug_parse_client_message;
buttplug_activate_env_logger = index.buttplug_activate_env_logger;
buttplug_free_device = index.buttplug_free_device;
buttplug_create_device = index.buttplug_create_device;
buttplug_parse_device_message = index.buttplug_parse_device_message;
}
function sendClientMessage(sorter, clientPtr, message) {

@@ -4,0 +32,0 @@ let promise = sorter.PrepareOutgoingMessage(message);

2

package.json

@@ -7,3 +7,3 @@ {

"description": "Buttplug WASM library for web applications (Node/Web). Does not work for native node at the moment.",
"version": "1.0.0-beta5",
"version": "1.0.0-beta6",
"license": "BSD-3-Clause",

@@ -10,0 +10,0 @@ "homepage": "https://buttplug.io",

@@ -0,1 +1,2 @@

/*
'use strict';

@@ -7,2 +8,3 @@ const path = require('path');

module.exports = {
name: "library",
mode: "development",

@@ -18,7 +20,12 @@ stats: {

},
entry: path.resolve('./src/bootstrap.ts'),
entry: path.resolve('./src/index.ts'),
output: {
path: path.resolve('./dist/web'),
publicPath: '/dist/web',
filename: 'build.js'
filename: 'buttplug.js',
libraryTarget: 'umd',
library: {
root: "Buttplug",
amd: "buttplug-amd",
commonjs: "buttplug-commonjs"
}
},

@@ -86,1 +93,63 @@ module: {

};
*/
'use strict';
var path = require('path');
var webpack = require('webpack');
module.exports = [{
name: "library",
mode: "development",
stats: {
assets: false,
colors: true,
version: false,
hash: true,
timings: true,
chunks: false,
chunkModules: false
},
entry: path.resolve('./src/web_index.ts'),
output: {
path: path.resolve('./dist/web'),
filename: 'buttplug.js',
libraryTarget: 'umd',
publicPath: "/",
library: {
root: "Buttplug",
amd: "buttplug-amd",
commonjs: "buttplug-commonjs"
}
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules|vue\/src|tests|example/,
use: [{
loader: 'ts-loader',
options: {
transpileOnly: true
}
}]
}
]
},
resolve: {
extensions: [".ts", ".js"]
},
devServer: {
historyApiFallback: true,
noInfo: true
},
performance: {
hints: false
},
devtool: 'inline-source-map',
plugins: [
new webpack.NamedModulesPlugin()
],
node: {
fs: 'empty'
}
}];

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc