@loopstack/core 0.0.5 → 0.1.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 +11 -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 +58 -48
- 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/configuration.module.js +2 -3
- 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/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 +7 -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 +40 -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 +18 -12
- package/dist/modules/workflow-processor/services/tool-execution.service.js +29 -37
- 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 +9 -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 +37 -40
- 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 +209 -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 +17 -0
- package/dist/modules/workflow-processor/{tools/debug.service.js → tool-services/mock.service.js} +29 -22
- 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 +110 -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 +5 -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.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
|
@@ -11,31 +11,31 @@ exports.SetContextService = void 0;
|
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
const shared_1 = require("@loopstack/shared");
|
|
14
|
+
const config = zod_1.z
|
|
15
|
+
.object({
|
|
16
|
+
key: zod_1.z.string(),
|
|
17
|
+
value: zod_1.z.any(),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
const schema = zod_1.z
|
|
21
|
+
.object({
|
|
22
|
+
key: zod_1.z.string(),
|
|
23
|
+
value: zod_1.z.any(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
14
26
|
let SetContextService = SetContextService_1 = class SetContextService {
|
|
15
27
|
logger = new common_1.Logger(SetContextService_1.name);
|
|
16
|
-
configSchema = zod_1.z
|
|
17
|
-
.object({
|
|
18
|
-
key: zod_1.z.string(),
|
|
19
|
-
value: zod_1.z.any(),
|
|
20
|
-
})
|
|
21
|
-
.strict();
|
|
22
|
-
schema = zod_1.z
|
|
23
|
-
.object({
|
|
24
|
-
key: zod_1.z.string(),
|
|
25
|
-
value: zod_1.z.any(),
|
|
26
|
-
})
|
|
27
|
-
.strict();
|
|
28
28
|
async apply(props, workflow) {
|
|
29
|
-
const validOptions = this.schema.parse(props);
|
|
30
29
|
if (!workflow) {
|
|
31
|
-
|
|
30
|
+
throw new Error('Workflow is undefined');
|
|
32
31
|
}
|
|
33
32
|
if (!workflow.contextUpdate) {
|
|
34
33
|
workflow.contextUpdate = {};
|
|
35
34
|
}
|
|
36
|
-
workflow.contextUpdate[
|
|
37
|
-
this.logger.debug(`Set context update key "${
|
|
35
|
+
workflow.contextUpdate[props.key] = props.value;
|
|
36
|
+
this.logger.debug(`Set context update key "${props.key}".`);
|
|
38
37
|
return {
|
|
38
|
+
success: true,
|
|
39
39
|
workflow,
|
|
40
40
|
};
|
|
41
41
|
}
|
|
@@ -43,6 +43,9 @@ let SetContextService = SetContextService_1 = class SetContextService {
|
|
|
43
43
|
exports.SetContextService = SetContextService;
|
|
44
44
|
exports.SetContextService = SetContextService = SetContextService_1 = __decorate([
|
|
45
45
|
(0, common_1.Injectable)(),
|
|
46
|
-
(0, shared_1.
|
|
46
|
+
(0, shared_1.Service)({
|
|
47
|
+
config,
|
|
48
|
+
schema,
|
|
49
|
+
})
|
|
47
50
|
], SetContextService);
|
|
48
51
|
//# sourceMappingURL=set-context.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-context.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/set-context.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAAiF;AAGjF,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,GAAG,EAAE;CACf,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,GAAG,EAAE;CACf,CAAC;KACD,MAAM,EAAE,CAAC;AAOL,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IACX,MAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAE7D,KAAK,CAAC,KAAK,CACT,KAA6B,EAC7B,QAAoC;QAEpC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;YAC5B,QAAQ,CAAC,aAAa,GAAG,EAAE,CAAC;QAC9B,CAAC;QAED,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5D,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ;SACT,CAAC;IACJ,CAAC;CACF,CAAA;AAxBY,8CAAiB;4BAAjB,iBAAiB;IAL7B,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;GACW,iBAAiB,CAwB7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ContextInterface, ServiceInterface, ServiceCallResult, TransitionMetadataInterface, WorkflowEntity } from '@loopstack/shared';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
target: z.ZodString;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
target: string;
|
|
7
|
+
}, {
|
|
8
|
+
target: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare class SetTargetPlaceService implements ServiceInterface {
|
|
11
|
+
private readonly logger;
|
|
12
|
+
apply(props: z.infer<typeof schema>, workflow: WorkflowEntity, context: ContextInterface, meta: TransitionMetadataInterface): Promise<ServiceCallResult>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
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 SetTargetPlaceService_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SetTargetPlaceService = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const zod_1 = require("zod");
|
|
13
|
+
const shared_1 = require("@loopstack/shared");
|
|
14
|
+
const config = zod_1.z
|
|
15
|
+
.object({
|
|
16
|
+
target: shared_1.ExpressionString,
|
|
17
|
+
})
|
|
18
|
+
.strict();
|
|
19
|
+
const schema = zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
target: shared_1.NonExpressionString,
|
|
22
|
+
})
|
|
23
|
+
.strict();
|
|
24
|
+
let SetTargetPlaceService = SetTargetPlaceService_1 = class SetTargetPlaceService {
|
|
25
|
+
logger = new common_1.Logger(SetTargetPlaceService_1.name);
|
|
26
|
+
async apply(props, workflow, context, meta) {
|
|
27
|
+
if (!meta.transition) {
|
|
28
|
+
throw new Error('No transition available.');
|
|
29
|
+
}
|
|
30
|
+
if ((Array.isArray(meta.to) && !meta.to.includes(props.target))
|
|
31
|
+
|| (!Array.isArray(meta.to) && meta.to !== props.target)) {
|
|
32
|
+
throw new Error(`Transition to ${props.target} not allowed.`);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
success: true,
|
|
36
|
+
place: props.target,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.SetTargetPlaceService = SetTargetPlaceService;
|
|
41
|
+
exports.SetTargetPlaceService = SetTargetPlaceService = SetTargetPlaceService_1 = __decorate([
|
|
42
|
+
(0, common_1.Injectable)(),
|
|
43
|
+
(0, shared_1.Service)({
|
|
44
|
+
config,
|
|
45
|
+
schema,
|
|
46
|
+
})
|
|
47
|
+
], SetTargetPlaceService);
|
|
48
|
+
//# sourceMappingURL=set-target-place.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-target-place.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/set-target-place.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAO2B;AAE3B,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,MAAM,EAAE,yBAAgB;CACzB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,MAAM,EAAE,4BAAmB;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAOL,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IACf,MAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;IAEjE,KAAK,CAAC,KAAK,CACT,KAA6B,EAC7B,QAAwB,EACxB,OAAyB,EACzB,IAAiC;QAGjC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAC7C,CAAC;QAED,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;eACtD,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,EACxD,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,CAAC,MAAM,eAAe,CAAC,CAAC;QAChE,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,KAAK,CAAC,MAAM;SACpB,CAAC;IACJ,CAAC;CACF,CAAA;AA1BY,sDAAqB;gCAArB,qBAAqB;IALjC,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;GACW,qBAAqB,CA0BjC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceInterface, ServiceCallResult } from '@loopstack/shared';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
transitions: z.ZodArray<z.ZodObject<{
|
|
5
|
+
place: z.ZodString;
|
|
6
|
+
condition: z.ZodUnion<[z.ZodBoolean, z.ZodUndefined]>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
place: string;
|
|
9
|
+
condition?: boolean | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
place: string;
|
|
12
|
+
condition?: boolean | undefined;
|
|
13
|
+
}>, "many">;
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
|
+
transitions: {
|
|
16
|
+
place: string;
|
|
17
|
+
condition?: boolean | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
}, {
|
|
20
|
+
transitions: {
|
|
21
|
+
place: string;
|
|
22
|
+
condition?: boolean | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare class TransitionSelectorService implements ServiceInterface {
|
|
26
|
+
private readonly logger;
|
|
27
|
+
apply(props: z.infer<typeof schema>): Promise<ServiceCallResult>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
package/dist/modules/workflow-processor/{tools → tool-services}/transition-selector.service.js
RENAMED
|
@@ -11,34 +11,34 @@ exports.TransitionSelectorService = void 0;
|
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
const shared_1 = require("@loopstack/shared");
|
|
14
|
+
const config = zod_1.z
|
|
15
|
+
.object({
|
|
16
|
+
transitions: zod_1.z.array(zod_1.z.object({
|
|
17
|
+
place: shared_1.NonExpressionString,
|
|
18
|
+
condition: shared_1.ExpressionString.optional(),
|
|
19
|
+
})),
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
const schema = zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
transitions: zod_1.z.array(zod_1.z.object({
|
|
25
|
+
place: shared_1.NonExpressionString,
|
|
26
|
+
condition: zod_1.z.union([zod_1.z.boolean(), zod_1.z.undefined()]),
|
|
27
|
+
})),
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
14
30
|
let TransitionSelectorService = TransitionSelectorService_1 = class TransitionSelectorService {
|
|
15
31
|
logger = new common_1.Logger(TransitionSelectorService_1.name);
|
|
16
|
-
configSchema = zod_1.z
|
|
17
|
-
.object({
|
|
18
|
-
transitions: zod_1.z.array(zod_1.z.object({
|
|
19
|
-
place: shared_1.NonExpressionString,
|
|
20
|
-
condition: shared_1.ExpressionString.optional(),
|
|
21
|
-
})),
|
|
22
|
-
})
|
|
23
|
-
.strict();
|
|
24
|
-
schema = zod_1.z
|
|
25
|
-
.object({
|
|
26
|
-
transitions: zod_1.z.array(zod_1.z.object({
|
|
27
|
-
place: shared_1.NonExpressionString,
|
|
28
|
-
condition: zod_1.z.union([zod_1.z.boolean(), zod_1.z.undefined()]),
|
|
29
|
-
})),
|
|
30
|
-
})
|
|
31
|
-
.strict();
|
|
32
32
|
async apply(props) {
|
|
33
|
-
const validOptions = this.schema.parse(props);
|
|
34
33
|
let place;
|
|
35
|
-
for (const option of
|
|
34
|
+
for (const option of props.transitions) {
|
|
36
35
|
if (undefined === option.condition || option.condition) {
|
|
37
36
|
place = option.place;
|
|
38
37
|
break;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
return {
|
|
41
|
+
success: true,
|
|
42
42
|
place,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -46,6 +46,9 @@ let TransitionSelectorService = TransitionSelectorService_1 = class TransitionSe
|
|
|
46
46
|
exports.TransitionSelectorService = TransitionSelectorService;
|
|
47
47
|
exports.TransitionSelectorService = TransitionSelectorService = TransitionSelectorService_1 = __decorate([
|
|
48
48
|
(0, common_1.Injectable)(),
|
|
49
|
-
(0, shared_1.
|
|
49
|
+
(0, shared_1.Service)({
|
|
50
|
+
config,
|
|
51
|
+
schema,
|
|
52
|
+
})
|
|
50
53
|
], TransitionSelectorService);
|
|
51
54
|
//# sourceMappingURL=transition-selector.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transition-selector.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/transition-selector.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAM2B;AAE3B,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,WAAW,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,4BAAmB;QAC1B,SAAS,EAAE,yBAAgB,CAAC,QAAQ,EAAE;KACvC,CAAC,CACH;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,WAAW,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,4BAAmB;QAC1B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,EAAE,EAAE,OAAC,CAAC,SAAS,EAAE,CAAC,CAAC;KACjD,CAAC,CACH;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AAOL,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IACnB,MAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;IAErE,KAAK,CAAC,KAAK,CAAC,KAA6B;QACvC,IAAI,KAAyB,CAAC;QAC9B,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACvC,IAAI,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;gBACvD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;gBACrB,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,KAAK;SACN,CAAC;IACJ,CAAC;CACF,CAAA;AAjBY,8DAAyB;oCAAzB,yBAAyB;IALrC,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;GACW,yBAAyB,CAiBrC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ServiceInterface, ServiceCallResult } from '@loopstack/shared';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { WorkflowEntity } from '@loopstack/shared';
|
|
4
|
+
import { DocumentService } from '../../persistence';
|
|
5
|
+
declare const schema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
update: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
content: z.ZodOptional<z.ZodAny>;
|
|
11
|
+
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
12
|
+
ui: z.ZodOptional<z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>>;
|
|
13
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
14
|
+
meta: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
15
|
+
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"]>>;
|
|
16
|
+
invalidate: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
enableTransitions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
|
+
enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
+
hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
data?: any;
|
|
23
|
+
invalidate?: boolean | undefined;
|
|
24
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
25
|
+
enableTransitions?: string[] | undefined;
|
|
26
|
+
enableAtPlaces?: string[] | undefined;
|
|
27
|
+
hideAtPlaces?: string[] | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
data?: any;
|
|
30
|
+
invalidate?: boolean | undefined;
|
|
31
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
32
|
+
enableTransitions?: string[] | undefined;
|
|
33
|
+
enableAtPlaces?: string[] | undefined;
|
|
34
|
+
hideAtPlaces?: string[] | undefined;
|
|
35
|
+
}>>>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
content?: any;
|
|
39
|
+
meta?: {
|
|
40
|
+
data?: any;
|
|
41
|
+
invalidate?: boolean | undefined;
|
|
42
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
43
|
+
enableTransitions?: string[] | undefined;
|
|
44
|
+
enableAtPlaces?: string[] | undefined;
|
|
45
|
+
hideAtPlaces?: string[] | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
schema?: any;
|
|
49
|
+
ui?: any;
|
|
50
|
+
tags?: string[] | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
content?: any;
|
|
54
|
+
meta?: {
|
|
55
|
+
data?: any;
|
|
56
|
+
invalidate?: boolean | undefined;
|
|
57
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
58
|
+
enableTransitions?: string[] | undefined;
|
|
59
|
+
enableAtPlaces?: string[] | undefined;
|
|
60
|
+
hideAtPlaces?: string[] | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
schema?: any;
|
|
64
|
+
ui?: any;
|
|
65
|
+
tags?: string[] | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
}, "strict", z.ZodTypeAny, {
|
|
68
|
+
id: string;
|
|
69
|
+
update?: {
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
content?: any;
|
|
72
|
+
meta?: {
|
|
73
|
+
data?: any;
|
|
74
|
+
invalidate?: boolean | undefined;
|
|
75
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
76
|
+
enableTransitions?: string[] | undefined;
|
|
77
|
+
enableAtPlaces?: string[] | undefined;
|
|
78
|
+
hideAtPlaces?: string[] | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
schema?: any;
|
|
82
|
+
ui?: any;
|
|
83
|
+
tags?: string[] | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
id: string;
|
|
87
|
+
update?: {
|
|
88
|
+
name?: string | undefined;
|
|
89
|
+
content?: any;
|
|
90
|
+
meta?: {
|
|
91
|
+
data?: any;
|
|
92
|
+
invalidate?: boolean | undefined;
|
|
93
|
+
mimeType?: "application/xml" | "text/html" | "text/xml" | "text/plain" | "text/css" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/yaml" | undefined;
|
|
94
|
+
enableTransitions?: string[] | undefined;
|
|
95
|
+
enableAtPlaces?: string[] | undefined;
|
|
96
|
+
hideAtPlaces?: string[] | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
description?: string | undefined;
|
|
99
|
+
schema?: any;
|
|
100
|
+
ui?: any;
|
|
101
|
+
tags?: string[] | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export declare class UpdateDocumentService implements ServiceInterface {
|
|
105
|
+
private documentService;
|
|
106
|
+
private readonly logger;
|
|
107
|
+
constructor(documentService: DocumentService);
|
|
108
|
+
apply(props: z.infer<typeof schema>, workflow: WorkflowEntity | undefined): Promise<ServiceCallResult>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -17,38 +17,38 @@ const zod_1 = require("zod");
|
|
|
17
17
|
const persistence_1 = require("../../persistence");
|
|
18
18
|
const lodash_1 = require("lodash");
|
|
19
19
|
const expression_type_schema_1 = require("@loopstack/shared/dist/schemas/expression-type.schema");
|
|
20
|
+
const config = zod_1.z
|
|
21
|
+
.object({
|
|
22
|
+
id: expression_type_schema_1.ExpressionString,
|
|
23
|
+
update: shared_1.DocumentConfigSchema.partial().optional(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
const schema = zod_1.z
|
|
27
|
+
.object({
|
|
28
|
+
id: shared_1.NonExpressionString,
|
|
29
|
+
update: shared_1.PartialDocumentSchema.optional(),
|
|
30
|
+
})
|
|
31
|
+
.strict();
|
|
20
32
|
let UpdateDocumentService = UpdateDocumentService_1 = class UpdateDocumentService {
|
|
21
33
|
documentService;
|
|
22
34
|
logger = new common_1.Logger(UpdateDocumentService_1.name);
|
|
23
|
-
configSchema = zod_1.z
|
|
24
|
-
.object({
|
|
25
|
-
id: expression_type_schema_1.ExpressionString,
|
|
26
|
-
update: shared_1.DocumentConfigSchema.partial().optional(),
|
|
27
|
-
})
|
|
28
|
-
.strict();
|
|
29
|
-
schema = zod_1.z
|
|
30
|
-
.object({
|
|
31
|
-
id: shared_1.NonExpressionString,
|
|
32
|
-
update: shared_1.PartialDocumentSchema.optional(),
|
|
33
|
-
})
|
|
34
|
-
.strict();
|
|
35
35
|
constructor(documentService) {
|
|
36
36
|
this.documentService = documentService;
|
|
37
37
|
}
|
|
38
38
|
async apply(props, workflow) {
|
|
39
39
|
if (!workflow) {
|
|
40
|
-
|
|
40
|
+
throw new Error('Workflow is undefined');
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
let document = workflow.documents.find((item) => item.id === validData.id);
|
|
42
|
+
let document = workflow.documents.find((item) => item.id === props.id);
|
|
44
43
|
if (!document) {
|
|
45
|
-
throw new Error(`Document with ID ${
|
|
44
|
+
throw new Error(`Document with ID ${props.id} not found.`);
|
|
46
45
|
}
|
|
47
46
|
this.logger.debug(`Update document "${document.name}".`);
|
|
48
|
-
document = this.documentService.update(workflow, (0, lodash_1.merge)(document,
|
|
47
|
+
document = this.documentService.update(workflow, (0, lodash_1.merge)(document, props.update));
|
|
49
48
|
return {
|
|
49
|
+
success: true,
|
|
50
|
+
persist: true,
|
|
50
51
|
workflow,
|
|
51
|
-
commitDirect: true,
|
|
52
52
|
data: document,
|
|
53
53
|
};
|
|
54
54
|
}
|
|
@@ -56,7 +56,10 @@ let UpdateDocumentService = UpdateDocumentService_1 = class UpdateDocumentServic
|
|
|
56
56
|
exports.UpdateDocumentService = UpdateDocumentService;
|
|
57
57
|
exports.UpdateDocumentService = UpdateDocumentService = UpdateDocumentService_1 = __decorate([
|
|
58
58
|
(0, common_1.Injectable)(),
|
|
59
|
-
(0, shared_1.
|
|
59
|
+
(0, shared_1.Service)({
|
|
60
|
+
config,
|
|
61
|
+
schema,
|
|
62
|
+
}),
|
|
60
63
|
__metadata("design:paramtypes", [persistence_1.DocumentService])
|
|
61
64
|
], UpdateDocumentService);
|
|
62
65
|
//# sourceMappingURL=update-document.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-document.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/tool-services/update-document.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAO2B;AAC3B,6BAAwB;AAExB,mDAAoD;AACpD,mCAA+B;AAC/B,kGAAyF;AAEzF,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,EAAE,EAAE,yCAAgB;IACpB,MAAM,EAAE,6BAAoB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAClD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,EAAE,EAAE,4BAAmB;IACvB,MAAM,EAAE,8BAAqB,CAAC,QAAQ,EAAE;CACzC,CAAC;KACD,MAAM,EAAE,CAAC;AAOL,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAGZ;IAFH,MAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;IAEjE,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAExD,KAAK,CAAC,KAAK,CACT,KAA6B,EAC7B,QAAoC;QAEpC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;QAC7D,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;QAEzD,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CACpC,QAAQ,EACR,IAAA,cAAK,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAC9B,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,IAAI,EAAE,QAAQ;SACf,CAAC;IACJ,CAAC;CACF,CAAA;AAhCY,sDAAqB;gCAArB,qBAAqB;IALjC,IAAA,mBAAU,GAAE;IACZ,IAAA,gBAAO,EAAC;QACP,MAAM;QACN,MAAM;KACP,CAAC;qCAIqC,6BAAe;GAHzC,qBAAqB,CAgCjC"}
|
|
@@ -14,7 +14,7 @@ const core_1 = require("@nestjs/core");
|
|
|
14
14
|
const common_2 = require("../common");
|
|
15
15
|
const validators_1 = require("./validators");
|
|
16
16
|
const services_1 = require("./services");
|
|
17
|
-
const
|
|
17
|
+
const tool_services_1 = require("./tool-services");
|
|
18
18
|
let WorkflowProcessorModule = class WorkflowProcessorModule {
|
|
19
19
|
};
|
|
20
20
|
exports.WorkflowProcessorModule = WorkflowProcessorModule;
|
|
@@ -30,17 +30,18 @@ exports.WorkflowProcessorModule = WorkflowProcessorModule = __decorate([
|
|
|
30
30
|
services_1.WorkflowProcessorService,
|
|
31
31
|
services_1.ToolExecutionService,
|
|
32
32
|
services_1.ToolSchemaValidatorService,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
tools_1.TransitionSelectorService,
|
|
33
|
+
tool_services_1.CreateDocumentService,
|
|
34
|
+
tool_services_1.BatchCreateDocumentsService,
|
|
35
|
+
tool_services_1.MockService,
|
|
36
|
+
tool_services_1.SetContextService,
|
|
37
|
+
tool_services_1.AddNamespaceService,
|
|
38
|
+
tool_services_1.LoadDocumentService,
|
|
39
|
+
tool_services_1.TransitionSelectorService,
|
|
41
40
|
services_1.NamespaceProcessorService,
|
|
42
|
-
services_1.
|
|
43
|
-
|
|
41
|
+
services_1.PipelineProcessorService,
|
|
42
|
+
tool_services_1.UpdateDocumentService,
|
|
43
|
+
services_1.TemplateExpressionEvaluatorService,
|
|
44
|
+
tool_services_1.SetTargetPlaceService,
|
|
44
45
|
validators_1.InitialRunValidator,
|
|
45
46
|
validators_1.WorkflowDependenciesValidator,
|
|
46
47
|
validators_1.WorkflowOptionValidator,
|
|
@@ -48,7 +49,7 @@ exports.WorkflowProcessorModule = WorkflowProcessorModule = __decorate([
|
|
|
48
49
|
services_1.StateMachineProcessorService,
|
|
49
50
|
services_1.StateMachineConfigService,
|
|
50
51
|
],
|
|
51
|
-
exports: [services_1.
|
|
52
|
+
exports: [services_1.PipelineProcessorService, services_1.WorkflowProcessorService, services_1.ToolExecutionService, services_1.TemplateExpressionEvaluatorService],
|
|
52
53
|
})
|
|
53
54
|
], WorkflowProcessorModule);
|
|
54
55
|
//# sourceMappingURL=workflow-processor.module.js.map
|
|
@@ -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,yCASoB;AACpB,
|
|
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,yCASoB;AACpB,mDASyB;AAoClB,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,0DAAuB;kCAAvB,uBAAuB;IAlCnC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,sBAAe;YACf,qBAAY;YACZ,mCAAmB;YACnB,+BAAiB;SAClB;QACD,SAAS,EAAE;YACT,mCAAwB;YACxB,+BAAoB;YACpB,qCAA0B;YAC1B,qCAAqB;YACrB,2CAA2B;YAC3B,2BAAW;YACX,iCAAiB;YACjB,mCAAmB;YACnB,mCAAmB;YACnB,yCAAyB;YACzB,oCAAyB;YACzB,mCAAwB;YACxB,qCAAqB;YACrB,6CAAkC;YAClC,qCAAqB;YAErB,gCAAmB;YACnB,0CAA6B;YAC7B,oCAAuB;YAEvB,wCAA6B;YAC7B,uCAA4B;YAC5B,oCAAyB;SAC1B;QACD,OAAO,EAAE,CAAC,mCAAwB,EAAE,mCAAwB,EAAE,+BAAoB,EAAE,6CAAkC,CAAC;KACxH,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.0
|
|
5
|
+
"version": "0.1.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jakob Klippel",
|
|
8
8
|
"url": "https://www.linkedin.com/in/jakob-klippel//"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@loopstack/shared": "^0.0
|
|
14
|
+
"@loopstack/shared": "^0.1.0",
|
|
15
15
|
"@nestjs/common": "^11.0.1",
|
|
16
16
|
"@nestjs/config": "^4.0.0",
|
|
17
17
|
"@nestjs/core": "^11.0.1",
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
"typescript": "^5.7.3",
|
|
63
63
|
"typescript-eslint": "^8.20.0"
|
|
64
64
|
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"@loopstack/shared": "^0.1.0"
|
|
67
|
+
},
|
|
65
68
|
"jest": {
|
|
66
69
|
"moduleFileExtensions": [
|
|
67
70
|
"js",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
workflowTemplates:
|
|
2
|
-
- name: core/userInputTemplate
|
|
3
|
-
type: stateMachine
|
|
4
|
-
transitions:
|
|
5
|
-
- name: start
|
|
6
|
-
from: start
|
|
7
|
-
to: started
|
|
8
|
-
when: onEntry
|
|
9
|
-
- name: request-form
|
|
10
|
-
from: started
|
|
11
|
-
to: waiting-for-user
|
|
12
|
-
when: onEntry
|
|
13
|
-
- name: response
|
|
14
|
-
from: waiting-for-user
|
|
15
|
-
to: received
|
|
16
|
-
when: manual
|
|
17
|
-
- name: finish
|
|
18
|
-
from: received
|
|
19
|
-
to: complete
|
|
20
|
-
when: onEntry
|
|
21
|
-
- name: unlock
|
|
22
|
-
from: complete
|
|
23
|
-
to: waiting-for-user
|
|
24
|
-
when: manual
|
|
25
|
-
handlers:
|
|
26
|
-
- onTransition: request-form
|
|
27
|
-
call: core/createTemplateDocument
|
|
28
|
-
- onTransition: response
|
|
29
|
-
call: core/createTemplateDocumentUserUpdate
|