@livestore/common 0.0.54-dev.29 → 0.0.54-dev.30
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/.tsbuildinfo +1 -1
- package/dist/adapter-types.d.ts +2 -2
- package/dist/adapter-types.js +1 -1
- package/dist/adapter-types.js.map +1 -1
- package/dist/derived-mutations.d.ts +8 -8
- package/dist/devtools/devtools-messages.d.ts +8 -8
- package/dist/schema/mutations.js +1 -1
- package/dist/schema/mutations.js.map +1 -1
- package/dist/sync/sync.d.ts +3 -3
- package/dist/util.js +1 -1
- package/dist/util.js.map +1 -1
- package/package.json +4 -4
- package/src/adapter-types.ts +1 -1
- package/src/schema/mutations.ts +1 -1
- package/src/util.ts +1 -1
package/dist/adapter-types.d.ts
CHANGED
|
@@ -98,14 +98,14 @@ export type BootDb = {
|
|
|
98
98
|
txn(callback: () => void): void;
|
|
99
99
|
};
|
|
100
100
|
declare const UnexpectedError_base: Schema.TaggedErrorClass<UnexpectedError, "LiveStore.UnexpectedError", {
|
|
101
|
-
readonly _tag: Schema.
|
|
101
|
+
readonly _tag: Schema.tag<"LiveStore.UnexpectedError">;
|
|
102
102
|
} & {
|
|
103
103
|
cause: typeof Schema.AnyError;
|
|
104
104
|
}>;
|
|
105
105
|
export declare class UnexpectedError extends UnexpectedError_base {
|
|
106
106
|
}
|
|
107
107
|
declare const SqliteError_base: Schema.TaggedErrorClass<SqliteError, "LiveStore.SqliteError", {
|
|
108
|
-
readonly _tag: Schema.
|
|
108
|
+
readonly _tag: Schema.tag<"LiveStore.SqliteError">;
|
|
109
109
|
} & {
|
|
110
110
|
sql: typeof Schema.String;
|
|
111
111
|
bindValues: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
|
package/dist/adapter-types.js
CHANGED
|
@@ -14,7 +14,7 @@ export class UnexpectedError extends Schema.TaggedError()('LiveStore.UnexpectedE
|
|
|
14
14
|
}
|
|
15
15
|
export class SqliteError extends Schema.TaggedError()('LiveStore.SqliteError', {
|
|
16
16
|
sql: Schema.String,
|
|
17
|
-
bindValues: Schema.Record(Schema.String, Schema.Any),
|
|
17
|
+
bindValues: Schema.Record({ key: Schema.String, value: Schema.Any }),
|
|
18
18
|
/** The SQLite result code */
|
|
19
19
|
code: Schema.Number,
|
|
20
20
|
/** The original SQLite3 error */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-types.js","sourceRoot":"","sources":["../src/adapter-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AA2BhD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC,OAAO;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM;CAC3B,CAAC,CAAA;AAOF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CACpC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAClF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EACpF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAChF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK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AE,CAAC,EACpF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAChF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CACjD,CAAA;AA4CD,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,WAAW,EAAmB,CAAC,2BAA2B,EAAE;IACtG,KAAK,EAAE,MAAM,CAAC,QAAQ;CACvB,CAAC;CAAG;AAEL,MAAM,OAAO,WAAY,SAAQ,MAAM,CAAC,WAAW,EAAe,CAAC,uBAAuB,EAAE;IAC1F,GAAG,EAAE,MAAM,CAAC,MAAM;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;IACpE,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC,QAAQ;CACvB,CAAC;CAAG"}
|
|
@@ -17,19 +17,19 @@ export declare const makeDerivedMutationDefsForTable: <TTableDef extends DbSchem
|
|
|
17
17
|
readonly [x: string]: any;
|
|
18
18
|
}>;
|
|
19
19
|
update: import("./schema/mutations.js").MutationDef<`_Derived_Update_${string}`, {
|
|
20
|
-
readonly values: {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
};
|
|
23
20
|
readonly where: {
|
|
24
21
|
[x: string]: any;
|
|
25
22
|
};
|
|
26
|
-
}, {
|
|
27
23
|
readonly values: {
|
|
28
24
|
[x: string]: any;
|
|
29
25
|
};
|
|
26
|
+
}, {
|
|
30
27
|
readonly where: {
|
|
31
28
|
[x: string]: any;
|
|
32
29
|
};
|
|
30
|
+
readonly values: {
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
};
|
|
33
33
|
}>;
|
|
34
34
|
delete: import("./schema/mutations.js").MutationDef<`_Derived_Delete_${string}`, {
|
|
35
35
|
readonly where: {
|
|
@@ -59,19 +59,19 @@ export declare const deriveUpdateMutationDef: <TTableDef extends DbSchema.TableD
|
|
|
59
59
|
enabled: true;
|
|
60
60
|
};
|
|
61
61
|
}>>(table: TTableDef) => import("./schema/mutations.js").MutationDef<`_Derived_Update_${string}`, {
|
|
62
|
-
readonly values: {
|
|
63
|
-
[x: string]: any;
|
|
64
|
-
};
|
|
65
62
|
readonly where: {
|
|
66
63
|
[x: string]: any;
|
|
67
64
|
};
|
|
68
|
-
}, {
|
|
69
65
|
readonly values: {
|
|
70
66
|
[x: string]: any;
|
|
71
67
|
};
|
|
68
|
+
}, {
|
|
72
69
|
readonly where: {
|
|
73
70
|
[x: string]: any;
|
|
74
71
|
};
|
|
72
|
+
readonly values: {
|
|
73
|
+
[x: string]: any;
|
|
74
|
+
};
|
|
75
75
|
}>;
|
|
76
76
|
export declare const deriveDeleteMutationDef: <TTableDef extends DbSchema.TableDef<DbSchema.DefaultSqliteTableDefConstrained, boolean, DbSchema.TableOptions & {
|
|
77
77
|
deriveMutations: {
|
|
@@ -54,38 +54,38 @@ declare const DebugInfoRes_base: Schema.Struct<{
|
|
|
54
54
|
slowQueries: Schema.transform<Schema.Struct<{
|
|
55
55
|
size: typeof Schema.Number;
|
|
56
56
|
items: Schema.Array$<Schema.Schema<{
|
|
57
|
-
readonly queryStr: string;
|
|
58
57
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
59
58
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
60
59
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
60
|
+
readonly queryStr: string;
|
|
61
61
|
readonly durationMs: number;
|
|
62
62
|
readonly rowsCount: number | undefined;
|
|
63
63
|
readonly queriedTables: ReadonlySet<string>;
|
|
64
64
|
readonly startTimePerfNow: number;
|
|
65
65
|
}, {
|
|
66
|
-
readonly queryStr: string;
|
|
67
66
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
|
68
67
|
readonly [x: string]: string | number | readonly number[] | null;
|
|
69
68
|
} | undefined;
|
|
69
|
+
readonly queryStr: string;
|
|
70
70
|
readonly durationMs: number;
|
|
71
71
|
readonly rowsCount: number | undefined;
|
|
72
72
|
readonly queriedTables: readonly string[];
|
|
73
73
|
readonly startTimePerfNow: number;
|
|
74
74
|
}, never>>;
|
|
75
75
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
|
76
|
-
readonly queryStr: string;
|
|
77
76
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
78
77
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
79
78
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
79
|
+
readonly queryStr: string;
|
|
80
80
|
readonly durationMs: number;
|
|
81
81
|
readonly rowsCount: number | undefined;
|
|
82
82
|
readonly queriedTables: ReadonlySet<string>;
|
|
83
83
|
readonly startTimePerfNow: number;
|
|
84
84
|
}>, import("../bounded-collections.js").BoundArray<{
|
|
85
|
-
readonly queryStr: string;
|
|
86
85
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
87
86
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
88
87
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
88
|
+
readonly queryStr: string;
|
|
89
89
|
readonly durationMs: number;
|
|
90
90
|
readonly rowsCount: number | undefined;
|
|
91
91
|
readonly queriedTables: ReadonlySet<string>;
|
|
@@ -119,38 +119,38 @@ declare const DebugInfoHistoryRes_base: Schema.Struct<{
|
|
|
119
119
|
slowQueries: Schema.transform<Schema.Struct<{
|
|
120
120
|
size: typeof Schema.Number;
|
|
121
121
|
items: Schema.Array$<Schema.Schema<{
|
|
122
|
-
readonly queryStr: string;
|
|
123
122
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
124
123
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
125
124
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
125
|
+
readonly queryStr: string;
|
|
126
126
|
readonly durationMs: number;
|
|
127
127
|
readonly rowsCount: number | undefined;
|
|
128
128
|
readonly queriedTables: ReadonlySet<string>;
|
|
129
129
|
readonly startTimePerfNow: number;
|
|
130
130
|
}, {
|
|
131
|
-
readonly queryStr: string;
|
|
132
131
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
|
133
132
|
readonly [x: string]: string | number | readonly number[] | null;
|
|
134
133
|
} | undefined;
|
|
134
|
+
readonly queryStr: string;
|
|
135
135
|
readonly durationMs: number;
|
|
136
136
|
readonly rowsCount: number | undefined;
|
|
137
137
|
readonly queriedTables: readonly string[];
|
|
138
138
|
readonly startTimePerfNow: number;
|
|
139
139
|
}, never>>;
|
|
140
140
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
|
141
|
-
readonly queryStr: string;
|
|
142
141
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
143
142
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
144
143
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
144
|
+
readonly queryStr: string;
|
|
145
145
|
readonly durationMs: number;
|
|
146
146
|
readonly rowsCount: number | undefined;
|
|
147
147
|
readonly queriedTables: ReadonlySet<string>;
|
|
148
148
|
readonly startTimePerfNow: number;
|
|
149
149
|
}>, import("../bounded-collections.js").BoundArray<{
|
|
150
|
-
readonly queryStr: string;
|
|
151
150
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
152
151
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
153
152
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
153
|
+
readonly queryStr: string;
|
|
154
154
|
readonly durationMs: number;
|
|
155
155
|
readonly rowsCount: number | undefined;
|
|
156
156
|
readonly queriedTables: ReadonlySet<string>;
|
package/dist/schema/mutations.js
CHANGED
|
@@ -20,7 +20,7 @@ export const makeMutationDefRecord = (inputRecord) => {
|
|
|
20
20
|
};
|
|
21
21
|
export const rawSqlMutation = defineMutation('livestore.RawSql', Schema.Struct({
|
|
22
22
|
sql: Schema.String,
|
|
23
|
-
bindValues: Schema.optional(Schema.Record(Schema.String, Schema.Any)),
|
|
23
|
+
bindValues: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
24
24
|
writeTables: Schema.optional(Schema.ReadonlySet(Schema.String)),
|
|
25
25
|
}), ({ sql, bindValues, writeTables }) => ({ sql, bindValues: bindValues ?? {}, writeTables }));
|
|
26
26
|
export const makeMutationEventSchema = (schema) => Schema.Union(...[...schema.mutations.values()].map((def) => Schema.Struct({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../src/schema/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAmDhD,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAW,EACX,MAAiC,EACjC,GAA8B,EAC9B,OAKC,EAC+B,EAAE;IAClC,MAAM,SAAS,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IAEvE,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACzD,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC7D,MAAM,CAAC,cAAc,CAAC,SAAS,EAA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AAC,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAA"}
|
package/dist/sync/sync.d.ts
CHANGED
|
@@ -10,19 +10,19 @@ export type SyncImpl = {
|
|
|
10
10
|
isConnected: SubscriptionRef.SubscriptionRef<boolean>;
|
|
11
11
|
};
|
|
12
12
|
declare const IsOfflineError_base: Schema.TaggedErrorClass<IsOfflineError, "IsOfflineError", {
|
|
13
|
-
readonly _tag: Schema.
|
|
13
|
+
readonly _tag: Schema.tag<"IsOfflineError">;
|
|
14
14
|
}>;
|
|
15
15
|
export declare class IsOfflineError extends IsOfflineError_base {
|
|
16
16
|
}
|
|
17
17
|
declare const InvalidPushError_base: Schema.TaggedErrorClass<InvalidPushError, "InvalidPushError", {
|
|
18
|
-
readonly _tag: Schema.
|
|
18
|
+
readonly _tag: Schema.tag<"InvalidPushError">;
|
|
19
19
|
} & {
|
|
20
20
|
message: typeof Schema.String;
|
|
21
21
|
}>;
|
|
22
22
|
export declare class InvalidPushError extends InvalidPushError_base {
|
|
23
23
|
}
|
|
24
24
|
declare const InvalidPullError_base: Schema.TaggedErrorClass<InvalidPullError, "InvalidPullError", {
|
|
25
|
-
readonly _tag: Schema.
|
|
25
|
+
readonly _tag: Schema.tag<"InvalidPullError">;
|
|
26
26
|
} & {
|
|
27
27
|
message: typeof Schema.String;
|
|
28
28
|
}>;
|
package/dist/util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="es2022" />
|
|
2
2
|
import { Schema } from '@livestore/utils/effect';
|
|
3
3
|
export const SqlValueSchema = Schema.Union(Schema.String, Schema.Number, Schema.Uint8Array, Schema.Null);
|
|
4
|
-
export const PreparedBindValues = Schema.Union(Schema.Array(SqlValueSchema), Schema.Record(Schema.String, SqlValueSchema)).pipe(Schema.brand('PreparedBindValues'));
|
|
4
|
+
export const PreparedBindValues = Schema.Union(Schema.Array(SqlValueSchema), Schema.Record({ key: Schema.String, value: SqlValueSchema })).pipe(Schema.brand('PreparedBindValues'));
|
|
5
5
|
/**
|
|
6
6
|
* This is a tag function for tagged literals.
|
|
7
7
|
* it lets us get syntax highlighting on SQL queries in VSCode, but
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAOhD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AAExG,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAC5C,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,EAC5B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAOhD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AAExG,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAC5C,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,EAC5B,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAC7D,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAA;AAI1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,QAA8B,EAAE,GAAG,IAAe,EAAU,EAAE;IAChF,IAAI,GAAG,GAAG,EAAE,CAAA;IAEZ,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;QACtC,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IAClC,CAAC;IAED,6CAA6C;IAC7C,OAAO,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAC5C,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAgB,EAAE,SAAiB,EAAsB,EAAE;IAC3F,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAmC,CAAA;IAErE,MAAM,MAAM,GAAiB,EAAE,CAAA;IAC/B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,KAAK,CAAA;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,MAA4B,CAAA;AACrC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/common",
|
|
3
|
-
"version": "0.0.54-dev.
|
|
3
|
+
"version": "0.0.54-dev.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@opentelemetry/api": "^1.9.0",
|
|
32
|
-
"@livestore/utils": "0.0.54-dev.
|
|
33
|
-
"effect-db-schema": "0.0.54-dev.
|
|
32
|
+
"@livestore/utils": "0.0.54-dev.30",
|
|
33
|
+
"effect-db-schema": "0.0.54-dev.30"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"vitest": "^
|
|
36
|
+
"vitest": "^2.0.4"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
package/src/adapter-types.ts
CHANGED
|
@@ -97,7 +97,7 @@ export class UnexpectedError extends Schema.TaggedError<UnexpectedError>()('Live
|
|
|
97
97
|
|
|
98
98
|
export class SqliteError extends Schema.TaggedError<SqliteError>()('LiveStore.SqliteError', {
|
|
99
99
|
sql: Schema.String,
|
|
100
|
-
bindValues: Schema.Record(Schema.String, Schema.Any),
|
|
100
|
+
bindValues: Schema.Record({ key: Schema.String, value: Schema.Any }),
|
|
101
101
|
/** The SQLite result code */
|
|
102
102
|
code: Schema.Number,
|
|
103
103
|
/** The original SQLite3 error */
|
package/src/schema/mutations.ts
CHANGED
|
@@ -93,7 +93,7 @@ export const rawSqlMutation = defineMutation(
|
|
|
93
93
|
'livestore.RawSql',
|
|
94
94
|
Schema.Struct({
|
|
95
95
|
sql: Schema.String,
|
|
96
|
-
bindValues: Schema.optional(Schema.Record(Schema.String, Schema.Any)),
|
|
96
|
+
bindValues: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
97
97
|
writeTables: Schema.optional(Schema.ReadonlySet(Schema.String)),
|
|
98
98
|
}),
|
|
99
99
|
({ sql, bindValues, writeTables }) => ({ sql, bindValues: bindValues ?? {}, writeTables }),
|
package/src/util.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const SqlValueSchema = Schema.Union(Schema.String, Schema.Number, Schema.
|
|
|
12
12
|
|
|
13
13
|
export const PreparedBindValues = Schema.Union(
|
|
14
14
|
Schema.Array(SqlValueSchema),
|
|
15
|
-
Schema.Record(Schema.String, SqlValueSchema),
|
|
15
|
+
Schema.Record({ key: Schema.String, value: SqlValueSchema }),
|
|
16
16
|
).pipe(Schema.brand('PreparedBindValues'))
|
|
17
17
|
|
|
18
18
|
export type PreparedBindValues = Brand.Branded<Bindable, 'PreparedBindValues'>
|