@orieljs/framework 0.1.0-alpha.2 → 0.1.0-alpha.3
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-HU43NADT.js +745 -0
- package/dist/chunk-HU43NADT.js.map +1 -0
- package/dist/chunk-I2OMKIQZ.js +4693 -0
- package/dist/chunk-I2OMKIQZ.js.map +1 -0
- package/dist/chunk-S7YC43IH.js +93 -0
- package/dist/chunk-S7YC43IH.js.map +1 -0
- package/dist/chunk-WEGTH46M.js +478 -0
- package/dist/chunk-WEGTH46M.js.map +1 -0
- package/dist/contracts.d.ts +31 -13
- package/dist/contracts.js +1 -1
- package/dist/index.d-DOlTeG-8.d.ts +99 -0
- package/dist/index.d.ts +53 -44
- package/dist/index.js +43 -4
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime-WKTl3EEw.d.ts +254 -0
- package/dist/jsx-runtime.d.ts +2 -1
- package/dist/jsx-runtime.js +3 -3
- package/dist/testing--F6FODc_.d.ts +2068 -0
- package/dist/testing.d.ts +3 -1553
- package/dist/testing.js +7 -3
- package/package.json +31 -29
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Token as Token$1 } from './contracts.js';
|
|
2
|
+
|
|
3
|
+
/** A typed, runtime-unique key for container bindings. */
|
|
4
|
+
interface Token<T> {
|
|
5
|
+
readonly id: symbol;
|
|
6
|
+
readonly description: string;
|
|
7
|
+
/** Phantom field: only carries T at the type level. Never set at runtime. */
|
|
8
|
+
readonly __type?: T;
|
|
9
|
+
}
|
|
10
|
+
type Class<T> = abstract new (...args: any[]) => T;
|
|
11
|
+
type Abstract<T> = Token<T> | Class<T>;
|
|
12
|
+
type Factory<T> = (container: Container) => T;
|
|
13
|
+
type Concrete<T> = Factory<T> | (new () => T);
|
|
14
|
+
interface Container {
|
|
15
|
+
/** New instance on every make(). A class with no concrete binds to itself (constructed with no args). Root only; throws on a scope. */
|
|
16
|
+
bind<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
|
|
17
|
+
/** One instance for the life of this container and its scopes. Root only; throws on a scope. */
|
|
18
|
+
singleton<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
|
|
19
|
+
/** One instance per scope (e.g. per HTTP request or queue job). Root only; throws on a scope. */
|
|
20
|
+
scoped<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
|
|
21
|
+
/** Register an existing object as a shared instance. Returns it. On a scope it stays local to that scope. */
|
|
22
|
+
instance<T>(abstract: Abstract<T>, instance: T): T;
|
|
23
|
+
/** Resolve. Unbound classes are constructed with `new Class()`. Unbound tokens throw BindingResolutionError. */
|
|
24
|
+
make<T>(abstract: Abstract<T>): T;
|
|
25
|
+
bound(abstract: Abstract<unknown>): boolean;
|
|
26
|
+
resolved(abstract: Abstract<unknown>): boolean;
|
|
27
|
+
/** Decorate or replace an instance each time it's resolved (applied before resolving callbacks). Root only; throws on a scope. */
|
|
28
|
+
extend<T>(abstract: Abstract<T>, extender: (instance: T, container: Container) => T): void;
|
|
29
|
+
/** Called after each resolution of the abstract. Root only; throws on a scope. */
|
|
30
|
+
resolving<T>(abstract: Abstract<T>, callback: (instance: T, container: Container) => void): void;
|
|
31
|
+
forgetInstance(abstract: Abstract<unknown>): void;
|
|
32
|
+
/** A child container: shares bindings and singletons with its parent, and has its own scoped instances. Bindings can't be registered on it. */
|
|
33
|
+
createScope(): Container;
|
|
34
|
+
/** Run fn with this container as the "current" one for inject(), helpers and facades (AsyncLocalStorage). */
|
|
35
|
+
run<R>(fn: () => R): R;
|
|
36
|
+
}
|
|
37
|
+
declare const Container: Token<Container>;
|
|
38
|
+
|
|
39
|
+
interface ServiceProvider {
|
|
40
|
+
/** Bind things into the container. Synchronous. Don't resolve other services here. */
|
|
41
|
+
register?(): void;
|
|
42
|
+
/** Runs after every provider is registered. May be async (e.g. importing route files). */
|
|
43
|
+
boot?(): void | Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
type ServiceProviderClass = new (app: Application) => ServiceProvider;
|
|
46
|
+
interface Application extends Container {
|
|
47
|
+
readonly version: string;
|
|
48
|
+
basePath(path?: string): string;
|
|
49
|
+
appPath(path?: string): string;
|
|
50
|
+
bootstrapPath(path?: string): string;
|
|
51
|
+
configPath(path?: string): string;
|
|
52
|
+
databasePath(path?: string): string;
|
|
53
|
+
publicPath(path?: string): string;
|
|
54
|
+
resourcePath(path?: string): string;
|
|
55
|
+
storagePath(path?: string): string;
|
|
56
|
+
/** With no args returns the environment name. With args returns whether it matches any of them. */
|
|
57
|
+
environment(): string;
|
|
58
|
+
environment(...environments: string[]): boolean;
|
|
59
|
+
isProduction(): boolean;
|
|
60
|
+
isLocal(): boolean;
|
|
61
|
+
runningInConsole(): boolean;
|
|
62
|
+
/** Mark the app as running in the console (the CLI entry point calls this). Defaults to true. */
|
|
63
|
+
setRunningInConsole(value?: boolean): void;
|
|
64
|
+
runningUnitTests(): boolean;
|
|
65
|
+
/** Registers the provider. If the app is already booted, the provider is booted immediately. */
|
|
66
|
+
register(provider: ServiceProvider | ServiceProviderClass): Promise<ServiceProvider>;
|
|
67
|
+
getProviders(): ServiceProvider[];
|
|
68
|
+
boot(): Promise<void>;
|
|
69
|
+
isBooted(): boolean;
|
|
70
|
+
booting(callback: (app: Application) => void | Promise<void>): void;
|
|
71
|
+
booted(callback: (app: Application) => void | Promise<void>): void;
|
|
72
|
+
/** Handle one HTTP request in a fresh request scope via the bound HttpKernel. */
|
|
73
|
+
handle(request: Request): Promise<Response>;
|
|
74
|
+
/** Register a callback that terminate() runs, in registration order. */
|
|
75
|
+
terminating(callback: () => void | Promise<void>): void;
|
|
76
|
+
terminate(): Promise<void>;
|
|
77
|
+
}
|
|
78
|
+
declare const Application: Token$1<Application>;
|
|
79
|
+
|
|
80
|
+
interface ConfigRepository {
|
|
81
|
+
has(key: string): boolean;
|
|
82
|
+
/** Dot notation: get('database.connections.sqlite.database'). */
|
|
83
|
+
get<T = unknown>(key: string, defaultValue?: T): T;
|
|
84
|
+
set(key: string, value: unknown): void;
|
|
85
|
+
set(values: Record<string, unknown>): void;
|
|
86
|
+
push(key: string, value: unknown): void;
|
|
87
|
+
all(): Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
declare const ConfigRepository: Token$1<ConfigRepository>;
|
|
90
|
+
interface ClassRegistry {
|
|
91
|
+
/** Registers under `name` (default: cls.name). Throws if the name is already taken by a different class. */
|
|
92
|
+
register(cls: Class<unknown>, name?: string): string;
|
|
93
|
+
nameOf(cls: Class<unknown>): string | undefined;
|
|
94
|
+
resolve<T = unknown>(name: string): Class<T>;
|
|
95
|
+
has(name: string): boolean;
|
|
96
|
+
}
|
|
97
|
+
declare const ClassRegistry: Token$1<ClassRegistry>;
|
|
98
|
+
|
|
99
|
+
export { Application as A, ClassRegistry as C, type ServiceProvider as S, type Class as a, type Abstract as b, ConfigRepository as c };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { C as ClassRegistry$3, a as Class$j, S as ServiceProvider$u, A as Application$c, b as Abstract$j, c as ConfigRepository$3 } from './
|
|
2
|
-
|
|
3
|
-
import { Token as Token$j, BusDispatcher as BusDispatcher$1, EventDispatcher as EventDispatcher$1, MailManager as MailManager$2, QueueManager as QueueManager$2, FilesystemManager as FilesystemManager$2, ServiceProviderClass as ServiceProviderClass$a } from './contracts.js';
|
|
1
|
+
import { C as ClassRegistry$3, a as Class$j, S as ServiceProvider$u, A as Application$c, b as Abstract$j, c as ConfigRepository$3 } from './index.d-DOlTeG-8.js';
|
|
2
|
+
import { Token as Token$j, ServiceProviderClass as ServiceProviderClass$a } from './contracts.js';
|
|
4
3
|
export { RouteList, RouteName } from './contracts.js';
|
|
5
|
-
import { Target, BusFake, EventFake, MailFake, NotificationFake, QueueFake, FakeDisk } from './testing.js';
|
|
4
|
+
import { T as Target, B as BusFake, E as EventFake, M as MailFake, N as NotificationFake, Q as QueueFake, F as FakeDisk } from './testing--F6FODc_.js';
|
|
5
|
+
export { C as Component, a as ComponentResult, b as Computed, c as CorruptComponentPayloadError, d as ErrorBag, I as InvalidLiveRequestError, L as Live, e as LiveComponentManager, f as LiveComponentNotFoundError, g as LiveError, h as LiveProps, i as LiveServiceProvider, j as Locked, k as MethodNotCallableError, O as On, P as PendingEvent, l as PropertyNotUpdatableError, m as Testable, U as UPDATE_URI, n as componentName, o as live } from './testing--F6FODc_.js';
|
|
6
6
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
7
7
|
import { Kysely, RawBuilder, CompiledQuery, QueryResult, SqliteDatabase, SqliteStatement, Dialect } from 'kysely';
|
|
8
8
|
import Redis$1, { Redis } from 'ioredis';
|
|
9
9
|
import pino from 'pino';
|
|
10
10
|
import { WriteStream } from 'node:fs';
|
|
11
11
|
import { Writable } from 'node:stream';
|
|
12
|
+
export { C as ClassValue, E as ELEMENT, F as FileViewFinder, a as Fragment, H as HtmlAttributes, b as HtmlString, I as InvalidViewError, O as OrielElement, P as Props, R as Renderable, S as StyleObject, T as TsxView, V as View, c as ViewComponent, d as ViewEnvironment, e as ViewFactoryImpl, f as ViewNotFoundError, g as ViewRenderError, h as ViewServiceProvider, i as classNames, j as createElement, k as csrfField, l as e, m as isElement, n as isHtmlable, o as methodField, r as raw, p as renderToStream, q as renderToString, s as styleString, v as view } from './jsx-runtime-WKTl3EEw.js';
|
|
12
13
|
|
|
13
14
|
/** A typed, runtime-unique key for container bindings. */
|
|
14
15
|
interface Token$i<T> {
|
|
@@ -666,7 +667,7 @@ declare class ApplicationBuilder {
|
|
|
666
667
|
type LifecycleCallback = (app: Application$b) => void | Promise<void>;
|
|
667
668
|
declare class Application$a extends Container$h implements Application$b {
|
|
668
669
|
private readonly base;
|
|
669
|
-
readonly version = "0.1.0-alpha.
|
|
670
|
+
readonly version = "0.1.0-alpha.3";
|
|
670
671
|
private readonly providers;
|
|
671
672
|
private readonly bootingCallbacks;
|
|
672
673
|
private readonly bootedCallbacks;
|
|
@@ -1178,19 +1179,19 @@ declare class NotificationsServiceProvider extends ServiceProvider$r {
|
|
|
1178
1179
|
boot(): void;
|
|
1179
1180
|
}
|
|
1180
1181
|
|
|
1181
|
-
declare const Mail: Facade$c<
|
|
1182
|
+
declare const Mail: Facade$c<object, {
|
|
1182
1183
|
fake: () => MailFake;
|
|
1183
1184
|
}>;
|
|
1184
|
-
declare const Queue$1: Facade$c<
|
|
1185
|
+
declare const Queue$1: Facade$c<object, {
|
|
1185
1186
|
fake: (jobsToFake?: Target<unknown> | Target<unknown>[] | undefined) => QueueFake;
|
|
1186
1187
|
}>;
|
|
1187
|
-
declare const Bus: Facade$c<
|
|
1188
|
+
declare const Bus: Facade$c<object, {
|
|
1188
1189
|
fake: (jobsToFake?: Target<unknown> | Target<unknown>[] | undefined) => BusFake;
|
|
1189
1190
|
}>;
|
|
1190
|
-
declare const Event: Facade$c<
|
|
1191
|
+
declare const Event: Facade$c<object, {
|
|
1191
1192
|
fake: (eventsToFake?: Target<unknown> | Target<unknown>[] | undefined) => EventFake;
|
|
1192
1193
|
}>;
|
|
1193
|
-
declare const Storage: Facade$c<
|
|
1194
|
+
declare const Storage: Facade$c<object, {
|
|
1194
1195
|
fake: (disk?: string | undefined) => FakeDisk;
|
|
1195
1196
|
}>;
|
|
1196
1197
|
/** The notification base class with Laravel's Notification::fake(). */
|
|
@@ -1526,7 +1527,11 @@ type ActionMethods$1<C> = {
|
|
|
1526
1527
|
}[keyof C] & string;
|
|
1527
1528
|
type ControllerAction$1<C> = readonly [Class$e<C>, ActionMethods$1<C>];
|
|
1528
1529
|
type RouteClosure$1 = (...args: any[]) => unknown;
|
|
1529
|
-
|
|
1530
|
+
/** A class with __invoke(): Route.get('/counter', Counter) (single-action controllers, full-page Live components). */
|
|
1531
|
+
type InvokableClass$1 = Class$e<{
|
|
1532
|
+
__invoke(...args: any[]): unknown;
|
|
1533
|
+
}>;
|
|
1534
|
+
type RouteAction$1 = RouteClosure$1 | ControllerAction$1<any> | InvokableClass$1;
|
|
1530
1535
|
type MiddlewareReference$1 = string | MiddlewareClass$1;
|
|
1531
1536
|
interface Route$2 {
|
|
1532
1537
|
readonly methods: readonly string[];
|
|
@@ -1552,14 +1557,14 @@ interface ResourceOptions$1 {
|
|
|
1552
1557
|
names?: Record<string, string>;
|
|
1553
1558
|
}
|
|
1554
1559
|
interface Router$1 {
|
|
1555
|
-
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1556
|
-
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1557
|
-
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1558
|
-
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1559
|
-
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1560
|
-
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1561
|
-
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1562
|
-
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): Route$2;
|
|
1560
|
+
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1561
|
+
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1562
|
+
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1563
|
+
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1564
|
+
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1565
|
+
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1566
|
+
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1567
|
+
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): Route$2;
|
|
1563
1568
|
redirect(from: string, to: string, status?: number): Route$2;
|
|
1564
1569
|
view(uri: string, view: string, data?: Record<string, unknown>): Route$2;
|
|
1565
1570
|
/** Route.inertia('/about', 'About', props): a GET route that renders an Inertia page (Laravel's Route::inertia). */
|
|
@@ -1708,14 +1713,14 @@ declare class GroupRegistrar implements RouteRegistrar$1 {
|
|
|
1708
1713
|
middleware(...middleware: MiddlewareReference$1[]): this;
|
|
1709
1714
|
controller(controller: Class$e<unknown>): this;
|
|
1710
1715
|
group(routes: () => void | Promise<void>): Promise<void>;
|
|
1711
|
-
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1712
|
-
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1713
|
-
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1714
|
-
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1715
|
-
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1716
|
-
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1717
|
-
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1718
|
-
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1716
|
+
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1717
|
+
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1718
|
+
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1719
|
+
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1720
|
+
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1721
|
+
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1722
|
+
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1723
|
+
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1719
1724
|
resource(name: string, controller: Class$e<unknown>, options?: ResourceOptions$1): void;
|
|
1720
1725
|
apiResource(name: string, controller: Class$e<unknown>, options?: ResourceOptions$1): void;
|
|
1721
1726
|
}
|
|
@@ -1727,14 +1732,14 @@ declare class BaseRouter implements Router$1 {
|
|
|
1727
1732
|
protected readonly container?: Container$e | undefined;
|
|
1728
1733
|
/** `container` is the application; request-time lookups use the current (request) container first. */
|
|
1729
1734
|
constructor(container?: Container$e | undefined);
|
|
1730
|
-
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1731
|
-
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1732
|
-
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1733
|
-
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1734
|
-
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1735
|
-
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1736
|
-
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1737
|
-
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | string): RouteDefinition;
|
|
1735
|
+
get<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1736
|
+
post<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1737
|
+
put<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1738
|
+
patch<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1739
|
+
delete<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1740
|
+
options<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1741
|
+
any<C>(uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1742
|
+
match<C>(methods: string[], uri: string, action: ControllerAction$1<C> | RouteClosure$1 | InvokableClass$1 | string): RouteDefinition;
|
|
1738
1743
|
/** Registers a route with the current group's prefix, name prefix, middleware and controller. GET implies HEAD. */
|
|
1739
1744
|
addRoute(methods: readonly string[], uri: string, action: RouteHandler, options?: {
|
|
1740
1745
|
fallback?: boolean;
|
|
@@ -2225,7 +2230,11 @@ type ActionMethods<C> = {
|
|
|
2225
2230
|
}[keyof C] & string;
|
|
2226
2231
|
type ControllerAction<C> = readonly [Class$d<C>, ActionMethods<C>];
|
|
2227
2232
|
type RouteClosure = (...args: any[]) => unknown;
|
|
2228
|
-
|
|
2233
|
+
/** A class with __invoke(): Route.get('/counter', Counter) (single-action controllers, full-page Live components). */
|
|
2234
|
+
type InvokableClass = Class$d<{
|
|
2235
|
+
__invoke(...args: any[]): unknown;
|
|
2236
|
+
}>;
|
|
2237
|
+
type RouteAction = RouteClosure | ControllerAction<any> | InvokableClass;
|
|
2229
2238
|
type MiddlewareReference = string | MiddlewareClass;
|
|
2230
2239
|
interface Route {
|
|
2231
2240
|
readonly methods: readonly string[];
|
|
@@ -2251,14 +2260,14 @@ interface ResourceOptions {
|
|
|
2251
2260
|
names?: Record<string, string>;
|
|
2252
2261
|
}
|
|
2253
2262
|
interface Router {
|
|
2254
|
-
get<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2255
|
-
post<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2256
|
-
put<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2257
|
-
patch<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2258
|
-
delete<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2259
|
-
options<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2260
|
-
any<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2261
|
-
match<C>(methods: string[], uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
|
|
2263
|
+
get<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2264
|
+
post<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2265
|
+
put<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2266
|
+
patch<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2267
|
+
delete<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2268
|
+
options<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2269
|
+
any<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2270
|
+
match<C>(methods: string[], uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
|
|
2262
2271
|
redirect(from: string, to: string, status?: number): Route;
|
|
2263
2272
|
view(uri: string, view: string, data?: Record<string, unknown>): Route;
|
|
2264
2273
|
/** Route.inertia('/about', 'About', props): a GET route that renders an Inertia page (Laravel's Route::inertia). */
|
package/dist/index.js
CHANGED
|
@@ -22,28 +22,47 @@ import {
|
|
|
22
22
|
renderToString,
|
|
23
23
|
styleString,
|
|
24
24
|
view
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WEGTH46M.js";
|
|
26
26
|
import {
|
|
27
27
|
Application as Application2,
|
|
28
28
|
ApplicationBuilder,
|
|
29
29
|
BusFake,
|
|
30
30
|
ClosureKernel,
|
|
31
|
+
Component,
|
|
32
|
+
Computed,
|
|
33
|
+
CorruptComponentPayloadError,
|
|
34
|
+
ErrorBag,
|
|
31
35
|
EventFake,
|
|
36
|
+
InvalidLiveRequestError,
|
|
37
|
+
Live,
|
|
38
|
+
LiveComponentManager,
|
|
39
|
+
LiveComponentNotFoundError,
|
|
40
|
+
LiveError,
|
|
41
|
+
LiveServiceProvider,
|
|
42
|
+
Locked,
|
|
32
43
|
MailFake,
|
|
44
|
+
MethodNotCallableError,
|
|
33
45
|
NotificationFake,
|
|
46
|
+
On,
|
|
47
|
+
PendingEvent,
|
|
48
|
+
PropertyNotUpdatableError,
|
|
34
49
|
ProviderBootError,
|
|
35
50
|
ProviderRegisterError,
|
|
36
51
|
QueueFake,
|
|
37
52
|
Repository,
|
|
38
53
|
StorageFake,
|
|
54
|
+
Testable,
|
|
55
|
+
UPDATE_URI,
|
|
39
56
|
Vite,
|
|
40
57
|
ViteError,
|
|
41
58
|
ViteHtml,
|
|
59
|
+
componentName,
|
|
42
60
|
currentVite,
|
|
43
61
|
env,
|
|
62
|
+
live,
|
|
44
63
|
vite,
|
|
45
64
|
viteReactRefresh
|
|
46
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-I2OMKIQZ.js";
|
|
47
66
|
import {
|
|
48
67
|
Arr,
|
|
49
68
|
BindingResolutionError,
|
|
@@ -65,7 +84,7 @@ import {
|
|
|
65
84
|
retry,
|
|
66
85
|
tap,
|
|
67
86
|
value
|
|
68
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-HU43NADT.js";
|
|
69
88
|
import {
|
|
70
89
|
Application,
|
|
71
90
|
AuthFactory,
|
|
@@ -109,7 +128,7 @@ import {
|
|
|
109
128
|
ValidationFactory,
|
|
110
129
|
ViewFactory,
|
|
111
130
|
token
|
|
112
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-S7YC43IH.js";
|
|
113
132
|
|
|
114
133
|
// ../Auth/dist/index.js
|
|
115
134
|
import { timingSafeEqual } from "crypto";
|
|
@@ -21495,6 +21514,7 @@ function defaultProviders() {
|
|
|
21495
21514
|
AuthServiceProvider,
|
|
21496
21515
|
ViewServiceProvider,
|
|
21497
21516
|
InertiaServiceProvider,
|
|
21517
|
+
LiveServiceProvider,
|
|
21498
21518
|
RoutingServiceProvider,
|
|
21499
21519
|
HttpServiceProvider,
|
|
21500
21520
|
ConsoleServiceProvider
|
|
@@ -21585,7 +21605,9 @@ export {
|
|
|
21585
21605
|
ColumnDefinition,
|
|
21586
21606
|
Command,
|
|
21587
21607
|
CommandNotFoundError,
|
|
21608
|
+
Component,
|
|
21588
21609
|
ComponentNotFoundError,
|
|
21610
|
+
Computed,
|
|
21589
21611
|
Connection,
|
|
21590
21612
|
Kernel as ConsoleKernelImpl,
|
|
21591
21613
|
ConsoleServiceProvider,
|
|
@@ -21598,6 +21620,7 @@ export {
|
|
|
21598
21620
|
CookieServiceProvider,
|
|
21599
21621
|
CookieSessionHandler,
|
|
21600
21622
|
CookieValuePrefix,
|
|
21623
|
+
CorruptComponentPayloadError,
|
|
21601
21624
|
Crypt,
|
|
21602
21625
|
Cursor,
|
|
21603
21626
|
CursorPaginator,
|
|
@@ -21629,6 +21652,7 @@ export {
|
|
|
21629
21652
|
Encrypter2 as Encrypter,
|
|
21630
21653
|
EncryptionServiceProvider,
|
|
21631
21654
|
EnsureEmailIsVerified,
|
|
21655
|
+
ErrorBag,
|
|
21632
21656
|
ErrorHandler,
|
|
21633
21657
|
Event2 as Event,
|
|
21634
21658
|
Dispatcher2 as EventDispatcherImpl,
|
|
@@ -21690,6 +21714,7 @@ export {
|
|
|
21690
21714
|
InvalidCacheConfigError,
|
|
21691
21715
|
InvalidCastError,
|
|
21692
21716
|
InvalidListenerError,
|
|
21717
|
+
InvalidLiveRequestError,
|
|
21693
21718
|
InvalidLogLevelError,
|
|
21694
21719
|
InvalidRuleParameterError,
|
|
21695
21720
|
InvalidSignatureError,
|
|
@@ -21703,8 +21728,14 @@ export {
|
|
|
21703
21728
|
LazyCollection,
|
|
21704
21729
|
LengthAwarePaginator,
|
|
21705
21730
|
ListCommand,
|
|
21731
|
+
Live,
|
|
21732
|
+
LiveComponentManager,
|
|
21733
|
+
LiveComponentNotFoundError,
|
|
21734
|
+
LiveError,
|
|
21735
|
+
LiveServiceProvider,
|
|
21706
21736
|
LocalFilesystem,
|
|
21707
21737
|
LockTimeoutError,
|
|
21738
|
+
Locked,
|
|
21708
21739
|
Log,
|
|
21709
21740
|
LogChannelCycleError,
|
|
21710
21741
|
LogManager2 as LogManager,
|
|
@@ -21752,6 +21783,7 @@ export {
|
|
|
21752
21783
|
MergeProp,
|
|
21753
21784
|
MessageBagImpl,
|
|
21754
21785
|
MethodNotAllowedHttpError,
|
|
21786
|
+
MethodNotCallableError,
|
|
21755
21787
|
MiddlewareConfiguration,
|
|
21756
21788
|
MiddlewareNotFoundError,
|
|
21757
21789
|
Migration,
|
|
@@ -21785,6 +21817,7 @@ export {
|
|
|
21785
21817
|
NullLogger,
|
|
21786
21818
|
NullQueue,
|
|
21787
21819
|
OPERATORS,
|
|
21820
|
+
On,
|
|
21788
21821
|
OnceProp,
|
|
21789
21822
|
OptionalProp,
|
|
21790
21823
|
PERSONAL_ACCESS_TOKENS_MIGRATION,
|
|
@@ -21797,12 +21830,14 @@ export {
|
|
|
21797
21830
|
PendingBatch,
|
|
21798
21831
|
PendingChain,
|
|
21799
21832
|
PendingDispatch,
|
|
21833
|
+
PendingEvent,
|
|
21800
21834
|
PersonalAccessToken,
|
|
21801
21835
|
PinoLogger,
|
|
21802
21836
|
PipelineError,
|
|
21803
21837
|
PipelineServiceProvider,
|
|
21804
21838
|
Pivot,
|
|
21805
21839
|
PostgresSchemaGrammar,
|
|
21840
|
+
PropertyNotUpdatableError,
|
|
21806
21841
|
PropsResolver,
|
|
21807
21842
|
ProviderBootError,
|
|
21808
21843
|
ProviderRegisterError,
|
|
@@ -21878,6 +21913,7 @@ export {
|
|
|
21878
21913
|
SyncQueue,
|
|
21879
21914
|
TagsNotSupportedError,
|
|
21880
21915
|
TestCommand,
|
|
21916
|
+
Testable,
|
|
21881
21917
|
TimeoutExceededError,
|
|
21882
21918
|
TinkerCommand,
|
|
21883
21919
|
TokenGuard,
|
|
@@ -21887,6 +21923,7 @@ export {
|
|
|
21887
21923
|
TsxView,
|
|
21888
21924
|
TypeGenerator,
|
|
21889
21925
|
UNIQUE_LOCK,
|
|
21926
|
+
UPDATE_URI,
|
|
21890
21927
|
USERS_TABLE_MIGRATION,
|
|
21891
21928
|
UniqueJobsNeedCacheError,
|
|
21892
21929
|
UniqueLock,
|
|
@@ -21949,6 +21986,7 @@ export {
|
|
|
21949
21986
|
collect,
|
|
21950
21987
|
columnKey,
|
|
21951
21988
|
compareRoutes,
|
|
21989
|
+
componentName,
|
|
21952
21990
|
config,
|
|
21953
21991
|
contentDisposition,
|
|
21954
21992
|
cookie,
|
|
@@ -22035,6 +22073,7 @@ export {
|
|
|
22035
22073
|
isUploadedFileLike,
|
|
22036
22074
|
joinDiskPath,
|
|
22037
22075
|
keyGenerateHandler,
|
|
22076
|
+
live,
|
|
22038
22077
|
loadRelations,
|
|
22039
22078
|
loadRoutesFrom,
|
|
22040
22079
|
logger,
|