@gorules/zen-engine 0.7.3 → 0.9.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/index.d.ts +2 -0
- package/index.js +3 -1
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface ZenEvaluateOptions {
|
|
|
10
10
|
export interface ZenEngineOptions {
|
|
11
11
|
loader?: (key: string) => Promise<Buffer>
|
|
12
12
|
}
|
|
13
|
+
export function evaluateExpression(expression: string, context?: any | undefined | null): Promise<any>
|
|
14
|
+
export function evaluateUnaryExpression(expression: string, context: any): Promise<any>
|
|
13
15
|
export class ZenDecision {
|
|
14
16
|
constructor()
|
|
15
17
|
evaluate(context: any, opts?: ZenEvaluateOptions | undefined | null): Promise<any>
|
package/index.js
CHANGED
|
@@ -246,7 +246,9 @@ if (!nativeBinding) {
|
|
|
246
246
|
throw new Error(`Failed to load native binding`)
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
const { ZenDecision, ZenEngine } = nativeBinding
|
|
249
|
+
const { ZenDecision, ZenEngine, evaluateExpression, evaluateUnaryExpression } = nativeBinding
|
|
250
250
|
|
|
251
251
|
module.exports.ZenDecision = ZenDecision
|
|
252
252
|
module.exports.ZenEngine = ZenEngine
|
|
253
|
+
module.exports.evaluateExpression = evaluateExpression
|
|
254
|
+
module.exports.evaluateUnaryExpression = evaluateUnaryExpression
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gorules/zen-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
"prepublishOnly": "napi prepublish",
|
|
80
80
|
"version": "napi version"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "632340f0846a01a5c255590d2dffa5758e759109",
|
|
83
83
|
"optionalDependencies": {
|
|
84
|
-
"@gorules/zen-engine-darwin-x64": "0.
|
|
85
|
-
"@gorules/zen-engine-linux-x64-gnu": "0.
|
|
86
|
-
"@gorules/zen-engine-win32-x64-msvc": "0.
|
|
87
|
-
"@gorules/zen-engine-linux-arm64-gnu": "0.
|
|
88
|
-
"@gorules/zen-engine-darwin-arm64": "0.
|
|
84
|
+
"@gorules/zen-engine-darwin-x64": "0.9.0",
|
|
85
|
+
"@gorules/zen-engine-linux-x64-gnu": "0.9.0",
|
|
86
|
+
"@gorules/zen-engine-win32-x64-msvc": "0.9.0",
|
|
87
|
+
"@gorules/zen-engine-linux-arm64-gnu": "0.9.0",
|
|
88
|
+
"@gorules/zen-engine-darwin-arm64": "0.9.0"
|
|
89
89
|
}
|
|
90
90
|
}
|