database-devtools 0.1.1 → 0.1.3
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/DatabaseDevTools-CdpQJBqG.d.ts +39 -0
- package/dist/DatabaseDevTools-sw1wX5nW.d.cts +39 -0
- package/dist/adapter/index.d.cts +3 -3
- package/dist/adapter/index.d.ts +3 -3
- package/dist/adapter/index.js +0 -1
- package/dist/{adapter-BjJm71wW.d.cts → adapter-DQyQ5ycj.d.cts} +1 -1
- package/dist/{adapter-DJSjDewg.d.ts → adapter-cIF5P6qI.d.ts} +1 -1
- package/dist/adapters/sqlite/index.d.cts +4 -4
- package/dist/adapters/sqlite/index.d.ts +4 -4
- package/dist/adapters/sqlite/index.js +0 -1
- package/dist/chunk-NHHA5CZP.js +2730 -0
- package/dist/chunk-NHHA5CZP.js.map +1 -0
- package/dist/chunk-S4Z7A4TW.js +116 -0
- package/dist/chunk-S4Z7A4TW.js.map +1 -0
- package/dist/{chunk-ZS5MZR75.js → chunk-UNVCJMJK.js} +4 -114
- package/dist/chunk-UNVCJMJK.js.map +1 -0
- package/dist/client/index.d.cts +4 -3
- package/dist/client/index.d.ts +4 -3
- package/dist/client/index.js +2 -2
- package/dist/{createDevToolsServer-B7NQ_5H4.d.cts → createDevToolsServer-Cqb7xzIv.d.cts} +1 -1
- package/dist/{createDevToolsServer-DlNMoCJR.d.ts → createDevToolsServer-D3QnP8Yb.d.ts} +1 -1
- package/dist/{handleDeviceSnapshot-cYGuitSc.d.cts → handleDeviceSnapshot-CIZ_00fE.d.cts} +2 -50
- package/dist/{handleDeviceSnapshot-CR-4QMdk.d.ts → handleDeviceSnapshot-DF9sS1Pm.d.ts} +2 -50
- package/dist/index.cjs +30 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -45
- package/dist/index.d.ts +13 -45
- package/dist/index.js +7 -2741
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.d.cts +2 -2
- package/dist/inspector/index.d.ts +2 -2
- package/dist/inspector/index.js +0 -1
- package/dist/inspectors/sqlite/index.d.cts +2 -2
- package/dist/inspectors/sqlite/index.d.ts +2 -2
- package/dist/inspectors/sqlite/index.js +0 -1
- package/dist/inspectors/sqlite/index.js.map +1 -1
- package/dist/native.cjs +3933 -0
- package/dist/native.cjs.map +1 -0
- package/dist/native.d.cts +37 -0
- package/dist/native.d.ts +37 -0
- package/dist/native.js +12 -0
- package/dist/native.js.map +1 -0
- package/dist/{register-BuicFu9L.d.cts → register-DEZ0kK1p.d.cts} +2 -2
- package/dist/{register-aITLN9Q9.d.ts → register-Dawue1_L.d.ts} +2 -2
- package/dist/resolveDeviceDatabaseUrl-DhRP-h1Y.d.cts +49 -0
- package/dist/resolveDeviceDatabaseUrl-DhRP-h1Y.d.ts +49 -0
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +0 -1
- package/dist/{snapshot-Dhyecgo2.d.cts → snapshot-Dknp_qP1.d.cts} +1 -1
- package/dist/{snapshot-Dhyecgo2.d.ts → snapshot-Dknp_qP1.d.ts} +1 -1
- package/dist/types/protocol.js +0 -1
- package/dist/{types-CKVRCX-e.d.ts → types-6nco_RRp.d.ts} +2 -2
- package/dist/{types-CIA11diJ.d.cts → types-BQHZtFwx.d.cts} +2 -2
- package/dist/{types-CF6qEU-_.d.ts → types-DkVlU6t-.d.ts} +2 -2
- package/dist/{types-BRLJdBRY.d.cts → types-gT3gDw_T.d.cts} +2 -2
- package/dist/web/assets/{index-DQrPRTOy.js → index-DogMAkgu.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +8 -6
- package/dist/chunk-DGUM43GV.js +0 -10
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-ZS5MZR75.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import { BeginTransactionMessage, TransactionAckMessage, CommitTransactionMessage, ExecuteWriteMessage, WriteAckMessage, RollbackTransactionMessage } from './types/protocol.cjs';
|
|
2
2
|
export { BroadcastMessage, BrowserConnectionInfo, ClientMessage, DEFAULT_DEVTOOLS_HOST, DEFAULT_DEVTOOLS_PORT, DEVICE_SNAPSHOT_API_PATH, DEVTOOLS_WS_PATH, DevToolsMessage, DevToolsMessageBase, DevToolsRole, DeviceMetadata, DeviceStatusMessage, DeviceStatusPayload, ExportSnapshotErrorMessage, ExportSnapshotRequestMessage, HEARTBEAT_INTERVAL_MS, HEARTBEAT_TIMEOUT_MS, MAX_SNAPSHOT_BYTES, MessageType, MessageTypeValue, MobileDeviceInfo, PROJECT_DATABASES_API_PATH, PROJECT_DATABASE_API_PATH, PROJECT_DATABASE_META_API_PATH, PROJECT_DEVICE_EXPORTS_API_PATH, PingMessage, PongMessage, REFRESH_TIMEOUT_MS, RefreshErrorCode, RefreshErrorMessage, RefreshInitiator, RefreshRequestMessage, RefreshState, RefreshStatusMessage, RefreshType, RegisterMessage, SNAPSHOT_API_PATH, SYNC_TIMEOUT_MS, ServerMessage, SnapshotReadyMessage, SnapshotUploadRequestedMessage, SyncErrorCode, SyncState, buildDevToolsHttpUrl, buildDevToolsWsUrl, buildDeviceSnapshotUrl, buildSnapshotUrl, createMessage, isBroadcastMessage, isClientMessage, isDeviceStatusMessage, isExportSnapshotErrorMessage, isExportSnapshotRequestMessage, isPingMessage, isPongMessage, isRefreshErrorMessage, isRefreshRequestMessage, isRefreshStatusMessage, isRegisterMessage, isServerMessage, isSnapshotReadyMessage, isSnapshotUploadRequestedMessage, wsUrlToHttpUrl } from './types/protocol.cjs';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
export { C as ColumnInfo, D as DatabaseInspector, I as InspectorDefinition,
|
|
3
|
+
export { A as AdapterCapabilities, D as DATABASE_DEVTOOLS_KIND, a as DatabaseKind, I as InspectorCapabilities, S as SNAPSHOT_KIND_HEADER, b as SNAPSHOT_MIME_HEADER, c as SNAPSHOT_NAME_HEADER, d as SQLITE_SNAPSHOT_MIME_TYPE, e as SnapshotExport, r as readDatabaseKindMarker } from './snapshot-Dknp_qP1.cjs';
|
|
4
|
+
import { D as DatabaseAdapter } from './adapter-DQyQ5ycj.cjs';
|
|
5
|
+
export { E as EditableDatabaseAdapter, W as WritableDatabaseAdapter, a as WriteResult, i as isEditableDatabaseAdapter, b as isWritableDatabaseAdapter } from './adapter-DQyQ5ycj.cjs';
|
|
6
|
+
export { D as DatabaseDevTools, a as DatabaseDevToolsProps, b as DatabaseDialect, F as FloatingButtonPosition } from './DatabaseDevTools-sw1wX5nW.cjs';
|
|
7
|
+
export { C as ColumnInfo, D as DatabaseInspector, I as InspectorDefinition, Q as QueryError, a as QueryResult, S as SchemaTable, T as TableInfo, b as TablePageRequest, c as TablePageResult } from './types-BQHZtFwx.cjs';
|
|
8
8
|
export { D as DeleteOperation, I as InsertOperation, U as UpdateOperation, W as WriteCellValue, a as WriteOperation } from './write-C3toEIMs.cjs';
|
|
9
|
-
export { A as AdapterDefinition, R as ResolveAdapterOptions } from './types-
|
|
9
|
+
export { A as AdapterDefinition, R as ResolveAdapterOptions } from './types-gT3gDw_T.cjs';
|
|
10
10
|
export { AdapterRegistry, AdapterResolutionError, getAdapterRegistry, registerBuiltInAdapters, resetAdapterRegistry, resolveAdapter } from './adapter/index.cjs';
|
|
11
11
|
export { InspectorRegistry, createInspectorForSnapshot, getInspectorRegistry, resetInspectorRegistry } from './inspector/index.cjs';
|
|
12
|
-
|
|
13
|
-
export { D as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
export { C as ConnectionState, D as DevToolsClient, a as DevToolsClientOptions, T as TransactionState, c as createDevToolsClient, f as fetchSnapshot, h as handleDeviceSnapshotUpload } from './handleDeviceSnapshot-CIZ_00fE.cjs';
|
|
13
|
+
export { D as DeviceExportMeta, L as ListedDeviceExport, a as ListedProjectDatabase, P as ProjectDatabaseMeta, R as ResolveProjectDatabaseUrlOptions, f as fetchDeviceExportDatabase, b as fetchDeviceExportMeta, c as fetchDeviceExports, d as fetchProjectDatabase, e as fetchProjectDatabaseMeta, g as fetchProjectDatabases, r as resolveDeviceExportDatabaseMetaUrl, h as resolveDeviceExportDatabaseUrl, i as resolveDeviceExportsUrl, j as resolveProjectDatabaseMetaUrl, k as resolveProjectDatabaseUrl, l as resolveProjectDatabasesUrl } from './resolveDeviceDatabaseUrl-DhRP-h1Y.cjs';
|
|
14
|
+
export { D as DevToolsServer, a as DevToolsServerOptions, c as createDevToolsServer } from './createDevToolsServer-Cqb7xzIv.cjs';
|
|
15
|
+
export { C as CreateExpoSqliteAdapterOptions, E as ExpoSqliteDatabase, c as createExpoSqliteAdapter, d as detectExpoSqlite, r as registerSqliteAdapter, s as sqliteAdapterDefinition } from './register-DEZ0kK1p.cjs';
|
|
16
|
+
import 'react/jsx-runtime';
|
|
17
|
+
import 'react-native';
|
|
18
18
|
import 'express';
|
|
19
19
|
import 'node:http';
|
|
20
20
|
import 'ws';
|
|
21
21
|
|
|
22
|
-
/** @deprecated Use `DatabaseKind` from `./kind` instead. */
|
|
23
|
-
type DatabaseDialect = DatabaseKind;
|
|
24
|
-
|
|
25
22
|
type TransactionAckReporter = (message: Omit<TransactionAckMessage, 'timestamp' | 'type'>) => void;
|
|
26
23
|
type WriteAckReporter = (message: Omit<WriteAckMessage, 'timestamp' | 'type'>) => void;
|
|
27
24
|
declare function handleBeginTransaction(adapter: DatabaseAdapter | undefined, message: BeginTransactionMessage, report: TransactionAckReporter): Promise<void>;
|
|
@@ -29,33 +26,4 @@ declare function handleCommitTransaction(adapter: DatabaseAdapter | undefined, m
|
|
|
29
26
|
declare function handleRollbackTransaction(adapter: DatabaseAdapter | undefined, message: RollbackTransactionMessage, report: TransactionAckReporter): Promise<void>;
|
|
30
27
|
declare function handleExecuteWrite(adapter: DatabaseAdapter | undefined, message: ExecuteWriteMessage, report: WriteAckReporter): Promise<void>;
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type DatabaseDevToolsProps = {
|
|
38
|
-
/** Raw database instance (auto-detected) or a resolved adapter. */
|
|
39
|
-
database?: unknown;
|
|
40
|
-
/** Explicit database kind override. */
|
|
41
|
-
type?: DatabaseKind;
|
|
42
|
-
/** Custom adapter override (advanced). */
|
|
43
|
-
adapter?: DatabaseAdapter;
|
|
44
|
-
serverUrl?: string;
|
|
45
|
-
enabled?: boolean;
|
|
46
|
-
position?: 'bottom-right' | 'bottom-left';
|
|
47
|
-
/** Allow dragging the floating button around the screen. */
|
|
48
|
-
draggable?: boolean;
|
|
49
|
-
/** Snap the button to screen edges after dragging. */
|
|
50
|
-
snapToEdges?: boolean;
|
|
51
|
-
/** Controlled floating button position. */
|
|
52
|
-
floatingPosition?: FloatingButtonPosition;
|
|
53
|
-
/** Called when the user drags the floating button to a new position. */
|
|
54
|
-
onFloatingPositionChange?: (position: FloatingButtonPosition) => void;
|
|
55
|
-
/** Optional style for the floating button database icon. */
|
|
56
|
-
style?: StyleProp<TextStyle>;
|
|
57
|
-
onConnectionStateChange?: (state: ConnectionState) => void;
|
|
58
|
-
};
|
|
59
|
-
declare function DatabaseDevTools({ database, type, adapter, serverUrl, enabled, position, draggable, snapToEdges, floatingPosition, onFloatingPositionChange, style, onConnectionStateChange, }: DatabaseDevToolsProps): react_jsx_runtime.JSX.Element | null;
|
|
60
|
-
|
|
61
|
-
export { ConnectionState, DatabaseAdapter, DatabaseDevTools, type DatabaseDevToolsProps, type DatabaseDialect, DatabaseKind, type FloatingButtonPosition, handleBeginTransaction, handleCommitTransaction, handleExecuteWrite, handleRollbackTransaction };
|
|
29
|
+
export { DatabaseAdapter, handleBeginTransaction, handleCommitTransaction, handleExecuteWrite, handleRollbackTransaction };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import { BeginTransactionMessage, TransactionAckMessage, CommitTransactionMessage, ExecuteWriteMessage, WriteAckMessage, RollbackTransactionMessage } from './types/protocol.js';
|
|
2
2
|
export { BroadcastMessage, BrowserConnectionInfo, ClientMessage, DEFAULT_DEVTOOLS_HOST, DEFAULT_DEVTOOLS_PORT, DEVICE_SNAPSHOT_API_PATH, DEVTOOLS_WS_PATH, DevToolsMessage, DevToolsMessageBase, DevToolsRole, DeviceMetadata, DeviceStatusMessage, DeviceStatusPayload, ExportSnapshotErrorMessage, ExportSnapshotRequestMessage, HEARTBEAT_INTERVAL_MS, HEARTBEAT_TIMEOUT_MS, MAX_SNAPSHOT_BYTES, MessageType, MessageTypeValue, MobileDeviceInfo, PROJECT_DATABASES_API_PATH, PROJECT_DATABASE_API_PATH, PROJECT_DATABASE_META_API_PATH, PROJECT_DEVICE_EXPORTS_API_PATH, PingMessage, PongMessage, REFRESH_TIMEOUT_MS, RefreshErrorCode, RefreshErrorMessage, RefreshInitiator, RefreshRequestMessage, RefreshState, RefreshStatusMessage, RefreshType, RegisterMessage, SNAPSHOT_API_PATH, SYNC_TIMEOUT_MS, ServerMessage, SnapshotReadyMessage, SnapshotUploadRequestedMessage, SyncErrorCode, SyncState, buildDevToolsHttpUrl, buildDevToolsWsUrl, buildDeviceSnapshotUrl, buildSnapshotUrl, createMessage, isBroadcastMessage, isClientMessage, isDeviceStatusMessage, isExportSnapshotErrorMessage, isExportSnapshotRequestMessage, isPingMessage, isPongMessage, isRefreshErrorMessage, isRefreshRequestMessage, isRefreshStatusMessage, isRegisterMessage, isServerMessage, isSnapshotReadyMessage, isSnapshotUploadRequestedMessage, wsUrlToHttpUrl } from './types/protocol.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
export { C as ColumnInfo, D as DatabaseInspector, I as InspectorDefinition,
|
|
3
|
+
export { A as AdapterCapabilities, D as DATABASE_DEVTOOLS_KIND, a as DatabaseKind, I as InspectorCapabilities, S as SNAPSHOT_KIND_HEADER, b as SNAPSHOT_MIME_HEADER, c as SNAPSHOT_NAME_HEADER, d as SQLITE_SNAPSHOT_MIME_TYPE, e as SnapshotExport, r as readDatabaseKindMarker } from './snapshot-Dknp_qP1.js';
|
|
4
|
+
import { D as DatabaseAdapter } from './adapter-cIF5P6qI.js';
|
|
5
|
+
export { E as EditableDatabaseAdapter, W as WritableDatabaseAdapter, a as WriteResult, i as isEditableDatabaseAdapter, b as isWritableDatabaseAdapter } from './adapter-cIF5P6qI.js';
|
|
6
|
+
export { D as DatabaseDevTools, a as DatabaseDevToolsProps, b as DatabaseDialect, F as FloatingButtonPosition } from './DatabaseDevTools-CdpQJBqG.js';
|
|
7
|
+
export { C as ColumnInfo, D as DatabaseInspector, I as InspectorDefinition, Q as QueryError, a as QueryResult, S as SchemaTable, T as TableInfo, b as TablePageRequest, c as TablePageResult } from './types-6nco_RRp.js';
|
|
8
8
|
export { D as DeleteOperation, I as InsertOperation, U as UpdateOperation, W as WriteCellValue, a as WriteOperation } from './write-C3toEIMs.js';
|
|
9
|
-
export { A as AdapterDefinition, R as ResolveAdapterOptions } from './types-
|
|
9
|
+
export { A as AdapterDefinition, R as ResolveAdapterOptions } from './types-DkVlU6t-.js';
|
|
10
10
|
export { AdapterRegistry, AdapterResolutionError, getAdapterRegistry, registerBuiltInAdapters, resetAdapterRegistry, resolveAdapter } from './adapter/index.js';
|
|
11
11
|
export { InspectorRegistry, createInspectorForSnapshot, getInspectorRegistry, resetInspectorRegistry } from './inspector/index.js';
|
|
12
|
-
|
|
13
|
-
export { D as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
export { C as ConnectionState, D as DevToolsClient, a as DevToolsClientOptions, T as TransactionState, c as createDevToolsClient, f as fetchSnapshot, h as handleDeviceSnapshotUpload } from './handleDeviceSnapshot-DF9sS1Pm.js';
|
|
13
|
+
export { D as DeviceExportMeta, L as ListedDeviceExport, a as ListedProjectDatabase, P as ProjectDatabaseMeta, R as ResolveProjectDatabaseUrlOptions, f as fetchDeviceExportDatabase, b as fetchDeviceExportMeta, c as fetchDeviceExports, d as fetchProjectDatabase, e as fetchProjectDatabaseMeta, g as fetchProjectDatabases, r as resolveDeviceExportDatabaseMetaUrl, h as resolveDeviceExportDatabaseUrl, i as resolveDeviceExportsUrl, j as resolveProjectDatabaseMetaUrl, k as resolveProjectDatabaseUrl, l as resolveProjectDatabasesUrl } from './resolveDeviceDatabaseUrl-DhRP-h1Y.js';
|
|
14
|
+
export { D as DevToolsServer, a as DevToolsServerOptions, c as createDevToolsServer } from './createDevToolsServer-D3QnP8Yb.js';
|
|
15
|
+
export { C as CreateExpoSqliteAdapterOptions, E as ExpoSqliteDatabase, c as createExpoSqliteAdapter, d as detectExpoSqlite, r as registerSqliteAdapter, s as sqliteAdapterDefinition } from './register-Dawue1_L.js';
|
|
16
|
+
import 'react/jsx-runtime';
|
|
17
|
+
import 'react-native';
|
|
18
18
|
import 'express';
|
|
19
19
|
import 'node:http';
|
|
20
20
|
import 'ws';
|
|
21
21
|
|
|
22
|
-
/** @deprecated Use `DatabaseKind` from `./kind` instead. */
|
|
23
|
-
type DatabaseDialect = DatabaseKind;
|
|
24
|
-
|
|
25
22
|
type TransactionAckReporter = (message: Omit<TransactionAckMessage, 'timestamp' | 'type'>) => void;
|
|
26
23
|
type WriteAckReporter = (message: Omit<WriteAckMessage, 'timestamp' | 'type'>) => void;
|
|
27
24
|
declare function handleBeginTransaction(adapter: DatabaseAdapter | undefined, message: BeginTransactionMessage, report: TransactionAckReporter): Promise<void>;
|
|
@@ -29,33 +26,4 @@ declare function handleCommitTransaction(adapter: DatabaseAdapter | undefined, m
|
|
|
29
26
|
declare function handleRollbackTransaction(adapter: DatabaseAdapter | undefined, message: RollbackTransactionMessage, report: TransactionAckReporter): Promise<void>;
|
|
30
27
|
declare function handleExecuteWrite(adapter: DatabaseAdapter | undefined, message: ExecuteWriteMessage, report: WriteAckReporter): Promise<void>;
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type DatabaseDevToolsProps = {
|
|
38
|
-
/** Raw database instance (auto-detected) or a resolved adapter. */
|
|
39
|
-
database?: unknown;
|
|
40
|
-
/** Explicit database kind override. */
|
|
41
|
-
type?: DatabaseKind;
|
|
42
|
-
/** Custom adapter override (advanced). */
|
|
43
|
-
adapter?: DatabaseAdapter;
|
|
44
|
-
serverUrl?: string;
|
|
45
|
-
enabled?: boolean;
|
|
46
|
-
position?: 'bottom-right' | 'bottom-left';
|
|
47
|
-
/** Allow dragging the floating button around the screen. */
|
|
48
|
-
draggable?: boolean;
|
|
49
|
-
/** Snap the button to screen edges after dragging. */
|
|
50
|
-
snapToEdges?: boolean;
|
|
51
|
-
/** Controlled floating button position. */
|
|
52
|
-
floatingPosition?: FloatingButtonPosition;
|
|
53
|
-
/** Called when the user drags the floating button to a new position. */
|
|
54
|
-
onFloatingPositionChange?: (position: FloatingButtonPosition) => void;
|
|
55
|
-
/** Optional style for the floating button database icon. */
|
|
56
|
-
style?: StyleProp<TextStyle>;
|
|
57
|
-
onConnectionStateChange?: (state: ConnectionState) => void;
|
|
58
|
-
};
|
|
59
|
-
declare function DatabaseDevTools({ database, type, adapter, serverUrl, enabled, position, draggable, snapToEdges, floatingPosition, onFloatingPositionChange, style, onConnectionStateChange, }: DatabaseDevToolsProps): react_jsx_runtime.JSX.Element | null;
|
|
60
|
-
|
|
61
|
-
export { ConnectionState, DatabaseAdapter, DatabaseDevTools, type DatabaseDevToolsProps, type DatabaseDialect, DatabaseKind, type FloatingButtonPosition, handleBeginTransaction, handleCommitTransaction, handleExecuteWrite, handleRollbackTransaction };
|
|
29
|
+
export { DatabaseAdapter, handleBeginTransaction, handleCommitTransaction, handleExecuteWrite, handleRollbackTransaction };
|