@axiapps/axilog 0.3.2 → 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.
Files changed (5) hide show
  1. package/README.md +169 -21
  2. package/index.d.ts +37 -18
  3. package/index.js +54 -54
  4. package/package.json +6 -6
  5. package/types.d.ts +1281 -0
package/README.md CHANGED
@@ -17,24 +17,149 @@ const { parseFile, parseBuffer, parseFileEi, anonymizeFile } = require('@axiapps
17
17
  ```ts
18
18
  // ESM / TypeScript
19
19
  import { parseFile, parseBuffer, parseFileEi, anonymizeFile } from '@axiapps/axilog'
20
- import type { Report } from '@axiapps/axilog/types'
20
+ import type { ReportV1 } from '@axiapps/axilog/types'
21
21
  ```
22
22
 
23
+ `parseFile`/`parseBuffer` return the **native 1.0 container** (`schema:
24
+ "1.0"`). Its six top-level keys are always present:
25
+
26
+ | Key | What it is |
27
+ | --- | --- |
28
+ | `axilog` | `{ schema, version, generated_from }` — format contract version, the binary that produced the document, and the input log's file *name* |
29
+ | `encounter` | One object: `kind`, `map`, `duration_ms`, `teams[]`, `markers[]`, `objectives[]`, `recorded_by`, … |
30
+ | `entities` | The single roster — every tracked agent, identity only, no statistics |
31
+ | `catalogs` | `skills`/`buffs`/`damage_mods`/`minions` metadata, referenced by id from `blocks` |
32
+ | `blocks` | Id-keyed statistics maps — `damage`, `defenses`, `boons`, `support`, … |
33
+ | `coverage` | Per-block status: `present`, `empty`, `not_computed` or `unsupported` |
34
+
35
+ A seventh key, `warnings`, appears only when non-empty.
36
+
37
+ There is **no top-level `players[]` and no `schema_version`**. The roster is
38
+ `entities[]`, and every per-entity statistic is a `blocks.<name>.by_entity`
39
+ map keyed by `entities[].id`. Those keys are JSON object keys, so they are
40
+ strings — `by_entity[entity.id]` happens to work in JS because the numeric
41
+ id coerces on lookup, but `Object.keys(by_entity)` gives you strings, so
42
+ compare accordingly.
43
+
23
44
  ```js
24
- // Native report (axilog_schema::Report — schema_version, encounter,
25
- // players[], enemies[], timeline, warnings), typed as `Report` (see
26
- // "Types" below).
45
+ const { parseFile } = require('@axiapps/axilog')
46
+
27
47
  const report = parseFile('./fight.zevtc')
28
- console.log(report.schema_version, report.players.length)
48
+
49
+ console.log(report.axilog)
50
+ // { generated_from: 'wvw-small.anon.zevtc', schema: '1.0', version: '0.3.2' }
51
+
52
+ console.log(report.encounter.map, report.encounter.duration_ms)
53
+ // Green Alpine Borderlands 49285
54
+
55
+ // The roster is filtered by `role`, not by a separate list. WvW logs carry
56
+ // four: 'squad', 'friendly_player', 'enemy_player' and 'npc'.
57
+ const squad = report.entities.filter((e) => e.role === 'squad')
58
+ const damage = report.blocks.damage
59
+ console.log(squad.length, 'squad of', report.entities.length, '| squad damage', damage.squad.total)
60
+ // 38 squad of 122 | squad damage 2138414
61
+
62
+ const top = squad
63
+ .map((e) => [e, damage.by_entity[e.id]])
64
+ .sort((a, b) => b[1].total - a[1].total)[0]
65
+ console.log(top[0].account, top[0].profession, top[1].total, top[1].dps)
66
+ // :Anon104.4848 Engineer 205612 4171.898143451354
29
67
 
30
68
  // Same pipeline, from an already-read Buffer.
31
69
  const fs = require('fs')
32
70
  const reportFromBuffer = parseBuffer(fs.readFileSync('./fight.zevtc'))
71
+ ```
72
+
73
+ Buff and skill names live once in `catalogs`, never repeated per entity —
74
+ `blocks.boons.by_entity[id]` is keyed by buff id, and
75
+ `catalogs.buffs['1187'].name` resolves it to `Quickness`.
76
+
77
+ ### Check `coverage` before reading a block
78
+
79
+ `coverage` is how a consumer tells "the option was off" apart from "the log
80
+ had nothing to say", which is otherwise indistinguishable — both look like
81
+ a missing block.
82
+
83
+ ```js
84
+ console.log(report.coverage.rotation, report.coverage.damage_mods)
85
+ // empty not_computed
86
+ ```
87
+
88
+ | Value | Meaning | What to do |
89
+ | --- | --- | --- |
90
+ | `present` | Computed, has rows | Read it |
91
+ | `empty` | Computed, genuinely nothing to report | Treat as zero rows, not an error. The block is still carried in `blocks` |
92
+ | `not_computed` | The gate for it was off | Re-parse with the option on. Do **not** report this as "the log had none" |
93
+ | `unsupported` | This log cannot produce it — its era, encounter kind, or recorder | Do not retry with an option; see `docs/EI-PARITY.md` |
33
94
 
95
+ ### Opt-in options
96
+
97
+ `ParseOptions` is an optional second argument to `parseFile`, `parseBuffer`
98
+ and `parseFileEi`. Seven booleans, all `false` by default, in **camelCase**:
99
+
100
+ | Option | Adds |
101
+ | --- | --- |
102
+ | `skillDamage` | `blocks.damage.by_entity[].by_skill` / `.by_skill_taken` — per-skill outgoing and incoming splits |
103
+ | `timeseries` | `blocks.series` per-entity channels, and the buff stack timelines in `blocks.boons`/`blocks.conditions` |
104
+ | `rotation` | `blocks.rotation.by_entity[].{casts, aftercast}` |
105
+ | `replay` | `blocks.replay.tracks` — position samples. The down/dead intervals under `blocks.replay.by_entity` are computed on **every** parse; only the positions are gated |
106
+ | `missiles` | `blocks.missiles` — projectile fired/hit/denied counts |
107
+ | `modifiers` | `blocks.damage_mods` and `catalogs.damage_mods` |
108
+ | `everything` | Every analysis pass **this version** knows about |
109
+
110
+ ```js
111
+ const full = parseFile('./fight.zevtc', { skillDamage: true, rotation: true })
112
+
113
+ console.log(Object.keys(full.blocks.damage.by_entity['1']).sort())
114
+ // [ 'breakbar_damage_dealt', 'by_skill', 'by_skill_taken', 'downs_dealt',
115
+ // 'dps', 'kills_dealt', 'per_target', 'taken', 'total' ]
116
+ ```
117
+
118
+ Note the asymmetry: the *options* object is camelCase (`skillDamage`),
119
+ while the *report* keys are the schema's own snake_case (`skill_damage`,
120
+ `by_skill_taken`). The options are a napi-generated JS surface; the report
121
+ is the native JSON verbatim.
122
+
123
+ Prefer `everything: true` over enumerating options if you want complete
124
+ documents: it is defined as "everything that exists in this version", so a
125
+ pass added by a later release is included automatically. The first axibridge
126
+ cutover audit found 30 blank fields caused by exactly the opposite — a
127
+ consumer's option list drifting from the parser's. It is a union with the
128
+ individual options, never an override.
129
+
130
+ Options are not free, and they are not uniformly the same kind of cost.
131
+ `skillDamage`, `timeseries` and `rotation` only control whether an
132
+ already-computed result is serialized; `replay` and `modifiers` gate the
133
+ computation itself. Measured on the committed fixture
134
+ (`fixtures/wvw-small.anon.zevtc` — 38 squad entities, 49.3 s — release
135
+ build, compact JSON, 461,086-byte baseline at 0.07 s):
136
+
137
+ | Option | Bytes | Wall |
138
+ | --- | --- | --- |
139
+ | *(none)* | 461,086 | 0.07 s |
140
+ | `missiles` | 466,565 | 0.07 s |
141
+ | `rotation` | 708,367 | 0.07 s |
142
+ | `modifiers` | 616,591 | 0.08 s |
143
+ | `replay` | 1,679,284 | 0.12 s |
144
+ | `skillDamage` | 3,338,819 | 0.08 s |
145
+ | `timeseries` | 3,563,403 | 0.09 s |
146
+ | `everything` | 8,067,599 | 0.16 s |
147
+
148
+ That fixture is a 49-second skirmish. The per-skill and per-second blocks
149
+ are combinatorial — entity × target × skill and entity × target × second —
150
+ so on a real multi-minute zerg log they grow far faster than the table
151
+ above suggests. See `docs/BENCHMARKS.md` for real-log numbers.
152
+
153
+ ### The other two functions
154
+
155
+ ```js
34
156
  // Elite Insights-compatibility JSON (axilog_ei::to_ei_json) — the shape
35
157
  // axibridge-style consumers read (players[].account, dpsAll[0].damage,
36
158
  // support[0].condiCleanse, buffUptimes[], targets[].enemyPlayer,
37
159
  // wvWMapData.{red,blue,green}TeamID). Untyped (`any`) — see "Types" below.
160
+ // Unlike the native container this one does still have a flat `players[]`,
161
+ // because EI's shape does. It takes the same ParseOptions, except
162
+ // `missiles`, which has no EI equivalent and is ignored.
38
163
  const ei = parseFileEi('./fight.zevtc')
39
164
 
40
165
  // Rewrite every player's character/account name in a .zevtc to a
@@ -47,6 +172,14 @@ const rewritten = anonymizeFile('./fight.zevtc', './fight.anon.zevtc')
47
172
  All four functions throw a plain `Error` (never a raw Rust panic) on
48
173
  failure — e.g. a missing file, a corrupt/unsupported `.evtc`.
49
174
 
175
+ ### Further reference
176
+
177
+ `docs/NATIVE-FORMAT.md` in the repo root is the authoritative field-level
178
+ reference for the 1.0 container — the `entities[].role` rules, the catalog
179
+ join semantics, the series RLE envelope, the two replay halves, and the 1.x
180
+ compatibility rules a consumer can rely on. This README is the SDK surface;
181
+ that document is the format.
182
+
50
183
  ## Build
51
184
 
52
185
  ```sh
@@ -68,17 +201,29 @@ committed PII-safe fixture `fixtures/wvw-small.anon.zevtc` (repo-root
68
201
  relative, resolved from the test file's own location so it works from any
69
202
  cwd):
70
203
 
71
- - `parseFile`: `schema_version`, player count, squad damage total, one
72
- boon uptime value, and the four support-stat squad sums — all pinned to
73
- this fixture's exact calibrated values (see
204
+ - `parseFile`: the six-key container shape, player count, squad damage
205
+ total, one boon uptime value, and the four support-stat squad sums — all
206
+ pinned to this fixture's exact calibrated values (see
74
207
  `crates/axilog-core/tests/golden.rs`/`support_golden.rs` for how those
75
208
  numbers were derived against a real dps.report EI export).
76
209
  - `parseBuffer` deep-equals `parseFile`.
210
+ - `replay`, `skillDamage`, `timeseries`, `missiles` and `modifiers`: absent
211
+ by default, present and correctly shaped when requested, and absent again
212
+ when passed explicitly `false`. `replay`'s test additionally pins the
213
+ split halves — intervals always on, `tracks` gated. **`rotation` has no
214
+ such test** — in either SDK. Its shape and size are guarded schema-side
215
+ (`crates/axilog-schema/tests/v1_shape.rs`'s keyset golden and
216
+ `v1_size.rs`, both of which drive every gate), and the option is
217
+ exercised here through `{ everything: true }`, but there is no
218
+ absent-by-default/present-when-requested assertion for it at the SDK
219
+ boundary. Known gap.
220
+ - `{ everything: true }`: every gate computes, leaving nothing
221
+ `not_computed` in `coverage`.
77
222
  - `parseFileEi`: the specific keys axibridge-style consumers read
78
223
  (`players[].account`, `dpsAll[0].damage`, `support[0].condiCleanse`,
79
224
  non-empty `buffUptimes`, `targets[].enemyPlayer` booleans,
80
225
  `wvWMapData`'s three team ids).
81
- - `anonymizeFile` round-trip: writes to a tmpdir, re-parses, checks player
226
+ - `anonymizeFile` round-trip: writes to a tmpdir, re-parses, checks entity
82
227
  count/metrics are unchanged (anonymization only rewrites names).
83
228
  - Missing-file error path: throws a real `Error` with a non-empty message.
84
229
  - **Dual-path parity**: builds nothing itself, but shells out to the
@@ -101,19 +246,22 @@ the actual JSON shape and can only emit `any` for `parseFile`/
101
246
  To close that gap without hand-editing a generated file (which `napi
102
247
  build` would silently overwrite), this crate adds:
103
248
 
104
- - **`types.d.ts`** — a hand-maintained transcription of
105
- `axilog_schema::Report` (`crates/axilog-schema/src/lib.rs`, the serde
106
- struct definitions are the source of truth — keep this file in sync with
107
- that one if the schema changes).
249
+ - **`types.d.ts`** — a hand-maintained transcription of the serialized
250
+ shape. The 1.0 container's interfaces (`ReportV1`, `AxilogMeta`,
251
+ `EncounterOutV1`, `EntityOut`, `Catalogs`, `Coverage`, `SeriesOut` and
252
+ friends) are transcribed from `crates/axilog-schema/src/v1/`, which is the
253
+ source of truth — keep this file in sync with it if the schema changes.
254
+ It mirrors `crates/axilog-py/axilog.pyi`'s equivalent transcription for
255
+ the Python SDK.
108
256
  - **`scripts/patch-dts.mjs`** — a small idempotent postbuild step (wired
109
257
  into both `npm run build` and `npm run build:debug`) that patches the
110
- freshly-regenerated `index.d.ts` to `import type { Report } from
111
- './types'` and retypes `parseFile`/`parseBuffer`'s return type from
112
- `any` to `Report`. Because it runs as part of the build script itself
113
- (not a one-off manual edit), the reference survives every future `napi
114
- build` regeneration instead of needing to be reapplied by hand.
258
+ freshly-regenerated `index.d.ts` to import the report type from
259
+ `./types` and retypes `parseFile`/`parseBuffer`'s return type from
260
+ `any`. Because it runs as part of the build script itself (not a one-off
261
+ manual edit), the reference survives every future `napi build`
262
+ regeneration instead of needing to be reapplied by hand.
115
263
 
116
264
  `parseFileEi`'s return value is a materially different, larger EI-JSON
117
- shape (not a serialized `Report`) and is intentionally left `any` — typing
118
- it faithfully is out of scope for this task (see `crates/axilog-ei/src/
119
- lib.rs`'s doc comments for what fields it does/doesn't carry).
265
+ shape (not a serialized native container) and is intentionally left `any` —
266
+ typing it faithfully is out of scope (see `crates/axilog-ei/src/lib.rs`'s
267
+ doc comments for what fields it does/doesn't carry).
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* auto-generated by NAPI-RS */
2
- import type { Report } from './types'
2
+ import type { Report, ReportV1 } from './types'
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Rewrites every player's character/account name in the `.zevtc` at
@@ -12,22 +12,26 @@ export declare function anonymizeFile(inPath: string, outPath: string): number
12
12
 
13
13
  /**
14
14
  * Parses an already-read `.evtc`/`.zevtc` buffer and returns the native
15
- * `Report` as a plain JS object. `opts.replay` (M9, Task 2) opts into
16
- * embedding the native combat-replay block; `opts.skill_damage` (M12,
17
- * Task 1) opts into embedding the native per-skill damage distribution
18
- * block; `opts.missiles` (final-review fix wave) opts into embedding the
19
- * native top-level missile analytics block.
15
+ * 1.0 container (Task 12) as a plain JS object. `opts.replay` (M9, Task 2)
16
+ * opts into embedding the native combat-replay block; `opts.skill_damage`
17
+ * (M12, Task 1) opts into embedding the native per-skill damage
18
+ * distribution block; `opts.missiles` (final-review fix wave) opts into
19
+ * embedding the native top-level missile analytics block. A buffer has no
20
+ * file name to offer, so `generated_from` is always absent here.
20
21
  */
21
- export declare function parseBuffer(buf: Buffer, opts?: ParseOptions | undefined | null): Report
22
+ export declare function parseBuffer(buf: Buffer, opts?: ParseOptions | undefined | null): ReportV1
22
23
 
23
24
  /**
24
- * Parses a `.evtc`/`.zevtc` file at `path` and returns the native
25
- * `Report` as a plain JS object (see module docs for the field-name
26
- * behavior). `opts.replay` (M9, Task 2) opts into embedding the native
27
- * combat-replay block; omitted entirely for back-compat with every
28
- * existing zero-arg call site.
25
+ * Parses a `.evtc`/`.zevtc` file at `path` and returns the native 1.0
26
+ * container (Task 12) as a plain JS object (see module docs for the
27
+ * field-name behavior). `opts.replay` (M9, Task 2) opts into embedding the
28
+ * native combat-replay block; omitted entirely for back-compat with every
29
+ * existing zero-arg call site. Unlike `parseBuffer`, this entry point has
30
+ * a real file name to offer, so it threads `path`'s file name (never the
31
+ * full path -- see `build_report_v1_from_bytes`'s doc comment) into the
32
+ * document's `generated_from`.
29
33
  */
30
- export declare function parseFile(path: string, opts?: ParseOptions | undefined | null): Report
34
+ export declare function parseFile(path: string, opts?: ParseOptions | undefined | null): ReportV1
31
35
 
32
36
  /**
33
37
  * Parses a `.evtc`/`.zevtc` file at `path` and returns the Elite
@@ -62,12 +66,13 @@ export declare function parseFileEi(path: string, opts?: ParseOptions | undefine
62
66
 
63
67
  /**
64
68
  * Optional per-call parse settings (M9, Task 2). `replay: true` opts into
65
- * computing and embedding the native combat-replay block (`ReplayOut`) in
66
- * the returned `Report`; omitted (or `false`, or the argument itself
69
+ * computing and embedding combat-replay POSITIONS, which land on
70
+ * `blocks.replay.tracks`; omitted (or `false`, or the argument itself
67
71
  * omitted entirely -- napi treats a trailing `Option<T>` parameter as
68
- * optional in the generated TypeScript signature) keeps the existing
69
- * zero-arg call shape's behavior unchanged (no `replay` key in the
70
- * output, matching `Report.replay`'s serde skip-when-absent).
72
+ * optional in the generated TypeScript signature) leaves `tracks` off.
73
+ * Note that `blocks.replay` itself is NOT gated: its `by_entity` down/dead
74
+ * intervals are computed on every parse, so `coverage.replay` reads
75
+ * `present` even with no opts, and is not a statement about positions.
71
76
  * `skill_damage: true` (M12, Task 1) opts into embedding the native
72
77
  * per-skill damage distribution block (`SkillDamageOut`) on every
73
78
  * `players[]` entry -- see `axilog_schema::Report::players`'s
@@ -111,4 +116,18 @@ export interface ParseOptions {
111
116
  missiles?: boolean
112
117
  rotation?: boolean
113
118
  modifiers?: boolean
119
+ /**
120
+ * Compute every analysis pass this build knows about -- the SDK
121
+ * mirror of the CLI's `--all`.
122
+ *
123
+ * Deliberately defined as "everything that exists in this version",
124
+ * not as an enumerated option list: a consumer that sets this keeps
125
+ * getting complete documents as later milestones add passes. The
126
+ * first axibridge cutover audit found 30 blank fields caused by
127
+ * exactly the opposite -- a consumer's option list drifting from the
128
+ * parser's.
129
+ *
130
+ * A UNION with the individual options, never an override.
131
+ */
132
+ everything?: boolean
114
133
  }
package/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('@axiapps/axilog-android-arm64')
79
79
  const bindingPackageVersion = require('@axiapps/axilog-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-android-arm-eabi')
95
95
  const bindingPackageVersion = require('@axiapps/axilog-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('@axiapps/axilog-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('@axiapps/axilog-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('@axiapps/axilog-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('@axiapps/axilog-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-darwin-universal')
184
184
  const bindingPackageVersion = require('@axiapps/axilog-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-darwin-x64')
200
200
  const bindingPackageVersion = require('@axiapps/axilog-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-darwin-arm64')
216
216
  const bindingPackageVersion = require('@axiapps/axilog-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-freebsd-x64')
236
236
  const bindingPackageVersion = require('@axiapps/axilog-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-freebsd-arm64')
252
252
  const bindingPackageVersion = require('@axiapps/axilog-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-x64-musl')
273
273
  const bindingPackageVersion = require('@axiapps/axilog-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('@axiapps/axilog-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('@axiapps/axilog-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('@axiapps/axilog-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('@axiapps/axilog-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('@axiapps/axilog-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('@axiapps/axilog-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('@axiapps/axilog-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('@axiapps/axilog-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('@axiapps/axilog-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('@axiapps/axilog-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('@axiapps/axilog-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-openharmony-arm64')
478
478
  const bindingPackageVersion = require('@axiapps/axilog-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-openharmony-x64')
494
494
  const bindingPackageVersion = require('@axiapps/axilog-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 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('@axiapps/axilog-openharmony-arm')
510
510
  const bindingPackageVersion = require('@axiapps/axilog-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '0.3.2' && 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.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '0.3.3' && 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.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) {
648
648
  if (!candidateFailed) {
649
649
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
650
650
  const bindingPackageVersion = require('@axiapps/axilog-wasm32-wasi/package.json').version
651
- if (bindingPackageVersion !== '0.3.2') {
652
- throw new Error(`WASI binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
651
+ if (bindingPackageVersion !== '0.3.3') {
652
+ throw new Error(`WASI binding package version mismatch, expected 0.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
653
653
  }
654
654
  }
655
655
  wasiBinding = require('@axiapps/axilog-wasm32-wasi')