@qaick/executor 0.2.0 → 0.2.1

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.
@@ -1,8 +1,8 @@
1
1
  import type { ExecutableInput } from '@qaick/contract';
2
- /** Shared invocation semantics. Never coerce supplied arguments or rewrite declarations. */
2
+ /** Shared invocation semantics. Top-level null arguments are omitted; nested JSON remains intact. */
3
3
  export declare function resolveDeclaredInputs(declarations?: readonly ExecutableInput[], arguments_?: Record<string, unknown>): {
4
4
  inputs: {
5
- [x: string]: unknown;
5
+ [k: string]: unknown;
6
6
  };
7
7
  issues: {
8
8
  code: string;
@@ -1,6 +1,6 @@
1
- /** Shared invocation semantics. Never coerce supplied arguments or rewrite declarations. */
1
+ /** Shared invocation semantics. Top-level null arguments are omitted; nested JSON remains intact. */
2
2
  export function resolveDeclaredInputs(declarations = [], arguments_ = {}) {
3
- const inputs = { ...arguments_ };
3
+ const inputs = Object.fromEntries(Object.entries(arguments_).filter(([, value]) => value !== null));
4
4
  const issues = [];
5
5
  if (!Array.isArray(declarations))
6
6
  return { inputs, issues: [{ code: 'INVALID_INPUT', message: 'Declared inputs must be an array.' }] };
@@ -11,7 +11,7 @@ export function resolveDeclaredInputs(declarations = [], arguments_ = {}) {
11
11
  continue;
12
12
  }
13
13
  seen.add(declaration.name);
14
- const supplied = Object.hasOwn(arguments_, declaration.name);
14
+ const supplied = Object.hasOwn(arguments_, declaration.name) && arguments_[declaration.name] !== null;
15
15
  const value = supplied ? arguments_[declaration.name] : declaration.defaultValue;
16
16
  if (value === undefined) {
17
17
  delete inputs[declaration.name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaick/executor",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Host-neutral QAick action execution primitives.",
5
5
  "files": [
6
6
  "dist",