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

@lifeomic/bitrise

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/bitrise - npm Package Compare versions

Comparing version 0.10.0 to 0.10.2-pr-52-980580231-1624917296.0

.github/workflows/code-scanning-v3.yml

6

package.json
{
"name": "@lifeomic/bitrise",
"version": "0.10.0",
"version": "0.10.2-pr-52-980580231-1624917296.0",
"description": "Bitrise API client",

@@ -18,3 +18,3 @@ "main": "src/client.js",

"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"coverage": "nyc report --reporter=text-lcov > ./.nyc_output/lcov.info",
"lint": "eslint .",

@@ -25,3 +25,3 @@ "pretest": "yarn lint",

"dependencies": {
"axios": "^0.18.0",
"axios": "^0.21.1",
"axios-retry": "^3.1.1",

@@ -28,0 +28,0 @@ "lodash": "^4.17.10",

@@ -72,2 +72,8 @@ const isNil = require('lodash/isNil');

// If the build is completed and there are no more log chunks
if (!!attributes.build_finished && response.data.log_chunks.length === 0) {
// No need to keep watching a completed build
break;
}
timestamp = response.data.timestamp;

@@ -74,0 +80,0 @@ } while (timestamp);

@@ -131,2 +131,3 @@ const axios = require('axios');

buildStub.build.status = 1;
buildStub.build.build_finished = new Date().toISOString();
stubArchivedBuildLog({ appSlug, axios: client, buildSlug, logText });

@@ -144,2 +145,24 @@

test.serial('following a successful build, not yet archived, prints the log output', async (test) => {
const { appSlug, build, buildSlug, client } = test.context;
const logText = 'some log text';
const buildStub = stubGetBuild({ appSlug, axios: client, buildSlug });
buildStub.build.status = 1;
buildStub.build.build_finished = new Date().toISOString();
// The client fetchs logs until no more log chunks are returned
// The empty finaly chunck signals the end of the log (when the build is finished)
stubBuildLogStream({ appSlug, axios: client, buildSlug, logChunks: [logText, ''] });
const write = sinon.stub(process.stdout, 'write');
try {
await build.follow();
sinon.assert.calledOnce(write);
sinon.assert.calledWithExactly(write, logText);
} finally {
write.restore();
}
});
test('following a failed build that has already finished prints the log output and then errors', async (test) => {

@@ -246,8 +269,8 @@ const { appSlug, build, buildSlug, client } = test.context;

[
[ 'line one' ],
[ 'heartbeat: waiting for build output...\n' ],
[ 'line two' ],
[ 'line three' ],
[ 'heartbeat: waiting for build output...\n' ],
[ 'line four' ]
['line one'],
['heartbeat: waiting for build output...\n'],
['line two'],
['line three'],
['heartbeat: waiting for build output...\n'],
['line four']
]

@@ -254,0 +277,0 @@ );

@@ -75,3 +75,4 @@ const get = require('lodash/get');

is_archived: false,
log_chunks: []
log_chunks: [],
timestamp: new Date().toISOString()
},

@@ -78,0 +79,0 @@ status: 200

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