@idpass/smartscanner-capacitor 0.7.2 → 0.7.3-beta.2

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.
Files changed (77) hide show
  1. package/android/.gradle/9.0.0/checksums/checksums.lock +0 -0
  2. package/android/.gradle/9.0.0/checksums/md5-checksums.bin +0 -0
  3. package/android/.gradle/9.0.0/checksums/sha1-checksums.bin +0 -0
  4. package/android/.gradle/9.0.0/executionHistory/executionHistory.bin +0 -0
  5. package/android/.gradle/9.0.0/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/9.0.0/fileHashes/fileHashes.bin +0 -0
  7. package/android/.gradle/9.0.0/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/{8.0.2/checksums/md5-checksums.bin → 9.0.0/fileHashes/resourceHashesCache.bin} +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  11. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  12. package/android/.gradle/configuration-cache/0e1f3896-0feb-4dfd-8352-b05037860744/classloaderscopes11020470336808984242.tmp +0 -0
  13. package/android/.gradle/configuration-cache/1b848dd1-882e-47ee-a2f9-35d03b62145c/classloaderscopes14000397481627317418.tmp +0 -0
  14. package/android/.gradle/configuration-cache/3vo67xts5zlq0m5hxccwmf6l7/candidates.bin +1 -0
  15. package/android/.gradle/configuration-cache/4mezcrllf1vcipjvo76jtzvfv/buildfingerprint.bin +0 -0
  16. package/android/.gradle/configuration-cache/4mezcrllf1vcipjvo76jtzvfv/entry.bin +0 -0
  17. package/android/.gradle/configuration-cache/4mezcrllf1vcipjvo76jtzvfv/projectfingerprint.bin +0 -0
  18. package/android/.gradle/configuration-cache/4mezcrllf1vcipjvo76jtzvfv/work.bin +0 -0
  19. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/.globals.work.bin +1 -0
  20. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/.strings.work.bin +0 -0
  21. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/_.work.bin +2 -0
  22. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/buildfingerprint.bin +0 -0
  23. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/entry.bin +0 -0
  24. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/projectfingerprint.bin +0 -0
  25. package/android/.gradle/configuration-cache/4oqugu5p1ul83rzzxx3svve52/work.bin +0 -0
  26. package/android/.gradle/configuration-cache/704v8cpl7edelfyn1blluzwu8/buildfingerprint.bin +0 -0
  27. package/android/.gradle/configuration-cache/704v8cpl7edelfyn1blluzwu8/entry.bin +0 -0
  28. package/android/.gradle/configuration-cache/704v8cpl7edelfyn1blluzwu8/projectfingerprint.bin +0 -0
  29. package/android/.gradle/configuration-cache/704v8cpl7edelfyn1blluzwu8/work.bin +0 -0
  30. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/.globals.work.bin +0 -0
  31. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/.strings.work.bin +0 -0
  32. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/_.work.bin +0 -0
  33. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/_capacitor-android.work.bin +0 -0
  34. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/buildfingerprint.bin +0 -0
  35. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/classloaderscopes.bin +0 -0
  36. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/entry.bin +0 -0
  37. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/projectfingerprint.bin +0 -0
  38. package/android/.gradle/configuration-cache/7b41f0cd-577d-4d4f-bb37-20d51c59a6bc/work.bin +0 -0
  39. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/.globals.work.bin +1 -0
  40. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/.strings.work.bin +0 -0
  41. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/_.work.bin +1 -0
  42. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/_capacitor-android.work.bin +0 -0
  43. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/buildfingerprint.bin +0 -0
  44. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/classloaderscopes.bin +0 -0
  45. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/entry.bin +0 -0
  46. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/projectfingerprint.bin +0 -0
  47. package/android/.gradle/configuration-cache/ae1af441-6ddb-4876-97d7-c4462a480587/work.bin +0 -0
  48. package/android/.gradle/configuration-cache/b3d69bbb-4712-4a04-b5b9-35ff62b8bf52/classloaderscopes2555106055165323200.tmp +0 -0
  49. package/android/.gradle/configuration-cache/configuration-cache.lock +0 -0
  50. package/android/.gradle/configuration-cache/e9dfd272-a232-4d0b-9129-b0736d94cd67/classloaderscopes967833430554981475.tmp +0 -0
  51. package/android/.gradle/configuration-cache/ecyzucjb067qc3h5tfa0pykva/candidates.bin +1 -0
  52. package/android/.gradle/configuration-cache/f9a0af2f-a910-4cf9-9b13-f809db122085/classloaderscopes7448431015666412619.tmp +0 -0
  53. package/android/.gradle/file-system.probe +0 -0
  54. package/android/.npmignore +1 -0
  55. package/android/.project +6 -0
  56. package/android/build.gradle +28 -32
  57. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  58. package/android/gradle/wrapper/gradle-wrapper.properties +3 -2
  59. package/android/gradle.properties +8 -4
  60. package/android/gradlew +175 -111
  61. package/android/gradlew.bat +27 -33
  62. package/android/src/main/AndroidManifest.xml +1 -1
  63. package/dist/esm/web.d.ts +0 -1
  64. package/dist/esm/web.js +0 -1
  65. package/dist/esm/web.js.map +1 -1
  66. package/dist/plugin.cjs.js.map +1 -1
  67. package/dist/plugin.js.map +1 -1
  68. package/ios/.npmignore +4 -0
  69. package/ios/Plugin/Plugin.swift +1 -1
  70. package/package.json +71 -71
  71. package/android/.gradle/8.0.2/checksums/checksums.lock +0 -0
  72. package/android/.gradle/8.0.2/checksums/sha1-checksums.bin +0 -0
  73. package/android/.gradle/8.0.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  74. package/android/.gradle/8.0.2/fileHashes/fileHashes.lock +0 -0
  75. /package/android/.gradle/{8.0.2 → 9.0.0}/fileChanges/last-build.bin +0 -0
  76. /package/android/.gradle/{8.0.2/dependencies-accessors → 9.0.0}/gc.properties +0 -0
  77. /package/android/.gradle/{8.0.2 → configuration-cache}/gc.properties +0 -0
@@ -1,2 +1,2 @@
1
- #Tue Mar 04 15:25:55 ICT 2025
2
- gradle.version=8.0.2
1
+ #Mon Aug 25 15:25:52 CEST 2025
2
+ gradle.version=9.0.0
@@ -0,0 +1 @@
1
+ 7b41f0cd-577d-4d4f-bb37-20d51c59a6b�
@@ -0,0 +1 @@
1
+ �9��@��2R��d�G��t'�Y
@@ -0,0 +1,2 @@
1
+ ������t&� �t�a �������.�W�w��N��N�3%�>f��
2
+ ,�7e�r+�"���P:�-�Dٓ�;і��r��&� �^�tr�Ef�_�i��L���z8��/��u�S�h���t��~�UΊ-/s�w%��
@@ -0,0 +1 @@
1
+ ��2H���`<O$�!1Gw��N��`� /^�y~Z��/J?��i��]:�n�H6��i��ܾ�/Q ف���
@@ -0,0 +1 @@
1
+ n���jY%O �u���OT��S9�Y�mk�����6i�������^���j��tn���a���y9�g-
@@ -0,0 +1 @@
1
+ ae1af441-6ddb-4876-97d7-c4462a48058�
@@ -0,0 +1 @@
1
+ /build
package/android/.project CHANGED
@@ -5,6 +5,11 @@
5
5
  <projects>
6
6
  </projects>
7
7
  <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
8
13
  <buildCommand>
9
14
  <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
15
  <arguments>
@@ -12,6 +17,7 @@
12
17
  </buildCommand>
13
18
  </buildSpec>
14
19
  <natures>
20
+ <nature>org.eclipse.jdt.core.javanature</nature>
15
21
  <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
22
  </natures>
17
23
  <filteredResources>
@@ -1,31 +1,29 @@
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'
5
- }
6
-
7
1
  buildscript {
8
- ext.kotlin_version = '1.9.10'
2
+ ext.kotlin_version = '2.0.0'
9
3
  repositories {
10
4
  google()
11
5
  mavenCentral()
12
- jcenter()
13
6
  maven { url 'https://maven.fabric.io/public' }
14
7
  }
15
8
  dependencies {
16
9
  classpath 'com.google.gms:google-services:4.3.15'
17
- classpath 'com.android.tools.build:gradle:8.2.1'
10
+ classpath 'com.android.tools.build:gradle:8.12.0'
18
11
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
19
12
  }
20
13
  }
21
14
 
15
+ ext {
16
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
17
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
18
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
19
+ }
20
+
22
21
  allprojects {
23
22
  repositories {
24
23
  google()
25
24
  mavenCentral()
26
25
  maven { url "https://maven.google.com" }
27
26
  maven { url 'https://jitpack.io' }
28
- jcenter()
29
27
  flatDir {
30
28
  dirs 'libs'
31
29
  }
@@ -36,6 +34,7 @@ apply plugin: 'com.android.library'
36
34
  apply plugin: 'kotlin-android'
37
35
 
38
36
  android {
37
+ namespace 'org.idpass.smartscanner.capacitor.smartscannercapacitorplugin'
39
38
  compileSdkVersion 34
40
39
  defaultConfig {
41
40
  minSdkVersion 24
@@ -55,8 +54,11 @@ android {
55
54
  }
56
55
  }
57
56
  compileOptions {
58
- sourceCompatibility JavaVersion.VERSION_17
59
- targetCompatibility JavaVersion.VERSION_17
57
+ sourceCompatibility JavaVersion.VERSION_21
58
+ targetCompatibility JavaVersion.VERSION_21
59
+ }
60
+ kotlinOptions {
61
+ jvmTarget = '21'
60
62
  }
61
63
  lintOptions {
62
64
  abortOnError false
@@ -65,18 +67,12 @@ android {
65
67
  exclude 'META-INF/NOTICE'
66
68
  exclude 'META-INF/LICENSE'
67
69
  }
68
- dexOptions {
69
- preDexLibraries false
70
- javaMaxHeapSize "4g"
71
- jumboMode = true
72
- }
73
70
  }
74
71
 
75
72
  dependencies {
76
73
  implementation fileTree(include: ['*.jar'], dir: 'libs')
77
74
  implementation 'androidx.multidex:multidex:2.0.1'
78
- implementation 'androidx.core:core-ktx:1.3.2'
79
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
75
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
80
76
 
81
77
  implementation project(':capacitor-android')
82
78
 
@@ -89,16 +85,16 @@ dependencies {
89
85
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
90
86
 
91
87
  // AndroidX
92
- implementation 'androidx.appcompat:appcompat:1.1.0'
93
- implementation 'androidx.core:core-ktx:1.2.0'
94
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
95
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
96
- implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
97
- implementation 'androidx.preference:preference-ktx:1.1.1'
88
+ implementation 'androidx.appcompat:appcompat:1.6.1'
89
+ implementation 'androidx.core:core-ktx:1.12.0'
90
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
91
+ implementation 'androidx.recyclerview:recyclerview:1.3.2'
92
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
93
+ implementation 'androidx.preference:preference-ktx:1.2.1'
98
94
 
99
95
  // ML Kit dependencies
100
- implementation 'com.google.mlkit:text-recognition:16.0.0-beta4'
101
- implementation 'com.google.mlkit:barcode-scanning:17.0.2'
96
+ implementation 'com.google.mlkit:text-recognition:16.0.0-beta6'
97
+ implementation 'com.google.mlkit:barcode-scanning:17.2.0'
102
98
 
103
99
  // Glide
104
100
  implementation 'com.github.bumptech.glide:glide:4.12.0'
@@ -107,26 +103,26 @@ dependencies {
107
103
  implementation 'jp.wasabeef:glide-transformations:4.3.0'
108
104
 
109
105
  //Android Material
110
- implementation 'com.google.android.material:material:1.2.1'
106
+ implementation 'com.google.android.material:material:1.11.0'
111
107
 
112
108
  // Timber
113
109
  implementation 'com.jakewharton.timber:timber:4.7.1'
114
110
 
115
111
  // CameraX
116
- def camerax_version = "1.0.0-beta07"
112
+ def camerax_version = "1.3.1"
117
113
  implementation "androidx.camera:camera-core:$camerax_version"
118
114
  // CameraX core library using camera2 implementation
119
115
  implementation "androidx.camera:camera-camera2:$camerax_version"
120
116
  // CameraX Lifecycle Library
121
117
  implementation "androidx.camera:camera-lifecycle:$camerax_version"
122
118
  // CameraX View class
123
- implementation "androidx.camera:camera-view:1.0.0-alpha14"
119
+ implementation "androidx.camera:camera-view:1.3.1"
124
120
 
125
121
  // MRZ
126
122
  implementation 'org.slf4j:slf4j-android:1.7.30'
127
123
 
128
124
  // gson
129
- implementation 'com.google.code.gson:gson:2.8.6'
125
+ implementation 'com.google.code.gson:gson:2.10.1'
130
126
 
131
127
  // NFC
132
128
  implementation 'org.jmrtd:jmrtd:0.7.18'
@@ -145,7 +141,7 @@ dependencies {
145
141
  implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
146
142
 
147
143
  //Sentry
148
- implementation 'io.sentry:sentry-android:5.0.1'
144
+ implementation 'io.sentry:sentry-android:7.3.0'
149
145
 
150
146
  // Barcode
151
147
  implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
@@ -1,6 +1,7 @@
1
- #Mon Jun 14 23:06:19 PST 2021
2
1
  distributionBase=GRADLE_USER_HOME
3
2
  distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
4
6
  zipStoreBase=GRADLE_USER_HOME
5
7
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
@@ -9,16 +9,20 @@
9
9
 
10
10
  # Specifies the JVM arguments used for the daemon process.
11
11
  # The setting is particularly useful for tweaking memory settings.
12
- org.gradle.jvmargs=-Xmx1536m
12
+ org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m
13
13
 
14
14
  # When configured, Gradle will run in incubating parallel mode.
15
15
  # This option should only be used with decoupled projects. More details, visit
16
16
  # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
- # org.gradle.parallel=true
17
+ org.gradle.parallel=true
18
+ org.gradle.caching=true
19
+ org.gradle.configuration-cache=true
18
20
 
19
21
  # AndroidX package structure to make it clearer which packages are bundled with the
20
22
  # Android operating system, and which are packaged with your app's APK
21
23
  # https://developer.android.com/topic/libraries/support-library/androidx-rn
22
24
  android.useAndroidX=true
23
-
24
-
25
+ android.enableJetifier=true
26
+ android.suppressUnsupportedCompileSdk=35
27
+
28
+
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.
@@ -15,80 +15,116 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
18
20
 
19
21
  ##############################################################################
20
- ##
21
- ## Gradle start up script for UN*X
22
- ##
22
+ #
23
+ # Gradle start up script for POSIX generated by Gradle.
24
+ #
25
+ # Important for running:
26
+ #
27
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
28
+ # noncompliant, but you have some other compliant shell such as ksh or
29
+ # bash, then to run this script, type that shell name before the whole
30
+ # command line, like:
31
+ #
32
+ # ksh Gradle
33
+ #
34
+ # Busybox and similar reduced shells will NOT work, because this script
35
+ # requires all of these POSIX shell features:
36
+ # * functions;
37
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
38
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
39
+ # * compound commands having a testable exit status, especially «case»;
40
+ # * various built-in commands including «command», «set», and «ulimit».
41
+ #
42
+ # Important for patching:
43
+ #
44
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
45
+ # by Bash, Ksh, etc; in particular arrays are avoided.
46
+ #
47
+ # The "traditional" practice of packing multiple parameters into a
48
+ # space-separated string is a well documented source of bugs and security
49
+ # problems, so this is (mostly) avoided, by progressively accumulating
50
+ # options in "$@", and eventually passing that to Java.
51
+ #
52
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
53
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
54
+ # see the in-line comments for details.
55
+ #
56
+ # There are tweaks for specific operating systems such as AIX, CygWin,
57
+ # Darwin, MinGW, and NonStop.
58
+ #
59
+ # (3) This script is generated from the Groovy template
60
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
61
+ # within the Gradle project.
62
+ #
63
+ # You can find Gradle at https://github.com/gradle/gradle/.
64
+ #
23
65
  ##############################################################################
24
66
 
25
67
  # Attempt to set APP_HOME
68
+
26
69
  # 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
70
+ app_path=$0
71
+
72
+ # Need this for daisy-chained symlinks.
73
+ while
74
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
75
+ [ -h "$app_path" ]
76
+ do
77
+ ls=$( ls -ld "$app_path" )
78
+ link=${ls#*' -> '}
79
+ case $link in #(
80
+ /*) app_path=$link ;; #(
81
+ *) app_path=$APP_HOME$link ;;
82
+ esac
37
83
  done
38
- SAVED="`pwd`"
39
- cd "`dirname \"$PRG\"`/" >/dev/null
40
- APP_HOME="`pwd -P`"
41
- cd "$SAVED" >/dev/null
42
84
 
43
- APP_NAME="Gradle"
44
- APP_BASE_NAME=`basename "$0"`
45
-
46
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
85
+ # This is normally unused
86
+ # shellcheck disable=SC2034
87
+ APP_BASE_NAME=${0##*/}
88
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90
+ ' "$PWD" ) || exit
48
91
 
49
92
  # Use the maximum available, or set MAX_FD != -1 to use that value.
50
- MAX_FD="maximum"
93
+ MAX_FD=maximum
51
94
 
52
95
  warn () {
53
96
  echo "$*"
54
- }
97
+ } >&2
55
98
 
56
99
  die () {
57
100
  echo
58
101
  echo "$*"
59
102
  echo
60
103
  exit 1
61
- }
104
+ } >&2
62
105
 
63
106
  # OS specific support (must be 'true' or 'false').
64
107
  cygwin=false
65
108
  msys=false
66
109
  darwin=false
67
110
  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
- ;;
111
+ case "$( uname )" in #(
112
+ CYGWIN* ) cygwin=true ;; #(
113
+ Darwin* ) darwin=true ;; #(
114
+ MSYS* | MINGW* ) msys=true ;; #(
115
+ NONSTOP* ) nonstop=true ;;
81
116
  esac
82
117
 
83
118
  CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84
119
 
120
+
85
121
  # Determine the Java command to use to start the JVM.
86
122
  if [ -n "$JAVA_HOME" ] ; then
87
123
  if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88
124
  # IBM's JDK on AIX uses strange locations for the executables
89
- JAVACMD="$JAVA_HOME/jre/sh/java"
125
+ JAVACMD=$JAVA_HOME/jre/sh/java
90
126
  else
91
- JAVACMD="$JAVA_HOME/bin/java"
127
+ JAVACMD=$JAVA_HOME/bin/java
92
128
  fi
93
129
  if [ ! -x "$JAVACMD" ] ; then
94
130
  die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -97,92 +133,120 @@ Please set the JAVA_HOME variable in your environment to match the
97
133
  location of your Java installation."
98
134
  fi
99
135
  else
100
- JAVACMD="java"
101
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
136
+ JAVACMD=java
137
+ if ! command -v java >/dev/null 2>&1
138
+ then
139
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102
140
 
103
141
  Please set the JAVA_HOME variable in your environment to match the
104
142
  location of your Java installation."
143
+ fi
105
144
  fi
106
145
 
107
146
  # 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
147
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
148
+ case $MAX_FD in #(
149
+ max*)
150
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151
+ # shellcheck disable=SC2039,SC3045
152
+ MAX_FD=$( ulimit -H -n ) ||
153
+ warn "Could not query maximum file descriptor limit"
154
+ esac
155
+ case $MAX_FD in #(
156
+ '' | soft) :;; #(
157
+ *)
158
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159
+ # shellcheck disable=SC2039,SC3045
160
+ ulimit -n "$MAX_FD" ||
161
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
162
+ esac
121
163
  fi
122
164
 
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
165
+ # Collect all arguments for the java command, stacking in reverse order:
166
+ # * args from the command line
167
+ # * the main class name
168
+ # * -classpath
169
+ # * -D...appname settings
170
+ # * --module-path (only if needed)
171
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
127
172
 
128
173
  # 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
174
+ if "$cygwin" || "$msys" ; then
175
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
176
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
177
+
178
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
179
+
146
180
  # 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\""
181
+ for arg do
182
+ if
183
+ case $arg in #(
184
+ -*) false ;; # don't mess with options #(
185
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
186
+ [ -e "$t" ] ;; #(
187
+ *) false ;;
188
+ esac
189
+ then
190
+ arg=$( cygpath --path --ignore --mixed "$arg" )
156
191
  fi
157
- i=$((i+1))
192
+ # Roll the args list around exactly as many times as the number of
193
+ # args, so each arg winds up back in the position where it started, but
194
+ # possibly modified.
195
+ #
196
+ # NB: a `for` loop captures its iteration list before it begins, so
197
+ # changing the positional parameters here affects neither the number of
198
+ # iterations, nor the values presented in `arg`.
199
+ shift # remove old arg
200
+ set -- "$@" "$arg" # push replacement arg
158
201
  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
202
  fi
172
203
 
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 "$@")
179
204
 
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"
205
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
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")"
208
+ # Collect all arguments for the java command:
209
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210
+ # and any embedded shellness will be escaped.
211
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212
+ # treated as '${Hostname}' itself on the command line.
213
+
214
+ set -- \
215
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
216
+ -classpath "$CLASSPATH" \
217
+ org.gradle.wrapper.GradleWrapperMain \
218
+ "$@"
219
+
220
+ # Stop when "xargs" is not available.
221
+ if ! command -v xargs >/dev/null 2>&1
222
+ then
223
+ die "xargs is not available"
186
224
  fi
187
225
 
226
+ # Use "xargs" to parse quoted args.
227
+ #
228
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
229
+ #
230
+ # In Bash we could simply go:
231
+ #
232
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
233
+ # set -- "${ARGS[@]}" "$@"
234
+ #
235
+ # but POSIX shell has neither arrays nor command substitution, so instead we
236
+ # post-process each arg (as a line of input to sed) to backslash-escape any
237
+ # character that might be a shell metacharacter, then use eval to reverse
238
+ # that process (while maintaining the separation between arguments), and wrap
239
+ # the whole thing up as a single "set" statement.
240
+ #
241
+ # This will of course break if any of these variables contains a newline or
242
+ # an unmatched quote.
243
+ #
244
+
245
+ eval "set -- $(
246
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
247
+ xargs -n1 |
248
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
249
+ tr '\n' ' '
250
+ )" '"$@"'
251
+
188
252
  exec "$JAVACMD" "$@"
@@ -13,8 +13,10 @@
13
13
  @rem See the License for the specific language governing permissions and
14
14
  @rem limitations under the License.
15
15
  @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
16
18
 
17
- @if "%DEBUG%" == "" @echo off
19
+ @if "%DEBUG%"=="" @echo off
18
20
  @rem ##########################################################################
19
21
  @rem
20
22
  @rem Gradle startup script for Windows
@@ -25,10 +27,14 @@
25
27
  if "%OS%"=="Windows_NT" setlocal
26
28
 
27
29
  set DIRNAME=%~dp0
28
- if "%DIRNAME%" == "" set DIRNAME=.
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
29
32
  set APP_BASE_NAME=%~n0
30
33
  set APP_HOME=%DIRNAME%
31
34
 
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
32
38
  @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33
39
  set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34
40
 
@@ -37,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
37
43
 
38
44
  set JAVA_EXE=java.exe
39
45
  %JAVA_EXE% -version >NUL 2>&1
40
- if "%ERRORLEVEL%" == "0" goto init
46
+ if %ERRORLEVEL% equ 0 goto execute
41
47
 
42
- echo.
43
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44
- echo.
45
- echo Please set the JAVA_HOME variable in your environment to match the
46
- echo location of your Java installation.
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
47
53
 
48
54
  goto fail
49
55
 
@@ -51,48 +57,36 @@ goto fail
51
57
  set JAVA_HOME=%JAVA_HOME:"=%
52
58
  set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53
59
 
54
- if exist "%JAVA_EXE%" goto init
60
+ if exist "%JAVA_EXE%" goto execute
55
61
 
56
- echo.
57
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58
- echo.
59
- echo Please set the JAVA_HOME variable in your environment to match the
60
- echo location of your Java installation.
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
61
67
 
62
68
  goto fail
63
69
 
64
- :init
65
- @rem Get command-line arguments, handling Windows variants
66
-
67
- if not "%OS%" == "Windows_NT" goto win9xME_args
68
-
69
- :win9xME_args
70
- @rem Slurp the command line arguments.
71
- set CMD_LINE_ARGS=
72
- set _SKIP=2
73
-
74
- :win9xME_args_slurp
75
- if "x%~1" == "x" goto execute
76
-
77
- set CMD_LINE_ARGS=%*
78
-
79
70
  :execute
80
71
  @rem Setup the command line
81
72
 
82
73
  set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83
74
 
75
+
84
76
  @rem Execute Gradle
85
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
86
78
 
87
79
  :end
88
80
  @rem End local scope for the variables with windows NT shell
89
- if "%ERRORLEVEL%"=="0" goto mainEnd
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
90
82
 
91
83
  :fail
92
84
  rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93
85
  rem the _cmd.exe /c_ return code!
94
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95
- exit /b 1
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
96
90
 
97
91
  :mainEnd
98
92
  if "%OS%"=="Windows_NT" endlocal
@@ -1,2 +1,2 @@
1
- <manifest package="org.idpass.smartscanner.capacitor.smartscannercapacitorplugin">
1
+ <manifest>
2
2
  </manifest>
package/dist/esm/web.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  import { SmartScannerPlugin } from './definitions';
3
- export * from './web';
4
3
  export declare class SmartScannerPluginWeb extends WebPlugin implements SmartScannerPlugin {
5
4
  constructor();
6
5
  echo(options: {
package/dist/esm/web.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- export * from './web';
3
2
  export class SmartScannerPluginWeb extends WebPlugin {
4
3
  constructor() {
5
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,cAAc,OAAO,CAAC;AAEtB,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,OAA0B;QAC1C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAAY;QACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CACF"}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,OAA0B;QAC1C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAAY;QACtC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport * from './web';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACDM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC/C,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC/C,KAAK;AACL;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport * from './web';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICDM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC/C,KAAK;IACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC/C,KAAK;IACL;;;;;;;;;;;;;;;;;"}
package/ios/.npmignore ADDED
@@ -0,0 +1,4 @@
1
+ Pods/
2
+ Podfile.lock
3
+ contents.xcworkspacedata
4
+ xcuserdata/
@@ -10,7 +10,7 @@ public class SmartScannerPlugin: CAPPlugin {
10
10
 
11
11
  @objc func echo(_ call: CAPPluginCall) {
12
12
  let value = call.getString("value") ?? ""
13
- call.success([
13
+ call.resolve([
14
14
  "value": value
15
15
  ])
16
16
  }
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "@idpass/smartscanner-capacitor",
3
- "version": "0.7.2",
4
- "description": "Capacitor plugin for the SmartScanner Core library to scan MRZ, NFC and barcodes",
5
- "main": "dist/plugin.cjs.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/esm/index.d.ts",
8
- "scripts": {
9
- "lint": "npm run prettier -- --check && npm run swiftlint -- lint",
10
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
11
- "swiftlint": "node-swiftlint",
12
- "build": "npm run clean && tsc && rollup -c rollup.config.js",
13
- "clean": "rimraf ./dist",
14
- "watch": "tsc --watch",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "author": "NewLogic",
18
- "license": "Apache-2.0",
19
- "dependencies": {
20
- "@capacitor/android": "^6.0.0",
21
- "@capacitor/core": "^6.0.0",
22
- "@capacitor/ios": "^6.0.0"
23
- },
24
- "devDependencies": {
25
- "@capacitor/cli": "^6.1.2",
26
- "@ionic/eslint-config": "^0.4.0",
27
- "@ionic/prettier-config": "^1.0.1",
28
- "@ionic/swiftlint-config": "^1.1.2",
29
- "@rollup/plugin-node-resolve": "^8.1.0",
30
- "eslint": "^8.57.0",
31
- "prettier": "~2.2.0",
32
- "rollup": "^2.32.0",
33
- "swiftlint": "^1.0.1",
34
- "typescript": "^5.8.2"
35
- },
36
- "files": [
37
- "dist/",
38
- "android/",
39
- "ios/",
40
- "ios/Plugin",
41
- "IdpassSmartscannerCapacitor.podspec"
42
- ],
43
- "keywords": [
44
- "capacitor",
45
- "plugin",
46
- "native"
47
- ],
48
- "capacitor": {
49
- "ios": {
50
- "src": "ios"
51
- },
52
- "android": {
53
- "src": "android"
54
- }
55
- },
56
- "prettier": "@ionic/prettier-config",
57
- "swiftlint": "@ionic/swiftlint-config",
58
- "eslintConfig": {
59
- "extends": "@ionic/eslint-config/recommended"
60
- },
61
- "repository": {
62
- "type": "git",
63
- "url": "https://github.com/idpass/smartscanner-capacitor.git"
64
- },
65
- "bugs": {
66
- "url": "https://github.com/idpass/smartscanner-capacitor/issues"
67
- },
68
- "publishConfig": {
69
- "access": "public"
70
- }
71
- }
1
+ {
2
+ "name": "@idpass/smartscanner-capacitor",
3
+ "version": "0.7.3-beta.2",
4
+ "description": "Capacitor plugin for the SmartScanner Core library to scan MRZ, NFC and barcodes",
5
+ "main": "dist/plugin.cjs.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "scripts": {
9
+ "lint": "npm run prettier -- --check && npm run swiftlint -- lint",
10
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
11
+ "swiftlint": "node-swiftlint",
12
+ "build": "npm run clean && tsc && rollup -c rollup.config.js",
13
+ "clean": "rimraf ./dist",
14
+ "watch": "tsc --watch",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "author": "NewLogic",
18
+ "license": "Apache-2.0",
19
+ "dependencies": {
20
+ "@capacitor/android": "^7.4.3",
21
+ "@capacitor/core": "^7.4.3",
22
+ "@capacitor/ios": "^7.4.3"
23
+ },
24
+ "devDependencies": {
25
+ "@capacitor/cli": "^7.4.3",
26
+ "@ionic/eslint-config": "^0.4.0",
27
+ "@ionic/prettier-config": "^1.0.1",
28
+ "@ionic/swiftlint-config": "^1.1.2",
29
+ "@rollup/plugin-node-resolve": "^8.1.0",
30
+ "eslint": "^8.57.0",
31
+ "prettier": "~2.2.0",
32
+ "rollup": "^2.32.0",
33
+ "swiftlint": "^1.0.1",
34
+ "typescript": "^5.9.2"
35
+ },
36
+ "files": [
37
+ "dist/",
38
+ "android/",
39
+ "ios/",
40
+ "ios/Plugin",
41
+ "IdpassSmartscannerCapacitor.podspec"
42
+ ],
43
+ "keywords": [
44
+ "capacitor",
45
+ "plugin",
46
+ "native"
47
+ ],
48
+ "capacitor": {
49
+ "ios": {
50
+ "src": "ios"
51
+ },
52
+ "android": {
53
+ "src": "android"
54
+ }
55
+ },
56
+ "prettier": "@ionic/prettier-config",
57
+ "swiftlint": "@ionic/swiftlint-config",
58
+ "eslintConfig": {
59
+ "extends": "@ionic/eslint-config/recommended"
60
+ },
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "https://github.com/idpass/smartscanner-capacitor.git"
64
+ },
65
+ "bugs": {
66
+ "url": "https://github.com/idpass/smartscanner-capacitor/issues"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public"
70
+ }
71
+ }