@wovin/core 0.1.4 → 0.1.6
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/applog.min.js +1 -1
- package/dist/{chunk-MGJYJPOD.min.js → chunk-4APURYN7.min.js} +2 -2
- package/dist/{chunk-S4ODHUJZ.min.js → chunk-AOM4CWTC.min.js} +25 -1
- package/dist/{chunk-S4ODHUJZ.min.js.map → chunk-AOM4CWTC.min.js.map} +1 -1
- package/dist/{chunk-YOTOHQPL.min.js → chunk-B6GB52LJ.min.js} +3 -3
- package/dist/{chunk-VL3EEL3J.min.js → chunk-BEFJYVDW.min.js} +2 -2
- package/dist/{chunk-3KCQUPCP.min.js → chunk-MDWDKXLU.min.js} +2 -2
- package/dist/{chunk-3KCQUPCP.min.js.map → chunk-MDWDKXLU.min.js.map} +1 -1
- package/dist/{chunk-ZE3FVUCH.min.js → chunk-PANN7XTE.min.js} +2 -2
- package/dist/index.min.js +8 -6
- package/dist/ipfs.min.js +4 -4
- package/dist/pubsub/pubsub-types.d.ts +1 -0
- package/dist/pubsub/pubsub-types.d.ts.map +1 -1
- package/dist/pubsub.min.js +4 -4
- package/dist/query.min.js +3 -3
- package/dist/thread/utils.d.ts +7 -1
- package/dist/thread/utils.d.ts.map +1 -1
- package/dist/thread/writeable.d.ts +6 -0
- package/dist/thread/writeable.d.ts.map +1 -1
- package/dist/thread.min.js +3 -1
- package/package.json +1 -1
- /package/dist/{chunk-MGJYJPOD.min.js.map → chunk-4APURYN7.min.js.map} +0 -0
- /package/dist/{chunk-YOTOHQPL.min.js.map → chunk-B6GB52LJ.min.js.map} +0 -0
- /package/dist/{chunk-VL3EEL3J.min.js.map → chunk-BEFJYVDW.min.js.map} +0 -0
- /package/dist/{chunk-ZE3FVUCH.min.js.map → chunk-PANN7XTE.min.js.map} +0 -0
package/dist/applog.min.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
areCidsEqual,
|
|
4
4
|
decode,
|
|
5
5
|
g
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AOM4CWTC.min.js";
|
|
7
7
|
|
|
8
8
|
// src/ipfs/fetch-snapshot-chain.ts
|
|
9
9
|
var { WARN, LOG, DEBUG, VERBOSE, ERROR } = g.setup(g.INFO);
|
|
@@ -67,4 +67,4 @@ function createMemoryBlockStore() {
|
|
|
67
67
|
export {
|
|
68
68
|
fetchSnapshotChainUntil
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-4APURYN7.min.js.map
|
|
@@ -10877,6 +10877,19 @@ var WriteableThread = class extends Thread {
|
|
|
10877
10877
|
DEBUG8(`[WriteableThread.insert] insertRaw completed`);
|
|
10878
10878
|
return result;
|
|
10879
10879
|
}
|
|
10880
|
+
/**
|
|
10881
|
+
* Insert only applogs not already in this thread.
|
|
10882
|
+
* @param byRef If true, compares by reference; if false, compares by CID (default)
|
|
10883
|
+
* @returns The applogs that were actually inserted
|
|
10884
|
+
*/
|
|
10885
|
+
insertMissing(appLogsToInsert, byRef = false) {
|
|
10886
|
+
const missing = appLogsToInsert.filter((log) => !this.hasApplog(log, byRef));
|
|
10887
|
+
if (missing.length === 0) {
|
|
10888
|
+
VERBOSE8(`[insertMissing] no missing applogs`);
|
|
10889
|
+
return [];
|
|
10890
|
+
}
|
|
10891
|
+
return this.insertRaw(missing) ?? [];
|
|
10892
|
+
}
|
|
10880
10893
|
/**
|
|
10881
10894
|
* @param appLogsToInsert It needs to be mutable because it will be sorted
|
|
10882
10895
|
* (and if you need to clone it, so do it when you need to) - this is weird as TS is slathering type safety onto ducks
|
|
@@ -11056,6 +11069,16 @@ function holdTillFirstWrite(thread, applogsToHold, opts) {
|
|
|
11056
11069
|
function getAgents(thread) {
|
|
11057
11070
|
return uniq_default(thread.map((l2) => l2.ag));
|
|
11058
11071
|
}
|
|
11072
|
+
var excludeApplogsContainedIn = (applogs, exclude) => {
|
|
11073
|
+
const excludeCids = exclude instanceof Set ? new Set([...exclude].map((c) => c.toString())) : exclude instanceof Thread ? new Set(exclude.applogsCids) : new Set(exclude.map((a) => a.cid));
|
|
11074
|
+
return applogs.filter((applog) => {
|
|
11075
|
+
if (!applog.cid) {
|
|
11076
|
+
ERROR9(`applog with missing CID`, applog);
|
|
11077
|
+
throw new Error(`applog with missing CID`);
|
|
11078
|
+
}
|
|
11079
|
+
return !excludeCids.has(applog.cid);
|
|
11080
|
+
});
|
|
11081
|
+
};
|
|
11059
11082
|
|
|
11060
11083
|
export {
|
|
11061
11084
|
g,
|
|
@@ -11150,6 +11173,7 @@ export {
|
|
|
11150
11173
|
debounceWrites,
|
|
11151
11174
|
holdTillFirstWrite,
|
|
11152
11175
|
getAgents,
|
|
11176
|
+
excludeApplogsContainedIn,
|
|
11153
11177
|
ensureTsPvAndFinalizeApplogs,
|
|
11154
11178
|
ensureTsPvAndFinalizeApplog,
|
|
11155
11179
|
finalizeApplogForInsert,
|
|
@@ -11176,4 +11200,4 @@ lodash-es/lodash.js:
|
|
|
11176
11200
|
@noble/hashes/utils.js:
|
|
11177
11201
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
11178
11202
|
*/
|
|
11179
|
-
//# sourceMappingURL=chunk-
|
|
11203
|
+
//# sourceMappingURL=chunk-AOM4CWTC.min.js.map
|