sane-wasm 0.4.0 → 0.5.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/build/libsane.js CHANGED
@@ -137,7 +137,7 @@ Module["ready"] = new Promise((resolve, reject) => {
137
137
  sane_control_option_get_value: true,
138
138
  sane_control_option_set_value: true,
139
139
  sane_control_option_set_auto: true,
140
- sane_get_parameters: false,
140
+ sane_get_parameters: true,
141
141
  sane_start: true,
142
142
  sane_read: true,
143
143
  sane_cancel: true,
Binary file
package/dist/index.d.ts CHANGED
@@ -360,13 +360,13 @@ export interface LibSANE {
360
360
  * Equivalent to the SANE API C function `sane_get_parameters`.
361
361
  * @see {@link https://sane-project.gitlab.io/standard/1.06/api.html#sane-get-parameters}
362
362
  */
363
- sane_get_parameters: () => {
363
+ sane_get_parameters: () => Promise<{
364
364
  status: SANEStatus.GOOD;
365
365
  parameters: SANEParameters;
366
366
  } | {
367
367
  status: Exclude<SANEStatus, SANEStatus.GOOD>;
368
368
  parameters: null;
369
- };
369
+ }>;
370
370
  /**
371
371
  * Equivalent to the SANE API C function `sane_start`.
372
372
  * @see {@link https://sane-project.gitlab.io/standard/1.06/api.html#sane-start}
package/dist/readers.js CHANGED
@@ -155,7 +155,7 @@ class ScanDataReader extends EventBaseClass {
155
155
  // after successful start, sane_cancel needs to be called and we need
156
156
  // to wait for sane_read, so subsequent fails need to use this._killed
157
157
  // and run the read loop
158
- const { status, parameters } = this._lib.sane_get_parameters();
158
+ const { status, parameters } = yield this._lib.sane_get_parameters();
159
159
  if (status !== _1.SANEStatus.GOOD) {
160
160
  this._killed = new Error(`Status ${_1.SANEStatus[status]} during sane_get_parameters().`);
161
161
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sane-wasm",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A project to bring the SANE API to the web.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",