@orieljs/framework 0.1.0-alpha.13 → 0.1.0-alpha.14

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.
Files changed (41) hide show
  1. package/dist/{chunk-6GMXKQ6O.js → chunk-4NCMY3ZS.js} +48 -2
  2. package/dist/chunk-4NCMY3ZS.js.map +1 -0
  3. package/dist/{chunk-CKH4KCYF.js → chunk-BKA5F3TH.js} +1 -1
  4. package/dist/{chunk-CKH4KCYF.js.map → chunk-BKA5F3TH.js.map} +1 -1
  5. package/dist/{chunk-OTCTQVDQ.js → chunk-UBSIBGXR.js} +233 -54
  6. package/dist/chunk-UBSIBGXR.js.map +1 -0
  7. package/dist/{chunk-ZRTWDJKD.js → chunk-X4N74JDO.js} +98 -4
  8. package/dist/chunk-X4N74JDO.js.map +1 -0
  9. package/dist/contracts.d.ts +4 -1
  10. package/dist/contracts.js +1 -1
  11. package/dist/{index.d-WQpfdIbG.d.ts → index.d-lffxurFs.d.ts} +10 -1
  12. package/dist/index.d.ts +121 -19
  13. package/dist/index.js +408 -183
  14. package/dist/index.js.map +1 -1
  15. package/dist/{jsx-runtime-6um4Mwfb.d.ts → jsx-runtime-Bc5KJzwb.d.ts} +1 -1
  16. package/dist/jsx-runtime.d.ts +2 -2
  17. package/dist/jsx-runtime.js +3 -3
  18. package/dist/{testing-B8NOiQC9.d.ts → testing-CVpo7aRl.d.ts} +41 -7
  19. package/dist/testing.d.ts +2 -2
  20. package/dist/testing.js +5 -3
  21. package/docs/authentication.md +40 -1
  22. package/docs/console.md +16 -5
  23. package/docs/database-testing.md +21 -0
  24. package/docs/database.md +12 -0
  25. package/docs/deployment.md +9 -2
  26. package/docs/encryption.md +2 -0
  27. package/docs/installation.md +2 -1
  28. package/docs/live-tests.md +20 -0
  29. package/docs/live.md +2 -0
  30. package/docs/pagination.md +10 -0
  31. package/docs/session.md +19 -2
  32. package/docs/starter-kits.md +4 -0
  33. package/docs/storage.md +21 -3
  34. package/docs/testing.md +9 -6
  35. package/docs/two-factor.md +10 -1
  36. package/docs/views.md +2 -0
  37. package/docs/vite.md +1 -1
  38. package/package.json +54 -38
  39. package/dist/chunk-6GMXKQ6O.js.map +0 -1
  40. package/dist/chunk-OTCTQVDQ.js.map +0 -1
  41. package/dist/chunk-ZRTWDJKD.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { Htmlable, OrielError, ErrorKind, View as View$1, ViewFactory } from './contracts.js';
2
- import { F as Facade, S as ServiceProvider } from './index.d-WQpfdIbG.js';
2
+ import { F as Facade, S as ServiceProvider } from './index.d-lffxurFs.js';
3
3
 
4
4
  /** Marks the objects jsx() returns (Symbol.for, so two copies of the package agree). */
5
5
  declare const ELEMENT: unique symbol;
@@ -1,3 +1,3 @@
1
- export { a as Fragment, H as HtmlAttributes, J as JSX, u as jsx, w as jsxs } from './jsx-runtime-6um4Mwfb.js';
1
+ export { a as Fragment, H as HtmlAttributes, J as JSX, u as jsx, w as jsxs } from './jsx-runtime-Bc5KJzwb.js';
2
2
  import './contracts.js';
3
- import './index.d-WQpfdIbG.js';
3
+ import './index.d-lffxurFs.js';
@@ -2,9 +2,9 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-ZRTWDJKD.js";
6
- import "./chunk-6GMXKQ6O.js";
7
- import "./chunk-CKH4KCYF.js";
5
+ } from "./chunk-X4N74JDO.js";
6
+ import "./chunk-4NCMY3ZS.js";
7
+ import "./chunk-BKA5F3TH.js";
8
8
  export {
9
9
  Fragment,
10
10
  jsx,
@@ -1,5 +1,5 @@
1
1
  import { BusDispatcher, Job, PendingBatchOptions, Class, PendingChain, PendingBatch, Batch, EventDispatcher, Listener, MailManager, Mailable, Address, MailRecipient, Mailer, PendingMail, SentMessage, MailTransport, NotificationDispatcher, Notifiable, Notification, NotificationChannel, QueueManager, QueuePayload, Queue, QueueJob, FilesystemManager, Filesystem, PutOptions, UploadedFile, Application, Session, View, Authenticatable, Container, AuthFactory, InertiaPage, ServiceProvider, ServiceProviderClass, DatabaseManager, ModelInstance, Row, Encrypter, Token, ExceptionHandler, ViewFactory, RouteName, RouteArguments, Rules, InferValidatedType, MessageBag, LiveSnapshot, LiveEffects, OrielError, ErrorKind, Htmlable, LiveManager, HttpRequest, LiveUpdateRequest, LiveUpdateResponse, MiddlewareClass, Router } from './contracts.js';
2
- import { S as ServiceProvider$1 } from './index.d-WQpfdIbG.js';
2
+ import { S as ServiceProvider$1 } from './index.d-lffxurFs.js';
3
3
 
4
4
  /** A date the tests travel to: a Date, an ISO string or milliseconds since the epoch. */
5
5
  type TravelDate = Date | string | number;
@@ -77,6 +77,7 @@ declare class PendingCommand implements PromiseLike<number> {
77
77
  private readonly app;
78
78
  readonly command: string;
79
79
  readonly parameters: Record<string, unknown>;
80
+ private readonly answers;
80
81
  private readonly checks;
81
82
  private result;
82
83
  constructor(app: Application, command: string, parameters?: Record<string, unknown>);
@@ -91,6 +92,8 @@ declare class PendingCommand implements PromiseLike<number> {
91
92
  assertSuccessful(): this;
92
93
  assertOk(): this;
93
94
  assertFailed(): this;
95
+ /** Answers the command's questions (ask(), secret(), confirm(), choice()), in order. A question beyond them fails. */
96
+ withAnswers(...answers: string[]): this;
94
97
  /** Runs the command once and checks the expectations; resolves to the exit code. */
95
98
  run(): Promise<number>;
96
99
  then<R1 = number, R2 = never>(onfulfilled?: ((value: number) => R1 | PromiseLike<R1>) | null, onrejected?: ((reason: unknown) => R2 | PromiseLike<R2>) | null): Promise<R1 | R2>;
@@ -455,6 +458,10 @@ declare class HttpClient {
455
458
  protected scopeSession(scope: Container): Session | undefined;
456
459
  buildRequest(method: string, uri: string, options: RequestOptions): Request;
457
460
  protected baseUrl(): string;
461
+ /** The cookies as EncryptCookies would leave them, since no middleware runs for a Live test. */
462
+ protected plainCookies(): Record<string, string>;
463
+ /** A cookie kept from a response is as it was sent: encrypted, unless the app excepts it. */
464
+ protected decrypted(name: string, value: string): string | undefined;
458
465
  protected cookieHeader(): string;
459
466
  /** Like a browser: cookies the app sets are sent back on later requests in the same test; deleted ones are dropped. */
460
467
  protected rememberCookies(response: Response): void;
@@ -637,6 +644,16 @@ declare abstract class TestCase extends InteractsWithTime {
637
644
  * already set (the shell, CI, vitest.config) win, like phpunit's non-forced <env>.
638
645
  */
639
646
  declare const TESTING_ENVIRONMENT: Readonly<Record<string, string>>;
647
+ /**
648
+ * What a test run's vitest.config.ts spreads into `test`: the testing environment, and whether files run at the same time.
649
+ * The tests run on SQLite in memory, or on TEST_DATABASE_URL's database, one file at a time, as they share it. DB_URL and
650
+ * DB_CONNECTION never count: RefreshDatabase wipes the database it runs on, and Bun loads .env before the tests start, so
651
+ * honouring them could wipe a production database. It prints which database the run is on.
652
+ */
653
+ declare function testingConfig(env?: NodeJS.ProcessEnv, log?: (line: string) => void, cwd?: string): {
654
+ env: Record<string, string>;
655
+ fileParallelism: boolean;
656
+ };
640
657
  declare function applyEnvironment(values: Record<string, string>, env?: NodeJS.ProcessEnv): void;
641
658
 
642
659
  /** The request scope's ViewFactory: records every view made, so TestResponse can assert on it (assertViewIs/Has). */
@@ -671,7 +688,7 @@ declare const RefreshDatabaseState: {
671
688
  };
672
689
  /** Runs a console command through the ConsoleKernel contract; a non-zero exit fails the test with its output. */
673
690
  declare function runCommand(app: Application, command: string, parameters?: Record<string, unknown>): Promise<void>;
674
- /** Laravel's usingInMemoryDatabase(): the default connection's database is ':memory:'. */
691
+ /** Laravel's usingInMemoryDatabase(), by the driver too: only SQLite has a database in memory, whatever DB_DATABASE says. */
675
692
  declare function usingInMemoryDatabase(app: Application): boolean;
676
693
  /**
677
694
  * Laravel's RefreshDatabase.
@@ -1215,6 +1232,8 @@ declare class Testable<C extends Component = Component> {
1215
1232
  html(): string;
1216
1233
  /** The effects of the last request. */
1217
1234
  effects(): LiveEffects;
1235
+ /** The cookies the last request queued, by name; null for one it deleted. */
1236
+ cookies(): Record<string, string | null>;
1218
1237
  /**
1219
1238
  * Sets public properties through an update. A file (a FakeFile) or an array of files is uploaded as `o:model` on a
1220
1239
  * file input does it: the upload rules, the temporary disk, then a TemporaryUploadedFile (or an array) in the
@@ -1435,6 +1454,12 @@ declare class FileNotPreviewableError extends LiveError {
1435
1454
  readonly name: string;
1436
1455
  constructor(extension: string);
1437
1456
  }
1457
+ /** store() or temporaryUrl() on an upload that was stored already, so its temporary file has gone. */
1458
+ declare class UploadAlreadyStoredError extends LiveError {
1459
+ readonly path: string;
1460
+ readonly name: string;
1461
+ constructor(path: string);
1462
+ }
1438
1463
  /** The errors an upload came back with (`_uploadErrored`): the component re-renders with them on the property. */
1439
1464
  declare class UploadValidationError extends LiveError {
1440
1465
  readonly errors: Record<string, string[]>;
@@ -1499,11 +1524,15 @@ declare class TemporaryUploadedFile implements UploadedFile {
1499
1524
  text(): Promise<string>;
1500
1525
  /** The file's bytes from the temporary disk, opened on the first read. */
1501
1526
  stream(): ReadableStream<Uint8Array>;
1502
- /** Stores a copy under a random name in `directory`, on `disk` (by default the temporary disk, as Livewire's). */
1527
+ /**
1528
+ * Moves the file under a random name to `directory`, on `disk` (by default the temporary disk, as Livewire's), so no
1529
+ * temporary copy is left behind: on a public disk it could be fetched at its address. An upload stores once.
1530
+ */
1503
1531
  store(directory: string, disk?: string): Promise<string>;
1532
+ /** store(), under the name you give it. */
1504
1533
  storeAs(directory: string, name: string, disk?: string): Promise<string>;
1505
1534
  exists(): Promise<boolean>;
1506
- /** Removes the temporary file (a stored copy stays). */
1535
+ /** Removes the temporary file, if it hasn't been stored. */
1507
1536
  delete(): Promise<boolean>;
1508
1537
  /** Whether temporaryUrl() serves this file: its type is in `live.temporary_file_upload.preview_mimes`. */
1509
1538
  isPreviewable(): boolean;
@@ -1579,13 +1608,18 @@ interface PaginationProps {
1579
1608
  paginator: PaginationSource;
1580
1609
  /** Classes for the <nav>, such as its layout ("flex gap-2"); in your file, so Tailwind generates them. */
1581
1610
  class?: string;
1611
+ /** Classes for Previous, Next and the page buttons, the kits' `btn btn-secondary` unless you say; '' for none. */
1612
+ buttonClass?: string;
1613
+ /** Classes for the current page's button, the kits' `btn` unless you say; '' for none. */
1614
+ currentClass?: string;
1582
1615
  }
1583
1616
  /**
1584
1617
  * Livewire's pagination links for a WithPagination component: `<Pagination paginator={posts} />` in render(). A
1585
1618
  * <nav aria-label="Pagination"> with « Previous, the page buttons and Next » as Live actions (previousPage,
1586
1619
  * gotoPage(n), nextPage), the current page marked aria-current="page", the ends disabled, the kits' theme classes
1587
- * (btn, btn-secondary). Nothing when everything fits on one page. The address bar is left alone.
1620
+ * (btn, btn-secondary) unless `buttonClass` and `currentClass` say otherwise. Nothing when everything fits on one page.
1621
+ * The address bar is left alone.
1588
1622
  */
1589
- declare function Pagination({ paginator, class: className }: PaginationProps): Htmlable;
1623
+ declare function Pagination({ paginator, class: className, buttonClass, currentClass }: PaginationProps): Htmlable;
1590
1624
 
1591
- export { DatabaseMigrations as $, UPLOAD_URI as A, BusFake as B, Component as C, UploadValidationError as D, EventFake as E, FileNotPreviewableError as F, WithPagination as G, componentName as H, InvalidLiveRequestError as I, live as J, persistentMiddleware as K, Live as L, MailFake as M, NotificationFake as N, On as O, PERSISTENT_MIDDLEWARE as P, QueueFake as Q, AnonymousNotifiable as R, StorageFake as S, TEMPORARY_UPLOAD_DEFAULTS as T, UPDATE_URI as U, AssertableInertia as V, WithFileUploads as W, AssertableJson as X, type BatchRecord as Y, type BootOptions as Z, type CountOrFilter as _, type ComponentResult as a, type DatabaseTestOptions as a0, DatabaseTransactions as a1, type DispatchedEvent as a2, type ExpectedErrors as a3, type ExpectedListener as a4, FakeDisk as a5, FakeFile as a6, HttpClient as a7, InteractsWithApplication as a8, InteractsWithConsole as a9, cookieHeader as aA, cookiePrefix as aB, decryptCookie as aC, encryptCookie as aD, flatten as aE, freezeSecond as aF, freezeTime as aG, guessMimeType as aH, inertiaPageOf as aI, install as aJ, isExpired as aK, matches as aL, nameOf as aM, recordingExceptionHandler as aN, recordingViewFactory as aO, responseCookies as aP, runCommand as aQ, travel as aR, travelBack as aS, travelTo as aT, usingInMemoryDatabase as aU, InteractsWithDatabase as aa, InteractsWithTime as ab, type JsonStructure as ac, MailRecord as ad, MakesHttpRequests as ae, PendingCommand as af, type PushedJob as ag, RefreshDatabase as ah, RefreshDatabaseState as ai, type RequestData as aj, type RequestOptions as ak, type ResponseContext as al, type ResponseCookie as am, type SentNotification as an, TESTING_ENVIRONMENT as ao, type TableOrModel as ap, type Target as aq, TestCase as ar, type TestHooks as as, TestResponse as at, type TestTrait as au, type TravelDate as av, Wormhole as aw, actingAsAuthFactory as ax, addresses as ay, applyEnvironment as az, Computed as b, CorruptComponentPayloadError as c, ErrorBag as d, InvalidUploadSignatureError as e, LiveComponentManager as f, LiveComponentNotFoundError as g, LiveError as h, type LiveProps as i, LiveServiceProvider as j, Locked as k, MethodNotCallableError as l, PREVIEW_URI as m, type Paginated as n, Pagination as o, type PaginationProps as p, type PaginationSource as q, PendingEvent as r, type PersistentMiddleware as s, PropertyNotUpdatableError as t, SESSION_URI as u, type TemporaryFileData as v, TemporaryFileNotFoundError as w, TemporaryUploadedFile as x, TestRequestScope as y, Testable as z };
1625
+ export { type CountOrFilter as $, UPLOAD_URI as A, BusFake as B, Component as C, UploadAlreadyStoredError as D, EventFake as E, FileNotPreviewableError as F, UploadValidationError as G, WithPagination as H, InvalidLiveRequestError as I, componentName as J, live as K, Live as L, MailFake as M, NotificationFake as N, On as O, PERSISTENT_MIDDLEWARE as P, QueueFake as Q, persistentMiddleware as R, StorageFake as S, TEMPORARY_UPLOAD_DEFAULTS as T, UPDATE_URI as U, AnonymousNotifiable as V, WithFileUploads as W, AssertableInertia as X, AssertableJson as Y, type BatchRecord as Z, type BootOptions as _, type ComponentResult as a, DatabaseMigrations as a0, type DatabaseTestOptions as a1, DatabaseTransactions as a2, type DispatchedEvent as a3, type ExpectedErrors as a4, type ExpectedListener as a5, FakeDisk as a6, FakeFile as a7, HttpClient as a8, InteractsWithApplication as a9, applyEnvironment as aA, cookieHeader as aB, cookiePrefix as aC, decryptCookie as aD, encryptCookie as aE, flatten as aF, freezeSecond as aG, freezeTime as aH, guessMimeType as aI, inertiaPageOf as aJ, install as aK, isExpired as aL, matches as aM, nameOf as aN, recordingExceptionHandler as aO, recordingViewFactory as aP, responseCookies as aQ, runCommand as aR, testingConfig as aS, travel as aT, travelBack as aU, travelTo as aV, usingInMemoryDatabase as aW, InteractsWithConsole as aa, InteractsWithDatabase as ab, InteractsWithTime as ac, type JsonStructure as ad, MailRecord as ae, MakesHttpRequests as af, PendingCommand as ag, type PushedJob as ah, RefreshDatabase as ai, RefreshDatabaseState as aj, type RequestData as ak, type RequestOptions as al, type ResponseContext as am, type ResponseCookie as an, type SentNotification as ao, TESTING_ENVIRONMENT as ap, type TableOrModel as aq, type Target as ar, TestCase as as, type TestHooks as at, TestResponse as au, type TestTrait as av, type TravelDate as aw, Wormhole as ax, actingAsAuthFactory as ay, addresses as az, Computed as b, CorruptComponentPayloadError as c, ErrorBag as d, InvalidUploadSignatureError as e, LiveComponentManager as f, LiveComponentNotFoundError as g, LiveError as h, type LiveProps as i, LiveServiceProvider as j, Locked as k, MethodNotCallableError as l, PREVIEW_URI as m, type Paginated as n, Pagination as o, type PaginationProps as p, type PaginationSource as q, PendingEvent as r, type PersistentMiddleware as s, PropertyNotUpdatableError as t, SESSION_URI as u, type TemporaryFileData as v, TemporaryFileNotFoundError as w, TemporaryUploadedFile as x, TestRequestScope as y, Testable as z };
package/dist/testing.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { R as AnonymousNotifiable, V as AssertableInertia, X as AssertableJson, Y as BatchRecord, Z as BootOptions, B as BusFake, _ as CountOrFilter, $ as DatabaseMigrations, a0 as DatabaseTestOptions, a1 as DatabaseTransactions, a2 as DispatchedEvent, E as EventFake, a3 as ExpectedErrors, a4 as ExpectedListener, a5 as FakeDisk, a6 as FakeFile, a7 as HttpClient, a8 as InteractsWithApplication, a9 as InteractsWithConsole, aa as InteractsWithDatabase, ab as InteractsWithTime, ac as JsonStructure, L as Live, M as MailFake, ad as MailRecord, ae as MakesHttpRequests, N as NotificationFake, af as PendingCommand, ag as PushedJob, Q as QueueFake, ah as RefreshDatabase, ai as RefreshDatabaseState, aj as RequestData, ak as RequestOptions, al as ResponseContext, am as ResponseCookie, an as SentNotification, S as StorageFake, ao as TESTING_ENVIRONMENT, ap as TableOrModel, aq as Target, ar as TestCase, as as TestHooks, at as TestResponse, au as TestTrait, z as Testable, av as TravelDate, aw as Wormhole, ax as actingAsAuthFactory, ay as addresses, az as applyEnvironment, aA as cookieHeader, aB as cookiePrefix, aC as decryptCookie, aD as encryptCookie, aE as flatten, aF as freezeSecond, aG as freezeTime, aH as guessMimeType, aI as inertiaPageOf, aJ as install, aK as isExpired, aL as matches, aM as nameOf, aN as recordingExceptionHandler, aO as recordingViewFactory, aP as responseCookies, aQ as runCommand, aR as travel, aS as travelBack, aT as travelTo, aU as usingInMemoryDatabase } from './testing-B8NOiQC9.js';
1
+ export { V as AnonymousNotifiable, X as AssertableInertia, Y as AssertableJson, Z as BatchRecord, _ as BootOptions, B as BusFake, $ as CountOrFilter, a0 as DatabaseMigrations, a1 as DatabaseTestOptions, a2 as DatabaseTransactions, a3 as DispatchedEvent, E as EventFake, a4 as ExpectedErrors, a5 as ExpectedListener, a6 as FakeDisk, a7 as FakeFile, a8 as HttpClient, a9 as InteractsWithApplication, aa as InteractsWithConsole, ab as InteractsWithDatabase, ac as InteractsWithTime, ad as JsonStructure, L as Live, M as MailFake, ae as MailRecord, af as MakesHttpRequests, N as NotificationFake, ag as PendingCommand, ah as PushedJob, Q as QueueFake, ai as RefreshDatabase, aj as RefreshDatabaseState, ak as RequestData, al as RequestOptions, am as ResponseContext, an as ResponseCookie, ao as SentNotification, S as StorageFake, ap as TESTING_ENVIRONMENT, aq as TableOrModel, ar as Target, as as TestCase, at as TestHooks, au as TestResponse, av as TestTrait, z as Testable, aw as TravelDate, ax as Wormhole, ay as actingAsAuthFactory, az as addresses, aA as applyEnvironment, aB as cookieHeader, aC as cookiePrefix, aD as decryptCookie, aE as encryptCookie, aF as flatten, aG as freezeSecond, aH as freezeTime, aI as guessMimeType, aJ as inertiaPageOf, aK as install, aL as isExpired, aM as matches, aN as nameOf, aO as recordingExceptionHandler, aP as recordingViewFactory, aQ as responseCookies, aR as runCommand, aS as testingConfig, aT as travel, aU as travelBack, aV as travelTo, aW as usingInMemoryDatabase } from './testing-CVpo7aRl.js';
2
2
  import './contracts.js';
3
- import './index.d-WQpfdIbG.js';
3
+ import './index.d-lffxurFs.js';
package/dist/testing.js CHANGED
@@ -48,13 +48,14 @@ import {
48
48
  recordingViewFactory,
49
49
  responseCookies,
50
50
  runCommand,
51
+ testingConfig,
51
52
  travel,
52
53
  travelBack,
53
54
  travelTo,
54
55
  usingInMemoryDatabase
55
- } from "./chunk-OTCTQVDQ.js";
56
- import "./chunk-6GMXKQ6O.js";
57
- import "./chunk-CKH4KCYF.js";
56
+ } from "./chunk-UBSIBGXR.js";
57
+ import "./chunk-4NCMY3ZS.js";
58
+ import "./chunk-BKA5F3TH.js";
58
59
  export {
59
60
  AnonymousNotifiable,
60
61
  AssertableInertia,
@@ -105,6 +106,7 @@ export {
105
106
  recordingViewFactory,
106
107
  responseCookies,
107
108
  runCommand,
109
+ testingConfig,
108
110
  travel,
109
111
  travelBack,
110
112
  travelTo,
@@ -300,7 +300,44 @@ export class LogoutController extends Controller {
300
300
  ```
301
301
 
302
302
  > [!NOTE]
303
- > Laravel's `logoutOtherDevices()` and its password confirmation pages (`password.confirm`) aren't in Oriel.
303
+ > Laravel's password confirmation pages (`password.confirm`) aren't in Oriel.
304
+
305
+ ### Invalidating sessions on other devices
306
+
307
+ A new password usually means someone else may have the old one, so it should end the user's other sessions. The
308
+ `auth.session` middleware does that, on every session driver. It keeps a keyed hash of the user's password in the session
309
+ and signs the session out when the password no longer matches. The starter kits add it to the `web` group, so Live updates
310
+ are covered too. An existing app adds one line, in `bootstrap/app.ts`:
311
+
312
+ ```ts
313
+ import { dirname } from 'node:path'
314
+ import { Application, AuthenticateSession } from '@orieljs/framework'
315
+
316
+ Application.configure({ basePath: dirname(import.meta.dirname) })
317
+ .withMiddleware((middleware) => {
318
+ middleware.web({ append: [AuthenticateSession] })
319
+ })
320
+ ```
321
+
322
+ With it in place:
323
+
324
+ - A new password or a password reset ends the user's other sessions, on their next request.
325
+ - The session that changes the password stays signed in, and so does that device's "Remember me" cookie.
326
+ - A session from before you added the middleware has no hash yet. It stores one and carries on, so nobody is signed out by
327
+ upgrading, and rotating the app key signs nobody out either.
328
+ - A page cached [without a session](live.md#pages-cached-without-a-session) passes straight through.
329
+
330
+ To end the other sessions without a new password, such as for a "Sign out everywhere else" button, ask for the current
331
+ password and pass it to `logoutOtherDevices()`. It throws `InvalidPasswordError` when the password is wrong:
332
+
333
+ ```ts
334
+ import { Auth, request } from '@orieljs/framework'
335
+
336
+ await Auth.logoutOtherDevices(String(request().input('password')))
337
+ ```
338
+
339
+ It works by rehashing the password, so it needs the middleware to take effect. `Auth.logoutCurrentDevice()` signs out here
340
+ only: unlike `logout()`, it leaves the remember token alone, so the user's other remembered devices keep working.
304
341
 
305
342
  ## API tokens
306
343
 
@@ -483,6 +520,8 @@ Signing in and out dispatches these events, which you can [listen](events.md) fo
483
520
  | `Failed` | The credentials didn't match |
484
521
  | `Login` | A user signed in with `attempt()`, `login()`, `loginUsingId()` or the "Remember me" cookie (`once()` dispatches none) |
485
522
  | `Logout` | A user signed out |
523
+ | `CurrentDeviceLogout` | `logoutCurrentDevice()` or `auth.session` signed a user out on this device |
524
+ | `OtherDeviceLogout` | `logoutOtherDevices()` rehashed the password, which ends the other sessions |
486
525
  | `Lockout` | The kits' login throttle stopped a user |
487
526
  | `Registered` | The kits registered a user (it sends the verification mail) |
488
527
  | `Verified` | A user verified their email address |
package/docs/console.md CHANGED
@@ -192,6 +192,8 @@ export class SendEmails extends Command {
192
192
  }
193
193
  ```
194
194
 
195
+ Each run gets a new instance of your class, so its fields start fresh and `#private` members work.
196
+
195
197
  Each run of a command has its own scope, as a request does, so `inject()`, the helpers and the facades work inside
196
198
  `handle()`, and a scoped service lasts for that one run.
197
199
 
@@ -434,9 +436,8 @@ declare const command: Command
434
436
  const password = await command.secret('What is the password?')
435
437
  ```
436
438
 
437
- > [!WARNING]
438
- > Laravel hides what the user types for `secret()`. Oriel's `secret()` reads the answer as `ask()` does, and the
439
- > terminal shows it as it is typed.
439
+ Nothing typed appears in a terminal, and the answer isn't trimmed, as a secret may start or end with a space. When the
440
+ input is a pipe, `secret()` takes the next line, as `ask()` does. Ctrl-C at any question ends the command with exit code 130.
440
441
 
441
442
  #### Asking for confirmation
442
443
 
@@ -647,8 +648,18 @@ test('the mail is sent', async () => {
647
648
  it; `doesntExpectOutput()` and `doesntExpectOutputToContain()` want the opposite. `assertSuccessful()` and
648
649
  `assertFailed()` check the exit code is `0`, or isn't.
649
650
 
651
+ A command that asks questions gets its answers from `withAnswers()`, in order, whichever way it asks. A question beyond
652
+ them fails the test:
653
+
654
+ ```ts
655
+ import { TestCase } from '@orieljs/framework/testing'
656
+ declare const t: TestCase
657
+ // ---cut---
658
+ await t.artisan('admin:create').withAnswers('a-password', 'a-password').assertExitCode(0)
659
+ ```
660
+
650
661
  > [!NOTE]
651
- > Laravel's `expectsQuestion()` and `expectsConfirmation()` aren't in Oriel: a command that asks a question fails in
652
- > a test. Give it the answer as an argument or an option instead.
662
+ > Laravel's `expectsQuestion()` and `expectsConfirmation()` aren't in Oriel: `withAnswers()` gives the answers without
663
+ > checking how the questions are worded.
653
664
 
654
665
  The [Testing](testing.md) pages cover the rest.
@@ -60,6 +60,27 @@ export class TestCase extends BaseTestCase {
60
60
  > [!NOTE]
61
61
  > Laravel's traits are PHP traits, added with `use RefreshDatabase;`. Oriel's are objects you list in `uses`.
62
62
 
63
+ ### Running the tests on another database
64
+
65
+ `TEST_DATABASE_URL` runs the tests on a PostgreSQL or MySQL database, with its driver installed, one file at a time, as they
66
+ share it:
67
+
68
+ ```sh
69
+ TEST_DATABASE_URL=postgres://oriel:secret@127.0.0.1:5432/oriel_test npm test
70
+ ```
71
+
72
+ The run prints `Tests run on pgsql at 127.0.0.1:5432/oriel_test (TEST_DATABASE_URL), one file at a time.`, without the user or
73
+ the password.
74
+
75
+ > [!WARNING]
76
+ > `RefreshDatabase` empties the database it runs on, so give the tests a database of their own. `DB_URL` and `DB_CONNECTION`
77
+ > never count for tests, so a production address in `.env` can't reach them, and `TEST_DATABASE_URL` is refused when it
78
+ > points at the app's own database, from `DB_URL` or from `DB_HOST`, `DB_PORT` and `DB_DATABASE`, in the environment or in
79
+ > `.env`. `localhost`, `127.0.0.1` and `::1` count as one host.
80
+ >
81
+ > As a last check, `RefreshDatabase` and `DatabaseMigrations` refuse to empty the database your `.env` points at, even
82
+ > when a `vitest.config.ts` of your own doesn't use `testingConfig()`.
83
+
63
84
  ## Model factories
64
85
 
65
86
  [Factories](eloquent-factories.md) make the rows a test needs:
package/docs/database.md CHANGED
@@ -152,6 +152,18 @@ const users = await DB.table('users').select(DB.raw('count(*) as user_count, sta
152
152
 
153
153
  A raw expression is SQL you write, so never put a user's input in it: bind it with `?` instead.
154
154
 
155
+
156
+ ### Drivers
157
+
158
+ Each connection's driver is a package of its own: `better-sqlite3` for SQLite on Node, which a new app has (Bun has SQLite
159
+ built in), `pg` for PostgreSQL and `mysql2` for MySQL. Install the one you use:
160
+
161
+ ```sh
162
+ npm install pg
163
+ ```
164
+
165
+ A driver that isn't installed says so the first time the connection is used: `The pgsql connection needs the pg package.
166
+ Install it with: npm install pg`, with the command for your package manager.
155
167
  ### Values in bindings
156
168
 
157
169
  Oriel turns some values into what the database stores: `true` and `false` become `1` and `0` (except on PostgreSQL,
@@ -19,7 +19,10 @@ when requests come: see [Deploying to Vercel](#deploying-to-vercel).
19
19
  Your server needs **Node 22** or later, or **Bun 1.2** or later. On Node, your app's TypeScript runs through `tsx`,
20
20
  which every app has as a dependency; Bun runs it as it is. There is no compile step for your server code.
21
21
 
22
- A PostgreSQL or MySQL database needs its driver in your dependencies, `pg` or `mysql2`. SQLite needs nothing more.
22
+ Each database and disk needs its driver in your dependencies: `better-sqlite3` for SQLite on Node (a new Node app has it,
23
+ and Bun has SQLite built in), `pg` for PostgreSQL, `mysql2` for MySQL, `@aws-sdk/client-s3` and `@aws-sdk/s3-request-presigner`
24
+ for an `s3` disk, `@vercel/blob` for a `blob` disk. A driver that's missing says so the first time it's used, with the
25
+ command that installs it.
23
26
 
24
27
  ## Building your application
25
28
 
@@ -311,6 +314,8 @@ and each instance has its own, so:
311
314
  - **Files your app stores** go on the `blob` disk, a Vercel Blob store, or an `s3` disk (see
312
315
  [The Vercel Blob driver](storage.md#the-vercel-blob-driver)): the `local` and `public` disks write into `storage`,
313
316
  which the function can't.
317
+ - **The function carries your `dependencies`**, so list `pg` (or `mysql2`) and `@vercel/blob` there, and move
318
+ `better-sqlite3` to `devDependencies` when your tests use it: then the function holds only the drivers it uses.
314
319
  - **No queue worker runs.** With `QUEUE_CONNECTION=sync`, a job runs during the request that dispatches it. Your
315
320
  scheduled tasks run through Vercel Cron (see [Scheduled tasks](#scheduled-tasks)).
316
321
  - **Inertia pages render in the browser**, as they do when no SSR server answers: the SSR server doesn't run on
@@ -343,7 +348,9 @@ environment variables (a long random string): Vercel sends it with every call, a
343
348
  so nobody else can run your tasks.
344
349
 
345
350
  Each call runs every task that fell due since the previous call, once, however often it fell due in between: a task
346
- scheduled every five minutes runs once a day, and a task at 04:00 runs at the next morning's call. `vercel:build` names
351
+ scheduled every five minutes runs once a day, and a task at 04:00 runs at the next morning's call. The first call after
352
+ a deploy, with no earlier call recorded, covers one full period of the cron back, as every later call does: for a daily
353
+ cron, from the day before's run time. So a task due just before you deploy still runs. `vercel:build` names
347
354
  the tasks due more often than the cron. Vercel's Hobby plan runs a cron at most once a day, sometime within the hour
348
355
  you chose; a paid plan can call more often:
349
356
 
@@ -15,6 +15,8 @@ The encrypter's key is `key` in `config/app.ts`, which reads `APP_KEY` from `.en
15
15
  `node oriel key:generate` writes a new one: a random key for your cipher, written as `base64:` and its bytes (see
16
16
  [The application key](configuration.md#the-application-key)).
17
17
 
18
+ A page that reads and writes no cookies works without a key, such as a page cached [without a session](live.md#pages-cached-without-a-session). A cookie that needs decrypting then reads as absent, and writing an encrypted cookie throws `MissingAppKeyError`.
19
+
18
20
  `cipher` in `config/app.ts` names the cipher, `AES-256-GCM` in a new app. `AES-128-GCM`, `AES-256-CBC` and `AES-128-CBC`
19
21
  are the others, in upper or lower case. The key must have the length the cipher takes: 32 bytes for AES-256 and 16 for
20
22
  AES-128.
@@ -171,7 +171,8 @@ come from the `.env` file at the root of your app, which the config files read w
171
171
 
172
172
  ### Databases and migrations
173
173
 
174
- A new app uses SQLite, in `database/database.sqlite`, which the installer created and migrated. To use PostgreSQL or
174
+ A new app uses SQLite, in `database/database.sqlite`, which the installer created and migrated. On Node it uses the
175
+ `better-sqlite3` package, which a new app has in its dependencies; Bun has SQLite built in, so a Bun app doesn't. To use PostgreSQL or
175
176
  MySQL instead, install its driver, `pg` or `mysql2`:
176
177
 
177
178
  ```sh
@@ -189,6 +189,26 @@ component.assertRedirect('/posts').assertDispatched('post-created', { title: 'He
189
189
  `assertRedirect()` with no URL passes on any redirect. `effects().redirectUsingNavigate` is `true` when the action
190
190
  asked for `{ navigate: true }`.
191
191
 
192
+ ## Testing cookies
193
+
194
+ A component sees the cookies you give the test, and `cookies()` shows what the last call queued, by name, with `null` for
195
+ one it deleted. Cookies it queues are sent on later requests in the test, as a browser would:
196
+
197
+ ```ts
198
+ import { Live, Component } from '@orieljs/framework'
199
+ import { TestCase } from '@orieljs/framework/testing'
200
+ import { expect } from 'vitest'
201
+ declare const t: TestCase
202
+ declare const Theme: new () => Component
203
+ // ---cut---
204
+ t.withCookie('theme', 'dark')
205
+
206
+ const component = await Live.test(Theme)
207
+ await component.call('remember')
208
+
209
+ expect(component.cookies()).toEqual({ seen: '1' })
210
+ ```
211
+
192
212
  ## Testing file uploads
193
213
 
194
214
  In a `WithFileUploads` component, `set()` with a `FakeFile` uploads it as the browser would: through the upload rules,
package/docs/live.md CHANGED
@@ -784,6 +784,8 @@ export default class ProfilePhoto extends WithFileUploads(Component) {
784
784
  With `multiple`, the field is an array of files. A temporary file has the methods of an [uploaded
785
785
  file](requests.md#files), such as `store()` and `storeAs()`, and `temporaryUrl()`, a signed link that previews an image,
786
786
  audio or video.
787
+ `store()` moves the temporary file, so reset the property afterwards, as above: a second `store()`, or `temporaryUrl()`
788
+ after it, throws `UploadAlreadyStoredError`.
787
789
 
788
790
  Temporary files go in `live-tmp` on your default disk, and [Storage](storage.md#live-uploads) explains how they are
789
791
  cleaned up. `o:loading` shows while a file uploads, and these browser events follow it, on the input:
@@ -217,6 +217,16 @@ The page number is the component's `page`: its actions `nextPage`, `previousPage
217
217
  move it. It isn't written to the address bar, so a reload shows page 1. `Pagination` takes `paginate()` and
218
218
  `simplePaginate()` paginators, not cursor ones.
219
219
 
220
+ Its buttons have the starter kits' classes, `btn btn-secondary`, and `btn` on the current page. On a site with its own CSS,
221
+ give it yours, or `''` for none. Write them in your file, so Tailwind generates them. `class` is for the `<nav>` around them:
222
+
223
+ ```tsx
224
+ import { Pagination, type PaginationSource } from '@orieljs/framework'
225
+ declare const posts: PaginationSource
226
+ // ---cut---
227
+ <Pagination paginator={posts} class="flex gap-2" buttonClass="pager" currentClass="pager is-current" />
228
+ ```
229
+
220
230
  ## Converting results to JSON
221
231
 
222
232
  A paginator returned from a route, or given to `JSON.stringify()`, becomes Laravel's JSON shape:
package/docs/session.md CHANGED
@@ -79,8 +79,25 @@ await Schema.create('sessions', (t) => {
79
79
  })
80
80
  ```
81
81
 
82
- Each row also records the signed-in user's id, the IP address and the user agent of the session's last request.
83
- `connection` names the database connection to use, the default one when it is `null`, and `table` the table.
82
+ Each row also records the signed-in user's id. `connection` names the database connection to use, the default one when
83
+ it is `null`, and `table` the table.
84
+
85
+ The `ip_address` and `user_agent` columns stay empty unless you turn on `client_details`, in `config/session.ts`:
86
+
87
+ ```ts
88
+ import { env } from '@orieljs/framework'
89
+
90
+ export default {
91
+ client_details: env('SESSION_CLIENT_DETAILS', false),
92
+ }
93
+ ```
94
+
95
+ The columns are there either way, so turning it on needs no migration. Turning it off clears a session's values the next
96
+ time that session is written.
97
+
98
+ > [!NOTE]
99
+ > Laravel stores both on every write. Oriel doesn't by default, because Live on a cached page gives anonymous readers a
100
+ > session, and storing them would keep every reader's address.
84
101
 
85
102
  #### Redis
86
103
 
@@ -12,6 +12,10 @@ need. There is nothing to keep in sync with the kit afterwards.
12
12
  The kits sign users in with Oriel's own authentication, without a separate package such as Laravel's Fortify: the
13
13
  controllers, or the Live components, are in your app.
14
14
 
15
+ A new password ends the user's other sessions, while the session that changed it stays signed in: the kits add the
16
+ [`auth.session` middleware](authentication.md#invalidating-sessions-on-other-devices) to the `web` group. An app made before
17
+ alpha.14 adds it with one line in `bootstrap/app.ts`, and nobody is signed out by doing so.
18
+
15
19
  ## Creating an application using a starter kit
16
20
 
17
21
  The installer asks which kit you want, or takes it as an option (see
package/docs/storage.md CHANGED
@@ -36,7 +36,13 @@ app's `config/filesystems.ts` isn't read yet.
36
36
 
37
37
  ### The S3 driver
38
38
 
39
- The `s3` disk reads `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, `AWS_BUCKET`, `AWS_URL`,
39
+ The `s3` disk needs the AWS SDK, which you install yourself:
40
+
41
+ ```sh
42
+ npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner
43
+ ```
44
+
45
+ It reads `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, `AWS_BUCKET`, `AWS_URL`,
40
46
  `AWS_ENDPOINT` and `AWS_USE_PATH_STYLE_ENDPOINT` from your `.env`. For an S3-compatible service, such as MinIO or
41
47
  Cloudflare R2, set `endpoint`, and `usePathStyleEndpoint` if it wants the bucket in the path.
42
48
 
@@ -44,7 +50,17 @@ Cloudflare R2, set `endpoint`, and `usePathStyleEndpoint` if it wants the bucket
44
50
 
45
51
  On Vercel, files your app stores need a disk that outlives the function: the `blob` disk keeps them in a
46
52
  [Vercel Blob](https://vercel.com/docs/vercel-blob) store. Create a store in your Vercel project's Storage tab and
47
- connect it to the project: Vercel then sets `BLOB_READ_WRITE_TOKEN`, which the disk reads.
53
+ connect it to the project: Vercel then sets `BLOB_READ_WRITE_TOKEN`, which the disk reads. The disk needs
54
+ `@vercel/blob` in your dependencies: `npm install @vercel/blob`.
55
+
56
+ > [!NOTE]
57
+ > `npm audit` reports an advisory in `zod`, which `@vercel/blob` brings in through Vercel's own packages (`@vercel/oidc`,
58
+ > then `@vercel/cli-config`). Until Vercel releases a fix there, an override in your `package.json` gives them the fixed
59
+ > version (`pnpm.overrides` for pnpm, `resolutions` for Yarn):
60
+ >
61
+ > ```json
62
+ > { "overrides": { "zod": "^4.6.6" } }
63
+ > ```
48
64
 
49
65
  ```ts
50
66
  import { Storage } from '@orieljs/framework'
@@ -187,7 +203,9 @@ same for folders. `makeDirectory()` creates a folder and `deleteDirectory()` del
187
203
  ## Live uploads
188
204
 
189
205
  A Live component's upload is first stored as a temporary file, under `live-tmp` on your default disk, with a random
190
- name. Your component's `store()` moves it to its place. When an upload finishes, temporary files older than a day are
206
+ name. Your component's `store()` moves it to its place, or copies it there and deletes the temporary file when you store it
207
+ on another disk, so nothing is left behind. An upload stores once: a second `store()`, or a `temporaryUrl()` after it,
208
+ throws `UploadAlreadyStoredError`, so reset the property afterwards. When an upload finishes, temporary files older than a day are
191
209
  deleted, except on an S3 disk, where listing the folder on every upload would be slow: give the bucket a lifecycle rule
192
210
  for `live-tmp` instead. `live.temporary_file_upload.disk` and `directory` choose another place.
193
211
 
package/docs/testing.md CHANGED
@@ -39,14 +39,18 @@ Before each application is created, the test case sets these variables, unless t
39
39
  | `CACHE_STORE` | `array` |
40
40
  | `DB_CONNECTION` | `sqlite` |
41
41
  | `DB_DATABASE` | `:memory:` |
42
+ | `DB_URL` | empty |
42
43
  | `MAIL_MAILER` | `array` |
43
44
  | `QUEUE_CONNECTION` | `sync` |
44
45
  | `SESSION_DRIVER` | `array` |
45
46
 
46
47
  So your tests send no mail, run jobs at once, and each test gets its own empty in-memory database. A new app's
47
- `vitest.config.ts` sets the same values as Vitest's `env`, because Bun reads `.env` before the tests start. Vitest's
48
- `env` replaces what your shell or your CI sets, so to run your tests with another value, such as a MySQL database,
49
- change it in `vitest.config.ts`.
48
+ `vitest.config.ts` sets the same values through `testingConfig()`, because Bun reads `.env` before the tests start. They
49
+ replace what your shell or your CI sets, and each run prints which database it is on. To run your tests on MySQL or
50
+ PostgreSQL, see [Running the tests on another database](database-testing.md#running-the-tests-on-another-database).
51
+
52
+ An app made before alpha.14 has `env: { ...TESTING_ENVIRONMENT }` in `vitest.config.ts`. Replace it with `...testingConfig()`,
53
+ imported from `@orieljs/framework/testing`, to get that.
50
54
 
51
55
  With `APP_ENV` set to `testing`, a `.env.testing` file, when you add one, is read in place of `.env`. For the other
52
56
  variables, what you set in your shell or your CI wins over both files.
@@ -128,9 +132,8 @@ Vitest runs your test files at the same time, in several workers. With the defau
128
132
  test has its own database, so tests can't see each other's rows.
129
133
 
130
134
  > [!WARNING]
131
- > On a database in a file, or a MySQL or PostgreSQL server (set in `vitest.config.ts`), every worker uses the same
132
- > database. Run those tests one
133
- > file at a time, with `node oriel test -- --no-file-parallelism`, or give each worker its own database.
135
+ > On a database in a file every worker uses the same database, so run those tests one file at a time, with `node oriel
136
+ > test -- --no-file-parallelism`. `TEST_DATABASE_URL` does that for you.
134
137
 
135
138
  ## Test traits
136
139
 
@@ -143,7 +143,10 @@ import type { User } from '../app/Models/User'
143
143
  // ---cut---
144
144
  Route.middleware('auth').group(() => {
145
145
  Route.post('/account/two-factor/app', async () => {
146
- const { svg, secret } = await TwoFactor.enableApp((await request().user<User>())!)
146
+ const user = (await request().user<User>())!
147
+ // A form sent again after the app is set up: enableApp() would refuse.
148
+ if (TwoFactor.hasApp(user)) return back().with('status', 'Your app is set up already.')
149
+ const { svg, secret } = await TwoFactor.enableApp(user)
147
150
  return view('account.two-factor-app', { svg, secret })
148
151
  })
149
152
 
@@ -158,6 +161,12 @@ Route.middleware('auth').group(() => {
158
161
  `confirmApp()` makes the app the user's method and gives them recovery codes. `disableApp()` removes it, and
159
162
  `setMethod()` lets a user who has both choose which is asked for.
160
163
 
164
+ `TwoFactor.hasApp(user)` says whether the user's app works, so a page can offer to set one up or to remove it. `enableApp()`
165
+ on a working app throws `TwoFactorAppAlreadyEnabledError`, since a new secret would silently stop the old app's codes: call
166
+ `disableApp(user)` first. Before the app is confirmed, calling `enableApp()` again just replaces the secret.
167
+
168
+ In a test, `totpCode(secret, Date.now())` from `@orieljs/framework` gives the code the app would show.
169
+
161
170
  ## Recovery codes
162
171
 
163
172
  `TwoFactor.recoveryCodes(user)` returns the user's codes, making them on first ask; show them once and ask the user to
package/docs/views.md CHANGED
@@ -336,6 +336,8 @@ Attributes take values as in HTML, with a few conveniences:
336
336
  - `true` writes a boolean attribute such as `disabled`, and `false`, `null` and `undefined` leave it out. `aria-*`
337
337
  and `data-*` attributes write `true` and `false` as text.
338
338
  - `htmlFor` is written `for`, and `for` works too.
339
+ - React's SVG names work: `strokeWidth` is written `stroke-width`, `clipPath` `clip-path`, `xlinkHref` `xlink:href`. Names SVG
340
+ itself writes in camelCase, such as `viewBox`, stay as they are.
339
341
 
340
342
  An `<html>` element is preceded by `<!DOCTYPE html>`, as TSX has no way to write one.
341
343
 
package/docs/vite.md CHANGED
@@ -221,7 +221,7 @@ Vue's `computed()` and `ref()`, Svelte's `$derived` and Solid's `createMemo()` c
221
221
  like `buttonClass` or `classes` holds classes wherever it's used.
222
222
 
223
223
  Your dependencies keep their class names, and so do the classes their style sheets define, so a library's markup
224
- always matches its CSS, whether you import it or the library injects it. CSS modules' names are hashed already, and
224
+ always matches its CSS, whether you import it from a script, `@import` it from your own CSS, or the library injects it. CSS modules' names are hashed already, and
225
225
  stay as Vite wrote them. `dark` is never renamed: the kits' appearance script sets it before the page draws.
226
226
 
227
227
  ### Classes the build can't rename