label-printer 0.7.4 → 0.7.5

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 CHANGED
@@ -279,6 +279,7 @@ print/display command sequences.
279
279
  - `display(label, direction?, mirror?)`
280
280
  - `getModelname()`
281
281
  - `getStatus()`
282
+ - `writeRawString(text)`
282
283
  - `close()`
283
284
 
284
285
  - **`PrinterStatus`**
package/dist/index.d.mts CHANGED
@@ -839,6 +839,11 @@ declare abstract class Printer {
839
839
  * @param command Command to send to the usb
840
840
  */
841
841
  writeCommand(command: Command): Promise<void>;
842
+ /**
843
+ * Writes a raw string to the printer
844
+ * @param text String to send to the printer
845
+ */
846
+ writeRawString(text: string): Promise<void>;
842
847
  /**
843
848
  * Check if the device is indeed a printer
844
849
  * @param device
package/dist/index.d.ts CHANGED
@@ -839,6 +839,11 @@ declare abstract class Printer {
839
839
  * @param command Command to send to the usb
840
840
  */
841
841
  writeCommand(command: Command): Promise<void>;
842
+ /**
843
+ * Writes a raw string to the printer
844
+ * @param text String to send to the printer
845
+ */
846
+ writeRawString(text: string): Promise<void>;
842
847
  /**
843
848
  * Check if the device is indeed a printer
844
849
  * @param device
package/dist/index.js CHANGED
@@ -1373,6 +1373,16 @@ var Printer = class {
1373
1373
  yield command.writeTo(this.device);
1374
1374
  });
1375
1375
  }
1376
+ /**
1377
+ * Writes a raw string to the printer
1378
+ * @param text String to send to the printer
1379
+ */
1380
+ writeRawString(text) {
1381
+ return __async(this, null, function* () {
1382
+ if (!this.device.opened) yield this.device.openAndConfigure();
1383
+ yield this.device.writeString(text);
1384
+ });
1385
+ }
1376
1386
  /**
1377
1387
  * Check if the device is indeed a printer
1378
1388
  * @param device