@pittica/drive-folder-qrcode 1.4.0 → 1.4.1

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.
@@ -167,8 +167,9 @@ var Image = exports["default"] = /*#__PURE__*/function () {
167
167
  switch (format.toUpperCase()) {
168
168
  case "PDF":
169
169
  var stream = (0, _fs.createWriteStream)((0, _path.join)(output, _this.filename(format)));
170
- var result = _this.pdf(stream, buffer, function (stream) {
171
- return stream.path;
170
+ var result = _this.pdf(stream, buffer, function (_ref3) {
171
+ var path = _ref3.path;
172
+ return path;
172
173
  });
173
174
  stream.close();
174
175
  return result;
@@ -217,56 +218,56 @@ var Image = exports["default"] = /*#__PURE__*/function () {
217
218
  credentials = _args4.length > 2 ? _args4[2] : undefined;
218
219
  _context4.next = 4;
219
220
  return this._qr.getRawData("svg").then(/*#__PURE__*/function () {
220
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(buffer) {
221
- var stream, file, _yield$uploadFile, id;
221
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(buffer) {
222
+ var stream, file;
222
223
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
223
224
  while (1) switch (_context3.prev = _context3.next) {
224
225
  case 0:
225
226
  _context3.t0 = format.toUpperCase();
226
- _context3.next = _context3.t0 === "PDF" ? 3 : _context3.t0 === "SVG" ? 7 : 12;
227
+ _context3.next = _context3.t0 === "PDF" ? 3 : _context3.t0 === "SVG" ? 7 : 10;
227
228
  break;
228
229
  case 3:
229
230
  stream = new _memorystream["default"](null, {
230
231
  readable: false
231
232
  });
232
233
  file = _this2.pdf(stream, buffer, /*#__PURE__*/function () {
233
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
234
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
235
+ var queue;
234
236
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
235
237
  while (1) switch (_context2.prev = _context2.next) {
236
238
  case 0:
237
- _context2.next = 2;
238
- return (0, _folder.uploadFile)(output, Buffer.concat(stream.queue).toString(), _this2.filename(format), "application/pdf", credentials);
239
- case 2:
240
- return _context2.abrupt("return", _context2.sent);
239
+ queue = _ref5.queue;
240
+ _context2.next = 3;
241
+ return (0, _folder.uploadFile)(output, Buffer.concat(queue).toString(), _this2.filename(format), "application/pdf", credentials);
241
242
  case 3:
243
+ return _context2.abrupt("return", _context2.sent);
244
+ case 4:
242
245
  case "end":
243
246
  return _context2.stop();
244
247
  }
245
248
  }, _callee2);
246
249
  }));
247
250
  return function (_x4) {
248
- return _ref4.apply(this, arguments);
251
+ return _ref6.apply(this, arguments);
249
252
  };
250
253
  }());
251
254
  stream.destroy();
252
- return _context3.abrupt("return", file.id);
255
+ return _context3.abrupt("return", file);
253
256
  case 7:
254
257
  _context3.next = 9;
255
258
  return (0, _folder.uploadFile)(output, buffer.toString(), _this2.filename(format), "image/svg+xml", credentials);
256
259
  case 9:
257
- _yield$uploadFile = _context3.sent;
258
- id = _yield$uploadFile.id;
259
- return _context3.abrupt("return", id);
260
- case 12:
260
+ return _context3.abrupt("return", _context3.sent);
261
+ case 10:
261
262
  return _context3.abrupt("return", null);
262
- case 13:
263
+ case 11:
263
264
  case "end":
264
265
  return _context3.stop();
265
266
  }
266
267
  }, _callee3);
267
268
  }));
268
269
  return function (_x3) {
269
- return _ref3.apply(this, arguments);
270
+ return _ref4.apply(this, arguments);
270
271
  };
271
272
  }());
272
273
  case 4:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pittica/drive-folder-qrcode",
3
3
  "private": false,
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "description": "Creates QR codes from Google Drive folder names.",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@google-cloud/local-auth": "^3.0.1",
33
33
  "@svgdotjs/svg.js": "^3.2.4",
34
- "axios": "^1.7.7",
34
+ "axios": "^1.7.8",
35
35
  "canvas": "^2.11.2",
36
36
  "deasync": "^0.1.30",
37
37
  "googleapis": "^144.0.0",
@@ -39,7 +39,6 @@
39
39
  "memorystream": "^0.3.1",
40
40
  "qr-code-styling": "^1.8.4",
41
41
  "svg-to-pdfkit": "^0.1.8",
42
- "svgdom": "^0.1.19",
43
42
  "svgo": "^3.3.2"
44
43
  },
45
44
  "devDependencies": {
@@ -47,7 +46,7 @@
47
46
  "@babel/core": "^7.26.0",
48
47
  "@babel/preset-env": "^7.26.0",
49
48
  "mkdirp": "^3.0.1",
50
- "prettier": "^3.3.3",
49
+ "prettier": "^3.4.1",
51
50
  "rimraf": "^6.0.1",
52
51
  "run-func": "^3.0.0"
53
52
  }