addons-scanner-utils 8.0.0 → 8.1.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/dist/functions.js CHANGED
@@ -16,9 +16,8 @@ exports.createExpressApp = exports.createApiError = void 0;
16
16
  const fs_1 = __importDefault(require("fs"));
17
17
  const os_1 = __importDefault(require("os"));
18
18
  const path_1 = __importDefault(require("path"));
19
- const node_fs_1 = require("node:fs");
20
- const node_stream_1 = require("node:stream");
21
- const node_util_1 = require("node:util");
19
+ const stream_1 = __importDefault(require("stream"));
20
+ const util_1 = __importDefault(require("util"));
22
21
  const express_1 = __importDefault(require("express"));
23
22
  const body_parser_1 = __importDefault(require("body-parser"));
24
23
  const node_fetch_1 = __importDefault(require("node-fetch"));
@@ -94,12 +93,12 @@ const createExpressApp = ({ _console = console, _fetch = node_fetch_1.default, _
94
93
  }
95
94
  try {
96
95
  const xpiFilepath = path_1.default.join(tmpDir, xpiFilename);
97
- const streamPipeline = (0, node_util_1.promisify)(node_stream_1.pipeline);
96
+ const streamPipeline = util_1.default.promisify(stream_1.default.pipeline);
98
97
  const response = yield _fetch(downloadURL);
99
98
  if (!response.ok) {
100
99
  throw new Error(`unexpected response ${response.statusText}`);
101
100
  }
102
- yield streamPipeline(response.body, (0, node_fs_1.createWriteStream)(xpiFilepath));
101
+ yield streamPipeline(response.body, fs_1.default.createWriteStream(xpiFilepath));
103
102
  req.xpiFilepath = xpiFilepath;
104
103
  // Add a listener that will run code after the response is sent.
105
104
  res.on('finish', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "addons-scanner-utils",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "Various addons related helpers to build CLIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",