@tailor-platform/sdk 1.66.1 → 2.0.0-next.1

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 (198) hide show
  1. package/CHANGELOG.md +89 -2
  2. package/dist/application-DB2r36Et.mjs +3 -0
  3. package/dist/{application-DGDmL8i_.mjs → application-DqS1yBg3.mjs} +188 -128
  4. package/dist/application-DqS1yBg3.mjs.map +1 -0
  5. package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
  6. package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
  7. package/dist/{authconnection-D8SJGMpj.mjs → authconnection-D2MhtTN5.mjs} +2 -3
  8. package/dist/{authconnection-D8SJGMpj.mjs.map → authconnection-D2MhtTN5.mjs.map} +1 -1
  9. package/dist/{authconnection-BIYzEh2p.d.mts → authconnection-DvUQAjQS.d.mts} +1 -1
  10. package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
  11. package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
  12. package/dist/cli/index.mjs +78 -131
  13. package/dist/cli/index.mjs.map +1 -1
  14. package/dist/cli/lib.d.mts +15 -154
  15. package/dist/cli/lib.mjs +9 -10
  16. package/dist/cli/lib.mjs.map +1 -1
  17. package/dist/{client-boxXYevx.mjs → client-Dbohmtkv.mjs} +1 -2
  18. package/dist/{client-F0a4cWUM.mjs → client-z_oHGVNy.mjs} +8 -6
  19. package/dist/client-z_oHGVNy.mjs.map +1 -0
  20. package/dist/completion/zsh-worker.zsh +5 -19
  21. package/dist/configure/index.d.mts +8 -7
  22. package/dist/configure/index.mjs +11 -28
  23. package/dist/configure/index.mjs.map +1 -1
  24. package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
  25. package/dist/{context-s0lxhu8_.mjs.map → context-Bd266-ru.mjs.map} +1 -1
  26. package/dist/{context-CUBwSBq4.d.mts → context-BuuIb8CC.d.mts} +1 -1
  27. package/dist/{crashreport-0EHy-ayY.mjs → crashreport-BsjAkFWw.mjs} +19 -10
  28. package/dist/{crashreport-0EHy-ayY.mjs.map → crashreport-BsjAkFWw.mjs.map} +1 -1
  29. package/dist/{crashreport-Bf6uT6mf.mjs → crashreport-pr6Rhvza.mjs} +1 -2
  30. package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
  31. package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
  32. package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
  33. package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
  34. package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
  35. package/dist/field-DOsJCPFa.mjs.map +1 -0
  36. package/dist/{file-BzK8z3X-.d.mts → file-BB8Vs9O_.d.mts} +1 -1
  37. package/dist/{file-B58Dm-2P.mjs → file-_oUZo76X.mjs} +2 -3
  38. package/dist/{file-B58Dm-2P.mjs.map → file-_oUZo76X.mjs.map} +1 -1
  39. package/dist/{file-utils-BHPxPXmn.mjs → file-utils-DcyIPFQh.mjs} +2 -3
  40. package/dist/{file-utils-BHPxPXmn.mjs.map → file-utils-DcyIPFQh.mjs.map} +1 -1
  41. package/dist/{globals-ByrCoDip.mjs → globals-Crz8o65k.mjs} +53 -5
  42. package/dist/globals-Crz8o65k.mjs.map +1 -0
  43. package/dist/http-adapter.generated-WgMnb7Sb.d.mts +580 -0
  44. package/dist/{iconv-kwrmd1U_.d.mts → iconv-Co-TOPuH.d.mts} +1 -1
  45. package/dist/{iconv-DreIffeM.mjs → iconv-D2vi8G36.mjs} +2 -3
  46. package/dist/{iconv-DreIffeM.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
  47. package/dist/{idp-Ch95ag8h.mjs → idp-BDbK5gjm.mjs} +2 -3
  48. package/dist/{idp-Ch95ag8h.mjs.map → idp-BDbK5gjm.mjs.map} +1 -1
  49. package/dist/{idp-BlBPtXJ-.d.mts → idp-DrhVrLmV.d.mts} +1 -1
  50. package/dist/{index-QpC0TNbH.d.mts → index-5vPyRu1y.d.mts} +2 -2
  51. package/dist/{index-Bhjep8cS.d.mts → index-B7AKc18V.d.mts} +2 -2
  52. package/dist/{index-BdLqzJDu.d.mts → index-BlpzXncY.d.mts} +25 -247
  53. package/dist/{index-DRhMpdnA.d.mts → index-CK7u9isy.d.mts} +8 -8
  54. package/dist/{index-CZ2r3qiO.d.mts → index-CNYe5lnW.d.mts} +2 -2
  55. package/dist/{index-Db2RvnEH.d.mts → index-DjUdWlzf.d.mts} +2 -2
  56. package/dist/index-ZePLwxw7.d.mts +208 -0
  57. package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
  58. package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
  59. package/dist/{job-BpsFXPbi.mjs → job-fuc3j1Ma.mjs} +9 -10
  60. package/dist/job-fuc3j1Ma.mjs.map +1 -0
  61. package/dist/kysely/index.mjs +0 -1
  62. package/dist/kysely/index.mjs.map +1 -1
  63. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DR8uzZTA.mjs} +2 -3
  64. package/dist/kysely-type-DR8uzZTA.mjs.map +1 -0
  65. package/dist/{logger-DpJyJvNz.mjs → logger-CxF-Ex5d.mjs} +1 -2
  66. package/dist/{logger-DpJyJvNz.mjs.map → logger-CxF-Ex5d.mjs.map} +1 -1
  67. package/dist/{mock-DMgIygjE.mjs → mock-BjFj5o1I.mjs} +9 -11
  68. package/dist/mock-BjFj5o1I.mjs.map +1 -0
  69. package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
  70. package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
  71. package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
  72. package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
  73. package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
  74. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  75. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  76. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  77. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  78. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  79. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  80. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  81. package/dist/plugin/builtin/seed/index.mjs +1 -2
  82. package/dist/plugin/index.d.mts +1 -3
  83. package/dist/plugin/index.mjs +0 -1
  84. package/dist/plugin/index.mjs.map +1 -1
  85. package/dist/registry-DdsYlL_P.mjs +51 -0
  86. package/dist/registry-DdsYlL_P.mjs.map +1 -0
  87. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DmGr9zMw.mjs} +2 -3
  88. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DmGr9zMw.mjs.map} +1 -1
  89. package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
  90. package/dist/runtime/authconnection.d.mts +1 -1
  91. package/dist/runtime/authconnection.mjs +1 -2
  92. package/dist/runtime/context.d.mts +1 -1
  93. package/dist/runtime/context.mjs +1 -2
  94. package/dist/runtime/file.d.mts +1 -1
  95. package/dist/runtime/file.mjs +1 -2
  96. package/dist/runtime/globals.d.mts +6 -39
  97. package/dist/runtime/globals.mjs +0 -1
  98. package/dist/runtime/iconv.d.mts +1 -1
  99. package/dist/runtime/iconv.mjs +1 -2
  100. package/dist/runtime/idp.d.mts +1 -1
  101. package/dist/runtime/idp.mjs +1 -2
  102. package/dist/runtime/index.d.mts +8 -8
  103. package/dist/runtime/index.mjs +7 -8
  104. package/dist/runtime/secretmanager.d.mts +1 -1
  105. package/dist/runtime/secretmanager.mjs +1 -2
  106. package/dist/runtime/workflow.d.mts +1 -1
  107. package/dist/runtime/workflow.mjs +1 -2
  108. package/dist/{runtime-2nzOZCUb.mjs → runtime-n9NCkjee.mjs} +65 -232
  109. package/dist/runtime-n9NCkjee.mjs.map +1 -0
  110. package/dist/{schema-1msIhXwA.mjs → schema-BhkpP5Hw.mjs} +3 -4
  111. package/dist/schema-BhkpP5Hw.mjs.map +1 -0
  112. package/dist/{secret-file-CWzF8rry.mjs → secret-file-DBqZhjFQ.mjs} +1 -2
  113. package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-DBqZhjFQ.mjs.map} +1 -1
  114. package/dist/{secretmanager-CKLB3wAQ.d.mts → secretmanager-B3n4KHfm.d.mts} +1 -1
  115. package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
  116. package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
  117. package/dist/seed/index.mjs +0 -1
  118. package/dist/seed/index.mjs.map +1 -1
  119. package/dist/{seed-BH2FbrPV.mjs → seed-jf3008-h.mjs} +5 -16
  120. package/dist/seed-jf3008-h.mjs.map +1 -0
  121. package/dist/{service-wI3Hvrgx.mjs → service-CCL8ruDf.mjs} +3 -4
  122. package/dist/service-CCL8ruDf.mjs.map +1 -0
  123. package/dist/service-D6yonf2I.mjs +3 -0
  124. package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri.mjs} +3 -4
  125. package/dist/service-DU1mVzri.mjs.map +1 -0
  126. package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
  127. package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
  128. package/dist/telemetry-ClwW5ohF.mjs +3 -0
  129. package/dist/test-env-key-D9kM6ETE.mjs +49 -0
  130. package/dist/test-env-key-D9kM6ETE.mjs.map +1 -0
  131. package/dist/type-source-DH_LH20p.mjs +13 -0
  132. package/dist/type-source-DH_LH20p.mjs.map +1 -0
  133. package/dist/{types-CmzfQP_m.mjs → types-B2RpYyA_.mjs} +2 -3
  134. package/dist/types-B2RpYyA_.mjs.map +1 -0
  135. package/dist/types-ClhIrW_C.mjs +4 -0
  136. package/dist/{tailordb-C-ar4XCX.d.mts → types-DCUhgpyI.d.mts} +142 -221
  137. package/dist/{plugin-DylAsA4Z.d.mts → types-DhO_VEZd.d.mts} +119 -179
  138. package/dist/types-DwDgacni.d.mts +338 -0
  139. package/dist/utils/test/index.d.mts +4 -3
  140. package/dist/utils/test/index.mjs +1 -2
  141. package/dist/utils/test/index.mjs.map +1 -1
  142. package/dist/vitest/environment.mjs +1 -2
  143. package/dist/vitest/environment.mjs.map +1 -1
  144. package/dist/vitest/index.d.mts +42 -5
  145. package/dist/vitest/index.mjs +133 -4
  146. package/dist/vitest/index.mjs.map +1 -1
  147. package/dist/vitest/setup.mjs +2 -3
  148. package/dist/vitest/setup.mjs.map +1 -1
  149. package/dist/{workflow-CMamswkK.d.mts → workflow-BbKvGLQg.d.mts} +1 -1
  150. package/dist/{workflow--aPbA8Uq.mjs → workflow-DgemCAz3.mjs} +2 -3
  151. package/dist/{workflow--aPbA8Uq.mjs.map → workflow-DgemCAz3.mjs.map} +1 -1
  152. package/dist/workflow.generated-DtQwEo-x.d.mts +671 -0
  153. package/docs/cli/application.md +0 -2
  154. package/docs/cli/crashreport.md +0 -2
  155. package/docs/cli/function.md +1 -1
  156. package/docs/cli/user.md +3 -3
  157. package/docs/cli/workspace.md +3 -3
  158. package/docs/configuration.md +0 -2
  159. package/docs/plugin/custom.md +2 -2
  160. package/docs/plugin/index.md +1 -1
  161. package/docs/runtime.md +3 -3
  162. package/docs/services/auth.md +0 -2
  163. package/docs/services/executor.md +0 -2
  164. package/docs/services/resolver.md +2 -4
  165. package/docs/services/tailordb.md +1 -1
  166. package/docs/services/workflow.md +13 -15
  167. package/docs/testing.md +18 -11
  168. package/package.json +9 -8
  169. package/dist/actor-D_2aJjYO.d.mts +0 -24
  170. package/dist/application-DGDmL8i_.mjs.map +0 -1
  171. package/dist/application-nTydHJm8.mjs +0 -4
  172. package/dist/cli/skills.d.mts +0 -1
  173. package/dist/cli/skills.mjs +0 -22
  174. package/dist/cli/skills.mjs.map +0 -1
  175. package/dist/client-F0a4cWUM.mjs.map +0 -1
  176. package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
  177. package/dist/env-B-g-qgE4.d.mts +0 -7
  178. package/dist/field-C4zdJLW5.mjs.map +0 -1
  179. package/dist/globals-ByrCoDip.mjs.map +0 -1
  180. package/dist/job-BpsFXPbi.mjs.map +0 -1
  181. package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
  182. package/dist/mock-DMgIygjE.mjs.map +0 -1
  183. package/dist/package-json-wzO6nV9O.mjs +0 -4
  184. package/dist/registry-D0uB0OrK.mjs +0 -178
  185. package/dist/registry-D0uB0OrK.mjs.map +0 -1
  186. package/dist/runtime-2nzOZCUb.mjs.map +0 -1
  187. package/dist/schema-1msIhXwA.mjs.map +0 -1
  188. package/dist/seed-BH2FbrPV.mjs.map +0 -1
  189. package/dist/service-BHQIerYh.mjs +0 -4
  190. package/dist/service-DMohAx8a2.mjs.map +0 -1
  191. package/dist/service-wI3Hvrgx.mjs.map +0 -1
  192. package/dist/telemetry-w92bvGdC.mjs +0 -4
  193. package/dist/types-2Be3wSMc.mjs +0 -5
  194. package/dist/types-CmzfQP_m.mjs.map +0 -1
  195. package/dist/workflow.generated--1Qc15Et.d.mts +0 -1471
  196. package/docs/generator/builtin.md +0 -257
  197. package/docs/generator/custom.md +0 -147
  198. package/docs/generator/index.md +0 -66
@@ -1,2 +1,2 @@
1
- import { a as convert, c as encode, i as TailorIconvAPI, l as encodings, n as IconvConstructor, o as convertBuffer, r as IconvInstance, s as decode, t as Iconv } from "../iconv-kwrmd1U_.mjs";
1
+ import { a as convert, c as encode, i as TailorIconvAPI, l as encodings, n as IconvConstructor, o as convertBuffer, r as IconvInstance, s as decode, t as Iconv } from "../iconv-Co-TOPuH.mjs";
2
2
  export { Iconv, IconvConstructor, IconvInstance, TailorIconvAPI, convert, convertBuffer, decode, encode, encodings };
@@ -1,4 +1,3 @@
1
-
2
- import { a as encode, i as decode, n as convert, o as encodings, r as convertBuffer, t as Iconv } from "../iconv-DreIffeM.mjs";
1
+ import { a as encode, i as decode, n as convert, o as encodings, r as convertBuffer, t as Iconv } from "../iconv-D2vi8G36.mjs";
3
2
 
4
3
  export { Iconv, convert, convertBuffer, decode, encode, encodings };
@@ -1,2 +1,2 @@
1
- import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, i as IdpClientConstructor, l as TailorIdpAPI, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, t as Client, u as UpdateUserInput } from "../idp-BlBPtXJ-.mjs";
1
+ import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, i as IdpClientConstructor, l as TailorIdpAPI, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, t as Client, u as UpdateUserInput } from "../idp-DrhVrLmV.mjs";
2
2
  export { Client, ClientConfig, CreateUserInput, IdpClientConstructor, IdpClientInstance, ListUsersOptions, ListUsersResponse, SendPasswordResetEmailInput, TailorIdpAPI, UpdateUserInput, User, UserQuery };
@@ -1,4 +1,3 @@
1
-
2
- import { t as Client } from "../idp-Ch95ag8h.mjs";
1
+ import { t as Client } from "../idp-BDbK5gjm.mjs";
3
2
 
4
3
  export { Client };
@@ -1,9 +1,9 @@
1
- import { n as authconnection_d_exports } from "../authconnection-BIYzEh2p.mjs";
2
- import { i as context_d_exports } from "../context-CUBwSBq4.mjs";
3
- import { b as file_d_exports } from "../file-BzK8z3X-.mjs";
4
- import { u as iconv_d_exports } from "../iconv-kwrmd1U_.mjs";
5
- import { p as idp_d_exports } from "../idp-BlBPtXJ-.mjs";
6
- import { i as secretmanager_d_exports } from "../secretmanager-CKLB3wAQ.mjs";
7
- import { c as workflow_d_exports } from "../workflow-CMamswkK.mjs";
8
- import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-DRhMpdnA.mjs";
1
+ import { n as authconnection_d_exports } from "../authconnection-DvUQAjQS.mjs";
2
+ import { i as context_d_exports } from "../context-BuuIb8CC.mjs";
3
+ import { b as file_d_exports } from "../file-BB8Vs9O_.mjs";
4
+ import { u as iconv_d_exports } from "../iconv-Co-TOPuH.mjs";
5
+ import { p as idp_d_exports } from "../idp-DrhVrLmV.mjs";
6
+ import { i as secretmanager_d_exports } from "../secretmanager-B3n4KHfm.mjs";
7
+ import { c as workflow_d_exports } from "../workflow-BbKvGLQg.mjs";
8
+ import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-CK7u9isy.mjs";
9
9
  export { TailorRuntime, TailordbClientConstructor, TailordbClientInstance, TailordbCommandType, TailordbQueryResult, TailordbRuntime, authconnection_d_exports as authconnection, context_d_exports as context, file_d_exports as file, iconv_d_exports as iconv, idp_d_exports as idp, secretmanager_d_exports as secretmanager, workflow_d_exports as workflow };
@@ -1,10 +1,9 @@
1
-
2
- import { s as iconv_exports } from "../iconv-DreIffeM.mjs";
3
- import { r as secretmanager_exports } from "../secretmanager-B9h-U_8U.mjs";
4
- import { t as authconnection_exports } from "../authconnection-D8SJGMpj.mjs";
5
- import { n as idp_exports } from "../idp-Ch95ag8h.mjs";
6
- import { a as workflow_exports } from "../workflow--aPbA8Uq.mjs";
7
- import { t as context_exports } from "../context-s0lxhu8_.mjs";
8
- import { a as file_exports } from "../file-B58Dm-2P.mjs";
1
+ import { s as iconv_exports } from "../iconv-D2vi8G36.mjs";
2
+ import { r as secretmanager_exports } from "../secretmanager-BVxw3ih_.mjs";
3
+ import { t as authconnection_exports } from "../authconnection-D2MhtTN5.mjs";
4
+ import { n as idp_exports } from "../idp-BDbK5gjm.mjs";
5
+ import { a as workflow_exports } from "../workflow-DgemCAz3.mjs";
6
+ import { t as context_exports } from "../context-Bd266-ru.mjs";
7
+ import { a as file_exports } from "../file-_oUZo76X.mjs";
9
8
 
10
9
  export { authconnection_exports as authconnection, context_exports as context, file_exports as file, iconv_exports as iconv, idp_exports as idp, secretmanager_exports as secretmanager, workflow_exports as workflow };
@@ -1,2 +1,2 @@
1
- import { n as getSecret, r as getSecrets, t as TailorSecretmanagerAPI } from "../secretmanager-CKLB3wAQ.mjs";
1
+ import { n as getSecret, r as getSecrets, t as TailorSecretmanagerAPI } from "../secretmanager-B3n4KHfm.mjs";
2
2
  export { TailorSecretmanagerAPI, getSecret, getSecrets };
@@ -1,4 +1,3 @@
1
-
2
- import { n as getSecrets, t as getSecret } from "../secretmanager-B9h-U_8U.mjs";
1
+ import { n as getSecrets, t as getSecret } from "../secretmanager-BVxw3ih_.mjs";
3
2
 
4
3
  export { getSecret, getSecrets };
@@ -1,2 +1,2 @@
1
- import { a as triggerJobFunction, i as resolve, n as TailorWorkflowAPI, o as triggerWorkflow, r as TriggerWorkflowOptions, s as wait, t as AuthInvoker } from "../workflow-CMamswkK.mjs";
1
+ import { a as triggerJobFunction, i as resolve, n as TailorWorkflowAPI, o as triggerWorkflow, r as TriggerWorkflowOptions, s as wait, t as AuthInvoker } from "../workflow-BbKvGLQg.mjs";
2
2
  export { AuthInvoker, TailorWorkflowAPI, TriggerWorkflowOptions, resolve, triggerJobFunction, triggerWorkflow, wait };
@@ -1,4 +1,3 @@
1
-
2
- import { i as wait, n as triggerJobFunction, r as triggerWorkflow, t as resolve } from "../workflow--aPbA8Uq.mjs";
1
+ import { i as wait, n as triggerJobFunction, r as triggerWorkflow, t as resolve } from "../workflow-DgemCAz3.mjs";
3
2
 
4
3
  export { resolve, triggerJobFunction, triggerWorkflow, wait };
@@ -1,14 +1,13 @@
1
-
2
- import { t as db } from "./schema-1msIhXwA.mjs";
3
- import { $ as CreateExecutorExecutorRequestSchema, A as TailorDBGQLPermission_Permit, At as AuthSCIMAttribute_Type, B as UpdateSecretManagerSecretRequestSchema, Bt as Subgraph_ServiceType, C as WorkflowExecution_Status, Ct as AuthConnection_Type, D as UpdateTailorDBTypeRequestSchema, Dt as AuthOAuth2Client_ClientType, E as CreateTailorDBTypeRequestSchema, Et as AuthInvokerSchema, F as CreateStaticWebsiteRequestSchema, Ft as UserProfileProviderConfig_UserProfileProviderType, G as PipelineResolver_OperationType, H as CreatePipelineServiceRequestSchema, Ht as Condition_Operator, I as UpdateStaticWebsiteRequestSchema, It as CreateApplicationRequestSchema, J as IdPLang, K as CreateIdPServiceRequestSchema, Lt as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, M as TailorDBType_Permission_Permit, Mt as AuthSCIMConfig_AuthorizationType, N as TailorDBType_PermitAction, O as TailorDBGQLPermission_Action, Ot as AuthOAuth2Client_GrantType, P as AddCustomDomainRequestSchema, Pt as TenantProviderConfig_TenantProviderType, R as CreateSecretManagerSecretRequestSchema, Rt as UpdateApplicationRequestSchema, S as UpdateWorkflowRequestSchema, St as UpdateUserProfileConfigRequestSchema, T as CreateTailorDBServiceRequestSchema, Tt as AuthIDPConfig_AuthType, U as UpdatePipelineResolverRequestSchema, Ut as FilterSchema, V as CreatePipelineResolverRequestSchema, Vt as ConditionSchema, W as UpdatePipelineServiceRequestSchema, Wt as PageDirection, X as IdPPermissionPermit, Y as IdPPermissionOperator, Z as FunctionExecution_Status, _ as userAgent, _t as UpdateAuthOAuth2ClientRequestSchema, a as fetchAll, at as CreateAuthHookRequestSchema, b as CreateWorkflowJobFunctionRequestSchema, bt as UpdateAuthServiceRequestSchema, ct as CreateAuthOAuth2ClientRequestSchema, dt as CreateAuthServiceRequestSchema, et as UpdateExecutorExecutorRequestSchema, f as initOperatorClient, ft as CreateTenantConfigRequestSchema, gt as UpdateAuthMachineUserRequestSchema, h as resolveStaticWebsiteUrls, ht as UpdateAuthIDPConfigRequestSchema, it as CreateAuthConnectionRequestSchema, j as TailorDBType_Permission_Operator, jt as AuthSCIMAttribute_Uniqueness, k as TailorDBGQLPermission_Operator, kt as AuthSCIMAttribute_Mutability, lt as CreateAuthSCIMConfigRequestSchema, m as platformBaseUrl, mt as UpdateAuthHookRequestSchema, nt as ExecutorTargetType, o as fetchMachineUserToken, ot as CreateAuthIDPConfigRequestSchema, pt as CreateUserProfileConfigRequestSchema, q as UpdateIdPServiceRequestSchema, rt as ExecutorTriggerType, s as fetchPaged, st as CreateAuthMachineUserRequestSchema, tt as ExecutorJobStatus, ut as CreateAuthSCIMResourceRequestSchema, v as OperatorService, vt as UpdateAuthSCIMConfigRequestSchema, w as WorkflowJobExecution_Status, wt as AuthHookPoint, x as CreateWorkflowRequestSchema, xt as UpdateTenantConfigRequestSchema, y as WorkspacePlatformUserRole, yt as UpdateAuthSCIMResourceRequestSchema, z as CreateSecretManagerVaultRequestSchema, zt as ApplicationSchemaUpdateAttemptStatus } from "./client-F0a4cWUM.mjs";
4
- import { t as assertDefined } from "./assert-CKfwrmCV.mjs";
5
- import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DpJyJvNz.mjs";
6
- import { A as readPlatformConfig, C as loadConfig, D as loadConfigPath, E as loadAccessToken, N as writePlatformConfig, O as loadMachineUserName, S as hashFile, b as getDistDir, d as assertUniqueLocalTailorDBTypeNames, f as assertUniqueTailorDBTypeNamesWithExternal, h as platformBundleDefinePlugin, k as loadWorkspaceId, l as buildExecutorArgsExpr, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, u as buildResolverOperationHookExpr, y as createBundleCache } from "./application-DGDmL8i_.mjs";
7
- import { o as loadFilesWithIgnores, t as createExecutorService } from "./service-wI3Hvrgx.mjs";
8
- import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
9
- import { t as readPackageJson } from "./package-json-DcQApfPQ.mjs";
10
- import { n as isCLIError, t as createCLIError } from "./errors-EsY4XO6O.mjs";
11
- import { r as withSpan } from "./telemetry-BQbbVo2t.mjs";
1
+ import { t as db } from "./schema-BhkpP5Hw.mjs";
2
+ import { $ as CreateExecutorExecutorRequestSchema, A as TailorDBGQLPermission_Permit, At as AuthSCIMAttribute_Type, B as UpdateSecretManagerSecretRequestSchema, Bt as Subgraph_ServiceType, C as WorkflowExecution_Status, Ct as AuthConnection_Type, D as UpdateTailorDBTypeRequestSchema, Dt as AuthOAuth2Client_ClientType, E as CreateTailorDBTypeRequestSchema, Et as AuthInvokerSchema, F as CreateStaticWebsiteRequestSchema, Ft as UserProfileProviderConfig_UserProfileProviderType, G as PipelineResolver_OperationType, H as CreatePipelineServiceRequestSchema, Ht as Condition_Operator, I as UpdateStaticWebsiteRequestSchema, It as CreateApplicationRequestSchema, J as IdPLang, K as CreateIdPServiceRequestSchema, Lt as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, M as TailorDBType_Permission_Permit, Mt as AuthSCIMConfig_AuthorizationType, N as TailorDBType_PermitAction, O as TailorDBGQLPermission_Action, Ot as AuthOAuth2Client_GrantType, P as AddCustomDomainRequestSchema, Pt as TenantProviderConfig_TenantProviderType, R as CreateSecretManagerSecretRequestSchema, Rt as UpdateApplicationRequestSchema, S as UpdateWorkflowRequestSchema, St as UpdateUserProfileConfigRequestSchema, T as CreateTailorDBServiceRequestSchema, Tt as AuthIDPConfig_AuthType, U as UpdatePipelineResolverRequestSchema, Ut as FilterSchema, V as CreatePipelineResolverRequestSchema, Vt as ConditionSchema, W as UpdatePipelineServiceRequestSchema, Wt as PageDirection, X as IdPPermissionPermit, Y as IdPPermissionOperator, Z as FunctionExecution_Status, _ as userAgent, _t as UpdateAuthOAuth2ClientRequestSchema, a as fetchAll, at as CreateAuthHookRequestSchema, b as CreateWorkflowJobFunctionRequestSchema, bt as UpdateAuthServiceRequestSchema, ct as CreateAuthOAuth2ClientRequestSchema, dt as CreateAuthServiceRequestSchema, et as UpdateExecutorExecutorRequestSchema, f as initOperatorClient, ft as CreateTenantConfigRequestSchema, gt as UpdateAuthMachineUserRequestSchema, h as resolveStaticWebsiteUrls, ht as UpdateAuthIDPConfigRequestSchema, it as CreateAuthConnectionRequestSchema, j as TailorDBType_Permission_Operator, jt as AuthSCIMAttribute_Uniqueness, k as TailorDBGQLPermission_Operator, kt as AuthSCIMAttribute_Mutability, lt as CreateAuthSCIMConfigRequestSchema, m as platformBaseUrl, mt as UpdateAuthHookRequestSchema, nt as ExecutorTargetType, o as fetchMachineUserToken, ot as CreateAuthIDPConfigRequestSchema, pt as CreateUserProfileConfigRequestSchema, q as UpdateIdPServiceRequestSchema, rt as ExecutorTriggerType, s as fetchPaged, st as CreateAuthMachineUserRequestSchema, tt as ExecutorJobStatus, ut as CreateAuthSCIMResourceRequestSchema, v as OperatorService, vt as UpdateAuthSCIMConfigRequestSchema, w as WorkflowJobExecution_Status, wt as AuthHookPoint, x as CreateWorkflowRequestSchema, xt as UpdateTenantConfigRequestSchema, y as WorkspacePlatformUserRole, yt as UpdateAuthSCIMResourceRequestSchema, z as CreateSecretManagerVaultRequestSchema, zt as ApplicationSchemaUpdateAttemptStatus } from "./client-z_oHGVNy.mjs";
3
+ import { t as assertDefined } from "./assert-DBxo8jPo.mjs";
4
+ import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-CxF-Ex5d.mjs";
5
+ import { A as loadAccessToken, C as getDistDir, E as loadConfig, M as loadMachineUserName, N as loadWorkspaceId, P as readPlatformConfig, R as writePlatformConfig, S as createBundleCache, T as hashFile, a as getApplicationAuthNamespace, b as getPluginGenerationDependencies, c as HTTP_METHODS, d as buildResolverOperationHookExpr, f as assertUniqueLocalTailorDBTypeNames, g as platformBundleDefinePlugin, h as stringifyFunction, j as loadConfigPath, m as TailorDBTypeSchema, n as generatePluginFilesIfNeeded, p as assertUniqueTailorDBTypeNamesWithExternal, r as loadApplication, t as defineApplication, u as buildExecutorArgsExpr, x as hasGenerationHooks } from "./application-DqS1yBg3.mjs";
6
+ import { o as loadFilesWithIgnores, t as createExecutorService } from "./service-CCL8ruDf.mjs";
7
+ import { t as multiline } from "./multiline-sfHpTZZK.mjs";
8
+ import { t as readPackageJson } from "./package-json-8b0O9TlX.mjs";
9
+ import { n as isCLIError, t as createCLIError } from "./errors-Dtf2WPaW.mjs";
10
+ import { r as withSpan } from "./telemetry-CdqJEzkj.mjs";
12
11
  import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
13
12
  import { z } from "zod";
14
13
  import { ScalarType, create, fromJson, toJson } from "@bufbuild/protobuf";
@@ -1240,35 +1239,6 @@ async function generateUserTypes(options) {
1240
1239
  }
1241
1240
  }
1242
1241
 
1243
- //#endregion
1244
- //#region src/types/plugin-generation.ts
1245
- /**
1246
- * Derives generation-time dependency set from hook presence on a plugin.
1247
- * @param plugin - The plugin object to inspect.
1248
- * @param plugin.onTailorDBReady - Hook for TailorDB readiness.
1249
- * @param plugin.onResolverReady - Hook for resolver readiness.
1250
- * @param plugin.onExecutorReady - Hook for executor readiness.
1251
- * @returns Set of dependency kinds required by the plugin.
1252
- */
1253
- function getPluginGenerationDependencies(plugin) {
1254
- const deps = /* @__PURE__ */ new Set();
1255
- if (plugin.onTailorDBReady) deps.add("tailordb");
1256
- if (plugin.onResolverReady) deps.add("resolver");
1257
- if (plugin.onExecutorReady) deps.add("executor");
1258
- return deps;
1259
- }
1260
- /**
1261
- * Checks if a plugin has any generation-time hooks.
1262
- * @param plugin - The plugin object to inspect.
1263
- * @param plugin.onTailorDBReady - Hook for TailorDB readiness.
1264
- * @param plugin.onResolverReady - Hook for resolver readiness.
1265
- * @param plugin.onExecutorReady - Hook for executor readiness.
1266
- * @returns True if the plugin has at least one generation hook.
1267
- */
1268
- function hasGenerationHooks(plugin) {
1269
- return !!(plugin.onTailorDBReady || plugin.onResolverReady || plugin.onExecutorReady);
1270
- }
1271
-
1272
1242
  //#endregion
1273
1243
  //#region src/plugin/manager.ts
1274
1244
  /**
@@ -4920,7 +4890,7 @@ async function readConfigId(configPath) {
4920
4890
  async function assertConfigIdInCI(configPath) {
4921
4891
  const result = await readConfigId(configPath);
4922
4892
  if (result === null) return;
4923
- if (!result.id) throw new Error("tailor.config.ts is missing an 'id'. CI does not auto-generate one (each run would be treated as a separate app and break resource ownership). Run 'tailor-sdk setup github' or 'tailor-sdk apply' locally and commit the injected id.");
4893
+ if (!result.id) throw new Error("tailor.config.ts is missing an 'id'. CI does not auto-generate one (each run would be treated as a separate app and break resource ownership). Run 'tailor-sdk setup github' or 'tailor-sdk deploy' locally and commit the injected id.");
4924
4894
  if (!uuidRegex.test(result.id)) throw new Error(`'id' in ${configPath} must be a UUID. To use this config for a separate app, delete it.`);
4925
4895
  }
4926
4896
  /**
@@ -5095,8 +5065,8 @@ async function confirmImportantResourceDeletion(resources, yes) {
5095
5065
  * Accepts either:
5096
5066
  * - `undefined` — returns undefined
5097
5067
  * - a plain string (machine user name) — expands to `{ namespace, machineUserName }` using `authNamespace`
5098
- * - an object `{ namespace, machineUserName }` — returned as-is
5099
- * @param authInvoker - String machine user name or object form
5068
+ * - an internal object `{ namespace, machineUserName }` — returned as-is
5069
+ * @param authInvoker - String machine user name or internal object form
5100
5070
  * @param authNamespace - Auth service namespace (required when authInvoker is a string)
5101
5071
  * @param context - Contextual label used in error messages (e.g. `resolver "foo"`)
5102
5072
  * @returns Object form of auth invoker, or undefined
@@ -5104,7 +5074,7 @@ async function confirmImportantResourceDeletion(resources, yes) {
5104
5074
  function normalizeAuthInvoker(authInvoker, authNamespace, context) {
5105
5075
  if (authInvoker === void 0) return void 0;
5106
5076
  if (typeof authInvoker === "string") {
5107
- if (!authNamespace) throw new Error(`${context} uses a string authInvoker ("${authInvoker}"), but no Auth service is configured. Configure an Auth service or use the object form { namespace, machineUserName }.`);
5077
+ if (!authNamespace) throw new Error(`${context} uses a string authInvoker ("${authInvoker}"), but no Auth service is configured. Configure an Auth service before using authInvoker.`);
5108
5078
  return {
5109
5079
  namespace: authNamespace,
5110
5080
  machineUserName: authInvoker
@@ -5323,8 +5293,9 @@ function resolveIdpNamespace(application, executorName, idpName) {
5323
5293
  return assertDefined(application.idpServices[0], "idp service missing").name;
5324
5294
  }
5325
5295
  function resolveAuthNamespace(application) {
5326
- if (!application.authService) throw new Error("No Auth service configured");
5327
- return application.authService.config.name;
5296
+ const authNamespace = getApplicationAuthNamespace(application);
5297
+ if (!authNamespace) throw new Error("No Auth service configured");
5298
+ return authNamespace;
5328
5299
  }
5329
5300
  function protoExecutor(application, executor) {
5330
5301
  const appName = application.name;
@@ -5409,7 +5380,7 @@ function protoExecutor(application, executor) {
5409
5380
  const target = executor.operation;
5410
5381
  let targetType;
5411
5382
  let targetConfig;
5412
- const authNamespace = application.authService?.config.name;
5383
+ const authNamespace = getApplicationAuthNamespace(application);
5413
5384
  const invokerContext = `Executor "${executor.name}"`;
5414
5385
  switch (target.kind) {
5415
5386
  case "webhook":
@@ -5565,7 +5536,7 @@ async function planPipeline(context) {
5565
5536
  }
5566
5537
  const executors = forRemoval ? [] : Object.values(await application.executorService?.loadExecutors() ?? {});
5567
5538
  const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$1(client, workspaceId, application.name, application.id, pipelines);
5568
- const { changeSet: resolverChangeSet } = await planResolvers(client, workspaceId, pipelines, executors, serviceChangeSet.deletes.map((del) => del.name), application.env, application.authService?.config.name, forceApplyAll);
5539
+ const { changeSet: resolverChangeSet } = await planResolvers(client, workspaceId, pipelines, executors, serviceChangeSet.deletes.map((del) => del.name), application.env, getApplicationAuthNamespace(application), forceApplyAll);
5569
5540
  return {
5570
5541
  changeSet: {
5571
5542
  service: serviceChangeSet,
@@ -7004,7 +6975,7 @@ function createSnapshotFieldConfig(field) {
7004
6975
  }
7005
6976
  /**
7006
6977
  * Create a snapshot field config from an OperatorFieldConfig (for nested fields)
7007
- * @param {import("@/types/tailordb").OperatorFieldConfig} fieldConfig - Field configuration
6978
+ * @param {import("@/parser/service/tailordb/types").OperatorFieldConfig} fieldConfig - Field configuration
7008
6979
  * @returns {SnapshotFieldConfig} Snapshot field configuration
7009
6980
  */
7010
6981
  function createSnapshotFieldConfigFromOperatorConfig(fieldConfig) {
@@ -12116,6 +12087,16 @@ async function startWorkflowCore(options) {
12116
12087
  throw error;
12117
12088
  }
12118
12089
  }
12090
+ async function resolveApplicationAuthNamespace(options) {
12091
+ const { config } = await loadConfig(options.configPath);
12092
+ const { application } = await options.client.getApplication({
12093
+ workspaceId: options.workspaceId,
12094
+ applicationName: config.name
12095
+ });
12096
+ const authNamespace = application?.authNamespace || config.auth?.name;
12097
+ if (!authNamespace) throw new Error(`Application ${config.name} does not have an auth configuration.`);
12098
+ return authNamespace;
12099
+ }
12119
12100
  async function startWorkflowByName(options) {
12120
12101
  const machineUser = await loadMachineUserName({
12121
12102
  machineUser: options.machineUser,
@@ -12127,18 +12108,17 @@ async function startWorkflowByName(options) {
12127
12108
  workspaceId: options.workspaceId,
12128
12109
  profile: options.profile
12129
12110
  });
12130
- const { config } = await loadConfig(options.configPath);
12131
- const { application } = await client.getApplication({
12111
+ const authNamespace = await resolveApplicationAuthNamespace({
12112
+ client,
12132
12113
  workspaceId,
12133
- applicationName: config.name
12114
+ configPath: options.configPath
12134
12115
  });
12135
- if (!application?.authNamespace) throw new Error(`Application ${config.name} does not have an auth configuration.`);
12136
12116
  return await startWorkflowCore({
12137
12117
  client,
12138
12118
  workspaceId,
12139
12119
  workflowName: options.name,
12140
12120
  authInvoker: {
12141
- namespace: application.authNamespace,
12121
+ namespace: authNamespace,
12142
12122
  machineUserName: machineUser
12143
12123
  },
12144
12124
  arg: options.arg,
@@ -12147,14 +12127,24 @@ async function startWorkflowByName(options) {
12147
12127
  }
12148
12128
  async function startWorkflow(options) {
12149
12129
  if ("name" in options) return await startWorkflowByName(options);
12130
+ const client = await initOperatorClient(await loadAccessToken({ profile: options.profile }));
12131
+ const workspaceId = await loadWorkspaceId({
12132
+ workspaceId: options.workspaceId,
12133
+ profile: options.profile
12134
+ });
12135
+ const authNamespace = await resolveApplicationAuthNamespace({
12136
+ client,
12137
+ workspaceId,
12138
+ configPath: options.configPath
12139
+ });
12150
12140
  return await startWorkflowCore({
12151
- client: await initOperatorClient(await loadAccessToken({ profile: options.profile })),
12152
- workspaceId: await loadWorkspaceId({
12153
- workspaceId: options.workspaceId,
12154
- profile: options.profile
12155
- }),
12141
+ client,
12142
+ workspaceId,
12156
12143
  workflowName: options.workflow.name,
12157
- authInvoker: options.authInvoker,
12144
+ authInvoker: {
12145
+ namespace: authNamespace,
12146
+ machineUserName: options.authInvoker
12147
+ },
12158
12148
  arg: options.arg,
12159
12149
  interval: options.interval
12160
12150
  });
@@ -12167,7 +12157,6 @@ const startCommand = defineAppCommand({
12167
12157
  ...nameArgs,
12168
12158
  "machine-user": arg(z.string().optional(), {
12169
12159
  alias: "m",
12170
- hiddenAlias: "machineuser",
12171
12160
  description: "Machine user name. Falls back to the active profile's default machine user.",
12172
12161
  env: "TAILOR_PLATFORM_MACHINE_USER_NAME"
12173
12162
  }),
@@ -13042,19 +13031,6 @@ const listCommand$8 = defineAppCommand({
13042
13031
  }
13043
13032
  });
13044
13033
 
13045
- //#endregion
13046
- //#region src/cli/commands/generate/types.ts
13047
- /**
13048
- * Type guard to check if a generator has a specific dependency.
13049
- * @template D
13050
- * @param generator - Code generator instance
13051
- * @param dependency - Dependency kind to check
13052
- * @returns True if the generator has the dependency
13053
- */
13054
- function hasDependency(generator, dependency) {
13055
- return generator.dependencies.includes(dependency);
13056
- }
13057
-
13058
13034
  //#endregion
13059
13035
  //#region src/cli/commands/generate/watch/index.ts
13060
13036
  /**
@@ -13443,12 +13419,11 @@ function createDependencyWatcher(options = {}) {
13443
13419
  * @param params - Parameters for creating the generation manager
13444
13420
  * @param params.application - Application instance to generate code for
13445
13421
  * @param params.config - Loaded configuration
13446
- * @param params.generators - Code generators to run
13447
13422
  * @param params.pluginManager - Plugin manager for processing plugins
13448
13423
  * @returns GenerationManager instance
13449
13424
  */
13450
13425
  function createGenerationManager(params) {
13451
- const { application, config, generators = [], pluginManager } = params;
13426
+ const { application, config, pluginManager } = params;
13452
13427
  const baseDir = path.join(getDistDir(), "generated");
13453
13428
  fs$1.mkdirSync(baseDir, { recursive: true });
13454
13429
  const services = {
@@ -13457,11 +13432,7 @@ function createGenerationManager(params) {
13457
13432
  executor: {}
13458
13433
  };
13459
13434
  let watcher = null;
13460
- const generatorResults = {};
13461
13435
  const generationPlugins = pluginManager?.getPluginsWithGenerationHooks() ?? [];
13462
- function getReadyGenerators(dep) {
13463
- return generators.filter((g) => g.dependencies.includes(dep));
13464
- }
13465
13436
  function getAuthInput() {
13466
13437
  const authService = application.authService;
13467
13438
  if (!authService) return void 0;
@@ -13479,98 +13450,6 @@ function createGenerationManager(params) {
13479
13450
  idProvider: authConfig.idProvider
13480
13451
  };
13481
13452
  }
13482
- async function processTailorDBNamespace(gen, namespace, typeInfo) {
13483
- const results = assertDefined(generatorResults[gen.id], `generator result not initialized for ${gen.id}`);
13484
- results.tailordbResults[namespace] = {};
13485
- if (!gen.processType) return;
13486
- const processType = gen.processType;
13487
- await Promise.allSettled(Object.entries(typeInfo.types).map(async ([typeName, type]) => {
13488
- try {
13489
- assertDefined(results.tailordbResults[namespace], `tailordb results not initialized for namespace ${namespace}`)[typeName] = await processType({
13490
- type,
13491
- namespace,
13492
- source: typeInfo.sourceInfo[typeName],
13493
- plugins: typeInfo.pluginAttachments.get(typeName) ?? []
13494
- });
13495
- } catch (error) {
13496
- logger.error(`Error processing type ${styles.bold(typeName)} in ${namespace} with generator ${gen.id}`);
13497
- logger.error(String(error));
13498
- }
13499
- }));
13500
- if ("processTailorDBNamespace" in gen && typeof gen.processTailorDBNamespace === "function") try {
13501
- results.tailordbNamespaceResults[namespace] = await gen.processTailorDBNamespace({
13502
- namespace,
13503
- types: results.tailordbResults[namespace]
13504
- });
13505
- } catch (error) {
13506
- logger.error(`Error processing TailorDB namespace ${styles.bold(namespace)} with generator ${gen.id}`);
13507
- logger.error(String(error));
13508
- }
13509
- else results.tailordbNamespaceResults[namespace] = results.tailordbResults[namespace];
13510
- }
13511
- async function processResolverNamespace(gen, namespace, resolvers) {
13512
- const results = assertDefined(generatorResults[gen.id], `generator result not initialized for ${gen.id}`);
13513
- results.resolverResults[namespace] = {};
13514
- if (!gen.processResolver) return;
13515
- const processResolver = gen.processResolver;
13516
- await Promise.allSettled(Object.entries(resolvers).map(async ([resolverName, resolver]) => {
13517
- try {
13518
- assertDefined(results.resolverResults[namespace], `resolver results not initialized for namespace ${namespace}`)[resolverName] = await processResolver({
13519
- resolver,
13520
- namespace
13521
- });
13522
- } catch (error) {
13523
- logger.error(`Error processing resolver ${styles.bold(resolverName)} in ${namespace} with generator ${gen.id}`);
13524
- logger.error(String(error));
13525
- }
13526
- }));
13527
- if ("processResolverNamespace" in gen && typeof gen.processResolverNamespace === "function") try {
13528
- results.resolverNamespaceResults[namespace] = await gen.processResolverNamespace({
13529
- namespace,
13530
- resolvers: results.resolverResults[namespace]
13531
- });
13532
- } catch (error) {
13533
- logger.error(`Error processing Resolver namespace ${styles.bold(namespace)} with generator ${gen.id}`);
13534
- logger.error(String(error));
13535
- }
13536
- else results.resolverNamespaceResults[namespace] = results.resolverResults[namespace];
13537
- }
13538
- async function processExecutors(gen) {
13539
- const results = assertDefined(generatorResults[gen.id], `generator result not initialized for ${gen.id}`);
13540
- if (!gen.processExecutor) return;
13541
- const processExecutor = gen.processExecutor;
13542
- await Promise.allSettled(Object.entries(services.executor).map(async ([executorId, executor]) => {
13543
- try {
13544
- results.executorResults[executorId] = await processExecutor(executor);
13545
- } catch (error) {
13546
- logger.error(`Error processing executor ${styles.bold(executor.name)} with generator ${gen.id}`);
13547
- logger.error(String(error));
13548
- }
13549
- }));
13550
- }
13551
- async function aggregate(gen) {
13552
- const results = assertDefined(generatorResults[gen.id], `generator result not initialized for ${gen.id}`);
13553
- const tailordbResults = [];
13554
- const resolverResults = [];
13555
- for (const [namespace, types] of Object.entries(results.tailordbNamespaceResults)) tailordbResults.push({
13556
- namespace,
13557
- types
13558
- });
13559
- for (const [namespace, resolvers] of Object.entries(results.resolverNamespaceResults)) resolverResults.push({
13560
- namespace,
13561
- resolvers
13562
- });
13563
- const input = { auth: getAuthInput() };
13564
- if (hasDependency(gen, "tailordb")) input.tailordb = tailordbResults;
13565
- if (hasDependency(gen, "resolver")) input.resolver = resolverResults;
13566
- if (hasDependency(gen, "executor")) input.executor = Object.values(results.executorResults);
13567
- const result = await gen.aggregate({
13568
- input,
13569
- baseDir: path.join(baseDir, gen.id),
13570
- configPath: config.path
13571
- });
13572
- await writeGeneratedFiles(gen.id, result);
13573
- }
13574
13453
  /**
13575
13454
  * Build TailorDB namespace data array from loaded services.
13576
13455
  * @returns Array of TailorDB namespace data
@@ -13665,8 +13544,8 @@ function createGenerationManager(params) {
13665
13544
  }
13666
13545
  /**
13667
13546
  * Write generated files to disk.
13668
- * @param sourceId - Generator or plugin ID for logging
13669
- * @param result - Generator result containing files to write
13547
+ * @param sourceId - Plugin ID for logging
13548
+ * @param result - Generation result containing files to write
13670
13549
  */
13671
13550
  async function writeGeneratedFiles(sourceId, result) {
13672
13551
  await Promise.all(result.files.map(async (file) => {
@@ -13700,36 +13579,6 @@ function createGenerationManager(params) {
13700
13579
  });
13701
13580
  }));
13702
13581
  }
13703
- async function processGenerator(gen) {
13704
- generatorResults[gen.id] = {
13705
- tailordbResults: {},
13706
- resolverResults: {},
13707
- tailordbNamespaceResults: {},
13708
- resolverNamespaceResults: {},
13709
- executorResults: {}
13710
- };
13711
- if (hasDependency(gen, "tailordb")) for (const [namespace, types] of Object.entries(services.tailordb)) await processTailorDBNamespace(gen, namespace, types);
13712
- if (hasDependency(gen, "resolver")) for (const [namespace, resolvers] of Object.entries(services.resolver)) await processResolverNamespace(gen, namespace, resolvers);
13713
- if (hasDependency(gen, "executor")) await processExecutors(gen);
13714
- await aggregate(gen);
13715
- }
13716
- async function runGenerators(gens, watch) {
13717
- const results = await Promise.allSettled(gens.map(async (gen) => {
13718
- await withSpan(`generate.generator.${gen.id}`, async () => {
13719
- try {
13720
- await processGenerator(gen);
13721
- } catch (error) {
13722
- logger.error(`Error processing generator ${styles.bold(gen.id)}`);
13723
- logger.error(String(error));
13724
- if (!watch) throw error;
13725
- }
13726
- });
13727
- }));
13728
- if (!watch) {
13729
- const failures = results.filter((r) => r.status === "rejected");
13730
- if (failures.length > 0) throw new AggregateError(failures.map((f) => f.reason));
13731
- }
13732
- }
13733
13582
  async function restartWatchProcess() {
13734
13583
  logger.newline();
13735
13584
  logger.info("Restarting watch process to clear module cache...", { mode: "stream" });
@@ -13757,14 +13606,7 @@ function createGenerationManager(params) {
13757
13606
  return {
13758
13607
  application,
13759
13608
  baseDir,
13760
- generators,
13761
13609
  services,
13762
- generatorResults,
13763
- processGenerator,
13764
- processTailorDBNamespace,
13765
- processResolverNamespace,
13766
- processExecutors,
13767
- aggregate,
13768
13610
  async generate(watch) {
13769
13611
  logger.newline();
13770
13612
  logger.log(`Generation for application: ${styles.highlight(application.config.name)}`);
@@ -13809,11 +13651,9 @@ function createGenerationManager(params) {
13809
13651
  await withSpan("generate.resolveAuthNamespaces", async () => authService.resolveNamespaces());
13810
13652
  }
13811
13653
  if (app.tailorDBServices.length > 0 || pluginExecutorFiles.length > 0) logger.newline();
13812
- const readyAfterTailorDB = getReadyGenerators("tailordb");
13813
- const hasOnTailorDBReady = generationPlugins.some((p) => p.onTailorDBReady != null);
13814
- if (readyAfterTailorDB.length > 0 || hasOnTailorDBReady) {
13654
+ if (generationPlugins.some((p) => p.onTailorDBReady != null)) {
13815
13655
  await withSpan("generate.onTailorDBReady", async () => {
13816
- await Promise.all([runGenerators(readyAfterTailorDB, watch), runPluginHook("onTailorDBReady", watch)]);
13656
+ await runPluginHook("onTailorDBReady", watch);
13817
13657
  });
13818
13658
  logger.newline();
13819
13659
  }
@@ -13836,11 +13676,9 @@ function createGenerationManager(params) {
13836
13676
  });
13837
13677
  }
13838
13678
  });
13839
- const readyAfterResolvers = getReadyGenerators("resolver");
13840
- const hasOnResolverReady = generationPlugins.some((p) => p.onResolverReady != null);
13841
- if (readyAfterResolvers.length > 0 || hasOnResolverReady) {
13679
+ if (generationPlugins.some((p) => p.onResolverReady != null)) {
13842
13680
  await withSpan("generate.onResolversReady", async () => {
13843
- await Promise.all([runGenerators(readyAfterResolvers, watch), runPluginHook("onResolverReady", watch)]);
13681
+ await runPluginHook("onResolverReady", watch);
13844
13682
  });
13845
13683
  logger.newline();
13846
13684
  }
@@ -13854,11 +13692,9 @@ function createGenerationManager(params) {
13854
13692
  services.executor[key] = executor;
13855
13693
  });
13856
13694
  });
13857
- const readyAfterExecutors = getReadyGenerators("executor");
13858
- const hasOnExecutorReady = generationPlugins.some((p) => p.onExecutorReady != null);
13859
- if (readyAfterExecutors.length > 0 || hasOnExecutorReady) {
13695
+ if (generationPlugins.some((p) => p.onExecutorReady != null)) {
13860
13696
  await withSpan("generate.onExecutorsReady", async () => {
13861
- await Promise.all([runGenerators(readyAfterExecutors, watch), runPluginHook("onExecutorReady", watch)]);
13697
+ await runPluginHook("onExecutorReady", watch);
13862
13698
  });
13863
13699
  logger.newline();
13864
13700
  }
@@ -13883,18 +13719,17 @@ function createGenerationManager(params) {
13883
13719
  };
13884
13720
  }
13885
13721
  /**
13886
- * Run code generation using the Tailor configuration and generators.
13722
+ * Run code generation using the Tailor configuration.
13887
13723
  * @param options - Generation options
13888
13724
  * @returns Promise that resolves when generation (and watch, if enabled) completes
13889
13725
  */
13890
13726
  async function generate$1(options) {
13891
13727
  return withSpan("generate", async (rootSpan) => {
13892
- const { config, generators, plugins } = await withSpan("generate.loadConfig", async () => {
13728
+ const { config, plugins } = await withSpan("generate.loadConfig", async () => {
13893
13729
  return loadConfig(options?.configPath);
13894
13730
  });
13895
13731
  const watch = options?.watch ?? false;
13896
13732
  rootSpan.setAttribute("generate.watch", watch);
13897
- rootSpan.setAttribute("generate.generators.count", generators.length);
13898
13733
  await withSpan("generate.generateUserTypes", async () => generateUserTypes({
13899
13734
  config,
13900
13735
  configPath: config.path
@@ -13909,7 +13744,6 @@ async function generate$1(options) {
13909
13744
  const manager = createGenerationManager({
13910
13745
  application,
13911
13746
  config,
13912
- generators,
13913
13747
  pluginManager
13914
13748
  });
13915
13749
  await manager.generate(watch);
@@ -15535,7 +15369,7 @@ async function generate(options) {
15535
15369
  if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
15536
15370
  let pluginManager;
15537
15371
  if (plugins.length > 0) pluginManager = new PluginManager(plugins);
15538
- const { defineApplication } = await import("./application-nTydHJm8.mjs");
15372
+ const { defineApplication } = await import("./application-DB2r36Et.mjs");
15539
15373
  const application = defineApplication({
15540
15374
  config,
15541
15375
  pluginManager
@@ -16240,7 +16074,7 @@ const createCommand = defineAppCommand({
16240
16074
  alias: "p",
16241
16075
  description: "Profile name to create"
16242
16076
  }),
16243
- "profile-user": arg(z.string().optional(), { description: "User email for the profile (defaults to current user)" }),
16077
+ "profile-user": arg(z.string().optional(), { description: "User email address or machine user client ID for the profile (defaults to current user)" }),
16244
16078
  permission: arg(z.enum(["write", "read"]).default("write"), { description: "Profile permission (requires --profile-name). 'read' blocks all write commands while the profile is active." })
16245
16079
  }).strict(),
16246
16080
  run: async (args) => {
@@ -17361,7 +17195,7 @@ async function runRepl(options) {
17361
17195
  const execute = await prepareQueryExecutor(options);
17362
17196
  const historyPath = getReplHistoryPath(options.engine, options.profile, options.workspaceId);
17363
17197
  const validate = createReplValidator(options.engine);
17364
- const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-CJG3sz7A.mjs");
17198
+ const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-DmGr9zMw.mjs");
17365
17199
  const highlight = options.engine === "sql" ? highlightSqlLine : highlightGraphqlLine;
17366
17200
  const prompt = createPrompt({
17367
17201
  prefix: "",
@@ -17529,7 +17363,6 @@ const queryCommand = defineAppCommand({
17529
17363
  edit: arg(z.boolean().default(false), { description: "Open a temporary file in your editor; omit to start REPL mode" }),
17530
17364
  "machine-user": arg(z.string().optional(), {
17531
17365
  alias: "m",
17532
- hiddenAlias: "machineuser",
17533
17366
  description: "Machine user name for query execution. Falls back to the active profile's default machine user.",
17534
17367
  env: "TAILOR_PLATFORM_MACHINE_USER_NAME"
17535
17368
  }),
@@ -17696,4 +17529,4 @@ function isDeno() {
17696
17529
 
17697
17530
  //#endregion
17698
17531
  export { listCommand$5 as $, INITIAL_SCHEMA_NUMBER as $t, truncate as A, commonArgs as An, startCommand as At, logBetaWarning as B, getExecutor as Bt, listCommand$2 as C, PluginManager as Cn, triggerExecutor as Ct, resumeWorkflow as D, apiCall as Dn, jobsCommand as Dt, resumeCommand as E, apiCommand as En, getExecutorJob as Et, writeDbTypesFile as F, pagedLogArgs as Fn, getWorkflowExecution as Ft, organizationTree as G, MIGRATION_LABEL_KEY as Gt, removeCommand$1 as H, executeScript as Ht, getConfiguredEditorCommand as I, paginationArgs as In, listWorkflowExecutions as It, listOrganizations as J, compareSnapshotWithRemote as Jt, treeCommand as K, handleOptionalToRequiredError as Kt, openInConfiguredEditor as L, toPageDirection as Ln, functionExecutionStatusToString as Lt, generate as M, confirmationArgs as Mn, getCommand$5 as Mt, generateCommand as N, deploymentArgs as Nn, getWorkflow as Nt, listCommand$3 as O, assertWritable as On, listExecutorJobs as Ot, generateMigrationScript as P, isVerbose as Pn, executionsCommand as Pt, updateFolder as Q, DIFF_FILE_NAME as Qt, show as R, workspaceArgs as Rn, formatKeyValueTable as Rt, listApps as S, sdkNameLabelKey as Sn, triggerCommand as St, healthCommand as T, prompt as Tn, listExecutors as Tt, updateCommand$1 as U, waitForExecution$1 as Ut, remove as V, deploy as Vt, updateOrganization as W, bundleMigrationScript as Wt, getOrganization as X, protoGqlPermission as Xt, getCommand$1 as Y, generateAllTypeManifestsFromSnapshot as Yt, updateCommand$2 as Z, DB_TYPES_FILE_NAME as Zt, getWorkspace as _, formatMigrationDiff as _n, listFunctionRegistries as _t, updateUser as a, createSnapshotFromLocalTypes as an, createCommand$1 as at, createCommand as b, ensureConfigId as bn, listWebhookExecutors as bt, listCommand as c, getMigrationFilePath as cn, listOAuth2Clients as ct, inviteUser as d, isValidMigrationNumber as dn, getMachineUserToken as dt, MIGRATE_FILE_NAME as en, listFolders as et, restoreCommand as f, loadDiff as fn, tokenCommand as ft, getCommand as g, formatDiffSummary as gn, listCommand$8 as gt, listWorkspaces as h, parseMigrationNumberArg as hn, generate$1 as ht, updateCommand as i, compareSnapshots as in, deleteFolder as it, truncateCommand as j, configArg as jn, startWorkflow as jt, listWorkflows as k, defineAppCommand as kn, watchExecutorJob as kt, listUsers as l, getMigrationFiles as ln, getCommand$3 as lt, listCommand$1 as m, formatMigrationNumber as mn, listMachineUsers as mt, query as n, assertValidMigrationFiles as nn, getFolder as nt, removeCommand as o, getLatestMigrationNumber as on, createFolder as ot, restoreWorkspace as p, reconstructSnapshotFromMigrations as pn, listCommand$7 as pt, listCommand$4 as q, parseMigrationLabelNumber as qt, queryCommand as r, compareLocalTypesWithSnapshot as rn, deleteCommand$1 as rt, removeUser as s, getMigrationDirPath as sn, listCommand$6 as st, isNativeTypeScriptRuntime as t, SCHEMA_FILE_NAME as tn, getCommand$2 as tt, inviteCommand as u, getNextMigrationNumber as un, getOAuth2Client as ut, deleteCommand as v, hasChanges as vn, getCommand$4 as vt, getAppHealth as w, generateUserTypes as wn, listCommand$9 as wt, createWorkspace as x, resourceTrn as xn, webhookCommand as xt, deleteWorkspace as y, getNamespacesWithMigrations as yn, getFunctionRegistry as yt, showCommand as z, getCommand$6 as zt };
17699
- //# sourceMappingURL=runtime-2nzOZCUb.mjs.map
17532
+ //# sourceMappingURL=runtime-n9NCkjee.mjs.map