@flowblade/sqlduck 0.17.6 → 0.18.1

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.
@@ -15,7 +15,8 @@ const duckConnectionsOptions = {
15
15
  "CBC",
16
16
  "CTR",
17
17
  "GCM"
18
- ]
18
+ ],
19
+ recoveryMode: ["no_wal_writes"]
19
20
  };
20
21
  //#endregion
21
22
  //#region src/validation/core/duck-reserved-keywords.ts
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as DuckConnectionParams } from "./types-dnhcognF.mjs";
1
+ import { n as DuckConnectionParams } from "./types-BIe-pGY0.mjs";
2
2
  import { DuckDBConnection, DuckDBType } from "@duckdb/node-api";
3
3
  import * as _$_logtape_logtape0 from "@logtape/logtape";
4
4
  import { Logger } from "@logtape/logtape";
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as duckReservedKeywords } from "./duck-reserved-keywords-B8XUjnaY.mjs";
2
- import { c as duckValidatorsZod, r as assertValidAliasName, s as duckConnectionParamsZodSchema } from "./zod-CVF6XJKu.mjs";
1
+ import { t as duckReservedKeywords } from "./duck-reserved-keywords-B00l2sbi.mjs";
2
+ import { c as duckValidatorsZod, r as assertValidAliasName, s as duckConnectionParamsZodSchema } from "./zod-BXgMoCLM.mjs";
3
3
  import { BIGINT, BOOLEAN, DOUBLE, DuckDBDataChunk, DuckDBInstanceCache, DuckDBTimestampMillisecondsValue, DuckDBTypeId, ENUM, FLOAT, HUGEINT, INTEGER, SMALLINT, TIMESTAMP, TIMESTAMP_MS, TINYINT, UBIGINT, UHUGEINT, UINTEGER, USMALLINT, UTINYINT, UUID, VARCHAR } from "@duckdb/node-api";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import fs from "node:fs";
@@ -22,6 +22,9 @@ declare const duckAllConnectionOptionsZodSchema: z.ZodObject<{
22
22
  CTR: "CTR";
23
23
  GCM: "GCM";
24
24
  }>>;
25
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
26
+ no_wal_writes: "no_wal_writes";
27
+ }>>;
25
28
  }, z.core.$strict>;
26
29
  declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
30
  type: z.ZodLiteral<"memory">;
@@ -47,6 +50,9 @@ declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
47
50
  CTR: "CTR";
48
51
  GCM: "GCM";
49
52
  }>>;
53
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
54
+ no_wal_writes: "no_wal_writes";
55
+ }>>;
50
56
  }, z.core.$strict>>;
51
57
  }, z.core.$strict>, z.ZodObject<{
52
58
  type: z.ZodLiteral<"filesystem">;
@@ -73,6 +79,9 @@ declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
73
79
  CTR: "CTR";
74
80
  GCM: "GCM";
75
81
  }>>;
82
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
83
+ no_wal_writes: "no_wal_writes";
84
+ }>>;
76
85
  }, z.core.$strict>>;
77
86
  }, z.core.$strict>], "type">;
78
87
  type DuckConnectionParamsZodSchema = z.infer<typeof duckConnectionParamsZodSchema>;
@@ -10,6 +10,7 @@ declare const duckAllConnectionOptionsValibotSchema: v.ObjectSchema<{
10
10
  readonly storageVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "v", undefined>, v.RegexAction<string, undefined>]>, undefined>;
11
11
  readonly encryptionKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 8, undefined>]>, undefined>;
12
12
  readonly encryptionCipher: v.OptionalSchema<v.PicklistSchema<readonly ["CBC", "CTR", "GCM"], undefined>, undefined>;
13
+ readonly recoveryMode: v.OptionalSchema<v.PicklistSchema<readonly ["no_wal_writes"], undefined>, undefined>;
13
14
  }, undefined>;
14
15
  type DuckAllConnectionOptionsValibotSchema = v.InferOutput<typeof duckAllConnectionOptionsValibotSchema>;
15
16
  declare const duckConnectionParamsValibotSchema: v.VariantSchema<"type", [v.ObjectSchema<{
@@ -24,6 +25,7 @@ declare const duckConnectionParamsValibotSchema: v.VariantSchema<"type", [v.Obje
24
25
  readonly storageVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "v", undefined>, v.RegexAction<string, undefined>]>, undefined>;
25
26
  readonly encryptionKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 8, undefined>]>, undefined>;
26
27
  readonly encryptionCipher: v.OptionalSchema<v.PicklistSchema<readonly ["CBC", "CTR", "GCM"], undefined>, undefined>;
28
+ readonly recoveryMode: v.OptionalSchema<v.PicklistSchema<readonly ["no_wal_writes"], undefined>, undefined>;
27
29
  }, undefined>, undefined>;
28
30
  }, undefined>, v.ObjectSchema<{
29
31
  readonly type: v.LiteralSchema<"filesystem", undefined>;
@@ -38,6 +40,7 @@ declare const duckConnectionParamsValibotSchema: v.VariantSchema<"type", [v.Obje
38
40
  readonly storageVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "v", undefined>, v.RegexAction<string, undefined>]>, undefined>;
39
41
  readonly encryptionKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 8, undefined>]>, undefined>;
40
42
  readonly encryptionCipher: v.OptionalSchema<v.PicklistSchema<readonly ["CBC", "CTR", "GCM"], undefined>, undefined>;
43
+ readonly recoveryMode: v.OptionalSchema<v.PicklistSchema<readonly ["no_wal_writes"], undefined>, undefined>;
41
44
  }, undefined>, undefined>;
42
45
  }, undefined>], undefined>;
43
46
  //#endregion
@@ -54,6 +57,7 @@ declare const duckDsnValibotSchema: v.SchemaWithPipe<readonly [v.StringSchema<un
54
57
  storageVersion?: string | undefined;
55
58
  encryptionKey?: string | undefined;
56
59
  encryptionCipher?: "CBC" | "CTR" | "GCM" | undefined;
60
+ recoveryMode?: "no_wal_writes" | undefined;
57
61
  } | undefined;
58
62
  } | {
59
63
  type: "filesystem";
@@ -68,6 +72,7 @@ declare const duckDsnValibotSchema: v.SchemaWithPipe<readonly [v.StringSchema<un
68
72
  storageVersion?: string | undefined;
69
73
  encryptionKey?: string | undefined;
70
74
  encryptionCipher?: "CBC" | "CTR" | "GCM" | undefined;
75
+ recoveryMode?: "no_wal_writes" | undefined;
71
76
  } | undefined;
72
77
  }>, v.VariantSchema<"type", [v.ObjectSchema<{
73
78
  readonly type: v.LiteralSchema<"memory", undefined>;
@@ -81,6 +86,7 @@ declare const duckDsnValibotSchema: v.SchemaWithPipe<readonly [v.StringSchema<un
81
86
  readonly storageVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "v", undefined>, v.RegexAction<string, undefined>]>, undefined>;
82
87
  readonly encryptionKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 8, undefined>]>, undefined>;
83
88
  readonly encryptionCipher: v.OptionalSchema<v.PicklistSchema<readonly ["CBC", "CTR", "GCM"], undefined>, undefined>;
89
+ readonly recoveryMode: v.OptionalSchema<v.PicklistSchema<readonly ["no_wal_writes"], undefined>, undefined>;
84
90
  }, undefined>, undefined>;
85
91
  }, undefined>, v.ObjectSchema<{
86
92
  readonly type: v.LiteralSchema<"filesystem", undefined>;
@@ -95,6 +101,7 @@ declare const duckDsnValibotSchema: v.SchemaWithPipe<readonly [v.StringSchema<un
95
101
  readonly storageVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "v", undefined>, v.RegexAction<string, undefined>]>, undefined>;
96
102
  readonly encryptionKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 8, undefined>]>, undefined>;
97
103
  readonly encryptionCipher: v.OptionalSchema<v.PicklistSchema<readonly ["CBC", "CTR", "GCM"], undefined>, undefined>;
104
+ readonly recoveryMode: v.OptionalSchema<v.PicklistSchema<readonly ["no_wal_writes"], undefined>, undefined>;
98
105
  }, undefined>, undefined>;
99
106
  }, undefined>], undefined>]>;
100
107
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as duckStorageVersionRegexp, i as duckIdentifierNameRegex, n as duckdbReservedKeywordsSet, r as duckConnectionsOptions } from "../../duck-reserved-keywords-B8XUjnaY.mjs";
1
+ import { a as duckStorageVersionRegexp, i as duckIdentifierNameRegex, n as duckdbReservedKeywordsSet, r as duckConnectionsOptions } from "../../duck-reserved-keywords-B00l2sbi.mjs";
2
2
  import isSafeFilename from "is-safe-filename";
3
3
  import { parseDsn, parseDsnOrThrow } from "@httpx/dsn-parser";
4
4
  import * as v from "valibot";
@@ -37,7 +37,8 @@ const duckAllConnectionOptionsValibotSchema = v.object({
37
37
  rowGroupSize: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),
38
38
  storageVersion: v.optional(v.pipe(v.string(), v.startsWith("v"), v.regex(duckStorageVersionRegexp))),
39
39
  encryptionKey: v.optional(v.pipe(v.string(), v.minLength(8))),
40
- encryptionCipher: v.optional(v.picklist(duckConnectionsOptions.encryptionCiphers))
40
+ encryptionCipher: v.optional(v.picklist(duckConnectionsOptions.encryptionCiphers)),
41
+ recoveryMode: v.optional(v.picklist(duckConnectionsOptions.recoveryMode))
41
42
  });
42
43
  const duckConnectionParamsValibotSchema = v.variant("type", [v.object({
43
44
  type: v.literal("memory"),
@@ -1,4 +1,4 @@
1
- import { a as duckAllConnectionOptionsZodSchema, i as DuckTableName, o as duckConnectionParamsZodSchema, r as DuckSchemaName, t as DuckAliasName } from "../../types-dnhcognF.mjs";
1
+ import { a as duckAllConnectionOptionsZodSchema, i as DuckTableName, o as duckConnectionParamsZodSchema, r as DuckSchemaName, t as DuckAliasName } from "../../types-BIe-pGY0.mjs";
2
2
  import * as z from "zod";
3
3
 
4
4
  //#region src/validation/zod/duck-asserts-zod.d.ts
@@ -19,6 +19,7 @@ declare const duckDsnZodSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<
19
19
  storageVersion?: string | undefined;
20
20
  encryptionKey?: string | undefined;
21
21
  encryptionCipher?: "CBC" | "CTR" | "GCM" | undefined;
22
+ recoveryMode?: "no_wal_writes" | undefined;
22
23
  } | undefined;
23
24
  } | {
24
25
  type: "filesystem";
@@ -33,6 +34,7 @@ declare const duckDsnZodSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<
33
34
  storageVersion?: string | undefined;
34
35
  encryptionKey?: string | undefined;
35
36
  encryptionCipher?: "CBC" | "CTR" | "GCM" | undefined;
37
+ recoveryMode?: "no_wal_writes" | undefined;
36
38
  } | undefined;
37
39
  }, string>>, z.ZodDiscriminatedUnion<[z.ZodObject<{
38
40
  type: z.ZodLiteral<"memory">;
@@ -58,6 +60,9 @@ declare const duckDsnZodSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<
58
60
  CTR: "CTR";
59
61
  GCM: "GCM";
60
62
  }>>;
63
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
64
+ no_wal_writes: "no_wal_writes";
65
+ }>>;
61
66
  }, z.core.$strict>>;
62
67
  }, z.core.$strict>, z.ZodObject<{
63
68
  type: z.ZodLiteral<"filesystem">;
@@ -84,6 +89,9 @@ declare const duckDsnZodSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<
84
89
  CTR: "CTR";
85
90
  GCM: "GCM";
86
91
  }>>;
92
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
93
+ no_wal_writes: "no_wal_writes";
94
+ }>>;
87
95
  }, z.core.$strict>>;
88
96
  }, z.core.$strict>], "type">>;
89
97
  //#endregion
@@ -1,2 +1,2 @@
1
- import { a as assertValidTableName, c as duckValidatorsZod, i as assertValidSchemaName, n as duckDsnZodSchema, o as duckAllConnectionOptionsZodSchema, r as assertValidAliasName, s as duckConnectionParamsZodSchema, t as ensureZodTableSchema } from "../../zod-CVF6XJKu.mjs";
1
+ import { a as assertValidTableName, c as duckValidatorsZod, i as assertValidSchemaName, n as duckDsnZodSchema, o as duckAllConnectionOptionsZodSchema, r as assertValidAliasName, s as duckConnectionParamsZodSchema, t as ensureZodTableSchema } from "../../zod-BXgMoCLM.mjs";
2
2
  export { assertValidAliasName, assertValidSchemaName, assertValidTableName, duckAllConnectionOptionsZodSchema, duckConnectionParamsZodSchema, duckDsnZodSchema, duckValidatorsZod, ensureZodTableSchema };
@@ -1,4 +1,4 @@
1
- import { a as duckStorageVersionRegexp, i as duckIdentifierNameRegex, n as duckdbReservedKeywordsSet, r as duckConnectionsOptions } from "./duck-reserved-keywords-B8XUjnaY.mjs";
1
+ import { a as duckStorageVersionRegexp, i as duckIdentifierNameRegex, n as duckdbReservedKeywordsSet, r as duckConnectionsOptions } from "./duck-reserved-keywords-B00l2sbi.mjs";
2
2
  import isSafeFilename from "is-safe-filename";
3
3
  import * as z from "zod";
4
4
  import { parseDsn } from "@httpx/dsn-parser";
@@ -39,7 +39,8 @@ const duckAllConnectionOptionsZodSchema = z.strictObject({
39
39
  rowGroupSize: z.optional(z.int32().positive()),
40
40
  storageVersion: z.optional(z.string().startsWith("v").regex(duckStorageVersionRegexp)),
41
41
  encryptionKey: z.optional(z.string().min(8)),
42
- encryptionCipher: z.optional(z.enum(duckConnectionsOptions.encryptionCiphers))
42
+ encryptionCipher: z.optional(z.enum(duckConnectionsOptions.encryptionCiphers)),
43
+ recoveryMode: z.optional(z.enum(duckConnectionsOptions.recoveryMode))
43
44
  });
44
45
  const duckConnectionParamsZodSchema = z.discriminatedUnion("type", [z.strictObject({
45
46
  type: z.literal("memory"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowblade/sqlduck",
3
- "version": "0.17.6",
3
+ "version": "0.18.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -65,7 +65,7 @@
65
65
  "@logtape/logtape": "^2.1.0",
66
66
  "@standard-schema/spec": "^1.1.0",
67
67
  "is-safe-filename": "0.1.1",
68
- "p-queue": "^9.2.0",
68
+ "p-queue": "^9.3.0",
69
69
  "zod": "^4.4.3"
70
70
  },
71
71
  "peerDependencies": {
@@ -92,7 +92,7 @@
92
92
  "@types/node": "25.8.0",
93
93
  "@typescript-eslint/eslint-plugin": "8.59.3",
94
94
  "@typescript-eslint/parser": "8.59.3",
95
- "@typescript/native-preview": "7.0.0-dev.20260515.1",
95
+ "@typescript/native-preview": "7.0.0-dev.20260516.1",
96
96
  "@vitest/coverage-v8": "4.1.6",
97
97
  "@vitest/ui": "4.1.6",
98
98
  "ansis": "4.3.0",