@printers/printers-linux-arm64-gnu 0.7.3 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -49,6 +49,15 @@ export declare function getJobStatus(jobId: number): JobStatus | null
49
49
  /** Get the status of a print job (new format) */
50
50
  export declare function getPrinterJob(jobId: number): PrinterJob | null
51
51
 
52
+ /**
53
+ * Get a snapshot of current printer states
54
+ * Returns a map of printer names to their current state and state reasons
55
+ */
56
+ export declare function getPrinterStateSnapshot(): Record<string, [string, Array<string>]>
57
+
58
+ /** Check if state monitoring is active */
59
+ export declare function isStateMonitoringActive(): boolean
60
+
52
61
  /** Legacy job status interface for backward compatibility */
53
62
  export interface JobStatus {
54
63
  id: number
@@ -123,8 +132,27 @@ export declare const enum PrintErrorCode {
123
132
  FileNotFound = 7
124
133
  }
125
134
 
135
+ /** Printer state change event for JavaScript */
136
+ export interface PrinterStateChangeEvent {
137
+ eventType: string
138
+ printerName: string
139
+ oldState?: string
140
+ newState?: string
141
+ oldReasons?: Array<string>
142
+ newReasons?: Array<string>
143
+ }
144
+
126
145
  /** Print a file using printer name (async) */
127
146
  export declare function printFile(printerName: string, filePath: string, jobProperties?: Record<string, string> | undefined | null, waitForCompletion?: boolean | undefined | null): Promise<unknown>
128
147
 
148
+ /** Set the polling interval for state monitoring (in seconds) */
149
+ export declare function setStateMonitoringInterval(seconds: number): void
150
+
129
151
  /** Shutdown the library and cleanup all background threads */
130
152
  export declare function shutdown(): void
153
+
154
+ /** Start global printer state monitoring */
155
+ export declare function startStateMonitoring(): void
156
+
157
+ /** Stop global printer state monitoring */
158
+ export declare function stopStateMonitoring(): void
package/index.js CHANGED
@@ -74,8 +74,8 @@ function requireNative() {
74
74
  try {
75
75
  const binding = require('@printers/printers-android-arm64')
76
76
  const bindingPackageVersion = require('@printers/printers-android-arm64/package.json').version
77
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
78
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
77
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
78
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
79
79
  }
80
80
  return binding
81
81
  } catch (e) {
@@ -90,8 +90,8 @@ function requireNative() {
90
90
  try {
91
91
  const binding = require('@printers/printers-android-arm-eabi')
92
92
  const bindingPackageVersion = require('@printers/printers-android-arm-eabi/package.json').version
93
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
94
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
93
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
94
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
95
95
  }
96
96
  return binding
97
97
  } catch (e) {
@@ -110,8 +110,8 @@ function requireNative() {
110
110
  try {
111
111
  const binding = require('@printers/printers-win32-x64-msvc')
112
112
  const bindingPackageVersion = require('@printers/printers-win32-x64-msvc/package.json').version
113
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
115
  }
116
116
  return binding
117
117
  } catch (e) {
@@ -126,8 +126,8 @@ function requireNative() {
126
126
  try {
127
127
  const binding = require('@printers/printers-win32-ia32-msvc')
128
128
  const bindingPackageVersion = require('@printers/printers-win32-ia32-msvc/package.json').version
129
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
129
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
131
  }
132
132
  return binding
133
133
  } catch (e) {
@@ -142,8 +142,8 @@ function requireNative() {
142
142
  try {
143
143
  const binding = require('@printers/printers-win32-arm64-msvc')
144
144
  const bindingPackageVersion = require('@printers/printers-win32-arm64-msvc/package.json').version
145
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
145
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
147
147
  }
148
148
  return binding
149
149
  } catch (e) {
@@ -161,8 +161,8 @@ function requireNative() {
161
161
  try {
162
162
  const binding = require('@printers/printers-darwin-universal')
163
163
  const bindingPackageVersion = require('@printers/printers-darwin-universal/package.json').version
164
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
165
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
165
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
166
  }
167
167
  return binding
168
168
  } catch (e) {
@@ -177,8 +177,8 @@ function requireNative() {
177
177
  try {
178
178
  const binding = require('@printers/printers-darwin-x64')
179
179
  const bindingPackageVersion = require('@printers/printers-darwin-x64/package.json').version
180
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
181
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
180
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
181
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
182
182
  }
183
183
  return binding
184
184
  } catch (e) {
@@ -193,8 +193,8 @@ function requireNative() {
193
193
  try {
194
194
  const binding = require('@printers/printers-darwin-arm64')
195
195
  const bindingPackageVersion = require('@printers/printers-darwin-arm64/package.json').version
196
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
197
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
196
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
197
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
198
198
  }
199
199
  return binding
200
200
  } catch (e) {
@@ -213,8 +213,8 @@ function requireNative() {
213
213
  try {
214
214
  const binding = require('@printers/printers-freebsd-x64')
215
215
  const bindingPackageVersion = require('@printers/printers-freebsd-x64/package.json').version
216
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
217
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
216
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
217
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
218
218
  }
219
219
  return binding
220
220
  } catch (e) {
@@ -229,8 +229,8 @@ function requireNative() {
229
229
  try {
230
230
  const binding = require('@printers/printers-freebsd-arm64')
231
231
  const bindingPackageVersion = require('@printers/printers-freebsd-arm64/package.json').version
232
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
233
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
232
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
233
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
234
234
  }
235
235
  return binding
236
236
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('@printers/printers-linux-x64-musl')
252
252
  const bindingPackageVersion = require('@printers/printers-linux-x64-musl/package.json').version
253
- if (bindingPackageVersion !== '0.7.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.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.8.0' && 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.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -266,8 +266,8 @@ function requireNative() {
266
266
  try {
267
267
  const binding = require('@printers/printers-linux-x64-gnu')
268
268
  const bindingPackageVersion = require('@printers/printers-linux-x64-gnu/package.json').version
269
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
270
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
269
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
270
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
271
271
  }
272
272
  return binding
273
273
  } catch (e) {
@@ -284,8 +284,8 @@ function requireNative() {
284
284
  try {
285
285
  const binding = require('@printers/printers-linux-arm64-musl')
286
286
  const bindingPackageVersion = require('@printers/printers-linux-arm64-musl/package.json').version
287
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
288
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
287
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
288
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
289
289
  }
290
290
  return binding
291
291
  } catch (e) {
@@ -300,8 +300,8 @@ function requireNative() {
300
300
  try {
301
301
  const binding = require('@printers/printers-linux-arm64-gnu')
302
302
  const bindingPackageVersion = require('@printers/printers-linux-arm64-gnu/package.json').version
303
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
304
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
303
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
304
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
305
305
  }
306
306
  return binding
307
307
  } catch (e) {
@@ -318,8 +318,8 @@ function requireNative() {
318
318
  try {
319
319
  const binding = require('@printers/printers-linux-arm-musleabihf')
320
320
  const bindingPackageVersion = require('@printers/printers-linux-arm-musleabihf/package.json').version
321
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
322
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
321
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
322
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
323
  }
324
324
  return binding
325
325
  } catch (e) {
@@ -334,8 +334,8 @@ function requireNative() {
334
334
  try {
335
335
  const binding = require('@printers/printers-linux-arm-gnueabihf')
336
336
  const bindingPackageVersion = require('@printers/printers-linux-arm-gnueabihf/package.json').version
337
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
338
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
337
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
338
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
339
339
  }
340
340
  return binding
341
341
  } catch (e) {
@@ -352,8 +352,8 @@ function requireNative() {
352
352
  try {
353
353
  const binding = require('@printers/printers-linux-riscv64-musl')
354
354
  const bindingPackageVersion = require('@printers/printers-linux-riscv64-musl/package.json').version
355
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
356
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
355
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
356
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
357
  }
358
358
  return binding
359
359
  } catch (e) {
@@ -368,8 +368,8 @@ function requireNative() {
368
368
  try {
369
369
  const binding = require('@printers/printers-linux-riscv64-gnu')
370
370
  const bindingPackageVersion = require('@printers/printers-linux-riscv64-gnu/package.json').version
371
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
372
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
371
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
372
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
373
373
  }
374
374
  return binding
375
375
  } catch (e) {
@@ -385,8 +385,8 @@ function requireNative() {
385
385
  try {
386
386
  const binding = require('@printers/printers-linux-ppc64-gnu')
387
387
  const bindingPackageVersion = require('@printers/printers-linux-ppc64-gnu/package.json').version
388
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
388
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
390
  }
391
391
  return binding
392
392
  } catch (e) {
@@ -401,8 +401,8 @@ function requireNative() {
401
401
  try {
402
402
  const binding = require('@printers/printers-linux-s390x-gnu')
403
403
  const bindingPackageVersion = require('@printers/printers-linux-s390x-gnu/package.json').version
404
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
404
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
406
406
  }
407
407
  return binding
408
408
  } catch (e) {
@@ -421,8 +421,8 @@ function requireNative() {
421
421
  try {
422
422
  const binding = require('@printers/printers-openharmony-arm64')
423
423
  const bindingPackageVersion = require('@printers/printers-openharmony-arm64/package.json').version
424
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
425
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
425
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
426
  }
427
427
  return binding
428
428
  } catch (e) {
@@ -437,8 +437,8 @@ function requireNative() {
437
437
  try {
438
438
  const binding = require('@printers/printers-openharmony-x64')
439
439
  const bindingPackageVersion = require('@printers/printers-openharmony-x64/package.json').version
440
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
441
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
440
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
441
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
442
442
  }
443
443
  return binding
444
444
  } catch (e) {
@@ -453,8 +453,8 @@ function requireNative() {
453
453
  try {
454
454
  const binding = require('@printers/printers-openharmony-arm')
455
455
  const bindingPackageVersion = require('@printers/printers-openharmony-arm/package.json').version
456
- if (bindingPackageVersion !== '0.7.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
457
- throw new Error(`Native binding package version mismatch, expected 0.7.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
456
+ if (bindingPackageVersion !== '0.8.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
457
+ throw new Error(`Native binding package version mismatch, expected 0.8.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
458
458
  }
459
459
  return binding
460
460
  } catch (e) {
@@ -501,7 +501,7 @@ if (!nativeBinding) {
501
501
  throw new Error(`Failed to load native binding`)
502
502
  }
503
503
 
504
- const { Printer, cleanupOldJobs, findPrinterByName, getActiveJobs, getActiveJobsForPrinter, getAllJobsForPrinter, getAllPrinterNames, getAllPrinters, getJobHistory, getJobHistoryForPrinter, getJobStatus, getPrinterJob, printBytes, printerCleanupOldJobs, printerExists, printerGetActiveJobs, printerGetAllJobs, printerGetJob, printerGetJobHistory, PrintErrorCode, printFile, shutdown } = nativeBinding
504
+ const { Printer, cleanupOldJobs, findPrinterByName, getActiveJobs, getActiveJobsForPrinter, getAllJobsForPrinter, getAllPrinterNames, getAllPrinters, getJobHistory, getJobHistoryForPrinter, getJobStatus, getPrinterJob, getPrinterStateSnapshot, isStateMonitoringActive, printBytes, printerCleanupOldJobs, printerExists, printerGetActiveJobs, printerGetAllJobs, printerGetJob, printerGetJobHistory, PrintErrorCode, printFile, setStateMonitoringInterval, shutdown, startStateMonitoring, stopStateMonitoring } = nativeBinding
505
505
  export { Printer }
506
506
  export { cleanupOldJobs }
507
507
  export { findPrinterByName }
@@ -514,6 +514,8 @@ export { getJobHistory }
514
514
  export { getJobHistoryForPrinter }
515
515
  export { getJobStatus }
516
516
  export { getPrinterJob }
517
+ export { getPrinterStateSnapshot }
518
+ export { isStateMonitoringActive }
517
519
  export { printBytes }
518
520
  export { printerCleanupOldJobs }
519
521
  export { printerExists }
@@ -523,4 +525,7 @@ export { printerGetJob }
523
525
  export { printerGetJobHistory }
524
526
  export { PrintErrorCode }
525
527
  export { printFile }
528
+ export { setStateMonitoringInterval }
526
529
  export { shutdown }
530
+ export { startStateMonitoring }
531
+ export { stopStateMonitoring }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@printers/printers-linux-arm64-gnu",
3
- "version": "0.7.3",
3
+ "version": "0.8.0",
4
4
  "cpu": [
5
5
  "arm64"
6
6
  ],
Binary file