@event-driven-io/dumbo 0.12.1 → 0.13.0-alpha.2
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/chunk-2FKOO7MT.js +1 -0
- package/dist/chunk-2FKOO7MT.js.map +1 -0
- package/dist/chunk-3AZXA4Q4.cjs +1 -0
- package/dist/chunk-3AZXA4Q4.cjs.map +1 -0
- package/dist/chunk-55X4XXTZ.cjs +40 -0
- package/dist/chunk-55X4XXTZ.cjs.map +1 -0
- package/dist/chunk-72RN47FR.cjs +36 -0
- package/dist/chunk-72RN47FR.cjs.map +1 -0
- package/dist/chunk-DY2FMM5O.cjs +1 -0
- package/dist/chunk-DY2FMM5O.cjs.map +1 -0
- package/dist/chunk-DYX7V3LM.cjs +1409 -0
- package/dist/chunk-DYX7V3LM.cjs.map +1 -0
- package/dist/chunk-IIFZU7RA.js +1409 -0
- package/dist/chunk-IIFZU7RA.js.map +1 -0
- package/dist/chunk-KIWDFZ4Q.js +69 -0
- package/dist/chunk-KIWDFZ4Q.js.map +1 -0
- package/dist/chunk-L52DDJVT.js +1 -0
- package/dist/chunk-L52DDJVT.js.map +1 -0
- package/dist/chunk-LKLJL6B2.cjs +1 -0
- package/dist/chunk-LKLJL6B2.cjs.map +1 -0
- package/dist/chunk-ML7B25UO.js +40 -0
- package/dist/chunk-ML7B25UO.js.map +1 -0
- package/dist/chunk-PXIJTLLG.cjs +34 -0
- package/dist/chunk-PXIJTLLG.cjs.map +1 -0
- package/dist/chunk-QD3XOIUK.js +34 -0
- package/dist/chunk-QD3XOIUK.js.map +1 -0
- package/dist/chunk-SYFQT5SJ.js +1 -0
- package/dist/chunk-SYFQT5SJ.js.map +1 -0
- package/dist/chunk-TXXOMO2S.cjs +69 -0
- package/dist/chunk-TXXOMO2S.cjs.map +1 -0
- package/dist/chunk-VWPQS5RN.js +147 -0
- package/dist/chunk-VWPQS5RN.js.map +1 -0
- package/dist/chunk-Y7ETN53Q.cjs +147 -0
- package/dist/chunk-Y7ETN53Q.cjs.map +1 -0
- package/dist/chunk-YJF6HCJO.js +36 -0
- package/dist/chunk-YJF6HCJO.js.map +1 -0
- package/dist/connection-OKCNNQLA.cjs +17 -0
- package/dist/connection-OKCNNQLA.cjs.map +1 -0
- package/dist/connection-QSWKG7CD.js +17 -0
- package/dist/connection-QSWKG7CD.js.map +1 -0
- package/dist/connection.int.spec-4JZ5IO52.js +279 -0
- package/dist/connection.int.spec-4JZ5IO52.js.map +1 -0
- package/dist/connection.int.spec-WSLCBNOR.cjs +279 -0
- package/dist/connection.int.spec-WSLCBNOR.cjs.map +1 -0
- package/dist/connections-3374TYPY.js +20 -0
- package/dist/connections-3374TYPY.js.map +1 -0
- package/dist/connections-DM3XBOND.js +18 -0
- package/dist/connections-DM3XBOND.js.map +1 -0
- package/dist/connections-KNAIUBC5.cjs +18 -0
- package/dist/connections-KNAIUBC5.cjs.map +1 -0
- package/dist/connections-ROCX4PBC.cjs +20 -0
- package/dist/connections-ROCX4PBC.cjs.map +1 -0
- package/dist/core-FB34A5DC.js +38 -0
- package/dist/core-FB34A5DC.js.map +1 -0
- package/dist/core-ROYOQ2PP.cjs +38 -0
- package/dist/core-ROYOQ2PP.cjs.map +1 -0
- package/dist/execute-DVHVB627.cjs +10 -0
- package/dist/execute-DVHVB627.cjs.map +1 -0
- package/dist/execute-HCURO5PS.cjs +11 -0
- package/dist/execute-HCURO5PS.cjs.map +1 -0
- package/dist/execute-NABA4WBO.js +10 -0
- package/dist/execute-NABA4WBO.js.map +1 -0
- package/dist/execute-TDYAV2AC.js +11 -0
- package/dist/execute-TDYAV2AC.js.map +1 -0
- package/dist/index-C0xy8dwZ.d.cts +183 -0
- package/dist/index-C0xy8dwZ.d.ts +183 -0
- package/dist/index.cjs +91 -1294
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -169
- package/dist/index.d.ts +14 -169
- package/dist/index.js +92 -1295
- package/dist/index.js.map +1 -1
- package/dist/pg.cjs +79 -0
- package/dist/pg.cjs.map +1 -0
- package/dist/pg.d.cts +3 -0
- package/dist/pg.d.ts +3 -0
- package/dist/pg.js +79 -0
- package/dist/pg.js.map +1 -0
- package/dist/pool-4C3RXVW5.cjs +20 -0
- package/dist/pool-4C3RXVW5.cjs.map +1 -0
- package/dist/pool-72E2RZLT.js +20 -0
- package/dist/pool-72E2RZLT.js.map +1 -0
- package/dist/sqlite-6TQBKUQW.js +8 -0
- package/dist/sqlite-6TQBKUQW.js.map +1 -0
- package/dist/sqlite-V3G6SXM3.cjs +8 -0
- package/dist/sqlite-V3G6SXM3.cjs.map +1 -0
- package/dist/sqlite3-MGFULTOS.cjs +20 -0
- package/dist/sqlite3-MGFULTOS.cjs.map +1 -0
- package/dist/sqlite3-YRIOHH6U.js +20 -0
- package/dist/sqlite3-YRIOHH6U.js.map +1 -0
- package/dist/sqlite3.cjs +49 -0
- package/dist/sqlite3.cjs.map +1 -0
- package/dist/sqlite3.d.cts +125 -0
- package/dist/sqlite3.d.ts +125 -0
- package/dist/sqlite3.js +49 -0
- package/dist/sqlite3.js.map +1 -0
- package/dist/transactions-7RPMRDZJ.cjs +10 -0
- package/dist/transactions-7RPMRDZJ.cjs.map +1 -0
- package/dist/transactions-KIOZ2TLT.js +10 -0
- package/dist/transactions-KIOZ2TLT.js.map +1 -0
- package/package.json +43 -8
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { C as Connection, D as DbSQLExecutor, a as ConnectionPool, J as JSONSerializer, b as DatabaseTransaction, c as ConnectorTypeName } from './index-C0xy8dwZ.cjs';
|
|
2
|
+
|
|
3
|
+
type Parameters = object | string | bigint | number | boolean | null;
|
|
4
|
+
type SQLiteClient = {
|
|
5
|
+
close: () => Promise<void>;
|
|
6
|
+
command: (sql: string, values?: Parameters[]) => Promise<void>;
|
|
7
|
+
query: <T>(sql: string, values?: Parameters[]) => Promise<T[]>;
|
|
8
|
+
querySingle: <T>(sql: string, values?: Parameters[]) => Promise<T | null>;
|
|
9
|
+
};
|
|
10
|
+
type SQLitePoolClient = {
|
|
11
|
+
release: () => void;
|
|
12
|
+
command: (sql: string, values?: Parameters[]) => Promise<void>;
|
|
13
|
+
query: <T>(sql: string, values?: Parameters[]) => Promise<T[]>;
|
|
14
|
+
querySingle: <T>(sql: string, values?: Parameters[]) => Promise<T | null>;
|
|
15
|
+
};
|
|
16
|
+
type SQLiteClientFactory = (options: SQLiteClientOptions) => SQLiteClient;
|
|
17
|
+
type SQLiteClientOrPoolClient = SQLitePoolClient | SQLiteClient;
|
|
18
|
+
interface SQLiteError extends Error {
|
|
19
|
+
errno: number;
|
|
20
|
+
}
|
|
21
|
+
declare const isSQLiteError: (error: unknown) => error is SQLiteError;
|
|
22
|
+
type SQLitePoolConnectionOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
23
|
+
connector: ConnectorType;
|
|
24
|
+
type: 'PoolClient';
|
|
25
|
+
connect: Promise<SQLitePoolClient>;
|
|
26
|
+
close: (client: SQLitePoolClient) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
type SQLiteClientConnectionOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
29
|
+
connector: ConnectorType;
|
|
30
|
+
type: 'Client';
|
|
31
|
+
connect: Promise<SQLiteClient>;
|
|
32
|
+
close: (client: SQLiteClient) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
type SQLiteClientConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = Connection<ConnectorType, SQLiteClient>;
|
|
35
|
+
type SQLitePoolClientConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = Connection<ConnectorType, SQLitePoolClient>;
|
|
36
|
+
type SQLiteConnection = SQLiteClientConnection | SQLitePoolClientConnection;
|
|
37
|
+
declare const sqliteClientConnection: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLiteClientConnectionOptions<ConnectorType>) => SQLiteClientConnection<ConnectorType>;
|
|
38
|
+
declare const sqlitePoolClientConnection: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolConnectionOptions<ConnectorType>) => SQLitePoolClientConnection<ConnectorType>;
|
|
39
|
+
declare function sqliteConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolConnectionOptions<ConnectorType>): SQLitePoolClientConnection;
|
|
40
|
+
declare function sqliteConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLiteClientConnectionOptions<ConnectorType>): SQLiteClientConnection;
|
|
41
|
+
type InMemorySQLiteDatabase = ':memory:';
|
|
42
|
+
declare const InMemorySQLiteDatabase = ":memory:";
|
|
43
|
+
type SQLiteClientOptions = {
|
|
44
|
+
fileName: InMemorySQLiteDatabase | string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
|
|
48
|
+
type SQLiteSQLExecutor<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = DbSQLExecutor<ConnectorType, SQLiteClient>;
|
|
49
|
+
declare const sqliteSQLExecutor: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(connectorType: ConnectorType) => SQLiteSQLExecutor<ConnectorType>;
|
|
50
|
+
type BatchQueryOptions = {
|
|
51
|
+
timeoutMs?: number;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type SQLiteAmbientClientPool = ConnectionPool<SQLiteClientConnection>;
|
|
55
|
+
type SQLiteAmbientConnectionPool = ConnectionPool<SQLitePoolClientConnection | SQLiteClientConnection>;
|
|
56
|
+
type SQLitePool = SQLiteAmbientClientPool | SQLiteAmbientConnectionPool;
|
|
57
|
+
declare const sqliteAmbientConnectionPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
58
|
+
connector: ConnectorType;
|
|
59
|
+
connection: SQLitePoolClientConnection<ConnectorType> | SQLiteClientConnection<ConnectorType>;
|
|
60
|
+
}) => SQLiteAmbientConnectionPool;
|
|
61
|
+
declare const sqliteSingletonClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
62
|
+
connector: ConnectorType;
|
|
63
|
+
fileName: string;
|
|
64
|
+
database?: string | undefined;
|
|
65
|
+
}) => SQLiteAmbientClientPool;
|
|
66
|
+
declare const sqliteAlwaysNewClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
67
|
+
connector: ConnectorType;
|
|
68
|
+
fileName: string;
|
|
69
|
+
database?: string | undefined;
|
|
70
|
+
}) => SQLiteAmbientClientPool;
|
|
71
|
+
declare const sqliteAmbientClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
72
|
+
connector: ConnectorType;
|
|
73
|
+
client: SQLiteClient;
|
|
74
|
+
}) => SQLiteAmbientClientPool;
|
|
75
|
+
type SQLitePoolPooledOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
76
|
+
connector: ConnectorType;
|
|
77
|
+
fileName: string;
|
|
78
|
+
pooled?: true;
|
|
79
|
+
singleton?: boolean;
|
|
80
|
+
};
|
|
81
|
+
type SQLitePoolNotPooledOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
82
|
+
connector: ConnectorType;
|
|
83
|
+
fileName: string;
|
|
84
|
+
pooled?: false;
|
|
85
|
+
client: SQLiteClient;
|
|
86
|
+
singleton?: true;
|
|
87
|
+
} | {
|
|
88
|
+
connector: ConnectorType;
|
|
89
|
+
fileName: string;
|
|
90
|
+
pooled?: boolean;
|
|
91
|
+
singleton?: boolean;
|
|
92
|
+
} | {
|
|
93
|
+
connector: ConnectorType;
|
|
94
|
+
fileName: string;
|
|
95
|
+
connection: SQLitePoolClientConnection<ConnectorType> | SQLiteClientConnection<ConnectorType>;
|
|
96
|
+
pooled?: false;
|
|
97
|
+
singleton?: true;
|
|
98
|
+
};
|
|
99
|
+
type SQLitePoolOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = (SQLitePoolPooledOptions<ConnectorType> | SQLitePoolNotPooledOptions<ConnectorType>) & {
|
|
100
|
+
serializer?: JSONSerializer;
|
|
101
|
+
};
|
|
102
|
+
declare function sqlitePool<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolNotPooledOptions<ConnectorType>): SQLiteAmbientClientPool;
|
|
103
|
+
|
|
104
|
+
type SQLiteTransaction<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = DatabaseTransaction<ConnectorType>;
|
|
105
|
+
declare const sqliteTransaction: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType, DbClient extends SQLiteClientOrPoolClient = SQLiteClientOrPoolClient>(connectorType: ConnectorType, connection: () => Connection<ConnectorType, DbClient>) => (getClient: Promise<DbClient>, options?: {
|
|
106
|
+
close: (client: DbClient, error?: unknown) => Promise<void>;
|
|
107
|
+
}) => DatabaseTransaction<ConnectorType>;
|
|
108
|
+
|
|
109
|
+
type SQLiteConnector = 'SQLite';
|
|
110
|
+
type SQLiteConnectorType<DriverName extends string = string> = ConnectorTypeName<SQLiteConnector, DriverName>;
|
|
111
|
+
|
|
112
|
+
type SQLite3Connector = SQLiteConnectorType<'sqlite3'>;
|
|
113
|
+
declare const SQLite3ConnectorType: SQLite3Connector;
|
|
114
|
+
type ConnectionCheckResult = {
|
|
115
|
+
successful: true;
|
|
116
|
+
} | {
|
|
117
|
+
successful: false;
|
|
118
|
+
code: string | undefined;
|
|
119
|
+
errorType: 'ConnectionRefused' | 'Authentication' | 'Unknown';
|
|
120
|
+
error: unknown;
|
|
121
|
+
};
|
|
122
|
+
declare const sqlite3Client: (options: SQLiteClientOptions) => SQLiteClient;
|
|
123
|
+
declare const checkConnection: (fileName: string) => Promise<ConnectionCheckResult>;
|
|
124
|
+
|
|
125
|
+
export { type BatchQueryOptions, type ConnectionCheckResult, InMemorySQLiteDatabase, type Parameters, type SQLite3Connector, SQLite3ConnectorType, type SQLiteAmbientClientPool, type SQLiteAmbientConnectionPool, type SQLiteClient, type SQLiteClientConnection, type SQLiteClientConnectionOptions, type SQLiteClientFactory, type SQLiteClientOptions, type SQLiteClientOrPoolClient, type SQLiteConnection, type SQLiteConnector, type SQLiteConnectorType, type SQLiteError, type SQLitePool, type SQLitePoolClient, type SQLitePoolClientConnection, type SQLitePoolConnectionOptions, type SQLitePoolNotPooledOptions, type SQLitePoolOptions, type SQLitePoolPooledOptions, type SQLiteSQLExecutor, type SQLiteTransaction, checkConnection, isSQLiteError, sqlite3Client, sqliteAlwaysNewClientPool, sqliteAmbientClientPool, sqliteAmbientConnectionPool, sqlite3Client as sqliteClient, sqliteClientConnection, sqliteConnection, sqliteExecute, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonClientPool, sqliteTransaction };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { C as Connection, D as DbSQLExecutor, a as ConnectionPool, J as JSONSerializer, b as DatabaseTransaction, c as ConnectorTypeName } from './index-C0xy8dwZ.js';
|
|
2
|
+
|
|
3
|
+
type Parameters = object | string | bigint | number | boolean | null;
|
|
4
|
+
type SQLiteClient = {
|
|
5
|
+
close: () => Promise<void>;
|
|
6
|
+
command: (sql: string, values?: Parameters[]) => Promise<void>;
|
|
7
|
+
query: <T>(sql: string, values?: Parameters[]) => Promise<T[]>;
|
|
8
|
+
querySingle: <T>(sql: string, values?: Parameters[]) => Promise<T | null>;
|
|
9
|
+
};
|
|
10
|
+
type SQLitePoolClient = {
|
|
11
|
+
release: () => void;
|
|
12
|
+
command: (sql: string, values?: Parameters[]) => Promise<void>;
|
|
13
|
+
query: <T>(sql: string, values?: Parameters[]) => Promise<T[]>;
|
|
14
|
+
querySingle: <T>(sql: string, values?: Parameters[]) => Promise<T | null>;
|
|
15
|
+
};
|
|
16
|
+
type SQLiteClientFactory = (options: SQLiteClientOptions) => SQLiteClient;
|
|
17
|
+
type SQLiteClientOrPoolClient = SQLitePoolClient | SQLiteClient;
|
|
18
|
+
interface SQLiteError extends Error {
|
|
19
|
+
errno: number;
|
|
20
|
+
}
|
|
21
|
+
declare const isSQLiteError: (error: unknown) => error is SQLiteError;
|
|
22
|
+
type SQLitePoolConnectionOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
23
|
+
connector: ConnectorType;
|
|
24
|
+
type: 'PoolClient';
|
|
25
|
+
connect: Promise<SQLitePoolClient>;
|
|
26
|
+
close: (client: SQLitePoolClient) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
type SQLiteClientConnectionOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
29
|
+
connector: ConnectorType;
|
|
30
|
+
type: 'Client';
|
|
31
|
+
connect: Promise<SQLiteClient>;
|
|
32
|
+
close: (client: SQLiteClient) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
type SQLiteClientConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = Connection<ConnectorType, SQLiteClient>;
|
|
35
|
+
type SQLitePoolClientConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = Connection<ConnectorType, SQLitePoolClient>;
|
|
36
|
+
type SQLiteConnection = SQLiteClientConnection | SQLitePoolClientConnection;
|
|
37
|
+
declare const sqliteClientConnection: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLiteClientConnectionOptions<ConnectorType>) => SQLiteClientConnection<ConnectorType>;
|
|
38
|
+
declare const sqlitePoolClientConnection: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolConnectionOptions<ConnectorType>) => SQLitePoolClientConnection<ConnectorType>;
|
|
39
|
+
declare function sqliteConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolConnectionOptions<ConnectorType>): SQLitePoolClientConnection;
|
|
40
|
+
declare function sqliteConnection<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLiteClientConnectionOptions<ConnectorType>): SQLiteClientConnection;
|
|
41
|
+
type InMemorySQLiteDatabase = ':memory:';
|
|
42
|
+
declare const InMemorySQLiteDatabase = ":memory:";
|
|
43
|
+
type SQLiteClientOptions = {
|
|
44
|
+
fileName: InMemorySQLiteDatabase | string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
|
|
48
|
+
type SQLiteSQLExecutor<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = DbSQLExecutor<ConnectorType, SQLiteClient>;
|
|
49
|
+
declare const sqliteSQLExecutor: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(connectorType: ConnectorType) => SQLiteSQLExecutor<ConnectorType>;
|
|
50
|
+
type BatchQueryOptions = {
|
|
51
|
+
timeoutMs?: number;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type SQLiteAmbientClientPool = ConnectionPool<SQLiteClientConnection>;
|
|
55
|
+
type SQLiteAmbientConnectionPool = ConnectionPool<SQLitePoolClientConnection | SQLiteClientConnection>;
|
|
56
|
+
type SQLitePool = SQLiteAmbientClientPool | SQLiteAmbientConnectionPool;
|
|
57
|
+
declare const sqliteAmbientConnectionPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
58
|
+
connector: ConnectorType;
|
|
59
|
+
connection: SQLitePoolClientConnection<ConnectorType> | SQLiteClientConnection<ConnectorType>;
|
|
60
|
+
}) => SQLiteAmbientConnectionPool;
|
|
61
|
+
declare const sqliteSingletonClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
62
|
+
connector: ConnectorType;
|
|
63
|
+
fileName: string;
|
|
64
|
+
database?: string | undefined;
|
|
65
|
+
}) => SQLiteAmbientClientPool;
|
|
66
|
+
declare const sqliteAlwaysNewClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
67
|
+
connector: ConnectorType;
|
|
68
|
+
fileName: string;
|
|
69
|
+
database?: string | undefined;
|
|
70
|
+
}) => SQLiteAmbientClientPool;
|
|
71
|
+
declare const sqliteAmbientClientPool: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: {
|
|
72
|
+
connector: ConnectorType;
|
|
73
|
+
client: SQLiteClient;
|
|
74
|
+
}) => SQLiteAmbientClientPool;
|
|
75
|
+
type SQLitePoolPooledOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
76
|
+
connector: ConnectorType;
|
|
77
|
+
fileName: string;
|
|
78
|
+
pooled?: true;
|
|
79
|
+
singleton?: boolean;
|
|
80
|
+
};
|
|
81
|
+
type SQLitePoolNotPooledOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = {
|
|
82
|
+
connector: ConnectorType;
|
|
83
|
+
fileName: string;
|
|
84
|
+
pooled?: false;
|
|
85
|
+
client: SQLiteClient;
|
|
86
|
+
singleton?: true;
|
|
87
|
+
} | {
|
|
88
|
+
connector: ConnectorType;
|
|
89
|
+
fileName: string;
|
|
90
|
+
pooled?: boolean;
|
|
91
|
+
singleton?: boolean;
|
|
92
|
+
} | {
|
|
93
|
+
connector: ConnectorType;
|
|
94
|
+
fileName: string;
|
|
95
|
+
connection: SQLitePoolClientConnection<ConnectorType> | SQLiteClientConnection<ConnectorType>;
|
|
96
|
+
pooled?: false;
|
|
97
|
+
singleton?: true;
|
|
98
|
+
};
|
|
99
|
+
type SQLitePoolOptions<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = (SQLitePoolPooledOptions<ConnectorType> | SQLitePoolNotPooledOptions<ConnectorType>) & {
|
|
100
|
+
serializer?: JSONSerializer;
|
|
101
|
+
};
|
|
102
|
+
declare function sqlitePool<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType>(options: SQLitePoolNotPooledOptions<ConnectorType>): SQLiteAmbientClientPool;
|
|
103
|
+
|
|
104
|
+
type SQLiteTransaction<ConnectorType extends SQLiteConnectorType = SQLiteConnectorType> = DatabaseTransaction<ConnectorType>;
|
|
105
|
+
declare const sqliteTransaction: <ConnectorType extends SQLiteConnectorType = SQLiteConnectorType, DbClient extends SQLiteClientOrPoolClient = SQLiteClientOrPoolClient>(connectorType: ConnectorType, connection: () => Connection<ConnectorType, DbClient>) => (getClient: Promise<DbClient>, options?: {
|
|
106
|
+
close: (client: DbClient, error?: unknown) => Promise<void>;
|
|
107
|
+
}) => DatabaseTransaction<ConnectorType>;
|
|
108
|
+
|
|
109
|
+
type SQLiteConnector = 'SQLite';
|
|
110
|
+
type SQLiteConnectorType<DriverName extends string = string> = ConnectorTypeName<SQLiteConnector, DriverName>;
|
|
111
|
+
|
|
112
|
+
type SQLite3Connector = SQLiteConnectorType<'sqlite3'>;
|
|
113
|
+
declare const SQLite3ConnectorType: SQLite3Connector;
|
|
114
|
+
type ConnectionCheckResult = {
|
|
115
|
+
successful: true;
|
|
116
|
+
} | {
|
|
117
|
+
successful: false;
|
|
118
|
+
code: string | undefined;
|
|
119
|
+
errorType: 'ConnectionRefused' | 'Authentication' | 'Unknown';
|
|
120
|
+
error: unknown;
|
|
121
|
+
};
|
|
122
|
+
declare const sqlite3Client: (options: SQLiteClientOptions) => SQLiteClient;
|
|
123
|
+
declare const checkConnection: (fileName: string) => Promise<ConnectionCheckResult>;
|
|
124
|
+
|
|
125
|
+
export { type BatchQueryOptions, type ConnectionCheckResult, InMemorySQLiteDatabase, type Parameters, type SQLite3Connector, SQLite3ConnectorType, type SQLiteAmbientClientPool, type SQLiteAmbientConnectionPool, type SQLiteClient, type SQLiteClientConnection, type SQLiteClientConnectionOptions, type SQLiteClientFactory, type SQLiteClientOptions, type SQLiteClientOrPoolClient, type SQLiteConnection, type SQLiteConnector, type SQLiteConnectorType, type SQLiteError, type SQLitePool, type SQLitePoolClient, type SQLitePoolClientConnection, type SQLitePoolConnectionOptions, type SQLitePoolNotPooledOptions, type SQLitePoolOptions, type SQLitePoolPooledOptions, type SQLiteSQLExecutor, type SQLiteTransaction, checkConnection, isSQLiteError, sqlite3Client, sqliteAlwaysNewClientPool, sqliteAmbientClientPool, sqliteAmbientConnectionPool, sqlite3Client as sqliteClient, sqliteClientConnection, sqliteConnection, sqliteExecute, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonClientPool, sqliteTransaction };
|
package/dist/sqlite3.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import "./chunk-L52DDJVT.js";
|
|
2
|
+
import "./chunk-SYFQT5SJ.js";
|
|
3
|
+
import {
|
|
4
|
+
SQLite3ConnectorType,
|
|
5
|
+
checkConnection,
|
|
6
|
+
sqlite3Client
|
|
7
|
+
} from "./chunk-KIWDFZ4Q.js";
|
|
8
|
+
import {
|
|
9
|
+
InMemorySQLiteDatabase,
|
|
10
|
+
isSQLiteError,
|
|
11
|
+
sqliteAlwaysNewClientPool,
|
|
12
|
+
sqliteAmbientClientPool,
|
|
13
|
+
sqliteAmbientConnectionPool,
|
|
14
|
+
sqliteClientConnection,
|
|
15
|
+
sqliteConnection,
|
|
16
|
+
sqlitePool,
|
|
17
|
+
sqlitePoolClientConnection,
|
|
18
|
+
sqliteSingletonClientPool
|
|
19
|
+
} from "./chunk-VWPQS5RN.js";
|
|
20
|
+
import "./chunk-YJF6HCJO.js";
|
|
21
|
+
import {
|
|
22
|
+
sqliteTransaction
|
|
23
|
+
} from "./chunk-QD3XOIUK.js";
|
|
24
|
+
import "./chunk-2FKOO7MT.js";
|
|
25
|
+
import {
|
|
26
|
+
sqliteExecute,
|
|
27
|
+
sqliteSQLExecutor
|
|
28
|
+
} from "./chunk-ML7B25UO.js";
|
|
29
|
+
import "./chunk-IIFZU7RA.js";
|
|
30
|
+
export {
|
|
31
|
+
InMemorySQLiteDatabase,
|
|
32
|
+
SQLite3ConnectorType,
|
|
33
|
+
checkConnection,
|
|
34
|
+
isSQLiteError,
|
|
35
|
+
sqlite3Client,
|
|
36
|
+
sqliteAlwaysNewClientPool,
|
|
37
|
+
sqliteAmbientClientPool,
|
|
38
|
+
sqliteAmbientConnectionPool,
|
|
39
|
+
sqlite3Client as sqliteClient,
|
|
40
|
+
sqliteClientConnection,
|
|
41
|
+
sqliteConnection,
|
|
42
|
+
sqliteExecute,
|
|
43
|
+
sqlitePool,
|
|
44
|
+
sqlitePoolClientConnection,
|
|
45
|
+
sqliteSQLExecutor,
|
|
46
|
+
sqliteSingletonClientPool,
|
|
47
|
+
sqliteTransaction
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=sqlite3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkPXIJTLLGcjs = require('./chunk-PXIJTLLG.cjs');
|
|
4
|
+
require('./chunk-3AZXA4Q4.cjs');
|
|
5
|
+
require('./chunk-55X4XXTZ.cjs');
|
|
6
|
+
require('./chunk-DYX7V3LM.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.sqliteTransaction = _chunkPXIJTLLGcjs.sqliteTransaction;
|
|
10
|
+
//# sourceMappingURL=transactions-7RPMRDZJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/transactions-7RPMRDZJ.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,gEAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/transactions-7RPMRDZJ.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-driven-io/dumbo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-alpha.2",
|
|
4
4
|
"description": "Dumbo - tools for dealing with PostgreSQL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsup",
|
|
8
|
-
"build:ts": "tsc",
|
|
9
|
-
"build:ts:watch": "tsc
|
|
8
|
+
"build:ts": "tsc -b",
|
|
9
|
+
"build:ts:watch": "tsc -b --watch",
|
|
10
10
|
"test": "run-s test:unit test:int test:e2e",
|
|
11
11
|
"test:unit": "glob -c \"node --import tsx --test\" **/*.unit.spec.ts",
|
|
12
12
|
"test:int": "glob -c \"node --import tsx --test\" **/*.int.spec.ts",
|
|
@@ -40,6 +40,39 @@
|
|
|
40
40
|
"types": "./dist/index.d.cts",
|
|
41
41
|
"default": "./dist/index.cjs"
|
|
42
42
|
}
|
|
43
|
+
},
|
|
44
|
+
"./pg": {
|
|
45
|
+
"import": {
|
|
46
|
+
"types": "./dist/pg.d.ts",
|
|
47
|
+
"default": "./dist/pg.js"
|
|
48
|
+
},
|
|
49
|
+
"require": {
|
|
50
|
+
"types": "./dist/pg.d.cts",
|
|
51
|
+
"default": "./dist/pg.cjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"./sqlite3": {
|
|
55
|
+
"import": {
|
|
56
|
+
"types": "./dist/sqlite3.d.ts",
|
|
57
|
+
"default": "./dist/sqlite3.js"
|
|
58
|
+
},
|
|
59
|
+
"require": {
|
|
60
|
+
"types": "./dist/sqlite3.d.cts",
|
|
61
|
+
"default": "./dist/sqlite3.cjs"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"typesVersions": {
|
|
66
|
+
"*": {
|
|
67
|
+
".": [
|
|
68
|
+
"./dist/index.d.ts"
|
|
69
|
+
],
|
|
70
|
+
"pg": [
|
|
71
|
+
"./dist/pg.d.ts"
|
|
72
|
+
],
|
|
73
|
+
"sqlite3": [
|
|
74
|
+
"./dist/sqlite3.d.ts"
|
|
75
|
+
]
|
|
43
76
|
}
|
|
44
77
|
},
|
|
45
78
|
"main": "./dist/index.cjs",
|
|
@@ -49,13 +82,15 @@
|
|
|
49
82
|
"dist"
|
|
50
83
|
],
|
|
51
84
|
"peerDependencies": {
|
|
52
|
-
"@types/pg": "^8.11.
|
|
85
|
+
"@types/pg": "^8.11.11",
|
|
53
86
|
"@types/uuid": "^10.0.0",
|
|
54
|
-
"
|
|
55
|
-
"pg
|
|
56
|
-
"
|
|
87
|
+
"@types/sqlite3": "^5.1.0",
|
|
88
|
+
"pg": "^8.13.3",
|
|
89
|
+
"pg-connection-string": "^2.7.0",
|
|
90
|
+
"uuid": "^11.1.0",
|
|
91
|
+
"sqlite3": "^5.1.7"
|
|
57
92
|
},
|
|
58
93
|
"devDependencies": {
|
|
59
|
-
"@types/node": "22.
|
|
94
|
+
"@types/node": "^22.13.10"
|
|
60
95
|
}
|
|
61
96
|
}
|