@mulmoclaude/core 6.0.0 → 7.0.0
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/index.cjs +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/registry/server/index.cjs +7 -7
- package/dist/collection/registry/server/index.js +7 -7
- package/dist/collection/server/index.cjs +2 -2
- package/dist/collection/server/index.js +2 -2
- package/dist/collection-watchers/index.cjs +3 -3
- package/dist/collection-watchers/index.js +3 -3
- package/dist/{discovery-CYIV1J5l.cjs → discovery-BkCeYBf6.cjs} +26 -14
- package/dist/discovery-BkCeYBf6.cjs.map +1 -0
- package/dist/{discovery-duLlygnJ.js → discovery-DR4GNqrp.js} +26 -14
- package/dist/discovery-DR4GNqrp.js.map +1 -0
- package/dist/dist-734JaRYi.cjs.map +1 -1
- package/dist/dist-BmO4oSQy.js.map +1 -1
- package/dist/feeds/server/index.cjs +5 -5
- package/dist/feeds/server/index.js +5 -5
- package/dist/files/index.cjs +7 -31
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +3 -27
- package/dist/files/index.js.map +1 -1
- package/dist/google/index.cjs +4 -4
- package/dist/google/index.js +4 -4
- package/dist/plugin-vue/index.cjs +181 -267
- package/dist/plugin-vue/index.cjs.map +1 -1
- package/dist/plugin-vue/index.js +181 -267
- package/dist/plugin-vue/index.js.map +1 -1
- package/dist/remote-host/server/index.cjs +1 -1
- package/dist/remote-host/server/index.js +1 -1
- package/dist/safe-D79sHxq1.cjs +43 -0
- package/dist/safe-D79sHxq1.cjs.map +1 -0
- package/dist/safe-DRNa8UBp.js +30 -0
- package/dist/safe-DRNa8UBp.js.map +1 -0
- package/dist/{server-ByKWGQn2.cjs → server-CnCUBmSn.cjs} +6 -6
- package/dist/{server-ByKWGQn2.cjs.map → server-CnCUBmSn.cjs.map} +1 -1
- package/dist/{server-CA-alqqN.js → server-Dp5KWarO.js} +6 -6
- package/dist/{server-CA-alqqN.js.map → server-Dp5KWarO.js.map} +1 -1
- package/dist/whisper/index.cjs +1 -1
- package/dist/whisper/index.js +1 -1
- package/dist/wiki/index.cjs +1 -1
- package/dist/wiki/index.js +1 -1
- package/dist/wiki/server/fs.d.ts +7 -2
- package/dist/wiki/server/index.cjs +106 -36
- package/dist/wiki/server/index.cjs.map +1 -1
- package/dist/wiki/server/index.js +108 -38
- package/dist/wiki/server/index.js.map +1 -1
- package/dist/wiki/server/locations.d.ts +10 -0
- package/dist/workspace-setup/index.js.map +1 -1
- package/package.json +10 -10
- package/dist/discovery-CYIV1J5l.cjs.map +0 -1
- package/dist/discovery-duLlygnJ.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-734JaRYi.cjs");
|
|
3
2
|
const require_itemId = require("../itemId-D2XAQ8RU.cjs");
|
|
4
3
|
const require_promptSafety = require("../promptSafety-CjxafW2b.cjs");
|
|
5
4
|
const require_project = require("../project-DDTIVEMU.cjs");
|
|
5
|
+
const require_dist = require("../dist-734JaRYi.cjs");
|
|
6
6
|
const require_iconGlyph = require("../iconGlyph-CFOiFsmq.cjs");
|
|
7
7
|
require("../errorMessage-D0kR547_.cjs");
|
|
8
8
|
// src/collection/core/presentCollection.ts
|
package/dist/collection/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as isRecord, t as errorMessage, u as isUnknownArray } from "../dist-BmO4oSQy.js";
|
|
2
1
|
import { $ as fieldText, A as collectionKeyId, B as SAFE_SLUG_PATTERN, C as decodeRecordTimes, D as isCanonicalServerTime, E as encodeServerTime, F as localCollectionKeyOf, G as AGENT_INGEST_KIND, H as isSafeRecordId, I as parseCollectionKeyId, J as INGEST_KINDS, K as COMPUTED_TYPES, L as sameCollectionKey, M as isLocalCollectionKey, N as isSharedCollectionKey, O as serverTimeMillis, P as isValidCollectionName, Q as storageKindFor, R as sharedCollectionKey, S as isAccentColor, T as encodeRecordTimes, U as isSafeSlug, V as generateUniqueId, W as nextUniqueItemId, X as isFieldDrivenEvery, Y as embedTargetId, Z as isReadOnlySchema, _ as spanOptionsFor, a as bucketRecords, b as ACCENT_COLORS, c as dateOf, d as monthAnchorDate, et as fieldTextOrNull, f as parseIsoDate, g as spanCoversDay, h as recordSpan, i as assignLanes, j as collectionKeyName, k as serverTimeOf, l as daySlice, m as parseTimeRange, n as shortHexId, o as buildMonthGrid, p as parseIsoDateTime, q as FEED_SCHEDULES, r as MINUTES_PER_DAY, s as compareYmd, t as newItemId, u as endsAtDayBoundary, v as withExclusiveEnd, w as decodeServerTime, x as accentChipClasses, y as ymdKey, z as SAFE_RECORD_ID_PATTERN } from "../itemId-D_pSpa3U.js";
|
|
3
2
|
import { A as schemaDefaults, C as viaMatches, D as whenMatches, E as fieldVisible, O as fieldDefaultValue, S as rollupValue, T as agentActionRunKey, _ as uniqueEmbedTargets, a as evaluateDerived, b as coerceNumeric, c as selectDynamicRecord, d as flagFieldValue, f as itemIsDone, g as uniqueBacklinkSources, h as linkedSlugsForFields, k as firstUnknownDefault, l as chipMatches, m as matchesWhere, n as deriveAll, o as firstDateField, p as toggleChecked, r as resolveRowRefs, s as resolveIcon, t as defangForPrompt, u as completionCoveredByFieldChip, v as uniqueRefTargets, w as actionVisible, x as projectBacklinkRow, y as backlinkRows } from "../promptSafety-B8LECAkY.js";
|
|
4
3
|
import { n as projectRecordFields, t as mergeIntoExisting } from "../project-mU6-xLfy.js";
|
|
4
|
+
import { c as isRecord, t as errorMessage, u as isUnknownArray } from "../dist-BmO4oSQy.js";
|
|
5
5
|
import { n as resolveIconGlyph, t as DEFAULT_ICON } from "../iconGlyph-D9h__VaM.js";
|
|
6
6
|
import "../errorMessage-TpKxrmeo.js";
|
|
7
7
|
// src/collection/core/presentCollection.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../../../rolldown-runtime-CmQyd0Gu.cjs");
|
|
3
|
-
const require_dist = require("../../../dist-734JaRYi.cjs");
|
|
4
|
-
const require_root = require("../../../root-9lRFeXbm.cjs");
|
|
5
|
-
const require_relPath = require("../../../relPath-CZiP2S_a.cjs");
|
|
6
3
|
const require_utils_fetch = require("../../../utils/fetch.cjs");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const require_server = require("../../../server-ByKWGQn2.cjs");
|
|
10
|
-
const require_skill_bridge_index = require("../../../skill-bridge/index.cjs");
|
|
4
|
+
const require_server = require("../../../server-CnCUBmSn.cjs");
|
|
5
|
+
const require_discovery = require("../../../discovery-BkCeYBf6.cjs");
|
|
11
6
|
const require_types = require("../../../types-DPycxnDf.cjs");
|
|
7
|
+
const require_skill_bridge_index = require("../../../skill-bridge/index.cjs");
|
|
8
|
+
const require_templatePath = require("../../../templatePath-BIh7wqgS.cjs");
|
|
9
|
+
const require_root = require("../../../root-9lRFeXbm.cjs");
|
|
10
|
+
const require_dist = require("../../../dist-734JaRYi.cjs");
|
|
11
|
+
const require_relPath = require("../../../relPath-CZiP2S_a.cjs");
|
|
12
12
|
let node_fs = require("node:fs");
|
|
13
13
|
let node_path = require("node:path");
|
|
14
14
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as errorMessage, u as isUnknownArray } from "../../../dist-BmO4oSQy.js";
|
|
2
|
-
import { r as writeFileAtomic } from "../../../root-CqxPNSyK.js";
|
|
3
|
-
import { n as toPosixRelPath } from "../../../relPath-BkKmqiiF.js";
|
|
4
1
|
import { fetchWithTimeout } from "../../../utils/fetch.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { y as ONE_SECOND_MS } from "../../../server-CA-alqqN.js";
|
|
8
|
-
import { claudeSkillDir, dataSkillDir, mirrorSkillWrite } from "../../../skill-bridge/index.js";
|
|
2
|
+
import { y as ONE_SECOND_MS } from "../../../server-Dp5KWarO.js";
|
|
3
|
+
import { K as safeRecordId, et as collectionsRegistriesConfigPath, ht as skillsStagingDir, lt as projectSkillsDir, r as loadCollection, rt as getWorkspaceRoot, s as CollectionSchemaZ, st as log, t as acceptParsedSchema } from "../../../discovery-DR4GNqrp.js";
|
|
9
4
|
import { n as parseRegistryIndex, r as isRecord, t as OFFICIAL_REGISTRY_NAME } from "../../../types-BLCZTGW2.js";
|
|
5
|
+
import { claudeSkillDir, dataSkillDir, mirrorSkillWrite } from "../../../skill-bridge/index.js";
|
|
6
|
+
import { t as isSafeActionTemplatePath } from "../../../templatePath-CB3wtVpe.js";
|
|
7
|
+
import { r as writeFileAtomic } from "../../../root-CqxPNSyK.js";
|
|
8
|
+
import { t as errorMessage, u as isUnknownArray } from "../../../dist-BmO4oSQy.js";
|
|
9
|
+
import { n as toPosixRelPath } from "../../../relPath-BkKmqiiF.js";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { cp, mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_discovery = require("../../discovery-BkCeYBf6.cjs");
|
|
2
3
|
const require_root = require("../../root-9lRFeXbm.cjs");
|
|
3
4
|
const require_itemId = require("../../itemId-D2XAQ8RU.cjs");
|
|
4
|
-
const require_discovery = require("../../discovery-CYIV1J5l.cjs");
|
|
5
5
|
const require_templatePath = require("../../templatePath-BIh7wqgS.cjs");
|
|
6
|
-
const require_server = require("../../server-
|
|
6
|
+
const require_server = require("../../server-CnCUBmSn.cjs");
|
|
7
7
|
exports.APP_MANIFEST_FILE = require_discovery.APP_MANIFEST_FILE;
|
|
8
8
|
exports.BackendUnavailableError = require_discovery.BackendUnavailableError;
|
|
9
9
|
exports.COLLECTION_ROOT_REQUIRED = require_discovery.COLLECTION_ROOT_REQUIRED;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { $ as collectionChangePayload, A as readItem, B as SCHEMA_FILE, C as CollectionQueryZ, D as generateItemId, E as deleteItem, F as loadAppManifest, G as resolveTemplatePath, H as isUnderRealRoot, I as parseAppManifest, J as BackendUnavailableError, K as safeRecordId, L as sharedItemsPath, M as writeItem, N as APP_MANIFEST_FILE, O as isRegularFile, P as appManifestReason, Q as collectionChangeKey, R as pageFromFullRead, S as compileJsonlQuery, T as MAX_QUERY_ROWS, U as itemFilePath, V as isContainedInRoot, W as resolveDataDir, X as COLLECTION_ROOT_REQUIRED, Y as isBackendUnavailable, _ as dedupeByRecordId, a as toDetail, ct as peekWorkspaceRoot, d as storeFor, dt as setCollectionChangePublisher, ft as setFirestoreAccessor, g as decodeCsvRecordId, h as csvRowToItem, i as resolvePrimaryField, it as hostSupportsSharedCollections, j as resolveCreateItemId, k as listItems, l as collectionWritable, mt as sharedCollectionChangePayload, n as discoverCollections, nt as firestoreHandle, o as toSummary, ot as localCollectionKey, p as MAX_CSV_ROWS, pt as setSharedCollectionsSupport, q as safeSlugName, r as loadCollection, rt as getWorkspaceRoot, s as CollectionSchemaZ, st as log, t as acceptParsedSchema, tt as configureCollectionHost, u as readOnlyRefusal, ut as publishCollectionChange, v as encodeCsvRecordId, w as DEFAULT_QUERY_ROWS, x as compileCsvQuery, y as normalizeCsvValue, z as projectItemFields } from "../../discovery-DR4GNqrp.js";
|
|
1
2
|
import { t as canonicalRoot } from "../../root-CqxPNSyK.js";
|
|
2
3
|
import { K as COMPUTED_TYPES } from "../../itemId-D_pSpa3U.js";
|
|
3
|
-
import { $ as collectionChangePayload, A as readItem, B as SCHEMA_FILE, C as CollectionQueryZ, D as generateItemId, E as deleteItem, F as loadAppManifest, G as resolveTemplatePath, H as isUnderRealRoot, I as parseAppManifest, J as BackendUnavailableError, K as safeRecordId, L as sharedItemsPath, M as writeItem, N as APP_MANIFEST_FILE, O as isRegularFile, P as appManifestReason, Q as collectionChangeKey, R as pageFromFullRead, S as compileJsonlQuery, T as MAX_QUERY_ROWS, U as itemFilePath, V as isContainedInRoot, W as resolveDataDir, X as COLLECTION_ROOT_REQUIRED, Y as isBackendUnavailable, _ as dedupeByRecordId, a as toDetail, ct as peekWorkspaceRoot, d as storeFor, dt as setCollectionChangePublisher, ft as setFirestoreAccessor, g as decodeCsvRecordId, h as csvRowToItem, i as resolvePrimaryField, it as hostSupportsSharedCollections, j as resolveCreateItemId, k as listItems, l as collectionWritable, mt as sharedCollectionChangePayload, n as discoverCollections, nt as firestoreHandle, o as toSummary, ot as localCollectionKey, p as MAX_CSV_ROWS, pt as setSharedCollectionsSupport, q as safeSlugName, r as loadCollection, rt as getWorkspaceRoot, s as CollectionSchemaZ, st as log, t as acceptParsedSchema, tt as configureCollectionHost, u as readOnlyRefusal, ut as publishCollectionChange, v as encodeCsvRecordId, w as DEFAULT_QUERY_ROWS, x as compileCsvQuery, y as normalizeCsvValue, z as projectItemFields } from "../../discovery-duLlygnJ.js";
|
|
4
4
|
import { i as isSafeTemplatePath, n as isSafeCustomViewI18nPath, r as isSafeCustomViewPath, t as isSafeActionTemplatePath } from "../../templatePath-CB3wtVpe.js";
|
|
5
|
-
import { A as recordFieldProblem, B as stagedSkillDir, C as applyMutateAction, D as validateCollectionRecords, E as STORE_UNREADABLE, F as buildCollectionActionSeedPrompt, I as promptPathsFor, L as readCustomViewHtml, M as enrichItems, N as runQueryOverRows, O as validateRecordObject, P as buildActionSeedPrompt, R as readCustomViewI18n, S as schemaRelations, T as MAX_RECORD_ISSUES, _ as resolveEvery, a as MAX_UNSELECTIVE_ITEMS, b as computeCollectionIcon, c as deleteCollection, d as computeSuccessor, f as daysInMonth, g as parseCivil, h as maybeSpawnSuccessor, i as MAX_SCHEMA_ISSUES, j as runCollectionQuery, k as compileRecordZ, l as deleteCollectionRefusalMessage, m as isTriggerDue, n as MAX_PUT_ITEMS, o as makeManageCollectionTool, p as formatCivil, r as MAX_PUT_LINT, s as deleteCustomView, t as MAX_ITEMS_FILE_BYTES, u as advanceTriggerDate, v as successorId, w as firstMutateParamProblem, x as buildWorkspaceOntology, z as readSkillTemplate } from "../../server-
|
|
5
|
+
import { A as recordFieldProblem, B as stagedSkillDir, C as applyMutateAction, D as validateCollectionRecords, E as STORE_UNREADABLE, F as buildCollectionActionSeedPrompt, I as promptPathsFor, L as readCustomViewHtml, M as enrichItems, N as runQueryOverRows, O as validateRecordObject, P as buildActionSeedPrompt, R as readCustomViewI18n, S as schemaRelations, T as MAX_RECORD_ISSUES, _ as resolveEvery, a as MAX_UNSELECTIVE_ITEMS, b as computeCollectionIcon, c as deleteCollection, d as computeSuccessor, f as daysInMonth, g as parseCivil, h as maybeSpawnSuccessor, i as MAX_SCHEMA_ISSUES, j as runCollectionQuery, k as compileRecordZ, l as deleteCollectionRefusalMessage, m as isTriggerDue, n as MAX_PUT_ITEMS, o as makeManageCollectionTool, p as formatCivil, r as MAX_PUT_LINT, s as deleteCustomView, t as MAX_ITEMS_FILE_BYTES, u as advanceTriggerDate, v as successorId, w as firstMutateParamProblem, x as buildWorkspaceOntology, z as readSkillTemplate } from "../../server-Dp5KWarO.js";
|
|
6
6
|
export { APP_MANIFEST_FILE, BackendUnavailableError, COLLECTION_ROOT_REQUIRED, COMPUTED_TYPES, CollectionQueryZ, CollectionSchemaZ, DEFAULT_QUERY_ROWS, MAX_CSV_ROWS, MAX_ITEMS_FILE_BYTES, MAX_PUT_ITEMS, MAX_PUT_LINT, MAX_QUERY_ROWS, MAX_RECORD_ISSUES, MAX_SCHEMA_ISSUES, MAX_UNSELECTIVE_ITEMS, SCHEMA_FILE, STORE_UNREADABLE, acceptParsedSchema, advanceTriggerDate, appManifestReason, applyMutateAction, buildActionSeedPrompt, buildCollectionActionSeedPrompt, buildWorkspaceOntology, canonicalRoot, collectionChangeKey, collectionChangePayload, collectionWritable, compileCsvQuery, compileJsonlQuery, compileRecordZ, computeCollectionIcon, computeSuccessor, configureCollectionHost, csvRowToItem, daysInMonth, decodeCsvRecordId, dedupeByRecordId, deleteCollection, deleteCollectionRefusalMessage, deleteCustomView, deleteItem, discoverCollections, encodeCsvRecordId, enrichItems, firestoreHandle, firstMutateParamProblem, formatCivil, generateItemId, getWorkspaceRoot, hostSupportsSharedCollections, isBackendUnavailable, isContainedInRoot, isRegularFile, isSafeActionTemplatePath, isSafeCustomViewI18nPath, isSafeCustomViewPath, isSafeTemplatePath, isTriggerDue, isUnderRealRoot, itemFilePath, listItems, loadAppManifest, loadCollection, localCollectionKey, log, makeManageCollectionTool, maybeSpawnSuccessor, normalizeCsvValue, pageFromFullRead, parseAppManifest, parseCivil, peekWorkspaceRoot, projectItemFields, promptPathsFor, publishCollectionChange, readCustomViewHtml, readCustomViewI18n, readItem, readOnlyRefusal, readSkillTemplate, recordFieldProblem, resolveCreateItemId, resolveDataDir, resolveEvery, resolvePrimaryField, resolveTemplatePath, runCollectionQuery, runQueryOverRows, safeRecordId, safeSlugName, schemaRelations, setCollectionChangePublisher, setFirestoreAccessor, setSharedCollectionsSupport, sharedCollectionChangePayload, sharedItemsPath, stagedSkillDir, storeFor, successorId, toDetail, toSummary, validateCollectionRecords, validateRecordObject, writeItem };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_discovery = require("../discovery-BkCeYBf6.cjs");
|
|
2
3
|
const require_root = require("../root-9lRFeXbm.cjs");
|
|
3
4
|
const require_itemId = require("../itemId-D2XAQ8RU.cjs");
|
|
4
5
|
const require_promptSafety = require("../promptSafety-CjxafW2b.cjs");
|
|
5
|
-
require("../collection/index.cjs");
|
|
6
|
-
const require_discovery = require("../discovery-CYIV1J5l.cjs");
|
|
7
|
-
const require_server = require("../server-ByKWGQn2.cjs");
|
|
8
6
|
const require_notifier = require("../notifier-CRTk34EC.cjs");
|
|
7
|
+
require("../collection/index.cjs");
|
|
8
|
+
const require_server = require("../server-CnCUBmSn.cjs");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
10
10
|
// src/collection-watchers/config.ts
|
|
11
11
|
var NOOP_LOG = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { $ as collectionChangePayload, U as itemFilePath, ct as peekWorkspaceRoot, d as storeFor, mt as sharedCollectionChangePayload, n as discoverCollections, nt as firestoreHandle, r as loadCollection, ut as publishCollectionChange } from "../discovery-DR4GNqrp.js";
|
|
1
2
|
import { t as canonicalRoot } from "../root-CqxPNSyK.js";
|
|
2
3
|
import { $ as fieldText, P as isValidCollectionName } from "../itemId-D_pSpa3U.js";
|
|
3
4
|
import { D as whenMatches, f as itemIsDone } from "../promptSafety-B8LECAkY.js";
|
|
4
|
-
import "../collection/index.js";
|
|
5
|
-
import { $ as collectionChangePayload, U as itemFilePath, ct as peekWorkspaceRoot, d as storeFor, mt as sharedCollectionChangePayload, n as discoverCollections, nt as firestoreHandle, r as loadCollection, ut as publishCollectionChange } from "../discovery-duLlygnJ.js";
|
|
6
|
-
import { h as maybeSpawnSuccessor, m as isTriggerDue } from "../server-CA-alqqN.js";
|
|
7
5
|
import { d as publish, m as updateForPlugin, n as clear, s as listAll } from "../notifier-htdf4ekH.js";
|
|
6
|
+
import "../collection/index.js";
|
|
7
|
+
import { h as maybeSpawnSuccessor, m as isTriggerDue } from "../server-Dp5KWarO.js";
|
|
8
8
|
import { access } from "node:fs/promises";
|
|
9
9
|
// src/collection-watchers/config.ts
|
|
10
10
|
var NOOP_LOG = {
|
|
@@ -14,6 +14,21 @@ let node_os = require("node:os");
|
|
|
14
14
|
let iconv_lite = require("iconv-lite");
|
|
15
15
|
iconv_lite = require_rolldown_runtime.__toESM(iconv_lite, 1);
|
|
16
16
|
let zod = require("zod");
|
|
17
|
+
// ../common/dist/concurrency.js
|
|
18
|
+
/** Run `worker` over `items` with at most `limit` in flight, preserving
|
|
19
|
+
* input order in the results. The call rejects with the first `worker`
|
|
20
|
+
* rejection, but the other runners keep draining the queue — make
|
|
21
|
+
* `worker` total (never throw) when every item must be attempted. */
|
|
22
|
+
async function mapWithConcurrency(items, limit, worker) {
|
|
23
|
+
const results = new Array(items.length);
|
|
24
|
+
const pending = items.entries();
|
|
25
|
+
const runnerCount = Math.min(Math.max(1, Math.floor(limit) || 1), items.length);
|
|
26
|
+
const runners = Array.from({ length: runnerCount }, async () => {
|
|
27
|
+
for (const [index, item] of pending) results[index] = await worker(item, index);
|
|
28
|
+
});
|
|
29
|
+
await Promise.all(runners);
|
|
30
|
+
return results;
|
|
31
|
+
}
|
|
17
32
|
// src/host/hostSlot.ts
|
|
18
33
|
function createHostSlot(name) {
|
|
19
34
|
let current = null;
|
|
@@ -798,6 +813,7 @@ function appManifestReason(failure, root) {
|
|
|
798
813
|
return `${manifestPath} ${failure.detail}`;
|
|
799
814
|
}
|
|
800
815
|
// src/collection/server/io.ts
|
|
816
|
+
var LIST_READ_CONCURRENCY = 64;
|
|
801
817
|
/** True iff `filePath` exists and is a regular file (NOT a symlink).
|
|
802
818
|
* Defends `listItems` / `readItem` against `*.json` symlinks placed
|
|
803
819
|
* inside an otherwise-contained data dir — without this, a record
|
|
@@ -850,19 +866,15 @@ async function listItems(dataDir, opts = {}) {
|
|
|
850
866
|
if (require_dist.isErrorWithCode(err) && err.code === "ENOENT") return [];
|
|
851
867
|
throw err;
|
|
852
868
|
}
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
}
|
|
863
|
-
results.push(record);
|
|
864
|
-
}
|
|
865
|
-
return results;
|
|
869
|
+
const filePaths = entries.filter(isRecordFileName).map((name) => node_path.default.join(dataDir, name));
|
|
870
|
+
return (await mapWithConcurrency(filePaths, LIST_READ_CONCURRENCY, tryReadRecord)).filter((record, index) => {
|
|
871
|
+
if (record !== null) return true;
|
|
872
|
+
log.warn("collections", "skipping record (missing, symlink, or unreadable)", { path: filePaths[index] });
|
|
873
|
+
return false;
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
function isRecordFileName(name) {
|
|
877
|
+
return name.endsWith(".json") && !name.startsWith(".");
|
|
866
878
|
}
|
|
867
879
|
/** Read one record by id. Returns null when the file is missing,
|
|
868
880
|
* when the resolved path escapes the workspace via a symlink, or
|
|
@@ -3781,4 +3793,4 @@ Object.defineProperty(exports, "writeItem", {
|
|
|
3781
3793
|
}
|
|
3782
3794
|
});
|
|
3783
3795
|
|
|
3784
|
-
//# sourceMappingURL=discovery-
|
|
3796
|
+
//# sourceMappingURL=discovery-BkCeYBf6.cjs.map
|