@loopstack/core 0.6.1 → 0.7.0
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/CHANGELOG.md +12 -0
- package/dist/config/core/tools/create-document.yaml +11 -1
- package/dist/config/core/tools/validate-document.yaml +17 -0
- package/dist/config/core/tools/validate.yaml +4 -1
- package/dist/modules/configuration/services/schema-registry.service.d.ts +2 -2
- package/dist/modules/configuration/services/schema-registry.service.js.map +1 -1
- package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.js +1 -0
- package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/errors/index.d.ts +2 -0
- package/dist/modules/workflow-processor/errors/index.js +19 -0
- package/dist/modules/workflow-processor/errors/index.js.map +1 -0
- package/dist/modules/workflow-processor/errors/schema-validation.error.d.ts +3 -0
- package/dist/modules/workflow-processor/errors/schema-validation.error.js +11 -0
- package/dist/modules/workflow-processor/errors/schema-validation.error.js.map +1 -0
- package/dist/modules/workflow-processor/errors/workflow-validation.error.d.ts +3 -0
- package/dist/modules/workflow-processor/errors/workflow-validation.error.js +11 -0
- package/dist/modules/workflow-processor/errors/workflow-validation.error.js.map +1 -0
- package/dist/modules/workflow-processor/handlers/create-document.handler.d.ts +18 -10
- package/dist/modules/workflow-processor/handlers/create-document.handler.js +29 -6
- package/dist/modules/workflow-processor/handlers/create-document.handler.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/index.d.ts +1 -0
- package/dist/modules/workflow-processor/handlers/index.js +1 -0
- package/dist/modules/workflow-processor/handlers/index.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/load-document.handler.d.ts +7 -42
- package/dist/modules/workflow-processor/handlers/update-document.handler.d.ts +6 -6
- package/dist/modules/workflow-processor/handlers/validate-document.handler.d.ts +18 -0
- package/dist/modules/workflow-processor/handlers/validate-document.handler.js +77 -0
- package/dist/modules/workflow-processor/handlers/validate-document.handler.js.map +1 -0
- package/dist/modules/workflow-processor/handlers/validate.handler.d.ts +3 -0
- package/dist/modules/workflow-processor/handlers/validate.handler.js +22 -9
- package/dist/modules/workflow-processor/handlers/validate.handler.js.map +1 -1
- package/dist/modules/workflow-processor/index.d.ts +1 -0
- package/dist/modules/workflow-processor/index.js +1 -0
- package/dist/modules/workflow-processor/index.js.map +1 -1
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js +3 -14
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/tool-execution.service.js +6 -0
- package/dist/modules/workflow-processor/services/tool-execution.service.js.map +1 -1
- package/dist/modules/workflow-processor/workflow-processor.module.js +1 -0
- package/dist/modules/workflow-processor/workflow-processor.module.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @loopstack/core
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- feat: add validation handlers and error results for documents
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Fix: create workspace with preconfigured title in task
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @loopstack/shared@0.7.0
|
|
14
|
+
|
|
3
15
|
## 0.6.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -5,8 +5,16 @@ tools:
|
|
|
5
5
|
properties:
|
|
6
6
|
document:
|
|
7
7
|
type: string
|
|
8
|
+
validate:
|
|
9
|
+
type: string
|
|
10
|
+
enum:
|
|
11
|
+
- strict
|
|
12
|
+
- safe
|
|
13
|
+
- skip
|
|
8
14
|
content:
|
|
9
15
|
type: any
|
|
16
|
+
schema:
|
|
17
|
+
type: any
|
|
10
18
|
ui:
|
|
11
19
|
type: any
|
|
12
20
|
required:
|
|
@@ -16,6 +24,8 @@ tools:
|
|
|
16
24
|
- handler: CreateDocumentHandler
|
|
17
25
|
arguments:
|
|
18
26
|
document: ${ arguments.document }
|
|
27
|
+
validate: ${ arguments.validate }
|
|
19
28
|
update:
|
|
20
29
|
content: ${ arguments.content }
|
|
21
|
-
ui: ${ arguments.ui }
|
|
30
|
+
ui: ${ arguments.ui }
|
|
31
|
+
schema: ${ arguments.schema }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
tools:
|
|
2
|
+
- name: validate_document
|
|
3
|
+
parameters:
|
|
4
|
+
type: object
|
|
5
|
+
properties:
|
|
6
|
+
documentId:
|
|
7
|
+
type: string
|
|
8
|
+
message:
|
|
9
|
+
type: string
|
|
10
|
+
required:
|
|
11
|
+
- documentId
|
|
12
|
+
additionalProperties: false
|
|
13
|
+
execute:
|
|
14
|
+
- handler: ValidateDocumentHandler
|
|
15
|
+
arguments:
|
|
16
|
+
documentId: ${ arguments.documentId }
|
|
17
|
+
message: ${ arguments.message }
|
|
@@ -7,6 +7,8 @@ tools:
|
|
|
7
7
|
type: any
|
|
8
8
|
schema:
|
|
9
9
|
type: any
|
|
10
|
+
message:
|
|
11
|
+
type: string
|
|
10
12
|
required:
|
|
11
13
|
- source
|
|
12
14
|
- schema
|
|
@@ -15,4 +17,5 @@ tools:
|
|
|
15
17
|
- handler: ValidateHandler
|
|
16
18
|
arguments:
|
|
17
19
|
source: ${ arguments.source }
|
|
18
|
-
schema: ${ arguments.schema }
|
|
20
|
+
schema: ${ arguments.schema }
|
|
21
|
+
message: ${ arguments.message }
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare class SchemaRegistry {
|
|
3
3
|
private logger;
|
|
4
4
|
private zodSchemas;
|
|
5
|
-
|
|
5
|
+
createZod(jsonSchema: any): z.ZodType;
|
|
6
6
|
addJSONSchema(key: string, jsonSchema: any): void;
|
|
7
|
-
getZodSchema(path: string): z.
|
|
7
|
+
getZodSchema(path: string): z.ZodType | undefined;
|
|
8
8
|
getSize(): number;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-registry.service.js","sourceRoot":"","sources":["../../../../src/modules/configuration/services/schema-registry.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2DAAqD;AACrD,6BAAwB;AACxB,2CAAoD;AAG7C,IAAM,cAAc,sBAApB,MAAM,cAAc;IACjB,MAAM,GAAG,IAAI,eAAM,CAAC,gBAAc,CAAC,IAAI,CAAC,CAAC;IACzC,UAAU,GAA6B,IAAI,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"schema-registry.service.js","sourceRoot":"","sources":["../../../../src/modules/configuration/services/schema-registry.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2DAAqD;AACrD,6BAAwB;AACxB,2CAAoD;AAG7C,IAAM,cAAc,sBAApB,MAAM,cAAc;IACjB,MAAM,GAAG,IAAI,eAAM,CAAC,gBAAc,CAAC,IAAI,CAAC,CAAC;IACzC,UAAU,GAA6B,IAAI,GAAG,EAAE,CAAC;IAElD,SAAS,CAAC,UAAe;QAC9B,MAAM,eAAe,GAAG,IAAA,oCAAe,EAAC,UAAU,CAAC,CAAC;QACpD,OAAO,IAAI,QAAQ,CAAC,GAAG,EAAE,UAAU,eAAe,EAAE,CAAC,CAAC,OAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,aAAa,CAAC,GAAW,EAAE,UAAe;QAC/C,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,oCAAoC,GAAG,MAAM,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACxG,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,YAAY,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF,CAAA;AA3BY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CA2B1B"}
|
package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.js
CHANGED
|
@@ -39,6 +39,7 @@ let CreateWorkspaceTaskProcessorService = CreateWorkspaceTaskProcessorService_1
|
|
|
39
39
|
}
|
|
40
40
|
const workspace = await this.workspaceService.create({
|
|
41
41
|
configKey: workspaceConfig.key,
|
|
42
|
+
title: workspaceConfig.config.title ?? workspaceConfig.name,
|
|
42
43
|
}, user);
|
|
43
44
|
this.logger.debug(`Workspace created with id ${workspace.id}`);
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-workspace-task-processor.service.js","sourceRoot":"","sources":["../../../../../src/modules/scheduler/services/task-processor/create-workspace-task-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAEpD,0DAA8D;AAC9D,sDAAwD;AACxD,qCAAiC;AAI1B,IAAM,mCAAmC,2CAAzC,MAAM,mCAAmC;IAM3B;IACA;IANF,MAAM,GAAG,IAAI,eAAM,CAClC,qCAAmC,CAAC,IAAI,CACzC,CAAC;IAEF,YACmB,oBAA0C,EAC1C,gBAAkC;QADlC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEG,KAAK,CAAC,OAAO,CAClB,IAAyB,EACzB,QAAgC;QAEhC,MAAM,eAAe,GACnB,IAAI,CAAC,oBAAoB,CAAC,aAAa,CACrC,YAAY,EACZ,IAAI,CAAC,OAAO,CAAC,SAAS,EACtB,QAAQ,EAAE,QAAQ,IAAI,EAAE,CACzB,CAAC;QACJ,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,IAAI,GAAkB,IAAI,CAAC;QAEjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;YACxD,SAAS,EAAE,eAAe,CAAC,GAAG;YAC9B,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAA,gBAAM,GAAE,CAAC,CAAC,CAAC,IAAI;SAC3C,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,OAAO;QACT,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAClD;YACE,SAAS,EAAE,eAAe,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"create-workspace-task-processor.service.js","sourceRoot":"","sources":["../../../../../src/modules/scheduler/services/task-processor/create-workspace-task-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAEpD,0DAA8D;AAC9D,sDAAwD;AACxD,qCAAiC;AAI1B,IAAM,mCAAmC,2CAAzC,MAAM,mCAAmC;IAM3B;IACA;IANF,MAAM,GAAG,IAAI,eAAM,CAClC,qCAAmC,CAAC,IAAI,CACzC,CAAC;IAEF,YACmB,oBAA0C,EAC1C,gBAAkC;QADlC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEG,KAAK,CAAC,OAAO,CAClB,IAAyB,EACzB,QAAgC;QAEhC,MAAM,eAAe,GACnB,IAAI,CAAC,oBAAoB,CAAC,aAAa,CACrC,YAAY,EACZ,IAAI,CAAC,OAAO,CAAC,SAAS,EACtB,QAAQ,EAAE,QAAQ,IAAI,EAAE,CACzB,CAAC;QACJ,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,IAAI,GAAkB,IAAI,CAAC;QAEjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;YACxD,SAAS,EAAE,eAAe,CAAC,GAAG;YAC9B,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAA,gBAAM,GAAE,CAAC,CAAC,CAAC,IAAI;SAC3C,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,OAAO;QACT,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAClD;YACE,SAAS,EAAE,eAAe,CAAC,GAAG;YAC9B,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,IAAI,eAAe,CAAC,IAAI;SAC5D,EACD,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AA9CY,kFAAmC;8CAAnC,mCAAmC;IAD/C,IAAA,mBAAU,GAAE;qCAO8B,oCAAoB;QACxB,8BAAgB;GAP1C,mCAAmC,CA8C/C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./workflow-validation.error"), exports);
|
|
18
|
+
__exportStar(require("./schema-validation.error"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,4DAAyC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaValidationError = void 0;
|
|
4
|
+
class SchemaValidationError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'SchemaValidationError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.SchemaValidationError = SchemaValidationError;
|
|
11
|
+
//# sourceMappingURL=schema-validation.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-validation.error.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/errors/schema-validation.error.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AALD,sDAKC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowValidationError = void 0;
|
|
4
|
+
class WorkflowValidationError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'WorkflowValidationError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.WorkflowValidationError = WorkflowValidationError;
|
|
11
|
+
//# sourceMappingURL=workflow-validation.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-validation.error.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/errors/workflow-validation.error.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AALD,0DAKC"}
|
|
@@ -6,8 +6,10 @@ import { DocumentService } from '../../persistence';
|
|
|
6
6
|
import { TemplateExpressionEvaluatorService } from '../services';
|
|
7
7
|
declare const schema: z.ZodObject<{
|
|
8
8
|
document: z.ZodString;
|
|
9
|
+
validate: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"strict">, z.ZodLiteral<"safe">, z.ZodLiteral<"skip">]>>>;
|
|
9
10
|
update: z.ZodOptional<z.ZodObject<{
|
|
10
11
|
content: z.ZodAny;
|
|
12
|
+
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
11
13
|
ui: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
12
14
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
13
15
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -17,36 +19,38 @@ declare const schema: z.ZodObject<{
|
|
|
17
19
|
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
20
|
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
21
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
21
22
|
invalidate?: boolean | undefined;
|
|
23
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
22
24
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
23
25
|
enableAtPlaces?: string[] | undefined;
|
|
24
26
|
hideAtPlaces?: string[] | undefined;
|
|
25
27
|
}, {
|
|
26
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
27
28
|
invalidate?: boolean | undefined;
|
|
29
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
28
30
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
29
31
|
enableAtPlaces?: string[] | undefined;
|
|
30
32
|
hideAtPlaces?: string[] | undefined;
|
|
31
33
|
}>>;
|
|
32
34
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
ui?: any;
|
|
34
35
|
content?: any;
|
|
36
|
+
ui?: any;
|
|
37
|
+
schema?: any;
|
|
35
38
|
tags?: string[] | undefined;
|
|
36
39
|
meta?: {
|
|
37
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
38
40
|
invalidate?: boolean | undefined;
|
|
41
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
39
42
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
40
43
|
enableAtPlaces?: string[] | undefined;
|
|
41
44
|
hideAtPlaces?: string[] | undefined;
|
|
42
45
|
} | undefined;
|
|
43
46
|
}, {
|
|
44
|
-
ui?: any;
|
|
45
47
|
content?: any;
|
|
48
|
+
ui?: any;
|
|
49
|
+
schema?: any;
|
|
46
50
|
tags?: string[] | undefined;
|
|
47
51
|
meta?: {
|
|
48
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
49
52
|
invalidate?: boolean | undefined;
|
|
53
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
50
54
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
51
55
|
enableAtPlaces?: string[] | undefined;
|
|
52
56
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -54,13 +58,15 @@ declare const schema: z.ZodObject<{
|
|
|
54
58
|
}>>;
|
|
55
59
|
}, "strict", z.ZodTypeAny, {
|
|
56
60
|
document: string;
|
|
61
|
+
validate?: "strict" | "skip" | "safe" | undefined;
|
|
57
62
|
update?: {
|
|
58
|
-
ui?: any;
|
|
59
63
|
content?: any;
|
|
64
|
+
ui?: any;
|
|
65
|
+
schema?: any;
|
|
60
66
|
tags?: string[] | undefined;
|
|
61
67
|
meta?: {
|
|
62
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
63
68
|
invalidate?: boolean | undefined;
|
|
69
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
64
70
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
65
71
|
enableAtPlaces?: string[] | undefined;
|
|
66
72
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -68,13 +74,15 @@ declare const schema: z.ZodObject<{
|
|
|
68
74
|
} | undefined;
|
|
69
75
|
}, {
|
|
70
76
|
document: string;
|
|
77
|
+
validate?: "strict" | "skip" | "safe" | undefined;
|
|
71
78
|
update?: {
|
|
72
|
-
ui?: any;
|
|
73
79
|
content?: any;
|
|
80
|
+
ui?: any;
|
|
81
|
+
schema?: any;
|
|
74
82
|
tags?: string[] | undefined;
|
|
75
83
|
meta?: {
|
|
76
|
-
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
77
84
|
invalidate?: boolean | undefined;
|
|
85
|
+
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
78
86
|
level?: "error" | "debug" | "info" | "warning" | undefined;
|
|
79
87
|
enableAtPlaces?: string[] | undefined;
|
|
80
88
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -18,12 +18,19 @@ const zod_1 = require("zod");
|
|
|
18
18
|
const persistence_1 = require("../../persistence");
|
|
19
19
|
const lodash_1 = require("lodash");
|
|
20
20
|
const services_1 = require("../services");
|
|
21
|
+
const errors_1 = require("../errors");
|
|
21
22
|
const schema = zod_1.z
|
|
22
23
|
.object({
|
|
23
24
|
document: zod_1.z.string(),
|
|
25
|
+
validate: zod_1.z.union([
|
|
26
|
+
zod_1.z.literal('strict'),
|
|
27
|
+
zod_1.z.literal('safe'),
|
|
28
|
+
zod_1.z.literal('skip'),
|
|
29
|
+
]).default('strict').optional(),
|
|
24
30
|
update: zod_1.z
|
|
25
31
|
.object({
|
|
26
32
|
content: zod_1.z.any(),
|
|
33
|
+
schema: shared_1.JSONSchemaType.optional(),
|
|
27
34
|
ui: shared_1.UISchema.optional(),
|
|
28
35
|
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
29
36
|
meta: zod_1.z
|
|
@@ -49,6 +56,12 @@ const schema = zod_1.z
|
|
|
49
56
|
const config = zod_1.z
|
|
50
57
|
.object({
|
|
51
58
|
document: zod_1.z.string(),
|
|
59
|
+
validate: zod_1.z.union([
|
|
60
|
+
shared_1.ExpressionString,
|
|
61
|
+
zod_1.z.literal('strict'),
|
|
62
|
+
zod_1.z.literal('safe'),
|
|
63
|
+
zod_1.z.literal('skip'),
|
|
64
|
+
]).optional(),
|
|
52
65
|
update: zod_1.z
|
|
53
66
|
.object({
|
|
54
67
|
content: zod_1.z.any(),
|
|
@@ -56,6 +69,10 @@ const config = zod_1.z
|
|
|
56
69
|
shared_1.UISchema,
|
|
57
70
|
shared_1.ExpressionString,
|
|
58
71
|
]).optional(),
|
|
72
|
+
schema: zod_1.z.union([
|
|
73
|
+
shared_1.JSONSchemaType,
|
|
74
|
+
shared_1.ExpressionString,
|
|
75
|
+
]).optional(),
|
|
59
76
|
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
60
77
|
meta: zod_1.z
|
|
61
78
|
.object({
|
|
@@ -95,9 +112,7 @@ let CreateDocumentHandler = CreateDocumentHandler_1 = class CreateDocumentHandle
|
|
|
95
112
|
throw new Error('Workflow is undefined');
|
|
96
113
|
}
|
|
97
114
|
const template = this.loopConfigService.resolveConfig('documents', props.document, context.includes);
|
|
98
|
-
console.log('props.update', props.update);
|
|
99
115
|
const mergedTemplateData = (0, lodash_1.merge)({}, template.config, props.update ?? {});
|
|
100
|
-
console.log('mergedTemplateData', mergedTemplateData.ui);
|
|
101
116
|
const documentSkeleton = this.templateExpressionEvaluatorService.parse((0, lodash_1.omit)(mergedTemplateData, ['content']), {
|
|
102
117
|
arguments: parentArguments,
|
|
103
118
|
context,
|
|
@@ -106,7 +121,8 @@ let CreateDocumentHandler = CreateDocumentHandler_1 = class CreateDocumentHandle
|
|
|
106
121
|
}, {
|
|
107
122
|
schema: shared_1.DocumentSchema,
|
|
108
123
|
});
|
|
109
|
-
const
|
|
124
|
+
const documentSchema = documentSkeleton.schema;
|
|
125
|
+
const zodSchema = documentSchema ? this.schemaRegistry.createZod(documentSchema) : undefined;
|
|
110
126
|
if (!zodSchema && mergedTemplateData.content) {
|
|
111
127
|
throw Error(`Document creates with content no schema defined.`);
|
|
112
128
|
}
|
|
@@ -116,8 +132,6 @@ let CreateDocumentHandler = CreateDocumentHandler_1 = class CreateDocumentHandle
|
|
|
116
132
|
context,
|
|
117
133
|
workflow,
|
|
118
134
|
transition: meta,
|
|
119
|
-
}, {
|
|
120
|
-
schema: zodSchema,
|
|
121
135
|
})
|
|
122
136
|
: null;
|
|
123
137
|
const documentData = {
|
|
@@ -125,7 +139,16 @@ let CreateDocumentHandler = CreateDocumentHandler_1 = class CreateDocumentHandle
|
|
|
125
139
|
content: parsedDocumentContent,
|
|
126
140
|
configKey: template.key,
|
|
127
141
|
};
|
|
128
|
-
|
|
142
|
+
if (zodSchema && props.validate !== 'skip') {
|
|
143
|
+
const result = zodSchema.safeParse(documentData.content);
|
|
144
|
+
if (!result.success) {
|
|
145
|
+
if (props.validate === 'strict') {
|
|
146
|
+
this.logger.error(result.error);
|
|
147
|
+
throw new errors_1.SchemaValidationError('Document schema validation failed (strict)');
|
|
148
|
+
}
|
|
149
|
+
documentData.validationError = result.error;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
129
152
|
const document = this.documentService.create(workflow, context, meta, documentData);
|
|
130
153
|
this.logger.debug(`Created document "${documentData.name}".`);
|
|
131
154
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-document.handler.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/create-document.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,8CAW2B;AAC3B,uDAA2E;AAE3E,6BAAwB;AAExB,mDAAoD;AACpD,mCAAqC;AACrC,0CAAiE;
|
|
1
|
+
{"version":3,"file":"create-document.handler.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/create-document.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,8CAW2B;AAC3B,uDAA2E;AAE3E,6BAAwB;AAExB,mDAAoD;AACpD,mCAAqC;AACrC,0CAAiE;AACjE,sCAAkD;AAElD,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC;QAChB,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACnB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;KAClB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC;SACN,MAAM,CAAC;QACN,OAAO,EAAE,OAAC,CAAC,GAAG,EAAE;QAChB,MAAM,EAAE,uBAAc,CAAC,QAAQ,EAAE;QACjC,EAAE,EAAE,iBAAQ,CAAC,QAAQ,EAAE;QACvB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACpC,IAAI,EAAE,OAAC;aACJ,MAAM,CAAC;YACN,QAAQ,EAAE,uBAAc,CAAC,QAAQ,EAAE;YACnC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YAClC,KAAK,EAAE,OAAC;iBACL,KAAK,CAAC;gBACL,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;gBAClB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;gBACjB,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;gBACpB,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;aACnB,CAAC;iBACD,QAAQ,EAAE;YACb,cAAc,EAAE,OAAC,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C;oBAChC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAChC,MAAM,IAAI,8BAAqB,CAAC,4CAA4C,CAAC,CAAA;gBAC/E,CAAC;gBAED,YAAY,CAAC,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC;YAC9C,CAAC;QACH,CAAC;QAGD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAC1C,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,YAAY,CACb,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,YAAY,CAAC,IAAI,IAAI,CAAC,CAAC;QAE9D,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,IAAI,EAAE,QAAQ;SACf,CAAC;IACJ,CAAC;CACF,CAAA;AAvGY,sDAAqB;gCAArB,qBAAqB;IAJjC,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;qCAK6B,oCAAoB;QACtB,6BAAe;QACI,6CAAkC;QACtD,8BAAc;GAP7B,qBAAqB,CAuGjC"}
|
|
@@ -25,4 +25,5 @@ __exportStar(require("./batch-create-documents.handler"), exports);
|
|
|
25
25
|
__exportStar(require("./set-target-place.handler"), exports);
|
|
26
26
|
__exportStar(require("./validate.handler"), exports);
|
|
27
27
|
__exportStar(require("./reset-error.handler"), exports);
|
|
28
|
+
__exportStar(require("./validate-document.handler"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,4DAA0C;AAC1C,iDAA+B;AAC/B,0DAAwC;AACxC,wDAAsC;AACtC,gEAA8C;AAC9C,4DAA0C;AAC1C,mEAAiD;AACjD,6DAA2C;AAC3C,qDAAmC;AACnC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,4DAA0C;AAC1C,iDAA+B;AAC/B,0DAAwC;AACxC,wDAAsC;AACtC,gEAA8C;AAC9C,4DAA0C;AAC1C,mEAAiD;AACjD,6DAA2C;AAC3C,qDAAmC;AACnC,wDAAsC;AACtC,8DAA4C"}
|
|
@@ -3,28 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { DocumentEntity, WorkflowEntity } from '@loopstack/shared';
|
|
4
4
|
import { DocumentService, WorkflowService } from '../../persistence';
|
|
5
5
|
declare const schema: z.ZodObject<{
|
|
6
|
-
where:
|
|
7
|
-
name: any;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
name?: any;
|
|
10
|
-
}, {
|
|
11
|
-
name?: any;
|
|
12
|
-
}>, z.ZodObject<{
|
|
13
|
-
and: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
14
|
-
or: z.ZodOptional<z.ZodArray<any, "many">>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
and?: any[] | undefined;
|
|
17
|
-
or?: any[] | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
and?: any[] | undefined;
|
|
20
|
-
or?: any[] | undefined;
|
|
21
|
-
}>, z.ZodObject<{
|
|
22
|
-
brackets: any;
|
|
23
|
-
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
brackets?: any;
|
|
25
|
-
}, {
|
|
26
|
-
brackets?: any;
|
|
27
|
-
}>]>;
|
|
6
|
+
where: any;
|
|
28
7
|
orderBy: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<"ASC">, z.ZodLiteral<"DESC">]>>>;
|
|
29
8
|
getMany: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
30
9
|
take: z.ZodDefault<z.ZodNumber>;
|
|
@@ -33,36 +12,22 @@ declare const schema: z.ZodObject<{
|
|
|
33
12
|
isGlobal: z.ZodDefault<z.ZodBoolean>;
|
|
34
13
|
strictMode: z.ZodDefault<z.ZodBoolean>;
|
|
35
14
|
}, "strict", z.ZodTypeAny, {
|
|
36
|
-
|
|
37
|
-
brackets?: any;
|
|
38
|
-
} | {
|
|
39
|
-
name?: any;
|
|
40
|
-
} | {
|
|
41
|
-
and?: any[] | undefined;
|
|
42
|
-
or?: any[] | undefined;
|
|
43
|
-
};
|
|
15
|
+
isGlobal: boolean;
|
|
44
16
|
orderBy: Record<string, "ASC" | "DESC">;
|
|
45
|
-
getMany: boolean;
|
|
46
17
|
take: number;
|
|
47
18
|
skip: number;
|
|
19
|
+
getMany: boolean;
|
|
48
20
|
isDependency: boolean;
|
|
49
|
-
isGlobal: boolean;
|
|
50
21
|
strictMode: boolean;
|
|
22
|
+
where?: any;
|
|
51
23
|
}, {
|
|
52
|
-
|
|
53
|
-
brackets?: any;
|
|
54
|
-
} | {
|
|
55
|
-
name?: any;
|
|
56
|
-
} | {
|
|
57
|
-
and?: any[] | undefined;
|
|
58
|
-
or?: any[] | undefined;
|
|
59
|
-
};
|
|
24
|
+
isGlobal?: boolean | undefined;
|
|
60
25
|
orderBy?: Record<string, "ASC" | "DESC"> | undefined;
|
|
61
|
-
getMany?: boolean | undefined;
|
|
62
26
|
take?: number | undefined;
|
|
63
27
|
skip?: number | undefined;
|
|
28
|
+
where?: any;
|
|
29
|
+
getMany?: boolean | undefined;
|
|
64
30
|
isDependency?: boolean | undefined;
|
|
65
|
-
isGlobal?: boolean | undefined;
|
|
66
31
|
strictMode?: boolean | undefined;
|
|
67
32
|
}>;
|
|
68
33
|
export declare class LoadDocumentHandler implements HandlerInterface {
|
|
@@ -16,14 +16,14 @@ declare const schema: z.ZodObject<{
|
|
|
16
16
|
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
17
|
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
mimeType?: string | undefined;
|
|
20
19
|
invalidate?: string | boolean | undefined;
|
|
20
|
+
mimeType?: string | undefined;
|
|
21
21
|
level?: string | undefined;
|
|
22
22
|
enableAtPlaces?: string[] | undefined;
|
|
23
23
|
hideAtPlaces?: string[] | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
mimeType?: string | undefined;
|
|
26
25
|
invalidate?: string | boolean | undefined;
|
|
26
|
+
mimeType?: string | undefined;
|
|
27
27
|
level?: string | undefined;
|
|
28
28
|
enableAtPlaces?: string[] | undefined;
|
|
29
29
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -32,8 +32,8 @@ declare const schema: z.ZodObject<{
|
|
|
32
32
|
content?: any;
|
|
33
33
|
tags?: string[] | undefined;
|
|
34
34
|
meta?: {
|
|
35
|
-
mimeType?: string | undefined;
|
|
36
35
|
invalidate?: string | boolean | undefined;
|
|
36
|
+
mimeType?: string | undefined;
|
|
37
37
|
level?: string | undefined;
|
|
38
38
|
enableAtPlaces?: string[] | undefined;
|
|
39
39
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -42,8 +42,8 @@ declare const schema: z.ZodObject<{
|
|
|
42
42
|
content?: any;
|
|
43
43
|
tags?: string[] | undefined;
|
|
44
44
|
meta?: {
|
|
45
|
-
mimeType?: string | undefined;
|
|
46
45
|
invalidate?: string | boolean | undefined;
|
|
46
|
+
mimeType?: string | undefined;
|
|
47
47
|
level?: string | undefined;
|
|
48
48
|
enableAtPlaces?: string[] | undefined;
|
|
49
49
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -55,8 +55,8 @@ declare const schema: z.ZodObject<{
|
|
|
55
55
|
content?: any;
|
|
56
56
|
tags?: string[] | undefined;
|
|
57
57
|
meta?: {
|
|
58
|
-
mimeType?: string | undefined;
|
|
59
58
|
invalidate?: string | boolean | undefined;
|
|
59
|
+
mimeType?: string | undefined;
|
|
60
60
|
level?: string | undefined;
|
|
61
61
|
enableAtPlaces?: string[] | undefined;
|
|
62
62
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -68,8 +68,8 @@ declare const schema: z.ZodObject<{
|
|
|
68
68
|
content?: any;
|
|
69
69
|
tags?: string[] | undefined;
|
|
70
70
|
meta?: {
|
|
71
|
-
mimeType?: string | undefined;
|
|
72
71
|
invalidate?: string | boolean | undefined;
|
|
72
|
+
mimeType?: string | undefined;
|
|
73
73
|
level?: string | undefined;
|
|
74
74
|
enableAtPlaces?: string[] | undefined;
|
|
75
75
|
hideAtPlaces?: string[] | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HandlerInterface, HandlerCallResult, WorkflowEntity, ContextInterface } from '@loopstack/shared';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
documentId: z.ZodString;
|
|
5
|
+
message: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
documentId: string;
|
|
8
|
+
message?: string | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
documentId: string;
|
|
11
|
+
message?: string | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare class ValidateDocumentHandler implements HandlerInterface {
|
|
14
|
+
private readonly logger;
|
|
15
|
+
private createZod;
|
|
16
|
+
apply(props: z.infer<typeof schema>, workflow: WorkflowEntity | undefined, context: ContextInterface): Promise<HandlerCallResult>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var ValidateDocumentHandler_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ValidateDocumentHandler = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const shared_1 = require("@loopstack/shared");
|
|
13
|
+
const zod_1 = require("zod");
|
|
14
|
+
const json_schema_to_zod_1 = require("json-schema-to-zod");
|
|
15
|
+
const config = zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
documentId: zod_1.z.union([
|
|
18
|
+
shared_1.ExpressionString,
|
|
19
|
+
zod_1.z.string(),
|
|
20
|
+
]),
|
|
21
|
+
message: zod_1.z.union([
|
|
22
|
+
shared_1.ExpressionString,
|
|
23
|
+
zod_1.z.string(),
|
|
24
|
+
]).optional(),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
const schema = zod_1.z
|
|
28
|
+
.object({
|
|
29
|
+
documentId: zod_1.z.string(),
|
|
30
|
+
message: zod_1.z.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|
|
33
|
+
let ValidateDocumentHandler = ValidateDocumentHandler_1 = class ValidateDocumentHandler {
|
|
34
|
+
logger = new common_1.Logger(ValidateDocumentHandler_1.name);
|
|
35
|
+
createZod(jsonSchema) {
|
|
36
|
+
const zodSchemaString = (0, json_schema_to_zod_1.jsonSchemaToZod)(jsonSchema);
|
|
37
|
+
return new Function('z', `return ${zodSchemaString}`)(zod_1.z);
|
|
38
|
+
}
|
|
39
|
+
async apply(props, workflow, context) {
|
|
40
|
+
if (!workflow) {
|
|
41
|
+
throw new Error('Workflow is undefined');
|
|
42
|
+
}
|
|
43
|
+
let document = workflow.documents.find((item) => item.id === props.documentId);
|
|
44
|
+
if (!document) {
|
|
45
|
+
throw new Error(`Document with ID ${props.documentId} not found.`);
|
|
46
|
+
}
|
|
47
|
+
const zodSchema = this.createZod(document.schema);
|
|
48
|
+
if (!zodSchema) {
|
|
49
|
+
throw Error(`No schema defined.`);
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
const result = zodSchema.parse(document.schema);
|
|
53
|
+
return {
|
|
54
|
+
success: true,
|
|
55
|
+
data: {
|
|
56
|
+
valid: true,
|
|
57
|
+
result,
|
|
58
|
+
error: null,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (props.message) {
|
|
64
|
+
throw new Error(props.message);
|
|
65
|
+
}
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.ValidateDocumentHandler = ValidateDocumentHandler;
|
|
71
|
+
exports.ValidateDocumentHandler = ValidateDocumentHandler = ValidateDocumentHandler_1 = __decorate([
|
|
72
|
+
(0, shared_1.Handler)({
|
|
73
|
+
config,
|
|
74
|
+
schema,
|
|
75
|
+
})
|
|
76
|
+
], ValidateDocumentHandler);
|
|
77
|
+
//# sourceMappingURL=validate-document.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-document.handler.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/validate-document.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAwC;AACxC,8CAM2B;AAC3B,6BAAwB;AACxB,2DAAqD;AAErD,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC;QAClB,yBAAgB;QAChB,OAAC,CAAC,MAAM,EAAE;KACX,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC;QACf,yBAAgB;QAChB,OAAC,CAAC,MAAM,EAAE;KACX,CAAC,CAAC,QAAQ,EAAE;CACd,CAAC;K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O,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,KAAK,EAAE,IAAI;oBACX,MAAM;oBACN,KAAK,EAAE,IAAI;iBACZ;aACF,CAAA;QACH,CAAC;QAAC,OAAM,KAAK,EAAE,CAAC;YACd,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAA;AA9CY,0DAAuB;kCAAvB,uBAAuB;IAJnC,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;GACW,uBAAuB,CA8CnC"}
|
|
@@ -3,10 +3,13 @@ import { z } from 'zod';
|
|
|
3
3
|
declare const schema: z.ZodObject<{
|
|
4
4
|
source: z.ZodAny;
|
|
5
5
|
schema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
6
|
+
message: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
message?: string | undefined;
|
|
7
9
|
schema?: any;
|
|
8
10
|
source?: any;
|
|
9
11
|
}, {
|
|
12
|
+
message?: string | undefined;
|
|
10
13
|
schema?: any;
|
|
11
14
|
source?: any;
|
|
12
15
|
}>;
|
|
@@ -22,12 +22,17 @@ const config = zod_1.z
|
|
|
22
22
|
shared_1.ExpressionString,
|
|
23
23
|
shared_1.JSONSchemaType,
|
|
24
24
|
]),
|
|
25
|
+
message: zod_1.z.union([
|
|
26
|
+
shared_1.ExpressionString,
|
|
27
|
+
zod_1.z.string(),
|
|
28
|
+
]).optional(),
|
|
25
29
|
})
|
|
26
30
|
.strict();
|
|
27
31
|
const schema = zod_1.z
|
|
28
32
|
.object({
|
|
29
33
|
source: zod_1.z.any(),
|
|
30
34
|
schema: shared_1.JSONSchemaType,
|
|
35
|
+
message: zod_1.z.string().optional(),
|
|
31
36
|
})
|
|
32
37
|
.strict();
|
|
33
38
|
let ValidateHandler = ValidateHandler_1 = class ValidateHandler {
|
|
@@ -41,15 +46,23 @@ let ValidateHandler = ValidateHandler_1 = class ValidateHandler {
|
|
|
41
46
|
if (!zodSchema) {
|
|
42
47
|
throw Error(`No schema defined.`);
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
try {
|
|
50
|
+
const result = zodSchema.parse(props.source);
|
|
51
|
+
return {
|
|
52
|
+
success: true,
|
|
53
|
+
data: {
|
|
54
|
+
valid: true,
|
|
55
|
+
result,
|
|
56
|
+
error: null,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
if (props.message) {
|
|
62
|
+
throw new Error(props.message);
|
|
63
|
+
}
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
53
66
|
}
|
|
54
67
|
};
|
|
55
68
|
exports.ValidateHandler = ValidateHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.handler.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/validate.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAwC;AACxC,8CAM2B;AAC3B,6BAAwB;AACxB,2DAAqD;AAErD,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC;QACd,yBAAgB;QAChB,OAAC,CAAC,GAAG,EAAE;KACR,CAAC;IACF,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC;QACd,yBAAgB;QAChB,uBAAc;KACf,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.handler.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/handlers/validate.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAwC;AACxC,8CAM2B;AAC3B,6BAAwB;AACxB,2DAAqD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oBACJ,KAAK,EAAE,IAAI;oBACX,MAAM;oBACN,KAAK,EAAE,IAAI;iBACZ;aACF,CAAA;QACH,CAAC;QAAC,OAAM,KAAK,EAAE,CAAC;YACd,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAA;AArCY,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;GACW,eAAe,CAqC3B"}
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./services"), exports);
|
|
18
|
+
__exportStar(require("./errors"), exports);
|
|
18
19
|
__exportStar(require("./workflow-processor.module"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,8DAA4C"}
|
|
@@ -15,18 +15,7 @@ const common_2 = require("../../common");
|
|
|
15
15
|
const configuration_1 = require("../../configuration");
|
|
16
16
|
const lodash_1 = require("lodash");
|
|
17
17
|
const zod_1 = require("zod");
|
|
18
|
-
|
|
19
|
-
constructor(message) {
|
|
20
|
-
super(message);
|
|
21
|
-
this.name = 'WorkflowValidationError';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
class SchemaValidationError extends Error {
|
|
25
|
-
constructor(message) {
|
|
26
|
-
super(message);
|
|
27
|
-
this.name = 'SchemaValidationError';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
18
|
+
const errors_1 = require("../errors");
|
|
30
19
|
const SNIPPETS_CONFIG_KEY = 'snippets';
|
|
31
20
|
const DEFAULT_PARSE_OPTIONS = {
|
|
32
21
|
omitAliasVariables: false,
|
|
@@ -77,7 +66,7 @@ let TemplateExpressionEvaluatorService = class TemplateExpressionEvaluatorServic
|
|
|
77
66
|
return {};
|
|
78
67
|
}
|
|
79
68
|
if (!variables.workflow) {
|
|
80
|
-
throw new WorkflowValidationError('Workflow is required when omitWorkflowData is false. Either provide a workflow or set omitWorkflowData to true.');
|
|
69
|
+
throw new errors_1.WorkflowValidationError('Workflow is required when omitWorkflowData is false. Either provide a workflow or set omitWorkflowData to true.');
|
|
81
70
|
}
|
|
82
71
|
return { data: variables.workflow.currData };
|
|
83
72
|
}
|
|
@@ -94,7 +83,7 @@ let TemplateExpressionEvaluatorService = class TemplateExpressionEvaluatorServic
|
|
|
94
83
|
return schema.parse(result);
|
|
95
84
|
}
|
|
96
85
|
catch (error) {
|
|
97
|
-
throw new SchemaValidationError(`Schema validation failed': ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
86
|
+
throw new errors_1.SchemaValidationError(`Schema validation failed': ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
98
87
|
}
|
|
99
88
|
}
|
|
100
89
|
parse(subject, variables, options) {
|
package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-expression-evaluator.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/template-expression-evaluator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAO5C,yCAA+C;AAC/C,uDAA2D;AAC3D,mCAAwC;AACxC,6BAAwB;
|
|
1
|
+
{"version":3,"file":"template-expression-evaluator.service.js","sourceRoot":"","sources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AAC,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,8BAAqB,CAC7B,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACzF,CAAC;QACJ,CAAC;IACH,CAAC;IAKD,KAAK,CACH,OAAY,EACZ,SAA4B,EAC5B,OAAsB;QAEtB,IACE,OAAO,IAAI,IAAI;YACf,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC,EAC5D,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,MAAM,aAAa,GAAG,EAAE,GAAG,qBAAqB,EAAE,GAAG,OAAO,EAAE,CAAC;QAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,sBAAsB,CACnD,SAAS,EACT,aAAa,CACd,CAAC;QAEF,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAC9C,OAAO,EACP,iBAAiB,CAClB,CAAC;QAEF,OAAO,OAAO,EAAE,MAAM;YACpB,CAAC,CAAC,IAAI,CAAC,cAAc,CAAI,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;YAChD,CAAC,CAAC,MAAM,CAAC;IACb,CAAC;CACF,CAAA;AApJY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,mBAAU,GAAE;qCAGqB,oCAAoB;QACzB,wBAAe;GAH/B,kCAAkC,CAoJ9C"}
|
|
@@ -81,6 +81,12 @@ let ToolExecutionService = ToolExecutionService_1 = class ToolExecutionService {
|
|
|
81
81
|
if (execute.as) {
|
|
82
82
|
extraVariables[execute.as] = result?.data;
|
|
83
83
|
}
|
|
84
|
+
if (!result?.success) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (!result) {
|
|
89
|
+
throw new Error(`Tool execution provided no results.`);
|
|
84
90
|
}
|
|
85
91
|
return result;
|
|
86
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/tool-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAA2E;AAS3E,mGAA6F;AAC7F,2EAAsE;AACtE,yCAA8C;AAE9C,6BAAwB;AAGjB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAIrB;IACA;IACA;IACA;IACA;IAPF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEvD,YACU,oBAA0C,EAC1C,kCAAsE,EACtE,uBAAgD,EAChD,cAA8B,EAC9B,cAA8B;QAJ9B,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,uCAAkC,GAAlC,kCAAkC,CAAoC;QACtE,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;IACrC,CAAC;IAEJ,iBAAiB,CACf,OAAuC;QAEvC,OAAO,SAAS,IAAI,OAAO,CAAC;IAC9B,CAAC;IAED,cAAc,CACZ,OAAuC;QAEvC,OAAO,MAAM,IAAI,OAAO,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,SAAS,CACb,QAAsB,EACtB,eAAoB,EACpB,QAAoC,EACpC,OAAyB,EACzB,cAA2C,EAC3C,iBAAsC;QAEtC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,QAAQ,QAAQ,CAAC,IAAI,wBAAwB,EAC7C,QAAQ,CAAC,SAAS,CACnB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;QAExD,MAAM,QAAQ,GAAG,IAAI,CAAC,kCAAkC,CAAC,KAAK,CAC5D,QAAQ,CAAC,IAAI,EACb;YACE,GAAG,iBAAiB;YACpB,SAAS,EAAE,eAAe;YAC1B,OAAO;YACP,QAAQ;YACR,UAAU,EAAE,cAAc;SAC3B,EACD;YACE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;SACnB,CACF,CAAC;QAEF,MAAM,aAAa,GACjB,IAAI,CAAC,oBAAoB,CAAC,aAAa,CACrC,OAAO,EACP,QAAQ,EACR,OAAO,CAAC,QAAQ,CACjB,CAAC;QAEJ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;QAEjE,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC;QAErF,MAAM,YAAY,GAChB,QAAQ,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QAC/D,IAAI,CAAC,SAAS,IAAI,YAAY,EAAE,CAAC;YAC/B,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,iBAAiB,GAAG,YAAY;YACpC,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,KAAK,CAC3C,QAAQ,CAAC,SAAS,EAClB;gBACE,GAAG,iBAAiB;gBACpB,SAAS,EAAE,eAAe;gBAC1B,OAAO;gBACP,QAAQ;gBACR,UAAU,EAAE,cAAc;aAC3B,EACD;gBACE,MAAM,EAAE,SAAS;aAClB,CACF;YACH,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,
|
|
1
|
+
{"version":3,"file":"tool-execution.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/tool-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAA2E;AAS3E,mGAA6F;AAC7F,2EAAsE;AACtE,yCAA8C;AAE9C,6BAAwB;AAGjB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAIrB;IACA;IACA;IACA;IACA;IAPF,M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,CAAC;YAED,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;gBACf,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;YAC5C,CAAC;YAED,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;gBACrB,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA/HY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAKqB,oCAAoB;QACN,0EAAkC;QAC7C,mDAAuB;QAChC,8BAAc;QACd,uBAAc;GAR7B,oBAAoB,CA+HhC"}
|
|
@@ -55,6 +55,7 @@ exports.WorkflowProcessorModule = WorkflowProcessorModule = __decorate([
|
|
|
55
55
|
handlers_1.SetTargetPlaceHandler,
|
|
56
56
|
handlers_1.ValidateHandler,
|
|
57
57
|
handlers_1.ResetErrorHandler,
|
|
58
|
+
handlers_1.ValidateDocumentHandler,
|
|
58
59
|
],
|
|
59
60
|
exports: [
|
|
60
61
|
services_1.RootProcessorService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-processor.module.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/workflow-processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oDAAuD;AACvD,gDAAmD;AACnD,uCAA+C;AAC/C,sCAAyC;AACzC,6CAIsB;AACtB,yCAaoB;AACpB,yCAWoB;AACpB,yCAAmD;
|
|
1
|
+
{"version":3,"file":"workflow-processor.module.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/workflow-processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oDAAuD;AACvD,gDAAmD;AACnD,uCAA+C;AAC/C,sCAAyC;AACzC,6CAIsB;AACtB,yCAaoB;AACpB,yCAWoB;AACpB,yCAAmD;AAgD5C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,0DAAuB;kCAAvB,uBAAuB;IA9CnC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,sBAAe;YACf,qBAAY;YACZ,mCAAmB;YACnB,+BAAiB;SAClB;QACD,SAAS,EAAE;YACT,+BAAoB;YACpB,+BAAoB;YACpB,mCAAwB;YACxB,+BAAoB;YACpB,oCAAyB;YACzB,mCAAwB;YACxB,6CAAkC;YAClC,iCAAsB;YACtB,kCAAuB;YACvB,gCAAmB;YACnB,0CAA6B;YAC7B,oCAAuB;YACvB,wCAA6B;YAC7B,uCAA4B;YAC5B,oCAAyB;YACzB,gCAAqB;YAGrB,gCAAqB;YACrB,sCAA2B;YAC3B,sBAAW;YACX,4BAAiB;YACjB,8BAAmB;YACnB,8BAAmB;YACnB,oCAAyB;YACzB,gCAAqB;YACrB,gCAAqB;YACrB,0BAAe;YACf,4BAAiB;YACjB,kCAAuB;SACxB;QACD,OAAO,EAAE;YACP,+BAAoB;YACpB,+BAAoB;YACpB,6CAAkC;YAClC,gCAAqB;SACtB;KACF,CAAC;GACW,uBAAuB,CAAG"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@loopstack/core",
|
|
3
3
|
"displayName": "Loopstack Core Module",
|
|
4
4
|
"description": "The core module of the loopstack automation framework",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.7.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jakob Klippel",
|
|
8
8
|
"url": "https://www.linkedin.com/in/jakob-klippel//"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typeorm": "^0.3.20"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@loopstack/shared": "^0.
|
|
23
|
+
"@loopstack/shared": "^0.7.0",
|
|
24
24
|
"@nestjs/bullmq": "^11.0.3",
|
|
25
25
|
"@nestjs/config": "^4.0.0",
|
|
26
26
|
"@nestjs/event-emitter": "^3.0.1",
|