Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
var packageJson = require("./package.json");
var AWS = require("aws-sdk");
var AWSCognito = require("amazon-cognito-identity-js");
var apigClientFactory = require("aws-api-gateway-client").default;
var WindowMock = require("window-mock").default;
global.window = { localStorage: new WindowMock().localStorage };
global.navigator = function() {
return null;
};
var argv = require("yargs")
.option("username", {
describe: "Username of the user",
demandOption: true,
string: true
})
.option("password", {
describe: "Password of the user",
demandOption: true
/*jshint esversion: 6 */
/*jshint node: true */
"use strict";
var fs = require('fs');
var os = require('os');
var aws = require('aws-sdk');
var pty = require('node-pty');
var apiClientFactory = require('aws-api-gateway-client').default;
var buffer = "";
var retrigger = "";
var ptyProcess = {};
var credentialsReady = 0;
var region = fs.readFileSync('/root/region', 'ascii').trim();
var manifest = JSON.parse(fs.readFileSync('/root/manifest.json'));
var keyspace = parseInt(fs.readFileSync('/root/keyspace'));
var apigateway = fs.readFileSync('/root/apigateway', 'ascii').trim();
var manifestpath = fs.readFileSync('/root/manifestpath', 'ascii').trim();
var instance_id = fs.readFileSync('/root/instance_id', 'ascii').trim();
var instance_count = parseInt(fs.readFileSync('/root/instance_count'));
var instance_number = parseInt(fs.readFileSync('/root/instance_number'));
var apiClient = null;