@zuplo/cli 1.70.0 → 1.71.0
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/dist/cli.js +6 -3
- package/dist/dev/handler.js +6 -3
- package/dist/editor/handler.js +14 -5
- package/dist/editor/server/server.js +4 -3
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f10a0bf2-e5b7-5794-9dfe-b8b686b85b95")}catch(e){}}();
|
|
3
3
|
import * as dotenv from "dotenv";
|
|
4
4
|
dotenv.config();
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
@@ -20,7 +20,7 @@ import project from "./cmds/project/index.js";
|
|
|
20
20
|
import test from "./cmds/test.js";
|
|
21
21
|
import tunnel from "./cmds/tunnel/index.js";
|
|
22
22
|
import variable from "./cmds/variable/index.js";
|
|
23
|
-
import { SENTRY_DSN } from "./common/constants.js";
|
|
23
|
+
import { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from "./common/constants.js";
|
|
24
24
|
import { logger } from "./common/logger.js";
|
|
25
25
|
import { printCriticalFailureToConsoleAndExit } from "./common/output.js";
|
|
26
26
|
const MIN_NODE_VERSION = "18.0.0";
|
|
@@ -55,6 +55,9 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
|
|
|
55
55
|
.strictCommands()
|
|
56
56
|
.version(packageJson?.version)
|
|
57
57
|
.help().argv;
|
|
58
|
+
void Sentry.close(MAX_WAIT_PENDING_TIME_MS).then(() => {
|
|
59
|
+
process.exit(0);
|
|
60
|
+
});
|
|
58
61
|
}
|
|
59
62
|
else {
|
|
60
63
|
printCriticalFailureToConsoleAndExit(`The zup CLI requires at least node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of node.js.
|
|
@@ -62,4 +65,4 @@ else {
|
|
|
62
65
|
Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
|
|
63
66
|
}
|
|
64
67
|
//# sourceMappingURL=cli.js.map
|
|
65
|
-
//# debugId=
|
|
68
|
+
//# debugId=f10a0bf2-e5b7-5794-9dfe-b8b686b85b95
|
package/dist/dev/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fe20d450-f9b0-547f-8255-96a0edc7e86b")}catch(e){}}();
|
|
3
3
|
import * as dotenv from "dotenv";
|
|
4
4
|
import { cpSync, existsSync } from "node:fs";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -23,7 +23,7 @@ export async function dev(argv) {
|
|
|
23
23
|
}
|
|
24
24
|
const core = await import("@zuplo/core");
|
|
25
25
|
const port = argv.port ?? 9000;
|
|
26
|
-
await core.default.startDevServer({
|
|
26
|
+
const serverProcess = await core.default.startDevServer({
|
|
27
27
|
sourceDirectory,
|
|
28
28
|
port,
|
|
29
29
|
generateSourceMaps: true,
|
|
@@ -32,6 +32,9 @@ export async function dev(argv) {
|
|
|
32
32
|
disableIntegratedDevPortalBuild: false,
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
serverProcess.on("exit", resolve);
|
|
37
|
+
});
|
|
35
38
|
}
|
|
36
39
|
//# sourceMappingURL=handler.js.map
|
|
37
|
-
//# debugId=
|
|
40
|
+
//# debugId=fe20d450-f9b0-547f-8255-96a0edc7e86b
|
package/dist/editor/handler.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7eb1c399-ebb2-5b8a-a80f-f827c9bac32d")}catch(e){}}();
|
|
3
|
+
import { logger } from "../common/logger.js";
|
|
3
4
|
import { ApiServer } from "./server/server.js";
|
|
4
5
|
export async function editor(argv) {
|
|
5
6
|
const workingDir = argv.dir || null;
|
|
6
7
|
const server = new ApiServer(workingDir);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
server.start().catch(logger.error);
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
process.on("SIGTERM", async () => {
|
|
11
|
+
await server.close();
|
|
12
|
+
resolve();
|
|
13
|
+
});
|
|
14
|
+
process.on("SIGINT", async () => {
|
|
15
|
+
await server.close();
|
|
16
|
+
resolve();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
10
19
|
}
|
|
11
20
|
//# sourceMappingURL=handler.js.map
|
|
12
|
-
//# debugId=
|
|
21
|
+
//# debugId=7eb1c399-ebb2-5b8a-a80f-f827c9bac32d
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3afd227e-e101-5e6c-8791-6878f235a58c")}catch(e){}}();
|
|
3
3
|
import fastifyStatic from "@fastify/static";
|
|
4
4
|
import Fastify from "fastify";
|
|
5
5
|
import fs, { readdir } from "node:fs/promises";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { logger } from "../../common/logger.js";
|
|
8
9
|
import { corsPlugin } from "./cors-plugin.js";
|
|
9
10
|
import { dirExists, fileExists } from "./xfs.js";
|
|
10
11
|
export class ApiServer {
|
|
@@ -17,7 +18,7 @@ export class ApiServer {
|
|
|
17
18
|
this.listenerPort = 5500;
|
|
18
19
|
this.listenerHost = "localhost";
|
|
19
20
|
this.fastify = Fastify({
|
|
20
|
-
logger:
|
|
21
|
+
logger: logger,
|
|
21
22
|
trustProxy: true,
|
|
22
23
|
disableRequestLogging: true,
|
|
23
24
|
});
|
|
@@ -131,4 +132,4 @@ export class ApiServer {
|
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
134
|
//# sourceMappingURL=server.js.map
|
|
134
|
-
//# debugId=
|
|
135
|
+
//# debugId=3afd227e-e101-5e6c-8791-6878f235a58c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.71.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": "https://github.com/zuplo/cli",
|
|
6
6
|
"description": "The command-line interface for Zuplo",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"@inquirer/prompts": "^3.0.4",
|
|
59
59
|
"@sentry/node": "^7.69.0",
|
|
60
60
|
"@swc/core": "1.3.78",
|
|
61
|
-
"@zuplo/core": "5.
|
|
61
|
+
"@zuplo/core": "5.1290.0",
|
|
62
62
|
"@zuplo/pino-pretty-configurations": "^1.4.0",
|
|
63
|
-
"@zuplo/runtime": "5.
|
|
63
|
+
"@zuplo/runtime": "5.1290.0",
|
|
64
64
|
"chalk": "^5.1.2",
|
|
65
65
|
"deno-bin": "1.31.1",
|
|
66
66
|
"dotenv": "^16.3.1",
|