@geekmidas/cli 1.0.1 → 1.0.2

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 = "1.0.0";
34
+ var version = "1.0.1";
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";
@@ -1125,13 +1125,13 @@ async function validateFrontendApp(appName, appPath, workspaceRoot) {
1125
1125
  if (!hasConfigFile) errors.push(`Next.js config file not found. Expected one of: ${NEXTJS_CONFIG_FILES.join(", ")}`);
1126
1126
  const packageJsonPath = join(fullPath, "package.json");
1127
1127
  if (existsSync(packageJsonPath)) try {
1128
- const pkg = __require(packageJsonPath);
1128
+ const pkg$1 = __require(packageJsonPath);
1129
1129
  const deps = {
1130
- ...pkg.dependencies,
1131
- ...pkg.devDependencies
1130
+ ...pkg$1.dependencies,
1131
+ ...pkg$1.devDependencies
1132
1132
  };
1133
1133
  if (!deps.next) errors.push("Next.js not found in dependencies. Run: pnpm add next react react-dom");
1134
- if (!pkg.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
1134
+ if (!pkg$1.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
1135
1135
  } catch {
1136
1136
  errors.push(`Failed to read package.json at ${packageJsonPath}`);
1137
1137
  }
@@ -3364,8 +3364,8 @@ function resolveDockerConfig$1(config$1) {
3364
3364
  const docker = config$1.docker ?? {};
3365
3365
  let defaultImageName = "api";
3366
3366
  try {
3367
- const pkg = __require(`${process.cwd()}/package.json`);
3368
- if (pkg.name) defaultImageName = pkg.name.replace(/^@[^/]+\//, "");
3367
+ const pkg$1 = __require(`${process.cwd()}/package.json`);
3368
+ if (pkg$1.name) defaultImageName = pkg$1.name.replace(/^@[^/]+\//, "");
3369
3369
  } catch {}
3370
3370
  return {
3371
3371
  registry: docker.registry ?? "",
@@ -3721,9 +3721,9 @@ async function dockerCommand(options) {
3721
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");
3722
3722
  let turboPackage = options.turboPackage ?? dockerConfig.imageName;
3723
3723
  if (useTurbo && !options.turboPackage) try {
3724
- const pkg = __require(`${process.cwd()}/package.json`);
3725
- if (pkg.name) {
3726
- turboPackage = pkg.name;
3724
+ const pkg$1 = __require(`${process.cwd()}/package.json`);
3725
+ if (pkg$1.name) {
3726
+ turboPackage = pkg$1.name;
3727
3727
  logger$5.log(` Turbo package: ${turboPackage}`);
3728
3728
  }
3729
3729
  } catch {}
@@ -3848,8 +3848,8 @@ function getAppPackageName(appPath) {
3848
3848
  const pkgPath = join(appPath, "package.json");
3849
3849
  if (!existsSync(pkgPath)) return void 0;
3850
3850
  const content = readFileSync(pkgPath, "utf-8");
3851
- const pkg = JSON.parse(content);
3852
- return pkg.name;
3851
+ const pkg$1 = JSON.parse(content);
3852
+ return pkg$1.name;
3853
3853
  } catch {
3854
3854
  return void 0;
3855
3855
  }
@@ -3945,8 +3945,8 @@ function getAppNameFromCwd$1() {
3945
3945
  const packageJsonPath = join(process.cwd(), "package.json");
3946
3946
  if (!existsSync(packageJsonPath)) return void 0;
3947
3947
  try {
3948
- const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3949
- if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
3948
+ const pkg$1 = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3949
+ if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
3950
3950
  } catch {}
3951
3951
  return void 0;
3952
3952
  }
@@ -3962,8 +3962,8 @@ function getAppNameFromPackageJson() {
3962
3962
  const packageJsonPath = join(projectRoot, "package.json");
3963
3963
  if (!existsSync(packageJsonPath)) return void 0;
3964
3964
  try {
3965
- const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3966
- if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
3965
+ const pkg$1 = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
3966
+ if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
3967
3967
  } catch {}
3968
3968
  return void 0;
3969
3969
  }
@@ -4658,8 +4658,8 @@ const __dirname = dirname(__filename);
4658
4658
  * This ensures tsx is available regardless of whether the target project has it installed.
4659
4659
  */
4660
4660
  function resolveTsxPath() {
4661
- const require$1 = createRequire(import.meta.url);
4662
- return require$1.resolve("tsx");
4661
+ const require$2 = createRequire(import.meta.url);
4662
+ return require$2.resolve("tsx");
4663
4663
  }
4664
4664
  /**
4665
4665
  * Resolve the path to a sniffer helper file.
@@ -6291,17 +6291,29 @@ function rotateServicePassword(secrets, service) {
6291
6291
 
6292
6292
  //#endregion
6293
6293
  //#region src/init/versions.ts
6294
+ const require$1 = createRequire(import.meta.url);
6295
+ function loadPackageJson() {
6296
+ try {
6297
+ return require$1("../package.json");
6298
+ } catch {
6299
+ return require$1("../../package.json");
6300
+ }
6301
+ }
6302
+ const pkg = loadPackageJson();
6303
+ /**
6304
+ * CLI version resolved from package.json at runtime
6305
+ */
6306
+ const CLI_VERSION = `~${pkg.version}`;
6294
6307
  /**
6295
6308
  * Package versions for @geekmidas packages
6296
6309
  *
6297
- * AUTO-GENERATED - Do not edit manually
6310
+ * AUTO-GENERATED (except CLI) - Do not edit manually
6298
6311
  * Run: pnpm --filter @geekmidas/cli sync-versions
6299
6312
  */
6300
6313
  const GEEKMIDAS_VERSIONS = {
6301
6314
  "@geekmidas/audit": "~1.0.0",
6302
6315
  "@geekmidas/auth": "~1.0.0",
6303
6316
  "@geekmidas/cache": "~1.0.0",
6304
- "@geekmidas/cli": "~1.0.0",
6305
6317
  "@geekmidas/client": "~1.0.0",
6306
6318
  "@geekmidas/cloud": "~1.0.0",
6307
6319
  "@geekmidas/constructs": "~1.0.0",
@@ -6317,7 +6329,8 @@ const GEEKMIDAS_VERSIONS = {
6317
6329
  "@geekmidas/storage": "~1.0.0",
6318
6330
  "@geekmidas/studio": "~1.0.0",
6319
6331
  "@geekmidas/telescope": "~1.0.0",
6320
- "@geekmidas/testkit": "~1.0.0"
6332
+ "@geekmidas/testkit": "~1.0.0",
6333
+ "@geekmidas/cli": CLI_VERSION
6321
6334
  };
6322
6335
 
6323
6336
  //#endregion