@flowrunner/cli 0.1.19-dev.1 → 0.1.19-dev.2

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 (316) hide show
  1. package/ai-docs/instructions/service-code-format/01-service-structure.md +1 -1
  2. package/ai-docs/instructions/service-code-format/05-dictionaries.md +1 -1
  3. package/ai-docs/instructions/service-code-format/11-output-model.md +2 -5
  4. package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +2 -3
  5. package/ai-docs/instructions/service-code-format/README.md +2 -2
  6. package/dist/cli.js +335 -926
  7. package/dist/cli.js.map +4 -4
  8. package/dist/index.js +368 -956
  9. package/dist/index.js.map +4 -4
  10. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/context/execution-context.d.ts +2 -2
  11. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/extension.d.ts +3 -3
  12. package/dist/types/flow-extension-runner/src/global.d.ts +6 -18
  13. package/dist/types/flow-extension-runner/src/index.d.ts +39 -13
  14. package/dist/types/flow-extension-runner/src/{v2/model → model}/field-mapper.d.ts +1 -1
  15. package/dist/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  16. package/dist/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  17. package/dist/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  18. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  19. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  20. package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  21. package/dist/types/flow-extension-runner/src/{v2/params → params}/types.d.ts +1 -1
  22. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/registry.d.ts +2 -0
  23. package/dist/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  24. package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +2 -4
  25. package/dist/types/shared/src/constants/activity-log.d.ts +248 -2
  26. package/dist/types/shared/src/constants/error-codes.d.ts +6 -0
  27. package/dist/types/shared/src/constants/index.d.ts +1 -0
  28. package/dist/types/shared/src/constants/notification-types.d.ts +309 -0
  29. package/dist/types/shared/src/constants/panic-mode.d.ts +17 -0
  30. package/dist/types/shared/src/constants/shared-extensions.d.ts +10 -0
  31. package/dist/types/shared/src/errors/index.d.ts +1 -0
  32. package/dist/types/shared/src/errors/secrets.d.ts +16 -0
  33. package/dist/types/shared/src/scheme/access-keys/dto.d.ts +35 -13
  34. package/dist/types/shared/src/scheme/api-keys/dto.d.ts +29 -4
  35. package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -16
  36. package/dist/types/shared/src/scheme/flowrunner/index.d.ts +1 -0
  37. package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +26 -0
  38. package/dist/types/shared/src/scheme/flowrunner/workspace-dashboard.dto.d.ts +207 -0
  39. package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +22 -0
  40. package/dist/types/shared/src/scheme/notifications/dto.d.ts +10 -0
  41. package/dist/types/shared/src/scheme/notifications/rest.d.ts +20 -0
  42. package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +153 -29
  43. package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +0 -4
  44. package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -24
  45. package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -18
  46. package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -3
  47. package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +1 -0
  48. package/dist/types/shared/src/scheme/shared-extensions/list.d.ts +0 -28
  49. package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -1
  50. package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -12
  51. package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +0 -8
  52. package/dist/types/shared/src/scheme/shared-extensions/usage-stats.d.ts +189 -0
  53. package/package.json +1 -4
  54. package/project-files/sandbox/files-mock.js +3 -5
  55. package/project-files/sandbox/service.js +10 -11
  56. package/runtime/index.js +178 -863
  57. package/runtime/index.js.map +4 -4
  58. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/context/execution-context.d.ts +2 -2
  59. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/extension.d.ts +3 -3
  60. package/runtime/types/flow-extension-runner/src/global.d.ts +6 -18
  61. package/runtime/types/flow-extension-runner/src/index.d.ts +39 -13
  62. package/runtime/types/flow-extension-runner/src/{v2/model → model}/field-mapper.d.ts +1 -1
  63. package/runtime/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  64. package/runtime/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  65. package/runtime/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  66. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  67. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  68. package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  69. package/runtime/types/flow-extension-runner/src/{v2/params → params}/types.d.ts +1 -1
  70. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/registry.d.ts +2 -0
  71. package/runtime/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  72. package/runtime/types/packages/cli/src/runtime/index.d.ts +6 -5
  73. package/dist/types/flow-extension-runner/src/common/config.d.ts +0 -12
  74. package/dist/types/flow-extension-runner/src/common/context.d.ts +0 -6
  75. package/dist/types/flow-extension-runner/src/common/types.d.ts +0 -11
  76. package/dist/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  77. package/dist/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  78. package/dist/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  79. package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  80. package/dist/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  81. package/dist/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  82. package/dist/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  83. package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  84. package/dist/types/jsdoc-parser/src/index.d.ts +0 -2
  85. package/dist/types/jsdoc-parser/src/lib.d.ts +0 -42
  86. package/dist/types/jsdoc-parser/src/types.d.ts +0 -2
  87. package/runtime/types/flow-extension-runner/src/common/config.d.ts +0 -12
  88. package/runtime/types/flow-extension-runner/src/common/context.d.ts +0 -6
  89. package/runtime/types/flow-extension-runner/src/common/types.d.ts +0 -11
  90. package/runtime/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  91. package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  92. package/runtime/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  93. package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  94. package/runtime/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  95. package/runtime/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  96. package/runtime/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  97. package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  98. package/runtime/types/jsdoc-parser/src/index.d.ts +0 -2
  99. package/runtime/types/jsdoc-parser/src/lib.d.ts +0 -42
  100. package/runtime/types/jsdoc-parser/src/types.d.ts +0 -2
  101. package/runtime/types/shared/src/constants/activity-log.d.ts +0 -1573
  102. package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +0 -20
  103. package/runtime/types/shared/src/constants/ai.d.ts +0 -11
  104. package/runtime/types/shared/src/constants/api-keys.d.ts +0 -1
  105. package/runtime/types/shared/src/constants/app.d.ts +0 -57
  106. package/runtime/types/shared/src/constants/billing.d.ts +0 -16
  107. package/runtime/types/shared/src/constants/compliances.d.ts +0 -3
  108. package/runtime/types/shared/src/constants/data-types.d.ts +0 -26
  109. package/runtime/types/shared/src/constants/docs.d.ts +0 -6
  110. package/runtime/types/shared/src/constants/error-codes.d.ts +0 -20
  111. package/runtime/types/shared/src/constants/flow.d.ts +0 -12
  112. package/runtime/types/shared/src/constants/index.d.ts +0 -18
  113. package/runtime/types/shared/src/constants/knowledge-base.d.ts +0 -15
  114. package/runtime/types/shared/src/constants/notification-types.d.ts +0 -1234
  115. package/runtime/types/shared/src/constants/notifications.d.ts +0 -10
  116. package/runtime/types/shared/src/constants/oauth-connection-error.d.ts +0 -3
  117. package/runtime/types/shared/src/constants/patterns.d.ts +0 -28
  118. package/runtime/types/shared/src/constants/retry-policy.d.ts +0 -30
  119. package/runtime/types/shared/src/constants/severity.d.ts +0 -9
  120. package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +0 -6
  121. package/runtime/types/shared/src/constants/shared-extensions.d.ts +0 -56
  122. package/runtime/types/shared/src/constants/zod.d.ts +0 -2
  123. package/runtime/types/shared/src/errors/api.d.ts +0 -15
  124. package/runtime/types/shared/src/errors/base.d.ts +0 -38
  125. package/runtime/types/shared/src/errors/common.d.ts +0 -39
  126. package/runtime/types/shared/src/errors/index.d.ts +0 -14
  127. package/runtime/types/shared/src/errors/k8s.d.ts +0 -14
  128. package/runtime/types/shared/src/errors/message.d.ts +0 -48
  129. package/runtime/types/shared/src/errors/oauth-connection.d.ts +0 -4
  130. package/runtime/types/shared/src/errors/open-search.d.ts +0 -4
  131. package/runtime/types/shared/src/errors/s3.d.ts +0 -11
  132. package/runtime/types/shared/src/extensions/zod.d.ts +0 -25
  133. package/runtime/types/shared/src/scheme/access-keys/dto.d.ts +0 -101
  134. package/runtime/types/shared/src/scheme/access-keys/index.d.ts +0 -2
  135. package/runtime/types/shared/src/scheme/account/dto.d.ts +0 -63
  136. package/runtime/types/shared/src/scheme/account/index.d.ts +0 -1
  137. package/runtime/types/shared/src/scheme/activity-log-base.d.ts +0 -35
  138. package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +0 -69
  139. package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +0 -2
  140. package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +0 -7
  141. package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +0 -23
  142. package/runtime/types/shared/src/scheme/ai-router/index.d.ts +0 -2
  143. package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +0 -28
  144. package/runtime/types/shared/src/scheme/api-keys/index.d.ts +0 -2
  145. package/runtime/types/shared/src/scheme/app/index.d.ts +0 -1
  146. package/runtime/types/shared/src/scheme/app/java.dto.d.ts +0 -6
  147. package/runtime/types/shared/src/scheme/billing/index.d.ts +0 -1
  148. package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +0 -181
  149. package/runtime/types/shared/src/scheme/crm/billing.d.ts +0 -149
  150. package/runtime/types/shared/src/scheme/crm/dto.d.ts +0 -218
  151. package/runtime/types/shared/src/scheme/crm/index.d.ts +0 -3
  152. package/runtime/types/shared/src/scheme/data-types/index.d.ts +0 -1
  153. package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +0 -22
  154. package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +0 -30
  155. package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +0 -2
  156. package/runtime/types/shared/src/scheme/extensions/index.d.ts +0 -1
  157. package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +0 -14
  158. package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -383
  159. package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +0 -3
  160. package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +0 -655
  161. package/runtime/types/shared/src/scheme/index.d.ts +0 -21
  162. package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +0 -135
  163. package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +0 -2
  164. package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +0 -776
  165. package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +0 -2
  166. package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +0 -9
  167. package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +0 -2
  168. package/runtime/types/shared/src/scheme/notifications/dto.d.ts +0 -118
  169. package/runtime/types/shared/src/scheme/notifications/index.d.ts +0 -3
  170. package/runtime/types/shared/src/scheme/notifications/rest.d.ts +0 -162
  171. package/runtime/types/shared/src/scheme/onboarding/dto.d.ts +0 -29
  172. package/runtime/types/shared/src/scheme/onboarding/index.d.ts +0 -1
  173. package/runtime/types/shared/src/scheme/properties/account.d.ts +0 -3
  174. package/runtime/types/shared/src/scheme/properties/app.d.ts +0 -5
  175. package/runtime/types/shared/src/scheme/properties/billing.d.ts +0 -12
  176. package/runtime/types/shared/src/scheme/properties/common.d.ts +0 -2
  177. package/runtime/types/shared/src/scheme/properties/db.d.ts +0 -8
  178. package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +0 -7
  179. package/runtime/types/shared/src/scheme/properties/index.d.ts +0 -7
  180. package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +0 -278
  181. package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +0 -2
  182. package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +0 -62
  183. package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +0 -96
  184. package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -631
  185. package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -411
  186. package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -64
  187. package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +0 -17
  188. package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +0 -38
  189. package/runtime/types/shared/src/scheme/shared-extensions/list.d.ts +0 -250
  190. package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +0 -21
  191. package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -112
  192. package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +0 -48
  193. package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +0 -11
  194. package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -373
  195. package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +0 -9
  196. package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +0 -189
  197. package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +0 -10
  198. package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +0 -16
  199. package/runtime/types/shared/src/scheme/shared-extensions/workspace-stack.d.ts +0 -44
  200. package/runtime/types/shared/src/scheme/workspace/dto.d.ts +0 -40
  201. package/runtime/types/shared/src/scheme/workspace/index.d.ts +0 -1
  202. package/runtime/types/shared/src/utils/object.d.ts +0 -8
  203. package/runtime/types/shared/src/utils/uuid.d.ts +0 -5
  204. package/runtime/types/shared/src/utils/versions.d.ts +0 -4
  205. package/dist/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  206. package/dist/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  207. package/dist/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  208. package/dist/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  209. package/dist/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  210. package/dist/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  211. package/dist/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  212. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  213. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  214. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  215. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  216. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  217. package/dist/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  218. package/dist/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  219. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  220. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  221. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  222. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  223. package/dist/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  224. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/files-options.d.ts +4 -4
  225. /package/dist/types/flow-extension-runner/src/{v2/params → params}/index.d.ts +0 -0
  226. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  227. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  228. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  229. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +0 -0
  230. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  231. /package/dist/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  232. /package/dist/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  233. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  234. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  235. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  236. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/date-format.d.ts +0 -0
  237. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  238. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/defaults.d.ts +0 -0
  239. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  240. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/field-plan.d.ts +0 -0
  241. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +0 -0
  242. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  243. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/notices.d.ts +0 -0
  244. /package/dist/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  245. /package/dist/types/flow-extension-runner/src/{v2/params → params}/zod.d.ts +0 -0
  246. /package/dist/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  247. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  248. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  249. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  250. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  251. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  252. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  253. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  254. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  255. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  256. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  257. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  258. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  259. /package/dist/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  260. /package/dist/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
  261. /package/runtime/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  262. /package/runtime/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  263. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  264. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  265. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  266. /package/runtime/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  267. /package/runtime/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  268. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  269. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  270. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  271. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  272. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  273. /package/runtime/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  274. /package/runtime/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  275. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  276. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  277. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  278. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  279. /package/runtime/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  280. /package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/files-options.d.ts +0 -0
  281. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/index.d.ts +0 -0
  282. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  283. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  284. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  285. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +0 -0
  286. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  287. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  288. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  289. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  290. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  291. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  292. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/date-format.d.ts +0 -0
  293. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  294. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/defaults.d.ts +0 -0
  295. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  296. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/field-plan.d.ts +0 -0
  297. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +0 -0
  298. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  299. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/notices.d.ts +0 -0
  300. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  301. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/zod.d.ts +0 -0
  302. /package/runtime/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  303. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  304. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  305. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  306. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  307. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  308. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  309. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  310. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  311. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  312. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  313. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  314. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  315. /package/runtime/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  316. /package/runtime/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
package/runtime/index.js CHANGED
@@ -8881,11 +8881,11 @@ var require_mime_types = __commonJS({
8881
8881
  }
8882
8882
  return exts[0];
8883
8883
  }
8884
- function lookup(path2) {
8885
- if (!path2 || typeof path2 !== "string") {
8884
+ function lookup(path) {
8885
+ if (!path || typeof path !== "string") {
8886
8886
  return false;
8887
8887
  }
8888
- var extension2 = extname("x." + path2).toLowerCase().substr(1);
8888
+ var extension2 = extname("x." + path).toLowerCase().substr(1);
8889
8889
  if (!extension2) {
8890
8890
  return false;
8891
8891
  }
@@ -10048,11 +10048,11 @@ var require_form_data = __commonJS({
10048
10048
  "use strict";
10049
10049
  var CombinedStream = require_combined_stream();
10050
10050
  var util = require("util");
10051
- var path2 = require("path");
10051
+ var path = require("path");
10052
10052
  var http = require("http");
10053
10053
  var https = require("https");
10054
10054
  var parseUrl = require("url").parse;
10055
- var fs2 = require("fs");
10055
+ var fs = require("fs");
10056
10056
  var crypto3 = require("crypto");
10057
10057
  var mime = require_mime_types();
10058
10058
  var asynckit = require_asynckit();
@@ -10122,7 +10122,7 @@ var require_form_data = __commonJS({
10122
10122
  if (value.end != null && value.end !== Infinity && value.start != null) {
10123
10123
  callback(null, value.end + 1 - (value.start ? value.start : 0));
10124
10124
  } else {
10125
- fs2.stat(value.path, function(err, stat) {
10125
+ fs.stat(value.path, function(err, stat) {
10126
10126
  var fileSize;
10127
10127
  if (err) {
10128
10128
  callback(err);
@@ -10180,11 +10180,11 @@ var require_form_data = __commonJS({
10180
10180
  FormData2.prototype._getContentDisposition = function(value, options) {
10181
10181
  var filename, contentDisposition;
10182
10182
  if (typeof options.filepath === "string") {
10183
- filename = path2.normalize(options.filepath).replace(/\\/g, "/");
10183
+ filename = path.normalize(options.filepath).replace(/\\/g, "/");
10184
10184
  } else if (options.filename || value && (value.name || value.path)) {
10185
- filename = path2.basename(options.filename || value && (value.name || value.path));
10185
+ filename = path.basename(options.filename || value && (value.name || value.path));
10186
10186
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10187
- filename = path2.basename(value.client._httpMessage.path || "");
10187
+ filename = path.basename(value.client._httpMessage.path || "");
10188
10188
  }
10189
10189
  if (filename) {
10190
10190
  contentDisposition = 'filename="' + escapeHeaderParam(filename) + '"';
@@ -10435,15 +10435,15 @@ var require_utils = __commonJS({
10435
10435
  }
10436
10436
  return uriComponent;
10437
10437
  }
10438
- function encodePath(path2) {
10439
- return path2.split("/").map(ensureComponentEncoding).join("/");
10438
+ function encodePath(path) {
10439
+ return path.split("/").map(ensureComponentEncoding).join("/");
10440
10440
  }
10441
- function ensureEncoding(path2) {
10441
+ function ensureEncoding(path) {
10442
10442
  try {
10443
- var url = new URL(path2);
10444
- return url.origin + encodePath(normalizeTrailingSlashInPath(path2, url)) + url.search;
10443
+ var url = new URL(path);
10444
+ return url.origin + encodePath(normalizeTrailingSlashInPath(path, url)) + url.search;
10445
10445
  } catch (_unused) {
10446
- return encodePath(path2);
10446
+ return encodePath(path);
10447
10447
  }
10448
10448
  }
10449
10449
  function normalizeTrailingSlashInPath(originPath, _ref) {
@@ -10798,15 +10798,15 @@ var require_client_node = __commonJS({
10798
10798
  exports2.sendNodeAPIRequest = sendNodeAPIRequest;
10799
10799
  var _utils = require_utils();
10800
10800
  var _error = require_error();
10801
- function sendNodeAPIRequest(path2, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10801
+ function sendNodeAPIRequest(path, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10802
10802
  return new Promise(function(resolve, reject) {
10803
- var u = require("url").parse(path2);
10803
+ var u = require("url").parse(path);
10804
10804
  var form = (0, _utils.isFormData)(body) && body;
10805
10805
  var https = u.protocol === "https:";
10806
10806
  var options = {
10807
10807
  host: u.hostname,
10808
10808
  port: u.port || (https ? 443 : 80),
10809
- path: (0, _utils.normalizeTrailingSlashInPath)(path2, u) + (u.search || ""),
10809
+ path: (0, _utils.normalizeTrailingSlashInPath)(path, u) + (u.search || ""),
10810
10810
  method,
10811
10811
  headers,
10812
10812
  timeout
@@ -11214,12 +11214,12 @@ var require_request = __commonJS({
11214
11214
  var Request = exports2.Request = /* @__PURE__ */ (function(_EventEmitter) {
11215
11215
  _inherits(Request2, _EventEmitter);
11216
11216
  var _super = _createSuper(Request2);
11217
- function Request2(path2, method, body) {
11217
+ function Request2(path, method, body) {
11218
11218
  var _this;
11219
11219
  _classCallCheck(this, Request2);
11220
11220
  _this = _super.call(this);
11221
11221
  _this.method = method;
11222
- _this.path = (0, _utils.ensureEncoding)(path2);
11222
+ _this.path = (0, _utils.ensureEncoding)(path);
11223
11223
  _this.body = body;
11224
11224
  _this.unwrap = true;
11225
11225
  _this.raw = false;
@@ -11448,10 +11448,10 @@ var require_request = __commonJS({
11448
11448
  value: function send(body) {
11449
11449
  var _this2 = this;
11450
11450
  this.emit(REQUEST_EVENT, this);
11451
- var path2 = this.path;
11451
+ var path = this.path;
11452
11452
  var queryString = qs.stringify(this.queryParams);
11453
11453
  if (queryString) {
11454
- path2 += "?" + queryString;
11454
+ path += "?" + queryString;
11455
11455
  }
11456
11456
  if (!(0, _utils.isFormData)(body) && (0, _utils.isWebFormData)(body)) {
11457
11457
  body = toRequestFormData(body);
@@ -11468,11 +11468,11 @@ var require_request = __commonJS({
11468
11468
  return _this2.unwrap ? res.body : res;
11469
11469
  };
11470
11470
  if (Request2.verbose) {
11471
- console.log(this.method.toUpperCase(), decodeURIComponent(path2), body, this.headers);
11471
+ console.log(this.method.toUpperCase(), decodeURIComponent(path), body, this.headers);
11472
11472
  }
11473
11473
  var withCredentials = typeof this.withCredentials === "boolean" ? this.withCredentials : Request2.withCredentials;
11474
11474
  var syncError = new Error();
11475
- var request = Request2.send(path2, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials, this.tlsOptions).then(function(res) {
11475
+ var request = Request2.send(path, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials, this.tlsOptions).then(function(res) {
11476
11476
  return parseBody(res, _this2.raw);
11477
11477
  }).then(function(res) {
11478
11478
  return ensureRawBody(res, _this2.raw);
@@ -11581,14 +11581,14 @@ var require_client_browser = __commonJS({
11581
11581
  });
11582
11582
  exports2.sendXmlHttpRequest = sendXmlHttpRequest;
11583
11583
  var _request2 = require_request();
11584
- function sendXmlHttpRequest(path2, method, headers, body, encoding, timeout, withCredentials) {
11584
+ function sendXmlHttpRequest(path, method, headers, body, encoding, timeout, withCredentials) {
11585
11585
  return new Promise(function sendRequest(resolve, reject) {
11586
11586
  var request = new _request2.Request.XMLHttpRequest();
11587
11587
  request.timeout = timeout;
11588
11588
  if (!encoding) {
11589
11589
  request.responseType = "arraybuffer";
11590
11590
  }
11591
- request.open(method.toUpperCase(), path2, true);
11591
+ request.open(method.toUpperCase(), path, true);
11592
11592
  if (typeof withCredentials === "boolean") {
11593
11593
  request.withCredentials = withCredentials;
11594
11594
  }
@@ -11661,16 +11661,16 @@ var require_lib = __commonJS({
11661
11661
  }
11662
11662
  });
11663
11663
  _request.Request.XMLHttpRequest = typeof XMLHttpRequest !== "undefined" ? XMLHttpRequest : void 0;
11664
- _request.Request.send = function(path2, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11664
+ _request.Request.send = function(path, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11665
11665
  var sender = typeof _request.Request.XMLHttpRequest !== "undefined" ? _clientBrowser.sendXmlHttpRequest : _clientNode.sendNodeAPIRequest;
11666
- return sender(path2, method, headers, body, encoding, timeout, withCredentials, tlsOptions);
11666
+ return sender(path, method, headers, body, encoding, timeout, withCredentials, tlsOptions);
11667
11667
  };
11668
11668
  _request.Request.verbose = false;
11669
11669
  _request.Request.withCredentials = false;
11670
11670
  _request.Request.methods = ["get", "post", "put", "patch", "delete", "head", "options"];
11671
11671
  _request.Request.methods.forEach(function(method) {
11672
- _request.Request[method] = function(path2, body) {
11673
- return new _request.Request(path2, method, body);
11672
+ _request.Request[method] = function(path, body) {
11673
+ return new _request.Request(path, method, body);
11674
11674
  };
11675
11675
  });
11676
11676
  exports2 = module2.exports = _request.Request;
@@ -11681,12 +11681,11 @@ var require_lib = __commonJS({
11681
11681
  // src/runtime/index.ts
11682
11682
  var index_exports = {};
11683
11683
  __export(index_exports, {
11684
- buildServiceDefinition: () => buildServiceDefinition2,
11684
+ buildServiceDefinition: () => buildServiceDefinition,
11685
11685
  detectVersion: () => detectVersion,
11686
- getServiceConfigs: () => getServiceConfigs3,
11687
- parseJsDocToServiceJson: () => parseJsDocToServiceJson,
11686
+ getServiceConfigs: () => getServiceConfigs,
11688
11687
  resetRegistry: () => resetRegistry,
11689
- runServiceMethod: () => runServiceMethod3
11688
+ runServiceMethod: () => runServiceMethod
11690
11689
  });
11691
11690
  module.exports = __toCommonJS(index_exports);
11692
11691
 
@@ -11733,9 +11732,9 @@ var FlowExtensionErrorCodes = {
11733
11732
  DUPLICATE_ITEM_ID: "FR_EXT_DUPLICATE_ITEM_ID",
11734
11733
  // No v2 extension registered for the given serviceId after requiring the module.
11735
11734
  EXTENSION_NOT_REGISTERED: "FR_EXT_NOT_REGISTERED",
11736
- // A declared config value is missing or the wrong shape (see v2/schema/normalize).
11735
+ // A declared config value is missing or the wrong shape (see params/schema/normalize).
11737
11736
  INVALID_CONFIG: "FR_EXT_INVALID_CONFIG",
11738
- // A schema slot that must be a z.object was declared as something else (see v2/schema/assert-object-schema).
11737
+ // A schema slot that must be a z.object was declared as something else (see params/schema/assert-object-schema).
11739
11738
  INVALID_SCHEMA: "FR_EXT_INVALID_SCHEMA",
11740
11739
  // A polling trigger declared zero or multiple mechanisms, or is missing its fetch.
11741
11740
  INVALID_TRIGGER_CONFIG: "FR_EXT_INVALID_TRIGGER_CONFIG",
@@ -11830,7 +11829,7 @@ var InvalidConfigError = class extends FlowExtensionError {
11830
11829
  };
11831
11830
  var InvalidSchemaError = class extends FlowExtensionError {
11832
11831
  // `message` is composed by the guard, which knows how to describe what was received and what to do
11833
- // about it (see v2/schema/assert-object-schema.ts).
11832
+ // about it (see params/schema/assert-object-schema.ts).
11834
11833
  constructor(message, details) {
11835
11834
  super(FlowExtensionErrorCodes.INVALID_SCHEMA, 400, message, details);
11836
11835
  }
@@ -11882,12 +11881,12 @@ var InvalidDictionaryOutputScheme = class extends FlowExtensionError {
11882
11881
  }
11883
11882
  };
11884
11883
 
11885
- // ../../flow-extension-runner/src/v2/loaders/loader-owner.ts
11884
+ // ../../flow-extension-runner/src/loaders/loader-owner.ts
11886
11885
  var sampleResultLoaderName = (ownerId) => `${ownerId}_SampleResultLoader`;
11887
11886
  var dynamicParamsLoaderName = (ownerId) => `${ownerId}_DynamicParams`;
11888
11887
  var dynamicPropsLoaderName = (ownerId, field) => `${ownerId}_${field}_DynamicProps`;
11889
11888
 
11890
- // ../../flow-extension-runner/src/v2/params/schema/assert-object-schema.ts
11889
+ // ../../flow-extension-runner/src/params/schema/assert-object-schema.ts
11891
11890
  var WRAPPERS = /* @__PURE__ */ new Set(["optional", "nullable", "nullish", "default", "prefault"]);
11892
11891
  var typeOf = (value) => value?._zod?.def?.type;
11893
11892
  function describe(value) {
@@ -11936,7 +11935,7 @@ function assertObjectSchema(scheme, source) {
11936
11935
  );
11937
11936
  }
11938
11937
 
11939
- // ../../flow-extension-runner/src/v2/params/widget-types.ts
11938
+ // ../../flow-extension-runner/src/params/widget-types.ts
11940
11939
  var FlowExtensionParamGroupTypes = {
11941
11940
  FILE_UPLOAD_OPTIONS: "FILE_UPLOAD_OPTIONS",
11942
11941
  FILE_LIST_OPTIONS: "FILE_LIST_OPTIONS",
@@ -11963,7 +11962,7 @@ var FlowExtensionParamWidgetTypes = {
11963
11962
  TIME_PICKER: "TIME_PICKER"
11964
11963
  };
11965
11964
 
11966
- // ../../flow-extension-runner/src/v2/params/schema/introspect.ts
11965
+ // ../../flow-extension-runner/src/params/schema/introspect.ts
11967
11966
  var OPTIONAL_WRAPPERS = /* @__PURE__ */ new Set(["optional", "nullable", "nullish"]);
11968
11967
  var DEFAULT_WRAPPERS = /* @__PURE__ */ new Set(["default", "prefault"]);
11969
11968
  var TRANSPARENT_WRAPPERS = /* @__PURE__ */ new Set(["readonly", "pipe", "lazy"]);
@@ -12119,7 +12118,7 @@ function shapeEntries(schema) {
12119
12118
  return shape && typeof shape === "object" ? Object.entries(shape) : [];
12120
12119
  }
12121
12120
 
12122
- // ../../flow-extension-runner/src/v2/params/schema/date-format.ts
12121
+ // ../../flow-extension-runner/src/params/schema/date-format.ts
12123
12122
  var ISO_PATTERNS = {
12124
12123
  date: "yyyy-MM-dd",
12125
12124
  datetime: "yyyy-MM-dd'T'HH:mm",
@@ -12465,7 +12464,7 @@ function hasDateFormat(schema, seen = /* @__PURE__ */ new Set()) {
12465
12464
  return children.some((child) => hasDateFormat(child, seen));
12466
12465
  }
12467
12466
 
12468
- // ../../flow-extension-runner/src/v2/params/schema/dictionary-binding.ts
12467
+ // ../../flow-extension-runner/src/params/schema/dictionary-binding.ts
12469
12468
  var DictionaryScope = class _DictionaryScope {
12470
12469
  constructor(top, visible) {
12471
12470
  this.top = top;
@@ -12498,7 +12497,7 @@ function publishedBinding(binding, scope2) {
12498
12497
  return { id: binding.id, dependsOn: resolveDependsOn(binding, scope2).dependsOn };
12499
12498
  }
12500
12499
 
12501
- // ../../flow-extension-runner/src/v2/params/schema/assert-supported-schema.ts
12500
+ // ../../flow-extension-runner/src/params/schema/assert-supported-schema.ts
12502
12501
  var GUARDED_KINDS = /* @__PURE__ */ new Set(["action", "dictionary", "polling trigger", "realtime trigger", "extension"]);
12503
12502
  var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
12504
12503
  "string",
@@ -12519,31 +12518,31 @@ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
12519
12518
  ]);
12520
12519
  var SUPPORTED_SPELLING = "z.string(), z.number(), z.bigint(), z.boolean(), z.date(), z.enum([\u2026]), z.literal(\u2026), z.object({ \u2026 }), z.array(\u2026), z.record(\u2026), z.union([\u2026]), z.null(), z.any(), z.unknown()";
12521
12520
  var MODIFIER_SPELLING = ".optional(), .nullable(), .nullish(), .default(v), .prefault(v), .readonly(), .nonoptional(), .pipe(\u2026)/.transform(\u2026) and z.lazy(\u2026)";
12522
- function subjectOf(source, path2) {
12521
+ function subjectOf(source, path) {
12523
12522
  const kind = source.kind ?? "extension";
12524
12523
  const subject = source.itemId ? `${kind} "${source.itemId}": ` : "";
12525
- return `${subject}\`${path2}\``;
12524
+ return `${subject}\`${path}\``;
12526
12525
  }
12527
- function refuse(message, source, path2, received) {
12526
+ function refuse(message, source, path, received) {
12528
12527
  throw new InvalidSchemaError(
12529
12528
  `[flow-extension:${source.serviceId}] ${message}`,
12530
- { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path: path2, received }
12529
+ { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path, received }
12531
12530
  );
12532
12531
  }
12533
- function refuseCatch(source, path2) {
12532
+ function refuseCatch(source, path) {
12534
12533
  refuse(
12535
- `${subjectOf(source, path2)} uses \`.catch(\u2026)\`, which a parameter may not: it replaces an invalid value with the fallback instead of reporting it, and drops the field out of type coercion. Use \`.default(v)\` \u2014 same fallback when the value is absent, and a supplied-but-invalid one still fails.`,
12534
+ `${subjectOf(source, path)} uses \`.catch(\u2026)\`, which a parameter may not: it replaces an invalid value with the fallback instead of reporting it, and drops the field out of type coercion. Use \`.default(v)\` \u2014 same fallback when the value is absent, and a supplied-but-invalid one still fails.`,
12536
12535
  source,
12537
- path2,
12536
+ path,
12538
12537
  "catch"
12539
12538
  );
12540
12539
  }
12541
- function refuseType(source, path2, type) {
12540
+ function refuseType(source, path, type) {
12542
12541
  const received = type ? `z.${type}()` : "a value that is not a zod schema";
12543
12542
  refuse(
12544
- `${subjectOf(source, path2)} declares ${received}, which the runtime cannot publish as a parameter \u2014 it has no widget, no published type and no coercion for it. Supported: ${SUPPORTED_SPELLING}; each may carry ${MODIFIER_SPELLING}.`,
12543
+ `${subjectOf(source, path)} declares ${received}, which the runtime cannot publish as a parameter \u2014 it has no widget, no published type and no coercion for it. Supported: ${SUPPORTED_SPELLING}; each may carry ${MODIFIER_SPELLING}.`,
12545
12544
  source,
12546
- path2,
12545
+ path,
12547
12546
  type ?? "unknown"
12548
12547
  );
12549
12548
  }
@@ -12559,7 +12558,7 @@ function isLooseObject(schema) {
12559
12558
  function isDynamicPropsSlot(source, topLevel) {
12560
12559
  return topLevel && source.kind === "action" && source.slot === "params";
12561
12560
  }
12562
- function assertDynamicProps(schema, name, siblings, source, path2) {
12561
+ function assertDynamicProps(schema, name, siblings, source, path) {
12563
12562
  const ins = inspect(schema);
12564
12563
  const spec = ins.meta.frDynamicProps;
12565
12564
  if (!spec) {
@@ -12570,49 +12569,49 @@ function assertDynamicProps(schema, name, siblings, source, path2) {
12570
12569
  }
12571
12570
  if (typeof spec.execute !== "function") {
12572
12571
  refuse(
12573
- `${subjectOf(source, path2)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
12572
+ `${subjectOf(source, path)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
12574
12573
  source,
12575
- path2,
12574
+ path,
12576
12575
  typeof spec.execute
12577
12576
  );
12578
12577
  }
12579
12578
  if (spec.dependsOn !== void 0 && (!Array.isArray(spec.dependsOn) || spec.dependsOn.some((item) => typeof item !== "string"))) {
12580
12579
  refuse(
12581
- `${subjectOf(source, path2)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
12580
+ `${subjectOf(source, path)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
12582
12581
  source,
12583
- path2,
12582
+ path,
12584
12583
  "dependsOn"
12585
12584
  );
12586
12585
  }
12587
12586
  for (const dependency of spec.dependsOn ?? []) {
12588
12587
  if (dependency === name || !siblings.includes(dependency)) {
12589
12588
  refuse(
12590
- `${subjectOf(source, path2)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
12589
+ `${subjectOf(source, path)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
12591
12590
  source,
12592
- path2,
12591
+ path,
12593
12592
  dependency
12594
12593
  );
12595
12594
  }
12596
12595
  }
12597
12596
  if (ins.meta.frDictionary) {
12598
12597
  refuse(
12599
- `${subjectOf(source, path2)} declares both \`.dynamicProps()\` and \`.dictionary()\`. A dictionary offers values for one field; dynamic props load the fields inside an object \u2014 use one or the other.`,
12598
+ `${subjectOf(source, path)} declares both \`.dynamicProps()\` and \`.dictionary()\`. A dictionary offers values for one field; dynamic props load the fields inside an object \u2014 use one or the other.`,
12600
12599
  source,
12601
- path2,
12600
+ path,
12602
12601
  "dictionary"
12603
12602
  );
12604
12603
  }
12605
12604
  const element = ins.resolvedType === "array" ? ins.core?._zod?.def?.element : void 0;
12606
12605
  if (!isLooseObject(schema) && !isLooseObject(element)) {
12607
12606
  refuse(
12608
- `${subjectOf(source, path2)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
12607
+ `${subjectOf(source, path)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
12609
12608
  source,
12610
- path2,
12609
+ path,
12611
12610
  ins.resolvedType ?? "unknown"
12612
12611
  );
12613
12612
  }
12614
12613
  }
12615
- function assertDictionaryBinding(schema, source, path2, scope2) {
12614
+ function assertDictionaryBinding(schema, source, path, scope2) {
12616
12615
  const binding = inspect(schema).meta.frDictionary;
12617
12616
  if (!binding) {
12618
12617
  return;
@@ -12620,14 +12619,14 @@ function assertDictionaryBinding(schema, source, path2, scope2) {
12620
12619
  const { clash } = resolveDependsOn(binding, scope2);
12621
12620
  if (clash) {
12622
12621
  refuse(
12623
- `${subjectOf(source, path2)} uses dictionary "${binding.id}", whose criteria "${clash.key}" can come from ${clash.names.map((name) => `"${name}"`).join(" or ")} \u2014 and this field can see all of them, so the dictionary cannot tell which one is meant. Rename one of the params, or bind this field to a dictionary without that alias.`,
12622
+ `${subjectOf(source, path)} uses dictionary "${binding.id}", whose criteria "${clash.key}" can come from ${clash.names.map((name) => `"${name}"`).join(" or ")} \u2014 and this field can see all of them, so the dictionary cannot tell which one is meant. Rename one of the params, or bind this field to a dictionary without that alias.`,
12624
12623
  source,
12625
- path2,
12624
+ path,
12626
12625
  clash.names.join(", ")
12627
12626
  );
12628
12627
  }
12629
12628
  }
12630
- function assertDateString(schema, source, path2) {
12629
+ function assertDateString(schema, source, path) {
12631
12630
  const ins = inspect(schema);
12632
12631
  const pattern = ins.meta.frDateFormat;
12633
12632
  const kind = dateStringKind(ins);
@@ -12635,9 +12634,9 @@ function assertDateString(schema, source, path2) {
12635
12634
  const format = ins.core?._zod?.def?.format;
12636
12635
  const zoned = ins.coreType === "string" && format === "datetime";
12637
12636
  refuse(
12638
- `${subjectOf(source, path2)} uses \`.dateFormat()\` on ${zoned ? "z.iso.datetime() with a zone \u2014 an instant, not a wall clock" : "a type that is not a date string"}. Only z.iso.date(), z.iso.datetime({ local: true }) and z.iso.time() take a format.`,
12637
+ `${subjectOf(source, path)} uses \`.dateFormat()\` on ${zoned ? "z.iso.datetime() with a zone \u2014 an instant, not a wall clock" : "a type that is not a date string"}. Only z.iso.date(), z.iso.datetime({ local: true }) and z.iso.time() take a format.`,
12639
12638
  source,
12640
- path2,
12639
+ path,
12641
12640
  zoned ? "datetime" : ins.resolvedType ?? "unknown"
12642
12641
  );
12643
12642
  }
@@ -12649,7 +12648,7 @@ function assertDateString(schema, source, path2) {
12649
12648
  compilePattern(pattern, kind);
12650
12649
  } catch (error) {
12651
12650
  if (error instanceof DateFormatError) {
12652
- refuse(`${subjectOf(source, path2)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path2, pattern);
12651
+ refuse(`${subjectOf(source, path)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path, pattern);
12653
12652
  }
12654
12653
  throw error;
12655
12654
  }
@@ -12662,14 +12661,14 @@ function assertDateString(schema, source, path2) {
12662
12661
  const fits = typeof fallback === "string" && (pattern !== void 0 ? !!parseInPattern(fallback, pattern, kind) : ((parts) => !!parts && toCanonical(parts, kind) === fallback)(parseIso(fallback, kind)));
12663
12662
  if (!fits) {
12664
12663
  refuse(
12665
- `${subjectOf(source, path2)} has the default ${JSON.stringify(fallback)}, which is not written in ${written.replace(/'T'/, "T")} \u2014 a default is handed to \`execute\` as written, so write it in the field's own format.`,
12664
+ `${subjectOf(source, path)} has the default ${JSON.stringify(fallback)}, which is not written in ${written.replace(/'T'/, "T")} \u2014 a default is handed to \`execute\` as written, so write it in the field's own format.`,
12666
12665
  source,
12667
- path2,
12666
+ path,
12668
12667
  String(fallback)
12669
12668
  );
12670
12669
  }
12671
12670
  }
12672
- function assertField(schema, source, path2, seen, scope2, topLevel = false) {
12671
+ function assertField(schema, source, path, seen, scope2, topLevel = false) {
12673
12672
  if (!schema || seen.has(schema)) {
12674
12673
  return;
12675
12674
  }
@@ -12677,35 +12676,35 @@ function assertField(schema, source, path2, seen, scope2, topLevel = false) {
12677
12676
  const ins = inspect(schema);
12678
12677
  if (ins.meta.frDynamicProps && !isDynamicPropsSlot(source, topLevel)) {
12679
12678
  refuse(
12680
- `${subjectOf(source, path2)} uses \`.dynamicProps()\`, which is supported on top-level action params only. For a list of objects, put it on the array rather than on its element.`,
12679
+ `${subjectOf(source, path)} uses \`.dynamicProps()\`, which is supported on top-level action params only. For a list of objects, put it on the array rather than on its element.`,
12681
12680
  source,
12682
- path2,
12681
+ path,
12683
12682
  "dynamicProps"
12684
12683
  );
12685
12684
  }
12686
12685
  if (ins.resolvedType === "catch") {
12687
- refuseCatch(source, path2);
12686
+ refuseCatch(source, path);
12688
12687
  }
12689
- assertDictionaryBinding(schema, source, path2, scope2);
12690
- assertDateString(schema, source, path2);
12688
+ assertDictionaryBinding(schema, source, path, scope2);
12689
+ assertDateString(schema, source, path);
12691
12690
  if (!ins.resolvedType || !SUPPORTED_TYPES.has(ins.resolvedType)) {
12692
- refuseType(source, path2, ins.resolvedType);
12691
+ refuseType(source, path, ins.resolvedType);
12693
12692
  }
12694
12693
  if (ins.branches) {
12695
- ins.branches.forEach((branch, index) => assertField(branch, source, `${path2}|branch ${index + 1}`, seen, scope2));
12694
+ ins.branches.forEach((branch, index) => assertField(branch, source, `${path}|branch ${index + 1}`, seen, scope2));
12696
12695
  }
12697
12696
  const def = ins.core._zod?.def ?? {};
12698
12697
  if (ins.resolvedType === "array") {
12699
- assertField(def.element, source, `${path2}[]`, seen, scope2);
12698
+ assertField(def.element, source, `${path}[]`, seen, scope2);
12700
12699
  }
12701
12700
  if (ins.resolvedType === "record") {
12702
- assertField(def.valueType, source, `${path2}{}`, seen, scope2);
12701
+ assertField(def.valueType, source, `${path}{}`, seen, scope2);
12703
12702
  }
12704
12703
  if (ins.resolvedType === "object") {
12705
12704
  const properties = shapeEntries(ins.core);
12706
12705
  const inner = scope2.enter(properties.map(([name]) => name));
12707
12706
  for (const [name, property] of properties) {
12708
- assertField(property, source, `${path2}.${name}`, seen, inner);
12707
+ assertField(property, source, `${path}.${name}`, seen, inner);
12709
12708
  }
12710
12709
  }
12711
12710
  }
@@ -12726,7 +12725,7 @@ function assertSupportedSchema(scheme, source) {
12726
12725
  }
12727
12726
  }
12728
12727
 
12729
- // ../../flow-extension-runner/src/v2/params/schema/dates.ts
12728
+ // ../../flow-extension-runner/src/params/schema/dates.ts
12730
12729
  var DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
12731
12730
  var HAS_TIME = /^(\d{4}-\d{2}-\d{2})[T ](.+)$/;
12732
12731
  var ZONE = /(Z|[+-]\d{2}:?\d{2})$/;
@@ -12805,7 +12804,7 @@ function hasPassThroughDate(schema, inspectSchema, entriesOf) {
12805
12804
  return children.some((child) => hasPassThroughDate(child, inspectSchema, entriesOf));
12806
12805
  }
12807
12806
 
12808
- // ../../flow-extension-runner/src/v2/params/schema/labels.ts
12807
+ // ../../flow-extension-runner/src/params/schema/labels.ts
12809
12808
  var ACRONYMS = /* @__PURE__ */ new Set([
12810
12809
  "id",
12811
12810
  "url",
@@ -12839,7 +12838,7 @@ function humanizeKey(name) {
12839
12838
  }
12840
12839
  var labelOf = (name, schema) => inspect(schema).meta.title || humanizeKey(name) || name;
12841
12840
 
12842
- // ../../flow-extension-runner/src/v2/params/schema/field-plan.ts
12841
+ // ../../flow-extension-runner/src/params/schema/field-plan.ts
12843
12842
  function declaredAbsence(schema) {
12844
12843
  let current = schema;
12845
12844
  let acceptsUndefined = false;
@@ -12950,7 +12949,7 @@ function planField(name, schema) {
12950
12949
  };
12951
12950
  }
12952
12951
 
12953
- // ../../flow-extension-runner/src/v2/params/schema/notices.ts
12952
+ // ../../flow-extension-runner/src/params/schema/notices.ts
12954
12953
  var sink;
12955
12954
  var currentField;
12956
12955
  function collectNotices(fn) {
@@ -12977,7 +12976,7 @@ function notice(entry) {
12977
12976
  sink?.push({ field: currentField, ...entry });
12978
12977
  }
12979
12978
 
12980
- // ../../flow-extension-runner/src/v2/params/schema/coerce.ts
12979
+ // ../../flow-extension-runner/src/params/schema/coerce.ts
12981
12980
  var ok = (value) => ({ ok: true, value });
12982
12981
  var fail = (expected) => ({ ok: false, expected });
12983
12982
  var TRUE = /* @__PURE__ */ new Set(["true", "1", "yes", "y", "t", "on", "checked", "enabled", "enable", "active"]);
@@ -13209,7 +13208,7 @@ function absentAs(schema, value) {
13209
13208
  return absence === "null" ? null : void 0;
13210
13209
  }
13211
13210
 
13212
- // ../../flow-extension-runner/src/v2/params/schema/defaults.ts
13211
+ // ../../flow-extension-runner/src/params/schema/defaults.ts
13213
13212
  var WIDGET_DESCRIPTIONS = {
13214
13213
  [FlowExtensionParamWidgetTypes.MULTI_LINE_TEXT]: "Expects text; line breaks are allowed"
13215
13214
  };
@@ -13246,7 +13245,7 @@ var FORMAT_DESCRIPTIONS = {
13246
13245
  cidrv6: "Expects an IPv6 range, e.g. 2001:db8::/32"
13247
13246
  };
13248
13247
 
13249
- // ../../flow-extension-runner/src/v2/params/schema/messages.ts
13248
+ // ../../flow-extension-runner/src/params/schema/messages.ts
13250
13249
  var EXPECTED = {
13251
13250
  string: "a string",
13252
13251
  number: "a number",
@@ -13367,55 +13366,55 @@ function isAuthored(issue) {
13367
13366
  }
13368
13367
  function toFieldIssue(plan, issue, fieldValue) {
13369
13368
  const segments = (issue.path ?? []).map(String).filter(Boolean);
13370
- const path2 = segments.length ? `${plan.name}.${segments.join(".")}` : plan.name;
13369
+ const path = segments.length ? `${plan.name}.${segments.join(".")}` : plan.name;
13371
13370
  const code = issue.code ?? "custom";
13372
13371
  const target = resolveTarget(plan, segments, fieldValue);
13373
13372
  const named = { ...plan, label: target.label };
13374
13373
  if (isAuthored(issue)) {
13375
- return { path: path2, code, message: issue.message };
13374
+ return { path, code, message: issue.message };
13376
13375
  }
13377
13376
  if (code === "invalid_format" && target.schema && inspect(target.schema).branches) {
13378
13377
  const combined = unionPhrases(target.schema, target.value);
13379
13378
  if (combined.length > 1) {
13380
- return { path: path2, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
13379
+ return { path, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
13381
13380
  }
13382
13381
  }
13383
13382
  const dateKind = target.schema ? dateStringKind(inspect(target.schema)) : void 0;
13384
13383
  const dateMissing = target.value == null || target.value === "";
13385
13384
  if (dateKind && (code === "invalid_type" || code === "invalid_format")) {
13386
- return dateMissing ? { path: path2, code, message: requiredMessage(named) } : { path: path2, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
13385
+ return dateMissing ? { path, code, message: requiredMessage(named) } : { path, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
13387
13386
  }
13388
13387
  if (code === "invalid_type") {
13389
13388
  const received = issue.received;
13390
13389
  const absent = segments.length ? target.found && target.value == null : received === "undefined" || received === "null" || issue.expected === void 0;
13391
- return absent ? { path: path2, code, message: requiredMessage(named) } : { path: path2, code, message: invalidTypeMessage(named, issue.expected ?? "") };
13390
+ return absent ? { path, code, message: requiredMessage(named) } : { path, code, message: invalidTypeMessage(named, issue.expected ?? "") };
13392
13391
  }
13393
13392
  if (code === "too_small") {
13394
- return { path: path2, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan)}` };
13393
+ return { path, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan)}` };
13395
13394
  }
13396
13395
  if (code === "too_big") {
13397
- return { path: path2, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan)}` };
13396
+ return { path, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan)}` };
13398
13397
  }
13399
13398
  if (code === "invalid_value") {
13400
- return { path: path2, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
13399
+ return { path, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
13401
13400
  }
13402
13401
  if (code === "invalid_format") {
13403
13402
  const described = FORMAT_DESCRIPTIONS[issue.format ?? ""];
13404
- return described ? { path: path2, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path: path2, code, message: `\xAB${target.label}\xBB has an invalid format` };
13403
+ return described ? { path, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path, code, message: `\xAB${target.label}\xBB has an invalid format` };
13405
13404
  }
13406
13405
  if (code === "invalid_union") {
13407
13406
  if (segments.length && target.found && target.value == null) {
13408
- return { path: path2, code, message: requiredMessage(named) };
13407
+ return { path, code, message: requiredMessage(named) };
13409
13408
  }
13410
13409
  const combined = unionIssue(plan, issue, target.schema, target.value, fieldValue);
13411
13410
  if (combined) {
13412
- return combined.path ? combined : { path: path2, code, message: `\xAB${target.label}\xBB ${combined.message}` };
13411
+ return combined.path ? combined : { path, code, message: `\xAB${target.label}\xBB ${combined.message}` };
13413
13412
  }
13414
13413
  }
13415
- return { path: path2, code, message: `\xAB${target.label}\xBB is invalid` };
13414
+ return { path, code, message: `\xAB${target.label}\xBB is invalid` };
13416
13415
  }
13417
13416
 
13418
- // ../../flow-extension-runner/src/v2/params/schema/normalize.ts
13417
+ // ../../flow-extension-runner/src/params/schema/normalize.ts
13419
13418
  var resolved = (value) => ({ value, present: true, issues: [] });
13420
13419
  var rejected = (issues) => ({ present: false, issues });
13421
13420
  function isAbsent(value, plan) {
@@ -13523,7 +13522,7 @@ function restoreDeep(output, original, schema) {
13523
13522
  }
13524
13523
  var isPlain = (value) => !!value && typeof value === "object" && !Array.isArray(value);
13525
13524
 
13526
- // ../../flow-extension-runner/src/v2/params/schema/parse.ts
13525
+ // ../../flow-extension-runner/src/params/schema/parse.ts
13527
13526
  var EXPECTED2 = {
13528
13527
  string: "a string",
13529
13528
  number: "a number",
@@ -13533,10 +13532,10 @@ var EXPECTED2 = {
13533
13532
  };
13534
13533
  function toIssues(error, param) {
13535
13534
  return (error?.issues ?? []).map((issue) => {
13536
- const path2 = (issue.path ?? []).map(String).join(".");
13535
+ const path = (issue.path ?? []).map(String).join(".");
13537
13536
  const expected = issue.expected;
13538
- const restated = param && !path2 && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
13539
- return { path: path2, message: restated ?? issue.message ?? "invalid value", code: issue.code };
13537
+ const restated = param && !path && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
13538
+ return { path, message: restated ?? issue.message ?? "invalid value", code: issue.code };
13540
13539
  });
13541
13540
  }
13542
13541
  function parseSchema(schema, value, fail2, param) {
@@ -13550,7 +13549,7 @@ function parseSchema(schema, value, fail2, param) {
13550
13549
  return result.data;
13551
13550
  }
13552
13551
 
13553
- // ../../flow-extension-runner/src/v2/params/params.ts
13552
+ // ../../flow-extension-runner/src/params/params.ts
13554
13553
  var Params = class {
13555
13554
  constructor(scheme, source = {}) {
13556
13555
  this.source = source;
@@ -13605,7 +13604,7 @@ var Params = class {
13605
13604
  }
13606
13605
  };
13607
13606
 
13608
- // ../../flow-extension-runner/src/v2/params/config-params.ts
13607
+ // ../../flow-extension-runner/src/params/config-params.ts
13609
13608
  var ConfigParams = class _ConfigParams extends Params {
13610
13609
  static of(scheme, source = {}) {
13611
13610
  return new _ConfigParams(scheme, source);
@@ -13628,7 +13627,7 @@ var ConfigParams = class _ConfigParams extends Params {
13628
13627
  }
13629
13628
  };
13630
13629
 
13631
- // ../../flow-extension-runner/src/v2/params/method-params.ts
13630
+ // ../../flow-extension-runner/src/params/method-params.ts
13632
13631
  var MethodParams = class _MethodParams extends Params {
13633
13632
  static of(scheme, source = {}) {
13634
13633
  return new _MethodParams(scheme, source);
@@ -13654,10 +13653,10 @@ var MethodParams = class _MethodParams extends Params {
13654
13653
  }
13655
13654
  };
13656
13655
 
13657
- // ../../flow-extension-runner/src/v2/params/zod.ts
13656
+ // ../../flow-extension-runner/src/params/zod.ts
13658
13657
  var import_zod2 = require("zod");
13659
13658
 
13660
- // ../../flow-extension-runner/src/v2/params/files-options.ts
13659
+ // ../../flow-extension-runner/src/params/files-options.ts
13661
13660
  var import_zod = require("zod");
13662
13661
  var SCOPE_VALUES = ["WORKSPACE", "FLOW", "EXECUTION"];
13663
13662
  var scope = () => import_zod.z.enum(SCOPE_VALUES).label("Scope").describe("Storage scope: WORKSPACE (shared across flows), FLOW (this flow only), EXECUTION (this run only)").default("FLOW");
@@ -13713,7 +13712,7 @@ function filesDeleteOptions(include) {
13713
13712
  return group("filesDeleteOptions", FlowExtensionParamWidgetTypes.FILE_DELETE_OPTIONS, DELETE_FIELDS, include);
13714
13713
  }
13715
13714
 
13716
- // ../../flow-extension-runner/src/v2/params/zod.ts
13715
+ // ../../flow-extension-runner/src/params/zod.ts
13717
13716
  var extended = false;
13718
13717
  function extendPrototype() {
13719
13718
  if (extended) {
@@ -13784,7 +13783,7 @@ Object.defineProperties(namespace, {
13784
13783
  });
13785
13784
  var z = namespace;
13786
13785
 
13787
- // ../../flow-extension-runner/src/v2/params/json/values.ts
13786
+ // ../../flow-extension-runner/src/params/json/values.ts
13788
13787
  function toJsonValue(value) {
13789
13788
  if (typeof value === "bigint") {
13790
13789
  return { $bigint: value.toString() };
@@ -13801,7 +13800,7 @@ function toJsonValue(value) {
13801
13800
  return value;
13802
13801
  }
13803
13802
 
13804
- // ../../flow-extension-runner/src/v2/params/json/checks.ts
13803
+ // ../../flow-extension-runner/src/params/json/checks.ts
13805
13804
  var defOf = (check) => check?._zod?.def ?? {};
13806
13805
  function messageOf(source) {
13807
13806
  const { error } = source;
@@ -13880,10 +13879,10 @@ function encodeChecks(core) {
13880
13879
  return { checks, unsupported };
13881
13880
  }
13882
13881
 
13883
- // ../../flow-extension-runner/src/v2/params/json/types.ts
13882
+ // ../../flow-extension-runner/src/params/json/types.ts
13884
13883
  var SCHEMA_JSON_VERSION = 1;
13885
13884
 
13886
- // ../../flow-extension-runner/src/v2/params/json/decode.ts
13885
+ // ../../flow-extension-runner/src/params/json/decode.ts
13887
13886
  var FORMAT_FACTORIES = {
13888
13887
  url: z.url,
13889
13888
  email: z.email,
@@ -13913,7 +13912,7 @@ var FORMAT_FACTORIES = {
13913
13912
  duration: z.iso?.duration
13914
13913
  };
13915
13914
 
13916
- // ../../flow-extension-runner/src/v2/params/json/encode.ts
13915
+ // ../../flow-extension-runner/src/params/json/encode.ts
13917
13916
  var FIELD_TYPES = /* @__PURE__ */ new Set([
13918
13917
  "string",
13919
13918
  "number",
@@ -14081,7 +14080,7 @@ function encodeParams(scheme, options = {}) {
14081
14080
  };
14082
14081
  }
14083
14082
 
14084
- // ../../flow-extension-runner/src/v2/context/method-input.ts
14083
+ // ../../flow-extension-runner/src/context/method-input.ts
14085
14084
  var MethodInput = class {
14086
14085
  constructor(serviceId, methodName, data = {}) {
14087
14086
  this.serviceId = serviceId;
@@ -14139,7 +14138,7 @@ var MethodInput = class {
14139
14138
  }
14140
14139
  };
14141
14140
 
14142
- // ../../flow-extension-runner/src/v2/method.ts
14141
+ // ../../flow-extension-runner/src/method.ts
14143
14142
  var ExtensionMethod = class {
14144
14143
  constructor(extension) {
14145
14144
  this.extension = extension;
@@ -14168,7 +14167,7 @@ var ExtensionMethod = class {
14168
14167
  }
14169
14168
  };
14170
14169
 
14171
- // ../../flow-extension-runner/src/common/constants.ts
14170
+ // ../../flow-extension-runner/src/params/config-types.ts
14172
14171
  var ServiceConfigItemTypes = {
14173
14172
  STRING: "string",
14174
14173
  BOOL: "bool",
@@ -14177,7 +14176,7 @@ var ServiceConfigItemTypes = {
14177
14176
  TEXT: "text"
14178
14177
  };
14179
14178
 
14180
- // ../../flow-extension-runner/src/v2/model/field-mapper.ts
14179
+ // ../../flow-extension-runner/src/model/field-mapper.ts
14181
14180
  var descriptionOf = (schema) => inspect(schema).meta.description || "";
14182
14181
  var isRequired = (schema) => absenceOf(schema).absence === "required";
14183
14182
  var isParamGroup = (ins) => ins.coreType === "object" && !!ins.meta.frWidget;
@@ -14284,7 +14283,7 @@ function fieldToConfigItem(name, schema) {
14284
14283
  };
14285
14284
  }
14286
14285
 
14287
- // ../../flow-extension-runner/src/v2/model/method-model.ts
14286
+ // ../../flow-extension-runner/src/model/method-model.ts
14288
14287
  function opaqueParam(name, type = "OBJECT") {
14289
14288
  return { name, required: false, description: "", type };
14290
14289
  }
@@ -14306,7 +14305,7 @@ function argsFromParams(params) {
14306
14305
  return args;
14307
14306
  }
14308
14307
 
14309
- // ../../flow-extension-runner/src/v2/model/params-model.ts
14308
+ // ../../flow-extension-runner/src/model/params-model.ts
14310
14309
  function toBodyParams(params) {
14311
14310
  const scope2 = DictionaryScope.ROOT.enter(params.keys());
14312
14311
  return params.fields().map(([name, schema]) => fieldToParam(name, schema, { scope: scope2 }));
@@ -14325,7 +14324,7 @@ function toConfigItems(config) {
14325
14324
  return config.fields().map(([name, schema]) => fieldToConfigItem(name, schema));
14326
14325
  }
14327
14326
 
14328
- // ../../flow-extension-runner/src/v2/result.ts
14327
+ // ../../flow-extension-runner/src/result.ts
14329
14328
  function inferReturnType(value) {
14330
14329
  if (Array.isArray(value)) {
14331
14330
  return "LIST";
@@ -14393,7 +14392,7 @@ var ResultSpec = class _ResultSpec {
14393
14392
  }
14394
14393
  };
14395
14394
 
14396
- // ../../flow-extension-runner/src/v2/actions/action-method.ts
14395
+ // ../../flow-extension-runner/src/actions/action-method.ts
14397
14396
  var ActionMethod = class extends ExtensionMethod {
14398
14397
  constructor(extension, props) {
14399
14398
  super(extension);
@@ -14519,7 +14518,7 @@ var ActionMethod = class extends ExtensionMethod {
14519
14518
  }
14520
14519
  };
14521
14520
 
14522
- // ../../flow-extension-runner/src/common/context-files.ts
14521
+ // ../../flow-extension-runner/src/context/files.ts
14523
14522
  var import_backendless_request = __toESM(require_lib());
14524
14523
  var FileScope = {
14525
14524
  WORKSPACE: "WORKSPACE",
@@ -14652,7 +14651,7 @@ var FlowrunnerContextFiles = class {
14652
14651
  }
14653
14652
  };
14654
14653
 
14655
- // ../../flow-extension-runner/src/v2/context/logger.ts
14654
+ // ../../flow-extension-runner/src/context/logger.ts
14656
14655
  var defaultLogger = {
14657
14656
  debug: () => {
14658
14657
  },
@@ -14662,7 +14661,7 @@ var defaultLogger = {
14662
14661
  error: (...args) => console.error(...args)
14663
14662
  };
14664
14663
 
14665
- // ../../flow-extension-runner/src/v2/context/proxies.ts
14664
+ // ../../flow-extension-runner/src/context/proxies.ts
14666
14665
  function createThrowingProxy(feature, hint2) {
14667
14666
  const fail2 = () => {
14668
14667
  throw new FeatureNotEnabledError(feature, hint2);
@@ -14682,7 +14681,7 @@ function createThrowingProxy(feature, hint2) {
14682
14681
  );
14683
14682
  }
14684
14683
 
14685
- // ../../flow-extension-runner/src/v2/context/execution-context.ts
14684
+ // ../../flow-extension-runner/src/context/execution-context.ts
14686
14685
  var ExecutionContext = class _ExecutionContext {
14687
14686
  #extension;
14688
14687
  #options;
@@ -14784,14 +14783,14 @@ var ExecutionContext = class _ExecutionContext {
14784
14783
  }
14785
14784
  };
14786
14785
 
14787
- // ../../flow-extension-runner/src/v2/dictionaries/payload-schema.ts
14786
+ // ../../flow-extension-runner/src/dictionaries/payload-schema.ts
14788
14787
  var DictionaryPayloadSchema = z.looseObject({
14789
14788
  search: z.string().optional(),
14790
14789
  cursor: z.union([z.string(), z.number()]).nullish(),
14791
14790
  criteria: z.record(z.string(), z.unknown()).optional()
14792
14791
  });
14793
14792
 
14794
- // ../../flow-extension-runner/src/v2/dictionaries/dictionary-method.ts
14793
+ // ../../flow-extension-runner/src/dictionaries/dictionary-method.ts
14795
14794
  var isBlank2 = (value) => value === void 0 || value === null || value === "";
14796
14795
  var DictionaryMethod = class extends ExtensionMethod {
14797
14796
  constructor(extension, props) {
@@ -14936,7 +14935,7 @@ var DictionaryMethod = class extends ExtensionMethod {
14936
14935
  };
14937
14936
  }
14938
14937
  // Describe the full payload shape so the method advertises a complete, labelled input scheme (nested
14939
- // props inline their own labels — mirroring the v1 jsdoc-parser layout).
14938
+ // props inline their own labels — mirroring the layout the v1 JSDoc parser established).
14940
14939
  #payloadParam() {
14941
14940
  const properties = [
14942
14941
  { name: "search", required: false, description: "Optional search string to filter results.", type: "STRING", label: "Search" },
@@ -14962,12 +14961,12 @@ var DictionaryMethod = class extends ExtensionMethod {
14962
14961
  }
14963
14962
  };
14964
14963
 
14965
- // ../../flow-extension-runner/src/v2/loaders/payload-schema.ts
14964
+ // ../../flow-extension-runner/src/loaders/payload-schema.ts
14966
14965
  var LoaderPayloadSchema = z.looseObject({
14967
14966
  criteria: z.record(z.string(), z.unknown()).optional()
14968
14967
  });
14969
14968
 
14970
- // ../../flow-extension-runner/src/v2/loaders/loader-method.ts
14969
+ // ../../flow-extension-runner/src/loaders/loader-method.ts
14971
14970
  var LoaderMethod = class extends ExtensionMethod {
14972
14971
  constructor(extension, owner) {
14973
14972
  super(extension);
@@ -15121,17 +15120,17 @@ var DynamicPropsLoaderMethod = class extends ParamsLoaderMethod {
15121
15120
  }
15122
15121
  };
15123
15122
 
15124
- // ../../flow-extension-runner/src/v2/oauth/oauth2.ts
15123
+ // ../../flow-extension-runner/src/oauth/oauth2.ts
15125
15124
  var import_crypto = __toESM(require("crypto"));
15126
15125
 
15127
- // ../../flow-extension-runner/src/v2/oauth/method-names.ts
15126
+ // ../../flow-extension-runner/src/oauth/method-names.ts
15128
15127
  var OAUTH_SYSTEM_METHODS = {
15129
15128
  CONNECTION_URL: "getOAuth2ConnectionURL",
15130
15129
  EXECUTE_CALLBACK: "executeCallback",
15131
15130
  REFRESH_TOKEN: "refreshToken"
15132
15131
  };
15133
15132
 
15134
- // ../../flow-extension-runner/src/v2/oauth/system-params.ts
15133
+ // ../../flow-extension-runner/src/oauth/system-params.ts
15135
15134
  var OAuthCallbackObjectSchema = z.looseObject({
15136
15135
  code: z.string().optional(),
15137
15136
  redirectURI: z.string().optional(),
@@ -15140,7 +15139,7 @@ var OAuthCallbackObjectSchema = z.looseObject({
15140
15139
  });
15141
15140
  var RefreshTokenSchema = z.string().min(1);
15142
15141
 
15143
- // ../../flow-extension-runner/src/v2/oauth/oauth2.ts
15142
+ // ../../flow-extension-runner/src/oauth/oauth2.ts
15144
15143
  var OAuth2 = class {
15145
15144
  constructor(extension, props) {
15146
15145
  this.extension = extension;
@@ -15285,10 +15284,10 @@ function userDataOf(token) {
15285
15284
  return token && typeof token === "object" ? token.userData : void 0;
15286
15285
  }
15287
15286
 
15288
- // ../../flow-extension-runner/src/v2/polling-triggers/method-names.ts
15287
+ // ../../flow-extension-runner/src/polling-triggers/method-names.ts
15289
15288
  var POLLING_SYSTEM_METHOD = "handleTriggerPollingForEvent";
15290
15289
 
15291
- // ../../flow-extension-runner/src/v2/polling-triggers/system-params.ts
15290
+ // ../../flow-extension-runner/src/polling-triggers/system-params.ts
15292
15291
  var PollingInvocationSchema = z.looseObject({
15293
15292
  eventName: z.string().min(1),
15294
15293
  // The trigger instance's configured params — validated against the trigger's own schema separately.
@@ -15298,7 +15297,7 @@ var PollingInvocationSchema = z.looseObject({
15298
15297
  connectionId: z.string().nullish()
15299
15298
  });
15300
15299
 
15301
- // ../../flow-extension-runner/src/v2/polling-triggers/polling-triggers.ts
15300
+ // ../../flow-extension-runner/src/polling-triggers/polling-triggers.ts
15302
15301
  var PollingTriggers = class {
15303
15302
  constructor(extension) {
15304
15303
  this.extension = extension;
@@ -15337,15 +15336,15 @@ var PollingTriggers = class {
15337
15336
  }
15338
15337
  };
15339
15338
 
15340
- // ../../flow-extension-runner/src/v2/path.ts
15341
- function getPath(source, path2) {
15342
- return path2.split(".").reduce(
15339
+ // ../../flow-extension-runner/src/path.ts
15340
+ function getPath(source, path) {
15341
+ return path.split(".").reduce(
15343
15342
  (acc, key) => acc == null ? acc : acc[key],
15344
15343
  source
15345
15344
  );
15346
15345
  }
15347
15346
 
15348
- // ../../flow-extension-runner/src/v2/polling-triggers/mechanisms.ts
15347
+ // ../../flow-extension-runner/src/polling-triggers/mechanisms.ts
15349
15348
  var PollingMechanism = class {
15350
15349
  /**
15351
15350
  * Pick the strategy an author declared, rejecting the combinations that cannot work. Runs at REGISTRATION
@@ -15479,7 +15478,7 @@ var WatermarkMechanism = class extends FetchingMechanism {
15479
15478
  }
15480
15479
  };
15481
15480
 
15482
- // ../../flow-extension-runner/src/v2/polling-triggers/trigger-method.ts
15481
+ // ../../flow-extension-runner/src/polling-triggers/trigger-method.ts
15483
15482
  var PollingTriggerMethod = class extends ExtensionMethod {
15484
15483
  constructor(extension, props) {
15485
15484
  super(extension);
@@ -15549,7 +15548,7 @@ var PollingTriggerMethod = class extends ExtensionMethod {
15549
15548
  }
15550
15549
  };
15551
15550
 
15552
- // ../../flow-extension-runner/src/v2/realtime-triggers/method-names.ts
15551
+ // ../../flow-extension-runner/src/realtime-triggers/method-names.ts
15553
15552
  var REALTIME_SYSTEM_METHODS = {
15554
15553
  UPSERT: "handleTriggerUpsertWebhook",
15555
15554
  RESOLVE: "handleTriggerResolveEvents",
@@ -15558,7 +15557,7 @@ var REALTIME_SYSTEM_METHODS = {
15558
15557
  REFRESH: "handleTriggerRefreshWebhook"
15559
15558
  };
15560
15559
 
15561
- // ../../flow-extension-runner/src/v2/realtime-triggers/system-params.ts
15560
+ // ../../flow-extension-runner/src/realtime-triggers/system-params.ts
15562
15561
  var anyRecord = () => z.record(z.string(), z.unknown());
15563
15562
  var SubscriptionEventSchema = z.looseObject({
15564
15563
  name: z.string().min(1),
@@ -15594,7 +15593,7 @@ var RealtimeSelectInvocationSchema = z.looseObject({
15594
15593
  })).default([])
15595
15594
  });
15596
15595
 
15597
- // ../../flow-extension-runner/src/v2/realtime-triggers/verify.ts
15596
+ // ../../flow-extension-runner/src/realtime-triggers/verify.ts
15598
15597
  function verifyDeclarative(verify, rawBody, headers, config, webhookData) {
15599
15598
  const secret = verify.secret(config, { webhookData });
15600
15599
  if (!secret) {
@@ -15617,7 +15616,7 @@ function verifyDeclarative(verify, rawBody, headers, config, webhookData) {
15617
15616
  return true;
15618
15617
  }
15619
15618
 
15620
- // ../../flow-extension-runner/src/v2/realtime-triggers/realtime-setup.ts
15619
+ // ../../flow-extension-runner/src/realtime-triggers/realtime-setup.ts
15621
15620
  function readExtract(extract, body) {
15622
15621
  if (typeof extract === "function") {
15623
15622
  return extract({ requestBody: body });
@@ -15913,7 +15912,7 @@ var RealtimeSetup = class {
15913
15912
  }
15914
15913
  };
15915
15914
 
15916
- // ../../flow-extension-runner/src/v2/realtime-triggers/trigger-method.ts
15915
+ // ../../flow-extension-runner/src/realtime-triggers/trigger-method.ts
15917
15916
  function isFilled(value) {
15918
15917
  return value != null && value !== "";
15919
15918
  }
@@ -16009,12 +16008,12 @@ var RealtimeTriggerMethod = class extends ExtensionMethod {
16009
16008
  if (typeof match === "function") {
16010
16009
  return !!await match({ params, providerEventData, webhookData });
16011
16010
  }
16012
- for (const [paramKey, path2] of Object.entries(match)) {
16011
+ for (const [paramKey, path] of Object.entries(match)) {
16013
16012
  const paramValue = params[paramKey];
16014
16013
  if (!isFilled(paramValue)) {
16015
16014
  continue;
16016
16015
  }
16017
- if (`${paramValue}` !== `${getPath(providerEventData, path2)}`) {
16016
+ if (`${paramValue}` !== `${getPath(providerEventData, path)}`) {
16018
16017
  return false;
16019
16018
  }
16020
16019
  }
@@ -16050,7 +16049,7 @@ var RealtimeTriggerMethod = class extends ExtensionMethod {
16050
16049
  }
16051
16050
  };
16052
16051
 
16053
- // ../../flow-extension-runner/src/v2/system-method.ts
16052
+ // ../../flow-extension-runner/src/system-method.ts
16054
16053
  var SystemMethod = class extends ExtensionMethod {
16055
16054
  constructor(extension, spec) {
16056
16055
  super(extension);
@@ -16107,7 +16106,7 @@ var SystemMethod = class extends ExtensionMethod {
16107
16106
  }
16108
16107
  };
16109
16108
 
16110
- // ../../flow-extension-runner/src/v2/extension.ts
16109
+ // ../../flow-extension-runner/src/extension.ts
16111
16110
  var Extension = class {
16112
16111
  #props;
16113
16112
  #config;
@@ -16263,8 +16262,8 @@ var Extension = class {
16263
16262
  };
16264
16263
  }
16265
16264
  /**
16266
- * The published model — the v2 analogue of jsdoc-parser's `parseJsDocToServiceJson`, and the same
16267
- * `{ serviceInfo, methodsMap }` shape the console consumes for a v1 service.
16265
+ * The published model — the `{ serviceInfo, methodsMap }` shape the console consumes, the same one the
16266
+ * removed v1 JSDoc parser produced.
16268
16267
  *
16269
16268
  * Every method describes itself, so this is one pass with no per-kind branches: what a service publishes
16270
16269
  * is exactly what it registered.
@@ -16277,8 +16276,6 @@ var Extension = class {
16277
16276
  }
16278
16277
  }
16279
16278
  return {
16280
- runnerVersion: "v2",
16281
- //TODO: temp
16282
16279
  serviceInfo: this.toServiceInfo(),
16283
16280
  methodsMap,
16284
16281
  configSchema: encodeParams(this.config.scheme)
@@ -16318,7 +16315,7 @@ var Extension = class {
16318
16315
  }
16319
16316
  };
16320
16317
 
16321
- // ../../flow-extension-runner/src/v2/registry.ts
16318
+ // ../../flow-extension-runner/src/registry.ts
16322
16319
  var ExtensionRegistry = class {
16323
16320
  #extensions = /* @__PURE__ */ new Map();
16324
16321
  register(extension) {
@@ -16338,15 +16335,19 @@ var ExtensionRegistry = class {
16338
16335
  * which imports it.
16339
16336
  */
16340
16337
  load(id, entryPointPath) {
16341
- if (!this.get(id)) {
16342
- require(entryPointPath);
16343
- }
16344
- const extension = this.get(id);
16338
+ const extension = this.tryLoad(id, entryPointPath);
16345
16339
  if (!extension) {
16346
16340
  throw new ExtensionNotRegisteredError(id, entryPointPath);
16347
16341
  }
16348
16342
  return extension;
16349
16343
  }
16344
+ /** As `load`, but `undefined` instead of throwing when the module registers no extension under `id`. */
16345
+ tryLoad(id, entryPointPath) {
16346
+ if (!this.get(id)) {
16347
+ require(entryPointPath);
16348
+ }
16349
+ return this.get(id);
16350
+ }
16350
16351
  // Test-only: clear the registry between isolated cases.
16351
16352
  reset() {
16352
16353
  this.#extensions.clear();
@@ -16360,7 +16361,7 @@ function resetRegistry() {
16360
16361
  registry.reset();
16361
16362
  }
16362
16363
 
16363
- // ../../flow-extension-runner/src/v2/create-extension.ts
16364
+ // ../../flow-extension-runner/src/create-extension.ts
16364
16365
  function createExtension(props) {
16365
16366
  const extension = new Extension(props);
16366
16367
  const api = {
@@ -16388,7 +16389,7 @@ function createExtension(props) {
16388
16389
  return api;
16389
16390
  }
16390
16391
 
16391
- // ../../flow-extension-runner/src/v2/crypto.ts
16392
+ // ../../flow-extension-runner/src/crypto.ts
16392
16393
  var import_crypto2 = __toESM(require("crypto"));
16393
16394
  var crypto2 = {
16394
16395
  hmac(algo, key, data, encoding = "hex") {
@@ -16424,179 +16425,19 @@ var flowrunnerRuntime = {
16424
16425
  z,
16425
16426
  crypto: crypto2,
16426
16427
  createExtension,
16427
- getExtension,
16428
- ServerCode: null
16428
+ getExtension
16429
16429
  };
16430
16430
  global.Flowrunner = flowrunnerRuntime;
16431
16431
 
16432
- // ../../flow-extension-runner/src/common/config.ts
16433
- var ConfigValueAdapters = {
16434
- [ServiceConfigItemTypes.BOOL]: {
16435
- deserialize: (value) => typeof value === "string" ? value === "true" : !!value,
16436
- isEmpty: (value) => typeof value !== "boolean"
16437
- },
16438
- default: {
16439
- deserialize: (value) => value,
16440
- isEmpty: (value) => !value
16441
- }
16442
- };
16443
- function prepareServiceConfig(configItems, configs = {}) {
16444
- const targetConfig = {};
16445
- for (const configItem of configItems) {
16446
- const configName = configItem.name;
16447
- const configType = configItem.type;
16448
- const adapter = ConfigValueAdapters[configType] || ConfigValueAdapters.default;
16449
- targetConfig[configName] = adapter.deserialize(configs[configName]);
16450
- if (!adapter.isEmpty(targetConfig[configName])) {
16451
- continue;
16452
- }
16453
- const defaultConfig = adapter.deserialize(configItem.defaultValue);
16454
- if (!adapter.isEmpty(defaultConfig)) {
16455
- targetConfig[configName] = defaultConfig;
16456
- }
16457
- }
16458
- return targetConfig;
16459
- }
16460
-
16461
- // ../../flow-extension-runner/src/common/context.ts
16462
- var FlowrunnerContext = class {
16463
- constructor(options) {
16464
- this.Files = new FlowrunnerContextFiles(options);
16465
- }
16466
- };
16467
-
16468
- // ../../flow-extension-runner/src/v1/config.ts
16469
- function normalizeConfigItems(sourceConfigItems) {
16470
- return sourceConfigItems?.map((item) => ({
16471
- name: item.name,
16472
- type: item.type || ServiceConfigItemTypes.STRING,
16473
- shared: !!item.shared,
16474
- required: !!item.required,
16475
- description: item.description || item.hint || "",
16476
- label: item.label || item.displayName || item.name,
16477
- defaultValue: item.defaultValue,
16478
- options: item.options || []
16479
- })) || [];
16480
- }
16481
-
16482
- // ../../flow-extension-runner/src/v1/constants.ts
16483
- var OAUTH_ACCESS_TOKEN_HEADER = "oauth-access-token";
16484
-
16485
- // ../../flow-extension-runner/src/v1/namespace.ts
16486
- var services = /* @__PURE__ */ new Map();
16487
- function createFlowrunnerSandboxV1(serviceId, cb) {
16488
- global.Flowrunner.ServerCode = {
16489
- addService(ServiceClass, sourceConfigItems) {
16490
- services.set(serviceId, {
16491
- ServiceClass,
16492
- configItems: normalizeConfigItems(sourceConfigItems)
16493
- });
16494
- },
16495
- ConfigItems: {
16496
- TYPES: ServiceConfigItemTypes
16497
- }
16498
- };
16499
- try {
16500
- cb();
16501
- } finally {
16502
- global.Flowrunner.ServerCode = null;
16503
- }
16504
- return services.get(serviceId);
16505
- }
16506
-
16507
- // ../../flow-extension-runner/src/v1/service.ts
16508
- function requireService(serviceId, serviceEntryPointPath) {
16509
- const registered = createFlowrunnerSandboxV1(serviceId, () => {
16510
- require(serviceEntryPointPath);
16511
- });
16512
- if (!registered?.ServiceClass) {
16513
- throw new Error(`There is no registered ServiceClass serviceEntryPointPath="${serviceEntryPointPath}"`);
16514
- }
16515
- return registered;
16516
- }
16517
- function createRuntimeContext(data) {
16518
- const { serverURL, appId, apiKey, runtimeKey, flowId, executionId, accessToken, retrieveNewS3Token } = data;
16519
- const filesOptions = {
16520
- serverURL,
16521
- appId,
16522
- apiKey,
16523
- //
16524
- runtimeKey,
16525
- //
16526
- flowId,
16527
- executionId,
16528
- //
16529
- retrieveNewS3Token
16530
- };
16531
- const flowrunnerContext = data.createFiles ? { Files: data.createFiles(filesOptions) } : new FlowrunnerContext(filesOptions);
16532
- const httpHeaders = {};
16533
- if (accessToken) {
16534
- httpHeaders[OAUTH_ACCESS_TOKEN_HEADER] = accessToken;
16535
- }
16536
- return {
16537
- httpHeaders,
16538
- flowrunner: flowrunnerContext
16539
- };
16540
- }
16541
- function initServiceInstance(serviceId, serviceEntryPointPath, configs, context) {
16542
- const { ServiceClass, configItems } = requireService(serviceId, serviceEntryPointPath);
16543
- const config = prepareServiceConfig(configItems, configs);
16544
- const service = new ServiceClass(config, context);
16545
- Object.assign(service, {
16546
- config,
16547
- flowrunner: context.flowrunner,
16548
- request: {
16549
- context,
16550
- headers: context.httpHeaders
16551
- }
16552
- });
16553
- return service;
16554
- }
16432
+ // ../../flow-extension-runner/src/index.ts
16555
16433
  function getServiceConfigs(serviceId, serviceEntryPointPath) {
16556
- const { configItems } = requireService(serviceId, serviceEntryPointPath);
16557
- return configItems;
16558
- }
16559
- async function runServiceMethod(data) {
16560
- const {
16561
- serviceId,
16562
- serviceEntryPointPath,
16563
- configs,
16564
- methodName,
16565
- methodArgs,
16566
- retrieveNewS3Token,
16567
- createFiles
16568
- } = data;
16569
- const { accessToken, runtimeKey, appId, apiKey, serverURL, flowId, executionId } = data.executionContext;
16570
- const context = createRuntimeContext({
16571
- serverURL,
16572
- appId,
16573
- apiKey,
16574
- //
16575
- runtimeKey,
16576
- //
16577
- flowId,
16578
- executionId,
16579
- //
16580
- accessToken,
16581
- //
16582
- retrieveNewS3Token,
16583
- //
16584
- createFiles
16585
- });
16586
- const serviceInstance = initServiceInstance(serviceId, serviceEntryPointPath, configs, context);
16587
- const invoke = serviceInstance[methodName];
16588
- return invoke.apply(serviceInstance, methodArgs || []);
16589
- }
16590
-
16591
- // ../../flow-extension-runner/src/v2/index.ts
16592
- function getServiceConfigs2(serviceId, serviceEntryPointPath) {
16593
16434
  return registry.load(serviceId, serviceEntryPointPath).toConfigItems();
16594
16435
  }
16595
16436
  function buildServiceDefinition(serviceId, serviceEntryPointPath) {
16596
- return registry.load(serviceId, serviceEntryPointPath).toDefinition();
16437
+ return registry.tryLoad(serviceId, serviceEntryPointPath)?.toDefinition() ?? null;
16597
16438
  }
16598
- var defaultCreateFiles = (options) => new FlowrunnerContext(options).Files;
16599
- async function runServiceMethod2(data) {
16439
+ var defaultCreateFiles = (options) => new FlowrunnerContextFiles(options);
16440
+ async function runServiceMethod(data) {
16600
16441
  const { serviceId, serviceEntryPointPath, executionContext, retrieveNewS3Token, methodName } = data;
16601
16442
  const methodData = data.methodData || {};
16602
16443
  const { serverURL, appId, apiKey, runtimeKey, flowId, executionId, accessToken } = executionContext;
@@ -16621,541 +16462,15 @@ async function runServiceMethod2(data) {
16621
16462
  return extension.run(methodName, methodData, ctx);
16622
16463
  }
16623
16464
 
16624
- // ../../flow-extension-runner/src/index.ts
16625
- function detectVersion(serviceId, serviceEntryPointPath) {
16626
- createFlowrunnerSandboxV1(serviceId, () => {
16627
- require(serviceEntryPointPath);
16628
- });
16629
- return getExtension(serviceId) ? "v2" : "v1";
16630
- }
16631
- function getServiceConfigs3(serviceId, serviceEntryPointPath) {
16632
- return detectVersion(serviceId, serviceEntryPointPath) === "v2" ? getServiceConfigs2(serviceId, serviceEntryPointPath) : getServiceConfigs(serviceId, serviceEntryPointPath);
16633
- }
16634
- async function runServiceMethod3(data) {
16635
- const frameworkVersion = detectVersion(data.serviceId, data.serviceEntryPointPath);
16636
- const result = frameworkVersion === "v2" ? await runServiceMethod2(data) : await runServiceMethod(data);
16637
- return result;
16638
- }
16639
- function buildServiceDefinition2(serviceId, serviceEntryPointPath) {
16640
- return detectVersion(serviceId, serviceEntryPointPath) === "v2" ? buildServiceDefinition(serviceId, serviceEntryPointPath) : null;
16641
- }
16642
-
16643
- // ../../jsdoc-parser/src/custom-type-defs/files.ts
16644
- var SCOPE_FIELD = {
16645
- name: "scope",
16646
- type: "String",
16647
- required: false,
16648
- label: "Scope",
16649
- description: "Storage scope: WORKSPACE (shared across flows), FLOW (this flow only), EXECUTION (this run only)",
16650
- uiComponent: { type: "DROPDOWN", options: { values: ["WORKSPACE", "FLOW", "EXECUTION"] } },
16651
- defaultValue: "FLOW"
16652
- };
16653
- var filesTypeDefs = {
16654
- FilesUploadOptions: [
16655
- SCOPE_FIELD,
16656
- {
16657
- name: "filename",
16658
- type: "String",
16659
- required: false,
16660
- label: "Filename",
16661
- description: "Custom filename (defaults to the original name if omitted)",
16662
- uiComponent: { type: "SINGLE_LINE_TEXT" }
16663
- },
16664
- {
16665
- name: "ttl",
16666
- type: "Number",
16667
- required: false,
16668
- label: "URL TTL (seconds)",
16669
- description: "How long the download URL remains valid",
16670
- uiComponent: { type: "NUMERIC" }
16671
- },
16672
- {
16673
- name: "objectTtl",
16674
- type: "Number",
16675
- required: false,
16676
- label: "File TTL (seconds)",
16677
- description: "How long the file is kept in storage (omit for permanent storage)",
16678
- uiComponent: { type: "NUMERIC" }
16679
- },
16680
- {
16681
- name: "overwrite",
16682
- type: "Boolean",
16683
- required: false,
16684
- label: "Overwrite existing",
16685
- description: "Replace the file if one with the same name already exists",
16686
- uiComponent: { type: "TOGGLE" }
16687
- },
16688
- {
16689
- name: "generateUrl",
16690
- type: "Boolean",
16691
- required: false,
16692
- label: "Generate download URL",
16693
- description: "Include a pre-signed download URL in the response",
16694
- uiComponent: { type: "TOGGLE" },
16695
- defaultValue: true
16696
- }
16697
- ],
16698
- FilesListOptions: [
16699
- SCOPE_FIELD,
16700
- {
16701
- name: "limit",
16702
- type: "Number",
16703
- required: false,
16704
- label: "Limit",
16705
- description: "Maximum number of files to return",
16706
- uiComponent: { type: "NUMERIC" }
16707
- },
16708
- {
16709
- name: "ttl",
16710
- type: "Number",
16711
- required: false,
16712
- label: "URL TTL (seconds)",
16713
- description: "How long the download URLs remain valid",
16714
- uiComponent: { type: "NUMERIC" }
16715
- },
16716
- {
16717
- name: "generateUrl",
16718
- type: "Boolean",
16719
- required: false,
16720
- label: "Generate download URLs",
16721
- description: "Include pre-signed download URLs in the response",
16722
- uiComponent: { type: "TOGGLE" },
16723
- defaultValue: true
16724
- },
16725
- {
16726
- name: "cursor",
16727
- type: "String",
16728
- required: false,
16729
- label: "Cursor",
16730
- description: "Pagination cursor from a previous response",
16731
- uiComponent: { type: "SINGLE_LINE_TEXT" }
16732
- }
16733
- ],
16734
- FilesGetOptions: [
16735
- SCOPE_FIELD,
16736
- {
16737
- name: "ttl",
16738
- type: "Number",
16739
- required: false,
16740
- label: "URL TTL (seconds)",
16741
- description: "How long the download URL remains valid",
16742
- uiComponent: { type: "NUMERIC" }
16743
- },
16744
- {
16745
- name: "generateUrl",
16746
- type: "Boolean",
16747
- required: false,
16748
- label: "Generate download URL",
16749
- description: "Include a pre-signed download URL in the response",
16750
- uiComponent: { type: "TOGGLE" },
16751
- defaultValue: true
16752
- }
16753
- ],
16754
- FilesDeleteOptions: [
16755
- SCOPE_FIELD
16756
- ]
16757
- };
16758
-
16759
- // ../../jsdoc-parser/src/lib.ts
16760
- var import_fs = __toESM(require("fs"));
16761
- var import_path4 = __toESM(require("path"));
16762
- function resolveJSDocPath() {
16763
- const jsDocHolders = require.resolve.paths("jsdoc/lib") || [];
16764
- const jsDocPaths = jsDocHolders.map((p) => import_path4.default.join(p, "jsdoc/lib"));
16765
- for (let i = 0; i < jsDocPaths.length; i++) {
16766
- if (import_fs.default.existsSync(jsDocPaths[i])) {
16767
- return jsDocPaths[i];
16768
- }
16769
- }
16770
- throw new Error("Can not resolve path to JSDoc module.");
16771
- }
16772
- var jsdocPath = resolveJSDocPath();
16773
- var jsdocModulePath = (mod) => import_path4.default.join(jsdocPath, ...mod.split("/"));
16774
- var _jsdocRequire;
16775
- var jsdocRequire = (modulePath) => {
16776
- if (!_jsdocRequire) {
16777
- _jsdocRequire = require("requizzle")({
16778
- infect: true,
16779
- requirePaths: { before: [jsdocPath] }
16780
- });
16781
- const Config = _jsdocRequire(jsdocModulePath("jsdoc/config"));
16782
- const env = _jsdocRequire(jsdocModulePath("jsdoc/env"));
16783
- env.conf = new Config().get();
16784
- }
16785
- return _jsdocRequire(jsdocModulePath(modulePath));
16786
- };
16787
- function parseJSDoc(filePath) {
16788
- const parser = jsdocRequire("jsdoc/src/parser").createParser();
16789
- const handlers = jsdocRequire("jsdoc/src/handlers");
16790
- handlers.attachTo(parser);
16791
- return parser.parse([filePath]);
16792
- }
16793
-
16794
- // ../../jsdoc-parser/src/index.ts
16795
- var customTypeDef = {
16796
- FilesUploadOptions: filesTypeDefs.FilesUploadOptions,
16797
- FilesListOptions: filesTypeDefs.FilesListOptions,
16798
- FilesGetOptions: filesTypeDefs.FilesGetOptions,
16799
- FilesDeleteOptions: filesTypeDefs.FilesDeleteOptions
16800
- };
16801
- function findServiceClassName(doclets) {
16802
- const withIntegration = doclets.find((d) => {
16803
- if (d.kind === "class" && d.tags) {
16804
- return d.tags.find((t) => t.originalTitle === "integrationName");
16805
- }
16806
- });
16807
- if (withIntegration) {
16808
- return withIntegration.name;
16809
- }
16810
- return null;
16811
- }
16812
- function parseJSDocs(filePath) {
16813
- const doclets = parseJSDoc(filePath);
16814
- const className = findServiceClassName(doclets);
16815
- let serviceInfo = null;
16816
- const methods = [];
16817
- const typedefsMap = {};
16818
- doclets.forEach((d) => {
16819
- if (d.kind === "class" && d.name === className) {
16820
- serviceInfo = composeServiceInfo(d);
16821
- } else if (d.kind === "function" && d.memberof === className && d.scope === "instance") {
16822
- methods.push(composeMethod(d));
16823
- } else if (d.kind === "typedef") {
16824
- const typedefParams = collectTypedef(d);
16825
- if (typedefParams) {
16826
- typedefsMap[d.name] = typedefParams;
16827
- }
16828
- }
16829
- });
16830
- return {
16831
- serviceInfo,
16832
- methods,
16833
- // Extension-defined typedefs override built-ins so authors can customise if needed
16834
- typedefsMap: { ...customTypeDef, ...typedefsMap }
16835
- };
16836
- }
16837
- var ServiceInfoTagsProcessors = {
16838
- integrationName: (serviceInfo, tagValue) => {
16839
- serviceInfo.integrationName = tagValue || void 0;
16840
- },
16841
- integrationIcon: (serviceInfo, tagValue) => {
16842
- serviceInfo.integrationIcon = tagValue || null;
16843
- },
16844
- requireOAuth: (serviceInfo) => {
16845
- serviceInfo.requireOAuth = true;
16846
- },
16847
- integrationTriggersScope: (serviceInfo, tagValue) => {
16848
- serviceInfo.integrationTriggersScope = tagValue || null;
16849
- }
16850
- };
16851
- function composeServiceInfo(d) {
16852
- const serviceInfo = {
16853
- serviceClassName: d.name,
16854
- integrationName: d.name,
16855
- integrationIcon: null,
16856
- requireOAuth: void 0,
16857
- integrationTriggersScope: null
16858
- };
16859
- iterateTags(d.tags, (tagName, tagValue) => {
16860
- if (ServiceInfoTagsProcessors[tagName]) {
16861
- ServiceInfoTagsProcessors[tagName](serviceInfo, tagValue);
16862
- }
16863
- });
16864
- return serviceInfo;
16865
- }
16866
- function iterateTags(tags, cb) {
16867
- if (tags) {
16868
- tags.forEach((tag) => {
16869
- const title = tag.originalTitle;
16870
- const value = tag.value || tag.text || "";
16871
- cb(title, value, tag);
16872
- });
16873
- }
16874
- }
16875
- var MethodTagsProcessors = {
16876
- paramDef: (methodInfo, tagValue) => {
16877
- if (tagValue) {
16878
- const parsedValue = parseJSON(tagValue);
16879
- if (parsedValue) {
16880
- methodInfo.paramDefs.push(parsedValue);
16881
- }
16882
- }
16883
- },
16884
- route: (methodInfo, tagValue) => {
16885
- if (tagValue) {
16886
- methodInfo.route = tagValue;
16887
- }
16888
- },
16889
- registerAs: (methodInfo, tagValue) => {
16890
- if (tagValue) {
16891
- methodInfo.registerAs = tagValue;
16892
- }
16893
- },
16894
- operationName: (methodInfo, tagValue) => {
16895
- if (tagValue) {
16896
- methodInfo.operationName = tagValue;
16897
- }
16898
- },
16899
- customIcon: (methodInfo, tagValue) => {
16900
- if (tagValue) {
16901
- methodInfo.customIcon = tagValue;
16902
- }
16903
- },
16904
- category: (methodInfo, tagValue) => {
16905
- if (tagValue) {
16906
- methodInfo.category = tagValue;
16907
- }
16908
- },
16909
- description: (methodInfo, tagValue) => {
16910
- if (tagValue) {
16911
- methodInfo.description = tagValue;
16912
- }
16913
- },
16914
- appearanceColor: (methodInfo, tagValue) => {
16915
- if (tagValue) {
16916
- const colors = extractColors(tagValue);
16917
- methodInfo.colorStart = colors.colorStart;
16918
- methodInfo.colorEnd = colors.colorEnd;
16919
- }
16920
- },
16921
- private: (methodInfo) => {
16922
- methodInfo.private = true;
16923
- },
16924
- sampleResult: (methodInfo, tagValue) => {
16925
- if (tagValue) {
16926
- methodInfo.sampleResult = parseJSON(tagValue);
16927
- }
16928
- },
16929
- sampleResultLoader: (methodInfo, tagValue) => {
16930
- if (tagValue) {
16931
- methodInfo.sampleResultLoader = parseJSON(tagValue);
16932
- }
16933
- }
16934
- };
16935
- function composeMethod(m) {
16936
- const methodInfo = {
16937
- name: m.name,
16938
- description: m.description || "",
16939
- returnType: mapReturnType(m.returns?.[0].type?.names?.[0]),
16940
- registerAs: "",
16941
- colorStart: "",
16942
- colorEnd: "",
16943
- private: m.access === "private",
16944
- operationName: m.name,
16945
- customIcon: "",
16946
- category: "",
16947
- sampleResult: null,
16948
- sampleResultLoader: null,
16949
- routeStr: "",
16950
- paramDefs: []
16951
- };
16952
- if (m.params) {
16953
- m.params.forEach((p) => {
16954
- methodInfo.paramDefs.push({
16955
- name: p.name,
16956
- type: p.type?.names?.[0] || "String",
16957
- required: !p.optional
16958
- });
16959
- });
16960
- }
16961
- iterateTags(m.tags, (tagName, tagValue) => {
16962
- if (MethodTagsProcessors[tagName]) {
16963
- MethodTagsProcessors[tagName](methodInfo, tagValue);
16964
- }
16965
- });
16966
- return methodInfo;
16967
- }
16968
- var PRIMITIVES = ["String", "Object", "Boolean", "Number"];
16969
- var ParamTypesMap = {
16970
- String: "STRING",
16971
- Object: "OBJECT",
16972
- Boolean: "BOOLEAN",
16973
- Number: "NUMBER"
16974
- };
16975
- function mapParamType(type) {
16976
- if (!type) {
16977
- return "STRING";
16978
- }
16979
- if (type.startsWith("Array")) {
16980
- return "LIST";
16981
- }
16982
- return ParamTypesMap[type] || "STRING";
16983
- }
16984
- function mapReturnType(type) {
16985
- if (type) {
16986
- if (type === "Array" || type.startsWith("Array.") || type.startsWith("Array<")) return "LIST";
16987
- if (type === "Object") return "OBJECT";
16988
- if (type === "String") return "STRING";
16989
- }
16990
- return "VOID";
16991
- }
16992
- function collectTypedef(d) {
16993
- const defs = [];
16994
- iterateTags(d.tags, (title, value) => {
16995
- if (title === "paramDef") {
16996
- const parsedValue = parseJSON(value);
16997
- if (parsedValue) {
16998
- defs.push(parsedValue);
16999
- }
17000
- }
17001
- });
17002
- if (d.properties) {
17003
- d.properties.forEach((property) => {
17004
- const type = property?.type?.names?.[0];
17005
- defs.push({
17006
- name: property.name,
17007
- required: !property.optional,
17008
- description: property.description,
17009
- type
17010
- });
17011
- });
17012
- }
17013
- if (defs.length > 0) {
17014
- return defs;
17015
- }
17016
- }
17017
- function buildParam(paramDef, typedefsMap, nested = false) {
17018
- const isCustomType = !nested && paramDef.type && !PRIMITIVES.includes(paramDef.type) && !paramDef.type.startsWith("Array");
17019
- let properties;
17020
- if (isCustomType && typedefsMap[paramDef.type]) {
17021
- let subDefs = typedefsMap[paramDef.type];
17022
- if (paramDef.include?.length) {
17023
- const includeSet = new Set(paramDef.include);
17024
- subDefs = subDefs.filter((sd) => includeSet.has(sd.name));
17025
- }
17026
- if (subDefs.length > 0) {
17027
- properties = subDefs.map((sp) => buildParam(sp, typedefsMap, true));
17028
- }
17029
- }
17030
- const param = {
17031
- name: paramDef.name,
17032
- required: paramDef.required || false,
17033
- description: paramDef.description || "",
17034
- type: isCustomType ? "OBJECT" : mapParamType(paramDef.type)
17035
- };
17036
- if (nested) {
17037
- if (paramDef.label !== void 0) {
17038
- param.label = paramDef.label;
17039
- }
17040
- if (paramDef.uiComponent !== void 0) {
17041
- param.uiComponent = paramDef.uiComponent;
17042
- }
17043
- if (paramDef.dependsOn !== void 0) {
17044
- param.dependsOn = paramDef.dependsOn;
17045
- }
17046
- if (paramDef.dictionary !== void 0) {
17047
- param.dictionary = paramDef.dictionary;
17048
- }
17049
- if (paramDef.defaultValue !== void 0) {
17050
- param.defaultValue = paramDef.defaultValue;
17051
- }
17052
- }
17053
- if (properties && properties.length > 0) {
17054
- param.properties = properties;
17055
- }
17056
- if (param.type === "LIST") {
17057
- param.items = { type: "OBJECT" };
17058
- }
17059
- return param;
17060
- }
17061
- function buildMetaInfoArgs(paramDefs, typedefsMap) {
17062
- const args = {};
17063
- for (const pd of paramDefs) {
17064
- const isCustomType = pd.type && !PRIMITIVES.includes(pd.type) && !pd.type.startsWith("Array");
17065
- if (isCustomType && typedefsMap[pd.type]) {
17066
- const entry2 = {};
17067
- if (pd.label) entry2.label = pd.label;
17068
- args[pd.name] = entry2;
17069
- continue;
17070
- }
17071
- const entry = {};
17072
- if (pd.label) entry.label = pd.label;
17073
- if (pd.dictionary) entry.dictionary = pd.dictionary;
17074
- if (pd.dependsOn && pd.dependsOn.length > 0) entry.dependsOn = pd.dependsOn;
17075
- if (pd.uiComponent) entry.uiComponent = pd.uiComponent;
17076
- args[pd.name] = entry;
17077
- }
17078
- return args;
17079
- }
17080
- function extractColors(colorStr) {
17081
- if (!colorStr) {
17082
- return { colorStart: "", colorEnd: "" };
17083
- }
17084
- const colors = colorStr.split(/[,\s]+/).map((c) => c.trim()).filter(Boolean);
17085
- return {
17086
- colorStart: colors[0] || "",
17087
- colorEnd: colors[1] || colors[0] || ""
17088
- };
17089
- }
17090
- function parseJSON(str) {
17091
- try {
17092
- return JSON.parse(str);
17093
- } catch {
17094
- return null;
17095
- }
17096
- }
17097
- function parseJsDocToServiceJson(entryPoint) {
17098
- const { serviceInfo, methods, typedefsMap } = parseJSDocs(entryPoint);
17099
- const methodsMap = {};
17100
- for (const method of methods) {
17101
- if (method.private) {
17102
- continue;
17103
- }
17104
- const {
17105
- name,
17106
- route,
17107
- registerAs,
17108
- colorStart,
17109
- colorEnd,
17110
- operationName,
17111
- customIcon,
17112
- category,
17113
- description,
17114
- sampleResult,
17115
- sampleResultLoader,
17116
- paramDefs,
17117
- returnType
17118
- } = method;
17119
- const isSystem = registerAs === "SYSTEM";
17120
- const httpMethod = route ? route.split(/\s+/)[0].toUpperCase() : name.startsWith("get") ? "GET" : "POST";
17121
- const isQueryPlacement = httpMethod === "GET";
17122
- const params = paramDefs.map((pd) => buildParam(pd, typedefsMap));
17123
- const queryParams = isQueryPlacement ? params : [];
17124
- const bodyParams = isQueryPlacement ? [] : params;
17125
- const metaInfoArgs = paramDefs.length > 0 ? buildMetaInfoArgs(paramDefs, typedefsMap) : {};
17126
- methodsMap[name] = {
17127
- colorStart,
17128
- colorEnd,
17129
- queryParams,
17130
- // todo remove me
17131
- bodyParams,
17132
- customIcon: isSystem ? void 0 : customIcon,
17133
- registerAs,
17134
- category,
17135
- metaInfo: {
17136
- args: metaInfoArgs,
17137
- sampleResult: isSystem ? void 0 : sampleResult,
17138
- sampleResultLoader: isSystem ? void 0 : sampleResultLoader
17139
- },
17140
- returnType,
17141
- description,
17142
- operationName,
17143
- name
17144
- };
17145
- }
17146
- return {
17147
- runnerVersion: "v1",
17148
- //TODO: temp
17149
- methodsMap,
17150
- serviceInfo
17151
- };
16465
+ // src/runtime/index.ts
16466
+ function detectVersion(_serviceId, _serviceEntryPointPath) {
16467
+ return "v2";
17152
16468
  }
17153
16469
  // Annotate the CommonJS export names for ESM import in node:
17154
16470
  0 && (module.exports = {
17155
16471
  buildServiceDefinition,
17156
16472
  detectVersion,
17157
16473
  getServiceConfigs,
17158
- parseJsDocToServiceJson,
17159
16474
  resetRegistry,
17160
16475
  runServiceMethod
17161
16476
  });