@dexto/storage 1.6.26 → 1.7.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.
@@ -12,7 +12,7 @@ export interface BlobStoreFactory<TConfig = unknown> {
12
12
  * Zod schema for validating factory-specific configuration.
13
13
  * The schema must output the `TConfig` type.
14
14
  */
15
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
15
+ configSchema: z.ZodType<TConfig, unknown>;
16
16
  /**
17
17
  * Factory function to create a BlobStore instance.
18
18
  * @param config - Validated configuration specific to this backend
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/blob/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,OAAO,GAAG,OAAO;IAC/C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAExD;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAExE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,kEAAkE;QAClE,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACL"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/blob/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,OAAO,GAAG,OAAO;IAC/C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAExE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,kEAAkE;QAClE,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACL"}
@@ -12,15 +12,7 @@ declare const InMemoryBlobStoreSchema: z.ZodObject<{
12
12
  type: z.ZodLiteral<"in-memory">;
13
13
  maxBlobSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
14
14
  maxTotalSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
15
- }, "strict", z.ZodTypeAny, {
16
- type: "in-memory";
17
- maxBlobSize: number;
18
- maxTotalSize: number;
19
- }, {
20
- type: "in-memory";
21
- maxBlobSize?: number | undefined;
22
- maxTotalSize?: number | undefined;
23
- }>;
15
+ }, z.core.$strict>;
24
16
  export type InMemoryBlobStoreConfigInput = z.input<typeof InMemoryBlobStoreSchema>;
25
17
  export type InMemoryBlobStoreConfig = z.output<typeof InMemoryBlobStoreSchema>;
26
18
  /**
@@ -32,19 +24,7 @@ declare const LocalBlobStoreSchema: z.ZodObject<{
32
24
  maxBlobSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
33
25
  maxTotalSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
26
  cleanupAfterDays: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
- }, "strict", z.ZodTypeAny, {
36
- type: "local";
37
- maxBlobSize: number;
38
- maxTotalSize: number;
39
- storePath: string;
40
- cleanupAfterDays: number;
41
- }, {
42
- type: "local";
43
- storePath: string;
44
- maxBlobSize?: number | undefined;
45
- maxTotalSize?: number | undefined;
46
- cleanupAfterDays?: number | undefined;
47
- }>;
27
+ }, z.core.$strict>;
48
28
  export type LocalBlobStoreConfigInput = z.input<typeof LocalBlobStoreSchema>;
49
29
  export type LocalBlobStoreConfig = z.output<typeof LocalBlobStoreSchema>;
50
30
  /**
@@ -67,11 +47,7 @@ export type LocalBlobStoreConfig = z.output<typeof LocalBlobStoreSchema>;
67
47
  */
68
48
  export declare const BlobStoreConfigSchema: z.ZodObject<{
69
49
  type: z.ZodString;
70
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
71
- type: z.ZodString;
72
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
73
- type: z.ZodString;
74
- }, z.ZodTypeAny, "passthrough">>;
50
+ }, z.core.$loose>;
75
51
  /**
76
52
  * Blob store configuration type.
77
53
  *
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/blob/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,iCAAkC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;GAEG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;EAkBhB,CAAC;AAEd,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACnF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/E;;GA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CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB;;iBAKoC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GACrB,uBAAuB,GACvB,oBAAoB,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAG/C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -12,7 +12,7 @@ export interface CacheFactory<TConfig = unknown> {
12
12
  * Zod schema for validating factory-specific configuration.
13
13
  * The schema must output the `TConfig` type.
14
14
  */
15
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
15
+ configSchema: z.ZodType<TConfig, unknown>;
16
16
  /**
17
17
  * Factory function to create a Cache instance.
18
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/cache/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,OAAO,GAAG,OAAO;IAC3C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAExD;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,uDAAuD;QACvD,WAAW,EAAE,MAAM,CAAC;QACpB,8CAA8C;QAC9C,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,uDAAuD;QACvD,WAAW,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACL"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/cache/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,OAAO,GAAG,OAAO;IAC3C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE1C;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,uDAAuD;QACvD,WAAW,EAAE,MAAM,CAAC;QACpB,8CAA8C;QAC9C,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,uDAAuD;QACvD,WAAW,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACL"}
@@ -31,7 +31,7 @@ const BaseCacheSchema = import_zod.z.object({
31
31
  maxConnections: import_zod.z.number().int().positive().optional().describe("Maximum connections"),
32
32
  idleTimeoutMillis: import_zod.z.number().int().positive().optional().describe("Idle timeout in milliseconds"),
33
33
  connectionTimeoutMillis: import_zod.z.number().int().positive().optional().describe("Connection timeout in milliseconds"),
34
- options: import_zod.z.record(import_zod.z.unknown()).optional().describe("Backend-specific options")
34
+ options: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Backend-specific options")
35
35
  });
36
36
  const InMemoryCacheSchema = BaseCacheSchema.extend({
37
37
  type: import_zod.z.literal("in-memory")
@@ -6,86 +6,24 @@ export declare const InMemoryCacheSchema: z.ZodObject<{
6
6
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
7
7
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
8
8
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
- } & {
10
9
  type: z.ZodLiteral<"in-memory">;
11
- }, "strict", z.ZodTypeAny, {
12
- type: "in-memory";
13
- maxConnections?: number | undefined;
14
- idleTimeoutMillis?: number | undefined;
15
- connectionTimeoutMillis?: number | undefined;
16
- options?: Record<string, unknown> | undefined;
17
- }, {
18
- type: "in-memory";
19
- maxConnections?: number | undefined;
20
- idleTimeoutMillis?: number | undefined;
21
- connectionTimeoutMillis?: number | undefined;
22
- options?: Record<string, unknown> | undefined;
23
- }>;
10
+ }, z.core.$strict>;
24
11
  export type InMemoryCacheConfig = z.output<typeof InMemoryCacheSchema>;
25
- export declare const RedisCacheSchema: z.ZodEffects<z.ZodObject<{
12
+ export declare const RedisCacheSchema: z.ZodObject<{
26
13
  maxConnections: z.ZodOptional<z.ZodNumber>;
27
14
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
28
15
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
29
16
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
- } & {
31
17
  type: z.ZodLiteral<"redis">;
32
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
18
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
33
19
  host: z.ZodOptional<z.ZodString>;
34
20
  port: z.ZodOptional<z.ZodNumber>;
35
21
  password: z.ZodOptional<z.ZodString>;
36
22
  database: z.ZodOptional<z.ZodNumber>;
37
- }, "strict", z.ZodTypeAny, {
38
- type: "redis";
39
- maxConnections?: number | undefined;
40
- idleTimeoutMillis?: number | undefined;
41
- connectionTimeoutMillis?: number | undefined;
42
- options?: Record<string, unknown> | undefined;
43
- url?: string | undefined;
44
- host?: string | undefined;
45
- port?: number | undefined;
46
- password?: string | undefined;
47
- database?: number | undefined;
48
- }, {
49
- type: "redis";
50
- maxConnections?: number | undefined;
51
- idleTimeoutMillis?: number | undefined;
52
- connectionTimeoutMillis?: number | undefined;
53
- options?: Record<string, unknown> | undefined;
54
- url?: string | undefined;
55
- host?: string | undefined;
56
- port?: number | undefined;
57
- password?: string | undefined;
58
- database?: number | undefined;
59
- }>, {
60
- type: "redis";
61
- maxConnections?: number | undefined;
62
- idleTimeoutMillis?: number | undefined;
63
- connectionTimeoutMillis?: number | undefined;
64
- options?: Record<string, unknown> | undefined;
65
- url?: string | undefined;
66
- host?: string | undefined;
67
- port?: number | undefined;
68
- password?: string | undefined;
69
- database?: number | undefined;
70
- }, {
71
- type: "redis";
72
- maxConnections?: number | undefined;
73
- idleTimeoutMillis?: number | undefined;
74
- connectionTimeoutMillis?: number | undefined;
75
- options?: Record<string, unknown> | undefined;
76
- url?: string | undefined;
77
- host?: string | undefined;
78
- port?: number | undefined;
79
- password?: string | undefined;
80
- database?: number | undefined;
81
- }>;
23
+ }, z.core.$strict>;
82
24
  export type RedisCacheConfig = z.output<typeof RedisCacheSchema>;
83
25
  export declare const CacheConfigSchema: z.ZodObject<{
84
26
  type: z.ZodString;
85
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
86
- type: z.ZodString;
87
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
88
- type: z.ZodString;
89
- }, z.ZodTypeAny, "passthrough">>;
27
+ }, z.core.$loose>;
90
28
  export type CacheConfig = z.output<typeof CacheConfigSchema>;
91
29
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/cache/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW,iC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ema = z.object({
5
5
  maxConnections: z.number().int().positive().optional().describe("Maximum connections"),
6
6
  idleTimeoutMillis: z.number().int().positive().optional().describe("Idle timeout in milliseconds"),
7
7
  connectionTimeoutMillis: z.number().int().positive().optional().describe("Connection timeout in milliseconds"),
8
- options: z.record(z.unknown()).optional().describe("Backend-specific options")
8
+ options: z.record(z.string(), z.unknown()).optional().describe("Backend-specific options")
9
9
  });
10
10
  const InMemoryCacheSchema = BaseCacheSchema.extend({
11
11
  type: z.literal("in-memory")
@@ -12,7 +12,7 @@ export interface DatabaseFactory<TConfig = unknown> {
12
12
  * Zod schema for validating factory-specific configuration.
13
13
  * The schema must output the `TConfig` type.
14
14
  */
15
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
15
+ configSchema: z.ZodType<TConfig, unknown>;
16
16
  /**
17
17
  * Factory function to create a Database instance.
18
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/database/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,OAAO;IAC9C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAExD;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,yDAAyD;QACzD,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,sEAAsE;QACtE,sBAAsB,CAAC,EAAE,OAAO,CAAC;KACpC,CAAC;CACL"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/database/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,OAAO;IAC9C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE1C;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtE;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,yDAAyD;QACzD,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,WAAW,EAAE,MAAM,CAAC;QACpB,yDAAyD;QACzD,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,sEAAsE;QACtE,sBAAsB,CAAC,EAAE,OAAO,CAAC;KACpC,CAAC;CACL"}
@@ -32,7 +32,7 @@ const BaseDatabaseSchema = import_zod.z.object({
32
32
  maxConnections: import_zod.z.number().int().positive().optional().describe("Maximum connections"),
33
33
  idleTimeoutMillis: import_zod.z.number().int().positive().optional().describe("Idle timeout in milliseconds"),
34
34
  connectionTimeoutMillis: import_zod.z.number().int().positive().optional().describe("Connection timeout in milliseconds"),
35
- options: import_zod.z.record(import_zod.z.unknown()).optional().describe("Backend-specific options")
35
+ options: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Backend-specific options")
36
36
  });
37
37
  const InMemoryDatabaseSchema = BaseDatabaseSchema.extend({
38
38
  type: import_zod.z.literal("in-memory")
@@ -6,120 +6,35 @@ export declare const InMemoryDatabaseSchema: z.ZodObject<{
6
6
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
7
7
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
8
8
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
- } & {
10
9
  type: z.ZodLiteral<"in-memory">;
11
- }, "strict", z.ZodTypeAny, {
12
- type: "in-memory";
13
- maxConnections?: number | undefined;
14
- idleTimeoutMillis?: number | undefined;
15
- connectionTimeoutMillis?: number | undefined;
16
- options?: Record<string, unknown> | undefined;
17
- }, {
18
- type: "in-memory";
19
- maxConnections?: number | undefined;
20
- idleTimeoutMillis?: number | undefined;
21
- connectionTimeoutMillis?: number | undefined;
22
- options?: Record<string, unknown> | undefined;
23
- }>;
10
+ }, z.core.$strict>;
24
11
  export type InMemoryDatabaseConfig = z.output<typeof InMemoryDatabaseSchema>;
25
12
  export declare const SqliteDatabaseSchema: z.ZodObject<{
26
13
  maxConnections: z.ZodOptional<z.ZodNumber>;
27
14
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
28
15
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
29
16
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
- } & {
31
17
  type: z.ZodLiteral<"sqlite">;
32
18
  path: z.ZodString;
33
- }, "strict", z.ZodTypeAny, {
34
- path: string;
35
- type: "sqlite";
36
- maxConnections?: number | undefined;
37
- idleTimeoutMillis?: number | undefined;
38
- connectionTimeoutMillis?: number | undefined;
39
- options?: Record<string, unknown> | undefined;
40
- }, {
41
- path: string;
42
- type: "sqlite";
43
- maxConnections?: number | undefined;
44
- idleTimeoutMillis?: number | undefined;
45
- connectionTimeoutMillis?: number | undefined;
46
- options?: Record<string, unknown> | undefined;
47
- }>;
19
+ }, z.core.$strict>;
48
20
  export type SqliteDatabaseConfig = z.output<typeof SqliteDatabaseSchema>;
49
- export declare const PostgresDatabaseSchema: z.ZodEffects<z.ZodObject<{
21
+ export declare const PostgresDatabaseSchema: z.ZodObject<{
50
22
  maxConnections: z.ZodOptional<z.ZodNumber>;
51
23
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
52
24
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
53
25
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
54
- } & {
55
26
  type: z.ZodLiteral<"postgres">;
56
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
57
- connectionString: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
27
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
28
+ connectionString: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
58
29
  host: z.ZodOptional<z.ZodString>;
59
30
  port: z.ZodOptional<z.ZodNumber>;
60
31
  database: z.ZodOptional<z.ZodString>;
61
32
  password: z.ZodOptional<z.ZodString>;
62
33
  keyPrefix: z.ZodOptional<z.ZodString>;
63
- }, "strict", z.ZodTypeAny, {
64
- type: "postgres";
65
- maxConnections?: number | undefined;
66
- idleTimeoutMillis?: number | undefined;
67
- connectionTimeoutMillis?: number | undefined;
68
- options?: Record<string, unknown> | undefined;
69
- url?: string | undefined;
70
- host?: string | undefined;
71
- port?: number | undefined;
72
- password?: string | undefined;
73
- database?: string | undefined;
74
- connectionString?: string | undefined;
75
- keyPrefix?: string | undefined;
76
- }, {
77
- type: "postgres";
78
- maxConnections?: number | undefined;
79
- idleTimeoutMillis?: number | undefined;
80
- connectionTimeoutMillis?: number | undefined;
81
- options?: Record<string, unknown> | undefined;
82
- url?: string | undefined;
83
- host?: string | undefined;
84
- port?: number | undefined;
85
- password?: string | undefined;
86
- database?: string | undefined;
87
- connectionString?: string | undefined;
88
- keyPrefix?: string | undefined;
89
- }>, {
90
- type: "postgres";
91
- maxConnections?: number | undefined;
92
- idleTimeoutMillis?: number | undefined;
93
- connectionTimeoutMillis?: number | undefined;
94
- options?: Record<string, unknown> | undefined;
95
- url?: string | undefined;
96
- host?: string | undefined;
97
- port?: number | undefined;
98
- password?: string | undefined;
99
- database?: string | undefined;
100
- connectionString?: string | undefined;
101
- keyPrefix?: string | undefined;
102
- }, {
103
- type: "postgres";
104
- maxConnections?: number | undefined;
105
- idleTimeoutMillis?: number | undefined;
106
- connectionTimeoutMillis?: number | undefined;
107
- options?: Record<string, unknown> | undefined;
108
- url?: string | undefined;
109
- host?: string | undefined;
110
- port?: number | undefined;
111
- password?: string | undefined;
112
- database?: string | undefined;
113
- connectionString?: string | undefined;
114
- keyPrefix?: string | undefined;
115
- }>;
34
+ }, z.core.$strict>;
116
35
  export type PostgresDatabaseConfig = z.output<typeof PostgresDatabaseSchema>;
117
36
  export declare const DatabaseConfigSchema: z.ZodObject<{
118
37
  type: z.ZodString;
119
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
120
- type: z.ZodString;
121
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
122
- type: z.ZodString;
123
- }, z.ZodTypeAny, "passthrough">>;
38
+ }, z.core.$loose>;
124
39
  export type DatabaseConfig = z.output<typeof DatabaseConfigSchema>;
125
40
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/database/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc,8CAA+C,CAAC;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAoB3D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;EAGxB,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,C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AC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -5,7 +5,7 @@ const BaseDatabaseSchema = z.object({
5
5
  maxConnections: z.number().int().positive().optional().describe("Maximum connections"),
6
6
  idleTimeoutMillis: z.number().int().positive().optional().describe("Idle timeout in milliseconds"),
7
7
  connectionTimeoutMillis: z.number().int().positive().optional().describe("Connection timeout in milliseconds"),
8
- options: z.record(z.unknown()).optional().describe("Backend-specific options")
8
+ options: z.record(z.string(), z.unknown()).optional().describe("Backend-specific options")
9
9
  });
10
10
  const InMemoryDatabaseSchema = BaseDatabaseSchema.extend({
11
11
  type: z.literal("in-memory")
package/dist/index.d.cts CHANGED
@@ -15,7 +15,7 @@ interface CacheFactory<TConfig = unknown> {
15
15
  * Zod schema for validating factory-specific configuration.
16
16
  * The schema must output the `TConfig` type.
17
17
  */
18
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
18
+ configSchema: z.ZodType<TConfig, unknown>;
19
19
  /**
20
20
  * Factory function to create a Cache instance.
21
21
  *
@@ -139,7 +139,7 @@ interface DatabaseFactory<TConfig = unknown> {
139
139
  * Zod schema for validating factory-specific configuration.
140
140
  * The schema must output the `TConfig` type.
141
141
  */
142
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
142
+ configSchema: z.ZodType<TConfig, unknown>;
143
143
  /**
144
144
  * Factory function to create a Database instance.
145
145
  *
@@ -334,7 +334,7 @@ interface BlobStoreFactory<TConfig = unknown> {
334
334
  * Zod schema for validating factory-specific configuration.
335
335
  * The schema must output the `TConfig` type.
336
336
  */
337
- configSchema: z.ZodType<TConfig, z.ZodTypeDef, unknown>;
337
+ configSchema: z.ZodType<TConfig, unknown>;
338
338
  /**
339
339
  * Factory function to create a BlobStore instance.
340
340
  * @param config - Validated configuration specific to this backend
@@ -7,87 +7,25 @@ declare const InMemoryCacheSchema: z.ZodObject<{
7
7
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
8
8
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
9
9
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10
- } & {
11
10
  type: z.ZodLiteral<"in-memory">;
12
- }, "strict", z.ZodTypeAny, {
13
- type: "in-memory";
14
- maxConnections?: number | undefined;
15
- idleTimeoutMillis?: number | undefined;
16
- connectionTimeoutMillis?: number | undefined;
17
- options?: Record<string, unknown> | undefined;
18
- }, {
19
- type: "in-memory";
20
- maxConnections?: number | undefined;
21
- idleTimeoutMillis?: number | undefined;
22
- connectionTimeoutMillis?: number | undefined;
23
- options?: Record<string, unknown> | undefined;
24
- }>;
11
+ }, z.core.$strict>;
25
12
  type InMemoryCacheConfig = z.output<typeof InMemoryCacheSchema>;
26
- declare const RedisCacheSchema: z.ZodEffects<z.ZodObject<{
13
+ declare const RedisCacheSchema: z.ZodObject<{
27
14
  maxConnections: z.ZodOptional<z.ZodNumber>;
28
15
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
29
16
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
30
17
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
31
- } & {
32
18
  type: z.ZodLiteral<"redis">;
33
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
19
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
34
20
  host: z.ZodOptional<z.ZodString>;
35
21
  port: z.ZodOptional<z.ZodNumber>;
36
22
  password: z.ZodOptional<z.ZodString>;
37
23
  database: z.ZodOptional<z.ZodNumber>;
38
- }, "strict", z.ZodTypeAny, {
39
- type: "redis";
40
- maxConnections?: number | undefined;
41
- idleTimeoutMillis?: number | undefined;
42
- connectionTimeoutMillis?: number | undefined;
43
- options?: Record<string, unknown> | undefined;
44
- url?: string | undefined;
45
- host?: string | undefined;
46
- port?: number | undefined;
47
- password?: string | undefined;
48
- database?: number | undefined;
49
- }, {
50
- type: "redis";
51
- maxConnections?: number | undefined;
52
- idleTimeoutMillis?: number | undefined;
53
- connectionTimeoutMillis?: number | undefined;
54
- options?: Record<string, unknown> | undefined;
55
- url?: string | undefined;
56
- host?: string | undefined;
57
- port?: number | undefined;
58
- password?: string | undefined;
59
- database?: number | undefined;
60
- }>, {
61
- type: "redis";
62
- maxConnections?: number | undefined;
63
- idleTimeoutMillis?: number | undefined;
64
- connectionTimeoutMillis?: number | undefined;
65
- options?: Record<string, unknown> | undefined;
66
- url?: string | undefined;
67
- host?: string | undefined;
68
- port?: number | undefined;
69
- password?: string | undefined;
70
- database?: number | undefined;
71
- }, {
72
- type: "redis";
73
- maxConnections?: number | undefined;
74
- idleTimeoutMillis?: number | undefined;
75
- connectionTimeoutMillis?: number | undefined;
76
- options?: Record<string, unknown> | undefined;
77
- url?: string | undefined;
78
- host?: string | undefined;
79
- port?: number | undefined;
80
- password?: string | undefined;
81
- database?: number | undefined;
82
- }>;
24
+ }, z.core.$strict>;
83
25
  type RedisCacheConfig = z.output<typeof RedisCacheSchema>;
84
26
  declare const CacheConfigSchema: z.ZodObject<{
85
27
  type: z.ZodString;
86
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
87
- type: z.ZodString;
88
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
89
- type: z.ZodString;
90
- }, z.ZodTypeAny, "passthrough">>;
28
+ }, z.core.$loose>;
91
29
  type CacheConfig = z.output<typeof CacheConfigSchema>;
92
30
 
93
31
  declare const DATABASE_TYPES: readonly ["in-memory", "sqlite", "postgres"];
@@ -97,121 +35,36 @@ declare const InMemoryDatabaseSchema: z.ZodObject<{
97
35
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
98
36
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
99
37
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
- } & {
101
38
  type: z.ZodLiteral<"in-memory">;
102
- }, "strict", z.ZodTypeAny, {
103
- type: "in-memory";
104
- maxConnections?: number | undefined;
105
- idleTimeoutMillis?: number | undefined;
106
- connectionTimeoutMillis?: number | undefined;
107
- options?: Record<string, unknown> | undefined;
108
- }, {
109
- type: "in-memory";
110
- maxConnections?: number | undefined;
111
- idleTimeoutMillis?: number | undefined;
112
- connectionTimeoutMillis?: number | undefined;
113
- options?: Record<string, unknown> | undefined;
114
- }>;
39
+ }, z.core.$strict>;
115
40
  type InMemoryDatabaseConfig = z.output<typeof InMemoryDatabaseSchema>;
116
41
  declare const SqliteDatabaseSchema: z.ZodObject<{
117
42
  maxConnections: z.ZodOptional<z.ZodNumber>;
118
43
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
119
44
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
120
45
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
121
- } & {
122
46
  type: z.ZodLiteral<"sqlite">;
123
47
  path: z.ZodString;
124
- }, "strict", z.ZodTypeAny, {
125
- path: string;
126
- type: "sqlite";
127
- maxConnections?: number | undefined;
128
- idleTimeoutMillis?: number | undefined;
129
- connectionTimeoutMillis?: number | undefined;
130
- options?: Record<string, unknown> | undefined;
131
- }, {
132
- path: string;
133
- type: "sqlite";
134
- maxConnections?: number | undefined;
135
- idleTimeoutMillis?: number | undefined;
136
- connectionTimeoutMillis?: number | undefined;
137
- options?: Record<string, unknown> | undefined;
138
- }>;
48
+ }, z.core.$strict>;
139
49
  type SqliteDatabaseConfig = z.output<typeof SqliteDatabaseSchema>;
140
- declare const PostgresDatabaseSchema: z.ZodEffects<z.ZodObject<{
50
+ declare const PostgresDatabaseSchema: z.ZodObject<{
141
51
  maxConnections: z.ZodOptional<z.ZodNumber>;
142
52
  idleTimeoutMillis: z.ZodOptional<z.ZodNumber>;
143
53
  connectionTimeoutMillis: z.ZodOptional<z.ZodNumber>;
144
54
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
145
- } & {
146
55
  type: z.ZodLiteral<"postgres">;
147
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
148
- connectionString: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
56
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
57
+ connectionString: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
149
58
  host: z.ZodOptional<z.ZodString>;
150
59
  port: z.ZodOptional<z.ZodNumber>;
151
60
  database: z.ZodOptional<z.ZodString>;
152
61
  password: z.ZodOptional<z.ZodString>;
153
62
  keyPrefix: z.ZodOptional<z.ZodString>;
154
- }, "strict", z.ZodTypeAny, {
155
- type: "postgres";
156
- maxConnections?: number | undefined;
157
- idleTimeoutMillis?: number | undefined;
158
- connectionTimeoutMillis?: number | undefined;
159
- options?: Record<string, unknown> | undefined;
160
- url?: string | undefined;
161
- host?: string | undefined;
162
- port?: number | undefined;
163
- password?: string | undefined;
164
- database?: string | undefined;
165
- connectionString?: string | undefined;
166
- keyPrefix?: string | undefined;
167
- }, {
168
- type: "postgres";
169
- maxConnections?: number | undefined;
170
- idleTimeoutMillis?: number | undefined;
171
- connectionTimeoutMillis?: number | undefined;
172
- options?: Record<string, unknown> | undefined;
173
- url?: string | undefined;
174
- host?: string | undefined;
175
- port?: number | undefined;
176
- password?: string | undefined;
177
- database?: string | undefined;
178
- connectionString?: string | undefined;
179
- keyPrefix?: string | undefined;
180
- }>, {
181
- type: "postgres";
182
- maxConnections?: number | undefined;
183
- idleTimeoutMillis?: number | undefined;
184
- connectionTimeoutMillis?: number | undefined;
185
- options?: Record<string, unknown> | undefined;
186
- url?: string | undefined;
187
- host?: string | undefined;
188
- port?: number | undefined;
189
- password?: string | undefined;
190
- database?: string | undefined;
191
- connectionString?: string | undefined;
192
- keyPrefix?: string | undefined;
193
- }, {
194
- type: "postgres";
195
- maxConnections?: number | undefined;
196
- idleTimeoutMillis?: number | undefined;
197
- connectionTimeoutMillis?: number | undefined;
198
- options?: Record<string, unknown> | undefined;
199
- url?: string | undefined;
200
- host?: string | undefined;
201
- port?: number | undefined;
202
- password?: string | undefined;
203
- database?: string | undefined;
204
- connectionString?: string | undefined;
205
- keyPrefix?: string | undefined;
206
- }>;
63
+ }, z.core.$strict>;
207
64
  type PostgresDatabaseConfig = z.output<typeof PostgresDatabaseSchema>;
208
65
  declare const DatabaseConfigSchema: z.ZodObject<{
209
66
  type: z.ZodString;
210
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
211
- type: z.ZodString;
212
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
213
- type: z.ZodString;
214
- }, z.ZodTypeAny, "passthrough">>;
67
+ }, z.core.$loose>;
215
68
  type DatabaseConfig = z.output<typeof DatabaseConfigSchema>;
216
69
 
217
70
  /**
@@ -227,15 +80,7 @@ declare const InMemoryBlobStoreSchema: z.ZodObject<{
227
80
  type: z.ZodLiteral<"in-memory">;
228
81
  maxBlobSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
229
82
  maxTotalSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
230
- }, "strict", z.ZodTypeAny, {
231
- type: "in-memory";
232
- maxBlobSize: number;
233
- maxTotalSize: number;
234
- }, {
235
- type: "in-memory";
236
- maxBlobSize?: number | undefined;
237
- maxTotalSize?: number | undefined;
238
- }>;
83
+ }, z.core.$strict>;
239
84
  type InMemoryBlobStoreConfigInput = z.input<typeof InMemoryBlobStoreSchema>;
240
85
  type InMemoryBlobStoreConfig = z.output<typeof InMemoryBlobStoreSchema>;
241
86
  /**
@@ -247,19 +92,7 @@ declare const LocalBlobStoreSchema: z.ZodObject<{
247
92
  maxBlobSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
248
93
  maxTotalSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
249
94
  cleanupAfterDays: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
250
- }, "strict", z.ZodTypeAny, {
251
- type: "local";
252
- maxBlobSize: number;
253
- maxTotalSize: number;
254
- storePath: string;
255
- cleanupAfterDays: number;
256
- }, {
257
- type: "local";
258
- storePath: string;
259
- maxBlobSize?: number | undefined;
260
- maxTotalSize?: number | undefined;
261
- cleanupAfterDays?: number | undefined;
262
- }>;
95
+ }, z.core.$strict>;
263
96
  type LocalBlobStoreConfigInput = z.input<typeof LocalBlobStoreSchema>;
264
97
  type LocalBlobStoreConfig = z.output<typeof LocalBlobStoreSchema>;
265
98
  /**
@@ -282,11 +115,7 @@ type LocalBlobStoreConfig = z.output<typeof LocalBlobStoreSchema>;
282
115
  */
283
116
  declare const BlobStoreConfigSchema: z.ZodObject<{
284
117
  type: z.ZodString;
285
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
286
- type: z.ZodString;
287
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
288
- type: z.ZodString;
289
- }, z.ZodTypeAny, "passthrough">>;
118
+ }, z.core.$loose>;
290
119
  /**
291
120
  * Blob store configuration type.
292
121
  *
@@ -306,61 +135,17 @@ type BlobStoreConfig = InMemoryBlobStoreConfig | LocalBlobStoreConfig | {
306
135
  * via each image factory's `configSchema`. This schema validates only the structural
307
136
  * shape required for config parsing and defaults.
308
137
  */
309
- declare const StorageSchema: z.ZodBranded<z.ZodObject<{
138
+ declare const StorageSchema: z.core.$ZodBranded<z.ZodObject<{
310
139
  cache: z.ZodObject<{
311
140
  type: z.ZodString;
312
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
313
- type: z.ZodString;
314
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
315
- type: z.ZodString;
316
- }, z.ZodTypeAny, "passthrough">>;
141
+ }, z.core.$loose>;
317
142
  database: z.ZodObject<{
318
143
  type: z.ZodString;
319
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
320
- type: z.ZodString;
321
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
322
- type: z.ZodString;
323
- }, z.ZodTypeAny, "passthrough">>;
144
+ }, z.core.$loose>;
324
145
  blob: z.ZodObject<{
325
146
  type: z.ZodString;
326
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
327
- type: z.ZodString;
328
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
329
- type: z.ZodString;
330
- }, z.ZodTypeAny, "passthrough">>;
331
- }, "strict", z.ZodTypeAny, {
332
- database: {
333
- type: string;
334
- } & {
335
- [k: string]: unknown;
336
- };
337
- cache: {
338
- type: string;
339
- } & {
340
- [k: string]: unknown;
341
- };
342
- blob: {
343
- type: string;
344
- } & {
345
- [k: string]: unknown;
346
- };
347
- }, {
348
- database: {
349
- type: string;
350
- } & {
351
- [k: string]: unknown;
352
- };
353
- cache: {
354
- type: string;
355
- } & {
356
- [k: string]: unknown;
357
- };
358
- blob: {
359
- type: string;
360
- } & {
361
- [k: string]: unknown;
362
- };
363
- }>, "ValidatedStorageConfig">;
147
+ }, z.core.$loose>;
148
+ }, z.core.$strict>, "ValidatedStorageConfig", "out">;
364
149
  type StorageConfig = z.input<typeof StorageSchema>;
365
150
  type ValidatedStorageConfig = z.output<typeof StorageSchema>;
366
151
 
package/dist/schemas.d.ts CHANGED
@@ -10,61 +10,17 @@ export { BLOB_STORE_TYPES, BlobStoreConfigSchema, InMemoryBlobStoreSchema, Local
10
10
  * via each image factory's `configSchema`. This schema validates only the structural
11
11
  * shape required for config parsing and defaults.
12
12
  */
13
- export declare const StorageSchema: z.ZodBranded<z.ZodObject<{
13
+ export declare const StorageSchema: z.core.$ZodBranded<z.ZodObject<{
14
14
  cache: z.ZodObject<{
15
15
  type: z.ZodString;
16
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
17
- type: z.ZodString;
18
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
19
- type: z.ZodString;
20
- }, z.ZodTypeAny, "passthrough">>;
16
+ }, z.core.$loose>;
21
17
  database: z.ZodObject<{
22
18
  type: z.ZodString;
23
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24
- type: z.ZodString;
25
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
26
- type: z.ZodString;
27
- }, z.ZodTypeAny, "passthrough">>;
19
+ }, z.core.$loose>;
28
20
  blob: z.ZodObject<{
29
21
  type: z.ZodString;
30
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
31
- type: z.ZodString;
32
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
33
- type: z.ZodString;
34
- }, z.ZodTypeAny, "passthrough">>;
35
- }, "strict", z.ZodTypeAny, {
36
- database: {
37
- type: string;
38
- } & {
39
- [k: string]: unknown;
40
- };
41
- cache: {
42
- type: string;
43
- } & {
44
- [k: string]: unknown;
45
- };
46
- blob: {
47
- type: string;
48
- } & {
49
- [k: string]: unknown;
50
- };
51
- }, {
52
- database: {
53
- type: string;
54
- } & {
55
- [k: string]: unknown;
56
- };
57
- cache: {
58
- type: string;
59
- } & {
60
- [k: string]: unknown;
61
- };
62
- blob: {
63
- type: string;
64
- } & {
65
- [k: string]: unknown;
66
- };
67
- }>, "ValidatedStorageConfig">;
22
+ }, z.core.$loose>;
23
+ }, z.core.$strict>, "ValidatedStorageConfig", "out">;
68
24
  export type StorageConfig = z.input<typeof StorageSchema>;
69
25
  export type ValidatedStorageConfig = z.output<typeof StorageSchema>;
70
26
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACH,WAAW,EACX,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,gBAAgB,EAChB,KAAK,gBAAgB,GACxB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACH,cAAc,EACd,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,sBAAsB,GAC9B,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;AAO3B;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;oDAUY,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/storage",
3
- "version": "1.6.26",
3
+ "version": "1.7.0",
4
4
  "description": "Storage backends and factories for Dexto agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,8 +20,8 @@
20
20
  "storage"
21
21
  ],
22
22
  "dependencies": {
23
- "zod": "^3.25.0",
24
- "@dexto/core": "1.6.26"
23
+ "zod": "^4.3.6",
24
+ "@dexto/core": "1.7.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "better-sqlite3": "^11.10.0",