diffwiki-core 0.5.0-rc.202607230246.a14e916 → 0.5.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/{chunk-GVSRD5WB.js → chunk-AZ6SZH6P.js} +1 -17
- package/dist/{events-XSIUMRBG.js → events-H3D7FT4O.js} +1 -1
- package/dist/index.cjs +377 -664
- package/dist/index.d.cts +9 -147
- package/dist/index.d.ts +9 -147
- package/dist/index.js +331 -528
- package/package.json +1 -6
- package/dist/bm25.cjs +0 -85
- package/dist/bm25.d.cts +0 -48
- package/dist/bm25.d.ts +0 -48
- package/dist/bm25.js +0 -8
- package/dist/chunk-FTUF6IXS.js +0 -60
|
@@ -96,21 +96,11 @@ var InvalidTargetError = class extends DiffwikiError {
|
|
|
96
96
|
};
|
|
97
97
|
var PluginError = class extends DiffwikiError {
|
|
98
98
|
};
|
|
99
|
-
var WorktreeNotAllowedError = class extends DiffwikiError {
|
|
100
|
-
constructor(root) {
|
|
101
|
-
super(`refusing to add a linked worktree \u2014 add the source repository instead (${root})`);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
var CollectionAlreadyAddedError = class extends DiffwikiError {
|
|
105
|
-
constructor(name) {
|
|
106
|
-
super(`this repository is already added as collection "${name}"`);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
99
|
|
|
110
100
|
// src/collections.ts
|
|
111
101
|
async function fireHook(event, collection) {
|
|
112
102
|
try {
|
|
113
|
-
const { emitPluginEvent: emitPluginEvent2 } = await import("./events-
|
|
103
|
+
const { emitPluginEvent: emitPluginEvent2 } = await import("./events-H3D7FT4O.js");
|
|
114
104
|
await emitPluginEvent2(event, collection);
|
|
115
105
|
} catch {
|
|
116
106
|
}
|
|
@@ -121,9 +111,6 @@ async function listCollections() {
|
|
|
121
111
|
async function findCollection(name) {
|
|
122
112
|
return (await readRegistry()).collections.find((c) => c.name === name);
|
|
123
113
|
}
|
|
124
|
-
async function findCollectionById(id) {
|
|
125
|
-
return (await readRegistry()).collections.find((c) => c.id === id);
|
|
126
|
-
}
|
|
127
114
|
async function createCollection(name) {
|
|
128
115
|
if (await findCollection(name)) throw new CollectionExistsError(name);
|
|
129
116
|
const dir = collectionDir(name);
|
|
@@ -465,8 +452,6 @@ export {
|
|
|
465
452
|
ArticleNotFoundError,
|
|
466
453
|
InvalidTargetError,
|
|
467
454
|
PluginError,
|
|
468
|
-
WorktreeNotAllowedError,
|
|
469
|
-
CollectionAlreadyAddedError,
|
|
470
455
|
resolveHome,
|
|
471
456
|
registryPath,
|
|
472
457
|
configPath,
|
|
@@ -494,7 +479,6 @@ export {
|
|
|
494
479
|
emitPluginEvent,
|
|
495
480
|
listCollections,
|
|
496
481
|
findCollection,
|
|
497
|
-
findCollectionById,
|
|
498
482
|
createCollection,
|
|
499
483
|
removeCollection
|
|
500
484
|
};
|