@sincpro/printer-expo 1.0.4 → 1.0.5
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/android/build.gradle
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expo Module for Bixolon Thermal Printer
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: Kotlin formatting
|
|
5
|
+
* - Use Android Studio/IntelliJ IDE formatter (Code → Reformat Code)
|
|
6
|
+
* - Do NOT use ktlint - it conflicts with Expo Modules API lambda syntax
|
|
7
|
+
* - Zero-parameter Coroutine lambdas require trailing arrow: { -> ... }
|
|
8
|
+
*/
|
|
1
9
|
package sincpro.expo.printer.entrypoint
|
|
2
10
|
|
|
3
11
|
import android.content.Context
|
|
@@ -82,13 +90,13 @@ class PrinterModule : Module() {
|
|
|
82
90
|
).getOrThrow()
|
|
83
91
|
}
|
|
84
92
|
|
|
85
|
-
AsyncFunction("connectUsb") Coroutine {
|
|
93
|
+
AsyncFunction("connectUsb") Coroutine { ->
|
|
86
94
|
sdk.bixolon.connectivity
|
|
87
95
|
.connectUsb()
|
|
88
96
|
.getOrThrow()
|
|
89
97
|
}
|
|
90
98
|
|
|
91
|
-
AsyncFunction("disconnect") Coroutine {
|
|
99
|
+
AsyncFunction("disconnect") Coroutine { ->
|
|
92
100
|
sdk.bixolon.connectivity
|
|
93
101
|
.disconnect()
|
|
94
102
|
.getOrThrow()
|
|
@@ -98,7 +106,7 @@ class PrinterModule : Module() {
|
|
|
98
106
|
sdk.bixolon.connectivity.isConnected()
|
|
99
107
|
}
|
|
100
108
|
|
|
101
|
-
AsyncFunction("getStatus") Coroutine {
|
|
109
|
+
AsyncFunction("getStatus") Coroutine { ->
|
|
102
110
|
val status =
|
|
103
111
|
sdk.bixolon.connectivity
|
|
104
112
|
.getStatus()
|
|
@@ -113,7 +121,7 @@ class PrinterModule : Module() {
|
|
|
113
121
|
)
|
|
114
122
|
}
|
|
115
123
|
|
|
116
|
-
AsyncFunction("getInfo") Coroutine {
|
|
124
|
+
AsyncFunction("getInfo") Coroutine { ->
|
|
117
125
|
val info =
|
|
118
126
|
sdk.bixolon.connectivity
|
|
119
127
|
.getInfo()
|
package/package.json
CHANGED