vovk-cli 0.0.1-beta.10 → 0.0.1-beta.11
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.
|
@@ -3,13 +3,11 @@ import loglevel from 'loglevel';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import getConfig from './getConfig.mjs';
|
|
5
5
|
export default async function getProjectInfo({ port: givenPort, clientOutDir, } = {}) {
|
|
6
|
-
const env = process.env;
|
|
7
6
|
const port = givenPort?.toString() ?? process.env.PORT ?? '3000';
|
|
8
7
|
// Make PORT available to the config file at getConfig
|
|
9
8
|
process.env.PORT = port;
|
|
10
9
|
const cwd = process.cwd();
|
|
11
10
|
const { config, srcRoot } = await getConfig({ clientOutDir });
|
|
12
|
-
const vovkPort = env.VOVK_PORT || (parseInt(port) + 6969).toString();
|
|
13
11
|
const apiEntryPoint = `${config.origin ?? ''}/${config.rootEntry}`;
|
|
14
12
|
const apiDir = path.join(srcRoot, 'app', config.rootEntry);
|
|
15
13
|
const metadataOutImportPath = path.relative(config.clientOutDir, config.metadataOutDir);
|
|
@@ -27,7 +25,6 @@ export default async function getProjectInfo({ port: givenPort, clientOutDir, }
|
|
|
27
25
|
return {
|
|
28
26
|
cwd,
|
|
29
27
|
port,
|
|
30
|
-
vovkPort,
|
|
31
28
|
apiEntryPoint,
|
|
32
29
|
apiDir,
|
|
33
30
|
srcRoot,
|
package/dist/server/index.mjs
CHANGED
|
@@ -237,7 +237,7 @@ export class VovkCLIServer {
|
|
|
237
237
|
}
|
|
238
238
|
async startServer({ clientOutDir } = {}) {
|
|
239
239
|
this.#projectInfo = await getProjectInfo({ clientOutDir });
|
|
240
|
-
const {
|
|
240
|
+
const { log, config, cwd, apiDir } = this.#projectInfo;
|
|
241
241
|
process.on('uncaughtException', (err) => {
|
|
242
242
|
log.error(`Uncaught Exception: ${err.message}`);
|
|
243
243
|
});
|
|
@@ -247,10 +247,6 @@ export class VovkCLIServer {
|
|
|
247
247
|
const apiDirFullPath = path.join(cwd, apiDir);
|
|
248
248
|
const metadataOutFullPath = path.join(cwd, config.metadataOutDir);
|
|
249
249
|
this.#segments = await locateSegments(apiDirFullPath);
|
|
250
|
-
if (!vovkPort) {
|
|
251
|
-
log.error('No port provided for Vovk Server. Exiting...');
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
250
|
await debouncedEnsureMetadataFiles(metadataOutFullPath, this.#segments.map((s) => s.segmentName), this.#projectInfo);
|
|
255
251
|
// Ping every segment in 3 seconds in order to update metadata and start watching
|
|
256
252
|
setTimeout(() => {
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vovk-cli",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.11",
|
|
4
4
|
"bin": {
|
|
5
5
|
"vovk": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://vovk.dev",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"vovk": "^3.0.0-beta.
|
|
33
|
+
"vovk": "^3.0.0-beta.20"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@inquirer/prompts": "^5.3.8",
|