@simplymobile/capacitor-bixolon-printer 8.1.0 → 9.0.0
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/Package.swift +27 -28
- package/SimplymobileCapacitorBixolonPrinter.podspec +17 -17
- package/android/build.gradle +56 -56
- package/android/proguard-rules.pro +21 -0
- package/android/src/main/java/pl/simplymobile/plugins/bixolonprinter/BixolonPrinterPlugin.java +29 -47
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +10 -12
package/Package.swift
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
// swift-tools-version: 5.9
|
|
2
|
-
import PackageDescription
|
|
3
|
-
|
|
4
|
-
let package = Package(
|
|
5
|
-
name: "SimplymobileCapacitorBixolonPrinter",
|
|
6
|
-
platforms: [.iOS(.
|
|
7
|
-
products: [
|
|
8
|
-
.library(
|
|
9
|
-
name: "SimplymobileCapacitorBixolonPrinter",
|
|
10
|
-
targets: ["BixolonPrinterPlugin"])
|
|
11
|
-
],
|
|
12
|
-
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor
|
|
14
|
-
],
|
|
15
|
-
targets: [
|
|
16
|
-
.target(
|
|
17
|
-
name: "BixolonPrinterPlugin",
|
|
18
|
-
dependencies: [
|
|
19
|
-
.product(name: "Capacitor", package: "capacitor
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
)
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "SimplymobileCapacitorBixolonPrinter",
|
|
6
|
+
platforms: [.iOS(.v16)],
|
|
7
|
+
products: [
|
|
8
|
+
.library(
|
|
9
|
+
name: "SimplymobileCapacitorBixolonPrinter",
|
|
10
|
+
targets: ["BixolonPrinterPlugin"])
|
|
11
|
+
],
|
|
12
|
+
dependencies: [
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor.git", from: "9.0.0")
|
|
14
|
+
],
|
|
15
|
+
targets: [
|
|
16
|
+
.target(
|
|
17
|
+
name: "BixolonPrinterPlugin",
|
|
18
|
+
dependencies: [
|
|
19
|
+
.product(name: "Capacitor", package: "capacitor")
|
|
20
|
+
],
|
|
21
|
+
path: "ios/Sources/BixolonPrinterPlugin"),
|
|
22
|
+
.testTarget(
|
|
23
|
+
name: "BixolonPrinterPluginTests",
|
|
24
|
+
dependencies: ["BixolonPrinterPlugin"],
|
|
25
|
+
path: "ios/Tests/BixolonPrinterPluginTests")
|
|
26
|
+
]
|
|
27
|
+
)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = 'SimplymobileCapacitorBixolonPrinter'
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.license = package['license']
|
|
10
|
-
s.homepage = package['repository']['url']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target
|
|
15
|
-
s.dependency 'Capacitor'
|
|
16
|
-
s.swift_version = '5.1'
|
|
17
|
-
end
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'SimplymobileCapacitorBixolonPrinter'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '16.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/android/build.gradle
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
ext {
|
|
2
|
-
junitVersion =
|
|
3
|
-
androidxAppCompatVersion =
|
|
4
|
-
androidxJunitVersion =
|
|
5
|
-
androidxEspressoCoreVersion =
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
buildscript {
|
|
9
|
-
repositories {
|
|
10
|
-
google()
|
|
11
|
-
mavenCentral()
|
|
12
|
-
}
|
|
13
|
-
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
apply plugin: 'com.android.library'
|
|
19
|
-
|
|
20
|
-
android {
|
|
21
|
-
namespace = "pl.simplymobile.plugins.bixolonprinter"
|
|
22
|
-
compileSdk =
|
|
23
|
-
defaultConfig {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
versionCode 1
|
|
27
|
-
versionName "1.0"
|
|
28
|
-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
|
-
}
|
|
30
|
-
buildTypes {
|
|
31
|
-
release {
|
|
32
|
-
minifyEnabled false
|
|
33
|
-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
lintOptions {
|
|
37
|
-
abortOnError = false
|
|
38
|
-
}
|
|
39
|
-
compileOptions {
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = rootProject.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = rootProject.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
|
|
4
|
+
androidxJunitVersion = rootProject.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = rootProject.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:9.4.1'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
namespace = "pl.simplymobile.plugins.bixolonprinter"
|
|
22
|
+
compileSdk = rootProject.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
|
|
23
|
+
defaultConfig {
|
|
24
|
+
consumerProguardFiles "proguard-rules.pro"
|
|
25
|
+
minSdkVersion = rootProject.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
26
|
+
versionCode 1
|
|
27
|
+
versionName "1.0"
|
|
28
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
|
+
}
|
|
30
|
+
buildTypes {
|
|
31
|
+
release {
|
|
32
|
+
minifyEnabled false
|
|
33
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
lintOptions {
|
|
37
|
+
abortOnError = false
|
|
38
|
+
}
|
|
39
|
+
compileOptions {
|
|
40
40
|
sourceCompatibility JavaVersion.VERSION_21
|
|
41
41
|
targetCompatibility JavaVersion.VERSION_21
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
repositories {
|
|
46
|
-
google()
|
|
47
|
-
mavenCentral()
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
dependencies {
|
|
52
|
-
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
|
-
implementation project(':capacitor-android')
|
|
54
|
-
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
-
testImplementation "junit:junit:$junitVersion"
|
|
56
|
-
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
|
-
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
58
|
-
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
repositories {
|
|
46
|
+
google()
|
|
47
|
+
mavenCentral()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
dependencies {
|
|
52
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
|
+
implementation project(':capacitor-android')
|
|
54
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
+
testImplementation "junit:junit:$junitVersion"
|
|
56
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Add project specific ProGuard rules here.
|
|
2
|
+
# You can control the set of applied configuration files using the
|
|
3
|
+
# proguardFiles setting in build.gradle.
|
|
4
|
+
#
|
|
5
|
+
# For more details, see
|
|
6
|
+
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
7
|
+
|
|
8
|
+
# If your project uses WebView with JS, uncomment the following
|
|
9
|
+
# and specify the fully qualified class name to the JavaScript interface
|
|
10
|
+
# class:
|
|
11
|
+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
12
|
+
# public *;
|
|
13
|
+
#}
|
|
14
|
+
|
|
15
|
+
# Uncomment this to preserve the line number information for
|
|
16
|
+
# debugging stack traces.
|
|
17
|
+
#-keepattributes SourceFile,LineNumberTable
|
|
18
|
+
|
|
19
|
+
# If you keep the line number information, uncomment this to
|
|
20
|
+
# hide the original source file name.
|
|
21
|
+
#-renamesourcefileattribute SourceFile
|
package/android/src/main/java/pl/simplymobile/plugins/bixolonprinter/BixolonPrinterPlugin.java
CHANGED
|
@@ -50,12 +50,6 @@ public class BixolonPrinterPlugin extends Plugin {
|
|
|
50
50
|
private BluetoothDevice mmDevice;
|
|
51
51
|
|
|
52
52
|
private OutputStream mmOutputStream;
|
|
53
|
-
private InputStream mmInputStream;
|
|
54
|
-
|
|
55
|
-
private Thread workerThread;
|
|
56
|
-
private byte[] readBuffer;
|
|
57
|
-
private int readBufferPosition;
|
|
58
|
-
private volatile boolean stopWorker;
|
|
59
53
|
|
|
60
54
|
private static final byte[] ESC_ALIGN_LEFT = { 0x1B, 0x61, 0x00 };
|
|
61
55
|
private static final byte[] ESC_ALIGN_RIGHT = { 0x1B, 0x61, 0x02 };
|
|
@@ -185,11 +179,11 @@ public class BixolonPrinterPlugin extends Plugin {
|
|
|
185
179
|
|
|
186
180
|
// Standard SerialPortService ID
|
|
187
181
|
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
|
|
182
|
+
closeSocketQuietly();
|
|
188
183
|
mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);
|
|
189
184
|
mmSocket.connect();
|
|
190
185
|
mmOutputStream = mmSocket.getOutputStream();
|
|
191
|
-
|
|
192
|
-
beginListenForData();
|
|
186
|
+
drainInput(mmSocket.getInputStream());
|
|
193
187
|
|
|
194
188
|
Log.d(LOG_TAG, "BLUETOOTH OPENED: " + mmDevice.getName());
|
|
195
189
|
JSObject ret = new JSObject();
|
|
@@ -197,25 +191,33 @@ public class BixolonPrinterPlugin extends Plugin {
|
|
|
197
191
|
call.resolve(ret);
|
|
198
192
|
} catch (Exception e) {
|
|
199
193
|
Log.e(LOG_TAG, "connect failed", e);
|
|
194
|
+
closeSocketQuietly();
|
|
200
195
|
call.reject(e.getMessage(), e);
|
|
201
196
|
}
|
|
202
197
|
}
|
|
203
198
|
|
|
199
|
+
private void closeSocketQuietly() {
|
|
200
|
+
if (mmSocket != null) {
|
|
201
|
+
try {
|
|
202
|
+
mmSocket.close();
|
|
203
|
+
} catch (IOException ignored) {
|
|
204
|
+
// już zamknięte
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
mmSocket = null;
|
|
208
|
+
mmOutputStream = null;
|
|
209
|
+
}
|
|
210
|
+
|
|
204
211
|
@PluginMethod
|
|
205
212
|
public void disconnect(PluginCall call) {
|
|
206
213
|
try {
|
|
207
|
-
stopWorker = true;
|
|
208
214
|
if (mmOutputStream != null) {
|
|
209
215
|
mmOutputStream.close();
|
|
210
216
|
}
|
|
211
|
-
if (mmInputStream != null) {
|
|
212
|
-
mmInputStream.close();
|
|
213
|
-
}
|
|
214
217
|
if (mmSocket != null) {
|
|
215
218
|
mmSocket.close();
|
|
216
219
|
}
|
|
217
220
|
mmOutputStream = null;
|
|
218
|
-
mmInputStream = null;
|
|
219
221
|
mmSocket = null;
|
|
220
222
|
call.resolve();
|
|
221
223
|
} catch (Exception e) {
|
|
@@ -415,41 +417,21 @@ public class BixolonPrinterPlugin extends Plugin {
|
|
|
415
417
|
return false;
|
|
416
418
|
}
|
|
417
419
|
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
private void
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
workerThread = new Thread(() -> {
|
|
427
|
-
while (!Thread.currentThread().isInterrupted() && !stopWorker) {
|
|
428
|
-
try {
|
|
429
|
-
int bytesAvailable = mmInputStream.available();
|
|
430
|
-
if (bytesAvailable > 0) {
|
|
431
|
-
byte[] packetBytes = new byte[bytesAvailable];
|
|
432
|
-
mmInputStream.read(packetBytes);
|
|
433
|
-
for (int i = 0; i < bytesAvailable; i++) {
|
|
434
|
-
byte b = packetBytes[i];
|
|
435
|
-
if (b == delimiter) {
|
|
436
|
-
byte[] encodedBytes = new byte[readBufferPosition];
|
|
437
|
-
System.arraycopy(readBuffer, 0, encodedBytes, 0, encodedBytes.length);
|
|
438
|
-
readBufferPosition = 0;
|
|
439
|
-
} else {
|
|
440
|
-
readBuffer[readBufferPosition++] = b;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
} catch (IOException ex) {
|
|
445
|
-
stopWorker = true;
|
|
446
|
-
}
|
|
420
|
+
// Odpowiedzi drukarki nie są używane, ale ktoś musi je czytać, żeby bufor RFCOMM się nie zapchał.
|
|
421
|
+
// Blokujący read kończy się wyjątkiem albo -1, gdy disconnect zamknie gniazdo.
|
|
422
|
+
private static void drainInput(InputStream in) {
|
|
423
|
+
Thread drainer = new Thread(() -> {
|
|
424
|
+
byte[] buffer = new byte[1024];
|
|
425
|
+
try {
|
|
426
|
+
while (in.read(buffer) != -1) {
|
|
427
|
+
// dane odrzucane
|
|
447
428
|
}
|
|
448
|
-
})
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
429
|
+
} catch (IOException ignored) {
|
|
430
|
+
// gniazdo zamknięte
|
|
431
|
+
}
|
|
432
|
+
}, "bixolon-drain");
|
|
433
|
+
drainer.setDaemon(true);
|
|
434
|
+
drainer.start();
|
|
453
435
|
}
|
|
454
436
|
|
|
455
437
|
// align text
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BixolonPrinter = registerPlugin('BixolonPrinter', {\n web: () => import('./web').then(m => new m.BixolonPrinterWeb()),\n});\nexport * from './definitions';\nexport { BixolonPrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BixolonPrinterWeb extends WebPlugin {\n async checkPermissions() {\n return { bluetooth: 'denied' };\n }\n async requestPermissions() {\n return { bluetooth: 'denied' };\n }\n async list() {\n console.log('NOT IMPLEMENTED');\n return { devices: [] };\n }\n async getStatus() {\n console.log('NOT IMPLEMENTED');\n return { enabled: false, connected: false };\n }\n async connect(options) {\n console.log('NOT IMPLEMENTED', options.name);\n return { message: 'NOT IMPLEMENTED' };\n }\n async disconnect() {\n console.log('NOT IMPLEMENTED');\n }\n async printText(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async printBase64(options) {\n console.log('NOT IMPLEMENTED', options.align);\n }\n async printImageUrl(options) {\n console.log('NOT IMPLEMENTED', options.url, options.align);\n }\n async printPOSCommand(options) {\n console.log('NOT IMPLEMENTED', options.command);\n }\n async printQRCode(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async cutPaper() {\n console.log('NOT IMPLEMENTED');\n }\n async setBrand(options) {\n console.log('NOT IMPLEMENTED', options.brand);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACnE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AACtC,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AACtC,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;AACtC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;AAC9B,IAAI;AACJ,IAAI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CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC;AACrD,IAAI;AACJ
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BixolonPrinter = registerPlugin('BixolonPrinter', {\n web: () => import('./web').then(m => new m.BixolonPrinterWeb()),\n});\nexport * from './definitions';\nexport { BixolonPrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BixolonPrinterWeb extends WebPlugin {\n async checkPermissions() {\n return { bluetooth: 'denied' };\n }\n async requestPermissions() {\n return { bluetooth: 'denied' };\n }\n async list() {\n console.log('NOT IMPLEMENTED');\n return { devices: [] };\n }\n async getStatus() {\n console.log('NOT IMPLEMENTED');\n return { enabled: false, connected: false };\n }\n async connect(options) {\n console.log('NOT IMPLEMENTED', options.name);\n return { message: 'NOT IMPLEMENTED' };\n }\n async disconnect() {\n console.log('NOT IMPLEMENTED');\n }\n async printText(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async printBase64(options) {\n console.log('NOT IMPLEMENTED', options.align);\n }\n async printImageUrl(options) {\n console.log('NOT IMPLEMENTED', options.url, options.align);\n }\n async printPOSCommand(options) {\n console.log('NOT IMPLEMENTED', options.command);\n }\n async printQRCode(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async cutPaper() {\n console.log('NOT IMPLEMENTED');\n }\n async setBrand(options) {\n console.log('NOT IMPLEMENTED', options.brand);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACnE,CAAC;;ACFM,MAAM,iBA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,MAAM,eAAe,CAAC,OAAO,EAAE;AACnC,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC;AACvD,IAAI;AACJ,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC;AACpD,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;AACtC,IAAI;AACJ,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC;AACrD,IAAI;AACJ;;;;;;;"}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BixolonPrinter = registerPlugin('BixolonPrinter', {\n web: () => import('./web').then(m => new m.BixolonPrinterWeb()),\n});\nexport * from './definitions';\nexport { BixolonPrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BixolonPrinterWeb extends WebPlugin {\n async checkPermissions() {\n return { bluetooth: 'denied' };\n }\n async requestPermissions() {\n return { bluetooth: 'denied' };\n }\n async list() {\n console.log('NOT IMPLEMENTED');\n return { devices: [] };\n }\n async getStatus() {\n console.log('NOT IMPLEMENTED');\n return { enabled: false, connected: false };\n }\n async connect(options) {\n console.log('NOT IMPLEMENTED', options.name);\n return { message: 'NOT IMPLEMENTED' };\n }\n async disconnect() {\n console.log('NOT IMPLEMENTED');\n }\n async printText(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async printBase64(options) {\n console.log('NOT IMPLEMENTED', options.align);\n }\n async printImageUrl(options) {\n console.log('NOT IMPLEMENTED', options.url, options.align);\n }\n async printPOSCommand(options) {\n console.log('NOT IMPLEMENTED', options.command);\n }\n async printQRCode(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async cutPaper() {\n console.log('NOT IMPLEMENTED');\n }\n async setBrand(options) {\n console.log('NOT IMPLEMENTED', options.brand);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACnE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;IACtC,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;IACtC,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9B,IAAI;IACJ,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE;IACnD,IAAI;IACJ,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;IAC3B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC;IACpD,QAAQ,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE;IAC7C,IAAI;IACJ,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,IAAI;IACJ,IAAI,MAAM,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC;IACpD,IAAI;IACJ,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC;IACrD,IAAI;IACJ,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;IACjC,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC;IAClE,IAAI;IACJ,IAAI,MAAM,eAAe,CAAC,OAAO,EAAE;IACnC,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC;IACvD,IAAI;IACJ,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC;IACpD,IAAI;IACJ,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,IAAI;IACJ,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC;IACrD,IAAI;IACJ
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst BixolonPrinter = registerPlugin('BixolonPrinter', {\n web: () => import('./web').then(m => new m.BixolonPrinterWeb()),\n});\nexport * from './definitions';\nexport { BixolonPrinter };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BixolonPrinterWeb extends WebPlugin {\n async checkPermissions() {\n return { bluetooth: 'denied' };\n }\n async requestPermissions() {\n return { bluetooth: 'denied' };\n }\n async list() {\n console.log('NOT IMPLEMENTED');\n return { devices: [] };\n }\n async getStatus() {\n console.log('NOT IMPLEMENTED');\n return { enabled: false, connected: false };\n }\n async connect(options) {\n console.log('NOT IMPLEMENTED', options.name);\n return { message: 'NOT IMPLEMENTED' };\n }\n async disconnect() {\n console.log('NOT IMPLEMENTED');\n }\n async printText(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async printBase64(options) {\n console.log('NOT IMPLEMENTED', options.align);\n }\n async printImageUrl(options) {\n console.log('NOT IMPLEMENTED', options.url, options.align);\n }\n async printPOSCommand(options) {\n console.log('NOT IMPLEMENTED', options.command);\n }\n async printQRCode(options) {\n console.log('NOT IMPLEMENTED', options.text);\n }\n async cutPaper() {\n console.log('NOT IMPLEMENTED');\n }\n async setBrand(options) {\n console.log('NOT IMPLEMENTED', options.brand);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACnE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;IACtC,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;IACtC,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9B,IAAI;IACJ,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,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CAAC,KAAK,CAAC;IACrD,IAAI;IACJ;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplymobile/capacitor-bixolon-printer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Capacitor Bixolon Bluetooth printer plugin",
|
|
5
5
|
"author": "SimplyMobile",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"ios/Sources",
|
|
16
16
|
"ios/Tests",
|
|
17
17
|
"Package.swift",
|
|
18
|
-
"SimplymobileCapacitorBixolonPrinter.podspec"
|
|
18
|
+
"SimplymobileCapacitorBixolonPrinter.podspec",
|
|
19
|
+
"android/proguard-rules.pro"
|
|
19
20
|
],
|
|
20
21
|
"keywords": [
|
|
21
22
|
"capacitor",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"verify:web": "npm run build",
|
|
33
34
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
34
35
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
35
|
-
"eslint": "eslint .
|
|
36
|
+
"eslint": "eslint .",
|
|
36
37
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
37
38
|
"swiftlint": "node-swiftlint",
|
|
38
39
|
"docgen": "docgen --api BixolonPrinterPlugin --output-readme README.md --output-json dist/docs.json",
|
|
@@ -42,14 +43,14 @@
|
|
|
42
43
|
"prepublishOnly": "npm run build"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@capacitor/android": "^
|
|
46
|
-
"@capacitor/core": "^
|
|
46
|
+
"@capacitor/android": "^9.0.0",
|
|
47
|
+
"@capacitor/core": "^9.0.0",
|
|
47
48
|
"@capacitor/docgen": "^0.3.1",
|
|
48
|
-
"@capacitor/ios": "^
|
|
49
|
-
"@ionic/eslint-config": "^0.
|
|
49
|
+
"@capacitor/ios": "^9.0.0",
|
|
50
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
50
51
|
"@ionic/prettier-config": "^4.0.0",
|
|
51
52
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
52
|
-
"eslint": "^
|
|
53
|
+
"eslint": "^10.0.0",
|
|
53
54
|
"prettier": "^3.6.2",
|
|
54
55
|
"prettier-plugin-java": "^2.7.7",
|
|
55
56
|
"rimraf": "^6.1.0",
|
|
@@ -58,10 +59,7 @@
|
|
|
58
59
|
"typescript": "^5.9.3"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"@capacitor/core": ">=
|
|
62
|
-
},
|
|
63
|
-
"eslintConfig": {
|
|
64
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
62
|
+
"@capacitor/core": ">=9.0.0"
|
|
65
63
|
},
|
|
66
64
|
"prettier": "@ionic/prettier-config",
|
|
67
65
|
"swiftlint": "@ionic/swiftlint-config",
|