mikser-io 6.21.2 → 6.21.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/README.md +55 -15
- package/package.json +3 -2
- package/src/plugins/post/pdf.js +8 -1
package/README.md
CHANGED
|
@@ -2,23 +2,43 @@
|
|
|
2
2
|
<img src="mikser-lockup-stacked.svg" alt="mikser" width="198" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
# Mikser
|
|
5
|
+
# Mikser
|
|
6
6
|
|
|
7
|
-
Mikser is a
|
|
7
|
+
Mikser is a content engine for Node.js built around a strict lifecycle, a composable plugin system, and direct control over every output. Every document, asset, and template flows through the same deterministic pipeline. Plugins hook in at any phase; nothing runs outside the cycle. It scales from a single markdown blog to a multi-language, multi-format publishing platform — and stays predictable in both directions.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Why mikser
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
**Your content stays yours.** Source files live on disk as `.md`, `.yml`, `.html` with YAML front-matter. The build output is plain static files. No database lock-in, no proprietary export format. The whole content tree is copyable, diffable, and version-controllable with git — your site is portable on day one and on year ten.
|
|
12
|
+
|
|
13
|
+
**Incremental builds that scale.** Mikser tracks every entity in a journal. When a file changes, only the affected entities re-process — not the whole site graph. On 10k+ documents this dramatically outpaces tools that rebuild more on every change.
|
|
14
|
+
|
|
15
|
+
**Concurrent rendering.** Renders fan out across a worker pool that keeps every CPU core hot. Multi-format outputs (HTML, PDF, MJML email, etc.) generate in parallel from the same source.
|
|
16
|
+
|
|
17
|
+
**One lifecycle, everything composes.** Plugins hook into 20+ named lifecycle phases. A search-indexing plugin shares the same journal iteration as a CMS plugin and an email-rendering plugin — no glue code, no orchestration layer.
|
|
18
|
+
|
|
19
|
+
**Run anywhere.** The same CLI handles one-shot builds, watch-mode dev loops, and a long-running HTTP server with a shared Express app. `npx mikser` ships a static site; `mikser --watch` is the dev loop; `mikser --server` exposes a live admin/API.
|
|
20
|
+
|
|
21
|
+
**Library mode.** Mikser is also a library. `useRenderer`, `useCollection`, `findSimilar`, and direct lifecycle hooks let you embed the engine inside an existing Node app instead of running it as a CLI.
|
|
22
|
+
|
|
23
|
+
**Open source.** MIT-licensed, on GitHub, no telemetry, no auth wall, no SaaS dependency. What you see is what runs.
|
|
24
|
+
|
|
25
|
+
## Plugin ecosystem
|
|
26
|
+
|
|
27
|
+
Plugins are independent npm packages — install only what a project actually uses.
|
|
28
|
+
|
|
29
|
+
| Plugin | What it does |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `documents`, `files`, `resources`, `assets` | Content sources |
|
|
32
|
+
| `layouts` | Layout resolution with auto-matching |
|
|
33
|
+
| `render-hbs`, `render-eta`, `render-liquid`, `render-markdown` | Template engines |
|
|
34
|
+
| `render-resource`, `render-asset`, `render-href` | Resource / asset / link rewriting at render time |
|
|
35
|
+
| `post-pdf` | HTML → PDF via headless Chromium |
|
|
36
|
+
| `post-mjml` | MJML email markup → inbox-safe HTML |
|
|
37
|
+
| `data` | JSON snapshots of entities / context / catalog over HTTP |
|
|
38
|
+
| `api` | REST endpoints — list / get / create / update / delete / render |
|
|
39
|
+
| `vector` | OpenAI embeddings + semantic search (sqlite-vec or pgvector) |
|
|
40
|
+
| `decap` | [Decap CMS](https://decapcms.org/) mounted in the same process |
|
|
41
|
+
| `archive`, `mapper`, `live`, `aml` | Specialty integrations |
|
|
22
42
|
|
|
23
43
|
## Quick Start
|
|
24
44
|
|
|
@@ -37,7 +57,9 @@ export default {
|
|
|
37
57
|
```
|
|
38
58
|
|
|
39
59
|
```bash
|
|
40
|
-
npx mikser
|
|
60
|
+
npx mikser # one-shot build
|
|
61
|
+
npx mikser --watch # incremental dev loop
|
|
62
|
+
npx mikser --server # build + serve at :3001
|
|
41
63
|
```
|
|
42
64
|
|
|
43
65
|
## Core Concepts
|
|
@@ -47,3 +69,21 @@ npx mikser
|
|
|
47
69
|
- **Plugins** — Functionality is delivered via plugins. Built-in plugins handle common sources (documents, files, layouts, assets). Custom plugins can be added to any project.
|
|
48
70
|
- **Runtime Singleton** — A plain module-level object holds all global state and coordinates the lifecycle. The ES module cache guarantees every importer gets the same instance.
|
|
49
71
|
- **Watch Mode** — In watch mode, file changes trigger incremental re-processing without restarting.
|
|
72
|
+
|
|
73
|
+
## Documentation Index
|
|
74
|
+
|
|
75
|
+
| Document | Audience | Description |
|
|
76
|
+
| ----------------------------------------------------- | ------------------ | -------------------------------------------------- |
|
|
77
|
+
| [Getting Started](./documentation/getting-started.md) | Users | Installation, first project, basic usage |
|
|
78
|
+
| [Configuration](./documentation/configuration.md) | Users | All CLI options and config file reference |
|
|
79
|
+
| [Lifecycle](./documentation/lifecycle.md) | Users & Developers | Complete lifecycle phases and hook system |
|
|
80
|
+
| [Plugins](./documentation/plugins.md) | Users & Developers | Built-in plugins, writing custom plugins |
|
|
81
|
+
| [Entities](./documentation/entities.md) | Users & Developers | Entity model, operations, journal, catalog |
|
|
82
|
+
| [Rendering](./documentation/rendering.md) | Users & Developers | Render pipeline, render plugins, render modes |
|
|
83
|
+
| [Watch Mode](./documentation/watch-mode.md) | Users | File watching, scheduled tasks, incremental builds |
|
|
84
|
+
| [Architecture](./documentation/architecture.md) | Developers | System design, module structure, extension points |
|
|
85
|
+
| [API Reference](./documentation/api-reference.md) | Developers | Complete public API reference |
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT — see [LICENSE](./LICENSE).
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikser-io",
|
|
3
|
-
"version": "6.21.
|
|
3
|
+
"version": "6.21.3",
|
|
4
4
|
"description": "<p align=\"center\"> <img src=\"mikser-lockup-stacked.svg\" alt=\"mikser\" width=\"198\" /> </p>",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"debug": "node --no-warnings app.js --debug --working-folder test/fixture",
|
|
7
|
+
"debug": "node --no-warnings app.js --debug --server --watch --working-folder test/fixture",
|
|
8
8
|
"test:unit": "node --test --test-reporter=spec 'test/unit/**/*.test.js'",
|
|
9
9
|
"test:smoke": "node --no-warnings app.js --working-folder test/fixture",
|
|
10
10
|
"test": "npm run test:unit && npm run test:smoke"
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"fluent-ffmpeg": "^2.1.3",
|
|
59
|
+
"mikser-io-decap": "file:../mikser-io-decap",
|
|
59
60
|
"mikser-io-post-mjml": "file:../mikser-io-post-mjml",
|
|
60
61
|
"mikser-io-render-eta": "file:../mikser-io-render-eta",
|
|
61
62
|
"mikser-io-render-liquid": "file:../mikser-io-render-liquid",
|
package/src/plugins/post/pdf.js
CHANGED
|
@@ -16,9 +16,16 @@ export async function setup({ config, logger }) {
|
|
|
16
16
|
const { default: puppeteer } = await import('puppeteer').catch(() => {
|
|
17
17
|
throw new Error('Puppeteer is required for the pdf postprocessor — run: npm install puppeteer')
|
|
18
18
|
})
|
|
19
|
+
// --no-sandbox / --disable-setuid-sandbox are required on most
|
|
20
|
+
// headless Linux servers and Docker images where Chrome's sandbox
|
|
21
|
+
// can't be set up. Applied by default and merged (deduped) with any
|
|
22
|
+
// user-supplied launch.args so callers can add flags without losing
|
|
23
|
+
// these. To run WITH the sandbox, override launch.args explicitly.
|
|
24
|
+
const defaultArgs = ['--no-sandbox', '--disable-setuid-sandbox']
|
|
19
25
|
browser = await puppeteer.launch({
|
|
20
26
|
headless: true,
|
|
21
|
-
...config?.launch
|
|
27
|
+
...config?.launch,
|
|
28
|
+
args: [...new Set([...defaultArgs, ...(config?.launch?.args ?? [])])],
|
|
22
29
|
})
|
|
23
30
|
logger.debug('Puppeteer browser launched')
|
|
24
31
|
}
|