@powerhousedao/vetra 4.1.0-dev.30 â 4.1.0-dev.31
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/document-handlers/base-document-gen.d.ts +5 -0
- package/dist/processors/codegen/document-handlers/base-document-gen.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/base-document-gen.js +16 -0
- package/dist/processors/codegen/document-handlers/base-document-gen.js.map +1 -1
- package/dist/processors/codegen/document-handlers/document-codegen-factory.d.ts +2 -2
- package/dist/processors/codegen/document-handlers/document-codegen-factory.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/document-codegen-factory.js +4 -4
- package/dist/processors/codegen/document-handlers/document-codegen-factory.js.map +1 -1
- package/dist/processors/codegen/document-handlers/document-codegen-manager.d.ts +24 -1
- package/dist/processors/codegen/document-handlers/document-codegen-manager.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/document-codegen-manager.js +121 -21
- package/dist/processors/codegen/document-handlers/document-codegen-manager.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/app-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/app-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/app-generator.js +28 -5
- package/dist/processors/codegen/document-handlers/generators/app-generator.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js +59 -48
- package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/document-model-generator.js +47 -31
- package/dist/processors/codegen/document-handlers/generators/document-model-generator.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/package-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/package-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/package-generator.js +15 -0
- package/dist/processors/codegen/document-handlers/generators/package-generator.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/processor-generator.js +42 -10
- package/dist/processors/codegen/document-handlers/generators/processor-generator.js.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/subgraph-generator.d.ts +4 -0
- package/dist/processors/codegen/document-handlers/generators/subgraph-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/subgraph-generator.js +28 -5
- package/dist/processors/codegen/document-handlers/generators/subgraph-generator.js.map +1 -1
- package/dist/processors/codegen/index.d.ts +5 -0
- package/dist/processors/codegen/index.d.ts.map +1 -1
- package/dist/processors/codegen/index.js +49 -6
- package/dist/processors/codegen/index.js.map +1 -1
- package/dist/processors/codegen/interactive-manager.d.ts +48 -0
- package/dist/processors/codegen/interactive-manager.d.ts.map +1 -0
- package/dist/processors/codegen/interactive-manager.js +150 -0
- package/dist/processors/codegen/interactive-manager.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
|
@@ -26,5 +26,10 @@ export declare abstract class BaseDocumentGen {
|
|
|
26
26
|
* Get all supported document types as an array
|
|
27
27
|
*/
|
|
28
28
|
getSupportedDocumentTypes(): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Validate if this strand should be processed
|
|
31
|
+
* Override this method in specific generators to add custom validation logic
|
|
32
|
+
*/
|
|
33
|
+
shouldProcess(strand: InternalTransmitterUpdate<DocumentModelDocument>): boolean;
|
|
29
34
|
}
|
|
30
35
|
//# sourceMappingURL=base-document-gen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-document-gen.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/base-document-gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,8BAAsB,eAAe;IAOvB,SAAS,CAAC,MAAM,EAAE,MAAM;IANpC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;gBAEtC,MAAM,EAAE,MAAM;IAEpC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CACf,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC;IAEhB;;OAEG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAOnD;;OAEG;IACH,yBAAyB,IAAI,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"base-document-gen.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/base-document-gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,8BAAsB,eAAe;IAOvB,SAAS,CAAC,MAAM,EAAE,MAAM;IANpC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;gBAEtC,MAAM,EAAE,MAAM;IAEpC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CACf,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC;IAEhB;;OAEG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAOnD;;OAEG;IACH,yBAAyB,IAAI,MAAM,EAAE;IAOrC;;;OAGG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GAAG,OAAO;CAcjF"}
|
|
@@ -25,5 +25,21 @@ export class BaseDocumentGen {
|
|
|
25
25
|
}
|
|
26
26
|
return [...this.supportedDocumentTypes];
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Validate if this strand should be processed
|
|
30
|
+
* Override this method in specific generators to add custom validation logic
|
|
31
|
+
*/
|
|
32
|
+
shouldProcess(strand) {
|
|
33
|
+
// Basic validation: ensure strand has required properties
|
|
34
|
+
if (!strand.documentId || !strand.documentType) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
// Basic validation: check if document type is supported
|
|
38
|
+
if (!this.supportsDocumentType(strand.documentType)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
// Default to processing if basic validation passes
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
45
|
//# sourceMappingURL=base-document-gen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-document-gen.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/base-document-gen.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAgB,eAAe;IAOb;IAAtB,YAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAUxC;;OAEG;IACH,oBAAoB,CAAC,YAAoB;QACvC,IAAI,OAAO,IAAI,CAAC,sBAAsB,KAAK,QAAQ,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,sBAAsB,KAAK,YAAY,CAAC;QACtD,CAAC;QACD,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,yBAAyB;QACvB,IAAI,OAAO,IAAI,CAAC,sBAAsB,KAAK,QAAQ,EAAE,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"base-document-gen.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/base-document-gen.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAgB,eAAe;IAOb;IAAtB,YAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAUxC;;OAEG;IACH,oBAAoB,CAAC,YAAoB;QACvC,IAAI,OAAO,IAAI,CAAC,sBAAsB,KAAK,QAAQ,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,sBAAsB,KAAK,YAAY,CAAC;QACtD,CAAC;QACD,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,yBAAyB;QACvB,IAAI,OAAO,IAAI,CAAC,sBAAsB,KAAK,QAAQ,EAAE,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,MAAwD;QACnE,0DAA0D;QAC1D,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAChD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,wDAAwD;QACxD,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,mDAAmD;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -9,11 +9,11 @@ export declare class DocumentCodegenFactory {
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a DocumentCodegenManager with all standard generators registered
|
|
11
11
|
*/
|
|
12
|
-
static createManager(config: Config): DocumentCodegenManager;
|
|
12
|
+
static createManager(config: Config, interactiveMode?: boolean): DocumentCodegenManager;
|
|
13
13
|
/**
|
|
14
14
|
* Create a DocumentCodegenManager with only specific generators
|
|
15
15
|
*/
|
|
16
|
-
static createManagerWithGenerators(config: Config, generators: Array<new (config: Config) => any
|
|
16
|
+
static createManagerWithGenerators(config: Config, generators: Array<new (config: Config) => any>, interactiveMode?: boolean): DocumentCodegenManager;
|
|
17
17
|
/**
|
|
18
18
|
* Get all available generator classes
|
|
19
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codegen-factory.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,qBAAa,sBAAsB;IACjC;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB;
|
|
1
|
+
{"version":3,"file":"document-codegen-factory.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,qBAAa,sBAAsB;IACjC;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,GAAE,OAAe,GAAG,sBAAsB;IAoB9F;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAChC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,KAAK,CAAC,KAAK,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC,EAC9C,eAAe,GAAE,OAAe,GAC/B,sBAAsB;IAezB;;OAEG;IACH,MAAM,CAAC,sBAAsB;;;;;;;;CAU9B"}
|
|
@@ -8,8 +8,8 @@ export class DocumentCodegenFactory {
|
|
|
8
8
|
/**
|
|
9
9
|
* Create a DocumentCodegenManager with all standard generators registered
|
|
10
10
|
*/
|
|
11
|
-
static createManager(config) {
|
|
12
|
-
const manager = new DocumentCodegenManager(config);
|
|
11
|
+
static createManager(config, interactiveMode = false) {
|
|
12
|
+
const manager = new DocumentCodegenManager(config, interactiveMode);
|
|
13
13
|
// Register all the standard generators
|
|
14
14
|
manager.registerGenerator("powerhouse/document-model", DocumentModelGenerator);
|
|
15
15
|
manager.registerGenerator("powerhouse/package", PackageGenerator);
|
|
@@ -22,8 +22,8 @@ export class DocumentCodegenFactory {
|
|
|
22
22
|
/**
|
|
23
23
|
* Create a DocumentCodegenManager with only specific generators
|
|
24
24
|
*/
|
|
25
|
-
static createManagerWithGenerators(config, generators) {
|
|
26
|
-
const manager = new DocumentCodegenManager(config);
|
|
25
|
+
static createManagerWithGenerators(config, generators, interactiveMode = false) {
|
|
26
|
+
const manager = new DocumentCodegenManager(config, interactiveMode);
|
|
27
27
|
for (const generatorClass of generators) {
|
|
28
28
|
const generator = new generatorClass(config);
|
|
29
29
|
const supportedTypes = generator.getSupportedDocumentTypes();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codegen-factory.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAG/B;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACjC;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAc;
|
|
1
|
+
{"version":3,"file":"document-codegen-factory.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAG/B;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACjC;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAc,EAAE,kBAA2B,KAAK;QACnE,MAAM,OAAO,GAAG,IAAI,sBAAsB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QAEpE,uCAAuC;QACvC,OAAO,CAAC,iBAAiB,CACvB,2BAA2B,EAC3B,sBAAsB,CACvB,CAAC;QACF,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;QAClE,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QAC1D,OAAO,CAAC,iBAAiB,CACvB,4BAA4B,EAC5B,uBAAuB,CACxB,CAAC;QACF,OAAO,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;QACpE,OAAO,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;QAEtE,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAChC,MAAc,EACd,UAA8C,EAC9C,kBAA2B,KAAK;QAEhC,MAAM,OAAO,GAAG,IAAI,sBAAsB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QAEpE,KAAK,MAAM,cAAc,IAAI,UAAU,EAAE,CAAC;YACxC,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,MAAM,CAAoB,CAAC;YAChE,MAAM,cAAc,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC;YAE7D,KAAK,MAAM,YAAY,IAAI,cAAc,EAAE,CAAC;gBAC1C,OAAO,CAAC,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,sBAAsB;QAC3B,OAAO;YACL,sBAAsB;YACtB,gBAAgB;YAChB,YAAY;YACZ,uBAAuB;YACvB,iBAAiB;YACjB,kBAAkB;SACnB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -10,7 +10,8 @@ export declare class DocumentCodegenManager {
|
|
|
10
10
|
private config;
|
|
11
11
|
private generators;
|
|
12
12
|
private debounceTimers;
|
|
13
|
-
|
|
13
|
+
private interactiveManager;
|
|
14
|
+
constructor(config: Config, interactiveMode?: boolean);
|
|
14
15
|
/**
|
|
15
16
|
* Register a generator class for a specific document type
|
|
16
17
|
*/
|
|
@@ -21,6 +22,7 @@ export declare class DocumentCodegenManager {
|
|
|
21
22
|
registerMultiTypeGenerator(generatorClass: new (config: Config) => BaseDocumentGen): void;
|
|
22
23
|
/**
|
|
23
24
|
* Get a generator instance for the given document type
|
|
25
|
+
* Public method to allow external access for validation
|
|
24
26
|
*/
|
|
25
27
|
getGenerator(documentType: string): BaseDocumentGen | undefined;
|
|
26
28
|
/**
|
|
@@ -33,8 +35,17 @@ export declare class DocumentCodegenManager {
|
|
|
33
35
|
isDocumentTypeSupported(documentType: string): boolean;
|
|
34
36
|
/**
|
|
35
37
|
* Route a document to the appropriate generator and handle the generation
|
|
38
|
+
* Handles both interactive and non-interactive modes with queue-based processing
|
|
36
39
|
*/
|
|
37
40
|
routeAndGenerate(strand: InternalTransmitterUpdate<DocumentModelDocument>): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Process multiple strands in priority order (document-model types first)
|
|
43
|
+
*/
|
|
44
|
+
private processQueuedStrands;
|
|
45
|
+
/**
|
|
46
|
+
* Process a single strand (used internally by processQueuedStrands)
|
|
47
|
+
*/
|
|
48
|
+
private processStrand;
|
|
38
49
|
/**
|
|
39
50
|
* Clear all registered generators
|
|
40
51
|
*/
|
|
@@ -46,5 +57,17 @@ export declare class DocumentCodegenManager {
|
|
|
46
57
|
totalGenerators: number;
|
|
47
58
|
supportedTypes: string[];
|
|
48
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Set interactive mode for code generation
|
|
62
|
+
*/
|
|
63
|
+
setInteractiveMode(enabled: boolean): void;
|
|
64
|
+
/**
|
|
65
|
+
* Check if interactive mode is enabled
|
|
66
|
+
*/
|
|
67
|
+
isInteractiveMode(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Check if the manager is currently processing an interactive confirmation
|
|
70
|
+
*/
|
|
71
|
+
isProcessingInteractive(): boolean;
|
|
49
72
|
}
|
|
50
73
|
//# sourceMappingURL=document-codegen-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codegen-manager.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"document-codegen-manager.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,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,uBAAuB,IAAI,OAAO;CAGnC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { InteractiveManager } from "../interactive-manager.js";
|
|
1
2
|
import { logger } from "../logger.js";
|
|
3
|
+
const DEFAULT_DEBOUNCE_TIME = 1000; // 1 second
|
|
2
4
|
/**
|
|
3
5
|
* Manager class responsible for routing documents to the correct generator
|
|
4
6
|
* and managing generator registration and instantiation
|
|
@@ -7,8 +9,10 @@ export class DocumentCodegenManager {
|
|
|
7
9
|
config;
|
|
8
10
|
generators = new Map();
|
|
9
11
|
debounceTimers = new Map();
|
|
10
|
-
|
|
12
|
+
interactiveManager;
|
|
13
|
+
constructor(config, interactiveMode = false) {
|
|
11
14
|
this.config = config;
|
|
15
|
+
this.interactiveManager = new InteractiveManager(interactiveMode);
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* Register a generator class for a specific document type
|
|
@@ -36,6 +40,7 @@ export class DocumentCodegenManager {
|
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* Get a generator instance for the given document type
|
|
43
|
+
* Public method to allow external access for validation
|
|
39
44
|
*/
|
|
40
45
|
getGenerator(documentType) {
|
|
41
46
|
return this.generators.get(documentType);
|
|
@@ -54,6 +59,7 @@ export class DocumentCodegenManager {
|
|
|
54
59
|
}
|
|
55
60
|
/**
|
|
56
61
|
* Route a document to the appropriate generator and handle the generation
|
|
62
|
+
* Handles both interactive and non-interactive modes with queue-based processing
|
|
57
63
|
*/
|
|
58
64
|
async routeAndGenerate(strand) {
|
|
59
65
|
const documentType = strand.documentType;
|
|
@@ -67,29 +73,105 @@ export class DocumentCodegenManager {
|
|
|
67
73
|
logger.info(`âšī¸ Supported document types: ${this.getRegisteredDocumentTypes().join(", ")}`);
|
|
68
74
|
throw new Error(`Unsupported document type: ${documentType}`);
|
|
69
75
|
}
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
// Validate if this strand should be processed
|
|
77
|
+
if (!generator.shouldProcess(strand)) {
|
|
78
|
+
logger.debug(`>>> Generator validation failed for ${documentType}:${strand.documentId}, skipping processing`);
|
|
79
|
+
return;
|
|
74
80
|
}
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
// Different flow for interactive vs non-interactive mode
|
|
82
|
+
if (this.interactiveManager.isInteractive()) {
|
|
83
|
+
// Interactive mode: queue strands and use debounce timer to trigger batch processing
|
|
84
|
+
logger.debug(`>>> Queueing strand for interactive processing: ${documentType}:${strand.documentId}`);
|
|
85
|
+
// Add strand to queue (will replace any existing strand for same document)
|
|
86
|
+
this.interactiveManager.queueStrand(strand);
|
|
87
|
+
// Clear any existing debounce timer for interactive processing
|
|
88
|
+
const existingTimer = this.debounceTimers.get('interactive');
|
|
89
|
+
if (existingTimer) {
|
|
90
|
+
clearTimeout(existingTimer);
|
|
81
91
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
// Set up debounce timer for batch interactive processing
|
|
93
|
+
const debounceTimer = setTimeout(async () => {
|
|
94
|
+
try {
|
|
95
|
+
await this.interactiveManager.processQueueWithConfirmation(async (queuedStrands) => {
|
|
96
|
+
await this.processQueuedStrands(queuedStrands);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
logger.error("â Error during interactive batch processing:", error);
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
// Clean up the timer reference
|
|
104
|
+
this.debounceTimers.delete('interactive');
|
|
105
|
+
}
|
|
106
|
+
}, DEFAULT_DEBOUNCE_TIME);
|
|
107
|
+
// Store the timer reference using 'interactive' key
|
|
108
|
+
this.debounceTimers.set('interactive', debounceTimer);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// Non-interactive mode: use debouncing per document type
|
|
112
|
+
// Clear any existing debounce timer for this document type
|
|
113
|
+
const existingTimer = this.debounceTimers.get(documentType);
|
|
114
|
+
if (existingTimer) {
|
|
115
|
+
clearTimeout(existingTimer);
|
|
89
116
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
117
|
+
// Set up new debounced generation (no interactive confirmation)
|
|
118
|
+
const debounceTimer = setTimeout(async () => {
|
|
119
|
+
try {
|
|
120
|
+
logger.info(`đ Routing document type "${documentType}" to generator (debounced)`);
|
|
121
|
+
// Direct generation, no interactive confirmation
|
|
122
|
+
await generator.generate(strand);
|
|
123
|
+
logger.info(`â
Successfully generated code for document type: ${documentType}`);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
logger.error(`â Error generating code for document type "${documentType}":`, error);
|
|
127
|
+
// Don't throw - let codegen continue with other documents
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
// Clean up the timer reference
|
|
131
|
+
this.debounceTimers.delete(documentType);
|
|
132
|
+
}
|
|
133
|
+
}, DEFAULT_DEBOUNCE_TIME);
|
|
134
|
+
// Store the timer reference
|
|
135
|
+
this.debounceTimers.set(documentType, debounceTimer);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Process multiple strands in priority order (document-model types first)
|
|
140
|
+
*/
|
|
141
|
+
async processQueuedStrands(queuedStrands) {
|
|
142
|
+
logger.info(`đ Processing ${queuedStrands.length} queued strand(s)`);
|
|
143
|
+
// Sort by priority (document-model first to ensure dependencies exist)
|
|
144
|
+
const documentModelStrands = queuedStrands.filter((qs) => qs.strand.documentType === "powerhouse/document-model");
|
|
145
|
+
const otherStrands = queuedStrands.filter((qs) => qs.strand.documentType !== "powerhouse/document-model");
|
|
146
|
+
// Process document models first
|
|
147
|
+
for (const queuedStrand of documentModelStrands) {
|
|
148
|
+
await this.processStrand(queuedStrand.strand);
|
|
149
|
+
}
|
|
150
|
+
// Then process other document types
|
|
151
|
+
for (const queuedStrand of otherStrands) {
|
|
152
|
+
await this.processStrand(queuedStrand.strand);
|
|
153
|
+
}
|
|
154
|
+
logger.info(`â
Successfully processed all ${queuedStrands.length} queued strand(s)`);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Process a single strand (used internally by processQueuedStrands)
|
|
158
|
+
*/
|
|
159
|
+
async processStrand(strand) {
|
|
160
|
+
const documentType = strand.documentType;
|
|
161
|
+
const generator = this.getGenerator(documentType);
|
|
162
|
+
if (!generator) {
|
|
163
|
+
logger.warn(`â ī¸ No generator found for document type: ${documentType}`);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
logger.info(`đ Generating code for document type: ${documentType}`);
|
|
168
|
+
await generator.generate(strand);
|
|
169
|
+
logger.info(`â
Successfully generated code for document type: ${documentType}`);
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
logger.error(`â Error generating code for document type "${documentType}":`, error);
|
|
173
|
+
// Don't throw here to allow other strands to be processed
|
|
174
|
+
}
|
|
93
175
|
}
|
|
94
176
|
/**
|
|
95
177
|
* Clear all registered generators
|
|
@@ -107,5 +189,23 @@ export class DocumentCodegenManager {
|
|
|
107
189
|
supportedTypes: this.getRegisteredDocumentTypes(),
|
|
108
190
|
};
|
|
109
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Set interactive mode for code generation
|
|
194
|
+
*/
|
|
195
|
+
setInteractiveMode(enabled) {
|
|
196
|
+
this.interactiveManager.setInteractiveMode(enabled);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Check if interactive mode is enabled
|
|
200
|
+
*/
|
|
201
|
+
isInteractiveMode() {
|
|
202
|
+
return this.interactiveManager.isInteractive();
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Check if the manager is currently processing an interactive confirmation
|
|
206
|
+
*/
|
|
207
|
+
isProcessingInteractive() {
|
|
208
|
+
return this.interactiveManager.isProcessing();
|
|
209
|
+
}
|
|
110
210
|
}
|
|
111
211
|
//# sourceMappingURL=document-codegen-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codegen-manager.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC;;;GAGG;AACH,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"document-codegen-manager.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/document-codegen-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,MAAM,qBAAqB,GAAG,IAAI,CAAC,CAAC,WAAW;AAE/C;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAMvB;IALF,UAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;IAChD,cAAc,GAAG,IAAI,GAAG,EAA0B,CAAC;IACnD,kBAAkB,CAAqB;IAE/C,YACU,MAAc,EACtB,kBAA2B,KAAK;QADxB,WAAM,GAAN,MAAM,CAAQ;QAGtB,IAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,YAAoB,EACpB,cAAuD;QAEvD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CACT,mCAAmC,YAAY,uCAAuC,CACvF,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACnE,MAAM,CAAC,IAAI,CAAC,6CAA6C,YAAY,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,0BAA0B,CACxB,cAAuD;QA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AAC,KAAK,CAAC,8CAA8C,YAAY,IAAI,EAAE,KAAK,CAAC,CAAC;YACpF,0DAA0D;QAC5D,CAAC;IACH,CAAC;IAED;;OAEG;IACH,eAAe;QACb,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI;YACrC,cAAc,EAAE,IAAI,CAAC,0BAA0B,EAAE;SAClD,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,OAAgB;QACjC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,uBAAuB;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -6,6 +6,10 @@ import { BaseDocumentGen } from "../base-document-gen.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class AppGenerator extends BaseDocumentGen {
|
|
8
8
|
readonly supportedDocumentTypes = "powerhouse/app";
|
|
9
|
+
/**
|
|
10
|
+
* Validate if this app strand should be processed
|
|
11
|
+
*/
|
|
12
|
+
shouldProcess(strand: InternalTransmitterUpdate<DocumentModelDocument>): boolean;
|
|
9
13
|
generate(strand: InternalTransmitterUpdate<DocumentModelDocument>): Promise<void>;
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=app-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe;IAC/C,QAAQ,CAAC,sBAAsB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"app-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe;IAC/C,QAAQ,CAAC,sBAAsB,oBAAoB;IAEnD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GAAG,OAAO;IA0B1E,QAAQ,CACZ,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC;CAqEjB"}
|
|
@@ -7,6 +7,30 @@ import { BaseDocumentGen } from "../base-document-gen.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export class AppGenerator extends BaseDocumentGen {
|
|
9
9
|
supportedDocumentTypes = "powerhouse/app";
|
|
10
|
+
/**
|
|
11
|
+
* Validate if this app strand should be processed
|
|
12
|
+
*/
|
|
13
|
+
shouldProcess(strand) {
|
|
14
|
+
// First run base validation
|
|
15
|
+
if (!super.shouldProcess(strand)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const state = strand.state;
|
|
19
|
+
if (!state) {
|
|
20
|
+
logger.debug(`>>> No state found for app: ${strand.documentId}`);
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
// Check if we have a valid app name and it's confirmed
|
|
24
|
+
if (!state.name) {
|
|
25
|
+
logger.debug(`>>> No name found for app: ${strand.documentId}`);
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (state.status !== "CONFIRMED") {
|
|
29
|
+
logger.debug(`>>> App not confirmed: ${state.name} (status: ${state.status})`);
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
10
34
|
async generate(strand) {
|
|
11
35
|
const state = strand.state;
|
|
12
36
|
// Check if we have a valid app name and it's confirmed
|
|
@@ -42,17 +66,16 @@ export class AppGenerator extends BaseDocumentGen {
|
|
|
42
66
|
if (error instanceof Error) {
|
|
43
67
|
logger.error(`â Error message: ${error.message}`);
|
|
44
68
|
}
|
|
45
|
-
throw error;
|
|
46
69
|
}
|
|
47
70
|
}
|
|
48
71
|
else {
|
|
49
72
|
if (!state.name) {
|
|
50
|
-
logger.
|
|
51
|
-
|
|
73
|
+
logger.error(`â Skipping drive editor generation - missing name for app`);
|
|
74
|
+
return;
|
|
52
75
|
}
|
|
53
76
|
else if (state.status !== "CONFIRMED") {
|
|
54
|
-
logger.
|
|
55
|
-
|
|
77
|
+
logger.error(`â Skipping drive editor generation - app "${state.name}" is not confirmed (status: ${state.status})`);
|
|
78
|
+
return;
|
|
56
79
|
}
|
|
57
80
|
}
|
|
58
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-generator.js","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,eAAe;IACtC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C,IAAI,GAAG,EAC/D,KAAK,CACN,CAAC;gBACF,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;oBAC3B,MAAM,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpD,CAAC;
|
|
1
|
+
{"version":3,"file":"app-generator.js","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,eAAe;IACtC,sBAAsB,GAAG,gBAAgB,CAAC;IAEnD;;OAEG;IACH,aAAa,CAAC,MAAwD;QACpE,4BAA4B;QAC5B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAuB,CAAC;QAC7C,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,+BAA+B,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;YACjE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,uDAAuD;QACvD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC,8BAA8B,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YACjC,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,MAAM,GAAG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AC;gBACf,MAAM,CAAC,KAAK,CACV,kDAAkD,KAAK,CAAC,IAAI,GAAG,EAC/D,KAAK,CACN,CAAC;gBACF,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;oBAC3B,MAAM,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;gBAChB,MAAM,CAAC,KAAK,CACV,2DAA2D,CAC5D,CAAC;gBACF,OAAO;YACT,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBACxC,MAAM,CAAC,KAAK,CACV,6CAA6C,KAAK,CAAC,IAAI,+BAA+B,KAAK,CAAC,MAAM,GAAG,CACtG,CAAC;gBACF,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -6,6 +6,10 @@ import { BaseDocumentGen } from "../base-document-gen.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class DocumentEditorGenerator extends BaseDocumentGen {
|
|
8
8
|
readonly supportedDocumentTypes = "powerhouse/document-editor";
|
|
9
|
+
/**
|
|
10
|
+
* Validate if this document editor strand should be processed
|
|
11
|
+
*/
|
|
12
|
+
shouldProcess(strand: InternalTransmitterUpdate<DocumentModelDocument>): boolean;
|
|
9
13
|
generate(strand: InternalTransmitterUpdate<DocumentModelDocument>): Promise<void>;
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=document-editor-generator.d.ts.map
|
package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-editor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,sBAAsB,gCAAgC;
|
|
1
|
+
{"version":3,"file":"document-editor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,sBAAsB,gCAAgC;IAE/D;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GAAG,OAAO;IA+B1E,QAAQ,CACZ,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC;CAiEjB"}
|
|
@@ -7,61 +7,72 @@ import { BaseDocumentGen } from "../base-document-gen.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export class DocumentEditorGenerator extends BaseDocumentGen {
|
|
9
9
|
supportedDocumentTypes = "powerhouse/document-editor";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Validate if this document editor strand should be processed
|
|
12
|
+
*/
|
|
13
|
+
shouldProcess(strand) {
|
|
14
|
+
// First run base validation
|
|
15
|
+
if (!super.shouldProcess(strand)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
11
18
|
const state = strand.state;
|
|
19
|
+
if (!state) {
|
|
20
|
+
logger.debug(`>>> No state found for document editor: ${strand.documentId}`);
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
12
23
|
// Check if we have a valid editor name, document types, and it's confirmed
|
|
13
|
-
if (state.name
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
if (!state.name) {
|
|
25
|
+
logger.debug(`>>> No name found for document editor: ${strand.documentId}`);
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (!state.documentTypes || state.documentTypes.length === 0) {
|
|
29
|
+
logger.debug(`>>> No document types found for document editor: ${state.name}`);
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (state.status !== "CONFIRMED") {
|
|
33
|
+
logger.debug(`>>> Document editor not confirmed: ${state.name} (status: ${state.status})`);
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
async generate(strand) {
|
|
39
|
+
const state = strand.state;
|
|
40
|
+
// Validation is already done in shouldProcess, so we can proceed directly
|
|
41
|
+
logger.info(`đ Starting editor generation for: ${state.name}`);
|
|
42
|
+
try {
|
|
43
|
+
// Extract document types from the state
|
|
44
|
+
const documentTypes = state.documentTypes.map((dt) => dt.documentType);
|
|
45
|
+
// Generate editor ID using kebabCase
|
|
46
|
+
const editorId = kebabCase(state.name);
|
|
47
|
+
// Generate the editor using the codegen function
|
|
48
|
+
await generateEditor(state.name, documentTypes, this.config.PH_CONFIG, editorId);
|
|
49
|
+
logger.info(`â
Editor generation completed successfully for: ${state.name}`);
|
|
50
|
+
// Update the manifest with the new editor
|
|
17
51
|
try {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
editors: [
|
|
30
|
-
{
|
|
31
|
-
id: editorId,
|
|
32
|
-
name: state.name,
|
|
33
|
-
documentTypes: documentTypes,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
}, this.config.CURRENT_WORKING_DIR);
|
|
37
|
-
logger.info(`â
Manifest updated successfully for editor: ${state.name}`);
|
|
38
|
-
}
|
|
39
|
-
catch (manifestError) {
|
|
40
|
-
logger.error(`â ī¸ Failed to update manifest for editor ${state.name}:`, manifestError);
|
|
41
|
-
// Don't throw here - editor generation was successful
|
|
42
|
-
}
|
|
52
|
+
logger.info(`đ Updating manifest with editor: ${state.name} (ID: ${editorId})`);
|
|
53
|
+
generateManifest({
|
|
54
|
+
editors: [
|
|
55
|
+
{
|
|
56
|
+
id: editorId,
|
|
57
|
+
name: state.name,
|
|
58
|
+
documentTypes: documentTypes,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}, this.config.CURRENT_WORKING_DIR);
|
|
62
|
+
logger.info(`â
Manifest updated successfully for editor: ${state.name}`);
|
|
43
63
|
}
|
|
44
|
-
catch (
|
|
45
|
-
logger.error(
|
|
46
|
-
|
|
47
|
-
logger.error(`â Error message: ${error.message}`);
|
|
48
|
-
}
|
|
49
|
-
throw error;
|
|
64
|
+
catch (manifestError) {
|
|
65
|
+
logger.error(`â ī¸ Failed to update manifest for editor ${state.name}:`, manifestError);
|
|
66
|
+
// Don't throw here - editor generation was successful
|
|
50
67
|
}
|
|
51
68
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
else if (state.documentTypes.length === 0) {
|
|
58
|
-
logger.debug(`â ī¸ Skipping editor generation - missing document types for editor "${state.name}"`);
|
|
59
|
-
throw new Error(`Editor "${state.name}" has no document types`);
|
|
60
|
-
}
|
|
61
|
-
else if (state.status !== "CONFIRMED") {
|
|
62
|
-
logger.debug(`âšī¸ Skipping editor generation - editor "${state.name}" is not confirmed (status: ${state.status})`);
|
|
63
|
-
throw new Error(`Editor "${state.name}" is not confirmed (status: ${state.status})`);
|
|
69
|
+
catch (error) {
|
|
70
|
+
logger.error(`â Error during editor generation for ${state.name}:`, error);
|
|
71
|
+
if (error instanceof Error) {
|
|
72
|
+
logger.error(`â Error message: ${error.message}`);
|
|
64
73
|
}
|
|
74
|
+
// Don't throw - let codegen continue with other documents
|
|
75
|
+
return;
|
|
65
76
|
}
|
|
66
77
|
}
|
|
67
78
|
}
|
package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-editor-generator.js","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,eAAe;IACjD,sBAAsB,GAAG,4BAA4B,CAAC;IAE/D,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"document-editor-generator.js","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,eAAe;IACjD,sBAAsB,GAAG,4BAA4B,CAAC;IAE/D;;OAEG;IACH,aAAa,CAAC,MAAwD;QACpE,4BAA4B;QAC5B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAA4B,CAAC;QAClD,IAAI,CAAC,KAAK,E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