@prisma/dev 0.7.0 → 0.8.0
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-GBG44OEG.js +1 -0
- package/dist/chunk-LBY4H4LD.js +3 -0
- package/dist/daemon/client.d.cts +3 -1
- package/dist/daemon/client.d.ts +3 -1
- package/dist/db.cjs +1 -1
- package/dist/db.d.cts +39 -2
- package/dist/db.d.ts +39 -2
- package/dist/db.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +4 -4
- package/dist/state.cjs +3 -3
- package/dist/state.d.cts +159 -3
- package/dist/state.d.ts +159 -3
- package/dist/state.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4M2BYKUR.js +0 -3
- package/dist/chunk-U4KQZNBE.js +0 -1
- package/dist/db-B1_DGnTu.d.cts +0 -202
- package/dist/db-B1_DGnTu.d.ts +0 -202
package/dist/state.d.cts
CHANGED
|
@@ -1,3 +1,159 @@
|
|
|
1
|
-
import 'valibot';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferOutput } from 'valibot';
|
|
3
|
+
|
|
4
|
+
declare const exportsSchema: valibot.ObjectSchema<{
|
|
5
|
+
readonly database: valibot.ObjectSchema<{
|
|
6
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
7
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
8
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
readonly http: valibot.ObjectSchema<{
|
|
11
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
readonly ppg: valibot.ObjectSchema<{
|
|
14
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
17
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
18
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
19
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
type Exports = InferOutput<typeof exportsSchema>;
|
|
23
|
+
declare const serverDumpV1Schema: valibot.ObjectSchema<{
|
|
24
|
+
readonly databasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
25
|
+
readonly exports: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
26
|
+
readonly database: valibot.ObjectSchema<{
|
|
27
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
28
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
29
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
30
|
+
}, undefined>;
|
|
31
|
+
readonly http: valibot.ObjectSchema<{
|
|
32
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
readonly ppg: valibot.ObjectSchema<{
|
|
35
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
38
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
39
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
40
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
41
|
+
}, undefined>;
|
|
42
|
+
}, undefined>, undefined>;
|
|
43
|
+
readonly name: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.MinLengthAction<string, 1, undefined>]>;
|
|
44
|
+
readonly pid: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
45
|
+
readonly port: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
46
|
+
readonly shadowDatabasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
47
|
+
readonly version: valibot.LiteralSchema<"1", undefined>;
|
|
48
|
+
}, undefined>;
|
|
49
|
+
type ServerDumpV1 = InferOutput<typeof serverDumpV1Schema>;
|
|
50
|
+
interface ServerOptions {
|
|
51
|
+
/**
|
|
52
|
+
* The port the database server will listen on.
|
|
53
|
+
*
|
|
54
|
+
* Defaults to `51214`.
|
|
55
|
+
*
|
|
56
|
+
* An error is thrown if the port is already in use.
|
|
57
|
+
*/
|
|
58
|
+
databasePort?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to enable debug logging.
|
|
61
|
+
*
|
|
62
|
+
* Defaults to `false`.
|
|
63
|
+
*/
|
|
64
|
+
debug?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to run the server in dry run mode.
|
|
67
|
+
*
|
|
68
|
+
* Defaults to `false`.
|
|
69
|
+
*/
|
|
70
|
+
dryRun?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The name of the server.
|
|
73
|
+
*
|
|
74
|
+
* Defaults to `default`.
|
|
75
|
+
*/
|
|
76
|
+
name?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The persistence mode of the server.
|
|
79
|
+
*
|
|
80
|
+
* Default is `stateless`.
|
|
81
|
+
*/
|
|
82
|
+
persistenceMode?: PersistenceMode;
|
|
83
|
+
/**
|
|
84
|
+
* The port the server will listen on.
|
|
85
|
+
*
|
|
86
|
+
* Defaults to `51213`.
|
|
87
|
+
*
|
|
88
|
+
* An error is thrown if the port is already in use.
|
|
89
|
+
*/
|
|
90
|
+
port?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The port the shadow database server will listen on.
|
|
93
|
+
*
|
|
94
|
+
* Defaults to `51215`.
|
|
95
|
+
*
|
|
96
|
+
* An error is thrown if the port is already in use.
|
|
97
|
+
*/
|
|
98
|
+
shadowDatabasePort?: number;
|
|
99
|
+
}
|
|
100
|
+
type ResolvedServerOptions = Required<ServerOptions>;
|
|
101
|
+
type PersistenceMode = "stateless" | "stateful";
|
|
102
|
+
interface ScanOptions {
|
|
103
|
+
debug?: boolean;
|
|
104
|
+
}
|
|
105
|
+
declare const PRIVATE_INITIALIZE_SYMBOL: unique symbol;
|
|
106
|
+
declare abstract class ServerState implements ResolvedServerOptions {
|
|
107
|
+
readonly databasePort: number;
|
|
108
|
+
readonly debug: boolean;
|
|
109
|
+
readonly dryRun: boolean;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly persistenceMode: PersistenceMode;
|
|
112
|
+
readonly pid: number | undefined;
|
|
113
|
+
readonly port: number;
|
|
114
|
+
readonly shadowDatabasePort: number;
|
|
115
|
+
protected constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
116
|
+
persistenceMode: PersistenceMode;
|
|
117
|
+
pid: number | undefined;
|
|
118
|
+
});
|
|
119
|
+
static createExclusively(options: ServerOptions | undefined): Promise<ServerState>;
|
|
120
|
+
static fromServerDump(options?: Pick<ServerOptions, "debug" | "name">): Promise<StatefulServerState | null>;
|
|
121
|
+
static scan(options?: ScanOptions): Promise<ServerStatusV1[]>;
|
|
122
|
+
abstract get databaseDumpPath(): string;
|
|
123
|
+
abstract get pgliteDataDirPath(): string;
|
|
124
|
+
abstract [PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
125
|
+
abstract close(): Promise<void>;
|
|
126
|
+
abstract writeServerDump(exports?: Exports): Promise<void>;
|
|
127
|
+
}
|
|
128
|
+
declare class StatefulServerState extends ServerState {
|
|
129
|
+
#private;
|
|
130
|
+
constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
131
|
+
pid: number | undefined;
|
|
132
|
+
serverDump?: ServerDumpV1;
|
|
133
|
+
});
|
|
134
|
+
static getServerDumpPath(dataDirPath: string): string;
|
|
135
|
+
get databaseDumpPath(): string;
|
|
136
|
+
get exports(): Exports | undefined;
|
|
137
|
+
get pgliteDataDirPath(): string;
|
|
138
|
+
[PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
139
|
+
close(): Promise<void>;
|
|
140
|
+
writeServerDump(exports?: Exports): Promise<void>;
|
|
141
|
+
}
|
|
142
|
+
interface ServerStatusV1 extends ServerDumpV1 {
|
|
143
|
+
status: "running" | "starting_up" | "not_running" | "no_such_server" | "unknown" | "error";
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated use `ServerAlreadyRunningError` instead. Will be removed in a future version.
|
|
147
|
+
*/
|
|
148
|
+
declare class ServerStateAlreadyExistsError extends Error {
|
|
149
|
+
name: string;
|
|
150
|
+
constructor(name: string);
|
|
151
|
+
}
|
|
152
|
+
declare class ServerAlreadyRunningError extends ServerStateAlreadyExistsError {
|
|
153
|
+
#private;
|
|
154
|
+
name: string;
|
|
155
|
+
constructor(server: ServerState);
|
|
156
|
+
get server(): Promise<ServerState | null>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { type Exports, type PersistenceMode, type ResolvedServerOptions, type ScanOptions, ServerAlreadyRunningError, type ServerDumpV1, type ServerOptions, ServerState, ServerStateAlreadyExistsError, type ServerStatusV1 };
|
package/dist/state.d.ts
CHANGED
|
@@ -1,3 +1,159 @@
|
|
|
1
|
-
import 'valibot';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferOutput } from 'valibot';
|
|
3
|
+
|
|
4
|
+
declare const exportsSchema: valibot.ObjectSchema<{
|
|
5
|
+
readonly database: valibot.ObjectSchema<{
|
|
6
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
7
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
8
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
readonly http: valibot.ObjectSchema<{
|
|
11
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
readonly ppg: valibot.ObjectSchema<{
|
|
14
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
17
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
18
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
19
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
type Exports = InferOutput<typeof exportsSchema>;
|
|
23
|
+
declare const serverDumpV1Schema: valibot.ObjectSchema<{
|
|
24
|
+
readonly databasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
25
|
+
readonly exports: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
26
|
+
readonly database: valibot.ObjectSchema<{
|
|
27
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
28
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
29
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
30
|
+
}, undefined>;
|
|
31
|
+
readonly http: valibot.ObjectSchema<{
|
|
32
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
readonly ppg: valibot.ObjectSchema<{
|
|
35
|
+
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
38
|
+
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
39
|
+
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
40
|
+
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
41
|
+
}, undefined>;
|
|
42
|
+
}, undefined>, undefined>;
|
|
43
|
+
readonly name: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.MinLengthAction<string, 1, undefined>]>;
|
|
44
|
+
readonly pid: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
45
|
+
readonly port: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
46
|
+
readonly shadowDatabasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
47
|
+
readonly version: valibot.LiteralSchema<"1", undefined>;
|
|
48
|
+
}, undefined>;
|
|
49
|
+
type ServerDumpV1 = InferOutput<typeof serverDumpV1Schema>;
|
|
50
|
+
interface ServerOptions {
|
|
51
|
+
/**
|
|
52
|
+
* The port the database server will listen on.
|
|
53
|
+
*
|
|
54
|
+
* Defaults to `51214`.
|
|
55
|
+
*
|
|
56
|
+
* An error is thrown if the port is already in use.
|
|
57
|
+
*/
|
|
58
|
+
databasePort?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to enable debug logging.
|
|
61
|
+
*
|
|
62
|
+
* Defaults to `false`.
|
|
63
|
+
*/
|
|
64
|
+
debug?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to run the server in dry run mode.
|
|
67
|
+
*
|
|
68
|
+
* Defaults to `false`.
|
|
69
|
+
*/
|
|
70
|
+
dryRun?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The name of the server.
|
|
73
|
+
*
|
|
74
|
+
* Defaults to `default`.
|
|
75
|
+
*/
|
|
76
|
+
name?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The persistence mode of the server.
|
|
79
|
+
*
|
|
80
|
+
* Default is `stateless`.
|
|
81
|
+
*/
|
|
82
|
+
persistenceMode?: PersistenceMode;
|
|
83
|
+
/**
|
|
84
|
+
* The port the server will listen on.
|
|
85
|
+
*
|
|
86
|
+
* Defaults to `51213`.
|
|
87
|
+
*
|
|
88
|
+
* An error is thrown if the port is already in use.
|
|
89
|
+
*/
|
|
90
|
+
port?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The port the shadow database server will listen on.
|
|
93
|
+
*
|
|
94
|
+
* Defaults to `51215`.
|
|
95
|
+
*
|
|
96
|
+
* An error is thrown if the port is already in use.
|
|
97
|
+
*/
|
|
98
|
+
shadowDatabasePort?: number;
|
|
99
|
+
}
|
|
100
|
+
type ResolvedServerOptions = Required<ServerOptions>;
|
|
101
|
+
type PersistenceMode = "stateless" | "stateful";
|
|
102
|
+
interface ScanOptions {
|
|
103
|
+
debug?: boolean;
|
|
104
|
+
}
|
|
105
|
+
declare const PRIVATE_INITIALIZE_SYMBOL: unique symbol;
|
|
106
|
+
declare abstract class ServerState implements ResolvedServerOptions {
|
|
107
|
+
readonly databasePort: number;
|
|
108
|
+
readonly debug: boolean;
|
|
109
|
+
readonly dryRun: boolean;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly persistenceMode: PersistenceMode;
|
|
112
|
+
readonly pid: number | undefined;
|
|
113
|
+
readonly port: number;
|
|
114
|
+
readonly shadowDatabasePort: number;
|
|
115
|
+
protected constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
116
|
+
persistenceMode: PersistenceMode;
|
|
117
|
+
pid: number | undefined;
|
|
118
|
+
});
|
|
119
|
+
static createExclusively(options: ServerOptions | undefined): Promise<ServerState>;
|
|
120
|
+
static fromServerDump(options?: Pick<ServerOptions, "debug" | "name">): Promise<StatefulServerState | null>;
|
|
121
|
+
static scan(options?: ScanOptions): Promise<ServerStatusV1[]>;
|
|
122
|
+
abstract get databaseDumpPath(): string;
|
|
123
|
+
abstract get pgliteDataDirPath(): string;
|
|
124
|
+
abstract [PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
125
|
+
abstract close(): Promise<void>;
|
|
126
|
+
abstract writeServerDump(exports?: Exports): Promise<void>;
|
|
127
|
+
}
|
|
128
|
+
declare class StatefulServerState extends ServerState {
|
|
129
|
+
#private;
|
|
130
|
+
constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
131
|
+
pid: number | undefined;
|
|
132
|
+
serverDump?: ServerDumpV1;
|
|
133
|
+
});
|
|
134
|
+
static getServerDumpPath(dataDirPath: string): string;
|
|
135
|
+
get databaseDumpPath(): string;
|
|
136
|
+
get exports(): Exports | undefined;
|
|
137
|
+
get pgliteDataDirPath(): string;
|
|
138
|
+
[PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
139
|
+
close(): Promise<void>;
|
|
140
|
+
writeServerDump(exports?: Exports): Promise<void>;
|
|
141
|
+
}
|
|
142
|
+
interface ServerStatusV1 extends ServerDumpV1 {
|
|
143
|
+
status: "running" | "starting_up" | "not_running" | "no_such_server" | "unknown" | "error";
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated use `ServerAlreadyRunningError` instead. Will be removed in a future version.
|
|
147
|
+
*/
|
|
148
|
+
declare class ServerStateAlreadyExistsError extends Error {
|
|
149
|
+
name: string;
|
|
150
|
+
constructor(name: string);
|
|
151
|
+
}
|
|
152
|
+
declare class ServerAlreadyRunningError extends ServerStateAlreadyExistsError {
|
|
153
|
+
#private;
|
|
154
|
+
name: string;
|
|
155
|
+
constructor(server: ServerState);
|
|
156
|
+
get server(): Promise<ServerState | null>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { type Exports, type PersistenceMode, type ResolvedServerOptions, type ScanOptions, ServerAlreadyRunningError, type ServerDumpV1, type ServerOptions, ServerState, ServerStateAlreadyExistsError, type ServerStatusV1 };
|
package/dist/state.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b,c}from"./chunk-LBY4H4LD.js";import"./chunk-Q3M6SQC2.js";export{c as ServerAlreadyRunningError,a as ServerState,b as ServerStateAlreadyExistsError};
|
package/package.json
CHANGED
package/dist/chunk-4M2BYKUR.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{b as c,f as O,g as $,h as E,i as R,j as _,k}from"./chunk-Q3M6SQC2.js";import{writeFile as j}from"fs/promises";import{hc as B}from"hono/client";import{join as u}from"pathe";import{check as C,lock as H}from"proper-lockfile";import{process as m}from"std-env";import{integer as T,literal as Y,minLength as Z,minValue as V,number as N,object as g,optional as f,parseJson as q,pipe as l,safeParse as z,string as b,url as K}from"valibot";import{process as U}from"std-env";function A(r,e){if(r==null)return!1;try{return U.kill?.(r,0)??!0}catch(t){return e&&console.error(`Error checking if process with PID ${r} exists:`,t),!1}}var D=l(b(),K()),M=g({connectionString:D,prismaORMConnectionString:f(D),terminalCommand:f(b())}),I=g({url:D}),P=l(N(),T(),V(1)),W=g({database:M,http:I,ppg:I,shadowDatabase:M}),G=g({databasePort:P,exports:f(W),name:l(b(),Z(1)),pid:f(l(N(),T(),V(0))),port:P,shadowDatabasePort:P,version:Y("1")}),x=Symbol("initialize"),S="default",h=class{databasePort;debug;dryRun;name;persistenceMode;pid;port;shadowDatabasePort;constructor(e){this.databasePort=e.databasePort??51214,this.debug=e.debug??!1,this.dryRun=e.dryRun??!1,this.name=e.name??S,this.persistenceMode=e.persistenceMode,this.pid=e.pid??m.pid,this.port=e.port??51213,this.shadowDatabasePort=e.shadowDatabasePort??51215}static async createExclusively(e){let t=e?.dryRun!==!0&&e?.persistenceMode!=="stateless"?new p({...e,pid:m.pid}):new y(e);return await t[x](),t}static async fromServerDump(e){let{debug:t,name:s=S}=e??{},n=c(s),a=p.getServerDumpPath(n),i=await O(a);if(i==null)return t&&console.debug(`[State] No server dump file found at: ${a}`),null;t&&(console.debug(`[State] server dump file found at "${a}":`),console.debug(i));let{issues:v,output:o,success:d}=z(l(b(),q(),G),i);if(!d)throw t&&console.debug(`[State] Invalid server dump file at "${a}":
|
|
2
|
-
${JSON.stringify(v,null,2)}`),new Error(`Invalid Prisma Dev state for "${s}".`);return new p({databasePort:o.databasePort,debug:t,dryRun:!1,name:s,pid:o.pid,port:o.port,serverDump:o,shadowDatabasePort:o.shadowDatabasePort})}static async scan(e){let{debug:t}=e??{},s=u(c(S),"..");t&&console.debug(`[State] scanning for server states in: ${s}`);let n=await E(s);return t&&console.debug(`[State] found server names: ${JSON.stringify(n)}`),await Promise.all(n.map(a=>Q(a,t)))}},y=class extends h{constructor(e){super({...e,persistenceMode:"stateless",pid:m.pid})}get databaseDumpPath(){return"<DUMP_PATH>"}get pgliteDataDirPath(){return"memory://"}async[x](){}async close(){}async writeServerDump(){}},p=class r extends h{#s;#e;#a;#o;#t;#r=null;constructor(e){super({...e,persistenceMode:"stateful"}),this.#e=c(this.name),this.#s=u(this.#e,"db_dump.bak"),this.#a=u(this.#e,".pglite"),this.#t=e.serverDump??null,this.#o=r.getServerDumpPath(this.#e)}static getServerDumpPath(e){return u(e,"server.json")}get databaseDumpPath(){return this.#s}get exports(){return this.#t?.exports}get pgliteDataDirPath(){return this.#a}async[x](){await $(this.#e),this.debug&&console.debug(`[State] using data directory: ${this.#e}`);try{this.#r=await H(this.#e,{lockfilePath:u(this.#e,".lock")}),this.debug&&console.debug(`[State] obtained lock on: ${this.#e}`),await this.writeServerDump()}catch(e){throw e instanceof Error&&"code"in e&&e.code==="ELOCKED"?new w(this.name):e}}async close(){if(this.#r!=null)try{await this.#r(),this.#r=null,this.debug&&console.debug(`[State] released lock on: ${this.#e}`)}catch(e){throw console.error(`[State] failed to release lock on: ${this.#e}`),e}}async writeServerDump(e){this.#t={name:this.name,version:"1",pid:m.pid,port:this.port,databasePort:this.databasePort,shadowDatabasePort:this.shadowDatabasePort,exports:e},await j(this.#o,`${JSON.stringify(this.#t,null,2)}
|
|
3
|
-
`,{encoding:"utf-8"})}};async function Q(r,e){let t={databasePort:-1,exports:void 0,name:r,pid:void 0,port:-1,shadowDatabasePort:-1,version:"1"};try{let s=await h.fromServerDump({debug:e,name:r});if(!s)return e&&console.debug(`[State] no server state found for name: ${r}`),{...t,status:"no_such_server"};t.databasePort=s.databasePort,t.exports=s.exports,t.pid=s.pid,t.port=s.port,t.shadowDatabasePort=s.shadowDatabasePort;let{exports:n,pid:a}=s;if(!A(a,e))return e&&console.debug(`[State] server state for "${r}" has no running process with PID: ${a}`),{...t,status:"not_running"};let i=c(r);try{if(!await C(i,{lockfilePath:u(i,".lock")}))return e&&console.debug(`[State] server state for "${r}" is not locked, indicating it is not running.`),{...t,status:"starting_up"}}catch(L){e&&console.error(`[State] server state for "${r}" failed to check lock:`,L)}if(!n)return{...t,status:"starting_up"};let{http:v}=n,o=await B(v.url).health.$get();if(!o.ok)return e&&console.debug(`[State] server state for "${r}" is not live: ${JSON.stringify(o)}`),{...t,status:"not_running"};let d=await o.json();return d.name!==r?(e&&console.debug(`[State] server state for "${r}" has mismatched health response: ${JSON.stringify(d)}`),{...t,status:"unknown"}):(e&&console.debug(`[State] server state for "${r}" is live: ${JSON.stringify(d)}`),{...t,status:"running"})}catch(s){return e&&console.error(`[State] failed to get server status for "${r}":`,s),{...t,status:"error"}}}var w=class extends Error{name="ServerStateAlreadyExistsError";constructor(e){super(`A server with the name "${e}" is already running.`)}};export{h as a,w as b};
|
package/dist/chunk-U4KQZNBE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as l,l as m}from"./chunk-Q3M6SQC2.js";import{PGlite as b}from"@electric-sql/pglite";import{PGLiteSocketServer as P}from"@electric-sql/pglite-socket";import{filename as y}from"pathe/utils";var n={connectionLimit:1,connectTimeout:0,database:"template1",maxIdleConnectionLifetime:0,password:"postgres",poolTimeout:0,socketTimeout:0,sslMode:"disable",username:"postgres"},p=`postgres://${n.username}:${n.password}@localhost`,f=new URLSearchParams({sslmode:n.sslMode}),w=new URLSearchParams({...Object.fromEntries(f.entries()),connection_limit:String(n.connectionLimit),connect_timeout:String(n.connectTimeout),max_idle_connection_lifetime:String(n.maxIdleConnectionLifetime),pool_timeout:String(n.poolTimeout),single_use_connections:"true",socket_timeout:String(n.socketTimeout)});async function L(e,r){let c=e==="database"?r.databasePort:r.shadowDatabasePort;if(r.dryRun)return u(e,r,{db:null,port:c,server:null});let{debug:a}=r,i=await(e==="shadow_database"?v:D)(r.pgliteDataDirPath,a);a&&i.onNotification((t,o)=>{console.debug(`[${e}][${t}] ${o}`)});let d=new P({db:i,debug:a,inspect:a,port:c});a&&(d.addEventListener("listening",t=>{let{detail:o}=t;console.debug(`[${e}] server listening on ${JSON.stringify(o)}`)}),d.addEventListener("connection",t=>{let{clientAddress:o,clientPort:S}=t.detail;console.debug(`[${e}] client connected from ${o}:${S}`)}),d.addEventListener("error",t=>{let{detail:o}=t;console.error(`[${e}] server error:`,o)}));try{await d.start()}catch(t){throw t instanceof Error&&"code"in t&&t.code==="EADDRINUSE"?new m(c,e):t}return u(e,r,{db:i,port:c,server:d})}function u(e,r,c){let{debug:a}=r,{db:s,port:i,server:d}=c||{};return a&&console.debug(`[${e}] server started on port ${i}`),{...n,close:async()=>{let t=[];try{await d?.stop(),a&&console.debug(`[${e}] server stopped on port ${i}`)}catch(o){console.error(`[${e}] server stop error`,o),t.push(o)}if(e==="database")try{await s?.syncToFs(),a&&console.debug(`[${e}] synced to filesystem`)}catch(o){console.error(`[${e}] sync error`,o),t.push(o)}try{await s?.close(),a&&console.debug(`[${e}] closed`)}catch(o){console.error(`[${e}] close error`,o),t.push(o)}if(t.length>0)throw new AggregateError(t,`Failed to close ${e} properly`)},connectionString:g(i,f),dump:async t=>{e==="shadow_database"||!s||await $({db:s,debug:a,destinationPath:t})},port:i,prismaORMConnectionString:g(i,w),terminalCommand:`PGPASSWORD=${n.password} PGSSLMODE=${n.sslMode} psql -h localhost -p ${i} -U ${n.username} -d ${n.database}`}}function g(e,r){return`${p}:${e}/${n.database}?${r.toString()}`}async function D(e,r){return await b.create({database:n.database,dataDir:e,debug:r?5:void 0,relaxedDurability:!1,username:n.username})}async function v(e,r){return await b.create({database:n.database,dataDir:"memory://",debug:r?5:void 0,relaxedDurability:!1,username:n.username})}async function $(e){let{dataDir:r,db:c,debug:a,destinationPath:s}=e,i=c||await D(r,a),{pgDump:d}=await import("@electric-sql/pglite-tools/pg_dump"),t=await d({args:["--schema-only"],fileName:s?y(s):void 0,pg:await i.clone()});return s?(a&&console.debug(`[DB] Dumping database to ${s}`),await l(t,s)):(a&&console.debug("[DB] Dumping database to memory"),await t.text())}export{L as a,$ as b};
|
package/dist/db-B1_DGnTu.d.cts
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { PGlite } from '@electric-sql/pglite';
|
|
2
|
-
import * as valibot from 'valibot';
|
|
3
|
-
import { InferOutput } from 'valibot';
|
|
4
|
-
|
|
5
|
-
declare const DEFAULT_DATABASE_PORT = 51214;
|
|
6
|
-
declare const DEFAULT_SERVER_PORT = 51213;
|
|
7
|
-
declare const DEFAULT_SHADOW_DATABASE_PORT = 51215;
|
|
8
|
-
type PortAssignableService = DBServerPurpose | "server";
|
|
9
|
-
declare class PortNotAvailableError extends Error {
|
|
10
|
-
port: number;
|
|
11
|
-
service: PortAssignableService;
|
|
12
|
-
name: string;
|
|
13
|
-
constructor(port: number, service: PortAssignableService);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface Server extends Exports {
|
|
17
|
-
close(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
declare function unstable_startServer(options?: ServerOptions): Promise<Server>;
|
|
20
|
-
|
|
21
|
-
declare const exportsSchema: valibot.ObjectSchema<{
|
|
22
|
-
readonly database: valibot.ObjectSchema<{
|
|
23
|
-
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
24
|
-
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
25
|
-
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
26
|
-
}, undefined>;
|
|
27
|
-
readonly http: valibot.ObjectSchema<{
|
|
28
|
-
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
29
|
-
}, undefined>;
|
|
30
|
-
readonly ppg: valibot.ObjectSchema<{
|
|
31
|
-
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
32
|
-
}, undefined>;
|
|
33
|
-
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
34
|
-
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
35
|
-
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
36
|
-
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
37
|
-
}, undefined>;
|
|
38
|
-
}, undefined>;
|
|
39
|
-
type Exports = InferOutput<typeof exportsSchema>;
|
|
40
|
-
declare const serverDumpV1Schema: valibot.ObjectSchema<{
|
|
41
|
-
readonly databasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
42
|
-
readonly exports: valibot.OptionalSchema<valibot.ObjectSchema<{
|
|
43
|
-
readonly database: valibot.ObjectSchema<{
|
|
44
|
-
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
45
|
-
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
46
|
-
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
47
|
-
}, undefined>;
|
|
48
|
-
readonly http: valibot.ObjectSchema<{
|
|
49
|
-
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
50
|
-
}, undefined>;
|
|
51
|
-
readonly ppg: valibot.ObjectSchema<{
|
|
52
|
-
readonly url: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
53
|
-
}, undefined>;
|
|
54
|
-
readonly shadowDatabase: valibot.ObjectSchema<{
|
|
55
|
-
readonly connectionString: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>;
|
|
56
|
-
readonly prismaORMConnectionString: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.UrlAction<string, undefined>]>, undefined>;
|
|
57
|
-
readonly terminalCommand: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
|
|
58
|
-
}, undefined>;
|
|
59
|
-
}, undefined>, undefined>;
|
|
60
|
-
readonly name: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.MinLengthAction<string, 1, undefined>]>;
|
|
61
|
-
readonly pid: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
62
|
-
readonly port: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
63
|
-
readonly shadowDatabasePort: valibot.SchemaWithPipe<readonly [valibot.NumberSchema<undefined>, valibot.IntegerAction<number, undefined>, valibot.MinValueAction<number, 1, undefined>]>;
|
|
64
|
-
readonly version: valibot.LiteralSchema<"1", undefined>;
|
|
65
|
-
}, undefined>;
|
|
66
|
-
type ServerDumpV1 = InferOutput<typeof serverDumpV1Schema>;
|
|
67
|
-
interface ServerOptions {
|
|
68
|
-
/**
|
|
69
|
-
* The port the database server will listen on.
|
|
70
|
-
*
|
|
71
|
-
* Defaults to `51214`.
|
|
72
|
-
*
|
|
73
|
-
* An error is thrown if the port is already in use.
|
|
74
|
-
*/
|
|
75
|
-
databasePort?: number;
|
|
76
|
-
/**
|
|
77
|
-
* Whether to enable debug logging.
|
|
78
|
-
*
|
|
79
|
-
* Defaults to `false`.
|
|
80
|
-
*/
|
|
81
|
-
debug?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Whether to run the server in dry run mode.
|
|
84
|
-
*
|
|
85
|
-
* Defaults to `false`.
|
|
86
|
-
*/
|
|
87
|
-
dryRun?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* The name of the server.
|
|
90
|
-
*
|
|
91
|
-
* Defaults to `default`.
|
|
92
|
-
*/
|
|
93
|
-
name?: string;
|
|
94
|
-
/**
|
|
95
|
-
* The persistence mode of the server.
|
|
96
|
-
*
|
|
97
|
-
* Default is `stateless`.
|
|
98
|
-
*/
|
|
99
|
-
persistenceMode?: PersistenceMode;
|
|
100
|
-
/**
|
|
101
|
-
* The port the server will listen on.
|
|
102
|
-
*
|
|
103
|
-
* Defaults to `51213`.
|
|
104
|
-
*
|
|
105
|
-
* An error is thrown if the port is already in use.
|
|
106
|
-
*/
|
|
107
|
-
port?: number;
|
|
108
|
-
/**
|
|
109
|
-
* The port the shadow database server will listen on.
|
|
110
|
-
*
|
|
111
|
-
* Defaults to `51215`.
|
|
112
|
-
*
|
|
113
|
-
* An error is thrown if the port is already in use.
|
|
114
|
-
*/
|
|
115
|
-
shadowDatabasePort?: number;
|
|
116
|
-
}
|
|
117
|
-
type ResolvedServerOptions = Required<ServerOptions>;
|
|
118
|
-
type PersistenceMode = "stateless" | "stateful";
|
|
119
|
-
interface ScanOptions {
|
|
120
|
-
debug?: boolean;
|
|
121
|
-
}
|
|
122
|
-
declare const PRIVATE_INITIALIZE_SYMBOL: unique symbol;
|
|
123
|
-
declare abstract class ServerState implements ResolvedServerOptions {
|
|
124
|
-
readonly databasePort: number;
|
|
125
|
-
readonly debug: boolean;
|
|
126
|
-
readonly dryRun: boolean;
|
|
127
|
-
readonly name: string;
|
|
128
|
-
readonly persistenceMode: PersistenceMode;
|
|
129
|
-
readonly pid: number | undefined;
|
|
130
|
-
readonly port: number;
|
|
131
|
-
readonly shadowDatabasePort: number;
|
|
132
|
-
protected constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
133
|
-
persistenceMode: PersistenceMode;
|
|
134
|
-
pid: number | undefined;
|
|
135
|
-
});
|
|
136
|
-
static createExclusively(options: ServerOptions | undefined): Promise<ServerState>;
|
|
137
|
-
static fromServerDump(options?: Pick<ServerOptions, "debug" | "name">): Promise<StatefulServerState | null>;
|
|
138
|
-
static scan(options?: ScanOptions): Promise<ServerStatusV1[]>;
|
|
139
|
-
abstract get databaseDumpPath(): string;
|
|
140
|
-
abstract get pgliteDataDirPath(): string;
|
|
141
|
-
abstract [PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
142
|
-
abstract close(): Promise<void>;
|
|
143
|
-
abstract writeServerDump(exports?: Omit<Server, "close">): Promise<void>;
|
|
144
|
-
}
|
|
145
|
-
declare class StatefulServerState extends ServerState {
|
|
146
|
-
#private;
|
|
147
|
-
constructor(options: Omit<ServerOptions, "persistenceMode"> & {
|
|
148
|
-
pid: number | undefined;
|
|
149
|
-
serverDump?: ServerDumpV1;
|
|
150
|
-
});
|
|
151
|
-
static getServerDumpPath(dataDirPath: string): string;
|
|
152
|
-
get databaseDumpPath(): string;
|
|
153
|
-
get exports(): Exports | undefined;
|
|
154
|
-
get pgliteDataDirPath(): string;
|
|
155
|
-
[PRIVATE_INITIALIZE_SYMBOL](): Promise<void>;
|
|
156
|
-
close(): Promise<void>;
|
|
157
|
-
writeServerDump(exports?: Exports): Promise<void>;
|
|
158
|
-
}
|
|
159
|
-
interface ServerStatusV1 extends ServerDumpV1 {
|
|
160
|
-
status: "running" | "starting_up" | "not_running" | "no_such_server" | "unknown" | "error";
|
|
161
|
-
}
|
|
162
|
-
declare class ServerStateAlreadyExistsError extends Error {
|
|
163
|
-
name: string;
|
|
164
|
-
constructor(name: string);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
interface DBServer {
|
|
168
|
-
close(): Promise<void>;
|
|
169
|
-
readonly connectionLimit: number;
|
|
170
|
-
readonly connectionString: string;
|
|
171
|
-
readonly connectTimeout: number;
|
|
172
|
-
readonly database: string;
|
|
173
|
-
dump(destinationPath: string): Promise<void>;
|
|
174
|
-
readonly maxIdleConnectionLifetime: number;
|
|
175
|
-
readonly password: string;
|
|
176
|
-
readonly poolTimeout: number;
|
|
177
|
-
readonly port: number;
|
|
178
|
-
readonly prismaORMConnectionString: string;
|
|
179
|
-
readonly socketTimeout: number;
|
|
180
|
-
readonly sslMode: string;
|
|
181
|
-
readonly terminalCommand: string;
|
|
182
|
-
readonly username: string;
|
|
183
|
-
}
|
|
184
|
-
interface DBDump {
|
|
185
|
-
dumpPath: string;
|
|
186
|
-
}
|
|
187
|
-
type DBServerPurpose = "database" | "shadow_database";
|
|
188
|
-
declare function startDBServer(purpose: DBServerPurpose, serverState: ServerState): Promise<DBServer>;
|
|
189
|
-
type DumpDBOptions<D extends string> = {
|
|
190
|
-
dataDir: string;
|
|
191
|
-
db?: never;
|
|
192
|
-
debug?: boolean;
|
|
193
|
-
destinationPath?: D;
|
|
194
|
-
} | {
|
|
195
|
-
dataDir?: never;
|
|
196
|
-
db: PGlite;
|
|
197
|
-
debug?: boolean;
|
|
198
|
-
destinationPath?: D;
|
|
199
|
-
};
|
|
200
|
-
declare function dumpDB<D extends string = never>(options: DumpDBOptions<D>): Promise<[D] extends [never] ? string : void>;
|
|
201
|
-
|
|
202
|
-
export { DEFAULT_DATABASE_PORT as D, type Exports as E, type PortAssignableService as P, type ResolvedServerOptions as R, type ServerOptions as S, type Server as a, DEFAULT_SERVER_PORT as b, DEFAULT_SHADOW_DATABASE_PORT as c, PortNotAvailableError as d, type ServerDumpV1 as e, type PersistenceMode as f, type ScanOptions as g, ServerState as h, type ServerStatusV1 as i, ServerStateAlreadyExistsError as j, type DBServer as k, type DBDump as l, type DBServerPurpose as m, type DumpDBOptions as n, dumpDB as o, startDBServer as s, unstable_startServer as u };
|