diff --git a/.changeset/happy-mails-juggle.md b/.changeset/happy-mails-juggle.md new file mode 100644 index 000000000..90119cdcc --- /dev/null +++ b/.changeset/happy-mails-juggle.md @@ -0,0 +1,5 @@ +--- +'@powersync/capacitor': minor +--- + +Initial release diff --git a/demos/example-capacitor/android/app/build.gradle b/demos/example-capacitor/android/app/build.gradle index c946bff6f..f77855be8 100644 --- a/demos/example-capacitor/android/app/build.gradle +++ b/demos/example-capacitor/android/app/build.gradle @@ -20,6 +20,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.debug } } } diff --git a/demos/example-capacitor/android/app/capacitor.build.gradle b/demos/example-capacitor/android/app/capacitor.build.gradle index 259821da2..cc26bf8ab 100644 --- a/demos/example-capacitor/android/app/capacitor.build.gradle +++ b/demos/example-capacitor/android/app/capacitor.build.gradle @@ -2,14 +2,16 @@ android { compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 } } apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" dependencies { + implementation project(':capacitor-community-sqlite') implementation project(':capacitor-splash-screen') + implementation project(':powersync-capacitor') } diff --git a/demos/example-capacitor/android/app/src/main/AndroidManifest.xml b/demos/example-capacitor/android/app/src/main/AndroidManifest.xml index 4d7ca3804..340e7df83 100644 --- a/demos/example-capacitor/android/app/src/main/AndroidManifest.xml +++ b/demos/example-capacitor/android/app/src/main/AndroidManifest.xml @@ -10,7 +10,7 @@ android:theme="@style/AppTheme"> /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +205,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/demos/example-capacitor/android/gradlew.bat b/demos/example-capacitor/android/gradlew.bat index 6689b85be..9b42019c7 100644 --- a/demos/example-capacitor/android/gradlew.bat +++ b/demos/example-capacitor/android/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/demos/example-capacitor/android/variables.gradle b/demos/example-capacitor/android/variables.gradle index 8ef305d0d..2c8e4083f 100644 --- a/demos/example-capacitor/android/variables.gradle +++ b/demos/example-capacitor/android/variables.gradle @@ -1,16 +1,16 @@ ext { - minSdkVersion = 22 - compileSdkVersion = 34 - targetSdkVersion = 34 - androidxActivityVersion = '1.8.0' - androidxAppCompatVersion = '1.6.1' + minSdkVersion = 23 + compileSdkVersion = 35 + targetSdkVersion = 35 + androidxActivityVersion = '1.9.2' + androidxAppCompatVersion = '1.7.0' androidxCoordinatorLayoutVersion = '1.2.0' - androidxCoreVersion = '1.12.0' - androidxFragmentVersion = '1.6.2' + androidxCoreVersion = '1.15.0' + androidxFragmentVersion = '1.8.4' coreSplashScreenVersion = '1.0.1' - androidxWebkitVersion = '1.9.0' + androidxWebkitVersion = '1.12.1' junitVersion = '4.13.2' - androidxJunitVersion = '1.1.5' - androidxEspressoCoreVersion = '3.5.1' + androidxJunitVersion = '1.2.1' + androidxEspressoCoreVersion = '3.6.1' cordovaAndroidVersion = '10.1.1' } \ No newline at end of file diff --git a/demos/example-capacitor/capacitor.config.json b/demos/example-capacitor/capacitor.config.json index fc6c3b251..aab7189f4 100644 --- a/demos/example-capacitor/capacitor.config.json +++ b/demos/example-capacitor/capacitor.config.json @@ -7,5 +7,11 @@ "SplashScreen": { "launchShowDuration": 0 } + }, + "android": { + "loggingBehavior": "production" + }, + "ios": { + "loggingBehavior": "production" } } diff --git a/demos/example-capacitor/ios/App/App.xcodeproj/project.pbxproj b/demos/example-capacitor/ios/App/App.xcodeproj/project.pbxproj index e9273628f..5107648f9 100644 --- a/demos/example-capacitor/ios/App/App.xcodeproj/project.pbxproj +++ b/demos/example-capacitor/ios/App/App.xcodeproj/project.pbxproj @@ -283,7 +283,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -334,7 +334,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -350,7 +350,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; @@ -370,7 +370,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.powersync.example; diff --git a/demos/example-capacitor/ios/App/Podfile b/demos/example-capacitor/ios/App/Podfile index 70b65a21b..a01311870 100644 --- a/demos/example-capacitor/ios/App/Podfile +++ b/demos/example-capacitor/ios/App/Podfile @@ -1,6 +1,6 @@ require_relative '../../../../node_modules/@capacitor/ios/scripts/pods_helpers' -platform :ios, '13.0' +platform :ios, '14.0' use_frameworks! # workaround to avoid Xcode caching of Pods that requires @@ -11,7 +11,9 @@ install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods pod 'Capacitor', :path => '../../../../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../../../node_modules/@capacitor/ios' + pod 'CapacitorCommunitySqlite', :path => '../../../../node_modules/@capacitor-community/sqlite' pod 'CapacitorSplashScreen', :path => '../../../../node_modules/@capacitor/splash-screen' + pod 'PowersyncCapacitor', :path => '../../../../packages/capacitor' end target 'App' do diff --git a/demos/example-capacitor/ios/App/Podfile.lock b/demos/example-capacitor/ios/App/Podfile.lock index 850243219..b919a5788 100644 --- a/demos/example-capacitor/ios/App/Podfile.lock +++ b/demos/example-capacitor/ios/App/Podfile.lock @@ -1,28 +1,60 @@ PODS: - - Capacitor (6.0.0): + - Capacitor (7.4.3): - CapacitorCordova - - CapacitorCordova (6.0.0) - - CapacitorSplashScreen (6.0.0): + - CapacitorCommunitySqlite (7.0.2): - Capacitor + - SQLCipher + - ZIPFoundation + - CapacitorCordova (7.4.3) + - CapacitorSplashScreen (7.0.3): + - Capacitor + - powersync-sqlite-core (0.4.8) + - PowersyncCapacitor (0.0.1): + - Capacitor + - powersync-sqlite-core (~> 0.4.6) + - SQLCipher (~> 4.0) + - SQLCipher (4.10.0): + - SQLCipher/standard (= 4.10.0) + - SQLCipher/common (4.10.0) + - SQLCipher/standard (4.10.0): + - SQLCipher/common + - ZIPFoundation (0.9.20) DEPENDENCIES: - "Capacitor (from `../../../../node_modules/@capacitor/ios`)" + - "CapacitorCommunitySqlite (from `../../../../node_modules/@capacitor-community/sqlite`)" - "CapacitorCordova (from `../../../../node_modules/@capacitor/ios`)" - "CapacitorSplashScreen (from `../../../../node_modules/@capacitor/splash-screen`)" + - PowersyncCapacitor (from `../../../../packages/capacitor`) + +SPEC REPOS: + trunk: + - powersync-sqlite-core + - SQLCipher + - ZIPFoundation EXTERNAL SOURCES: Capacitor: :path: "../../../../node_modules/@capacitor/ios" + CapacitorCommunitySqlite: + :path: "../../../../node_modules/@capacitor-community/sqlite" CapacitorCordova: :path: "../../../../node_modules/@capacitor/ios" CapacitorSplashScreen: :path: "../../../../node_modules/@capacitor/splash-screen" + PowersyncCapacitor: + :path: "../../../../packages/capacitor" SPEC CHECKSUMS: - Capacitor: 559d073c4ca6c27f8e7002c807eea94c3ba435a9 - CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af - CapacitorSplashScreen: 5431ab8d19c1c6e95777d53bfaa7a36a6c3d94c7 + Capacitor: b4741ca7affb32c1b70debd03df92cbf522d8a80 + CapacitorCommunitySqlite: b8e23cd2fd5bff7da8cb2a3a1cb3a6ffb9714a32 + CapacitorCordova: 435121e81a2df4d0034f0fb11fcefab5104cfdb5 + CapacitorSplashScreen: d06ae8804808e9f649a08e7bb7f283c77b688084 + powersync-sqlite-core: f48d06a7a9e6f73fee5bbc74da542466be2bb06f + PowersyncCapacitor: d7dcf7f15e24b512571dc87f545855f936ef9537 + SQLCipher: eb79c64049cb002b4e9fcb30edb7979bf4706dfc + ZIPFoundation: dfd3d681c4053ff7e2f7350bc4e53b5dba3f5351 -PODFILE CHECKSUM: 30a5df536d5e7830e635f84e1fe35fa438802eaa +PODFILE CHECKSUM: 1c728e00549cebade63eaffb81de205fd020c4ea -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/demos/example-capacitor/package.json b/demos/example-capacitor/package.json index e40e37441..a55d89413 100644 --- a/demos/example-capacitor/package.json +++ b/demos/example-capacitor/package.json @@ -19,10 +19,12 @@ "preview": "vite preview" }, "dependencies": { - "@capacitor/android": "^6.0.0", + "@capacitor-community/sqlite": "^7.0.2", + "@capacitor/android": "^7.4.3", "@capacitor/core": "latest", - "@capacitor/ios": "^6.0.0", + "@capacitor/ios": "^7.4.3", "@capacitor/splash-screen": "latest", + "@powersync/capacitor": "workspace:*", "@journeyapps/wa-sqlite": "^1.3.2", "@powersync/react": "workspace:*", "@powersync/web": "workspace:*", @@ -31,7 +33,7 @@ "react-router-dom": "^6.23.0" }, "devDependencies": { - "@capacitor/cli": "^6.0.0", + "@capacitor/cli": "^7.4.3", "@swc/core": "~1.6.0", "@types/node": "^20.12.12", "@types/react": "^18.3.2", diff --git a/demos/example-capacitor/src/components/providers/SystemProvider.tsx b/demos/example-capacitor/src/components/providers/SystemProvider.tsx index fc3b9e050..55a383d5a 100644 --- a/demos/example-capacitor/src/components/providers/SystemProvider.tsx +++ b/demos/example-capacitor/src/components/providers/SystemProvider.tsx @@ -1,26 +1,23 @@ -import { PowerSyncContext } from '@powersync/react'; -import { PowerSyncDatabase, createBaseLogger, LogLevel } from '@powersync/web'; import { CircularProgress } from '@mui/material'; +import { PowerSyncDatabase } from '@powersync/capacitor'; +import { PowerSyncContext } from '@powersync/react'; +import { createBaseLogger, LogLevel } from '@powersync/web'; import React, { Suspense } from 'react'; import { AppSchema } from '../../library/powersync/AppSchema.js'; import { BackendConnector } from '../../library/powersync/BackendConnector.js'; -import { Capacitor } from '@capacitor/core'; const logger = createBaseLogger(); logger.useDefaults(); logger.setLevel(LogLevel.DEBUG); -const platform = Capacitor.getPlatform(); -const isIOs = platform === 'ios'; -// Web worker implementation does not work on iOS -const useWebWorker = !isIOs; - +// Uses the Web SDK for web, and Capacitor adapters for iOS/Android. const powerSync = new PowerSyncDatabase({ - database: { dbFilename: 'powersync2.db' }, + database: { + dbFilename: 'tests.sqlite' + }, schema: AppSchema, flags: { - enableMultiTabs: false, - useWebWorker + enableMultiTabs: typeof SharedWorker !== 'undefined' } }); const connector = new BackendConnector(); diff --git a/packages/capacitor/.gitignore b/packages/capacitor/.gitignore new file mode 100644 index 000000000..df9f0c202 --- /dev/null +++ b/packages/capacitor/.gitignore @@ -0,0 +1,70 @@ +# node files +dist +node_modules + +# iOS files +Pods +Podfile.lock +Package.resolved +Build +xcuserdata +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc + + +# macOS files +.DS_Store + + + +# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore + +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin +gen +out + +# Gradle files +.gradle +build + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation + +# Android Studio captures folder +captures + +# IntelliJ +*.iml +.idea + +# Keystore files +# Uncomment the following line if you do not want to check your keystore files in. +#*.jks + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild diff --git a/packages/capacitor/PowersyncCapacitor.podspec b/packages/capacitor/PowersyncCapacitor.podspec new file mode 100644 index 000000000..d8e8eb4da --- /dev/null +++ b/packages/capacitor/PowersyncCapacitor.podspec @@ -0,0 +1,31 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + # This is not a typo. Capacitor determines the plugin name from the npm package name. + # The case is sensitive. + s.name = 'PowersyncCapacitor' + version = package['version'] + if version.include?('-dev') + s.version = '0.0.0' + else + s.version = version + end + s.summary = package['description'] + s.license = package['license'] + s.homepage = package['repository']['url'] + s.author = package['author'] + s.source = { :git => package['repository']['url'], :tag => s.version.to_s } + s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' + s.dependency "SQLCipher", "~> 4.0" + s.public_header_files = 'ios/Sources/CPowerSyncPlugin/include/*.h' + s.ios.deployment_target = '14.0' + s.dependency 'Capacitor' + s.swift_version = '5.1' + s.dependency "powersync-sqlite-core", "~> 0.4.6" + s.xcconfig = { + 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION=1', + 'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/SQLCipher"' + } +end diff --git a/packages/capacitor/README.md b/packages/capacitor/README.md new file mode 100644 index 000000000..4c8d0ad37 --- /dev/null +++ b/packages/capacitor/README.md @@ -0,0 +1,96 @@ +

+ +

+ +# PowerSync SDK for Capacitor + +_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._ + +This package (`@powersync/capacitor`) is the PowerSync SDK for Capacitor apps. It wraps the [PowerSync Web SDK](https://www.npmjs.com/package/@powersync/web) and uses [Capacitor Community SQLite](https://github.com/capacitor-community/sqlite) as the database driver for Android and iOS. + +## Note: Alpha Release + +This package is currently in an alpha release. + +## Installation + +### Install Package + +```bash +npm install @powersync/capacitor +``` + +This package uses `@powersync/web` as a peer dependency. For additional `@powersync/web` configuration and instructions see the Web SDK [README](https://www.npmjs.com/package/@powersync/web). + +### Install Peer Dependencies + +You must also install the following peer dependencies: + +```bash +npm install @capacitor-community/sqlite @powersync/web @journeyapps/wa-sqlite +``` + +See the [Capacitor Community SQLite](https://github.com/capacitor-community/sqlite?tab=readme-ov-file#installation) repository for additional instructions. + +### Sync Capacitor Plugins + +After installing, sync your Capacitor project: + +```bash +npx cap sync +``` + +## Usage + +```javascript +import { PowerSyncDatabase } from '@powersync/capacitor'; +// Import general components from the Web SDK package +import { Schema } from '@powersync/web'; +/** + * The Capacitor PowerSyncDatabase will automatically detect the platform + * and use the appropriate database drivers. + */ +const db = new PowerSyncDatabase({ + schema: new Schema({...}), + database: { + dbFilename: "mydatabase.sqlite" + } +}); +``` + +- On Android and iOS, this SDK uses [Capacitor Community SQLite](https://github.com/capacitor-community/sqlite) for native database access. +- On web, it falls back to the [PowerSync Web SDK](https://www.npmjs.com/package/@powersync/web). + +When using custom database factories, be sure to specify the `CapacitorSQLiteOpenFactory` for Capacitor platforms. + +```javascript +const db = new PowerSyncDatabase({ + schema: new Schema({...}), + database: isWeb ? new WASQLiteOpenFactory({dbFilename: "mydb.sqlite"}) : + new CapacitorSQLiteOpenFactory({dbFilename: "mydb.sqlite"}) +}); +``` + +## Platform Support + +- **Android**: Uses native SQLite via Capacitor Community SQLite. +- **iOS**: Uses native SQLite via Capacitor Community SQLite. +- **Web**: Uses WASQLite via the PowerSync Web SDK. +- **Electron**: Uses WASQLite via the PowerSync Web SDK. + +## Limitations + +- Encryption for native mobile platforms is not yet supported. +- Multiple tab support is not available for native Android and iOS targets. +- `PowerSyncDatabase.executeRaw` does not support results where multiple columns would have the same name in SQLite +- `PowerSyncDatabase.execute` has limited support on Android. The SQLCipher Android driver exposes queries and executions as separate APIs, so there is no single method that handles both. While `PowerSyncDatabase.execute` accepts both, on Android we treat a statement as a query only when the SQL starts with `select` (case-insensitive). + +## Examples + +See the [`demos/example-capacitor/`](https://github.com/journeyapps/powersync-react-native-sdk/blob/main/demos/example-capacitor/README.md#L1) directory for a working example. + +## Found a bug or need help? + +- Join our [Discord server](https://discord.gg/powersync) to ask questions or share feedback. +- Open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) for bugs. +- Submit ideas via our [public roadmap](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) or [schedule a chat](https://calendly.com/powersync-product/powersync-chat). diff --git a/packages/capacitor/android/.gitignore b/packages/capacitor/android/.gitignore new file mode 100644 index 000000000..c591fdeb4 --- /dev/null +++ b/packages/capacitor/android/.gitignore @@ -0,0 +1,2 @@ +/build +.cxx \ No newline at end of file diff --git a/packages/capacitor/android/CMakeLists.txt b/packages/capacitor/android/CMakeLists.txt new file mode 100644 index 000000000..69493b4a5 --- /dev/null +++ b/packages/capacitor/android/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.4.1) + +cmake_minimum_required(VERSION 3.4.1) +project(powersync_capacitor) + +# Set the name of your native library +set(LIB_NAME powersync_capacitor) + +# Add your native source files here +add_library( + ${LIB_NAME} + SHARED + src/main/cpp/powersync_capacitor_jni.c +) + +find_package(powersync_sqlite_core REQUIRED CONFIG) + +# Link libraries if needed (e.g., log) +target_link_libraries( + ${LIB_NAME} + log + powersync_sqlite_core::powersync +) diff --git a/packages/capacitor/android/build.gradle b/packages/capacitor/android/build.gradle new file mode 100644 index 000000000..6ee5f27ba --- /dev/null +++ b/packages/capacitor/android/build.gradle @@ -0,0 +1,71 @@ +ext { + junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' + powerSyncCoreVersion = project.hasProperty('powerSyncCoreVersion') ? rootProject.ext.powerSyncCoreVersion : '0.4.6' +} + +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:8.7.2' + } +} + +apply plugin: 'com.android.library' + +android { + namespace "com.powersync.capacitor" + compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35 + defaultConfig { + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23 + targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + externalNativeBuild { + cmake { + path "CMakeLists.txt" + } + } + + buildFeatures { + prefab true + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + lintOptions { + abortOnError false + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } +} + +repositories { + google() + mavenCentral() +} + + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(':capacitor-android') + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" + implementation "com.powersync:powersync-sqlite-core:$powerSyncCoreVersion" + testImplementation "junit:junit:$junitVersion" + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" +} diff --git a/packages/capacitor/android/gradle.properties b/packages/capacitor/android/gradle.properties new file mode 100644 index 000000000..2ace5b323 --- /dev/null +++ b/packages/capacitor/android/gradle.properties @@ -0,0 +1,23 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +org.gradle.java.home=/opt/homebrew/opt/openjdk@21/ \ No newline at end of file diff --git a/packages/capacitor/android/gradle/wrapper/gradle-wrapper.jar b/packages/capacitor/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..a4b76b953 Binary files /dev/null and b/packages/capacitor/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/packages/capacitor/android/gradle/wrapper/gradle-wrapper.properties b/packages/capacitor/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..c1d5e0185 --- /dev/null +++ b/packages/capacitor/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/packages/capacitor/android/gradlew b/packages/capacitor/android/gradlew new file mode 100755 index 000000000..f5feea6d6 --- /dev/null +++ b/packages/capacitor/android/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/packages/capacitor/android/gradlew.bat b/packages/capacitor/android/gradlew.bat new file mode 100644 index 000000000..9d21a2183 --- /dev/null +++ b/packages/capacitor/android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/packages/capacitor/android/proguard-rules.pro b/packages/capacitor/android/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/packages/capacitor/android/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/packages/capacitor/android/settings.gradle b/packages/capacitor/android/settings.gradle new file mode 100644 index 000000000..b2e46fe3e --- /dev/null +++ b/packages/capacitor/android/settings.gradle @@ -0,0 +1,9 @@ +def capacitorAndroidPath = new ByteArrayOutputStream() +exec { + commandLine 'node', '-p', "require.resolve('@capacitor/android/package.json')" + standardOutput = capacitorAndroidPath +} +def resolvedPath = capacitorAndroidPath.toString().trim().replaceAll('/package\\.json$', '') +println "Resolved Capacitor Android path: ${resolvedPath}" +include ':capacitor-android' +project(':capacitor-android').projectDir = new File(resolvedPath + '/capacitor') \ No newline at end of file diff --git a/packages/capacitor/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java b/packages/capacitor/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java new file mode 100644 index 000000000..58020e16c --- /dev/null +++ b/packages/capacitor/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.getcapacitor.android; + +import static org.junit.Assert.*; + +import android.content.Context; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.getcapacitor.android", appContext.getPackageName()); + } +} diff --git a/packages/capacitor/android/src/main/AndroidManifest.xml b/packages/capacitor/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a2f47b605 --- /dev/null +++ b/packages/capacitor/android/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/packages/capacitor/android/src/main/cpp/powersync_capacitor_jni.c b/packages/capacitor/android/src/main/cpp/powersync_capacitor_jni.c new file mode 100644 index 000000000..1937281a0 --- /dev/null +++ b/packages/capacitor/android/src/main/cpp/powersync_capacitor_jni.c @@ -0,0 +1,12 @@ +#include + +// SQLCipher enables dynamic loading of extensions. We don't need to do anything here. +int register_powersync(void) { + return 0; +} + +// JNI wrapper +JNIEXPORT jint JNICALL +Java_com_powersync_capacitor_PowerSync_registerPowersync(JNIEnv *env, jobject thiz) { + return register_powersync(); +} \ No newline at end of file diff --git a/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSync.java b/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSync.java new file mode 100644 index 000000000..585ea6b2c --- /dev/null +++ b/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSync.java @@ -0,0 +1,9 @@ +package com.powersync.capacitor; + +public class PowerSync { + static { + System.loadLibrary("powersync_capacitor"); + } + + public static native int registerPowersync(); +} diff --git a/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSyncPlugin.java b/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSyncPlugin.java new file mode 100644 index 000000000..c7cfe1af5 --- /dev/null +++ b/packages/capacitor/android/src/main/java/com/powersync/capacitor/PowerSyncPlugin.java @@ -0,0 +1,20 @@ +package com.powersync.capacitor; + +import com.getcapacitor.JSObject; +import com.getcapacitor.Plugin; +import com.getcapacitor.PluginCall; +import com.getcapacitor.PluginMethod; +import com.getcapacitor.annotation.CapacitorPlugin; + +@CapacitorPlugin(name = "PowerSync") +public class PowerSyncPlugin extends Plugin { + + private PowerSync implementation = new PowerSync(); + + @PluginMethod + public void registerCore(PluginCall call) { + JSObject ret = new JSObject(); + ret.put("responseCode", implementation.registerPowersync()); + call.resolve(ret); + } +} diff --git a/packages/capacitor/android/src/main/res/.gitkeep b/packages/capacitor/android/src/main/res/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/capacitor/android/src/test/java/com/getcapacitor/ExampleUnitTest.java b/packages/capacitor/android/src/test/java/com/getcapacitor/ExampleUnitTest.java new file mode 100644 index 000000000..a0fed0cfb --- /dev/null +++ b/packages/capacitor/android/src/test/java/com/getcapacitor/ExampleUnitTest.java @@ -0,0 +1,18 @@ +package com.getcapacitor; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} diff --git a/packages/capacitor/example-app/.gitignore b/packages/capacitor/example-app/.gitignore new file mode 100644 index 000000000..1818ee61f --- /dev/null +++ b/packages/capacitor/example-app/.gitignore @@ -0,0 +1,7 @@ +.idea/ +node_modules/ +.vscode/ +*.map +.DS_Store +.sourcemaps +dist/ diff --git a/packages/capacitor/example-app/README.md b/packages/capacitor/example-app/README.md new file mode 100644 index 000000000..486ed6307 --- /dev/null +++ b/packages/capacitor/example-app/README.md @@ -0,0 +1,12 @@ +## Created with Capacitor Create App + +This app was created using [`@capacitor/create-app`](https://github.com/ionic-team/create-capacitor-app), +and comes with a very minimal shell for building an app. + +### Running this example + +To run the provided example, you can use `npm start` command. + +```bash +npm start +``` diff --git a/packages/capacitor/example-app/capacitor.config.json b/packages/capacitor/example-app/capacitor.config.json new file mode 100644 index 000000000..bab38af98 --- /dev/null +++ b/packages/capacitor/example-app/capacitor.config.json @@ -0,0 +1,10 @@ +{ + "appId": "com.example.plugin", + "appName": "example-app", + "webDir": "dist", + "plugins": { + "SplashScreen": { + "launchAutoHide": false + } + } +} \ No newline at end of file diff --git a/packages/capacitor/example-app/ios/.gitignore b/packages/capacitor/example-app/ios/.gitignore new file mode 100644 index 000000000..f47029973 --- /dev/null +++ b/packages/capacitor/example-app/ios/.gitignore @@ -0,0 +1,13 @@ +App/build +App/Pods +App/output +App/App/public +DerivedData +xcuserdata + +# Cordova plugins for Capacitor +capacitor-cordova-ios-plugins + +# Generated Config files +App/App/capacitor.config.json +App/App/config.xml diff --git a/packages/capacitor/example-app/ios/App/App.xcodeproj/project.pbxproj b/packages/capacitor/example-app/ios/App/App.xcodeproj/project.pbxproj new file mode 100644 index 000000000..97fa817aa --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App.xcodeproj/project.pbxproj @@ -0,0 +1,408 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; }; + 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; }; + 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; }; + 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; }; + 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; }; + 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; }; + 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; }; + A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; }; + 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = ""; }; + 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = ""; }; + AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; + FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 504EC3011FED79650016851F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = { + isa = PBXGroup; + children = ( + AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 504EC2FB1FED79650016851F = { + isa = PBXGroup; + children = ( + 504EC3061FED79650016851F /* App */, + 504EC3051FED79650016851F /* Products */, + 7F8756D8B27F46E3366F6CEA /* Pods */, + 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */, + ); + sourceTree = ""; + }; + 504EC3051FED79650016851F /* Products */ = { + isa = PBXGroup; + children = ( + 504EC3041FED79650016851F /* App.app */, + ); + name = Products; + sourceTree = ""; + }; + 504EC3061FED79650016851F /* App */ = { + isa = PBXGroup; + children = ( + 50379B222058CBB4000EE86E /* capacitor.config.json */, + 504EC3071FED79650016851F /* AppDelegate.swift */, + 504EC30B1FED79650016851F /* Main.storyboard */, + 504EC30E1FED79650016851F /* Assets.xcassets */, + 504EC3101FED79650016851F /* LaunchScreen.storyboard */, + 504EC3131FED79650016851F /* Info.plist */, + 2FAD9762203C412B000D30F8 /* config.xml */, + 50B271D01FEDC1A000F3C39B /* public */, + ); + path = App; + sourceTree = ""; + }; + 7F8756D8B27F46E3366F6CEA /* Pods */ = { + isa = PBXGroup; + children = ( + FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */, + AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 504EC3031FED79650016851F /* App */ = { + isa = PBXNativeTarget; + buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */; + buildPhases = ( + 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */, + 504EC3001FED79650016851F /* Sources */, + 504EC3011FED79650016851F /* Frameworks */, + 504EC3021FED79650016851F /* Resources */, + 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = App; + productName = App; + productReference = 504EC3041FED79650016851F /* App.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 504EC2FC1FED79650016851F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + TargetAttributes = { + 504EC3031FED79650016851F = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 504EC2FB1FED79650016851F; + packageReferences = ( + ); + productRefGroup = 504EC3051FED79650016851F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 504EC3031FED79650016851F /* App */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 504EC3021FED79650016851F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */, + 50B271D11FEDC1A000F3C39B /* public in Resources */, + 504EC30F1FED79650016851F /* Assets.xcassets in Resources */, + 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */, + 504EC30D1FED79650016851F /* Main.storyboard in Resources */, + 2FAD9763203C412B000D30F8 /* config.xml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 504EC3001FED79650016851F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 504EC30B1FED79650016851F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 504EC30C1FED79650016851F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 504EC3111FED79650016851F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 504EC3141FED79650016851F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 504EC3151FED79650016851F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 504EC3171FED79650016851F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = App/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0; + OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; + PRODUCT_BUNDLE_IDENTIFIER = com.example.plugin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 504EC3181FED79650016851F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = App/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.plugin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 504EC3141FED79650016851F /* Debug */, + 504EC3151FED79650016851F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 504EC3171FED79650016851F /* Debug */, + 504EC3181FED79650016851F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 504EC2FC1FED79650016851F /* Project object */; +} diff --git a/packages/capacitor/example-app/ios/App/App.xcworkspace/contents.xcworkspacedata b/packages/capacitor/example-app/ios/App/App.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..b301e824b --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/capacitor/example-app/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/capacitor/example-app/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/capacitor/example-app/ios/App/App/AppDelegate.swift b/packages/capacitor/example-app/ios/App/App/AppDelegate.swift new file mode 100644 index 000000000..c3cd83b5c --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/AppDelegate.swift @@ -0,0 +1,49 @@ +import UIKit +import Capacitor + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + // Called when the app was launched with a url. Feel free to add additional processing here, + // but if you want the App API to support tracking app url opens, make sure to keep this call + return ApplicationDelegateProxy.shared.application(app, open: url, options: options) + } + + func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { + // Called when the app was launched with an activity, including Universal Links. + // Feel free to add additional processing here, but if you want the App API to support + // tracking app url opens, make sure to keep this call + return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) + } + +} diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png new file mode 100644 index 000000000..adf6ba01d Binary files /dev/null and b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png differ diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9b7d382dc --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "AppIcon-512@2x.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Contents.json b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json new file mode 100644 index 000000000..d7d96a67c --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "splash-2732x2732-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "splash-2732x2732-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "splash-2732x2732.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png differ diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png differ diff --git a/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png new file mode 100644 index 000000000..33ea6c970 Binary files /dev/null and b/packages/capacitor/example-app/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png differ diff --git a/packages/capacitor/example-app/ios/App/App/Base.lproj/LaunchScreen.storyboard b/packages/capacitor/example-app/ios/App/App/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..e7ae5d780 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/capacitor/example-app/ios/App/App/Base.lproj/Main.storyboard b/packages/capacitor/example-app/ios/App/App/Base.lproj/Main.storyboard new file mode 100644 index 000000000..b44df7be8 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Base.lproj/Main.storyboard @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/packages/capacitor/example-app/ios/App/App/Info.plist b/packages/capacitor/example-app/ios/App/App/Info.plist new file mode 100644 index 000000000..cf1affd67 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/App/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + example-app + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/packages/capacitor/example-app/ios/App/Podfile b/packages/capacitor/example-app/ios/App/Podfile new file mode 100644 index 000000000..c22036832 --- /dev/null +++ b/packages/capacitor/example-app/ios/App/Podfile @@ -0,0 +1,24 @@ +require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' + +platform :ios, '14.0' +use_frameworks! + +# workaround to avoid Xcode caching of Pods that requires +# Product -> Clean Build Folder after new Cordova plugins installed +# Requires CocoaPods 1.6 or newer +install! 'cocoapods', :disable_input_output_paths => true + +def capacitor_pods + pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' + pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' + pod 'PowersyncCapacitor', :path => '../../..' +end + +target 'App' do + capacitor_pods + # Add your Pods here +end + +post_install do |installer| + assertDeploymentTarget(installer) +end diff --git a/packages/capacitor/example-app/package-lock.json b/packages/capacitor/example-app/package-lock.json new file mode 100644 index 000000000..8fb176db6 --- /dev/null +++ b/packages/capacitor/example-app/package-lock.json @@ -0,0 +1,1649 @@ +{ + "name": "capacitor-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "capacitor-app", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@capacitor/android": "7.0.0", + "@capacitor/core": "latest", + "@capacitor/ios": "7.0.0", + "powersync": "file:.." + }, + "devDependencies": { + "@capacitor/cli": "latest", + "vite": "^5.4.2" + } + }, + "..": { + "name": "@powersync/capacitor", + "version": "0.0.1", + "license": "Apache-2.0", + "devDependencies": { + "@capacitor/android": "^7.0.0", + "@capacitor/core": "^7.0.0", + "@capacitor/docgen": "^0.3.0", + "@capacitor/ios": "^7.0.0", + "@ionic/eslint-config": "^0.4.0", + "@ionic/prettier-config": "^4.0.0", + "@ionic/swiftlint-config": "^2.0.0", + "eslint": "^8.57.0", + "prettier": "^3.4.2", + "prettier-plugin-java": "^2.6.6", + "rimraf": "^6.0.1", + "rollup": "^4.30.1", + "swiftlint": "^2.0.0", + "typescript": "~4.1.5" + }, + "peerDependencies": { + "@capacitor/core": ">=7.0.0" + } + }, + "../node_modules/@capacitor/android": { + "version": "7.4.3", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^7.4.0" + } + }, + "../node_modules/@capacitor/ios": { + "version": "7.4.3", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^7.4.0" + } + }, + "../node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.41.1", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "../node_modules/glob": { + "version": "11.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../node_modules/jackspeak": { + "version": "4.1.1", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../node_modules/lru-cache": { + "version": "11.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "../node_modules/minimatch": { + "version": "10.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../node_modules/path-scurry": { + "version": "2.0.0", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../node_modules/rimraf": { + "version": "6.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../node_modules/rollup": { + "version": "4.41.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.41.1", + "@rollup/rollup-android-arm64": "4.41.1", + "@rollup/rollup-darwin-arm64": "4.41.1", + "@rollup/rollup-darwin-x64": "4.41.1", + "@rollup/rollup-freebsd-arm64": "4.41.1", + "@rollup/rollup-freebsd-x64": "4.41.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", + "@rollup/rollup-linux-arm-musleabihf": "4.41.1", + "@rollup/rollup-linux-arm64-gnu": "4.41.1", + "@rollup/rollup-linux-arm64-musl": "4.41.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-musl": "4.41.1", + "@rollup/rollup-linux-s390x-gnu": "4.41.1", + "@rollup/rollup-linux-x64-gnu": "4.41.1", + "@rollup/rollup-linux-x64-musl": "4.41.1", + "@rollup/rollup-win32-arm64-msvc": "4.41.1", + "@rollup/rollup-win32-ia32-msvc": "4.41.1", + "@rollup/rollup-win32-x64-msvc": "4.41.1", + "fsevents": "~2.3.2" + } + }, + "../node_modules/typescript": { + "version": "4.1.6", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@capacitor/android": { + "version": "7.0.0", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^7.0.0" + } + }, + "node_modules/@capacitor/cli": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-7.4.3.tgz", + "integrity": "sha512-SWozpdDgrbQ/ry1nIapugDFvE9z+l22BmU/+fpgL2Zv5487hGdXvCX5+1SluuFBP3IPpx6b4LjsKnBigyJoUWg==", + "dev": true, + "dependencies": { + "@ionic/cli-framework-output": "^2.2.8", + "@ionic/utils-subprocess": "^3.0.1", + "@ionic/utils-terminal": "^2.3.5", + "commander": "^12.1.0", + "debug": "^4.4.0", + "env-paths": "^2.2.0", + "fs-extra": "^11.2.0", + "kleur": "^4.1.5", + "native-run": "^2.0.1", + "open": "^8.4.0", + "plist": "^3.1.0", + "prompts": "^2.4.2", + "rimraf": "^6.0.1", + "semver": "^7.6.3", + "tar": "^6.1.11", + "tslib": "^2.8.1", + "xml2js": "^0.6.2" + }, + "bin": { + "cap": "bin/capacitor", + "capacitor": "bin/capacitor" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@capacitor/core": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-7.4.3.tgz", + "integrity": "sha512-wCWr8fQ9Wxn0466vPg7nMn0tivbNVjNy1yL4GvDSIZuZx7UpU2HeVGNe9QjN/quEd+YLRFeKEBLBw619VqUiNg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@capacitor/ios": { + "version": "7.0.0", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^7.0.0" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@ionic/cli-framework-output": { + "version": "2.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-array": { + "version": "2.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-fs": { + "version": "3.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-fs/node_modules/fs-extra": { + "version": "9.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@ionic/utils-object": { + "version": "2.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-process": { + "version": "2.1.12", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-object": "2.1.6", + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-stream": { + "version": "3.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-subprocess": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-array": "2.1.6", + "@ionic/utils-fs": "3.1.7", + "@ionic/utils-process": "2.1.12", + "@ionic/utils-stream": "3.1.7", + "@ionic/utils-terminal": "2.3.5", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-terminal": { + "version": "2.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.50.0", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/fs-extra": { + "version": "8.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "24.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/slice-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.11", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/big-integer": { + "version": "1.6.52", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "12.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/elementtree": { + "version": "0.1.7", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/env-paths": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-extra": { + "version": "11.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "11.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "11.2.1", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/minimatch": { + "version": "10.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/native-run": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-fs": "^3.1.7", + "@ionic/utils-terminal": "^2.3.4", + "bplist-parser": "^0.3.2", + "debug": "^4.3.4", + "elementtree": "^0.1.7", + "ini": "^4.1.1", + "plist": "^3.1.0", + "split2": "^4.2.0", + "through2": "^4.0.2", + "tslib": "^2.6.2", + "yauzl": "^2.10.0" + }, + "bin": { + "native-run": "bin/native-run" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/open": { + "version": "8.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/plist": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/powersync": { + "resolved": "..", + "link": true + }, + "node_modules/prompts": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prompts/node_modules/kleur": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "6.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.50.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.50.0", + "@rollup/rollup-android-arm64": "4.50.0", + "@rollup/rollup-darwin-arm64": "4.50.0", + "@rollup/rollup-darwin-x64": "4.50.0", + "@rollup/rollup-freebsd-arm64": "4.50.0", + "@rollup/rollup-freebsd-x64": "4.50.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.0", + "@rollup/rollup-linux-arm-musleabihf": "4.50.0", + "@rollup/rollup-linux-arm64-gnu": "4.50.0", + "@rollup/rollup-linux-arm64-musl": "4.50.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.50.0", + "@rollup/rollup-linux-ppc64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-musl": "4.50.0", + "@rollup/rollup-linux-s390x-gnu": "4.50.0", + "@rollup/rollup-linux-x64-gnu": "4.50.0", + "@rollup/rollup-linux-x64-musl": "4.50.0", + "@rollup/rollup-openharmony-arm64": "4.50.0", + "@rollup/rollup-win32-arm64-msvc": "4.50.0", + "@rollup/rollup-win32-ia32-msvc": "4.50.0", + "@rollup/rollup-win32-x64-msvc": "4.50.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.1.4", + "dev": true, + "license": "ISC" + }, + "node_modules/semver": { + "version": "7.7.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "license": "0BSD" + }, + "node_modules/undici-types": { + "version": "7.10.0", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "5.4.19", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/xml2js": { + "version": "0.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/packages/capacitor/example-app/package.json b/packages/capacitor/example-app/package.json new file mode 100644 index 000000000..dd7c5addf --- /dev/null +++ b/packages/capacitor/example-app/package.json @@ -0,0 +1,27 @@ +{ + "name": "capacitor-app", + "version": "1.0.0", + "description": "An Amazing Capacitor App", + "type": "module", + "keywords": [ + "capacitor", + "mobile" + ], + "scripts": { + "start": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@capacitor/core": "latest", + "powersync": "file:..", + "@capacitor/ios": "7.0.0", + "@capacitor/android": "7.0.0" + }, + "devDependencies": { + "@capacitor/cli": "latest", + "vite": "^5.4.2" + }, + "author": "", + "license": "ISC" +} \ No newline at end of file diff --git a/packages/capacitor/example-app/src/index.html b/packages/capacitor/example-app/src/index.html new file mode 100644 index 000000000..ae96d8d78 --- /dev/null +++ b/packages/capacitor/example-app/src/index.html @@ -0,0 +1,26 @@ + + + + + Example Capacitor App + + + + +
+

Capacitor Test Plugin Project

+

+ This project can be used to test out the functionality of your plugin. Nothing in the + example-app/ folder will be published to npm when using this template, so you can create away! +

+ + + +
+ + + + diff --git a/packages/capacitor/example-app/src/js/example.js b/packages/capacitor/example-app/src/js/example.js new file mode 100644 index 000000000..0077d7975 --- /dev/null +++ b/packages/capacitor/example-app/src/js/example.js @@ -0,0 +1,6 @@ +import { PowerSync } from 'powersync'; + +window.testEcho = () => { + const inputValue = document.getElementById("echoInput").value; + PowerSync.echo({ value: inputValue }) +} diff --git a/packages/capacitor/example-app/vite.config.ts b/packages/capacitor/example-app/vite.config.ts new file mode 100644 index 000000000..1b9f069d5 --- /dev/null +++ b/packages/capacitor/example-app/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; + +export default defineConfig({ + root: './src', + build: { + outDir: '../dist', + minify: false, + emptyOutDir: true, + }, +}); diff --git a/packages/capacitor/ios/.gitignore b/packages/capacitor/ios/.gitignore new file mode 100644 index 000000000..afb34f837 --- /dev/null +++ b/packages/capacitor/ios/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc \ No newline at end of file diff --git a/packages/capacitor/ios/Sources/CPowerSyncCore/PowerSyncCore.c b/packages/capacitor/ios/Sources/CPowerSyncCore/PowerSyncCore.c new file mode 100644 index 000000000..daf6c49b8 --- /dev/null +++ b/packages/capacitor/ios/Sources/CPowerSyncCore/PowerSyncCore.c @@ -0,0 +1,13 @@ +#include "PowerSyncCore.h" +#include +#include "SQLCipher/sqlite3.h" + +extern int sqlite3_powersync_init( + sqlite3 *db, // Database handle + const char **pzErrMsg, // Error message out parameter + const struct sqlite3_api_routines *pThunk // SQLite API routines +); + +int register_powersync(void) { + return sqlite3_auto_extension((void(*)(void))sqlite3_powersync_init); +} diff --git a/packages/capacitor/ios/Sources/CPowerSyncCore/include/PowerSyncCore.h b/packages/capacitor/ios/Sources/CPowerSyncCore/include/PowerSyncCore.h new file mode 100644 index 000000000..58b9203a9 --- /dev/null +++ b/packages/capacitor/ios/Sources/CPowerSyncCore/include/PowerSyncCore.h @@ -0,0 +1,6 @@ +#ifndef CMyPackage_h +#define CMyPackage_h + +int register_powersync(); + +#endif /* CMyPackage_h */ \ No newline at end of file diff --git a/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSync.swift b/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSync.swift new file mode 100644 index 000000000..174424a24 --- /dev/null +++ b/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSync.swift @@ -0,0 +1,7 @@ +import Foundation + +@objc public class PowerSync: NSObject { + @objc public func registerCore() -> Int32 { + return register_powersync() + } +} diff --git a/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSyncPlugin.swift b/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSyncPlugin.swift new file mode 100644 index 000000000..d1c37040a --- /dev/null +++ b/packages/capacitor/ios/Sources/PowerSyncPlugin/PowerSyncPlugin.swift @@ -0,0 +1,22 @@ +import Foundation +import Capacitor + +/** + * Please read the Capacitor iOS Plugin Development Guide + * here: https://capacitorjs.com/docs/plugins/ios + */ +@objc(PowerSyncPlugin) +public class PowerSyncPlugin: CAPPlugin, CAPBridgedPlugin { + public let identifier = "PowerSyncPlugin" + public let jsName = "PowerSync" + public let pluginMethods: [CAPPluginMethod] = [ + CAPPluginMethod(name: "registerCore", returnType: CAPPluginReturnPromise) + ] + private let implementation = PowerSync() + + @objc func registerCore(_ call: CAPPluginCall) { + call.resolve([ + "responseCode": implementation.registerCore() + ]) + } +} \ No newline at end of file diff --git a/packages/capacitor/ios/Tests/PowerSyncPluginTests/PowerSyncPluginTests.swift b/packages/capacitor/ios/Tests/PowerSyncPluginTests/PowerSyncPluginTests.swift new file mode 100644 index 000000000..b02258c15 --- /dev/null +++ b/packages/capacitor/ios/Tests/PowerSyncPluginTests/PowerSyncPluginTests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import PowerSyncPlugin + +class PowerSyncTests: XCTestCase { + func testEcho() { + // This is an example of a functional test case for a plugin. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + let implementation = PowerSync() + let value = "Hello, World!" + let result = implementation.echo(value) + + XCTAssertEqual(value, result) + } +} diff --git a/packages/capacitor/package.json b/packages/capacitor/package.json new file mode 100644 index 000000000..15ba0e3bb --- /dev/null +++ b/packages/capacitor/package.json @@ -0,0 +1,88 @@ +{ + "name": "@powersync/capacitor", + "version": "0.0.1", + "description": "Adds PowerSync Capacitor support for iOS/Android", + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "main": "dist/plugin.cjs.js", + "module": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "unpkg": "dist/plugin.js", + "files": [ + "android/src/main/", + "android/build.gradle", + "dist/", + "ios/Sources", + "ios/Tests", + "Package.swift", + "PowersyncCapacitor.podspec" + ], + "author": "", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "git+https://github.com/powersync-ja/powersync-js.git" + }, + "bugs": { + "url": "https://github.com/powersync-ja/powersync-js/issues" + }, + "keywords": [ + "capacitor", + "plugin", + "native" + ], + "scripts": { + "verify": "pnpm verify:ios && pnpm verify:android && pnpm verify:web", + "verify:ios": "cd example-app && npm install && cd ios/App && pod install && xcodebuild -workspace App.xcworkspace -scheme App -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest'", + "verify:android": "cd android && ./gradlew clean build test && cd ..", + "verify:web": "pnpm build", + "lint": "pnpm eslint && pnpm prettier -- --check && pnpm swiftlint -- lint", + "fmt": "pnpm eslint -- --fix && pnpm prettier -- --write && pnpm swiftlint -- --fix --format", + "eslint": "eslint . --ext ts", + "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java", + "swiftlint": "node-swiftlint", + "docgen": "docgen --api PowerSyncPlugin --output-readme README.md --output-json dist/docs.json", + "build": "pnpm clean && pnpm docgen && tsc && rollup -c rollup.config.mjs", + "build:prod": "pnpm build", + "clean": "rimraf ./dist", + "watch": "tsc --watch", + "prepublishOnly": "pnpm build", + "test:exports": "attw --pack ." + }, + "devDependencies": { + "@capacitor-community/sqlite": "^7.0.2", + "@capacitor/android": "^7.0.0", + "@capacitor/core": "^7.0.0", + "@capacitor/docgen": "^0.3.0", + "@capacitor/ios": "^7.0.0", + "@ionic/eslint-config": "^0.4.0", + "@ionic/prettier-config": "^4.0.0", + "@ionic/swiftlint-config": "^2.0.0", + "eslint": "^8.57.0", + "prettier": "^3.4.2", + "prettier-plugin-java": "^2.6.6", + "rimraf": "^6.0.1", + "rollup": "^4.30.1", + "swiftlint": "^2.0.0" + }, + "peerDependencies": { + "@capacitor-community/sqlite": "^7.0.2", + "@powersync/web": "workspace:^" + }, + "swiftlint": "@ionic/swiftlint-config", + "capacitor": { + "name": "PowerSyncCapacitor", + "ios": { + "name": "PowerSyncCapacitor", + "src": "ios" + }, + "android": { + "src": "android" + } + }, + "dependencies": { + "async-lock": "^1.4.0" + } +} diff --git a/packages/capacitor/rollup.config.mjs b/packages/capacitor/rollup.config.mjs new file mode 100644 index 000000000..64142f3e5 --- /dev/null +++ b/packages/capacitor/rollup.config.mjs @@ -0,0 +1,28 @@ +export default { + input: 'dist/esm/index.js', + output: [ + { + file: 'dist/plugin.js', + format: 'iife', + name: 'capacitorPowerSync', + globals: { + '@capacitor/core': 'capacitorExports' + }, + sourcemap: true, + inlineDynamicImports: true + }, + { + file: 'dist/plugin.cjs.js', + format: 'cjs', + sourcemap: true, + inlineDynamicImports: true + } + ], + external: [ + '@capacitor/core', + '@capacitor-community/sqlite', + '@powersync/common', + '@powersync/web', + '@journeyapps/wa-sqlite' + ] +}; diff --git a/packages/capacitor/src/PowerSyncDatabase.ts b/packages/capacitor/src/PowerSyncDatabase.ts new file mode 100644 index 000000000..4383cdb33 --- /dev/null +++ b/packages/capacitor/src/PowerSyncDatabase.ts @@ -0,0 +1,90 @@ +import { Capacitor } from '@capacitor/core'; +import { + DBAdapter, + PowerSyncBackendConnector, + RequiredAdditionalConnectionOptions, + StreamingSyncImplementation, + PowerSyncDatabase as WebPowerSyncDatabase, + WebPowerSyncDatabaseOptionsWithSettings, + WebRemote +} from '@powersync/web'; +import { CapacitorSQLiteAdapter } from './adapter/CapacitorSQLiteAdapter'; +import { CapacitorStreamingSyncImplementation } from './sync/CapacitorSyncImplementation'; + +/** + * PowerSyncDatabase class for managing database connections and sync implementations. + * This extends the WebPowerSyncDatabase to provide platform-specific implementations + * for Capacitor environments (iOS and Android). + * + * @experimental + * @alpha + */ +export class PowerSyncDatabase extends WebPowerSyncDatabase { + protected get isNativeCapacitorPlatform(): boolean { + const platform = Capacitor.getPlatform(); + return platform == 'ios' || platform == 'android'; + } + + protected openDBAdapter(options: WebPowerSyncDatabaseOptionsWithSettings): DBAdapter { + const platform = Capacitor.getPlatform(); + if (platform == 'ios' || platform == 'android') { + if (options.database.dbLocation) { + options.logger?.warn(` + dbLocation is ignored on iOS and Android platforms. + The database directory can be configured in the Capacitor project. + See https://github.com/capacitor-community/sqlite?tab=readme-ov-file#installation`); + } + options.logger?.debug(`Using CapacitorSQLiteAdapter for platform: ${platform}`); + return new CapacitorSQLiteAdapter({ + ...options.database + }); + } else { + options.logger?.debug(`Using default web adapter for web platform`); + return super.openDBAdapter(options); + } + } + + protected runExclusive(cb: () => Promise): Promise { + if (this.isNativeCapacitorPlatform) { + // Use mutex for mobile platforms. + // This is mainly for testing purposes since navigator.locks require secure contexts. + return this.runExclusiveMutex.runExclusive(cb); + } else { + // Use navigator.locks for web platform + return super.runExclusive(cb); + } + } + + protected generateSyncStreamImplementation( + connector: PowerSyncBackendConnector, + options: RequiredAdditionalConnectionOptions + ): StreamingSyncImplementation { + if (this.isNativeCapacitorPlatform) { + // We don't want to support multi-tab on mobile platforms. + // We technically can, but it's not a common use case and requires additional work/testing. + this.logger.debug(`Using Capacitor sync implementation`); + if (this.options.flags?.enableMultiTabs) { + this.logger.warn(`enableMultiTabs is not supported on Capacitor mobile platforms. Ignoring the flag.`); + } + const remote = new WebRemote(connector, this.logger); + + return new CapacitorStreamingSyncImplementation({ + ...(this.options as {}), + retryDelayMs: options.retryDelayMs, + crudUploadThrottleMs: options.crudUploadThrottleMs, + adapter: this.bucketStorageAdapter, + remote, + uploadCrud: async () => { + await this.waitForReady(); + await connector.uploadData(this); + }, + identifier: this.database.name, + logger: this.logger, + subscriptions: options.subscriptions + }); + } else { + this.logger.debug(`Using default web sync implementation for web platform`); + return super.generateSyncStreamImplementation(connector, options); + } + } +} diff --git a/packages/capacitor/src/adapter/CapacitorSQLiteAdapter.ts b/packages/capacitor/src/adapter/CapacitorSQLiteAdapter.ts new file mode 100644 index 000000000..7a4e64951 --- /dev/null +++ b/packages/capacitor/src/adapter/CapacitorSQLiteAdapter.ts @@ -0,0 +1,342 @@ +import { CapacitorSQLite, SQLiteConnection, SQLiteDBConnection } from '@capacitor-community/sqlite'; +import { Capacitor } from '@capacitor/core'; + +import { + BaseObserver, + BatchedUpdateNotification, + DBAdapter, + DBAdapterListener, + DBLockOptions, + LockContext, + QueryResult, + Transaction +} from '@powersync/web'; +import Lock from 'async-lock'; +import { PowerSyncCore } from '../plugin/PowerSyncCore'; +import { messageForErrorCode } from '../plugin/PowerSyncPlugin'; +import { CapacitorSQLiteOpenFactoryOptions, DEFAULT_SQLITE_OPTIONS } from './CapacitorSQLiteOpenFactory'; +/** + * Monitors the execution time of a query and logs it to the performance timeline. + */ +async function monitorQuery(sql: string, executor: () => Promise): Promise { + const start = performance.now(); + try { + const r = await executor(); + performance.measure(`[SQL] ${sql}`, { start }); + return r; + } catch (e: any) { + performance.measure(`[SQL] [ERROR: ${e.message}] ${sql}`, { start }); + throw e; + } +} +/** + * An implementation of {@link DBAdapter} using the Capacitor Community SQLite [plugin](https://github.com/capacitor-community/sqlite). + * + * @experimental + * @alpha This is currently experimental and may change without a major version bump. + */ +export class CapacitorSQLiteAdapter extends BaseObserver implements DBAdapter { + protected _writeConnection: SQLiteDBConnection | null; + protected _readConnection: SQLiteDBConnection | null; + protected initializedPromise: Promise; + protected lock: Lock; + + constructor(protected options: CapacitorSQLiteOpenFactoryOptions) { + super(); + this._writeConnection = null; + this._readConnection = null; + this.lock = new Lock(); + this.initializedPromise = this.init(); + } + + protected get writeConnection(): SQLiteDBConnection { + if (!this._writeConnection) { + throw new Error('Init not completed yet'); + } + return this._writeConnection; + } + + protected get readConnection(): SQLiteDBConnection { + if (!this._readConnection) { + throw new Error('Init not completed yet'); + } + return this._readConnection; + } + + get name() { + return this.options.dbFilename; + } + + private async init() { + const { responseCode: registrationResponseCode } = await PowerSyncCore.registerCore(); + if (registrationResponseCode != 0) { + throw new Error(`Could not register PowerSync core extension: ${messageForErrorCode(registrationResponseCode)}`); + } + + const sqlite = new SQLiteConnection(CapacitorSQLite); + + // It seems like the isConnection and retrieveConnection methods + // only check a JS side map of connections. + // On hot reload this JS cache can be cleared, while the connection + // still exists natively. and `createConnection` will fail if it already exists. + await sqlite.closeConnection(this.options.dbFilename, false).catch(() => {}); + await sqlite.closeConnection(this.options.dbFilename, true).catch(() => {}); + + // TODO support encryption eventually + this._writeConnection = await sqlite.createConnection(this.options.dbFilename, false, 'no-encryption', 1, false); + this._readConnection = await sqlite.createConnection(this.options.dbFilename, false, 'no-encryption', 1, true); + + await this._writeConnection.open(); + + const { cacheSizeKb, journalSizeLimit, synchronous } = { ...DEFAULT_SQLITE_OPTIONS, ...this.options.sqliteOptions }; + + await this.writeConnection.query('PRAGMA journal_mode = WAL'); + await this.writeConnection.query(`PRAGMA journal_size_limit = ${journalSizeLimit}`); + await this.writeConnection.query(`PRAGMA temp_store = memory`); + await this.writeConnection.query(`PRAGMA synchronous = ${synchronous}`); + await this.writeConnection.query(`PRAGMA cache_size = -${cacheSizeKb}`); + + await this._readConnection.open(); + + const platform = Capacitor.getPlatform(); + if (platform == 'android') { + /** + * SQLCipher for Android enables dynamic loading of extensions. + * On iOS we use a static auto extension registration. + */ + const extensionQuery = "SELECT load_extension('libpowersync.so', 'sqlite3_powersync_init')"; + await this.writeConnection.query(extensionQuery); + await this.readConnection.query(extensionQuery); + } + await this.writeConnection.query("SELECT powersync_update_hooks('install')"); + } + + async close(): Promise { + await this.initializedPromise; + await this.writeConnection.close(); + await this.readConnection.close(); + } + + protected generateLockContext(db: SQLiteDBConnection): LockContext { + const _execute = async (query: string, params: any[] = []): Promise => { + const platform = Capacitor.getPlatform(); + if (platform == 'android') { + // Android: use query for SELECT and executeSet for mutations + // We cannot use `run` here for both cases. + if (query.toLowerCase().trim().startsWith('select')) { + const result = await db.query(query, params); + const arrayResult = result.values ?? []; + return { + rowsAffected: 0, + rows: { + _array: arrayResult, + length: arrayResult.length, + item: (idx: number) => arrayResult[idx] + } + }; + } else { + const result = await db.executeSet([{ statement: query, values: params }], false); + return { + insertId: result.changes?.lastId, + rowsAffected: result.changes?.changes ?? 0, + rows: { + _array: [], + length: 0, + item: () => null + } + }; + } + } + + // iOS (and other platforms): use run("all") + const result = await db.run(query, params, false, 'all'); + const resultSet = result.changes?.values ?? []; + return { + insertId: result.changes?.lastId, + rowsAffected: result.changes?.changes ?? 0, + rows: { + _array: resultSet, + length: resultSet.length, + item: (idx) => resultSet[idx] + } + }; + }; + + const execute = this.options.debugMode + ? (sql: string, params?: any[]) => monitorQuery(sql, () => _execute(sql, params)) + : _execute; + + const _executeQuery = async (query: string, params?: any[]): Promise => { + let result = await db.query(query, params); + + let arrayResult = result.values ?? []; + + return { + rowsAffected: 0, + rows: { + _array: arrayResult, + length: arrayResult.length, + item: (idx: number) => arrayResult[idx] + } + }; + }; + + const executeQuery = this.options.debugMode + ? (sql: string, params?: any[]) => monitorQuery(sql, () => _executeQuery(sql, params)) + : _executeQuery; + + const getAll = async (query: string, params?: any[]): Promise => { + const result = await executeQuery(query, params); + return result.rows?._array ?? ([] as T[]); + }; + + const getOptional = async (query: string, params?: any[]): Promise => { + const results = await getAll(query, params); + return results.length > 0 ? results[0] : null; + }; + + const get = async (query: string, params?: any[]): Promise => { + const result = await getOptional(query, params); + if (!result) { + throw new Error(`No results for query: ${query}`); + } + return result; + }; + + const executeRaw = async (query: string, params?: any[]): Promise => { + // This is a workaround, we don't support multiple columns of the same name + const results = await execute(query, params); + return results.rows?._array.map((row) => Object.values(row)) ?? []; + }; + + return { + getAll, + getOptional, + get, + executeRaw, + execute + }; + } + + execute(query: string, params?: any[]): Promise { + return this.writeLock((tx) => tx.execute(query, params)); + } + + executeRaw(query: string, params?: any[]): Promise { + return this.writeLock((tx) => tx.executeRaw(query, params)); + } + + async executeBatch(query: string, params: any[][] = []): Promise { + return this.writeLock(async (tx) => { + let result = await this.writeConnection.executeSet( + params.map((param) => ({ + statement: query, + values: param + })) + ); + + return { + rowsAffected: result.changes?.changes ?? 0, + insertId: result.changes?.lastId + }; + }); + } + + readLock(fn: (tx: LockContext) => Promise, options?: DBLockOptions): Promise { + return this.lock.acquire('read_lock', async () => { + await this.initializedPromise; + return await fn(this.generateLockContext(this.readConnection)); + }); + } + + readTransaction(fn: (tx: Transaction) => Promise, options?: DBLockOptions): Promise { + return this.readLock(async (ctx) => { + return this.internalTransaction(ctx, fn); + }); + } + + writeLock(fn: (tx: LockContext) => Promise, options?: DBLockOptions): Promise { + return this.lock.acquire('write_lock', async () => { + await this.initializedPromise; + const result = await fn(this.generateLockContext(this.writeConnection)); + + // Fetch table updates + const updates = await this.writeConnection.query("SELECT powersync_update_hooks('get') AS table_name"); + const jsonUpdates = updates.values?.[0]; + if (!jsonUpdates || !jsonUpdates.table_name) { + throw new Error('Could not fetch table updates'); + } + const notification: BatchedUpdateNotification = { + rawUpdates: [], + tables: JSON.parse(jsonUpdates.table_name), + groupedUpdates: {} + }; + this.iterateListeners((l) => l.tablesUpdated?.(notification)); + return result; + }); + } + + writeTransaction(fn: (tx: Transaction) => Promise, options?: DBLockOptions): Promise { + return this.writeLock(async (ctx) => { + return this.internalTransaction(ctx, fn); + }); + } + + refreshSchema(): Promise { + return this.writeLock(async (writeTx) => { + return this.readLock(async (readTx) => { + const updateQuery = `PRAGMA table_info('sqlite_master')`; + await writeTx.get(updateQuery); + await readTx.get(updateQuery); + }); + }); + } + + getAll(sql: string, parameters?: any[]): Promise { + return this.readLock((tx) => tx.getAll(sql, parameters)); + } + + getOptional(sql: string, parameters?: any[]): Promise { + return this.readLock((tx) => tx.getOptional(sql, parameters)); + } + + get(sql: string, parameters?: any[]): Promise { + return this.readLock((tx) => tx.get(sql, parameters)); + } + + protected async internalTransaction(ctx: LockContext, fn: (tx: Transaction) => Promise): Promise { + let finalized = false; + const commit = async (): Promise => { + if (finalized) { + return { rowsAffected: 0 }; + } + finalized = true; + return ctx.execute('COMMIT'); + }; + const rollback = async (): Promise => { + if (finalized) { + return { rowsAffected: 0 }; + } + finalized = true; + return ctx.execute('ROLLBACK'); + }; + try { + await ctx.execute('BEGIN'); + const result = await fn({ + ...ctx, + commit, + rollback + }); + await commit(); + return result; + } catch (ex) { + try { + await rollback(); + } catch (ex2) { + // In rare cases, a rollback may fail. + // Safe to ignore. + } + throw ex; + } + } +} diff --git a/packages/capacitor/src/adapter/CapacitorSQLiteOpenFactory.ts b/packages/capacitor/src/adapter/CapacitorSQLiteOpenFactory.ts new file mode 100644 index 000000000..dfe9137d6 --- /dev/null +++ b/packages/capacitor/src/adapter/CapacitorSQLiteOpenFactory.ts @@ -0,0 +1,48 @@ +import { DBAdapter, SQLOpenFactory, SQLOpenOptions } from '@powersync/web'; +import { CapacitorSQLiteAdapter } from './CapacitorSQLiteAdapter'; + +enum SqliteSynchronous { + normal = 'NORMAL', + full = 'FULL', + off = 'OFF' +} + +export interface CapacitorSQLiteOptions { + /** + * Journal/WAL size limit. Defaults to 6MB. + * The WAL may grow larger than this limit during writes, but SQLite will + * attempt to truncate the file afterwards. + */ + journalSizeLimit?: number; + + /** + * SQLite synchronous flag. Defaults to [SqliteSynchronous.normal], which + * is safe for WAL mode. + */ + synchronous?: SqliteSynchronous; + + /** + * Maximum SQLite cache size. Defaults to 50MB. + * + * For details, see: https://www.sqlite.org/pragma.html#pragma_cache_size + */ + cacheSizeKb?: number; +} + +export interface CapacitorSQLiteOpenFactoryOptions extends SQLOpenOptions { + sqliteOptions?: CapacitorSQLiteOptions; +} + +export const DEFAULT_SQLITE_OPTIONS: Required = { + journalSizeLimit: 6 * 1024 * 1024, + synchronous: SqliteSynchronous.normal, + cacheSizeKb: 50 * 1024 +}; + +export class CapacitorSQLiteOpenFactory implements SQLOpenFactory { + constructor(protected options: CapacitorSQLiteOpenFactoryOptions) {} + + openDB(): DBAdapter { + return new CapacitorSQLiteAdapter(this.options); + } +} diff --git a/packages/capacitor/src/index.ts b/packages/capacitor/src/index.ts new file mode 100644 index 000000000..3a9c52a7e --- /dev/null +++ b/packages/capacitor/src/index.ts @@ -0,0 +1,3 @@ +export { CapacitorSQLiteAdapter } from './adapter/CapacitorSQLiteAdapter'; +export { CapacitorSQLiteOpenFactory } from './adapter/CapacitorSQLiteOpenFactory'; +export { PowerSyncDatabase } from './PowerSyncDatabase'; diff --git a/packages/capacitor/src/plugin/PowerSyncCore.ts b/packages/capacitor/src/plugin/PowerSyncCore.ts new file mode 100644 index 000000000..21bfc2b05 --- /dev/null +++ b/packages/capacitor/src/plugin/PowerSyncCore.ts @@ -0,0 +1,6 @@ +import { registerPlugin } from '@capacitor/core'; +import { PowerSyncPlugin } from './PowerSyncPlugin'; + +export const PowerSyncCore = registerPlugin('PowerSync', { + web: () => import('./web').then((m) => new m.PowerSyncWeb()) +}); diff --git a/packages/capacitor/src/plugin/PowerSyncPlugin.ts b/packages/capacitor/src/plugin/PowerSyncPlugin.ts new file mode 100644 index 000000000..81c33ee4e --- /dev/null +++ b/packages/capacitor/src/plugin/PowerSyncPlugin.ts @@ -0,0 +1,22 @@ +export type RegistrationResponse = { + /** + * Zero for successful registration, non-zero for failure. + */ + responseCode: number; +}; + +export const messageForErrorCode = (code: number): string => { + switch (code) { + case 0: + return 'Success'; + default: + return `Extension registration failed with SQLite error code: ${code}`; + } +}; + +export interface PowerSyncPlugin { + /** + * Registers the PowerSync core extension with the SQLite library. + */ + registerCore(): Promise; +} diff --git a/packages/capacitor/src/plugin/web.ts b/packages/capacitor/src/plugin/web.ts new file mode 100644 index 000000000..3f06456a1 --- /dev/null +++ b/packages/capacitor/src/plugin/web.ts @@ -0,0 +1,9 @@ +import { WebPlugin } from '@capacitor/core'; + +import type { PowerSyncPlugin, RegistrationResponse } from './PowerSyncPlugin'; + +export class PowerSyncWeb extends WebPlugin implements PowerSyncPlugin { + async registerCore(): Promise { + throw new Error('This code path is not supported on web.'); + } +} diff --git a/packages/capacitor/src/sync/CapacitorSyncImplementation.ts b/packages/capacitor/src/sync/CapacitorSyncImplementation.ts new file mode 100644 index 000000000..c5af1a672 --- /dev/null +++ b/packages/capacitor/src/sync/CapacitorSyncImplementation.ts @@ -0,0 +1,16 @@ +import { AbstractStreamingSyncImplementation, LockOptions } from '@powersync/web'; +import Lock from 'async-lock'; + +export class CapacitorStreamingSyncImplementation extends AbstractStreamingSyncImplementation { + static GLOBAL_LOCK = new Lock(); + + async obtainLock(lockOptions: LockOptions): Promise { + const identifier = `streaming-sync-${lockOptions.type}-${this.options.identifier}`; + return CapacitorStreamingSyncImplementation.GLOBAL_LOCK.acquire(identifier, async () => { + if (lockOptions.signal?.aborted) { + throw new Error('Aborted'); + } + return await lockOptions.callback(); + }); + } +} diff --git a/packages/capacitor/tsconfig.json b/packages/capacitor/tsconfig.json new file mode 100644 index 000000000..129567c80 --- /dev/null +++ b/packages/capacitor/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "allowUnreachableCode": false, + "declaration": true, + "esModuleInterop": true, + "inlineSources": true, + "lib": ["dom", "es2017"], + "module": "esnext", + "moduleResolution": "node", + "skipLibCheck": true, + "outDir": "dist/esm", + "sourceMap": true, + "strict": true, + "target": "es2017" + }, + "files": ["src/index.ts"], + "exclude": ["node_modules"], + "references": [{ "path": "../common" }, { "path": "../web" }] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9801e66c3..e8f986916 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: 12.1.4(rollup@4.14.3)(tslib@2.8.1)(typescript@5.9.2) '@vitest/browser': specifier: ^3.2.4 - version: 3.2.4(playwright@1.52.0)(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0))(vitest@3.2.4) + version: 3.2.4(playwright@1.52.0)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0))(vitest@3.2.4) husky: specifier: ^9.0.11 version: 9.1.7 @@ -113,10 +113,10 @@ importers: devDependencies: '@angular-builders/custom-webpack': specifier: ^19.0.0 - version: 19.0.1(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) + version: 19.0.1(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) '@angular-devkit/build-angular': specifier: ^19.2.5 - version: 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) + version: 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) '@angular/cli': specifier: ^19.2.5 version: 19.2.14(@types/node@24.2.0)(chokidar@4.0.3) @@ -265,21 +265,27 @@ importers: demos/example-capacitor: dependencies: + '@capacitor-community/sqlite': + specifier: ^7.0.2 + version: 7.0.2(@capacitor/core@7.4.4) '@capacitor/android': - specifier: ^6.0.0 - version: 6.2.1(@capacitor/core@7.4.3) + specifier: ^7.4.3 + version: 7.4.3(@capacitor/core@7.4.4) '@capacitor/core': specifier: latest - version: 7.4.3 + version: 7.4.4 '@capacitor/ios': - specifier: ^6.0.0 - version: 6.2.1(@capacitor/core@7.4.3) + specifier: ^7.4.3 + version: 7.4.3(@capacitor/core@7.4.4) '@capacitor/splash-screen': specifier: latest - version: 7.0.3(@capacitor/core@7.4.3) + version: 7.0.3(@capacitor/core@7.4.4) '@journeyapps/wa-sqlite': specifier: ^1.3.2 version: 1.3.2 + '@powersync/capacitor': + specifier: workspace:* + version: link:../../packages/capacitor '@powersync/react': specifier: workspace:* version: link:../../packages/react @@ -297,8 +303,8 @@ importers: version: 6.30.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@capacitor/cli': - specifier: ^6.0.0 - version: 6.2.1 + specifier: ^7.4.3 + version: 7.4.3 '@swc/core': specifier: ~1.6.0 version: 1.6.13 @@ -762,7 +768,7 @@ importers: version: 0.19.8(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0))(workbox-build@7.3.0(@types/babel__core@7.20.5))(workbox-window@7.3.0) vite-plugin-top-level-await: specifier: ^1.4.1 - version: 1.5.0(rollup@4.41.1)(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) + version: 1.5.0(rollup@2.79.2)(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) vite-plugin-wasm: specifier: ^3.3.0 version: 3.4.1(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) @@ -1571,7 +1577,7 @@ importers: version: 1.3.1(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) unplugin-vue-components: specifier: ^0.26.0 - version: 0.26.0(@babel/parser@7.27.4)(rollup@2.79.2)(vue@3.4.21(typescript@5.9.2)) + version: 0.26.0(@babel/parser@7.27.4)(rollup@4.41.1)(vue@3.4.21(typescript@5.9.2)) vite: specifier: ^5.2.0 version: 5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) @@ -1580,7 +1586,7 @@ importers: version: 0.19.8(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0))(workbox-build@7.3.0(@types/babel__core@7.20.5))(workbox-window@7.3.0) vite-plugin-top-level-await: specifier: ^1.4.1 - version: 1.5.0(rollup@2.79.2)(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) + version: 1.5.0(rollup@4.41.1)(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)) vite-plugin-vuetify: specifier: ^2.0.3 version: 2.1.1(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0))(vue@3.4.21(typescript@5.9.2))(vuetify@3.6.8) @@ -1801,6 +1807,58 @@ importers: specifier: ^1.4.4 version: 1.5.0(rollup@4.41.1)(vite@6.3.5(@types/node@20.17.57)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0)) + packages/capacitor: + dependencies: + '@powersync/web': + specifier: workspace:^ + version: link:../web + async-lock: + specifier: ^1.4.0 + version: 1.4.1 + devDependencies: + '@capacitor-community/sqlite': + specifier: ^7.0.2 + version: 7.0.2(@capacitor/core@7.4.3) + '@capacitor/android': + specifier: ^7.0.0 + version: 7.4.3(@capacitor/core@7.4.3) + '@capacitor/core': + specifier: ^7.0.0 + version: 7.4.3 + '@capacitor/docgen': + specifier: ^0.3.0 + version: 0.3.0 + '@capacitor/ios': + specifier: ^7.0.0 + version: 7.4.3(@capacitor/core@7.4.3) + '@ionic/eslint-config': + specifier: ^0.4.0 + version: 0.4.0(eslint@8.57.1)(typescript@5.9.2) + '@ionic/prettier-config': + specifier: ^4.0.0 + version: 4.0.0(prettier@3.5.3) + '@ionic/swiftlint-config': + specifier: ^2.0.0 + version: 2.0.0 + eslint: + specifier: ^8.57.0 + version: 8.57.1 + prettier: + specifier: ^3.4.2 + version: 3.5.3 + prettier-plugin-java: + specifier: ^2.6.6 + version: 2.7.4(prettier@3.5.3) + rimraf: + specifier: ^6.0.1 + version: 6.0.1 + rollup: + specifier: ^4.30.1 + version: 4.41.1 + swiftlint: + specifier: ^2.0.0 + version: 2.0.0(typescript@5.9.2) + packages/common: dependencies: js-logger: @@ -3615,23 +3673,37 @@ packages: peerDependencies: react: '>=16.3.0' - '@capacitor/android@6.2.1': - resolution: {integrity: sha512-8gd4CIiQO5LAIlPIfd5mCuodBRxMMdZZEdj8qG8m+dQ1sQ2xyemVpzHmRK8qSCHorsBUCg3D62j2cp6bEBAkdw==} + '@capacitor-community/sqlite@7.0.2': + resolution: {integrity: sha512-TkxvuLgVCSmme/NSUEE2xopTVMwMqdT6+zH9pH8g76DMdi2z+ZsPEATQnJchGw4YAhhiQ8vTYxIP9se3/zkhGg==} + engines: {node: '>=16.0.0'} peerDependencies: - '@capacitor/core': ^6.2.0 + '@capacitor/core': '>=7.0.0' - '@capacitor/cli@6.2.1': - resolution: {integrity: sha512-JKl0FpFge8PgQNInw12kcKieQ4BmOyazQ4JGJOfEpVXlgrX1yPhSZTPjngupzTCiK3I7q7iGG5kjun0fDqgSCA==} - engines: {node: '>=18.0.0'} + '@capacitor/android@7.4.3': + resolution: {integrity: sha512-VpjvnOcmYGPLgvXRhe3CGLs62Cg7sxOyp77NddCr+Y06qqgnoaj6OGeBVTc2DZlqZ6bSmh15JvFu82pkvmdgfQ==} + peerDependencies: + '@capacitor/core': ^7.4.0 + + '@capacitor/cli@7.4.3': + resolution: {integrity: sha512-SWozpdDgrbQ/ry1nIapugDFvE9z+l22BmU/+fpgL2Zv5487hGdXvCX5+1SluuFBP3IPpx6b4LjsKnBigyJoUWg==} + engines: {node: '>=20.0.0'} hasBin: true '@capacitor/core@7.4.3': resolution: {integrity: sha512-wCWr8fQ9Wxn0466vPg7nMn0tivbNVjNy1yL4GvDSIZuZx7UpU2HeVGNe9QjN/quEd+YLRFeKEBLBw619VqUiNg==} - '@capacitor/ios@6.2.1': - resolution: {integrity: sha512-tbMlQdQjxe1wyaBvYVU1yTojKJjgluZQsJkALuJxv/6F8QTw5b6vd7X785O/O7cMpIAZfUWo/vtAHzFkRV+kXw==} + '@capacitor/core@7.4.4': + resolution: {integrity: sha512-xzjxpr+d2zwTpCaN0k+C6wKSZzWFAb9OVEUtmO72ihjr/NEDoLvsGl4WLfjWPcCO2zOy0b2X52tfRWjECFUjtw==} + + '@capacitor/docgen@0.3.0': + resolution: {integrity: sha512-WPggobo5Ql70F+2xOIUwNSApJXaL9F/9+Al6B+sNuSAmcg484OAksyUPKgiynF4BVlxeY5a0sDkgdVkmmA3ElQ==} + engines: {node: '>=18.0.0'} + hasBin: true + + '@capacitor/ios@7.4.3': + resolution: {integrity: sha512-VNm7cHODgh3KK/4ZC2rXU9gBlvHii/mYFLI+XMXwq24nhB679QxHhz+pUuI7PatYoM2q4MAL0NR/dRgehKCaSA==} peerDependencies: - '@capacitor/core': ^6.2.0 + '@capacitor/core': ^7.4.0 '@capacitor/splash-screen@7.0.3': resolution: {integrity: sha512-coAw2de3rRX0EfneK0/D9IZaDAUOtsPaE9ZNbSdCs2UtmXp0hdcr5Tsil01Kve707nQfLsd03pmvaesJYD60EA==} @@ -3693,6 +3765,21 @@ packages: '@changesets/write@0.3.2': resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@chevrotain/cst-dts-gen@11.0.3': + resolution: {integrity: sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==} + + '@chevrotain/gast@11.0.3': + resolution: {integrity: sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==} + + '@chevrotain/regexp-to-ast@11.0.3': + resolution: {integrity: sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==} + + '@chevrotain/types@11.0.3': + resolution: {integrity: sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==} + + '@chevrotain/utils@11.0.3': + resolution: {integrity: sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==} + '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -5538,42 +5625,55 @@ packages: resolution: {integrity: sha512-TshtaFQsovB4NWRBydbNFawql6yul7d5bMiW1WYYf17hd99V6xdDdk3vtF51bw6sLkxON3bDQpWsnUc9/hVo3g==} engines: {node: '>=16.0.0'} - '@ionic/utils-array@2.1.5': - resolution: {integrity: sha512-HD72a71IQVBmQckDwmA8RxNVMTbxnaLbgFOl+dO5tbvW9CkkSFCv41h6fUuNsSEVgngfkn0i98HDuZC8mk+lTA==} - engines: {node: '>=10.3.0'} + '@ionic/eslint-config@0.4.0': + resolution: {integrity: sha512-L8OXY29D3iGqNtteFj0iz3eoZIVgokBiVjCO8WMssNZa4GTHjYsase0rC9ASXGefMnLJu6rbNl3Gbx7NNxJRZQ==} + peerDependencies: + eslint: '>=7' + + '@ionic/prettier-config@4.0.0': + resolution: {integrity: sha512-0DqL6CggVdgeJAWOLPUT73rF1VD5p0tVlCpC5GXz5vTIUBxNwsJ5085Q7wXjKiE5Odx3aOHGTcuRWCawFsLFag==} + peerDependencies: + prettier: ^2.4.0 || ^3.0.0 + + '@ionic/swiftlint-config@2.0.0': + resolution: {integrity: sha512-TXy76ALSKhUZzBziHz7aoEtSQwHofBIDRNzM9x4sndtC7fefbZsBw3UgGwXFTOc7hoj72EAGyqZNUhj9LlhaNQ==} - '@ionic/utils-fs@3.1.6': - resolution: {integrity: sha512-eikrNkK89CfGPmexjTfSWl4EYqsPSBh0Ka7by4F0PLc1hJZYtJxUZV3X4r5ecA8ikjicUmcbU7zJmAjmqutG/w==} - engines: {node: '>=10.3.0'} + '@ionic/utils-array@2.1.6': + resolution: {integrity: sha512-0JZ1Zkp3wURnv8oq6Qt7fMPo5MpjbLoUoa9Bu2Q4PJuSDWM8H8gwF3dQO7VTeUj3/0o1IB1wGkFWZZYgUXZMUg==} + engines: {node: '>=16.0.0'} '@ionic/utils-fs@3.1.7': resolution: {integrity: sha512-2EknRvMVfhnyhL1VhFkSLa5gOcycK91VnjfrTB0kbqkTFCOXyXgVLI5whzq7SLrgD9t1aqos3lMMQyVzaQ5gVA==} engines: {node: '>=16.0.0'} - '@ionic/utils-object@2.1.5': - resolution: {integrity: sha512-XnYNSwfewUqxq+yjER1hxTKggftpNjFLJH0s37jcrNDwbzmbpFTQTVAp4ikNK4rd9DOebX/jbeZb8jfD86IYxw==} - engines: {node: '>=10.3.0'} - - '@ionic/utils-process@2.1.10': - resolution: {integrity: sha512-mZ7JEowcuGQK+SKsJXi0liYTcXd2bNMR3nE0CyTROpMECUpJeAvvaBaPGZf5ERQUPeWBVuwqAqjUmIdxhz5bxw==} - engines: {node: '>=10.3.0'} + '@ionic/utils-object@2.1.6': + resolution: {integrity: sha512-vCl7sl6JjBHFw99CuAqHljYJpcE88YaH2ZW4ELiC/Zwxl5tiwn4kbdP/gxi2OT3MQb1vOtgAmSNRtusvgxI8ww==} + engines: {node: '>=16.0.0'} - '@ionic/utils-stream@3.1.5': - resolution: {integrity: sha512-hkm46uHvEC05X/8PHgdJi4l4zv9VQDELZTM+Kz69odtO9zZYfnt8DkfXHJqJ+PxmtiE5mk/ehJWLnn/XAczTUw==} - engines: {node: '>=10.3.0'} + '@ionic/utils-process@2.1.12': + resolution: {integrity: sha512-Jqkgyq7zBs/v/J3YvKtQQiIcxfJyplPgECMWgdO0E1fKrrH8EF0QGHNJ9mJCn6PYe2UtHNS8JJf5G21e09DfYg==} + engines: {node: '>=16.0.0'} - '@ionic/utils-subprocess@2.1.11': - resolution: {integrity: sha512-6zCDixNmZCbMCy5np8klSxOZF85kuDyzZSTTQKQP90ZtYNCcPYmuFSzaqDwApJT4r5L3MY3JrqK1gLkc6xiUPw==} - engines: {node: '>=10.3.0'} + '@ionic/utils-stream@3.1.7': + resolution: {integrity: sha512-eSELBE7NWNFIHTbTC2jiMvh1ABKGIpGdUIvARsNPMNQhxJB3wpwdiVnoBoTYp+5a6UUIww4Kpg7v6S7iTctH1w==} + engines: {node: '>=16.0.0'} - '@ionic/utils-terminal@2.3.3': - resolution: {integrity: sha512-RnuSfNZ5fLEyX3R5mtcMY97cGD1A0NVBbarsSQ6yMMfRJ5YHU7hHVyUfvZeClbqkBC/pAqI/rYJuXKCT9YeMCQ==} - engines: {node: '>=10.3.0'} + '@ionic/utils-subprocess@3.0.1': + resolution: {integrity: sha512-cT4te3AQQPeIM9WCwIg8ohroJ8TjsYaMb2G4ZEgv9YzeDqHZ4JpeIKqG2SoaA3GmVQ3sOfhPM6Ox9sxphV/d1A==} + engines: {node: '>=16.0.0'} '@ionic/utils-terminal@2.3.5': resolution: {integrity: sha512-3cKScz9Jx2/Pr9ijj1OzGlBDfcmx7OMVBt4+P1uRR0SSW4cm1/y3Mo4OY3lfkuaYifMNBW8Wz6lQHbs1bihr7A==} engines: {node: '>=16.0.0'} + '@isaacs/balanced-match@4.0.1': + resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} + engines: {node: 20 || >=22} + + '@isaacs/brace-expansion@5.0.0': + resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==} + engines: {node: 20 || >=22} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -7460,6 +7560,11 @@ packages: cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.34.9': + resolution: {integrity: sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-arm64@4.41.1': resolution: {integrity: sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==} cpu: [arm64] @@ -7475,6 +7580,11 @@ packages: cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.34.9': + resolution: {integrity: sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.41.1': resolution: {integrity: sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==} cpu: [x64] @@ -7540,6 +7650,11 @@ packages: cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.34.9': + resolution: {integrity: sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.41.1': resolution: {integrity: sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==} cpu: [arm64] @@ -7555,6 +7670,11 @@ packages: cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.34.9': + resolution: {integrity: sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.41.1': resolution: {integrity: sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==} cpu: [arm64] @@ -7630,6 +7750,11 @@ packages: cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.34.9': + resolution: {integrity: sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.41.1': resolution: {integrity: sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==} cpu: [x64] @@ -7645,6 +7770,11 @@ packages: cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.34.9': + resolution: {integrity: sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.41.1': resolution: {integrity: sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==} cpu: [x64] @@ -7660,6 +7790,11 @@ packages: cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.34.9': + resolution: {integrity: sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.41.1': resolution: {integrity: sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==} cpu: [arm64] @@ -7690,6 +7825,11 @@ packages: cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.34.9': + resolution: {integrity: sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==} + cpu: [x64] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.41.1': resolution: {integrity: sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==} cpu: [x64] @@ -7853,6 +7993,11 @@ packages: '@slorber/remark-comment@1.0.0': resolution: {integrity: sha512-RCE24n7jsOj1M0UPvIQCHTe7fI0sFL4S2nwKVWwHyVr/wI/H8GosgsJGyhnsZoGFnD/P2hLf1mSbrrgSLN93NA==} + '@stencil/core@4.36.3': + resolution: {integrity: sha512-C9DOaAjm+hSYRuVoUuYWG/lrYT8+4DG0AL0m1Ea9+G5v2Y6ApVpNJLbXvFlRZIdDMGecH86s6v0Gp39uockLxg==} + engines: {node: '>=16.0.0', npm: '>=7.10.0'} + hasBin: true + '@supabase/auth-js@2.69.1': resolution: {integrity: sha512-FILtt5WjCNzmReeRLq5wRs3iShwmnWgBvxHfqapC/VoljJl+W8hDAyFmf1NVw3zH+ZjZ05AKxiKxVeb0HNWRMQ==} @@ -9055,6 +9200,9 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@14.18.63': + resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} + '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} @@ -10420,6 +10568,9 @@ packages: brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + browser-fs-access@0.35.0: + resolution: {integrity: sha512-sLoadumpRfsjprP8XzVjpQc0jK8yqHBx0PtUTGYj2fftT+P/t+uyDAQdMgGAPKD011in/O+YYGh7fIs0oG/viw==} + browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} @@ -10736,6 +10887,14 @@ packages: resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} engines: {node: '>= 6'} + chevrotain-allstar@0.3.1: + resolution: {integrity: sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==} + peerDependencies: + chevrotain: ^11.0.0 + + chevrotain@11.0.3: + resolution: {integrity: sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -13248,6 +13407,11 @@ packages: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true + glob@11.0.3: + resolution: {integrity: sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==} + engines: {node: 20 || >=22} + hasBin: true + glob@6.0.4: resolution: {integrity: sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==} deprecated: Glob versions prior to v9 are no longer supported @@ -13729,6 +13893,9 @@ packages: engines: {node: '>=16.x'} hasBin: true + immediate@3.0.6: + resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} + immutable@5.1.2: resolution: {integrity: sha512-qHKXW1q6liAk1Oys6umoaZbDRqjcjgSrbnrifHsfsttza7zcvRAsL7mMV6xWcyhwQy7Xj5v4hhbr6b+iDYwlmQ==} @@ -14243,11 +14410,21 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jackspeak@4.1.1: + resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==} + engines: {node: 20 || >=22} + jake@10.9.2: resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} engines: {node: '>=10'} hasBin: true + java-parser@3.0.1: + resolution: {integrity: sha512-sDIR7u9b7O2JViNUxiZRhnRz7URII/eE7g2B+BmGxDeS6Ex3OYAcCyz5oh0H4LQ+hL/BS8OJTz8apMy9xtGmrQ==} + + jeep-sqlite@2.8.0: + resolution: {integrity: sha512-FWNUP6OAmrUHwiW7H1xH5YUQ8tN2O4l4psT1sLd7DQtHd5PfrA1nvNdeKPNj+wQBtu7elJa8WoUibTytNTaaCg==} + jest-changed-files@29.7.0: resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -14616,6 +14793,9 @@ packages: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} + jszip@3.10.1: + resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} + junk@3.1.0: resolution: {integrity: sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==} engines: {node: '>=8'} @@ -14732,6 +14912,12 @@ packages: webpack: optional: true + lie@3.1.1: + resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} + + lie@3.3.0: + resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + lighthouse-logger@1.4.2: resolution: {integrity: sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==} @@ -14922,6 +15108,9 @@ packages: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} + localforage@1.10.0: + resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} + locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -15722,6 +15911,10 @@ packages: minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimatch@10.0.3: + resolution: {integrity: sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==} + engines: {node: 20 || >=22} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -16493,6 +16686,9 @@ packages: engines: {node: ^18.17.0 || >=20.5.0} hasBin: true + pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -16621,6 +16817,10 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + path-temp@2.1.0: resolution: {integrity: sha512-cMMJTAZlion/RWRRC48UbrDymEIt+/YSD/l8NqjneyDw2rDOBQcP5yRkMB4CYGn47KMhZvbblBP7Z79OsMw72w==} engines: {node: '>=8.15'} @@ -17229,6 +17429,11 @@ packages: prettier-plugin-embed@0.4.15: resolution: {integrity: sha512-9pZVIp3bw2jw+Ge+iAMZ4j+sIVC9cPruZ93H2tj5Wa/3YDFDJ/uYyVWdUGfcFUnv28drhW2Bmome9xSGXsPKOw==} + prettier-plugin-java@2.7.4: + resolution: {integrity: sha512-RiRNkumIW9vaDpxirgIPI+oLSRmuCmoVZuTax9i3cWzWnxd+uKyAfDe4efS+ce00owAeh0a1DI5eFaH1xYWNPg==} + peerDependencies: + prettier: ^3.0.0 + prettier-plugin-sql@0.18.1: resolution: {integrity: sha512-2+Nob2sg7hzLAKJoE6sfgtkhBZCqOzrWHZPvE4Kee/e80oOyI4qwy9vypeltqNBJwTtq3uiKPrCxlT03bBpOaw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -18327,9 +18532,9 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@4.4.1: - resolution: {integrity: sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==} - engines: {node: '>=14'} + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true ripemd160@2.0.2: @@ -19261,6 +19466,10 @@ packages: '@swc/core': ^1.2.147 webpack: '>=2' + swiftlint@2.0.0: + resolution: {integrity: sha512-MMVuyZ4/6WcIJlk0z6GM0pZjRuwnyUJqRPbJBFW3oACN/qjAvRbolCWEu+zE2MycF/cEgqfUpI+oLECNfjfOJA==} + hasBin: true + symbol-observable@4.0.0: resolution: {integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==} engines: {node: '>=0.10'} @@ -19787,6 +19996,11 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x + typescript@4.2.4: + resolution: {integrity: sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==} + engines: {node: '>=4.2.0'} + hasBin: true + typescript@4.5.5: resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} engines: {node: '>=4.2.0'} @@ -20877,14 +21091,14 @@ packages: resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} engines: {node: '>=18'} - xml2js@0.5.0: - resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} - engines: {node: '>=4.0.0'} - xml2js@0.6.0: resolution: {integrity: sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w==} engines: {node: '>=4.0.0'} + xml2js@0.6.2: + resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} + engines: {node: '>=4.0.0'} + xmlbuilder@11.0.1: resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} engines: {node: '>=4.0'} @@ -21198,11 +21412,11 @@ snapshots: - chokidar - typescript - '@angular-builders/custom-webpack@19.0.1(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-builders/custom-webpack@19.0.1(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@angular-builders/common': 3.0.1(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(typescript@5.5.4) '@angular-devkit/architect': 0.1902.14(chokidar@4.0.3) - '@angular-devkit/build-angular': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) + '@angular-devkit/build-angular': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0) '@angular-devkit/core': 19.2.14(chokidar@4.0.3) '@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4) lodash: 4.17.21 @@ -21251,7 +21465,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-devkit/build-angular@19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(@angular/compiler@19.2.14)(@angular/service-worker@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@rspack/core@1.3.13)(@swc/core@1.11.29)(@types/node@24.2.0)(chokidar@4.0.3)(html-webpack-plugin@5.6.3(@rspack/core@1.3.13)(webpack@5.98.0(@swc/core@1.11.29)))(jest-environment-jsdom@29.7.0)(jest@29.7.0(@types/node@24.2.0)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(jiti@2.4.2)(lightningcss@1.30.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@24.2.0)(typescript@5.5.4)))(tsx@4.19.4)(typescript@5.5.4)(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.14(chokidar@4.0.3) @@ -21270,7 +21484,7 @@ snapshots: '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.14(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.5.4))(typescript@5.5.4)(webpack@5.98.0(@swc/core@1.11.29)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(@swc/core@1.11.29)) @@ -22681,29 +22895,43 @@ snapshots: hoist-non-react-statics: 3.3.2 react: 19.0.0 - '@capacitor/android@6.2.1(@capacitor/core@7.4.3)': + '@capacitor-community/sqlite@7.0.2(@capacitor/core@7.4.3)': + dependencies: + '@capacitor/core': 7.4.3 + jeep-sqlite: 2.8.0 + + '@capacitor-community/sqlite@7.0.2(@capacitor/core@7.4.4)': + dependencies: + '@capacitor/core': 7.4.4 + jeep-sqlite: 2.8.0 + + '@capacitor/android@7.4.3(@capacitor/core@7.4.3)': dependencies: '@capacitor/core': 7.4.3 - '@capacitor/cli@6.2.1': + '@capacitor/android@7.4.3(@capacitor/core@7.4.4)': + dependencies: + '@capacitor/core': 7.4.4 + + '@capacitor/cli@7.4.3': dependencies: '@ionic/cli-framework-output': 2.2.8 - '@ionic/utils-fs': 3.1.7 - '@ionic/utils-subprocess': 2.1.11 + '@ionic/utils-subprocess': 3.0.1 '@ionic/utils-terminal': 2.3.5 - commander: 9.5.0 + commander: 12.1.0 debug: 4.4.1(supports-color@8.1.1) env-paths: 2.2.1 + fs-extra: 11.3.0 kleur: 4.1.5 native-run: 2.0.1 open: 8.4.2 plist: 3.1.0 prompts: 2.4.2 - rimraf: 4.4.1 + rimraf: 6.0.1 semver: 7.7.2 tar: 6.2.1 tslib: 2.8.1 - xml2js: 0.5.0 + xml2js: 0.6.2 transitivePeerDependencies: - supports-color @@ -22711,14 +22939,30 @@ snapshots: dependencies: tslib: 2.8.1 - '@capacitor/ios@6.2.1(@capacitor/core@7.4.3)': + '@capacitor/core@7.4.4': dependencies: - '@capacitor/core': 7.4.3 + tslib: 2.8.1 - '@capacitor/splash-screen@7.0.3(@capacitor/core@7.4.3)': + '@capacitor/docgen@0.3.0': + dependencies: + '@types/node': 14.18.63 + colorette: 2.0.20 + github-slugger: 1.5.0 + minimist: 1.2.8 + typescript: 4.2.4 + + '@capacitor/ios@7.4.3(@capacitor/core@7.4.3)': dependencies: '@capacitor/core': 7.4.3 + '@capacitor/ios@7.4.3(@capacitor/core@7.4.4)': + dependencies: + '@capacitor/core': 7.4.4 + + '@capacitor/splash-screen@7.0.3(@capacitor/core@7.4.4)': + dependencies: + '@capacitor/core': 7.4.4 + '@changesets/apply-release-plan@7.0.12': dependencies: '@changesets/config': 3.1.1 @@ -22865,6 +23109,23 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 + '@chevrotain/cst-dts-gen@11.0.3': + dependencies: + '@chevrotain/gast': 11.0.3 + '@chevrotain/types': 11.0.3 + lodash-es: 4.17.21 + + '@chevrotain/gast@11.0.3': + dependencies: + '@chevrotain/types': 11.0.3 + lodash-es: 4.17.21 + + '@chevrotain/regexp-to-ast@11.0.3': {} + + '@chevrotain/types@11.0.3': {} + + '@chevrotain/utils@11.0.3': {} + '@colors/colors@1.5.0': optional: true @@ -25662,18 +25923,28 @@ snapshots: transitivePeerDependencies: - supports-color - '@ionic/utils-array@2.1.5': + '@ionic/eslint-config@0.4.0(eslint@8.57.1)(typescript@5.9.2)': dependencies: - debug: 4.4.1(supports-color@8.1.1) - tslib: 2.8.1 + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.9.2) + eslint: 8.57.1 + eslint-config-prettier: 8.10.0(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1) transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack - supports-color + - typescript - '@ionic/utils-fs@3.1.6': + '@ionic/prettier-config@4.0.0(prettier@3.5.3)': + dependencies: + prettier: 3.5.3 + + '@ionic/swiftlint-config@2.0.0': {} + + '@ionic/utils-array@2.1.6': dependencies: - '@types/fs-extra': 8.1.5 debug: 4.4.1(supports-color@8.1.1) - fs-extra: 9.1.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -25687,17 +25958,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@ionic/utils-object@2.1.5': + '@ionic/utils-object@2.1.6': dependencies: debug: 4.4.1(supports-color@8.1.1) tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@ionic/utils-process@2.1.10': + '@ionic/utils-process@2.1.12': dependencies: - '@ionic/utils-object': 2.1.5 - '@ionic/utils-terminal': 2.3.3 + '@ionic/utils-object': 2.1.6 + '@ionic/utils-terminal': 2.3.5 debug: 4.4.1(supports-color@8.1.1) signal-exit: 3.0.7 tree-kill: 1.2.2 @@ -25705,27 +25976,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@ionic/utils-stream@3.1.5': + '@ionic/utils-stream@3.1.7': dependencies: debug: 4.4.1(supports-color@8.1.1) tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@ionic/utils-subprocess@2.1.11': + '@ionic/utils-subprocess@3.0.1': dependencies: - '@ionic/utils-array': 2.1.5 - '@ionic/utils-fs': 3.1.6 - '@ionic/utils-process': 2.1.10 - '@ionic/utils-stream': 3.1.5 - '@ionic/utils-terminal': 2.3.3 + '@ionic/utils-array': 2.1.6 + '@ionic/utils-fs': 3.1.7 + '@ionic/utils-process': 2.1.12 + '@ionic/utils-stream': 3.1.7 + '@ionic/utils-terminal': 2.3.5 cross-spawn: 7.0.6 debug: 4.4.1(supports-color@8.1.1) tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@ionic/utils-terminal@2.3.3': + '@ionic/utils-terminal@2.3.5': dependencies: '@types/slice-ansi': 4.0.0 debug: 4.4.1(supports-color@8.1.1) @@ -25739,19 +26010,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@ionic/utils-terminal@2.3.5': + '@isaacs/balanced-match@4.0.1': {} + + '@isaacs/brace-expansion@5.0.0': dependencies: - '@types/slice-ansi': 4.0.0 - debug: 4.4.1(supports-color@8.1.1) - signal-exit: 3.0.7 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - tslib: 2.8.1 - untildify: 4.0.0 - wrap-ansi: 7.0.0 - transitivePeerDependencies: - - supports-color + '@isaacs/balanced-match': 4.0.1 '@isaacs/cliui@8.0.2': dependencies: @@ -28770,9 +29033,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' - - bufferutil - supports-color - - utf-8-validate '@react-native/metro-config@0.78.0(@babel/core@7.26.10)(@babel/preset-env@7.27.2(@babel/core@7.26.10))': dependencies: @@ -28783,9 +29044,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' - - bufferutil - supports-color - - utf-8-validate '@react-native/normalize-color@2.1.0': {} @@ -29170,6 +29429,14 @@ snapshots: optionalDependencies: rollup: 4.14.3 + '@rollup/pluginutils@5.1.4(rollup@4.41.1)': + dependencies: + '@types/estree': 1.0.7 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.41.1 + '@rollup/rollup-android-arm-eabi@4.14.3': optional: true @@ -29194,6 +29461,9 @@ snapshots: '@rollup/rollup-darwin-arm64@4.34.8': optional: true + '@rollup/rollup-darwin-arm64@4.34.9': + optional: true + '@rollup/rollup-darwin-arm64@4.41.1': optional: true @@ -29203,6 +29473,9 @@ snapshots: '@rollup/rollup-darwin-x64@4.34.8': optional: true + '@rollup/rollup-darwin-x64@4.34.9': + optional: true + '@rollup/rollup-darwin-x64@4.41.1': optional: true @@ -29242,6 +29515,9 @@ snapshots: '@rollup/rollup-linux-arm64-gnu@4.34.8': optional: true + '@rollup/rollup-linux-arm64-gnu@4.34.9': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.41.1': optional: true @@ -29251,6 +29527,9 @@ snapshots: '@rollup/rollup-linux-arm64-musl@4.34.8': optional: true + '@rollup/rollup-linux-arm64-musl@4.34.9': + optional: true + '@rollup/rollup-linux-arm64-musl@4.41.1': optional: true @@ -29296,6 +29575,9 @@ snapshots: '@rollup/rollup-linux-x64-gnu@4.34.8': optional: true + '@rollup/rollup-linux-x64-gnu@4.34.9': + optional: true + '@rollup/rollup-linux-x64-gnu@4.41.1': optional: true @@ -29305,6 +29587,9 @@ snapshots: '@rollup/rollup-linux-x64-musl@4.34.8': optional: true + '@rollup/rollup-linux-x64-musl@4.34.9': + optional: true + '@rollup/rollup-linux-x64-musl@4.41.1': optional: true @@ -29314,6 +29599,9 @@ snapshots: '@rollup/rollup-win32-arm64-msvc@4.34.8': optional: true + '@rollup/rollup-win32-arm64-msvc@4.34.9': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.41.1': optional: true @@ -29332,6 +29620,9 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.34.8': optional: true + '@rollup/rollup-win32-x64-msvc@4.34.9': + optional: true + '@rollup/rollup-win32-x64-msvc@4.41.1': optional: true @@ -29497,6 +29788,17 @@ snapshots: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 + '@stencil/core@4.36.3': + optionalDependencies: + '@rollup/rollup-darwin-arm64': 4.34.9 + '@rollup/rollup-darwin-x64': 4.34.9 + '@rollup/rollup-linux-arm64-gnu': 4.34.9 + '@rollup/rollup-linux-arm64-musl': 4.34.9 + '@rollup/rollup-linux-x64-gnu': 4.34.9 + '@rollup/rollup-linux-x64-musl': 4.34.9 + '@rollup/rollup-win32-arm64-msvc': 4.34.9 + '@rollup/rollup-win32-x64-msvc': 4.34.9 + '@supabase/auth-js@2.69.1': dependencies: '@supabase/node-fetch': 2.6.15 @@ -31134,6 +31436,8 @@ snapshots: '@types/node@12.20.55': {} + '@types/node@14.18.63': {} + '@types/node@17.0.45': {} '@types/node@20.17.57': @@ -31804,10 +32108,6 @@ snapshots: dependencies: vite: 6.2.7(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0))': - dependencies: - vite: 6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0) - '@vitejs/plugin-react@4.5.0(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0))': dependencies: '@babel/core': 7.26.10 @@ -31843,6 +32143,26 @@ snapshots: - msw - utf-8-validate - vite + optional: true + + '@vitest/browser@3.2.4(playwright@1.52.0)(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0))(vitest@3.2.4)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0) + '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0)) + '@vitest/utils': 3.2.4 + magic-string: 0.30.17 + sirv: 3.0.1 + tinyrainbow: 2.0.0 + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.2.0)(@vitest/browser@3.2.4)(jsdom@24.1.3)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) + ws: 8.18.2 + optionalDependencies: + playwright: 1.52.0 + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite '@vitest/expect@3.2.4': dependencies: @@ -31860,6 +32180,14 @@ snapshots: optionalDependencies: vite: 5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) + '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0))': + dependencies: + '@vitest/spy': 3.2.4 + estree-walker: 3.0.3 + magic-string: 0.30.17 + optionalDependencies: + vite: 6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0) + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 @@ -33042,6 +33370,8 @@ snapshots: brorand@1.1.0: {} + browser-fs-access@0.35.0: {} + browser-process-hrtime@1.0.0: {} browser-stdout@1.3.1: {} @@ -33432,6 +33762,20 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 + chevrotain-allstar@0.3.1(chevrotain@11.0.3): + dependencies: + chevrotain: 11.0.3 + lodash-es: 4.17.21 + + chevrotain@11.0.3: + dependencies: + '@chevrotain/cst-dts-gen': 11.0.3 + '@chevrotain/gast': 11.0.3 + '@chevrotain/regexp-to-ast': 11.0.3 + '@chevrotain/types': 11.0.3 + '@chevrotain/utils': 11.0.3 + lodash-es: 4.17.21 + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -35348,6 +35692,16 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.9.2) + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.55.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.55.0): dependencies: debug: 3.2.7 @@ -35388,6 +35742,35 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.9 + array.prototype.findlastindex: 1.2.6 + array.prototype.flat: 1.3.3 + array.prototype.flatmap: 1.3.3 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + hasown: 2.0.2 + is-core-module: 2.16.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.1 + semver: 6.3.1 + string.prototype.trimend: 1.0.9 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.9.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.55.0)(typescript@5.3.3))(eslint@8.55.0): dependencies: '@rtsao/scc': 1.1.0 @@ -36869,6 +37252,15 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 + glob@11.0.3: + dependencies: + foreground-child: 3.3.1 + jackspeak: 4.1.1 + minimatch: 10.0.3 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + glob@6.0.4: dependencies: inflight: 1.0.6 @@ -37560,6 +37952,8 @@ snapshots: image-size@2.0.2: {} + immediate@3.0.6: {} + immutable@5.1.2: {} import-fresh@2.0.0: @@ -38013,6 +38407,10 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jackspeak@4.1.1: + dependencies: + '@isaacs/cliui': 8.0.2 + jake@10.9.2: dependencies: async: 3.2.6 @@ -38020,6 +38418,20 @@ snapshots: filelist: 1.0.4 minimatch: 3.1.2 + java-parser@3.0.1: + dependencies: + chevrotain: 11.0.3 + chevrotain-allstar: 0.3.1(chevrotain@11.0.3) + lodash: 4.17.21 + + jeep-sqlite@2.8.0: + dependencies: + '@stencil/core': 4.36.3 + browser-fs-access: 0.35.0 + jszip: 3.10.1 + localforage: 1.10.0 + sql.js: 1.13.0 + jest-changed-files@29.7.0: dependencies: execa: 5.1.1 @@ -38953,6 +39365,13 @@ snapshots: object.assign: 4.1.7 object.values: 1.2.1 + jszip@3.10.1: + dependencies: + lie: 3.3.0 + pako: 1.0.11 + readable-stream: 2.3.8 + setimmediate: 1.0.5 + junk@3.1.0: {} jwa@1.4.2: @@ -39086,6 +39505,14 @@ snapshots: optionalDependencies: webpack: 5.98.0(@swc/core@1.11.29)(esbuild@0.25.4) + lie@3.1.1: + dependencies: + immediate: 3.0.6 + + lie@3.3.0: + dependencies: + immediate: 3.0.6 + lighthouse-logger@1.4.2: dependencies: debug: 2.6.9 @@ -39282,6 +39709,10 @@ snapshots: local-pkg@0.4.3: {} + localforage@1.10.0: + dependencies: + lie: 3.1.1 + locate-path@2.0.0: dependencies: p-locate: 2.0.0 @@ -40824,6 +41255,10 @@ snapshots: minimalistic-crypto-utils@1.0.1: {} + minimatch@10.0.3: + dependencies: + '@isaacs/brace-expansion': 5.0.0 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -41676,6 +42111,8 @@ snapshots: transitivePeerDependencies: - supports-color + pako@1.0.11: {} + param-case@3.0.4: dependencies: dot-case: 3.0.4 @@ -41804,6 +42241,11 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 + path-scurry@2.0.0: + dependencies: + lru-cache: 11.1.0 + minipass: 7.1.2 + path-temp@2.1.0: dependencies: unique-string: 2.0.0 @@ -42461,6 +42903,11 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros + prettier-plugin-java@2.7.4(prettier@3.5.3): + dependencies: + java-parser: 3.0.1 + prettier: 3.5.3 + prettier-plugin-sql@0.18.1(prettier@3.5.3): dependencies: jsox: 1.2.123 @@ -44149,9 +44596,10 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@4.4.1: + rimraf@6.0.1: dependencies: - glob: 9.3.5 + glob: 11.0.3 + package-json-from-dist: 1.0.1 ripemd160@2.0.2: dependencies: @@ -44881,8 +45329,7 @@ snapshots: argparse: 2.0.1 nearley: 2.20.1 - sql.js@1.13.0: - optional: true + sql.js@1.13.0: {} srcset@4.0.0: {} @@ -45260,6 +45707,15 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.99.9(@swc/core@1.11.29(@swc/helpers@0.5.13)) + swiftlint@2.0.0(typescript@5.9.2): + dependencies: + '@ionic/utils-fs': 3.1.7 + '@ionic/utils-subprocess': 3.0.1 + cosmiconfig: 9.0.0(typescript@5.9.2) + transitivePeerDependencies: + - supports-color + - typescript + symbol-observable@4.0.0: {} symbol-tree@3.2.4: {} @@ -46044,6 +46500,8 @@ snapshots: typescript: 5.9.2 yaml: 2.8.0 + typescript@4.2.4: {} + typescript@4.5.5: {} typescript@5.0.4: {} @@ -46200,10 +46658,10 @@ snapshots: unplugin: 2.0.0-beta.1 vite: 5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) - unplugin-vue-components@0.26.0(@babel/parser@7.27.4)(rollup@2.79.2)(vue@3.4.21(typescript@5.9.2)): + unplugin-vue-components@0.26.0(@babel/parser@7.27.4)(rollup@4.41.1)(vue@3.4.21(typescript@5.9.2)): dependencies: '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.4(rollup@2.79.2) + '@rollup/pluginutils': 5.1.4(rollup@4.41.1) chokidar: 3.6.0 debug: 4.4.1(supports-color@8.1.1) fast-glob: 3.3.3 @@ -46469,12 +46927,12 @@ snapshots: - vue - webpack-cli - vite-plugin-top-level-await@1.5.0(rollup@2.79.2)(vite@5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)): + vite-plugin-top-level-await@1.5.0(rollup@2.79.2)(vite@5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@2.79.2) '@swc/core': 1.11.29(@swc/helpers@0.5.13) uuid: 10.0.0 - vite: 5.4.19(@types/node@24.2.0)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) + vite: 5.4.19(@types/node@20.17.57)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0) transitivePeerDependencies: - '@swc/helpers' - rollup @@ -46607,25 +47065,6 @@ snapshots: tsx: 4.19.4 yaml: 2.8.0 - vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.85.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.8.0): - dependencies: - esbuild: 0.25.5 - fdir: 6.4.5(picomatch@4.0.2) - picomatch: 4.0.2 - postcss: 8.5.4 - rollup: 4.41.1 - tinyglobby: 0.2.14 - optionalDependencies: - '@types/node': 24.2.0 - fsevents: 2.3.3 - jiti: 2.4.2 - less: 4.2.2 - lightningcss: 1.30.1 - sass: 1.85.0 - terser: 5.39.0 - tsx: 4.19.4 - yaml: 2.8.0 - vite@6.3.5(@types/node@24.2.0)(jiti@2.4.2)(less@4.2.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.40.0)(tsx@4.19.4)(yaml@2.8.0): dependencies: esbuild: 0.25.5 @@ -47533,12 +47972,12 @@ snapshots: xml-name-validator@5.0.0: {} - xml2js@0.5.0: + xml2js@0.6.0: dependencies: sax: 1.4.1 xmlbuilder: 11.0.1 - xml2js@0.6.0: + xml2js@0.6.2: dependencies: sax: 1.4.1 xmlbuilder: 11.0.1