├── .editorconfig
├── .gitignore
├── .vscode
├── extensions.json
└── settings.json
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── proguard-rules.pro
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── fs
│ └── htmlclient
│ └── plugins
│ └── webviewcache
│ ├── ClearCache.java
│ └── WebViewCachePlugin.java
├── package-lock.json
├── package.json
├── rollup.config.mjs
├── src
├── definitions.ts
├── index.ts
└── web.ts
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | end_of_line = crlf
7 | indent_style = space
8 | indent_size = 2
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.js]
13 | quote_type = single
14 |
15 | [*.ts]
16 | quote_type = single
17 |
18 | [*.md]
19 | max_line_length = off
20 | trim_trailing_whitespace = false
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # node files
2 | dist
3 | node_modules
4 |
5 | # iOS files
6 | Pods
7 | Podfile.lock
8 | Build
9 | xcuserdata
10 |
11 | # macOS files
12 | .DS_Store
13 |
14 | # Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
15 |
16 | # Built application files
17 | *.apk
18 | *.ap_
19 |
20 | # Files for the ART/Dalvik VM
21 | *.dex
22 |
23 | # Java class files
24 | *.class
25 |
26 | # Generated files
27 | bin
28 | gen
29 | out
30 |
31 | # Gradle files
32 | .gradle
33 | build
34 |
35 | # Local configuration file (sdk path, etc)
36 | local.properties
37 |
38 | # Proguard folder generated by Eclipse
39 | proguard
40 |
41 | # Log Files
42 | *.log
43 |
44 | # Android Studio Navigation editor temp files
45 | .navigation
46 |
47 | # Android Studio captures folder
48 | captures
49 |
50 | # IntelliJ
51 | *.iml
52 | .idea
53 |
54 | # Keystore files
55 | # Uncomment the following line if you do not want to check your keystore files in.
56 | #*.jks
57 |
58 | # External native build folder generated in Android Studio 2.2 and later
59 | .externalNativeBuild
60 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "editorconfig.editorconfig"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "css.format.enable": true,
3 | "css.format.newlineBetweenRules": true,
4 | "css.format.newlineBetweenSelectors": true,
5 | "css.format.spaceAroundSelectorSeparator": true,
6 |
7 | "editor.tabSize": 2,
8 | "editor.wordWrap": "off",
9 | "editor.wrappingIndent": "indent",
10 |
11 | "files.insertFinalNewline": true,
12 | "files.trimTrailingWhitespace": true,
13 |
14 | "html.format.maxPreserveNewLines": 1,
15 | "html.format.wrapLineLength": 0,
16 |
17 | "javascript.preferences.importModuleSpecifier": "non-relative",
18 | "javascript.preferences.quoteStyle": "single",
19 |
20 | "search.exclude": {
21 | "**/dist": true,
22 | "**/node_modules": true
23 | },
24 |
25 | "typescript.preferences.importModuleSpecifier": "non-relative",
26 | "typescript.preferences.quoteStyle": "single",
27 | "typescript.tsdk": "node_modules\\typescript\\lib"
28 | }
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Framework Systems GmbH
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Capacitor WebViewCache Plugin
2 |
3 | The native Android `WebView` caches images. If images are replaced on the server but keep the same filename, the `WebView` still shows the cached images. This plugin makes it possible to clear the `WebView` cache if needed.
4 |
5 | ## What does it do?
6 |
7 | The plugin calls the native `WebView.clearCache(true)` method that clears the cache and deletes all cache files.
8 |
9 | ## Install
10 |
11 | ```
12 | npm install capacitor-plugin-webview-cache
13 | npx cap sync
14 | ```
15 |
16 | ## Usage
17 |
18 | ```typescript
19 | import { Plugins } from '@capacitor/core';
20 |
21 | const { WebViewCache } = Plugins;
22 |
23 | ...
24 |
25 | WebViewCache.clearCache();
26 | ```
27 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3 | androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4 | androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5 | androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
6 | }
7 |
8 | buildscript {
9 | repositories {
10 | google()
11 | mavenCentral()
12 | }
13 | dependencies {
14 | classpath 'com.android.tools.build:gradle:8.8.2'
15 | }
16 | }
17 |
18 | apply plugin: 'com.android.library'
19 |
20 | android {
21 | namespace "com.fs.htmlclient.plugins.webviewcache"
22 | compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
23 | defaultConfig {
24 | minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
25 | targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
26 | versionCode 40000
27 | versionName "4.0.0"
28 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
29 | }
30 | buildTypes {
31 | release {
32 | minifyEnabled false
33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34 | }
35 | }
36 | lintOptions {
37 | abortOnError false
38 | }
39 | compileOptions {
40 | sourceCompatibility JavaVersion.VERSION_21
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 | }
59 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
19 | # AndroidX package structure to make it clearer which packages are bundled with the
20 | # Android operating system, and which are packaged with your app's APK
21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
22 | android.useAndroidX=true
23 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FrameworkSystemsGmbH/capacitor-plugin-webview-cache/773b32b8677f1d0377b8b5a8edbcfa9a8c3b1202/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Mar 14 11:14:24 CET 2025
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # 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
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
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"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | 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 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | 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.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # 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
121 | fi
122 |
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
127 |
128 | # 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
146 | # 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\""
156 | fi
157 | i=`expr $i + 1`
158 | 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 | fi
172 |
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 |
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"
182 |
183 | exec "$JAVACMD" "$@"
184 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 | @rem Execute Gradle
73 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
74 |
75 | :end
76 | @rem End local scope for the variables with windows NT shell
77 | if "%ERRORLEVEL%"=="0" goto mainEnd
78 |
79 | :fail
80 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
81 | rem the _cmd.exe /c_ return code!
82 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
83 | exit /b 1
84 |
85 | :mainEnd
86 | if "%OS%"=="Windows_NT" endlocal
87 |
88 | :omega
89 |
--------------------------------------------------------------------------------
/android/proguard-rules.pro:
--------------------------------------------------------------------------------
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
22 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':capacitor-android'
2 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fs/htmlclient/plugins/webviewcache/ClearCache.java:
--------------------------------------------------------------------------------
1 | package com.fs.htmlclient.plugins.webviewcache;
2 |
3 | import android.webkit.WebView;
4 |
5 | public class ClearCache implements Runnable {
6 |
7 | private WebView webView;
8 |
9 | public ClearCache(WebView webView) {
10 | this.webView = webView;
11 | }
12 |
13 | @Override
14 | public void run() {
15 | this.webView.clearCache(true);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/android/src/main/java/com/fs/htmlclient/plugins/webviewcache/WebViewCachePlugin.java:
--------------------------------------------------------------------------------
1 | package com.fs.htmlclient.plugins.webviewcache;
2 |
3 | import android.app.Activity;
4 | import android.webkit.WebView;
5 |
6 | import com.getcapacitor.Bridge;
7 | import com.getcapacitor.Plugin;
8 | import com.getcapacitor.PluginCall;
9 | import com.getcapacitor.PluginMethod;
10 | import com.getcapacitor.annotation.CapacitorPlugin;
11 |
12 | @CapacitorPlugin(name = "WebViewCache")
13 | public class WebViewCachePlugin extends Plugin {
14 |
15 | @PluginMethod
16 | public void clearCache(PluginCall call) {
17 | try {
18 | Activity activity = this.getActivity();
19 |
20 | if (activity == null) {
21 | throw new Exception("Activity instance is null!");
22 | }
23 |
24 | Bridge bridge = this.getBridge();
25 |
26 | if (bridge == null) {
27 | throw new Exception("Bridge instance is null!");
28 | }
29 |
30 | WebView webView = bridge.getWebView();
31 |
32 | if (webView == null) {
33 | throw new Exception("WebView instance is null!");
34 | }
35 |
36 | activity.runOnUiThread(new ClearCache(webView));
37 |
38 | call.resolve();
39 | } catch (Exception ex) {
40 | call.reject(ex.getMessage(), ex);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "capacitor-plugin-webview-cache",
3 | "version": "4.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "capacitor-plugin-webview-cache",
9 | "version": "4.0.0",
10 | "license": "MIT",
11 | "devDependencies": {
12 | "@capacitor/android": "7.1.0",
13 | "@capacitor/core": "7.1.0",
14 | "npm-check-updates": "17.1.15",
15 | "rimraf": "6.0.1",
16 | "rollup": "4.36.0",
17 | "typescript": "5.8.2"
18 | },
19 | "peerDependencies": {
20 | "@capacitor/core": "^7.0.0"
21 | }
22 | },
23 | "node_modules/@capacitor/android": {
24 | "version": "7.1.0",
25 | "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-7.1.0.tgz",
26 | "integrity": "sha512-piPgQViWOjh18H7R8wDkh5uaZ5PwRbMxGZFu39ReP8Y0nZwjS8ESUvJuBm38T+HHJnHM6MnDHmCWnW3ixKqeZw==",
27 | "dev": true,
28 | "peerDependencies": {
29 | "@capacitor/core": "^7.1.0"
30 | }
31 | },
32 | "node_modules/@capacitor/core": {
33 | "version": "7.1.0",
34 | "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.1.0.tgz",
35 | "integrity": "sha512-I0a4C8gux5sx+HDamJjCiWHEWRdJU3hejwURFOSwJjUmAMkfkrm4hOsI0dgd+S0eCkKKKYKz9WNm7DAIvhm2zw==",
36 | "dev": true,
37 | "dependencies": {
38 | "tslib": "^2.1.0"
39 | }
40 | },
41 | "node_modules/@isaacs/cliui": {
42 | "version": "8.0.2",
43 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
44 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
45 | "dev": true,
46 | "dependencies": {
47 | "string-width": "^5.1.2",
48 | "string-width-cjs": "npm:string-width@^4.2.0",
49 | "strip-ansi": "^7.0.1",
50 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
51 | "wrap-ansi": "^8.1.0",
52 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
53 | },
54 | "engines": {
55 | "node": ">=12"
56 | }
57 | },
58 | "node_modules/@pkgjs/parseargs": {
59 | "version": "0.11.0",
60 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
61 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
62 | "dev": true,
63 | "optional": true,
64 | "engines": {
65 | "node": ">=14"
66 | }
67 | },
68 | "node_modules/@rollup/rollup-android-arm-eabi": {
69 | "version": "4.36.0",
70 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz",
71 | "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==",
72 | "cpu": [
73 | "arm"
74 | ],
75 | "dev": true,
76 | "optional": true,
77 | "os": [
78 | "android"
79 | ]
80 | },
81 | "node_modules/@rollup/rollup-android-arm64": {
82 | "version": "4.36.0",
83 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz",
84 | "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==",
85 | "cpu": [
86 | "arm64"
87 | ],
88 | "dev": true,
89 | "optional": true,
90 | "os": [
91 | "android"
92 | ]
93 | },
94 | "node_modules/@rollup/rollup-darwin-arm64": {
95 | "version": "4.36.0",
96 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz",
97 | "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==",
98 | "cpu": [
99 | "arm64"
100 | ],
101 | "dev": true,
102 | "optional": true,
103 | "os": [
104 | "darwin"
105 | ]
106 | },
107 | "node_modules/@rollup/rollup-darwin-x64": {
108 | "version": "4.36.0",
109 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz",
110 | "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==",
111 | "cpu": [
112 | "x64"
113 | ],
114 | "dev": true,
115 | "optional": true,
116 | "os": [
117 | "darwin"
118 | ]
119 | },
120 | "node_modules/@rollup/rollup-freebsd-arm64": {
121 | "version": "4.36.0",
122 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz",
123 | "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==",
124 | "cpu": [
125 | "arm64"
126 | ],
127 | "dev": true,
128 | "optional": true,
129 | "os": [
130 | "freebsd"
131 | ]
132 | },
133 | "node_modules/@rollup/rollup-freebsd-x64": {
134 | "version": "4.36.0",
135 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz",
136 | "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==",
137 | "cpu": [
138 | "x64"
139 | ],
140 | "dev": true,
141 | "optional": true,
142 | "os": [
143 | "freebsd"
144 | ]
145 | },
146 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
147 | "version": "4.36.0",
148 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz",
149 | "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==",
150 | "cpu": [
151 | "arm"
152 | ],
153 | "dev": true,
154 | "optional": true,
155 | "os": [
156 | "linux"
157 | ]
158 | },
159 | "node_modules/@rollup/rollup-linux-arm-musleabihf": {
160 | "version": "4.36.0",
161 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz",
162 | "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==",
163 | "cpu": [
164 | "arm"
165 | ],
166 | "dev": true,
167 | "optional": true,
168 | "os": [
169 | "linux"
170 | ]
171 | },
172 | "node_modules/@rollup/rollup-linux-arm64-gnu": {
173 | "version": "4.36.0",
174 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz",
175 | "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==",
176 | "cpu": [
177 | "arm64"
178 | ],
179 | "dev": true,
180 | "optional": true,
181 | "os": [
182 | "linux"
183 | ]
184 | },
185 | "node_modules/@rollup/rollup-linux-arm64-musl": {
186 | "version": "4.36.0",
187 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz",
188 | "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==",
189 | "cpu": [
190 | "arm64"
191 | ],
192 | "dev": true,
193 | "optional": true,
194 | "os": [
195 | "linux"
196 | ]
197 | },
198 | "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
199 | "version": "4.36.0",
200 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz",
201 | "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==",
202 | "cpu": [
203 | "loong64"
204 | ],
205 | "dev": true,
206 | "optional": true,
207 | "os": [
208 | "linux"
209 | ]
210 | },
211 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
212 | "version": "4.36.0",
213 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz",
214 | "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==",
215 | "cpu": [
216 | "ppc64"
217 | ],
218 | "dev": true,
219 | "optional": true,
220 | "os": [
221 | "linux"
222 | ]
223 | },
224 | "node_modules/@rollup/rollup-linux-riscv64-gnu": {
225 | "version": "4.36.0",
226 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz",
227 | "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==",
228 | "cpu": [
229 | "riscv64"
230 | ],
231 | "dev": true,
232 | "optional": true,
233 | "os": [
234 | "linux"
235 | ]
236 | },
237 | "node_modules/@rollup/rollup-linux-s390x-gnu": {
238 | "version": "4.36.0",
239 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz",
240 | "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==",
241 | "cpu": [
242 | "s390x"
243 | ],
244 | "dev": true,
245 | "optional": true,
246 | "os": [
247 | "linux"
248 | ]
249 | },
250 | "node_modules/@rollup/rollup-linux-x64-gnu": {
251 | "version": "4.36.0",
252 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz",
253 | "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==",
254 | "cpu": [
255 | "x64"
256 | ],
257 | "dev": true,
258 | "optional": true,
259 | "os": [
260 | "linux"
261 | ]
262 | },
263 | "node_modules/@rollup/rollup-linux-x64-musl": {
264 | "version": "4.36.0",
265 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz",
266 | "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==",
267 | "cpu": [
268 | "x64"
269 | ],
270 | "dev": true,
271 | "optional": true,
272 | "os": [
273 | "linux"
274 | ]
275 | },
276 | "node_modules/@rollup/rollup-win32-arm64-msvc": {
277 | "version": "4.36.0",
278 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz",
279 | "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==",
280 | "cpu": [
281 | "arm64"
282 | ],
283 | "dev": true,
284 | "optional": true,
285 | "os": [
286 | "win32"
287 | ]
288 | },
289 | "node_modules/@rollup/rollup-win32-ia32-msvc": {
290 | "version": "4.36.0",
291 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz",
292 | "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==",
293 | "cpu": [
294 | "ia32"
295 | ],
296 | "dev": true,
297 | "optional": true,
298 | "os": [
299 | "win32"
300 | ]
301 | },
302 | "node_modules/@rollup/rollup-win32-x64-msvc": {
303 | "version": "4.36.0",
304 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz",
305 | "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==",
306 | "cpu": [
307 | "x64"
308 | ],
309 | "dev": true,
310 | "optional": true,
311 | "os": [
312 | "win32"
313 | ]
314 | },
315 | "node_modules/@types/estree": {
316 | "version": "1.0.6",
317 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
318 | "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
319 | "dev": true
320 | },
321 | "node_modules/ansi-regex": {
322 | "version": "6.1.0",
323 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
324 | "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
325 | "dev": true,
326 | "engines": {
327 | "node": ">=12"
328 | },
329 | "funding": {
330 | "url": "https://github.com/chalk/ansi-regex?sponsor=1"
331 | }
332 | },
333 | "node_modules/ansi-styles": {
334 | "version": "6.2.1",
335 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
336 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
337 | "dev": true,
338 | "engines": {
339 | "node": ">=12"
340 | },
341 | "funding": {
342 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
343 | }
344 | },
345 | "node_modules/balanced-match": {
346 | "version": "1.0.2",
347 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
348 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
349 | "dev": true
350 | },
351 | "node_modules/brace-expansion": {
352 | "version": "2.0.1",
353 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
354 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
355 | "dev": true,
356 | "dependencies": {
357 | "balanced-match": "^1.0.0"
358 | }
359 | },
360 | "node_modules/color-convert": {
361 | "version": "2.0.1",
362 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
363 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
364 | "dev": true,
365 | "dependencies": {
366 | "color-name": "~1.1.4"
367 | },
368 | "engines": {
369 | "node": ">=7.0.0"
370 | }
371 | },
372 | "node_modules/color-name": {
373 | "version": "1.1.4",
374 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
375 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
376 | "dev": true
377 | },
378 | "node_modules/cross-spawn": {
379 | "version": "7.0.6",
380 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
381 | "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
382 | "dev": true,
383 | "dependencies": {
384 | "path-key": "^3.1.0",
385 | "shebang-command": "^2.0.0",
386 | "which": "^2.0.1"
387 | },
388 | "engines": {
389 | "node": ">= 8"
390 | }
391 | },
392 | "node_modules/eastasianwidth": {
393 | "version": "0.2.0",
394 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
395 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
396 | "dev": true
397 | },
398 | "node_modules/emoji-regex": {
399 | "version": "9.2.2",
400 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
401 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
402 | "dev": true
403 | },
404 | "node_modules/foreground-child": {
405 | "version": "3.3.0",
406 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz",
407 | "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==",
408 | "dev": true,
409 | "dependencies": {
410 | "cross-spawn": "^7.0.0",
411 | "signal-exit": "^4.0.1"
412 | },
413 | "engines": {
414 | "node": ">=14"
415 | },
416 | "funding": {
417 | "url": "https://github.com/sponsors/isaacs"
418 | }
419 | },
420 | "node_modules/fsevents": {
421 | "version": "2.3.2",
422 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
423 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
424 | "dev": true,
425 | "hasInstallScript": true,
426 | "optional": true,
427 | "os": [
428 | "darwin"
429 | ],
430 | "engines": {
431 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
432 | }
433 | },
434 | "node_modules/glob": {
435 | "version": "11.0.0",
436 | "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz",
437 | "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==",
438 | "dev": true,
439 | "dependencies": {
440 | "foreground-child": "^3.1.0",
441 | "jackspeak": "^4.0.1",
442 | "minimatch": "^10.0.0",
443 | "minipass": "^7.1.2",
444 | "package-json-from-dist": "^1.0.0",
445 | "path-scurry": "^2.0.0"
446 | },
447 | "bin": {
448 | "glob": "dist/esm/bin.mjs"
449 | },
450 | "engines": {
451 | "node": "20 || >=22"
452 | },
453 | "funding": {
454 | "url": "https://github.com/sponsors/isaacs"
455 | }
456 | },
457 | "node_modules/is-fullwidth-code-point": {
458 | "version": "3.0.0",
459 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
460 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
461 | "dev": true,
462 | "engines": {
463 | "node": ">=8"
464 | }
465 | },
466 | "node_modules/isexe": {
467 | "version": "2.0.0",
468 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
469 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
470 | "dev": true
471 | },
472 | "node_modules/jackspeak": {
473 | "version": "4.0.1",
474 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz",
475 | "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==",
476 | "dev": true,
477 | "dependencies": {
478 | "@isaacs/cliui": "^8.0.2"
479 | },
480 | "engines": {
481 | "node": "20 || >=22"
482 | },
483 | "funding": {
484 | "url": "https://github.com/sponsors/isaacs"
485 | },
486 | "optionalDependencies": {
487 | "@pkgjs/parseargs": "^0.11.0"
488 | }
489 | },
490 | "node_modules/lru-cache": {
491 | "version": "11.0.1",
492 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz",
493 | "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==",
494 | "dev": true,
495 | "engines": {
496 | "node": "20 || >=22"
497 | }
498 | },
499 | "node_modules/minimatch": {
500 | "version": "10.0.1",
501 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
502 | "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
503 | "dev": true,
504 | "dependencies": {
505 | "brace-expansion": "^2.0.1"
506 | },
507 | "engines": {
508 | "node": "20 || >=22"
509 | },
510 | "funding": {
511 | "url": "https://github.com/sponsors/isaacs"
512 | }
513 | },
514 | "node_modules/minipass": {
515 | "version": "7.1.2",
516 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
517 | "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
518 | "dev": true,
519 | "engines": {
520 | "node": ">=16 || 14 >=14.17"
521 | }
522 | },
523 | "node_modules/npm-check-updates": {
524 | "version": "17.1.15",
525 | "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.15.tgz",
526 | "integrity": "sha512-miATvKu5rjec/1wxc5TGDjpsucgtCHwRVZorZpDkS6NzdWXfnUWlN4abZddWb7XSijAuBNzzYglIdTm9SbgMVg==",
527 | "dev": true,
528 | "bin": {
529 | "ncu": "build/cli.js",
530 | "npm-check-updates": "build/cli.js"
531 | },
532 | "engines": {
533 | "node": "^18.18.0 || >=20.0.0",
534 | "npm": ">=8.12.1"
535 | }
536 | },
537 | "node_modules/package-json-from-dist": {
538 | "version": "1.0.0",
539 | "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
540 | "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==",
541 | "dev": true
542 | },
543 | "node_modules/path-key": {
544 | "version": "3.1.1",
545 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
546 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
547 | "dev": true,
548 | "engines": {
549 | "node": ">=8"
550 | }
551 | },
552 | "node_modules/path-scurry": {
553 | "version": "2.0.0",
554 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
555 | "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
556 | "dev": true,
557 | "dependencies": {
558 | "lru-cache": "^11.0.0",
559 | "minipass": "^7.1.2"
560 | },
561 | "engines": {
562 | "node": "20 || >=22"
563 | },
564 | "funding": {
565 | "url": "https://github.com/sponsors/isaacs"
566 | }
567 | },
568 | "node_modules/rimraf": {
569 | "version": "6.0.1",
570 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz",
571 | "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==",
572 | "dev": true,
573 | "dependencies": {
574 | "glob": "^11.0.0",
575 | "package-json-from-dist": "^1.0.0"
576 | },
577 | "bin": {
578 | "rimraf": "dist/esm/bin.mjs"
579 | },
580 | "engines": {
581 | "node": "20 || >=22"
582 | },
583 | "funding": {
584 | "url": "https://github.com/sponsors/isaacs"
585 | }
586 | },
587 | "node_modules/rollup": {
588 | "version": "4.36.0",
589 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz",
590 | "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==",
591 | "dev": true,
592 | "dependencies": {
593 | "@types/estree": "1.0.6"
594 | },
595 | "bin": {
596 | "rollup": "dist/bin/rollup"
597 | },
598 | "engines": {
599 | "node": ">=18.0.0",
600 | "npm": ">=8.0.0"
601 | },
602 | "optionalDependencies": {
603 | "@rollup/rollup-android-arm-eabi": "4.36.0",
604 | "@rollup/rollup-android-arm64": "4.36.0",
605 | "@rollup/rollup-darwin-arm64": "4.36.0",
606 | "@rollup/rollup-darwin-x64": "4.36.0",
607 | "@rollup/rollup-freebsd-arm64": "4.36.0",
608 | "@rollup/rollup-freebsd-x64": "4.36.0",
609 | "@rollup/rollup-linux-arm-gnueabihf": "4.36.0",
610 | "@rollup/rollup-linux-arm-musleabihf": "4.36.0",
611 | "@rollup/rollup-linux-arm64-gnu": "4.36.0",
612 | "@rollup/rollup-linux-arm64-musl": "4.36.0",
613 | "@rollup/rollup-linux-loongarch64-gnu": "4.36.0",
614 | "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0",
615 | "@rollup/rollup-linux-riscv64-gnu": "4.36.0",
616 | "@rollup/rollup-linux-s390x-gnu": "4.36.0",
617 | "@rollup/rollup-linux-x64-gnu": "4.36.0",
618 | "@rollup/rollup-linux-x64-musl": "4.36.0",
619 | "@rollup/rollup-win32-arm64-msvc": "4.36.0",
620 | "@rollup/rollup-win32-ia32-msvc": "4.36.0",
621 | "@rollup/rollup-win32-x64-msvc": "4.36.0",
622 | "fsevents": "~2.3.2"
623 | }
624 | },
625 | "node_modules/shebang-command": {
626 | "version": "2.0.0",
627 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
628 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
629 | "dev": true,
630 | "dependencies": {
631 | "shebang-regex": "^3.0.0"
632 | },
633 | "engines": {
634 | "node": ">=8"
635 | }
636 | },
637 | "node_modules/shebang-regex": {
638 | "version": "3.0.0",
639 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
640 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
641 | "dev": true,
642 | "engines": {
643 | "node": ">=8"
644 | }
645 | },
646 | "node_modules/signal-exit": {
647 | "version": "4.1.0",
648 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
649 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
650 | "dev": true,
651 | "engines": {
652 | "node": ">=14"
653 | },
654 | "funding": {
655 | "url": "https://github.com/sponsors/isaacs"
656 | }
657 | },
658 | "node_modules/string-width": {
659 | "version": "5.1.2",
660 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
661 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
662 | "dev": true,
663 | "dependencies": {
664 | "eastasianwidth": "^0.2.0",
665 | "emoji-regex": "^9.2.2",
666 | "strip-ansi": "^7.0.1"
667 | },
668 | "engines": {
669 | "node": ">=12"
670 | },
671 | "funding": {
672 | "url": "https://github.com/sponsors/sindresorhus"
673 | }
674 | },
675 | "node_modules/string-width-cjs": {
676 | "name": "string-width",
677 | "version": "4.2.3",
678 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
679 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
680 | "dev": true,
681 | "dependencies": {
682 | "emoji-regex": "^8.0.0",
683 | "is-fullwidth-code-point": "^3.0.0",
684 | "strip-ansi": "^6.0.1"
685 | },
686 | "engines": {
687 | "node": ">=8"
688 | }
689 | },
690 | "node_modules/string-width-cjs/node_modules/ansi-regex": {
691 | "version": "5.0.1",
692 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
693 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
694 | "dev": true,
695 | "engines": {
696 | "node": ">=8"
697 | }
698 | },
699 | "node_modules/string-width-cjs/node_modules/emoji-regex": {
700 | "version": "8.0.0",
701 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
702 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
703 | "dev": true
704 | },
705 | "node_modules/string-width-cjs/node_modules/strip-ansi": {
706 | "version": "6.0.1",
707 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
708 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
709 | "dev": true,
710 | "dependencies": {
711 | "ansi-regex": "^5.0.1"
712 | },
713 | "engines": {
714 | "node": ">=8"
715 | }
716 | },
717 | "node_modules/strip-ansi": {
718 | "version": "7.1.0",
719 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
720 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
721 | "dev": true,
722 | "dependencies": {
723 | "ansi-regex": "^6.0.1"
724 | },
725 | "engines": {
726 | "node": ">=12"
727 | },
728 | "funding": {
729 | "url": "https://github.com/chalk/strip-ansi?sponsor=1"
730 | }
731 | },
732 | "node_modules/strip-ansi-cjs": {
733 | "name": "strip-ansi",
734 | "version": "6.0.1",
735 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
736 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
737 | "dev": true,
738 | "dependencies": {
739 | "ansi-regex": "^5.0.1"
740 | },
741 | "engines": {
742 | "node": ">=8"
743 | }
744 | },
745 | "node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
746 | "version": "5.0.1",
747 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
748 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
749 | "dev": true,
750 | "engines": {
751 | "node": ">=8"
752 | }
753 | },
754 | "node_modules/tslib": {
755 | "version": "2.8.1",
756 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
757 | "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
758 | "dev": true
759 | },
760 | "node_modules/typescript": {
761 | "version": "5.8.2",
762 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
763 | "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
764 | "dev": true,
765 | "bin": {
766 | "tsc": "bin/tsc",
767 | "tsserver": "bin/tsserver"
768 | },
769 | "engines": {
770 | "node": ">=14.17"
771 | }
772 | },
773 | "node_modules/which": {
774 | "version": "2.0.2",
775 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
776 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
777 | "dev": true,
778 | "dependencies": {
779 | "isexe": "^2.0.0"
780 | },
781 | "bin": {
782 | "node-which": "bin/node-which"
783 | },
784 | "engines": {
785 | "node": ">= 8"
786 | }
787 | },
788 | "node_modules/wrap-ansi": {
789 | "version": "8.1.0",
790 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
791 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
792 | "dev": true,
793 | "dependencies": {
794 | "ansi-styles": "^6.1.0",
795 | "string-width": "^5.0.1",
796 | "strip-ansi": "^7.0.1"
797 | },
798 | "engines": {
799 | "node": ">=12"
800 | },
801 | "funding": {
802 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
803 | }
804 | },
805 | "node_modules/wrap-ansi-cjs": {
806 | "name": "wrap-ansi",
807 | "version": "7.0.0",
808 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
809 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
810 | "dev": true,
811 | "dependencies": {
812 | "ansi-styles": "^4.0.0",
813 | "string-width": "^4.1.0",
814 | "strip-ansi": "^6.0.0"
815 | },
816 | "engines": {
817 | "node": ">=10"
818 | },
819 | "funding": {
820 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
821 | }
822 | },
823 | "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
824 | "version": "5.0.1",
825 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
826 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
827 | "dev": true,
828 | "engines": {
829 | "node": ">=8"
830 | }
831 | },
832 | "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
833 | "version": "4.3.0",
834 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
835 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
836 | "dev": true,
837 | "dependencies": {
838 | "color-convert": "^2.0.1"
839 | },
840 | "engines": {
841 | "node": ">=8"
842 | },
843 | "funding": {
844 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
845 | }
846 | },
847 | "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
848 | "version": "8.0.0",
849 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
850 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
851 | "dev": true
852 | },
853 | "node_modules/wrap-ansi-cjs/node_modules/string-width": {
854 | "version": "4.2.3",
855 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
856 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
857 | "dev": true,
858 | "dependencies": {
859 | "emoji-regex": "^8.0.0",
860 | "is-fullwidth-code-point": "^3.0.0",
861 | "strip-ansi": "^6.0.1"
862 | },
863 | "engines": {
864 | "node": ">=8"
865 | }
866 | },
867 | "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
868 | "version": "6.0.1",
869 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
870 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
871 | "dev": true,
872 | "dependencies": {
873 | "ansi-regex": "^5.0.1"
874 | },
875 | "engines": {
876 | "node": ">=8"
877 | }
878 | }
879 | }
880 | }
881 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "capacitor-plugin-webview-cache",
3 | "version": "4.0.0",
4 | "description": "Clears Android WebView cache",
5 | "main": "dist/plugin.cjs.js",
6 | "module": "dist/esm/index.js",
7 | "type": "module",
8 | "types": "dist/esm/index.d.ts",
9 | "unpkg": "dist/plugin.js",
10 | "files": [
11 | "android/src/main/",
12 | "android/build.gradle",
13 | "dist/"
14 | ],
15 | "author": "Framework Systems GmbH",
16 | "license": "MIT",
17 | "repository": {
18 | "type": "git",
19 | "url": "git+https://github.com/FrameworkSystemsGmbH/capacitor-plugin-webview-cache.git"
20 | },
21 | "bugs": {
22 | "url": "https://github.com/FrameworkSystemsGmbH/capacitor-plugin-webview-cache/issues"
23 | },
24 | "keywords": [
25 | "capacitor",
26 | "plugin",
27 | "native"
28 | ],
29 | "scripts": {
30 | "build": "rimraf ./dist && tsc && rollup -c rollup.config.mjs",
31 | "verify": "npm run build && npm run verify:android",
32 | "verify:android": "cd android && gradlew clean build test && cd ..",
33 | "updateSim": "ncu",
34 | "updateRun": "ncu -u"
35 | },
36 | "devDependencies": {
37 | "@capacitor/android": "7.1.0",
38 | "@capacitor/core": "7.1.0",
39 | "npm-check-updates": "17.1.15",
40 | "rimraf": "6.0.1",
41 | "rollup": "4.36.0",
42 | "typescript": "5.8.2"
43 | },
44 | "peerDependencies": {
45 | "@capacitor/core": "^7.0.0"
46 | },
47 | "capacitor": {
48 | "android": {
49 | "src": "android"
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/rollup.config.mjs:
--------------------------------------------------------------------------------
1 | export default {
2 | input: 'dist/esm/index.js',
3 | output: [
4 | {
5 | file: 'dist/plugin.js',
6 | format: 'iife',
7 | name: 'WebViewCachePlugin',
8 | globals: {
9 | '@capacitor/core': 'capacitorExports',
10 | },
11 | sourcemap: true,
12 | inlineDynamicImports: true,
13 | },
14 | {
15 | file: 'dist/plugin.cjs.js',
16 | format: 'cjs',
17 | sourcemap: true,
18 | inlineDynamicImports: true,
19 | },
20 | ],
21 | external: ['@capacitor/core'],
22 | };
23 |
--------------------------------------------------------------------------------
/src/definitions.ts:
--------------------------------------------------------------------------------
1 | export interface WebViewCachePlugin {
2 | clearCache(): Promise;
3 | }
4 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import { registerPlugin } from '@capacitor/core';
2 |
3 | import type { WebViewCachePlugin } from './definitions';
4 |
5 | const WebViewCache = registerPlugin('WebViewCache', {
6 | web: () => import('./web').then(m => new m.WebViewCacheWeb()),
7 | });
8 |
9 | export * from './definitions';
10 | export { WebViewCache };
11 |
--------------------------------------------------------------------------------
/src/web.ts:
--------------------------------------------------------------------------------
1 | import { WebPlugin } from '@capacitor/core';
2 |
3 | import type { WebViewCachePlugin } from './definitions';
4 |
5 | export class WebViewCacheWeb extends WebPlugin implements WebViewCachePlugin {
6 | async clearCache(): Promise { }
7 | }
8 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowUnreachableCode": false,
4 | "declaration": true,
5 | "esModuleInterop": true,
6 | "lib": [
7 | "dom",
8 | "ES2022"
9 | ],
10 | "module": "ES2022",
11 | "moduleResolution": "node",
12 | "noFallthroughCasesInSwitch": true,
13 | "noUnusedLocals": true,
14 | "noUnusedParameters": true,
15 | "outDir": "dist/esm",
16 | "pretty": true,
17 | "sourceMap": true,
18 | "strict": true,
19 | "target": "ES2022"
20 | },
21 | "files": [
22 | "src/index.ts"
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------