@gorules/zen-engine 0.55.0-beta.0 → 0.55.0-beta.2

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.
Files changed (4) hide show
  1. package/browser.js +1 -1
  2. package/index.d.ts +61 -11
  3. package/index.js +105 -105
  4. package/package.json +9 -9
package/browser.js CHANGED
@@ -1 +1 @@
1
- export * from '@gorules/zen-engine-wasm32-wasi'
1
+ export * from '@goruleslocal/zen-engine-wasm32-wasi'
package/index.d.ts CHANGED
@@ -18,7 +18,9 @@ export type PolicyRenameTarget =
18
18
  export type PolicyCursorTarget =
19
19
  | { kind: 'expression'; id: string }
20
20
  | { kind: 'assertionOutput' }
21
- | { kind: 'decisionTreeStatementKey'; id: string }
21
+ | { kind: 'expressionKey' }
22
+ | { kind: 'matchTarget' }
23
+ | { kind: 'matchValue'; id: string }
22
24
  | { kind: 'decisionTableHead'; col: string }
23
25
  | { kind: 'decisionTableCell'; row: string; col: string }
24
26
  | { kind: 'dataModelName' }
@@ -149,10 +151,19 @@ export interface PolicyDependencyNode {
149
151
  }
150
152
 
151
153
  export interface PolicyEvaluationResult {
152
- output: unknown;
154
+ output?: unknown;
153
155
  /** Evaluation duration in microseconds. */
154
- duration: number;
156
+ duration?: number;
155
157
  trace?: PolicyTrace;
158
+ /** Present when a block failed mid-evaluation; `trace` then holds the partial trace up to the failure. */
159
+ error?: PolicyEvaluationFailure;
160
+ }
161
+
162
+ export interface PolicyEvaluationFailure {
163
+ policyPath: string;
164
+ blockId: string;
165
+ expression: string;
166
+ message: string;
156
167
  }
157
168
 
158
169
  export interface PolicyTrace {
@@ -173,10 +184,6 @@ export interface PolicyDecisionTableExtras {
173
184
  inputPass: string;
174
185
  }
175
186
 
176
- export interface PolicyDecisionTreeExtras {
177
- branchResults: Record<string, boolean>;
178
- }
179
-
180
187
  export type PolicyBlockTrace =
181
188
  | {
182
189
  kind: 'assertion';
@@ -190,10 +197,15 @@ export type PolicyBlockTrace =
190
197
  extras?: PolicyDecisionTableExtras;
191
198
  }
192
199
  | {
193
- kind: 'decisionTree';
194
- path: string[];
195
- assignments: { statementId: string; property: string; value: unknown }[];
196
- extras?: PolicyDecisionTreeExtras;
200
+ kind: 'expression';
201
+ property: string;
202
+ value: unknown;
203
+ }
204
+ | {
205
+ kind: 'match';
206
+ matchedArm?: string;
207
+ value: unknown;
208
+ arms: { id: string; result: boolean }[];
197
209
  };
198
210
 
199
211
  export declare class PolicyWorkspace {
@@ -226,6 +238,7 @@ export declare class PolicyWorkspace {
226
238
  globals(req: PolicyScopeRequest): Array<PolicyGlobalInfo>
227
239
  inputs(req: PolicyScopeRequest): Array<PolicyInputProperty>
228
240
  outputs(req: PolicyScopeRequest): Array<PolicyOutputProperty>
241
+ conditionalSchema(req: PolicyScopeRequest): PolicyConditionalSchema
229
242
  inspect(cursor: PolicyExpressionCursor): PolicyInspectResult | null
230
243
  completions(cursor: PolicyExpressionCursor): Array<PolicyCompletion>
231
244
  prepareRename(cursor: PolicyExpressionCursor): PolicyPrepareRenameResult | null
@@ -258,6 +271,8 @@ export declare class PolicyWorkspace {
258
271
  dependencies(target: string): PolicyDependencyNode
259
272
  evaluate(req: PolicyEvaluateRequest): PolicyEvaluationResult
260
273
  enhanceTrace(req: PolicyEvaluateRequest): PolicyEvaluationResult
274
+ componentMembers(policy: string): Array<string>
275
+ crossComponentWriteConflicts(): Array<PolicyWriteConflict>
261
276
  }
262
277
 
263
278
  export declare class ZenDecision {
@@ -328,6 +343,13 @@ export interface PolicyCompletion {
328
343
  info: string
329
344
  }
330
345
 
346
+ export interface PolicyConditionalSchema {
347
+ kind: "union" | "flat"
348
+ common: PolicySchemaGroup
349
+ union?: PolicyDiscriminatedUnion
350
+ conditional?: PolicySchemaGroup
351
+ }
352
+
331
353
  export interface PolicyDiagnostic {
332
354
  code: PolicyDiagnosticCode
333
355
  message: string
@@ -339,6 +361,18 @@ export interface PolicyDiagnostic {
339
361
  target?: PolicyCursorTarget
340
362
  }
341
363
 
364
+ export interface PolicyDiscriminantVariant {
365
+ value?: string
366
+ arm: string
367
+ group: PolicySchemaGroup
368
+ }
369
+
370
+ export interface PolicyDiscriminatedUnion {
371
+ property: string
372
+ resolvedType: PolicyVariableType
373
+ variants: Array<PolicyDiscriminantVariant>
374
+ }
375
+
342
376
  export interface PolicyEntityFieldInfo {
343
377
  name: string
344
378
  resolvedType: PolicyVariableType
@@ -386,6 +420,12 @@ export interface PolicyGlobalInfo {
386
420
  origin: PolicyFieldOrigin
387
421
  }
388
422
 
423
+ export interface PolicyGuardedProperty {
424
+ path: string
425
+ resolvedType: PolicyVariableType
426
+ requiredWhen?: string
427
+ }
428
+
389
429
  export interface PolicyInputProperty {
390
430
  path: string
391
431
  resolvedType: PolicyVariableType
@@ -424,6 +464,11 @@ export interface PolicyRenameRequest {
424
464
  newName: string
425
465
  }
426
466
 
467
+ export interface PolicySchemaGroup {
468
+ inputs: Array<PolicyGuardedProperty>
469
+ outputs: Array<PolicyGuardedProperty>
470
+ }
471
+
427
472
  export interface PolicyScopeRequest {
428
473
  policyPath: string
429
474
  /**
@@ -442,6 +487,11 @@ export interface PolicyUpdateBlockRequest {
442
487
  block: unknown
443
488
  }
444
489
 
490
+ export interface PolicyWriteConflict {
491
+ path: string
492
+ policies: Array<string>
493
+ }
494
+
445
495
  export declare function renderTemplate(template: string, context: any): Promise<any>
446
496
 
447
497
  export declare function renderTemplateSync(template: string, context: any): any
package/index.js CHANGED
@@ -75,10 +75,10 @@ function requireNative() {
75
75
  loadErrors.push(e)
76
76
  }
77
77
  try {
78
- const binding = require('@gorules/zen-engine-android-arm64')
79
- const bindingPackageVersion = require('@gorules/zen-engine-android-arm64/package.json').version
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.`)
78
+ const binding = require('@goruleslocal/zen-engine-android-arm64')
79
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-android-arm64/package.json').version
80
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -91,10 +91,10 @@ function requireNative() {
91
91
  loadErrors.push(e)
92
92
  }
93
93
  try {
94
- const binding = require('@gorules/zen-engine-android-arm-eabi')
95
- const bindingPackageVersion = require('@gorules/zen-engine-android-arm-eabi/package.json').version
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.`)
94
+ const binding = require('@goruleslocal/zen-engine-android-arm-eabi')
95
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-android-arm-eabi/package.json').version
96
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -112,10 +112,10 @@ function requireNative() {
112
112
  loadErrors.push(e)
113
113
  }
114
114
  try {
115
- const binding = require('@gorules/zen-engine-win32-x64-gnu')
116
- const bindingPackageVersion = require('@gorules/zen-engine-win32-x64-gnu/package.json').version
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.`)
115
+ const binding = require('@goruleslocal/zen-engine-win32-x64-gnu')
116
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-win32-x64-gnu/package.json').version
117
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -128,10 +128,10 @@ function requireNative() {
128
128
  loadErrors.push(e)
129
129
  }
130
130
  try {
131
- const binding = require('@gorules/zen-engine-win32-x64-msvc')
132
- const bindingPackageVersion = require('@gorules/zen-engine-win32-x64-msvc/package.json').version
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.`)
131
+ const binding = require('@goruleslocal/zen-engine-win32-x64-msvc')
132
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-win32-x64-msvc/package.json').version
133
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -145,10 +145,10 @@ function requireNative() {
145
145
  loadErrors.push(e)
146
146
  }
147
147
  try {
148
- const binding = require('@gorules/zen-engine-win32-ia32-msvc')
149
- const bindingPackageVersion = require('@gorules/zen-engine-win32-ia32-msvc/package.json').version
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.`)
148
+ const binding = require('@goruleslocal/zen-engine-win32-ia32-msvc')
149
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-win32-ia32-msvc/package.json').version
150
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -161,10 +161,10 @@ function requireNative() {
161
161
  loadErrors.push(e)
162
162
  }
163
163
  try {
164
- const binding = require('@gorules/zen-engine-win32-arm64-msvc')
165
- const bindingPackageVersion = require('@gorules/zen-engine-win32-arm64-msvc/package.json').version
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.`)
164
+ const binding = require('@goruleslocal/zen-engine-win32-arm64-msvc')
165
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-win32-arm64-msvc/package.json').version
166
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -180,10 +180,10 @@ function requireNative() {
180
180
  loadErrors.push(e)
181
181
  }
182
182
  try {
183
- const binding = require('@gorules/zen-engine-darwin-universal')
184
- const bindingPackageVersion = require('@gorules/zen-engine-darwin-universal/package.json').version
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.`)
183
+ const binding = require('@goruleslocal/zen-engine-darwin-universal')
184
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-darwin-universal/package.json').version
185
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -196,10 +196,10 @@ function requireNative() {
196
196
  loadErrors.push(e)
197
197
  }
198
198
  try {
199
- const binding = require('@gorules/zen-engine-darwin-x64')
200
- const bindingPackageVersion = require('@gorules/zen-engine-darwin-x64/package.json').version
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.`)
199
+ const binding = require('@goruleslocal/zen-engine-darwin-x64')
200
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-darwin-x64/package.json').version
201
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -212,10 +212,10 @@ function requireNative() {
212
212
  loadErrors.push(e)
213
213
  }
214
214
  try {
215
- const binding = require('@gorules/zen-engine-darwin-arm64')
216
- const bindingPackageVersion = require('@gorules/zen-engine-darwin-arm64/package.json').version
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.`)
215
+ const binding = require('@goruleslocal/zen-engine-darwin-arm64')
216
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-darwin-arm64/package.json').version
217
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -232,10 +232,10 @@ function requireNative() {
232
232
  loadErrors.push(e)
233
233
  }
234
234
  try {
235
- const binding = require('@gorules/zen-engine-freebsd-x64')
236
- const bindingPackageVersion = require('@gorules/zen-engine-freebsd-x64/package.json').version
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.`)
235
+ const binding = require('@goruleslocal/zen-engine-freebsd-x64')
236
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-freebsd-x64/package.json').version
237
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -248,10 +248,10 @@ function requireNative() {
248
248
  loadErrors.push(e)
249
249
  }
250
250
  try {
251
- const binding = require('@gorules/zen-engine-freebsd-arm64')
252
- const bindingPackageVersion = require('@gorules/zen-engine-freebsd-arm64/package.json').version
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.`)
251
+ const binding = require('@goruleslocal/zen-engine-freebsd-arm64')
252
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-freebsd-arm64/package.json').version
253
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -269,10 +269,10 @@ function requireNative() {
269
269
  loadErrors.push(e)
270
270
  }
271
271
  try {
272
- const binding = require('@gorules/zen-engine-linux-x64-musl')
273
- const bindingPackageVersion = require('@gorules/zen-engine-linux-x64-musl/package.json').version
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.`)
272
+ const binding = require('@goruleslocal/zen-engine-linux-x64-musl')
273
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-x64-musl/package.json').version
274
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -285,10 +285,10 @@ function requireNative() {
285
285
  loadErrors.push(e)
286
286
  }
287
287
  try {
288
- const binding = require('@gorules/zen-engine-linux-x64-gnu')
289
- const bindingPackageVersion = require('@gorules/zen-engine-linux-x64-gnu/package.json').version
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.`)
288
+ const binding = require('@goruleslocal/zen-engine-linux-x64-gnu')
289
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-x64-gnu/package.json').version
290
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -303,10 +303,10 @@ function requireNative() {
303
303
  loadErrors.push(e)
304
304
  }
305
305
  try {
306
- const binding = require('@gorules/zen-engine-linux-arm64-musl')
307
- const bindingPackageVersion = require('@gorules/zen-engine-linux-arm64-musl/package.json').version
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.`)
306
+ const binding = require('@goruleslocal/zen-engine-linux-arm64-musl')
307
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-arm64-musl/package.json').version
308
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -319,10 +319,10 @@ function requireNative() {
319
319
  loadErrors.push(e)
320
320
  }
321
321
  try {
322
- const binding = require('@gorules/zen-engine-linux-arm64-gnu')
323
- const bindingPackageVersion = require('@gorules/zen-engine-linux-arm64-gnu/package.json').version
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.`)
322
+ const binding = require('@goruleslocal/zen-engine-linux-arm64-gnu')
323
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-arm64-gnu/package.json').version
324
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -337,10 +337,10 @@ function requireNative() {
337
337
  loadErrors.push(e)
338
338
  }
339
339
  try {
340
- const binding = require('@gorules/zen-engine-linux-arm-musleabihf')
341
- const bindingPackageVersion = require('@gorules/zen-engine-linux-arm-musleabihf/package.json').version
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.`)
340
+ const binding = require('@goruleslocal/zen-engine-linux-arm-musleabihf')
341
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-arm-musleabihf/package.json').version
342
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -353,10 +353,10 @@ function requireNative() {
353
353
  loadErrors.push(e)
354
354
  }
355
355
  try {
356
- const binding = require('@gorules/zen-engine-linux-arm-gnueabihf')
357
- const bindingPackageVersion = require('@gorules/zen-engine-linux-arm-gnueabihf/package.json').version
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.`)
356
+ const binding = require('@goruleslocal/zen-engine-linux-arm-gnueabihf')
357
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-arm-gnueabihf/package.json').version
358
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -371,10 +371,10 @@ function requireNative() {
371
371
  loadErrors.push(e)
372
372
  }
373
373
  try {
374
- const binding = require('@gorules/zen-engine-linux-loong64-musl')
375
- const bindingPackageVersion = require('@gorules/zen-engine-linux-loong64-musl/package.json').version
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.`)
374
+ const binding = require('@goruleslocal/zen-engine-linux-loong64-musl')
375
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-loong64-musl/package.json').version
376
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -387,10 +387,10 @@ function requireNative() {
387
387
  loadErrors.push(e)
388
388
  }
389
389
  try {
390
- const binding = require('@gorules/zen-engine-linux-loong64-gnu')
391
- const bindingPackageVersion = require('@gorules/zen-engine-linux-loong64-gnu/package.json').version
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.`)
390
+ const binding = require('@goruleslocal/zen-engine-linux-loong64-gnu')
391
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-loong64-gnu/package.json').version
392
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -405,10 +405,10 @@ function requireNative() {
405
405
  loadErrors.push(e)
406
406
  }
407
407
  try {
408
- const binding = require('@gorules/zen-engine-linux-riscv64-musl')
409
- const bindingPackageVersion = require('@gorules/zen-engine-linux-riscv64-musl/package.json').version
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.`)
408
+ const binding = require('@goruleslocal/zen-engine-linux-riscv64-musl')
409
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-riscv64-musl/package.json').version
410
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -421,10 +421,10 @@ function requireNative() {
421
421
  loadErrors.push(e)
422
422
  }
423
423
  try {
424
- const binding = require('@gorules/zen-engine-linux-riscv64-gnu')
425
- const bindingPackageVersion = require('@gorules/zen-engine-linux-riscv64-gnu/package.json').version
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.`)
424
+ const binding = require('@goruleslocal/zen-engine-linux-riscv64-gnu')
425
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-riscv64-gnu/package.json').version
426
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -438,10 +438,10 @@ function requireNative() {
438
438
  loadErrors.push(e)
439
439
  }
440
440
  try {
441
- const binding = require('@gorules/zen-engine-linux-ppc64-gnu')
442
- const bindingPackageVersion = require('@gorules/zen-engine-linux-ppc64-gnu/package.json').version
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.`)
441
+ const binding = require('@goruleslocal/zen-engine-linux-ppc64-gnu')
442
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-ppc64-gnu/package.json').version
443
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -454,10 +454,10 @@ function requireNative() {
454
454
  loadErrors.push(e)
455
455
  }
456
456
  try {
457
- const binding = require('@gorules/zen-engine-linux-s390x-gnu')
458
- const bindingPackageVersion = require('@gorules/zen-engine-linux-s390x-gnu/package.json').version
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.`)
457
+ const binding = require('@goruleslocal/zen-engine-linux-s390x-gnu')
458
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-linux-s390x-gnu/package.json').version
459
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -474,10 +474,10 @@ function requireNative() {
474
474
  loadErrors.push(e)
475
475
  }
476
476
  try {
477
- const binding = require('@gorules/zen-engine-openharmony-arm64')
478
- const bindingPackageVersion = require('@gorules/zen-engine-openharmony-arm64/package.json').version
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.`)
477
+ const binding = require('@goruleslocal/zen-engine-openharmony-arm64')
478
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-openharmony-arm64/package.json').version
479
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -490,10 +490,10 @@ function requireNative() {
490
490
  loadErrors.push(e)
491
491
  }
492
492
  try {
493
- const binding = require('@gorules/zen-engine-openharmony-x64')
494
- const bindingPackageVersion = require('@gorules/zen-engine-openharmony-x64/package.json').version
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.`)
493
+ const binding = require('@goruleslocal/zen-engine-openharmony-x64')
494
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-openharmony-x64/package.json').version
495
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -506,10 +506,10 @@ function requireNative() {
506
506
  loadErrors.push(e)
507
507
  }
508
508
  try {
509
- const binding = require('@gorules/zen-engine-openharmony-arm')
510
- const bindingPackageVersion = require('@gorules/zen-engine-openharmony-arm/package.json').version
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.`)
509
+ const binding = require('@goruleslocal/zen-engine-openharmony-arm')
510
+ const bindingPackageVersion = require('@goruleslocal/zen-engine-openharmony-arm/package.json').version
511
+ if (bindingPackageVersion !== '0.55.5' && 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.55.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -538,7 +538,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
538
538
  }
539
539
  if (!nativeBinding) {
540
540
  try {
541
- wasiBinding = require('@gorules/zen-engine-wasm32-wasi')
541
+ wasiBinding = require('@goruleslocal/zen-engine-wasm32-wasi')
542
542
  nativeBinding = wasiBinding
543
543
  } catch (err) {
544
544
  if (process.env.NAPI_RS_FORCE_WASI) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gorules/zen-engine",
3
- "version": "0.55.0-beta.0",
3
+ "version": "0.55.0-beta.2",
4
4
  "main": "index.js",
5
5
  "browser": "browser.js",
6
6
  "types": "./index.d.ts",
@@ -98,13 +98,13 @@
98
98
  "form-data@^4.0.0": "4.0.4"
99
99
  },
100
100
  "optionalDependencies": {
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"
101
+ "@gorules/zen-engine-darwin-x64": "0.55.0-beta.2",
102
+ "@gorules/zen-engine-linux-x64-gnu": "0.55.0-beta.2",
103
+ "@gorules/zen-engine-linux-x64-musl": "0.55.0-beta.2",
104
+ "@gorules/zen-engine-win32-x64-msvc": "0.55.0-beta.2",
105
+ "@gorules/zen-engine-linux-arm64-gnu": "0.55.0-beta.2",
106
+ "@gorules/zen-engine-linux-arm64-musl": "0.55.0-beta.2",
107
+ "@gorules/zen-engine-darwin-arm64": "0.55.0-beta.2",
108
+ "@gorules/zen-engine-wasm32-wasi": "0.55.0-beta.2"
109
109
  }
110
110
  }