@rdlabo/capacitor-brotherprint 2.0.0-2 → 4.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.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = ['ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}']
14
- s.ios.deployment_target = '12.0'
14
+ s.ios.deployment_target = '13.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.dependency 'BRLMPrinterKit'
17
17
  s.swift_version = '5.1'
@@ -1,26 +1,26 @@
1
1
  ext {
2
- junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
3
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
4
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
4
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
5
5
  }
6
6
 
7
7
  buildscript {
8
8
  repositories {
9
9
  google()
10
- jcenter()
10
+ mavenCentral()
11
11
  }
12
12
  dependencies {
13
- classpath 'com.android.tools.build:gradle:3.6.1'
13
+ classpath 'com.android.tools.build:gradle:7.2.1'
14
14
  }
15
15
  }
16
16
 
17
17
  apply plugin: 'com.android.library'
18
18
 
19
19
  android {
20
- compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 29
20
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
21
21
  defaultConfig {
22
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
23
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 29
22
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
23
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
24
24
  versionCode 1
25
25
  versionName "1.0"
26
26
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -38,7 +38,7 @@ android {
38
38
 
39
39
  repositories {
40
40
  google()
41
- jcenter()
41
+ mavenCentral()
42
42
  mavenCentral()
43
43
  }
44
44
 
package/android/gradlew CHANGED
@@ -1,7 +1,7 @@
1
- #!/usr/bin/env sh
1
+ #!/bin/sh
2
2
 
3
3
  #
4
- # Copyright 2015 the original author or authors.
4
+ # Copyright © 2015-2021 the original authors.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -17,78 +17,113 @@
17
17
  #
18
18
 
19
19
  ##############################################################################
20
- ##
21
- ## Gradle start up script for UN*X
22
- ##
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
23
63
  ##############################################################################
24
64
 
25
65
  # Attempt to set APP_HOME
66
+
26
67
  # Resolve links: $0 may be a link
27
- PRG="$0"
28
- # Need this for relative symlinks.
29
- while [ -h "$PRG" ] ; do
30
- ls=`ls -ld "$PRG"`
31
- link=`expr "$ls" : '.*-> \(.*\)$'`
32
- if expr "$link" : '/.*' > /dev/null; then
33
- PRG="$link"
34
- else
35
- PRG=`dirname "$PRG"`"/$link"
36
- fi
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
37
81
  done
38
- SAVED="`pwd`"
39
- cd "`dirname \"$PRG\"`/" >/dev/null
40
- APP_HOME="`pwd -P`"
41
- cd "$SAVED" >/dev/null
82
+
83
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
42
84
 
43
85
  APP_NAME="Gradle"
44
- APP_BASE_NAME=`basename "$0"`
86
+ APP_BASE_NAME=${0##*/}
45
87
 
46
88
  # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47
89
  DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48
90
 
49
91
  # Use the maximum available, or set MAX_FD != -1 to use that value.
50
- MAX_FD="maximum"
92
+ MAX_FD=maximum
51
93
 
52
94
  warn () {
53
95
  echo "$*"
54
- }
96
+ } >&2
55
97
 
56
98
  die () {
57
99
  echo
58
100
  echo "$*"
59
101
  echo
60
102
  exit 1
61
- }
103
+ } >&2
62
104
 
63
105
  # OS specific support (must be 'true' or 'false').
64
106
  cygwin=false
65
107
  msys=false
66
108
  darwin=false
67
109
  nonstop=false
68
- case "`uname`" in
69
- CYGWIN* )
70
- cygwin=true
71
- ;;
72
- Darwin* )
73
- darwin=true
74
- ;;
75
- MINGW* )
76
- msys=true
77
- ;;
78
- NONSTOP* )
79
- nonstop=true
80
- ;;
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
81
115
  esac
82
116
 
83
117
  CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84
118
 
119
+
85
120
  # Determine the Java command to use to start the JVM.
86
121
  if [ -n "$JAVA_HOME" ] ; then
87
122
  if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88
123
  # IBM's JDK on AIX uses strange locations for the executables
89
- JAVACMD="$JAVA_HOME/jre/sh/java"
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
90
125
  else
91
- JAVACMD="$JAVA_HOME/bin/java"
126
+ JAVACMD=$JAVA_HOME/bin/java
92
127
  fi
93
128
  if [ ! -x "$JAVACMD" ] ; then
94
129
  die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
97
132
  location of your Java installation."
98
133
  fi
99
134
  else
100
- JAVACMD="java"
135
+ JAVACMD=java
101
136
  which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102
137
 
103
138
  Please set the JAVA_HOME variable in your environment to match the
@@ -105,84 +140,95 @@ location of your Java installation."
105
140
  fi
106
141
 
107
142
  # Increase the maximum file descriptors if we can.
108
- if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109
- MAX_FD_LIMIT=`ulimit -H -n`
110
- if [ $? -eq 0 ] ; then
111
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112
- MAX_FD="$MAX_FD_LIMIT"
113
- fi
114
- ulimit -n $MAX_FD
115
- if [ $? -ne 0 ] ; then
116
- warn "Could not set maximum file descriptor limit: $MAX_FD"
117
- fi
118
- else
119
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120
- fi
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ MAX_FD=$( ulimit -H -n ) ||
147
+ warn "Could not query maximum file descriptor limit"
148
+ esac
149
+ case $MAX_FD in #(
150
+ '' | soft) :;; #(
151
+ *)
152
+ ulimit -n "$MAX_FD" ||
153
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
154
+ esac
121
155
  fi
122
156
 
123
- # For Darwin, add options to specify how the application appears in the dock
124
- if $darwin; then
125
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126
- fi
157
+ # Collect all arguments for the java command, stacking in reverse order:
158
+ # * args from the command line
159
+ # * the main class name
160
+ # * -classpath
161
+ # * -D...appname settings
162
+ # * --module-path (only if needed)
163
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
127
164
 
128
165
  # For Cygwin or MSYS, switch paths to Windows format before running java
129
- if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132
- JAVACMD=`cygpath --unix "$JAVACMD"`
133
-
134
- # We build the pattern for arguments to be converted via cygpath
135
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136
- SEP=""
137
- for dir in $ROOTDIRSRAW ; do
138
- ROOTDIRS="$ROOTDIRS$SEP$dir"
139
- SEP="|"
140
- done
141
- OURCYGPATTERN="(^($ROOTDIRS))"
142
- # Add a user-defined pattern to the cygpath arguments
143
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145
- fi
166
+ if "$cygwin" || "$msys" ; then
167
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169
+
170
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
171
+
146
172
  # Now convert the arguments - kludge to limit ourselves to /bin/sh
147
- i=0
148
- for arg in "$@" ; do
149
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151
-
152
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154
- else
155
- eval `echo args$i`="\"$arg\""
173
+ for arg do
174
+ if
175
+ case $arg in #(
176
+ -*) false ;; # don't mess with options #(
177
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178
+ [ -e "$t" ] ;; #(
179
+ *) false ;;
180
+ esac
181
+ then
182
+ arg=$( cygpath --path --ignore --mixed "$arg" )
156
183
  fi
157
- i=$((i+1))
184
+ # Roll the args list around exactly as many times as the number of
185
+ # args, so each arg winds up back in the position where it started, but
186
+ # possibly modified.
187
+ #
188
+ # NB: a `for` loop captures its iteration list before it begins, so
189
+ # changing the positional parameters here affects neither the number of
190
+ # iterations, nor the values presented in `arg`.
191
+ shift # remove old arg
192
+ set -- "$@" "$arg" # push replacement arg
158
193
  done
159
- case $i in
160
- (0) set -- ;;
161
- (1) set -- "$args0" ;;
162
- (2) set -- "$args0" "$args1" ;;
163
- (3) set -- "$args0" "$args1" "$args2" ;;
164
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170
- esac
171
194
  fi
172
195
 
173
- # Escape application args
174
- save () {
175
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176
- echo " "
177
- }
178
- APP_ARGS=$(save "$@")
196
+ # Collect all arguments for the java command;
197
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
+ # shell script including quotes and variable substitutions, so put them in
199
+ # double quotes to make sure that they get re-expanded; and
200
+ # * put everything else in single quotes, so that it's not re-expanded.
179
201
 
180
- # Collect all arguments for the java command, following the shell quoting and substitution rules
181
- eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
202
+ set -- \
203
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
204
+ -classpath "$CLASSPATH" \
205
+ org.gradle.wrapper.GradleWrapperMain \
206
+ "$@"
182
207
 
183
- # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184
- if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185
- cd "$(dirname "$0")"
186
- fi
208
+ # Use "xargs" to parse quoted args.
209
+ #
210
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211
+ #
212
+ # In Bash we could simply go:
213
+ #
214
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215
+ # set -- "${ARGS[@]}" "$@"
216
+ #
217
+ # but POSIX shell has neither arrays nor command substitution, so instead we
218
+ # post-process each arg (as a line of input to sed) to backslash-escape any
219
+ # character that might be a shell metacharacter, then use eval to reverse
220
+ # that process (while maintaining the separation between arguments), and wrap
221
+ # the whole thing up as a single "set" statement.
222
+ #
223
+ # This will of course break if any of these variables contains a newline or
224
+ # an unmatched quote.
225
+ #
226
+
227
+ eval "set -- $(
228
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229
+ xargs -n1 |
230
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231
+ tr '\n' ' '
232
+ )" '"$@"'
187
233
 
188
234
  exec "$JAVACMD" "$@"
@@ -6,9 +6,12 @@ import android.graphics.Bitmap;
6
6
  import android.graphics.BitmapFactory;
7
7
  import android.util.Base64;
8
8
  import android.util.Log;
9
-
10
9
  import com.brother.ptouch.sdk.BLEPrinter;
10
+ import com.brother.ptouch.sdk.LabelInfo;
11
11
  import com.brother.ptouch.sdk.NetPrinter;
12
+ import com.brother.ptouch.sdk.Printer;
13
+ import com.brother.ptouch.sdk.PrinterInfo;
14
+ import com.brother.ptouch.sdk.PrinterInfo.Model;
12
15
  import com.brother.ptouch.sdk.PrinterStatus;
13
16
  import com.getcapacitor.JSArray;
14
17
  import com.getcapacitor.JSObject;
@@ -16,18 +19,13 @@ import com.getcapacitor.NativePlugin;
16
19
  import com.getcapacitor.Plugin;
17
20
  import com.getcapacitor.PluginCall;
18
21
  import com.getcapacitor.PluginMethod;
19
-
20
- import com.brother.ptouch.sdk.Printer;
21
- import com.brother.ptouch.sdk.PrinterInfo;
22
- import com.brother.ptouch.sdk.PrinterInfo.Model;
23
- import com.brother.ptouch.sdk.LabelInfo;
24
-
22
+ import com.getcapacitor.annotation.CapacitorPlugin;
25
23
  import java.util.List;
26
24
 
27
- @NativePlugin
25
+ @CapacitorPlugin
28
26
  public class BrotherPrint extends Plugin {
29
27
 
30
- @PluginMethod()
28
+ @PluginMethod
31
29
  public void printImage(PluginCall call) {
32
30
  // object.encodedImageで値を入力
33
31
  final String encodedImage = call.getString("encodedImage");
@@ -58,17 +56,20 @@ public class BrotherPrint extends Plugin {
58
56
  final String ipAddress = call.getString("ipAddress");
59
57
 
60
58
  if (localName != null) {
59
+ Log.d("protocol", "localName");
61
60
  settings.port = PrinterInfo.Port.BLUETOOTH;
62
61
  settings.setLocalName(localName);
63
62
  } else if (ipAddress != null) {
63
+ Log.d("protocol", "ipAddress");
64
64
  settings.port = PrinterInfo.Port.NET;
65
65
  settings.ipAddress = ipAddress;
66
66
  } else {
67
+ Log.d("protocol", "USB");
67
68
  settings.port = PrinterInfo.Port.USB;
68
69
  }
69
70
  break;
70
71
  default:
71
- call.error("[ERROR] This printerType is not available");
72
+ call.reject("[ERROR] This printerType is not available");
72
73
  return;
73
74
  }
74
75
 
@@ -92,72 +93,79 @@ public class BrotherPrint extends Plugin {
92
93
 
93
94
  try {
94
95
  Log.d(getLogTag(), "Start Printer Thread");
95
- new Thread(new Runnable() {
96
- @Override
97
- public void run() {
98
- if (printer.startCommunication()) {
99
- PrinterStatus result = printer.printImage(decodedByte);
100
-
101
- if (result.errorCode == PrinterInfo.ErrorCode.ERROR_NONE) {
102
- notifyListeners("onPrint", new JSObject().put("value", result));
96
+ new Thread(
97
+ new Runnable() {
98
+ @Override
99
+ public void run() {
100
+ if (printer.startCommunication()) {
101
+ PrinterStatus result = printer.printImage(decodedByte);
102
+
103
+ if (result.errorCode == PrinterInfo.ErrorCode.ERROR_NONE) {
104
+ notifyListeners("onPrint", new JSObject().put("value", result));
105
+ } else {
106
+ Log.d("TAG", "ERROR - " + result.errorCode);
107
+ notifyListeners("onPrintError", new JSObject().put("value", result.errorCode));
108
+ }
109
+
110
+ printer.endCommunication();
103
111
  } else {
104
- Log.d("TAG", "ERROR - " + result.errorCode);
105
- notifyListeners("onPrintError", new JSObject().put("value", result.errorCode));
112
+ notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
106
113
  }
107
-
108
- printer.endCommunication();
109
- } else {
110
- notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
111
114
  }
112
115
  }
113
- }).start();
114
- call.success(new JSObject().put("value", true));
116
+ )
117
+ .start();
118
+ call.resolve();
115
119
  } catch (Exception ex) {
116
120
  notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
117
- call.error(ex.getLocalizedMessage(), ex);
121
+ call.reject(ex.getLocalizedMessage(), ex);
118
122
  }
119
123
  }
120
124
 
121
- @PluginMethod()
125
+ @PluginMethod
122
126
  public void searchWiFiPrinter(PluginCall call) {
123
- new Thread(new Runnable() {
124
- @Override
125
- public void run() {
126
- Printer printer = new Printer();
127
- NetPrinter[] printerList = printer.getNetPrinters("QL-820NWB");
128
-
129
- JSArray resultList = new JSArray();
130
- for (NetPrinter device: printerList) {
131
- Log.d("TAG", String.format("Model: %s, IP Address: %s", device.modelName, device.ipAddress));
132
- resultList.put(device.ipAddress);
127
+ new Thread(
128
+ new Runnable() {
129
+ @Override
130
+ public void run() {
131
+ Printer printer = new Printer();
132
+ NetPrinter[] printerList = printer.getNetPrinters("QL-820NWB");
133
+
134
+ JSArray resultList = new JSArray();
135
+ for (NetPrinter device : printerList) {
136
+ Log.d("TAG", String.format("Model: %s, IP Address: %s", device.modelName, device.ipAddress));
137
+ resultList.put(device.ipAddress);
138
+ }
139
+ notifyListeners("onIpAddressAvailable", new JSObject().put("ipAddressList", resultList));
133
140
  }
134
- notifyListeners("onIpAddressAvailable", new JSObject().put("ipAddressList", resultList));
135
141
  }
136
- }).start();
137
- call.success(new JSObject().put("value", true));
142
+ )
143
+ .start();
144
+ call.resolve();
138
145
  }
139
146
 
140
- @PluginMethod()
147
+ @PluginMethod
141
148
  public void searchBLEPrinter(PluginCall call) {
142
- new Thread(new Runnable() {
143
- @Override
144
- public void run() {
145
- Printer printer = new Printer();
146
- List<BLEPrinter> printerList = printer.getBLEPrinters(BluetoothAdapter.getDefaultAdapter(), 30);
147
-
148
- JSArray resultList = new JSArray();
149
- for (BLEPrinter device: printerList) {
150
- resultList.put(device.localName);
151
- }
149
+ new Thread(
150
+ new Runnable() {
151
+ @Override
152
+ public void run() {
153
+ Printer printer = new Printer();
154
+ List<BLEPrinter> printerList = printer.getBLEPrinters(BluetoothAdapter.getDefaultAdapter(), 30);
155
+
156
+ JSArray resultList = new JSArray();
157
+ for (BLEPrinter device : printerList) {
158
+ resultList.put(device.localName);
159
+ }
152
160
 
153
- notifyListeners("onBLEAvailable", new JSObject().put("localNameList", resultList));
161
+ notifyListeners("onBLEAvailable", new JSObject().put("localNameList", resultList));
162
+ }
154
163
  }
155
- }).start();
156
- call.success(new JSObject().put("value", true));
164
+ )
165
+ .start();
166
+ call.resolve();
157
167
  }
158
168
 
159
- @PluginMethod()
160
- public void stopSearchBLEPrinter(PluginCall call) {
161
-
162
- }
169
+ @PluginMethod
170
+ public void stopSearchBLEPrinter(PluginCall call) {}
163
171
  }
package/dist/docs.json CHANGED
@@ -114,7 +114,7 @@
114
114
  },
115
115
  {
116
116
  "name": "addListener",
117
- "signature": "(eventName: 'onIpAddressAvailable', listenerFunc: () => void) => PluginListenerHandle",
117
+ "signature": "(eventName: 'onIpAddressAvailable', listenerFunc: (info: { ipAddressList: string[]; }) => void) => PluginListenerHandle",
118
118
  "parameters": [
119
119
  {
120
120
  "name": "eventName",
@@ -124,7 +124,7 @@
124
124
  {
125
125
  "name": "listenerFunc",
126
126
  "docs": "",
127
- "type": "() => void"
127
+ "type": "(info: { ipAddressList: string[]; }) => void"
128
128
  }
129
129
  ],
130
130
  "returns": "PluginListenerHandle",
@@ -8,7 +8,9 @@ export interface BrotherPrintPlugin {
8
8
  addListener(eventName: 'onPrint', listenerFunc: () => void): PluginListenerHandle;
9
9
  addListener(eventName: 'onBLEAvailable', listenerFunc: () => void): PluginListenerHandle;
10
10
  addListener(eventName: 'onBLEAvailable', listenerFunc: () => void): PluginListenerHandle;
11
- addListener(eventName: 'onIpAddressAvailable', listenerFunc: () => void): PluginListenerHandle;
11
+ addListener(eventName: 'onIpAddressAvailable', listenerFunc: (info: {
12
+ ipAddressList: string[];
13
+ }) => void): PluginListenerHandle;
12
14
  addListener(eventName: 'onPrintFailedCommunication', listenerFunc: (info: {
13
15
  value: string;
14
16
  }) => void): PluginListenerHandle;
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrotherPrintPlugin {\n printImage(options: BrotherPrintOptions): Promise<{ value: boolean }>;\n searchWiFiPrinter(): Promise<void>;\n searchBLEPrinter(): Promise<void>;\n\n addListener(\n eventName: 'onPrint',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onIpAddressAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintFailedCommunication',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintError',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n}\n\nexport interface BrotherPrintOptions {\n encodedImage: string;\n printerType: 'QL-820NWB' | 'QL-800';\n numberOfCopies: number;\n labelNameIndex: 16 | 38;\n ipAddress?: string;\n localName?: string;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrotherPrintPlugin {\n printImage(options: BrotherPrintOptions): Promise<{ value: boolean }>;\n searchWiFiPrinter(): Promise<void>;\n searchBLEPrinter(): Promise<void>;\n\n addListener(\n eventName: 'onPrint',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onIpAddressAvailable',\n listenerFunc: (info: { ipAddressList: string[] }) => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintFailedCommunication',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintError',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n}\n\nexport interface BrotherPrintOptions {\n encodedImage: string;\n printerType: 'QL-820NWB' | 'QL-800';\n numberOfCopies: number;\n labelNameIndex: 16 | 38;\n ipAddress?: string;\n localName?: string;\n}\n"]}
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
- const BrotherPrint = registerPlugin('AdMob', {
2
+ const BrotherPrint = registerPlugin('BrotherPrint', {
3
3
  web: () => import('./web').then(m => new m.BrotherPrintWeb()),
4
4
  });
5
5
  export * from './definitions';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,OAAO,EAAE;IAC/D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin } from './definitions';\n\nconst BrotherPrint = registerPlugin<BrotherPrintPlugin>('AdMob', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\n\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin } from './definitions';\n\nconst BrotherPrint = registerPlugin<BrotherPrintPlugin>('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\n\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n"]}
@@ -34,7 +34,7 @@ var web = /*#__PURE__*/Object.freeze({
34
34
  BrotherPrintWeb: BrotherPrintWeb
35
35
  });
36
36
 
37
- const BrotherPrint = core.registerPlugin('AdMob', {
37
+ const BrotherPrint = core.registerPlugin('BrotherPrint', {
38
38
  web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrotherPrintWeb()),
39
39
  });
40
40
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('AdMob', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;;;;AACO,MAAM,eAAe,SAASA,cAAS,CAAC;AAC/C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,cAAc;AAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;AAC9B,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;AAC/B,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,IAAI;AACvB,SAAS,CAAC;AACV,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;AACjC;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;AAChC;;;;;;;ACvBK,MAAC,YAAY,GAAGC,mBAAc,CAAC,OAAO,EAAE;AAC7C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;;;;AACO,MAAM,eAAe,SAASA,cAAS,CAAC;AAC/C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,cAAc;AAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;AAC9B,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;AAC/B,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,IAAI;AACvB,SAAS,CAAC;AACV,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;AACjC;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;AAChC;;;;;;;ACvBK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;;;;"}
package/dist/plugin.js CHANGED
@@ -31,7 +31,7 @@ var BrotherPrint = (function (exports, core) {
31
31
  BrotherPrintWeb: BrotherPrintWeb
32
32
  });
33
33
 
34
- const BrotherPrint = core.registerPlugin('AdMob', {
34
+ const BrotherPrint = core.registerPlugin('BrotherPrint', {
35
35
  web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrotherPrintWeb()),
36
36
  });
37
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('AdMob', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC;IACd,YAAY,IAAI,EAAE,cAAc;IAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;IAC9B,SAAS,CAAC,CAAC;IACX,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,OAAO;IACf,YAAY,KAAK,EAAE,IAAI;IACvB,SAAS,CAAC;IACV,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;IACjC;IACA;IACA;IACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;IAChC;;;;;;;ACvBK,UAAC,YAAY,GAAGC,mBAAc,CAAC,OAAO,EAAE;IAC7C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then(m => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC;IACd,YAAY,IAAI,EAAE,cAAc;IAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;IAC9B,SAAS,CAAC,CAAC;IACX,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,OAAO;IACf,YAAY,KAAK,EAAE,IAAI;IACvB,SAAS,CAAC;IACV,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;IACjC;IACA;IACA;IACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;IAChC;;;;;;;ACvBK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;;;;;;;;;;;;"}
@@ -396,7 +396,7 @@
396
396
  GCC_WARN_UNUSED_FUNCTION = YES;
397
397
  GCC_WARN_UNUSED_VARIABLE = YES;
398
398
  HEADER_SEARCH_PATHS = "\"$(SRCROOT)/libs/BRLMPrinterKit.framework\"/**";
399
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
399
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
400
400
  MTL_ENABLE_DEBUG_INFO = YES;
401
401
  ONLY_ACTIVE_ARCH = YES;
402
402
  SDKROOT = iphoneos;
@@ -455,7 +455,7 @@
455
455
  GCC_WARN_UNUSED_FUNCTION = YES;
456
456
  GCC_WARN_UNUSED_VARIABLE = YES;
457
457
  HEADER_SEARCH_PATHS = "\"$(SRCROOT)/libs/BRLMPrinterKit.framework\"/**";
458
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
458
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
459
459
  MTL_ENABLE_DEBUG_INFO = NO;
460
460
  SDKROOT = iphoneos;
461
461
  SWIFT_INCLUDE_PATHS = "\"$(SRCROOT)/Plugin\"";
@@ -487,13 +487,14 @@
487
487
  );
488
488
  INFOPLIST_FILE = Plugin/Info.plist;
489
489
  INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
490
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
490
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
491
491
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)";
492
492
  ONLY_ACTIVE_ARCH = YES;
493
493
  OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
494
494
  PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
495
495
  PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
496
496
  SKIP_INSTALL = YES;
497
+ SUPPORTS_MACCATALYST = NO;
497
498
  SWIFT_OBJC_BRIDGING_HEADER = "";
498
499
  SWIFT_OPTIMIZATION_LEVEL = "-Onone";
499
500
  SWIFT_VERSION = 5.0;
@@ -521,13 +522,14 @@
521
522
  );
522
523
  INFOPLIST_FILE = Plugin/Info.plist;
523
524
  INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
524
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
525
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
525
526
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
526
527
  ONLY_ACTIVE_ARCH = NO;
527
528
  OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
528
529
  PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
529
530
  PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
530
531
  SKIP_INSTALL = YES;
532
+ SUPPORTS_MACCATALYST = NO;
531
533
  SWIFT_OBJC_BRIDGING_HEADER = "";
532
534
  SWIFT_VERSION = 5.0;
533
535
  TARGETED_DEVICE_FAMILY = "1,2";
package/ios/Podfile CHANGED
@@ -1,4 +1,4 @@
1
- platform :ios, '12.0'
1
+ platform :ios, '13.0'
2
2
 
3
3
  def capacitor_pods
4
4
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@rdlabo/capacitor-brotherprint",
3
- "version": "2.0.0-2",
3
+ "version": "4.0.0",
4
4
  "description": "Capacitor plugin for Brother Print SDK",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
8
  "scripts": {
9
9
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
10
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
10
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
11
11
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
12
12
  "verify:web": "npm run build",
13
13
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -20,32 +20,33 @@
20
20
  "clean": "rimraf ./dist",
21
21
  "watch": "tsc --watch",
22
22
  "prepublishOnly": "npm run build",
23
+ "release": "np --no-tests",
23
24
  "npm-publish": "np --no-tests"
24
25
  },
25
26
  "author": "Masahiko Sakakibara<sakakibara@rdlabo.jp>",
26
27
  "license": "MIT",
27
28
  "devDependencies": {
28
- "@capacitor/android": "^3.0.0",
29
- "@capacitor/core": "^3.0.0",
29
+ "@capacitor/android": "^4.0.0",
30
+ "@capacitor/core": "^4.0.0",
30
31
  "@capacitor/docgen": "^0.0.18",
31
- "@capacitor/ios": "^3.0.0",
32
+ "@capacitor/ios": "^4.0.0",
32
33
  "@ionic/eslint-config": "^0.3.0",
33
34
  "@ionic/prettier-config": "^1.0.1",
34
35
  "@ionic/swiftlint-config": "^1.1.2",
35
36
  "eslint": "^7.11.0",
36
- "prettier": "~2.2.0",
37
- "prettier-plugin-java": "~1.0.0",
37
+ "prettier": "~2.3.0",
38
+ "prettier-plugin-java": "~1.0.2",
38
39
  "rimraf": "^3.0.2",
39
40
  "rollup": "^2.32.0",
40
41
  "swiftlint": "^1.0.1",
41
- "typescript": "~4.0.3",
42
+ "typescript": "~4.1.5",
42
43
  "@rollup/plugin-node-resolve": "^8.1.0",
43
44
  "np": "^6.3.2",
44
45
  "husky": "^4.2.5",
45
46
  "pretty-quick": "^2.0.1"
46
47
  },
47
48
  "peerDependencies": {
48
- "@capacitor/core": "^3.0.0"
49
+ "@capacitor/core": "^4.0.0"
49
50
  },
50
51
  "husky": {
51
52
  "hooks": {