@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/CHANGELOG.md +6 -0
- package/dist/index.cjs +34 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +34 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/scripts/sync-versions.ts +25 -3
- package/src/init/versions.ts +24 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @geekmidas/cli
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 🐛 [`159e365`](https://github.com/geekmidas/toolbox/commit/159e36572adb2b489629d4ab2a0142f8ff59b7a8) Thanks [@geekmidas](https://github.com/geekmidas)! - Resolve correct cli version at runtime
|
|
8
|
+
|
|
3
9
|
## 1.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -32,7 +32,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
|
|
|
32
32
|
|
|
33
33
|
//#region package.json
|
|
34
34
|
var name = "@geekmidas/cli";
|
|
35
|
-
var version = "1.0.
|
|
35
|
+
var version = "1.0.1";
|
|
36
36
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
37
37
|
var private$1 = false;
|
|
38
38
|
var type = "module";
|
|
@@ -1126,13 +1126,13 @@ async function validateFrontendApp(appName, appPath, workspaceRoot) {
|
|
|
1126
1126
|
if (!hasConfigFile) errors.push(`Next.js config file not found. Expected one of: ${NEXTJS_CONFIG_FILES.join(", ")}`);
|
|
1127
1127
|
const packageJsonPath = (0, node_path.join)(fullPath, "package.json");
|
|
1128
1128
|
if ((0, node_fs.existsSync)(packageJsonPath)) try {
|
|
1129
|
-
const pkg = require(packageJsonPath);
|
|
1129
|
+
const pkg$1 = require(packageJsonPath);
|
|
1130
1130
|
const deps = {
|
|
1131
|
-
...pkg.dependencies,
|
|
1132
|
-
...pkg.devDependencies
|
|
1131
|
+
...pkg$1.dependencies,
|
|
1132
|
+
...pkg$1.devDependencies
|
|
1133
1133
|
};
|
|
1134
1134
|
if (!deps.next) errors.push("Next.js not found in dependencies. Run: pnpm add next react react-dom");
|
|
1135
|
-
if (!pkg.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
|
|
1135
|
+
if (!pkg$1.scripts?.dev) warnings.push("No \"dev\" script found in package.json. Turbo expects a \"dev\" script to run.");
|
|
1136
1136
|
} catch {
|
|
1137
1137
|
errors.push(`Failed to read package.json at ${packageJsonPath}`);
|
|
1138
1138
|
}
|
|
@@ -3365,8 +3365,8 @@ function resolveDockerConfig$1(config) {
|
|
|
3365
3365
|
const docker = config.docker ?? {};
|
|
3366
3366
|
let defaultImageName = "api";
|
|
3367
3367
|
try {
|
|
3368
|
-
const pkg = require(`${process.cwd()}/package.json`);
|
|
3369
|
-
if (pkg.name) defaultImageName = pkg.name.replace(/^@[^/]+\//, "");
|
|
3368
|
+
const pkg$1 = require(`${process.cwd()}/package.json`);
|
|
3369
|
+
if (pkg$1.name) defaultImageName = pkg$1.name.replace(/^@[^/]+\//, "");
|
|
3370
3370
|
} catch {}
|
|
3371
3371
|
return {
|
|
3372
3372
|
registry: docker.registry ?? "",
|
|
@@ -3722,9 +3722,9 @@ async function dockerCommand(options) {
|
|
|
3722
3722
|
} 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");
|
|
3723
3723
|
let turboPackage = options.turboPackage ?? dockerConfig.imageName;
|
|
3724
3724
|
if (useTurbo && !options.turboPackage) try {
|
|
3725
|
-
const pkg = require(`${process.cwd()}/package.json`);
|
|
3726
|
-
if (pkg.name) {
|
|
3727
|
-
turboPackage = pkg.name;
|
|
3725
|
+
const pkg$1 = require(`${process.cwd()}/package.json`);
|
|
3726
|
+
if (pkg$1.name) {
|
|
3727
|
+
turboPackage = pkg$1.name;
|
|
3728
3728
|
logger$5.log(` Turbo package: ${turboPackage}`);
|
|
3729
3729
|
}
|
|
3730
3730
|
} catch {}
|
|
@@ -3849,8 +3849,8 @@ function getAppPackageName(appPath) {
|
|
|
3849
3849
|
const pkgPath = (0, node_path.join)(appPath, "package.json");
|
|
3850
3850
|
if (!(0, node_fs.existsSync)(pkgPath)) return void 0;
|
|
3851
3851
|
const content = (0, node_fs.readFileSync)(pkgPath, "utf-8");
|
|
3852
|
-
const pkg = JSON.parse(content);
|
|
3853
|
-
return pkg.name;
|
|
3852
|
+
const pkg$1 = JSON.parse(content);
|
|
3853
|
+
return pkg$1.name;
|
|
3854
3854
|
} catch {
|
|
3855
3855
|
return void 0;
|
|
3856
3856
|
}
|
|
@@ -3946,8 +3946,8 @@ function getAppNameFromCwd$1() {
|
|
|
3946
3946
|
const packageJsonPath = (0, node_path.join)(process.cwd(), "package.json");
|
|
3947
3947
|
if (!(0, node_fs.existsSync)(packageJsonPath)) return void 0;
|
|
3948
3948
|
try {
|
|
3949
|
-
const pkg = JSON.parse((0, node_fs.readFileSync)(packageJsonPath, "utf-8"));
|
|
3950
|
-
if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
|
|
3949
|
+
const pkg$1 = JSON.parse((0, node_fs.readFileSync)(packageJsonPath, "utf-8"));
|
|
3950
|
+
if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
|
|
3951
3951
|
} catch {}
|
|
3952
3952
|
return void 0;
|
|
3953
3953
|
}
|
|
@@ -3963,8 +3963,8 @@ function getAppNameFromPackageJson() {
|
|
|
3963
3963
|
const packageJsonPath = (0, node_path.join)(projectRoot, "package.json");
|
|
3964
3964
|
if (!(0, node_fs.existsSync)(packageJsonPath)) return void 0;
|
|
3965
3965
|
try {
|
|
3966
|
-
const pkg = JSON.parse((0, node_fs.readFileSync)(packageJsonPath, "utf-8"));
|
|
3967
|
-
if (pkg.name) return pkg.name.replace(/^@[^/]+\//, "");
|
|
3966
|
+
const pkg$1 = JSON.parse((0, node_fs.readFileSync)(packageJsonPath, "utf-8"));
|
|
3967
|
+
if (pkg$1.name) return pkg$1.name.replace(/^@[^/]+\//, "");
|
|
3968
3968
|
} catch {}
|
|
3969
3969
|
return void 0;
|
|
3970
3970
|
}
|
|
@@ -4659,8 +4659,8 @@ const __dirname$1 = (0, node_path.dirname)(__filename$1);
|
|
|
4659
4659
|
* This ensures tsx is available regardless of whether the target project has it installed.
|
|
4660
4660
|
*/
|
|
4661
4661
|
function resolveTsxPath() {
|
|
4662
|
-
const require$
|
|
4663
|
-
return require$
|
|
4662
|
+
const require$2 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
4663
|
+
return require$2.resolve("tsx");
|
|
4664
4664
|
}
|
|
4665
4665
|
/**
|
|
4666
4666
|
* Resolve the path to a sniffer helper file.
|
|
@@ -6292,17 +6292,29 @@ function rotateServicePassword(secrets, service) {
|
|
|
6292
6292
|
|
|
6293
6293
|
//#endregion
|
|
6294
6294
|
//#region src/init/versions.ts
|
|
6295
|
+
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
6296
|
+
function loadPackageJson() {
|
|
6297
|
+
try {
|
|
6298
|
+
return require$1("../package.json");
|
|
6299
|
+
} catch {
|
|
6300
|
+
return require$1("../../package.json");
|
|
6301
|
+
}
|
|
6302
|
+
}
|
|
6303
|
+
const pkg = loadPackageJson();
|
|
6304
|
+
/**
|
|
6305
|
+
* CLI version resolved from package.json at runtime
|
|
6306
|
+
*/
|
|
6307
|
+
const CLI_VERSION = `~${pkg.version}`;
|
|
6295
6308
|
/**
|
|
6296
6309
|
* Package versions for @geekmidas packages
|
|
6297
6310
|
*
|
|
6298
|
-
* AUTO-GENERATED - Do not edit manually
|
|
6311
|
+
* AUTO-GENERATED (except CLI) - Do not edit manually
|
|
6299
6312
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
6300
6313
|
*/
|
|
6301
6314
|
const GEEKMIDAS_VERSIONS = {
|
|
6302
6315
|
"@geekmidas/audit": "~1.0.0",
|
|
6303
6316
|
"@geekmidas/auth": "~1.0.0",
|
|
6304
6317
|
"@geekmidas/cache": "~1.0.0",
|
|
6305
|
-
"@geekmidas/cli": "~1.0.0",
|
|
6306
6318
|
"@geekmidas/client": "~1.0.0",
|
|
6307
6319
|
"@geekmidas/cloud": "~1.0.0",
|
|
6308
6320
|
"@geekmidas/constructs": "~1.0.0",
|
|
@@ -6318,7 +6330,8 @@ const GEEKMIDAS_VERSIONS = {
|
|
|
6318
6330
|
"@geekmidas/storage": "~1.0.0",
|
|
6319
6331
|
"@geekmidas/studio": "~1.0.0",
|
|
6320
6332
|
"@geekmidas/telescope": "~1.0.0",
|
|
6321
|
-
"@geekmidas/testkit": "~1.0.0"
|
|
6333
|
+
"@geekmidas/testkit": "~1.0.0",
|
|
6334
|
+
"@geekmidas/cli": CLI_VERSION
|
|
6322
6335
|
};
|
|
6323
6336
|
|
|
6324
6337
|
//#endregion
|