Socket
Socket
Sign inDemoInstall

@capacitor-community/barcode-scanner

Package Overview
Dependencies
2
Maintainers
31
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 2.0.0-alpha.0

dist/plugin.cjs.js

5

dist/esm/definitions.d.ts

@@ -1,6 +0,1 @@

declare module '@capacitor/core' {
interface PluginRegistry {
BarcodeScanner: BarcodeScannerPlugin;
}
}
export interface BarcodeScannerPlugin {

@@ -7,0 +2,0 @@ prepare(): Promise<void>;

0

dist/esm/definitions.js

@@ -0,0 +0,0 @@ export var SupportedFormat;

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

import type { BarcodeScannerPlugin } from './definitions';
declare const BarcodeScanner: BarcodeScannerPlugin;
export * from './definitions';
export * from './web';
export { BarcodeScanner };

@@ -0,3 +1,7 @@

import { registerPlugin } from '@capacitor/core';
const BarcodeScanner = registerPlugin('BarcodeScanner', {
web: () => import('./web').then(m => new m.BarcodeScannerWeb()),
});
export * from './definitions';
export * from './web';
export { BarcodeScanner };
//# sourceMappingURL=index.js.map
import { WebPlugin } from '@capacitor/core';
import { BarcodeScannerPlugin, ScanOptions, ScanResult, CheckPermissionOptions, CheckPermissionResult } from './definitions';
import type { BarcodeScannerPlugin, ScanOptions, ScanResult, CheckPermissionOptions, CheckPermissionResult } from './definitions';
export declare class BarcodeScannerWeb extends WebPlugin implements BarcodeScannerPlugin {
constructor();
prepare(): Promise<void>;

@@ -13,3 +12,1 @@ hideBackground(): Promise<void>;

}
declare const BarcodeScanner: BarcodeScannerWeb;
export { BarcodeScanner };

@@ -1,58 +0,25 @@

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import { WebPlugin } from '@capacitor/core';
export class BarcodeScannerWeb extends WebPlugin {
constructor() {
super({
name: 'BarcodeScanner',
platforms: ['web'],
});
async prepare() {
throw new Error('method not available in web');
}
prepare() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async hideBackground() {
throw new Error('method not available in web');
}
hideBackground() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async showBackground() {
throw new Error('method not available in web');
}
showBackground() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async startScan(_options) {
throw new Error('method not available in web');
}
startScan(_options) {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async stopScan() {
throw new Error('method not available in web');
}
stopScan() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async checkPermission(_options) {
throw new Error('method not available in web');
}
checkPermission(_options) {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async openAppSettings() {
throw new Error('method not available in web');
}
openAppSettings() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
}
}
const BarcodeScanner = new BarcodeScannerWeb();
export { BarcodeScanner };
import { registerWebPlugin } from '@capacitor/core';
registerWebPlugin(BarcodeScanner);
//# sourceMappingURL=web.js.map

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

var capacitorPlugin = (function (exports, core) {
var capacitorExample = (function (exports, core) {
'use strict';

@@ -29,59 +29,36 @@

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const BarcodeScanner = core.registerPlugin('BarcodeScanner', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BarcodeScannerWeb()),
});
class BarcodeScannerWeb extends core.WebPlugin {
constructor() {
super({
name: 'BarcodeScanner',
platforms: ['web'],
});
async prepare() {
throw new Error('method not available in web');
}
prepare() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async hideBackground() {
throw new Error('method not available in web');
}
hideBackground() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async showBackground() {
throw new Error('method not available in web');
}
showBackground() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async startScan(_options) {
throw new Error('method not available in web');
}
startScan(_options) {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async stopScan() {
throw new Error('method not available in web');
}
stopScan() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async checkPermission(_options) {
throw new Error('method not available in web');
}
checkPermission(_options) {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
async openAppSettings() {
throw new Error('method not available in web');
}
openAppSettings() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('method not available in web');
});
}
}
const BarcodeScanner = new BarcodeScannerWeb();
core.registerWebPlugin(BarcodeScanner);
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
BarcodeScannerWeb: BarcodeScannerWeb
});
exports.BarcodeScanner = BarcodeScanner;
exports.BarcodeScannerWeb = BarcodeScannerWeb;

@@ -88,0 +65,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

{
"name": "@capacitor-community/barcode-scanner",
"version": "1.2.1",
"version": "2.0.0-alpha.0",
"description": "A fast and efficient (QR) barcode scanner for Capacitor",

@@ -8,4 +8,27 @@ "main": "dist/plugin.js",

"types": "dist/esm/index.d.ts",
"unpkg": "dist/plugin.js",
"files": [
"android/src/main/",
"android/build.gradle",
"dist/",
"ios/Plugin/",
"CapacitorCommunityBarcodeScanner.podspec"
],
"author": "tafelnl",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/DutchConcepts/capacitor-barcode-scanner.git"
},
"bugs": {
"url": "https://github.com/DutchConcepts/capacitor-barcode-scanner/issues"
},
"keywords": [
"capacitor",
"plugin",
"native"
],
"scripts": {
"lint": "npm run prettier -- --check && npm run swiftlint -- lint",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",

@@ -18,11 +41,10 @@ "swiftlint": "node-swiftlint",

},
"author": "tafelnl",
"license": "MIT",
"devDependencies": {
"@capacitor/android": "^2.4.2",
"@capacitor/core": "^2.4.2",
"@capacitor/ios": "^2.4.2",
"@ionic/prettier-config": "^1.0.0",
"@ionic/swiftlint-config": "^1.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@capacitor/android": "^3.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/ios": "^3.0.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^7.11.0",
"husky": "^4.3.0",

@@ -33,21 +55,10 @@ "np": "^6.5.0",

"pretty-quick": "^3.1.0",
"rimraf": "^3.0.0",
"rollup": "^2.21.0",
"rimraf": "^3.0.2",
"rollup": "^2.32.0",
"swiftlint": "^1.0.1",
"typescript": "~3.8.3"
"typescript": "~4.0.3"
},
"peerDependencies": {
"@capacitor/core": "^2.4.2"
"@capacitor/core": "^3.0.0"
},
"files": [
"dist/",
"ios/",
"android/",
"CapacitorCommunityBarcodeScanner.podspec"
],
"keywords": [
"capacitor",
"plugin",
"native"
],
"capacitor": {

@@ -63,2 +74,5 @@ "ios": {

"swiftlint": "@ionic/swiftlint-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"husky": {

@@ -69,9 +83,2 @@ "hooks": {

},
"repository": {
"type": "git",
"url": "git+https://github.com/DutchConcepts/capacitor-barcode-scanner.git"
},
"bugs": {
"url": "https://github.com/DutchConcepts/capacitor-barcode-scanner/issues"
},
"homepage": "https://github.com/DutchConcepts/capacitor-barcode-scanner#readme",

@@ -78,0 +85,0 @@ "directories": {

@@ -25,3 +25,2 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)

@@ -53,37 +52,2 @@ - [Troubleshooting](#troubleshooting)

On iOS, no further steps are needed.
### Android
On Android, register the plugin in your main activity:
```java
import com.dutchconcepts.capacitor.barcodescanner.BarcodeScanner;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(
savedInstanceState,
new ArrayList<Class<? extends Plugin>>() {
{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
add(BarcodeScanner.class);
}
}
);
}
}
```
## Configuration
### iOS
For iOS you need to set a usage description in your info.plist file.

@@ -90,0 +54,0 @@

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

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc