@lovrabet/rabetbase-cli 2.4.6-beta.2 → 2.4.6

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 (294) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/schema.js +1 -1
  207. package/lib/constant/cdn.js +1 -1
  208. package/lib/constant/cli.js +1 -1
  209. package/lib/constant/defaults.js +1 -1
  210. package/lib/constant/domain.js +1 -1
  211. package/lib/constant/env.js +1 -1
  212. package/lib/constant/output.js +1 -1
  213. package/lib/constant/paths.js +1 -1
  214. package/lib/constant/risk.js +1 -1
  215. package/lib/context/app-resolver.js +1 -1
  216. package/lib/context/auth-resolver.js +1 -1
  217. package/lib/context/config-loader.js +1 -1
  218. package/lib/context.js +1 -1
  219. package/lib/core/alias-resolver.js +1 -1
  220. package/lib/core/api-client.js +1 -1
  221. package/lib/core/bff/config.js +1 -1
  222. package/lib/core/bff/file-system.js +1 -1
  223. package/lib/core/bff/hash.js +1 -1
  224. package/lib/core/bff/lock.js +1 -1
  225. package/lib/core/bff/utils.js +1 -1
  226. package/lib/core/db-resolver.js +1 -1
  227. package/lib/core/page/file-system.js +1 -1
  228. package/lib/core/page/hash.js +1 -1
  229. package/lib/core/page/lock.js +1 -1
  230. package/lib/core/sql-index-auditor.js +1 -1
  231. package/lib/core/sql-sync/config.js +1 -1
  232. package/lib/core/sql-sync/file-system.js +1 -1
  233. package/lib/core/sql-sync/hash.js +1 -1
  234. package/lib/core/sql-sync/lock.js +1 -1
  235. package/lib/core/sql-sync/utils.js +1 -1
  236. package/lib/core/sql-validator.js +1 -1
  237. package/lib/errors.js +1 -1
  238. package/lib/framework/build-all-flags.js +1 -1
  239. package/lib/framework/error-output.js +1 -1
  240. package/lib/framework/explicit-yes.js +1 -1
  241. package/lib/framework/flags.js +1 -1
  242. package/lib/framework/help.js +1 -1
  243. package/lib/framework/index.js +1 -1
  244. package/lib/framework/output.js +1 -1
  245. package/lib/framework/response.js +1 -1
  246. package/lib/framework/runner-alias.js +1 -1
  247. package/lib/framework/runner.js +1 -1
  248. package/lib/framework/schema-export.js +1 -1
  249. package/lib/framework/types.js +1 -1
  250. package/lib/generated/build-info.d.ts +4 -4
  251. package/lib/generated/build-info.js +1 -1
  252. package/lib/help.js +1 -1
  253. package/lib/postinstall.js +1 -1
  254. package/lib/runtime/confirmation.js +1 -1
  255. package/lib/runtime/event.js +1 -1
  256. package/lib/runtime/index.js +1 -1
  257. package/lib/runtime/queue.js +1 -1
  258. package/lib/runtime/resolve.js +1 -1
  259. package/lib/skills/builtin-skill.js +1 -1
  260. package/lib/skills/main.js +1 -1
  261. package/lib/skills/npx-skills-add.js +1 -1
  262. package/lib/skills/skill-presence.js +1 -1
  263. package/lib/telemetry/cli-command-trace.js +1 -1
  264. package/lib/telemetry/cli-help-trace.js +1 -1
  265. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  266. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  267. package/lib/telemetry/send-cli-trace-log.js +1 -1
  268. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  269. package/lib/utils/ai_config.js +1 -1
  270. package/lib/utils/apply-jq-filter.js +1 -1
  271. package/lib/utils/cdn-config.js +1 -1
  272. package/lib/utils/check-sdk-version.js +1 -1
  273. package/lib/utils/cli-version-check.js +1 -1
  274. package/lib/utils/cli-version-policy.js +1 -1
  275. package/lib/utils/config.js +1 -1
  276. package/lib/utils/entity-with-id.js +1 -1
  277. package/lib/utils/file-utils.js +1 -1
  278. package/lib/utils/guides-cdn.js +1 -1
  279. package/lib/utils/http-client.js +1 -1
  280. package/lib/utils/is-non-interactive.js +1 -1
  281. package/lib/utils/logger.js +1 -1
  282. package/lib/utils/params.js +1 -1
  283. package/lib/utils/platform.js +1 -1
  284. package/lib/utils/rules-cdn.js +1 -1
  285. package/lib/utils/sleep.js +1 -1
  286. package/lib/utils/template-replacer.js +1 -1
  287. package/lib/utils/update-notice.js +1 -1
  288. package/lib/utils/version.js +1 -1
  289. package/lib/utils/with-active-cookie.js +1 -1
  290. package/lib/utils/write-cli-side-channel.js +1 -1
  291. package/package.json +1 -1
  292. package/skills/rabetbase/SKILL.md +3 -3
  293. package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a33_0x3277(_0x14fefd,_0x41d6c2){_0x14fefd=_0x14fefd-0x18e;const _0x22436d=a33_0x2243();let _0x3277cd=_0x22436d[_0x14fefd];return _0x3277cd;}(function(_0x55887d,_0xd33b4f){const _0x2af046=a33_0x3277,_0x4c7e6a=_0x55887d();while(!![]){try{const _0x5a0f06=-parseInt(_0x2af046(0x196))/0x1*(parseInt(_0x2af046(0x18e))/0x2)+parseInt(_0x2af046(0x18f))/0x3+-parseInt(_0x2af046(0x197))/0x4+-parseInt(_0x2af046(0x191))/0x5*(-parseInt(_0x2af046(0x190))/0x6)+parseInt(_0x2af046(0x193))/0x7+parseInt(_0x2af046(0x192))/0x8+parseInt(_0x2af046(0x195))/0x9*(-parseInt(_0x2af046(0x194))/0xa);if(_0x5a0f06===_0xd33b4f)break;else _0x4c7e6a['push'](_0x4c7e6a['shift']());}catch(_0x39a587){_0x4c7e6a['push'](_0x4c7e6a['shift']());}}}(a33_0x2243,0xd148e));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a33_0x2243(){const _0x662cef=['30Oxutye','4942089JSjaVE','17jRNTwD','5567680WVNMEi','39502nGlDSX','2942757zyNvSY','5493678tiDxXF','5zcdwQY','9836944mXwVnN','7742910JieSaU'];a33_0x2243=function(){return _0x662cef;};return a33_0x2243();}
1
+ (function(_0x2f72dd,_0xdd84){const _0x1f1282=a33_0x45aa,_0x3a8f9c=_0x2f72dd();while(!![]){try{const _0x13d5bf=-parseInt(_0x1f1282(0x99))/0x1+-parseInt(_0x1f1282(0x9e))/0x2+parseInt(_0x1f1282(0x9b))/0x3*(parseInt(_0x1f1282(0x96))/0x4)+parseInt(_0x1f1282(0x95))/0x5*(parseInt(_0x1f1282(0x9c))/0x6)+-parseInt(_0x1f1282(0x94))/0x7*(parseInt(_0x1f1282(0x9d))/0x8)+-parseInt(_0x1f1282(0x97))/0x9*(parseInt(_0x1f1282(0x9a))/0xa)+parseInt(_0x1f1282(0x98))/0xb*(parseInt(_0x1f1282(0x93))/0xc);if(_0x13d5bf===_0xdd84)break;else _0x3a8f9c['push'](_0x3a8f9c['shift']());}catch(_0xe9615d){_0x3a8f9c['push'](_0x3a8f9c['shift']());}}}(a33_0x5b46,0xa53f6));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a33_0x45aa(_0x2e6fbc,_0x4fe3f9){_0x2e6fbc=_0x2e6fbc-0x93;const _0x5b462c=a33_0x5b46();let _0x45aa0e=_0x5b462c[_0x2e6fbc];return _0x45aa0e;}function a33_0x5b46(){const _0x3d3168=['28PZVzec','21615Jfsbjf','4gbBSuT','838089SxTaDX','11kzlaxo','97551KaakUY','70cEuuyK','1931934dszbgw','798cuSrwc','2468488XNAXlo','573190tDdfip','20737848epGDRA'];a33_0x5b46=function(){return _0x3d3168;};return a33_0x5b46();}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a34_0x519291=a34_0x4012;function a34_0x4012(_0x14ed12,_0x324e33){_0x14ed12=_0x14ed12-0x177;const _0x3eb85b=a34_0x3eb8();let _0x401268=_0x3eb85b[_0x14ed12];return _0x401268;}(function(_0x21e168,_0x55516d){const _0x1e7ad6=a34_0x4012,_0x141089=_0x21e168();while(!![]){try{const _0xa17420=-parseInt(_0x1e7ad6(0x185))/0x1+parseInt(_0x1e7ad6(0x190))/0x2+-parseInt(_0x1e7ad6(0x18f))/0x3+-parseInt(_0x1e7ad6(0x17a))/0x4+-parseInt(_0x1e7ad6(0x18e))/0x5*(-parseInt(_0x1e7ad6(0x183))/0x6)+parseInt(_0x1e7ad6(0x177))/0x7+parseInt(_0x1e7ad6(0x192))/0x8;if(_0xa17420===_0x55516d)break;else _0x141089['push'](_0x141089['shift']());}catch(_0x4b357e){_0x141089['push'](_0x141089['shift']());}}}(a34_0x3eb8,0x8bef3));function a34_0x3eb8(){const _0x5397ef=['scriptType','3351188QpGZSB','ENDPOINT','(unnamed)','list','Filter\x20by\x20script\x20name','Return\x20full\x20script\x20objects','List\x20BFF\x20scripts','read','COMMON','6384246hrmrAX','string','577191XYxpQP','bff','appCode','length','functionName','Script\x20type\x20filter','description','map','verbose','5GnxusO','931119tXYnvF','1703496snRnwv','name','1401672NXZjGQ','str','1452738Nshted','type'];a34_0x3eb8=function(){return _0x5397ef;};return a34_0x3eb8();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x519291(0x186),'command':a34_0x519291(0x17d),'description':a34_0x519291(0x180),'risk':a34_0x519291(0x181),'flags':[{'name':a34_0x519291(0x178),'type':a34_0x519291(0x184),'description':a34_0x519291(0x18a),'default':a34_0x519291(0x17b),'enum':[a34_0x519291(0x17b),a34_0x519291(0x182)]},{'name':a34_0x519291(0x191),'type':a34_0x519291(0x184),'description':a34_0x519291(0x17e)},{'name':a34_0x519291(0x18d),'type':'boolean','description':a34_0x519291(0x17f)}],async 'execute'(_0xfc475b){const _0xbaed0b=a34_0x519291,_0x168948=await listBffScripts(_0xfc475b[_0xbaed0b(0x187)],_0xfc475b['str'](_0xbaed0b(0x178)),{'scriptName':_0xfc475b[_0xbaed0b(0x193)](_0xbaed0b(0x191))||undefined}),_0x33888d=_0xfc475b['bool'](_0xbaed0b(0x18d));return{'ok':!![],'data':_0x33888d?_0x168948:_0x168948[_0xbaed0b(0x18c)](_0x16cb0f=>({'id':_0x16cb0f['id'],'functionName':_0x16cb0f[_0xbaed0b(0x189)]??'','description':_0x16cb0f[_0xbaed0b(0x18b)]||_0xbaed0b(0x17c),'scriptType':_0x16cb0f[_0xbaed0b(0x179)]})),'message':_0x168948[_0xbaed0b(0x188)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
1
+ function a34_0x2911(){const _0x351651=['str','336178bKWagE','Script\x20type\x20filter','140jBcqwV','length','map','description','87198RHXZmK','bool','string','COMMON','(unnamed)','119670EXLHxt','664769xkSkoy','14480584KVUGxH','Return\x20full\x20script\x20objects','594VpGHan','scriptType','ENDPOINT','name','type','143036GBDAXO','List\x20BFF\x20scripts','75MounqM','verbose','7EjmBZs','15777179kzjvPr','12tDFqEA'];a34_0x2911=function(){return _0x351651;};return a34_0x2911();}const a34_0x5a29ab=a34_0x544e;function a34_0x544e(_0x362591,_0x542bb6){_0x362591=_0x362591-0x1a9;const _0x29111c=a34_0x2911();let _0x544ef1=_0x29111c[_0x362591];return _0x544ef1;}(function(_0x2ce020,_0x288e0e){const _0x57431c=a34_0x544e,_0x4955cc=_0x2ce020();while(!![]){try{const _0x1ef4b4=parseInt(_0x57431c(0x1b7))/0x1+parseInt(_0x57431c(0x1ab))/0x2+-parseInt(_0x57431c(0x1c1))/0x3*(-parseInt(_0x57431c(0x1bf))/0x4)+-parseInt(_0x57431c(0x1ad))/0x5*(-parseInt(_0x57431c(0x1b1))/0x6)+-parseInt(_0x57431c(0x1c3))/0x7*(parseInt(_0x57431c(0x1b8))/0x8)+parseInt(_0x57431c(0x1ba))/0x9*(-parseInt(_0x57431c(0x1b6))/0xa)+parseInt(_0x57431c(0x1c4))/0xb*(parseInt(_0x57431c(0x1a9))/0xc);if(_0x1ef4b4===_0x288e0e)break;else _0x4955cc['push'](_0x4955cc['shift']());}catch(_0x956cf6){_0x4955cc['push'](_0x4955cc['shift']());}}}(a34_0x2911,0xec5d7));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':'list','description':a34_0x5a29ab(0x1c0),'risk':'read','flags':[{'name':a34_0x5a29ab(0x1be),'type':a34_0x5a29ab(0x1b3),'description':a34_0x5a29ab(0x1ac),'default':a34_0x5a29ab(0x1bc),'enum':[a34_0x5a29ab(0x1bc),a34_0x5a29ab(0x1b4)]},{'name':'name','type':a34_0x5a29ab(0x1b3),'description':'Filter\x20by\x20script\x20name'},{'name':a34_0x5a29ab(0x1c2),'type':'boolean','description':a34_0x5a29ab(0x1b9)}],async 'execute'(_0x105f9d){const _0x2f217b=a34_0x5a29ab,_0x3b526d=await listBffScripts(_0x105f9d['appCode'],_0x105f9d[_0x2f217b(0x1aa)]('type'),{'scriptName':_0x105f9d[_0x2f217b(0x1aa)](_0x2f217b(0x1bd))||undefined}),_0x20b205=_0x105f9d[_0x2f217b(0x1b2)](_0x2f217b(0x1c2));return{'ok':!![],'data':_0x20b205?_0x3b526d:_0x3b526d[_0x2f217b(0x1af)](_0x120c2a=>({'id':_0x120c2a['id'],'functionName':_0x120c2a['functionName']??'','description':_0x120c2a[_0x2f217b(0x1b0)]||_0x2f217b(0x1b5),'scriptType':_0x120c2a[_0x2f217b(0x1bb)]})),'message':_0x3b526d[_0x2f217b(0x1ae)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
1
- const a35_0xaba1f0=a35_0x333b;(function(_0xd50f88,_0x5530cf){const _0x100730=a35_0x333b,_0xe600f9=_0xd50f88();while(!![]){try{const _0x509053=parseInt(_0x100730(0x16e))/0x1+-parseInt(_0x100730(0x146))/0x2*(-parseInt(_0x100730(0x158))/0x3)+-parseInt(_0x100730(0x161))/0x4*(-parseInt(_0x100730(0x149))/0x5)+-parseInt(_0x100730(0x14d))/0x6+-parseInt(_0x100730(0x178))/0x7*(parseInt(_0x100730(0x15c))/0x8)+-parseInt(_0x100730(0x148))/0x9+-parseInt(_0x100730(0x14a))/0xa*(-parseInt(_0x100730(0x164))/0xb);if(_0x509053===_0x5530cf)break;else _0xe600f9['push'](_0xe600f9['shift']());}catch(_0x363bdc){_0xe600f9['push'](_0xe600f9['shift']());}}}(a35_0xc913,0x3e934));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a35_0xc913(){const _0x302a63=['str','7lmyTcl','Remote\x20script\x20missing\x20id.','force','stdin','skipped','hash','toISOString','bff','Force\x20pull\x20cancelled.','Pull\x20only\x20this\x20script\x20type','lockFilePath','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','conflict','HOOK','stringify','apps','apiDir','appCode','filePath','Lock\x20scope\x20for\x20app\x20\x22','message','trim','utf8','read','2wNCZWO','question','4461813XfDiIp','10uOMVtb','970SNbYTZ','bool','datasetCode','901506tilNjn','\x22\x20not\x20found\x20after\x20ensureLockScope.','lastSync','cancelled','COMMON','unresolvable\x20target\x20path','Would\x20inspect\x20','includes','functionNode','operationType','parse','734769eysCgM','all','scriptType','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','1192472DGdXyC','local\x20unsynced\x20changes','\x20failed','push','hookLocation','346508SovPor','scriptContent','stderr','15103fJqwAr','lockKey','scriptsRoot','would_pull','No\x20remote\x20BFF\x20scripts\x20found.','nonInteractive','length','close','/api/management/library/scripts/list?appCode=','alias','500017kHwALM','pull','&type=','functions','type','\x20skipped,\x20','functionName','version','map'];a35_0xc913=function(){return _0x302a63;};return a35_0xc913();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a35_0x333b(_0x4b8193,_0x2325cf){_0x4b8193=_0x4b8193-0x143;const _0xc9139d=a35_0xc913();let _0x333b01=_0xc9139d[_0x4b8193];return _0x333b01;}import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0xaba1f0(0x17f),'command':a35_0xaba1f0(0x16f),'description':a35_0xaba1f0(0x183),'risk':a35_0xaba1f0(0x145),'flags':[{'name':'type','type':'string','description':a35_0xaba1f0(0x181),'enum':[a35_0xaba1f0(0x151),'ENDPOINT',a35_0xaba1f0(0x185)]},{'name':a35_0xaba1f0(0x17a),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x2cb212){const _0x1e09ca=a35_0xaba1f0,_0x15d0ec=loadBffProjectConfig(_0x2cb212['appCode']),_0x15f778=await readBffLockFile(_0x15d0ec[_0x1e09ca(0x182)]),{appLock:_0x46ee95}=ensureLockScope(_0x15f778??createEmptyBffLock(),_0x2cb212['appCode'],_0x15d0ec[_0x1e09ca(0x166)],'pull'),_0x200f9d=normalizeBffType(_0x2cb212[_0x1e09ca(0x177)](_0x1e09ca(0x172)))??undefined,_0xd9fc8d=buildDatasetCodeToAliasMap(_0x2cb212[_0x1e09ca(0x188)],_0x2cb212[_0x1e09ca(0x189)]),[_0x4cc89c,_0xf51204]=await Promise[_0x1e09ca(0x159)]([listBffScripts(_0x2cb212[_0x1e09ca(0x189)],_0x200f9d),getBffScriptStatistics(_0x2cb212[_0x1e09ca(0x189)])]),_0x17dcac=createHookLocationMap(_0xf51204),_0x53b9f0=[];for(const _0x26675c of _0x4cc89c){const _0x108ad8=resolveRemoteScriptTarget(_0x15d0ec,_0x26675c,_0x17dcac,_0x46ee95['functions'],_0xd9fc8d);if(!_0x108ad8){_0x53b9f0[_0x1e09ca(0x15f)]({'scriptType':_0x26675c[_0x1e09ca(0x15a)],'functionName':_0x26675c[_0x1e09ca(0x174)]??'','status':_0x1e09ca(0x17c),'reason':_0x1e09ca(0x152)});continue;}const _0x4d483b=_0x46ee95[_0x1e09ca(0x171)][_0x108ad8['lockKey']],_0x3aa0e2=_0x26675c['scriptContent']!=null?computeContentHash(_0x26675c[_0x1e09ca(0x162)]):undefined,_0x1ce84f=await hasUnsyncedLocalChanges(_0x108ad8[_0x1e09ca(0x18a)],_0x4d483b,_0x3aa0e2);_0x53b9f0['push']({'lockKey':_0x108ad8[_0x1e09ca(0x165)],'filePath':_0x108ad8[_0x1e09ca(0x18a)],'remoteId':_0x26675c['id']??null,'status':_0x1ce84f?_0x1e09ca(0x184):_0x1e09ca(0x167)});}return{'method':'GET','url':_0x1e09ca(0x16c)+_0x2cb212[_0x1e09ca(0x189)]+(_0x200f9d?_0x1e09ca(0x170)+_0x200f9d:''),'body':{'appCode':_0x2cb212[_0x1e09ca(0x189)],'filterType':_0x200f9d??null,'files':_0x53b9f0},'description':_0x1e09ca(0x153)+_0x53b9f0['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x298b7e){const _0x225300=a35_0xaba1f0,_0x32a0f5=loadBffProjectConfig(_0x298b7e[_0x225300(0x189)]),_0xe6a646=await readBffLockFile(_0x32a0f5[_0x225300(0x182)]),{lockData:_0x4c31f1,appLock:_0x2885da}=ensureLockScope(_0xe6a646??createEmptyBffLock(),_0x298b7e['appCode'],_0x32a0f5[_0x225300(0x166)],_0x225300(0x16f)),_0x23ea09=normalizeBffType(_0x298b7e[_0x225300(0x177)](_0x225300(0x172)))??undefined;if(_0x298b7e[_0x225300(0x177)](_0x225300(0x172))&&!_0x23ea09)throw CliErrors['validation']('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x1a4a48,_0x53d2f6]=await Promise['all']([listBffScripts(_0x298b7e[_0x225300(0x189)],_0x23ea09),getBffScriptStatistics(_0x298b7e[_0x225300(0x189)])]);if(_0x1a4a48[_0x225300(0x16a)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x225300(0x168)};const _0x4e0f58=_0x298b7e[_0x225300(0x14b)](_0x225300(0x17a));if(_0x4e0f58&&!_0x298b7e[_0x225300(0x169)]){const _0x4dc843=await confirmForce();if(!_0x4dc843)throw CliErrors[_0x225300(0x150)](_0x225300(0x180));}if(_0x4e0f58&&_0x298b7e[_0x225300(0x169)]){}const _0x2dc75a=buildDatasetCodeToAliasMap(_0x298b7e[_0x225300(0x188)],_0x298b7e[_0x225300(0x189)]),_0x5251c2=createHookLocationMap(_0x53d2f6),_0xd6a8b5=JSON[_0x225300(0x157)](JSON[_0x225300(0x186)](_0x4c31f1)),_0xc89e25=_0x298b7e[_0x225300(0x189)],_0x571a3c=_0xd6a8b5[_0x225300(0x187)][_0xc89e25];if(!_0x571a3c)throw new Error(_0x225300(0x18b)+_0xc89e25+_0x225300(0x14e));const _0x10fbe4=[],_0x39c588=[],_0x3e2f91=[];for(const _0x123b55 of _0x1a4a48){const _0x546ea2=resolveRemoteScriptTarget(_0x32a0f5,_0x123b55,_0x5251c2,_0x2885da['functions'],_0x2dc75a);if(!_0x546ea2){_0x39c588[_0x225300(0x15f)]({'lockKey':_0x123b55[_0x225300(0x15a)]+'/'+_0x123b55[_0x225300(0x174)],'reason':_0x225300(0x152)});continue;}const _0x4efdda=_0x2885da[_0x225300(0x171)][_0x546ea2[_0x225300(0x165)]];try{if(!_0x123b55['id'])throw new Error(_0x225300(0x179));if(_0x123b55[_0x225300(0x162)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x893f32=_0x123b55[_0x225300(0x162)],_0x29f35b=computeContentHash(_0x893f32);if(!_0x4e0f58){const _0x4a4f89=await hasUnsyncedLocalChanges(_0x546ea2['filePath'],_0x4efdda,_0x29f35b);if(_0x4a4f89){_0x39c588[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'reason':_0x225300(0x15d)});continue;}}await ensureParentDirectory(_0x546ea2[_0x225300(0x18a)]),await writeFile(_0x546ea2[_0x225300(0x18a)],_0x893f32,_0x225300(0x144));const _0x1ba898={'hash':_0x29f35b,'remoteId':_0x123b55['id'],'version':_0x123b55[_0x225300(0x175)]};_0x546ea2[_0x225300(0x172)]===_0x225300(0x185)&&_0x546ea2[_0x225300(0x160)]&&(_0x1ba898[_0x225300(0x16d)]=_0x546ea2['hookLocation']['alias'],_0x1ba898[_0x225300(0x14c)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x14c)],_0x1ba898[_0x225300(0x156)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x156)],_0x1ba898[_0x225300(0x155)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x155)]),_0x571a3c[_0x225300(0x171)][_0x546ea2[_0x225300(0x165)]]=_0x1ba898,_0x10fbe4[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'remoteId':_0x123b55['id']});}catch(_0x589555){_0x3e2f91[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'error':_0x589555 instanceof Error?_0x589555[_0x225300(0x18c)]:String(_0x589555)});}}return _0x571a3c[_0x225300(0x14f)]=new Date()[_0x225300(0x17e)](),await writeBffLockFile(_0x32a0f5[_0x225300(0x182)],_0xd6a8b5),{'ok':_0x3e2f91[_0x225300(0x16a)]===0x0,'data':{'pulled':_0x10fbe4,'skipped':_0x39c588,'failed':_0x3e2f91},'message':'Pull\x20complete:\x20'+_0x10fbe4['length']+'\x20pulled,\x20'+_0x39c588[_0x225300(0x16a)]+_0x225300(0x173)+_0x3e2f91['length']+_0x225300(0x15e)};}};async function hasUnsyncedLocalChanges(_0x499b0a,_0x1b9c89,_0x15ebca){const _0x31a1c8=a35_0xaba1f0;if(!await fileExists(_0x499b0a))return![];const _0x54b9d3=await computeFileHash(_0x499b0a);if(!_0x1b9c89)return _0x15ebca?_0x54b9d3!==_0x15ebca:!![];return _0x54b9d3!==_0x1b9c89[_0x31a1c8(0x17d)];}function buildDatasetCodeToAliasMap(_0x387a4e,_0x5e8759){const _0x4f7180=a35_0xaba1f0,_0x5db3a0=loadAliasMap(_0x387a4e,undefined,resolveApiFilePath(_0x387a4e,_0x5e8759));return new Map(_0x5db3a0[_0x4f7180(0x176)](_0x368e07=>[_0x368e07[_0x4f7180(0x14c)],_0x368e07[_0x4f7180(0x16d)]]));}async function confirmForce(){const _0x31ed2c=a35_0xaba1f0,_0x2d729e=createInterface({'input':process[_0x31ed2c(0x17b)],'output':process[_0x31ed2c(0x163)]}),_0x20a147=await new Promise(_0x33f48c=>{const _0x241f28=_0x31ed2c;_0x2d729e[_0x241f28(0x147)](_0x241f28(0x15b),_0x33f48c);});return _0x2d729e[_0x31ed2c(0x16b)](),['y','yes'][_0x31ed2c(0x154)](_0x20a147[_0x31ed2c(0x143)]()['toLowerCase']());}
1
+ const a35_0x2b3897=a35_0x2837;(function(_0x20ac89,_0x1f838e){const _0x25a4be=a35_0x2837,_0xa7c417=_0x20ac89();while(!![]){try{const _0x4992c5=-parseInt(_0x25a4be(0x10c))/0x1+-parseInt(_0x25a4be(0x106))/0x2*(parseInt(_0x25a4be(0x105))/0x3)+-parseInt(_0x25a4be(0xdf))/0x4+parseInt(_0x25a4be(0x118))/0x5*(-parseInt(_0x25a4be(0xe2))/0x6)+parseInt(_0x25a4be(0xe3))/0x7*(-parseInt(_0x25a4be(0xe6))/0x8)+-parseInt(_0x25a4be(0xf0))/0x9+parseInt(_0x25a4be(0xf9))/0xa;if(_0x4992c5===_0x1f838e)break;else _0xa7c417['push'](_0xa7c417['shift']());}catch(_0x3c86e7){_0xa7c417['push'](_0xa7c417['shift']());}}}(a35_0x116b,0x96122));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x2b3897(0xdd),'command':a35_0x2b3897(0xd4),'description':a35_0x2b3897(0xfd),'risk':a35_0x2b3897(0xed),'flags':[{'name':a35_0x2b3897(0x102),'type':a35_0x2b3897(0xd7),'description':a35_0x2b3897(0xfc),'enum':['COMMON',a35_0x2b3897(0xeb),a35_0x2b3897(0xe8)]},{'name':a35_0x2b3897(0xe1),'type':a35_0x2b3897(0x10a),'description':a35_0x2b3897(0x107)}],async 'dryRun'(_0x325045){const _0x44278f=a35_0x2b3897,_0x5dd0fc=loadBffProjectConfig(_0x325045[_0x44278f(0xec)]),_0x5a4065=await readBffLockFile(_0x5dd0fc[_0x44278f(0xf8)]),{appLock:_0x3bd376}=ensureLockScope(_0x5a4065??createEmptyBffLock(),_0x325045[_0x44278f(0xec)],_0x5dd0fc[_0x44278f(0xee)],_0x44278f(0xd4)),_0x3cf9eb=normalizeBffType(_0x325045[_0x44278f(0xda)](_0x44278f(0x102)))??undefined,_0x12e25a=buildDatasetCodeToAliasMap(_0x325045['apiDir'],_0x325045[_0x44278f(0xec)]),[_0x15aacc,_0x473e15]=await Promise[_0x44278f(0x110)]([listBffScripts(_0x325045[_0x44278f(0xec)],_0x3cf9eb),getBffScriptStatistics(_0x325045[_0x44278f(0xec)])]),_0xe3a001=createHookLocationMap(_0x473e15),_0x349b2c=[];for(const _0x411c30 of _0x15aacc){const _0x3a0da6=resolveRemoteScriptTarget(_0x5dd0fc,_0x411c30,_0xe3a001,_0x3bd376[_0x44278f(0xf2)],_0x12e25a);if(!_0x3a0da6){_0x349b2c[_0x44278f(0x114)]({'scriptType':_0x411c30[_0x44278f(0xe4)],'functionName':_0x411c30[_0x44278f(0x101)]??'','status':_0x44278f(0xef),'reason':_0x44278f(0xd6)});continue;}const _0x5efec8=_0x3bd376['functions'][_0x3a0da6[_0x44278f(0x113)]],_0x19b1e=_0x411c30['scriptContent']!=null?computeContentHash(_0x411c30[_0x44278f(0x10b)]):undefined,_0x3f9128=await hasUnsyncedLocalChanges(_0x3a0da6[_0x44278f(0xf3)],_0x5efec8,_0x19b1e);_0x349b2c['push']({'lockKey':_0x3a0da6['lockKey'],'filePath':_0x3a0da6['filePath'],'remoteId':_0x411c30['id']??null,'status':_0x3f9128?_0x44278f(0x103):'would_pull'});}return{'method':_0x44278f(0x111),'url':'/api/management/library/scripts/list?appCode='+_0x325045[_0x44278f(0xec)]+(_0x3cf9eb?_0x44278f(0xd3)+_0x3cf9eb:''),'body':{'appCode':_0x325045[_0x44278f(0xec)],'filterType':_0x3cf9eb??null,'files':_0x349b2c},'description':_0x44278f(0x100)+_0x349b2c[_0x44278f(0xf6)]+_0x44278f(0x115)};},async 'execute'(_0x1e6b19){const _0x429ead=a35_0x2b3897,_0x4abec4=loadBffProjectConfig(_0x1e6b19[_0x429ead(0xec)]),_0x624ec5=await readBffLockFile(_0x4abec4[_0x429ead(0xf8)]),{lockData:_0x192b7d,appLock:_0x461a22}=ensureLockScope(_0x624ec5??createEmptyBffLock(),_0x1e6b19[_0x429ead(0xec)],_0x4abec4[_0x429ead(0xee)],_0x429ead(0xd4)),_0x3fc586=normalizeBffType(_0x1e6b19[_0x429ead(0xda)]('type'))??undefined;if(_0x1e6b19['str'](_0x429ead(0x102))&&!_0x3fc586)throw CliErrors[_0x429ead(0x109)](_0x429ead(0x108));const [_0x2d9f38,_0x51038c]=await Promise[_0x429ead(0x110)]([listBffScripts(_0x1e6b19[_0x429ead(0xec)],_0x3fc586),getBffScriptStatistics(_0x1e6b19['appCode'])]);if(_0x2d9f38[_0x429ead(0xf6)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x8cdf06=_0x1e6b19['bool'](_0x429ead(0xe1));if(_0x8cdf06&&!_0x1e6b19['nonInteractive']){const _0x4d1f5c=await confirmForce();if(!_0x4d1f5c)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0x8cdf06&&_0x1e6b19[_0x429ead(0xdc)]){}const _0x385e8a=buildDatasetCodeToAliasMap(_0x1e6b19[_0x429ead(0xf5)],_0x1e6b19[_0x429ead(0xec)]),_0x453896=createHookLocationMap(_0x51038c),_0x41ce86=JSON['parse'](JSON[_0x429ead(0x117)](_0x192b7d)),_0x45287e=_0x1e6b19[_0x429ead(0xec)],_0x3a3be8=_0x41ce86['apps'][_0x45287e];if(!_0x3a3be8)throw new Error(_0x429ead(0x112)+_0x45287e+_0x429ead(0x116));const _0x147de4=[],_0xf77ef2=[],_0x47c737=[];for(const _0x2215ae of _0x2d9f38){const _0x5dff90=resolveRemoteScriptTarget(_0x4abec4,_0x2215ae,_0x453896,_0x461a22['functions'],_0x385e8a);if(!_0x5dff90){_0xf77ef2['push']({'lockKey':_0x2215ae[_0x429ead(0xe4)]+'/'+_0x2215ae['functionName'],'reason':_0x429ead(0xd6)});continue;}const _0x1d9c8e=_0x461a22[_0x429ead(0xf2)][_0x5dff90[_0x429ead(0x113)]];try{if(!_0x2215ae['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x2215ae[_0x429ead(0x10b)]==null)throw new Error(_0x429ead(0x10f));const _0x5720f5=_0x2215ae[_0x429ead(0x10b)],_0x148453=computeContentHash(_0x5720f5);if(!_0x8cdf06){const _0x3c4b2a=await hasUnsyncedLocalChanges(_0x5dff90['filePath'],_0x1d9c8e,_0x148453);if(_0x3c4b2a){_0xf77ef2[_0x429ead(0x114)]({'lockKey':_0x5dff90['lockKey'],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x5dff90['filePath']),await writeFile(_0x5dff90['filePath'],_0x5720f5,_0x429ead(0xe7));const _0x408bde={'hash':_0x148453,'remoteId':_0x2215ae['id'],'version':_0x2215ae[_0x429ead(0xd5)]};_0x5dff90[_0x429ead(0x102)]==='HOOK'&&_0x5dff90[_0x429ead(0xe0)]&&(_0x408bde[_0x429ead(0x10e)]=_0x5dff90[_0x429ead(0xe0)][_0x429ead(0x10e)],_0x408bde['datasetCode']=_0x5dff90[_0x429ead(0xe0)][_0x429ead(0xfb)],_0x408bde[_0x429ead(0xdb)]=_0x5dff90[_0x429ead(0xe0)][_0x429ead(0xdb)],_0x408bde['functionNode']=_0x5dff90[_0x429ead(0xe0)]['functionNode']),_0x3a3be8[_0x429ead(0xf2)][_0x5dff90[_0x429ead(0x113)]]=_0x408bde,_0x147de4['push']({'lockKey':_0x5dff90[_0x429ead(0x113)],'remoteId':_0x2215ae['id']});}catch(_0x2d462a){_0x47c737[_0x429ead(0x114)]({'lockKey':_0x5dff90[_0x429ead(0x113)],'error':_0x2d462a instanceof Error?_0x2d462a[_0x429ead(0xe9)]:String(_0x2d462a)});}}return _0x3a3be8[_0x429ead(0xde)]=new Date()['toISOString'](),await writeBffLockFile(_0x4abec4['lockFilePath'],_0x41ce86),{'ok':_0x47c737['length']===0x0,'data':{'pulled':_0x147de4,'skipped':_0xf77ef2,'failed':_0x47c737},'message':_0x429ead(0xfe)+_0x147de4[_0x429ead(0xf6)]+_0x429ead(0xfa)+_0xf77ef2['length']+_0x429ead(0xf7)+_0x47c737[_0x429ead(0xf6)]+_0x429ead(0x104)};}};function a35_0x2837(_0xafa515,_0x441ccc){_0xafa515=_0xafa515-0xd3;const _0x116bf8=a35_0x116b();let _0x283789=_0x116bf8[_0xafa515];return _0x283789;}async function hasUnsyncedLocalChanges(_0x3e6c76,_0x2e9b2e,_0xd139f4){const _0x404096=a35_0x2b3897;if(!await fileExists(_0x3e6c76))return![];const _0xa774e2=await computeFileHash(_0x3e6c76);if(!_0x2e9b2e)return _0xd139f4?_0xa774e2!==_0xd139f4:!![];return _0xa774e2!==_0x2e9b2e[_0x404096(0xf4)];}function a35_0x116b(){const _0x24bff9=['286Kmrcdg','Force\x20overwrite\x20local\x20unsynced\x20changes','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','validation','boolean','scriptContent','567658opLbPs','question','alias','Remote\x20script\x20missing\x20content.','all','GET','Lock\x20scope\x20for\x20app\x20\x22','lockKey','push','\x20remote\x20BFF\x20script(s)\x20for\x20pull','\x22\x20not\x20found\x20after\x20ensureLockScope.','stringify','155kEFarb','&type=','pull','version','unresolvable\x20target\x20path','string','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','includes','str','operationType','nonInteractive','bff','lastSync','644784aKSDlf','hookLocation','force','111966rnuFQE','28NUogiH','scriptType','close','755096pyivzE','utf8','HOOK','message','toLowerCase','ENDPOINT','appCode','read','scriptsRoot','skipped','8786052KHvDMi','map','functions','filePath','hash','apiDir','length','\x20skipped,\x20','lockFilePath','44968880znSRIh','\x20pulled,\x20','datasetCode','Pull\x20only\x20this\x20script\x20type','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Pull\x20complete:\x20','stderr','Would\x20inspect\x20','functionName','type','conflict','\x20failed','25617msXnFm'];a35_0x116b=function(){return _0x24bff9;};return a35_0x116b();}function buildDatasetCodeToAliasMap(_0x4d2690,_0x1224b8){const _0x2af27e=a35_0x2b3897,_0x5c1f05=loadAliasMap(_0x4d2690,undefined,resolveApiFilePath(_0x4d2690,_0x1224b8));return new Map(_0x5c1f05[_0x2af27e(0xf1)](_0x5e42e4=>[_0x5e42e4[_0x2af27e(0xfb)],_0x5e42e4[_0x2af27e(0x10e)]]));}async function confirmForce(){const _0x2e21e3=a35_0x2b3897,_0x349191=createInterface({'input':process['stdin'],'output':process[_0x2e21e3(0xff)]}),_0xb75a80=await new Promise(_0x302c6e=>{const _0x14b1ab=_0x2e21e3;_0x349191[_0x14b1ab(0x10d)](_0x14b1ab(0xd8),_0x302c6e);});return _0x349191[_0x2e21e3(0xe5)](),['y','yes'][_0x2e21e3(0xd9)](_0xb75a80['trim']()[_0x2e21e3(0xea)]());}
@@ -1 +1 @@
1
- const a36_0x208ae3=a36_0x1735;(function(_0x192e60,_0x17e882){const _0x25f6b7=a36_0x1735,_0x28843a=_0x192e60();while(!![]){try{const _0x4c896c=-parseInt(_0x25f6b7(0x141))/0x1+parseInt(_0x25f6b7(0x162))/0x2*(parseInt(_0x25f6b7(0x14f))/0x3)+parseInt(_0x25f6b7(0x122))/0x4+parseInt(_0x25f6b7(0x127))/0x5+parseInt(_0x25f6b7(0x13f))/0x6*(-parseInt(_0x25f6b7(0x153))/0x7)+-parseInt(_0x25f6b7(0x152))/0x8*(parseInt(_0x25f6b7(0x140))/0x9)+parseInt(_0x25f6b7(0x137))/0xa;if(_0x4c896c===_0x17e882)break;else _0x28843a['push'](_0x28843a['shift']());}catch(_0x478e30){_0x28843a['push'](_0x28843a['shift']());}}}(a36_0xcb76,0x42aea));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a36_0x1735(_0x38ab34,_0x47df9f){_0x38ab34=_0x38ab34-0x11e;const _0xcb7693=a36_0xcb76();let _0x173513=_0xcb7693[_0x38ab34];return _0x173513;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a36_0xcb76(){const _0x44343f=['Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','ENDPOINT','map','Incomplete\x20HOOK\x20path:\x20','operationType','lastSync','remoteId','create','1109692qRYXNE','type','Run\x20`','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','hash','246985lUCfGw','scriptsRoot','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x22.\x20','bool','attempted','force','string','aliasToDatasetCode','utf8','Runtime\x20script\x20cache\x20cleared.','stringify','description','functionNode','push','length','8837590omfPny','lockFilePath','bff','unchanged','status','would_push','every','runtime\x20cache\x20cleared','30gdUfQM','3748617apiseY','375397tOkMkr','some','\x20skipped,\x20','write','boolean','Lock\x20scope\x20for\x20app\x20\x22','appCode','apiDir','functions','script','str','HOOK','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','341538FzYMYC','join','message','8ynrCDA','363139WvmjIZ','filePath','update','Local\x20function\x20not\x20found:\x20','validation','has','POST','Would\x20inspect\x20','lockKey','name','version','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','apps','datasetCode','toISOString','2GqhCAJ','No\x20local\x20BFF\x20functions\x20found.','alias','parse','get','\x20uploaded,\x20','set','datasetId','code'];a36_0xcb76=function(){return _0x44343f;};return a36_0xcb76();}export const bffPush={'service':a36_0x208ae3(0x139),'command':a36_0x208ae3(0x135),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a36_0x208ae3(0x144),'flags':[{'name':a36_0x208ae3(0x123),'type':a36_0x208ae3(0x12e),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x208ae3(0x16c),a36_0x208ae3(0x14c)]},{'name':'name','type':a36_0x208ae3(0x12e),'description':a36_0x208ae3(0x14d)},{'name':a36_0x208ae3(0x12d),'type':a36_0x208ae3(0x145),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x55b4f9){const _0x118326=a36_0x208ae3,_0x1fb96f=loadBffProjectConfig(_0x55b4f9[_0x118326(0x147)]),_0x2e7249=await readBffLockFile(_0x1fb96f[_0x118326(0x138)]),{appLock:_0x1af2ec}=ensureLockScope(_0x2e7249??createEmptyBffLock(),_0x55b4f9[_0x118326(0x147)],_0x1fb96f[_0x118326(0x128)],'push'),_0x5d4c18=await getTargetFunctions(_0x1fb96f,_0x55b4f9),_0x573cdd=_0x55b4f9[_0x118326(0x12b)](_0x118326(0x12d)),_0x3571f7=[];for(const _0x40ff5c of _0x5d4c18){const _0x276876=await computeFileHash(_0x40ff5c[_0x118326(0x154)]),_0x38f995=_0x1af2ec[_0x118326(0x149)][_0x40ff5c[_0x118326(0x15b)]],_0x1b39fe=!!_0x38f995&&_0x38f995[_0x118326(0x126)]===_0x276876;_0x3571f7[_0x118326(0x135)]({'lockKey':_0x40ff5c[_0x118326(0x15b)],'filePath':_0x40ff5c['filePath'],'remoteId':_0x38f995?.['remoteId']??null,'mode':_0x38f995?.[_0x118326(0x120)]?_0x118326(0x155):_0x118326(0x121),'status':!_0x573cdd&&_0x1b39fe?_0x118326(0x13a):'would_push'});}return{'method':_0x118326(0x159),'url':'/api/management/library/scripts/save','body':{'appCode':_0x55b4f9['appCode'],'force':_0x573cdd,'files':_0x3571f7,'cacheClearAtRuntime':_0x3571f7[_0x118326(0x142)](_0x325f9c=>_0x325f9c[_0x118326(0x13b)]===_0x118326(0x13c)),'cacheClearAtRuntimeTimes':_0x3571f7[_0x118326(0x142)](_0xa989d7=>_0xa989d7[_0x118326(0x13b)]===_0x118326(0x13c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x118326(0x15a)+_0x3571f7[_0x118326(0x136)]+_0x118326(0x129)};},async 'execute'(_0x3f6099){const _0x4d3a7f=a36_0x208ae3,_0x5678d9=loadBffProjectConfig(_0x3f6099[_0x4d3a7f(0x147)]),_0xf746ed=await readBffLockFile(_0x5678d9[_0x4d3a7f(0x138)]),{lockData:_0x5be1b1,appLock:_0x40a943}=ensureLockScope(_0xf746ed??createEmptyBffLock(),_0x3f6099[_0x4d3a7f(0x147)],_0x5678d9[_0x4d3a7f(0x128)],_0x4d3a7f(0x135)),_0x5db2ce=await getTargetFunctions(_0x5678d9,_0x3f6099);if(_0x5db2ce[_0x4d3a7f(0x136)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4d3a7f(0x163)};const _0x2a627a=_0x3f6099[_0x4d3a7f(0x12b)]('force'),_0xcc009a=JSON[_0x4d3a7f(0x165)](JSON[_0x4d3a7f(0x132)](_0x5be1b1)),_0x477787=_0xcc009a[_0x4d3a7f(0x15f)][_0x3f6099[_0x4d3a7f(0x147)]];if(!_0x477787)throw new Error(_0x4d3a7f(0x146)+_0x3f6099[_0x4d3a7f(0x147)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x37d55c=await buildHookMaps(_0x3f6099[_0x4d3a7f(0x147)],_0x3f6099[_0x4d3a7f(0x148)],_0x5db2ce,_0x477787),_0x3c0bf2=[],_0x5f7cc6=[],_0x548465=[];for(const _0x212d9d of _0x5db2ce){const _0x14fb46=await computeFileHash(_0x212d9d[_0x4d3a7f(0x154)]),_0x175e70=_0x477787[_0x4d3a7f(0x149)][_0x212d9d[_0x4d3a7f(0x15b)]];if(!_0x2a627a&&_0x175e70&&_0x175e70[_0x4d3a7f(0x126)]===_0x14fb46){_0x5f7cc6[_0x4d3a7f(0x135)]({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'reason':_0x4d3a7f(0x13a)});continue;}try{await uploadSingleFunction(_0x3f6099[_0x4d3a7f(0x147)],_0x212d9d,_0x477787,_0x37d55c);const _0x190855=_0x477787['functions'][_0x212d9d[_0x4d3a7f(0x15b)]];_0x3c0bf2[_0x4d3a7f(0x135)]({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'remoteId':_0x190855?.[_0x4d3a7f(0x120)]??0x0});}catch(_0x40a104){_0x548465['push']({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'error':_0x40a104 instanceof Error?_0x40a104[_0x4d3a7f(0x151)]:String(_0x40a104)});}}_0x477787[_0x4d3a7f(0x11f)]=new Date()[_0x4d3a7f(0x161)](),await writeBffLockFile(_0x5678d9['lockFilePath'],_0xcc009a),await waitForUploadedLockEntries(_0x5678d9[_0x4d3a7f(0x138)],_0x3f6099['appCode'],_0x3c0bf2[_0x4d3a7f(0x16d)](_0x56f1c6=>_0x56f1c6['lockKey']));let _0x4f9fe4={'attempted':![],'cleared':![]};if(_0x3c0bf2[_0x4d3a7f(0x136)]>0x0)try{let _0x2f2c6b='';for(let _0x3856b6=0x0;_0x3856b6<CACHE_CLEAR_ATTEMPTS;_0x3856b6+=0x1){_0x2f2c6b=await clearBffScriptCache(),_0x3856b6<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f9fe4={'attempted':!![],'cleared':!![],'message':_0x2f2c6b||_0x4d3a7f(0x131)};}catch(_0x47154f){_0x4f9fe4={'attempted':!![],'cleared':![],'error':_0x47154f instanceof Error?_0x47154f[_0x4d3a7f(0x151)]:String(_0x47154f)};}const _0x426da6=_0x548465[_0x4d3a7f(0x136)]===0x0&&(_0x4f9fe4[_0x4d3a7f(0x12c)]?_0x4f9fe4['cleared']:!![]),_0x2c16d9=_0x4f9fe4['attempted']?_0x4f9fe4['cleared']?_0x4d3a7f(0x13e):'runtime\x20cache\x20clear\x20failed':'runtime\x20cache\x20not\x20needed';return{'ok':_0x426da6,'data':{'uploaded':_0x3c0bf2,'skipped':_0x5f7cc6,'failed':_0x548465,'cacheClear':_0x4f9fe4},'message':'Push\x20complete:\x20'+_0x3c0bf2[_0x4d3a7f(0x136)]+_0x4d3a7f(0x167)+_0x5f7cc6['length']+_0x4d3a7f(0x143)+_0x548465['length']+'\x20failed,\x20'+_0x2c16d9};}};async function getTargetFunctions(_0x533daa,_0x2bdc7f){const _0x50eca0=a36_0x208ae3,_0x21ac1a=_0x2bdc7f[_0x50eca0(0x14b)](_0x50eca0(0x123)),_0x4ec5c7=_0x2bdc7f['str'](_0x50eca0(0x15c)),_0xfc0a63=normalizeBffType(_0x21ac1a)??undefined;if(_0x4ec5c7&&!_0xfc0a63)throw CliErrors[_0x50eca0(0x157)](_0x50eca0(0x15e));const _0x35d995=await scanLocalBffFunctions(_0x533daa,_0xfc0a63);if(_0x4ec5c7){const _0x3aae34=_0x35d995['filter'](_0x51738f=>_0x51738f[_0x50eca0(0x15c)]===_0x4ec5c7);if(_0x3aae34[_0x50eca0(0x136)]===0x0)throw CliErrors[_0x50eca0(0x157)](_0x50eca0(0x156)+_0xfc0a63+'/'+_0x4ec5c7);return _0x3aae34;}return _0x35d995;}async function buildHookMaps(_0x418a3d,_0x411667,_0x37eea5,_0xc2d8b6){const _0x4486fa=a36_0x208ae3,_0x265261=_0x37eea5[_0x4486fa(0x142)](_0x3efcb1=>_0x3efcb1[_0x4486fa(0x123)]===_0x4486fa(0x14c));if(!_0x265261)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2ab410=loadAliasMap(_0x411667,undefined,resolveApiFilePath(_0x411667,_0x418a3d)),_0x4512b1=new Map(_0x2ab410[_0x4486fa(0x16d)](_0x268f14=>[_0x268f14[_0x4486fa(0x164)],_0x268f14['datasetCode']]));for(const _0x267098 of Object['values'](_0xc2d8b6[_0x4486fa(0x149)])){_0x267098[_0x4486fa(0x164)]&&_0x267098[_0x4486fa(0x160)]&&!_0x4512b1['has'](_0x267098[_0x4486fa(0x164)])&&_0x4512b1[_0x4486fa(0x168)](_0x267098[_0x4486fa(0x164)],_0x267098[_0x4486fa(0x160)]);}const _0x50ffb1=await listDatasets(_0x418a3d),_0x3a10a1=new Map(_0x50ffb1[_0x4486fa(0x16d)](_0x3766fc=>[_0x3766fc[_0x4486fa(0x16a)],_0x3766fc]));return{'aliasToDatasetCode':_0x4512b1,'datasetCodeToDataset':_0x3a10a1};}async function uploadSingleFunction(_0x40765b,_0x2f2908,_0x53d391,_0x5dd8a7){const _0x3d8ab8=a36_0x208ae3,_0x2807d1=await readFile(_0x2f2908[_0x3d8ab8(0x154)],_0x3d8ab8(0x130)),_0x3ede29=await computeFileHash(_0x2f2908[_0x3d8ab8(0x154)]),_0x302b4e=_0x53d391['functions'][_0x2f2908['lockKey']];if(_0x302b4e?.[_0x3d8ab8(0x120)]&&_0x302b4e['version']==null)throw CliErrors[_0x3d8ab8(0x157)](_0x2f2908[_0x3d8ab8(0x15b)]+_0x3d8ab8(0x14e));let _0x4a7dcf=extractScriptDescription(_0x2807d1);if(!_0x4a7dcf&&_0x302b4e?.[_0x3d8ab8(0x120)]){const _0x15ff7a=await getBffScriptInfo(_0x302b4e[_0x3d8ab8(0x120)]);_0x4a7dcf=_0x15ff7a['description']||undefined;}const _0x43a250={'appCode':_0x40765b,'functionName':_0x2f2908['name'],'scriptType':_0x2f2908[_0x3d8ab8(0x123)],'scriptContent':_0x2807d1};if(_0x302b4e?.[_0x3d8ab8(0x120)])_0x43a250['id']=_0x302b4e[_0x3d8ab8(0x120)];if(_0x302b4e?.['version']!=null)_0x43a250['version']=_0x302b4e[_0x3d8ab8(0x15d)];if(_0x4a7dcf)_0x43a250[_0x3d8ab8(0x133)]=_0x4a7dcf;if(_0x2f2908[_0x3d8ab8(0x123)]===_0x3d8ab8(0x14c)){const _0x5cf2ed=_0x2f2908[_0x3d8ab8(0x164)];if(!_0x5cf2ed||!_0x2f2908[_0x3d8ab8(0x11e)]||!_0x2f2908[_0x3d8ab8(0x134)])throw CliErrors[_0x3d8ab8(0x157)](_0x3d8ab8(0x16e)+_0x2f2908[_0x3d8ab8(0x15b)]);const _0x529892=_0x5dd8a7[_0x3d8ab8(0x12f)][_0x3d8ab8(0x166)](_0x5cf2ed)??_0x302b4e?.['datasetCode']??_0x5cf2ed,_0x147426=_0x5dd8a7['datasetCodeToDataset']['get'](_0x529892);if(!_0x147426)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x5cf2ed+_0x3d8ab8(0x12a)+(_0x3d8ab8(0x124)+CLI_BIN_NAME+_0x3d8ab8(0x125)));_0x43a250[_0x3d8ab8(0x169)]=_0x147426['id'],_0x43a250[_0x3d8ab8(0x11e)]=_0x2f2908[_0x3d8ab8(0x11e)],_0x43a250['functionNode']=_0x2f2908[_0x3d8ab8(0x134)];}const _0x5b7485=await saveBffScript(_0x43a250),_0x516c5c=_0x5b7485['id'],_0x61afa8=_0x5b7485[_0x3d8ab8(0x14a)]??await getBffScriptInfo(_0x516c5c),_0x6bf424={'hash':_0x3ede29,'remoteId':_0x516c5c,'version':_0x61afa8[_0x3d8ab8(0x15d)]};if(_0x2f2908[_0x3d8ab8(0x123)]===_0x3d8ab8(0x14c)){const _0x368fae=_0x2f2908[_0x3d8ab8(0x164)],_0x4f9fc9=_0x5dd8a7['aliasToDatasetCode']['get'](_0x368fae)??_0x302b4e?.[_0x3d8ab8(0x160)]??_0x368fae;_0x5dd8a7[_0x3d8ab8(0x12f)][_0x3d8ab8(0x158)](_0x368fae)?_0x6bf424[_0x3d8ab8(0x164)]=_0x368fae:_0x6bf424[_0x3d8ab8(0x164)]=_0x302b4e?.[_0x3d8ab8(0x164)],_0x6bf424[_0x3d8ab8(0x160)]=_0x4f9fc9,_0x6bf424[_0x3d8ab8(0x11e)]=_0x2f2908[_0x3d8ab8(0x11e)],_0x6bf424['functionNode']=_0x2f2908[_0x3d8ab8(0x134)];}_0x53d391[_0x3d8ab8(0x149)][_0x2f2908[_0x3d8ab8(0x15b)]]=_0x6bf424;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1b8d5e,_0x44a311,_0x16d0c0){const _0x1a9de6=a36_0x208ae3;if(_0x16d0c0['length']===0x0)return;for(let _0x573c13=0x0;_0x573c13<LOCK_SETTLE_RETRY_COUNT;_0x573c13+=0x1){const _0x31b022=await readBffLockFile(_0x1b8d5e),_0x95232=_0x31b022?.[_0x1a9de6(0x15f)]?.[_0x44a311]?.['functions']??{},_0x2f0fec=_0x16d0c0[_0x1a9de6(0x13d)](_0x2e0fcd=>!!_0x95232[_0x2e0fcd]?.[_0x1a9de6(0x120)]);if(_0x2f0fec)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1a9de6(0x16b)+_0x16d0c0[_0x1a9de6(0x150)](',\x20')+'.');}
1
+ const a36_0x1c051d=a36_0x41b7;function a36_0x53ef(){const _0x110055=['remoteId','message','Cannot\x20resolve\x20dataset\x20for\x20\x22','utf8','toISOString','4372347QMIPTZ','COMMON','has','bff','Incomplete\x20HOOK\x20path:\x20','781818GFaLPn','push','name','hash','8464181KqTGxf','filePath','Push\x20only\x20this\x20script\x20type','functions','force','runtime\x20cache\x20not\x20needed','datasetCodeToDataset','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','get','/api/management/library/scripts/save','7380261FDFmAc','311564uJKedk','Runtime\x20script\x20cache\x20cleared.','validation','\x22\x20not\x20found\x20after\x20ensureLockScope.','cleared','runtime\x20cache\x20cleared','version','aliasToDatasetCode','set','str','scriptsRoot','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','boolean','Run\x20`','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','runtime\x20cache\x20clear\x20failed','stringify','Push\x20complete:\x20','status','description','POST','operationType','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','lockFilePath','appCode','Would\x20inspect\x20','HOOK','lockKey','code','every','20TulQhA','Push\x20local\x20BFF\x20scripts\x20to\x20remote','No\x20local\x20BFF\x20functions\x20found.','8rzvIbM','18MvUoyr','map','30VYzDhM','join','unchanged','write','\x20uploaded,\x20','string','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','length','apiDir','1099240npoNYp','parse','ENDPOINT','datasetCode','attempted','would_push','datasetId','apps','alias','288235eiqFlH','some','type','Local\x20function\x20not\x20found:\x20','functionNode'];a36_0x53ef=function(){return _0x110055;};return a36_0x53ef();}(function(_0x321556,_0x28a3bb){const _0x80549f=a36_0x41b7,_0x32264d=_0x321556();while(!![]){try{const _0x1049c5=parseInt(_0x80549f(0x126))/0x1+parseInt(_0x80549f(0xe1))/0x2*(parseInt(_0x80549f(0x103))/0x3)+parseInt(_0x80549f(0x10e))/0x4+-parseInt(_0x80549f(0x117))/0x5*(-parseInt(_0x80549f(0x105))/0x6)+-parseInt(_0x80549f(0x121))/0x7*(-parseInt(_0x80549f(0x102))/0x8)+-parseInt(_0x80549f(0xe0))/0x9+-parseInt(_0x80549f(0xff))/0xa*(parseInt(_0x80549f(0x12a))/0xb);if(_0x1049c5===_0x28a3bb)break;else _0x32264d['push'](_0x32264d['shift']());}catch(_0x2718dc){_0x32264d['push'](_0x32264d['shift']());}}}(a36_0x53ef,0x851b5));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a36_0x41b7(_0x3e6a64,_0x371e9a){_0x3e6a64=_0x3e6a64-0xd8;const _0x53efa9=a36_0x53ef();let _0x41b743=_0x53efa9[_0x3e6a64];return _0x41b743;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x1c051d(0x124),'command':a36_0x1c051d(0x127),'description':a36_0x1c051d(0x100),'risk':a36_0x1c051d(0x108),'flags':[{'name':a36_0x1c051d(0x119),'type':a36_0x1c051d(0x10a),'description':a36_0x1c051d(0x12c),'enum':[a36_0x1c051d(0x122),a36_0x1c051d(0x110),a36_0x1c051d(0xfb)]},{'name':a36_0x1c051d(0x128),'type':a36_0x1c051d(0x10a),'description':a36_0x1c051d(0xf7)},{'name':'force','type':a36_0x1c051d(0xed),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2d4de9){const _0x2334c2=a36_0x1c051d,_0x14a9f0=loadBffProjectConfig(_0x2d4de9['appCode']),_0x65eb1=await readBffLockFile(_0x14a9f0['lockFilePath']),{appLock:_0x54736f}=ensureLockScope(_0x65eb1??createEmptyBffLock(),_0x2d4de9[_0x2334c2(0xf9)],_0x14a9f0[_0x2334c2(0xeb)],_0x2334c2(0x127)),_0x2aaf01=await getTargetFunctions(_0x14a9f0,_0x2d4de9),_0x3db9bc=_0x2d4de9['bool'](_0x2334c2(0xd9)),_0x870699=[];for(const _0x3e2f29 of _0x2aaf01){const _0x431f94=await computeFileHash(_0x3e2f29['filePath']),_0x5c1e65=_0x54736f[_0x2334c2(0xd8)][_0x3e2f29[_0x2334c2(0xfc)]],_0x15758c=!!_0x5c1e65&&_0x5c1e65[_0x2334c2(0x129)]===_0x431f94;_0x870699[_0x2334c2(0x127)]({'lockKey':_0x3e2f29[_0x2334c2(0xfc)],'filePath':_0x3e2f29[_0x2334c2(0x12b)],'remoteId':_0x5c1e65?.['remoteId']??null,'mode':_0x5c1e65?.[_0x2334c2(0x11c)]?'update':'create','status':!_0x3db9bc&&_0x15758c?_0x2334c2(0x107):_0x2334c2(0x113)});}return{'method':_0x2334c2(0xf5),'url':_0x2334c2(0xdf),'body':{'appCode':_0x2d4de9[_0x2334c2(0xf9)],'force':_0x3db9bc,'files':_0x870699,'cacheClearAtRuntime':_0x870699[_0x2334c2(0x118)](_0x4cf9b6=>_0x4cf9b6[_0x2334c2(0xf3)]===_0x2334c2(0x113)),'cacheClearAtRuntimeTimes':_0x870699[_0x2334c2(0x118)](_0xe1a458=>_0xe1a458[_0x2334c2(0xf3)]===_0x2334c2(0x113))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2334c2(0xfa)+_0x870699[_0x2334c2(0x10c)]+_0x2334c2(0xef)};},async 'execute'(_0x4a9f74){const _0x445331=a36_0x1c051d,_0x424d38=loadBffProjectConfig(_0x4a9f74['appCode']),_0x18433e=await readBffLockFile(_0x424d38[_0x445331(0xf8)]),{lockData:_0x563256,appLock:_0x5f3add}=ensureLockScope(_0x18433e??createEmptyBffLock(),_0x4a9f74['appCode'],_0x424d38['scriptsRoot'],_0x445331(0x127)),_0x406255=await getTargetFunctions(_0x424d38,_0x4a9f74);if(_0x406255['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x445331(0x101)};const _0x32dbbf=_0x4a9f74['bool'](_0x445331(0xd9)),_0x504178=JSON[_0x445331(0x10f)](JSON[_0x445331(0xf1)](_0x563256)),_0xa262ba=_0x504178[_0x445331(0x115)][_0x4a9f74['appCode']];if(!_0xa262ba)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x4a9f74[_0x445331(0xf9)]+_0x445331(0xe4));const _0x47965d=await buildHookMaps(_0x4a9f74[_0x445331(0xf9)],_0x4a9f74[_0x445331(0x10d)],_0x406255,_0xa262ba),_0x89b6d4=[],_0x21c3bc=[],_0x130b39=[];for(const _0x3a11f7 of _0x406255){const _0xbaa769=await computeFileHash(_0x3a11f7[_0x445331(0x12b)]),_0x49f46f=_0xa262ba['functions'][_0x3a11f7[_0x445331(0xfc)]];if(!_0x32dbbf&&_0x49f46f&&_0x49f46f[_0x445331(0x129)]===_0xbaa769){_0x21c3bc[_0x445331(0x127)]({'lockKey':_0x3a11f7[_0x445331(0xfc)],'reason':_0x445331(0x107)});continue;}try{await uploadSingleFunction(_0x4a9f74[_0x445331(0xf9)],_0x3a11f7,_0xa262ba,_0x47965d);const _0x2b9350=_0xa262ba[_0x445331(0xd8)][_0x3a11f7[_0x445331(0xfc)]];_0x89b6d4[_0x445331(0x127)]({'lockKey':_0x3a11f7[_0x445331(0xfc)],'remoteId':_0x2b9350?.[_0x445331(0x11c)]??0x0});}catch(_0x4e6f64){_0x130b39[_0x445331(0x127)]({'lockKey':_0x3a11f7['lockKey'],'error':_0x4e6f64 instanceof Error?_0x4e6f64[_0x445331(0x11d)]:String(_0x4e6f64)});}}_0xa262ba['lastSync']=new Date()[_0x445331(0x120)](),await writeBffLockFile(_0x424d38[_0x445331(0xf8)],_0x504178),await waitForUploadedLockEntries(_0x424d38[_0x445331(0xf8)],_0x4a9f74[_0x445331(0xf9)],_0x89b6d4[_0x445331(0x104)](_0x2e065e=>_0x2e065e[_0x445331(0xfc)]));let _0x265e90={'attempted':![],'cleared':![]};if(_0x89b6d4[_0x445331(0x10c)]>0x0)try{let _0x3ee5bc='';for(let _0x4bcbc5=0x0;_0x4bcbc5<CACHE_CLEAR_ATTEMPTS;_0x4bcbc5+=0x1){_0x3ee5bc=await clearBffScriptCache(),_0x4bcbc5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x265e90={'attempted':!![],'cleared':!![],'message':_0x3ee5bc||_0x445331(0xe2)};}catch(_0x34c0ec){_0x265e90={'attempted':!![],'cleared':![],'error':_0x34c0ec instanceof Error?_0x34c0ec[_0x445331(0x11d)]:String(_0x34c0ec)};}const _0x2fc43f=_0x130b39[_0x445331(0x10c)]===0x0&&(_0x265e90['attempted']?_0x265e90[_0x445331(0xe5)]:!![]),_0x56adf9=_0x265e90[_0x445331(0x112)]?_0x265e90[_0x445331(0xe5)]?_0x445331(0xe6):_0x445331(0xf0):_0x445331(0xda);return{'ok':_0x2fc43f,'data':{'uploaded':_0x89b6d4,'skipped':_0x21c3bc,'failed':_0x130b39,'cacheClear':_0x265e90},'message':_0x445331(0xf2)+_0x89b6d4[_0x445331(0x10c)]+_0x445331(0x109)+_0x21c3bc[_0x445331(0x10c)]+'\x20skipped,\x20'+_0x130b39['length']+'\x20failed,\x20'+_0x56adf9};}};async function getTargetFunctions(_0x431a57,_0x39a1d4){const _0x35fccf=a36_0x1c051d,_0x1dbb75=_0x39a1d4[_0x35fccf(0xea)](_0x35fccf(0x119)),_0x3548d1=_0x39a1d4['str'](_0x35fccf(0x128)),_0x185d62=normalizeBffType(_0x1dbb75)??undefined;if(_0x3548d1&&!_0x185d62)throw CliErrors[_0x35fccf(0xe3)](_0x35fccf(0xec));const _0x344181=await scanLocalBffFunctions(_0x431a57,_0x185d62);if(_0x3548d1){const _0x1b61f6=_0x344181['filter'](_0xe8ccfc=>_0xe8ccfc[_0x35fccf(0x128)]===_0x3548d1);if(_0x1b61f6[_0x35fccf(0x10c)]===0x0)throw CliErrors[_0x35fccf(0xe3)](_0x35fccf(0x11a)+_0x185d62+'/'+_0x3548d1);return _0x1b61f6;}return _0x344181;}async function buildHookMaps(_0x209fe8,_0x58ee25,_0x11e9f0,_0x2f3233){const _0x4ed217=a36_0x1c051d,_0x38fba3=_0x11e9f0['some'](_0x37d566=>_0x37d566[_0x4ed217(0x119)]===_0x4ed217(0xfb));if(!_0x38fba3)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xd7b96d=loadAliasMap(_0x58ee25,undefined,resolveApiFilePath(_0x58ee25,_0x209fe8)),_0x425000=new Map(_0xd7b96d[_0x4ed217(0x104)](_0x4fa3fe=>[_0x4fa3fe['alias'],_0x4fa3fe[_0x4ed217(0x111)]]));for(const _0x5b5e49 of Object['values'](_0x2f3233['functions'])){_0x5b5e49[_0x4ed217(0x116)]&&_0x5b5e49[_0x4ed217(0x111)]&&!_0x425000['has'](_0x5b5e49[_0x4ed217(0x116)])&&_0x425000[_0x4ed217(0xe9)](_0x5b5e49[_0x4ed217(0x116)],_0x5b5e49[_0x4ed217(0x111)]);}const _0x10af6f=await listDatasets(_0x209fe8),_0x1253ad=new Map(_0x10af6f['map'](_0x440354=>[_0x440354[_0x4ed217(0xfd)],_0x440354]));return{'aliasToDatasetCode':_0x425000,'datasetCodeToDataset':_0x1253ad};}async function uploadSingleFunction(_0x33983b,_0x41c8af,_0x588ad1,_0x522060){const _0x541fd3=a36_0x1c051d,_0x96d89c=await readFile(_0x41c8af[_0x541fd3(0x12b)],_0x541fd3(0x11f)),_0x29bf04=await computeFileHash(_0x41c8af[_0x541fd3(0x12b)]),_0xa6edc7=_0x588ad1[_0x541fd3(0xd8)][_0x41c8af[_0x541fd3(0xfc)]];if(_0xa6edc7?.[_0x541fd3(0x11c)]&&_0xa6edc7[_0x541fd3(0xe7)]==null)throw CliErrors['validation'](_0x41c8af[_0x541fd3(0xfc)]+_0x541fd3(0xdd));let _0x154f4d=extractScriptDescription(_0x96d89c);if(!_0x154f4d&&_0xa6edc7?.[_0x541fd3(0x11c)]){const _0x4fb990=await getBffScriptInfo(_0xa6edc7['remoteId']);_0x154f4d=_0x4fb990[_0x541fd3(0xf4)]||undefined;}const _0x2b178f={'appCode':_0x33983b,'functionName':_0x41c8af[_0x541fd3(0x128)],'scriptType':_0x41c8af[_0x541fd3(0x119)],'scriptContent':_0x96d89c};if(_0xa6edc7?.['remoteId'])_0x2b178f['id']=_0xa6edc7[_0x541fd3(0x11c)];if(_0xa6edc7?.[_0x541fd3(0xe7)]!=null)_0x2b178f[_0x541fd3(0xe7)]=_0xa6edc7['version'];if(_0x154f4d)_0x2b178f['description']=_0x154f4d;if(_0x41c8af['type']===_0x541fd3(0xfb)){const _0x346e1e=_0x41c8af[_0x541fd3(0x116)];if(!_0x346e1e||!_0x41c8af[_0x541fd3(0xf6)]||!_0x41c8af[_0x541fd3(0x11b)])throw CliErrors[_0x541fd3(0xe3)](_0x541fd3(0x125)+_0x41c8af[_0x541fd3(0xfc)]);const _0x2f6e2e=_0x522060['aliasToDatasetCode'][_0x541fd3(0xde)](_0x346e1e)??_0xa6edc7?.[_0x541fd3(0x111)]??_0x346e1e,_0x207a0b=_0x522060[_0x541fd3(0xdb)][_0x541fd3(0xde)](_0x2f6e2e);if(!_0x207a0b)throw CliErrors[_0x541fd3(0xe3)](_0x541fd3(0x11e)+_0x346e1e+'\x22.\x20'+(_0x541fd3(0xee)+CLI_BIN_NAME+_0x541fd3(0xdc)));_0x2b178f[_0x541fd3(0x114)]=_0x207a0b['id'],_0x2b178f[_0x541fd3(0xf6)]=_0x41c8af[_0x541fd3(0xf6)],_0x2b178f[_0x541fd3(0x11b)]=_0x41c8af['functionNode'];}const _0x4d334f=await saveBffScript(_0x2b178f),_0x27bb40=_0x4d334f['id'],_0x233587=_0x4d334f['script']??await getBffScriptInfo(_0x27bb40),_0x22cbf2={'hash':_0x29bf04,'remoteId':_0x27bb40,'version':_0x233587[_0x541fd3(0xe7)]};if(_0x41c8af[_0x541fd3(0x119)]===_0x541fd3(0xfb)){const _0x3cce33=_0x41c8af[_0x541fd3(0x116)],_0x175c33=_0x522060[_0x541fd3(0xe8)]['get'](_0x3cce33)??_0xa6edc7?.[_0x541fd3(0x111)]??_0x3cce33;_0x522060[_0x541fd3(0xe8)][_0x541fd3(0x123)](_0x3cce33)?_0x22cbf2['alias']=_0x3cce33:_0x22cbf2['alias']=_0xa6edc7?.[_0x541fd3(0x116)],_0x22cbf2[_0x541fd3(0x111)]=_0x175c33,_0x22cbf2[_0x541fd3(0xf6)]=_0x41c8af[_0x541fd3(0xf6)],_0x22cbf2[_0x541fd3(0x11b)]=_0x41c8af[_0x541fd3(0x11b)];}_0x588ad1[_0x541fd3(0xd8)][_0x41c8af[_0x541fd3(0xfc)]]=_0x22cbf2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x24c44e,_0x3f9745,_0x1dd15a){const _0x56f0e8=a36_0x1c051d;if(_0x1dd15a[_0x56f0e8(0x10c)]===0x0)return;for(let _0x357645=0x0;_0x357645<LOCK_SETTLE_RETRY_COUNT;_0x357645+=0x1){const _0x8cb02e=await readBffLockFile(_0x24c44e),_0x28e438=_0x8cb02e?.[_0x56f0e8(0x115)]?.[_0x3f9745]?.['functions']??{},_0x14ebfb=_0x1dd15a[_0x56f0e8(0xfe)](_0x26d9e4=>!!_0x28e438[_0x26d9e4]?.[_0x56f0e8(0x11c)]);if(_0x14ebfb)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x56f0e8(0x10b)+_0x1dd15a[_0x56f0e8(0x106)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a37_0x421664=a37_0x2693;(function(_0x396659,_0x2d8a70){const _0x33c469=a37_0x2693,_0x519101=_0x396659();while(!![]){try{const _0x2f2bcb=-parseInt(_0x33c469(0x126))/0x1*(-parseInt(_0x33c469(0x113))/0x2)+-parseInt(_0x33c469(0x12a))/0x3*(-parseInt(_0x33c469(0x127))/0x4)+-parseInt(_0x33c469(0x120))/0x5+-parseInt(_0x33c469(0x121))/0x6+parseInt(_0x33c469(0x130))/0x7*(parseInt(_0x33c469(0x125))/0x8)+parseInt(_0x33c469(0x116))/0x9+parseInt(_0x33c469(0x10f))/0xa*(parseInt(_0x33c469(0x11a))/0xb);if(_0x2f2bcb===_0x2d8a70)break;else _0x519101['push'](_0x519101['shift']());}catch(_0x19c8a5){_0x519101['push'](_0x519101['shift']());}}}(a37_0x575d,0x59ae1));function a37_0x2693(_0x527de1,_0x2b6ac0){_0x527de1=_0x527de1-0x10f;const _0x575dfc=a37_0x575d();let _0x2693d4=_0x575dfc[_0x527de1];return _0x2693d4;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x575d(){const _0x21d2ec=['push','717084izOsgL','All\x20BFF\x20scripts\x20are\x20in\x20sync.','functions','appCode','99ZuTSTT','lockFilePath','boolean','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','remote','filePath','1583510gtbmPm','4195542PGSiuM','lockKey','status','alias','3032NtFbRX','36899FtjXAK','323724SzJjET','length','bool','3smsCGT','read','has','apiDir','scriptsRoot','hash','2471GrFGBU','bff','922890mlybcw','\x20remote-only','\x20modified,\x20','map','14dylaod','\x20unchanged'];a37_0x575d=function(){return _0x21d2ec;};return a37_0x575d();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0x421664(0x131),'command':a37_0x421664(0x123),'description':a37_0x421664(0x11d),'risk':a37_0x421664(0x12b),'flags':[{'name':a37_0x421664(0x11e),'type':a37_0x421664(0x11c),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x1094ab){const _0x68b901=a37_0x421664,_0x2ad07e=loadBffProjectConfig(_0x1094ab['appCode']),_0x584f2b=await readBffLockFile(_0x2ad07e[_0x68b901(0x11b)]),{appLock:_0x3b7563}=ensureLockScope(_0x584f2b??createEmptyBffLock(),_0x1094ab[_0x68b901(0x119)],_0x2ad07e[_0x68b901(0x12e)],'status'),_0x19aa21=await scanLocalBffFunctions(_0x2ad07e),_0x24ee99=[],_0x5bf3a9=[],_0x2ec291=[];for(const _0x58b570 of _0x19aa21){const _0xe03e47=await computeFileHash(_0x58b570[_0x68b901(0x11f)]),_0x275bf5=_0x3b7563[_0x68b901(0x118)][_0x58b570['lockKey']];if(!_0x275bf5)_0x24ee99[_0x68b901(0x115)](_0x58b570[_0x68b901(0x122)]);else _0x275bf5[_0x68b901(0x12f)]!==_0xe03e47?_0x5bf3a9[_0x68b901(0x115)](_0x58b570['lockKey']):_0x2ec291[_0x68b901(0x115)](_0x58b570['lockKey']);}const _0x44cc31=[];if(_0x1094ab[_0x68b901(0x129)]('remote')){const _0x3f839d=loadAliasMap(_0x1094ab[_0x68b901(0x12d)],undefined,resolveApiFilePath(_0x1094ab['apiDir'],_0x1094ab[_0x68b901(0x119)])),_0x441831=new Map(_0x3f839d[_0x68b901(0x112)](_0x37dba8=>[_0x37dba8['datasetCode'],_0x37dba8[_0x68b901(0x124)]])),[_0x4d5ea7,_0x5d7036]=await Promise['all']([listBffScripts(_0x1094ab[_0x68b901(0x119)]),getBffScriptStatistics(_0x1094ab[_0x68b901(0x119)])]),_0x58e95a=createHookLocationMap(_0x5d7036),_0x4c41dc=new Set(_0x19aa21[_0x68b901(0x112)](_0x215722=>_0x215722[_0x68b901(0x122)]));for(const _0x59199d of _0x4d5ea7){const _0x4e99c7=resolveRemoteScriptTarget(_0x2ad07e,_0x59199d,_0x58e95a,_0x3b7563['functions'],_0x441831);_0x4e99c7&&!_0x4c41dc[_0x68b901(0x12c)](_0x4e99c7['lockKey'])&&_0x44cc31['push'](_0x4e99c7[_0x68b901(0x122)]);}}const _0x2a0f8a=_0x24ee99[_0x68b901(0x128)]===0x0&&_0x5bf3a9[_0x68b901(0x128)]===0x0&&_0x44cc31[_0x68b901(0x128)]===0x0;return{'ok':!![],'data':{'added':_0x24ee99,'modified':_0x5bf3a9,'unchanged':_0x2ec291,'remoteOnly':_0x44cc31},'message':_0x2a0f8a?_0x68b901(0x117):_0x24ee99[_0x68b901(0x128)]+'\x20added,\x20'+_0x5bf3a9['length']+_0x68b901(0x111)+_0x2ec291[_0x68b901(0x128)]+_0x68b901(0x114)+(_0x44cc31[_0x68b901(0x128)]>0x0?',\x20'+_0x44cc31[_0x68b901(0x128)]+_0x68b901(0x110):'')};}};
1
+ const a37_0x2e938e=a37_0x29e9;(function(_0x56fa71,_0xcc260c){const _0xaadebf=a37_0x29e9,_0x57b414=_0x56fa71();while(!![]){try{const _0x1f6363=parseInt(_0xaadebf(0x8d))/0x1+parseInt(_0xaadebf(0xa7))/0x2*(-parseInt(_0xaadebf(0x96))/0x3)+parseInt(_0xaadebf(0x8c))/0x4*(-parseInt(_0xaadebf(0x9f))/0x5)+-parseInt(_0xaadebf(0x8e))/0x6*(-parseInt(_0xaadebf(0x8f))/0x7)+-parseInt(_0xaadebf(0xaa))/0x8*(parseInt(_0xaadebf(0x93))/0x9)+-parseInt(_0xaadebf(0xa3))/0xa+parseInt(_0xaadebf(0xad))/0xb;if(_0x1f6363===_0xcc260c)break;else _0x57b414['push'](_0x57b414['shift']());}catch(_0x5d72a1){_0x57b414['push'](_0x57b414['shift']());}}}(a37_0x4b11,0xbb760));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x4b11(){const _0x1faa72=['push','lockKey','144INFXmk','datasetCode','bool','20472408ntRaTv','length','All\x20BFF\x20scripts\x20are\x20in\x20sync.','8fLvasi','959464LKejmf','51162nryiJV','560jHTzZb','appCode','\x20modified,\x20','all','406404tAMBnF','status','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','582uDphlx','alias','\x20remote-only','functions','\x20unchanged','has','apiDir','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','hash','2960915GvWmKH','read','remote','scriptsRoot','426360rVaXdU','filePath','boolean','map','7166TfnSlg'];a37_0x4b11=function(){return _0x1faa72;};return a37_0x4b11();}function a37_0x29e9(_0x3631d7,_0x10868d){_0x3631d7=_0x3631d7-0x8a;const _0x4b115c=a37_0x4b11();let _0x29e99e=_0x4b115c[_0x3631d7];return _0x29e99e;}export const bffStatus={'service':'bff','command':a37_0x2e938e(0x94),'description':a37_0x2e938e(0x95),'risk':a37_0x2e938e(0xa0),'flags':[{'name':a37_0x2e938e(0xa1),'type':a37_0x2e938e(0xa5),'description':a37_0x2e938e(0x9d)}],async 'execute'(_0x258abc){const _0x3bde80=a37_0x2e938e,_0x3d0832=loadBffProjectConfig(_0x258abc[_0x3bde80(0x90)]),_0x373eba=await readBffLockFile(_0x3d0832['lockFilePath']),{appLock:_0x431e4d}=ensureLockScope(_0x373eba??createEmptyBffLock(),_0x258abc[_0x3bde80(0x90)],_0x3d0832[_0x3bde80(0xa2)],_0x3bde80(0x94)),_0x4ea121=await scanLocalBffFunctions(_0x3d0832),_0x2b4996=[],_0x20093b=[],_0x9654e6=[];for(const _0xc05e28 of _0x4ea121){const _0x3b09f9=await computeFileHash(_0xc05e28[_0x3bde80(0xa4)]),_0x202537=_0x431e4d[_0x3bde80(0x99)][_0xc05e28['lockKey']];if(!_0x202537)_0x2b4996[_0x3bde80(0xa8)](_0xc05e28[_0x3bde80(0xa9)]);else _0x202537[_0x3bde80(0x9e)]!==_0x3b09f9?_0x20093b['push'](_0xc05e28[_0x3bde80(0xa9)]):_0x9654e6['push'](_0xc05e28[_0x3bde80(0xa9)]);}const _0x4c8963=[];if(_0x258abc[_0x3bde80(0xac)]('remote')){const _0xf9837b=loadAliasMap(_0x258abc[_0x3bde80(0x9c)],undefined,resolveApiFilePath(_0x258abc[_0x3bde80(0x9c)],_0x258abc[_0x3bde80(0x90)])),_0x12bfd5=new Map(_0xf9837b[_0x3bde80(0xa6)](_0x1f5167=>[_0x1f5167[_0x3bde80(0xab)],_0x1f5167[_0x3bde80(0x97)]])),[_0x265705,_0x1ae829]=await Promise[_0x3bde80(0x92)]([listBffScripts(_0x258abc[_0x3bde80(0x90)]),getBffScriptStatistics(_0x258abc[_0x3bde80(0x90)])]),_0x5bf953=createHookLocationMap(_0x1ae829),_0x5f01dd=new Set(_0x4ea121[_0x3bde80(0xa6)](_0x573a48=>_0x573a48[_0x3bde80(0xa9)]));for(const _0x370509 of _0x265705){const _0x50a100=resolveRemoteScriptTarget(_0x3d0832,_0x370509,_0x5bf953,_0x431e4d['functions'],_0x12bfd5);_0x50a100&&!_0x5f01dd[_0x3bde80(0x9b)](_0x50a100[_0x3bde80(0xa9)])&&_0x4c8963[_0x3bde80(0xa8)](_0x50a100[_0x3bde80(0xa9)]);}}const _0x1e176c=_0x2b4996[_0x3bde80(0x8a)]===0x0&&_0x20093b[_0x3bde80(0x8a)]===0x0&&_0x4c8963['length']===0x0;return{'ok':!![],'data':{'added':_0x2b4996,'modified':_0x20093b,'unchanged':_0x9654e6,'remoteOnly':_0x4c8963},'message':_0x1e176c?_0x3bde80(0x8b):_0x2b4996[_0x3bde80(0x8a)]+'\x20added,\x20'+_0x20093b[_0x3bde80(0x8a)]+_0x3bde80(0x91)+_0x9654e6[_0x3bde80(0x8a)]+_0x3bde80(0x9a)+(_0x4c8963[_0x3bde80(0x8a)]>0x0?',\x20'+_0x4c8963[_0x3bde80(0x8a)]+_0x3bde80(0x98):'')};}};
@@ -1 +1 @@
1
- const a38_0x253284=a38_0x14cb;(function(_0x29f7d6,_0x47af80){const _0x15b5c1=a38_0x14cb,_0x236f8c=_0x29f7d6();while(!![]){try{const _0x501f6f=-parseInt(_0x15b5c1(0x94))/0x1+-parseInt(_0x15b5c1(0x9c))/0x2+parseInt(_0x15b5c1(0xac))/0x3+-parseInt(_0x15b5c1(0xaa))/0x4+parseInt(_0x15b5c1(0xa1))/0x5+-parseInt(_0x15b5c1(0x9b))/0x6*(-parseInt(_0x15b5c1(0x96))/0x7)+parseInt(_0x15b5c1(0x9e))/0x8*(-parseInt(_0x15b5c1(0x93))/0x9);if(_0x501f6f===_0x47af80)break;else _0x236f8c['push'](_0x236f8c['shift']());}catch(_0x3376b7){_0x236f8c['push'](_0x236f8c['shift']());}}}(a38_0x4658,0x298cc));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x4658(){const _0x348fb1=['code','840290nJGHsP','read','nonInteractive','error','skillVersion','installedPath','cli-skill-install','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Built-in\x20Skill\x20install\x20failed\x20[','453736IeEFfc','inherit','559077xyPppM','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','apiError','log','info','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','changed','setLogPath','CLI\x20Built-in\x20Skill\x20','\x20via\x20skills@latest','repairCommand','227952QDwXKI','9558IXAmIo','install','844739YPGapk','unknown','cwd','cli-skill','\x20at\x20','6ZkEwsj','313172iiHndF','pipe','8xpiQNZ',']:\x20'];a38_0x4658=function(){return _0x348fb1;};return a38_0x4658();}function a38_0x14cb(_0x357be0,_0x56f274){_0x357be0=_0x357be0-0x92;const _0x4658b9=a38_0x4658();let _0x14cb10=_0x4658b9[_0x357be0];return _0x14cb10;}export const cliSkillDefinitions=[{'service':a38_0x253284(0x99),'command':a38_0x253284(0x95),'description':a38_0x253284(0xb1),'risk':a38_0x253284(0xa2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2c9936){const _0x5d34fa=a38_0x253284;logger[_0x5d34fa(0xb3)](process[_0x5d34fa(0x98)]()),logger[_0x5d34fa(0xb0)](_0x5d34fa(0xa7),_0x5d34fa(0xad));const _0x417a71=installBuiltinSkill({'stdio':_0x2c9936[_0x5d34fa(0xa3)]?_0x5d34fa(0x9d):_0x5d34fa(0xab)});if(!_0x417a71['ok'])throw CliErrors[_0x5d34fa(0xae)](_0x5d34fa(0xa9)+_0x417a71[_0x5d34fa(0xa0)]+_0x5d34fa(0x9f)+(_0x417a71[_0x5d34fa(0xa4)]||_0x5d34fa(0x97)),_0x5d34fa(0xa8)+_0x417a71[_0x5d34fa(0x92)]);return console[_0x5d34fa(0xaf)](_0x417a71[_0x5d34fa(0xb2)]?_0x5d34fa(0xb4)+_0x417a71['skillVersion']+'\x20installed'+(_0x417a71[_0x5d34fa(0xa6)]?_0x5d34fa(0x9a)+_0x417a71[_0x5d34fa(0xa6)]:_0x5d34fa(0xb5)):'CLI\x20Built-in\x20Skill\x20'+_0x417a71[_0x5d34fa(0xa5)]+'\x20is\x20already\x20current'+(_0x417a71[_0x5d34fa(0xa6)]?'\x20at\x20'+_0x417a71[_0x5d34fa(0xa6)]:'')),{'ok':!![]};}}];
1
+ const a38_0x17682f=a38_0x2629;(function(_0x331875,_0x2f30b8){const _0x2600ab=a38_0x2629,_0x236811=_0x331875();while(!![]){try{const _0x360f02=parseInt(_0x2600ab(0xc3))/0x1*(-parseInt(_0x2600ab(0xc9))/0x2)+parseInt(_0x2600ab(0xd5))/0x3*(-parseInt(_0x2600ab(0xd6))/0x4)+parseInt(_0x2600ab(0xc5))/0x5+parseInt(_0x2600ab(0xc1))/0x6+parseInt(_0x2600ab(0xbe))/0x7*(parseInt(_0x2600ab(0xc8))/0x8)+parseInt(_0x2600ab(0xc6))/0x9*(-parseInt(_0x2600ab(0xbf))/0xa)+parseInt(_0x2600ab(0xc2))/0xb*(parseInt(_0x2600ab(0xcf))/0xc);if(_0x360f02===_0x2f30b8)break;else _0x236811['push'](_0x236811['shift']());}catch(_0x2e4947){_0x236811['push'](_0x236811['shift']());}}}(a38_0x3a11,0xc9cc6));import{CliErrors}from'../../errors.js';function a38_0x3a11(){const _0x4f27f7=['unknown','12PHoAgw','code','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','\x20installed','changed','CLI\x20Built-in\x20Skill\x20','396321BapjWx','8xibMBP','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','cli-skill','Built-in\x20Skill\x20install\x20failed\x20[','installedPath','\x20is\x20already\x20current','cli-skill-install','inherit','error','read','\x20at\x20','1814918gAplkS','13107010ciodwf','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','605982qUfyKD','3806011HxPDux','26633TjLzDR','info','6788135ARKCnt','9RPuECi','cwd','48npEKwj','72YgWeQO','install','log','skillVersion','setLogPath'];a38_0x3a11=function(){return _0x4f27f7;};return a38_0x3a11();}import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a38_0x2629(_0x3430c9,_0x570bde){_0x3430c9=_0x3430c9-0xbd;const _0x3a11e7=a38_0x3a11();let _0x2629d6=_0x3a11e7[_0x3430c9];return _0x2629d6;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x17682f(0xd8),'command':a38_0x17682f(0xca),'description':a38_0x17682f(0xc0),'risk':a38_0x17682f(0xdf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x436d3e){const _0x4b92e5=a38_0x17682f;logger[_0x4b92e5(0xcd)](process[_0x4b92e5(0xc7)]()),logger[_0x4b92e5(0xc4)](_0x4b92e5(0xdc),_0x4b92e5(0xd7));const _0x47e457=installBuiltinSkill({'stdio':_0x436d3e['nonInteractive']?'pipe':_0x4b92e5(0xdd)});if(!_0x47e457['ok'])throw CliErrors['apiError'](_0x4b92e5(0xd9)+_0x47e457[_0x4b92e5(0xd0)]+']:\x20'+(_0x47e457[_0x4b92e5(0xde)]||_0x4b92e5(0xce)),_0x4b92e5(0xd1)+_0x47e457['repairCommand']);return console[_0x4b92e5(0xcb)](_0x47e457[_0x4b92e5(0xd3)]?_0x4b92e5(0xd4)+_0x47e457[_0x4b92e5(0xcc)]+_0x4b92e5(0xd2)+(_0x47e457[_0x4b92e5(0xda)]?_0x4b92e5(0xbd)+_0x47e457[_0x4b92e5(0xda)]:'\x20via\x20skills@latest'):'CLI\x20Built-in\x20Skill\x20'+_0x47e457['skillVersion']+_0x4b92e5(0xdb)+(_0x47e457[_0x4b92e5(0xda)]?'\x20at\x20'+_0x47e457['installedPath']:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x59dd80=a39_0x151a;(function(_0x4355e8,_0x1de3cf){const _0x8eec00=a39_0x151a,_0xa619fe=_0x4355e8();while(!![]){try{const _0x2b21e6=parseInt(_0x8eec00(0x97))/0x1*(parseInt(_0x8eec00(0x93))/0x2)+-parseInt(_0x8eec00(0xde))/0x3*(-parseInt(_0x8eec00(0xce))/0x4)+-parseInt(_0x8eec00(0xca))/0x5+parseInt(_0x8eec00(0xb9))/0x6+parseInt(_0x8eec00(0xae))/0x7*(parseInt(_0x8eec00(0xe1))/0x8)+parseInt(_0x8eec00(0xbc))/0x9+parseInt(_0x8eec00(0xa9))/0xa*(-parseInt(_0x8eec00(0xc9))/0xb);if(_0x2b21e6===_0x1de3cf)break;else _0xa619fe['push'](_0xa619fe['shift']());}catch(_0x2d8f76){_0xa619fe['push'](_0xa619fe['shift']());}}}(a39_0x4a9a,0x7a588));import a39_0x3da42f from'chalk';import a39_0x24b1d7 from'ora';import a39_0x4855a9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a39_0x4a9a(){const _0x548067=['run','trim','/dist-tags','update','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest','unknown','fromEntries','str','execPath','filter','\x20→\x20','expected\x20','Invalid\x20version:\x20','1070fGPgis','start','npm','fail','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7rENBtw','Already\x20on\x20requested\x20version\x20(v','toLowerCase','entries','gray','source','\x20cli-skill\x20install','Install\x20a\x20specific\x20CLI\x20version','@latest','yellow','green','73320jrKjAn','info','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','6932691pKLRKG','\x20install\x20-g\x20','warn','timeout','validation','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','red','object','string',']:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','length','valid','96206NNmZVz','1838440KwlSAm',',\x20found\x20','skillVersion','Already\x20up\x20to\x20date\x20(v','1104ZBlcsg','Requested\x20version:\x20','Update\x20available:\x20','bun','message','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Updated\x20to\x20v','https://registry.npmjs.org/-/package/','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20failed','slice','install','\x20\x20CLI\x20Built-in\x20Skill\x20','code','includes','log','381dZQMBD',',\x20state\x20','bool','4055144ZKreYq','beta','version','state','2292OVpbpD','Version\x20comparison\x20failed','Current\x20version:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','419ulIpXH','error','current','succeed'];a39_0x4a9a=function(){return _0x548067;};return a39_0x4a9a();}import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x11b24e=a39_0x151a;return GIT_COMMIT!==_0x11b24e(0xa1)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x11b24e(0xd8)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x56945b=a39_0x151a,_0x21a251=process[_0x56945b(0xa4)][_0x56945b(0xb0)]();if(_0x21a251[_0x56945b(0xdc)]('bun'))return _0x56945b(0xd1);return _0x56945b(0xab);}const updateFlags=[{'name':a39_0x59dd80(0x90),'type':'boolean','description':a39_0x59dd80(0x9f),'default':![]},{'name':'version','type':a39_0x59dd80(0xc4),'description':a39_0x59dd80(0xb5)}];function getRequestedVersion(_0x5ad522){const _0x172543=a39_0x59dd80;return _0x5ad522[_0x172543(0xa3)](_0x172543(0x91))[_0x172543(0x9c)]();}async function validateUpdateFlags(_0x17f15c){const _0x216721=a39_0x59dd80,_0x237d48=_0x17f15c['bool'](_0x216721(0x90)),_0x2e24b7=getRequestedVersion(_0x17f15c);if(_0x237d48&&_0x2e24b7)throw CliErrors[_0x216721(0xc0)](_0x216721(0xd6),_0x216721(0xad));if(_0x2e24b7&&!a39_0x4855a9[_0x216721(0xc8)](_0x2e24b7))throw CliErrors[_0x216721(0xc0)](_0x216721(0xa8)+_0x2e24b7,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}function a39_0x151a(_0x40b379,_0x32495c){_0x40b379=_0x40b379-0x90;const _0x4a9a07=a39_0x4a9a();let _0x151aab=_0x4a9a07[_0x40b379];return _0x151aab;}async function fetchNpmDistTags(){const _0x21e79d=a39_0x59dd80;try{const _0x537c01=await fetch(_0x21e79d(0xd5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21e79d(0x9d),{'signal':AbortSignal[_0x21e79d(0xbf)](0x2710)});if(!_0x537c01['ok'])return null;const _0x217150=await _0x537c01['json']();if(!_0x217150||typeof _0x217150!==_0x21e79d(0xc3))return null;return Object[_0x21e79d(0xa2)](Object[_0x21e79d(0xb1)](_0x217150)[_0x21e79d(0xa5)](([,_0x51f1a8])=>typeof _0x51f1a8==='string'&&_0x51f1a8[_0x21e79d(0x9c)]()[_0x21e79d(0xc7)]>0x0)['map'](([_0x3dd67f,_0x292c0b])=>[_0x3dd67f,String(_0x292c0b)[_0x21e79d(0x9c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xfaa59e){const _0x56e6e0=await fetchNpmDistTags();return _0x56e6e0?.[_0xfaa59e]??null;}async function fetchLatestVersion(){const _0x11593f=a39_0x59dd80;return fetchNpmDistTagVersion(_0x11593f(0xa0));}async function resolveTargetVersion(_0x406135){const _0x21532e=a39_0x59dd80,_0x1faff0=getRequestedVersion(_0x406135);if(_0x1faff0)return{'version':_0x1faff0,'source':_0x21532e(0x91)};if(_0x406135['bool'](_0x21532e(0x90))){const _0x428c49=await fetchNpmDistTagVersion(_0x21532e(0x90));if(!_0x428c49)return null;return{'version':_0x428c49,'source':'beta'};}const _0x434c30=await fetchLatestVersion();if(!_0x434c30)return null;return{'version':_0x434c30,'source':_0x21532e(0xa0)};}function shouldInstallTarget(_0x20a3a7,_0x13d372){const _0x5503fa=a39_0x59dd80;if(_0x13d372[_0x5503fa(0xb3)]===_0x5503fa(0x91)||_0x13d372[_0x5503fa(0xb3)]==='beta')return!a39_0x4855a9['eq'](_0x20a3a7,_0x13d372[_0x5503fa(0x91)]);return a39_0x4855a9['lt'](_0x20a3a7,_0x13d372[_0x5503fa(0x91)]);}function getInstallPlanLabel(_0x388d15,_0x22e767){const _0x41fb88=a39_0x59dd80;switch(_0x22e767[_0x41fb88(0xb3)]){case _0x41fb88(0x90):return'Beta\x20version:\x20'+a39_0x3da42f['yellow'](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f[_0x41fb88(0xb8)](_0x22e767['version']);case _0x41fb88(0x91):return _0x41fb88(0xcf)+a39_0x3da42f[_0x41fb88(0xb7)](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f[_0x41fb88(0xb8)](_0x22e767['version']);case _0x41fb88(0xa0):default:return _0x41fb88(0xd0)+a39_0x3da42f[_0x41fb88(0xb7)](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f['green'](_0x22e767[_0x41fb88(0x91)]);}}function repairCurrentBuiltinSkill(){const _0x163390=a39_0x59dd80;console[_0x163390(0xdd)](a39_0x3da42f['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x4b9e7e=installBuiltinSkill();if(_0x4b9e7e['ok'])return console[_0x163390(0xdd)](a39_0x3da42f[_0x163390(0xb2)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4b9e7e['skillVersion']+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x163390(0xbe)](a39_0x3da42f['yellow'](_0x163390(0xd3)+_0x4b9e7e[_0x163390(0xdb)]+_0x163390(0xc5)+(_0x4b9e7e['error']||'unknown'))),console['log'](a39_0x3da42f[_0x163390(0xb2)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x163390(0xb4))),![];}function verifyUpdatedBuiltinSkill(_0x3fb392){const _0xbf67d6=a39_0x59dd80,_0x15eace=inspectInstalledBuiltinSkillVersion(_0x3fb392);if(_0x15eace[_0xbf67d6(0x92)]===_0xbf67d6(0x99))return console['log'](a39_0x3da42f[_0xbf67d6(0xb2)](_0xbf67d6(0xda)+_0x3fb392+'\x20is\x20up\x20to\x20date.')),!![];const _0x1a2ba6=_0x15eace[_0xbf67d6(0xcc)]?_0xbf67d6(0xa7)+_0x3fb392+_0xbf67d6(0xcb)+_0x15eace[_0xbf67d6(0xcc)]:_0xbf67d6(0xa7)+_0x3fb392+_0xbf67d6(0xdf)+_0x15eace['state'];return console[_0xbf67d6(0xbe)](a39_0x3da42f['yellow']('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x1a2ba6)),console['log'](a39_0x3da42f[_0xbf67d6(0xb2)]('\x20\x20Run\x20manually:\x20'+_0x15eace['repairCommand'])),![];}async function execute(_0x36b8bc){const _0x214ba5=a39_0x59dd80;await validateUpdateFlags(_0x36b8bc);const _0x1a4d55=getCurrentVersion();console[_0x214ba5(0xdd)](_0x214ba5(0x95)+_0x1a4d55);const _0x5c346a=a39_0x24b1d7('Checking\x20for\x20updates...')[_0x214ba5(0xaa)](),_0xd25dde=await resolveTargetVersion(_0x36b8bc);if(!_0xd25dde){const _0x46aa0c=_0x36b8bc[_0x214ba5(0xe0)](_0x214ba5(0x90))?_0x214ba5(0xbb):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5c346a['fail'](_0x46aa0c),console['log'](a39_0x3da42f['gray'](_0x214ba5(0xc6)+NPM_PACKAGE_NAME+_0x214ba5(0xb6))),{'ok':![],'message':_0x46aa0c};}const _0x3566e4=a39_0x4855a9[_0x214ba5(0xc8)](VERSION),_0xc6917a=a39_0x4855a9[_0x214ba5(0xc8)](_0xd25dde[_0x214ba5(0x91)]);if(!_0x3566e4||!_0xc6917a)return _0x5c346a[_0x214ba5(0xac)](_0x214ba5(0x94)),{'ok':![],'message':_0x214ba5(0x94)};if(!shouldInstallTarget(_0x3566e4,_0xd25dde)){const _0x33069a=_0xd25dde[_0x214ba5(0xb3)]===_0x214ba5(0x91)?_0x214ba5(0xaf)+_0xd25dde[_0x214ba5(0x91)]+')':_0x214ba5(0xcd)+_0xd25dde[_0x214ba5(0x91)]+')';return _0x5c346a[_0x214ba5(0x9a)](_0x33069a),{'ok':repairCurrentBuiltinSkill()};}_0x5c346a[_0x214ba5(0xba)](getInstallPlanLabel(_0x1a4d55,_0xd25dde));const _0x3c602d=detectPackageManager(),_0x5c55c2=_0x3c602d===_0x214ba5(0xab)?resolveNpmBin(_0x214ba5(0xab)):_0x3c602d,_0x15293c=a39_0x24b1d7('Updating\x20via\x20'+_0x3c602d+'...')[_0x214ba5(0xaa)]();try{return await execa(_0x5c55c2,[_0x214ba5(0xd9),'-g',NPM_PACKAGE_NAME+'@'+_0xd25dde['version']],{'stdio':'pipe'}),_0x15293c[_0x214ba5(0x9a)](_0x214ba5(0xd4)+_0xd25dde['version']),console[_0x214ba5(0xdd)](a39_0x3da42f[_0x214ba5(0xb2)](_0x214ba5(0x96))),{'ok':verifyUpdatedBuiltinSkill(_0xd25dde[_0x214ba5(0x91)])};}catch(_0x51d555){return _0x15293c[_0x214ba5(0xac)](_0x214ba5(0xd7)),console[_0x214ba5(0x98)](a39_0x3da42f[_0x214ba5(0xc2)]('\x20\x20'+_0x51d555[_0x214ba5(0xd2)])),console[_0x214ba5(0xdd)](a39_0x3da42f[_0x214ba5(0xb2)]('\x20\x20Try\x20manually:\x20'+_0x3c602d+_0x214ba5(0xbd)+NPM_PACKAGE_NAME+'@'+_0xd25dde[_0x214ba5(0x91)])),{'ok':![],'message':_0x51d555[_0x214ba5(0xd2)]};}}export const updateDefinition={'service':a39_0x59dd80(0x9e),'command':a39_0x59dd80(0x9b),'description':a39_0x59dd80(0xc1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x25fcff=a39_0x2449;(function(_0x198408,_0xeee919){const _0x106d5d=a39_0x2449,_0x38fbe6=_0x198408();while(!![]){try{const _0x8b2218=parseInt(_0x106d5d(0x211))/0x1+-parseInt(_0x106d5d(0x20f))/0x2+parseInt(_0x106d5d(0x20d))/0x3+-parseInt(_0x106d5d(0x1e7))/0x4*(-parseInt(_0x106d5d(0x1f7))/0x5)+parseInt(_0x106d5d(0x1f0))/0x6*(-parseInt(_0x106d5d(0x1c1))/0x7)+-parseInt(_0x106d5d(0x1d0))/0x8+-parseInt(_0x106d5d(0x205))/0x9;if(_0x8b2218===_0xeee919)break;else _0x38fbe6['push'](_0x38fbe6['shift']());}catch(_0x388d38){_0x38fbe6['push'](_0x38fbe6['shift']());}}}(a39_0x411c,0x6b47a));function a39_0x2449(_0x5ce583,_0x421d78){_0x5ce583=_0x5ce583-0x1c1;const _0x411cb3=a39_0x411c();let _0x244992=_0x411cb3[_0x5ce583];return _0x244992;}import a39_0x6d1bb5 from'chalk';import a39_0x171e8c from'ora';import a39_0x34edfb from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4f219d=a39_0x2449;return GIT_COMMIT!==_0x4f219d(0x1ec)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4f219d(0x1d3)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4b3f08=a39_0x2449,_0x3113ad=process[_0x4b3f08(0x1db)][_0x4b3f08(0x201)]();if(_0x3113ad[_0x4b3f08(0x1f8)]('bun'))return _0x4b3f08(0x1d4);return _0x4b3f08(0x1da);}const updateFlags=[{'name':a39_0x25fcff(0x20b),'type':a39_0x25fcff(0x213),'description':a39_0x25fcff(0x1f3),'default':![]},{'name':a39_0x25fcff(0x1cf),'type':a39_0x25fcff(0x20c),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x1896ab){const _0xacbd6=a39_0x25fcff;return _0x1896ab[_0xacbd6(0x1f4)](_0xacbd6(0x1cf))[_0xacbd6(0x1c3)]();}async function validateUpdateFlags(_0x3a8fcd){const _0x17bce0=a39_0x25fcff,_0x2f3f37=_0x3a8fcd[_0x17bce0(0x200)](_0x17bce0(0x20b)),_0x5c6c8a=getRequestedVersion(_0x3a8fcd);if(_0x2f3f37&&_0x5c6c8a)throw CliErrors[_0x17bce0(0x1e4)](_0x17bce0(0x1cc),_0x17bce0(0x1f5));if(_0x5c6c8a&&!a39_0x34edfb['valid'](_0x5c6c8a))throw CliErrors[_0x17bce0(0x1e4)]('Invalid\x20version:\x20'+_0x5c6c8a,_0x17bce0(0x1d1));}async function fetchNpmDistTags(){const _0x2b6302=a39_0x25fcff;try{const _0x2629dc=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x2b6302(0x1f6)](0x2710)});if(!_0x2629dc['ok'])return null;const _0x4b2185=await _0x2629dc[_0x2b6302(0x1d7)]();if(!_0x4b2185||typeof _0x4b2185!==_0x2b6302(0x1f2))return null;return Object[_0x2b6302(0x20e)](Object[_0x2b6302(0x1f1)](_0x4b2185)[_0x2b6302(0x1d6)](([,_0x3153be])=>typeof _0x3153be==='string'&&_0x3153be[_0x2b6302(0x1c3)]()[_0x2b6302(0x20a)]>0x0)[_0x2b6302(0x1c5)](([_0x378483,_0x57cf2a])=>[_0x378483,String(_0x57cf2a)[_0x2b6302(0x1c3)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x496600){const _0x215813=await fetchNpmDistTags();return _0x215813?.[_0x496600]??null;}async function fetchLatestVersion(){const _0x17c28f=a39_0x25fcff;return fetchNpmDistTagVersion(_0x17c28f(0x1cd));}async function resolveTargetVersion(_0x148023){const _0x230f37=a39_0x25fcff,_0x1cf423=getRequestedVersion(_0x148023);if(_0x1cf423)return{'version':_0x1cf423,'source':'version'};if(_0x148023[_0x230f37(0x200)](_0x230f37(0x20b))){const _0x2f002d=await fetchNpmDistTagVersion('beta');if(!_0x2f002d)return null;return{'version':_0x2f002d,'source':_0x230f37(0x20b)};}const _0x350604=await fetchLatestVersion();if(!_0x350604)return null;return{'version':_0x350604,'source':'latest'};}function shouldInstallTarget(_0x51cb6a,_0x1c9482){const _0x63402a=a39_0x25fcff;if(_0x1c9482[_0x63402a(0x1e9)]===_0x63402a(0x1cf)||_0x1c9482['source']===_0x63402a(0x20b))return!a39_0x34edfb['eq'](_0x51cb6a,_0x1c9482[_0x63402a(0x1cf)]);return a39_0x34edfb['lt'](_0x51cb6a,_0x1c9482[_0x63402a(0x1cf)]);}function getInstallPlanLabel(_0x5b9b48,_0x4ed16f){const _0x3f3cac=a39_0x25fcff;switch(_0x4ed16f[_0x3f3cac(0x1e9)]){case _0x3f3cac(0x20b):return'Beta\x20version:\x20'+a39_0x6d1bb5[_0x3f3cac(0x1e6)](_0x5b9b48)+_0x3f3cac(0x1ed)+a39_0x6d1bb5[_0x3f3cac(0x1c2)](_0x4ed16f[_0x3f3cac(0x1cf)]);case _0x3f3cac(0x1cf):return _0x3f3cac(0x1ee)+a39_0x6d1bb5['yellow'](_0x5b9b48)+_0x3f3cac(0x1ed)+a39_0x6d1bb5[_0x3f3cac(0x1c2)](_0x4ed16f[_0x3f3cac(0x1cf)]);case _0x3f3cac(0x1cd):default:return'Update\x20available:\x20'+a39_0x6d1bb5[_0x3f3cac(0x1e6)](_0x5b9b48)+_0x3f3cac(0x1ed)+a39_0x6d1bb5[_0x3f3cac(0x1c2)](_0x4ed16f['version']);}}function a39_0x411c(){const _0x1ccce3=['start','unknown','\x20→\x20','Requested\x20version:\x20','message','3030KALnRR','entries','object','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','str','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','timeout','580waOFZs','includes','gray','Already\x20on\x20requested\x20version\x20(v','run','error','Checking\x20CLI\x20Built-in\x20Skill...','skillVersion','\x20\x20Run\x20manually:\x20','bool','toLowerCase','...','warn','log','1104579LBECLX','valid','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','fail','\x20cli-skill\x20install','length','beta','string','848865lshGYa','fromEntries','1083406yKwnYQ','succeed','796012inkfZD','\x20is\x20up\x20to\x20date.','boolean','2975ktXEWf','green','trim','current','map','\x20\x20CLI\x20Built-in\x20Skill\x20','\x20\x20Try\x20manually:\x20','info','pipe','read',']:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','latest','state','version','3857008oFvUsv','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','slice','bun','install','filter','json','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','expected\x20','npm','execPath','Updated\x20to\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Current\x20version:\x20','code','Already\x20up\x20to\x20date\x20(v','Version\x20comparison\x20failed','Updating\x20via\x20','update','validation',',\x20state\x20','yellow','24884ezVEks','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','source','@latest'];a39_0x411c=function(){return _0x1ccce3;};return a39_0x411c();}function repairCurrentBuiltinSkill(){const _0x2d5b9a=a39_0x25fcff;console[_0x2d5b9a(0x204)](a39_0x6d1bb5[_0x2d5b9a(0x1f9)](_0x2d5b9a(0x1fd)));const _0x1d9f48=installBuiltinSkill();if(_0x1d9f48['ok'])return console[_0x2d5b9a(0x204)](a39_0x6d1bb5[_0x2d5b9a(0x1f9)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1d9f48[_0x2d5b9a(0x1fe)]+_0x2d5b9a(0x212))),!![];return console[_0x2d5b9a(0x203)](a39_0x6d1bb5['yellow'](_0x2d5b9a(0x1d2)+_0x1d9f48[_0x2d5b9a(0x1df)]+_0x2d5b9a(0x1cb)+(_0x1d9f48[_0x2d5b9a(0x1fc)]||_0x2d5b9a(0x1ec)))),console[_0x2d5b9a(0x204)](a39_0x6d1bb5['gray'](_0x2d5b9a(0x1ff)+CLI_BIN_NAME+_0x2d5b9a(0x209))),![];}function verifyUpdatedBuiltinSkill(_0x27fd3a){const _0x1e79f9=a39_0x25fcff,_0x4330eb=inspectInstalledBuiltinSkillVersion(_0x27fd3a);if(_0x4330eb[_0x1e79f9(0x1ce)]===_0x1e79f9(0x1c4))return console[_0x1e79f9(0x204)](a39_0x6d1bb5[_0x1e79f9(0x1f9)](_0x1e79f9(0x1c6)+_0x27fd3a+_0x1e79f9(0x212))),!![];const _0xd13306=_0x4330eb['skillVersion']?_0x1e79f9(0x1d9)+_0x27fd3a+',\x20found\x20'+_0x4330eb[_0x1e79f9(0x1fe)]:_0x1e79f9(0x1d9)+_0x27fd3a+_0x1e79f9(0x1e5)+_0x4330eb[_0x1e79f9(0x1ce)];return console[_0x1e79f9(0x203)](a39_0x6d1bb5[_0x1e79f9(0x1e6)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0xd13306)),console[_0x1e79f9(0x204)](a39_0x6d1bb5[_0x1e79f9(0x1f9)](_0x1e79f9(0x1ff)+_0x4330eb['repairCommand'])),![];}async function execute(_0x18ebe7){const _0xd9c3c2=a39_0x25fcff;await validateUpdateFlags(_0x18ebe7);const _0x1c0e43=getCurrentVersion();console[_0xd9c3c2(0x204)](_0xd9c3c2(0x1de)+_0x1c0e43);const _0x2e2003=a39_0x171e8c('Checking\x20for\x20updates...')['start'](),_0x4650d3=await resolveTargetVersion(_0x18ebe7);if(!_0x4650d3){const _0x16e1bb=_0x18ebe7['bool']('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0xd9c3c2(0x1e8);return _0x2e2003[_0xd9c3c2(0x208)](_0x16e1bb),console[_0xd9c3c2(0x204)](a39_0x6d1bb5[_0xd9c3c2(0x1f9)](_0xd9c3c2(0x207)+NPM_PACKAGE_NAME+_0xd9c3c2(0x1ea))),{'ok':![],'message':_0x16e1bb};}const _0x4d85c1=a39_0x34edfb[_0xd9c3c2(0x206)](VERSION),_0x282201=a39_0x34edfb['valid'](_0x4650d3[_0xd9c3c2(0x1cf)]);if(!_0x4d85c1||!_0x282201)return _0x2e2003[_0xd9c3c2(0x208)](_0xd9c3c2(0x1e1)),{'ok':![],'message':_0xd9c3c2(0x1e1)};if(!shouldInstallTarget(_0x4d85c1,_0x4650d3)){const _0x47b9ea=_0x4650d3['source']===_0xd9c3c2(0x1cf)?_0xd9c3c2(0x1fa)+_0x4650d3['version']+')':_0xd9c3c2(0x1e0)+_0x4650d3['version']+')';return _0x2e2003[_0xd9c3c2(0x210)](_0x47b9ea),{'ok':repairCurrentBuiltinSkill()};}_0x2e2003[_0xd9c3c2(0x1c8)](getInstallPlanLabel(_0x1c0e43,_0x4650d3));const _0x5ec1fb=detectPackageManager(),_0x2ac57b=_0x5ec1fb===_0xd9c3c2(0x1da)?resolveNpmBin('npm'):_0x5ec1fb,_0x4652ea=a39_0x171e8c(_0xd9c3c2(0x1e2)+_0x5ec1fb+_0xd9c3c2(0x202))[_0xd9c3c2(0x1eb)]();try{return await execa(_0x2ac57b,[_0xd9c3c2(0x1d5),'-g',NPM_PACKAGE_NAME+'@'+_0x4650d3[_0xd9c3c2(0x1cf)]],{'stdio':_0xd9c3c2(0x1c9)}),_0x4652ea[_0xd9c3c2(0x210)](_0xd9c3c2(0x1dc)+_0x4650d3[_0xd9c3c2(0x1cf)]),console[_0xd9c3c2(0x204)](a39_0x6d1bb5[_0xd9c3c2(0x1f9)](_0xd9c3c2(0x1dd))),{'ok':verifyUpdatedBuiltinSkill(_0x4650d3[_0xd9c3c2(0x1cf)])};}catch(_0x182232){return _0x4652ea[_0xd9c3c2(0x208)]('Update\x20failed'),console[_0xd9c3c2(0x1fc)](a39_0x6d1bb5['red']('\x20\x20'+_0x182232[_0xd9c3c2(0x1ef)])),console['log'](a39_0x6d1bb5[_0xd9c3c2(0x1f9)](_0xd9c3c2(0x1c7)+_0x5ec1fb+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4650d3['version'])),{'ok':![],'message':_0x182232[_0xd9c3c2(0x1ef)]};}}export const updateDefinition={'service':a39_0x25fcff(0x1e3),'command':a39_0x25fcff(0x1fb),'description':a39_0x25fcff(0x1d8),'risk':a39_0x25fcff(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a40_0x4102(){const _0x37a24b=['1064612BVfocF','5OOcKDR','1506naLUCI','596ILJttE','2364fwrUpa','133rPTvTU','760mDOYcm','27357yAjJmx','58040fsgZCL','50022iepbJt','1638534nDohYQ','365862kablvj'];a40_0x4102=function(){return _0x37a24b;};return a40_0x4102();}(function(_0x11d58c,_0x43f60e){const _0x48f10b=a40_0x5939,_0x4dee81=_0x11d58c();while(!![]){try{const _0x4909b4=-parseInt(_0x48f10b(0xef))/0x1+parseInt(_0x48f10b(0xf0))/0x2+-parseInt(_0x48f10b(0xf2))/0x3*(-parseInt(_0x48f10b(0xf3))/0x4)+parseInt(_0x48f10b(0xf1))/0x5*(parseInt(_0x48f10b(0xee))/0x6)+-parseInt(_0x48f10b(0xe9))/0x7*(parseInt(_0x48f10b(0xec))/0x8)+-parseInt(_0x48f10b(0xed))/0x9*(-parseInt(_0x48f10b(0xea))/0xa)+-parseInt(_0x48f10b(0xeb))/0xb*(parseInt(_0x48f10b(0xe8))/0xc);if(_0x4909b4===_0x43f60e)break;else _0x4dee81['push'](_0x4dee81['shift']());}catch(_0x1dedd1){_0x4dee81['push'](_0x4dee81['shift']());}}}(a40_0x4102,0x4b6db));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x5939(_0x17a596,_0x169db4){_0x17a596=_0x17a596-0xe8;const _0x4102ff=a40_0x4102();let _0x59393c=_0x4102ff[_0x17a596];return _0x59393c;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a40_0x4cb9(){const _0xe66cf7=['16cKPAqQ','10LjjtQZ','2788wOYklD','1520750NeIhQZ','3MmtpiW','476MojgFm','1404109UyYQOx','1511RKEntk','9040041wPHDFD','48PmVSgz','1901500rVEBev','10004196pdJEIc'];a40_0x4cb9=function(){return _0xe66cf7;};return a40_0x4cb9();}(function(_0x42fc69,_0x272117){const _0x42f8a1=a40_0x264d,_0x4bc202=_0x42fc69();while(!![]){try{const _0x6b9ece=-parseInt(_0x42f8a1(0xd4))/0x1*(parseInt(_0x42f8a1(0xd2))/0x2)+parseInt(_0x42f8a1(0xdd))/0x3*(-parseInt(_0x42f8a1(0xdb))/0x4)+-parseInt(_0x42f8a1(0xd7))/0x5+parseInt(_0x42f8a1(0xd8))/0x6+-parseInt(_0x42f8a1(0xd3))/0x7*(-parseInt(_0x42f8a1(0xd9))/0x8)+-parseInt(_0x42f8a1(0xd5))/0x9*(parseInt(_0x42f8a1(0xda))/0xa)+parseInt(_0x42f8a1(0xdc))/0xb*(parseInt(_0x42f8a1(0xd6))/0xc);if(_0x6b9ece===_0x272117)break;else _0x4bc202['push'](_0x4bc202['shift']());}catch(_0x2d3d59){_0x4bc202['push'](_0x4bc202['shift']());}}}(a40_0x4cb9,0xd5fbc));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x264d(_0x28d5c4,_0x8d0473){_0x28d5c4=_0x28d5c4-0xd2;const _0x4cb994=a40_0x4cb9();let _0x264d9b=_0x4cb994[_0x28d5c4];return _0x264d9b;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x558fad=a41_0x1503;function a41_0x1503(_0x332c9e,_0x13aaf8){_0x332c9e=_0x332c9e-0x197;const _0x176729=a41_0x1767();let _0x1503db=_0x176729[_0x332c9e];return _0x1503db;}(function(_0x550a59,_0x105963){const _0x383847=a41_0x1503,_0x2978f9=_0x550a59();while(!![]){try{const _0x55774e=-parseInt(_0x383847(0x1a1))/0x1+parseInt(_0x383847(0x1a4))/0x2*(parseInt(_0x383847(0x19b))/0x3)+parseInt(_0x383847(0x1ac))/0x4*(parseInt(_0x383847(0x1a2))/0x5)+parseInt(_0x383847(0x19c))/0x6*(parseInt(_0x383847(0x1ad))/0x7)+parseInt(_0x383847(0x1ae))/0x8*(parseInt(_0x383847(0x199))/0x9)+parseInt(_0x383847(0x19f))/0xa*(parseInt(_0x383847(0x19d))/0xb)+-parseInt(_0x383847(0x1aa))/0xc;if(_0x55774e===_0x105963)break;else _0x2978f9['push'](_0x2978f9['shift']());}catch(_0x3d0a5c){_0x2978f9['push'](_0x2978f9['shift']());}}}(a41_0x1767,0x6696a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x558fad(0x1a9),'command':a41_0x558fad(0x19a),'description':a41_0x558fad(0x1ab),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x558fad(0x197),'type':a41_0x558fad(0x1a0),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x558fad(0x1a3),'type':a41_0x558fad(0x1a0),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':'boolean','description':a41_0x558fad(0x198)}],async 'execute'(_0x242d6f){const _0x1b1f04=a41_0x558fad,{dataset:_0x2dc040,operation:_0x421fc8}=await getOperationDetail(_0x242d6f[_0x1b1f04(0x1a7)],_0x242d6f[_0x1b1f04(0x1a8)]('code'),_0x242d6f['str']('operation')),_0x2329f1=generateSdkCode(_0x2dc040,_0x421fc8,{'includeImports':!_0x242d6f['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2dc040[_0x1b1f04(0x1a6)],'code':_0x2dc040[_0x1b1f04(0x1a5)],'tableName':_0x2dc040[_0x1b1f04(0x19e)]},'operation':_0x242d6f[_0x1b1f04(0x1a8)](_0x1b1f04(0x1a3)),'code':_0x2329f1}};}};function a41_0x1767(){const _0x5cbfaa=['1793JKDLEh','tableName','50390linihf','string','454885hqyrNx','38450stebCU','operation','763918yGyIUW','code','name','appCode','str','codegen','27446004ZqgQWq','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','248UdYTWp','7pnhWcy','5242984Plsqqd','alias','Omit\x20import\x20statements\x20from\x20generated\x20code','9bTdzhg','sdk','6TJoLNj','2668956zEbTMT'];a41_0x1767=function(){return _0x5cbfaa;};return a41_0x1767();}
1
+ const a41_0x58fb1a=a41_0x5178;(function(_0xe4320a,_0x14aee9){const _0x55b547=a41_0x5178,_0x586ff2=_0xe4320a();while(!![]){try{const _0x27353e=-parseInt(_0x55b547(0xe6))/0x1*(parseInt(_0x55b547(0xd0))/0x2)+-parseInt(_0x55b547(0xe2))/0x3*(parseInt(_0x55b547(0xe3))/0x4)+parseInt(_0x55b547(0xd8))/0x5*(-parseInt(_0x55b547(0xce))/0x6)+-parseInt(_0x55b547(0xda))/0x7*(-parseInt(_0x55b547(0xcf))/0x8)+parseInt(_0x55b547(0xdb))/0x9*(parseInt(_0x55b547(0xd7))/0xa)+parseInt(_0x55b547(0xdf))/0xb*(-parseInt(_0x55b547(0xe5))/0xc)+-parseInt(_0x55b547(0xe0))/0xd*(-parseInt(_0x55b547(0xdc))/0xe);if(_0x27353e===_0x14aee9)break;else _0x586ff2['push'](_0x586ff2['shift']());}catch(_0x4bf41d){_0x586ff2['push'](_0x586ff2['shift']());}}}(a41_0x4d92,0x6bf19));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a41_0x5178(_0x23457e,_0x513af6){_0x23457e=_0x23457e-0xcd;const _0x4d9245=a41_0x4d92();let _0x51788f=_0x4d9245[_0x23457e];return _0x51788f;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a41_0x58fb1a(0xd2),'description':a41_0x58fb1a(0xd4),'risk':a41_0x58fb1a(0xcd),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a41_0x58fb1a(0xdd)},{'name':a41_0x58fb1a(0xd1),'type':a41_0x58fb1a(0xe1),'required':!![],'description':a41_0x58fb1a(0xd3)},{'name':a41_0x58fb1a(0xe4),'type':a41_0x58fb1a(0xd6),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2179dc){const _0x3d5d69=a41_0x58fb1a,{dataset:_0xded6e2,operation:_0x4e64ca}=await getOperationDetail(_0x2179dc['appCode'],_0x2179dc['str'](_0x3d5d69(0xd5)),_0x2179dc[_0x3d5d69(0xde)]('operation')),_0x35f9ba=generateSdkCode(_0xded6e2,_0x4e64ca,{'includeImports':!_0x2179dc[_0x3d5d69(0xd9)](_0x3d5d69(0xe4))});return{'ok':!![],'data':{'dataset':{'name':_0xded6e2['name'],'code':_0xded6e2[_0x3d5d69(0xd5)],'tableName':_0xded6e2[_0x3d5d69(0xe7)]},'operation':_0x2179dc['str'](_0x3d5d69(0xd1)),'code':_0x35f9ba}};}};function a41_0x4d92(){const _0x1ea2fb=['2274sHYtiq','3758472qQfLZm','297226ivnbhh','operation','sdk','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','code','boolean','1980hUHkMg','55IAYOBM','bool','7TLXbMZ','11403uZRLPd','61474mLfwIH','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str','33319IIvbxY','3289EVAIQu','string','3IOXnuc','2304660FHUqLA','skip-imports','2028NcviBS','2UNddnI','tableName','read'];a41_0x4d92=function(){return _0x1ea2fb;};return a41_0x4d92();}
@@ -1 +1 @@
1
- const a42_0x3eca31=a42_0x1b06;(function(_0x4bd09f,_0x1c57a4){const _0x106800=a42_0x1b06,_0x4218da=_0x4bd09f();while(!![]){try{const _0xf6f852=-parseInt(_0x106800(0x17c))/0x1*(-parseInt(_0x106800(0x18b))/0x2)+parseInt(_0x106800(0x183))/0x3+-parseInt(_0x106800(0x180))/0x4*(parseInt(_0x106800(0x195))/0x5)+-parseInt(_0x106800(0x189))/0x6*(-parseInt(_0x106800(0x184))/0x7)+parseInt(_0x106800(0x181))/0x8*(-parseInt(_0x106800(0x191))/0x9)+parseInt(_0x106800(0x18a))/0xa*(-parseInt(_0x106800(0x17f))/0xb)+-parseInt(_0x106800(0x190))/0xc*(parseInt(_0x106800(0x186))/0xd);if(_0xf6f852===_0x1c57a4)break;else _0x4218da['push'](_0x4218da['shift']());}catch(_0x19661a){_0x4218da['push'](_0x4218da['shift']());}}}(a42_0x2648,0x4f738));function a42_0x1b06(_0x37c1e0,_0x970d72){_0x37c1e0=_0x37c1e0-0x17c;const _0x2648a6=a42_0x2648();let _0x1b0663=_0x2648a6[_0x37c1e0];return _0x1b0663;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x3eca31(0x193),'command':a42_0x3eca31(0x17e),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x3eca31(0x182),'flags':[SQLCODE_FLAG,{'name':a42_0x3eca31(0x185),'type':a42_0x3eca31(0x17d),'description':a42_0x3eca31(0x196),'default':a42_0x3eca31(0x188),'enum':[a42_0x3eca31(0x188),a42_0x3eca31(0x18c)]},{'name':a42_0x3eca31(0x192),'type':a42_0x3eca31(0x18f),'description':a42_0x3eca31(0x194)}],async 'execute'(_0x1013e9){const _0x32325a=a42_0x3eca31,_0x17a4da=await getSqlQueryInfo(_0x1013e9['appCode'],_0x1013e9[_0x32325a(0x197)](_0x32325a(0x18e))),_0x57730a=_0x1013e9['str']('target')||'sdk',_0x110153=generateSqlCodeTemplate(_0x17a4da,{'target':_0x57730a,'includeImports':!_0x1013e9[_0x32325a(0x187)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x17a4da['sqlCode'],'sqlName':_0x17a4da[_0x32325a(0x18d)],'target':_0x57730a,'code':_0x110153}};}};function a42_0x2648(){const _0x450bbc=['449057pIkfDB','string','sql','11sfxMzK','863412njEtMA','2344sXxSmE','read','1820004DRYTKY','189UHbKPn','target','73801FSHPCL','bool','sdk','109296uJxCrr','2689110rbVaLG','2YRiIOL','bff','sqlName','sqlcode','boolean','444KAhSRv','9567DFmLtp','no-imports','codegen','Omit\x20import\x20statements\x20from\x20generated\x20code','10lyylwo','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','str'];a42_0x2648=function(){return _0x450bbc;};return a42_0x2648();}
1
+ function a42_0x35cb(_0x373249,_0xba66c2){_0x373249=_0x373249-0x125;const _0x1dfb3e=a42_0x1dfb();let _0x35cb81=_0x1dfb3e[_0x373249];return _0x35cb81;}function a42_0x1dfb(){const _0x45db5c=['no-imports','1890TIwUwi','read','sdk','str','2148bGuZvx','string','codegen','1589934ctDJJD','45acbjJM','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','appCode','1964aTfcMS','153800fPHVvS','boolean','30farvFL','3786189XeqXoK','bff','Omit\x20import\x20statements\x20from\x20generated\x20code','1344996GPbLVq','110233JNTdwU','sqlCode','sqlcode','sqlName','target','217iBDEmK'];a42_0x1dfb=function(){return _0x45db5c;};return a42_0x1dfb();}const a42_0x32733a=a42_0x35cb;(function(_0x3cf382,_0x7f2305){const _0x21699c=a42_0x35cb,_0x5624c7=_0x3cf382();while(!![]){try{const _0x55f0b5=parseInt(_0x21699c(0x133))/0x1+parseInt(_0x21699c(0x12b))/0x2*(-parseInt(_0x21699c(0x13a))/0x3)+parseInt(_0x21699c(0x13e))/0x4*(parseInt(_0x21699c(0x128))/0x5)+parseInt(_0x21699c(0x127))/0x6+-parseInt(_0x21699c(0x138))/0x7*(parseInt(_0x21699c(0x12c))/0x8)+parseInt(_0x21699c(0x132))/0x9+parseInt(_0x21699c(0x12e))/0xa*(parseInt(_0x21699c(0x12f))/0xb);if(_0x55f0b5===_0x7f2305)break;else _0x5624c7['push'](_0x5624c7['shift']());}catch(_0x3b2446){_0x5624c7['push'](_0x5624c7['shift']());}}}(a42_0x1dfb,0x54d45));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x32733a(0x126),'command':'sql','description':a42_0x32733a(0x129),'risk':a42_0x32733a(0x13b),'flags':[SQLCODE_FLAG,{'name':a42_0x32733a(0x137),'type':a42_0x32733a(0x125),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a42_0x32733a(0x13c),'enum':[a42_0x32733a(0x13c),a42_0x32733a(0x130)]},{'name':a42_0x32733a(0x139),'type':a42_0x32733a(0x12d),'description':a42_0x32733a(0x131)}],async 'execute'(_0x32f102){const _0x4ef546=a42_0x32733a,_0x2ab378=await getSqlQueryInfo(_0x32f102[_0x4ef546(0x12a)],_0x32f102[_0x4ef546(0x13d)](_0x4ef546(0x135))),_0x459d07=_0x32f102['str']('target')||'sdk',_0x596531=generateSqlCodeTemplate(_0x2ab378,{'target':_0x459d07,'includeImports':!_0x32f102['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x2ab378[_0x4ef546(0x134)],'sqlName':_0x2ab378[_0x4ef546(0x136)],'target':_0x459d07,'code':_0x596531}};}};
@@ -1 +1 @@
1
- (function(_0x290e38,_0x3303bc){const _0x1ec7b1=a43_0x1474,_0x4a77f7=_0x290e38();while(!![]){try{const _0x320c2b=-parseInt(_0x1ec7b1(0x11a))/0x1+-parseInt(_0x1ec7b1(0x10a))/0x2+parseInt(_0x1ec7b1(0x102))/0x3*(-parseInt(_0x1ec7b1(0x105))/0x4)+-parseInt(_0x1ec7b1(0x106))/0x5*(parseInt(_0x1ec7b1(0x116))/0x6)+-parseInt(_0x1ec7b1(0xfc))/0x7*(-parseInt(_0x1ec7b1(0x10b))/0x8)+parseInt(_0x1ec7b1(0x114))/0x9*(parseInt(_0x1ec7b1(0xf3))/0xa)+parseInt(_0x1ec7b1(0xf9))/0xb;if(_0x320c2b===_0x3303bc)break;else _0x4a77f7['push'](_0x4a77f7['shift']());}catch(_0xef7ad4){_0x4a77f7['push'](_0x4a77f7['shift']());}}}(a43_0x45fa,0xd3ff6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a43_0x1474(_0x16dfd6,_0xd8a54b){_0x16dfd6=_0x16dfd6-0xf0;const _0x45fa91=a43_0x45fa();let _0x1474b8=_0x45fa91[_0x16dfd6];return _0x1474b8;}export function buildAppAddFlags(){const _0x1494fd=a43_0x1474;return[{'name':_0x1494fd(0x10f),'type':_0x1494fd(0xf6),'description':'App\x20code','required':!![]},{'name':_0x1494fd(0xf2),'type':_0x1494fd(0x101),'description':_0x1494fd(0x110),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x2ca0e3=a43_0x1474;return[{'name':_0x2ca0e3(0xf2),'type':_0x2ca0e3(0x101),'description':_0x2ca0e3(0x110),'default':![]}];}export async function validateAppName(_0x4f161b,_0x271f73){const _0x5ee71f=a43_0x1474,_0x1c34da=_0x4f161b[_0x5ee71f(0xf1)][0x0]?.[_0x5ee71f(0xff)]();if(!_0x1c34da)throw CliErrors[_0x5ee71f(0xf7)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x271f73+'\x20<name>');}export async function runAppAdd(_0x440226,_0x3bb542){const _0x6afafc=a43_0x1474,_0x447f7c=_0x440226[_0x6afafc(0xf1)][0x0]?.['trim']();if(!_0x447f7c)throw CliErrors[_0x6afafc(0xf7)](_0x6afafc(0x104),_0x6afafc(0x115)+CLI_BIN_NAME+'\x20'+_0x3bb542+_0x6afafc(0x10c));const _0x4cafec=_0x440226[_0x6afafc(0x111)]('appcode');if(!_0x4cafec)throw CliErrors[_0x6afafc(0x109)](_0x6afafc(0x10f),_0x6afafc(0x115)+CLI_BIN_NAME+'\x20'+_0x3bb542+'\x20<name>\x20--appcode\x20<code>');const _0x2e7335={'global':_0x440226[_0x6afafc(0xf5)](_0x6afafc(0xf2))},_0x3b78f7=readConfig(_0x2e7335);if(!_0x3b78f7[_0x6afafc(0x100)])_0x3b78f7[_0x6afafc(0x100)]={};const _0x2b5c7f={'appcode':_0x4cafec,...collectAppProfileOverrides(_0xce7828=>_0x440226['str'](_0xce7828))},_0x1807da=_0x3b78f7[_0x6afafc(0x100)],_0x4dbec5=!!_0x1807da[_0x447f7c];_0x1807da[_0x447f7c]=_0x2b5c7f;if(!_0x3b78f7[_0x6afafc(0x118)])_0x3b78f7[_0x6afafc(0x118)]=_0x447f7c;writeConfig(_0x3b78f7,_0x2e7335);const _0xdffda=!_0x4dbec5&&_0x3b78f7[_0x6afafc(0x118)]===_0x447f7c?_0x6afafc(0xf0):'',_0x14b499=(_0x4dbec5?'Updated':_0x6afafc(0xfb))+_0x6afafc(0xfd)+_0x447f7c+'\x22\x20(appcode:\x20'+_0x4cafec+')'+scopeLabel(_0x2e7335)+'.'+_0xdffda;return{'ok':!![],'message':_0x14b499};}function a43_0x45fa(){const _0x22606f=['globalConfig','defaultApp','\x20<name>\x20[--global]','672783molTHK','\x20Set\x20as\x20default\x20app.','args','global','70VjUNgD','\x20config.','bool','string','validation','\x20Default\x20app\x20changed\x20to\x20\x22','52523669WKZjxG','both','Added','35rgkKvx','\x20app\x20\x22','length','trim','apps','boolean','3GnBAWa','\x22\x20still\x20defined\x20in\x20','Missing\x20app\x20name.','5134936hWayvE','453340GidFLf','projectConfig','App\x20\x22','flagMissing','1639576DXnjAY','35848GSiGsF','\x20<name>\x20--appcode\x20<code>','\x22\x20not\x20found.','keys','appcode','Use\x20global\x20config\x20scope','str','project','inherit','33489SqsQBH','Usage:\x20','78nMUbUq'];a43_0x45fa=function(){return _0x22606f;};return a43_0x45fa();}export async function runAppRemove(_0x553fca,_0x3c3e48){const _0x5c6db6=a43_0x1474,_0x27d210=_0x553fca[_0x5c6db6(0xf1)][0x0]?.[_0x5c6db6(0xff)]();if(!_0x27d210)throw CliErrors['validation'](_0x5c6db6(0x104),_0x5c6db6(0x115)+CLI_BIN_NAME+'\x20'+_0x3c3e48+_0x5c6db6(0x119));const _0x17663e=_0x553fca['bool'](_0x5c6db6(0xf2)),{config:_0x8ee9d8,layers:_0x18878e}=readRawConfigWithLayers(),_0x4b98d7=_0x8ee9d8[_0x5c6db6(0x100)]??{};if(!_0x4b98d7[_0x27d210])throw CliErrors[_0x5c6db6(0xf7)](_0x5c6db6(0x108)+_0x27d210+_0x5c6db6(0x10d));const _0x14d354=_0x18878e[_0x5c6db6(0x117)][_0x5c6db6(0x100)]&&typeof _0x18878e['globalConfig'][_0x5c6db6(0x100)]==='object'?_0x18878e[_0x5c6db6(0x117)][_0x5c6db6(0x100)]:{},_0x50222f=_0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x100)]&&typeof _0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x100)]==='object'?_0x18878e[_0x5c6db6(0x107)]['apps']:{},_0x273977=appDefinedIn(_0x27d210,_0x14d354,_0x50222f,_0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x113)]===![]),_0x29610c=resolveAppScopeForWrite(_0x27d210,_0x17663e,_0x18878e),_0x4dabfe={'global':_0x29610c===_0x5c6db6(0xf2)},_0x387cef=readConfig(_0x4dabfe),_0x4bb22a=_0x387cef[_0x5c6db6(0x100)];if(!_0x4bb22a||!_0x4bb22a[_0x27d210])throw CliErrors[_0x5c6db6(0xf7)]('App\x20\x22'+_0x27d210+_0x5c6db6(0x10d));delete _0x4bb22a[_0x27d210];let _0x3c29ac='';if(_0x387cef[_0x5c6db6(0x118)]===_0x27d210){const _0xdbf43b=Object[_0x5c6db6(0x10e)](_0x4bb22a);_0x387cef[_0x5c6db6(0x118)]=_0xdbf43b[_0x5c6db6(0xfe)]>0x0?_0xdbf43b[0x0]:undefined,_0x387cef[_0x5c6db6(0x118)]?_0x3c29ac=_0x5c6db6(0xf8)+_0x387cef[_0x5c6db6(0x118)]+'\x22.':delete _0x387cef['defaultApp'];}Object['keys'](_0x4bb22a)[_0x5c6db6(0xfe)]===0x0&&(delete _0x387cef[_0x5c6db6(0x100)],delete _0x387cef['defaultApp']);writeConfig(_0x387cef,_0x4dabfe);const _0x51f116=_0x273977===_0x5c6db6(0xfa)?'\x20Note:\x20app\x20\x22'+_0x27d210+_0x5c6db6(0x103)+(_0x29610c===_0x5c6db6(0x112)?_0x5c6db6(0xf2):_0x5c6db6(0x112))+_0x5c6db6(0xf4):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x27d210+'\x22'+scopeLabel(_0x4dabfe)+'.'+_0x3c29ac+_0x51f116};}
1
+ (function(_0x5dc2b3,_0x125c06){const _0x447426=a43_0x3df1,_0x2ab252=_0x5dc2b3();while(!![]){try{const _0x6fd126=parseInt(_0x447426(0xad))/0x1*(parseInt(_0x447426(0xc5))/0x2)+-parseInt(_0x447426(0xc9))/0x3*(parseInt(_0x447426(0xd4))/0x4)+parseInt(_0x447426(0xda))/0x5+-parseInt(_0x447426(0xb4))/0x6*(parseInt(_0x447426(0xc3))/0x7)+parseInt(_0x447426(0xb2))/0x8*(parseInt(_0x447426(0xaf))/0x9)+parseInt(_0x447426(0xca))/0xa+-parseInt(_0x447426(0xab))/0xb*(parseInt(_0x447426(0xc4))/0xc);if(_0x6fd126===_0x125c06)break;else _0x2ab252['push'](_0x2ab252['shift']());}catch(_0x550687){_0x2ab252['push'](_0x2ab252['shift']());}}}(a43_0xae15,0xa68a4));function a43_0x3df1(_0x19fd37,_0x5a5c2f){_0x19fd37=_0x19fd37-0xab;const _0xae1585=a43_0xae15();let _0x3df1c1=_0xae1585[_0x19fd37];return _0x3df1c1;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a43_0xae15(){const _0x5bf06a=['7986680QDRyPb','length','args','boolean','\x22\x20(appcode:\x20','project','\x20Set\x20as\x20default\x20app.','trim','\x20config.','\x20<name>\x20--appcode\x20<code>','828zlikQW','str','\x20Note:\x20app\x20\x22','validation','inherit','keys','2758400wXjYiY','11RdxHQZ','global','302966QjHCGK','Added','6316713Yukirs','bool','apps','8zFoFzH','\x20<name>','66nrThDm','\x22\x20still\x20defined\x20in\x20','globalConfig','defaultApp','flagMissing','appcode','Use\x20global\x20config\x20scope','\x20<name>\x20[--global]','Usage:\x20','projectConfig','both','\x20Default\x20app\x20changed\x20to\x20\x22','Removed\x20app\x20\x22','Missing\x20app\x20name.','App\x20\x22','500402MjgxUN','9401124yArOlL','6QRoSmk','string','object','\x20app\x20\x22','10278QZKiSU'];a43_0xae15=function(){return _0x5bf06a;};return a43_0xae15();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1ca861=a43_0x3df1;return[{'name':'appcode','type':_0x1ca861(0xc6),'description':'App\x20code','required':!![]},{'name':_0x1ca861(0xac),'type':_0x1ca861(0xcd),'description':_0x1ca861(0xba),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x5d8d6a=a43_0x3df1;return[{'name':_0x5d8d6a(0xac),'type':_0x5d8d6a(0xcd),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x46a129,_0xd9297f){const _0x52be37=a43_0x3df1,_0x126ca9=_0x46a129[_0x52be37(0xcc)][0x0]?.[_0x52be37(0xd1)]();if(!_0x126ca9)throw CliErrors[_0x52be37(0xd7)]('Missing\x20app\x20name.',_0x52be37(0xbc)+CLI_BIN_NAME+'\x20'+_0xd9297f+_0x52be37(0xb3));}export async function runAppAdd(_0x42b206,_0x1e7ff8){const _0x2fd9f2=a43_0x3df1,_0x1dc66e=_0x42b206['args'][0x0]?.['trim']();if(!_0x1dc66e)throw CliErrors[_0x2fd9f2(0xd7)](_0x2fd9f2(0xc1),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1e7ff8+_0x2fd9f2(0xd3));const _0x42cffb=_0x42b206[_0x2fd9f2(0xd5)](_0x2fd9f2(0xb9));if(!_0x42cffb)throw CliErrors[_0x2fd9f2(0xb8)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1e7ff8+'\x20<name>\x20--appcode\x20<code>');const _0x5c5597={'global':_0x42b206[_0x2fd9f2(0xb0)](_0x2fd9f2(0xac))},_0x4419b6=readConfig(_0x5c5597);if(!_0x4419b6[_0x2fd9f2(0xb1)])_0x4419b6[_0x2fd9f2(0xb1)]={};const _0x321c9b={'appcode':_0x42cffb,...collectAppProfileOverrides(_0x4f0ff7=>_0x42b206[_0x2fd9f2(0xd5)](_0x4f0ff7))},_0x1300f4=_0x4419b6['apps'],_0x4d2f89=!!_0x1300f4[_0x1dc66e];_0x1300f4[_0x1dc66e]=_0x321c9b;if(!_0x4419b6[_0x2fd9f2(0xb7)])_0x4419b6[_0x2fd9f2(0xb7)]=_0x1dc66e;writeConfig(_0x4419b6,_0x5c5597);const _0x57733f=!_0x4d2f89&&_0x4419b6['defaultApp']===_0x1dc66e?_0x2fd9f2(0xd0):'',_0x368e63=(_0x4d2f89?'Updated':_0x2fd9f2(0xae))+_0x2fd9f2(0xc8)+_0x1dc66e+_0x2fd9f2(0xce)+_0x42cffb+')'+scopeLabel(_0x5c5597)+'.'+_0x57733f;return{'ok':!![],'message':_0x368e63};}export async function runAppRemove(_0x2444c9,_0x169ab7){const _0x3e61be=a43_0x3df1,_0x15aa89=_0x2444c9[_0x3e61be(0xcc)][0x0]?.['trim']();if(!_0x15aa89)throw CliErrors[_0x3e61be(0xd7)](_0x3e61be(0xc1),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x169ab7+_0x3e61be(0xbb));const _0x28a317=_0x2444c9['bool'](_0x3e61be(0xac)),{config:_0x5e7a4b,layers:_0x562053}=readRawConfigWithLayers(),_0x248e88=_0x5e7a4b[_0x3e61be(0xb1)]??{};if(!_0x248e88[_0x15aa89])throw CliErrors['validation'](_0x3e61be(0xc2)+_0x15aa89+'\x22\x20not\x20found.');const _0x4ec619=_0x562053[_0x3e61be(0xb6)]['apps']&&typeof _0x562053[_0x3e61be(0xb6)][_0x3e61be(0xb1)]===_0x3e61be(0xc7)?_0x562053[_0x3e61be(0xb6)][_0x3e61be(0xb1)]:{},_0x3b7664=_0x562053[_0x3e61be(0xbd)][_0x3e61be(0xb1)]&&typeof _0x562053[_0x3e61be(0xbd)][_0x3e61be(0xb1)]===_0x3e61be(0xc7)?_0x562053['projectConfig'][_0x3e61be(0xb1)]:{},_0x61c299=appDefinedIn(_0x15aa89,_0x4ec619,_0x3b7664,_0x562053['projectConfig'][_0x3e61be(0xd8)]===![]),_0x8eb1e4=resolveAppScopeForWrite(_0x15aa89,_0x28a317,_0x562053),_0x52afae={'global':_0x8eb1e4===_0x3e61be(0xac)},_0x2d2fcb=readConfig(_0x52afae),_0x5d95a3=_0x2d2fcb['apps'];if(!_0x5d95a3||!_0x5d95a3[_0x15aa89])throw CliErrors['validation'](_0x3e61be(0xc2)+_0x15aa89+'\x22\x20not\x20found.');delete _0x5d95a3[_0x15aa89];let _0x30be56='';if(_0x2d2fcb[_0x3e61be(0xb7)]===_0x15aa89){const _0x577e43=Object['keys'](_0x5d95a3);_0x2d2fcb[_0x3e61be(0xb7)]=_0x577e43[_0x3e61be(0xcb)]>0x0?_0x577e43[0x0]:undefined,_0x2d2fcb[_0x3e61be(0xb7)]?_0x30be56=_0x3e61be(0xbf)+_0x2d2fcb[_0x3e61be(0xb7)]+'\x22.':delete _0x2d2fcb['defaultApp'];}Object[_0x3e61be(0xd9)](_0x5d95a3)[_0x3e61be(0xcb)]===0x0&&(delete _0x2d2fcb[_0x3e61be(0xb1)],delete _0x2d2fcb['defaultApp']);writeConfig(_0x2d2fcb,_0x52afae);const _0x58afb8=_0x61c299===_0x3e61be(0xbe)?_0x3e61be(0xd6)+_0x15aa89+_0x3e61be(0xb5)+(_0x8eb1e4===_0x3e61be(0xcf)?_0x3e61be(0xac):_0x3e61be(0xcf))+_0x3e61be(0xd2):'';return{'ok':!![],'message':_0x3e61be(0xc0)+_0x15aa89+'\x22'+scopeLabel(_0x52afae)+'.'+_0x30be56+_0x58afb8};}
@@ -1 +1 @@
1
- (function(_0x4b95a1,_0x310106){const _0x35c021=a44_0xe5a8,_0x5f2a49=_0x4b95a1();while(!![]){try{const _0x2c5019=parseInt(_0x35c021(0x1e2))/0x1*(-parseInt(_0x35c021(0x1d1))/0x2)+-parseInt(_0x35c021(0x1dc))/0x3*(parseInt(_0x35c021(0x1e7))/0x4)+parseInt(_0x35c021(0x1cc))/0x5+parseInt(_0x35c021(0x1df))/0x6*(-parseInt(_0x35c021(0x1e0))/0x7)+-parseInt(_0x35c021(0x1dd))/0x8+parseInt(_0x35c021(0x1cb))/0x9*(-parseInt(_0x35c021(0x1de))/0xa)+parseInt(_0x35c021(0x1d8))/0xb*(parseInt(_0x35c021(0x1d3))/0xc);if(_0x2c5019===_0x310106)break;else _0x5f2a49['push'](_0x5f2a49['shift']());}catch(_0x2283df){_0x5f2a49['push'](_0x5f2a49['shift']());}}}(a44_0x414c,0x563e9));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x2a8cef from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a44_0xe5a8(_0x3341b8,_0xf0b838){_0x3341b8=_0x3341b8-0x1c9;const _0x414ccc=a44_0x414c();let _0xe5a8fc=_0x414ccc[_0x3341b8];return _0xe5a8fc;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x2ed1a9=a44_0xe5a8,_0x21668f=await input({'message':'请输入\x20App\x20Code:','validate':_0x22b27f=>{const _0x690272=a44_0xe5a8,_0x3cc172=validateAppcode(_0x22b27f[_0x690272(0x1d4)]());return _0x3cc172[_0x690272(0x1e9)]||_0x3cc172['message']||'Invalid\x20App\x20Code';}});return _0x21668f[_0x2ed1a9(0x1d4)]();}export async function promptAppSelection(_0x14eae5){const _0x3e031f=a44_0xe5a8,_0x5ae561=[{'name':a44_0x2a8cef[_0x3e031f(0x1d7)](_0x3e031f(0x1e3)),'value':-0x1},..._0x14eae5['map']((_0x4a4f24,_0x1ddafb)=>({'name':_0x4a4f24[_0x3e031f(0x1ed)]+'\x20\x20'+a44_0x2a8cef[_0x3e031f(0x1d0)]('('+_0x4a4f24[_0x3e031f(0x1eb)]+')'),'value':_0x1ddafb}))],_0x57c506=await checkbox({'message':'获取到\x20'+a44_0x2a8cef['cyan'](_0x14eae5[_0x3e031f(0x1e1)])+_0x3e031f(0x1ea),'choices':_0x5ae561,'loop':![]});if(_0x57c506[_0x3e031f(0x1d9)](-0x1))return'custom';if(_0x57c506['length']===0x0)return _0x3e031f(0x1e8);return _0x57c506['map'](_0x852760=>_0x14eae5[_0x852760]);}function a44_0x414c(){const _0x5d9749=['未找到可用应用。','gray','2DGSZJT','\x20\x20(','780AjHApq','trim','请选择要绑定的应用:','manual','yellow','232397tHSxxR','includes','(跳过,稍后配置)','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','9oMKcMV','4185560etXUxc','290400skUWHw','5034SWXvyI','721qlsRcU','length','564831RidkHl','✎\x20自定义输入\x20appcode','message','map','无法获取远程应用列表,请手动输入。','1416SiIVRt','custom','valid','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','appCode','✎\x20手动输入','appName','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','find','108ulyUsX','2519935iXVJbN','App\x20Code:','skip'];a44_0x414c=function(){return _0x5d9749;};return a44_0x414c();}export async function promptSingleAppSelection(_0x201a51){const _0x416635=a44_0xe5a8,_0x4a9846=[{'name':a44_0x2a8cef[_0x416635(0x1d0)](_0x416635(0x1db)),'value':_0x416635(0x1ce)},{'name':a44_0x2a8cef[_0x416635(0x1d7)](_0x416635(0x1e3)),'value':_0x416635(0x1e8)},..._0x201a51[_0x416635(0x1e5)](_0xb4167=>({'name':_0xb4167['appName']+'\x20\x20'+a44_0x2a8cef[_0x416635(0x1d0)]('('+_0xb4167[_0x416635(0x1eb)]+')'),'value':_0xb4167['appCode']}))],_0x2811b1=await select({'message':_0x416635(0x1d5),'choices':_0x4a9846});if(_0x2811b1===_0x416635(0x1ce))return _0x416635(0x1ce);if(_0x2811b1==='custom')return'custom';return _0x201a51[_0x416635(0x1ca)](_0x4a9971=>_0x4a9971[_0x416635(0x1eb)]===_0x2811b1);}export async function selectSingleAppcode(_0x4f7ac1){const _0xd1631=a44_0xe5a8;if(!_0x4f7ac1)return writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d0)](_0xd1631(0x1c9))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0xb22d6a;try{_0xb22d6a=await withActiveCookie(_0x4f7ac1,()=>listRemoteApps());}catch(_0x3b5453){writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d7)](_0xd1631(0x1e6)));if(_0x3b5453 instanceof Error)writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d0)](_0xd1631(0x1d2)+_0x3b5453[_0xd1631(0x1e4)]+')'));return _fallbackOrSkip();}if(_0xb22d6a[_0xd1631(0x1e1)]===0x0)return writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d7)](_0xd1631(0x1cf))),_fallbackOrSkip();const _0x34eaed=await promptSingleAppSelection(_0xb22d6a);if(_0x34eaed===_0xd1631(0x1ce))return'';if(_0x34eaed===_0xd1631(0x1e8))return promptCustomAppcode();return _0x34eaed[_0xd1631(0x1eb)];}export async function selectMultipleApps(_0x3d7e16){const _0x32a8f7=a44_0xe5a8;writeCliSideChannelLine('正在获取可用应用列表...');let _0x4d04f6;try{_0x4d04f6=await withActiveCookie(_0x3d7e16,()=>listRemoteApps());}catch(_0x319ed0){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x319ed0 instanceof Error)writeCliSideChannelLine(_0x32a8f7(0x1d2)+_0x319ed0['message']+')');return _0x32a8f7(0x1e8);}if(_0x4d04f6[_0x32a8f7(0x1e1)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x32a8f7(0x1e8);return promptAppSelection(_0x4d04f6);}async function _fallbackOrSkip(){const _0x4ff818=a44_0xe5a8,_0x420bda=await select({'message':_0x4ff818(0x1cd),'choices':[{'name':a44_0x2a8cef[_0x4ff818(0x1d0)](_0x4ff818(0x1da)),'value':_0x4ff818(0x1ce)},{'name':a44_0x2a8cef['yellow'](_0x4ff818(0x1ec)),'value':_0x4ff818(0x1d6)}]});if(_0x420bda===_0x4ff818(0x1ce))return'';return promptCustomAppcode();}
1
+ (function(_0x2f3c4c,_0x131885){const _0x537613=a44_0x5c87,_0x2d7d55=_0x2f3c4c();while(!![]){try{const _0x3459ea=-parseInt(_0x537613(0x122))/0x1*(parseInt(_0x537613(0x117))/0x2)+parseInt(_0x537613(0x11c))/0x3+parseInt(_0x537613(0x124))/0x4*(-parseInt(_0x537613(0x133))/0x5)+-parseInt(_0x537613(0x116))/0x6+parseInt(_0x537613(0x129))/0x7+parseInt(_0x537613(0x123))/0x8*(-parseInt(_0x537613(0x12c))/0x9)+parseInt(_0x537613(0x118))/0xa*(parseInt(_0x537613(0x132))/0xb);if(_0x3459ea===_0x131885)break;else _0x2d7d55['push'](_0x2d7d55['shift']());}catch(_0x44484c){_0x2d7d55['push'](_0x2d7d55['shift']());}}}(a44_0x1dba,0xd1830));function a44_0x5c87(_0x42d9c9,_0x440716){_0x42d9c9=_0x42d9c9-0x114;const _0x1dbaa5=a44_0x1dba();let _0x5c8792=_0x1dbaa5[_0x42d9c9];return _0x5c8792;}import{input,checkbox,select}from'@inquirer/prompts';import a44_0x553865 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x42dab8=a44_0x5c87,_0x382dd7=await input({'message':'请输入\x20App\x20Code:','validate':_0x307062=>{const _0x45c7c6=a44_0x5c87,_0x2f0485=validateAppcode(_0x307062[_0x45c7c6(0x115)]());return _0x2f0485['valid']||_0x2f0485[_0x45c7c6(0x11d)]||_0x45c7c6(0x135);}});return _0x382dd7[_0x42dab8(0x115)]();}function a44_0x1dba(){const _0x1e587c=['includes','\x0a未找到可用应用。','trim','5090802WsIYSB','28fFZiQq','170sjmNAv','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','find','正在获取可用应用列表...','3214224tWSvmy','message','gray','appName','未找到可用应用。','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','17285koUrao','2488744GTFwYQ','12328mjSaSD','cyan','skip','custom','App\x20Code:','2219420PUkyyq','yellow','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','36vyfDbv','appCode','✎\x20自定义输入\x20appcode','length','\x0a无法获取远程应用列表,请手动输入。','map','1572461jDHzyr','1015ICyDqf','无法获取远程应用列表,请手动输入。','Invalid\x20App\x20Code'];a44_0x1dba=function(){return _0x1e587c;};return a44_0x1dba();}export async function promptAppSelection(_0x4f4f33){const _0x98b7d9=a44_0x5c87,_0x4fc9c1=[{'name':a44_0x553865[_0x98b7d9(0x12a)](_0x98b7d9(0x12e)),'value':-0x1},..._0x4f4f33['map']((_0x492924,_0x5b8632)=>({'name':_0x492924['appName']+'\x20\x20'+a44_0x553865[_0x98b7d9(0x11e)]('('+_0x492924[_0x98b7d9(0x12d)]+')'),'value':_0x5b8632}))],_0x4b8204=await checkbox({'message':'获取到\x20'+a44_0x553865[_0x98b7d9(0x125)](_0x4f4f33[_0x98b7d9(0x12f)])+_0x98b7d9(0x119),'choices':_0x4fc9c1,'loop':![]});if(_0x4b8204[_0x98b7d9(0x136)](-0x1))return _0x98b7d9(0x127);if(_0x4b8204['length']===0x0)return'custom';return _0x4b8204[_0x98b7d9(0x131)](_0x518ad1=>_0x4f4f33[_0x518ad1]);}export async function promptSingleAppSelection(_0x470aa9){const _0x517fe2=a44_0x5c87,_0x265517=[{'name':a44_0x553865[_0x517fe2(0x11e)](_0x517fe2(0x121)),'value':_0x517fe2(0x126)},{'name':a44_0x553865['yellow'](_0x517fe2(0x12e)),'value':_0x517fe2(0x127)},..._0x470aa9[_0x517fe2(0x131)](_0x4fd5b2=>({'name':_0x4fd5b2[_0x517fe2(0x11f)]+'\x20\x20'+a44_0x553865[_0x517fe2(0x11e)]('('+_0x4fd5b2['appCode']+')'),'value':_0x4fd5b2['appCode']}))],_0x1e5c87=await select({'message':'请选择要绑定的应用:','choices':_0x265517});if(_0x1e5c87===_0x517fe2(0x126))return _0x517fe2(0x126);if(_0x1e5c87===_0x517fe2(0x127))return'custom';return _0x470aa9[_0x517fe2(0x11a)](_0x15cebd=>_0x15cebd[_0x517fe2(0x12d)]===_0x1e5c87);}export async function selectSingleAppcode(_0x49b774){const _0x3cb7c4=a44_0x5c87;if(!_0x49b774)return writeCliSideChannelLine(a44_0x553865['gray'](_0x3cb7c4(0x12b))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4f72c2;try{_0x4f72c2=await withActiveCookie(_0x49b774,()=>listRemoteApps());}catch(_0x29aa9e){writeCliSideChannelLine(a44_0x553865[_0x3cb7c4(0x12a)](_0x3cb7c4(0x134)));if(_0x29aa9e instanceof Error)writeCliSideChannelLine(a44_0x553865[_0x3cb7c4(0x11e)]('\x20\x20('+_0x29aa9e[_0x3cb7c4(0x11d)]+')'));return _fallbackOrSkip();}if(_0x4f72c2[_0x3cb7c4(0x12f)]===0x0)return writeCliSideChannelLine(a44_0x553865['yellow'](_0x3cb7c4(0x120))),_fallbackOrSkip();const _0x5e2cb6=await promptSingleAppSelection(_0x4f72c2);if(_0x5e2cb6===_0x3cb7c4(0x126))return'';if(_0x5e2cb6===_0x3cb7c4(0x127))return promptCustomAppcode();return _0x5e2cb6[_0x3cb7c4(0x12d)];}export async function selectMultipleApps(_0x501ab1){const _0x46e62f=a44_0x5c87;writeCliSideChannelLine(_0x46e62f(0x11b));let _0x37e3ac;try{_0x37e3ac=await withActiveCookie(_0x501ab1,()=>listRemoteApps());}catch(_0xa7d007){writeCliSideChannelLine(_0x46e62f(0x130));if(_0xa7d007 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0xa7d007['message']+')');return _0x46e62f(0x127);}if(_0x37e3ac[_0x46e62f(0x12f)]===0x0)return writeCliSideChannelLine(_0x46e62f(0x114)),_0x46e62f(0x127);return promptAppSelection(_0x37e3ac);}async function _fallbackOrSkip(){const _0x49b572=a44_0x5c87,_0x5497ac=await select({'message':_0x49b572(0x128),'choices':[{'name':a44_0x553865[_0x49b572(0x11e)]('(跳过,稍后配置)'),'value':'skip'},{'name':a44_0x553865[_0x49b572(0x12a)]('✎\x20手动输入'),'value':'manual'}]});if(_0x5497ac===_0x49b572(0x126))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a45_0x3d5e(_0x3abf44,_0x34cc54){_0x3abf44=_0x3abf44-0xab;const _0xfff3cb=a45_0xfff3();let _0x3d5e39=_0xfff3cb[_0x3abf44];return _0x3d5e39;}const a45_0x54f89a=a45_0x3d5e;(function(_0x32d779,_0x4c98f1){const _0x4196ac=a45_0x3d5e,_0xe8bd20=_0x32d779();while(!![]){try{const _0x105e9e=parseInt(_0x4196ac(0xc5))/0x1*(parseInt(_0x4196ac(0xc6))/0x2)+parseInt(_0x4196ac(0xb6))/0x3+parseInt(_0x4196ac(0xb1))/0x4*(parseInt(_0x4196ac(0xc8))/0x5)+-parseInt(_0x4196ac(0xc3))/0x6+-parseInt(_0x4196ac(0xab))/0x7*(-parseInt(_0x4196ac(0xcb))/0x8)+parseInt(_0x4196ac(0xb2))/0x9*(parseInt(_0x4196ac(0xb4))/0xa)+parseInt(_0x4196ac(0xbb))/0xb*(-parseInt(_0x4196ac(0xb0))/0xc);if(_0x105e9e===_0x4c98f1)break;else _0xe8bd20['push'](_0xe8bd20['shift']());}catch(_0x615034){_0xe8bd20['push'](_0xe8bd20['shift']());}}}(a45_0xfff3,0xf2030));function a45_0xfff3(){const _0x424055=['\x20failed.','21ffdrhT','toUpperCase','string','status','errorMessage','488772oIGaWY','698220mZUIul','3463911nGPLgy','trim','20JfwuGb','PROCESSING','1567695TLRWmu','\x20--appcode\x20','\x20is\x20processing.','Task\x20','taskId','1210trYWxm','\x20returned\x20unknown\x20status\x20','has','SUCCESS','\x20--format\x20compress','FAILED','\x20response\x20did\x20not\x20contain\x20a\x20status.','PENDING','180792LgwllV','\x20failed:\x20','1236661DAWCNU','2EkmGdj','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','45gCmFMP','apiError','\x20task\x20status\x20--task-id\x20','3738248dqRVzq','\x20completed\x20successfully.'];a45_0xfff3=function(){return _0x424055;};return a45_0xfff3();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x54f89a(0xbe),a45_0x54f89a(0xc0)]),NON_TERMINAL_STATUSES=new Set([a45_0x54f89a(0xc2),a45_0x54f89a(0xb5)]);export function normalizeAsyncTask(_0x20d119){const _0x28275a=a45_0x54f89a,_0x10c98e=typeof _0x20d119?.[_0x28275a(0xba)]===_0x28275a(0xad)?_0x20d119[_0x28275a(0xba)][_0x28275a(0xb3)]():'';if(!_0x10c98e)throw CliErrors[_0x28275a(0xc9)](_0x28275a(0xc7));const _0x3f9e7c=typeof _0x20d119['status']===_0x28275a(0xad)?_0x20d119[_0x28275a(0xae)][_0x28275a(0xb3)]()[_0x28275a(0xac)]():'';if(!_0x3f9e7c)throw CliErrors[_0x28275a(0xc9)]('Async\x20task\x20'+_0x10c98e+_0x28275a(0xc1));return{'taskId':_0x10c98e,'status':_0x3f9e7c,'errorMessage':typeof _0x20d119['errorMessage']===_0x28275a(0xad)&&_0x20d119['errorMessage'][_0x28275a(0xb3)]()?_0x20d119[_0x28275a(0xaf)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x28275a(0xbd)](_0x3f9e7c),'knownStatus':TERMINAL_STATUSES[_0x28275a(0xbd)](_0x3f9e7c)||NON_TERMINAL_STATUSES['has'](_0x3f9e7c)};}export function buildAsyncTaskStatusCommand(_0x5a4c91,_0x478438){const _0x54e095=a45_0x54f89a;return CLI_BIN_NAME+_0x54e095(0xca)+quoteShellArg(_0x5a4c91)+_0x54e095(0xb7)+quoteShellArg(_0x478438)+_0x54e095(0xbf);}export function asyncTaskMessage(_0x389e7f){const _0x5f3e63=a45_0x54f89a;switch(_0x389e7f[_0x5f3e63(0xae)]){case'PENDING':return _0x5f3e63(0xb9)+_0x389e7f[_0x5f3e63(0xba)]+'\x20is\x20pending.';case _0x5f3e63(0xb5):return'Task\x20'+_0x389e7f[_0x5f3e63(0xba)]+_0x5f3e63(0xb8);case'SUCCESS':return'Task\x20'+_0x389e7f['taskId']+_0x5f3e63(0xcc);case _0x5f3e63(0xc0):return _0x389e7f[_0x5f3e63(0xaf)]?'Task\x20'+_0x389e7f['taskId']+_0x5f3e63(0xc4)+_0x389e7f[_0x5f3e63(0xaf)]:_0x5f3e63(0xb9)+_0x389e7f['taskId']+_0x5f3e63(0xcd);default:return _0x5f3e63(0xb9)+_0x389e7f[_0x5f3e63(0xba)]+_0x5f3e63(0xbc)+_0x389e7f[_0x5f3e63(0xae)]+'.';}}function quoteShellArg(_0x2946b1){return'\x27'+_0x2946b1['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
1
+ const a45_0x53f998=a45_0x7577;function a45_0x3918(){const _0x17adf9=['status','\x20failed.','string','\x20is\x20pending.','PENDING','1082095wWnytj','\x20task\x20status\x20--task-id\x20','\x20returned\x20unknown\x20status\x20','Task\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','errorMessage','2006796nzxqyn','434736YjWhIW','trim','taskId','Async\x20task\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','apiError','672460gOOCgJ','\x20is\x20processing.','\x27\x5c\x27\x27','\x20failed:\x20','3AGVbzc','replace','8941256gTmMMo','has','\x20--format\x20compress','236817LBtIPD','SUCCESS','\x20completed\x20successfully.','2125865JMxedl','PROCESSING'];a45_0x3918=function(){return _0x17adf9;};return a45_0x3918();}(function(_0x52fb4c,_0x4688b8){const _0x24277a=a45_0x7577,_0x5b161d=_0x52fb4c();while(!![]){try{const _0x1380ab=parseInt(_0x24277a(0x1fe))/0x1+parseInt(_0x24277a(0x1f5))/0x2*(-parseInt(_0x24277a(0x1f9))/0x3)+parseInt(_0x24277a(0x1ef))/0x4+-parseInt(_0x24277a(0x1e8))/0x5+-parseInt(_0x24277a(0x1ee))/0x6+-parseInt(_0x24277a(0x201))/0x7+parseInt(_0x24277a(0x1fb))/0x8;if(_0x1380ab===_0x4688b8)break;else _0x5b161d['push'](_0x5b161d['shift']());}catch(_0x106d54){_0x5b161d['push'](_0x5b161d['shift']());}}}(a45_0x3918,0x427dc));function a45_0x7577(_0x318e85,_0x581ca3){_0x318e85=_0x318e85-0x1e5;const _0x391874=a45_0x3918();let _0x7577b0=_0x391874[_0x318e85];return _0x7577b0;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x53f998(0x1ff),'FAILED']),NON_TERMINAL_STATUSES=new Set([a45_0x53f998(0x1e7),'PROCESSING']);export function normalizeAsyncTask(_0x4c6c9d){const _0x49236a=a45_0x53f998,_0x22d5f9=typeof _0x4c6c9d?.[_0x49236a(0x1f1)]===_0x49236a(0x1e5)?_0x4c6c9d[_0x49236a(0x1f1)][_0x49236a(0x1f0)]():'';if(!_0x22d5f9)throw CliErrors[_0x49236a(0x1f4)](_0x49236a(0x1ec));const _0x111f9c=typeof _0x4c6c9d[_0x49236a(0x203)]==='string'?_0x4c6c9d[_0x49236a(0x203)][_0x49236a(0x1f0)]()['toUpperCase']():'';if(!_0x111f9c)throw CliErrors[_0x49236a(0x1f4)](_0x49236a(0x1f2)+_0x22d5f9+_0x49236a(0x1f3));return{'taskId':_0x22d5f9,'status':_0x111f9c,'errorMessage':typeof _0x4c6c9d['errorMessage']==='string'&&_0x4c6c9d[_0x49236a(0x1ed)][_0x49236a(0x1f0)]()?_0x4c6c9d[_0x49236a(0x1ed)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x49236a(0x1fc)](_0x111f9c),'knownStatus':TERMINAL_STATUSES[_0x49236a(0x1fc)](_0x111f9c)||NON_TERMINAL_STATUSES['has'](_0x111f9c)};}export function buildAsyncTaskStatusCommand(_0x5e6ca0,_0x401ce4){const _0x1c1d86=a45_0x53f998;return CLI_BIN_NAME+_0x1c1d86(0x1e9)+quoteShellArg(_0x5e6ca0)+'\x20--appcode\x20'+quoteShellArg(_0x401ce4)+_0x1c1d86(0x1fd);}export function asyncTaskMessage(_0x123c5e){const _0x118e9a=a45_0x53f998;switch(_0x123c5e['status']){case _0x118e9a(0x1e7):return _0x118e9a(0x1eb)+_0x123c5e[_0x118e9a(0x1f1)]+_0x118e9a(0x1e6);case _0x118e9a(0x202):return _0x118e9a(0x1eb)+_0x123c5e['taskId']+_0x118e9a(0x1f6);case _0x118e9a(0x1ff):return'Task\x20'+_0x123c5e[_0x118e9a(0x1f1)]+_0x118e9a(0x200);case'FAILED':return _0x123c5e['errorMessage']?_0x118e9a(0x1eb)+_0x123c5e[_0x118e9a(0x1f1)]+_0x118e9a(0x1f8)+_0x123c5e[_0x118e9a(0x1ed)]:_0x118e9a(0x1eb)+_0x123c5e[_0x118e9a(0x1f1)]+_0x118e9a(0x204);default:return _0x118e9a(0x1eb)+_0x123c5e[_0x118e9a(0x1f1)]+_0x118e9a(0x1ea)+_0x123c5e[_0x118e9a(0x203)]+'.';}}function quoteShellArg(_0x28d6e9){const _0x26a031=a45_0x53f998;return'\x27'+_0x28d6e9[_0x26a031(0x1fa)](/'/g,_0x26a031(0x1f7))+'\x27';}
@@ -1 +1 @@
1
- function a46_0xeea2(_0x2f264f,_0x1857fc){_0x2f264f=_0x2f264f-0xc9;var _0x1b9a20=a46_0x1b9a();var _0xeea223=_0x1b9a20[_0x2f264f];return _0xeea223;}function a46_0x1b9a(){var _0x442a81=['description','1352760vfuExx','4mdulHX','5jLoIfm','2573046TuurQJ','20SyuWnH','url','406idpAse','2128320MLyVPr','1689830cUZLbj','2641529OwNpbN','8232ydYRnD','6iQmQUm','124342BiuwAX'];a46_0x1b9a=function(){return _0x442a81;};return a46_0x1b9a();}(function(_0x1f2cf9,_0x2e35c5){var _0x2ab2b5=a46_0xeea2,_0x15b822=_0x1f2cf9();while(!![]){try{var _0x2bb213=-parseInt(_0x2ab2b5(0xd1))/0x1*(-parseInt(_0x2ab2b5(0xcd))/0x2)+-parseInt(_0x2ab2b5(0xcf))/0x3*(parseInt(_0x2ab2b5(0xd0))/0x4)+parseInt(_0x2ab2b5(0xc9))/0x5*(parseInt(_0x2ab2b5(0xcc))/0x6)+parseInt(_0x2ab2b5(0xd5))/0x7*(parseInt(_0x2ab2b5(0xcb))/0x8)+parseInt(_0x2ab2b5(0xd2))/0x9+parseInt(_0x2ab2b5(0xd3))/0xa*(-parseInt(_0x2ab2b5(0xca))/0xb)+parseInt(_0x2ab2b5(0xd6))/0xc;if(_0x2bb213===_0x2e35c5)break;else _0x15b822['push'](_0x15b822['shift']());}catch(_0x16fd16){_0x15b822['push'](_0x15b822['shift']());}}}(a46_0x1b9a,0x3abaf));export function asDryRunResult(_0x263e7f,_0x504a7b){var _0x5137f7=a46_0xeea2;return Object['defineProperties'](_0x263e7f,{'method':{'value':_0x504a7b['method'],'enumerable':![]},'url':{'value':_0x504a7b[_0x5137f7(0xd4)],'enumerable':![]},..._0x504a7b['description']?{'description':{'value':_0x504a7b[_0x5137f7(0xce)],'enumerable':![]}}:{}});}
1
+ function a46_0x27a1(_0x4da274,_0x17abc4){_0x4da274=_0x4da274-0x136;var _0x415cfa=a46_0x415c();var _0x27a1bc=_0x415cfa[_0x4da274];return _0x27a1bc;}(function(_0x11b267,_0x1294d3){var _0x1c518e=a46_0x27a1,_0x484f9d=_0x11b267();while(!![]){try{var _0x56ebd3=parseInt(_0x1c518e(0x137))/0x1*(parseInt(_0x1c518e(0x142))/0x2)+parseInt(_0x1c518e(0x13a))/0x3+parseInt(_0x1c518e(0x139))/0x4*(parseInt(_0x1c518e(0x141))/0x5)+parseInt(_0x1c518e(0x13b))/0x6+parseInt(_0x1c518e(0x13c))/0x7+parseInt(_0x1c518e(0x13d))/0x8+-parseInt(_0x1c518e(0x13f))/0x9;if(_0x56ebd3===_0x1294d3)break;else _0x484f9d['push'](_0x484f9d['shift']());}catch(_0x212e36){_0x484f9d['push'](_0x484f9d['shift']());}}}(a46_0x415c,0xec872));export function asDryRunResult(_0x5d7490,_0x14afdd){var _0x395ea9=a46_0x27a1;return Object[_0x395ea9(0x136)](_0x5d7490,{'method':{'value':_0x14afdd[_0x395ea9(0x138)],'enumerable':![]},'url':{'value':_0x14afdd[_0x395ea9(0x13e)],'enumerable':![]},..._0x14afdd[_0x395ea9(0x140)]?{'description':{'value':_0x14afdd['description'],'enumerable':![]}}:{}});}function a46_0x415c(){var _0x8a28d4=['26rCPBWR','defineProperties','114445YvkzVe','method','4HsMNAM','1847055pIWBnD','8050824SJyiCz','13316835QcXcBI','1028856uqHUIw','url','50650263JbJNfD','description','5601695sSYDDE'];a46_0x415c=function(){return _0x8a28d4;};return a46_0x415c();}
@@ -1 +1 @@
1
- const a47_0x1551df=a47_0x3a36;(function(_0x453856,_0x21e499){const _0x2e45ca=a47_0x3a36,_0x3e1082=_0x453856();while(!![]){try{const _0x5eb36c=-parseInt(_0x2e45ca(0x1d9))/0x1*(parseInt(_0x2e45ca(0x1df))/0x2)+parseInt(_0x2e45ca(0x1e1))/0x3+parseInt(_0x2e45ca(0x1e9))/0x4+parseInt(_0x2e45ca(0x1d8))/0x5*(parseInt(_0x2e45ca(0x1e8))/0x6)+parseInt(_0x2e45ca(0x1ec))/0x7+-parseInt(_0x2e45ca(0x1dc))/0x8+-parseInt(_0x2e45ca(0x1dd))/0x9;if(_0x5eb36c===_0x21e499)break;else _0x3e1082['push'](_0x3e1082['shift']());}catch(_0x1a95ac){_0x3e1082['push'](_0x3e1082['shift']());}}}(a47_0x206c,0x91183));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x1551df(0x1e3)};export const CODE_FLAG={'name':a47_0x1551df(0x1da),'type':a47_0x1551df(0x1eb),'required':!![],'description':a47_0x1551df(0x1e2),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1551df(0x1e4),'description':a47_0x1551df(0x1e2)};export const SQLCODE_FLAG={'name':a47_0x1551df(0x1ee),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1551df(0x1e7),'type':a47_0x1551df(0x1eb),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x1551df(0x1ea)};function a47_0x3a36(_0x46d49b,_0x4ab590){_0x46d49b=_0x46d49b-0x1d8;const _0x206c2d=a47_0x206c();let _0x3a36d9=_0x206c2d[_0x46d49b];return _0x3a36d9;}function a47_0x206c(){const _0x4ee2ef=['252364xWWnCO','skip-connection-test','2904999MMyAnj','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','datasetcode','POSTGRESQL','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','appcode','6yHQxAx','2335360BNzsVD','App\x20code\x20(e.g.\x20app-xxxxx)','string','79821vdfqHX','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','sqlcode','boolean','1652465hHaucy','1CEASKc','code','MYSQL','2277608uNtuly','7999911bGtMMy','Database\x20product\x20type'];a47_0x206c=function(){return _0x4ee2ef;};return a47_0x206c();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x1551df(0x1ed)};export const DB_TYPE_FLAG={'name':'dbtype','type':a47_0x1551df(0x1eb),'required':!![],'description':a47_0x1551df(0x1de),'enum':[a47_0x1551df(0x1db),a47_0x1551df(0x1e5)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x1551df(0x1e0),'type':a47_0x1551df(0x1ef),'description':a47_0x1551df(0x1e6)};
1
+ const a47_0x1cdba2=a47_0x3261;(function(_0x58d7a6,_0x2a2163){const _0x436dba=a47_0x3261,_0x3a5cd9=_0x58d7a6();while(!![]){try{const _0x1ceeb0=parseInt(_0x436dba(0x1ee))/0x1+-parseInt(_0x436dba(0x1ed))/0x2+-parseInt(_0x436dba(0x1e9))/0x3*(parseInt(_0x436dba(0x1ef))/0x4)+parseInt(_0x436dba(0x1d9))/0x5*(parseInt(_0x436dba(0x1e8))/0x6)+parseInt(_0x436dba(0x1e4))/0x7*(-parseInt(_0x436dba(0x1eb))/0x8)+parseInt(_0x436dba(0x1e6))/0x9*(parseInt(_0x436dba(0x1df))/0xa)+parseInt(_0x436dba(0x1e3))/0xb;if(_0x1ceeb0===_0x2a2163)break;else _0x3a5cd9['push'](_0x3a5cd9['shift']());}catch(_0x26ebab){_0x3a5cd9['push'](_0x3a5cd9['shift']());}}}(a47_0x3ca1,0xc0d2a));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':a47_0x1cdba2(0x1ea),'type':a47_0x1cdba2(0x1e2),'required':!![],'description':a47_0x1cdba2(0x1e5),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1cdba2(0x1da),'description':a47_0x1cdba2(0x1e5)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x1cdba2(0x1e2),'required':!![],'description':a47_0x1cdba2(0x1db),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x1cdba2(0x1dc)}};function a47_0x3261(_0x368703,_0x29570a){_0x368703=_0x368703-0x1d8;const _0x3ca131=a47_0x3ca1();let _0x32617f=_0x3ca131[_0x368703];return _0x32617f;}export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1cdba2(0x1e1),'type':'string','required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};function a47_0x3ca1(){const _0x3361ac=['App\x20code\x20(e.g.\x20app-xxxxx)','4317875yLTzIN','datasetcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','16210xvkAYs','skip-connection-test','appcode','string','5439720TRoaRH','27286YzJvcy','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','3015UkKQEw','Database\x20product\x20type','6mmgJCt','6uySftk','code','2504eeXciy','POSTGRESQL','3502GGNdVt','800649hSSCwx','1380304MzLAZb'];a47_0x3ca1=function(){return _0x3361ac;};return a47_0x3ca1();}export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x1cdba2(0x1d8)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x1cdba2(0x1de)};export const DB_TYPE_FLAG={'name':'dbtype','type':'string','required':!![],'description':a47_0x1cdba2(0x1e7),'enum':['MYSQL',a47_0x1cdba2(0x1ec)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x1cdba2(0x1e0),'type':'boolean','description':a47_0x1cdba2(0x1dd)};
@@ -1 +1 @@
1
- (function(_0x49e605,_0x410bc9){const _0x4071e5=a48_0x3199,_0x27d73f=_0x49e605();while(!![]){try{const _0x136d93=-parseInt(_0x4071e5(0x190))/0x1*(parseInt(_0x4071e5(0x18f))/0x2)+parseInt(_0x4071e5(0x18a))/0x3+-parseInt(_0x4071e5(0x182))/0x4*(parseInt(_0x4071e5(0x191))/0x5)+parseInt(_0x4071e5(0x18e))/0x6*(-parseInt(_0x4071e5(0x187))/0x7)+parseInt(_0x4071e5(0x192))/0x8+-parseInt(_0x4071e5(0x18c))/0x9+-parseInt(_0x4071e5(0x181))/0xa*(-parseInt(_0x4071e5(0x184))/0xb);if(_0x136d93===_0x410bc9)break;else _0x27d73f['push'](_0x27d73f['shift']());}catch(_0x754838){_0x27d73f['push'](_0x27d73f['shift']());}}}(a48_0x21c5,0x273e9));import{existsSync,statSync}from'node:fs';function a48_0x21c5(){const _0x44af5d=['\x20MB','1822752RLpenA','validation','239784prNQbz','2GWqiTw','11901hbPxxG','5FqzVzv','2296688VVuhGM','ceil','5603820KRTjcT','1236724GkjsRe','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','11vacYLn','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','42wlIQkv','size','toFixed','230013zvAmJQ'];a48_0x21c5=function(){return _0x44af5d;};return a48_0x21c5();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x3199(_0x3ef1f0,_0x339125){_0x3ef1f0=_0x3ef1f0-0x180;const _0x21c5b7=a48_0x21c5();let _0x3199a4=_0x21c5b7[_0x3ef1f0];return _0x3199a4;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x311657){const _0xa84153=a48_0x3199;if(_0x311657>=BYTES_PER_MB){const _0x111d39=Math[_0xa84153(0x180)](_0x311657/BYTES_PER_MB*0x64)/0x64;return _0x111d39[_0xa84153(0x189)](0x2)+_0xa84153(0x18b);}return _0x311657+'\x20B';}export function requireDevelopmentUploadFile(_0x4f26c5,_0x1330a2){const _0x2468a1=a48_0x3199,_0x469c83=_0x4f26c5[_0x2468a1(0x186)]();if(!_0x469c83)throw CliErrors[_0x2468a1(0x18d)](_0x1330a2+'\x20path\x20is\x20required.');if(!existsSync(_0x469c83))throw CliErrors[_0x2468a1(0x18d)]('File\x20not\x20found:\x20'+_0x469c83);const _0x4ce6ad=statSync(_0x469c83);if(!_0x4ce6ad['isFile']())throw CliErrors[_0x2468a1(0x18d)](_0x2468a1(0x185)+_0x469c83);if(_0x4ce6ad[_0x2468a1(0x188)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2468a1(0x18d)](_0x2468a1(0x183)+_0x469c83+'\x20('+formatBytes(_0x4ce6ad[_0x2468a1(0x188)])+')');return{'path':_0x469c83,'size':_0x4ce6ad[_0x2468a1(0x188)]};}
1
+ (function(_0x53699b,_0x51e583){const _0x3915c4=a48_0x3654,_0x44487f=_0x53699b();while(!![]){try{const _0x4d7534=parseInt(_0x3915c4(0x168))/0x1+parseInt(_0x3915c4(0x161))/0x2*(parseInt(_0x3915c4(0x16d))/0x3)+-parseInt(_0x3915c4(0x16e))/0x4*(parseInt(_0x3915c4(0x163))/0x5)+-parseInt(_0x3915c4(0x160))/0x6+parseInt(_0x3915c4(0x165))/0x7+-parseInt(_0x3915c4(0x166))/0x8+parseInt(_0x3915c4(0x167))/0x9*(parseInt(_0x3915c4(0x16a))/0xa);if(_0x4d7534===_0x51e583)break;else _0x44487f['push'](_0x44487f['shift']());}catch(_0x2c20bc){_0x44487f['push'](_0x44487f['shift']());}}}(a48_0x5aaa,0x8af72));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x3654(_0x40f281,_0x23ec6d){_0x40f281=_0x40f281-0x15c;const _0x5aaadf=a48_0x5aaa();let _0x3654e7=_0x5aaadf[_0x40f281];return _0x3654e7;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3bf60c){const _0x4e6255=a48_0x3654;if(_0x3bf60c>=BYTES_PER_MB){const _0x3cafc2=Math[_0x4e6255(0x164)](_0x3bf60c/BYTES_PER_MB*0x64)/0x64;return _0x3cafc2[_0x4e6255(0x169)](0x2)+_0x4e6255(0x15e);}return _0x3bf60c+'\x20B';}function a48_0x5aaa(){const _0x20f8b1=['File\x20not\x20found:\x20','1337900GCcHAR','ceil','674093MGIrvi','1195736bIBWBR','9dmavWc','1053447sffSVn','toFixed','4614860FAODiz','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','3YXYJIU','4pbWEei','\x20path\x20is\x20required.','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','isFile','validation','\x20MB','size','3918096IwbtuY','56066hsqpCo'];a48_0x5aaa=function(){return _0x20f8b1;};return a48_0x5aaa();}export function requireDevelopmentUploadFile(_0x4333d5,_0x510f54){const _0xdc68c2=a48_0x3654,_0x106208=_0x4333d5[_0xdc68c2(0x16c)]();if(!_0x106208)throw CliErrors[_0xdc68c2(0x15d)](_0x510f54+_0xdc68c2(0x16f));if(!existsSync(_0x106208))throw CliErrors[_0xdc68c2(0x15d)](_0xdc68c2(0x162)+_0x106208);const _0xe09784=statSync(_0x106208);if(!_0xe09784[_0xdc68c2(0x15c)]())throw CliErrors[_0xdc68c2(0x15d)](_0xdc68c2(0x16b)+_0x106208);if(_0xe09784['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0xdc68c2(0x170)+_0x106208+'\x20('+formatBytes(_0xe09784[_0xdc68c2(0x15f)])+')');return{'path':_0x106208,'size':_0xe09784['size']};}