@orieljs/framework 0.1.0-alpha.5 → 0.1.0-alpha.7
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/NOTICE +7 -0
- package/README.md +10 -1
- package/TRADEMARKS.md +33 -0
- package/dist/{chunk-WNJP46B7.js → chunk-4MWG3B7G.js} +1785 -626
- package/dist/chunk-4MWG3B7G.js.map +1 -0
- package/dist/chunk-7ZQZYDOC.js +3253 -0
- package/dist/chunk-7ZQZYDOC.js.map +1 -0
- package/dist/{chunk-BSQKOLSK.js → chunk-GVNLZZTN.js} +1 -1
- package/dist/chunk-GVNLZZTN.js.map +1 -0
- package/dist/{chunk-A5XRLEWM.js → chunk-VOYW3R5J.js} +4 -4
- package/dist/chunk-VOYW3R5J.js.map +1 -0
- package/dist/contracts.d.ts +535 -17
- package/dist/contracts.js +1 -1
- package/dist/index.d-WQpfdIbG.d.ts +630 -0
- package/dist/index.d.ts +2202 -5952
- package/dist/index.js +4900 -944
- package/dist/index.js.map +1 -1
- package/dist/{jsx-runtime-WKTl3EEw.d.ts → jsx-runtime-6um4Mwfb.d.ts} +97 -51
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx-runtime.js +3 -3
- package/dist/{testing-BErengYY.d.ts → testing-CKwfWJGn.d.ts} +313 -994
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +19 -5
- package/docs/authentication.md +487 -0
- package/docs/authorization.md +435 -0
- package/docs/cache.md +647 -0
- package/docs/collections.md +2270 -0
- package/docs/configuration.md +334 -0
- package/docs/console.md +651 -0
- package/docs/container.md +430 -0
- package/docs/controllers.md +406 -0
- package/docs/csrf.md +126 -0
- package/docs/database-testing.md +144 -0
- package/docs/database.md +236 -0
- package/docs/deployment.md +276 -0
- package/docs/eloquent-collections.md +218 -0
- package/docs/eloquent-factories.md +255 -0
- package/docs/eloquent-mutators.md +254 -0
- package/docs/eloquent-observers.md +145 -0
- package/docs/eloquent-relationships.md +557 -0
- package/docs/eloquent.md +494 -0
- package/docs/encryption.md +104 -0
- package/docs/errors.md +318 -0
- package/docs/events.md +336 -0
- package/docs/facades.md +278 -0
- package/docs/hashing.md +118 -0
- package/docs/helpers.md +1281 -0
- package/docs/http-tests.md +386 -0
- package/docs/inertia.md +485 -0
- package/docs/installation.md +209 -0
- package/docs/lifecycle.md +234 -0
- package/docs/live-tests.md +226 -0
- package/docs/live.md +910 -0
- package/docs/logging.md +255 -0
- package/docs/mail.md +619 -0
- package/docs/middleware.md +384 -0
- package/docs/migrations.md +416 -0
- package/docs/mocking.md +264 -0
- package/docs/navigation.json +273 -0
- package/docs/notifications.md +225 -0
- package/docs/pagination.md +247 -0
- package/docs/passwords.md +207 -0
- package/docs/providers.md +187 -0
- package/docs/queries.md +600 -0
- package/docs/queues.md +330 -0
- package/docs/requests.md +533 -0
- package/docs/responses.md +444 -0
- package/docs/routing.md +738 -0
- package/docs/scheduling.md +277 -0
- package/docs/seeding.md +122 -0
- package/docs/session.md +409 -0
- package/docs/starter-kits.md +396 -0
- package/docs/storage.md +192 -0
- package/docs/structure.md +264 -0
- package/docs/testing.md +165 -0
- package/docs/time-travel.md +138 -0
- package/docs/validation.md +1792 -0
- package/docs/verification.md +152 -0
- package/docs/views.md +566 -0
- package/docs/vite.md +322 -0
- package/package.json +34 -32
- package/dist/chunk-A5XRLEWM.js.map +0 -1
- package/dist/chunk-BSQKOLSK.js.map +0 -1
- package/dist/chunk-PM5YTG57.js +0 -880
- package/dist/chunk-PM5YTG57.js.map +0 -1
- package/dist/chunk-WNJP46B7.js.map +0 -1
- package/dist/index.d-DOlTeG-8.d.ts +0 -99
|
@@ -1,99 +0,0 @@
|
|
|
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 };
|