@tailor-platform/sdk 1.21.0 → 1.22.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 (76) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/application-CTQe2HSB.mjs +5723 -0
  3. package/dist/application-CTQe2HSB.mjs.map +1 -0
  4. package/dist/application-DdSu3baZ.mjs +8 -0
  5. package/dist/{brand-BZJCv6UY.mjs → brand-DyPrAzpM.mjs} +1 -1
  6. package/dist/{brand-BZJCv6UY.mjs.map → brand-DyPrAzpM.mjs.map} +1 -1
  7. package/dist/cli/index.mjs +544 -57
  8. package/dist/cli/index.mjs.map +1 -1
  9. package/dist/cli/lib.d.mts +49 -8
  10. package/dist/cli/lib.mjs +15 -16
  11. package/dist/cli/lib.mjs.map +1 -1
  12. package/dist/configure/index.d.mts +4 -4
  13. package/dist/configure/index.mjs +15 -4
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/{enum-constants-CGVvu3dd.mjs → enum-constants-B5Nl-yzx.mjs} +1 -1
  16. package/dist/{enum-constants-CGVvu3dd.mjs.map → enum-constants-B5Nl-yzx.mjs.map} +1 -1
  17. package/dist/{file-utils-GX_tGWl4.mjs → file-utils-sEOwAdJ4.mjs} +1 -1
  18. package/dist/{file-utils-GX_tGWl4.mjs.map → file-utils-sEOwAdJ4.mjs.map} +1 -1
  19. package/dist/{index-Dn61THJK.d.mts → index-BGPX26_D.d.mts} +2 -2
  20. package/dist/{index-CnHd6BNg.d.mts → index-BiutQT7m.d.mts} +4 -10
  21. package/dist/{index-DxlmLUag.d.mts → index-ClS0NClx.d.mts} +2 -2
  22. package/dist/{index-BWVAwea4.d.mts → index-Cwi86SUR.d.mts} +2 -2
  23. package/dist/{index-oZXVKyfX.d.mts → index-DPN_P0w3.d.mts} +2 -2
  24. package/dist/{interceptor-D8MeZOxX.mjs → interceptor-DiARwPfw.mjs} +1 -1
  25. package/dist/{interceptor-D8MeZOxX.mjs.map → interceptor-DiARwPfw.mjs.map} +1 -1
  26. package/dist/{job-2Q82qQ6N.mjs → job-CRavYLLk.mjs} +4 -24
  27. package/dist/job-CRavYLLk.mjs.map +1 -0
  28. package/dist/kysely/index.d.mts +2 -2
  29. package/dist/kysely/index.mjs +2 -2
  30. package/dist/kysely/index.mjs.map +1 -1
  31. package/dist/{kysely-type-Cpq5TNGY.mjs → kysely-type-CSlcwNFH.mjs} +1 -1
  32. package/dist/{kysely-type-Cpq5TNGY.mjs.map → kysely-type-CSlcwNFH.mjs.map} +1 -1
  33. package/dist/package-json-BI0ng3_5.mjs +3 -0
  34. package/dist/{package-json-3H5gfhA4.mjs → package-json-iVBhE5Ef.mjs} +1 -1
  35. package/dist/{package-json-3H5gfhA4.mjs.map → package-json-iVBhE5Ef.mjs.map} +1 -1
  36. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -2
  37. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  38. package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
  39. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  40. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
  41. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  42. package/dist/plugin/builtin/seed/index.d.mts +2 -2
  43. package/dist/plugin/builtin/seed/index.mjs +1 -1
  44. package/dist/plugin/index.d.mts +1 -1
  45. package/dist/plugin/index.mjs +3 -3
  46. package/dist/plugin/index.mjs.map +1 -1
  47. package/dist/{update-9MTRN1UA.mjs → query-Bz2oDGhw.mjs} +915 -174
  48. package/dist/query-Bz2oDGhw.mjs.map +1 -0
  49. package/dist/{schema-D5Cpd8fQ.mjs → schema-Cjm-OvPF.mjs} +2 -2
  50. package/dist/{schema-D5Cpd8fQ.mjs.map → schema-Cjm-OvPF.mjs.map} +1 -1
  51. package/dist/{seed-D-rYCN5F.mjs → seed-CXvCW3Xc.mjs} +2 -2
  52. package/dist/{seed-D-rYCN5F.mjs.map → seed-CXvCW3Xc.mjs.map} +1 -1
  53. package/dist/telemetry-BAxP8-PR.mjs +3 -0
  54. package/dist/{telemetry-DuBhnd0X.mjs → telemetry-C46fds1l.mjs} +2 -2
  55. package/dist/{telemetry-DuBhnd0X.mjs.map → telemetry-C46fds1l.mjs.map} +1 -1
  56. package/dist/{types-ClK_HJ0G.mjs → types-CBTSg-LK.mjs} +1 -1
  57. package/dist/{types-ClK_HJ0G.mjs.map → types-CBTSg-LK.mjs.map} +1 -1
  58. package/dist/{types-C0o90Cmb.d.mts → types-DVMQNdTs.d.mts} +6 -2
  59. package/dist/{types-QKq1usl7.d.mts → types-bcuNRo1Y.d.mts} +8 -8
  60. package/dist/utils/test/index.d.mts +42 -4
  61. package/dist/utils/test/index.mjs +78 -3
  62. package/dist/utils/test/index.mjs.map +1 -1
  63. package/docs/cli/function.md +83 -3
  64. package/package.json +7 -5
  65. package/dist/application-CEv5c7TU.mjs +0 -102207
  66. package/dist/application-CEv5c7TU.mjs.map +0 -1
  67. package/dist/application-DiCzM9b0.mjs +0 -9
  68. package/dist/chunk-CqAI0b6X.mjs +0 -47
  69. package/dist/jiti-DfS9jItj.mjs +0 -4482
  70. package/dist/jiti-DfS9jItj.mjs.map +0 -1
  71. package/dist/job-2Q82qQ6N.mjs.map +0 -1
  72. package/dist/package-json-DTDAqRRJ.mjs +0 -3
  73. package/dist/src-Bb1UVstT.mjs +0 -1038
  74. package/dist/src-Bb1UVstT.mjs.map +0 -1
  75. package/dist/telemetry-Dhzj9Ncm.mjs +0 -3
  76. package/dist/update-9MTRN1UA.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#629](https://github.com/tailor-platform/sdk/pull/629) [`628a790`](https://github.com/tailor-platform/sdk/commit/628a790ec52a905ff97a0ab5441119855c670880) Thanks [@toiroakr](https://github.com/toiroakr)! - Add `function test-run` CLI command to run functions on the Tailor Platform server without deploying. Auto-detects resolver, executor, workflow job, and plain function types (including `export function main`). Bundles the function using rolldown and executes via TestExecScript API. Also supports passing pre-bundled `.js` files directly to skip detection and bundling. Automatically injects `env` from config into all function type entries. Embeds machine user context (id, attributes, workspaceId) into resolver entries as `user` and into executor entries as `actor`, resolved from the API and config. Auth namespace is resolved automatically from `config.auth.name`. Fixes error/logs separation in script executor and shows Result section only on success to avoid duplicate output with Error section on failure.
8
+
9
+ - [#665](https://github.com/tailor-platform/sdk/pull/665) [`a7b4a9b`](https://github.com/tailor-platform/sdk/commit/a7b4a9b396aaf6d64343c2f4d4a55fb4216211be) Thanks [@toiroakr](https://github.com/toiroakr)! - Support multiple semicolon-separated SQL statements in `query` command with proper handling of semicolons inside string literals, and improve SQL parse error messages with guidance for reserved keywords
10
+
11
+ - [#589](https://github.com/tailor-platform/sdk/pull/589) [`39edc3f`](https://github.com/tailor-platform/sdk/commit/39edc3f2b7ec03159ffe1eafbdede77fa34c75fe) Thanks [@r253hmdryou](https://github.com/r253hmdryou)! - feat: add `query` command for SQL/GraphQL playground
12
+
13
+ - Add new CLI subcommand: `tailor-sdk query`
14
+ - Support query engines via `--engine sql | gql`
15
+ - Execute query string via `--query` (`-q`)
16
+ Usage examples:
17
+
18
+ - SQL:
19
+ `tailor-sdk query --engine sql -q "SELECT * FROM User" -m admin-machine-user`
20
+ - GraphQL:
21
+ `tailor-sdk query --engine gql -q "query { users { id name } }" -m admin-machine-user`
22
+
23
+ - [#666](https://github.com/tailor-platform/sdk/pull/666) [`ee458b4`](https://github.com/tailor-platform/sdk/commit/ee458b4c05049024a3fd48f85a5e93caa630a4af) Thanks [@dqn](https://github.com/dqn)! - Add test utilities for bundled function testing via `@tailor-platform/sdk/test`
24
+
25
+ - `setupTailordbMock(resolver?)`: Mock `globalThis.tailordb.Client` for testing resolvers/executors that use DB queries
26
+ - `setupWorkflowMock(handler)`: Mock `globalThis.tailor.workflow.triggerJobFunction` for testing workflow job triggers
27
+ - `createImportMain(baseDir)`: Import bundled JS files and extract the `main` function for execution testing
28
+
29
+ - [#646](https://github.com/tailor-platform/sdk/pull/646) [`bc45c01`](https://github.com/tailor-platform/sdk/commit/bc45c018aa165aad02ae6e8ef44b1459d859a93a) Thanks [@dqn](https://github.com/dqn)! - Add shell completion metadata to CLI args and upgrade politty to v0.4.3
30
+
31
+ ### Patch Changes
32
+
33
+ - [#663](https://github.com/tailor-platform/sdk/pull/663) [`7cf2df1`](https://github.com/tailor-platform/sdk/commit/7cf2df1a0429b0bed0065e31b9998c33ce0c237c) Thanks [@toiroakr](https://github.com/toiroakr)! - Add publint to validate package exports before publishing
34
+
35
+ - [#659](https://github.com/tailor-platform/sdk/pull/659) [`9fc3d02`](https://github.com/tailor-platform/sdk/commit/9fc3d02b99f2236f1f4f49e681ddbecec950c6b5) Thanks [@k1LoW](https://github.com/k1LoW)! - Add allowMicrosoftOauth support to IdP user auth policy
36
+
37
+ - [#662](https://github.com/tailor-platform/sdk/pull/662) [`514fb40`](https://github.com/tailor-platform/sdk/commit/514fb40e4733e6726f83a58587325b3119fae239) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix column ordering in SQL wildcard query results by sorting columns based on db.type() field definition order. Wildcards are expanded in-place preserving SQL declaration order, with system fields (id) first followed by user-defined fields. Supports both unqualified (`SELECT *`) and qualified (`SELECT u.*`) wildcards with alias resolution. Column matching is case-insensitive to handle unquoted SQL identifiers correctly.
38
+
39
+ - [#667](https://github.com/tailor-platform/sdk/pull/667) [`b516df2`](https://github.com/tailor-platform/sdk/commit/b516df2ee6b2ba8c77fed8df22cf2942fbb94a75) Thanks [@riku99](https://github.com/riku99)! - Skip application creation when no subgraphs are configured
40
+
41
+ - [#660](https://github.com/tailor-platform/sdk/pull/660) [`c38bfcc`](https://github.com/tailor-platform/sdk/commit/c38bfcc117bcac6d6d211267f3997ff11df1d8c7) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove `user` from `WorkflowJobContext` — the platform's workflow runtime does not inject a `user` global variable into the JS execution environment, so the field was always undefined. Also remove `WORKFLOW_TEST_USER_KEY` constant.
42
+
43
+ - [#619](https://github.com/tailor-platform/sdk/pull/619) [`4a686b7`](https://github.com/tailor-platform/sdk/commit/4a686b7e35d7c6bd5aaaea36d44827edae0db68c) Thanks [@riku99](https://github.com/riku99)! - Enable external constants/functions in TailorDB hooks and validators
44
+
45
+ - [#668](https://github.com/tailor-platform/sdk/pull/668) [`4f93a59`](https://github.com/tailor-platform/sdk/commit/4f93a594113aa99fb464e1202af379dbd92302df) Thanks [@riku99](https://github.com/riku99)! - Add strict() to all command arg schemas to reject unknown options
46
+
3
47
  ## 1.21.0
4
48
 
5
49
  ### Minor Changes