nitro-drizzle 0.3.0-beta.1 → 0.3.0-beta.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.
|
@@ -16,15 +16,6 @@ declare const _default: <TSchema extends Schema>(options: PGliteOptions, schema:
|
|
|
16
16
|
waitReady(): Promise<void>;
|
|
17
17
|
close(): Promise<void>;
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Configuration options for the PGlite driver.
|
|
21
|
-
*/
|
|
22
|
-
type Config = {
|
|
23
|
-
/** Directory path for storing database data. */
|
|
24
|
-
dataDir?: string;
|
|
25
|
-
/** Additional PGlite options. */
|
|
26
|
-
options?: PGliteOptions;
|
|
27
|
-
};
|
|
28
19
|
//#endregion
|
|
29
|
-
export {
|
|
20
|
+
export { _default as default };
|
|
30
21
|
//# sourceMappingURL=pglite.d.mts.map
|
package/dist/drivers/pglite.mjs
CHANGED
|
@@ -10,8 +10,7 @@ import { PGlite } from "@electric-sql/pglite";
|
|
|
10
10
|
* @returns A Datasource instance
|
|
11
11
|
*/
|
|
12
12
|
var pglite_default = defineDriver((options, schema) => {
|
|
13
|
-
const
|
|
14
|
-
const database = drizzle(new PGlite(dataDir, other), { schema });
|
|
13
|
+
const database = drizzle(new PGlite(options), { schema });
|
|
15
14
|
return {
|
|
16
15
|
database,
|
|
17
16
|
schema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pglite.mjs","names":[],"sources":["../../src/drivers/pglite.ts"],"sourcesContent":["import { drizzle } from \"drizzle-orm/pglite\";\nimport { PGlite, type PGliteOptions } from \"@electric-sql/pglite\";\nimport { defineDriver, type Schema } from \".\";\n\n/**\n * PGlite datasource driver for PostgreSQL in the browser.\n * @template TSchema - The schema type\n * @param options - PGlite configuration options\n * @param schema - The Drizzle schema\n * @returns A Datasource instance\n */\nexport default defineDriver(<TSchema extends Schema>(options: PGliteOptions, schema: TSchema) => {\n const
|
|
1
|
+
{"version":3,"file":"pglite.mjs","names":[],"sources":["../../src/drivers/pglite.ts"],"sourcesContent":["import { drizzle } from \"drizzle-orm/pglite\";\nimport { PGlite, type PGliteOptions } from \"@electric-sql/pglite\";\nimport { defineDriver, type Schema } from \".\";\n\n/**\n * PGlite datasource driver for PostgreSQL in the browser.\n * @template TSchema - The schema type\n * @param options - PGlite configuration options\n * @param schema - The Drizzle schema\n * @returns A Datasource instance\n */\nexport default defineDriver(<TSchema extends Schema>(options: PGliteOptions, schema: TSchema) => {\n const connector = new PGlite(options);\n const database = drizzle(connector, { schema });\n return {\n database,\n schema,\n async waitReady() {\n await database.$client.waitReady;\n },\n async close() {\n await database.$client.close();\n },\n };\n});\n"],"mappings":";;;;;;;;;;;AAWA,IAAA,iBAAe,cAAsC,SAAwB,WAAoB;CAE/F,MAAM,WAAW,QAAQ,IADH,OAAO,OACI,GAAG,EAAE,OAAO,CAAC;CAC9C,OAAO;EACL;EACA;EACA,MAAM,YAAY;GAChB,MAAM,SAAS,QAAQ;EACzB;EACA,MAAM,QAAQ;GACZ,MAAM,SAAS,QAAQ,MAAM;EAC/B;CACF;AACF,CAAC"}
|