Skip to content

Commit cbdae0c

Browse files
committed
chore: remove profiler, logger, etc
1 parent 9aa16c9 commit cbdae0c

32 files changed

+48
-1721
lines changed

src/api/async-handler.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/api/controllers/cache-controller.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import * as prom from 'prom-client';
22
import { normalizeHashString } from '../../helpers';
33
import { PgStore } from '../../datastore/pg-store';
4-
import { logger } from '../../logger';
5-
import { CACHE_CONTROL_MUST_REVALIDATE, parseIfNoneMatchHeader, sha256 } from '@stacks/api-toolkit';
4+
import {
5+
CACHE_CONTROL_MUST_REVALIDATE,
6+
parseIfNoneMatchHeader,
7+
sha256,
8+
logger,
9+
} from '@stacks/api-toolkit';
610
import { FastifyReply, FastifyRequest } from 'fastify';
711
import { BlockParams } from '../routes/v2/schemas';
812

src/api/controllers/db-controller.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
decodeClarityValueToTypeName,
1111
decodePostConditions,
1212
} from '@hirosystems/stacks-encoding-native-js';
13-
1413
import {
1514
BlockIdentifier,
1615
DbAssetEventTypeId,
@@ -30,8 +29,7 @@ import { unwrapOptional, FoundOrNot, unixEpochToIso, EMPTY_HASH_256 } from '../.
3029
import { serializePostCondition, serializePostConditionMode } from '../serializers/post-conditions';
3130
import { PgStore } from '../../datastore/pg-store';
3231
import { SyntheticPoxEventName } from '../../pox-helpers';
33-
import { logger } from '../../logger';
34-
32+
import { logger } from '@stacks/api-toolkit';
3533
import {
3634
AbstractMempoolTransaction,
3735
AbstractTransaction,

src/api/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ import { PgStore } from '../datastore/pg-store';
2525
import { PgWriteStore } from '../datastore/pg-write-store';
2626
import { WebSocketTransmitter } from './routes/ws/web-socket-transmitter';
2727
import { PoxEventRoutes, PoxRoutes } from './routes/pox';
28-
import { logger } from '../logger';
2928
import {
3029
PINO_LOGGER_CONFIG,
3130
SERVER_VERSION,
3231
isPgConnectionError,
3332
isProdEnv,
3433
waiter,
34+
logger,
3535
} from '@stacks/api-toolkit';
3636
import { BlockRoutesV2 } from './routes/v2/blocks';
3737
import { BurnBlockRoutesV2 } from './routes/v2/burn-blocks';

src/api/routes/address.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {
2121
handleTransactionCache,
2222
} from '../controllers/cache-controller';
2323
import { PgStore } from '../../datastore/pg-store';
24-
import { logger } from '../../logger';
25-
import { has0xPrefix } from '@stacks/api-toolkit';
24+
import { has0xPrefix, logger } from '@stacks/api-toolkit';
2625

2726
import { FastifyPluginAsync } from 'fastify';
2827
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';

src/api/routes/bns/pricing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@stacks/transactions';
1010
import { getChainIDNetwork, isValidPrincipal } from './../../../helpers';
1111
import { getBnsContractID, GetStacksNetwork } from '../../../event-stream/bns/bns-helpers';
12-
import { logger } from '../../../logger';
12+
import { logger } from '@stacks/api-toolkit';
1313
import { FastifyPluginAsync } from 'fastify';
1414
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
1515
import { Server } from 'node:http';

src/api/routes/core-node-rpc-proxy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import { parsePort, REPO_DIR } from '../../helpers';
22
import * as fs from 'fs';
33
import * as path from 'path';
44
import fetch, { RequestInit } from 'node-fetch';
5-
import { logger } from '../../logger';
65
import { FastifyPluginAsync } from 'fastify';
76
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
87
import { Server, ServerResponse } from 'node:http';
98
import { fastifyHttpProxy } from '@fastify/http-proxy';
109
import { StacksCoreRpcClient } from '../../core-rpc/client';
11-
import { parseBoolean } from '@stacks/api-toolkit';
10+
import { parseBoolean, logger } from '@stacks/api-toolkit';
1211

1312
function GetStacksNodeProxyEndpoint() {
1413
// Use STACKS_CORE_PROXY env vars if available, otherwise fallback to `STACKS_CORE_RPC

src/api/routes/faucets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import { DbFaucetRequestCurrency } from '../../datastore/common';
2323
import { getChainIDNetwork, getStxFaucetNetwork, stxToMicroStx } from '../../helpers';
2424
import { StacksCoreRpcClient } from '../../core-rpc/client';
25-
import { logger } from '../../logger';
25+
import { logger } from '@stacks/api-toolkit';
2626
import { FastifyPluginAsync, preHandlerHookHandler } from 'fastify';
2727
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
2828
import { fastifyFormbody } from '@fastify/formbody';

src/api/routes/ws/channels/socket-io-channel.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import {
2525
getWsPingIntervalMs,
2626
getWsPingTimeoutMs,
2727
} from '../web-socket-transmitter';
28-
import { logger } from '../../../../logger';
29-
import { isProdEnv } from '@stacks/api-toolkit';
28+
import { isProdEnv, logger } from '@stacks/api-toolkit';
3029

3130
const component = { component: 'socket-io' };
3231

src/api/routes/ws/channels/ws-rpc-channel.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ import type {
3232
NftEvent,
3333
} from 'client/src/types';
3434
import { getWsMessageTimeoutMs, getWsPingIntervalMs } from '../web-socket-transmitter';
35-
import { logger } from '../../../../logger';
36-
import { isProdEnv, resolveOrTimeout } from '@stacks/api-toolkit';
35+
import { isProdEnv, logger, resolveOrTimeout } from '@stacks/api-toolkit';
3736

3837
import { Transaction, MempoolTransaction } from '../../../schemas/entities/transactions';
3938
import { Block } from '../../..//schemas/entities/block';

0 commit comments

Comments
 (0)