Skip to content

Commit

Permalink
Fix package names / compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanson-github committed Jan 5, 2025
1 parent 7ec7260 commit cabc417
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 36 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@shardus/distributor",
"name": "@shardeum-foundation/distributor",
"version": "1.0.0",
"description": "",
"main": "./build/src/distributor.js",
Expand Down Expand Up @@ -72,10 +72,10 @@
"typescript-json-schema": "0.51.0"
},
"dependencies": {
"@shardeum-foundation/lib-crypto-utils": "4.1.5",
"@shardeum-foundation/lib-types": "1.2.21",
"@fastify/cors": "8.5.0",
"@fastify/rate-limit": "7.6.0",
"@shardus/crypto-utils": "git+https://github.com/shardeum/lib-crypto-utils#dev",
"@shardus/types": "git+https://github.com/shardeum/lib-types#dev",
"amqplib": "0.10.4",
"axios": "1.4.0",
"deepmerge": "4.3.1",
Expand Down
4 changes: 2 additions & 2 deletions scripts/api_tester.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as crypto from '@shardus/crypto-utils'
import * as crypto from '@shardeum-foundation/lib-crypto-utils'
import fetch from 'node-fetch'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

//run by entering command "ts-node api-tester.ts" in terminal

Expand Down
4 changes: 2 additions & 2 deletions scripts/socket_sig_tester.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// This script is used to test the WebSocket connection to a server.
// It simulates a client sending signed data to the server and logs the server's responses.

import * as crypto from '@shardus/crypto-utils'
import * as crypto from '@shardeum-foundation/lib-crypto-utils'
import * as WebSocket from 'ws'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

// Initialize the cryptographic utility library with a specific key.
crypto.init('69fa4195670576c0160d660c3be36556ff8d504725be8a59b5a96509e0c994bc')
Expand Down
2 changes: 1 addition & 1 deletion src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFileSync } from 'fs'
import * as Logger from './Logger'
import * as merge from 'deepmerge'
import * as minimist from 'minimist'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

export enum distributorMode {
WS = 'WS',
Expand Down
4 changes: 2 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Signature } from '@shardus/crypto-utils'
import { Signature } from '@shardeum-foundation/lib-crypto-utils'
import { FastifyInstance, FastifyRequest } from 'fastify'
import { Server, IncomingMessage, ServerResponse } from 'http'
import { config } from './Config'
Expand All @@ -11,7 +11,7 @@ import * as TransactionDB from './dbstore/transactions'
import * as ReceiptDB from './dbstore/receipts'
import * as OriginalTxDB from './dbstore/originalTxsData'
import { distributorSubscribers } from './distributor/utils'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import { getDataLogReaderMetrics } from './metrics'

const TXID_LENGTH = 64
Expand Down
2 changes: 1 addition & 1 deletion src/child-process/child.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Crypto from '../utils/Crypto'
import { join } from 'path'
import { config, overrideDefaultConfig } from '../Config'
import DataLogReader from '../log-reader'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import { incrementCycleCount, incrementOriginalTxCount, incrementReceiptCount } from '../metrics'

const FILE = join(process.cwd(), 'distributor-config.json')
Expand Down
2 changes: 1 addition & 1 deletion src/child-process/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Worker } from 'node:cluster'
import { handleSocketRequest, registerParentProcessListener, registerDataReaderListeners } from './child'
import Fastify, { FastifyInstance } from 'fastify'
import fastifyRateLimit from '@fastify/rate-limit'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import { registerRoutes, validateRequestData } from '../api'
import { healthCheckRouter } from '../routes/healthCheck'

Expand Down
2 changes: 1 addition & 1 deletion src/dbstore/cycles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as db from './sqlite3storage'
import { cycleDatabase } from '.'
import { P2P, StateManager } from '@shardus/types'
import { P2P, StateManager } from '@shardeum-foundation/lib-types'
import * as Logger from '../Logger'
import { config } from '../Config'
import { DeSerializeFromJsonString, SerializeToJsonString } from '../utils/serialization'
Expand Down
2 changes: 1 addition & 1 deletion src/dbstore/receipts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Signature } from '@shardus/crypto-utils'
import { Signature } from '@shardeum-foundation/lib-crypto-utils'
import * as db from './sqlite3storage'
import { receiptDatabase } from '.'
import * as Logger from '../Logger'
Expand Down
4 changes: 2 additions & 2 deletions src/distributor/rmq_data_publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import RMQConnection from '../messaging/rabbitmq/conn'
import { sleep } from '../utils/Utils'
import { queryCycleRecordsBetween } from '../dbstore/cycles'
import { queryReceiptsBetweenCycles, Receipt } from '../dbstore/receipts'
import { CycleData } from '@shardus/types/build/src/p2p/CycleCreatorTypes'
import { CycleData } from '@shardeum-foundation/lib-types/build/src/p2p/CycleCreatorTypes'
import { CheckpointDao } from '../dbstore/checkpoints'
import { config, distributorMode } from '../Config'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import * as Crypto from '../utils/Crypto'
import { OriginalTxData, queryOriginalTxsData } from '../dbstore/originalTxsData'

Expand Down
2 changes: 1 addition & 1 deletion src/distributor/rmq_healthcheck_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Server, IncomingMessage, ServerResponse } from 'http'
import fastifyCors from '@fastify/cors'
import fastify, { FastifyInstance } from 'fastify'
import fastifyRateLimit from '@fastify/rate-limit'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import RMQModeHeathCheck from './rmq_healthcheck_service'

export const initRMQModeHttpServer = async (rmqHealthCheck: RMQModeHeathCheck): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion src/distributor/rmq_healthcheck_service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CycleRecord } from '@shardus/types/build/src/p2p/CycleCreatorTypes'
import { CycleRecord } from '@shardeum-foundation/lib-types/build/src/p2p/CycleCreatorTypes'
import { distributorMode } from '../Config'
import { CheckpointDao } from '../dbstore/checkpoints'
import { queryLatestCycleRecords } from '../dbstore/cycles'
Expand Down
2 changes: 1 addition & 1 deletion src/log-reader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as fs from 'fs'
import * as path from 'path'
import * as EventEmitter from 'events'
import * as readline from 'readline'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

import { config } from '../Config'
class DataLogReader extends EventEmitter {
Expand Down
2 changes: 1 addition & 1 deletion src/rmq_api_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Server, IncomingMessage, ServerResponse } from 'http'
import fastifyCors from '@fastify/cors'
import fastify, { FastifyInstance } from 'fastify'
import fastifyRateLimit from '@fastify/rate-limit'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import { registerRoutes } from './api'
import { initLogger, setHashKey } from './utils'
import * as Logger from './Logger'
Expand Down
6 changes: 3 additions & 3 deletions src/utils/Crypto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as core from '@shardus/crypto-utils'
import { SignedObject } from '@shardus/crypto-utils'
import { Utils as StringUtils } from '@shardus/types'
import * as core from '@shardeum-foundation/lib-crypto-utils'
import { SignedObject } from '@shardeum-foundation/lib-crypto-utils'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'
import { getDistributorInfo, getDistributorSecretKey } from './index'
// Crypto initialization fns

Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFileSync } from 'fs'
import { config } from '../Config'
import * as crypto from './Crypto'
import * as Logger from '../Logger'
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

export interface DistributorInfo {
ip: string
Expand Down
2 changes: 1 addition & 1 deletion src/utils/serialization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Utils as StringUtils } from '@shardus/types'
import { Utils as StringUtils } from '@shardeum-foundation/lib-types'

export function SerializeToJsonString(obj: unknown): string {
try {
Expand Down

0 comments on commit cabc417

Please sign in to comment.