@unieojs/unio-evjs-adapter 0.5.0 → 0.6.1
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/types.d.ts +52 -7
- package/package.json +1 -1
- package/src/types.ts +61 -19
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export interface ManifestAssets {
|
|
2
|
+
js: string[];
|
|
3
|
+
css: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface RouteEntry {
|
|
6
|
+
path: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PageManifestEntry {
|
|
9
|
+
assets: ManifestAssets;
|
|
10
|
+
routes?: RouteEntry[];
|
|
11
|
+
}
|
|
12
|
+
export interface ClientManifest {
|
|
13
|
+
version: 1;
|
|
14
|
+
assets: ManifestAssets;
|
|
15
|
+
routes?: RouteEntry[];
|
|
16
|
+
pages?: Record<string, PageManifestEntry>;
|
|
17
|
+
}
|
|
18
|
+
export interface ServerFnEntry {
|
|
19
|
+
assets?: ManifestAssets;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface ServerRouteEntry {
|
|
23
|
+
path: string;
|
|
24
|
+
methods: string[];
|
|
25
|
+
assets: ManifestAssets;
|
|
26
|
+
}
|
|
27
|
+
export interface ServerManifest {
|
|
28
|
+
version: 1;
|
|
29
|
+
entry?: string;
|
|
30
|
+
assets?: ManifestAssets;
|
|
31
|
+
fns: Record<string, ServerFnEntry>;
|
|
32
|
+
routes?: ServerRouteEntry[];
|
|
33
|
+
rsc?: Record<string, ServerFnEntry>;
|
|
34
|
+
}
|
|
35
|
+
export interface EvBuildResult {
|
|
36
|
+
clientManifest: ClientManifest;
|
|
37
|
+
serverManifest?: ServerManifest;
|
|
38
|
+
isRebuild?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface EvPluginContext {
|
|
41
|
+
mode: "development" | "production";
|
|
42
|
+
cwd: string;
|
|
43
|
+
config: unknown;
|
|
44
|
+
}
|
|
45
|
+
export interface EvPluginHooks {
|
|
46
|
+
buildEnd?: (result: EvBuildResult) => void | Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export interface EvPlugin {
|
|
49
|
+
name: string;
|
|
50
|
+
setup?: (ctx: EvPluginContext) => EvPluginHooks | Promise<EvPluginHooks>;
|
|
51
|
+
}
|
|
8
52
|
export type CapabilityStatus = "supported" | "partial" | "degraded" | "unsupported";
|
|
9
53
|
export interface UboaCapabilities {
|
|
10
54
|
static: CapabilityStatus;
|
|
@@ -144,3 +188,4 @@ export interface EmitUboaOptions extends UnioEvjsAdapterOptions {
|
|
|
144
188
|
serverManifest?: ServerManifest;
|
|
145
189
|
}
|
|
146
190
|
export type BuildOptions = EmitUboaOptions;
|
|
191
|
+
export {};
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,22 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
export interface ManifestAssets {
|
|
2
|
+
js: string[];
|
|
3
|
+
css: string[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface RouteEntry {
|
|
7
|
+
path: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface PageManifestEntry {
|
|
11
|
+
assets: ManifestAssets;
|
|
12
|
+
routes?: RouteEntry[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ClientManifest {
|
|
16
|
+
version: 1;
|
|
17
|
+
assets: ManifestAssets;
|
|
18
|
+
routes?: RouteEntry[];
|
|
19
|
+
pages?: Record<string, PageManifestEntry>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ServerFnEntry {
|
|
23
|
+
assets?: ManifestAssets;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ServerRouteEntry {
|
|
28
|
+
path: string;
|
|
29
|
+
methods: string[];
|
|
30
|
+
assets: ManifestAssets;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ServerManifest {
|
|
34
|
+
version: 1;
|
|
35
|
+
entry?: string;
|
|
36
|
+
assets?: ManifestAssets;
|
|
37
|
+
fns: Record<string, ServerFnEntry>;
|
|
38
|
+
routes?: ServerRouteEntry[];
|
|
39
|
+
rsc?: Record<string, ServerFnEntry>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface EvBuildResult {
|
|
43
|
+
clientManifest: ClientManifest;
|
|
44
|
+
serverManifest?: ServerManifest;
|
|
45
|
+
isRebuild?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface EvPluginContext {
|
|
49
|
+
mode: "development" | "production";
|
|
50
|
+
cwd: string;
|
|
51
|
+
config: unknown;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface EvPluginHooks {
|
|
55
|
+
buildEnd?: (result: EvBuildResult) => void | Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface EvPlugin {
|
|
59
|
+
name: string;
|
|
60
|
+
setup?: (ctx: EvPluginContext) => EvPluginHooks | Promise<EvPluginHooks>;
|
|
61
|
+
}
|
|
20
62
|
|
|
21
63
|
export type CapabilityStatus =
|
|
22
64
|
| "supported"
|