@hardkas/config 0.7.3-alpha → 0.7.5-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var DEFAULT_HARDKAS_CONFIG = {
|
|
|
37
37
|
network: "testnet-11",
|
|
38
38
|
rpcUrl: "wss://tn11.kaspa.stream:443"
|
|
39
39
|
},
|
|
40
|
-
|
|
40
|
+
mainnet: {
|
|
41
41
|
kind: "kaspa-rpc",
|
|
42
42
|
network: "mainnet",
|
|
43
43
|
rpcUrl: "wss://kaspa.stream:443"
|
|
@@ -109,7 +109,9 @@ async function loadConfigFile(filePath, cwd) {
|
|
|
109
109
|
config: mergedConfig
|
|
110
110
|
};
|
|
111
111
|
} catch (error) {
|
|
112
|
-
throw new Error(
|
|
112
|
+
throw new Error(
|
|
113
|
+
`Failed to load HardKAS config at ${filePath}: ${error instanceof Error ? error.message : String(error)}`
|
|
114
|
+
);
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
|
|
@@ -118,7 +120,10 @@ function resolveNetworkTarget(options) {
|
|
|
118
120
|
const { config, network } = options;
|
|
119
121
|
let name = network || config.defaultNetwork || "simulated";
|
|
120
122
|
if (name === "simnet") {
|
|
121
|
-
console.warn(
|
|
123
|
+
console.warn(
|
|
124
|
+
"\x1B[33m%s\x1B[0m",
|
|
125
|
+
"WARNING: The 'simnet' network alias is deprecated. It will be removed in the next breaking release. Resolving to 'simulated'."
|
|
126
|
+
);
|
|
122
127
|
name = "simulated";
|
|
123
128
|
}
|
|
124
129
|
const networks = {
|
|
@@ -128,7 +133,9 @@ function resolveNetworkTarget(options) {
|
|
|
128
133
|
const target = networks[name];
|
|
129
134
|
if (!target) {
|
|
130
135
|
const available = Object.keys(networks).join(", ");
|
|
131
|
-
throw new Error(
|
|
136
|
+
throw new Error(
|
|
137
|
+
`Unknown HardKAS network '${name}'. Available networks: ${available}`
|
|
138
|
+
);
|
|
132
139
|
}
|
|
133
140
|
return {
|
|
134
141
|
name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hardkas/config",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5-alpha",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"jiti": "^2.4.2",
|
|
20
|
-
"@hardkas/core": "0.7.
|
|
20
|
+
"@hardkas/core": "0.7.5-alpha"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tsup": "^8.3.5",
|