@wovin/core 0.0.1 → 0.0.3-RC1
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 -0
- package/dist/applog.d.ts.map +1 -0
- package/dist/applog.min.js +2 -0
- package/dist/applog.min.js.map +1 -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-7IDQIMQO.min.js.map +1 -0
- package/dist/chunk-F3MRAJXL.min.js +2 -0
- package/dist/chunk-F3MRAJXL.min.js.map +1 -0
- package/dist/chunk-HHXZXKNM.min.js +7 -0
- package/dist/chunk-HHXZXKNM.min.js.map +1 -0
- package/dist/chunk-HNATM27J.min.js +2 -0
- package/dist/chunk-HNATM27J.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-RPPZKO5L.min.js +1 -0
- package/dist/chunk-RPPZKO5L.min.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- 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 -0
- package/dist/ipfs.d.ts.map +1 -0
- package/dist/ipfs.min.js +2 -0
- package/dist/ipfs.min.js.map +1 -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 +7 -0
- package/dist/pubsub/publication.d.ts.map +1 -0
- package/dist/pubsub/pubsub-types.d.ts +36 -0
- package/dist/pubsub/pubsub-types.d.ts.map +1 -0
- package/dist/pubsub.d.ts +4 -0
- package/dist/pubsub.d.ts.map +1 -0
- package/dist/pubsub.min.js +2 -0
- package/dist/pubsub.min.js.map +1 -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/stream/mapped.d.ts +19 -0
- package/dist/stream/mapped.d.ts.map +1 -0
- package/dist/stream/writeable.d.ts +17 -0
- package/dist/stream/writeable.d.ts.map +1 -0
- package/dist/stream.d.ts +5 -0
- 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 -0
- 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 -0
- 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 +69 -6
- package/dist/index.js +0 -5
- package/src/index.ts +0 -1
|
@@ -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;IAMrC,IAAI,MAAM,kBAET;IAED,IAAI,UAAU,iBAMb;CACD;AACD,qBAAa,UAAU;IAEd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;gBAAvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAS/B,IAAI,IAAI,WAEP;IACD,IAAI,OAAO,YAEV;IACD,IAAI,aAAa,WAEhB;IAED,IAAI,OAAO,oBAEV;IACD,IAAI,UAAU,0BAEb;IACD,IAAI,aAAa,mBAEhB;IACD,IAAI,UAAU,iBAEb;CACD;AAMD;;GAEG;AACH,eAAO,MAAM,cAAc,WAClB,YAAY;mCAEY,OAAO;8BACZ,OAAO;kBAkFC,CAAA;AAEpC;;;GAGG;AACH,eAAO,MAAM,cAAc,WAClB,YAAY,2CAsBe,CAAA;AAoBpC,eAAO,MAAM,KAAK,WACT,YAAY,qBACD,mBAAmB,GAAG,mBAAmB,EAAE,mBAC9C,aAAa,SACvB;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,eAiBQ,CAAA;AAElC,eAAO,MAAM,SAAS,WACb,YAAY,WACX,UAAU,GAAG,IAAI,WACjB,mBAAmB,SAEtB;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,eAgEQ,CAAA;AAElC,eAAO,MAAM,QAAQ,WACZ,YAAY,cACR,UAAU,qBACH,mBAAmB,GAAG,mBAAmB,EAAE,SACxD;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,eAoBQ,CAAA;AA8BlC,eAAO,MAAM,YAAY,cAChB,YAAY,WACX,mBAAmB;;;;;;;;eACsD,MAAM,gDAqBtD,CAAA;AAEnC,eAAO,MAAM,WAAW,cACf,YAAY,qBACD,mBAAmB,GAAG,mBAAmB,EAAE,0BACtC,aAAa,qBAC1B,aAAa,yCAqBU,CAAA;AAEnC,eAAO,MAAM,WAAW,cACf,YAAY,QACd,MAAM,YACF,QAAQ,cACN,MAAM,EAAE;;EAWqB,CAAA;AAE1C,eAAO,MAAM,cAAc,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.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAKpE,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAA;AAC7H,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,IAAI;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAE1F;AAED,8BAAsB,YAAY;IAQhC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM;IARtB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IACvC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC,EAAE,CAAK;gBAGlE,OAAO,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,IAAI,EAC7C,OAAO,EAAE,MAAM,EAAE,EACP,QAAQ,EAAE,MAAM,EAAO,EACxB,IAAI,EAAE,MAAM;IAiBtB,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAA;IAEhC,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;IAKtD,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;IAOxD,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,iBAAiB;IAOpD,IAAI,OAAO,IAAI,SAAS,MAAM,EAAE,CAG/B;IAEM,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC;IAKvC,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
|
|
@@ -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,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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
readonly _initialLogs: readonly Applog[];
|
|
6
|
+
private _eventMapper;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
private _parentSubscriptions;
|
|
9
|
+
constructor(parents: ApplogStream | ApplogStream[], filters: string[], _initialLogs: readonly Applog[], _eventMapper: ApplogEventMapper, name: string);
|
|
10
|
+
get readOnly(): boolean;
|
|
11
|
+
private subscribeToParent;
|
|
12
|
+
/**
|
|
13
|
+
* // HACK to trigger remap on pattern change in rollingFilter
|
|
14
|
+
* should not be used lightly
|
|
15
|
+
*/
|
|
16
|
+
triggerRemap(): void;
|
|
17
|
+
protected onParentUpdate(stream: ApplogStream, event: ApplogStreamEvent): void;
|
|
18
|
+
}
|
|
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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Applog, ApplogForInsert } from '../applog/datom-types';
|
|
2
|
+
import { ApplogStream } from './basic';
|
|
3
|
+
export declare abstract class WriteableApplogStream extends ApplogStream {
|
|
4
|
+
constructor(parents: ApplogStream | ApplogStream[] | null, filters: string[], applogs: Applog[], name: string);
|
|
5
|
+
insert(appLogsToInsert: ApplogForInsert[]): Applog[];
|
|
6
|
+
get readOnly(): boolean;
|
|
7
|
+
protected abstract persist(logs: Applog[]): any;
|
|
8
|
+
}
|
|
9
|
+
export declare class ApplogStreamInMemory extends WriteableApplogStream {
|
|
10
|
+
readonly _readOnly: boolean;
|
|
11
|
+
static empty(name?: string): ApplogStreamInMemory;
|
|
12
|
+
static fromArray(applogs: Applog[], name?: string, readOnly?: boolean): ApplogStreamInMemory;
|
|
13
|
+
constructor(applogs: Applog[], filters: string[], name: string, _readOnly: boolean, parents?: ApplogStream | ApplogStream[] | null);
|
|
14
|
+
get readOnly(): boolean;
|
|
15
|
+
protected persist(logs: Applog[]): void;
|
|
16
|
+
}
|
|
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
ADDED
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-utils.d.ts","sourceRoot":"","sources":["../../src/types/typescript-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,eAAO,MAAM,cAAc,mDAEvB,CAAA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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
ADDED
|
@@ -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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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,18 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wovin/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-RC1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
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",
|
|
7
12
|
"lint": "eslint .",
|
|
8
|
-
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
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
|
+
}
|
|
9
53
|
},
|
|
10
|
-
"main": "src/index.ts",
|
|
11
|
-
"types": "src/index.ts",
|
|
12
54
|
"files": [
|
|
13
|
-
"dist/"
|
|
55
|
+
"./dist/"
|
|
14
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
|
+
},
|
|
15
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:^",
|
|
16
79
|
"typescript": "^5.0.2",
|
|
17
80
|
"vite": "^4.4.5"
|
|
18
81
|
}
|
package/dist/index.js
DELETED
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const wovinCoreTest = 12345.7
|