@powerhousedao/analytics-engine-browser 0.6.2 → 0.6.4
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/src/BrowserAnalyticsStore.d.ts +8 -0
- package/dist/src/BrowserAnalyticsStore.d.ts.map +1 -0
- package/dist/src/MemoryAnalyticsStore.d.ts +24 -0
- package/dist/src/MemoryAnalyticsStore.d.ts.map +1 -0
- package/dist/src/PgLiteExecutor.d.ts +16 -0
- package/dist/src/PgLiteExecutor.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/{build → dist/src}/index.js +2 -5
- package/package.json +7 -9
- package/build/index.js.map +0 -403
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MemoryAnalyticsStore, type MemoryAnalyticsStoreOptions } from "./MemoryAnalyticsStore.js";
|
|
2
|
+
export type BrowserAnalyticsStoreOptions = MemoryAnalyticsStoreOptions & {
|
|
3
|
+
databaseName: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class BrowserAnalyticsStore extends MemoryAnalyticsStore {
|
|
6
|
+
constructor(options?: BrowserAnalyticsStoreOptions);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=BrowserAnalyticsStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowserAnalyticsStore.d.ts","sourceRoot":"","sources":["../../src/BrowserAnalyticsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EACjC,MAAM,2BAA2B,CAAC;AAGnC,MAAM,MAAM,4BAA4B,GAAG,2BAA2B,GAAG;IACvE,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAa,qBAAsB,SAAQ,oBAAoB;gBAE3D,OAAO,GAAE,4BAA4D;CAYxE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type IAnalyticsProfiler } from "@powerhousedao/analytics-engine-core";
|
|
2
|
+
import { KnexAnalyticsStore, type SqlQueryLogger, type SqlResultsLogger } from "@powerhousedao/analytics-engine-knex";
|
|
3
|
+
import type { Knex } from "knex";
|
|
4
|
+
import { PGlite } from "@electric-sql/pglite";
|
|
5
|
+
export type MemoryAnalyticsStoreOptions = {
|
|
6
|
+
pgLiteFactory?: () => Promise<PGlite>;
|
|
7
|
+
knex?: Knex;
|
|
8
|
+
queryLogger?: SqlQueryLogger;
|
|
9
|
+
resultsLogger?: SqlResultsLogger;
|
|
10
|
+
profiler?: IAnalyticsProfiler;
|
|
11
|
+
};
|
|
12
|
+
export declare class MemoryAnalyticsStore extends KnexAnalyticsStore {
|
|
13
|
+
private _pgLiteFactory;
|
|
14
|
+
private _queryLogger;
|
|
15
|
+
private _resultsLogger;
|
|
16
|
+
private _pgExecutor;
|
|
17
|
+
private _profiler;
|
|
18
|
+
private _sql;
|
|
19
|
+
constructor({ knex, pgLiteFactory, queryLogger, resultsLogger, profiler, }?: MemoryAnalyticsStoreOptions);
|
|
20
|
+
init(): Promise<void>;
|
|
21
|
+
raw(sql: string): Promise<any[]>;
|
|
22
|
+
destroy(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=MemoryAnalyticsStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryAnalyticsStore.d.ts","sourceRoot":"","sources":["../../src/MemoryAnalyticsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAgF9C,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,OAAO,CAAC,cAAc,CAAwB;IAC9C,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,cAAc,CAAmB;IACzC,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,IAAI,CAAuB;gBAEhB,EACjB,IAAI,EACJ,aAAa,EACb,WAAW,EACX,aAAa,EACb,QAAQ,GACT,GAAE,2BAAgC;IA4BtB,IAAI;IAUJ,GAAG,CAAC,GAAG,EAAE,MAAM;IAYf,OAAO;CAKrB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PGlite } from "@electric-sql/pglite";
|
|
2
|
+
import { type IAnalyticsProfiler } from "@powerhousedao/analytics-engine-core";
|
|
3
|
+
import type { IKnexQueryExecutor, SqlQueryLogger, SqlResultsLogger } from "@powerhousedao/analytics-engine-knex";
|
|
4
|
+
import type { Knex } from "knex";
|
|
5
|
+
export declare const parseRawResults: (rawResults: any[]) => any[];
|
|
6
|
+
export declare class PGLiteQueryExecutor implements IKnexQueryExecutor {
|
|
7
|
+
private readonly _profiler;
|
|
8
|
+
private readonly _queryLogger?;
|
|
9
|
+
private readonly _resultsLogger?;
|
|
10
|
+
private _index;
|
|
11
|
+
private _sql;
|
|
12
|
+
constructor(_profiler: IAnalyticsProfiler, _queryLogger?: SqlQueryLogger | undefined, _resultsLogger?: SqlResultsLogger | undefined);
|
|
13
|
+
init(sql: PGlite): void;
|
|
14
|
+
execute<T extends {}, U>(query: Knex.QueryBuilder<T, U>): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=PgLiteExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PgLiteExecutor.d.ts","sourceRoot":"","sources":["../../src/PgLiteExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEjC,eAAO,MAAM,eAAe,GAAI,YAAY,GAAG,EAAE,UAqBhD,CAAC;AAEF,qBAAa,mBAAoB,YAAW,kBAAkB;IAK1D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IANlC,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,IAAI,CAAuB;gBAGhB,SAAS,EAAE,kBAAkB,EAC7B,YAAY,CAAC,EAAE,cAAc,YAAA,EAC7B,cAAc,CAAC,EAAE,gBAAgB,YAAA;IAKpD,IAAI,CAAC,GAAG,EAAE,MAAM;IAIV,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;CA4B9D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { MemoryAnalyticsStore } from "./MemoryAnalyticsStore.js";
|
|
2
|
+
export { BrowserAnalyticsStore } from "./BrowserAnalyticsStore.js";
|
|
3
|
+
export type { MemoryAnalyticsStoreOptions } from "./MemoryAnalyticsStore.js";
|
|
4
|
+
export type { BrowserAnalyticsStoreOptions } from "./BrowserAnalyticsStore.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,YAAY,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -43554,7 +43554,7 @@ ${t2}`), i4 = h(this, y3).getSize();
|
|
|
43554
43554
|
};
|
|
43555
43555
|
});
|
|
43556
43556
|
|
|
43557
|
-
// ../core/
|
|
43557
|
+
// ../core/dist/src/index.js
|
|
43558
43558
|
class PassthroughAnalyticsProfiler {
|
|
43559
43559
|
get prefix() {
|
|
43560
43560
|
return "";
|
|
@@ -48147,7 +48147,7 @@ class AnalyticsSubscriptionManager {
|
|
|
48147
48147
|
}
|
|
48148
48148
|
}
|
|
48149
48149
|
|
|
48150
|
-
// ../knex/
|
|
48150
|
+
// ../knex/dist/src/index.js
|
|
48151
48151
|
class LuxonError2 extends Error {
|
|
48152
48152
|
}
|
|
48153
48153
|
|
|
@@ -63316,6 +63316,3 @@ export {
|
|
|
63316
63316
|
MemoryAnalyticsStore,
|
|
63317
63317
|
BrowserAnalyticsStore
|
|
63318
63318
|
};
|
|
63319
|
-
|
|
63320
|
-
//# debugId=75777F70067126E964756E2164756E21
|
|
63321
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/analytics-engine-browser",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,31 +13,29 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/src/index.d.ts",
|
|
16
|
-
"default": "./
|
|
16
|
+
"default": "./dist/src/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"
|
|
21
|
-
"./build/index.js.map",
|
|
22
|
-
"./dist/index.d.ts"
|
|
20
|
+
"dist/src"
|
|
23
21
|
],
|
|
24
22
|
"dependencies": {
|
|
25
|
-
"vite-plugin-node-polyfills": "0.25.0",
|
|
26
23
|
"@electric-sql/pglite": "0.3.15",
|
|
27
24
|
"date-fns": "4.1.0",
|
|
28
25
|
"events": "3.3.0",
|
|
29
26
|
"util": "0.12.5",
|
|
30
27
|
"knex": "3.1.0",
|
|
31
28
|
"luxon": "3.7.2",
|
|
32
|
-
"@powerhousedao/analytics-engine-core": "0.6.
|
|
33
|
-
"@powerhousedao/analytics-engine-knex": "0.6.
|
|
29
|
+
"@powerhousedao/analytics-engine-core": "0.6.4",
|
|
30
|
+
"@powerhousedao/analytics-engine-knex": "0.6.4"
|
|
34
31
|
},
|
|
35
32
|
"devDependencies": {
|
|
36
33
|
"@vitest/browser": "4.0.18",
|
|
37
34
|
"@vitest/browser-playwright": "4.0.18",
|
|
38
35
|
"@types/luxon": "3.7.1",
|
|
39
36
|
"playwright": "1.58.2",
|
|
40
|
-
"vitest": "4.0.18"
|
|
37
|
+
"vitest": "4.0.18",
|
|
38
|
+
"vite-plugin-node-polyfills": "0.25.0"
|
|
41
39
|
},
|
|
42
40
|
"scripts": {
|
|
43
41
|
"bundle": "bun run ./bundle.ts",
|