@eik/cli 2.0.22 → 2.0.23

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,11 @@
1
+ ## [2.0.23](https://github.com/eik-lib/cli/compare/v2.0.22...v2.0.23) (2024-01-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * log a more helpful 404 ([763ffda](https://github.com/eik-lib/cli/commit/763ffda93b5247acc7af328094ecd634d1b25b51))
7
+ * print which server you're logging into ([6ec8333](https://github.com/eik-lib/cli/commit/6ec8333eb8bc6c9b535aeb55d1f2226e093286b5))
8
+
1
9
  ## [2.0.22](https://github.com/eik-lib/cli/compare/v2.0.21...v2.0.22) (2022-01-28)
2
10
 
3
11
 
package/classes/alias.js CHANGED
@@ -43,13 +43,15 @@ module.exports = class Alias {
43
43
  );
44
44
 
45
45
  this.log.debug(
46
- `Requesting creation of ${this.type} alias "v${this.alias}" for ${this.name} v${this.version}`,
46
+ `Requesting creation of ${this.type} alias "v${this.alias}" for ${this.name} v${this.version} on ${this.server}`,
47
47
  );
48
+
49
+ const pathname = join(this.type, this.name, `v${this.alias}`);
48
50
  try {
49
51
  const { message } = await request({
50
52
  host: this.server,
51
53
  method: 'PUT',
52
- pathname: join(this.type, this.name, `v${this.alias}`),
54
+ pathname,
53
55
  data: { version: this.version },
54
56
  token: this.token,
55
57
  });
@@ -73,7 +75,7 @@ module.exports = class Alias {
73
75
  const { message: msg } = await request({
74
76
  host: this.server,
75
77
  method: 'POST',
76
- pathname: join(this.type, this.name, `v${this.alias}`),
78
+ pathname,
77
79
  data: { version: this.version },
78
80
  token: this.token,
79
81
  });
@@ -100,7 +102,7 @@ module.exports = class Alias {
100
102
  throw new Error('Client unauthorized with server');
101
103
  case 404:
102
104
  throw new Error(
103
- 'The server was unable to locate the required resource',
105
+ `The server was unable to locate ${pathname}. Ensure you have the correct package type (eik package-alias vs eik npm-alias), name and that the version exists on the server.`,
104
106
  );
105
107
  case 409:
106
108
  throw new Error(
package/commands/login.js CHANGED
@@ -78,7 +78,7 @@ exports.handler = async (argv) => {
78
78
 
79
79
  if (!k) {
80
80
  await new Promise((resolve) => {
81
- rl.question('Enter login key > ', (input) => {
81
+ rl.question(`Enter login key for ${s} > `, (input) => {
82
82
  k = input;
83
83
  resolve();
84
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/cli",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "Cli tool for publishing assets",
5
5
  "main": "./classes/index.js",
6
6
  "bin": {
@@ -60,7 +60,7 @@
60
60
  "@eik/service": "1.2.98",
61
61
  "@semantic-release/changelog": "6.0.1",
62
62
  "@semantic-release/git": "10.0.1",
63
- "eslint": "8.7.0",
63
+ "eslint": "8.8.0",
64
64
  "eslint-config-airbnb-base": "15.0.0",
65
65
  "eslint-config-prettier": "8.3.0",
66
66
  "eslint-plugin-import": "2.25.4",
@@ -69,11 +69,11 @@
69
69
  "fastify-cors": "6.0.2",
70
70
  "fs-extra": "10.0.0",
71
71
  "prettier": "2.5.1",
72
- "puppeteer": "13.1.1",
72
+ "puppeteer": "13.1.2",
73
73
  "react": "17.0.2",
74
74
  "react-dom": "17.0.2",
75
75
  "semantic-release": "19.0.2",
76
- "semantic-release-slack-bot": "3.5.0",
76
+ "semantic-release-slack-bot": "3.5.2",
77
77
  "tap": "15.1.6"
78
78
  }
79
79
  }