@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.
@@ -1,4 +1,5 @@
1
1
  export * from "./edge";
2
+ export * from "./json_schema_with_expression_extension";
2
3
  export * from "./node";
3
4
  export * from "./specific-resource-settings";
4
5
  export * from "./variables";
@@ -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"}
@@ -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"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,MAAM,CAAC;CAG3B;AAED,MAAM,WAAW,kCAAkC;IACjD,KAAK,CAAC,EAAE,GAAG,CAAC;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,+BAA+B,GAAG,CACrC,MAAM,EAAE,qCAAqC,KAE3C,OAAO,CAAC,kCAAkC,CAAC,GAC3C,kCAAkC,CAAC;AAEvC;;GAEG;AACH,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,+BAA+B,CAAC;CACzC;AAqCD;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,yBAAyB,EAmCpE,CAAC"}
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,MAAM,CAAC;CAG3B;AAED,MAAM,WAAW,kCAAkC;IACjD,KAAK,CAAC,EAAE,GAAG,CAAC;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,+BAA+B,GAAG,CACrC,MAAM,EAAE,qCAAqC,KAE3C,OAAO,CAAC,kCAAkC,CAAC,GAC3C,kCAAkC,CAAC;AAEvC;;GAEG;AACH,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,+BAA+B,CAAC;CACzC;AAqCD;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,yBAAyB,EAuCpE,CAAC"}
@@ -51,6 +51,10 @@ exports.FIELD_VALUE_RETRIEVAL_METHODS = [
51
51
  name: "x-expression",
52
52
  handle: expressionHandle,
53
53
  },
54
+ {
55
+ name: "x-expression-default",
56
+ handle: expressionHandle,
57
+ },
54
58
  {
55
59
  name: "default",
56
60
  handle: (params) => {
@@ -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.1",
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/handler": "0.3.1",
22
- "@ldsg/resource-definition": "0.3.1",
23
- "@ldsg/resource": "0.3.1"
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.1"
28
+ "@ldsg/types": "0.3.3"
30
29
  },
31
30
  "scripts": {
32
31
  "build": "tsc --project tsconfig.build.json",