kempo-server 3.0.1 → 3.0.3
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/CHANGELOG.md +43 -0
- package/docs/caching.html +1 -0
- package/docs/cli-utils.html +1 -0
- package/docs/configuration.html +1 -0
- package/docs/examples.html +1 -0
- package/docs/fs-utils.html +1 -0
- package/docs/getting-started.html +1 -0
- package/docs/index.html +8 -2
- package/docs/middleware.html +1 -0
- package/docs/request-response.html +1 -0
- package/docs/routing.html +1 -0
- package/docs/templating.html +3 -2
- package/docs-src/default.template.html +1 -0
- package/docs-src/index.page.html +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `kempo-server` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.0.0] - 2026-04-09
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- **Config file format changed from `.config.json` to `.config.js`.** The server now looks for `.config.js` (ES module with a default export) by default, with `.config.json` as a fallback.
|
|
10
|
+
- **Templating file extensions are now disallowed from being served.** Files ending in `.template.html`, `.fragment.html`, and `.page.html` are blocked by default via `disallowedRegex`.
|
|
11
|
+
- **`.config` disallowed pattern replaced** with more specific `.config.js` and `.config.json` patterns.
|
|
12
|
+
|
|
13
|
+
**Migration:**
|
|
14
|
+
```javascript
|
|
15
|
+
// Before (.config.json)
|
|
16
|
+
{ "port": 3000 }
|
|
17
|
+
|
|
18
|
+
// After (.config.js)
|
|
19
|
+
export default { port: 3000 };
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Templating system** with support for templates (`.template.html`), pages (`.page.html`), and fragments (`.fragment.html`). Includes slot-based composition, nested fragment inclusion, and variable interpolation.
|
|
25
|
+
- `templating` config section with `preRender`, `ssr`, `ssrPriority`, `globals`, `state`, and `maxFragmentDepth` options.
|
|
26
|
+
- `kempo-server-render` CLI command for pre-rendering templated pages.
|
|
27
|
+
- `kempo-server/templating` module export.
|
|
28
|
+
- Wildcard route patterns now normalize leading slashes for consistent matching.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [2.2.0] - 2026-04-08
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- `rescan` utility module (`kempo-server/rescan`) that exposes a programmatic API to trigger file rescans. Provides `onRescan` for listening and a default export function that returns a promise resolving with the new file count.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## [2.1.1] - 2026-04-05
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- Dynamic custom routes with `[param]` directory segments now resolve correctly. A new `walkDynamic` traversal walks the directory tree matching literal and `[param]` directories, passing extracted params through to route handlers.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
5
48
|
## [2.1.0] - 2026-04-05
|
|
6
49
|
|
|
7
50
|
### Added
|
package/docs/caching.html
CHANGED
package/docs/cli-utils.html
CHANGED
package/docs/configuration.html
CHANGED
package/docs/examples.html
CHANGED
package/docs/fs-utils.html
CHANGED
package/docs/index.html
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
<h1 class="ta-center">Kempo Server</h1>
|
|
99
99
|
|
|
100
100
|
<div class="ta-center">
|
|
101
|
-
<p
|
|
101
|
+
<p>
|
|
102
102
|
<a
|
|
103
103
|
href="https://github.com/dustinpoissant/kempo-server"
|
|
104
104
|
class="btn primary mr"
|
|
@@ -110,8 +110,9 @@
|
|
|
110
110
|
target="_blank"
|
|
111
111
|
>NPM</a>
|
|
112
112
|
</p>
|
|
113
|
+
<p>A lightweight, zero-dependency, file based routing server.</p>
|
|
114
|
+
<p>Current Version: <code id="version">unknown</code></p>
|
|
113
115
|
</div>
|
|
114
|
-
<p>A lightweight, zero-dependency, file based routing server.</p>
|
|
115
116
|
|
|
116
117
|
<nav class="b r mb p">
|
|
117
118
|
<div class="row -mx">
|
|
@@ -179,5 +180,10 @@
|
|
|
179
180
|
type="module"
|
|
180
181
|
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
|
|
181
182
|
></script>
|
|
183
|
+
|
|
184
|
+
<script type="module">
|
|
185
|
+
document.getElementById('version').innerHTML = (await(await fetch('https://raw.githubusercontent.com/dustinpoissant/kempo-server/refs/heads/main/package.json')).json()).version;
|
|
186
|
+
</script>
|
|
187
|
+
|
|
182
188
|
</body>
|
|
183
189
|
</html>
|
package/docs/middleware.html
CHANGED
package/docs/routing.html
CHANGED
package/docs/templating.html
CHANGED
|
@@ -180,8 +180,8 @@
|
|
|
180
180
|
<tr><td><code>./</code></td><td>Relative path from the page to the root directory (e.g. <code>./</code>, <code>../</code>, <code>../../</code>)</td></tr>
|
|
181
181
|
<tr><td><code>2026</code></td><td>Current four-digit year</td></tr>
|
|
182
182
|
<tr><td><code>2026-04-09</code></td><td>Current date in ISO format (<code>YYYY-MM-DD</code>)</td></tr>
|
|
183
|
-
<tr><td><code>2026-04-09T19:
|
|
184
|
-
<tr><td><code>
|
|
183
|
+
<tr><td><code>2026-04-09T19:42:42.690Z</code></td><td>Full ISO 8601 datetime string</td></tr>
|
|
184
|
+
<tr><td><code>1775763762690</code></td><td>Unix timestamp in milliseconds</td></tr>
|
|
185
185
|
<tr><td><code></code></td><td>Version from the root <code>package.json</code></td></tr>
|
|
186
186
|
<tr><td><code></code></td><td>Value of <code>NODE_ENV</code></td></tr>
|
|
187
187
|
</tbody>
|
|
@@ -288,5 +288,6 @@
|
|
|
288
288
|
type="module"
|
|
289
289
|
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
|
|
290
290
|
></script>
|
|
291
|
+
|
|
291
292
|
</body>
|
|
292
293
|
</html>
|
package/docs-src/index.page.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<page pageName="Kempo Server" title="Kempo Server">
|
|
2
2
|
<content>
|
|
3
3
|
<div class="ta-center">
|
|
4
|
-
<p
|
|
4
|
+
<p>
|
|
5
5
|
<a
|
|
6
6
|
href="https://github.com/dustinpoissant/kempo-server"
|
|
7
7
|
class="btn primary mr"
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
target="_blank"
|
|
14
14
|
>NPM</a>
|
|
15
15
|
</p>
|
|
16
|
+
<p>A lightweight, zero-dependency, file based routing server.</p>
|
|
17
|
+
<p>Current Version: <code id="version">unknown</code></p>
|
|
16
18
|
</div>
|
|
17
|
-
<p>A lightweight, zero-dependency, file based routing server.</p>
|
|
18
19
|
|
|
19
20
|
<nav class="b r mb p">
|
|
20
21
|
<div class="row -mx">
|
|
@@ -76,4 +77,9 @@
|
|
|
76
77
|
</div>
|
|
77
78
|
</div>
|
|
78
79
|
</content>
|
|
80
|
+
<content location="scripts">
|
|
81
|
+
<script type="module">
|
|
82
|
+
document.getElementById('version').innerHTML = (await(await fetch('https://raw.githubusercontent.com/dustinpoissant/kempo-server/refs/heads/main/package.json')).json()).version;
|
|
83
|
+
</script>
|
|
84
|
+
</content>
|
|
79
85
|
</page>
|