@gorules/zen-engine 0.53.0 → 0.55.0-beta.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 +398 -3
- package/index.js +53 -52
- package/package.json +10 -10
package/index.d.ts
CHANGED
|
@@ -1,5 +1,265 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export type PolicyPropertyKind = 'input' | 'computed';
|
|
5
|
+
export type PolicyFieldKind = 'scalar' | 'enum' | 'relationship' | 'reference';
|
|
6
|
+
export type PolicySeverity = 'error' | 'warning';
|
|
7
|
+
|
|
8
|
+
/** Text range, `[start, end)` byte offsets. */
|
|
9
|
+
export type PolicySpan = [number, number];
|
|
10
|
+
|
|
11
|
+
/** Rename target — a top-level entity, an entity field, or a global property. */
|
|
12
|
+
export type PolicyRenameTarget =
|
|
13
|
+
| { kind: 'entity'; name: string }
|
|
14
|
+
| { kind: 'field'; entity: string; field: string }
|
|
15
|
+
| { kind: 'global'; name: string };
|
|
16
|
+
|
|
17
|
+
/** What kind of span a cursor is sitting in, with any disambiguation. */
|
|
18
|
+
export type PolicyCursorTarget =
|
|
19
|
+
| { kind: 'expression'; id: string }
|
|
20
|
+
| { kind: 'assertionOutput' }
|
|
21
|
+
| { kind: 'decisionTreeStatementKey'; id: string }
|
|
22
|
+
| { kind: 'decisionTableHead'; col: string }
|
|
23
|
+
| { kind: 'decisionTableCell'; row: string; col: string }
|
|
24
|
+
| { kind: 'dataModelName' }
|
|
25
|
+
| { kind: 'dataModelProperty'; id: string };
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* How an entity field came into existence — declared by a DataModel
|
|
29
|
+
* (`schema`) or produced by a rule block (`computed`).
|
|
30
|
+
*/
|
|
31
|
+
export type PolicyFieldOrigin =
|
|
32
|
+
| { origin: 'schema'; source: string; fieldKind: PolicyFieldKindInfo }
|
|
33
|
+
| { origin: 'computed'; writtenBy: PolicyPropertyWriter };
|
|
34
|
+
export type PolicyDiagnosticCode =
|
|
35
|
+
| 'UNDEFINED_VARIABLE'
|
|
36
|
+
| 'TYPE_MISMATCH'
|
|
37
|
+
| 'INVALID_EXPRESSION'
|
|
38
|
+
| 'PARSE_ERROR'
|
|
39
|
+
| 'MISSING_DEFAULT_BRANCH'
|
|
40
|
+
| 'EMPTY_BLOCK'
|
|
41
|
+
| 'MIXED_SCOPE'
|
|
42
|
+
| 'CYCLIC_DEPENDENCY'
|
|
43
|
+
| 'DUPLICATE_WRITER'
|
|
44
|
+
| 'INVALID_WRITE_PATH'
|
|
45
|
+
| 'INPUT_OVERRIDE'
|
|
46
|
+
| 'SELF_REFERENCING_WRITE'
|
|
47
|
+
| 'UNREACHABLE_ENTITY_READ'
|
|
48
|
+
| 'PARTIAL_OBJECT_WRITE'
|
|
49
|
+
| 'DATA_MODEL_COLLISION'
|
|
50
|
+
| 'UNKNOWN_DATA_MODEL_TARGET'
|
|
51
|
+
| 'DUPLICATE_PROPERTY'
|
|
52
|
+
| 'DUPLICATE_ENUM_VALUE'
|
|
53
|
+
| 'INVALID_NAME'
|
|
54
|
+
| 'MAX_DEPTH_EXCEEDED'
|
|
55
|
+
| 'IMPORT_NOT_FOUND'
|
|
56
|
+
| 'CIRCULAR_IMPORT';
|
|
57
|
+
|
|
58
|
+
export type PolicyVariableType =
|
|
59
|
+
| { type: 'any' }
|
|
60
|
+
| { type: 'null' }
|
|
61
|
+
| { type: 'bool' }
|
|
62
|
+
| { type: 'string' }
|
|
63
|
+
| { type: 'number' }
|
|
64
|
+
| { type: 'date' }
|
|
65
|
+
| { type: 'interval' }
|
|
66
|
+
| { type: 'const'; value: string }
|
|
67
|
+
| { type: 'enum'; name: string | null; values: string[] }
|
|
68
|
+
| { type: 'array'; items: PolicyVariableType }
|
|
69
|
+
| { type: 'object'; fields: Record<string, PolicyVariableType> }
|
|
70
|
+
| { type: 'nullable'; inner: PolicyVariableType };
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Wire-format block — the same shape passed into `setPolicy` / `updateBlock`.
|
|
74
|
+
* The engine emits these inside `replaceBlock` / `insertBlock` edits so a
|
|
75
|
+
* host can swap them in by id without text-span surgery.
|
|
76
|
+
*/
|
|
77
|
+
export interface PolicyWireBlock {
|
|
78
|
+
id: string;
|
|
79
|
+
type: string;
|
|
80
|
+
props: { dataJson?: string; schemaJson?: string };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Block-level edit emitted by code-mod operations (rename today; cascade
|
|
85
|
+
* delete / code-actions / extract-refactor planned). Hosts apply each by
|
|
86
|
+
* id-keyed swap (same path as `updateBlock` / `removeBlock`).
|
|
87
|
+
*
|
|
88
|
+
* - `replaceBlock` — overwrite an existing block's wire content.
|
|
89
|
+
* - `deleteBlock` — remove a block by id.
|
|
90
|
+
* - `insertBlock` — append a new block (after `afterBlockId` if given).
|
|
91
|
+
*/
|
|
92
|
+
export type PolicyEngineEdit =
|
|
93
|
+
| {
|
|
94
|
+
kind: 'replaceBlock';
|
|
95
|
+
policyPath: string;
|
|
96
|
+
blockId: string;
|
|
97
|
+
newBlock: PolicyWireBlock;
|
|
98
|
+
}
|
|
99
|
+
| { kind: 'deleteBlock'; policyPath: string; blockId: string }
|
|
100
|
+
| {
|
|
101
|
+
kind: 'insertBlock';
|
|
102
|
+
policyPath: string;
|
|
103
|
+
afterBlockId?: string;
|
|
104
|
+
newBlock: PolicyWireBlock;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* What kind of usage site a `PolicyReferenceSite` represents.
|
|
109
|
+
*
|
|
110
|
+
* - `expressionRead` — a read in an expression body (assertion condition,
|
|
111
|
+
* decision-table cell, decision-tree statement value).
|
|
112
|
+
* - `writeKey` — an `entity.field` write target (assertion output, DT
|
|
113
|
+
* column head, tree statement key).
|
|
114
|
+
* - `dataModel` — a declaration site in a data-model block (entity name,
|
|
115
|
+
* property name, or relationship/reference target).
|
|
116
|
+
*/
|
|
117
|
+
export type PolicyReferenceKind = 'expressionRead' | 'writeKey' | 'dataModel';
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* One usage site of a `PolicyRenameTarget` in the workspace, returned by
|
|
121
|
+
* `references()`. Carries enough context to navigate to the site or render
|
|
122
|
+
* a "find references" panel.
|
|
123
|
+
*/
|
|
124
|
+
export interface PolicyReferenceSite {
|
|
125
|
+
policyPath: string;
|
|
126
|
+
blockId: string;
|
|
127
|
+
expressionId?: string;
|
|
128
|
+
/** The full original source string this site lives in. */
|
|
129
|
+
source: string;
|
|
130
|
+
/** Character offsets within `source` (LSP-style). */
|
|
131
|
+
span: PolicySpan;
|
|
132
|
+
kind: PolicyReferenceKind;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* One node in the transitive dependency tree returned by `dependencies()`.
|
|
137
|
+
* Each node names a property; `writtenBy` is the block that produces it
|
|
138
|
+
* (absent for inputs — those are leaves). `deps` is the next layer of the
|
|
139
|
+
* dependency tree, recursively. Cycles in the dep graph (cut by the
|
|
140
|
+
* engine's self-edge skip) are protected here too — any revisited node has
|
|
141
|
+
* empty `deps`.
|
|
142
|
+
*/
|
|
143
|
+
export interface PolicyDependencyNode {
|
|
144
|
+
property: string;
|
|
145
|
+
writtenBy?: PolicyPropertyWriter;
|
|
146
|
+
unresolved?: boolean;
|
|
147
|
+
resolvedType: PolicyVariableType;
|
|
148
|
+
deps: PolicyDependencyNode[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface PolicyEvaluationResult {
|
|
152
|
+
output: unknown;
|
|
153
|
+
/** Evaluation duration in microseconds. */
|
|
154
|
+
duration: number;
|
|
155
|
+
trace?: PolicyTrace;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface PolicyTrace {
|
|
159
|
+
engineVersion: string;
|
|
160
|
+
properties: Record<string, unknown>;
|
|
161
|
+
executions: PolicyBlockExecution[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface PolicyBlockExecution {
|
|
165
|
+
blockId: string;
|
|
166
|
+
policyPath?: string;
|
|
167
|
+
instancePath?: string;
|
|
168
|
+
trace: PolicyBlockTrace;
|
|
169
|
+
operandValues?: Record<string, unknown>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface PolicyDecisionTableExtras {
|
|
173
|
+
inputPass: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface PolicyDecisionTreeExtras {
|
|
177
|
+
branchResults: Record<string, boolean>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type PolicyBlockTrace =
|
|
181
|
+
| {
|
|
182
|
+
kind: 'assertion';
|
|
183
|
+
result: boolean;
|
|
184
|
+
conditions: { id: string; result: boolean }[];
|
|
185
|
+
}
|
|
186
|
+
| {
|
|
187
|
+
kind: 'decisionTable';
|
|
188
|
+
matchedRows: number[];
|
|
189
|
+
evaluations: Record<string, unknown>[];
|
|
190
|
+
extras?: PolicyDecisionTableExtras;
|
|
191
|
+
}
|
|
192
|
+
| {
|
|
193
|
+
kind: 'decisionTree';
|
|
194
|
+
path: string[];
|
|
195
|
+
assignments: { statementId: string; property: string; value: unknown }[];
|
|
196
|
+
extras?: PolicyDecisionTreeExtras;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export declare class PolicyWorkspace {
|
|
200
|
+
constructor()
|
|
201
|
+
setPolicy(path: string, document: any): void
|
|
202
|
+
removePolicy(path: string): boolean
|
|
203
|
+
/**
|
|
204
|
+
* Upsert a single block in an existing policy (replace-by-id or append).
|
|
205
|
+
* Errors when the policy does not exist — call `setPolicy` first to
|
|
206
|
+
* create one.
|
|
207
|
+
*/
|
|
208
|
+
updateBlock(req: PolicyUpdateBlockRequest): void
|
|
209
|
+
/**
|
|
210
|
+
* Remove a block from an existing policy by id. Returns `true` when a
|
|
211
|
+
* block was removed, `false` when the policy or block didn't exist.
|
|
212
|
+
*/
|
|
213
|
+
removeBlock(req: PolicyRemoveBlockRequest): boolean
|
|
214
|
+
policyPaths(): Array<string>
|
|
215
|
+
/**
|
|
216
|
+
* `max_diagnostics` caps the returned list (default: 100). Pass `0` for
|
|
217
|
+
* no cap.
|
|
218
|
+
*/
|
|
219
|
+
diagnostics(policyPath: string, maxDiagnostics?: number | undefined | null): Array<PolicyDiagnostic>
|
|
220
|
+
/**
|
|
221
|
+
* `max_diagnostics` caps the returned list (default: 100). Pass `0` for
|
|
222
|
+
* no cap.
|
|
223
|
+
*/
|
|
224
|
+
allDiagnostics(maxDiagnostics?: number | undefined | null): Array<PolicyDiagnostic>
|
|
225
|
+
entities(req: PolicyScopeRequest): Array<PolicyEntityInfo>
|
|
226
|
+
globals(req: PolicyScopeRequest): Array<PolicyGlobalInfo>
|
|
227
|
+
inputs(req: PolicyScopeRequest): Array<PolicyInputProperty>
|
|
228
|
+
outputs(req: PolicyScopeRequest): Array<PolicyOutputProperty>
|
|
229
|
+
inspect(cursor: PolicyExpressionCursor): PolicyInspectResult | null
|
|
230
|
+
completions(cursor: PolicyExpressionCursor): Array<PolicyCompletion>
|
|
231
|
+
prepareRename(cursor: PolicyExpressionCursor): PolicyPrepareRenameResult | null
|
|
232
|
+
/**
|
|
233
|
+
* Returns block-level edits the host applies via id-keyed swap (same
|
|
234
|
+
* path as `update_block`). Each edit's `kind` field discriminates the
|
|
235
|
+
* variant; `replaceBlock` carries a `newBlock` payload that is the
|
|
236
|
+
* rewritten wire-format `BlockDoc`.
|
|
237
|
+
*/
|
|
238
|
+
rename(req: PolicyRenameRequest): PolicyEngineEdit[]
|
|
239
|
+
/**
|
|
240
|
+
* Returns every site in the workspace where `target` is used. Same
|
|
241
|
+
* visitor as `rename`; carries policy/block/expression/source/span/kind
|
|
242
|
+
* for each site so hosts can render a "find references" panel or drive
|
|
243
|
+
* navigation.
|
|
244
|
+
*/
|
|
245
|
+
references(target: any): PolicyReferenceSite[]
|
|
246
|
+
/**
|
|
247
|
+
* Default-valued JSON object that matches the workspace's input shape
|
|
248
|
+
* for `req.policy_path` (and optionally `req.goals`). Hosts use it as
|
|
249
|
+
* the initial value of a "Run simulation" panel so `evaluate` can be
|
|
250
|
+
* called immediately without first authoring an input by hand.
|
|
251
|
+
*/
|
|
252
|
+
inputSkeleton(req: PolicyScopeRequest): unknown
|
|
253
|
+
/**
|
|
254
|
+
* Returns the transitive dependency tree rooted at `target`. Inverse
|
|
255
|
+
* of `references()`. Per-write granularity — multi-output blocks
|
|
256
|
+
* don't conflate sibling outputs' deps.
|
|
257
|
+
*/
|
|
258
|
+
dependencies(target: string): PolicyDependencyNode
|
|
259
|
+
evaluate(req: PolicyEvaluateRequest): PolicyEvaluationResult
|
|
260
|
+
enhanceTrace(req: PolicyEvaluateRequest): PolicyEvaluationResult
|
|
261
|
+
}
|
|
262
|
+
|
|
3
263
|
export declare class ZenDecision {
|
|
4
264
|
constructor()
|
|
5
265
|
evaluate(context: any, opts?: ZenEvaluateOptions | undefined | null): Promise<ZenEngineResponse>
|
|
@@ -19,6 +279,9 @@ export declare class ZenEngine {
|
|
|
19
279
|
getDecision(key: string): Promise<ZenDecision>
|
|
20
280
|
safeEvaluate(key: string, context: any, opts?: ZenEvaluateOptions | undefined | null): Promise<{ success: true, data: ZenEngineResponse } | { success: false; error: any; }>
|
|
21
281
|
safeGetDecision(key: string): Promise<{ success: true, data: ZenDecision } | { success: false; error: any; }>
|
|
282
|
+
evaluateBatch(requests: Array<EvaluateBatchRequest>, opts?: ZenEvaluateOptions | undefined | null): Promise<Array<EvaluateBatchResult>>
|
|
283
|
+
reload(): Promise<void>
|
|
284
|
+
compileFailures(): Array<{ key: string; kind: string; diagnostics?: Array<{ code: string; message: string; severity: string }>; error?: string }>
|
|
22
285
|
dispose(): void
|
|
23
286
|
}
|
|
24
287
|
|
|
@@ -37,6 +300,17 @@ export interface DecisionNode {
|
|
|
37
300
|
config: any
|
|
38
301
|
}
|
|
39
302
|
|
|
303
|
+
export interface EvaluateBatchRequest {
|
|
304
|
+
key: string
|
|
305
|
+
context: any
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface EvaluateBatchResult {
|
|
309
|
+
success: boolean
|
|
310
|
+
data?: any
|
|
311
|
+
error?: any
|
|
312
|
+
}
|
|
313
|
+
|
|
40
314
|
export declare function evaluateExpression(expression: string, context?: any | undefined | null): Promise<any>
|
|
41
315
|
|
|
42
316
|
export declare function evaluateExpressionSync(expression: string, context?: any | undefined | null): any
|
|
@@ -47,6 +321,127 @@ export declare function evaluateUnaryExpressionSync(expression: string, context:
|
|
|
47
321
|
|
|
48
322
|
export declare function overrideConfig(config: ZenConfig): void
|
|
49
323
|
|
|
324
|
+
export interface PolicyCompletion {
|
|
325
|
+
label: string
|
|
326
|
+
kind: string
|
|
327
|
+
detail: string
|
|
328
|
+
info: string
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface PolicyDiagnostic {
|
|
332
|
+
code: PolicyDiagnosticCode
|
|
333
|
+
message: string
|
|
334
|
+
severity: PolicySeverity
|
|
335
|
+
policyPath: string
|
|
336
|
+
blockId?: string
|
|
337
|
+
span?: PolicySpan
|
|
338
|
+
expressionId?: string
|
|
339
|
+
target?: PolicyCursorTarget
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface PolicyEntityFieldInfo {
|
|
343
|
+
name: string
|
|
344
|
+
resolvedType: PolicyVariableType
|
|
345
|
+
origin: PolicyFieldOrigin
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface PolicyEntityInfo {
|
|
349
|
+
name: string
|
|
350
|
+
fields: Array<PolicyEntityFieldInfo>
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface PolicyEvaluateRequest {
|
|
354
|
+
policyPath: string
|
|
355
|
+
input: unknown
|
|
356
|
+
/** Goals to evaluate. Omit or pass empty for full evaluation. */
|
|
357
|
+
goals?: Array<string>
|
|
358
|
+
trace?: boolean
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface PolicyExpressionCursor {
|
|
362
|
+
policyPath: string
|
|
363
|
+
blockId: string
|
|
364
|
+
pos: number
|
|
365
|
+
/**
|
|
366
|
+
* Tagged `{ kind, ...payload }` discriminating what kind of span the
|
|
367
|
+
* cursor sits in. See `PolicyCursorTarget` in the TypeScript types.
|
|
368
|
+
*/
|
|
369
|
+
target: PolicyCursorTarget
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Kept as a `#[napi(object)]` struct purely so NAPI-RS emits the TS type
|
|
374
|
+
* used by `PolicyFieldOrigin.schema.fieldKind`. The runtime shape is
|
|
375
|
+
* hand-built in [`field_kind_to_json`].
|
|
376
|
+
*/
|
|
377
|
+
export interface PolicyFieldKindInfo {
|
|
378
|
+
kind: PolicyFieldKind
|
|
379
|
+
target?: string
|
|
380
|
+
array?: boolean
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export interface PolicyGlobalInfo {
|
|
384
|
+
name: string
|
|
385
|
+
resolvedType: PolicyVariableType
|
|
386
|
+
origin: PolicyFieldOrigin
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export interface PolicyInputProperty {
|
|
390
|
+
path: string
|
|
391
|
+
resolvedType: PolicyVariableType
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export interface PolicyInspectResult {
|
|
395
|
+
span: PolicySpan
|
|
396
|
+
kind: PolicyVariableType
|
|
397
|
+
label: string
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export interface PolicyOutputProperty {
|
|
401
|
+
path: string
|
|
402
|
+
resolvedType: PolicyVariableType
|
|
403
|
+
kind: PolicyPropertyKind
|
|
404
|
+
writtenBy?: PolicyPropertyWriter
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface PolicyPrepareRenameResult {
|
|
408
|
+
target: PolicyRenameTarget
|
|
409
|
+
span: PolicySpan
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface PolicyPropertyWriter {
|
|
413
|
+
policyPath: string
|
|
414
|
+
blockId: string
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface PolicyRemoveBlockRequest {
|
|
418
|
+
policyPath: string
|
|
419
|
+
blockId: string
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface PolicyRenameRequest {
|
|
423
|
+
target: PolicyRenameTarget
|
|
424
|
+
newName: string
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface PolicyScopeRequest {
|
|
428
|
+
policyPath: string
|
|
429
|
+
/**
|
|
430
|
+
* Goals to constrain schema introspection to. Omit or pass empty
|
|
431
|
+
* for everything reachable from the policy.
|
|
432
|
+
*/
|
|
433
|
+
goals?: Array<string>
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export interface PolicyUpdateBlockRequest {
|
|
437
|
+
policyPath: string
|
|
438
|
+
/**
|
|
439
|
+
* A single wire block (same shape as one entry of `PolicyDocument.blocks`).
|
|
440
|
+
* Upserted by `block.id`: replaces in place if present, appends otherwise.
|
|
441
|
+
*/
|
|
442
|
+
block: unknown
|
|
443
|
+
}
|
|
444
|
+
|
|
50
445
|
export declare function renderTemplate(template: string, context: any): Promise<any>
|
|
51
446
|
|
|
52
447
|
export declare function renderTemplateSync(template: string, context: any): any
|
|
@@ -63,9 +458,9 @@ export interface ZenEngineHandlerResponse {
|
|
|
63
458
|
}
|
|
64
459
|
|
|
65
460
|
export interface ZenEngineOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
461
|
+
loader?: ((key: string) => Promise<Buffer | ZenDecisionContent>) | { type: 'static'; content: Record<string, object>; allowFailures?: boolean } | { type: 'fs'; path: string; keepInMemory?: boolean; allowFailures?: boolean } | { type: 'zip'; bytes: Buffer; allowFailures?: boolean }
|
|
462
|
+
customHandler?: (request: ZenEngineHandlerRequest) => Promise<ZenEngineHandlerResponse>
|
|
463
|
+
httpHandler?: (request: ZenHttpHandlerRequest) => Promise<ZenHttpHandlerResponse>
|
|
69
464
|
}
|
|
70
465
|
|
|
71
466
|
export interface ZenEngineResponse {
|
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@gorules/zen-engine-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@gorules/zen-engine-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
80
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@gorules/zen-engine-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@gorules/zen-engine-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
96
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@gorules/zen-engine-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@gorules/zen-engine-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
117
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@gorules/zen-engine-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@gorules/zen-engine-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
133
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@gorules/zen-engine-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@gorules/zen-engine-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@gorules/zen-engine-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@gorules/zen-engine-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
166
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@gorules/zen-engine-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@gorules/zen-engine-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
185
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@gorules/zen-engine-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@gorules/zen-engine-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
201
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@gorules/zen-engine-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@gorules/zen-engine-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
217
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@gorules/zen-engine-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@gorules/zen-engine-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
237
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@gorules/zen-engine-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@gorules/zen-engine-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
253
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@gorules/zen-engine-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
274
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@gorules/zen-engine-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
290
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@gorules/zen-engine-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
308
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@gorules/zen-engine-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
324
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@gorules/zen-engine-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
342
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@gorules/zen-engine-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
358
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@gorules/zen-engine-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
376
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@gorules/zen-engine-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
392
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@gorules/zen-engine-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
410
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@gorules/zen-engine-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
426
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@gorules/zen-engine-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@gorules/zen-engine-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@gorules/zen-engine-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@gorules/zen-engine-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@gorules/zen-engine-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
479
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@gorules/zen-engine-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@gorules/zen-engine-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
495
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@gorules/zen-engine-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@gorules/zen-engine-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
511
|
+
if (bindingPackageVersion !== '0.54.121' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.54.121 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -572,6 +572,7 @@ if (!nativeBinding) {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
module.exports = nativeBinding
|
|
575
|
+
module.exports.PolicyWorkspace = nativeBinding.PolicyWorkspace
|
|
575
576
|
module.exports.ZenDecision = nativeBinding.ZenDecision
|
|
576
577
|
module.exports.ZenDecisionContent = nativeBinding.ZenDecisionContent
|
|
577
578
|
module.exports.ZenEngine = nativeBinding.ZenEngine
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gorules/zen-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"aarch64-apple-darwin",
|
|
26
26
|
"wasm32-wasi-preview1-threads"
|
|
27
27
|
],
|
|
28
|
+
"dtsHeaderFile": "./dts-header.d.ts",
|
|
28
29
|
"npmClient": "yarn",
|
|
29
30
|
"wasm": {
|
|
30
31
|
"browser": {
|
|
@@ -96,15 +97,14 @@
|
|
|
96
97
|
"resolutions": {
|
|
97
98
|
"form-data@^4.0.0": "4.0.4"
|
|
98
99
|
},
|
|
99
|
-
"gitHead": "99fa17565fdc6bbaab2cfd9dbb743ba0141cb627",
|
|
100
100
|
"optionalDependencies": {
|
|
101
|
-
"@gorules/zen-engine-darwin-x64": "0.
|
|
102
|
-
"@gorules/zen-engine-linux-x64-gnu": "0.
|
|
103
|
-
"@gorules/zen-engine-linux-x64-musl": "0.
|
|
104
|
-
"@gorules/zen-engine-win32-x64-msvc": "0.
|
|
105
|
-
"@gorules/zen-engine-linux-arm64-gnu": "0.
|
|
106
|
-
"@gorules/zen-engine-linux-arm64-musl": "0.
|
|
107
|
-
"@gorules/zen-engine-darwin-arm64": "0.
|
|
108
|
-
"@gorules/zen-engine-wasm32-wasi": "0.
|
|
101
|
+
"@gorules/zen-engine-darwin-x64": "0.55.0-beta.0",
|
|
102
|
+
"@gorules/zen-engine-linux-x64-gnu": "0.55.0-beta.0",
|
|
103
|
+
"@gorules/zen-engine-linux-x64-musl": "0.55.0-beta.0",
|
|
104
|
+
"@gorules/zen-engine-win32-x64-msvc": "0.55.0-beta.0",
|
|
105
|
+
"@gorules/zen-engine-linux-arm64-gnu": "0.55.0-beta.0",
|
|
106
|
+
"@gorules/zen-engine-linux-arm64-musl": "0.55.0-beta.0",
|
|
107
|
+
"@gorules/zen-engine-darwin-arm64": "0.55.0-beta.0",
|
|
108
|
+
"@gorules/zen-engine-wasm32-wasi": "0.55.0-beta.0"
|
|
109
109
|
}
|
|
110
110
|
}
|