@teamkeel/functions-runtime 0.419.0 → 0.420.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/dist/index.cjs +22 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -786,9 +786,9 @@ var InlineFile = class _InlineFile {
|
|
|
786
786
|
const mime = info.split(";")[0];
|
|
787
787
|
const name = info.split(";")[1].split("=")[1];
|
|
788
788
|
const buffer = Buffer.from(data, "base64");
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
return
|
|
789
|
+
const file2 = new _InlineFile({ filename: name, contentType: mime });
|
|
790
|
+
file2.write(buffer);
|
|
791
|
+
return file2;
|
|
792
792
|
}
|
|
793
793
|
// Gets size of the file's contents in bytes
|
|
794
794
|
get size() {
|
|
@@ -2969,6 +2969,23 @@ var scan = /* @__PURE__ */ __name((name, options) => {
|
|
|
2969
2969
|
};
|
|
2970
2970
|
}, "scan");
|
|
2971
2971
|
|
|
2972
|
+
// src/flows/ui/elements/display/file.ts
|
|
2973
|
+
var file = /* @__PURE__ */ __name(async (options) => {
|
|
2974
|
+
const title = options.title || options.file.filename;
|
|
2975
|
+
const url = await options.file.getPresignedUrl();
|
|
2976
|
+
const metadata = await options.file.toJSON();
|
|
2977
|
+
return {
|
|
2978
|
+
uiConfig: {
|
|
2979
|
+
__type: "ui.display.file",
|
|
2980
|
+
title,
|
|
2981
|
+
file: metadata ? {
|
|
2982
|
+
url: url?.toString() || "",
|
|
2983
|
+
...metadata
|
|
2984
|
+
} : void 0
|
|
2985
|
+
}
|
|
2986
|
+
};
|
|
2987
|
+
}, "file");
|
|
2988
|
+
|
|
2972
2989
|
// src/flows/index.ts
|
|
2973
2990
|
var STEP_STATUS = /* @__PURE__ */ ((STEP_STATUS2) => {
|
|
2974
2991
|
STEP_STATUS2["NEW"] = "NEW";
|
|
@@ -3219,7 +3236,8 @@ function createFlowContext(runId, data, action, callback, element, spanId, ctx)
|
|
|
3219
3236
|
code,
|
|
3220
3237
|
grid,
|
|
3221
3238
|
list,
|
|
3222
|
-
keyValue
|
|
3239
|
+
keyValue,
|
|
3240
|
+
file
|
|
3223
3241
|
},
|
|
3224
3242
|
select: {
|
|
3225
3243
|
one: selectOne,
|