New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sumor/ssh-docker

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sumor/ssh-docker - npm Package Compare versions

Comparing version

to
1.0.8

src/ssl/generateSSL.js

6

package.json
{
"name": "@sumor/ssh-docker",
"description": "ssh-docker is a docker tool for @sumor/ssh-tools",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",

@@ -32,4 +32,3 @@ "repository": "sumor-cloud/ssh-docker",

"prettier": "^3.2.5",
"glob": "^10.4.2",
"fs-extra": "^10.0.0"
"glob": "^10.4.2"
},

@@ -50,2 +49,3 @@ "files": [

"test-node": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testMatch='**/test/**/node.test.js'",
"test-ssl": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testMatch='**/test/**/ssl.test.js'",
"test-site-utils": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testMatch='**/test/site/*.test.js'",

@@ -52,0 +52,0 @@ "test-site": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testMatch='**/test/**/site.test.js'",

@@ -20,4 +20,16 @@ import retryMethod from '../utils/retryMethod.js'

const logs = await docker.exec(dockerId, 'cd /usr/source && npm install && npm run build')
let logs = ''
const installLogs = await docker.exec(dockerId, 'cd /usr/source && npm install')
logs += installLogs
// check if there is a build script
const packageJson = await ssh.exec('cat package.json', {
cwd: remoteFolder
})
const packageJsonParsed = JSON.parse(packageJson)
if (packageJsonParsed.scripts && packageJsonParsed.scripts.build) {
const buildLogs = await docker.exec(dockerId, 'cd /usr/source && npm run build')
logs += buildLogs
}
await docker.remove(dockerId)

@@ -24,0 +36,0 @@

import stringify from './stringify/index.js'
import ssl from './ssl/index.js'
import loadSSLs from '../ssl/loadSSLs.js'

@@ -13,3 +13,3 @@ export default (ssh, docker) => {

await ssh.file.writeFile(`${remotePath}/nginx.conf`, nginxConfig)
const sslPath = await ssl(options)
const sslPath = await loadSSLs(options)
await ssh.file.putFolder(sslPath, `${remotePath}/ssl`)

@@ -16,0 +16,0 @@