@orieljs/framework 0.1.0-alpha.1 → 0.1.0-alpha.2
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-K6MAA3RM.js → chunk-3ZRPBRAE.js} +3 -1
- package/dist/chunk-3ZRPBRAE.js.map +1 -0
- package/dist/{chunk-AI2RFMBT.js → chunk-IRHK7GH7.js} +2 -2
- package/dist/{chunk-WI7E7Q46.js → chunk-TIE5OAMF.js} +3 -3
- package/dist/{chunk-BZPCRKFQ.js → chunk-UPZAML2Q.js} +729 -17
- package/dist/chunk-UPZAML2Q.js.map +1 -0
- package/dist/contracts.d.ts +81 -9
- package/dist/contracts.js +3 -1
- package/dist/index.d.ts +1930 -1050
- package/dist/index.js +1443 -64
- package/dist/index.js.map +1 -1
- package/dist/{jsx-runtime-B8J6xq-7.d.ts → jsx-runtime-CZ6JqBQo.d.ts} +6 -11
- package/dist/jsx-runtime.d.ts +2 -1
- package/dist/jsx-runtime.js +3 -3
- package/dist/testing.d.ts +161 -16
- package/dist/testing.js +9 -3
- package/package.json +29 -28
- package/dist/chunk-BZPCRKFQ.js.map +0 -1
- package/dist/chunk-K6MAA3RM.js.map +0 -1
- /package/dist/{chunk-AI2RFMBT.js.map → chunk-IRHK7GH7.js.map} +0 -0
- /package/dist/{chunk-WI7E7Q46.js.map → chunk-TIE5OAMF.js.map} +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { Token as Token$1 } from './contracts.js';
|
|
2
|
+
|
|
1
3
|
/** A typed, runtime-unique key for container bindings. */
|
|
2
|
-
interface Token
|
|
4
|
+
interface Token<T> {
|
|
3
5
|
readonly id: symbol;
|
|
4
6
|
readonly description: string;
|
|
5
7
|
/** Phantom field: only carries T at the type level. Never set at runtime. */
|
|
6
8
|
readonly __type?: T;
|
|
7
9
|
}
|
|
8
10
|
type Class<T> = abstract new (...args: any[]) => T;
|
|
9
|
-
type Abstract<T> = Token
|
|
11
|
+
type Abstract<T> = Token<T> | Class<T>;
|
|
10
12
|
type Factory$1<T> = (container: Container) => T;
|
|
11
13
|
type Concrete<T> = Factory$1<T> | (new () => T);
|
|
12
14
|
interface Container {
|
|
@@ -32,7 +34,7 @@ interface Container {
|
|
|
32
34
|
/** Run fn with this container as the "current" one for inject(), helpers and facades (AsyncLocalStorage). */
|
|
33
35
|
run<R>(fn: () => R): R;
|
|
34
36
|
}
|
|
35
|
-
declare const Container: Token
|
|
37
|
+
declare const Container: Token<Container>;
|
|
36
38
|
|
|
37
39
|
interface ServiceProvider$1 {
|
|
38
40
|
/** Bind things into the container. Synchronous. Don't resolve other services here. */
|
|
@@ -94,13 +96,6 @@ interface ClassRegistry {
|
|
|
94
96
|
}
|
|
95
97
|
declare const ClassRegistry: Token$1<ClassRegistry>;
|
|
96
98
|
|
|
97
|
-
/** A typed, runtime-unique key for container bindings. */
|
|
98
|
-
interface Token<T> {
|
|
99
|
-
readonly id: symbol;
|
|
100
|
-
readonly description: string;
|
|
101
|
-
/** Phantom field: only carries T at the type level. Never set at runtime. */
|
|
102
|
-
readonly __type?: T;
|
|
103
|
-
}
|
|
104
99
|
interface Htmlable {
|
|
105
100
|
toHtml(): string;
|
|
106
101
|
}
|
|
@@ -117,7 +112,7 @@ interface ViewFactory {
|
|
|
117
112
|
share(key: string | Record<string, unknown>, value?: unknown): void;
|
|
118
113
|
composer(views: string | string[], composer: (view: View$1) => void | Promise<void>): void;
|
|
119
114
|
}
|
|
120
|
-
declare const ViewFactory: Token<ViewFactory>;
|
|
115
|
+
declare const ViewFactory: Token$1<ViewFactory>;
|
|
121
116
|
|
|
122
117
|
type ErrorKind = 'Http' | 'Server' | 'ModelNotFound' | 'Validation' | 'Authentication' | 'Authorization' | 'TokenMismatch' | 'BindingResolution' | 'CircularDependency' | 'ContainerNotAvailable';
|
|
123
118
|
/** Every error thrown by the framework implements this. The exception handler switches on `kind`. */
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { f as Fragment, H as HtmlAttributes, J as JSX, z as jsx, B as jsxs } from './jsx-runtime-
|
|
1
|
+
export { f as Fragment, H as HtmlAttributes, J as JSX, z as jsx, B as jsxs } from './jsx-runtime-CZ6JqBQo.js';
|
|
2
|
+
import './contracts.js';
|
package/dist/jsx-runtime.js
CHANGED
package/dist/testing.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Token as Token$1 } from './contracts.js';
|
|
2
|
+
|
|
1
3
|
/** A typed, runtime-unique key for container bindings. */
|
|
2
4
|
interface Token<T> {
|
|
3
5
|
readonly id: symbol;
|
|
@@ -73,14 +75,14 @@ interface Application extends Container {
|
|
|
73
75
|
terminating(callback: () => void | Promise<void>): void;
|
|
74
76
|
terminate(): Promise<void>;
|
|
75
77
|
}
|
|
76
|
-
declare const Application: Token<Application>;
|
|
78
|
+
declare const Application: Token$1<Application>;
|
|
77
79
|
interface ExceptionHandler {
|
|
78
80
|
report(error: unknown): Promise<void>;
|
|
79
81
|
shouldReport(error: unknown): boolean;
|
|
80
82
|
/** `request` is the scoped HttpRequest (Contracts/Http) when available, else the raw Request. */
|
|
81
83
|
render(request: unknown, error: unknown): Promise<Response>;
|
|
82
84
|
}
|
|
83
|
-
declare const ExceptionHandler: Token<ExceptionHandler>;
|
|
85
|
+
declare const ExceptionHandler: Token$1<ExceptionHandler>;
|
|
84
86
|
|
|
85
87
|
interface Arrayable<T = unknown> {
|
|
86
88
|
toArray(): T;
|
|
@@ -121,7 +123,7 @@ interface Session {
|
|
|
121
123
|
previousUrl(): string | undefined;
|
|
122
124
|
setPreviousUrl(url: string): void;
|
|
123
125
|
}
|
|
124
|
-
declare const Session: Token<Session>;
|
|
126
|
+
declare const Session: Token$1<Session>;
|
|
125
127
|
interface UploadedFile {
|
|
126
128
|
readonly clientName: string;
|
|
127
129
|
readonly mimeType: string;
|
|
@@ -141,7 +143,7 @@ interface Encrypter {
|
|
|
141
143
|
decryptString(payload: string): string;
|
|
142
144
|
getKey(): Uint8Array;
|
|
143
145
|
}
|
|
144
|
-
declare const Encrypter: Token<Encrypter>;
|
|
146
|
+
declare const Encrypter: Token$1<Encrypter>;
|
|
145
147
|
|
|
146
148
|
interface View extends Htmlable {
|
|
147
149
|
readonly name: string;
|
|
@@ -155,7 +157,7 @@ interface ViewFactory {
|
|
|
155
157
|
share(key: string | Record<string, unknown>, value?: unknown): void;
|
|
156
158
|
composer(views: string | string[], composer: (view: View) => void | Promise<void>): void;
|
|
157
159
|
}
|
|
158
|
-
declare const ViewFactory: Token<ViewFactory>;
|
|
160
|
+
declare const ViewFactory: Token$1<ViewFactory>;
|
|
159
161
|
|
|
160
162
|
type Operator = '=' | '!=' | '<>' | '<' | '<=' | '>' | '>=' | 'like' | 'not like' | 'ilike' | 'in' | 'not in';
|
|
161
163
|
type Row = Record<string, unknown>;
|
|
@@ -219,7 +221,7 @@ interface DatabaseManager extends DatabaseConnection {
|
|
|
219
221
|
connection(name?: string): DatabaseConnection;
|
|
220
222
|
disconnect(name?: string): Promise<void>;
|
|
221
223
|
}
|
|
222
|
-
declare const DatabaseManager: Token<DatabaseManager>;
|
|
224
|
+
declare const DatabaseManager: Token$1<DatabaseManager>;
|
|
223
225
|
/** What non-Database components may rely on from a model instance. */
|
|
224
226
|
interface ModelInstance {
|
|
225
227
|
exists: boolean;
|
|
@@ -276,7 +278,7 @@ interface AuthFactory {
|
|
|
276
278
|
extend(driver: string, factory: (name: string, config: Record<string, unknown>) => Guard): void;
|
|
277
279
|
provider(driver: string, factory: (config: Record<string, unknown>) => UserProvider): void;
|
|
278
280
|
}
|
|
279
|
-
declare const AuthFactory: Token<AuthFactory>;
|
|
281
|
+
declare const AuthFactory: Token$1<AuthFactory>;
|
|
280
282
|
|
|
281
283
|
/** Options a job class may declare as public fields. Their presence (or implementing ShouldQueue) makes things queueable. */
|
|
282
284
|
interface ShouldQueue {
|
|
@@ -339,7 +341,7 @@ interface QueueManager extends Queue {
|
|
|
339
341
|
connection(name?: string): Queue;
|
|
340
342
|
extend(driver: string, factory: (config: Record<string, unknown>) => Queue): void;
|
|
341
343
|
}
|
|
342
|
-
declare const QueueManager: Token<QueueManager>;
|
|
344
|
+
declare const QueueManager: Token$1<QueueManager>;
|
|
343
345
|
|
|
344
346
|
interface Batch {
|
|
345
347
|
readonly id: string;
|
|
@@ -379,7 +381,7 @@ interface BusDispatcher {
|
|
|
379
381
|
batch(jobs: Job[]): PendingBatch;
|
|
380
382
|
findBatch(id: string): Promise<Batch | undefined>;
|
|
381
383
|
}
|
|
382
|
-
declare const BusDispatcher: Token<BusDispatcher>;
|
|
384
|
+
declare const BusDispatcher: Token$1<BusDispatcher>;
|
|
383
385
|
/** What PendingBatch hands to the repository. Callbacks are jobs, because closures can't be serialized. */
|
|
384
386
|
interface PendingBatchOptions {
|
|
385
387
|
name: string;
|
|
@@ -470,7 +472,7 @@ interface MailManager extends Mailer {
|
|
|
470
472
|
mailer(name?: string): Mailer;
|
|
471
473
|
extend(transport: string, factory: (config: Record<string, unknown>) => MailTransport): void;
|
|
472
474
|
}
|
|
473
|
-
declare const MailManager: Token<MailManager>;
|
|
475
|
+
declare const MailManager: Token$1<MailManager>;
|
|
474
476
|
|
|
475
477
|
interface Notifiable {
|
|
476
478
|
/** e.g. 'mail' → email address, 'database' → the model itself. */
|
|
@@ -498,7 +500,7 @@ interface NotificationDispatcher {
|
|
|
498
500
|
};
|
|
499
501
|
extend(channel: string, factory: () => NotificationChannel): void;
|
|
500
502
|
}
|
|
501
|
-
declare const NotificationDispatcher: Token<NotificationDispatcher>;
|
|
503
|
+
declare const NotificationDispatcher: Token$1<NotificationDispatcher>;
|
|
502
504
|
|
|
503
505
|
type ListenerClass<E> = Class<{
|
|
504
506
|
handle(event: E): unknown;
|
|
@@ -517,7 +519,7 @@ interface EventDispatcher {
|
|
|
517
519
|
}>): void;
|
|
518
520
|
forget(event: Class<unknown> | string): void;
|
|
519
521
|
}
|
|
520
|
-
declare const EventDispatcher: Token<EventDispatcher>;
|
|
522
|
+
declare const EventDispatcher: Token$1<EventDispatcher>;
|
|
521
523
|
|
|
522
524
|
interface PutOptions {
|
|
523
525
|
visibility?: 'public' | 'private';
|
|
@@ -553,7 +555,48 @@ interface FilesystemManager extends Filesystem {
|
|
|
553
555
|
disk(name?: string): Filesystem;
|
|
554
556
|
extend(driver: string, factory: (config: Record<string, unknown>) => Filesystem): void;
|
|
555
557
|
}
|
|
556
|
-
declare const FilesystemManager: Token<FilesystemManager>;
|
|
558
|
+
declare const FilesystemManager: Token$1<FilesystemManager>;
|
|
559
|
+
|
|
560
|
+
/** Infinite-scroll metadata for one prop (page.scrollProps[path]). */
|
|
561
|
+
interface InertiaScrollProp {
|
|
562
|
+
pageName: string;
|
|
563
|
+
previousPage: string | number | null;
|
|
564
|
+
nextPage: string | number | null;
|
|
565
|
+
currentPage: string | number | null;
|
|
566
|
+
reset: boolean;
|
|
567
|
+
}
|
|
568
|
+
/** A once prop the client keeps between visits (page.onceProps[key]). `expiresAt` is epoch milliseconds. */
|
|
569
|
+
interface InertiaOnceProp {
|
|
570
|
+
prop: string;
|
|
571
|
+
expiresAt: number | null;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* The Inertia page object (protocol v3, @inertiajs/core 3.x). Only component, props, url and version are always
|
|
575
|
+
* present; the other fields are left out when empty or false.
|
|
576
|
+
*/
|
|
577
|
+
interface InertiaPage {
|
|
578
|
+
component: string;
|
|
579
|
+
props: Record<string, unknown>;
|
|
580
|
+
/** Path and query, never absolute: '/posts?page=2'. */
|
|
581
|
+
url: string;
|
|
582
|
+
/** '' when the app has no asset version. */
|
|
583
|
+
version: string;
|
|
584
|
+
sharedProps?: string[];
|
|
585
|
+
mergeProps?: string[];
|
|
586
|
+
prependProps?: string[];
|
|
587
|
+
deepMergeProps?: string[];
|
|
588
|
+
/** '<prop path>.<key field>', e.g. 'posts.data.id'. */
|
|
589
|
+
matchPropsOn?: string[];
|
|
590
|
+
/** Group name → prop paths loaded after the first render. */
|
|
591
|
+
deferredProps?: Record<string, string[]>;
|
|
592
|
+
rescuedProps?: string[];
|
|
593
|
+
scrollProps?: Record<string, InertiaScrollProp>;
|
|
594
|
+
onceProps?: Record<string, InertiaOnceProp>;
|
|
595
|
+
clearHistory?: true;
|
|
596
|
+
encryptHistory?: true;
|
|
597
|
+
flash?: Record<string, unknown>;
|
|
598
|
+
preserveFragment?: true;
|
|
599
|
+
}
|
|
557
600
|
|
|
558
601
|
/**
|
|
559
602
|
* Laravel's PendingCommand: `await t.artisan('inspire').expectsOutput('…').assertExitCode(0)`.
|
|
@@ -598,6 +641,90 @@ type JsonStructure = Array<string | {
|
|
|
598
641
|
[key: string]: JsonStructure;
|
|
599
642
|
};
|
|
600
643
|
|
|
644
|
+
type Json = unknown;
|
|
645
|
+
type Scope<T extends AssertableJson> = (json: T) => unknown;
|
|
646
|
+
/**
|
|
647
|
+
* Laravel's Illuminate\Testing\Fluent\AssertableJson: fluent, scoped assertions over decoded JSON. Inside a scope
|
|
648
|
+
* (has(key, callback), first(), each()) every property must be interacted with, or etc() must be called.
|
|
649
|
+
*/
|
|
650
|
+
declare class AssertableJson {
|
|
651
|
+
protected readonly props: Json;
|
|
652
|
+
protected readonly path: string | undefined;
|
|
653
|
+
protected interactedKeys: string[];
|
|
654
|
+
constructor(props: Json, path?: string | undefined);
|
|
655
|
+
static fromJson(json: Json): AssertableJson;
|
|
656
|
+
/** A child scope of the same class (subclasses override to keep their extra state out of scopes). */
|
|
657
|
+
protected newScope(props: Json, path: string): AssertableJson;
|
|
658
|
+
protected dotPath(key?: string): string;
|
|
659
|
+
/** The value at `key` in this scope, or the whole scope. */
|
|
660
|
+
protected prop(key?: string): Json;
|
|
661
|
+
/** A literal key of this scope wins over a dot path, like Laravel's Arr::get (keys such as 'items.0.name'). */
|
|
662
|
+
private hasOwnKey;
|
|
663
|
+
private exists;
|
|
664
|
+
protected interactsWith(key: string | number): void;
|
|
665
|
+
/** Every property of the scope was checked (called when a scope ends). */
|
|
666
|
+
interacted(): void;
|
|
667
|
+
/** Allow the properties this scope didn't check. */
|
|
668
|
+
etc(): this;
|
|
669
|
+
/** has('key'), has('key', 3), has('key', json => …), has('key', 3, first => …), or has(3) for the root size. */
|
|
670
|
+
has(key: string | number, length?: number | Scope<this>, callback?: Scope<this>): this;
|
|
671
|
+
/** hasAll(['a', 'b']) or hasAll({ items: 3 }). */
|
|
672
|
+
hasAll(keys: string | string[] | Record<string, number>): this;
|
|
673
|
+
hasAny(keys: string | string[]): this;
|
|
674
|
+
missing(key: string): this;
|
|
675
|
+
missingAll(keys: string | string[]): this;
|
|
676
|
+
/** count(3) checks this scope's size; count('items', 3) a property's. */
|
|
677
|
+
count(key: string | number, length?: number): this;
|
|
678
|
+
countBetween(key: string, min: number, max: number): this;
|
|
679
|
+
/** where('name', 'Ann'), or where('name', value => value.startsWith('A')). Objects compare ignoring key order. */
|
|
680
|
+
where(key: string, expected: unknown): this;
|
|
681
|
+
whereNot(key: string, expected: unknown): this;
|
|
682
|
+
whereNull(key: string): this;
|
|
683
|
+
whereNotNull(key: string): this;
|
|
684
|
+
whereAll(bindings: Record<string, unknown>): this;
|
|
685
|
+
/** whereType('id', 'integer'), whereType('name', 'string|null'), whereType('tags', ['array', 'null']). */
|
|
686
|
+
whereType(key: string, expected: string | string[]): this;
|
|
687
|
+
whereAllType(bindings: Record<string, string | string[]>): this;
|
|
688
|
+
/** The list contains every expected value (or one passing the callback); a string contains the substring. */
|
|
689
|
+
whereContains(key: string, expected: unknown): this;
|
|
690
|
+
protected scope(key: string, callback: Scope<this>): this;
|
|
691
|
+
first(callback: Scope<this>): this;
|
|
692
|
+
each(callback: Scope<this>): this;
|
|
693
|
+
when(condition: unknown, callback: (json: this) => unknown, otherwise?: (json: this) => unknown): this;
|
|
694
|
+
dump(key?: string): this;
|
|
695
|
+
toArray(): Json;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/** The page object of a response: the JSON body of an Inertia visit, or the page script of a first visit. */
|
|
699
|
+
declare function inertiaPageOf(response: TestResponse): InertiaPage;
|
|
700
|
+
/** Inertia's AssertableInertia: AssertableJson over the page props, plus the page component, url, version and flash. */
|
|
701
|
+
declare class AssertableInertia extends AssertableJson {
|
|
702
|
+
#private;
|
|
703
|
+
static fromTestResponse(response: TestResponse): AssertableInertia;
|
|
704
|
+
/** Scopes are plain AssertableJson: the page-level methods only make sense at the root. */
|
|
705
|
+
protected newScope(props: unknown, path: string): AssertableJson;
|
|
706
|
+
get page(): InertiaPage;
|
|
707
|
+
/** The component name; the page file must exist unless `shouldExist` is false (inertia.testing.ensure_pages_exist). */
|
|
708
|
+
component(value?: string, shouldExist?: boolean): this;
|
|
709
|
+
url(value: string): this;
|
|
710
|
+
version(value: string): this;
|
|
711
|
+
/** The flash data has `key` (dot paths allowed), equal to `expected` when given. */
|
|
712
|
+
hasFlash(key: string, ...expected: [] | [unknown]): this;
|
|
713
|
+
missingFlash(key: string): this;
|
|
714
|
+
static assertFlashHas(flash: Record<string, unknown>, key: string, ...expected: [] | [unknown]): void;
|
|
715
|
+
static assertFlashMissing(flash: Record<string, unknown>, key: string): void;
|
|
716
|
+
/**
|
|
717
|
+
* Requests the page again as a partial reload (only/except) and checks it is the same page. Uses the test's
|
|
718
|
+
* HTTP client, so the session and cookies carry over.
|
|
719
|
+
*/
|
|
720
|
+
reload(callback?: (page: AssertableInertia) => unknown, only?: string | string[], except?: string | string[]): Promise<this>;
|
|
721
|
+
reloadOnly(only: string | string[], callback?: (page: AssertableInertia) => unknown): Promise<this>;
|
|
722
|
+
reloadExcept(except: string | string[], callback?: (page: AssertableInertia) => unknown): Promise<this>;
|
|
723
|
+
/** Loads the deferred props of every group (or the given groups) in one partial reload. */
|
|
724
|
+
loadDeferredProps(groupsOrCallback: string | string[] | ((page: AssertableInertia) => unknown), callback?: (page: AssertableInertia) => unknown): Promise<this>;
|
|
725
|
+
toArray(): Record<string, unknown>;
|
|
726
|
+
}
|
|
727
|
+
|
|
601
728
|
/** Laravel's CookieValuePrefix: hmac_sha1(name + 'v2', key) + '|' (41 characters), as Auth's EncryptCookies writes it. */
|
|
602
729
|
declare function cookiePrefix(name: string, key: Uint8Array): string;
|
|
603
730
|
/** What EncryptCookies puts in a browser cookie: encrypt(prefix + value, serialize: false). */
|
|
@@ -637,6 +764,8 @@ interface ResponseContext {
|
|
|
637
764
|
views?: View[];
|
|
638
765
|
/** The last error the exception handler rendered. */
|
|
639
766
|
exception?: unknown;
|
|
767
|
+
/** The client that sent the request (Inertia reloads reuse it, keeping the session and cookies). */
|
|
768
|
+
client?: HttpClient;
|
|
640
769
|
}
|
|
641
770
|
/** Laravel's TestResponse: a Response with its body already read, plus fluent assertions. */
|
|
642
771
|
declare class TestResponse {
|
|
@@ -700,8 +829,24 @@ declare class TestResponse {
|
|
|
700
829
|
assertSeeText(value: string | string[], escape?: boolean): this;
|
|
701
830
|
assertDontSeeText(value: string | string[], escape?: boolean): this;
|
|
702
831
|
assertSeeTextInOrder(values: string[], escape?: boolean): this;
|
|
703
|
-
/**
|
|
704
|
-
|
|
832
|
+
/**
|
|
833
|
+
* The response JSON contains `data` (a subset match: extra keys in the response are fine), or fluent
|
|
834
|
+
* assertions: assertJson(json => json.has('data', 3).etc()).
|
|
835
|
+
*/
|
|
836
|
+
assertJson(data: Record<string, unknown> | unknown[] | ((json: AssertableJson) => unknown)): this;
|
|
837
|
+
/**
|
|
838
|
+
* An Inertia page response, with optional fluent assertions over its props. An async callback (reload(),
|
|
839
|
+
* loadDeferredProps()) makes this return a promise: await it.
|
|
840
|
+
*/
|
|
841
|
+
assertInertia(callback: (page: AssertableInertia) => Promise<unknown>): Promise<this>;
|
|
842
|
+
assertInertia(callback?: (page: AssertableInertia) => unknown): this;
|
|
843
|
+
/** The Inertia page object of this response. */
|
|
844
|
+
inertiaPage(): InertiaPage;
|
|
845
|
+
/** The page props, or one prop by dot path. */
|
|
846
|
+
inertiaProps<T = unknown>(key?: string): T;
|
|
847
|
+
/** Inertia flash data waiting in the session for the next page (after a redirect). */
|
|
848
|
+
assertInertiaFlash(key: string, ...expected: [] | [unknown]): this;
|
|
849
|
+
assertInertiaFlashMissing(key: string): this;
|
|
705
850
|
/** The response JSON equals `data` exactly (object key order is ignored). */
|
|
706
851
|
assertExactJson(data: unknown): this;
|
|
707
852
|
/** The value at `path` equals `expected` (strictly), or passes the predicate. */
|
|
@@ -1405,4 +1550,4 @@ declare const FakeFile: {
|
|
|
1405
1550
|
image(name: string, width?: number, height?: number): File;
|
|
1406
1551
|
};
|
|
1407
1552
|
|
|
1408
|
-
export { AnonymousNotifiable, type BatchRecord, type BootOptions, BusFake, type CountOrFilter, DatabaseMigrations, type DatabaseTestOptions, DatabaseTransactions, type DispatchedEvent, EventFake, type ExpectedErrors, FakeDisk, FakeFile, HttpClient, InteractsWithApplication, InteractsWithConsole, InteractsWithDatabase, type JsonStructure, MailFake, MailRecord, MakesHttpRequests, NotificationFake, PendingCommand, type PushedJob, QueueFake, RefreshDatabase, RefreshDatabaseState, type RequestData, type RequestOptions, type ResponseContext, type ResponseCookie, type SentNotification, StorageFake, TESTING_ENVIRONMENT, type TableOrModel, type Target, TestCase, type TestHooks, TestResponse, type TestTrait, actingAsAuthFactory, addresses, applyEnvironment, cookieHeader, cookiePrefix, decryptCookie, encryptCookie, flatten, guessMimeType, install, isExpired, matches, nameOf, recordingExceptionHandler, recordingViewFactory, responseCookies, runCommand, usingInMemoryDatabase };
|
|
1553
|
+
export { AnonymousNotifiable, AssertableInertia, AssertableJson, type BatchRecord, type BootOptions, BusFake, type CountOrFilter, DatabaseMigrations, type DatabaseTestOptions, DatabaseTransactions, type DispatchedEvent, EventFake, type ExpectedErrors, FakeDisk, FakeFile, HttpClient, InteractsWithApplication, InteractsWithConsole, InteractsWithDatabase, type JsonStructure, MailFake, MailRecord, MakesHttpRequests, NotificationFake, PendingCommand, type PushedJob, QueueFake, RefreshDatabase, RefreshDatabaseState, type RequestData, type RequestOptions, type ResponseContext, type ResponseCookie, type SentNotification, StorageFake, TESTING_ENVIRONMENT, type TableOrModel, type Target, TestCase, type TestHooks, TestResponse, type TestTrait, actingAsAuthFactory, addresses, applyEnvironment, cookieHeader, cookiePrefix, decryptCookie, encryptCookie, flatten, guessMimeType, inertiaPageOf, install, isExpired, matches, nameOf, recordingExceptionHandler, recordingViewFactory, responseCookies, runCommand, usingInMemoryDatabase };
|
package/dist/testing.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnonymousNotifiable,
|
|
3
|
+
AssertableInertia,
|
|
4
|
+
AssertableJson,
|
|
3
5
|
BusFake,
|
|
4
6
|
DatabaseMigrations,
|
|
5
7
|
DatabaseTransactions,
|
|
@@ -31,6 +33,7 @@ import {
|
|
|
31
33
|
encryptCookie,
|
|
32
34
|
flatten,
|
|
33
35
|
guessMimeType,
|
|
36
|
+
inertiaPageOf,
|
|
34
37
|
install,
|
|
35
38
|
isExpired,
|
|
36
39
|
matches,
|
|
@@ -40,11 +43,13 @@ import {
|
|
|
40
43
|
responseCookies,
|
|
41
44
|
runCommand,
|
|
42
45
|
usingInMemoryDatabase
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-UPZAML2Q.js";
|
|
47
|
+
import "./chunk-IRHK7GH7.js";
|
|
48
|
+
import "./chunk-3ZRPBRAE.js";
|
|
46
49
|
export {
|
|
47
50
|
AnonymousNotifiable,
|
|
51
|
+
AssertableInertia,
|
|
52
|
+
AssertableJson,
|
|
48
53
|
BusFake,
|
|
49
54
|
DatabaseMigrations,
|
|
50
55
|
DatabaseTransactions,
|
|
@@ -76,6 +81,7 @@ export {
|
|
|
76
81
|
encryptCookie,
|
|
77
82
|
flatten,
|
|
78
83
|
guessMimeType,
|
|
84
|
+
inertiaPageOf,
|
|
79
85
|
install,
|
|
80
86
|
isExpired,
|
|
81
87
|
matches,
|
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.2",
|
|
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",
|
|
@@ -55,33 +55,34 @@
|
|
|
55
55
|
"pluralize": "8.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@orieljs/auth": "0.1.0-alpha.
|
|
59
|
-
"@orieljs/bus": "0.1.0-alpha.
|
|
60
|
-
"@orieljs/cache": "0.1.0-alpha.
|
|
61
|
-
"@orieljs/collections": "0.1.0-alpha.
|
|
62
|
-
"@orieljs/config": "0.1.0-alpha.
|
|
63
|
-
"@orieljs/console": "0.1.0-alpha.
|
|
64
|
-
"@orieljs/
|
|
65
|
-
"@orieljs/
|
|
66
|
-
"@orieljs/
|
|
67
|
-
"@orieljs/
|
|
68
|
-
"@orieljs/encryption": "0.1.0-alpha.
|
|
69
|
-
"@orieljs/events": "0.1.0-alpha.
|
|
70
|
-
"@orieljs/filesystem": "0.1.0-alpha.
|
|
71
|
-
"@orieljs/foundation": "0.1.0-alpha.
|
|
72
|
-
"@orieljs/hashing": "0.1.0-alpha.
|
|
73
|
-
"@orieljs/http": "0.1.0-alpha.
|
|
74
|
-
"@orieljs/log": "0.1.0-alpha.
|
|
75
|
-
"@orieljs/mail": "0.1.0-alpha.
|
|
76
|
-
"@orieljs/
|
|
77
|
-
"@orieljs/
|
|
78
|
-
"@orieljs/
|
|
79
|
-
"@orieljs/
|
|
80
|
-
"@orieljs/
|
|
81
|
-
"@orieljs/support": "0.1.0-alpha.
|
|
82
|
-
"@orieljs/testing": "0.1.0-alpha.
|
|
83
|
-
"@orieljs/
|
|
84
|
-
"@orieljs/
|
|
58
|
+
"@orieljs/auth": "0.1.0-alpha.2",
|
|
59
|
+
"@orieljs/bus": "0.1.0-alpha.2",
|
|
60
|
+
"@orieljs/cache": "0.1.0-alpha.2",
|
|
61
|
+
"@orieljs/collections": "0.1.0-alpha.2",
|
|
62
|
+
"@orieljs/config": "0.1.0-alpha.2",
|
|
63
|
+
"@orieljs/console": "0.1.0-alpha.2",
|
|
64
|
+
"@orieljs/contracts": "0.1.0-alpha.2",
|
|
65
|
+
"@orieljs/container": "0.1.0-alpha.2",
|
|
66
|
+
"@orieljs/database": "0.1.0-alpha.2",
|
|
67
|
+
"@orieljs/cookie": "0.1.0-alpha.2",
|
|
68
|
+
"@orieljs/encryption": "0.1.0-alpha.2",
|
|
69
|
+
"@orieljs/events": "0.1.0-alpha.2",
|
|
70
|
+
"@orieljs/filesystem": "0.1.0-alpha.2",
|
|
71
|
+
"@orieljs/foundation": "0.1.0-alpha.2",
|
|
72
|
+
"@orieljs/hashing": "0.1.0-alpha.2",
|
|
73
|
+
"@orieljs/http": "0.1.0-alpha.2",
|
|
74
|
+
"@orieljs/log": "0.1.0-alpha.2",
|
|
75
|
+
"@orieljs/mail": "0.1.0-alpha.2",
|
|
76
|
+
"@orieljs/inertia": "0.1.0-alpha.2",
|
|
77
|
+
"@orieljs/notifications": "0.1.0-alpha.2",
|
|
78
|
+
"@orieljs/pipeline": "0.1.0-alpha.2",
|
|
79
|
+
"@orieljs/queue": "0.1.0-alpha.2",
|
|
80
|
+
"@orieljs/routing": "0.1.0-alpha.2",
|
|
81
|
+
"@orieljs/support": "0.1.0-alpha.2",
|
|
82
|
+
"@orieljs/testing": "0.1.0-alpha.2",
|
|
83
|
+
"@orieljs/session": "0.1.0-alpha.2",
|
|
84
|
+
"@orieljs/validation": "0.1.0-alpha.2",
|
|
85
|
+
"@orieljs/view": "0.1.0-alpha.2"
|
|
85
86
|
},
|
|
86
87
|
"peerDependencies": {
|
|
87
88
|
"pg": "^8.23.0",
|