@geekmidas/cli 1.0.0 → 1.0.1

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
@@ -31,7 +31,7 @@ import prompts from "prompts";
31
31
 
32
32
  //#region package.json
33
33
  var name = "@geekmidas/cli";
34
- var version = "0.54.0";
34
+ var version = "1.0.0";
35
35
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
36
36
  var private$1 = false;
37
37
  var type = "module";
@@ -65,6 +65,8 @@ var exports = {
65
65
  var bin = { "gkm": "./dist/index.cjs" };
66
66
  var scripts = {
67
67
  "ts": "tsc --noEmit --skipLibCheck src/**/*.ts",
68
+ "sync-versions": "tsx scripts/sync-versions.ts",
69
+ "prebuild": "pnpm sync-versions",
68
70
  "test": "vitest",
69
71
  "test:once": "vitest run",
70
72
  "test:coverage": "vitest run --coverage"
@@ -1123,13 +1125,13 @@ async function validateFrontendApp(appName, appPath, workspaceRoot) {
1123
1125
  if (!hasConfigFile) errors.push(`Next.js config file not found. Expected one of: ${NEXTJS_CONFIG_FILES.join(", ")}`);
1124
1126
  const packageJsonPath = join(fullPath, "package.json");
1125
1127
  if (existsSync(packageJsonPath)) try {
1126
- const pkg$1 = __require(packageJsonPath);
1128
+ const pkg = __require(packageJsonPath);
1127
1129
  const deps = {
1128
- ...pkg$1.dependencies,
1129
- ...pkg$1.devDependencies
1130
+ ...pkg.dependencies,
1131
+ ...pkg.devDependencies
1130
1132
  };
1131
1133
  if (!deps.next) errors.push("Next.js not found in dependencies. Run: pnpm add next react react-dom");
1132
- if (!pkg$1.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
1134
+ if (!pkg.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
1133
1135
  } catch {
1134
1136
  errors.push(`Failed to read package.json at ${packageJsonPath}`);
1135
1137
  }
@@ -3362,8 +3364,8 @@ function resolveDockerConfig$1(config$1) {
3362
3364
  const docker = config$1.docker ?? {};
3363
3365
  let defaultImageName = "api";
3364
3366
  try {
3365
- const pkg$1 = __require(`${process.cwd()}/package.json`);
3366
- if (pkg$1.name) defaultImageName = pkg$1.name.replace(/^@[^/]+\//, "");
3367
+ const pkg = __require(`${process.cwd()}/package.json`);
3368
+ if (pkg.name) defaultImageName = pkg.name.replace(/^@[^/]+\//, "");
3367
3369
  } catch {}
3368
3370
  return {
3369
3371
  registry: docker.registry ?? "",
@@ -3719,9 +3721,9 @@ async function dockerCommand(options) {
3719
3721
  } else throw new Error("Monorepo detected but turbo.json not found.\n\nDocker builds in monorepos require Turborepo for proper dependency isolation.\n\nTo fix this:\n 1. Install turbo: pnpm add -Dw turbo\n 2. Create turbo.json in your monorepo root\n 3. Run this command again\n\nSee: https://turbo.build/repo/docs/guides/tools/docker");
3720
3722
  let turboPackage = options.turboPackage ?? dockerConfig.imageName;
3721
3723
  if (useTurbo && !options.turboPackage) try {
3722
- const pkg$1 = __require(`${process.cwd()}/package.json`);
3723
- if (pkg$1.name) {
3724
- turboPackage = pkg$1.name;
3724
+ const pkg = __require(`${process.cwd()}/package.json`);
3725
+ if (pkg.name) {
3726
+ turboPackage = pkg.name;
3725
3727
  logger$5.log(` Turbo package: ${turboPackage}`);
3726
3728
  }
3727
3729
  } catch {}
@@ -3846,8 +3848,8 @@ function getAppPackageName(appPath) {
3846
3848
  const pkgPath = join(appPath, "package.json");
3847
3849
  if (!existsSync(pkgPath)) return void 0;
3848
3850
  const content = readFileSync(pkgPath, "utf-8");
3849
- const pkg$1 = JSON.parse(content);
3850
- return pkg$1.name;
3851
+ const pkg = JSON.parse(content);
3852
+ return pkg.name;
3851
3853
  } catch {
3852
3854
  return void 0;
3853
3855
  }
@@ -3943,8 +3945,8 @@ function getAppNameFromCwd$1() {
3943
3945
  const packageJsonPath = join(process.cwd(), "package.json");
3944
3946
  if (!existsSync(packageJsonPath)) return void 0;
3945
3947
  try {
3946
- const pkg$1 = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3947
- if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
3948
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3949
+ if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
3948
3950
  } catch {}
3949
3951
  return void 0;
3950
3952
  }
@@ -3960,8 +3962,8 @@ function getAppNameFromPackageJson() {
3960
3962
  const packageJsonPath = join(projectRoot, "package.json");
3961
3963
  if (!existsSync(packageJsonPath)) return void 0;
3962
3964
  try {
3963
- const pkg$1 = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3964
- if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
3965
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3966
+ if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
3965
3967
  } catch {}
3966
3968
  return void 0;
3967
3969
  }
@@ -4656,8 +4658,8 @@ const __dirname = dirname(__filename);
4656
4658
  * This ensures tsx is available regardless of whether the target project has it installed.
4657
4659
  */
4658
4660
  function resolveTsxPath() {
4659
- const require$2 = createRequire(import.meta.url);
4660
- return require$2.resolve("tsx");
4661
+ const require$1 = createRequire(import.meta.url);
4662
+ return require$1.resolve("tsx");
4661
4663
  }
4662
4664
  /**
4663
4665
  * Resolve the path to a sniffer helper file.
@@ -6289,45 +6291,33 @@ function rotateServicePassword(secrets, service) {
6289
6291
 
6290
6292
  //#endregion
6291
6293
  //#region src/init/versions.ts
6292
- const require$1 = createRequire(import.meta.url);
6293
- function loadPackageJson() {
6294
- try {
6295
- return require$1("../package.json");
6296
- } catch {
6297
- return require$1("../../package.json");
6298
- }
6299
- }
6300
- const pkg = loadPackageJson();
6301
6294
  /**
6302
- * CLI version from package.json (used for scaffolded projects)
6303
- */
6304
- const CLI_VERSION = `~${pkg.version}`;
6305
- /**
6306
- * Current released versions of @geekmidas packages
6307
- * Update these when publishing new versions
6308
- * Note: CLI version is read from package.json via CLI_VERSION
6295
+ * Package versions for @geekmidas packages
6296
+ *
6297
+ * AUTO-GENERATED - Do not edit manually
6298
+ * Run: pnpm --filter @geekmidas/cli sync-versions
6309
6299
  */
6310
6300
  const GEEKMIDAS_VERSIONS = {
6311
- "@geekmidas/audit": "~0.2.0",
6312
- "@geekmidas/auth": "~0.2.0",
6313
- "@geekmidas/cache": "~0.2.0",
6314
- "@geekmidas/cli": CLI_VERSION,
6315
- "@geekmidas/client": "~0.5.0",
6316
- "@geekmidas/cloud": "~0.2.0",
6317
- "@geekmidas/constructs": "~0.8.0",
6318
- "@geekmidas/db": "~0.3.0",
6319
- "@geekmidas/emailkit": "~0.2.0",
6320
- "@geekmidas/envkit": "~0.7.0",
6321
- "@geekmidas/errors": "~0.1.0",
6322
- "@geekmidas/events": "~0.2.0",
6323
- "@geekmidas/logger": "~0.4.0",
6324
- "@geekmidas/rate-limit": "~0.3.0",
6325
- "@geekmidas/schema": "~0.1.0",
6326
- "@geekmidas/services": "~0.2.0",
6327
- "@geekmidas/storage": "~0.1.0",
6328
- "@geekmidas/studio": "~0.4.0",
6329
- "@geekmidas/telescope": "~0.6.0",
6330
- "@geekmidas/testkit": "~0.6.0"
6301
+ "@geekmidas/audit": "~1.0.0",
6302
+ "@geekmidas/auth": "~1.0.0",
6303
+ "@geekmidas/cache": "~1.0.0",
6304
+ "@geekmidas/cli": "~1.0.0",
6305
+ "@geekmidas/client": "~1.0.0",
6306
+ "@geekmidas/cloud": "~1.0.0",
6307
+ "@geekmidas/constructs": "~1.0.0",
6308
+ "@geekmidas/db": "~1.0.0",
6309
+ "@geekmidas/emailkit": "~1.0.0",
6310
+ "@geekmidas/envkit": "~1.0.0",
6311
+ "@geekmidas/errors": "~1.0.0",
6312
+ "@geekmidas/events": "~1.0.0",
6313
+ "@geekmidas/logger": "~1.0.0",
6314
+ "@geekmidas/rate-limit": "~1.0.0",
6315
+ "@geekmidas/schema": "~1.0.0",
6316
+ "@geekmidas/services": "~1.0.0",
6317
+ "@geekmidas/storage": "~1.0.0",
6318
+ "@geekmidas/studio": "~1.0.0",
6319
+ "@geekmidas/telescope": "~1.0.0",
6320
+ "@geekmidas/testkit": "~1.0.0"
6331
6321
  };
6332
6322
 
6333
6323
  //#endregion