maiass 5.10.1 → 5.10.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/maiass.mjs +13 -0
- package/package.json +1 -1
package/maiass.mjs
CHANGED
|
@@ -7,6 +7,19 @@ import { hideBin } from 'yargs/helpers';
|
|
|
7
7
|
import { initLogger, logger } from './lib/logger.js';
|
|
8
8
|
import { loadEnvironmentConfig, ensureConfigDirectories } from './lib/config.js';
|
|
9
9
|
|
|
10
|
+
// If running from a subdirectory of a git repo, cd to the repo root first so
|
|
11
|
+
// that .env.maiass is loaded from the right place and git operations are
|
|
12
|
+
// consistent with the project root.
|
|
13
|
+
import { execSync } from 'child_process';
|
|
14
|
+
try {
|
|
15
|
+
const gitRoot = execSync('git rev-parse --show-toplevel', { encoding: 'utf8' }).trim();
|
|
16
|
+
if (gitRoot && gitRoot !== process.cwd()) {
|
|
17
|
+
process.chdir(gitRoot);
|
|
18
|
+
}
|
|
19
|
+
} catch {
|
|
20
|
+
// Not in a git repo — leave cwd as-is, pipeline will handle it gracefully
|
|
21
|
+
}
|
|
22
|
+
|
|
10
23
|
// Load environment variables from multiple sources with cross-platform support
|
|
11
24
|
ensureConfigDirectories();
|
|
12
25
|
const envConfig = loadEnvironmentConfig();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maiass",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.10.
|
|
4
|
+
"version": "5.10.2",
|
|
5
5
|
"description": "AI commit message generator, semantic versioning, and changelog automation for Git. One command stages, commits with AI, bumps version, and merges branches. Free credits on install — no sign-up needed.",
|
|
6
6
|
"main": "maiass.mjs",
|
|
7
7
|
"bin": {
|