1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 07:01:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

feat: enhance Pushy logging with version info and update EventData interface

This commit is contained in:
sunnylqm
2025-04-10 12:25:16 +08:00
parent b336926838
commit e4ef93595b
2 changed files with 6 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import {
setLocalHashInfo,
isFirstTime,
isRolledBack,
getCurrentVersionInfo,
} from './core';
const SERVER_PRESETS = {
@@ -128,6 +129,7 @@ export class Pushy {
log(type + ' ' + message);
await this.loggerPromise.promise;
const { logger = noop, appKey } = this.options;
const info = await getCurrentVersionInfo();
logger({
type,
data: {
@@ -137,6 +139,7 @@ export class Pushy {
packageVersion,
buildTime,
message,
...info,
...data,
},
});

View File

@@ -54,6 +54,9 @@ export interface EventData {
message?: string;
rolledBackVersion?: string;
newVersion?: string;
name?: string;
description?: string;
metaInfo?: string;
[key: string]: any;
}