@autorunify/capacitor-bleprinter 0.0.1
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/AutorunifyCapacitorBleprinter.podspec +17 -0
- package/Package.swift +28 -0
- package/README.md +342 -0
- package/android/build.gradle +67 -0
- package/android/libs/LPAPI-2024-10-21-R.jar +0 -0
- package/android/src/main/AndroidManifest.xml +21 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/AsyncManager.kt +118 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/BleDevice.kt +45 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/BleManager.kt +214 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/BlePrinter.kt +29 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/BlePrinterPlugin.kt +272 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/DotHanTechPrinter.kt +120 -0
- package/android/src/main/java/com/autorunify/capacitor/bleprinter/FormatManager.kt +13 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +1320 -0
- package/dist/esm/definitions.d.ts +56 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +14 -0
- package/dist/esm/web.js +14 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +28 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +31 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/BlePrinterPlugin/BlePrinter.swift +8 -0
- package/ios/Sources/BlePrinterPlugin/BlePrinterPlugin.swift +23 -0
- package/ios/Tests/BlePrinterPluginTests/BlePrinterTests.swift +15 -0
- package/package.json +81 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PluginListenerHandle } from '@capacitor/core';
|
|
2
|
+
export type PermissionState = 'denied' | 'granted';
|
|
3
|
+
export type PermissionKey = "android.permission.BLUETOOTH" | "android.permission.BLUETOOTH_ADMIN" | "android.permission.ACCESS_COARSE_LOCATION" | "android.permission.ACCESS_FINE_LOCATION" | "android.permission.BLUETOOTH_SCAN" | "android.permission.BLUETOOTH_CONNECT";
|
|
4
|
+
export type Permissions = {
|
|
5
|
+
[key in PermissionKey]: PermissionState;
|
|
6
|
+
};
|
|
7
|
+
export interface BluetoothState {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ConnectionState {
|
|
11
|
+
connected: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface BleDevice {
|
|
14
|
+
address: string;
|
|
15
|
+
name: string;
|
|
16
|
+
rssi: number;
|
|
17
|
+
}
|
|
18
|
+
export interface OnStateChangeEvent {
|
|
19
|
+
action: 'enabled' | 'connected';
|
|
20
|
+
state: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TimeoutOptions {
|
|
23
|
+
timeout?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface InitOptions {
|
|
26
|
+
manufacturer: 'DotHanTech';
|
|
27
|
+
}
|
|
28
|
+
export interface ScanOptions extends TimeoutOptions {
|
|
29
|
+
}
|
|
30
|
+
export interface ConnectOptions extends TimeoutOptions {
|
|
31
|
+
address: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PrintImageOptions {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
imageData: ImageDataArray;
|
|
37
|
+
}
|
|
38
|
+
export interface PrintImageResults {
|
|
39
|
+
state: 'success' | 'failed';
|
|
40
|
+
}
|
|
41
|
+
export interface ScanResults {
|
|
42
|
+
devices: Array<BleDevice>;
|
|
43
|
+
}
|
|
44
|
+
export interface BlePrinterPlugin {
|
|
45
|
+
checkPermissions(): Promise<Permissions>;
|
|
46
|
+
requestPermissions(): Promise<Permissions>;
|
|
47
|
+
isBluetoothEnabled(): Promise<BluetoothState>;
|
|
48
|
+
init(options: InitOptions): Promise<void>;
|
|
49
|
+
kill(): Promise<void>;
|
|
50
|
+
devices(options?: ScanOptions): Promise<ScanResults>;
|
|
51
|
+
isConnected(): Promise<ConnectionState>;
|
|
52
|
+
connect(options: ConnectOptions): Promise<void>;
|
|
53
|
+
disconnect(options?: TimeoutOptions): Promise<void>;
|
|
54
|
+
printImage(options: PrintImageOptions): Promise<PrintImageResults>;
|
|
55
|
+
addListener(event: 'state', callback: (e: OnStateChangeEvent) => void): Promise<PluginListenerHandle>;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core'\n\nexport type PermissionState = 'denied' | 'granted'\n\nexport type PermissionKey =\n \"android.permission.BLUETOOTH\" |\n \"android.permission.BLUETOOTH_ADMIN\" |\n \"android.permission.ACCESS_COARSE_LOCATION\" |\n \"android.permission.ACCESS_FINE_LOCATION\" |\n \"android.permission.BLUETOOTH_SCAN\" |\n \"android.permission.BLUETOOTH_CONNECT\"\n\n\nexport type Permissions = {\n [key in PermissionKey]: PermissionState;\n}\n\nexport interface BluetoothState {\n enabled: boolean;\n}\n\nexport interface ConnectionState {\n connected: boolean\n}\n\nexport interface BleDevice {\n address: string\n name: string\n rssi: number\n}\n\nexport interface OnStateChangeEvent {\n action: 'enabled' | 'connected'\n state: boolean\n}\n\nexport interface TimeoutOptions {\n timeout?: number\n}\n\nexport interface InitOptions {\n manufacturer: 'DotHanTech'\n}\n\nexport interface ScanOptions extends TimeoutOptions {\n\n}\n\nexport interface ConnectOptions extends TimeoutOptions {\n address: string\n}\n\nexport interface PrintImageOptions {\n width: number,\n height: number,\n imageData: ImageDataArray\n}\n\nexport interface PrintImageResults {\n state: 'success' | 'failed'\n}\n\nexport interface ScanResults {\n devices: Array<BleDevice>\n}\n\nexport interface BlePrinterPlugin {\n checkPermissions(): Promise<Permissions>;\n requestPermissions(): Promise<Permissions>;\n isBluetoothEnabled(): Promise<BluetoothState>;\n\n init(options: InitOptions): Promise<void>;\n kill(): Promise<void>\n\n devices(options?: ScanOptions): Promise<ScanResults>\n isConnected(): Promise<ConnectionState>;\n connect(options: ConnectOptions): Promise<void>;\n disconnect(options?: TimeoutOptions): Promise<void>;\n\n printImage(options: PrintImageOptions): Promise<PrintImageResults>\n\n\n addListener(\n event: 'state',\n callback: (e: OnStateChangeEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BlePrinterPlugin } from './definitions';\n\nconst BlePrinter = registerPlugin<BlePrinterPlugin>('BlePrinter', {\n web: () => import('./web').then((m) => new m.BlePrinterWeb()),\n});\n\nexport * from './definitions';\nexport { BlePrinter };\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { BlePrinterPlugin, Permissions, BluetoothState, ConnectionState, PrintImageResults } from './definitions';
|
|
3
|
+
export declare class BlePrinterWeb extends WebPlugin implements BlePrinterPlugin {
|
|
4
|
+
checkPermissions(): Promise<Permissions>;
|
|
5
|
+
requestPermissions(): Promise<Permissions>;
|
|
6
|
+
isBluetoothEnabled(): Promise<BluetoothState>;
|
|
7
|
+
init(): Promise<void>;
|
|
8
|
+
kill(): Promise<void>;
|
|
9
|
+
devices(): Promise<any>;
|
|
10
|
+
isConnected(): Promise<ConnectionState>;
|
|
11
|
+
connect(): Promise<void>;
|
|
12
|
+
disconnect(): Promise<void>;
|
|
13
|
+
printImage(): Promise<PrintImageResults>;
|
|
14
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class BlePrinterWeb extends WebPlugin {
|
|
3
|
+
async checkPermissions() { return {}; }
|
|
4
|
+
async requestPermissions() { return {}; }
|
|
5
|
+
async isBluetoothEnabled() { return {}; }
|
|
6
|
+
async init() { }
|
|
7
|
+
async kill() { }
|
|
8
|
+
async devices() { }
|
|
9
|
+
async isConnected() { return {}; }
|
|
10
|
+
async connect() { }
|
|
11
|
+
async disconnect() { }
|
|
12
|
+
async printImage() { return {}; }
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,gBAAgB,KAA2B,OAAO,EAAiB,CAAA,CAAC,CAAC;IAC3E,KAAK,CAAC,kBAAkB,KAA2B,OAAO,EAAiB,CAAA,CAAC,CAAC;IAC7E,KAAK,CAAC,kBAAkB,KAA8B,OAAO,EAAoB,CAAA,CAAC,CAAC;IAEnF,KAAK,CAAC,IAAI,KAAoB,CAAC;IAC/B,KAAK,CAAC,IAAI,KAAoB,CAAC;IAC/B,KAAK,CAAC,OAAO,KAAmB,CAAC;IACjC,KAAK,CAAC,WAAW,KAA+B,OAAO,EAAqB,CAAA,CAAC,CAAC;IAC9E,KAAK,CAAC,OAAO,KAAoB,CAAC;IAClC,KAAK,CAAC,UAAU,KAAoB,CAAC;IAErC,KAAK,CAAC,UAAU,KAAiC,OAAO,EAAuB,CAAA,CAAC,CAAC;CAClF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BlePrinterPlugin, Permissions, BluetoothState, ConnectionState,PrintImageResults } from './definitions';\n\nexport class BlePrinterWeb extends WebPlugin implements BlePrinterPlugin {\n async checkPermissions(): Promise<Permissions> { return {} as Permissions }\n async requestPermissions(): Promise<Permissions> { return {} as Permissions }\n async isBluetoothEnabled(): Promise<BluetoothState> { return {} as BluetoothState }\n\n async init(): Promise<void> { }\n async kill(): Promise<void> { }\n async devices(): Promise<any> { }\n async isConnected(): Promise<ConnectionState> { return {} as ConnectionState }\n async connect(): Promise<void> { }\n async disconnect(): Promise<void> { }\n\n async printImage(): Promise<PrintImageResults> { return {} as PrintImageResults }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
const BlePrinter = core.registerPlugin('BlePrinter', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.BlePrinterWeb()),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
class BlePrinterWeb extends core.WebPlugin {
|
|
10
|
+
async checkPermissions() { return {}; }
|
|
11
|
+
async requestPermissions() { return {}; }
|
|
12
|
+
async isBluetoothEnabled() { return {}; }
|
|
13
|
+
async init() { }
|
|
14
|
+
async kill() { }
|
|
15
|
+
async devices() { }
|
|
16
|
+
async isConnected() { return {}; }
|
|
17
|
+
async connect() { }
|
|
18
|
+
async disconnect() { }
|
|
19
|
+
async printImage() { return {}; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
23
|
+
__proto__: null,
|
|
24
|
+
BlePrinterWeb: BlePrinterWeb
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
exports.BlePrinter = BlePrinter;
|
|
28
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BlePrinter = registerPlugin('BlePrinter', {\n web: () => import('./web').then((m) => new m.BlePrinterWeb()),\n});\nexport * from './definitions';\nexport { BlePrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BlePrinterWeb extends WebPlugin {\n async checkPermissions() { return {}; }\n async requestPermissions() { return {}; }\n async isBluetoothEnabled() { return {}; }\n async init() { }\n async kill() { }\n async devices() { }\n async isConnected() { return {}; }\n async connect() { }\n async disconnect() { }\n async printImage() { return {}; }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1C,IAAI,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM,IAAI,GAAG,EAAE;AACnB,IAAI,MAAM,IAAI,GAAG,EAAE;AACnB,IAAI,MAAM,OAAO,GAAG,EAAE;AACtB,IAAI,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACrC,IAAI,MAAM,OAAO,GAAG,EAAE;AACtB,IAAI,MAAM,UAAU,GAAG,EAAE;AACzB,IAAI,MAAM,UAAU,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACpC;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var capacitorBlePrinter = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const BlePrinter = core.registerPlugin('BlePrinter', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.BlePrinterWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class BlePrinterWeb extends core.WebPlugin {
|
|
9
|
+
async checkPermissions() { return {}; }
|
|
10
|
+
async requestPermissions() { return {}; }
|
|
11
|
+
async isBluetoothEnabled() { return {}; }
|
|
12
|
+
async init() { }
|
|
13
|
+
async kill() { }
|
|
14
|
+
async devices() { }
|
|
15
|
+
async isConnected() { return {}; }
|
|
16
|
+
async connect() { }
|
|
17
|
+
async disconnect() { }
|
|
18
|
+
async printImage() { return {}; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
22
|
+
__proto__: null,
|
|
23
|
+
BlePrinterWeb: BlePrinterWeb
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
exports.BlePrinter = BlePrinter;
|
|
27
|
+
|
|
28
|
+
return exports;
|
|
29
|
+
|
|
30
|
+
})({}, capacitorExports);
|
|
31
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BlePrinter = registerPlugin('BlePrinter', {\n web: () => import('./web').then((m) => new m.BlePrinterWeb()),\n});\nexport * from './definitions';\nexport { BlePrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BlePrinterWeb extends WebPlugin {\n async checkPermissions() { return {}; }\n async requestPermissions() { return {}; }\n async isBluetoothEnabled() { return {}; }\n async init() { }\n async kill() { }\n async devices() { }\n async isConnected() { return {}; }\n async connect() { }\n async disconnect() { }\n async printImage() { return {}; }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1C,IAAI,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,IAAI,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,IAAI,MAAM,IAAI,GAAG,EAAE;IACnB,IAAI,MAAM,IAAI,GAAG,EAAE;IACnB,IAAI,MAAM,OAAO,GAAG,EAAE;IACtB,IAAI,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACrC,IAAI,MAAM,OAAO,GAAG,EAAE;IACtB,IAAI,MAAM,UAAU,GAAG,EAAE;IACzB,IAAI,MAAM,UAAU,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACpC;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Please read the Capacitor iOS Plugin Development Guide
|
|
6
|
+
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
|
+
*/
|
|
8
|
+
@objc(BlePrinterPlugin)
|
|
9
|
+
public class BlePrinterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
public let identifier = "BlePrinterPlugin"
|
|
11
|
+
public let jsName = "BlePrinter"
|
|
12
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
|
+
CAPPluginMethod(name: "echo", returnType: CAPPluginReturnPromise)
|
|
14
|
+
]
|
|
15
|
+
private let implementation = BlePrinter()
|
|
16
|
+
|
|
17
|
+
@objc func echo(_ call: CAPPluginCall) {
|
|
18
|
+
let value = call.getString("value") ?? ""
|
|
19
|
+
call.resolve([
|
|
20
|
+
"value": implementation.echo(value)
|
|
21
|
+
])
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
@testable import BlePrinterPlugin
|
|
3
|
+
|
|
4
|
+
class BlePrinterTests: XCTestCase {
|
|
5
|
+
func testEcho() {
|
|
6
|
+
// This is an example of a functional test case for a plugin.
|
|
7
|
+
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
8
|
+
|
|
9
|
+
let implementation = BlePrinter()
|
|
10
|
+
let value = "Hello, World!"
|
|
11
|
+
let result = implementation.echo(value)
|
|
12
|
+
|
|
13
|
+
XCTAssertEqual(value, result)
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autorunify/capacitor-bleprinter",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "ble printer plugin",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"unpkg": "dist/plugin.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"android/src/main/",
|
|
11
|
+
"android/build.gradle",
|
|
12
|
+
"android/libs/",
|
|
13
|
+
"dist/",
|
|
14
|
+
"ios/Sources",
|
|
15
|
+
"ios/Tests",
|
|
16
|
+
"Package.swift",
|
|
17
|
+
"AutorunifyCapacitorBleprinter.podspec"
|
|
18
|
+
],
|
|
19
|
+
"author": "autorunify",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/autorunify/auto-bleprinter.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/autorunify/auto-bleprinter/issues"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"capacitor",
|
|
30
|
+
"plugin",
|
|
31
|
+
"native"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
35
|
+
"verify:ios": "xcodebuild -scheme AutorunifyCapacitorBleprinter -destination generic/platform=iOS",
|
|
36
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
37
|
+
"verify:web": "npm run build",
|
|
38
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
39
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
40
|
+
"eslint": "eslint . --ext ts",
|
|
41
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
42
|
+
"swiftlint": "node-swiftlint",
|
|
43
|
+
"docgen": "docgen --api BlePrinterPlugin --output-readme README.md --output-json dist/docs.json",
|
|
44
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
45
|
+
"clean": "rimraf ./dist",
|
|
46
|
+
"watch": "tsc --watch",
|
|
47
|
+
"prepublishOnly": "npm run build"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@capacitor/android": "^8.0.0",
|
|
51
|
+
"@capacitor/core": "^8.0.0",
|
|
52
|
+
"@capacitor/docgen": "^0.3.1",
|
|
53
|
+
"@capacitor/ios": "^8.0.0",
|
|
54
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
55
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
56
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
57
|
+
"eslint": "^8.57.1",
|
|
58
|
+
"prettier": "^3.6.2",
|
|
59
|
+
"prettier-plugin-java": "^2.7.7",
|
|
60
|
+
"rimraf": "^6.1.0",
|
|
61
|
+
"rollup": "^4.53.2",
|
|
62
|
+
"swiftlint": "^2.0.0",
|
|
63
|
+
"typescript": "^5.9.3"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@capacitor/core": ">=8.0.0"
|
|
67
|
+
},
|
|
68
|
+
"prettier": "@ionic/prettier-config",
|
|
69
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
70
|
+
"eslintConfig": {
|
|
71
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
72
|
+
},
|
|
73
|
+
"capacitor": {
|
|
74
|
+
"ios": {
|
|
75
|
+
"src": "ios"
|
|
76
|
+
},
|
|
77
|
+
"android": {
|
|
78
|
+
"src": "android"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|