@ldsg/workflow 0.3.1 → 0.3.3
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/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/json_schema_with_expression_extension.d.ts +14 -0
- package/dist/types/json_schema_with_expression_extension.d.ts.map +1 -0
- package/dist/types/json_schema_with_expression_extension.js +2 -0
- package/dist/utils/evaluate-variables/constants.d.ts.map +1 -1
- package/dist/utils/evaluate-variables/constants.js +4 -0
- package/dist/utils/evaluate-variables.test.js +0 -8
- package/package.json +5 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,yCAAyC,CAAC;AACxD,cAAc,QAAQ,CAAC;AACvB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./edge"), exports);
|
|
18
|
+
__exportStar(require("./json_schema_with_expression_extension"), exports);
|
|
18
19
|
__exportStar(require("./node"), exports);
|
|
19
20
|
__exportStar(require("./specific-resource-settings"), exports);
|
|
20
21
|
__exportStar(require("./variables"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSONSchema7 } from "json-schema";
|
|
2
|
+
/**
|
|
3
|
+
* JSON Schema with Expression Extension
|
|
4
|
+
*/
|
|
5
|
+
export interface JSONSchemaWithExpressionExtension extends JSONSchema7 {
|
|
6
|
+
"x-expression"?: string;
|
|
7
|
+
"x-expression-const"?: string;
|
|
8
|
+
"x-expression-default"?: string;
|
|
9
|
+
properties?: {
|
|
10
|
+
[key: string]: JSONSchemaWithExpressionExtension;
|
|
11
|
+
};
|
|
12
|
+
items?: JSONSchemaWithExpressionExtension | JSONSchemaWithExpressionExtension[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=json_schema_with_expression_extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json_schema_with_expression_extension.d.ts","sourceRoot":"","sources":["../../src/types/json_schema_with_expression_extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,WAAW;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,UAAU,CAAC,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,iCAAiC,CAAC;KAClD,CAAC;IAEF,KAAK,CAAC,EACF,iCAAiC,GACjC,iCAAiC,EAAE,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/evaluate-variables/constants.ts"],"names":[],"mappings":"AAEA,UAAU,qCAAqC;IAC7C;;OAEG;IACH,oBAAoB,EAAE,GAAG,CAAC;IAE1B;;;OAGG;IACH,KAAK,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,gBAAgB,CAAC,EAAE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@@ -94,7 +94,6 @@ const subJsonSchema = {
|
|
|
94
94
|
/**
|
|
95
95
|
* 根据 jsonata 取值
|
|
96
96
|
*/
|
|
97
|
-
// @ts-ignore
|
|
98
97
|
"x-expression": `Account."Account Name"`,
|
|
99
98
|
},
|
|
100
99
|
CurrentOrder: {
|
|
@@ -102,12 +101,10 @@ const subJsonSchema = {
|
|
|
102
101
|
/**
|
|
103
102
|
* 根据 jsonata 取值
|
|
104
103
|
*/
|
|
105
|
-
// @ts-ignore
|
|
106
104
|
"x-expression": `"Current Order"`,
|
|
107
105
|
},
|
|
108
106
|
OrderPrice: {
|
|
109
107
|
type: "number",
|
|
110
|
-
// @ts-ignore
|
|
111
108
|
"x-expression": "$sum(Account.Order.Product.(Price * Quantity))",
|
|
112
109
|
},
|
|
113
110
|
ProductIds: {
|
|
@@ -115,7 +112,6 @@ const subJsonSchema = {
|
|
|
115
112
|
items: {
|
|
116
113
|
type: "number",
|
|
117
114
|
},
|
|
118
|
-
// @ts-ignore
|
|
119
115
|
"x-expression": "Account.Order.Product.ProductID",
|
|
120
116
|
},
|
|
121
117
|
ordersWithProductIds: {
|
|
@@ -137,7 +133,6 @@ const subJsonSchema = {
|
|
|
137
133
|
items: {
|
|
138
134
|
type: "number",
|
|
139
135
|
},
|
|
140
|
-
// @ts-ignore
|
|
141
136
|
"x-expression": "$v.Product.ProductID",
|
|
142
137
|
},
|
|
143
138
|
AccountName: {
|
|
@@ -145,17 +140,14 @@ const subJsonSchema = {
|
|
|
145
140
|
/**
|
|
146
141
|
* 根据 jsonata 取值
|
|
147
142
|
*/
|
|
148
|
-
// @ts-ignore
|
|
149
143
|
"x-expression": `Account."Account Name"`,
|
|
150
144
|
},
|
|
151
145
|
orderId: {
|
|
152
146
|
type: "string",
|
|
153
|
-
// @ts-ignore
|
|
154
147
|
"x-expression": "$v.OrderID",
|
|
155
148
|
},
|
|
156
149
|
},
|
|
157
150
|
},
|
|
158
|
-
// @ts-ignore
|
|
159
151
|
"x-expression": "$map($.Account.Order, function($v, $i, $a) {{}})",
|
|
160
152
|
},
|
|
161
153
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldsg/workflow",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"flat": "^5.0.2",
|
|
18
17
|
"json-schema": "0.4.0",
|
|
19
18
|
"json-schema-default": "^1.0.2",
|
|
20
19
|
"lodash": "^4.17.21",
|
|
21
|
-
"@ldsg/
|
|
22
|
-
"@ldsg/resource
|
|
23
|
-
"@ldsg/
|
|
20
|
+
"@ldsg/resource-definition": "0.3.3",
|
|
21
|
+
"@ldsg/resource": "0.3.3",
|
|
22
|
+
"@ldsg/handler": "0.3.3"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
25
|
"@types/flat": "^5.0.5",
|
|
27
26
|
"@types/json-schema": "^7.0.15",
|
|
28
27
|
"@types/lodash": "^4.14.202",
|
|
29
|
-
"@ldsg/types": "0.3.
|
|
28
|
+
"@ldsg/types": "0.3.3"
|
|
30
29
|
},
|
|
31
30
|
"scripts": {
|
|
32
31
|
"build": "tsc --project tsconfig.build.json",
|