@orieljs/framework 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +3 -0
- package/dist/{chunk-WSGWYXAO.js → chunk-I63ZFMX6.js} +3 -1
- package/dist/chunk-I63ZFMX6.js.map +1 -0
- package/dist/{chunk-3DETYZMZ.js → chunk-MFTZQMZM.js} +3 -3
- package/dist/chunk-POEP4B2M.js +2613 -0
- package/dist/chunk-POEP4B2M.js.map +1 -0
- package/dist/{chunk-SBZQ6L3Z.js → chunk-ZOEPKBVF.js} +1009 -279
- package/dist/chunk-ZOEPKBVF.js.map +1 -0
- package/dist/contracts.d.ts +63 -1
- package/dist/contracts.js +3 -1
- package/dist/index.d-BJyJx6U1.d.ts +319 -0
- package/dist/index.d.ts +1310 -5533
- package/dist/index.js +1203 -194
- package/dist/index.js.map +1 -1
- package/dist/{jsx-runtime-WKTl3EEw.d.ts → jsx-runtime-CBZQYYDS.d.ts} +2 -47
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx-runtime.js +3 -3
- package/dist/{testing-D3dCOkTm.d.ts → testing-BM481Hdz.d.ts} +217 -986
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +19 -5
- package/package.json +30 -30
- package/dist/chunk-DCI2T7WJ.js +0 -766
- package/dist/chunk-DCI2T7WJ.js.map +0 -1
- package/dist/chunk-SBZQ6L3Z.js.map +0 -1
- package/dist/chunk-WSGWYXAO.js.map +0 -1
- package/dist/index.d-DOlTeG-8.d.ts +0 -99
- /package/dist/{chunk-3DETYZMZ.js.map → chunk-MFTZQMZM.js.map} +0 -0
|
@@ -1,50 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface Htmlable {
|
|
5
|
-
toHtml(): string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface View$1 extends Htmlable {
|
|
9
|
-
readonly name: string;
|
|
10
|
-
with(key: string | Record<string, unknown>, value?: unknown): this;
|
|
11
|
-
render(): Promise<string>;
|
|
12
|
-
}
|
|
13
|
-
/** Resolves 'posts.index' → resources/views/posts/index.tsx and renders it to HTML on the server. */
|
|
14
|
-
interface ViewFactory {
|
|
15
|
-
make(name: string, data?: Record<string, unknown>): View$1;
|
|
16
|
-
exists(name: string): boolean;
|
|
17
|
-
share(key: string | Record<string, unknown>, value?: unknown): void;
|
|
18
|
-
composer(views: string | string[], composer: (view: View$1) => void | Promise<void>): void;
|
|
19
|
-
/** Renders TSX (an element, a string, an Htmlable, a View, promises of them) to HTML, like Blade::render(). */
|
|
20
|
-
renderToString(node: unknown): Promise<string>;
|
|
21
|
-
}
|
|
22
|
-
declare const ViewFactory: Token<ViewFactory>;
|
|
23
|
-
|
|
24
|
-
type ErrorKind = 'Http' | 'Server' | 'ModelNotFound' | 'Validation' | 'Authentication' | 'Authorization' | 'TokenMismatch' | 'BindingResolution' | 'CircularDependency' | 'ContainerNotAvailable';
|
|
25
|
-
/** Every error thrown by the framework implements this. The exception handler switches on `kind`. */
|
|
26
|
-
interface OrielError extends Error {
|
|
27
|
-
readonly kind: ErrorKind;
|
|
28
|
-
/** HTTP status the error should render as, when relevant. */
|
|
29
|
-
readonly status?: number;
|
|
30
|
-
readonly headers?: Record<string, string>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare abstract class ServiceProvider implements ServiceProvider$1 {
|
|
34
|
-
protected readonly app: Application;
|
|
35
|
-
constructor(app: Application);
|
|
36
|
-
register(): void;
|
|
37
|
-
boot(): void | Promise<void>;
|
|
38
|
-
/** Package defaults under `key`; values the app already set win (shallow merge, like Laravel). */
|
|
39
|
-
protected mergeConfigFrom(defaults: Record<string, unknown>, key: string): void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface FacadeStatics<T> {
|
|
43
|
-
getFacadeRoot(): T;
|
|
44
|
-
/** Replace the instance in the current container (used by X.fake()). */
|
|
45
|
-
swap(instance: T): void;
|
|
46
|
-
}
|
|
47
|
-
type Facade<T, X = object> = T & X & FacadeStatics<T>;
|
|
1
|
+
import { Htmlable, OrielError, ErrorKind, View as View$1, ViewFactory } from './contracts.js';
|
|
2
|
+
import { F as Facade, S as ServiceProvider } from './index.d-BJyJx6U1.js';
|
|
48
3
|
|
|
49
4
|
/** Marks the objects jsx() returns (Symbol.for, so two copies of the package agree). */
|
|
50
5
|
declare const ELEMENT: unique symbol;
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a as Fragment, H as HtmlAttributes, J as JSX, t as jsx, u as jsxs } from './jsx-runtime-
|
|
1
|
+
export { a as Fragment, H as HtmlAttributes, J as JSX, t as jsx, u as jsxs } from './jsx-runtime-CBZQYYDS.js';
|
|
2
2
|
import './contracts.js';
|
|
3
|
-
import './index.d-
|
|
3
|
+
import './index.d-BJyJx6U1.js';
|
package/dist/jsx-runtime.js
CHANGED