@tailor-platform/sdk 1.21.0 → 1.23.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 (82) hide show
  1. package/CHANGELOG.md +61 -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.d.mts +0 -1
  8. package/dist/cli/index.mjs +544 -57
  9. package/dist/cli/index.mjs.map +1 -1
  10. package/dist/cli/lib.d.mts +49 -9
  11. package/dist/cli/lib.mjs +15 -16
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/cli/skills.d.mts +0 -1
  14. package/dist/configure/index.d.mts +4 -5
  15. package/dist/configure/index.mjs +15 -4
  16. package/dist/configure/index.mjs.map +1 -1
  17. package/dist/{enum-constants-CGVvu3dd.mjs → enum-constants-B5Nl-yzx.mjs} +1 -1
  18. package/dist/{enum-constants-CGVvu3dd.mjs.map → enum-constants-B5Nl-yzx.mjs.map} +1 -1
  19. package/dist/{file-utils-GX_tGWl4.mjs → file-utils-sEOwAdJ4.mjs} +1 -1
  20. package/dist/{file-utils-GX_tGWl4.mjs.map → file-utils-sEOwAdJ4.mjs.map} +1 -1
  21. package/dist/{index-oZXVKyfX.d.mts → index-BSXclved.d.mts} +2 -3
  22. package/dist/{index-BWVAwea4.d.mts → index-CO-jsOMb.d.mts} +2 -3
  23. package/dist/{index-CnHd6BNg.d.mts → index-CU2kZzKa.d.mts} +4 -11
  24. package/dist/{index-DxlmLUag.d.mts → index-DQlsfhpg.d.mts} +2 -3
  25. package/dist/{index-Dn61THJK.d.mts → index-lIALNMi_.d.mts} +2 -3
  26. package/dist/{interceptor-D8MeZOxX.mjs → interceptor-DiARwPfw.mjs} +1 -1
  27. package/dist/{interceptor-D8MeZOxX.mjs.map → interceptor-DiARwPfw.mjs.map} +1 -1
  28. package/dist/{job-2Q82qQ6N.mjs → job-CRavYLLk.mjs} +4 -24
  29. package/dist/job-CRavYLLk.mjs.map +1 -0
  30. package/dist/kysely/index.d.mts +2 -3
  31. package/dist/kysely/index.mjs +2 -2
  32. package/dist/kysely/index.mjs.map +1 -1
  33. package/dist/{kysely-type-Cpq5TNGY.mjs → kysely-type-CSlcwNFH.mjs} +1 -1
  34. package/dist/{kysely-type-Cpq5TNGY.mjs.map → kysely-type-CSlcwNFH.mjs.map} +1 -1
  35. package/dist/package-json-BI0ng3_5.mjs +3 -0
  36. package/dist/{package-json-3H5gfhA4.mjs → package-json-iVBhE5Ef.mjs} +1 -1
  37. package/dist/{package-json-3H5gfhA4.mjs.map → package-json-iVBhE5Ef.mjs.map} +1 -1
  38. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -3
  39. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  40. package/dist/plugin/builtin/file-utils/index.d.mts +2 -3
  41. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  42. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -3
  43. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  44. package/dist/plugin/builtin/seed/index.d.mts +2 -3
  45. package/dist/plugin/builtin/seed/index.mjs +1 -1
  46. package/dist/plugin/index.d.mts +1 -2
  47. package/dist/plugin/index.mjs +3 -3
  48. package/dist/plugin/index.mjs.map +1 -1
  49. package/dist/{update-9MTRN1UA.mjs → query-BLQBOaAM.mjs} +1199 -198
  50. package/dist/query-BLQBOaAM.mjs.map +1 -0
  51. package/dist/{schema-D5Cpd8fQ.mjs → schema-Cjm-OvPF.mjs} +2 -2
  52. package/dist/schema-Cjm-OvPF.mjs.map +1 -0
  53. package/dist/{seed-D-rYCN5F.mjs → seed-CXvCW3Xc.mjs} +2 -2
  54. package/dist/{seed-D-rYCN5F.mjs.map → seed-CXvCW3Xc.mjs.map} +1 -1
  55. package/dist/telemetry-BAxP8-PR.mjs +3 -0
  56. package/dist/{telemetry-DuBhnd0X.mjs → telemetry-C46fds1l.mjs} +2 -2
  57. package/dist/{telemetry-DuBhnd0X.mjs.map → telemetry-C46fds1l.mjs.map} +1 -1
  58. package/dist/{types-QKq1usl7.d.mts → types--G4ilVmx.d.mts} +8 -9
  59. package/dist/{types-ClK_HJ0G.mjs → types-CBTSg-LK.mjs} +1 -1
  60. package/dist/{types-ClK_HJ0G.mjs.map → types-CBTSg-LK.mjs.map} +1 -1
  61. package/dist/{types-C0o90Cmb.d.mts → types-IR-hw0-y.d.mts} +6 -3
  62. package/dist/utils/test/index.d.mts +42 -5
  63. package/dist/utils/test/index.mjs +78 -3
  64. package/dist/utils/test/index.mjs.map +1 -1
  65. package/docs/cli/function.md +83 -3
  66. package/docs/services/auth.md +2 -2
  67. package/package.json +9 -7
  68. package/postinstall.mjs +4 -14
  69. package/dist/application-CEv5c7TU.mjs +0 -102207
  70. package/dist/application-CEv5c7TU.mjs.map +0 -1
  71. package/dist/application-DiCzM9b0.mjs +0 -9
  72. package/dist/chunk-CqAI0b6X.mjs +0 -47
  73. package/dist/jiti-DfS9jItj.mjs +0 -4482
  74. package/dist/jiti-DfS9jItj.mjs.map +0 -1
  75. package/dist/job-2Q82qQ6N.mjs.map +0 -1
  76. package/dist/package-json-DTDAqRRJ.mjs +0 -3
  77. package/dist/schema-D5Cpd8fQ.mjs.map +0 -1
  78. package/dist/src-Bb1UVstT.mjs +0 -1038
  79. package/dist/src-Bb1UVstT.mjs.map +0 -1
  80. package/dist/telemetry-Dhzj9Ncm.mjs +0 -3
  81. package/dist/update-9MTRN1UA.mjs.map +0 -1
  82. package/dist/user-defined.d.ts +0 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#661](https://github.com/tailor-platform/sdk/pull/661) [`03f33d9`](https://github.com/tailor-platform/sdk/commit/03f33d9c3d789c738c99600148aa52f2586017ea) Thanks [@r253hmdryou](https://github.com/r253hmdryou)! - Add interactive REPL mode to `tailor-sdk query`.
8
+
9
+ This allows running SQL queries statement-by-statement and GraphQL queries in an
10
+ interactive session by omitting `--query`.
11
+
12
+ ### Patch Changes
13
+
14
+ - [#677](https://github.com/tailor-platform/sdk/pull/677) [`cc6db64`](https://github.com/tailor-platform/sdk/commit/cc6db647361309021268543c291e1f13e9a6cb1c) Thanks [@dqn](https://github.com/dqn)! - Write tailor.d.ts to project root (next to config file) instead of SDK dist directory
15
+
16
+ - [#680](https://github.com/tailor-platform/sdk/pull/680) [`4d421a8`](https://github.com/tailor-platform/sdk/commit/4d421a8b904b939813b50fb68fff4bafccd10541) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): lock file maintenance
17
+
18
+ - [#691](https://github.com/tailor-platform/sdk/pull/691) [`008b2b6`](https://github.com/tailor-platform/sdk/commit/008b2b68d750a0799118087e09418d1f16574bb3) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency suzuki-shunsuke/ghalint to v1.5.5
19
+
20
+ ## 1.22.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [#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.
25
+
26
+ - [#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
27
+
28
+ - [#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
29
+
30
+ - Add new CLI subcommand: `tailor-sdk query`
31
+ - Support query engines via `--engine sql | gql`
32
+ - Execute query string via `--query` (`-q`)
33
+ Usage examples:
34
+
35
+ - SQL:
36
+ `tailor-sdk query --engine sql -q "SELECT * FROM User" -m admin-machine-user`
37
+ - GraphQL:
38
+ `tailor-sdk query --engine gql -q "query { users { id name } }" -m admin-machine-user`
39
+
40
+ - [#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`
41
+
42
+ - `setupTailordbMock(resolver?)`: Mock `globalThis.tailordb.Client` for testing resolvers/executors that use DB queries
43
+ - `setupWorkflowMock(handler)`: Mock `globalThis.tailor.workflow.triggerJobFunction` for testing workflow job triggers
44
+ - `createImportMain(baseDir)`: Import bundled JS files and extract the `main` function for execution testing
45
+
46
+ - [#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
47
+
48
+ ### Patch Changes
49
+
50
+ - [#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
51
+
52
+ - [#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
53
+
54
+ - [#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.
55
+
56
+ - [#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
57
+
58
+ - [#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.
59
+
60
+ - [#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
61
+
62
+ - [#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
63
+
3
64
  ## 1.21.0
4
65
 
5
66
  ### Minor Changes