@risleylima/escpos 0.0.11 → 0.0.13
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/LICENSE +0 -0
- package/README.md +0 -0
- package/examples/printTest.js +0 -0
- package/index.js +0 -0
- package/package.json +7 -4
- package/src/adapter/index.js +0 -0
- package/src/printer/commands.js +0 -0
- package/src/printer/image.js +0 -0
- package/src/printer/index.js +0 -0
- package/src/printer/utils.js +0 -0
- package/src/serial-adapter/index.js +2 -2
- package/src/usb-adapter/index.js +0 -1
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/examples/printTest.js
CHANGED
|
File without changes
|
package/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@risleylima/escpos",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Library to deal with ESCPOS using some adapters",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Rlima Info",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18.0.0"
|
|
11
|
+
},
|
|
9
12
|
"dependencies": {
|
|
10
13
|
"debug": "^4.3.1",
|
|
11
14
|
"get-pixels": "^3.3.2",
|
|
12
15
|
"iconv-lite": "^0.6.3",
|
|
13
|
-
"serialport": "^
|
|
14
|
-
"usb": "^1.
|
|
16
|
+
"serialport": "^12.0.0",
|
|
17
|
+
"usb": "^1.9.1"
|
|
15
18
|
},
|
|
16
19
|
"directories": {
|
|
17
20
|
"example": "examples"
|
|
18
21
|
},
|
|
19
22
|
"scripts": {
|
|
20
|
-
"test": "echo \"Error: no test specified\"
|
|
23
|
+
"test": "echo \"Error: no test specified\" "
|
|
21
24
|
},
|
|
22
25
|
"repository": {
|
|
23
26
|
"type": "git",
|
package/src/adapter/index.js
CHANGED
|
File without changes
|
package/src/printer/commands.js
CHANGED
|
File without changes
|
package/src/printer/image.js
CHANGED
|
File without changes
|
package/src/printer/index.js
CHANGED
|
File without changes
|
package/src/printer/utils.js
CHANGED
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
const SerialPort = require('serialport');
|
|
2
|
+
const { SerialPort } = require('serialport');
|
|
3
3
|
const EventEmitter = require('events');
|
|
4
4
|
const Adapter = require('../adapter');
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ Serial.connect = (port, options) => {
|
|
|
24
24
|
Serial.removeListener('close', connectListener);
|
|
25
25
|
scope.verifyPort(port).catch(e => reject(e)).then((portVerified) => {
|
|
26
26
|
if (portVerified) {
|
|
27
|
-
scope.port = new SerialPort(
|
|
27
|
+
scope.port = new SerialPort(Object.assign(options || {}, { path: portVerified, autoOpen: true }), (err) => {
|
|
28
28
|
if (err) {
|
|
29
29
|
debug('Error Opening the Selected Port: ', err);
|
|
30
30
|
if (scope.port) {
|