mikser-io 9.61.0 → 9.61.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/CLAUDE.md +5 -0
- package/package.json +1 -1
- package/src/database/index.js +3 -3
- package/src/plugins/render/file.js +17 -6
- package/src/source.js +12 -0
package/CLAUDE.md
CHANGED
|
@@ -195,6 +195,11 @@ brevity.
|
|
|
195
195
|
over ids, not the matched paths, so a file appearing later still
|
|
196
196
|
invalidates. Paths resolve against `options.workingFolder` — the
|
|
197
197
|
render-time `runtime` is a per-render projection with no options on it.
|
|
198
|
+
The "this file has no entity" warning reads `options.sourceFolders` —
|
|
199
|
+
the set useSource records as it registers each collection — NOT a list
|
|
200
|
+
of folder names written in the plugin. A hardcoded list misses every
|
|
201
|
+
collection a project registers through `sources()`, which produced 63
|
|
202
|
+
false warnings per build on a real site.
|
|
198
203
|
- `render.js` / `postprocess.js` — Piscina worker entry points AND the
|
|
199
204
|
default-export functions the INLINE/SERIAL dispatcher calls directly.
|
|
200
205
|
Each receives entity + options + config + state; the WORKER path also
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikser-io",
|
|
3
|
-
"version": "9.61.
|
|
3
|
+
"version": "9.61.1",
|
|
4
4
|
"description": "A mixer for content: entities in, configurable render pipelines, outputs of any kind. Static sites are the canonical recipe, not the definition — the same engine renders PDFs, emails and whatever a renderer plugin produces. Files are the source of truth, every lifecycle phase is observable, and the build graph is queryable by an agent.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
package/src/database/index.js
CHANGED
|
@@ -331,9 +331,9 @@ export function createSqliteDatabase({
|
|
|
331
331
|
configChanged ? 'config' : 'schema version')
|
|
332
332
|
} else if (configChanged && !(recorded && recorded !== version)) {
|
|
333
333
|
logger?.warn(
|
|
334
|
-
'Config changed since the last run. Wiping the cache and rebuilding from sources '
|
|
335
|
-
'(files are the source of truth — no source data is affected).
|
|
336
|
-
'
|
|
334
|
+
'Config changed since the last run. Wiping the cache and rebuilding from sources '
|
|
335
|
+
+ '(files are the source of truth — no source data is affected). The stamp covers %s and '
|
|
336
|
+
+ 'every local module it imports; `--json` reports exactly which files under `config.files`.',
|
|
337
337
|
runtime.options.config,
|
|
338
338
|
)
|
|
339
339
|
}
|
|
@@ -67,16 +67,27 @@ function entityIdFor(workingFolder, resolved) {
|
|
|
67
67
|
// nothing to track" read identically from a template. Said once per path.
|
|
68
68
|
const warnedOutside = new Set()
|
|
69
69
|
function warnIfUntrackable(options, resolved, logger) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
// Every folder whose files become entities, as recorded by useSource when
|
|
71
|
+
// it registered them — NOT a list written here.
|
|
72
|
+
//
|
|
73
|
+
// The first version of this hardcoded five content folders, and a project
|
|
74
|
+
// registering its own collections through sources() has more than five. On
|
|
75
|
+
// lmed that meant 63 warnings per build, one for every stylesheet and
|
|
76
|
+
// script, all of them tracked correctly and every one of them saying the
|
|
77
|
+
// opposite. Which is worse than not warning: 63 spurious lines a build
|
|
78
|
+
// teaches you to filter the channel, and the filtered-out line is the real
|
|
79
|
+
// one.
|
|
80
|
+
const folders = Object.values(options?.sourceFolders ?? {})
|
|
81
|
+
// Nothing registered yet means nothing can be concluded. Silence is the
|
|
82
|
+
// only honest answer — the previous shape guessed instead.
|
|
83
|
+
if (!folders.length) return
|
|
73
84
|
if (folders.some(folder => !path.relative(folder, resolved).startsWith('..'))) return
|
|
74
85
|
if (warnedOutside.has(resolved)) return
|
|
75
86
|
warnedOutside.add(resolved)
|
|
76
87
|
logger?.warn?.({ code: 'untracked-file-read' },
|
|
77
|
-
'A template read %s, which is outside every
|
|
78
|
-
+ 'and changing it will NOT rebuild the pages that read it.
|
|
79
|
-
+ 'matters, or pass { track: false } to say the staleness is intended.', resolved)
|
|
88
|
+
'A template read %s, which is outside every folder mikser takes entities from — so it has no entity, '
|
|
89
|
+
+ 'nothing watches it, and changing it will NOT rebuild the pages that read it. Register the folder '
|
|
90
|
+
+ 'with sources() if that matters, or pass { track: false } to say the staleness is intended.', resolved)
|
|
80
91
|
}
|
|
81
92
|
|
|
82
93
|
export function load({ runtime, options, track, logger }) {
|
package/src/source.js
CHANGED
|
@@ -328,6 +328,18 @@ export function useSource(core, options) {
|
|
|
328
328
|
? folder
|
|
329
329
|
: path.join(runtime.options.workingFolder, folder)
|
|
330
330
|
runtime.options[`${collection}Folder`] = absFolder
|
|
331
|
+
// The authoritative set of folders whose files become entities.
|
|
332
|
+
//
|
|
333
|
+
// `<collection>Folder` above is the per-collection accessor and reads
|
|
334
|
+
// like one; this is the LIST, which is a different question and the
|
|
335
|
+
// one anything asking "could a file here be tracked?" needs. Deriving
|
|
336
|
+
// it by scanning options for a `*Folder` suffix would sweep up
|
|
337
|
+
// workingFolder, runtimeFolder and outputFolder, and hand-listing the
|
|
338
|
+
// content ones misses every collection a project registers itself —
|
|
339
|
+
// which is exactly how the file helpers came to warn 63 times a build
|
|
340
|
+
// about files they were tracking correctly.
|
|
341
|
+
runtime.options.sourceFolders ??= {}
|
|
342
|
+
runtime.options.sourceFolders[collection] = absFolder
|
|
331
343
|
logger.debug('%s folder: %s', cap, absFolder)
|
|
332
344
|
|
|
333
345
|
await mkdir(absFolder, { recursive: true })
|