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

@orbs-network/polygon

Package Overview
Dependencies
Maintainers
9
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbs-network/polygon - npm Package Compare versions

Comparing version 1.19.0 to 1.20.0

9

lib/services/polygon.js

@@ -226,2 +226,4 @@ /**

const workspacePath = this.getWorkspacePath(cloud.name);
await this.resetDestroySnapshot({ workspacePath });
const successSnapshot = await this.successSnapshotExists({ workspacePath });

@@ -293,2 +295,9 @@ if (successSnapshot !== false) {

async resetDestroySnapshot({ workspacePath }) {
const targetPath = path.join(workspacePath, 'destroy.json');
if (fs.existsSync(targetPath)) {
await deleteFile(targetPath).catch(() => { });
}
}
async storeSuccessSnapshot({ result, workspacePath }) {

@@ -295,0 +304,0 @@ await writeFile(path.join(workspacePath, 'success.json'), JSON.stringify(result));

33

lib/services/terraform.js

@@ -6,3 +6,4 @@ const path = require('path');

const util = require('util');
const { spawn } = require('child_process');
const { spawn, execSync } = require('child_process');
const { satisfies, minVersion } = require("semver");
const writeFile = util.promisify(fs.writeFile);

@@ -33,4 +34,8 @@ const readFile = util.promisify(fs.readFile);

class Terraform {
constructor() {
constructor(skipVersionCheck = false) {
this.outputs = outputs;
if (!skipVersionCheck) {
this.checkSupportedVersions();
}
}

@@ -415,2 +420,26 @@

}
version() {
return execSync("terraform -version").toString().split("\n")[0].split(" v")[1];
}
checkSupportedVersions() {
const supportedVersions = require(`${__dirname}/../../package.json`).supportedTerraformVersion;
let version;
try {
version = this.version()
} catch (e) {
// ignore errors
}
if (!satisfies(version, supportedVersions)) {
const v = minVersion(supportedVersions);
throw new Error(`Terraform version mismatch: found ${version} instead of ${supportedVersions}.
You can fix it by installing tfenv (https://github.com/tfutils/tfenv) and running the following command:
tfenv install ${v && v.version} && tfenv use ${v && v.version}
`);
}
}
}

@@ -417,0 +446,0 @@

4

package.json
{
"name": "@orbs-network/polygon",
"version": "1.19.0",
"version": "1.20.0",
"description": "Polygon is a tool to provision new Orbs Hybrid Blockchain nodes",

@@ -17,2 +17,3 @@ "main": "index.js",

"author": "Itamar Arjuan, Kirill Maksimov",
"supportedTerraformVersion": ">=0.12.23 <=0.12.29",
"license": "ISC",

@@ -36,2 +37,3 @@ "dependencies": {

"request-promise": "^4.2.2",
"semver": "^7.3.2",
"uuid": "^3.3.2",

@@ -38,0 +40,0 @@ "yargs": "^12.0.5"

@@ -9,3 +9,3 @@ const { describe, it } = require('mocha');

const { Terraform } = require('./../../lib/services/terraform');
const tf = new Terraform();
const tf = new Terraform(true);

@@ -12,0 +12,0 @@ const { validateBoyarUrl, boyarDefaultVersion } = require('./../../lib/services/polygon');

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