@powerhousedao/vetra 5.0.0-staging.10 → 5.0.0-staging.12
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/processors/codegen/factory.d.ts.map +1 -1
- package/dist/processors/codegen/factory.js +6 -2
- package/dist/processors/codegen/factory.js.map +1 -1
- package/dist/processors/codegen/index.d.ts +1 -1
- package/dist/processors/codegen/index.d.ts.map +1 -1
- package/dist/processors/codegen/index.js +4 -6
- package/dist/processors/codegen/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/codegen/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../processors/codegen/factory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,uBAAuB,GACjC,QAAQ,oBAAoB,MAC5B,aAAa,gBAAgB,KAAG,eAAe,EAgC/C,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { VETRA_PROCESSOR_CONFIG_KEY, } from "@powerhousedao/config/powerhouse";
|
|
1
2
|
import { CodegenProcessor } from "./index.js";
|
|
2
3
|
export const codegenProcessorFactory = (module) => (driveHeader) => {
|
|
3
4
|
// Create the processor
|
|
4
|
-
|
|
5
|
+
const processorsConfig = module.config ?? new Map();
|
|
6
|
+
const vetraConfig = processorsConfig.get(VETRA_PROCESSOR_CONFIG_KEY);
|
|
7
|
+
const vetraDriveId = vetraConfig?.driveId ?? "vetra";
|
|
8
|
+
if (driveHeader.slug !== vetraDriveId && driveHeader.id !== vetraDriveId) {
|
|
5
9
|
return [];
|
|
6
10
|
}
|
|
7
|
-
const processor = new CodegenProcessor();
|
|
11
|
+
const processor = new CodegenProcessor(vetraConfig?.interactive);
|
|
8
12
|
return [
|
|
9
13
|
{
|
|
10
14
|
processor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../processors/codegen/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../processors/codegen/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,CAAC,MAAM,uBAAuB,GAClC,CAAC,MAA4B,EAAE,EAAE,CACjC,CAAC,WAA6B,EAAqB,EAAE;IACnD,uBAAuB;IACvB,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,GAAG,EAAmB,CAAC;IACrE,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,CAAC,0BAA0B,CAEtD,CAAC;IAEd,MAAM,YAAY,GAAG,WAAW,EAAE,OAAO,IAAI,OAAO,CAAC;IAErD,IAAI,WAAW,CAAC,IAAI,KAAK,YAAY,IAAI,WAAW,CAAC,EAAE,KAAK,YAAY,EAAE,CAAC;QACzE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjE,OAAO;QACL;YACE,SAAS;YACT,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC,MAAM,CAAC;gBAChB,UAAU,EAAE,CAAC,GAAG,CAAC;gBACjB,YAAY,EAAE;oBACZ,2BAA2B;oBAC3B,oBAAoB;oBACpB,4BAA4B;oBAC5B,qBAAqB;oBACrB,sBAAsB;oBACtB,gBAAgB;iBACjB;gBACD,KAAK,EAAE,CAAC,QAAQ,CAAC;aAClB;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { IProcessor } from "document-drive/processors/types";
|
|
|
2
2
|
import type { InternalTransmitterUpdate } from "document-drive/server/listener/transmitter/internal";
|
|
3
3
|
export declare class CodegenProcessor implements IProcessor {
|
|
4
4
|
private manager;
|
|
5
|
-
constructor();
|
|
5
|
+
constructor(interactiveMode?: boolean);
|
|
6
6
|
onStrands(strands: InternalTransmitterUpdate[]): Promise<void>;
|
|
7
7
|
onDisconnect(): Promise<void>;
|
|
8
8
|
setInteractiveMode(enabled: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/codegen/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAQrG,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,OAAO,CAAyB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/codegen/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAQrG,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,OAAO,CAAyB;gBAE5B,eAAe,UAAQ;IAoB7B,SAAS,CAAC,OAAO,EAAE,yBAAyB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAqC9D,YAAY;IAGX,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI1C,aAAa,IAAI,OAAO;IAIxB,uBAAuB,IAAI,OAAO;CAG1C"}
|
|
@@ -5,15 +5,13 @@ const PH_CONFIG = getConfig();
|
|
|
5
5
|
const CURRENT_WORKING_DIR = process.cwd();
|
|
6
6
|
export class CodegenProcessor {
|
|
7
7
|
manager;
|
|
8
|
-
constructor() {
|
|
9
|
-
// Determine interactive mode from environment variable
|
|
10
|
-
const isInteractive = process.env.CODEGEN_INTERACTIVE?.toLowerCase() === "true";
|
|
8
|
+
constructor(interactiveMode = false) {
|
|
11
9
|
this.manager = DocumentCodegenFactory.createManager({
|
|
12
10
|
PH_CONFIG,
|
|
13
11
|
CURRENT_WORKING_DIR,
|
|
14
|
-
},
|
|
15
|
-
if (
|
|
16
|
-
logger.info(`🔔 CodegenProcessor initialized with interactive mode enabled
|
|
12
|
+
}, interactiveMode);
|
|
13
|
+
if (interactiveMode) {
|
|
14
|
+
logger.info(`🔔 CodegenProcessor initialized with interactive mode enabled`);
|
|
17
15
|
}
|
|
18
16
|
else {
|
|
19
17
|
logger.debug(`CodegenProcessor initialized with interactive mode disabled`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../processors/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1C,MAAM,OAAO,gBAAgB;IACnB,OAAO,CAAyB;IAExC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../processors/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,E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