@wovin/core 0.0.1-RC9 → 0.0.2
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/applog-helpers.d.ts +23 -0
- package/dist/applog/applog-helpers.d.ts.map +1 -0
- package/dist/applog/applog-utils.d.ts +41 -0
- package/dist/applog/applog-utils.d.ts.map +1 -0
- package/dist/applog/datom-types.d.ts +84 -0
- package/dist/applog/datom-types.d.ts.map +1 -0
- package/dist/applog.d.ts +4 -70
- package/dist/applog.d.ts.map +1 -0
- package/dist/applog.min.js +2 -0
- package/dist/chunk-5R2ELTEJ.min.js +40 -0
- package/dist/chunk-5R2ELTEJ.min.js.map +1 -0
- package/dist/chunk-7IDQIMQO.min.js +1 -0
- package/dist/chunk-F3MRAJXL.min.js +2 -0
- package/dist/{types.js.map → chunk-F3MRAJXL.min.js.map} +1 -1
- package/dist/chunk-HHXZXKNM.min.js +7 -0
- package/dist/chunk-HHXZXKNM.min.js.map +1 -0
- package/dist/chunk-KESATLM4.min.js +8 -0
- package/dist/chunk-KESATLM4.min.js.map +1 -0
- package/dist/chunk-LECZSORU.min.js +2 -0
- package/dist/chunk-LECZSORU.min.js.map +1 -0
- package/dist/chunk-NGPPHX5A.min.js +2 -0
- package/dist/chunk-NGPPHX5A.min.js.map +1 -0
- package/dist/chunk-PL6CNZTW.min.js +2 -0
- package/dist/chunk-PL6CNZTW.min.js.map +1 -0
- package/dist/chunk-RPPZKO5L.min.js +1 -0
- package/dist/index.d.ts +8 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +1 -0
- package/dist/ipfs/car.d.ts +15 -0
- package/dist/ipfs/car.d.ts.map +1 -0
- package/dist/ipfs/ipfs-utils.d.ts +17 -0
- package/dist/ipfs/ipfs-utils.d.ts.map +1 -0
- package/dist/ipfs.d.ts +3 -36
- package/dist/ipfs.d.ts.map +1 -0
- package/dist/ipfs.min.js +2 -0
- package/dist/mobx/mobx-utils.d.ts +67 -0
- package/dist/mobx/mobx-utils.d.ts.map +1 -0
- package/dist/pubsub/connector.d.ts +7 -0
- package/dist/pubsub/connector.d.ts.map +1 -0
- package/dist/pubsub/publication.d.ts +6 -0
- package/dist/pubsub/publication.d.ts.map +1 -0
- package/dist/{pubsub.d.cts → pubsub/pubsub-types.d.ts} +7 -12
- package/dist/pubsub/pubsub-types.d.ts.map +1 -0
- package/dist/pubsub.d.ts +4 -41
- package/dist/pubsub.d.ts.map +1 -0
- package/dist/pubsub.min.js +2 -0
- package/dist/query/basic.d.ts +65 -0
- package/dist/query/basic.d.ts.map +1 -0
- package/dist/query/divergences.d.ts +12 -0
- package/dist/query/divergences.d.ts.map +1 -0
- package/dist/query/matchers.d.ts +4 -0
- package/dist/query/matchers.d.ts.map +1 -0
- package/dist/query.d.ts +5 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.min.js +2 -0
- package/dist/query.min.js.map +1 -0
- package/dist/stream/basic.d.ts +34 -0
- package/dist/stream/basic.d.ts.map +1 -0
- package/dist/stream/filters.d.ts +38 -0
- package/dist/stream/filters.d.ts.map +1 -0
- package/dist/{mapped-8h8bwRuM.d.ts → stream/mapped.d.ts} +5 -6
- package/dist/stream/mapped.d.ts.map +1 -0
- package/dist/{writeable-0WbsIiQn.d.cts → stream/writeable.d.ts} +7 -6
- package/dist/stream/writeable.d.ts.map +1 -0
- package/dist/stream.d.ts +5 -44
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.min.js +2 -0
- package/dist/stream.min.js.map +1 -0
- package/dist/types/typescript-utils.d.ts +33 -0
- package/dist/types/typescript-utils.d.ts.map +1 -0
- package/dist/types.d.ts +2 -4
- package/dist/types.d.ts.map +1 -0
- package/dist/types.min.js +2 -0
- package/dist/types.min.js.map +1 -0
- package/dist/utils.d.ts +1 -2
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.min.js +1 -0
- package/dist/utils.min.js.map +1 -0
- package/package.json +80 -46
- package/dist/applog.cjs +0 -85
- package/dist/applog.cjs.map +0 -1
- package/dist/applog.d.cts +0 -70
- package/dist/applog.js +0 -85
- package/dist/chunk-F3FYYIAV.js +0 -11
- package/dist/chunk-GT5X2WN4.cjs +0 -59
- package/dist/chunk-GT5X2WN4.cjs.map +0 -1
- package/dist/chunk-JSAJQXI2.cjs +0 -577
- package/dist/chunk-JSAJQXI2.cjs.map +0 -1
- package/dist/chunk-KDR7QXOQ.js +0 -56
- package/dist/chunk-KDR7QXOQ.js.map +0 -1
- package/dist/chunk-KGTU6PJ3.js +0 -577
- package/dist/chunk-KGTU6PJ3.js.map +0 -1
- package/dist/chunk-KHY3SRML.js +0 -768
- package/dist/chunk-KHY3SRML.js.map +0 -1
- package/dist/chunk-OOC3HK3E.cjs +0 -56
- package/dist/chunk-OOC3HK3E.cjs.map +0 -1
- package/dist/chunk-QXNFGJ5R.js +0 -59
- package/dist/chunk-QXNFGJ5R.js.map +0 -1
- package/dist/chunk-UOPZAYFM.cjs +0 -11
- package/dist/chunk-UOPZAYFM.cjs.map +0 -1
- package/dist/chunk-ZPOYKHY6.cjs +0 -768
- package/dist/chunk-ZPOYKHY6.cjs.map +0 -1
- package/dist/index.cjs +0 -87
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -12
- package/dist/index.js +0 -87
- package/dist/index.js.map +0 -1
- package/dist/ipfs.cjs +0 -28
- package/dist/ipfs.cjs.map +0 -1
- package/dist/ipfs.d.cts +0 -36
- package/dist/ipfs.js +0 -28
- package/dist/mapped-mkKwhQgZ.d.cts +0 -20
- package/dist/pubsub.cjs +0 -14
- package/dist/pubsub.cjs.map +0 -1
- package/dist/pubsub.js +0 -14
- package/dist/pubsub.js.map +0 -1
- package/dist/queries.cjs +0 -112
- package/dist/queries.cjs.map +0 -1
- package/dist/queries.d.cts +0 -141
- package/dist/queries.d.ts +0 -141
- package/dist/queries.js +0 -112
- package/dist/queries.js.map +0 -1
- package/dist/stream.cjs +0 -37
- package/dist/stream.cjs.map +0 -1
- package/dist/stream.d.cts +0 -44
- package/dist/stream.js +0 -37
- package/dist/types-A9kYLtyU.d.cts +0 -153
- package/dist/types-A9kYLtyU.d.ts +0 -153
- package/dist/types.cjs +0 -46
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -4
- package/dist/types.js +0 -46
- package/dist/utils.cjs +0 -1
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.cts +0 -2
- package/dist/utils.js +0 -1
- package/dist/writeable-r_920qCb.d.ts +0 -16
- /package/dist/{applog.js.map → applog.min.js.map} +0 -0
- /package/dist/{chunk-F3FYYIAV.js.map → chunk-7IDQIMQO.min.js.map} +0 -0
- /package/dist/{ipfs.js.map → chunk-RPPZKO5L.min.js.map} +0 -0
- /package/dist/{stream.js.map → ipfs.min.js.map} +0 -0
- /package/dist/{utils.js.map → pubsub.min.js.map} +0 -0
package/dist/pubsub.d.ts
CHANGED
|
@@ -1,41 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface IPublication {
|
|
7
|
-
id?: string;
|
|
8
|
-
createdAt: string;
|
|
9
|
-
name: string;
|
|
10
|
-
isDeleted?: boolean;
|
|
11
|
-
pk: Uint8Array;
|
|
12
|
-
autopush: boolean;
|
|
13
|
-
lastPush: string | null;
|
|
14
|
-
lastCID?: string;
|
|
15
|
-
latestLogTs?: string;
|
|
16
|
-
publishedBy: string;
|
|
17
|
-
selectors?: string[];
|
|
18
|
-
encryptedFor?: string | null;
|
|
19
|
-
encryptedWith?: CryptoKey | null;
|
|
20
|
-
sharedKey?: CryptoKey | null;
|
|
21
|
-
sharedAgents?: AgentID[] | null;
|
|
22
|
-
sharedKeyMap?: Map<AgentID, string> | null;
|
|
23
|
-
}
|
|
24
|
-
interface ISubscription {
|
|
25
|
-
id: string;
|
|
26
|
-
createdAt: string;
|
|
27
|
-
name: string;
|
|
28
|
-
isDeleted: boolean;
|
|
29
|
-
lastPull?: string | null;
|
|
30
|
-
lastPullAttempt?: string | null;
|
|
31
|
-
autopull: boolean;
|
|
32
|
-
lastCID?: string;
|
|
33
|
-
publishedBy?: string;
|
|
34
|
-
encryptedFor?: string | undefined;
|
|
35
|
-
encryptedWith?: CryptoKey | undefined;
|
|
36
|
-
}
|
|
37
|
-
declare function isPublication(obj: any): obj is IPublication;
|
|
38
|
-
declare function isSubscription(obj: any): obj is ISubscription;
|
|
39
|
-
type TSubPub = IPublication | ISubscription;
|
|
40
|
-
|
|
41
|
-
export { type IPublication, type ISubscription, type TSubPub, isPublication, isSubscription };
|
|
1
|
+
export * from './pubsub/connector';
|
|
2
|
+
export * from './pubsub/publication';
|
|
3
|
+
export * from './pubsub/pubsub-types';
|
|
4
|
+
//# sourceMappingURL=pubsub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pubsub.d.ts","sourceRoot":"","sources":["../src/pubsub.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Applog, ApplogValue, DatalogQueryPattern, EntityID, SearchContext } from '../applog/datom-types';
|
|
2
|
+
import { ApplogStream } from '../stream';
|
|
3
|
+
export declare class QueryNode {
|
|
4
|
+
logsOfThisNode: ApplogStream;
|
|
5
|
+
variables: SearchContext;
|
|
6
|
+
prev: QueryNode | null;
|
|
7
|
+
constructor(logsOfThisNode: ApplogStream, variables: SearchContext, prev?: QueryNode | null);
|
|
8
|
+
get record(): SearchContext;
|
|
9
|
+
get allApplogs(): ApplogStream;
|
|
10
|
+
}
|
|
11
|
+
export declare class QueryNodes {
|
|
12
|
+
nodes: Array<QueryNode>;
|
|
13
|
+
constructor(nodes: Array<QueryNode>);
|
|
14
|
+
get size(): number;
|
|
15
|
+
get isEmpty(): boolean;
|
|
16
|
+
get untrackedSize(): number;
|
|
17
|
+
get records(): SearchContext[];
|
|
18
|
+
get applogSets(): (readonly Applog[])[];
|
|
19
|
+
get applogStreams(): ApplogStream[];
|
|
20
|
+
get allApplogs(): ApplogStream;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Keep only the latest logs for each en&at (= last write wins)
|
|
24
|
+
*/
|
|
25
|
+
export declare const withoutHistory: (stream: ApplogStream, { inverseToOnlyReturnFirstLogs, tolerateAlreadyFiltered }?: {
|
|
26
|
+
inverseToOnlyReturnFirstLogs?: boolean;
|
|
27
|
+
tolerateAlreadyFiltered?: boolean;
|
|
28
|
+
}) => ApplogStream;
|
|
29
|
+
/**
|
|
30
|
+
* Remove all applogs for entities that have an applog: { at: `isDeleted`, val: true }
|
|
31
|
+
* ! WARNING: If not based on withoutHistory, it will not respect un-deletions yet (isDeleted: false)
|
|
32
|
+
*/
|
|
33
|
+
export declare const withoutDeleted: (stream: ApplogStream) => import("../stream").MappedApplogStream;
|
|
34
|
+
export declare const query: (stream: ApplogStream, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], startVariables?: SearchContext, opts?: {
|
|
35
|
+
debug?: boolean;
|
|
36
|
+
}) => QueryNodes;
|
|
37
|
+
export declare const queryStep: (stream: ApplogStream, nodeSet: QueryNodes | null, pattern: DatalogQueryPattern, opts?: {
|
|
38
|
+
debug?: boolean;
|
|
39
|
+
}) => QueryNodes;
|
|
40
|
+
export declare const queryNot: (stream: ApplogStream, startNodes: QueryNodes, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], opts?: {
|
|
41
|
+
debug?: boolean;
|
|
42
|
+
}) => QueryNodes;
|
|
43
|
+
export declare const filterAndMap: <R>(stream: ApplogStream, pattern: DatalogQueryPattern, mapper: keyof Applog | Partial<{
|
|
44
|
+
cid: string;
|
|
45
|
+
pv?: string;
|
|
46
|
+
ts: string;
|
|
47
|
+
ag: string;
|
|
48
|
+
en: string;
|
|
49
|
+
at: string;
|
|
50
|
+
vl: string;
|
|
51
|
+
}> | ((applog: Applog) => R)) => import("mobx").IObservableArray<any>;
|
|
52
|
+
export declare const queryAndMap: <R>(stream: ApplogStream, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], map: string | ((record: SearchContext) => R), variables?: SearchContext) => import("mobx").IObservableArray<any>;
|
|
53
|
+
export declare const queryEntity: <R>(stream: ApplogStream, name: string, entityID: EntityID, attributes: string[]) => import("mobx").IComputedValue<{
|
|
54
|
+
[k: string]: ApplogValue;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const agentsOfStream: <R>(stream: ApplogStream) => import("mobx").ObservableMap<string, number>;
|
|
57
|
+
export declare const entityOverlap: (streamA: ApplogStream, streamB: ApplogStream) => import("mobx").IComputedValue<string[]>;
|
|
58
|
+
export declare const entityOverlapCount: (streamA: ApplogStream, streamB: ApplogStream) => import("mobx").IComputedValue<number>;
|
|
59
|
+
export declare function mapTo(applogFieldMap: Partial<{
|
|
60
|
+
[key in keyof Applog]: string;
|
|
61
|
+
}>): (applog: any) => SearchContext;
|
|
62
|
+
export declare function startsWith(str: string): (value: any) => any;
|
|
63
|
+
export declare function prefixAttrs(prefix: string, attrs: string[]): string[];
|
|
64
|
+
export declare function prefixAt(prefix: string, attr: string): string;
|
|
65
|
+
//# sourceMappingURL=basic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/query/basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAgBzG,OAAO,EAAE,YAAY,EAAkC,MAAM,WAAW,CAAA;AAmBxE,qBAAa,SAAS;IAEb,cAAc,EAAE,YAAY;IAC5B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,SAAS,GAAG,IAAI;gBAFtB,cAAc,EAAE,YAAY,EAC5B,SAAS,EAAE,aAAa,EACxB,IAAI,GAAE,SAAS,GAAG,IAAW;I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,cAClB,YAAY,iDAsBnB,CAAA;AAEF,eAAO,MAAM,aAAa,YAChB,YAAY,WACZ,YAAY,4CASpB,CAAA;AAEF,eAAO,MAAM,kBAAkB,YAA8D,YAAY,WAAW,YAAY,0CAE9H,CAAA;AAMF,wBAAgB,KAAK,CAAC,cAAc,EAAE,OAAO,CAAC;KAAG,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM;CAAE,CAAC,kCAO/E;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,uBAErC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAE1D;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAEpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Applog } from '../applog/datom-types';
|
|
2
|
+
import { ApplogStream } from '../stream';
|
|
3
|
+
import { ApplogStreamInMemory } from '../stream/writeable';
|
|
4
|
+
export interface DivergenceLeaf {
|
|
5
|
+
log: Applog;
|
|
6
|
+
stream: ApplogStream;
|
|
7
|
+
}
|
|
8
|
+
export declare const queryDivergencesByPrev: (sourceStream: ApplogStream) => import("mobx").IObservableArray<{
|
|
9
|
+
log: Applog;
|
|
10
|
+
stream: ApplogStreamInMemory;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=divergences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divergences.d.ts","sourceRoot":"","sources":["../../src/query/divergences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAI1D,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,YAAY,CAAA;CACpB;AAED,eAAO,MAAM,sBAAsB,iBACpB,YAAY;;;EAqCQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/query/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,QACvB,SAAS,aACrB;AACD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAC3B,SAAS,aACrB"}
|
package/dist/query.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as z,b as A,c as B}from"./chunk-LECZSORU.min.js";import{A as v,B as w,C as x,D as y,n as i,o as j,p as k,q as l,r as m,s as n,t as o,u as p,v as q,w as r,x as s,y as t,z as u}from"./chunk-HHXZXKNM.min.js";import{F as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h}from"./chunk-5R2ELTEJ.min.js";import"./chunk-KESATLM4.min.js";export{i as QueryNode,j as QueryNodes,s as agentsOfStream,d as applogStreamComparer,g as computedFnDeepCompare,c as computedStructuralComparer,a as createDebugName,b as createDebugNameObj,t as entityOverlap,u as entityOverlapCount,p as filterAndMap,B as includedIn,A as includes,v as mapTo,f as observableArrayMap,y as prefixAt,x as prefixAttrs,h as prettifyStreamName,m as query,q as queryAndMap,z as queryDivergencesByPrev,r as queryEntity,e as queryNodesComparer,o as queryNot,n as queryStep,w as startsWith,l as withoutDeleted,k as withoutHistory};
|
|
2
|
+
//# sourceMappingURL=query.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Applog, ApplogForInsert } from '../applog/datom-types';
|
|
2
|
+
export type ApplogStreamEvent = {
|
|
3
|
+
added: readonly Applog[];
|
|
4
|
+
removed: readonly Applog[] | null;
|
|
5
|
+
} | {
|
|
6
|
+
init: readonly Applog[];
|
|
7
|
+
};
|
|
8
|
+
export declare function isInitEvent(event: ApplogStreamEvent): event is {
|
|
9
|
+
init: readonly Applog[];
|
|
10
|
+
};
|
|
11
|
+
export declare abstract class ApplogStream {
|
|
12
|
+
protected _applogs: Applog[];
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly filters: string[];
|
|
15
|
+
readonly parents: ApplogStream[] | null;
|
|
16
|
+
protected _subscribers: ((event: ApplogStreamEvent) => void)[];
|
|
17
|
+
constructor(parents: ApplogStream | ApplogStream[] | null, filters: string[], _applogs: Applog[], name: string);
|
|
18
|
+
abstract get readOnly(): boolean;
|
|
19
|
+
subscribe(callback: (event: ApplogStreamEvent) => void): () => void;
|
|
20
|
+
unsubscribe(callback: (event: ApplogStreamEvent) => void): void;
|
|
21
|
+
protected notifySubscribers(event: ApplogStreamEvent): void;
|
|
22
|
+
get applogs(): readonly Applog[];
|
|
23
|
+
map<R>(fn: (applog: Applog) => R): R[];
|
|
24
|
+
get firstLog(): Applog;
|
|
25
|
+
get latestLog(): Applog;
|
|
26
|
+
hasApplog(applog: Applog, byRef: boolean): boolean;
|
|
27
|
+
hasApplogWithDiffTs(applog: ApplogForInsert): Applog;
|
|
28
|
+
get isEmpty(): boolean;
|
|
29
|
+
get size(): number;
|
|
30
|
+
get untrackedSize(): number;
|
|
31
|
+
get nameAndSizeUntracked(): string;
|
|
32
|
+
get prettyName(): string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=basic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/stream/basic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,IAAI,QAAQ,WAEX;IACD,IAAI,SAAS,WAEZ;IACM,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAcxC,mBAAmB,CAAC,MAAM,EAAE,eAAe;IAUlD,IAAI,OAAO,YAEV;IACD,IAAI,IAAI,WAEP;IACD,IAAI,aAAa,WAEhB;IACD,IAAI,oBAAoB,WAEvB;IACD,IAAI,UAAU,WAEb;CACD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IObservableArray, ObservableMap, ObservableSet } from 'mobx';
|
|
2
|
+
import { Applog, ApplogValue, DatalogQueryPattern } from '../applog/datom-types';
|
|
3
|
+
import { ApplogStream, ApplogStreamEvent } from './basic';
|
|
4
|
+
import { ApplogEventMapper, MappedApplogStream } from './mapped';
|
|
5
|
+
export declare const rollingFilter: (stream: ApplogStream, pattern: DatalogQueryPattern, opts?: {
|
|
6
|
+
name?: string;
|
|
7
|
+
extraFilterName?: string;
|
|
8
|
+
}) => MappedApplogStream;
|
|
9
|
+
export declare const rollingMapper: (stream: ApplogStream, eventMapper: ApplogEventMapper, opts?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
extraFilterName?: string;
|
|
12
|
+
}) => MappedApplogStream;
|
|
13
|
+
export declare const rollingAcc: <ACC extends IObservableArray<any> | ObservableMap<any, any> | ObservableSet<any>>(stream: ApplogStream, acc: ACC, eventMapper: (event: ApplogStreamEvent, acc: ACC) => void) => ACC;
|
|
14
|
+
export declare const getUntrackedPattern: (pattern: DatalogQueryPattern) => {
|
|
15
|
+
[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) | readonly ApplogValue[] | ((value: ApplogValue) => boolean);
|
|
16
|
+
};
|
|
17
|
+
export declare function makeFilter(pattern: DatalogQueryPattern): (logs: readonly Applog[]) => Applog[];
|
|
18
|
+
/**
|
|
19
|
+
* // ! think twice before using
|
|
20
|
+
*/
|
|
21
|
+
export declare const getUntrackedFilterResults: (stream: ApplogStream, pattern: DatalogQueryPattern, opts?: {
|
|
22
|
+
name?: string;
|
|
23
|
+
}) => Applog[];
|
|
24
|
+
export type ApplogStreamWithFilter<T extends string> = ApplogStream & {
|
|
25
|
+
filters: T[];
|
|
26
|
+
};
|
|
27
|
+
export declare function hasFilter<T extends string>(stream: ApplogStream, filter: T): stream is ApplogStreamWithFilter<T>;
|
|
28
|
+
export declare function assertRaw(stream: ApplogStream): ApplogStreamWithoutFilters;
|
|
29
|
+
export declare function assertOnlyCurrent(stream: ApplogStream): ApplogStream & {
|
|
30
|
+
filters: "withoutHistory"[];
|
|
31
|
+
} & {
|
|
32
|
+
filters: "withoutDeleted"[];
|
|
33
|
+
};
|
|
34
|
+
export type ApplogStreamOnlyCurrent = ApplogStreamWithFilter<'withoutHistory' | 'withoutDeleted'>;
|
|
35
|
+
export type ApplogStreamWithoutFilters = ApplogStream & {
|
|
36
|
+
filters: [];
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/stream/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,YAAY,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAIhE,eAAO,MAAM,aAAa,WACjB,YAAY,WACX,mBAAmB,SACtB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,uBA2DoE,CAAA;AAEtH,eAAO,MAAM,aAAa,WACjB,YAAY,eACP,iBAAiB,SACxB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,uBAeoE,CAAA;AAEtH,eAAO,MAAM,UAAU,6FACd,YAAY,iCAEC,iBAAiB,eAAe,IAAI,QASqB,CAAA;AAwB/E,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,YAAY,WACX,mBAAmB,SACtB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,aAKvB,CAAA;AAKD,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,IAAI,YAAY,GAAG;IACrE,OAAO,EAAE,CAAC,EAAE,CAAA;CACZ,CAAA;AACD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAEhH;AACD,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,8BAK7C;AACD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY;;;;EAMrD;AACD,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAA;AACjG,MAAM,MAAM,0BAA0B,GAAG,YAAY,GAAG;IAAE,OAAO,EAAE,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type ApplogEventMapper = (this: MappedApplogStream, event: ApplogStreamEvent, sourceStream: ApplogStream) => ApplogStreamEvent;
|
|
4
|
-
declare class MappedApplogStream extends ApplogStream {
|
|
1
|
+
import { Applog } from '../applog/datom-types';
|
|
2
|
+
import { ApplogStream, ApplogStreamEvent } from './basic';
|
|
3
|
+
export type ApplogEventMapper = (this: MappedApplogStream, event: ApplogStreamEvent, sourceStream: ApplogStream) => ApplogStreamEvent;
|
|
4
|
+
export declare class MappedApplogStream extends ApplogStream {
|
|
5
5
|
readonly _initialLogs: readonly Applog[];
|
|
6
6
|
private _eventMapper;
|
|
7
7
|
readonly name: string;
|
|
@@ -16,5 +16,4 @@ declare class MappedApplogStream extends ApplogStream {
|
|
|
16
16
|
triggerRemap(): void;
|
|
17
17
|
protected onParentUpdate(stream: ApplogStream, event: ApplogStreamEvent): void;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
export { type ApplogEventMapper as A, MappedApplogStream as M };
|
|
19
|
+
//# sourceMappingURL=mapped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapped.d.ts","sourceRoot":"","sources":["../../src/stream/mapped.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAe,MAAM,SAAS,CAAA;AAItE,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,KAAK,iBAAiB,CAAA;AAErI,qBAAa,kBAAmB,SAAQ,YAAY;IAMlD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE;IACxC,OAAO,CAAC,YAAY;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAPtB,OAAO,CAAC,oBAAoB,CAAqE;gBAGhG,OAAO,EAAE,YAAY,GAAG,YAAY,EAAE,EACtC,OAAO,EAAE,MAAM,EAAE,EACR,YAAY,EAAE,SAAS,MAAM,EAAE,EAChC,YAAY,EAAE,iBAAiB,EAC9B,IAAI,EAAE,MAAM;IAkBtB,IAAI,QAAQ,YAGX;IAED,OAAO,CAAC,iBAAiB;IA0BzB;;;OAGG;IACH,YAAY;IAOZ,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB;CA8BvE"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare abstract class WriteableApplogStream extends ApplogStream {
|
|
1
|
+
import { type Applog, ApplogForInsert } from '../applog/datom-types';
|
|
2
|
+
import { ApplogStream } from './basic';
|
|
3
|
+
export declare abstract class WriteableApplogStream extends ApplogStream {
|
|
4
4
|
constructor(parents: ApplogStream | ApplogStream[] | null, filters: string[], applogs: Applog[], name: string);
|
|
5
5
|
insert(appLogsToInsert: ApplogForInsert[]): Applog[];
|
|
6
6
|
get readOnly(): boolean;
|
|
7
7
|
protected abstract persist(logs: Applog[]): any;
|
|
8
8
|
}
|
|
9
|
-
declare class ApplogStreamInMemory extends WriteableApplogStream {
|
|
9
|
+
export declare class ApplogStreamInMemory extends WriteableApplogStream {
|
|
10
10
|
readonly _readOnly: boolean;
|
|
11
|
+
static empty(name?: string): ApplogStreamInMemory;
|
|
12
|
+
static fromArray(applogs: Applog[], name?: string, readOnly?: boolean): ApplogStreamInMemory;
|
|
11
13
|
constructor(applogs: Applog[], filters: string[], name: string, _readOnly: boolean, parents?: ApplogStream | ApplogStream[] | null);
|
|
12
14
|
get readOnly(): boolean;
|
|
13
15
|
protected persist(logs: Applog[]): void;
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
export { ApplogStreamInMemory as A, WriteableApplogStream as W };
|
|
17
|
+
//# sourceMappingURL=writeable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeable.d.ts","sourceRoot":"","sources":["../../src/stream/writeable.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAsC,MAAM,uBAAuB,CAAA;AAExG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAItC,8BAAsB,qBAAsB,SAAQ,YAAY;gBAE9D,OAAO,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,IAAI,EAC7C,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAO,EACtB,IAAI,EAAE,MAAM;IASN,MAAM,CAAC,eAAe,EAAE,eAAe,EAAE;IAoChD,IAAI,QAAQ,YAEX;IAED,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;CACzC;AACD,qBAAa,oBAAqB,SAAQ,qBAAqB;IAY7D,QAAQ,CAAC,SAAS,EAAE,OAAO;IAX5B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM;IAG1B,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,UAAQ;gBAKlE,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,MAAM,EACH,SAAS,EAAE,OAAO,EAC3B,OAAO,GAAE,YAAY,GAAG,YAAY,EAAE,GAAG,IAAW;IAUrD,IAAI,QAAQ,YAEX;IAED,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;CAMhC"}
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,44 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import '@sinclair/typebox';
|
|
7
|
-
import '@sinclair/typebox/compiler';
|
|
8
|
-
import 'multiformats/cid';
|
|
9
|
-
|
|
10
|
-
declare const rollingFilter: (stream: ApplogStream, pattern: DatalogQueryPattern, opts?: {
|
|
11
|
-
name?: string;
|
|
12
|
-
extraFilterName?: string;
|
|
13
|
-
}) => MappedApplogStream;
|
|
14
|
-
declare const rollingMapper: (stream: ApplogStream, eventMapper: ApplogEventMapper, opts?: {
|
|
15
|
-
name?: string;
|
|
16
|
-
extraFilterName?: string;
|
|
17
|
-
}) => MappedApplogStream;
|
|
18
|
-
declare const rollingAcc: <ACC extends IObservableArray<any> | ObservableMap<any, any> | ObservableSet<any>>(stream: ApplogStream, acc: ACC, eventMapper: (event: ApplogStreamEvent, acc: ACC) => void) => ACC;
|
|
19
|
-
declare const getUntrackedPattern: (pattern: DatalogQueryPattern) => {
|
|
20
|
-
[k: string]: string | boolean | Number | CidString | readonly CidString[] | ((value: CidString) => boolean) | readonly string[] | ((value: string) => boolean) | readonly ApplogValue[] | ((value: ApplogValue) => boolean);
|
|
21
|
-
};
|
|
22
|
-
declare function makeFilter(pattern: DatalogQueryPattern): (logs: readonly Applog[]) => Applog[];
|
|
23
|
-
/**
|
|
24
|
-
* // ! think twice before using
|
|
25
|
-
*/
|
|
26
|
-
declare const getUntrackedFilterResults: (stream: ApplogStream, pattern: DatalogQueryPattern, opts?: {
|
|
27
|
-
name?: string;
|
|
28
|
-
}) => Applog[];
|
|
29
|
-
type ApplogStreamWithFilter<T extends string> = ApplogStream & {
|
|
30
|
-
filters: T[];
|
|
31
|
-
};
|
|
32
|
-
declare function hasFilter<T extends string>(stream: ApplogStream, filter: T): stream is ApplogStreamWithFilter<T>;
|
|
33
|
-
declare function assertRaw(stream: ApplogStream): ApplogStreamWithoutFilters;
|
|
34
|
-
declare function assertOnlyCurrent(stream: ApplogStream): ApplogStream & {
|
|
35
|
-
filters: "withoutHistory"[];
|
|
36
|
-
} & {
|
|
37
|
-
filters: "withoutDeleted"[];
|
|
38
|
-
};
|
|
39
|
-
type ApplogStreamOnlyCurrent = ApplogStreamWithFilter<'withoutHistory' | 'withoutDeleted'>;
|
|
40
|
-
type ApplogStreamWithoutFilters = ApplogStream & {
|
|
41
|
-
filters: [];
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { ApplogEventMapper, ApplogStream, ApplogStreamEvent, type ApplogStreamOnlyCurrent, type ApplogStreamWithFilter, type ApplogStreamWithoutFilters, MappedApplogStream, assertOnlyCurrent, assertRaw, getUntrackedFilterResults, getUntrackedPattern, hasFilter, makeFilter, rollingAcc, rollingFilter, rollingMapper };
|
|
1
|
+
export * from './stream/basic';
|
|
2
|
+
export * from './stream/filters';
|
|
3
|
+
export * from './stream/mapped';
|
|
4
|
+
export * from './stream/writeable';
|
|
5
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{l as m,m as n}from"./chunk-HHXZXKNM.min.js";import{N as a,O as b,P as c,Q as d,R as e,S as f,T as g,U as h,V as i,W as j,X as k,Y as l}from"./chunk-5R2ELTEJ.min.js";import"./chunk-KESATLM4.min.js";export{b as ApplogStream,n as ApplogStreamInMemory,c as MappedApplogStream,m as WriteableApplogStream,l as assertOnlyCurrent,k as assertRaw,i as getUntrackedFilterResults,g as getUntrackedPattern,j as hasFilter,a as isInitEvent,h as makeFilter,f as rollingAcc,d as rollingFilter,e as rollingMapper};
|
|
2
|
+
//# sourceMappingURL=stream.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Type as T } from '@sinclair/typebox';
|
|
2
|
+
import { ApplogStream } from '../stream';
|
|
3
|
+
export declare const ApplogStreamTB: import("@sinclair/typebox").TUnsafe<ApplogStream>;
|
|
4
|
+
declare const StringTB: (options?: import("@sinclair/typebox").StringOptions) => import("@sinclair/typebox").TString, OptionalTB: <T extends import("@sinclair/typebox").TSchema>(schema: T) => import("@sinclair/typebox").TOptional<T>, BooleanTB: (options?: import("@sinclair/typebox").SchemaOptions) => import("@sinclair/typebox").TBoolean, ObjectTB: <T extends import("@sinclair/typebox").TProperties>(properties: T, options?: import("@sinclair/typebox").ObjectOptions) => import("@sinclair/typebox").TObject<T>, NumberTB: (options?: import("@sinclair/typebox").NumericOptions<number>) => import("@sinclair/typebox").TNumber;
|
|
5
|
+
export declare const Str: typeof StringTB;
|
|
6
|
+
export declare const Num: typeof NumberTB;
|
|
7
|
+
export declare const Obj: typeof ObjectTB;
|
|
8
|
+
export declare const Opt: typeof OptionalTB;
|
|
9
|
+
export declare const Bool: typeof BooleanTB;
|
|
10
|
+
export declare const STR: ReturnType<typeof T.String>;
|
|
11
|
+
export declare const NUM: ReturnType<typeof T.Number>;
|
|
12
|
+
export declare const BOOL: ReturnType<typeof T.Boolean>;
|
|
13
|
+
export type DefaultTrue = true | boolean;
|
|
14
|
+
export declare const DefaultTrue: DefaultTrue;
|
|
15
|
+
export type DefaultFalse = false | boolean;
|
|
16
|
+
export declare const DefaultFalse: DefaultFalse;
|
|
17
|
+
export type GenericObject = Record<string, any>;
|
|
18
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
19
|
+
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
20
|
+
export type PromiseType<T extends Promise<any>> = T extends Promise<infer U> ? U : never;
|
|
21
|
+
export type CoerceToString<T> = T extends string ? T : never;
|
|
22
|
+
/**
|
|
23
|
+
* Define nominal type of U based on type of T. Similar to Opaque types in Flow
|
|
24
|
+
*/
|
|
25
|
+
export type Tagged<T, Tag> = T & {
|
|
26
|
+
tag?: Tag;
|
|
27
|
+
};
|
|
28
|
+
export type LastElementOf<T extends readonly unknown[]> = T extends readonly [...unknown[], infer Last] ? Last : never;
|
|
29
|
+
export declare function checkParityTB(): void;
|
|
30
|
+
/** solidjs Setter requires returning something, which I often don't */
|
|
31
|
+
export type GenericSetter<T> = (newValue: T) => void;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=typescript-utils.d.ts.map
|
|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AE,CAAC,CAAC,CAAC,CAAA;AACrE,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC9E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAExF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,KAAK,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAU9C,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,SAAS,SAAS,CAAC,GAAG,OAAO,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAEtH,wBAAgB,aAAa,SAS5B;AAED,uEAAuE;AACvE,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
import '@sinclair/typebox/compiler';
|
|
4
|
-
import 'multiformats/cid';
|
|
1
|
+
export * from './types/typescript-utils';
|
|
2
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-F3MRAJXL.min.js";import"./chunk-HHXZXKNM.min.js";import"./chunk-5R2ELTEJ.min.js";import"./chunk-KESATLM4.min.js";export{a as ApplogStreamTB,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,l as checkParityTB};
|
|
2
|
+
//# sourceMappingURL=types.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=utils.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,48 +1,82 @@
|
|
|
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
|
-
|
|
2
|
+
"name": "@wovin/core",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "rm -rf dist/ && concurrently \"pnpm build:code\" \"pnpm build:types\"",
|
|
7
|
+
"build:code": "tsup",
|
|
8
|
+
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
9
|
+
"dev": "concurrently \"pnpm dev:code\" \"pnpm dev:types\"",
|
|
10
|
+
"dev:code": "tsup --watch",
|
|
11
|
+
"dev:types": "tsc --emitDeclarationOnly --declaration --watch",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
14
|
+
"pub": "npm publish --tag latest --access=public"
|
|
15
|
+
},
|
|
16
|
+
"main": "./dist/index.min.js",
|
|
17
|
+
"module": "./dist/index.min.js",
|
|
18
|
+
"browser": "./dist/index.min.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": "./dist/index.min.js",
|
|
23
|
+
"types": "./dist/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./applog": {
|
|
26
|
+
"import": "./dist/applog.min.js",
|
|
27
|
+
"types": "./dist/applog.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./ipfs": {
|
|
30
|
+
"import": "./dist/ipfs.min.js",
|
|
31
|
+
"types": "./dist/ipfs.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./pubsub": {
|
|
34
|
+
"import": "./dist/pubsub.min.js",
|
|
35
|
+
"types": "./dist/pubsub.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./query": {
|
|
38
|
+
"import": "./dist/query.min.js",
|
|
39
|
+
"types": "./dist/query.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./stream": {
|
|
42
|
+
"import": "./dist/stream.min.js",
|
|
43
|
+
"types": "./dist/stream.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./types": {
|
|
46
|
+
"import": "./dist/types.min.js",
|
|
47
|
+
"types": "./dist/types.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./utils": {
|
|
50
|
+
"import": "./dist/utils.min.js",
|
|
51
|
+
"types": "./dist/utils.d.ts"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"./dist/"
|
|
56
|
+
],
|
|
57
|
+
"esm.sh": {
|
|
58
|
+
"bundle": false
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@ipld/car": "^5.2.4",
|
|
62
|
+
"@ipld/dag-json": "^10.1.5",
|
|
63
|
+
"@noble/hashes": "^1.3.2",
|
|
64
|
+
"@sinclair/typebox": "^0.31.28",
|
|
65
|
+
"besonders-logger": "1.0.0-RC11",
|
|
66
|
+
"date-fns": "^2.30.0",
|
|
67
|
+
"lodash-es": "^4.17.21",
|
|
68
|
+
"mobx": "^6.12.0",
|
|
69
|
+
"mobx-utils": "^6.0.8",
|
|
70
|
+
"multiformats": "^12.1.3",
|
|
71
|
+
"safe-stable-stringify": "^2.4.3"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@types/lodash-es": "^4.17.12",
|
|
75
|
+
"concurrently": "^8.2.2",
|
|
76
|
+
"esbuild-plugin-polyfill-node": "^0.3.0",
|
|
77
|
+
"tsup": "^8.0.1",
|
|
78
|
+
"tsupconfig": "workspace:^",
|
|
79
|
+
"typescript": "^5.0.2",
|
|
80
|
+
"vite": "^4.4.5"
|
|
81
|
+
}
|
|
48
82
|
}
|