@brewnet/cli 0.0.8 → 0.0.9
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/admin-server-FN7HZVZW.js +16 -0
- package/dist/{app-manager-BD3DG3RL.js → app-manager-6PEKSRZ2.js} +4 -4
- package/dist/{boilerplate-manager-WEFTHL2O.js → boilerplate-manager-5GPTMOYL.js} +4 -4
- package/dist/{chunk-OH233QV2.js → chunk-7VX572H4.js} +9 -9
- package/dist/{chunk-ZKMWE5AH.js → chunk-BD4MDAIG.js} +2 -2
- package/dist/{chunk-HCHY5UIQ.js → chunk-F2M6G5C7.js} +3 -3
- package/dist/chunk-F2M6G5C7.js.map +1 -0
- package/dist/{chunk-54WFZCU6.js → chunk-F2Y226UA.js} +3 -3
- package/dist/{chunk-76C5BGZK.js → chunk-JMKFUHZO.js} +19 -15
- package/dist/chunk-JMKFUHZO.js.map +1 -0
- package/dist/{chunk-AXSHZEB3.js → chunk-MOQNPKUG.js} +2 -2
- package/dist/{chunk-YAYXULLO.js → chunk-MSVYAYKQ.js} +4 -4
- package/dist/{compose-generator-OFJ2YWMB.js → compose-generator-MIAP3RBT.js} +3 -3
- package/dist/index.js +28 -43
- package/dist/index.js.map +1 -1
- package/dist/services/admin-daemon.js +6 -6
- package/dist/{state-2SI3P4JG.js → state-CJSUDM4H.js} +3 -3
- package/package.json +1 -1
- package/dist/admin-server-CBZFDDWG.js +0 -16
- package/dist/chunk-76C5BGZK.js.map +0 -1
- package/dist/chunk-HCHY5UIQ.js.map +0 -1
- /package/dist/{admin-server-CBZFDDWG.js.map → admin-server-FN7HZVZW.js.map} +0 -0
- /package/dist/{app-manager-BD3DG3RL.js.map → app-manager-6PEKSRZ2.js.map} +0 -0
- /package/dist/{boilerplate-manager-WEFTHL2O.js.map → boilerplate-manager-5GPTMOYL.js.map} +0 -0
- /package/dist/{chunk-OH233QV2.js.map → chunk-7VX572H4.js.map} +0 -0
- /package/dist/{chunk-ZKMWE5AH.js.map → chunk-BD4MDAIG.js.map} +0 -0
- /package/dist/{chunk-54WFZCU6.js.map → chunk-F2Y226UA.js.map} +0 -0
- /package/dist/{chunk-AXSHZEB3.js.map → chunk-MOQNPKUG.js.map} +0 -0
- /package/dist/{chunk-YAYXULLO.js.map → chunk-MSVYAYKQ.js.map} +0 -0
- /package/dist/{compose-generator-OFJ2YWMB.js.map → compose-generator-MIAP3RBT.js.map} +0 -0
- /package/dist/{state-2SI3P4JG.js.map → state-CJSUDM4H.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
queryLogs,
|
|
12
12
|
removeService,
|
|
13
13
|
restoreBackup
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MSVYAYKQ.js";
|
|
15
15
|
import "./chunk-JIPAYMOA.js";
|
|
16
16
|
import {
|
|
17
17
|
FRONTEND_REGISTRY,
|
|
@@ -37,11 +37,11 @@ import {
|
|
|
37
37
|
reinitGit,
|
|
38
38
|
startContainers,
|
|
39
39
|
verifyEndpoints
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-F2Y226UA.js";
|
|
41
41
|
import {
|
|
42
42
|
composeConfigToYaml,
|
|
43
43
|
generateComposeConfig
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MOQNPKUG.js";
|
|
45
45
|
import {
|
|
46
46
|
applyFullInstallDefaults,
|
|
47
47
|
applyMinimalInstallDefaults,
|
|
@@ -52,13 +52,13 @@ import {
|
|
|
52
52
|
loadState,
|
|
53
53
|
logger,
|
|
54
54
|
saveState
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-BD4MDAIG.js";
|
|
56
56
|
import {
|
|
57
57
|
BOILERPLATE_REPO_URL,
|
|
58
58
|
DB_VERSIONS,
|
|
59
59
|
DOCKER_COMPOSE_FILENAME,
|
|
60
60
|
validateBrewnetConfig
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-F2M6G5C7.js";
|
|
62
62
|
import {
|
|
63
63
|
STACK_CATALOG,
|
|
64
64
|
VALID_DB_DRIVERS,
|
|
@@ -461,8 +461,7 @@ async function checkGit() {
|
|
|
461
461
|
}
|
|
462
462
|
var DEFAULT_PORTS = [
|
|
463
463
|
{ port: 80, service: "Traefik (Web Server)" },
|
|
464
|
-
{ port: 443, service: "Traefik (HTTPS)" }
|
|
465
|
-
{ port: 2222, service: "SSH Server" }
|
|
464
|
+
{ port: 443, service: "Traefik (HTTPS)" }
|
|
466
465
|
];
|
|
467
466
|
async function runAllChecks() {
|
|
468
467
|
const results = [];
|
|
@@ -1648,16 +1647,9 @@ async function runServerComponentsStep(state) {
|
|
|
1648
1647
|
default: next.servers.dbServer.primary || "postgresql"
|
|
1649
1648
|
});
|
|
1650
1649
|
next.servers.dbServer.primary = dbPrimary;
|
|
1650
|
+
const versions = DB_VERSIONS[dbPrimary] ?? [];
|
|
1651
|
+
next.servers.dbServer.primaryVersion = versions[0] ?? "";
|
|
1651
1652
|
if (dbPrimary !== "sqlite") {
|
|
1652
|
-
const versions = DB_VERSIONS[dbPrimary] ?? [];
|
|
1653
|
-
if (versions.length > 0) {
|
|
1654
|
-
const dbVersion = await select3({
|
|
1655
|
-
message: `${dbPrimary === "postgresql" ? "PostgreSQL" : "MySQL"} version`,
|
|
1656
|
-
choices: versions.map((v) => ({ name: v, value: v })),
|
|
1657
|
-
default: next.servers.dbServer.primaryVersion || versions[0]
|
|
1658
|
-
});
|
|
1659
|
-
next.servers.dbServer.primaryVersion = dbVersion;
|
|
1660
|
-
}
|
|
1661
1653
|
const adminUILabel = dbPrimary === "postgresql" ? "pgAdmin" : "phpMyAdmin";
|
|
1662
1654
|
const adminUI = await confirm2({
|
|
1663
1655
|
message: `Enable ${adminUILabel} (database admin UI)?`,
|
|
@@ -1728,7 +1720,7 @@ async function runServerComponentsStep(state) {
|
|
|
1728
1720
|
}
|
|
1729
1721
|
|
|
1730
1722
|
// src/wizard/steps/dev-stack.ts
|
|
1731
|
-
import { select as select4
|
|
1723
|
+
import { select as select4 } from "@inquirer/prompts";
|
|
1732
1724
|
import chalk6 from "chalk";
|
|
1733
1725
|
function buildDevStackState(selections) {
|
|
1734
1726
|
const languages = [...selections.languages];
|
|
@@ -1885,12 +1877,8 @@ async function runDevStackStep(state) {
|
|
|
1885
1877
|
console.log(chalk6.dim(" Project scaffolding and template settings"));
|
|
1886
1878
|
console.log(chalk6.dim(` Templates: ${BOILERPLATE_REPO_URL}`));
|
|
1887
1879
|
console.log();
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
default: next.boilerplate.generate
|
|
1891
|
-
});
|
|
1892
|
-
next.boilerplate.generate = generateBoilerplate;
|
|
1893
|
-
if (generateBoilerplate) {
|
|
1880
|
+
next.boilerplate.generate = true;
|
|
1881
|
+
{
|
|
1894
1882
|
next.boilerplate.sampleData = false;
|
|
1895
1883
|
const devMode = await select4({
|
|
1896
1884
|
message: "Development mode",
|
|
@@ -1907,9 +1895,6 @@ async function runDevStackStep(state) {
|
|
|
1907
1895
|
default: next.boilerplate.devMode || "hot-reload"
|
|
1908
1896
|
});
|
|
1909
1897
|
next.boilerplate.devMode = devMode;
|
|
1910
|
-
} else {
|
|
1911
|
-
next.boilerplate.sampleData = false;
|
|
1912
|
-
next.boilerplate.devMode = "hot-reload";
|
|
1913
1898
|
}
|
|
1914
1899
|
console.log();
|
|
1915
1900
|
console.log(chalk6.bold(" Dev Stack Summary"));
|
|
@@ -1971,7 +1956,7 @@ async function runDevStackStep(state) {
|
|
|
1971
1956
|
}
|
|
1972
1957
|
|
|
1973
1958
|
// src/wizard/steps/domain-network.ts
|
|
1974
|
-
import { input as input5, select as select5, confirm as
|
|
1959
|
+
import { input as input5, select as select5, confirm as confirm3 } from "@inquirer/prompts";
|
|
1975
1960
|
import chalk7 from "chalk";
|
|
1976
1961
|
import ora3 from "ora";
|
|
1977
1962
|
import { execa as execa4 } from "execa";
|
|
@@ -2473,7 +2458,7 @@ async function runUnifiedNamedTunnelScenario(next, tunnelLogger) {
|
|
|
2473
2458
|
next.domain.cloudflare.tunnelMode = "named";
|
|
2474
2459
|
let qtManager = null;
|
|
2475
2460
|
try {
|
|
2476
|
-
const hasDomain = await
|
|
2461
|
+
const hasDomain = await confirm3({
|
|
2477
2462
|
message: "Cloudflare\uC5D0 \uB4F1\uB85D\uB41C \uB3C4\uBA54\uC778\uC774 \uC774\uBBF8 \uC788\uC73C\uC2E0\uAC00\uC694?",
|
|
2478
2463
|
default: true
|
|
2479
2464
|
});
|
|
@@ -2488,7 +2473,7 @@ async function runUnifiedNamedTunnelScenario(next, tunnelLogger) {
|
|
|
2488
2473
|
console.log(chalk7.dim(" 3. \uB3C4\uBA54\uC778\uC774 Cloudflare \uB124\uC784\uC11C\uBC84\uB85C \uC790\uB3D9 \uC124\uC815\uB429\uB2C8\uB2E4"));
|
|
2489
2474
|
console.log(chalk7.dim(" 4. \uB4F1\uB85D \uC644\uB8CC\uAE4C\uC9C0 1~5\uBD84 \uC18C\uC694"));
|
|
2490
2475
|
console.log();
|
|
2491
|
-
const useBridge = await
|
|
2476
|
+
const useBridge = await confirm3({
|
|
2492
2477
|
message: "Quick Tunnel\uB85C \uC784\uC2DC \uC811\uADFC\uC744 \uC2DC\uC791\uD558\uACA0\uC2B5\uB2C8\uAE4C? (\uB3C4\uBA54\uC778 \uC900\uBE44 \uC911\uC5D0\uB3C4 \uC11C\uBE44\uC2A4\uC5D0 \uC811\uADFC \uAC00\uB2A5)",
|
|
2493
2478
|
default: true
|
|
2494
2479
|
});
|
|
@@ -3046,7 +3031,7 @@ import { homedir as homedir2 } from "os";
|
|
|
3046
3031
|
import chalk9 from "chalk";
|
|
3047
3032
|
import ora4 from "ora";
|
|
3048
3033
|
import Table2 from "cli-table3";
|
|
3049
|
-
import { confirm as
|
|
3034
|
+
import { confirm as confirm4, select as select7 } from "@inquirer/prompts";
|
|
3050
3035
|
|
|
3051
3036
|
// src/utils/service-verifier.ts
|
|
3052
3037
|
function buildServiceUrlMap(state) {
|
|
@@ -4113,7 +4098,7 @@ async function runGenerateStep(state) {
|
|
|
4113
4098
|
});
|
|
4114
4099
|
if (pullResult.exitCode !== 0) {
|
|
4115
4100
|
console.log(chalk9.red(" \u2717 Failed to pull Docker images"));
|
|
4116
|
-
const shouldContinue = await
|
|
4101
|
+
const shouldContinue = await confirm4({
|
|
4117
4102
|
message: "Continue without pulling images? (existing images will be used)",
|
|
4118
4103
|
default: false
|
|
4119
4104
|
});
|
|
@@ -4128,7 +4113,7 @@ async function runGenerateStep(state) {
|
|
|
4128
4113
|
if (err instanceof Error) {
|
|
4129
4114
|
console.log(chalk9.dim(` ${err.message}`));
|
|
4130
4115
|
}
|
|
4131
|
-
const shouldContinue = await
|
|
4116
|
+
const shouldContinue = await confirm4({
|
|
4132
4117
|
message: "Continue without pulling images?",
|
|
4133
4118
|
default: false
|
|
4134
4119
|
});
|
|
@@ -4482,7 +4467,7 @@ async function runGenerateStep(state) {
|
|
|
4482
4467
|
pollHealth: boilerplatePollHealth,
|
|
4483
4468
|
verifyEndpoints: boilerplateVerifyEndpoints,
|
|
4484
4469
|
findFreePort
|
|
4485
|
-
} = await import("./boilerplate-manager-
|
|
4470
|
+
} = await import("./boilerplate-manager-5GPTMOYL.js");
|
|
4486
4471
|
const dbPrimary = state.servers.dbServer.primary;
|
|
4487
4472
|
const dbDriver = dbPrimary === "postgresql" ? "postgres" : dbPrimary === "mysql" ? "mysql" : "sqlite3";
|
|
4488
4473
|
const dbOpts = {
|
|
@@ -4552,7 +4537,7 @@ async function runGenerateStep(state) {
|
|
|
4552
4537
|
let isNextjsBasePath = false;
|
|
4553
4538
|
if (state.domain.cloudflare.tunnelMode === "quick") {
|
|
4554
4539
|
try {
|
|
4555
|
-
const { injectTraefikForQuickTunnel } = await import("./boilerplate-manager-
|
|
4540
|
+
const { injectTraefikForQuickTunnel } = await import("./boilerplate-manager-5GPTMOYL.js");
|
|
4556
4541
|
injectTraefikForQuickTunnel(appDir, stackId, backendPort);
|
|
4557
4542
|
if (stackId.startsWith("nodejs-nextjs")) isNextjsBasePath = true;
|
|
4558
4543
|
} catch {
|
|
@@ -4804,7 +4789,7 @@ async function runGenerateStep(state) {
|
|
|
4804
4789
|
chmodSync2(tokenPath, 384);
|
|
4805
4790
|
gitea.succeed(" Gitea: API \uD1A0\uD070 \uC0DD\uC131 \uC644\uB8CC");
|
|
4806
4791
|
try {
|
|
4807
|
-
const { saveGiteaConfig } = await import("./app-manager-
|
|
4792
|
+
const { saveGiteaConfig } = await import("./app-manager-6PEKSRZ2.js");
|
|
4808
4793
|
saveGiteaConfig("http://localhost/git", adminUser);
|
|
4809
4794
|
} catch {
|
|
4810
4795
|
}
|
|
@@ -6073,12 +6058,12 @@ function registerAddCommand(program) {
|
|
|
6073
6058
|
// src/commands/remove.ts
|
|
6074
6059
|
import chalk15 from "chalk";
|
|
6075
6060
|
import ora6 from "ora";
|
|
6076
|
-
import { confirm as
|
|
6061
|
+
import { confirm as confirm5 } from "@inquirer/prompts";
|
|
6077
6062
|
function registerRemoveCommand(program) {
|
|
6078
6063
|
program.command("remove").description("Remove a service").argument("<service>", "Name of the service to remove").option("--purge", "Also remove associated volumes and configuration data").option("--force", "Skip confirmation prompt").option("-p, --path <path>", "Project path (defaults to current directory)", process.cwd()).action(async (service, options) => {
|
|
6079
6064
|
if (!options.force) {
|
|
6080
6065
|
const purgeWarning = options.purge ? chalk15.red(" (including all associated data volumes)") : "";
|
|
6081
|
-
const confirmed = await
|
|
6066
|
+
const confirmed = await confirm5({
|
|
6082
6067
|
message: `Remove service ${chalk15.cyan(service)}${purgeWarning}?`,
|
|
6083
6068
|
default: false
|
|
6084
6069
|
});
|
|
@@ -6370,7 +6355,7 @@ Backups (${backups.length}):
|
|
|
6370
6355
|
// src/commands/restore.ts
|
|
6371
6356
|
import chalk20 from "chalk";
|
|
6372
6357
|
import ora10 from "ora";
|
|
6373
|
-
import { confirm as
|
|
6358
|
+
import { confirm as confirm6 } from "@inquirer/prompts";
|
|
6374
6359
|
import { homedir as homedir7 } from "os";
|
|
6375
6360
|
import { join as join8 } from "path";
|
|
6376
6361
|
var DEFAULT_BACKUPS_DIR2 = join8(homedir7(), ".brewnet", "backups");
|
|
@@ -6418,7 +6403,7 @@ function registerRestoreCommand(program) {
|
|
|
6418
6403
|
console.log(chalk20.dim(` Date: ${date}`));
|
|
6419
6404
|
console.log(chalk20.dim(` Target: ${options.path}`));
|
|
6420
6405
|
console.log("");
|
|
6421
|
-
const confirmed = await
|
|
6406
|
+
const confirmed = await confirm6({
|
|
6422
6407
|
message: `Restore backup ${chalk20.cyan(backupId)} to ${chalk20.cyan(options.path)}?`,
|
|
6423
6408
|
default: false
|
|
6424
6409
|
});
|
|
@@ -6473,7 +6458,7 @@ function registerAdminCommand(program) {
|
|
|
6473
6458
|
return;
|
|
6474
6459
|
}
|
|
6475
6460
|
if (options.foreground) {
|
|
6476
|
-
const { createAdminServer } = await import("./admin-server-
|
|
6461
|
+
const { createAdminServer } = await import("./admin-server-FN7HZVZW.js");
|
|
6477
6462
|
const spinner2 = ora11(`Starting admin panel on port ${port}...`).start();
|
|
6478
6463
|
const { start } = createAdminServer({ port, projectPath: options.path || void 0 });
|
|
6479
6464
|
try {
|
|
@@ -6564,7 +6549,7 @@ function registerShutdownCommand(program) {
|
|
|
6564
6549
|
|
|
6565
6550
|
// src/commands/uninstall.ts
|
|
6566
6551
|
import chalk23 from "chalk";
|
|
6567
|
-
import { confirm as
|
|
6552
|
+
import { confirm as confirm7, select as select9 } from "@inquirer/prompts";
|
|
6568
6553
|
function printTargets(targets) {
|
|
6569
6554
|
for (const t of targets) {
|
|
6570
6555
|
const tag = t.skipped ? chalk23.dim(` [skip] ${t.label} (${t.skipReason ?? "preserved"})`) : chalk23.red(` [remove] ${t.label}`);
|
|
@@ -6660,7 +6645,7 @@ function registerUninstallCommand(program) {
|
|
|
6660
6645
|
if (!options.force) {
|
|
6661
6646
|
let confirmed = false;
|
|
6662
6647
|
try {
|
|
6663
|
-
confirmed = await
|
|
6648
|
+
confirmed = await confirm7({
|
|
6664
6649
|
message: chalk23.red("Proceed with uninstall? This cannot be undone."),
|
|
6665
6650
|
default: false
|
|
6666
6651
|
});
|
|
@@ -7786,7 +7771,7 @@ function stripAnsi(str) {
|
|
|
7786
7771
|
// src/index.ts
|
|
7787
7772
|
function createProgram() {
|
|
7788
7773
|
const program = new Command();
|
|
7789
|
-
program.name("brewnet").description("Your Home Server, Brewed Fresh").version("0.0.
|
|
7774
|
+
program.name("brewnet").description("Your Home Server, Brewed Fresh").version("0.0.9").showHelpAfterError('(run "brewnet --help" for usage information)');
|
|
7790
7775
|
registerInitCommand(program);
|
|
7791
7776
|
registerStatusCommand(program);
|
|
7792
7777
|
registerAddCommand(program);
|