@wovin/core 0.0.6 → 0.0.7
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-BR5DELY4.min.js → chunk-5O6HLH5H.min.js} +2 -2
- package/dist/chunk-6WLDICQ6.min.js +2 -0
- package/dist/chunk-6WLDICQ6.min.js.map +1 -0
- package/dist/{chunk-D6REGRIL.min.js → chunk-O7KDPKK2.min.js} +2 -2
- package/dist/chunk-XQUJRFOK.min.js +45 -0
- package/dist/{chunk-IVEP7DZW.min.js.map → chunk-XQUJRFOK.min.js.map} +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/mobx/mobx-utils.d.ts +14 -7
- package/dist/mobx/mobx-utils.d.ts.map +1 -1
- package/dist/pubsub.min.js +1 -1
- package/dist/query/basic.d.ts +16 -14
- package/dist/query/basic.d.ts.map +1 -1
- package/dist/query.min.js +1 -1
- package/dist/thread/filters.d.ts +3 -1
- package/dist/thread/filters.d.ts.map +1 -1
- package/dist/thread.min.js +1 -1
- package/dist/types.min.js +1 -1
- package/package.json +83 -83
- package/dist/chunk-5Q6PAAMY.min.js +0 -2
- package/dist/chunk-5Q6PAAMY.min.js.map +0 -1
- package/dist/chunk-IVEP7DZW.min.js +0 -45
- /package/dist/{chunk-BR5DELY4.min.js.map → chunk-5O6HLH5H.min.js.map} +0 -0
- /package/dist/{chunk-D6REGRIL.min.js.map → chunk-O7KDPKK2.min.js.map} +0 -0
package/dist/index.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-7IDQIMQO.min.js";import"./chunk-RPPZKO5L.min.js";import{a as
|
|
1
|
+
import"./chunk-7IDQIMQO.min.js";import"./chunk-RPPZKO5L.min.js";import{a as Io,b as Jo,c as Ko,d as Lo,e as Mo,f as No}from"./chunk-O7KDPKK2.min.js";import{a as Eo,b as Fo,c as Go,d as Ho}from"./chunk-J5PGGKKW.min.js";import{a as Oo,b as Po,c as Qo}from"./chunk-6WLDICQ6.min.js";import{a as Ro,b as So,c as Uo,d as Vo,e as Wo,f as Xo,g as Yo,h as Zo,i as _o,j as $o,k as or,l as rr}from"./chunk-5O6HLH5H.min.js";import{$ as W,A as l,Aa as Ao,B as q,Ba as Bo,C as u,Ca as Do,D as y,E as z,F as A,G as B,H as D,I as E,J as F,K as G,L as H,M as I,N as J,O as K,P as L,Q as M,R as N,S as O,T as P,U as Q,X as R,Y as S,Z as U,_ as V,aa as X,ba as Y,ca as Z,d as o,da as _,e as r,ea as xo,f as e,fa as fo,g as t,ga as mo,h as p,ha as no,i as x,ia as so,j as f,ja as co,k as m,ka as io,l as n,la as vo,m as s,ma as wo,n as c,na as Co,o as i,oa as To,p as v,pa as ao,q as w,qa as bo,r as C,ra as go,s as T,sa as ho,t as a,ta as jo,u as b,ua as ko,v as d,va as lo,w as g,wa as qo,x as h,xa as uo,y as j,ya as yo,z as k,za as zo}from"./chunk-XQUJRFOK.min.js";import{l as $,m as oo,n as ro,o as eo,p as to,q as po}from"./chunk-G3GOAFHU.min.js";var er=12345.78;export{X as AppLogTB,Y as AppLogTBC,_o as BOOL,Xo as Bool,V as CIDTB,or as DefaultFalse,$o as DefaultTrue,U as EntityID,S as EntityID_LENGTH,H as MappedThread,Zo as NUM,R as Nullable,Uo as Num,Vo as Obj,Wo as Opt,mo as QueryNode,no as QueryResult,Yo as STR,So as Str,F as Thread,fo as ThreadInMemory,Ro as ThreadTB,W as URL,xo as WriteableThread,T as actualize,No as agentToShortHash,bo as agentsOfThread,q as applogThreadComparer,x as areApplogsEqual,a as arrStats,g as arraysContainSameElements,Q as assertOnlyCurrent,P as assertRaw,A as autorunButAlsoImmediately,rr as checkParityTB,r as compareApplogsByTs,B as computedFnDeepCompare,l as computedStructuralComparer,j as createDebugName,k as createDebugNameObj,d as cyrb53hash,h as dateNowIso,Fo as decodeCar,Eo as decodeCarToApplogs,ro as encodeApplog,oo as encodeApplogAndGetCid,Ko as encodeApplogsAsCar,to as encodeBlock,po as encodeBlockOriginal,Jo as encodePubAsCar,go as entityOverlap,ho as entityOverlapCount,Co as filterAndMap,Z as getApplogTypeErrors,eo as getCidSync,m as getHashID,G as getLogsFromThread,N as getUntrackedFilterResults,L as getUntrackedPattern,uo as hasAg,O as hasFilter,zo as hasPv,yo as hasTs,Qo as includedIn,Po as includes,E as isInitEvent,Lo as isPublication,c as isStaticPattern,Mo as isSubscription,t as isTsBefore,_ as isValidApplog,n as isVariable,o as isoDateStrCompare,Do as joinThreads,so as lastWriteWins,Ho as makeCarBlob,Go as makeCarOut,M as makeFilter,jo as mapTo,w as matchPart,v as matchPartStatic,C as matchPattern,y as observableArrayMap,z as observableMapMap,qo as prefixAt,lo as prefixAttrs,$ as prepareForPub,Io as preparePubForPush,D as prettifyThreadName,io as query,To as queryAndMap,Oo as queryDivergencesByPrev,ao as queryEntity,u as queryNodesComparer,wo as queryNot,vo as queryStep,f as removeDuplicateAppLogs,i as resolveOrRemoveVariables,K as rollingAcc,I as rollingFilter,J as rollingMapper,e as sortApplogsByTs,ko as startsWith,b as tsNearlySame,p as uniqueEnFromAppLogs,s as variableNameWithoutQuestionmark,Bo as withPv,Ao as withTs,co as withoutDeleted,er as wovinCoreTest};
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const wovinCoreTest = 12345.78\n\nexport * from './applog'\nexport * from './ipfs'\nexport * from './pubsub'\nexport * from './query'\nexport * from './thread'\nexport * from './types'\n// export * from './utils'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const wovinCoreTest = 12345.78\n\nexport * from './applog'\nexport * from './ipfs'\nexport * from './pubsub'\nexport * from './query'\nexport * from './thread'\nexport * from './types'\n// export * from './utils'\n"],"mappings":"6mCAAO,IAAMA,GAAgB","names":["wovinCoreTest"]}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import { comparer, IComputedValue, IObservableArray } from 'mobx';
|
|
1
|
+
import { comparer, IComputedValue, IObservableArray, ObservableMap } from 'mobx';
|
|
2
2
|
import { IComputedFnOptions } from 'mobx-utils/lib/computedFn';
|
|
3
3
|
import { DatalogQueryPattern } from '../applog/datom-types';
|
|
4
|
-
import {
|
|
4
|
+
import { QueryResult } from '../query/basic';
|
|
5
5
|
import { Thread } from '../thread';
|
|
6
|
-
export declare const createDebugName: ({ caller, thread, pattern
|
|
6
|
+
export declare const createDebugName: ({ caller, thread, pattern, args }: {
|
|
7
7
|
caller?: string;
|
|
8
8
|
thread?: Thread;
|
|
9
|
-
pattern?: DatalogQueryPattern | string;
|
|
9
|
+
pattern?: DatalogQueryPattern | DatalogQueryPattern[] | string;
|
|
10
|
+
args?: any;
|
|
10
11
|
}) => string;
|
|
11
12
|
export declare const createDebugNameObj: (args: Parameters<typeof createDebugName>[0]) => {
|
|
12
13
|
readonly name: string;
|
|
13
14
|
};
|
|
14
15
|
export declare function computedStructuralComparer<T>(a: IComputedValue<T>, b: IComputedValue<T>): boolean;
|
|
15
16
|
export declare function applogThreadComparer(a: Thread, b: Thread): boolean;
|
|
16
|
-
export declare function queryNodesComparer(a:
|
|
17
|
+
export declare function queryNodesComparer(a: QueryResult, b: QueryResult): boolean;
|
|
17
18
|
export declare function observableArrayMap<T>(fn: () => T[], { name, equals }?: {
|
|
18
19
|
name?: string;
|
|
19
20
|
equals?: typeof comparer.structural;
|
|
20
21
|
}): IObservableArray<T>;
|
|
22
|
+
export declare function observableMapMap<K, V>(fn: () => Array<readonly [K, V]>, { name, equals }?: {
|
|
23
|
+
name?: string;
|
|
24
|
+
equals?: typeof comparer.structural;
|
|
25
|
+
}): ObservableMap<K, V>;
|
|
26
|
+
export declare function autorunButAlsoImmediately<T>(fn: () => T, init: (T: any) => any, update: (T: any) => any, { name }?: {
|
|
27
|
+
name?: string;
|
|
28
|
+
}): () => void;
|
|
21
29
|
/**
|
|
22
30
|
* ADAPTED from https://github.com/mobxjs/mobx-utils/blob/362cbbfb384820d416f253eddc532ebecba89bcb/src/computedFn.ts#L50 to
|
|
23
31
|
* - deep-compare arguments
|
|
@@ -59,8 +67,7 @@ export declare function observableArrayMap<T>(fn: () => T[], { name, equals }?:
|
|
|
59
67
|
* @param fn
|
|
60
68
|
* @param keepAliveOrOptions
|
|
61
69
|
*/
|
|
62
|
-
export declare function computedFnDeepCompare<T extends (...args: any[]) => any>(fn: T, keepAliveOrOptions?: (IComputedFnOptions<T> & {
|
|
63
|
-
name?: string;
|
|
70
|
+
export declare function computedFnDeepCompare<T extends (...args: any[]) => any>(name: string, fn: T, keepAliveOrOptions?: (IComputedFnOptions<T> & {
|
|
64
71
|
argsDebugName?: (...args: Parameters<T>) => string;
|
|
65
72
|
}) | boolean): T;
|
|
66
73
|
export declare function prettifyThreadName(input: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobx-utils.d.ts","sourceRoot":"","sources":["../../src/mobx/mobx-utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"mobx-utils.d.ts","sourceRoot":"","sources":["../../src/mobx/mobx-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,QAAQ,EAOR,cAAc,EACd,gBAAgB,EAGhB,aAAa,EAQb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAyClC,eAAO,MAAM,eAAe;aAClB,MAAM;aACN,MAAM;cACL,mBAAmB,GAAG,mBAAmB,EAAE,GAAG,MAAM;WACvD,GAAG;YAOV,CAAA;AACD,eAAO,MAAM,kBAAkB,SAAU,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M,EACZ,EAAE,EAAE,CAAC,EACL,kBAAkB,GAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;CAAE,CAAC,GAAG,OAAe,GACpH,CAAC,CAqEH;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgCxD"}
|
package/dist/pubsub.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-O7KDPKK2.min.js";import"./chunk-J5PGGKKW.min.js";import"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{f as agentToShortHash,c as encodeApplogsAsCar,b as encodePubAsCar,d as isPublication,e as isSubscription,a as preparePubForPush};
|
|
2
2
|
//# sourceMappingURL=pubsub.min.js.map
|
package/dist/query/basic.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { Applog, ApplogValue, DatalogQueryPattern, EntityID, SearchContext } from '../applog/datom-types';
|
|
2
2
|
import { Thread } from '../thread';
|
|
3
3
|
export declare class QueryNode {
|
|
4
|
-
logsOfThisNode: Thread;
|
|
5
|
-
variables: SearchContext;
|
|
6
|
-
|
|
7
|
-
constructor(logsOfThisNode: Thread, variables: SearchContext,
|
|
4
|
+
readonly logsOfThisNode: Thread;
|
|
5
|
+
readonly variables: SearchContext;
|
|
6
|
+
readonly prevNode: QueryNode | null;
|
|
7
|
+
constructor(logsOfThisNode: Thread, variables: SearchContext, prevNode?: QueryNode | null);
|
|
8
8
|
get record(): SearchContext;
|
|
9
|
-
get
|
|
9
|
+
get threadOfTrail(): Thread;
|
|
10
|
+
get trailLogs(): any;
|
|
10
11
|
}
|
|
11
|
-
export declare class
|
|
12
|
+
export declare class QueryResult {
|
|
12
13
|
nodes: Array<QueryNode>;
|
|
13
14
|
constructor(nodes: Array<QueryNode>);
|
|
14
15
|
get size(): number;
|
|
15
16
|
get isEmpty(): boolean;
|
|
16
17
|
get untrackedSize(): number;
|
|
17
18
|
get records(): SearchContext[];
|
|
18
|
-
get
|
|
19
|
-
get
|
|
20
|
-
get
|
|
19
|
+
get leafNodeLogs(): (readonly Applog[])[];
|
|
20
|
+
get threadOfAllTrails(): Thread;
|
|
21
|
+
get thread(): Thread;
|
|
22
|
+
get allApplogs(): readonly Applog[];
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Keep only the latest logs for each en&at (= last write wins)
|
|
@@ -33,13 +35,13 @@ export declare const lastWriteWins: (thread: Thread, { inverseToOnlyReturnFirstL
|
|
|
33
35
|
export declare const withoutDeleted: (thread: Thread) => import("../thread").MappedThread;
|
|
34
36
|
export declare const query: (thread: Thread, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], startVariables?: SearchContext, opts?: {
|
|
35
37
|
debug?: boolean;
|
|
36
|
-
}) =>
|
|
37
|
-
export declare const queryStep: (thread: Thread, nodeSet:
|
|
38
|
+
}) => QueryResult;
|
|
39
|
+
export declare const queryStep: (thread: Thread, nodeSet: QueryResult | null, pattern: DatalogQueryPattern, opts?: {
|
|
38
40
|
debug?: boolean;
|
|
39
|
-
}) =>
|
|
40
|
-
export declare const queryNot: (thread: Thread, startNodes:
|
|
41
|
+
}) => QueryResult;
|
|
42
|
+
export declare const queryNot: (thread: Thread, startNodes: QueryResult, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], opts?: {
|
|
41
43
|
debug?: boolean;
|
|
42
|
-
}) =>
|
|
44
|
+
}) => QueryResult;
|
|
43
45
|
export declare const filterAndMap: <R>(thread: Thread, pattern: DatalogQueryPattern, mapper: keyof Applog | Partial<{
|
|
44
46
|
cid: string;
|
|
45
47
|
pv?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/query/basic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@@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as B,b as C,c as D}from"./chunk-6WLDICQ6.min.js";import{A as c,B as d,C as e,D as f,E as g,F as h,G as i,H as j,ga as k,ha as l,ia as m,ja as n,ka as o,la as p,ma as q,na as r,oa as s,pa as t,qa as u,ra as v,sa as w,ta as x,ua as y,va as z,wa as A,y as a,z as b}from"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{k as QueryNode,l as QueryResult,u as agentsOfThread,d as applogThreadComparer,h as autorunButAlsoImmediately,i as computedFnDeepCompare,c as computedStructuralComparer,a as createDebugName,b as createDebugNameObj,v as entityOverlap,w as entityOverlapCount,r as filterAndMap,D as includedIn,C as includes,m as lastWriteWins,x as mapTo,f as observableArrayMap,g as observableMapMap,A as prefixAt,z as prefixAttrs,j as prettifyThreadName,o as query,s as queryAndMap,B as queryDivergencesByPrev,t as queryEntity,e as queryNodesComparer,q as queryNot,p as queryStep,y as startsWith,n as withoutDeleted};
|
|
2
2
|
//# sourceMappingURL=query.min.js.map
|
package/dist/thread/filters.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ export declare const rollingMapper: (thread: Thread, eventMapper: ApplogEventMap
|
|
|
10
10
|
name?: string;
|
|
11
11
|
extraFilterName?: string;
|
|
12
12
|
}) => MappedThread;
|
|
13
|
-
export declare const rollingAcc: <ACC extends IObservableArray<any> | ObservableMap<any, any> | ObservableSet<any>>(thread: Thread, acc: ACC, eventMapper: (event: ThreadEvent, acc: ACC) => void
|
|
13
|
+
export declare const rollingAcc: <ACC extends IObservableArray<any> | ObservableMap<any, any> | ObservableSet<any>>(thread: Thread, acc: ACC, eventMapper: (event: ThreadEvent, acc: ACC) => void, opts?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
}) => ACC;
|
|
14
16
|
export declare const getUntrackedPattern: (pattern: DatalogQueryPattern) => {
|
|
15
17
|
[k: string]: string | boolean | Number | import("../applog/datom-types").CidString | readonly import("../applog/datom-types").CidString[] | ((value: import("../applog/datom-types").CidString) => boolean) | readonly string[] | ((value: string) => boolean) | import("../applog/datom-types").AgentHash | readonly import("../applog/datom-types").AgentHash[] | ((value: import("../applog/datom-types").AgentHash) => boolean) | readonly ApplogValue[] | ((value: ApplogValue) => boolean);
|
|
16
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/thread/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,gBAAgB,EAAc,aAAa,EAAE,aAAa,EAAiD,MAAM,MAAM,CAAA;AAGxI,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAkB,MAAM,uBAAuB,CAAA;AAEhG,OAAO,EAAe,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAI1D,eAAO,MAAM,aAAa,WACjB,MAAM,WACL,mBAAmB,SACtB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/thread/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,gBAAgB,EAAc,aAAa,EAAE,aAAa,EAAiD,MAAM,MAAM,CAAA;AAGxI,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAkB,MAAM,uBAAuB,CAAA;AAEhG,OAAO,EAAe,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAI1D,eAAO,MAAM,aAAa,WACjB,MAAM,WACL,mBAAmB,SACtB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,iBA8DhD,CAAA;AAEF,eAAO,MAAM,aAAa,WACjB,MAAM,eACD,iBAAiB,SACxB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,iBAkBhD,CAAA;AAEF,eAAO,MAAM,UAAU,6FAGb,MAAM,iCAEO,WAAW,eAAe,IAAI,SAC7C;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,QAWxB,CAAA;AAwBD,eAAO,MAAM,mBAAmB,YACtB,mBAAmB;;CAO5B,CAAA;AACD,wBAAgB,UAAU,CACzB,OAAO,EAAE,mBAAmB,UAEd,SAAS,MAAM,EAAE,cAY/B;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,WAC7B,MAAM,WACL,mBAAmB,SACtB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,aAKvB,CAAA;AAKD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IACzD,OAAO,EAAE,CAAC,EAAE,CAAA;CACZ,CAAA;AACD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAEpG;AACD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,wBAKvC;AACD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM;;;;EAM/C;AACD,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,eAAe,GAAG,gBAAgB,CAAC,CAAA;AACpF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,EAAE,CAAA;CAAE,CAAA"}
|
package/dist/thread.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{I as a,J as b,K as c,L as d,M as e,N as f,O as g,P as h,Q as i,R as j,S as k,T as l,U as m,ea as n,fa as o}from"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{d as MappedThread,b as Thread,o as ThreadInMemory,n as WriteableThread,m as assertOnlyCurrent,l as assertRaw,c as getLogsFromThread,j as getUntrackedFilterResults,h as getUntrackedPattern,k as hasFilter,a as isInitEvent,i as makeFilter,g as rollingAcc,e as rollingFilter,f as rollingMapper};
|
|
2
2
|
//# sourceMappingURL=thread.min.js.map
|
package/dist/types.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-5O6HLH5H.min.js";import"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{i as BOOL,f as Bool,k as DefaultFalse,j as DefaultTrue,h as NUM,c as Num,d as Obj,e as Opt,g as STR,b as Str,a as ThreadTB,l as checkParityTB};
|
|
2
2
|
//# sourceMappingURL=types.min.js.map
|
package/package.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
2
|
+
"name": "@wovin/core",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.min.js",
|
|
6
|
+
"module": "./dist/index.min.js",
|
|
7
|
+
"browser": "./dist/index.min.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.min.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./applog": {
|
|
15
|
+
"import": "./dist/applog.min.js",
|
|
16
|
+
"types": "./dist/applog.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./ipfs": {
|
|
19
|
+
"import": "./dist/ipfs.min.js",
|
|
20
|
+
"types": "./dist/ipfs.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./pubsub": {
|
|
23
|
+
"import": "./dist/pubsub.min.js",
|
|
24
|
+
"types": "./dist/pubsub.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./query": {
|
|
27
|
+
"import": "./dist/query.min.js",
|
|
28
|
+
"types": "./dist/query.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./thread": {
|
|
31
|
+
"import": "./dist/thread.min.js",
|
|
32
|
+
"types": "./dist/thread.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./types": {
|
|
35
|
+
"import": "./dist/types.min.js",
|
|
36
|
+
"types": "./dist/types.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./utils": {
|
|
39
|
+
"import": "./dist/utils.min.js",
|
|
40
|
+
"types": "./dist/utils.d.ts"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"./dist/"
|
|
45
|
+
],
|
|
46
|
+
"esm.sh": {
|
|
47
|
+
"bundle": false
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"mobx": "^6.12.0",
|
|
51
|
+
"@sinclair/typebox": "^0.31.28"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@ipld/car": "^5.2.4",
|
|
55
|
+
"@ipld/dag-json": "^10.1.5",
|
|
56
|
+
"@noble/hashes": "^1.3.2",
|
|
57
|
+
"besonders-logger": "1.0.0-RC11",
|
|
58
|
+
"date-fns": "^2.30.0",
|
|
59
|
+
"lodash-es": "^4.17.21",
|
|
60
|
+
"mobx-utils": "^6.0.8",
|
|
61
|
+
"multiformats": "^12.1.3",
|
|
62
|
+
"safe-stable-stringify": "^2.4.3"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@types/lodash-es": "^4.17.12",
|
|
66
|
+
"concurrently": "^8.2.2",
|
|
67
|
+
"esbuild-plugin-polyfill-node": "^0.3.0",
|
|
68
|
+
"tsup": "^8.0.1",
|
|
69
|
+
"typescript": "^5.0.2",
|
|
70
|
+
"vite": "^4.4.5",
|
|
71
|
+
"tsupconfig": "^0.0.0"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "rm -rf dist/ && concurrently \"pnpm build:code\" \"pnpm build:types\"",
|
|
75
|
+
"build:code": "tsup --minify",
|
|
76
|
+
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
77
|
+
"dev": "concurrently \"pnpm dev:code\" \"pnpm dev:types\"",
|
|
78
|
+
"dev:code": "tsup --watch",
|
|
79
|
+
"dev:types": "tsc --emitDeclarationOnly --declaration --watch",
|
|
80
|
+
"lint": "eslint .",
|
|
81
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
82
|
+
"pub": "npm publish --tag latest --access=public"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D as c,E as u,a as g,b as m,c as f,da as v,y as l}from"./chunk-IVEP7DZW.min.js";import{c as p}from"./chunk-G3GOAFHU.min.js";var{WARN:d,LOG:B,DEBUG:y,VERBOSE:i,ERROR:q}=p.setup(p.INFO),L=u(function(e){y(`queryDivergencesByPrev<${e.nameAndSizeUntracked}>`),e.filters.includes("lastWriteWins")&&d("queryDivergencesByPrev on thread lastWriteWins",e);let s=c(()=>{let a=new Map,n=new Set;i("all applogs:",e.applogs);for(let r of e.applogs){let t;r.pv&&(t=r.pv&&a.get(r.pv.toString()),n.delete(r.pv.toString())),i("traversing log",{log:r,prevLogs:t,leafs:Array.from(n)}),a.set(r.cid,t?[...t,r]:[r]),n.add(r.cid)}return Array.from(n).map(r=>{let t=new v(a.get(r),e.filters,l({caller:"DivergenceLeaf",thread:e,pattern:`leaf: ${r}`}),!0,e);return{log:t.latestLog,thread:t}})},{name:l({caller:"queryDivergencesByPrev",thread:e})});return i.isDisabled||m(()=>i("[queryDivergencesByPrev] result:",f(s))),s},{equals:g.structural});function R(o){return e=>e?.includes?.(o)}function W(o){return e=>o?.includes?.(e)}export{L as a,R as b,W as c};
|
|
2
|
-
//# sourceMappingURL=chunk-5Q6PAAMY.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/query/divergences.ts","../src/query/matchers.ts"],"sourcesContent":["import { Logger } from 'besonders-logger'\nimport { autorun, comparer, toJS } from 'mobx'\nimport { Applog } from '../applog/datom-types'\nimport { computedFnDeepCompare, createDebugName, observableArrayMap } from '../mobx/mobx-utils'\nimport { Thread } from '../thread'\nimport { ThreadInMemory } from '../thread/writeable'\n\nconst { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.INFO) // eslint-disable-line no-unused-vars\n\nexport interface DivergenceLeaf {\n\tlog: Applog\n\tthread: Thread\n}\n\nexport const queryDivergencesByPrev = computedFnDeepCompare(function queryConflictingByPrev(\n\tsourceThread: Thread,\n) {\n\tDEBUG(`queryDivergencesByPrev<${sourceThread.nameAndSizeUntracked}>`)\n\tif (sourceThread.filters.includes('lastWriteWins')) WARN(`queryDivergencesByPrev on thread lastWriteWins`, sourceThread)\n\n\tconst divergences = observableArrayMap(() => {\n\t\tconst logsForNode = new Map<string, Applog[]>()\n\t\tconst leafs = new Set<string>()\n\t\tVERBOSE('all applogs:', sourceThread.applogs)\n\t\tfor (const log of sourceThread.applogs) {\n\t\t\tlet prevLogs\n\t\t\tif (log.pv) {\n\t\t\t\tprevLogs = log.pv && logsForNode.get(log.pv.toString())\n\t\t\t\tleafs.delete(log.pv.toString())\n\t\t\t}\n\t\t\tVERBOSE('traversing log', { log, prevLogs, leafs: Array.from(leafs) })\n\t\t\tlogsForNode.set(log.cid, prevLogs ? [...prevLogs, log] : [log])\n\t\t\tleafs.add(log.cid)\n\t\t}\n\t\treturn Array.from(leafs).map(leafID => {\n\t\t\t// TODO use MappedThread?\n\t\t\tconst thread = new ThreadInMemory(\n\t\t\t\tlogsForNode.get(leafID),\n\t\t\t\tsourceThread.filters,\n\t\t\t\tcreateDebugName({\n\t\t\t\t\tcaller: 'DivergenceLeaf',\n\t\t\t\t\tthread: sourceThread,\n\t\t\t\t\tpattern: `leaf: ${leafID}`,\n\t\t\t\t}),\n\t\t\t\ttrue,\n\t\t\t\tsourceThread,\n\t\t\t)\n\t\t\treturn ({ log: thread.latestLog, thread })\n\t\t})\n\t}, { name: createDebugName({ caller: 'queryDivergencesByPrev', thread: sourceThread }) })\n\tVERBOSE.isDisabled || autorun(() => VERBOSE(`[queryDivergencesByPrev] result:`, toJS(divergences)))\n\treturn divergences\n}, { equals: comparer.structural })\n","import { DatomPart } from '../applog/datom-types'\n\nexport function includes(str: string) {\n\treturn (vl: DatomPart) => vl?.includes?.(str)\n}\nexport function includedIn(arr: string[]) {\n\treturn (vl: DatomPart) => arr?.includes?.(vl)\n}\n"],"mappings":"mIAOA,GAAM,CAAE,KAAAA,EAAM,IAAAC,EAAK,MAAAC,EAAO,QAAAC,EAAS,MAAAC,CAAM,EAAIC,EAAO,MAAMA,EAAO,IAAI,EAOxDC,EAAyBC,EAAsB,SAC3DC,EACC,CACDN,EAAM,0BAA0BM,EAAa,oBAAoB,GAAG,EAChEA,EAAa,QAAQ,SAAS,eAAe,GAAGR,EAAK,iDAAkDQ,CAAY,EAEvH,IAAMC,EAAcC,EAAmB,IAAM,CAC5C,IAAMC,EAAc,IAAI,IAClBC,EAAQ,IAAI,IAClBT,EAAQ,eAAgBK,EAAa,OAAO,EAC5C,QAAWK,KAAOL,EAAa,QAAS,CACvC,IAAIM,EACAD,EAAI,KACPC,EAAWD,EAAI,IAAMF,EAAY,IAAIE,EAAI,GAAG,SAAS,CAAC,EACtDD,EAAM,OAAOC,EAAI,GAAG,SAAS,CAAC,GAE/BV,EAAQ,iBAAkB,CAAE,IAAAU,EAAK,SAAAC,EAAU,MAAO,MAAM,KAAKF,CAAK,CAAE,CAAC,EACrED,EAAY,IAAIE,EAAI,IAAKC,EAAW,CAAC,GAAGA,EAAUD,CAAG,EAAI,CAACA,CAAG,CAAC,EAC9DD,EAAM,IAAIC,EAAI,GAAG,CAClB,CACA,OAAO,MAAM,KAAKD,CAAK,EAAE,IAAIG,GAAU,CAEtC,IAAMC,EAAS,IAAIC,EAClBN,EAAY,IAAII,CAAM,EACtBP,EAAa,QACbU,EAAgB,CACf,OAAQ,iBACR,OAAQV,EACR,QAAS,SAASO,CAAM,EACzB,CAAC,EACD,GACAP,CACD,EACA,MAAQ,CAAE,IAAKQ,EAAO,UAAW,OAAAA,CAAO,CACzC,CAAC,CACF,EAAG,CAAE,KAAME,EAAgB,CAAE,OAAQ,yBAA0B,OAAQV,CAAa,CAAC,CAAE,CAAC,EACxF,OAAAL,EAAQ,YAAcgB,EAAQ,IAAMhB,EAAQ,mCAAoCiB,EAAKX,CAAW,CAAC,CAAC,EAC3FA,CACR,EAAG,CAAE,OAAQY,EAAS,UAAW,CAAC,EClD3B,SAASC,EAASC,EAAa,CACrC,OAAQC,GAAkBA,GAAI,WAAWD,CAAG,CAC7C,CACO,SAASE,EAAWC,EAAe,CACzC,OAAQF,GAAkBE,GAAK,WAAWF,CAAE,CAC7C","names":["WARN","LOG","DEBUG","VERBOSE","ERROR","Logger","queryDivergencesByPrev","computedFnDeepCompare","sourceThread","divergences","observableArrayMap","logsForNode","leafs","log","prevLogs","leafID","thread","ThreadInMemory","createDebugName","autorun","toJS","comparer","includes","str","vl","includedIn","arr"]}
|