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

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 (334) hide show
  1. package/ai-docs/instructions/service-code-format/01-service-structure.md +1 -1
  2. package/ai-docs/instructions/service-code-format/02-zod-types.md +6 -5
  3. package/ai-docs/instructions/service-code-format/05-dictionaries.md +1 -1
  4. package/ai-docs/instructions/service-code-format/11-output-model.md +2 -5
  5. package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +2 -3
  6. package/ai-docs/instructions/service-code-format/17-client-certificates.md +4 -5
  7. package/ai-docs/instructions/service-code-format/README.md +2 -2
  8. package/dist/cli.js +322 -896
  9. package/dist/cli.js.map +4 -4
  10. package/dist/index.js +340 -908
  11. package/dist/index.js.map +4 -4
  12. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/context/execution-context.d.ts +2 -2
  13. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/extension.d.ts +3 -3
  14. package/dist/types/flow-extension-runner/src/global.d.ts +6 -18
  15. package/dist/types/flow-extension-runner/src/index.d.ts +39 -13
  16. package/dist/types/flow-extension-runner/src/{v2/model → model}/field-mapper.d.ts +1 -1
  17. package/dist/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  18. package/dist/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  19. package/dist/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  20. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  21. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  22. package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  23. package/dist/types/flow-extension-runner/src/{v2/params → params}/types.d.ts +1 -1
  24. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/registry.d.ts +2 -0
  25. package/dist/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  26. package/dist/types/packages/cli/src/constants/testing.d.ts +13 -6
  27. package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +2 -4
  28. package/dist/types/shared/src/constants/activity-log.d.ts +248 -2
  29. package/dist/types/shared/src/constants/error-codes.d.ts +20 -0
  30. package/dist/types/shared/src/constants/flow-catalog.d.ts +54 -0
  31. package/dist/types/shared/src/constants/index.d.ts +2 -0
  32. package/dist/types/shared/src/constants/notification-types.d.ts +309 -0
  33. package/dist/types/shared/src/constants/panic-mode.d.ts +17 -0
  34. package/dist/types/shared/src/constants/shared-extensions.d.ts +10 -0
  35. package/dist/types/shared/src/errors/flow-catalog.d.ts +37 -0
  36. package/dist/types/shared/src/errors/index.d.ts +2 -0
  37. package/dist/types/shared/src/errors/secrets.d.ts +16 -0
  38. package/dist/types/shared/src/scheme/access-keys/dto.d.ts +35 -13
  39. package/dist/types/shared/src/scheme/api-keys/dto.d.ts +29 -4
  40. package/dist/types/shared/src/scheme/flow-catalog/analysis.d.ts +190 -0
  41. package/dist/types/shared/src/scheme/flow-catalog/index.d.ts +6 -0
  42. package/dist/types/shared/src/scheme/flow-catalog/pack.d.ts +144 -0
  43. package/dist/types/shared/src/scheme/flow-catalog/requests.d.ts +664 -0
  44. package/dist/types/shared/src/scheme/flow-catalog/summary.d.ts +69 -0
  45. package/dist/types/shared/src/scheme/flow-catalog/version.d.ts +132 -0
  46. package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -16
  47. package/dist/types/shared/src/scheme/flowrunner/index.d.ts +1 -0
  48. package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +102 -0
  49. package/dist/types/shared/src/scheme/flowrunner/workspace-dashboard.dto.d.ts +207 -0
  50. package/dist/types/shared/src/scheme/index.d.ts +1 -0
  51. package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +22 -0
  52. package/dist/types/shared/src/scheme/knowledge-base/dto.d.ts +12 -12
  53. package/dist/types/shared/src/scheme/notifications/dto.d.ts +10 -0
  54. package/dist/types/shared/src/scheme/notifications/rest.d.ts +20 -0
  55. package/dist/types/shared/src/scheme/properties/index.d.ts +1 -0
  56. package/dist/types/shared/src/scheme/properties/secret.d.ts +12 -0
  57. package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +142 -29
  58. package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +0 -4
  59. package/dist/types/shared/src/scheme/shared-extensions/config.d.ts +20 -2
  60. package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -24
  61. package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -18
  62. package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -3
  63. package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +1 -0
  64. package/dist/types/shared/src/scheme/shared-extensions/list.d.ts +0 -28
  65. package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -1
  66. package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -12
  67. package/dist/types/shared/src/scheme/shared-extensions/rest.d.ts +1 -0
  68. package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +0 -8
  69. package/dist/types/shared/src/scheme/shared-extensions/usage-stats.d.ts +189 -0
  70. package/package.json +1 -7
  71. package/project-files/sandbox/files-mock.js +3 -5
  72. package/project-files/sandbox/nock-mock.js +61 -5
  73. package/project-files/sandbox/service.js +10 -11
  74. package/runtime/index.js +178 -863
  75. package/runtime/index.js.map +4 -4
  76. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/context/execution-context.d.ts +2 -2
  77. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/extension.d.ts +3 -3
  78. package/runtime/types/flow-extension-runner/src/global.d.ts +6 -18
  79. package/runtime/types/flow-extension-runner/src/index.d.ts +39 -13
  80. package/runtime/types/flow-extension-runner/src/{v2/model → model}/field-mapper.d.ts +1 -1
  81. package/runtime/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  82. package/runtime/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  83. package/runtime/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  84. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  85. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  86. package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  87. package/runtime/types/flow-extension-runner/src/{v2/params → params}/types.d.ts +1 -1
  88. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/registry.d.ts +2 -0
  89. package/runtime/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  90. package/runtime/types/packages/cli/src/runtime/index.d.ts +6 -5
  91. package/dist/types/flow-extension-runner/src/common/config.d.ts +0 -12
  92. package/dist/types/flow-extension-runner/src/common/context.d.ts +0 -6
  93. package/dist/types/flow-extension-runner/src/common/types.d.ts +0 -11
  94. package/dist/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  95. package/dist/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  96. package/dist/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  97. package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  98. package/dist/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  99. package/dist/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  100. package/dist/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  101. package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  102. package/dist/types/jsdoc-parser/src/index.d.ts +0 -2
  103. package/dist/types/jsdoc-parser/src/lib.d.ts +0 -42
  104. package/dist/types/jsdoc-parser/src/types.d.ts +0 -2
  105. package/runtime/types/flow-extension-runner/src/common/config.d.ts +0 -12
  106. package/runtime/types/flow-extension-runner/src/common/context.d.ts +0 -6
  107. package/runtime/types/flow-extension-runner/src/common/types.d.ts +0 -11
  108. package/runtime/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  109. package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  110. package/runtime/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  111. package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  112. package/runtime/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  113. package/runtime/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  114. package/runtime/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  115. package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  116. package/runtime/types/jsdoc-parser/src/index.d.ts +0 -2
  117. package/runtime/types/jsdoc-parser/src/lib.d.ts +0 -42
  118. package/runtime/types/jsdoc-parser/src/types.d.ts +0 -2
  119. package/runtime/types/shared/src/constants/activity-log.d.ts +0 -1573
  120. package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +0 -20
  121. package/runtime/types/shared/src/constants/ai.d.ts +0 -11
  122. package/runtime/types/shared/src/constants/api-keys.d.ts +0 -1
  123. package/runtime/types/shared/src/constants/app.d.ts +0 -57
  124. package/runtime/types/shared/src/constants/billing.d.ts +0 -16
  125. package/runtime/types/shared/src/constants/compliances.d.ts +0 -3
  126. package/runtime/types/shared/src/constants/data-types.d.ts +0 -26
  127. package/runtime/types/shared/src/constants/docs.d.ts +0 -6
  128. package/runtime/types/shared/src/constants/error-codes.d.ts +0 -20
  129. package/runtime/types/shared/src/constants/flow.d.ts +0 -12
  130. package/runtime/types/shared/src/constants/index.d.ts +0 -18
  131. package/runtime/types/shared/src/constants/knowledge-base.d.ts +0 -15
  132. package/runtime/types/shared/src/constants/notification-types.d.ts +0 -1234
  133. package/runtime/types/shared/src/constants/notifications.d.ts +0 -10
  134. package/runtime/types/shared/src/constants/oauth-connection-error.d.ts +0 -3
  135. package/runtime/types/shared/src/constants/patterns.d.ts +0 -28
  136. package/runtime/types/shared/src/constants/retry-policy.d.ts +0 -30
  137. package/runtime/types/shared/src/constants/severity.d.ts +0 -9
  138. package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +0 -6
  139. package/runtime/types/shared/src/constants/shared-extensions.d.ts +0 -56
  140. package/runtime/types/shared/src/constants/zod.d.ts +0 -2
  141. package/runtime/types/shared/src/errors/api.d.ts +0 -15
  142. package/runtime/types/shared/src/errors/base.d.ts +0 -38
  143. package/runtime/types/shared/src/errors/common.d.ts +0 -39
  144. package/runtime/types/shared/src/errors/index.d.ts +0 -14
  145. package/runtime/types/shared/src/errors/k8s.d.ts +0 -14
  146. package/runtime/types/shared/src/errors/message.d.ts +0 -48
  147. package/runtime/types/shared/src/errors/oauth-connection.d.ts +0 -4
  148. package/runtime/types/shared/src/errors/open-search.d.ts +0 -4
  149. package/runtime/types/shared/src/errors/s3.d.ts +0 -11
  150. package/runtime/types/shared/src/extensions/zod.d.ts +0 -25
  151. package/runtime/types/shared/src/scheme/access-keys/dto.d.ts +0 -101
  152. package/runtime/types/shared/src/scheme/access-keys/index.d.ts +0 -2
  153. package/runtime/types/shared/src/scheme/account/dto.d.ts +0 -63
  154. package/runtime/types/shared/src/scheme/account/index.d.ts +0 -1
  155. package/runtime/types/shared/src/scheme/activity-log-base.d.ts +0 -35
  156. package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +0 -69
  157. package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +0 -2
  158. package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +0 -7
  159. package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +0 -23
  160. package/runtime/types/shared/src/scheme/ai-router/index.d.ts +0 -2
  161. package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +0 -28
  162. package/runtime/types/shared/src/scheme/api-keys/index.d.ts +0 -2
  163. package/runtime/types/shared/src/scheme/app/index.d.ts +0 -1
  164. package/runtime/types/shared/src/scheme/app/java.dto.d.ts +0 -6
  165. package/runtime/types/shared/src/scheme/billing/index.d.ts +0 -1
  166. package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +0 -181
  167. package/runtime/types/shared/src/scheme/crm/billing.d.ts +0 -149
  168. package/runtime/types/shared/src/scheme/crm/dto.d.ts +0 -218
  169. package/runtime/types/shared/src/scheme/crm/index.d.ts +0 -3
  170. package/runtime/types/shared/src/scheme/data-types/index.d.ts +0 -1
  171. package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +0 -22
  172. package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +0 -30
  173. package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +0 -2
  174. package/runtime/types/shared/src/scheme/extensions/index.d.ts +0 -1
  175. package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +0 -14
  176. package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -383
  177. package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +0 -3
  178. package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +0 -655
  179. package/runtime/types/shared/src/scheme/index.d.ts +0 -21
  180. package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +0 -135
  181. package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +0 -2
  182. package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +0 -776
  183. package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +0 -2
  184. package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +0 -9
  185. package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +0 -2
  186. package/runtime/types/shared/src/scheme/notifications/dto.d.ts +0 -118
  187. package/runtime/types/shared/src/scheme/notifications/index.d.ts +0 -3
  188. package/runtime/types/shared/src/scheme/notifications/rest.d.ts +0 -162
  189. package/runtime/types/shared/src/scheme/onboarding/dto.d.ts +0 -29
  190. package/runtime/types/shared/src/scheme/onboarding/index.d.ts +0 -1
  191. package/runtime/types/shared/src/scheme/properties/account.d.ts +0 -3
  192. package/runtime/types/shared/src/scheme/properties/app.d.ts +0 -5
  193. package/runtime/types/shared/src/scheme/properties/billing.d.ts +0 -12
  194. package/runtime/types/shared/src/scheme/properties/common.d.ts +0 -2
  195. package/runtime/types/shared/src/scheme/properties/db.d.ts +0 -8
  196. package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +0 -7
  197. package/runtime/types/shared/src/scheme/properties/index.d.ts +0 -7
  198. package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +0 -278
  199. package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +0 -2
  200. package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +0 -62
  201. package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +0 -96
  202. package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -631
  203. package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -411
  204. package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -64
  205. package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +0 -17
  206. package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +0 -38
  207. package/runtime/types/shared/src/scheme/shared-extensions/list.d.ts +0 -250
  208. package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +0 -21
  209. package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -112
  210. package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +0 -48
  211. package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +0 -11
  212. package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -373
  213. package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +0 -9
  214. package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +0 -189
  215. package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +0 -10
  216. package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +0 -16
  217. package/runtime/types/shared/src/scheme/shared-extensions/workspace-stack.d.ts +0 -44
  218. package/runtime/types/shared/src/scheme/workspace/dto.d.ts +0 -40
  219. package/runtime/types/shared/src/scheme/workspace/index.d.ts +0 -1
  220. package/runtime/types/shared/src/utils/object.d.ts +0 -8
  221. package/runtime/types/shared/src/utils/uuid.d.ts +0 -5
  222. package/runtime/types/shared/src/utils/versions.d.ts +0 -4
  223. package/dist/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  224. package/dist/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  225. package/dist/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  226. package/dist/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  227. package/dist/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  228. package/dist/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  229. package/dist/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  230. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  231. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  232. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  233. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  234. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  235. package/dist/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  236. package/dist/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  237. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  238. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  239. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  240. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  241. package/dist/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  242. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/files-options.d.ts +4 -4
  243. /package/dist/types/flow-extension-runner/src/{v2/params → params}/index.d.ts +0 -0
  244. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  245. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  246. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  247. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +0 -0
  248. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  249. /package/dist/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  250. /package/dist/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  251. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  252. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  253. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  254. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/date-format.d.ts +0 -0
  255. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  256. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/defaults.d.ts +0 -0
  257. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  258. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/field-plan.d.ts +0 -0
  259. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +0 -0
  260. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  261. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/notices.d.ts +0 -0
  262. /package/dist/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  263. /package/dist/types/flow-extension-runner/src/{v2/params → params}/zod.d.ts +0 -0
  264. /package/dist/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  265. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  266. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  267. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  268. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  269. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  270. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  271. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  272. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  273. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  274. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  275. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  276. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  277. /package/dist/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  278. /package/dist/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
  279. /package/runtime/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  280. /package/runtime/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  281. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  282. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  283. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  284. /package/runtime/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  285. /package/runtime/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  286. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  287. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  288. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  289. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  290. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  291. /package/runtime/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  292. /package/runtime/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  293. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  294. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  295. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  296. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  297. /package/runtime/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  298. /package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/files-options.d.ts +0 -0
  299. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/index.d.ts +0 -0
  300. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  301. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  302. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  303. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +0 -0
  304. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  305. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  306. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  307. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  308. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  309. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  310. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/date-format.d.ts +0 -0
  311. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  312. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/defaults.d.ts +0 -0
  313. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  314. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/field-plan.d.ts +0 -0
  315. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +0 -0
  316. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  317. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/notices.d.ts +0 -0
  318. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  319. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/zod.d.ts +0 -0
  320. /package/runtime/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  321. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  322. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  323. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  324. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  325. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  326. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  327. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  328. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  329. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  330. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  331. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  332. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  333. /package/runtime/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  334. /package/runtime/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -8881,11 +8881,11 @@ var require_mime_types = __commonJS({
8881
8881
  }
8882
8882
  return exts[0];
8883
8883
  }
8884
- function lookup(path19) {
8885
- if (!path19 || typeof path19 !== "string") {
8884
+ function lookup(path18) {
8885
+ if (!path18 || typeof path18 !== "string") {
8886
8886
  return false;
8887
8887
  }
8888
- var extension2 = extname("x." + path19).toLowerCase().substr(1);
8888
+ var extension2 = extname("x." + path18).toLowerCase().substr(1);
8889
8889
  if (!extension2) {
8890
8890
  return false;
8891
8891
  }
@@ -10048,7 +10048,7 @@ var require_form_data = __commonJS({
10048
10048
  "use strict";
10049
10049
  var CombinedStream = require_combined_stream();
10050
10050
  var util = require("util");
10051
- var path19 = require("path");
10051
+ var path18 = require("path");
10052
10052
  var http2 = require("http");
10053
10053
  var https = require("https");
10054
10054
  var parseUrl = require("url").parse;
@@ -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 = path19.normalize(options.filepath).replace(/\\/g, "/");
10183
+ filename = path18.normalize(options.filepath).replace(/\\/g, "/");
10184
10184
  } else if (options.filename || value && (value.name || value.path)) {
10185
- filename = path19.basename(options.filename || value && (value.name || value.path));
10185
+ filename = path18.basename(options.filename || value && (value.name || value.path));
10186
10186
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10187
- filename = path19.basename(value.client._httpMessage.path || "");
10187
+ filename = path18.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(path19) {
10439
- return path19.split("/").map(ensureComponentEncoding).join("/");
10438
+ function encodePath(path18) {
10439
+ return path18.split("/").map(ensureComponentEncoding).join("/");
10440
10440
  }
10441
- function ensureEncoding(path19) {
10441
+ function ensureEncoding(path18) {
10442
10442
  try {
10443
- var url = new URL(path19);
10444
- return url.origin + encodePath(normalizeTrailingSlashInPath(path19, url)) + url.search;
10443
+ var url = new URL(path18);
10444
+ return url.origin + encodePath(normalizeTrailingSlashInPath(path18, url)) + url.search;
10445
10445
  } catch (_unused) {
10446
- return encodePath(path19);
10446
+ return encodePath(path18);
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(path19, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10801
+ function sendNodeAPIRequest(path18, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10802
10802
  return new Promise(function(resolve, reject) {
10803
- var u = require("url").parse(path19);
10803
+ var u = require("url").parse(path18);
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)(path19, u) + (u.search || ""),
10809
+ path: (0, _utils.normalizeTrailingSlashInPath)(path18, 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(path19, method, body) {
11217
+ function Request2(path18, 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)(path19);
11222
+ _this.path = (0, _utils.ensureEncoding)(path18);
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 path19 = this.path;
11451
+ var path18 = this.path;
11452
11452
  var queryString = qs.stringify(this.queryParams);
11453
11453
  if (queryString) {
11454
- path19 += "?" + queryString;
11454
+ path18 += "?" + 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(path19), body, this.headers);
11471
+ console.log(this.method.toUpperCase(), decodeURIComponent(path18), 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(path19, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials, this.tlsOptions).then(function(res) {
11475
+ var request = Request2.send(path18, 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(path19, method, headers, body, encoding, timeout, withCredentials) {
11584
+ function sendXmlHttpRequest(path18, 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(), path19, true);
11591
+ request.open(method.toUpperCase(), path18, 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(path19, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11664
+ _request.Request.send = function(path18, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11665
11665
  var sender = typeof _request.Request.XMLHttpRequest !== "undefined" ? _clientBrowser.sendXmlHttpRequest : _clientNode.sendNodeAPIRequest;
11666
- return sender(path19, method, headers, body, encoding, timeout, withCredentials, tlsOptions);
11666
+ return sender(path18, 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(path19, body) {
11673
- return new _request.Request(path19, method, body);
11672
+ _request.Request[method] = function(path18, body) {
11673
+ return new _request.Request(path18, method, body);
11674
11674
  };
11675
11675
  });
11676
11676
  exports2 = module2.exports = _request.Request;
@@ -12011,25 +12011,25 @@ var require_utils2 = __commonJS({
12011
12011
  }
12012
12012
  mkdirSync(folder);
12013
12013
  };
12014
- Utils.prototype.writeFileTo = function(path19, content, overwrite, attr) {
12014
+ Utils.prototype.writeFileTo = function(path18, content, overwrite, attr) {
12015
12015
  const self = this;
12016
- if (self.fs.existsSync(path19)) {
12016
+ if (self.fs.existsSync(path18)) {
12017
12017
  if (!overwrite) return false;
12018
- var stat = self.fs.statSync(path19);
12018
+ var stat = self.fs.statSync(path18);
12019
12019
  if (stat.isDirectory()) {
12020
12020
  return false;
12021
12021
  }
12022
12022
  }
12023
- var folder = pth.dirname(path19);
12023
+ var folder = pth.dirname(path18);
12024
12024
  if (!self.fs.existsSync(folder)) {
12025
12025
  self.makeDir(folder);
12026
12026
  }
12027
12027
  var fd;
12028
12028
  try {
12029
- fd = self.fs.openSync(path19, "w", 438);
12029
+ fd = self.fs.openSync(path18, "w", 438);
12030
12030
  } catch (e) {
12031
- self.fs.chmodSync(path19, 438);
12032
- fd = self.fs.openSync(path19, "w", 438);
12031
+ self.fs.chmodSync(path18, 438);
12032
+ fd = self.fs.openSync(path18, "w", 438);
12033
12033
  }
12034
12034
  if (fd) {
12035
12035
  try {
@@ -12038,22 +12038,22 @@ var require_utils2 = __commonJS({
12038
12038
  self.fs.closeSync(fd);
12039
12039
  }
12040
12040
  }
12041
- self.fs.chmodSync(path19, attr || 438);
12041
+ self.fs.chmodSync(path18, attr || 438);
12042
12042
  return true;
12043
12043
  };
12044
- Utils.prototype.writeFileToAsync = function(path19, content, overwrite, attr, callback) {
12044
+ Utils.prototype.writeFileToAsync = function(path18, content, overwrite, attr, callback) {
12045
12045
  if (typeof attr === "function") {
12046
12046
  callback = attr;
12047
12047
  attr = void 0;
12048
12048
  }
12049
12049
  const self = this;
12050
- self.fs.exists(path19, function(exist) {
12050
+ self.fs.exists(path18, function(exist) {
12051
12051
  if (exist && !overwrite) return callback(false);
12052
- self.fs.stat(path19, function(err, stat) {
12052
+ self.fs.stat(path18, function(err, stat) {
12053
12053
  if (exist && stat && stat.isDirectory()) {
12054
12054
  return callback(false);
12055
12055
  }
12056
- var folder = pth.dirname(path19);
12056
+ var folder = pth.dirname(path18);
12057
12057
  self.fs.exists(folder, function(exists) {
12058
12058
  if (!exists) {
12059
12059
  try {
@@ -12066,16 +12066,16 @@ var require_utils2 = __commonJS({
12066
12066
  self.fs.write(fd, content, 0, content.length, 0, function(writeErr) {
12067
12067
  self.fs.close(fd, function() {
12068
12068
  if (writeErr) return callback(false);
12069
- self.fs.chmod(path19, attr || 438, function() {
12069
+ self.fs.chmod(path18, attr || 438, function() {
12070
12070
  callback(true);
12071
12071
  });
12072
12072
  });
12073
12073
  });
12074
12074
  };
12075
- self.fs.open(path19, "w", 438, function(err2, fd) {
12075
+ self.fs.open(path18, "w", 438, function(err2, fd) {
12076
12076
  if (err2) {
12077
- self.fs.chmod(path19, 438, function() {
12078
- self.fs.open(path19, "w", 438, function(retryErr, fd2) {
12077
+ self.fs.chmod(path18, 438, function() {
12078
+ self.fs.open(path18, "w", 438, function(retryErr, fd2) {
12079
12079
  if (retryErr || !fd2) return callback(false);
12080
12080
  writeToFd(fd2);
12081
12081
  });
@@ -12111,10 +12111,10 @@ var require_utils2 = __commonJS({
12111
12111
  if (stat.isSymbolicLink()) throw Errors.FILE_IN_THE_WAY(`"${cur}"`);
12112
12112
  }
12113
12113
  };
12114
- Utils.prototype.findFiles = function(path19) {
12114
+ Utils.prototype.findFiles = function(path18) {
12115
12115
  const self = this;
12116
12116
  const canLstat = typeof self.fs.lstatSync === "function";
12117
- const rootReal = self.fs.realpathSync(path19);
12117
+ const rootReal = self.fs.realpathSync(path18);
12118
12118
  function escapesRoot(p) {
12119
12119
  if (!canLstat) return false;
12120
12120
  if (!self.fs.lstatSync(p).isSymbolicLink()) return false;
@@ -12133,23 +12133,23 @@ var require_utils2 = __commonJS({
12133
12133
  }
12134
12134
  let files = [];
12135
12135
  self.fs.readdirSync(dir).forEach(function(file) {
12136
- const path20 = pth.join(dir, file);
12137
- if (escapesRoot(path20)) return;
12138
- const stat = self.fs.statSync(path20);
12139
- if (!pattern || pattern.test(path20)) {
12140
- files.push(pth.normalize(path20) + (stat.isDirectory() ? self.sep : ""));
12136
+ const path19 = pth.join(dir, file);
12137
+ if (escapesRoot(path19)) return;
12138
+ const stat = self.fs.statSync(path19);
12139
+ if (!pattern || pattern.test(path19)) {
12140
+ files.push(pth.normalize(path19) + (stat.isDirectory() ? self.sep : ""));
12141
12141
  }
12142
12142
  if (stat.isDirectory() && recursive) {
12143
- const realDir = self.fs.realpathSync(path20);
12143
+ const realDir = self.fs.realpathSync(path19);
12144
12144
  if (!visited.has(realDir)) {
12145
12145
  visited.add(realDir);
12146
- files = files.concat(findSync(path20, pattern, recursive, visited));
12146
+ files = files.concat(findSync(path19, pattern, recursive, visited));
12147
12147
  }
12148
12148
  }
12149
12149
  });
12150
12150
  return files;
12151
12151
  }
12152
- return findSync(path19, void 0, true, /* @__PURE__ */ new Set([rootReal]));
12152
+ return findSync(path18, void 0, true, /* @__PURE__ */ new Set([rootReal]));
12153
12153
  };
12154
12154
  Utils.prototype.findFilesAsync = function(dir, cb) {
12155
12155
  const self = this;
@@ -12246,14 +12246,14 @@ var require_utils2 = __commonJS({
12246
12246
  return "UNSUPPORTED (" + method + ")";
12247
12247
  }
12248
12248
  };
12249
- Utils.canonical = function(path19) {
12250
- if (!path19) return "";
12251
- const safeSuffix = pth.posix.normalize("/" + path19.split("\\").join("/"));
12249
+ Utils.canonical = function(path18) {
12250
+ if (!path18) return "";
12251
+ const safeSuffix = pth.posix.normalize("/" + path18.split("\\").join("/"));
12252
12252
  return pth.join(".", safeSuffix);
12253
12253
  };
12254
- Utils.zipnamefix = function(path19) {
12255
- if (!path19) return "";
12256
- const safeSuffix = pth.posix.normalize("/" + path19.split("\\").join("/"));
12254
+ Utils.zipnamefix = function(path18) {
12255
+ if (!path18) return "";
12256
+ const safeSuffix = pth.posix.normalize("/" + path18.split("\\").join("/"));
12257
12257
  return pth.posix.join(".", safeSuffix);
12258
12258
  };
12259
12259
  Utils.findLast = function(arr, callback) {
@@ -12270,9 +12270,9 @@ var require_utils2 = __commonJS({
12270
12270
  prefix = pth.resolve(pth.normalize(prefix));
12271
12271
  var parts = name.split("/");
12272
12272
  for (var i = 0, l = parts.length; i < l; i++) {
12273
- var path19 = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));
12274
- if (path19 === prefix || path19.startsWith(prefix + pth.sep)) {
12275
- return path19;
12273
+ var path18 = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));
12274
+ if (path18 === prefix || path18.startsWith(prefix + pth.sep)) {
12275
+ return path18;
12276
12276
  }
12277
12277
  }
12278
12278
  return pth.normalize(pth.join(prefix, pth.basename(name)));
@@ -12322,8 +12322,8 @@ var require_utils2 = __commonJS({
12322
12322
  var require_fattr = __commonJS({
12323
12323
  "node_modules/adm-zip/util/fattr.js"(exports2, module2) {
12324
12324
  var pth = require("path");
12325
- module2.exports = function(path19, { fs: fs18 }) {
12326
- var _path = path19 || "", _obj = newAttr(), _stat = null;
12325
+ module2.exports = function(path18, { fs: fs18 }) {
12326
+ var _path = path18 || "", _obj = newAttr(), _stat = null;
12327
12327
  function newAttr() {
12328
12328
  return {
12329
12329
  directory: false,
@@ -14631,8 +14631,10 @@ var TESTING_FILES = [
14631
14631
  ];
14632
14632
  var TEST_DEV_DEPENDENCIES = {
14633
14633
  jest: "^30.0.0",
14634
- nock: "^14.0.0",
14635
- "query-string": "^7.1.3"
14634
+ nock: "^14.0.0"
14635
+ };
14636
+ var TEST_OVERRIDES = {
14637
+ glob: "^13.0.7"
14636
14638
  };
14637
14639
  var TEST_SCRIPTS = {
14638
14640
  test: "jest",
@@ -14791,7 +14793,7 @@ var HttpError = class extends CliError {
14791
14793
 
14792
14794
  // src/operations/deploy/index.ts
14793
14795
  var import_fs7 = __toESM(require("fs"));
14794
- var import_path11 = __toESM(require("path"));
14796
+ var import_path10 = __toESM(require("path"));
14795
14797
 
14796
14798
  // src/api/console-client.ts
14797
14799
  function authorizeUrl({ serverUrl, callbackUrl, workspaceId }) {
@@ -14990,8 +14992,8 @@ function emitter(options) {
14990
14992
  }
14991
14993
 
14992
14994
  // src/operations/deploy/discover-services.ts
14993
- var import_fs4 = __toESM(require("fs"));
14994
- var import_path7 = __toESM(require("path"));
14995
+ var import_fs3 = __toESM(require("fs"));
14996
+ var import_path6 = __toESM(require("path"));
14995
14997
 
14996
14998
  // ../../flow-extension-runner/src/namespace.ts
14997
14999
  var import_backendless_request2 = __toESM(require_lib());
@@ -15036,9 +15038,9 @@ var FlowExtensionErrorCodes = {
15036
15038
  DUPLICATE_ITEM_ID: "FR_EXT_DUPLICATE_ITEM_ID",
15037
15039
  // No v2 extension registered for the given serviceId after requiring the module.
15038
15040
  EXTENSION_NOT_REGISTERED: "FR_EXT_NOT_REGISTERED",
15039
- // A declared config value is missing or the wrong shape (see v2/schema/normalize).
15041
+ // A declared config value is missing or the wrong shape (see params/schema/normalize).
15040
15042
  INVALID_CONFIG: "FR_EXT_INVALID_CONFIG",
15041
- // A schema slot that must be a z.object was declared as something else (see v2/schema/assert-object-schema).
15043
+ // A schema slot that must be a z.object was declared as something else (see params/schema/assert-object-schema).
15042
15044
  INVALID_SCHEMA: "FR_EXT_INVALID_SCHEMA",
15043
15045
  // A polling trigger declared zero or multiple mechanisms, or is missing its fetch.
15044
15046
  INVALID_TRIGGER_CONFIG: "FR_EXT_INVALID_TRIGGER_CONFIG",
@@ -15133,7 +15135,7 @@ var InvalidConfigError = class extends FlowExtensionError {
15133
15135
  };
15134
15136
  var InvalidSchemaError = class extends FlowExtensionError {
15135
15137
  // `message` is composed by the guard, which knows how to describe what was received and what to do
15136
- // about it (see v2/schema/assert-object-schema.ts).
15138
+ // about it (see params/schema/assert-object-schema.ts).
15137
15139
  constructor(message, details) {
15138
15140
  super(FlowExtensionErrorCodes.INVALID_SCHEMA, 400, message, details);
15139
15141
  }
@@ -15185,12 +15187,12 @@ var InvalidDictionaryOutputScheme = class extends FlowExtensionError {
15185
15187
  }
15186
15188
  };
15187
15189
 
15188
- // ../../flow-extension-runner/src/v2/loaders/loader-owner.ts
15190
+ // ../../flow-extension-runner/src/loaders/loader-owner.ts
15189
15191
  var sampleResultLoaderName = (ownerId) => `${ownerId}_SampleResultLoader`;
15190
15192
  var dynamicParamsLoaderName = (ownerId) => `${ownerId}_DynamicParams`;
15191
15193
  var dynamicPropsLoaderName = (ownerId, field) => `${ownerId}_${field}_DynamicProps`;
15192
15194
 
15193
- // ../../flow-extension-runner/src/v2/params/schema/assert-object-schema.ts
15195
+ // ../../flow-extension-runner/src/params/schema/assert-object-schema.ts
15194
15196
  var WRAPPERS = /* @__PURE__ */ new Set(["optional", "nullable", "nullish", "default", "prefault"]);
15195
15197
  var typeOf = (value) => value?._zod?.def?.type;
15196
15198
  function describe(value) {
@@ -15239,7 +15241,7 @@ function assertObjectSchema(scheme, source) {
15239
15241
  );
15240
15242
  }
15241
15243
 
15242
- // ../../flow-extension-runner/src/v2/params/widget-types.ts
15244
+ // ../../flow-extension-runner/src/params/widget-types.ts
15243
15245
  var FlowExtensionParamGroupTypes = {
15244
15246
  FILE_UPLOAD_OPTIONS: "FILE_UPLOAD_OPTIONS",
15245
15247
  FILE_LIST_OPTIONS: "FILE_LIST_OPTIONS",
@@ -15266,7 +15268,7 @@ var FlowExtensionParamWidgetTypes = {
15266
15268
  TIME_PICKER: "TIME_PICKER"
15267
15269
  };
15268
15270
 
15269
- // ../../flow-extension-runner/src/v2/params/schema/introspect.ts
15271
+ // ../../flow-extension-runner/src/params/schema/introspect.ts
15270
15272
  var OPTIONAL_WRAPPERS = /* @__PURE__ */ new Set(["optional", "nullable", "nullish"]);
15271
15273
  var DEFAULT_WRAPPERS = /* @__PURE__ */ new Set(["default", "prefault"]);
15272
15274
  var TRANSPARENT_WRAPPERS = /* @__PURE__ */ new Set(["readonly", "pipe", "lazy"]);
@@ -15422,7 +15424,7 @@ function shapeEntries(schema) {
15422
15424
  return shape && typeof shape === "object" ? Object.entries(shape) : [];
15423
15425
  }
15424
15426
 
15425
- // ../../flow-extension-runner/src/v2/params/schema/date-format.ts
15427
+ // ../../flow-extension-runner/src/params/schema/date-format.ts
15426
15428
  var ISO_PATTERNS = {
15427
15429
  date: "yyyy-MM-dd",
15428
15430
  datetime: "yyyy-MM-dd'T'HH:mm",
@@ -15768,7 +15770,7 @@ function hasDateFormat(schema, seen = /* @__PURE__ */ new Set()) {
15768
15770
  return children.some((child) => hasDateFormat(child, seen));
15769
15771
  }
15770
15772
 
15771
- // ../../flow-extension-runner/src/v2/params/schema/dictionary-binding.ts
15773
+ // ../../flow-extension-runner/src/params/schema/dictionary-binding.ts
15772
15774
  var DictionaryScope = class _DictionaryScope {
15773
15775
  constructor(top, visible) {
15774
15776
  this.top = top;
@@ -15801,7 +15803,7 @@ function publishedBinding(binding, scope2) {
15801
15803
  return { id: binding.id, dependsOn: resolveDependsOn(binding, scope2).dependsOn };
15802
15804
  }
15803
15805
 
15804
- // ../../flow-extension-runner/src/v2/params/schema/assert-supported-schema.ts
15806
+ // ../../flow-extension-runner/src/params/schema/assert-supported-schema.ts
15805
15807
  var GUARDED_KINDS = /* @__PURE__ */ new Set(["action", "dictionary", "polling trigger", "realtime trigger", "extension"]);
15806
15808
  var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
15807
15809
  "string",
@@ -15822,31 +15824,31 @@ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
15822
15824
  ]);
15823
15825
  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()";
15824
15826
  var MODIFIER_SPELLING = ".optional(), .nullable(), .nullish(), .default(v), .prefault(v), .readonly(), .nonoptional(), .pipe(\u2026)/.transform(\u2026) and z.lazy(\u2026)";
15825
- function subjectOf(source, path19) {
15827
+ function subjectOf(source, path18) {
15826
15828
  const kind = source.kind ?? "extension";
15827
15829
  const subject = source.itemId ? `${kind} "${source.itemId}": ` : "";
15828
- return `${subject}\`${path19}\``;
15830
+ return `${subject}\`${path18}\``;
15829
15831
  }
15830
- function refuse(message, source, path19, received) {
15832
+ function refuse(message, source, path18, received) {
15831
15833
  throw new InvalidSchemaError(
15832
15834
  `[flow-extension:${source.serviceId}] ${message}`,
15833
- { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path: path19, received }
15835
+ { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path: path18, received }
15834
15836
  );
15835
15837
  }
15836
- function refuseCatch(source, path19) {
15838
+ function refuseCatch(source, path18) {
15837
15839
  refuse(
15838
- `${subjectOf(source, path19)} 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.`,
15840
+ `${subjectOf(source, path18)} 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.`,
15839
15841
  source,
15840
- path19,
15842
+ path18,
15841
15843
  "catch"
15842
15844
  );
15843
15845
  }
15844
- function refuseType(source, path19, type) {
15846
+ function refuseType(source, path18, type) {
15845
15847
  const received = type ? `z.${type}()` : "a value that is not a zod schema";
15846
15848
  refuse(
15847
- `${subjectOf(source, path19)} 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}.`,
15849
+ `${subjectOf(source, path18)} 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}.`,
15848
15850
  source,
15849
- path19,
15851
+ path18,
15850
15852
  type ?? "unknown"
15851
15853
  );
15852
15854
  }
@@ -15862,7 +15864,7 @@ function isLooseObject(schema) {
15862
15864
  function isDynamicPropsSlot(source, topLevel) {
15863
15865
  return topLevel && source.kind === "action" && source.slot === "params";
15864
15866
  }
15865
- function assertDynamicProps(schema, name, siblings, source, path19) {
15867
+ function assertDynamicProps(schema, name, siblings, source, path18) {
15866
15868
  const ins = inspect(schema);
15867
15869
  const spec = ins.meta.frDynamicProps;
15868
15870
  if (!spec) {
@@ -15873,49 +15875,49 @@ function assertDynamicProps(schema, name, siblings, source, path19) {
15873
15875
  }
15874
15876
  if (typeof spec.execute !== "function") {
15875
15877
  refuse(
15876
- `${subjectOf(source, path19)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
15878
+ `${subjectOf(source, path18)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
15877
15879
  source,
15878
- path19,
15880
+ path18,
15879
15881
  typeof spec.execute
15880
15882
  );
15881
15883
  }
15882
15884
  if (spec.dependsOn !== void 0 && (!Array.isArray(spec.dependsOn) || spec.dependsOn.some((item) => typeof item !== "string"))) {
15883
15885
  refuse(
15884
- `${subjectOf(source, path19)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
15886
+ `${subjectOf(source, path18)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
15885
15887
  source,
15886
- path19,
15888
+ path18,
15887
15889
  "dependsOn"
15888
15890
  );
15889
15891
  }
15890
15892
  for (const dependency of spec.dependsOn ?? []) {
15891
15893
  if (dependency === name || !siblings.includes(dependency)) {
15892
15894
  refuse(
15893
- `${subjectOf(source, path19)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
15895
+ `${subjectOf(source, path18)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
15894
15896
  source,
15895
- path19,
15897
+ path18,
15896
15898
  dependency
15897
15899
  );
15898
15900
  }
15899
15901
  }
15900
15902
  if (ins.meta.frDictionary) {
15901
15903
  refuse(
15902
- `${subjectOf(source, path19)} 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.`,
15904
+ `${subjectOf(source, path18)} 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.`,
15903
15905
  source,
15904
- path19,
15906
+ path18,
15905
15907
  "dictionary"
15906
15908
  );
15907
15909
  }
15908
15910
  const element = ins.resolvedType === "array" ? ins.core?._zod?.def?.element : void 0;
15909
15911
  if (!isLooseObject(schema) && !isLooseObject(element)) {
15910
15912
  refuse(
15911
- `${subjectOf(source, path19)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
15913
+ `${subjectOf(source, path18)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
15912
15914
  source,
15913
- path19,
15915
+ path18,
15914
15916
  ins.resolvedType ?? "unknown"
15915
15917
  );
15916
15918
  }
15917
15919
  }
15918
- function assertDictionaryBinding(schema, source, path19, scope2) {
15920
+ function assertDictionaryBinding(schema, source, path18, scope2) {
15919
15921
  const binding = inspect(schema).meta.frDictionary;
15920
15922
  if (!binding) {
15921
15923
  return;
@@ -15923,14 +15925,14 @@ function assertDictionaryBinding(schema, source, path19, scope2) {
15923
15925
  const { clash } = resolveDependsOn(binding, scope2);
15924
15926
  if (clash) {
15925
15927
  refuse(
15926
- `${subjectOf(source, path19)} 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.`,
15928
+ `${subjectOf(source, path18)} 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.`,
15927
15929
  source,
15928
- path19,
15930
+ path18,
15929
15931
  clash.names.join(", ")
15930
15932
  );
15931
15933
  }
15932
15934
  }
15933
- function assertDateString(schema, source, path19) {
15935
+ function assertDateString(schema, source, path18) {
15934
15936
  const ins = inspect(schema);
15935
15937
  const pattern = ins.meta.frDateFormat;
15936
15938
  const kind = dateStringKind(ins);
@@ -15938,9 +15940,9 @@ function assertDateString(schema, source, path19) {
15938
15940
  const format = ins.core?._zod?.def?.format;
15939
15941
  const zoned = ins.coreType === "string" && format === "datetime";
15940
15942
  refuse(
15941
- `${subjectOf(source, path19)} 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.`,
15943
+ `${subjectOf(source, path18)} 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.`,
15942
15944
  source,
15943
- path19,
15945
+ path18,
15944
15946
  zoned ? "datetime" : ins.resolvedType ?? "unknown"
15945
15947
  );
15946
15948
  }
@@ -15952,7 +15954,7 @@ function assertDateString(schema, source, path19) {
15952
15954
  compilePattern(pattern, kind);
15953
15955
  } catch (error) {
15954
15956
  if (error instanceof DateFormatError) {
15955
- refuse(`${subjectOf(source, path19)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path19, pattern);
15957
+ refuse(`${subjectOf(source, path18)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path18, pattern);
15956
15958
  }
15957
15959
  throw error;
15958
15960
  }
@@ -15965,14 +15967,14 @@ function assertDateString(schema, source, path19) {
15965
15967
  const fits = typeof fallback === "string" && (pattern !== void 0 ? !!parseInPattern(fallback, pattern, kind) : ((parts) => !!parts && toCanonical(parts, kind) === fallback)(parseIso(fallback, kind)));
15966
15968
  if (!fits) {
15967
15969
  refuse(
15968
- `${subjectOf(source, path19)} 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.`,
15970
+ `${subjectOf(source, path18)} 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.`,
15969
15971
  source,
15970
- path19,
15972
+ path18,
15971
15973
  String(fallback)
15972
15974
  );
15973
15975
  }
15974
15976
  }
15975
- function assertField(schema, source, path19, seen, scope2, topLevel = false) {
15977
+ function assertField(schema, source, path18, seen, scope2, topLevel = false) {
15976
15978
  if (!schema || seen.has(schema)) {
15977
15979
  return;
15978
15980
  }
@@ -15980,35 +15982,35 @@ function assertField(schema, source, path19, seen, scope2, topLevel = false) {
15980
15982
  const ins = inspect(schema);
15981
15983
  if (ins.meta.frDynamicProps && !isDynamicPropsSlot(source, topLevel)) {
15982
15984
  refuse(
15983
- `${subjectOf(source, path19)} 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.`,
15985
+ `${subjectOf(source, path18)} 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.`,
15984
15986
  source,
15985
- path19,
15987
+ path18,
15986
15988
  "dynamicProps"
15987
15989
  );
15988
15990
  }
15989
15991
  if (ins.resolvedType === "catch") {
15990
- refuseCatch(source, path19);
15992
+ refuseCatch(source, path18);
15991
15993
  }
15992
- assertDictionaryBinding(schema, source, path19, scope2);
15993
- assertDateString(schema, source, path19);
15994
+ assertDictionaryBinding(schema, source, path18, scope2);
15995
+ assertDateString(schema, source, path18);
15994
15996
  if (!ins.resolvedType || !SUPPORTED_TYPES.has(ins.resolvedType)) {
15995
- refuseType(source, path19, ins.resolvedType);
15997
+ refuseType(source, path18, ins.resolvedType);
15996
15998
  }
15997
15999
  if (ins.branches) {
15998
- ins.branches.forEach((branch, index) => assertField(branch, source, `${path19}|branch ${index + 1}`, seen, scope2));
16000
+ ins.branches.forEach((branch, index) => assertField(branch, source, `${path18}|branch ${index + 1}`, seen, scope2));
15999
16001
  }
16000
16002
  const def = ins.core._zod?.def ?? {};
16001
16003
  if (ins.resolvedType === "array") {
16002
- assertField(def.element, source, `${path19}[]`, seen, scope2);
16004
+ assertField(def.element, source, `${path18}[]`, seen, scope2);
16003
16005
  }
16004
16006
  if (ins.resolvedType === "record") {
16005
- assertField(def.valueType, source, `${path19}{}`, seen, scope2);
16007
+ assertField(def.valueType, source, `${path18}{}`, seen, scope2);
16006
16008
  }
16007
16009
  if (ins.resolvedType === "object") {
16008
16010
  const properties = shapeEntries(ins.core);
16009
16011
  const inner = scope2.enter(properties.map(([name]) => name));
16010
16012
  for (const [name, property] of properties) {
16011
- assertField(property, source, `${path19}.${name}`, seen, inner);
16013
+ assertField(property, source, `${path18}.${name}`, seen, inner);
16012
16014
  }
16013
16015
  }
16014
16016
  }
@@ -16029,7 +16031,7 @@ function assertSupportedSchema(scheme, source) {
16029
16031
  }
16030
16032
  }
16031
16033
 
16032
- // ../../flow-extension-runner/src/v2/params/schema/dates.ts
16034
+ // ../../flow-extension-runner/src/params/schema/dates.ts
16033
16035
  var DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
16034
16036
  var HAS_TIME = /^(\d{4}-\d{2}-\d{2})[T ](.+)$/;
16035
16037
  var ZONE = /(Z|[+-]\d{2}:?\d{2})$/;
@@ -16108,7 +16110,7 @@ function hasPassThroughDate(schema, inspectSchema, entriesOf) {
16108
16110
  return children.some((child) => hasPassThroughDate(child, inspectSchema, entriesOf));
16109
16111
  }
16110
16112
 
16111
- // ../../flow-extension-runner/src/v2/params/schema/labels.ts
16113
+ // ../../flow-extension-runner/src/params/schema/labels.ts
16112
16114
  var ACRONYMS = /* @__PURE__ */ new Set([
16113
16115
  "id",
16114
16116
  "url",
@@ -16142,7 +16144,7 @@ function humanizeKey(name) {
16142
16144
  }
16143
16145
  var labelOf = (name, schema) => inspect(schema).meta.title || humanizeKey(name) || name;
16144
16146
 
16145
- // ../../flow-extension-runner/src/v2/params/schema/field-plan.ts
16147
+ // ../../flow-extension-runner/src/params/schema/field-plan.ts
16146
16148
  function declaredAbsence(schema) {
16147
16149
  let current = schema;
16148
16150
  let acceptsUndefined = false;
@@ -16253,7 +16255,7 @@ function planField(name, schema) {
16253
16255
  };
16254
16256
  }
16255
16257
 
16256
- // ../../flow-extension-runner/src/v2/params/schema/notices.ts
16258
+ // ../../flow-extension-runner/src/params/schema/notices.ts
16257
16259
  var sink;
16258
16260
  var currentField;
16259
16261
  function collectNotices(fn) {
@@ -16280,7 +16282,7 @@ function notice(entry) {
16280
16282
  sink?.push({ field: currentField, ...entry });
16281
16283
  }
16282
16284
 
16283
- // ../../flow-extension-runner/src/v2/params/schema/coerce.ts
16285
+ // ../../flow-extension-runner/src/params/schema/coerce.ts
16284
16286
  var ok = (value) => ({ ok: true, value });
16285
16287
  var fail = (expected) => ({ ok: false, expected });
16286
16288
  var TRUE = /* @__PURE__ */ new Set(["true", "1", "yes", "y", "t", "on", "checked", "enabled", "enable", "active"]);
@@ -16512,7 +16514,7 @@ function absentAs(schema, value) {
16512
16514
  return absence === "null" ? null : void 0;
16513
16515
  }
16514
16516
 
16515
- // ../../flow-extension-runner/src/v2/params/schema/defaults.ts
16517
+ // ../../flow-extension-runner/src/params/schema/defaults.ts
16516
16518
  var WIDGET_DESCRIPTIONS = {
16517
16519
  [FlowExtensionParamWidgetTypes.MULTI_LINE_TEXT]: "Expects text; line breaks are allowed"
16518
16520
  };
@@ -16549,7 +16551,7 @@ var FORMAT_DESCRIPTIONS = {
16549
16551
  cidrv6: "Expects an IPv6 range, e.g. 2001:db8::/32"
16550
16552
  };
16551
16553
 
16552
- // ../../flow-extension-runner/src/v2/params/schema/messages.ts
16554
+ // ../../flow-extension-runner/src/params/schema/messages.ts
16553
16555
  var EXPECTED = {
16554
16556
  string: "a string",
16555
16557
  number: "a number",
@@ -16670,55 +16672,55 @@ function isAuthored(issue) {
16670
16672
  }
16671
16673
  function toFieldIssue(plan2, issue, fieldValue) {
16672
16674
  const segments = (issue.path ?? []).map(String).filter(Boolean);
16673
- const path19 = segments.length ? `${plan2.name}.${segments.join(".")}` : plan2.name;
16675
+ const path18 = segments.length ? `${plan2.name}.${segments.join(".")}` : plan2.name;
16674
16676
  const code = issue.code ?? "custom";
16675
16677
  const target = resolveTarget(plan2, segments, fieldValue);
16676
16678
  const named = { ...plan2, label: target.label };
16677
16679
  if (isAuthored(issue)) {
16678
- return { path: path19, code, message: issue.message };
16680
+ return { path: path18, code, message: issue.message };
16679
16681
  }
16680
16682
  if (code === "invalid_format" && target.schema && inspect(target.schema).branches) {
16681
16683
  const combined = unionPhrases(target.schema, target.value);
16682
16684
  if (combined.length > 1) {
16683
- return { path: path19, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
16685
+ return { path: path18, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
16684
16686
  }
16685
16687
  }
16686
16688
  const dateKind = target.schema ? dateStringKind(inspect(target.schema)) : void 0;
16687
16689
  const dateMissing = target.value == null || target.value === "";
16688
16690
  if (dateKind && (code === "invalid_type" || code === "invalid_format")) {
16689
- return dateMissing ? { path: path19, code, message: requiredMessage(named) } : { path: path19, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
16691
+ return dateMissing ? { path: path18, code, message: requiredMessage(named) } : { path: path18, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
16690
16692
  }
16691
16693
  if (code === "invalid_type") {
16692
16694
  const received = issue.received;
16693
16695
  const absent = segments.length ? target.found && target.value == null : received === "undefined" || received === "null" || issue.expected === void 0;
16694
- return absent ? { path: path19, code, message: requiredMessage(named) } : { path: path19, code, message: invalidTypeMessage(named, issue.expected ?? "") };
16696
+ return absent ? { path: path18, code, message: requiredMessage(named) } : { path: path18, code, message: invalidTypeMessage(named, issue.expected ?? "") };
16695
16697
  }
16696
16698
  if (code === "too_small") {
16697
- return { path: path19, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan2)}` };
16699
+ return { path: path18, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan2)}` };
16698
16700
  }
16699
16701
  if (code === "too_big") {
16700
- return { path: path19, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan2)}` };
16702
+ return { path: path18, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan2)}` };
16701
16703
  }
16702
16704
  if (code === "invalid_value") {
16703
- return { path: path19, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
16705
+ return { path: path18, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
16704
16706
  }
16705
16707
  if (code === "invalid_format") {
16706
16708
  const described = FORMAT_DESCRIPTIONS[issue.format ?? ""];
16707
- return described ? { path: path19, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path: path19, code, message: `\xAB${target.label}\xBB has an invalid format` };
16709
+ return described ? { path: path18, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path: path18, code, message: `\xAB${target.label}\xBB has an invalid format` };
16708
16710
  }
16709
16711
  if (code === "invalid_union") {
16710
16712
  if (segments.length && target.found && target.value == null) {
16711
- return { path: path19, code, message: requiredMessage(named) };
16713
+ return { path: path18, code, message: requiredMessage(named) };
16712
16714
  }
16713
16715
  const combined = unionIssue(plan2, issue, target.schema, target.value, fieldValue);
16714
16716
  if (combined) {
16715
- return combined.path ? combined : { path: path19, code, message: `\xAB${target.label}\xBB ${combined.message}` };
16717
+ return combined.path ? combined : { path: path18, code, message: `\xAB${target.label}\xBB ${combined.message}` };
16716
16718
  }
16717
16719
  }
16718
- return { path: path19, code, message: `\xAB${target.label}\xBB is invalid` };
16720
+ return { path: path18, code, message: `\xAB${target.label}\xBB is invalid` };
16719
16721
  }
16720
16722
 
16721
- // ../../flow-extension-runner/src/v2/params/schema/normalize.ts
16723
+ // ../../flow-extension-runner/src/params/schema/normalize.ts
16722
16724
  var resolved = (value) => ({ value, present: true, issues: [] });
16723
16725
  var rejected = (issues) => ({ present: false, issues });
16724
16726
  function isAbsent(value, plan2) {
@@ -16826,7 +16828,7 @@ function restoreDeep(output, original, schema) {
16826
16828
  }
16827
16829
  var isPlain = (value) => !!value && typeof value === "object" && !Array.isArray(value);
16828
16830
 
16829
- // ../../flow-extension-runner/src/v2/params/schema/parse.ts
16831
+ // ../../flow-extension-runner/src/params/schema/parse.ts
16830
16832
  var EXPECTED2 = {
16831
16833
  string: "a string",
16832
16834
  number: "a number",
@@ -16836,10 +16838,10 @@ var EXPECTED2 = {
16836
16838
  };
16837
16839
  function toIssues(error, param) {
16838
16840
  return (error?.issues ?? []).map((issue) => {
16839
- const path19 = (issue.path ?? []).map(String).join(".");
16841
+ const path18 = (issue.path ?? []).map(String).join(".");
16840
16842
  const expected = issue.expected;
16841
- const restated = param && !path19 && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
16842
- return { path: path19, message: restated ?? issue.message ?? "invalid value", code: issue.code };
16843
+ const restated = param && !path18 && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
16844
+ return { path: path18, message: restated ?? issue.message ?? "invalid value", code: issue.code };
16843
16845
  });
16844
16846
  }
16845
16847
  function parseSchema(schema, value, fail2, param) {
@@ -16853,7 +16855,7 @@ function parseSchema(schema, value, fail2, param) {
16853
16855
  return result.data;
16854
16856
  }
16855
16857
 
16856
- // ../../flow-extension-runner/src/v2/params/params.ts
16858
+ // ../../flow-extension-runner/src/params/params.ts
16857
16859
  var Params = class {
16858
16860
  constructor(scheme, source = {}) {
16859
16861
  this.source = source;
@@ -16908,7 +16910,7 @@ var Params = class {
16908
16910
  }
16909
16911
  };
16910
16912
 
16911
- // ../../flow-extension-runner/src/v2/params/config-params.ts
16913
+ // ../../flow-extension-runner/src/params/config-params.ts
16912
16914
  var ConfigParams = class _ConfigParams extends Params {
16913
16915
  static of(scheme, source = {}) {
16914
16916
  return new _ConfigParams(scheme, source);
@@ -16931,7 +16933,7 @@ var ConfigParams = class _ConfigParams extends Params {
16931
16933
  }
16932
16934
  };
16933
16935
 
16934
- // ../../flow-extension-runner/src/v2/params/method-params.ts
16936
+ // ../../flow-extension-runner/src/params/method-params.ts
16935
16937
  var MethodParams = class _MethodParams extends Params {
16936
16938
  static of(scheme, source = {}) {
16937
16939
  return new _MethodParams(scheme, source);
@@ -16957,10 +16959,10 @@ var MethodParams = class _MethodParams extends Params {
16957
16959
  }
16958
16960
  };
16959
16961
 
16960
- // ../../flow-extension-runner/src/v2/params/zod.ts
16962
+ // ../../flow-extension-runner/src/params/zod.ts
16961
16963
  var import_zod2 = require("zod");
16962
16964
 
16963
- // ../../flow-extension-runner/src/v2/params/files-options.ts
16965
+ // ../../flow-extension-runner/src/params/files-options.ts
16964
16966
  var import_zod = require("zod");
16965
16967
  var SCOPE_VALUES = ["WORKSPACE", "FLOW", "EXECUTION"];
16966
16968
  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");
@@ -17016,7 +17018,7 @@ function filesDeleteOptions(include) {
17016
17018
  return group("filesDeleteOptions", FlowExtensionParamWidgetTypes.FILE_DELETE_OPTIONS, DELETE_FIELDS, include);
17017
17019
  }
17018
17020
 
17019
- // ../../flow-extension-runner/src/v2/params/zod.ts
17021
+ // ../../flow-extension-runner/src/params/zod.ts
17020
17022
  var extended = false;
17021
17023
  function extendPrototype() {
17022
17024
  if (extended) {
@@ -17087,7 +17089,7 @@ Object.defineProperties(namespace, {
17087
17089
  });
17088
17090
  var z = namespace;
17089
17091
 
17090
- // ../../flow-extension-runner/src/v2/params/json/values.ts
17092
+ // ../../flow-extension-runner/src/params/json/values.ts
17091
17093
  function toJsonValue(value) {
17092
17094
  if (typeof value === "bigint") {
17093
17095
  return { $bigint: value.toString() };
@@ -17104,7 +17106,7 @@ function toJsonValue(value) {
17104
17106
  return value;
17105
17107
  }
17106
17108
 
17107
- // ../../flow-extension-runner/src/v2/params/json/checks.ts
17109
+ // ../../flow-extension-runner/src/params/json/checks.ts
17108
17110
  var defOf = (check) => check?._zod?.def ?? {};
17109
17111
  function messageOf(source) {
17110
17112
  const { error } = source;
@@ -17183,10 +17185,10 @@ function encodeChecks(core) {
17183
17185
  return { checks, unsupported };
17184
17186
  }
17185
17187
 
17186
- // ../../flow-extension-runner/src/v2/params/json/types.ts
17188
+ // ../../flow-extension-runner/src/params/json/types.ts
17187
17189
  var SCHEMA_JSON_VERSION = 1;
17188
17190
 
17189
- // ../../flow-extension-runner/src/v2/params/json/decode.ts
17191
+ // ../../flow-extension-runner/src/params/json/decode.ts
17190
17192
  var FORMAT_FACTORIES = {
17191
17193
  url: z.url,
17192
17194
  email: z.email,
@@ -17216,7 +17218,7 @@ var FORMAT_FACTORIES = {
17216
17218
  duration: z.iso?.duration
17217
17219
  };
17218
17220
 
17219
- // ../../flow-extension-runner/src/v2/params/json/encode.ts
17221
+ // ../../flow-extension-runner/src/params/json/encode.ts
17220
17222
  var FIELD_TYPES = /* @__PURE__ */ new Set([
17221
17223
  "string",
17222
17224
  "number",
@@ -17384,7 +17386,7 @@ function encodeParams(scheme, options = {}) {
17384
17386
  };
17385
17387
  }
17386
17388
 
17387
- // ../../flow-extension-runner/src/v2/context/method-input.ts
17389
+ // ../../flow-extension-runner/src/context/method-input.ts
17388
17390
  var MethodInput = class {
17389
17391
  constructor(serviceId, methodName, data = {}) {
17390
17392
  this.serviceId = serviceId;
@@ -17442,7 +17444,7 @@ var MethodInput = class {
17442
17444
  }
17443
17445
  };
17444
17446
 
17445
- // ../../flow-extension-runner/src/v2/method.ts
17447
+ // ../../flow-extension-runner/src/method.ts
17446
17448
  var ExtensionMethod = class {
17447
17449
  constructor(extension) {
17448
17450
  this.extension = extension;
@@ -17471,7 +17473,7 @@ var ExtensionMethod = class {
17471
17473
  }
17472
17474
  };
17473
17475
 
17474
- // ../../flow-extension-runner/src/common/constants.ts
17476
+ // ../../flow-extension-runner/src/params/config-types.ts
17475
17477
  var ServiceConfigItemTypes = {
17476
17478
  STRING: "string",
17477
17479
  BOOL: "bool",
@@ -17480,7 +17482,7 @@ var ServiceConfigItemTypes = {
17480
17482
  TEXT: "text"
17481
17483
  };
17482
17484
 
17483
- // ../../flow-extension-runner/src/v2/model/field-mapper.ts
17485
+ // ../../flow-extension-runner/src/model/field-mapper.ts
17484
17486
  var descriptionOf = (schema) => inspect(schema).meta.description || "";
17485
17487
  var isRequired = (schema) => absenceOf(schema).absence === "required";
17486
17488
  var isParamGroup = (ins) => ins.coreType === "object" && !!ins.meta.frWidget;
@@ -17587,7 +17589,7 @@ function fieldToConfigItem(name, schema) {
17587
17589
  };
17588
17590
  }
17589
17591
 
17590
- // ../../flow-extension-runner/src/v2/model/method-model.ts
17592
+ // ../../flow-extension-runner/src/model/method-model.ts
17591
17593
  function opaqueParam(name, type = "OBJECT") {
17592
17594
  return { name, required: false, description: "", type };
17593
17595
  }
@@ -17609,7 +17611,7 @@ function argsFromParams(params) {
17609
17611
  return args;
17610
17612
  }
17611
17613
 
17612
- // ../../flow-extension-runner/src/v2/model/params-model.ts
17614
+ // ../../flow-extension-runner/src/model/params-model.ts
17613
17615
  function toBodyParams(params) {
17614
17616
  const scope2 = DictionaryScope.ROOT.enter(params.keys());
17615
17617
  return params.fields().map(([name, schema]) => fieldToParam(name, schema, { scope: scope2 }));
@@ -17628,7 +17630,7 @@ function toConfigItems(config) {
17628
17630
  return config.fields().map(([name, schema]) => fieldToConfigItem(name, schema));
17629
17631
  }
17630
17632
 
17631
- // ../../flow-extension-runner/src/v2/result.ts
17633
+ // ../../flow-extension-runner/src/result.ts
17632
17634
  function inferReturnType(value) {
17633
17635
  if (Array.isArray(value)) {
17634
17636
  return "LIST";
@@ -17696,7 +17698,7 @@ var ResultSpec = class _ResultSpec {
17696
17698
  }
17697
17699
  };
17698
17700
 
17699
- // ../../flow-extension-runner/src/v2/actions/action-method.ts
17701
+ // ../../flow-extension-runner/src/actions/action-method.ts
17700
17702
  var ActionMethod = class extends ExtensionMethod {
17701
17703
  constructor(extension, props) {
17702
17704
  super(extension);
@@ -17822,7 +17824,7 @@ var ActionMethod = class extends ExtensionMethod {
17822
17824
  }
17823
17825
  };
17824
17826
 
17825
- // ../../flow-extension-runner/src/common/context-files.ts
17827
+ // ../../flow-extension-runner/src/context/files.ts
17826
17828
  var import_backendless_request = __toESM(require_lib());
17827
17829
  var FileScope = {
17828
17830
  WORKSPACE: "WORKSPACE",
@@ -17830,7 +17832,7 @@ var FileScope = {
17830
17832
  EXECUTION: "EXECUTION"
17831
17833
  };
17832
17834
 
17833
- // ../../flow-extension-runner/src/v2/context/logger.ts
17835
+ // ../../flow-extension-runner/src/context/logger.ts
17834
17836
  var defaultLogger = {
17835
17837
  debug: () => {
17836
17838
  },
@@ -17840,7 +17842,7 @@ var defaultLogger = {
17840
17842
  error: (...args) => console.error(...args)
17841
17843
  };
17842
17844
 
17843
- // ../../flow-extension-runner/src/v2/context/proxies.ts
17845
+ // ../../flow-extension-runner/src/context/proxies.ts
17844
17846
  function createThrowingProxy(feature, hint2) {
17845
17847
  const fail2 = () => {
17846
17848
  throw new FeatureNotEnabledError(feature, hint2);
@@ -17860,7 +17862,7 @@ function createThrowingProxy(feature, hint2) {
17860
17862
  );
17861
17863
  }
17862
17864
 
17863
- // ../../flow-extension-runner/src/v2/context/execution-context.ts
17865
+ // ../../flow-extension-runner/src/context/execution-context.ts
17864
17866
  var ExecutionContext = class _ExecutionContext {
17865
17867
  #extension;
17866
17868
  #options;
@@ -17962,14 +17964,14 @@ var ExecutionContext = class _ExecutionContext {
17962
17964
  }
17963
17965
  };
17964
17966
 
17965
- // ../../flow-extension-runner/src/v2/dictionaries/payload-schema.ts
17967
+ // ../../flow-extension-runner/src/dictionaries/payload-schema.ts
17966
17968
  var DictionaryPayloadSchema = z.looseObject({
17967
17969
  search: z.string().optional(),
17968
17970
  cursor: z.union([z.string(), z.number()]).nullish(),
17969
17971
  criteria: z.record(z.string(), z.unknown()).optional()
17970
17972
  });
17971
17973
 
17972
- // ../../flow-extension-runner/src/v2/dictionaries/dictionary-method.ts
17974
+ // ../../flow-extension-runner/src/dictionaries/dictionary-method.ts
17973
17975
  var isBlank2 = (value) => value === void 0 || value === null || value === "";
17974
17976
  var DictionaryMethod = class extends ExtensionMethod {
17975
17977
  constructor(extension, props) {
@@ -18114,7 +18116,7 @@ var DictionaryMethod = class extends ExtensionMethod {
18114
18116
  };
18115
18117
  }
18116
18118
  // Describe the full payload shape so the method advertises a complete, labelled input scheme (nested
18117
- // props inline their own labels — mirroring the v1 jsdoc-parser layout).
18119
+ // props inline their own labels — mirroring the layout the v1 JSDoc parser established).
18118
18120
  #payloadParam() {
18119
18121
  const properties = [
18120
18122
  { name: "search", required: false, description: "Optional search string to filter results.", type: "STRING", label: "Search" },
@@ -18140,12 +18142,12 @@ var DictionaryMethod = class extends ExtensionMethod {
18140
18142
  }
18141
18143
  };
18142
18144
 
18143
- // ../../flow-extension-runner/src/v2/loaders/payload-schema.ts
18145
+ // ../../flow-extension-runner/src/loaders/payload-schema.ts
18144
18146
  var LoaderPayloadSchema = z.looseObject({
18145
18147
  criteria: z.record(z.string(), z.unknown()).optional()
18146
18148
  });
18147
18149
 
18148
- // ../../flow-extension-runner/src/v2/loaders/loader-method.ts
18150
+ // ../../flow-extension-runner/src/loaders/loader-method.ts
18149
18151
  var LoaderMethod = class extends ExtensionMethod {
18150
18152
  constructor(extension, owner) {
18151
18153
  super(extension);
@@ -18299,17 +18301,17 @@ var DynamicPropsLoaderMethod = class extends ParamsLoaderMethod {
18299
18301
  }
18300
18302
  };
18301
18303
 
18302
- // ../../flow-extension-runner/src/v2/oauth/oauth2.ts
18304
+ // ../../flow-extension-runner/src/oauth/oauth2.ts
18303
18305
  var import_crypto = __toESM(require("crypto"));
18304
18306
 
18305
- // ../../flow-extension-runner/src/v2/oauth/method-names.ts
18307
+ // ../../flow-extension-runner/src/oauth/method-names.ts
18306
18308
  var OAUTH_SYSTEM_METHODS = {
18307
18309
  CONNECTION_URL: "getOAuth2ConnectionURL",
18308
18310
  EXECUTE_CALLBACK: "executeCallback",
18309
18311
  REFRESH_TOKEN: "refreshToken"
18310
18312
  };
18311
18313
 
18312
- // ../../flow-extension-runner/src/v2/oauth/system-params.ts
18314
+ // ../../flow-extension-runner/src/oauth/system-params.ts
18313
18315
  var OAuthCallbackObjectSchema = z.looseObject({
18314
18316
  code: z.string().optional(),
18315
18317
  redirectURI: z.string().optional(),
@@ -18318,7 +18320,7 @@ var OAuthCallbackObjectSchema = z.looseObject({
18318
18320
  });
18319
18321
  var RefreshTokenSchema = z.string().min(1);
18320
18322
 
18321
- // ../../flow-extension-runner/src/v2/oauth/oauth2.ts
18323
+ // ../../flow-extension-runner/src/oauth/oauth2.ts
18322
18324
  var OAuth2 = class {
18323
18325
  constructor(extension, props) {
18324
18326
  this.extension = extension;
@@ -18463,10 +18465,10 @@ function userDataOf(token) {
18463
18465
  return token && typeof token === "object" ? token.userData : void 0;
18464
18466
  }
18465
18467
 
18466
- // ../../flow-extension-runner/src/v2/polling-triggers/method-names.ts
18468
+ // ../../flow-extension-runner/src/polling-triggers/method-names.ts
18467
18469
  var POLLING_SYSTEM_METHOD = "handleTriggerPollingForEvent";
18468
18470
 
18469
- // ../../flow-extension-runner/src/v2/polling-triggers/system-params.ts
18471
+ // ../../flow-extension-runner/src/polling-triggers/system-params.ts
18470
18472
  var PollingInvocationSchema = z.looseObject({
18471
18473
  eventName: z.string().min(1),
18472
18474
  // The trigger instance's configured params — validated against the trigger's own schema separately.
@@ -18476,7 +18478,7 @@ var PollingInvocationSchema = z.looseObject({
18476
18478
  connectionId: z.string().nullish()
18477
18479
  });
18478
18480
 
18479
- // ../../flow-extension-runner/src/v2/polling-triggers/polling-triggers.ts
18481
+ // ../../flow-extension-runner/src/polling-triggers/polling-triggers.ts
18480
18482
  var PollingTriggers = class {
18481
18483
  constructor(extension) {
18482
18484
  this.extension = extension;
@@ -18515,15 +18517,15 @@ var PollingTriggers = class {
18515
18517
  }
18516
18518
  };
18517
18519
 
18518
- // ../../flow-extension-runner/src/v2/path.ts
18519
- function getPath(source, path19) {
18520
- return path19.split(".").reduce(
18520
+ // ../../flow-extension-runner/src/path.ts
18521
+ function getPath(source, path18) {
18522
+ return path18.split(".").reduce(
18521
18523
  (acc, key) => acc == null ? acc : acc[key],
18522
18524
  source
18523
18525
  );
18524
18526
  }
18525
18527
 
18526
- // ../../flow-extension-runner/src/v2/polling-triggers/mechanisms.ts
18528
+ // ../../flow-extension-runner/src/polling-triggers/mechanisms.ts
18527
18529
  var PollingMechanism = class {
18528
18530
  /**
18529
18531
  * Pick the strategy an author declared, rejecting the combinations that cannot work. Runs at REGISTRATION
@@ -18657,7 +18659,7 @@ var WatermarkMechanism = class extends FetchingMechanism {
18657
18659
  }
18658
18660
  };
18659
18661
 
18660
- // ../../flow-extension-runner/src/v2/polling-triggers/trigger-method.ts
18662
+ // ../../flow-extension-runner/src/polling-triggers/trigger-method.ts
18661
18663
  var PollingTriggerMethod = class extends ExtensionMethod {
18662
18664
  constructor(extension, props) {
18663
18665
  super(extension);
@@ -18727,7 +18729,7 @@ var PollingTriggerMethod = class extends ExtensionMethod {
18727
18729
  }
18728
18730
  };
18729
18731
 
18730
- // ../../flow-extension-runner/src/v2/realtime-triggers/method-names.ts
18732
+ // ../../flow-extension-runner/src/realtime-triggers/method-names.ts
18731
18733
  var REALTIME_SYSTEM_METHODS = {
18732
18734
  UPSERT: "handleTriggerUpsertWebhook",
18733
18735
  RESOLVE: "handleTriggerResolveEvents",
@@ -18736,7 +18738,7 @@ var REALTIME_SYSTEM_METHODS = {
18736
18738
  REFRESH: "handleTriggerRefreshWebhook"
18737
18739
  };
18738
18740
 
18739
- // ../../flow-extension-runner/src/v2/realtime-triggers/system-params.ts
18741
+ // ../../flow-extension-runner/src/realtime-triggers/system-params.ts
18740
18742
  var anyRecord = () => z.record(z.string(), z.unknown());
18741
18743
  var SubscriptionEventSchema = z.looseObject({
18742
18744
  name: z.string().min(1),
@@ -18772,7 +18774,7 @@ var RealtimeSelectInvocationSchema = z.looseObject({
18772
18774
  })).default([])
18773
18775
  });
18774
18776
 
18775
- // ../../flow-extension-runner/src/v2/realtime-triggers/verify.ts
18777
+ // ../../flow-extension-runner/src/realtime-triggers/verify.ts
18776
18778
  function verifyDeclarative(verify, rawBody, headers, config, webhookData) {
18777
18779
  const secret = verify.secret(config, { webhookData });
18778
18780
  if (!secret) {
@@ -18795,7 +18797,7 @@ function verifyDeclarative(verify, rawBody, headers, config, webhookData) {
18795
18797
  return true;
18796
18798
  }
18797
18799
 
18798
- // ../../flow-extension-runner/src/v2/realtime-triggers/realtime-setup.ts
18800
+ // ../../flow-extension-runner/src/realtime-triggers/realtime-setup.ts
18799
18801
  function readExtract(extract, body) {
18800
18802
  if (typeof extract === "function") {
18801
18803
  return extract({ requestBody: body });
@@ -19091,7 +19093,7 @@ var RealtimeSetup = class {
19091
19093
  }
19092
19094
  };
19093
19095
 
19094
- // ../../flow-extension-runner/src/v2/realtime-triggers/trigger-method.ts
19096
+ // ../../flow-extension-runner/src/realtime-triggers/trigger-method.ts
19095
19097
  function isFilled(value) {
19096
19098
  return value != null && value !== "";
19097
19099
  }
@@ -19187,12 +19189,12 @@ var RealtimeTriggerMethod = class extends ExtensionMethod {
19187
19189
  if (typeof match === "function") {
19188
19190
  return !!await match({ params, providerEventData, webhookData });
19189
19191
  }
19190
- for (const [paramKey, path19] of Object.entries(match)) {
19192
+ for (const [paramKey, path18] of Object.entries(match)) {
19191
19193
  const paramValue = params[paramKey];
19192
19194
  if (!isFilled(paramValue)) {
19193
19195
  continue;
19194
19196
  }
19195
- if (`${paramValue}` !== `${getPath(providerEventData, path19)}`) {
19197
+ if (`${paramValue}` !== `${getPath(providerEventData, path18)}`) {
19196
19198
  return false;
19197
19199
  }
19198
19200
  }
@@ -19228,7 +19230,7 @@ var RealtimeTriggerMethod = class extends ExtensionMethod {
19228
19230
  }
19229
19231
  };
19230
19232
 
19231
- // ../../flow-extension-runner/src/v2/system-method.ts
19233
+ // ../../flow-extension-runner/src/system-method.ts
19232
19234
  var SystemMethod = class extends ExtensionMethod {
19233
19235
  constructor(extension, spec) {
19234
19236
  super(extension);
@@ -19285,7 +19287,7 @@ var SystemMethod = class extends ExtensionMethod {
19285
19287
  }
19286
19288
  };
19287
19289
 
19288
- // ../../flow-extension-runner/src/v2/extension.ts
19290
+ // ../../flow-extension-runner/src/extension.ts
19289
19291
  var Extension = class {
19290
19292
  #props;
19291
19293
  #config;
@@ -19441,8 +19443,8 @@ var Extension = class {
19441
19443
  };
19442
19444
  }
19443
19445
  /**
19444
- * The published model — the v2 analogue of jsdoc-parser's `parseJsDocToServiceJson`, and the same
19445
- * `{ serviceInfo, methodsMap }` shape the console consumes for a v1 service.
19446
+ * The published model — the `{ serviceInfo, methodsMap }` shape the console consumes, the same one the
19447
+ * removed v1 JSDoc parser produced.
19446
19448
  *
19447
19449
  * Every method describes itself, so this is one pass with no per-kind branches: what a service publishes
19448
19450
  * is exactly what it registered.
@@ -19455,8 +19457,6 @@ var Extension = class {
19455
19457
  }
19456
19458
  }
19457
19459
  return {
19458
- runnerVersion: "v2",
19459
- //TODO: temp
19460
19460
  serviceInfo: this.toServiceInfo(),
19461
19461
  methodsMap,
19462
19462
  configSchema: encodeParams(this.config.scheme)
@@ -19496,7 +19496,7 @@ var Extension = class {
19496
19496
  }
19497
19497
  };
19498
19498
 
19499
- // ../../flow-extension-runner/src/v2/registry.ts
19499
+ // ../../flow-extension-runner/src/registry.ts
19500
19500
  var ExtensionRegistry = class {
19501
19501
  #extensions = /* @__PURE__ */ new Map();
19502
19502
  register(extension) {
@@ -19516,15 +19516,19 @@ var ExtensionRegistry = class {
19516
19516
  * which imports it.
19517
19517
  */
19518
19518
  load(id, entryPointPath) {
19519
- if (!this.get(id)) {
19520
- require(entryPointPath);
19521
- }
19522
- const extension = this.get(id);
19519
+ const extension = this.tryLoad(id, entryPointPath);
19523
19520
  if (!extension) {
19524
19521
  throw new ExtensionNotRegisteredError(id, entryPointPath);
19525
19522
  }
19526
19523
  return extension;
19527
19524
  }
19525
+ /** As `load`, but `undefined` instead of throwing when the module registers no extension under `id`. */
19526
+ tryLoad(id, entryPointPath) {
19527
+ if (!this.get(id)) {
19528
+ require(entryPointPath);
19529
+ }
19530
+ return this.get(id);
19531
+ }
19528
19532
  // Test-only: clear the registry between isolated cases.
19529
19533
  reset() {
19530
19534
  this.#extensions.clear();
@@ -19535,7 +19539,7 @@ function getExtension(id) {
19535
19539
  return registry.get(id);
19536
19540
  }
19537
19541
 
19538
- // ../../flow-extension-runner/src/v2/create-extension.ts
19542
+ // ../../flow-extension-runner/src/create-extension.ts
19539
19543
  function createExtension(props) {
19540
19544
  const extension = new Extension(props);
19541
19545
  const api = {
@@ -19563,7 +19567,7 @@ function createExtension(props) {
19563
19567
  return api;
19564
19568
  }
19565
19569
 
19566
- // ../../flow-extension-runner/src/v2/crypto.ts
19570
+ // ../../flow-extension-runner/src/crypto.ts
19567
19571
  var import_crypto2 = __toESM(require("crypto"));
19568
19572
  var crypto2 = {
19569
19573
  hmac(algo, key, data, encoding = "hex") {
@@ -19599,689 +19603,99 @@ var flowrunnerRuntime = {
19599
19603
  z,
19600
19604
  crypto: crypto2,
19601
19605
  createExtension,
19602
- getExtension,
19603
- ServerCode: null
19606
+ getExtension
19604
19607
  };
19605
19608
  global.Flowrunner = flowrunnerRuntime;
19606
19609
 
19607
- // ../../flow-extension-runner/src/common/config.ts
19608
- var ConfigValueAdapters = {
19609
- [ServiceConfigItemTypes.BOOL]: {
19610
- deserialize: (value) => typeof value === "string" ? value === "true" : !!value,
19611
- isEmpty: (value) => typeof value !== "boolean"
19612
- },
19613
- default: {
19614
- deserialize: (value) => value,
19615
- isEmpty: (value) => !value
19616
- }
19617
- };
19618
-
19619
- // ../../flow-extension-runner/src/v1/config.ts
19620
- function normalizeConfigItems(sourceConfigItems) {
19621
- return sourceConfigItems?.map((item) => ({
19622
- name: item.name,
19623
- type: item.type || ServiceConfigItemTypes.STRING,
19624
- shared: !!item.shared,
19625
- required: !!item.required,
19626
- description: item.description || item.hint || "",
19627
- label: item.label || item.displayName || item.name,
19628
- defaultValue: item.defaultValue,
19629
- options: item.options || []
19630
- })) || [];
19631
- }
19632
-
19633
- // ../../flow-extension-runner/src/v1/namespace.ts
19634
- var services = /* @__PURE__ */ new Map();
19635
- function createFlowrunnerSandboxV1(serviceId, cb) {
19636
- global.Flowrunner.ServerCode = {
19637
- addService(ServiceClass, sourceConfigItems) {
19638
- services.set(serviceId, {
19639
- ServiceClass,
19640
- configItems: normalizeConfigItems(sourceConfigItems)
19641
- });
19642
- },
19643
- ConfigItems: {
19644
- TYPES: ServiceConfigItemTypes
19645
- }
19646
- };
19647
- try {
19648
- cb();
19649
- } finally {
19650
- global.Flowrunner.ServerCode = null;
19651
- }
19652
- return services.get(serviceId);
19653
- }
19654
-
19655
- // ../../flow-extension-runner/src/v1/service.ts
19656
- function requireService(serviceId, serviceEntryPointPath) {
19657
- const registered = createFlowrunnerSandboxV1(serviceId, () => {
19658
- require(serviceEntryPointPath);
19659
- });
19660
- if (!registered?.ServiceClass) {
19661
- throw new Error(`There is no registered ServiceClass serviceEntryPointPath="${serviceEntryPointPath}"`);
19662
- }
19663
- return registered;
19664
- }
19610
+ // ../../flow-extension-runner/src/index.ts
19665
19611
  function getServiceConfigs(serviceId, serviceEntryPointPath) {
19666
- const { configItems } = requireService(serviceId, serviceEntryPointPath);
19667
- return configItems;
19668
- }
19669
-
19670
- // ../../flow-extension-runner/src/v2/index.ts
19671
- function getServiceConfigs2(serviceId, serviceEntryPointPath) {
19672
19612
  return registry.load(serviceId, serviceEntryPointPath).toConfigItems();
19673
19613
  }
19674
19614
  function buildServiceDefinition(serviceId, serviceEntryPointPath) {
19675
- return registry.load(serviceId, serviceEntryPointPath).toDefinition();
19676
- }
19677
-
19678
- // ../../flow-extension-runner/src/index.ts
19679
- function detectVersion(serviceId, serviceEntryPointPath) {
19680
- createFlowrunnerSandboxV1(serviceId, () => {
19681
- require(serviceEntryPointPath);
19682
- });
19683
- return getExtension(serviceId) ? "v2" : "v1";
19684
- }
19685
- function getServiceConfigs3(serviceId, serviceEntryPointPath) {
19686
- return detectVersion(serviceId, serviceEntryPointPath) === "v2" ? getServiceConfigs2(serviceId, serviceEntryPointPath) : getServiceConfigs(serviceId, serviceEntryPointPath);
19687
- }
19688
- function buildServiceDefinition2(serviceId, serviceEntryPointPath) {
19689
- return detectVersion(serviceId, serviceEntryPointPath) === "v2" ? buildServiceDefinition(serviceId, serviceEntryPointPath) : null;
19690
- }
19691
-
19692
- // ../../jsdoc-parser/src/custom-type-defs/files.ts
19693
- var SCOPE_FIELD = {
19694
- name: "scope",
19695
- type: "String",
19696
- required: false,
19697
- label: "Scope",
19698
- description: "Storage scope: WORKSPACE (shared across flows), FLOW (this flow only), EXECUTION (this run only)",
19699
- uiComponent: { type: "DROPDOWN", options: { values: ["WORKSPACE", "FLOW", "EXECUTION"] } },
19700
- defaultValue: "FLOW"
19701
- };
19702
- var filesTypeDefs = {
19703
- FilesUploadOptions: [
19704
- SCOPE_FIELD,
19705
- {
19706
- name: "filename",
19707
- type: "String",
19708
- required: false,
19709
- label: "Filename",
19710
- description: "Custom filename (defaults to the original name if omitted)",
19711
- uiComponent: { type: "SINGLE_LINE_TEXT" }
19712
- },
19713
- {
19714
- name: "ttl",
19715
- type: "Number",
19716
- required: false,
19717
- label: "URL TTL (seconds)",
19718
- description: "How long the download URL remains valid",
19719
- uiComponent: { type: "NUMERIC" }
19720
- },
19721
- {
19722
- name: "objectTtl",
19723
- type: "Number",
19724
- required: false,
19725
- label: "File TTL (seconds)",
19726
- description: "How long the file is kept in storage (omit for permanent storage)",
19727
- uiComponent: { type: "NUMERIC" }
19728
- },
19729
- {
19730
- name: "overwrite",
19731
- type: "Boolean",
19732
- required: false,
19733
- label: "Overwrite existing",
19734
- description: "Replace the file if one with the same name already exists",
19735
- uiComponent: { type: "TOGGLE" }
19736
- },
19737
- {
19738
- name: "generateUrl",
19739
- type: "Boolean",
19740
- required: false,
19741
- label: "Generate download URL",
19742
- description: "Include a pre-signed download URL in the response",
19743
- uiComponent: { type: "TOGGLE" },
19744
- defaultValue: true
19745
- }
19746
- ],
19747
- FilesListOptions: [
19748
- SCOPE_FIELD,
19749
- {
19750
- name: "limit",
19751
- type: "Number",
19752
- required: false,
19753
- label: "Limit",
19754
- description: "Maximum number of files to return",
19755
- uiComponent: { type: "NUMERIC" }
19756
- },
19757
- {
19758
- name: "ttl",
19759
- type: "Number",
19760
- required: false,
19761
- label: "URL TTL (seconds)",
19762
- description: "How long the download URLs remain valid",
19763
- uiComponent: { type: "NUMERIC" }
19764
- },
19765
- {
19766
- name: "generateUrl",
19767
- type: "Boolean",
19768
- required: false,
19769
- label: "Generate download URLs",
19770
- description: "Include pre-signed download URLs in the response",
19771
- uiComponent: { type: "TOGGLE" },
19772
- defaultValue: true
19773
- },
19774
- {
19775
- name: "cursor",
19776
- type: "String",
19777
- required: false,
19778
- label: "Cursor",
19779
- description: "Pagination cursor from a previous response",
19780
- uiComponent: { type: "SINGLE_LINE_TEXT" }
19781
- }
19782
- ],
19783
- FilesGetOptions: [
19784
- SCOPE_FIELD,
19785
- {
19786
- name: "ttl",
19787
- type: "Number",
19788
- required: false,
19789
- label: "URL TTL (seconds)",
19790
- description: "How long the download URL remains valid",
19791
- uiComponent: { type: "NUMERIC" }
19792
- },
19793
- {
19794
- name: "generateUrl",
19795
- type: "Boolean",
19796
- required: false,
19797
- label: "Generate download URL",
19798
- description: "Include a pre-signed download URL in the response",
19799
- uiComponent: { type: "TOGGLE" },
19800
- defaultValue: true
19801
- }
19802
- ],
19803
- FilesDeleteOptions: [
19804
- SCOPE_FIELD
19805
- ]
19806
- };
19807
-
19808
- // ../../jsdoc-parser/src/lib.ts
19809
- var import_fs3 = __toESM(require("fs"));
19810
- var import_path6 = __toESM(require("path"));
19811
- function resolveJSDocPath() {
19812
- const jsDocHolders = require.resolve.paths("jsdoc/lib") || [];
19813
- const jsDocPaths = jsDocHolders.map((p) => import_path6.default.join(p, "jsdoc/lib"));
19814
- for (let i = 0; i < jsDocPaths.length; i++) {
19815
- if (import_fs3.default.existsSync(jsDocPaths[i])) {
19816
- return jsDocPaths[i];
19817
- }
19818
- }
19819
- throw new Error("Can not resolve path to JSDoc module.");
19820
- }
19821
- var jsdocPath = resolveJSDocPath();
19822
- var jsdocModulePath = (mod) => import_path6.default.join(jsdocPath, ...mod.split("/"));
19823
- var _jsdocRequire;
19824
- var jsdocRequire = (modulePath) => {
19825
- if (!_jsdocRequire) {
19826
- _jsdocRequire = require("requizzle")({
19827
- infect: true,
19828
- requirePaths: { before: [jsdocPath] }
19829
- });
19830
- const Config = _jsdocRequire(jsdocModulePath("jsdoc/config"));
19831
- const env = _jsdocRequire(jsdocModulePath("jsdoc/env"));
19832
- env.conf = new Config().get();
19833
- }
19834
- return _jsdocRequire(jsdocModulePath(modulePath));
19835
- };
19836
- function parseJSDoc(filePath) {
19837
- const parser = jsdocRequire("jsdoc/src/parser").createParser();
19838
- const handlers = jsdocRequire("jsdoc/src/handlers");
19839
- handlers.attachTo(parser);
19840
- return parser.parse([filePath]);
19841
- }
19842
-
19843
- // ../../jsdoc-parser/src/index.ts
19844
- var customTypeDef = {
19845
- FilesUploadOptions: filesTypeDefs.FilesUploadOptions,
19846
- FilesListOptions: filesTypeDefs.FilesListOptions,
19847
- FilesGetOptions: filesTypeDefs.FilesGetOptions,
19848
- FilesDeleteOptions: filesTypeDefs.FilesDeleteOptions
19849
- };
19850
- function findServiceClassName(doclets) {
19851
- const withIntegration = doclets.find((d) => {
19852
- if (d.kind === "class" && d.tags) {
19853
- return d.tags.find((t) => t.originalTitle === "integrationName");
19854
- }
19855
- });
19856
- if (withIntegration) {
19857
- return withIntegration.name;
19858
- }
19859
- return null;
19860
- }
19861
- function parseJSDocs(filePath) {
19862
- const doclets = parseJSDoc(filePath);
19863
- const className = findServiceClassName(doclets);
19864
- let serviceInfo = null;
19865
- const methods = [];
19866
- const typedefsMap = {};
19867
- doclets.forEach((d) => {
19868
- if (d.kind === "class" && d.name === className) {
19869
- serviceInfo = composeServiceInfo(d);
19870
- } else if (d.kind === "function" && d.memberof === className && d.scope === "instance") {
19871
- methods.push(composeMethod(d));
19872
- } else if (d.kind === "typedef") {
19873
- const typedefParams = collectTypedef(d);
19874
- if (typedefParams) {
19875
- typedefsMap[d.name] = typedefParams;
19876
- }
19877
- }
19878
- });
19879
- return {
19880
- serviceInfo,
19881
- methods,
19882
- // Extension-defined typedefs override built-ins so authors can customise if needed
19883
- typedefsMap: { ...customTypeDef, ...typedefsMap }
19884
- };
19885
- }
19886
- var ServiceInfoTagsProcessors = {
19887
- integrationName: (serviceInfo, tagValue) => {
19888
- serviceInfo.integrationName = tagValue || void 0;
19889
- },
19890
- integrationIcon: (serviceInfo, tagValue) => {
19891
- serviceInfo.integrationIcon = tagValue || null;
19892
- },
19893
- requireOAuth: (serviceInfo) => {
19894
- serviceInfo.requireOAuth = true;
19895
- },
19896
- integrationTriggersScope: (serviceInfo, tagValue) => {
19897
- serviceInfo.integrationTriggersScope = tagValue || null;
19898
- }
19899
- };
19900
- function composeServiceInfo(d) {
19901
- const serviceInfo = {
19902
- serviceClassName: d.name,
19903
- integrationName: d.name,
19904
- integrationIcon: null,
19905
- requireOAuth: void 0,
19906
- integrationTriggersScope: null
19907
- };
19908
- iterateTags(d.tags, (tagName, tagValue) => {
19909
- if (ServiceInfoTagsProcessors[tagName]) {
19910
- ServiceInfoTagsProcessors[tagName](serviceInfo, tagValue);
19911
- }
19912
- });
19913
- return serviceInfo;
19914
- }
19915
- function iterateTags(tags, cb) {
19916
- if (tags) {
19917
- tags.forEach((tag) => {
19918
- const title = tag.originalTitle;
19919
- const value = tag.value || tag.text || "";
19920
- cb(title, value, tag);
19921
- });
19922
- }
19923
- }
19924
- var MethodTagsProcessors = {
19925
- paramDef: (methodInfo, tagValue) => {
19926
- if (tagValue) {
19927
- const parsedValue = parseJSON(tagValue);
19928
- if (parsedValue) {
19929
- methodInfo.paramDefs.push(parsedValue);
19930
- }
19931
- }
19932
- },
19933
- route: (methodInfo, tagValue) => {
19934
- if (tagValue) {
19935
- methodInfo.route = tagValue;
19936
- }
19937
- },
19938
- registerAs: (methodInfo, tagValue) => {
19939
- if (tagValue) {
19940
- methodInfo.registerAs = tagValue;
19941
- }
19942
- },
19943
- operationName: (methodInfo, tagValue) => {
19944
- if (tagValue) {
19945
- methodInfo.operationName = tagValue;
19946
- }
19947
- },
19948
- customIcon: (methodInfo, tagValue) => {
19949
- if (tagValue) {
19950
- methodInfo.customIcon = tagValue;
19951
- }
19952
- },
19953
- category: (methodInfo, tagValue) => {
19954
- if (tagValue) {
19955
- methodInfo.category = tagValue;
19956
- }
19957
- },
19958
- description: (methodInfo, tagValue) => {
19959
- if (tagValue) {
19960
- methodInfo.description = tagValue;
19961
- }
19962
- },
19963
- appearanceColor: (methodInfo, tagValue) => {
19964
- if (tagValue) {
19965
- const colors = extractColors(tagValue);
19966
- methodInfo.colorStart = colors.colorStart;
19967
- methodInfo.colorEnd = colors.colorEnd;
19968
- }
19969
- },
19970
- private: (methodInfo) => {
19971
- methodInfo.private = true;
19972
- },
19973
- sampleResult: (methodInfo, tagValue) => {
19974
- if (tagValue) {
19975
- methodInfo.sampleResult = parseJSON(tagValue);
19976
- }
19977
- },
19978
- sampleResultLoader: (methodInfo, tagValue) => {
19979
- if (tagValue) {
19980
- methodInfo.sampleResultLoader = parseJSON(tagValue);
19981
- }
19982
- }
19983
- };
19984
- function composeMethod(m) {
19985
- const methodInfo = {
19986
- name: m.name,
19987
- description: m.description || "",
19988
- returnType: mapReturnType(m.returns?.[0].type?.names?.[0]),
19989
- registerAs: "",
19990
- colorStart: "",
19991
- colorEnd: "",
19992
- private: m.access === "private",
19993
- operationName: m.name,
19994
- customIcon: "",
19995
- category: "",
19996
- sampleResult: null,
19997
- sampleResultLoader: null,
19998
- routeStr: "",
19999
- paramDefs: []
20000
- };
20001
- if (m.params) {
20002
- m.params.forEach((p) => {
20003
- methodInfo.paramDefs.push({
20004
- name: p.name,
20005
- type: p.type?.names?.[0] || "String",
20006
- required: !p.optional
20007
- });
20008
- });
20009
- }
20010
- iterateTags(m.tags, (tagName, tagValue) => {
20011
- if (MethodTagsProcessors[tagName]) {
20012
- MethodTagsProcessors[tagName](methodInfo, tagValue);
20013
- }
20014
- });
20015
- return methodInfo;
20016
- }
20017
- var PRIMITIVES = ["String", "Object", "Boolean", "Number"];
20018
- var ParamTypesMap = {
20019
- String: "STRING",
20020
- Object: "OBJECT",
20021
- Boolean: "BOOLEAN",
20022
- Number: "NUMBER"
20023
- };
20024
- function mapParamType(type) {
20025
- if (!type) {
20026
- return "STRING";
20027
- }
20028
- if (type.startsWith("Array")) {
20029
- return "LIST";
20030
- }
20031
- return ParamTypesMap[type] || "STRING";
20032
- }
20033
- function mapReturnType(type) {
20034
- if (type) {
20035
- if (type === "Array" || type.startsWith("Array.") || type.startsWith("Array<")) return "LIST";
20036
- if (type === "Object") return "OBJECT";
20037
- if (type === "String") return "STRING";
20038
- }
20039
- return "VOID";
20040
- }
20041
- function collectTypedef(d) {
20042
- const defs = [];
20043
- iterateTags(d.tags, (title, value) => {
20044
- if (title === "paramDef") {
20045
- const parsedValue = parseJSON(value);
20046
- if (parsedValue) {
20047
- defs.push(parsedValue);
20048
- }
20049
- }
20050
- });
20051
- if (d.properties) {
20052
- d.properties.forEach((property) => {
20053
- const type = property?.type?.names?.[0];
20054
- defs.push({
20055
- name: property.name,
20056
- required: !property.optional,
20057
- description: property.description,
20058
- type
20059
- });
20060
- });
20061
- }
20062
- if (defs.length > 0) {
20063
- return defs;
20064
- }
20065
- }
20066
- function buildParam(paramDef, typedefsMap, nested = false) {
20067
- const isCustomType = !nested && paramDef.type && !PRIMITIVES.includes(paramDef.type) && !paramDef.type.startsWith("Array");
20068
- let properties;
20069
- if (isCustomType && typedefsMap[paramDef.type]) {
20070
- let subDefs = typedefsMap[paramDef.type];
20071
- if (paramDef.include?.length) {
20072
- const includeSet = new Set(paramDef.include);
20073
- subDefs = subDefs.filter((sd) => includeSet.has(sd.name));
20074
- }
20075
- if (subDefs.length > 0) {
20076
- properties = subDefs.map((sp) => buildParam(sp, typedefsMap, true));
20077
- }
20078
- }
20079
- const param = {
20080
- name: paramDef.name,
20081
- required: paramDef.required || false,
20082
- description: paramDef.description || "",
20083
- type: isCustomType ? "OBJECT" : mapParamType(paramDef.type)
20084
- };
20085
- if (nested) {
20086
- if (paramDef.label !== void 0) {
20087
- param.label = paramDef.label;
20088
- }
20089
- if (paramDef.uiComponent !== void 0) {
20090
- param.uiComponent = paramDef.uiComponent;
20091
- }
20092
- if (paramDef.dependsOn !== void 0) {
20093
- param.dependsOn = paramDef.dependsOn;
20094
- }
20095
- if (paramDef.dictionary !== void 0) {
20096
- param.dictionary = paramDef.dictionary;
20097
- }
20098
- if (paramDef.defaultValue !== void 0) {
20099
- param.defaultValue = paramDef.defaultValue;
20100
- }
20101
- }
20102
- if (properties && properties.length > 0) {
20103
- param.properties = properties;
20104
- }
20105
- if (param.type === "LIST") {
20106
- param.items = { type: "OBJECT" };
20107
- }
20108
- return param;
20109
- }
20110
- function buildMetaInfoArgs(paramDefs, typedefsMap) {
20111
- const args = {};
20112
- for (const pd of paramDefs) {
20113
- const isCustomType = pd.type && !PRIMITIVES.includes(pd.type) && !pd.type.startsWith("Array");
20114
- if (isCustomType && typedefsMap[pd.type]) {
20115
- const entry2 = {};
20116
- if (pd.label) entry2.label = pd.label;
20117
- args[pd.name] = entry2;
20118
- continue;
20119
- }
20120
- const entry = {};
20121
- if (pd.label) entry.label = pd.label;
20122
- if (pd.dictionary) entry.dictionary = pd.dictionary;
20123
- if (pd.dependsOn && pd.dependsOn.length > 0) entry.dependsOn = pd.dependsOn;
20124
- if (pd.uiComponent) entry.uiComponent = pd.uiComponent;
20125
- args[pd.name] = entry;
20126
- }
20127
- return args;
20128
- }
20129
- function extractColors(colorStr) {
20130
- if (!colorStr) {
20131
- return { colorStart: "", colorEnd: "" };
20132
- }
20133
- const colors = colorStr.split(/[,\s]+/).map((c) => c.trim()).filter(Boolean);
20134
- return {
20135
- colorStart: colors[0] || "",
20136
- colorEnd: colors[1] || colors[0] || ""
20137
- };
20138
- }
20139
- function parseJSON(str) {
20140
- try {
20141
- return JSON.parse(str);
20142
- } catch {
20143
- return null;
20144
- }
20145
- }
20146
- function parseJsDocToServiceJson(entryPoint) {
20147
- const { serviceInfo, methods, typedefsMap } = parseJSDocs(entryPoint);
20148
- const methodsMap = {};
20149
- for (const method of methods) {
20150
- if (method.private) {
20151
- continue;
20152
- }
20153
- const {
20154
- name,
20155
- route,
20156
- registerAs,
20157
- colorStart,
20158
- colorEnd,
20159
- operationName,
20160
- customIcon,
20161
- category,
20162
- description,
20163
- sampleResult,
20164
- sampleResultLoader,
20165
- paramDefs,
20166
- returnType
20167
- } = method;
20168
- const isSystem = registerAs === "SYSTEM";
20169
- const httpMethod = route ? route.split(/\s+/)[0].toUpperCase() : name.startsWith("get") ? "GET" : "POST";
20170
- const isQueryPlacement = httpMethod === "GET";
20171
- const params = paramDefs.map((pd) => buildParam(pd, typedefsMap));
20172
- const queryParams = isQueryPlacement ? params : [];
20173
- const bodyParams = isQueryPlacement ? [] : params;
20174
- const metaInfoArgs = paramDefs.length > 0 ? buildMetaInfoArgs(paramDefs, typedefsMap) : {};
20175
- methodsMap[name] = {
20176
- colorStart,
20177
- colorEnd,
20178
- queryParams,
20179
- // todo remove me
20180
- bodyParams,
20181
- customIcon: isSystem ? void 0 : customIcon,
20182
- registerAs,
20183
- category,
20184
- metaInfo: {
20185
- args: metaInfoArgs,
20186
- sampleResult: isSystem ? void 0 : sampleResult,
20187
- sampleResultLoader: isSystem ? void 0 : sampleResultLoader
20188
- },
20189
- returnType,
20190
- description,
20191
- operationName,
20192
- name
20193
- };
20194
- }
20195
- return {
20196
- runnerVersion: "v1",
20197
- //TODO: temp
20198
- methodsMap,
20199
- serviceInfo
20200
- };
19615
+ return registry.tryLoad(serviceId, serviceEntryPointPath)?.toDefinition() ?? null;
20201
19616
  }
20202
19617
 
20203
19618
  // src/operations/deploy/discover-services.ts
20204
19619
  function discoverServices(projectRoot = process.cwd()) {
20205
- const servicesDir = import_path7.default.resolve(projectRoot, "services");
20206
- if (!import_fs4.default.existsSync(servicesDir)) {
19620
+ const servicesDir = import_path6.default.resolve(projectRoot, "services");
19621
+ if (!import_fs3.default.existsSync(servicesDir)) {
20207
19622
  return { services: [], skipped: [] };
20208
19623
  }
20209
- const serviceIds = import_fs4.default.readdirSync(servicesDir, { withFileTypes: true }).filter((file) => file.isDirectory()).map((file) => file.name);
20210
- const services2 = [];
19624
+ const serviceIds = import_fs3.default.readdirSync(servicesDir, { withFileTypes: true }).filter((file) => file.isDirectory()).map((file) => file.name);
19625
+ const services = [];
20211
19626
  const skipped = [];
20212
19627
  for (const serviceId of serviceIds) {
20213
- const serviceDir = import_path7.default.resolve(servicesDir, serviceId);
20214
- const serviceDISTEntryPoint = import_path7.default.resolve(serviceDir, "./dist/index.js");
20215
- const serviceSRCEntryPoint = import_path7.default.resolve(serviceDir, "./src/index.js");
19628
+ const serviceDir = import_path6.default.resolve(servicesDir, serviceId);
19629
+ const serviceDISTEntryPoint = import_path6.default.resolve(serviceDir, "./dist/index.js");
19630
+ const serviceSRCEntryPoint = import_path6.default.resolve(serviceDir, "./src/index.js");
20216
19631
  let serviceFilePath = null;
20217
19632
  try {
20218
- if (import_fs4.default.existsSync(serviceDISTEntryPoint)) {
19633
+ if (import_fs3.default.existsSync(serviceDISTEntryPoint)) {
20219
19634
  serviceFilePath = serviceDISTEntryPoint;
20220
- } else if (import_fs4.default.existsSync(serviceSRCEntryPoint)) {
19635
+ } else if (import_fs3.default.existsSync(serviceSRCEntryPoint)) {
20221
19636
  serviceFilePath = serviceSRCEntryPoint;
20222
19637
  }
20223
19638
  if (!serviceFilePath) {
20224
19639
  skipped.push({ serviceId, reason: "it has neither a dist/index.js nor a src/index.js" });
20225
19640
  continue;
20226
19641
  }
20227
- const v2Definition = buildServiceDefinition2(serviceId, serviceFilePath);
20228
- const { methodsMap, serviceInfo } = v2Definition ?? parseJsDocToServiceJson(serviceFilePath);
20229
- if (!serviceInfo || !v2Definition && !serviceInfo.serviceClassName) {
20230
- skipped.push({ serviceId, reason: "its entry point does not define a service" });
19642
+ const definition = buildServiceDefinition(serviceId, serviceFilePath);
19643
+ if (!definition?.serviceInfo) {
19644
+ skipped.push({ serviceId, reason: "its entry point does not define a service with createExtension" });
20231
19645
  continue;
20232
19646
  }
19647
+ const { methodsMap, serviceInfo } = definition;
20233
19648
  let configDescriptions = [];
20234
19649
  try {
20235
- configDescriptions = getServiceConfigs3(serviceId, serviceFilePath);
19650
+ configDescriptions = getServiceConfigs(serviceId, serviceFilePath);
20236
19651
  } catch (error) {
20237
19652
  skipped.push({
20238
19653
  serviceId,
20239
19654
  reason: `its config items could not be read (${error.message}) \u2014 deployed without them`
20240
19655
  });
20241
19656
  }
20242
- services2.push({
19657
+ services.push({
20243
19658
  // Relative to the service, because the deployed archive's root IS the service.
20244
- serviceFilePath: import_path7.default.relative(serviceDir, serviceFilePath),
19659
+ serviceFilePath: import_path6.default.relative(serviceDir, serviceFilePath),
20245
19660
  serviceId,
20246
19661
  serviceInfo,
20247
19662
  methodsMap,
20248
19663
  configDescriptions,
20249
- // v2 only. The console renders a v2 config dialog from the schema itself rather than from the
19664
+ // The console renders the config dialog from the schema itself rather than from the
20250
19665
  // `configDescriptions` projection, so both travel: the schema for the new path, the projection for
20251
19666
  // every consumer that predates it.
20252
- runnerVersion: v2Definition ? "v2" : "v1",
20253
- configSchema: v2Definition?.configSchema ?? null
19667
+ configSchema: definition.configSchema ?? null
20254
19668
  });
20255
19669
  } catch (error) {
20256
19670
  skipped.push({ serviceId, reason: error.message });
20257
19671
  }
20258
19672
  }
20259
- return { services: services2, skipped };
19673
+ return { services, skipped };
20260
19674
  }
20261
19675
 
20262
19676
  // src/operations/deploy/hash.ts
20263
19677
  var import_crypto4 = require("crypto");
20264
- var import_fs5 = __toESM(require("fs"));
20265
- var import_path8 = __toESM(require("path"));
19678
+ var import_fs4 = __toESM(require("fs"));
19679
+ var import_path7 = __toESM(require("path"));
20266
19680
  async function computeServiceHash(projectRoot, serviceId) {
20267
19681
  const hash = (0, import_crypto4.createHash)("sha256");
20268
- const serviceDir = import_path8.default.resolve(projectRoot, "services", serviceId);
19682
+ const serviceDir = import_path7.default.resolve(projectRoot, "services", serviceId);
20269
19683
  const files = [];
20270
19684
  collectFiles(serviceDir, "", files);
20271
19685
  files.sort();
20272
19686
  for (const file of files) {
20273
19687
  hash.update(file);
20274
- hash.update(import_fs5.default.readFileSync(import_path8.default.resolve(serviceDir, file)));
19688
+ hash.update(import_fs4.default.readFileSync(import_path7.default.resolve(serviceDir, file)));
20275
19689
  }
20276
19690
  return hash.digest("hex");
20277
19691
  }
20278
19692
  function collectFiles(serviceDir, relativeDir, files) {
20279
- const entries = import_fs5.default.readdirSync(import_path8.default.resolve(serviceDir, relativeDir), { withFileTypes: true });
19693
+ const entries = import_fs4.default.readdirSync(import_path7.default.resolve(serviceDir, relativeDir), { withFileTypes: true });
20280
19694
  for (const entry of entries) {
20281
19695
  if (HASH_EXCLUDED_FOLDERS.includes(entry.name)) {
20282
19696
  continue;
20283
19697
  }
20284
- const relativePath = relativeDir ? import_path8.default.join(relativeDir, entry.name) : entry.name;
19698
+ const relativePath = relativeDir ? import_path7.default.join(relativeDir, entry.name) : entry.name;
20285
19699
  if (!entry.isSymbolicLink()) {
20286
19700
  if (entry.isDirectory()) {
20287
19701
  collectFiles(serviceDir, relativePath, files);
@@ -20293,14 +19707,14 @@ function collectFiles(serviceDir, relativeDir, files) {
20293
19707
  }
20294
19708
 
20295
19709
  // src/operations/deploy/public-files.ts
20296
- var import_fs6 = __toESM(require("fs"));
20297
- var import_path9 = __toESM(require("path"));
20298
- function collectPublicFiles(services2, projectRoot = process.cwd()) {
19710
+ var import_fs5 = __toESM(require("fs"));
19711
+ var import_path8 = __toESM(require("path"));
19712
+ function collectPublicFiles(services, projectRoot = process.cwd()) {
20299
19713
  const files = [];
20300
19714
  const missing = [];
20301
- for (const service of services2) {
20302
- const servicePublicDir = import_path9.default.resolve(projectRoot, "services", service.serviceId, "public");
20303
- if (!import_fs6.default.existsSync(servicePublicDir)) {
19715
+ for (const service of services) {
19716
+ const servicePublicDir = import_path8.default.resolve(projectRoot, "services", service.serviceId, "public");
19717
+ if (!import_fs5.default.existsSync(servicePublicDir)) {
20304
19718
  continue;
20305
19719
  }
20306
19720
  const iconPath = service.serviceInfo.integrationIcon;
@@ -20308,18 +19722,18 @@ function collectPublicFiles(services2, projectRoot = process.cwd()) {
20308
19722
  continue;
20309
19723
  }
20310
19724
  const relativePath = iconPath.replace(/^\//, "");
20311
- const fullPath = import_path9.default.resolve(servicePublicDir, relativePath);
20312
- if (!fullPath.startsWith(servicePublicDir + import_path9.default.sep)) {
19725
+ const fullPath = import_path8.default.resolve(servicePublicDir, relativePath);
19726
+ if (!fullPath.startsWith(servicePublicDir + import_path8.default.sep)) {
20313
19727
  continue;
20314
19728
  }
20315
- if (!import_fs6.default.existsSync(fullPath)) {
19729
+ if (!import_fs5.default.existsSync(fullPath)) {
20316
19730
  missing.push({ serviceId: service.serviceId, relativePath });
20317
19731
  continue;
20318
19732
  }
20319
19733
  files.push({
20320
19734
  relativePath,
20321
19735
  serviceId: service.serviceId,
20322
- buffer: import_fs6.default.readFileSync(fullPath)
19736
+ buffer: import_fs5.default.readFileSync(fullPath)
20323
19737
  });
20324
19738
  }
20325
19739
  return { files, missing };
@@ -20344,19 +19758,31 @@ function selectServices(available, selection = {}) {
20344
19758
  }
20345
19759
 
20346
19760
  // src/operations/deploy/zip.ts
20347
- var import_archiver = __toESM(require("archiver"));
20348
- var import_path10 = __toESM(require("path"));
19761
+ var import_adm_zip = __toESM(require_adm_zip());
19762
+ var import_fs6 = __toESM(require("fs"));
19763
+ var import_path9 = __toESM(require("path"));
19764
+ var S_IFLNK = 40960;
20349
19765
  async function createServiceZip(definition, projectRoot, serviceId) {
20350
- return new Promise((resolve, reject) => {
20351
- const archive = (0, import_archiver.default)("zip", { zlib: { level: 9 } });
20352
- const chunks = [];
20353
- archive.on("data", (chunk) => chunks.push(chunk));
20354
- archive.on("end", () => resolve(Buffer.concat(chunks)));
20355
- archive.on("error", reject);
20356
- archive.directory(`${import_path10.default.resolve(projectRoot, "services", serviceId)}/`, "package");
20357
- archive.append(JSON.stringify(definition, null, 2), { name: "definition.json" });
20358
- archive.finalize();
20359
- });
19766
+ const zip = new import_adm_zip.default();
19767
+ addDirectory(zip, import_path9.default.resolve(projectRoot, "services", serviceId), "package");
19768
+ zip.addFile("definition.json", Buffer.from(JSON.stringify(definition, null, 2)));
19769
+ return zip.toBuffer();
19770
+ }
19771
+ function addDirectory(zip, dir, zipDir) {
19772
+ for (const name of import_fs6.default.readdirSync(dir)) {
19773
+ const fullPath = import_path9.default.join(dir, name);
19774
+ const zipPath = `${zipDir}/${name}`;
19775
+ const stats = import_fs6.default.lstatSync(fullPath);
19776
+ if (stats.isDirectory()) {
19777
+ zip.addFile(`${zipPath}/`, Buffer.alloc(0), "", stats);
19778
+ addDirectory(zip, fullPath, zipPath);
19779
+ } else if (stats.isSymbolicLink()) {
19780
+ const entry = zip.addFile(zipPath, Buffer.from(import_fs6.default.readlinkSync(fullPath)), "", stats);
19781
+ entry.attr = (S_IFLNK | stats.mode & 4095) << 16 >>> 0;
19782
+ } else if (stats.isFile()) {
19783
+ zip.addFile(zipPath, import_fs6.default.readFileSync(fullPath), "", stats);
19784
+ }
19785
+ }
20360
19786
  }
20361
19787
 
20362
19788
  // src/operations/deploy/index.ts
@@ -20386,7 +19812,7 @@ async function deploy(options = {}) {
20386
19812
  const { serverUrl, workspaceId, workspaceName, deployToken } = await resolveAuth(projectRoot, options.onAuthRequired);
20387
19813
  const credentials = { serverUrl, workspaceId, deployToken };
20388
19814
  const workspace = { workspaceId, workspaceName };
20389
- if (!import_fs7.default.existsSync(import_path11.default.resolve(projectRoot, "services"))) {
19815
+ if (!import_fs7.default.existsSync(import_path10.default.resolve(projectRoot, "services"))) {
20390
19816
  throw new NoServicesDirectoryError();
20391
19817
  }
20392
19818
  emit({ type: "connecting", serverUrl, workspace });
@@ -20464,17 +19890,17 @@ async function guarded(call) {
20464
19890
  // src/operations/init/index.ts
20465
19891
  var import_child_process = require("child_process");
20466
19892
  var import_fs13 = __toESM(require("fs"));
20467
- var import_path18 = __toESM(require("path"));
19893
+ var import_path17 = __toESM(require("path"));
20468
19894
 
20469
19895
  // src/templates/package-root.ts
20470
19896
  var import_fs8 = __toESM(require("fs"));
20471
- var import_path12 = __toESM(require("path"));
19897
+ var import_path11 = __toESM(require("path"));
20472
19898
  var PACKAGE_NAMES = ["@flowrunner/cli", "flowrunner-cli"];
20473
19899
  var cached = null;
20474
19900
  function findPackageRoot() {
20475
19901
  let dir = __dirname;
20476
19902
  while (true) {
20477
- const manifest = import_path12.default.join(dir, "package.json");
19903
+ const manifest = import_path11.default.join(dir, "package.json");
20478
19904
  if (import_fs8.default.existsSync(manifest)) {
20479
19905
  try {
20480
19906
  if (PACKAGE_NAMES.includes(JSON.parse(import_fs8.default.readFileSync(manifest, "utf-8")).name)) {
@@ -20483,7 +19909,7 @@ function findPackageRoot() {
20483
19909
  } catch {
20484
19910
  }
20485
19911
  }
20486
- const parent = import_path12.default.dirname(dir);
19912
+ const parent = import_path11.default.dirname(dir);
20487
19913
  if (parent === dir) {
20488
19914
  throw new Error(`Could not locate the "${PACKAGE_NAMES[0]}" package root above ${__dirname}`);
20489
19915
  }
@@ -20495,7 +19921,7 @@ function packageRoot() {
20495
19921
  return cached;
20496
19922
  }
20497
19923
  function templatesRoot() {
20498
- return import_path12.default.join(packageRoot(), "templates");
19924
+ return import_path11.default.join(packageRoot(), "templates");
20499
19925
  }
20500
19926
 
20501
19927
  // src/utils/invocation.ts
@@ -20523,24 +19949,24 @@ function resolveServerTarget(target) {
20523
19949
  }
20524
19950
 
20525
19951
  // src/operations/init/create-service.ts
20526
- var import_path16 = __toESM(require("path"));
19952
+ var import_path15 = __toESM(require("path"));
20527
19953
 
20528
19954
  // src/templates/registry.ts
20529
19955
  var import_fs10 = __toESM(require("fs"));
20530
- var import_path14 = __toESM(require("path"));
19956
+ var import_path13 = __toESM(require("path"));
20531
19957
 
20532
19958
  // src/templates/manifest.ts
20533
19959
  var import_fs9 = __toESM(require("fs"));
20534
19960
  var import_zod5 = require("zod");
20535
19961
 
20536
19962
  // src/templates/paths.ts
20537
- var import_path13 = __toESM(require("path"));
19963
+ var import_path12 = __toESM(require("path"));
20538
19964
  var SERVICES_DIRECTORY = "services";
20539
19965
  function servicesDirectory(projectRoot = process.cwd()) {
20540
- return import_path13.default.join(projectRoot, SERVICES_DIRECTORY);
19966
+ return import_path12.default.join(projectRoot, SERVICES_DIRECTORY);
20541
19967
  }
20542
19968
  function serviceDirectory(serviceId, projectRoot = process.cwd()) {
20543
- return import_path13.default.join(servicesDirectory(projectRoot), serviceId);
19969
+ return import_path12.default.join(servicesDirectory(projectRoot), serviceId);
20544
19970
  }
20545
19971
 
20546
19972
  // src/templates/manifest.ts
@@ -20633,7 +20059,7 @@ var MANIFEST_FILE = "template.json";
20633
20059
  var DEFAULT_TEMPLATE_ID = "demo-todo-list";
20634
20060
  var DEFAULT_TEMPLATE_ALIAS = "demo";
20635
20061
  function loadTemplate(directory) {
20636
- const manifestPath = import_path14.default.join(directory, MANIFEST_FILE);
20062
+ const manifestPath = import_path13.default.join(directory, MANIFEST_FILE);
20637
20063
  let raw;
20638
20064
  try {
20639
20065
  raw = JSON.parse(import_fs10.default.readFileSync(manifestPath, "utf-8"));
@@ -20647,7 +20073,7 @@ function loadTemplate(directory) {
20647
20073
  ${issues}`);
20648
20074
  }
20649
20075
  const manifest = parsed.data;
20650
- if (manifest.id !== import_path14.default.basename(directory)) {
20076
+ if (manifest.id !== import_path13.default.basename(directory)) {
20651
20077
  throw new Error(`Template in ${directory} declares id "${manifest.id}" \u2014 it must match the folder name`);
20652
20078
  }
20653
20079
  for (const prompt of manifest.prompts) {
@@ -20655,17 +20081,17 @@ ${issues}`);
20655
20081
  throw new Error(`Template "${manifest.id}" prompt "${prompt.name}" defaults to "${prompt.default}", which is not one of its options (${prompt.options.map((option) => option.value).join(", ")})`);
20656
20082
  }
20657
20083
  }
20658
- const filesRoot = import_path14.default.join(directory, "files");
20084
+ const filesRoot = import_path13.default.join(directory, "files");
20659
20085
  for (const file of manifest.files) {
20660
- const source = import_path14.default.resolve(filesRoot, file.from);
20661
- if (!source.startsWith(filesRoot + import_path14.default.sep)) {
20086
+ const source = import_path13.default.resolve(filesRoot, file.from);
20087
+ if (!source.startsWith(filesRoot + import_path13.default.sep)) {
20662
20088
  throw new Error(`Template "${manifest.id}" declares a source outside files/: ${file.from}`);
20663
20089
  }
20664
20090
  if (!import_fs10.default.existsSync(source)) {
20665
20091
  throw new Error(`Template "${manifest.id}" declares a missing source file: files/${file.from}`);
20666
20092
  }
20667
- const destination = import_path14.default.normalize(file.to);
20668
- if (import_path14.default.isAbsolute(destination) || destination.split(/[\\/]/).includes("..")) {
20093
+ const destination = import_path13.default.normalize(file.to);
20094
+ if (import_path13.default.isAbsolute(destination) || destination.split(/[\\/]/).includes("..")) {
20669
20095
  throw new Error(`Template "${manifest.id}" declares a destination outside the service folder: ${file.to}`);
20670
20096
  }
20671
20097
  const gate = file.when && (manifest.prompts.some((prompt) => prompt.type === "boolean" && prompt.name === file.when) || typeof manifest.values[file.when] === "boolean");
@@ -20680,7 +20106,7 @@ function listTemplates() {
20680
20106
  if (!import_fs10.default.existsSync(root)) {
20681
20107
  return [];
20682
20108
  }
20683
- const templates = import_fs10.default.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && import_fs10.default.existsSync(import_path14.default.join(root, entry.name, MANIFEST_FILE))).map((entry) => loadTemplate(import_path14.default.join(root, entry.name)));
20109
+ const templates = import_fs10.default.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && import_fs10.default.existsSync(import_path13.default.join(root, entry.name, MANIFEST_FILE))).map((entry) => loadTemplate(import_path13.default.join(root, entry.name)));
20684
20110
  if (templates.length > 0 && !templates.some((template) => template.isDefault)) {
20685
20111
  throw new Error(`DEFAULT_TEMPLATE_ID is "${DEFAULT_TEMPLATE_ID}", but no template with that id is bundled`);
20686
20112
  }
@@ -20700,7 +20126,7 @@ function findTemplate(id) {
20700
20126
 
20701
20127
  // src/templates/scaffold.ts
20702
20128
  var import_fs11 = __toESM(require("fs"));
20703
- var import_path15 = __toESM(require("path"));
20129
+ var import_path14 = __toESM(require("path"));
20704
20130
 
20705
20131
  // src/templates/render.ts
20706
20132
  var PLACEHOLDER = /\{\{\s*([a-zA-Z0-9_]+)\s*(?:\|\s*([a-zA-Z0-9_]+)\s*)?\}\}/g;
@@ -20768,15 +20194,15 @@ function render(source, answers, origin) {
20768
20194
  // src/templates/scaffold.ts
20769
20195
  var BINARY_EXTENSIONS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".ico", ".zip", ".woff", ".woff2"]);
20770
20196
  function renderTemplate(template, answers) {
20771
- const filesRoot = import_path15.default.join(template.directory, "files");
20197
+ const filesRoot = import_path14.default.join(template.directory, "files");
20772
20198
  const rendered = [];
20773
20199
  for (const file of template.manifest.files) {
20774
20200
  if (file.when && !answers[file.when]) {
20775
20201
  continue;
20776
20202
  }
20777
- const source = import_path15.default.join(filesRoot, file.from);
20203
+ const source = import_path14.default.join(filesRoot, file.from);
20778
20204
  const relativePath = render(file.to, answers, `destination of ${file.from}`);
20779
- if (BINARY_EXTENSIONS.has(import_path15.default.extname(file.from).toLowerCase())) {
20205
+ if (BINARY_EXTENSIONS.has(import_path14.default.extname(file.from).toLowerCase())) {
20780
20206
  rendered.push({ relativePath, contents: import_fs11.default.readFileSync(source) });
20781
20207
  continue;
20782
20208
  }
@@ -20793,15 +20219,15 @@ function scaffoldService(template, answers, serviceId, projectRoot = process.cwd
20793
20219
  throw new Error(`services/${serviceId} already exists \u2014 pick another service id, or remove it first.`);
20794
20220
  }
20795
20221
  for (const file of files) {
20796
- const target = import_path15.default.resolve(serviceDirectory2, file.relativePath);
20797
- if (target !== serviceDirectory2 && !target.startsWith(serviceDirectory2 + import_path15.default.sep)) {
20222
+ const target = import_path14.default.resolve(serviceDirectory2, file.relativePath);
20223
+ if (target !== serviceDirectory2 && !target.startsWith(serviceDirectory2 + import_path14.default.sep)) {
20798
20224
  throw new Error(`Template "${template.manifest.id}" resolved a path outside the service folder: ${file.relativePath}`);
20799
20225
  }
20800
20226
  }
20801
20227
  const createdServicesDirectory = !import_fs11.default.existsSync(servicesRoot);
20802
20228
  for (const file of files) {
20803
- const target = import_path15.default.join(serviceDirectory2, file.relativePath);
20804
- import_fs11.default.mkdirSync(import_path15.default.dirname(target), { recursive: true });
20229
+ const target = import_path14.default.join(serviceDirectory2, file.relativePath);
20230
+ import_fs11.default.mkdirSync(import_path14.default.dirname(target), { recursive: true });
20805
20231
  import_fs11.default.writeFileSync(target, file.contents);
20806
20232
  }
20807
20233
  return { serviceDirectory: serviceDirectory2, files, createdServicesDirectory };
@@ -20955,7 +20381,7 @@ async function scaffoldFromTemplate(template, options = {}, projectRoot = option
20955
20381
  });
20956
20382
  const serviceId = String(answers.id);
20957
20383
  const { serviceDirectory: serviceDirectory2, files, createdServicesDirectory } = scaffoldService(template, answers, serviceId, projectRoot);
20958
- const relativePath = import_path16.default.relative(projectRoot, serviceDirectory2) || serviceDirectory2;
20384
+ const relativePath = import_path15.default.relative(projectRoot, serviceDirectory2) || serviceDirectory2;
20959
20385
  const written = files.map((file) => file.relativePath);
20960
20386
  if (createdServicesDirectory) {
20961
20387
  emit({ type: "created-services-directory" });
@@ -20969,22 +20395,22 @@ async function createService(templateId, options = {}) {
20969
20395
 
20970
20396
  // src/operations/init/testing.ts
20971
20397
  var import_fs12 = __toESM(require("fs"));
20972
- var import_path17 = __toESM(require("path"));
20398
+ var import_path16 = __toESM(require("path"));
20973
20399
  function testingFilesDirectory() {
20974
- return import_path17.default.join(packageRoot(), PROJECT_FILES_DIRECTORY);
20400
+ return import_path16.default.join(packageRoot(), PROJECT_FILES_DIRECTORY);
20975
20401
  }
20976
20402
  function writeTestingFiles(projectRoot) {
20977
20403
  const source = testingFilesDirectory();
20978
20404
  const created = [];
20979
20405
  const skipped = [];
20980
20406
  for (const file of TESTING_FILES) {
20981
- const target = import_path17.default.join(projectRoot, file);
20407
+ const target = import_path16.default.join(projectRoot, file);
20982
20408
  if (import_fs12.default.existsSync(target)) {
20983
20409
  skipped.push(file);
20984
20410
  continue;
20985
20411
  }
20986
- const contents = import_fs12.default.readFileSync(import_path17.default.join(source, file));
20987
- import_fs12.default.mkdirSync(import_path17.default.dirname(target), { recursive: true });
20412
+ const contents = import_fs12.default.readFileSync(import_path16.default.join(source, file));
20413
+ import_fs12.default.mkdirSync(import_path16.default.dirname(target), { recursive: true });
20988
20414
  import_fs12.default.writeFileSync(target, contents);
20989
20415
  created.push(file);
20990
20416
  }
@@ -20996,10 +20422,10 @@ var GITIGNORE_ENTRIES = ["node_modules/", `${TOKEN_DIR}/`, ...TEST_GITIGNORE_ENT
20996
20422
  var CLI_PACKAGE = "@flowrunner/cli";
20997
20423
  var CLI_PACKAGE_NAMES = [CLI_PACKAGE, "flowrunner-cli"];
20998
20424
  function cliVersion() {
20999
- return JSON.parse(import_fs13.default.readFileSync(import_path18.default.join(packageRoot(), "package.json"), "utf-8")).version;
20425
+ return JSON.parse(import_fs13.default.readFileSync(import_path17.default.join(packageRoot(), "package.json"), "utf-8")).version;
21000
20426
  }
21001
20427
  function packageNameFrom(directory) {
21002
- const name = import_path18.default.basename(import_path18.default.resolve(directory)).toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[._-]+|[-._]+$/g, "");
20428
+ const name = import_path17.default.basename(import_path17.default.resolve(directory)).toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[._-]+|[-._]+$/g, "");
21003
20429
  return name || "flowrunner-extensions";
21004
20430
  }
21005
20431
  function addMissing(section, additions, placeholders = {}) {
@@ -21013,10 +20439,11 @@ function addMissing(section, additions, placeholders = {}) {
21013
20439
  return changed;
21014
20440
  }
21015
20441
  function writePackageJson(projectRoot, tests) {
21016
- const fullPath = import_path18.default.join(projectRoot, "package.json");
20442
+ const fullPath = import_path17.default.join(projectRoot, "package.json");
21017
20443
  const version = cliVersion();
21018
20444
  const devDependencies = { [CLI_PACKAGE]: version, ...tests ? TEST_DEV_DEPENDENCIES : {} };
21019
20445
  const scripts = { deploy: "flowrunner deploy --all", ...tests ? TEST_SCRIPTS : {} };
20446
+ const overrides = tests ? TEST_OVERRIDES : {};
21020
20447
  if (!import_fs13.default.existsSync(fullPath)) {
21021
20448
  const manifest2 = {
21022
20449
  name: packageNameFrom(projectRoot),
@@ -21024,7 +20451,8 @@ function writePackageJson(projectRoot, tests) {
21024
20451
  private: true,
21025
20452
  description: "FlowRunner custom extensions.",
21026
20453
  scripts,
21027
- devDependencies
20454
+ devDependencies,
20455
+ ...tests ? { overrides } : {}
21028
20456
  };
21029
20457
  import_fs13.default.writeFileSync(fullPath, JSON.stringify(manifest2, null, 2) + "\n", "utf-8");
21030
20458
  return "created";
@@ -21034,9 +20462,13 @@ function writePackageJson(projectRoot, tests) {
21034
20462
  const additions = alreadyDeclared ? Object.fromEntries(Object.entries(devDependencies).filter(([name]) => name !== CLI_PACKAGE)) : devDependencies;
21035
20463
  manifest.devDependencies ??= {};
21036
20464
  manifest.scripts ??= {};
20465
+ if (tests) {
20466
+ manifest.overrides ??= {};
20467
+ }
21037
20468
  const changed = [
21038
20469
  addMissing(manifest.devDependencies, additions),
21039
- addMissing(manifest.scripts, tests ? TEST_SCRIPTS : {}, PLACEHOLDER_SCRIPTS)
20470
+ addMissing(manifest.scripts, tests ? TEST_SCRIPTS : {}, PLACEHOLDER_SCRIPTS),
20471
+ tests && addMissing(manifest.overrides, overrides)
21040
20472
  ].some(Boolean);
21041
20473
  if (!changed) {
21042
20474
  return "skipped";
@@ -21045,7 +20477,7 @@ function writePackageJson(projectRoot, tests) {
21045
20477
  return "updated";
21046
20478
  }
21047
20479
  function writeGitignore(projectRoot) {
21048
- const fullPath = import_path18.default.join(projectRoot, ".gitignore");
20480
+ const fullPath = import_path17.default.join(projectRoot, ".gitignore");
21049
20481
  if (!import_fs13.default.existsSync(fullPath)) {
21050
20482
  import_fs13.default.writeFileSync(fullPath, GITIGNORE_ENTRIES.join("\n") + "\n", "utf-8");
21051
20483
  return "created";
@@ -21104,7 +20536,7 @@ The authoring reference the CLI ships lives in
21104
20536
  \`.flowrunner/token\` is the deploy token and must not.
21105
20537
  `;
21106
20538
  function writeReadme(projectRoot) {
21107
- const fullPath = import_path18.default.join(projectRoot, "README.md");
20539
+ const fullPath = import_path17.default.join(projectRoot, "README.md");
21108
20540
  if (import_fs13.default.existsSync(fullPath)) {
21109
20541
  return "skipped";
21110
20542
  }
@@ -21120,7 +20552,7 @@ var JSCONFIG = {
21120
20552
  include: ["services/*/src/**/*.js"]
21121
20553
  };
21122
20554
  function writeJsconfig(projectRoot) {
21123
- const fullPath = import_path18.default.join(projectRoot, "jsconfig.json");
20555
+ const fullPath = import_path17.default.join(projectRoot, "jsconfig.json");
21124
20556
  if (import_fs13.default.existsSync(fullPath)) {
21125
20557
  return "skipped";
21126
20558
  }
@@ -21198,7 +20630,7 @@ function describeTarget(projectRoot) {
21198
20630
  return { projectRoot, lines, defaultYes: false };
21199
20631
  }
21200
20632
  async function init(options = {}) {
21201
- const projectRoot = import_path18.default.resolve(options.cwd ?? ".");
20633
+ const projectRoot = import_path17.default.resolve(options.cwd ?? ".");
21202
20634
  const emit = emitter(options);
21203
20635
  const warn = (message) => emit({ type: "warning", message });
21204
20636
  const template = options.template ? resolveTemplateId(options.template) : null;
@@ -21270,7 +20702,7 @@ async function init(options = {}) {
21270
20702
 
21271
20703
  // src/operations/init-claude/index.ts
21272
20704
  var import_fs14 = __toESM(require("fs"));
21273
- var import_path19 = __toESM(require("path"));
20705
+ var import_path18 = __toESM(require("path"));
21274
20706
 
21275
20707
  // src/operations/init-claude/segment.ts
21276
20708
  var BEGIN_MARKER = "<!-- flowrunner-cli:ai:start -->";
@@ -21305,7 +20737,7 @@ function mergeSegment(current, segment, file) {
21305
20737
 
21306
20738
  // src/operations/init-claude/index.ts
21307
20739
  function providerDirectory(provider = CLAUDE_PROVIDER) {
21308
- return import_path19.default.join(packageRoot(), AI_PROVIDERS_DIRECTORY, provider);
20740
+ return import_path18.default.join(packageRoot(), AI_PROVIDERS_DIRECTORY, provider);
21309
20741
  }
21310
20742
  function packedAgents(directory) {
21311
20743
  if (!import_fs14.default.existsSync(directory)) {
@@ -21314,7 +20746,7 @@ function packedAgents(directory) {
21314
20746
  return import_fs14.default.readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".md")).map((entry) => entry.name).sort();
21315
20747
  }
21316
20748
  function writeAgents(sourceDirectory, projectRoot, layout) {
21317
- const directory = import_path19.default.join(projectRoot, layout.agentsDirectory);
20749
+ const directory = import_path18.default.join(projectRoot, layout.agentsDirectory);
21318
20750
  const agents = packedAgents(sourceDirectory);
21319
20751
  const created = [];
21320
20752
  const updated = [];
@@ -21326,8 +20758,8 @@ function writeAgents(sourceDirectory, projectRoot, layout) {
21326
20758
  }
21327
20759
  import_fs14.default.mkdirSync(directory, { recursive: true });
21328
20760
  for (const agent of agents) {
21329
- const contents = import_fs14.default.readFileSync(import_path19.default.join(sourceDirectory, agent), "utf-8");
21330
- const target = import_path19.default.join(directory, agent);
20761
+ const contents = import_fs14.default.readFileSync(import_path18.default.join(sourceDirectory, agent), "utf-8");
20762
+ const target = import_path18.default.join(directory, agent);
21331
20763
  if (contents.length === 0) {
21332
20764
  warnings.push(`${agent} is empty in the installed CLI \u2014 written as an empty file.`);
21333
20765
  }
@@ -21346,8 +20778,8 @@ function writeAgents(sourceDirectory, projectRoot, layout) {
21346
20778
  return { directory, created, updated, unchanged, warnings };
21347
20779
  }
21348
20780
  function writeSegment(sourceDirectory, projectRoot, layout) {
21349
- const file = import_path19.default.join(projectRoot, layout.instructionsFile);
21350
- const source = import_path19.default.join(sourceDirectory, ORCHESTRATOR_SEGMENT_FILE);
20781
+ const file = import_path18.default.join(projectRoot, layout.instructionsFile);
20782
+ const source = import_path18.default.join(sourceDirectory, ORCHESTRATOR_SEGMENT_FILE);
21351
20783
  const warnings = [];
21352
20784
  if (!import_fs14.default.existsSync(source)) {
21353
20785
  warnings.push(`The installed CLI ships no ${ORCHESTRATOR_SEGMENT_FILE} \u2014 ${layout.instructionsFile} was left alone.`);
@@ -21365,18 +20797,18 @@ function writeSegment(sourceDirectory, projectRoot, layout) {
21365
20797
  return { file, outcome: merged.outcome, warnings };
21366
20798
  }
21367
20799
  async function initClaude(options = {}) {
21368
- const projectRoot = import_path19.default.resolve(options.cwd ?? ".");
20800
+ const projectRoot = import_path18.default.resolve(options.cwd ?? ".");
21369
20801
  const emit = emitter(options);
21370
20802
  const warnAll = (messages) => messages.forEach((message) => emit({ type: "warning", message }));
21371
20803
  const layout = PROVIDERS[CLAUDE_PROVIDER];
21372
20804
  const sourceDirectory = providerDirectory(layout.id);
21373
20805
  if (!import_fs14.default.existsSync(sourceDirectory)) {
21374
- throw new AiDocsMissingError(import_path19.default.join(AI_PROVIDERS_DIRECTORY, CLAUDE_PROVIDER));
20806
+ throw new AiDocsMissingError(import_path18.default.join(AI_PROVIDERS_DIRECTORY, CLAUDE_PROVIDER));
21375
20807
  }
21376
20808
  if (!import_fs14.default.existsSync(projectRoot)) {
21377
20809
  import_fs14.default.mkdirSync(projectRoot, { recursive: true });
21378
20810
  }
21379
- const agents = writeAgents(import_path19.default.join(sourceDirectory, PROVIDER_AGENTS_DIRECTORY), projectRoot, layout);
20811
+ const agents = writeAgents(import_path18.default.join(sourceDirectory, PROVIDER_AGENTS_DIRECTORY), projectRoot, layout);
21380
20812
  emit({
21381
20813
  type: "agents",
21382
20814
  directory: agents.directory,
@@ -21440,7 +20872,7 @@ var ERROR_HTML = (error) => `<!DOCTYPE html>
21440
20872
  </body></html>`;
21441
20873
 
21442
20874
  // src/server/routes/callback.ts
21443
- function callbackRoute(path19 = "/callback") {
20875
+ function callbackRoute(path18 = "/callback") {
21444
20876
  let resolveCode = null;
21445
20877
  let rejectCode = null;
21446
20878
  const respond = (route2, html) => {
@@ -21449,7 +20881,7 @@ function callbackRoute(path19 = "/callback") {
21449
20881
  };
21450
20882
  const route = {
21451
20883
  method: "GET",
21452
- path: path19,
20884
+ path: path18,
21453
20885
  handle: (context) => {
21454
20886
  const code = context.url.searchParams.get("code");
21455
20887
  const error = context.url.searchParams.get("error");
@@ -21572,13 +21004,13 @@ async function logout(options = {}) {
21572
21004
  }
21573
21005
 
21574
21006
  // src/operations/pull/index.ts
21575
- var import_adm_zip = __toESM(require_adm_zip());
21007
+ var import_adm_zip2 = __toESM(require_adm_zip());
21576
21008
  var import_fs16 = __toESM(require("fs"));
21577
- var import_path21 = __toESM(require("path"));
21009
+ var import_path20 = __toESM(require("path"));
21578
21010
 
21579
21011
  // src/operations/pull/extract.ts
21580
21012
  var import_fs15 = __toESM(require("fs"));
21581
- var import_path20 = __toESM(require("path"));
21013
+ var import_path19 = __toESM(require("path"));
21582
21014
  var PACKAGE_PREFIX = "package/";
21583
21015
  var SAFE_SERVICE_ID = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
21584
21016
  function isSafeServiceId(serviceId) {
@@ -21597,11 +21029,11 @@ function extractService(archive, directory) {
21597
21029
  let written = 0;
21598
21030
  for (const entry of serviceEntries(archive)) {
21599
21031
  const relativePath = entry.entryName.slice(PACKAGE_PREFIX.length);
21600
- const target = import_path20.default.resolve(directory, relativePath);
21601
- if (target !== directory && !target.startsWith(directory + import_path20.default.sep)) {
21032
+ const target = import_path19.default.resolve(directory, relativePath);
21033
+ if (target !== directory && !target.startsWith(directory + import_path19.default.sep)) {
21602
21034
  continue;
21603
21035
  }
21604
- import_fs15.default.mkdirSync(import_path20.default.dirname(target), { recursive: true });
21036
+ import_fs15.default.mkdirSync(import_path19.default.dirname(target), { recursive: true });
21605
21037
  import_fs15.default.writeFileSync(target, entry.getData());
21606
21038
  written++;
21607
21039
  }
@@ -21622,7 +21054,7 @@ function declaredDependencies(archive) {
21622
21054
 
21623
21055
  // src/operations/pull/index.ts
21624
21056
  async function localState(projectRoot, service) {
21625
- if (!import_fs16.default.existsSync(import_path21.default.resolve(projectRoot, "services", service.serviceId))) {
21057
+ if (!import_fs16.default.existsSync(import_path20.default.resolve(projectRoot, "services", service.serviceId))) {
21626
21058
  return "absent";
21627
21059
  }
21628
21060
  try {
@@ -21667,7 +21099,7 @@ async function pull(options = {}) {
21667
21099
  emit({ type: "skipped", serviceId: service.serviceId, reason });
21668
21100
  continue;
21669
21101
  }
21670
- const directory = import_path21.default.resolve(projectRoot, "services", service.serviceId);
21102
+ const directory = import_path20.default.resolve(projectRoot, "services", service.serviceId);
21671
21103
  const state = await localState(projectRoot, service);
21672
21104
  if (state === "same") {
21673
21105
  upToDate.push({
@@ -21686,7 +21118,7 @@ async function pull(options = {}) {
21686
21118
  }
21687
21119
  const exists = state === "different";
21688
21120
  const zipBuffer = await guard(() => downloadRemoteService(credentials, service.serviceId));
21689
- const archive = new import_adm_zip.default(zipBuffer);
21121
+ const archive = new import_adm_zip2.default(zipBuffer);
21690
21122
  if (exists) {
21691
21123
  import_fs16.default.rmSync(directory, { recursive: true, force: true });
21692
21124
  }