openfin-cli
Advanced tools
Comparing version 3.0.2-beta.1 to 3.0.2-beta.2
@@ -39,3 +39,3 @@ 'use strict'; | ||
const config = await fetch(manifestUrl); | ||
configObj = JSON.parse(config); | ||
configObj = config; | ||
} else { | ||
@@ -85,7 +85,7 @@ manifestUrl = path.resolve(manifestUrl); | ||
function writeManifest(url, devtoolsPort, runtime, isPlatform, manifestName) { | ||
const writeManifest = (url, devtoolsPort, runtime, isPlatform, manifestName) => { | ||
return new Promise((resolve, reject) => { | ||
const uuid = `app-${getUuid()}`; | ||
const devtools_port = devtoolsPort ? devtoolsPort : 9090; | ||
const version = runtime ? runtime : "stable" | ||
const version = runtime ? runtime : 'stable'; | ||
const parsedUrls = url.split(','); | ||
@@ -92,0 +92,0 @@ let manifest; |
{ | ||
"name": "openfin-cli", | ||
"version": "3.0.2-beta.1", | ||
"version": "3.0.2-beta.2", | ||
"description": "OpenFin Runtime cli tool", | ||
@@ -26,5 +26,5 @@ "homepage": "http://www.openfin.co", | ||
"dependencies": { | ||
"axios": "^0.19.2", | ||
"hadouken-js-adapter": "^1.44.1", | ||
"meow": "^5.0.0", | ||
"request": "^2.87.0", | ||
"node-machine-id": "^1.1.10" | ||
@@ -31,0 +31,0 @@ }, |
26
utils.js
@@ -1,24 +0,18 @@ | ||
const request = require('request'); | ||
const axios = require('axios'); | ||
function fetch(url) { | ||
return new Promise((resolve, reject) => { | ||
request(url, function (error, response, body) { | ||
if (response.statusCode < 200 || response.statusCode > 399) { | ||
reject(new Error(`Failed to load url: ${url}, status code:${response.statusCode}`)); | ||
} | ||
const fetch = async (url) => { | ||
const response = await axios.get(url); | ||
if (error) { | ||
reject(error); | ||
} | ||
resolve(body); | ||
}); | ||
}); | ||
if (response.status < 200 || response.status > 399) { | ||
throw new Error(`Failed to load url: ${url}, status code:${response.status}`); | ||
} else { | ||
return response.data; | ||
} | ||
} | ||
function isURL(str) { | ||
const isURL = (str) => { | ||
return (typeof str === 'string') && str.lastIndexOf('http') >= 0; | ||
} | ||
function getUuid() { | ||
const getUuid = () => { | ||
return `${Date.now()}-${Math.floor(Math.random() * 10000)}`; | ||
@@ -25,0 +19,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
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
23543
251
+ Addedaxios@^0.19.2
+ Addedaxios@0.19.2(transitive)
+ Addedfollow-redirects@1.5.10(transitive)
- Removedrequest@^2.87.0
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.13.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)