Skip to content

Commit c36008e

Browse files
committed
cherry-pick package.json fix
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent de74902 commit c36008e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "@hashgraph/solo",
33
"version": "0.31.1",
44
"description": "An opinionated CLI tool to deploy and manage private Hedera Networks.",
5-
"main": "dist/src/index.js",
5+
"main": "./dist/src/index.js",
66
"type": "module",
77
"bin": {
8-
"solo": "dist/solo.js"
8+
"solo": "./dist/solo.js"
99
},
1010
"publishConfig": {
1111
"access": "public"

resources/post-build-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
88
//! Target directory
99
const distDir = path.resolve(__dirname, '../dist')
1010
const srcPackageJsonFilePath = path.resolve(__dirname, '../package.json')
11-
const targetPackageJsonFilePath = path.join(distDir, 'src', 'package.json')
11+
const targetPackageJsonFilePath = path.join(distDir, 'package.json')
1212
const srcResourcesDir = path.join(__dirname, '../resources')
1313
const targetResourcesDir = path.join(distDir, 'resources')
1414

src/core/helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import util from 'util'
2121
import { SoloError } from './errors.ts'
2222
import * as semver from 'semver'
2323
import { Templates } from './templates.ts'
24-
import { HEDERA_HAPI_PATH, ROOT_CONTAINER, SOLO_LOGS_DIR } from './constants.ts'
24+
import { HEDERA_HAPI_PATH, ROOT_CONTAINER, ROOT_DIR, SOLO_LOGS_DIR } from './constants.ts'
2525
import { constants, type K8 } from './index.ts'
2626
import { FileContentsQuery, FileId, PrivateKey, ServiceEndpoint } from '@hashgraph/sdk'
2727
import { Listr } from 'listr2'
@@ -65,8 +65,7 @@ export function cloneArray <T> (arr: T[]): T[] {
6565
/** load package.json */
6666
export function loadPackageJSON (): any {
6767
try {
68-
const rootDir = process.cwd()
69-
const raw = fs.readFileSync(path.join(rootDir, 'package.json'))
68+
const raw = fs.readFileSync(path.join(ROOT_DIR, 'package.json'))
7069
return JSON.parse(raw.toString())
7170
} catch (e: Error | any) {
7271
throw new SoloError('failed to load package.json', e)

0 commit comments

Comments
 (0)