@telorun/http-client 0.2.1 → 0.2.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.
@@ -165,8 +165,12 @@ class HttpRequestResource {
165
165
  ? resolvedTimeout
166
166
  : DEFAULT_TIMEOUT;
167
167
  }
168
- // Expand template fields from manifest.inputs using runtime input as context
169
- // Manifest-level fields (url, method, etc.) serve as defaults when inputs is absent
168
+ // Build the effective inputs by layering, lowest precedence to highest:
169
+ // 1. manifest-level fields (url, method, ...) fallback defaults
170
+ // 2. m.inputs — manifest-baked inputs (legacy, still supported when present)
171
+ // 3. call-site `input` — the canonical sibling-form invocation args
172
+ // CEL expressions inside any of these resolve against `input` as the context.
173
+ const callerInput = (input ?? {});
170
174
  const manifestInputs = {
171
175
  url: m.url,
172
176
  method: m.method,
@@ -174,8 +178,9 @@ class HttpRequestResource {
174
178
  headers: m.headers,
175
179
  body: m.body,
176
180
  ...m.inputs,
181
+ ...callerInput,
177
182
  };
178
- const resolved = ctx.expandValue(manifestInputs, input ?? {});
183
+ const resolved = ctx.expandValue(manifestInputs, callerInput);
179
184
  const rawUrl = resolved.url;
180
185
  const method = ((resolved.method ?? "GET") || "GET").toUpperCase();
181
186
  const requestHeaders = normalizeHeaders((resolved.headers ?? {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/http-client",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Telo HTTP Client module - HTTP client resource kinds for Telo manifests.",
5
5
  "keywords": [
6
6
  "telo",
@@ -35,7 +35,7 @@
35
35
  "src/**"
36
36
  ],
37
37
  "dependencies": {
38
- "@telorun/sdk": "0.10.0"
38
+ "@telorun/sdk": "0.11.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^20.0.0",
@@ -229,8 +229,12 @@ class HttpRequestResource implements ResourceInstance {
229
229
  : DEFAULT_TIMEOUT;
230
230
  }
231
231
 
232
- // Expand template fields from manifest.inputs using runtime input as context
233
- // Manifest-level fields (url, method, etc.) serve as defaults when inputs is absent
232
+ // Build the effective inputs by layering, lowest precedence to highest:
233
+ // 1. manifest-level fields (url, method, ...) fallback defaults
234
+ // 2. m.inputs — manifest-baked inputs (legacy, still supported when present)
235
+ // 3. call-site `input` — the canonical sibling-form invocation args
236
+ // CEL expressions inside any of these resolve against `input` as the context.
237
+ const callerInput = (input ?? {}) as Record<string, unknown>;
234
238
  const manifestInputs: HttpRequestInputs = {
235
239
  url: m.url,
236
240
  method: m.method,
@@ -238,8 +242,9 @@ class HttpRequestResource implements ResourceInstance {
238
242
  headers: m.headers,
239
243
  body: m.body,
240
244
  ...m.inputs,
245
+ ...callerInput,
241
246
  };
242
- const resolved = ctx.expandValue(manifestInputs, input ?? {}) as HttpRequestInputs;
247
+ const resolved = ctx.expandValue(manifestInputs, callerInput) as HttpRequestInputs;
243
248
  const rawUrl = resolved.url as string;
244
249
  const method = ((resolved.method ?? "GET") || "GET").toUpperCase();
245
250
  const requestHeaders = normalizeHeaders((resolved.headers ?? {}) as Record<string, string>);