@geekmidas/cli 10.0.0-alpha.112 → 10.0.0-alpha.113

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 CHANGED
@@ -51,7 +51,7 @@ import crypto from "crypto";
51
51
  import { Function } from "@geekmidas/constructs/functions";
52
52
  import { Topic } from "@geekmidas/constructs/topic";
53
53
  //#region package.json
54
- var version = "10.0.0-alpha.112";
54
+ var version = "10.0.0-alpha.113";
55
55
  //#endregion
56
56
  //#region src/prompt.ts
57
57
  /**
@@ -5943,25 +5943,25 @@ function loadPackageJson() {
5943
5943
  * Run: pnpm --filter @geekmidas/cli sync-versions
5944
5944
  */
5945
5945
  const GEEKMIDAS_VERSIONS = {
5946
- "@geekmidas/audit": "~10.0.0-alpha.112",
5947
- "@geekmidas/auth": "~10.0.0-alpha.112",
5948
- "@geekmidas/cache": "~10.0.0-alpha.112",
5949
- "@geekmidas/client": "~10.0.0-alpha.112",
5950
- "@geekmidas/cloud": "~10.0.0-alpha.112",
5951
- "@geekmidas/constructs": "~10.0.0-alpha.112",
5952
- "@geekmidas/db": "~10.0.0-alpha.112",
5953
- "@geekmidas/emailkit": "~10.0.0-alpha.112",
5954
- "@geekmidas/envkit": "~10.0.0-alpha.112",
5955
- "@geekmidas/errors": "~10.0.0-alpha.112",
5956
- "@geekmidas/events": "~10.0.0-alpha.112",
5957
- "@geekmidas/logger": "~10.0.0-alpha.112",
5958
- "@geekmidas/manifest": "~10.0.0-alpha.112",
5959
- "@geekmidas/rate-limit": "~10.0.0-alpha.112",
5960
- "@geekmidas/schema": "~10.0.0-alpha.112",
5961
- "@geekmidas/services": "~10.0.0-alpha.112",
5962
- "@geekmidas/storage": "~10.0.0-alpha.112",
5963
- "@geekmidas/telescope": "~10.0.0-alpha.112",
5964
- "@geekmidas/testkit": "~10.0.0-alpha.112",
5946
+ "@geekmidas/audit": "~10.0.0-alpha.113",
5947
+ "@geekmidas/auth": "~10.0.0-alpha.113",
5948
+ "@geekmidas/cache": "~10.0.0-alpha.113",
5949
+ "@geekmidas/client": "~10.0.0-alpha.113",
5950
+ "@geekmidas/cloud": "~10.0.0-alpha.113",
5951
+ "@geekmidas/constructs": "~10.0.0-alpha.113",
5952
+ "@geekmidas/db": "~10.0.0-alpha.113",
5953
+ "@geekmidas/emailkit": "~10.0.0-alpha.113",
5954
+ "@geekmidas/envkit": "~10.0.0-alpha.113",
5955
+ "@geekmidas/errors": "~10.0.0-alpha.113",
5956
+ "@geekmidas/events": "~10.0.0-alpha.113",
5957
+ "@geekmidas/logger": "~10.0.0-alpha.113",
5958
+ "@geekmidas/manifest": "~10.0.0-alpha.113",
5959
+ "@geekmidas/rate-limit": "~10.0.0-alpha.113",
5960
+ "@geekmidas/schema": "~10.0.0-alpha.113",
5961
+ "@geekmidas/services": "~10.0.0-alpha.113",
5962
+ "@geekmidas/storage": "~10.0.0-alpha.113",
5963
+ "@geekmidas/telescope": "~10.0.0-alpha.113",
5964
+ "@geekmidas/testkit": "~10.0.0-alpha.113",
5965
5965
  "@geekmidas/cli": `~${loadPackageJson().version}`
5966
5966
  };
5967
5967
  //#endregion
@@ -7154,7 +7154,7 @@ const COMMIT = /^[0-9a-f]{40}$/;
7154
7154
  * The `uses:` value for the stages action, with a comment saying which CLI
7155
7155
  * release the pinned commit is.
7156
7156
  */
7157
- function stagesActionUses(commit = "4f82632d8355cb858b895c3caf36228e040d39b0", version = cliVersion()) {
7157
+ function stagesActionUses(commit = "18d6b7860652d3db231d361933ee2d5ec10f0941", version = cliVersion()) {
7158
7158
  return commit && COMMIT.test(commit) ? `${STAGES_ACTION}@${commit} # @geekmidas/cli ${version}` : `${STAGES_ACTION}@main # pin to a commit SHA: see the action's README`;
7159
7159
  }
7160
7160
  //#endregion
@@ -7621,6 +7621,7 @@ ${registryLogin(registry)}
7621
7621
  # pinned host key (DEPLOY_KNOWN_HOSTS, a variable) on each environment:
7622
7622
  # never accepted on first sight. The server — user and host — is
7623
7623
  # deploy.compose.server in gkm.config.ts and the stage's GKM_SERVER_IPV4.
7624
+ # \`gkm compose:server --stage <stage>\` sets the server up and gives both.
7624
7625
  - name: SSH to the server
7625
7626
  run: |
7626
7627
  mkdir -p ~/.ssh && chmod 700 ~/.ssh
@@ -16714,6 +16715,16 @@ program.command("deploy:rollback").description("Put a stage's app back on its pr
16714
16715
  exitWithError(error);
16715
16716
  }
16716
16717
  });
16718
+ program.command("compose:server").description("Set up a stage's server for compose deploys: harden it (SSH keys only, no root login, firewall, security updates, fail2ban), install Docker, create the deploy user, and give its key to GitHub").requiredOption("--stage <stage>", "A deployed stage from gkm.config.ts").option("--admin <user>", "The sudo user you log in to the server as — never root (asked when absent)").option("--key-file <path>", "The deploy key pair (default: ~/.ssh/gkm-<project>-<stage>)").option("--repo <owner/name>", "GitHub repository (default: this one)").option("--no-github", "Leave the GitHub environment's key and host alone").option("--yes", "Set the server up without asking first").option("--dry-run", "Print the plan and the script; connect to nothing").action(async (options) => {
16719
+ try {
16720
+ const globalOptions = program.opts();
16721
+ if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16722
+ const { composeServerCommand } = await import("./serverSetup--O61SRvg.mjs");
16723
+ await composeServerCommand(options);
16724
+ } catch (error) {
16725
+ exitWithError(error);
16726
+ }
16727
+ });
16717
16728
  program.command("deploy:init").description("Initialize Dokploy deployment (create project and application)").option("--endpoint <url>", "Dokploy server URL (uses stored credentials if logged in)").requiredOption("--project <name>", "Project name (creates if not exists)").requiredOption("--app <name>", "Application name").option("--project-id <id>", "Use existing project ID instead of creating").option("--registry-id <id>", "Configure registry for the application").action(async (options) => {
16718
16729
  try {
16719
16730
  const globalOptions = program.opts();
@@ -16733,7 +16744,7 @@ program.command("deploy:github").description("Let GitHub Actions deploy a stage:
16733
16744
  try {
16734
16745
  const globalOptions = program.opts();
16735
16746
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16736
- const { deployGithubCommand } = await import("./github-D2eABlxM.mjs");
16747
+ const { deployGithubCommand } = await import("./github-BMakI-k3.mjs");
16737
16748
  await deployGithubCommand(options);
16738
16749
  } catch (error) {
16739
16750
  exitWithError(error);