@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,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { toVersionManagerException, UnsupportedStoreException } from "../../domain/errors/VersionManagerException.js";
|
|
4
|
+
const REMOTE_INFO_CACHE_KEY = 'remote-version-info';
|
|
5
|
+
const USER_DECISION_STORAGE_KEY = 'vm_user_decision';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Sequential fallback across registered providers (Prompt 14's simpler tier): the first
|
|
9
|
+
* provider to succeed wins. Only providers the host app actually registers via DI
|
|
10
|
+
* reach this list — nothing here imports a provider it doesn't need (Prompt 1 §8).
|
|
11
|
+
*/
|
|
12
|
+
export class VersionRepositoryImpl {
|
|
13
|
+
constructor(providers, cache, storage, clock) {
|
|
14
|
+
this.providers = providers;
|
|
15
|
+
this.cache = cache;
|
|
16
|
+
this.storage = storage;
|
|
17
|
+
this.clock = clock;
|
|
18
|
+
}
|
|
19
|
+
async getRemoteVersionInfo(request) {
|
|
20
|
+
if (!request.bypassCache) {
|
|
21
|
+
const cached = await this.cache.get(REMOTE_INFO_CACHE_KEY);
|
|
22
|
+
if (cached) return cached;
|
|
23
|
+
}
|
|
24
|
+
if (this.providers.length === 0) {
|
|
25
|
+
throw new UnsupportedStoreException({
|
|
26
|
+
message: 'No store providers are registered — configure() must include at least one of stores.ios/.android/.custom/etc'
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
let lastError = null;
|
|
30
|
+
for (const provider of this.providers) {
|
|
31
|
+
try {
|
|
32
|
+
const result = await provider.fetchLatestVersionInfo({
|
|
33
|
+
bundleId: request.bundleId,
|
|
34
|
+
region: null,
|
|
35
|
+
timeoutMs: request.timeoutMs
|
|
36
|
+
});
|
|
37
|
+
const info = {
|
|
38
|
+
latestVersion: result.latestVersion,
|
|
39
|
+
storeUrl: result.storeUrl,
|
|
40
|
+
releaseNotes: result.releaseNotes,
|
|
41
|
+
minimumOsVersion: result.minimumOsVersion,
|
|
42
|
+
fetchedAt: this.clock.now(),
|
|
43
|
+
provider: provider.id
|
|
44
|
+
};
|
|
45
|
+
await this.cache.set(REMOTE_INFO_CACHE_KEY, info);
|
|
46
|
+
return info;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
lastError = error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
throw toVersionManagerException(lastError);
|
|
52
|
+
}
|
|
53
|
+
async getCachedVersionInfo() {
|
|
54
|
+
return this.cache.get(REMOTE_INFO_CACHE_KEY);
|
|
55
|
+
}
|
|
56
|
+
async persistUserDecision(decision) {
|
|
57
|
+
await this.storage.set(USER_DECISION_STORAGE_KEY, JSON.stringify(decision));
|
|
58
|
+
}
|
|
59
|
+
async getUserDecision() {
|
|
60
|
+
const raw = await this.storage.get(USER_DECISION_STORAGE_KEY);
|
|
61
|
+
if (!raw) return null;
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(raw);
|
|
64
|
+
} catch {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=VersionRepositoryImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["toVersionManagerException","UnsupportedStoreException","REMOTE_INFO_CACHE_KEY","USER_DECISION_STORAGE_KEY","VersionRepositoryImpl","constructor","providers","cache","storage","clock","getRemoteVersionInfo","request","bypassCache","cached","get","length","message","lastError","provider","result","fetchLatestVersionInfo","bundleId","region","timeoutMs","info","latestVersion","storeUrl","releaseNotes","minimumOsVersion","fetchedAt","now","id","set","error","getCachedVersionInfo","persistUserDecision","decision","JSON","stringify","getUserDecision","raw","parse"],"sourceRoot":"../../../../src","sources":["data/repositories/VersionRepositoryImpl.ts"],"mappings":";;AAAA,SACEA,yBAAyB,EACzBC,yBAAyB,QACpB,gDAA6C;AAYpD,MAAMC,qBAAqB,GAAG,qBAAqB;AACnD,MAAMC,yBAAyB,GAAG,kBAAkB;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,CAA+B;EAC/DC,WAAWA,CACQC,SAAoC,EACpCC,KAAqC,EACrCC,OAAyB,EACzB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dhB,SAAS,GAAGgB,KAAK;MACnB;IACF;IAEA,MAAMjC,yBAAyB,CAACiB,SAAS,CAAC;EAC5C;EAEA,MAAMiB,oBAAoBA,CAAA,EAAsC;IAC9D,OAAO,IAAI,CAAC3B,KAAK,CAACO,GAAG,CAACZ,qBAAqB,CAAC;EAC9C;EAEA,MAAMiC,mBAAmBA,CAACC,QAA6B,EAAiB;IACtE,MAAM,IAAI,CAAC5B,OAAO,CAACwB,GAAG,CAAC7B,yBAAyB,EAAEkC,IAAI,CAACC,SAAS,CAACF,QAAQ,CAAC,CAAC;EAC7E;EAEA,MAAMG,eAAeA,CAAA,EAAwC;IAC3D,MAAMC,GAAG,GAAG,MAAM,IAAI,CAAChC,OAAO,CAACM,GAAG,CAACX,yBAAyB,CAAC;IAC7D,IAAI,CAACqC,GAAG,EAAE,OAAO,IAAI;IACrB,IAAI;MACF,OAAOH,IAAI,CAACI,KAAK,CAACD,GAAG,CAAC;IACxB,CAAC,CAAC,MAAM;MACN,OAAO,IAAI;IACb;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { PersistentCacheStore } from "../data/cache/PersistentCacheStore.js";
|
|
4
|
+
import { MemoryCacheStore } from "../data/cache/MemoryCacheStore.js";
|
|
5
|
+
import { ConfigCache } from "../data/config/ConfigCache.js";
|
|
6
|
+
import { ConfigDocumentValidator } from "../data/config/ConfigDocumentValidator.js";
|
|
7
|
+
import { resolveConfigSync } from "../data/config/ConfigLoader.js";
|
|
8
|
+
import { ConfigProvider } from "../data/config/ConfigProvider.js";
|
|
9
|
+
import { SignatureVerifier } from "../data/config/SignatureVerifier.js";
|
|
10
|
+
import { EnvironmentOverrideSource } from "../data/config/sources/EnvironmentOverrideSource.js";
|
|
11
|
+
import { LocalConfigSource } from "../data/config/sources/LocalConfigSource.js";
|
|
12
|
+
import { RemoteConfigSource } from "../data/config/sources/RemoteConfigSource.js";
|
|
13
|
+
import { AppleStoreProvider } from "../data/providers/apple/AppleStoreProvider.js";
|
|
14
|
+
import { CustomApiProvider } from "../data/providers/custom-api/CustomApiProvider.js";
|
|
15
|
+
import { GooglePlayProvider } from "../data/providers/google-play/GooglePlayProvider.js";
|
|
16
|
+
import { VersionRepositoryImpl } from "../data/repositories/VersionRepositoryImpl.js";
|
|
17
|
+
import { DecisionEngine } from "../domain/engines/decision/DecisionEngine.js";
|
|
18
|
+
import { PolicyEngine } from "../domain/engines/policy/PolicyEngine.js";
|
|
19
|
+
import { SemVerEngine } from "../domain/engines/semver/SemVerEngine.js";
|
|
20
|
+
import { VersionManagerCore } from "../domain/VersionManagerCore.js";
|
|
21
|
+
import { createPlatformBridge } from '../platform/createPlatformBridge';
|
|
22
|
+
import { EventBus } from "../shared/eventbus/EventBus.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Composition root (Prompt 1 §1.3) — the only file in the codebase that imports both a
|
|
26
|
+
* port and its concrete adapter simultaneously. Only Apple/Google Play/Custom API
|
|
27
|
+
* providers are wired here; Huawei/Amazon/Firebase Remote Config providers exist as
|
|
28
|
+
* independently importable files (Prompt 1 §8) but are intentionally not referenced
|
|
29
|
+
* from this file yet since their implementations are still stubs (see those files'
|
|
30
|
+
* doc comments) — wiring them here would defeat tree-shaking for no behavioral benefit.
|
|
31
|
+
*/
|
|
32
|
+
export function createVersionManagerCore(options) {
|
|
33
|
+
// Synchronous — throws InvalidConfigException immediately for a bad options bag
|
|
34
|
+
// (Prompt 2 §1.3's fail-fast requirement), before any adapter is constructed.
|
|
35
|
+
const config = resolveConfigSync(options);
|
|
36
|
+
const platformBridge = options.platformBridge ?? createPlatformBridge();
|
|
37
|
+
const clock = platformBridge.clock;
|
|
38
|
+
const comparator = new SemVerEngine();
|
|
39
|
+
const policyEngine = new PolicyEngine(comparator);
|
|
40
|
+
const decisionEngine = new DecisionEngine(clock);
|
|
41
|
+
const eventBus = new EventBus();
|
|
42
|
+
const providers = buildProviders(config, platformBridge);
|
|
43
|
+
const remoteInfoCache = config.cache.storage === 'memory' ? new MemoryCacheStore(clock, config.cache.ttlMs) : new PersistentCacheStore(platformBridge.storage, clock, config.cache.ttlMs);
|
|
44
|
+
const repository = new VersionRepositoryImpl(providers, remoteInfoCache, platformBridge.storage, clock);
|
|
45
|
+
const configProvider = new ConfigProvider({
|
|
46
|
+
local: new LocalConfigSource(options.configSources?.local),
|
|
47
|
+
remote: new RemoteConfigSource(platformBridge.http),
|
|
48
|
+
envOverrides: new EnvironmentOverrideSource(options.configSources?.envOverrides),
|
|
49
|
+
cache: new ConfigCache(platformBridge.storage),
|
|
50
|
+
validator: new ConfigDocumentValidator(),
|
|
51
|
+
signatureVerifier: new SignatureVerifier(platformBridge.crypto),
|
|
52
|
+
clock
|
|
53
|
+
});
|
|
54
|
+
return new VersionManagerCore({
|
|
55
|
+
config,
|
|
56
|
+
rawOptions: options,
|
|
57
|
+
platformBridge,
|
|
58
|
+
repository,
|
|
59
|
+
comparator,
|
|
60
|
+
policyEngine,
|
|
61
|
+
decisionEngine,
|
|
62
|
+
eventBus,
|
|
63
|
+
clock,
|
|
64
|
+
configProvider
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function buildProviders(config, bridge) {
|
|
68
|
+
const providers = [];
|
|
69
|
+
if (bridge.platform === 'ios' && config.stores.ios) {
|
|
70
|
+
providers.push(new AppleStoreProvider(bridge.http, config.stores.ios.appStoreId, config.stores.ios.region));
|
|
71
|
+
}
|
|
72
|
+
if (bridge.platform === 'android' && config.stores.android) {
|
|
73
|
+
providers.push(new GooglePlayProvider(bridge.http, config.stores.android.packageName));
|
|
74
|
+
}
|
|
75
|
+
if (config.stores.custom) {
|
|
76
|
+
providers.push(new CustomApiProvider(bridge.http, config.stores.custom.url, config.stores.custom.headers));
|
|
77
|
+
}
|
|
78
|
+
return providers;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PersistentCacheStore","MemoryCacheStore","ConfigCache","ConfigDocumentValidator","resolveConfigSync","ConfigProvider","SignatureVerifier","EnvironmentOverrideSource","LocalConfigSource","RemoteConfigSource","AppleStoreProvider","CustomApiProvider","GooglePlayProvider","VersionRepositoryImpl","DecisionEngine","PolicyEngine","SemVerEngine","VersionManagerCore","createPlatformBridge","EventBus","createVersionManagerCore","options","config","platformBridge","clock","comparator","policyEngine","decisionEngine","eventBus","providers","buildProviders","remoteInfoCache","cache","storage","ttlMs","repository","configProvider","local","configSources","remote","http","envOverrides","validator","signatureVerifier","crypto","rawOptions","bridge","platform","stores","ios","push","appStoreId","region","android","packageName","custom","url","headers"],"sourceRoot":"../../../src","sources":["di/container.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,uCAAoC;AACzE,SAASC,gBAAgB,QAAQ,mCAAgC;AACjE,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,uBAAuB,QAAQ,2CAAwC;AAChF,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,cAAc,QAAQ,kCAA+B;AAC9D,SAASC,iBAAiB,QAAQ,qCAAkC;AACpE,SAASC,yBAAyB,QAAQ,qDAAkD;AAC5F,SAASC,iBAAiB,QAAQ,6CAA0C;AAC5E,SAASC,kBAAkB,QAAQ,8CAA2C;AAC9E,SAASC,kBAAkB,QAAQ,+CAA4C;AAC/E,SAASC,iBAAiB,QAAQ,mDAAgD;AAClF,SAASC,kBAAkB,QAAQ,qDAAkD;AACrF,SAASC,qBAAqB,QAAQ,+CAA4C;AAClF,SAASC,cAAc,QAAQ,8CAA2C;AAC1E,SAASC,YAAY,QAAQ,0CAAuC;AACpE,SAASC,YAAY,QAAQ,0CAAuC;AASpE,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAASC,oBAAoB,QAAQ,kCAAkC;AACvE,SAASC,QAAQ,QAAQ,gCAA6B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO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 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["domain/IVersionManagerCore.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CheckForUpdatesUseCase } from "./usecases/CheckForUpdatesUseCase.js";
|
|
4
|
+
import { ForceTriggerUpdateUseCase } from "./usecases/ForceTriggerUpdateUseCase.js";
|
|
5
|
+
import { ResetIgnoredVersionsUseCase } from "./usecases/ResetIgnoredVersionsUseCase.js";
|
|
6
|
+
import { ActionType } from "./models/ActionPlan.js";
|
|
7
|
+
import { LifecycleState } from "./models/LifecycleState.js";
|
|
8
|
+
import { NotReadyException, isConfigTierException, toVersionManagerException } from "./errors/VersionManagerException.js";
|
|
9
|
+
import { InvalidTransitionError, LifecycleStateMachine } from "./statemachine/LifecycleStateMachine.js";
|
|
10
|
+
/**
|
|
11
|
+
* The concrete IVersionManagerCore. Composed entirely from ports and other domain
|
|
12
|
+
* constructs (Prompt 1 §1.3) — every concrete adapter (repository impl, platform
|
|
13
|
+
* bridge impl) is injected by src/di/container.ts, never imported here directly.
|
|
14
|
+
*/
|
|
15
|
+
export class VersionManagerCore {
|
|
16
|
+
/**
|
|
17
|
+
* Mutable, doc 03 §4.4 "hot-update" target — starts at the tier-4-only sync
|
|
18
|
+
* resolution and is replaced (not merged in place — a fresh immutable object each
|
|
19
|
+
* time) once configProvider's full pipeline resolves, and again on every subsequent
|
|
20
|
+
* subscribe() notification. In-flight operations keep whatever reference they already
|
|
21
|
+
* captured; only the *next* operation observes an update, matching §4.4's guarantee.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
lastActionPlan = null;
|
|
25
|
+
lastCheckedAt = null;
|
|
26
|
+
inFlightCheck = null;
|
|
27
|
+
/**
|
|
28
|
+
* Non-persisted rollout bucket (0-99), stable for the process lifetime only.
|
|
29
|
+
* A device-stable bucket derived from a persisted installation id is Prompt 18
|
|
30
|
+
* scope — this is a documented simplification, not the final design.
|
|
31
|
+
*/
|
|
32
|
+
rolloutBucket = null;
|
|
33
|
+
constructor(deps) {
|
|
34
|
+
this.deps = deps;
|
|
35
|
+
this.currentConfig = deps.config;
|
|
36
|
+
this.stateMachine = deps.stateMachine ?? new LifecycleStateMachine();
|
|
37
|
+
this.checkUseCase = new CheckForUpdatesUseCase({
|
|
38
|
+
repository: deps.repository,
|
|
39
|
+
comparator: deps.comparator,
|
|
40
|
+
policyEngine: deps.policyEngine,
|
|
41
|
+
decisionEngine: deps.decisionEngine,
|
|
42
|
+
clock: deps.clock
|
|
43
|
+
});
|
|
44
|
+
this.resetUseCase = new ResetIgnoredVersionsUseCase(deps.repository);
|
|
45
|
+
this.forceUseCase = new ForceTriggerUpdateUseCase(deps.repository, deps.decisionEngine);
|
|
46
|
+
this.readyPromise = this.initialize();
|
|
47
|
+
}
|
|
48
|
+
async initialize() {
|
|
49
|
+
this.tryTransition(LifecycleState.CONFIG_LOADING);
|
|
50
|
+
|
|
51
|
+
// Doc 03 §4 full precedence resolution (env > remote > local > default) — runs
|
|
52
|
+
// during CONFIG_LOADING per doc 02 §7's sequence diagram. A failure here never
|
|
53
|
+
// fails initialization (doc 02 §7's "Initialization only ever hard-fails on VM-1xxx
|
|
54
|
+
// config codes, which reject before an instance is ever returned" — this is
|
|
55
|
+
// *post*-construction, so it degrades to the already-valid tier-4 config instead).
|
|
56
|
+
if (this.deps.configProvider) {
|
|
57
|
+
try {
|
|
58
|
+
this.currentConfig = await this.deps.configProvider.resolve(this.deps.rawOptions);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
this.publishError(toVersionManagerException(error), 'config');
|
|
61
|
+
}
|
|
62
|
+
this.deps.configProvider.subscribe(config => {
|
|
63
|
+
// §4.4 hot-update: only the *next* operation observes this — in-flight work
|
|
64
|
+
// already captured the previous currentConfig reference by value.
|
|
65
|
+
this.currentConfig = config;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
// Warm start: prime/validate the cache read path. The first checkForUpdates()
|
|
70
|
+
// call is what actually turns cached data into a decision (it needs the
|
|
71
|
+
// current app version, resolved asynchronously from the platform bridge).
|
|
72
|
+
await this.deps.repository.getCachedVersionInfo();
|
|
73
|
+
} catch (error) {
|
|
74
|
+
this.publishError(toVersionManagerException(error), 'config');
|
|
75
|
+
}
|
|
76
|
+
this.tryTransition(LifecycleState.IDLE);
|
|
77
|
+
}
|
|
78
|
+
ready() {
|
|
79
|
+
return this.readyPromise;
|
|
80
|
+
}
|
|
81
|
+
async checkForUpdates(options = {}) {
|
|
82
|
+
if (this.currentConfig.strictReadiness && this.stateMachine.current === LifecycleState.CONFIG_LOADING) {
|
|
83
|
+
throw new NotReadyException({
|
|
84
|
+
message: 'checkForUpdates() called before ready() resolved'
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
await this.readyPromise;
|
|
88
|
+
if (this.inFlightCheck) {
|
|
89
|
+
return this.inFlightCheck;
|
|
90
|
+
}
|
|
91
|
+
const promise = this.runCheck(options).finally(() => {
|
|
92
|
+
this.inFlightCheck = null;
|
|
93
|
+
});
|
|
94
|
+
this.inFlightCheck = promise;
|
|
95
|
+
return promise;
|
|
96
|
+
}
|
|
97
|
+
async runCheck(options) {
|
|
98
|
+
this.tryTransition(LifecycleState.VERSION_CHECKING);
|
|
99
|
+
const [currentVersion, bundleId] = await Promise.all([this.resolveCurrentVersion(), this.deps.platformBridge.appInfo.getBundleId()]);
|
|
100
|
+
try {
|
|
101
|
+
const plan = await this.checkUseCase.execute({
|
|
102
|
+
currentVersion,
|
|
103
|
+
bundleId,
|
|
104
|
+
platform: this.deps.platformBridge.platform,
|
|
105
|
+
bypassCache: options.bypassCache ?? this.currentConfig.cache.bustOnManualCheck,
|
|
106
|
+
timeoutMs: options.timeoutMs ?? this.currentConfig.fallback.requestTimeoutMs,
|
|
107
|
+
forceUpdateBelow: this.currentConfig.policy.forceUpdateBelow,
|
|
108
|
+
rolloutPercentage: this.currentConfig.policy.rolloutPercentage,
|
|
109
|
+
rolloutBucket: this.getRolloutBucket()
|
|
110
|
+
});
|
|
111
|
+
this.applyPlan(plan, currentVersion);
|
|
112
|
+
return plan;
|
|
113
|
+
} catch (error) {
|
|
114
|
+
const vmError = toVersionManagerException(error);
|
|
115
|
+
if (isConfigTierException(vmError)) {
|
|
116
|
+
this.tryTransition(LifecycleState.IDLE);
|
|
117
|
+
throw vmError;
|
|
118
|
+
}
|
|
119
|
+
return this.runFallback(vmError, currentVersion);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async runFallback(error, currentVersion) {
|
|
123
|
+
this.publishError(error, 'check');
|
|
124
|
+
let remote = null;
|
|
125
|
+
const strategy = this.currentConfig.fallback.onNetworkError;
|
|
126
|
+
if (strategy === 'useCache') {
|
|
127
|
+
remote = await this.deps.repository.getCachedVersionInfo().catch(() => null);
|
|
128
|
+
} else if (strategy === 'useDefaultConfig') {
|
|
129
|
+
remote = this.currentConfig.fallback.defaultConfig;
|
|
130
|
+
}
|
|
131
|
+
const plan = remote ? this.deps.decisionEngine.buildActionPlan(ActionType.NO_ACTION, currentVersion, remote) : {
|
|
132
|
+
type: ActionType.NO_ACTION,
|
|
133
|
+
updateInfo: null,
|
|
134
|
+
reason: 'fallback',
|
|
135
|
+
decidedAt: this.deps.clock.now()
|
|
136
|
+
};
|
|
137
|
+
this.applyPlan(plan, currentVersion);
|
|
138
|
+
return plan;
|
|
139
|
+
}
|
|
140
|
+
applyPlan(plan, currentVersion) {
|
|
141
|
+
this.lastActionPlan = plan;
|
|
142
|
+
this.lastCheckedAt = this.deps.clock.now();
|
|
143
|
+
this.tryTransition(LifecycleState.DECIDING);
|
|
144
|
+
const targetState = this.stateForActionType(plan.type);
|
|
145
|
+
this.tryTransition(targetState);
|
|
146
|
+
if (plan.updateInfo) {
|
|
147
|
+
const event = {
|
|
148
|
+
updateInfo: plan.updateInfo,
|
|
149
|
+
actionPlan: plan,
|
|
150
|
+
timestamp: this.deps.clock.now()
|
|
151
|
+
};
|
|
152
|
+
this.deps.eventBus.publish('updateDetected', event);
|
|
153
|
+
} else {
|
|
154
|
+
this.deps.eventBus.publish('updateNotAvailable', {
|
|
155
|
+
currentVersion,
|
|
156
|
+
checkedAt: this.deps.clock.now()
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
stateForActionType(type) {
|
|
161
|
+
switch (type) {
|
|
162
|
+
case ActionType.FORCE_UPDATE:
|
|
163
|
+
return LifecycleState.FORCE_UPDATE_DISPLAYED;
|
|
164
|
+
case ActionType.SOFT_UPDATE:
|
|
165
|
+
case ActionType.OPTIONAL_REMINDER:
|
|
166
|
+
return LifecycleState.SOFT_UPDATE_DISPLAYED;
|
|
167
|
+
default:
|
|
168
|
+
return LifecycleState.IDLE;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async forceTriggerUpdate(_options = {}) {
|
|
172
|
+
await this.readyPromise;
|
|
173
|
+
const [currentVersion, bundleId] = await Promise.all([this.resolveCurrentVersion(), this.deps.platformBridge.appInfo.getBundleId()]);
|
|
174
|
+
try {
|
|
175
|
+
const plan = await this.forceUseCase.execute({
|
|
176
|
+
currentVersion,
|
|
177
|
+
bundleId,
|
|
178
|
+
platform: this.deps.platformBridge.platform,
|
|
179
|
+
timeoutMs: this.currentConfig.fallback.requestTimeoutMs
|
|
180
|
+
});
|
|
181
|
+
this.applyPlan(plan, currentVersion);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
this.publishError(toVersionManagerException(error), 'check');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async resetIgnoredVersions(options = {}) {
|
|
187
|
+
await this.resetUseCase.execute(options.versions);
|
|
188
|
+
}
|
|
189
|
+
getCurrentState() {
|
|
190
|
+
return this.stateMachine.current;
|
|
191
|
+
}
|
|
192
|
+
getUpdateInfo() {
|
|
193
|
+
return this.lastActionPlan?.updateInfo ?? null;
|
|
194
|
+
}
|
|
195
|
+
isUpdateAvailable() {
|
|
196
|
+
return this.lastActionPlan !== null && this.lastActionPlan.type !== ActionType.NO_ACTION;
|
|
197
|
+
}
|
|
198
|
+
getActionPlan() {
|
|
199
|
+
return this.lastActionPlan;
|
|
200
|
+
}
|
|
201
|
+
getLastCheckedAt() {
|
|
202
|
+
return this.lastCheckedAt;
|
|
203
|
+
}
|
|
204
|
+
on(event, handler) {
|
|
205
|
+
return this.deps.eventBus.subscribe(event, handler);
|
|
206
|
+
}
|
|
207
|
+
once(event, handler) {
|
|
208
|
+
const unsubscribe = this.deps.eventBus.subscribe(event, payload => {
|
|
209
|
+
unsubscribe();
|
|
210
|
+
handler(payload);
|
|
211
|
+
});
|
|
212
|
+
return unsubscribe;
|
|
213
|
+
}
|
|
214
|
+
off(event, handler) {
|
|
215
|
+
// Removes a handler registered via on(event, handler) by reference, in addition to
|
|
216
|
+
// (not instead of) the Unsubscribe closure returned from on()/once() — both styles
|
|
217
|
+
// are safe to mix (Prompt 2 §4.2). Handlers wrapped internally by once() are not
|
|
218
|
+
// reachable here since once() never hands the wrapped function back to the caller;
|
|
219
|
+
// its own Unsubscribe closure is the only way to remove a once() handler early.
|
|
220
|
+
this.deps.eventBus.off(event, handler);
|
|
221
|
+
}
|
|
222
|
+
onUpdateDetected(handler) {
|
|
223
|
+
return this.on('updateDetected', handler);
|
|
224
|
+
}
|
|
225
|
+
onUserAction(handler) {
|
|
226
|
+
return this.on('userAction', handler);
|
|
227
|
+
}
|
|
228
|
+
onError(handler) {
|
|
229
|
+
return this.on('error', handler);
|
|
230
|
+
}
|
|
231
|
+
onStateChanged(handler) {
|
|
232
|
+
return this.on('stateChanged', handler);
|
|
233
|
+
}
|
|
234
|
+
dispose() {
|
|
235
|
+
this.tryTransition(LifecycleState.TERMINATED);
|
|
236
|
+
}
|
|
237
|
+
async resolveCurrentVersion() {
|
|
238
|
+
return this.currentConfig.appVersion ?? this.deps.platformBridge.appInfo.getCurrentVersion();
|
|
239
|
+
}
|
|
240
|
+
getRolloutBucket() {
|
|
241
|
+
if (this.rolloutBucket === null) {
|
|
242
|
+
this.rolloutBucket = Math.floor(Math.random() * 100);
|
|
243
|
+
}
|
|
244
|
+
return this.rolloutBucket;
|
|
245
|
+
}
|
|
246
|
+
publishError(error, phase) {
|
|
247
|
+
this.deps.eventBus.publish('error', {
|
|
248
|
+
error,
|
|
249
|
+
phase,
|
|
250
|
+
timestamp: this.deps.clock.now()
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
tryTransition(to) {
|
|
254
|
+
const from = this.stateMachine.current;
|
|
255
|
+
if (from === to) return;
|
|
256
|
+
try {
|
|
257
|
+
this.stateMachine.transition(to);
|
|
258
|
+
} catch (error) {
|
|
259
|
+
if (error instanceof InvalidTransitionError) {
|
|
260
|
+
// Some manual-trigger call paths (e.g. checkForUpdates() while a dialog from a
|
|
261
|
+
// previous check is still displayed) do not have a modeled edge in the Prompt 9
|
|
262
|
+
// transition table yet. Rather than throw out of a public API method for an
|
|
263
|
+
// internal invariant, this is logged and the state machine is left untouched.
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
throw error;
|
|
267
|
+
}
|
|
268
|
+
const event = {
|
|
269
|
+
from,
|
|
270
|
+
to,
|
|
271
|
+
timestamp: this.deps.clock.now()
|
|
272
|
+
};
|
|
273
|
+
this.deps.eventBus.publish('stateChanged', event);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=VersionManagerCore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CheckForUpdatesUseCase","ForceTriggerUpdateUseCase","ResetIgnoredVersionsUseCase","ActionType","LifecycleState","NotReadyException","isConfigTierException","toVersionManagerException","InvalidTransitionError","LifecycleStateMachine","VersionManagerCore","lastActionPlan","lastCheckedAt","inFlightCheck","rolloutBucket","constructor","deps","currentConfig","config","stateMachine","checkUseCase","repository","comparator","policyEngine","decisionEngine","clock","resetUseCase","forceUseCase","readyPromise","initialize","tryTransition","CONFIG_LOADING","configProvider","resolve","rawOptions","error","publishError","subscribe","getCachedVersionInfo","IDLE","ready","checkForUpdates","options","strictReadiness","current","message","promise","runCheck","finally","VERSION_CHECKING","currentVersion","bundleId","Promise","all","resolveCurrentVersion","platformBridge","appInfo","getBundleId","plan","execute","platform","bypassCache","cache","bustOnManualCheck","timeoutMs","fallback","requestTimeoutMs","forceUpdateBelow","policy","rolloutPercentage","getRolloutBucket","applyPlan","vmError","runFallback","remote","strategy","onNetworkError","catch","defaultConfig","buildActionPlan","NO_ACTION","type","updateInfo","reason","decidedAt","now","DECIDING","targetState","stateForActionType","event","actionPlan","timestamp","eventBus","publish","checkedAt","FORCE_UPDATE","FORCE_UPDATE_DISPLAYED","SOFT_UPDATE","OPTIONAL_REMINDER","SOFT_UPDATE_DISPLAYED","forceTriggerUpdate","_options","resetIgnoredVersions","versions","getCurrentState","getUpdateInfo","isUpdateAvailable","getActionPlan","getLastCheckedAt","on","handler","once","unsubscribe","payload","off","onUpdateDetected","onUserAction","onError","onStateChanged","dispose","TERMINATED","appVersion","getCurrentVersion","Math","floor","random","phase","to","from","transition"],"sourceRoot":"../../../src","sources":["domain/VersionManagerCore.ts"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,sCAAmC;AAC1E,SAASC,yBAAyB,QAAQ,yCAAsC;AAChF,SAASC,2BAA2B,QAAQ,2CAAwC;AAIpF,SAASC,UAAU,QAAQ,wBAAqB;AAShD,SAASC,cAAc,QAAQ,4BAAyB;AAUxD,SACEC,iBAAiB,EACjBC,qBAAqB,EACrBC,yBAAyB,QACpB,qCAAkC;AAQzC,SACEC,sBAAsB,EACtBC,qBAAqB,QAChB,yCAAsC;AAuB7C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,CAAgC;EAQ7D;AACF;AACA;AACA;AACA;AACA;AACA;;EAEUC,cAAc,GAAsB,IAAI;EACxCC,aAAa,GAAkB,IAAI;EACnCC,aAAa,GAA+B,IAAI;EACxD;AACF;AACA;AACA;AACA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,CAAC,CAAC;EACJ;EAEQvD,aAAaA,CAACiG,EAAkB,EAAQ;IAC9C,MAAMC,IAAI,GAAG,IAAI,CAAC7G,YAAY,CAACyB,OAAO;IACtC,IAAIoF,IAAI,KAAKD,EAAE,EAAE;IACjB,IAAI;MACF,IAAI,CAAC5G,YAAY,CAAC8G,UAAU,CAACF,EAAE,CAAC;IAClC,CAAC,CAAC,OAAO5F,KAAK,EAAE;MACd,IAAIA,KAAK,YAAY3B,sBAAsB,EAAE;QAC3C;QACA;QACA;QACA;QACA;MACF;MACA,MAAM2B,KAAK;IACb;IACA,MAAMsD,KAAwB,GAAG;MAC/BuC,IAAI;MACJD,EAAE;MACFpC,SAAS,EAAE,IAAI,CAAC3E,IAAI,CAACS,KAAK,CAAC4D,GAAG,CAAC;IACjC,CAAC;IACD,IAAI,CAACrE,IAAI,CAAC4E,QAAQ,CAACC,OAAO,CAAC,cAAc,EAAEJ,KAAK,CAAC;EACnD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ActionType } from "../../models/ActionPlan.js";
|
|
4
|
+
/**
|
|
5
|
+
* Assembles the final ActionPlan (with a fully-populated UpdateInfo, when relevant)
|
|
6
|
+
* from a PolicyEngine classification. Kept separate from PolicyEngine per the Prompt 7
|
|
7
|
+
* Decision Engine split in docs/architecture/01 §5.3 — this is the orchestration step,
|
|
8
|
+
* not the rule evaluation step.
|
|
9
|
+
*/
|
|
10
|
+
export class DecisionEngine {
|
|
11
|
+
constructor(clock) {
|
|
12
|
+
this.clock = clock;
|
|
13
|
+
}
|
|
14
|
+
buildActionPlan(actionType, currentVersion, remote) {
|
|
15
|
+
if (actionType === ActionType.NO_ACTION || remote === null) {
|
|
16
|
+
return {
|
|
17
|
+
type: ActionType.NO_ACTION,
|
|
18
|
+
updateInfo: null,
|
|
19
|
+
reason: 'up_to_date_or_suppressed',
|
|
20
|
+
decidedAt: this.clock.now()
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const updateInfo = {
|
|
24
|
+
currentVersion,
|
|
25
|
+
latestVersion: remote.latestVersion,
|
|
26
|
+
storeUrl: remote.storeUrl,
|
|
27
|
+
releaseNotes: remote.releaseNotes,
|
|
28
|
+
isForceUpdate: actionType === ActionType.FORCE_UPDATE,
|
|
29
|
+
provider: remote.provider,
|
|
30
|
+
fetchedAt: remote.fetchedAt
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
type: actionType,
|
|
34
|
+
updateInfo,
|
|
35
|
+
reason: actionType.toLowerCase(),
|
|
36
|
+
decidedAt: this.clock.now()
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=DecisionEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActionType","DecisionEngine","constructor","clock","buildActionPlan","actionType","currentVersion","remote","NO_ACTION","type","updateInfo","reason","decidedAt","now","latestVersion","storeUrl","releaseNotes","isForceUpdate","FORCE_UPDATE","provider","fetchedAt","toLowerCase"],"sourceRoot":"../../../../../src","sources":["domain/engines/decision/DecisionEngine.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,4BAAyB;AAKpD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,CAAC;EAC1BC,WAAWA,CAAkBC,KAAa,EAAE;IAAA,KAAfA,KAAa,GAAbA,KAAa;EAAG;EAE7CC,eAAeA,CACbC,UAAsB,EACtBC,cAAsB,EACtBC,MAAgC,EACpB;IACZ,IAAIF,UAAU,KAAKL,UAAU,CAACQ,SAAS,IAAID,MAAM,KAAK,IAAI,EAAE;MAC1D,OAAO;QACLE,IAAI,EAAET,UAAU,CAACQ,SAAS;QAC1BE,UAAU,EAAE,IAAI;QAChBC,MAAM,EAAE,0BAA0B;QAClCC,SAAS,EAAE,IAAI,CAACT,KAAK,CAACU,GAAG,CAAC;MAC5B,CAAC;IACH;IAEA,MAAMH,UAAsB,GAAG;MAC7BJ,cAAc;MACdQ,aAAa,EAAEP,MAAM,CAACO,aAAa;MACnCC,QAAQ,EAAER,MAAM,CAACQ,QAAQ;MACzBC,YAAY,EAAET,MAAM,CAACS,YAAY;MACjCC,aAAa,EAAEZ,UAAU,KAAKL,UAAU,CAACkB,YAAY;MACrDC,QAAQ,EAAEZ,MAAM,CAACY,QAAQ;MACzBC,SAAS,EAAEb,MAAM,CAACa;IACpB,CAAC;IAED,OAAO;MACLX,IAAI,EAAEJ,UAAU;MAChBK,UAAU;MACVC,MAAM,EAAEN,UAAU,CAACgB,WAAW,CAAC,CAAC;MAChCT,SAAS,EAAE,IAAI,CAACT,KAAK,CAACU,GAAG,CAAC;IAC5B,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["domain/engines/policy/IUpdatePolicyEngine.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ActionType } from "../../models/ActionPlan.js";
|
|
4
|
+
/**
|
|
5
|
+
* Minimal rule evaluator: threshold-based force-update classification, ignore-list and
|
|
6
|
+
* remind-later suppression, and rollout-percentage gating. This intentionally covers a
|
|
7
|
+
* subset of the full Rule DSL described for Prompt 6 (conflict resolution across
|
|
8
|
+
* security/force/grace-period/optional tiers) — that richer precedence table is future
|
|
9
|
+
* scope; this engine implements the linear precedence documented inline below.
|
|
10
|
+
*/
|
|
11
|
+
export class PolicyEngine {
|
|
12
|
+
constructor(comparator) {
|
|
13
|
+
this.comparator = comparator;
|
|
14
|
+
}
|
|
15
|
+
evaluate(context) {
|
|
16
|
+
const cmp = this.comparator.compare(context.currentVersion, context.remoteVersion);
|
|
17
|
+
if (cmp >= 0) {
|
|
18
|
+
return ActionType.NO_ACTION;
|
|
19
|
+
}
|
|
20
|
+
if (context.userDecision?.ignoredVersions.includes(context.remoteVersion.raw)) {
|
|
21
|
+
return ActionType.NO_ACTION;
|
|
22
|
+
}
|
|
23
|
+
const remindMeLaterUntil = context.userDecision?.remindMeLaterUntil ?? null;
|
|
24
|
+
if (remindMeLaterUntil !== null && context.now < remindMeLaterUntil) {
|
|
25
|
+
return ActionType.NO_ACTION;
|
|
26
|
+
}
|
|
27
|
+
if (context.forceUpdateBelow && this.comparator.compare(context.currentVersion, context.forceUpdateBelow) < 0) {
|
|
28
|
+
return ActionType.FORCE_UPDATE;
|
|
29
|
+
}
|
|
30
|
+
if (context.rolloutBucket >= context.rolloutPercentage) {
|
|
31
|
+
return ActionType.NO_ACTION;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// A previously-expired "remind me later" snooze downgrades to a less intrusive
|
|
35
|
+
// banner on the next detection rather than repeating the modal dialog.
|
|
36
|
+
if (remindMeLaterUntil !== null) {
|
|
37
|
+
return ActionType.OPTIONAL_REMINDER;
|
|
38
|
+
}
|
|
39
|
+
return ActionType.SOFT_UPDATE;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=PolicyEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActionType","PolicyEngine","constructor","comparator","evaluate","context","cmp","compare","currentVersion","remoteVersion","NO_ACTION","userDecision","ignoredVersions","includes","raw","remindMeLaterUntil","now","forceUpdateBelow","FORCE_UPDATE","rolloutBucket","rolloutPercentage","OPTIONAL_REMINDER","SOFT_UPDATE"],"sourceRoot":"../../../../../src","sources":["domain/engines/policy/PolicyEngine.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAAyB;AAOpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,CAAgC;EACvDC,WAAWA,CAAkBC,UAA8B,EAAE;IAAA,KAAhCA,UAA8B,GAA9BA,UAA8B;EAAG;EAE9DC,QAAQA,CAACC,OAAgC,EAAc;IACrD,MAAMC,GAAG,GAAG,IAAI,CAACH,UAAU,CAACI,OAAO,CACjCF,OAAO,CAACG,cAAc,EACtBH,OAAO,CAACI,aACV,CAAC;IACD,IAAIH,GAAG,IAAI,CAAC,EAAE;MACZ,OAAON,UAAU,CAACU,SAAS;IAC7B;IAEA,IACEL,OAAO,CAACM,YAAY,EAAEC,eAAe,CAACC,QAAQ,CAACR,OAAO,CAACI,aAAa,CAACK,GAAG,CAAC,EACzE;MACA,OAAOd,UAAU,CAACU,SAAS;IAC7B;IAEA,MAAMK,kBAAkB,GAAGV,OAAO,CAACM,YAAY,EAAEI,kBAAkB,IAAI,IAAI;IAC3E,IAAIA,kBAAkB,KAAK,IAAI,IAAIV,OAAO,CAACW,GAAG,GAAGD,kBAAkB,EAAE;MACnE,OAAOf,UAAU,CAACU,SAAS;IAC7B;IAEA,IACEL,OAAO,CAACY,gBAAgB,IACxB,IAAI,CAACd,UAAU,CAACI,OAAO,CACrBF,OAAO,CAACG,cAAc,EACtBH,OAAO,CAACY,gBACV,CAAC,GAAG,CAAC,EACL;MACA,OAAOjB,UAAU,CAACkB,YAAY;IAChC;IAEA,IAAIb,OAAO,CAACc,aAAa,IAAId,OAAO,CAACe,iBAAiB,EAAE;MACtD,OAAOpB,UAAU,CAACU,SAAS;IAC7B;;IAEA;IACA;IACA,IAAIK,kBAAkB,KAAK,IAAI,EAAE;MAC/B,OAAOf,UAAU,CAACqB,iBAAiB;IACrC;IAEA,OAAOrB,UAAU,CAACsB,WAAW;EAC/B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["domain/engines/semver/IVersionComparator.ts"],"mappings":"","ignoreList":[]}
|