@studiometa/forge-cli 0.4.3 → 0.4.4
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as isOutputFormat, a as createContext, b as ValidationError, c as colors, d as deleteToken, g as setToken, h as setOrganizationSlug, i as runCommand, l as setColorEnabled, m as getToken, n as exitWithValidationError, p as getOrganizationSlug, s as OutputFormatter, u as createConfigStore } from "./error-handler-ByMitiOr.js";
|
|
2
|
+
import { S as isOutputFormat, _ as ApiError, a as createContext, b as ValidationError, c as colors, d as deleteToken, g as setToken, h as setOrganizationSlug, i as runCommand, l as setColorEnabled, m as getToken, n as exitWithValidationError, p as getOrganizationSlug, s as OutputFormatter, u as createConfigStore } from "./error-handler-ByMitiOr.js";
|
|
3
3
|
import { activateCertificate, createAuditLogger, createBackupConfig, createCommand, createDatabaseUser, createMonitor, createNginxTemplate, createRedirectRule, createScheduledJob, createSecurityRule, deleteBackupConfig, deleteDatabaseUser, deleteMonitor, deleteNginxTemplate, deleteRedirectRule, deleteScheduledJob, deleteSecurityRule, deploySiteAndWait, getBackupConfig, getCertificate, getCommand, getDaemon, getDatabase, getDatabaseUser, getEnv, getFirewallRule, getMonitor, getNginxConfig, getNginxTemplate, getRecipe, getRedirectRule, getScheduledJob, getSecurityRule, getServer, getSite, getSshKey, getUser, listBackupConfigs, listCommands, listDaemons, listDatabaseUsers, listDatabases, listDeployments, listFirewallRules, listMonitors, listNginxTemplates, listRecipes, listRedirectRules, listScheduledJobs, listSecurityRules, listServers, listSites, listSshKeys, matchByName, rebootServer, restartDaemon, runRecipe, updateBackupConfig, updateDaemon, updateDatabaseUser, updateEnv, updateNginxConfig, updateNginxTemplate, updateRecipe, updateSecurityRule, updateSite } from "@studiometa/forge-core";
|
|
4
4
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
@@ -1803,11 +1803,12 @@ async function deploymentsDeploy(ctx) {
|
|
|
1803
1803
|
process.stdout.write(chunk);
|
|
1804
1804
|
} : void 0
|
|
1805
1805
|
}, execCtx);
|
|
1806
|
-
if (
|
|
1806
|
+
if (streamLogs) process.stdout.write("\n");
|
|
1807
|
+
else process.stderr.write("\n");
|
|
1807
1808
|
const elapsedSec = (result.data.elapsed_ms / 1e3).toFixed(1);
|
|
1808
|
-
if (result.data.status === "success") ctx.formatter.success(`Deployment succeeded for site ${site_id} (${elapsedSec}s).`);
|
|
1809
|
-
else ctx.formatter.error(`Deployment failed for site ${site_id} (${elapsedSec}s).`);
|
|
1810
1809
|
if (!streamLogs && result.data.log) ctx.formatter.output(result.data.log);
|
|
1810
|
+
if (result.data.status === "success") ctx.formatter.success(`Deployment succeeded for site ${site_id} (${elapsedSec}s).`);
|
|
1811
|
+
else throw new ApiError(`Deployment failed for site ${site_id} (${elapsedSec}s).`);
|
|
1811
1812
|
}, ctx.formatter);
|
|
1812
1813
|
}
|
|
1813
1814
|
const handleDeploymentsCommand = createCommandRouter({
|
|
@@ -3478,7 +3479,7 @@ function parseArgs(argv = process.argv.slice(2)) {
|
|
|
3478
3479
|
positional
|
|
3479
3480
|
};
|
|
3480
3481
|
}
|
|
3481
|
-
var VERSION = "0.4.
|
|
3482
|
+
var VERSION = "0.4.4";
|
|
3482
3483
|
function showHelp() {
|
|
3483
3484
|
console.log(`
|
|
3484
3485
|
${colors.bold("forge")} v${VERSION}
|