@rs-native-kit/version-check 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +256 -0
- package/VersionCheck.podspec +20 -0
- package/android/build.gradle +56 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/com/rsnativekit/versioncheck/SecureStorageCipher.kt +57 -0
- package/android/src/main/java/com/rsnativekit/versioncheck/VersionCheckHeadlessTaskService.kt +31 -0
- package/android/src/main/java/com/rsnativekit/versioncheck/VersionCheckModule.kt +215 -0
- package/android/src/main/java/com/rsnativekit/versioncheck/VersionCheckPackage.kt +31 -0
- package/android/src/main/java/com/rsnativekit/versioncheck/VersionCheckWorker.kt +29 -0
- package/ios/PlatformBridge/Ed25519Verifier.swift +19 -0
- package/ios/VersionCheck.h +5 -0
- package/ios/VersionCheck.mm +278 -0
- package/lib/module/data/cache/MemoryCacheStore.js +30 -0
- package/lib/module/data/cache/MemoryCacheStore.js.map +1 -0
- package/lib/module/data/cache/PersistentCacheStore.js +56 -0
- package/lib/module/data/cache/PersistentCacheStore.js.map +1 -0
- package/lib/module/data/config/ConfigCache.js +29 -0
- package/lib/module/data/config/ConfigCache.js.map +1 -0
- package/lib/module/data/config/ConfigDocumentValidator.js +185 -0
- package/lib/module/data/config/ConfigDocumentValidator.js.map +1 -0
- package/lib/module/data/config/ConfigLoader.js +82 -0
- package/lib/module/data/config/ConfigLoader.js.map +1 -0
- package/lib/module/data/config/ConfigProvider.js +58 -0
- package/lib/module/data/config/ConfigProvider.js.map +1 -0
- package/lib/module/data/config/ConfigResolutionPipeline.js +268 -0
- package/lib/module/data/config/ConfigResolutionPipeline.js.map +1 -0
- package/lib/module/data/config/ConfigValidator.js +69 -0
- package/lib/module/data/config/ConfigValidator.js.map +1 -0
- package/lib/module/data/config/SignatureVerifier.js +80 -0
- package/lib/module/data/config/SignatureVerifier.js.map +1 -0
- package/lib/module/data/config/canonicalize.js +88 -0
- package/lib/module/data/config/canonicalize.js.map +1 -0
- package/lib/module/data/config/sources/EnvironmentOverrideSource.js +20 -0
- package/lib/module/data/config/sources/EnvironmentOverrideSource.js.map +1 -0
- package/lib/module/data/config/sources/LocalConfigSource.js +22 -0
- package/lib/module/data/config/sources/LocalConfigSource.js.map +1 -0
- package/lib/module/data/config/sources/RemoteConfigSource.js +38 -0
- package/lib/module/data/config/sources/RemoteConfigSource.js.map +1 -0
- package/lib/module/data/providers/amazon/AmazonAppstoreProvider.js +13 -0
- package/lib/module/data/providers/amazon/AmazonAppstoreProvider.js.map +1 -0
- package/lib/module/data/providers/apple/AppleStoreProvider.js +67 -0
- package/lib/module/data/providers/apple/AppleStoreProvider.js.map +1 -0
- package/lib/module/data/providers/custom-api/CustomApiProvider.js +51 -0
- package/lib/module/data/providers/custom-api/CustomApiProvider.js.map +1 -0
- package/lib/module/data/providers/firebase-remote-config/FirebaseRemoteConfigProvider.js +13 -0
- package/lib/module/data/providers/firebase-remote-config/FirebaseRemoteConfigProvider.js.map +1 -0
- package/lib/module/data/providers/google-play/GooglePlayProvider.js +62 -0
- package/lib/module/data/providers/google-play/GooglePlayProvider.js.map +1 -0
- package/lib/module/data/providers/huawei/HuaweiAppGalleryProvider.js +18 -0
- package/lib/module/data/providers/huawei/HuaweiAppGalleryProvider.js.map +1 -0
- package/lib/module/data/repositories/VersionRepositoryImpl.js +69 -0
- package/lib/module/data/repositories/VersionRepositoryImpl.js.map +1 -0
- package/lib/module/di/container.js +80 -0
- package/lib/module/di/container.js.map +1 -0
- package/lib/module/domain/IVersionManagerCore.js +4 -0
- package/lib/module/domain/IVersionManagerCore.js.map +1 -0
- package/lib/module/domain/VersionManagerCore.js +276 -0
- package/lib/module/domain/VersionManagerCore.js.map +1 -0
- package/lib/module/domain/engines/decision/DecisionEngine.js +40 -0
- package/lib/module/domain/engines/decision/DecisionEngine.js.map +1 -0
- package/lib/module/domain/engines/policy/IUpdatePolicyEngine.js +4 -0
- package/lib/module/domain/engines/policy/IUpdatePolicyEngine.js.map +1 -0
- package/lib/module/domain/engines/policy/PolicyEngine.js +42 -0
- package/lib/module/domain/engines/policy/PolicyEngine.js.map +1 -0
- package/lib/module/domain/engines/semver/IVersionComparator.js +4 -0
- package/lib/module/domain/engines/semver/IVersionComparator.js.map +1 -0
- package/lib/module/domain/engines/semver/SemVerEngine.js +176 -0
- package/lib/module/domain/engines/semver/SemVerEngine.js.map +1 -0
- package/lib/module/domain/errors/VersionManagerException.js +104 -0
- package/lib/module/domain/errors/VersionManagerException.js.map +1 -0
- package/lib/module/domain/models/ActionPlan.js +9 -0
- package/lib/module/domain/models/ActionPlan.js.map +1 -0
- package/lib/module/domain/models/ConfigDocument.js +4 -0
- package/lib/module/domain/models/ConfigDocument.js.map +1 -0
- package/lib/module/domain/models/Events.js +4 -0
- package/lib/module/domain/models/Events.js.map +1 -0
- package/lib/module/domain/models/LifecycleState.js +29 -0
- package/lib/module/domain/models/LifecycleState.js.map +1 -0
- package/lib/module/domain/models/ParsedVersion.js +2 -0
- package/lib/module/domain/models/ParsedVersion.js.map +1 -0
- package/lib/module/domain/models/PlatformId.js +2 -0
- package/lib/module/domain/models/PlatformId.js.map +1 -0
- package/lib/module/domain/models/PublicApiOptions.js +2 -0
- package/lib/module/domain/models/PublicApiOptions.js.map +1 -0
- package/lib/module/domain/models/RemoteVersionInfo.js +4 -0
- package/lib/module/domain/models/RemoteVersionInfo.js.map +1 -0
- package/lib/module/domain/models/StoreLookup.js +2 -0
- package/lib/module/domain/models/StoreLookup.js.map +1 -0
- package/lib/module/domain/models/Unsubscribe.js +2 -0
- package/lib/module/domain/models/Unsubscribe.js.map +1 -0
- package/lib/module/domain/models/UpdateInfo.js +4 -0
- package/lib/module/domain/models/UpdateInfo.js.map +1 -0
- package/lib/module/domain/models/VersionManagerOptions.js +4 -0
- package/lib/module/domain/models/VersionManagerOptions.js.map +1 -0
- package/lib/module/domain/ports/ICacheStore.js +2 -0
- package/lib/module/domain/ports/ICacheStore.js.map +1 -0
- package/lib/module/domain/ports/IClock.js +2 -0
- package/lib/module/domain/ports/IClock.js.map +1 -0
- package/lib/module/domain/ports/IConfigProvider.js +4 -0
- package/lib/module/domain/ports/IConfigProvider.js.map +1 -0
- package/lib/module/domain/ports/IConfigSources.js +4 -0
- package/lib/module/domain/ports/IConfigSources.js.map +1 -0
- package/lib/module/domain/ports/IPlatformBridge.js +4 -0
- package/lib/module/domain/ports/IPlatformBridge.js.map +1 -0
- package/lib/module/domain/ports/IStoreProvider.js +4 -0
- package/lib/module/domain/ports/IStoreProvider.js.map +1 -0
- package/lib/module/domain/ports/IVersionRepository.js +4 -0
- package/lib/module/domain/ports/IVersionRepository.js.map +1 -0
- package/lib/module/domain/statemachine/LifecycleStateMachine.js +55 -0
- package/lib/module/domain/statemachine/LifecycleStateMachine.js.map +1 -0
- package/lib/module/domain/usecases/CheckForUpdatesUseCase.js +31 -0
- package/lib/module/domain/usecases/CheckForUpdatesUseCase.js.map +1 -0
- package/lib/module/domain/usecases/ForceTriggerUpdateUseCase.js +20 -0
- package/lib/module/domain/usecases/ForceTriggerUpdateUseCase.js.map +1 -0
- package/lib/module/domain/usecases/ResetIgnoredVersionsUseCase.js +24 -0
- package/lib/module/domain/usecases/ResetIgnoredVersionsUseCase.js.map +1 -0
- package/lib/module/index.js +10 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/platform/contracts/IPlatformBridge.js +2 -0
- package/lib/module/platform/contracts/IPlatformBridge.js.map +1 -0
- package/lib/module/platform/createPlatformBridge.js +17 -0
- package/lib/module/platform/createPlatformBridge.js.map +1 -0
- package/lib/module/platform/createPlatformBridge.native.js +9 -0
- package/lib/module/platform/createPlatformBridge.native.js.map +1 -0
- package/lib/module/platform/native/NativePlatformBridge.js +143 -0
- package/lib/module/platform/native/NativePlatformBridge.js.map +1 -0
- package/lib/module/platform/native/NativeVersionCheck.js +33 -0
- package/lib/module/platform/native/NativeVersionCheck.js.map +1 -0
- package/lib/module/platform/web/WebPlatformBridge.js +228 -0
- package/lib/module/platform/web/WebPlatformBridge.js.map +1 -0
- package/lib/module/presentation/components/ForceUpdateScreen.js +68 -0
- package/lib/module/presentation/components/ForceUpdateScreen.js.map +1 -0
- package/lib/module/presentation/components/OptionalUpdateBanner.js +69 -0
- package/lib/module/presentation/components/OptionalUpdateBanner.js.map +1 -0
- package/lib/module/presentation/components/SoftUpdateDialog.js +101 -0
- package/lib/module/presentation/components/SoftUpdateDialog.js.map +1 -0
- package/lib/module/presentation/hooks/VersionManagerProvider.js +18 -0
- package/lib/module/presentation/hooks/VersionManagerProvider.js.map +1 -0
- package/lib/module/presentation/hooks/context.js +5 -0
- package/lib/module/presentation/hooks/context.js.map +1 -0
- package/lib/module/presentation/hooks/useUpdateState.js +26 -0
- package/lib/module/presentation/hooks/useUpdateState.js.map +1 -0
- package/lib/module/presentation/hooks/useVersionManager.js +33 -0
- package/lib/module/presentation/hooks/useVersionManager.js.map +1 -0
- package/lib/module/presentation/state/VersionManagerStore.js +47 -0
- package/lib/module/presentation/state/VersionManagerStore.js.map +1 -0
- package/lib/module/publicApi.js +114 -0
- package/lib/module/publicApi.js.map +1 -0
- package/lib/module/shared/eventbus/EventBus.js +34 -0
- package/lib/module/shared/eventbus/EventBus.js.map +1 -0
- package/lib/module/shared/logging/Logger.js +56 -0
- package/lib/module/shared/logging/Logger.js.map +1 -0
- package/lib/module/ui.js +13 -0
- package/lib/module/ui.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/data/cache/MemoryCacheStore.d.ts +12 -0
- package/lib/typescript/src/data/cache/MemoryCacheStore.d.ts.map +1 -0
- package/lib/typescript/src/data/cache/PersistentCacheStore.d.ts +14 -0
- package/lib/typescript/src/data/cache/PersistentCacheStore.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigCache.d.ts +15 -0
- package/lib/typescript/src/data/config/ConfigCache.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigDocumentValidator.d.ts +20 -0
- package/lib/typescript/src/data/config/ConfigDocumentValidator.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigLoader.d.ts +28 -0
- package/lib/typescript/src/data/config/ConfigLoader.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigProvider.d.ts +30 -0
- package/lib/typescript/src/data/config/ConfigProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigResolutionPipeline.d.ts +49 -0
- package/lib/typescript/src/data/config/ConfigResolutionPipeline.d.ts.map +1 -0
- package/lib/typescript/src/data/config/ConfigValidator.d.ts +10 -0
- package/lib/typescript/src/data/config/ConfigValidator.d.ts.map +1 -0
- package/lib/typescript/src/data/config/SignatureVerifier.d.ts +16 -0
- package/lib/typescript/src/data/config/SignatureVerifier.d.ts.map +1 -0
- package/lib/typescript/src/data/config/canonicalize.d.ts +13 -0
- package/lib/typescript/src/data/config/canonicalize.d.ts.map +1 -0
- package/lib/typescript/src/data/config/sources/EnvironmentOverrideSource.d.ts +17 -0
- package/lib/typescript/src/data/config/sources/EnvironmentOverrideSource.d.ts.map +1 -0
- package/lib/typescript/src/data/config/sources/LocalConfigSource.d.ts +19 -0
- package/lib/typescript/src/data/config/sources/LocalConfigSource.d.ts.map +1 -0
- package/lib/typescript/src/data/config/sources/RemoteConfigSource.d.ts +10 -0
- package/lib/typescript/src/data/config/sources/RemoteConfigSource.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/amazon/AmazonAppstoreProvider.d.ts +9 -0
- package/lib/typescript/src/data/providers/amazon/AmazonAppstoreProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/apple/AppleStoreProvider.d.ts +19 -0
- package/lib/typescript/src/data/providers/apple/AppleStoreProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/custom-api/CustomApiProvider.d.ts +14 -0
- package/lib/typescript/src/data/providers/custom-api/CustomApiProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/firebase-remote-config/FirebaseRemoteConfigProvider.d.ts +9 -0
- package/lib/typescript/src/data/providers/firebase-remote-config/FirebaseRemoteConfigProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/google-play/GooglePlayProvider.d.ts +22 -0
- package/lib/typescript/src/data/providers/google-play/GooglePlayProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/providers/huawei/HuaweiAppGalleryProvider.d.ts +14 -0
- package/lib/typescript/src/data/providers/huawei/HuaweiAppGalleryProvider.d.ts.map +1 -0
- package/lib/typescript/src/data/repositories/VersionRepositoryImpl.d.ts +23 -0
- package/lib/typescript/src/data/repositories/VersionRepositoryImpl.d.ts.map +1 -0
- package/lib/typescript/src/di/container.d.ts +12 -0
- package/lib/typescript/src/di/container.d.ts.map +1 -0
- package/lib/typescript/src/domain/IVersionManagerCore.d.ts +30 -0
- package/lib/typescript/src/domain/IVersionManagerCore.d.ts.map +1 -0
- package/lib/typescript/src/domain/VersionManagerCore.d.ts +94 -0
- package/lib/typescript/src/domain/VersionManagerCore.d.ts.map +1 -0
- package/lib/typescript/src/domain/engines/decision/DecisionEngine.d.ts +16 -0
- package/lib/typescript/src/domain/engines/decision/DecisionEngine.d.ts.map +1 -0
- package/lib/typescript/src/domain/engines/policy/IUpdatePolicyEngine.d.ts +17 -0
- package/lib/typescript/src/domain/engines/policy/IUpdatePolicyEngine.d.ts.map +1 -0
- package/lib/typescript/src/domain/engines/policy/PolicyEngine.d.ts +16 -0
- package/lib/typescript/src/domain/engines/policy/PolicyEngine.d.ts.map +1 -0
- package/lib/typescript/src/domain/engines/semver/IVersionComparator.d.ts +7 -0
- package/lib/typescript/src/domain/engines/semver/IVersionComparator.d.ts.map +1 -0
- package/lib/typescript/src/domain/engines/semver/SemVerEngine.d.ts +11 -0
- package/lib/typescript/src/domain/engines/semver/SemVerEngine.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/VersionManagerException.d.ts +97 -0
- package/lib/typescript/src/domain/errors/VersionManagerException.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/ActionPlan.d.ts +15 -0
- package/lib/typescript/src/domain/models/ActionPlan.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/ConfigDocument.d.ts +86 -0
- package/lib/typescript/src/domain/models/ConfigDocument.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/Events.d.ts +39 -0
- package/lib/typescript/src/domain/models/Events.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/LifecycleState.d.ts +18 -0
- package/lib/typescript/src/domain/models/LifecycleState.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/ParsedVersion.d.ts +9 -0
- package/lib/typescript/src/domain/models/ParsedVersion.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/PlatformId.d.ts +3 -0
- package/lib/typescript/src/domain/models/PlatformId.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/PublicApiOptions.d.ts +13 -0
- package/lib/typescript/src/domain/models/PublicApiOptions.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/RemoteVersionInfo.d.ts +21 -0
- package/lib/typescript/src/domain/models/RemoteVersionInfo.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/StoreLookup.d.ts +12 -0
- package/lib/typescript/src/domain/models/StoreLookup.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/Unsubscribe.d.ts +2 -0
- package/lib/typescript/src/domain/models/Unsubscribe.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/UpdateInfo.d.ts +11 -0
- package/lib/typescript/src/domain/models/UpdateInfo.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/VersionManagerOptions.d.ts +149 -0
- package/lib/typescript/src/domain/models/VersionManagerOptions.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/ICacheStore.d.ts +6 -0
- package/lib/typescript/src/domain/ports/ICacheStore.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IClock.d.ts +4 -0
- package/lib/typescript/src/domain/ports/IClock.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IConfigProvider.d.ts +11 -0
- package/lib/typescript/src/domain/ports/IConfigProvider.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IConfigSources.d.ts +25 -0
- package/lib/typescript/src/domain/ports/IConfigSources.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IPlatformBridge.d.ts +77 -0
- package/lib/typescript/src/domain/ports/IPlatformBridge.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IStoreProvider.d.ts +7 -0
- package/lib/typescript/src/domain/ports/IStoreProvider.d.ts.map +1 -0
- package/lib/typescript/src/domain/ports/IVersionRepository.d.ts +8 -0
- package/lib/typescript/src/domain/ports/IVersionRepository.d.ts.map +1 -0
- package/lib/typescript/src/domain/statemachine/LifecycleStateMachine.d.ts +25 -0
- package/lib/typescript/src/domain/statemachine/LifecycleStateMachine.d.ts.map +1 -0
- package/lib/typescript/src/domain/usecases/CheckForUpdatesUseCase.d.ts +30 -0
- package/lib/typescript/src/domain/usecases/CheckForUpdatesUseCase.d.ts.map +1 -0
- package/lib/typescript/src/domain/usecases/ForceTriggerUpdateUseCase.d.ts +17 -0
- package/lib/typescript/src/domain/usecases/ForceTriggerUpdateUseCase.d.ts.map +1 -0
- package/lib/typescript/src/domain/usecases/ResetIgnoredVersionsUseCase.d.ts +7 -0
- package/lib/typescript/src/domain/usecases/ResetIgnoredVersionsUseCase.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +17 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/platform/contracts/IPlatformBridge.d.ts +2 -0
- package/lib/typescript/src/platform/contracts/IPlatformBridge.d.ts.map +1 -0
- package/lib/typescript/src/platform/createPlatformBridge.d.ts +12 -0
- package/lib/typescript/src/platform/createPlatformBridge.d.ts.map +1 -0
- package/lib/typescript/src/platform/createPlatformBridge.native.d.ts +4 -0
- package/lib/typescript/src/platform/createPlatformBridge.native.d.ts.map +1 -0
- package/lib/typescript/src/platform/native/NativePlatformBridge.d.ts +17 -0
- package/lib/typescript/src/platform/native/NativePlatformBridge.d.ts.map +1 -0
- package/lib/typescript/src/platform/native/NativeVersionCheck.d.ts +45 -0
- package/lib/typescript/src/platform/native/NativeVersionCheck.d.ts.map +1 -0
- package/lib/typescript/src/platform/web/WebPlatformBridge.d.ts +17 -0
- package/lib/typescript/src/platform/web/WebPlatformBridge.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/ForceUpdateScreen.d.ts +12 -0
- package/lib/typescript/src/presentation/components/ForceUpdateScreen.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/OptionalUpdateBanner.d.ts +12 -0
- package/lib/typescript/src/presentation/components/OptionalUpdateBanner.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/SoftUpdateDialog.d.ts +14 -0
- package/lib/typescript/src/presentation/components/SoftUpdateDialog.d.ts.map +1 -0
- package/lib/typescript/src/presentation/hooks/VersionManagerProvider.d.ts +9 -0
- package/lib/typescript/src/presentation/hooks/VersionManagerProvider.d.ts.map +1 -0
- package/lib/typescript/src/presentation/hooks/context.d.ts +3 -0
- package/lib/typescript/src/presentation/hooks/context.d.ts.map +1 -0
- package/lib/typescript/src/presentation/hooks/useUpdateState.d.ts +17 -0
- package/lib/typescript/src/presentation/hooks/useUpdateState.d.ts.map +1 -0
- package/lib/typescript/src/presentation/hooks/useVersionManager.d.ts +22 -0
- package/lib/typescript/src/presentation/hooks/useVersionManager.d.ts.map +1 -0
- package/lib/typescript/src/presentation/state/VersionManagerStore.d.ts +28 -0
- package/lib/typescript/src/presentation/state/VersionManagerStore.d.ts.map +1 -0
- package/lib/typescript/src/publicApi.d.ts +24 -0
- package/lib/typescript/src/publicApi.d.ts.map +1 -0
- package/lib/typescript/src/shared/eventbus/EventBus.d.ts +21 -0
- package/lib/typescript/src/shared/eventbus/EventBus.d.ts.map +1 -0
- package/lib/typescript/src/shared/logging/Logger.d.ts +17 -0
- package/lib/typescript/src/shared/logging/Logger.d.ts.map +1 -0
- package/lib/typescript/src/ui.d.ts +15 -0
- package/lib/typescript/src/ui.d.ts.map +1 -0
- package/package.json +192 -0
- package/src/data/cache/MemoryCacheStore.ts +36 -0
- package/src/data/cache/PersistentCacheStore.ts +63 -0
- package/src/data/config/ConfigCache.ts +30 -0
- package/src/data/config/ConfigDocumentValidator.ts +309 -0
- package/src/data/config/ConfigLoader.ts +105 -0
- package/src/data/config/ConfigProvider.ts +84 -0
- package/src/data/config/ConfigResolutionPipeline.ts +424 -0
- package/src/data/config/ConfigValidator.ts +79 -0
- package/src/data/config/SignatureVerifier.ts +90 -0
- package/src/data/config/canonicalize.ts +111 -0
- package/src/data/config/sources/EnvironmentOverrideSource.ts +22 -0
- package/src/data/config/sources/LocalConfigSource.ts +24 -0
- package/src/data/config/sources/RemoteConfigSource.ts +41 -0
- package/src/data/providers/amazon/AmazonAppstoreProvider.ts +16 -0
- package/src/data/providers/apple/AppleStoreProvider.ts +94 -0
- package/src/data/providers/custom-api/CustomApiProvider.ts +75 -0
- package/src/data/providers/firebase-remote-config/FirebaseRemoteConfigProvider.ts +16 -0
- package/src/data/providers/google-play/GooglePlayProvider.ts +75 -0
- package/src/data/providers/huawei/HuaweiAppGalleryProvider.ts +21 -0
- package/src/data/repositories/VersionRepositoryImpl.ts +90 -0
- package/src/di/container.ts +128 -0
- package/src/domain/IVersionManagerCore.ts +54 -0
- package/src/domain/VersionManagerCore.ts +425 -0
- package/src/domain/engines/decision/DecisionEngine.ts +47 -0
- package/src/domain/engines/policy/IUpdatePolicyEngine.ts +18 -0
- package/src/domain/engines/policy/PolicyEngine.ts +60 -0
- package/src/domain/engines/semver/IVersionComparator.ts +7 -0
- package/src/domain/engines/semver/SemVerEngine.ts +200 -0
- package/src/domain/errors/VersionManagerException.ts +166 -0
- package/src/domain/models/ActionPlan.ts +17 -0
- package/src/domain/models/ConfigDocument.ts +97 -0
- package/src/domain/models/Events.ts +48 -0
- package/src/domain/models/LifecycleState.ts +50 -0
- package/src/domain/models/ParsedVersion.ts +8 -0
- package/src/domain/models/PlatformId.ts +9 -0
- package/src/domain/models/PublicApiOptions.ts +14 -0
- package/src/domain/models/RemoteVersionInfo.ts +23 -0
- package/src/domain/models/StoreLookup.ts +12 -0
- package/src/domain/models/Unsubscribe.ts +1 -0
- package/src/domain/models/UpdateInfo.ts +11 -0
- package/src/domain/models/VersionManagerOptions.ts +150 -0
- package/src/domain/ports/ICacheStore.ts +5 -0
- package/src/domain/ports/IClock.ts +3 -0
- package/src/domain/ports/IConfigProvider.ts +18 -0
- package/src/domain/ports/IConfigSources.ts +44 -0
- package/src/domain/ports/IPlatformBridge.ts +97 -0
- package/src/domain/ports/IStoreProvider.ts +12 -0
- package/src/domain/ports/IVersionRepository.ts +14 -0
- package/src/domain/statemachine/LifecycleStateMachine.ts +76 -0
- package/src/domain/usecases/CheckForUpdatesUseCase.ts +63 -0
- package/src/domain/usecases/ForceTriggerUpdateUseCase.ts +35 -0
- package/src/domain/usecases/ResetIgnoredVersionsUseCase.ts +26 -0
- package/src/index.tsx +84 -0
- package/src/platform/contracts/IPlatformBridge.ts +14 -0
- package/src/platform/createPlatformBridge.native.ts +7 -0
- package/src/platform/createPlatformBridge.ts +15 -0
- package/src/platform/native/NativePlatformBridge.ts +179 -0
- package/src/platform/native/NativeVersionCheck.ts +64 -0
- package/src/platform/web/WebPlatformBridge.ts +347 -0
- package/src/presentation/components/ForceUpdateScreen.tsx +64 -0
- package/src/presentation/components/OptionalUpdateBanner.tsx +53 -0
- package/src/presentation/components/SoftUpdateDialog.tsx +84 -0
- package/src/presentation/hooks/VersionManagerProvider.tsx +23 -0
- package/src/presentation/hooks/context.ts +6 -0
- package/src/presentation/hooks/useUpdateState.ts +50 -0
- package/src/presentation/hooks/useVersionManager.ts +68 -0
- package/src/presentation/state/VersionManagerStore.ts +72 -0
- package/src/publicApi.ts +126 -0
- package/src/shared/eventbus/EventBus.ts +56 -0
- package/src/shared/logging/Logger.ts +70 -0
- package/src/ui.tsx +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICacheStore.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/ICacheStore.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IClock.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IClock.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,GAAG,IAAI,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConfigLoadRequest } from '../models/ConfigDocument';
|
|
2
|
+
import type { ResolvedVersionManagerConfig, VersionManagerOptions } from '../models/VersionManagerOptions';
|
|
3
|
+
import type { Unsubscribe } from './IPlatformBridge';
|
|
4
|
+
export interface IConfigProvider {
|
|
5
|
+
resolve(defaults: VersionManagerOptions): Promise<ResolvedVersionManagerConfig>;
|
|
6
|
+
/** Doc 03 §0's named surface (`load(request)`) — delegates to resolve(request.defaults). */
|
|
7
|
+
load(request: ConfigLoadRequest): Promise<ResolvedVersionManagerConfig>;
|
|
8
|
+
/** Fires when a later resolution (e.g. a remote refresh) produces a changed config. */
|
|
9
|
+
subscribe(listener: (config: ResolvedVersionManagerConfig) => void): Unsubscribe;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=IConfigProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConfigProvider.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IConfigProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACV,4BAA4B,EAC5B,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,OAAO,CACL,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACzC,4FAA4F;IAC5F,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACxE,uFAAuF;IACvF,SAAS,CACP,QAAQ,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI,GACvD,WAAW,CAAC;CAChB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BoundaryValidationResult, FetchOptions, RawConfigDocument, SchemaValidationResult, SignedConfigEnvelope, SignatureVerificationResult, TrustedKeySet } from '../models/ConfigDocument';
|
|
2
|
+
import type { ResolvedVersionManagerConfig } from '../models/VersionManagerOptions';
|
|
3
|
+
/** Doc 03 §0 — small pipeline of ports living under src/data/config/. */
|
|
4
|
+
export interface ILocalConfigSource {
|
|
5
|
+
/** null if no bundled config asset/envelope was supplied. */
|
|
6
|
+
read(): Promise<RawConfigDocument | null>;
|
|
7
|
+
}
|
|
8
|
+
export interface IRemoteConfigSource {
|
|
9
|
+
fetch(url: string, options: FetchOptions): Promise<RawConfigDocument>;
|
|
10
|
+
}
|
|
11
|
+
export interface IEnvironmentOverrideSource {
|
|
12
|
+
read(): Promise<Partial<import('../models/ConfigDocument').VersionManagerConfigDocument>>;
|
|
13
|
+
}
|
|
14
|
+
export interface IConfigCache {
|
|
15
|
+
getLastValid(): Promise<ResolvedVersionManagerConfig | null>;
|
|
16
|
+
setLastValid(config: ResolvedVersionManagerConfig): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface IConfigValidator {
|
|
19
|
+
validateSchema(doc: RawConfigDocument): SchemaValidationResult;
|
|
20
|
+
validateBoundaries(doc: RawConfigDocument): BoundaryValidationResult;
|
|
21
|
+
}
|
|
22
|
+
export interface ISignatureVerifier {
|
|
23
|
+
verify(envelope: SignedConfigEnvelope, trustedKeys: TrustedKeySet): Promise<SignatureVerificationResult>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=IConfigSources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConfigSources.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IConfigSources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,aAAa,EACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAEpF,yEAAyE;AAEzE,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,IAAI,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,IAAI,OAAO,CACb,OAAO,CAAC,OAAO,0BAA0B,EAAE,4BAA4B,CAAC,CACzE,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,YAAY,IAAI,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAAC,CAAC;IAC7D,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,GAAG,EAAE,iBAAiB,GAAG,sBAAsB,CAAC;IAC/D,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,wBAAwB,CAAC;CACtE;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CACJ,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,EAAE,aAAa,GACzB,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { PlatformId } from '../models/PlatformId';
|
|
2
|
+
import type { Unsubscribe } from '../models/Unsubscribe';
|
|
3
|
+
import type { IClock } from './IClock';
|
|
4
|
+
export type { Unsubscribe };
|
|
5
|
+
export interface HttpRequest {
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly method: 'GET' | 'POST';
|
|
8
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
9
|
+
readonly body?: string;
|
|
10
|
+
readonly timeoutMs: number;
|
|
11
|
+
}
|
|
12
|
+
export interface HttpResponse {
|
|
13
|
+
readonly status: number;
|
|
14
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
15
|
+
readonly body: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IHttpClient {
|
|
18
|
+
request(req: HttpRequest): Promise<HttpResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface IKeyValueStorage {
|
|
21
|
+
get(key: string): Promise<string | null>;
|
|
22
|
+
set(key: string, value: string): Promise<void>;
|
|
23
|
+
remove(key: string): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface ISecureStorage {
|
|
26
|
+
getItem(key: string): Promise<string | null>;
|
|
27
|
+
setItem(key: string, value: string): Promise<void>;
|
|
28
|
+
removeItem(key: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export interface IAppInfoProvider {
|
|
31
|
+
getCurrentVersion(): Promise<string>;
|
|
32
|
+
getBuildNumber(): Promise<string>;
|
|
33
|
+
getBundleId(): Promise<string>;
|
|
34
|
+
}
|
|
35
|
+
export interface IDeviceInfoProvider {
|
|
36
|
+
getOsVersion(): Promise<string>;
|
|
37
|
+
getDeviceModel(): Promise<string>;
|
|
38
|
+
getLocale(): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
export interface BackgroundTaskDescriptor {
|
|
41
|
+
readonly taskId: string;
|
|
42
|
+
readonly minIntervalMs: number;
|
|
43
|
+
}
|
|
44
|
+
export interface IBackgroundScheduler {
|
|
45
|
+
schedule(task: BackgroundTaskDescriptor): Promise<void>;
|
|
46
|
+
cancel(taskId: string): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export interface IAppLifecycleObserver {
|
|
49
|
+
onForeground(cb: () => void): Unsubscribe;
|
|
50
|
+
onBackground(cb: () => void): Unsubscribe;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Additive port (not in doc 01 §4's original table) backing ISignatureVerifier
|
|
54
|
+
* (doc 03 §3.4): "OS-provided cryptography exclusively." Optional because it is only
|
|
55
|
+
* required when a consumer configures remote/local signed config documents with
|
|
56
|
+
* algorithm !== 'none'. `keyId` (not raw key material) crosses the JS/native boundary —
|
|
57
|
+
* per doc 03 §3.4 the actual public key / HMAC secret is embedded at build time on the
|
|
58
|
+
* native side (iOS Info.plist/Secrets.xcconfig, Android BuildConfig) and resolved from
|
|
59
|
+
* `keyId` inside the native implementation; JS never sees key material.
|
|
60
|
+
*/
|
|
61
|
+
export interface ICryptoProvider {
|
|
62
|
+
verifyEd25519(keyId: string, messageBase64: string, signatureBase64: string): Promise<boolean>;
|
|
63
|
+
verifyHmacSha256(keyId: string, messageBase64: string, macBase64: string): Promise<boolean>;
|
|
64
|
+
}
|
|
65
|
+
export interface IPlatformBridge {
|
|
66
|
+
readonly platform: PlatformId;
|
|
67
|
+
readonly http: IHttpClient;
|
|
68
|
+
readonly storage: IKeyValueStorage;
|
|
69
|
+
readonly secureStorage: ISecureStorage;
|
|
70
|
+
readonly appInfo: IAppInfoProvider;
|
|
71
|
+
readonly deviceInfo: IDeviceInfoProvider;
|
|
72
|
+
readonly scheduler: IBackgroundScheduler;
|
|
73
|
+
readonly clock: IClock;
|
|
74
|
+
readonly lifecycle: IAppLifecycleObserver;
|
|
75
|
+
readonly crypto?: ICryptoProvider;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=IPlatformBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPlatformBridge.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IPlatformBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;IAC1C,YAAY,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CAC3C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,aAAa,CACX,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CACnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StoreProviderId } from '../models/PlatformId';
|
|
2
|
+
import type { StoreLookupRequest, StoreLookupResult } from '../models/StoreLookup';
|
|
3
|
+
export interface IStoreProvider {
|
|
4
|
+
readonly id: StoreProviderId;
|
|
5
|
+
fetchLatestVersionInfo(request: StoreLookupRequest): Promise<StoreLookupResult>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=IStoreProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IStoreProvider.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IStoreProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAC;IAC7B,sBAAsB,CACpB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RemoteVersionInfo, UserVersionDecision, VersionCheckRequest } from '../models/RemoteVersionInfo';
|
|
2
|
+
export interface IVersionRepository {
|
|
3
|
+
getRemoteVersionInfo(request: VersionCheckRequest): Promise<RemoteVersionInfo>;
|
|
4
|
+
getCachedVersionInfo(): Promise<RemoteVersionInfo | null>;
|
|
5
|
+
persistUserDecision(decision: UserVersionDecision): Promise<void>;
|
|
6
|
+
getUserDecision(): Promise<UserVersionDecision | null>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=IVersionRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IVersionRepository.d.ts","sourceRoot":"","sources":["../../../../../src/domain/ports/IVersionRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAClB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,oBAAoB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC1D,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,eAAe,IAAI,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACxD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LifecycleState } from '../models/LifecycleState';
|
|
2
|
+
import type { Unsubscribe } from '../models/Unsubscribe';
|
|
3
|
+
/** Internal invariant violation — not part of the public VersionManagerException hierarchy. */
|
|
4
|
+
export declare class InvalidTransitionError extends Error {
|
|
5
|
+
constructor(from: LifecycleState, to: LifecycleState);
|
|
6
|
+
}
|
|
7
|
+
export interface ILifecycleStateMachine {
|
|
8
|
+
readonly current: LifecycleState;
|
|
9
|
+
transition(to: LifecycleState): void;
|
|
10
|
+
onEnter(state: LifecycleState, handler: () => void): Unsubscribe;
|
|
11
|
+
onExit(state: LifecycleState, handler: () => void): Unsubscribe;
|
|
12
|
+
}
|
|
13
|
+
export declare class LifecycleStateMachine implements ILifecycleStateMachine {
|
|
14
|
+
private state;
|
|
15
|
+
private readonly enterHandlers;
|
|
16
|
+
private readonly exitHandlers;
|
|
17
|
+
get current(): LifecycleState;
|
|
18
|
+
transition(to: LifecycleState): void;
|
|
19
|
+
onEnter(state: LifecycleState, handler: () => void): Unsubscribe;
|
|
20
|
+
onExit(state: LifecycleState, handler: () => void): Unsubscribe;
|
|
21
|
+
private register;
|
|
22
|
+
/** Copy-on-write snapshot dispatch (Prompt 1 §9.2) — safe if a handler unsubscribes mid-dispatch. */
|
|
23
|
+
private notify;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=LifecycleStateMachine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifecycleStateMachine.d.ts","sourceRoot":"","sources":["../../../../../src/domain/statemachine/LifecycleStateMachine.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,+FAA+F;AAC/F,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc;CAIrD;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;IACjE,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;CACjE;AAID,qBAAa,qBAAsB,YAAW,sBAAsB;IAClE,OAAO,CAAC,KAAK,CAAgD;IAC7D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyB;IAEtD,IAAI,OAAO,IAAI,cAAc,CAE5B;IAED,UAAU,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI;IAWpC,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW;IAIhE,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW;IAI/D,OAAO,CAAC,QAAQ;IAgBhB,qGAAqG;IACrG,OAAO,CAAC,MAAM;CAOf"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DecisionEngine } from '../engines/decision/DecisionEngine';
|
|
2
|
+
import type { IUpdatePolicyEngine } from '../engines/policy/IUpdatePolicyEngine';
|
|
3
|
+
import type { IVersionComparator } from '../engines/semver/IVersionComparator';
|
|
4
|
+
import type { ActionPlan } from '../models/ActionPlan';
|
|
5
|
+
import type { PlatformId } from '../models/PlatformId';
|
|
6
|
+
import type { IClock } from '../ports/IClock';
|
|
7
|
+
import type { IVersionRepository } from '../ports/IVersionRepository';
|
|
8
|
+
export interface CheckForUpdatesUseCaseDeps {
|
|
9
|
+
readonly repository: IVersionRepository;
|
|
10
|
+
readonly comparator: IVersionComparator;
|
|
11
|
+
readonly policyEngine: IUpdatePolicyEngine;
|
|
12
|
+
readonly decisionEngine: DecisionEngine;
|
|
13
|
+
readonly clock: IClock;
|
|
14
|
+
}
|
|
15
|
+
export interface CheckForUpdatesInput {
|
|
16
|
+
readonly currentVersion: string;
|
|
17
|
+
readonly bundleId: string;
|
|
18
|
+
readonly platform: PlatformId;
|
|
19
|
+
readonly bypassCache: boolean;
|
|
20
|
+
readonly timeoutMs: number;
|
|
21
|
+
readonly forceUpdateBelow: string | null;
|
|
22
|
+
readonly rolloutPercentage: number;
|
|
23
|
+
readonly rolloutBucket: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class CheckForUpdatesUseCase {
|
|
26
|
+
private readonly deps;
|
|
27
|
+
constructor(deps: CheckForUpdatesUseCaseDeps);
|
|
28
|
+
execute(input: CheckForUpdatesInput): Promise<ActionPlan>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=CheckForUpdatesUseCase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckForUpdatesUseCase.d.ts","sourceRoot":"","sources":["../../../../../src/domain/usecases/CheckForUpdatesUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,0BAA0B;IAEvD,OAAO,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAgChE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ActionPlan } from '../models/ActionPlan';
|
|
2
|
+
import type { DecisionEngine } from '../engines/decision/DecisionEngine';
|
|
3
|
+
import type { PlatformId } from '../models/PlatformId';
|
|
4
|
+
import type { IVersionRepository } from '../ports/IVersionRepository';
|
|
5
|
+
export interface ForceTriggerUpdateInput {
|
|
6
|
+
readonly currentVersion: string;
|
|
7
|
+
readonly bundleId: string;
|
|
8
|
+
readonly platform: PlatformId;
|
|
9
|
+
readonly timeoutMs: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class ForceTriggerUpdateUseCase {
|
|
12
|
+
private readonly repository;
|
|
13
|
+
private readonly decisionEngine;
|
|
14
|
+
constructor(repository: IVersionRepository, decisionEngine: DecisionEngine);
|
|
15
|
+
execute(input: ForceTriggerUpdateInput): Promise<ActionPlan>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ForceTriggerUpdateUseCase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForceTriggerUpdateUseCase.d.ts","sourceRoot":"","sources":["../../../../../src/domain/usecases/ForceTriggerUpdateUseCase.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,yBAAyB;IAElC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBADd,UAAU,EAAE,kBAAkB,EAC9B,cAAc,EAAE,cAAc;IAG3C,OAAO,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;CAenE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IVersionRepository } from '../ports/IVersionRepository';
|
|
2
|
+
export declare class ResetIgnoredVersionsUseCase {
|
|
3
|
+
private readonly repository;
|
|
4
|
+
constructor(repository: IVersionRepository);
|
|
5
|
+
execute(versions?: readonly string[]): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ResetIgnoredVersionsUseCase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetIgnoredVersionsUseCase.d.ts","sourceRoot":"","sources":["../../../../../src/domain/usecases/ResetIgnoredVersionsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,kBAAkB;IAErD,OAAO,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAoB3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { VersionManager, VersionManagerBuilder } from './publicApi';
|
|
2
|
+
export type { IVersionManagerCore, IVersionManagerEvents, } from './domain/IVersionManagerCore';
|
|
3
|
+
export type { ActionPlan } from './domain/models/ActionPlan';
|
|
4
|
+
export { ActionType } from './domain/models/ActionPlan';
|
|
5
|
+
export type { ParsedVersion } from './domain/models/ParsedVersion';
|
|
6
|
+
export type { UpdateInfo } from './domain/models/UpdateInfo';
|
|
7
|
+
export { LifecycleState } from './domain/models/LifecycleState';
|
|
8
|
+
export type { PlatformId, StoreProviderId } from './domain/models/PlatformId';
|
|
9
|
+
export type { RemoteVersionInfo, UserVersionDecision, VersionCheckRequest, } from './domain/models/RemoteVersionInfo';
|
|
10
|
+
export type { Unsubscribe } from './domain/models/Unsubscribe';
|
|
11
|
+
export type { CheckForUpdatesOptions, ForceTriggerOptions, ResetIgnoredVersionsOptions, } from './domain/models/PublicApiOptions';
|
|
12
|
+
export type { CacheOptions, FallbackOptions, ILogSink, LogEntry, LoggingOptions, LogLevel, PolicyOptions, ResolvedVersionManagerConfig, RetryOptions, StoreLinksOptions, VersionManagerOptions, } from './domain/models/VersionManagerOptions';
|
|
13
|
+
export type { ErrorPhase, StateChangedEvent, UpdateDetectedEvent, UpdateNotAvailableEvent, UserActionEvent, UserActionType, VersionManagerErrorEvent, VersionManagerEventMap, VersionManagerEventType, } from './domain/models/Events';
|
|
14
|
+
export type { IPlatformBridge } from './domain/ports/IPlatformBridge';
|
|
15
|
+
export { AppNotFoundException, BoundaryValidationException, CacheCorruptionException, CacheException, CacheWriteException, ConfigSizeLimitExceededException, EnvironmentOverrideConflictException, InvalidConfigException, InvalidVersionFormatException, NetworkException, NotInitializedException, NotReadyException, OfflineException, PlatformBridgeException, PolicyEvaluationException, RateLimitException, RequestTimeoutException, SchemaValidationException, SignatureVerificationException, StorePermissionException, StoreProviderException, StoreResponseParseException, TlsHandshakeException, UnknownVersionManagerException, UnsupportedStoreException, UntrustedKeyIdException, VersionManagerException, } from './domain/errors/VersionManagerException';
|
|
16
|
+
export type { VersionManagerErrorCode } from './domain/errors/VersionManagerException';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpE,YAAY,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,aAAa,EACb,4BAA4B,EAC5B,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,gCAAgC,EAChC,oCAAoC,EACpC,sBAAsB,EACtB,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { IPlatformBridge, IHttpClient, IKeyValueStorage, ISecureStorage, IAppInfoProvider, IDeviceInfoProvider, IBackgroundScheduler, IAppLifecycleObserver, ICryptoProvider, BackgroundTaskDescriptor, HttpRequest, HttpResponse, } from '../../domain/ports/IPlatformBridge';
|
|
2
|
+
//# sourceMappingURL=IPlatformBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPlatformBridge.d.ts","sourceRoot":"","sources":["../../../../../src/platform/contracts/IPlatformBridge.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,YAAY,GACb,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IPlatformBridge } from '../domain/ports/IPlatformBridge';
|
|
2
|
+
/**
|
|
3
|
+
* Web/default implementation. Metro (React Native's bundler) prefers
|
|
4
|
+
* createPlatformBridge.native.ts for iOS/Android builds; Vite (the web build, see
|
|
5
|
+
* example/vite.config.mjs) has no such resolution rule and always resolves this file
|
|
6
|
+
* — the same convention already used by src/multiply.tsx / multiply.native.tsx. This
|
|
7
|
+
* indirection matters: NativePlatformBridge.ts imports NativeVersionCheck, whose
|
|
8
|
+
* top-level TurboModuleRegistry.getEnforcing() call would throw if ever evaluated on
|
|
9
|
+
* Web, so the native module must never even be imported into a web bundle.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createPlatformBridge(): IPlatformBridge;
|
|
12
|
+
//# sourceMappingURL=createPlatformBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlatformBridge.d.ts","sourceRoot":"","sources":["../../../../src/platform/createPlatformBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,CAEtD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IPlatformBridge } from '../domain/ports/IPlatformBridge';
|
|
2
|
+
/** iOS/Android implementation — see createPlatformBridge.ts for why this is a separate file. */
|
|
3
|
+
export declare function createPlatformBridge(): IPlatformBridge;
|
|
4
|
+
//# sourceMappingURL=createPlatformBridge.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlatformBridge.native.d.ts","sourceRoot":"","sources":["../../../../src/platform/createPlatformBridge.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,gGAAgG;AAChG,wBAAgB,oBAAoB,IAAI,eAAe,CAEtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PlatformId } from '../../domain/models/PlatformId';
|
|
2
|
+
import type { IAppInfoProvider, IAppLifecycleObserver, IBackgroundScheduler, ICryptoProvider, IDeviceInfoProvider, IHttpClient, IKeyValueStorage, IPlatformBridge, ISecureStorage } from '../../domain/ports/IPlatformBridge';
|
|
3
|
+
export declare class NativePlatformBridge implements IPlatformBridge {
|
|
4
|
+
readonly platform: PlatformId;
|
|
5
|
+
readonly http: IHttpClient;
|
|
6
|
+
readonly storage: IKeyValueStorage;
|
|
7
|
+
readonly secureStorage: ISecureStorage;
|
|
8
|
+
readonly appInfo: IAppInfoProvider;
|
|
9
|
+
readonly deviceInfo: IDeviceInfoProvider;
|
|
10
|
+
readonly scheduler: IBackgroundScheduler;
|
|
11
|
+
readonly clock: {
|
|
12
|
+
now: () => number;
|
|
13
|
+
};
|
|
14
|
+
readonly lifecycle: IAppLifecycleObserver;
|
|
15
|
+
readonly crypto: ICryptoProvider;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=NativePlatformBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativePlatformBridge.d.ts","sourceRoot":"","sources":["../../../../../src/platform/native/NativePlatformBridge.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAIV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,EAEf,MAAM,oCAAoC,CAAC;AAmJ5C,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAA6C;IAC1E,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAsB;IAChD,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAA2B;IAC7D,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAyB;IAC/D,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAA2B;IAC7D,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAA8B;IACtE,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAA+B;IACvE,QAAQ,CAAC,KAAK;mBAAc,MAAM;MAAiB;IACnD,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAgC;IACzE,QAAQ,CAAC,MAAM,EAAE,eAAe,CAA0B;CAC3D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type TurboModule } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* TurboModule Codegen spec. Deliberately small: HTTP (global `fetch`), the clock
|
|
4
|
+
* (`Date.now()`), and app-lifecycle (`AppState`) are already available in pure JS via
|
|
5
|
+
* React Native itself and do not need a custom native surface (Prompt 1 §4.1 revised
|
|
6
|
+
* during implementation — the design doc's per-target table listed a native `http`
|
|
7
|
+
* bridge conceptually, but RN's own Networking module already satisfies IHttpClient
|
|
8
|
+
* without new native code). What genuinely requires native code — reading the app's
|
|
9
|
+
* own version/bundle id and persisting key-value pairs via UserDefaults/Keychain or
|
|
10
|
+
* SharedPreferences/Keystore — is exactly what's declared here.
|
|
11
|
+
*/
|
|
12
|
+
export interface Spec extends TurboModule {
|
|
13
|
+
getCurrentAppVersion(): Promise<string>;
|
|
14
|
+
getBuildNumber(): Promise<string>;
|
|
15
|
+
getBundleId(): Promise<string>;
|
|
16
|
+
getOsVersion(): Promise<string>;
|
|
17
|
+
getDeviceModel(): Promise<string>;
|
|
18
|
+
getLocale(): Promise<string>;
|
|
19
|
+
storageGet(key: string): Promise<string | null>;
|
|
20
|
+
storageSet(key: string, value: string): Promise<void>;
|
|
21
|
+
storageRemove(key: string): Promise<void>;
|
|
22
|
+
secureStorageGet(key: string): Promise<string | null>;
|
|
23
|
+
secureStorageSet(key: string, value: string): Promise<void>;
|
|
24
|
+
secureStorageRemove(key: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Doc 03 §3.4 — signature verification over OS-provided cryptography. `keyId` is
|
|
27
|
+
* resolved to build-time-embedded key material natively (Info.plist/BuildConfig);
|
|
28
|
+
* only the keyId, not the key itself, crosses this bridge. Android implements both
|
|
29
|
+
* via java.security/javax.crypto; iOS implements HMAC-SHA256 via CommonCrypto and
|
|
30
|
+
* Ed25519 via a small CryptoKit-backed Swift wrapper (ios/PlatformBridge/Ed25519Verifier.swift).
|
|
31
|
+
*/
|
|
32
|
+
verifyEd25519(keyId: string, messageBase64: string, signatureBase64: string): Promise<boolean>;
|
|
33
|
+
verifyHmacSha256(keyId: string, messageBase64: string, macBase64: string): Promise<boolean>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Lazily resolved rather than the usual top-level
|
|
37
|
+
* `TurboModuleRegistry.getEnforcing<Spec>(...)` pattern, so importing this module (or
|
|
38
|
+
* anything that transitively imports it, e.g. src/di/container.ts) never throws in
|
|
39
|
+
* environments where the native module isn't registered — Jest's simulated native
|
|
40
|
+
* platform resolution, or a caller who supplies VersionManagerOptions.platformBridge
|
|
41
|
+
* and therefore never actually needs it. The registry lookup only happens the first
|
|
42
|
+
* time a method is actually called.
|
|
43
|
+
*/
|
|
44
|
+
export default function getNativeVersionCheck(): Spec;
|
|
45
|
+
//# sourceMappingURL=NativeVersionCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVersionCheck.d.ts","sourceRoot":"","sources":["../../../../../src/platform/native/NativeVersionCheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAErE;;;;;;;;;GASG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtD,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,aAAa,CACX,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAID;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,IAAI,IAAI,CAKpD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PlatformId } from '../../domain/models/PlatformId';
|
|
2
|
+
import type { IAppInfoProvider, IAppLifecycleObserver, IBackgroundScheduler, ICryptoProvider, IDeviceInfoProvider, IHttpClient, IKeyValueStorage, IPlatformBridge, ISecureStorage } from '../../domain/ports/IPlatformBridge';
|
|
3
|
+
export declare class WebPlatformBridge implements IPlatformBridge {
|
|
4
|
+
readonly platform: PlatformId;
|
|
5
|
+
readonly http: IHttpClient;
|
|
6
|
+
readonly storage: IKeyValueStorage;
|
|
7
|
+
readonly secureStorage: ISecureStorage;
|
|
8
|
+
readonly appInfo: IAppInfoProvider;
|
|
9
|
+
readonly deviceInfo: IDeviceInfoProvider;
|
|
10
|
+
readonly scheduler: IBackgroundScheduler;
|
|
11
|
+
readonly clock: {
|
|
12
|
+
now: () => number;
|
|
13
|
+
};
|
|
14
|
+
readonly lifecycle: IAppLifecycleObserver;
|
|
15
|
+
readonly crypto: ICryptoProvider;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=WebPlatformBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPlatformBridge.d.ts","sourceRoot":"","sources":["../../../../../src/platform/web/WebPlatformBridge.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAGV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,EAGf,MAAM,oCAAoC,CAAC;AA4T5C,qBAAa,iBAAkB,YAAW,eAAe;IACvD,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAS;IACtC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAuB;IACjD,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAA4B;IAC9D,QAAQ,CAAC,aAAa,EAAE,cAAc,CAA0B;IAChE,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAA4B;IAC9D,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAA+B;IACvE,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAgC;IACxE,QAAQ,CAAC,KAAK;mBAAc,MAAM;MAAiB;IACnD,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAiC;IAC1E,QAAQ,CAAC,MAAM,EAAE,eAAe,CAA2B;CAC5D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { UpdateInfo } from '../../domain/models/UpdateInfo';
|
|
3
|
+
export interface ForceUpdateScreenProps {
|
|
4
|
+
updateInfo: UpdateInfo;
|
|
5
|
+
onUpdatePress: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
updateButtonLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Full-screen, non-dismissible lockout (Prompt 1 §5.3; UI copy detail is Prompt 19). */
|
|
11
|
+
export declare function ForceUpdateScreen({ updateInfo, onUpdatePress, title, message, updateButtonLabel, }: ForceUpdateScreenProps): ReactElement;
|
|
12
|
+
//# sourceMappingURL=ForceUpdateScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForceUpdateScreen.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/components/ForceUpdateScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,aAAa,EACb,KAAyB,EACzB,OAA0F,EAC1F,iBAAgC,GACjC,EAAE,sBAAsB,GAAG,YAAY,CAqBvC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { UpdateInfo } from '../../domain/models/UpdateInfo';
|
|
3
|
+
export interface OptionalUpdateBannerProps {
|
|
4
|
+
updateInfo: UpdateInfo;
|
|
5
|
+
onUpdatePress: () => void;
|
|
6
|
+
onDismissPress: () => void;
|
|
7
|
+
message?: string;
|
|
8
|
+
updateButtonLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Low-intrusion in-app banner (Prompt 1 §5.3; UI copy detail is Prompt 19). */
|
|
11
|
+
export declare function OptionalUpdateBanner({ updateInfo, onUpdatePress, onDismissPress, message, updateButtonLabel, }: OptionalUpdateBannerProps): ReactElement;
|
|
12
|
+
//# sourceMappingURL=OptionalUpdateBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalUpdateBanner.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/components/OptionalUpdateBanner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAA6D,EAC7D,iBAA4B,GAC7B,EAAE,yBAAyB,GAAG,YAAY,CAkB1C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { UpdateInfo } from '../../domain/models/UpdateInfo';
|
|
3
|
+
export interface SoftUpdateDialogProps {
|
|
4
|
+
updateInfo: UpdateInfo;
|
|
5
|
+
onUpdatePress: () => void;
|
|
6
|
+
onLaterPress: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
updateButtonLabel?: string;
|
|
10
|
+
laterButtonLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Dismissible modal dialog (Prompt 1 §5.3; UI copy detail is Prompt 19). */
|
|
13
|
+
export declare function SoftUpdateDialog({ updateInfo, onUpdatePress, onLaterPress, title, message, updateButtonLabel, laterButtonLabel, }: SoftUpdateDialogProps): ReactElement;
|
|
14
|
+
//# sourceMappingURL=SoftUpdateDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SoftUpdateDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/components/SoftUpdateDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAA0B,EAC1B,OAA4H,EAC5H,iBAA4B,EAC5B,gBAA0B,GAC3B,EAAE,qBAAqB,GAAG,YAAY,CAkCtC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { VersionManagerOptions } from '../../domain/models/VersionManagerOptions';
|
|
3
|
+
export interface VersionManagerProviderProps {
|
|
4
|
+
options: VersionManagerOptions;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** Optional top-level configuration provider (Prompt 2 §6) — an alternative to passing options to every useVersionManager() call. */
|
|
8
|
+
export declare function VersionManagerProvider({ options, children, }: VersionManagerProviderProps): ReactElement;
|
|
9
|
+
//# sourceMappingURL=VersionManagerProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionManagerProvider.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/hooks/VersionManagerProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAGvF,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,qIAAqI;AACrI,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,QAAQ,GACT,EAAE,2BAA2B,GAAG,YAAY,CAO5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/hooks/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,eAAO,MAAM,qBAAqB,qDAEjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ActionPlan } from '../../domain/models/ActionPlan';
|
|
2
|
+
import type { LifecycleState } from '../../domain/models/LifecycleState';
|
|
3
|
+
import type { UpdateInfo } from '../../domain/models/UpdateInfo';
|
|
4
|
+
export interface UseUpdateStateResult {
|
|
5
|
+
readonly state: LifecycleState;
|
|
6
|
+
readonly updateInfo: UpdateInfo | null;
|
|
7
|
+
readonly isUpdateAvailable: boolean;
|
|
8
|
+
readonly actionPlan: ActionPlan | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Reactive state only, for components that don't need to trigger checks (Prompt 2 §6).
|
|
12
|
+
* Must be used beneath a tree where useVersionManager() or VersionManagerProvider has
|
|
13
|
+
* already run at least once — otherwise this falls back to VersionManager.getInstance(),
|
|
14
|
+
* which throws NotInitializedException if configure() was never called.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useUpdateState(): UseUpdateStateResult;
|
|
17
|
+
//# sourceMappingURL=useUpdateState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateState.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/hooks/useUpdateState.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAKjE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAsBrD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IVersionManagerCore } from '../../domain/IVersionManagerCore';
|
|
2
|
+
import type { LifecycleState } from '../../domain/models/LifecycleState';
|
|
3
|
+
import type { ActionPlan } from '../../domain/models/ActionPlan';
|
|
4
|
+
import type { CheckForUpdatesOptions } from '../../domain/models/PublicApiOptions';
|
|
5
|
+
import type { UpdateInfo } from '../../domain/models/UpdateInfo';
|
|
6
|
+
import type { VersionManagerOptions } from '../../domain/models/VersionManagerOptions';
|
|
7
|
+
export interface UseVersionManagerResult {
|
|
8
|
+
readonly manager: IVersionManagerCore;
|
|
9
|
+
readonly state: LifecycleState;
|
|
10
|
+
readonly updateInfo: UpdateInfo | null;
|
|
11
|
+
readonly isUpdateAvailable: boolean;
|
|
12
|
+
readonly checkForUpdates: (options?: CheckForUpdatesOptions) => Promise<ActionPlan>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Bootstraps (or attaches to) the singleton and returns the imperative handle plus
|
|
16
|
+
* reactive state in one call (Prompt 2 §6). For a stable manager reference across
|
|
17
|
+
* re-renders, pass a memoized `options` object — VersionManager.configure() is
|
|
18
|
+
* idempotent for equal options, but this hook still re-invokes it whenever the
|
|
19
|
+
* `options` reference changes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useVersionManager(options?: VersionManagerOptions): UseVersionManagerResult;
|
|
22
|
+
//# sourceMappingURL=useVersionManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVersionManager.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/hooks/useVersionManager.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAKvF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,CACxB,OAAO,CAAC,EAAE,sBAAsB,KAC7B,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,uBAAuB,CA+BzB"}
|