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

@capriza/create-capriza-connector

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capriza/create-capriza-connector - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

21

index.js
#!/usr/bin/env node
var childProcess = require ("child_process");
var fs = require ("fs");
var fs = require ("fs-extra");
var path = require ("path");
var chalk = require ("chalk");
var cwd = process.cwd();

@@ -15,4 +16,7 @@ var connectorName = process.argv[2] || "my-connector";

version: "1.0.0",
main: "index.js"
}
main: "index.js",
license: "UNLICENSED",
description: "My Connector for approvals",
repository: "private"
};

@@ -23,6 +27,9 @@ //write initial package.json

//install my-connector basic template and copy the content of it from the node_modules to the root
childProcess.execSync (`npm install @capriza/my-connector && cp -r ./node_modules/@capriza/my-connector/* . && rm -r node_modules && rm package-lock.json`, {cwd: process.cwd()});
childProcess.execSync (`npm install @capriza/my-connector`, {cwd: cwd});
fs.copySync (path.join(cwd, `node_modules`, `@capriza`, `my-connector`), `.`);
fs.removeSync (path.join(cwd, `node_modules`));
fs.removeSync (path.join(cwd, `package-lock.json`));
//write the updated package.json (with my-connector scripts)
var myConnectorPackageJson = require (`${process.cwd()}/package.json`);
var myConnectorPackageJson = require (path.join(cwd, `package.json`));
packageJson.scripts = myConnectorPackageJson.scripts;

@@ -32,3 +39,3 @@ fs.writeFileSync ("package.json", JSON.stringify(packageJson));

//re-install connector-controller
childProcess.execSync ("npm install @capriza/connector-controller && (cd node_modules/@capriza/connector-controller && npm install)", {cwd: process.cwd()});
childProcess.execSync (`npm install @capriza/connector-controller && (cd ${path.join("node_modules", "@capriza", "connector-controller")} && npm install)`, {cwd: cwd});

@@ -38,3 +45,3 @@ //done

console.log ();
console.log (`You can go ahead and start to test your ${chalk.bold(connectorName)} by running:`);
console.log (`You can go ahead and start to test your ${chalk.bold(connectorName)} by running:\n`);
console.log (`\t${chalk.bold("npm run bltester")}`);

@@ -41,0 +48,0 @@ console.log ();

{
"name": "@capriza/create-capriza-connector",
"version": "0.0.22",
"version": "0.0.23",
"description": "Create a Capriza connector bootstrap program",

@@ -16,4 +16,5 @@ "main": "index.js",

"chalk": "^2.3.2",
"child_process": "^1.0.2"
"child_process": "^1.0.2",
"fs-extra": "5.0.0"
}
}
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