@lovrabet/rabetbase-cli 2.5.0-beta.5 → 2.5.0-beta.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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.js +1 -1
  87. package/lib/commands/db/diff-refresh-status.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/table-diff-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/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -1
  103. package/lib/commands/kb/delete.js +1 -1
  104. package/lib/commands/kb/detail.js +1 -1
  105. package/lib/commands/kb/index.js +1 -1
  106. package/lib/commands/kb/list.js +1 -1
  107. package/lib/commands/kb/search.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/domain-config.js +1 -1
  207. package/lib/config/schema.js +1 -1
  208. package/lib/constant/cdn.js +1 -1
  209. package/lib/constant/cli.js +1 -1
  210. package/lib/constant/defaults.js +1 -1
  211. package/lib/constant/domain.js +1 -1
  212. package/lib/constant/env.js +1 -1
  213. package/lib/constant/output.js +1 -1
  214. package/lib/constant/paths.js +1 -1
  215. package/lib/constant/region.js +1 -1
  216. package/lib/constant/risk.js +1 -1
  217. package/lib/context/app-resolver.js +1 -1
  218. package/lib/context/auth-resolver.js +1 -1
  219. package/lib/context/config-loader.js +1 -1
  220. package/lib/context.js +1 -1
  221. package/lib/core/alias-resolver.js +1 -1
  222. package/lib/core/api-client.js +1 -1
  223. package/lib/core/bff/config.js +1 -1
  224. package/lib/core/bff/file-system.js +1 -1
  225. package/lib/core/bff/hash.js +1 -1
  226. package/lib/core/bff/lock.js +1 -1
  227. package/lib/core/bff/utils.js +1 -1
  228. package/lib/core/db-resolver.js +1 -1
  229. package/lib/core/page/file-system.js +1 -1
  230. package/lib/core/page/hash.js +1 -1
  231. package/lib/core/page/lock.js +1 -1
  232. package/lib/core/sql-index-auditor.js +1 -1
  233. package/lib/core/sql-sync/config.js +1 -1
  234. package/lib/core/sql-sync/file-system.js +1 -1
  235. package/lib/core/sql-sync/hash.js +1 -1
  236. package/lib/core/sql-sync/lock.js +1 -1
  237. package/lib/core/sql-sync/utils.js +1 -1
  238. package/lib/core/sql-validator.js +1 -1
  239. package/lib/errors.js +1 -1
  240. package/lib/framework/build-all-flags.js +1 -1
  241. package/lib/framework/error-output.js +1 -1
  242. package/lib/framework/explicit-yes.js +1 -1
  243. package/lib/framework/flags.js +1 -1
  244. package/lib/framework/help.js +1 -1
  245. package/lib/framework/index.js +1 -1
  246. package/lib/framework/output.js +1 -1
  247. package/lib/framework/response.js +1 -1
  248. package/lib/framework/runner-alias.js +1 -1
  249. package/lib/framework/runner.js +1 -1
  250. package/lib/framework/schema-export.js +1 -1
  251. package/lib/framework/types.js +1 -1
  252. package/lib/generated/build-info.d.ts +4 -4
  253. package/lib/generated/build-info.js +1 -1
  254. package/lib/help.js +1 -1
  255. package/lib/postinstall.js +1 -1
  256. package/lib/runtime/confirmation.js +1 -1
  257. package/lib/runtime/event.js +1 -1
  258. package/lib/runtime/index.js +1 -1
  259. package/lib/runtime/queue.js +1 -1
  260. package/lib/runtime/resolve.js +1 -1
  261. package/lib/skills/builtin-skill.js +1 -1
  262. package/lib/skills/main.js +1 -1
  263. package/lib/skills/npx-skills-add.js +1 -1
  264. package/lib/skills/skill-presence.js +1 -1
  265. package/lib/telemetry/cli-command-trace.js +1 -1
  266. package/lib/telemetry/cli-help-trace.js +1 -1
  267. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  268. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  269. package/lib/telemetry/send-cli-trace-log.js +1 -1
  270. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  271. package/lib/utils/ai_config.js +1 -1
  272. package/lib/utils/apply-jq-filter.js +1 -1
  273. package/lib/utils/cdn-config.js +1 -1
  274. package/lib/utils/check-sdk-version.js +1 -1
  275. package/lib/utils/cli-version-check.js +1 -1
  276. package/lib/utils/cli-version-policy.js +1 -1
  277. package/lib/utils/config.js +1 -1
  278. package/lib/utils/entity-with-id.js +1 -1
  279. package/lib/utils/file-utils.js +1 -1
  280. package/lib/utils/guides-cdn.js +1 -1
  281. package/lib/utils/http-client.js +1 -1
  282. package/lib/utils/is-non-interactive.js +1 -1
  283. package/lib/utils/logger.js +1 -1
  284. package/lib/utils/params.js +1 -1
  285. package/lib/utils/platform.js +1 -1
  286. package/lib/utils/sleep.js +1 -1
  287. package/lib/utils/template-replacer.js +1 -1
  288. package/lib/utils/update-notice.js +1 -1
  289. package/lib/utils/version.js +1 -1
  290. package/lib/utils/with-active-cookie.js +1 -1
  291. package/lib/utils/write-cli-side-channel.js +1 -1
  292. package/package.json +1 -1
  293. package/skills/rabetbase/SKILL.md +2 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a34_0x282b(){const _0x2e8943=['11101825LoEtZU','115Qaocje','2jLHSeW','7986663yNgawF','8613312AdqtYO','16izmoga','37264JSpJQO','1930209cFsqIk','976617oEqiJs','1538860RTCzpY'];a34_0x282b=function(){return _0x2e8943;};return a34_0x282b();}(function(_0x1f30be,_0x1340ca){const _0x5241c6=a34_0x4c1e,_0x47979a=_0x1f30be();while(!![]){try{const _0xbd3964=-parseInt(_0x5241c6(0x15a))/0x1+parseInt(_0x5241c6(0x154))/0x2*(parseInt(_0x5241c6(0x159))/0x3)+-parseInt(_0x5241c6(0x158))/0x4*(parseInt(_0x5241c6(0x153))/0x5)+parseInt(_0x5241c6(0x156))/0x6+-parseInt(_0x5241c6(0x152))/0x7+parseInt(_0x5241c6(0x157))/0x8*(parseInt(_0x5241c6(0x155))/0x9)+-parseInt(_0x5241c6(0x151))/0xa;if(_0xbd3964===_0x1340ca)break;else _0x47979a['push'](_0x47979a['shift']());}catch(_0x9c6368){_0x47979a['push'](_0x47979a['shift']());}}}(a34_0x282b,0xe158f));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';function a34_0x4c1e(_0x308bdb,_0x194c6c){_0x308bdb=_0x308bdb-0x151;const _0x282bf6=a34_0x282b();let _0x4c1e9e=_0x282bf6[_0x308bdb];return _0x4c1e9e;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x11b97c,_0x155d80){const _0xe82299=a34_0x1ec7,_0x2172d3=_0x11b97c();while(!![]){try{const _0x53cdc7=-parseInt(_0xe82299(0xe2))/0x1+-parseInt(_0xe82299(0xde))/0x2*(parseInt(_0xe82299(0xe3))/0x3)+-parseInt(_0xe82299(0xdf))/0x4*(-parseInt(_0xe82299(0xdd))/0x5)+parseInt(_0xe82299(0xe1))/0x6*(parseInt(_0xe82299(0xe7))/0x7)+-parseInt(_0xe82299(0xe5))/0x8+-parseInt(_0xe82299(0xe0))/0x9+parseInt(_0xe82299(0xe4))/0xa*(parseInt(_0xe82299(0xe6))/0xb);if(_0x53cdc7===_0x155d80)break;else _0x2172d3['push'](_0x2172d3['shift']());}catch(_0x5b1915){_0x2172d3['push'](_0x2172d3['shift']());}}}(a34_0x1a5f,0x2de44));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';function a34_0x1ec7(_0x22aa1a,_0x4f7b57){_0x22aa1a=_0x22aa1a-0xdd;const _0x1a5f41=a34_0x1a5f();let _0x1ec7a7=_0x1a5f41[_0x22aa1a];return _0x1ec7a7;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a34_0x1a5f(){const _0x558307=['3DKXjEn','110bObYyI','1531200jhNxox','650639yZlwot','315zpGvbv','72665ZidTYu','41598HQnuYX','56sHmHcy','1753308PXdcTY','564iJnrSe','263348VBAmxA'];a34_0x1a5f=function(){return _0x558307;};return a34_0x1a5f();}
@@ -1 +1 @@
1
- const a35_0x3dab95=a35_0x2ee8;function a35_0x2ee8(_0xd11119,_0x459526){_0xd11119=_0xd11119-0x1bb;const _0x2b4023=a35_0x2b40();let _0x2ee82d=_0x2b4023[_0xd11119];return _0x2ee82d;}(function(_0x17f1c8,_0x4f2b5f){const _0x4783e1=a35_0x2ee8,_0x4b7f61=_0x17f1c8();while(!![]){try{const _0x43f9b5=parseInt(_0x4783e1(0x1cc))/0x1+-parseInt(_0x4783e1(0x1cb))/0x2*(-parseInt(_0x4783e1(0x1cd))/0x3)+parseInt(_0x4783e1(0x1c3))/0x4*(parseInt(_0x4783e1(0x1bb))/0x5)+-parseInt(_0x4783e1(0x1d0))/0x6+parseInt(_0x4783e1(0x1d8))/0x7+parseInt(_0x4783e1(0x1bf))/0x8*(-parseInt(_0x4783e1(0x1c5))/0x9)+parseInt(_0x4783e1(0x1bd))/0xa*(-parseInt(_0x4783e1(0x1ca))/0xb);if(_0x43f9b5===_0x4f2b5f)break;else _0x4b7f61['push'](_0x4b7f61['shift']());}catch(_0x5b5c93){_0x4b7f61['push'](_0x4b7f61['shift']());}}}(a35_0x2b40,0xc8e76));function a35_0x2b40(){const _0x539030=['5zLErfw','map','9687220hGYLAE','appCode','169160wOPGpb','string','No\x20Backend\x20Function\x20scripts\x20found.','type','3092476gwqRqI','ENDPOINT','666HzrihX','COMMON','boolean','length','description','11GFbFEN','135302PkaEEY','1156433sVKTky','69bmotfd','functionName','bff','8647908XzsIDS','name','Filter\x20by\x20script\x20name','verbose','scriptType','read','str','list','9185029jSaAep'];a35_0x2b40=function(){return _0x539030;};return a35_0x2b40();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x3dab95(0x1cf),'command':a35_0x3dab95(0x1d7),'description':'List\x20Backend\x20Function\x20scripts','risk':a35_0x3dab95(0x1d5),'flags':[{'name':'type','type':'string','description':'Script\x20type\x20filter','default':a35_0x3dab95(0x1c4),'enum':[a35_0x3dab95(0x1c4),a35_0x3dab95(0x1c6)]},{'name':a35_0x3dab95(0x1d1),'type':a35_0x3dab95(0x1c0),'description':a35_0x3dab95(0x1d2)},{'name':'verbose','type':a35_0x3dab95(0x1c7),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x186c75){const _0x1c5d56=a35_0x3dab95,_0x3ca697=await listBffScripts(_0x186c75[_0x1c5d56(0x1be)],_0x186c75[_0x1c5d56(0x1d6)](_0x1c5d56(0x1c2)),{'scriptName':_0x186c75[_0x1c5d56(0x1d6)](_0x1c5d56(0x1d1))||undefined}),_0x37a7ac=_0x186c75['bool'](_0x1c5d56(0x1d3));return{'ok':!![],'data':_0x37a7ac?_0x3ca697:_0x3ca697[_0x1c5d56(0x1bc)](_0x210c22=>({'id':_0x210c22['id'],'functionName':_0x210c22[_0x1c5d56(0x1ce)]??'','description':_0x210c22[_0x1c5d56(0x1c9)]||'(unnamed)','scriptType':_0x210c22[_0x1c5d56(0x1d4)]})),'message':_0x3ca697[_0x1c5d56(0x1c8)]===0x0?_0x1c5d56(0x1c1):undefined};}};
1
+ const a35_0x3b055c=a35_0x317e;function a35_0x317e(_0xf2c65e,_0x1cf6c3){_0xf2c65e=_0xf2c65e-0xc6;const _0x241f5e=a35_0x241f();let _0x317ea2=_0x241f5e[_0xf2c65e];return _0x317ea2;}(function(_0x4f0ea3,_0x359578){const _0x926591=a35_0x317e,_0x209850=_0x4f0ea3();while(!![]){try{const _0x570b2b=-parseInt(_0x926591(0xc9))/0x1*(-parseInt(_0x926591(0xce))/0x2)+-parseInt(_0x926591(0xdd))/0x3*(parseInt(_0x926591(0xe0))/0x4)+-parseInt(_0x926591(0xe5))/0x5+parseInt(_0x926591(0xe2))/0x6+-parseInt(_0x926591(0xe3))/0x7+parseInt(_0x926591(0xd6))/0x8+parseInt(_0x926591(0xe1))/0x9*(-parseInt(_0x926591(0xde))/0xa);if(_0x570b2b===_0x359578)break;else _0x209850['push'](_0x209850['shift']());}catch(_0x13d480){_0x209850['push'](_0x209850['shift']());}}}(a35_0x241f,0x7d7d6));import{listBffScripts}from'../../core/api-client.js';function a35_0x241f(){const _0x4b4bd5=['functionName','list','Return\x20full\x20script\x20objects','List\x20Backend\x20Function\x20scripts','read','bff','6916336RjxjuP','string','scriptType','ENDPOINT','description','type','map','390qNAmxh','5180pzYcjm','Script\x20type\x20filter','5288OwzGEO','8091MuRbEi','2033742ixpgkR','1099273hisiXr','length','4161150UPVRmf','Filter\x20by\x20script\x20name','appCode','verbose','468659hGliEe','bool','COMMON','No\x20Backend\x20Function\x20scripts\x20found.','(unnamed)','4kfdjhU','str'];a35_0x241f=function(){return _0x4b4bd5;};return a35_0x241f();}export const bffList={'service':a35_0x3b055c(0xd5),'command':a35_0x3b055c(0xd1),'description':a35_0x3b055c(0xd3),'risk':a35_0x3b055c(0xd4),'flags':[{'name':a35_0x3b055c(0xdb),'type':a35_0x3b055c(0xd7),'description':a35_0x3b055c(0xdf),'default':a35_0x3b055c(0xd9),'enum':[a35_0x3b055c(0xd9),a35_0x3b055c(0xcb)]},{'name':'name','type':a35_0x3b055c(0xd7),'description':a35_0x3b055c(0xc6)},{'name':'verbose','type':'boolean','description':a35_0x3b055c(0xd2)}],async 'execute'(_0x198b7e){const _0x395de3=a35_0x3b055c,_0x34fa3e=await listBffScripts(_0x198b7e[_0x395de3(0xc7)],_0x198b7e[_0x395de3(0xcf)](_0x395de3(0xdb)),{'scriptName':_0x198b7e['str']('name')||undefined}),_0x818bc4=_0x198b7e[_0x395de3(0xca)](_0x395de3(0xc8));return{'ok':!![],'data':_0x818bc4?_0x34fa3e:_0x34fa3e[_0x395de3(0xdc)](_0x35a345=>({'id':_0x35a345['id'],'functionName':_0x35a345[_0x395de3(0xd0)]??'','description':_0x35a345[_0x395de3(0xda)]||_0x395de3(0xcd),'scriptType':_0x35a345[_0x395de3(0xd8)]})),'message':_0x34fa3e[_0x395de3(0xe4)]===0x0?_0x395de3(0xcc):undefined};}};
@@ -1 +1 @@
1
- const a36_0x12dc3f=a36_0x1585;(function(_0x17a050,_0x4f0650){const _0x255c97=a36_0x1585,_0x2734de=_0x17a050();while(!![]){try{const _0x4e3d0a=-parseInt(_0x255c97(0x1d7))/0x1*(-parseInt(_0x255c97(0x1f2))/0x2)+parseInt(_0x255c97(0x205))/0x3*(-parseInt(_0x255c97(0x1ff))/0x4)+parseInt(_0x255c97(0x1e7))/0x5*(-parseInt(_0x255c97(0x1eb))/0x6)+parseInt(_0x255c97(0x1cb))/0x7+-parseInt(_0x255c97(0x206))/0x8+-parseInt(_0x255c97(0x1e9))/0x9*(parseInt(_0x255c97(0x201))/0xa)+parseInt(_0x255c97(0x1ef))/0xb*(parseInt(_0x255c97(0x1c5))/0xc);if(_0x4e3d0a===_0x4f0650)break;else _0x2734de['push'](_0x2734de['shift']());}catch(_0x18b24a){_0x2734de['push'](_0x2734de['shift']());}}}(a36_0x2763,0xea4d0));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';function a36_0x1585(_0x156520,_0x323079){_0x156520=_0x156520-0x1c5;const _0x2763ab=a36_0x2763();let _0x158595=_0x2763ab[_0x156520];return _0x158595;}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':a36_0x12dc3f(0x1d4),'command':a36_0x12dc3f(0x1df),'description':a36_0x12dc3f(0x1ee),'risk':a36_0x12dc3f(0x1f6),'flags':[{'name':'type','type':'string','description':a36_0x12dc3f(0x1c8),'enum':[a36_0x12dc3f(0x1da),a36_0x12dc3f(0x1ca),a36_0x12dc3f(0x1e4)]},{'name':'force','type':a36_0x12dc3f(0x20c),'description':a36_0x12dc3f(0x208)}],async 'dryRun'(_0x5ca0c7){const _0x18d9b7=a36_0x12dc3f,_0xa8dd37=loadBffProjectConfig(_0x5ca0c7[_0x18d9b7(0x1d8)]),_0x5d7d97=await readBffLockFile(_0xa8dd37[_0x18d9b7(0x1fb)]),{appLock:_0x25e150}=ensureLockScope(_0x5d7d97??createEmptyBffLock(),_0x5ca0c7[_0x18d9b7(0x1d8)],_0xa8dd37['scriptsRoot'],_0x18d9b7(0x1df)),_0x380aae=normalizeBffType(_0x5ca0c7[_0x18d9b7(0x1e2)]('type'))??undefined,_0x482991=buildDatasetCodeToAliasMap(_0x5ca0c7['apiDir'],_0x5ca0c7[_0x18d9b7(0x1d8)]),[_0x1b3eb1,_0x56a30d]=await Promise[_0x18d9b7(0x1cf)]([listBffScripts(_0x5ca0c7['appCode'],_0x380aae),getBffScriptStatistics(_0x5ca0c7[_0x18d9b7(0x1d8)])]),_0x5b0245=createHookLocationMap(_0x56a30d),_0x1a5fc7=[];for(const _0x5a85b8 of _0x1b3eb1){const _0x1a2f27=resolveRemoteScriptTarget(_0xa8dd37,_0x5a85b8,_0x5b0245,_0x25e150[_0x18d9b7(0x1cd)],_0x482991);if(!_0x1a2f27){_0x1a5fc7[_0x18d9b7(0x1fa)]({'scriptType':_0x5a85b8[_0x18d9b7(0x1e0)],'functionName':_0x5a85b8['functionName']??'','status':_0x18d9b7(0x1e6),'reason':'unresolvable\x20target\x20path'});continue;}const _0x4b9bbe=_0x25e150[_0x18d9b7(0x1cd)][_0x1a2f27[_0x18d9b7(0x1f7)]],_0x90468f=_0x5a85b8[_0x18d9b7(0x203)]!=null?computeContentHash(_0x5a85b8[_0x18d9b7(0x203)]):undefined,_0x1909fa=await hasUnsyncedLocalChanges(_0x1a2f27[_0x18d9b7(0x20b)],_0x4b9bbe,_0x90468f);_0x1a5fc7['push']({'lockKey':_0x1a2f27[_0x18d9b7(0x1f7)],'filePath':_0x1a2f27[_0x18d9b7(0x20b)],'remoteId':_0x5a85b8['id']??null,'status':_0x1909fa?_0x18d9b7(0x1ed):'would_pull'});}return{'method':_0x18d9b7(0x207),'url':_0x18d9b7(0x1ea)+_0x5ca0c7[_0x18d9b7(0x1d8)]+(_0x380aae?_0x18d9b7(0x1e3)+_0x380aae:''),'body':{'appCode':_0x5ca0c7[_0x18d9b7(0x1d8)],'filterType':_0x380aae??null,'files':_0x1a5fc7},'description':'Would\x20inspect\x20'+_0x1a5fc7[_0x18d9b7(0x1fe)]+_0x18d9b7(0x209)};},async 'execute'(_0x5731c1){const _0x4adaba=a36_0x12dc3f,_0x56839e=loadBffProjectConfig(_0x5731c1[_0x4adaba(0x1d8)]),_0x588b2d=await readBffLockFile(_0x56839e[_0x4adaba(0x1fb)]),{lockData:_0x2ce02a,appLock:_0x4cd2eb}=ensureLockScope(_0x588b2d??createEmptyBffLock(),_0x5731c1['appCode'],_0x56839e[_0x4adaba(0x1de)],_0x4adaba(0x1df)),_0x1b9fca=normalizeBffType(_0x5731c1[_0x4adaba(0x1e2)](_0x4adaba(0x1d2)))??undefined;if(_0x5731c1[_0x4adaba(0x1e2)]('type')&&!_0x1b9fca)throw CliErrors[_0x4adaba(0x1db)](_0x4adaba(0x1c9));const [_0x493f46,_0x2c8e9a]=await Promise['all']([listBffScripts(_0x5731c1[_0x4adaba(0x1d8)],_0x1b9fca),getBffScriptStatistics(_0x5731c1[_0x4adaba(0x1d8)])]);if(_0x493f46['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20Backend\x20Function\x20scripts\x20found.'};const _0x56efdf=_0x5731c1[_0x4adaba(0x1f3)](_0x4adaba(0x1ec));if(_0x56efdf&&!_0x5731c1[_0x4adaba(0x1dc)]){const _0x272fad=await confirmForce();if(!_0x272fad)throw CliErrors['cancelled'](_0x4adaba(0x1f4));}if(_0x56efdf&&_0x5731c1[_0x4adaba(0x1dc)]){}const _0x1a8da9=buildDatasetCodeToAliasMap(_0x5731c1[_0x4adaba(0x1ce)],_0x5731c1[_0x4adaba(0x1d8)]),_0x127b64=createHookLocationMap(_0x2c8e9a),_0x2fa330=JSON['parse'](JSON[_0x4adaba(0x1c6)](_0x2ce02a)),_0x3c5b2c=_0x5731c1[_0x4adaba(0x1d8)],_0x9f9f7a=_0x2fa330['apps'][_0x3c5b2c];if(!_0x9f9f7a)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x3c5b2c+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x3227b9=[],_0x17a5e0=[],_0x3a1897=[];for(const _0xd9355b of _0x493f46){const _0x53b9a9=resolveRemoteScriptTarget(_0x56839e,_0xd9355b,_0x127b64,_0x4cd2eb[_0x4adaba(0x1cd)],_0x1a8da9);if(!_0x53b9a9){_0x17a5e0[_0x4adaba(0x1fa)]({'lockKey':_0xd9355b[_0x4adaba(0x1e0)]+'/'+_0xd9355b[_0x4adaba(0x1e8)],'reason':_0x4adaba(0x200)});continue;}const _0x4023d6=_0x4cd2eb[_0x4adaba(0x1cd)][_0x53b9a9[_0x4adaba(0x1f7)]];try{if(!_0xd9355b['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0xd9355b[_0x4adaba(0x203)]==null)throw new Error(_0x4adaba(0x1f9));const _0x5a76c4=_0xd9355b[_0x4adaba(0x203)],_0x59ab1b=computeContentHash(_0x5a76c4);if(!_0x56efdf){const _0x1bc33b=await hasUnsyncedLocalChanges(_0x53b9a9[_0x4adaba(0x20b)],_0x4023d6,_0x59ab1b);if(_0x1bc33b){_0x17a5e0[_0x4adaba(0x1fa)]({'lockKey':_0x53b9a9['lockKey'],'reason':_0x4adaba(0x202)});continue;}}await ensureParentDirectory(_0x53b9a9[_0x4adaba(0x20b)]),await writeFile(_0x53b9a9['filePath'],_0x5a76c4,_0x4adaba(0x1f8));const _0x24571a={'hash':_0x59ab1b,'remoteId':_0xd9355b['id'],'version':_0xd9355b[_0x4adaba(0x1d9)]};_0x53b9a9['type']===_0x4adaba(0x1e4)&&_0x53b9a9[_0x4adaba(0x1d5)]&&(_0x24571a[_0x4adaba(0x1f5)]=_0x53b9a9[_0x4adaba(0x1d5)]['alias'],_0x24571a[_0x4adaba(0x1f1)]=_0x53b9a9['hookLocation'][_0x4adaba(0x1f1)],_0x24571a[_0x4adaba(0x1cc)]=_0x53b9a9[_0x4adaba(0x1d5)][_0x4adaba(0x1cc)],_0x24571a[_0x4adaba(0x20d)]=_0x53b9a9[_0x4adaba(0x1d5)][_0x4adaba(0x20d)]),_0x9f9f7a[_0x4adaba(0x1cd)][_0x53b9a9['lockKey']]=_0x24571a,_0x3227b9[_0x4adaba(0x1fa)]({'lockKey':_0x53b9a9[_0x4adaba(0x1f7)],'remoteId':_0xd9355b['id']});}catch(_0x385139){_0x3a1897[_0x4adaba(0x1fa)]({'lockKey':_0x53b9a9[_0x4adaba(0x1f7)],'error':_0x385139 instanceof Error?_0x385139['message']:String(_0x385139)});}}return _0x9f9f7a[_0x4adaba(0x1d6)]=new Date()[_0x4adaba(0x1d0)](),await writeBffLockFile(_0x56839e[_0x4adaba(0x1fb)],_0x2fa330),{'ok':_0x3a1897['length']===0x0,'data':{'pulled':_0x3227b9,'skipped':_0x17a5e0,'failed':_0x3a1897},'message':_0x4adaba(0x204)+_0x3227b9[_0x4adaba(0x1fe)]+_0x4adaba(0x1e1)+_0x17a5e0[_0x4adaba(0x1fe)]+'\x20skipped,\x20'+_0x3a1897[_0x4adaba(0x1fe)]+_0x4adaba(0x1d3)};}};async function hasUnsyncedLocalChanges(_0x452693,_0x3b2341,_0xab1428){if(!await fileExists(_0x452693))return![];const _0x3afd41=await computeFileHash(_0x452693);if(!_0x3b2341)return _0xab1428?_0x3afd41!==_0xab1428:!![];return _0x3afd41!==_0x3b2341['hash'];}function buildDatasetCodeToAliasMap(_0x41eb96,_0x28e1a7){const _0x33dc30=a36_0x12dc3f,_0x50afcd=loadAliasMap(_0x41eb96,undefined,resolveApiFilePath(_0x41eb96,_0x28e1a7));return new Map(_0x50afcd[_0x33dc30(0x1fc)](_0xe20abc=>[_0xe20abc[_0x33dc30(0x1f1)],_0xe20abc[_0x33dc30(0x1f5)]]));}async function confirmForce(){const _0x13b741=a36_0x12dc3f,_0x34d03d=createInterface({'input':process[_0x13b741(0x1dd)],'output':process[_0x13b741(0x1c7)]}),_0x106672=await new Promise(_0x99eb04=>{const _0x197c55=_0x13b741;_0x34d03d[_0x197c55(0x1fd)](_0x197c55(0x1e5),_0x99eb04);});return _0x34d03d[_0x13b741(0x1f0)](),['y',_0x13b741(0x1d1)]['includes'](_0x106672['trim']()[_0x13b741(0x20a)]());}function a36_0x2763(){const _0x3c7212=['10062189NLaIXU','/api/management/library/scripts/list?appCode=','5875458zdDGuj','force','conflict','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','35308427qpyqeo','close','datasetCode','54RQKTYi','bool','Force\x20pull\x20cancelled.','alias','read','lockKey','utf8','Remote\x20script\x20missing\x20content.','push','lockFilePath','map','question','length','124BjUdtz','unresolvable\x20target\x20path','10dznJeG','local\x20unsynced\x20changes','scriptContent','Pull\x20complete:\x20','50466FrWleo','14512408RcYdZv','GET','Force\x20overwrite\x20local\x20unsynced\x20changes','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','toLowerCase','filePath','boolean','functionNode','12bSRjjA','stringify','stderr','Pull\x20only\x20this\x20script\x20type','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','ENDPOINT','8726578uFPkNF','operationType','functions','apiDir','all','toISOString','yes','type','\x20failed','bff','hookLocation','lastSync','34666xVyHeW','appCode','version','COMMON','validation','nonInteractive','stdin','scriptsRoot','pull','scriptType','\x20pulled,\x20','str','&type=','HOOK','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','skipped','5zdnsah','functionName'];a36_0x2763=function(){return _0x3c7212;};return a36_0x2763();}
1
+ const a36_0x21e790=a36_0x5689;(function(_0x5e3083,_0x579d13){const _0x2950bd=a36_0x5689,_0x25037a=_0x5e3083();while(!![]){try{const _0x268f7b=parseInt(_0x2950bd(0x10a))/0x1*(-parseInt(_0x2950bd(0x111))/0x2)+parseInt(_0x2950bd(0xf3))/0x3*(-parseInt(_0x2950bd(0x11b))/0x4)+-parseInt(_0x2950bd(0x11d))/0x5+-parseInt(_0x2950bd(0x102))/0x6*(parseInt(_0x2950bd(0x134))/0x7)+parseInt(_0x2950bd(0x118))/0x8*(-parseInt(_0x2950bd(0x113))/0x9)+parseInt(_0x2950bd(0x12b))/0xa+parseInt(_0x2950bd(0x122))/0xb;if(_0x268f7b===_0x579d13)break;else _0x25037a['push'](_0x25037a['shift']());}catch(_0x3b37c0){_0x25037a['push'](_0x25037a['shift']());}}}(a36_0x42f9,0x1eb42));function a36_0x5689(_0xf8ca29,_0x18d0ea){_0xf8ca29=_0xf8ca29-0xef;const _0x42f985=a36_0x42f9();let _0x56893d=_0x42f985[_0xf8ca29];return _0x56893d;}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';function a36_0x42f9(){const _0x41f24e=['skipped','\x20skipped,\x20','map','hookLocation','apps','bff','1776QCQxEh','/api/management/library/scripts/list?appCode=','pull','local\x20unsynced\x20changes','HOOK','functions','appCode','nonInteractive','130201ZrQGWm','trim','Pull\x20only\x20this\x20script\x20type','push','GET','operationType','stderr','2hMZDNy','toLowerCase','2041074CurmME','stringify','\x20pulled,\x20','includes','datasetCode','8vtMZFT','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','filePath','2888lUCgBz','boolean','180010tRhZfe','length','unresolvable\x20target\x20path','lockKey','Would\x20inspect\x20','6189172YAEXYe','lockFilePath','validation','functionName','functionNode','force','Pull\x20complete:\x20','Remote\x20script\x20missing\x20id.','apiDir','1344830CpKivP','bool','scriptsRoot','alias','message','&type=','Force\x20pull\x20cancelled.','type','ENDPOINT','2716lsLWKt','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptContent','264KYVjMK','all','conflict','yes','toISOString','hash','question','parse','str'];a36_0x42f9=function(){return _0x41f24e;};return a36_0x42f9();}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':a36_0x21e790(0x101),'command':'pull','description':'Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','risk':'read','flags':[{'name':a36_0x21e790(0x132),'type':'string','description':a36_0x21e790(0x10c),'enum':['COMMON',a36_0x21e790(0x133),a36_0x21e790(0x106)]},{'name':a36_0x21e790(0x127),'type':a36_0x21e790(0x11c),'description':a36_0x21e790(0xf1)}],async 'dryRun'(_0x230cd3){const _0x1bbaa2=a36_0x21e790,_0x2970dc=loadBffProjectConfig(_0x230cd3['appCode']),_0x385907=await readBffLockFile(_0x2970dc[_0x1bbaa2(0x123)]),{appLock:_0x162ded}=ensureLockScope(_0x385907??createEmptyBffLock(),_0x230cd3['appCode'],_0x2970dc[_0x1bbaa2(0x12d)],_0x1bbaa2(0x104)),_0x1d257e=normalizeBffType(_0x230cd3['str'](_0x1bbaa2(0x132)))??undefined,_0x4d3ed8=buildDatasetCodeToAliasMap(_0x230cd3[_0x1bbaa2(0x12a)],_0x230cd3[_0x1bbaa2(0x108)]),[_0x5efd37,_0x58ea26]=await Promise['all']([listBffScripts(_0x230cd3[_0x1bbaa2(0x108)],_0x1d257e),getBffScriptStatistics(_0x230cd3[_0x1bbaa2(0x108)])]),_0x3be41d=createHookLocationMap(_0x58ea26),_0x106a54=[];for(const _0x5d8b2d of _0x5efd37){const _0x134b26=resolveRemoteScriptTarget(_0x2970dc,_0x5d8b2d,_0x3be41d,_0x162ded[_0x1bbaa2(0x107)],_0x4d3ed8);if(!_0x134b26){_0x106a54[_0x1bbaa2(0x10d)]({'scriptType':_0x5d8b2d['scriptType'],'functionName':_0x5d8b2d[_0x1bbaa2(0x125)]??'','status':_0x1bbaa2(0xfc),'reason':_0x1bbaa2(0x11f)});continue;}const _0x1ccd0d=_0x162ded[_0x1bbaa2(0x107)][_0x134b26[_0x1bbaa2(0x120)]],_0x2b8f9d=_0x5d8b2d[_0x1bbaa2(0xf2)]!=null?computeContentHash(_0x5d8b2d[_0x1bbaa2(0xf2)]):undefined,_0x393e4f=await hasUnsyncedLocalChanges(_0x134b26[_0x1bbaa2(0x11a)],_0x1ccd0d,_0x2b8f9d);_0x106a54['push']({'lockKey':_0x134b26[_0x1bbaa2(0x120)],'filePath':_0x134b26['filePath'],'remoteId':_0x5d8b2d['id']??null,'status':_0x393e4f?_0x1bbaa2(0xf5):'would_pull'});}return{'method':_0x1bbaa2(0x10e),'url':_0x1bbaa2(0x103)+_0x230cd3[_0x1bbaa2(0x108)]+(_0x1d257e?_0x1bbaa2(0x130)+_0x1d257e:''),'body':{'appCode':_0x230cd3[_0x1bbaa2(0x108)],'filterType':_0x1d257e??null,'files':_0x106a54},'description':_0x1bbaa2(0x121)+_0x106a54[_0x1bbaa2(0x11e)]+_0x1bbaa2(0x119)};},async 'execute'(_0x19a6c7){const _0x262efd=a36_0x21e790,_0x345f43=loadBffProjectConfig(_0x19a6c7[_0x262efd(0x108)]),_0x2f3228=await readBffLockFile(_0x345f43['lockFilePath']),{lockData:_0x303498,appLock:_0x5e207b}=ensureLockScope(_0x2f3228??createEmptyBffLock(),_0x19a6c7[_0x262efd(0x108)],_0x345f43[_0x262efd(0x12d)],'pull'),_0x33aec5=normalizeBffType(_0x19a6c7[_0x262efd(0xfb)]('type'))??undefined;if(_0x19a6c7['str'](_0x262efd(0x132))&&!_0x33aec5)throw CliErrors[_0x262efd(0x124)](_0x262efd(0xef));const [_0x1d738c,_0x182c00]=await Promise[_0x262efd(0xf4)]([listBffScripts(_0x19a6c7[_0x262efd(0x108)],_0x33aec5),getBffScriptStatistics(_0x19a6c7['appCode'])]);if(_0x1d738c['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x262efd(0xf0)};const _0x25d0b3=_0x19a6c7[_0x262efd(0x12c)]('force');if(_0x25d0b3&&!_0x19a6c7[_0x262efd(0x109)]){const _0x1208a5=await confirmForce();if(!_0x1208a5)throw CliErrors['cancelled'](_0x262efd(0x131));}if(_0x25d0b3&&_0x19a6c7['nonInteractive']){}const _0x252726=buildDatasetCodeToAliasMap(_0x19a6c7[_0x262efd(0x12a)],_0x19a6c7['appCode']),_0x30756d=createHookLocationMap(_0x182c00),_0x17db92=JSON[_0x262efd(0xfa)](JSON[_0x262efd(0x114)](_0x303498)),_0x615763=_0x19a6c7[_0x262efd(0x108)],_0x5e398b=_0x17db92[_0x262efd(0x100)][_0x615763];if(!_0x5e398b)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x615763+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1b2aa0=[],_0x254b18=[],_0x51a744=[];for(const _0x360860 of _0x1d738c){const _0x328928=resolveRemoteScriptTarget(_0x345f43,_0x360860,_0x30756d,_0x5e207b[_0x262efd(0x107)],_0x252726);if(!_0x328928){_0x254b18[_0x262efd(0x10d)]({'lockKey':_0x360860['scriptType']+'/'+_0x360860[_0x262efd(0x125)],'reason':_0x262efd(0x11f)});continue;}const _0x252601=_0x5e207b[_0x262efd(0x107)][_0x328928[_0x262efd(0x120)]];try{if(!_0x360860['id'])throw new Error(_0x262efd(0x129));if(_0x360860[_0x262efd(0xf2)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x4f36b5=_0x360860[_0x262efd(0xf2)],_0x3e930e=computeContentHash(_0x4f36b5);if(!_0x25d0b3){const _0x47a058=await hasUnsyncedLocalChanges(_0x328928[_0x262efd(0x11a)],_0x252601,_0x3e930e);if(_0x47a058){_0x254b18['push']({'lockKey':_0x328928['lockKey'],'reason':_0x262efd(0x105)});continue;}}await ensureParentDirectory(_0x328928['filePath']),await writeFile(_0x328928[_0x262efd(0x11a)],_0x4f36b5,'utf8');const _0x5c302b={'hash':_0x3e930e,'remoteId':_0x360860['id'],'version':_0x360860['version']};_0x328928[_0x262efd(0x132)]===_0x262efd(0x106)&&_0x328928['hookLocation']&&(_0x5c302b['alias']=_0x328928[_0x262efd(0xff)][_0x262efd(0x12e)],_0x5c302b[_0x262efd(0x117)]=_0x328928[_0x262efd(0xff)][_0x262efd(0x117)],_0x5c302b['operationType']=_0x328928[_0x262efd(0xff)][_0x262efd(0x10f)],_0x5c302b[_0x262efd(0x126)]=_0x328928[_0x262efd(0xff)]['functionNode']),_0x5e398b[_0x262efd(0x107)][_0x328928['lockKey']]=_0x5c302b,_0x1b2aa0[_0x262efd(0x10d)]({'lockKey':_0x328928[_0x262efd(0x120)],'remoteId':_0x360860['id']});}catch(_0x5c6160){_0x51a744[_0x262efd(0x10d)]({'lockKey':_0x328928[_0x262efd(0x120)],'error':_0x5c6160 instanceof Error?_0x5c6160[_0x262efd(0x12f)]:String(_0x5c6160)});}}return _0x5e398b['lastSync']=new Date()[_0x262efd(0xf7)](),await writeBffLockFile(_0x345f43['lockFilePath'],_0x17db92),{'ok':_0x51a744[_0x262efd(0x11e)]===0x0,'data':{'pulled':_0x1b2aa0,'skipped':_0x254b18,'failed':_0x51a744},'message':_0x262efd(0x128)+_0x1b2aa0[_0x262efd(0x11e)]+_0x262efd(0x115)+_0x254b18[_0x262efd(0x11e)]+_0x262efd(0xfd)+_0x51a744[_0x262efd(0x11e)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x1294be,_0x5300cd,_0x57c56e){const _0x1d1c45=a36_0x21e790;if(!await fileExists(_0x1294be))return![];const _0x43b2e6=await computeFileHash(_0x1294be);if(!_0x5300cd)return _0x57c56e?_0x43b2e6!==_0x57c56e:!![];return _0x43b2e6!==_0x5300cd[_0x1d1c45(0xf8)];}function buildDatasetCodeToAliasMap(_0x182574,_0x2b43fd){const _0x424584=a36_0x21e790,_0x1914a9=loadAliasMap(_0x182574,undefined,resolveApiFilePath(_0x182574,_0x2b43fd));return new Map(_0x1914a9[_0x424584(0xfe)](_0xdadfc2=>[_0xdadfc2[_0x424584(0x117)],_0xdadfc2[_0x424584(0x12e)]]));}async function confirmForce(){const _0x4d7b02=a36_0x21e790,_0xf56924=createInterface({'input':process['stdin'],'output':process[_0x4d7b02(0x110)]}),_0x21a693=await new Promise(_0x468dd9=>{const _0x1ef959=_0x4d7b02;_0xf56924[_0x1ef959(0xf9)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x468dd9);});return _0xf56924['close'](),['y',_0x4d7b02(0xf6)][_0x4d7b02(0x116)](_0x21a693[_0x4d7b02(0x10b)]()[_0x4d7b02(0x112)]());}
@@ -1 +1 @@
1
- const a37_0x4f6991=a37_0x5096;function a37_0x2259(){const _0x25a865=['Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20failed,\x20','runtime\x20cache\x20cleared','aliasToDatasetCode','1933482apCNII','version',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Local\x20function\x20not\x20found:\x20','12265440HvkRuI','message','hash','validation','No\x20local\x20Backend\x20Function\x20scripts\x20found.','alias','datasetCodeToDataset','join','toISOString','Lock\x20scope\x20for\x20app\x20\x22','length','54335cJSZcE','Would\x20inspect\x20','2AVBGDD','lastSync','string','apiDir','utf8','2115234bMNbCb','str','24SCKZsa','Incomplete\x20HOOK\x20path:\x20','would_push','Force\x20push\x20ignoring\x20hash\x20protection','update','cleared','/api/management/library/scripts/save','COMMON','appCode','force','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','scriptsRoot','functionNode','code','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Runtime\x20script\x20cache\x20cleared.','Push\x20complete:\x20','get','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','status','create','map','datasetCode','description','values','functions','ENDPOINT','runtime\x20cache\x20not\x20needed','lockKey','attempted','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','write','POST','stringify','1229879wAxrbA','filePath','lockFilePath','HOOK','\x20uploaded,\x20','unchanged','operationType','name','filter','push','some','Run\x20`','type','1757620KqGCCQ','\x22\x20not\x20found\x20after\x20ensureLockScope.','304451fVhAeN','script','bool','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x22.\x20','has','remoteId','96LHhXWj'];a37_0x2259=function(){return _0x25a865;};return a37_0x2259();}(function(_0x5aa685,_0x2d4305){const _0x4ef018=a37_0x5096,_0x2cb4c6=_0x5aa685();while(!![]){try{const _0x23e259=parseInt(_0x4ef018(0x1d6))/0x1+parseInt(_0x4ef018(0x1f3))/0x2*(-parseInt(_0x4ef018(0x1e2))/0x3)+-parseInt(_0x4ef018(0x1d4))/0x4+parseInt(_0x4ef018(0x1f1))/0x5*(parseInt(_0x4ef018(0x1dd))/0x6)+-parseInt(_0x4ef018(0x1c7))/0x7*(parseInt(_0x4ef018(0x1fa))/0x8)+parseInt(_0x4ef018(0x1f8))/0x9+parseInt(_0x4ef018(0x1e6))/0xa;if(_0x23e259===_0x2d4305)break;else _0x2cb4c6['push'](_0x2cb4c6['shift']());}catch(_0x5c3e6d){_0x2cb4c6['push'](_0x2cb4c6['shift']());}}}(a37_0x2259,0x504c7));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';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':'bff','command':a37_0x4f6991(0x1d0),'description':a37_0x4f6991(0x20c),'risk':a37_0x4f6991(0x1c4),'flags':[{'name':'type','type':a37_0x4f6991(0x1f5),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x4f6991(0x201),a37_0x4f6991(0x214),a37_0x4f6991(0x1ca)]},{'name':a37_0x4f6991(0x1ce),'type':a37_0x4f6991(0x1f5),'description':a37_0x4f6991(0x204)},{'name':a37_0x4f6991(0x203),'type':'boolean','description':a37_0x4f6991(0x1fd)}],async 'dryRun'(_0x8b5a3b){const _0x4d0561=a37_0x4f6991,_0x449319=loadBffProjectConfig(_0x8b5a3b[_0x4d0561(0x202)]),_0x185be5=await readBffLockFile(_0x449319[_0x4d0561(0x1c9)]),{appLock:_0x57352d}=ensureLockScope(_0x185be5??createEmptyBffLock(),_0x8b5a3b['appCode'],_0x449319[_0x4d0561(0x205)],_0x4d0561(0x1d0)),_0x1075c8=await getTargetFunctions(_0x449319,_0x8b5a3b),_0x21dcb1=_0x8b5a3b[_0x4d0561(0x1d8)](_0x4d0561(0x203)),_0x442c60=[];for(const _0x413b85 of _0x1075c8){const _0x478b75=await computeFileHash(_0x413b85['filePath']),_0x146345=_0x57352d['functions'][_0x413b85['lockKey']],_0x1f93cb=!!_0x146345&&_0x146345[_0x4d0561(0x1e8)]===_0x478b75;_0x442c60[_0x4d0561(0x1d0)]({'lockKey':_0x413b85['lockKey'],'filePath':_0x413b85[_0x4d0561(0x1c8)],'remoteId':_0x146345?.['remoteId']??null,'mode':_0x146345?.[_0x4d0561(0x1dc)]?_0x4d0561(0x1fe):_0x4d0561(0x20e),'status':!_0x21dcb1&&_0x1f93cb?_0x4d0561(0x1cc):'would_push'});}return{'method':_0x4d0561(0x1c5),'url':_0x4d0561(0x200),'body':{'appCode':_0x8b5a3b[_0x4d0561(0x202)],'force':_0x21dcb1,'files':_0x442c60,'cacheClearAtRuntime':_0x442c60[_0x4d0561(0x1d1)](_0x29dcc7=>_0x29dcc7[_0x4d0561(0x20d)]===_0x4d0561(0x1fc)),'cacheClearAtRuntimeTimes':_0x442c60['some'](_0x2dc631=>_0x2dc631[_0x4d0561(0x20d)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4d0561(0x1f2)+_0x442c60['length']+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x551dd3){const _0x52013b=a37_0x4f6991,_0x187f1d=loadBffProjectConfig(_0x551dd3[_0x52013b(0x202)]),_0x3b5d7e=await readBffLockFile(_0x187f1d[_0x52013b(0x1c9)]),{lockData:_0x475195,appLock:_0x5e026f}=ensureLockScope(_0x3b5d7e??createEmptyBffLock(),_0x551dd3[_0x52013b(0x202)],_0x187f1d[_0x52013b(0x205)],_0x52013b(0x1d0)),_0x23f418=await getTargetFunctions(_0x187f1d,_0x551dd3);if(_0x23f418['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x52013b(0x1ea)};const _0x2281ad=_0x551dd3[_0x52013b(0x1d8)](_0x52013b(0x203)),_0x2f3860=JSON['parse'](JSON[_0x52013b(0x1c6)](_0x475195)),_0x4fef54=_0x2f3860['apps'][_0x551dd3[_0x52013b(0x202)]];if(!_0x4fef54)throw new Error(_0x52013b(0x1ef)+_0x551dd3[_0x52013b(0x202)]+_0x52013b(0x1d5));const _0x4a2a8c=await buildHookMaps(_0x551dd3[_0x52013b(0x202)],_0x551dd3[_0x52013b(0x1f6)],_0x23f418,_0x4fef54),_0x5267fa=[],_0x4d15db=[],_0x241e46=[];for(const _0x15f9c3 of _0x23f418){const _0x121d1e=await computeFileHash(_0x15f9c3[_0x52013b(0x1c8)]),_0x2ff0bc=_0x4fef54[_0x52013b(0x213)][_0x15f9c3[_0x52013b(0x216)]];if(!_0x2281ad&&_0x2ff0bc&&_0x2ff0bc[_0x52013b(0x1e8)]===_0x121d1e){_0x4d15db['push']({'lockKey':_0x15f9c3[_0x52013b(0x216)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x551dd3[_0x52013b(0x202)],_0x15f9c3,_0x4fef54,_0x4a2a8c);const _0x260f70=_0x4fef54[_0x52013b(0x213)][_0x15f9c3[_0x52013b(0x216)]];_0x5267fa['push']({'lockKey':_0x15f9c3[_0x52013b(0x216)],'remoteId':_0x260f70?.[_0x52013b(0x1dc)]??0x0});}catch(_0x2d7671){_0x241e46[_0x52013b(0x1d0)]({'lockKey':_0x15f9c3['lockKey'],'error':_0x2d7671 instanceof Error?_0x2d7671[_0x52013b(0x1e7)]:String(_0x2d7671)});}}_0x4fef54[_0x52013b(0x1f4)]=new Date()[_0x52013b(0x1ee)](),await writeBffLockFile(_0x187f1d[_0x52013b(0x1c9)],_0x2f3860),await waitForUploadedLockEntries(_0x187f1d[_0x52013b(0x1c9)],_0x551dd3[_0x52013b(0x202)],_0x5267fa[_0x52013b(0x20f)](_0x47c414=>_0x47c414['lockKey']));let _0x1fd4c7={'attempted':![],'cleared':![]};if(_0x5267fa[_0x52013b(0x1f0)]>0x0)try{let _0x322d91='';for(let _0x1bc9b7=0x0;_0x1bc9b7<CACHE_CLEAR_ATTEMPTS;_0x1bc9b7+=0x1){_0x322d91=await clearBffScriptCache(),_0x1bc9b7<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1fd4c7={'attempted':!![],'cleared':!![],'message':_0x322d91||_0x52013b(0x209)};}catch(_0x267e3d){_0x1fd4c7={'attempted':!![],'cleared':![],'error':_0x267e3d instanceof Error?_0x267e3d['message']:String(_0x267e3d)};}const _0x3e0fa8=_0x241e46[_0x52013b(0x1f0)]===0x0&&(_0x1fd4c7['attempted']?_0x1fd4c7[_0x52013b(0x1ff)]:!![]),_0x3a0718=_0x1fd4c7[_0x52013b(0x217)]?_0x1fd4c7[_0x52013b(0x1ff)]?_0x52013b(0x1e0):'runtime\x20cache\x20clear\x20failed':_0x52013b(0x215);return{'ok':_0x3e0fa8,'data':{'uploaded':_0x5267fa,'skipped':_0x4d15db,'failed':_0x241e46,'cacheClear':_0x1fd4c7},'message':_0x52013b(0x20a)+_0x5267fa['length']+_0x52013b(0x1cb)+_0x4d15db[_0x52013b(0x1f0)]+'\x20skipped,\x20'+_0x241e46[_0x52013b(0x1f0)]+_0x52013b(0x1df)+_0x3a0718};}};function a37_0x5096(_0x2f1f04,_0x4c2501){_0x2f1f04=_0x2f1f04-0x1c4;const _0x2259be=a37_0x2259();let _0x509695=_0x2259be[_0x2f1f04];return _0x509695;}async function getTargetFunctions(_0x2a0e90,_0xf0d9fd){const _0x278c0e=a37_0x4f6991,_0x34d667=_0xf0d9fd[_0x278c0e(0x1f9)]('type'),_0x291e17=_0xf0d9fd[_0x278c0e(0x1f9)]('name'),_0x11fbba=normalizeBffType(_0x34d667)??undefined;if(_0x291e17&&!_0x11fbba)throw CliErrors[_0x278c0e(0x1e9)](_0x278c0e(0x218));const _0x51c348=await scanLocalBffFunctions(_0x2a0e90,_0x11fbba);if(_0x291e17){const _0x299e65=_0x51c348[_0x278c0e(0x1cf)](_0x32b21d=>_0x32b21d[_0x278c0e(0x1ce)]===_0x291e17);if(_0x299e65[_0x278c0e(0x1f0)]===0x0)throw CliErrors[_0x278c0e(0x1e9)](_0x278c0e(0x1e5)+_0x11fbba+'/'+_0x291e17);return _0x299e65;}return _0x51c348;}async function buildHookMaps(_0x23c44f,_0x1c66c1,_0xa24d55,_0x436d6e){const _0x4789c8=a37_0x4f6991,_0x54f5=_0xa24d55[_0x4789c8(0x1d1)](_0x54d0f2=>_0x54d0f2[_0x4789c8(0x1d3)]===_0x4789c8(0x1ca));if(!_0x54f5)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4e3230=loadAliasMap(_0x1c66c1,undefined,resolveApiFilePath(_0x1c66c1,_0x23c44f)),_0x5bb1e9=new Map(_0x4e3230[_0x4789c8(0x20f)](_0x26a8ba=>[_0x26a8ba[_0x4789c8(0x1eb)],_0x26a8ba[_0x4789c8(0x210)]]));for(const _0x388982 of Object[_0x4789c8(0x212)](_0x436d6e[_0x4789c8(0x213)])){_0x388982[_0x4789c8(0x1eb)]&&_0x388982[_0x4789c8(0x210)]&&!_0x5bb1e9[_0x4789c8(0x1db)](_0x388982[_0x4789c8(0x1eb)])&&_0x5bb1e9['set'](_0x388982[_0x4789c8(0x1eb)],_0x388982['datasetCode']);}const _0x1d04a9=await listDatasets(_0x23c44f),_0x286f43=new Map(_0x1d04a9[_0x4789c8(0x20f)](_0x1ad65e=>[_0x1ad65e[_0x4789c8(0x207)],_0x1ad65e]));return{'aliasToDatasetCode':_0x5bb1e9,'datasetCodeToDataset':_0x286f43};}async function uploadSingleFunction(_0x38f3b6,_0x381ca5,_0x28425f,_0x374a2d){const _0x403cb0=a37_0x4f6991,_0x1d3202=await readFile(_0x381ca5[_0x403cb0(0x1c8)],_0x403cb0(0x1f7)),_0x5b36d6=await computeFileHash(_0x381ca5[_0x403cb0(0x1c8)]),_0xbc1d53=_0x28425f['functions'][_0x381ca5[_0x403cb0(0x216)]];if(_0xbc1d53?.['remoteId']&&_0xbc1d53[_0x403cb0(0x1e3)]==null)throw CliErrors[_0x403cb0(0x1e9)](_0x381ca5[_0x403cb0(0x216)]+_0x403cb0(0x1e4));let _0x3cc775=extractScriptDescription(_0x1d3202);if(!_0x3cc775&&_0xbc1d53?.[_0x403cb0(0x1dc)]){const _0x3bf6ea=await getBffScriptInfo(_0xbc1d53['remoteId']);_0x3cc775=_0x3bf6ea[_0x403cb0(0x211)]||undefined;}const _0x9474d0={'appCode':_0x38f3b6,'functionName':_0x381ca5[_0x403cb0(0x1ce)],'scriptType':_0x381ca5[_0x403cb0(0x1d3)],'scriptContent':_0x1d3202};if(_0xbc1d53?.[_0x403cb0(0x1dc)])_0x9474d0['id']=_0xbc1d53[_0x403cb0(0x1dc)];if(_0xbc1d53?.[_0x403cb0(0x1e3)]!=null)_0x9474d0[_0x403cb0(0x1e3)]=_0xbc1d53[_0x403cb0(0x1e3)];if(_0x3cc775)_0x9474d0[_0x403cb0(0x211)]=_0x3cc775;if(_0x381ca5['type']===_0x403cb0(0x1ca)){const _0x2d03d5=_0x381ca5['alias'];if(!_0x2d03d5||!_0x381ca5['operationType']||!_0x381ca5[_0x403cb0(0x206)])throw CliErrors[_0x403cb0(0x1e9)](_0x403cb0(0x1fb)+_0x381ca5['lockKey']);const _0x1c7186=_0x374a2d[_0x403cb0(0x1e1)][_0x403cb0(0x20b)](_0x2d03d5)??_0xbc1d53?.[_0x403cb0(0x210)]??_0x2d03d5,_0x3624a8=_0x374a2d[_0x403cb0(0x1ec)]['get'](_0x1c7186);if(!_0x3624a8)throw CliErrors[_0x403cb0(0x1e9)](_0x403cb0(0x1d9)+_0x2d03d5+_0x403cb0(0x1da)+(_0x403cb0(0x1d2)+CLI_BIN_NAME+_0x403cb0(0x208)));_0x9474d0['datasetId']=_0x3624a8['id'],_0x9474d0[_0x403cb0(0x1cd)]=_0x381ca5[_0x403cb0(0x1cd)],_0x9474d0[_0x403cb0(0x206)]=_0x381ca5['functionNode'];}const _0x454920=await saveBffScript(_0x9474d0),_0xc75882=_0x454920['id'],_0x8f1f6e=_0x454920[_0x403cb0(0x1d7)]??await getBffScriptInfo(_0xc75882),_0x135c96={'hash':_0x5b36d6,'remoteId':_0xc75882,'version':_0x8f1f6e['version']};if(_0x381ca5[_0x403cb0(0x1d3)]===_0x403cb0(0x1ca)){const _0x9e1e52=_0x381ca5[_0x403cb0(0x1eb)],_0x24b78e=_0x374a2d['aliasToDatasetCode']['get'](_0x9e1e52)??_0xbc1d53?.['datasetCode']??_0x9e1e52;_0x374a2d[_0x403cb0(0x1e1)][_0x403cb0(0x1db)](_0x9e1e52)?_0x135c96[_0x403cb0(0x1eb)]=_0x9e1e52:_0x135c96[_0x403cb0(0x1eb)]=_0xbc1d53?.[_0x403cb0(0x1eb)],_0x135c96[_0x403cb0(0x210)]=_0x24b78e,_0x135c96[_0x403cb0(0x1cd)]=_0x381ca5[_0x403cb0(0x1cd)],_0x135c96['functionNode']=_0x381ca5[_0x403cb0(0x206)];}_0x28425f['functions'][_0x381ca5[_0x403cb0(0x216)]]=_0x135c96;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x473548,_0x281a16,_0x57f935){const _0x28b719=a37_0x4f6991;if(_0x57f935[_0x28b719(0x1f0)]===0x0)return;for(let _0x298e04=0x0;_0x298e04<LOCK_SETTLE_RETRY_COUNT;_0x298e04+=0x1){const _0x12e24c=await readBffLockFile(_0x473548),_0x3a8a8f=_0x12e24c?.['apps']?.[_0x281a16]?.['functions']??{},_0x54a8c6=_0x57f935['every'](_0x23e3b7=>!!_0x3a8a8f[_0x23e3b7]?.[_0x28b719(0x1dc)]);if(_0x54a8c6)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x28b719(0x1de)+_0x57f935[_0x28b719(0x1ed)](',\x20')+'.');}
1
+ const a37_0x51d2ca=a37_0x200d;(function(_0x1e6e1a,_0x4a49cf){const _0x1cb48e=a37_0x200d,_0x544c8f=_0x1e6e1a();while(!![]){try{const _0x4ee8b6=-parseInt(_0x1cb48e(0x142))/0x1*(-parseInt(_0x1cb48e(0x14f))/0x2)+-parseInt(_0x1cb48e(0x157))/0x3*(parseInt(_0x1cb48e(0x17b))/0x4)+parseInt(_0x1cb48e(0x146))/0x5+-parseInt(_0x1cb48e(0x14a))/0x6*(parseInt(_0x1cb48e(0x16f))/0x7)+parseInt(_0x1cb48e(0x179))/0x8+-parseInt(_0x1cb48e(0x15f))/0x9+parseInt(_0x1cb48e(0x17c))/0xa;if(_0x4ee8b6===_0x4a49cf)break;else _0x544c8f['push'](_0x544c8f['shift']());}catch(_0x10737c){_0x544c8f['push'](_0x544c8f['shift']());}}}(a37_0x1f9a,0xd7044));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';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';function a37_0x200d(_0xb9e3c0,_0x3367e3){_0xb9e3c0=_0xb9e3c0-0x140;const _0x1f9a12=a37_0x1f9a();let _0x200ddc=_0x1f9a12[_0xb9e3c0];return _0x200ddc;}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':a37_0x51d2ca(0x144),'command':a37_0x51d2ca(0x14e),'description':a37_0x51d2ca(0x167),'risk':a37_0x51d2ca(0x183),'flags':[{'name':a37_0x51d2ca(0x189),'type':a37_0x51d2ca(0x184),'description':a37_0x51d2ca(0x173),'enum':[a37_0x51d2ca(0x178),a37_0x51d2ca(0x153),a37_0x51d2ca(0x196)]},{'name':a37_0x51d2ca(0x152),'type':a37_0x51d2ca(0x184),'description':a37_0x51d2ca(0x150)},{'name':a37_0x51d2ca(0x147),'type':a37_0x51d2ca(0x161),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x820cbe){const _0x30a6d4=a37_0x51d2ca,_0x3bb3af=loadBffProjectConfig(_0x820cbe['appCode']),_0x4b87ce=await readBffLockFile(_0x3bb3af[_0x30a6d4(0x169)]),{appLock:_0x4e2608}=ensureLockScope(_0x4b87ce??createEmptyBffLock(),_0x820cbe['appCode'],_0x3bb3af[_0x30a6d4(0x163)],_0x30a6d4(0x14e)),_0x473f21=await getTargetFunctions(_0x3bb3af,_0x820cbe),_0x501e83=_0x820cbe[_0x30a6d4(0x168)]('force'),_0x90eab5=[];for(const _0xa1c386 of _0x473f21){const _0x2314a8=await computeFileHash(_0xa1c386[_0x30a6d4(0x15c)]),_0x45d7a5=_0x4e2608['functions'][_0xa1c386[_0x30a6d4(0x160)]],_0x511328=!!_0x45d7a5&&_0x45d7a5[_0x30a6d4(0x170)]===_0x2314a8;_0x90eab5[_0x30a6d4(0x14e)]({'lockKey':_0xa1c386[_0x30a6d4(0x160)],'filePath':_0xa1c386[_0x30a6d4(0x15c)],'remoteId':_0x45d7a5?.[_0x30a6d4(0x15d)]??null,'mode':_0x45d7a5?.[_0x30a6d4(0x15d)]?'update':_0x30a6d4(0x18b),'status':!_0x501e83&&_0x511328?_0x30a6d4(0x141):_0x30a6d4(0x18e)});}return{'method':_0x30a6d4(0x172),'url':_0x30a6d4(0x16b),'body':{'appCode':_0x820cbe[_0x30a6d4(0x17a)],'force':_0x501e83,'files':_0x90eab5,'cacheClearAtRuntime':_0x90eab5[_0x30a6d4(0x176)](_0x132650=>_0x132650[_0x30a6d4(0x166)]===_0x30a6d4(0x18e)),'cacheClearAtRuntimeTimes':_0x90eab5[_0x30a6d4(0x176)](_0x56899b=>_0x56899b[_0x30a6d4(0x166)]===_0x30a6d4(0x18e))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x30a6d4(0x148)+_0x90eab5[_0x30a6d4(0x18a)]+_0x30a6d4(0x175)};},async 'execute'(_0x6148b2){const _0x2980db=a37_0x51d2ca,_0x41cf19=loadBffProjectConfig(_0x6148b2[_0x2980db(0x17a)]),_0x4dc125=await readBffLockFile(_0x41cf19[_0x2980db(0x169)]),{lockData:_0x75730,appLock:_0x3885dd}=ensureLockScope(_0x4dc125??createEmptyBffLock(),_0x6148b2['appCode'],_0x41cf19[_0x2980db(0x163)],_0x2980db(0x14e)),_0x5cc906=await getTargetFunctions(_0x41cf19,_0x6148b2);if(_0x5cc906[_0x2980db(0x18a)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2980db(0x18c)};const _0x4054d1=_0x6148b2[_0x2980db(0x168)](_0x2980db(0x147)),_0x2e5f44=JSON[_0x2980db(0x162)](JSON[_0x2980db(0x149)](_0x75730)),_0x485437=_0x2e5f44[_0x2980db(0x194)][_0x6148b2[_0x2980db(0x17a)]];if(!_0x485437)throw new Error(_0x2980db(0x195)+_0x6148b2[_0x2980db(0x17a)]+_0x2980db(0x180));const _0x349c10=await buildHookMaps(_0x6148b2[_0x2980db(0x17a)],_0x6148b2[_0x2980db(0x188)],_0x5cc906,_0x485437),_0x53829a=[],_0x28e30d=[],_0x14fda5=[];for(const _0x5d40d3 of _0x5cc906){const _0x25d690=await computeFileHash(_0x5d40d3[_0x2980db(0x15c)]),_0x421c2f=_0x485437[_0x2980db(0x185)][_0x5d40d3[_0x2980db(0x160)]];if(!_0x4054d1&&_0x421c2f&&_0x421c2f[_0x2980db(0x170)]===_0x25d690){_0x28e30d['push']({'lockKey':_0x5d40d3[_0x2980db(0x160)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x6148b2[_0x2980db(0x17a)],_0x5d40d3,_0x485437,_0x349c10);const _0x82ea5=_0x485437['functions'][_0x5d40d3[_0x2980db(0x160)]];_0x53829a[_0x2980db(0x14e)]({'lockKey':_0x5d40d3[_0x2980db(0x160)],'remoteId':_0x82ea5?.[_0x2980db(0x15d)]??0x0});}catch(_0x5cf54f){_0x14fda5[_0x2980db(0x14e)]({'lockKey':_0x5d40d3[_0x2980db(0x160)],'error':_0x5cf54f instanceof Error?_0x5cf54f['message']:String(_0x5cf54f)});}}_0x485437['lastSync']=new Date()[_0x2980db(0x191)](),await writeBffLockFile(_0x41cf19['lockFilePath'],_0x2e5f44),await waitForUploadedLockEntries(_0x41cf19[_0x2980db(0x169)],_0x6148b2[_0x2980db(0x17a)],_0x53829a[_0x2980db(0x16a)](_0x3fb329=>_0x3fb329[_0x2980db(0x160)]));let _0x5e508b={'attempted':![],'cleared':![]};if(_0x53829a[_0x2980db(0x18a)]>0x0)try{let _0x152c79='';for(let _0x1bc719=0x0;_0x1bc719<CACHE_CLEAR_ATTEMPTS;_0x1bc719+=0x1){_0x152c79=await clearBffScriptCache(),_0x1bc719<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5e508b={'attempted':!![],'cleared':!![],'message':_0x152c79||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x5da54b){_0x5e508b={'attempted':!![],'cleared':![],'error':_0x5da54b instanceof Error?_0x5da54b['message']:String(_0x5da54b)};}const _0xe8db9e=_0x14fda5[_0x2980db(0x18a)]===0x0&&(_0x5e508b['attempted']?_0x5e508b[_0x2980db(0x15b)]:!![]),_0x3efe95=_0x5e508b[_0x2980db(0x16e)]?_0x5e508b['cleared']?_0x2980db(0x14c):_0x2980db(0x156):_0x2980db(0x193);return{'ok':_0xe8db9e,'data':{'uploaded':_0x53829a,'skipped':_0x28e30d,'failed':_0x14fda5,'cacheClear':_0x5e508b},'message':'Push\x20complete:\x20'+_0x53829a['length']+'\x20uploaded,\x20'+_0x28e30d[_0x2980db(0x18a)]+_0x2980db(0x187)+_0x14fda5[_0x2980db(0x18a)]+_0x2980db(0x18d)+_0x3efe95};}};function a37_0x1f9a(){const _0xa09d7c=['bool','lockFilePath','map','/api/management/library/scripts/save','Run\x20`',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','attempted','56126GtajCx','hash','datasetCode','POST','Push\x20only\x20this\x20script\x20type','has','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','some','functionNode','COMMON','13536552zsDnKo','appCode','12sMLWEF','14522590QUOmsn','version','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','str','\x22\x20not\x20found\x20after\x20ensureLockScope.','script','Incomplete\x20HOOK\x20path:\x20','write','string','functions','every','\x20skipped,\x20','apiDir','type','length','create','No\x20local\x20Backend\x20Function\x20scripts\x20found.','\x20failed,\x20','would_push','Local\x20function\x20not\x20found:\x20','datasetCodeToDataset','toISOString','description','runtime\x20cache\x20not\x20needed','apps','Lock\x20scope\x20for\x20app\x20\x22','HOOK','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','unchanged','5YcBsIK','get','bff','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','185155ULsqjQ','force','Would\x20inspect\x20','stringify','630kYrnHN','join','runtime\x20cache\x20cleared','set','push','189058AkbDzk','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','alias','name','ENDPOINT','datasetId','\x22.\x20','runtime\x20cache\x20clear\x20failed','1679892qfpsgj','validation','utf8','operationType','cleared','filePath','remoteId','aliasToDatasetCode','2263626JRjiLn','lockKey','boolean','parse','scriptsRoot','values','filter','status','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote'];a37_0x1f9a=function(){return _0xa09d7c;};return a37_0x1f9a();}async function getTargetFunctions(_0x1fbd29,_0x126b61){const _0x4051e2=a37_0x51d2ca,_0x2840dd=_0x126b61['str'](_0x4051e2(0x189)),_0x3f1336=_0x126b61[_0x4051e2(0x17f)](_0x4051e2(0x152)),_0x107a23=normalizeBffType(_0x2840dd)??undefined;if(_0x3f1336&&!_0x107a23)throw CliErrors[_0x4051e2(0x158)](_0x4051e2(0x140));const _0x49b5eb=await scanLocalBffFunctions(_0x1fbd29,_0x107a23);if(_0x3f1336){const _0x44f631=_0x49b5eb[_0x4051e2(0x165)](_0x4eee7a=>_0x4eee7a['name']===_0x3f1336);if(_0x44f631[_0x4051e2(0x18a)]===0x0)throw CliErrors['validation'](_0x4051e2(0x18f)+_0x107a23+'/'+_0x3f1336);return _0x44f631;}return _0x49b5eb;}async function buildHookMaps(_0x3b86ce,_0x7bbb83,_0x16f595,_0x2ef63a){const _0x37f5a2=a37_0x51d2ca,_0x552eb7=_0x16f595['some'](_0x588d5f=>_0x588d5f[_0x37f5a2(0x189)]===_0x37f5a2(0x196));if(!_0x552eb7)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x316c39=loadAliasMap(_0x7bbb83,undefined,resolveApiFilePath(_0x7bbb83,_0x3b86ce)),_0x4d13a6=new Map(_0x316c39[_0x37f5a2(0x16a)](_0x505d37=>[_0x505d37[_0x37f5a2(0x151)],_0x505d37[_0x37f5a2(0x171)]]));for(const _0x30fb2b of Object[_0x37f5a2(0x164)](_0x2ef63a[_0x37f5a2(0x185)])){_0x30fb2b[_0x37f5a2(0x151)]&&_0x30fb2b[_0x37f5a2(0x171)]&&!_0x4d13a6['has'](_0x30fb2b[_0x37f5a2(0x151)])&&_0x4d13a6[_0x37f5a2(0x14d)](_0x30fb2b[_0x37f5a2(0x151)],_0x30fb2b[_0x37f5a2(0x171)]);}const _0x5cf932=await listDatasets(_0x3b86ce),_0x464a15=new Map(_0x5cf932['map'](_0x5df823=>[_0x5df823['code'],_0x5df823]));return{'aliasToDatasetCode':_0x4d13a6,'datasetCodeToDataset':_0x464a15};}async function uploadSingleFunction(_0x249e64,_0x26d9dd,_0x5b4e31,_0x15fb52){const _0x49f2c8=a37_0x51d2ca,_0x3b4684=await readFile(_0x26d9dd[_0x49f2c8(0x15c)],_0x49f2c8(0x159)),_0x2527ea=await computeFileHash(_0x26d9dd[_0x49f2c8(0x15c)]),_0x2d6342=_0x5b4e31['functions'][_0x26d9dd[_0x49f2c8(0x160)]];if(_0x2d6342?.[_0x49f2c8(0x15d)]&&_0x2d6342[_0x49f2c8(0x17d)]==null)throw CliErrors[_0x49f2c8(0x158)](_0x26d9dd[_0x49f2c8(0x160)]+_0x49f2c8(0x16d));let _0x253cea=extractScriptDescription(_0x3b4684);if(!_0x253cea&&_0x2d6342?.[_0x49f2c8(0x15d)]){const _0x317d2a=await getBffScriptInfo(_0x2d6342['remoteId']);_0x253cea=_0x317d2a[_0x49f2c8(0x192)]||undefined;}const _0x2c5705={'appCode':_0x249e64,'functionName':_0x26d9dd[_0x49f2c8(0x152)],'scriptType':_0x26d9dd[_0x49f2c8(0x189)],'scriptContent':_0x3b4684};if(_0x2d6342?.['remoteId'])_0x2c5705['id']=_0x2d6342[_0x49f2c8(0x15d)];if(_0x2d6342?.['version']!=null)_0x2c5705[_0x49f2c8(0x17d)]=_0x2d6342[_0x49f2c8(0x17d)];if(_0x253cea)_0x2c5705[_0x49f2c8(0x192)]=_0x253cea;if(_0x26d9dd['type']===_0x49f2c8(0x196)){const _0xdf949d=_0x26d9dd[_0x49f2c8(0x151)];if(!_0xdf949d||!_0x26d9dd[_0x49f2c8(0x15a)]||!_0x26d9dd[_0x49f2c8(0x177)])throw CliErrors[_0x49f2c8(0x158)](_0x49f2c8(0x182)+_0x26d9dd[_0x49f2c8(0x160)]);const _0x51e454=_0x15fb52[_0x49f2c8(0x15e)]['get'](_0xdf949d)??_0x2d6342?.[_0x49f2c8(0x171)]??_0xdf949d,_0x116cc1=_0x15fb52[_0x49f2c8(0x190)]['get'](_0x51e454);if(!_0x116cc1)throw CliErrors[_0x49f2c8(0x158)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0xdf949d+_0x49f2c8(0x155)+(_0x49f2c8(0x16c)+CLI_BIN_NAME+_0x49f2c8(0x17e)));_0x2c5705[_0x49f2c8(0x154)]=_0x116cc1['id'],_0x2c5705[_0x49f2c8(0x15a)]=_0x26d9dd[_0x49f2c8(0x15a)],_0x2c5705[_0x49f2c8(0x177)]=_0x26d9dd[_0x49f2c8(0x177)];}const _0x1f373e=await saveBffScript(_0x2c5705),_0x5e772c=_0x1f373e['id'],_0x54797c=_0x1f373e[_0x49f2c8(0x181)]??await getBffScriptInfo(_0x5e772c),_0x4a16b2={'hash':_0x2527ea,'remoteId':_0x5e772c,'version':_0x54797c[_0x49f2c8(0x17d)]};if(_0x26d9dd['type']===_0x49f2c8(0x196)){const _0x27f009=_0x26d9dd[_0x49f2c8(0x151)],_0x5480=_0x15fb52['aliasToDatasetCode'][_0x49f2c8(0x143)](_0x27f009)??_0x2d6342?.[_0x49f2c8(0x171)]??_0x27f009;_0x15fb52[_0x49f2c8(0x15e)][_0x49f2c8(0x174)](_0x27f009)?_0x4a16b2[_0x49f2c8(0x151)]=_0x27f009:_0x4a16b2['alias']=_0x2d6342?.['alias'],_0x4a16b2[_0x49f2c8(0x171)]=_0x5480,_0x4a16b2['operationType']=_0x26d9dd[_0x49f2c8(0x15a)],_0x4a16b2[_0x49f2c8(0x177)]=_0x26d9dd[_0x49f2c8(0x177)];}_0x5b4e31[_0x49f2c8(0x185)][_0x26d9dd['lockKey']]=_0x4a16b2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x24da50,_0x451893,_0x34774d){const _0x3cd6e3=a37_0x51d2ca;if(_0x34774d[_0x3cd6e3(0x18a)]===0x0)return;for(let _0x3766d4=0x0;_0x3766d4<LOCK_SETTLE_RETRY_COUNT;_0x3766d4+=0x1){const _0x1c2309=await readBffLockFile(_0x24da50),_0x127b03=_0x1c2309?.[_0x3cd6e3(0x194)]?.[_0x451893]?.[_0x3cd6e3(0x185)]??{},_0x50547e=_0x34774d[_0x3cd6e3(0x186)](_0x1c636f=>!!_0x127b03[_0x1c636f]?.[_0x3cd6e3(0x15d)]);if(_0x50547e)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x3cd6e3(0x145)+_0x34774d[_0x3cd6e3(0x14b)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x528bfe=a38_0x36a1;(function(_0x322489,_0xd7db53){const _0x28fbca=a38_0x36a1,_0x13e0ba=_0x322489();while(!![]){try{const _0x203d80=-parseInt(_0x28fbca(0x116))/0x1+-parseInt(_0x28fbca(0x107))/0x2+parseInt(_0x28fbca(0xfd))/0x3*(-parseInt(_0x28fbca(0x101))/0x4)+-parseInt(_0x28fbca(0x105))/0x5*(parseInt(_0x28fbca(0x10f))/0x6)+parseInt(_0x28fbca(0x10b))/0x7*(parseInt(_0x28fbca(0x104))/0x8)+parseInt(_0x28fbca(0xfa))/0x9*(-parseInt(_0x28fbca(0x10c))/0xa)+parseInt(_0x28fbca(0x10e))/0xb;if(_0x203d80===_0xd7db53)break;else _0x13e0ba['push'](_0x13e0ba['shift']());}catch(_0x3ad937){_0x13e0ba['push'](_0x13e0ba['shift']());}}}(a38_0xfe30,0xd8f02));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x36a1(_0x403fde,_0x14bb7b){_0x403fde=_0x403fde-0xf7;const _0xfe30b5=a38_0xfe30();let _0x36a123=_0xfe30b5[_0x403fde];return _0x36a123;}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 a38_0xfe30(){const _0x33da08=['12TirOCy','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','push','74680LAwoWC','1165LizfhL','bff','1010056JdTAmP','length','lockKey','read','959HKpFwC','69990TEOWIo','bool','37277042BVpVfn','24438NXPopo','map','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','apiDir','datasetCode','\x20unchanged','lockFilePath','558075UFvBNy','hash','scriptsRoot','all','remote','1458tSWmuw','functions','boolean','633189kpeqYV','\x20modified,\x20','appCode','\x20remote-only'];a38_0xfe30=function(){return _0x33da08;};return a38_0xfe30();}export const bffStatus={'service':a38_0x528bfe(0x106),'command':'status','description':a38_0x528bfe(0x102),'risk':a38_0x528bfe(0x10a),'flags':[{'name':a38_0x528bfe(0xf9),'type':a38_0x528bfe(0xfc),'description':a38_0x528bfe(0x111)}],async 'execute'(_0xb7834c){const _0x436eb5=a38_0x528bfe,_0x4d3e30=loadBffProjectConfig(_0xb7834c[_0x436eb5(0xff)]),_0x1aa7d2=await readBffLockFile(_0x4d3e30[_0x436eb5(0x115)]),{appLock:_0x4331be}=ensureLockScope(_0x1aa7d2??createEmptyBffLock(),_0xb7834c['appCode'],_0x4d3e30[_0x436eb5(0xf7)],'status'),_0x22a7b5=await scanLocalBffFunctions(_0x4d3e30),_0x29cf0d=[],_0x36ef99=[],_0x54590c=[];for(const _0x2e3383 of _0x22a7b5){const _0x2d3bd7=await computeFileHash(_0x2e3383['filePath']),_0x3eb243=_0x4331be[_0x436eb5(0xfb)][_0x2e3383['lockKey']];if(!_0x3eb243)_0x29cf0d['push'](_0x2e3383[_0x436eb5(0x109)]);else _0x3eb243[_0x436eb5(0x117)]!==_0x2d3bd7?_0x36ef99[_0x436eb5(0x103)](_0x2e3383[_0x436eb5(0x109)]):_0x54590c['push'](_0x2e3383['lockKey']);}const _0x51a2c6=[];if(_0xb7834c[_0x436eb5(0x10d)]('remote')){const _0x20e854=loadAliasMap(_0xb7834c[_0x436eb5(0x112)],undefined,resolveApiFilePath(_0xb7834c[_0x436eb5(0x112)],_0xb7834c[_0x436eb5(0xff)])),_0x4ebe8f=new Map(_0x20e854[_0x436eb5(0x110)](_0x4b7c27=>[_0x4b7c27[_0x436eb5(0x113)],_0x4b7c27['alias']])),[_0x3fca03,_0x2ccc34]=await Promise[_0x436eb5(0xf8)]([listBffScripts(_0xb7834c[_0x436eb5(0xff)]),getBffScriptStatistics(_0xb7834c['appCode'])]),_0x559108=createHookLocationMap(_0x2ccc34),_0x347d8a=new Set(_0x22a7b5['map'](_0x348de3=>_0x348de3[_0x436eb5(0x109)]));for(const _0x24a905 of _0x3fca03){const _0x16787d=resolveRemoteScriptTarget(_0x4d3e30,_0x24a905,_0x559108,_0x4331be[_0x436eb5(0xfb)],_0x4ebe8f);_0x16787d&&!_0x347d8a['has'](_0x16787d[_0x436eb5(0x109)])&&_0x51a2c6['push'](_0x16787d[_0x436eb5(0x109)]);}}const _0x2f6998=_0x29cf0d[_0x436eb5(0x108)]===0x0&&_0x36ef99[_0x436eb5(0x108)]===0x0&&_0x51a2c6['length']===0x0;return{'ok':!![],'data':{'added':_0x29cf0d,'modified':_0x36ef99,'unchanged':_0x54590c,'remoteOnly':_0x51a2c6},'message':_0x2f6998?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x29cf0d[_0x436eb5(0x108)]+'\x20added,\x20'+_0x36ef99[_0x436eb5(0x108)]+_0x436eb5(0xfe)+_0x54590c[_0x436eb5(0x108)]+_0x436eb5(0x114)+(_0x51a2c6[_0x436eb5(0x108)]>0x0?',\x20'+_0x51a2c6['length']+_0x436eb5(0x100):'')};}};
1
+ const a38_0x40489c=a38_0x1fb4;function a38_0x4994(){const _0x187cb5=['554664WVnjEO','151830rNgkqW','functions','\x20unchanged','bff','351ZrCDRM','426456eMKdFh','\x20remote-only','datasetCode','read','remote','lockKey','map','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','16JyjEoW','alias','32dixyfS','992325DqWTmG','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','44861GFwUoc','appCode','bool','push','boolean','lockFilePath','541079VdGXLz','90980whyGqm','\x20added,\x20','apiDir','\x20modified,\x20','filePath','length','has','scriptsRoot','status'];a38_0x4994=function(){return _0x187cb5;};return a38_0x4994();}(function(_0x1d1f58,_0x120724){const _0x324ef1=a38_0x1fb4,_0x5d0f1c=_0x1d1f58();while(!![]){try{const _0x10373c=parseInt(_0x324ef1(0x1e4))/0x1*(-parseInt(_0x324ef1(0x1df))/0x2)+parseInt(_0x324ef1(0x1f4))/0x3+-parseInt(_0x324ef1(0x1fa))/0x4+-parseInt(_0x324ef1(0x1e2))/0x5+parseInt(_0x324ef1(0x1f5))/0x6+parseInt(_0x324ef1(0x1ea))/0x7*(parseInt(_0x324ef1(0x1e1))/0x8)+-parseInt(_0x324ef1(0x1f9))/0x9*(-parseInt(_0x324ef1(0x1eb))/0xa);if(_0x10373c===_0x120724)break;else _0x5d0f1c['push'](_0x5d0f1c['shift']());}catch(_0x5bbf58){_0x5d0f1c['push'](_0x5d0f1c['shift']());}}}(a38_0x4994,0x3353c));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 a38_0x1fb4(_0x2cf4e9,_0x12cab7){_0x2cf4e9=_0x2cf4e9-0x1dd;const _0x499422=a38_0x4994();let _0x1fb4d7=_0x499422[_0x2cf4e9];return _0x1fb4d7;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x40489c(0x1f8),'command':'status','description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x40489c(0x1fd),'flags':[{'name':a38_0x40489c(0x1fe),'type':a38_0x40489c(0x1e8),'description':a38_0x40489c(0x1de)}],async 'execute'(_0x4ca71a){const _0x2f6d18=a38_0x40489c,_0x1026b8=loadBffProjectConfig(_0x4ca71a[_0x2f6d18(0x1e5)]),_0x3c2992=await readBffLockFile(_0x1026b8[_0x2f6d18(0x1e9)]),{appLock:_0x34b3bb}=ensureLockScope(_0x3c2992??createEmptyBffLock(),_0x4ca71a[_0x2f6d18(0x1e5)],_0x1026b8[_0x2f6d18(0x1f2)],_0x2f6d18(0x1f3)),_0x195a4e=await scanLocalBffFunctions(_0x1026b8),_0x387849=[],_0x5db639=[],_0x10fbb0=[];for(const _0x272285 of _0x195a4e){const _0xd2ec6d=await computeFileHash(_0x272285[_0x2f6d18(0x1ef)]),_0x8e36ef=_0x34b3bb[_0x2f6d18(0x1f6)][_0x272285['lockKey']];if(!_0x8e36ef)_0x387849[_0x2f6d18(0x1e7)](_0x272285[_0x2f6d18(0x1ff)]);else _0x8e36ef['hash']!==_0xd2ec6d?_0x5db639[_0x2f6d18(0x1e7)](_0x272285[_0x2f6d18(0x1ff)]):_0x10fbb0[_0x2f6d18(0x1e7)](_0x272285[_0x2f6d18(0x1ff)]);}const _0xb36882=[];if(_0x4ca71a[_0x2f6d18(0x1e6)](_0x2f6d18(0x1fe))){const _0x5a3b06=loadAliasMap(_0x4ca71a[_0x2f6d18(0x1ed)],undefined,resolveApiFilePath(_0x4ca71a['apiDir'],_0x4ca71a['appCode'])),_0x6c7e8=new Map(_0x5a3b06[_0x2f6d18(0x1dd)](_0x294c7d=>[_0x294c7d[_0x2f6d18(0x1fc)],_0x294c7d[_0x2f6d18(0x1e0)]])),[_0x35847f,_0xdc183b]=await Promise['all']([listBffScripts(_0x4ca71a[_0x2f6d18(0x1e5)]),getBffScriptStatistics(_0x4ca71a[_0x2f6d18(0x1e5)])]),_0x3b815c=createHookLocationMap(_0xdc183b),_0x23a5ef=new Set(_0x195a4e['map'](_0x1d001b=>_0x1d001b[_0x2f6d18(0x1ff)]));for(const _0x301ede of _0x35847f){const _0x5db5e3=resolveRemoteScriptTarget(_0x1026b8,_0x301ede,_0x3b815c,_0x34b3bb['functions'],_0x6c7e8);_0x5db5e3&&!_0x23a5ef[_0x2f6d18(0x1f1)](_0x5db5e3[_0x2f6d18(0x1ff)])&&_0xb36882[_0x2f6d18(0x1e7)](_0x5db5e3['lockKey']);}}const _0x4f4a24=_0x387849[_0x2f6d18(0x1f0)]===0x0&&_0x5db639[_0x2f6d18(0x1f0)]===0x0&&_0xb36882[_0x2f6d18(0x1f0)]===0x0;return{'ok':!![],'data':{'added':_0x387849,'modified':_0x5db639,'unchanged':_0x10fbb0,'remoteOnly':_0xb36882},'message':_0x4f4a24?_0x2f6d18(0x1e3):_0x387849['length']+_0x2f6d18(0x1ec)+_0x5db639[_0x2f6d18(0x1f0)]+_0x2f6d18(0x1ee)+_0x10fbb0[_0x2f6d18(0x1f0)]+_0x2f6d18(0x1f7)+(_0xb36882[_0x2f6d18(0x1f0)]>0x0?',\x20'+_0xb36882[_0x2f6d18(0x1f0)]+_0x2f6d18(0x1fb):'')};}};
@@ -1 +1 @@
1
- const a39_0x646f6a=a39_0x45db;(function(_0x44810d,_0x4901be){const _0x512277=a39_0x45db,_0x455546=_0x44810d();while(!![]){try{const _0x37b2b4=-parseInt(_0x512277(0x11c))/0x1+-parseInt(_0x512277(0x127))/0x2*(parseInt(_0x512277(0x11d))/0x3)+parseInt(_0x512277(0x131))/0x4+-parseInt(_0x512277(0x128))/0x5*(-parseInt(_0x512277(0x11a))/0x6)+-parseInt(_0x512277(0x117))/0x7*(-parseInt(_0x512277(0x11f))/0x8)+-parseInt(_0x512277(0x113))/0x9*(-parseInt(_0x512277(0x12f))/0xa)+parseInt(_0x512277(0x125))/0xb;if(_0x37b2b4===_0x4901be)break;else _0x455546['push'](_0x455546['shift']());}catch(_0x127b5a){_0x455546['push'](_0x455546['shift']());}}}(a39_0x2b2e,0xaeb39));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a39_0x45db(_0x2a2da9,_0x276d71){_0x2a2da9=_0x2a2da9-0x112;const _0x2b2e90=a39_0x2b2e();let _0x45db18=_0x2b2e90[_0x2a2da9];return _0x45db18;}import{logger}from'../../utils/logger.js';function a39_0x2b2e(){const _0x10360a=['Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','620808QrzRFs','install','error','installedPath','unknown','repairCommand','7684446DGkQCx','read','841842LgizXP','24940schpmV','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','\x20installed','\x20is\x20already\x20current','\x20at\x20','setLogPath','Built-in\x20Skill\x20install\x20failed\x20[','143210njKAqP','nonInteractive','1424480AJUkMO','inherit','729LLUOfG','cli-skill-install','log','pipe','49PZFnzA','changed','\x20via\x20skills@latest','474JOTTOG','skillVersion','1173626ZluODj','9NpZQPh'];a39_0x2b2e=function(){return _0x10360a;};return a39_0x2b2e();}export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x646f6a(0x120),'description':a39_0x646f6a(0x11e),'risk':a39_0x646f6a(0x126),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1a4bfa){const _0x316c74=a39_0x646f6a;logger[_0x316c74(0x12d)](process['cwd']()),logger['info'](_0x316c74(0x114),_0x316c74(0x129));const _0x181407=installBuiltinSkill({'stdio':_0x1a4bfa[_0x316c74(0x130)]?_0x316c74(0x116):_0x316c74(0x112)});if(!_0x181407['ok'])throw CliErrors['apiError'](_0x316c74(0x12e)+_0x181407['code']+']:\x20'+(_0x181407[_0x316c74(0x121)]||_0x316c74(0x123)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x181407[_0x316c74(0x124)]);return console[_0x316c74(0x115)](_0x181407[_0x316c74(0x118)]?'CLI\x20Built-in\x20Skill\x20'+_0x181407[_0x316c74(0x11b)]+_0x316c74(0x12a)+(_0x181407[_0x316c74(0x122)]?_0x316c74(0x12c)+_0x181407['installedPath']:_0x316c74(0x119)):'CLI\x20Built-in\x20Skill\x20'+_0x181407[_0x316c74(0x11b)]+_0x316c74(0x12b)+(_0x181407[_0x316c74(0x122)]?_0x316c74(0x12c)+_0x181407[_0x316c74(0x122)]:'')),{'ok':!![]};}}];
1
+ function a39_0x34b6(){const _0x54aeb7=['log','10pHIRkr','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','pipe','cli-skill-install','CLI\x20Built-in\x20Skill\x20',']:\x20','\x20is\x20already\x20current','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','56vALuSJ','\x20via\x20skills@latest','90735KjYEsH','11YUahtw','inherit','error','389599JLEAqb','info','1080973KKpXbs','code','installedPath','apiError','setLogPath','\x20installed','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','changed','install','unknown','2640816yjojKU','\x20at\x20','1109421xSpFCN','19105cNNhyC','26879052dPpTks','534ZCIiUP','cli-skill','skillVersion','2rrEogk'];a39_0x34b6=function(){return _0x54aeb7;};return a39_0x34b6();}const a39_0x1ecee0=a39_0x20a6;(function(_0x422383,_0x346e20){const _0x47a5b6=a39_0x20a6,_0x219166=_0x422383();while(!![]){try{const _0x439d25=parseInt(_0x47a5b6(0x1f3))/0x1*(-parseInt(_0x47a5b6(0x1e1))/0x2)+-parseInt(_0x47a5b6(0x1ed))/0x3+-parseInt(_0x47a5b6(0x1fd))/0x4+parseInt(_0x47a5b6(0x200))/0x5*(parseInt(_0x47a5b6(0x1de))/0x6)+-parseInt(_0x47a5b6(0x1f1))/0x7*(parseInt(_0x47a5b6(0x1eb))/0x8)+parseInt(_0x47a5b6(0x1ff))/0x9*(parseInt(_0x47a5b6(0x1e3))/0xa)+-parseInt(_0x47a5b6(0x1ee))/0xb*(-parseInt(_0x47a5b6(0x1dd))/0xc);if(_0x439d25===_0x346e20)break;else _0x219166['push'](_0x219166['shift']());}catch(_0x4dd219){_0x219166['push'](_0x219166['shift']());}}}(a39_0x34b6,0x8461e));import{CliErrors}from'../../errors.js';function a39_0x20a6(_0x24fcd7,_0x2a72c5){_0x24fcd7=_0x24fcd7-0x1dd;const _0x34b601=a39_0x34b6();let _0x20a6bc=_0x34b601[_0x24fcd7];return _0x20a6bc;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x1ecee0(0x1df),'command':a39_0x1ecee0(0x1fb),'description':a39_0x1ecee0(0x1f9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x58d239){const _0x282a51=a39_0x1ecee0;logger[_0x282a51(0x1f7)](process['cwd']()),logger[_0x282a51(0x1f2)](_0x282a51(0x1e6),_0x282a51(0x1e4));const _0x55962e=installBuiltinSkill({'stdio':_0x58d239['nonInteractive']?_0x282a51(0x1e5):_0x282a51(0x1ef)});if(!_0x55962e['ok'])throw CliErrors[_0x282a51(0x1f6)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x55962e[_0x282a51(0x1f4)]+_0x282a51(0x1e8)+(_0x55962e[_0x282a51(0x1f0)]||_0x282a51(0x1fc)),_0x282a51(0x1ea)+_0x55962e['repairCommand']);return console[_0x282a51(0x1e2)](_0x55962e[_0x282a51(0x1fa)]?'CLI\x20Built-in\x20Skill\x20'+_0x55962e[_0x282a51(0x1e0)]+_0x282a51(0x1f8)+(_0x55962e['installedPath']?_0x282a51(0x1fe)+_0x55962e[_0x282a51(0x1f5)]:_0x282a51(0x1ec)):_0x282a51(0x1e7)+_0x55962e[_0x282a51(0x1e0)]+_0x282a51(0x1e9)+(_0x55962e[_0x282a51(0x1f5)]?'\x20at\x20'+_0x55962e[_0x282a51(0x1f5)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x39d4de=a40_0x53cc;(function(_0x588eb5,_0x49e97f){const _0x5f2836=a40_0x53cc,_0xab9c7e=_0x588eb5();while(!![]){try{const _0x22a844=parseInt(_0x5f2836(0xde))/0x1+-parseInt(_0x5f2836(0xdf))/0x2+parseInt(_0x5f2836(0xf5))/0x3+-parseInt(_0x5f2836(0xec))/0x4*(parseInt(_0x5f2836(0xb0))/0x5)+parseInt(_0x5f2836(0xd9))/0x6*(-parseInt(_0x5f2836(0xe6))/0x7)+parseInt(_0x5f2836(0xbd))/0x8+parseInt(_0x5f2836(0xc4))/0x9*(parseInt(_0x5f2836(0xc6))/0xa);if(_0x22a844===_0x49e97f)break;else _0xab9c7e['push'](_0xab9c7e['shift']());}catch(_0x367840){_0xab9c7e['push'](_0xab9c7e['shift']());}}}(a40_0x2f6a,0x359b6));function a40_0x2f6a(){const _0x5e8617=['Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','trim','Version\x20comparison\x20failed','12wuXqHY','info','\x20cli-skill\x20install','\x20\x20Run\x20manually:\x20','timeout','253598aLzwyP','422022FHoYnM','filter','log','\x20→\x20','error','Updated\x20to\x20v','start','1020810IrtRLG','fromEntries','gray','\x20is\x20newer\x20than\x20npm\x20latest\x20v','succeed','entries','157156tgQdFM','validation','execPath','Beta\x20version:\x20','unknown','warn','boolean','fail',']:\x20','124440uidGmO','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20via\x20','Update\x20failed','Invalid\x20version:\x20','skillVersion','code','green','repairCommand','length','beta','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','bool','valid','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','35NLxFOJ','red','source','\x20\x20CLI\x20Built-in\x20Skill\x20','\x20is\x20up\x20to\x20date.','map','version','Current\x20version:\x20','expected\x20','Checking\x20CLI\x20Built-in\x20Skill...','state','Already\x20on\x20requested\x20version\x20(v',',\x20state\x20','1613088IzDiwC','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','...','Current\x20version\x20v','/dist-tags','latest','18kPfcCP','pipe','2502770pxgvBY','\x20install\x20-g\x20','string','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Already\x20up\x20to\x20date\x20(v','npm','slice','includes','@latest','Checking\x20for\x20updates...','yellow','bun','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','message'];a40_0x2f6a=function(){return _0x5e8617;};return a40_0x2f6a();}import a40_0x3f39e from'chalk';import a40_0x299d5c from'ora';function a40_0x53cc(_0x216ceb,_0x244181){_0x216ceb=_0x216ceb-0xa9;const _0x2f6ade=a40_0x2f6a();let _0x53cc30=_0x2f6ade[_0x216ceb];return _0x53cc30;}import a40_0x525fcc 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 _0xfcae05=a40_0x53cc;return GIT_COMMIT!==_0xfcae05(0xf0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xfcae05(0xcc)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x18f575=a40_0x53cc,_0x5b3b03=process[_0x18f575(0xee)]['toLowerCase']();if(_0x5b3b03[_0x18f575(0xcd)](_0x18f575(0xd1)))return _0x18f575(0xd1);return _0x18f575(0xcb);}const updateFlags=[{'name':a40_0x39d4de(0xab),'type':a40_0x39d4de(0xf2),'description':a40_0x39d4de(0xf7),'default':![]},{'name':a40_0x39d4de(0xb6),'type':a40_0x39d4de(0xc8),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x74f2fb){return _0x74f2fb['str']('version')['trim']();}async function validateUpdateFlags(_0x3b1285){const _0x274ff5=a40_0x39d4de,_0x21b08e=_0x3b1285[_0x274ff5(0xad)]('beta'),_0x2cefdf=getRequestedVersion(_0x3b1285);if(_0x21b08e&&_0x2cefdf)throw CliErrors[_0x274ff5(0xed)](_0x274ff5(0xbf),_0x274ff5(0xbe));if(_0x2cefdf&&!a40_0x525fcc[_0x274ff5(0xae)](_0x2cefdf))throw CliErrors[_0x274ff5(0xed)](_0x274ff5(0xfa)+_0x2cefdf,_0x274ff5(0xaf));}async function fetchNpmDistTags(){const _0x3a4f55=a40_0x39d4de;try{const _0x3320b5=await fetch(_0x3a4f55(0xd3)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3a4f55(0xc2),{'signal':AbortSignal[_0x3a4f55(0xdd)](0x2710)});if(!_0x3320b5['ok'])return null;const _0x42bcdf=await _0x3320b5['json']();if(!_0x42bcdf||typeof _0x42bcdf!=='object')return null;return Object[_0x3a4f55(0xe7)](Object[_0x3a4f55(0xeb)](_0x42bcdf)[_0x3a4f55(0xe0)](([,_0x246c04])=>typeof _0x246c04===_0x3a4f55(0xc8)&&_0x246c04[_0x3a4f55(0xd7)]()[_0x3a4f55(0xaa)]>0x0)[_0x3a4f55(0xb5)](([_0x1cb472,_0x34f8b5])=>[_0x1cb472,String(_0x34f8b5)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5dc390){const _0x381bd1=await fetchNpmDistTags();return _0x381bd1?.[_0x5dc390]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x4f4b64){const _0x4db826=a40_0x39d4de,_0x17a302=getRequestedVersion(_0x4f4b64);if(_0x17a302)return{'version':_0x17a302,'source':_0x4db826(0xb6)};if(_0x4f4b64[_0x4db826(0xad)](_0x4db826(0xab))){const _0x53a29a=await fetchNpmDistTagVersion('beta');if(!_0x53a29a)return null;return{'version':_0x53a29a,'source':_0x4db826(0xab)};}const _0x31dc46=await fetchLatestVersion();if(!_0x31dc46)return null;return{'version':_0x31dc46,'source':_0x4db826(0xc3)};}function shouldInstallTarget(_0x208617,_0x3c70b8){const _0x1c5c22=a40_0x39d4de;if(_0x3c70b8[_0x1c5c22(0xb2)]==='version'||_0x3c70b8[_0x1c5c22(0xb2)]==='beta')return!a40_0x525fcc['eq'](_0x208617,_0x3c70b8[_0x1c5c22(0xb6)]);return a40_0x525fcc['lt'](_0x208617,_0x3c70b8[_0x1c5c22(0xb6)]);}function getInstallPlanLabel(_0x2a0089,_0x13ee28){const _0x34035e=a40_0x39d4de;switch(_0x13ee28['source']){case _0x34035e(0xab):return _0x34035e(0xef)+a40_0x3f39e[_0x34035e(0xd0)](_0x2a0089)+_0x34035e(0xe2)+a40_0x3f39e[_0x34035e(0xfd)](_0x13ee28[_0x34035e(0xb6)]);case _0x34035e(0xb6):return'Requested\x20version:\x20'+a40_0x3f39e[_0x34035e(0xd0)](_0x2a0089)+'\x20→\x20'+a40_0x3f39e[_0x34035e(0xfd)](_0x13ee28[_0x34035e(0xb6)]);case _0x34035e(0xc3):default:return'Update\x20available:\x20'+a40_0x3f39e[_0x34035e(0xd0)](_0x2a0089)+_0x34035e(0xe2)+a40_0x3f39e[_0x34035e(0xfd)](_0x13ee28[_0x34035e(0xb6)]);}}function repairCurrentBuiltinSkill(){const _0x575884=a40_0x39d4de;console[_0x575884(0xe1)](a40_0x3f39e[_0x575884(0xe8)](_0x575884(0xb9)));const _0x229bf4=installBuiltinSkill();if(_0x229bf4['ok'])return console['log'](a40_0x3f39e['gray'](_0x575884(0xb3)+_0x229bf4['skillVersion']+_0x575884(0xb4))),!![];return console[_0x575884(0xf1)](a40_0x3f39e['yellow'](_0x575884(0xd6)+_0x229bf4[_0x575884(0xfc)]+_0x575884(0xf4)+(_0x229bf4[_0x575884(0xe3)]||'unknown'))),console[_0x575884(0xe1)](a40_0x3f39e[_0x575884(0xe8)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x575884(0xdb))),![];}function verifyUpdatedBuiltinSkill(_0x3f555e){const _0x34fd1a=a40_0x39d4de,_0x3d36ce=inspectInstalledBuiltinSkillVersion(_0x3f555e);if(_0x3d36ce[_0x34fd1a(0xba)]==='current')return console[_0x34fd1a(0xe1)](a40_0x3f39e[_0x34fd1a(0xe8)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x3f555e+_0x34fd1a(0xb4))),!![];const _0x87c358=_0x3d36ce[_0x34fd1a(0xfb)]?_0x34fd1a(0xb8)+_0x3f555e+',\x20found\x20'+_0x3d36ce[_0x34fd1a(0xfb)]:_0x34fd1a(0xb8)+_0x3f555e+_0x34fd1a(0xbc)+_0x3d36ce['state'];return console[_0x34fd1a(0xf1)](a40_0x3f39e['yellow'](_0x34fd1a(0xf6)+_0x87c358)),console[_0x34fd1a(0xe1)](a40_0x3f39e['gray'](_0x34fd1a(0xdc)+_0x3d36ce[_0x34fd1a(0xa9)])),![];}async function execute(_0x9c169a){const _0x40864e=a40_0x39d4de;await validateUpdateFlags(_0x9c169a);const _0xf8f9a2=getCurrentVersion();console[_0x40864e(0xe1)](_0x40864e(0xb7)+_0xf8f9a2);const _0x51b84b=a40_0x299d5c(_0x40864e(0xcf))['start'](),_0x3f28fd=await resolveTargetVersion(_0x9c169a);if(!_0x3f28fd){const _0x45b77c=_0x9c169a['bool'](_0x40864e(0xab))?_0x40864e(0xac):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x51b84b[_0x40864e(0xf3)](_0x45b77c),console[_0x40864e(0xe1)](a40_0x3f39e[_0x40864e(0xe8)](_0x40864e(0xc9)+NPM_PACKAGE_NAME+_0x40864e(0xce))),{'ok':![],'message':_0x45b77c};}const _0x484e9d=a40_0x525fcc[_0x40864e(0xae)](VERSION),_0x401155=a40_0x525fcc[_0x40864e(0xae)](_0x3f28fd[_0x40864e(0xb6)]);if(!_0x484e9d||!_0x401155)return _0x51b84b[_0x40864e(0xf3)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x40864e(0xd8)};if(!shouldInstallTarget(_0x484e9d,_0x3f28fd)){const _0x3ae112=_0x3f28fd[_0x40864e(0xb2)]===_0x40864e(0xb6)?_0x40864e(0xbb)+_0x3f28fd['version']+')':a40_0x525fcc['gt'](_0x484e9d,_0x401155)?_0x40864e(0xc1)+_0xf8f9a2+_0x40864e(0xe9)+_0x3f28fd[_0x40864e(0xb6)]:_0x40864e(0xca)+_0x3f28fd[_0x40864e(0xb6)]+')';return _0x51b84b[_0x40864e(0xea)](_0x3ae112),{'ok':repairCurrentBuiltinSkill()};}_0x51b84b[_0x40864e(0xda)](getInstallPlanLabel(_0xf8f9a2,_0x3f28fd));const _0x230be6=detectPackageManager(),_0x2cfadf=_0x230be6===_0x40864e(0xcb)?resolveNpmBin(_0x40864e(0xcb)):_0x230be6,_0x23cb64=a40_0x299d5c(_0x40864e(0xf8)+_0x230be6+_0x40864e(0xc0))[_0x40864e(0xe5)]();try{return await execa(_0x2cfadf,['install','-g',NPM_PACKAGE_NAME+'@'+_0x3f28fd['version']],{'stdio':_0x40864e(0xc5)}),_0x23cb64[_0x40864e(0xea)](_0x40864e(0xe4)+_0x3f28fd['version']),console['log'](a40_0x3f39e[_0x40864e(0xe8)](_0x40864e(0xd2))),{'ok':verifyUpdatedBuiltinSkill(_0x3f28fd['version'])};}catch(_0x2de5eb){return _0x23cb64[_0x40864e(0xf3)](_0x40864e(0xf9)),console[_0x40864e(0xe3)](a40_0x3f39e[_0x40864e(0xb1)]('\x20\x20'+_0x2de5eb['message'])),console[_0x40864e(0xe1)](a40_0x3f39e[_0x40864e(0xe8)]('\x20\x20Try\x20manually:\x20'+_0x230be6+_0x40864e(0xc7)+NPM_PACKAGE_NAME+'@'+_0x3f28fd[_0x40864e(0xb6)])),{'ok':![],'message':_0x2de5eb[_0x40864e(0xd4)]};}}export const updateDefinition={'service':'update','command':'run','description':a40_0x39d4de(0xd5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x3f5b0d=a40_0x4d40;(function(_0x3b7e36,_0x2f9911){const _0x136cbc=a40_0x4d40,_0x45ad3b=_0x3b7e36();while(!![]){try{const _0x10953a=-parseInt(_0x136cbc(0xba))/0x1*(parseInt(_0x136cbc(0xab))/0x2)+-parseInt(_0x136cbc(0xd6))/0x3*(parseInt(_0x136cbc(0x9b))/0x4)+-parseInt(_0x136cbc(0xcc))/0x5*(parseInt(_0x136cbc(0xb7))/0x6)+parseInt(_0x136cbc(0xbe))/0x7+parseInt(_0x136cbc(0xc2))/0x8+parseInt(_0x136cbc(0xdd))/0x9+parseInt(_0x136cbc(0xbc))/0xa;if(_0x10953a===_0x2f9911)break;else _0x45ad3b['push'](_0x45ad3b['shift']());}catch(_0x320573){_0x45ad3b['push'](_0x45ad3b['shift']());}}}(a40_0x1f70,0x99b0c));import a40_0x4a8031 from'chalk';import a40_0x16641d from'ora';import a40_0x43f7bd 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';function a40_0x1f70(){const _0x4148b0=['Update\x20available:\x20','string','@latest','4997176UEISpu','beta','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag',',\x20found\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','/dist-tags','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','fail','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','12415Hiqdff','bool','Already\x20up\x20to\x20date\x20(v','...','Version\x20comparison\x20failed','gray','update','state','Requested\x20version:\x20',']:\x20','14631CuqBEP','Invalid\x20version:\x20','warn','\x20install\x20-g\x20','includes','pipe','object','9834417uKfjcv','\x20is\x20up\x20to\x20date.','message','fromEntries','read','Updated\x20to\x20v','https://registry.npmjs.org/-/package/','succeed','current','skillVersion','code','Current\x20version\x20v','filter','install','\x20→\x20','\x20cli-skill\x20install','\x20\x20Run\x20manually:\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','entries','repairCommand','520tfDfvF','validation','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','str','Beta\x20version:\x20','trim','slice','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','start','Current\x20version:\x20','valid','Updating\x20via\x20','log','timeout','run','\x20\x20CLI\x20Built-in\x20Skill\x20','766acoibm','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source','green','red','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','yellow','latest','json','\x20\x20Try\x20manually:\x20','Update\x20failed','npm','2748QqlWTQ','info','unknown','968jPOSiE','Checking\x20for\x20updates...','8564000zrGtzf','boolean','1384068aDRzeG'];a40_0x1f70=function(){return _0x4148b0;};return a40_0x1f70();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x1868e8=a40_0x4d40;return GIT_COMMIT!==_0x1868e8(0xb9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1868e8(0xa1)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x490a94=a40_0x4d40,_0x22ee94=process['execPath']['toLowerCase']();if(_0x22ee94[_0x490a94(0xda)]('bun'))return'bun';return _0x490a94(0xb6);}const updateFlags=[{'name':'beta','type':a40_0x3f5b0d(0xbd),'description':a40_0x3f5b0d(0xc5),'default':![]},{'name':a40_0x3f5b0d(0xc4),'type':a40_0x3f5b0d(0xc0),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x4df23b){const _0x3ec33b=a40_0x3f5b0d;return _0x4df23b[_0x3ec33b(0x9e)](_0x3ec33b(0xc4))[_0x3ec33b(0xa0)]();}async function validateUpdateFlags(_0x16d1bd){const _0x21c7e9=a40_0x3f5b0d,_0x458481=_0x16d1bd['bool'](_0x21c7e9(0xc3)),_0x5202f2=getRequestedVersion(_0x16d1bd);if(_0x458481&&_0x5202f2)throw CliErrors[_0x21c7e9(0x9c)](_0x21c7e9(0x9d),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x5202f2&&!a40_0x43f7bd[_0x21c7e9(0xa5)](_0x5202f2))throw CliErrors[_0x21c7e9(0x9c)](_0x21c7e9(0xd7)+_0x5202f2,_0x21c7e9(0xc9));}async function fetchNpmDistTags(){const _0x3ab091=a40_0x3f5b0d;try{const _0x4e09c1=await fetch(_0x3ab091(0xe3)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3ab091(0xc8),{'signal':AbortSignal[_0x3ab091(0xa8)](0x2710)});if(!_0x4e09c1['ok'])return null;const _0x19f73d=await _0x4e09c1[_0x3ab091(0xb3)]();if(!_0x19f73d||typeof _0x19f73d!==_0x3ab091(0xdc))return null;return Object[_0x3ab091(0xe0)](Object[_0x3ab091(0x99)](_0x19f73d)[_0x3ab091(0xe9)](([,_0x7c0111])=>typeof _0x7c0111==='string'&&_0x7c0111[_0x3ab091(0xa0)]()['length']>0x0)['map'](([_0x1a7822,_0x353bc3])=>[_0x1a7822,String(_0x353bc3)[_0x3ab091(0xa0)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5df1b7){const _0x410331=await fetchNpmDistTags();return _0x410331?.[_0x5df1b7]??null;}async function fetchLatestVersion(){const _0x1e37fd=a40_0x3f5b0d;return fetchNpmDistTagVersion(_0x1e37fd(0xb2));}function a40_0x4d40(_0x1bb79a,_0x5190b4){_0x1bb79a=_0x1bb79a-0x98;const _0x1f7096=a40_0x1f70();let _0x4d4072=_0x1f7096[_0x1bb79a];return _0x4d4072;}async function resolveTargetVersion(_0x29211d){const _0x3cce3b=a40_0x3f5b0d,_0x48802a=getRequestedVersion(_0x29211d);if(_0x48802a)return{'version':_0x48802a,'source':_0x3cce3b(0xc4)};if(_0x29211d[_0x3cce3b(0xcd)](_0x3cce3b(0xc3))){const _0x207c02=await fetchNpmDistTagVersion(_0x3cce3b(0xc3));if(!_0x207c02)return null;return{'version':_0x207c02,'source':_0x3cce3b(0xc3)};}const _0x2a9887=await fetchLatestVersion();if(!_0x2a9887)return null;return{'version':_0x2a9887,'source':_0x3cce3b(0xb2)};}function shouldInstallTarget(_0x281c65,_0x3362ba){const _0xe3a908=a40_0x3f5b0d;if(_0x3362ba['source']==='version'||_0x3362ba[_0xe3a908(0xad)]===_0xe3a908(0xc3))return!a40_0x43f7bd['eq'](_0x281c65,_0x3362ba[_0xe3a908(0xc4)]);return a40_0x43f7bd['lt'](_0x281c65,_0x3362ba['version']);}function getInstallPlanLabel(_0x475822,_0x2d22c6){const _0x175cac=a40_0x3f5b0d;switch(_0x2d22c6[_0x175cac(0xad)]){case _0x175cac(0xc3):return _0x175cac(0x9f)+a40_0x4a8031['yellow'](_0x475822)+_0x175cac(0xeb)+a40_0x4a8031[_0x175cac(0xae)](_0x2d22c6[_0x175cac(0xc4)]);case _0x175cac(0xc4):return _0x175cac(0xd4)+a40_0x4a8031[_0x175cac(0xb1)](_0x475822)+_0x175cac(0xeb)+a40_0x4a8031[_0x175cac(0xae)](_0x2d22c6[_0x175cac(0xc4)]);case _0x175cac(0xb2):default:return _0x175cac(0xbf)+a40_0x4a8031[_0x175cac(0xb1)](_0x475822)+_0x175cac(0xeb)+a40_0x4a8031[_0x175cac(0xae)](_0x2d22c6['version']);}}function repairCurrentBuiltinSkill(){const _0x1bf887=a40_0x3f5b0d;console[_0x1bf887(0xa7)](a40_0x4a8031[_0x1bf887(0xd1)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x1103af=installBuiltinSkill();if(_0x1103af['ok'])return console[_0x1bf887(0xa7)](a40_0x4a8031[_0x1bf887(0xd1)](_0x1bf887(0xaa)+_0x1103af[_0x1bf887(0xe6)]+_0x1bf887(0xde))),!![];return console[_0x1bf887(0xd8)](a40_0x4a8031[_0x1bf887(0xb1)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x1103af[_0x1bf887(0xe7)]+_0x1bf887(0xd5)+(_0x1103af['error']||_0x1bf887(0xb9)))),console['log'](a40_0x4a8031[_0x1bf887(0xd1)](_0x1bf887(0xed)+CLI_BIN_NAME+_0x1bf887(0xec))),![];}function verifyUpdatedBuiltinSkill(_0x1a7d22){const _0x56fcda=a40_0x3f5b0d,_0x29ade5=inspectInstalledBuiltinSkillVersion(_0x1a7d22);if(_0x29ade5[_0x56fcda(0xd3)]===_0x56fcda(0xe5))return console[_0x56fcda(0xa7)](a40_0x4a8031['gray'](_0x56fcda(0xaa)+_0x1a7d22+_0x56fcda(0xde))),!![];const _0x2b5540=_0x29ade5['skillVersion']?'expected\x20'+_0x1a7d22+_0x56fcda(0xc6)+_0x29ade5[_0x56fcda(0xe6)]:'expected\x20'+_0x1a7d22+',\x20state\x20'+_0x29ade5[_0x56fcda(0xd3)];return console[_0x56fcda(0xd8)](a40_0x4a8031[_0x56fcda(0xb1)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x2b5540)),console[_0x56fcda(0xa7)](a40_0x4a8031[_0x56fcda(0xd1)]('\x20\x20Run\x20manually:\x20'+_0x29ade5[_0x56fcda(0x9a)])),![];}async function execute(_0xe4e03d){const _0x5b056e=a40_0x3f5b0d;await validateUpdateFlags(_0xe4e03d);const _0x3e13c0=getCurrentVersion();console[_0x5b056e(0xa7)](_0x5b056e(0xa4)+_0x3e13c0);const _0x5504b8=a40_0x16641d(_0x5b056e(0xbb))[_0x5b056e(0xa3)](),_0x4b6435=await resolveTargetVersion(_0xe4e03d);if(!_0x4b6435){const _0x430467=_0xe4e03d['bool'](_0x5b056e(0xc3))?_0x5b056e(0xa2):_0x5b056e(0xb0);return _0x5504b8['fail'](_0x430467),console[_0x5b056e(0xa7)](a40_0x4a8031[_0x5b056e(0xd1)](_0x5b056e(0xc7)+NPM_PACKAGE_NAME+_0x5b056e(0xc1))),{'ok':![],'message':_0x430467};}const _0x18ec46=a40_0x43f7bd['valid'](VERSION),_0x4c2fb2=a40_0x43f7bd[_0x5b056e(0xa5)](_0x4b6435[_0x5b056e(0xc4)]);if(!_0x18ec46||!_0x4c2fb2)return _0x5504b8[_0x5b056e(0xca)](_0x5b056e(0xd0)),{'ok':![],'message':_0x5b056e(0xd0)};if(!shouldInstallTarget(_0x18ec46,_0x4b6435)){const _0xc3a22b=_0x4b6435[_0x5b056e(0xad)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x4b6435[_0x5b056e(0xc4)]+')':a40_0x43f7bd['gt'](_0x18ec46,_0x4c2fb2)?_0x5b056e(0xe8)+_0x3e13c0+_0x5b056e(0x98)+_0x4b6435[_0x5b056e(0xc4)]:_0x5b056e(0xce)+_0x4b6435[_0x5b056e(0xc4)]+')';return _0x5504b8[_0x5b056e(0xe4)](_0xc3a22b),{'ok':repairCurrentBuiltinSkill()};}_0x5504b8[_0x5b056e(0xb8)](getInstallPlanLabel(_0x3e13c0,_0x4b6435));const _0x382bcd=detectPackageManager(),_0x17f9de=_0x382bcd==='npm'?resolveNpmBin('npm'):_0x382bcd,_0x116696=a40_0x16641d(_0x5b056e(0xa6)+_0x382bcd+_0x5b056e(0xcf))[_0x5b056e(0xa3)]();try{return await execa(_0x17f9de,[_0x5b056e(0xea),'-g',NPM_PACKAGE_NAME+'@'+_0x4b6435[_0x5b056e(0xc4)]],{'stdio':_0x5b056e(0xdb)}),_0x116696['succeed'](_0x5b056e(0xe2)+_0x4b6435[_0x5b056e(0xc4)]),console['log'](a40_0x4a8031['gray'](_0x5b056e(0xac))),{'ok':verifyUpdatedBuiltinSkill(_0x4b6435[_0x5b056e(0xc4)])};}catch(_0x2ec4a6){return _0x116696[_0x5b056e(0xca)](_0x5b056e(0xb5)),console['error'](a40_0x4a8031[_0x5b056e(0xaf)]('\x20\x20'+_0x2ec4a6[_0x5b056e(0xdf)])),console[_0x5b056e(0xa7)](a40_0x4a8031[_0x5b056e(0xd1)](_0x5b056e(0xb4)+_0x382bcd+_0x5b056e(0xd9)+NPM_PACKAGE_NAME+'@'+_0x4b6435[_0x5b056e(0xc4)])),{'ok':![],'message':_0x2ec4a6['message']};}}export const updateDefinition={'service':a40_0x3f5b0d(0xd2),'command':a40_0x3f5b0d(0xa9),'description':a40_0x3f5b0d(0xcb),'risk':a40_0x3f5b0d(0xe1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4c348e,_0x5178a3){const _0x35cabc=a41_0x14db,_0x271670=_0x4c348e();while(!![]){try{const _0x549b6f=-parseInt(_0x35cabc(0xd4))/0x1+parseInt(_0x35cabc(0xd6))/0x2+parseInt(_0x35cabc(0xd5))/0x3+parseInt(_0x35cabc(0xd8))/0x4+-parseInt(_0x35cabc(0xda))/0x5+parseInt(_0x35cabc(0xdb))/0x6+parseInt(_0x35cabc(0xd9))/0x7*(-parseInt(_0x35cabc(0xd7))/0x8);if(_0x549b6f===_0x5178a3)break;else _0x271670['push'](_0x271670['shift']());}catch(_0x336ffb){_0x271670['push'](_0x271670['shift']());}}}(a41_0x14ad,0xcd29f));function a41_0x14db(_0x118b7a,_0x9b725c){_0x118b7a=_0x118b7a-0xd4;const _0x14ad90=a41_0x14ad();let _0x14db55=_0x14ad90[_0x118b7a];return _0x14db55;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x14ad(){const _0x1bdaf7=['2853190TtODuJ','6328266gaaXTK','1488441ezoyEC','1404225TXaoiz','3300872WZjnFi','13747336wHwgFW','5778500gnJhsp','7AABLNk'];a41_0x14ad=function(){return _0x1bdaf7;};return a41_0x14ad();}
1
+ function a41_0x5799(){const _0x3d2a46=['14tHEOSr','6661752cguVrs','12139183aXuBVV','6016638KbWfac','1311507JQbzOV','650244xwrsGo','62741704Dgrsfz','8645635PzNKrm'];a41_0x5799=function(){return _0x3d2a46;};return a41_0x5799();}(function(_0x502b67,_0x59855b){const _0x31ae7a=a41_0x6471,_0xe76d19=_0x502b67();while(!![]){try{const _0x1fc03b=-parseInt(_0x31ae7a(0x1f5))/0x1+-parseInt(_0x31ae7a(0x1f1))/0x2*(parseInt(_0x31ae7a(0x1f6))/0x3)+-parseInt(_0x31ae7a(0x1f2))/0x4+-parseInt(_0x31ae7a(0x1f8))/0x5+parseInt(_0x31ae7a(0x1f4))/0x6+-parseInt(_0x31ae7a(0x1f3))/0x7+parseInt(_0x31ae7a(0x1f7))/0x8;if(_0x1fc03b===_0x59855b)break;else _0xe76d19['push'](_0xe76d19['shift']());}catch(_0x490334){_0xe76d19['push'](_0xe76d19['shift']());}}}(a41_0x5799,0xd8cc9));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x6471(_0x50d042,_0x5e450e){_0x50d042=_0x50d042-0x1f1;const _0x579906=a41_0x5799();let _0x647120=_0x579906[_0x50d042];return _0x647120;}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x60366f=a42_0x92af;(function(_0x6f09d6,_0x119e7e){const _0x4ddfb1=a42_0x92af,_0x35531b=_0x6f09d6();while(!![]){try{const _0x59c95d=parseInt(_0x4ddfb1(0x1d1))/0x1*(parseInt(_0x4ddfb1(0x1d5))/0x2)+-parseInt(_0x4ddfb1(0x1cd))/0x3*(-parseInt(_0x4ddfb1(0x1c4))/0x4)+parseInt(_0x4ddfb1(0x1c2))/0x5*(-parseInt(_0x4ddfb1(0x1cf))/0x6)+-parseInt(_0x4ddfb1(0x1d2))/0x7+-parseInt(_0x4ddfb1(0x1ce))/0x8+-parseInt(_0x4ddfb1(0x1cb))/0x9*(parseInt(_0x4ddfb1(0x1cc))/0xa)+-parseInt(_0x4ddfb1(0x1c1))/0xb*(-parseInt(_0x4ddfb1(0x1c6))/0xc);if(_0x59c95d===_0x119e7e)break;else _0x35531b['push'](_0x35531b['shift']());}catch(_0x1479f5){_0x35531b['push'](_0x35531b['shift']());}}}(a42_0x3590,0xc3a2e));function a42_0x92af(_0x15421e,_0x2e4bd7){_0x15421e=_0x15421e-0x1c0;const _0x3590e9=a42_0x3590();let _0x92afce=_0x3590e9[_0x15421e];return _0x92afce;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x3590(){const _0x523c7e=['operation','codegen','alias','tableName','1924614IEJKJy','10MOTYZT','2409WIyOZG','9869208bLcWql','7514838pMlChs','str','13pXXLXA','10311126OVKWBj','read','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','146654dvLFny','string','skip-imports','253diLtSa','5sSEyUK','appCode','7276OwHRwO','code','1335864LLgHkn'];a42_0x3590=function(){return _0x523c7e;};return a42_0x3590();}export const codegenSdk={'service':a42_0x60366f(0x1c8),'command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x60366f(0x1d3),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x60366f(0x1c9),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x60366f(0x1c7),'type':a42_0x60366f(0x1d6),'required':!![],'description':a42_0x60366f(0x1d4)},{'name':'skip-imports','type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1359f2){const _0x2aba5f=a42_0x60366f,{dataset:_0x134dfa,operation:_0x34102a}=await getOperationDetail(_0x1359f2[_0x2aba5f(0x1c3)],_0x1359f2[_0x2aba5f(0x1d0)](_0x2aba5f(0x1c5)),_0x1359f2['str'](_0x2aba5f(0x1c7))),_0x289bfa=generateSdkCode(_0x134dfa,_0x34102a,{'includeImports':!_0x1359f2['bool'](_0x2aba5f(0x1c0))});return{'ok':!![],'data':{'dataset':{'name':_0x134dfa['name'],'code':_0x134dfa['code'],'tableName':_0x134dfa[_0x2aba5f(0x1ca)]},'operation':_0x1359f2[_0x2aba5f(0x1d0)](_0x2aba5f(0x1c7)),'code':_0x289bfa}};}};
1
+ const a42_0xc50469=a42_0x3f0b;(function(_0x5ea044,_0x49a6e7){const _0x28f2c3=a42_0x3f0b,_0x1df8ce=_0x5ea044();while(!![]){try{const _0x6e620f=-parseInt(_0x28f2c3(0x1e5))/0x1+parseInt(_0x28f2c3(0x1e8))/0x2+-parseInt(_0x28f2c3(0x1e9))/0x3*(parseInt(_0x28f2c3(0x1db))/0x4)+parseInt(_0x28f2c3(0x1eb))/0x5*(-parseInt(_0x28f2c3(0x1e0))/0x6)+parseInt(_0x28f2c3(0x1ec))/0x7+-parseInt(_0x28f2c3(0x1df))/0x8*(-parseInt(_0x28f2c3(0x1f0))/0x9)+-parseInt(_0x28f2c3(0x1e1))/0xa*(-parseInt(_0x28f2c3(0x1ee))/0xb);if(_0x6e620f===_0x49a6e7)break;else _0x1df8ce['push'](_0x1df8ce['shift']());}catch(_0x3d165f){_0x1df8ce['push'](_0x1df8ce['shift']());}}}(a42_0x4ff7,0x40cda));function a42_0x3f0b(_0x37575e,_0x45020d){_0x37575e=_0x37575e-0x1d9;const _0x4ff738=a42_0x4ff7();let _0x3f0bbb=_0x4ff738[_0x37575e];return _0x3f0bbb;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x4ff7(){const _0x303a7d=['boolean','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','8vQdxJA','138qjVmRK','371130PdCvqW','str','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','skip-imports','414187UWEJqg','sdk','codegen','859630DXoMjE','2313EMRpEi','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','68165TuDoNc','1719893ymgwtR','appCode','11QiMjxw','code','3940533ldDrUH','Omit\x20import\x20statements\x20from\x20generated\x20code','string','operation','read','alias','tableName','816XvjryW','name'];a42_0x4ff7=function(){return _0x303a7d;};return a42_0x4ff7();}export const codegenSdk={'service':a42_0xc50469(0x1e7),'command':a42_0xc50469(0x1e6),'description':a42_0xc50469(0x1de),'risk':a42_0xc50469(0x1f4),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0xc50469(0x1d9),'type':a42_0xc50469(0x1f2),'description':a42_0xc50469(0x1ea)},{'name':a42_0xc50469(0x1f3),'type':a42_0xc50469(0x1f2),'required':!![],'description':a42_0xc50469(0x1e3)},{'name':'skip-imports','type':a42_0xc50469(0x1dd),'description':a42_0xc50469(0x1f1)}],async 'execute'(_0xbf9de8){const _0x3042d4=a42_0xc50469,{dataset:_0x376936,operation:_0x142ceb}=await getOperationDetail(_0xbf9de8[_0x3042d4(0x1ed)],_0xbf9de8[_0x3042d4(0x1e2)]('code'),_0xbf9de8['str']('operation')),_0xff404=generateSdkCode(_0x376936,_0x142ceb,{'includeImports':!_0xbf9de8['bool'](_0x3042d4(0x1e4))});return{'ok':!![],'data':{'dataset':{'name':_0x376936[_0x3042d4(0x1dc)],'code':_0x376936[_0x3042d4(0x1ef)],'tableName':_0x376936[_0x3042d4(0x1da)]},'operation':_0xbf9de8[_0x3042d4(0x1e2)](_0x3042d4(0x1f3)),'code':_0xff404}};}};
@@ -1 +1 @@
1
- const a43_0x38c7ae=a43_0x497a;(function(_0x4e1749,_0x40e9d8){const _0x1c8536=a43_0x497a,_0x5bdac2=_0x4e1749();while(!![]){try{const _0x13937f=-parseInt(_0x1c8536(0x18c))/0x1*(-parseInt(_0x1c8536(0x196))/0x2)+parseInt(_0x1c8536(0x195))/0x3+parseInt(_0x1c8536(0x18e))/0x4+-parseInt(_0x1c8536(0x192))/0x5*(-parseInt(_0x1c8536(0x194))/0x6)+parseInt(_0x1c8536(0x187))/0x7+parseInt(_0x1c8536(0x189))/0x8*(parseInt(_0x1c8536(0x18f))/0x9)+-parseInt(_0x1c8536(0x198))/0xa;if(_0x13937f===_0x40e9d8)break;else _0x5bdac2['push'](_0x5bdac2['shift']());}catch(_0x408fc4){_0x5bdac2['push'](_0x5bdac2['shift']());}}}(a43_0x595f,0x49c32));function a43_0x497a(_0x8d104b,_0x40928d){_0x8d104b=_0x8d104b-0x187;const _0x595f74=a43_0x595f();let _0x497adb=_0x595f74[_0x8d104b];return _0x497adb;}function a43_0x595f(){const _0xfd7ec7=['bool','6alUtYh','388623gcfphA','1151494saDzLl','codegen','10464720yWjOUX','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','boolean','sql','appCode','no-imports','sqlcode','415870BpSNAh','sdk','1912hvJxwg','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','1GwyGXk','str','34776REVfOP','14301TNkyqA','read','sqlCode','977195FfXdNW'];a43_0x595f=function(){return _0xfd7ec7;};return a43_0x595f();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x38c7ae(0x197),'command':a43_0x38c7ae(0x19b),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0x38c7ae(0x190),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a43_0x38c7ae(0x199),'default':a43_0x38c7ae(0x188),'enum':[a43_0x38c7ae(0x188),'bff']},{'name':a43_0x38c7ae(0x19d),'type':a43_0x38c7ae(0x19a),'description':a43_0x38c7ae(0x18b)}],async 'execute'(_0x6222af){const _0x2b110f=a43_0x38c7ae,_0x17e973=await getSqlQueryInfo(_0x6222af[_0x2b110f(0x19c)],_0x6222af[_0x2b110f(0x18d)](_0x2b110f(0x19e))),_0x28369e=_0x6222af['str']('target')||_0x2b110f(0x188),_0x1c3dc1=generateSqlCodeTemplate(_0x17e973,{'target':_0x28369e,'includeImports':!_0x6222af[_0x2b110f(0x193)](_0x2b110f(0x19d))});return{'ok':!![],'data':{'sqlCode':_0x17e973[_0x2b110f(0x191)],'sqlName':_0x17e973[_0x2b110f(0x18a)],'target':_0x28369e,'code':_0x1c3dc1}};}};
1
+ const a43_0x50e842=a43_0x267c;(function(_0x34f9ba,_0x5d98a7){const _0x15d749=a43_0x267c,_0x1a2397=_0x34f9ba();while(!![]){try{const _0x23f532=parseInt(_0x15d749(0xc0))/0x1*(-parseInt(_0x15d749(0xba))/0x2)+parseInt(_0x15d749(0xb6))/0x3*(parseInt(_0x15d749(0xce))/0x4)+parseInt(_0x15d749(0xbf))/0x5*(parseInt(_0x15d749(0xca))/0x6)+-parseInt(_0x15d749(0xc7))/0x7+-parseInt(_0x15d749(0xc8))/0x8+parseInt(_0x15d749(0xc6))/0x9+parseInt(_0x15d749(0xbd))/0xa*(parseInt(_0x15d749(0xb5))/0xb);if(_0x23f532===_0x5d98a7)break;else _0x1a2397['push'](_0x1a2397['shift']());}catch(_0x5e3e47){_0x1a2397['push'](_0x1a2397['shift']());}}}(a43_0x3e7b,0x33ac0));function a43_0x3e7b(){const _0x5a35be=['313790FKbsuz','codegen','45kRfShJ','1EAJFfA','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','boolean','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','appCode','string','686736qRRxDK','2006683vAsVkA','3064320xDgJTz','sqlcode','173790aCeSYF','sqlCode','no-imports','sdk','11532LHZNhG','bool','sqlName','55GzkyfA','429FCDHUo','Omit\x20import\x20statements\x20from\x20generated\x20code','read','target','49592tDckPG','str','sql'];a43_0x3e7b=function(){return _0x5a35be;};return a43_0x3e7b();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x267c(_0x77e4bf,_0x3376b2){_0x77e4bf=_0x77e4bf-0xb4;const _0x3e7b5d=a43_0x3e7b();let _0x267ce7=_0x3e7b5d[_0x77e4bf];return _0x267ce7;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x50e842(0xbe),'command':a43_0x50e842(0xbc),'description':a43_0x50e842(0xc1),'risk':a43_0x50e842(0xb8),'flags':[SQLCODE_FLAG,{'name':a43_0x50e842(0xb9),'type':a43_0x50e842(0xc5),'description':a43_0x50e842(0xc3),'default':a43_0x50e842(0xcd),'enum':[a43_0x50e842(0xcd),'bff']},{'name':a43_0x50e842(0xcc),'type':a43_0x50e842(0xc2),'description':a43_0x50e842(0xb7)}],async 'execute'(_0x2caef5){const _0x410b0d=a43_0x50e842,_0xb4319c=await getSqlQueryInfo(_0x2caef5[_0x410b0d(0xc4)],_0x2caef5[_0x410b0d(0xbb)](_0x410b0d(0xc9))),_0x268007=_0x2caef5[_0x410b0d(0xbb)]('target')||_0x410b0d(0xcd),_0x517968=generateSqlCodeTemplate(_0xb4319c,{'target':_0x268007,'includeImports':!_0x2caef5[_0x410b0d(0xcf)](_0x410b0d(0xcc))});return{'ok':!![],'data':{'sqlCode':_0xb4319c[_0x410b0d(0xcb)],'sqlName':_0xb4319c[_0x410b0d(0xb4)],'target':_0x268007,'code':_0x517968}};}};
@@ -1 +1 @@
1
- (function(_0x2abcd9,_0x32b9a9){const _0x41c4a7=a44_0x54d0,_0x54934d=_0x2abcd9();while(!![]){try{const _0x4adf8a=parseInt(_0x41c4a7(0x210))/0x1*(-parseInt(_0x41c4a7(0x1ef))/0x2)+parseInt(_0x41c4a7(0x1f9))/0x3*(parseInt(_0x41c4a7(0x206))/0x4)+parseInt(_0x41c4a7(0x1fd))/0x5+parseInt(_0x41c4a7(0x215))/0x6*(parseInt(_0x41c4a7(0x214))/0x7)+parseInt(_0x41c4a7(0x216))/0x8*(parseInt(_0x41c4a7(0x217))/0x9)+parseInt(_0x41c4a7(0x212))/0xa+-parseInt(_0x41c4a7(0x1ff))/0xb*(parseInt(_0x41c4a7(0x1f2))/0xc);if(_0x4adf8a===_0x32b9a9)break;else _0x54934d['push'](_0x54934d['shift']());}catch(_0x22662e){_0x54934d['push'](_0x54934d['shift']());}}}(a44_0x5ae0,0x947b1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a44_0x5ae0(){const _0x177a86=['593884zBlOPT','bool','flagMissing','args','\x20Default\x20app\x20changed\x20to\x20\x22','projectConfig','App\x20code','keys','Usage:\x20','App\x20\x22','1fLRmrm','appcode','7364470DNZlPQ','validation','43645xplaGb','1074SEIIeq','56kVfXdo','149067NnBoqM','apps','globalConfig','\x20<name>','\x22\x20(appcode:\x20','1922836vZclZI','\x20Note:\x20app\x20\x22','length','7973904PFSNRJ','\x20app\x20\x22','global','\x20<name>\x20[--global]','boolean','trim','object','24Yrjmuw','project','\x20Remaining\x20app\x20\x22','\x20Default\x20app\x20is\x20\x22','2034250bjSETs','Missing\x20app\x20name.','33shcWzK','Use\x20global\x20config\x20scope','str','\x20config.','defaultApp','\x22\x20not\x20found.','string'];a44_0x5ae0=function(){return _0x177a86;};return a44_0x5ae0();}export function buildAppAddFlags(){const _0x6b7704=a44_0x54d0;return[{'name':'appcode','type':_0x6b7704(0x205),'description':_0x6b7704(0x20c),'required':!![]},{'name':'global','type':_0x6b7704(0x1f6),'description':_0x6b7704(0x200),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x873045=a44_0x54d0;return[{'name':'global','type':_0x873045(0x1f6),'description':'Use\x20global\x20config\x20scope','default':![]}];}function a44_0x54d0(_0x2613e2,_0x5e8418){_0x2613e2=_0x2613e2-0x1eb;const _0x5ae016=a44_0x5ae0();let _0x54d0ee=_0x5ae016[_0x2613e2];return _0x54d0ee;}export async function validateAppName(_0x1a27aa,_0x23a49f){const _0x1df5b9=a44_0x54d0,_0x6435b8=_0x1a27aa[_0x1df5b9(0x209)][0x0]?.['trim']();if(!_0x6435b8)throw CliErrors[_0x1df5b9(0x213)](_0x1df5b9(0x1fe),_0x1df5b9(0x20e)+CLI_BIN_NAME+'\x20'+_0x23a49f+_0x1df5b9(0x1ed));}export async function runAppAdd(_0x153c95,_0x257045){const _0x105282=a44_0x54d0,_0x53ede5=_0x153c95[_0x105282(0x209)][0x0]?.[_0x105282(0x1f7)]();if(!_0x53ede5)throw CliErrors[_0x105282(0x213)]('Missing\x20app\x20name.',_0x105282(0x20e)+CLI_BIN_NAME+'\x20'+_0x257045+'\x20<name>\x20--appcode\x20<code>');const _0x23349d=_0x153c95[_0x105282(0x201)](_0x105282(0x211));if(!_0x23349d)throw CliErrors[_0x105282(0x208)]('appcode',_0x105282(0x20e)+CLI_BIN_NAME+'\x20'+_0x257045+'\x20<name>\x20--appcode\x20<code>');const _0x33599d={'global':_0x153c95['bool'](_0x105282(0x1f4))},_0x204244=readConfig(_0x33599d);if(!_0x204244[_0x105282(0x1eb)])_0x204244[_0x105282(0x1eb)]={};const _0x294281={'appcode':_0x23349d,...collectAppProfileOverrides(_0x18b6bb=>_0x153c95[_0x105282(0x201)](_0x18b6bb))},_0x3a7e15=_0x204244[_0x105282(0x1eb)],_0x236481=Object[_0x105282(0x20d)](_0x3a7e15),_0x266d98=typeof _0x204244['defaultApp']===_0x105282(0x205)&&_0x3a7e15[_0x204244['defaultApp']]?_0x204244[_0x105282(0x203)]:_0x236481[_0x105282(0x1f1)]===0x1?_0x236481[0x0]:undefined,_0x3702e6=!!_0x3a7e15[_0x53ede5];_0x3a7e15[_0x53ede5]=_0x294281;const _0x538acb=normalizeStoredDefaultApp(_0x204244,_0x266d98);writeConfig(_0x204244,_0x33599d);const _0x43b181=!_0x3702e6&&_0x538acb?_0x105282(0x1fc)+_0x538acb+'\x22.':'',_0x379d42=(_0x3702e6?'Updated':'Added')+_0x105282(0x1f3)+_0x53ede5+_0x105282(0x1ee)+_0x23349d+')'+scopeLabel(_0x33599d)+'.'+_0x43b181;return{'ok':!![],'message':_0x379d42};}export async function runAppRemove(_0x59321a,_0x1a8046){const _0x1a183e=a44_0x54d0,_0x3cfb3f=_0x59321a['args'][0x0]?.['trim']();if(!_0x3cfb3f)throw CliErrors[_0x1a183e(0x213)](_0x1a183e(0x1fe),_0x1a183e(0x20e)+CLI_BIN_NAME+'\x20'+_0x1a8046+_0x1a183e(0x1f5));const _0x25894d=_0x59321a[_0x1a183e(0x207)](_0x1a183e(0x1f4)),{config:_0x5cdd9c,layers:_0x74ff4c}=readRawConfigWithLayers(),_0x1341d1=_0x5cdd9c[_0x1a183e(0x1eb)]??{};if(!_0x1341d1[_0x3cfb3f])throw CliErrors[_0x1a183e(0x213)](_0x1a183e(0x20f)+_0x3cfb3f+'\x22\x20not\x20found.');const _0x45c2ad=_0x74ff4c[_0x1a183e(0x1ec)][_0x1a183e(0x1eb)]&&typeof _0x74ff4c[_0x1a183e(0x1ec)][_0x1a183e(0x1eb)]===_0x1a183e(0x1f8)?_0x74ff4c[_0x1a183e(0x1ec)]['apps']:{},_0x30fb91=_0x74ff4c[_0x1a183e(0x20b)][_0x1a183e(0x1eb)]&&typeof _0x74ff4c[_0x1a183e(0x20b)]['apps']==='object'?_0x74ff4c['projectConfig'][_0x1a183e(0x1eb)]:{},_0x1c7397=appDefinedIn(_0x3cfb3f,_0x45c2ad,_0x30fb91),_0x340e7a=resolveAppScopeForWrite(_0x3cfb3f,_0x25894d,_0x74ff4c),_0x4fc206={'global':_0x340e7a==='global'},_0x48af2a=readConfig(_0x4fc206),_0x245e4f=_0x48af2a['apps'];if(!_0x245e4f||!_0x245e4f[_0x3cfb3f])throw CliErrors['validation'](_0x1a183e(0x20f)+_0x3cfb3f+_0x1a183e(0x204));delete _0x245e4f[_0x3cfb3f];let _0xc6380c='';const _0x586c2e=typeof _0x48af2a[_0x1a183e(0x203)]===_0x1a183e(0x205)?_0x48af2a['defaultApp']:undefined,_0x1d892d=Object[_0x1a183e(0x20d)](_0x245e4f),_0x456e9f=_0x586c2e===_0x3cfb3f?_0x1d892d[0x0]:_0x586c2e,_0x53517a=normalizeStoredDefaultApp(_0x48af2a,_0x456e9f);if(_0x586c2e===_0x3cfb3f&&_0x1d892d[_0x1a183e(0x1f1)]===0x1)_0xc6380c=_0x1a183e(0x1fb)+_0x1d892d[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x586c2e===_0x3cfb3f&&_0x53517a&&(_0xc6380c=_0x1a183e(0x20a)+_0x53517a+'\x22.');Object[_0x1a183e(0x20d)](_0x245e4f)[_0x1a183e(0x1f1)]===0x0&&(delete _0x48af2a[_0x1a183e(0x1eb)],delete _0x48af2a[_0x1a183e(0x203)]);writeConfig(_0x48af2a,_0x4fc206);const _0x4fa4bd=_0x1c7397==='both'?_0x1a183e(0x1f0)+_0x3cfb3f+'\x22\x20still\x20defined\x20in\x20'+(_0x340e7a===_0x1a183e(0x1fa)?'global':_0x1a183e(0x1fa))+_0x1a183e(0x202):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x3cfb3f+'\x22'+scopeLabel(_0x4fc206)+'.'+_0xc6380c+_0x4fa4bd};}
1
+ (function(_0x54ea7b,_0x4f7bae){const _0x571fbc=a44_0x2c2c,_0x49e30f=_0x54ea7b();while(!![]){try{const _0x1e2df9=parseInt(_0x571fbc(0x189))/0x1+-parseInt(_0x571fbc(0x19e))/0x2*(parseInt(_0x571fbc(0x1a3))/0x3)+-parseInt(_0x571fbc(0x199))/0x4*(-parseInt(_0x571fbc(0x1a1))/0x5)+-parseInt(_0x571fbc(0x19f))/0x6+-parseInt(_0x571fbc(0x1aa))/0x7*(-parseInt(_0x571fbc(0x196))/0x8)+-parseInt(_0x571fbc(0x1a0))/0x9+parseInt(_0x571fbc(0x186))/0xa;if(_0x1e2df9===_0x4f7bae)break;else _0x49e30f['push'](_0x49e30f['shift']());}catch(_0x25e4d7){_0x49e30f['push'](_0x49e30f['shift']());}}}(a44_0x34ee,0x59f12));function a44_0x34ee(){const _0x2206b0=['length','boolean','163740BnBnUl','3621954bahqtX','3520440AtQdQj','5RBxKLU','Added','6CuTXWe','Use\x20global\x20config\x20scope','\x20app\x20\x22','project','Missing\x20app\x20name.','string','validation','107723bblLqW','\x22\x20is\x20selected\x20automatically.','\x20Default\x20app\x20is\x20\x22','\x20<name>\x20--appcode\x20<code>','bool','App\x20code','both','trim','\x20Remaining\x20app\x20\x22','12297070NyYNVM','\x22\x20still\x20defined\x20in\x20','keys','260944iYMxQp','defaultApp','appcode','global','args','\x20config.','\x20Note:\x20app\x20\x22','apps','\x20<name>\x20[--global]','object','str','\x22\x20not\x20found.','projectConfig','8Mmnszj','flagMissing','globalConfig','83684lQEvYj','Usage:\x20','Removed\x20app\x20\x22'];a44_0x34ee=function(){return _0x2206b0;};return a44_0x34ee();}function a44_0x2c2c(_0x413468,_0x58938f){_0x413468=_0x413468-0x17f;const _0x34eed8=a44_0x34ee();let _0x2c2c27=_0x34eed8[_0x413468];return _0x2c2c27;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x4387c8=a44_0x2c2c;return[{'name':_0x4387c8(0x18b),'type':_0x4387c8(0x1a8),'description':_0x4387c8(0x182),'required':!![]},{'name':_0x4387c8(0x18c),'type':_0x4387c8(0x19d),'description':_0x4387c8(0x1a4),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4cf4c7=a44_0x2c2c;return[{'name':'global','type':_0x4cf4c7(0x19d),'description':_0x4cf4c7(0x1a4),'default':![]}];}export async function validateAppName(_0x59c34d,_0x1f9a83){const _0x27c67b=a44_0x2c2c,_0x54f4f5=_0x59c34d[_0x27c67b(0x18d)][0x0]?.[_0x27c67b(0x184)]();if(!_0x54f4f5)throw CliErrors[_0x27c67b(0x1a9)](_0x27c67b(0x1a7),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1f9a83+'\x20<name>');}export async function runAppAdd(_0x41d906,_0x2f4c44){const _0x11ad1b=a44_0x2c2c,_0x406194=_0x41d906['args'][0x0]?.[_0x11ad1b(0x184)]();if(!_0x406194)throw CliErrors[_0x11ad1b(0x1a9)](_0x11ad1b(0x1a7),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2f4c44+'\x20<name>\x20--appcode\x20<code>');const _0x50e4fe=_0x41d906[_0x11ad1b(0x193)](_0x11ad1b(0x18b));if(!_0x50e4fe)throw CliErrors[_0x11ad1b(0x197)](_0x11ad1b(0x18b),_0x11ad1b(0x19a)+CLI_BIN_NAME+'\x20'+_0x2f4c44+_0x11ad1b(0x180));const _0x164079={'global':_0x41d906[_0x11ad1b(0x181)](_0x11ad1b(0x18c))},_0x52ab0b=readConfig(_0x164079);if(!_0x52ab0b[_0x11ad1b(0x190)])_0x52ab0b[_0x11ad1b(0x190)]={};const _0x5abb85={'appcode':_0x50e4fe,...collectAppProfileOverrides(_0x42a6aa=>_0x41d906[_0x11ad1b(0x193)](_0x42a6aa))},_0x587c33=_0x52ab0b[_0x11ad1b(0x190)],_0x2936ef=Object[_0x11ad1b(0x188)](_0x587c33),_0x5f52da=typeof _0x52ab0b[_0x11ad1b(0x18a)]===_0x11ad1b(0x1a8)&&_0x587c33[_0x52ab0b[_0x11ad1b(0x18a)]]?_0x52ab0b[_0x11ad1b(0x18a)]:_0x2936ef['length']===0x1?_0x2936ef[0x0]:undefined,_0x31c217=!!_0x587c33[_0x406194];_0x587c33[_0x406194]=_0x5abb85;const _0x2e6d80=normalizeStoredDefaultApp(_0x52ab0b,_0x5f52da);writeConfig(_0x52ab0b,_0x164079);const _0x14ec19=!_0x31c217&&_0x2e6d80?_0x11ad1b(0x17f)+_0x2e6d80+'\x22.':'',_0x195a7a=(_0x31c217?'Updated':_0x11ad1b(0x1a2))+_0x11ad1b(0x1a5)+_0x406194+'\x22\x20(appcode:\x20'+_0x50e4fe+')'+scopeLabel(_0x164079)+'.'+_0x14ec19;return{'ok':!![],'message':_0x195a7a};}export async function runAppRemove(_0x377a84,_0x5bc709){const _0x14def6=a44_0x2c2c,_0x17992c=_0x377a84[_0x14def6(0x18d)][0x0]?.['trim']();if(!_0x17992c)throw CliErrors[_0x14def6(0x1a9)](_0x14def6(0x1a7),_0x14def6(0x19a)+CLI_BIN_NAME+'\x20'+_0x5bc709+_0x14def6(0x191));const _0x148604=_0x377a84[_0x14def6(0x181)](_0x14def6(0x18c)),{config:_0x2c16e4,layers:_0x155376}=readRawConfigWithLayers(),_0x57bf4a=_0x2c16e4[_0x14def6(0x190)]??{};if(!_0x57bf4a[_0x17992c])throw CliErrors[_0x14def6(0x1a9)]('App\x20\x22'+_0x17992c+_0x14def6(0x194));const _0xa208b8=_0x155376[_0x14def6(0x198)]['apps']&&typeof _0x155376['globalConfig'][_0x14def6(0x190)]===_0x14def6(0x192)?_0x155376[_0x14def6(0x198)]['apps']:{},_0x51efeb=_0x155376['projectConfig'][_0x14def6(0x190)]&&typeof _0x155376['projectConfig'][_0x14def6(0x190)]===_0x14def6(0x192)?_0x155376[_0x14def6(0x195)][_0x14def6(0x190)]:{},_0x2cc6b2=appDefinedIn(_0x17992c,_0xa208b8,_0x51efeb),_0x47a90e=resolveAppScopeForWrite(_0x17992c,_0x148604,_0x155376),_0x242eb2={'global':_0x47a90e===_0x14def6(0x18c)},_0xaf81c6=readConfig(_0x242eb2),_0x364fc8=_0xaf81c6['apps'];if(!_0x364fc8||!_0x364fc8[_0x17992c])throw CliErrors[_0x14def6(0x1a9)]('App\x20\x22'+_0x17992c+_0x14def6(0x194));delete _0x364fc8[_0x17992c];let _0x2957ed='';const _0x1a7f72=typeof _0xaf81c6[_0x14def6(0x18a)]===_0x14def6(0x1a8)?_0xaf81c6[_0x14def6(0x18a)]:undefined,_0x3415ae=Object[_0x14def6(0x188)](_0x364fc8),_0x24c6c6=_0x1a7f72===_0x17992c?_0x3415ae[0x0]:_0x1a7f72,_0x1804d9=normalizeStoredDefaultApp(_0xaf81c6,_0x24c6c6);if(_0x1a7f72===_0x17992c&&_0x3415ae[_0x14def6(0x19c)]===0x1)_0x2957ed=_0x14def6(0x185)+_0x3415ae[0x0]+_0x14def6(0x1ab);else _0x1a7f72===_0x17992c&&_0x1804d9&&(_0x2957ed='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x1804d9+'\x22.');Object[_0x14def6(0x188)](_0x364fc8)[_0x14def6(0x19c)]===0x0&&(delete _0xaf81c6[_0x14def6(0x190)],delete _0xaf81c6[_0x14def6(0x18a)]);writeConfig(_0xaf81c6,_0x242eb2);const _0x5f4b9e=_0x2cc6b2===_0x14def6(0x183)?_0x14def6(0x18f)+_0x17992c+_0x14def6(0x187)+(_0x47a90e===_0x14def6(0x1a6)?_0x14def6(0x18c):_0x14def6(0x1a6))+_0x14def6(0x18e):'';return{'ok':!![],'message':_0x14def6(0x19b)+_0x17992c+'\x22'+scopeLabel(_0x242eb2)+'.'+_0x2957ed+_0x5f4b9e};}
@@ -1 +1 @@
1
- (function(_0x3d3f87,_0x1e0711){const _0x1f8d05=a45_0x2a86,_0xf3c34f=_0x3d3f87();while(!![]){try{const _0x27bd2e=-parseInt(_0x1f8d05(0x153))/0x1*(-parseInt(_0x1f8d05(0x167))/0x2)+-parseInt(_0x1f8d05(0x157))/0x3*(-parseInt(_0x1f8d05(0x155))/0x4)+-parseInt(_0x1f8d05(0x15f))/0x5+parseInt(_0x1f8d05(0x15d))/0x6+parseInt(_0x1f8d05(0x164))/0x7+-parseInt(_0x1f8d05(0x15c))/0x8+-parseInt(_0x1f8d05(0x16c))/0x9*(parseInt(_0x1f8d05(0x158))/0xa);if(_0x27bd2e===_0x1e0711)break;else _0xf3c34f['push'](_0xf3c34f['shift']());}catch(_0x22c25b){_0xf3c34f['push'](_0xf3c34f['shift']());}}}(a45_0x1302,0xc3da1));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x3d0975 from'chalk';function a45_0x1302(){const _0x16a7e9=['\x0aNo\x20available\x20apps\x20found.','4040288oRjSdK','App\x20Code:','✎\x20Enter\x20manually','1678tJKoVa','gray','message','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','\x20\x20(','8241309eYFGBH','Fetching\x20available\x20apps...','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','yellow','✎\x20Enter\x20appcode\x20manually','custom','trim','skip','Select\x20the\x20app\x20to\x20bind:','1343eowlCk','map','8836AouCDi','No\x20available\x20apps\x20found.','2031cUSjMo','20bJDcOg','cyan','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','6941952nsBahw','7631568GZJygH','includes','4850135GyklME','length','find','appCode'];a45_0x1302=function(){return _0x16a7e9;};return a45_0x1302();}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';function a45_0x2a86(_0x2dd6ac,_0x84e8c6){_0x2dd6ac=_0x2dd6ac-0x152;const _0x130229=a45_0x1302();let _0x2a8633=_0x130229[_0x2dd6ac];return _0x2a8633;}export async function promptCustomAppcode(){const _0x2ffb1b=a45_0x2a86,_0x3f37c8=await input({'message':_0x2ffb1b(0x165),'validate':_0x44655e=>{const _0x37a9d9=_0x2ffb1b,_0x1cfea5=validateAppcode(_0x44655e[_0x37a9d9(0x172)]());return _0x1cfea5['valid']||_0x1cfea5[_0x37a9d9(0x169)]||'Invalid\x20App\x20Code';}});return _0x3f37c8[_0x2ffb1b(0x172)]();}export async function promptAppSelection(_0x5367ed){const _0x2f7aca=a45_0x2a86,_0x46b786=[{'name':a45_0x3d0975['yellow']('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x5367ed['map']((_0x3f8d29,_0x439530)=>({'name':_0x3f8d29['appName']+'\x20\x20'+a45_0x3d0975[_0x2f7aca(0x168)]('('+_0x3f8d29['appCode']+')'),'value':_0x439530}))],_0x45f112=await checkbox({'message':'Found\x20'+a45_0x3d0975[_0x2f7aca(0x159)](_0x5367ed[_0x2f7aca(0x160)])+_0x2f7aca(0x15a),'choices':_0x46b786,'loop':![]});if(_0x45f112[_0x2f7aca(0x15e)](-0x1))return _0x2f7aca(0x171);if(_0x45f112[_0x2f7aca(0x160)]===0x0)return _0x2f7aca(0x171);return _0x45f112[_0x2f7aca(0x154)](_0x1ffbcb=>_0x5367ed[_0x1ffbcb]);}export async function promptSingleAppSelection(_0x53f509){const _0x189fa0=a45_0x2a86,_0x12dbd3=[{'name':a45_0x3d0975[_0x189fa0(0x168)](_0x189fa0(0x15b)),'value':_0x189fa0(0x173)},{'name':a45_0x3d0975['yellow'](_0x189fa0(0x170)),'value':'custom'},..._0x53f509[_0x189fa0(0x154)](_0x2e735b=>({'name':_0x2e735b['appName']+'\x20\x20'+a45_0x3d0975[_0x189fa0(0x168)]('('+_0x2e735b[_0x189fa0(0x162)]+')'),'value':_0x2e735b[_0x189fa0(0x162)]}))],_0x33f7f3=await select({'message':_0x189fa0(0x152),'choices':_0x12dbd3});if(_0x33f7f3==='skip')return _0x189fa0(0x173);if(_0x33f7f3===_0x189fa0(0x171))return'custom';return _0x53f509[_0x189fa0(0x161)](_0x4a4141=>_0x4a4141[_0x189fa0(0x162)]===_0x33f7f3);}export async function selectSingleAppcode(_0xfed4f2){const _0x22f18a=a45_0x2a86;if(!_0xfed4f2)return writeCliSideChannelLine(a45_0x3d0975[_0x22f18a(0x168)](_0x22f18a(0x16e))),_fallbackOrSkip();writeCliSideChannelLine(_0x22f18a(0x16d));let _0x3a2c4e;try{_0x3a2c4e=await withActiveCookie(_0xfed4f2,()=>listRemoteApps());}catch(_0x26e927){writeCliSideChannelLine(a45_0x3d0975[_0x22f18a(0x16f)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x26e927 instanceof Error)writeCliSideChannelLine(a45_0x3d0975['gray'](_0x22f18a(0x16b)+_0x26e927[_0x22f18a(0x169)]+')'));return _fallbackOrSkip();}if(_0x3a2c4e[_0x22f18a(0x160)]===0x0)return writeCliSideChannelLine(a45_0x3d0975['yellow'](_0x22f18a(0x156))),_fallbackOrSkip();const _0x53cfc2=await promptSingleAppSelection(_0x3a2c4e);if(_0x53cfc2==='skip')return'';if(_0x53cfc2===_0x22f18a(0x171))return promptCustomAppcode();return _0x53cfc2[_0x22f18a(0x162)];}export async function selectMultipleApps(_0x24185f){const _0x132746=a45_0x2a86;writeCliSideChannelLine(_0x132746(0x16d));let _0x1d5481;try{_0x1d5481=await withActiveCookie(_0x24185f,()=>listRemoteApps());}catch(_0x562a21){writeCliSideChannelLine(_0x132746(0x16a));if(_0x562a21 instanceof Error)writeCliSideChannelLine(_0x132746(0x16b)+_0x562a21[_0x132746(0x169)]+')');return'custom';}if(_0x1d5481[_0x132746(0x160)]===0x0)return writeCliSideChannelLine(_0x132746(0x163)),_0x132746(0x171);return promptAppSelection(_0x1d5481);}async function _fallbackOrSkip(){const _0x198a5f=a45_0x2a86,_0x4a98f2=await select({'message':'App\x20Code:','choices':[{'name':a45_0x3d0975[_0x198a5f(0x168)]('(Skip;\x20configure\x20later)'),'value':_0x198a5f(0x173)},{'name':a45_0x3d0975[_0x198a5f(0x16f)](_0x198a5f(0x166)),'value':'manual'}]});if(_0x4a98f2===_0x198a5f(0x173))return'';return promptCustomAppcode();}
1
+ (function(_0x247d6d,_0x23426a){const _0x21e66d=a45_0x53d2,_0x19b822=_0x247d6d();while(!![]){try{const _0x3ebadc=parseInt(_0x21e66d(0xba))/0x1*(parseInt(_0x21e66d(0xc6))/0x2)+parseInt(_0x21e66d(0xc0))/0x3+-parseInt(_0x21e66d(0xd6))/0x4+parseInt(_0x21e66d(0xce))/0x5*(parseInt(_0x21e66d(0xd2))/0x6)+parseInt(_0x21e66d(0xbc))/0x7+-parseInt(_0x21e66d(0xb9))/0x8+-parseInt(_0x21e66d(0xc1))/0x9;if(_0x3ebadc===_0x23426a)break;else _0x19b822['push'](_0x19b822['shift']());}catch(_0x23c9a5){_0x19b822['push'](_0x19b822['shift']());}}}(a45_0x2449,0x38564));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x37f4f9 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 _0x4326d6=a45_0x53d2,_0x34cd99=await input({'message':_0x4326d6(0xc8),'validate':_0x32161f=>{const _0x353aaf=_0x4326d6,_0x4328ff=validateAppcode(_0x32161f[_0x353aaf(0xd5)]());return _0x4328ff[_0x353aaf(0xd1)]||_0x4328ff[_0x353aaf(0xd8)]||'Invalid\x20App\x20Code';}});return _0x34cd99['trim']();}export async function promptAppSelection(_0x53b3c8){const _0x544b41=a45_0x53d2,_0x29e186=[{'name':a45_0x37f4f9[_0x544b41(0xbf)](_0x544b41(0xcf)),'value':-0x1},..._0x53b3c8[_0x544b41(0xd4)]((_0x51b4eb,_0x389109)=>({'name':_0x51b4eb[_0x544b41(0xc7)]+'\x20\x20'+a45_0x37f4f9[_0x544b41(0xc2)]('('+_0x51b4eb[_0x544b41(0xc9)]+')'),'value':_0x389109}))],_0x315d63=await checkbox({'message':_0x544b41(0xd3)+a45_0x37f4f9[_0x544b41(0xca)](_0x53b3c8[_0x544b41(0xbd)])+'\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','choices':_0x29e186,'loop':![]});if(_0x315d63[_0x544b41(0xc4)](-0x1))return _0x544b41(0xc5);if(_0x315d63['length']===0x0)return'custom';return _0x315d63[_0x544b41(0xd4)](_0x426497=>_0x53b3c8[_0x426497]);}function a45_0x53d2(_0x31f385,_0x5a26fe){_0x31f385=_0x31f385-0xb9;const _0x244961=a45_0x2449();let _0x53d2ab=_0x244961[_0x31f385];return _0x53d2ab;}export async function promptSingleAppSelection(_0x1a3996){const _0x156fba=a45_0x53d2,_0x5e192d=[{'name':a45_0x37f4f9['gray'](_0x156fba(0xd0)),'value':'skip'},{'name':a45_0x37f4f9['yellow'](_0x156fba(0xcf)),'value':'custom'},..._0x1a3996[_0x156fba(0xd4)](_0x3e9802=>({'name':_0x3e9802[_0x156fba(0xc7)]+'\x20\x20'+a45_0x37f4f9[_0x156fba(0xc2)]('('+_0x3e9802[_0x156fba(0xc9)]+')'),'value':_0x3e9802[_0x156fba(0xc9)]}))],_0x2fa90c=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x5e192d});if(_0x2fa90c===_0x156fba(0xc3))return _0x156fba(0xc3);if(_0x2fa90c===_0x156fba(0xc5))return _0x156fba(0xc5);return _0x1a3996[_0x156fba(0xbb)](_0x3261e7=>_0x3261e7['appCode']===_0x2fa90c);}export async function selectSingleAppcode(_0x41dd8d){const _0xb84fb5=a45_0x53d2;if(!_0x41dd8d)return writeCliSideChannelLine(a45_0x37f4f9['gray'](_0xb84fb5(0xd7))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x5bb639;try{_0x5bb639=await withActiveCookie(_0x41dd8d,()=>listRemoteApps());}catch(_0x17ada8){writeCliSideChannelLine(a45_0x37f4f9[_0xb84fb5(0xbf)](_0xb84fb5(0xda)));if(_0x17ada8 instanceof Error)writeCliSideChannelLine(a45_0x37f4f9[_0xb84fb5(0xc2)](_0xb84fb5(0xbe)+_0x17ada8[_0xb84fb5(0xd8)]+')'));return _fallbackOrSkip();}if(_0x5bb639[_0xb84fb5(0xbd)]===0x0)return writeCliSideChannelLine(a45_0x37f4f9['yellow']('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x31d1d3=await promptSingleAppSelection(_0x5bb639);if(_0x31d1d3===_0xb84fb5(0xc3))return'';if(_0x31d1d3===_0xb84fb5(0xc5))return promptCustomAppcode();return _0x31d1d3[_0xb84fb5(0xc9)];}export async function selectMultipleApps(_0x29b8da){const _0x2fe2d0=a45_0x53d2;writeCliSideChannelLine(_0x2fe2d0(0xcd));let _0x372ac8;try{_0x372ac8=await withActiveCookie(_0x29b8da,()=>listRemoteApps());}catch(_0x2e366c){writeCliSideChannelLine(_0x2fe2d0(0xcb));if(_0x2e366c instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x2e366c[_0x2fe2d0(0xd8)]+')');return'custom';}if(_0x372ac8[_0x2fe2d0(0xbd)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x2fe2d0(0xc5);return promptAppSelection(_0x372ac8);}async function _fallbackOrSkip(){const _0x200ad6=a45_0x53d2,_0x36d33c=await select({'message':'App\x20Code:','choices':[{'name':a45_0x37f4f9[_0x200ad6(0xc2)]('(Skip;\x20configure\x20later)'),'value':_0x200ad6(0xc3)},{'name':a45_0x37f4f9[_0x200ad6(0xbf)](_0x200ad6(0xd9)),'value':_0x200ad6(0xcc)}]});if(_0x36d33c==='skip')return'';return promptCustomAppcode();}function a45_0x2449(){const _0x5e5860=['✎\x20Enter\x20manually','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','3522832rIfLBH','100186ivjiqw','find','2918692aPvJiO','length','\x20\x20(','yellow','243000nMsEVK','1121085zzLUqx','gray','skip','includes','custom','8GFkxKr','appName','App\x20Code:','appCode','cyan','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','manual','Fetching\x20available\x20apps...','55XqunLd','✎\x20Enter\x20appcode\x20manually','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','valid','91992oVvHab','Found\x20','map','trim','1086708GmbszG','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','message'];a45_0x2449=function(){return _0x5e5860;};return a45_0x2449();}
@@ -1 +1 @@
1
- const a46_0x318a6c=a46_0x53ea;function a46_0x506d(){const _0x260ec8=['\x27\x5c\x27\x27','Async\x20task\x20','\x20--appcode\x20','16UwwibL','SUCCESS','string','\x20task\x20status\x20--task-id\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20is\x20pending.','13801530PlcKle','apiError','10076034MdOlkE','2286QOpjIW','\x20is\x20processing.','has','taskId','10957131JLUhXh','errorMessage','Task\x20','status','1040418TKytrO','2649314HOSvhR','\x20--format\x20compress','FAILED','5omDuoK','314398FvJqYC','\x20failed.','toUpperCase','PENDING','PROCESSING','trim','\x20returned\x20unknown\x20status\x20','\x20failed:\x20','2352eDgGtZ'];a46_0x506d=function(){return _0x260ec8;};return a46_0x506d();}(function(_0x245dbd,_0x307553){const _0x29b255=a46_0x53ea,_0x4fe576=_0x245dbd();while(!![]){try{const _0x1e6225=parseInt(_0x29b255(0x7c))/0x1+-parseInt(_0x29b255(0x7d))/0x2+parseInt(_0x29b255(0x74))/0x3*(-parseInt(_0x29b255(0x89))/0x4)+parseInt(_0x29b255(0x80))/0x5*(parseInt(_0x29b255(0x95))/0x6)+-parseInt(_0x29b255(0x81))/0x7*(-parseInt(_0x29b255(0x8d))/0x8)+parseInt(_0x29b255(0x78))/0x9+-parseInt(_0x29b255(0x93))/0xa;if(_0x1e6225===_0x307553)break;else _0x4fe576['push'](_0x4fe576['shift']());}catch(_0x5e53ee){_0x4fe576['push'](_0x4fe576['shift']());}}}(a46_0x506d,0xd56c2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x318a6c(0x8e),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x318a6c(0x84),a46_0x318a6c(0x85)]);export function normalizeAsyncTask(_0x19e541){const _0x4e1670=a46_0x318a6c,_0x5a3985=typeof _0x19e541?.[_0x4e1670(0x77)]===_0x4e1670(0x8f)?_0x19e541[_0x4e1670(0x77)]['trim']():'';if(!_0x5a3985)throw CliErrors[_0x4e1670(0x94)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x140676=typeof _0x19e541[_0x4e1670(0x7b)]===_0x4e1670(0x8f)?_0x19e541[_0x4e1670(0x7b)][_0x4e1670(0x86)]()[_0x4e1670(0x83)]():'';if(!_0x140676)throw CliErrors[_0x4e1670(0x94)](_0x4e1670(0x8b)+_0x5a3985+_0x4e1670(0x91));return{'taskId':_0x5a3985,'status':_0x140676,'errorMessage':typeof _0x19e541[_0x4e1670(0x79)]===_0x4e1670(0x8f)&&_0x19e541['errorMessage'][_0x4e1670(0x86)]()?_0x19e541[_0x4e1670(0x79)][_0x4e1670(0x86)]():null,'isTerminal':TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676),'knownStatus':TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676)||NON_TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676)};}export function buildAsyncTaskStatusCommand(_0x4be5f5,_0x3bd29e){const _0x202736=a46_0x318a6c;return CLI_BIN_NAME+_0x202736(0x90)+quoteShellArg(_0x4be5f5)+_0x202736(0x8c)+quoteShellArg(_0x3bd29e)+_0x202736(0x7e);}function a46_0x53ea(_0x2715a4,_0x39d19c){_0x2715a4=_0x2715a4-0x74;const _0x506db2=a46_0x506d();let _0x53ea04=_0x506db2[_0x2715a4];return _0x53ea04;}export function asyncTaskMessage(_0x307d61){const _0xa75213=a46_0x318a6c;switch(_0x307d61['status']){case _0xa75213(0x84):return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x92);case _0xa75213(0x85):return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x75);case'SUCCESS':return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+'\x20completed\x20successfully.';case _0xa75213(0x7f):return _0x307d61[_0xa75213(0x79)]?_0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x88)+_0x307d61[_0xa75213(0x79)]:_0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x82);default:return'Task\x20'+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x87)+_0x307d61['status']+'.';}}function quoteShellArg(_0x235bc8){const _0x307ef5=a46_0x318a6c;return'\x27'+_0x235bc8['replace'](/'/g,_0x307ef5(0x8a))+'\x27';}
1
+ const a46_0x58e0fe=a46_0x1093;(function(_0x241e5d,_0x1e4468){const _0x1138f0=a46_0x1093,_0x37de8b=_0x241e5d();while(!![]){try{const _0x539b1a=-parseInt(_0x1138f0(0x1bd))/0x1*(-parseInt(_0x1138f0(0x1c5))/0x2)+parseInt(_0x1138f0(0x1b3))/0x3+-parseInt(_0x1138f0(0x1bb))/0x4+-parseInt(_0x1138f0(0x1c8))/0x5*(parseInt(_0x1138f0(0x1cf))/0x6)+parseInt(_0x1138f0(0x1cc))/0x7+parseInt(_0x1138f0(0x1c1))/0x8*(-parseInt(_0x1138f0(0x1d0))/0x9)+parseInt(_0x1138f0(0x1bc))/0xa;if(_0x539b1a===_0x1e4468)break;else _0x37de8b['push'](_0x37de8b['shift']());}catch(_0x5e9e5e){_0x37de8b['push'](_0x37de8b['shift']());}}}(a46_0x5189,0xeb9d1));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x58e0fe(0x1b7)]),NON_TERMINAL_STATUSES=new Set([a46_0x58e0fe(0x1b8),a46_0x58e0fe(0x1c6)]);export function normalizeAsyncTask(_0x468716){const _0x9455da=a46_0x58e0fe,_0x34052f=typeof _0x468716?.[_0x9455da(0x1b5)]===_0x9455da(0x1bf)?_0x468716[_0x9455da(0x1b5)]['trim']():'';if(!_0x34052f)throw CliErrors[_0x9455da(0x1c7)](_0x9455da(0x1ce));const _0x47359d=typeof _0x468716[_0x9455da(0x1c4)]==='string'?_0x468716[_0x9455da(0x1c4)]['trim']()[_0x9455da(0x1c2)]():'';if(!_0x47359d)throw CliErrors[_0x9455da(0x1c7)](_0x9455da(0x1ba)+_0x34052f+_0x9455da(0x1b9));return{'taskId':_0x34052f,'status':_0x47359d,'errorMessage':typeof _0x468716[_0x9455da(0x1c3)]===_0x9455da(0x1bf)&&_0x468716[_0x9455da(0x1c3)][_0x9455da(0x1cd)]()?_0x468716['errorMessage'][_0x9455da(0x1cd)]():null,'isTerminal':TERMINAL_STATUSES[_0x9455da(0x1b2)](_0x47359d),'knownStatus':TERMINAL_STATUSES[_0x9455da(0x1b2)](_0x47359d)||NON_TERMINAL_STATUSES['has'](_0x47359d)};}export function buildAsyncTaskStatusCommand(_0x4a34eb,_0x42c878){const _0x2024c5=a46_0x58e0fe;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x4a34eb)+_0x2024c5(0x1d2)+quoteShellArg(_0x42c878)+'\x20--format\x20compress';}function a46_0x1093(_0xa2bac,_0x552671){_0xa2bac=_0xa2bac-0x1b1;const _0x518987=a46_0x5189();let _0x109339=_0x518987[_0xa2bac];return _0x109339;}export function asyncTaskMessage(_0x52bec7){const _0xe35a20=a46_0x58e0fe;switch(_0x52bec7[_0xe35a20(0x1c4)]){case _0xe35a20(0x1b8):return _0xe35a20(0x1be)+_0x52bec7['taskId']+_0xe35a20(0x1cb);case _0xe35a20(0x1c6):return'Task\x20'+_0x52bec7[_0xe35a20(0x1b5)]+_0xe35a20(0x1c9);case _0xe35a20(0x1b1):return'Task\x20'+_0x52bec7[_0xe35a20(0x1b5)]+_0xe35a20(0x1c0);case _0xe35a20(0x1b7):return _0x52bec7['errorMessage']?_0xe35a20(0x1be)+_0x52bec7[_0xe35a20(0x1b5)]+_0xe35a20(0x1b4)+_0x52bec7[_0xe35a20(0x1c3)]:_0xe35a20(0x1be)+_0x52bec7[_0xe35a20(0x1b5)]+_0xe35a20(0x1b6);default:return _0xe35a20(0x1be)+_0x52bec7[_0xe35a20(0x1b5)]+_0xe35a20(0x1ca)+_0x52bec7['status']+'.';}}function a46_0x5189(){const _0x42a562=['taskId','\x20failed.','FAILED','PENDING','\x20response\x20did\x20not\x20contain\x20a\x20status.','Async\x20task\x20','3791844fKdkxY','11798600qxTVhK','163033EMDIjU','Task\x20','string','\x20completed\x20successfully.','752VmytYc','toUpperCase','errorMessage','status','6FCUfks','PROCESSING','apiError','2235siWUwH','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','\x20is\x20pending.','7206115NMwKKn','trim','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','2652LrqduU','114462PDxNvo','\x27\x5c\x27\x27','\x20--appcode\x20','SUCCESS','has','1823088KJWpJR','\x20failed:\x20'];a46_0x5189=function(){return _0x42a562;};return a46_0x5189();}function quoteShellArg(_0x2b2dd4){const _0x419a3e=a46_0x58e0fe;return'\x27'+_0x2b2dd4['replace'](/'/g,_0x419a3e(0x1d1))+'\x27';}
@@ -1 +1 @@
1
- (function(_0x1b6dad,_0x2f3db6){var _0x313ee2=a47_0x4219,_0x2a2b6a=_0x1b6dad();while(!![]){try{var _0x1c9c48=parseInt(_0x313ee2(0xf7))/0x1+-parseInt(_0x313ee2(0xf9))/0x2*(parseInt(_0x313ee2(0xfc))/0x3)+-parseInt(_0x313ee2(0xf6))/0x4+-parseInt(_0x313ee2(0xf4))/0x5*(parseInt(_0x313ee2(0x100))/0x6)+parseInt(_0x313ee2(0xfe))/0x7*(-parseInt(_0x313ee2(0xf5))/0x8)+parseInt(_0x313ee2(0x101))/0x9+-parseInt(_0x313ee2(0xfb))/0xa*(-parseInt(_0x313ee2(0xf3))/0xb);if(_0x1c9c48===_0x2f3db6)break;else _0x2a2b6a['push'](_0x2a2b6a['shift']());}catch(_0x2a1def){_0x2a2b6a['push'](_0x2a2b6a['shift']());}}}(a47_0xc35b,0x690e4));function a47_0x4219(_0x4b849a,_0x4c8732){_0x4b849a=_0x4b849a-0xf3;var _0xc35b02=a47_0xc35b();var _0x421909=_0xc35b02[_0x4b849a];return _0x421909;}export function asDryRunResult(_0x1aa4d5,_0x10f7d1){var _0x1b69b5=a47_0x4219;return Object[_0x1b69b5(0xfa)](_0x1aa4d5,{'method':{'value':_0x10f7d1[_0x1b69b5(0xf8)],'enumerable':![]},'url':{'value':_0x10f7d1[_0x1b69b5(0xfd)],'enumerable':![]},..._0x10f7d1['description']?{'description':{'value':_0x10f7d1[_0x1b69b5(0xff)],'enumerable':![]}}:{}});}function a47_0xc35b(){var _0x4c01d2=['139557fynKZY','230hwWYcz','41880jYdJpG','306928OQrqUK','462475vacxJc','method','14HZmsOZ','defineProperties','40ukzbXV','137031NueBTs','url','49RFfQTE','description','66030eySfnJ','7707879hVbWBt'];a47_0xc35b=function(){return _0x4c01d2;};return a47_0xc35b();}
1
+ (function(_0x5a4c39,_0x5a9139){var _0x29f209=a47_0x19e0,_0x288d27=_0x5a4c39();while(!![]){try{var _0x18ee0d=-parseInt(_0x29f209(0x133))/0x1*(parseInt(_0x29f209(0x130))/0x2)+-parseInt(_0x29f209(0x136))/0x3*(-parseInt(_0x29f209(0x12b))/0x4)+parseInt(_0x29f209(0x12d))/0x5+parseInt(_0x29f209(0x12c))/0x6*(parseInt(_0x29f209(0x12e))/0x7)+-parseInt(_0x29f209(0x134))/0x8+-parseInt(_0x29f209(0x132))/0x9+parseInt(_0x29f209(0x131))/0xa*(-parseInt(_0x29f209(0x137))/0xb);if(_0x18ee0d===_0x5a9139)break;else _0x288d27['push'](_0x288d27['shift']());}catch(_0x146721){_0x288d27['push'](_0x288d27['shift']());}}}(a47_0x58ae,0x528cc));export function asDryRunResult(_0x3cc8fb,_0x21c0d3){var _0x340636=a47_0x19e0;return Object['defineProperties'](_0x3cc8fb,{'method':{'value':_0x21c0d3['method'],'enumerable':![]},'url':{'value':_0x21c0d3[_0x340636(0x135)],'enumerable':![]},..._0x21c0d3['description']?{'description':{'value':_0x21c0d3[_0x340636(0x12f)],'enumerable':![]}}:{}});}function a47_0x19e0(_0x36bb9b,_0x23a145){_0x36bb9b=_0x36bb9b-0x12b;var _0x58ae1c=a47_0x58ae();var _0x19e07b=_0x58ae1c[_0x36bb9b];return _0x19e07b;}function a47_0x58ae(){var _0x3c1149=['3881157xnVEXk','description','24lANBtd','33570eeOwfB','2361420RfyOrb','27483cVoUmT','2479448WERglM','url','501108cQfsqB','33KpsVQj','16VWnpJN','6HtNXNH','138535nMjHdm'];a47_0x58ae=function(){return _0x3c1149;};return a47_0x58ae();}
@@ -1 +1 @@
1
- const a48_0x2fd2bb=a48_0x8045;(function(_0x11e44d,_0x7baba7){const _0x595e61=a48_0x8045,_0x5ee74d=_0x11e44d();while(!![]){try{const _0x37c8bd=-parseInt(_0x595e61(0xd9))/0x1*(parseInt(_0x595e61(0xe4))/0x2)+parseInt(_0x595e61(0xdb))/0x3*(-parseInt(_0x595e61(0xe3))/0x4)+parseInt(_0x595e61(0xce))/0x5*(-parseInt(_0x595e61(0xd8))/0x6)+-parseInt(_0x595e61(0xde))/0x7*(parseInt(_0x595e61(0xd3))/0x8)+-parseInt(_0x595e61(0xda))/0x9*(parseInt(_0x595e61(0xe1))/0xa)+parseInt(_0x595e61(0xd5))/0xb*(parseInt(_0x595e61(0xcf))/0xc)+parseInt(_0x595e61(0xdc))/0xd;if(_0x37c8bd===_0x7baba7)break;else _0x5ee74d['push'](_0x5ee74d['shift']());}catch(_0x1074e0){_0x5ee74d['push'](_0x5ee74d['shift']());}}}(a48_0x47d6,0x5288e));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x2fd2bb(0xe6)};export const CODE_FLAG={'name':a48_0x2fd2bb(0xe2),'type':'string','required':!![],'description':a48_0x2fd2bb(0xcc),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};function a48_0x47d6(){const _0x3c6123=['dbtype','66DLspda','appcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3368196pdRQsx','1nrHnDw','45iyZHZx','66879HaAEqt','25539176WusiOB','skip-connection-test','4449382jETdBl','string','POSTGRESQL','549910mwZsDh','code','48EwgnsY','53402PBjYYj','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','5xtQGpy','279348lcvDUn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','MYSQL','App\x20code\x20(e.g.\x20app-xxxxx)','8vdOGLx'];a48_0x47d6=function(){return _0x3c6123;};return a48_0x47d6();}export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a48_0x2fd2bb(0xcd),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x2fd2bb(0xd0)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x2fd2bb(0xd6),'type':a48_0x2fd2bb(0xdf),'required':![],'description':a48_0x2fd2bb(0xe5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x2fd2bb(0xd2)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a48_0x8045(_0x3556c4,_0x2bc94a){_0x3556c4=_0x3556c4-0xcc;const _0x47d69e=a48_0x47d6();let _0x804520=_0x47d69e[_0x3556c4];return _0x804520;}export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0x2fd2bb(0xd7)};export const DB_TYPE_FLAG={'name':a48_0x2fd2bb(0xd4),'type':a48_0x2fd2bb(0xdf),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0x2fd2bb(0xd1),a48_0x2fd2bb(0xe0)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x2fd2bb(0xdd),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
1
+ const a48_0x4a6480=a48_0x51c5;(function(_0x2a3c66,_0x5ad7c1){const _0x1f9cab=a48_0x51c5,_0x2ace46=_0x2a3c66();while(!![]){try{const _0x2f8f70=parseInt(_0x1f9cab(0x1c7))/0x1+parseInt(_0x1f9cab(0x1c9))/0x2*(parseInt(_0x1f9cab(0x1ca))/0x3)+parseInt(_0x1f9cab(0x1b9))/0x4*(parseInt(_0x1f9cab(0x1be))/0x5)+-parseInt(_0x1f9cab(0x1c6))/0x6+parseInt(_0x1f9cab(0x1b7))/0x7*(-parseInt(_0x1f9cab(0x1cc))/0x8)+-parseInt(_0x1f9cab(0x1c2))/0x9+parseInt(_0x1f9cab(0x1bf))/0xa*(parseInt(_0x1f9cab(0x1bb))/0xb);if(_0x2f8f70===_0x5ad7c1)break;else _0x2ace46['push'](_0x2ace46['shift']());}catch(_0x43cf1c){_0x2ace46['push'](_0x2ace46['shift']());}}}(a48_0x127a,0xcd71f));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':a48_0x4a6480(0x1c0),'type':a48_0x4a6480(0x1ba),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x4a6480(0x1bd),'description':a48_0x4a6480(0x1c3)};function a48_0x127a(){const _0x1de39e=['202712JqeFPO','appcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','POSTGRESQL','434UoewvQ','dbtype','16WiEaUK','string','40323437QkqmBs','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','datasetcode','100835upfSLU','10XnXjRv','code','skip-connection-test','8736777OzkFWW','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','App\x20code\x20(e.g.\x20app-xxxxx)','MYSQL','5517726YbWrwk','250152CEULrU','boolean','8csyvTg','229731KLMncW','number'];a48_0x127a=function(){return _0x1de39e;};return a48_0x127a();}export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x4a6480(0x1ba),'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':a48_0x4a6480(0x1cd),'type':a48_0x4a6480(0x1ba),'required':![],'description':a48_0x4a6480(0x1ce)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x4a6480(0x1c4)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x4a6480(0x1cb),'required':!![],'description':a48_0x4a6480(0x1bc)};function a48_0x51c5(_0x58d8a6,_0x53d93e){_0x58d8a6=_0x58d8a6-0x1b7;const _0x127a21=a48_0x127a();let _0x51c521=_0x127a21[_0x58d8a6];return _0x51c521;}export const DB_TYPE_FLAG={'name':a48_0x4a6480(0x1b8),'type':a48_0x4a6480(0x1ba),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0x4a6480(0x1c5),a48_0x4a6480(0x1cf)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x4a6480(0x1c1),'type':a48_0x4a6480(0x1c8),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
@@ -1 +1 @@
1
- (function(_0x35cf93,_0x53e756){const _0x51d6fa=a49_0x3de3,_0x409fd3=_0x35cf93();while(!![]){try{const _0x4cb16c=parseInt(_0x51d6fa(0x16c))/0x1+-parseInt(_0x51d6fa(0x171))/0x2+parseInt(_0x51d6fa(0x175))/0x3*(-parseInt(_0x51d6fa(0x179))/0x4)+parseInt(_0x51d6fa(0x176))/0x5*(-parseInt(_0x51d6fa(0x172))/0x6)+-parseInt(_0x51d6fa(0x16d))/0x7+parseInt(_0x51d6fa(0x17b))/0x8+parseInt(_0x51d6fa(0x174))/0x9;if(_0x4cb16c===_0x53e756)break;else _0x409fd3['push'](_0x409fd3['shift']());}catch(_0x30e40a){_0x409fd3['push'](_0x409fd3['shift']());}}}(a49_0x55f5,0x9445a));function a49_0x3de3(_0xc7a323,_0x3cb41e){_0xc7a323=_0xc7a323-0x16c;const _0x55f517=a49_0x55f5();let _0x3de3f5=_0x55f517[_0xc7a323];return _0x3de3f5;}function a49_0x55f5(){const _0x36f0a5=['983590hWtshc','1925028HuUwul','File\x20is\x20not\x20a\x20regular\x20file:\x20','5761206aczspF','3qbXQta','5BkIggG','ceil','validation','950248aeGsMz','isFile','2778512cEjhjJ','File\x20not\x20found:\x20','\x20path\x20is\x20required.','786869XCVIQa','817600GnMyIl','toFixed','trim','size'];a49_0x55f5=function(){return _0x36f0a5;};return a49_0x55f5();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x376b3){const _0x459e24=a49_0x3de3;if(_0x376b3>=BYTES_PER_MB){const _0x1a7a12=Math[_0x459e24(0x177)](_0x376b3/BYTES_PER_MB*0x64)/0x64;return _0x1a7a12[_0x459e24(0x16e)](0x2)+'\x20MB';}return _0x376b3+'\x20B';}export function requireDevelopmentUploadFile(_0x4b35c2,_0x4523c7){const _0x3f12f1=a49_0x3de3,_0x2980fe=_0x4b35c2[_0x3f12f1(0x16f)]();if(!_0x2980fe)throw CliErrors['validation'](_0x4523c7+_0x3f12f1(0x17d));if(!existsSync(_0x2980fe))throw CliErrors['validation'](_0x3f12f1(0x17c)+_0x2980fe);const _0x2587dc=statSync(_0x2980fe);if(!_0x2587dc[_0x3f12f1(0x17a)]())throw CliErrors[_0x3f12f1(0x178)](_0x3f12f1(0x173)+_0x2980fe);if(_0x2587dc[_0x3f12f1(0x170)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2980fe+'\x20('+formatBytes(_0x2587dc[_0x3f12f1(0x170)])+')');return{'path':_0x2980fe,'size':_0x2587dc[_0x3f12f1(0x170)]};}
1
+ (function(_0x5bdfbd,_0xbff43a){const _0x40bfdf=a49_0x191e,_0x1a0d40=_0x5bdfbd();while(!![]){try{const _0x22dfaa=-parseInt(_0x40bfdf(0x71))/0x1+parseInt(_0x40bfdf(0x6f))/0x2+parseInt(_0x40bfdf(0x73))/0x3*(-parseInt(_0x40bfdf(0x70))/0x4)+-parseInt(_0x40bfdf(0x77))/0x5*(parseInt(_0x40bfdf(0x76))/0x6)+parseInt(_0x40bfdf(0x72))/0x7+parseInt(_0x40bfdf(0x7a))/0x8+-parseInt(_0x40bfdf(0x7c))/0x9;if(_0x22dfaa===_0xbff43a)break;else _0x1a0d40['push'](_0x1a0d40['shift']());}catch(_0x488d87){_0x1a0d40['push'](_0x1a0d40['shift']());}}}(a49_0xdf7a,0x887c7));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0xdf7a(){const _0x305861=['\x20MB','File\x20not\x20found:\x20','6419240lWmzIS','File\x20is\x20not\x20a\x20regular\x20file:\x20','152595jkocjM','ceil','toFixed','trim','validation','1271710KtAJPj','4MixQOH','46901AAwHMc','387198eaVYFo','103434eojmmy','size','isFile','5017158PAykcH','5vVMJBF'];a49_0xdf7a=function(){return _0x305861;};return a49_0xdf7a();}const BYTES_PER_MB=0x400*0x400;function a49_0x191e(_0x22f946,_0x266a4e){_0x22f946=_0x22f946-0x6f;const _0xdf7a47=a49_0xdf7a();let _0x191ec6=_0xdf7a47[_0x22f946];return _0x191ec6;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x21635e){const _0x5d7f5a=a49_0x191e;if(_0x21635e>=BYTES_PER_MB){const _0x38b6cb=Math[_0x5d7f5a(0x7d)](_0x21635e/BYTES_PER_MB*0x64)/0x64;return _0x38b6cb[_0x5d7f5a(0x7e)](0x2)+_0x5d7f5a(0x78);}return _0x21635e+'\x20B';}export function requireDevelopmentUploadFile(_0x391609,_0x46ae73){const _0xed411d=a49_0x191e,_0x2bc46c=_0x391609[_0xed411d(0x7f)]();if(!_0x2bc46c)throw CliErrors[_0xed411d(0x80)](_0x46ae73+'\x20path\x20is\x20required.');if(!existsSync(_0x2bc46c))throw CliErrors[_0xed411d(0x80)](_0xed411d(0x79)+_0x2bc46c);const _0x21a6f1=statSync(_0x2bc46c);if(!_0x21a6f1[_0xed411d(0x75)]())throw CliErrors[_0xed411d(0x80)](_0xed411d(0x7b)+_0x2bc46c);if(_0x21a6f1[_0xed411d(0x74)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2bc46c+'\x20('+formatBytes(_0x21a6f1[_0xed411d(0x74)])+')');return{'path':_0x2bc46c,'size':_0x21a6f1[_0xed411d(0x74)]};}