Skip to content

Commit e2ddd0a

Browse files
committed
Upgrade axios version
1 parent bba9610 commit e2ddd0a

File tree

9 files changed

+44
-26
lines changed

9 files changed

+44
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ordermentum/asap",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"main": "build/index.js",
55
"license": "MIT",
66
"devDependencies": {

packages/asap-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ordermentum/asap-core",
3-
"version": "0.1.9",
3+
"version": "0.2.0",
44
"main": "build/index.js",
55
"files": [
66
"build/*"
@@ -33,7 +33,7 @@
3333
"typecheck": "yarn tsc --noEmit"
3434
},
3535
"dependencies": {
36-
"axios": "^0.26.1",
36+
"axios": "^1.6.7",
3737
"express": "^4.17.3",
3838
"jsonwebtoken": "^8.5.1",
3939
"node-cache": "^5.1.2"

packages/asap-core/test/file_test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { describe, afterEach, beforeEach } from 'mocha';
22
import { expect } from 'chai';
33
import sinon from 'sinon';
4-
import { createPublicKeyFetcher, createTestPublicKeyFetcher } from '../src/fetchers/file';
4+
import {
5+
createPublicKeyFetcher,
6+
createTestPublicKeyFetcher,
7+
} from '../src/fetchers/file';
58

69
describe('file', () => {
710
let time;
@@ -39,6 +42,6 @@ describe('file', () => {
3942
const key2 = await fetcher('test/service_2');
4043
expect(key1).to.eqls(key2);
4144
});
42-
})
45+
});
4346
});
4447
});

packages/axios-asap/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"typecheck": "yarn tsc --noEmit"
3535
},
3636
"dependencies": {
37-
"@ordermentum/asap-core": "*",
38-
"axios": "^0.26.1"
37+
"@ordermentum/asap-core": "0.2.0",
38+
"axios": "^1.6.7"
3939
}
4040
}

packages/axios-asap/src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@ import {
22
createAuthHeaderGenerator,
33
AuthHeaderConfig,
44
} from '@ordermentum/asap-core';
5-
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
5+
import axios, {
6+
AxiosInstance,
7+
AxiosRequestConfig,
8+
InternalAxiosRequestConfig,
9+
} from 'axios';
610
import http from 'http';
711
import https from 'https';
812

913
export const createAsapInterceptor = (authConfig: AuthHeaderConfig) => {
1014
const headerGenerator = createAuthHeaderGenerator({
1115
...authConfig,
1216
});
13-
return (config: AxiosRequestConfig) => {
17+
return (config: InternalAxiosRequestConfig): InternalAxiosRequestConfig => {
1418
const header = headerGenerator();
1519
const headers = config.headers ?? {};
1620
headers.Authorization = header;
@@ -67,7 +71,6 @@ export const createClient = (
6771
});
6872

6973
const client = axios.create(axiosCreateOpts);
70-
// @ts-ignore
7174
client.interceptors.request.use(asapInterceptor);
7275
serviceToClientMap.set(issuerServiceKey, client);
7376

packages/express-asap/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ordermentum/express-asap",
3-
"version": "0.2.0-beta1",
3+
"version": "0.3.0",
44
"main": "build/index.js",
55
"license": "MIT",
66
"files": [
@@ -34,8 +34,8 @@
3434
"typecheck": "yarn tsc --noEmit"
3535
},
3636
"dependencies": {
37-
"@ordermentum/asap-core": "*",
38-
"axios": "^0.26.1",
37+
"@ordermentum/asap-core": "0.2.0",
38+
"axios": "^1.6.7",
3939
"express": "^4.17.3",
4040
"jsonwebtoken": "^8.5.1"
4141
}

packages/hapi-asap/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ordermentum/hapi-asap",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"main": "build/index.js",
55
"license": "MIT",
66
"files": [
@@ -36,8 +36,8 @@
3636
"dependencies": {
3737
"@hapi/boom": "^10.0.0",
3838
"@hapi/hapi": "^20.2.2",
39-
"@ordermentum/asap-core": "*",
40-
"axios": "^0.26.1",
39+
"@ordermentum/asap-core": "0.2.0",
40+
"axios": "^1.6.7",
4141
"express": "^4.17.3",
4242
"jsonwebtoken": "^8.5.1"
4343
}

packages/hapi-asap/src/middleware.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ const implementation = (_server: Hapi.Server, options?: any) => {
4747
* @param opts AuthenticatorOptions
4848
*
4949
*/
50-
const register = (
51-
server: Hapi.Server,
52-
options: AuthenticatorOptions
53-
) => {
50+
const register = (server: Hapi.Server, options: AuthenticatorOptions) => {
5451
server.auth.scheme('hapi-asap', implementation);
5552
server.auth.strategy('hapi-asap', 'hapi-asap', options);
5653
};
@@ -60,10 +57,6 @@ const plugin: Hapi.Plugin<AuthenticatorOptions> = {
6057
pkg: { name: 'ASAP Authentication', version: '0.1.0' },
6158
};
6259

63-
export {
64-
register,
65-
AuthenticatorOptions,
66-
plugin
67-
}
60+
export { register, AuthenticatorOptions, plugin };
6861

6962
export default plugin;

yarn.lock

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,13 +1140,22 @@ axe-core@^4.0.2:
11401140
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413"
11411141
integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==
11421142

1143-
axios@>=0.13.0, axios@^0.26.1:
1143+
axios@>=0.13.0:
11441144
version "0.26.1"
11451145
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"
11461146
integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==
11471147
dependencies:
11481148
follow-redirects "^1.14.8"
11491149

1150+
axios@^1.6.7:
1151+
version "1.6.7"
1152+
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.7.tgz#7b48c2e27c96f9c68a2f8f31e2ab19f59b06b0a7"
1153+
integrity sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==
1154+
dependencies:
1155+
follow-redirects "^1.15.4"
1156+
form-data "^4.0.0"
1157+
proxy-from-env "^1.1.0"
1158+
11501159
axobject-query@^2.2.0:
11511160
version "2.2.0"
11521161
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
@@ -2167,6 +2176,11 @@ follow-redirects@^1.14.8:
21672176
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
21682177
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
21692178

2179+
follow-redirects@^1.15.4:
2180+
version "1.15.5"
2181+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
2182+
integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==
2183+
21702184
form-data@^4.0.0:
21712185
version "4.0.0"
21722186
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
@@ -3445,6 +3459,11 @@ proxy-addr@~2.0.7:
34453459
forwarded "0.2.0"
34463460
ipaddr.js "1.9.1"
34473461

3462+
proxy-from-env@^1.1.0:
3463+
version "1.1.0"
3464+
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
3465+
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
3466+
34483467
punycode@^2.1.0:
34493468
version "2.1.1"
34503469
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"

0 commit comments

Comments
 (0)