Skip to content

Commit bd4793d

Browse files
committed
fix: include the token in getArgsOrDefaults
It was not part of toJSON()
1 parent 6034161 commit bd4793d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

utils/defaults.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@ export function getArgsOrDefaults(argv, opts) {
3535
}
3636
try {
3737
const stats = fs.statSync(path);
38+
/** @type {import('@eik/common').EikConfig} */
39+
let eikConfig;
3840
if (stats.isDirectory()) {
39-
config = helpers.configStore.findInDirectory(path).toJSON();
41+
eikConfig = helpers.configStore.findInDirectory(path);
4042
} else {
41-
config = helpers.configStore.loadFromPath(path).toJSON();
43+
eikConfig = helpers.configStore.loadFromPath(path);
4244
}
45+
config = {
46+
name: eikConfig.name,
47+
version: eikConfig.version,
48+
type: eikConfig.type,
49+
server: eikConfig.server,
50+
token: eikConfig.token,
51+
files: eikConfig.files,
52+
out: eikConfig.out,
53+
};
4354
} catch (error) {
4455
const e = /** @type {Error} */ (error);
4556
if (e.constructor.name === "MissingConfigError") {

0 commit comments

Comments
 (0)