@loopstack/common 0.24.0 → 0.25.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/dist/base/base-tool.d.ts +10 -0
- package/dist/base/base-tool.d.ts.map +1 -0
- package/dist/base/base-tool.js +39 -0
- package/dist/base/base-tool.js.map +1 -0
- package/dist/base/base-workflow.d.ts +27 -0
- package/dist/base/base-workflow.d.ts.map +1 -0
- package/dist/base/base-workflow.js +53 -0
- package/dist/base/base-workflow.js.map +1 -0
- package/dist/base/index.d.ts +4 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +20 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/workflow-templates.d.ts +2 -0
- package/dist/base/workflow-templates.d.ts.map +1 -0
- package/dist/{interfaces/state-machine-validator.interface.js → base/workflow-templates.js} +1 -1
- package/dist/base/workflow-templates.js.map +1 -0
- package/dist/decorators/block.decorator.d.ts +52 -42
- package/dist/decorators/block.decorator.d.ts.map +1 -1
- package/dist/decorators/block.decorator.js +66 -74
- package/dist/decorators/block.decorator.js.map +1 -1
- package/dist/decorators/index.d.ts +0 -1
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +0 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/dtos/run-context.d.ts +4 -5
- package/dist/dtos/run-context.d.ts.map +1 -1
- package/dist/dtos/run-context.js +3 -4
- package/dist/dtos/run-context.js.map +1 -1
- package/dist/entities/document.entity.d.ts +2 -3
- package/dist/entities/document.entity.d.ts.map +1 -1
- package/dist/entities/document.entity.js +8 -14
- package/dist/entities/document.entity.js.map +1 -1
- package/dist/entities/index.d.ts +1 -3
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +1 -3
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/workflow-checkpoint.entity.d.ts +16 -0
- package/dist/entities/workflow-checkpoint.entity.d.ts.map +1 -0
- package/dist/entities/workflow-checkpoint.entity.js +83 -0
- package/dist/entities/workflow-checkpoint.entity.js.map +1 -0
- package/dist/entities/workflow.entity.d.ts +14 -16
- package/dist/entities/workflow.entity.d.ts.map +1 -1
- package/dist/entities/workflow.entity.js +65 -79
- package/dist/entities/workflow.entity.js.map +1 -1
- package/dist/entities/workspace.entity.d.ts +3 -3
- package/dist/entities/workspace.entity.d.ts.map +1 -1
- package/dist/entities/workspace.entity.js +7 -7
- package/dist/entities/workspace.entity.js.map +1 -1
- package/dist/enums/index.d.ts +0 -1
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.js +0 -1
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/workflow-state.enum.d.ts +1 -0
- package/dist/enums/workflow-state.enum.d.ts.map +1 -1
- package/dist/enums/workflow-state.enum.js +1 -0
- package/dist/enums/workflow-state.enum.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/block.interface.d.ts +4 -10
- package/dist/interfaces/block.interface.d.ts.map +1 -1
- package/dist/interfaces/document-repository.interface.d.ts +18 -0
- package/dist/interfaces/document-repository.interface.d.ts.map +1 -0
- package/dist/interfaces/{state-machine-validator-result.interface.js → document-repository.interface.js} +1 -1
- package/dist/interfaces/document-repository.interface.js.map +1 -0
- package/dist/interfaces/execution-context.interface.d.ts +10 -0
- package/dist/interfaces/execution-context.interface.d.ts.map +1 -0
- package/dist/interfaces/execution-context.interface.js +3 -0
- package/dist/interfaces/execution-context.interface.js.map +1 -0
- package/dist/interfaces/handler.interface.d.ts +9 -5
- package/dist/interfaces/handler.interface.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +3 -2
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +3 -2
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/tool-execution-interceptor.interface.d.ts +10 -10
- package/dist/interfaces/tool-execution-interceptor.interface.d.ts.map +1 -1
- package/dist/interfaces/tool-execution-interceptor.interface.js +12 -2
- package/dist/interfaces/tool-execution-interceptor.interface.js.map +1 -1
- package/dist/interfaces/workflow-metadata.interface.d.ts +0 -1
- package/dist/interfaces/workflow-metadata.interface.d.ts.map +1 -1
- package/dist/interfaces/workflow-orchestrator.interface.d.ts +11 -0
- package/dist/interfaces/workflow-orchestrator.interface.d.ts.map +1 -0
- package/dist/interfaces/workflow-orchestrator.interface.js +3 -0
- package/dist/interfaces/workflow-orchestrator.interface.js.map +1 -0
- package/dist/interfaces/workflow-state.interface.d.ts +1 -4
- package/dist/interfaces/workflow-state.interface.d.ts.map +1 -1
- package/dist/tokens.d.ts +5 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +8 -0
- package/dist/tokens.js.map +1 -0
- package/dist/utils/block-config.builder.d.ts.map +1 -1
- package/dist/utils/block-config.builder.js +7 -6
- package/dist/utils/block-config.builder.js.map +1 -1
- package/dist/utils/block-metadata.utils.d.ts +8 -17
- package/dist/utils/block-metadata.utils.d.ts.map +1 -1
- package/dist/utils/block-metadata.utils.js +33 -63
- package/dist/utils/block-metadata.utils.js.map +1 -1
- package/dist/utils/index.d.ts +1 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/workflow-transitions.builder.d.ts +3 -0
- package/dist/utils/workflow-transitions.builder.d.ts.map +1 -0
- package/dist/utils/workflow-transitions.builder.js +22 -0
- package/dist/utils/workflow-transitions.builder.js.map +1 -0
- package/package.json +3 -4
- package/dist/decorators/state-machine-validator.decorator.d.ts +0 -5
- package/dist/decorators/state-machine-validator.decorator.d.ts.map +0 -1
- package/dist/decorators/state-machine-validator.decorator.js +0 -11
- package/dist/decorators/state-machine-validator.decorator.js.map +0 -1
- package/dist/entities/event-subscriber.entity.d.ts +0 -21
- package/dist/entities/event-subscriber.entity.d.ts.map +0 -1
- package/dist/entities/event-subscriber.entity.js +0 -107
- package/dist/entities/event-subscriber.entity.js.map +0 -1
- package/dist/entities/namespace.entity.d.ts +0 -20
- package/dist/entities/namespace.entity.d.ts.map +0 -1
- package/dist/entities/namespace.entity.js +0 -107
- package/dist/entities/namespace.entity.js.map +0 -1
- package/dist/entities/pipeline.entity.d.ts +0 -32
- package/dist/entities/pipeline.entity.d.ts.map +0 -1
- package/dist/entities/pipeline.entity.js +0 -164
- package/dist/entities/pipeline.entity.js.map +0 -1
- package/dist/enums/pipeline-state.d.ts +0 -9
- package/dist/enums/pipeline-state.d.ts.map +0 -1
- package/dist/enums/pipeline-state.js +0 -13
- package/dist/enums/pipeline-state.js.map +0 -1
- package/dist/interfaces/state-machine-validator-result.interface.d.ts +0 -5
- package/dist/interfaces/state-machine-validator-result.interface.d.ts.map +0 -1
- package/dist/interfaces/state-machine-validator-result.interface.js.map +0 -1
- package/dist/interfaces/state-machine-validator.interface.d.ts +0 -9
- package/dist/interfaces/state-machine-validator.interface.d.ts.map +0 -1
- package/dist/interfaces/state-machine-validator.interface.js.map +0 -1
- package/dist/utils/create-hash.util.d.ts +0 -2
- package/dist/utils/create-hash.util.d.ts.map +0 -1
- package/dist/utils/create-hash.util.js +0 -13
- package/dist/utils/create-hash.util.js.map +0 -1
- package/dist/utils/normalize-deep-serialize.util.d.ts +0 -2
- package/dist/utils/normalize-deep-serialize.util.d.ts.map +0 -1
- package/dist/utils/normalize-deep-serialize.util.js +0 -19
- package/dist/utils/normalize-deep-serialize.util.js.map +0 -1
- package/dist/utils/object-fingerprint.util.d.ts +0 -2
- package/dist/utils/object-fingerprint.util.d.ts.map +0 -1
- package/dist/utils/object-fingerprint.util.js +0 -10
- package/dist/utils/object-fingerprint.util.js.map +0 -1
|
@@ -5,21 +5,16 @@ exports.getBlockOptions = getBlockOptions;
|
|
|
5
5
|
exports.getBlockTools = getBlockTools;
|
|
6
6
|
exports.getBlockDocuments = getBlockDocuments;
|
|
7
7
|
exports.getBlockWorkflows = getBlockWorkflows;
|
|
8
|
-
exports.getBlockHelpers = getBlockHelpers;
|
|
9
|
-
exports.getBlockSharedProperties = getBlockSharedProperties;
|
|
10
|
-
exports.getBlockInputMetadata = getBlockInputMetadata;
|
|
11
|
-
exports.getBlockContextMetadata = getBlockContextMetadata;
|
|
12
|
-
exports.getBlockRuntimeMetadata = getBlockRuntimeMetadata;
|
|
13
8
|
exports.getBlockArgsSchema = getBlockArgsSchema;
|
|
14
|
-
exports.getBlockStateMetadata = getBlockStateMetadata;
|
|
15
|
-
exports.getBlockStateSchema = getBlockStateSchema;
|
|
16
|
-
exports.getBlockOutputMetadata = getBlockOutputMetadata;
|
|
17
|
-
exports.getBlockResultSchema = getBlockResultSchema;
|
|
18
9
|
exports.getBlockWorkflow = getBlockWorkflow;
|
|
19
10
|
exports.getBlockTool = getBlockTool;
|
|
20
11
|
exports.getBlockDocument = getBlockDocument;
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
12
|
+
exports.getTransitionMetadata = getTransitionMetadata;
|
|
13
|
+
exports.getGuardMetadata = getGuardMetadata;
|
|
14
|
+
exports.getGuardMetadataMap = getGuardMetadataMap;
|
|
15
|
+
exports.getBlockTypeFromMetadata = getBlockTypeFromMetadata;
|
|
16
|
+
exports.getDocumentSchema = getDocumentSchema;
|
|
17
|
+
exports.getPassThroughProperties = getPassThroughProperties;
|
|
23
18
|
const decorators_1 = require("../decorators");
|
|
24
19
|
const block_config_builder_js_1 = require("./block-config.builder.js");
|
|
25
20
|
function getConstructor(target) {
|
|
@@ -58,43 +53,10 @@ function getBlockWorkflows(target) {
|
|
|
58
53
|
const keys = Reflect.getMetadata(decorators_1.INJECTED_WORKFLOWS_METADATA_KEY, proto) ?? [];
|
|
59
54
|
return keys.map((key) => String(key));
|
|
60
55
|
}
|
|
61
|
-
function getBlockHelpers(target) {
|
|
62
|
-
const proto = getPrototype(target);
|
|
63
|
-
const keys = Reflect.getMetadata(decorators_1.TEMPLATE_HELPER_METADATA_KEY, proto) ?? [];
|
|
64
|
-
return keys.map((key) => String(key));
|
|
65
|
-
}
|
|
66
|
-
function getBlockSharedProperties(target) {
|
|
67
|
-
const ctor = getConstructor(target);
|
|
68
|
-
return Reflect.getMetadata(decorators_1.SHARED_METADATA_KEY, ctor) ?? [];
|
|
69
|
-
}
|
|
70
|
-
function getBlockInputMetadata(target) {
|
|
71
|
-
const ctor = getConstructor(target);
|
|
72
|
-
return Reflect.getMetadata(decorators_1.INPUT_METADATA_KEY, ctor);
|
|
73
|
-
}
|
|
74
|
-
function getBlockContextMetadata(target) {
|
|
75
|
-
const ctor = getConstructor(target);
|
|
76
|
-
return Reflect.getMetadata(decorators_1.CONTEXT_METADATA_KEY, ctor);
|
|
77
|
-
}
|
|
78
|
-
function getBlockRuntimeMetadata(target) {
|
|
79
|
-
const ctor = getConstructor(target);
|
|
80
|
-
return Reflect.getMetadata(decorators_1.RUNTIME_METADATA_KEY, ctor);
|
|
81
|
-
}
|
|
82
56
|
function getBlockArgsSchema(target) {
|
|
83
|
-
return getBlockInputMetadata(target)?.schema;
|
|
84
|
-
}
|
|
85
|
-
function getBlockStateMetadata(target) {
|
|
86
57
|
const ctor = getConstructor(target);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
function getBlockStateSchema(target) {
|
|
90
|
-
return getBlockStateMetadata(target)?.schema;
|
|
91
|
-
}
|
|
92
|
-
function getBlockOutputMetadata(target) {
|
|
93
|
-
const ctor = getConstructor(target);
|
|
94
|
-
return Reflect.getMetadata(decorators_1.OUTPUT_METADATA_KEY, ctor);
|
|
95
|
-
}
|
|
96
|
-
function getBlockResultSchema(target) {
|
|
97
|
-
return getBlockOutputMetadata(target)?.schema;
|
|
58
|
+
const options = Reflect.getMetadata(decorators_1.BLOCK_CONFIG_METADATA_KEY, ctor);
|
|
59
|
+
return options?.schema;
|
|
98
60
|
}
|
|
99
61
|
function getBlockWorkflow(target, name) {
|
|
100
62
|
const workflows = getBlockWorkflows(target);
|
|
@@ -108,24 +70,32 @@ function getBlockDocument(target, name) {
|
|
|
108
70
|
const documents = getBlockDocuments(target);
|
|
109
71
|
return documents.includes(name) ? target[name] : undefined;
|
|
110
72
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
? target[name]
|
|
115
|
-
: undefined;
|
|
73
|
+
function getTransitionMetadata(target) {
|
|
74
|
+
const ctor = getConstructor(target);
|
|
75
|
+
return Reflect.getMetadata(decorators_1.TRANSITIONS_METADATA_KEY, ctor) ?? [];
|
|
116
76
|
}
|
|
117
|
-
function
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
helpers.push({ name, fn: fn.bind(target) });
|
|
127
|
-
}
|
|
77
|
+
function getGuardMetadata(target) {
|
|
78
|
+
const ctor = getConstructor(target);
|
|
79
|
+
return Reflect.getMetadata(decorators_1.GUARDS_METADATA_KEY, ctor) ?? [];
|
|
80
|
+
}
|
|
81
|
+
function getGuardMetadataMap(target) {
|
|
82
|
+
const guards = getGuardMetadata(target);
|
|
83
|
+
const map = new Map();
|
|
84
|
+
for (const guard of guards) {
|
|
85
|
+
map.set(guard.transitionMethodName, guard);
|
|
128
86
|
}
|
|
129
|
-
return
|
|
87
|
+
return map;
|
|
88
|
+
}
|
|
89
|
+
function getBlockTypeFromMetadata(target) {
|
|
90
|
+
const ctor = getConstructor(target);
|
|
91
|
+
return Reflect.getMetadata(decorators_1.BLOCK_TYPE_METADATA_KEY, ctor);
|
|
92
|
+
}
|
|
93
|
+
function getDocumentSchema(target) {
|
|
94
|
+
return getBlockArgsSchema(target);
|
|
95
|
+
}
|
|
96
|
+
function getPassThroughProperties(target) {
|
|
97
|
+
const proto = getPrototype(target);
|
|
98
|
+
const keys = Reflect.getMetadata(decorators_1.PASS_THROUGH_METADATA_KEY, proto) ?? [];
|
|
99
|
+
return keys.map((key) => String(key));
|
|
130
100
|
}
|
|
131
101
|
//# sourceMappingURL=block-metadata.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-metadata.utils.js","sourceRoot":"","sources":["../../src/utils/block-metadata.utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"block-metadata.utils.js","sourceRoot":"","sources":["../../src/utils/block-metadata.utils.ts"],"names":[],"mappings":";;AA8CA,wCAIC;AAKD,0CAGC;AAKD,sCAIC;AAKD,8CAIC;AAKD,8CAIC;AAKD,gDAIC;AAKD,4CAGC;AAKD,oCAGC;AAKD,4CAGC;AAOD,sDAGC;AAKD,4CAGC;AAKD,kDAOC;AAKD,4DAGC;AAMD,8CAEC;AAKD,4DAIC;AA3KD,8CAauB;AACvB,uEAAwD;AAUxD,SAAS,cAAc,CAAC,MAA4B;IAClD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC,WAA0B,CAAC;AAC3C,CAAC;AAKD,SAAS,YAAY,CAAC,MAA4B;IAChD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,SAAmB,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,CAAW,CAAC;AACjD,CAAC;AAKD,SAAgB,cAAc,CAAsB,MAA4B;IAC9E,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,sCAAyB,EAAE,IAAI,CAA6B,CAAC;IACjG,OAAO,OAAO,CAAC,CAAC,CAAE,IAAA,qCAAW,EAAC,OAAO,CAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3D,CAAC;AAKD,SAAgB,eAAe,CAAC,MAA4B;IAC1D,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC,WAAW,CAAC,sCAAyB,EAAE,IAAI,CAA6B,CAAC;AAC1F,CAAC;AAK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AAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAKD,SAAgB,wBAAwB,CAAC,MAA4B;IACnE,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC,WAAW,CAAC,oCAAuB,EAAE,IAAI,CAA0B,CAAC;AACrF,CAAC;AAMD,SAAgB,iBAAiB,CAAC,MAA4B;IAC5D,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC;AAKD,SAAgB,wBAAwB,CAAC,MAA4B;IACnE,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,IAAI,GAAI,OAAO,CAAC,WAAW,CAAC,sCAAyB,EAAE,KAAK,CAAqC,IAAI,EAAE,CAAC;IAC9G,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from './block-metadata.utils.js';
|
|
2
|
-
export * from './create-hash.util.js';
|
|
3
|
-
export * from './normalize-deep-serialize.util.js';
|
|
4
2
|
export * from './normalize-object.js';
|
|
5
|
-
export * from './object-fingerprint.util.js';
|
|
6
3
|
export * from './stable-json-transformer.js';
|
|
4
|
+
export * from './workflow-transitions.builder.js';
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -15,9 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./block-metadata.utils.js"), exports);
|
|
18
|
-
__exportStar(require("./create-hash.util.js"), exports);
|
|
19
|
-
__exportStar(require("./normalize-deep-serialize.util.js"), exports);
|
|
20
18
|
__exportStar(require("./normalize-object.js"), exports);
|
|
21
|
-
__exportStar(require("./object-fingerprint.util.js"), exports);
|
|
22
19
|
__exportStar(require("./stable-json-transformer.js"), exports);
|
|
20
|
+
__exportStar(require("./workflow-transitions.builder.js"), exports);
|
|
23
21
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,wDAAsC;AACtC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,wDAAsC;AACtC,+DAA6C;AAC7C,oEAAkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-transitions.builder.d.ts","sourceRoot":"","sources":["../../src/utils/workflow-transitions.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAkBzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,EAAE,CAiBjF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildWorkflowTransitions = buildWorkflowTransitions;
|
|
4
|
+
const block_metadata_utils_js_1 = require("./block-metadata.utils.js");
|
|
5
|
+
function buildWorkflowTransitions(target) {
|
|
6
|
+
const transitions = (0, block_metadata_utils_js_1.getTransitionMetadata)(target);
|
|
7
|
+
const guards = (0, block_metadata_utils_js_1.getGuardMetadataMap)(target);
|
|
8
|
+
return transitions.map((t) => {
|
|
9
|
+
const guard = guards.get(t.methodName);
|
|
10
|
+
const result = {
|
|
11
|
+
id: t.methodName,
|
|
12
|
+
from: t.from,
|
|
13
|
+
to: t.to,
|
|
14
|
+
trigger: t.wait ? 'manual' : 'onEntry',
|
|
15
|
+
};
|
|
16
|
+
if (guard) {
|
|
17
|
+
result.if = `\${{ ${guard.guardMethodName}() }}`;
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=workflow-transitions.builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-transitions.builder.js","sourceRoot":"","sources":["../../src/utils/workflow-transitions.builder.ts"],"names":[],"mappings":";;AAkBA,4DAiBC;AAlCD,uEAAuF;AAiBvF,SAAgB,wBAAwB,CAAC,MAAc;IACrD,MAAM,WAAW,GAAG,IAAA,+CAAqB,EAAC,MAAM,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAA,6CAAmB,EAAC,MAAM,CAAC,CAAC;IAE3C,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACvC,MAAM,MAAM,GAA2B;YACrC,EAAE,EAAE,CAAC,CAAC,UAAU;YAChB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACvC,CAAC;QACF,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,EAAE,GAAG,QAAQ,KAAK,CAAC,eAAe,OAAO,CAAC;QACnD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@loopstack/common",
|
|
3
3
|
"displayName": "Loopstack Common Module",
|
|
4
4
|
"description": "A collection of utils and dtos shared between nestjs modules",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.25.1",
|
|
6
6
|
"license": "BSL",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Jakob Klippel",
|
|
@@ -24,12 +24,11 @@
|
|
|
24
24
|
"watch": "nest build --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@loopstack/contracts": "^0.
|
|
27
|
+
"@loopstack/contracts": "^0.25.1",
|
|
28
28
|
"class-transformer": "^0.5.1",
|
|
29
29
|
"fast-json-stable-stringify": "^2.1.0",
|
|
30
|
-
"murmurhash": "^2.0.1",
|
|
31
30
|
"reflect-metadata": "^0.2.2",
|
|
32
|
-
"yaml": "^2.8.
|
|
31
|
+
"yaml": "^2.8.3",
|
|
33
32
|
"zod": "^4.3.6"
|
|
34
33
|
},
|
|
35
34
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state-machine-validator.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/state-machine-validator.decorator.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sCAAsC,2CAA2C,CAAC;AAE/F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAEnF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOOP_STATE_MACHINE_VALIDATOR_DECORATOR = void 0;
|
|
4
|
-
exports.StateMachineValidator = StateMachineValidator;
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
const common_2 = require("@nestjs/common");
|
|
7
|
-
exports.LOOP_STATE_MACHINE_VALIDATOR_DECORATOR = 'LOOP_STATE_MACHINE_VALIDATOR_DECORATOR';
|
|
8
|
-
function StateMachineValidator(options) {
|
|
9
|
-
return (0, common_2.applyDecorators)((0, common_1.Injectable)(), (0, common_1.SetMetadata)(exports.LOOP_STATE_MACHINE_VALIDATOR_DECORATOR, options));
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=state-machine-validator.decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state-machine-validator.decorator.js","sourceRoot":"","sources":["../../src/decorators/state-machine-validator.decorator.ts"],"names":[],"mappings":";;;AAKA,sDAEC;AAPD,2CAAyD;AACzD,2CAAiD;AAEpC,QAAA,sCAAsC,GAAG,wCAAwC,CAAC;AAE/F,SAAgB,qBAAqB,CAAC,OAA6B;IACjE,OAAO,IAAA,wBAAe,EAAC,IAAA,mBAAU,GAAE,EAAE,IAAA,oBAAW,EAAC,8CAAsC,EAAE,OAAO,CAAC,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PipelineEntity } from './pipeline.entity';
|
|
2
|
-
import { User } from './user.entity';
|
|
3
|
-
import { WorkspaceEntity } from './workspace.entity';
|
|
4
|
-
export declare class EventSubscriberEntity {
|
|
5
|
-
id: string;
|
|
6
|
-
subscriberPipeline: PipelineEntity;
|
|
7
|
-
subscriberPipelineId: string;
|
|
8
|
-
subscriberWorkflowId: string;
|
|
9
|
-
subscriberTransition: string;
|
|
10
|
-
eventCorrelationId: string;
|
|
11
|
-
eventName: string;
|
|
12
|
-
createdAt: Date;
|
|
13
|
-
updatedAt: Date;
|
|
14
|
-
workspace: WorkspaceEntity;
|
|
15
|
-
workspaceId: string;
|
|
16
|
-
user: User;
|
|
17
|
-
userId: string;
|
|
18
|
-
once: boolean;
|
|
19
|
-
metadata: Record<string, unknown> | null;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=event-subscriber.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-subscriber.entity.d.ts","sourceRoot":"","sources":["../../src/entities/event-subscriber.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAGa,qBAAqB;IAEhC,EAAE,EAAG,MAAM,CAAC;IAIZ,kBAAkB,EAAG,cAAc,CAAC;IAIpC,oBAAoB,EAAE,MAAM,CAAC;IAG7B,oBAAoB,EAAG,MAAM,CAAC;IAG9B,oBAAoB,EAAG,MAAM,CAAC;IAI9B,kBAAkB,EAAG,MAAM,CAAC;IAI5B,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAIjB,SAAS,EAAG,eAAe,CAAC;IAG5B,WAAW,EAAG,MAAM,CAAC;IAIrB,IAAI,EAAG,IAAI,CAAC;IAIZ,MAAM,EAAG,MAAM,CAAC;IAGhB,IAAI,EAAG,OAAO,CAAC;IAGf,QAAQ,EAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC3C"}
|
|
@@ -1,107 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EventSubscriberEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const pipeline_entity_1 = require("./pipeline.entity");
|
|
15
|
-
const user_entity_1 = require("./user.entity");
|
|
16
|
-
const workspace_entity_1 = require("./workspace.entity");
|
|
17
|
-
let EventSubscriberEntity = class EventSubscriberEntity {
|
|
18
|
-
id;
|
|
19
|
-
subscriberPipeline;
|
|
20
|
-
subscriberPipelineId;
|
|
21
|
-
subscriberWorkflowId;
|
|
22
|
-
subscriberTransition;
|
|
23
|
-
eventCorrelationId;
|
|
24
|
-
eventName;
|
|
25
|
-
createdAt;
|
|
26
|
-
updatedAt;
|
|
27
|
-
workspace;
|
|
28
|
-
workspaceId;
|
|
29
|
-
user;
|
|
30
|
-
userId;
|
|
31
|
-
once;
|
|
32
|
-
metadata;
|
|
33
|
-
};
|
|
34
|
-
exports.EventSubscriberEntity = EventSubscriberEntity;
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], EventSubscriberEntity.prototype, "id", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.ManyToOne)(() => pipeline_entity_1.PipelineEntity, { onDelete: 'CASCADE' }),
|
|
41
|
-
(0, typeorm_1.JoinColumn)({ name: 'subscriber_pipeline_id' }),
|
|
42
|
-
__metadata("design:type", pipeline_entity_1.PipelineEntity)
|
|
43
|
-
], EventSubscriberEntity.prototype, "subscriberPipeline", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'uuid', name: 'subscriber_pipeline_id' }),
|
|
46
|
-
(0, typeorm_1.Index)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], EventSubscriberEntity.prototype, "subscriberPipelineId", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type: 'uuid', name: 'subscriber_workflow_id' }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], EventSubscriberEntity.prototype, "subscriberWorkflowId", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'subscriber_transition' }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], EventSubscriberEntity.prototype, "subscriberTransition", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'event_correlation_id' }),
|
|
59
|
-
(0, typeorm_1.Index)(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], EventSubscriberEntity.prototype, "eventCorrelationId", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'event_name' }),
|
|
64
|
-
(0, typeorm_1.Index)(),
|
|
65
|
-
__metadata("design:type", String)
|
|
66
|
-
], EventSubscriberEntity.prototype, "eventName", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
69
|
-
__metadata("design:type", Date)
|
|
70
|
-
], EventSubscriberEntity.prototype, "createdAt", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
73
|
-
__metadata("design:type", Date)
|
|
74
|
-
], EventSubscriberEntity.prototype, "updatedAt", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.ManyToOne)(() => workspace_entity_1.WorkspaceEntity, { onDelete: 'CASCADE' }),
|
|
77
|
-
(0, typeorm_1.JoinColumn)({ name: 'workspace_id' }),
|
|
78
|
-
__metadata("design:type", workspace_entity_1.WorkspaceEntity)
|
|
79
|
-
], EventSubscriberEntity.prototype, "workspace", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ name: 'workspace_id', nullable: true }),
|
|
82
|
-
__metadata("design:type", String)
|
|
83
|
-
], EventSubscriberEntity.prototype, "workspaceId", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'RESTRICT' }),
|
|
86
|
-
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
87
|
-
__metadata("design:type", user_entity_1.User)
|
|
88
|
-
], EventSubscriberEntity.prototype, "user", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, typeorm_1.Column)({ name: 'user_id', type: 'uuid' }),
|
|
91
|
-
(0, typeorm_1.Index)(),
|
|
92
|
-
__metadata("design:type", String)
|
|
93
|
-
], EventSubscriberEntity.prototype, "userId", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({ name: 'once', type: 'boolean', default: true }),
|
|
96
|
-
__metadata("design:type", Boolean)
|
|
97
|
-
], EventSubscriberEntity.prototype, "once", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.Column)('jsonb', { nullable: true }),
|
|
100
|
-
__metadata("design:type", Object)
|
|
101
|
-
], EventSubscriberEntity.prototype, "metadata", void 0);
|
|
102
|
-
exports.EventSubscriberEntity = EventSubscriberEntity = __decorate([
|
|
103
|
-
(0, typeorm_1.Entity)({ name: 'core_event_subscriber' }),
|
|
104
|
-
(0, typeorm_1.Index)(['eventCorrelationId', 'eventName']),
|
|
105
|
-
(0, typeorm_1.Index)(['subscriberPipelineId', 'subscriberWorkflowId', 'subscriberTransition'])
|
|
106
|
-
], EventSubscriberEntity);
|
|
107
|
-
//# sourceMappingURL=event-subscriber.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-subscriber.entity.js","sourceRoot":"","sources":["../../src/entities/event-subscriber.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AACjB,uDAAmD;AACnD,+CAAqC;AACrC,yDAAqD;AAK9C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAEhC,EAAE,CAAU;IAIZ,kBAAkB,CAAkB;IAIpC,oBAAoB,CAAS;IAG7B,oBAAoB,CAAU;IAG9B,oBAAoB,CAAU;IAI9B,kBAAkB,CAAU;IAI5B,SAAS,CAAU;IAGnB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;IAIjB,SAAS,CAAmB;IAG5B,WAAW,CAAU;IAIrB,IAAI,CAAQ;IAIZ,MAAM,CAAU;IAGhB,IAAI,CAAW;IAGf,QAAQ,CAAkC;CAC3C,CAAA;AApDY,sDAAqB;AAEhC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;iDACnB;AAIZ;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACxD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;8BAC1B,gCAAc;iEAAC;AAIpC;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IACxD,IAAA,eAAK,GAAE;;mEACqB;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;;mEAC3B;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;;mEAC7B;AAI9B;IAFC,IAAA,gBAAM,EAAC,E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,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;IACzC,IAAA,eAAK,EAAC,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;IAC1C,IAAA,eAAK,EAAC,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;GACnE,qBAAqB,CAoDjC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PipelineEntity } from './pipeline.entity';
|
|
2
|
-
import { User } from './user.entity';
|
|
3
|
-
import { WorkflowEntity } from './workflow.entity';
|
|
4
|
-
export declare class NamespaceEntity {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
workspaceId: string;
|
|
8
|
-
pipeline: PipelineEntity;
|
|
9
|
-
pipelineId: string;
|
|
10
|
-
parent: NamespaceEntity;
|
|
11
|
-
parentId: string | null;
|
|
12
|
-
metadata: Record<string, any> | null;
|
|
13
|
-
children: NamespaceEntity[];
|
|
14
|
-
workflows: WorkflowEntity[];
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt: Date;
|
|
17
|
-
creator: User;
|
|
18
|
-
createdBy: string;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=namespace.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.entity.d.ts","sourceRoot":"","sources":["../../src/entities/namespace.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBACa,eAAe;IAE1B,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,EAAG,MAAM,CAAC;IAMrB,QAAQ,EAAG,cAAc,CAAC;IAG1B,UAAU,EAAG,MAAM,CAAC;IAOpB,MAAM,EAAG,eAAe,CAAC;IAIzB,QAAQ,EAAG,MAAM,GAAG,IAAI,CAAC;IAGzB,QAAQ,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAKtC,QAAQ,EAAG,eAAe,EAAE,CAAC;IAK7B,SAAS,EAAG,cAAc,EAAE,CAAC;IAG7B,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAIjB,OAAO,EAAG,IAAI,CAAC;IAIf,SAAS,EAAG,MAAM,CAAC;CACpB"}
|
|
@@ -1,107 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NamespaceEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const pipeline_entity_1 = require("./pipeline.entity");
|
|
15
|
-
const user_entity_1 = require("./user.entity");
|
|
16
|
-
const workflow_entity_1 = require("./workflow.entity");
|
|
17
|
-
let NamespaceEntity = class NamespaceEntity {
|
|
18
|
-
id;
|
|
19
|
-
name;
|
|
20
|
-
workspaceId;
|
|
21
|
-
pipeline;
|
|
22
|
-
pipelineId;
|
|
23
|
-
parent;
|
|
24
|
-
parentId;
|
|
25
|
-
metadata;
|
|
26
|
-
children;
|
|
27
|
-
workflows;
|
|
28
|
-
createdAt;
|
|
29
|
-
updatedAt;
|
|
30
|
-
creator;
|
|
31
|
-
createdBy;
|
|
32
|
-
};
|
|
33
|
-
exports.NamespaceEntity = NamespaceEntity;
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], NamespaceEntity.prototype, "id", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)(),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], NamespaceEntity.prototype, "name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ name: 'workspace_id' }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], NamespaceEntity.prototype, "workspaceId", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.ManyToOne)(() => pipeline_entity_1.PipelineEntity, (pipeline) => pipeline.namespaces, {
|
|
48
|
-
onDelete: 'CASCADE',
|
|
49
|
-
}),
|
|
50
|
-
(0, typeorm_1.JoinColumn)({ name: 'pipeline_id' }),
|
|
51
|
-
__metadata("design:type", pipeline_entity_1.PipelineEntity)
|
|
52
|
-
], NamespaceEntity.prototype, "pipeline", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ name: 'pipeline_id' }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], NamespaceEntity.prototype, "pipelineId", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.ManyToOne)(() => NamespaceEntity, (namespace) => namespace.children, {
|
|
59
|
-
onDelete: 'CASCADE',
|
|
60
|
-
nullable: true,
|
|
61
|
-
}),
|
|
62
|
-
(0, typeorm_1.JoinColumn)({ name: 'parent_id' }),
|
|
63
|
-
__metadata("design:type", NamespaceEntity)
|
|
64
|
-
], NamespaceEntity.prototype, "parent", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ name: 'parent_id', nullable: true }),
|
|
67
|
-
(0, typeorm_1.Index)(),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], NamespaceEntity.prototype, "parentId", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)('json', { nullable: true }),
|
|
72
|
-
__metadata("design:type", Object)
|
|
73
|
-
], NamespaceEntity.prototype, "metadata", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.OneToMany)(() => NamespaceEntity, (namespace) => namespace.parent, {
|
|
76
|
-
onDelete: 'CASCADE',
|
|
77
|
-
}),
|
|
78
|
-
__metadata("design:type", Array)
|
|
79
|
-
], NamespaceEntity.prototype, "children", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, typeorm_1.OneToMany)(() => workflow_entity_1.WorkflowEntity, (workflow) => workflow.namespace, {
|
|
82
|
-
onDelete: 'CASCADE',
|
|
83
|
-
}),
|
|
84
|
-
__metadata("design:type", Array)
|
|
85
|
-
], NamespaceEntity.prototype, "workflows", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
88
|
-
__metadata("design:type", Date)
|
|
89
|
-
], NamespaceEntity.prototype, "createdAt", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
92
|
-
__metadata("design:type", Date)
|
|
93
|
-
], NamespaceEntity.prototype, "updatedAt", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'RESTRICT' }),
|
|
96
|
-
(0, typeorm_1.JoinColumn)({ name: 'created_by' }),
|
|
97
|
-
__metadata("design:type", user_entity_1.User)
|
|
98
|
-
], NamespaceEntity.prototype, "creator", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid' }),
|
|
101
|
-
(0, typeorm_1.Index)(),
|
|
102
|
-
__metadata("design:type", String)
|
|
103
|
-
], NamespaceEntity.prototype, "createdBy", void 0);
|
|
104
|
-
exports.NamespaceEntity = NamespaceEntity = __decorate([
|
|
105
|
-
(0, typeorm_1.Entity)('core_namespace')
|
|
106
|
-
], NamespaceEntity);
|
|
107
|
-
//# sourceMappingURL=namespace.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.entity.js","sourceRoot":"","sources":["../../src/entities/namespace.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAUiB;AACjB,uDAAmD;AACnD,+CAAqC;AACrC,uDAAmD;AAG5C,IAAM,eAAe,GAArB,MAAM,eAAe;IAE1B,EAAE,CAAU;IAGZ,IAAI,CAAU;IAGd,WAAW,CAAU;IAMrB,QAAQ,CAAkB;IAG1B,UAAU,CAAU;IAOpB,MAAM,CAAmB;IAIzB,QAAQ,CAAiB;IAGzB,QAAQ,CAA8B;IAKtC,QAAQ,CAAqB;IAK7B,SAAS,CAAoB;IAG7B,SAAS,CAAQ;IAGjB,SAAS,CAAQ;IAIjB,OAAO,CAAQ;IAIf,SAAS,CAAU;CACpB,CAAA;AAxDY,0CAAe;AAE1B;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;2CACnB;AAGZ;IADC,IAAA,gBAAM,GAAE;;6CACK;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;oDACZ;AAMrB;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE;QAClE,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa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AI,EAAE,YAAY,EAAE,CAAC;8BACzB,kBAAI;gDAAC;AAIf;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC5C,IAAA,eAAK,GAAE;;kDACW;0BAvDR,eAAe;IAD3B,IAAA,gBAAM,EAAC,gBAAgB,CAAC;GACZ,eAAe,CAwD3B"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { JSONSchemaConfigType } from '@loopstack/contracts/types';
|
|
3
|
-
import { PipelineState } from '../enums';
|
|
4
|
-
import { NamespaceEntity } from './namespace.entity';
|
|
5
|
-
import { User } from './user.entity';
|
|
6
|
-
import { WorkspaceEntity } from './workspace.entity';
|
|
7
|
-
export declare class PipelineEntity {
|
|
8
|
-
id: string;
|
|
9
|
-
blockName: string;
|
|
10
|
-
title: string | null;
|
|
11
|
-
run: number;
|
|
12
|
-
labels: string[];
|
|
13
|
-
index: string;
|
|
14
|
-
status: PipelineState;
|
|
15
|
-
eventCorrelationId: string | null;
|
|
16
|
-
args: any;
|
|
17
|
-
context: Record<string, any>;
|
|
18
|
-
schema: JSONSchemaConfigType | null;
|
|
19
|
-
error: z.ZodError | null;
|
|
20
|
-
ui: any;
|
|
21
|
-
createdAt: Date;
|
|
22
|
-
updatedAt: Date;
|
|
23
|
-
workspace: WorkspaceEntity;
|
|
24
|
-
workspaceId: string;
|
|
25
|
-
creator: User;
|
|
26
|
-
createdBy: string;
|
|
27
|
-
namespaces: NamespaceEntity[];
|
|
28
|
-
parent: PipelineEntity | null;
|
|
29
|
-
parentId: string | null;
|
|
30
|
-
children: PipelineEntity[];
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=pipeline.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.entity.d.ts","sourceRoot":"","sources":["../../src/entities/pipeline.entity.ts"],"names":[],"mappings":"AAWA,O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