minip-bridge 1.0.13 → 1.0.16
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/dist/index.d.mts +25 -1
- package/dist/index.mjs +15751 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
- package/src/api/index.ts +2 -0
- package/src/api/memory-cache.ts +43 -0
- package/src/api/sqlite/core/sqlite-connection.ts +44 -0
- package/src/api/sqlite/core/sqlite-database.ts +52 -0
- package/src/api/sqlite/core/sqlite-dialect-config.ts +7 -0
- package/src/api/sqlite/core/sqlite-dialect.ts +34 -0
- package/src/api/sqlite/core/sqlite-driver.ts +47 -0
- package/src/api/sqlite/core/sqlite-native-api.ts +70 -0
- package/src/api/sqlite/core/sqlite-statement.ts +11 -0
- package/src/api/sqlite/index.ts +33 -0
- package/src/index.ts +2 -0
- package/tsup.config.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { MigratorProps, Kysely, Migrator } from 'kysely';
|
|
2
|
+
export * from 'kysely';
|
|
3
|
+
|
|
1
4
|
type HUDType = "success" | "error" | "progress" | "banner";
|
|
2
5
|
/**
|
|
3
6
|
* @param title works only in banner type,
|
|
@@ -191,6 +194,27 @@ declare function scanQRCode(): Promise<MResponseWithData<string | undefined | nu
|
|
|
191
194
|
declare function getDeviceInfo(): Promise<MResponseWithData<DeviceInfo>>;
|
|
192
195
|
declare function getDeviceInfoSync(): MResponseWithData<DeviceInfo>;
|
|
193
196
|
|
|
197
|
+
interface MinipSqliteMigratorProps extends Omit<MigratorProps, "db"> {
|
|
198
|
+
}
|
|
199
|
+
interface OpenSqliteDBProps {
|
|
200
|
+
path: string;
|
|
201
|
+
debug?: boolean;
|
|
202
|
+
migratorProps?: MinipSqliteMigratorProps;
|
|
203
|
+
}
|
|
204
|
+
declare function openSqliteDB<T>(props: OpenSqliteDBProps): {
|
|
205
|
+
db: Kysely<T>;
|
|
206
|
+
migrator: Migrator;
|
|
207
|
+
} | {
|
|
208
|
+
db: Kysely<T>;
|
|
209
|
+
migrator?: undefined;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
declare function getMemoryStorage(key: string): Promise<MResponseWithData<string>>;
|
|
213
|
+
declare function setMemoryStorage(key: string, value: string): Promise<MResponse>;
|
|
214
|
+
declare function setMemoryStorageIfNotExist(key: string, value: string): Promise<MResponseWithData<boolean>>;
|
|
215
|
+
declare function removeMemoryStorage(key: string): Promise<MResponse>;
|
|
216
|
+
declare function clearMemoryStorage(): Promise<MResponse>;
|
|
217
|
+
|
|
194
218
|
interface WebKitCallable {
|
|
195
219
|
postMessage: (data: string) => Promise<string>;
|
|
196
220
|
}
|
|
@@ -204,4 +228,4 @@ declare global {
|
|
|
204
228
|
}
|
|
205
229
|
}
|
|
206
230
|
|
|
207
|
-
export { type AlertAction, type AlertConfig, type AppInfo, type DateAndTimePickerConfig, type HUDType, type MRequest, type MRequestBase, type MRequestWithData, type MResponse, MResponseStatusCode, type MResponseWithData, type MultipleColumnsPickerConfig, type ShowHUDRequest, type SingleColumnPickerConfig, clearKVStorage, clearKVStorageSync, closeApp, deleteKVStorage, deleteKVStorageSync, disablePullDownRefresh, enablePullDownRefresh, getClipboardData, getDeviceInfo, getDeviceInfoSync, getInstalledAppList, getKVStorage, getKVStorageSync, hideHUD, installApp, navigateBack, navigateTo, onPullDownRefresh, openSettings, openWebsite, previewImage, previewVideo, redirectTo, scanQRCode, setClipboardData, setKVStorage, setKVStorageSync, setNavigationBarColor, setNavigationBarTitle, showAlert, showAppDetail, showHUD, showPicker, startPullDownRefresh, stopPullDownRefresh, vibrate };
|
|
231
|
+
export { type AlertAction, type AlertConfig, type AppInfo, type DateAndTimePickerConfig, type HUDType, type MRequest, type MRequestBase, type MRequestWithData, type MResponse, MResponseStatusCode, type MResponseWithData, type MinipSqliteMigratorProps, type MultipleColumnsPickerConfig, type OpenSqliteDBProps, type ShowHUDRequest, type SingleColumnPickerConfig, clearKVStorage, clearKVStorageSync, clearMemoryStorage, closeApp, deleteKVStorage, deleteKVStorageSync, disablePullDownRefresh, enablePullDownRefresh, getClipboardData, getDeviceInfo, getDeviceInfoSync, getInstalledAppList, getKVStorage, getKVStorageSync, getMemoryStorage, hideHUD, installApp, navigateBack, navigateTo, onPullDownRefresh, openSettings, openSqliteDB, openWebsite, previewImage, previewVideo, redirectTo, removeMemoryStorage, scanQRCode, setClipboardData, setKVStorage, setKVStorageSync, setMemoryStorage, setMemoryStorageIfNotExist, setNavigationBarColor, setNavigationBarTitle, showAlert, showAppDetail, showHUD, showPicker, startPullDownRefresh, stopPullDownRefresh, vibrate };
|