@absolutejs/absolute 0.19.0-beta.171 → 0.19.0-beta.173
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/ROADMAP.md +450 -0
- package/dist/cli/index.js +139 -85
- package/dist/index.js +40 -9
- package/dist/index.js.map +3 -3
- package/dist/src/core/prepare.d.ts +52 -0
- package/dist/src/core/prerender.d.ts +20 -0
- package/dist/types/build.d.ts +5 -0
- package/package.json +1 -1
- package/types/build.ts +7 -0
|
@@ -47,6 +47,58 @@ export declare const prepare: (configOrPath?: string) => Promise<{
|
|
|
47
47
|
standaloneSchema: {};
|
|
48
48
|
response: {};
|
|
49
49
|
}>;
|
|
50
|
+
} | {
|
|
51
|
+
absolutejs: (app: import("elysia").Elysia) => import("elysia").default<"", {
|
|
52
|
+
decorator: {};
|
|
53
|
+
store: {};
|
|
54
|
+
derive: {};
|
|
55
|
+
resolve: {};
|
|
56
|
+
}, {
|
|
57
|
+
typebox: {};
|
|
58
|
+
error: {};
|
|
59
|
+
} & {
|
|
60
|
+
typebox: {};
|
|
61
|
+
error: {};
|
|
62
|
+
}, {
|
|
63
|
+
schema: {};
|
|
64
|
+
standaloneSchema: {};
|
|
65
|
+
macro: {};
|
|
66
|
+
macroFn: {};
|
|
67
|
+
parser: {};
|
|
68
|
+
response: {};
|
|
69
|
+
} & {
|
|
70
|
+
schema: {};
|
|
71
|
+
standaloneSchema: {};
|
|
72
|
+
macro: {};
|
|
73
|
+
macroFn: {};
|
|
74
|
+
parser: {};
|
|
75
|
+
response: {};
|
|
76
|
+
}, {}, {
|
|
77
|
+
derive: {};
|
|
78
|
+
resolve: {};
|
|
79
|
+
schema: {};
|
|
80
|
+
standaloneSchema: {};
|
|
81
|
+
response: {};
|
|
82
|
+
}, {
|
|
83
|
+
derive: {};
|
|
84
|
+
resolve: {};
|
|
85
|
+
schema: {};
|
|
86
|
+
standaloneSchema: {};
|
|
87
|
+
response: {};
|
|
88
|
+
} & {
|
|
89
|
+
derive: {};
|
|
90
|
+
resolve: {};
|
|
91
|
+
schema: {};
|
|
92
|
+
standaloneSchema: {};
|
|
93
|
+
response: {};
|
|
94
|
+
} & {
|
|
95
|
+
derive: {};
|
|
96
|
+
resolve: {};
|
|
97
|
+
schema: {};
|
|
98
|
+
standaloneSchema: {};
|
|
99
|
+
response: {};
|
|
100
|
+
}>;
|
|
101
|
+
manifest: Record<string, string>;
|
|
50
102
|
} | {
|
|
51
103
|
absolutejs: Promise<import("elysia").default<"", {
|
|
52
104
|
decorator: {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StaticConfig } from '../../types/build';
|
|
2
|
+
export type PrerenderResult = {
|
|
3
|
+
/** Map of route path → rendered HTML file path on disk */
|
|
4
|
+
routes: Map<string, string>;
|
|
5
|
+
/** Directory where pre-rendered files are stored */
|
|
6
|
+
dir: string;
|
|
7
|
+
};
|
|
8
|
+
type LogFn = (message: string) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Pre-render routes by fetching them from a running server and saving the HTML to disk.
|
|
11
|
+
*
|
|
12
|
+
* Used by both `absolute start` (SSG) and `absolute compile`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const prerender: (port: number, outDir: string, staticConfig: StaticConfig, log?: LogFn) => Promise<PrerenderResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Start the bundled production server, wait for it to be ready, pre-render,
|
|
17
|
+
* then kill it. Returns the pre-render result.
|
|
18
|
+
*/
|
|
19
|
+
export declare const prerenderWithServer: (serverBundlePath: string, port: number, outDir: string, staticConfig: StaticConfig, env: Record<string, string>, log?: LogFn) => Promise<PrerenderResult>;
|
|
20
|
+
export {};
|
package/dist/types/build.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export type StylesConfig = {
|
|
|
15
15
|
path: string;
|
|
16
16
|
ignore?: string[];
|
|
17
17
|
};
|
|
18
|
+
export type StaticConfig = {
|
|
19
|
+
/** Routes to pre-render at build time. Use "all" to crawl from / and discover all linked pages. */
|
|
20
|
+
routes: string[] | 'all';
|
|
21
|
+
};
|
|
18
22
|
export type BuildConfig = {
|
|
19
23
|
buildDirectory?: string;
|
|
20
24
|
assetsDirectory?: string;
|
|
@@ -37,6 +41,7 @@ export type BuildConfig = {
|
|
|
37
41
|
dev?: {
|
|
38
42
|
https?: boolean;
|
|
39
43
|
};
|
|
44
|
+
static?: StaticConfig;
|
|
40
45
|
};
|
|
41
46
|
export type BuildResult = ReturnType<typeof build>;
|
|
42
47
|
export type DevBuildResult = ReturnType<typeof devBuild>;
|
package/package.json
CHANGED
package/types/build.ts
CHANGED
|
@@ -18,6 +18,11 @@ export type StylesConfig = {
|
|
|
18
18
|
ignore?: string[];
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
export type StaticConfig = {
|
|
22
|
+
/** Routes to pre-render at build time. Use "all" to crawl from / and discover all linked pages. */
|
|
23
|
+
routes: string[] | 'all';
|
|
24
|
+
};
|
|
25
|
+
|
|
21
26
|
export type BuildConfig = {
|
|
22
27
|
buildDirectory?: string;
|
|
23
28
|
assetsDirectory?: string;
|
|
@@ -45,6 +50,8 @@ export type BuildConfig = {
|
|
|
45
50
|
// Enable HTTPS for HTTP/2 multiplexing (faster HMR on import-heavy components)
|
|
46
51
|
https?: boolean;
|
|
47
52
|
};
|
|
53
|
+
// Static site generation — pre-render routes at build time
|
|
54
|
+
static?: StaticConfig;
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
export type BuildResult = ReturnType<typeof build>;
|