feat: support recursive auto-upload (#62)
This commit is contained in:
parent
dfeb8689f4
commit
9262814578
3
.gitignore
vendored
3
.gitignore
vendored
@ -40,4 +40,5 @@ Thumbs.db
|
|||||||
|
|
||||||
# Next.js
|
# Next.js
|
||||||
.next
|
.next
|
||||||
*.local
|
*.local
|
||||||
|
.vercel
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@fal-ai/serverless-client",
|
"name": "@fal-ai/serverless-client",
|
||||||
"description": "The fal serverless JS/TS client",
|
"description": "The fal serverless JS/TS client",
|
||||||
"version": "0.9.1",
|
"version": "0.9.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -121,6 +121,9 @@ export const storageImpl: StorageSupport = {
|
|||||||
if (isPlainObject(value)) {
|
if (isPlainObject(value)) {
|
||||||
return [key, await storageImpl.transformInput(value)];
|
return [key, await storageImpl.transformInput(value)];
|
||||||
}
|
}
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return [key, await Promise.all(value.map(storageImpl.transformInput))];
|
||||||
|
}
|
||||||
return [key, value] as KeyValuePair;
|
return [key, value] as KeyValuePair;
|
||||||
});
|
});
|
||||||
const results = await Promise.all(promises);
|
const results = await Promise.all(promises);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class FalStream<Input, Output> {
|
|||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.start();
|
this.start().catch(this.handleError);
|
||||||
}
|
}
|
||||||
|
|
||||||
private start = async () => {
|
private start = async () => {
|
||||||
@ -145,8 +145,7 @@ class FalStream<Input, Output> {
|
|||||||
this.emit(
|
this.emit(
|
||||||
'error',
|
'error',
|
||||||
new ApiError({
|
new ApiError({
|
||||||
message:
|
message: `Event stream timed out after ${(timeout / 1000).toFixed(0)} seconds with no messages.`,
|
||||||
'Event stream timed out after 15 seconds with no messages.',
|
|
||||||
status: 408,
|
status: 408,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user