@lovrabet/rabetbase-cli 2.5.2-beta.6 → 2.5.2-beta.7

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 (322) 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-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/index.js +1 -1
  99. package/lib/commands/deployment/sync-all.js +1 -1
  100. package/lib/commands/deployment/sync-jobs.js +1 -1
  101. package/lib/commands/deployment/sync-status.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/instant-api-policy/current.js +1 -1
  105. package/lib/commands/instant-api-policy/index.js +1 -1
  106. package/lib/commands/instant-api-policy/init.js +1 -1
  107. package/lib/commands/instant-api-policy/publish.js +1 -1
  108. package/lib/commands/instant-api-policy/pull.js +1 -1
  109. package/lib/commands/instant-api-policy/revision.js +1 -1
  110. package/lib/commands/instant-api-policy/revisions.js +1 -1
  111. package/lib/commands/instant-api-policy/rollback.js +1 -1
  112. package/lib/commands/instant-api-policy/shared.js +1 -1
  113. package/lib/commands/instant-api-policy/validate.js +1 -1
  114. package/lib/commands/issue/index.js +1 -1
  115. package/lib/commands/issue/nudge.js +1 -1
  116. package/lib/commands/issue/report.js +1 -1
  117. package/lib/commands/issue/shared.js +1 -1
  118. package/lib/commands/kb/create.js +1 -1
  119. package/lib/commands/kb/delete.js +1 -1
  120. package/lib/commands/kb/detail.js +1 -1
  121. package/lib/commands/kb/index.js +1 -1
  122. package/lib/commands/kb/list.js +1 -1
  123. package/lib/commands/kb/search.js +1 -1
  124. package/lib/commands/kb/shared.js +1 -1
  125. package/lib/commands/kb/update.js +1 -1
  126. package/lib/commands/logs/index.js +1 -1
  127. package/lib/commands/menu/asset-update.js +1 -1
  128. package/lib/commands/menu/delete.js +1 -1
  129. package/lib/commands/menu/external-link-create.js +1 -1
  130. package/lib/commands/menu/external-link-update.js +1 -1
  131. package/lib/commands/menu/group-create.js +1 -1
  132. package/lib/commands/menu/group-update.js +1 -1
  133. package/lib/commands/menu/index.js +1 -1
  134. package/lib/commands/menu/list.js +1 -1
  135. package/lib/commands/menu/move.js +1 -1
  136. package/lib/commands/menu/regroup-start.js +1 -1
  137. package/lib/commands/menu/rename.js +1 -1
  138. package/lib/commands/menu/shared/compare-table.js +1 -1
  139. package/lib/commands/menu/shared/delete-plan.js +1 -1
  140. package/lib/commands/menu/shared/facts.js +1 -1
  141. package/lib/commands/menu/shared/index.js +1 -1
  142. package/lib/commands/menu/shared/inquirer.js +1 -1
  143. package/lib/commands/menu/shared/local-pages.js +1 -1
  144. package/lib/commands/menu/shared/logic.js +1 -1
  145. package/lib/commands/menu/shared/mutations.js +1 -1
  146. package/lib/commands/menu/shared/service.js +1 -1
  147. package/lib/commands/menu/shared/sync-core.js +1 -1
  148. package/lib/commands/menu/shared/update-core.js +1 -1
  149. package/lib/commands/menu/shared/valid-url.js +1 -1
  150. package/lib/commands/menu/sync.js +1 -1
  151. package/lib/commands/menu/visibility-update.js +1 -1
  152. package/lib/commands/notification/config-create.js +1 -1
  153. package/lib/commands/notification/config-delete.js +1 -1
  154. package/lib/commands/notification/config-list.js +1 -1
  155. package/lib/commands/notification/config-update.js +1 -1
  156. package/lib/commands/notification/index.js +1 -1
  157. package/lib/commands/notification/shared.js +1 -1
  158. package/lib/commands/ocr/index.js +1 -1
  159. package/lib/commands/page/create.js +1 -1
  160. package/lib/commands/page/custom/detail.js +1 -1
  161. package/lib/commands/page/custom/list.js +1 -1
  162. package/lib/commands/page/custom/publish.js +1 -1
  163. package/lib/commands/page/custom/shared.js +1 -1
  164. package/lib/commands/page/custom/syntax.js +1 -1
  165. package/lib/commands/page/custom/update.js +1 -1
  166. package/lib/commands/page/data-list-status.js +1 -1
  167. package/lib/commands/page/generate-start.js +1 -1
  168. package/lib/commands/page/generate-status.js +1 -1
  169. package/lib/commands/page/index.js +1 -1
  170. package/lib/commands/page/pull.js +1 -1
  171. package/lib/commands/page/push.js +1 -1
  172. package/lib/commands/page/relation-audit.js +1 -1
  173. package/lib/commands/page/restore.js +1 -1
  174. package/lib/commands/page/shared.js +1 -1
  175. package/lib/commands/page/sync.js +1 -1
  176. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  177. package/lib/commands/project/create/format-elapsed.js +1 -1
  178. package/lib/commands/project/create/main.js +1 -1
  179. package/lib/commands/project/create/materialize-project-template.js +1 -1
  180. package/lib/commands/project/create/project-name.js +1 -1
  181. package/lib/commands/project/create/project-template-archive.js +1 -1
  182. package/lib/commands/project/create/project-template-path.js +1 -1
  183. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  184. package/lib/commands/project/create/use-format-code.js +1 -1
  185. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  186. package/lib/commands/project/domain-routing-sync.js +1 -1
  187. package/lib/commands/project/index.js +1 -1
  188. package/lib/commands/project/upgrade.js +1 -1
  189. package/lib/commands/registry.js +1 -1
  190. package/lib/commands/role/delete.js +1 -1
  191. package/lib/commands/role/detail.js +1 -1
  192. package/lib/commands/role/index.js +1 -1
  193. package/lib/commands/role/list.js +1 -1
  194. package/lib/commands/role/shared.js +1 -1
  195. package/lib/commands/role/update.js +1 -1
  196. package/lib/commands/role/user-add.js +1 -1
  197. package/lib/commands/role/user-remove.js +1 -1
  198. package/lib/commands/role/user-resolve.js +1 -1
  199. package/lib/commands/rule/get.js +1 -1
  200. package/lib/commands/rule/index.js +1 -1
  201. package/lib/commands/rule/list.js +1 -1
  202. package/lib/commands/rule/set.js +1 -1
  203. package/lib/commands/rule/shared.js +1 -1
  204. package/lib/commands/run/index.js +1 -1
  205. package/lib/commands/schema.js +1 -1
  206. package/lib/commands/sql/create.js +1 -1
  207. package/lib/commands/sql/delete.js +1 -1
  208. package/lib/commands/sql/detail.js +1 -1
  209. package/lib/commands/sql/exec.js +1 -1
  210. package/lib/commands/sql/index.js +1 -1
  211. package/lib/commands/sql/list.js +1 -1
  212. package/lib/commands/sql/pull.js +1 -1
  213. package/lib/commands/sql/push.js +1 -1
  214. package/lib/commands/sql/shared.js +1 -1
  215. package/lib/commands/sql/status.js +1 -1
  216. package/lib/commands/sql/validate.js +1 -1
  217. package/lib/commands/task/index.js +1 -1
  218. package/lib/commands/task/status.js +1 -1
  219. package/lib/commands/tenant/index.js +1 -1
  220. package/lib/commands/tenant/members-list.js +1 -1
  221. package/lib/commands/tenant/shared.js +1 -1
  222. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  223. package/lib/commands/user-account/index.js +1 -1
  224. package/lib/commands/workspace/add.js +1 -1
  225. package/lib/commands/workspace/index.js +1 -1
  226. package/lib/commands/workspace/remove.js +1 -1
  227. package/lib/config/domain-config.js +1 -1
  228. package/lib/config/project-domain-routing.js +1 -1
  229. package/lib/config/schema.js +1 -1
  230. package/lib/constant/cdn.js +1 -1
  231. package/lib/constant/cli.js +1 -1
  232. package/lib/constant/defaults.js +1 -1
  233. package/lib/constant/domain.js +1 -1
  234. package/lib/constant/env.js +1 -1
  235. package/lib/constant/output.js +1 -1
  236. package/lib/constant/paths.js +1 -1
  237. package/lib/constant/region.js +1 -1
  238. package/lib/constant/risk.js +1 -1
  239. package/lib/constant/routing-profile.js +1 -1
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.js +1 -1
  246. package/lib/core/bff/config.js +1 -1
  247. package/lib/core/bff/file-system.js +1 -1
  248. package/lib/core/bff/hash.js +1 -1
  249. package/lib/core/bff/lock.js +1 -1
  250. package/lib/core/bff/utils.js +1 -1
  251. package/lib/core/db-resolver.js +1 -1
  252. package/lib/core/instant-api-policy/config.js +1 -1
  253. package/lib/core/kb-search-client.js +1 -1
  254. package/lib/core/page/file-system.js +1 -1
  255. package/lib/core/page/hash.js +1 -1
  256. package/lib/core/page/lock.js +1 -1
  257. package/lib/core/sql-index-auditor.js +1 -1
  258. package/lib/core/sql-sync/config.js +1 -1
  259. package/lib/core/sql-sync/file-system.js +1 -1
  260. package/lib/core/sql-sync/hash.js +1 -1
  261. package/lib/core/sql-sync/lock.js +1 -1
  262. package/lib/core/sql-sync/utils.js +1 -1
  263. package/lib/core/sql-validator.js +1 -1
  264. package/lib/errors.js +1 -1
  265. package/lib/framework/build-all-flags.js +1 -1
  266. package/lib/framework/error-output.js +1 -1
  267. package/lib/framework/explicit-yes.js +1 -1
  268. package/lib/framework/flags.js +1 -1
  269. package/lib/framework/help.js +1 -1
  270. package/lib/framework/index.js +1 -1
  271. package/lib/framework/output.js +1 -1
  272. package/lib/framework/response.js +1 -1
  273. package/lib/framework/runner-alias.js +1 -1
  274. package/lib/framework/runner.js +1 -1
  275. package/lib/framework/schema-export.js +1 -1
  276. package/lib/framework/supported-flags.js +1 -1
  277. package/lib/framework/types.js +1 -1
  278. package/lib/generated/build-info.d.ts +4 -4
  279. package/lib/generated/build-info.js +1 -1
  280. package/lib/generated/official-routing.js +1 -1
  281. package/lib/generated/routing-contract.js +1 -1
  282. package/lib/help.js +1 -1
  283. package/lib/postinstall.js +1 -1
  284. package/lib/runtime/confirmation.js +1 -1
  285. package/lib/runtime/event.js +1 -1
  286. package/lib/runtime/index.js +1 -1
  287. package/lib/runtime/queue.js +1 -1
  288. package/lib/runtime/resolve.js +1 -1
  289. package/lib/skills/builtin-skill.js +1 -1
  290. package/lib/skills/main.js +1 -1
  291. package/lib/skills/npx-skills-add.js +1 -1
  292. package/lib/skills/skill-presence.js +1 -1
  293. package/lib/telemetry/cli-command-trace.js +1 -1
  294. package/lib/telemetry/cli-help-trace.js +1 -1
  295. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  296. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  297. package/lib/telemetry/send-cli-trace-log.js +1 -1
  298. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  299. package/lib/utils/ai_config.js +1 -1
  300. package/lib/utils/apply-jq-filter.js +1 -1
  301. package/lib/utils/cdn-config.js +1 -1
  302. package/lib/utils/check-sdk-version.js +1 -1
  303. package/lib/utils/cli-version-check.js +1 -1
  304. package/lib/utils/cli-version-policy.js +1 -1
  305. package/lib/utils/config.js +1 -1
  306. package/lib/utils/entity-with-id.js +1 -1
  307. package/lib/utils/file-utils.js +1 -1
  308. package/lib/utils/guides-cdn.js +1 -1
  309. package/lib/utils/http-client.js +1 -1
  310. package/lib/utils/is-non-interactive.js +1 -1
  311. package/lib/utils/logger.js +1 -1
  312. package/lib/utils/params.js +1 -1
  313. package/lib/utils/platform.js +1 -1
  314. package/lib/utils/sleep.js +1 -1
  315. package/lib/utils/template-replacer.js +1 -1
  316. package/lib/utils/update-notice.js +1 -1
  317. package/lib/utils/version.js +1 -1
  318. package/lib/utils/with-active-cookie.js +1 -1
  319. package/lib/utils/write-cli-side-channel.js +1 -1
  320. package/package.json +1 -1
  321. package/skills/rabetbase/SKILL.md +1 -1
  322. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a34_0x1475(_0x1d876e,_0x54d775){_0x1d876e=_0x1d876e-0x96;const _0x36ab3f=a34_0x36ab();let _0x147596=_0x36ab3f[_0x1d876e];return _0x147596;}(function(_0x512259,_0x25ee7b){const _0x435657=a34_0x1475,_0x1b4ba8=_0x512259();while(!![]){try{const _0x9f5f4d=parseInt(_0x435657(0x9c))/0x1*(-parseInt(_0x435657(0x99))/0x2)+parseInt(_0x435657(0x9b))/0x3+-parseInt(_0x435657(0x98))/0x4+-parseInt(_0x435657(0x97))/0x5*(-parseInt(_0x435657(0x96))/0x6)+parseInt(_0x435657(0x9a))/0x7*(parseInt(_0x435657(0xa0))/0x8)+parseInt(_0x435657(0x9d))/0x9*(-parseInt(_0x435657(0x9e))/0xa)+-parseInt(_0x435657(0x9f))/0xb;if(_0x9f5f4d===_0x25ee7b)break;else _0x1b4ba8['push'](_0x1b4ba8['shift']());}catch(_0x43dd7c){_0x1b4ba8['push'](_0x1b4ba8['shift']());}}}(a34_0x36ab,0x7b0f5));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';function a34_0x36ab(){const _0x343cc2=['2563005pZtFsR','59441DJURrD','4329mDAfgp','5740utOaSr','3163699eVXDpp','458056KzPcWR','726OfkwTs','29845cbDQlp','1788812DpsUVw','4VrWpzc','7ivlwfM'];a34_0x36ab=function(){return _0x343cc2;};return a34_0x36ab();}import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x147e1c,_0x5c9bf7){const _0x769d4f=a34_0x32a0,_0x252a5f=_0x147e1c();while(!![]){try{const _0x6bf821=-parseInt(_0x769d4f(0x11c))/0x1+-parseInt(_0x769d4f(0x123))/0x2*(-parseInt(_0x769d4f(0x11f))/0x3)+parseInt(_0x769d4f(0x11e))/0x4+parseInt(_0x769d4f(0x125))/0x5*(parseInt(_0x769d4f(0x122))/0x6)+-parseInt(_0x769d4f(0x11d))/0x7+parseInt(_0x769d4f(0x120))/0x8+-parseInt(_0x769d4f(0x121))/0x9*(-parseInt(_0x769d4f(0x124))/0xa);if(_0x6bf821===_0x5c9bf7)break;else _0x252a5f['push'](_0x252a5f['shift']());}catch(_0x2f788d){_0x252a5f['push'](_0x252a5f['shift']());}}}(a34_0x1c5a,0x638c3));import{bffList}from'../../commands/bff/list.js';function a34_0x32a0(_0x2b344b,_0x37cf08){_0x2b344b=_0x2b344b-0x11c;const _0x1c5a2d=a34_0x1c5a();let _0x32a0d0=_0x1c5a2d[_0x2b344b];return _0x32a0d0;}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a34_0x1c5a(){const _0x5985c9=['23319cPawRr','66mxEpvM','2fxjUeS','410cVPsmb','296695ZFYODI','490751YGjEjH','4627910SrPcSN','768356rpeZNr','573213yhbeMw','3340064EqLxbW'];a34_0x1c5a=function(){return _0x5985c9;};return a34_0x1c5a();}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a35_0x2a7556=a35_0x71a2;function a35_0x5277(){const _0x342ce7=['scriptType','appCode','385659MZicrY','length','bool','2172qMzEWh','536290zeKaga','map','List\x20Backend\x20Function\x20scripts','980351aQTlDF','(unnamed)','verbose','type','Filter\x20by\x20script\x20name','str','read','ENDPOINT','bff','boolean','24uhMiJZ','2689790kukaBU','name','24kEcAjm','string','Script\x20type\x20filter','8877zZFhwW','22cMjeXs','COMMON','7703213XuowbF','3241878ZTqUzc','list'];a35_0x5277=function(){return _0x342ce7;};return a35_0x5277();}(function(_0x5887b8,_0x387f5b){const _0x1ca4ab=a35_0x71a2,_0x163dd3=_0x5887b8();while(!![]){try{const _0xdf6d85=parseInt(_0x1ca4ab(0x11b))/0x1+parseInt(_0x1ca4ab(0x110))/0x2+parseInt(_0x1ca4ab(0x10c))/0x3*(-parseInt(_0x1ca4ab(0x117))/0x4)+parseInt(_0x1ca4ab(0x118))/0x5*(-parseInt(_0x1ca4ab(0x106))/0x6)+parseInt(_0x1ca4ab(0x10f))/0x7+parseInt(_0x1ca4ab(0x109))/0x8*(-parseInt(_0x1ca4ab(0x114))/0x9)+parseInt(_0x1ca4ab(0x107))/0xa*(-parseInt(_0x1ca4ab(0x10d))/0xb);if(_0xdf6d85===_0x387f5b)break;else _0x163dd3['push'](_0x163dd3['shift']());}catch(_0x561392){_0x163dd3['push'](_0x163dd3['shift']());}}}(a35_0x5277,0xf402d));function a35_0x71a2(_0x47bc5e,_0x3d42f4){_0x47bc5e=_0x47bc5e-0xfe;const _0x52771f=a35_0x5277();let _0x71a2fe=_0x52771f[_0x47bc5e];return _0x71a2fe;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x2a7556(0x104),'command':a35_0x2a7556(0x111),'description':a35_0x2a7556(0x11a),'risk':a35_0x2a7556(0x102),'flags':[{'name':a35_0x2a7556(0xff),'type':'string','description':a35_0x2a7556(0x10b),'default':a35_0x2a7556(0x103),'enum':['ENDPOINT',a35_0x2a7556(0x10e)]},{'name':a35_0x2a7556(0x108),'type':a35_0x2a7556(0x10a),'description':a35_0x2a7556(0x100)},{'name':a35_0x2a7556(0xfe),'type':a35_0x2a7556(0x105),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x3a969f){const _0x12673a=a35_0x2a7556,_0x3ea76e=await listBffScripts(_0x3a969f[_0x12673a(0x113)],_0x3a969f[_0x12673a(0x101)](_0x12673a(0xff)),{'scriptName':_0x3a969f['str'](_0x12673a(0x108))||undefined}),_0x5524d6=_0x3a969f[_0x12673a(0x116)](_0x12673a(0xfe));return{'ok':!![],'data':_0x5524d6?_0x3ea76e:_0x3ea76e[_0x12673a(0x119)](_0x31ad76=>({'id':_0x31ad76['id'],'functionName':_0x31ad76['functionName']??'','description':_0x31ad76['description']||_0x12673a(0x11c),'scriptType':_0x31ad76[_0x12673a(0x112)]})),'message':_0x3ea76e[_0x12673a(0x115)]===0x0?'No\x20Backend\x20Function\x20scripts\x20found.':undefined};}};
1
+ const a35_0x1f9e3f=a35_0x49d4;(function(_0x2d70b7,_0x4c330f){const _0xab0d57=a35_0x49d4,_0x5589fc=_0x2d70b7();while(!![]){try{const _0x17e938=-parseInt(_0xab0d57(0x140))/0x1*(-parseInt(_0xab0d57(0x14b))/0x2)+parseInt(_0xab0d57(0x13f))/0x3*(parseInt(_0xab0d57(0x130))/0x4)+-parseInt(_0xab0d57(0x13b))/0x5*(parseInt(_0xab0d57(0x144))/0x6)+-parseInt(_0xab0d57(0x141))/0x7*(parseInt(_0xab0d57(0x12f))/0x8)+-parseInt(_0xab0d57(0x131))/0x9+parseInt(_0xab0d57(0x12e))/0xa*(parseInt(_0xab0d57(0x137))/0xb)+parseInt(_0xab0d57(0x134))/0xc;if(_0x17e938===_0x4c330f)break;else _0x5589fc['push'](_0x5589fc['shift']());}catch(_0x3008a3){_0x5589fc['push'](_0x5589fc['shift']());}}}(a35_0x459d,0xf2f4f));function a35_0x49d4(_0x49009b,_0x770887){_0x49009b=_0x49009b-0x12e;const _0x459d8c=a35_0x459d();let _0x49d49b=_0x459d8c[_0x49009b];return _0x49d49b;}function a35_0x459d(){const _0x51516d=['bool','functionName','6MboJcS','2NAnWeX','10686907VEdFGm','read','string','839598uNEdLv','Return\x20full\x20script\x20objects','verbose','boolean','Script\x20type\x20filter','length','ENDPOINT','950970FZYEdh','COMMON','List\x20Backend\x20Function\x20scripts','5674630XNfPCf','8xAuwga','3369212qqOwCV','10347111XOvKuH','bff','description','398772JaXaDt','appCode','Filter\x20by\x20script\x20name','33CxQXOJ','map','str','type','25XaHIdL','name'];a35_0x459d=function(){return _0x51516d;};return a35_0x459d();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x1f9e3f(0x132),'command':'list','description':a35_0x1f9e3f(0x14d),'risk':a35_0x1f9e3f(0x142),'flags':[{'name':a35_0x1f9e3f(0x13a),'type':'string','description':a35_0x1f9e3f(0x148),'default':'ENDPOINT','enum':[a35_0x1f9e3f(0x14a),a35_0x1f9e3f(0x14c)]},{'name':a35_0x1f9e3f(0x13c),'type':a35_0x1f9e3f(0x143),'description':a35_0x1f9e3f(0x136)},{'name':a35_0x1f9e3f(0x146),'type':a35_0x1f9e3f(0x147),'description':a35_0x1f9e3f(0x145)}],async 'execute'(_0x8836b9){const _0x90140f=a35_0x1f9e3f,_0x4864c6=await listBffScripts(_0x8836b9[_0x90140f(0x135)],_0x8836b9[_0x90140f(0x139)](_0x90140f(0x13a)),{'scriptName':_0x8836b9[_0x90140f(0x139)](_0x90140f(0x13c))||undefined}),_0x3076e8=_0x8836b9[_0x90140f(0x13d)]('verbose');return{'ok':!![],'data':_0x3076e8?_0x4864c6:_0x4864c6[_0x90140f(0x138)](_0x20b189=>({'id':_0x20b189['id'],'functionName':_0x20b189[_0x90140f(0x13e)]??'','description':_0x20b189[_0x90140f(0x133)]||'(unnamed)','scriptType':_0x20b189['scriptType']})),'message':_0x4864c6[_0x90140f(0x149)]===0x0?'No\x20Backend\x20Function\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
1
- function a36_0x58d0(){const _0x4d7ea8=['11TVJsZe','str','question','\x22\x20not\x20found\x20after\x20ensureLockScope.','152qNNSAH','cancelled','apiDir','bff','Remote\x20script\x20missing\x20id.','operationType','includes','local\x20unsynced\x20changes','Pull\x20complete:\x20','Pull\x20only\x20this\x20script\x20type','stdin','skipped','map','lastSync','bool','all','Would\x20inspect\x20','pull','&type=','would_pull','hash','/api/management/library/scripts/list?appCode=','5389068CInacg','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','Remote\x20script\x20missing\x20content.','1914KQNxEd','ENDPOINT','filePath','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','\x20failed','trim','stringify','214757zThBIE','nonInteractive','functionName','Force\x20pull\x20cancelled.','\x20skipped,\x20','GET','parse','datasetCode','appCode','stderr','yes','type','length','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','push','5866GjbGVv','lockFilePath','COMMON','lockKey','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','3TJsXHE','alias','close','unresolvable\x20target\x20path','1808SwImwd','functionNode','\x20pulled,\x20','conflict','hookLocation','379752BMyVnk','utf8','toLowerCase','2445iXFOMA','Force\x20overwrite\x20local\x20unsynced\x20changes','368400pbvxdq','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','HOOK','toISOString','scriptContent','scriptsRoot','force','102969DFBXpI','functions'];a36_0x58d0=function(){return _0x4d7ea8;};return a36_0x58d0();}const a36_0x514196=a36_0x1a75;(function(_0x389cac,_0x4adeb8){const _0x353e28=a36_0x1a75,_0x4dc735=_0x389cac();while(!![]){try{const _0x2d6d73=parseInt(_0x353e28(0x178))/0x1+parseInt(_0x353e28(0x195))/0x2*(parseInt(_0x353e28(0x18c))/0x3)+-parseInt(_0x353e28(0x190))/0x4*(parseInt(_0x353e28(0x198))/0x5)+-parseInt(_0x353e28(0x171))/0x6*(-parseInt(_0x353e28(0x187))/0x7)+-parseInt(_0x353e28(0x1a7))/0x8*(-parseInt(_0x353e28(0x1a1))/0x9)+-parseInt(_0x353e28(0x19a))/0xa+-parseInt(_0x353e28(0x1a3))/0xb*(parseInt(_0x353e28(0x1bd))/0xc);if(_0x2d6d73===_0x4adeb8)break;else _0x4dc735['push'](_0x4dc735['shift']());}catch(_0x42921e){_0x4dc735['push'](_0x4dc735['shift']());}}}(a36_0x58d0,0x2c869));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x514196(0x1aa),'command':'pull','description':a36_0x514196(0x174),'risk':'read','flags':[{'name':a36_0x514196(0x183),'type':'string','description':a36_0x514196(0x1b0),'enum':[a36_0x514196(0x189),a36_0x514196(0x172),a36_0x514196(0x19c)]},{'name':'force','type':'boolean','description':a36_0x514196(0x199)}],async 'dryRun'(_0x30c31f){const _0x622b33=a36_0x514196,_0x135b60=loadBffProjectConfig(_0x30c31f[_0x622b33(0x180)]),_0x26eb7b=await readBffLockFile(_0x135b60[_0x622b33(0x188)]),{appLock:_0x4fa76b}=ensureLockScope(_0x26eb7b??createEmptyBffLock(),_0x30c31f[_0x622b33(0x180)],_0x135b60['scriptsRoot'],_0x622b33(0x1b8)),_0x514e3c=normalizeBffType(_0x30c31f[_0x622b33(0x1a4)](_0x622b33(0x183)))??undefined,_0x3d4bda=buildDatasetCodeToAliasMap(_0x30c31f['apiDir'],_0x30c31f[_0x622b33(0x180)]),[_0x2eda05,_0x199e8f]=await Promise[_0x622b33(0x1b6)]([listBffScripts(_0x30c31f[_0x622b33(0x180)],_0x514e3c),getBffScriptStatistics(_0x30c31f[_0x622b33(0x180)])]),_0x5dae14=createHookLocationMap(_0x199e8f),_0x4f160d=[];for(const _0x407b6c of _0x2eda05){const _0xae4ccc=resolveRemoteScriptTarget(_0x135b60,_0x407b6c,_0x5dae14,_0x4fa76b[_0x622b33(0x1a2)],_0x3d4bda);if(!_0xae4ccc){_0x4f160d[_0x622b33(0x186)]({'scriptType':_0x407b6c['scriptType'],'functionName':_0x407b6c['functionName']??'','status':_0x622b33(0x1b2),'reason':'unresolvable\x20target\x20path'});continue;}const _0x302c6a=_0x4fa76b[_0x622b33(0x1a2)][_0xae4ccc[_0x622b33(0x18a)]],_0x5e52ee=_0x407b6c[_0x622b33(0x19e)]!=null?computeContentHash(_0x407b6c['scriptContent']):undefined,_0x52fd0f=await hasUnsyncedLocalChanges(_0xae4ccc['filePath'],_0x302c6a,_0x5e52ee);_0x4f160d[_0x622b33(0x186)]({'lockKey':_0xae4ccc['lockKey'],'filePath':_0xae4ccc[_0x622b33(0x173)],'remoteId':_0x407b6c['id']??null,'status':_0x52fd0f?_0x622b33(0x193):_0x622b33(0x1ba)});}return{'method':_0x622b33(0x17d),'url':_0x622b33(0x1bc)+_0x30c31f[_0x622b33(0x180)]+(_0x514e3c?_0x622b33(0x1b9)+_0x514e3c:''),'body':{'appCode':_0x30c31f[_0x622b33(0x180)],'filterType':_0x514e3c??null,'files':_0x4f160d},'description':_0x622b33(0x1b7)+_0x4f160d[_0x622b33(0x184)]+_0x622b33(0x19b)};},async 'execute'(_0x5e4aad){const _0x1c96fa=a36_0x514196,_0x43488c=loadBffProjectConfig(_0x5e4aad[_0x1c96fa(0x180)]),_0x45ca9e=await readBffLockFile(_0x43488c[_0x1c96fa(0x188)]),{lockData:_0x4e15d1,appLock:_0x2b7695}=ensureLockScope(_0x45ca9e??createEmptyBffLock(),_0x5e4aad['appCode'],_0x43488c[_0x1c96fa(0x19f)],_0x1c96fa(0x1b8)),_0x2c56d4=normalizeBffType(_0x5e4aad['str'](_0x1c96fa(0x183)))??undefined;if(_0x5e4aad[_0x1c96fa(0x1a4)](_0x1c96fa(0x183))&&!_0x2c56d4)throw CliErrors['validation'](_0x1c96fa(0x18b));const [_0x3e7c2c,_0x28dca4]=await Promise['all']([listBffScripts(_0x5e4aad[_0x1c96fa(0x180)],_0x2c56d4),getBffScriptStatistics(_0x5e4aad[_0x1c96fa(0x180)])]);if(_0x3e7c2c[_0x1c96fa(0x184)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1c96fa(0x1be)};const _0x6d9a6=_0x5e4aad[_0x1c96fa(0x1b5)](_0x1c96fa(0x1a0));if(_0x6d9a6&&!_0x5e4aad['nonInteractive']){const _0x2ccdfb=await confirmForce();if(!_0x2ccdfb)throw CliErrors[_0x1c96fa(0x1a8)](_0x1c96fa(0x17b));}if(_0x6d9a6&&_0x5e4aad[_0x1c96fa(0x179)]){}const _0x282ba9=buildDatasetCodeToAliasMap(_0x5e4aad[_0x1c96fa(0x1a9)],_0x5e4aad[_0x1c96fa(0x180)]),_0x4f511a=createHookLocationMap(_0x28dca4),_0x1cd74c=JSON[_0x1c96fa(0x17e)](JSON[_0x1c96fa(0x177)](_0x4e15d1)),_0x42cb17=_0x5e4aad[_0x1c96fa(0x180)],_0x5eeef0=_0x1cd74c['apps'][_0x42cb17];if(!_0x5eeef0)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x42cb17+_0x1c96fa(0x1a6));const _0x183c60=[],_0x5ef878=[],_0x487404=[];for(const _0x433613 of _0x3e7c2c){const _0x3d68c4=resolveRemoteScriptTarget(_0x43488c,_0x433613,_0x4f511a,_0x2b7695[_0x1c96fa(0x1a2)],_0x282ba9);if(!_0x3d68c4){_0x5ef878[_0x1c96fa(0x186)]({'lockKey':_0x433613['scriptType']+'/'+_0x433613[_0x1c96fa(0x17a)],'reason':_0x1c96fa(0x18f)});continue;}const _0x19d0f0=_0x2b7695[_0x1c96fa(0x1a2)][_0x3d68c4[_0x1c96fa(0x18a)]];try{if(!_0x433613['id'])throw new Error(_0x1c96fa(0x1ab));if(_0x433613[_0x1c96fa(0x19e)]==null)throw new Error(_0x1c96fa(0x170));const _0x17ae02=_0x433613['scriptContent'],_0x3bc8eb=computeContentHash(_0x17ae02);if(!_0x6d9a6){const _0x535d20=await hasUnsyncedLocalChanges(_0x3d68c4[_0x1c96fa(0x173)],_0x19d0f0,_0x3bc8eb);if(_0x535d20){_0x5ef878[_0x1c96fa(0x186)]({'lockKey':_0x3d68c4[_0x1c96fa(0x18a)],'reason':_0x1c96fa(0x1ae)});continue;}}await ensureParentDirectory(_0x3d68c4[_0x1c96fa(0x173)]),await writeFile(_0x3d68c4[_0x1c96fa(0x173)],_0x17ae02,_0x1c96fa(0x196));const _0x59673d={'hash':_0x3bc8eb,'remoteId':_0x433613['id'],'version':_0x433613['version']};_0x3d68c4[_0x1c96fa(0x183)]===_0x1c96fa(0x19c)&&_0x3d68c4[_0x1c96fa(0x194)]&&(_0x59673d[_0x1c96fa(0x18d)]=_0x3d68c4['hookLocation']['alias'],_0x59673d[_0x1c96fa(0x17f)]=_0x3d68c4['hookLocation'][_0x1c96fa(0x17f)],_0x59673d[_0x1c96fa(0x1ac)]=_0x3d68c4[_0x1c96fa(0x194)]['operationType'],_0x59673d[_0x1c96fa(0x191)]=_0x3d68c4['hookLocation']['functionNode']),_0x5eeef0[_0x1c96fa(0x1a2)][_0x3d68c4[_0x1c96fa(0x18a)]]=_0x59673d,_0x183c60['push']({'lockKey':_0x3d68c4[_0x1c96fa(0x18a)],'remoteId':_0x433613['id']});}catch(_0x33fc58){_0x487404['push']({'lockKey':_0x3d68c4[_0x1c96fa(0x18a)],'error':_0x33fc58 instanceof Error?_0x33fc58['message']:String(_0x33fc58)});}}return _0x5eeef0[_0x1c96fa(0x1b4)]=new Date()[_0x1c96fa(0x19d)](),await writeBffLockFile(_0x43488c[_0x1c96fa(0x188)],_0x1cd74c),{'ok':_0x487404['length']===0x0,'data':{'pulled':_0x183c60,'skipped':_0x5ef878,'failed':_0x487404},'message':_0x1c96fa(0x1af)+_0x183c60['length']+_0x1c96fa(0x192)+_0x5ef878[_0x1c96fa(0x184)]+_0x1c96fa(0x17c)+_0x487404[_0x1c96fa(0x184)]+_0x1c96fa(0x175)};}};async function hasUnsyncedLocalChanges(_0x23916d,_0x1f40ea,_0x17a4f7){const _0x1bd776=a36_0x514196;if(!await fileExists(_0x23916d))return![];const _0x2979c9=await computeFileHash(_0x23916d);if(!_0x1f40ea)return _0x17a4f7?_0x2979c9!==_0x17a4f7:!![];return _0x2979c9!==_0x1f40ea[_0x1bd776(0x1bb)];}function a36_0x1a75(_0x2a81d8,_0x338082){_0x2a81d8=_0x2a81d8-0x170;const _0x58d07b=a36_0x58d0();let _0x1a7577=_0x58d07b[_0x2a81d8];return _0x1a7577;}function buildDatasetCodeToAliasMap(_0x1b9711,_0x3beae5){const _0x766ff5=a36_0x514196,_0x2c2bd6=loadAliasMap(_0x1b9711,undefined,resolveApiFilePath(_0x1b9711,_0x3beae5));return new Map(_0x2c2bd6[_0x766ff5(0x1b3)](_0x353adb=>[_0x353adb[_0x766ff5(0x17f)],_0x353adb[_0x766ff5(0x18d)]]));}async function confirmForce(){const _0x45f0d7=a36_0x514196,_0x3f739d=createInterface({'input':process[_0x45f0d7(0x1b1)],'output':process[_0x45f0d7(0x181)]}),_0x351331=await new Promise(_0x3de013=>{const _0x289a2d=_0x45f0d7;_0x3f739d[_0x289a2d(0x1a5)](_0x289a2d(0x185),_0x3de013);});return _0x3f739d[_0x45f0d7(0x18e)](),['y',_0x45f0d7(0x182)][_0x45f0d7(0x1ad)](_0x351331[_0x45f0d7(0x176)]()[_0x45f0d7(0x197)]());}
1
+ const a36_0xbe77b0=a36_0x3c7a;function a36_0x3c7a(_0x1a59ff,_0x35834f){_0x1a59ff=_0x1a59ff-0x18f;const _0x571525=a36_0x5715();let _0x3c7a8d=_0x571525[_0x1a59ff];return _0x3c7a8d;}(function(_0x1f8fff,_0x5323fe){const _0x7d721f=a36_0x3c7a,_0x574444=_0x1f8fff();while(!![]){try{const _0x3553b9=-parseInt(_0x7d721f(0x19a))/0x1*(parseInt(_0x7d721f(0x1b5))/0x2)+-parseInt(_0x7d721f(0x1d6))/0x3*(-parseInt(_0x7d721f(0x1a2))/0x4)+parseInt(_0x7d721f(0x1a6))/0x5*(-parseInt(_0x7d721f(0x1ab))/0x6)+parseInt(_0x7d721f(0x1ae))/0x7+-parseInt(_0x7d721f(0x197))/0x8+parseInt(_0x7d721f(0x1a4))/0x9*(-parseInt(_0x7d721f(0x1cf))/0xa)+-parseInt(_0x7d721f(0x1ad))/0xb*(-parseInt(_0x7d721f(0x1a8))/0xc);if(_0x3553b9===_0x5323fe)break;else _0x574444['push'](_0x574444['shift']());}catch(_0x351796){_0x574444['push'](_0x574444['shift']());}}}(a36_0x5715,0x4fe2e));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x5715(){const _0x1abf06=['parse','Pull\x20complete:\x20','string','/api/management/library/scripts/list?appCode=','version','message','filePath','Remote\x20script\x20missing\x20content.','yes','Lock\x20scope\x20for\x20app\x20\x22','appCode','cancelled','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','close','\x20skipped,\x20','type','str','alias','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','stringify','COMMON','HOOK','conflict','596540kkLqsH','functions','ENDPOINT','nonInteractive','Pull\x20only\x20this\x20script\x20type','all','toLowerCase','1480341cTrODM','length','boolean','lockKey','force','lockFilePath','unresolvable\x20target\x20path','&type=','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','datasetCode','read','3247448giXIql','would_pull','hookLocation','221043OwUjbv','Force\x20pull\x20cancelled.','functionName','push','\x20failed','stdin','utf8','toISOString','4UmRLFN','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','27SAvfsD','GET','5OLSkSU','includes','12895932fLHaug','validation','pull','2972298IkiiSo','scriptType','11YRRepA','1970276fNISWg','functionNode','operationType','scriptsRoot','skipped','scriptContent','question','4dJVgIl','bool','local\x20unsynced\x20changes'];a36_0x5715=function(){return _0x1abf06;};return a36_0x5715();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0xbe77b0(0x1aa),'description':'Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','risk':a36_0xbe77b0(0x196),'flags':[{'name':'type','type':a36_0xbe77b0(0x1ba),'description':a36_0xbe77b0(0x1d3),'enum':[a36_0xbe77b0(0x1cc),a36_0xbe77b0(0x1d1),a36_0xbe77b0(0x1cd)]},{'name':a36_0xbe77b0(0x190),'type':a36_0xbe77b0(0x1d8),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0xc41663){const _0x385332=a36_0xbe77b0,_0x35c7bb=loadBffProjectConfig(_0xc41663[_0x385332(0x1c2)]),_0x4d2436=await readBffLockFile(_0x35c7bb[_0x385332(0x191)]),{appLock:_0x453cd1}=ensureLockScope(_0x4d2436??createEmptyBffLock(),_0xc41663[_0x385332(0x1c2)],_0x35c7bb[_0x385332(0x1b1)],_0x385332(0x1aa)),_0x44aad7=normalizeBffType(_0xc41663[_0x385332(0x1c8)](_0x385332(0x1c7)))??undefined,_0x3d93c7=buildDatasetCodeToAliasMap(_0xc41663['apiDir'],_0xc41663[_0x385332(0x1c2)]),[_0x4b97c4,_0x25256a]=await Promise[_0x385332(0x1d4)]([listBffScripts(_0xc41663[_0x385332(0x1c2)],_0x44aad7),getBffScriptStatistics(_0xc41663['appCode'])]),_0x32c49b=createHookLocationMap(_0x25256a),_0x185d1d=[];for(const _0x1609a9 of _0x4b97c4){const _0x556c2c=resolveRemoteScriptTarget(_0x35c7bb,_0x1609a9,_0x32c49b,_0x453cd1[_0x385332(0x1d0)],_0x3d93c7);if(!_0x556c2c){_0x185d1d[_0x385332(0x19d)]({'scriptType':_0x1609a9['scriptType'],'functionName':_0x1609a9[_0x385332(0x19c)]??'','status':_0x385332(0x1b2),'reason':'unresolvable\x20target\x20path'});continue;}const _0x3a90fb=_0x453cd1[_0x385332(0x1d0)][_0x556c2c[_0x385332(0x18f)]],_0x10dcc1=_0x1609a9[_0x385332(0x1b3)]!=null?computeContentHash(_0x1609a9['scriptContent']):undefined,_0x58b51=await hasUnsyncedLocalChanges(_0x556c2c[_0x385332(0x1be)],_0x3a90fb,_0x10dcc1);_0x185d1d[_0x385332(0x19d)]({'lockKey':_0x556c2c['lockKey'],'filePath':_0x556c2c[_0x385332(0x1be)],'remoteId':_0x1609a9['id']??null,'status':_0x58b51?_0x385332(0x1ce):_0x385332(0x198)});}return{'method':_0x385332(0x1a5),'url':_0x385332(0x1bb)+_0xc41663['appCode']+(_0x44aad7?_0x385332(0x193)+_0x44aad7:''),'body':{'appCode':_0xc41663[_0x385332(0x1c2)],'filterType':_0x44aad7??null,'files':_0x185d1d},'description':'Would\x20inspect\x20'+_0x185d1d[_0x385332(0x1d7)]+_0x385332(0x1a3)};},async 'execute'(_0x2a45e9){const _0x4a5910=a36_0xbe77b0,_0x17d439=loadBffProjectConfig(_0x2a45e9['appCode']),_0x59e817=await readBffLockFile(_0x17d439[_0x4a5910(0x191)]),{lockData:_0x1ecaa5,appLock:_0x30b160}=ensureLockScope(_0x59e817??createEmptyBffLock(),_0x2a45e9[_0x4a5910(0x1c2)],_0x17d439[_0x4a5910(0x1b1)],'pull'),_0x5539b1=normalizeBffType(_0x2a45e9['str'](_0x4a5910(0x1c7)))??undefined;if(_0x2a45e9[_0x4a5910(0x1c8)](_0x4a5910(0x1c7))&&!_0x5539b1)throw CliErrors[_0x4a5910(0x1a9)](_0x4a5910(0x1ca));const [_0x47d73a,_0x1216a9]=await Promise[_0x4a5910(0x1d4)]([listBffScripts(_0x2a45e9[_0x4a5910(0x1c2)],_0x5539b1),getBffScriptStatistics(_0x2a45e9[_0x4a5910(0x1c2)])]);if(_0x47d73a['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4a5910(0x1c4)};const _0x3d2b73=_0x2a45e9[_0x4a5910(0x1b6)](_0x4a5910(0x190));if(_0x3d2b73&&!_0x2a45e9['nonInteractive']){const _0x116eb6=await confirmForce();if(!_0x116eb6)throw CliErrors[_0x4a5910(0x1c3)](_0x4a5910(0x19b));}if(_0x3d2b73&&_0x2a45e9[_0x4a5910(0x1d2)]){}const _0x2acf5d=buildDatasetCodeToAliasMap(_0x2a45e9['apiDir'],_0x2a45e9[_0x4a5910(0x1c2)]),_0x4ddf0c=createHookLocationMap(_0x1216a9),_0x597435=JSON[_0x4a5910(0x1b8)](JSON[_0x4a5910(0x1cb)](_0x1ecaa5)),_0x469609=_0x2a45e9[_0x4a5910(0x1c2)],_0x8e9aea=_0x597435['apps'][_0x469609];if(!_0x8e9aea)throw new Error(_0x4a5910(0x1c1)+_0x469609+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x34b945=[],_0xa281ac=[],_0x26fdef=[];for(const _0x2b4f96 of _0x47d73a){const _0xe0d50b=resolveRemoteScriptTarget(_0x17d439,_0x2b4f96,_0x4ddf0c,_0x30b160[_0x4a5910(0x1d0)],_0x2acf5d);if(!_0xe0d50b){_0xa281ac[_0x4a5910(0x19d)]({'lockKey':_0x2b4f96[_0x4a5910(0x1ac)]+'/'+_0x2b4f96['functionName'],'reason':_0x4a5910(0x192)});continue;}const _0x5a4806=_0x30b160[_0x4a5910(0x1d0)][_0xe0d50b[_0x4a5910(0x18f)]];try{if(!_0x2b4f96['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x2b4f96[_0x4a5910(0x1b3)]==null)throw new Error(_0x4a5910(0x1bf));const _0x13e88e=_0x2b4f96[_0x4a5910(0x1b3)],_0x4f0fd1=computeContentHash(_0x13e88e);if(!_0x3d2b73){const _0x504120=await hasUnsyncedLocalChanges(_0xe0d50b[_0x4a5910(0x1be)],_0x5a4806,_0x4f0fd1);if(_0x504120){_0xa281ac[_0x4a5910(0x19d)]({'lockKey':_0xe0d50b[_0x4a5910(0x18f)],'reason':_0x4a5910(0x1b7)});continue;}}await ensureParentDirectory(_0xe0d50b[_0x4a5910(0x1be)]),await writeFile(_0xe0d50b['filePath'],_0x13e88e,_0x4a5910(0x1a0));const _0x3f3bc4={'hash':_0x4f0fd1,'remoteId':_0x2b4f96['id'],'version':_0x2b4f96[_0x4a5910(0x1bc)]};_0xe0d50b[_0x4a5910(0x1c7)]===_0x4a5910(0x1cd)&&_0xe0d50b[_0x4a5910(0x199)]&&(_0x3f3bc4[_0x4a5910(0x1c9)]=_0xe0d50b[_0x4a5910(0x199)][_0x4a5910(0x1c9)],_0x3f3bc4[_0x4a5910(0x195)]=_0xe0d50b['hookLocation']['datasetCode'],_0x3f3bc4[_0x4a5910(0x1b0)]=_0xe0d50b[_0x4a5910(0x199)][_0x4a5910(0x1b0)],_0x3f3bc4[_0x4a5910(0x1af)]=_0xe0d50b[_0x4a5910(0x199)][_0x4a5910(0x1af)]),_0x8e9aea[_0x4a5910(0x1d0)][_0xe0d50b[_0x4a5910(0x18f)]]=_0x3f3bc4,_0x34b945[_0x4a5910(0x19d)]({'lockKey':_0xe0d50b[_0x4a5910(0x18f)],'remoteId':_0x2b4f96['id']});}catch(_0x59bd32){_0x26fdef[_0x4a5910(0x19d)]({'lockKey':_0xe0d50b[_0x4a5910(0x18f)],'error':_0x59bd32 instanceof Error?_0x59bd32[_0x4a5910(0x1bd)]:String(_0x59bd32)});}}return _0x8e9aea['lastSync']=new Date()[_0x4a5910(0x1a1)](),await writeBffLockFile(_0x17d439[_0x4a5910(0x191)],_0x597435),{'ok':_0x26fdef[_0x4a5910(0x1d7)]===0x0,'data':{'pulled':_0x34b945,'skipped':_0xa281ac,'failed':_0x26fdef},'message':_0x4a5910(0x1b9)+_0x34b945[_0x4a5910(0x1d7)]+'\x20pulled,\x20'+_0xa281ac['length']+_0x4a5910(0x1c6)+_0x26fdef[_0x4a5910(0x1d7)]+_0x4a5910(0x19e)};}};async function hasUnsyncedLocalChanges(_0x42e6e7,_0x3c8786,_0x1be440){if(!await fileExists(_0x42e6e7))return![];const _0x154195=await computeFileHash(_0x42e6e7);if(!_0x3c8786)return _0x1be440?_0x154195!==_0x1be440:!![];return _0x154195!==_0x3c8786['hash'];}function buildDatasetCodeToAliasMap(_0x3faf8d,_0x38b0aa){const _0x131919=a36_0xbe77b0,_0x176318=loadAliasMap(_0x3faf8d,undefined,resolveApiFilePath(_0x3faf8d,_0x38b0aa));return new Map(_0x176318['map'](_0x4c8073=>[_0x4c8073[_0x131919(0x195)],_0x4c8073[_0x131919(0x1c9)]]));}async function confirmForce(){const _0x4c7990=a36_0xbe77b0,_0x1d01c6=createInterface({'input':process[_0x4c7990(0x19f)],'output':process['stderr']}),_0x222ca2=await new Promise(_0x786274=>{const _0x455357=_0x4c7990;_0x1d01c6[_0x455357(0x1b4)](_0x455357(0x194),_0x786274);});return _0x1d01c6[_0x4c7990(0x1c5)](),['y',_0x4c7990(0x1c0)][_0x4c7990(0x1a7)](_0x222ca2['trim']()[_0x4c7990(0x1d5)]());}
@@ -1 +1 @@
1
- const a37_0x325ae5=a37_0x48c6;(function(_0x586916,_0x21ca4b){const _0x36656=a37_0x48c6,_0x3ed4af=_0x586916();while(!![]){try{const _0x308dd4=-parseInt(_0x36656(0x93))/0x1+-parseInt(_0x36656(0x9a))/0x2*(-parseInt(_0x36656(0xca))/0x3)+parseInt(_0x36656(0xaf))/0x4+parseInt(_0x36656(0xac))/0x5+-parseInt(_0x36656(0x97))/0x6+parseInt(_0x36656(0xd7))/0x7*(-parseInt(_0x36656(0xa3))/0x8)+-parseInt(_0x36656(0xc5))/0x9;if(_0x308dd4===_0x21ca4b)break;else _0x3ed4af['push'](_0x3ed4af['shift']());}catch(_0x340da5){_0x3ed4af['push'](_0x3ed4af['shift']());}}}(a37_0x53a2,0x7037d));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_0x53a2(){const _0x2207f0=['\x20uploaded,\x20','every','POST','stringify','length','set','str','runtime\x20cache\x20not\x20needed','1071VxrzWr','Push\x20complete:\x20','map','status','name','functionNode','COMMON','lastSync','write','force','runtime\x20cache\x20cleared','alias','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','filePath','Would\x20inspect\x20','validation','has','attempted','254901Fyilym','lockFilePath','get','cleared','1363302AArmcW','parse','\x20failed,\x20','6866zwCgOL','remoteId','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x22.\x20','apiDir','Local\x20function\x20not\x20found:\x20','hash','values','update','16272sTImVK','join','Run\x20`','would_push','scriptsRoot','push','Force\x20push\x20ignoring\x20hash\x20protection','runtime\x20cache\x20clear\x20failed','aliasToDatasetCode','3561515FfcrfM','utf8','lockKey','3065744rOisCo','Incomplete\x20HOOK\x20path:\x20','functions','bff','unchanged','bool','type','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','datasetCodeToDataset','string','datasetId','description','\x20skipped,\x20','apps','HOOK',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','message','Push\x20only\x20this\x20script\x20type','create','version','toISOString','9910701grnosx','operationType','some','/api/management/library/scripts/save','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','765wEFMuo','boolean','datasetCode','filter','appCode'];a37_0x53a2=function(){return _0x2207f0;};return a37_0x53a2();}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_0x325ae5(0xb2),'command':a37_0x325ae5(0xa8),'description':a37_0x325ae5(0xbf),'risk':a37_0x325ae5(0xdf),'flags':[{'name':a37_0x325ae5(0xb5),'type':a37_0x325ae5(0xb8),'description':a37_0x325ae5(0xc1),'enum':[a37_0x325ae5(0xdd),'ENDPOINT',a37_0x325ae5(0xbd)]},{'name':a37_0x325ae5(0xdb),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x325ae5(0xe0),'type':a37_0x325ae5(0xcb),'description':a37_0x325ae5(0xa9)}],async 'dryRun'(_0x7c52a1){const _0x5ada37=a37_0x325ae5,_0x559321=loadBffProjectConfig(_0x7c52a1['appCode']),_0xb86ea0=await readBffLockFile(_0x559321[_0x5ada37(0x94)]),{appLock:_0x2d833a}=ensureLockScope(_0xb86ea0??createEmptyBffLock(),_0x7c52a1[_0x5ada37(0xce)],_0x559321['scriptsRoot'],_0x5ada37(0xa8)),_0x514136=await getTargetFunctions(_0x559321,_0x7c52a1),_0x2e0709=_0x7c52a1[_0x5ada37(0xb4)](_0x5ada37(0xe0)),_0x10e306=[];for(const _0x19693c of _0x514136){const _0x39236d=await computeFileHash(_0x19693c[_0x5ada37(0xe4)]),_0xa43975=_0x2d833a[_0x5ada37(0xb1)][_0x19693c['lockKey']],_0xb371b=!!_0xa43975&&_0xa43975[_0x5ada37(0xa0)]===_0x39236d,_0x1d6bf8=!_0x2e0709&&_0xb371b?_0x5ada37(0xb3):_0x5ada37(0xa6);_0x10e306[_0x5ada37(0xa8)]({'lockKey':_0x19693c[_0x5ada37(0xae)],'filePath':_0x19693c[_0x5ada37(0xe4)],'remoteId':_0xa43975?.[_0x5ada37(0x9b)]??null,'mode':_0xa43975?.[_0x5ada37(0x9b)]?_0x5ada37(0xa2):_0x5ada37(0xc2),'status':_0x1d6bf8});}return{'method':_0x5ada37(0xd1),'url':_0x5ada37(0xc8),'body':{'appCode':_0x7c52a1[_0x5ada37(0xce)],'force':_0x2e0709,'files':_0x10e306,'cacheClearAtRuntime':_0x10e306[_0x5ada37(0xc7)](_0x575929=>_0x575929[_0x5ada37(0xda)]===_0x5ada37(0xa6)),'cacheClearAtRuntimeTimes':_0x10e306[_0x5ada37(0xc7)](_0x4b195e=>_0x4b195e[_0x5ada37(0xda)]===_0x5ada37(0xa6))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5ada37(0xe5)+_0x10e306[_0x5ada37(0xd3)]+_0x5ada37(0xc9)};},async 'execute'(_0xa0f3f5){const _0x3c498b=a37_0x325ae5,_0x3d42bb=loadBffProjectConfig(_0xa0f3f5[_0x3c498b(0xce)]),_0x67216c=await readBffLockFile(_0x3d42bb['lockFilePath']),{lockData:_0x5402cf,appLock:_0x6fe72c}=ensureLockScope(_0x67216c??createEmptyBffLock(),_0xa0f3f5[_0x3c498b(0xce)],_0x3d42bb[_0x3c498b(0xa7)],_0x3c498b(0xa8)),_0x24e2d0=await getTargetFunctions(_0x3d42bb,_0xa0f3f5);if(_0x24e2d0['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x1bea4e=_0xa0f3f5[_0x3c498b(0xb4)]('force'),_0x1d73e2=JSON[_0x3c498b(0x98)](JSON[_0x3c498b(0xd2)](_0x5402cf)),_0x1f51b3=_0x1d73e2[_0x3c498b(0xbc)][_0xa0f3f5[_0x3c498b(0xce)]];if(!_0x1f51b3)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xa0f3f5[_0x3c498b(0xce)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x2e28f9=await buildHookMaps(_0xa0f3f5[_0x3c498b(0xce)],_0xa0f3f5[_0x3c498b(0x9e)],_0x24e2d0,_0x1f51b3),_0x5ea18c=[],_0x2239e5=[],_0x360f62=[];for(const _0x495f2d of _0x24e2d0){const _0x40f43f=await computeFileHash(_0x495f2d[_0x3c498b(0xe4)]),_0xba6600=_0x1f51b3['functions'][_0x495f2d[_0x3c498b(0xae)]];if(!_0x1bea4e&&_0xba6600&&_0xba6600[_0x3c498b(0xa0)]===_0x40f43f){_0x2239e5[_0x3c498b(0xa8)]({'lockKey':_0x495f2d[_0x3c498b(0xae)],'reason':_0x3c498b(0xb3)});continue;}try{await uploadSingleFunction(_0xa0f3f5[_0x3c498b(0xce)],_0x495f2d,_0x1f51b3,_0x2e28f9);const _0x159be1=_0x1f51b3[_0x3c498b(0xb1)][_0x495f2d['lockKey']];_0x5ea18c[_0x3c498b(0xa8)]({'lockKey':_0x495f2d[_0x3c498b(0xae)],'remoteId':_0x159be1?.[_0x3c498b(0x9b)]??0x0});}catch(_0x3df3e2){_0x360f62['push']({'lockKey':_0x495f2d[_0x3c498b(0xae)],'error':_0x3df3e2 instanceof Error?_0x3df3e2[_0x3c498b(0xc0)]:String(_0x3df3e2)});}}_0x1f51b3[_0x3c498b(0xde)]=new Date()[_0x3c498b(0xc4)](),await writeBffLockFile(_0x3d42bb['lockFilePath'],_0x1d73e2),await waitForUploadedLockEntries(_0x3d42bb[_0x3c498b(0x94)],_0xa0f3f5[_0x3c498b(0xce)],_0x5ea18c[_0x3c498b(0xd9)](_0x30e110=>_0x30e110[_0x3c498b(0xae)]));let _0x478255={'attempted':![],'cleared':![]};if(_0x5ea18c['length']>0x0)try{let _0x2ec3b7='';for(let _0x337d3d=0x0;_0x337d3d<CACHE_CLEAR_ATTEMPTS;_0x337d3d+=0x1){_0x2ec3b7=await clearBffScriptCache(),_0x337d3d<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x478255={'attempted':!![],'cleared':!![],'message':_0x2ec3b7||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4d2425){_0x478255={'attempted':!![],'cleared':![],'error':_0x4d2425 instanceof Error?_0x4d2425[_0x3c498b(0xc0)]:String(_0x4d2425)};}const _0x718984=_0x360f62[_0x3c498b(0xd3)]===0x0&&(_0x478255[_0x3c498b(0x92)]?_0x478255[_0x3c498b(0x96)]:!![]),_0x40580a=_0x718984,_0x43cc6c=_0x478255['attempted']?_0x478255[_0x3c498b(0x96)]?_0x3c498b(0xe1):_0x3c498b(0xaa):_0x3c498b(0xd6);return{'ok':_0x40580a,'data':{'uploaded':_0x5ea18c,'skipped':_0x2239e5,'failed':_0x360f62,'cacheClear':_0x478255},'message':_0x3c498b(0xd8)+_0x5ea18c[_0x3c498b(0xd3)]+_0x3c498b(0xcf)+_0x2239e5[_0x3c498b(0xd3)]+_0x3c498b(0xbb)+_0x360f62[_0x3c498b(0xd3)]+_0x3c498b(0x99)+_0x43cc6c};}};async function getTargetFunctions(_0x43c47a,_0x53b96c){const _0x266feb=a37_0x325ae5,_0x4e960e=_0x53b96c['str'](_0x266feb(0xb5)),_0x59c335=_0x53b96c[_0x266feb(0xd5)](_0x266feb(0xdb)),_0x35dc7d=normalizeBffType(_0x4e960e)??undefined;if(_0x59c335&&!_0x35dc7d)throw CliErrors[_0x266feb(0xe6)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x10aafd=await scanLocalBffFunctions(_0x43c47a,_0x35dc7d);if(_0x59c335){const _0x597d86=_0x10aafd[_0x266feb(0xcd)](_0x2d6a83=>_0x2d6a83[_0x266feb(0xdb)]===_0x59c335);if(_0x597d86[_0x266feb(0xd3)]===0x0)throw CliErrors[_0x266feb(0xe6)](_0x266feb(0x9f)+_0x35dc7d+'/'+_0x59c335);return _0x597d86;}return _0x10aafd;}async function buildHookMaps(_0x206e57,_0x45a18d,_0x3f67f5,_0x345262){const _0x2e5d53=a37_0x325ae5,_0x5933b4=_0x3f67f5[_0x2e5d53(0xc7)](_0x4c5159=>_0x4c5159[_0x2e5d53(0xb5)]==='HOOK');if(!_0x5933b4)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4b924d=loadAliasMap(_0x45a18d,undefined,resolveApiFilePath(_0x45a18d,_0x206e57)),_0x3674cb=new Map(_0x4b924d['map'](_0x5cfe03=>[_0x5cfe03['alias'],_0x5cfe03[_0x2e5d53(0xcc)]]));for(const _0x3df8f8 of Object[_0x2e5d53(0xa1)](_0x345262[_0x2e5d53(0xb1)])){_0x3df8f8[_0x2e5d53(0xe2)]&&_0x3df8f8['datasetCode']&&!_0x3674cb[_0x2e5d53(0x91)](_0x3df8f8[_0x2e5d53(0xe2)])&&_0x3674cb[_0x2e5d53(0xd4)](_0x3df8f8['alias'],_0x3df8f8[_0x2e5d53(0xcc)]);}const _0x532f82=await listDatasets(_0x206e57),_0x4c6fa4=new Map(_0x532f82[_0x2e5d53(0xd9)](_0x34d20b=>[_0x34d20b['code'],_0x34d20b]));return{'aliasToDatasetCode':_0x3674cb,'datasetCodeToDataset':_0x4c6fa4};}async function uploadSingleFunction(_0x150970,_0x428c8d,_0x157d73,_0x51e113){const _0x30b6a2=a37_0x325ae5,_0x44367e=await readFile(_0x428c8d[_0x30b6a2(0xe4)],_0x30b6a2(0xad)),_0x26036f=await computeFileHash(_0x428c8d['filePath']),_0x2b7940=_0x157d73[_0x30b6a2(0xb1)][_0x428c8d[_0x30b6a2(0xae)]];if(_0x2b7940?.[_0x30b6a2(0x9b)]&&_0x2b7940[_0x30b6a2(0xc3)]==null)throw CliErrors['validation'](_0x428c8d['lockKey']+_0x30b6a2(0xbe));let _0x4779b1=extractScriptDescription(_0x44367e);if(!_0x4779b1&&_0x2b7940?.['remoteId']){const _0x2e59b0=await getBffScriptInfo(_0x2b7940['remoteId']);_0x4779b1=_0x2e59b0[_0x30b6a2(0xba)]||undefined;}const _0x5735d0={'appCode':_0x150970,'functionName':_0x428c8d['name'],'scriptType':_0x428c8d[_0x30b6a2(0xb5)],'scriptContent':_0x44367e};if(_0x2b7940?.[_0x30b6a2(0x9b)])_0x5735d0['id']=_0x2b7940['remoteId'];if(_0x2b7940?.[_0x30b6a2(0xc3)]!=null)_0x5735d0[_0x30b6a2(0xc3)]=_0x2b7940[_0x30b6a2(0xc3)];if(_0x4779b1)_0x5735d0[_0x30b6a2(0xba)]=_0x4779b1;if(_0x428c8d[_0x30b6a2(0xb5)]==='HOOK'){const _0x4c6ec0=_0x428c8d[_0x30b6a2(0xe2)];if(!_0x4c6ec0||!_0x428c8d[_0x30b6a2(0xc6)]||!_0x428c8d[_0x30b6a2(0xdc)])throw CliErrors[_0x30b6a2(0xe6)](_0x30b6a2(0xb0)+_0x428c8d[_0x30b6a2(0xae)]);const _0x447e43=_0x51e113[_0x30b6a2(0xab)][_0x30b6a2(0x95)](_0x4c6ec0)??_0x2b7940?.[_0x30b6a2(0xcc)]??_0x4c6ec0,_0x220465=_0x51e113[_0x30b6a2(0xb7)][_0x30b6a2(0x95)](_0x447e43);if(!_0x220465)throw CliErrors[_0x30b6a2(0xe6)](_0x30b6a2(0x9c)+_0x4c6ec0+_0x30b6a2(0x9d)+(_0x30b6a2(0xa5)+CLI_BIN_NAME+_0x30b6a2(0xe3)));_0x5735d0[_0x30b6a2(0xb9)]=_0x220465['id'],_0x5735d0[_0x30b6a2(0xc6)]=_0x428c8d[_0x30b6a2(0xc6)],_0x5735d0[_0x30b6a2(0xdc)]=_0x428c8d[_0x30b6a2(0xdc)];}const _0x45ccc6=await saveBffScript(_0x5735d0),_0x4321f8=_0x45ccc6['id'],_0x35c1dc=_0x45ccc6['script']??await getBffScriptInfo(_0x4321f8),_0x37bdb1={'hash':_0x26036f,'remoteId':_0x4321f8,'version':_0x35c1dc[_0x30b6a2(0xc3)]};if(_0x428c8d[_0x30b6a2(0xb5)]===_0x30b6a2(0xbd)){const _0x25efc6=_0x428c8d['alias'],_0x5f5862=_0x51e113[_0x30b6a2(0xab)][_0x30b6a2(0x95)](_0x25efc6)??_0x2b7940?.['datasetCode']??_0x25efc6;_0x51e113[_0x30b6a2(0xab)]['has'](_0x25efc6)?_0x37bdb1[_0x30b6a2(0xe2)]=_0x25efc6:_0x37bdb1['alias']=_0x2b7940?.[_0x30b6a2(0xe2)],_0x37bdb1[_0x30b6a2(0xcc)]=_0x5f5862,_0x37bdb1['operationType']=_0x428c8d['operationType'],_0x37bdb1[_0x30b6a2(0xdc)]=_0x428c8d[_0x30b6a2(0xdc)];}_0x157d73['functions'][_0x428c8d['lockKey']]=_0x37bdb1;}function a37_0x48c6(_0x58cb13,_0x56dc51){_0x58cb13=_0x58cb13-0x91;const _0x53a2e2=a37_0x53a2();let _0x48c679=_0x53a2e2[_0x58cb13];return _0x48c679;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1ce45a,_0x3a99a9,_0x5948de){const _0xa7ecae=a37_0x325ae5;if(_0x5948de[_0xa7ecae(0xd3)]===0x0)return;for(let _0x52cca7=0x0;_0x52cca7<LOCK_SETTLE_RETRY_COUNT;_0x52cca7+=0x1){const _0xae938d=await readBffLockFile(_0x1ce45a),_0x20c95a=_0xae938d?.[_0xa7ecae(0xbc)]?.[_0x3a99a9]?.[_0xa7ecae(0xb1)]??{},_0x135d21=_0x5948de[_0xa7ecae(0xd0)](_0x2f69b1=>!!_0x20c95a[_0x2f69b1]?.[_0xa7ecae(0x9b)]);if(_0x135d21)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xa7ecae(0xb6)+_0x5948de[_0xa7ecae(0xa4)](',\x20')+'.');}
1
+ const a37_0xe8d9c4=a37_0x4c43;(function(_0x19db58,_0x5c0f52){const _0x2271d7=a37_0x4c43,_0x564e6c=_0x19db58();while(!![]){try{const _0x56b263=parseInt(_0x2271d7(0x18f))/0x1+-parseInt(_0x2271d7(0x1c0))/0x2*(parseInt(_0x2271d7(0x172))/0x3)+parseInt(_0x2271d7(0x199))/0x4*(parseInt(_0x2271d7(0x1a6))/0x5)+parseInt(_0x2271d7(0x1bc))/0x6+-parseInt(_0x2271d7(0x1b1))/0x7*(-parseInt(_0x2271d7(0x1b2))/0x8)+parseInt(_0x2271d7(0x1ac))/0x9*(parseInt(_0x2271d7(0x179))/0xa)+-parseInt(_0x2271d7(0x17d))/0xb;if(_0x56b263===_0x5c0f52)break;else _0x564e6c['push'](_0x564e6c['shift']());}catch(_0x1c9789){_0x564e6c['push'](_0x564e6c['shift']());}}}(a37_0x2b4a,0xb5b96));import{readFile}from'node:fs/promises';function a37_0x2b4a(){const _0x4bb915=['remoteId','204280ixoUnv','datasetId','force','runtime\x20cache\x20cleared','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','bool','set','datasetCode','ENDPOINT','aliasToDatasetCode','script','would_push','\x20failed,\x20','110MkvzJH','boolean','validation','write','Force\x20push\x20ignoring\x20hash\x20protection','has','5815089rJSGpY','join','functionNode','push','scriptsRoot','140TEovCp','421936plRWjw','code','version','unchanged','description','runtime\x20cache\x20not\x20needed','get','Push\x20only\x20this\x20script\x20type','parse','\x22.\x20','7194642pIgMJS','stringify','length','lockFilePath','2645782CKRbCa','/api/management/library/scripts/save','Lock\x20scope\x20for\x20app\x20\x22','3WDqpMj','map','bff','HOOK','datasetCodeToDataset','name','functions','10uhAnRU','utf8','every','Would\x20inspect\x20','25400991KzHUQT','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','lastSync','update','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','string','Push\x20complete:\x20','status','filePath','apps','operationType','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Local\x20function\x20not\x20found:\x20','hash','type','\x20skipped,\x20','alias','attempted','352806zYpvzH',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','create','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','lockKey','appCode','COMMON','toISOString','message'];a37_0x2b4a=function(){return _0x4bb915;};return a37_0x2b4a();}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_0x4c43(_0x5c3270,_0x57dd83){_0x5c3270=_0x5c3270-0x172;const _0x2b4a86=a37_0x2b4a();let _0x4c43ec=_0x2b4a86[_0x5c3270];return _0x4c43ec;}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_0xe8d9c4(0x174),'command':a37_0xe8d9c4(0x1af),'description':a37_0xe8d9c4(0x17e),'risk':a37_0xe8d9c4(0x1a9),'flags':[{'name':a37_0xe8d9c4(0x18b),'type':a37_0xe8d9c4(0x182),'description':a37_0xe8d9c4(0x1b9),'enum':[a37_0xe8d9c4(0x195),a37_0xe8d9c4(0x1a1),'HOOK']},{'name':'name','type':a37_0xe8d9c4(0x182),'description':a37_0xe8d9c4(0x19d)},{'name':a37_0xe8d9c4(0x19b),'type':a37_0xe8d9c4(0x1a7),'description':a37_0xe8d9c4(0x1aa)}],async 'dryRun'(_0x461a87){const _0x244a16=a37_0xe8d9c4,_0x79479f=loadBffProjectConfig(_0x461a87[_0x244a16(0x194)]),_0x43eeb9=await readBffLockFile(_0x79479f[_0x244a16(0x1bf)]),{appLock:_0x1ac7ca}=ensureLockScope(_0x43eeb9??createEmptyBffLock(),_0x461a87[_0x244a16(0x194)],_0x79479f[_0x244a16(0x1b0)],_0x244a16(0x1af)),_0x4f9fac=await getTargetFunctions(_0x79479f,_0x461a87),_0x31b302=_0x461a87['bool'](_0x244a16(0x19b)),_0x294b75=[];for(const _0x37f2c4 of _0x4f9fac){const _0x424a1a=await computeFileHash(_0x37f2c4[_0x244a16(0x185)]),_0x468c6f=_0x1ac7ca[_0x244a16(0x178)][_0x37f2c4[_0x244a16(0x193)]],_0x37be77=!!_0x468c6f&&_0x468c6f[_0x244a16(0x18a)]===_0x424a1a,_0x10d48a=!_0x31b302&&_0x37be77?_0x244a16(0x1b5):_0x244a16(0x1a4);_0x294b75[_0x244a16(0x1af)]({'lockKey':_0x37f2c4[_0x244a16(0x193)],'filePath':_0x37f2c4[_0x244a16(0x185)],'remoteId':_0x468c6f?.[_0x244a16(0x198)]??null,'mode':_0x468c6f?.['remoteId']?_0x244a16(0x180):_0x244a16(0x191),'status':_0x10d48a});}return{'method':'POST','url':_0x244a16(0x1c1),'body':{'appCode':_0x461a87['appCode'],'force':_0x31b302,'files':_0x294b75,'cacheClearAtRuntime':_0x294b75['some'](_0x1b305c=>_0x1b305c['status']===_0x244a16(0x1a4)),'cacheClearAtRuntimeTimes':_0x294b75['some'](_0x13e5aa=>_0x13e5aa[_0x244a16(0x184)]===_0x244a16(0x1a4))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x244a16(0x17c)+_0x294b75[_0x244a16(0x1be)]+_0x244a16(0x192)};},async 'execute'(_0x4d42f7){const _0xa1d88c=a37_0xe8d9c4,_0x52b123=loadBffProjectConfig(_0x4d42f7[_0xa1d88c(0x194)]),_0x1175d9=await readBffLockFile(_0x52b123[_0xa1d88c(0x1bf)]),{lockData:_0x4eb37a,appLock:_0x221ac8}=ensureLockScope(_0x1175d9??createEmptyBffLock(),_0x4d42f7['appCode'],_0x52b123[_0xa1d88c(0x1b0)],'push'),_0x196832=await getTargetFunctions(_0x52b123,_0x4d42f7);if(_0x196832[_0xa1d88c(0x1be)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xa1d88c(0x188)};const _0x17c409=_0x4d42f7[_0xa1d88c(0x19e)](_0xa1d88c(0x19b)),_0x5b1c4d=JSON[_0xa1d88c(0x1ba)](JSON[_0xa1d88c(0x1bd)](_0x4eb37a)),_0x31c807=_0x5b1c4d[_0xa1d88c(0x186)][_0x4d42f7['appCode']];if(!_0x31c807)throw new Error(_0xa1d88c(0x1c2)+_0x4d42f7[_0xa1d88c(0x194)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x5f4b35=await buildHookMaps(_0x4d42f7['appCode'],_0x4d42f7['apiDir'],_0x196832,_0x31c807),_0x142fa8=[],_0x2ba67b=[],_0x510817=[];for(const _0x18d3b1 of _0x196832){const _0x11ec18=await computeFileHash(_0x18d3b1[_0xa1d88c(0x185)]),_0x158b01=_0x31c807['functions'][_0x18d3b1[_0xa1d88c(0x193)]];if(!_0x17c409&&_0x158b01&&_0x158b01[_0xa1d88c(0x18a)]===_0x11ec18){_0x2ba67b[_0xa1d88c(0x1af)]({'lockKey':_0x18d3b1['lockKey'],'reason':_0xa1d88c(0x1b5)});continue;}try{await uploadSingleFunction(_0x4d42f7[_0xa1d88c(0x194)],_0x18d3b1,_0x31c807,_0x5f4b35);const _0x5eaae7=_0x31c807[_0xa1d88c(0x178)][_0x18d3b1['lockKey']];_0x142fa8[_0xa1d88c(0x1af)]({'lockKey':_0x18d3b1[_0xa1d88c(0x193)],'remoteId':_0x5eaae7?.[_0xa1d88c(0x198)]??0x0});}catch(_0x23a0c2){_0x510817['push']({'lockKey':_0x18d3b1[_0xa1d88c(0x193)],'error':_0x23a0c2 instanceof Error?_0x23a0c2[_0xa1d88c(0x197)]:String(_0x23a0c2)});}}_0x31c807[_0xa1d88c(0x17f)]=new Date()[_0xa1d88c(0x196)](),await writeBffLockFile(_0x52b123[_0xa1d88c(0x1bf)],_0x5b1c4d),await waitForUploadedLockEntries(_0x52b123[_0xa1d88c(0x1bf)],_0x4d42f7[_0xa1d88c(0x194)],_0x142fa8['map'](_0xd16274=>_0xd16274[_0xa1d88c(0x193)]));let _0x10d040={'attempted':![],'cleared':![]};if(_0x142fa8[_0xa1d88c(0x1be)]>0x0)try{let _0x3af3fa='';for(let _0x28c313=0x0;_0x28c313<CACHE_CLEAR_ATTEMPTS;_0x28c313+=0x1){_0x3af3fa=await clearBffScriptCache(),_0x28c313<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x10d040={'attempted':!![],'cleared':!![],'message':_0x3af3fa||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x181489){_0x10d040={'attempted':!![],'cleared':![],'error':_0x181489 instanceof Error?_0x181489['message']:String(_0x181489)};}const _0x266ba5=_0x510817[_0xa1d88c(0x1be)]===0x0&&(_0x10d040[_0xa1d88c(0x18e)]?_0x10d040['cleared']:!![]),_0x5d834b=_0x266ba5,_0x56be2f=_0x10d040['attempted']?_0x10d040['cleared']?_0xa1d88c(0x19c):'runtime\x20cache\x20clear\x20failed':_0xa1d88c(0x1b7);return{'ok':_0x5d834b,'data':{'uploaded':_0x142fa8,'skipped':_0x2ba67b,'failed':_0x510817,'cacheClear':_0x10d040},'message':_0xa1d88c(0x183)+_0x142fa8[_0xa1d88c(0x1be)]+'\x20uploaded,\x20'+_0x2ba67b[_0xa1d88c(0x1be)]+_0xa1d88c(0x18c)+_0x510817['length']+_0xa1d88c(0x1a5)+_0x56be2f};}};async function getTargetFunctions(_0x11fb30,_0x58a5fb){const _0x47fcd1=a37_0xe8d9c4,_0x46e19a=_0x58a5fb['str']('type'),_0x3ac20e=_0x58a5fb['str'](_0x47fcd1(0x177)),_0xef9952=normalizeBffType(_0x46e19a)??undefined;if(_0x3ac20e&&!_0xef9952)throw CliErrors['validation'](_0x47fcd1(0x181));const _0x2345a3=await scanLocalBffFunctions(_0x11fb30,_0xef9952);if(_0x3ac20e){const _0x4a63ac=_0x2345a3['filter'](_0x36c2ee=>_0x36c2ee[_0x47fcd1(0x177)]===_0x3ac20e);if(_0x4a63ac['length']===0x0)throw CliErrors[_0x47fcd1(0x1a8)](_0x47fcd1(0x189)+_0xef9952+'/'+_0x3ac20e);return _0x4a63ac;}return _0x2345a3;}async function buildHookMaps(_0x546de3,_0x21d0a3,_0x2ea399,_0x14b329){const _0x5f3923=a37_0xe8d9c4,_0x4bbfdd=_0x2ea399['some'](_0x4f27ef=>_0x4f27ef[_0x5f3923(0x18b)]===_0x5f3923(0x175));if(!_0x4bbfdd)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5b1a22=loadAliasMap(_0x21d0a3,undefined,resolveApiFilePath(_0x21d0a3,_0x546de3)),_0x1e71ab=new Map(_0x5b1a22['map'](_0x4c7b26=>[_0x4c7b26[_0x5f3923(0x18d)],_0x4c7b26[_0x5f3923(0x1a0)]]));for(const _0x37b931 of Object['values'](_0x14b329[_0x5f3923(0x178)])){_0x37b931[_0x5f3923(0x18d)]&&_0x37b931[_0x5f3923(0x1a0)]&&!_0x1e71ab[_0x5f3923(0x1ab)](_0x37b931[_0x5f3923(0x18d)])&&_0x1e71ab[_0x5f3923(0x19f)](_0x37b931[_0x5f3923(0x18d)],_0x37b931['datasetCode']);}const _0x31b180=await listDatasets(_0x546de3),_0x1855ed=new Map(_0x31b180[_0x5f3923(0x173)](_0x221f01=>[_0x221f01[_0x5f3923(0x1b3)],_0x221f01]));return{'aliasToDatasetCode':_0x1e71ab,'datasetCodeToDataset':_0x1855ed};}async function uploadSingleFunction(_0x1d8e6f,_0x41c967,_0x323977,_0x2f1e7b){const _0x59ef0e=a37_0xe8d9c4,_0x14ee66=await readFile(_0x41c967[_0x59ef0e(0x185)],_0x59ef0e(0x17a)),_0x1bbfe1=await computeFileHash(_0x41c967[_0x59ef0e(0x185)]),_0x4fab64=_0x323977['functions'][_0x41c967[_0x59ef0e(0x193)]];if(_0x4fab64?.['remoteId']&&_0x4fab64[_0x59ef0e(0x1b4)]==null)throw CliErrors[_0x59ef0e(0x1a8)](_0x41c967[_0x59ef0e(0x193)]+_0x59ef0e(0x190));let _0x41a3a2=extractScriptDescription(_0x14ee66);if(!_0x41a3a2&&_0x4fab64?.[_0x59ef0e(0x198)]){const _0x58a93f=await getBffScriptInfo(_0x4fab64[_0x59ef0e(0x198)]);_0x41a3a2=_0x58a93f[_0x59ef0e(0x1b6)]||undefined;}const _0x588a26={'appCode':_0x1d8e6f,'functionName':_0x41c967['name'],'scriptType':_0x41c967['type'],'scriptContent':_0x14ee66};if(_0x4fab64?.[_0x59ef0e(0x198)])_0x588a26['id']=_0x4fab64['remoteId'];if(_0x4fab64?.['version']!=null)_0x588a26[_0x59ef0e(0x1b4)]=_0x4fab64[_0x59ef0e(0x1b4)];if(_0x41a3a2)_0x588a26[_0x59ef0e(0x1b6)]=_0x41a3a2;if(_0x41c967[_0x59ef0e(0x18b)]==='HOOK'){const _0x44a1a3=_0x41c967[_0x59ef0e(0x18d)];if(!_0x44a1a3||!_0x41c967[_0x59ef0e(0x187)]||!_0x41c967[_0x59ef0e(0x1ae)])throw CliErrors[_0x59ef0e(0x1a8)]('Incomplete\x20HOOK\x20path:\x20'+_0x41c967[_0x59ef0e(0x193)]);const _0x3e136b=_0x2f1e7b[_0x59ef0e(0x1a2)]['get'](_0x44a1a3)??_0x4fab64?.[_0x59ef0e(0x1a0)]??_0x44a1a3,_0x278275=_0x2f1e7b[_0x59ef0e(0x176)]['get'](_0x3e136b);if(!_0x278275)throw CliErrors[_0x59ef0e(0x1a8)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x44a1a3+_0x59ef0e(0x1bb)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x588a26[_0x59ef0e(0x19a)]=_0x278275['id'],_0x588a26[_0x59ef0e(0x187)]=_0x41c967[_0x59ef0e(0x187)],_0x588a26['functionNode']=_0x41c967[_0x59ef0e(0x1ae)];}const _0x4d1ae4=await saveBffScript(_0x588a26),_0x55f384=_0x4d1ae4['id'],_0x2a1618=_0x4d1ae4[_0x59ef0e(0x1a3)]??await getBffScriptInfo(_0x55f384),_0xbd5c2d={'hash':_0x1bbfe1,'remoteId':_0x55f384,'version':_0x2a1618[_0x59ef0e(0x1b4)]};if(_0x41c967[_0x59ef0e(0x18b)]==='HOOK'){const _0x353cc5=_0x41c967[_0x59ef0e(0x18d)],_0x41d41d=_0x2f1e7b[_0x59ef0e(0x1a2)][_0x59ef0e(0x1b8)](_0x353cc5)??_0x4fab64?.['datasetCode']??_0x353cc5;_0x2f1e7b[_0x59ef0e(0x1a2)][_0x59ef0e(0x1ab)](_0x353cc5)?_0xbd5c2d['alias']=_0x353cc5:_0xbd5c2d[_0x59ef0e(0x18d)]=_0x4fab64?.['alias'],_0xbd5c2d['datasetCode']=_0x41d41d,_0xbd5c2d[_0x59ef0e(0x187)]=_0x41c967[_0x59ef0e(0x187)],_0xbd5c2d[_0x59ef0e(0x1ae)]=_0x41c967[_0x59ef0e(0x1ae)];}_0x323977[_0x59ef0e(0x178)][_0x41c967[_0x59ef0e(0x193)]]=_0xbd5c2d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1480d7,_0x26ff6c,_0x4152ba){const _0x2aa164=a37_0xe8d9c4;if(_0x4152ba['length']===0x0)return;for(let _0x1f7cca=0x0;_0x1f7cca<LOCK_SETTLE_RETRY_COUNT;_0x1f7cca+=0x1){const _0xb77961=await readBffLockFile(_0x1480d7),_0x3420ce=_0xb77961?.[_0x2aa164(0x186)]?.[_0x26ff6c]?.['functions']??{},_0x2ef154=_0x4152ba[_0x2aa164(0x17b)](_0x4b0465=>!!_0x3420ce[_0x4b0465]?.[_0x2aa164(0x198)]);if(_0x2ef154)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x4152ba[_0x2aa164(0x1ad)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x3dccd4=a38_0x176a;(function(_0x3a9214,_0xa06916){const _0x5361a9=a38_0x176a,_0x4d0675=_0x3a9214();while(!![]){try{const _0x429462=parseInt(_0x5361a9(0x1a7))/0x1+parseInt(_0x5361a9(0x19f))/0x2*(parseInt(_0x5361a9(0x1a6))/0x3)+-parseInt(_0x5361a9(0x1b9))/0x4*(parseInt(_0x5361a9(0x1b0))/0x5)+parseInt(_0x5361a9(0x1b7))/0x6+-parseInt(_0x5361a9(0x19b))/0x7*(parseInt(_0x5361a9(0x1a2))/0x8)+-parseInt(_0x5361a9(0x1b8))/0x9+parseInt(_0x5361a9(0x1b6))/0xa;if(_0x429462===_0xa06916)break;else _0x4d0675['push'](_0x4d0675['shift']());}catch(_0x2527a4){_0x4d0675['push'](_0x4d0675['shift']());}}}(a38_0xb134,0xd7656));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a38_0x176a(_0xcf2d59,_0x1c7faa){_0xcf2d59=_0xcf2d59-0x19a;const _0xb134ad=a38_0xb134();let _0x176a8c=_0xb134ad[_0xcf2d59];return _0x176a8c;}function a38_0xb134(){const _0x45203c=['functions','status','lockKey','map','alias','has','5045bEgmnd','read','appCode','\x20added,\x20','push','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','25909090yEUuqO','2924136SlVrEB','9152028RflcAp','6228lTYVIs','apiDir','49BwfvaG','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','bool','boolean','4754gQaKNT','length','all','1835088HryMiG','scriptsRoot','datasetCode','remote','411kCpoDQ','1671955wbqeVn','hash','filePath'];a38_0xb134=function(){return _0x45203c;};return a38_0xb134();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a38_0x3dccd4(0x1ab),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x3dccd4(0x1b1),'flags':[{'name':a38_0x3dccd4(0x1a5),'type':a38_0x3dccd4(0x19e),'description':a38_0x3dccd4(0x19c)}],async 'execute'(_0x120db6){const _0x4b9efc=a38_0x3dccd4,_0x330f4f=loadBffProjectConfig(_0x120db6[_0x4b9efc(0x1b2)]),_0x931337=await readBffLockFile(_0x330f4f['lockFilePath']),{appLock:_0x773742}=ensureLockScope(_0x931337??createEmptyBffLock(),_0x120db6[_0x4b9efc(0x1b2)],_0x330f4f[_0x4b9efc(0x1a3)],_0x4b9efc(0x1ab)),_0x22ee2d=await scanLocalBffFunctions(_0x330f4f),_0x153bfb=[],_0x449d1a=[],_0x542041=[];for(const _0x4504a5 of _0x22ee2d){const _0x26025c=await computeFileHash(_0x4504a5[_0x4b9efc(0x1a9)]),_0x1f7909=_0x773742[_0x4b9efc(0x1aa)][_0x4504a5['lockKey']];if(!_0x1f7909)_0x153bfb['push'](_0x4504a5['lockKey']);else _0x1f7909[_0x4b9efc(0x1a8)]!==_0x26025c?_0x449d1a[_0x4b9efc(0x1b4)](_0x4504a5[_0x4b9efc(0x1ac)]):_0x542041[_0x4b9efc(0x1b4)](_0x4504a5[_0x4b9efc(0x1ac)]);}const _0x1562b7=[];if(_0x120db6[_0x4b9efc(0x19d)](_0x4b9efc(0x1a5))){const _0x559175=loadAliasMap(_0x120db6['apiDir'],undefined,resolveApiFilePath(_0x120db6[_0x4b9efc(0x19a)],_0x120db6[_0x4b9efc(0x1b2)])),_0x102ca6=new Map(_0x559175['map'](_0x134bf1=>[_0x134bf1[_0x4b9efc(0x1a4)],_0x134bf1[_0x4b9efc(0x1ae)]])),[_0x90e546,_0x13fc65]=await Promise[_0x4b9efc(0x1a1)]([listBffScripts(_0x120db6['appCode']),getBffScriptStatistics(_0x120db6['appCode'])]),_0x88be30=createHookLocationMap(_0x13fc65),_0x5ee4e5=new Set(_0x22ee2d[_0x4b9efc(0x1ad)](_0x320959=>_0x320959[_0x4b9efc(0x1ac)]));for(const _0x276557 of _0x90e546){const _0x1cb78d=resolveRemoteScriptTarget(_0x330f4f,_0x276557,_0x88be30,_0x773742['functions'],_0x102ca6);_0x1cb78d&&!_0x5ee4e5[_0x4b9efc(0x1af)](_0x1cb78d['lockKey'])&&_0x1562b7['push'](_0x1cb78d[_0x4b9efc(0x1ac)]);}}const _0x350c88=_0x153bfb[_0x4b9efc(0x1a0)]===0x0&&_0x449d1a['length']===0x0&&_0x1562b7[_0x4b9efc(0x1a0)]===0x0;return{'ok':!![],'data':{'added':_0x153bfb,'modified':_0x449d1a,'unchanged':_0x542041,'remoteOnly':_0x1562b7},'message':_0x350c88?_0x4b9efc(0x1b5):_0x153bfb[_0x4b9efc(0x1a0)]+_0x4b9efc(0x1b3)+_0x449d1a[_0x4b9efc(0x1a0)]+'\x20modified,\x20'+_0x542041['length']+'\x20unchanged'+(_0x1562b7[_0x4b9efc(0x1a0)]>0x0?',\x20'+_0x1562b7[_0x4b9efc(0x1a0)]+'\x20remote-only':'')};}};
1
+ function a38_0x3453(_0x164498,_0x573cb7){_0x164498=_0x164498-0x94;const _0x3f2f95=a38_0x3f2f();let _0x345316=_0x3f2f95[_0x164498];return _0x345316;}const a38_0x5f15ff=a38_0x3453;(function(_0x4fa31e,_0x3787e8){const _0x450d7b=a38_0x3453,_0x3924a2=_0x4fa31e();while(!![]){try{const _0x271610=-parseInt(_0x450d7b(0xac))/0x1+parseInt(_0x450d7b(0xae))/0x2+-parseInt(_0x450d7b(0xa1))/0x3+-parseInt(_0x450d7b(0xaa))/0x4+parseInt(_0x450d7b(0xa2))/0x5+parseInt(_0x450d7b(0xa7))/0x6+parseInt(_0x450d7b(0x97))/0x7*(parseInt(_0x450d7b(0x9c))/0x8);if(_0x271610===_0x3787e8)break;else _0x3924a2['push'](_0x3924a2['shift']());}catch(_0x4debf6){_0x3924a2['push'](_0x3924a2['shift']());}}}(a38_0x3f2f,0x46e71));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_0x3f2f(){const _0x5b68fc=['983664YmeyYN','21655KVkgdb','alias','appCode','\x20remote-only','lockKey','1635840SQJUcM','boolean','datasetCode','549968bhbtFb','bool','536506DEJBmb','hash','393104dmGyOe','functions','length','\x20modified,\x20','lockFilePath','read','70SfZLnW','map','remote','apiDir','all','655024hkLUcj','bff','push','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','status'];a38_0x3f2f=function(){return _0x5b68fc;};return a38_0x3f2f();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x5f15ff(0x9d),'command':a38_0x5f15ff(0xa0),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x5f15ff(0x96),'flags':[{'name':a38_0x5f15ff(0x99),'type':a38_0x5f15ff(0xa8),'description':a38_0x5f15ff(0x9f)}],async 'execute'(_0x3fb5b8){const _0x2c63e5=a38_0x5f15ff,_0xd36b0=loadBffProjectConfig(_0x3fb5b8[_0x2c63e5(0xa4)]),_0x5d2d6a=await readBffLockFile(_0xd36b0[_0x2c63e5(0x95)]),{appLock:_0x29ae8f}=ensureLockScope(_0x5d2d6a??createEmptyBffLock(),_0x3fb5b8[_0x2c63e5(0xa4)],_0xd36b0['scriptsRoot'],_0x2c63e5(0xa0)),_0x5e5629=await scanLocalBffFunctions(_0xd36b0),_0xf7eec7=[],_0x975eea=[],_0x3f2daa=[];for(const _0x2c6fcd of _0x5e5629){const _0x6cfb32=await computeFileHash(_0x2c6fcd['filePath']),_0x27b44f=_0x29ae8f['functions'][_0x2c6fcd[_0x2c63e5(0xa6)]];if(!_0x27b44f)_0xf7eec7[_0x2c63e5(0x9e)](_0x2c6fcd['lockKey']);else _0x27b44f[_0x2c63e5(0xad)]!==_0x6cfb32?_0x975eea['push'](_0x2c6fcd['lockKey']):_0x3f2daa[_0x2c63e5(0x9e)](_0x2c6fcd[_0x2c63e5(0xa6)]);}const _0x3d424c=[];if(_0x3fb5b8[_0x2c63e5(0xab)](_0x2c63e5(0x99))){const _0x2079e4=loadAliasMap(_0x3fb5b8[_0x2c63e5(0x9a)],undefined,resolveApiFilePath(_0x3fb5b8[_0x2c63e5(0x9a)],_0x3fb5b8['appCode'])),_0xe18096=new Map(_0x2079e4['map'](_0x121984=>[_0x121984[_0x2c63e5(0xa9)],_0x121984[_0x2c63e5(0xa3)]])),[_0x8b0465,_0x2a38eb]=await Promise[_0x2c63e5(0x9b)]([listBffScripts(_0x3fb5b8[_0x2c63e5(0xa4)]),getBffScriptStatistics(_0x3fb5b8['appCode'])]),_0x573e6c=createHookLocationMap(_0x2a38eb),_0xb0ca44=new Set(_0x5e5629[_0x2c63e5(0x98)](_0x46ad88=>_0x46ad88['lockKey']));for(const _0x4d0331 of _0x8b0465){const _0xe6f810=resolveRemoteScriptTarget(_0xd36b0,_0x4d0331,_0x573e6c,_0x29ae8f[_0x2c63e5(0xaf)],_0xe18096);_0xe6f810&&!_0xb0ca44['has'](_0xe6f810[_0x2c63e5(0xa6)])&&_0x3d424c['push'](_0xe6f810['lockKey']);}}const _0x154b2b=_0xf7eec7[_0x2c63e5(0xb0)]===0x0&&_0x975eea[_0x2c63e5(0xb0)]===0x0&&_0x3d424c[_0x2c63e5(0xb0)]===0x0;return{'ok':!![],'data':{'added':_0xf7eec7,'modified':_0x975eea,'unchanged':_0x3f2daa,'remoteOnly':_0x3d424c},'message':_0x154b2b?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0xf7eec7[_0x2c63e5(0xb0)]+'\x20added,\x20'+_0x975eea['length']+_0x2c63e5(0x94)+_0x3f2daa['length']+'\x20unchanged'+(_0x3d424c[_0x2c63e5(0xb0)]>0x0?',\x20'+_0x3d424c[_0x2c63e5(0xb0)]+_0x2c63e5(0xa5):'')};}};
@@ -1 +1 @@
1
- const a39_0x176be6=a39_0x151b;(function(_0x3590b8,_0x36f544){const _0x4f078b=a39_0x151b,_0x577d06=_0x3590b8();while(!![]){try{const _0x1feeba=-parseInt(_0x4f078b(0x101))/0x1+-parseInt(_0x4f078b(0xfa))/0x2*(-parseInt(_0x4f078b(0x10f))/0x3)+-parseInt(_0x4f078b(0x10c))/0x4*(parseInt(_0x4f078b(0x100))/0x5)+-parseInt(_0x4f078b(0x116))/0x6+parseInt(_0x4f078b(0x111))/0x7+-parseInt(_0x4f078b(0x115))/0x8*(-parseInt(_0x4f078b(0x113))/0x9)+parseInt(_0x4f078b(0x105))/0xa*(parseInt(_0x4f078b(0x110))/0xb);if(_0x1feeba===_0x36f544)break;else _0x577d06['push'](_0x577d06['shift']());}catch(_0x1e6512){_0x577d06['push'](_0x577d06['shift']());}}}(a39_0x22ee,0xad546));function a39_0x151b(_0x544099,_0x2fcea9){_0x544099=_0x544099-0xf9;const _0x22ee1f=a39_0x22ee();let _0x151b51=_0x22ee1f[_0x544099];return _0x151b51;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a39_0x22ee(){const _0x250af4=['log','CLI\x20Built-in\x20Skill\x20','\x20via\x20skills@latest','10glvScL','\x20is\x20already\x20current',']:\x20','\x20at\x20','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','error','apiError','769196XfaFKF','installedPath','\x20installed','71067qRXKUy','10668262WhoDCM','7336294AwqMgt','setLogPath','178326RNWEWo','install','424LrwvPT','8429262LTZEQD','info','inherit','4DdGeax','unknown','nonInteractive','cli-skill-install','read','repairCommand','5JHJxrq','808270bmuPnG'];a39_0x22ee=function(){return _0x250af4;};return a39_0x22ee();}export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x176be6(0x114),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0x176be6(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x595f13){const _0x9506cc=a39_0x176be6;logger[_0x9506cc(0x112)](process['cwd']()),logger[_0x9506cc(0x117)](_0x9506cc(0xfd),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x55a751=installBuiltinSkill({'stdio':_0x595f13[_0x9506cc(0xfc)]?'pipe':_0x9506cc(0xf9)});if(!_0x55a751['ok'])throw CliErrors[_0x9506cc(0x10b)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x55a751['code']+_0x9506cc(0x107)+(_0x55a751[_0x9506cc(0x10a)]||_0x9506cc(0xfb)),_0x9506cc(0x109)+_0x55a751[_0x9506cc(0xff)]);return console[_0x9506cc(0x102)](_0x55a751['changed']?_0x9506cc(0x103)+_0x55a751['skillVersion']+_0x9506cc(0x10e)+(_0x55a751[_0x9506cc(0x10d)]?_0x9506cc(0x108)+_0x55a751[_0x9506cc(0x10d)]:_0x9506cc(0x104)):'CLI\x20Built-in\x20Skill\x20'+_0x55a751['skillVersion']+_0x9506cc(0x106)+(_0x55a751[_0x9506cc(0x10d)]?_0x9506cc(0x108)+_0x55a751[_0x9506cc(0x10d)]:'')),{'ok':!![]};}}];
1
+ (function(_0x5e7af5,_0x5ca588){const _0x3325a7=a39_0x4e2f,_0x108eff=_0x5e7af5();while(!![]){try{const _0x48943a=-parseInt(_0x3325a7(0xee))/0x1*(-parseInt(_0x3325a7(0xed))/0x2)+parseInt(_0x3325a7(0xde))/0x3+-parseInt(_0x3325a7(0xeb))/0x4*(parseInt(_0x3325a7(0xf1))/0x5)+parseInt(_0x3325a7(0xe6))/0x6+parseInt(_0x3325a7(0xe0))/0x7*(parseInt(_0x3325a7(0xea))/0x8)+-parseInt(_0x3325a7(0xe1))/0x9+-parseInt(_0x3325a7(0xe3))/0xa;if(_0x48943a===_0x5ca588)break;else _0x108eff['push'](_0x108eff['shift']());}catch(_0x2b4114){_0x108eff['push'](_0x108eff['shift']());}}}(a39_0x5abf,0x59662));function a39_0x4e2f(_0x42b1aa,_0x3b9189){_0x42b1aa=_0x42b1aa-0xd7;const _0x5abfb0=a39_0x5abf();let _0x4e2fd6=_0x5abfb0[_0x42b1aa];return _0x4e2fd6;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x55ee24){const _0x187430=a39_0x4e2f;logger[_0x187430(0xf2)](process[_0x187430(0xec)]()),logger[_0x187430(0xdf)]('cli-skill-install',_0x187430(0xdc));const _0x391b66=installBuiltinSkill({'stdio':_0x55ee24[_0x187430(0xe2)]?'pipe':_0x187430(0xdb)});if(!_0x391b66['ok'])throw CliErrors[_0x187430(0xd7)](_0x187430(0xdd)+_0x391b66['code']+']:\x20'+(_0x391b66[_0x187430(0xe5)]||'unknown'),_0x187430(0xd9)+_0x391b66[_0x187430(0xe9)]);return console[_0x187430(0xf0)](_0x391b66['changed']?'CLI\x20Built-in\x20Skill\x20'+_0x391b66[_0x187430(0xef)]+_0x187430(0xe4)+(_0x391b66[_0x187430(0xda)]?_0x187430(0xe7)+_0x391b66[_0x187430(0xda)]:'\x20via\x20skills@latest'):_0x187430(0xd8)+_0x391b66[_0x187430(0xef)]+_0x187430(0xe8)+(_0x391b66[_0x187430(0xda)]?_0x187430(0xe7)+_0x391b66['installedPath']:'')),{'ok':!![]};}}];function a39_0x5abf(){const _0x2fd663=['repairCommand','84880jPJaRI','342552BeQrcz','cwd','56vTaSIz','575JRWzDZ','skillVersion','log','25aogyHf','setLogPath','apiError','CLI\x20Built-in\x20Skill\x20','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','installedPath','inherit','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','Built-in\x20Skill\x20install\x20failed\x20[','2018031AhgplI','info','287WTXYwW','1503342xYhasW','nonInteractive','4318970pKHzbl','\x20installed','error','1617096XsQpEE','\x20at\x20','\x20is\x20already\x20current'];a39_0x5abf=function(){return _0x2fd663;};return a39_0x5abf();}
@@ -1 +1 @@
1
- const a40_0x4ab26b=a40_0x562e;(function(_0x2cd2df,_0x303267){const _0x12f44d=a40_0x562e,_0x514738=_0x2cd2df();while(!![]){try{const _0x3e6cf5=-parseInt(_0x12f44d(0x105))/0x1*(-parseInt(_0x12f44d(0x11e))/0x2)+-parseInt(_0x12f44d(0x109))/0x3+-parseInt(_0x12f44d(0x124))/0x4*(-parseInt(_0x12f44d(0x113))/0x5)+-parseInt(_0x12f44d(0x138))/0x6*(parseInt(_0x12f44d(0x10e))/0x7)+-parseInt(_0x12f44d(0xf8))/0x8*(-parseInt(_0x12f44d(0xf3))/0x9)+parseInt(_0x12f44d(0x114))/0xa*(-parseInt(_0x12f44d(0x10b))/0xb)+parseInt(_0x12f44d(0x13e))/0xc;if(_0x3e6cf5===_0x303267)break;else _0x514738['push'](_0x514738['shift']());}catch(_0x4bb10a){_0x514738['push'](_0x514738['shift']());}}}(a40_0x1384,0xdb3ff));import a40_0x100002 from'chalk';import a40_0x5a3c0b from'ora';import a40_0x5010a4 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 _0x15a5fa=a40_0x562e;return GIT_COMMIT!==_0x15a5fa(0x13f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x15a5fa(0x12c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x458ef7=a40_0x562e,_0x4d1763=process[_0x458ef7(0x103)][_0x458ef7(0x143)]();if(_0x4d1763[_0x458ef7(0x141)](_0x458ef7(0x11c)))return'bun';return _0x458ef7(0x145);}const updateFlags=[{'name':a40_0x4ab26b(0x139),'type':a40_0x4ab26b(0x10c),'description':a40_0x4ab26b(0x104),'default':![]},{'name':a40_0x4ab26b(0xf4),'type':a40_0x4ab26b(0x130),'description':a40_0x4ab26b(0x100)}];function getRequestedVersion(_0x293569){const _0x1cd364=a40_0x4ab26b;return _0x293569[_0x1cd364(0x110)](_0x1cd364(0xf4))[_0x1cd364(0x12b)]();}async function validateUpdateFlags(_0xe8e0ec){const _0xb8b579=a40_0x4ab26b,_0x89072c=_0xe8e0ec[_0xb8b579(0x10d)]('beta'),_0x1df82e=getRequestedVersion(_0xe8e0ec);if(_0x89072c&&_0x1df82e)throw CliErrors[_0xb8b579(0x134)](_0xb8b579(0x125),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x1df82e&&!a40_0x5010a4[_0xb8b579(0x11f)](_0x1df82e))throw CliErrors[_0xb8b579(0x134)](_0xb8b579(0x136)+_0x1df82e,_0xb8b579(0x119));}async function fetchNpmDistTags(){const _0x21b555=a40_0x4ab26b;try{const _0x5de176=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21b555(0x121),{'signal':AbortSignal[_0x21b555(0x111)](0x2710)});if(!_0x5de176['ok'])return null;const _0x15152a=await _0x5de176[_0x21b555(0x11a)]();if(!_0x15152a||typeof _0x15152a!==_0x21b555(0x108))return null;return Object[_0x21b555(0x12d)](Object['entries'](_0x15152a)[_0x21b555(0xf7)](([,_0x189ced])=>typeof _0x189ced==='string'&&_0x189ced['trim']()['length']>0x0)[_0x21b555(0x12a)](([_0x41376b,_0x90e51d])=>[_0x41376b,String(_0x90e51d)[_0x21b555(0x12b)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2758af){const _0x5e7916=await fetchNpmDistTags();return _0x5e7916?.[_0x2758af]??null;}async function fetchLatestVersion(){const _0x1c5325=a40_0x4ab26b;return fetchNpmDistTagVersion(_0x1c5325(0x128));}async function resolveTargetVersion(_0x18351c){const _0x5c2e53=a40_0x4ab26b,_0x243035=getRequestedVersion(_0x18351c);if(_0x243035)return{'version':_0x243035,'source':_0x5c2e53(0xf4)};if(_0x18351c[_0x5c2e53(0x10d)]('beta')){const _0x2fce01=await fetchNpmDistTagVersion('beta');if(!_0x2fce01)return null;return{'version':_0x2fce01,'source':_0x5c2e53(0x139)};}const _0x2bdd38=await fetchLatestVersion();if(!_0x2bdd38)return null;return{'version':_0x2bdd38,'source':'latest'};}function shouldInstallTarget(_0x1267b1,_0x4f7fb9){const _0x4aa62a=a40_0x4ab26b;if(_0x4f7fb9[_0x4aa62a(0xfe)]===_0x4aa62a(0xf4)||_0x4f7fb9[_0x4aa62a(0xfe)]==='beta')return!a40_0x5010a4['eq'](_0x1267b1,_0x4f7fb9[_0x4aa62a(0xf4)]);return a40_0x5010a4['lt'](_0x1267b1,_0x4f7fb9[_0x4aa62a(0xf4)]);}function getInstallPlanLabel(_0x439312,_0x2024e2){const _0x2a28fb=a40_0x4ab26b;switch(_0x2024e2[_0x2a28fb(0xfe)]){case _0x2a28fb(0x139):return _0x2a28fb(0x13b)+a40_0x100002[_0x2a28fb(0x137)](_0x439312)+'\x20→\x20'+a40_0x100002[_0x2a28fb(0xf6)](_0x2024e2[_0x2a28fb(0xf4)]);case _0x2a28fb(0xf4):return _0x2a28fb(0x10a)+a40_0x100002['yellow'](_0x439312)+'\x20→\x20'+a40_0x100002[_0x2a28fb(0xf6)](_0x2024e2[_0x2a28fb(0xf4)]);case'latest':default:return _0x2a28fb(0x129)+a40_0x100002[_0x2a28fb(0x137)](_0x439312)+'\x20→\x20'+a40_0x100002['green'](_0x2024e2['version']);}}function repairCurrentBuiltinSkill(){const _0x380c75=a40_0x4ab26b;console[_0x380c75(0x133)](a40_0x100002['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x3ced68=installBuiltinSkill();if(_0x3ced68['ok']){console[_0x380c75(0x133)](a40_0x100002[_0x380c75(0x101)](_0x380c75(0xfb)+_0x3ced68[_0x380c75(0x118)]+_0x380c75(0x106)));return;}throw CliErrors['apiError'](_0x380c75(0x117)+_0x3ced68[_0x380c75(0x148)]+_0x380c75(0x10f)+(_0x3ced68[_0x380c75(0x140)]||'unknown'),'Run:\x20'+_0x3ced68[_0x380c75(0x11d)]+_0x380c75(0x126)+CLI_BIN_NAME+_0x380c75(0x116));}function verifyUpdatedBuiltinSkill(_0x4bd268){const _0x343e0e=a40_0x4ab26b,_0x46e698=inspectInstalledBuiltinSkillVersion(_0x4bd268);if(_0x46e698['state']==='current'){console[_0x343e0e(0x133)](a40_0x100002[_0x343e0e(0x101)](_0x343e0e(0xfb)+_0x4bd268+_0x343e0e(0x106)));return;}const _0x5af3f6=_0x46e698[_0x343e0e(0x118)]?_0x343e0e(0x135)+_0x4bd268+_0x343e0e(0x107)+_0x46e698[_0x343e0e(0x118)]:'expected\x20'+_0x4bd268+_0x343e0e(0x131)+_0x46e698[_0x343e0e(0x12e)];throw CliErrors[_0x343e0e(0x123)]('CLI\x20updated\x20to\x20v'+_0x4bd268+_0x343e0e(0x147)+_0x5af3f6,_0x343e0e(0x13d)+_0x46e698['repairCommand']+_0x343e0e(0x126)+CLI_BIN_NAME+_0x343e0e(0x116));}function a40_0x562e(_0x132dfd,_0x43bec5){_0x132dfd=_0x132dfd-0xf1;const _0x1384e7=a40_0x1384();let _0x562e7d=_0x1384e7[_0x132dfd];return _0x562e7d;}function a40_0x1384(){const _0x303101=['map','trim','slice','fromEntries','state','Current\x20version\x20v','string',',\x20state\x20','message','log','validation','expected\x20','Invalid\x20version:\x20','yellow','228chGgKX','beta','Version\x20comparison\x20failed','Beta\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Run:\x20','20857476rssknK','unknown','error','includes','\x20install\x20-g\x20','toLowerCase','update','npm','pipe',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','code','run','Checking\x20for\x20updates...','387uNIwlN','version','fail','green','filter','121544Asyfie','Already\x20up\x20to\x20date\x20(v','Current\x20version:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Updated\x20to\x20v','source','read','Install\x20a\x20specific\x20CLI\x20version','gray','Update\x20failed','execPath','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','123995oDWuZy','\x20is\x20up\x20to\x20date.',',\x20found\x20','object','1969746JstUPw','Requested\x20version:\x20','22VUXWMd','boolean','bool','199906CPVtWk',']:\x20','str','timeout','...','230ulducg','8265700hpWbDE','red','\x20doctor','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','skillVersion','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json','succeed','bun','repairCommand','26spYsRJ','valid','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','/dist-tags','info','apiError','25184wdEVbY','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',',\x20then\x20verify\x20with:\x20','Already\x20on\x20requested\x20version\x20(v','latest','Update\x20available:\x20'];a40_0x1384=function(){return _0x303101;};return a40_0x1384();}async function execute(_0x2ea54b){const _0x226991=a40_0x4ab26b;await validateUpdateFlags(_0x2ea54b);const _0x2aa708=getCurrentVersion();console[_0x226991(0x133)](_0x226991(0xfa)+_0x2aa708);const _0x460cee=a40_0x5a3c0b(_0x226991(0xf2))['start'](),_0x4bbb33=await resolveTargetVersion(_0x2ea54b);if(!_0x4bbb33){const _0x4a17ce=_0x2ea54b[_0x226991(0x10d)](_0x226991(0x139))?_0x226991(0x13c):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x460cee[_0x226991(0xf5)](_0x4a17ce),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)](_0x226991(0x120)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4a17ce};}const _0x52954f=a40_0x5010a4[_0x226991(0x11f)](VERSION),_0x133652=a40_0x5010a4['valid'](_0x4bbb33['version']);if(!_0x52954f||!_0x133652)return _0x460cee[_0x226991(0xf5)](_0x226991(0x13a)),{'ok':![],'message':_0x226991(0x13a)};if(!shouldInstallTarget(_0x52954f,_0x4bbb33)){const _0xc24af6=_0x4bbb33[_0x226991(0xfe)]===_0x226991(0xf4)?_0x226991(0x127)+_0x4bbb33['version']+')':a40_0x5010a4['gt'](_0x52954f,_0x133652)?_0x226991(0x12f)+_0x2aa708+_0x226991(0xfc)+_0x4bbb33[_0x226991(0xf4)]:_0x226991(0xf9)+_0x4bbb33[_0x226991(0xf4)]+')';return _0x460cee[_0x226991(0x11b)](_0xc24af6),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x460cee[_0x226991(0x122)](getInstallPlanLabel(_0x2aa708,_0x4bbb33));const _0x39d017=detectPackageManager(),_0x156ffb=_0x39d017===_0x226991(0x145)?resolveNpmBin(_0x226991(0x145)):_0x39d017,_0x1c5171=a40_0x5a3c0b('Updating\x20via\x20'+_0x39d017+_0x226991(0x112))['start']();try{await execa(_0x156ffb,['install','-g',NPM_PACKAGE_NAME+'@'+_0x4bbb33[_0x226991(0xf4)]],{'stdio':_0x226991(0x146)}),_0x1c5171['succeed'](_0x226991(0xfd)+_0x4bbb33[_0x226991(0xf4)]),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x430b96){return _0x1c5171[_0x226991(0xf5)](_0x226991(0x102)),console['error'](a40_0x100002[_0x226991(0x115)]('\x20\x20'+_0x430b96[_0x226991(0x132)])),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)]('\x20\x20Try\x20manually:\x20'+_0x39d017+_0x226991(0x142)+NPM_PACKAGE_NAME+'@'+_0x4bbb33['version'])),{'ok':![],'message':_0x430b96[_0x226991(0x132)]};}return verifyUpdatedBuiltinSkill(_0x4bbb33[_0x226991(0xf4)]),{'ok':!![]};}export const updateDefinition={'service':a40_0x4ab26b(0x144),'command':a40_0x4ab26b(0xf1),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x4ab26b(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x599362=a40_0x3b3c;(function(_0x149f5b,_0x4f28ce){const _0x2bdaff=a40_0x3b3c,_0xea03f=_0x149f5b();while(!![]){try{const _0x29b58c=parseInt(_0x2bdaff(0x16d))/0x1+-parseInt(_0x2bdaff(0x16b))/0x2+-parseInt(_0x2bdaff(0x16e))/0x3*(parseInt(_0x2bdaff(0x163))/0x4)+parseInt(_0x2bdaff(0x120))/0x5+parseInt(_0x2bdaff(0x16c))/0x6*(-parseInt(_0x2bdaff(0x15e))/0x7)+-parseInt(_0x2bdaff(0x160))/0x8+parseInt(_0x2bdaff(0x12b))/0x9*(parseInt(_0x2bdaff(0x169))/0xa);if(_0x29b58c===_0x4f28ce)break;else _0xea03f['push'](_0xea03f['shift']());}catch(_0x56c444){_0xea03f['push'](_0xea03f['shift']());}}}(a40_0x2193,0x60e86));import a40_0x4b4472 from'chalk';function a40_0x2193(){const _0xd47ae7=['1120fRnWLg','state','2911624xTmFut','green','string','128EqUMqY','\x20→\x20','Update\x20available:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Already\x20on\x20requested\x20version\x20(v','boolean','5150njYFPP','...','221734QgHBbx','1842kvAveJ','268019jrwKmY','11499xcZBMT','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20is\x20up\x20to\x20date.',',\x20then\x20verify\x20with:\x20','entries','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','read','yellow','str','3720480tPgSYV','Current\x20version\x20v','length','trim','Updated\x20to\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','start',']:\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','expected\x20','549zhEfJJ','info','Install\x20a\x20specific\x20CLI\x20version','filter','run','latest','https://registry.npmjs.org/-/package/','Beta\x20version:\x20','Version\x20comparison\x20failed','install','bool','execPath',',\x20state\x20','pipe','fromEntries','\x20\x20Try\x20manually:\x20','npm','current','succeed','includes','toLowerCase','Checking\x20CLI\x20Built-in\x20Skill...','beta',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','slice','red','\x20doctor','bun','object','Requested\x20version:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','repairCommand','skillVersion','source','error','Run:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','apiError','gray','Updating\x20via\x20',',\x20found\x20','valid','/dist-tags','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','code','Current\x20version:\x20','fail','version','validation','message','log'];a40_0x2193=function(){return _0xd47ae7;};return a40_0x2193();}import a40_0x5ab40d from'ora';import a40_0x167437 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 _0xaa9259=a40_0x3b3c;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xaa9259(0x143)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x42b2d5=a40_0x3b3c,_0x2166c=process[_0x42b2d5(0x136)][_0x42b2d5(0x13f)]();if(_0x2166c[_0x42b2d5(0x13e)](_0x42b2d5(0x146)))return _0x42b2d5(0x146);return _0x42b2d5(0x13b);}const updateFlags=[{'name':a40_0x599362(0x141),'type':a40_0x599362(0x168),'description':a40_0x599362(0x118),'default':![]},{'name':a40_0x599362(0x15a),'type':a40_0x599362(0x162),'description':a40_0x599362(0x12d)}];function getRequestedVersion(_0x256f3c){const _0x272256=a40_0x599362;return _0x256f3c[_0x272256(0x11f)](_0x272256(0x15a))[_0x272256(0x123)]();}async function validateUpdateFlags(_0x3e7794){const _0x418aae=a40_0x599362,_0x2e612c=_0x3e7794[_0x418aae(0x135)]('beta'),_0x15454f=getRequestedVersion(_0x3e7794);if(_0x2e612c&&_0x15454f)throw CliErrors[_0x418aae(0x15b)](_0x418aae(0x166),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x15454f&&!a40_0x167437[_0x418aae(0x154)](_0x15454f))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x15454f,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x55bdc0=a40_0x599362;try{const _0x42c605=await fetch(_0x55bdc0(0x131)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x55bdc0(0x155),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x42c605['ok'])return null;const _0x31cc5e=await _0x42c605['json']();if(!_0x31cc5e||typeof _0x31cc5e!==_0x55bdc0(0x147))return null;return Object[_0x55bdc0(0x139)](Object[_0x55bdc0(0x11b)](_0x31cc5e)[_0x55bdc0(0x12e)](([,_0x447c8c])=>typeof _0x447c8c==='string'&&_0x447c8c['trim']()[_0x55bdc0(0x122)]>0x0)['map'](([_0xc76a8,_0x143df7])=>[_0xc76a8,String(_0x143df7)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x22ba4e){const _0x43859d=await fetchNpmDistTags();return _0x43859d?.[_0x22ba4e]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x5b3711){const _0x308c93=a40_0x599362,_0x1c060f=getRequestedVersion(_0x5b3711);if(_0x1c060f)return{'version':_0x1c060f,'source':'version'};if(_0x5b3711[_0x308c93(0x135)]('beta')){const _0x31224a=await fetchNpmDistTagVersion(_0x308c93(0x141));if(!_0x31224a)return null;return{'version':_0x31224a,'source':_0x308c93(0x141)};}const _0x27fd20=await fetchLatestVersion();if(!_0x27fd20)return null;return{'version':_0x27fd20,'source':_0x308c93(0x130)};}function shouldInstallTarget(_0x3df9fe,_0x17bb25){const _0x501b=a40_0x599362;if(_0x17bb25[_0x501b(0x14c)]===_0x501b(0x15a)||_0x17bb25[_0x501b(0x14c)]==='beta')return!a40_0x167437['eq'](_0x3df9fe,_0x17bb25['version']);return a40_0x167437['lt'](_0x3df9fe,_0x17bb25[_0x501b(0x15a)]);}function getInstallPlanLabel(_0x40256e,_0x3efa19){const _0x3edffb=a40_0x599362;switch(_0x3efa19[_0x3edffb(0x14c)]){case _0x3edffb(0x141):return _0x3edffb(0x132)+a40_0x4b4472[_0x3edffb(0x11e)](_0x40256e)+_0x3edffb(0x164)+a40_0x4b4472['green'](_0x3efa19['version']);case _0x3edffb(0x15a):return _0x3edffb(0x148)+a40_0x4b4472[_0x3edffb(0x11e)](_0x40256e)+_0x3edffb(0x164)+a40_0x4b4472[_0x3edffb(0x161)](_0x3efa19['version']);case _0x3edffb(0x130):default:return _0x3edffb(0x165)+a40_0x4b4472[_0x3edffb(0x11e)](_0x40256e)+_0x3edffb(0x164)+a40_0x4b4472[_0x3edffb(0x161)](_0x3efa19['version']);}}function repairCurrentBuiltinSkill(){const _0x3f18e1=a40_0x599362;console[_0x3f18e1(0x15d)](a40_0x4b4472[_0x3f18e1(0x151)](_0x3f18e1(0x140)));const _0x5caca4=installBuiltinSkill();if(_0x5caca4['ok']){console['log'](a40_0x4b4472['gray'](_0x3f18e1(0x149)+_0x5caca4[_0x3f18e1(0x14b)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors['apiError'](_0x3f18e1(0x14f)+_0x5caca4[_0x3f18e1(0x157)]+_0x3f18e1(0x128)+(_0x5caca4['error']||'unknown'),_0x3f18e1(0x14e)+_0x5caca4['repairCommand']+_0x3f18e1(0x11a)+CLI_BIN_NAME+_0x3f18e1(0x145));}function verifyUpdatedBuiltinSkill(_0x48cfdd){const _0x1e56f4=a40_0x599362,_0x4b5a9e=inspectInstalledBuiltinSkillVersion(_0x48cfdd);if(_0x4b5a9e[_0x1e56f4(0x15f)]===_0x1e56f4(0x13c)){console[_0x1e56f4(0x15d)](a40_0x4b4472[_0x1e56f4(0x151)](_0x1e56f4(0x149)+_0x48cfdd+_0x1e56f4(0x119)));return;}const _0x22f4c7=_0x4b5a9e[_0x1e56f4(0x14b)]?_0x1e56f4(0x12a)+_0x48cfdd+_0x1e56f4(0x153)+_0x4b5a9e[_0x1e56f4(0x14b)]:_0x1e56f4(0x12a)+_0x48cfdd+_0x1e56f4(0x137)+_0x4b5a9e[_0x1e56f4(0x15f)];throw CliErrors[_0x1e56f4(0x150)]('CLI\x20updated\x20to\x20v'+_0x48cfdd+_0x1e56f4(0x142)+_0x22f4c7,'Run:\x20'+_0x4b5a9e[_0x1e56f4(0x14a)]+_0x1e56f4(0x11a)+CLI_BIN_NAME+_0x1e56f4(0x145));}function a40_0x3b3c(_0x3fbce9,_0x41e79c){_0x3fbce9=_0x3fbce9-0x118;const _0x219321=a40_0x2193();let _0x3b3c04=_0x219321[_0x3fbce9];return _0x3b3c04;}async function execute(_0x27d9e6){const _0x57d509=a40_0x599362;await validateUpdateFlags(_0x27d9e6);const _0x4eb685=getCurrentVersion();console[_0x57d509(0x15d)](_0x57d509(0x158)+_0x4eb685);const _0x525481=a40_0x5ab40d('Checking\x20for\x20updates...')[_0x57d509(0x127)](),_0x2e0846=await resolveTargetVersion(_0x27d9e6);if(!_0x2e0846){const _0x41c36d=_0x27d9e6['bool'](_0x57d509(0x141))?_0x57d509(0x126):_0x57d509(0x11c);return _0x525481[_0x57d509(0x159)](_0x41c36d),console[_0x57d509(0x15d)](a40_0x4b4472[_0x57d509(0x151)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x41c36d};}const _0x3e0a30=a40_0x167437[_0x57d509(0x154)](VERSION),_0x3ee520=a40_0x167437[_0x57d509(0x154)](_0x2e0846[_0x57d509(0x15a)]);if(!_0x3e0a30||!_0x3ee520)return _0x525481['fail'](_0x57d509(0x133)),{'ok':![],'message':_0x57d509(0x133)};if(!shouldInstallTarget(_0x3e0a30,_0x2e0846)){const _0x978350=_0x2e0846['source']===_0x57d509(0x15a)?_0x57d509(0x167)+_0x2e0846[_0x57d509(0x15a)]+')':a40_0x167437['gt'](_0x3e0a30,_0x3ee520)?_0x57d509(0x121)+_0x4eb685+_0x57d509(0x129)+_0x2e0846[_0x57d509(0x15a)]:'Already\x20up\x20to\x20date\x20(v'+_0x2e0846[_0x57d509(0x15a)]+')';return _0x525481[_0x57d509(0x13d)](_0x978350),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x525481[_0x57d509(0x12c)](getInstallPlanLabel(_0x4eb685,_0x2e0846));const _0x2da2c7=detectPackageManager(),_0x2c8871=_0x2da2c7==='npm'?resolveNpmBin(_0x57d509(0x13b)):_0x2da2c7,_0x232e2c=a40_0x5ab40d(_0x57d509(0x152)+_0x2da2c7+_0x57d509(0x16a))[_0x57d509(0x127)]();try{await execa(_0x2c8871,[_0x57d509(0x134),'-g',NPM_PACKAGE_NAME+'@'+_0x2e0846[_0x57d509(0x15a)]],{'stdio':_0x57d509(0x138)}),_0x232e2c[_0x57d509(0x13d)](_0x57d509(0x124)+_0x2e0846[_0x57d509(0x15a)]),console[_0x57d509(0x15d)](a40_0x4b4472['gray'](_0x57d509(0x125)));}catch(_0x295dec){return _0x232e2c[_0x57d509(0x159)]('Update\x20failed'),console[_0x57d509(0x14d)](a40_0x4b4472[_0x57d509(0x144)]('\x20\x20'+_0x295dec[_0x57d509(0x15c)])),console['log'](a40_0x4b4472[_0x57d509(0x151)](_0x57d509(0x13a)+_0x2da2c7+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x2e0846['version'])),{'ok':![],'message':_0x295dec['message']};}return verifyUpdatedBuiltinSkill(_0x2e0846[_0x57d509(0x15a)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a40_0x599362(0x12f),'description':a40_0x599362(0x156),'risk':a40_0x599362(0x11d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0xa33281,_0x2de5f0){const _0x147b2e=a41_0x23d4,_0x1066da=_0xa33281();while(!![]){try{const _0x49b4ce=-parseInt(_0x147b2e(0x1a6))/0x1*(parseInt(_0x147b2e(0x1af))/0x2)+parseInt(_0x147b2e(0x1aa))/0x3+-parseInt(_0x147b2e(0x1a7))/0x4+-parseInt(_0x147b2e(0x1ad))/0x5+parseInt(_0x147b2e(0x1ac))/0x6*(parseInt(_0x147b2e(0x1ab))/0x7)+-parseInt(_0x147b2e(0x1a8))/0x8+parseInt(_0x147b2e(0x1ae))/0x9*(parseInt(_0x147b2e(0x1a9))/0xa);if(_0x49b4ce===_0x2de5f0)break;else _0x1066da['push'](_0x1066da['shift']());}catch(_0x37301e){_0x1066da['push'](_0x1066da['shift']());}}}(a41_0x47c4,0x4e9fb));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x47c4(){const _0x1cb412=['391653PTWFLA','10UhKSDg','84932YiCPrw','624388NGdTNI','4194904jObkrF','130WNMkjL','1747722xEoNcm','59500GNYPRA','450vBUrZd','1793160UZFgru'];a41_0x47c4=function(){return _0x1cb412;};return a41_0x47c4();}function a41_0x23d4(_0x3ea597,_0xf59d30){_0x3ea597=_0x3ea597-0x1a6;const _0x47c424=a41_0x47c4();let _0x23d4a8=_0x47c424[_0x3ea597];return _0x23d4a8;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x123fee,_0x38f2af){const _0x441ad9=a41_0x5cfc,_0xd1a151=_0x123fee();while(!![]){try{const _0x2cf995=parseInt(_0x441ad9(0x19c))/0x1+-parseInt(_0x441ad9(0x19f))/0x2*(-parseInt(_0x441ad9(0x1a1))/0x3)+parseInt(_0x441ad9(0x1a0))/0x4+-parseInt(_0x441ad9(0x19a))/0x5*(parseInt(_0x441ad9(0x19b))/0x6)+parseInt(_0x441ad9(0x19e))/0x7+parseInt(_0x441ad9(0x1a2))/0x8+-parseInt(_0x441ad9(0x19d))/0x9;if(_0x2cf995===_0x38f2af)break;else _0xd1a151['push'](_0xd1a151['shift']());}catch(_0xa8b57){_0xd1a151['push'](_0xd1a151['shift']());}}}(a41_0x436c,0x78b0e));function a41_0x5cfc(_0x21c46d,_0x310e63){_0x21c46d=_0x21c46d-0x19a;const _0x436cc1=a41_0x436c();let _0x5cfcc5=_0x436cc1[_0x21c46d];return _0x5cfcc5;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x436c(){const _0x54f88b=['4100832PRUOXu','2665YhrMjs','2964KzslcQ','559287uUroeu','13447548RTUfFx','1363341eSDQVm','13982VOLucL','2290804HKxvaV','177kropvM'];a41_0x436c=function(){return _0x54f88b;};return a41_0x436c();}
@@ -1 +1 @@
1
- const a42_0x2b5fca=a42_0x5cf9;(function(_0x70b28d,_0x183552){const _0x586b80=a42_0x5cf9,_0x1de802=_0x70b28d();while(!![]){try{const _0x52f3b0=-parseInt(_0x586b80(0xf1))/0x1+parseInt(_0x586b80(0xed))/0x2+parseInt(_0x586b80(0xe4))/0x3*(-parseInt(_0x586b80(0xe5))/0x4)+-parseInt(_0x586b80(0xf4))/0x5+parseInt(_0x586b80(0xf6))/0x6+-parseInt(_0x586b80(0xf7))/0x7+-parseInt(_0x586b80(0xf3))/0x8*(-parseInt(_0x586b80(0xf2))/0x9);if(_0x52f3b0===_0x183552)break;else _0x1de802['push'](_0x1de802['shift']());}catch(_0x3ca817){_0x1de802['push'](_0x1de802['shift']());}}}(a42_0x7aa6,0xb6265));function a42_0x7aa6(){const _0x32fcc7=['skip-imports','operation','tableName','sdk','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','code','boolean','1244180ZVdjnW','read','str','string','1439000QwtJAG','795924LmStoA','368BAzHrn','7356870ccSsKy','Omit\x20import\x20statements\x20from\x20generated\x20code','7426878jyaPJS','6018208opqcft','appCode','name','3NBCpui','5647024LicRVV'];a42_0x7aa6=function(){return _0x32fcc7;};return a42_0x7aa6();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x5cf9(_0x1afb26,_0x203344){_0x1afb26=_0x1afb26-0xe2;const _0x7aa6b6=a42_0x7aa6();let _0x5cf9be=_0x7aa6b6[_0x1afb26];return _0x5cf9be;}export const codegenSdk={'service':'codegen','command':a42_0x2b5fca(0xe9),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x2b5fca(0xee),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':'operation','type':a42_0x2b5fca(0xf0),'required':!![],'description':a42_0x2b5fca(0xea)},{'name':a42_0x2b5fca(0xe6),'type':a42_0x2b5fca(0xec),'description':a42_0x2b5fca(0xf5)}],async 'execute'(_0x5d2b3f){const _0x1bb2f8=a42_0x2b5fca,{dataset:_0x411788,operation:_0x314927}=await getOperationDetail(_0x5d2b3f[_0x1bb2f8(0xe2)],_0x5d2b3f[_0x1bb2f8(0xef)]('code'),_0x5d2b3f[_0x1bb2f8(0xef)](_0x1bb2f8(0xe7))),_0x285235=generateSdkCode(_0x411788,_0x314927,{'includeImports':!_0x5d2b3f['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x411788[_0x1bb2f8(0xe3)],'code':_0x411788[_0x1bb2f8(0xeb)],'tableName':_0x411788[_0x1bb2f8(0xe8)]},'operation':_0x5d2b3f['str'](_0x1bb2f8(0xe7)),'code':_0x285235}};}};
1
+ const a42_0x913d8e=a42_0x3bea;(function(_0x588410,_0x3ceea7){const _0x1900ac=a42_0x3bea,_0x40eb29=_0x588410();while(!![]){try{const _0x642b1f=-parseInt(_0x1900ac(0x178))/0x1*(parseInt(_0x1900ac(0x17b))/0x2)+-parseInt(_0x1900ac(0x184))/0x3*(parseInt(_0x1900ac(0x177))/0x4)+parseInt(_0x1900ac(0x182))/0x5*(parseInt(_0x1900ac(0x17c))/0x6)+-parseInt(_0x1900ac(0x176))/0x7*(parseInt(_0x1900ac(0x180))/0x8)+-parseInt(_0x1900ac(0x172))/0x9+parseInt(_0x1900ac(0x170))/0xa+parseInt(_0x1900ac(0x171))/0xb;if(_0x642b1f===_0x3ceea7)break;else _0x40eb29['push'](_0x40eb29['shift']());}catch(_0x4c87dc){_0x40eb29['push'](_0x40eb29['shift']());}}}(a42_0x4838,0x591d1));function a42_0x3bea(_0x4a9f5c,_0x510a2f){_0x4a9f5c=_0x4a9f5c-0x170;const _0x483838=a42_0x4838();let _0x3bea05=_0x483838[_0x4a9f5c];return _0x3bea05;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x4838(){const _0x487b1a=['tableName','229514kUXKeZ','234zIsIiS','operation','bool','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','1072tobImO','codegen','84375XdeRzy','code','2106477zsdFyF','sdk','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','boolean','appCode','6076900jZTSSm','3678345joXwar','557811aGTFut','str','Omit\x20import\x20statements\x20from\x20generated\x20code','string','18613BeqIba','4JMkonu','1eWMNNA','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation'];a42_0x4838=function(){return _0x487b1a;};return a42_0x4838();}export const codegenSdk={'service':a42_0x913d8e(0x181),'command':a42_0x913d8e(0x185),'description':a42_0x913d8e(0x179),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x913d8e(0x175),'description':a42_0x913d8e(0x186)},{'name':a42_0x913d8e(0x17d),'type':'string','required':!![],'description':a42_0x913d8e(0x17f)},{'name':'skip-imports','type':a42_0x913d8e(0x187),'description':a42_0x913d8e(0x174)}],async 'execute'(_0x5e9143){const _0x31ef80=a42_0x913d8e,{dataset:_0x1b0b63,operation:_0x41ca0f}=await getOperationDetail(_0x5e9143[_0x31ef80(0x188)],_0x5e9143['str']('code'),_0x5e9143[_0x31ef80(0x173)](_0x31ef80(0x17d))),_0x59e3f1=generateSdkCode(_0x1b0b63,_0x41ca0f,{'includeImports':!_0x5e9143[_0x31ef80(0x17e)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1b0b63['name'],'code':_0x1b0b63[_0x31ef80(0x183)],'tableName':_0x1b0b63[_0x31ef80(0x17a)]},'operation':_0x5e9143[_0x31ef80(0x173)]('operation'),'code':_0x59e3f1}};}};
@@ -1 +1 @@
1
- const a43_0xa18c6e=a43_0x3b0d;(function(_0x32cfd1,_0x4e11b8){const _0x366d6d=a43_0x3b0d,_0x3552de=_0x32cfd1();while(!![]){try{const _0x366259=-parseInt(_0x366d6d(0x1ee))/0x1*(-parseInt(_0x366d6d(0x1f2))/0x2)+parseInt(_0x366d6d(0x1f7))/0x3+parseInt(_0x366d6d(0x1f9))/0x4+parseInt(_0x366d6d(0x1fc))/0x5+parseInt(_0x366d6d(0x1f5))/0x6*(-parseInt(_0x366d6d(0x1f4))/0x7)+-parseInt(_0x366d6d(0x1f0))/0x8+-parseInt(_0x366d6d(0x1ef))/0x9;if(_0x366259===_0x4e11b8)break;else _0x3552de['push'](_0x3552de['shift']());}catch(_0xee29e7){_0x3552de['push'](_0x3552de['shift']());}}}(a43_0x40cb,0x88979));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x3b0d(_0x521e34,_0x23fbf7){_0x521e34=_0x521e34-0x1ec;const _0x40cbf2=a43_0x40cb();let _0x3b0d1b=_0x40cbf2[_0x521e34];return _0x3b0d1b;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0xa18c6e(0x204),'description':a43_0xa18c6e(0x1f3),'risk':a43_0xa18c6e(0x1f1),'flags':[SQLCODE_FLAG,{'name':a43_0xa18c6e(0x1ff),'type':a43_0xa18c6e(0x202),'description':a43_0xa18c6e(0x200),'default':a43_0xa18c6e(0x1fb),'enum':[a43_0xa18c6e(0x1fb),a43_0xa18c6e(0x1fe)]},{'name':a43_0xa18c6e(0x1ec),'type':a43_0xa18c6e(0x1f8),'description':a43_0xa18c6e(0x1ed)}],async 'execute'(_0x1775d3){const _0x18c83f=a43_0xa18c6e,_0x31a180=await getSqlQueryInfo(_0x1775d3[_0x18c83f(0x1f6)],_0x1775d3[_0x18c83f(0x203)](_0x18c83f(0x1fd))),_0x14203e=_0x1775d3['str'](_0x18c83f(0x1ff))||_0x18c83f(0x1fb),_0x4ebb7a=generateSqlCodeTemplate(_0x31a180,{'target':_0x14203e,'includeImports':!_0x1775d3[_0x18c83f(0x201)](_0x18c83f(0x1ec))});return{'ok':!![],'data':{'sqlCode':_0x31a180[_0x18c83f(0x1fa)],'sqlName':_0x31a180[_0x18c83f(0x205)],'target':_0x14203e,'code':_0x4ebb7a}};}};function a43_0x40cb(){const _0x174d41=['7695568tlGJMl','read','11702SZfHhQ','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','85575RUlfZf','24rTYKNq','appCode','1979904CAaXrG','boolean','3277208rVJkLM','sqlCode','sdk','2729815yooUCf','sqlcode','bff','target','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bool','string','str','sql','sqlName','no-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','187HgHCuS','13941387cFKhMU'];a43_0x40cb=function(){return _0x174d41;};return a43_0x40cb();}
1
+ const a43_0x8b53d4=a43_0x2b9f;(function(_0x8293db,_0x3cc5d3){const _0x1c89a0=a43_0x2b9f,_0x541861=_0x8293db();while(!![]){try{const _0x4e8b37=-parseInt(_0x1c89a0(0x1ce))/0x1+parseInt(_0x1c89a0(0x1d3))/0x2*(-parseInt(_0x1c89a0(0x1e0))/0x3)+parseInt(_0x1c89a0(0x1d7))/0x4*(-parseInt(_0x1c89a0(0x1d1))/0x5)+-parseInt(_0x1c89a0(0x1cd))/0x6+-parseInt(_0x1c89a0(0x1e1))/0x7+parseInt(_0x1c89a0(0x1cc))/0x8*(-parseInt(_0x1c89a0(0x1cf))/0x9)+parseInt(_0x1c89a0(0x1e2))/0xa*(parseInt(_0x1c89a0(0x1d6))/0xb);if(_0x4e8b37===_0x3cc5d3)break;else _0x541861['push'](_0x541861['shift']());}catch(_0xf8267f){_0x541861['push'](_0x541861['shift']());}}}(a43_0x28fa,0xcb611));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x2b9f(_0x30fc8e,_0x2c8237){_0x30fc8e=_0x30fc8e-0x1cb;const _0x28fa54=a43_0x28fa();let _0x2b9f93=_0x28fa54[_0x30fc8e];return _0x2b9f93;}export const codegenSql={'service':a43_0x8b53d4(0x1e4),'command':a43_0x8b53d4(0x1db),'description':a43_0x8b53d4(0x1da),'risk':'read','flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x8b53d4(0x1df),'description':a43_0x8b53d4(0x1dc),'default':'sdk','enum':[a43_0x8b53d4(0x1d5),a43_0x8b53d4(0x1d2)]},{'name':a43_0x8b53d4(0x1e3),'type':a43_0x8b53d4(0x1d4),'description':a43_0x8b53d4(0x1d0)}],async 'execute'(_0x588649){const _0x952231=a43_0x8b53d4,_0x1d25c9=await getSqlQueryInfo(_0x588649[_0x952231(0x1e5)],_0x588649['str'](_0x952231(0x1cb))),_0x16b035=_0x588649['str'](_0x952231(0x1d8))||_0x952231(0x1d5),_0x396cf7=generateSqlCodeTemplate(_0x1d25c9,{'target':_0x16b035,'includeImports':!_0x588649[_0x952231(0x1de)](_0x952231(0x1e3))});return{'ok':!![],'data':{'sqlCode':_0x1d25c9[_0x952231(0x1d9)],'sqlName':_0x1d25c9[_0x952231(0x1dd)],'target':_0x16b035,'code':_0x396cf7}};}};function a43_0x28fa(){const _0x1889f9=['sqlName','bool','string','175290RLdJTr','4276475EFxazs','130KowfgO','no-imports','codegen','appCode','sqlcode','824264lmwsTw','7679718DMhaKO','862331NFHTLQ','117LplRbr','Omit\x20import\x20statements\x20from\x20generated\x20code','5qrhjUq','bff','2DdThHU','boolean','sdk','4648501pBxpaa','2038296WnNiGs','target','sqlCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sql','Code\x20target:\x20sdk\x20(default)\x20or\x20bff'];a43_0x28fa=function(){return _0x1889f9;};return a43_0x28fa();}
@@ -1 +1 @@
1
- function a44_0x55e0(_0x3b9e0b,_0x1549a6){_0x3b9e0b=_0x3b9e0b-0x64;const _0x1c8669=a44_0x1c86();let _0x55e0e0=_0x1c8669[_0x3b9e0b];return _0x55e0e0;}(function(_0x446a91,_0x30b52a){const _0x7356c0=a44_0x55e0,_0xd9d6e7=_0x446a91();while(!![]){try{const _0x5ab8e7=-parseInt(_0x7356c0(0x93))/0x1*(parseInt(_0x7356c0(0x7d))/0x2)+parseInt(_0x7356c0(0x87))/0x3*(parseInt(_0x7356c0(0x67))/0x4)+parseInt(_0x7356c0(0x8a))/0x5*(parseInt(_0x7356c0(0x7c))/0x6)+parseInt(_0x7356c0(0x90))/0x7*(parseInt(_0x7356c0(0x7a))/0x8)+parseInt(_0x7356c0(0x84))/0x9*(parseInt(_0x7356c0(0x77))/0xa)+parseInt(_0x7356c0(0x65))/0xb*(-parseInt(_0x7356c0(0x94))/0xc)+parseInt(_0x7356c0(0x88))/0xd;if(_0x5ab8e7===_0x30b52a)break;else _0xd9d6e7['push'](_0xd9d6e7['shift']());}catch(_0x388f41){_0xd9d6e7['push'](_0xd9d6e7['shift']());}}}(a44_0x1c86,0x8720d));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 _0x5b3ce1=a44_0x55e0;return[{'name':_0x5b3ce1(0x71),'type':'string','description':_0x5b3ce1(0x7f),'required':!![]},{'name':_0x5b3ce1(0x96),'type':_0x5b3ce1(0x82),'description':_0x5b3ce1(0x89),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4304ca=a44_0x55e0;return[{'name':_0x4304ca(0x96),'type':_0x4304ca(0x82),'description':_0x4304ca(0x89),'default':![]}];}function a44_0x1c86(){const _0x354b06=['validation','length','Updated','string','flagMissing','301ElkZfU','projectConfig','\x20Default\x20app\x20is\x20\x22','31DCqsDZ','4308oGsoaj','args','global','\x20app\x20\x22','33055ksZzRw','globalConfig','16SysKtV','trim','\x20Note:\x20app\x20\x22','\x20<name>\x20[--global]','\x22\x20still\x20defined\x20in\x20','defaultApp','\x22\x20is\x20selected\x20automatically.','object','Usage:\x20','\x20config.','appcode','apps','\x22\x20not\x20found.','both','project','\x20Remaining\x20app\x20\x22','10cIyEID','Removed\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','37456DbLGgR','Added','3790392VCOQel','33046SsclMV','bool','App\x20code','App\x20\x22','str','boolean','Missing\x20app\x20name.','369153BxWzVW','\x22\x20(appcode:\x20','keys','827895eLeCMw','2165254XeyDKj','Use\x20global\x20config\x20scope','5ukYEZL'];a44_0x1c86=function(){return _0x354b06;};return a44_0x1c86();}export async function validateAppName(_0x413b16,_0x54887a){const _0x3f9b71=a44_0x55e0,_0x279247=_0x413b16[_0x3f9b71(0x95)][0x0]?.[_0x3f9b71(0x68)]();if(!_0x279247)throw CliErrors[_0x3f9b71(0x8b)](_0x3f9b71(0x83),_0x3f9b71(0x6f)+CLI_BIN_NAME+'\x20'+_0x54887a+'\x20<name>');}export async function runAppAdd(_0x5d24cc,_0x5de2c4){const _0x6fbbc6=a44_0x55e0,_0x105ccd=_0x5d24cc[_0x6fbbc6(0x95)][0x0]?.['trim']();if(!_0x105ccd)throw CliErrors[_0x6fbbc6(0x8b)](_0x6fbbc6(0x83),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5de2c4+'\x20<name>\x20--appcode\x20<code>');const _0x324b2f=_0x5d24cc[_0x6fbbc6(0x81)](_0x6fbbc6(0x71));if(!_0x324b2f)throw CliErrors[_0x6fbbc6(0x8f)](_0x6fbbc6(0x71),_0x6fbbc6(0x6f)+CLI_BIN_NAME+'\x20'+_0x5de2c4+_0x6fbbc6(0x79));const _0xf35977={'global':_0x5d24cc['bool'](_0x6fbbc6(0x96))},_0x3c9a5d=readConfig(_0xf35977);if(!_0x3c9a5d[_0x6fbbc6(0x72)])_0x3c9a5d['apps']={};const _0x228eb1={'appcode':_0x324b2f,...collectAppProfileOverrides(_0x24e5b0=>_0x5d24cc[_0x6fbbc6(0x81)](_0x24e5b0))},_0x1e42cd=_0x3c9a5d[_0x6fbbc6(0x72)],_0x2bcdba=Object['keys'](_0x1e42cd),_0x4770ae=typeof _0x3c9a5d[_0x6fbbc6(0x6c)]===_0x6fbbc6(0x8e)&&_0x1e42cd[_0x3c9a5d['defaultApp']]?_0x3c9a5d['defaultApp']:_0x2bcdba['length']===0x1?_0x2bcdba[0x0]:undefined,_0x515481=!!_0x1e42cd[_0x105ccd];_0x1e42cd[_0x105ccd]=_0x228eb1;const _0xb33f8c=normalizeStoredDefaultApp(_0x3c9a5d,_0x4770ae);writeConfig(_0x3c9a5d,_0xf35977);const _0x2b75c9=!_0x515481&&_0xb33f8c?_0x6fbbc6(0x92)+_0xb33f8c+'\x22.':'',_0x2c9333=(_0x515481?_0x6fbbc6(0x8d):_0x6fbbc6(0x7b))+_0x6fbbc6(0x64)+_0x105ccd+_0x6fbbc6(0x85)+_0x324b2f+')'+scopeLabel(_0xf35977)+'.'+_0x2b75c9;return{'ok':!![],'message':_0x2c9333};}export async function runAppRemove(_0x5bdf13,_0x22d6eb){const _0x420172=a44_0x55e0,_0xe9dd43=_0x5bdf13[_0x420172(0x95)][0x0]?.[_0x420172(0x68)]();if(!_0xe9dd43)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x22d6eb+_0x420172(0x6a));const _0x1af5d9=_0x5bdf13[_0x420172(0x7e)](_0x420172(0x96)),{config:_0x2d92fd,layers:_0x536e45}=readRawConfigWithLayers(),_0x57d6de=_0x2d92fd[_0x420172(0x72)]??{};if(!_0x57d6de[_0xe9dd43])throw CliErrors[_0x420172(0x8b)]('App\x20\x22'+_0xe9dd43+_0x420172(0x73));const _0x42ed1e=_0x536e45['globalConfig'][_0x420172(0x72)]&&typeof _0x536e45[_0x420172(0x66)]['apps']===_0x420172(0x6e)?_0x536e45[_0x420172(0x66)][_0x420172(0x72)]:{},_0x4a1d74=_0x536e45[_0x420172(0x91)][_0x420172(0x72)]&&typeof _0x536e45[_0x420172(0x91)][_0x420172(0x72)]==='object'?_0x536e45[_0x420172(0x91)][_0x420172(0x72)]:{},_0x4f107b=appDefinedIn(_0xe9dd43,_0x42ed1e,_0x4a1d74),_0x5bca8c=resolveAppScopeForWrite(_0xe9dd43,_0x1af5d9,_0x536e45),_0x21ab2c={'global':_0x5bca8c===_0x420172(0x96)},_0x3b6865=readConfig(_0x21ab2c),_0x3f4d24=_0x3b6865['apps'];if(!_0x3f4d24||!_0x3f4d24[_0xe9dd43])throw CliErrors[_0x420172(0x8b)](_0x420172(0x80)+_0xe9dd43+'\x22\x20not\x20found.');delete _0x3f4d24[_0xe9dd43];let _0x3ecdc1='';const _0x331e70=typeof _0x3b6865[_0x420172(0x6c)]===_0x420172(0x8e)?_0x3b6865[_0x420172(0x6c)]:undefined,_0x26bbae=Object[_0x420172(0x86)](_0x3f4d24),_0x4200f4=_0x331e70===_0xe9dd43?_0x26bbae[0x0]:_0x331e70,_0x408f3c=normalizeStoredDefaultApp(_0x3b6865,_0x4200f4);if(_0x331e70===_0xe9dd43&&_0x26bbae['length']===0x1)_0x3ecdc1=_0x420172(0x76)+_0x26bbae[0x0]+_0x420172(0x6d);else _0x331e70===_0xe9dd43&&_0x408f3c&&(_0x3ecdc1='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x408f3c+'\x22.');Object[_0x420172(0x86)](_0x3f4d24)[_0x420172(0x8c)]===0x0&&(delete _0x3b6865[_0x420172(0x72)],delete _0x3b6865[_0x420172(0x6c)]);writeConfig(_0x3b6865,_0x21ab2c);const _0x99a4a6=_0x4f107b===_0x420172(0x74)?_0x420172(0x69)+_0xe9dd43+_0x420172(0x6b)+(_0x5bca8c===_0x420172(0x75)?_0x420172(0x96):_0x420172(0x75))+_0x420172(0x70):'';return{'ok':!![],'message':_0x420172(0x78)+_0xe9dd43+'\x22'+scopeLabel(_0x21ab2c)+'.'+_0x3ecdc1+_0x99a4a6};}
1
+ (function(_0x52e704,_0x4fa89e){const _0x1d27c4=a44_0x1634,_0x5a2658=_0x52e704();while(!![]){try{const _0x256c62=parseInt(_0x1d27c4(0x190))/0x1+-parseInt(_0x1d27c4(0x184))/0x2+-parseInt(_0x1d27c4(0x180))/0x3*(-parseInt(_0x1d27c4(0x170))/0x4)+parseInt(_0x1d27c4(0x186))/0x5+-parseInt(_0x1d27c4(0x178))/0x6*(-parseInt(_0x1d27c4(0x18f))/0x7)+-parseInt(_0x1d27c4(0x179))/0x8*(-parseInt(_0x1d27c4(0x169))/0x9)+-parseInt(_0x1d27c4(0x189))/0xa*(parseInt(_0x1d27c4(0x187))/0xb);if(_0x256c62===_0x4fa89e)break;else _0x5a2658['push'](_0x5a2658['shift']());}catch(_0x806e56){_0x5a2658['push'](_0x5a2658['shift']());}}}(a44_0x5a56,0x543b1));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_0x5a56(){const _0x5b3907=['Updated','7kZDaki','24761JoRcAu','Missing\x20app\x20name.','args','trim','App\x20\x22','\x20Note:\x20app\x20\x22','\x22\x20still\x20defined\x20in\x20','45TkehQO','App\x20code','\x20Default\x20app\x20is\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22','Use\x20global\x20config\x20scope','\x20<name>\x20--appcode\x20<code>','length','232RHoKAl','validation','appcode','\x20<name>','global','\x22\x20not\x20found.','bool','defaultApp','1941054SfIUuY','552664cifbDu','projectConfig','project','Usage:\x20','object','boolean','\x22\x20is\x20selected\x20automatically.','8469Obodhi','Removed\x20app\x20\x22','keys','string','453644RRZoew','apps','3422845OvSScw','10671727soNByQ','str','10CGMuRJ','\x22\x20(appcode:\x20','flagMissing','\x20Remaining\x20app\x20\x22','\x20config.'];a44_0x5a56=function(){return _0x5b3907;};return a44_0x5a56();}function a44_0x1634(_0x3bc86c,_0x21833c){_0x3bc86c=_0x3bc86c-0x163;const _0x5a5623=a44_0x5a56();let _0x1634eb=_0x5a5623[_0x3bc86c];return _0x1634eb;}export function buildAppAddFlags(){const _0x5f04bc=a44_0x1634;return[{'name':_0x5f04bc(0x172),'type':'string','description':_0x5f04bc(0x16a),'required':!![]},{'name':'global','type':_0x5f04bc(0x17e),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x49ba8e=a44_0x1634;return[{'name':'global','type':'boolean','description':_0x49ba8e(0x16d),'default':![]}];}export async function validateAppName(_0x4e08c4,_0x36df0d){const _0x33d052=a44_0x1634,_0x166e99=_0x4e08c4[_0x33d052(0x164)][0x0]?.['trim']();if(!_0x166e99)throw CliErrors[_0x33d052(0x171)]('Missing\x20app\x20name.',_0x33d052(0x17c)+CLI_BIN_NAME+'\x20'+_0x36df0d+_0x33d052(0x173));}export async function runAppAdd(_0x5ef4ef,_0x3604f5){const _0xb91080=a44_0x1634,_0x2970e5=_0x5ef4ef['args'][0x0]?.[_0xb91080(0x165)]();if(!_0x2970e5)throw CliErrors['validation'](_0xb91080(0x163),_0xb91080(0x17c)+CLI_BIN_NAME+'\x20'+_0x3604f5+_0xb91080(0x16e));const _0x4aea75=_0x5ef4ef[_0xb91080(0x188)](_0xb91080(0x172));if(!_0x4aea75)throw CliErrors[_0xb91080(0x18b)](_0xb91080(0x172),_0xb91080(0x17c)+CLI_BIN_NAME+'\x20'+_0x3604f5+_0xb91080(0x16e));const _0x131834={'global':_0x5ef4ef[_0xb91080(0x176)]('global')},_0x4a3181=readConfig(_0x131834);if(!_0x4a3181[_0xb91080(0x185)])_0x4a3181[_0xb91080(0x185)]={};const _0x3063f4={'appcode':_0x4aea75,...collectAppProfileOverrides(_0x1b2bca=>_0x5ef4ef['str'](_0x1b2bca))},_0x4b9667=_0x4a3181[_0xb91080(0x185)],_0x41788c=Object[_0xb91080(0x182)](_0x4b9667),_0x29a852=typeof _0x4a3181[_0xb91080(0x177)]===_0xb91080(0x183)&&_0x4b9667[_0x4a3181[_0xb91080(0x177)]]?_0x4a3181[_0xb91080(0x177)]:_0x41788c[_0xb91080(0x16f)]===0x1?_0x41788c[0x0]:undefined,_0x5a3769=!!_0x4b9667[_0x2970e5];_0x4b9667[_0x2970e5]=_0x3063f4;const _0x41e6e8=normalizeStoredDefaultApp(_0x4a3181,_0x29a852);writeConfig(_0x4a3181,_0x131834);const _0x55c333=!_0x5a3769&&_0x41e6e8?_0xb91080(0x16b)+_0x41e6e8+'\x22.':'',_0x4b9182=(_0x5a3769?_0xb91080(0x18e):'Added')+'\x20app\x20\x22'+_0x2970e5+_0xb91080(0x18a)+_0x4aea75+')'+scopeLabel(_0x131834)+'.'+_0x55c333;return{'ok':!![],'message':_0x4b9182};}export async function runAppRemove(_0x44b31,_0x1c7315){const _0x181400=a44_0x1634,_0x589966=_0x44b31['args'][0x0]?.[_0x181400(0x165)]();if(!_0x589966)throw CliErrors[_0x181400(0x171)]('Missing\x20app\x20name.',_0x181400(0x17c)+CLI_BIN_NAME+'\x20'+_0x1c7315+'\x20<name>\x20[--global]');const _0x4344a0=_0x44b31[_0x181400(0x176)]('global'),{config:_0x216a93,layers:_0x4d1d24}=readRawConfigWithLayers(),_0x2f5da5=_0x216a93[_0x181400(0x185)]??{};if(!_0x2f5da5[_0x589966])throw CliErrors['validation']('App\x20\x22'+_0x589966+_0x181400(0x175));const _0x30d6df=_0x4d1d24['globalConfig'][_0x181400(0x185)]&&typeof _0x4d1d24['globalConfig']['apps']==='object'?_0x4d1d24['globalConfig'][_0x181400(0x185)]:{},_0x449dea=_0x4d1d24[_0x181400(0x17a)][_0x181400(0x185)]&&typeof _0x4d1d24[_0x181400(0x17a)][_0x181400(0x185)]===_0x181400(0x17d)?_0x4d1d24['projectConfig'][_0x181400(0x185)]:{},_0x27b4bc=appDefinedIn(_0x589966,_0x30d6df,_0x449dea),_0x9c518d=resolveAppScopeForWrite(_0x589966,_0x4344a0,_0x4d1d24),_0x4db5d0={'global':_0x9c518d===_0x181400(0x174)},_0x3e6356=readConfig(_0x4db5d0),_0x21e753=_0x3e6356[_0x181400(0x185)];if(!_0x21e753||!_0x21e753[_0x589966])throw CliErrors[_0x181400(0x171)](_0x181400(0x166)+_0x589966+_0x181400(0x175));delete _0x21e753[_0x589966];let _0x383ee6='';const _0x1cc5d6=typeof _0x3e6356[_0x181400(0x177)]===_0x181400(0x183)?_0x3e6356['defaultApp']:undefined,_0x23cae5=Object['keys'](_0x21e753),_0x2ee6d8=_0x1cc5d6===_0x589966?_0x23cae5[0x0]:_0x1cc5d6,_0x4bfa3f=normalizeStoredDefaultApp(_0x3e6356,_0x2ee6d8);if(_0x1cc5d6===_0x589966&&_0x23cae5[_0x181400(0x16f)]===0x1)_0x383ee6=_0x181400(0x18c)+_0x23cae5[0x0]+_0x181400(0x17f);else _0x1cc5d6===_0x589966&&_0x4bfa3f&&(_0x383ee6=_0x181400(0x16c)+_0x4bfa3f+'\x22.');Object[_0x181400(0x182)](_0x21e753)[_0x181400(0x16f)]===0x0&&(delete _0x3e6356[_0x181400(0x185)],delete _0x3e6356['defaultApp']);writeConfig(_0x3e6356,_0x4db5d0);const _0x2f61e2=_0x27b4bc==='both'?_0x181400(0x167)+_0x589966+_0x181400(0x168)+(_0x9c518d===_0x181400(0x17b)?_0x181400(0x174):_0x181400(0x17b))+_0x181400(0x18d):'';return{'ok':!![],'message':_0x181400(0x181)+_0x589966+'\x22'+scopeLabel(_0x4db5d0)+'.'+_0x383ee6+_0x2f61e2};}
@@ -1 +1 @@
1
- (function(_0x3707fc,_0x4b95e9){const _0x1c80f6=a45_0x3721,_0x3c7887=_0x3707fc();while(!![]){try{const _0x299ead=-parseInt(_0x1c80f6(0x190))/0x1+-parseInt(_0x1c80f6(0x1a3))/0x2+-parseInt(_0x1c80f6(0x19a))/0x3+parseInt(_0x1c80f6(0x194))/0x4+parseInt(_0x1c80f6(0x1a2))/0x5+-parseInt(_0x1c80f6(0x1a6))/0x6+parseInt(_0x1c80f6(0x1aa))/0x7*(parseInt(_0x1c80f6(0x1a1))/0x8);if(_0x299ead===_0x4b95e9)break;else _0x3c7887['push'](_0x3c7887['shift']());}catch(_0x591d83){_0x3c7887['push'](_0x3c7887['shift']());}}}(a45_0x365b,0x4f7a6));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x58ae91 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a45_0x365b(){const _0x57d24b=['\x0aNo\x20available\x20apps\x20found.','271326NSGVPz','yellow','gray','cyan','1966704fJBfGD','trim','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','Fetching\x20available\x20apps...','manual','✎\x20Enter\x20manually','1950711TGJGlF','App\x20Code:','length','\x20\x20(','custom','appCode','No\x20available\x20apps\x20found.','5005256dJyaed','350675hqGkWc','1121730WDtkym','Invalid\x20App\x20Code','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','30930McwGoN','(Skip;\x20configure\x20later)','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','✎\x20Enter\x20appcode\x20manually','14mbkYuy','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','map','Found\x20','Select\x20the\x20app\x20to\x20bind:','skip','message','includes','find','valid'];a45_0x365b=function(){return _0x57d24b;};return a45_0x365b();}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_0x3721(_0x17db82,_0x144295){_0x17db82=_0x17db82-0x18d;const _0x365b23=a45_0x365b();let _0x37214b=_0x365b23[_0x17db82];return _0x37214b;}export async function promptCustomAppcode(){const _0x5ea13d=a45_0x3721,_0x4e9b53=await input({'message':_0x5ea13d(0x19b),'validate':_0x3b20bf=>{const _0x2bb974=_0x5ea13d,_0x372879=validateAppcode(_0x3b20bf[_0x2bb974(0x195)]());return _0x372879[_0x2bb974(0x18e)]||_0x372879['message']||_0x2bb974(0x1a4);}});return _0x4e9b53['trim']();}export async function promptAppSelection(_0x5e6d01){const _0x64f6e3=a45_0x3721,_0x4cf06e=[{'name':a45_0x58ae91[_0x64f6e3(0x191)](_0x64f6e3(0x1a9)),'value':-0x1},..._0x5e6d01['map']((_0x4c2051,_0x1e2ce1)=>({'name':_0x4c2051['appName']+'\x20\x20'+a45_0x58ae91['gray']('('+_0x4c2051[_0x64f6e3(0x19f)]+')'),'value':_0x1e2ce1}))],_0x1d00da=await checkbox({'message':_0x64f6e3(0x1ae)+a45_0x58ae91[_0x64f6e3(0x193)](_0x5e6d01[_0x64f6e3(0x19c)])+_0x64f6e3(0x196),'choices':_0x4cf06e,'loop':![]});if(_0x1d00da[_0x64f6e3(0x1b2)](-0x1))return _0x64f6e3(0x19e);if(_0x1d00da[_0x64f6e3(0x19c)]===0x0)return _0x64f6e3(0x19e);return _0x1d00da['map'](_0x5e817f=>_0x5e6d01[_0x5e817f]);}export async function promptSingleAppSelection(_0x3b2c0c){const _0x421aa5=a45_0x3721,_0x40137c=[{'name':a45_0x58ae91[_0x421aa5(0x192)](_0x421aa5(0x1a8)),'value':_0x421aa5(0x1b0)},{'name':a45_0x58ae91[_0x421aa5(0x191)](_0x421aa5(0x1a9)),'value':_0x421aa5(0x19e)},..._0x3b2c0c[_0x421aa5(0x1ad)](_0xf99662=>({'name':_0xf99662['appName']+'\x20\x20'+a45_0x58ae91[_0x421aa5(0x192)]('('+_0xf99662[_0x421aa5(0x19f)]+')'),'value':_0xf99662[_0x421aa5(0x19f)]}))],_0x2b6744=await select({'message':_0x421aa5(0x1af),'choices':_0x40137c});if(_0x2b6744===_0x421aa5(0x1b0))return _0x421aa5(0x1b0);if(_0x2b6744===_0x421aa5(0x19e))return'custom';return _0x3b2c0c[_0x421aa5(0x18d)](_0x1c772d=>_0x1c772d[_0x421aa5(0x19f)]===_0x2b6744);}export async function selectSingleAppcode(_0x1a5eba){const _0xb562a8=a45_0x3721;if(!_0x1a5eba)return writeCliSideChannelLine(a45_0x58ae91[_0xb562a8(0x192)](_0xb562a8(0x1ab))),_fallbackOrSkip();writeCliSideChannelLine(_0xb562a8(0x197));let _0x177ea0;try{_0x177ea0=await withActiveCookie(_0x1a5eba,()=>listRemoteApps());}catch(_0x40c912){writeCliSideChannelLine(a45_0x58ae91[_0xb562a8(0x191)](_0xb562a8(0x1ac)));if(_0x40c912 instanceof Error)writeCliSideChannelLine(a45_0x58ae91[_0xb562a8(0x192)](_0xb562a8(0x19d)+_0x40c912[_0xb562a8(0x1b1)]+')'));return _fallbackOrSkip();}if(_0x177ea0['length']===0x0)return writeCliSideChannelLine(a45_0x58ae91[_0xb562a8(0x191)](_0xb562a8(0x1a0))),_fallbackOrSkip();const _0x2110aa=await promptSingleAppSelection(_0x177ea0);if(_0x2110aa===_0xb562a8(0x1b0))return'';if(_0x2110aa==='custom')return promptCustomAppcode();return _0x2110aa[_0xb562a8(0x19f)];}export async function selectMultipleApps(_0x4a2204){const _0x11f9f4=a45_0x3721;writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x140e04;try{_0x140e04=await withActiveCookie(_0x4a2204,()=>listRemoteApps());}catch(_0x144f8f){writeCliSideChannelLine(_0x11f9f4(0x1a5));if(_0x144f8f instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x144f8f[_0x11f9f4(0x1b1)]+')');return _0x11f9f4(0x19e);}if(_0x140e04[_0x11f9f4(0x19c)]===0x0)return writeCliSideChannelLine(_0x11f9f4(0x18f)),'custom';return promptAppSelection(_0x140e04);}async function _fallbackOrSkip(){const _0x5d3412=a45_0x3721,_0x373b8e=await select({'message':_0x5d3412(0x19b),'choices':[{'name':a45_0x58ae91['gray'](_0x5d3412(0x1a7)),'value':_0x5d3412(0x1b0)},{'name':a45_0x58ae91[_0x5d3412(0x191)](_0x5d3412(0x199)),'value':_0x5d3412(0x198)}]});if(_0x373b8e===_0x5d3412(0x1b0))return'';return promptCustomAppcode();}
1
+ function a45_0x4747(){const _0x4996a1=['yellow','✎\x20Enter\x20appcode\x20manually','8186650ztBNhC','\x20\x20(','5584472aOztWr','find','9596iGhzVY','Found\x20','(Skip;\x20configure\x20later)','3953404cOJJbj','appName','message','appCode','97XyDATA','No\x20available\x20apps\x20found.','11984896IebPFe','4724406jmayBg','gray','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','3480875rsxxWi','12cyLclw','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','✎\x20Enter\x20manually','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','cyan','map','9fVvXAg','includes','Fetching\x20available\x20apps...','skip','trim','\x0aNo\x20available\x20apps\x20found.','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','length','App\x20Code:','Select\x20the\x20app\x20to\x20bind:','custom','manual'];a45_0x4747=function(){return _0x4996a1;};return a45_0x4747();}(function(_0x251b10,_0x3548c0){const _0x2ab9d6=a45_0x2c3d,_0x10a5f6=_0x251b10();while(!![]){try{const _0x36b078=-parseInt(_0x2ab9d6(0x104))/0x1*(parseInt(_0x2ab9d6(0xfd))/0x2)+parseInt(_0x2ab9d6(0x107))/0x3+-parseInt(_0x2ab9d6(0xfb))/0x4+-parseInt(_0x2ab9d6(0x10a))/0x5+parseInt(_0x2ab9d6(0xe4))/0x6*(parseInt(_0x2ab9d6(0x100))/0x7)+parseInt(_0x2ab9d6(0x106))/0x8+parseInt(_0x2ab9d6(0xeb))/0x9*(-parseInt(_0x2ab9d6(0xf9))/0xa);if(_0x36b078===_0x3548c0)break;else _0x10a5f6['push'](_0x10a5f6['shift']());}catch(_0x27b4a6){_0x10a5f6['push'](_0x10a5f6['shift']());}}}(a45_0x4747,0xc9aee));import{input,checkbox,select}from'@inquirer/prompts';import a45_0xa6f5e9 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 _0x5e1bbf=a45_0x2c3d,_0x13f172=await input({'message':'App\x20Code:','validate':_0x81dc4f=>{const _0xdb9817=a45_0x2c3d,_0x31c9db=validateAppcode(_0x81dc4f['trim']());return _0x31c9db['valid']||_0x31c9db[_0xdb9817(0x102)]||'Invalid\x20App\x20Code';}});return _0x13f172[_0x5e1bbf(0xef)]();}export async function promptAppSelection(_0x10bd4e){const _0x13185e=a45_0x2c3d,_0x76fcc2=[{'name':a45_0xa6f5e9[_0x13185e(0xf7)](_0x13185e(0xf8)),'value':-0x1},..._0x10bd4e[_0x13185e(0xea)]((_0x8f0f21,_0x449811)=>({'name':_0x8f0f21[_0x13185e(0x101)]+'\x20\x20'+a45_0xa6f5e9['gray']('('+_0x8f0f21['appCode']+')'),'value':_0x449811}))],_0x4d8db3=await checkbox({'message':_0x13185e(0xfe)+a45_0xa6f5e9[_0x13185e(0xe9)](_0x10bd4e[_0x13185e(0xf2)])+_0x13185e(0xf1),'choices':_0x76fcc2,'loop':![]});if(_0x4d8db3[_0x13185e(0xec)](-0x1))return _0x13185e(0xf5);if(_0x4d8db3[_0x13185e(0xf2)]===0x0)return _0x13185e(0xf5);return _0x4d8db3[_0x13185e(0xea)](_0x221a0a=>_0x10bd4e[_0x221a0a]);}export async function promptSingleAppSelection(_0x280ff3){const _0x28a0ae=a45_0x2c3d,_0x5adb48=[{'name':a45_0xa6f5e9[_0x28a0ae(0x108)](_0x28a0ae(0x109)),'value':_0x28a0ae(0xee)},{'name':a45_0xa6f5e9[_0x28a0ae(0xf7)](_0x28a0ae(0xf8)),'value':_0x28a0ae(0xf5)},..._0x280ff3['map'](_0x3169b0=>({'name':_0x3169b0[_0x28a0ae(0x101)]+'\x20\x20'+a45_0xa6f5e9['gray']('('+_0x3169b0[_0x28a0ae(0x103)]+')'),'value':_0x3169b0[_0x28a0ae(0x103)]}))],_0x535d1d=await select({'message':_0x28a0ae(0xf4),'choices':_0x5adb48});if(_0x535d1d===_0x28a0ae(0xee))return _0x28a0ae(0xee);if(_0x535d1d===_0x28a0ae(0xf5))return _0x28a0ae(0xf5);return _0x280ff3[_0x28a0ae(0xfc)](_0x534b81=>_0x534b81['appCode']===_0x535d1d);}export async function selectSingleAppcode(_0x4b8e92){const _0x10a2f7=a45_0x2c3d;if(!_0x4b8e92)return writeCliSideChannelLine(a45_0xa6f5e9[_0x10a2f7(0x108)](_0x10a2f7(0xe8))),_fallbackOrSkip();writeCliSideChannelLine(_0x10a2f7(0xed));let _0x19bc84;try{_0x19bc84=await withActiveCookie(_0x4b8e92,()=>listRemoteApps());}catch(_0x4f98a2){writeCliSideChannelLine(a45_0xa6f5e9['yellow'](_0x10a2f7(0xe5)));if(_0x4f98a2 instanceof Error)writeCliSideChannelLine(a45_0xa6f5e9[_0x10a2f7(0x108)](_0x10a2f7(0xfa)+_0x4f98a2[_0x10a2f7(0x102)]+')'));return _fallbackOrSkip();}if(_0x19bc84['length']===0x0)return writeCliSideChannelLine(a45_0xa6f5e9[_0x10a2f7(0xf7)](_0x10a2f7(0x105))),_fallbackOrSkip();const _0x43d12c=await promptSingleAppSelection(_0x19bc84);if(_0x43d12c==='skip')return'';if(_0x43d12c===_0x10a2f7(0xf5))return promptCustomAppcode();return _0x43d12c[_0x10a2f7(0x103)];}export async function selectMultipleApps(_0x15920e){const _0x51a67a=a45_0x2c3d;writeCliSideChannelLine(_0x51a67a(0xed));let _0x140111;try{_0x140111=await withActiveCookie(_0x15920e,()=>listRemoteApps());}catch(_0x5c3c20){writeCliSideChannelLine(_0x51a67a(0xe6));if(_0x5c3c20 instanceof Error)writeCliSideChannelLine(_0x51a67a(0xfa)+_0x5c3c20['message']+')');return _0x51a67a(0xf5);}if(_0x140111[_0x51a67a(0xf2)]===0x0)return writeCliSideChannelLine(_0x51a67a(0xf0)),_0x51a67a(0xf5);return promptAppSelection(_0x140111);}function a45_0x2c3d(_0x12808b,_0x2106d2){_0x12808b=_0x12808b-0xe4;const _0x47477e=a45_0x4747();let _0x2c3de4=_0x47477e[_0x12808b];return _0x2c3de4;}async function _fallbackOrSkip(){const _0x2a1e34=a45_0x2c3d,_0x1863eb=await select({'message':_0x2a1e34(0xf3),'choices':[{'name':a45_0xa6f5e9[_0x2a1e34(0x108)](_0x2a1e34(0xff)),'value':_0x2a1e34(0xee)},{'name':a45_0xa6f5e9[_0x2a1e34(0xf7)](_0x2a1e34(0xe7)),'value':_0x2a1e34(0xf6)}]});if(_0x1863eb===_0x2a1e34(0xee))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0xb46f6f=a46_0x5508;(function(_0x3fdc7c,_0x2289d5){const _0xe6b0c3=a46_0x5508,_0xcb5757=_0x3fdc7c();while(!![]){try{const _0x1655ae=-parseInt(_0xe6b0c3(0x199))/0x1+-parseInt(_0xe6b0c3(0x18f))/0x2+parseInt(_0xe6b0c3(0x185))/0x3*(-parseInt(_0xe6b0c3(0x188))/0x4)+parseInt(_0xe6b0c3(0x19f))/0x5+-parseInt(_0xe6b0c3(0x195))/0x6+parseInt(_0xe6b0c3(0x18b))/0x7*(-parseInt(_0xe6b0c3(0x192))/0x8)+-parseInt(_0xe6b0c3(0x1a3))/0x9*(-parseInt(_0xe6b0c3(0x184))/0xa);if(_0x1655ae===_0x2289d5)break;else _0xcb5757['push'](_0xcb5757['shift']());}catch(_0x5a89f3){_0xcb5757['push'](_0xcb5757['shift']());}}}(a46_0x27f6,0x3d87d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x27f6(){const _0x56fe8e=['\x20is\x20pending.','FAILED','879234DbiDWP','\x20--format\x20compress','\x20failed.','16672bjYtPj','\x20returned\x20unknown\x20status\x20','string','124866xphBXH','taskId','PENDING','\x20--appcode\x20','459603gUXcoC','status','replace','SUCCESS','Task\x20','\x20failed:\x20','2516685nKRmBi','PROCESSING','\x20is\x20processing.','\x20completed\x20successfully.','774819JhAXeI','errorMessage','\x27\x5c\x27\x27','110XReIsv','8850BqRkCR','trim','toUpperCase','188xuMpGF','\x20response\x20did\x20not\x20contain\x20a\x20status.','Async\x20task\x20','469sIAIco','has'];a46_0x27f6=function(){return _0x56fe8e;};return a46_0x27f6();}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0xb46f6f(0x18e)]),NON_TERMINAL_STATUSES=new Set([a46_0xb46f6f(0x197),a46_0xb46f6f(0x1a0)]);function a46_0x5508(_0x44edc3,_0x50b885){_0x44edc3=_0x44edc3-0x183;const _0x27f6e8=a46_0x27f6();let _0x550896=_0x27f6e8[_0x44edc3];return _0x550896;}export function normalizeAsyncTask(_0x1799b5){const _0x2632ed=a46_0xb46f6f,_0x454ff4=typeof _0x1799b5?.[_0x2632ed(0x196)]==='string'?_0x1799b5[_0x2632ed(0x196)]['trim']():'';if(!_0x454ff4)throw CliErrors['apiError']('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x4f86f1=typeof _0x1799b5['status']===_0x2632ed(0x194)?_0x1799b5[_0x2632ed(0x19a)][_0x2632ed(0x186)]()[_0x2632ed(0x187)]():'';if(!_0x4f86f1)throw CliErrors['apiError'](_0x2632ed(0x18a)+_0x454ff4+_0x2632ed(0x189));return{'taskId':_0x454ff4,'status':_0x4f86f1,'errorMessage':typeof _0x1799b5['errorMessage']===_0x2632ed(0x194)&&_0x1799b5[_0x2632ed(0x1a4)][_0x2632ed(0x186)]()?_0x1799b5[_0x2632ed(0x1a4)][_0x2632ed(0x186)]():null,'isTerminal':TERMINAL_STATUSES[_0x2632ed(0x18c)](_0x4f86f1),'knownStatus':TERMINAL_STATUSES['has'](_0x4f86f1)||NON_TERMINAL_STATUSES[_0x2632ed(0x18c)](_0x4f86f1)};}export function buildAsyncTaskStatusCommand(_0x18ffb1,_0x1e31e3){const _0x9acf4f=a46_0xb46f6f;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x18ffb1)+_0x9acf4f(0x198)+quoteShellArg(_0x1e31e3)+_0x9acf4f(0x190);}export function asyncTaskMessage(_0x580b82){const _0x537ada=a46_0xb46f6f;switch(_0x580b82['status']){case _0x537ada(0x197):return'Task\x20'+_0x580b82[_0x537ada(0x196)]+_0x537ada(0x18d);case _0x537ada(0x1a0):return _0x537ada(0x19d)+_0x580b82[_0x537ada(0x196)]+_0x537ada(0x1a1);case _0x537ada(0x19c):return _0x537ada(0x19d)+_0x580b82[_0x537ada(0x196)]+_0x537ada(0x1a2);case _0x537ada(0x18e):return _0x580b82['errorMessage']?_0x537ada(0x19d)+_0x580b82['taskId']+_0x537ada(0x19e)+_0x580b82[_0x537ada(0x1a4)]:_0x537ada(0x19d)+_0x580b82[_0x537ada(0x196)]+_0x537ada(0x191);default:return'Task\x20'+_0x580b82[_0x537ada(0x196)]+_0x537ada(0x193)+_0x580b82[_0x537ada(0x19a)]+'.';}}function quoteShellArg(_0x34588c){const _0x116127=a46_0xb46f6f;return'\x27'+_0x34588c[_0x116127(0x19b)](/'/g,_0x116127(0x183))+'\x27';}
1
+ const a46_0x72d995=a46_0x1556;(function(_0x267444,_0x5dc5b4){const _0xfcf50=a46_0x1556,_0x54e7d9=_0x267444();while(!![]){try{const _0x3c6682=-parseInt(_0xfcf50(0x111))/0x1*(-parseInt(_0xfcf50(0x10f))/0x2)+parseInt(_0xfcf50(0x11a))/0x3+parseInt(_0xfcf50(0x11d))/0x4*(-parseInt(_0xfcf50(0x103))/0x5)+parseInt(_0xfcf50(0x113))/0x6+-parseInt(_0xfcf50(0x117))/0x7+-parseInt(_0xfcf50(0x11e))/0x8*(parseInt(_0xfcf50(0x122))/0x9)+parseInt(_0xfcf50(0x107))/0xa*(parseInt(_0xfcf50(0x11c))/0xb);if(_0x3c6682===_0x5dc5b4)break;else _0x54e7d9['push'](_0x54e7d9['shift']());}catch(_0x210081){_0x54e7d9['push'](_0x54e7d9['shift']());}}}(a46_0xe733,0xaf00d));function a46_0x1556(_0x4d791c,_0x59ff81){_0x4d791c=_0x4d791c-0x101;const _0xe733b7=a46_0xe733();let _0x1556a1=_0xe733b7[_0x4d791c];return _0x1556a1;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x72d995(0x120),a46_0x72d995(0x118)]),NON_TERMINAL_STATUSES=new Set([a46_0x72d995(0x101),a46_0x72d995(0x10c)]);export function normalizeAsyncTask(_0x5cc57d){const _0x313139=a46_0x72d995,_0x58f2c8=typeof _0x5cc57d?.[_0x313139(0x102)]===_0x313139(0x106)?_0x5cc57d['taskId'][_0x313139(0x105)]():'';if(!_0x58f2c8)throw CliErrors[_0x313139(0x11f)](_0x313139(0x109));const _0x2e90e9=typeof _0x5cc57d[_0x313139(0x110)]===_0x313139(0x106)?_0x5cc57d['status'][_0x313139(0x105)]()[_0x313139(0x115)]():'';if(!_0x2e90e9)throw CliErrors[_0x313139(0x11f)](_0x313139(0x10d)+_0x58f2c8+_0x313139(0x123));return{'taskId':_0x58f2c8,'status':_0x2e90e9,'errorMessage':typeof _0x5cc57d[_0x313139(0x10b)]===_0x313139(0x106)&&_0x5cc57d[_0x313139(0x10b)]['trim']()?_0x5cc57d[_0x313139(0x10b)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x313139(0x10a)](_0x2e90e9),'knownStatus':TERMINAL_STATUSES[_0x313139(0x10a)](_0x2e90e9)||NON_TERMINAL_STATUSES[_0x313139(0x10a)](_0x2e90e9)};}export function buildAsyncTaskStatusCommand(_0x3d9222,_0x4f6c63){const _0x572f26=a46_0x72d995;return CLI_BIN_NAME+_0x572f26(0x10e)+quoteShellArg(_0x3d9222)+_0x572f26(0x11b)+quoteShellArg(_0x4f6c63)+_0x572f26(0x104);}export function asyncTaskMessage(_0x419435){const _0x57ae9b=a46_0x72d995;switch(_0x419435[_0x57ae9b(0x110)]){case _0x57ae9b(0x101):return'Task\x20'+_0x419435['taskId']+'\x20is\x20pending.';case _0x57ae9b(0x10c):return'Task\x20'+_0x419435['taskId']+_0x57ae9b(0x112);case _0x57ae9b(0x120):return'Task\x20'+_0x419435[_0x57ae9b(0x102)]+_0x57ae9b(0x114);case'FAILED':return _0x419435[_0x57ae9b(0x10b)]?'Task\x20'+_0x419435[_0x57ae9b(0x102)]+_0x57ae9b(0x121)+_0x419435[_0x57ae9b(0x10b)]:_0x57ae9b(0x108)+_0x419435[_0x57ae9b(0x102)]+'\x20failed.';default:return'Task\x20'+_0x419435[_0x57ae9b(0x102)]+_0x57ae9b(0x116)+_0x419435['status']+'.';}}function a46_0xe733(){const _0x16ee1a=['FAILED','replace','96348FlZyqj','\x20--appcode\x20','11NocQbO','20DmxRXm','155496npvHXp','apiError','SUCCESS','\x20failed:\x20','441SFAjNo','\x20response\x20did\x20not\x20contain\x20a\x20status.','PENDING','taskId','211555GqkzFO','\x20--format\x20compress','trim','string','14641010byWlTx','Task\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','has','errorMessage','PROCESSING','Async\x20task\x20','\x20task\x20status\x20--task-id\x20','2xTnxYy','status','1256156QmPQdh','\x20is\x20processing.','2185446RAcUbE','\x20completed\x20successfully.','toUpperCase','\x20returned\x20unknown\x20status\x20','8650831pnnfaF'];a46_0xe733=function(){return _0x16ee1a;};return a46_0xe733();}function quoteShellArg(_0x58d96b){const _0x3c886a=a46_0x72d995;return'\x27'+_0x58d96b[_0x3c886a(0x119)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
@@ -1 +1 @@
1
- function a47_0x8dee(_0x3882f9,_0x27289b){_0x3882f9=_0x3882f9-0x13a;var _0x3c0dec=a47_0x3c0d();var _0x8deeeb=_0x3c0dec[_0x3882f9];return _0x8deeeb;}function a47_0x3c0d(){var _0x5c2792=['method','181091IhbrYc','2168668ufdLvI','2625018HkhxSe','12649NeEZUE','263595NvSXHi','defineProperties','3yBsEHb','2ScfqYI','11245090KyVoGP','1224xIatqG','description','5078655ihsSMd'];a47_0x3c0d=function(){return _0x5c2792;};return a47_0x3c0d();}(function(_0x556146,_0x25cb78){var _0x441578=a47_0x8dee,_0x3f5016=_0x556146();while(!![]){try{var _0x558cf0=parseInt(_0x441578(0x142))/0x1*(-parseInt(_0x441578(0x13c))/0x2)+parseInt(_0x441578(0x13b))/0x3*(-parseInt(_0x441578(0x143))/0x4)+parseInt(_0x441578(0x146))/0x5+-parseInt(_0x441578(0x144))/0x6+parseInt(_0x441578(0x145))/0x7*(-parseInt(_0x441578(0x13e))/0x8)+parseInt(_0x441578(0x140))/0x9+parseInt(_0x441578(0x13d))/0xa;if(_0x558cf0===_0x25cb78)break;else _0x3f5016['push'](_0x3f5016['shift']());}catch(_0x5baf29){_0x3f5016['push'](_0x3f5016['shift']());}}}(a47_0x3c0d,0x4a4a3));export function asDryRunResult(_0x3bad45,_0x1440b6){var _0x3a895a=a47_0x8dee;return Object[_0x3a895a(0x13a)](_0x3bad45,{'method':{'value':_0x1440b6[_0x3a895a(0x141)],'enumerable':![]},'url':{'value':_0x1440b6['url'],'enumerable':![]},..._0x1440b6[_0x3a895a(0x13f)]?{'description':{'value':_0x1440b6[_0x3a895a(0x13f)],'enumerable':![]}}:{}});}
1
+ function a47_0x26eb(_0x5861cf,_0x52fc97){_0x5861cf=_0x5861cf-0xc5;var _0x1658a7=a47_0x1658();var _0x26ebf5=_0x1658a7[_0x5861cf];return _0x26ebf5;}function a47_0x1658(){var _0x1f87a4=['122419KXJcWp','10anFPaW','11512470YEEwHH','12366DAbGuX','method','627KDIwhB','6SDNwGV','102981zxYUnL','defineProperties','5378405NKFSvz','description','11656155oLUGxP','url','7608gVmcww','1428cKkkLv','10940AQubxy'];a47_0x1658=function(){return _0x1f87a4;};return a47_0x1658();}(function(_0x298c31,_0x252517){var _0x5577b6=a47_0x26eb,_0x3945a7=_0x298c31();while(!![]){try{var _0x3720d6=parseInt(_0x5577b6(0xd0))/0x1*(-parseInt(_0x5577b6(0xca))/0x2)+-parseInt(_0x5577b6(0xce))/0x3*(parseInt(_0x5577b6(0xc8))/0x4)+-parseInt(_0x5577b6(0xd2))/0x5*(parseInt(_0x5577b6(0xcf))/0x6)+parseInt(_0x5577b6(0xd4))/0x7+-parseInt(_0x5577b6(0xc6))/0x8*(-parseInt(_0x5577b6(0xcc))/0x9)+-parseInt(_0x5577b6(0xcb))/0xa+-parseInt(_0x5577b6(0xc9))/0xb*(-parseInt(_0x5577b6(0xc7))/0xc);if(_0x3720d6===_0x252517)break;else _0x3945a7['push'](_0x3945a7['shift']());}catch(_0x4d9e34){_0x3945a7['push'](_0x3945a7['shift']());}}}(a47_0x1658,0xefed6));export function asDryRunResult(_0x2adb20,_0x38fdea){var _0x4a9889=a47_0x26eb;return Object[_0x4a9889(0xd1)](_0x2adb20,{'method':{'value':_0x38fdea[_0x4a9889(0xcd)],'enumerable':![]},'url':{'value':_0x38fdea[_0x4a9889(0xc5)],'enumerable':![]},..._0x38fdea[_0x4a9889(0xd3)]?{'description':{'value':_0x38fdea[_0x4a9889(0xd3)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- function a48_0x1119(_0x310c0d,_0x18dd4b){_0x310c0d=_0x310c0d-0xb9;const _0x3d4682=a48_0x3d46();let _0x111989=_0x3d4682[_0x310c0d];return _0x111989;}const a48_0xf2201a=a48_0x1119;(function(_0x5433f0,_0x5feb8){const _0x2e6b98=a48_0x1119,_0x2cc189=_0x5433f0();while(!![]){try{const _0x2f8038=-parseInt(_0x2e6b98(0xbc))/0x1+-parseInt(_0x2e6b98(0xce))/0x2*(parseInt(_0x2e6b98(0xca))/0x3)+parseInt(_0x2e6b98(0xc2))/0x4+parseInt(_0x2e6b98(0xc5))/0x5+-parseInt(_0x2e6b98(0xd0))/0x6+-parseInt(_0x2e6b98(0xbd))/0x7*(-parseInt(_0x2e6b98(0xc0))/0x8)+parseInt(_0x2e6b98(0xc4))/0x9;if(_0x2f8038===_0x5feb8)break;else _0x2cc189['push'](_0x2cc189['shift']());}catch(_0x221c9a){_0x2cc189['push'](_0x2cc189['shift']());}}}(a48_0x3d46,0xd6928));export const GLOBAL_SCOPE_FLAG={'name':a48_0xf2201a(0xcc),'type':a48_0xf2201a(0xcf),'default':![],'description':a48_0xf2201a(0xc6)};function a48_0x3d46(){const _0x361092=['Write\x20to\x20the\x20global\x20configuration','string','appcode','dbtype','9kngeBi','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','global','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','808726RmfXbu','boolean','7899030rPTUCq','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','MYSQL','skip-connection-test','1641687tcQQML','4907SawCwP','datasetcode','Database\x20product\x20type','8TuqIxq','code','5272024WahuET','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','20824767pucBsq','7087995DfTujX'];a48_0x3d46=function(){return _0x361092;};return a48_0x3d46();}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_0xf2201a(0xc1),'type':a48_0xf2201a(0xc7),'required':!![],'description':a48_0xf2201a(0xcb),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0xf2201a(0xbe),'description':a48_0xf2201a(0xcb)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0xf2201a(0xc7),'required':!![],'description':a48_0xf2201a(0xc3),'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_0xf2201a(0xc8),'type':a48_0xf2201a(0xc7),'required':![],'description':a48_0xf2201a(0xcd)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0xf2201a(0xb9)};export const DB_TYPE_FLAG={'name':a48_0xf2201a(0xc9),'type':a48_0xf2201a(0xc7),'required':!![],'description':a48_0xf2201a(0xbf),'enum':[a48_0xf2201a(0xba),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0xf2201a(0xbb),'type':a48_0xf2201a(0xcf),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
1
+ const a48_0x2ef8f7=a48_0x30fb;(function(_0xd63ba5,_0x430cc4){const _0x67336e=a48_0x30fb,_0x55ab28=_0xd63ba5();while(!![]){try{const _0x2d9ba9=parseInt(_0x67336e(0x84))/0x1+parseInt(_0x67336e(0x90))/0x2*(-parseInt(_0x67336e(0x8f))/0x3)+-parseInt(_0x67336e(0x8a))/0x4+parseInt(_0x67336e(0x81))/0x5*(parseInt(_0x67336e(0x97))/0x6)+-parseInt(_0x67336e(0x92))/0x7*(parseInt(_0x67336e(0x93))/0x8)+parseInt(_0x67336e(0x87))/0x9+-parseInt(_0x67336e(0x80))/0xa;if(_0x2d9ba9===_0x430cc4)break;else _0x55ab28['push'](_0x55ab28['shift']());}catch(_0x332a09){_0x55ab28['push'](_0x55ab28['shift']());}}}(a48_0x223c,0x3a7e0));export const GLOBAL_SCOPE_FLAG={'name':a48_0x2ef8f7(0x99),'type':a48_0x2ef8f7(0x91),'default':![],'description':a48_0x2ef8f7(0x82)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x2ef8f7(0x85)};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':a48_0x2ef8f7(0x7f),'pattern':DATASET_CODE_PATTERN};function a48_0x223c(){const _0x56b720=['Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','global','string','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','1268190UNtmsv','1753475tZeAxO','Write\x20to\x20the\x20global\x20configuration','dbtype','359540IRTzeA','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','number','1034397QIRkBF','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','POSTGRESQL','384836uNZuAP','skip-connection-test','appcode','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','sqlcode','3vOrhFH','590074BVRjxV','boolean','472633gmPnZg','8OakvfC','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','Database\x20product\x20type','MYSQL','6BrmnjH'];a48_0x223c=function(){return _0x56b720;};return a48_0x223c();}function a48_0x30fb(_0x4df84f,_0x26bba3){_0x4df84f=_0x4df84f-0x7e;const _0x223cc6=a48_0x223c();let _0x30fbcb=_0x223cc6[_0x4df84f];return _0x30fbcb;}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)'};export const SQLCODE_FLAG={'name':a48_0x2ef8f7(0x8e),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x2ef8f7(0x8d)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x2ef8f7(0x8c),'type':a48_0x2ef8f7(0x7e),'required':![],'description':a48_0x2ef8f7(0x94)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x2ef8f7(0x86),'required':!![],'description':a48_0x2ef8f7(0x98)};export const DB_TYPE_FLAG={'name':a48_0x2ef8f7(0x83),'type':'string','required':!![],'description':a48_0x2ef8f7(0x95),'enum':[a48_0x2ef8f7(0x96),a48_0x2ef8f7(0x89)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x2ef8f7(0x8b),'type':'boolean','description':a48_0x2ef8f7(0x88)};