@printers/printers-linux-arm64-gnu 0.5.10 → 0.6.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
@@ -12,6 +12,8 @@ export declare class Printer {
12
12
  exists(): boolean
13
13
  /** Print a file (async) */
14
14
  printFile(filePath: string, jobProperties?: Record<string, string> | undefined | null): Promise<unknown>
15
+ /** Print raw bytes (async) */
16
+ printBytes(data: Buffer, jobProperties?: Record<string, string> | undefined | null): Promise<unknown>
15
17
  }
16
18
 
17
19
  /** Clean up old completed/failed jobs */
@@ -20,25 +22,47 @@ export declare function cleanupOldJobs(maxAgeSeconds: number): number
20
22
  /** Find a printer by name */
21
23
  export declare function findPrinterByName(name: string): Printer | null
22
24
 
25
+ /** Get all active jobs (pending or processing) */
26
+ export declare function getActiveJobs(): Array<PrinterJob>
27
+
28
+ /** Get active jobs for a specific printer */
29
+ export declare function getActiveJobsForPrinter(printerName: string): Array<PrinterJob>
30
+
31
+ /** Get all jobs for a specific printer */
32
+ export declare function getAllJobsForPrinter(printerName: string): Array<PrinterJob>
33
+
23
34
  /** Get all available printer names */
24
35
  export declare function getAllPrinterNames(): Array<string>
25
36
 
26
37
  /** Get all available printers */
27
38
  export declare function getAllPrinters(): Array<PrinterInfo>
28
39
 
29
- /** Get the status of a print job */
40
+ /** Get job history (completed or cancelled jobs) */
41
+ export declare function getJobHistory(): Array<PrinterJob>
42
+
43
+ /** Get job history for a specific printer */
44
+ export declare function getJobHistoryForPrinter(printerName: string): Array<PrinterJob>
45
+
46
+ /** Get the status of a print job (legacy format for backward compatibility) */
30
47
  export declare function getJobStatus(jobId: number): JobStatus | null
31
48
 
32
- /** Job status interface */
49
+ /** Get the status of a print job (new format) */
50
+ export declare function getPrinterJob(jobId: number): PrinterJob | null
51
+
52
+ /** Legacy job status interface for backward compatibility */
33
53
  export interface JobStatus {
34
54
  id: number
35
55
  printerName: string
36
56
  filePath: string
57
+ jobName?: string
37
58
  status: string
38
59
  errorMessage?: string
39
60
  ageSeconds: number
40
61
  }
41
62
 
63
+ /** Print raw bytes using printer name (async) */
64
+ export declare function printBytes(printerName: string, data: Buffer, jobProperties?: Record<string, string> | undefined | null): Promise<unknown>
65
+
42
66
  /** Check if a printer exists by name */
43
67
  export declare function printerExists(name: string): boolean
44
68
 
@@ -59,6 +83,20 @@ export interface PrinterInfo {
59
83
  stateReasons: Array<string>
60
84
  }
61
85
 
86
+ /** Print job interface matching upstream printers crate */
87
+ export interface PrinterJob {
88
+ id: number
89
+ name: string
90
+ state: string
91
+ mediaType: string
92
+ createdAt: number
93
+ processedAt?: number
94
+ completedAt?: number
95
+ printerName: string
96
+ errorMessage?: string
97
+ ageSeconds: number
98
+ }
99
+
62
100
  /** Error codes for printing operations */
63
101
  export declare const enum PrintErrorCode {
64
102
  InvalidParams = 1,
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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
77
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
93
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
129
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
145
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
180
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
196
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
216
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
232
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
269
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
287
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
303
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
321
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
337
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
355
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
371
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
388
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
404
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
440
+ if (bindingPackageVersion !== '0.6.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.6.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.5.10' && 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.5.10 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
456
+ if (bindingPackageVersion !== '0.6.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.6.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
458
458
  }
459
459
  return binding
460
460
  } catch (e) {
@@ -501,13 +501,20 @@ if (!nativeBinding) {
501
501
  throw new Error(`Failed to load native binding`)
502
502
  }
503
503
 
504
- const { Printer, cleanupOldJobs, findPrinterByName, getAllPrinterNames, getAllPrinters, getJobStatus, printerExists, PrintErrorCode, printFile, shutdown } = nativeBinding
504
+ const { Printer, cleanupOldJobs, findPrinterByName, getActiveJobs, getActiveJobsForPrinter, getAllJobsForPrinter, getAllPrinterNames, getAllPrinters, getJobHistory, getJobHistoryForPrinter, getJobStatus, getPrinterJob, printBytes, printerExists, PrintErrorCode, printFile, shutdown } = nativeBinding
505
505
  export { Printer }
506
506
  export { cleanupOldJobs }
507
507
  export { findPrinterByName }
508
+ export { getActiveJobs }
509
+ export { getActiveJobsForPrinter }
510
+ export { getAllJobsForPrinter }
508
511
  export { getAllPrinterNames }
509
512
  export { getAllPrinters }
513
+ export { getJobHistory }
514
+ export { getJobHistoryForPrinter }
510
515
  export { getJobStatus }
516
+ export { getPrinterJob }
517
+ export { printBytes }
511
518
  export { printerExists }
512
519
  export { PrintErrorCode }
513
520
  export { printFile }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@printers/printers-linux-arm64-gnu",
3
- "version": "0.5.10",
3
+ "version": "0.6.0",
4
4
  "cpu": [
5
5
  "arm64"
6
6
  ],
Binary file