@build-qube/takeoff-calculator 2.0.4 → 2.3.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.
Files changed (5) hide show
  1. package/README.md +4 -0
  2. package/browser.js +1 -1
  3. package/index.d.ts +308 -70
  4. package/index.js +204 -196
  5. package/package.json +14 -33
package/index.js CHANGED
@@ -3,13 +3,13 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- const { readFileSync } = require('node:fs')
6
+ const { readFileSync } = require('node:fs');
7
7
  let nativeBinding = null;
8
8
  const loadErrors = [];
9
9
 
10
10
  const isMusl = () => {
11
11
  let musl = false;
12
- if (process.platform === "linux") {
12
+ if (process.platform === 'linux') {
13
13
  musl = isMuslFromFilesystem();
14
14
  if (musl === null) {
15
15
  musl = isMuslFromReport();
@@ -21,11 +21,11 @@ const isMusl = () => {
21
21
  return musl;
22
22
  };
23
23
 
24
- const isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
24
+ const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
25
25
 
26
26
  const isMuslFromFilesystem = () => {
27
27
  try {
28
- return readFileSync("/usr/bin/ldd", "utf-8").includes("musl");
28
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl');
29
29
  } catch {
30
30
  return null;
31
31
  }
@@ -33,7 +33,7 @@ const isMuslFromFilesystem = () => {
33
33
 
34
34
  const isMuslFromReport = () => {
35
35
  let report = null;
36
- if (typeof process.report?.getReport === "function") {
36
+ if (typeof process.report?.getReport === 'function') {
37
37
  process.report.excludeNetwork = true;
38
38
  report = process.report.getReport();
39
39
  }
@@ -53,9 +53,9 @@ const isMuslFromReport = () => {
53
53
 
54
54
  const isMuslFromChildProcess = () => {
55
55
  try {
56
- return require("child_process")
57
- .execSync("ldd --version", { encoding: "utf8" })
58
- .includes("musl");
56
+ return require('child_process')
57
+ .execSync('ldd --version', { encoding: 'utf8' })
58
+ .includes('musl');
59
59
  } catch (e) {
60
60
  // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
61
61
  return false;
@@ -69,47 +69,47 @@ function requireNative() {
69
69
  } catch (err) {
70
70
  loadErrors.push(err);
71
71
  }
72
- } else if (process.platform === "android") {
73
- if (process.arch === "arm64") {
72
+ } else if (process.platform === 'android') {
73
+ if (process.arch === 'arm64') {
74
74
  try {
75
- return require("./takeoff-calculator.android-arm64.node");
75
+ return require('./takeoff-calculator.android-arm64.node');
76
76
  } catch (e) {
77
77
  loadErrors.push(e);
78
78
  }
79
79
  try {
80
- const binding = require("@build-qube/takeoff-calculator-android-arm64");
80
+ const binding = require('@build-qube/takeoff-calculator-android-arm64');
81
81
  const bindingPackageVersion =
82
- require("@build-qube/takeoff-calculator-android-arm64/package.json").version;
82
+ require('@build-qube/takeoff-calculator-android-arm64/package.json').version;
83
83
  if (
84
- bindingPackageVersion !== "2.0.3" &&
84
+ bindingPackageVersion !== '2.2.0' &&
85
85
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
86
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
86
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
87
87
  ) {
88
88
  throw new Error(
89
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
89
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
90
90
  );
91
91
  }
92
92
  return binding;
93
93
  } catch (e) {
94
94
  loadErrors.push(e);
95
95
  }
96
- } else if (process.arch === "arm") {
96
+ } else if (process.arch === 'arm') {
97
97
  try {
98
- return require("./takeoff-calculator.android-arm-eabi.node");
98
+ return require('./takeoff-calculator.android-arm-eabi.node');
99
99
  } catch (e) {
100
100
  loadErrors.push(e);
101
101
  }
102
102
  try {
103
- const binding = require("@build-qube/takeoff-calculator-android-arm-eabi");
103
+ const binding = require('@build-qube/takeoff-calculator-android-arm-eabi');
104
104
  const bindingPackageVersion =
105
- require("@build-qube/takeoff-calculator-android-arm-eabi/package.json").version;
105
+ require('@build-qube/takeoff-calculator-android-arm-eabi/package.json').version;
106
106
  if (
107
- bindingPackageVersion !== "2.0.3" &&
107
+ bindingPackageVersion !== '2.2.0' &&
108
108
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
109
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
109
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
110
110
  ) {
111
111
  throw new Error(
112
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
112
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
113
113
  );
114
114
  }
115
115
  return binding;
@@ -121,28 +121,28 @@ function requireNative() {
121
121
  new Error(`Unsupported architecture on Android ${process.arch}`),
122
122
  );
123
123
  }
124
- } else if (process.platform === "win32") {
125
- if (process.arch === "x64") {
124
+ } else if (process.platform === 'win32') {
125
+ if (process.arch === 'x64') {
126
126
  if (
127
- process.config?.variables?.shlib_suffix === "dll.a" ||
128
- process.config?.variables?.node_target_type === "shared_library"
127
+ process.config?.variables?.shlib_suffix === 'dll.a' ||
128
+ process.config?.variables?.node_target_type === 'shared_library'
129
129
  ) {
130
130
  try {
131
- return require("./takeoff-calculator.win32-x64-gnu.node");
131
+ return require('./takeoff-calculator.win32-x64-gnu.node');
132
132
  } catch (e) {
133
133
  loadErrors.push(e);
134
134
  }
135
135
  try {
136
- const binding = require("@build-qube/takeoff-calculator-win32-x64-gnu");
136
+ const binding = require('@build-qube/takeoff-calculator-win32-x64-gnu');
137
137
  const bindingPackageVersion =
138
- require("@build-qube/takeoff-calculator-win32-x64-gnu/package.json").version;
138
+ require('@build-qube/takeoff-calculator-win32-x64-gnu/package.json').version;
139
139
  if (
140
- bindingPackageVersion !== "2.0.3" &&
140
+ bindingPackageVersion !== '2.2.0' &&
141
141
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
142
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
142
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
143
143
  ) {
144
144
  throw new Error(
145
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
145
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
146
146
  );
147
147
  }
148
148
  return binding;
@@ -151,21 +151,21 @@ function requireNative() {
151
151
  }
152
152
  } else {
153
153
  try {
154
- return require("./takeoff-calculator.win32-x64-msvc.node");
154
+ return require('./takeoff-calculator.win32-x64-msvc.node');
155
155
  } catch (e) {
156
156
  loadErrors.push(e);
157
157
  }
158
158
  try {
159
- const binding = require("@build-qube/takeoff-calculator-win32-x64-msvc");
159
+ const binding = require('@build-qube/takeoff-calculator-win32-x64-msvc');
160
160
  const bindingPackageVersion =
161
- require("@build-qube/takeoff-calculator-win32-x64-msvc/package.json").version;
161
+ require('@build-qube/takeoff-calculator-win32-x64-msvc/package.json').version;
162
162
  if (
163
- bindingPackageVersion !== "2.0.3" &&
163
+ bindingPackageVersion !== '2.2.0' &&
164
164
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
165
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
165
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
166
166
  ) {
167
167
  throw new Error(
168
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
168
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
169
169
  );
170
170
  }
171
171
  return binding;
@@ -173,46 +173,46 @@ function requireNative() {
173
173
  loadErrors.push(e);
174
174
  }
175
175
  }
176
- } else if (process.arch === "ia32") {
176
+ } else if (process.arch === 'ia32') {
177
177
  try {
178
- return require("./takeoff-calculator.win32-ia32-msvc.node");
178
+ return require('./takeoff-calculator.win32-ia32-msvc.node');
179
179
  } catch (e) {
180
180
  loadErrors.push(e);
181
181
  }
182
182
  try {
183
- const binding = require("@build-qube/takeoff-calculator-win32-ia32-msvc");
183
+ const binding = require('@build-qube/takeoff-calculator-win32-ia32-msvc');
184
184
  const bindingPackageVersion =
185
- require("@build-qube/takeoff-calculator-win32-ia32-msvc/package.json").version;
185
+ require('@build-qube/takeoff-calculator-win32-ia32-msvc/package.json').version;
186
186
  if (
187
- bindingPackageVersion !== "2.0.3" &&
187
+ bindingPackageVersion !== '2.2.0' &&
188
188
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
189
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
189
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
190
190
  ) {
191
191
  throw new Error(
192
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
192
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
193
193
  );
194
194
  }
195
195
  return binding;
196
196
  } catch (e) {
197
197
  loadErrors.push(e);
198
198
  }
199
- } else if (process.arch === "arm64") {
199
+ } else if (process.arch === 'arm64') {
200
200
  try {
201
- return require("./takeoff-calculator.win32-arm64-msvc.node");
201
+ return require('./takeoff-calculator.win32-arm64-msvc.node');
202
202
  } catch (e) {
203
203
  loadErrors.push(e);
204
204
  }
205
205
  try {
206
- const binding = require("@build-qube/takeoff-calculator-win32-arm64-msvc");
206
+ const binding = require('@build-qube/takeoff-calculator-win32-arm64-msvc');
207
207
  const bindingPackageVersion =
208
- require("@build-qube/takeoff-calculator-win32-arm64-msvc/package.json").version;
208
+ require('@build-qube/takeoff-calculator-win32-arm64-msvc/package.json').version;
209
209
  if (
210
- bindingPackageVersion !== "2.0.3" &&
210
+ bindingPackageVersion !== '2.2.0' &&
211
211
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
212
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
212
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
213
213
  ) {
214
214
  throw new Error(
215
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
215
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
216
216
  );
217
217
  }
218
218
  return binding;
@@ -224,69 +224,69 @@ function requireNative() {
224
224
  new Error(`Unsupported architecture on Windows: ${process.arch}`),
225
225
  );
226
226
  }
227
- } else if (process.platform === "darwin") {
227
+ } else if (process.platform === 'darwin') {
228
228
  try {
229
- return require("./takeoff-calculator.darwin-universal.node");
229
+ return require('./takeoff-calculator.darwin-universal.node');
230
230
  } catch (e) {
231
231
  loadErrors.push(e);
232
232
  }
233
233
  try {
234
- const binding = require("@build-qube/takeoff-calculator-darwin-universal");
234
+ const binding = require('@build-qube/takeoff-calculator-darwin-universal');
235
235
  const bindingPackageVersion =
236
- require("@build-qube/takeoff-calculator-darwin-universal/package.json").version;
236
+ require('@build-qube/takeoff-calculator-darwin-universal/package.json').version;
237
237
  if (
238
- bindingPackageVersion !== "2.0.3" &&
238
+ bindingPackageVersion !== '2.2.0' &&
239
239
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
240
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
240
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
241
241
  ) {
242
242
  throw new Error(
243
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
243
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
244
244
  );
245
245
  }
246
246
  return binding;
247
247
  } catch (e) {
248
248
  loadErrors.push(e);
249
249
  }
250
- if (process.arch === "x64") {
250
+ if (process.arch === 'x64') {
251
251
  try {
252
- return require("./takeoff-calculator.darwin-x64.node");
252
+ return require('./takeoff-calculator.darwin-x64.node');
253
253
  } catch (e) {
254
254
  loadErrors.push(e);
255
255
  }
256
256
  try {
257
- const binding = require("@build-qube/takeoff-calculator-darwin-x64");
257
+ const binding = require('@build-qube/takeoff-calculator-darwin-x64');
258
258
  const bindingPackageVersion =
259
- require("@build-qube/takeoff-calculator-darwin-x64/package.json").version;
259
+ require('@build-qube/takeoff-calculator-darwin-x64/package.json').version;
260
260
  if (
261
- bindingPackageVersion !== "2.0.3" &&
261
+ bindingPackageVersion !== '2.2.0' &&
262
262
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
263
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
263
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
264
264
  ) {
265
265
  throw new Error(
266
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
266
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
267
267
  );
268
268
  }
269
269
  return binding;
270
270
  } catch (e) {
271
271
  loadErrors.push(e);
272
272
  }
273
- } else if (process.arch === "arm64") {
273
+ } else if (process.arch === 'arm64') {
274
274
  try {
275
- return require("./takeoff-calculator.darwin-arm64.node");
275
+ return require('./takeoff-calculator.darwin-arm64.node');
276
276
  } catch (e) {
277
277
  loadErrors.push(e);
278
278
  }
279
279
  try {
280
- const binding = require("@build-qube/takeoff-calculator-darwin-arm64");
280
+ const binding = require('@build-qube/takeoff-calculator-darwin-arm64');
281
281
  const bindingPackageVersion =
282
- require("@build-qube/takeoff-calculator-darwin-arm64/package.json").version;
282
+ require('@build-qube/takeoff-calculator-darwin-arm64/package.json').version;
283
283
  if (
284
- bindingPackageVersion !== "2.0.3" &&
284
+ bindingPackageVersion !== '2.2.0' &&
285
285
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
286
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
286
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
287
287
  ) {
288
288
  throw new Error(
289
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
289
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
290
290
  );
291
291
  }
292
292
  return binding;
@@ -298,47 +298,47 @@ function requireNative() {
298
298
  new Error(`Unsupported architecture on macOS: ${process.arch}`),
299
299
  );
300
300
  }
301
- } else if (process.platform === "freebsd") {
302
- if (process.arch === "x64") {
301
+ } else if (process.platform === 'freebsd') {
302
+ if (process.arch === 'x64') {
303
303
  try {
304
- return require("./takeoff-calculator.freebsd-x64.node");
304
+ return require('./takeoff-calculator.freebsd-x64.node');
305
305
  } catch (e) {
306
306
  loadErrors.push(e);
307
307
  }
308
308
  try {
309
- const binding = require("@build-qube/takeoff-calculator-freebsd-x64");
309
+ const binding = require('@build-qube/takeoff-calculator-freebsd-x64');
310
310
  const bindingPackageVersion =
311
- require("@build-qube/takeoff-calculator-freebsd-x64/package.json").version;
311
+ require('@build-qube/takeoff-calculator-freebsd-x64/package.json').version;
312
312
  if (
313
- bindingPackageVersion !== "2.0.3" &&
313
+ bindingPackageVersion !== '2.2.0' &&
314
314
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
315
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
315
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
316
316
  ) {
317
317
  throw new Error(
318
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
318
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
319
319
  );
320
320
  }
321
321
  return binding;
322
322
  } catch (e) {
323
323
  loadErrors.push(e);
324
324
  }
325
- } else if (process.arch === "arm64") {
325
+ } else if (process.arch === 'arm64') {
326
326
  try {
327
- return require("./takeoff-calculator.freebsd-arm64.node");
327
+ return require('./takeoff-calculator.freebsd-arm64.node');
328
328
  } catch (e) {
329
329
  loadErrors.push(e);
330
330
  }
331
331
  try {
332
- const binding = require("@build-qube/takeoff-calculator-freebsd-arm64");
332
+ const binding = require('@build-qube/takeoff-calculator-freebsd-arm64');
333
333
  const bindingPackageVersion =
334
- require("@build-qube/takeoff-calculator-freebsd-arm64/package.json").version;
334
+ require('@build-qube/takeoff-calculator-freebsd-arm64/package.json').version;
335
335
  if (
336
- bindingPackageVersion !== "2.0.3" &&
336
+ bindingPackageVersion !== '2.2.0' &&
337
337
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
338
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
338
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
339
339
  ) {
340
340
  throw new Error(
341
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
341
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
342
342
  );
343
343
  }
344
344
  return binding;
@@ -350,25 +350,25 @@ function requireNative() {
350
350
  new Error(`Unsupported architecture on FreeBSD: ${process.arch}`),
351
351
  );
352
352
  }
353
- } else if (process.platform === "linux") {
354
- if (process.arch === "x64") {
353
+ } else if (process.platform === 'linux') {
354
+ if (process.arch === 'x64') {
355
355
  if (isMusl()) {
356
356
  try {
357
- return require("./takeoff-calculator.linux-x64-musl.node");
357
+ return require('./takeoff-calculator.linux-x64-musl.node');
358
358
  } catch (e) {
359
359
  loadErrors.push(e);
360
360
  }
361
361
  try {
362
- const binding = require("@build-qube/takeoff-calculator-linux-x64-musl");
362
+ const binding = require('@build-qube/takeoff-calculator-linux-x64-musl');
363
363
  const bindingPackageVersion =
364
- require("@build-qube/takeoff-calculator-linux-x64-musl/package.json").version;
364
+ require('@build-qube/takeoff-calculator-linux-x64-musl/package.json').version;
365
365
  if (
366
- bindingPackageVersion !== "2.0.3" &&
366
+ bindingPackageVersion !== '2.2.0' &&
367
367
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
368
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
368
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
369
369
  ) {
370
370
  throw new Error(
371
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
371
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
372
372
  );
373
373
  }
374
374
  return binding;
@@ -377,21 +377,21 @@ function requireNative() {
377
377
  }
378
378
  } else {
379
379
  try {
380
- return require("./takeoff-calculator.linux-x64-gnu.node");
380
+ return require('./takeoff-calculator.linux-x64-gnu.node');
381
381
  } catch (e) {
382
382
  loadErrors.push(e);
383
383
  }
384
384
  try {
385
- const binding = require("@build-qube/takeoff-calculator-linux-x64-gnu");
385
+ const binding = require('@build-qube/takeoff-calculator-linux-x64-gnu');
386
386
  const bindingPackageVersion =
387
- require("@build-qube/takeoff-calculator-linux-x64-gnu/package.json").version;
387
+ require('@build-qube/takeoff-calculator-linux-x64-gnu/package.json').version;
388
388
  if (
389
- bindingPackageVersion !== "2.0.3" &&
389
+ bindingPackageVersion !== '2.2.0' &&
390
390
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
391
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
391
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
392
392
  ) {
393
393
  throw new Error(
394
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
394
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
395
395
  );
396
396
  }
397
397
  return binding;
@@ -399,24 +399,24 @@ function requireNative() {
399
399
  loadErrors.push(e);
400
400
  }
401
401
  }
402
- } else if (process.arch === "arm64") {
402
+ } else if (process.arch === 'arm64') {
403
403
  if (isMusl()) {
404
404
  try {
405
- return require("./takeoff-calculator.linux-arm64-musl.node");
405
+ return require('./takeoff-calculator.linux-arm64-musl.node');
406
406
  } catch (e) {
407
407
  loadErrors.push(e);
408
408
  }
409
409
  try {
410
- const binding = require("@build-qube/takeoff-calculator-linux-arm64-musl");
410
+ const binding = require('@build-qube/takeoff-calculator-linux-arm64-musl');
411
411
  const bindingPackageVersion =
412
- require("@build-qube/takeoff-calculator-linux-arm64-musl/package.json").version;
412
+ require('@build-qube/takeoff-calculator-linux-arm64-musl/package.json').version;
413
413
  if (
414
- bindingPackageVersion !== "2.0.3" &&
414
+ bindingPackageVersion !== '2.2.0' &&
415
415
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
416
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
416
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
417
417
  ) {
418
418
  throw new Error(
419
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
419
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
420
420
  );
421
421
  }
422
422
  return binding;
@@ -425,21 +425,21 @@ function requireNative() {
425
425
  }
426
426
  } else {
427
427
  try {
428
- return require("./takeoff-calculator.linux-arm64-gnu.node");
428
+ return require('./takeoff-calculator.linux-arm64-gnu.node');
429
429
  } catch (e) {
430
430
  loadErrors.push(e);
431
431
  }
432
432
  try {
433
- const binding = require("@build-qube/takeoff-calculator-linux-arm64-gnu");
433
+ const binding = require('@build-qube/takeoff-calculator-linux-arm64-gnu');
434
434
  const bindingPackageVersion =
435
- require("@build-qube/takeoff-calculator-linux-arm64-gnu/package.json").version;
435
+ require('@build-qube/takeoff-calculator-linux-arm64-gnu/package.json').version;
436
436
  if (
437
- bindingPackageVersion !== "2.0.3" &&
437
+ bindingPackageVersion !== '2.2.0' &&
438
438
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
439
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
439
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
440
440
  ) {
441
441
  throw new Error(
442
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
442
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
443
443
  );
444
444
  }
445
445
  return binding;
@@ -447,24 +447,24 @@ function requireNative() {
447
447
  loadErrors.push(e);
448
448
  }
449
449
  }
450
- } else if (process.arch === "arm") {
450
+ } else if (process.arch === 'arm') {
451
451
  if (isMusl()) {
452
452
  try {
453
- return require("./takeoff-calculator.linux-arm-musleabihf.node");
453
+ return require('./takeoff-calculator.linux-arm-musleabihf.node');
454
454
  } catch (e) {
455
455
  loadErrors.push(e);
456
456
  }
457
457
  try {
458
- const binding = require("@build-qube/takeoff-calculator-linux-arm-musleabihf");
458
+ const binding = require('@build-qube/takeoff-calculator-linux-arm-musleabihf');
459
459
  const bindingPackageVersion =
460
- require("@build-qube/takeoff-calculator-linux-arm-musleabihf/package.json").version;
460
+ require('@build-qube/takeoff-calculator-linux-arm-musleabihf/package.json').version;
461
461
  if (
462
- bindingPackageVersion !== "2.0.3" &&
462
+ bindingPackageVersion !== '2.2.0' &&
463
463
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
464
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
464
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
465
465
  ) {
466
466
  throw new Error(
467
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
467
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
468
468
  );
469
469
  }
470
470
  return binding;
@@ -473,21 +473,21 @@ function requireNative() {
473
473
  }
474
474
  } else {
475
475
  try {
476
- return require("./takeoff-calculator.linux-arm-gnueabihf.node");
476
+ return require('./takeoff-calculator.linux-arm-gnueabihf.node');
477
477
  } catch (e) {
478
478
  loadErrors.push(e);
479
479
  }
480
480
  try {
481
- const binding = require("@build-qube/takeoff-calculator-linux-arm-gnueabihf");
481
+ const binding = require('@build-qube/takeoff-calculator-linux-arm-gnueabihf');
482
482
  const bindingPackageVersion =
483
- require("@build-qube/takeoff-calculator-linux-arm-gnueabihf/package.json").version;
483
+ require('@build-qube/takeoff-calculator-linux-arm-gnueabihf/package.json').version;
484
484
  if (
485
- bindingPackageVersion !== "2.0.3" &&
485
+ bindingPackageVersion !== '2.2.0' &&
486
486
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
487
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
487
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
488
488
  ) {
489
489
  throw new Error(
490
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
490
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
491
491
  );
492
492
  }
493
493
  return binding;
@@ -495,24 +495,24 @@ function requireNative() {
495
495
  loadErrors.push(e);
496
496
  }
497
497
  }
498
- } else if (process.arch === "loong64") {
498
+ } else if (process.arch === 'loong64') {
499
499
  if (isMusl()) {
500
500
  try {
501
- return require("./takeoff-calculator.linux-loong64-musl.node");
501
+ return require('./takeoff-calculator.linux-loong64-musl.node');
502
502
  } catch (e) {
503
503
  loadErrors.push(e);
504
504
  }
505
505
  try {
506
- const binding = require("@build-qube/takeoff-calculator-linux-loong64-musl");
506
+ const binding = require('@build-qube/takeoff-calculator-linux-loong64-musl');
507
507
  const bindingPackageVersion =
508
- require("@build-qube/takeoff-calculator-linux-loong64-musl/package.json").version;
508
+ require('@build-qube/takeoff-calculator-linux-loong64-musl/package.json').version;
509
509
  if (
510
- bindingPackageVersion !== "2.0.3" &&
510
+ bindingPackageVersion !== '2.2.0' &&
511
511
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
512
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
512
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
513
513
  ) {
514
514
  throw new Error(
515
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
515
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
516
516
  );
517
517
  }
518
518
  return binding;
@@ -521,21 +521,21 @@ function requireNative() {
521
521
  }
522
522
  } else {
523
523
  try {
524
- return require("./takeoff-calculator.linux-loong64-gnu.node");
524
+ return require('./takeoff-calculator.linux-loong64-gnu.node');
525
525
  } catch (e) {
526
526
  loadErrors.push(e);
527
527
  }
528
528
  try {
529
- const binding = require("@build-qube/takeoff-calculator-linux-loong64-gnu");
529
+ const binding = require('@build-qube/takeoff-calculator-linux-loong64-gnu');
530
530
  const bindingPackageVersion =
531
- require("@build-qube/takeoff-calculator-linux-loong64-gnu/package.json").version;
531
+ require('@build-qube/takeoff-calculator-linux-loong64-gnu/package.json').version;
532
532
  if (
533
- bindingPackageVersion !== "2.0.3" &&
533
+ bindingPackageVersion !== '2.2.0' &&
534
534
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
535
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
535
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
536
536
  ) {
537
537
  throw new Error(
538
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
538
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
539
539
  );
540
540
  }
541
541
  return binding;
@@ -543,24 +543,24 @@ function requireNative() {
543
543
  loadErrors.push(e);
544
544
  }
545
545
  }
546
- } else if (process.arch === "riscv64") {
546
+ } else if (process.arch === 'riscv64') {
547
547
  if (isMusl()) {
548
548
  try {
549
- return require("./takeoff-calculator.linux-riscv64-musl.node");
549
+ return require('./takeoff-calculator.linux-riscv64-musl.node');
550
550
  } catch (e) {
551
551
  loadErrors.push(e);
552
552
  }
553
553
  try {
554
- const binding = require("@build-qube/takeoff-calculator-linux-riscv64-musl");
554
+ const binding = require('@build-qube/takeoff-calculator-linux-riscv64-musl');
555
555
  const bindingPackageVersion =
556
- require("@build-qube/takeoff-calculator-linux-riscv64-musl/package.json").version;
556
+ require('@build-qube/takeoff-calculator-linux-riscv64-musl/package.json').version;
557
557
  if (
558
- bindingPackageVersion !== "2.0.3" &&
558
+ bindingPackageVersion !== '2.2.0' &&
559
559
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
560
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
560
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
561
561
  ) {
562
562
  throw new Error(
563
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
563
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
564
564
  );
565
565
  }
566
566
  return binding;
@@ -569,21 +569,21 @@ function requireNative() {
569
569
  }
570
570
  } else {
571
571
  try {
572
- return require("./takeoff-calculator.linux-riscv64-gnu.node");
572
+ return require('./takeoff-calculator.linux-riscv64-gnu.node');
573
573
  } catch (e) {
574
574
  loadErrors.push(e);
575
575
  }
576
576
  try {
577
- const binding = require("@build-qube/takeoff-calculator-linux-riscv64-gnu");
577
+ const binding = require('@build-qube/takeoff-calculator-linux-riscv64-gnu');
578
578
  const bindingPackageVersion =
579
- require("@build-qube/takeoff-calculator-linux-riscv64-gnu/package.json").version;
579
+ require('@build-qube/takeoff-calculator-linux-riscv64-gnu/package.json').version;
580
580
  if (
581
- bindingPackageVersion !== "2.0.3" &&
581
+ bindingPackageVersion !== '2.2.0' &&
582
582
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
583
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
583
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
584
584
  ) {
585
585
  throw new Error(
586
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
586
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
587
587
  );
588
588
  }
589
589
  return binding;
@@ -591,46 +591,46 @@ function requireNative() {
591
591
  loadErrors.push(e);
592
592
  }
593
593
  }
594
- } else if (process.arch === "ppc64") {
594
+ } else if (process.arch === 'ppc64') {
595
595
  try {
596
- return require("./takeoff-calculator.linux-ppc64-gnu.node");
596
+ return require('./takeoff-calculator.linux-ppc64-gnu.node');
597
597
  } catch (e) {
598
598
  loadErrors.push(e);
599
599
  }
600
600
  try {
601
- const binding = require("@build-qube/takeoff-calculator-linux-ppc64-gnu");
601
+ const binding = require('@build-qube/takeoff-calculator-linux-ppc64-gnu');
602
602
  const bindingPackageVersion =
603
- require("@build-qube/takeoff-calculator-linux-ppc64-gnu/package.json").version;
603
+ require('@build-qube/takeoff-calculator-linux-ppc64-gnu/package.json').version;
604
604
  if (
605
- bindingPackageVersion !== "2.0.3" &&
605
+ bindingPackageVersion !== '2.2.0' &&
606
606
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
607
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
607
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
608
608
  ) {
609
609
  throw new Error(
610
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
610
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
611
611
  );
612
612
  }
613
613
  return binding;
614
614
  } catch (e) {
615
615
  loadErrors.push(e);
616
616
  }
617
- } else if (process.arch === "s390x") {
617
+ } else if (process.arch === 's390x') {
618
618
  try {
619
- return require("./takeoff-calculator.linux-s390x-gnu.node");
619
+ return require('./takeoff-calculator.linux-s390x-gnu.node');
620
620
  } catch (e) {
621
621
  loadErrors.push(e);
622
622
  }
623
623
  try {
624
- const binding = require("@build-qube/takeoff-calculator-linux-s390x-gnu");
624
+ const binding = require('@build-qube/takeoff-calculator-linux-s390x-gnu');
625
625
  const bindingPackageVersion =
626
- require("@build-qube/takeoff-calculator-linux-s390x-gnu/package.json").version;
626
+ require('@build-qube/takeoff-calculator-linux-s390x-gnu/package.json').version;
627
627
  if (
628
- bindingPackageVersion !== "2.0.3" &&
628
+ bindingPackageVersion !== '2.2.0' &&
629
629
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
630
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
630
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
631
631
  ) {
632
632
  throw new Error(
633
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
633
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
634
634
  );
635
635
  }
636
636
  return binding;
@@ -642,70 +642,70 @@ function requireNative() {
642
642
  new Error(`Unsupported architecture on Linux: ${process.arch}`),
643
643
  );
644
644
  }
645
- } else if (process.platform === "openharmony") {
646
- if (process.arch === "arm64") {
645
+ } else if (process.platform === 'openharmony') {
646
+ if (process.arch === 'arm64') {
647
647
  try {
648
- return require("./takeoff-calculator.openharmony-arm64.node");
648
+ return require('./takeoff-calculator.openharmony-arm64.node');
649
649
  } catch (e) {
650
650
  loadErrors.push(e);
651
651
  }
652
652
  try {
653
- const binding = require("@build-qube/takeoff-calculator-openharmony-arm64");
653
+ const binding = require('@build-qube/takeoff-calculator-openharmony-arm64');
654
654
  const bindingPackageVersion =
655
- require("@build-qube/takeoff-calculator-openharmony-arm64/package.json").version;
655
+ require('@build-qube/takeoff-calculator-openharmony-arm64/package.json').version;
656
656
  if (
657
- bindingPackageVersion !== "2.0.3" &&
657
+ bindingPackageVersion !== '2.2.0' &&
658
658
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
659
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
659
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
660
660
  ) {
661
661
  throw new Error(
662
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
662
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
663
663
  );
664
664
  }
665
665
  return binding;
666
666
  } catch (e) {
667
667
  loadErrors.push(e);
668
668
  }
669
- } else if (process.arch === "x64") {
669
+ } else if (process.arch === 'x64') {
670
670
  try {
671
- return require("./takeoff-calculator.openharmony-x64.node");
671
+ return require('./takeoff-calculator.openharmony-x64.node');
672
672
  } catch (e) {
673
673
  loadErrors.push(e);
674
674
  }
675
675
  try {
676
- const binding = require("@build-qube/takeoff-calculator-openharmony-x64");
676
+ const binding = require('@build-qube/takeoff-calculator-openharmony-x64');
677
677
  const bindingPackageVersion =
678
- require("@build-qube/takeoff-calculator-openharmony-x64/package.json").version;
678
+ require('@build-qube/takeoff-calculator-openharmony-x64/package.json').version;
679
679
  if (
680
- bindingPackageVersion !== "2.0.3" &&
680
+ bindingPackageVersion !== '2.2.0' &&
681
681
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
682
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
682
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
683
683
  ) {
684
684
  throw new Error(
685
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
685
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
686
686
  );
687
687
  }
688
688
  return binding;
689
689
  } catch (e) {
690
690
  loadErrors.push(e);
691
691
  }
692
- } else if (process.arch === "arm") {
692
+ } else if (process.arch === 'arm') {
693
693
  try {
694
- return require("./takeoff-calculator.openharmony-arm.node");
694
+ return require('./takeoff-calculator.openharmony-arm.node');
695
695
  } catch (e) {
696
696
  loadErrors.push(e);
697
697
  }
698
698
  try {
699
- const binding = require("@build-qube/takeoff-calculator-openharmony-arm");
699
+ const binding = require('@build-qube/takeoff-calculator-openharmony-arm');
700
700
  const bindingPackageVersion =
701
- require("@build-qube/takeoff-calculator-openharmony-arm/package.json").version;
701
+ require('@build-qube/takeoff-calculator-openharmony-arm/package.json').version;
702
702
  if (
703
- bindingPackageVersion !== "2.0.3" &&
703
+ bindingPackageVersion !== '2.2.0' &&
704
704
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
705
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
705
+ process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
706
706
  ) {
707
707
  throw new Error(
708
- `Native binding package version mismatch, expected 2.0.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
708
+ `Native binding package version mismatch, expected 2.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
709
709
  );
710
710
  }
711
711
  return binding;
@@ -732,7 +732,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
732
732
  let wasiBinding = null;
733
733
  let wasiBindingError = null;
734
734
  try {
735
- wasiBinding = require("./takeoff-calculator.wasi.cjs");
735
+ wasiBinding = require('./takeoff-calculator.wasi.cjs');
736
736
  nativeBinding = wasiBinding;
737
737
  } catch (err) {
738
738
  if (process.env.NAPI_RS_FORCE_WASI) {
@@ -741,7 +741,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
741
741
  }
742
742
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
743
743
  try {
744
- wasiBinding = require("@build-qube/takeoff-calculator-wasm32-wasi");
744
+ wasiBinding = require('@build-qube/takeoff-calculator-wasm32-wasi');
745
745
  nativeBinding = wasiBinding;
746
746
  } catch (err) {
747
747
  if (process.env.NAPI_RS_FORCE_WASI) {
@@ -754,9 +754,9 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
754
754
  }
755
755
  }
756
756
  }
757
- if (process.env.NAPI_RS_FORCE_WASI === "error" && !wasiBinding) {
757
+ if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
758
758
  const error = new Error(
759
- "WASI binding not found and NAPI_RS_FORCE_WASI is set to error",
759
+ 'WASI binding not found and NAPI_RS_FORCE_WASI is set to error',
760
760
  );
761
761
  error.cause = wasiBindingError;
762
762
  throw error;
@@ -768,7 +768,7 @@ if (!nativeBinding) {
768
768
  throw new Error(
769
769
  `Cannot find native binding. ` +
770
770
  `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
771
- "Please try `npm i` again after removing both package-lock.json and node_modules directory.",
771
+ 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
772
772
  {
773
773
  cause: loadErrors.reduce((err, cur) => {
774
774
  cur.cause = err;
@@ -781,12 +781,20 @@ if (!nativeBinding) {
781
781
  }
782
782
 
783
783
  module.exports = nativeBinding;
784
+ module.exports.ContourWrapper = nativeBinding.ContourWrapper;
784
785
  module.exports.GroupWrapper = nativeBinding.GroupWrapper;
785
786
  module.exports.MeasurementWrapper = nativeBinding.MeasurementWrapper;
786
787
  module.exports.TakeoffStateHandler = nativeBinding.TakeoffStateHandler;
788
+ module.exports.VolumetricUnitResult = nativeBinding.VolumetricUnitResult;
787
789
  module.exports.plus100 = nativeBinding.plus100;
790
+ module.exports.plus200 = nativeBinding.plus200;
788
791
  module.exports.UnitValue = nativeBinding.UnitValue;
792
+ module.exports.distance = nativeBinding.distance;
793
+ module.exports.generateRandomId = nativeBinding.generateRandomId;
794
+ module.exports.getCentroid = nativeBinding.getCentroid;
789
795
  module.exports.MeasurementType = nativeBinding.MeasurementType;
796
+ module.exports.repositionMeasurementToCentroid =
797
+ nativeBinding.repositionMeasurementToCentroid;
790
798
  module.exports.simplifyPolyline = nativeBinding.simplifyPolyline;
791
799
  module.exports.Unit = nativeBinding.Unit;
792
800
  module.exports.UnitValueItemType = nativeBinding.UnitValueItemType;