@segmentstream/ontology 0.147.0 → 0.148.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/CHANGELOG.md +10 -0
- package/dist/connection.d.ts +20 -3
- package/dist/connection.js +36 -8
- package/dist/files.d.ts +21 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/internal/diagnostics.js +3 -0
- package/dist/manifest.d.ts +72 -72
- package/dist/migrate/model.d.ts +54 -54
- package/dist/runtime/pipeline.js +1 -0
- package/dist/service/connection-stream.d.ts +7 -0
- package/dist/service/connection-stream.js +9 -1
- package/dist/service/connections.js +56 -5
- package/dist/service/discovery-search.d.ts +1 -1
- package/dist/service/workflows.js +4 -3
- package/dist/storage/sessions.js +26 -0
- package/package.json +1 -1
package/dist/storage/sessions.js
CHANGED
|
@@ -682,6 +682,32 @@ export function blobRuntime(ontology, sql, provider, fetchImpl = fetch) {
|
|
|
682
682
|
body: yield* openFile({ grant, size: Number(blob.size), fetch: fetchImpl }),
|
|
683
683
|
};
|
|
684
684
|
})),
|
|
685
|
+
source: (input) => publicErrors(Effect.gen(function* () {
|
|
686
|
+
const blob = yield* prepareDownload(input.entity, input.id, input.property, { revisionId: input.revisionId }, invocation.principal);
|
|
687
|
+
const size = Number(blob.size);
|
|
688
|
+
const start = input.start ?? 0;
|
|
689
|
+
const end = input.end ?? size - 1;
|
|
690
|
+
if (!Number.isSafeInteger(start) ||
|
|
691
|
+
!Number.isSafeInteger(end) ||
|
|
692
|
+
start < 0 ||
|
|
693
|
+
end < start ||
|
|
694
|
+
end >= size) {
|
|
695
|
+
return yield* new ActionRejected({ message: "file_range_invalid" });
|
|
696
|
+
}
|
|
697
|
+
const grant = yield* provider.download({
|
|
698
|
+
key: blob.key,
|
|
699
|
+
filename: blob.filename,
|
|
700
|
+
contentType: blob.content_type,
|
|
701
|
+
inline: false,
|
|
702
|
+
});
|
|
703
|
+
return {
|
|
704
|
+
url: grant.url,
|
|
705
|
+
headers: grant.headers,
|
|
706
|
+
start,
|
|
707
|
+
end,
|
|
708
|
+
contentType: blob.content_type,
|
|
709
|
+
};
|
|
710
|
+
})),
|
|
685
711
|
});
|
|
686
712
|
};
|
|
687
713
|
return { begin, list, status, target, part, complete, cancel, download, downloadFile, files };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.148.0",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|