Socket
Socket
Sign inDemoInstall

@enonic/cli-test

Package Overview
Dependencies
1
Maintainers
5
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.32 to 0.0.33

7

package.json
{
"name": "@enonic/cli-test",
"description": "Command-line interface for Enonic XP",
"version": "0.0.32",
"version": "0.0.33",
"scripts": {

@@ -21,6 +21,3 @@ "postinstall": "node script.js install",

},
"goBinary": {
"name": "enonic",
"path": "bin"
},
"goBinary": "enonic",
"homepage": "https://developer.enonic.com/docs/enonic-cli/",

@@ -27,0 +24,0 @@ "files": [

@@ -26,18 +26,13 @@ #!/usr/bin/env node

function validateConfiguration(packageJson) {
if (!packageJson.version) {
return "'version' property must be specified";
if (!packageJson.directories || _typeof(packageJson.directories) !== "object") {
return "'directories' property must be defined and be an object";
}
if (!packageJson.goBinary || _typeof(packageJson.goBinary) !== "object") {
return "'goBinary' property must be defined and be an object";
if (!packageJson.goBinary) {
return "'goBinary' property is required";
}
if (!packageJson.goBinary.name) {
return "'name' property is necessary";
if (!packageJson.directories.bin) {
return "'directories.bin' property is required";
}
if (!packageJson.goBinary.path) {
return "'path' property is necessary";
}
}

@@ -70,10 +65,5 @@

// We have validated the config. It exists in all its glory
let binName = packageJson.goBinary.name;
let binName = packageJson.goBinary;
let binNameUnused = binName + ".exe";
const binPath = packageJson.goBinary.path;
let version = packageJson.version;
if (version[0] === 'v') {
// strip the 'v' if necessary v0.0.1 => 0.0.1
version = version.substring(1);
}
const binPath = packageJson.directories.bin;

@@ -86,8 +76,6 @@ // Binary name on Windows has .exe suffix

return {
binName,
binNameUnused,
binPath,
version
binPath
};

@@ -118,3 +106,3 @@ }

const targetPath = path.join('dist', opts.binPath);
const targetPath = path.join(__dirname, opts.binPath);
mkdirp.sync(targetPath);

@@ -140,3 +128,3 @@ const target = path.join(targetPath, opts.binName);

console.info('Executing prepublish script...');
const targetPath = path.join(__dirname, 'dist', opts.binPath);
const targetPath = path.join(__dirname, opts.binPath);
mkdirp.sync(targetPath);

@@ -143,0 +131,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc