@eik/cli 3.1.5 → 3.1.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.1.7](https://github.com/eik-lib/cli/compare/v3.1.6...v3.1.7) (2024-08-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add missing image type to debug output ([c4f0407](https://github.com/eik-lib/cli/commit/c4f04077fac1df977947b53576e1d22edba3de98))
7
+
8
+ ## [3.1.6](https://github.com/eik-lib/cli/compare/v3.1.5...v3.1.6) (2024-08-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * include the token in getArgsOrDefaults ([bd4793d](https://github.com/eik-lib/cli/commit/bd4793d1d830ed41f4cb126e841a47c5086b3cc0))
14
+
1
15
  ## [3.1.5](https://github.com/eik-lib/cli/compare/v3.1.4...v3.1.5) (2024-08-29)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/cli",
3
- "version": "3.1.5",
3
+ "version": "3.1.7",
4
4
  "description": "CLI tool for publishing assets to an Eik server",
5
5
  "main": "./classes/index.js",
6
6
  "types": "./types/classes/index.d.ts",
@@ -1,2 +1,2 @@
1
- declare function _default(type: any): "PACKAGE" | "NPM" | "MAP";
1
+ declare function _default(type: any): "PACKAGE" | "NPM" | "IMAGE" | "MAP";
2
2
  export default _default;
package/utils/defaults.js CHANGED
@@ -35,11 +35,22 @@ export function getArgsOrDefaults(argv, opts) {
35
35
  }
36
36
  try {
37
37
  const stats = fs.statSync(path);
38
+ /** @type {import('@eik/common').EikConfig} */
39
+ let eikConfig;
38
40
  if (stats.isDirectory()) {
39
- config = helpers.configStore.findInDirectory(path).toJSON();
41
+ eikConfig = helpers.configStore.findInDirectory(path);
40
42
  } else {
41
- config = helpers.configStore.loadFromPath(path).toJSON();
43
+ eikConfig = helpers.configStore.loadFromPath(path);
42
44
  }
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
+ };
43
54
  } catch (error) {
44
55
  const e = /** @type {Error} */ (error);
45
56
  if (e.constructor.name === "MissingConfigError") {
@@ -1,5 +1,6 @@
1
1
  export default (type) => {
2
2
  if (type === "package") return "PACKAGE";
3
3
  if (type === "npm") return "NPM";
4
+ if (type === "image") return "IMAGE";
4
5
  return "MAP";
5
6
  };