Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"@api3/commons": "1.2.0",
"@api3/commons": "1.3.0",
"@api3/eslint-plugin-commons": "^3.1.1",
"eslint": "^8.57.1",
"@types/jest": "^30.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/airnode-feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
"@api3/airnode-adapter": "^0.15.0",
"@api3/airnode-node": "^0.15.0",
"@api3/airnode-validator": "^0.15.0",
"@api3/commons": "^1.2.0",
"@api3/commons": "^1.3.0",
"@api3/ois": "^3.0.0",
"@api3/promise-utils": "^0.4.0",
"axios": "^1.18.1",
"dotenv": "^17.4.2",
"ethers": "^5.8.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/airnode-feed/src/api-requests/data-provider.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { buildAndExecuteRequest, extractAndEncodeResponse } from '@api3/airnode-adapter';
import type * as node from '@api3/airnode-node';
import { getReservedParameters } from '@api3/airnode-node/dist/src/adapters/http/parameters';
import { preProcessEndpointParameters, type EndpointParameters, postProcessResponse } from '@api3/commons';
import { go, goSync, preProcessEndpointParameters, type EndpointParameters, postProcessResponse } from '@api3/commons';
import type { Endpoint, OIS, Endpoint as OisEndpoint } from '@api3/ois';
import { go, goSync } from '@api3/promise-utils';
import { isEmpty, isNil } from 'lodash';

import { logger } from '../logger';
Expand Down
6 changes: 3 additions & 3 deletions packages/airnode-feed/src/heartbeat/heartbeat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
import { join } from 'node:path';

import { createSha256Hash, serializePlainObject } from '@api3/commons';
import * as promiseUtilsModule from '@api3/promise-utils';
import * as commonsModule from '@api3/commons';
import { ethers } from 'ethers';

import { config, verifyHeartbeatLog } from '../../test/fixtures';
Expand Down Expand Up @@ -92,10 +92,10 @@ test('sends heartbeat payload every minute', async () => {
// from the same module is annoying. See: https://jestjs.io/docs/mock-functions#mocking-partials.
//
// Instead we spyOn the "go" which is a third party module that wraps the logHeartbeat call.
jest.spyOn(promiseUtilsModule, 'go');
jest.spyOn(commonsModule, 'go');

initiateHeartbeatLoop();

await jest.advanceTimersByTimeAsync(1000 * 60 * 8);
expect(promiseUtilsModule.go).toHaveBeenCalledTimes(8);
expect(commonsModule.go).toHaveBeenCalledTimes(8);
});
3 changes: 1 addition & 2 deletions packages/airnode-feed/src/heartbeat/heartbeat.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createSha256Hash, serializePlainObject } from '@api3/commons';
import { go } from '@api3/promise-utils';
import { createSha256Hash, go, serializePlainObject } from '@api3/commons';

import { logger } from '../logger';
import { getState } from '../state';
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-feed/src/sign-template-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ExtractedAndEncodedResponse } from '@api3/airnode-adapter';
import { go } from '@api3/promise-utils';
import { go } from '@api3/commons';
import { isNil } from 'lodash';

import { logger } from './logger';
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-feed/src/validation/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { join } from 'node:path';
import { cwd } from 'node:process';

import {
go,
interpolateSecretsIntoConfig,
loadConfig as loadRawConfigFromFilesystem,
loadSecrets as loadRawSecretsFromFilesystem,
} from '@api3/commons';
import { go } from '@api3/promise-utils';

import { logger } from '../logger';

Expand Down
3 changes: 2 additions & 1 deletion packages/airnode-feed/src/validation/schema.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as abi from '@api3/airnode-abi';
import {
go,
goSync,
type LogFormat,
type LogLevel,
logFormatOptions,
logLevelOptions,
preProcessEndpointParameters,
} from '@api3/commons';
import { oisSchema, type OIS, type Endpoint as oisEndpoint } from '@api3/ois';
import { go, goSync } from '@api3/promise-utils';
import { ethers } from 'ethers';
import { isNil, uniqWith, isEqual, isEmpty, uniq } from 'lodash';
import { z } from 'zod';
Expand Down
3 changes: 1 addition & 2 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
},
"license": "MIT",
"dependencies": {
"@api3/commons": "^1.2.0",
"@api3/commons": "^1.3.0",
"@api3/airnode-feed": "workspace:*",
"@api3/promise-utils": "^0.4.0",
"@api3/signed-api": "workspace:*",
"axios": "^1.18.1",
"ethers": "^5.8.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/e2e/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { deriveBeaconId, type Hex } from '@api3/commons';
import { goSync } from '@api3/promise-utils';
import { deriveBeaconId, goSync, type Hex } from '@api3/commons';
import { ethers } from 'ethers';

export const formatData = (networkResponse: any) => {
Expand Down
3 changes: 1 addition & 2 deletions packages/signed-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
},
"dependencies": {
"@api3/airnode-feed": "workspace:*",
"@api3/commons": "^1.2.0",
"@api3/promise-utils": "^0.4.0",
"@api3/commons": "^1.3.0",
"@aws-sdk/client-s3": "^3.1095.0",
"dotenv": "^17.4.2",
"ethers": "^5.8.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/signed-api/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { join } from 'node:path';
import { cwd } from 'node:process';

import {
go,
goSync,
interpolateSecretsIntoConfig,
loadConfig as loadRawConfigFromFilesystem,
loadSecrets as loadRawSecretsFromFilesystem,
} from '@api3/commons';
import { go, goSync } from '@api3/promise-utils';
import { S3 } from '@aws-sdk/client-s3';

import { loadEnv } from '../env';
Expand Down
3 changes: 1 addition & 2 deletions packages/signed-api/src/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { signedApiBatchPayloadV1Schema, signedApiBatchPayloadV2Schema } from '@api3/airnode-feed';
import { createSha256Hash, serializePlainObject } from '@api3/commons';
import { go, goSync } from '@api3/promise-utils';
import { createSha256Hash, go, goSync, serializePlainObject } from '@api3/commons';
import { isEmpty, omit, pick } from 'lodash';

import { getConfig } from './config/config';
Expand Down
2 changes: 1 addition & 1 deletion packages/signed-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { go } from '@api3/promise-utils';
import { go } from '@api3/commons';
import z from 'zod';

import { loadConfig } from './config/config';
Expand Down
3 changes: 1 addition & 2 deletions packages/signed-api/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type LogFormat, logFormatOptions, logLevelOptions, type LogLevel } from '@api3/commons';
import { goSync } from '@api3/promise-utils';
import { goSync, type LogFormat, logFormatOptions, logLevelOptions, type LogLevel } from '@api3/commons';
import { ethers } from 'ethers';
import { uniqBy } from 'lodash';
import { z } from 'zod';
Expand Down
2 changes: 1 addition & 1 deletion packages/signed-api/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { go } from '@api3/promise-utils';
import { go } from '@api3/commons';
import express from 'express';

import { getData, getStatus, listAirnodeAddresses, batchInsertData } from './handlers';
Expand Down
2 changes: 1 addition & 1 deletion packages/signed-api/src/signed-data-verifier.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { goSync } from '@api3/promise-utils';
import { goSync } from '@api3/commons';
import workerpool from 'workerpool';

import { type InternalSignedData } from './types';
Expand Down
34 changes: 12 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading