@asyncapi/cli 1.5.13 → 1.5.15
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 +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/lib/models/Studio.js
CHANGED
|
@@ -10,6 +10,7 @@ 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
12
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
13
|
+
const package_json_1 = require("@asyncapi/studio/package.json");
|
|
13
14
|
const { readFile, writeFile } = fs_1.promises;
|
|
14
15
|
const sockets = [];
|
|
15
16
|
const messageQueue = [];
|
|
@@ -44,7 +45,7 @@ function start(filePath, port = exports.DEFAULT_PORT) {
|
|
|
44
45
|
});
|
|
45
46
|
const server = (0, http_1.createServer)((request, response) => {
|
|
46
47
|
//not all CLI users use npm. Some package managers put dependencies in different weird places
|
|
47
|
-
//this is why we need to first figure out where exactly is the index.html located
|
|
48
|
+
//this is why we need to first figure out where exactly is the index.html located
|
|
48
49
|
//and then strip index.html from the path to point to directory with the rest of the studio
|
|
49
50
|
const indexLocation = require.resolve('@asyncapi/studio/build/index.html');
|
|
50
51
|
const hostFolder = indexLocation.substring(0, indexLocation.lastIndexOf(path_1.default.sep));
|
|
@@ -92,7 +93,7 @@ function start(filePath, port = exports.DEFAULT_PORT) {
|
|
|
92
93
|
sockets.splice(sockets.findIndex(s => s === socket));
|
|
93
94
|
});
|
|
94
95
|
server.listen(port, () => {
|
|
95
|
-
const url = `http://localhost:${port}?liveServer=${port}`;
|
|
96
|
+
const url = `http://localhost:${port}?liveServer=${port}&studio-version=${package_json_1.version}`;
|
|
96
97
|
console.log(`Studio is running at ${url}`);
|
|
97
98
|
console.log(`Watching changes on file ${filePath}`);
|
|
98
99
|
(0, open_1.default)(url);
|
package/oclif.manifest.json
CHANGED
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": "1.5.
|
|
4
|
+
"version": "1.5.15",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@asyncapi/bundler": "^0.4.0",
|
|
13
13
|
"@asyncapi/converter": "^1.4.11",
|
|
14
14
|
"@asyncapi/diff": "^0.4.1",
|
|
15
|
-
"@asyncapi/generator": "^1.17.
|
|
15
|
+
"@asyncapi/generator": "^1.17.7",
|
|
16
16
|
"@asyncapi/modelina": "^3.3.3",
|
|
17
17
|
"@asyncapi/openapi-schema-parser": "^3.0.12",
|
|
18
18
|
"@asyncapi/optimizer": "^0.2.7",
|