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.26 to 0.0.27

55

index.js
#!/usr/bin/env node
var childProcess = require ("child_process");
var fs = require ("fs-extra");
var path = require ("path");
var chalk = require ("chalk");
var cwd = process.cwd();
var connectorName = process.argv[2] || "my-connector";
console.log (`\nCreating connector: ${chalk.green(connectorName)}\n`);
console.log (`\n${chalk.bold(chalk.red("This package is deprecated"))}\n`);
console.log (`\nPlease use the following script to install Capriza connector ${chalk.green(`npx @capriza/create-connector ${connectorName}`)}`);
var packageJson = {
name: connectorName,
version: "1.0.0",
main: "index.js",
license: "UNLICENSED",
description: "My Connector for approvals",
repository: "private"
};
//write initial package.json
fs.writeFileSync ("package.json", JSON.stringify(packageJson));
//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`, {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 (path.join(cwd, `package.json`));
packageJson.scripts = myConnectorPackageJson.scripts;
fs.writeFileSync ("package.json", JSON.stringify(packageJson));
//re-install connector-controller
childProcess.execSync (`npm install @capriza/connector-controller`, {cwd: cwd});
//done
console.log (`${chalk.bold(chalk.green("Done :)"))}`);
console.log ();
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")}`);
console.log ();
console.log (`Once ready, in order to connect to your connector to Capriza's cloud, you need to:\n`);
console.log (`1. Set a caprizaConfig.json file that should look like this:\n`);
console.log (JSON.stringify(
{
"connectorId": "xxxx-xxxx-xxxx-xxxxxxx-xxxxx",
"apiUrl": "https://approvals[dev/test].capriza.com",
"creds": {
"apiKey": "<Environment API key>",
"apiSecret": "<Environment API secret>"
}
},
" ", 3));
console.log ();
console.log ("* The connectorId, apiKey and apiSecret can be generated using the capriza dashboard\n");
console.log (`2. Set a systemConfig.json file, which includes required parameters that are relevant to the source system (system url, user credentials).`);
console.log (`3. Set the path of these 2 files in the resources/config.json file.`);
console.log ();
console.log (chalk.bold(chalk.yellow(`Capriza\n\n\n`)));

2

package.json
{
"name": "@capriza/create-capriza-connector",
"version": "0.0.26",
"version": "0.0.27",
"description": "Create a Capriza connector bootstrap program",

@@ -5,0 +5,0 @@ "main": "index.js",

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