@f0rbit/corpus 0.1.9 → 0.2.1
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/backend/base.d.ts +23 -0
- package/dist/backend/base.d.ts.map +1 -0
- package/dist/backend/base.js +101 -0
- package/dist/backend/cloudflare.d.ts.map +1 -1
- package/dist/backend/cloudflare.js +6 -5
- package/dist/backend/file.d.ts.map +1 -1
- package/dist/backend/file.js +38 -76
- package/dist/backend/layered.d.ts.map +1 -1
- package/dist/backend/layered.js +5 -1
- package/dist/backend/memory.d.ts.map +1 -1
- package/dist/backend/memory.js +18 -69
- package/dist/backends.d.ts +1 -0
- package/dist/backends.d.ts.map +1 -1
- package/dist/backends.js +1 -0
- package/dist/cloudflare.d.ts +1 -0
- package/dist/cloudflare.d.ts.map +1 -1
- package/dist/cloudflare.js +1 -0
- package/dist/concurrency.d.ts +78 -0
- package/dist/concurrency.d.ts.map +1 -0
- package/dist/concurrency.js +108 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -10
- package/dist/observations/index.d.ts +1 -1
- package/dist/observations/index.d.ts.map +1 -1
- package/dist/observations/storage.d.ts +33 -4
- package/dist/observations/storage.d.ts.map +1 -1
- package/dist/observations/storage.js +63 -43
- package/dist/observations/utils.d.ts.map +1 -1
- package/dist/observations/utils.js +5 -2
- package/dist/result.d.ts +361 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +410 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +39 -6
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +47 -15
- package/package.json +1 -1
package/dist/result.d.ts
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Result
|
|
3
|
+
* @description Extended utilities for working with Result types.
|
|
4
|
+
*
|
|
5
|
+
* Provides functional utilities for error handling without exceptions:
|
|
6
|
+
* - Pattern matching with `match`
|
|
7
|
+
* - Safe unwrapping with `unwrap_or`, `unwrap`, `unwrap_err`
|
|
8
|
+
* - Exception-to-Result conversion with `try_catch`, `try_catch_async`
|
|
9
|
+
* - Fetch wrapper with `fetch_result`
|
|
10
|
+
* - Composable pipelines with `pipe`
|
|
11
|
+
*/
|
|
12
|
+
import { type Result } from "./types";
|
|
13
|
+
/**
|
|
14
|
+
* Pattern match on a Result, extracting the value with appropriate handler.
|
|
15
|
+
*
|
|
16
|
+
* @param result - The Result to match on
|
|
17
|
+
* @param on_ok - Handler for success case
|
|
18
|
+
* @param on_err - Handler for error case
|
|
19
|
+
* @returns The return value of the matching handler
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const result = await fetchUser(id)
|
|
24
|
+
* const message = match(
|
|
25
|
+
* result,
|
|
26
|
+
* user => `Hello, ${user.name}!`,
|
|
27
|
+
* error => `Failed: ${error.message}`
|
|
28
|
+
* )
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const match: <T, E, R>(result: Result<T, E>, on_ok: (value: T) => R, on_err: (error: E) => R) => R;
|
|
32
|
+
/**
|
|
33
|
+
* Extract value from Result, returning default if error.
|
|
34
|
+
*
|
|
35
|
+
* @param result - The Result to unwrap
|
|
36
|
+
* @param default_value - Value to return if Result is an error
|
|
37
|
+
* @returns The success value or default
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const users = unwrap_or(await fetchUsers(), [])
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const unwrap_or: <T, E>(result: Result<T, E>, default_value: T) => T;
|
|
45
|
+
/**
|
|
46
|
+
* Extract value from Result, throwing if error.
|
|
47
|
+
* Use only when you're certain the Result is Ok, or in tests.
|
|
48
|
+
*
|
|
49
|
+
* @param result - The Result to unwrap
|
|
50
|
+
* @returns The success value
|
|
51
|
+
* @throws Error if Result is an error
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // In tests
|
|
56
|
+
* const user = unwrap(await createUser(data))
|
|
57
|
+
* expect(user.name).toBe('Alice')
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const unwrap: <T, E>(result: Result<T, E>) => T;
|
|
61
|
+
/**
|
|
62
|
+
* Extract error from Result, throwing if Ok.
|
|
63
|
+
* Use only when you're certain the Result is Err, or in tests.
|
|
64
|
+
*
|
|
65
|
+
* @param result - The Result to unwrap
|
|
66
|
+
* @returns The error value
|
|
67
|
+
* @throws Error if Result is Ok
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* // In tests
|
|
72
|
+
* const error = unwrap_err(await createUser(invalidData))
|
|
73
|
+
* expect(error.kind).toBe('validation_error')
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare const unwrap_err: <T, E>(result: Result<T, E>) => E;
|
|
77
|
+
/**
|
|
78
|
+
* Execute a function and convert exceptions to Result.
|
|
79
|
+
*
|
|
80
|
+
* @param fn - Function to execute
|
|
81
|
+
* @param on_error - Transform caught exception to error type
|
|
82
|
+
* @returns Result containing success value or transformed error
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const result = try_catch(
|
|
87
|
+
* () => JSON.parse(input),
|
|
88
|
+
* e => ({ kind: 'parse_error', message: format_error(e) })
|
|
89
|
+
* )
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare const try_catch: <T, E>(fn: () => T, on_error: (e: unknown) => E) => Result<T, E>;
|
|
93
|
+
/**
|
|
94
|
+
* Execute an async function and convert exceptions to Result.
|
|
95
|
+
*
|
|
96
|
+
* @param fn - Async function to execute
|
|
97
|
+
* @param on_error - Transform caught exception to error type
|
|
98
|
+
* @returns Promise of Result containing success value or transformed error
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* const result = await try_catch_async(
|
|
103
|
+
* () => db.query('SELECT * FROM users'),
|
|
104
|
+
* e => ({ kind: 'database_error', cause: e })
|
|
105
|
+
* )
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare const try_catch_async: <T, E>(fn: () => Promise<T>, on_error: (e: unknown) => E) => Promise<Result<T, E>>;
|
|
109
|
+
/**
|
|
110
|
+
* Error types for fetch operations.
|
|
111
|
+
*/
|
|
112
|
+
export type FetchError = {
|
|
113
|
+
type: "network";
|
|
114
|
+
cause: unknown;
|
|
115
|
+
} | {
|
|
116
|
+
type: "http";
|
|
117
|
+
status: number;
|
|
118
|
+
status_text: string;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Fetch wrapper that returns Result instead of throwing.
|
|
122
|
+
*
|
|
123
|
+
* @param input - URL or Request to fetch
|
|
124
|
+
* @param init - Fetch options
|
|
125
|
+
* @param on_error - Transform FetchError to your error type
|
|
126
|
+
* @param parse_body - Custom body parser (defaults to JSON)
|
|
127
|
+
* @returns Promise of Result with parsed response or error
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const result = await fetch_result(
|
|
132
|
+
* 'https://api.example.com/users',
|
|
133
|
+
* { headers: { Authorization: `Bearer ${token}` } },
|
|
134
|
+
* e => e.type === 'http' ? `HTTP ${e.status}` : 'Network error'
|
|
135
|
+
* )
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
export declare const fetch_result: <T, E>(input: string | URL | Request, init: RequestInit | undefined, on_error: (e: FetchError) => E, parse_body?: (response: Response) => Promise<T>) => Promise<Result<T, E>>;
|
|
139
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
140
|
+
/**
|
|
141
|
+
* A composable pipeline for chaining Result operations.
|
|
142
|
+
*
|
|
143
|
+
* All operations are lazy - nothing executes until `.result()` or `.unwrap_or()` is called.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const user = await pipe(fetchUser(id))
|
|
148
|
+
* .map(user => user.profile)
|
|
149
|
+
* .flat_map(profile => fetchAvatar(profile.avatar_id))
|
|
150
|
+
* .map(avatar => avatar.url)
|
|
151
|
+
* .unwrap_or('/default-avatar.png')
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export type Pipe<T, E> = {
|
|
155
|
+
/** Transform the success value */
|
|
156
|
+
map: <U>(fn: (value: T) => U) => Pipe<U, E>;
|
|
157
|
+
/** Transform the success value with an async function */
|
|
158
|
+
map_async: <U>(fn: (value: T) => Promise<U>) => Pipe<U, E>;
|
|
159
|
+
/** Chain with another Result-returning operation */
|
|
160
|
+
flat_map: <U>(fn: (value: T) => MaybePromise<Result<U, E>>) => Pipe<U, E>;
|
|
161
|
+
/** Transform the error value */
|
|
162
|
+
map_err: <F>(fn: (error: E) => F) => Pipe<T, F>;
|
|
163
|
+
/** Execute side effect on success (logging, metrics) */
|
|
164
|
+
tap: (fn: (value: T) => MaybePromise<void>) => Pipe<T, E>;
|
|
165
|
+
/** Execute side effect on error */
|
|
166
|
+
tap_err: (fn: (error: E) => MaybePromise<void>) => Pipe<T, E>;
|
|
167
|
+
/** Extract value with fallback */
|
|
168
|
+
unwrap_or: (default_value: T) => Promise<T>;
|
|
169
|
+
/** Get the underlying Result */
|
|
170
|
+
result: () => Promise<Result<T, E>>;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Create a composable pipeline from a Result or Promise<Result>.
|
|
174
|
+
*
|
|
175
|
+
* @param initial - Starting Result value (sync or async)
|
|
176
|
+
* @returns A Pipe for chaining operations
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* // From existing Result
|
|
181
|
+
* const result = await pipe(ok(42))
|
|
182
|
+
* .map(n => n * 2)
|
|
183
|
+
* .result()
|
|
184
|
+
*
|
|
185
|
+
* // From async operation
|
|
186
|
+
* const user = await pipe(fetchUser(id))
|
|
187
|
+
* .flat_map(u => fetchProfile(u.id))
|
|
188
|
+
* .result()
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
export declare const pipe: {
|
|
192
|
+
<T, E>(initial: MaybePromise<Result<T, E>>): Pipe<T, E>;
|
|
193
|
+
ok<T>(value: T): Pipe<T, never>;
|
|
194
|
+
err<E>(error: E): Pipe<never, E>;
|
|
195
|
+
try<T, E>(fn: () => Promise<T>, on_error: (e: unknown) => E): Pipe<T, E>;
|
|
196
|
+
fetch<T, E>(input: string | URL | Request, init: RequestInit | undefined, on_error: (e: FetchError) => E, parse_body?: (response: Response) => Promise<T>): Pipe<T, E>;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Extract value from Result, returning null for any error.
|
|
200
|
+
* Use for "fetch single resource" patterns where not-found is expected.
|
|
201
|
+
*
|
|
202
|
+
* @param result - The Result to convert
|
|
203
|
+
* @returns The value or null
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* const user = to_nullable(await store.get(userId))
|
|
208
|
+
* if (!user) return <NotFound />
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
export declare const to_nullable: <T, E>(result: Result<T, E>) => T | null;
|
|
212
|
+
/**
|
|
213
|
+
* Extract value from Result, returning fallback for any error.
|
|
214
|
+
* Use for list endpoints where empty array is acceptable.
|
|
215
|
+
*
|
|
216
|
+
* @param result - The Result to convert
|
|
217
|
+
* @param fallback - Value to return on error
|
|
218
|
+
* @returns The value or fallback
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* const items = to_fallback(await store.list(), [])
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
export declare const to_fallback: <T, E>(result: Result<T, E>, fallback: T) => T;
|
|
226
|
+
/**
|
|
227
|
+
* Return null if error matches predicate, otherwise throw the error.
|
|
228
|
+
* Use for 404-as-null pattern specifically.
|
|
229
|
+
*
|
|
230
|
+
* @param result - The Result to check
|
|
231
|
+
* @param predicate - Returns true for expected errors (e.g., not_found)
|
|
232
|
+
* @returns The value or null for expected errors
|
|
233
|
+
* @throws The error if predicate returns false
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```ts
|
|
237
|
+
* const user = null_on(
|
|
238
|
+
* await store.get(id),
|
|
239
|
+
* e => e.kind === 'not_found'
|
|
240
|
+
* )
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
export declare const null_on: <T, E>(result: Result<T, E>, predicate: (error: E) => boolean) => T | null;
|
|
244
|
+
/**
|
|
245
|
+
* Return fallback if error matches predicate, otherwise throw.
|
|
246
|
+
*
|
|
247
|
+
* @param result - The Result to check
|
|
248
|
+
* @param predicate - Returns true for expected errors
|
|
249
|
+
* @param fallback - Value to return for expected errors
|
|
250
|
+
* @returns The value or fallback for expected errors
|
|
251
|
+
* @throws The error if predicate returns false
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```ts
|
|
255
|
+
* const count = fallback_on(
|
|
256
|
+
* await store.count(),
|
|
257
|
+
* e => e.kind === 'not_found',
|
|
258
|
+
* 0
|
|
259
|
+
* )
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export declare const fallback_on: <T, E>(result: Result<T, E>, predicate: (error: E) => boolean, fallback: T) => T;
|
|
263
|
+
/**
|
|
264
|
+
* Format an unknown error to a string message.
|
|
265
|
+
*
|
|
266
|
+
* @param e - Any error value
|
|
267
|
+
* @returns A string representation
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```ts
|
|
271
|
+
* try {
|
|
272
|
+
* riskyOperation()
|
|
273
|
+
* } catch (e) {
|
|
274
|
+
* console.error(format_error(e)) // Handles Error, string, or anything
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
export declare const format_error: (e: unknown) => string;
|
|
279
|
+
/**
|
|
280
|
+
* Recursively makes all properties of T optional.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```ts
|
|
284
|
+
* type Config = { api: { url: string; timeout: number } }
|
|
285
|
+
* type PartialConfig = DeepPartial<Config>
|
|
286
|
+
* // { api?: { url?: string; timeout?: number } }
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
export type DeepPartial<T> = T extends object ? {
|
|
290
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
291
|
+
} : T;
|
|
292
|
+
/**
|
|
293
|
+
* Deep merge two objects, with overrides taking precedence.
|
|
294
|
+
* Only merges plain objects; arrays and null are replaced entirely.
|
|
295
|
+
*
|
|
296
|
+
* @param base - The base object to merge into
|
|
297
|
+
* @param overrides - Partial object with values to override
|
|
298
|
+
* @returns A new object with merged values
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* ```ts
|
|
302
|
+
* const config = merge_deep(
|
|
303
|
+
* { api: { url: 'http://localhost', timeout: 5000 }, debug: false },
|
|
304
|
+
* { api: { timeout: 10000 } }
|
|
305
|
+
* )
|
|
306
|
+
* // { api: { url: 'http://localhost', timeout: 10000 }, debug: false }
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
export declare const merge_deep: <T extends Record<string, unknown>>(base: T, overrides: DeepPartial<T>) => T;
|
|
310
|
+
/**
|
|
311
|
+
* Safely access an array element by index, returning a Result.
|
|
312
|
+
* Unlike bracket notation, this never returns undefined for out-of-bounds access.
|
|
313
|
+
*
|
|
314
|
+
* @param array - The array to access
|
|
315
|
+
* @param index - The index to retrieve (must be non-negative)
|
|
316
|
+
* @returns Result containing the element or an index_out_of_bounds error
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```ts
|
|
320
|
+
* const items = ['a', 'b', 'c']
|
|
321
|
+
* const second = at(items, 1) // { ok: true, value: 'b' }
|
|
322
|
+
* const tenth = at(items, 10) // { ok: false, error: { kind: 'index_out_of_bounds', index: 10, length: 3 } }
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
export declare const at: <T>(array: readonly T[], index: number) => Result<T, {
|
|
326
|
+
kind: "index_out_of_bounds";
|
|
327
|
+
index: number;
|
|
328
|
+
length: number;
|
|
329
|
+
}>;
|
|
330
|
+
/**
|
|
331
|
+
* Safely get the first element of an array.
|
|
332
|
+
*
|
|
333
|
+
* @param array - The array to access
|
|
334
|
+
* @returns Result containing the first element or an empty_array error
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* const head = first([1, 2, 3]) // { ok: true, value: 1 }
|
|
339
|
+
* const empty = first([]) // { ok: false, error: { kind: 'empty_array' } }
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
export declare const first: <T>(array: readonly T[]) => Result<T, {
|
|
343
|
+
kind: "empty_array";
|
|
344
|
+
}>;
|
|
345
|
+
/**
|
|
346
|
+
* Safely get the last element of an array.
|
|
347
|
+
*
|
|
348
|
+
* @param array - The array to access
|
|
349
|
+
* @returns Result containing the last element or an empty_array error
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```ts
|
|
353
|
+
* const tail = last([1, 2, 3]) // { ok: true, value: 3 }
|
|
354
|
+
* const empty = last([]) // { ok: false, error: { kind: 'empty_array' } }
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
export declare const last: <T>(array: readonly T[]) => Result<T, {
|
|
358
|
+
kind: "empty_array";
|
|
359
|
+
}>;
|
|
360
|
+
export {};
|
|
361
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,GAAI,CAA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