@teamkeel/testing-runtime 0.485.0 → 0.487.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/parsing.mjs +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/testing-runtime",
3
- "version": "0.485.0",
3
+ "version": "0.487.0",
4
4
  "description": "Internal package used by the generated @teamkeel/testing package",
5
5
  "exports": "./src/index.mjs",
6
6
  "typings": "src/index.d.ts",
package/src/parsing.mjs CHANGED
@@ -8,9 +8,12 @@ export async function parseInputs(inputs) {
8
8
  inputs[keys] = inputs[keys].toISOString();
9
9
  } else if (isInlineFileOrFile(inputs[keys])) {
10
10
  const contents = await inputs[keys].read();
11
- inputs[keys] = `data:${inputs[keys].contentType};name=${
12
- inputs[keys].filename
13
- };base64,${contents.toString("base64")}`;
11
+ // The name is percent-encoded, as data-URL parameter values must be
12
+ // (the Go runtime rejects a raw space, and ';' / ',' end the value).
13
+ inputs[keys] =
14
+ `data:${inputs[keys].contentType};name=${encodeURIComponent(
15
+ inputs[keys].filename
16
+ )};base64,${contents.toString("base64")}`;
14
17
  } else {
15
18
  inputs[keys] = await parseInputs(inputs[keys]);
16
19
  }