wellcrafted 0.34.0 → 0.35.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/README.md +209 -576
- package/dist/error/index.d.ts +3 -42
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +1 -1
- package/dist/{index-8WW9UMob.d.ts → index-mb9iYu0a.d.ts} +2 -2
- package/dist/{index-8WW9UMob.d.ts.map → index-mb9iYu0a.d.ts.map} +1 -1
- package/dist/logger/index.d.ts +228 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +173 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/query/index.d.ts +3 -2
- package/dist/query/index.d.ts.map +1 -1
- package/dist/query/index.js +3 -2
- package/dist/query/index.js.map +1 -1
- package/dist/result/index.d.ts +4 -3
- package/dist/result/index.js +4 -3
- package/dist/{result-BgPMmUXd.d.ts → result-BongGO2O.d.ts} +46 -38
- package/dist/result-BongGO2O.d.ts.map +1 -0
- package/dist/{result-DnOm5ds5.js → result-DzL3K2yA.js} +114 -4
- package/dist/result-DzL3K2yA.js.map +1 -0
- package/dist/{result-0QjbC3Hw.js → result-corfYKOe.js} +2 -2
- package/dist/{result-0QjbC3Hw.js.map → result-corfYKOe.js.map} +1 -1
- package/dist/tap-err-Bf6rQ4Cw.js +37 -0
- package/dist/tap-err-Bf6rQ4Cw.js.map +1 -0
- package/dist/tap-err-Bqs9aQpZ.d.ts +33 -0
- package/dist/tap-err-Bqs9aQpZ.d.ts.map +1 -0
- package/dist/types-cY80Bw6u.d.ts +47 -0
- package/dist/types-cY80Bw6u.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/result-BgPMmUXd.d.ts.map +0 -1
- package/dist/result-DnOm5ds5.js.map +0 -1
package/dist/error/index.d.ts
CHANGED
|
@@ -1,47 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../result-BongGO2O.js";
|
|
2
|
+
import { AnyTaggedError, DefineErrorsReturn, ErrorBody, ErrorsConfig, InferError, InferErrors, ValidatedConfig } from "../types-cY80Bw6u.js";
|
|
2
3
|
|
|
3
|
-
//#region src/error/types.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Base type for any tagged error, used as a minimum constraint.
|
|
7
|
-
*/
|
|
8
|
-
type AnyTaggedError = {
|
|
9
|
-
name: string;
|
|
10
|
-
message: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Constructor return must include `message: string`.
|
|
14
|
-
* JSON serializability is a convention, not enforced at the type level
|
|
15
|
-
* (optional fields produce `T | undefined` which breaks `JsonObject`).
|
|
16
|
-
*/
|
|
17
|
-
type ErrorBody = {
|
|
18
|
-
message: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Per-key validation: tells the user exactly what `name` will be stamped as.
|
|
22
|
-
* If a user provides `name` in the return object, they see a descriptive error.
|
|
23
|
-
*/
|
|
24
|
-
type ValidateErrorBody<K extends string> = {
|
|
25
|
-
message: string;
|
|
26
|
-
name?: `The 'name' key is reserved as '${K}'. Remove it.`;
|
|
27
|
-
};
|
|
28
|
-
/** The config: each key is a variant name, each value is a constructor function. */
|
|
29
|
-
type ErrorsConfig = Record<string, (...args: any[]) => ErrorBody>;
|
|
30
|
-
/** Validates each config entry, injecting the key-specific `name` reservation message. */
|
|
31
|
-
type ValidatedConfig<T extends ErrorsConfig> = { [K in keyof T & string]: T[K] extends ((...args: infer A) => infer R) ? (...args: A) => R & ValidateErrorBody<K> : T[K] };
|
|
32
|
-
/** Single factory: takes constructor args, returns Err-wrapped error. */
|
|
33
|
-
type ErrorFactory<TName extends string, TFn extends (...args: any[]) => ErrorBody> = { [K in TName]: (...args: Parameters<TFn>) => Err<Readonly<{
|
|
34
|
-
name: TName;
|
|
35
|
-
} & ReturnType<TFn>>> };
|
|
36
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
37
|
-
/** Return type of `defineErrors`. Maps each config key to its factory. */
|
|
38
|
-
type DefineErrorsReturn<TConfig extends ErrorsConfig> = UnionToIntersection<{ [K in keyof TConfig & string]: ErrorFactory<K, TConfig[K]> }[keyof TConfig & string]>;
|
|
39
|
-
/** Extract the error type from a single factory. */
|
|
40
|
-
type InferError<T> = T extends ((...args: any[]) => Err<infer R>) ? R : never;
|
|
41
|
-
/** Extract union of ALL error types from a defineErrors return. */
|
|
42
|
-
type InferErrors<T> = { [K in keyof T]: T[K] extends ((...args: any[]) => Err<infer R>) ? R : never }[keyof T];
|
|
43
|
-
//#endregion
|
|
44
4
|
//#region src/error/defineErrors.d.ts
|
|
5
|
+
|
|
45
6
|
/**
|
|
46
7
|
* Defines a set of typed error factories using Rust-style namespaced variants.
|
|
47
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/error/
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/error/defineErrors.ts","../../src/error/extractErrorMessage.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4DA;;;;;;;;AAEqB;;;;ACxDrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBDsDgB,mCAAmC,sBAC1C,UAAU,gBAAgB,WAChC,mBAAmB;;;;;;;;AAFtB;;AAAmD,iBCtDnC,mBAAA,CDsDmC,KAAA,EAAA,OAAA,CAAA,EAAA,MAAA"}
|
package/dist/error/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Err, Ok, Result } from "./result-
|
|
1
|
+
import { Err, Ok, Result } from "./result-BongGO2O.js";
|
|
2
2
|
|
|
3
3
|
//#region src/result/utils.d.ts
|
|
4
4
|
|
|
@@ -25,4 +25,4 @@ declare function partitionResults<T, E>(results: Result<T, E>[]): {
|
|
|
25
25
|
//# sourceMappingURL=utils.d.ts.map
|
|
26
26
|
//#endregion
|
|
27
27
|
export { partitionResults };
|
|
28
|
-
//# sourceMappingURL=index-
|
|
28
|
+
//# sourceMappingURL=index-mb9iYu0a.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-mb9iYu0a.d.ts","names":[],"sources":["../src/result/utils.ts"],"sourcesContent":[],"mappings":";;;;;;AAmBA;;;;;;;;;AAK+B;;;;;iBALf,gCAAgC,OAAO,GAAG;OAK7C,GAAG;QAAY,IAAI"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Err } from "../result-BongGO2O.js";
|
|
2
|
+
import { AnyTaggedError } from "../types-cY80Bw6u.js";
|
|
3
|
+
import { tapErr } from "../tap-err-Bqs9aQpZ.js";
|
|
4
|
+
|
|
5
|
+
//#region src/logger/types.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Five levels, no `fatal`. Matches Rust's `tracing` exactly.
|
|
9
|
+
*
|
|
10
|
+
* Process termination is the application's call, not the library's — so
|
|
11
|
+
* there is no `fatal`. Apps that want to exit on a specific error do so
|
|
12
|
+
* explicitly (`process.exit`, `Bun.exit`) at the call site.
|
|
13
|
+
*/
|
|
14
|
+
type LogLevel = "trace" | "debug" | "info" | "warn" | "error";
|
|
15
|
+
/**
|
|
16
|
+
* The normalized event every sink receives.
|
|
17
|
+
*
|
|
18
|
+
* - `ts` is epoch millis (not a `Date`) — cheap to create, easy to serialize,
|
|
19
|
+
* trivially monotonic for ordering. Sinks that want ISO-8601 on the wire
|
|
20
|
+
* convert at serialization time.
|
|
21
|
+
* - `source` is the logger's namespace, stamped once at `createLogger` and
|
|
22
|
+
* carried on every event. Analogous to `tracing`'s `target`.
|
|
23
|
+
* - `message` is human text. For `warn`/`error` it's copied from the
|
|
24
|
+
* typed error's `message` field (so `event.message === event.data.message`
|
|
25
|
+
* on those levels — intentional duplication so sinks have one uniform
|
|
26
|
+
* rendering path regardless of event origin; they never need to know
|
|
27
|
+
* whether `data` is a tagged error or free-form payload). The variant
|
|
28
|
+
* template owns the phrasing; sinks just render.
|
|
29
|
+
* - `data` carries the structured payload. For `warn`/`error` it's the
|
|
30
|
+
* typed error object itself (including `name` + captured fields). For
|
|
31
|
+
* `info`/`debug`/`trace` it's free-form, caller-supplied.
|
|
32
|
+
*/
|
|
33
|
+
type LogEvent = {
|
|
34
|
+
ts: number;
|
|
35
|
+
level: LogLevel;
|
|
36
|
+
source: string;
|
|
37
|
+
message: string;
|
|
38
|
+
data?: unknown;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A sink is a callable that accepts events, with optional resource cleanup.
|
|
42
|
+
*
|
|
43
|
+
* The intersection with `Partial<AsyncDisposable>` lets the same type cover
|
|
44
|
+
* both pure functions (no-op dispose) and stateful sinks (file writers,
|
|
45
|
+
* network sockets). Callers who need guaranteed cleanup narrow to a
|
|
46
|
+
* `LogSink & AsyncDisposable` return type or bind with `await using`.
|
|
47
|
+
*/
|
|
48
|
+
type LogSink = ((event: LogEvent) => void) & Partial<AsyncDisposable>;
|
|
49
|
+
/**
|
|
50
|
+
* Accepted by `log.warn` / `log.error`. Union of two shapes:
|
|
51
|
+
*
|
|
52
|
+
* - `AnyTaggedError` — the raw tagged error `{ name, message, ...fields }`.
|
|
53
|
+
* Arrives via `result.error` after narrowing a Result.
|
|
54
|
+
* - `Err<AnyTaggedError>` — the `{ error: tagged, data: null }` wrapper
|
|
55
|
+
* that `defineErrors` factories return directly.
|
|
56
|
+
*
|
|
57
|
+
* The logger unwraps via `"name" in err` inside `unwrapLoggable` — a
|
|
58
|
+
* purely structural discriminator:
|
|
59
|
+
*
|
|
60
|
+
* - `AnyTaggedError` always has `name` at the top level (stamped by
|
|
61
|
+
* `defineErrors` from the factory key — a hard invariant of every
|
|
62
|
+
* tagged error).
|
|
63
|
+
* - `Err<AnyTaggedError>` has exactly `{ error, data }` at the top level.
|
|
64
|
+
* The tagged error's `name` lives on `err.error.name`, not `err.name`.
|
|
65
|
+
*
|
|
66
|
+
* Intentionally **not** checking `err.data === null`: that's also true for
|
|
67
|
+
* `Ok(T)` when `T = null` (see wellcrafted's `Ok(null)`/`Err(null)`
|
|
68
|
+
* structural collision edge — discussed in
|
|
69
|
+
* `docs/articles/ok-null-is-fine-err-null-is-a-lie.md`). Always discriminate
|
|
70
|
+
* by an invariant non-null property (`name` here), never by null-presence.
|
|
71
|
+
*
|
|
72
|
+
* Native `Error` instances also satisfy `AnyTaggedError` structurally
|
|
73
|
+
* (`name` and `message` are both present), so `log.warn(new Error("x"))`
|
|
74
|
+
* works out of the box — useful when migrating from `console.warn(err)`
|
|
75
|
+
* call sites that caught a plain `Error`.
|
|
76
|
+
*
|
|
77
|
+
* @example Err-wrapped (direct mint)
|
|
78
|
+
* log.warn(MyError.Thing({ cause }));
|
|
79
|
+
*
|
|
80
|
+
* @example Raw tagged (from result.error, after narrowing)
|
|
81
|
+
* if (isErr(result)) log.warn(result.error);
|
|
82
|
+
*
|
|
83
|
+
* @example Plain Error (migration from console.warn)
|
|
84
|
+
* try { risky(); } catch (e) { log.warn(e as Error); }
|
|
85
|
+
*/
|
|
86
|
+
type LoggableError = AnyTaggedError | Err<AnyTaggedError>;
|
|
87
|
+
/**
|
|
88
|
+
* The logger surface.
|
|
89
|
+
*
|
|
90
|
+
* Shape split is intentional:
|
|
91
|
+
* - `warn`/`error` take a typed error **unary** — message and structured
|
|
92
|
+
* data both live on the variant, level is chosen at the call site.
|
|
93
|
+
* - `trace`/`debug`/`info` are free-form — diagnostic events don't need
|
|
94
|
+
* enumeration and often don't have a useful "name" to dedupe on.
|
|
95
|
+
*
|
|
96
|
+
* Mirrors Rust's `tracing::warn!(?err)` vs `tracing::info!("msg", ...)`.
|
|
97
|
+
*/
|
|
98
|
+
type Logger = {
|
|
99
|
+
error(err: LoggableError): void;
|
|
100
|
+
warn(err: LoggableError): void;
|
|
101
|
+
info(message: string, data?: unknown): void;
|
|
102
|
+
debug(message: string, data?: unknown): void;
|
|
103
|
+
trace(message: string, data?: unknown): void;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=types.d.ts.map
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/logger/console-sink.d.ts
|
|
108
|
+
/**
|
|
109
|
+
* Default sink. Writes to `console.*` with a `[source]` prefix.
|
|
110
|
+
*
|
|
111
|
+
* Kept as a singleton value (not a factory) because it takes no config —
|
|
112
|
+
* adding `createConsoleSink({ format })` would be ceremony for a pattern
|
|
113
|
+
* the user can trivially replace by writing their own sink.
|
|
114
|
+
*
|
|
115
|
+
* `console[event.level]` routes directly without a detached lookup table.
|
|
116
|
+
* `LogLevel` is a subset of the Console method keys, so TS errors at this
|
|
117
|
+
* access if a future level drifts (e.g. adding `fatal`). Calling the method
|
|
118
|
+
* through `console[...]` preserves the `this` binding — avoids "Illegal
|
|
119
|
+
* invocation" in runtimes that require it.
|
|
120
|
+
*
|
|
121
|
+
* `satisfies LogSink` (not `: LogSink`) keeps the inferred callable type
|
|
122
|
+
* precise — `LogSink` is an intersection with optional dispose, and the
|
|
123
|
+
* annotation form would widen an unnecessary Partial into the value type.
|
|
124
|
+
*
|
|
125
|
+
* No dispose handler — `console` is not a resource.
|
|
126
|
+
*/
|
|
127
|
+
declare const consoleSink: (event: LogEvent) => void;
|
|
128
|
+
//# sourceMappingURL=console-sink.d.ts.map
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/logger/create-logger.d.ts
|
|
132
|
+
/**
|
|
133
|
+
* Create a logger bound to a `source` namespace and a sink.
|
|
134
|
+
*
|
|
135
|
+
* Design choices:
|
|
136
|
+
* - **Positional args, not a bag.** Two arguments, both with obvious meaning;
|
|
137
|
+
* a `{ source, sink }` object would be ceremony.
|
|
138
|
+
* - **`sink` defaults to `consoleSink`.** Most callers during development
|
|
139
|
+
* want console output with zero setup. Production apps swap it out via DI
|
|
140
|
+
* at the attach/wire-up site.
|
|
141
|
+
* - **No global default logger.** There is no `setDefaultLogger()` and no
|
|
142
|
+
* module-level registry. Every consumer takes a `log?: Logger` option
|
|
143
|
+
* and defaults to `createLogger('<source>')` if omitted. Globals make
|
|
144
|
+
* test isolation and sink composition painful.
|
|
145
|
+
* - **Method shorthand in the return object** over higher-order factories.
|
|
146
|
+
* The five methods differ in two simple ways (error-unary vs free-form,
|
|
147
|
+
* plus the level string); spelling them out beats an `emitErr("warn")`
|
|
148
|
+
* riddle.
|
|
149
|
+
*
|
|
150
|
+
* @example Library code (caller wires the sink)
|
|
151
|
+
* function attachThing(ydoc: Doc, opts: { log?: Logger }) {
|
|
152
|
+
* const log = opts.log ?? createLogger('thing');
|
|
153
|
+
* // ...
|
|
154
|
+
* }
|
|
155
|
+
*
|
|
156
|
+
* @example App wiring (share one sink, multiple loggers)
|
|
157
|
+
* const sink = composeSinks(consoleSink, myCustomSink);
|
|
158
|
+
* attachThing(ydoc, { log: createLogger('thing', sink) });
|
|
159
|
+
* attachOther(ydoc, { log: createLogger('other', sink) });
|
|
160
|
+
*/
|
|
161
|
+
declare function createLogger(source: string, sink?: LogSink): Logger;
|
|
162
|
+
//# sourceMappingURL=create-logger.d.ts.map
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/logger/memory-sink.d.ts
|
|
165
|
+
/**
|
|
166
|
+
* In-memory sink for tests. Returns `{ sink, events }` so callers can
|
|
167
|
+
* both wire the sink and inspect captured events without a module-level
|
|
168
|
+
* spy or `console.*` interception.
|
|
169
|
+
*
|
|
170
|
+
* A factory (not a singleton) so each test gets an isolated array; sharing
|
|
171
|
+
* state across tests would leak events.
|
|
172
|
+
*
|
|
173
|
+
* Returning `{ sink, events }` (rather than an array with a method) keeps
|
|
174
|
+
* the two roles separate — `sink` goes to `createLogger`, `events` goes to
|
|
175
|
+
* assertions.
|
|
176
|
+
*
|
|
177
|
+
* Uses `satisfies LogSink` on the sink expression rather than `: LogSink =`
|
|
178
|
+
* to preserve the precise inferred callable type.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* const { sink, events } = memorySink();
|
|
182
|
+
* const log = createLogger("test", sink);
|
|
183
|
+
* log.warn(MyError.Thing({ cause: new Error("boom") }));
|
|
184
|
+
* expect(events).toHaveLength(1);
|
|
185
|
+
* expect(events[0]).toMatchObject({ level: "warn", source: "test" });
|
|
186
|
+
*/
|
|
187
|
+
declare function memorySink(): {
|
|
188
|
+
sink: LogSink;
|
|
189
|
+
events: LogEvent[];
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=memory-sink.d.ts.map
|
|
192
|
+
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/logger/compose-sinks.d.ts
|
|
195
|
+
/**
|
|
196
|
+
* Fan one event out to every sink in order.
|
|
197
|
+
*
|
|
198
|
+
* Disposal: the returned sink has a `[Symbol.asyncDispose]` that forwards
|
|
199
|
+
* to each member via optional chaining. Members without dispose (e.g.
|
|
200
|
+
* `consoleSink`) are silent no-ops; members that own resources (file,
|
|
201
|
+
* network) flush and close. Mix pure and stateful sinks freely — no
|
|
202
|
+
* wrapping required.
|
|
203
|
+
*
|
|
204
|
+
* Fan-out is sequential and unguarded. If a member sink throws on emit,
|
|
205
|
+
* later members do not receive the event — by design, since swallowing
|
|
206
|
+
* sink errors hides real bugs. Wrap individual sinks yourself for
|
|
207
|
+
* best-effort delivery.
|
|
208
|
+
*
|
|
209
|
+
* Dispose is sequential and awaits each member. If one throws, later
|
|
210
|
+
* members don't get their chance; callers who want best-effort cleanup
|
|
211
|
+
* should wrap the composed dispose themselves.
|
|
212
|
+
*
|
|
213
|
+
* Built with `Object.assign` + `satisfies LogSink` rather than mutating a
|
|
214
|
+
* pre-typed `const` — avoids the widening that comes with `: LogSink =` and
|
|
215
|
+
* keeps the inferred type precise (callable + definite dispose, not
|
|
216
|
+
* callable + Partial dispose).
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* await using file = jsonlFileSink("/tmp/app.jsonl");
|
|
220
|
+
* const sink = composeSinks(consoleSink, file);
|
|
221
|
+
* const log = createLogger("source", sink);
|
|
222
|
+
*/
|
|
223
|
+
declare function composeSinks(...sinks: LogSink[]): LogSink;
|
|
224
|
+
//# sourceMappingURL=compose-sinks.d.ts.map
|
|
225
|
+
|
|
226
|
+
//#endregion
|
|
227
|
+
export { LogEvent, LogLevel, LogSink, LoggableError, Logger, composeSinks, consoleSink, createLogger, memorySink, tapErr };
|
|
228
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/logger/types.ts","../../src/logger/console-sink.ts","../../src/logger/create-logger.ts","../../src/logger/memory-sink.ts","../../src/logger/compose-sinks.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAUA;AAoBA;AAgBA;;AAA+B,KApCnB,QAAA,GAoCmB,OAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA;;;AAA4B;AAuC3D;;;;;AAAgD;AAahD;;;;AAEwB;;;;AC/ExB;KDSY,QAAA;;SAEJ;EEMQ,MAAA,EAAA,MAAA;EAAY,OAAA,EAAA,MAAA;EAAA,IAErB,CAAA,EAAA,OAAA;CAAqB;AACnB;;;;ACjBT;;;;AAA+D,KHsBnD,OAAA,GGtBmD,CAAA,CAAA,KAAA,EHsBhC,QGtBgC,EAAA,GAAA,IAAA,CAAA,GHsBX,OGtBW,CHsBH,eGtBG,CAAA;;;;ACM/D;;;;AAA0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KJuD9C,aAAA,GAAgB,iBAAiB,IAAI;;;;;;;;;;;;KAarC,MAAA;aACA;YACD;;;;;;;;;;;;;AA1FX;AAoBA;AAgBA;;;;;AAA2D;AAuC3D;;;;;AAAgD;AAapC,cC7EC,WD6EK,EAAA,CAAA,KAAA,ECtEE,QDsEF,EAAA,GAAA,IAAA;;;;;;;;;AAxFlB;AAoBA;AAgBA;;;;;AAA2D;AAuC3D;;;;;AAAgD;AAahD;;;;AAEwB;;;;AC/ExB;;;iBCiBgB,YAAA,wBAET,UACJ;AAHH;;;;;;;AF5BA;AAoBA;AAgBA;;;;;AAA2D;AAuC3D;;;;;AAAgD;AAahD;;;;AAEwB,iBG5ER,UAAA,CAAA,CH4EQ,EAAA;QG5Ec;UAAiB;;AFHvD;;;;;;;;ADXA;AAoBA;AAgBA;;;;;AAA2D;AAuC3D;;;;;AAAgD;AAahD;;;;AAEwB;;;;AC/ExB;;iBGSgB,YAAA,WAAuB,YAAY"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import "../result-DzL3K2yA.js";
|
|
2
|
+
import { tapErr } from "../tap-err-Bf6rQ4Cw.js";
|
|
3
|
+
|
|
4
|
+
//#region src/logger/console-sink.ts
|
|
5
|
+
/**
|
|
6
|
+
* Default sink. Writes to `console.*` with a `[source]` prefix.
|
|
7
|
+
*
|
|
8
|
+
* Kept as a singleton value (not a factory) because it takes no config —
|
|
9
|
+
* adding `createConsoleSink({ format })` would be ceremony for a pattern
|
|
10
|
+
* the user can trivially replace by writing their own sink.
|
|
11
|
+
*
|
|
12
|
+
* `console[event.level]` routes directly without a detached lookup table.
|
|
13
|
+
* `LogLevel` is a subset of the Console method keys, so TS errors at this
|
|
14
|
+
* access if a future level drifts (e.g. adding `fatal`). Calling the method
|
|
15
|
+
* through `console[...]` preserves the `this` binding — avoids "Illegal
|
|
16
|
+
* invocation" in runtimes that require it.
|
|
17
|
+
*
|
|
18
|
+
* `satisfies LogSink` (not `: LogSink`) keeps the inferred callable type
|
|
19
|
+
* precise — `LogSink` is an intersection with optional dispose, and the
|
|
20
|
+
* annotation form would widen an unnecessary Partial into the value type.
|
|
21
|
+
*
|
|
22
|
+
* No dispose handler — `console` is not a resource.
|
|
23
|
+
*/
|
|
24
|
+
const consoleSink = (event) => {
|
|
25
|
+
const prefix = `[${event.source}]`;
|
|
26
|
+
if (event.data === void 0) console[event.level](prefix, event.message);
|
|
27
|
+
else console[event.level](prefix, event.message, event.data);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/logger/create-logger.ts
|
|
32
|
+
/** Narrow `LoggableError` to the raw tagged object. See `LoggableError` in `types.ts` for the discriminator rationale. */
|
|
33
|
+
function unwrapLoggable(err) {
|
|
34
|
+
return "name" in err ? err : err.error;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create a logger bound to a `source` namespace and a sink.
|
|
38
|
+
*
|
|
39
|
+
* Design choices:
|
|
40
|
+
* - **Positional args, not a bag.** Two arguments, both with obvious meaning;
|
|
41
|
+
* a `{ source, sink }` object would be ceremony.
|
|
42
|
+
* - **`sink` defaults to `consoleSink`.** Most callers during development
|
|
43
|
+
* want console output with zero setup. Production apps swap it out via DI
|
|
44
|
+
* at the attach/wire-up site.
|
|
45
|
+
* - **No global default logger.** There is no `setDefaultLogger()` and no
|
|
46
|
+
* module-level registry. Every consumer takes a `log?: Logger` option
|
|
47
|
+
* and defaults to `createLogger('<source>')` if omitted. Globals make
|
|
48
|
+
* test isolation and sink composition painful.
|
|
49
|
+
* - **Method shorthand in the return object** over higher-order factories.
|
|
50
|
+
* The five methods differ in two simple ways (error-unary vs free-form,
|
|
51
|
+
* plus the level string); spelling them out beats an `emitErr("warn")`
|
|
52
|
+
* riddle.
|
|
53
|
+
*
|
|
54
|
+
* @example Library code (caller wires the sink)
|
|
55
|
+
* function attachThing(ydoc: Doc, opts: { log?: Logger }) {
|
|
56
|
+
* const log = opts.log ?? createLogger('thing');
|
|
57
|
+
* // ...
|
|
58
|
+
* }
|
|
59
|
+
*
|
|
60
|
+
* @example App wiring (share one sink, multiple loggers)
|
|
61
|
+
* const sink = composeSinks(consoleSink, myCustomSink);
|
|
62
|
+
* attachThing(ydoc, { log: createLogger('thing', sink) });
|
|
63
|
+
* attachOther(ydoc, { log: createLogger('other', sink) });
|
|
64
|
+
*/
|
|
65
|
+
function createLogger(source, sink = consoleSink) {
|
|
66
|
+
const emit = (level, message, data) => {
|
|
67
|
+
sink({
|
|
68
|
+
ts: Date.now(),
|
|
69
|
+
level,
|
|
70
|
+
source,
|
|
71
|
+
message,
|
|
72
|
+
data
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
error(err) {
|
|
77
|
+
const tagged = unwrapLoggable(err);
|
|
78
|
+
emit("error", tagged.message, tagged);
|
|
79
|
+
},
|
|
80
|
+
warn(err) {
|
|
81
|
+
const tagged = unwrapLoggable(err);
|
|
82
|
+
emit("warn", tagged.message, tagged);
|
|
83
|
+
},
|
|
84
|
+
info(message, data) {
|
|
85
|
+
emit("info", message, data);
|
|
86
|
+
},
|
|
87
|
+
debug(message, data) {
|
|
88
|
+
emit("debug", message, data);
|
|
89
|
+
},
|
|
90
|
+
trace(message, data) {
|
|
91
|
+
emit("trace", message, data);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/logger/memory-sink.ts
|
|
98
|
+
/**
|
|
99
|
+
* In-memory sink for tests. Returns `{ sink, events }` so callers can
|
|
100
|
+
* both wire the sink and inspect captured events without a module-level
|
|
101
|
+
* spy or `console.*` interception.
|
|
102
|
+
*
|
|
103
|
+
* A factory (not a singleton) so each test gets an isolated array; sharing
|
|
104
|
+
* state across tests would leak events.
|
|
105
|
+
*
|
|
106
|
+
* Returning `{ sink, events }` (rather than an array with a method) keeps
|
|
107
|
+
* the two roles separate — `sink` goes to `createLogger`, `events` goes to
|
|
108
|
+
* assertions.
|
|
109
|
+
*
|
|
110
|
+
* Uses `satisfies LogSink` on the sink expression rather than `: LogSink =`
|
|
111
|
+
* to preserve the precise inferred callable type.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* const { sink, events } = memorySink();
|
|
115
|
+
* const log = createLogger("test", sink);
|
|
116
|
+
* log.warn(MyError.Thing({ cause: new Error("boom") }));
|
|
117
|
+
* expect(events).toHaveLength(1);
|
|
118
|
+
* expect(events[0]).toMatchObject({ level: "warn", source: "test" });
|
|
119
|
+
*/
|
|
120
|
+
function memorySink() {
|
|
121
|
+
const events = [];
|
|
122
|
+
const sink = (event) => {
|
|
123
|
+
events.push(event);
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
sink,
|
|
127
|
+
events
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/logger/compose-sinks.ts
|
|
133
|
+
/**
|
|
134
|
+
* Fan one event out to every sink in order.
|
|
135
|
+
*
|
|
136
|
+
* Disposal: the returned sink has a `[Symbol.asyncDispose]` that forwards
|
|
137
|
+
* to each member via optional chaining. Members without dispose (e.g.
|
|
138
|
+
* `consoleSink`) are silent no-ops; members that own resources (file,
|
|
139
|
+
* network) flush and close. Mix pure and stateful sinks freely — no
|
|
140
|
+
* wrapping required.
|
|
141
|
+
*
|
|
142
|
+
* Fan-out is sequential and unguarded. If a member sink throws on emit,
|
|
143
|
+
* later members do not receive the event — by design, since swallowing
|
|
144
|
+
* sink errors hides real bugs. Wrap individual sinks yourself for
|
|
145
|
+
* best-effort delivery.
|
|
146
|
+
*
|
|
147
|
+
* Dispose is sequential and awaits each member. If one throws, later
|
|
148
|
+
* members don't get their chance; callers who want best-effort cleanup
|
|
149
|
+
* should wrap the composed dispose themselves.
|
|
150
|
+
*
|
|
151
|
+
* Built with `Object.assign` + `satisfies LogSink` rather than mutating a
|
|
152
|
+
* pre-typed `const` — avoids the widening that comes with `: LogSink =` and
|
|
153
|
+
* keeps the inferred type precise (callable + definite dispose, not
|
|
154
|
+
* callable + Partial dispose).
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* await using file = jsonlFileSink("/tmp/app.jsonl");
|
|
158
|
+
* const sink = composeSinks(consoleSink, file);
|
|
159
|
+
* const log = createLogger("source", sink);
|
|
160
|
+
*/
|
|
161
|
+
function composeSinks(...sinks) {
|
|
162
|
+
const emit = (event) => {
|
|
163
|
+
for (const sink of sinks) sink(event);
|
|
164
|
+
};
|
|
165
|
+
const dispose = async () => {
|
|
166
|
+
for (const sink of sinks) await sink[Symbol.asyncDispose]?.();
|
|
167
|
+
};
|
|
168
|
+
return Object.assign(emit, { [Symbol.asyncDispose]: dispose });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
export { composeSinks, consoleSink, createLogger, memorySink, tapErr };
|
|
173
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["err: LoggableError","source: string","sink: LogSink","level: LogLevel","message: string","data?: unknown","events: LogEvent[]","event: LogEvent"],"sources":["../../src/logger/console-sink.ts","../../src/logger/create-logger.ts","../../src/logger/memory-sink.ts","../../src/logger/compose-sinks.ts"],"sourcesContent":["import type { LogSink } from \"./types.js\";\n\n/**\n * Default sink. Writes to `console.*` with a `[source]` prefix.\n *\n * Kept as a singleton value (not a factory) because it takes no config —\n * adding `createConsoleSink({ format })` would be ceremony for a pattern\n * the user can trivially replace by writing their own sink.\n *\n * `console[event.level]` routes directly without a detached lookup table.\n * `LogLevel` is a subset of the Console method keys, so TS errors at this\n * access if a future level drifts (e.g. adding `fatal`). Calling the method\n * through `console[...]` preserves the `this` binding — avoids \"Illegal\n * invocation\" in runtimes that require it.\n *\n * `satisfies LogSink` (not `: LogSink`) keeps the inferred callable type\n * precise — `LogSink` is an intersection with optional dispose, and the\n * annotation form would widen an unnecessary Partial into the value type.\n *\n * No dispose handler — `console` is not a resource.\n */\nexport const consoleSink = ((event) => {\n\tconst prefix = `[${event.source}]`;\n\tif (event.data === undefined) {\n\t\tconsole[event.level](prefix, event.message);\n\t} else {\n\t\tconsole[event.level](prefix, event.message, event.data);\n\t}\n}) satisfies LogSink;\n","import type { AnyTaggedError } from \"../error/types.js\";\nimport { consoleSink } from \"./console-sink.js\";\nimport type { LoggableError, LogLevel, Logger, LogSink } from \"./types.js\";\n\n/** Narrow `LoggableError` to the raw tagged object. See `LoggableError` in `types.ts` for the discriminator rationale. */\nfunction unwrapLoggable(err: LoggableError): AnyTaggedError {\n\treturn \"name\" in err ? err : err.error;\n}\n\n/**\n * Create a logger bound to a `source` namespace and a sink.\n *\n * Design choices:\n * - **Positional args, not a bag.** Two arguments, both with obvious meaning;\n * a `{ source, sink }` object would be ceremony.\n * - **`sink` defaults to `consoleSink`.** Most callers during development\n * want console output with zero setup. Production apps swap it out via DI\n * at the attach/wire-up site.\n * - **No global default logger.** There is no `setDefaultLogger()` and no\n * module-level registry. Every consumer takes a `log?: Logger` option\n * and defaults to `createLogger('<source>')` if omitted. Globals make\n * test isolation and sink composition painful.\n * - **Method shorthand in the return object** over higher-order factories.\n * The five methods differ in two simple ways (error-unary vs free-form,\n * plus the level string); spelling them out beats an `emitErr(\"warn\")`\n * riddle.\n *\n * @example Library code (caller wires the sink)\n * function attachThing(ydoc: Doc, opts: { log?: Logger }) {\n * const log = opts.log ?? createLogger('thing');\n * // ...\n * }\n *\n * @example App wiring (share one sink, multiple loggers)\n * const sink = composeSinks(consoleSink, myCustomSink);\n * attachThing(ydoc, { log: createLogger('thing', sink) });\n * attachOther(ydoc, { log: createLogger('other', sink) });\n */\nexport function createLogger(\n\tsource: string,\n\tsink: LogSink = consoleSink,\n): Logger {\n\tconst emit = (level: LogLevel, message: string, data?: unknown): void => {\n\t\tsink({ ts: Date.now(), level, source, message, data });\n\t};\n\treturn {\n\t\terror(err) {\n\t\t\tconst tagged = unwrapLoggable(err);\n\t\t\temit(\"error\", tagged.message, tagged);\n\t\t},\n\t\twarn(err) {\n\t\t\tconst tagged = unwrapLoggable(err);\n\t\t\temit(\"warn\", tagged.message, tagged);\n\t\t},\n\t\tinfo(message, data) {\n\t\t\temit(\"info\", message, data);\n\t\t},\n\t\tdebug(message, data) {\n\t\t\temit(\"debug\", message, data);\n\t\t},\n\t\ttrace(message, data) {\n\t\t\temit(\"trace\", message, data);\n\t\t},\n\t};\n}\n","import type { LogEvent, LogSink } from \"./types.js\";\n\n/**\n * In-memory sink for tests. Returns `{ sink, events }` so callers can\n * both wire the sink and inspect captured events without a module-level\n * spy or `console.*` interception.\n *\n * A factory (not a singleton) so each test gets an isolated array; sharing\n * state across tests would leak events.\n *\n * Returning `{ sink, events }` (rather than an array with a method) keeps\n * the two roles separate — `sink` goes to `createLogger`, `events` goes to\n * assertions.\n *\n * Uses `satisfies LogSink` on the sink expression rather than `: LogSink =`\n * to preserve the precise inferred callable type.\n *\n * @example\n * const { sink, events } = memorySink();\n * const log = createLogger(\"test\", sink);\n * log.warn(MyError.Thing({ cause: new Error(\"boom\") }));\n * expect(events).toHaveLength(1);\n * expect(events[0]).toMatchObject({ level: \"warn\", source: \"test\" });\n */\nexport function memorySink(): { sink: LogSink; events: LogEvent[] } {\n\tconst events: LogEvent[] = [];\n\tconst sink = ((event) => {\n\t\tevents.push(event);\n\t}) satisfies LogSink;\n\treturn { sink, events };\n}\n","import type { LogEvent, LogSink } from \"./types.js\";\n\n/**\n * Fan one event out to every sink in order.\n *\n * Disposal: the returned sink has a `[Symbol.asyncDispose]` that forwards\n * to each member via optional chaining. Members without dispose (e.g.\n * `consoleSink`) are silent no-ops; members that own resources (file,\n * network) flush and close. Mix pure and stateful sinks freely — no\n * wrapping required.\n *\n * Fan-out is sequential and unguarded. If a member sink throws on emit,\n * later members do not receive the event — by design, since swallowing\n * sink errors hides real bugs. Wrap individual sinks yourself for\n * best-effort delivery.\n *\n * Dispose is sequential and awaits each member. If one throws, later\n * members don't get their chance; callers who want best-effort cleanup\n * should wrap the composed dispose themselves.\n *\n * Built with `Object.assign` + `satisfies LogSink` rather than mutating a\n * pre-typed `const` — avoids the widening that comes with `: LogSink =` and\n * keeps the inferred type precise (callable + definite dispose, not\n * callable + Partial dispose).\n *\n * @example\n * await using file = jsonlFileSink(\"/tmp/app.jsonl\");\n * const sink = composeSinks(consoleSink, file);\n * const log = createLogger(\"source\", sink);\n */\nexport function composeSinks(...sinks: LogSink[]): LogSink {\n\tconst emit = (event: LogEvent) => {\n\t\tfor (const sink of sinks) sink(event);\n\t};\n\tconst dispose = async (): Promise<void> => {\n\t\tfor (const sink of sinks) await sink[Symbol.asyncDispose]?.();\n\t};\n\treturn Object.assign(emit, {\n\t\t[Symbol.asyncDispose]: dispose,\n\t}) satisfies LogSink;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,cAAe,CAAC,UAAU;CACtC,MAAM,SAAS,CAAC,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC;AAClC,KAAI,MAAM,gBACT,SAAQ,MAAM,OAAO,QAAQ,MAAM,QAAQ;KAE3C,SAAQ,MAAM,OAAO,QAAQ,MAAM,SAAS,MAAM,KAAK;AAExD;;;;;ACvBD,SAAS,eAAeA,KAAoC;AAC3D,QAAO,UAAU,MAAM,MAAM,IAAI;AACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BD,SAAgB,aACfC,QACAC,OAAgB,aACP;CACT,MAAM,OAAO,CAACC,OAAiBC,SAAiBC,SAAyB;AACxE,OAAK;GAAE,IAAI,KAAK,KAAK;GAAE;GAAO;GAAQ;GAAS;EAAM,EAAC;CACtD;AACD,QAAO;EACN,MAAM,KAAK;GACV,MAAM,SAAS,eAAe,IAAI;AAClC,QAAK,SAAS,OAAO,SAAS,OAAO;EACrC;EACD,KAAK,KAAK;GACT,MAAM,SAAS,eAAe,IAAI;AAClC,QAAK,QAAQ,OAAO,SAAS,OAAO;EACpC;EACD,KAAK,SAAS,MAAM;AACnB,QAAK,QAAQ,SAAS,KAAK;EAC3B;EACD,MAAM,SAAS,MAAM;AACpB,QAAK,SAAS,SAAS,KAAK;EAC5B;EACD,MAAM,SAAS,MAAM;AACpB,QAAK,SAAS,SAAS,KAAK;EAC5B;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;ACxCD,SAAgB,aAAoD;CACnE,MAAMC,SAAqB,CAAE;CAC7B,MAAM,OAAQ,CAAC,UAAU;AACxB,SAAO,KAAK,MAAM;CAClB;AACD,QAAO;EAAE;EAAM;CAAQ;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAD,SAAgB,aAAa,GAAG,OAA2B;CAC1D,MAAM,OAAO,CAACC,UAAoB;AACjC,OAAK,MAAM,QAAQ,MAAO,MAAK,MAAM;CACrC;CACD,MAAM,UAAU,YAA2B;AAC1C,OAAK,MAAM,QAAQ,MAAO,OAAM,KAAK,OAAO,iBAAiB;CAC7D;AACD,QAAO,OAAO,OAAO,MAAM,GACzB,OAAO,eAAe,QACvB,EAAC;AACF"}
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Result } from "../result-
|
|
2
|
-
import "../
|
|
1
|
+
import { Result } from "../result-BongGO2O.js";
|
|
2
|
+
import "../tap-err-Bqs9aQpZ.js";
|
|
3
|
+
import "../index-mb9iYu0a.js";
|
|
3
4
|
import { DefaultError, MutationFunction, MutationKey, MutationOptions, QueryClient, QueryFunction, QueryKey, QueryObserverOptions } from "@tanstack/query-core";
|
|
4
5
|
|
|
5
6
|
//#region src/query/utils.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/query/utils.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/query/utils.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAUmE;;;;;;;;KAc9D,gBAO+B,CAAA,eAAA,OAAA,EAAA,SAL1B,YAK0B,EAAA,QAJ3B,YAI2B,EAAA,aAHtB,YAGsB,EAAA,kBAFjB,QAEiB,GAFN,QAEM,CAAA,GADhC,IACgC,CAAnC,oBAAmC,CAAd,YAAc,EAAA,MAAA,EAAQ,KAAR,EAAe,UAAf,EAA2B,SAA3B,CAAA,EAAA,SAAA,CAAA,GAAA;EAAM,QAAE,EAGjC,SAHiC;EAAK,OAAE,EAIzC,aAJyC,CAI3B,MAJ2B,CAIpB,YAJoB,EAIN,MAJM,CAAA,EAIG,SAJH,CAAA;CAAU;;;;;;;;;AAItC;AAAA;;;;;;;;;;;;;;;;;;;;;;;;KAoClB,iBAeU,CAAA,eAAA,OAAA,EAAA,SAbL,YAaK,EAAA,QAZN,YAYM,EAAA,aAXD,YAWC,EAAA,kBAVI,QAUJ,GAVe,QAUf,CAAA,GAAA,CAAA,GAAA,GATJ,OASI,CATI,MASJ,CATW,UASX,EATuB,MASvB,CAAA,CAAA,CAAA,GAAA;EAAO,OAAA,EARZ,oBAQY,CAPpB,YAOoB,EANpB,MAMoB,EALpB,KAKoB,EAJpB,UAIoB,EAHpB,SAGoB,CAAA;EAejB,KAAA,EAAA,GAAA,GAhBS,OAgBT,CAhBiB,MAgBE,CAhBK,UAgBL,EAhBiB,MAgBjB,CAAA,CAAA;EAAA,MAAA,EAAA,GAAA,GAfT,OAeS,CAfD,MAeC,CAfM,UAeN,EAfkB,MAelB,CAAA,CAAA;CAAA;;;;;;;;;;;;AAOK;AAAA,KAPxB,mBAyCA,CAAA,KAAoB,EAAA,MAAA,EAAA,aAAA,IAAA,EAAA,WAAA,OAAA,CAAA,GApCrB,IAoCqB,CApChB,eAoCgB,CApCA,KAoCA,EApCO,MAoCP,EApCe,UAoCf,EApC2B,QAoC3B,CAAA,EAAA,YAAA,CAAA,GAAA;EAAA,WAAA,EAnCX,WAmCW;EAAA,UAKR,EAvCJ,gBAuCI,CAvCa,MAuCb,CAvCoB,KAuCpB,EAvC2B,MAuC3B,CAAA,EAvCoC,UAuCpC,CAAA;CAAU;;;;;;;;;;;;;;AAEiB;AA6C5C;;;;;;;;;;;;;;;;;KApDK,oBAmI0D,CAAA,KAAA,EAAA,MAAA,EAAA,aAAA,IAAA,EAAA,WAAA,OAAA,CAAA,GAAA,CAAA,CAAA,SAAA,EA9H9C,UA8H8C,EAAA,GA9H/B,OA8H+B,CA9HvB,MA8HuB,CA9HhB,KA8HgB,EA9HT,MA8HS,CAAA,CAAA,CAAA,GAAA;EAAS,OAApE,EA7HM,eA6HN,CA7HsB,KA6HtB,EA7H6B,MA6H7B,EA7HqC,UA6HrC,EA7HiD,QA6HjD,CAAA;EAAiB,OA8LU,EAAA,CAAA,SAAA,EA1TT,UA0TS,EAAA,GA1TM,OA0TN,CA1Tc,MA0Td,CA1TqB,KA0TrB,EA1T4B,MA0T5B,CAAA,CAAA;CAAK;;;;;;;;;AACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9QR,oBAAA,cAAkC;iDAmE1C,eACD,2BACK,gCACQ,wCAET,iBACR,cACA,QACA,OACA,YACA,eAEC,kBAAkB,cAAc,QAAQ,OAAO,YAAY;kFA8LpD,oBAAoB,OAAO,QAAQ,YAAY,cACtD,qBAAqB,OAAO,QAAQ,YAAY"}
|
package/dist/query/index.js
CHANGED