@jay-framework/production-server 0.17.3 → 0.18.0
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/index.d.ts +63 -75
- package/dist/index.js +1061 -1002
- package/dist/init-services-BKVwxzYb.js +796 -0
- package/dist/serve-index-9aAW1pbg.d.ts +179 -0
- package/dist/serve-index.d.ts +3 -0
- package/dist/serve-index.js +23 -0
- package/package.json +24 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,86 +1,74 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { B as BuildOptions, R as RouteManifest, a as RouteEntry } from './serve-index-9aAW1pbg.js';
|
|
2
|
+
export { A as ActionEntry, e as ArtifactStore, c as BuildMetadata, C as CacheEntry, F as FilesystemArtifactStore, I as InstanceEntry, M as MatchResult, d as PageModule, P as PluginEntry, n as PreImportedPlugin, b as RouteSegment, S as ServerElementModule, g as fetchActionRequest, f as fetchPageRequest, j as fetchStaticFile, k as initializeServices, l as initializeServicesFromModules, i as isActionRequest, m as matchRequest, r as registerActionsFromManifest, h as registerActionsFromModules } from './serve-index-9aAW1pbg.js';
|
|
3
|
+
import '@jay-framework/ssr-runtime';
|
|
4
|
+
import '@jay-framework/stack-server-runtime';
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
plugins: PluginEntry[];
|
|
13
|
-
}
|
|
14
|
-
interface RouteSegment {
|
|
15
|
-
type: 'static' | 'param' | 'optional' | 'catchAll' | 'optionalCatchAll';
|
|
16
|
-
value: string;
|
|
17
|
-
}
|
|
18
|
-
interface RouteEntry {
|
|
19
|
-
pattern: string;
|
|
20
|
-
segments: RouteSegment[];
|
|
21
|
-
serverModule: string;
|
|
22
|
-
jayHtmlPath?: string;
|
|
23
|
-
trackByMap?: Record<string, string>;
|
|
24
|
-
contracts?: string[];
|
|
25
|
-
componentExport?: string;
|
|
26
|
-
instances: InstanceEntry[];
|
|
27
|
-
isPlugin?: boolean;
|
|
28
|
-
pluginName?: string;
|
|
29
|
-
}
|
|
30
|
-
interface InstanceEntry {
|
|
31
|
-
params: Record<string, string>;
|
|
32
|
-
preRenderedPath: string;
|
|
33
|
-
serverElementPath: string;
|
|
34
|
-
clientBundlePath: string;
|
|
35
|
-
clientCssPath?: string;
|
|
36
|
-
}
|
|
37
|
-
interface PreRenderedEntry {
|
|
38
|
-
content: string;
|
|
39
|
-
slowViewState: object;
|
|
40
|
-
carryForward: object;
|
|
41
|
-
}
|
|
42
|
-
interface ActionEntry {
|
|
43
|
-
serverModule: string;
|
|
44
|
-
packageName?: string;
|
|
45
|
-
isPlugin: boolean;
|
|
46
|
-
actionNames: string[];
|
|
47
|
-
}
|
|
48
|
-
interface PluginEntry {
|
|
49
|
-
name: string;
|
|
50
|
-
packageName: string;
|
|
6
|
+
declare function buildVersion(options: BuildOptions): Promise<RouteManifest>;
|
|
7
|
+
|
|
8
|
+
interface MainServerOptions {
|
|
9
|
+
buildRoot: string;
|
|
10
|
+
version: string;
|
|
11
|
+
port: number;
|
|
12
|
+
publicBasePath?: string;
|
|
13
|
+
serveStatic?: boolean;
|
|
14
|
+
testMode?: boolean;
|
|
51
15
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
16
|
+
declare function startMainServer(options: MainServerOptions): Promise<void>;
|
|
17
|
+
|
|
18
|
+
interface RendererServerOptions {
|
|
19
|
+
buildRoot: string;
|
|
20
|
+
version: string;
|
|
21
|
+
port: number;
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
pagesRoot: string;
|
|
24
|
+
tsConfigFilePath?: string;
|
|
25
|
+
minify?: boolean;
|
|
58
26
|
}
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
declare function startRendererServer(options: RendererServerOptions): Promise<void>;
|
|
28
|
+
|
|
29
|
+
type RebuildTarget = {
|
|
30
|
+
mode: 'contract';
|
|
31
|
+
contractName: string;
|
|
32
|
+
params?: Record<string, string>;
|
|
33
|
+
} | {
|
|
34
|
+
mode: 'route';
|
|
35
|
+
routePattern: string;
|
|
36
|
+
params?: Record<string, string>;
|
|
37
|
+
} | {
|
|
38
|
+
mode: 'url';
|
|
39
|
+
url: string;
|
|
40
|
+
};
|
|
41
|
+
interface RebuildOptions {
|
|
61
42
|
projectRoot: string;
|
|
62
43
|
pagesRoot: string;
|
|
63
44
|
buildRoot: string;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
tsConfigFilePath
|
|
45
|
+
version: string;
|
|
46
|
+
target: RebuildTarget;
|
|
47
|
+
tsConfigFilePath?: string;
|
|
67
48
|
minify?: boolean;
|
|
68
49
|
}
|
|
69
|
-
interface
|
|
70
|
-
|
|
50
|
+
interface RebuildResult {
|
|
51
|
+
affected: number;
|
|
52
|
+
rebuilt: number;
|
|
53
|
+
errors: Array<{
|
|
54
|
+
route: string;
|
|
55
|
+
params?: Record<string, string>;
|
|
56
|
+
error: string;
|
|
57
|
+
}>;
|
|
71
58
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
interface MainServerOptions {
|
|
59
|
+
declare function resolveContractToRoutes(manifest: RouteManifest, contractName: string): RouteEntry[];
|
|
60
|
+
declare function rebuild(options: RebuildOptions): Promise<RebuildResult>;
|
|
61
|
+
/** Convenience wrapper for contract-based rebuild (used by renderer server webhooks). */
|
|
62
|
+
declare function rebuildContract(options: {
|
|
63
|
+
projectRoot: string;
|
|
64
|
+
pagesRoot: string;
|
|
79
65
|
buildRoot: string;
|
|
80
|
-
version:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
version: string;
|
|
67
|
+
contractName: string;
|
|
68
|
+
params?: Record<string, string>;
|
|
69
|
+
tsConfigFilePath?: string;
|
|
70
|
+
minify?: boolean;
|
|
71
|
+
}): Promise<RebuildResult>;
|
|
72
|
+
declare function cleanupOrphanedFiles(buildRoot: string, version: string): Promise<number>;
|
|
85
73
|
|
|
86
|
-
export {
|
|
74
|
+
export { BuildOptions, type RebuildOptions, type RebuildResult, type RebuildTarget, type RendererServerOptions, RouteEntry, RouteManifest, buildVersion, cleanupOrphanedFiles, rebuild, rebuildContract, resolveContractToRoutes, startMainServer, startRendererServer };
|