Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

render-ci-matrix

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

render-ci-matrix - npm Package Compare versions

Comparing version
1.0.2
to
1.1.0
+47
-45
example.js
const render = require('.')()
process.stdout.write(render({
repo: ['juliangruber', 'render-ci-results'],
build: {
id: 13,
number: 42
},
commit: {
id: '123456',
branch: 'master'
},
success: true,
link: 'https://travis-ci.org/juliangruber/render-ci-results/builds/13',
results: {
osx: {
foo: {
version: '6',
config: {
language: 'node_js',
env: 'FOO=bar'
process.stdout.write(
render({
repo: ['juliangruber', 'render-ci-results'],
build: {
id: 13,
number: 42
},
commit: {
id: '123456',
branch: 'master'
},
success: true,
link: 'https://travis-ci.org/juliangruber/render-ci-results/builds/13',
results: {
osx: {
foo: {
version: '6',
config: {
language: 'node_js',
env: 'FOO=bar'
},
started_at: Date.now() - 1000,
state: 'started'
},
started_at: Date.now() - 1000,
state: 'started'
},
bar: {
version: '1.0',
config: {
language: 'ruby'
bar: {
version: '1.0',
config: {
language: 'ruby'
},
state: 'queued'
},
state: 'queued'
beep: {
version: '5.2',
config: {
language: 'php'
},
started_at: Date.now() - 10000,
state: 'started'
}
},
beep: {
version: '5.2',
config: {
language: 'php'
},
started_at: Date.now() - 10000,
state: 'started'
linux: {
boop: {
version: '1.0',
config: {
language: 'golang'
},
state: 'queued'
}
}
},
linux: {
boop: {
version: '1.0',
config: {
language: 'golang'
},
state: 'queued'
}
}
}
}))
})
)

@@ -18,3 +18,11 @@ 'use strict'

if (!state.build) return `${chalk.gray(frame)} Loading build`
if (!state.build) {
out += `${chalk.gray(frame)} Loading build`
if (state.started && new Date() - state.started > ms('10s')) {
out += chalk.yellow(
`\nIt is taking unusually long to fetch your build.\nHave you pushed your commits yet?`
)
}
return out
}

@@ -25,5 +33,3 @@ if (!state.commit.id) return `${chalk.gray(frame)} Looking for commit`

if (typeof state.success === 'boolean') {
header = state.success
? chalk.green(header)
: chalk.red(header)
header = state.success ? chalk.green(header) : chalk.red(header)
}

@@ -35,3 +41,5 @@

if (!Object.keys(state.results).length) return out + ` ${chalk.gray(frame)} Loading jobs`
if (!Object.keys(state.results).length) {
return out + ` ${chalk.gray(frame)} Loading jobs`
}

@@ -61,7 +69,7 @@ Object.keys(state.results).forEach((os, i, arr) => {

: job.state === 'failed' && job.allow_failure
? chalk.gray('×')
: job.state === 'passed'
? chalk.green('✓')
: job.state === 'started' ? chalk.yellow(frame) : chalk.gray(frame)
? chalk.gray('×')
: job.state === 'passed'
? chalk.green('✓')
: job.state === 'started' ? chalk.yellow(frame) : chalk.gray(frame)
return out
}
{
"name": "render-ci-matrix",
"version": "1.0.2",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "juliangruber/render-ci-matrix",

@@ -21,2 +21,3 @@

},
started: Date.now(),
commit: {

@@ -23,0 +24,0 @@ id: '123456',