@capriza/create-capriza-connector
Advanced tools
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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3011
53
3
+ Addedfs-extra@5.0.0
+ Addedfs-extra@5.0.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addeduniversalify@0.1.2(transitive)