@hardkas/config 0.5.5-alpha → 0.6.1-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.
Files changed (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { createJiti } from "jiti";
10
10
 
11
11
  // src/defaults.ts
12
12
  var DEFAULT_HARDKAS_CONFIG = {
13
- defaultNetwork: "simnet",
13
+ defaultNetwork: "simulated",
14
14
  networks: {
15
15
  simulated: {
16
16
  kind: "simulated",
@@ -52,7 +52,7 @@ var DEFAULT_HARDKAS_CONFIG = {
52
52
 
53
53
  // src/load.ts
54
54
  async function loadHardkasConfig(options = {}) {
55
- const cwd = options.cwd ?? process.cwd();
55
+ const cwd = options.cwd ?? process.env.INIT_CWD ?? process.cwd();
56
56
  if (options.configPath) {
57
57
  const absolutePath = path.resolve(cwd, options.configPath);
58
58
  if (!fs.existsSync(absolutePath)) {
@@ -116,7 +116,11 @@ async function loadConfigFile(filePath, cwd) {
116
116
  // src/resolve.ts
117
117
  function resolveNetworkTarget(options) {
118
118
  const { config, network } = options;
119
- const name = network || config.defaultNetwork || "simnet";
119
+ let name = network || config.defaultNetwork || "simulated";
120
+ if (name === "simnet") {
121
+ console.warn("\x1B[33m%s\x1B[0m", "WARNING: The 'simnet' network alias is deprecated. It will be removed in the next breaking release. Resolving to 'simulated'.");
122
+ name = "simulated";
123
+ }
120
124
  const networks = {
121
125
  ...DEFAULT_HARDKAS_CONFIG.networks,
122
126
  ...config.networks || {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/config",
3
- "version": "0.5.5-alpha",
3
+ "version": "0.6.1-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.5.5-alpha"
20
+ "@hardkas/core": "0.6.1-alpha"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsup": "^8.3.5",