@mulmoclaude/core 0.2.7 → 0.2.8
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/dist/collection/server/index.cjs +1 -1
- package/dist/collection/server/index.js +1 -1
- package/dist/collection-watchers/index.cjs +1 -1
- package/dist/collection-watchers/index.js +1 -1
- package/dist/feeds/server/index.cjs +40 -4
- package/dist/feeds/server/index.cjs.map +1 -1
- package/dist/feeds/server/index.d.ts +1 -0
- package/dist/feeds/server/index.js +38 -5
- package/dist/feeds/server/index.js.map +1 -1
- package/dist/feeds/server/scheduledRefresh.d.ts +21 -0
- package/dist/{server-q4WPXtbU.js → server-B2YkcCwl.js} +14 -22
- package/dist/{server-q4WPXtbU.js.map → server-B2YkcCwl.js.map} +1 -1
- package/dist/{server-Db-x7OXz.cjs → server-D27UzXug.cjs} +14 -22
- package/dist/{server-Db-x7OXz.cjs.map → server-D27UzXug.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -1503,29 +1503,21 @@ function deleteTargets(collection, workspaceRoot) {
|
|
|
1503
1503
|
];
|
|
1504
1504
|
}
|
|
1505
1505
|
/** The records directory the delete recursively archives + removes
|
|
1506
|
-
* (`collection.dataDir`) must live in this collection's OWN
|
|
1507
|
-
* subtree. `dataDir` is normally derived from
|
|
1508
|
-
* `deleteCollection` accepts a `LoadedCollection`
|
|
1509
|
-
* inconsistent — so we validate the RESOLVED
|
|
1510
|
-
* actually touch, not the schema string.
|
|
1511
|
-
* `
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1515
|
-
*
|
|
1516
|
-
*
|
|
1517
|
-
* TWO acceptable per-slug subtrees:
|
|
1518
|
-
* - `data/<slug>/...` — the convention authored collections default to.
|
|
1519
|
-
* - `data/collections/<slug>/...` — what `normalizedDataPath` in the
|
|
1520
|
-
* registry-import path stamps onto every imported schema (so imported
|
|
1521
|
-
* collections never collide with `data/<slug>/`-shaped authored ones).
|
|
1522
|
-
* Both are equally per-collection and equally safe; a delete that targets
|
|
1523
|
-
* anything else (e.g. raw `data/`, `data/wiki/`, a sibling slug) is
|
|
1524
|
-
* refused. */
|
|
1506
|
+
* (`collection.dataDir`) must live in this collection's OWN
|
|
1507
|
+
* `data/<slug>/` subtree. `dataDir` is normally derived from
|
|
1508
|
+
* `schema.dataPath`, but `deleteCollection` accepts a `LoadedCollection`
|
|
1509
|
+
* whose fields could be inconsistent — so we validate the RESOLVED
|
|
1510
|
+
* target the destructive ops actually touch, not the schema string.
|
|
1511
|
+
* `resolveDataDir` only proves containment in the workspace; a shared
|
|
1512
|
+
* root like `data` or `data/skills` would otherwise turn the recursive
|
|
1513
|
+
* removal into a workspace-wide wipe whose archive captures only this
|
|
1514
|
+
* collection. `path.resolve` collapses any `..` before the prefix test
|
|
1515
|
+
* (symlink escapes are caught separately by the realpath containment
|
|
1516
|
+
* check in `deleteTargets`). */
|
|
1525
1517
|
function isDataDirSafe(dataDir, slug, workspaceRoot) {
|
|
1526
|
-
const
|
|
1518
|
+
const expectedRoot = node_path.default.resolve(workspaceRoot, "data", slug);
|
|
1527
1519
|
const resolved = node_path.default.resolve(dataDir);
|
|
1528
|
-
return
|
|
1520
|
+
return resolved === expectedRoot || resolved.startsWith(expectedRoot + node_path.default.sep);
|
|
1529
1521
|
}
|
|
1530
1522
|
function buildRestoreDoc(collection) {
|
|
1531
1523
|
const { slug, schema } = collection;
|
|
@@ -1990,4 +1982,4 @@ Object.defineProperty(exports, "writeItem", {
|
|
|
1990
1982
|
}
|
|
1991
1983
|
});
|
|
1992
1984
|
|
|
1993
|
-
//# sourceMappingURL=server-
|
|
1985
|
+
//# sourceMappingURL=server-D27UzXug.cjs.map
|