├── .nvmrc ├── android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── splash.png │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-land-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-hdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-mdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-land-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── drawable-port-xxxhdpi │ │ │ │ │ └── splash.png │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── xml │ │ │ │ │ ├── config.xml │ │ │ │ │ └── file_paths.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── layout │ │ │ │ │ └── activity_main.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── jeep │ │ │ │ │ └── app │ │ │ │ │ └── vue │ │ │ │ │ └── hook │ │ │ │ │ └── sqlite │ │ │ │ │ └── MainActivity.java │ │ │ ├── assets │ │ │ │ ├── capacitor.plugins.json │ │ │ │ └── capacitor.config.json │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── getcapacitor │ │ │ │ └── myapp │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── getcapacitor │ │ │ └── myapp │ │ │ └── ExampleInstrumentedTest.java │ ├── capacitor.build.gradle │ ├── proguard-rules.pro │ └── build.gradle ├── .idea │ ├── .gitignore │ ├── compiler.xml │ ├── misc.xml │ ├── deploymentTargetDropDown.xml │ └── jarRepositories.xml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── variables.gradle ├── build.gradle ├── capacitor.settings.gradle ├── gradle.properties ├── .gitignore ├── gradlew.bat └── gradlew ├── .browserslistrc ├── cypress.json ├── babel.config.js ├── electron ├── assets │ ├── appIcon.ico │ ├── appIcon.png │ ├── splash.gif │ └── splash.png ├── src │ ├── preload.ts │ ├── rt │ │ ├── electron-plugins.js │ │ └── electron-rt.ts │ └── index.ts ├── .gitignore ├── resources │ └── electron-publisher-custom.js ├── tsconfig.json ├── electron-builder.config.json ├── capacitor.config.ts ├── package.json └── live-runner.js ├── ios ├── App │ ├── App │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ ├── AppIcon-20x20@1x.png │ │ │ │ ├── AppIcon-20x20@2x.png │ │ │ │ ├── AppIcon-20x20@3x.png │ │ │ │ ├── AppIcon-29x29@1x.png │ │ │ │ ├── AppIcon-29x29@2x.png │ │ │ │ ├── AppIcon-29x29@3x.png │ │ │ │ ├── AppIcon-40x40@1x.png │ │ │ │ ├── AppIcon-40x40@2x.png │ │ │ │ ├── AppIcon-40x40@3x.png │ │ │ │ ├── AppIcon-60x60@2x.png │ │ │ │ ├── AppIcon-60x60@3x.png │ │ │ │ ├── AppIcon-76x76@1x.png │ │ │ │ ├── AppIcon-76x76@2x.png │ │ │ │ ├── AppIcon-20x20@2x-1.png │ │ │ │ ├── AppIcon-29x29@2x-1.png │ │ │ │ ├── AppIcon-40x40@2x-1.png │ │ │ │ ├── AppIcon-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ │ └── Splash.imageset │ │ │ │ ├── splash-2732x2732.png │ │ │ │ ├── splash-2732x2732-1.png │ │ │ │ ├── splash-2732x2732-2.png │ │ │ │ └── Contents.json │ │ ├── config.xml │ │ ├── capacitor.config.json │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ ├── Info.plist │ │ └── AppDelegate.swift │ ├── App.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── App.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Podfile └── .gitignore ├── public ├── assets │ ├── icon │ │ ├── icon.png │ │ └── favicon.png │ ├── databases │ │ ├── databases.json │ │ ├── dbForCopy.db │ │ └── myDBSQLite.db │ └── shapes.svg └── index.html ├── ionic.config.json ├── src ├── shims-vue.d.ts ├── composables │ └── state.ts ├── utils │ ├── utils-db-encrypted.ts │ ├── utils-delete-db.ts │ ├── utils-db-encrypted-set.ts │ ├── base64images.ts │ ├── utils-db-execute-set.ts │ ├── utils-db-no-encryption.ts │ └── utils-update-version.ts ├── views │ ├── Tab1Page.vue │ ├── TabsPage.vue │ ├── NotFound.vue │ ├── NCDatabase.vue │ ├── DatabaseMigrate.vue │ ├── DatabaseTwoDbs.vue │ ├── DatabaseToEncrypt.vue │ ├── DatabaseTransaction.vue │ ├── DatabaseNoEncryption.vue │ ├── DatabaseCopyFromAssets.vue │ ├── DatabaseJsonListeners.vue │ ├── DatabaseExistingConn.vue │ ├── DatabaseJsonImportIssue177.vue │ ├── DatabaseJsonImportIssue192.vue │ ├── DatabaseJsonImportExport.vue │ ├── Tab3Page.vue │ └── Tab2Page.vue ├── components │ ├── ExploreContainer.vue │ ├── ModalJsonMessages.vue │ ├── LoadingSpinner.vue │ ├── TransactionTest.vue │ ├── JsonImportIssue177.vue │ ├── JsonImportIssue192.vue │ ├── CopyFromAssetsTest.vue │ ├── NonConfDB.vue │ ├── ExistingConnTest.vue │ └── TwoDbsTest.vue ├── App.vue ├── main.ts └── router │ └── index.ts ├── tests ├── e2e │ ├── .eslintrc.js │ ├── specs │ │ └── test.js │ ├── support │ │ ├── index.js │ │ └── commands.js │ └── plugins │ │ └── index.js └── unit │ └── example.spec.ts ├── jest.config.js ├── .gitignore ├── .eslintrc.js ├── tsconfig.json ├── capacitor.config.ts ├── LICENSE ├── package.json ├── CODE_OF_CONDUCT.md └── README.md /.nvmrc: -------------------------------------------------------------------------------- 1 | v16.3 2 | -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/* 2 | !/build/.npmkeep 3 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /electron/assets/appIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/electron/assets/appIcon.ico -------------------------------------------------------------------------------- /electron/assets/appIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/electron/assets/appIcon.png -------------------------------------------------------------------------------- /electron/assets/splash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/electron/assets/splash.gif -------------------------------------------------------------------------------- /electron/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/electron/assets/splash.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /public/assets/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/public/assets/icon/icon.png -------------------------------------------------------------------------------- /public/assets/icon/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/public/assets/icon/favicon.png -------------------------------------------------------------------------------- /public/assets/databases/databases.json: -------------------------------------------------------------------------------- 1 | { 2 | "databaseList" : [ 3 | "dbForCopy.db", 4 | "myDBSQLite.db" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /public/assets/databases/dbForCopy.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/public/assets/databases/dbForCopy.db -------------------------------------------------------------------------------- /public/assets/databases/myDBSQLite.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/public/assets/databases/myDBSQLite.db -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-sqlite-app-starter", 3 | "integrations": { 4 | "capacitor": {} 5 | }, 6 | "type": "vue" 7 | } 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable/splash.png -------------------------------------------------------------------------------- /electron/src/preload.ts: -------------------------------------------------------------------------------- 1 | require('./rt/electron-rt'); 2 | ////////////////////////////// 3 | // User Defined Preload scripts below 4 | console.log('User Preload!'); 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-land-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-land-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-land-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-port-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-port-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-port-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-land-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-land-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-port-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-port-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/drawable-port-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { defineComponent } from 'vue' 3 | const component: ReturnType 4 | export default component 5 | } 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | App/build 2 | App/Pods 3 | App/Podfile.lock 4 | App/App/public 5 | DerivedData 6 | xcuserdata 7 | 8 | # Cordova plugins for Capacitor 9 | capacitor-cordova-ios-plugins 10 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jepiqueau/vue-sqlite-app-starter/HEAD/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /electron/.gitignore: -------------------------------------------------------------------------------- 1 | # NPM renames .gitignore to .npmignore 2 | # In order to prevent that, we remove the initial "." 3 | # And the CLI then renames it 4 | app 5 | node_modules 6 | build 7 | dist 8 | logs 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/jeep/app/vue/hook/sqlite/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.jeep.app.vue.hook.sqlite; 2 | 3 | import com.getcapacitor.BridgeActivity; 4 | 5 | public class MainActivity extends BridgeActivity {} 6 | -------------------------------------------------------------------------------- /ios/App/App/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/e2e/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | 'cypress' 4 | ], 5 | env: { 6 | mocha: true, 7 | 'cypress/globals': true 8 | }, 9 | rules: { 10 | strict: 'off' 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', 3 | transformIgnorePatterns: ['/node_modules/(?!@ionic/vue|@ionic/vue-router|@ionic/core|@stencil/core|ionicons)'] 4 | } 5 | -------------------------------------------------------------------------------- /ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':capacitor-cordova-android-plugins' 3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') 4 | 5 | apply from: 'capacitor.settings.gradle' -------------------------------------------------------------------------------- /android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /tests/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('Visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'Welcome to Your Vue.js + TypeScript App') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /electron/src/rt/electron-plugins.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const CapacitorCommunitySqlite = require('../../../node_modules/@capacitor-community/sqlite/electron/dist/plugin.js'); 3 | 4 | module.exports = { 5 | CapacitorCommunitySqlite, 6 | } -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/composables/state.ts: -------------------------------------------------------------------------------- 1 | import { readonly, ref } from 'vue'; 2 | 3 | // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types 4 | export function useState(initialState: any): any { 5 | const state = ref(initialState); 6 | const setState = (newState: any) => { 7 | state.value = newState; 8 | }; 9 | 10 | return [readonly(state), setState]; 11 | } -------------------------------------------------------------------------------- /electron/resources/electron-publisher-custom.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /* eslint-disable @typescript-eslint/no-var-requires */ 3 | const electronPublish = require('electron-publish'); 4 | 5 | class Publisher extends electronPublish.Publisher { 6 | async upload(task) { 7 | console.log('electron-publisher-custom', task.file); 8 | } 9 | } 10 | module.exports = Publisher; 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vue-sqlite-app-starter 4 | vue-sqlite-app-starter 5 | com.jeep.app.vue.hook.sqlite 6 | com.jeep.app.vue.hook.sqlite 7 | 8 | -------------------------------------------------------------------------------- /tests/unit/example.spec.ts: -------------------------------------------------------------------------------- 1 | import { shallowMount } from '@vue/test-utils' 2 | import HelloWorld from '@/components/HelloWorld.vue' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('renders props.msg when passed', () => { 6 | const msg = 'new message' 7 | const wrapper = shallowMount(HelloWorld, { 8 | props: { msg } 9 | }) 10 | expect(wrapper.text()).toMatch(msg) 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /electron/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "include": ["./src/**/*", "./capacitor.config.ts", "./capacitor.config.js"], 4 | "compilerOptions": { 5 | "outDir": "./build", 6 | "importHelpers": true, 7 | "target": "ES2017", 8 | "module": "CommonJS", 9 | "moduleResolution": "node", 10 | "esModuleInterop": true, 11 | "typeRoots": ["./node_modules/@types"], 12 | "allowJs": true, 13 | "rootDir": "." 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | .tmp 7 | *.tmp 8 | *.tmp.* 9 | *.sublime-project 10 | *.sublime-workspace 11 | .DS_Store 12 | Thumbs.db 13 | UserInterfaceState.xcuserstate 14 | $RECYCLE.BIN/ 15 | 16 | *.log 17 | log.txt 18 | npm-debug.log* 19 | 20 | /.idea 21 | /.ionic 22 | /.sass-cache 23 | /.sourcemaps 24 | /.versions 25 | /.vscode 26 | /coverage 27 | /dist 28 | /node_modules 29 | /platforms 30 | /plugins 31 | /www 32 | -------------------------------------------------------------------------------- /android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | 14 | @Test 15 | public void addition_isCorrect() throws Exception { 16 | assertEquals(4, 2 + 2); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "splash-2732x2732-2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "splash-2732x2732-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "splash-2732x2732.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /android/variables.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | minSdkVersion = 22 3 | compileSdkVersion = 32 4 | targetSdkVersion = 32 5 | androidxActivityVersion = '1.4.0' 6 | androidxAppCompatVersion = '1.4.2' 7 | androidxCoordinatorLayoutVersion = '1.2.0' 8 | androidxCoreVersion = '1.8.0' 9 | androidxFragmentVersion = '1.4.1' 10 | junitVersion = '4.13.2' 11 | androidxJunitVersion = '1.1.3' 12 | androidxEspressoCoreVersion = '3.4.0' 13 | cordovaAndroidVersion = '10.1.1' 14 | coreSplashScreenVersion = '1.0.0-rc01' 15 | androidxWebkitVersion = '1.4.0' 16 | } -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/utils/utils-db-encrypted.ts: -------------------------------------------------------------------------------- 1 | export const createTablesEncrypted = ` 2 | CREATE TABLE IF NOT EXISTS contacts ( 3 | id INTEGER PRIMARY KEY NOT NULL, 4 | email TEXT UNIQUE NOT NULL, 5 | name TEXT, 6 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 7 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 8 | ); 9 | PRAGMA user_version = 1; 10 | `; 11 | export const createDataEncrypted = ` 12 | DELETE FROM contacts; 13 | INSERT INTO contacts (name,email) VALUES ("Whiteley","Whiteley.com"); 14 | INSERT INTO contacts (name,email) VALUES ("Jones","Jones.com"); 15 | `; 16 | 17 | -------------------------------------------------------------------------------- /android/.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/utils/utils-delete-db.ts: -------------------------------------------------------------------------------- 1 | import { SQLiteDBConnection } from '@capacitor-community/sqlite'; 2 | 3 | export async function deleteDatabase(db: SQLiteDBConnection): Promise { 4 | try { 5 | const ret: any = await db.isExists(); 6 | if(ret.result) { 7 | const dbName = db.getConnectionDBName(); 8 | console.log("$$$ database " + dbName + " before delete"); 9 | await db.delete(); 10 | console.log("$$$ database " + dbName + " after delete " + ret.result); 11 | return Promise.resolve(); 12 | } else { 13 | return Promise.resolve(); 14 | } 15 | } catch (err) { 16 | return Promise.reject(err); 17 | } 18 | } -------------------------------------------------------------------------------- /electron/electron-builder.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.yourdoamnin.yourapp", 3 | "directories": { 4 | "buildResources": "resources" 5 | }, 6 | "files": [ 7 | "assets/**/*", 8 | "build/**/*", 9 | "capacitor.config.*", 10 | "app/**/*" 11 | ], 12 | "publish": { 13 | "provider": "github" 14 | }, 15 | "nsis": { 16 | "allowElevation": true, 17 | "oneClick": false, 18 | "allowToChangeInstallationDirectory": true 19 | }, 20 | "win": { 21 | "target": "nsis", 22 | "icon": "assets/appIcon.ico" 23 | }, 24 | "mac": { 25 | "category": "your.app.category.type", 26 | "target": "dmg" 27 | } 28 | } -------------------------------------------------------------------------------- /tests/e2e/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /android/app/src/main/assets/capacitor.plugins.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pkg": "@capacitor-community/sqlite", 4 | "classpath": "com.getcapacitor.community.database.sqlite.CapacitorSQLitePlugin" 5 | }, 6 | { 7 | "pkg": "@capacitor/app", 8 | "classpath": "com.capacitorjs.plugins.app.AppPlugin" 9 | }, 10 | { 11 | "pkg": "@capacitor/dialog", 12 | "classpath": "com.capacitorjs.plugins.dialog.DialogPlugin" 13 | }, 14 | { 15 | "pkg": "@capacitor/haptics", 16 | "classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin" 17 | }, 18 | { 19 | "pkg": "@capacitor/keyboard", 20 | "classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin" 21 | }, 22 | { 23 | "pkg": "@capacitor/status-bar", 24 | "classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin" 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:7.2.2' 11 | classpath 'com.google.gms:google-services:4.3.13' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | apply from: "variables.gradle" 19 | 20 | allprojects { 21 | repositories { 22 | google() 23 | mavenCentral() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | 31 | -------------------------------------------------------------------------------- /android/app/capacitor.build.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | 3 | android { 4 | compileOptions { 5 | sourceCompatibility JavaVersion.VERSION_11 6 | targetCompatibility JavaVersion.VERSION_11 7 | } 8 | } 9 | 10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" 11 | dependencies { 12 | implementation project(':capacitor-community-sqlite') 13 | implementation project(':capacitor-app') 14 | implementation project(':capacitor-dialog') 15 | implementation project(':capacitor-haptics') 16 | implementation project(':capacitor-keyboard') 17 | implementation project(':capacitor-status-bar') 18 | 19 | } 20 | 21 | 22 | if (hasProperty('postBuildExtras')) { 23 | postBuildExtras() 24 | } 25 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/typescript/recommended' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 2020 13 | }, 14 | rules: { 15 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 16 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 17 | 'vue/no-deprecated-slot-attribute': 'off', 18 | '@typescript-eslint/no-explicit-any': 'off', 19 | }, 20 | overrides: [ 21 | { 22 | files: [ 23 | '**/__tests__/*.{j,t}s?(x)', 24 | '**/tests/unit/**/*.spec.{j,t}s?(x)' 25 | ], 26 | env: { 27 | jest: true 28 | } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /src/views/Tab1Page.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /src/components/ExploreContainer.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 17 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "skipLibCheck": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "sourceMap": true, 13 | "baseUrl": ".", 14 | "types": [ 15 | "webpack-env", 16 | "jest" 17 | ], 18 | "paths": { 19 | "@/*": [ 20 | "src/*" 21 | ] 22 | }, 23 | "lib": [ 24 | "esnext", 25 | "dom", 26 | "dom.iterable", 27 | "scripthost" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.tsx", 33 | "src/**/*.vue", 34 | "tests/**/*.ts", 35 | "tests/**/*.tsx", 36 | "./capacitor.config.ts", 37 | "./capacitor.config.js" 38 | ], 39 | "exclude": [ 40 | "node_modules" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.getcapacitor.myapp; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import android.content.Context; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | import androidx.test.platform.app.InstrumentationRegistry; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * @see Testing documentation 15 | */ 16 | @RunWith(AndroidJUnit4.class) 17 | public class ExampleInstrumentedTest { 18 | 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 23 | 24 | assertEquals("com.getcapacitor.app", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/App/App/capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.jeep.app.vue.hook.sqlite", 3 | "appName": "vue-sqlite-app-starter", 4 | "webDir": "dist", 5 | "bundledWebRuntime": false, 6 | "plugins": { 7 | "CapacitorSQLite": { 8 | "iosDatabaseLocation": "Library/CapacitorDatabase", 9 | "iosIsEncryption": true, 10 | "iosKeychainPrefix": "vue-sqlite-app-starter", 11 | "iosBiometric": { 12 | "biometricAuth": false, 13 | "biometricTitle": "Biometric login for capacitor sqlite" 14 | }, 15 | "androidIsEncryption": true, 16 | "androidBiometric": { 17 | "biometricAuth": false, 18 | "biometricTitle": "Biometric login for capacitor sqlite", 19 | "biometricSubTitle": "Log in using your biometric" 20 | }, 21 | "electronWindowsLocation": "C:\\ProgramData\\CapacitorDatabases", 22 | "electronMacLocation": "/Volumes/Development_Lacie/Development/CapacitorDatabases", 23 | "electronLinuxLocation": "Databases" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/e2e/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This is will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /android/app/src/main/assets/capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.jeep.app.vue.hook.sqlite", 3 | "appName": "vue-sqlite-app-starter", 4 | "webDir": "dist", 5 | "bundledWebRuntime": false, 6 | "plugins": { 7 | "CapacitorSQLite": { 8 | "iosDatabaseLocation": "Library/CapacitorDatabase", 9 | "iosIsEncryption": true, 10 | "iosKeychainPrefix": "vue-sqlite-app-starter", 11 | "iosBiometric": { 12 | "biometricAuth": false, 13 | "biometricTitle": "Biometric login for capacitor sqlite" 14 | }, 15 | "androidIsEncryption": true, 16 | "androidBiometric": { 17 | "biometricAuth": false, 18 | "biometricTitle": "Biometric login for capacitor sqlite", 19 | "biometricSubTitle": "Log in using your biometric" 20 | }, 21 | "electronWindowsLocation": "C:\\ProgramData\\CapacitorDatabases", 22 | "electronMacLocation": "/Volumes/Development_Lacie/Development/CapacitorDatabases", 23 | "electronLinuxLocation": "Databases" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ionic App 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/e2e/plugins/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable arrow-body-style */ 2 | // https://docs.cypress.io/guides/guides/plugins-guide.html 3 | 4 | // if you need a custom webpack configuration you can uncomment the following import 5 | // and then use the `file:preprocessor` event 6 | // as explained in the cypress docs 7 | // https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples 8 | 9 | // /* eslint-disable import/no-extraneous-dependencies, global-require */ 10 | // const webpack = require('@cypress/webpack-preprocessor') 11 | 12 | module.exports = (on, config) => { 13 | // on('file:preprocessor', webpack({ 14 | // webpackOptions: require('@vue/cli-service/webpack.config'), 15 | // watchOptions: {} 16 | // })) 17 | 18 | return Object.assign({}, config, { 19 | fixturesFolder: 'tests/e2e/fixtures', 20 | integrationFolder: 'tests/e2e/specs', 21 | screenshotsFolder: 'tests/e2e/screenshots', 22 | videosFolder: 'tests/e2e/videos', 23 | supportFile: 'tests/e2e/support/index.js' 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /android/capacitor.settings.gradle: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN 2 | include ':capacitor-android' 3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') 4 | 5 | include ':capacitor-community-sqlite' 6 | project(':capacitor-community-sqlite').projectDir = new File('../node_modules/@capacitor-community/sqlite/android') 7 | 8 | include ':capacitor-app' 9 | project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android') 10 | 11 | include ':capacitor-dialog' 12 | project(':capacitor-dialog').projectDir = new File('../node_modules/@capacitor/dialog/android') 13 | 14 | include ':capacitor-haptics' 15 | project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android') 16 | 17 | include ':capacitor-keyboard' 18 | project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android') 19 | 20 | include ':capacitor-status-bar' 21 | project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') 22 | -------------------------------------------------------------------------------- /capacitor.config.ts: -------------------------------------------------------------------------------- 1 | import { CapacitorConfig } from '@capacitor/cli'; 2 | 3 | const config: CapacitorConfig = { 4 | appId: 'com.jeep.app.vue.hook.sqlite', 5 | appName: 'vue-sqlite-app-starter', 6 | webDir: 'dist', 7 | bundledWebRuntime: false, 8 | plugins: { 9 | CapacitorSQLite: { 10 | iosDatabaseLocation: 'Library/CapacitorDatabase', 11 | iosIsEncryption: true, 12 | iosKeychainPrefix: 'vue-sqlite-app-starter', 13 | iosBiometric: { 14 | biometricAuth: false, 15 | biometricTitle : "Biometric login for capacitor sqlite" 16 | }, 17 | androidIsEncryption: true, 18 | androidBiometric: { 19 | biometricAuth : false, 20 | biometricTitle : "Biometric login for capacitor sqlite", 21 | biometricSubTitle : "Log in using your biometric" 22 | }, 23 | electronWindowsLocation: "C:\\ProgramData\\CapacitorDatabases", 24 | electronMacLocation: "/Volumes/Development_Lacie/Development/CapacitorDatabases", 25 | electronLinuxLocation: "Databases" 26 | } 27 | } 28 | }; 29 | 30 | export default config; 31 | -------------------------------------------------------------------------------- /electron/capacitor.config.ts: -------------------------------------------------------------------------------- 1 | import { CapacitorConfig } from '@capacitor/cli'; 2 | 3 | const config: CapacitorConfig = { 4 | appId: 'com.jeep.app.vue.hook.sqlite', 5 | appName: 'vue-sqlite-app-starter', 6 | webDir: 'dist', 7 | bundledWebRuntime: false, 8 | plugins: { 9 | CapacitorSQLite: { 10 | iosDatabaseLocation: 'Library/CapacitorDatabase', 11 | iosIsEncryption: true, 12 | iosKeychainPrefix: 'vue-sqlite-app-starter', 13 | iosBiometric: { 14 | biometricAuth: false, 15 | biometricTitle : "Biometric login for capacitor sqlite" 16 | }, 17 | androidIsEncryption: true, 18 | androidBiometric: { 19 | biometricAuth : false, 20 | biometricTitle : "Biometric login for capacitor sqlite", 21 | biometricSubTitle : "Log in using your biometric" 22 | }, 23 | electronWindowsLocation: "C:\\ProgramData\\CapacitorDatabases", 24 | electronMacLocation: "/Volumes/Development_Lacie/Development/CapacitorDatabases", 25 | electronLinuxLocation: "Databases" 26 | } 27 | } 28 | }; 29 | 30 | export default config; 31 | -------------------------------------------------------------------------------- /ios/App/App/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 QUEAU Jean Pierre 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /public/assets/shapes.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | 19 | # AndroidX package structure to make it clearer which packages are bundled with the 20 | # Android operating system, and which are packaged with your app's APK 21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 22 | android.useAndroidX=true 23 | # Automatically convert third-party libraries to use AndroidX 24 | android.enableJetifier=true 25 | -------------------------------------------------------------------------------- /ios/App/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' 2 | 3 | platform :ios, '13.0' 4 | use_frameworks! 5 | 6 | # workaround to avoid Xcode caching of Pods that requires 7 | # Product -> Clean Build Folder after new Cordova plugins installed 8 | # Requires CocoaPods 1.6 or newer 9 | install! 'cocoapods', :disable_input_output_paths => true 10 | 11 | def capacitor_pods 12 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' 13 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' 14 | pod 'CapacitorCommunitySqlite', :path => '../../node_modules/@capacitor-community/sqlite' 15 | pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' 16 | pod 'CapacitorDialog', :path => '../../node_modules/@capacitor/dialog' 17 | pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' 18 | pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' 19 | pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' 20 | end 21 | 22 | target 'App' do 23 | capacitor_pods 24 | # Add your Pods here 25 | end 26 | 27 | 28 | post_install do |installer| 29 | assertDeploymentTarget(installer) 30 | end 31 | -------------------------------------------------------------------------------- /src/views/TabsPage.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /src/views/NotFound.vue: -------------------------------------------------------------------------------- 1 | 25 | 36 | -------------------------------------------------------------------------------- /src/views/NCDatabase.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseMigrate.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseTwoDbs.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /android/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | -------------------------------------------------------------------------------- /src/views/DatabaseToEncrypt.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseTransaction.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseNoEncryption.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseCopyFromAssets.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseJsonListeners.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseExistingConn.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseJsonImportIssue177.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseJsonImportIssue192.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /src/views/DatabaseJsonImportExport.vue: -------------------------------------------------------------------------------- 1 | 25 | 38 | -------------------------------------------------------------------------------- /electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-sqlite-app-starter", 3 | "version": "1.0.0", 4 | "description": "An Amazing Capacitor App", 5 | "author": { 6 | "name": "", 7 | "email": "" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/jepiqueau/vue-sqlite-app-starter.git" 12 | }, 13 | "license": "MIT", 14 | "main": "build/src/index.js", 15 | "scripts": { 16 | "build": "tsc && electron-rebuild", 17 | "electron:start-live": "node ./live-runner.js", 18 | "electron:start": "npm run build && electron --inspect=5858 ./", 19 | "electron:pack": "npm run build && electron-builder build --dir -c ./electron-builder.config.json", 20 | "electron:make": "npm run build && electron-builder build -c ./electron-builder.config.json -p always" 21 | }, 22 | "dependencies": { 23 | "@capacitor-community/electron": "^4.1.2", 24 | "@capacitor-community/sqlite": "^4.6.1-2", 25 | "chokidar": "~3.5.3", 26 | "electron-is-dev": "~2.0.0", 27 | "electron-serve": "~1.1.0", 28 | "electron-unhandled": "~4.0.1", 29 | "electron-updater": "~5.0.1", 30 | "electron-window-state": "~5.0.3", 31 | "jszip": "^3.10.1", 32 | "node-fetch": "2.6.7", 33 | "sqlite3": "^5.1.4" 34 | }, 35 | "devDependencies": { 36 | "@types/sqlite3": "^3.1.8", 37 | "electron": "^22.0.0", 38 | "electron-builder": "^22.10.3", 39 | "electron-rebuild": "^3.2.7", 40 | "typescript": "~4.3.5" 41 | }, 42 | "keywords": [ 43 | "capacitor", 44 | "electron" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/App/App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | vue-sqlite-app-starter 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 53 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore 2 | 3 | # Built application files 4 | *.apk 5 | *.aar 6 | *.ap_ 7 | *.aab 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | # Uncomment the following line in case you need and you don't have the release build type files in your app 20 | # release/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | 29 | # Proguard folder generated by Eclipse 30 | proguard/ 31 | 32 | # Log Files 33 | *.log 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | 38 | # Android Studio captures folder 39 | captures/ 40 | 41 | # IntelliJ 42 | *.iml 43 | .idea/workspace.xml 44 | .idea/tasks.xml 45 | .idea/gradle.xml 46 | .idea/assetWizardSettings.xml 47 | .idea/dictionaries 48 | .idea/libraries 49 | # Android Studio 3 in .gitignore file. 50 | .idea/caches 51 | .idea/modules.xml 52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 53 | .idea/navEditor.xml 54 | 55 | # Keystore files 56 | # Uncomment the following lines if you do not want to check your keystore files in. 57 | #*.jks 58 | #*.keystore 59 | 60 | # External native build folder generated in Android Studio 2.2 and later 61 | .externalNativeBuild 62 | .cxx/ 63 | 64 | # Google Services (e.g. APIs or Firebase) 65 | # google-services.json 66 | 67 | # Freeline 68 | freeline.py 69 | freeline/ 70 | freeline_project_description.json 71 | 72 | # fastlane 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | fastlane/readme.md 78 | 79 | # Version control 80 | vcs.xml 81 | 82 | # lint 83 | lint/intermediates/ 84 | lint/generated/ 85 | lint/outputs/ 86 | lint/tmp/ 87 | # lint/reports/ 88 | 89 | # Android Profiling 90 | *.hprof 91 | 92 | # Cordova plugins for Capacitor 93 | capacitor-cordova-android-plugins 94 | 95 | # Copied web assets 96 | app/src/main/assets/public 97 | -------------------------------------------------------------------------------- /ios/App/App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /electron/live-runner.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /* eslint-disable @typescript-eslint/no-var-requires */ 3 | const cp = require('child_process'); 4 | const chokidar = require('chokidar'); 5 | const electron = require('electron'); 6 | 7 | let child = null; 8 | const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm'; 9 | const reloadWatcher = { 10 | debouncer: null, 11 | ready: false, 12 | watcher: null, 13 | restarting: false, 14 | }; 15 | 16 | ///* 17 | function runBuild() { 18 | return new Promise((resolve, _reject) => { 19 | let tempChild = cp.spawn(npmCmd, ['run', 'build']); 20 | tempChild.once('exit', () => { 21 | resolve(); 22 | }); 23 | tempChild.stdout.pipe(process.stdout); 24 | }); 25 | } 26 | //*/ 27 | 28 | async function spawnElectron() { 29 | if (child !== null) { 30 | child.stdin.pause(); 31 | child.kill(); 32 | child = null; 33 | await runBuild(); 34 | } 35 | child = cp.spawn(electron, ['--inspect=5858', './']); 36 | child.on('exit', () => { 37 | if (!reloadWatcher.restarting) { 38 | process.exit(0); 39 | } 40 | }); 41 | child.stdout.pipe(process.stdout); 42 | } 43 | 44 | function setupReloadWatcher() { 45 | reloadWatcher.watcher = chokidar 46 | .watch('./src/**/*', { 47 | ignored: /[/\\]\./, 48 | persistent: true, 49 | }) 50 | .on('ready', () => { 51 | reloadWatcher.ready = true; 52 | }) 53 | .on('all', (_event, _path) => { 54 | if (reloadWatcher.ready) { 55 | clearTimeout(reloadWatcher.debouncer); 56 | reloadWatcher.debouncer = setTimeout(async () => { 57 | console.log('Restarting'); 58 | reloadWatcher.restarting = true; 59 | await spawnElectron(); 60 | reloadWatcher.restarting = false; 61 | reloadWatcher.ready = false; 62 | clearTimeout(reloadWatcher.debouncer); 63 | reloadWatcher.debouncer = null; 64 | reloadWatcher.watcher = null; 65 | setupReloadWatcher(); 66 | }, 500); 67 | } 68 | }); 69 | } 70 | 71 | (async () => { 72 | await runBuild(); 73 | await spawnElectron(); 74 | setupReloadWatcher(); 75 | })(); 76 | -------------------------------------------------------------------------------- /src/components/ModalJsonMessages.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 54 | -------------------------------------------------------------------------------- /src/components/LoadingSpinner.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 78 | 79 | 85 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion rootProject.ext.compileSdkVersion 5 | defaultConfig { 6 | applicationId "com.jeep.app.vue.hook.sqlite" 7 | minSdkVersion rootProject.ext.minSdkVersion 8 | targetSdkVersion rootProject.ext.targetSdkVersion 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | aaptOptions { 13 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. 14 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 15 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' 16 | } 17 | } 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | } 25 | 26 | repositories { 27 | flatDir{ 28 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' 29 | } 30 | } 31 | 32 | dependencies { 33 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" 34 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" 35 | implementation fileTree(include: ['*.jar'], dir: 'libs') 36 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" 37 | implementation project(':capacitor-android') 38 | testImplementation "junit:junit:$junitVersion" 39 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" 40 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" 41 | implementation project(':capacitor-cordova-android-plugins') 42 | } 43 | 44 | apply from: 'capacitor.build.gradle' 45 | 46 | try { 47 | def servicesJSON = file('google-services.json') 48 | if (servicesJSON.text) { 49 | apply plugin: 'com.google.gms.google-services' 50 | } 51 | } catch(Exception e) { 52 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") 53 | } 54 | -------------------------------------------------------------------------------- /src/utils/utils-db-encrypted-set.ts: -------------------------------------------------------------------------------- 1 | import { capSQLiteSet } from '@capacitor-community/sqlite'; 2 | export const createSchemaContacts = ` 3 | CREATE TABLE IF NOT EXISTS contacts ( 4 | id INTEGER PRIMARY KEY NOT NULL, 5 | email TEXT UNIQUE NOT NULL, 6 | name TEXT, 7 | FirstName TEXT, 8 | company TEXT, 9 | size REAL, 10 | age INTEGER, 11 | MobileNumber TEXT, 12 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 13 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 14 | ); 15 | CREATE INDEX IF NOT EXISTS contacts_index_name ON contacts (name); 16 | CREATE INDEX IF NOT EXISTS contacts_index_email ON contacts (email); 17 | PRAGMA user_version = 1; 18 | `; 19 | export const setContacts: Array = [ 20 | { statement:"INSERT INTO contacts (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 21 | values:["Simpson","Tom","Simpson@example.com",69,"4405060708"] 22 | }, 23 | { statement:"INSERT INTO contacts (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 24 | values:["Jones","David","Jones@example.com",42,"4404030201"] 25 | }, 26 | { statement:"INSERT INTO contacts (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 27 | values:["Whiteley","Dave","Whiteley@example.com",45,"4405162732"] 28 | }, 29 | { statement:"INSERT INTO contacts (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 30 | values:["Brown","John","Brown@example.com",35,"4405243853"] 31 | }, 32 | { statement:"UPDATE contacts SET age = ? , MobileNumber = ? WHERE id = ?;", 33 | values:[51,"4404030202",2] 34 | } 35 | ]; 36 | export const createSchemaMessages = ` 37 | CREATE TABLE IF NOT EXISTS messages ( 38 | id INTEGER PRIMARY KEY NOT NULL, 39 | contactid INTEGER, 40 | title TEXT NOT NULL, 41 | body TEXT NOT NULL, 42 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 43 | last_modified INTEGER DEFAULT (strftime('%s', 'now')), 44 | FOREIGN KEY (contactid) REFERENCES contacts(id) ON DELETE SET DEFAULT 45 | ); 46 | CREATE INDEX IF NOT EXISTS messages_index_name ON messages (title); 47 | CREATE INDEX IF NOT EXISTS messages_index_last_modified ON messages (last_modified); 48 | ` 49 | export const setMessages: Array = [ 50 | { statement:"INSERT INTO messages (contactid,title,body) VALUES (?,?,?);", 51 | values:[1,"message 1","body message1"] 52 | }, 53 | { statement:"INSERT INTO messages (contactid,title,body) VALUES (?,?,?);", 54 | values:[2,"message 2","body message2"] 55 | }, 56 | { statement:"INSERT INTO messages (contactid,title,body) VALUES (?,?,?);", 57 | values:[1,"message 3","body message3"] 58 | }, 59 | ] -------------------------------------------------------------------------------- /src/utils/base64images.ts: -------------------------------------------------------------------------------- 1 | export const Images: Array = [ 2 | "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAkCAYAAAD7PHgWAAAEcElEQVRYR8WYP2hTQRzHfx10aQchi0JcLGpBSBcrlTrpIjoFiy6FDipOHVz8Q0HrUGxdg1N1KBRBackiVoQ6FMVIuzQgpEpdjOiSLUXQIfK9976X37t3l6RNxVuS3Hvv7nPf3+/3vcvraTQaDdlFK4z3yMT8rh7d0Ww97QAzfX12wFq9br4buOk7UpicaQm5F4toCajh9LKnLm23Bex0Ee3k7ArwS/mVvH5elqEzzWmGr0dhDwGGFs3ouMAdA7491y+Dhw5KZuG9UEEA1r6XZfhUPOxgQ0pzPQJIDTi11NtOKOkKkHCcpfDrjQlxaXnGdFE1fAcg2to7sWmgAfVYWCzbPwO06imNHt0Tyd/IyfDlrYRy7kI3fvyUsyvRPbsCxIPIGQ6MAdFWD5RbKnjxZhTSWn0+AqyuS2agEPWNjZhPjrUngBgQkABDQ3hNOJdnmvkXa5UZ6W2CxXBaRoBiLLR2cLgnUSRIbOSLlptVx8LQk7k5iHutah44Pks12+VfApBVh04YsAbV1yR7sslYXU+oSPUK46NWZWPmseJdATLfTJ5UJsxYBNXqoc+EeX7RgpbmRmX1pcjsSq95VkP5AM1czMl63ViS27iNen2QYSUoH+bWVq1WpTh5OAFp1ekbtz7JRVJBPH/+Sk6O5i4YQCxc57Sbq0i1loA2R6hKfDho7rFLqZWzYvXiqCKgSi/6LSC+o7l2ZCIWz5UChHqfH2alvPVVRp/sT4Q7P/1NstmssZ6okNKAyD803+5BICjohjm90qgnAajhcNEHiP7BgQHZqFQkK49FF40uDtyHrZAKEQ6/NWDIoAkcBAQcmpuHoZWG+l1IwlHBjgGp3rP1zchi4kpG3vi+7wQUkMgz5p8tKIwdnzHbhtiatALTRcLvtBnmmc/ANQCuo3JxLGMF6+tmHFUULqgJsUl6Bwy/jXr1elQUWlGnj37JyfQksBhWL/tpM/itK9kHanOQ3rd47bcZxxSIkl97ow67u2Lfouh/+l6EnIvXuU5/TNkMAAjnA7RhUf9RQkWkTRhh9TUCuuO6kUooCMBc/xHzzLG71ZYJjAUhPD6TDUERxoXTC7CRiqOXAIRBZ/J5e3/oXxvhdE6FqpA2g+sslFaA3iLRMmvfYz6l8ixWD/3adF0bwXUNiN87gcP9qfOg72jkepVWkIC6ELQZu5BdAWIwbSl6F9AWQEAXRB8GtOpaxa4BCan3Tp3cemJ3G9R+R/g9DbGenDtLCJQVHIL0AeqKb7fFkaWjdzMIrz4+afdvpWKoslks+Lx9YltufQy/hPICUj1OQAOHR9KGeABwAfk6xOeFOmdrxaI5c6Ktffgjs5/4VzV6QRVUkKcafRMHQh8hQ9udPrm4ChJQw7n3EJYp4D0PPl3YlKtjx+0K3UEAiZ3G9T3fATWRd5UJ8cEBCm3o9D47Fc8CKUCEEw/om/kUD7H4zY2e+Vh8UJb8/fTrDt+BA8/rfZ/j63m9gLSYUHL7Ks99ndZpdYZew3Fub4hbVd3/uvYXfqiMwjPten8AAAAASUVORK5CYII=", 3 | "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAU1QTFRFNjtAQEVK////bG9zSk9T/v7+/f39/f3+9vf3O0BETlJWNzxB/Pz8d3t+TFFVzM3O1NXX7u/vUldbRElNs7W3v8HCmZyeRkpPW19j8vLy7u7vvsDC9PT1cHR3Oj9Eo6WnxsjJR0tQOD1Bj5KVgYSHTVFWtri50dLUtLa4YmZqOT5D8vPzRUpOkZOWc3Z64uPjr7Gzuru95+jpX2NnaGxwPkNHp6mrioyPlZeadXh8Q0hNPEBFyszNh4qNc3d6eHx/OD1Cw8XGXGBkfoGEra+xxcbIgoaJu72/m52ggoWIZ2tu8/P0wcLE+vr7kZSXgIOGP0NIvr/BvL6/QUZKP0RJkpWYpKaoqKqtVVldmJqdl5qcZWhstbe5bHB0bnJ1UVVZwsTF5ubnT1RYcHN3oaSm3N3e3NzdQkdLnJ+h9fX1TlNX+Pj47/DwwsPFVFhcEpC44wAAAShJREFUeNq8k0VvxDAQhZOXDS52mRnKzLRlZmZm+v/HxmnUOlFaSz3su4xm/BkGzLn4P+XimOJZyw0FKufelfbfAe89dMmBBdUZ8G1eCJMba69Al+AABOOm/7j0DDGXtQP9bXjYN2tWGQfyA1Yg1kSu95x9GKHiIOBXLcAwUD1JJSBVfUbwGGi2AIvoneK4bCblSS8b0RwwRAPbCHx52kH60K1b9zQUjQKiULbMDbulEjGha/RQQFDE0/ezW8kR3C3kOJXmFcSyrcQR7FDAi55nuGABZkT5hqpk3xughDN7FOHHHd0LLU9qtV7r7uhsuRwt6pEJJFVLN4V5CT+SErpXt81DbHautkpBeHeaqNDRqUA0Uo5GkgXGyI3xDZ/q/wJMsb7/pwADAGqZHDyWkHd1AAAAAElFTkSuQmCC" 4 | ]; 5 | -------------------------------------------------------------------------------- /src/utils/utils-db-execute-set.ts: -------------------------------------------------------------------------------- 1 | export const createTablesExecuteSet = ` 2 | CREATE TABLE IF NOT EXISTS users ( 3 | id INTEGER PRIMARY KEY NOT NULL, 4 | email TEXT UNIQUE NOT NULL, 5 | name TEXT, 6 | FirstName TEXT, 7 | company TEXT, 8 | size REAL, 9 | age INTEGER, 10 | MobileNumber TEXT, 11 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 12 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 13 | ); 14 | CREATE TABLE IF NOT EXISTS messages ( 15 | id INTEGER PRIMARY KEY NOT NULL, 16 | userid INTEGER, 17 | title TEXT NOT NULL, 18 | body TEXT NOT NULL, 19 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 20 | last_modified INTEGER DEFAULT (strftime('%s', 'now')), 21 | FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE 22 | ); 23 | CREATE INDEX IF NOT EXISTS users_index_name ON users (name); 24 | CREATE INDEX IF NOT EXISTS users_index_email ON users (email); 25 | CREATE INDEX IF NOT EXISTS messages_index_name ON messages (userid); 26 | DELETE FROM users; 27 | DELETE FROM messages; 28 | PRAGMA user_version = 1; 29 | PRAGMA foreign_keys = ON; 30 | `; 31 | export const dropTablesTablesExecuteSet = ` 32 | PRAGMA foreign_keys = OFF; 33 | DROP TABLE IF EXISTS users; 34 | DROP TABLE IF EXISTS messages; 35 | PRAGMA foreign_keys = ON; 36 | `; 37 | export const setArrayUsers: Array = [ 38 | { statement:"INSERT INTO users (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 39 | values:["Simpson","Tom","Simpson@example.com",69,"4405060708"] 40 | }, 41 | { statement:"INSERT INTO users (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 42 | values:["Jones","David","Jones@example.com",42,"4404030201"] 43 | }, 44 | { statement:"INSERT INTO users (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 45 | values:["Whiteley","Dave","Whiteley@example.com",45,"4405162732"] 46 | }, 47 | { statement:"INSERT INTO users (name,FirstName,email,age,MobileNumber) VALUES (?,?,?,?,?);", 48 | values:["Brown","John","Brown@example.com",35,"4405243853"] 49 | }, 50 | { statement:"UPDATE users SET age = ? , MobileNumber = ? WHERE id = ?;", 51 | values:[51,"4404030202",2] 52 | } 53 | ]; 54 | export const setArrayMessages: Array = [ 55 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 56 | values:[1,"test message 1","content test message 1"] 57 | }, 58 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 59 | values:[2,"test message 2","content test message 2"] 60 | }, 61 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 62 | values:[1,"test message 3","content test message 3"] 63 | } 64 | ] 65 | 66 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "AppIcon-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "AppIcon-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon-29x29@2x-1.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon-29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon-40x40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon-40x40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon-60x60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon-60x60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "AppIcon-20x20@1x.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "AppIcon-20x20@2x-1.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "AppIcon-29x29@1x.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "AppIcon-29x29@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "AppIcon-40x40@1x.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "AppIcon-40x40@2x-1.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "AppIcon-76x76@1x.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "AppIcon-76x76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "AppIcon-83.5x83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "AppIcon-512@2x.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /electron/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { CapacitorElectronConfig } from '@capacitor-community/electron'; 2 | import { getCapacitorElectronConfig, setupElectronDeepLinking } from '@capacitor-community/electron'; 3 | import type { MenuItemConstructorOptions } from 'electron'; 4 | import { app, MenuItem } from 'electron'; 5 | import electronIsDev from 'electron-is-dev'; 6 | import unhandled from 'electron-unhandled'; 7 | import { autoUpdater } from 'electron-updater'; 8 | 9 | import { ElectronCapacitorApp, setupContentSecurityPolicy, setupReloadWatcher } from './setup'; 10 | 11 | // Graceful handling of unhandled errors. 12 | unhandled(); 13 | 14 | // Define our menu templates (these are optional) 15 | const trayMenuTemplate: (MenuItemConstructorOptions | MenuItem)[] = [new MenuItem({ label: 'Quit App', role: 'quit' })]; 16 | const appMenuBarMenuTemplate: (MenuItemConstructorOptions | MenuItem)[] = [ 17 | { role: process.platform === 'darwin' ? 'appMenu' : 'fileMenu' }, 18 | { role: 'viewMenu' }, 19 | ]; 20 | 21 | // Get Config options from capacitor.config 22 | const capacitorFileConfig: CapacitorElectronConfig = getCapacitorElectronConfig(); 23 | 24 | // Initialize our app. You can pass menu templates into the app here. 25 | // const myCapacitorApp = new ElectronCapacitorApp(capacitorFileConfig); 26 | const myCapacitorApp = new ElectronCapacitorApp(capacitorFileConfig, trayMenuTemplate, appMenuBarMenuTemplate); 27 | 28 | // If deeplinking is enabled then we will set it up here. 29 | if (capacitorFileConfig.electron?.deepLinkingEnabled) { 30 | setupElectronDeepLinking(myCapacitorApp, { 31 | customProtocol: capacitorFileConfig.electron.deepLinkingCustomProtocol ?? 'mycapacitorapp', 32 | }); 33 | } 34 | 35 | // If we are in Dev mode, use the file watcher components. 36 | if (electronIsDev) { 37 | setupReloadWatcher(myCapacitorApp); 38 | } 39 | 40 | // Run Application 41 | (async () => { 42 | // Wait for electron app to be ready. 43 | await app.whenReady(); 44 | // Security - Set Content-Security-Policy based on whether or not we are in dev mode. 45 | setupContentSecurityPolicy(myCapacitorApp.getCustomURLScheme()); 46 | // Initialize our app, build windows, and load content. 47 | await myCapacitorApp.init(); 48 | // Check for updates if we are in a packaged app. 49 | autoUpdater.checkForUpdatesAndNotify(); 50 | })(); 51 | 52 | // Handle when all of our windows are close (platforms have their own expectations). 53 | app.on('window-all-closed', function () { 54 | // On OS X it is common for applications and their menu bar 55 | // to stay active until the user quits explicitly with Cmd + Q 56 | if (process.platform !== 'darwin') { 57 | app.quit(); 58 | } 59 | }); 60 | 61 | // When the dock icon is clicked. 62 | app.on('activate', async function () { 63 | // On OS X it's common to re-create a window in the app when the 64 | // dock icon is clicked and there are no other windows open. 65 | if (myCapacitorApp.getMainWindow().isDestroyed()) { 66 | await myCapacitorApp.init(); 67 | } 68 | }); 69 | 70 | // Place all ipc or other electron api calls and custom functionality under this line 71 | -------------------------------------------------------------------------------- /src/utils/utils-db-no-encryption.ts: -------------------------------------------------------------------------------- 1 | import { capSQLiteSet } from '@capacitor-community/sqlite'; 2 | export const createTablesNoEncryption = ` 3 | CREATE TABLE IF NOT EXISTS users ( 4 | id INTEGER PRIMARY KEY NOT NULL, 5 | email TEXT UNIQUE NOT NULL, 6 | name TEXT, 7 | company TEXT, 8 | size FLOAT, 9 | age INTEGER, 10 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 11 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 12 | ); 13 | CREATE TABLE IF NOT EXISTS messages ( 14 | id INTEGER PRIMARY KEY NOT NULL, 15 | userid INTEGER, 16 | title TEXT NOT NULL, 17 | body TEXT NOT NULL, 18 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 19 | last_modified INTEGER DEFAULT (strftime('%s', 'now')), 20 | FOREIGN KEY (userid) REFERENCES users(id) ON DELETE SET DEFAULT 21 | ); 22 | CREATE INDEX IF NOT EXISTS users_index_name ON users (name); 23 | CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified); 24 | CREATE INDEX IF NOT EXISTS messages_index_last_modified ON messages (last_modified); 25 | CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified 26 | AFTER UPDATE ON users 27 | FOR EACH ROW WHEN NEW.last_modified < OLD.last_modified 28 | BEGIN 29 | UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id; 30 | END; 31 | CREATE TRIGGER IF NOT EXISTS messages_trigger_last_modified AFTER UPDATE ON messages 32 | FOR EACH ROW WHEN NEW.last_modified < OLD.last_modified 33 | BEGIN 34 | UPDATE messages SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id; 35 | END; 36 | PRAGMA user_version = 1; 37 | `; 38 | export const importTwoUsers = ` 39 | DELETE FROM users; 40 | INSERT INTO users (name,email,age) VALUES ("Whiteley","Whiteley.com",30); 41 | INSERT INTO users (name,email,age) VALUES ("Jones","Jones.com",44); 42 | `; 43 | export const importThreeMessages = ` 44 | DELETE FROM messages; 45 | INSERT INTO messages (userid,title,body) VALUES (1,"test post 1","content test post 1"); 46 | INSERT INTO messages (userid,title,body) VALUES (2,"test post 2","content test post 2"); 47 | INSERT INTO messages (userid,title,body) VALUES (1,"test post 3","content test post 3"); 48 | `; 49 | export const dropTablesTablesNoEncryption = ` 50 | PRAGMA foreign_keys = OFF; 51 | DROP TABLE IF EXISTS users; 52 | DROP TABLE IF EXISTS messages; 53 | PRAGMA foreign_keys = ON; 54 | `; 55 | export const setUsers: Array = [ 56 | { statement:"INSERT INTO users (name,email,age) VALUES (?,?,?);", 57 | values:["Jackson","Jackson@example.com",18] 58 | }, 59 | { statement:"INSERT INTO users (name,email,age) VALUES (?,?,?);", 60 | values:["Kennedy","Kennedy@example.com",25] 61 | }, 62 | { statement:"INSERT INTO users (name,email,age) VALUES (?,?,?);", 63 | values:["Bush","Bush@example.com",42] 64 | }, 65 | ]; 66 | export const createSchemaIssue230 = ` 67 | CREATE TABLE IF NOT EXISTS DemoTable ( 68 | name TEXT, 69 | score INTEGER 70 | ); 71 | ` 72 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /src/views/Tab3Page.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 79 | -------------------------------------------------------------------------------- /src/utils/utils-update-version.ts: -------------------------------------------------------------------------------- 1 | // create tables 2 | export const schemaVersion1 = ` 3 | CREATE TABLE IF NOT EXISTS users ( 4 | id INTEGER PRIMARY KEY NOT NULL, 5 | email TEXT UNIQUE NOT NULL, 6 | name TEXT, 7 | company TEXT, 8 | size FLOAT, 9 | age INTEGER, 10 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 11 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 12 | ); 13 | CREATE INDEX IF NOT EXISTS users_index_name ON users (name); 14 | CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified); 15 | CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified 16 | AFTER UPDATE ON users 17 | FOR EACH ROW WHEN NEW.last_modified < OLD.last_modified 18 | BEGIN 19 | UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id; 20 | END; 21 | `; 22 | export const dataVersion1 = ` 23 | DELETE FROM users; 24 | INSERT INTO users (name,email,age) VALUES ("Whiteley","Whiteley.com",30); 25 | INSERT INTO users (name,email,age) VALUES ("Jones","Jones.com",44); 26 | `; 27 | 28 | export const schemaVersion2 = ` 29 | CREATE TABLE users ( 30 | id INTEGER PRIMARY KEY NOT NULL, 31 | email TEXT UNIQUE NOT NULL, 32 | name TEXT, 33 | company TEXT, 34 | country TEXT, 35 | age INTEGER, 36 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 37 | last_modified INTEGER DEFAULT (strftime('%s', 'now')) 38 | ); 39 | CREATE TABLE messages ( 40 | id INTEGER PRIMARY KEY NOT NULL, 41 | userid INTEGER, 42 | title TEXT NOT NULL, 43 | body TEXT NOT NULL, 44 | sql_deleted BOOLEAN DEFAULT 0 CHECK (sql_deleted IN (0, 1)), 45 | last_modified INTEGER DEFAULT (strftime('%s', 'now')), 46 | FOREIGN KEY (userid) REFERENCES users(id) ON DELETE SET DEFAULT 47 | ); 48 | CREATE INDEX users_index_name ON users (name); 49 | CREATE INDEX users_index_last_modified ON users (last_modified); 50 | CREATE INDEX messages_index_title ON messages (title); 51 | CREATE INDEX messages_index_last_modified ON messages (last_modified); 52 | CREATE TRIGGER users_trigger_last_modified 53 | AFTER UPDATE ON users 54 | FOR EACH ROW WHEN NEW.last_modified < OLD.last_modified 55 | BEGIN 56 | UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id; 57 | END; 58 | CREATE TRIGGER messages_trigger_last_modified 59 | AFTER UPDATE ON messages 60 | FOR EACH ROW WHEN NEW.last_modified < OLD.last_modified 61 | BEGIN 62 | UPDATE messages SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id; 63 | END; 64 | ` 65 | export const dataVersion2: Array = [ 66 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 67 | values:[1,"test message 1","content test message 1"] 68 | }, 69 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 70 | values:[2,"test message 2","content test message 2"] 71 | }, 72 | { statement:"INSERT INTO messages (userid,title,body) VALUES (?,?,?);", 73 | values:[1,"test message 3","content test message 3"] 74 | }, 75 | { statement:"UPDATE users SET country = ? WHERE id = ?;", 76 | values:["United Kingdom",1] 77 | }, 78 | { statement:"UPDATE users SET country = ? WHERE id = ?;", 79 | values:["Australia",2] 80 | }, 81 | 82 | ] 83 | -------------------------------------------------------------------------------- /ios/App/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Capacitor 3 | 4 | @UIApplicationMain 5 | class AppDelegate: UIResponder, UIApplicationDelegate { 6 | 7 | var window: UIWindow? 8 | 9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 10 | // Override point for customization after application launch. 11 | return true 12 | } 13 | 14 | func applicationWillResignActive(_ application: UIApplication) { 15 | // 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. 16 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 17 | } 18 | 19 | func applicationDidEnterBackground(_ application: UIApplication) { 20 | // 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. 21 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 22 | } 23 | 24 | func applicationWillEnterForeground(_ application: UIApplication) { 25 | // 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. 26 | } 27 | 28 | func applicationDidBecomeActive(_ application: UIApplication) { 29 | // 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. 30 | } 31 | 32 | func applicationWillTerminate(_ application: UIApplication) { 33 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 34 | } 35 | 36 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { 37 | // Called when the app was launched with a url. Feel free to add additional processing here, 38 | // but if you want the App API to support tracking app url opens, make sure to keep this call 39 | return ApplicationDelegateProxy.shared.application(app, open: url, options: options) 40 | } 41 | 42 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { 43 | // Called when the app was launched with an activity, including Universal Links. 44 | // Feel free to add additional processing here, but if you want the App API to support 45 | // tracking app url opens, make sure to keep this call 46 | return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-sqlite-app-starter", 3 | "version": "4.6.1", 4 | "description": "Ionic/Vue SQLite Application Starter", 5 | "author": "Jean Pierre Quéau", 6 | "license": "MIT", 7 | "homepage": "./", 8 | "private": true, 9 | "scripts": { 10 | "update": "npm install --save @capacitor-community/sqlite@latest --save vue-sqlite-hook@latest", 11 | "serve": "npm run copy:sql:wasm && vue-cli-service serve", 12 | "build:web": "npm run copy:sql:wasm && vue-cli-service build", 13 | "build:native": "npm run remove:sql:wasm && vue-cli-service build", 14 | "ionic:serve:before": "npm run copy:sql:wasm", 15 | "copy:sql:wasm": "copyfiles -u 3 node_modules/sql.js/dist/sql-wasm.wasm public/assets", 16 | "remove:sql:wasm": "rimraf public/assets/sql-wasm.wasm", 17 | "ionic:ios": "npm run remove:sql:wasm && ionic capacitor build ios", 18 | "ionic:android": "npm run remove:sql:wasm && ionic capacitor build android", 19 | "electron:install": "cd electron && npm install && cd ..", 20 | "electron:prepare": "npm run remove:sql:wasm && vue-cli-service build && npx cap sync @capacitor-community/electron && npx cap copy @capacitor-community/electron", 21 | "electron:start": "npm run electron:prepare && cd electron && npm run electron:start", 22 | "test:unit": "copy:sql:wasm && vue-cli-service test:unit", 23 | "test:e2e": "copy:sql:wasm && vue-cli-service test:e2e", 24 | "lint": "vue-cli-service lint" 25 | }, 26 | "dependencies": { 27 | "@capacitor-community/electron": "^4.1.2", 28 | "@capacitor-community/sqlite": "^4.6.1-2", 29 | "@capacitor/android": "^4.6.1", 30 | "@capacitor/app": "^4.1.1", 31 | "@capacitor/core": "^4.6.1", 32 | "@capacitor/dialog": "^4.1.0", 33 | "@capacitor/haptics": "^4.1.0", 34 | "@capacitor/ios": "^4.6.1", 35 | "@capacitor/keyboard": "^4.1.0", 36 | "@capacitor/status-bar": "^4.1.1", 37 | "@ionic/vue": "^6.4.2", 38 | "@ionic/vue-router": "^6.4.2", 39 | "core-js": "^3.6.5", 40 | "ionicons": "^6.0.4", 41 | "vue": "^3.2.31", 42 | "vue-router": "^4.1.6", 43 | "vue-sqlite-hook": "^3.0.2" 44 | }, 45 | "devDependencies": { 46 | "@capacitor/cli": "^4.6.1", 47 | "@types/jest": "^27.4.1", 48 | "@typescript-eslint/eslint-plugin": "^5.48.2", 49 | "@typescript-eslint/parser": "^5.48.2", 50 | "@vue/cli-plugin-babel": "^5.0.8", 51 | "@vue/cli-plugin-e2e-cypress": "^5.0.8", 52 | "@vue/cli-plugin-eslint": "^5.0.8", 53 | "@vue/cli-plugin-router": "^5.0.8", 54 | "@vue/cli-plugin-typescript": "^5.0.8", 55 | "@vue/cli-plugin-unit-jest": "^5.0.8", 56 | "@vue/cli-service": "^5.0.8", 57 | "@vue/eslint-config-typescript": "^11.0.2", 58 | "@vue/test-utils": "^2.2.7", 59 | "@vue/vue3-jest": "^27.0.0", 60 | "babel-jest": "^27.3.1", 61 | "copyfiles": "^2.4.1", 62 | "cypress": "^12.3.0", 63 | "eslint": "^8.32.0", 64 | "eslint-plugin-vue": "^9.9.0", 65 | "jest": "^27.5.1", 66 | "ts-jest": "^27.0.7", 67 | "typescript": "4.9.4" 68 | }, 69 | "repository": { 70 | "type": "git", 71 | "url": "https://github.com/jepiqueau/vue-sqlite-app-starter.git" 72 | }, 73 | "bugs": { 74 | "url": "https://github.com/jepiqueau/vue-sqlite-app-starter.git/issues" 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /electron/src/rt/electron-rt.ts: -------------------------------------------------------------------------------- 1 | import { randomBytes } from 'crypto'; 2 | import { ipcRenderer, contextBridge } from 'electron'; 3 | import { EventEmitter } from 'events'; 4 | 5 | //////////////////////////////////////////////////////// 6 | // eslint-disable-next-line @typescript-eslint/no-var-requires 7 | const plugins = require('./electron-plugins'); 8 | 9 | const randomId = (length = 5) => randomBytes(length).toString('hex'); 10 | 11 | const contextApi: { 12 | [plugin: string]: { [functionName: string]: () => Promise }; 13 | } = {}; 14 | 15 | Object.keys(plugins).forEach((pluginKey) => { 16 | Object.keys(plugins[pluginKey]) 17 | .filter((className) => className !== 'default') 18 | .forEach((classKey) => { 19 | const functionList = Object.getOwnPropertyNames(plugins[pluginKey][classKey].prototype).filter( 20 | (v) => v !== 'constructor' 21 | ); 22 | 23 | if (!contextApi[classKey]) { 24 | contextApi[classKey] = {}; 25 | } 26 | 27 | functionList.forEach((functionName) => { 28 | if (!contextApi[classKey][functionName]) { 29 | contextApi[classKey][functionName] = (...args) => ipcRenderer.invoke(`${classKey}-${functionName}`, ...args); 30 | } 31 | }); 32 | 33 | // Events 34 | if (plugins[pluginKey][classKey].prototype instanceof EventEmitter) { 35 | const listeners: { [key: string]: { type: string; listener: (...args: any[]) => void } } = {}; 36 | const listenersOfTypeExist = (type) => 37 | !!Object.values(listeners).find((listenerObj) => listenerObj.type === type); 38 | 39 | Object.assign(contextApi[classKey], { 40 | addListener(type: string, callback: (...args) => void) { 41 | const id = randomId(); 42 | 43 | // Deduplicate events 44 | if (!listenersOfTypeExist(type)) { 45 | ipcRenderer.send(`event-add-${classKey}`, type); 46 | } 47 | 48 | const eventHandler = (_, ...args) => callback(...args); 49 | 50 | ipcRenderer.addListener(`event-${classKey}-${type}`, eventHandler); 51 | listeners[id] = { type, listener: eventHandler }; 52 | 53 | return id; 54 | }, 55 | removeListener(id: string) { 56 | if (!listeners[id]) { 57 | throw new Error('Invalid id'); 58 | } 59 | 60 | const { type, listener } = listeners[id]; 61 | 62 | ipcRenderer.removeListener(`event-${classKey}-${type}`, listener); 63 | 64 | delete listeners[id]; 65 | 66 | if (!listenersOfTypeExist(type)) { 67 | ipcRenderer.send(`event-remove-${classKey}-${type}`); 68 | } 69 | }, 70 | removeAllListeners(type: string) { 71 | Object.entries(listeners).forEach(([id, listenerObj]) => { 72 | if (listenerObj.type === type) { 73 | ipcRenderer.removeListener(`event-${classKey}-${type}`, listenerObj.listener); 74 | delete listeners[id]; 75 | } 76 | }); 77 | 78 | ipcRenderer.send(`event-remove-${classKey}-${type}`); 79 | }, 80 | }); 81 | } 82 | }); 83 | }); 84 | 85 | contextBridge.exposeInMainWorld('CapacitorCustomPlatform', { 86 | name: 'electron', 87 | plugins: contextApi, 88 | }); 89 | //////////////////////////////////////////////////////// 90 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at jepi.queau@free.fr. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |


2 | 3 |

Ionic/Vue SQLite App Starter

4 |

vue-sqlite-app-starter

5 |

Ionic/Vue application demonstrating the use of the

6 |

@capacitor-community/sqlite plugin

7 |

CAPACITOR 4


8 |
9 |

10 | 11 | 12 | 13 | 14 | 15 | 16 |

17 | 18 | 19 | ## Maintainers 20 | 21 | | Maintainer | GitHub | Social | 22 | | ----------------- | ----------------------------------------- | ------ | 23 | | Quéau Jean Pierre | [jepiqueau](https://github.com/jepiqueau) | | 24 | 25 | 26 | ## 🚧 To be Updated 🚧 27 | 28 | The components `EncryptionTest.vue` and `UpgradeVersionTest.vue`have still to be created 29 | 30 | ## Installation 31 | 32 | To start clone the project 33 | 34 | ```bash 35 | git clone https://github.com/jepiqueau/vue-sqlite-app-starter.git 36 | cd ./vue-sqlite-app-starter 37 | git remote remove origin 38 | npm install 39 | npm run electron:install 40 | ``` 41 | 42 | To install the latest release of the ```@capacitor-community/sqlite``` plugin 43 | 44 | ```bash 45 | npm run update 46 | ``` 47 | 48 | ## Running the app 49 | 50 | The assets databases should be in the `public/assets/databases`folder 51 | 52 | ### BROWSER 53 | 54 | ``` 55 | npx run serve 56 | ``` 57 | or 58 | ``` 59 | ionic serve 60 | ``` 61 | 62 | ### IOS 63 | 64 | ``` 65 | npm run ionic:ios 66 | ``` 67 | 68 | Once Xcode launches, you can build your app through the standard Xcode workflow. 69 | 70 | ### ANDROID 71 | 72 | ``` 73 | npx cap open android 74 | ``` 75 | Once Android Studio launches, make sure that you are using 76 | - Gradle JDK version 11 77 | - Android Gradle Plugin Version 7.2.2 78 | 79 | and build your app through the standard Android Studio workflow. 80 | 81 | ### ELECTRON 82 | 83 | ``` 84 | npm run electron:start 85 | ``` 86 | 87 | ## Accessing the tests 🚧 88 | 89 | Go to the Tab2 of the application 90 | 91 | 92 | ## Contributors ✨ 93 | 94 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 95 | 96 | 97 | 98 | 99 |

100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 109 | 110 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router'; 4 | 5 | import { IonicVue } from '@ionic/vue'; 6 | 7 | /* Core CSS required for Ionic components to work properly */ 8 | import '@ionic/vue/css/core.css'; 9 | 10 | /* Basic CSS for apps built with Ionic */ 11 | import '@ionic/vue/css/normalize.css'; 12 | import '@ionic/vue/css/structure.css'; 13 | import '@ionic/vue/css/typography.css'; 14 | 15 | /* Optional CSS utils that can be commented out */ 16 | import '@ionic/vue/css/padding.css'; 17 | import '@ionic/vue/css/float-elements.css'; 18 | import '@ionic/vue/css/text-alignment.css'; 19 | import '@ionic/vue/css/text-transformation.css'; 20 | import '@ionic/vue/css/flex-utils.css'; 21 | import '@ionic/vue/css/display.css'; 22 | 23 | /* Theme variables */ 24 | import './theme/variables.css'; 25 | 26 | /* SQLite imports */ 27 | import { defineCustomElements as jeepSqlite, applyPolyfills } from "jeep-sqlite/loader"; 28 | import { Capacitor } from '@capacitor/core'; 29 | import { CapacitorSQLite, SQLiteConnection, SQLiteDBConnection } from '@capacitor-community/sqlite'; 30 | import { useState } from '@/composables/state'; 31 | import { schemaToImport179 } from '@/utils/utils-import-from-json'; 32 | 33 | applyPolyfills().then(() => { 34 | jeepSqlite(window); 35 | }); 36 | window.addEventListener('DOMContentLoaded', async () => { 37 | const platform = Capacitor.getPlatform(); 38 | const sqlite: SQLiteConnection = new SQLiteConnection(CapacitorSQLite) 39 | 40 | const app = createApp(App) 41 | .use(IonicVue) 42 | .use(router); 43 | 44 | /* SQLite Global Variables*/ 45 | 46 | // Only if you want to use the onProgressImport/Export events 47 | const [jsonListeners, setJsonListeners] = useState(false); 48 | const [isModal, setIsModal] = useState(false); 49 | const [message, setMessage] = useState(""); 50 | app.config.globalProperties.$isModalOpen = {isModal: isModal, setIsModal: setIsModal}; 51 | app.config.globalProperties.$isJsonListeners = {jsonListeners: jsonListeners, setJsonListeners: setJsonListeners}; 52 | app.config.globalProperties.$messageContent = {message: message, setMessage: setMessage}; 53 | 54 | // Existing Connections Store 55 | const [existConn, setExistConn] = useState(false); 56 | app.config.globalProperties.$existingConn = {existConn: existConn, setExistConn: setExistConn}; 57 | 58 | try { 59 | if(platform === "web") { 60 | // Create the 'jeep-sqlite' Stencil component 61 | const jeepSqlite = document.createElement('jeep-sqlite'); 62 | document.body.appendChild(jeepSqlite); 63 | await customElements.whenDefined('jeep-sqlite'); 64 | // Initialize the Web store 65 | await sqlite.initWebStore(); 66 | } 67 | // here you can initialize some database schema if required 68 | 69 | // example: database creation with standard SQLite statements 70 | const ret = await sqlite.checkConnectionsConsistency(); 71 | const isConn = (await sqlite.isConnection("db_tab3", false)).result; 72 | let db: SQLiteDBConnection 73 | if (ret.result && isConn) { 74 | db = await sqlite.retrieveConnection("db_tab3", false); 75 | } else { 76 | db = await sqlite.createConnection("db_tab3", false, "no-encryption", 1, false); 77 | } 78 | await db.open(); 79 | const query = ` 80 | CREATE TABLE IF NOT EXISTS test ( 81 | id INTEGER PRIMARY KEY NOT NULL, 82 | name TEXT NOT NULL 83 | ); 84 | ` 85 | const res = await db.execute(query); 86 | if(res.changes && res.changes.changes && res.changes.changes < 0) { 87 | throw new Error(`Error: execute failed`); 88 | } 89 | await sqlite.closeConnection("db_tab3", false); 90 | 91 | // example: database creation from importFromJson 92 | const result = await sqlite.isJsonValid(JSON.stringify(schemaToImport179)); 93 | if(!result.result) { 94 | throw new Error(`isJsonValid: "schemaToImport179" is not valid`); 95 | } 96 | // full import 97 | const resJson = await sqlite.importFromJson(JSON.stringify(schemaToImport179)); 98 | if(resJson.changes && resJson.changes.changes && resJson.changes.changes < 0) { 99 | throw new Error(`importFromJson: "full" failed`); 100 | } 101 | 102 | router.isReady().then(() => { 103 | app.mount('#app'); 104 | }); 105 | } catch (err) { 106 | console.log(`Error: ${err}`); 107 | throw new Error(`Error: ${err}`) 108 | } 109 | }); 110 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from '@ionic/vue-router'; 2 | import { RouteRecordRaw } from 'vue-router'; 3 | import TabsPage from '../views/TabsPage.vue' 4 | import DatabaseNoEncryption from "@/views/DatabaseNoEncryption.vue"; 5 | import DatabaseTwoDbs from "@/views/DatabaseTwoDbs.vue"; 6 | import DatabaseExistingConn from "@/views/DatabaseExistingConn.vue"; 7 | import DatabaseCopyFromAssets from "@/views/DatabaseCopyFromAssets.vue"; 8 | import DatabaseJsonImportExport from "@/views/DatabaseJsonImportExport.vue"; 9 | import DatabaseJsonListeners from "@/views/DatabaseJsonListeners.vue"; 10 | import DatabaseExecuteSet from "@/views/DatabaseExecuteSet.vue"; 11 | import DatabaseToEncrypt from "@/views/DatabaseToEncrypt.vue"; 12 | import DatabaseFromToJson from "@/views/DatabaseFromToJson.vue"; 13 | import DatabaseEncrypted from "@/views/DatabaseEncrypted.vue"; 14 | import DatabaseUpgradeVersion from "@/views/DatabaseUpgradeVersion.vue"; 15 | import NotFound from "@/views/NotFound.vue"; 16 | import DatabaseJsonImportIssue177 from "@/views/DatabaseJsonImportIssue177.vue"; 17 | import DatabaseMigrate from "@/views/DatabaseMigrate.vue"; 18 | import DatabaseJsonImportIssue192 from "@/views/DatabaseJsonImportIssue192.vue"; 19 | import NCDatabase from "@/views/NCDatabase.vue"; 20 | import DatabaseTransaction from "@/views/DatabaseTransaction.vue"; 21 | 22 | const routes: Array = [ 23 | { 24 | path: '/', 25 | redirect: '/tabs/tab1' 26 | }, 27 | { 28 | path: '/tabs/', 29 | component: TabsPage, 30 | children: [ 31 | { 32 | path: '', 33 | redirect: '/tabs/tab1' 34 | }, 35 | { 36 | path: 'tab1', 37 | component: () => import('@/views/Tab1Page.vue') 38 | }, 39 | { 40 | path: 'tab2', 41 | component: () => import('@/views/Tab2Page.vue') 42 | }, 43 | { 44 | path: 'tab3', 45 | component: () => import('@/views/Tab3Page.vue') 46 | } 47 | ] 48 | }, 49 | { 50 | path: "/databasenoencryption", 51 | name: "DatabaseNoEncryption", 52 | component: DatabaseNoEncryption, 53 | }, 54 | { 55 | path: "/databasetwodbs", 56 | name: "DatabaseTwoDbs", 57 | component: DatabaseTwoDbs, 58 | }, 59 | { 60 | path: "/databaseexistingconnection", 61 | name: "DatabaseExistingConn", 62 | component: DatabaseExistingConn, 63 | }, 64 | { 65 | path: "/databasetransaction", 66 | name: "DatabaseTransaction", 67 | component: DatabaseTransaction, 68 | }, 69 | { 70 | path: "/databasecopyfromassets", 71 | name: "DatabaseCopyFromAssets", 72 | component: DatabaseCopyFromAssets, 73 | }, 74 | { 75 | path: "/databasejsonimportexport", 76 | name: "DatabaseJsonImportExport", 77 | component: DatabaseJsonImportExport, 78 | }, 79 | { 80 | path: "/databasejsonlisteners", 81 | name: "DatabaseJsonListeners", 82 | component: DatabaseJsonListeners, 83 | }, 84 | { 85 | path: "/databasejsonimportissue177", 86 | name: "DatabaseJsonImportIssue177", 87 | component: DatabaseJsonImportIssue177, 88 | }, 89 | { 90 | path: "/databasejsonimportissue192", 91 | name: "DatabaseJsonImportIssue192", 92 | component: DatabaseJsonImportIssue192, 93 | }, 94 | { 95 | path: "/databasemigrate", 96 | name: "DatabaseMigrate", 97 | component: DatabaseMigrate, 98 | }, 99 | { 100 | path: "/ncdatabase", 101 | name: "NCDatabase", 102 | component: NCDatabase, 103 | }, 104 | 105 | 106 | /* 107 | { 108 | path: "/databaseexecuteset", 109 | name: "DatabaseExecuteSet", 110 | component: DatabaseExecuteSet, 111 | }, 112 | */ 113 | { 114 | path: "/databasetoencrypt", 115 | name: "DatabaseToEncrypt", 116 | component: DatabaseToEncrypt, 117 | }, 118 | /* 119 | { 120 | path: "/databasefromtojson", 121 | name: "DatabaseFromToJson", 122 | component: DatabaseFromToJson, 123 | }, 124 | { 125 | path: "/databaseencrypted", 126 | name: "DatabaseEncrypted", 127 | component: DatabaseEncrypted, 128 | }, 129 | { 130 | path: "/databaseupgradeversion", 131 | name: "DatabaseUpgradeVersion", 132 | component: DatabaseUpgradeVersion, 133 | }, 134 | */ 135 | { 136 | path: "/:catchAll(.*)", 137 | component: NotFound, 138 | }, 139 | 140 | ] 141 | 142 | const router = createRouter({ 143 | history: createWebHistory(process.env.BASE_URL), 144 | routes 145 | }) 146 | 147 | export default router 148 | -------------------------------------------------------------------------------- /src/views/Tab2Page.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 108 | -------------------------------------------------------------------------------- /src/components/TransactionTest.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/JsonImportIssue177.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /src/components/JsonImportIssue192.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /src/components/CopyFromAssetsTest.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /src/components/NonConfDB.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/ExistingConnTest.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/TwoDbsTest.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | --------------------------------------------------------------------------------