@asyncapi/cli 0.40.0 → 0.40.2

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/README.md CHANGED
@@ -75,6 +75,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
75
75
  <tr>
76
76
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/sambhavgupta0705"><img src="https://avatars.githubusercontent.com/u/81870866?v=4?s=100" width="100px;" alt="Sambhav Gupta"/><br /><sub><b>Sambhav Gupta</b></sub></a><br /><a href="https://github.com/asyncapi/cli/commits?author=sambhavgupta0705" title="Code">💻</a> <a href="https://github.com/asyncapi/cli/commits?author=sambhavgupta0705" title="Tests">⚠️</a></td>
77
77
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/CyberHippo"><img src="https://avatars.githubusercontent.com/u/18269437?v=4?s=100" width="100px;" alt="Hippolyte Vergnol"/><br /><sub><b>Hippolyte Vergnol</b></sub></a><br /><a href="https://github.com/asyncapi/cli/commits?author=CyberHippo" title="Code">💻</a> <a href="#infra-CyberHippo" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
78
+ <td align="center" valign="top" width="14.28%"><a href="https://www.jentevets.com"><img src="https://avatars.githubusercontent.com/u/22449126?v=4?s=100" width="100px;" alt="Jente Vets"/><br /><sub><b>Jente Vets</b></sub></a><br /><a href="https://github.com/asyncapi/cli/commits?author=Vetsoo" title="Code">💻</a></td>
78
79
  </tr>
79
80
  </tbody>
80
81
  </table>
@@ -9,6 +9,7 @@ const serve_handler_1 = tslib_1.__importDefault(require("serve-handler"));
9
9
  const ws_1 = require("ws");
10
10
  const chokidar_1 = tslib_1.__importDefault(require("chokidar"));
11
11
  const open_1 = tslib_1.__importDefault(require("open"));
12
+ const path_1 = tslib_1.__importDefault(require("path"));
12
13
  const { readFile, writeFile } = fs_1.promises;
13
14
  const sockets = [];
14
15
  const messageQueue = [];
@@ -46,7 +47,7 @@ function start(filePath, port = exports.DEFAULT_PORT) {
46
47
  //this is why we need to first figure out where exactly is the index.html located
47
48
  //and then strip index.html from the path to point to directory with the rest of the studio
48
49
  const indexLocation = require.resolve('@asyncapi/studio/build/index.html');
49
- const hostFolder = indexLocation.substring(0, indexLocation.lastIndexOf('/'));
50
+ const hostFolder = indexLocation.substring(0, indexLocation.lastIndexOf(path_1.default.sep));
50
51
  return (0, serve_handler_1.default)(request, response, {
51
52
  public: hostFolder,
52
53
  });
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.0",
2
+ "version": "0.40.2",
3
3
  "commands": {
4
4
  "bundle": {
5
5
  "id": "bundle",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@asyncapi/cli",
3
3
  "description": "All in one CLI for all AsyncAPI tools",
4
- "version": "0.40.0",
4
+ "version": "0.40.2",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run"