diff --git a/lib/index.web.js b/lib/index.web.js index a2bffde..c01ef13 100644 --- a/lib/index.web.js +++ b/lib/index.web.js @@ -15,4 +15,4 @@ export const downloadAndInstallApk = noop; export const setCustomEndpoints = noop; export const getCurrentVersionInfo = noop; export const simpleUpdate = (app) => app; -export const onEvents = noop; +export const onPushyEvents = noop; diff --git a/lib/main.ts b/lib/main.ts index 8c55176..553ab23 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -78,7 +78,7 @@ if (!uuid) { const noop = () => {}; let reporter: UpdateEventsListener = noop; -export function onEvents(customReporter: UpdateEventsListener) { +export function onPushyEvents(customReporter: UpdateEventsListener) { reporter = customReporter; if (isRolledBack) { report({ diff --git a/lib/simpleUpdate.tsx b/lib/simpleUpdate.tsx index d40940b..37cc104 100644 --- a/lib/simpleUpdate.tsx +++ b/lib/simpleUpdate.tsx @@ -16,20 +16,20 @@ import { switchVersionLater, markSuccess, downloadAndInstallApk, - onEvents, + onPushyEvents, } from './main'; import { UpdateEventsListener } from './type'; export function simpleUpdate( WrappedComponent: ComponentType, - options: { appKey?: string; onEvents?: UpdateEventsListener } = {}, + options: { appKey?: string; onPushyEvents?: UpdateEventsListener } = {}, ) { - const { appKey, onEvents: eventListeners } = options; + const { appKey, onPushyEvents: eventListeners } = options; if (!appKey) { throw new Error('appKey is required for simpleUpdate()'); } if (typeof eventListeners === 'function') { - onEvents(eventListeners); + onPushyEvents(eventListeners); } return __DEV__ ? WrappedComponent