@build-qube/takeoff-calculator 1.2.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/index.d.ts +42 -2
- package/index.js +57 -53
- package/package.json +12 -11
package/README.md
ADDED
package/index.d.ts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class GroupWrapper {
|
|
4
|
+
/** Get the scale for a measurement. */
|
|
5
|
+
get id(): string
|
|
6
|
+
get area(): UnitValue | null
|
|
7
|
+
get length(): UnitValue | null
|
|
8
|
+
get points(): number | null
|
|
9
|
+
get count(): number | null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare class MeasurementWrapper {
|
|
13
|
+
get points(): number
|
|
14
|
+
get measurement(): Measurement
|
|
15
|
+
get area(): UnitValue | null
|
|
16
|
+
convertArea(unit: Unit): number | null
|
|
17
|
+
convertLength(unit: Unit): number | null
|
|
18
|
+
get length(): UnitValue | null
|
|
19
|
+
get groupId(): string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare class TakeoffStateHandler {
|
|
4
23
|
/**
|
|
5
24
|
* Creates a new state.
|
|
6
25
|
*
|
|
@@ -12,7 +31,8 @@ export declare class State {
|
|
|
12
31
|
*
|
|
13
32
|
* * `State` - The new state.
|
|
14
33
|
*/
|
|
15
|
-
constructor(options
|
|
34
|
+
constructor(options?: StateOptions | undefined | null)
|
|
35
|
+
getMeasurementsByGroupId(groupId: string): Array<MeasurementWrapper>
|
|
16
36
|
/**
|
|
17
37
|
* Get the scale for a measurement.
|
|
18
38
|
*
|
|
@@ -39,6 +59,7 @@ export declare class State {
|
|
|
39
59
|
* * `Some(page)` - If the page was found and updated.
|
|
40
60
|
*/
|
|
41
61
|
upsertPage(page: Page): Page | null
|
|
62
|
+
getGroup(groupId: string): GroupWrapper | null
|
|
42
63
|
/**
|
|
43
64
|
* Inserts or updates a group in the state.
|
|
44
65
|
*
|
|
@@ -65,6 +86,7 @@ export declare class State {
|
|
|
65
86
|
* * `Some(measurement)` - If the measurement was found and updated.
|
|
66
87
|
*/
|
|
67
88
|
upsertMeasurement(measurement: Measurement): Measurement | null
|
|
89
|
+
getMeasurement(measurementId: string): MeasurementWrapper | null
|
|
68
90
|
/**
|
|
69
91
|
* Inserts or updates a scale in the state.
|
|
70
92
|
*
|
|
@@ -78,9 +100,24 @@ export declare class State {
|
|
|
78
100
|
* * `Some(scale)` - If the scale was found and updated.
|
|
79
101
|
*/
|
|
80
102
|
upsertScale(scale: Scale): Scale | null
|
|
103
|
+
/**
|
|
104
|
+
* Get the measurements that are missing a scale.
|
|
105
|
+
*
|
|
106
|
+
* # Returns
|
|
107
|
+
*
|
|
108
|
+
* * `Vec<MeasurementWrapper>` - The measurements that are missing a scale.
|
|
109
|
+
*/
|
|
110
|
+
getMeasurementsMissingScale(): Array<MeasurementWrapper>
|
|
111
|
+
|
|
81
112
|
}
|
|
82
113
|
|
|
83
114
|
export declare function plus100(input: number): number
|
|
115
|
+
export declare class UnitValue {
|
|
116
|
+
constructor(value: number, unit: Unit, magnitude: UnitValueItemType)
|
|
117
|
+
display(unit: Unit): string
|
|
118
|
+
getConvertedValue(to: Unit): number
|
|
119
|
+
}
|
|
120
|
+
|
|
84
121
|
export interface Group {
|
|
85
122
|
id: string
|
|
86
123
|
name?: string
|
|
@@ -141,3 +178,6 @@ export type Unit = /** Imperial units */
|
|
|
141
178
|
/** Metric units */
|
|
142
179
|
'Meters'|
|
|
143
180
|
'Centimeters';
|
|
181
|
+
|
|
182
|
+
export type UnitValueItemType = 'Area'|
|
|
183
|
+
'Length';
|
package/index.js
CHANGED
|
@@ -81,12 +81,12 @@ function requireNative() {
|
|
|
81
81
|
const bindingPackageVersion =
|
|
82
82
|
require("@build-qube/takeoff-calculator-android-arm64/package.json").version;
|
|
83
83
|
if (
|
|
84
|
-
bindingPackageVersion !== "1.
|
|
84
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
85
85
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
86
86
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
87
87
|
) {
|
|
88
88
|
throw new Error(
|
|
89
|
-
`Native binding package version mismatch, expected 1.
|
|
89
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
return binding;
|
|
@@ -104,12 +104,12 @@ function requireNative() {
|
|
|
104
104
|
const bindingPackageVersion =
|
|
105
105
|
require("@build-qube/takeoff-calculator-android-arm-eabi/package.json").version;
|
|
106
106
|
if (
|
|
107
|
-
bindingPackageVersion !== "1.
|
|
107
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
108
108
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
109
109
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
110
110
|
) {
|
|
111
111
|
throw new Error(
|
|
112
|
-
`Native binding package version mismatch, expected 1.
|
|
112
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
return binding;
|
|
@@ -137,12 +137,12 @@ function requireNative() {
|
|
|
137
137
|
const bindingPackageVersion =
|
|
138
138
|
require("@build-qube/takeoff-calculator-win32-x64-gnu/package.json").version;
|
|
139
139
|
if (
|
|
140
|
-
bindingPackageVersion !== "1.
|
|
140
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
141
141
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
142
142
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
143
143
|
) {
|
|
144
144
|
throw new Error(
|
|
145
|
-
`Native binding package version mismatch, expected 1.
|
|
145
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
return binding;
|
|
@@ -160,12 +160,12 @@ function requireNative() {
|
|
|
160
160
|
const bindingPackageVersion =
|
|
161
161
|
require("@build-qube/takeoff-calculator-win32-x64-msvc/package.json").version;
|
|
162
162
|
if (
|
|
163
|
-
bindingPackageVersion !== "1.
|
|
163
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
164
164
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
165
165
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
166
166
|
) {
|
|
167
167
|
throw new Error(
|
|
168
|
-
`Native binding package version mismatch, expected 1.
|
|
168
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
171
|
return binding;
|
|
@@ -184,12 +184,12 @@ function requireNative() {
|
|
|
184
184
|
const bindingPackageVersion =
|
|
185
185
|
require("@build-qube/takeoff-calculator-win32-ia32-msvc/package.json").version;
|
|
186
186
|
if (
|
|
187
|
-
bindingPackageVersion !== "1.
|
|
187
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
188
188
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
189
189
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
190
190
|
) {
|
|
191
191
|
throw new Error(
|
|
192
|
-
`Native binding package version mismatch, expected 1.
|
|
192
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
195
|
return binding;
|
|
@@ -207,12 +207,12 @@ function requireNative() {
|
|
|
207
207
|
const bindingPackageVersion =
|
|
208
208
|
require("@build-qube/takeoff-calculator-win32-arm64-msvc/package.json").version;
|
|
209
209
|
if (
|
|
210
|
-
bindingPackageVersion !== "1.
|
|
210
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
211
211
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
212
212
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
213
213
|
) {
|
|
214
214
|
throw new Error(
|
|
215
|
-
`Native binding package version mismatch, expected 1.
|
|
215
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
return binding;
|
|
@@ -235,12 +235,12 @@ function requireNative() {
|
|
|
235
235
|
const bindingPackageVersion =
|
|
236
236
|
require("@build-qube/takeoff-calculator-darwin-universal/package.json").version;
|
|
237
237
|
if (
|
|
238
|
-
bindingPackageVersion !== "1.
|
|
238
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
239
239
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
240
240
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
241
241
|
) {
|
|
242
242
|
throw new Error(
|
|
243
|
-
`Native binding package version mismatch, expected 1.
|
|
243
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
return binding;
|
|
@@ -258,12 +258,12 @@ function requireNative() {
|
|
|
258
258
|
const bindingPackageVersion =
|
|
259
259
|
require("@build-qube/takeoff-calculator-darwin-x64/package.json").version;
|
|
260
260
|
if (
|
|
261
|
-
bindingPackageVersion !== "1.
|
|
261
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
262
262
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
263
263
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
264
264
|
) {
|
|
265
265
|
throw new Error(
|
|
266
|
-
`Native binding package version mismatch, expected 1.
|
|
266
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
269
|
return binding;
|
|
@@ -281,12 +281,12 @@ function requireNative() {
|
|
|
281
281
|
const bindingPackageVersion =
|
|
282
282
|
require("@build-qube/takeoff-calculator-darwin-arm64/package.json").version;
|
|
283
283
|
if (
|
|
284
|
-
bindingPackageVersion !== "1.
|
|
284
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
285
285
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
286
286
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
287
287
|
) {
|
|
288
288
|
throw new Error(
|
|
289
|
-
`Native binding package version mismatch, expected 1.
|
|
289
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
return binding;
|
|
@@ -310,12 +310,12 @@ function requireNative() {
|
|
|
310
310
|
const bindingPackageVersion =
|
|
311
311
|
require("@build-qube/takeoff-calculator-freebsd-x64/package.json").version;
|
|
312
312
|
if (
|
|
313
|
-
bindingPackageVersion !== "1.
|
|
313
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
314
314
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
315
315
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
316
316
|
) {
|
|
317
317
|
throw new Error(
|
|
318
|
-
`Native binding package version mismatch, expected 1.
|
|
318
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
321
|
return binding;
|
|
@@ -333,12 +333,12 @@ function requireNative() {
|
|
|
333
333
|
const bindingPackageVersion =
|
|
334
334
|
require("@build-qube/takeoff-calculator-freebsd-arm64/package.json").version;
|
|
335
335
|
if (
|
|
336
|
-
bindingPackageVersion !== "1.
|
|
336
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
337
337
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
338
338
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
339
339
|
) {
|
|
340
340
|
throw new Error(
|
|
341
|
-
`Native binding package version mismatch, expected 1.
|
|
341
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
344
|
return binding;
|
|
@@ -363,12 +363,12 @@ function requireNative() {
|
|
|
363
363
|
const bindingPackageVersion =
|
|
364
364
|
require("@build-qube/takeoff-calculator-linux-x64-musl/package.json").version;
|
|
365
365
|
if (
|
|
366
|
-
bindingPackageVersion !== "1.
|
|
366
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
367
367
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
368
368
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
369
369
|
) {
|
|
370
370
|
throw new Error(
|
|
371
|
-
`Native binding package version mismatch, expected 1.
|
|
371
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
372
372
|
);
|
|
373
373
|
}
|
|
374
374
|
return binding;
|
|
@@ -386,12 +386,12 @@ function requireNative() {
|
|
|
386
386
|
const bindingPackageVersion =
|
|
387
387
|
require("@build-qube/takeoff-calculator-linux-x64-gnu/package.json").version;
|
|
388
388
|
if (
|
|
389
|
-
bindingPackageVersion !== "1.
|
|
389
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
390
390
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
391
391
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
392
392
|
) {
|
|
393
393
|
throw new Error(
|
|
394
|
-
`Native binding package version mismatch, expected 1.
|
|
394
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
395
395
|
);
|
|
396
396
|
}
|
|
397
397
|
return binding;
|
|
@@ -411,12 +411,12 @@ function requireNative() {
|
|
|
411
411
|
const bindingPackageVersion =
|
|
412
412
|
require("@build-qube/takeoff-calculator-linux-arm64-musl/package.json").version;
|
|
413
413
|
if (
|
|
414
|
-
bindingPackageVersion !== "1.
|
|
414
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
415
415
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
416
416
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
417
417
|
) {
|
|
418
418
|
throw new Error(
|
|
419
|
-
`Native binding package version mismatch, expected 1.
|
|
419
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
420
420
|
);
|
|
421
421
|
}
|
|
422
422
|
return binding;
|
|
@@ -434,12 +434,12 @@ function requireNative() {
|
|
|
434
434
|
const bindingPackageVersion =
|
|
435
435
|
require("@build-qube/takeoff-calculator-linux-arm64-gnu/package.json").version;
|
|
436
436
|
if (
|
|
437
|
-
bindingPackageVersion !== "1.
|
|
437
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
438
438
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
439
439
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
440
440
|
) {
|
|
441
441
|
throw new Error(
|
|
442
|
-
`Native binding package version mismatch, expected 1.
|
|
442
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
445
|
return binding;
|
|
@@ -459,12 +459,12 @@ function requireNative() {
|
|
|
459
459
|
const bindingPackageVersion =
|
|
460
460
|
require("@build-qube/takeoff-calculator-linux-arm-musleabihf/package.json").version;
|
|
461
461
|
if (
|
|
462
|
-
bindingPackageVersion !== "1.
|
|
462
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
463
463
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
464
464
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
465
465
|
) {
|
|
466
466
|
throw new Error(
|
|
467
|
-
`Native binding package version mismatch, expected 1.
|
|
467
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
470
|
return binding;
|
|
@@ -482,12 +482,12 @@ function requireNative() {
|
|
|
482
482
|
const bindingPackageVersion =
|
|
483
483
|
require("@build-qube/takeoff-calculator-linux-arm-gnueabihf/package.json").version;
|
|
484
484
|
if (
|
|
485
|
-
bindingPackageVersion !== "1.
|
|
485
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
486
486
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
487
487
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
488
488
|
) {
|
|
489
489
|
throw new Error(
|
|
490
|
-
`Native binding package version mismatch, expected 1.
|
|
490
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
491
491
|
);
|
|
492
492
|
}
|
|
493
493
|
return binding;
|
|
@@ -507,12 +507,12 @@ function requireNative() {
|
|
|
507
507
|
const bindingPackageVersion =
|
|
508
508
|
require("@build-qube/takeoff-calculator-linux-loong64-musl/package.json").version;
|
|
509
509
|
if (
|
|
510
|
-
bindingPackageVersion !== "1.
|
|
510
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
511
511
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
512
512
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
513
513
|
) {
|
|
514
514
|
throw new Error(
|
|
515
|
-
`Native binding package version mismatch, expected 1.
|
|
515
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
516
516
|
);
|
|
517
517
|
}
|
|
518
518
|
return binding;
|
|
@@ -530,12 +530,12 @@ function requireNative() {
|
|
|
530
530
|
const bindingPackageVersion =
|
|
531
531
|
require("@build-qube/takeoff-calculator-linux-loong64-gnu/package.json").version;
|
|
532
532
|
if (
|
|
533
|
-
bindingPackageVersion !== "1.
|
|
533
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
534
534
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
535
535
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
536
536
|
) {
|
|
537
537
|
throw new Error(
|
|
538
|
-
`Native binding package version mismatch, expected 1.
|
|
538
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
539
539
|
);
|
|
540
540
|
}
|
|
541
541
|
return binding;
|
|
@@ -555,12 +555,12 @@ function requireNative() {
|
|
|
555
555
|
const bindingPackageVersion =
|
|
556
556
|
require("@build-qube/takeoff-calculator-linux-riscv64-musl/package.json").version;
|
|
557
557
|
if (
|
|
558
|
-
bindingPackageVersion !== "1.
|
|
558
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
559
559
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
560
560
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
561
561
|
) {
|
|
562
562
|
throw new Error(
|
|
563
|
-
`Native binding package version mismatch, expected 1.
|
|
563
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
564
564
|
);
|
|
565
565
|
}
|
|
566
566
|
return binding;
|
|
@@ -578,12 +578,12 @@ function requireNative() {
|
|
|
578
578
|
const bindingPackageVersion =
|
|
579
579
|
require("@build-qube/takeoff-calculator-linux-riscv64-gnu/package.json").version;
|
|
580
580
|
if (
|
|
581
|
-
bindingPackageVersion !== "1.
|
|
581
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
582
582
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
583
583
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
584
584
|
) {
|
|
585
585
|
throw new Error(
|
|
586
|
-
`Native binding package version mismatch, expected 1.
|
|
586
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
587
587
|
);
|
|
588
588
|
}
|
|
589
589
|
return binding;
|
|
@@ -602,12 +602,12 @@ function requireNative() {
|
|
|
602
602
|
const bindingPackageVersion =
|
|
603
603
|
require("@build-qube/takeoff-calculator-linux-ppc64-gnu/package.json").version;
|
|
604
604
|
if (
|
|
605
|
-
bindingPackageVersion !== "1.
|
|
605
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
606
606
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
607
607
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
608
608
|
) {
|
|
609
609
|
throw new Error(
|
|
610
|
-
`Native binding package version mismatch, expected 1.
|
|
610
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
611
611
|
);
|
|
612
612
|
}
|
|
613
613
|
return binding;
|
|
@@ -625,12 +625,12 @@ function requireNative() {
|
|
|
625
625
|
const bindingPackageVersion =
|
|
626
626
|
require("@build-qube/takeoff-calculator-linux-s390x-gnu/package.json").version;
|
|
627
627
|
if (
|
|
628
|
-
bindingPackageVersion !== "1.
|
|
628
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
629
629
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
630
630
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
631
631
|
) {
|
|
632
632
|
throw new Error(
|
|
633
|
-
`Native binding package version mismatch, expected 1.
|
|
633
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
634
634
|
);
|
|
635
635
|
}
|
|
636
636
|
return binding;
|
|
@@ -654,12 +654,12 @@ function requireNative() {
|
|
|
654
654
|
const bindingPackageVersion =
|
|
655
655
|
require("@build-qube/takeoff-calculator-openharmony-arm64/package.json").version;
|
|
656
656
|
if (
|
|
657
|
-
bindingPackageVersion !== "1.
|
|
657
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
658
658
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
659
659
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
660
660
|
) {
|
|
661
661
|
throw new Error(
|
|
662
|
-
`Native binding package version mismatch, expected 1.
|
|
662
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
663
663
|
);
|
|
664
664
|
}
|
|
665
665
|
return binding;
|
|
@@ -677,12 +677,12 @@ function requireNative() {
|
|
|
677
677
|
const bindingPackageVersion =
|
|
678
678
|
require("@build-qube/takeoff-calculator-openharmony-x64/package.json").version;
|
|
679
679
|
if (
|
|
680
|
-
bindingPackageVersion !== "1.
|
|
680
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
681
681
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
682
682
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
683
683
|
) {
|
|
684
684
|
throw new Error(
|
|
685
|
-
`Native binding package version mismatch, expected 1.
|
|
685
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
688
|
return binding;
|
|
@@ -700,12 +700,12 @@ function requireNative() {
|
|
|
700
700
|
const bindingPackageVersion =
|
|
701
701
|
require("@build-qube/takeoff-calculator-openharmony-arm/package.json").version;
|
|
702
702
|
if (
|
|
703
|
-
bindingPackageVersion !== "1.
|
|
703
|
+
bindingPackageVersion !== "1.3.4" &&
|
|
704
704
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
705
705
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
706
706
|
) {
|
|
707
707
|
throw new Error(
|
|
708
|
-
`Native binding package version mismatch, expected 1.
|
|
708
|
+
`Native binding package version mismatch, expected 1.3.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
711
|
return binding;
|
|
@@ -781,7 +781,11 @@ if (!nativeBinding) {
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
module.exports = nativeBinding;
|
|
784
|
-
module.exports.
|
|
784
|
+
module.exports.GroupWrapper = nativeBinding.GroupWrapper;
|
|
785
|
+
module.exports.MeasurementWrapper = nativeBinding.MeasurementWrapper;
|
|
786
|
+
module.exports.TakeoffStateHandler = nativeBinding.TakeoffStateHandler;
|
|
785
787
|
module.exports.plus100 = nativeBinding.plus100;
|
|
788
|
+
module.exports.UnitValue = nativeBinding.UnitValue;
|
|
786
789
|
module.exports.MeasurementType = nativeBinding.MeasurementType;
|
|
787
790
|
module.exports.Unit = nativeBinding.Unit;
|
|
791
|
+
module.exports.UnitValueItemType = nativeBinding.UnitValueItemType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@build-qube/takeoff-calculator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Template project for writing node package with napi-rs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@emnapi/core": "^1.5.0",
|
|
53
53
|
"@emnapi/runtime": "^1.5.0",
|
|
54
|
+
"@faker-js/faker": "^10.2.0",
|
|
54
55
|
"@napi-rs/cli": "^3.5.1",
|
|
55
56
|
"@napi-rs/wasm-runtime": "^1.1.0",
|
|
56
57
|
"@oxc-node/core": "^0.0.35",
|
|
@@ -81,16 +82,16 @@
|
|
|
81
82
|
]
|
|
82
83
|
},
|
|
83
84
|
"optionalDependencies": {
|
|
84
|
-
"@build-qube/takeoff-calculator-darwin-x64": "
|
|
85
|
-
"@build-qube/takeoff-calculator-darwin-arm64": "
|
|
86
|
-
"@build-qube/takeoff-calculator-linux-x64-gnu": "
|
|
87
|
-
"@build-qube/takeoff-calculator-win32-x64-msvc": "
|
|
88
|
-
"@build-qube/takeoff-calculator-linux-x64-musl": "
|
|
89
|
-
"@build-qube/takeoff-calculator-linux-arm64-gnu": "
|
|
90
|
-
"@build-qube/takeoff-calculator-linux-arm-gnueabihf": "
|
|
91
|
-
"@build-qube/takeoff-calculator-linux-arm64-musl": "
|
|
92
|
-
"@build-qube/takeoff-calculator-win32-arm64-msvc": "
|
|
93
|
-
"@build-qube/takeoff-calculator-wasm32-wasi": "
|
|
85
|
+
"@build-qube/takeoff-calculator-darwin-x64": "2.0.0",
|
|
86
|
+
"@build-qube/takeoff-calculator-darwin-arm64": "2.0.0",
|
|
87
|
+
"@build-qube/takeoff-calculator-linux-x64-gnu": "2.0.0",
|
|
88
|
+
"@build-qube/takeoff-calculator-win32-x64-msvc": "2.0.0",
|
|
89
|
+
"@build-qube/takeoff-calculator-linux-x64-musl": "2.0.0",
|
|
90
|
+
"@build-qube/takeoff-calculator-linux-arm64-gnu": "2.0.0",
|
|
91
|
+
"@build-qube/takeoff-calculator-linux-arm-gnueabihf": "2.0.0",
|
|
92
|
+
"@build-qube/takeoff-calculator-linux-arm64-musl": "2.0.0",
|
|
93
|
+
"@build-qube/takeoff-calculator-win32-arm64-msvc": "2.0.0",
|
|
94
|
+
"@build-qube/takeoff-calculator-wasm32-wasi": "2.0.0"
|
|
94
95
|
},
|
|
95
96
|
"scripts": {
|
|
96
97
|
"artifacts": "napi artifacts",
|