@asyncapi/cli 0.40.0 → 0.40.1
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/lib/models/Studio.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/lib/models/Studio.js
CHANGED
|
@@ -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
|
});
|
package/oclif.manifest.json
CHANGED