@wix/evalforge-evaluator 0.140.0 → 0.141.0

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/build/index.mjs CHANGED
@@ -183,7 +183,8 @@ function createApiClient(serverUrl, options = "") {
183
183
  // src/fetch-evaluation-data.ts
184
184
  import {
185
185
  isSystemAssertionId,
186
- SYSTEM_ASSERTIONS
186
+ SYSTEM_ASSERTIONS,
187
+ isAllowedBuildCommandString
187
188
  } from "@wix/evalforge-types";
188
189
 
189
190
  // src/resolve-placeholders.ts
@@ -267,13 +268,16 @@ function resolveSystemAssertion(assertionId, params) {
267
268
  }
268
269
  };
269
270
  break;
270
- case "build_passed":
271
+ case "build_passed": {
272
+ const rawCmd = params?.command;
273
+ const command = typeof rawCmd === "string" && isAllowedBuildCommandString(rawCmd) ? rawCmd.trim() : void 0;
271
274
  baseAssertion = {
272
275
  type: "build_passed",
273
- command: params?.command ?? void 0,
276
+ ...command !== void 0 && { command },
274
277
  expectedExitCode: params?.expectedExitCode ?? void 0
275
278
  };
276
279
  break;
280
+ }
277
281
  case "time_limit":
278
282
  baseAssertion = {
279
283
  type: "time_limit",