@stati/core 1.29.0 → 1.29.2

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.
@@ -27,7 +27,7 @@ export { TemplateError, parseEtaError, createTemplateError } from './template-er
27
27
  // Navigation helper utilities
28
28
  export { createNavigationHelpers } from './navigation-helpers.utils.js';
29
29
  // Server utilities
30
- export { resolvePrettyUrl, mergeServerOptions, assertPortAvailable, toPortUnavailableError, PortUnavailableError, } from './server.utils.js';
30
+ export { getMimeType, parseRequestPath, resolveNotFoundPage, resolveRequestFile, resolvePrettyUrl, mergeServerOptions, assertPortAvailable, toPortUnavailableError, PortUnavailableError, } from './server.utils.js';
31
31
  // Error overlay utilities
32
32
  export { createErrorOverlay, parseErrorDetails } from './error-overlay.utils.js';
33
33
  // Version utilities
@@ -39,7 +39,7 @@ export { matchBundlesForPage, getBundlePathsForPage, validateUniqueBundleNames,
39
39
  // Logger utilities
40
40
  export { createFallbackLogger } from './logger.utils.js';
41
41
  // TypeScript compilation utilities
42
- export { compileTypeScript, createTypeScriptWatcher, compileStatiConfig, cleanupCompiledConfig, autoInjectBundles, formatBytes, detectExistingBundles, } from './typescript.utils.js';
42
+ export { compileTypeScript, createTypeScriptWatcher, compileStatiConfig, cleanupCompiledConfig, autoInjectBundles, formatBytes, detectExistingBundles, removeStaleBundleFiles, } from './typescript.utils.js';
43
43
  // HTML manipulation utilities
44
44
  export { findHeadClosePosition, injectBeforeHeadClose } from './html.utils.js';
45
45
  // Date utilities
@@ -1,3 +1,26 @@
1
+ /**
2
+ * Gets the content type for a file from its extension.
3
+ *
4
+ * @param filePath - Path or file name of the file being served
5
+ * @returns The content type, or `application/octet-stream` for unknown extensions
6
+ */
7
+ export declare function getMimeType(filePath: string): string;
8
+ /**
9
+ * Turns a request URL into the path of the file it asks for: the query string is dropped and
10
+ * percent-escapes are decoded, so `/about?ref=x` asks for `/about` and `/my%20file.pdf` for
11
+ * `/my file.pdf`.
12
+ *
13
+ * @param url - The request URL as received (`req.url`)
14
+ * @returns The decoded path, or null when the URL is malformed (a bad escape or a NUL byte)
15
+ */
16
+ export declare function parseRequestPath(url: string | undefined): string | null;
17
+ /**
18
+ * Finds the site's custom not-found page, the one static hosts serve for a missing URL.
19
+ *
20
+ * @param outDir - The output directory being served
21
+ * @returns The path of `404.html` (or `404/index.html` for a `/404/` permalink), or null
22
+ */
23
+ export declare function resolveNotFoundPage(outDir: string): Promise<string | null>;
1
24
  /**
2
25
  * Error codes for which a port is considered unavailable
3
26
  */
@@ -42,6 +65,17 @@ export interface PrettyUrlResult {
42
65
  /** Whether the path was found */
43
66
  found: boolean;
44
67
  }
68
+ /**
69
+ * Resolves a request path to the file it names inside the served directory. This is where a
70
+ * request path becomes a file system path: every file the servers read is this path or
71
+ * derived from it, so no request reaches outside the directory, whether through `..`
72
+ * segments (raw or percent-encoded), backslashes or an absolute path.
73
+ *
74
+ * @param outDir - The directory being served
75
+ * @param requestPath - The decoded request path, from {@link parseRequestPath}
76
+ * @returns The absolute path, or null when it points outside the directory
77
+ */
78
+ export declare function resolveRequestFile(outDir: string, requestPath: string): string | null;
45
79
  /**
46
80
  * Attempts to resolve pretty URL paths by trying various fallback strategies.
47
81
  * This handles common patterns like:
@@ -50,11 +84,12 @@ export interface PrettyUrlResult {
50
84
  * - /path -> /path.html (when original path is not found and has no extension)
51
85
  *
52
86
  * @param outDir The output directory to serve files from
53
- * @param requestPath The requested URL path
54
- * @param originalFilePath The original file path that was attempted
87
+ * @param requestPath The requested URL path, which decides the fallbacks
88
+ * @param requestFile The file the request names, from {@link resolveRequestFile}. Every
89
+ * candidate is derived from it, so none is outside the output directory
55
90
  * @returns Promise resolving to the file path to serve or null if not found
56
91
  */
57
- export declare function resolvePrettyUrl(outDir: string, requestPath: string, originalFilePath: string): Promise<PrettyUrlResult>;
92
+ export declare function resolvePrettyUrl(outDir: string, requestPath: string, requestFile: string): Promise<PrettyUrlResult>;
58
93
  /**
59
94
  * Options for merging server configuration
60
95
  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ACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,EAC3F,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAClC,mBAAmB,CAQrB"}
@@ -1,6 +1,85 @@
1
- import { join } from 'node:path';
1
+ import { extname, join, resolve, sep } from 'node:path';
2
2
  import { stat } from 'node:fs/promises';
3
3
  import { createServer } from 'node:net';
4
+ /**
5
+ * Content types the dev and preview servers send, by file extension. Covers the files Stati
6
+ * generates (pages, bundles, search index, sitemap, robots.txt, feeds, responsive images) and
7
+ * common static assets; anything else is sent as `application/octet-stream`.
8
+ */
9
+ const MIME_TYPES = {
10
+ '.html': 'text/html',
11
+ '.js': 'application/javascript',
12
+ '.mjs': 'application/javascript',
13
+ '.css': 'text/css',
14
+ '.json': 'application/json',
15
+ '.map': 'application/json',
16
+ '.webmanifest': 'application/manifest+json',
17
+ '.xml': 'application/xml',
18
+ '.txt': 'text/plain',
19
+ '.png': 'image/png',
20
+ '.jpg': 'image/jpeg',
21
+ '.jpeg': 'image/jpeg',
22
+ '.gif': 'image/gif',
23
+ '.svg': 'image/svg+xml',
24
+ '.ico': 'image/x-icon',
25
+ '.webp': 'image/webp',
26
+ '.avif': 'image/avif',
27
+ '.woff': 'font/woff',
28
+ '.woff2': 'font/woff2',
29
+ '.ttf': 'font/ttf',
30
+ '.otf': 'font/otf',
31
+ '.eot': 'application/vnd.ms-fontobject',
32
+ '.pdf': 'application/pdf',
33
+ '.mp4': 'video/mp4',
34
+ '.webm': 'video/webm',
35
+ '.wasm': 'application/wasm',
36
+ };
37
+ /**
38
+ * Gets the content type for a file from its extension.
39
+ *
40
+ * @param filePath - Path or file name of the file being served
41
+ * @returns The content type, or `application/octet-stream` for unknown extensions
42
+ */
43
+ export function getMimeType(filePath) {
44
+ return MIME_TYPES[extname(filePath).toLowerCase()] ?? 'application/octet-stream';
45
+ }
46
+ /**
47
+ * Turns a request URL into the path of the file it asks for: the query string is dropped and
48
+ * percent-escapes are decoded, so `/about?ref=x` asks for `/about` and `/my%20file.pdf` for
49
+ * `/my file.pdf`.
50
+ *
51
+ * @param url - The request URL as received (`req.url`)
52
+ * @returns The decoded path, or null when the URL is malformed (a bad escape or a NUL byte)
53
+ */
54
+ export function parseRequestPath(url) {
55
+ const rawPath = (url || '/').split(/[?#]/, 1)[0] || '/';
56
+ try {
57
+ const path = decodeURIComponent(rawPath);
58
+ return path.includes('\0') ? null : path;
59
+ }
60
+ catch {
61
+ return null;
62
+ }
63
+ }
64
+ /**
65
+ * Finds the site's custom not-found page, the one static hosts serve for a missing URL.
66
+ *
67
+ * @param outDir - The output directory being served
68
+ * @returns The path of `404.html` (or `404/index.html` for a `/404/` permalink), or null
69
+ */
70
+ export async function resolveNotFoundPage(outDir) {
71
+ for (const candidate of [join(outDir, '404.html'), join(outDir, '404', 'index.html')]) {
72
+ try {
73
+ if ((await stat(candidate)).isFile()) {
74
+ return candidate;
75
+ }
76
+ }
77
+ catch {
78
+ // Not there; try the next one
79
+ }
80
+ }
81
+ return null;
82
+ }
4
83
  /**
5
84
  * Thrown when a server cannot bind to its configured port.
6
85
  * The message is user-facing and explains how to pick a different port.
@@ -59,6 +138,44 @@ export function assertPortAvailable(port, host, configKey) {
59
138
  probe.listen(port, host);
60
139
  });
61
140
  }
141
+ /**
142
+ * Resolves a request path to the file it names inside the served directory. This is where a
143
+ * request path becomes a file system path: every file the servers read is this path or
144
+ * derived from it, so no request reaches outside the directory, whether through `..`
145
+ * segments (raw or percent-encoded), backslashes or an absolute path.
146
+ *
147
+ * @param outDir - The directory being served
148
+ * @param requestPath - The decoded request path, from {@link parseRequestPath}
149
+ * @returns The absolute path, or null when it points outside the directory
150
+ */
151
+ export function resolveRequestFile(outDir, requestPath) {
152
+ const root = resolve(outDir);
153
+ const filePath = resolve(root, requestPath.replace(/^[/\\]+/, ''));
154
+ if (filePath === root) {
155
+ return root;
156
+ }
157
+ const rootPrefix = root.endsWith(sep) ? root : root + sep;
158
+ if (!filePath.startsWith(rootPrefix)) {
159
+ return null;
160
+ }
161
+ return filePath;
162
+ }
163
+ /**
164
+ * The result for a candidate file: found when it exists and is a file.
165
+ */
166
+ async function fileResult(candidate) {
167
+ if (candidate !== null) {
168
+ try {
169
+ if ((await stat(candidate)).isFile()) {
170
+ return { filePath: candidate, found: true };
171
+ }
172
+ }
173
+ catch {
174
+ // Not there
175
+ }
176
+ }
177
+ return { filePath: null, found: false };
178
+ }
62
179
  /**
63
180
  * Attempts to resolve pretty URL paths by trying various fallback strategies.
64
181
  * This handles common patterns like:
@@ -67,16 +184,20 @@ export function assertPortAvailable(port, host, configKey) {
67
184
  * - /path -> /path.html (when original path is not found and has no extension)
68
185
  *
69
186
  * @param outDir The output directory to serve files from
70
- * @param requestPath The requested URL path
71
- * @param originalFilePath The original file path that was attempted
187
+ * @param requestPath The requested URL path, which decides the fallbacks
188
+ * @param requestFile The file the request names, from {@link resolveRequestFile}. Every
189
+ * candidate is derived from it, so none is outside the output directory
72
190
  * @returns Promise resolving to the file path to serve or null if not found
73
191
  */
74
- export async function resolvePrettyUrl(outDir, requestPath, originalFilePath) {
192
+ export async function resolvePrettyUrl(outDir, requestPath, requestFile) {
193
+ // The sibling .html file: /blog/ and /blog are served from blog.html. The output
194
+ // directory itself has none, as its sibling is outside it.
195
+ const htmlFile = requestFile === resolve(outDir) ? null : `${requestFile}.html`;
75
196
  try {
76
- const stats = await stat(originalFilePath);
197
+ const stats = await stat(requestFile);
77
198
  if (stats.isDirectory()) {
78
199
  // Try to serve index.html from directory
79
- const indexPath = join(originalFilePath, 'index.html');
200
+ const indexPath = join(requestFile, 'index.html');
80
201
  try {
81
202
  await stat(indexPath);
82
203
  return { filePath: indexPath, found: true };
@@ -84,50 +205,17 @@ export async function resolvePrettyUrl(outDir, requestPath, originalFilePath) {
84
205
  catch {
85
206
  // If no index.html in directory, try to serve corresponding .html file
86
207
  // For example: /examples/ -> examples.html
87
- const directoryName = requestPath.replace(/\/$/, ''); // Remove trailing slash
88
- const fallbackPath = join(outDir, `${directoryName}.html`);
89
- try {
90
- await stat(fallbackPath);
91
- return { filePath: fallbackPath, found: true };
92
- }
93
- catch {
94
- return { filePath: null, found: false };
95
- }
208
+ return await fileResult(htmlFile);
96
209
  }
97
210
  }
98
211
  // File exists and is not a directory
99
- return { filePath: originalFilePath, found: true };
212
+ return { filePath: requestFile, found: true };
100
213
  }
101
214
  catch {
102
- // File not found, try fallback strategies for pretty URLs
103
- if (requestPath.endsWith('/')) {
104
- // For requests ending with /, try the corresponding .html file
105
- const pathWithoutSlash = requestPath.slice(0, -1);
106
- const htmlPath = join(outDir, `${pathWithoutSlash}.html`);
107
- try {
108
- const stats = await stat(htmlPath);
109
- if (stats.isFile()) {
110
- return { filePath: htmlPath, found: true };
111
- }
112
- }
113
- catch {
114
- // Continue to not found
115
- }
116
- }
117
- else if (!requestPath.includes('.')) {
118
- // For requests without trailing slash and without extension, try .html
119
- const htmlPath = join(outDir, `${requestPath}.html`);
120
- try {
121
- const stats = await stat(htmlPath);
122
- if (stats.isFile()) {
123
- return { filePath: htmlPath, found: true };
124
- }
125
- }
126
- catch {
127
- // Continue to not found
128
- }
215
+ // File not found: try the .html file for /path/ and for /path without an extension
216
+ if (requestPath.endsWith('/') || !requestPath.includes('.')) {
217
+ return await fileResult(htmlFile);
129
218
  }
130
- // No fallback worked
131
219
  return { filePath: null, found: false };
132
220
  }
133
221
  }
@@ -57,6 +57,33 @@ export interface WatchOptions {
57
57
  * @returns Array of detected bundle info
58
58
  */
59
59
  export declare function detectExistingBundles(options: Omit<CompileOptions, 'logger'>): Promise<CompiledBundleInfo[]>;
60
+ /**
61
+ * Options for {@link removeStaleBundleFiles}.
62
+ */
63
+ export interface RemoveStaleBundlesOptions {
64
+ /** Root directory of the project */
65
+ projectRoot: string;
66
+ /** TypeScript configuration */
67
+ config: TypeScriptConfig;
68
+ /** Output directory (defaults to 'dist') */
69
+ outDir?: string;
70
+ /** The bundles this build compiled */
71
+ compiled: CompiledBundleInfo[];
72
+ }
73
+ /**
74
+ * Deletes the files of compiled bundles that earlier builds left in the bundle output
75
+ * directory: hashed copies from builds whose code differed, and the unhashed file and source
76
+ * map the dev server writes, which production pages never load. Only files named after a
77
+ * bundle compiled in this build are deleted, and never a file this build wrote, so other files
78
+ * in the directory stay.
79
+ *
80
+ * The build calls this after every page is written: until then, pages from the previous
81
+ * build still load the old files.
82
+ *
83
+ * @param options - The project, its TypeScript config and output directory, and the bundles
84
+ * this build compiled
85
+ */
86
+ export declare function removeStaleBundleFiles(options: RemoveStaleBundlesOptions): Promise<void>;
60
87
  /**
61
88
  * Compile TypeScript files using esbuild.
62
89
  * Supports multiple bundles with parallel compilation.
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.utils.d.ts","sourceRoot":"","sources":["../../../src/core/utils/typescript.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQrD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACp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EAAE,MAAM,EAAE,GAAG,MAAM,CA8B7E"}
@@ -7,7 +7,7 @@
7
7
  import * as esbuild from 'esbuild';
8
8
  import * as path from 'node:path';
9
9
  import * as fs from 'node:fs/promises';
10
- import { pathExists } from './fs.utils.js';
10
+ import { pathExists, readdir, remove } from './fs.utils.js';
11
11
  import { validateUniqueBundleNames } from './bundle-matching.utils.js';
12
12
  import { DEFAULT_TS_SRC_DIR, DEFAULT_TS_OUT_DIR, DEFAULT_BUNDLES, DEFAULT_OUT_DIR, } from '../../constants.js';
13
13
  /**
@@ -83,6 +83,39 @@ export async function detectExistingBundles(options) {
83
83
  }
84
84
  return results;
85
85
  }
86
+ /**
87
+ * Deletes the files of compiled bundles that earlier builds left in the bundle output
88
+ * directory: hashed copies from builds whose code differed, and the unhashed file and source
89
+ * map the dev server writes, which production pages never load. Only files named after a
90
+ * bundle compiled in this build are deleted, and never a file this build wrote, so other files
91
+ * in the directory stay.
92
+ *
93
+ * The build calls this after every page is written: until then, pages from the previous
94
+ * build still load the old files.
95
+ *
96
+ * @param options - The project, its TypeScript config and output directory, and the bundles
97
+ * this build compiled
98
+ */
99
+ export async function removeStaleBundleFiles(options) {
100
+ const { projectRoot, config, outDir: globalOutDir = DEFAULT_OUT_DIR, compiled } = options;
101
+ if (compiled.length === 0) {
102
+ return;
103
+ }
104
+ const outDir = path.join(projectRoot, globalOutDir, resolveConfig(config, 'production').outDir);
105
+ const current = new Set(compiled.map((bundle) => bundle.filename));
106
+ // name.js, name-HASH.js (esbuild's 8-character hash) and their source maps
107
+ const patterns = compiled.map(({ config }) => {
108
+ const name = config.bundleName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
109
+ return new RegExp(`^${name}(?:-[A-Z0-9]{8})?\\.js(?:\\.map)?$`);
110
+ });
111
+ const entries = await readdir(outDir, { withFileTypes: true }).catch(() => []);
112
+ // Files only: remove() deletes folders with their contents, and links are left alone
113
+ const stale = entries
114
+ .filter((entry) => entry.isFile())
115
+ .map((entry) => entry.name)
116
+ .filter((file) => !current.has(file) && patterns.some((pattern) => pattern.test(file)));
117
+ await Promise.all(stale.map((file) => remove(path.join(outDir, file))));
118
+ }
86
119
  /**
87
120
  * Compile a single bundle using esbuild.
88
121
  * @internal
@@ -82,21 +82,32 @@ export declare function generateSearchIndex(searchablePages: SearchablePage[], c
82
82
  export declare function writeSearchIndex(searchIndex: SearchIndex, outDir: string, filename: string, skipIfUnchanged?: boolean): Promise<SearchIndexMetadata>;
83
83
  /**
84
84
  * Computes the search index filename based on configuration.
85
- * When hashFilename is true, generates a deterministic hash based on the build ID.
86
- * This allows the filename to be known before the index is generated,
87
- * enabling meta tag injection during initial template render.
85
+ * When hashFilename is true, the name carries a hash of `hashInput`. Production builds pass
86
+ * the index content, so the name changes only when the indexed text does; every page links to
87
+ * the index, so the name is part of each page's cache hash.
88
88
  *
89
89
  * @param config - Search configuration
90
- * @param buildId - Unique identifier for this build (e.g., timestamp or build ID)
90
+ * @param hashInput - The value the hash is computed from, such as the serialized documents
91
91
  * @returns The search index filename (without leading slash)
92
92
  *
93
93
  * @example
94
94
  * ```typescript
95
- * // At build start, compute the filename
96
- * const filename = computeSearchIndexFilename(config.search, Date.now().toString());
95
+ * const filename = computeSearchIndexFilename(config.search, JSON.stringify(index.documents));
97
96
  * // filename: 'search-index-a1b2c3d4.json' (when hashFilename is true)
98
97
  * // filename: 'search-index.json' (when hashFilename is false)
99
98
  * ```
100
99
  */
101
- export declare function computeSearchIndexFilename(config: SearchConfig, buildId?: string): string;
100
+ export declare function computeSearchIndexFilename(config: SearchConfig, hashInput?: string): string;
101
+ /**
102
+ * Deletes search index files that earlier builds wrote under another name: hashed files from
103
+ * builds whose indexed text differed, and the file of a build with the other `hashFilename`
104
+ * setting. Only files in the output directory named after `indexName` are deleted, never the
105
+ * current one.
106
+ *
107
+ * @param outDir - The output directory
108
+ * @param config - Search configuration
109
+ * @param currentFilename - The index file this build wrote
110
+ * @returns The deleted file names
111
+ */
112
+ export declare function removeStaleSearchIndexes(outDir: string, config: SearchConfig, currentFilename: string): Promise<string[]>;
102
113
  //# sourceMappingURL=generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/search/generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D;AAqBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA2BtE;AAKD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8DtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,QAAQ,EAAE,EACf,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACnC,MAAM,EAAE,YAAY,GACnB,cAAc,EAAE,CAiGlB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CA2BhF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAM1E;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,mCAAmC;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,kDAAkD;IAClD,eAAe,EAAE,MAAM,CAAC;CACzB;AA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AAM,EAAE,YAAY,GAAG,OAAO,CA2BhF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAM1E;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,mCAAmC;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,kDAAkD;IAClD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,cAAc,EAAE,EACjC,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAiBD,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,eAAe,UAAQ,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAqC9B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAW3F;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { createHash } from 'node:crypto';
6
6
  import { join } from 'node:path';
7
- import { writeFile, ensureDir } from '../core/utils/fs.utils.js';
7
+ import { writeFile, ensureDir, readdir, remove } from '../core/utils/fs.utils.js';
8
8
  import { matchesGlob } from '../core/utils/glob-patterns.utils.js';
9
9
  import { isVirtualPage } from '../core/utils/template-discovery.utils.js';
10
10
  import { SEARCH_INDEX_VERSION, SEARCH_DEFAULTS } from './constants.js';
@@ -327,32 +327,55 @@ export async function writeSearchIndex(searchIndex, outDir, filename, skipIfUnch
327
327
  }
328
328
  /**
329
329
  * Computes the search index filename based on configuration.
330
- * When hashFilename is true, generates a deterministic hash based on the build ID.
331
- * This allows the filename to be known before the index is generated,
332
- * enabling meta tag injection during initial template render.
330
+ * When hashFilename is true, the name carries a hash of `hashInput`. Production builds pass
331
+ * the index content, so the name changes only when the indexed text does; every page links to
332
+ * the index, so the name is part of each page's cache hash.
333
333
  *
334
334
  * @param config - Search configuration
335
- * @param buildId - Unique identifier for this build (e.g., timestamp or build ID)
335
+ * @param hashInput - The value the hash is computed from, such as the serialized documents
336
336
  * @returns The search index filename (without leading slash)
337
337
  *
338
338
  * @example
339
339
  * ```typescript
340
- * // At build start, compute the filename
341
- * const filename = computeSearchIndexFilename(config.search, Date.now().toString());
340
+ * const filename = computeSearchIndexFilename(config.search, JSON.stringify(index.documents));
342
341
  * // filename: 'search-index-a1b2c3d4.json' (when hashFilename is true)
343
342
  * // filename: 'search-index.json' (when hashFilename is false)
344
343
  * ```
345
344
  */
346
- export function computeSearchIndexFilename(config, buildId) {
345
+ export function computeSearchIndexFilename(config, hashInput) {
347
346
  const indexName = config.indexName ?? SEARCH_DEFAULTS.indexName;
348
347
  const hashFilename = config.hashFilename ?? SEARCH_DEFAULTS.hashFilename;
349
348
  if (hashFilename) {
350
- // Generate a deterministic hash based on build ID
351
- // This allows the filename to be known before content is generated
352
- const hashInput = buildId ?? Date.now().toString();
353
- const hash = generateContentHash(hashInput);
349
+ const hash = generateContentHash(hashInput ?? Date.now().toString());
354
350
  return `${indexName}-${hash}.json`;
355
351
  }
356
352
  // Return base filename (without hash)
357
353
  return `${indexName}.json`;
358
354
  }
355
+ /**
356
+ * Deletes search index files that earlier builds wrote under another name: hashed files from
357
+ * builds whose indexed text differed, and the file of a build with the other `hashFilename`
358
+ * setting. Only files in the output directory named after `indexName` are deleted, never the
359
+ * current one.
360
+ *
361
+ * @param outDir - The output directory
362
+ * @param config - Search configuration
363
+ * @param currentFilename - The index file this build wrote
364
+ * @returns The deleted file names
365
+ */
366
+ export async function removeStaleSearchIndexes(outDir, config, currentFilename) {
367
+ const indexName = (config.indexName ?? SEARCH_DEFAULTS.indexName).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
368
+ // name.json and name-HASH.json (generateContentHash's 8 hex characters)
369
+ const pattern = new RegExp(`^${indexName}(?:-[0-9a-f]{8})?\\.json$`);
370
+ const entries = await readdir(outDir, { withFileTypes: true }).catch(() => null);
371
+ if (!entries) {
372
+ return [];
373
+ }
374
+ // Files only: remove() deletes folders with their contents, and links are left alone
375
+ const stale = entries
376
+ .filter((entry) => entry.isFile())
377
+ .map((entry) => entry.name)
378
+ .filter((file) => file !== currentFilename && pattern.test(file));
379
+ await Promise.all(stale.map((file) => remove(join(outDir, file))));
380
+ return stale;
381
+ }
@@ -16,7 +16,7 @@
16
16
  * console.log(`Generated search index at ${metadata.indexPath}`);
17
17
  * ```
18
18
  */
19
- export { generateSearchIndex, writeSearchIndex, extractSectionsFromMarkdown, stripMarkdown, shouldExcludePage, isGeneratedPageExcludedFromSearch, generateContentHash, buildBreadcrumb, computeSearchIndexFilename, } from './generator.js';
19
+ export { generateSearchIndex, writeSearchIndex, extractSectionsFromMarkdown, stripMarkdown, shouldExcludePage, isGeneratedPageExcludedFromSearch, generateContentHash, buildBreadcrumb, computeSearchIndexFilename, removeStaleSearchIndexes, } from './generator.js';
20
20
  export type { SearchablePage } from './generator.js';
21
21
  export { autoInjectSearchMeta } from './auto-inject.js';
22
22
  export { SEARCH_INDEX_META_NAME, SEARCH_INDEX_VERSION, SEARCH_DEFAULTS } from './constants.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EACjB,iCAAiC,EACjC,mBAAmB,EACnB,eAAe,EACf,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE/F,YAAY,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EACjB,iCAAiC,EACjC,mBAAmB,EACnB,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE/F,YAAY,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * console.log(`Generated search index at ${metadata.indexPath}`);
17
17
  * ```
18
18
  */
19
- export { generateSearchIndex, writeSearchIndex, extractSectionsFromMarkdown, stripMarkdown, shouldExcludePage, isGeneratedPageExcludedFromSearch, generateContentHash, buildBreadcrumb, computeSearchIndexFilename, } from './generator.js';
19
+ export { generateSearchIndex, writeSearchIndex, extractSectionsFromMarkdown, stripMarkdown, shouldExcludePage, isGeneratedPageExcludedFromSearch, generateContentHash, buildBreadcrumb, computeSearchIndexFilename, removeStaleSearchIndexes, } from './generator.js';
20
20
  // Auto-injection
21
21
  export { autoInjectSearchMeta } from './auto-inject.js';
22
22
  export { SEARCH_INDEX_META_NAME, SEARCH_INDEX_VERSION, SEARCH_DEFAULTS } from './constants.js';
@@ -212,16 +212,18 @@ export interface BundleConfig {
212
212
  bundleName: string;
213
213
  /**
214
214
  * Glob patterns for pages that should include this bundle.
215
- * Matches against page output path (e.g., '/docs/api/hooks.html').
215
+ * Matches against the page URL (e.g., '/docs/api/hooks', or '/' for the home page),
216
+ * not its output file. A pattern must match the whole URL: '/docs/**' does not match
217
+ * the '/docs' index page itself.
216
218
  * If omitted, bundle is included on ALL pages (global bundle).
217
219
  *
218
- * Supports glob syntax: `*`, `**`, `?`, `[abc]`, `{a,b}`
220
+ * Supports glob syntax: `*`, `**`, `?`, `[abc]` (no `{a,b}`; list each pattern instead)
219
221
  *
220
- * @example ['/docs/**', '/api/**']
222
+ * @example ['/docs', '/docs/**', '/api/**']
221
223
  */
222
224
  include?: string[];
223
225
  /**
224
- * Glob patterns for pages to exclude from this bundle.
226
+ * Glob patterns for page URLs to exclude from this bundle.
225
227
  * Takes precedence over include patterns.
226
228
  *
227
229
  * @example ['/docs/legacy/**']
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,6FAA6F;IAC7F,Q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U;IACzB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxD,gDAAgD;IAChD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvD,mDAAmD;IACnD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,kDAAkD;IAClD,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stati/core",
3
- "version": "1.29.0",
3
+ "version": "1.29.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",