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

@goki-lock/react-native

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goki-lock/react-native - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

24

lib/index.js

@@ -1,12 +0,16 @@

import './polyfill';
import createGokiLockSDK from "@goki-lock/core";
import { RNBluetoothConnector } from "./RNBluetoothConnector";
import { Logger } from "@goki-lock/core";
export { Logger } from "@goki-lock/core";
export const GokiLockSDK = createGokiLockSDK({
connector: new RNBluetoothConnector()
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GokiLockSDK = exports.Logger = void 0;
require("./polyfill");
const core_1 = __importDefault(require("@goki-lock/core"));
const RNBluetoothConnector_1 = require("./RNBluetoothConnector");
var core_2 = require("@goki-lock/core");
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return core_2.Logger; } });
exports.GokiLockSDK = (0, core_1.default)({
connector: new RNBluetoothConnector_1.RNBluetoothConnector()
});
if (__DEV__)
Logger.setLogLevel(Logger.LogLevel.debug);
export default GokiLockSDK;
exports.default = exports.GokiLockSDK;
//# sourceMappingURL=index.js.map

@@ -1,10 +0,12 @@

import 'text-encoding-polyfill';
import { Buffer } from 'buffer';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("text-encoding-polyfill");
const buffer_1 = require("buffer");
// @ts-ignore
if (!global.Buffer) {
// @ts-ignore
global['Buffer'] = Buffer;
const originalSubArray = Buffer.prototype.subarray;
Buffer.prototype.subarray = function (...args) {
return Buffer.from(originalSubArray.apply(this, args));
global['Buffer'] = buffer_1.Buffer;
const originalSubArray = buffer_1.Buffer.prototype.subarray;
buffer_1.Buffer.prototype.subarray = function (...args) {
return buffer_1.Buffer.from(originalSubArray.apply(this, args));
};

@@ -11,0 +13,0 @@ }

@@ -1,4 +0,7 @@

import { Logger } from "@goki-lock/core";
import { BleManager } from 'react-native-ble-plx';
import { Buffer } from "buffer";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RNBluetoothConnector = void 0;
const core_1 = require("@goki-lock/core");
const react_native_ble_plx_1 = require("react-native-ble-plx");
const buffer_1 = require("buffer");
class MyCharacteristic {

@@ -24,3 +27,3 @@ constructor(characteristic) {

if (characteristic === null || characteristic === void 0 ? void 0 : characteristic.value) {
(_a = this.onDataListener) === null || _a === void 0 ? void 0 : _a.call(this, Buffer.from(characteristic.value, 'base64'));
(_a = this.onDataListener) === null || _a === void 0 ? void 0 : _a.call(this, buffer_1.Buffer.from(characteristic.value, 'base64'));
}

@@ -87,7 +90,7 @@ });

}
export class RNBluetoothConnector {
class RNBluetoothConnector {
constructor() {
this.logger = Logger.withTag("RNBluetoothConnector");
this.logger = core_1.Logger.withTag("RNBluetoothConnector");
this.LockServiceUUIDs = ["1910", "00001910-0000-1000-8000-00805f9b34fb"];
this.bleManager = new BleManager();
this.bleManager = new react_native_ble_plx_1.BleManager();
this.peripheralCache = new Map();

@@ -151,2 +154,3 @@ this.connect = this.connect.bind(this);

}
exports.RNBluetoothConnector = RNBluetoothConnector;
//# sourceMappingURL=RNBluetoothConnector.js.map
{
"name": "@goki-lock/react-native",
"version": "0.0.6",
"version": "0.0.7",
"description": "goki lock sdk",

@@ -24,4 +24,3 @@ "files": [

"build": "rm -rf ./lib && tsc -p ./tsconfig.json",
"prepack": "yarn build",
"postinstall": "patch-package"
"prepack": "yarn build"
},

@@ -32,5 +31,3 @@ "dependencies": {

"buffer": "6.0.3",
"patch-package": "^6.4.7",
"react-native-ble-plx": "2.0.3",
"stream-browserify": "3.0.0",
"text-encoding-polyfill": "0.6.7"

@@ -37,0 +34,0 @@ },

@@ -15,2 +15,21 @@ ## Goki lock sdk for react-native

then add the `stream` alias to your metro.config.js
& install `stream-browserify` if needed
```javascript
module.exports = {
// ...
resolver: {
extraNodeModules: {
'stream': require.resolve('stream-browserify'),
},
},
//...
}
```
```js
please follow [react-native-ble-plx@2.+](https://github.com/dotintent/react-native-ble-plx)

@@ -17,0 +36,0 @@ documentation and install it and add the required permissions to your app.

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