Skip to content

Commit

Permalink
[Snyk] Security upgrade axios from 0.27.2 to 1.6.0 (#1033)
Browse files Browse the repository at this point in the history
* [Snyk] Upgrade axios, upgrade jest

Signed-off-by: Patrik Stas <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
Co-authored-by: Patrik Stas <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2023
1 parent 2229bab commit a89d6b3
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions agents/node/vcxagent-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"dependencies": {
"@hyperledger/node-vcx-wrapper": "file:../../../wrappers/node",
"axios": "^0.27.2",
"axios": "^1.6.0",
"ffi-napi": "^4.0.3",
"fs-extra": "^4.0.3",
"lodash": "^4.17.21",
Expand All @@ -64,7 +64,7 @@
"command-line-usage": "^5.0.5",
"express": "^4.17.1",
"is-port-reachable": "^2.0.1",
"jest": "^26.6.3",
"jest": "^29.7.0",
"readline-sync": "^1.4.10",
"standard": "^16.0.4",
"winston": "^3.3.3"
Expand Down
5 changes: 2 additions & 3 deletions agents/node/vcxagent-core/src/common.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const sleepPromise = require('sleep-promise')
const axios = require('axios')
const combineURLs = require('axios/lib/helpers/combineURLs')

module.exports.testTailsUrl = 'http://some-tails-url.org'

async function waitUntilAgencyIsReady (agencyEndpoint, logger) {
let agencyReady = false

const url = combineURLs(agencyEndpoint, '/agency')
const url = `${agencyEndpoint}/agency`

while (!agencyReady) {
try {
Expand All @@ -23,7 +22,7 @@ async function waitUntilAgencyIsReady (agencyEndpoint, logger) {
async function getAgencyConfig (agencyUrl, logger) {
let agencyDid, agencyVerkey

const url = combineURLs(agencyUrl, '/agency')
const url = `${agencyUrl}/agency`

logger.info(`Obtaining agency DID and verkey info from ${url}`)
try {
Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/connection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const express = require('express')
const { createAliceAndFaber } = require('./utils/utils')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/distribute-tails.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const { proofRequestDataStandard } = require('./utils/data')
const TAILS_DIR_ALICE = '/tmp/alice/tails'
const TAILS_DIR_FABER = '/tmp/faber/tails'

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
mkdirp(TAILS_DIR_ALICE)
mkdirp(TAILS_DIR_FABER)
Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/endpoint.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const { ConnectionStateType } = require('@hyperledger/node-vcx-wrapper')
const { createAliceAndFaber } = require('./utils/utils')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/feature-discovery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const { createPairedAliceAndFaber } = require('./utils/utils')
const sleep = require('sleep-promise')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
5 changes: 3 additions & 2 deletions agents/node/vcxagent-core/test/issue-verify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const mkdirp = require('mkdirp')

const TAILS_DIR = '/tmp/faber/tails'

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {1
initRustLogger(process.env.RUST_LOG || 'vcx=error')
mkdirp(TAILS_DIR)
})
Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/messaging.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const { createPairedAliceAndFaber } = require('./utils/utils')
const sleep = require('sleep-promise')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/out-of-band.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ const logger = require('../demo/logger')('out-of-band-test')

const TAILS_DIR = '/tmp/faber/tails'

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
mkdirp(TAILS_DIR)
})
Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/public-invite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ require('jest')
const { createPairedAliceAndFaberViaPublicInvite } = require('./utils/utils')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/sign-verify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ require('jest')
const { createPairedAliceAndFaber } = require('./utils/utils')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down
3 changes: 2 additions & 1 deletion agents/node/vcxagent-core/test/trustping.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const { createPairedAliceAndFaber } = require('./utils/utils')
const sleep = require('sleep-promise')
const { initRustLogger } = require('../src')

jest.setTimeout(1000 * 60 * 4)

beforeAll(async () => {
jest.setTimeout(1000 * 60 * 4)
initRustLogger(process.env.RUST_LOG || 'vcx=error')
})

Expand Down

0 comments on commit a89d6b3

Please sign in to comment.