@powerhousedao/shared 6.0.0-dev.104 → 6.0.0-dev.106
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/analytics/index.d.ts +42 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +307 -4
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/index.d.mts +1271 -0
- package/dist/clis/index.d.mts.map +1 -0
- package/dist/clis/index.mjs +6801 -0
- package/dist/clis/index.mjs.map +1 -0
- package/dist/connect/index.d.ts +866 -1
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +254 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +41 -0
- package/dist/constants.js.map +1 -0
- package/dist/document-drive/index.d.ts +546 -0
- package/dist/document-drive/index.d.ts.map +1 -0
- package/dist/document-drive/index.js +956 -0
- package/dist/document-drive/index.js.map +1 -0
- package/dist/document-model/index.d.ts +3 -5
- package/dist/document-model/index.js +3408 -2
- package/dist/document-model/index.js.map +1 -1
- package/dist/index-dg_xL7sp.d.ts +567 -0
- package/dist/index-dg_xL7sp.d.ts.map +1 -0
- package/dist/processors/index.d.ts +2 -5
- package/dist/processors/index.js +116 -3
- package/dist/processors/index.js.map +1 -1
- package/dist/registry/index.d.ts +46 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +0 -0
- package/dist/types-DWXYsIF1.d.ts +158 -0
- package/dist/types-DWXYsIF1.d.ts.map +1 -0
- package/dist/types-faUXKACL.d.ts +2153 -0
- package/dist/types-faUXKACL.d.ts.map +1 -0
- package/package.json +44 -4
- package/dist/analytics/analytics-path.d.ts +0 -36
- package/dist/analytics/analytics-path.d.ts.map +0 -1
- package/dist/analytics/analytics-path.js +0 -170
- package/dist/analytics/analytics-path.js.map +0 -1
- package/dist/analytics/analytics-period.d.ts +0 -40
- package/dist/analytics/analytics-period.d.ts.map +0 -1
- package/dist/analytics/analytics-period.js +0 -204
- package/dist/analytics/analytics-period.js.map +0 -1
- package/dist/analytics/constants.d.ts +0 -35
- package/dist/analytics/constants.d.ts.map +0 -1
- package/dist/analytics/constants.js +0 -40
- package/dist/analytics/constants.js.map +0 -1
- package/dist/analytics/types.d.ts +0 -85
- package/dist/analytics/types.d.ts.map +0 -1
- package/dist/analytics/types.js +0 -2
- package/dist/analytics/types.js.map +0 -1
- package/dist/connect/env-config.d.ts +0 -862
- package/dist/connect/env-config.d.ts.map +0 -1
- package/dist/connect/env-config.js +0 -525
- package/dist/connect/env-config.js.map +0 -1
- package/dist/document-model/core/actions.d.ts +0 -62
- package/dist/document-model/core/actions.d.ts.map +0 -1
- package/dist/document-model/core/actions.js +0 -2
- package/dist/document-model/core/actions.js.map +0 -1
- package/dist/document-model/core/constants.d.ts +0 -6
- package/dist/document-model/core/constants.d.ts.map +0 -1
- package/dist/document-model/core/constants.js +0 -8
- package/dist/document-model/core/constants.js.map +0 -1
- package/dist/document-model/core/documents.d.ts +0 -102
- package/dist/document-model/core/documents.d.ts.map +0 -1
- package/dist/document-model/core/documents.js +0 -2
- package/dist/document-model/core/documents.js.map +0 -1
- package/dist/document-model/core/operations.d.ts +0 -74
- package/dist/document-model/core/operations.d.ts.map +0 -1
- package/dist/document-model/core/operations.js +0 -2
- package/dist/document-model/core/operations.js.map +0 -1
- package/dist/document-model/core/ph-types.d.ts +0 -7
- package/dist/document-model/core/ph-types.d.ts.map +0 -1
- package/dist/document-model/core/ph-types.js +0 -2
- package/dist/document-model/core/ph-types.js.map +0 -1
- package/dist/document-model/core/signatures.d.ts +0 -52
- package/dist/document-model/core/signatures.d.ts.map +0 -1
- package/dist/document-model/core/signatures.js +0 -2
- package/dist/document-model/core/signatures.js.map +0 -1
- package/dist/document-model/core/state.d.ts +0 -38
- package/dist/document-model/core/state.d.ts.map +0 -1
- package/dist/document-model/core/state.js +0 -2
- package/dist/document-model/core/state.js.map +0 -1
- package/dist/document-model/core/types.d.ts +0 -533
- package/dist/document-model/core/types.d.ts.map +0 -1
- package/dist/document-model/core/types.js +0 -2
- package/dist/document-model/core/types.js.map +0 -1
- package/dist/document-model/core/upgrades.d.ts +0 -24
- package/dist/document-model/core/upgrades.d.ts.map +0 -1
- package/dist/document-model/core/upgrades.js +0 -2
- package/dist/document-model/core/upgrades.js.map +0 -1
- package/dist/document-model/index.d.ts.map +0 -1
- package/dist/document-model/types.d.ts +0 -97
- package/dist/document-model/types.d.ts.map +0 -1
- package/dist/document-model/types.js +0 -2
- package/dist/document-model/types.js.map +0 -1
- package/dist/processors/constants.d.ts +0 -4
- package/dist/processors/constants.d.ts.map +0 -1
- package/dist/processors/constants.js +0 -4
- package/dist/processors/constants.js.map +0 -1
- package/dist/processors/drive-analytics/document-processor.d.ts +0 -10
- package/dist/processors/drive-analytics/document-processor.d.ts.map +0 -1
- package/dist/processors/drive-analytics/document-processor.js +0 -43
- package/dist/processors/drive-analytics/document-processor.js.map +0 -1
- package/dist/processors/drive-analytics/drive-processor.d.ts +0 -10
- package/dist/processors/drive-analytics/drive-processor.d.ts.map +0 -1
- package/dist/processors/drive-analytics/drive-processor.js +0 -85
- package/dist/processors/drive-analytics/drive-processor.js.map +0 -1
- package/dist/processors/drive-analytics/index.d.ts +0 -10
- package/dist/processors/drive-analytics/index.d.ts.map +0 -1
- package/dist/processors/drive-analytics/index.js +0 -28
- package/dist/processors/drive-analytics/index.js.map +0 -1
- package/dist/processors/drive-analytics/types.d.ts +0 -3
- package/dist/processors/drive-analytics/types.d.ts.map +0 -1
- package/dist/processors/drive-analytics/types.js +0 -2
- package/dist/processors/drive-analytics/types.js.map +0 -1
- package/dist/processors/index.d.ts.map +0 -1
- package/dist/processors/relational/types.d.ts +0 -72
- package/dist/processors/relational/types.d.ts.map +0 -1
- package/dist/processors/relational/types.js +0 -45
- package/dist/processors/relational/types.js.map +0 -1
- package/dist/processors/relational/utils.d.ts +0 -29
- package/dist/processors/relational/utils.d.ts.map +0 -1
- package/dist/processors/relational/utils.js +0 -67
- package/dist/processors/relational/utils.js.map +0 -1
- package/dist/processors/types.d.ts +0 -90
- package/dist/processors/types.d.ts.map +0 -1
- package/dist/processors/types.js +0 -2
- package/dist/processors/types.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type { ProcessorFactoryBuilder } from "../processors/types.js";
|
|
2
|
-
import type { Action } from "./core/actions.js";
|
|
3
|
-
import type { PHDocument } from "./core/documents.js";
|
|
4
|
-
import type { PHBaseState } from "./core/state.js";
|
|
5
|
-
import type { AssertIsDocumentOfType, AssertIsStateOfType, CreateDocument, CreateState, EditorModule, ID, ImportScriptModule, IsDocumentOfType, IsStateOfType, LoadFromInput, Manifest, Reducer, SaveToFileHandle, SubgraphModule } from "./core/types.js";
|
|
6
|
-
import type { UpgradeManifest } from "./core/upgrades.js";
|
|
7
|
-
export type State = {
|
|
8
|
-
examples: CodeExample[];
|
|
9
|
-
initialValue: string;
|
|
10
|
-
schema: string;
|
|
11
|
-
};
|
|
12
|
-
export type ScopeState = {
|
|
13
|
-
global: State;
|
|
14
|
-
local: State;
|
|
15
|
-
};
|
|
16
|
-
export type DocumentModelUtils<TState extends PHBaseState = PHBaseState> = {
|
|
17
|
-
fileExtension: string;
|
|
18
|
-
createState: CreateState<TState>;
|
|
19
|
-
createDocument: CreateDocument<TState>;
|
|
20
|
-
loadFromInput: LoadFromInput<TState>;
|
|
21
|
-
saveToFileHandle: SaveToFileHandle;
|
|
22
|
-
isStateOfType: IsStateOfType<TState>;
|
|
23
|
-
assertIsStateOfType: AssertIsStateOfType<TState>;
|
|
24
|
-
isDocumentOfType: IsDocumentOfType<TState>;
|
|
25
|
-
assertIsDocumentOfType: AssertIsDocumentOfType<TState>;
|
|
26
|
-
};
|
|
27
|
-
export type DocumentModelModule<TState extends PHBaseState = PHBaseState> = {
|
|
28
|
-
/** optional version field, should be made required */
|
|
29
|
-
version?: number;
|
|
30
|
-
reducer: Reducer<TState>;
|
|
31
|
-
actions: Record<string, (...args: any[]) => Action>;
|
|
32
|
-
utils: DocumentModelUtils<TState>;
|
|
33
|
-
documentModel: DocumentModelPHState;
|
|
34
|
-
};
|
|
35
|
-
export type DocumentModelLib<TState extends PHBaseState = PHBaseState> = {
|
|
36
|
-
manifest: Manifest;
|
|
37
|
-
documentModels: DocumentModelModule<TState>[];
|
|
38
|
-
editors: EditorModule[];
|
|
39
|
-
subgraphs: SubgraphModule[];
|
|
40
|
-
importScripts: ImportScriptModule[];
|
|
41
|
-
upgradeManifests: UpgradeManifest<readonly number[]>[];
|
|
42
|
-
processorFactory: ProcessorFactoryBuilder;
|
|
43
|
-
};
|
|
44
|
-
export type Author = {
|
|
45
|
-
name: string;
|
|
46
|
-
website: string | null;
|
|
47
|
-
};
|
|
48
|
-
export type OperationErrorSpecification = {
|
|
49
|
-
code: string | null;
|
|
50
|
-
description: string | null;
|
|
51
|
-
id: ID;
|
|
52
|
-
name: string | null;
|
|
53
|
-
template: string | null;
|
|
54
|
-
};
|
|
55
|
-
export type CodeExample = {
|
|
56
|
-
id: ID;
|
|
57
|
-
value: string;
|
|
58
|
-
};
|
|
59
|
-
export type OperationSpecification = {
|
|
60
|
-
description: string | null;
|
|
61
|
-
errors: OperationErrorSpecification[];
|
|
62
|
-
examples: CodeExample[];
|
|
63
|
-
id: ID;
|
|
64
|
-
name: string | null;
|
|
65
|
-
reducer: string | null;
|
|
66
|
-
schema: string | null;
|
|
67
|
-
template: string | null;
|
|
68
|
-
scope: string;
|
|
69
|
-
};
|
|
70
|
-
export type ModuleSpecification = {
|
|
71
|
-
description: string | null;
|
|
72
|
-
id: ID;
|
|
73
|
-
name: string;
|
|
74
|
-
operations: OperationSpecification[];
|
|
75
|
-
};
|
|
76
|
-
export type DocumentSpecification = {
|
|
77
|
-
changeLog: string[];
|
|
78
|
-
modules: ModuleSpecification[];
|
|
79
|
-
state: ScopeState;
|
|
80
|
-
version: number;
|
|
81
|
-
};
|
|
82
|
-
export type DocumentModelGlobalState = {
|
|
83
|
-
author: Author;
|
|
84
|
-
description: string;
|
|
85
|
-
extension: string;
|
|
86
|
-
id: string;
|
|
87
|
-
name: string;
|
|
88
|
-
specifications: DocumentSpecification[];
|
|
89
|
-
};
|
|
90
|
-
export type DocumentModelLocalState = {};
|
|
91
|
-
export type DocumentModelPHState = PHBaseState & {
|
|
92
|
-
global: DocumentModelGlobalState;
|
|
93
|
-
local: DocumentModelLocalState;
|
|
94
|
-
};
|
|
95
|
-
export type DocumentModelDocument = PHDocument<DocumentModelPHState>;
|
|
96
|
-
export type DocumentModelDocumentModelModule = DocumentModelModule<DocumentModelPHState>;
|
|
97
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../document-model/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,EAAE,EACF,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG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C/B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,qBAAqB,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACzC,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAC/C,MAAM,EAAE,wBAAwB,CAAC;IACjC,KAAK,EAAE,uBAAuB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AACrE,MAAM,MAAM,gCAAgC,GAC1C,mBAAmB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../document-model/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../processors/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAClE,eAAO,MAAM,oCAAoC,kBAAkB,CAAC;AACpE,eAAO,MAAM,mCAAmC,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../processors/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,aAAa,CAAU,CAAC;AAClE,MAAM,CAAC,MAAM,oCAAoC,GAAG,eAAe,CAAC;AACpE,MAAM,CAAC,MAAM,mCAAmC,GAAG,cAAc,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IAnalyticsStore } from "../../analytics/types.js";
|
|
2
|
-
import type { OperationWithContext } from "../../document-model/index.js";
|
|
3
|
-
import type { IProcessor } from "../types.js";
|
|
4
|
-
export declare class DocumentAnalyticsProcessor implements IProcessor {
|
|
5
|
-
private readonly analyticsStore;
|
|
6
|
-
constructor(analyticsStore: IAnalyticsStore);
|
|
7
|
-
onOperations(operations: OperationWithContext[]): Promise<void>;
|
|
8
|
-
onDisconnect(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=document-processor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-processor.d.ts","sourceRoot":"","sources":["../../../processors/drive-analytics/document-processor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,qBAAa,0BAA2B,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAItD,YAAY,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD/D,YAAY;CACnB"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
|
-
import { AnalyticsPath } from "../../analytics/analytics-path.js";
|
|
3
|
-
export class DocumentAnalyticsProcessor {
|
|
4
|
-
analyticsStore;
|
|
5
|
-
constructor(analyticsStore) {
|
|
6
|
-
this.analyticsStore = analyticsStore;
|
|
7
|
-
//
|
|
8
|
-
}
|
|
9
|
-
async onOperations(operations) {
|
|
10
|
-
if (operations.length === 0) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const CHUNK_SIZE = 50;
|
|
14
|
-
const buffer = [];
|
|
15
|
-
for (const { operation, context } of operations) {
|
|
16
|
-
const { documentType, documentId, branch, scope } = context;
|
|
17
|
-
const source = AnalyticsPath.fromString(`ph/doc/${documentId}/${branch}/${scope}`);
|
|
18
|
-
const target = documentType === "powerhouse/document-drive" ? "DRIVE" : "NODE";
|
|
19
|
-
const revision = operation.index;
|
|
20
|
-
const seriesInput = {
|
|
21
|
-
source,
|
|
22
|
-
metric: "DocumentOperations",
|
|
23
|
-
start: DateTime.fromISO(operation.timestampUtcMs),
|
|
24
|
-
value: 1,
|
|
25
|
-
dimensions: {
|
|
26
|
-
drive: AnalyticsPath.fromString(`ph/doc/drive/${documentId}/${branch}/${scope}/${revision}`),
|
|
27
|
-
operation: AnalyticsPath.fromString(`ph/doc/operation/${operation.action.type}/${operation.index}`),
|
|
28
|
-
target: AnalyticsPath.fromString(`ph/doc/target/${target}/${documentId}`),
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
buffer.push(seriesInput);
|
|
32
|
-
while (buffer.length >= CHUNK_SIZE) {
|
|
33
|
-
const batch = buffer.splice(0, CHUNK_SIZE);
|
|
34
|
-
await this.analyticsStore.addSeriesValues(batch);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (buffer.length > 0) {
|
|
38
|
-
await this.analyticsStore.addSeriesValues(buffer);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
async onDisconnect() { }
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=document-processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-processor.js","sourceRoot":"","sources":["../../../processors/drive-analytics/document-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AASlE,MAAM,OAAO,0BAA0B;IACR;IAA7B,YAA6B,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;QAC1D,EAAE;IACJ,CAAC;IAED,KA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,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3C,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY,KAAI,CAAC;CACxB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IAnalyticsStore } from "../../analytics/types.js";
|
|
2
|
-
import type { OperationWithContext } from "../../document-model/index.js";
|
|
3
|
-
import type { IProcessor } from "../types.js";
|
|
4
|
-
export declare class DriveAnalyticsProcessor implements IProcessor {
|
|
5
|
-
private readonly analyticsStore;
|
|
6
|
-
constructor(analyticsStore: IAnalyticsStore);
|
|
7
|
-
onOperations(operations: OperationWithContext[]): Promise<void>;
|
|
8
|
-
onDisconnect(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=drive-processor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drive-processor.d.ts","sourceRoot":"","sources":["../../../processors/drive-analytics/drive-processor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAmC9C,qBAAa,uBAAwB,YAAW,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAItD,YAAY,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsE/D,YAAY;CACnB"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
|
-
import { AnalyticsPath } from "../../analytics/analytics-path.js";
|
|
3
|
-
const CREATE_NODE_ACTIONS = ["ADD_FILE", "ADD_FOLDER"];
|
|
4
|
-
const DUPLICATE_NODE_ACTIONS = ["COPY_NODE"];
|
|
5
|
-
const UPDATE_NODE_ACTIONS = ["UPDATE_FILE", "UPDATE_NODE"];
|
|
6
|
-
const MOVE_NODE_ACTIONS = ["MOVE_NODE"];
|
|
7
|
-
const REMOVE_NODE_ACTIONS = ["DELETE_NODE"];
|
|
8
|
-
const NODE_ACTIONS = [
|
|
9
|
-
...CREATE_NODE_ACTIONS,
|
|
10
|
-
...DUPLICATE_NODE_ACTIONS,
|
|
11
|
-
...UPDATE_NODE_ACTIONS,
|
|
12
|
-
...MOVE_NODE_ACTIONS,
|
|
13
|
-
...REMOVE_NODE_ACTIONS,
|
|
14
|
-
];
|
|
15
|
-
function getActionType(action) {
|
|
16
|
-
if (CREATE_NODE_ACTIONS.includes(action)) {
|
|
17
|
-
return "CREATED";
|
|
18
|
-
}
|
|
19
|
-
if (DUPLICATE_NODE_ACTIONS.includes(action)) {
|
|
20
|
-
return "DUPLICATED";
|
|
21
|
-
}
|
|
22
|
-
if (REMOVE_NODE_ACTIONS.includes(action)) {
|
|
23
|
-
return "REMOVED";
|
|
24
|
-
}
|
|
25
|
-
if (MOVE_NODE_ACTIONS.includes(action)) {
|
|
26
|
-
return "MOVED";
|
|
27
|
-
}
|
|
28
|
-
return "UPDATED";
|
|
29
|
-
}
|
|
30
|
-
export class DriveAnalyticsProcessor {
|
|
31
|
-
analyticsStore;
|
|
32
|
-
constructor(analyticsStore) {
|
|
33
|
-
this.analyticsStore = analyticsStore;
|
|
34
|
-
//
|
|
35
|
-
}
|
|
36
|
-
async onOperations(operations) {
|
|
37
|
-
if (operations.length === 0) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const CHUNK_SIZE = 50;
|
|
41
|
-
const buffer = [];
|
|
42
|
-
for (const { operation, context } of operations) {
|
|
43
|
-
const { documentType, documentId, branch, scope } = context;
|
|
44
|
-
if (documentType !== "powerhouse/document-drive") {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
const { action: { type, input, timestampUtcMs }, } = operation;
|
|
48
|
-
const source = AnalyticsPath.fromString(`ph/drive/${documentId}/${branch}/${scope}`);
|
|
49
|
-
const revision = operation.index;
|
|
50
|
-
const actionType = getActionType(type);
|
|
51
|
-
const target = NODE_ACTIONS.includes(type) ? "NODE" : "DRIVE";
|
|
52
|
-
let targetId = documentId;
|
|
53
|
-
if (target === "NODE") {
|
|
54
|
-
const operationInput = input;
|
|
55
|
-
targetId =
|
|
56
|
-
operationInput.id ||
|
|
57
|
-
operationInput.targetId ||
|
|
58
|
-
operationInput.srcFolder ||
|
|
59
|
-
documentId;
|
|
60
|
-
}
|
|
61
|
-
const seriesInput = {
|
|
62
|
-
source,
|
|
63
|
-
metric: "DriveOperations",
|
|
64
|
-
start: DateTime.fromISO(timestampUtcMs),
|
|
65
|
-
value: 1,
|
|
66
|
-
dimensions: {
|
|
67
|
-
drive: AnalyticsPath.fromString(`ph/drive/${documentId}/${branch}/${scope}/${revision}`),
|
|
68
|
-
operation: AnalyticsPath.fromString(`ph/drive/operation/${operation.action.type}/${operation.index}`),
|
|
69
|
-
target: AnalyticsPath.fromString(`ph/drive/target/${target}/${targetId}`),
|
|
70
|
-
actionType: AnalyticsPath.fromString(`ph/drive/actionType/${actionType}/${targetId}`),
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
buffer.push(seriesInput);
|
|
74
|
-
while (buffer.length >= CHUNK_SIZE) {
|
|
75
|
-
const batch = buffer.splice(0, CHUNK_SIZE);
|
|
76
|
-
await this.analyticsStore.addSeriesValues(batch);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (buffer.length > 0) {
|
|
80
|
-
await this.analyticsStore.addSeriesValues(buffer);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
async onDisconnect() { }
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=drive-processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drive-processor.js","sourceRoot":"","sources":["../../../processors/drive-analytics/drive-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AASlE,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AACvD,MAAM,sBAAsB,GAAG,CAAC,WAAW,CAAC,CAAC;AAC7C,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AAC3D,MAAM,iBAAiB,GAAG,CAAC,WAAW,CAAC,CAAC;AACxC,MAAM,mBAAmB,GAAG,CAAC,aAAa,CAAC,CAAC;AAE5C,MAAM,YAAY,GAAG;IACnB,GAAG,mBAAmB;IACtB,GAAG,sBAAsB;IACzB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;CACvB,CAAC;AAEF,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5C,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAID,MAAM,OAAO,uBAAuB;IACL;IAA7B,YAA6B,cAA+B;QAA/B,mBAAc,GAAd,cA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vC,KAAK,EAAE,CAAC;gBACR,UAAU,EAAE;oBACV,KAAK,EAAE,aAAa,CAAC,UAAU,CAC7B,YAAY,UAAU,IAAI,MAAM,IAAI,KAAK,IAAI,QAAQ,EAAE,CACxD;oBACD,SAAS,EAAE,aAAa,CAAC,UAAU,CACjC,sBAAsB,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,EAAE,CACjE;oBACD,MAAM,EAAE,aAAa,CAAC,UAAU,CAC9B,mBAAmB,MAAM,IAAI,QAAQ,EAAE,CACxC;oBACD,UAAU,EAAE,aAAa,CAAC,UAAU,CAClC,uBAAuB,UAAU,IAAI,QAAQ,EAAE,CAChD;iBACF;aACF,CAAC;YAEF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEzB,OAAO,MAAM,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC;gBACnC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3C,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY,KAAI,CAAC;CACxB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IAnalyticsStore } from "../../analytics/types.js";
|
|
2
|
-
import type { PHDocumentHeader } from "../../document-model/core/documents.js";
|
|
3
|
-
import type { ProcessorRecord } from "../types.js";
|
|
4
|
-
export declare const processorFactory: (module: {
|
|
5
|
-
analyticsStore: IAnalyticsStore;
|
|
6
|
-
}) => (driveHeader: PHDocumentHeader) => ProcessorRecord[];
|
|
7
|
-
export * from "./document-processor.js";
|
|
8
|
-
export * from "./drive-processor.js";
|
|
9
|
-
export * from "./types.js";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/drive-analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,eAAO,MAAM,gBAAgB,GAC1B,QAAQ;IAAE,cAAc,EAAE,eAAe,CAAA;CAAE,MAC3C,aAAa,gBAAgB,KAAG,eAAe,EAqB/C,CAAC;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { DocumentAnalyticsProcessor } from "./document-processor.js";
|
|
2
|
-
import { DriveAnalyticsProcessor } from "./drive-processor.js";
|
|
3
|
-
export const processorFactory = (module) => (driveHeader) => {
|
|
4
|
-
return [
|
|
5
|
-
{
|
|
6
|
-
processor: new DriveAnalyticsProcessor(module.analyticsStore),
|
|
7
|
-
filter: {
|
|
8
|
-
branch: ["main"],
|
|
9
|
-
documentId: ["*"],
|
|
10
|
-
scope: ["*"],
|
|
11
|
-
documentType: ["powerhouse/document-drive"],
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
processor: new DocumentAnalyticsProcessor(module.analyticsStore),
|
|
16
|
-
filter: {
|
|
17
|
-
branch: ["main"],
|
|
18
|
-
documentId: ["*"],
|
|
19
|
-
scope: ["*"],
|
|
20
|
-
documentType: ["*"],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
];
|
|
24
|
-
};
|
|
25
|
-
export * from "./document-processor.js";
|
|
26
|
-
export * from "./drive-processor.js";
|
|
27
|
-
export * from "./types.js";
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../processors/drive-analytics/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,MAAM,gBAAgB,GAC3B,CAAC,MAA2C,EAAE,EAAE,CAChD,CAAC,WAA6B,EAAqB,EAAE;IACnD,OAAO;QACL;YACE,SAAS,EAAE,IAAI,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC;YAC7D,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC,MAAM,CAAC;gBAChB,UAAU,EAAE,CAAC,GAAG,CAAC;gBACjB,KAAK,EAAE,CAAC,GAAG,CAAC;gBACZ,YAAY,EAAE,CAAC,2BAA2B,CAAC;aAC5C;SACF;QACD;YACE,SAAS,EAAE,IAAI,0BAA0B,CAAC,MAAM,CAAC,cAAc,CAAC;YAChE,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC,MAAM,CAAC;gBAChB,UAAU,EAAE,CAAC,GAAG,CAAC;gBACjB,KAAK,EAAE,CAAC,GAAG,CAAC;gBACZ,YAAY,EAAE,CAAC,GAAG,CAAC;aACpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../processors/drive-analytics/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAC1C,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,YAAY,GACZ,SAAS,GACT,OAAO,GACP,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../processors/drive-analytics/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../processors/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,mBAAmB,YAAY,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { OperationWithContext } from "@powerhousedao/shared/document-model";
|
|
2
|
-
import type { Kysely, QueryCreator } from "kysely";
|
|
3
|
-
import type { IProcessor, ProcessorFilter } from "../types.js";
|
|
4
|
-
export type IRelationalQueryMethods = "selectFrom" | "selectNoFrom" | "with" | "withRecursive";
|
|
5
|
-
export type IRelationalQueryBuilder<Schema = unknown> = Pick<QueryCreator<Schema>, IRelationalQueryMethods> & {
|
|
6
|
-
withSchema: (schema: string) => IRelationalQueryBuilder<Schema>;
|
|
7
|
-
};
|
|
8
|
-
export type HashAlgorithms = "fnv1a";
|
|
9
|
-
export type IBaseRelationalDb<Schema = unknown> = Kysely<Schema>;
|
|
10
|
-
/**
|
|
11
|
-
* The standardized relational database interface for relational db processors.
|
|
12
|
-
* This abstraction provides type-safe database operations while hiding the underlying
|
|
13
|
-
* database framework implementation details.
|
|
14
|
-
**/
|
|
15
|
-
export type IRelationalDb<Schema = unknown> = IBaseRelationalDb<Schema> & {
|
|
16
|
-
createNamespace<NamespaceSchema>(namespace: string): Promise<IRelationalDb<ExtractProcessorSchemaOrSelf<NamespaceSchema>>>;
|
|
17
|
-
queryNamespace<NamespaceSchema>(namespace: string): IRelationalQueryBuilder<NamespaceSchema>;
|
|
18
|
-
};
|
|
19
|
-
export type ExtractProcessorSchemaOrSelf<TProcessor> = TProcessor extends RelationalDbProcessor<infer TSchema> ? TSchema : TProcessor;
|
|
20
|
-
export type RelationalDbProcessorClass<TSchema> = typeof RelationalDbProcessor<TSchema>;
|
|
21
|
-
export interface IRelationalDbProcessor<TDatabaseSchema = unknown> extends IProcessor {
|
|
22
|
-
namespace: string;
|
|
23
|
-
query: IRelationalQueryBuilder<TDatabaseSchema>;
|
|
24
|
-
filter: ProcessorFilter;
|
|
25
|
-
initAndUpgrade(): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
declare const IS_RELATIONAL_DB_PROCESSOR: unique symbol;
|
|
28
|
-
/**
|
|
29
|
-
* Base class for relational db processors that require a relational database storage.
|
|
30
|
-
* This class abstracts database initialization, migration management, and resource cleanup,
|
|
31
|
-
* allowing derived classes to focus on business logic.
|
|
32
|
-
*/
|
|
33
|
-
export declare abstract class RelationalDbProcessor<TDatabaseSchema = unknown> implements IRelationalDbProcessor<TDatabaseSchema> {
|
|
34
|
-
protected _namespace: string;
|
|
35
|
-
protected _filter: ProcessorFilter;
|
|
36
|
-
protected relationalDb: IRelationalDb<TDatabaseSchema>;
|
|
37
|
-
constructor(_namespace: string, _filter: ProcessorFilter, relationalDb: IRelationalDb<TDatabaseSchema>);
|
|
38
|
-
static [IS_RELATIONAL_DB_PROCESSOR]: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the namespace for a given drive id.
|
|
41
|
-
* This method can be overridden by derived classes to provide a custom namespace.
|
|
42
|
-
*/
|
|
43
|
-
static getNamespace(driveId: string): string;
|
|
44
|
-
static query<Schema>(this: RelationalDbProcessorClass<Schema>, driveId: string, db: IRelationalDb<any>): IRelationalQueryBuilder<Schema>;
|
|
45
|
-
/**
|
|
46
|
-
* Processes a list of operations with context.
|
|
47
|
-
* Called when operations match this processor's filter.
|
|
48
|
-
*/
|
|
49
|
-
abstract onOperations(operations: OperationWithContext[]): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Returns the filter for the processor.
|
|
52
|
-
* This method can be overridden by derived classes to provide a custom filter.
|
|
53
|
-
*/
|
|
54
|
-
get filter(): ProcessorFilter;
|
|
55
|
-
/**
|
|
56
|
-
* Returns the namespace used by the processor.
|
|
57
|
-
*/
|
|
58
|
-
get namespace(): string;
|
|
59
|
-
get query(): IRelationalQueryBuilder<TDatabaseSchema>;
|
|
60
|
-
/**
|
|
61
|
-
* Abstract method that derived classes must implement.
|
|
62
|
-
* This method is meant to be called on subclasses to initialize and upgrade the database.
|
|
63
|
-
*/
|
|
64
|
-
abstract initAndUpgrade(): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Called when the processor is disconnected.
|
|
67
|
-
* This method is meant to be overridden by subclasses to clean up resources.
|
|
68
|
-
*/
|
|
69
|
-
abstract onDisconnect(): Promise<void>;
|
|
70
|
-
}
|
|
71
|
-
export {};
|
|
72
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../processors/relational/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG/D,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ,cAAc,GACd,MAAM,GACN,eAAe,CAAC;AAEpB,MAAM,MAAM,uBAAuB,CAAC,MAAM,GAAG,OAAO,IAAI,IAAI,CAC1D,YAAY,CAAC,MAAM,CAAC,EACpB,uBAAuB,CACxB,GAAG;IACF,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,uBAAuB,CAAC,MAAM,CAAC,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;AACrC,MAAM,MAAM,iBAAiB,CAAC,MAAM,GAAG,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;AAEjE;;;;IAII;AACJ,MAAM,MAAM,aAAa,CAAC,MAAM,GAAG,O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IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,EACxC,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,GACrB,uBAAuB,CAAC,MAAM,CAAC;IAIlC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAExE;;;OAGG;IACH,IAAI,MAAM,IAAI,eAAe,CAE5B;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,KAAK,IAAI,uBAAuB,CAAC,eAAe,CAAC,CAEpD;IAED;;;OAGG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAExC;;;OAGG;IACH,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CACvC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { relationalDbToQueryBuilder } from "./utils.js";
|
|
2
|
-
const IS_RELATIONAL_DB_PROCESSOR = Symbol.for("ph.IS_RELATIONAL_DB_PROCESSOR");
|
|
3
|
-
/**
|
|
4
|
-
* Base class for relational db processors that require a relational database storage.
|
|
5
|
-
* This class abstracts database initialization, migration management, and resource cleanup,
|
|
6
|
-
* allowing derived classes to focus on business logic.
|
|
7
|
-
*/
|
|
8
|
-
export class RelationalDbProcessor {
|
|
9
|
-
_namespace;
|
|
10
|
-
_filter;
|
|
11
|
-
relationalDb;
|
|
12
|
-
constructor(_namespace, _filter, relationalDb) {
|
|
13
|
-
this._namespace = _namespace;
|
|
14
|
-
this._filter = _filter;
|
|
15
|
-
this.relationalDb = relationalDb;
|
|
16
|
-
}
|
|
17
|
-
static [IS_RELATIONAL_DB_PROCESSOR] = true;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the namespace for a given drive id.
|
|
20
|
-
* This method can be overridden by derived classes to provide a custom namespace.
|
|
21
|
-
*/
|
|
22
|
-
static getNamespace(driveId) {
|
|
23
|
-
return `${this.name}_${driveId.replaceAll("-", "_")}`;
|
|
24
|
-
}
|
|
25
|
-
static query(driveId, db) {
|
|
26
|
-
return db.queryNamespace(this.getNamespace(driveId));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Returns the filter for the processor.
|
|
30
|
-
* This method can be overridden by derived classes to provide a custom filter.
|
|
31
|
-
*/
|
|
32
|
-
get filter() {
|
|
33
|
-
return this._filter;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Returns the namespace used by the processor.
|
|
37
|
-
*/
|
|
38
|
-
get namespace() {
|
|
39
|
-
return this._namespace;
|
|
40
|
-
}
|
|
41
|
-
get query() {
|
|
42
|
-
return relationalDbToQueryBuilder(this.relationalDb);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../processors/relational/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAiDxD,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAM,OAAgB,qBAAqB;IAI7B;IACA;IACA;IAHZ,YACY,UAAkB,EAClB,OAAwB,EACxB,YAA4C;QAF5C,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAiB;QACxB,iBAAY,GAAZ,YAAY,CAAgC;IACrD,CAAC;IAEJ,MAAM,CAAC,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC;IAE3C;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAe;QACjC,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,KAAK,CAEV,OAAe,EACf,EAAsB;QAEtB,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,CAAC;IAQD;;;OAGG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,0BAA0B,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { IBaseRelationalDb, IRelationalDb, IRelationalQueryBuilder } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Hashes a string to a lowercase base-26 string.
|
|
4
|
-
* @param str The string to hash.
|
|
5
|
-
* @param length The length of the hash. Defaults to 10.
|
|
6
|
-
* @param algorithm The hashing algorithm to use. Defaults to "fnv1a".
|
|
7
|
-
* @returns The hashed string.
|
|
8
|
-
*/
|
|
9
|
-
export declare function hashNamespace(str: string, length?: number): string;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a RelationalDb instance with namespace support.
|
|
12
|
-
* @param baseDb The base RelationalDb instance to enhance.
|
|
13
|
-
* @param baseOptions The default options for namespace creation. Hashes namespace by default.
|
|
14
|
-
* @returns The enhanced RelationalDb instance.
|
|
15
|
-
*/
|
|
16
|
-
export declare function createRelationalDb<Schema>(baseDb: IBaseRelationalDb<Schema>, baseOptions?: NamespaceOptions): IRelationalDb<Schema>;
|
|
17
|
-
type NamespaceOptions = {
|
|
18
|
-
hashNamespace?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare function createNamespacedDb<Schema>(db: IBaseRelationalDb<any>, namespace: string, options?: NamespaceOptions): Promise<IRelationalDb<Schema>>;
|
|
21
|
-
export declare function createNamespacedQueryBuilder<Schema>(db: IBaseRelationalDb<any>, namespace: string, options?: NamespaceOptions): IRelationalQueryBuilder<Schema>;
|
|
22
|
-
/**
|
|
23
|
-
* Returns a query builder for a RelationalDb instance.
|
|
24
|
-
* @param query The RelationalDb instance to convert.
|
|
25
|
-
* @returns The IRelationalQueryBuilder instance.
|
|
26
|
-
*/
|
|
27
|
-
export declare function relationalDbToQueryBuilder<TSchema>(query: IBaseRelationalDb<TSchema>): IRelationalQueryBuilder<TSchema>;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../processors/relational/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAIpB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAK,UAMrD;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EACvC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,EACjC,WAAW,CAAC,EAAE,gBAAgB,GAC7B,aAAa,CAAC,MAAM,CAAC,CAwBvB;AAED,KAAK,gBAAgB,GAAG;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,MAAM,EAC7C,EAAE,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAOhC;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EACjD,EAAE,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,gBAAgB,GACzB,uBAAuB,CAAC,MAAM,CAAC,CAKjC;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAChD,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAChC,uBAAuB,CAAC,OAAO,CAAC,CASlC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import fnv1a from "@sindresorhus/fnv1a";
|
|
2
|
-
const SUPPORTED_SIZES = [32, 64, 128, 256, 512, 1024];
|
|
3
|
-
const LOG2_26 = Math.log2(26); //
|
|
4
|
-
/**
|
|
5
|
-
* Hashes a string to a lowercase base-26 string.
|
|
6
|
-
* @param str The string to hash.
|
|
7
|
-
* @param length The length of the hash. Defaults to 10.
|
|
8
|
-
* @param algorithm The hashing algorithm to use. Defaults to "fnv1a".
|
|
9
|
-
* @returns The hashed string.
|
|
10
|
-
*/
|
|
11
|
-
export function hashNamespace(str, length = 10) {
|
|
12
|
-
const requiredBits = Math.ceil(length * LOG2_26);
|
|
13
|
-
const bitSize = SUPPORTED_SIZES.find((size) => size && size >= requiredBits) ?? 1024;
|
|
14
|
-
const hash = fnv1a(str, { size: bitSize });
|
|
15
|
-
return toBase26(hash, length);
|
|
16
|
-
}
|
|
17
|
-
// converts hash to lowercase letters
|
|
18
|
-
function toBase26(num, length = 10) {
|
|
19
|
-
const alphabet = "abcdefghijklmnopqrstuvwxyz";
|
|
20
|
-
let out = "";
|
|
21
|
-
while (num > 0n && out.length < length) {
|
|
22
|
-
out = alphabet[Number(num % 26n)] + out;
|
|
23
|
-
num /= 26n;
|
|
24
|
-
}
|
|
25
|
-
return out.padStart(length, "a"); // optional padding
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Creates a RelationalDb instance with namespace support.
|
|
29
|
-
* @param baseDb The base RelationalDb instance to enhance.
|
|
30
|
-
* @param baseOptions The default options for namespace creation. Hashes namespace by default.
|
|
31
|
-
* @returns The enhanced RelationalDb instance.
|
|
32
|
-
*/
|
|
33
|
-
export function createRelationalDb(baseDb, baseOptions) {
|
|
34
|
-
const relationalDb = baseDb;
|
|
35
|
-
relationalDb.createNamespace = (namespace, options) => createNamespacedDb(baseDb, namespace, options ?? baseOptions);
|
|
36
|
-
relationalDb.queryNamespace = (namespace, options) => createNamespacedQueryBuilder(baseDb, namespace, options ?? baseOptions);
|
|
37
|
-
return relationalDb;
|
|
38
|
-
}
|
|
39
|
-
export async function createNamespacedDb(db, namespace, options) {
|
|
40
|
-
// hash the namespace to avoid too long namespaces
|
|
41
|
-
const shouldHash = options?.hashNamespace ?? true;
|
|
42
|
-
const hashValue = shouldHash ? hashNamespace(namespace) : namespace;
|
|
43
|
-
await db.schema.createSchema(hashValue).ifNotExists().execute();
|
|
44
|
-
const schemaRelationalDb = db.withSchema(hashValue);
|
|
45
|
-
return schemaRelationalDb;
|
|
46
|
-
}
|
|
47
|
-
export function createNamespacedQueryBuilder(db, namespace, options) {
|
|
48
|
-
const shouldHash = options?.hashNamespace ?? true;
|
|
49
|
-
const hashValue = shouldHash ? hashNamespace(namespace) : namespace;
|
|
50
|
-
const namespacedDb = db.withSchema(hashValue);
|
|
51
|
-
return relationalDbToQueryBuilder(namespacedDb);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Returns a query builder for a RelationalDb instance.
|
|
55
|
-
* @param query The RelationalDb instance to convert.
|
|
56
|
-
* @returns The IRelationalQueryBuilder instance.
|
|
57
|
-
*/
|
|
58
|
-
export function relationalDbToQueryBuilder(query) {
|
|
59
|
-
return {
|
|
60
|
-
selectFrom: query.selectFrom.bind(query),
|
|
61
|
-
selectNoFrom: query.selectNoFrom.bind(query),
|
|
62
|
-
with: query.with.bind(query),
|
|
63
|
-
withRecursive: query.withRecursive.bind(query),
|
|
64
|
-
withSchema: (schema) => relationalDbToQueryBuilder(query.withSchema(schema)),
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../processors/relational/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAOxC,MAAM,eAAe,GA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