@loopstack/core 0.0.5 → 0.1.1
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 +19 -0
- package/dist/config/core.yaml +1 -0
- package/dist/modules/common/services/context.service.d.ts +2 -2
- package/dist/modules/common/services/context.service.js +7 -7
- package/dist/modules/common/services/context.service.js.map +1 -1
- package/dist/modules/common/services/document-helper.service.d.ts +56 -32
- package/dist/modules/common/services/schema-validator.service.d.ts +2 -0
- package/dist/modules/common/services/schema-validator.service.js +14 -11
- package/dist/modules/common/services/schema-validator.service.js.map +1 -1
- package/dist/modules/common/services/value-parser.service.d.ts +2 -6
- package/dist/modules/common/services/value-parser.service.js +0 -3
- package/dist/modules/common/services/value-parser.service.js.map +1 -1
- package/dist/modules/configuration/commands/generate-schema.command.d.ts +8 -0
- package/dist/modules/configuration/commands/generate-schema.command.js +34 -0
- package/dist/modules/configuration/commands/generate-schema.command.js.map +1 -0
- package/dist/modules/configuration/commands/generate-schemas.command.js +1 -1
- package/dist/modules/configuration/commands/generate-schemas.command.js.map +1 -1
- package/dist/modules/configuration/configuration.module.js +4 -5
- package/dist/modules/configuration/configuration.module.js.map +1 -1
- package/dist/modules/configuration/services/configuration.service.d.ts +5 -7
- package/dist/modules/configuration/services/configuration.service.js +38 -44
- package/dist/modules/configuration/services/configuration.service.js.map +1 -1
- package/dist/modules/configuration/services/dynamic-schema-generator.service.d.ts +8 -8
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js +15 -18
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js.map +1 -1
- package/dist/modules/configuration/services/index.d.ts +1 -2
- package/dist/modules/configuration/services/index.js +1 -2
- package/dist/modules/configuration/services/index.js.map +1 -1
- package/dist/modules/configuration/services/service-registry.service.d.ts +20 -0
- package/dist/modules/configuration/services/{adapter-registry.service.js → service-registry.service.js} +31 -16
- package/dist/modules/configuration/services/service-registry.service.js.map +1 -0
- package/dist/modules/persistence/__tests__/database-entities-utils.d.ts +2 -2
- package/dist/modules/persistence/__tests__/database-entities-utils.js +5 -5
- package/dist/modules/persistence/__tests__/database-entities-utils.js.map +1 -1
- package/dist/modules/persistence/persistence.module.js +3 -3
- package/dist/modules/persistence/persistence.module.js.map +1 -1
- package/dist/modules/persistence/services/document.service.d.ts +3 -3
- package/dist/modules/persistence/services/document.service.js +6 -6
- package/dist/modules/persistence/services/document.service.js.map +1 -1
- package/dist/modules/persistence/services/index.d.ts +1 -1
- package/dist/modules/persistence/services/index.js +1 -1
- package/dist/modules/persistence/services/index.js.map +1 -1
- package/dist/modules/persistence/services/namespace.service.d.ts +2 -2
- package/dist/modules/persistence/services/namespace.service.js +9 -9
- package/dist/modules/persistence/services/namespace.service.js.map +1 -1
- package/dist/modules/persistence/services/pipeline.service.d.ts +8 -0
- package/dist/modules/persistence/services/{project.service.js → pipeline.service.js} +13 -13
- package/dist/modules/persistence/services/pipeline.service.js.map +1 -0
- package/dist/modules/persistence/services/workflow.service.d.ts +1 -0
- package/dist/modules/persistence/services/workflow.service.js +8 -1
- package/dist/modules/persistence/services/workflow.service.js.map +1 -1
- package/dist/modules/persistence/subscriber/workflow.subscriber.js +2 -2
- package/dist/modules/persistence/subscriber/workflow.subscriber.js.map +1 -1
- package/dist/modules/workflow-processor/services/index.d.ts +2 -1
- package/dist/modules/workflow-processor/services/index.js +2 -1
- package/dist/modules/workflow-processor/services/index.js.map +1 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.js +1 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/pipeline-processor.service.d.ts +15 -0
- package/dist/modules/workflow-processor/services/{project-processor.service.js → pipeline-processor.service.js} +24 -24
- package/dist/modules/workflow-processor/services/pipeline-processor.service.js.map +1 -0
- package/dist/modules/workflow-processor/services/state-machine-config.service.d.ts +8 -7
- package/dist/modules/workflow-processor/services/state-machine-config.service.js +0 -4
- package/dist/modules/workflow-processor/services/state-machine-config.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/state-machine-processor.service.d.ts +3 -1
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js +50 -40
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.d.ts +9 -0
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js +50 -0
- package/dist/modules/workflow-processor/services/template-expression-evaluator.service.js.map +1 -0
- package/dist/modules/workflow-processor/services/tool-execution.service.d.ts +19 -12
- package/dist/modules/workflow-processor/services/tool-execution.service.js +39 -44
- package/dist/modules/workflow-processor/services/tool-execution.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.d.ts +2 -2
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.js +3 -3
- package/dist/modules/workflow-processor/services/tool-schema-validator.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/workflow-processor.service.js +10 -4
- package/dist/modules/workflow-processor/services/workflow-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/tool-services/add-namespace.service.d.ts +20 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/add-namespace.service.js +16 -13
- package/dist/modules/workflow-processor/tool-services/add-namespace.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.d.ts +33 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/batch-create-documents.service.js +39 -42
- package/dist/modules/workflow-processor/tool-services/batch-create-documents.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/create-document.service.d.ts +223 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/create-document.service.js +35 -41
- package/dist/modules/workflow-processor/tool-services/create-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/index.d.ts +2 -2
- package/dist/modules/workflow-processor/{tools → tool-services}/index.js +2 -2
- package/dist/modules/workflow-processor/tool-services/index.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/load-document.service.d.ts +68 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/load-document.service.js +14 -12
- package/dist/modules/workflow-processor/tool-services/load-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/mock.service.d.ts +20 -0
- package/dist/modules/workflow-processor/tool-services/mock.service.js +51 -0
- package/dist/modules/workflow-processor/tool-services/mock.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/set-context.service.d.ts +18 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/set-context.service.js +20 -17
- package/dist/modules/workflow-processor/tool-services/set-context.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.d.ts +14 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.js +48 -0
- package/dist/modules/workflow-processor/tool-services/set-target-place.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/transition-selector.service.d.ts +29 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/transition-selector.service.js +22 -19
- package/dist/modules/workflow-processor/tool-services/transition-selector.service.js.map +1 -0
- package/dist/modules/workflow-processor/tool-services/update-document.service.d.ts +117 -0
- package/dist/modules/workflow-processor/{tools → tool-services}/update-document.service.js +22 -19
- package/dist/modules/workflow-processor/tool-services/update-document.service.js.map +1 -0
- package/dist/modules/workflow-processor/workflow-processor.module.js +13 -12
- package/dist/modules/workflow-processor/workflow-processor.module.js.map +1 -1
- package/package.json +2 -2
- package/dist/config/documents/assistant-message.yaml +0 -13
- package/dist/config/documents/info-message.yaml +0 -9
- package/dist/config/documents/internal-message.yaml +0 -14
- package/dist/config/documents/loading-message.yaml +0 -10
- package/dist/config/documents/user-message.yaml +0 -13
- package/dist/config/templates/user-input-template.yaml +0 -29
- package/dist/config/tools/creat-error-message.yaml +0 -9
- package/dist/config/tools/create-assistant-message.yaml +0 -9
- package/dist/config/tools/create-chat-message.tool.yaml +0 -7
- package/dist/config/tools/create-template-document-user-update.yaml +0 -7
- package/dist/config/tools/create-template-document.yaml +0 -5
- package/dist/config/tools/create-user-message.tool.yaml +0 -9
- package/dist/modules/configuration/services/adapter-registry.service.d.ts +0 -12
- package/dist/modules/configuration/services/adapter-registry.service.js.map +0 -1
- package/dist/modules/configuration/services/tool.registry.d.ts +0 -13
- package/dist/modules/configuration/services/tool.registry.js +0 -59
- package/dist/modules/configuration/services/tool.registry.js.map +0 -1
- package/dist/modules/persistence/services/project.service.d.ts +0 -8
- package/dist/modules/persistence/services/project.service.js.map +0 -1
- package/dist/modules/workflow-processor/services/project-processor.service.d.ts +0 -15
- package/dist/modules/workflow-processor/services/project-processor.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/add-namespace.service.d.ts +0 -29
- package/dist/modules/workflow-processor/tools/add-namespace.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/batch-create-documents.service.d.ts +0 -42
- package/dist/modules/workflow-processor/tools/batch-create-documents.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/create-document.service.d.ts +0 -378
- package/dist/modules/workflow-processor/tools/create-document.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/debug.service.d.ts +0 -20
- package/dist/modules/workflow-processor/tools/debug.service.js +0 -37
- package/dist/modules/workflow-processor/tools/debug.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/index.js.map +0 -1
- package/dist/modules/workflow-processor/tools/load-document.service.d.ts +0 -242
- package/dist/modules/workflow-processor/tools/load-document.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/set-context.service.d.ts +0 -27
- package/dist/modules/workflow-processor/tools/set-context.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/tool-call.service.d.ts +0 -29
- package/dist/modules/workflow-processor/tools/tool-call.service.js +0 -55
- package/dist/modules/workflow-processor/tools/tool-call.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/transition-selector.service.d.ts +0 -50
- package/dist/modules/workflow-processor/tools/transition-selector.service.js.map +0 -1
- package/dist/modules/workflow-processor/tools/update-document.service.d.ts +0 -198
- package/dist/modules/workflow-processor/tools/update-document.service.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @loopstack/core
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Various example workflow configurations added. Bugfixes.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @loopstack/shared@0.1.1
|
|
10
|
+
|
|
11
|
+
## 0.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- Rework various config schemas and their underlying functionality
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @loopstack/shared@0.1.0
|
|
21
|
+
|
|
3
22
|
## 0.0.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
workspaces: []
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContextInterface, ProcessRunInterface,
|
|
1
|
+
import { ContextInterface, ProcessRunInterface, PipelineEntity } from '@loopstack/shared';
|
|
2
2
|
export declare class ContextService {
|
|
3
|
-
createRootContext(
|
|
3
|
+
createRootContext(pipeline: PipelineEntity, additional: Partial<ContextInterface>): ContextInterface;
|
|
4
4
|
create(payload: ProcessRunInterface | ContextInterface): ContextInterface;
|
|
5
5
|
}
|
|
@@ -13,14 +13,14 @@ exports.ContextService = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const lodash_1 = __importDefault(require("lodash"));
|
|
15
15
|
let ContextService = class ContextService {
|
|
16
|
-
createRootContext(
|
|
16
|
+
createRootContext(pipeline, additional) {
|
|
17
17
|
return {
|
|
18
|
-
model:
|
|
19
|
-
userId:
|
|
20
|
-
|
|
21
|
-
workspaceId:
|
|
22
|
-
labels:
|
|
23
|
-
index:
|
|
18
|
+
model: pipeline.model,
|
|
19
|
+
userId: pipeline.createdBy,
|
|
20
|
+
pipelineId: pipeline.id,
|
|
21
|
+
workspaceId: pipeline.workspaceId,
|
|
22
|
+
labels: pipeline.labels,
|
|
23
|
+
index: pipeline.index,
|
|
24
24
|
...additional,
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/context.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAAuB;AAQhB,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,iBAAiB,CACf,
|
|
1
|
+
{"version":3,"file":"context.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/context.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAAuB;AAQhB,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,iBAAiB,CACf,QAAwB,EACxB,UAAqC;QAErC,OAAO;YACL,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,MAAM,EAAE,QAAQ,CAAC,SAAS;YAC1B,UAAU,EAAE,QAAQ,CAAC,EAAE;YACvB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,GAAG,UAAU;SACM,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,OAA+C;QACpD,OAAO,gBAAC,CAAC,SAAS,CAAC,OAAO,CAAqB,CAAC;IAClD,CAAC;CACF,CAAA;AAnBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CAmB1B"}
|
|
@@ -4,6 +4,7 @@ import { ValueParserService } from './value-parser.service';
|
|
|
4
4
|
export declare const CreateDocumentWithSchema: z.ZodObject<{
|
|
5
5
|
update: z.ZodOptional<z.ZodObject<{
|
|
6
6
|
name: z.ZodOptional<z.ZodString>;
|
|
7
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
7
8
|
content: z.ZodOptional<z.ZodAny>;
|
|
8
9
|
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
9
10
|
ui: z.ZodOptional<z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>>;
|
|
@@ -11,56 +12,64 @@ export declare const CreateDocumentWithSchema: z.ZodObject<{
|
|
|
11
12
|
meta: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
12
13
|
mimeType: z.ZodOptional<z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>>;
|
|
13
14
|
invalidate: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>>;
|
|
14
16
|
enableTransitions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
17
|
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
18
|
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
19
|
data: z.ZodOptional<z.ZodAny>;
|
|
18
20
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
invalidate?: boolean | undefined;
|
|
20
|
-
data?: any;
|
|
21
21
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
22
|
+
invalidate?: boolean | undefined;
|
|
23
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
22
24
|
enableTransitions?: string[] | undefined;
|
|
23
25
|
enableAtPlaces?: string[] | undefined;
|
|
24
26
|
hideAtPlaces?: string[] | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
invalidate?: boolean | undefined;
|
|
27
27
|
data?: any;
|
|
28
|
+
}, {
|
|
28
29
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
30
|
+
invalidate?: boolean | undefined;
|
|
31
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
29
32
|
enableTransitions?: string[] | undefined;
|
|
30
33
|
enableAtPlaces?: string[] | undefined;
|
|
31
34
|
hideAtPlaces?: string[] | undefined;
|
|
35
|
+
data?: any;
|
|
32
36
|
}>>>;
|
|
33
37
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
schema?: any;
|
|
35
38
|
name?: string | undefined;
|
|
39
|
+
description?: string | undefined;
|
|
36
40
|
content?: any;
|
|
41
|
+
schema?: any;
|
|
37
42
|
ui?: any;
|
|
38
43
|
tags?: string[] | undefined;
|
|
39
44
|
meta?: {
|
|
40
|
-
invalidate?: boolean | undefined;
|
|
41
|
-
data?: any;
|
|
42
45
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
46
|
+
invalidate?: boolean | undefined;
|
|
47
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
43
48
|
enableTransitions?: string[] | undefined;
|
|
44
49
|
enableAtPlaces?: string[] | undefined;
|
|
45
50
|
hideAtPlaces?: string[] | undefined;
|
|
51
|
+
data?: any;
|
|
46
52
|
} | undefined;
|
|
47
53
|
}, {
|
|
48
|
-
schema?: any;
|
|
49
54
|
name?: string | undefined;
|
|
55
|
+
description?: string | undefined;
|
|
50
56
|
content?: any;
|
|
57
|
+
schema?: any;
|
|
51
58
|
ui?: any;
|
|
52
59
|
tags?: string[] | undefined;
|
|
53
60
|
meta?: {
|
|
54
|
-
invalidate?: boolean | undefined;
|
|
55
|
-
data?: any;
|
|
56
61
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
62
|
+
invalidate?: boolean | undefined;
|
|
63
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
57
64
|
enableTransitions?: string[] | undefined;
|
|
58
65
|
enableAtPlaces?: string[] | undefined;
|
|
59
66
|
hideAtPlaces?: string[] | undefined;
|
|
67
|
+
data?: any;
|
|
60
68
|
} | undefined;
|
|
61
69
|
}>>;
|
|
62
70
|
create: z.ZodOptional<z.ZodObject<{
|
|
63
71
|
name: z.ZodString;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
64
73
|
content: z.ZodAny;
|
|
65
74
|
schema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
66
75
|
ui: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
@@ -68,114 +77,129 @@ export declare const CreateDocumentWithSchema: z.ZodObject<{
|
|
|
68
77
|
meta: z.ZodOptional<z.ZodObject<{
|
|
69
78
|
mimeType: z.ZodOptional<z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>>;
|
|
70
79
|
invalidate: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>>;
|
|
71
81
|
enableTransitions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
72
82
|
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
83
|
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
84
|
data: z.ZodOptional<z.ZodAny>;
|
|
75
85
|
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
invalidate?: boolean | undefined;
|
|
77
|
-
data?: any;
|
|
78
86
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
87
|
+
invalidate?: boolean | undefined;
|
|
88
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
79
89
|
enableTransitions?: string[] | undefined;
|
|
80
90
|
enableAtPlaces?: string[] | undefined;
|
|
81
91
|
hideAtPlaces?: string[] | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
invalidate?: boolean | undefined;
|
|
84
92
|
data?: any;
|
|
93
|
+
}, {
|
|
85
94
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
95
|
+
invalidate?: boolean | undefined;
|
|
96
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
86
97
|
enableTransitions?: string[] | undefined;
|
|
87
98
|
enableAtPlaces?: string[] | undefined;
|
|
88
99
|
hideAtPlaces?: string[] | undefined;
|
|
100
|
+
data?: any;
|
|
89
101
|
}>>;
|
|
90
102
|
}, "strip", z.ZodTypeAny, {
|
|
91
103
|
name: string;
|
|
92
|
-
|
|
104
|
+
description?: string | undefined;
|
|
93
105
|
content?: any;
|
|
106
|
+
schema?: any;
|
|
94
107
|
ui?: any;
|
|
95
108
|
tags?: string[] | undefined;
|
|
96
109
|
meta?: {
|
|
97
|
-
invalidate?: boolean | undefined;
|
|
98
|
-
data?: any;
|
|
99
110
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
111
|
+
invalidate?: boolean | undefined;
|
|
112
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
100
113
|
enableTransitions?: string[] | undefined;
|
|
101
114
|
enableAtPlaces?: string[] | undefined;
|
|
102
115
|
hideAtPlaces?: string[] | undefined;
|
|
116
|
+
data?: any;
|
|
103
117
|
} | undefined;
|
|
104
118
|
}, {
|
|
105
119
|
name: string;
|
|
106
|
-
|
|
120
|
+
description?: string | undefined;
|
|
107
121
|
content?: any;
|
|
122
|
+
schema?: any;
|
|
108
123
|
ui?: any;
|
|
109
124
|
tags?: string[] | undefined;
|
|
110
125
|
meta?: {
|
|
111
|
-
invalidate?: boolean | undefined;
|
|
112
|
-
data?: any;
|
|
113
126
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
127
|
+
invalidate?: boolean | undefined;
|
|
128
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
114
129
|
enableTransitions?: string[] | undefined;
|
|
115
130
|
enableAtPlaces?: string[] | undefined;
|
|
116
131
|
hideAtPlaces?: string[] | undefined;
|
|
132
|
+
data?: any;
|
|
117
133
|
} | undefined;
|
|
118
134
|
}>>;
|
|
119
135
|
}, "strip", z.ZodTypeAny, {
|
|
120
136
|
create?: {
|
|
121
137
|
name: string;
|
|
122
|
-
|
|
138
|
+
description?: string | undefined;
|
|
123
139
|
content?: any;
|
|
140
|
+
schema?: any;
|
|
124
141
|
ui?: any;
|
|
125
142
|
tags?: string[] | undefined;
|
|
126
143
|
meta?: {
|
|
127
|
-
invalidate?: boolean | undefined;
|
|
128
|
-
data?: any;
|
|
129
144
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
145
|
+
invalidate?: boolean | undefined;
|
|
146
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
130
147
|
enableTransitions?: string[] | undefined;
|
|
131
148
|
enableAtPlaces?: string[] | undefined;
|
|
132
149
|
hideAtPlaces?: string[] | undefined;
|
|
150
|
+
data?: any;
|
|
133
151
|
} | undefined;
|
|
134
152
|
} | undefined;
|
|
135
153
|
update?: {
|
|
136
|
-
schema?: any;
|
|
137
154
|
name?: string | undefined;
|
|
155
|
+
description?: string | undefined;
|
|
138
156
|
content?: any;
|
|
157
|
+
schema?: any;
|
|
139
158
|
ui?: any;
|
|
140
159
|
tags?: string[] | undefined;
|
|
141
160
|
meta?: {
|
|
142
|
-
invalidate?: boolean | undefined;
|
|
143
|
-
data?: any;
|
|
144
161
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
162
|
+
invalidate?: boolean | undefined;
|
|
163
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
145
164
|
enableTransitions?: string[] | undefined;
|
|
146
165
|
enableAtPlaces?: string[] | undefined;
|
|
147
166
|
hideAtPlaces?: string[] | undefined;
|
|
167
|
+
data?: any;
|
|
148
168
|
} | undefined;
|
|
149
169
|
} | undefined;
|
|
150
170
|
}, {
|
|
151
171
|
create?: {
|
|
152
172
|
name: string;
|
|
153
|
-
|
|
173
|
+
description?: string | undefined;
|
|
154
174
|
content?: any;
|
|
175
|
+
schema?: any;
|
|
155
176
|
ui?: any;
|
|
156
177
|
tags?: string[] | undefined;
|
|
157
178
|
meta?: {
|
|
158
|
-
invalidate?: boolean | undefined;
|
|
159
|
-
data?: any;
|
|
160
179
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
180
|
+
invalidate?: boolean | undefined;
|
|
181
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
161
182
|
enableTransitions?: string[] | undefined;
|
|
162
183
|
enableAtPlaces?: string[] | undefined;
|
|
163
184
|
hideAtPlaces?: string[] | undefined;
|
|
185
|
+
data?: any;
|
|
164
186
|
} | undefined;
|
|
165
187
|
} | undefined;
|
|
166
188
|
update?: {
|
|
167
|
-
schema?: any;
|
|
168
189
|
name?: string | undefined;
|
|
190
|
+
description?: string | undefined;
|
|
169
191
|
content?: any;
|
|
192
|
+
schema?: any;
|
|
170
193
|
ui?: any;
|
|
171
194
|
tags?: string[] | undefined;
|
|
172
195
|
meta?: {
|
|
173
|
-
invalidate?: boolean | undefined;
|
|
174
|
-
data?: any;
|
|
175
196
|
mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
|
|
197
|
+
invalidate?: boolean | undefined;
|
|
198
|
+
level?: "debug" | "info" | "warning" | "error" | undefined;
|
|
176
199
|
enableTransitions?: string[] | undefined;
|
|
177
200
|
enableAtPlaces?: string[] | undefined;
|
|
178
201
|
hideAtPlaces?: string[] | undefined;
|
|
202
|
+
data?: any;
|
|
179
203
|
} | undefined;
|
|
180
204
|
} | undefined;
|
|
181
205
|
}>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
1
2
|
import { DocumentEntity } from '@loopstack/shared';
|
|
2
3
|
export declare class SchemaValidatorService {
|
|
3
4
|
private readonly logger;
|
|
5
|
+
validate(data: any, schema: JSONSchemaType<any>): void;
|
|
4
6
|
validateDocument(data: Partial<DocumentEntity>): void;
|
|
5
7
|
}
|
|
@@ -15,19 +15,22 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const ajv_1 = __importDefault(require("ajv"));
|
|
16
16
|
let SchemaValidatorService = SchemaValidatorService_1 = class SchemaValidatorService {
|
|
17
17
|
logger = new common_1.Logger(SchemaValidatorService_1.name);
|
|
18
|
+
validate(data, schema) {
|
|
19
|
+
const ajv = new ajv_1.default({
|
|
20
|
+
strict: false,
|
|
21
|
+
keywords: ['ui'],
|
|
22
|
+
});
|
|
23
|
+
const validate = ajv.compile(schema);
|
|
24
|
+
const valid = validate(data);
|
|
25
|
+
if (!valid) {
|
|
26
|
+
this.logger.error(data);
|
|
27
|
+
this.logger.error(validate.errors);
|
|
28
|
+
throw new Error(`Validating data failed.`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
18
31
|
validateDocument(data) {
|
|
19
32
|
if (data.schema) {
|
|
20
|
-
|
|
21
|
-
strict: false,
|
|
22
|
-
keywords: ['ui'],
|
|
23
|
-
});
|
|
24
|
-
const validate = ajv.compile(data.schema);
|
|
25
|
-
const valid = validate(data.content);
|
|
26
|
-
if (!valid) {
|
|
27
|
-
this.logger.error(data.content);
|
|
28
|
-
this.logger.error(validate.errors);
|
|
29
|
-
throw new Error(`Error validating document content.`);
|
|
30
|
-
}
|
|
33
|
+
this.validate(data.content, data.schema);
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-validator.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/schema-validator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"schema-validator.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/schema-validator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAA0C;AAInC,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAChB,MAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAElE,QAAQ,CAAC,IAAS,EAAE,MAA2B;QAC7C,MAAM,GAAG,GAAG,IAAI,aAAG,CAAC;YAClB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,gBAAgB,CAAC,IAA6B;QAC5C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF,CAAA;AAtBY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;GACA,sBAAsB,CAsBlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpressionEvaluatorService } from './expression-evaluator.service';
|
|
2
|
-
import { ContextInterface
|
|
2
|
+
import { ContextInterface } from '@loopstack/shared';
|
|
3
3
|
import { TemplateEngineService } from './template-engine.service';
|
|
4
4
|
export declare class ValueParserService {
|
|
5
5
|
private expressionEvaluatorService;
|
|
@@ -10,14 +10,10 @@ export declare class ValueParserService {
|
|
|
10
10
|
evalWithContext<T>(obj: any, variables: {
|
|
11
11
|
context: ContextInterface;
|
|
12
12
|
}): T;
|
|
13
|
-
evalWithContextAndInfo<T extends {}>(obj: any, variables: {
|
|
14
|
-
context: ContextInterface;
|
|
15
|
-
workflow: WorkflowRunContext;
|
|
16
|
-
}): T;
|
|
17
13
|
evalWithContextAndItem<T extends {}>(obj: any, variables: {
|
|
18
14
|
context: ContextInterface;
|
|
19
15
|
item: string;
|
|
20
16
|
index: number;
|
|
21
17
|
}): T;
|
|
22
|
-
evalWithContextVariables<T
|
|
18
|
+
evalWithContextVariables<T>(obj: any, variables: any): T;
|
|
23
19
|
}
|
|
@@ -52,9 +52,6 @@ let ValueParserService = class ValueParserService {
|
|
|
52
52
|
evalWithContext(obj, variables) {
|
|
53
53
|
return obj ? this.evalObjectLeafs(obj, variables) : {};
|
|
54
54
|
}
|
|
55
|
-
evalWithContextAndInfo(obj, variables) {
|
|
56
|
-
return obj ? this.evalObjectLeafs(obj, variables) : {};
|
|
57
|
-
}
|
|
58
55
|
evalWithContextAndItem(obj, variables) {
|
|
59
56
|
return obj ? this.evalObjectLeafs(obj, variables) : {};
|
|
60
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-parser.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/value-parser.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iFAA4E;
|
|
1
|
+
{"version":3,"file":"value-parser.service.js","sourceRoot":"","sources":["../../../../src/modules/common/services/value-parser.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,iFAA4E;AAI5E,mCAAwC;AACxC,uEAAkE;AAG3D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAEnB;IACA;IAFV,YACU,0BAAsD,EACtD,qBAA4C;QAD5C,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,0BAAqB,GAArB,qBAAqB,CAAuB;IACnD,CAAC;IAEJ,eAAe,CAAI,GAAM,EAAE,SAAc;QACvC,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,GAAG,CAAC;QACb,CAAC;QAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,0BAA0B,CAAC,YAAY,CAAC,GAAG,CAAC;gBACtD,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gBAC1D,CAAC,CAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAkB,CAAC;QAC5E,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACtB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,CACtB,CAAC;QACpB,CAAC;QAED,MAAM,MAAM,GAAG,EAAO,CAAC;QACvB,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;gBACnD,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,qBAAqB,CACnB,cAAmC,EACnC,UAA+B;QAE/B,OAAO,cAAc;YACnB,CAAC,CAAC,IAAA,kBAAS,EACP,cAAc,EACd,CAAC,MAA2B,EAAE,IAAc,EAAE,GAAW,EAAE,EAAE;gBAC3D,MAAM,QAAQ,GAAG,IAAA,YAAG,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACvC,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC;YAClC,CAAC,EACD,EAAE,CACH;YACH,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAED,eAAe,CAAI,GAAQ,EAAE,SAAwC;QACnE,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAI,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAE,EAAU,CAAC;IACrE,CAAC;IACD,sBAAsB,CACpB,GAAQ,EACR,SAAqE;QAErE,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAI,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAE,EAAU,CAAC;IACrE,CAAC;IAED,wBAAwB,CAAI,GAAQ,EAAE,SAAc;QAClD,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAI,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAE,EAAU,CAAC;IACrE,CAAC;CACF,CAAA;AA9DY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAG2B,yDAA0B;QAC/B,+CAAqB;GAH3C,kBAAkB,CA8D9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommandRunner } from 'nest-commander';
|
|
2
|
+
import { JsonSchemaGeneratorService } from '../services/json-schema-generator.service';
|
|
3
|
+
export declare class GenerateSchemaCommand extends CommandRunner {
|
|
4
|
+
private readonly jsonSchemaGeneratorService;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(jsonSchemaGeneratorService: JsonSchemaGeneratorService);
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var GenerateSchemaCommand_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.GenerateSchemaCommand = void 0;
|
|
14
|
+
const nest_commander_1 = require("nest-commander");
|
|
15
|
+
const json_schema_generator_service_1 = require("../services/json-schema-generator.service");
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
let GenerateSchemaCommand = GenerateSchemaCommand_1 = class GenerateSchemaCommand extends nest_commander_1.CommandRunner {
|
|
18
|
+
jsonSchemaGeneratorService;
|
|
19
|
+
logger = new common_1.Logger(GenerateSchemaCommand_1.name);
|
|
20
|
+
constructor(jsonSchemaGeneratorService) {
|
|
21
|
+
super();
|
|
22
|
+
this.jsonSchemaGeneratorService = jsonSchemaGeneratorService;
|
|
23
|
+
}
|
|
24
|
+
async run() {
|
|
25
|
+
this.logger.log('Generating json schema...');
|
|
26
|
+
await this.jsonSchemaGeneratorService.generateSchemas();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.GenerateSchemaCommand = GenerateSchemaCommand;
|
|
30
|
+
exports.GenerateSchemaCommand = GenerateSchemaCommand = GenerateSchemaCommand_1 = __decorate([
|
|
31
|
+
(0, nest_commander_1.Command)({ name: 'generate-schema', description: 'Generate json schema' }),
|
|
32
|
+
__metadata("design:paramtypes", [json_schema_generator_service_1.JsonSchemaGeneratorService])
|
|
33
|
+
], GenerateSchemaCommand);
|
|
34
|
+
//# sourceMappingURL=generate-schema.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-schema.command.js","sourceRoot":"","sources":["../../../../src/modules/configuration/commands/generate-schema.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAwD;AACxD,6FAAuF;AACvF,2CAAwC;AAGjC,IAAM,qBAAqB,6BAA3B,MAAM,qBAAsB,SAAQ,8BAAa;IAGnC;IAFF,MAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;IACjE,YACmB,0BAAsD;QAEvE,KAAK,EAAE,CAAC;QAFS,+BAA0B,GAA1B,0BAA0B,CAA4B;IAGzE,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,CAAC;IAC1D,CAAC;CACF,CAAA;AAZY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;qCAIzB,0DAA0B;GAH9D,qBAAqB,CAYjC"}
|
|
@@ -28,7 +28,7 @@ let GenerateSchemasCommand = GenerateSchemasCommand_1 = class GenerateSchemasCom
|
|
|
28
28
|
};
|
|
29
29
|
exports.GenerateSchemasCommand = GenerateSchemasCommand;
|
|
30
30
|
exports.GenerateSchemasCommand = GenerateSchemasCommand = GenerateSchemasCommand_1 = __decorate([
|
|
31
|
-
(0, nest_commander_1.Command)({ name: 'generate-
|
|
31
|
+
(0, nest_commander_1.Command)({ name: 'generate-schema', description: 'Generate json schema' }),
|
|
32
32
|
__metadata("design:paramtypes", [json_schema_generator_service_1.JsonSchemaGeneratorService])
|
|
33
33
|
], GenerateSchemasCommand);
|
|
34
34
|
//# sourceMappingURL=generate-schemas.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-schemas.command.js","sourceRoot":"","sources":["../../../../src/modules/configuration/commands/generate-schemas.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAwD;AACxD,6FAAuF;AACvF,2CAAwC;AAGjC,IAAM,sBAAsB,8BAA5B,MAAM,sBAAuB,SAAQ,8BAAa;IAGpC;IAFF,MAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAClE,YACmB,0BAAsD;QAEvE,KAAK,EAAE,CAAC;QAFS,+BAA0B,GAA1B,0BAA0B,CAA4B;IAGzE,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,CAAC;IAC1D,CAAC;CACF,CAAA;AAZY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"generate-schemas.command.js","sourceRoot":"","sources":["../../../../src/modules/configuration/commands/generate-schemas.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAwD;AACxD,6FAAuF;AACvF,2CAAwC;AAGjC,IAAM,sBAAsB,8BAA5B,MAAM,sBAAuB,SAAQ,8BAAa;IAGpC;IAFF,MAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAClE,YACmB,0BAAsD;QAEvE,KAAK,EAAE,CAAC;QAFS,+BAA0B,GAA1B,0BAA0B,CAA4B;IAGzE,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,CAAC;IAC1D,CAAC;CACF,CAAA;AAZY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;qCAIzB,0DAA0B;GAH9D,sBAAsB,CAYlC"}
|
|
@@ -11,7 +11,7 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const services_1 = require("./services");
|
|
12
12
|
const json_schema_generator_service_1 = require("./services/json-schema-generator.service");
|
|
13
13
|
const services_2 = require("./services");
|
|
14
|
-
const
|
|
14
|
+
const generate_schema_command_1 = require("./commands/generate-schema.command");
|
|
15
15
|
const dynamic_schema_generator_service_1 = require("./services/dynamic-schema-generator.service");
|
|
16
16
|
const core_1 = require("@nestjs/core");
|
|
17
17
|
let ConfigurationModule = class ConfigurationModule {
|
|
@@ -21,15 +21,14 @@ exports.ConfigurationModule = ConfigurationModule = __decorate([
|
|
|
21
21
|
(0, common_1.Module)({
|
|
22
22
|
imports: [core_1.DiscoveryModule],
|
|
23
23
|
providers: [
|
|
24
|
-
services_2.
|
|
25
|
-
services_1.AdapterRegistry,
|
|
24
|
+
services_2.ServiceRegistry,
|
|
26
25
|
services_1.ConfigProviderRegistry,
|
|
27
26
|
services_1.ConfigurationService,
|
|
28
27
|
json_schema_generator_service_1.JsonSchemaGeneratorService,
|
|
29
|
-
|
|
28
|
+
generate_schema_command_1.GenerateSchemaCommand,
|
|
30
29
|
dynamic_schema_generator_service_1.DynamicSchemaGeneratorService,
|
|
31
30
|
],
|
|
32
|
-
exports: [services_1.ConfigurationService, services_2.
|
|
31
|
+
exports: [services_1.ConfigurationService, services_2.ServiceRegistry],
|
|
33
32
|
})
|
|
34
33
|
], ConfigurationModule);
|
|
35
34
|
//# sourceMappingURL=configuration.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.module.js","sourceRoot":"","sources":["../../../src/modules/configuration/configuration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"configuration.module.js","sourceRoot":"","sources":["../../../src/modules/configuration/configuration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yCAGoB;AACpB,4FAAsF;AACtF,yCAA6C;AAC7C,gFAA2E;AAC3E,kGAA4F;AAC5F,uCAA+C;AAcxC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAZ/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,sBAAe,CAAC;QAC1B,SAAS,EAAE;YACT,0BAAe;YACf,iCAAsB;YACtB,+BAAoB;YACpB,0DAA0B;YAC1B,+CAAqB;YACrB,gEAA6B;SAC9B;QACD,OAAO,EAAE,CAAC,+BAAoB,EAAE,0BAAe,CAAC;KACjD,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { OnModuleInit } from '@nestjs/common';
|
|
2
2
|
import { DynamicSchemaGeneratorService } from './dynamic-schema-generator.service';
|
|
3
|
-
import {
|
|
4
|
-
import { ToolRegistry } from './tool.registry';
|
|
3
|
+
import { ServiceRegistry } from './service-registry.service';
|
|
5
4
|
import { ConfigService } from '@nestjs/config';
|
|
6
5
|
import { ConfigSourceInterface, NamedCollectionItem } from '@loopstack/shared';
|
|
7
6
|
import { ConfigProviderRegistry } from './config-provider.registry';
|
|
8
7
|
export declare class ConfigurationService implements OnModuleInit {
|
|
9
8
|
private configService;
|
|
10
|
-
private
|
|
11
|
-
private toolRegistry;
|
|
9
|
+
private serviceRegistry;
|
|
12
10
|
private configProviderRegistry;
|
|
13
11
|
private mainSchemaGenerator;
|
|
14
12
|
private logger;
|
|
15
13
|
registry: Map<string, Map<string, any>>;
|
|
16
|
-
constructor(configService: ConfigService,
|
|
14
|
+
constructor(configService: ConfigService, serviceRegistry: ServiceRegistry, configProviderRegistry: ConfigProviderRegistry, mainSchemaGenerator: DynamicSchemaGeneratorService);
|
|
17
15
|
onModuleInit(): void;
|
|
18
16
|
createDefaultConfig(): Map<string, Map<any, any>>;
|
|
19
17
|
clear(): void;
|
|
@@ -22,8 +20,8 @@ export declare class ConfigurationService implements OnModuleInit {
|
|
|
22
20
|
getAll<T>(registry: string): T[];
|
|
23
21
|
get<T>(registry: string, searchKey: string): T | undefined;
|
|
24
22
|
createFromConfig(source: ConfigSourceInterface): any;
|
|
25
|
-
private
|
|
26
|
-
private
|
|
23
|
+
private createPipelineEntrypointValidation;
|
|
24
|
+
private createPipelineWorkspaceValidation;
|
|
27
25
|
private createWorkflowToolCallValidation;
|
|
28
26
|
private createWorkflowTemplateToolCallValidation;
|
|
29
27
|
validate(source: ConfigSourceInterface): any;
|