@flowblade/sqlduck 0.17.6 → 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.
- package/dist/{duck-reserved-keywords-B8XUjnaY.mjs → duck-reserved-keywords-B00l2sbi.mjs} +2 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{types-dnhcognF.d.mts → types-Lenzdtjw.d.mts} +12 -0
- package/dist/validation/valibot/index.d.mts +7 -0
- package/dist/validation/valibot/index.mjs +3 -2
- package/dist/validation/zod/index.d.mts +11 -1
- package/dist/validation/zod/index.mjs +1 -1
- package/dist/{zod-CVF6XJKu.mjs → zod-BFEOtdnz.mjs} +3 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DuckConnectionParams } from "./types-
|
|
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-
|
|
2
|
-
import { c as duckValidatorsZod, r as assertValidAliasName, s as duckConnectionParamsZodSchema } from "./zod-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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.
|
|
3
|
+
"version": "0.18.0",
|
|
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.
|
|
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.
|
|
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",
|