@orieljs/framework 0.1.0-alpha.4 → 0.1.0-alpha.5
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/{chunk-3DETYZMZ.js → chunk-A5XRLEWM.js} +3 -3
- package/dist/{chunk-WSGWYXAO.js → chunk-BSQKOLSK.js} +3 -1
- package/dist/chunk-BSQKOLSK.js.map +1 -0
- package/dist/{chunk-DCI2T7WJ.js → chunk-PM5YTG57.js} +117 -3
- package/dist/chunk-PM5YTG57.js.map +1 -0
- package/dist/{chunk-SBZQ6L3Z.js → chunk-WNJP46B7.js} +563 -73
- package/dist/chunk-WNJP46B7.js.map +1 -0
- package/dist/contracts.d.ts +43 -1
- package/dist/contracts.js +3 -1
- package/dist/index.d.ts +391 -52
- package/dist/index.js +610 -144
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.js +3 -3
- package/dist/{testing-D3dCOkTm.d.ts → testing-BErengYY.d.ts} +89 -12
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +3 -3
- package/package.json +30 -30
- package/dist/chunk-DCI2T7WJ.js.map +0 -1
- package/dist/chunk-SBZQ6L3Z.js.map +0 -1
- package/dist/chunk-WSGWYXAO.js.map +0 -1
- /package/dist/{chunk-3DETYZMZ.js.map → chunk-A5XRLEWM.js.map} +0 -0
package/dist/jsx-runtime.js
CHANGED
|
@@ -233,6 +233,8 @@ interface ModelInstance {
|
|
|
233
233
|
getTable(): string;
|
|
234
234
|
getRouteKey(): unknown;
|
|
235
235
|
getRouteKeyName(): string;
|
|
236
|
+
/** The value stored in a polymorphic `*_type` column for this model: its morph map alias, else its class name. */
|
|
237
|
+
getMorphClass(): string;
|
|
236
238
|
getAttribute<T = unknown>(key: string): T;
|
|
237
239
|
setAttribute(key: string, value: unknown): this;
|
|
238
240
|
fill(attributes: Row): this;
|
|
@@ -285,6 +287,11 @@ declare const AuthFactory: Token$2<AuthFactory>;
|
|
|
285
287
|
|
|
286
288
|
/** Options a job class may declare as public fields. Their presence (or implementing ShouldQueue) makes things queueable. */
|
|
287
289
|
interface ShouldQueue {
|
|
290
|
+
/**
|
|
291
|
+
* Marks the class as queued at run time: `implements ShouldQueue` leaves no trace once compiled, so the interface
|
|
292
|
+
* asks for `readonly shouldQueue = true`. Jobs, listeners, mailables and notifications carrying it are queued.
|
|
293
|
+
*/
|
|
294
|
+
readonly shouldQueue: true;
|
|
288
295
|
connection?: string;
|
|
289
296
|
queue?: string;
|
|
290
297
|
/** Seconds. */
|
|
@@ -1480,6 +1487,7 @@ interface StoredFile {
|
|
|
1480
1487
|
mimeType: string | undefined;
|
|
1481
1488
|
modified: Date;
|
|
1482
1489
|
}
|
|
1490
|
+
/** By the extension as PHP's pathinfo() reads it: after the last dot of the base name ('.pdf' is a PDF, 'pdf' isn't). */
|
|
1483
1491
|
declare function guessMimeType(path: string): string | undefined;
|
|
1484
1492
|
/**
|
|
1485
1493
|
* An in-memory disk implementing the Filesystem contract, with Laravel's fake-disk assertions. (Laravel's fake
|
|
@@ -1500,7 +1508,12 @@ declare class FakeDisk implements Filesystem {
|
|
|
1500
1508
|
readStream(path: string): Promise<ReadableStream<Uint8Array>>;
|
|
1501
1509
|
put(path: string, contents: string | Uint8Array | ReadableStream<Uint8Array>, options?: PutOptions): Promise<boolean>;
|
|
1502
1510
|
putFile(directory: string, file: UploadedFile$1, options?: PutOptions): Promise<string>;
|
|
1511
|
+
/**
|
|
1512
|
+
* The upload's own type, as the S3 disk sends it: its extension(), never the MIME type the client sent as such nor
|
|
1513
|
+
* the stored name's type.
|
|
1514
|
+
*/
|
|
1503
1515
|
putFileAs(directory: string, file: UploadedFile$1, name: string, options?: PutOptions): Promise<string>;
|
|
1516
|
+
private write;
|
|
1504
1517
|
delete(paths: string | string[]): Promise<boolean>;
|
|
1505
1518
|
copy(from: string, to: string): Promise<boolean>;
|
|
1506
1519
|
move(from: string, to: string): Promise<boolean>;
|
|
@@ -1560,9 +1573,17 @@ declare class StorageFake implements FilesystemManager {
|
|
|
1560
1573
|
|
|
1561
1574
|
/** Laravel's UploadedFile::fake(): File objects to post as multipart uploads (t.post(uri, { avatar: file })). */
|
|
1562
1575
|
declare const FakeFile: {
|
|
1563
|
-
/**
|
|
1576
|
+
/**
|
|
1577
|
+
* A file of `kilobytes` KiB typed by `mimeType` or the name's extension. Validation reads a file's bytes, so the
|
|
1578
|
+
* file starts like its type (a PDF's `%PDF-`, a PNG's signature, text for text types) and passes `mimes` for its
|
|
1579
|
+
* name, as Laravel's fakes do. It is at least its type's leading bytes and never empty, whatever the size asked for.
|
|
1580
|
+
* An image made this way has no readable size: use image() for `dimensions`.
|
|
1581
|
+
*/
|
|
1564
1582
|
create(name: string, kilobytes?: number, mimeType?: string): File;
|
|
1565
|
-
/**
|
|
1583
|
+
/**
|
|
1584
|
+
* A real white image of the given size in the format the name's extension asks for: png, jpg/jpeg, gif, webp or
|
|
1585
|
+
* bmp (any other name gets a JPEG, as Laravel's fakes do), so image, mimes and dimensions pass on it.
|
|
1586
|
+
*/
|
|
1566
1587
|
image(name: string, width?: number, height?: number): File;
|
|
1567
1588
|
};
|
|
1568
1589
|
|
|
@@ -2093,9 +2114,11 @@ declare class LiveComponentManager implements LiveManager {
|
|
|
2093
2114
|
update(request: LiveUpdateRequest): Promise<LiveUpdateResponse>;
|
|
2094
2115
|
updateComponent(snapshotJson: string, updates: Record<string, unknown>, calls: Call[]): Promise<ComponentResult>;
|
|
2095
2116
|
/**
|
|
2096
|
-
* The route action of POST /oriel/live/update. Each component's update runs behind the
|
|
2097
|
-
* that rendered its page (Livewire's
|
|
2098
|
-
*
|
|
2117
|
+
* The route action of POST /oriel/live/update. Each component's update runs behind the persistent middleware of the
|
|
2118
|
+
* route that rendered its page (Livewire's): `auth`, `verified`, `guest` and `can`, with the page route's parameters
|
|
2119
|
+
* bound again. A signed-out tab gets a 401, a revoked ability a 403 and a deleted model a 404, before the component
|
|
2120
|
+
* hydrates. When a middleware answers instead (a redirect), that is the response. A key first flashed during the
|
|
2121
|
+
* update shows in this response only, unless the update redirects.
|
|
2099
2122
|
*/
|
|
2100
2123
|
handle(request: HttpRequest): Promise<LiveUpdateResponse | Response>;
|
|
2101
2124
|
/** A full-page component (Route.get('/counter', Counter)): mounted with the route parameters, inside the layout. */
|
|
@@ -2110,8 +2133,14 @@ declare class LiveComponentManager implements LiveManager {
|
|
|
2110
2133
|
private applyUpdate;
|
|
2111
2134
|
/** Runs one call from the browser: a magic action, an event, or a public method. Returns its return value. */
|
|
2112
2135
|
private call;
|
|
2113
|
-
/**
|
|
2136
|
+
/**
|
|
2137
|
+
* Renders the component (rendering/rendered hooks, nested children tracked) and checks for a single root. A
|
|
2138
|
+
* WithPagination component's page and page URL are what paginate() reads while it renders, as in its mount() and in
|
|
2139
|
+
* its update's hooks and actions.
|
|
2140
|
+
*/
|
|
2114
2141
|
private render;
|
|
2142
|
+
/** The absolute URL of the page a memo path belongs to, on the current request's origin ('/' + path without one). */
|
|
2143
|
+
private pageUrl;
|
|
2115
2144
|
/** Dispatches, redirects: the effects every response carries. */
|
|
2116
2145
|
private effects;
|
|
2117
2146
|
/** dehydrate() hook, then the state as snapshot data, the error bag, and the checksum over both. */
|
|
@@ -2121,8 +2150,9 @@ declare class LiveComponentManager implements LiveManager {
|
|
|
2121
2150
|
/** The URI the client runtime posts updates to. */
|
|
2122
2151
|
declare const UPDATE_URI = "/oriel/live/update";
|
|
2123
2152
|
/**
|
|
2124
|
-
* Binds the LiveManager
|
|
2125
|
-
* group: sessions and CSRF apply), the make:live
|
|
2153
|
+
* Binds the LiveManager and the PaginationState that WithPagination components answer, merges the `live` config,
|
|
2154
|
+
* registers POST /oriel/live/update (named `live.update`, in the `web` group: sessions and CSRF apply), the make:live
|
|
2155
|
+
* command, and the components under app/Live.
|
|
2126
2156
|
*/
|
|
2127
2157
|
declare class LiveServiceProvider extends ServiceProvider {
|
|
2128
2158
|
register(): void;
|
|
@@ -2181,10 +2211,57 @@ interface PersistentMiddleware {
|
|
|
2181
2211
|
readonly parameters: readonly string[];
|
|
2182
2212
|
}
|
|
2183
2213
|
/**
|
|
2184
|
-
* Livewire's persistent middleware: the
|
|
2185
|
-
*
|
|
2186
|
-
* A path no route matches has none.
|
|
2214
|
+
* Livewire's persistent middleware: the middleware among `persistent` (aliases) that the page route (the component's
|
|
2215
|
+
* memo path and method) ran, in the order an update runs them. A path no route matches has none.
|
|
2187
2216
|
*/
|
|
2188
2217
|
declare function persistentMiddleware(router: Router, persistent: readonly string[], method: string, path: string): PersistentMiddleware[];
|
|
2189
2218
|
|
|
2190
|
-
|
|
2219
|
+
type ComponentConstructor = abstract new (...args: any[]) => Component;
|
|
2220
|
+
/** What WithPagination() adds to a component: its page and the actions that move it. */
|
|
2221
|
+
interface Paginated {
|
|
2222
|
+
/** The current page. The browser may set it; Live reads it as a page number. */
|
|
2223
|
+
page: number;
|
|
2224
|
+
nextPage(): Promise<void>;
|
|
2225
|
+
previousPage(): Promise<void>;
|
|
2226
|
+
gotoPage(page: number | string): Promise<void>;
|
|
2227
|
+
resetPage(): Promise<void>;
|
|
2228
|
+
setPage(page: number | string): Promise<void>;
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Livewire's WithPagination: `class Posts extends WithPagination(Component)`. The public `page` (1 to start; there
|
|
2232
|
+
* is no address-bar sync) is what `paginate()` shows in the component (in `render()`, `mount()`, `hydrate()`, the
|
|
2233
|
+
* update hooks and actions, or in a `@Computed` getter any of them reads), and its page links are built on the
|
|
2234
|
+
* page's URL. The actions move it: `o:click="nextPage"`, `previousPage`, `gotoPage(3)`, `setPage(3)`,
|
|
2235
|
+
* `resetPage` (call it from `updatedSearch()` so a new search starts on page 1). `updatingPage(page)` and
|
|
2236
|
+
* `updatedPage(page)` run around every change. One paginator per component: other page names read the request.
|
|
2237
|
+
*/
|
|
2238
|
+
declare function WithPagination<TBase extends ComponentConstructor>(Base: TBase): TBase & (abstract new (...args: any[]) => Paginated);
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* What <Pagination> reads from a paginator. Structural, since Live can't import Database: paginate()'s
|
|
2242
|
+
* LengthAwarePaginator (with lastPage(), so page buttons) and simplePaginate()'s Paginator (Previous and Next only).
|
|
2243
|
+
*/
|
|
2244
|
+
interface PaginationSource {
|
|
2245
|
+
currentPage(): number;
|
|
2246
|
+
lastPage?(): number;
|
|
2247
|
+
hasMorePages(): boolean;
|
|
2248
|
+
onFirstPage(): boolean;
|
|
2249
|
+
/** Page buttons on each side of the current one (the paginator's onEachSide(), 3 by default). */
|
|
2250
|
+
readonly onEachSideCount?: number;
|
|
2251
|
+
/** Not cursorPaginate(): its pages are cursors, which a component's page number can't follow. */
|
|
2252
|
+
readonly nextCursor?: never;
|
|
2253
|
+
}
|
|
2254
|
+
interface PaginationProps {
|
|
2255
|
+
paginator: PaginationSource;
|
|
2256
|
+
/** Classes for the <nav>, such as its layout ("flex gap-2"); in your file, so Tailwind generates them. */
|
|
2257
|
+
class?: string;
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Livewire's pagination links for a WithPagination component: `<Pagination paginator={posts} />` in render(). A
|
|
2261
|
+
* <nav aria-label="Pagination"> with « Previous, the page buttons and Next » as Live actions (previousPage,
|
|
2262
|
+
* gotoPage(n), nextPage), the current page marked aria-current="page", the ends disabled, the kits' theme classes
|
|
2263
|
+
* (btn, btn-secondary). Nothing when everything fits on one page. The address bar is left alone.
|
|
2264
|
+
*/
|
|
2265
|
+
declare function Pagination({ paginator, class: className }: PaginationProps): Htmlable;
|
|
2266
|
+
|
|
2267
|
+
export { type JsonStructure as $, AnonymousNotifiable as A, BusFake as B, Component as C, type BootOptions as D, EventFake as E, FakeDisk as F, type CountOrFilter as G, DatabaseMigrations as H, InvalidLiveRequestError as I, type DatabaseTestOptions as J, DatabaseTransactions as K, Live as L, MailFake as M, NotificationFake as N, On as O, PERSISTENT_MIDDLEWARE as P, QueueFake as Q, type DispatchedEvent as R, type ExpectedErrors as S, type Target as T, UPDATE_URI as U, FakeFile as V, WithPagination as W, HttpClient as X, InteractsWithApplication as Y, InteractsWithConsole as Z, InteractsWithDatabase as _, type ComponentResult as a, MailRecord as a0, MakesHttpRequests as a1, PendingCommand as a2, type PushedJob as a3, RefreshDatabase as a4, RefreshDatabaseState as a5, type RequestData as a6, type RequestOptions as a7, type ResponseContext as a8, type ResponseCookie as a9, usingInMemoryDatabase as aA, type SentNotification as aa, StorageFake as ab, TESTING_ENVIRONMENT as ac, type TableOrModel as ad, TestCase as ae, type TestHooks as af, TestResponse as ag, type TestTrait as ah, actingAsAuthFactory as ai, addresses as aj, applyEnvironment as ak, cookieHeader as al, cookiePrefix as am, decryptCookie as an, encryptCookie as ao, flatten as ap, guessMimeType as aq, inertiaPageOf as ar, install as as, isExpired as at, matches as au, nameOf as av, recordingExceptionHandler as aw, recordingViewFactory as ax, responseCookies as ay, runCommand as az, Computed as b, CorruptComponentPayloadError as c, ErrorBag as d, LiveComponentManager as e, LiveComponentNotFoundError as f, LiveError as g, type LiveProps as h, LiveServiceProvider as i, Locked as j, MethodNotCallableError as k, type Paginated as l, Pagination as m, type PaginationProps as n, type PaginationSource as o, PendingEvent as p, type PersistentMiddleware as q, PropertyNotUpdatableError as r, TestRequestScope as s, Testable as t, componentName as u, live as v, persistentMiddleware as w, AssertableInertia as x, AssertableJson as y, type BatchRecord as z };
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AnonymousNotifiable,
|
|
1
|
+
export { A as AnonymousNotifiable, x as AssertableInertia, y as AssertableJson, z as BatchRecord, D as BootOptions, B as BusFake, G as CountOrFilter, H as DatabaseMigrations, J as DatabaseTestOptions, K as DatabaseTransactions, R as DispatchedEvent, E as EventFake, S as ExpectedErrors, F as FakeDisk, V as FakeFile, X as HttpClient, Y as InteractsWithApplication, Z as InteractsWithConsole, _ as InteractsWithDatabase, $ as JsonStructure, L as Live, M as MailFake, a0 as MailRecord, a1 as MakesHttpRequests, N as NotificationFake, a2 as PendingCommand, a3 as PushedJob, Q as QueueFake, a4 as RefreshDatabase, a5 as RefreshDatabaseState, a6 as RequestData, a7 as RequestOptions, a8 as ResponseContext, a9 as ResponseCookie, aa as SentNotification, ab as StorageFake, ac as TESTING_ENVIRONMENT, ad as TableOrModel, T as Target, ae as TestCase, af as TestHooks, ag as TestResponse, ah as TestTrait, t as Testable, ai as actingAsAuthFactory, aj as addresses, ak as applyEnvironment, al as cookieHeader, am as cookiePrefix, an as decryptCookie, ao as encryptCookie, ap as flatten, aq as guessMimeType, ar as inertiaPageOf, as as install, at as isExpired, au as matches, av as nameOf, aw as recordingExceptionHandler, ax as recordingViewFactory, ay as responseCookies, az as runCommand, aA as usingInMemoryDatabase } from './testing-BErengYY.js';
|
|
2
2
|
import './contracts.js';
|
|
3
3
|
import './index.d-DOlTeG-8.js';
|
package/dist/testing.js
CHANGED
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
responseCookies,
|
|
46
46
|
runCommand,
|
|
47
47
|
usingInMemoryDatabase
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-WNJP46B7.js";
|
|
49
|
+
import "./chunk-PM5YTG57.js";
|
|
50
|
+
import "./chunk-BSQKOLSK.js";
|
|
51
51
|
export {
|
|
52
52
|
AnonymousNotifiable,
|
|
53
53
|
AssertableInertia,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orieljs/framework",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "Oriel: a Laravel-style, full-stack TypeScript framework for Node.js and Bun.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,35 +56,35 @@
|
|
|
56
56
|
"pluralize": "8.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@orieljs/bus": "0.1.0-alpha.
|
|
60
|
-
"@orieljs/
|
|
61
|
-
"@orieljs/
|
|
62
|
-
"@orieljs/
|
|
63
|
-
"@orieljs/collections": "0.1.0-alpha.
|
|
64
|
-
"@orieljs/console": "0.1.0-alpha.
|
|
65
|
-
"@orieljs/
|
|
66
|
-
"@orieljs/
|
|
67
|
-
"@orieljs/cookie": "0.1.0-alpha.
|
|
68
|
-
"@orieljs/encryption": "0.1.0-alpha.
|
|
69
|
-
"@orieljs/
|
|
70
|
-
"@orieljs/
|
|
71
|
-
"@orieljs/
|
|
72
|
-
"@orieljs/
|
|
73
|
-
"@orieljs/
|
|
74
|
-
"@orieljs/http": "0.1.0-alpha.
|
|
75
|
-
"@orieljs/inertia": "0.1.0-alpha.
|
|
76
|
-
"@orieljs/log": "0.1.0-alpha.
|
|
77
|
-
"@orieljs/
|
|
78
|
-
"@orieljs/
|
|
79
|
-
"@orieljs/
|
|
80
|
-
"@orieljs/
|
|
81
|
-
"@orieljs/
|
|
82
|
-
"@orieljs/
|
|
83
|
-
"@orieljs/
|
|
84
|
-
"@orieljs/
|
|
85
|
-
"@orieljs/
|
|
86
|
-
"@orieljs/validation": "0.1.0-alpha.
|
|
87
|
-
"@orieljs/
|
|
59
|
+
"@orieljs/bus": "0.1.0-alpha.5",
|
|
60
|
+
"@orieljs/auth": "0.1.0-alpha.5",
|
|
61
|
+
"@orieljs/cache": "0.1.0-alpha.5",
|
|
62
|
+
"@orieljs/config": "0.1.0-alpha.5",
|
|
63
|
+
"@orieljs/collections": "0.1.0-alpha.5",
|
|
64
|
+
"@orieljs/console": "0.1.0-alpha.5",
|
|
65
|
+
"@orieljs/container": "0.1.0-alpha.5",
|
|
66
|
+
"@orieljs/contracts": "0.1.0-alpha.5",
|
|
67
|
+
"@orieljs/cookie": "0.1.0-alpha.5",
|
|
68
|
+
"@orieljs/encryption": "0.1.0-alpha.5",
|
|
69
|
+
"@orieljs/events": "0.1.0-alpha.5",
|
|
70
|
+
"@orieljs/foundation": "0.1.0-alpha.5",
|
|
71
|
+
"@orieljs/database": "0.1.0-alpha.5",
|
|
72
|
+
"@orieljs/hashing": "0.1.0-alpha.5",
|
|
73
|
+
"@orieljs/filesystem": "0.1.0-alpha.5",
|
|
74
|
+
"@orieljs/http": "0.1.0-alpha.5",
|
|
75
|
+
"@orieljs/inertia": "0.1.0-alpha.5",
|
|
76
|
+
"@orieljs/log": "0.1.0-alpha.5",
|
|
77
|
+
"@orieljs/notifications": "0.1.0-alpha.5",
|
|
78
|
+
"@orieljs/pipeline": "0.1.0-alpha.5",
|
|
79
|
+
"@orieljs/live": "0.1.0-alpha.5",
|
|
80
|
+
"@orieljs/queue": "0.1.0-alpha.5",
|
|
81
|
+
"@orieljs/routing": "0.1.0-alpha.5",
|
|
82
|
+
"@orieljs/session": "0.1.0-alpha.5",
|
|
83
|
+
"@orieljs/mail": "0.1.0-alpha.5",
|
|
84
|
+
"@orieljs/support": "0.1.0-alpha.5",
|
|
85
|
+
"@orieljs/testing": "0.1.0-alpha.5",
|
|
86
|
+
"@orieljs/validation": "0.1.0-alpha.5",
|
|
87
|
+
"@orieljs/view": "0.1.0-alpha.5"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"pg": "^8.23.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../Container/Container.ts","../../Container/context.ts","../../Container/describe.ts","../../Container/errors.ts","../../Collections/compare.ts","../../Collections/Collection.ts","../../Collections/LazyCollection.ts","../../Support/Str.ts","../../Support/Arr.ts","../../Support/ServiceProvider.ts","../../Support/Facade.ts","../../Support/ClassRegistry.ts","../../Support/helpers.ts","../../Support/lang.ts"],"sourcesContent":["import { Container as ContainerToken, type Abstract, type Concrete, type Container as ContainerContract, type Factory } from '@orieljs/contracts'\nimport { building, GLOBAL_KEY, storage } from './context'\nimport { describe } from './describe'\nimport { BindingResolutionError, CircularDependencyError } from './errors'\n\ntype Key = unknown\ntype Lifetime = 'transient' | 'singleton' | 'scoped'\ninterface Binding { lifetime: Lifetime; factory: Factory<unknown> }\ntype Extender = (instance: unknown, c: ContainerContract) => unknown\ntype Callback = (instance: unknown, c: ContainerContract) => void\n\ninterface SharedState {\n bindings: Map<Key, Binding>\n extenders: Map<Key, Extender[]>\n resolving: Map<Key, Callback[]>\n resolved: Set<Key>\n}\n\nconst globals = globalThis as unknown as Record<symbol, Container | undefined>\n\nconst keyOf = (abstract: Abstract<unknown>): Key => (typeof abstract === 'function' ? abstract : abstract.id)\nconst isClass = (fn: unknown): fn is new () => unknown =>\n typeof fn === 'function' && /^class[\\s{]/.test(Function.prototype.toString.call(fn))\n\nexport class Container implements ContainerContract {\n static getInstance(): Container | undefined {\n return globals[GLOBAL_KEY]\n }\n static setInstance(container: Container | undefined): void {\n globals[GLOBAL_KEY] = container\n }\n\n protected readonly shared: SharedState\n protected readonly root: Container\n protected readonly parent: Container | undefined\n protected readonly local = new Map<Key, unknown>()\n\n constructor(parent?: Container) {\n this.parent = parent\n this.root = parent?.root ?? this\n this.shared = parent?.shared ?? { bindings: new Map(), extenders: new Map(), resolving: new Map(), resolved: new Set() }\n // Every container (root or scope) resolves \"the container\" as itself, by token and by class.\n this.local.set(keyOf(ContainerToken), this)\n this.local.set(Container, this)\n }\n\n bind<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void {\n this.#assertRoot('bind')\n this.#addBinding(abstract, concrete, 'transient')\n }\n singleton<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void {\n this.#assertRoot('singleton')\n this.#addBinding(abstract, concrete, 'singleton')\n }\n scoped<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void {\n this.#assertRoot('scoped')\n this.#addBinding(abstract, concrete, 'scoped')\n }\n\n instance<T>(abstract: Abstract<T>, instance: T): T {\n const key = keyOf(abstract)\n this.local.set(key, instance)\n // A scope's instances are its own business: only the root records them in the shared resolved set.\n if (this === this.root) this.shared.resolved.add(key)\n return instance\n }\n\n make<T>(abstract: Abstract<T>): T {\n const key = keyOf(abstract)\n const owner = this.#owning(key)\n if (owner) return owner.local.get(key) as T\n\n const binding = this.shared.bindings.get(key) ?? this.#implicitBinding(abstract)\n if (binding.lifetime === 'scoped' && this === this.root) {\n throw new BindingResolutionError(\n `Scoped binding [${describe(abstract)}] was resolved outside a scope. Resolve it inside app.createScope().run(...), and don't inject scoped services into singletons.`,\n )\n }\n const builder = binding.lifetime === 'singleton' ? this.root : this\n const instance = builder.build(abstract, key, binding)\n\n if (binding.lifetime === 'singleton') this.root.local.set(key, instance)\n if (binding.lifetime === 'scoped') this.local.set(key, instance)\n return instance as T\n }\n\n bound(abstract: Abstract<unknown>): boolean {\n const key = keyOf(abstract)\n return this.shared.bindings.has(key) || this.#owning(key) !== undefined\n }\n\n resolved(abstract: Abstract<unknown>): boolean {\n const key = keyOf(abstract)\n return this.shared.resolved.has(key) || this.#owning(key) !== undefined\n }\n\n extend<T>(abstract: Abstract<T>, extender: (instance: T, container: ContainerContract) => T): void {\n this.#assertRoot('extend')\n const key = keyOf(abstract)\n const list = this.shared.extenders.get(key) ?? []\n list.push(extender as Extender)\n this.shared.extenders.set(key, list)\n if (this.local.has(key)) this.local.set(key, extender(this.local.get(key) as T, this))\n }\n\n resolving<T>(abstract: Abstract<T>, callback: (instance: T, container: ContainerContract) => void): void {\n this.#assertRoot('resolving')\n const key = keyOf(abstract)\n const list = this.shared.resolving.get(key) ?? []\n list.push(callback as Callback)\n this.shared.resolving.set(key, list)\n }\n\n forgetInstance(abstract: Abstract<unknown>): void {\n this.local.delete(keyOf(abstract))\n }\n\n /** Scopes are always plain Containers (never subclasses such as Application). */\n createScope(): Container {\n return new Container(this)\n }\n\n run<R>(fn: () => R): R {\n return storage.run(this, fn)\n }\n\n /** The nearest container in this -> parent scopes -> root that holds an instance for the key. */\n #owning(key: Key): Container | undefined {\n if (this.local.has(key)) return this\n return this.parent === undefined ? undefined : this.parent.#owning(key)\n }\n\n /** Bindings, extenders and callbacks are app-wide state: a request scope must never write them. */\n #assertRoot(method: string): void {\n if (this !== this.root) {\n throw new Error(\n `Cannot register bindings on a request scope (${method}). Register them on the application in a service provider; use instance() for per-request values.`,\n )\n }\n }\n\n #addBinding(abstract: Abstract<unknown>, concrete: Concrete<unknown> | undefined, lifetime: Lifetime): void {\n const key = keyOf(abstract)\n let factory: Factory<unknown>\n if (concrete === undefined) {\n if (typeof abstract !== 'function') throw new TypeError(`bind(${describe(abstract)}) needs a concrete: tokens can't be constructed`)\n factory = () => new (abstract as new () => unknown)()\n } else if (isClass(concrete)) {\n factory = () => new concrete()\n } else {\n factory = concrete as Factory<unknown>\n }\n this.shared.bindings.set(key, { lifetime, factory })\n this.local.delete(key)\n }\n\n #implicitBinding(abstract: Abstract<unknown>): Binding {\n if (typeof abstract === 'function') {\n return { lifetime: 'transient', factory: () => new (abstract as new () => unknown)() }\n }\n throw new BindingResolutionError(\n `Target [${abstract.description}] is not bound. Is its service provider registered in bootstrap/providers.ts?`,\n )\n }\n\n protected build(abstract: Abstract<unknown>, key: Key, binding: Binding): unknown {\n const stackIndex = building.keys.indexOf(key)\n if (stackIndex !== -1) {\n const chain = [...building.names.slice(stackIndex), describe(abstract)]\n throw new CircularDependencyError(chain)\n }\n building.keys.push(key)\n building.names.push(describe(abstract))\n building.containers.push(this)\n try {\n let instance = binding.factory(this)\n for (const extender of this.shared.extenders.get(key) ?? []) instance = extender(instance, this)\n for (const callback of this.shared.resolving.get(key) ?? []) callback(instance, this)\n this.shared.resolved.add(key)\n return instance\n } finally {\n building.keys.pop()\n building.names.pop()\n building.containers.pop()\n }\n }\n}\n","import { AsyncLocalStorage } from 'node:async_hooks'\nimport type { Abstract, Container } from '@orieljs/contracts'\nimport { describe } from './describe'\nimport { ContainerNotAvailableError } from './errors'\n\nconst ALS_KEY = Symbol.for('oriel:container.als')\nexport const GLOBAL_KEY = Symbol.for('oriel:container.instance')\nconst BUILDING_KEY = Symbol.for('oriel:container.building')\nconst g = globalThis as unknown as Record<symbol, unknown>\n\n/** One AsyncLocalStorage per process, even if @orieljs/container is installed twice. */\nexport const storage: AsyncLocalStorage<Container> = (g[ALS_KEY] ??= new AsyncLocalStorage<Container>()) as AsyncLocalStorage<Container>\n\n/** Synchronous build stack. Shared through globalThis so duplicate package copies share the same stack. */\nexport const building = (g[BUILDING_KEY] ??= {\n keys: [] as unknown[],\n names: [] as string[],\n containers: [] as Container[],\n}) as { keys: unknown[]; names: string[]; containers: Container[] }\n\nexport function currentContainer(): Container | undefined {\n return building.containers.at(-1) ?? storage.getStore() ?? (g[GLOBAL_KEY] as Container | undefined)\n}\n\nexport function inject<T>(abstract: Abstract<T>): T {\n const container = currentContainer()\n if (!container) throw new ContainerNotAvailableError(describe(abstract))\n return container.make(abstract)\n}\n","import type { Abstract } from '@orieljs/contracts'\n\nexport function describe(abstract: Abstract<unknown>): string {\n return typeof abstract === 'function' ? abstract.name || '<anonymous class>' : abstract.description\n}\n","import type { OrielError } from '@orieljs/contracts'\n\nexport class BindingResolutionError extends Error implements OrielError {\n readonly kind = 'BindingResolution' as const\n override readonly name = 'BindingResolutionError'\n}\n\nexport class CircularDependencyError extends Error implements OrielError {\n readonly kind = 'CircularDependency' as const\n override readonly name = 'CircularDependencyError'\n constructor(readonly chain: string[]) {\n super(`Circular dependency detected: ${chain.join(' -> ')}`)\n }\n}\n\nexport class ContainerNotAvailableError extends Error implements OrielError {\n readonly kind = 'ContainerNotAvailable' as const\n override readonly name = 'ContainerNotAvailableError'\n constructor(what: string) {\n super(\n `Cannot resolve [${what}]: no container is available. inject(), helpers and facades only work while the ` +\n `application is running (inside a request, job, command, provider or app.run()). ` +\n `Don't call them at module top level.`,\n )\n }\n}\n","export type Operator = '=' | '==' | '===' | '!=' | '!==' | '<>' | '<' | '<=' | '>' | '>='\n\nexport function compare(left: unknown, operator: Operator, right: unknown): boolean {\n switch (operator) {\n case '=':\n case '==':\n return left == right\n case '===':\n return left === right\n case '!=':\n case '<>':\n return left != right\n case '!==':\n return left !== right\n case '<':\n return (left as number) < (right as number)\n case '<=':\n return (left as number) <= (right as number)\n case '>':\n return (left as number) > (right as number)\n case '>=':\n return (left as number) >= (right as number)\n }\n}\n\n/** Ascending comparator: null/undefined last; numbers numerically; everything else by localeCompare. */\nexport function ascending(a: unknown, b: unknown): number {\n const aNil = a === null || a === undefined\n const bNil = b === null || b === undefined\n if (aNil || bNil) return aNil === bNil ? 0 : aNil ? 1 : -1\n if (typeof a === 'number' && typeof b === 'number') return a - b\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime()\n return String(a).localeCompare(String(b))\n}\n","import type { Arrayable, Enumerable } from '@orieljs/contracts'\nimport { ascending, compare, type Operator } from './compare'\n\ntype Getter<T, V = unknown> = (keyof T & string) | ((item: T) => V)\n\nconst read = <T>(item: T, getter: Getter<T>): unknown =>\n typeof getter === 'function' ? getter(item) : (item as Record<string, unknown> | null | undefined)?.[getter]\n\nconst isArrayable = (v: unknown): v is Arrayable =>\n typeof v === 'object' && v !== null && typeof (v as Arrayable).toArray === 'function'\n\nconst numbers = <T>(items: T[], getter?: Getter<T>): number[] =>\n items\n .map((item) => (getter === undefined ? item : read(item, getter)))\n .filter((v): v is number => typeof v === 'number' && !Number.isNaN(v))\n\nexport class Collection<T> implements Enumerable<T> {\n protected readonly items: T[]\n\n constructor(items: Iterable<T> = []) {\n this.items = [...items]\n }\n\n static make<T>(items: Iterable<T> = []): Collection<T> {\n return new Collection(items)\n }\n\n /** Laravel semantics: callback receives 1..n. */\n static times<T>(count: number, callback: (index: number) => T): Collection<T> {\n return new Collection(Array.from({ length: Math.max(0, count) }, (_, i) => callback(i + 1)))\n }\n\n [Symbol.iterator](): Iterator<T> {\n return this.items[Symbol.iterator]()\n }\n\n all(): T[] { return [...this.items] }\n count(): number { return this.items.length }\n isEmpty(): boolean { return this.items.length === 0 }\n isNotEmpty(): boolean { return this.items.length > 0 }\n toArray(): unknown[] { return this.items.map((i) => (isArrayable(i) ? i.toArray() : i)) }\n toJSON(): T[] { return this.all() }\n toJson(): string { return JSON.stringify(this) }\n\n map<U>(callback: (item: T, index: number) => U): Collection<U> {\n return new Collection(this.items.map(callback))\n }\n\n flatMap<U>(callback: (item: T, index: number) => U | U[] | Collection<U>): Collection<U> {\n return new Collection(\n this.items.flatMap((item, i) => {\n const out = callback(item, i)\n return out instanceof Collection ? out.all() : (out as U | U[])\n }) as U[],\n )\n }\n\n filter(callback?: (item: T, index: number) => unknown): Collection<T> {\n return new Collection(this.items.filter(callback ?? ((item) => Boolean(item))))\n }\n\n reject(callback: (item: T, index: number) => unknown): Collection<T> {\n return new Collection(this.items.filter((item, i) => !callback(item, i)))\n }\n\n /** Return false from the callback to stop. */\n each(callback: (item: T, index: number) => unknown): this {\n for (let i = 0; i < this.items.length; i++) if (callback(this.items[i]!, i) === false) break\n return this\n }\n\n reduce<U>(callback: (carry: U, item: T, index: number) => U, initial: U): U {\n return this.items.reduce(callback, initial)\n }\n\n first(): T | undefined\n first<D = undefined>(callback: (item: T, index: number) => unknown, defaultValue?: D): T | D\n first<D>(callback?: (item: T, index: number) => unknown, defaultValue?: D): T | D | undefined {\n if (!callback) return this.items[0]\n const index = this.items.findIndex(callback)\n return index === -1 ? defaultValue : this.items[index]\n }\n\n last(): T | undefined\n last<D = undefined>(callback: (item: T, index: number) => unknown, defaultValue?: D): T | D\n last<D>(callback?: (item: T, index: number) => unknown, defaultValue?: D): T | D | undefined {\n if (!callback) return this.items.at(-1)\n const index = this.items.findLastIndex(callback)\n return index === -1 ? defaultValue : this.items[index]\n }\n\n where(key: Getter<T>, value: unknown): Collection<T>\n where(key: Getter<T>, operator: Operator, value: unknown): Collection<T>\n where(key: Getter<T>, operatorOrValue: unknown, value?: unknown): Collection<T> {\n const [op, expected] = arguments.length === 2 ? (['=', operatorOrValue] as const) : [operatorOrValue as Operator, value]\n return this.filter((item) => compare(read(item, key), op, expected))\n }\n\n firstWhere(key: Getter<T>, value: unknown): T | undefined\n firstWhere(key: Getter<T>, operator: Operator, value: unknown): T | undefined\n firstWhere(key: Getter<T>, operatorOrValue: unknown, value?: unknown): T | undefined {\n const [op, expected] = arguments.length === 2 ? (['=', operatorOrValue] as const) : [operatorOrValue as Operator, value]\n return this.items.find((item) => compare(read(item, key), op, expected))\n }\n\n whereIn(key: Getter<T>, values: readonly unknown[]): Collection<T> {\n const set = new Set(values)\n return this.filter((item) => set.has(read(item, key)))\n }\n\n whereNotIn(key: Getter<T>, values: readonly unknown[]): Collection<T> {\n const set = new Set(values)\n return this.filter((item) => !set.has(read(item, key)))\n }\n\n pluck<K extends keyof T & string>(key: K): Collection<T[K]> {\n return this.map((item) => read(item, key) as T[K])\n }\n\n keyBy(key: Getter<T>): Record<string, T> {\n return Object.fromEntries(this.items.map((item) => [String(read(item, key)), item]))\n }\n\n groupBy(key: Getter<T>): Record<string, Collection<T>> {\n const groups: Record<string, Collection<T>> = {}\n for (const item of this.items) (groups[String(read(item, key))] ??= new Collection<T>()).push(item)\n return groups\n }\n\n mapWithKeys<V>(callback: (item: T, index: number) => readonly [string, V]): Record<string, V> {\n return Object.fromEntries(this.items.map(callback))\n }\n\n sortBy(key: Getter<T>, direction: 'asc' | 'desc' = 'asc'): Collection<T> {\n const sign = direction === 'asc' ? 1 : -1\n return new Collection(\n this.items\n .map((item, index) => ({ item, index, value: read(item, key) }))\n .sort((a, b) => {\n const aNil = a.value === null || a.value === undefined\n const bNil = b.value === null || b.value === undefined\n if (aNil || bNil) return aNil === bNil ? a.index - b.index : aNil ? 1 : -1 // nulls last both ways\n return sign * ascending(a.value, b.value) || a.index - b.index\n })\n .map((x) => x.item),\n )\n }\n\n sortByDesc(key: Getter<T>): Collection<T> {\n return this.sortBy(key, 'desc')\n }\n\n sum(key?: Getter<T>): number { return numbers(this.items, key).reduce((a, b) => a + b, 0) }\n avg(key?: Getter<T>): number | undefined {\n const values = numbers(this.items, key)\n return values.length ? values.reduce((a, b) => a + b, 0) / values.length : undefined\n }\n min(key?: Getter<T>): number | undefined {\n const values = numbers(this.items, key)\n return values.length ? Math.min(...values) : undefined\n }\n max(key?: Getter<T>): number | undefined {\n const values = numbers(this.items, key)\n return values.length ? Math.max(...values) : undefined\n }\n\n unique(key?: Getter<T>): Collection<T> {\n const seen = new Set<unknown>()\n return this.filter((item) => {\n const v = key === undefined ? item : read(item, key)\n if (seen.has(v)) return false\n seen.add(v)\n return true\n })\n }\n\n chunk(size: number): Collection<Collection<T>> {\n if (size <= 0) return new Collection()\n const chunks: Collection<T>[] = []\n for (let i = 0; i < this.items.length; i += size) chunks.push(new Collection(this.items.slice(i, i + size)))\n return new Collection(chunks)\n }\n\n /** Negative count takes from the end. */\n take(count: number): Collection<T> {\n return new Collection(count < 0 ? this.items.slice(count) : this.items.slice(0, count))\n }\n skip(count: number): Collection<T> { return new Collection(this.items.slice(count)) }\n slice(offset: number, length?: number): Collection<T> {\n return new Collection(this.items.slice(offset, length === undefined ? undefined : offset + length))\n }\n values(): Collection<T> { return new Collection(this.items) }\n\n contains(key: keyof T & string, value: unknown): boolean\n contains(callback: (item: T) => boolean): boolean\n contains(value: unknown): boolean\n contains(keyOrValue: unknown, value?: unknown): boolean {\n if (arguments.length === 2) return this.items.some((item) => read(item, keyOrValue as keyof T & string) === value)\n if (typeof keyOrValue === 'function') return this.items.some(keyOrValue as (item: T) => boolean)\n return this.items.includes(keyOrValue as T)\n }\n\n /** Mutates, like Laravel. */\n push(...values: T[]): this {\n this.items.push(...values)\n return this\n }\n\n concat(values: Iterable<T>): Collection<T> {\n return new Collection([...this.items, ...values])\n }\n\n partition(callback: (item: T, index: number) => unknown): [Collection<T>, Collection<T>] {\n return [this.filter(callback), this.reject(callback)]\n }\n\n implode(glue: string): string\n implode(key: keyof T & string, glue: string): string\n implode(keyOrGlue: string, glue?: string): string {\n if (glue === undefined) return this.items.join(keyOrGlue)\n return this.items.map((item) => read(item, keyOrGlue as keyof T & string)).join(glue)\n }\n\n when<U = this>(condition: unknown, callback: (collection: this) => U): U | this {\n return condition ? callback(this) : this\n }\n\n pipe<U>(callback: (collection: this) => U): U { return callback(this) }\n\n tap(callback: (collection: this) => void): this {\n callback(this)\n return this\n }\n}\n\nexport function collect<T>(items: Iterable<T> = []): Collection<T> {\n return new Collection(items)\n}\n","import { Collection } from './Collection'\n\ntype Source<T> = () => AsyncIterable<T> | Iterable<T>\n\n/** Pull-based and async: for DB cursors (Model.lazy()) and large files. */\nexport class LazyCollection<T> implements AsyncIterable<T> {\n constructor(private readonly source: Source<T>) {}\n\n static make<T>(source: Source<T>): LazyCollection<T> {\n return new LazyCollection(source)\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<T> {\n yield* this.source()\n }\n\n map<U>(callback: (item: T, index: number) => U | Promise<U>): LazyCollection<U> {\n const self = this\n return new LazyCollection(async function* () {\n let i = 0\n for await (const item of self) yield await callback(item, i++)\n })\n }\n\n filter(callback: (item: T, index: number) => unknown): LazyCollection<T> {\n const self = this\n return new LazyCollection(async function* () {\n let i = 0\n for await (const item of self) if (await callback(item, i++)) yield item\n })\n }\n\n take(count: number): LazyCollection<T> {\n const self = this\n return new LazyCollection(async function* () {\n if (count <= 0) return\n let taken = 0\n for await (const item of self) {\n yield item\n if (++taken >= count) return\n }\n })\n }\n\n chunk(size: number): LazyCollection<Collection<T>> {\n const self = this\n return new LazyCollection(async function* () {\n if (size <= 0) return\n let buffer: T[] = []\n for await (const item of self) {\n buffer.push(item)\n if (buffer.length === size) {\n yield new Collection(buffer)\n buffer = []\n }\n }\n if (buffer.length) yield new Collection(buffer)\n })\n }\n\n /** Return false from the callback to stop. */\n async each(callback: (item: T, index: number) => unknown): Promise<void> {\n let i = 0\n for await (const item of this) if ((await callback(item, i++)) === false) return\n }\n\n async first(callback?: (item: T) => unknown): Promise<T | undefined> {\n for await (const item of this) if (!callback || (await callback(item))) return item\n return undefined\n }\n\n async count(): Promise<number> {\n let n = 0\n for await (const item of this) {\n void item\n n++\n }\n return n\n }\n\n async collect(): Promise<Collection<T>> {\n const items: T[] = []\n for await (const item of this) items.push(item)\n return new Collection(items)\n }\n}\n","import { randomBytes, randomUUID } from 'node:crypto'\nimport pluralize from 'pluralize'\n\nconst words = (value: string): string[] =>\n value\n .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .split(/[^A-Za-z\\d]+/)\n .filter(Boolean)\n\nconst ALPHANUM = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\nconst escapeRegex = (s: string) => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\nconst anyOf = (needles: string | string[]) => (Array.isArray(needles) ? needles : [needles]).filter((n) => n !== '')\n\nexport const Str = {\n ucfirst: (v: string) => v.charAt(0).toUpperCase() + v.slice(1),\n lcfirst: (v: string) => v.charAt(0).toLowerCase() + v.slice(1),\n studly: (v: string) => words(v).map((w) => Str.ucfirst(w.toLowerCase())).join(''),\n camel: (v: string) => Str.lcfirst(Str.studly(v)),\n snake: (v: string, delimiter = '_') => words(v).map((w) => w.toLowerCase()).join(delimiter),\n kebab: (v: string) => Str.snake(v, '-'),\n title: (v: string) => v.toLowerCase().replace(/(^|\\s)\\S/g, (m) => m.toUpperCase()),\n slug: (v: string, separator = '-') =>\n v\n .normalize('NFKD')\n .replace(/[̀-ͯ]/g, '')\n .toLowerCase()\n .replace(/[^a-z\\d]+/g, separator)\n .replace(new RegExp(`^${escapeRegex(separator)}+|${escapeRegex(separator)}+$`, 'g'), ''),\n plural: (v: string, count = 2) => pluralize(v, count),\n singular: (v: string) => pluralize.singular(v),\n random: (length = 16) => {\n let out = ''\n while (out.length < length) {\n for (const byte of randomBytes(length)) {\n if (byte < 248 && out.length < length) out += ALPHANUM[byte % 62] // 248 = 62*4, avoids modulo bias\n }\n }\n return out\n },\n uuid: () => randomUUID(),\n /** Wildcard match: `*` matches anything; everything else is literal. */\n is: (pattern: string, value: string) =>\n pattern === value || new RegExp(`^${pattern.split('*').map(escapeRegex).join('.*')}$`, 's').test(value),\n startsWith: (v: string, needles: string | string[]) => anyOf(needles).some((n) => v.startsWith(n)),\n endsWith: (v: string, needles: string | string[]) => anyOf(needles).some((n) => v.endsWith(n)),\n contains: (v: string, needles: string | string[]) => anyOf(needles).some((n) => v.includes(n)),\n after: (v: string, search: string) => (search === '' || !v.includes(search) ? v : v.slice(v.indexOf(search) + search.length)),\n afterLast: (v: string, search: string) =>\n search === '' || !v.includes(search) ? v : v.slice(v.lastIndexOf(search) + search.length),\n before: (v: string, search: string) => (search === '' || !v.includes(search) ? v : v.slice(0, v.indexOf(search))),\n beforeLast: (v: string, search: string) =>\n search === '' || !v.includes(search) ? v : v.slice(0, v.lastIndexOf(search)),\n between: (v: string, from: string, to: string) => Str.beforeLast(Str.after(v, from), to),\n limit: (v: string, limit = 100, end = '...') => (v.length <= limit ? v : v.slice(0, limit).trimEnd() + end),\n start: (v: string, prefix: string) => (v.startsWith(prefix) ? v : prefix + v),\n finish: (v: string, cap: string) => (v.endsWith(cap) ? v : v + cap),\n}\n","type Obj = Record<string, unknown>\nconst FORBIDDEN = new Set(['__proto__', 'prototype', 'constructor'])\nconst isWalkable = (v: unknown): v is Obj => typeof v === 'object' && v !== null\nconst segments = (key: string) => key.split('.')\n\nexport const Arr = {\n get<T = unknown>(target: unknown, key: string | undefined, defaultValue?: T): T {\n if (key === undefined || key === '') return target as T\n let current: unknown = target\n for (const segment of segments(key)) {\n if (!isWalkable(current) || !Object.hasOwn(current, segment)) return defaultValue as T\n current = current[segment]\n }\n return current as T\n },\n\n has(target: unknown, key: string): boolean {\n const missing = Symbol('missing')\n return Arr.get(target, key, missing) !== missing\n },\n\n set(target: Obj, key: string, value: unknown): Obj {\n const parts = segments(key)\n if (parts.some((p) => FORBIDDEN.has(p))) throw new Error(`Refusing to set unsafe key \"${key}\"`)\n let current: Obj = target\n parts.slice(0, -1).forEach((segment) => {\n if (!isWalkable(current[segment])) current[segment] = {}\n current = current[segment] as Obj\n })\n current[parts.at(-1)!] = value\n return target\n },\n\n forget(target: Obj, key: string): void {\n const parts = segments(key)\n const parent = parts.length === 1 ? target : Arr.get<unknown>(target, parts.slice(0, -1).join('.'))\n if (isWalkable(parent)) delete parent[parts.at(-1)!]\n },\n\n dot(target: Obj, prefix = ''): Obj {\n const out: Obj = {}\n for (const [k, v] of Object.entries(target)) {\n const path = prefix + k\n if (isWalkable(v) && Object.keys(v).length > 0) Object.assign(out, Arr.dot(v as Obj, `${path}.`))\n else out[path] = v\n }\n return out\n },\n\n undot(flat: Obj): Obj {\n const out: Obj = {}\n for (const [k, v] of Object.entries(flat)) Arr.set(out, k, v)\n return out\n },\n\n only<T extends Obj>(target: T, keys: string[]): Partial<T> {\n return Object.fromEntries(keys.filter((k) => Object.hasOwn(target, k)).map((k) => [k, target[k]])) as Partial<T>\n },\n\n except<T extends Obj>(target: T, keys: string[]): Partial<T> {\n const skip = new Set(keys)\n return Object.fromEntries(Object.entries(target).filter(([k]) => !skip.has(k))) as Partial<T>\n },\n\n wrap<T>(value: T | T[] | null | undefined): T[] {\n if (value === null || value === undefined) return []\n return Array.isArray(value) ? value : [value]\n },\n\n first<T, D = undefined>(items: readonly T[], predicate?: (item: T, index: number) => boolean, defaultValue?: D): T | D {\n const index = predicate ? items.findIndex(predicate) : items.length > 0 ? 0 : -1\n return index === -1 ? (defaultValue as D) : items[index]!\n },\n\n last<T, D = undefined>(items: readonly T[], predicate?: (item: T, index: number) => boolean, defaultValue?: D): T | D {\n const index = predicate ? items.findLastIndex(predicate) : items.length - 1\n return index === -1 ? (defaultValue as D) : items[index]!\n },\n}\n","import { ConfigRepository, type Application, type ServiceProvider as ServiceProviderContract } from '@orieljs/contracts'\n\nexport abstract class ServiceProvider implements ServiceProviderContract {\n constructor(protected readonly app: Application) {}\n\n register(): void {}\n\n boot(): void | Promise<void> {}\n\n /** Package defaults under `key`; values the app already set win (shallow merge, like Laravel). */\n protected mergeConfigFrom(defaults: Record<string, unknown>, key: string): void {\n const config = this.app.make(ConfigRepository)\n config.set(key, { ...defaults, ...config.get<Record<string, unknown>>(key, {}) })\n }\n}\n","import type { Abstract } from '@orieljs/contracts'\nimport { ContainerNotAvailableError, currentContainer, describe } from '@orieljs/container'\n\nexport interface FacadeStatics<T> {\n getFacadeRoot(): T\n /** Replace the instance in the current container (used by X.fake()). */\n swap(instance: T): void\n}\nexport type Facade<T, X = object> = T & X & FacadeStatics<T>\n\nexport function facade<T extends object, X extends object = object>(abstract: Abstract<T>, extras?: X): Facade<T, X> {\n const container = () => {\n const c = currentContainer()\n if (!c) throw new ContainerNotAvailableError(describe(abstract))\n return c\n }\n const statics: FacadeStatics<T> = {\n getFacadeRoot: () => container().make(abstract),\n swap: (instance) => void container().instance(abstract, instance),\n }\n\n const proxy: Facade<T, X> = new Proxy({} as Facade<T, X>, {\n get(_target, prop) {\n if (typeof prop === 'symbol' || prop === 'then') return undefined\n if (extras && Object.hasOwn(extras, prop)) {\n const extra = (extras as Record<string, unknown>)[prop]\n return typeof extra === 'function' ? extra.bind(proxy) : extra\n }\n if (Object.hasOwn(statics, prop)) return statics[prop as keyof FacadeStatics<T>]\n const root = statics.getFacadeRoot()\n const value = Reflect.get(root, prop, root)\n return typeof value === 'function' ? value.bind(root) : value\n },\n })\n return proxy\n}\n","import type { Class, ClassRegistry as ClassRegistryContract } from '@orieljs/contracts'\n\nexport class ClassRegistry implements ClassRegistryContract {\n private readonly byName = new Map<string, Class<unknown>>()\n private readonly byClass = new Map<Class<unknown>, string>()\n\n register(cls: Class<unknown>, name: string = cls.name): string {\n const existingName = this.byClass.get(cls)\n if (existingName !== undefined) return existingName\n if (!name) throw new Error('Anonymous classes need an explicit name: registry.register(cls, \"Some.Name\")')\n const existing = this.byName.get(name)\n if (existing && existing !== cls) {\n throw new Error(`\"${name}\" is already registered to a different class. Pass an explicit name: register(cls, \"Module.${name}\")`)\n }\n this.byName.set(name, cls)\n this.byClass.set(cls, name)\n return name\n }\n\n nameOf(cls: Class<unknown>): string | undefined {\n return this.byClass.get(cls)\n }\n\n resolve<T = unknown>(name: string): Class<T> {\n const cls = this.byName.get(name)\n if (!cls) throw new Error(`No class registered as \"${name}\". Is it registered by its service provider?`)\n return cls as Class<T>\n }\n\n has(name: string): boolean {\n return this.byName.has(name)\n }\n}\n","import { setTimeout as sleep } from 'node:timers/promises'\nimport { Application, ConfigRepository, type Abstract } from '@orieljs/contracts'\nimport { currentContainer, inject } from '@orieljs/container'\n\nexport { collect } from '@orieljs/collections'\n\n/** Container methods that must act on the current (request) scope rather than on the root application. */\nconst SCOPE_METHODS = new Set<PropertyKey>(['make', 'instance', 'bound', 'resolved', 'forgetInstance', 'createScope', 'run'])\nconst scopedViews = new WeakMap<object, Application>()\n\n/** The application, seen from `scope`: container methods hit the scope, everything else hits the application. */\nfunction viewFrom(scope: object, application: Application): Application {\n let view = scopedViews.get(scope)\n if (view === undefined) {\n view = new Proxy(application, {\n get(target, property) {\n const source: object = SCOPE_METHODS.has(property) ? scope : target\n const member: unknown = Reflect.get(source, property, source)\n return typeof member === 'function' ? member.bind(source) : member\n },\n })\n scopedViews.set(scope, view)\n }\n return view\n}\n\n/**\n * The application, or an abstract resolved from the current container.\n * Inside a request scope, app().make()/instance()/… act on that scope, so app().make(X) sees scoped services.\n */\nexport function app(): Application\nexport function app<T>(abstract: Abstract<T>): T\nexport function app<T>(abstract?: Abstract<T>): T | Application {\n if (abstract !== undefined) return inject(abstract)\n const application = inject(Application)\n const current = currentContainer()\n return current === undefined || current === application ? application : viewFrom(current, application)\n}\n\nexport function config(): ConfigRepository\nexport function config(values: Record<string, unknown>): void\nexport function config<T = unknown>(key: string, defaultValue?: T): T\nexport function config(keyOrValues?: string | Record<string, unknown>, defaultValue?: unknown): unknown {\n const repository = inject(ConfigRepository)\n if (keyOrValues === undefined) return repository\n if (typeof keyOrValues === 'string') return repository.get(keyOrValues, defaultValue)\n repository.set(keyOrValues)\n return undefined\n}\n\nexport const now = (): Date => new Date()\n\nexport const value = <T>(v: T | (() => T)): T => (typeof v === 'function' ? (v as () => T)() : v)\n\nexport function tap<T>(target: T, callback: (target: T) => void): T {\n callback(target)\n return target\n}\n\n/** Calls fn up to `times` times (attempt numbers are 1-based). Rethrows the last error, or the first one `when` rejects. */\nexport async function retry<T>(\n times: number,\n fn: (attempt: number) => T | Promise<T>,\n sleepMs: number | ((attempt: number) => number) = 0,\n when?: (error: unknown) => boolean,\n): Promise<T> {\n for (let attempt = 1; ; attempt++) {\n try {\n return await fn(attempt)\n } catch (error) {\n if (attempt >= times || (when && !when(error))) throw error\n const ms = typeof sleepMs === 'function' ? sleepMs(attempt) : sleepMs\n if (ms > 0) await sleep(ms)\n }\n }\n}\n","/** Laravel's English lang/en/auth.php and lang/en/passwords.php. */\nconst LINES: Record<string, string> = {\n 'auth.failed': 'These credentials do not match our records.',\n 'auth.password': 'The provided password is incorrect.',\n 'auth.throttle': 'Too many login attempts. Please try again in :seconds seconds.',\n 'passwords.reset': 'Your password has been reset.',\n 'passwords.sent': 'We have emailed your password reset link.',\n 'passwords.throttled': 'Please wait before retrying.',\n 'passwords.token': 'This password reset token is invalid.',\n 'passwords.user': \"We can't find a user with that email address.\",\n}\n\n/**\n * Laravel's __(): the line for `key` with `:placeholders` filled (`:name`, `:Name` capitalized, `:NAME` upper-cased),\n * longest placeholder first. A key with no line comes back as is, so a sentence can be its own key:\n * __('auth.failed'), __('auth.throttle', { seconds: 30 }), __('A reset link will be sent if the account exists.').\n */\nexport function __(key: string, replace: Record<string, string | number> = {}): string {\n let line = LINES[key] ?? key\n const names = Object.keys(replace).sort((a, b) => b.length - a.length)\n for (const name of names) {\n const value = String(replace[name])\n const capitalized = name.charAt(0).toUpperCase() + name.slice(1)\n line = line\n .replaceAll(`:${capitalized}`, value.charAt(0).toUpperCase() + value.slice(1))\n .replaceAll(`:${name.toUpperCase()}`, value.toUpperCase())\n .replaceAll(`:${name}`, value)\n }\n return line\n}\n"],"mappings":";;;;;;;ACAA,SAAS,yBAAyB;ACE3B,SAAS,SAAS,UAAqC;AAC5D,SAAO,OAAO,aAAa,aAAa,SAAS,QAAQ,sBAAsB,SAAS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