onveloz 0.0.0-beta.33 → 0.0.0-beta.34
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/index.mjs +46 -31
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -222,32 +222,32 @@ const SERVICE_SIZES = {
|
|
|
222
222
|
};
|
|
223
223
|
const SERVICE_SIZE_KEYS = Object.keys(SERVICE_SIZES);
|
|
224
224
|
const HOURS_PER_MONTH = 720;
|
|
225
|
-
/** Service monthly prices in cents. */
|
|
225
|
+
/** Service monthly prices in cents. Magalu Cloud base + 10% margin. */
|
|
226
226
|
const SERVICE_MONTHLY_PRICES = {
|
|
227
|
-
basico:
|
|
228
|
-
essencial:
|
|
229
|
-
turbo:
|
|
230
|
-
"turbo-plus":
|
|
231
|
-
nitro:
|
|
232
|
-
"nitro-plus":
|
|
227
|
+
basico: 500,
|
|
228
|
+
essencial: 2e3,
|
|
229
|
+
turbo: 4e3,
|
|
230
|
+
"turbo-plus": 7e3,
|
|
231
|
+
nitro: 9500,
|
|
232
|
+
"nitro-plus": 17e3
|
|
233
233
|
};
|
|
234
|
-
/** Disk-based DB monthly prices in cents
|
|
234
|
+
/** Disk-based DB monthly prices in cents. Service price + 15% managed premium. */
|
|
235
235
|
const DATABASE_MONTHLY_PRICES = {
|
|
236
|
-
basico:
|
|
237
|
-
essencial:
|
|
238
|
-
turbo:
|
|
239
|
-
"turbo-plus":
|
|
240
|
-
nitro:
|
|
241
|
-
"nitro-plus":
|
|
236
|
+
basico: 600,
|
|
237
|
+
essencial: 2300,
|
|
238
|
+
turbo: 4600,
|
|
239
|
+
"turbo-plus": 8e3,
|
|
240
|
+
nitro: 11e3,
|
|
241
|
+
"nitro-plus": 19500
|
|
242
242
|
};
|
|
243
|
-
/** Redis monthly prices in cents. */
|
|
243
|
+
/** Redis monthly prices in cents. Matches disk-DB pricing. */
|
|
244
244
|
const REDIS_MONTHLY_PRICES = {
|
|
245
|
-
basico:
|
|
246
|
-
essencial:
|
|
247
|
-
turbo:
|
|
248
|
-
"turbo-plus":
|
|
249
|
-
nitro:
|
|
250
|
-
"nitro-plus":
|
|
245
|
+
basico: 600,
|
|
246
|
+
essencial: 2300,
|
|
247
|
+
turbo: 4600,
|
|
248
|
+
"turbo-plus": 8e3,
|
|
249
|
+
nitro: 11e3,
|
|
250
|
+
"nitro-plus": 19500
|
|
251
251
|
};
|
|
252
252
|
/** Hourly rates derived from monthly prices (cents per instance per hour). */
|
|
253
253
|
const SERVICE_HOURLY_RATES = Object.fromEntries(Object.entries(SERVICE_MONTHLY_PRICES).map(([k, v]) => [k, v / HOURS_PER_MONTH]));
|
|
@@ -1260,7 +1260,7 @@ async function requireAuth(options) {
|
|
|
1260
1260
|
|
|
1261
1261
|
//#endregion
|
|
1262
1262
|
//#region src/lib/client.ts
|
|
1263
|
-
const CLI_VERSION = "0.0.0-beta.
|
|
1263
|
+
const CLI_VERSION = "0.0.0-beta.34";
|
|
1264
1264
|
const USER_AGENT = `veloz-cli/${CLI_VERSION}`;
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Client source — "cli" by default; the init wizard sets this to "cli-wizard"
|
|
@@ -24221,7 +24221,7 @@ const LOGO_LINES$1 = [
|
|
|
24221
24221
|
];
|
|
24222
24222
|
const BRAND_COLOR$1 = "#FF4D00";
|
|
24223
24223
|
function getVersion() {
|
|
24224
|
-
return "0.0.0-beta.
|
|
24224
|
+
return "0.0.0-beta.34";
|
|
24225
24225
|
}
|
|
24226
24226
|
function printBanner(subtitle) {
|
|
24227
24227
|
const version$2 = getVersion();
|
|
@@ -25327,7 +25327,7 @@ async function fetchLatestVersion() {
|
|
|
25327
25327
|
}
|
|
25328
25328
|
}
|
|
25329
25329
|
function getCurrentVersion() {
|
|
25330
|
-
return "0.0.0-beta.
|
|
25330
|
+
return "0.0.0-beta.34";
|
|
25331
25331
|
}
|
|
25332
25332
|
/**
|
|
25333
25333
|
* Install a specific CLI version. Returns true on success.
|
|
@@ -30407,7 +30407,7 @@ function PickerMenu({ items, onSelect, onCancel }) {
|
|
|
30407
30407
|
|
|
30408
30408
|
//#endregion
|
|
30409
30409
|
//#region src/wizard/ui/primitives/ScreenLayout.tsx
|
|
30410
|
-
const version = "0.0.0-beta.
|
|
30410
|
+
const version = "0.0.0-beta.34";
|
|
30411
30411
|
const LOGO_LINES = [
|
|
30412
30412
|
"██╗ ██╗███████╗██╗ ██████╗ ███████╗",
|
|
30413
30413
|
"██║ ██║██╔════╝██║ ██╔═══██╗╚══███╔╝",
|
|
@@ -34349,11 +34349,16 @@ function formatErrorForMeta(prefix, err) {
|
|
|
34349
34349
|
const { message, stack } = describeError(err);
|
|
34350
34350
|
return stack ? `${prefix}: ${message}\n${stack}` : `${prefix}: ${message}`;
|
|
34351
34351
|
}
|
|
34352
|
-
|
|
34353
|
-
|
|
34354
|
-
|
|
34355
|
-
|
|
34356
|
-
|
|
34352
|
+
const TERMINAL_SIGNALS = [
|
|
34353
|
+
"SIGHUP",
|
|
34354
|
+
"SIGTERM",
|
|
34355
|
+
"SIGQUIT"
|
|
34356
|
+
];
|
|
34357
|
+
const SIGNAL_EXIT_CODES = {
|
|
34358
|
+
SIGHUP: 129,
|
|
34359
|
+
SIGTERM: 143,
|
|
34360
|
+
SIGQUIT: 131
|
|
34361
|
+
};
|
|
34357
34362
|
function installCrashHandlers(logger) {
|
|
34358
34363
|
const handleCrash = (kind, err) => {
|
|
34359
34364
|
const { message, stack } = describeError(err);
|
|
@@ -34364,13 +34369,23 @@ function installCrashHandlers(logger) {
|
|
|
34364
34369
|
process.stderr.write(`[veloz init] ${kind}: ${message}\n`);
|
|
34365
34370
|
finalizeAndUploadOnce(logger, "error", { error: formatErrorForMeta(kind, err) }).catch(() => {}).finally(() => process.exit(1));
|
|
34366
34371
|
};
|
|
34372
|
+
const handleSignal = (signal) => {
|
|
34373
|
+
logger.log("signal", `${signal} received`);
|
|
34374
|
+
finalizeAndUploadOnce(logger, "abort", { error: `signal ${signal}` }).catch(() => {}).finally(() => process.exit(SIGNAL_EXIT_CODES[signal]));
|
|
34375
|
+
};
|
|
34367
34376
|
const onUncaught = (err) => handleCrash("uncaughtException", err);
|
|
34368
34377
|
const onUnhandled = (reason) => handleCrash("unhandledRejection", reason);
|
|
34378
|
+
const signalHandlers = TERMINAL_SIGNALS.map((signal) => {
|
|
34379
|
+
const handler = () => handleSignal(signal);
|
|
34380
|
+
process.on(signal, handler);
|
|
34381
|
+
return [signal, handler];
|
|
34382
|
+
});
|
|
34369
34383
|
process.on("uncaughtException", onUncaught);
|
|
34370
34384
|
process.on("unhandledRejection", onUnhandled);
|
|
34371
34385
|
return () => {
|
|
34372
34386
|
process.off("uncaughtException", onUncaught);
|
|
34373
34387
|
process.off("unhandledRejection", onUnhandled);
|
|
34388
|
+
for (const [signal, handler] of signalHandlers) process.off(signal, handler);
|
|
34374
34389
|
};
|
|
34375
34390
|
}
|
|
34376
34391
|
/** Detect repo using the lazy local filesystem layer. */
|
|
@@ -35051,7 +35066,7 @@ async function runOrgCreationFlow(store, apiUrl) {
|
|
|
35051
35066
|
//#region src/index.ts
|
|
35052
35067
|
if (process.argv.includes("--mcp")) process.env.VELOZ_MCP = "true";
|
|
35053
35068
|
const cli = Cli.create("veloz", {
|
|
35054
|
-
version: "0.0.0-beta.
|
|
35069
|
+
version: "0.0.0-beta.34",
|
|
35055
35070
|
description: "CLI da plataforma Veloz — deploy rápido para o Brasil",
|
|
35056
35071
|
env: z.object({ VELOZ_ENV: z.string().optional().describe("Ambiente alvo (ex: preview, staging)") }),
|
|
35057
35072
|
mcp: { command: "npx -y onveloz --mcp" }
|