@unvired/react-native-unvired-sdk 0.0.31 → 0.0.32
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/BuildNo.txt +1 -1
- package/dist/database/services/DatabaseNative.js +5 -0
- package/dist/database/types.d.ts +4 -0
- package/dist/logger/BaseLogger.d.ts +1 -1
- package/dist/logger/Logger.types.d.ts +2 -2
- package/dist/logger/services/LoggerNative.js +3 -3
- package/dist/logger/services/LoggerWeb.d.ts +1 -1
- package/dist/logger/services/LoggerWeb.js +1 -1
- package/dist/logger/services/LoggerWindows.js +3 -3
- package/package.json +1 -1
package/BuildNo.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
R-0.000.
|
|
1
|
+
R-0.000.0032
|
|
@@ -178,6 +178,11 @@ export class DatabaseNative {
|
|
|
178
178
|
errorCallback(error instanceof Error ? error.message : String(error));
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
|
+
getEncryptionKey: (options, successCallback, errorCallback) => {
|
|
182
|
+
// Native encryption key logic can be implemented here if needed.
|
|
183
|
+
// For now, return empty or trigger errorCallback depending on support.
|
|
184
|
+
errorCallback();
|
|
185
|
+
},
|
|
181
186
|
};
|
|
182
187
|
}
|
|
183
188
|
}
|
package/dist/database/types.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export interface IDatabaseAdapter {
|
|
|
71
71
|
* Delete user data from database
|
|
72
72
|
*/
|
|
73
73
|
deleteUserData(options: DeleteUserDataOptions, callback: ResultCallback<void>, errorCallback: ErrorCallback): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get encryption key
|
|
76
|
+
*/
|
|
77
|
+
getEncryptionKey(options: any, successCallback: (key: string) => void, errorCallback: () => void): void;
|
|
74
78
|
}
|
|
75
79
|
/**
|
|
76
80
|
* SQL result set interface
|
|
@@ -14,6 +14,6 @@ export declare class BaseLogger {
|
|
|
14
14
|
logError(c: string, m: string, msg: string): void;
|
|
15
15
|
getLogFileURL(): Promise<string>;
|
|
16
16
|
getLogFileContent(): Promise<string>;
|
|
17
|
-
getBackupLogFileContent(): Promise<string
|
|
17
|
+
getBackupLogFileContent(): Promise<string>;
|
|
18
18
|
clearLogFile(): Promise<void>;
|
|
19
19
|
}
|
|
@@ -15,7 +15,7 @@ export interface ILoggerImplementation {
|
|
|
15
15
|
writeLine(line: string, maxSize: number): Promise<void>;
|
|
16
16
|
getLogFileURL(): Promise<string>;
|
|
17
17
|
getLogFileContent(): Promise<string>;
|
|
18
|
-
getBackupLogFileContent(): Promise<string
|
|
18
|
+
getBackupLogFileContent(): Promise<string>;
|
|
19
19
|
clear(): Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -29,6 +29,6 @@ export interface ILogger {
|
|
|
29
29
|
logError(className: string, methodName: string, message: string): void;
|
|
30
30
|
getLogFileURL(): Promise<string>;
|
|
31
31
|
getLogFileContent(): Promise<string>;
|
|
32
|
-
getBackupLogFileContent(): Promise<string
|
|
32
|
+
getBackupLogFileContent(): Promise<string>;
|
|
33
33
|
clearLogFile(): Promise<void>;
|
|
34
34
|
}
|
|
@@ -186,7 +186,7 @@ export class LoggerNative {
|
|
|
186
186
|
}
|
|
187
187
|
async getBackupLogFileContent() {
|
|
188
188
|
if (!this.isAvailable || !RNFS)
|
|
189
|
-
return
|
|
189
|
+
return "";
|
|
190
190
|
try {
|
|
191
191
|
// Do NOT force rotation. Only return existing backup if present.
|
|
192
192
|
// await this.rotateLog();
|
|
@@ -194,11 +194,11 @@ export class LoggerNative {
|
|
|
194
194
|
// Return base64 content for download/upload
|
|
195
195
|
return await RNFS.readFile(this.backupZip, 'base64');
|
|
196
196
|
}
|
|
197
|
-
return
|
|
197
|
+
return "";
|
|
198
198
|
}
|
|
199
199
|
catch (e) {
|
|
200
200
|
console.error('❌ LoggerNative getBackupLogFileContent error:', e);
|
|
201
|
-
return
|
|
201
|
+
return "";
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
async clear() {
|
|
@@ -5,6 +5,6 @@ export declare class LoggerWeb implements ILoggerImplementation {
|
|
|
5
5
|
writeLine(line: string, maxSize: number): Promise<void>;
|
|
6
6
|
getLogFileURL(): Promise<string>;
|
|
7
7
|
getLogFileContent(): Promise<string>;
|
|
8
|
-
getBackupLogFileContent(): Promise<
|
|
8
|
+
getBackupLogFileContent(): Promise<string>;
|
|
9
9
|
clear(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -191,7 +191,7 @@ export class LoggerWindows {
|
|
|
191
191
|
}
|
|
192
192
|
async getBackupLogFileContent() {
|
|
193
193
|
if (!this.isAvailable || !RNFS)
|
|
194
|
-
return
|
|
194
|
+
return "";
|
|
195
195
|
try {
|
|
196
196
|
// Do NOT force rotation. Only return existing backup if present.
|
|
197
197
|
// await this.rotateLog();
|
|
@@ -203,11 +203,11 @@ export class LoggerWindows {
|
|
|
203
203
|
// Yes, so we can just read it back.
|
|
204
204
|
return await RNFS.readFile(this.backupZip, 'base64');
|
|
205
205
|
}
|
|
206
|
-
return
|
|
206
|
+
return "";
|
|
207
207
|
}
|
|
208
208
|
catch (e) {
|
|
209
209
|
console.error('❌ LoggerWindows getBackupLogFileContent error:', e);
|
|
210
|
-
return
|
|
210
|
+
return "";
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
async clear() {
|
package/package.json
CHANGED