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

@featurepeek/ping

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featurepeek/ping - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

34

index.js
#!/usr/bin/env node
const request = require('request')
console.log(process.argv)
console.log(process.env)
// console.log(process.argv)
// console.log(process.env)
if (process.argv.length <= 4) {
if (process.argv.length <= 2) {
console.log('Not enough arguments.')
console.log('Usage: ping <HOST> <URL> <BUILD_NUM>')
console.log('Usage: featurepeek <ARTIFACTS_PATH>')
process.exit()
}
const HOST = process.argv[2]
const URL = process.argv[3]
const BUILD = process.argv[4]
const FEATUREPEEK_ENDPOINT = 'https://api.featurepeek.com/api/v1/TBD/static/circleci'
const CI_HOST = 'circleci.com'
const CI_VERSION = '1.1'
const VCS = 'github'
const ARTIFACTS_DEPTH = 3
const org = process.env.CIRCLE_PROJECT_USERNAME
const repo = process.env.CIRCLE_PROJECT_REPONAME
const build = process.env.CIRCLE_BUILD_NUM
const dirDepth = process.argv[2].replace(/^\.\//, '').split('/').length
const artifactsBaseURL = `https://${CI_HOST}/api/v${CI_VERSION}/project/${VCS}/${org}/${repo}/${build}/artifacts`
const options = {
url: HOST,
url: FEATUREPEEK_ENDPOINT,
json: {
url: URL,
build: BUILD,
artifacts_url: artifactsBaseURL,
cutdirs: ARTIFACTS_DEPTH + dirDepth,
pr_url: process.env.CIRCLE_PULL_REQUEST,
},
}
request.post(HOST, options, (err, res, body) => {
console.log(options)
request.post(artifactsBaseURL, options, (err, res, body) => {
if (err) {

@@ -27,0 +39,0 @@ console.error(err)

{
"private": false,
"name": "@featurepeek/ping",
"version": "0.0.3",
"version": "0.0.4",
"main": "index.js",

@@ -6,0 +6,0 @@ "bin": {

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