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

dssh

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dssh - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

50

build/TerminalCommands/ListDockerComposeFiles.js

@@ -15,2 +15,13 @@ "use strict";

})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -64,3 +75,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

return __awaiter(this, void 0, void 0, function () {
var files, validFiles, _i, files_1, file;
var allFiles, filesWithValidFlag;
var _this = this;
return __generator(this, function (_a) {

@@ -70,19 +82,23 @@ switch (_a.label) {

case 1:
files = _a.sent();
validFiles = [];
_i = 0, files_1 = files;
_a.label = 2;
allFiles = _a.sent();
return [4, Promise.all(allFiles.map(function (file) { return __awaiter(_this, void 0, void 0, function () {
var _a, _b;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
_a = [__assign({}, file)];
_b = {};
return [4, this.isValidDockerFile(file.absolutePath)];
case 1: return [2, __assign.apply(void 0, _a.concat([(_b.isValid = _c.sent(), _b)]))];
}
});
}); }))];
case 2:
if (!(_i < files_1.length)) return [3, 5];
file = files_1[_i];
return [4, this.isValidDockerFile(file.absolutePath)];
case 3:
if (_a.sent()) {
validFiles.push(file);
}
_a.label = 4;
case 4:
_i++;
return [3, 2];
case 5: return [2, validFiles];
filesWithValidFlag = _a.sent();
return [2, filesWithValidFlag
.filter(function (file) { return file.isValid; })
.map(function (file) { return ({
name: file.name,
absolutePath: file.absolutePath
}); })];
}

@@ -89,0 +105,0 @@ });

{
"name": "dssh",
"version": "2.5.1",
"version": "2.5.2",
"description": "CLI utility providing handy docker shortcuts",

@@ -5,0 +5,0 @@ "main": "build/app.js",

@@ -15,12 +15,19 @@ import { TerminalCommand } from './TerminalCommand';

public async execute(): Promise<IFileLocation[]> {
const files = await this.fileSystem.listFiles(this.directoryPath);
const allFiles = await this.fileSystem.listFiles(this.directoryPath);
const validFiles = [];
for (const file of files) {
if (await this.isValidDockerFile(file.absolutePath)) {
validFiles.push(file);
}
}
const filesWithValidFlag = await Promise.all(
allFiles.map(async (file) => {
return {
...file,
isValid: await this.isValidDockerFile(file.absolutePath),
};
})
);
return validFiles;
return filesWithValidFlag
.filter((file) => file.isValid)
.map((file) => ({
name: file.name,
absolutePath: file.absolutePath,
}));
}

@@ -27,0 +34,0 @@

Sorry, the diff of this file is not supported yet

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