@gaodes/pi-gitlab 0.4.1 → 0.4.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 +5 -0
- package/package.json +1 -1
- package/src/config/loader.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.2] - 2026-06-01
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Auto-derive apiBase from hostname in loadConfig and writeConfig when apiBase is not explicitly set
|
|
14
|
+
|
|
10
15
|
## [0.4.1] - 2026-06-01
|
|
11
16
|
|
|
12
17
|
### Changed
|
package/package.json
CHANGED
package/src/config/loader.ts
CHANGED
|
@@ -98,6 +98,11 @@ export function loadConfig(cwd?: string): PiGitlabConfig {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// Auto-derive apiBase from hostname if not explicitly set
|
|
102
|
+
if (base.hostname && !base.apiBase) {
|
|
103
|
+
base.apiBase = `https://${base.hostname}/api/v4`;
|
|
104
|
+
}
|
|
105
|
+
|
|
101
106
|
return base;
|
|
102
107
|
}
|
|
103
108
|
|
|
@@ -161,6 +166,11 @@ export function writeConfig(
|
|
|
161
166
|
safety: { ...base.safety, ...(overrides.safety ?? {}) },
|
|
162
167
|
};
|
|
163
168
|
|
|
169
|
+
// Auto-derive apiBase from hostname if not explicitly set
|
|
170
|
+
if (merged.hostname && !merged.apiBase) {
|
|
171
|
+
merged.apiBase = `https://\${merged.hostname}/api/v4`;
|
|
172
|
+
}
|
|
173
|
+
|
|
164
174
|
writeGlobalSettings({
|
|
165
175
|
...existing,
|
|
166
176
|
"pi-gitlab": merged,
|