Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@restroom-mw/files

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restroom-mw/files - npm Package Compare versions

Comparing version 0.12.3-78d63fb.1 to 0.12.3-9bc85cc.9

dist/actions.d.ts.map

1

dist/actions.d.ts
export declare const DOWNLOAD = "download the {} and extract it into {}";
export declare const STORE_RESULT = "store {} in the file {}";
//# sourceMappingURL=actions.d.ts.map
import { NextFunction, Request, Response } from "express";
declare const _default: (req: Request, res: Response, next: NextFunction) => void;
export default _default;
//# sourceMappingURL=index.d.ts.map

4

package.json
{
"name": "@restroom-mw/files",
"version": "0.12.3-78d63fb.1+78d63fb",
"version": "0.12.3-9bc85cc.9+9bc85cc",
"description": "Utilities middleware to work with files for Restroom",

@@ -35,3 +35,3 @@ "author": "Alberto Lerda <alberto@dyne.org>",

},
"gitHead": "78d63fb2f435a50d0ccd8f2555e7d84b01ed724e"
"gitHead": "9bc85cce0f4a0ba57a5923f51fa773b820b2c1e7"
}
import { Restroom } from "@restroom-mw/core";
import { ObjectLiteral } from "@restroom-mw/core/src/types";
import { Zencode } from "@restroom-mw/zencode";
import axios from "axios";

@@ -13,3 +11,3 @@ import { NextFunction, Request, Response } from "express";

*
* Download a zip file located at the url `myUrl` and extract it at the path
* Download a zip file located at the url `myUrl` and extract it at the path
* `myFolder` on the server.

@@ -36,3 +34,3 @@ */

const file = result[allPassOutputs[i]]
const folder = result[allPassOutputs[i+1]]
const folder = result[allPassOutputs[i + 1]]

@@ -44,3 +42,3 @@ if (file && folder) {

responseType: 'arraybuffer'
});
});
const tempdir = fs.mkdtempSync("/tmp/restroom");

@@ -57,3 +55,3 @@ const tempfile = tempdir + "/downloaded";

}
else {
else {
throw new Error(`[FILES] url or destination folder not defined`);

@@ -67,3 +65,3 @@ }

const variable = result[allPassOutputs[i]]
const file = result[allPassOutputs[i+1]]
const file = result[allPassOutputs[i + 1]]

@@ -70,0 +68,0 @@ if (variable && file) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc