From 44ca2e405e44349c5e7c8d66edcd5a54594fc9e4 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Sun, 10 Jul 2022 15:57:37 +0200 Subject: [PATCH 01/12] fix: :boom: update to v4 --- android/capacitor.settings.gradle | 2 +- ios/App/App/AppDelegate.swift | 78 +++++---- ios/App/Podfile | 2 +- package.json | 10 +- pnpm-lock.yaml | 282 +++++++++++++++--------------- scripts/utils.mjs | 2 + src/services/versions.ts | 16 +- 7 files changed, 200 insertions(+), 192 deletions(-) diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 7381634a66..434226191e 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -75,7 +75,7 @@ include ':capacitor-toast' project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@capacitor+toast@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/toast/android') include ':capgo-capacitor-updater' -project(':capgo-capacitor-updater').projectDir = new File('../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.10_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater/android') +project(':capgo-capacitor-updater').projectDir = new File('../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.18_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater/android') include ':robingenz-capacitor-file-picker' project(':robingenz-capacitor-file-picker').projectDir = new File('../node_modules/.pnpm/@robingenz+capacitor-file-picker@0.3.0_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-file-picker/android') diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index 65f64ce82b..fb3535c7a1 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -3,12 +3,27 @@ import Capacitor import CapgoCapacitorUpdater import RobingenzCapacitorScreenOrientation +extension UIApplication { + + +public class func topViewController(_ base: UIViewController? = UIApplication.shared.windows.first?.rootViewController) -> UIViewController? { + if let nav = base as? UINavigationController { + return topViewController(nav.visibleViewController) + } + if let tab = base as? UITabBarController { + if let selected = tab.selectedViewController { + return topViewController(selected) + } + } + if let presented = base?.presentedViewController { + return topViewController(presented) + } + return base +}} + extension UIWindow { - alertShake = nil open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { let defaults = UserDefaults.standard - if (alertShake != nil) - return if motion == .motionShake { let appName = "app" let title = "Preview \(appName) Menu" @@ -18,37 +33,37 @@ extension UIWindow { let cancelButtonTitle = "Close menu" let updater = CapacitorUpdater() if let vc = (rootViewController as? CAPBridgeViewController) { - print("getServerBasePath", vc.getServerBasePath()) - let serverBasePath = defaults.object(forKey:"serverBasePath") as? String ?? "" - let versionName = defaults.object(forKey:"versionName") as? String ?? "" - let LatestVersionAutoUpdate = UserDefaults.standard.string(forKey: "LatestVersionAutoUpdate") ?? "" - if (serverBasePath == "" || serverBasePath.contains(versionName)) { + if UIApplication.topViewController()!.isKind(of: UIAlertController.self) { + print("UIAlertController is already presented") return } - alertShake = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) + func resetBuiltin () { + updater.reset() + vc.setServerBasePath(path: "") + DispatchQueue.main.async { + vc.loadView() + vc.viewDidLoad() + _ = updater.delete(id: bundleId) + print("✨ Capgo: Reset to builtin version") + } + } + let bundleId = updater.getCurrentBundleId() + print("getServerBasePath", vc.getServerBasePath()) + print("bundleId", bundleId) + let alertShake = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) alertShake.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in - let LatestVersionNameAutoUpdate = UserDefaults.standard.string(forKey: "LatestVersionNameAutoUpdate") ?? "" - if(LatestVersionAutoUpdate != "" && LatestVersionNameAutoUpdate != "") { - _ = updater.set(version: LatestVersionAutoUpdate, versionName: LatestVersionNameAutoUpdate) - let pathHot = updater.getLastPathHot() - let pathPersist = updater.getLastPathPersist() - if (pathHot != "" && pathPersist != "") { - UserDefaults.standard.set(String(pathPersist.suffix(10)), forKey: "serverBasePath") - vc.setServerBasePath(path: pathHot) - _ = updater.delete(version: serverBasePath, versionName: versionName) - } else { - - } + guard let next = updater.getNextVersion() else { + resetBuiltin() + return + } + if (!next.isBuiltin()) { + print("✨ Capgo: Resetting to: \(next.toString())") + _ = updater.set(bundle: next) + let destHot = updater.getPathHot(id: next.getId()) + print("✨ Capgo: Reloading \(next.toString())") + vc.setServerBasePath(path: destHot.path) } else { - updater.reset() - let pathPersist = updater.getLastPathPersist() - vc.setServerBasePath(path: pathPersist) - defaults.set("", forKey: "serverBasePath") - DispatchQueue.main.async { - vc.loadView() - vc.viewDidLoad() - _ = updater.delete(version: serverBasePath, versionName: versionName) - } + resetBuiltin() } print("✨ Capgo: Reload app done") })) @@ -60,7 +75,7 @@ extension UIWindow { })) DispatchQueue.main.async { vc.present(alertShake, animated: true, completion: { () -> Void in - alertShake = nil +// alertShake = nil }) } } @@ -134,5 +149,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil) } } - } diff --git a/ios/App/Podfile b/ios/App/Podfile index 121d95d7a3..f7cfcc49b1 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -33,7 +33,7 @@ def capacitor_pods pod 'CapacitorStorage', :path => '../../node_modules/.pnpm/@capacitor+storage@1.2.5_@capacitor+core@3.6.0/node_modules/@capacitor/storage' pod 'CapacitorTextZoom', :path => '../../node_modules/.pnpm/@capacitor+text-zoom@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/text-zoom' pod 'CapacitorToast', :path => '../../node_modules/.pnpm/@capacitor+toast@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/toast' - pod 'CapgoCapacitorUpdater', :path => '../../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.10_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater' + pod 'CapgoCapacitorUpdater', :path => '../../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.18_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater' pod 'RobingenzCapacitorFilePicker', :path => '../../node_modules/.pnpm/@robingenz+capacitor-file-picker@0.3.0_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-file-picker' pod 'RobingenzCapacitorScreenOrientation', :path => '../../node_modules/.pnpm/@robingenz+capacitor-screen-orientation@1.1.7_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-screen-orientation' pod 'TeamhiveCapacitorVideoRecorder', :path => '../../node_modules/.pnpm/@teamhive+capacitor-video-recorder@5.0.0_@capacitor+core@3.6.0/node_modules/@teamhive/capacitor-video-recorder' diff --git a/package.json b/package.json index 8f26028f25..f8235f7a89 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@capacitor/storage": "1.2.5", "@capacitor/text-zoom": "1.0.8", "@capacitor/toast": "1.0.8", - "@capgo/capacitor-updater": "^3.3.12", + "@capgo/capacitor-updater": "4.0.0-alpha.19", "@ionic/vue": "6.1.13", "@ionic/vue-router": "6.1.13", "@robingenz/capacitor-file-picker": "0.3.0", @@ -105,7 +105,7 @@ "capacitor-set-version": "^2.0.3", "critters": "0.0.16", "cross-env": "^7.0.3", - "cypress": "9.7.0", + "cypress": "10.3.0", "eslint": "8.19.0", "eslint-plugin-cypress": "^2.12.1", "https-localhost": "4.7.1", @@ -113,15 +113,15 @@ "pnpm": "7.5.0", "sass": "1.53.0", "standard-version": "^9.5.0", - "typescript": "4.7.3", + "typescript": "4.7.4", "unplugin-icons": "0.14.7", - "vite": "2.9.13", + "vite": "2.9.14", "vite-plugin-inspect": "0.5.1", "vite-plugin-pages": "0.25.0", "vite-plugin-pwa": "0.12.2", "vite-plugin-vue-layouts": "0.6.0", "vite-plugin-windicss": "1.8.6", - "vitest": "0.17.0", + "vitest": "0.17.1", "vue-tsc": "0.38.3", "windicss": "^3.5.6" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6ec80f25f..2ee36b7272 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,7 +32,7 @@ specifiers: '@capacitor/storage': 1.2.5 '@capacitor/text-zoom': 1.0.8 '@capacitor/toast': 1.0.8 - '@capgo/capacitor-updater': ^3.3.12 + '@capgo/capacitor-updater': 4.0.0-alpha.19 '@iconify-json/carbon': 1.1.6 '@iconify-json/ion': 1.1.3 '@iconify-json/ls': 1.1.2 @@ -68,7 +68,7 @@ specifiers: copy-text-to-clipboard: ^3.0.1 critters: 0.0.16 cross-env: ^7.0.3 - cypress: 9.7.0 + cypress: 10.3.0 dayjs: 1.11.3 eslint: 8.19.0 eslint-plugin-cypress: ^2.12.1 @@ -85,9 +85,9 @@ specifiers: prism-theme-vars: ^0.2.3 sass: 1.53.0 standard-version: ^9.5.0 - typescript: 4.7.3 + typescript: 4.7.4 unplugin-icons: 0.14.7 - vite: 2.9.13 + vite: 2.9.14 vite-plugin-environment: 1.1.1 vite-plugin-imagemin: ^0.6.1 vite-plugin-inspect: 0.5.1 @@ -95,7 +95,7 @@ specifiers: vite-plugin-pwa: 0.12.2 vite-plugin-vue-layouts: 0.6.0 vite-plugin-windicss: 1.8.6 - vitest: 0.17.0 + vitest: 0.17.1 vue: 3.2.37 vue-chart-3: ^3.1.8 vue-demi: 0.13.2 @@ -111,7 +111,7 @@ dependencies: '@capacitor/android': 3.6.0_@capacitor+core@3.6.0 '@capacitor/app': 1.1.1_@capacitor+core@3.6.0 '@capacitor/app-launcher': 1.0.9_@capacitor+core@3.6.0 - '@capacitor/assets': 1.0.0-next.5_lr5yv43hchipyudzleywqpgwuy + '@capacitor/assets': 1.0.0-next.5_zgusdg2syqzg2kik2gzyf5b6di '@capacitor/browser': 1.0.7_@capacitor+core@3.6.0 '@capacitor/camera': 1.3.1_@capacitor+core@3.6.0 '@capacitor/clipboard': 1.0.8_@capacitor+core@3.6.0 @@ -134,7 +134,7 @@ dependencies: '@capacitor/storage': 1.2.5_@capacitor+core@3.6.0 '@capacitor/text-zoom': 1.0.8_@capacitor+core@3.6.0 '@capacitor/toast': 1.0.8_@capacitor+core@3.6.0 - '@capgo/capacitor-updater': 3.3.12_@capacitor+core@3.6.0 + '@capgo/capacitor-updater': 4.0.0-alpha.19_@capacitor+core@3.6.0 '@ionic/vue': 6.1.13 '@ionic/vue-router': 6.1.13 '@robingenz/capacitor-file-picker': 0.3.0_@capacitor+core@3.6.0 @@ -160,11 +160,11 @@ dependencies: json2csv: 5.0.7 mime: 3.0.0 nprogress: 1.0.0-1 - pinia: 2.0.14_vcmyupim4cga7k7f5hngmth5py + pinia: 2.0.14_j6bzmzd4ujpabbp5objtwxyjp4 plausible-tracker: 0.3.8 prism-theme-vars: 0.2.3 - vite-plugin-environment: 1.1.1_vite@2.9.13 - vite-plugin-imagemin: 0.6.1_vite@2.9.13 + vite-plugin-environment: 1.1.1_vite@2.9.14 + vite-plugin-imagemin: 0.6.1_vite@2.9.14 vue: 3.2.37 vue-chart-3: 3.1.8_chart.js@3.8.0+vue@3.2.37 vue-demi: 0.13.2_vue@3.2.37 @@ -172,25 +172,25 @@ dependencies: vue-router: 4.1.1_vue@3.2.37 devDependencies: - '@antfu/eslint-config': 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 + '@antfu/eslint-config': 0.25.2_4x5o4skxv6sl53vpwefgt23khm '@capacitor/cli': 3.6.0 '@iconify-json/carbon': 1.1.6 '@iconify-json/ion': 1.1.3 '@iconify-json/ls': 1.1.2 - '@intlify/vite-plugin-vue-i18n': 4.0.0_krmxvkyjildqapt6of732e4fvy + '@intlify/vite-plugin-vue-i18n': 4.0.0_i5cftpqtlusdawbczcfmwd3bya '@originjs/vite-plugin-commonjs': 1.0.3 '@types/fs-extra': 9.0.13 '@types/mime': 2.0.3 '@types/node': 17.0.35 '@types/nprogress': 0.2.0 '@types/uuid': 8.3.4 - '@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.14+vue@3.2.37 '@vue/compiler-sfc': 3.2.37 '@vue/server-renderer': 3.2.37_vue@3.2.37 capacitor-set-version: 2.0.3 critters: 0.0.16 cross-env: 7.0.3 - cypress: 9.7.0 + cypress: 10.3.0 eslint: 8.19.0 eslint-plugin-cypress: 2.12.1_eslint@8.19.0 https-localhost: 4.7.1 @@ -198,27 +198,27 @@ devDependencies: pnpm: 7.5.0 sass: 1.53.0 standard-version: 9.5.0 - typescript: 4.7.3 - unplugin-icons: 0.14.7_an4lgmmlrau24p6bpvoomqupse - vite: 2.9.13_sass@1.53.0 - vite-plugin-inspect: 0.5.1_vite@2.9.13 - vite-plugin-pages: 0.25.0_an4lgmmlrau24p6bpvoomqupse - vite-plugin-pwa: 0.12.2_vite@2.9.13 - vite-plugin-vue-layouts: 0.6.0_ecv5zhukn2wee76aswaja5pyga - vite-plugin-windicss: 1.8.6_vite@2.9.13 - vitest: 0.17.0_sass@1.53.0 - vue-tsc: 0.38.3_typescript@4.7.3 + typescript: 4.7.4 + unplugin-icons: 0.14.7_ye7sw5nid2es3e4qmkjro6ozy4 + vite: 2.9.14_sass@1.53.0 + vite-plugin-inspect: 0.5.1_vite@2.9.14 + vite-plugin-pages: 0.25.0_ye7sw5nid2es3e4qmkjro6ozy4 + vite-plugin-pwa: 0.12.2_vite@2.9.14 + vite-plugin-vue-layouts: 0.6.0_jvezqwqkuegqzldwnezrkfv7xi + vite-plugin-windicss: 1.8.6_vite@2.9.14 + vitest: 0.17.1_sass@1.53.0 + vue-tsc: 0.38.3_typescript@4.7.4 windicss: 3.5.6 packages: - /@antfu/eslint-config-basic/0.25.2_tj6rtqnlddtgb6pfstzfechs3a: + /@antfu/eslint-config-basic/0.25.2_umhtdcosdgp7wudwz65trwomxy: resolution: {integrity: sha512-D81jE90B7cujMmU2mKEaUcRsKRAfVX4PniEoaD0c3HiqprqghfBjuv3B6p1+tG9uJQAgLBVsK+G92Y+AAgFaOA==} peerDependencies: eslint: '>=7.4.0' dependencies: eslint: 8.19.0 - eslint-plugin-antfu: 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 + eslint-plugin-antfu: 0.25.2_4x5o4skxv6sl53vpwefgt23khm eslint-plugin-eslint-comments: 3.2.0_eslint@8.19.0 eslint-plugin-html: 6.2.0 eslint-plugin-import: 2.26.0_7ejcetdxrvaaahqi6qomt7vmtq @@ -238,12 +238,12 @@ packages: - typescript dev: true - /@antfu/eslint-config-react/0.25.2_zi6vhgfvjwwpz4aow2huzz5d74: + /@antfu/eslint-config-react/0.25.2_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-jGol7/UTUa9z55p4Oy/K5yGgY179fj1kl0kdo3bRnFjzUZQuDGuxw5HiZdYx333pjBdizkPl6cMJ8M6sc3PzFg==} peerDependencies: eslint: '>=7.4.0' dependencies: - '@antfu/eslint-config-ts': 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 + '@antfu/eslint-config-ts': 0.25.2_4x5o4skxv6sl53vpwefgt23khm eslint: 8.19.0 eslint-plugin-react: 7.30.0_eslint@8.19.0 transitivePeerDependencies: @@ -253,29 +253,29 @@ packages: - typescript dev: true - /@antfu/eslint-config-ts/0.25.2_zi6vhgfvjwwpz4aow2huzz5d74: + /@antfu/eslint-config-ts/0.25.2_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-Dpp4r3CaDZVh73lMxhW0sVGsPwUf1YTpYV5JefmBtgEZKOAc+QqYbLjFZ6QGRUpdPLldRvD+xTFpax6t8NKgyA==} peerDependencies: eslint: '>=7.4.0' typescript: '>=3.9' dependencies: - '@antfu/eslint-config-basic': 0.25.2_tj6rtqnlddtgb6pfstzfechs3a - '@typescript-eslint/eslint-plugin': 5.26.0_tj6rtqnlddtgb6pfstzfechs3a - '@typescript-eslint/parser': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@antfu/eslint-config-basic': 0.25.2_umhtdcosdgp7wudwz65trwomxy + '@typescript-eslint/eslint-plugin': 5.26.0_umhtdcosdgp7wudwz65trwomxy + '@typescript-eslint/parser': 5.26.0_4x5o4skxv6sl53vpwefgt23khm eslint: 8.19.0 - typescript: 4.7.3 + typescript: 4.7.4 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color dev: true - /@antfu/eslint-config-vue/0.25.2_zi6vhgfvjwwpz4aow2huzz5d74: + /@antfu/eslint-config-vue/0.25.2_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-ObZOzvQvLe/qETq5miVmFWRgjNwWAE/P1I2YhKyDFK7KHquM7bKysfnmkoPpm2HkOpseMILoc+5UKo/w3L7GHg==} peerDependencies: eslint: '>=7.4.0' dependencies: - '@antfu/eslint-config-ts': 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 + '@antfu/eslint-config-ts': 0.25.2_4x5o4skxv6sl53vpwefgt23khm eslint: 8.19.0 eslint-plugin-vue: 9.0.1_eslint@8.19.0 transitivePeerDependencies: @@ -285,15 +285,15 @@ packages: - typescript dev: true - /@antfu/eslint-config/0.25.2_zi6vhgfvjwwpz4aow2huzz5d74: + /@antfu/eslint-config/0.25.2_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-dIqxqBa6ALqaBQyErMnYLpyn4xpwp1YefbYxDMgNFM8MzY/ShJgaBWAGlywFeDwyAR44jaaVY8wRwDxODF8bPg==} peerDependencies: eslint: '>=7.4.0' dependencies: - '@antfu/eslint-config-react': 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 - '@antfu/eslint-config-vue': 0.25.2_zi6vhgfvjwwpz4aow2huzz5d74 - '@typescript-eslint/eslint-plugin': 5.26.0_tj6rtqnlddtgb6pfstzfechs3a - '@typescript-eslint/parser': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@antfu/eslint-config-react': 0.25.2_4x5o4skxv6sl53vpwefgt23khm + '@antfu/eslint-config-vue': 0.25.2_4x5o4skxv6sl53vpwefgt23khm + '@typescript-eslint/eslint-plugin': 5.26.0_umhtdcosdgp7wudwz65trwomxy + '@typescript-eslint/parser': 5.26.0_4x5o4skxv6sl53vpwefgt23khm eslint: 8.19.0 eslint-plugin-eslint-comments: 3.2.0_eslint@8.19.0 eslint-plugin-html: 6.2.0 @@ -1525,13 +1525,13 @@ packages: '@capacitor/core': 3.6.0 dev: false - /@capacitor/assets/1.0.0-next.5_lr5yv43hchipyudzleywqpgwuy: + /@capacitor/assets/1.0.0-next.5_zgusdg2syqzg2kik2gzyf5b6di: resolution: {integrity: sha512-xiOi5OXgW6+CjpM5wxBHh61cAUDuUXN7cDBxxxWptDLH9qVKycJVRArGSoPC1QnlFr9NLwiLEacKKdk0Y0Zcww==} engines: {node: '>=10.3.0'} hasBin: true dependencies: '@capacitor/cli': 3.6.0 - '@capacitor/project': 1.1.1_lr5yv43hchipyudzleywqpgwuy + '@capacitor/project': 1.1.1_zgusdg2syqzg2kik2gzyf5b6di '@changesets/cli': 2.21.1 '@ionic/utils-array': 2.1.5 '@ionic/utils-fs': 3.1.5 @@ -1692,7 +1692,7 @@ packages: '@capacitor/core': 3.6.0 dev: false - /@capacitor/project/1.1.1_lr5yv43hchipyudzleywqpgwuy: + /@capacitor/project/1.1.1_zgusdg2syqzg2kik2gzyf5b6di: resolution: {integrity: sha512-YBMsIMhnfEU6hREKaLKvhPW92AGedXF0DkJjb+TjDGWn3wbYpAVGD9vogRojJCVkjW9MQGUz4AOgAu6T4RLCxw==} dependencies: '@capacitor/cli': 3.6.0 @@ -1712,7 +1712,7 @@ packages: replace: 1.2.1 tempy: 1.0.1 tmp: 0.2.1 - ts-node: 10.4.0_lr5yv43hchipyudzleywqpgwuy + ts-node: 10.4.0_zgusdg2syqzg2kik2gzyf5b6di xcode: 3.0.1 xpath: 0.0.32 yargs: 17.3.1 @@ -1788,8 +1788,8 @@ packages: '@capacitor/core': 3.6.0 dev: false - /@capgo/capacitor-updater/3.3.12_@capacitor+core@3.6.0: - resolution: {integrity: sha512-0GOnyiTqLS7hSTYuCeO5OPiTZ+YNtyYNN8mlKg8DdSFc4UAeNliAEFcc0z0WN4MWtUTB1XGzH8bDDbk8SE9TIw==} + /@capgo/capacitor-updater/4.0.0-alpha.19_@capacitor+core@3.6.0: + resolution: {integrity: sha512-eVwAaYyEJ4gKbnsnZK3+oKVQ2a4iNlD5KY4CYoFDh4MHTZOJhcHmmC6u2LWTvj90ns65suBV65+F6nu4FKlFRg==} peerDependencies: '@capacitor/core': ^3.0.0 dependencies: @@ -2621,7 +2621,7 @@ packages: resolution: {integrity: sha512-+IXLiQ0V+9muzEf7RT9t9wEh6hNIK+kq+34Lce8W+DYny/jaFxPWIU4REYja3xC16kV7q+fz4I3vFz03gh7ysA==} engines: {node: '>= 12'} - /@intlify/vite-plugin-vue-i18n/4.0.0_krmxvkyjildqapt6of732e4fvy: + /@intlify/vite-plugin-vue-i18n/4.0.0_i5cftpqtlusdawbczcfmwd3bya: resolution: {integrity: sha512-bX7WgJAnYAbhmfvMp17TjCzg4e4T68O7iqAcNo6TOS+oHK0kAJAN9AJfEMTdpDrAwURCw0VwZ0kgMFWDbJkY4g==} engines: {node: '>= 12'} peerDependencies: @@ -2640,7 +2640,7 @@ packages: debug: 4.3.4 fast-glob: 3.2.11 source-map: 0.6.1 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 vue-i18n: 9.2.0-beta.36_vue@3.2.37 transitivePeerDependencies: - supports-color @@ -2922,8 +2922,8 @@ packages: strip-ansi: 7.0.1 supports-color: 9.2.1 tmp-promise: 3.0.3 - ts-node: 10.8.2_wr6ehniinz6rrxhwoejvl6gimq - typescript: 4.7.3 + ts-node: 10.8.2_34uafma2v7g2sbnzhoxxuaxgau + typescript: 4.7.4 update-notifier: 5.1.0 uuid: 8.3.2 yargs: 17.3.1 @@ -4310,7 +4310,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/5.26.0_tj6rtqnlddtgb6pfstzfechs3a: + /@typescript-eslint/eslint-plugin/5.26.0_umhtdcosdgp7wudwz65trwomxy: resolution: {integrity: sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4321,23 +4321,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/parser': 5.26.0_4x5o4skxv6sl53vpwefgt23khm '@typescript-eslint/scope-manager': 5.26.0 - '@typescript-eslint/type-utils': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 - '@typescript-eslint/utils': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/type-utils': 5.26.0_4x5o4skxv6sl53vpwefgt23khm + '@typescript-eslint/utils': 5.26.0_4x5o4skxv6sl53vpwefgt23khm debug: 4.3.4 eslint: 8.19.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.3 - typescript: 4.7.3 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.26.0_zi6vhgfvjwwpz4aow2huzz5d74: + /@typescript-eslint/parser/5.26.0_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4349,10 +4349,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.3 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.4 debug: 4.3.4 eslint: 8.19.0 - typescript: 4.7.3 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true @@ -4365,7 +4365,7 @@ packages: '@typescript-eslint/visitor-keys': 5.26.0 dev: true - /@typescript-eslint/type-utils/5.26.0_zi6vhgfvjwwpz4aow2huzz5d74: + /@typescript-eslint/type-utils/5.26.0_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4375,11 +4375,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/utils': 5.26.0_4x5o4skxv6sl53vpwefgt23khm debug: 4.3.4 eslint: 8.19.0 - tsutils: 3.21.0_typescript@4.7.3 - typescript: 4.7.3 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true @@ -4389,7 +4389,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.26.0_tklrwkvscq4xhsdsxjvhuey3ia: + /@typescript-eslint/typescript-estree/5.26.0_maiuxvsm6lzvgerq4xyaay3dy4: resolution: {integrity: sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4404,13 +4404,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.3 - typescript: 4.7.3 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree/5.26.0_typescript@4.7.3: + /@typescript-eslint/typescript-estree/5.26.0_typescript@4.7.4: resolution: {integrity: sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4425,13 +4425,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.3 - typescript: 4.7.3 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.26.0_zi6vhgfvjwwpz4aow2huzz5d74: + /@typescript-eslint/utils/5.26.0_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4440,7 +4440,7 @@ packages: '@types/json-schema': 7.0.9 '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.3 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.4 eslint: 8.19.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.19.0 @@ -4495,14 +4495,14 @@ packages: - supports-color dev: true - /@vitejs/plugin-vue/2.3.3_vite@2.9.13+vue@3.2.37: + /@vitejs/plugin-vue/2.3.3_vite@2.9.14+vue@3.2.37: resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} engines: {node: '>=12.0.0'} peerDependencies: vite: ^2.5.10 vue: ^3.2.25 dependencies: - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 vue: 3.2.37 dev: true @@ -6692,8 +6692,8 @@ packages: resolution: {integrity: sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==} dev: true - /cypress/9.7.0: - resolution: {integrity: sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==} + /cypress/10.3.0: + resolution: {integrity: sha512-txkQWKzvBVnWdCuKs5Xc08gjpO89W2Dom2wpZgT9zWZT5jXxqPIxqP/NC1YArtkpmp3fN5HW8aDjYBizHLUFvg==} engines: {node: '>=12.0.0'} hasBin: true requiresBuild: true @@ -6754,7 +6754,7 @@ packages: engines: {node: '>=8'} /dashdash/1.14.1: - resolution: {integrity: sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=} + resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} dependencies: assert-plus: 1.0.0 @@ -7092,7 +7092,7 @@ packages: slash: 3.0.0 /delayed-stream/1.0.0: - resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=} + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: true @@ -7217,10 +7217,10 @@ packages: resolution: {integrity: sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==} engines: {node: ^12.20.0 || ^14.14.0 || >=16.0.0} dependencies: - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.3 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.4 ast-module-types: 3.0.0 node-source-walk: 5.0.0 - typescript: 4.7.3 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true @@ -7229,10 +7229,10 @@ packages: resolution: {integrity: sha512-lR78AugfUSBojwlSRZBeEqQ1l8LI7rbxOl1qTUnGLcjZQDjZmrZCb7R46rK8U8B5WzFvJrxa7fEBA8FoD/n5fA==} engines: {node: ^12.20.0 || ^14.14.0 || >=16.0.0} dependencies: - '@typescript-eslint/typescript-estree': 5.26.0_tklrwkvscq4xhsdsxjvhuey3ia + '@typescript-eslint/typescript-estree': 5.26.0_maiuxvsm6lzvgerq4xyaay3dy4 ast-module-types: 3.0.0 node-source-walk: 5.0.0 - typescript: 4.7.3 + typescript: 4.7.4 transitivePeerDependencies: - supports-color dev: true @@ -7385,7 +7385,7 @@ packages: resolution: {integrity: sha512-CEj8FwwNA4cVH2uFCoHUrmojhYh1vmCdOaneKJXwkeY1i9jnlslVo9dx+hQ5Hl9GnH/Bwy/IjxAyOePyPKYnzA==} /ecc-jsbn/0.1.2: - resolution: {integrity: sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=} + resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} dependencies: jsbn: 0.1.1 safer-buffer: 2.1.2 @@ -8034,7 +8034,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/parser': 5.26.0_4x5o4skxv6sl53vpwefgt23khm debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -8042,10 +8042,10 @@ packages: - supports-color dev: true - /eslint-plugin-antfu/0.25.2_zi6vhgfvjwwpz4aow2huzz5d74: + /eslint-plugin-antfu/0.25.2_4x5o4skxv6sl53vpwefgt23khm: resolution: {integrity: sha512-yRhuFMwUKhSYm8BWTZsW4ymYnFPCJWZb2LzjG+mQb7JbKflk73JIFMCREPOaV4nWwc4YJEPhym75QsC7AFbqSw==} dependencies: - '@typescript-eslint/utils': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/utils': 5.26.0_4x5o4skxv6sl53vpwefgt23khm transitivePeerDependencies: - eslint - supports-color @@ -8099,7 +8099,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_zi6vhgfvjwwpz4aow2huzz5d74 + '@typescript-eslint/parser': 5.26.0_4x5o4skxv6sl53vpwefgt23khm array-includes: 3.1.5 array.prototype.flat: 1.2.5 debug: 2.6.9 @@ -8700,7 +8700,7 @@ packages: dev: true /extsprintf/1.3.0: - resolution: {integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=} + resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} engines: {'0': node >=0.6.0} dev: true @@ -9092,7 +9092,7 @@ packages: dev: true /forever-agent/0.6.1: - resolution: {integrity: sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=} + resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true /form-data/2.3.3: @@ -9386,7 +9386,7 @@ packages: dev: true /getpass/0.1.7: - resolution: {integrity: sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=} + resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} dependencies: assert-plus: 1.0.0 dev: true @@ -10755,7 +10755,7 @@ packages: dev: true /isstream/0.1.2: - resolution: {integrity: sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=} + resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true /isurl/1.0.0: @@ -10867,7 +10867,7 @@ packages: dev: true /jsbn/0.1.1: - resolution: {integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM=} + resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} dev: true /jsesc/0.5.0: @@ -10911,7 +10911,7 @@ packages: dev: true /json-stringify-safe/5.0.1: - resolution: {integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=} + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} /json2csv/5.0.7: resolution: {integrity: sha512-YRZbUnyaJZLZUJSRi2G/MqahCyRv9n/ds+4oIetjDF3jWQA7AG7iSeKTiZiCNqtMZM7HDyt0e/W6lEnoGEmMGA==} @@ -11124,7 +11124,7 @@ packages: package-json: 6.5.0 /lazy-ass/1.6.0: - resolution: {integrity: sha1-eZllXoZGwX8In90YfRUNMyTVRRM=} + resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==} engines: {node: '> 0.8'} dev: true @@ -11377,7 +11377,7 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} /lodash.once/4.1.1: - resolution: {integrity: sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=} + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} dev: true /lodash.sortby/4.7.0: @@ -12752,7 +12752,7 @@ packages: engines: {node: '>=0.10.0'} /ospath/1.2.2: - resolution: {integrity: sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs=} + resolution: {integrity: sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==} dev: true /outdent/0.5.0: @@ -13190,7 +13190,7 @@ packages: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} /performance-now/2.1.0: - resolution: {integrity: sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=} + resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} dev: true /picocolors/1.0.0: @@ -13217,7 +13217,7 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - /pinia/2.0.14_vcmyupim4cga7k7f5hngmth5py: + /pinia/2.0.14_j6bzmzd4ujpabbp5objtwxyjp4: resolution: {integrity: sha512-0nPuZR4TetT/WcLN+feMSjWJku3SQU7dBbXC6uw+R6FLQJCsg+/0pzXyD82T1FmAYe0lsx+jnEDQ1BLgkRKlxA==} peerDependencies: '@vue/composition-api': ^1.4.0 @@ -13230,7 +13230,7 @@ packages: optional: true dependencies: '@vue/devtools-api': 6.1.4 - typescript: 4.7.3 + typescript: 4.7.4 vue: 3.2.37 vue-demi: 0.13.2_vue@3.2.37 dev: false @@ -13552,7 +13552,7 @@ packages: dev: true /proxy-from-env/1.0.0: - resolution: {integrity: sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=} + resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} dev: true /ps-list/8.1.0: @@ -13960,7 +13960,7 @@ packages: dev: false /request-progress/3.0.0: - resolution: {integrity: sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=} + resolution: {integrity: sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==} dependencies: throttleit: 1.0.0 dev: true @@ -14094,20 +14094,12 @@ packages: estree-walker: 0.6.1 dev: true - /rollup/2.70.2: - resolution: {integrity: sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - /rollup/2.75.7: resolution: {integrity: sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: true /run-async/2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -15128,11 +15120,11 @@ packages: dev: true /throttleit/1.0.0: - resolution: {integrity: sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=} + resolution: {integrity: sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==} dev: true /through/2.3.8: - resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=} + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} /through2-filter/3.0.0: resolution: {integrity: sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==} @@ -15313,7 +15305,7 @@ packages: resolution: {integrity: sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==} dev: true - /ts-node/10.4.0_lr5yv43hchipyudzleywqpgwuy: + /ts-node/10.4.0_zgusdg2syqzg2kik2gzyf5b6di: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -15339,11 +15331,11 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.7.3 + typescript: 4.7.4 yn: 3.1.1 dev: false - /ts-node/10.8.2_wr6ehniinz6rrxhwoejvl6gimq: + /ts-node/10.8.2_34uafma2v7g2sbnzhoxxuaxgau: resolution: {integrity: sha512-LYdGnoGddf1D6v8REPtIH+5iq/gTDuZqv2/UJUU7tKjuEU8xVZorBM+buCGNjj+pGEud+sOoM4CX3/YzINpENA==} hasBin: true peerDependencies: @@ -15369,7 +15361,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.7.3 + typescript: 4.7.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -15394,14 +15386,14 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - /tsutils/3.21.0_typescript@4.7.3: + /tsutils/3.21.0_typescript@4.7.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.7.3 + typescript: 4.7.4 dev: true /tty-table/2.8.13: @@ -15423,7 +15415,7 @@ packages: safe-buffer: 5.2.1 /tweetnacl/0.14.5: - resolution: {integrity: sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=} + resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} dev: true /type-check/0.3.2: @@ -15525,8 +15517,8 @@ packages: resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} dev: true - /typescript/4.7.3: - resolution: {integrity: sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==} + /typescript/4.7.4: + resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} engines: {node: '>=4.2.0'} hasBin: true @@ -15635,7 +15627,7 @@ packages: engines: {node: '>= 0.8'} dev: true - /unplugin-icons/0.14.7_an4lgmmlrau24p6bpvoomqupse: + /unplugin-icons/0.14.7_ye7sw5nid2es3e4qmkjro6ozy4: resolution: {integrity: sha512-TrNnEdpaXMdiG5BsCgvU6cv/gSLYvIk1f8wGCGZmOo4wmi3nqYBuqIEuiXhmmyXdDZuRRpCaOzCnCYYZ5H7U8g==} peerDependencies: '@svgr/core': '>=5.5.0' @@ -15659,7 +15651,7 @@ packages: debug: 4.3.4 kolorist: 1.5.1 local-pkg: 0.4.1 - unplugin: 0.7.1_vite@2.9.13 + unplugin: 0.7.1_vite@2.9.14 transitivePeerDependencies: - esbuild - rollup @@ -15668,7 +15660,7 @@ packages: - webpack dev: true - /unplugin/0.7.1_vite@2.9.13: + /unplugin/0.7.1_vite@2.9.14: resolution: {integrity: sha512-Z6hNDXDNh9aimMkPU1mEjtk+2ova8gh0y7rJeJdGH1vWZOHwF2lLQiQ/R97rv9ymmzEQXsR2fyMet72T8jy6ew==} peerDependencies: esbuild: '>=0.13' @@ -15687,7 +15679,7 @@ packages: dependencies: acorn: 8.7.1 chokidar: 3.5.3 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 webpack-sources: 3.2.3 webpack-virtual-modules: 0.4.4 dev: true @@ -15833,15 +15825,15 @@ packages: extsprintf: 1.3.0 dev: true - /vite-plugin-environment/1.1.1_vite@2.9.13: + /vite-plugin-environment/1.1.1_vite@2.9.14: resolution: {integrity: sha512-kbUAZaqmiHap+7aqRfMolRGzCGhJSU45qDjgLM11DpSDzmiI5JL4EzdyAIUZ4g0WrO88EV2cdcq2fpNYuJ17Pg==} peerDependencies: vite: ^2.7 dependencies: - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 dev: false - /vite-plugin-imagemin/0.6.1_vite@2.9.13: + /vite-plugin-imagemin/0.6.1_vite@2.9.14: resolution: {integrity: sha512-cP7LDn8euPrji7WYtDoNQpJEB9nkMxJHm/A+QZnvMrrCSuyo/clpMy/T1v7suDXPBavsDiDdFdVQB5p7VGD2cg==} peerDependencies: vite: '>=2.0.0' @@ -15869,12 +15861,12 @@ packages: imagemin-webp: 6.0.0 jpegtran-bin: 6.0.1 pathe: 0.2.0 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 transitivePeerDependencies: - supports-color dev: false - /vite-plugin-inspect/0.5.1_vite@2.9.13: + /vite-plugin-inspect/0.5.1_vite@2.9.14: resolution: {integrity: sha512-cSVdNhVPAfH3OdVSV331/t/YWjg++HR/KiBkVST8pjLISna7O8gRwU8NN7KLrEBJqKKQqoRYLBb0RSdYurEyeg==} engines: {node: '>=14'} peerDependencies: @@ -15885,12 +15877,12 @@ packages: kolorist: 1.5.1 sirv: 2.0.2 ufo: 0.8.4 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 transitivePeerDependencies: - supports-color dev: true - /vite-plugin-pages/0.25.0_an4lgmmlrau24p6bpvoomqupse: + /vite-plugin-pages/0.25.0_ye7sw5nid2es3e4qmkjro6ozy4: resolution: {integrity: sha512-q0SX2iSw0UrTnivkzsPb19ZxamShq1nE/e/CKOe8+uVg70/e14uJuzKnw7dZ2omPjmV9Lhks38nzJL6RDRGmeA==} peerDependencies: '@vue/compiler-sfc': ^2.7.0 || ^3.0.0 @@ -15908,13 +15900,13 @@ packages: json5: 2.2.1 local-pkg: 0.4.1 picocolors: 1.0.0 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 yaml: 2.1.1 transitivePeerDependencies: - supports-color dev: true - /vite-plugin-pwa/0.12.2_vite@2.9.13: + /vite-plugin-pwa/0.12.2_vite@2.9.14: resolution: {integrity: sha512-XK2oi1YZkoc1J8fyerNYxyh/yfb+INdrdOW/mOOD5DBLq7jVPxHQuncIhqiREbGOMlY/xMe9CSE7QZ9xIAEf7A==} peerDependencies: vite: ^2.0.0 || ^3.0.0-0 @@ -15923,7 +15915,7 @@ packages: fast-glob: 3.2.11 pretty-bytes: 6.0.0 rollup: 2.75.7 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 workbox-build: 6.5.3 workbox-window: 6.5.3 transitivePeerDependencies: @@ -15931,7 +15923,7 @@ packages: - supports-color dev: true - /vite-plugin-vue-layouts/0.6.0_ecv5zhukn2wee76aswaja5pyga: + /vite-plugin-vue-layouts/0.6.0_jvezqwqkuegqzldwnezrkfv7xi: resolution: {integrity: sha512-7QX7o/NpCfs+hyXphwYfmPqAEQ6qd4uXsvI0VsovjGT2eCoEE5dMdP6L+uqqNWY4uqv7oCvtinecZmbzZv/9Rg==} peerDependencies: vite: ^2.5.0 @@ -15941,14 +15933,14 @@ packages: '@vue/compiler-sfc': 3.2.37 debug: 4.3.3 fast-glob: 3.2.11 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 vue: 3.2.37 vue-router: 4.1.1_vue@3.2.37 transitivePeerDependencies: - supports-color dev: true - /vite-plugin-windicss/1.8.6_vite@2.9.13: + /vite-plugin-windicss/1.8.6_vite@2.9.14: resolution: {integrity: sha512-D4G4qmumgklPiPrq/ZALqq8Mby6krskFVShbmb5c+0VCSsLUN96qyFRTwi81rNIHwFvlbpqflgh+BpUM/9VjQg==} peerDependencies: vite: ^2.0.1 @@ -15956,14 +15948,14 @@ packages: '@windicss/plugin-utils': 1.8.6 debug: 4.3.4 kolorist: 1.5.1 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 windicss: 3.5.6 transitivePeerDependencies: - supports-color dev: true - /vite/2.9.13_sass@1.53.0: - resolution: {integrity: sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==} + /vite/2.9.14_sass@1.53.0: + resolution: {integrity: sha512-P/UCjSpSMcE54r4mPak55hWAZPlyfS369svib/gpmz8/01L822lMPOJ/RYW6tLCe1RPvMvOsJ17erf55bKp4Hw==} engines: {node: '>=12.2.0'} hasBin: true peerDependencies: @@ -15981,13 +15973,13 @@ packages: esbuild: 0.14.29 postcss: 8.4.14 resolve: 1.22.0 - rollup: 2.70.2 + rollup: 2.75.7 sass: 1.53.0 optionalDependencies: fsevents: 2.3.2 - /vitest/0.17.0_sass@1.53.0: - resolution: {integrity: sha512-5YO9ubHo0Zg35mea3+zZAr4sCku32C3usvIH5COeJB48TZV/R0J9aGNtGOOqEWZYfOKP0pGZUvTokne3x/QEFg==} + /vitest/0.17.1_sass@1.53.0: + resolution: {integrity: sha512-d6NsFC6FPmZ5XdiSYfW5rwJ/b8060wqe2steNNlVbhO69HWma6CucIm5g7PXlCSkmKvrdEbUsZHPAarlH83VGw==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -16016,7 +16008,7 @@ packages: local-pkg: 0.4.1 tinypool: 0.2.2 tinyspy: 0.3.3 - vite: 2.9.13_sass@1.53.0 + vite: 2.9.14_sass@1.53.0 transitivePeerDependencies: - less - sass @@ -16106,14 +16098,14 @@ packages: '@vue/devtools-api': 6.1.4 vue: 3.2.37 - /vue-tsc/0.38.3_typescript@4.7.3: + /vue-tsc/0.38.3_typescript@4.7.4: resolution: {integrity: sha512-mWlneSF+PG2kXYGJI12N4XEAG4ljAkae7IcB93fspqSkEt/oKwDbWy3DzcPSgUm0LsXqOUprTMaZkwDVSRBIvw==} hasBin: true peerDependencies: typescript: '*' dependencies: '@volar/vue-typescript': 0.38.3 - typescript: 4.7.3 + typescript: 4.7.4 dev: true /vue/3.2.37: diff --git a/scripts/utils.mjs b/scripts/utils.mjs index ee5db122b4..70ab4ab1d2 100644 --- a/scripts/utils.mjs +++ b/scripts/utils.mjs @@ -4,6 +4,8 @@ import keys from '../configs.json' assert {type: 'json'} config() export const branch = process.env.BRANCH || process.env.GITHUB_HEAD_REF || 'main' +console.log('Branch', branch) + export const getRightKey = (keyname) => { // console.log('getRightKey', branch, keyname) if (!keys || !keys[keyname]) diff --git a/src/services/versions.ts b/src/services/versions.ts index 07119600b6..323cbe0305 100644 --- a/src/services/versions.ts +++ b/src/services/versions.ts @@ -1,5 +1,4 @@ import { isPlatform, loadingController, toastController } from '@ionic/vue' -import { SplashScreen } from '@capacitor/splash-screen' import { CapacitorUpdater } from '@capgo/capacitor-updater' import { useSupabase } from './supabase' import type { definitions } from '~/types/supabase' @@ -29,17 +28,19 @@ export const openVersion = async (app: definitions['app_versions'], userId: stri if (signedURL && isPlatform('capacitor')) { try { - SplashScreen.show() const newBundle = await CapacitorUpdater.download({ url: signedURL, }) - await CapacitorUpdater.set({ - version: newBundle.version, - versionName: app.name, - }) + const current = await CapacitorUpdater.current() + console.log('current', current) + await CapacitorUpdater.next({ id: current.bundle.id }) + // iso date in one hour + const expires = new Date(Date.now() + 1000 * 60 * 60).toISOString() + await CapacitorUpdater.setDelay({ kind: 'date', value: expires }) + await CapacitorUpdater.set(newBundle) } catch (error) { - console.error(error) + console.error('Error', error) const toast = await toastController .create({ message: 'Cannot set this version', @@ -47,7 +48,6 @@ export const openVersion = async (app: definitions['app_versions'], userId: stri }) await toast.present() } - SplashScreen.show() await loading.dismiss() } else { From b84404d5c7e991486bde7b5b5d21a6a209a49b52 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Sun, 10 Jul 2022 22:20:39 +0200 Subject: [PATCH 02/12] trigger CI From f9d660b6cb1cb3707d9c674278efd336e8a72216 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Sun, 10 Jul 2022 22:37:13 +0200 Subject: [PATCH 03/12] fix: make android work --- android/app/build.gradle | 1 + .../ee/forgr/capacitor_go/MainActivity.java | 56 +++++++++---------- android/variables.gradle | 2 +- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 55fe4ff3d8..944d3a617f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -33,6 +33,7 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" implementation project(':capacitor-android') + implementation 'com.android.volley:volley:1.2.0' testImplementation "junit:junit:$junitVersion" androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" diff --git a/android/app/src/main/java/ee/forgr/capacitor_go/MainActivity.java b/android/app/src/main/java/ee/forgr/capacitor_go/MainActivity.java index ad6563814f..6a333a20e4 100644 --- a/android/app/src/main/java/ee/forgr/capacitor_go/MainActivity.java +++ b/android/app/src/main/java/ee/forgr/capacitor_go/MainActivity.java @@ -4,16 +4,20 @@ import android.app.AlertDialog; import android.content.DialogInterface; import android.content.SharedPreferences; -import android.content.pm.PackageManager; import android.hardware.SensorManager; + +import ee.forgr.capacitor_updater.BundleInfo; import ee.forgr.capacitor_updater.CapacitorUpdater; + +import com.android.volley.toolbox.Volley; import com.getcapacitor.Bridge; import com.getcapacitor.BridgeActivity; import android.os.Bundle; import android.util.Log; + +import com.getcapacitor.plugin.WebView; import com.squareup.seismic.ShakeDetector; -import java.io.File; import java.text.MessageFormat; public class MainActivity extends BridgeActivity implements ShakeDetector.Listener { @@ -38,17 +42,12 @@ public void onStart() { @Override public void hearShake() { Log.i("Capgo", "hearShake"); - CapacitorUpdater updater; - String LatestVersionAutoUpdate = prefs.getString("LatestVersionAutoUpdate", ""); - try { - updater = new CapacitorUpdater(this.bridge.getContext()); - } catch (PackageManager.NameNotFoundException e) { - e.printStackTrace(); - return; - } - Log.i("Capgo hearShake", updater.getLastPathHot()); - - if (updater.getLastPathHot() == "public" || isShow || updater.getLastPathHot().contains(LatestVersionAutoUpdate)) { + CapacitorUpdater updater = new CapacitorUpdater(); + updater.prefs = this.bridge.getContext().getSharedPreferences(WebView.WEBVIEW_PREFS_NAME, Activity.MODE_PRIVATE); + updater.editor = this.prefs.edit(); + updater.documentsDir = this.bridge.getContext().getFilesDir(); + updater.requestQueue = Volley.newRequestQueue(this.bridge.getContext()); + if (isShow) { return; } isShow = true; @@ -65,29 +64,26 @@ public void onStart() { builder.setPositiveButton(okButtonTitle, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked OK button - String serverBasePath = updater.getLastPathHot(); - File fHot = new File(serverBasePath); - String versionName = updater.getVersionName(); - String LatestVersionNameAutoUpdate = prefs.getString("LatestVersionNameAutoUpdate", ""); - Boolean isAssets = true; - if (!LatestVersionAutoUpdate.equals("") && !LatestVersionNameAutoUpdate.equals("")) { - isAssets = !updater.set(LatestVersionAutoUpdate, LatestVersionNameAutoUpdate); + BundleInfo current = updater.getCurrentBundle(); + Log.i(CapacitorUpdater.TAG, "get next: "); + BundleInfo next = updater.getNextBundle(); + Log.i(CapacitorUpdater.TAG, "next: " + next.toString()); + if (!next.isBuiltin()) { + updater.set(next.getId()); } else { updater.reset(); } - if (isAssets) { - updater.reset(); - String pathHot = updater.getLastPathHot(); - brd.setServerAssetPath(pathHot); + final String path = updater.getCurrentBundlePath(); + Log.i(CapacitorUpdater.TAG, "Reloading: " + path); + if(updater.isUsingBuiltin()) { + brd.setServerAssetPath(path); } else { - String pathHot = updater.getLastPathHot(); - brd.setServerBasePath(pathHot); + brd.setServerBasePath(path); } try { - String name = fHot.getName(); - updater.delete(name, versionName); + updater.delete(current.getId()); } catch (Exception err) { - Log.i("Capgo", "Cannot delete version " + versionName, err); + Log.i("Capgo", "Cannot delete version " + current.getId(), err); } Log.i("Capgo", "Capgo: Reload app done"); dialog.dismiss(); @@ -97,7 +93,7 @@ public void onClick(DialogInterface dialog, int id) { builder.setNeutralButton(reloadButtonTitle, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Log.i("Capgo", reloadButtonTitle); - String pathHot = updater.getLastPathHot(); + String pathHot = updater.getCurrentBundlePath(); brd.setServerBasePath(pathHot); dialog.dismiss(); isShow = false; diff --git a/android/variables.gradle b/android/variables.gradle index b175892c88..c72944df05 100644 --- a/android/variables.gradle +++ b/android/variables.gradle @@ -1,6 +1,6 @@ ext { minSdkVersion = 23 - compileSdkVersion = 31 + compileSdkVersion = 32 targetSdkVersion = 30 androidxActivityVersion = '1.2.0' androidxAppCompatVersion = '1.2.0' From 5f819a82dbf76ce1215231d2b43a0248ee111255 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 21 Jul 2022 14:13:55 +0000 Subject: [PATCH 04/12] chore(release): 1.8.7-alpha.0 --- CHANGELOG.md | 8 ++++++++ android/app/build.gradle | 4 ++-- ios/App/App.xcodeproj/project.pbxproj | 8 ++++---- package.json | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d25950c33b..890fdcd5c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.8.7-alpha.0](https://github.com/Cap-go/capgo/compare/1.8.6...1.8.7-alpha.0) (2022-07-21) + + +### Bug Fixes + +* :boom: update to v4 ([44ca2e4](https://github.com/Cap-go/capgo/commit/44ca2e405e44349c5e7c8d66edcd5a54594fc9e4)) +* make android work ([f9d660b](https://github.com/Cap-go/capgo/commit/f9d660b6cb1cb3707d9c674278efd336e8a72216)) + ### [1.8.6](https://github.com/Cap-go/capgo/compare/1.8.5...1.8.6) (2022-07-21) diff --git a/android/app/build.gradle b/android/app/build.gradle index 944d3a617f..47dcbe7700 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "ee.forgr.capacitor_go" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1080600 - versionName "1.8.6" + versionCode 1087000 + versionName "1.8.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index bf615a5e72..603005207c 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -349,12 +349,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "1.8.6"; + CURRENT_PROJECT_VERSION = "1.8.7"; DEVELOPMENT_TEAM = UVTJ336J2D; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = "1.8.6"; + MARKETING_VERSION = "1.8.7"; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = ee.forgr.capacitorgo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -371,12 +371,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "1.8.6"; + CURRENT_PROJECT_VERSION = "1.8.7"; DEVELOPMENT_TEAM = UVTJ336J2D; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = "1.8.6"; + MARKETING_VERSION = "1.8.7"; PRODUCT_BUNDLE_IDENTIFIER = ee.forgr.capacitorgo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; diff --git a/package.json b/package.json index f8235f7a89..98124a6eaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.8.6", + "version": "1.8.7-alpha.0", "scripts": { "build": "vite build", "test": "cypress open", From 638f3b9a2d37345e4539ba594133b9f927c71672 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Fri, 22 Jul 2022 15:22:13 +0100 Subject: [PATCH 05/12] fix: add deleted_modal and system --- locales/de.yml | 1 + locales/en.yml | 2 + locales/es.yml | 1 + locales/fr.yml | 1 + locales/id.yml | 1 + locales/it.yml | 1 + locales/ja.yml | 1 + locales/ko.yml | 1 + locales/pl.yml | 1 + locales/pt-BR.yml | 1 + locales/ru.yml | 1 + locales/tr.yml | 1 + locales/vi.yml | 1 + locales/zh-CN.yml | 1 + src/pages/app/account.vue | 21 +- src/types/supabase.ts | 286 ++++++++++++++++++++ supabase/functions/_utils/types_supabase.ts | 286 ++++++++++++++++++++ 17 files changed, 604 insertions(+), 4 deletions(-) diff --git a/locales/de.yml b/locales/de.yml index f541b4cfda..c4a23921e9 100644 --- a/locales/de.yml +++ b/locales/de.yml @@ -3,6 +3,7 @@ account: billing: Abrechnung changePassword: Kennwort ändern delete-account: Mein Konto löschen + delete_sure: Bist du dir sicher ? discord: Zwietracht heading: Konto keys: API-Schlüssel diff --git a/locales/en.yml b/locales/en.yml index 786a49dbc9..69cfc295cc 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -3,7 +3,9 @@ account: billing: Billing changePassword: Change password delete-account: Delete my account + delete_sure: Are you sure ? discord: Discord + error: Error heading: Account keys: API keys legal: Terms of services diff --git a/locales/es.yml b/locales/es.yml index a7fc26133b..4c97c3ccf1 100644 --- a/locales/es.yml +++ b/locales/es.yml @@ -3,6 +3,7 @@ account: billing: Facturación changePassword: Cambia la contraseña delete-account: Borrar mi cuenta + delete_sure: Está seguro ? discord: Discordia heading: Cuenta keys: claves API diff --git a/locales/fr.yml b/locales/fr.yml index 30342f0f91..44e1918bb8 100644 --- a/locales/fr.yml +++ b/locales/fr.yml @@ -3,6 +3,7 @@ account: billing: Facturation changePassword: Changer le mot de passe delete-account: Supprimer mon compte + delete_sure: Êtes-vous sûr ? discord: Discorde heading: Compte keys: Clés API diff --git a/locales/id.yml b/locales/id.yml index f32492ebe1..44838c1b32 100644 --- a/locales/id.yml +++ b/locales/id.yml @@ -3,6 +3,7 @@ account: billing: Penagihan changePassword: Ganti kata sandi delete-account: Hapus akun Saya + delete_sure: Apa kamu yakin ? discord: Perselisihan heading: Akun keys: kunci API diff --git a/locales/it.yml b/locales/it.yml index e76b066375..4617f9524f 100644 --- a/locales/it.yml +++ b/locales/it.yml @@ -3,6 +3,7 @@ account: billing: Fatturazione changePassword: Cambiare la password delete-account: Cancella il mio account + delete_sure: Sei sicuro ? discord: Discordia heading: Account keys: Chiavi API diff --git a/locales/ja.yml b/locales/ja.yml index 7632dc042a..9ab5b33c29 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -3,6 +3,7 @@ account: billing: 請求する changePassword: パスワードを変更する delete-account: アカウントを削除します + delete_sure: 本気ですか ? discord: 不和 heading: アカウント keys: APIキー diff --git a/locales/ko.yml b/locales/ko.yml index 06140bb6d1..553e918b78 100644 --- a/locales/ko.yml +++ b/locales/ko.yml @@ -3,6 +3,7 @@ account: billing: 청구 changePassword: 비밀번호 변경 delete-account: 계정을 삭제하다 + delete_sure: 확실합니까 ? discord: 불화 heading: 계정 keys: API 키 diff --git a/locales/pl.yml b/locales/pl.yml index 60744dd4c3..69bdc9ad2d 100644 --- a/locales/pl.yml +++ b/locales/pl.yml @@ -3,6 +3,7 @@ account: billing: Dane do faktury changePassword: Zmień hasło delete-account: Usuń moje konto + delete_sure: Jesteś pewny ? discord: Niezgoda heading: Rachunek keys: Klucze API diff --git a/locales/pt-BR.yml b/locales/pt-BR.yml index 62898100dd..fd7fbc47ab 100644 --- a/locales/pt-BR.yml +++ b/locales/pt-BR.yml @@ -3,6 +3,7 @@ account: billing: Cobrança changePassword: Mudar senha delete-account: Deletar minha conta + delete_sure: Tem certeza ? discord: Discórdia heading: Conta keys: Chaves de API diff --git a/locales/ru.yml b/locales/ru.yml index 51b13a3c8d..5d582c818e 100644 --- a/locales/ru.yml +++ b/locales/ru.yml @@ -3,6 +3,7 @@ account: billing: Выставление счетов changePassword: Изменить пароль delete-account: Удалите мой аккаунт + delete_sure: Ты уверен ? discord: Раздор heading: Счет keys: ключи API diff --git a/locales/tr.yml b/locales/tr.yml index 7650b734c7..c48e1f54c6 100644 --- a/locales/tr.yml +++ b/locales/tr.yml @@ -3,6 +3,7 @@ account: billing: faturalandırma changePassword: Şifre değiştir delete-account: Hesabımı sil + delete_sure: Emin misin ? discord: anlaşmazlık heading: Hesap keys: API anahtarları diff --git a/locales/vi.yml b/locales/vi.yml index 61a964e915..0532075994 100644 --- a/locales/vi.yml +++ b/locales/vi.yml @@ -3,6 +3,7 @@ account: billing: Thanh toán changePassword: Đổi mật khẩu delete-account: Xóa tài khoản của tôi đi + delete_sure: Bạn có chắc không ? discord: Bất hòa heading: Tài khoản keys: Khóa API diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 4bf91bd839..4bbabd0d48 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -3,6 +3,7 @@ account: billing: 计费 changePassword: 更改密码 delete-account: 删除我的账户 + delete_sure: 你确定吗 ? discord: 不和谐 heading: 帐户 keys: API 密钥 diff --git a/src/pages/app/account.vue b/src/pages/app/account.vue index 5e98f7e0ab..67405a72c9 100644 --- a/src/pages/app/account.vue +++ b/src/pages/app/account.vue @@ -15,10 +15,11 @@ import { useI18n } from 'vue-i18n' import { useRouter } from 'vue-router' import { Filesystem } from '@capacitor/filesystem' import TitleHead from '~/components/TitleHead.vue' -import { openChat, sendMessage } from '~/services/crips' +import { openChat } from '~/services/crips' import { useMainStore } from '~/stores/main' import { useSupabase } from '~/services/supabase' import { openPortal } from '~/services/stripe' +import type { definitions } from '~/types/supabase' const { t } = useI18n() const supabase = useSupabase() @@ -125,12 +126,24 @@ const pickPhoto = async () => { const deleteAccount = async () => { const actionSheet = await actionSheetController.create({ + header: t('account.delete_sure'), buttons: [ { text: t('button.remove'), - handler: () => { - sendMessage('delete my account') - openChat() + handler: async () => { + const { error } = await supabase + .from('deleted_account') + .insert({ + email: main.auth?.email, + }) + if (error) { + console.error(error) + errorMessage.value = t('something-went-wrong-try-again-later') + } + else { + await main.logout() + router.replace('/login') + } }, }, { diff --git a/src/types/supabase.ts b/src/types/supabase.ts index 7542fd4c8a..ca4f49353b 100644 --- a/src/types/supabase.ts +++ b/src/types/supabase.ts @@ -882,6 +882,99 @@ export interface paths { }; }; }; + "/deleted_account": { + get: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + /** Filtering Columns */ + select?: parameters["select"]; + /** Ordering */ + order?: parameters["order"]; + /** Limiting and Pagination */ + offset?: parameters["offset"]; + /** Limiting and Pagination */ + limit?: parameters["limit"]; + }; + header: { + /** Limiting and Pagination */ + Range?: parameters["range"]; + /** Limiting and Pagination */ + "Range-Unit"?: parameters["rangeUnit"]; + /** Preference */ + Prefer?: parameters["preferCount"]; + }; + }; + responses: { + /** OK */ + 200: { + schema: definitions["deleted_account"][]; + }; + /** Partial Content */ + 206: unknown; + }; + }; + post: { + parameters: { + body: { + /** deleted_account */ + deleted_account?: definitions["deleted_account"]; + }; + query: { + /** Filtering Columns */ + select?: parameters["select"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** Created */ + 201: unknown; + }; + }; + delete: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + patch: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + }; + body: { + /** deleted_account */ + deleted_account?: definitions["deleted_account"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + }; "/devices": { get: { parameters: { @@ -1770,6 +1863,99 @@ export interface paths { }; }; }; + "/tasks": { + get: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + /** Filtering Columns */ + select?: parameters["select"]; + /** Ordering */ + order?: parameters["order"]; + /** Limiting and Pagination */ + offset?: parameters["offset"]; + /** Limiting and Pagination */ + limit?: parameters["limit"]; + }; + header: { + /** Limiting and Pagination */ + Range?: parameters["range"]; + /** Limiting and Pagination */ + "Range-Unit"?: parameters["rangeUnit"]; + /** Preference */ + Prefer?: parameters["preferCount"]; + }; + }; + responses: { + /** OK */ + 200: { + schema: definitions["tasks"][]; + }; + /** Partial Content */ + 206: unknown; + }; + }; + post: { + parameters: { + body: { + /** tasks */ + tasks?: definitions["tasks"]; + }; + query: { + /** Filtering Columns */ + select?: parameters["select"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** Created */ + 201: unknown; + }; + }; + delete: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + patch: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + }; + body: { + /** tasks */ + tasks?: definitions["tasks"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + }; "/users": { get: { parameters: { @@ -1934,6 +2120,26 @@ export interface paths { }; }; }; + "/rpc/is_not_deleted": { + post: { + parameters: { + body: { + args: { + /** Format: character varying */ + email_check: string; + }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/get_max_channel": { post: { parameters: { @@ -2290,6 +2496,23 @@ export interface paths { }; }; }; + "/rpc/count_all_apps": { + post: { + parameters: { + body: { + args: { [key: string]: unknown }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/exist_user": { post: { parameters: { @@ -2354,6 +2577,23 @@ export interface paths { }; }; }; + "/rpc/count_all_updates": { + post: { + parameters: { + body: { + args: { [key: string]: unknown }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/is_allowed_action": { post: { parameters: { @@ -2712,6 +2952,21 @@ export interface definitions { */ beta?: boolean; }; + deleted_account: { + /** + * Format: bigint + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: timestamp with time zone + * @default now() + */ + created_at?: string; + /** Format: character varying */ + email: string; + }; devices: { /** * Format: timestamp with time zone @@ -3041,6 +3296,21 @@ export interface definitions { */ is_good_plan?: boolean; }; + tasks: { + /** + * Format: bigint + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: timestamp with time zone + * @default now() + */ + created_at?: string; + /** Format: text */ + url: string; + }; users: { /** * Format: timestamp with time zone @@ -3273,6 +3543,14 @@ export interface parameters { "rowFilter.channels.disableAutoUpdateToMajor": string; /** Format: boolean */ "rowFilter.channels.beta": string; + /** @description deleted_account */ + "body.deleted_account": definitions["deleted_account"]; + /** Format: bigint */ + "rowFilter.deleted_account.id": string; + /** Format: timestamp with time zone */ + "rowFilter.deleted_account.created_at": string; + /** Format: character varying */ + "rowFilter.deleted_account.email": string; /** @description devices */ "body.devices": definitions["devices"]; /** Format: timestamp with time zone */ @@ -3433,6 +3711,14 @@ export interface parameters { "rowFilter.stripe_info.price_id": string; /** Format: boolean */ "rowFilter.stripe_info.is_good_plan": string; + /** @description tasks */ + "body.tasks": definitions["tasks"]; + /** Format: bigint */ + "rowFilter.tasks.id": string; + /** Format: timestamp with time zone */ + "rowFilter.tasks.created_at": string; + /** Format: text */ + "rowFilter.tasks.url": string; /** @description users */ "body.users": definitions["users"]; /** Format: timestamp with time zone */ diff --git a/supabase/functions/_utils/types_supabase.ts b/supabase/functions/_utils/types_supabase.ts index 7542fd4c8a..ca4f49353b 100644 --- a/supabase/functions/_utils/types_supabase.ts +++ b/supabase/functions/_utils/types_supabase.ts @@ -882,6 +882,99 @@ export interface paths { }; }; }; + "/deleted_account": { + get: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + /** Filtering Columns */ + select?: parameters["select"]; + /** Ordering */ + order?: parameters["order"]; + /** Limiting and Pagination */ + offset?: parameters["offset"]; + /** Limiting and Pagination */ + limit?: parameters["limit"]; + }; + header: { + /** Limiting and Pagination */ + Range?: parameters["range"]; + /** Limiting and Pagination */ + "Range-Unit"?: parameters["rangeUnit"]; + /** Preference */ + Prefer?: parameters["preferCount"]; + }; + }; + responses: { + /** OK */ + 200: { + schema: definitions["deleted_account"][]; + }; + /** Partial Content */ + 206: unknown; + }; + }; + post: { + parameters: { + body: { + /** deleted_account */ + deleted_account?: definitions["deleted_account"]; + }; + query: { + /** Filtering Columns */ + select?: parameters["select"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** Created */ + 201: unknown; + }; + }; + delete: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + patch: { + parameters: { + query: { + id?: parameters["rowFilter.deleted_account.id"]; + created_at?: parameters["rowFilter.deleted_account.created_at"]; + email?: parameters["rowFilter.deleted_account.email"]; + }; + body: { + /** deleted_account */ + deleted_account?: definitions["deleted_account"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + }; "/devices": { get: { parameters: { @@ -1770,6 +1863,99 @@ export interface paths { }; }; }; + "/tasks": { + get: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + /** Filtering Columns */ + select?: parameters["select"]; + /** Ordering */ + order?: parameters["order"]; + /** Limiting and Pagination */ + offset?: parameters["offset"]; + /** Limiting and Pagination */ + limit?: parameters["limit"]; + }; + header: { + /** Limiting and Pagination */ + Range?: parameters["range"]; + /** Limiting and Pagination */ + "Range-Unit"?: parameters["rangeUnit"]; + /** Preference */ + Prefer?: parameters["preferCount"]; + }; + }; + responses: { + /** OK */ + 200: { + schema: definitions["tasks"][]; + }; + /** Partial Content */ + 206: unknown; + }; + }; + post: { + parameters: { + body: { + /** tasks */ + tasks?: definitions["tasks"]; + }; + query: { + /** Filtering Columns */ + select?: parameters["select"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** Created */ + 201: unknown; + }; + }; + delete: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + patch: { + parameters: { + query: { + id?: parameters["rowFilter.tasks.id"]; + created_at?: parameters["rowFilter.tasks.created_at"]; + url?: parameters["rowFilter.tasks.url"]; + }; + body: { + /** tasks */ + tasks?: definitions["tasks"]; + }; + header: { + /** Preference */ + Prefer?: parameters["preferReturn"]; + }; + }; + responses: { + /** No Content */ + 204: never; + }; + }; + }; "/users": { get: { parameters: { @@ -1934,6 +2120,26 @@ export interface paths { }; }; }; + "/rpc/is_not_deleted": { + post: { + parameters: { + body: { + args: { + /** Format: character varying */ + email_check: string; + }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/get_max_channel": { post: { parameters: { @@ -2290,6 +2496,23 @@ export interface paths { }; }; }; + "/rpc/count_all_apps": { + post: { + parameters: { + body: { + args: { [key: string]: unknown }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/exist_user": { post: { parameters: { @@ -2354,6 +2577,23 @@ export interface paths { }; }; }; + "/rpc/count_all_updates": { + post: { + parameters: { + body: { + args: { [key: string]: unknown }; + }; + header: { + /** Preference */ + Prefer?: parameters["preferParams"]; + }; + }; + responses: { + /** OK */ + 200: unknown; + }; + }; + }; "/rpc/is_allowed_action": { post: { parameters: { @@ -2712,6 +2952,21 @@ export interface definitions { */ beta?: boolean; }; + deleted_account: { + /** + * Format: bigint + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: timestamp with time zone + * @default now() + */ + created_at?: string; + /** Format: character varying */ + email: string; + }; devices: { /** * Format: timestamp with time zone @@ -3041,6 +3296,21 @@ export interface definitions { */ is_good_plan?: boolean; }; + tasks: { + /** + * Format: bigint + * @description Note: + * This is a Primary Key. + */ + id: number; + /** + * Format: timestamp with time zone + * @default now() + */ + created_at?: string; + /** Format: text */ + url: string; + }; users: { /** * Format: timestamp with time zone @@ -3273,6 +3543,14 @@ export interface parameters { "rowFilter.channels.disableAutoUpdateToMajor": string; /** Format: boolean */ "rowFilter.channels.beta": string; + /** @description deleted_account */ + "body.deleted_account": definitions["deleted_account"]; + /** Format: bigint */ + "rowFilter.deleted_account.id": string; + /** Format: timestamp with time zone */ + "rowFilter.deleted_account.created_at": string; + /** Format: character varying */ + "rowFilter.deleted_account.email": string; /** @description devices */ "body.devices": definitions["devices"]; /** Format: timestamp with time zone */ @@ -3433,6 +3711,14 @@ export interface parameters { "rowFilter.stripe_info.price_id": string; /** Format: boolean */ "rowFilter.stripe_info.is_good_plan": string; + /** @description tasks */ + "body.tasks": definitions["tasks"]; + /** Format: bigint */ + "rowFilter.tasks.id": string; + /** Format: timestamp with time zone */ + "rowFilter.tasks.created_at": string; + /** Format: text */ + "rowFilter.tasks.url": string; /** @description users */ "body.users": definitions["users"]; /** Format: timestamp with time zone */ From 19f788f2827e235f47943d6b4a773af4b126ed9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Jul 2022 14:23:27 +0000 Subject: [PATCH 06/12] chore(release): 1.8.7-alpha.1 --- CHANGELOG.md | 7 +++++++ android/app/build.gradle | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 890fdcd5c0..a831266480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.8.7-alpha.1](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.0...1.8.7-alpha.1) (2022-07-22) + + +### Bug Fixes + +* add deleted_modal and system ([638f3b9](https://github.com/Cap-go/capgo/commit/638f3b9a2d37345e4539ba594133b9f927c71672)) + ### [1.8.7-alpha.0](https://github.com/Cap-go/capgo/compare/1.8.6...1.8.7-alpha.0) (2022-07-21) diff --git a/android/app/build.gradle b/android/app/build.gradle index 47dcbe7700..d2449b9102 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,7 +6,7 @@ android { applicationId "ee.forgr.capacitor_go" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1087000 + versionCode 1087100 versionName "1.8.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/package.json b/package.json index 98124a6eaa..914e4a0186 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.8.7-alpha.0", + "version": "1.8.7-alpha.1", "scripts": { "build": "vite build", "test": "cypress open", From 5dedac8b9689d6f9d5e280deba3027d4625ca3cb Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Thu, 28 Jul 2022 15:25:46 +0100 Subject: [PATCH 07/12] fix: stats be more explicit --- .vscode/settings.json | 3 +- android/capacitor.settings.gradle | 2 +- ios/App/App/AppDelegate.swift | 2 +- ios/App/Podfile | 2 +- package.json | 2 +- pnpm-lock.yaml | 27 ++++++++--- supabase/functions/_utils/supabase.ts | 21 +++++++++ supabase/functions/app_stats/index.ts | 2 +- supabase/functions/cron_good_plan/index.ts | 2 +- supabase/functions/demo/index.ts | 2 +- supabase/functions/ok/index.ts | 2 +- supabase/functions/on_user_created/index.ts | 2 +- supabase/functions/on_user_updated/index.ts | 2 +- supabase/functions/payment_status/index.ts | 2 +- supabase/functions/stats/index.ts | 2 +- supabase/functions/stripe_checkout/index.ts | 2 +- supabase/functions/stripe_event/index.ts | 2 +- supabase/functions/stripe_portal/index.ts | 2 +- supabase/functions/updates/index.ts | 29 ++++-------- supabase/functions/updates/test.ts | 52 +++++++++++++++++++++ supabase/functions/version_trigger/index.ts | 2 +- supabase/functions/web_stats/index.ts | 2 +- 22 files changed, 120 insertions(+), 46 deletions(-) create mode 100644 supabase/functions/updates/test.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index a1a23297ed..022757af2f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,5 +21,6 @@ "deno.unstable": true, "deno.enablePaths": [ "./supabase/functions" - ] + ], + "nuxt.isNuxtApp": false } diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 434226191e..5e959cec4b 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -75,7 +75,7 @@ include ':capacitor-toast' project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@capacitor+toast@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/toast/android') include ':capgo-capacitor-updater' -project(':capgo-capacitor-updater').projectDir = new File('../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.18_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater/android') +project(':capgo-capacitor-updater').projectDir = new File('../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.24_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater/android') include ':robingenz-capacitor-file-picker' project(':robingenz-capacitor-file-picker').projectDir = new File('../node_modules/.pnpm/@robingenz+capacitor-file-picker@0.3.0_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-file-picker/android') diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index fb3535c7a1..e2430670e0 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -52,7 +52,7 @@ extension UIWindow { print("bundleId", bundleId) let alertShake = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) alertShake.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (_) -> Void in - guard let next = updater.getNextVersion() else { + guard let next = updater.getNextBundle() else { resetBuiltin() return } diff --git a/ios/App/Podfile b/ios/App/Podfile index f7cfcc49b1..768246d13d 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -33,7 +33,7 @@ def capacitor_pods pod 'CapacitorStorage', :path => '../../node_modules/.pnpm/@capacitor+storage@1.2.5_@capacitor+core@3.6.0/node_modules/@capacitor/storage' pod 'CapacitorTextZoom', :path => '../../node_modules/.pnpm/@capacitor+text-zoom@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/text-zoom' pod 'CapacitorToast', :path => '../../node_modules/.pnpm/@capacitor+toast@1.0.8_@capacitor+core@3.6.0/node_modules/@capacitor/toast' - pod 'CapgoCapacitorUpdater', :path => '../../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.18_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater' + pod 'CapgoCapacitorUpdater', :path => '../../node_modules/.pnpm/@capgo+capacitor-updater@4.0.0-alpha.24_@capacitor+core@3.6.0/node_modules/@capgo/capacitor-updater' pod 'RobingenzCapacitorFilePicker', :path => '../../node_modules/.pnpm/@robingenz+capacitor-file-picker@0.3.0_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-file-picker' pod 'RobingenzCapacitorScreenOrientation', :path => '../../node_modules/.pnpm/@robingenz+capacitor-screen-orientation@1.1.7_@capacitor+core@3.6.0/node_modules/@robingenz/capacitor-screen-orientation' pod 'TeamhiveCapacitorVideoRecorder', :path => '../../node_modules/.pnpm/@teamhive+capacitor-video-recorder@5.0.0_@capacitor+core@3.6.0/node_modules/@teamhive/capacitor-video-recorder' diff --git a/package.json b/package.json index 914e4a0186..ca9f52b9e3 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@capacitor/storage": "1.2.5", "@capacitor/text-zoom": "1.0.8", "@capacitor/toast": "1.0.8", - "@capgo/capacitor-updater": "4.0.0-alpha.19", + "@capgo/capacitor-updater": "4.0.0-alpha.24", "@ionic/vue": "6.1.13", "@ionic/vue-router": "6.1.13", "@robingenz/capacitor-file-picker": "0.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ee36b7272..f7d55f9df2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,7 +32,7 @@ specifiers: '@capacitor/storage': 1.2.5 '@capacitor/text-zoom': 1.0.8 '@capacitor/toast': 1.0.8 - '@capgo/capacitor-updater': 4.0.0-alpha.19 + '@capgo/capacitor-updater': 4.0.0-alpha.24 '@iconify-json/carbon': 1.1.6 '@iconify-json/ion': 1.1.3 '@iconify-json/ls': 1.1.2 @@ -134,7 +134,7 @@ dependencies: '@capacitor/storage': 1.2.5_@capacitor+core@3.6.0 '@capacitor/text-zoom': 1.0.8_@capacitor+core@3.6.0 '@capacitor/toast': 1.0.8_@capacitor+core@3.6.0 - '@capgo/capacitor-updater': 4.0.0-alpha.19_@capacitor+core@3.6.0 + '@capgo/capacitor-updater': 4.0.0-alpha.24_@capacitor+core@3.6.0 '@ionic/vue': 6.1.13 '@ionic/vue-router': 6.1.13 '@robingenz/capacitor-file-picker': 0.3.0_@capacitor+core@3.6.0 @@ -1788,8 +1788,8 @@ packages: '@capacitor/core': 3.6.0 dev: false - /@capgo/capacitor-updater/4.0.0-alpha.19_@capacitor+core@3.6.0: - resolution: {integrity: sha512-eVwAaYyEJ4gKbnsnZK3+oKVQ2a4iNlD5KY4CYoFDh4MHTZOJhcHmmC6u2LWTvj90ns65suBV65+F6nu4FKlFRg==} + /@capgo/capacitor-updater/4.0.0-alpha.24_@capacitor+core@3.6.0: + resolution: {integrity: sha512-egdS2K+Oy7tC4MdpYHfaCAOB8wRQMG+8ljLlAwIqQT9PRhhzzFzwCj7RpXAp1B7QNgd+DE5Bzw0v1FeYZnRnKw==} peerDependencies: '@capacitor/core': ^3.0.0 dependencies: @@ -2587,8 +2587,8 @@ packages: vue-i18n: optional: true dependencies: - '@intlify/message-compiler': 9.2.0-beta.36 - '@intlify/shared': 9.2.0-beta.36 + '@intlify/message-compiler': 9.2.0-beta.40 + '@intlify/shared': 9.2.0-beta.40 jsonc-eslint-parser: 1.4.1 source-map: 0.6.1 vue-i18n: 9.2.0-beta.36_vue@3.2.37 @@ -2617,10 +2617,23 @@ packages: '@intlify/shared': 9.2.0-beta.36 source-map: 0.6.1 + /@intlify/message-compiler/9.2.0-beta.40: + resolution: {integrity: sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A==} + engines: {node: '>= 14'} + dependencies: + '@intlify/shared': 9.2.0-beta.40 + source-map: 0.6.1 + dev: true + /@intlify/shared/9.2.0-beta.36: resolution: {integrity: sha512-+IXLiQ0V+9muzEf7RT9t9wEh6hNIK+kq+34Lce8W+DYny/jaFxPWIU4REYja3xC16kV7q+fz4I3vFz03gh7ysA==} engines: {node: '>= 12'} + /@intlify/shared/9.2.0-beta.40: + resolution: {integrity: sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ==} + engines: {node: '>= 14'} + dev: true + /@intlify/vite-plugin-vue-i18n/4.0.0_i5cftpqtlusdawbczcfmwd3bya: resolution: {integrity: sha512-bX7WgJAnYAbhmfvMp17TjCzg4e4T68O7iqAcNo6TOS+oHK0kAJAN9AJfEMTdpDrAwURCw0VwZ0kgMFWDbJkY4g==} engines: {node: '>= 12'} @@ -2635,7 +2648,7 @@ packages: optional: true dependencies: '@intlify/bundle-utils': 3.1.0_vue-i18n@9.2.0-beta.36 - '@intlify/shared': 9.2.0-beta.36 + '@intlify/shared': 9.2.0-beta.40 '@rollup/pluginutils': 4.1.2 debug: 4.3.4 fast-glob: 3.2.11 diff --git a/supabase/functions/_utils/supabase.ts b/supabase/functions/_utils/supabase.ts index 51de4a3784..27bf80e9a8 100644 --- a/supabase/functions/_utils/supabase.ts +++ b/supabase/functions/_utils/supabase.ts @@ -124,3 +124,24 @@ export const isTrial = async (userId: string): Promise => { return data || 0 } + +export const sendStats = async (action: string, platform: string, device_id: string, app_id: string, version_build: string, versionId: number) => { + const stat: Partial = { + platform: platform as definitions['stats']['platform'], + device_id, + action, + app_id, + version_build, + version: versionId, + } + try { + const { error } = await supabaseAdmin + .from('stats') + .insert(stat) + if (error) + console.log('Cannot insert stat', app_id, version_build, error) + } + catch (err) { + console.log('Cannot insert stats', app_id, err) + } +} diff --git a/supabase/functions/app_stats/index.ts b/supabase/functions/app_stats/index.ts index 31e264bd0e..e24bd57934 100644 --- a/supabase/functions/app_stats/index.ts +++ b/supabase/functions/app_stats/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' import { sendRes } from '../_utils/utils.ts' diff --git a/supabase/functions/cron_good_plan/index.ts b/supabase/functions/cron_good_plan/index.ts index bbad431d10..98a2dbbf67 100644 --- a/supabase/functions/cron_good_plan/index.ts +++ b/supabase/functions/cron_good_plan/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { addEventPerson } from '../_utils/crisp.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/demo/index.ts b/supabase/functions/demo/index.ts index 4794f0df2b..c5c9bf1172 100644 --- a/supabase/functions/demo/index.ts +++ b/supabase/functions/demo/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' import { checkKey, sendRes } from '../_utils/utils.ts' diff --git a/supabase/functions/ok/index.ts b/supabase/functions/ok/index.ts index 7d500cf9da..7984e32f21 100644 --- a/supabase/functions/ok/index.ts +++ b/supabase/functions/ok/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { sendRes } from '../_utils/utils.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/on_user_created/index.ts b/supabase/functions/on_user_created/index.ts index 6e65381379..b17256571a 100644 --- a/supabase/functions/on_user_created/index.ts +++ b/supabase/functions/on_user_created/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { addDataPerson, addEventPerson, postPerson } from '../_utils/crisp.ts' import { createCustomer } from '../_utils/stripe.ts' import { supabaseAdmin } from '../_utils/supabase.ts' diff --git a/supabase/functions/on_user_updated/index.ts b/supabase/functions/on_user_updated/index.ts index 500b95e2fc..85867eb05b 100644 --- a/supabase/functions/on_user_updated/index.ts +++ b/supabase/functions/on_user_updated/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import type { Person } from '../_utils/crisp.ts' import { updatePerson } from '../_utils/crisp.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/payment_status/index.ts b/supabase/functions/payment_status/index.ts index 8355511311..53779a46e8 100644 --- a/supabase/functions/payment_status/index.ts +++ b/supabase/functions/payment_status/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import { currentPaymentstatus } from '../_utils/plans.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/stats/index.ts b/supabase/functions/stats/index.ts index 1ce96bfbc2..ef6a7d142a 100644 --- a/supabase/functions/stats/index.ts +++ b/supabase/functions/stats/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { sendRes } from '../_utils/utils.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/stripe_checkout/index.ts b/supabase/functions/stripe_checkout/index.ts index 2d66f7e8a0..f87b133933 100644 --- a/supabase/functions/stripe_checkout/index.ts +++ b/supabase/functions/stripe_checkout/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' import { sendOptionsRes, sendRes } from '../_utils/utils.ts' diff --git a/supabase/functions/stripe_event/index.ts b/supabase/functions/stripe_event/index.ts index 5e11f203ba..244ff569bf 100644 --- a/supabase/functions/stripe_event/index.ts +++ b/supabase/functions/stripe_event/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { addDataPerson, addEventPerson, updatePerson } from '../_utils/crisp.ts' import { extractDataEvent, parseStripeEvent } from '../_utils/stripe_event.ts' import { supabaseAdmin } from '../_utils/supabase.ts' diff --git a/supabase/functions/stripe_portal/index.ts b/supabase/functions/stripe_portal/index.ts index dda2d1c39b..55e9e46e2b 100644 --- a/supabase/functions/stripe_portal/index.ts +++ b/supabase/functions/stripe_portal/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { createPortal } from '../_utils/stripe.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/updates/index.ts b/supabase/functions/updates/index.ts index 46c840614d..c0bfe24ea3 100644 --- a/supabase/functions/updates/index.ts +++ b/supabase/functions/updates/index.ts @@ -1,7 +1,7 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import * as semver from 'https://deno.land/x/semver/mod.ts' import { sendRes } from '../_utils/utils.ts' -import { isGoodPlan, isTrial, supabaseAdmin, updateOrCreateDevice } from '../_utils/supabase.ts' +import { isGoodPlan, isTrial, sendStats, supabaseAdmin, updateOrCreateDevice } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' interface Channel { @@ -127,14 +127,15 @@ serve(async (event: Request) => { } const trial = await isTrial(channel.created_by) const paying = await isGoodPlan(channel.created_by) + let version: definitions['app_versions'] = channel.version as definitions['app_versions'] if (!paying && !trial) { console.log('Cannot update, upgrade plan to continue to update', app_id) + await sendStats('needUpgrade', platform, device_id, app_id, version_build, version.id) return sendRes({ message: 'Cannot update, upgrade plan to continue to update', err: 'not good plan', }, 200) } - let version: definitions['app_versions'] = channel.version as definitions['app_versions'] if (channelOverride && channelOverride.length) { console.log('Set channel override', app_id, channelOverride[0].channel_id.version.name) version = channelOverride[0].channel_id.version as definitions['app_versions'] @@ -172,6 +173,7 @@ serve(async (event: Request) => { // console.log('signedURL', device_id, signedURL, version_name, version.name) if (version_name === version.name) { console.log('No new version available', device_id, version_name, version.name) + await sendStats('noNew', platform, device_id, app_id, version_build, version.id) return sendRes({ message: 'No new version available', }, 200) @@ -180,6 +182,7 @@ serve(async (event: Request) => { // console.log('check disableAutoUpdateToMajor', device_id) if (channel.disableAutoUpdateToMajor && semver.major(version.name) > semver.major(version_name)) { console.log('Cannot upgrade major version', device_id) + await sendStats('disableAutoUpdateToMajor', platform, device_id, app_id, version_build, version.id) return sendRes({ major: true, message: 'Cannot upgrade major version', @@ -190,6 +193,7 @@ serve(async (event: Request) => { console.log('check disableAutoUpdateUnderNative', device_id) if (channel.disableAutoUpdateUnderNative && semver.lt(version.name, version_build)) { + await sendStats('disableAutoUpdateUnderNative', platform, device_id, app_id, version_build, version.id) console.log('Cannot revert under native version', device_id) return sendRes({ message: 'Cannot revert under native version', @@ -199,24 +203,7 @@ serve(async (event: Request) => { } // console.log('save stats', device_id) - const stat: Partial = { - platform: platform as definitions['stats']['platform'], - device_id, - action: 'get', - app_id, - version_build, - version: version.id, - } - try { - const { error } = await supabase - .from('stats') - .insert(stat) - if (error) - console.log('Cannot insert stat', app_id, version_build, error) - } - catch (err) { - console.log('Cannot insert stats', app_id, err) - } + await sendStats('get', platform, device_id, app_id, version_build, version.id) console.log('New version available', app_id, version.name, signedURL) return sendRes({ version: version.name, diff --git a/supabase/functions/updates/test.ts b/supabase/functions/updates/test.ts new file mode 100644 index 0000000000..c0efc6f48e --- /dev/null +++ b/supabase/functions/updates/test.ts @@ -0,0 +1,52 @@ +// fetch() +interface transformRes { url: URL; request: RequestInit } +const transform = { + auto_update: { + target: 'updates', + transform: (url: URL, request: Request): transformRes => { + const { + cap_version_name, + cap_version_build, + cap_plugin_version, + cap_platform, + cap_app_id, + cap_device_id, ...headers + } = request.headers as any + return { + url, + request: { + ...request, + body: JSON.stringify({ + version_name: cap_version_name, + version_build: cap_version_build, + plugin_version: cap_plugin_version, + platform: cap_platform, + app_id: cap_app_id, + device_id: cap_device_id, + }), + headers, + method: 'POST', + }, + } + }, + }, + channel: { + target: 'channel', + transform: (url: URL, request: Request): transformRes => { + const headers = { ...request.headers, api_mode: request.method } + let body = request.body as any + if (headers.api_mode === 'GET') + body = Object.fromEntries(url.searchParams) + + return { + url, + request: { + ...request, + body, + headers, + method: 'POST', + }, + } + }, + }, +} diff --git a/supabase/functions/version_trigger/index.ts b/supabase/functions/version_trigger/index.ts index eff6aa1038..629c792c21 100644 --- a/supabase/functions/version_trigger/index.ts +++ b/supabase/functions/version_trigger/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' import { sendRes } from '../_utils/utils.ts' diff --git a/supabase/functions/web_stats/index.ts b/supabase/functions/web_stats/index.ts index e1c3cea150..d2113aa8b8 100644 --- a/supabase/functions/web_stats/index.ts +++ b/supabase/functions/web_stats/index.ts @@ -1,4 +1,4 @@ -import { serve } from 'https://deno.land/std@0.147.0/http/server.ts' +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' import { supabaseAdmin } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' import { sendRes } from '../_utils/utils.ts' From 19103fe9121b0d9c38a589141f3ba49b5ab7570c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Jul 2022 14:26:19 +0000 Subject: [PATCH 08/12] chore(release): 1.8.7-alpha.2 --- CHANGELOG.md | 7 +++++++ android/app/build.gradle | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a831266480..cfd9b4613a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.8.7-alpha.2](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.1...1.8.7-alpha.2) (2022-07-28) + + +### Bug Fixes + +* stats be more explicit ([5dedac8](https://github.com/Cap-go/capgo/commit/5dedac8b9689d6f9d5e280deba3027d4625ca3cb)) + ### [1.8.7-alpha.1](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.0...1.8.7-alpha.1) (2022-07-22) diff --git a/android/app/build.gradle b/android/app/build.gradle index d2449b9102..70c7ae11fd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,7 +6,7 @@ android { applicationId "ee.forgr.capacitor_go" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1087100 + versionCode 1087200 versionName "1.8.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/package.json b/package.json index ca9f52b9e3..7cbee4fd5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.8.7-alpha.1", + "version": "1.8.7-alpha.2", "scripts": { "build": "vite build", "test": "cypress open", From 4929bf5c5c88f8250ca00c34aaa4877ca86ce101 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Thu, 28 Jul 2022 16:50:24 +0100 Subject: [PATCH 09/12] fix: add log for runtime --- supabase/functions/ok/index.ts | 3 ++ supabase/functions/updates/test.ts | 47 +++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/supabase/functions/ok/index.ts b/supabase/functions/ok/index.ts index 7984e32f21..5790a38afe 100644 --- a/supabase/functions/ok/index.ts +++ b/supabase/functions/ok/index.ts @@ -6,6 +6,9 @@ import type { definitions } from '../_utils/types_supabase.ts' serve(async (event: Request) => { const url = new URL(event.url) console.log('url', url, url.searchParams.get('service')) + console.log('Current Deno version', Deno.version.deno) + console.log('Current TypeScript version', Deno.version.typescript) + console.log('Current V8 version', Deno.version.v8) if (url.searchParams.get('service') === 'database') { const { data, error } = await supabaseAdmin .from('apps') diff --git a/supabase/functions/updates/test.ts b/supabase/functions/updates/test.ts index c0efc6f48e..7de8a1da98 100644 --- a/supabase/functions/updates/test.ts +++ b/supabase/functions/updates/test.ts @@ -1,9 +1,10 @@ // fetch() -interface transformRes { url: URL; request: RequestInit } +const supaId = 'xvwzpoazmxkqosrdewyv' +const baseSupa = `https://${supaId}.functions.supabase.co` const transform = { auto_update: { target: 'updates', - transform: (url: URL, request: Request): transformRes => { + transform: (request: Request): RequestInit & { url: string } => { const { cap_version_name, cap_version_build, @@ -12,27 +13,47 @@ const transform = { cap_app_id, cap_device_id, ...headers } = request.headers as any + const end = request.url.split('/').pop() + const newUrl = `${baseSupa}/${end}` + const body = JSON.stringify({ + version_name: cap_version_name, + version_build: cap_version_build, + plugin_version: cap_plugin_version, + platform: cap_platform, + app_id: cap_app_id, + device_id: cap_device_id, + }) + return { + ...request, + body, + headers, + method: 'POST', + url: newUrl, + } + }, + }, + channel: { + target: 'channel', + transform: (url: URL, request: Request): RequestInit & { url: URL } => { + const headers = { ...request.headers, api_mode: request.method } + let body = request.body as any + if (headers.api_mode === 'GET') + body = Object.fromEntries(url.searchParams) + return { url, request: { ...request, - body: JSON.stringify({ - version_name: cap_version_name, - version_build: cap_version_build, - plugin_version: cap_plugin_version, - platform: cap_platform, - app_id: cap_app_id, - device_id: cap_device_id, - }), + body, headers, method: 'POST', }, } }, }, - channel: { - target: 'channel', - transform: (url: URL, request: Request): transformRes => { + device: { + target: 'device', + transform: (url: URL, request: Request): RequestInit & { url: URL } => { const headers = { ...request.headers, api_mode: request.method } let body = request.body as any if (headers.api_mode === 'GET') From 7a190b6c4d55f38548979b87746307e290781b1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Jul 2022 15:51:08 +0000 Subject: [PATCH 10/12] chore(release): 1.8.7-alpha.3 --- CHANGELOG.md | 7 +++++++ android/app/build.gradle | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfd9b4613a..587d725ed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.8.7-alpha.3](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.2...1.8.7-alpha.3) (2022-07-28) + + +### Bug Fixes + +* add log for runtime ([4929bf5](https://github.com/Cap-go/capgo/commit/4929bf5c5c88f8250ca00c34aaa4877ca86ce101)) + ### [1.8.7-alpha.2](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.1...1.8.7-alpha.2) (2022-07-28) diff --git a/android/app/build.gradle b/android/app/build.gradle index 70c7ae11fd..011589e8a4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,7 +6,7 @@ android { applicationId "ee.forgr.capacitor_go" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1087200 + versionCode 1087300 versionName "1.8.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/package.json b/package.json index 7cbee4fd5f..410b8a649f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.8.7-alpha.2", + "version": "1.8.7-alpha.3", "scripts": { "build": "vite build", "test": "cypress open", From 94f21a7911fa60c593e490df1e91ede781654c0a Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Thu, 28 Jul 2022 19:35:06 +0100 Subject: [PATCH 11/12] feat: add missing api endpoint --- supabase/functions/channel/.no_verify_jwt | 0 supabase/functions/channel/index.ts | 130 +++++++++++++++ supabase/functions/device/.no_verify_jwt | 0 supabase/functions/device/index.ts | 183 ++++++++++++++++++++++ supabase/functions/updates/index.ts | 2 +- supabase/functions/version/.no_verify_jwt | 0 supabase/functions/version/index.ts | 80 ++++++++++ 7 files changed, 394 insertions(+), 1 deletion(-) create mode 100644 supabase/functions/channel/.no_verify_jwt create mode 100644 supabase/functions/channel/index.ts create mode 100644 supabase/functions/device/.no_verify_jwt create mode 100644 supabase/functions/device/index.ts create mode 100644 supabase/functions/version/.no_verify_jwt create mode 100644 supabase/functions/version/index.ts diff --git a/supabase/functions/channel/.no_verify_jwt b/supabase/functions/channel/.no_verify_jwt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supabase/functions/channel/index.ts b/supabase/functions/channel/index.ts new file mode 100644 index 0000000000..21ca7313be --- /dev/null +++ b/supabase/functions/channel/index.ts @@ -0,0 +1,130 @@ +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' +import { checkAppOwner, supabaseAdmin, updateOrCreateChannel } from '../_utils/supabase.ts' +import type { definitions } from '../_utils/types_supabase.ts' +import { checkKey, sendRes } from '../_utils/utils.ts' + +interface ChannelSet { + app_id: string + channel: string + version?: string + public?: boolean +} +interface GetDevice { + app_id: string + channel?: string +} + +export const get = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = (await event.json()) as GetDevice + if (!body.app_id || !(await checkAppOwner(apikey.user_id, body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + // get one channel or all channels + if (body.channel) { + const { data: dataChannel, error: dbError } = await supabaseAdmin + .from('channels') + .select() + .eq('app_id', body.app_id) + .eq('name', body.channel) + if (dbError || !dataChannel || !dataChannel.length) { + console.error('Cannot find channel') + return sendRes({ status: 'Cannot find channel', error: dbError }, 400) + } + return sendRes(dataChannel[0]) + } + else { + const { data: dataChannels, error: dbError } = await supabaseAdmin + .from('channels') + .select() + .eq('app_id', body.app_id) + if (dbError || !dataChannels || !dataChannels.length) + return sendRes([]) + return sendRes(dataChannels) + } +} + +export const deleteChannel = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = (await event.json()) as ChannelSet + + if (!(await checkAppOwner(apikey.user_id, body.app_id || body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + try { + const { error: dbError } = await supabaseAdmin + .from('channels') + .delete() + .eq('app_id', body.app_id || body.app_id) + .eq('name', body.channel) + if (dbError) { + console.error('Cannot delete channel') + return sendRes({ status: 'Cannot delete channel', error: JSON.stringify(dbError) }, 400) + } + } + catch (e) { + console.error('Cannot delete channel', e) + return sendRes({ status: 'Cannot delete channels', error: e }, 500) + } + return sendRes() +} + +export const post = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = (await event.json()) as ChannelSet + + const channel: Partial = { + created_by: apikey.user_id, + app_id: body.app_id, + name: body.channel, + } + if (body.version) { + const { data, error: vError } = await supabaseAdmin + .from('app_versions') + .select() + .eq('app_id', body.app_id) + .eq('name', body.version) + .eq('user_id', apikey.user_id) + .eq('deleted', false) + .single() + if (vError || !data) { + console.error(`Cannot find version ${body.version}`) + return sendRes({ status: `Cannot find version ${body.version}`, error: JSON.stringify(vError) }, 400) + } + channel.version = data.id + } + if (body.public !== undefined) + channel.public = body.public + + try { + const { error: dbError } = await updateOrCreateChannel(channel) + if (dbError) { + console.error('Cannot create channel') + return sendRes({ status: 'Cannot create channel', error: JSON.stringify(dbError) }, 400) + } + } + catch (e) { + console.error('Cannot create channel', e) + return sendRes({ status: 'Cannot set channels', error: e }, 500) + } + return sendRes() +} + +serve(async (event: Request) => { + const apikey_string = event.headers.get('apikey') + const api_mode_string = event.headers.get('api_mode') + + if (!apikey_string) + return sendRes({ status: 'Cannot find authorization' }, 400) + const apikey: definitions['apikeys'] | null = await checkKey(apikey_string, supabaseAdmin, ['all', 'write']) + if (!apikey || !event.body) + return sendRes({ status: 'Cannot Verify User' }, 400) + + if (api_mode_string === 'POST') + return post(event, apikey) + else if (api_mode_string === 'GET') + return get(event, apikey) + else if (api_mode_string === 'DELETE') + return deleteChannel(event, apikey) + console.error('Method not allowed') + return sendRes({ status: 'Method now allowed' }, 400) +}) diff --git a/supabase/functions/device/.no_verify_jwt b/supabase/functions/device/.no_verify_jwt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supabase/functions/device/index.ts b/supabase/functions/device/index.ts new file mode 100644 index 0000000000..ac423c97e1 --- /dev/null +++ b/supabase/functions/device/index.ts @@ -0,0 +1,183 @@ +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' +import { checkAppOwner, supabaseAdmin } from '../_utils/supabase.ts' +import type { definitions } from '../_utils/types_supabase.ts' +import { checkKey, sendRes } from '../_utils/utils.ts' + +interface DeviceLink { + app_id: string + device_id: string + version_id?: string + channel?: string +} +interface GetDevice { + app_id: string + device_id?: string +} + +const get = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = await event.json() as GetDevice + if (!body.app_id || !(await checkAppOwner(apikey.user_id, body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + // if device_id get one device + if (body.device_id) { + const { data: dataDevice, error: dbError } = await supabaseAdmin + .from('devices') + .select() + .eq('app_id', body.app_id) + .eq('device_id', body.device_id) + .single() + if (dbError || !dataDevice) { + console.error('Cannot find device') + return sendRes({ status: 'Cannot find device', error: dbError }, 400) + } + return sendRes(dataDevice) + } + else { + // get all devices + const { data: dataDevices, error: dbError } = await supabaseAdmin + .from('devices') + .select() + .eq('app_id', body.app_id) + if (dbError || !dataDevices || !dataDevices.length) + return sendRes([]) + return sendRes(dataDevices) + } +} + +const post = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = await event.json() as DeviceLink + if (!body.device_id || !body.app_id) { + console.error('Cannot find device') + return sendRes({ status: 'Cannot find device' }, 400) + } + if (!(await checkAppOwner(apikey.user_id, body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + // find device + const { data: dataDevice, error: dbError } = await supabaseAdmin + .from('devices') + .select() + .eq('app_id', body.app_id) + .eq('device_id', body.device_id) + .single() + if (dbError || !dataDevice) { + console.error('Cannot find device', dbError) + return sendRes({ status: 'Cannot find device', error: dbError }, 400) + } + // if version_id set device_override to it + if (body.version_id) { + const { data: dataVersion, error: dbError } = await supabaseAdmin + .from('app_versions') + .select() + .eq('app_id', body.app_id) + .eq('name', body.version_id) + .single() + if (dbError || !dataVersion) { + console.error('Cannot find version', dbError) + return sendRes({ status: 'Cannot find version', error: dbError }, 400) + } + const { data: dataDev, error: dbErrorDev } = await supabaseAdmin + .from('devices_override') + .upsert({ + device_id: body.device_id, + version: dataVersion.id, + app_id: body.app_id, + created_by: apikey.user_id, + }) + if (dbErrorDev || !dataDev) { + console.error('Cannot save device override', dbErrorDev) + return sendRes({ status: 'Cannot save device override', error: dbErrorDev }, 400) + } + } + else { + // delete device_override + await supabaseAdmin + .from('devices_override') + .delete() + .eq('device_id', body.device_id) + .eq('app_id', body.app_id) + } + // if channel_id set channel_override to it + if (body.channel) { + // get channel by name + const { data: dataChannel, error: dbError } = await supabaseAdmin + .from('channels') + .select() + .eq('app_id', body.app_id) + .eq('name', body.channel) + .single() + if (dbError || !dataChannel) { + console.error('Cannot find channel', dbError) + return sendRes({ status: 'Cannot find channel', error: dbError }, 400) + } + const { data: dataChannelDev, error: dbErrorDev } = await supabaseAdmin + .from('channel_devices') + .upsert({ + device_id: body.device_id, + channel_id: dataChannel.id, + app_id: body.app_id, + created_by: apikey.user_id, + }) + if (dbErrorDev || !dataChannelDev) { + console.error('Cannot find channel override', dbErrorDev) + return sendRes({ status: 'Cannot save channel override', error: dbErrorDev }, 400) + } + } + else { + // delete channel_override + await supabaseAdmin + .from('channel_devices') + .delete() + .eq('device_id', body.device_id) + .eq('app_id', body.app_id) + } + return sendRes() +} + +export const deleteDev = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = (await event.json()) as DeviceLink + + if (!(await checkAppOwner(apikey.user_id, body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + try { + const { error } = await supabaseAdmin + .from('devices_override') + .delete() + .eq('app_id', body.app_id) + .eq('device_id', body.device_id) + if (error) { + console.error('Cannot create channel') + return sendRes({ status: 'Cannot create channel', error: JSON.stringify(error) }, 400) + } + } + catch (e) { + console.error('Cannot create channel', e) + return sendRes({ status: 'Cannot set channels', error: e }, 500) + } + return sendRes() +} + +serve(async (event: Request) => { + const apikey_string = event.headers.get('apikey') + const api_mode_string = event.headers.get('api_mode') + + if (!apikey_string) + return sendRes({ status: 'Cannot find authorization' }, 400) + const apikey: definitions['apikeys'] | null = await checkKey(apikey_string, supabaseAdmin, ['all', 'write']) + if (!apikey || !event.body) + return sendRes({ status: 'Cannot Verify User' }, 400) + + if (api_mode_string === 'POST') + return post(event, apikey) + else if (api_mode_string === 'GET') + return get(event, apikey) + else if (api_mode_string === 'DELETE') + return deleteDev(event, apikey) + console.error('Method not allowed') + return sendRes({ status: 'Method now allowed' }, 400) +}) diff --git a/supabase/functions/updates/index.ts b/supabase/functions/updates/index.ts index c0bfe24ea3..932f9e6cfc 100644 --- a/supabase/functions/updates/index.ts +++ b/supabase/functions/updates/index.ts @@ -1,5 +1,5 @@ import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' -import * as semver from 'https://deno.land/x/semver/mod.ts' +import * as semver from 'https://deno.land/x/semver@v1.4.0/mod.ts' import { sendRes } from '../_utils/utils.ts' import { isGoodPlan, isTrial, sendStats, supabaseAdmin, updateOrCreateDevice } from '../_utils/supabase.ts' import type { definitions } from '../_utils/types_supabase.ts' diff --git a/supabase/functions/version/.no_verify_jwt b/supabase/functions/version/.no_verify_jwt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supabase/functions/version/index.ts b/supabase/functions/version/index.ts new file mode 100644 index 0000000000..9766827ea0 --- /dev/null +++ b/supabase/functions/version/index.ts @@ -0,0 +1,80 @@ +import { serve } from 'https://deno.land/std@0.149.0/http/server.ts' +import { checkAppOwner, supabaseAdmin } from '../_utils/supabase.ts' +import type { definitions } from '../_utils/types_supabase.ts' +import { checkKey, sendRes } from '../_utils/utils.ts' + +interface GetLatest { + appid?: string + app_id?: string + channel: string +} + +export const deleteVersion = async (event: Request, apikey: definitions['apikeys']): Promise => { + const body = await event.json() as GetLatest + + if (!(await checkAppOwner(apikey.user_id, body.appid || body.app_id))) { + console.error('You can\'t access this app') + return sendRes({ status: 'You can\'t access this app' }, 400) + } + try { + const { error: dbError } = await supabaseAdmin + .from('app_versions') + .update({ + deleted: true, + }) + .eq('app_id', body.appid || body.app_id) + if (dbError) { + console.error('Cannot delete version') + return sendRes({ status: 'Cannot delete version', error: JSON.stringify(dbError) }, 400) + } + } + catch (e) { + console.error('Cannot delete version', e) + return sendRes({ status: 'Cannot delete version', error: e }, 500) + } + return sendRes() +} + +export const get = async (event: Request, apikey: definitions['apikeys']): Promise => { + try { + const body = (await event.json()) as GetLatest + if (!(body.appid || body.app_id)) + return sendRes({ status: 'Missing app_id' }, 400) + + if (!apikey || !event.body) + return sendRes({ status: 'Cannot Verify User' }, 400) + if (!(await checkAppOwner(apikey.user_id, body.appid || body.app_id))) + return sendRes({ status: 'You can\'t check this app' }, 400) + const { data: dataVersions, error: dbError } = await supabaseAdmin + .from('app_versions') + .select() + .eq('app_id', body.appid || body.app_id) + .eq('deleted', false) + .order('created_at', { ascending: false }) + if (dbError || !dataVersions || !dataVersions.length) + return sendRes({ status: 'Cannot get latest version', error: dbError }, 400) + + return sendRes({ versions: dataVersions }) + } + catch (e) { + return sendRes({ status: 'Cannot get latest version', error: e }, 500) + } +} + +serve(async (event: Request) => { + const apikey_string = event.headers.get('apikey') + const api_mode_string = event.headers.get('api_mode') + + if (!apikey_string) + return sendRes({ status: 'Cannot find authorization' }, 400) + const apikey: definitions['apikeys'] | null = await checkKey(apikey_string, supabaseAdmin, ['all', 'write']) + if (!apikey || !event.body) + return sendRes({ status: 'Cannot Verify User' }, 400) + + if (api_mode_string === 'GET') + return get(event, apikey) + else if (api_mode_string === 'DELETE') + return deleteVersion(event, apikey) + console.error('Method not allowed') + return sendRes({ status: 'Method now allowed' }, 400) +}) From 279f82b918fa8589313c40abb1dd8a417be3d2e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Jul 2022 18:35:37 +0000 Subject: [PATCH 12/12] chore(release): 1.9.0-alpha.0 --- CHANGELOG.md | 7 +++++++ android/app/build.gradle | 4 ++-- ios/App/App.xcodeproj/project.pbxproj | 8 ++++---- package.json | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 587d725ed1..34c9ef7f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.9.0-alpha.0](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.3...1.9.0-alpha.0) (2022-07-28) + + +### Features + +* add missing api endpoint ([94f21a7](https://github.com/Cap-go/capgo/commit/94f21a7911fa60c593e490df1e91ede781654c0a)) + ### [1.8.7-alpha.3](https://github.com/Cap-go/capgo/compare/1.8.7-alpha.2...1.8.7-alpha.3) (2022-07-28) diff --git a/android/app/build.gradle b/android/app/build.gradle index 011589e8a4..cac2b755fa 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "ee.forgr.capacitor_go" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1087300 - versionName "1.8.7" + versionCode 1090000 + versionName "1.9.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 603005207c..9113460ece 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -349,12 +349,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "1.8.7"; + CURRENT_PROJECT_VERSION = "1.9.0"; DEVELOPMENT_TEAM = UVTJ336J2D; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = "1.8.7"; + MARKETING_VERSION = "1.9.0"; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = ee.forgr.capacitorgo; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -371,12 +371,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "1.8.7"; + CURRENT_PROJECT_VERSION = "1.9.0"; DEVELOPMENT_TEAM = UVTJ336J2D; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = "1.8.7"; + MARKETING_VERSION = "1.9.0"; PRODUCT_BUNDLE_IDENTIFIER = ee.forgr.capacitorgo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; diff --git a/package.json b/package.json index 410b8a649f..474c90bf1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "1.8.7-alpha.3", + "version": "1.9.0-alpha.0", "scripts": { "build": "vite build", "test": "cypress open",