diff --git a/CHANGELOG.md b/CHANGELOG.md index ad8bbfe..e04edca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.1-alpha.75](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.74...v0.0.1-alpha.75) (2024-09-26) + ### [0.0.1-alpha.74](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.73...v0.0.1-alpha.74) (2024-09-26) diff --git a/package-lock.json b/package-lock.json index 1bf2af0..3bfa728 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "dig-propagation-server", - "version": "0.0.1-alpha.74", + "version": "0.0.1-alpha.75", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dig-propagation-server", - "version": "0.0.1-alpha.74", + "version": "0.0.1-alpha.75", "license": "ISC", "dependencies": { - "@dignetwork/dig-sdk": "^0.0.1-alpha.90", + "@dignetwork/dig-sdk": "^0.0.1-alpha.95", "async-mutex": "^0.5.0", "busboy": "^1.6.0", "chia-server-coin": "^0.0.5", @@ -250,9 +250,9 @@ } }, "node_modules/@dignetwork/dig-sdk": { - "version": "0.0.1-alpha.90", - "resolved": "https://registry.npmjs.org/@dignetwork/dig-sdk/-/dig-sdk-0.0.1-alpha.90.tgz", - "integrity": "sha512-geccu+HLsKxbmiURRPNUjKp5tfs9o6zZTOHazn6UJiMUrn3iRVKHaovCY2kxzD34K6dfor+GsgBKOdllj+43gA==", + "version": "0.0.1-alpha.95", + "resolved": "https://registry.npmjs.org/@dignetwork/dig-sdk/-/dig-sdk-0.0.1-alpha.95.tgz", + "integrity": "sha512-a/TBV64ZxerX47JEofvL9IhxtL/TWYJwNnNGNi3ubeVRfdyv0FDYc2VhLSeVVXYMmmL+XDm7g+PI57jcSTLCwQ==", "dependencies": { "@dignetwork/datalayer-driver": "^0.1.25", "archiver": "^7.0.1", diff --git a/package.json b/package.json index 379c4b0..5f24936 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dig-propagation-server", - "version": "0.0.1-alpha.74", + "version": "0.0.1-alpha.75", "description": "", "type": "commonjs", "main": "./dist/index.js", @@ -25,7 +25,7 @@ "LICENSE" ], "dependencies": { - "@dignetwork/dig-sdk": "^0.0.1-alpha.90", + "@dignetwork/dig-sdk": "^0.0.1-alpha.95", "async-mutex": "^0.5.0", "busboy": "^1.6.0", "chia-server-coin": "^0.0.5", diff --git a/src/utils/authUtils.ts b/src/utils/authUtils.ts index 98c82fe..4a65fca 100644 --- a/src/utils/authUtils.ts +++ b/src/utils/authUtils.ts @@ -1,8 +1,9 @@ import {HttpError } from "./HttpError"; +import { Environment } from "@dignetwork/dig-sdk"; export const getCredentials = async () => { - const username = process.env.DIG_USERNAME; - const password = process.env.DIG_PASSWORD; + const username = Environment.DIG_USERNAME; + const password = Environment.DIG_PASSWORD; if (!username || !password) { throw new HttpError(500, "Propagation Server does not have credentials set, please add them to the ENV to use this feature."); diff --git a/src/utils/storage.ts b/src/utils/storage.ts index 6b7ec6d..dcc6772 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -1,11 +1,11 @@ import os from "os"; import path from "path"; import fs from "fs"; +import { Environment } from "@dignetwork/dig-sdk"; export const getStorageLocation = (): string => { // If DIG_STORAGE_LOCATION is set, use it; otherwise, fallback to the default location - const dir = - process.env.DIG_FOLDER_PATH || path.join(os.homedir(), ".dig"); + const dir = Environment.DIG_FOLDER_PATH || path.join(os.homedir(), ".dig"); if (!fs.existsSync(dir)) { fs.mkdirSync(dir, { recursive: true }); }