@wovin/core 0.0.1-RC3 → 0.0.1-RC4
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/package.json +1 -1
- package/dist/apps/note3/src/data/Utils.d.ts +0 -42
- package/dist/apps/note3/src/data/Utils.d.ts.map +0 -1
- package/dist/apps/note3/src/types/util-types.d.ts +0 -27
- package/dist/apps/note3/src/types/util-types.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/data/applog-helpers.d.ts +0 -24
- package/dist/packages/@wovin/core/src/data/applog-helpers.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/data/applog-utils.d.ts +0 -40
- package/dist/packages/@wovin/core/src/data/applog-utils.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/data/datom-types.d.ts +0 -84
- package/dist/packages/@wovin/core/src/data/datom-types.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/index.d.ts +0 -2
- package/dist/packages/@wovin/core/src/index.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/ipfs/ipfs-utils.d.ts +0 -17
- package/dist/packages/@wovin/core/src/ipfs/ipfs-utils.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/mobx/mobx-utils.d.ts +0 -67
- package/dist/packages/@wovin/core/src/mobx/mobx-utils.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/queries/divergences.d.ts +0 -12
- package/dist/packages/@wovin/core/src/queries/divergences.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/queries/matchers.d.ts +0 -4
- package/dist/packages/@wovin/core/src/queries/matchers.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/queries/queries.d.ts +0 -58
- package/dist/packages/@wovin/core/src/queries/queries.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/stream/filters.d.ts +0 -38
- package/dist/packages/@wovin/core/src/stream/filters.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/stream/mapped.d.ts +0 -18
- package/dist/packages/@wovin/core/src/stream/mapped.d.ts.map +0 -1
- package/dist/packages/@wovin/core/src/stream/writeable.d.ts +0 -14
- package/dist/packages/@wovin/core/src/stream/writeable.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const overlayHack: () => void;
|
|
2
|
-
export declare const checkWorker: (...msg: any[]) => any[];
|
|
3
|
-
export declare const frozen: (obj: any) => Promise<any>;
|
|
4
|
-
export declare function utcMsTs(): number;
|
|
5
|
-
export declare function dateNowIso(): string;
|
|
6
|
-
export declare const BYGONZ_MUTATION_EVENT_NAME = "bygonzmutation";
|
|
7
|
-
export declare const allPromises: {
|
|
8
|
-
<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
|
9
|
-
<T_1 extends [] | readonly unknown[]>(values: T_1): Promise<{ -readonly [P in keyof T_1]: Awaited<T_1[P]>; }>;
|
|
10
|
-
};
|
|
11
|
-
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
12
|
-
/**
|
|
13
|
-
* JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
|
|
14
|
-
*
|
|
15
|
-
* https://github.com/garycourt/murmurhash-js/blob/master/murmurhash3_gc.js
|
|
16
|
-
*
|
|
17
|
-
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
18
|
-
* @see http://github.com/garycourt/murmurhash-js
|
|
19
|
-
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
20
|
-
* @see http://sites.google.com/site/murmurhash/
|
|
21
|
-
*
|
|
22
|
-
* @param {string} key ASCII only
|
|
23
|
-
* @param {number} seed Positive integer only
|
|
24
|
-
* @return {number} 32-bit positive integer hash
|
|
25
|
-
*/
|
|
26
|
-
export declare function murmurHash(key: string, seed: number, _rippedFrom?: string): number;
|
|
27
|
-
export declare function notNull<TValue>(value: TValue | null): value is TValue;
|
|
28
|
-
export declare function notUndefined<TValue>(value: TValue | undefined): value is TValue;
|
|
29
|
-
export declare function fnBrowserDetect(): any;
|
|
30
|
-
export declare function ab2str(buf: any): string;
|
|
31
|
-
export declare function str2ab(str: any): Uint16Array;
|
|
32
|
-
export declare function buf2hex(arrayBuffer: ArrayBuffer): string;
|
|
33
|
-
export declare function arrayBufferToBase64(buffer: any): string;
|
|
34
|
-
export declare function base64ToArray(base64: any): Uint8Array;
|
|
35
|
-
export declare function base64ToArrayBuffer(base64: any): ArrayBufferLike;
|
|
36
|
-
export declare function bufToBase64(arrayBuffer: ArrayBuffer): string;
|
|
37
|
-
export declare function base64ToUrlBase64(str: any): any;
|
|
38
|
-
export declare function bnToB64(bn: any, url?: boolean): any;
|
|
39
|
-
export declare function formatIfJson(str: string): string;
|
|
40
|
-
export declare const unwrapIfSingle: (arr: any[]) => any;
|
|
41
|
-
export declare function arraysContainSameElements(arr1: any, arr2: any): boolean;
|
|
42
|
-
//# sourceMappingURL=Utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../../../../../../apps/note3/src/data/Utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,YAavB,CAAA;AACD,eAAO,MAAM,WAAW,0BAMvB,CAAA;AAaD,eAAO,MAAM,MAAM,QAAe,GAAG,iBAAoC,CAAA;AAKzE,wBAAgB,OAAO,IAAI,MAAM,CAKhC;AACD,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED,eAAO,MAAM,0BAA0B,mBAAmB,CAAA;AAE1D,eAAO,MAAM,WAAW;;;CAA4B,CAAA;AAEpD,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAAoD,CAAA;AACpF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACzB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,WAAW,SAA6E,UAoDxF;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,IAAI,MAAM,CAErE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAE/E;AAED,wBAAgB,eAAe,QAkB9B;AAMD,wBAAgB,MAAM,CAAC,GAAG,KAAA,UAEzB;AACD,wBAAgB,MAAM,CAAC,GAAG,KAAA,eAOzB;AAiBD,wBAAgB,OAAO,CAAC,WAAW,EAAE,WAAW,UAU/C;AACD,wBAAgB,mBAAmB,CAAC,MAAM,KAAA,UAQzC;AACD,wBAAgB,aAAa,CAAC,MAAM,KAAA,cAOnC;AACD,wBAAgB,mBAAmB,CAAC,MAAM,KAAA,mBAEzC;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,UAEnD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,KAAA,OAEpC;AACD,wBAAgB,OAAO,CAAC,EAAE,KAAA,EAAE,GAAG,UAAQ,OAgBtC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAMvC;AAED,eAAO,MAAM,cAAc,QAAS,GAAG,EAAE,QAAoC,CAAA;AAE7E,wBAAgB,yBAAyB,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,WAenD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Type as T } from '@sinclair/typebox';
|
|
2
|
-
import { ApplogStream } from '@wovin/core/src/stream/stream';
|
|
3
|
-
export declare const ApplogStreamTB: import("@sinclair/typebox").TUnsafe<ApplogStream>;
|
|
4
|
-
declare const StringTB: (options?: import("@sinclair/typebox").StringOptions | undefined) => import("@sinclair/typebox").TString, OptionalTB: <T extends import("@sinclair/typebox").TSchema>(schema: T) => import("@sinclair/typebox").TOptional<T>, BooleanTB: (options?: import("@sinclair/typebox").SchemaOptions | undefined) => import("@sinclair/typebox").TBoolean, ObjectTB: <T extends import("@sinclair/typebox").TProperties>(properties: T, options?: import("@sinclair/typebox").ObjectOptions | undefined) => import("@sinclair/typebox").TObject<T>, NumberTB: (options?: import("@sinclair/typebox").NumericOptions<number> | undefined) => 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
|
-
export type LastElementOf<T extends readonly unknown[]> = T extends readonly [...unknown[], infer Last] ? Last : never;
|
|
23
|
-
export declare function checkParityTB(): void;
|
|
24
|
-
/** solidjs Setter requires returning something, which I often don't */
|
|
25
|
-
export type GenericSetter<T> = (newValue: T) => void;
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=util-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util-types.d.ts","sourceRoot":"","sources":["../../../../../../../../apps/note3/src/types/util-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAE5D,eAAO,MAAM,cAAc,mDAEvB,CAAA;AACJ,QA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C,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;AAG5D,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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { WriteableApplogStream } from '../stream/writeable';
|
|
2
|
-
import { Applog, ApplogForInsert, ApplogForInsertOptionalAgent, ApplogNoCid, Timestamp } from './datom-types';
|
|
3
|
-
export declare const sortApplogByTs: (p: Applog, n: Applog) => 0 | 1 | -1;
|
|
4
|
-
export declare const sortApplogByTsDec: (p: Applog, n: Applog) => 0 | 1 | -1;
|
|
5
|
-
export declare function filterOnlyLatest(logs: Applog[], onlyLatest: boolean): Applog[];
|
|
6
|
-
export declare function hasAg(log: ApplogForInsertOptionalAgent): log is ApplogForInsert;
|
|
7
|
-
export declare function hasTs(log: ApplogForInsert): log is Omit<ApplogForInsert, 'ts'> & {
|
|
8
|
-
ts: Timestamp;
|
|
9
|
-
};
|
|
10
|
-
export declare function hasPv(log: ApplogForInsert): log is ApplogForInsert & {
|
|
11
|
-
pv: string;
|
|
12
|
-
};
|
|
13
|
-
export declare function withTs(log: ApplogForInsert, ts: Timestamp): Omit<ApplogForInsert, "ts"> & {
|
|
14
|
-
ts: string;
|
|
15
|
-
};
|
|
16
|
-
export declare function withPv(log: ApplogNoCid, ds: WriteableApplogStream): {
|
|
17
|
-
pv: any;
|
|
18
|
-
at: string;
|
|
19
|
-
ts: string;
|
|
20
|
-
ag: string;
|
|
21
|
-
en: string;
|
|
22
|
-
vl: import("./datom-types").ApplogValue;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=applog-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applog-helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/data/applog-helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,4BAA4B,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI7G,eAAO,MAAM,cAAc,MAAO,MAAM,KAAK,MAAM,eAAiD,CAAA;AACpG,eAAO,MAAM,iBAAiB,MAAO,MAAM,KAAK,MAAM,eAAiD,CAAA;AAGvG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,EAAE,CAc9E;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,4BAA4B,GAAG,GAAG,IAAI,eAAe,CAE/E;AACD,wBAAgB,KAAK,CAAC,GAAG,EAAE,eAAe,GAAG,GAAG,IAAI,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,SAAS,CAAA;CAAE,CAElG;AACD,wBAAgB,KAAK,CAAC,GAAG,EAAE,eAAe,GAAG,GAAG,IAAI,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAEnF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,SAAS;;EAEzD;AACD,wBAAgB,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,qBAAqB;;;;;;;EASjE"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ApplogStream } from '../stream/stream';
|
|
2
|
-
import type { Applog, ApplogValue, DatalogQueryPattern, DatalogQueryResultEntry, ResultContext, SearchContext, ValueOrMatcher } from './datom-types';
|
|
3
|
-
export declare const isoDateStrCompare: (strA: string, strB: string, dir?: 'asc' | 'desc') => number;
|
|
4
|
-
/** Sort by TS (modifies the array, but also returns for ease of use) */
|
|
5
|
-
export declare function sortApplogsByTs(appLogArray: Applog[], dir?: 'asc' | 'desc'): Applog[];
|
|
6
|
-
export declare const isTsBefore: (log: Applog, logToCompare: Applog) => boolean;
|
|
7
|
-
export declare const uniqueEnFromAppLogs: (appLogArray: Applog[]) => string[];
|
|
8
|
-
export declare const areApplogsEqual: (logA: Applog, logB: Applog) => boolean;
|
|
9
|
-
export declare function joinStreams(streams: ApplogStream[]): ApplogStream;
|
|
10
|
-
export declare const removeDuplicateAppLogs: (appLogArray: Applog[]) => any[];
|
|
11
|
-
export declare const getHashID: (stringifiable: any, lngth?: number) => string;
|
|
12
|
-
export declare function isVariable(x: any): x is string;
|
|
13
|
-
export declare function variableNameWithoutQuestionmark(str: string): string;
|
|
14
|
-
export declare function isStaticPattern(x: any): x is ApplogValue;
|
|
15
|
-
export declare function resolveOrRemoveVariables(pattern: DatalogQueryPattern, candidate: SearchContext): {}[];
|
|
16
|
-
export declare function matchPartStatic(field: keyof Applog, patternPart: ValueOrMatcher<ApplogValue>, atomPart: ApplogValue): boolean;
|
|
17
|
-
export declare function matchPart(patternPart: ValueOrMatcher<ApplogValue>, atomPart: ApplogValue, context: SearchContext): ResultContext;
|
|
18
|
-
/**
|
|
19
|
-
* Check if pattern matches triple with context substitutions
|
|
20
|
-
*/
|
|
21
|
-
export declare function matchPattern(pattern: DatalogQueryPattern, applog: Applog, context: SearchContext): ResultContext;
|
|
22
|
-
export declare function actualize<SELECT extends string>(context: ResultContext, find: readonly SELECT[]): DatalogQueryResultEntry<SELECT>;
|
|
23
|
-
export declare const arrStats: {
|
|
24
|
-
max: (array: number[]) => number;
|
|
25
|
-
min: (array: number[]) => number;
|
|
26
|
-
range: (array: number[]) => number;
|
|
27
|
-
midrange: (array: number[]) => number;
|
|
28
|
-
sum: (array: number[]) => number;
|
|
29
|
-
mean: (array: number[]) => number;
|
|
30
|
-
average: (array: number[]) => number;
|
|
31
|
-
median: (array: number[]) => number;
|
|
32
|
-
modes: (array: number[]) => never[];
|
|
33
|
-
variance: (array: number[]) => number;
|
|
34
|
-
standardDeviation: (array: number[]) => number;
|
|
35
|
-
meanAbsoluteDeviation: (array: number[]) => number;
|
|
36
|
-
zScores: (array: number[]) => number[];
|
|
37
|
-
};
|
|
38
|
-
export declare const tsNearlySame: (timeA: string, timeB: string) => boolean;
|
|
39
|
-
export declare const cyrb53hash: (str: string, seed: number | undefined, strLength: number) => string;
|
|
40
|
-
//# sourceMappingURL=applog-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applog-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/data/applog-utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAqB,YAAY,EAAe,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EACX,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,cAAc,EACd,MAAM,eAAe,CAAA;AAItB,eAAO,MAAM,iBAAiB,SAAU,MAAM,QAAQ,MAAM,QAAO,KAAK,GAAG,MAAM,WAG5C,CAAA;AACrC,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,KAAK,GAAG,MAAc,YAEjF;AACD,eAAO,MAAM,UAAU,QAAS,MAAM,gBAAgB,MAAM,YAA0D,CAAA;AACtH,eAAO,MAAM,mBAAmB,gBAAiB,MAAM,EAAE,aAAyD,CAAA;AAClH,eAAO,MAAM,eAAe,SAAU,MAAM,QAAQ,MAAM,YAAoC,CAAA;AAE9F,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,gBAiClD;AAED,eAAO,MAAM,sB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UAAW,MAAM,SAAS,MAAM,YAAuD,CAAA;AAUhH,eAAO,MAAM,UAAU,QACjB,MAAM,uCAEA,MAAM,WAqBjB,CAAA"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Static, TSchema } from '@sinclair/typebox';
|
|
2
|
-
import { CID } from 'multiformats/cid';
|
|
3
|
-
import { PartialBy } from '../../../../../apps/note3/src/types/util-types';
|
|
4
|
-
export declare const Nullable: <T extends TSchema>(schema: T) => import("@sinclair/typebox").TUnion<[T, import("@sinclair/typebox").TNull]>;
|
|
5
|
-
export declare const EntityID_LENGTH = 7;
|
|
6
|
-
export declare const EntityID: import("@sinclair/typebox").TString;
|
|
7
|
-
export type EntityID = Static<typeof EntityID>;
|
|
8
|
-
export type DatomPart = string;
|
|
9
|
-
export type CidString = string;
|
|
10
|
-
export type AgentID = EntityID;
|
|
11
|
-
export type Attribute = string;
|
|
12
|
-
export type ApplogValue = string | boolean | Number | null;
|
|
13
|
-
export interface Atom {
|
|
14
|
-
en: EntityID;
|
|
15
|
-
at: Attribute;
|
|
16
|
-
vl: ApplogValue;
|
|
17
|
-
}
|
|
18
|
-
export type AgentHash = string;
|
|
19
|
-
export type Timestamp = string;
|
|
20
|
-
export interface Applog extends Atom {
|
|
21
|
-
cid: CidString;
|
|
22
|
-
pv?: CidString | CID;
|
|
23
|
-
ts: Timestamp;
|
|
24
|
-
ag: AgentHash;
|
|
25
|
-
}
|
|
26
|
-
export type ApplogNoCid = Omit<Applog, 'cid'>;
|
|
27
|
-
export type ApplogOptionalCid = PartialBy<Applog, 'cid'>;
|
|
28
|
-
export type ApplogForInsert = PartialBy<ApplogNoCid, 'ts'>;
|
|
29
|
-
export type ApplogForInsertOptionalAgent = PartialBy<ApplogForInsert, 'ag'>;
|
|
30
|
-
export type AtomPattern = Atom | Applog;
|
|
31
|
-
export interface DatalogStateIdentifier {
|
|
32
|
-
lastTS: Timestamp;
|
|
33
|
-
}
|
|
34
|
-
export type ValueOrMatcher<T> = T | readonly T[] | ((value: T) => boolean);
|
|
35
|
-
export type WithMatchers<T extends Record<string, any>> = {
|
|
36
|
-
[K in keyof T & string as `${K}` | `!${K}`]?: ValueOrMatcher<T[K]>;
|
|
37
|
-
};
|
|
38
|
-
export type DatalogQueryPattern = Partial<WithMatchers<AtomPattern>>;
|
|
39
|
-
export type DatalogQueryPatternArray = DatalogQueryPattern[];
|
|
40
|
-
export interface DatalogQuery<SELECT extends string> {
|
|
41
|
-
find: readonly SELECT[];
|
|
42
|
-
where: DatalogQueryPatternArray;
|
|
43
|
-
onlyLatest?: boolean;
|
|
44
|
-
}
|
|
45
|
-
export type DatalogQueryResultEntry<SELECT extends string> = Record<StripPrefix<'?', SELECT>, DatomPart>;
|
|
46
|
-
export type DatalogQueryResultRows<SELECT extends string> = DatalogQueryResultEntry<SELECT>[];
|
|
47
|
-
export interface SearchContext {
|
|
48
|
-
[key: string]: ApplogValue;
|
|
49
|
-
}
|
|
50
|
-
export interface SearchContextWithLog {
|
|
51
|
-
context: SearchContext;
|
|
52
|
-
applog?: Applog;
|
|
53
|
-
}
|
|
54
|
-
export type ResultContext = SearchContext | null;
|
|
55
|
-
type StripPrefix<TPrefix extends string, T extends string> = T extends `${TPrefix}${infer R}` ? R : never;
|
|
56
|
-
export declare const CIDTB: import("@sinclair/typebox").TString;
|
|
57
|
-
export type CIDTB = Static<typeof EntityID>;
|
|
58
|
-
export declare const URL: import("@sinclair/typebox").TString;
|
|
59
|
-
export type URL = Static<typeof URL>;
|
|
60
|
-
export declare const AppLogTB: import("@sinclair/typebox").TObject<{
|
|
61
|
-
en: import("@sinclair/typebox").TString;
|
|
62
|
-
at: import("@sinclair/typebox").TString;
|
|
63
|
-
vl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNull]>;
|
|
64
|
-
ts: import("@sinclair/typebox").TString;
|
|
65
|
-
ag: import("@sinclair/typebox").TString;
|
|
66
|
-
}>;
|
|
67
|
-
export type AppLogTB = Static<typeof AppLogTB>;
|
|
68
|
-
export declare const AppLogTBC: import("@sinclair/typebox/compiler").TypeCheck<import("@sinclair/typebox").TObject<{
|
|
69
|
-
en: import("@sinclair/typebox").TString;
|
|
70
|
-
at: import("@sinclair/typebox").TString;
|
|
71
|
-
vl: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNull]>;
|
|
72
|
-
ts: import("@sinclair/typebox").TString;
|
|
73
|
-
ag: import("@sinclair/typebox").TString;
|
|
74
|
-
}>>;
|
|
75
|
-
export declare const getApplogTypeErrors: (obj: any) => import("@sinclair/typebox/compiler").ValueError[];
|
|
76
|
-
export declare const isValidApplog: (value: unknown) => value is {
|
|
77
|
-
at: string;
|
|
78
|
-
ts: string;
|
|
79
|
-
ag: string;
|
|
80
|
-
en: string;
|
|
81
|
-
vl: string | number | boolean | null;
|
|
82
|
-
};
|
|
83
|
-
export {};
|
|
84
|
-
//# sourceMappingURL=datom-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datom-types.d.ts","sourceRoot":"","sources":["../../../../../../src/data/datom-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,MAAM,EAAE,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE1E,eAAO,MAAM,QAAQ,8GAAsE,CAAA;AAC3F,eAAO,MAAM,eAAe,IAAI,CAAA;AAShC,eAAO,MAAM,QAAQ,qCAAsC,CAAA;AAC3D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE9C,MAAM,MAAM,SAAS,GAAG,MAA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AG,GAAG,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;AAEpC,eAAO,MAAM,QAAQ;;;;;;EAMnB,CAAA;AACF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE9C,eAAO,MAAM,SAAS;;;;;;GAAiC,CAAA;AACvD,eAAO,MAAM,mBAAmB,QAAS,GAAG,sDAAsC,CAAA;AAClF,eAAO,MAAM,aAAa;;;;;;CAAkC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAU,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as dagJson from '@ipld/dag-json';
|
|
2
|
-
import { CID } from 'multiformats';
|
|
3
|
-
import { Applog, ApplogForInsert, ApplogNoCid } from '../data/datom-types';
|
|
4
|
-
export declare function prepareForPub(log: Applog | ApplogForInsert, without?: string[]): Applog;
|
|
5
|
-
export declare function encodeApplogAndGetCid(log: ApplogNoCid): CID<unknown, 297, 18, 1>;
|
|
6
|
-
export declare function encodeApplog(log: ApplogNoCid): {
|
|
7
|
-
bytes: import("multiformats").ByteView<any>;
|
|
8
|
-
cid: CID<unknown, 297, 18, 1>;
|
|
9
|
-
};
|
|
10
|
-
export declare function getCidSync(bytes: dagJson.ByteView<any>): CID<unknown, 297, 18, 1>;
|
|
11
|
-
/** encode the json object into an IPLD block */
|
|
12
|
-
export declare function encodeBlock(jsonObject: any): {
|
|
13
|
-
bytes: import("multiformats").ByteView<any>;
|
|
14
|
-
cid: CID<unknown, 297, 18, 1>;
|
|
15
|
-
};
|
|
16
|
-
export declare function encodeBlockOriginal(jsonObject: any): Promise<import("multiformats").BlockView<unknown, 297, 18, 1>>;
|
|
17
|
-
//# sourceMappingURL=ipfs-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ipfs-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/ipfs/ipfs-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAGzC,OAAO,EAAE,GAAG,EAAoB,MAAM,cAAc,CAAA;AAGpD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAQ1E,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,OAAO,GAAE,MAAM,EAAY,UAcvF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,4BAErD;AACD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW;;;EAE5C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAOtD;AACD,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,UAAU,EAAE,GAAG;;;EAI1C;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,GAAG,kEAQxD"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { comparer, IComputedValue, IObservableArray } from 'mobx';
|
|
2
|
-
import { IComputedFnOptions } from 'mobx-utils/lib/computedFn';
|
|
3
|
-
import { DatalogQueryPattern } from '../data/datom-types';
|
|
4
|
-
import { QueryNodes } from '../queries/queries';
|
|
5
|
-
import { ApplogStream } from '../stream/stream';
|
|
6
|
-
export declare const createDebugName: ({ caller, stream, pattern: args }: {
|
|
7
|
-
caller?: string | undefined;
|
|
8
|
-
stream?: ApplogStream | undefined;
|
|
9
|
-
pattern?: string | Partial<import("../data/datom-types").WithMatchers<import("../data/datom-types").AtomPattern>> | undefined;
|
|
10
|
-
}) => string;
|
|
11
|
-
export declare const createDebugNameObj: (args: Parameters<typeof createDebugName>[0]) => {
|
|
12
|
-
readonly name: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function computedStructuralComparer<T>(a: IComputedValue<T>, b: IComputedValue<T>): boolean;
|
|
15
|
-
export declare function applogStreamComparer(a: ApplogStream, b: ApplogStream): boolean;
|
|
16
|
-
export declare function queryNodesComparer(a: QueryNodes, b: QueryNodes): boolean;
|
|
17
|
-
export declare function observableArrayMap<T>(fn: () => T[], { name, equals }?: {
|
|
18
|
-
name?: string;
|
|
19
|
-
equals?: typeof comparer.structural;
|
|
20
|
-
}): IObservableArray<T>;
|
|
21
|
-
/**
|
|
22
|
-
* ADAPTED from https://github.com/mobxjs/mobx-utils/blob/362cbbfb384820d416f253eddc532ebecba89bcb/src/computedFn.ts#L50 to
|
|
23
|
-
* - deep-compare arguments
|
|
24
|
-
* - allow dynamic/optional args
|
|
25
|
-
* - not be so friggin complicated... DeepMap... closest... why?!
|
|
26
|
-
*
|
|
27
|
-
* // TODO: PR upstream
|
|
28
|
-
*
|
|
29
|
-
* computedFnDeepCompare takes a function with an arbitrary amount of arguments,
|
|
30
|
-
* and memoizes the output of the function based on the arguments passed in.
|
|
31
|
-
*
|
|
32
|
-
* computedFnDeepCompare(fn) returns a function with the very same signature. There is no limit on the amount of arguments
|
|
33
|
-
* that is accepted.
|
|
34
|
-
*
|
|
35
|
-
* By default the output of a function call will only be memoized as long as the
|
|
36
|
-
* output is being observed.
|
|
37
|
-
*
|
|
38
|
-
* The function passes into `computedFnDeepCompare` should be pure, not be an action and only be relying on
|
|
39
|
-
* observables.
|
|
40
|
-
*
|
|
41
|
-
* Setting `keepAlive` to `true` will cause the output to be forcefully cached forever.
|
|
42
|
-
* Note that this might introduce memory leaks!
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* const store = observable({
|
|
46
|
-
a: 1,
|
|
47
|
-
b: 2,
|
|
48
|
-
c: 3,
|
|
49
|
-
m: computedFnDeepCompare(function(x) {
|
|
50
|
-
return this.a * this.b * x
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const d = autorun(() => {
|
|
55
|
-
// store.m(3) will be cached as long as this autorun is running
|
|
56
|
-
console.log(store.m(3) * store.c)
|
|
57
|
-
})
|
|
58
|
-
*
|
|
59
|
-
* @param fn
|
|
60
|
-
* @param keepAliveOrOptions
|
|
61
|
-
*/
|
|
62
|
-
export declare function computedFnDeepCompare<T extends (...args: any[]) => any>(fn: T, keepAliveOrOptions?: (IComputedFnOptions<T> & {
|
|
63
|
-
name?: string;
|
|
64
|
-
argsDebugName?: (...args: Parameters<T>) => string;
|
|
65
|
-
}) | boolean): T;
|
|
66
|
-
export declare function prettifyStreamName(input: string): string;
|
|
67
|
-
//# sourceMappingURL=mobx-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mobx-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/mobx/mobx-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,QAAQ,EAKR,cAAc,EACd,gBAAgB,EAShB,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AA8B/C,eAAO,MAAM,eAAe;;;;YAS3B,CAAA;AACD,eAAO,MAAM,kBAAkB,SAAU,WAAW,sBAAsB,CAAC,CAAC,CAAC,CAAC;;CAE7E,CAAA;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,WAEvF;AACD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,WAEpE;AACD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,WAc9D;AAGD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,QAAQ,CAAC,UAAU,CAAA;CAC9B,uBAkEL;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACtE,EAAE,EAAE,CAAC,EACL,kBAAkB,GAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;CAAE,CAAC,GAAG,OAAe,GACnI,CAAC,CAqEH;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgCxD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Applog } from '../data/datom-types';
|
|
2
|
-
import { ApplogStream } from '../stream/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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divergences.d.ts","sourceRoot":"","sources":["../../../../../../src/queries/divergences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,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;;;EAmCQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../../../../../src/queries/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,QACvB,SAAS,aACrB;AACD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAC3B,SAAS,aACrB"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Applog, ApplogValue, DatalogQueryPattern, EntityID, SearchContext } from '../data/datom-types';
|
|
2
|
-
import { ApplogStream } from '../stream/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
|
-
export declare const withoutHistory: (stream: ApplogStream, { inverseToOnlyReturnFirstLogs, tolerateAlreadyFiltered }?: {
|
|
23
|
-
inverseToOnlyReturnFirstLogs?: boolean | undefined;
|
|
24
|
-
tolerateAlreadyFiltered?: boolean | undefined;
|
|
25
|
-
}) => ApplogStream;
|
|
26
|
-
export declare const withoutDeleted: (stream: ApplogStream) => import("../stream/mapped").MappedApplogStream;
|
|
27
|
-
export declare const query: (stream: ApplogStream, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], startVariables?: SearchContext, opts?: {
|
|
28
|
-
debug?: boolean;
|
|
29
|
-
}) => QueryNodes;
|
|
30
|
-
export declare const queryStep: (stream: ApplogStream, nodeSet: QueryNodes | null, pattern: DatalogQueryPattern, opts?: {
|
|
31
|
-
debug?: boolean;
|
|
32
|
-
}) => QueryNodes;
|
|
33
|
-
export declare const queryNot: (stream: ApplogStream, startNodes: QueryNodes, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], opts?: {
|
|
34
|
-
debug?: boolean;
|
|
35
|
-
}) => QueryNodes;
|
|
36
|
-
export declare const filterAndMap: <R>(stream: ApplogStream, pattern: DatalogQueryPattern, mapper: keyof Applog | Partial<{
|
|
37
|
-
cid: string;
|
|
38
|
-
pv?: string | undefined;
|
|
39
|
-
ts: string;
|
|
40
|
-
ag: string;
|
|
41
|
-
en: string;
|
|
42
|
-
at: string;
|
|
43
|
-
vl: string;
|
|
44
|
-
}> | ((applog: Applog) => R)) => import("mobx").IObservableArray<any>;
|
|
45
|
-
export declare const queryAndMap: <R>(stream: ApplogStream, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], map: string | ((record: SearchContext) => R), variables?: SearchContext) => import("mobx").IObservableArray<any>;
|
|
46
|
-
export declare const queryEntity: <R>(stream: ApplogStream, name: string, entityID: EntityID, attributes: string[]) => import("mobx").IComputedValue<{
|
|
47
|
-
[k: string]: ApplogValue;
|
|
48
|
-
} | null>;
|
|
49
|
-
export declare const agentsOfStream: <R>(stream: ApplogStream) => import("mobx").ObservableMap<string, number>;
|
|
50
|
-
export declare const entityOverlap: (streamA: ApplogStream, streamB: ApplogStream) => import("mobx").IComputedValue<string[]>;
|
|
51
|
-
export declare const entityOverlapCount: (streamA: ApplogStream, streamB: ApplogStream) => import("mobx").IComputedValue<number>;
|
|
52
|
-
export declare function mapTo(applogFieldMap: Partial<{
|
|
53
|
-
[key in keyof Applog]: string;
|
|
54
|
-
}>): (applog: any) => SearchContext;
|
|
55
|
-
export declare function startsWith(str: string): (value: any) => any;
|
|
56
|
-
export declare function prefixAttrs(prefix: string, attrs: string[]): string[];
|
|
57
|
-
export declare function prefixAt(prefix: string, attr: string): string;
|
|
58
|
-
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../../../src/queries/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAgBvG,OAAO,EAAE,YAAY,EAAkC,MAAM,kBAAkB,CAAA;AAkB/E,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,eAAO,MAAM,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;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAEpD"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IObservableArray, ObservableMap, ObservableSet } from 'mobx';
|
|
2
|
-
import { Applog, DatalogQueryPattern } from '../data/datom-types';
|
|
3
|
-
import { MappedApplogStream } from './mapped';
|
|
4
|
-
import { ApplogEventMapper, ApplogStream, ApplogStreamEvent } from './stream';
|
|
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 | readonly string[] | ((value: string) => boolean) | readonly import("../data/datom-types").ApplogValue[] | ((value: import("../data/datom-types").ApplogValue) => boolean) | null;
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAA;AAI1F,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,cAU/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,18 +0,0 @@
|
|
|
1
|
-
import { Applog } from '../data/datom-types';
|
|
2
|
-
import { ApplogEventMapper, ApplogStream, ApplogStreamEvent } from './stream';
|
|
3
|
-
export declare class MappedApplogStream extends ApplogStream {
|
|
4
|
-
readonly _initialLogs: readonly Applog[];
|
|
5
|
-
private _eventMapper;
|
|
6
|
-
readonly name: string;
|
|
7
|
-
private _parentSubscriptions;
|
|
8
|
-
constructor(parents: ApplogStream | ApplogStream[], filters: string[], _initialLogs: readonly Applog[], _eventMapper: ApplogEventMapper, name: string);
|
|
9
|
-
get readOnly(): any;
|
|
10
|
-
private subscribeToParent;
|
|
11
|
-
/**
|
|
12
|
-
* // HACK to trigger remap on pattern change in rollingFilter
|
|
13
|
-
* should not be used lightly
|
|
14
|
-
*/
|
|
15
|
-
triggerRemap(): void;
|
|
16
|
-
protected onParentUpdate(stream: ApplogStream, event: ApplogStreamEvent): void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=mapped.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapped.d.ts","sourceRoot":"","sources":["../../../../../../src/stream/mapped.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAA;AAI1F,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,QAGX;IAED,OAAO,CAAC,iBAAiB;IA0BzB;;;OAGG;IACH,YAAY;IAOZ,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB;CA8BvE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Applog, ApplogForInsert } from '../data/datom-types';
|
|
2
|
-
import { ApplogStream } from './stream';
|
|
3
|
-
export declare abstract class WriteableApplogStream extends ApplogStream {
|
|
4
|
-
constructor(parents: ApplogStream | ApplogStream[] | null, filters: string[], applogs: Applog[] | undefined, name: string);
|
|
5
|
-
insert(appLogsToInsert: ApplogForInsert[]): Applog[];
|
|
6
|
-
protected abstract persist(logs: Applog[]): any;
|
|
7
|
-
}
|
|
8
|
-
export declare class ApplogStreamInMemory extends WriteableApplogStream {
|
|
9
|
-
readonly _readOnly: boolean;
|
|
10
|
-
constructor(applogs: Applog[], filters: string[], name: string, _readOnly: boolean, parents?: ApplogStream | ApplogStream[] | null);
|
|
11
|
-
get readOnly(): boolean;
|
|
12
|
-
protected persist(logs: Applog[]): void;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=writeable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writeable.d.ts","sourceRoot":"","sources":["../../../../../../src/stream/writeable.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAsC,MAAM,qBAAqB,CAAA;AAEtG,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC,8BAAsB,qBAAsB,SAAQ,YAAY;gBAE9D,OAAO,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,IAAI,EAC7C,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,sBAAe,EACtB,IAAI,EAAE,MAAM;IASN,MAAM,CAAC,eAAe,EAAE,eAAe,EAAE;IAoChD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;CACzC;AACD,qBAAa,oBAAqB,SAAQ,qBAAqB;IAK7D,QAAQ,CAAC,SAAS,EAAE,OAAO;gBAH3B,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"}
|