@tyndall/build 0.0.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/README.md +35 -0
- package/dist/build.d.ts +30 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +925 -0
- package/dist/bundler.d.ts +32 -0
- package/dist/bundler.d.ts.map +1 -0
- package/dist/bundler.js +48 -0
- package/dist/cache-gc.d.ts +20 -0
- package/dist/cache-gc.d.ts.map +1 -0
- package/dist/cache-gc.js +153 -0
- package/dist/chunk-cache.d.ts +17 -0
- package/dist/chunk-cache.d.ts.map +1 -0
- package/dist/chunk-cache.js +119 -0
- package/dist/emit.d.ts +5 -0
- package/dist/emit.d.ts.map +1 -0
- package/dist/emit.js +62 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/manifest.d.ts +12 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +58 -0
- package/dist/pipeline.d.ts +42 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +56 -0
- package/dist/renderer.d.ts +50 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/renderer.js +109 -0
- package/dist/ssg-cache.d.ts +48 -0
- package/dist/ssg-cache.d.ts.map +1 -0
- package/dist/ssg-cache.js +159 -0
- package/dist/ssg-data.d.ts +21 -0
- package/dist/ssg-data.d.ts.map +1 -0
- package/dist/ssg-data.js +82 -0
- package/package.json +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @tyndall/build
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Static build pipeline package for bundling, rendering, manifest generation, and cache-aware incremental output.
|
|
5
|
+
|
|
6
|
+
## Responsibilities
|
|
7
|
+
- Execute build pipeline stages in deterministic order
|
|
8
|
+
- Bundle client and server assets and emit manifests
|
|
9
|
+
- Apply cache and incremental build strategies
|
|
10
|
+
- Emit client bootstrap policies for SSR+CSR transition behavior when configured
|
|
11
|
+
- Emit executable adapter-driven client/server runtime entries (not placeholder-only chunks)
|
|
12
|
+
- Clean output directory before each build to prevent stale artifact reuse across mode changes
|
|
13
|
+
- Emit legacy `nomodule` runtime assets with ES5-safe syntax when `legacy.enabled` is active
|
|
14
|
+
- Inject legacy polyfill scripts according to `legacy.polyfills` (`auto` or explicit script list)
|
|
15
|
+
- Emit ES5 classic browser scripts when `target="es5"` is configured (no module scripts)
|
|
16
|
+
- Stamp build version metadata into HTML, manifest, and script URLs when `build.version` is configured
|
|
17
|
+
|
|
18
|
+
## Public API Highlights
|
|
19
|
+
- build
|
|
20
|
+
- runBuildPipeline
|
|
21
|
+
- bundleClient and bundleServer
|
|
22
|
+
|
|
23
|
+
## Development
|
|
24
|
+
- Build: bun run --filter @tyndall/build build
|
|
25
|
+
- Test (from workspace root): bun test
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
- Package specification: [spec.md](./spec.md)
|
|
29
|
+
- Package architecture: [architecture.md](./architecture.md)
|
|
30
|
+
- Package changes: [CHANGELOG.md](./CHANGELOG.md)
|
|
31
|
+
|
|
32
|
+
## Maintenance Rules
|
|
33
|
+
- Keep this document aligned with implemented package behavior.
|
|
34
|
+
- Update spec.md and architecture.md whenever package contracts or design boundaries change.
|
|
35
|
+
- Record user-visible package changes in CHANGELOG.md.
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Manifest, RouteGraph, UIAdapterRegistry } from "@tyndall/core";
|
|
2
|
+
import { type BuildStageTiming } from "./pipeline.js";
|
|
3
|
+
export type BuildMode = "ssg" | "ssr";
|
|
4
|
+
export interface BuildCacheOptions {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
dir: string;
|
|
7
|
+
maxSizeMB?: number;
|
|
8
|
+
maxAgeDays?: number;
|
|
9
|
+
propsTTLSeconds: number | false;
|
|
10
|
+
renderCache: boolean;
|
|
11
|
+
chunkCache: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface BuildOptions {
|
|
14
|
+
rootDir: string;
|
|
15
|
+
mode?: BuildMode;
|
|
16
|
+
outDir?: string;
|
|
17
|
+
routesDir?: string;
|
|
18
|
+
publicDir?: string;
|
|
19
|
+
cache?: Partial<BuildCacheOptions>;
|
|
20
|
+
adapterRegistry?: UIAdapterRegistry;
|
|
21
|
+
}
|
|
22
|
+
export interface BuildResult {
|
|
23
|
+
outDir: string;
|
|
24
|
+
routeGraph: RouteGraph;
|
|
25
|
+
manifest: Manifest;
|
|
26
|
+
timings: BuildStageTiming[];
|
|
27
|
+
cache: BuildCacheOptions;
|
|
28
|
+
}
|
|
29
|
+
export declare const build: (options: BuildOptions) => Promise<BuildResult>;
|
|
30
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,QAAQ,EAGR,UAAU,EAEV,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAoDvB,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAExE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,GAAG,KAAK,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnC,eAAe,CAAC,EAAE,iBAAiB,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAufD,eAAO,MAAM,KAAK,GAAU,SAAS,YAAY,KAAG,OAAO,CAAC,WAAW,CA0pBtE,CAAC"}
|