@teamkeel/testing-runtime 0.398.0-next.2 → 0.399.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 +2 -2
  2. package/src/Executor.mjs +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/testing-runtime",
3
- "version": "0.398.0-next.2",
3
+ "version": "0.399.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",
@@ -22,7 +22,7 @@
22
22
  "jsonwebtoken": "^9.0.2",
23
23
  "kysely": "^0.26.3",
24
24
  "lodash.ismatch": "^4.4.0",
25
- "vite": "^5.1.1",
25
+ "vite": "^5.4.11",
26
26
  "vitest": "^0.34.6"
27
27
  },
28
28
  "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
package/src/Executor.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import jwt from "jsonwebtoken";
2
- import { InlineFile, File } from "@teamkeel/functions-runtime";
2
+ import { InlineFile, File, Duration } from "@teamkeel/functions-runtime";
3
3
 
4
4
  export class Executor {
5
5
  constructor(props) {
@@ -128,7 +128,9 @@ async function parseInputs(inputs) {
128
128
  if (inputs != null && typeof inputs === "object") {
129
129
  for (const keys of Object.keys(inputs)) {
130
130
  if (inputs[keys] !== null && typeof inputs[keys] === "object") {
131
- if (isInlineFileOrFile(inputs[keys])) {
131
+ if (isDuration(inputs[keys])) {
132
+ inputs[keys] = inputs[keys].toISOString();
133
+ } else if (isInlineFileOrFile(inputs[keys])) {
132
134
  const contents = await inputs[keys].read();
133
135
  inputs[keys] = `data:${inputs[keys].contentType};name=${
134
136
  inputs[keys].filename
@@ -150,6 +152,10 @@ function isInlineFileOrFile(obj) {
150
152
  );
151
153
  }
152
154
 
155
+ function isDuration(obj) {
156
+ return obj && typeof obj === "object" && obj.constructor.name === "Duration";
157
+ }
158
+
153
159
  function parseOutputs(data) {
154
160
  if (!data) {
155
161
  return null;