@flowblade/sqlduck 0.17.5 → 0.18.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.
@@ -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-Lenzdtjw.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-BFEOtdnz.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,10 @@ declare const duckAllConnectionOptionsZodSchema: z.ZodObject<{
22
22
  CTR: "CTR";
23
23
  GCM: "GCM";
24
24
  }>>;
25
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
26
+ READ_ONLY: "READ_ONLY";
27
+ READ_WRITE: "READ_WRITE";
28
+ }>>;
25
29
  }, z.core.$strict>;
26
30
  declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
31
  type: z.ZodLiteral<"memory">;
@@ -47,6 +51,10 @@ declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
47
51
  CTR: "CTR";
48
52
  GCM: "GCM";
49
53
  }>>;
54
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
55
+ READ_ONLY: "READ_ONLY";
56
+ READ_WRITE: "READ_WRITE";
57
+ }>>;
50
58
  }, z.core.$strict>>;
51
59
  }, z.core.$strict>, z.ZodObject<{
52
60
  type: z.ZodLiteral<"filesystem">;
@@ -73,6 +81,10 @@ declare const duckConnectionParamsZodSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
73
81
  CTR: "CTR";
74
82
  GCM: "GCM";
75
83
  }>>;
84
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
85
+ READ_ONLY: "READ_ONLY";
86
+ READ_WRITE: "READ_WRITE";
87
+ }>>;
76
88
  }, z.core.$strict>>;
77
89
  }, z.core.$strict>], "type">;
78
90
  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 ["READ_ONLY", "READ_WRITE"], 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 ["READ_ONLY", "READ_WRITE"], 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 ["READ_ONLY", "READ_WRITE"], 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?: "READ_ONLY" | "READ_WRITE" | 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?: "READ_ONLY" | "READ_WRITE" | 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 ["READ_ONLY", "READ_WRITE"], 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 ["READ_ONLY", "READ_WRITE"], 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.accessModes))
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-Lenzdtjw.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?: "READ_ONLY" | "READ_WRITE" | 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?: "READ_ONLY" | "READ_WRITE" | undefined;
36
38
  } | undefined;
37
39
  }, string>>, z.ZodDiscriminatedUnion<[z.ZodObject<{
38
40
  type: z.ZodLiteral<"memory">;
@@ -58,6 +60,10 @@ 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
+ READ_ONLY: "READ_ONLY";
65
+ READ_WRITE: "READ_WRITE";
66
+ }>>;
61
67
  }, z.core.$strict>>;
62
68
  }, z.core.$strict>, z.ZodObject<{
63
69
  type: z.ZodLiteral<"filesystem">;
@@ -84,6 +90,10 @@ declare const duckDsnZodSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<
84
90
  CTR: "CTR";
85
91
  GCM: "GCM";
86
92
  }>>;
93
+ recoveryMode: z.ZodOptional<z.ZodEnum<{
94
+ READ_ONLY: "READ_ONLY";
95
+ READ_WRITE: "READ_WRITE";
96
+ }>>;
87
97
  }, z.core.$strict>>;
88
98
  }, z.core.$strict>], "type">>;
89
99
  //#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-BFEOtdnz.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.accessModes))
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.5",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -57,15 +57,15 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@flowblade/core": "^0.2.29",
60
- "@flowblade/source-duckdb": "^0.20.7",
60
+ "@flowblade/source-duckdb": "^0.20.8",
61
61
  "@flowblade/sql-tag": "^0.3.4",
62
- "@httpx/assert": "^0.17.0",
63
- "@httpx/dsn-parser": "^1.9.10",
64
- "@httpx/plain-object": "^2.1.10",
65
- "@logtape/logtape": "^2.0.7",
62
+ "@httpx/assert": "^0.17.1",
63
+ "@httpx/dsn-parser": "^1.9.11",
64
+ "@httpx/plain-object": "^2.1.11",
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": {
@@ -79,23 +79,23 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@belgattitude/eslint-config-bases": "8.15.0",
82
- "@dotenvx/dotenvx": "1.65.0",
82
+ "@dotenvx/dotenvx": "1.66.0",
83
83
  "@duckdb/node-api": "1.5.2-r.1",
84
84
  "@faker-js/faker": "10.4.0",
85
- "@flowblade/source-kysely": "^1.3.5",
86
- "@httpx/assert": "0.17.0",
85
+ "@flowblade/source-kysely": "^1.4.1",
86
+ "@httpx/assert": "0.17.1",
87
87
  "@mitata/counters": "0.0.8",
88
88
  "@size-limit/esbuild": "12.1.0",
89
89
  "@size-limit/file": "12.1.0",
90
90
  "@testcontainers/mssqlserver": "11.14.0",
91
91
  "@total-typescript/ts-reset": "0.6.1",
92
- "@types/node": "25.6.0",
93
- "@typescript-eslint/eslint-plugin": "8.59.2",
94
- "@typescript-eslint/parser": "8.59.2",
95
- "@typescript/native-preview": "7.0.0-dev.20260505.1",
96
- "@vitest/coverage-v8": "4.1.5",
97
- "@vitest/ui": "4.1.5",
98
- "ansis": "4.2.0",
92
+ "@types/node": "25.8.0",
93
+ "@typescript-eslint/eslint-plugin": "8.59.3",
94
+ "@typescript-eslint/parser": "8.59.3",
95
+ "@typescript/native-preview": "7.0.0-dev.20260516.1",
96
+ "@vitest/coverage-v8": "4.1.6",
97
+ "@vitest/ui": "4.1.6",
98
+ "ansis": "4.3.0",
99
99
  "browserslist-to-esbuild": "2.1.1",
100
100
  "core-js": "3.49.0",
101
101
  "cross-env": "10.1.0",
@@ -105,25 +105,25 @@
105
105
  "eslint": "8.57.1",
106
106
  "execa": "9.6.1",
107
107
  "is-in-ci": "2.0.0",
108
- "kysely": "0.28.17",
108
+ "kysely": "0.29.2",
109
109
  "mitata": "1.0.34",
110
110
  "npm-run-all2": "8.0.4",
111
111
  "prettier": "3.8.3",
112
- "publint": "0.3.19",
112
+ "publint": "0.3.21",
113
113
  "regexp.escape": "2.0.1",
114
114
  "rimraf": "6.1.3",
115
115
  "size-limit": "12.1.0",
116
- "sql-formatter": "15.7.3",
116
+ "sql-formatter": "15.7.4",
117
117
  "tarn": "3.0.2",
118
118
  "tedious": "19.2.1",
119
119
  "testcontainers": "11.14.0",
120
120
  "tsdown": "0.22.0",
121
- "tsx": "4.21.0",
121
+ "tsx": "4.22.0",
122
122
  "typedoc": "0.28.19",
123
123
  "typedoc-plugin-markdown": "4.11.0",
124
124
  "typescript": "6.0.3",
125
125
  "valibot": "1.4.0",
126
- "vitest": "4.1.5"
126
+ "vitest": "4.1.6"
127
127
  },
128
128
  "files": [
129
129
  "dist"