wiki-graph-sdk 0.8.4 → 0.9.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/archives.cjs +41 -19
- package/dist/archives.cjs.map +1 -1
- package/dist/archives.js +43 -19
- package/dist/archives.js.map +1 -1
- package/dist/conversions.cjs +3 -2
- package/dist/conversions.cjs.map +1 -1
- package/dist/conversions.js +3 -2
- package/dist/conversions.js.map +1 -1
- package/dist/default-worker.cjs +22 -9
- package/dist/default-worker.cjs.map +1 -1
- package/dist/default-worker.js +23 -9
- package/dist/default-worker.js.map +1 -1
- package/dist/index.cjs +116 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +121 -79
- package/dist/index.js.map +1 -1
- package/dist/maintenance.cjs +3 -2
- package/dist/maintenance.cjs.map +1 -1
- package/dist/maintenance.js +3 -2
- package/dist/maintenance.js.map +1 -1
- package/dist/worker.cjs +22 -9
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.js +23 -9
- package/dist/worker.js.map +1 -1
- package/package.json +2 -2
package/dist/default-worker.js
CHANGED
|
@@ -1689,11 +1689,12 @@ async function findMatchingMembers(libraries, candidate, candidateIdentity) {
|
|
|
1689
1689
|
...library.isDefault ? {} : { publicId: library.publicId }
|
|
1690
1690
|
});
|
|
1691
1691
|
for (const archive of archives) {
|
|
1692
|
-
|
|
1692
|
+
const physical = archive.file ?? archive.directory;
|
|
1693
|
+
if (physical === void 0) continue;
|
|
1693
1694
|
members.push({
|
|
1694
1695
|
archive,
|
|
1695
1696
|
library,
|
|
1696
|
-
memberPath: getNodeResourcePath(
|
|
1697
|
+
memberPath: getNodeResourcePath(physical)
|
|
1697
1698
|
});
|
|
1698
1699
|
}
|
|
1699
1700
|
}
|
|
@@ -1730,17 +1731,30 @@ async function readFileIdentity(path) {
|
|
|
1730
1731
|
// src/archive/write.ts
|
|
1731
1732
|
import {
|
|
1732
1733
|
WikiGraphArchiveFile,
|
|
1734
|
+
WikiGraphDirectoryFile,
|
|
1733
1735
|
writeWikiGraphLibraryArchive
|
|
1734
1736
|
} from "wiki-graph-core";
|
|
1735
1737
|
async function writeWikiGraphArchiveLocation(location, operation, options = {}) {
|
|
1736
1738
|
const cacheOnly = options.searchIndexWritebackPolicy === "cache";
|
|
1737
|
-
const write = async (archiveFile = location.archiveFile) =>
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
invalidateContinuationCursors:
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1739
|
+
const write = async (archiveFile = location.archiveFile) => {
|
|
1740
|
+
const writeOptions = {
|
|
1741
|
+
...cacheOnly ? {} : { derivedStateKeys: [location.archiveKey, location.archivePath] },
|
|
1742
|
+
...options.invalidateContinuationCursors === void 0 ? {} : {
|
|
1743
|
+
invalidateContinuationCursors: options.invalidateContinuationCursors
|
|
1744
|
+
},
|
|
1745
|
+
...options.searchIndexWritebackPolicy === void 0 ? {} : { searchIndexWritebackPolicy: options.searchIndexWritebackPolicy }
|
|
1746
|
+
};
|
|
1747
|
+
if (archiveFile.kind === "directory") {
|
|
1748
|
+
return await new WikiGraphDirectoryFile(archiveFile).write(
|
|
1749
|
+
operation,
|
|
1750
|
+
writeOptions
|
|
1751
|
+
);
|
|
1752
|
+
}
|
|
1753
|
+
return await new WikiGraphArchiveFile(archiveFile).write(
|
|
1754
|
+
operation,
|
|
1755
|
+
writeOptions
|
|
1756
|
+
);
|
|
1757
|
+
};
|
|
1744
1758
|
if (location.libraryArchiveTarget === void 0 || cacheOnly || options.refreshLibraryIndex === false) {
|
|
1745
1759
|
return await write();
|
|
1746
1760
|
}
|