@geekmidas/cli 1.10.21 → 1.10.22

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
@@ -35,7 +35,7 @@ import prompts from "prompts";
35
35
 
36
36
  //#region package.json
37
37
  var name = "@geekmidas/cli";
38
- var version = "1.10.20";
38
+ var version = "1.10.21";
39
39
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
40
40
  var private$1 = false;
41
41
  var type = "module";
@@ -66,7 +66,7 @@ var exports = {
66
66
  "require": "./dist/openapi-react-query.cjs"
67
67
  }
68
68
  };
69
- var bin = { "gkm": "./dist/index.cjs" };
69
+ var bin = { "gkm": "./bin/gkm.mjs" };
70
70
  var scripts = {
71
71
  "ts": "tsc --noEmit --skipLibCheck src/**/*.ts",
72
72
  "sync-versions": "tsx scripts/sync-versions.ts",
@@ -1807,7 +1807,11 @@ var EntryRunner = class {
1807
1807
  this.isRunning = false;
1808
1808
  });
1809
1809
  await new Promise((resolve$1) => setTimeout(resolve$1, 500));
1810
- if (this.isRunning) logger$11.log(`\n🎉 Running at http://localhost:${this.port}`);
1810
+ if (this.isRunning) {
1811
+ logger$11.log("");
1812
+ logger$11.log(` \x1b[32m✓ Ready\x1b[0m at \x1b[36mhttp://localhost:${this.port}\x1b[0m`);
1813
+ logger$11.log("");
1814
+ }
1811
1815
  }
1812
1816
  async restart() {
1813
1817
  this.stopProcess();
@@ -1898,6 +1902,7 @@ var DevServer = class {
1898
1902
  serverProcess = null;
1899
1903
  isRunning = false;
1900
1904
  actualPort;
1905
+ startTime = Date.now();
1901
1906
  constructor(provider, requestedPort, portExplicit, enableOpenApi, telescope, studio, runtime = "node", appRoot = process.cwd(), secretsJsonPath) {
1902
1907
  this.provider = provider;
1903
1908
  this.requestedPort = requestedPort;
@@ -1911,6 +1916,7 @@ var DevServer = class {
1911
1916
  this.actualPort = requestedPort;
1912
1917
  }
1913
1918
  async start() {
1919
+ this.startTime = Date.now();
1914
1920
  if (this.isRunning) await this.stop();
1915
1921
  if (this.portExplicit) {
1916
1922
  const available = await isPortAvailable(this.requestedPort);
@@ -1922,7 +1928,7 @@ var DevServer = class {
1922
1928
  }
1923
1929
  const serverEntryPath = join(this.appRoot, ".gkm", this.provider, "server.ts");
1924
1930
  await this.createServerEntry();
1925
- logger$11.log(`\n Starting server on port ${this.actualPort}...`);
1931
+ logger$11.log(`\n Starting server...`);
1926
1932
  this.serverProcess = spawn("npx", [
1927
1933
  "tsx",
1928
1934
  serverEntryPath,
@@ -1946,10 +1952,21 @@ var DevServer = class {
1946
1952
  });
1947
1953
  await new Promise((resolve$1) => setTimeout(resolve$1, 1e3));
1948
1954
  if (this.isRunning) {
1949
- logger$11.log(`\n🎉 Server running at http://localhost:${this.actualPort}`);
1950
- if (this.enableOpenApi) logger$11.log(`📚 API Docs available at http://localhost:${this.actualPort}/__docs`);
1951
- if (this.telescope) logger$11.log(`🔭 Telescope available at http://localhost:${this.actualPort}${this.telescope.path}`);
1952
- if (this.studio) logger$11.log(`🗄️ Studio available at http://localhost:${this.actualPort}${this.studio.path}`);
1955
+ const base = `http://localhost:${this.actualPort}`;
1956
+ const lines = [` Local: ${base}`];
1957
+ if (this.enableOpenApi) lines.push(` API Docs: ${base}/__docs`);
1958
+ if (this.telescope) lines.push(` Telescope: ${base}${this.telescope.path}`);
1959
+ if (this.studio) lines.push(` Studio: ${base}${this.studio.path}`);
1960
+ const maxLen = Math.max(...lines.map((l) => l.length));
1961
+ const pad = (s) => s.padEnd(maxLen);
1962
+ const border = "─".repeat(maxLen + 2);
1963
+ logger$11.log("");
1964
+ logger$11.log(` \x1b[32m✓ Ready\x1b[0m in ${((Date.now() - this.startTime) / 1e3).toFixed(1)}s`);
1965
+ logger$11.log("");
1966
+ logger$11.log(` ┌${border}┐`);
1967
+ for (const line of lines) logger$11.log(` │ ${pad(line)} │`);
1968
+ logger$11.log(` └${border}┘`);
1969
+ logger$11.log("");
1953
1970
  }
1954
1971
  }
1955
1972
  async stop() {