@delexec/ops 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delexec/ops",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Unified operator CLI for delegated execution clients",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -151,7 +151,9 @@ function sanitizeIdSegment(value) {
151
151
  }
152
152
 
153
153
  async function requestJson(baseUrl, pathname, { method = "GET", headers = {}, body } = {}) {
154
- const response = await fetch(new URL(pathname, baseUrl), {
154
+ const base = String(baseUrl || "").endsWith("/") ? String(baseUrl) : `${baseUrl}/`;
155
+ const relativePath = String(pathname || "").replace(/^\/+/, "");
156
+ const response = await fetch(new URL(relativePath, base), {
155
157
  method,
156
158
  headers: {
157
159
  ...headers,