@tailor-platform/sdk 1.52.0 → 1.53.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 (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/application-Cmz1Y7X_.mjs +4 -0
  3. package/dist/{application-CECifcE9.mjs → application-DF74unzA.mjs} +2 -2
  4. package/dist/{application-CECifcE9.mjs.map → application-DF74unzA.mjs.map} +1 -1
  5. package/dist/cli/index.d.mts +1 -3
  6. package/dist/cli/index.mjs +5 -5
  7. package/dist/cli/lib.d.mts +1 -2
  8. package/dist/cli/lib.mjs +3 -3
  9. package/dist/client-CGO7gniI.mjs +1061 -0
  10. package/dist/{client-CKlZhiq4.mjs.map → client-CGO7gniI.mjs.map} +1 -1
  11. package/dist/{client-btP2hNF1.mjs → client-yfFdZU9s.mjs} +1 -1
  12. package/dist/configure/index.d.mts +1 -1
  13. package/dist/{crashreport-DJ5SS5Q-.mjs → crashreport-DGdAgX8Y.mjs} +2 -2
  14. package/dist/{crashreport-DJ5SS5Q-.mjs.map → crashreport-DGdAgX8Y.mjs.map} +1 -1
  15. package/dist/{crashreport-CGE6P9Kf.mjs → crashreport-DnwIxpzF.mjs} +1 -1
  16. package/dist/{file-umdycPAF.mjs → file-B58Dm-2P.mjs} +18 -3
  17. package/dist/file-B58Dm-2P.mjs.map +1 -0
  18. package/dist/{file-DaCYOLPz.d.mts → file-VTJbbOL3.d.mts} +49 -5
  19. package/dist/{index-wuuZLoFt.d.mts → index-ECerapTN.d.mts} +2 -2
  20. package/dist/{mock-BabuSqbj.mjs → mock-B6PI49C_.mjs} +25 -2
  21. package/dist/{mock-BabuSqbj.mjs.map → mock-B6PI49C_.mjs.map} +1 -1
  22. package/dist/runtime/file.d.mts +2 -2
  23. package/dist/runtime/file.mjs +2 -2
  24. package/dist/runtime/globals.d.mts +2 -2
  25. package/dist/runtime/index.d.mts +2 -2
  26. package/dist/runtime/index.mjs +1 -1
  27. package/dist/{runtime-BN484A6U.mjs → runtime-D-3AE1x-.mjs} +4 -4
  28. package/dist/{runtime-BN484A6U.mjs.map → runtime-D-3AE1x-.mjs.map} +1 -1
  29. package/dist/vitest/environment.mjs +1 -1
  30. package/dist/vitest/index.mjs +1 -1
  31. package/dist/vitest/setup.mjs +1 -1
  32. package/docs/runtime.md +1 -1
  33. package/docs/testing.md +21 -1
  34. package/package.json +9 -9
  35. package/dist/application-B_yEREFy.mjs +0 -4
  36. package/dist/client-CKlZhiq4.mjs +0 -1061
  37. package/dist/file-umdycPAF.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- import { c as injectMocks, i as cleanupMocks, n as STATE_KEY, t as RUNTIME_FLAG_KEY } from "../mock-BabuSqbj.mjs";
2
+ import { c as injectMocks, i as cleanupMocks, n as STATE_KEY, t as RUNTIME_FLAG_KEY } from "../mock-B6PI49C_.mjs";
3
3
  import * as globals from "globals";
4
4
 
5
5
  //#region src/vitest/environment.ts
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as fileMock, d as workflowMock, l as secretmanagerMock, o as iconvMock, r as authconnectionMock, s as idpMock, u as tailordbMock } from "../mock-BabuSqbj.mjs";
2
+ import { a as fileMock, d as workflowMock, l as secretmanagerMock, o as iconvMock, r as authconnectionMock, s as idpMock, u as tailordbMock } from "../mock-B6PI49C_.mjs";
3
3
  import { builtinModules } from "node:module";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { dirname, isAbsolute, matchesGlob, relative, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
1
 
2
- import { l as secretmanagerMock, t as RUNTIME_FLAG_KEY } from "../mock-BabuSqbj.mjs";
2
+ import { l as secretmanagerMock, t as RUNTIME_FLAG_KEY } from "../mock-B6PI49C_.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { afterEach, beforeAll, beforeEach } from "vitest";
5
5
 
package/docs/runtime.md CHANGED
@@ -78,7 +78,7 @@ The runtime entry re-exports the following namespaces. Detailed signatures, para
78
78
  - `idp` — IdP user management (`new Client({ namespace })`)
79
79
  - `workflow` — workflow & job control (`triggerWorkflow`, `triggerJobFunction`, `wait`, `resolve`)
80
80
  - `context` — execution context (`getInvoker`)
81
- - `file` — `tailordb.file` BLOB API (`upload`, `download`, `downloadAsBase64`, `delete`, `getMetadata`, `openDownloadStream`)
81
+ - `file` — `tailordb.file` BLOB API (`upload`, `download`, `downloadAsBase64`, `delete`, `getMetadata`, `downloadStream`, `uploadStream`, `openDownloadStream` _(deprecated)_)
82
82
 
83
83
  ## Testing
84
84
 
package/docs/testing.md CHANGED
@@ -227,10 +227,30 @@ test("mock file download", async () => {
227
227
  });
228
228
  ```
229
229
 
230
- For `openDownloadStream`, enqueue an iterable of `StreamValue` items `metadata`, one or more `chunk` items, and a terminal `complete`. Raw `Uint8Array` / `ArrayBuffer` chunks are rejected so tests stay aligned with the platform's structured stream contract.
230
+ For `downloadStream`, enqueue a `FileDownloadStreamResponse` object with a `ReadableStream` body and metadata:
231
231
 
232
232
  ```typescript
233
233
  test("mock file download stream", async () => {
234
+ const body = new ReadableStream({
235
+ start(controller) {
236
+ controller.enqueue(new Uint8Array([1, 2, 3]));
237
+ controller.close();
238
+ },
239
+ });
240
+ fileMock.enqueueResult({
241
+ body,
242
+ metadata: { contentType: "image/png", fileSize: 3, sha256sum: "abc", lastUploadedAt: "" },
243
+ });
244
+
245
+ const result = await tailordb.file.downloadStream("ns", "Doc", "attachment", "r-1");
246
+ expect(result.metadata.fileSize).toBe(3);
247
+ });
248
+ ```
249
+
250
+ For the deprecated `openDownloadStream`, enqueue an iterable of `StreamValue` items — `metadata`, one or more `chunk` items, and a terminal `complete`. Raw `Uint8Array` / `ArrayBuffer` chunks are rejected so tests stay aligned with the platform's structured stream contract.
251
+
252
+ ```typescript
253
+ test("mock file download stream (deprecated openDownloadStream)", async () => {
234
254
  fileMock.enqueueResult([
235
255
  {
236
256
  type: "metadata",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.52.0",
3
+ "version": "1.53.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -150,7 +150,7 @@
150
150
  "@opentelemetry/resources": "2.7.1",
151
151
  "@opentelemetry/sdk-trace-node": "2.7.1",
152
152
  "@opentelemetry/semantic-conventions": "1.41.1",
153
- "@oxc-project/types": "0.132.0",
153
+ "@oxc-project/types": "0.133.0",
154
154
  "@standard-schema/spec": "1.1.0",
155
155
  "@tailor-platform/function-kysely-tailordb": "0.1.3",
156
156
  "@toiroakr/lines-db": "0.9.2",
@@ -169,13 +169,13 @@
169
169
  "madge": "8.0.0",
170
170
  "mime-types": "3.0.2",
171
171
  "open": "11.0.0",
172
- "oxc-parser": "0.132.0",
172
+ "oxc-parser": "0.133.0",
173
173
  "p-limit": "7.3.0",
174
174
  "pathe": "2.0.3",
175
175
  "pgsql-ast-parser": "12.0.2",
176
176
  "pkg-types": "2.3.1",
177
177
  "politty": "0.5.0",
178
- "rolldown": "1.0.2",
178
+ "rolldown": "1.0.3",
179
179
  "semver": "7.8.1",
180
180
  "serve": "14.2.6",
181
181
  "sql-highlight": "6.1.0",
@@ -184,7 +184,7 @@
184
184
  "ts-cron-validator": "1.1.5",
185
185
  "tsx": "4.22.3",
186
186
  "type-fest": "5.6.0",
187
- "undici": "6.26.0",
187
+ "undici": "8.3.0",
188
188
  "xdg-basedir": "5.1.0",
189
189
  "zod": "4.4.3"
190
190
  },
@@ -194,13 +194,13 @@
194
194
  "@types/mime-types": "3.0.1",
195
195
  "@types/node": "24.12.4",
196
196
  "@types/semver": "7.7.1",
197
- "@typescript/native-preview": "7.0.0-dev.20260525.1",
197
+ "@typescript/native-preview": "7.0.0-dev.20260527.2",
198
198
  "@vitest/coverage-v8": "4.1.7",
199
- "oxfmt": "0.51.0",
200
- "oxlint": "1.66.0",
199
+ "oxfmt": "0.52.0",
200
+ "oxlint": "1.67.0",
201
201
  "oxlint-tsgolint": "0.23.0",
202
202
  "sonda": "0.11.1",
203
- "tsdown": "0.22.0",
203
+ "tsdown": "0.22.1",
204
204
  "typescript": "5.9.3",
205
205
  "vitest": "4.1.7",
206
206
  "zinfer": "0.1.8"
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-CECifcE9.mjs";
3
-
4
- export { defineApplication };