@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.4

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 (356) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/feishu-bind.d.ts +2 -0
  249. package/lib/commands/user-account/feishu-bind.js +1 -0
  250. package/lib/commands/user-account/index.js +1 -1
  251. package/lib/commands/workspace/add.js +1 -1
  252. package/lib/commands/workspace/index.js +1 -1
  253. package/lib/commands/workspace/remove.js +1 -1
  254. package/lib/config/domain-config.js +1 -1
  255. package/lib/config/project-domain-routing.js +1 -1
  256. package/lib/config/region-config.js +1 -1
  257. package/lib/config/schema.js +1 -1
  258. package/lib/constant/cdn.js +1 -1
  259. package/lib/constant/cli.js +1 -1
  260. package/lib/constant/defaults.js +1 -1
  261. package/lib/constant/domain.js +1 -1
  262. package/lib/constant/env.js +1 -1
  263. package/lib/constant/output.js +1 -1
  264. package/lib/constant/paths.js +1 -1
  265. package/lib/constant/region.js +1 -1
  266. package/lib/constant/risk.js +1 -1
  267. package/lib/constant/routing-profile.js +1 -1
  268. package/lib/context/app-resolver.js +1 -1
  269. package/lib/context/auth-resolver.js +1 -1
  270. package/lib/context/config-loader.js +1 -1
  271. package/lib/context.js +1 -1
  272. package/lib/core/alias-resolver.js +1 -1
  273. package/lib/core/api-client.d.ts +2 -0
  274. package/lib/core/api-client.js +1 -1
  275. package/lib/core/bff/config.js +1 -1
  276. package/lib/core/bff/file-system.js +1 -1
  277. package/lib/core/bff/hash.js +1 -1
  278. package/lib/core/bff/hook-directory.js +1 -1
  279. package/lib/core/bff/lock.js +1 -1
  280. package/lib/core/bff/utils.js +1 -1
  281. package/lib/core/cross-db-relation.js +1 -1
  282. package/lib/core/db-resolver.js +1 -1
  283. package/lib/core/flow-config.js +1 -1
  284. package/lib/core/instant-api-policy/config.js +1 -1
  285. package/lib/core/kb-search-client.js +1 -1
  286. package/lib/core/page/file-system.js +1 -1
  287. package/lib/core/page/hash.js +1 -1
  288. package/lib/core/page/lock.js +1 -1
  289. package/lib/core/page/lr-smart-jsx.js +1 -1
  290. package/lib/core/sql-index-auditor.js +1 -1
  291. package/lib/core/sql-sync/config.js +1 -1
  292. package/lib/core/sql-sync/file-system.js +1 -1
  293. package/lib/core/sql-sync/hash.js +1 -1
  294. package/lib/core/sql-sync/lock.js +1 -1
  295. package/lib/core/sql-sync/utils.js +1 -1
  296. package/lib/core/sql-validator.js +1 -1
  297. package/lib/errors.js +1 -1
  298. package/lib/framework/build-all-flags.js +1 -1
  299. package/lib/framework/error-output.js +1 -1
  300. package/lib/framework/explicit-yes.js +1 -1
  301. package/lib/framework/flags.js +1 -1
  302. package/lib/framework/help.js +1 -1
  303. package/lib/framework/index.js +1 -1
  304. package/lib/framework/output.js +1 -1
  305. package/lib/framework/response.js +1 -1
  306. package/lib/framework/runner-alias.js +1 -1
  307. package/lib/framework/runner.js +1 -1
  308. package/lib/framework/schema-export.js +1 -1
  309. package/lib/framework/supported-flags.js +1 -1
  310. package/lib/framework/types.js +1 -1
  311. package/lib/generated/build-info.d.ts +4 -4
  312. package/lib/generated/build-info.js +1 -1
  313. package/lib/generated/official-routing.js +1 -1
  314. package/lib/generated/routing-contract.js +1 -1
  315. package/lib/help.js +1 -1
  316. package/lib/postinstall.js +1 -1
  317. package/lib/runtime/confirmation.js +1 -1
  318. package/lib/runtime/event.js +1 -1
  319. package/lib/runtime/index.js +1 -1
  320. package/lib/runtime/queue.js +1 -1
  321. package/lib/runtime/resolve.js +1 -1
  322. package/lib/skills/builtin-skill.js +1 -1
  323. package/lib/skills/main.js +1 -1
  324. package/lib/skills/npx-skills-add.js +1 -1
  325. package/lib/skills/skill-presence.js +1 -1
  326. package/lib/telemetry/cli-command-trace.js +1 -1
  327. package/lib/telemetry/cli-help-trace.js +1 -1
  328. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  329. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  330. package/lib/telemetry/send-cli-trace-log.js +1 -1
  331. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  332. package/lib/utils/ai_config.js +1 -1
  333. package/lib/utils/apply-jq-filter.js +1 -1
  334. package/lib/utils/cdn-config.js +1 -1
  335. package/lib/utils/check-sdk-version.js +1 -1
  336. package/lib/utils/cli-version-check.js +1 -1
  337. package/lib/utils/cli-version-policy.js +1 -1
  338. package/lib/utils/config.js +1 -1
  339. package/lib/utils/entity-with-id.js +1 -1
  340. package/lib/utils/file-utils.js +1 -1
  341. package/lib/utils/guides-cdn.js +1 -1
  342. package/lib/utils/http-client.js +1 -1
  343. package/lib/utils/is-non-interactive.js +1 -1
  344. package/lib/utils/logger.js +1 -1
  345. package/lib/utils/params.js +1 -1
  346. package/lib/utils/platform.js +1 -1
  347. package/lib/utils/sleep.js +1 -1
  348. package/lib/utils/template-replacer.js +1 -1
  349. package/lib/utils/update-notice.js +1 -1
  350. package/lib/utils/version.js +1 -1
  351. package/lib/utils/with-active-cookie.js +1 -1
  352. package/lib/utils/write-cli-side-channel.js +1 -1
  353. package/package.json +1 -1
  354. package/skills/rabetbase/SKILL.md +3 -2
  355. package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
  356. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a43_0x950a(_0x46094f,_0x5c0f0a){_0x46094f=_0x46094f-0x161;const _0x2cf83c=a43_0x2cf8();let _0x950a9d=_0x2cf83c[_0x46094f];return _0x950a9d;}const a43_0x4f2448=a43_0x950a;(function(_0x2d0c5c,_0x22dcb6){const _0x1f6b3b=a43_0x950a,_0x21f4f9=_0x2d0c5c();while(!![]){try{const _0x3bcf28=-parseInt(_0x1f6b3b(0x182))/0x1+parseInt(_0x1f6b3b(0x1a7))/0x2+parseInt(_0x1f6b3b(0x171))/0x3+-parseInt(_0x1f6b3b(0x1c5))/0x4*(-parseInt(_0x1f6b3b(0x195))/0x5)+-parseInt(_0x1f6b3b(0x19c))/0x6*(-parseInt(_0x1f6b3b(0x1a9))/0x7)+parseInt(_0x1f6b3b(0x162))/0x8+-parseInt(_0x1f6b3b(0x19f))/0x9*(parseInt(_0x1f6b3b(0x1b3))/0xa);if(_0x3bcf28===_0x22dcb6)break;else _0x21f4f9['push'](_0x21f4f9['shift']());}catch(_0x1532fc){_0x21f4f9['push'](_0x21f4f9['shift']());}}}(a43_0x2cf8,0x6e206));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a43_0x4f2448(0x16a),'command':a43_0x4f2448(0x1bf),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':'write','structuredErrors':!![],'flags':[{'name':a43_0x4f2448(0x1c1),'type':'string','description':a43_0x4f2448(0x1bb),'enum':['COMMON','ENDPOINT','HOOK']},{'name':a43_0x4f2448(0x17c),'type':a43_0x4f2448(0x1b6),'description':a43_0x4f2448(0x17e)},{'name':'force','type':a43_0x4f2448(0x1b7),'description':a43_0x4f2448(0x164)}],async 'dryRun'(_0x2b36ad){const _0x23f155=a43_0x4f2448,_0x422fa4=loadBffProjectConfig(_0x2b36ad[_0x23f155(0x18f)]),_0x5a7d5b=await readBffLockFile(_0x422fa4['lockFilePath']),{appLock:_0x21e258}=ensureLockScope(_0x5a7d5b??createEmptyBffLock(),_0x2b36ad['appCode'],_0x422fa4[_0x23f155(0x188)],'push'),_0x542718=await getTargetFunctions(_0x422fa4,_0x2b36ad),_0x1291b2=_0x542718[_0x23f155(0x16e)](_0x45d124=>_0x45d124[_0x23f155(0x1c1)]===_0x23f155(0x1aa))?await scanLocalBffFunctions(_0x422fa4,_0x23f155(0x1aa)):_0x542718,_0x4d57cb=await buildHookMaps(_0x2b36ad[_0x23f155(0x18f)],_0x2b36ad[_0x23f155(0x194)],_0x1291b2,_0x21e258,_0x2b36ad[_0x23f155(0x18a)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x19d)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x176)]),_0x2aea38=_0x2b36ad[_0x23f155(0x167)](_0x23f155(0x1ca)),_0x8407be=[];for(const _0x481ba9 of _0x542718){const _0x44aab7=await computeFileHash(_0x481ba9[_0x23f155(0x1a0)]),_0x47380a=_0x21e258['functions'][_0x481ba9[_0x23f155(0x1bd)]],_0x3d0487=!!_0x47380a&&_0x47380a[_0x23f155(0x1c6)]===_0x44aab7,_0xd5393f=_0x4d57cb[_0x23f155(0x1a4)][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)]),_0x3949cb=!!_0x47380a?.[_0x23f155(0x16d)]&&_0x47380a[_0x23f155(0x1ae)]==null&&(_0x2aea38||!_0x3d0487),_0x4fe5ca=_0x3949cb?missingRemoteVersionConflict(_0x481ba9,_0x47380a):undefined,_0x17c84c=_0x4d57cb[_0x23f155(0x165)]['has'](_0x481ba9[_0x23f155(0x1bd)])?_0x23f155(0x1c7):!_0x2aea38&&_0x3d0487?_0x23f155(0x172):_0x4fe5ca?_0x23f155(0x1a2):_0x23f155(0x17f);_0x8407be[_0x23f155(0x1bf)]({'lockKey':_0x481ba9[_0x23f155(0x1bd)],'filePath':_0x481ba9[_0x23f155(0x1a0)],'remoteId':_0x47380a?.[_0x23f155(0x16d)]??null,'mode':_0x47380a?.['remoteId']?_0x23f155(0x1bc):'create','status':_0x17c84c,..._0x4d57cb[_0x23f155(0x165)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'error':_0x4d57cb['failures'][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)])}:{},..._0x4fe5ca?{'conflict':_0x4fe5ca}:{},..._0x4d57cb[_0x23f155(0x17a)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'datasetCode':_0x47380a?.[_0x23f155(0x1b0)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x481ba9[_0x23f155(0x1bd)])]}:{},..._0xd5393f?{'alias':_0xd5393f[_0x23f155(0x1ad)]??null,'datasetCode':_0xd5393f[_0x23f155(0x1b0)],'operationType':_0x481ba9[_0x23f155(0x18e)],'functionNode':_0x481ba9[_0x23f155(0x191)],'warnings':_0xd5393f[_0x23f155(0x1a1)]}:{}});}return{'method':_0x23f155(0x19b),'url':_0x23f155(0x1ab),'body':{'appCode':_0x2b36ad['appCode'],'force':_0x2aea38,'files':_0x8407be,'cacheClearAtRuntime':_0x8407be['some'](_0xeffaaa=>_0xeffaaa[_0x23f155(0x1b1)]===_0x23f155(0x17f)),'cacheClearAtRuntimeTimes':_0x8407be[_0x23f155(0x16e)](_0x4f2065=>_0x4f2065[_0x23f155(0x1b1)]===_0x23f155(0x17f))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x23f155(0x180)+_0x8407be['length']+_0x23f155(0x178)};},async 'execute'(_0xa2adb4){const _0x42bbe9=a43_0x4f2448,_0xb86725=loadBffProjectConfig(_0xa2adb4[_0x42bbe9(0x18f)]),_0x227b6b=await readBffLockFile(_0xb86725['lockFilePath']),{lockData:_0x19b868,appLock:_0x493890}=ensureLockScope(_0x227b6b??createEmptyBffLock(),_0xa2adb4[_0x42bbe9(0x18f)],_0xb86725[_0x42bbe9(0x188)],_0x42bbe9(0x1bf)),_0x46932f=await getTargetFunctions(_0xb86725,_0xa2adb4);if(_0x46932f['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x42bbe9(0x193)};const _0xcb4b0e=_0xa2adb4['bool'](_0x42bbe9(0x1ca)),_0x43eda9=JSON['parse'](JSON[_0x42bbe9(0x189)](_0x19b868)),_0x14b763=_0x43eda9[_0x42bbe9(0x185)][_0xa2adb4[_0x42bbe9(0x18f)]];if(!_0x14b763)throw new Error(_0x42bbe9(0x1be)+_0xa2adb4[_0x42bbe9(0x18f)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x198614=_0x46932f[_0x42bbe9(0x16e)](_0x142a28=>_0x142a28[_0x42bbe9(0x1c1)]===_0x42bbe9(0x1aa))?await scanLocalBffFunctions(_0xb86725,_0x42bbe9(0x1aa)):_0x46932f,_0x14153f=await buildHookMaps(_0xa2adb4['appCode'],_0xa2adb4[_0x42bbe9(0x194)],_0x198614,_0x14b763,_0xa2adb4['selectedAppName']||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x19d)]||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x176)]),_0x27d517=[],_0x304e7f=[],_0x5af3fc=[],_0x2f9b4f=[];for(const _0x3b9580 of _0x46932f){const _0x2692cb=_0x14153f[_0x42bbe9(0x165)]['get'](_0x3b9580[_0x42bbe9(0x1bd)]);if(_0x2692cb){_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580['lockKey'],'error':_0x2692cb});continue;}const _0x3ed7ef=await computeFileHash(_0x3b9580['filePath']),_0x1a540a=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];if(!_0xcb4b0e&&_0x1a540a&&_0x1a540a[_0x42bbe9(0x1c6)]===_0x3ed7ef){_0x304e7f['push']({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'reason':_0x42bbe9(0x172)});continue;}if(_0x1a540a?.['remoteId']&&_0x1a540a['version']==null){_0x5af3fc[_0x42bbe9(0x1bf)](missingRemoteVersionConflict(_0x3b9580,_0x1a540a));continue;}try{await uploadSingleFunction(_0xa2adb4[_0x42bbe9(0x18f)],_0x3b9580,_0x14b763,_0x14153f);const _0x58feb0=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];_0x27d517[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'remoteId':_0x58feb0?.[_0x42bbe9(0x16d)]??0x0});}catch(_0x315484){const _0x34da75=remoteVersionChangedConflict(_0x3b9580,_0x1a540a,_0x315484);if(_0x34da75){_0x5af3fc[_0x42bbe9(0x1bf)](_0x34da75);continue;}_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'error':_0x315484 instanceof Error?_0x315484[_0x42bbe9(0x183)]:String(_0x315484)});}}_0x14b763[_0x42bbe9(0x174)]=new Date()['toISOString'](),await writeBffLockFile(_0xb86725[_0x42bbe9(0x1a6)],_0x43eda9),await waitForUploadedLockEntries(_0xb86725[_0x42bbe9(0x1a6)],_0xa2adb4['appCode'],_0x27d517['map'](_0x59ebd5=>_0x59ebd5[_0x42bbe9(0x1bd)]));let _0x5131bd={'attempted':![],'cleared':![]};if(_0x27d517[_0x42bbe9(0x16c)]>0x0)try{let _0x28c192='';for(let _0x39969f=0x0;_0x39969f<CACHE_CLEAR_ATTEMPTS;_0x39969f+=0x1){_0x28c192=await clearBffScriptCache(),_0x39969f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5131bd={'attempted':!![],'cleared':!![],'message':_0x28c192||_0x42bbe9(0x16f)};}catch(_0x43763a){_0x5131bd={'attempted':!![],'cleared':![],'error':_0x43763a instanceof Error?_0x43763a['message']:String(_0x43763a)};}const _0x3c74ba=_0x2f9b4f[_0x42bbe9(0x16c)]===0x0&&(_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']:!![]),_0x46154a=_0x3c74ba,_0x5ac130=_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']?'runtime\x20cache\x20cleared':_0x42bbe9(0x1a3):'runtime\x20cache\x20not\x20needed';return{'ok':_0x46154a,'data':{'uploaded':_0x27d517,'skipped':_0x304e7f,'conflicts':_0x5af3fc,'failed':_0x2f9b4f,'cacheClear':_0x5131bd,'warnings':[...[..._0x14153f[_0x42bbe9(0x1a4)]['values']()][_0x42bbe9(0x19a)](_0x52071c=>_0x52071c[_0x42bbe9(0x1a1)]),...[..._0x14153f[_0x42bbe9(0x17a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x27d517[_0x42bbe9(0x16c)],_0x304e7f[_0x42bbe9(0x16c)],_0x5af3fc[_0x42bbe9(0x16c)],_0x2f9b4f[_0x42bbe9(0x16c)],_0x5ac130)};}};function missingRemoteVersionConflict(_0xa80c67,_0x4f50e1){const _0x3a2a8d=a43_0x4f2448;return remoteVersionConflict(_0xa80c67,_0x4f50e1,'BFF_REMOTE_VERSION_MISSING',_0x3a2a8d(0x1af));}function remoteVersionChangedConflict(_0x248eae,_0x3c73f8,_0x323108){const _0x559e3c=a43_0x4f2448;if(!_0x3c73f8?.[_0x559e3c(0x16d)]||_0x3c73f8[_0x559e3c(0x1ae)]==null||!isRemoteVersionConflict(_0x323108))return undefined;return remoteVersionConflict(_0x248eae,_0x3c73f8,_0x559e3c(0x1b4),_0x559e3c(0x166));}function a43_0x2cf8(){const _0x135702=['\x20conflict','alias','version','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','datasetCode','status','\x20uploaded','2390mCUeso','BFF_REMOTE_VERSION_CHANGED','validation','string','boolean','attempted','every','startsWith','Push\x20only\x20this\x20script\x20type','update','lockKey','Lock\x20scope\x20for\x20app\x20\x22','push','description','type','afterScriptId','str','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','196204CgCTyq','hash','failed','filter','requires','force','\x20bff\x20detail\x20--id\x20','script','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','2988248xWgcWh','join','Force\x20push\x20ignoring\x20hash\x20protection','failures','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','bool','review_remote_and_merge','map','bff','HOOK_DATASET_NOT_FOUND:','length','remoteId','some','Runtime\x20script\x20cache\x20cleared.','set','1165863GewnJX','unchanged','Incomplete\x20HOOK\x20path:\x20','lastSync','mergedCli','defaultApp','beforeScriptId','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','add','existingHooks','Local\x20function\x20not\x20found:\x20','name','after','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','would_push','Would\x20inspect\x20','Push\x20complete:\x20','276550grSkdt','message','profileName','apps','get','has','scriptsRoot','stringify','selectedAppName','delete','\x20--format\x20compress','require','operationType','appCode','\x20skipped','functionNode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','No\x20local\x20Backend\x20Function\x20scripts\x20found.','apiDir','35iUYoca','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','test','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20failed','flatMap','POST','18HnwROJ','currentApp','utf8','38853BvTtri','filePath','warnings','conflict','runtime\x20cache\x20clear\x20failed','resolutions','functions','lockFilePath','936034hsLhwa','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','433685GRHiUN','HOOK','/api/management/library/scripts/save'];a43_0x2cf8=function(){return _0x135702;};return a43_0x2cf8();}function remoteVersionConflict(_0x2733b3,_0x574545,_0x179f3f,_0x2becf4){const _0x2a1420=a43_0x4f2448;return{'code':_0x179f3f,'lockKey':_0x2733b3[_0x2a1420(0x1bd)],'filePath':_0x2733b3[_0x2a1420(0x1a0)],'remoteId':_0x574545[_0x2a1420(0x16d)],..._0x574545[_0x2a1420(0x1ae)]!=null?{'expectedVersion':_0x574545[_0x2a1420(0x1ae)]}:{},'message':_0x2becf4,'nextAction':{'action':_0x2a1420(0x168),'command':CLI_BIN_NAME+_0x2a1420(0x1cb)+_0x574545['remoteId']+_0x2a1420(0x18c),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function isRemoteVersionConflict(_0x1c617e){const _0x3b991a=a43_0x4f2448,_0x23edf8=_0x1c617e instanceof Error?_0x1c617e['message']:String(_0x1c617e),_0x91acd5=getPlatformErrorCode(_0x1c617e)??'';return[_0x23edf8,_0x91acd5][_0x3b991a(0x16e)](_0xc1b544=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x3b991a(0x197)](_0xc1b544));}function formatPushMessage(_0x15a766,_0x58d5df,_0x48333a,_0x54c0ad,_0x1e8c94){const _0x33d1c9=a43_0x4f2448,_0x252d13=[_0x33d1c9(0x181)+_0x15a766+_0x33d1c9(0x1b2),_0x58d5df+_0x33d1c9(0x190)];_0x48333a>0x0&&_0x252d13[_0x33d1c9(0x1bf)](_0x48333a+_0x33d1c9(0x1ac)+(_0x48333a===0x1?'':'s')+'\x20'+(_0x48333a===0x1?_0x33d1c9(0x1c9):_0x33d1c9(0x18d))+'\x20resolution');if(_0x54c0ad>0x0)_0x252d13['push'](_0x54c0ad+_0x33d1c9(0x199));return _0x252d13[_0x33d1c9(0x1bf)](_0x1e8c94),_0x252d13[_0x33d1c9(0x163)](',\x20');}async function getTargetFunctions(_0x5db66a,_0x39e716){const _0x139076=a43_0x4f2448,_0x3d8443=_0x39e716[_0x139076(0x1c3)](_0x139076(0x1c1)),_0x429b67=_0x39e716['str'](_0x139076(0x17c)),_0x51e4bd=normalizeBffType(_0x3d8443)??undefined;if(_0x429b67&&!_0x51e4bd)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x1a8));const _0xdab12d=await scanLocalBffFunctions(_0x5db66a,_0x51e4bd);if(_0x429b67){const _0x5f3531=_0xdab12d[_0x139076(0x1c8)](_0x23baa5=>_0x23baa5['name']===_0x429b67);if(_0x5f3531[_0x139076(0x16c)]===0x0)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x17b)+_0x51e4bd+'/'+_0x429b67);return _0x5f3531;}return _0xdab12d;}function existingHookWarning(_0x16c182){const _0x570359=a43_0x4f2448;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x16c182,'message':_0x570359(0x198)};}async function buildHookMaps(_0x29ab11,_0x154c86,_0x348264,_0x36db32,_0x1892b9){const _0x8073c5=a43_0x4f2448,_0x5c15ae=_0x348264[_0x8073c5(0x16e)](_0x37ddff=>_0x37ddff['type']===_0x8073c5(0x1aa));if(!_0x5c15ae)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3d2fbb=resolveApiModelSource(_0x154c86,_0x29ab11,_0x1892b9),_0x4ffb24=loadAliasMap(_0x154c86,undefined,_0x3d2fbb['filePath'],_0x3d2fbb[_0x8073c5(0x184)]);assertUnambiguousHookAliases(_0x4ffb24);const _0x17a007=[..._0x4ffb24[_0x8073c5(0x169)](_0x4c185b=>[_0x4c185b[_0x8073c5(0x1ad)],_0x4c185b['datasetCode']]),...trackedHookDirectoryMappings(_0x36db32)['map'](_0x2fac4f=>[_0x2fac4f[_0x8073c5(0x1ad)],_0x2fac4f['datasetCode']])],_0x490e16=await listDatasets(_0x29ab11);assertUnambiguousHookDirectoryMappings(_0x17a007['map'](([_0x35fe97,_0x24bbde])=>({'alias':_0x35fe97,'datasetCode':_0x24bbde})));const _0x513554=buildHookDirectoryIndexes(_0x490e16,_0x17a007),_0x1b6033=new Map(),_0xfad8ad=preflightPushHookDirectories(_0x348264,_0x36db32,_0x513554,_0x1b6033),_0x14bd67=new Set(),_0x27592d=_0x348264[_0x8073c5(0x1c8)](_0x179448=>_0x1b6033[_0x8073c5(0x186)](_0x179448[_0x8073c5(0x1bd)])?.[_0x8073c5(0x1ba)](_0x8073c5(0x16b))&&_0x36db32['functions'][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x16d)]&&_0x36db32[_0x8073c5(0x1a5)][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x1b0)]);if(_0x27592d['length']>0x0){let _0x312fae;try{_0x312fae=await getBffScriptStatistics(_0x29ab11);}catch(_0x2cbc15){for(const _0x208459 of _0x27592d)_0x1b6033[_0x8073c5(0x170)](_0x208459[_0x8073c5(0x1bd)],_0x8073c5(0x1c4)+(_0x2cbc15 instanceof Error?_0x2cbc15['message']:String(_0x2cbc15)));return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}for(const _0x2b8a83 of _0x27592d){const _0x3ff00e=_0x36db32['functions'][_0x2b8a83[_0x8073c5(0x1bd)]];try{const _0x39ab95=new Set(_0x348264[_0x8073c5(0x1c8)](_0x4c2c9d=>_0x4c2c9d[_0x8073c5(0x1c1)]===_0x8073c5(0x1aa)&&_0x36db32[_0x8073c5(0x1a5)][_0x4c2c9d[_0x8073c5(0x1bd)]]?.['datasetCode']===_0x3ff00e['datasetCode'])[_0x8073c5(0x169)](_0x3cd37a=>_0x3cd37a[_0x8073c5(0x1ad)]));if(_0x39ab95['size']>0x1)throw CliErrors['validation'](_0x8073c5(0x161));const _0x2604fb=_0x312fae['flatMap'](_0x19d8ac=>[{'datasetCode':_0x19d8ac['datasetCode'],'operationType':snakeToCamel(_0x19d8ac['operationType']),'functionNode':'before','id':_0x19d8ac[_0x8073c5(0x177)]},{'datasetCode':_0x19d8ac[_0x8073c5(0x1b0)],'operationType':snakeToCamel(_0x19d8ac[_0x8073c5(0x18e)]),'functionNode':_0x8073c5(0x17d),'id':_0x19d8ac[_0x8073c5(0x1c2)]}])[_0x8073c5(0x1c8)](_0x5d6bd5=>_0x5d6bd5['id']===_0x3ff00e[_0x8073c5(0x16d)]),_0x55de8f=await getBffScriptInfo(_0x3ff00e[_0x8073c5(0x16d)]);if(_0x55de8f['id']!==_0x3ff00e[_0x8073c5(0x16d)]||_0x55de8f[_0x8073c5(0x18f)]!==_0x29ab11||_0x55de8f['scriptType']!==_0x8073c5(0x1aa)||_0x55de8f['functionName']!==_0x2b8a83[_0x8073c5(0x17c)]||_0x3ff00e[_0x8073c5(0x1ae)]==null||_0x55de8f[_0x8073c5(0x1ae)]!==_0x3ff00e[_0x8073c5(0x1ae)]||_0x2604fb[_0x8073c5(0x16c)]!==0x1||_0x2604fb[0x0][_0x8073c5(0x1b0)]!==_0x3ff00e[_0x8073c5(0x1b0)]||_0x2604fb[0x0][_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x2604fb[0x0]['functionNode']!==_0x2b8a83[_0x8073c5(0x191)]||_0x3ff00e[_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x3ff00e[_0x8073c5(0x191)]!==_0x2b8a83[_0x8073c5(0x191)])throw CliErrors[_0x8073c5(0x1b5)](_0x8073c5(0x196));_0x14bd67[_0x8073c5(0x179)](_0x2b8a83[_0x8073c5(0x1bd)]),_0x1b6033[_0x8073c5(0x18b)](_0x2b8a83[_0x8073c5(0x1bd)]);}catch(_0x28a51e){_0x1b6033[_0x8073c5(0x170)](_0x2b8a83['lockKey'],_0x28a51e instanceof Error?_0x28a51e['message']:String(_0x28a51e));}}}return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}async function uploadSingleFunction(_0x48a79e,_0x29b908,_0x4c7caa,_0x194b00){const _0x334703=a43_0x4f2448,_0x224da8=await readFile(_0x29b908[_0x334703(0x1a0)],_0x334703(0x19e)),_0x1172ca=await computeFileHash(_0x29b908[_0x334703(0x1a0)]),_0x2b316e=_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]];if(_0x2b316e?.['remoteId']&&_0x2b316e[_0x334703(0x1ae)]==null)throw CliErrors[_0x334703(0x1b5)](_0x29b908['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x26ffb2=extractScriptDescription(_0x224da8);if(!_0x26ffb2&&_0x2b316e?.['remoteId']){const _0x4112e1=await getBffScriptInfo(_0x2b316e['remoteId']);_0x26ffb2=_0x4112e1[_0x334703(0x1c0)]||undefined;}const _0x1af32c={'appCode':_0x48a79e,'functionName':_0x29b908[_0x334703(0x17c)],'scriptType':_0x29b908[_0x334703(0x1c1)],'scriptContent':_0x224da8};if(_0x2b316e?.[_0x334703(0x16d)])_0x1af32c['id']=_0x2b316e['remoteId'];if(_0x2b316e?.[_0x334703(0x1ae)]!=null)_0x1af32c['version']=_0x2b316e['version'];if(_0x26ffb2)_0x1af32c['description']=_0x26ffb2;if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x42b9d8=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908['lockKey']);if(!_0x42b9d8&&!_0x194b00[_0x334703(0x17a)]['has'](_0x29b908[_0x334703(0x1bd)])||!_0x29b908[_0x334703(0x18e)]||!_0x29b908[_0x334703(0x191)])throw CliErrors[_0x334703(0x1b5)](_0x334703(0x173)+_0x29b908[_0x334703(0x1bd)]);_0x42b9d8&&(_0x1af32c['datasetId']=_0x42b9d8['dataset']['id'],_0x1af32c[_0x334703(0x18e)]=_0x29b908[_0x334703(0x18e)]),_0x1af32c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}const _0x6aa4b9=await saveBffScript(_0x1af32c),_0xf3c576=_0x6aa4b9['id'],_0x4f656d=_0x6aa4b9[_0x334703(0x1cc)]??await getBffScriptInfo(_0xf3c576),_0x5a788c={'hash':_0x1172ca,'remoteId':_0xf3c576,'version':_0x4f656d['version']};if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x4f54a2=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908[_0x334703(0x1bd)]);if(!_0x4f54a2){_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]={..._0x2b316e,..._0x5a788c};return;}_0x5a788c[_0x334703(0x1ad)]=_0x4f54a2[_0x334703(0x1ad)]??_0x2b316e?.[_0x334703(0x1ad)],_0x5a788c[_0x334703(0x1b0)]=_0x4f54a2[_0x334703(0x1b0)],_0x5a788c['operationType']=_0x29b908[_0x334703(0x18e)],_0x5a788c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]=_0x5a788c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5bcc3b,_0xcc6c3d,_0x237ef8){const _0x51389f=a43_0x4f2448;if(_0x237ef8[_0x51389f(0x16c)]===0x0)return;for(let _0x44c83d=0x0;_0x44c83d<LOCK_SETTLE_RETRY_COUNT;_0x44c83d+=0x1){const _0x25a808=await readBffLockFile(_0x5bcc3b),_0x21c886=_0x25a808?.[_0x51389f(0x185)]?.[_0xcc6c3d]?.['functions']??{},_0x4af4ac=_0x237ef8[_0x51389f(0x1b9)](_0x49c00d=>!!_0x21c886[_0x49c00d]?.[_0x51389f(0x16d)]);if(_0x4af4ac)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51389f(0x192)+_0x237ef8['join'](',\x20')+'.');}
1
+ const a43_0x39e83d=a43_0x40af;(function(_0x40d412,_0x104a4f){const _0x478f01=a43_0x40af,_0x270c24=_0x40d412();while(!![]){try{const _0x481475=parseInt(_0x478f01(0xa7))/0x1*(-parseInt(_0x478f01(0xdd))/0x2)+parseInt(_0x478f01(0xd1))/0x3*(parseInt(_0x478f01(0xa8))/0x4)+-parseInt(_0x478f01(0xb2))/0x5*(parseInt(_0x478f01(0xaf))/0x6)+-parseInt(_0x478f01(0xbc))/0x7+-parseInt(_0x478f01(0xd0))/0x8*(-parseInt(_0x478f01(0x9b))/0x9)+parseInt(_0x478f01(0x81))/0xa*(-parseInt(_0x478f01(0x7c))/0xb)+parseInt(_0x478f01(0x8c))/0xc;if(_0x481475===_0x104a4f)break;else _0x270c24['push'](_0x270c24['shift']());}catch(_0x225e29){_0x270c24['push'](_0x270c24['shift']());}}}(a43_0x2e14,0x84418));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a43_0x40af(_0x3f6c8b,_0x36751a){_0x3f6c8b=_0x3f6c8b-0x6d;const _0x2e1401=a43_0x2e14();let _0x40af15=_0x2e1401[_0x3f6c8b];return _0x40af15;}export const bffPush={'service':a43_0x39e83d(0x74),'command':a43_0x39e83d(0xd4),'description':a43_0x39e83d(0x98),'risk':a43_0x39e83d(0x93),'structuredErrors':!![],'flags':[{'name':'type','type':a43_0x39e83d(0x95),'description':a43_0x39e83d(0xcf),'enum':[a43_0x39e83d(0x6d),a43_0x39e83d(0x70),a43_0x39e83d(0xd6)]},{'name':a43_0x39e83d(0x79),'type':'string','description':a43_0x39e83d(0x84)},{'name':a43_0x39e83d(0xae),'type':a43_0x39e83d(0xb9),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x42b147){const _0x3c6247=a43_0x39e83d,_0x4e60f1=loadBffProjectConfig(_0x42b147[_0x3c6247(0x6e)]),_0x5c91b6=await readBffLockFile(_0x4e60f1[_0x3c6247(0xd5)]),{appLock:_0x1a903f}=ensureLockScope(_0x5c91b6??createEmptyBffLock(),_0x42b147[_0x3c6247(0x6e)],_0x4e60f1[_0x3c6247(0xa3)],_0x3c6247(0xd4)),_0x281c33=await getTargetFunctions(_0x4e60f1,_0x42b147),_0x3fa55d=_0x281c33['some'](_0x5a1b5b=>_0x5a1b5b['type']===_0x3c6247(0xd6))?await scanLocalBffFunctions(_0x4e60f1,_0x3c6247(0xd6)):_0x281c33,_0x3651fe=await buildHookMaps(_0x42b147[_0x3c6247(0x6e)],_0x42b147[_0x3c6247(0x77)],_0x3fa55d,_0x1a903f,_0x42b147[_0x3c6247(0xb5)]||_0x42b147[_0x3c6247(0xa5)]?.[_0x3c6247(0xb6)]||_0x42b147[_0x3c6247(0xa5)]?.['defaultApp']),_0x32402e=_0x42b147[_0x3c6247(0x7b)](_0x3c6247(0xae)),_0x5c4724=[];for(const _0xf0a69b of _0x281c33){const _0x119f74=await computeFileHash(_0xf0a69b[_0x3c6247(0x8a)]),_0x4ddf67=_0x1a903f[_0x3c6247(0xa1)][_0xf0a69b['lockKey']],_0x424aed=!!_0x4ddf67&&_0x4ddf67[_0x3c6247(0xaa)]===_0x119f74,_0x142adc=_0x3651fe['resolutions'][_0x3c6247(0xce)](_0xf0a69b[_0x3c6247(0x9d)]),_0x2299ba=!!_0x4ddf67?.['remoteId']&&_0x4ddf67[_0x3c6247(0x8b)]==null&&(_0x32402e||!_0x424aed),_0x67c35e=_0x2299ba?missingRemoteVersionConflict(_0xf0a69b,_0x4ddf67):undefined,_0x375578=_0x3651fe[_0x3c6247(0x9a)][_0x3c6247(0xbf)](_0xf0a69b[_0x3c6247(0x9d)])?_0x3c6247(0x86):!_0x32402e&&_0x424aed?_0x3c6247(0x91):_0x67c35e?_0x3c6247(0xc8):_0x3c6247(0xb1);_0x5c4724['push']({'lockKey':_0xf0a69b[_0x3c6247(0x9d)],'filePath':_0xf0a69b[_0x3c6247(0x8a)],'remoteId':_0x4ddf67?.[_0x3c6247(0xda)]??null,'mode':_0x4ddf67?.['remoteId']?_0x3c6247(0xac):_0x3c6247(0xdb),'status':_0x375578,..._0x3651fe[_0x3c6247(0x9a)][_0x3c6247(0xbf)](_0xf0a69b[_0x3c6247(0x9d)])?{'error':_0x3651fe[_0x3c6247(0x9a)][_0x3c6247(0xce)](_0xf0a69b['lockKey'])}:{},..._0x67c35e?{'conflict':_0x67c35e}:{},..._0x3651fe[_0x3c6247(0x78)][_0x3c6247(0xbf)](_0xf0a69b[_0x3c6247(0x9d)])?{'datasetCode':_0x4ddf67?.[_0x3c6247(0x96)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0xf0a69b[_0x3c6247(0x9d)])]}:{},..._0x142adc?{'alias':_0x142adc[_0x3c6247(0x9e)]??null,'datasetCode':_0x142adc[_0x3c6247(0x96)],'operationType':_0xf0a69b[_0x3c6247(0xe0)],'functionNode':_0xf0a69b['functionNode'],'warnings':_0x142adc[_0x3c6247(0xbe)]}:{}});}return{'method':_0x3c6247(0x8d),'url':_0x3c6247(0x7d),'body':{'appCode':_0x42b147['appCode'],'force':_0x32402e,'files':_0x5c4724,'cacheClearAtRuntime':_0x5c4724[_0x3c6247(0xdf)](_0x5ea0f0=>_0x5ea0f0[_0x3c6247(0xd2)]===_0x3c6247(0xb1)),'cacheClearAtRuntimeTimes':_0x5c4724[_0x3c6247(0xdf)](_0x1b4544=>_0x1b4544['status']===_0x3c6247(0xb1))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x5c4724[_0x3c6247(0x87)]+_0x3c6247(0xc4)};},async 'execute'(_0x68248d){const _0xbd88ea=a43_0x39e83d,_0x158897=loadBffProjectConfig(_0x68248d[_0xbd88ea(0x6e)]),_0x5d1b93=await readBffLockFile(_0x158897[_0xbd88ea(0xd5)]),{lockData:_0xd82a52,appLock:_0x34d265}=ensureLockScope(_0x5d1b93??createEmptyBffLock(),_0x68248d[_0xbd88ea(0x6e)],_0x158897[_0xbd88ea(0xa3)],_0xbd88ea(0xd4)),_0x223342=await getTargetFunctions(_0x158897,_0x68248d);if(_0x223342[_0xbd88ea(0x87)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0xbd88ea(0xd7)};const _0x1f4437=_0x68248d[_0xbd88ea(0x7b)]('force'),_0x3b2956=JSON[_0xbd88ea(0x99)](JSON[_0xbd88ea(0xd3)](_0xd82a52)),_0x4eeb4d=_0x3b2956['apps'][_0x68248d['appCode']];if(!_0x4eeb4d)throw new Error(_0xbd88ea(0xd8)+_0x68248d[_0xbd88ea(0x6e)]+_0xbd88ea(0x75));const _0xdb6c83=_0x223342['some'](_0x56b97f=>_0x56b97f['type']==='HOOK')?await scanLocalBffFunctions(_0x158897,_0xbd88ea(0xd6)):_0x223342,_0x3dc69e=await buildHookMaps(_0x68248d[_0xbd88ea(0x6e)],_0x68248d[_0xbd88ea(0x77)],_0xdb6c83,_0x4eeb4d,_0x68248d[_0xbd88ea(0xb5)]||_0x68248d[_0xbd88ea(0xa5)]?.[_0xbd88ea(0xb6)]||_0x68248d['mergedCli']?.[_0xbd88ea(0xa4)]),_0xd5c7b7=[],_0x2ce356=[],_0xe9c4ee=[],_0x1f5855=[];for(const _0x1b494c of _0x223342){const _0x5b2cb8=_0x3dc69e['failures']['get'](_0x1b494c['lockKey']);if(_0x5b2cb8){_0x1f5855[_0xbd88ea(0xd4)]({'lockKey':_0x1b494c[_0xbd88ea(0x9d)],'error':_0x5b2cb8});continue;}const _0x3e639b=await computeFileHash(_0x1b494c[_0xbd88ea(0x8a)]),_0x150975=_0x4eeb4d[_0xbd88ea(0xa1)][_0x1b494c[_0xbd88ea(0x9d)]];if(!_0x1f4437&&_0x150975&&_0x150975[_0xbd88ea(0xaa)]===_0x3e639b){_0x2ce356[_0xbd88ea(0xd4)]({'lockKey':_0x1b494c[_0xbd88ea(0x9d)],'reason':_0xbd88ea(0x91)});continue;}if(_0x150975?.['remoteId']&&_0x150975['version']==null){_0xe9c4ee[_0xbd88ea(0xd4)](missingRemoteVersionConflict(_0x1b494c,_0x150975));continue;}try{await uploadSingleFunction(_0x68248d[_0xbd88ea(0x6e)],_0x1b494c,_0x4eeb4d,_0x3dc69e);const _0x178b5e=_0x4eeb4d[_0xbd88ea(0xa1)][_0x1b494c[_0xbd88ea(0x9d)]];_0xd5c7b7['push']({'lockKey':_0x1b494c[_0xbd88ea(0x9d)],'remoteId':_0x178b5e?.[_0xbd88ea(0xda)]??0x0});}catch(_0x18759d){const _0x5bf909=remoteVersionChangedConflict(_0x1b494c,_0x150975,_0x18759d);if(_0x5bf909){_0xe9c4ee['push'](_0x5bf909);continue;}_0x1f5855[_0xbd88ea(0xd4)]({'lockKey':_0x1b494c['lockKey'],'error':_0x18759d instanceof Error?_0x18759d[_0xbd88ea(0xb0)]:String(_0x18759d)});}}_0x4eeb4d['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x158897[_0xbd88ea(0xd5)],_0x3b2956),await waitForUploadedLockEntries(_0x158897[_0xbd88ea(0xd5)],_0x68248d[_0xbd88ea(0x6e)],_0xd5c7b7[_0xbd88ea(0x94)](_0x304f6a=>_0x304f6a[_0xbd88ea(0x9d)]));let _0x5371ae={'attempted':![],'cleared':![]};if(_0xd5c7b7[_0xbd88ea(0x87)]>0x0)try{let _0x4722e3='';for(let _0x4f424a=0x0;_0x4f424a<CACHE_CLEAR_ATTEMPTS;_0x4f424a+=0x1){_0x4722e3=await clearBffScriptCache(),_0x4f424a<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5371ae={'attempted':!![],'cleared':!![],'message':_0x4722e3||_0xbd88ea(0xc3)};}catch(_0xbfacde){_0x5371ae={'attempted':!![],'cleared':![],'error':_0xbfacde instanceof Error?_0xbfacde[_0xbd88ea(0xb0)]:String(_0xbfacde)};}const _0x327dac=_0x1f5855[_0xbd88ea(0x87)]===0x0&&(_0x5371ae[_0xbd88ea(0xc7)]?_0x5371ae[_0xbd88ea(0xcd)]:!![]),_0x5077d8=_0x327dac,_0x446bbf=_0x5371ae[_0xbd88ea(0xc7)]?_0x5371ae['cleared']?'runtime\x20cache\x20cleared':_0xbd88ea(0x89):_0xbd88ea(0x6f);return{'ok':_0x5077d8,'data':{'uploaded':_0xd5c7b7,'skipped':_0x2ce356,'conflicts':_0xe9c4ee,'failed':_0x1f5855,'cacheClear':_0x5371ae,'warnings':[...[..._0x3dc69e[_0xbd88ea(0x7a)][_0xbd88ea(0x76)]()][_0xbd88ea(0x73)](_0x1786bf=>_0x1786bf[_0xbd88ea(0xbe)]),...[..._0x3dc69e[_0xbd88ea(0x78)]][_0xbd88ea(0x94)](existingHookWarning)]},'message':formatPushMessage(_0xd5c7b7[_0xbd88ea(0x87)],_0x2ce356[_0xbd88ea(0x87)],_0xe9c4ee[_0xbd88ea(0x87)],_0x1f5855[_0xbd88ea(0x87)],_0x446bbf)};}};function missingRemoteVersionConflict(_0x4f92b1,_0x2c75a2){const _0x541f75=a43_0x39e83d;return remoteVersionConflict(_0x4f92b1,_0x2c75a2,'BFF_REMOTE_VERSION_MISSING',_0x541f75(0xab));}function remoteVersionChangedConflict(_0x42278b,_0x55d21f,_0x2da249){const _0x520466=a43_0x39e83d;if(!_0x55d21f?.[_0x520466(0xda)]||_0x55d21f['version']==null||!isRemoteVersionConflict(_0x2da249))return undefined;return remoteVersionConflict(_0x42278b,_0x55d21f,'BFF_REMOTE_VERSION_CHANGED',_0x520466(0xcb));}function remoteVersionConflict(_0x2f3c70,_0x3185e4,_0x1e34e0,_0x85b2a9){const _0x2d282a=a43_0x39e83d;return{'code':_0x1e34e0,'lockKey':_0x2f3c70[_0x2d282a(0x9d)],'filePath':_0x2f3c70[_0x2d282a(0x8a)],'remoteId':_0x3185e4['remoteId'],..._0x3185e4[_0x2d282a(0x8b)]!=null?{'expectedVersion':_0x3185e4[_0x2d282a(0x8b)]}:{},'message':_0x85b2a9,'nextAction':{'action':_0x2d282a(0x82),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x3185e4[_0x2d282a(0xda)]+_0x2d282a(0xde),'requiresReview':!![],'message':_0x2d282a(0xd9)}};}function a43_0x2e14(){const _0x118938=['currentApp','functionNode','startsWith','boolean','requires','profileName','4982985zhIQgy','type','warnings','has','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20resolution','Runtime\x20script\x20cache\x20cleared.','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','require','attempted','conflict',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Local\x20function\x20not\x20found:\x20','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','filter','cleared','get','Push\x20only\x20this\x20script\x20type','141208xhtWVU','24rLiJET','status','stringify','push','lockFilePath','HOOK','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Lock\x20scope\x20for\x20app\x20\x22','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','remoteId','create','str','28264FtYYvX','\x20--format\x20compress','some','operationType','COMMON','appCode','runtime\x20cache\x20not\x20needed','ENDPOINT','after','\x20failed','flatMap','bff','\x22\x20not\x20found\x20after\x20ensureLockScope.','values','apiDir','existingHooks','name','resolutions','bool','1133aXLuPc','/api/management/library/scripts/save','size','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','scriptType','45690gSfakJ','review_remote_and_merge','functionName','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Incomplete\x20HOOK\x20path:\x20','failed','length','description','runtime\x20cache\x20clear\x20failed','filePath','version','28559748tCdyId','POST','Push\x20complete:\x20','\x20conflict','datasetId','unchanged','afterScriptId','write','map','string','datasetCode','HOOK_DATASET_NOT_FOUND:','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','parse','failures','72yHyRJa','add','lockKey','alias','set','script','functions','join','scriptsRoot','defaultApp','mergedCli','before','20bQLdGV','18244vXAKFv','apps','hash','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','update','delete','force','22182aWrkOv','message','would_push','745jqSOaR','validation','every','selectedAppName'];a43_0x2e14=function(){return _0x118938;};return a43_0x2e14();}function isRemoteVersionConflict(_0x11b56b){const _0x1be887=a43_0x39e83d,_0x41dca1=_0x11b56b instanceof Error?_0x11b56b[_0x1be887(0xb0)]:String(_0x11b56b),_0xcd3487=getPlatformErrorCode(_0x11b56b)??'';return[_0x41dca1,_0xcd3487]['some'](_0x5dc156=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i['test'](_0x5dc156));}function formatPushMessage(_0x2eb969,_0x17e1bc,_0x3f6356,_0xe201cd,_0x368ced){const _0x5c4293=a43_0x39e83d,_0x4d107c=[_0x5c4293(0x8e)+_0x2eb969+'\x20uploaded',_0x17e1bc+'\x20skipped'];_0x3f6356>0x0&&_0x4d107c[_0x5c4293(0xd4)](_0x3f6356+_0x5c4293(0x8f)+(_0x3f6356===0x1?'':'s')+'\x20'+(_0x3f6356===0x1?_0x5c4293(0xba):_0x5c4293(0xc6))+_0x5c4293(0xc2));if(_0xe201cd>0x0)_0x4d107c[_0x5c4293(0xd4)](_0xe201cd+_0x5c4293(0x72));return _0x4d107c[_0x5c4293(0xd4)](_0x368ced),_0x4d107c['join'](',\x20');}async function getTargetFunctions(_0x2285c7,_0x1676bb){const _0xd572cc=a43_0x39e83d,_0x348d46=_0x1676bb[_0xd572cc(0xdc)]('type'),_0x588e78=_0x1676bb[_0xd572cc(0xdc)](_0xd572cc(0x79)),_0x1a95a1=normalizeBffType(_0x348d46)??undefined;if(_0x588e78&&!_0x1a95a1)throw CliErrors[_0xd572cc(0xb3)](_0xd572cc(0xc5));const _0x48263c=await scanLocalBffFunctions(_0x2285c7,_0x1a95a1);if(_0x588e78){const _0x16edfe=_0x48263c[_0xd572cc(0xcc)](_0x7ff76f=>_0x7ff76f['name']===_0x588e78);if(_0x16edfe[_0xd572cc(0x87)]===0x0)throw CliErrors[_0xd572cc(0xb3)](_0xd572cc(0xca)+_0x1a95a1+'/'+_0x588e78);return _0x16edfe;}return _0x48263c;}function existingHookWarning(_0x932354){const _0x37b0e9=a43_0x39e83d;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x932354,'message':_0x37b0e9(0x7f)};}async function buildHookMaps(_0xb2bc35,_0x117525,_0x4f19d5,_0x38158c,_0x2db1f7){const _0x232291=a43_0x39e83d,_0x165e1f=_0x4f19d5['some'](_0x47af24=>_0x47af24[_0x232291(0xbd)]===_0x232291(0xd6));if(!_0x165e1f)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x22eb9d=resolveApiModelSource(_0x117525,_0xb2bc35,_0x2db1f7),_0x4fa275=loadAliasMap(_0x117525,undefined,_0x22eb9d[_0x232291(0x8a)],_0x22eb9d[_0x232291(0xbb)]);assertUnambiguousHookAliases(_0x4fa275);const _0x16079d=[..._0x4fa275[_0x232291(0x94)](_0x47cc21=>[_0x47cc21[_0x232291(0x9e)],_0x47cc21[_0x232291(0x96)]]),...trackedHookDirectoryMappings(_0x38158c)[_0x232291(0x94)](_0x4be237=>[_0x4be237[_0x232291(0x9e)],_0x4be237[_0x232291(0x96)]])],_0x344828=await listDatasets(_0xb2bc35);assertUnambiguousHookDirectoryMappings(_0x16079d[_0x232291(0x94)](([_0x20bacd,_0x1298b9])=>({'alias':_0x20bacd,'datasetCode':_0x1298b9})));const _0x2b3c9d=buildHookDirectoryIndexes(_0x344828,_0x16079d),_0x16b340=new Map(),_0x33bc51=preflightPushHookDirectories(_0x4f19d5,_0x38158c,_0x2b3c9d,_0x16b340),_0x14c369=new Set(),_0x55fc10=_0x4f19d5['filter'](_0x36a363=>_0x16b340['get'](_0x36a363['lockKey'])?.[_0x232291(0xb8)](_0x232291(0x97))&&_0x38158c[_0x232291(0xa1)][_0x36a363[_0x232291(0x9d)]]?.[_0x232291(0xda)]&&_0x38158c[_0x232291(0xa1)][_0x36a363[_0x232291(0x9d)]]?.['datasetCode']);if(_0x55fc10[_0x232291(0x87)]>0x0){let _0x14d98e;try{_0x14d98e=await getBffScriptStatistics(_0xb2bc35);}catch(_0x3c7d80){for(const _0x54a6c6 of _0x55fc10)_0x16b340[_0x232291(0x9f)](_0x54a6c6[_0x232291(0x9d)],'Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'+(_0x3c7d80 instanceof Error?_0x3c7d80[_0x232291(0xb0)]:String(_0x3c7d80)));return{'resolutions':_0x33bc51,'failures':_0x16b340,'existingHooks':_0x14c369};}for(const _0x1e0995 of _0x55fc10){const _0x5dd65e=_0x38158c[_0x232291(0xa1)][_0x1e0995['lockKey']];try{const _0x4fc57d=new Set(_0x4f19d5['filter'](_0x133e12=>_0x133e12[_0x232291(0xbd)]===_0x232291(0xd6)&&_0x38158c[_0x232291(0xa1)][_0x133e12[_0x232291(0x9d)]]?.[_0x232291(0x96)]===_0x5dd65e[_0x232291(0x96)])[_0x232291(0x94)](_0x3f8a7b=>_0x3f8a7b[_0x232291(0x9e)]));if(_0x4fc57d[_0x232291(0x7e)]>0x1)throw CliErrors[_0x232291(0xb3)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x562306=_0x14d98e['flatMap'](_0x54f962=>[{'datasetCode':_0x54f962['datasetCode'],'operationType':snakeToCamel(_0x54f962[_0x232291(0xe0)]),'functionNode':_0x232291(0xa6),'id':_0x54f962['beforeScriptId']},{'datasetCode':_0x54f962[_0x232291(0x96)],'operationType':snakeToCamel(_0x54f962['operationType']),'functionNode':_0x232291(0x71),'id':_0x54f962[_0x232291(0x92)]}])[_0x232291(0xcc)](_0x5ae42e=>_0x5ae42e['id']===_0x5dd65e['remoteId']),_0x416a3d=await getBffScriptInfo(_0x5dd65e[_0x232291(0xda)]);if(_0x416a3d['id']!==_0x5dd65e[_0x232291(0xda)]||_0x416a3d[_0x232291(0x6e)]!==_0xb2bc35||_0x416a3d[_0x232291(0x80)]!==_0x232291(0xd6)||_0x416a3d[_0x232291(0x83)]!==_0x1e0995[_0x232291(0x79)]||_0x5dd65e[_0x232291(0x8b)]==null||_0x416a3d[_0x232291(0x8b)]!==_0x5dd65e[_0x232291(0x8b)]||_0x562306[_0x232291(0x87)]!==0x1||_0x562306[0x0][_0x232291(0x96)]!==_0x5dd65e['datasetCode']||_0x562306[0x0][_0x232291(0xe0)]!==_0x1e0995[_0x232291(0xe0)]||_0x562306[0x0][_0x232291(0xb7)]!==_0x1e0995[_0x232291(0xb7)]||_0x5dd65e[_0x232291(0xe0)]!==_0x1e0995[_0x232291(0xe0)]||_0x5dd65e[_0x232291(0xb7)]!==_0x1e0995[_0x232291(0xb7)])throw CliErrors[_0x232291(0xb3)](_0x232291(0xc0));_0x14c369[_0x232291(0x9c)](_0x1e0995[_0x232291(0x9d)]),_0x16b340[_0x232291(0xad)](_0x1e0995[_0x232291(0x9d)]);}catch(_0xedfef){_0x16b340[_0x232291(0x9f)](_0x1e0995[_0x232291(0x9d)],_0xedfef instanceof Error?_0xedfef['message']:String(_0xedfef));}}}return{'resolutions':_0x33bc51,'failures':_0x16b340,'existingHooks':_0x14c369};}async function uploadSingleFunction(_0x274997,_0x182fd7,_0x595ee3,_0x4a7fee){const _0x49bae6=a43_0x39e83d,_0x300f13=await readFile(_0x182fd7[_0x49bae6(0x8a)],'utf8'),_0x55f571=await computeFileHash(_0x182fd7['filePath']),_0x2905c4=_0x595ee3[_0x49bae6(0xa1)][_0x182fd7[_0x49bae6(0x9d)]];if(_0x2905c4?.['remoteId']&&_0x2905c4[_0x49bae6(0x8b)]==null)throw CliErrors[_0x49bae6(0xb3)](_0x182fd7['lockKey']+_0x49bae6(0xc9));let _0x460e2a=extractScriptDescription(_0x300f13);if(!_0x460e2a&&_0x2905c4?.[_0x49bae6(0xda)]){const _0xb5cd00=await getBffScriptInfo(_0x2905c4[_0x49bae6(0xda)]);_0x460e2a=_0xb5cd00[_0x49bae6(0x88)]||undefined;}const _0x52ece9={'appCode':_0x274997,'functionName':_0x182fd7[_0x49bae6(0x79)],'scriptType':_0x182fd7['type'],'scriptContent':_0x300f13};if(_0x2905c4?.[_0x49bae6(0xda)])_0x52ece9['id']=_0x2905c4[_0x49bae6(0xda)];if(_0x2905c4?.[_0x49bae6(0x8b)]!=null)_0x52ece9[_0x49bae6(0x8b)]=_0x2905c4[_0x49bae6(0x8b)];if(_0x460e2a)_0x52ece9[_0x49bae6(0x88)]=_0x460e2a;if(_0x182fd7[_0x49bae6(0xbd)]===_0x49bae6(0xd6)){const _0x3fdcd9=_0x4a7fee[_0x49bae6(0x7a)][_0x49bae6(0xce)](_0x182fd7['lockKey']);if(!_0x3fdcd9&&!_0x4a7fee[_0x49bae6(0x78)][_0x49bae6(0xbf)](_0x182fd7[_0x49bae6(0x9d)])||!_0x182fd7[_0x49bae6(0xe0)]||!_0x182fd7[_0x49bae6(0xb7)])throw CliErrors[_0x49bae6(0xb3)](_0x49bae6(0x85)+_0x182fd7[_0x49bae6(0x9d)]);_0x3fdcd9&&(_0x52ece9[_0x49bae6(0x90)]=_0x3fdcd9['dataset']['id'],_0x52ece9[_0x49bae6(0xe0)]=_0x182fd7[_0x49bae6(0xe0)]),_0x52ece9[_0x49bae6(0xb7)]=_0x182fd7[_0x49bae6(0xb7)];}const _0x2ad5b2=await saveBffScript(_0x52ece9),_0x3879a8=_0x2ad5b2['id'],_0x4a6b7d=_0x2ad5b2[_0x49bae6(0xa0)]??await getBffScriptInfo(_0x3879a8),_0x2b5ab3={'hash':_0x55f571,'remoteId':_0x3879a8,'version':_0x4a6b7d[_0x49bae6(0x8b)]};if(_0x182fd7[_0x49bae6(0xbd)]===_0x49bae6(0xd6)){const _0x4d006b=_0x4a7fee['resolutions']['get'](_0x182fd7['lockKey']);if(!_0x4d006b){_0x595ee3[_0x49bae6(0xa1)][_0x182fd7['lockKey']]={..._0x2905c4,..._0x2b5ab3};return;}_0x2b5ab3['alias']=_0x4d006b[_0x49bae6(0x9e)]??_0x2905c4?.[_0x49bae6(0x9e)],_0x2b5ab3[_0x49bae6(0x96)]=_0x4d006b['datasetCode'],_0x2b5ab3['operationType']=_0x182fd7[_0x49bae6(0xe0)],_0x2b5ab3[_0x49bae6(0xb7)]=_0x182fd7[_0x49bae6(0xb7)];}_0x595ee3['functions'][_0x182fd7['lockKey']]=_0x2b5ab3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x343b40,_0x2548a7,_0x296d9c){const _0x546f16=a43_0x39e83d;if(_0x296d9c['length']===0x0)return;for(let _0x29765d=0x0;_0x29765d<LOCK_SETTLE_RETRY_COUNT;_0x29765d+=0x1){const _0x1b5837=await readBffLockFile(_0x343b40),_0x1f7768=_0x1b5837?.[_0x546f16(0xa9)]?.[_0x2548a7]?.[_0x546f16(0xa1)]??{},_0x4c4c07=_0x296d9c[_0x546f16(0xb4)](_0x532d35=>!!_0x1f7768[_0x532d35]?.['remoteId']);if(_0x4c4c07)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x546f16(0xc1)+_0x296d9c[_0x546f16(0xa2)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a44_0x1762c7=a44_0x42ad;(function(_0x4ef5ac,_0x4371f6){const _0x429108=a44_0x42ad,_0x38382b=_0x4ef5ac();while(!![]){try{const _0x413100=parseInt(_0x429108(0x1a3))/0x1+parseInt(_0x429108(0x19c))/0x2*(-parseInt(_0x429108(0x18b))/0x3)+parseInt(_0x429108(0x188))/0x4*(parseInt(_0x429108(0x19a))/0x5)+parseInt(_0x429108(0x190))/0x6*(parseInt(_0x429108(0x194))/0x7)+-parseInt(_0x429108(0x181))/0x8+parseInt(_0x429108(0x180))/0x9+-parseInt(_0x429108(0x18d))/0xa;if(_0x413100===_0x4371f6)break;else _0x38382b['push'](_0x38382b['shift']());}catch(_0x5e9705){_0x38382b['push'](_0x38382b['shift']());}}}(a44_0x2a0b,0xe7469));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a44_0x2a0b(){const _0x4a9e4c=['9BXpXYf','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','1804250JQjJOF','push','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','792DPYZuj','remote','scriptsRoot','bool','9982eTFvko','alias','filePath','apiDir','length','mergedCli','5lYEEZK','read','389406iUJxTQ','bff','boolean','functions','all','status','appCode','1822823aZhHzZ','\x20modified,\x20','map','3686004OMszgH','11627832YhjVSU','\x20unchanged','selectedAppName','lockKey','defaultApp','\x20added,\x20','lockFilePath','2978828CRzpJX','datasetCode','profileName'];a44_0x2a0b=function(){return _0x4a9e4c;};return a44_0x2a0b();}function a44_0x42ad(_0x1416fd,_0x93b01c){_0x1416fd=_0x1416fd-0x17e;const _0x2a0bb4=a44_0x2a0b();let _0x42ad1b=_0x2a0bb4[_0x1416fd];return _0x42ad1b;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.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':a44_0x1762c7(0x19d),'command':a44_0x1762c7(0x1a1),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a44_0x1762c7(0x19b),'flags':[{'name':a44_0x1762c7(0x191),'type':a44_0x1762c7(0x19e),'description':a44_0x1762c7(0x18c)}],async 'execute'(_0xb20bb4){const _0x584593=a44_0x1762c7,_0x5045b8=loadBffProjectConfig(_0xb20bb4[_0x584593(0x1a2)]),_0x3261bf=await readBffLockFile(_0x5045b8[_0x584593(0x187)]),{appLock:_0x365804}=ensureLockScope(_0x3261bf??createEmptyBffLock(),_0xb20bb4[_0x584593(0x1a2)],_0x5045b8[_0x584593(0x192)],_0x584593(0x1a1)),_0x250f43=await scanLocalBffFunctions(_0x5045b8),_0x121631=[],_0x2e4dec=[],_0x39a5cb=[];for(const _0x2e7011 of _0x250f43){const _0x44ab37=await computeFileHash(_0x2e7011[_0x584593(0x196)]),_0x2a7241=_0x365804['functions'][_0x2e7011['lockKey']];if(!_0x2a7241)_0x121631[_0x584593(0x18e)](_0x2e7011[_0x584593(0x184)]);else _0x2a7241['hash']!==_0x44ab37?_0x2e4dec['push'](_0x2e7011[_0x584593(0x184)]):_0x39a5cb['push'](_0x2e7011[_0x584593(0x184)]);}const _0x1d5b8c=[];if(_0xb20bb4[_0x584593(0x193)](_0x584593(0x191))){const _0x1cec53=resolveApiModelSource(_0xb20bb4[_0x584593(0x197)],_0xb20bb4[_0x584593(0x1a2)],_0xb20bb4[_0x584593(0x183)]||_0xb20bb4[_0x584593(0x199)]?.['currentApp']||_0xb20bb4[_0x584593(0x199)]?.[_0x584593(0x185)]),_0x34d3ba=loadAliasMap(_0xb20bb4['apiDir'],undefined,_0x1cec53['filePath'],_0x1cec53[_0x584593(0x18a)]),_0x3680b9=new Map(_0x34d3ba['map'](_0x449772=>[_0x449772[_0x584593(0x189)],_0x449772[_0x584593(0x195)]])),[_0x34ac9d,_0x39d5f8]=await Promise[_0x584593(0x1a0)]([listBffScripts(_0xb20bb4['appCode']),getBffScriptStatistics(_0xb20bb4[_0x584593(0x1a2)])]),_0x132724=createHookLocationMap(_0x39d5f8),_0x5e3b8c=new Set(_0x250f43[_0x584593(0x17f)](_0x19671d=>_0x19671d[_0x584593(0x184)]));for(const _0x1b2217 of _0x34ac9d){const _0x82a7dd=resolveRemoteScriptTarget(_0x5045b8,_0x1b2217,_0x132724,_0x365804[_0x584593(0x19f)],_0x3680b9);_0x82a7dd&&!_0x5e3b8c['has'](_0x82a7dd['lockKey'])&&_0x1d5b8c[_0x584593(0x18e)](_0x82a7dd[_0x584593(0x184)]);}}const _0x546dbd=_0x121631[_0x584593(0x198)]===0x0&&_0x2e4dec[_0x584593(0x198)]===0x0&&_0x1d5b8c['length']===0x0;return{'ok':!![],'data':{'added':_0x121631,'modified':_0x2e4dec,'unchanged':_0x39a5cb,'remoteOnly':_0x1d5b8c},'message':_0x546dbd?_0x584593(0x18f):_0x121631[_0x584593(0x198)]+_0x584593(0x186)+_0x2e4dec[_0x584593(0x198)]+_0x584593(0x17e)+_0x39a5cb[_0x584593(0x198)]+_0x584593(0x182)+(_0x1d5b8c[_0x584593(0x198)]>0x0?',\x20'+_0x1d5b8c['length']+'\x20remote-only':'')};}};
1
+ const a44_0x4b5c43=a44_0x16b9;function a44_0x37c3(){const _0x146f8a=['functions','4447475fJXYAx','\x20remote-only','\x20unchanged','1453010MynpsB','has','boolean','alias','length','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','profileName','map','read','9gceUBP','4607528qKBShj','status','remote','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','push','lockFilePath','402806zOxTOZ','hash','filePath','554407BPnWZE','datasetCode','currentApp','mergedCli','bff','44468ltqexF','apiDir','249fngNRh','lockKey','appCode','\x20modified,\x20','\x20added,\x20','3656310BmEwwk','4rKdMZC','scriptsRoot'];a44_0x37c3=function(){return _0x146f8a;};return a44_0x37c3();}(function(_0x5d9c44,_0x437092){const _0x79c582=a44_0x16b9,_0x7f3424=_0x5d9c44();while(!![]){try{const _0x1b6ba9=-parseInt(_0x79c582(0x148))/0x1*(-parseInt(_0x79c582(0x15e))/0x2)+-parseInt(_0x79c582(0x168))/0x3*(-parseInt(_0x79c582(0x166))/0x4)+-parseInt(_0x79c582(0x14b))/0x5+parseInt(_0x79c582(0x16d))/0x6+-parseInt(_0x79c582(0x161))/0x7+-parseInt(_0x79c582(0x158))/0x8*(parseInt(_0x79c582(0x157))/0x9)+parseInt(_0x79c582(0x14e))/0xa;if(_0x1b6ba9===_0x437092)break;else _0x7f3424['push'](_0x7f3424['shift']());}catch(_0x3dbcc2){_0x7f3424['push'](_0x7f3424['shift']());}}}(a44_0x37c3,0xe5184));function a44_0x16b9(_0x3f1997,_0x5a99d5){_0x3f1997=_0x3f1997-0x148;const _0x37c3ed=a44_0x37c3();let _0x16b9d6=_0x37c3ed[_0x3f1997];return _0x16b9d6;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.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':a44_0x4b5c43(0x165),'command':a44_0x4b5c43(0x159),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a44_0x4b5c43(0x156),'flags':[{'name':'remote','type':a44_0x4b5c43(0x150),'description':a44_0x4b5c43(0x15b)}],async 'execute'(_0x4a4f3f){const _0x5b8c34=a44_0x4b5c43,_0x2d8a33=loadBffProjectConfig(_0x4a4f3f[_0x5b8c34(0x16a)]),_0x54f1bd=await readBffLockFile(_0x2d8a33[_0x5b8c34(0x15d)]),{appLock:_0x593916}=ensureLockScope(_0x54f1bd??createEmptyBffLock(),_0x4a4f3f[_0x5b8c34(0x16a)],_0x2d8a33[_0x5b8c34(0x149)],_0x5b8c34(0x159)),_0x3a7135=await scanLocalBffFunctions(_0x2d8a33),_0x4a58e0=[],_0xc62bf9=[],_0xfa0467=[];for(const _0x4e8d86 of _0x3a7135){const _0xa9f640=await computeFileHash(_0x4e8d86[_0x5b8c34(0x160)]),_0x407764=_0x593916[_0x5b8c34(0x14a)][_0x4e8d86['lockKey']];if(!_0x407764)_0x4a58e0[_0x5b8c34(0x15c)](_0x4e8d86[_0x5b8c34(0x169)]);else _0x407764[_0x5b8c34(0x15f)]!==_0xa9f640?_0xc62bf9[_0x5b8c34(0x15c)](_0x4e8d86['lockKey']):_0xfa0467['push'](_0x4e8d86[_0x5b8c34(0x169)]);}const _0x4be1b8=[];if(_0x4a4f3f['bool'](_0x5b8c34(0x15a))){const _0x44e756=resolveApiModelSource(_0x4a4f3f[_0x5b8c34(0x167)],_0x4a4f3f[_0x5b8c34(0x16a)],_0x4a4f3f['selectedAppName']||_0x4a4f3f[_0x5b8c34(0x164)]?.[_0x5b8c34(0x163)]||_0x4a4f3f[_0x5b8c34(0x164)]?.['defaultApp']),_0x5cc169=loadAliasMap(_0x4a4f3f['apiDir'],undefined,_0x44e756['filePath'],_0x44e756[_0x5b8c34(0x154)]),_0x26eb82=new Map(_0x5cc169['map'](_0x31e4c7=>[_0x31e4c7[_0x5b8c34(0x162)],_0x31e4c7[_0x5b8c34(0x151)]])),[_0x1bc399,_0x455b77]=await Promise['all']([listBffScripts(_0x4a4f3f[_0x5b8c34(0x16a)]),getBffScriptStatistics(_0x4a4f3f[_0x5b8c34(0x16a)])]),_0x528208=createHookLocationMap(_0x455b77),_0x230938=new Set(_0x3a7135[_0x5b8c34(0x155)](_0x1c9782=>_0x1c9782[_0x5b8c34(0x169)]));for(const _0x33c271 of _0x1bc399){const _0x43d344=resolveRemoteScriptTarget(_0x2d8a33,_0x33c271,_0x528208,_0x593916[_0x5b8c34(0x14a)],_0x26eb82);_0x43d344&&!_0x230938[_0x5b8c34(0x14f)](_0x43d344[_0x5b8c34(0x169)])&&_0x4be1b8['push'](_0x43d344[_0x5b8c34(0x169)]);}}const _0x16a5ca=_0x4a58e0[_0x5b8c34(0x152)]===0x0&&_0xc62bf9[_0x5b8c34(0x152)]===0x0&&_0x4be1b8[_0x5b8c34(0x152)]===0x0;return{'ok':!![],'data':{'added':_0x4a58e0,'modified':_0xc62bf9,'unchanged':_0xfa0467,'remoteOnly':_0x4be1b8},'message':_0x16a5ca?_0x5b8c34(0x153):_0x4a58e0[_0x5b8c34(0x152)]+_0x5b8c34(0x16c)+_0xc62bf9[_0x5b8c34(0x152)]+_0x5b8c34(0x16b)+_0xfa0467[_0x5b8c34(0x152)]+_0x5b8c34(0x14d)+(_0x4be1b8[_0x5b8c34(0x152)]>0x0?',\x20'+_0x4be1b8['length']+_0x5b8c34(0x14c):'')};}};
@@ -1 +1 @@
1
- const a45_0x501385=a45_0x4a36;function a45_0x4a36(_0x5c3ed6,_0x51d945){_0x5c3ed6=_0x5c3ed6-0xc6;const _0x51d387=a45_0x51d3();let _0x4a36e8=_0x51d387[_0x5c3ed6];return _0x4a36e8;}(function(_0x90b36f,_0x7b012d){const _0x34b6ed=a45_0x4a36,_0x41b9b4=_0x90b36f();while(!![]){try{const _0x2a17e9=-parseInt(_0x34b6ed(0xda))/0x1*(parseInt(_0x34b6ed(0xd0))/0x2)+parseInt(_0x34b6ed(0xcc))/0x3+-parseInt(_0x34b6ed(0xd9))/0x4*(parseInt(_0x34b6ed(0xe1))/0x5)+parseInt(_0x34b6ed(0xcd))/0x6+-parseInt(_0x34b6ed(0xd4))/0x7*(parseInt(_0x34b6ed(0xd1))/0x8)+parseInt(_0x34b6ed(0xd7))/0x9*(-parseInt(_0x34b6ed(0xe4))/0xa)+parseInt(_0x34b6ed(0xcb))/0xb;if(_0x2a17e9===_0x7b012d)break;else _0x41b9b4['push'](_0x41b9b4['shift']());}catch(_0x45ef51){_0x41b9b4['push'](_0x41b9b4['shift']());}}}(a45_0x51d3,0xad80d));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a45_0x51d3(){const _0x3a5c57=['cli-skill','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','1861555CCppoY','\x20via\x20skills@latest','\x20is\x20already\x20current','3124270qyRYMj','apiError','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','code','install','\x20at\x20','installedPath',']:\x20','32315613mBcGrE','1424658Jyatju','7002870wDwAjE','info','CLI\x20Built-in\x20Skill\x20','2IXamgr','6998056VsnsVe','unknown','changed','7KdVhwf','cli-skill-install','setLogPath','27bmTpft','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','12IRwGPU','940174kUKBzq','skillVersion','pipe','Built-in\x20Skill\x20install\x20failed\x20[','repairCommand'];a45_0x51d3=function(){return _0x3a5c57;};return a45_0x51d3();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a45_0x501385(0xdf),'command':a45_0x501385(0xc7),'description':a45_0x501385(0xe6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x47f735){const _0x33037d=a45_0x501385;logger[_0x33037d(0xd6)](process['cwd']()),logger[_0x33037d(0xce)](_0x33037d(0xd5),_0x33037d(0xe0));const _0x518954=installBuiltinSkill({'stdio':_0x47f735['nonInteractive']?_0x33037d(0xdc):'inherit'});if(!_0x518954['ok'])throw CliErrors[_0x33037d(0xe5)](_0x33037d(0xdd)+_0x518954[_0x33037d(0xc6)]+_0x33037d(0xca)+(_0x518954['error']||_0x33037d(0xd2)),_0x33037d(0xd8)+_0x518954[_0x33037d(0xde)]);return console['log'](_0x518954[_0x33037d(0xd3)]?_0x33037d(0xcf)+_0x518954[_0x33037d(0xdb)]+'\x20installed'+(_0x518954['installedPath']?_0x33037d(0xc8)+_0x518954[_0x33037d(0xc9)]:_0x33037d(0xe2)):'CLI\x20Built-in\x20Skill\x20'+_0x518954[_0x33037d(0xdb)]+_0x33037d(0xe3)+(_0x518954[_0x33037d(0xc9)]?_0x33037d(0xc8)+_0x518954[_0x33037d(0xc9)]:'')),{'ok':!![]};}}];
1
+ const a45_0x4619a6=a45_0x1f0e;(function(_0x1fcd58,_0x3a9408){const _0x4f8604=a45_0x1f0e,_0x381e2f=_0x1fcd58();while(!![]){try{const _0x186a02=parseInt(_0x4f8604(0x18f))/0x1*(parseInt(_0x4f8604(0x19b))/0x2)+-parseInt(_0x4f8604(0x19a))/0x3*(-parseInt(_0x4f8604(0x190))/0x4)+-parseInt(_0x4f8604(0x18e))/0x5+-parseInt(_0x4f8604(0x1a3))/0x6*(-parseInt(_0x4f8604(0x18d))/0x7)+-parseInt(_0x4f8604(0x18a))/0x8+-parseInt(_0x4f8604(0x1a1))/0x9*(parseInt(_0x4f8604(0x1a5))/0xa)+-parseInt(_0x4f8604(0x1a4))/0xb*(-parseInt(_0x4f8604(0x19f))/0xc);if(_0x186a02===_0x3a9408)break;else _0x381e2f['push'](_0x381e2f['shift']());}catch(_0x34de60){_0x381e2f['push'](_0x381e2f['shift']());}}}(a45_0x336b,0x76341));function a45_0x336b(){const _0x206f16=['4419056WePMCl','\x20installed','\x20via\x20skills@latest','2985395VJicdJ','4727530QmdEUZ','4iOtckZ','2729276WuzEyD','apiError','skillVersion','error','info','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','cli-skill-install','cli-skill','pipe','changed','3cHjdUT','332742GwNKte','nonInteractive','inherit','code','524028nNMLbd','CLI\x20Built-in\x20Skill\x20','9FzfMbE','log','12exBYyR','11mARRNN','2623930hXuZSg','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','setLogPath','read','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','install','\x20at\x20','\x20is\x20already\x20current','installedPath'];a45_0x336b=function(){return _0x206f16;};return a45_0x336b();}function a45_0x1f0e(_0x46dfc3,_0x4b17ba){_0x46dfc3=_0x46dfc3-0x183;const _0x336bd8=a45_0x336b();let _0x1f0e4d=_0x336bd8[_0x46dfc3];return _0x1f0e4d;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a45_0x4619a6(0x197),'command':a45_0x4619a6(0x186),'description':a45_0x4619a6(0x1a6),'risk':a45_0x4619a6(0x184),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x492522){const _0xa0dfb4=a45_0x4619a6;logger[_0xa0dfb4(0x183)](process['cwd']()),logger[_0xa0dfb4(0x194)](_0xa0dfb4(0x196),_0xa0dfb4(0x185));const _0x48a640=installBuiltinSkill({'stdio':_0x492522[_0xa0dfb4(0x19c)]?_0xa0dfb4(0x198):_0xa0dfb4(0x19d)});if(!_0x48a640['ok'])throw CliErrors[_0xa0dfb4(0x191)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x48a640[_0xa0dfb4(0x19e)]+']:\x20'+(_0x48a640[_0xa0dfb4(0x193)]||'unknown'),_0xa0dfb4(0x195)+_0x48a640['repairCommand']);return console[_0xa0dfb4(0x1a2)](_0x48a640[_0xa0dfb4(0x199)]?_0xa0dfb4(0x1a0)+_0x48a640[_0xa0dfb4(0x192)]+_0xa0dfb4(0x18b)+(_0x48a640[_0xa0dfb4(0x189)]?_0xa0dfb4(0x187)+_0x48a640[_0xa0dfb4(0x189)]:_0xa0dfb4(0x18c)):'CLI\x20Built-in\x20Skill\x20'+_0x48a640[_0xa0dfb4(0x192)]+_0xa0dfb4(0x188)+(_0x48a640[_0xa0dfb4(0x189)]?_0xa0dfb4(0x187)+_0x48a640[_0xa0dfb4(0x189)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a46_0x1a70f5=a46_0x6314;(function(_0x216582,_0x1840dc){const _0x32e947=a46_0x6314,_0x113fac=_0x216582();while(!![]){try{const _0x3c741a=parseInt(_0x32e947(0x1ae))/0x1*(-parseInt(_0x32e947(0x191))/0x2)+-parseInt(_0x32e947(0x16c))/0x3*(parseInt(_0x32e947(0x178))/0x4)+-parseInt(_0x32e947(0x15e))/0x5+-parseInt(_0x32e947(0x173))/0x6+parseInt(_0x32e947(0x1a3))/0x7*(-parseInt(_0x32e947(0x182))/0x8)+parseInt(_0x32e947(0x172))/0x9+parseInt(_0x32e947(0x1b2))/0xa;if(_0x3c741a===_0x1840dc)break;else _0x113fac['push'](_0x113fac['shift']());}catch(_0xc09105){_0x113fac['push'](_0x113fac['shift']());}}}(a46_0x412b,0xbf9a4));function a46_0x412b(){const _0x181dc0=['Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7067410cByfFJ',',\x20found\x20','\x20\x20Try\x20manually:\x20','toLowerCase','/dist-tags','skillVersion','beta','Checking\x20CLI\x20Built-in\x20Skill...','fromEntries','boolean','https://registry.npmjs.org/-/package/','validation','filter','Already\x20up\x20to\x20date\x20(v','2853JwpCIv','gray','install','length','json','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','6229926gBBMVC','1796796upEPrb','Checking\x20for\x20updates...',',\x20then\x20verify\x20with:\x20','bun','\x20doctor','5708lsuFlc','repairCommand','run','start','version','object','Run:\x20','code','green','Current\x20version:\x20','8ukeLPU','Update\x20failed','state',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','error','source','log','npm','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','apiError','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','timeout','includes','Beta\x20version:\x20','62qcGCri','\x20install\x20-g\x20','Current\x20version\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bool','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','execPath','slice','@latest','Invalid\x20version:\x20',']:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag',',\x20state\x20','latest','valid','\x20is\x20up\x20to\x20date.','4668055jhCSJs','\x20→\x20','string','Install\x20a\x20specific\x20CLI\x20version','Updating\x20via\x20','succeed','Updated\x20to\x20v','Update\x20available:\x20','unknown','fail','pipe','47765cgMaFC','trim','expected\x20','yellow','53101950BrFcTR'];a46_0x412b=function(){return _0x181dc0;};return a46_0x412b();}import a46_0x1ddbda from'chalk';function a46_0x6314(_0x280b33,_0x33a26f){_0x280b33=_0x280b33-0x15d;const _0x412b72=a46_0x412b();let _0x63143b=_0x412b72[_0x280b33];return _0x63143b;}import a46_0x2c1ccd from'ora';import a46_0x1bb9a3 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 _0x21b6e9=a46_0x6314;return GIT_COMMIT!==_0x21b6e9(0x1ab)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x21b6e9(0x198)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5a1a9f=a46_0x6314,_0x37dd91=process[_0x5a1a9f(0x197)][_0x5a1a9f(0x161)]();if(_0x37dd91[_0x5a1a9f(0x18f)](_0x5a1a9f(0x176)))return _0x5a1a9f(0x176);return _0x5a1a9f(0x189);}const updateFlags=[{'name':'beta','type':a46_0x1a70f5(0x167),'description':a46_0x1a70f5(0x19e),'default':![]},{'name':a46_0x1a70f5(0x17c),'type':a46_0x1a70f5(0x1a5),'description':a46_0x1a70f5(0x1a6)}];function getRequestedVersion(_0x3dccca){const _0x164c18=a46_0x1a70f5;return _0x3dccca['str'](_0x164c18(0x17c))[_0x164c18(0x1af)]();}async function validateUpdateFlags(_0x5b6a1d){const _0x151419=a46_0x1a70f5,_0x12331b=_0x5b6a1d[_0x151419(0x195)](_0x151419(0x164)),_0x1a4bd7=getRequestedVersion(_0x5b6a1d);if(_0x12331b&&_0x1a4bd7)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x151419(0x15d));if(_0x1a4bd7&&!a46_0x1bb9a3[_0x151419(0x1a1)](_0x1a4bd7))throw CliErrors[_0x151419(0x169)](_0x151419(0x19a)+_0x1a4bd7,_0x151419(0x18d));}async function fetchNpmDistTags(){const _0x36aa9c=a46_0x1a70f5;try{const _0x48fb80=await fetch(_0x36aa9c(0x168)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x36aa9c(0x162),{'signal':AbortSignal[_0x36aa9c(0x18e)](0x2710)});if(!_0x48fb80['ok'])return null;const _0x388042=await _0x48fb80[_0x36aa9c(0x170)]();if(!_0x388042||typeof _0x388042!==_0x36aa9c(0x17d))return null;return Object[_0x36aa9c(0x166)](Object['entries'](_0x388042)[_0x36aa9c(0x16a)](([,_0x155574])=>typeof _0x155574==='string'&&_0x155574['trim']()[_0x36aa9c(0x16f)]>0x0)['map'](([_0x31a13,_0x573703])=>[_0x31a13,String(_0x573703)[_0x36aa9c(0x1af)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3493b7){const _0x4f2278=await fetchNpmDistTags();return _0x4f2278?.[_0x3493b7]??null;}async function fetchLatestVersion(){const _0x514cd5=a46_0x1a70f5;return fetchNpmDistTagVersion(_0x514cd5(0x1a0));}async function resolveTargetVersion(_0x5aa066){const _0x1612a7=a46_0x1a70f5,_0xed84a9=getRequestedVersion(_0x5aa066);if(_0xed84a9)return{'version':_0xed84a9,'source':_0x1612a7(0x17c)};if(_0x5aa066[_0x1612a7(0x195)](_0x1612a7(0x164))){const _0x21c32a=await fetchNpmDistTagVersion(_0x1612a7(0x164));if(!_0x21c32a)return null;return{'version':_0x21c32a,'source':_0x1612a7(0x164)};}const _0x4007cc=await fetchLatestVersion();if(!_0x4007cc)return null;return{'version':_0x4007cc,'source':_0x1612a7(0x1a0)};}function shouldInstallTarget(_0x2ff95c,_0x25a927){const _0x3731f2=a46_0x1a70f5;if(_0x25a927[_0x3731f2(0x187)]===_0x3731f2(0x17c)||_0x25a927['source']===_0x3731f2(0x164))return!a46_0x1bb9a3['eq'](_0x2ff95c,_0x25a927[_0x3731f2(0x17c)]);return a46_0x1bb9a3['lt'](_0x2ff95c,_0x25a927['version']);}function getInstallPlanLabel(_0x3383b4,_0xd0804f){const _0x4ca43a=a46_0x1a70f5;switch(_0xd0804f[_0x4ca43a(0x187)]){case'beta':return _0x4ca43a(0x190)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f['version']);case _0x4ca43a(0x17c):return'Requested\x20version:\x20'+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);case _0x4ca43a(0x1a0):default:return _0x4ca43a(0x1aa)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+'\x20→\x20'+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);}}function repairCurrentBuiltinSkill(){const _0x35d424=a46_0x1a70f5;console['log'](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x165)));const _0x1f4ea1=installBuiltinSkill();if(_0x1f4ea1['ok']){console[_0x35d424(0x188)](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x19c)+_0x1f4ea1['skillVersion']+_0x35d424(0x1a2)));return;}throw CliErrors[_0x35d424(0x18c)](_0x35d424(0x196)+_0x1f4ea1[_0x35d424(0x17f)]+_0x35d424(0x19b)+(_0x1f4ea1[_0x35d424(0x186)]||_0x35d424(0x1ab)),_0x35d424(0x17e)+_0x1f4ea1[_0x35d424(0x179)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x35d424(0x177));}function verifyUpdatedBuiltinSkill(_0x14dc4a){const _0x5c0cb8=a46_0x1a70f5,_0x439720=inspectInstalledBuiltinSkillVersion(_0x14dc4a);if(_0x439720[_0x5c0cb8(0x184)]==='current'){console[_0x5c0cb8(0x188)](a46_0x1ddbda['gray'](_0x5c0cb8(0x19c)+_0x14dc4a+_0x5c0cb8(0x1a2)));return;}const _0x4177f6=_0x439720[_0x5c0cb8(0x163)]?_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x15f)+_0x439720[_0x5c0cb8(0x163)]:_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x19f)+_0x439720[_0x5c0cb8(0x184)];throw CliErrors[_0x5c0cb8(0x18c)]('CLI\x20updated\x20to\x20v'+_0x14dc4a+_0x5c0cb8(0x185)+_0x4177f6,_0x5c0cb8(0x17e)+_0x439720[_0x5c0cb8(0x179)]+_0x5c0cb8(0x175)+CLI_BIN_NAME+_0x5c0cb8(0x177));}async function execute(_0x33b8ab){const _0x2043ee=a46_0x1a70f5;await validateUpdateFlags(_0x33b8ab);const _0x46f1e0=getCurrentVersion();console[_0x2043ee(0x188)](_0x2043ee(0x181)+_0x46f1e0);const _0x5cef0d=a46_0x2c1ccd(_0x2043ee(0x174))[_0x2043ee(0x17b)](),_0x2a401a=await resolveTargetVersion(_0x33b8ab);if(!_0x2a401a){const _0x21a769=_0x33b8ab[_0x2043ee(0x195)](_0x2043ee(0x164))?_0x2043ee(0x19d):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5cef0d[_0x2043ee(0x1ac)](_0x21a769),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x171)+NPM_PACKAGE_NAME+_0x2043ee(0x199))),{'ok':![],'message':_0x21a769};}const _0xe042b9=a46_0x1bb9a3['valid'](VERSION),_0x50dbdb=a46_0x1bb9a3[_0x2043ee(0x1a1)](_0x2a401a[_0x2043ee(0x17c)]);if(!_0xe042b9||!_0x50dbdb)return _0x5cef0d[_0x2043ee(0x1ac)](_0x2043ee(0x18b)),{'ok':![],'message':_0x2043ee(0x18b)};if(!shouldInstallTarget(_0xe042b9,_0x2a401a)){const _0x9dc79c=_0x2a401a[_0x2043ee(0x187)]===_0x2043ee(0x17c)?_0x2043ee(0x18a)+_0x2a401a['version']+')':a46_0x1bb9a3['gt'](_0xe042b9,_0x50dbdb)?_0x2043ee(0x193)+_0x46f1e0+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x2a401a[_0x2043ee(0x17c)]:_0x2043ee(0x16b)+_0x2a401a[_0x2043ee(0x17c)]+')';return _0x5cef0d[_0x2043ee(0x1a8)](_0x9dc79c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x5cef0d['info'](getInstallPlanLabel(_0x46f1e0,_0x2a401a));const _0x16407d=detectPackageManager(),_0x4c0e25=_0x16407d===_0x2043ee(0x189)?resolveNpmBin(_0x2043ee(0x189)):_0x16407d,_0x1d24fb=a46_0x2c1ccd(_0x2043ee(0x1a7)+_0x16407d+'...')['start']();try{await execa(_0x4c0e25,[_0x2043ee(0x16e),'-g',NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)]],{'stdio':_0x2043ee(0x1ad)}),_0x1d24fb[_0x2043ee(0x1a8)](_0x2043ee(0x1a9)+_0x2a401a[_0x2043ee(0x17c)]),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x194)));}catch(_0x248c90){return _0x1d24fb[_0x2043ee(0x1ac)](_0x2043ee(0x183)),console[_0x2043ee(0x186)](a46_0x1ddbda['red']('\x20\x20'+_0x248c90['message'])),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x160)+_0x16407d+_0x2043ee(0x192)+NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)])),{'ok':![],'message':_0x248c90['message']};}return verifyUpdatedBuiltinSkill(_0x2a401a[_0x2043ee(0x17c)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a46_0x1a70f5(0x17a),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a46_0xd9af84=a46_0x3c3a;(function(_0x3f3806,_0x1502a9){const _0x10f804=a46_0x3c3a,_0x13c4bd=_0x3f3806();while(!![]){try{const _0x1793a5=-parseInt(_0x10f804(0xad))/0x1+parseInt(_0x10f804(0xb0))/0x2+-parseInt(_0x10f804(0xf2))/0x3+-parseInt(_0x10f804(0xeb))/0x4+-parseInt(_0x10f804(0xd6))/0x5*(-parseInt(_0x10f804(0xed))/0x6)+-parseInt(_0x10f804(0xe8))/0x7*(-parseInt(_0x10f804(0xc4))/0x8)+-parseInt(_0x10f804(0xd9))/0x9*(-parseInt(_0x10f804(0xc1))/0xa);if(_0x1793a5===_0x1502a9)break;else _0x13c4bd['push'](_0x13c4bd['shift']());}catch(_0x2cc0ce){_0x13c4bd['push'](_0x13c4bd['shift']());}}}(a46_0x201b,0x829c8));import a46_0x3cc2e8 from'chalk';import a46_0x824591 from'ora';import a46_0x13f2f0 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 _0x13b953=a46_0x3c3a;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x13b953(0x9f)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5182fa=a46_0x3c3a,_0x4f1cff=process[_0x5182fa(0xee)][_0x5182fa(0xa5)]();if(_0x4f1cff[_0x5182fa(0xc9)](_0x5182fa(0xbe)))return _0x5182fa(0xbe);return'npm';}const updateFlags=[{'name':a46_0xd9af84(0xea),'type':a46_0xd9af84(0xc8),'description':a46_0xd9af84(0xb6),'default':![]},{'name':a46_0xd9af84(0xcb),'type':a46_0xd9af84(0xb9),'description':a46_0xd9af84(0xa9)}];function getRequestedVersion(_0x5d0f73){const _0x16f24a=a46_0xd9af84;return _0x5d0f73[_0x16f24a(0xbb)](_0x16f24a(0xcb))[_0x16f24a(0xbf)]();}async function validateUpdateFlags(_0x156a85){const _0x367488=a46_0xd9af84,_0x16c628=_0x156a85[_0x367488(0xec)]('beta'),_0x1de3c0=getRequestedVersion(_0x156a85);if(_0x16c628&&_0x1de3c0)throw CliErrors[_0x367488(0xae)](_0x367488(0xa0),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x1de3c0&&!a46_0x13f2f0[_0x367488(0x9e)](_0x1de3c0))throw CliErrors[_0x367488(0xae)](_0x367488(0xdd)+_0x1de3c0,_0x367488(0xe4));}async function fetchNpmDistTags(){const _0x11ff51=a46_0xd9af84;try{const _0x5a12fe=await fetch(_0x11ff51(0xcf)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x11ff51(0xdb),{'signal':AbortSignal[_0x11ff51(0xa6)](0x2710)});if(!_0x5a12fe['ok'])return null;const _0x2cb02b=await _0x5a12fe[_0x11ff51(0xe0)]();if(!_0x2cb02b||typeof _0x2cb02b!==_0x11ff51(0xc5))return null;return Object[_0x11ff51(0xbc)](Object[_0x11ff51(0xde)](_0x2cb02b)[_0x11ff51(0xe7)](([,_0x3b8a02])=>typeof _0x3b8a02==='string'&&_0x3b8a02['trim']()[_0x11ff51(0xac)]>0x0)[_0x11ff51(0xc6)](([_0x2793df,_0x4fd655])=>[_0x2793df,String(_0x4fd655)[_0x11ff51(0xbf)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x388565){const _0x3a3465=await fetchNpmDistTags();return _0x3a3465?.[_0x388565]??null;}async function fetchLatestVersion(){const _0x46bb43=a46_0xd9af84;return fetchNpmDistTagVersion(_0x46bb43(0xb2));}async function resolveTargetVersion(_0x47ba87){const _0x5657ce=a46_0xd9af84,_0x496bcd=getRequestedVersion(_0x47ba87);if(_0x496bcd)return{'version':_0x496bcd,'source':_0x5657ce(0xcb)};if(_0x47ba87[_0x5657ce(0xec)](_0x5657ce(0xea))){const _0xb0bc95=await fetchNpmDistTagVersion(_0x5657ce(0xea));if(!_0xb0bc95)return null;return{'version':_0xb0bc95,'source':_0x5657ce(0xea)};}const _0x29451c=await fetchLatestVersion();if(!_0x29451c)return null;return{'version':_0x29451c,'source':_0x5657ce(0xb2)};}function shouldInstallTarget(_0x419859,_0x3627e5){const _0x535aa9=a46_0xd9af84;if(_0x3627e5[_0x535aa9(0xcc)]===_0x535aa9(0xcb)||_0x3627e5[_0x535aa9(0xcc)]===_0x535aa9(0xea))return!a46_0x13f2f0['eq'](_0x419859,_0x3627e5[_0x535aa9(0xcb)]);return a46_0x13f2f0['lt'](_0x419859,_0x3627e5[_0x535aa9(0xcb)]);}function getInstallPlanLabel(_0x1e9360,_0x3b1f78){const _0x2a8cdc=a46_0xd9af84;switch(_0x3b1f78[_0x2a8cdc(0xcc)]){case _0x2a8cdc(0xea):return _0x2a8cdc(0xb7)+a46_0x3cc2e8[_0x2a8cdc(0xa1)](_0x1e9360)+'\x20→\x20'+a46_0x3cc2e8[_0x2a8cdc(0xef)](_0x3b1f78[_0x2a8cdc(0xcb)]);case _0x2a8cdc(0xcb):return _0x2a8cdc(0xdf)+a46_0x3cc2e8[_0x2a8cdc(0xa1)](_0x1e9360)+_0x2a8cdc(0xa4)+a46_0x3cc2e8[_0x2a8cdc(0xef)](_0x3b1f78[_0x2a8cdc(0xcb)]);case _0x2a8cdc(0xb2):default:return _0x2a8cdc(0xce)+a46_0x3cc2e8['yellow'](_0x1e9360)+_0x2a8cdc(0xa4)+a46_0x3cc2e8[_0x2a8cdc(0xef)](_0x3b1f78[_0x2a8cdc(0xcb)]);}}function a46_0x3c3a(_0x191cff,_0x478035){_0x191cff=_0x191cff-0x9d;const _0x201b04=a46_0x201b();let _0x3c3aa4=_0x201b04[_0x191cff];return _0x3c3aa4;}function repairCurrentBuiltinSkill(){const _0xea77cf=a46_0xd9af84;console[_0xea77cf(0xba)](a46_0x3cc2e8[_0xea77cf(0xf4)](_0xea77cf(0xd7)));const _0x5bb8ac=installBuiltinSkill();if(_0x5bb8ac['ok']){console['log'](a46_0x3cc2e8['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x5bb8ac[_0xea77cf(0xa2)]+_0xea77cf(0xab)));return;}throw CliErrors['apiError']('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x5bb8ac[_0xea77cf(0xe1)]+_0xea77cf(0xaf)+(_0x5bb8ac[_0xea77cf(0xd1)]||_0xea77cf(0xa7)),_0xea77cf(0xc2)+_0x5bb8ac[_0xea77cf(0xe6)]+_0xea77cf(0xb5)+CLI_BIN_NAME+_0xea77cf(0xc7));}function verifyUpdatedBuiltinSkill(_0x3b15b8){const _0x40c3d7=a46_0xd9af84,_0x32bc6e=inspectInstalledBuiltinSkillVersion(_0x3b15b8);if(_0x32bc6e['state']===_0x40c3d7(0xf6)){console[_0x40c3d7(0xba)](a46_0x3cc2e8[_0x40c3d7(0xf4)](_0x40c3d7(0xe5)+_0x3b15b8+_0x40c3d7(0xab)));return;}const _0xbd4f75=_0x32bc6e[_0x40c3d7(0xa2)]?'expected\x20'+_0x3b15b8+_0x40c3d7(0xd0)+_0x32bc6e['skillVersion']:_0x40c3d7(0xdc)+_0x3b15b8+',\x20state\x20'+_0x32bc6e[_0x40c3d7(0xbd)];throw CliErrors[_0x40c3d7(0xf5)](_0x40c3d7(0xb3)+_0x3b15b8+_0x40c3d7(0xf1)+_0xbd4f75,_0x40c3d7(0xc2)+_0x32bc6e['repairCommand']+_0x40c3d7(0xb5)+CLI_BIN_NAME+_0x40c3d7(0xc7));}async function execute(_0x187d22){const _0x250e99=a46_0xd9af84;await validateUpdateFlags(_0x187d22);const _0x30166d=getCurrentVersion();console[_0x250e99(0xba)](_0x250e99(0xd3)+_0x30166d);const _0x3177b1=a46_0x824591('Checking\x20for\x20updates...')['start'](),_0x26e11d=await resolveTargetVersion(_0x187d22);if(!_0x26e11d){const _0x2a7648=_0x187d22[_0x250e99(0xec)](_0x250e99(0xea))?_0x250e99(0xf0):_0x250e99(0xd2);return _0x3177b1[_0x250e99(0xd4)](_0x2a7648),console[_0x250e99(0xba)](a46_0x3cc2e8['gray'](_0x250e99(0xc0)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x2a7648};}const _0x5a9543=a46_0x13f2f0[_0x250e99(0x9e)](VERSION),_0x5366a9=a46_0x13f2f0[_0x250e99(0x9e)](_0x26e11d[_0x250e99(0xcb)]);if(!_0x5a9543||!_0x5366a9)return _0x3177b1[_0x250e99(0xd4)](_0x250e99(0xcd)),{'ok':![],'message':_0x250e99(0xcd)};if(!shouldInstallTarget(_0x5a9543,_0x26e11d)){const _0x160648=_0x26e11d[_0x250e99(0xcc)]===_0x250e99(0xcb)?_0x250e99(0xb1)+_0x26e11d[_0x250e99(0xcb)]+')':a46_0x13f2f0['gt'](_0x5a9543,_0x5366a9)?_0x250e99(0xe3)+_0x30166d+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x26e11d[_0x250e99(0xcb)]:_0x250e99(0xc3)+_0x26e11d[_0x250e99(0xcb)]+')';return _0x3177b1[_0x250e99(0xaa)](_0x160648),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3177b1[_0x250e99(0x9d)](getInstallPlanLabel(_0x30166d,_0x26e11d));const _0x5388f6=detectPackageManager(),_0xdce079=_0x5388f6===_0x250e99(0xb4)?resolveNpmBin('npm'):_0x5388f6,_0x13a575=a46_0x824591(_0x250e99(0xa3)+_0x5388f6+'...')[_0x250e99(0xe2)]();try{await execa(_0xdce079,['install','-g',NPM_PACKAGE_NAME+'@'+_0x26e11d[_0x250e99(0xcb)]],{'stdio':_0x250e99(0xda)}),_0x13a575[_0x250e99(0xaa)]('Updated\x20to\x20v'+_0x26e11d[_0x250e99(0xcb)]),console[_0x250e99(0xba)](a46_0x3cc2e8[_0x250e99(0xf4)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x394acb){return _0x13a575['fail'](_0x250e99(0xe9)),console[_0x250e99(0xd1)](a46_0x3cc2e8[_0x250e99(0xd5)]('\x20\x20'+_0x394acb[_0x250e99(0xf3)])),console[_0x250e99(0xba)](a46_0x3cc2e8['gray']('\x20\x20Try\x20manually:\x20'+_0x5388f6+_0x250e99(0xb8)+NPM_PACKAGE_NAME+'@'+_0x26e11d['version'])),{'ok':![],'message':_0x394acb[_0x250e99(0xf3)]};}return verifyUpdatedBuiltinSkill(_0x26e11d[_0x250e99(0xcb)]),{'ok':!![]};}function a46_0x201b(){const _0x607e12=['1045961oIjKkm','Update\x20failed','beta','3819984sThsya','bool','7428qpGPFU','execPath','green','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','416760iAQUhK','message','gray','apiError','current','info','valid','slice','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','yellow','skillVersion','Updating\x20via\x20','\x20→\x20','toLowerCase','timeout','unknown','run','Install\x20a\x20specific\x20CLI\x20version','succeed','\x20is\x20up\x20to\x20date.','length','588363BnPkvF','validation',']:\x20','1709278UhHVBD','Already\x20on\x20requested\x20version\x20(v','latest','CLI\x20updated\x20to\x20v','npm',',\x20then\x20verify\x20with:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Beta\x20version:\x20','\x20install\x20-g\x20','string','log','str','fromEntries','state','bun','trim','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','650190gaEBZw','Run:\x20','Already\x20up\x20to\x20date\x20(v','16OFCQPM','object','map','\x20doctor','boolean','includes','update','version','source','Version\x20comparison\x20failed','Update\x20available:\x20','https://registry.npmjs.org/-/package/',',\x20found\x20','error','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Current\x20version:\x20','fail','red','620LuoBRv','Checking\x20CLI\x20Built-in\x20Skill...','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','126gccQCq','pipe','/dist-tags','expected\x20','Invalid\x20version:\x20','entries','Requested\x20version:\x20','json','code','start','Current\x20version\x20v','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20\x20CLI\x20Built-in\x20Skill\x20','repairCommand','filter'];a46_0x201b=function(){return _0x607e12;};return a46_0x201b();}export const updateDefinition={'service':a46_0xd9af84(0xca),'command':a46_0xd9af84(0xa8),'description':a46_0xd9af84(0xd8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x38223e,_0x318433){const _0xeaeec2=a47_0x5a11,_0x4165b3=_0x38223e();while(!![]){try{const _0x32c086=parseInt(_0xeaeec2(0x16a))/0x1*(parseInt(_0xeaeec2(0x170))/0x2)+parseInt(_0xeaeec2(0x172))/0x3+parseInt(_0xeaeec2(0x171))/0x4*(parseInt(_0xeaeec2(0x16f))/0x5)+parseInt(_0xeaeec2(0x16b))/0x6+parseInt(_0xeaeec2(0x16e))/0x7+parseInt(_0xeaeec2(0x16c))/0x8+-parseInt(_0xeaeec2(0x16d))/0x9;if(_0x32c086===_0x318433)break;else _0x4165b3['push'](_0x4165b3['shift']());}catch(_0x3df454){_0x4165b3['push'](_0x4165b3['shift']());}}}(a47_0x7ef4,0x20c3e));function a47_0x5a11(_0x2232d9,_0xb1efdd){_0x2232d9=_0x2232d9-0x16a;const _0x7ef4db=a47_0x7ef4();let _0x5a1146=_0x7ef4db[_0x2232d9];return _0x5a1146;}import{codegenSdk}from'../../commands/codegen/sdk.js';function a47_0x7ef4(){const _0x1798cd=['842170kbvrJd','40475WCMoVL','10GbysRk','108eXwvsy','430902tebHCB','50843ybjOPW','863388kDRvpn','769288BGtIQA','7583193OpzuiS'];a47_0x7ef4=function(){return _0x1798cd;};return a47_0x7ef4();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a47_0x4ecb(_0x1f8c49,_0x42deb2){_0x1f8c49=_0x1f8c49-0x10b;const _0x439aa8=a47_0x439a();let _0x4ecb75=_0x439aa8[_0x1f8c49];return _0x4ecb75;}function a47_0x439a(){const _0x402dd4=['4OKbwGc','26113gBRbJD','423LFscPz','39290XkxrIx','20WHGHNb','694918YMpzFk','18KvMXjQ','1076273irwilt','101496CPOhBe','130265WEwcMd','177264GTgJSj'];a47_0x439a=function(){return _0x402dd4;};return a47_0x439a();}(function(_0xd7073e,_0xa4ed89){const _0xedbd90=a47_0x4ecb,_0x3b41bc=_0xd7073e();while(!![]){try{const _0x8a1e8d=parseInt(_0xedbd90(0x114))/0x1*(parseInt(_0xedbd90(0x10c))/0x2)+parseInt(_0xedbd90(0x110))/0x3*(-parseInt(_0xedbd90(0x113))/0x4)+parseInt(_0xedbd90(0x111))/0x5*(parseInt(_0xedbd90(0x10e))/0x6)+-parseInt(_0xedbd90(0x10d))/0x7+parseInt(_0xedbd90(0x112))/0x8+-parseInt(_0xedbd90(0x115))/0x9*(parseInt(_0xedbd90(0x10b))/0xa)+parseInt(_0xedbd90(0x10f))/0xb;if(_0x8a1e8d===_0xa4ed89)break;else _0x3b41bc['push'](_0x3b41bc['shift']());}catch(_0x1539f3){_0x3b41bc['push'](_0x3b41bc['shift']());}}}(a47_0x439a,0x228d1));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a48_0xd36460=a48_0x378a;(function(_0x58382a,_0x1c1fac){const _0x5908b1=a48_0x378a,_0x6e17ac=_0x58382a();while(!![]){try{const _0x51f461=-parseInt(_0x5908b1(0x18d))/0x1*(parseInt(_0x5908b1(0x195))/0x2)+parseInt(_0x5908b1(0x183))/0x3*(-parseInt(_0x5908b1(0x189))/0x4)+parseInt(_0x5908b1(0x19d))/0x5*(parseInt(_0x5908b1(0x190))/0x6)+-parseInt(_0x5908b1(0x18f))/0x7*(parseInt(_0x5908b1(0x19b))/0x8)+-parseInt(_0x5908b1(0x196))/0x9*(parseInt(_0x5908b1(0x18b))/0xa)+parseInt(_0x5908b1(0x184))/0xb+parseInt(_0x5908b1(0x185))/0xc*(parseInt(_0x5908b1(0x191))/0xd);if(_0x51f461===_0x1c1fac)break;else _0x6e17ac['push'](_0x6e17ac['shift']());}catch(_0x250247){_0x6e17ac['push'](_0x6e17ac['shift']());}}}(a48_0x24a5,0x2494a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a48_0x378a(_0x1e12da,_0x46fbc0){_0x1e12da=_0x1e12da-0x183;const _0x24a58c=a48_0x24a5();let _0x378a0e=_0x24a58c[_0x1e12da];return _0x378a0e;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a48_0x24a5(){const _0x487c4d=['9dkBOsY','read','bool','name','sdk','8LOIeKp','tableName','1028015STdJEW','3PognMi','2459314zBBALM','8870652oezhRE','operation','string','str','1018976ObQYZV','Omit\x20import\x20statements\x20from\x20generated\x20code','2566570hCsGxU','boolean','2KWEutq','alias','1641815ddIZeD','6hAJkZO','13RLEmbd','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','skip-imports','272618eGqVyu'];a48_0x24a5=function(){return _0x487c4d;};return a48_0x24a5();}export const codegenSdk={'service':'codegen','command':a48_0xd36460(0x19a),'description':a48_0xd36460(0x193),'risk':a48_0xd36460(0x197),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0xd36460(0x18e),'type':a48_0xd36460(0x187),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a48_0xd36460(0x186),'type':a48_0xd36460(0x187),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a48_0xd36460(0x194),'type':a48_0xd36460(0x18c),'description':a48_0xd36460(0x18a)}],async 'execute'(_0x94da2e){const _0x10f711=a48_0xd36460,{dataset:_0xf9930c,operation:_0x5edef6}=await getOperationDetail(_0x94da2e['appCode'],_0x94da2e[_0x10f711(0x188)](_0x10f711(0x192)),_0x94da2e['str'](_0x10f711(0x186))),_0x2de929=generateSdkCode(_0xf9930c,_0x5edef6,{'includeImports':!_0x94da2e[_0x10f711(0x198)](_0x10f711(0x194))});return{'ok':!![],'data':{'dataset':{'name':_0xf9930c[_0x10f711(0x199)],'code':_0xf9930c[_0x10f711(0x192)],'tableName':_0xf9930c[_0x10f711(0x19c)]},'operation':_0x94da2e[_0x10f711(0x188)](_0x10f711(0x186)),'code':_0x2de929}};}};
1
+ const a48_0x30f3ff=a48_0x1f49;(function(_0x3a958d,_0x58f908){const _0x403684=a48_0x1f49,_0x16b868=_0x3a958d();while(!![]){try{const _0x8384b2=-parseInt(_0x403684(0xa2))/0x1+parseInt(_0x403684(0x9f))/0x2+parseInt(_0x403684(0xa0))/0x3+parseInt(_0x403684(0x99))/0x4+parseInt(_0x403684(0xab))/0x5*(-parseInt(_0x403684(0x9e))/0x6)+parseInt(_0x403684(0xa6))/0x7*(parseInt(_0x403684(0xa3))/0x8)+-parseInt(_0x403684(0x9a))/0x9;if(_0x8384b2===_0x58f908)break;else _0x16b868['push'](_0x16b868['shift']());}catch(_0x2775ab){_0x16b868['push'](_0x16b868['shift']());}}}(a48_0x6840,0xcc313));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a48_0x1f49(_0x5a6531,_0xaa387){_0x5a6531=_0x5a6531-0x96;const _0x684011=a48_0x6840();let _0x1f499e=_0x684011[_0x5a6531];return _0x1f499e;}export const codegenSdk={'service':a48_0x30f3ff(0x98),'command':'sdk','description':a48_0x30f3ff(0x9b),'risk':a48_0x30f3ff(0x97),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0x30f3ff(0x96),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a48_0x30f3ff(0x9d),'type':'string','required':!![],'description':a48_0x30f3ff(0xa9)},{'name':a48_0x30f3ff(0xa4),'type':a48_0x30f3ff(0xaa),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0xdfeb2a){const _0x3079a6=a48_0x30f3ff,{dataset:_0x5f31bc,operation:_0x5b324a}=await getOperationDetail(_0xdfeb2a[_0x3079a6(0xa8)],_0xdfeb2a['str']('code'),_0xdfeb2a['str']('operation')),_0x1259f6=generateSdkCode(_0x5f31bc,_0x5b324a,{'includeImports':!_0xdfeb2a[_0x3079a6(0x9c)](_0x3079a6(0xa4))});return{'ok':!![],'data':{'dataset':{'name':_0x5f31bc['name'],'code':_0x5f31bc[_0x3079a6(0xa7)],'tableName':_0x5f31bc[_0x3079a6(0xa5)]},'operation':_0xdfeb2a[_0x3079a6(0xa1)](_0x3079a6(0x9d)),'code':_0x1259f6}};}};function a48_0x6840(){const _0x4c56b3=['bool','operation','912EIKzxL','1475832DFaxBc','1682061yEuVaf','str','607211RMRqTy','8456216WWlIOp','skip-imports','tableName','7GNomQv','code','appCode','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','boolean','45210MQKVMk','alias','read','codegen','5417416dxAqut','8028162XdgoIu','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation'];a48_0x6840=function(){return _0x4c56b3;};return a48_0x6840();}
@@ -1 +1 @@
1
- function a49_0x4f3c(_0x48f2fe,_0x4e7e7f){_0x48f2fe=_0x48f2fe-0x1df;const _0x133cbd=a49_0x133c();let _0x4f3c68=_0x133cbd[_0x48f2fe];return _0x4f3c68;}const a49_0x551e90=a49_0x4f3c;(function(_0x129b6e,_0x4c197d){const _0x4c920b=a49_0x4f3c,_0x457e68=_0x129b6e();while(!![]){try{const _0x295ef6=parseInt(_0x4c920b(0x1f1))/0x1*(parseInt(_0x4c920b(0x1f5))/0x2)+-parseInt(_0x4c920b(0x1f4))/0x3*(parseInt(_0x4c920b(0x1f3))/0x4)+parseInt(_0x4c920b(0x1e6))/0x5+parseInt(_0x4c920b(0x1f0))/0x6+parseInt(_0x4c920b(0x1e2))/0x7+parseInt(_0x4c920b(0x1e0))/0x8*(-parseInt(_0x4c920b(0x1f2))/0x9)+-parseInt(_0x4c920b(0x1ec))/0xa;if(_0x295ef6===_0x4c197d)break;else _0x457e68['push'](_0x457e68['shift']());}catch(_0x2e0e14){_0x457e68['push'](_0x457e68['shift']());}}}(a49_0x133c,0x1f5c6));function a49_0x133c(){const _0x1d6438=['Omit\x20import\x20statements\x20from\x20generated\x20code','295080WQplCx','string','sqlName','sqlcode','sdk','sqlCode','1258650IKkMHT','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bool','no-imports','907872KbSVhi','138124AgVJPP','9UvsRZy','20iDgcat','120771zZSWBp','2bNjvpx','bff','target','boolean','588376rrmaih','sql','1264893qOUvkO','appCode','str'];a49_0x133c=function(){return _0x1d6438;};return a49_0x133c();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a49_0x551e90(0x1e1),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a49_0x551e90(0x1f7),'type':a49_0x551e90(0x1e7),'description':a49_0x551e90(0x1ed),'default':a49_0x551e90(0x1ea),'enum':[a49_0x551e90(0x1ea),a49_0x551e90(0x1f6)]},{'name':a49_0x551e90(0x1ef),'type':a49_0x551e90(0x1df),'description':a49_0x551e90(0x1e5)}],async 'execute'(_0x2b30ef){const _0x455a69=a49_0x551e90,_0x1f3a62=await getSqlQueryInfo(_0x2b30ef[_0x455a69(0x1e3)],_0x2b30ef[_0x455a69(0x1e4)](_0x455a69(0x1e9))),_0x56f742=_0x2b30ef[_0x455a69(0x1e4)]('target')||_0x455a69(0x1ea),_0x39af5f=generateSqlCodeTemplate(_0x1f3a62,{'target':_0x56f742,'includeImports':!_0x2b30ef[_0x455a69(0x1ee)](_0x455a69(0x1ef))});return{'ok':!![],'data':{'sqlCode':_0x1f3a62[_0x455a69(0x1eb)],'sqlName':_0x1f3a62[_0x455a69(0x1e8)],'target':_0x56f742,'code':_0x39af5f}};}};
1
+ function a49_0x2ffa(){const _0x1bca34=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bool','1888824EtbXke','11uQwuTe','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','5vdOXHt','7413VceZAo','836NiVuZo','string','bff','codegen','str','5184SsSooi','sql','7172076bkjhoS','6610DSmBdh','2097pZMXjM','sdk','2190eKNkxR','sqlCode','no-imports','93076CyHzgq','target','sqlcode','appCode','1351573WCoFEg','Omit\x20import\x20statements\x20from\x20generated\x20code'];a49_0x2ffa=function(){return _0x1bca34;};return a49_0x2ffa();}const a49_0x8ec137=a49_0x49c0;function a49_0x49c0(_0x5f271a,_0x24fc79){_0x5f271a=_0x5f271a-0x106;const _0x2ffa31=a49_0x2ffa();let _0x49c095=_0x2ffa31[_0x5f271a];return _0x49c095;}(function(_0x31fe0e,_0x34b093){const _0xa1cbc4=a49_0x49c0,_0x40b8f7=_0x31fe0e();while(!![]){try{const _0x5e4fc2=parseInt(_0xa1cbc4(0x11a))/0x1+parseInt(_0xa1cbc4(0x108))/0x2*(parseInt(_0xa1cbc4(0x10d))/0x3)+parseInt(_0xa1cbc4(0x116))/0x4*(-parseInt(_0xa1cbc4(0x106))/0x5)+-parseInt(_0xa1cbc4(0x113))/0x6*(parseInt(_0xa1cbc4(0x107))/0x7)+-parseInt(_0xa1cbc4(0x11e))/0x8+parseInt(_0xa1cbc4(0x111))/0x9*(-parseInt(_0xa1cbc4(0x110))/0xa)+-parseInt(_0xa1cbc4(0x11f))/0xb*(parseInt(_0xa1cbc4(0x10f))/0xc);if(_0x5e4fc2===_0x34b093)break;else _0x40b8f7['push'](_0x40b8f7['shift']());}catch(_0x29a87b){_0x40b8f7['push'](_0x40b8f7['shift']());}}}(a49_0x2ffa,0xa51bc));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a49_0x8ec137(0x10b),'command':a49_0x8ec137(0x10e),'description':a49_0x8ec137(0x120),'risk':'read','flags':[SQLCODE_FLAG,{'name':a49_0x8ec137(0x117),'type':a49_0x8ec137(0x109),'description':a49_0x8ec137(0x11c),'default':a49_0x8ec137(0x112),'enum':['sdk',a49_0x8ec137(0x10a)]},{'name':a49_0x8ec137(0x115),'type':'boolean','description':a49_0x8ec137(0x11b)}],async 'execute'(_0x313687){const _0x5a40c8=a49_0x8ec137,_0x4f8e0e=await getSqlQueryInfo(_0x313687[_0x5a40c8(0x119)],_0x313687[_0x5a40c8(0x10c)](_0x5a40c8(0x118))),_0x5b2617=_0x313687[_0x5a40c8(0x10c)]('target')||_0x5a40c8(0x112),_0x34ec12=generateSqlCodeTemplate(_0x4f8e0e,{'target':_0x5b2617,'includeImports':!_0x313687[_0x5a40c8(0x11d)](_0x5a40c8(0x115))});return{'ok':!![],'data':{'sqlCode':_0x4f8e0e[_0x5a40c8(0x114)],'sqlName':_0x4f8e0e['sqlName'],'target':_0x5b2617,'code':_0x34ec12}};}};
@@ -1 +1 @@
1
- (function(_0x1af358,_0x1ea459){const _0xb8bbab=a50_0xa849,_0x2b4c48=_0x1af358();while(!![]){try{const _0x18f58e=-parseInt(_0xb8bbab(0x160))/0x1*(parseInt(_0xb8bbab(0x176))/0x2)+-parseInt(_0xb8bbab(0x179))/0x3+parseInt(_0xb8bbab(0x182))/0x4*(parseInt(_0xb8bbab(0x186))/0x5)+parseInt(_0xb8bbab(0x189))/0x6+parseInt(_0xb8bbab(0x173))/0x7+-parseInt(_0xb8bbab(0x17f))/0x8+parseInt(_0xb8bbab(0x162))/0x9;if(_0x18f58e===_0x1ea459)break;else _0x2b4c48['push'](_0x2b4c48['shift']());}catch(_0x12bbf4){_0x2b4c48['push'](_0x2b4c48['shift']());}}}(a50_0x46cc,0x40c6f));import{CliErrors}from'../../errors.js';function a50_0x46cc(){const _0x335a9e=['bool','3668658ESjqVk','global','keys','142BBglva','\x22\x20(appcode:\x20','\x20<name>\x20--appcode\x20<code>','454935icdPVm','validation','\x20<name>\x20[--global]','apps','args','appcode','3703984izeSpW','defaultApp','object','707908WvEiqT','\x22\x20not\x20found.','Usage:\x20','boolean','10WGNkPr','str','\x20app\x20\x22','53982uNdNWD','App\x20code','2353WXcpjy','globalConfig','1439892wTcRzA','projectConfig','project','trim','\x20Default\x20app\x20is\x20\x22','both','\x20<name>','App\x20\x22','Use\x20global\x20config\x20scope','Added','\x22\x20still\x20defined\x20in\x20','Missing\x20app\x20name.','\x20Note:\x20app\x20\x22','\x20Remaining\x20app\x20\x22','Removed\x20app\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22'];a50_0x46cc=function(){return _0x335a9e;};return a50_0x46cc();}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 _0xb00b1b=a50_0xa849;return[{'name':'appcode','type':'string','description':_0xb00b1b(0x15f),'required':!![]},{'name':_0xb00b1b(0x174),'type':_0xb00b1b(0x185),'description':_0xb00b1b(0x16a),'default':![]},...getAppProfileFlagDefs()];}function a50_0xa849(_0x8fec12,_0x429773){_0x8fec12=_0x8fec12-0x15f;const _0x46ccf9=a50_0x46cc();let _0xa849d5=_0x46ccf9[_0x8fec12];return _0xa849d5;}export function buildAppRemoveFlags(){const _0x4c992f=a50_0xa849;return[{'name':'global','type':_0x4c992f(0x185),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x555473,_0x5cd291){const _0x2bc122=a50_0xa849,_0x37ab81=_0x555473['args'][0x0]?.[_0x2bc122(0x165)]();if(!_0x37ab81)throw CliErrors[_0x2bc122(0x17a)](_0x2bc122(0x16d),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5cd291+_0x2bc122(0x168));}export async function runAppAdd(_0x8d94a,_0x1c34db){const _0x5e011a=a50_0xa849,_0x95c3dd=_0x8d94a[_0x5e011a(0x17d)][0x0]?.[_0x5e011a(0x165)]();if(!_0x95c3dd)throw CliErrors[_0x5e011a(0x17a)](_0x5e011a(0x16d),_0x5e011a(0x184)+CLI_BIN_NAME+'\x20'+_0x1c34db+_0x5e011a(0x178));const _0x2da552=_0x8d94a['str'](_0x5e011a(0x17e));if(!_0x2da552)throw CliErrors['flagMissing'](_0x5e011a(0x17e),_0x5e011a(0x184)+CLI_BIN_NAME+'\x20'+_0x1c34db+_0x5e011a(0x178));const _0x2de3f6={'global':_0x8d94a['bool'](_0x5e011a(0x174))},_0x9fd6d7=readConfig(_0x2de3f6);if(!_0x9fd6d7[_0x5e011a(0x17c)])_0x9fd6d7[_0x5e011a(0x17c)]={};const _0x2e6b12={'appcode':_0x2da552,...collectAppProfileOverrides(_0x47dd88=>_0x8d94a[_0x5e011a(0x187)](_0x47dd88))},_0x484ce9=_0x9fd6d7['apps'],_0x3830a3=Object['keys'](_0x484ce9),_0x56fdfe=typeof _0x9fd6d7[_0x5e011a(0x180)]==='string'&&_0x484ce9[_0x9fd6d7['defaultApp']]?_0x9fd6d7[_0x5e011a(0x180)]:_0x3830a3['length']===0x1?_0x3830a3[0x0]:undefined,_0x1e7fe0=!!_0x484ce9[_0x95c3dd];_0x484ce9[_0x95c3dd]=_0x2e6b12;const _0x58cd92=normalizeStoredDefaultApp(_0x9fd6d7,_0x56fdfe);writeConfig(_0x9fd6d7,_0x2de3f6);const _0x1732c0=!_0x1e7fe0&&_0x58cd92?_0x5e011a(0x166)+_0x58cd92+'\x22.':'',_0x4766f2=(_0x1e7fe0?'Updated':_0x5e011a(0x16b))+_0x5e011a(0x188)+_0x95c3dd+_0x5e011a(0x177)+_0x2da552+')'+scopeLabel(_0x2de3f6)+'.'+_0x1732c0;return{'ok':!![],'message':_0x4766f2};}export async function runAppRemove(_0x1ffb0b,_0x2851a7){const _0x5eed1f=a50_0xa849,_0x5560e5=_0x1ffb0b[_0x5eed1f(0x17d)][0x0]?.['trim']();if(!_0x5560e5)throw CliErrors[_0x5eed1f(0x17a)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2851a7+_0x5eed1f(0x17b));const _0x1dd33e=_0x1ffb0b[_0x5eed1f(0x172)]('global'),{config:_0x259c08,layers:_0x19c891}=readRawConfigWithLayers(),_0x1fc2a9=_0x259c08[_0x5eed1f(0x17c)]??{};if(!_0x1fc2a9[_0x5560e5])throw CliErrors[_0x5eed1f(0x17a)]('App\x20\x22'+_0x5560e5+'\x22\x20not\x20found.');const _0x3a21a0=_0x19c891['globalConfig'][_0x5eed1f(0x17c)]&&typeof _0x19c891[_0x5eed1f(0x161)][_0x5eed1f(0x17c)]===_0x5eed1f(0x181)?_0x19c891[_0x5eed1f(0x161)][_0x5eed1f(0x17c)]:{},_0x18bd6e=_0x19c891[_0x5eed1f(0x163)][_0x5eed1f(0x17c)]&&typeof _0x19c891['projectConfig']['apps']===_0x5eed1f(0x181)?_0x19c891[_0x5eed1f(0x163)][_0x5eed1f(0x17c)]:{},_0x526885=appDefinedIn(_0x5560e5,_0x3a21a0,_0x18bd6e),_0x41851c=resolveAppScopeForWrite(_0x5560e5,_0x1dd33e,_0x19c891),_0x298229={'global':_0x41851c===_0x5eed1f(0x174)},_0x1957c6=readConfig(_0x298229),_0x367564=_0x1957c6[_0x5eed1f(0x17c)];if(!_0x367564||!_0x367564[_0x5560e5])throw CliErrors[_0x5eed1f(0x17a)](_0x5eed1f(0x169)+_0x5560e5+_0x5eed1f(0x183));delete _0x367564[_0x5560e5];let _0xd92a1a='';const _0x1125b5=typeof _0x1957c6[_0x5eed1f(0x180)]==='string'?_0x1957c6[_0x5eed1f(0x180)]:undefined,_0x18e2d6=Object['keys'](_0x367564),_0x608a30=_0x1125b5===_0x5560e5?_0x18e2d6[0x0]:_0x1125b5,_0x13d2b5=normalizeStoredDefaultApp(_0x1957c6,_0x608a30);if(_0x1125b5===_0x5560e5&&_0x18e2d6['length']===0x1)_0xd92a1a=_0x5eed1f(0x16f)+_0x18e2d6[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x1125b5===_0x5560e5&&_0x13d2b5&&(_0xd92a1a=_0x5eed1f(0x171)+_0x13d2b5+'\x22.');Object[_0x5eed1f(0x175)](_0x367564)['length']===0x0&&(delete _0x1957c6[_0x5eed1f(0x17c)],delete _0x1957c6[_0x5eed1f(0x180)]);writeConfig(_0x1957c6,_0x298229);const _0x3f211c=_0x526885===_0x5eed1f(0x167)?_0x5eed1f(0x16e)+_0x5560e5+_0x5eed1f(0x16c)+(_0x41851c===_0x5eed1f(0x164)?_0x5eed1f(0x174):_0x5eed1f(0x164))+'\x20config.':'';return{'ok':!![],'message':_0x5eed1f(0x170)+_0x5560e5+'\x22'+scopeLabel(_0x298229)+'.'+_0xd92a1a+_0x3f211c};}
1
+ function a50_0x4c19(){const _0x484198=['\x22\x20still\x20defined\x20in\x20','defaultApp','str','project','Usage:\x20','\x22\x20not\x20found.','6lNwqth','5804jttswN','trim','args','\x20Default\x20app\x20is\x20\x22','\x20Remaining\x20app\x20\x22','string','\x20Default\x20app\x20changed\x20to\x20\x22','keys','Use\x20global\x20config\x20scope','189929NMhyvt','\x20<name>\x20--appcode\x20<code>','object','bool','27664150ryQCSS','\x20<name>\x20[--global]','length','\x20Note:\x20app\x20\x22','37709DqiUFA','appcode','App\x20code','Added','9575820DMoSrB','1650YVxPCB','843HAnyfd','Missing\x20app\x20name.','7918425vCBATW','projectConfig','Updated','Removed\x20app\x20\x22','boolean','1007768GyrMiI','globalConfig','validation','apps','global','\x20app\x20\x22'];a50_0x4c19=function(){return _0x484198;};return a50_0x4c19();}(function(_0x34ec56,_0x6982b0){const _0x523df4=a50_0x39a0,_0x5dd82f=_0x34ec56();while(!![]){try{const _0x14e0c1=-parseInt(_0x523df4(0xbe))/0x1*(-parseInt(_0x523df4(0xb4))/0x2)+-parseInt(_0x523df4(0xcc))/0x3*(parseInt(_0x523df4(0xb5))/0x4)+-parseInt(_0x523df4(0xce))/0x5+-parseInt(_0x523df4(0xcb))/0x6*(parseInt(_0x523df4(0xc6))/0x7)+-parseInt(_0x523df4(0xd3))/0x8+parseInt(_0x523df4(0xca))/0x9+parseInt(_0x523df4(0xc2))/0xa;if(_0x14e0c1===_0x6982b0)break;else _0x5dd82f['push'](_0x5dd82f['shift']());}catch(_0x2a8637){_0x5dd82f['push'](_0x5dd82f['shift']());}}}(a50_0x4c19,0xc3a5a));function a50_0x39a0(_0x5a4b87,_0xff4925){_0x5a4b87=_0x5a4b87-0xaf;const _0x4c19eb=a50_0x4c19();let _0x39a053=_0x4c19eb[_0x5a4b87];return _0x39a053;}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 _0x46bcea=a50_0x39a0;return[{'name':_0x46bcea(0xc7),'type':_0x46bcea(0xba),'description':_0x46bcea(0xc8),'required':!![]},{'name':'global','type':_0x46bcea(0xd2),'description':_0x46bcea(0xbd),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x290d37=a50_0x39a0;return[{'name':'global','type':_0x290d37(0xd2),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x47b2d1,_0x4f9838){const _0x3f8c32=a50_0x39a0,_0x552fbc=_0x47b2d1[_0x3f8c32(0xb7)][0x0]?.[_0x3f8c32(0xb6)]();if(!_0x552fbc)throw CliErrors['validation'](_0x3f8c32(0xcd),_0x3f8c32(0xb2)+CLI_BIN_NAME+'\x20'+_0x4f9838+'\x20<name>');}export async function runAppAdd(_0x3b3775,_0x54b0a1){const _0x4e4f92=a50_0x39a0,_0x4db2e0=_0x3b3775['args'][0x0]?.[_0x4e4f92(0xb6)]();if(!_0x4db2e0)throw CliErrors['validation'](_0x4e4f92(0xcd),_0x4e4f92(0xb2)+CLI_BIN_NAME+'\x20'+_0x54b0a1+'\x20<name>\x20--appcode\x20<code>');const _0x2256c4=_0x3b3775[_0x4e4f92(0xb0)](_0x4e4f92(0xc7));if(!_0x2256c4)throw CliErrors['flagMissing'](_0x4e4f92(0xc7),_0x4e4f92(0xb2)+CLI_BIN_NAME+'\x20'+_0x54b0a1+_0x4e4f92(0xbf));const _0x1053c5={'global':_0x3b3775[_0x4e4f92(0xc1)](_0x4e4f92(0xd7))},_0x3cf7ed=readConfig(_0x1053c5);if(!_0x3cf7ed['apps'])_0x3cf7ed[_0x4e4f92(0xd6)]={};const _0x1d6d54={'appcode':_0x2256c4,...collectAppProfileOverrides(_0x2d6943=>_0x3b3775[_0x4e4f92(0xb0)](_0x2d6943))},_0xa2fe60=_0x3cf7ed[_0x4e4f92(0xd6)],_0x417448=Object['keys'](_0xa2fe60),_0xcfef02=typeof _0x3cf7ed[_0x4e4f92(0xaf)]===_0x4e4f92(0xba)&&_0xa2fe60[_0x3cf7ed[_0x4e4f92(0xaf)]]?_0x3cf7ed[_0x4e4f92(0xaf)]:_0x417448[_0x4e4f92(0xc4)]===0x1?_0x417448[0x0]:undefined,_0x4edc56=!!_0xa2fe60[_0x4db2e0];_0xa2fe60[_0x4db2e0]=_0x1d6d54;const _0x3ac3cb=normalizeStoredDefaultApp(_0x3cf7ed,_0xcfef02);writeConfig(_0x3cf7ed,_0x1053c5);const _0x308a3f=!_0x4edc56&&_0x3ac3cb?_0x4e4f92(0xb8)+_0x3ac3cb+'\x22.':'',_0x5bf32a=(_0x4edc56?_0x4e4f92(0xd0):_0x4e4f92(0xc9))+_0x4e4f92(0xd8)+_0x4db2e0+'\x22\x20(appcode:\x20'+_0x2256c4+')'+scopeLabel(_0x1053c5)+'.'+_0x308a3f;return{'ok':!![],'message':_0x5bf32a};}export async function runAppRemove(_0x12ed68,_0x7475c7){const _0x1408b5=a50_0x39a0,_0x148b20=_0x12ed68[_0x1408b5(0xb7)][0x0]?.['trim']();if(!_0x148b20)throw CliErrors[_0x1408b5(0xd5)]('Missing\x20app\x20name.',_0x1408b5(0xb2)+CLI_BIN_NAME+'\x20'+_0x7475c7+_0x1408b5(0xc3));const _0x542bb7=_0x12ed68[_0x1408b5(0xc1)](_0x1408b5(0xd7)),{config:_0x5d04bf,layers:_0x2a128d}=readRawConfigWithLayers(),_0x1e5981=_0x5d04bf[_0x1408b5(0xd6)]??{};if(!_0x1e5981[_0x148b20])throw CliErrors[_0x1408b5(0xd5)]('App\x20\x22'+_0x148b20+'\x22\x20not\x20found.');const _0x3c384b=_0x2a128d['globalConfig']['apps']&&typeof _0x2a128d[_0x1408b5(0xd4)][_0x1408b5(0xd6)]===_0x1408b5(0xc0)?_0x2a128d['globalConfig']['apps']:{},_0x533d91=_0x2a128d[_0x1408b5(0xcf)][_0x1408b5(0xd6)]&&typeof _0x2a128d[_0x1408b5(0xcf)][_0x1408b5(0xd6)]===_0x1408b5(0xc0)?_0x2a128d[_0x1408b5(0xcf)]['apps']:{},_0x566314=appDefinedIn(_0x148b20,_0x3c384b,_0x533d91),_0x31741b=resolveAppScopeForWrite(_0x148b20,_0x542bb7,_0x2a128d),_0x4709ca={'global':_0x31741b===_0x1408b5(0xd7)},_0x432595=readConfig(_0x4709ca),_0xa87e60=_0x432595[_0x1408b5(0xd6)];if(!_0xa87e60||!_0xa87e60[_0x148b20])throw CliErrors[_0x1408b5(0xd5)]('App\x20\x22'+_0x148b20+_0x1408b5(0xb3));delete _0xa87e60[_0x148b20];let _0x28e63c='';const _0x8918b4=typeof _0x432595[_0x1408b5(0xaf)]==='string'?_0x432595[_0x1408b5(0xaf)]:undefined,_0x3d4d77=Object[_0x1408b5(0xbc)](_0xa87e60),_0x23e27d=_0x8918b4===_0x148b20?_0x3d4d77[0x0]:_0x8918b4,_0x38ec4b=normalizeStoredDefaultApp(_0x432595,_0x23e27d);if(_0x8918b4===_0x148b20&&_0x3d4d77[_0x1408b5(0xc4)]===0x1)_0x28e63c=_0x1408b5(0xb9)+_0x3d4d77[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x8918b4===_0x148b20&&_0x38ec4b&&(_0x28e63c=_0x1408b5(0xbb)+_0x38ec4b+'\x22.');Object[_0x1408b5(0xbc)](_0xa87e60)[_0x1408b5(0xc4)]===0x0&&(delete _0x432595[_0x1408b5(0xd6)],delete _0x432595[_0x1408b5(0xaf)]);writeConfig(_0x432595,_0x4709ca);const _0x37e4fe=_0x566314==='both'?_0x1408b5(0xc5)+_0x148b20+_0x1408b5(0xd9)+(_0x31741b==='project'?_0x1408b5(0xd7):_0x1408b5(0xb1))+'\x20config.':'';return{'ok':!![],'message':_0x1408b5(0xd1)+_0x148b20+'\x22'+scopeLabel(_0x4709ca)+'.'+_0x28e63c+_0x37e4fe};}
@@ -1 +1 @@
1
- (function(_0x4aa0c0,_0x9df2a2){const _0x53a0b3=a51_0x2057,_0x22e377=_0x4aa0c0();while(!![]){try{const _0x23d084=parseInt(_0x53a0b3(0x203))/0x1+parseInt(_0x53a0b3(0x201))/0x2*(parseInt(_0x53a0b3(0x205))/0x3)+parseInt(_0x53a0b3(0x212))/0x4*(parseInt(_0x53a0b3(0x213))/0x5)+-parseInt(_0x53a0b3(0x207))/0x6+parseInt(_0x53a0b3(0x1f3))/0x7+-parseInt(_0x53a0b3(0x1f6))/0x8*(-parseInt(_0x53a0b3(0x214))/0x9)+-parseInt(_0x53a0b3(0x202))/0xa;if(_0x23d084===_0x9df2a2)break;else _0x22e377['push'](_0x22e377['shift']());}catch(_0x55be92){_0x22e377['push'](_0x22e377['shift']());}}}(a51_0x3445,0x90c31));import{input,checkbox,select}from'@inquirer/prompts';import a51_0x579f31 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 _0x582ab0=a51_0x2057,_0x9aba77=await input({'message':_0x582ab0(0x210),'validate':_0x2c542e=>{const _0x14961c=_0x582ab0,_0x2c08bd=validateAppcode(_0x2c542e[_0x14961c(0x20c)]());return _0x2c08bd['valid']||_0x2c08bd[_0x14961c(0x20e)]||_0x14961c(0x1f4);}});return _0x9aba77[_0x582ab0(0x20c)]();}export async function promptAppSelection(_0x191a3a){const _0xfda70f=a51_0x2057,_0x22c16f=[{'name':a51_0x579f31[_0xfda70f(0x1f7)](_0xfda70f(0x20f)),'value':-0x1},..._0x191a3a[_0xfda70f(0x1fa)]((_0x1fa111,_0x2b484c)=>({'name':_0x1fa111[_0xfda70f(0x20a)]+'\x20\x20'+a51_0x579f31[_0xfda70f(0x1fe)]('('+_0x1fa111[_0xfda70f(0x206)]+')'),'value':_0x2b484c}))],_0x4d9825=await checkbox({'message':_0xfda70f(0x215)+a51_0x579f31[_0xfda70f(0x204)](_0x191a3a['length'])+_0xfda70f(0x211),'choices':_0x22c16f,'loop':![]});if(_0x4d9825['includes'](-0x1))return _0xfda70f(0x1ff);if(_0x4d9825[_0xfda70f(0x208)]===0x0)return _0xfda70f(0x1ff);return _0x4d9825[_0xfda70f(0x1fa)](_0x467223=>_0x191a3a[_0x467223]);}export async function promptSingleAppSelection(_0x24eeef){const _0x57bf9a=a51_0x2057,_0x23ec9e=[{'name':a51_0x579f31[_0x57bf9a(0x1fe)](_0x57bf9a(0x1fc)),'value':'skip'},{'name':a51_0x579f31['yellow'](_0x57bf9a(0x20f)),'value':_0x57bf9a(0x1ff)},..._0x24eeef[_0x57bf9a(0x1fa)](_0xd27940=>({'name':_0xd27940[_0x57bf9a(0x20a)]+'\x20\x20'+a51_0x579f31[_0x57bf9a(0x1fe)]('('+_0xd27940[_0x57bf9a(0x206)]+')'),'value':_0xd27940[_0x57bf9a(0x206)]}))],_0x316d67=await select({'message':_0x57bf9a(0x1f5),'choices':_0x23ec9e});if(_0x316d67==='skip')return _0x57bf9a(0x1f8);if(_0x316d67==='custom')return _0x57bf9a(0x1ff);return _0x24eeef[_0x57bf9a(0x1fd)](_0x4e9cc8=>_0x4e9cc8[_0x57bf9a(0x206)]===_0x316d67);}function a51_0x3445(){const _0x1472d6=['length','(Skip;\x20configure\x20later)','appName','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','trim','\x0aNo\x20available\x20apps\x20found.','message','✎\x20Enter\x20appcode\x20manually','App\x20Code:','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','656wsBidJ','21885vtowBL','9MWGoDP','Found\x20','\x20\x20(','7627823fxcGtq','Invalid\x20App\x20Code','Select\x20the\x20app\x20to\x20bind:','4979896aqAutG','yellow','skip','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','map','Fetching\x20available\x20apps...','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','find','gray','custom','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','278346vzlNDx','20629330pRbPXA','257399EkDINx','cyan','18yWuUxw','appCode','5199378QiWize'];a51_0x3445=function(){return _0x1472d6;};return a51_0x3445();}export async function selectSingleAppcode(_0x333e89){const _0x5ce34b=a51_0x2057;if(!_0x333e89)return writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1fe)](_0x5ce34b(0x20b))),_fallbackOrSkip();writeCliSideChannelLine(_0x5ce34b(0x1fb));let _0x5ea428;try{_0x5ea428=await withActiveCookie(_0x333e89,()=>listRemoteApps());}catch(_0x122410){writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1f7)](_0x5ce34b(0x1f9)));if(_0x122410 instanceof Error)writeCliSideChannelLine(a51_0x579f31['gray'](_0x5ce34b(0x216)+_0x122410[_0x5ce34b(0x20e)]+')'));return _fallbackOrSkip();}if(_0x5ea428[_0x5ce34b(0x208)]===0x0)return writeCliSideChannelLine(a51_0x579f31[_0x5ce34b(0x1f7)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x6488db=await promptSingleAppSelection(_0x5ea428);if(_0x6488db===_0x5ce34b(0x1f8))return'';if(_0x6488db==='custom')return promptCustomAppcode();return _0x6488db['appCode'];}function a51_0x2057(_0x470527,_0x2dc548){_0x470527=_0x470527-0x1f3;const _0x3445c4=a51_0x3445();let _0x205724=_0x3445c4[_0x470527];return _0x205724;}export async function selectMultipleApps(_0x4ea2b8){const _0x571734=a51_0x2057;writeCliSideChannelLine(_0x571734(0x1fb));let _0x124813;try{_0x124813=await withActiveCookie(_0x4ea2b8,()=>listRemoteApps());}catch(_0x37a700){writeCliSideChannelLine(_0x571734(0x200));if(_0x37a700 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x37a700['message']+')');return _0x571734(0x1ff);}if(_0x124813['length']===0x0)return writeCliSideChannelLine(_0x571734(0x20d)),_0x571734(0x1ff);return promptAppSelection(_0x124813);}async function _fallbackOrSkip(){const _0x4cbfec=a51_0x2057,_0x140605=await select({'message':_0x4cbfec(0x210),'choices':[{'name':a51_0x579f31[_0x4cbfec(0x1fe)](_0x4cbfec(0x209)),'value':_0x4cbfec(0x1f8)},{'name':a51_0x579f31[_0x4cbfec(0x1f7)]('✎\x20Enter\x20manually'),'value':'manual'}]});if(_0x140605==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x37b302,_0x5c34c6){const _0x4fb01d=a51_0x4fdf,_0x4836b8=_0x37b302();while(!![]){try{const _0x6bcb3e=-parseInt(_0x4fb01d(0x149))/0x1+parseInt(_0x4fb01d(0x14c))/0x2+parseInt(_0x4fb01d(0x15d))/0x3+parseInt(_0x4fb01d(0x13d))/0x4+parseInt(_0x4fb01d(0x154))/0x5*(parseInt(_0x4fb01d(0x15b))/0x6)+-parseInt(_0x4fb01d(0x148))/0x7+parseInt(_0x4fb01d(0x142))/0x8*(-parseInt(_0x4fb01d(0x150))/0x9);if(_0x6bcb3e===_0x5c34c6)break;else _0x4836b8['push'](_0x4836b8['shift']());}catch(_0x3448be){_0x4836b8['push'](_0x4836b8['shift']());}}}(a51_0x50bb,0xd1fed));import{input,checkbox,select}from'@inquirer/prompts';import a51_0x176291 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 _0x37cbe2=await input({'message':'App\x20Code:','validate':_0x39e638=>{const _0xfdbe57=a51_0x4fdf,_0x3de538=validateAppcode(_0x39e638['trim']());return _0x3de538[_0xfdbe57(0x140)]||_0x3de538[_0xfdbe57(0x14b)]||_0xfdbe57(0x13f);}});return _0x37cbe2['trim']();}function a51_0x50bb(){const _0x4e9953=['\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Select\x20the\x20app\x20to\x20bind:','3378245vrqDho','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','appCode','Fetching\x20available\x20apps...','(Skip;\x20configure\x20later)','Found\x20','custom','6WYrcze','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','3180516fnKRbD','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','2397644lGkpii','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Invalid\x20App\x20Code','valid','manual','136XwBYCU','yellow','✎\x20Enter\x20appcode\x20manually','\x20\x20(','gray','skip','2484531gYpjtP','1264940qZcgnw','\x0aNo\x20available\x20apps\x20found.','message','2806482llSQFm','includes','length','appName','666243TwEkny','map'];a51_0x50bb=function(){return _0x4e9953;};return a51_0x50bb();}export async function promptAppSelection(_0x473543){const _0x2bab1a=a51_0x4fdf,_0x333ef7=[{'name':a51_0x176291[_0x2bab1a(0x143)](_0x2bab1a(0x144)),'value':-0x1},..._0x473543[_0x2bab1a(0x151)]((_0x4419c3,_0xf1c03e)=>({'name':_0x4419c3[_0x2bab1a(0x14f)]+'\x20\x20'+a51_0x176291[_0x2bab1a(0x146)]('('+_0x4419c3[_0x2bab1a(0x156)]+')'),'value':_0xf1c03e}))],_0x38626d=await checkbox({'message':_0x2bab1a(0x159)+a51_0x176291['cyan'](_0x473543[_0x2bab1a(0x14e)])+_0x2bab1a(0x13c),'choices':_0x333ef7,'loop':![]});if(_0x38626d[_0x2bab1a(0x14d)](-0x1))return _0x2bab1a(0x15a);if(_0x38626d[_0x2bab1a(0x14e)]===0x0)return'custom';return _0x38626d['map'](_0x5b8499=>_0x473543[_0x5b8499]);}export async function promptSingleAppSelection(_0x1b6a20){const _0x246380=a51_0x4fdf,_0x1257c9=[{'name':a51_0x176291['gray'](_0x246380(0x15c)),'value':_0x246380(0x147)},{'name':a51_0x176291[_0x246380(0x143)]('✎\x20Enter\x20appcode\x20manually'),'value':_0x246380(0x15a)},..._0x1b6a20['map'](_0x3c8247=>({'name':_0x3c8247[_0x246380(0x14f)]+'\x20\x20'+a51_0x176291['gray']('('+_0x3c8247[_0x246380(0x156)]+')'),'value':_0x3c8247[_0x246380(0x156)]}))],_0xc7a4b0=await select({'message':_0x246380(0x153),'choices':_0x1257c9});if(_0xc7a4b0==='skip')return _0x246380(0x147);if(_0xc7a4b0==='custom')return _0x246380(0x15a);return _0x1b6a20['find'](_0x21d20d=>_0x21d20d[_0x246380(0x156)]===_0xc7a4b0);}function a51_0x4fdf(_0x5118b0,_0x299340){_0x5118b0=_0x5118b0-0x13c;const _0x50bbcc=a51_0x50bb();let _0x4fdf52=_0x50bbcc[_0x5118b0];return _0x4fdf52;}export async function selectSingleAppcode(_0x134c48){const _0x1bbe02=a51_0x4fdf;if(!_0x134c48)return writeCliSideChannelLine(a51_0x176291[_0x1bbe02(0x146)](_0x1bbe02(0x155))),_fallbackOrSkip();writeCliSideChannelLine(_0x1bbe02(0x157));let _0x460f29;try{_0x460f29=await withActiveCookie(_0x134c48,()=>listRemoteApps());}catch(_0xa09f63){writeCliSideChannelLine(a51_0x176291['yellow'](_0x1bbe02(0x13e)));if(_0xa09f63 instanceof Error)writeCliSideChannelLine(a51_0x176291[_0x1bbe02(0x146)](_0x1bbe02(0x145)+_0xa09f63[_0x1bbe02(0x14b)]+')'));return _fallbackOrSkip();}if(_0x460f29[_0x1bbe02(0x14e)]===0x0)return writeCliSideChannelLine(a51_0x176291[_0x1bbe02(0x143)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x517566=await promptSingleAppSelection(_0x460f29);if(_0x517566===_0x1bbe02(0x147))return'';if(_0x517566==='custom')return promptCustomAppcode();return _0x517566[_0x1bbe02(0x156)];}export async function selectMultipleApps(_0x2df91c){const _0x2c9c75=a51_0x4fdf;writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x1cc533;try{_0x1cc533=await withActiveCookie(_0x2df91c,()=>listRemoteApps());}catch(_0x5ce6fe){writeCliSideChannelLine(_0x2c9c75(0x152));if(_0x5ce6fe instanceof Error)writeCliSideChannelLine(_0x2c9c75(0x145)+_0x5ce6fe[_0x2c9c75(0x14b)]+')');return _0x2c9c75(0x15a);}if(_0x1cc533[_0x2c9c75(0x14e)]===0x0)return writeCliSideChannelLine(_0x2c9c75(0x14a)),_0x2c9c75(0x15a);return promptAppSelection(_0x1cc533);}async function _fallbackOrSkip(){const _0x1275a3=a51_0x4fdf,_0x2efd70=await select({'message':'App\x20Code:','choices':[{'name':a51_0x176291[_0x1275a3(0x146)](_0x1275a3(0x158)),'value':_0x1275a3(0x147)},{'name':a51_0x176291[_0x1275a3(0x143)]('✎\x20Enter\x20manually'),'value':_0x1275a3(0x141)}]});if(_0x2efd70===_0x1275a3(0x147))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a52_0x2aa0(){const _0x43d9d6=['toUpperCase','63yTzGnB','taskId','replace','26ejQmpc','errorMessage','has','FAILED','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20--appcode\x20','\x20is\x20processing.','PROCESSING','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','apiError','string','SUCCESS','trim','Async\x20task\x20','PENDING','2265775IHlpdW','492zBIuOH','30144HRWWNJ','\x27\x5c\x27\x27','7445152pFBSjO','1186486XGAIVQ','\x20completed\x20successfully.','Task\x20','status','\x20failed:\x20','805060INXAWk','\x20task\x20status\x20--task-id\x20','44583oeyZrV','\x20--format\x20compress','302128WWOjhF','\x20failed.'];a52_0x2aa0=function(){return _0x43d9d6;};return a52_0x2aa0();}const a52_0x406bfc=a52_0x57e3;(function(_0x471558,_0xacd8bc){const _0x452b4c=a52_0x57e3,_0x301b05=_0x471558();while(!![]){try{const _0x3ad81e=parseInt(_0x452b4c(0x200))/0x1+parseInt(_0x452b4c(0x1ec))/0x2*(-parseInt(_0x452b4c(0x1fd))/0x3)+-parseInt(_0x452b4c(0x209))/0x4+-parseInt(_0x452b4c(0x1fb))/0x5+-parseInt(_0x452b4c(0x1fc))/0x6*(-parseInt(_0x452b4c(0x207))/0x7)+-parseInt(_0x452b4c(0x1ff))/0x8+-parseInt(_0x452b4c(0x1e9))/0x9*(-parseInt(_0x452b4c(0x205))/0xa);if(_0x3ad81e===_0xacd8bc)break;else _0x301b05['push'](_0x301b05['shift']());}catch(_0x28f6b9){_0x301b05['push'](_0x301b05['shift']());}}}(a52_0x2aa0,0xa695b));function a52_0x57e3(_0x51b8ae,_0x28e040){_0x51b8ae=_0x51b8ae-0x1e7;const _0x2aa0fd=a52_0x2aa0();let _0x57e3ba=_0x2aa0fd[_0x51b8ae];return _0x57e3ba;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a52_0x406bfc(0x1f7),a52_0x406bfc(0x1ef)]),NON_TERMINAL_STATUSES=new Set([a52_0x406bfc(0x1fa),a52_0x406bfc(0x1f3)]);export function normalizeAsyncTask(_0x402658){const _0x2b77e2=a52_0x406bfc,_0x583503=typeof _0x402658?.[_0x2b77e2(0x1ea)]===_0x2b77e2(0x1f6)?_0x402658[_0x2b77e2(0x1ea)][_0x2b77e2(0x1f8)]():'';if(!_0x583503)throw CliErrors[_0x2b77e2(0x1f5)](_0x2b77e2(0x1f4));const _0x482b79=typeof _0x402658[_0x2b77e2(0x203)]===_0x2b77e2(0x1f6)?_0x402658['status']['trim']()[_0x2b77e2(0x1e8)]():'';if(!_0x482b79)throw CliErrors['apiError'](_0x2b77e2(0x1f9)+_0x583503+_0x2b77e2(0x1f0));return{'taskId':_0x583503,'status':_0x482b79,'errorMessage':typeof _0x402658[_0x2b77e2(0x1ed)]==='string'&&_0x402658[_0x2b77e2(0x1ed)]['trim']()?_0x402658[_0x2b77e2(0x1ed)][_0x2b77e2(0x1f8)]():null,'isTerminal':TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79),'knownStatus':TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79)||NON_TERMINAL_STATUSES[_0x2b77e2(0x1ee)](_0x482b79)};}export function buildAsyncTaskStatusCommand(_0x298185,_0x4d49c8){const _0x43f7f9=a52_0x406bfc;return CLI_BIN_NAME+_0x43f7f9(0x206)+quoteShellArg(_0x298185)+_0x43f7f9(0x1f1)+quoteShellArg(_0x4d49c8)+_0x43f7f9(0x208);}export function asyncTaskMessage(_0x3533bb){const _0x4be88e=a52_0x406bfc;switch(_0x3533bb[_0x4be88e(0x203)]){case'PENDING':return'Task\x20'+_0x3533bb['taskId']+'\x20is\x20pending.';case _0x4be88e(0x1f3):return _0x4be88e(0x202)+_0x3533bb['taskId']+_0x4be88e(0x1f2);case _0x4be88e(0x1f7):return _0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x201);case _0x4be88e(0x1ef):return _0x3533bb['errorMessage']?_0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x204)+_0x3533bb['errorMessage']:_0x4be88e(0x202)+_0x3533bb[_0x4be88e(0x1ea)]+_0x4be88e(0x1e7);default:return'Task\x20'+_0x3533bb[_0x4be88e(0x1ea)]+'\x20returned\x20unknown\x20status\x20'+_0x3533bb['status']+'.';}}function quoteShellArg(_0x77faad){const _0x43bb28=a52_0x406bfc;return'\x27'+_0x77faad[_0x43bb28(0x1eb)](/'/g,_0x43bb28(0x1fe))+'\x27';}
1
+ const a52_0x2579cf=a52_0xc417;(function(_0x35803e,_0x329e8c){const _0xdcda1a=a52_0xc417,_0x3c28d3=_0x35803e();while(!![]){try{const _0x48aa22=parseInt(_0xdcda1a(0xc9))/0x1+-parseInt(_0xdcda1a(0xbb))/0x2+-parseInt(_0xdcda1a(0xc6))/0x3*(parseInt(_0xdcda1a(0xce))/0x4)+-parseInt(_0xdcda1a(0xcc))/0x5*(-parseInt(_0xdcda1a(0xca))/0x6)+parseInt(_0xdcda1a(0xc1))/0x7*(-parseInt(_0xdcda1a(0xb6))/0x8)+-parseInt(_0xdcda1a(0xbf))/0x9*(parseInt(_0xdcda1a(0xb7))/0xa)+parseInt(_0xdcda1a(0xb8))/0xb*(parseInt(_0xdcda1a(0xc8))/0xc);if(_0x48aa22===_0x329e8c)break;else _0x3c28d3['push'](_0x3c28d3['shift']());}catch(_0x2619d7){_0x3c28d3['push'](_0x3c28d3['shift']());}}}(a52_0x5451,0xc4066));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a52_0x2579cf(0xc4)]),NON_TERMINAL_STATUSES=new Set([a52_0x2579cf(0xc2),a52_0x2579cf(0xbe)]);function a52_0x5451(){const _0x51a4d6=['\x27\x5c\x27\x27','replace','has','3560HXAIZa','5602660kOomrn','340461xuUfBG','string','\x20is\x20processing.','2882868eXYqKO','trim','\x20failed.','PROCESSING','18wKuPXF','\x20--format\x20compress','4900bZlOPR','PENDING','\x20is\x20pending.','FAILED','toUpperCase','119562VbTbaM','\x20completed\x20successfully.','1272joDYRM','1058175QoAUkw','6HqwnOG','\x20--appcode\x20','2067305fBUfEH','Task\x20','108SUcgxs','errorMessage','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20returned\x20unknown\x20status\x20','taskId','status','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a52_0x5451=function(){return _0x51a4d6;};return a52_0x5451();}export function normalizeAsyncTask(_0x3604bf){const _0x11e4de=a52_0x2579cf,_0x166570=typeof _0x3604bf?.['taskId']==='string'?_0x3604bf[_0x11e4de(0xd2)][_0x11e4de(0xbc)]():'';if(!_0x166570)throw CliErrors['apiError'](_0x11e4de(0xd0));const _0x222b49=typeof _0x3604bf[_0x11e4de(0xd3)]===_0x11e4de(0xb9)?_0x3604bf[_0x11e4de(0xd3)][_0x11e4de(0xbc)]()[_0x11e4de(0xc5)]():'';if(!_0x222b49)throw CliErrors['apiError']('Async\x20task\x20'+_0x166570+_0x11e4de(0xd4));return{'taskId':_0x166570,'status':_0x222b49,'errorMessage':typeof _0x3604bf[_0x11e4de(0xcf)]===_0x11e4de(0xb9)&&_0x3604bf['errorMessage'][_0x11e4de(0xbc)]()?_0x3604bf['errorMessage'][_0x11e4de(0xbc)]():null,'isTerminal':TERMINAL_STATUSES[_0x11e4de(0xb5)](_0x222b49),'knownStatus':TERMINAL_STATUSES[_0x11e4de(0xb5)](_0x222b49)||NON_TERMINAL_STATUSES[_0x11e4de(0xb5)](_0x222b49)};}export function buildAsyncTaskStatusCommand(_0x2d7299,_0x2e9fed){const _0x29c8aa=a52_0x2579cf;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x2d7299)+_0x29c8aa(0xcb)+quoteShellArg(_0x2e9fed)+_0x29c8aa(0xc0);}export function asyncTaskMessage(_0x8841a9){const _0xda1ed6=a52_0x2579cf;switch(_0x8841a9[_0xda1ed6(0xd3)]){case _0xda1ed6(0xc2):return _0xda1ed6(0xcd)+_0x8841a9['taskId']+_0xda1ed6(0xc3);case _0xda1ed6(0xbe):return _0xda1ed6(0xcd)+_0x8841a9[_0xda1ed6(0xd2)]+_0xda1ed6(0xba);case'SUCCESS':return _0xda1ed6(0xcd)+_0x8841a9['taskId']+_0xda1ed6(0xc7);case'FAILED':return _0x8841a9['errorMessage']?_0xda1ed6(0xcd)+_0x8841a9[_0xda1ed6(0xd2)]+'\x20failed:\x20'+_0x8841a9[_0xda1ed6(0xcf)]:'Task\x20'+_0x8841a9['taskId']+_0xda1ed6(0xbd);default:return _0xda1ed6(0xcd)+_0x8841a9[_0xda1ed6(0xd2)]+_0xda1ed6(0xd1)+_0x8841a9['status']+'.';}}function a52_0xc417(_0x346828,_0x2e41b8){_0x346828=_0x346828-0xb3;const _0x54512b=a52_0x5451();let _0xc4173a=_0x54512b[_0x346828];return _0xc4173a;}function quoteShellArg(_0x3ee8d8){const _0x462ea9=a52_0x2579cf;return'\x27'+_0x3ee8d8[_0x462ea9(0xb4)](/'/g,_0x462ea9(0xb3))+'\x27';}
@@ -1 +1 @@
1
- function a53_0x2f69(_0xef7391,_0x795670){_0xef7391=_0xef7391-0x19d;var _0x5b1314=a53_0x5b13();var _0x2f69a6=_0x5b1314[_0xef7391];return _0x2f69a6;}function a53_0x5b13(){var _0x1e8469=['11cbPMGl','939088AGrJon','method','96UopZEM','description','688332YJCxgn','25JDfnVC','1296315KdIzHT','522235AYsOsr','282984PjRVzX','url','14qXWoAe','21764VeAEiG','defineProperties','1215790URBXiw'];a53_0x5b13=function(){return _0x1e8469;};return a53_0x5b13();}(function(_0x55097d,_0x463870){var _0x4ac971=a53_0x2f69,_0x35f437=_0x55097d();while(!![]){try{var _0x529c0a=-parseInt(_0x4ac971(0x1a8))/0x1+parseInt(_0x4ac971(0x19d))/0x2*(parseInt(_0x4ac971(0x1a3))/0x3)+parseInt(_0x4ac971(0x1a5))/0x4+-parseInt(_0x4ac971(0x1a6))/0x5*(parseInt(_0x4ac971(0x1a9))/0x6)+-parseInt(_0x4ac971(0x1ab))/0x7*(-parseInt(_0x4ac971(0x1a1))/0x8)+parseInt(_0x4ac971(0x1a7))/0x9+parseInt(_0x4ac971(0x19f))/0xa*(parseInt(_0x4ac971(0x1a0))/0xb);if(_0x529c0a===_0x463870)break;else _0x35f437['push'](_0x35f437['shift']());}catch(_0x592214){_0x35f437['push'](_0x35f437['shift']());}}}(a53_0x5b13,0x401ee));export function asDryRunResult(_0x225e88,_0x414982){var _0x3f6a60=a53_0x2f69;return Object[_0x3f6a60(0x19e)](_0x225e88,{'method':{'value':_0x414982[_0x3f6a60(0x1a2)],'enumerable':![]},'url':{'value':_0x414982[_0x3f6a60(0x1aa)],'enumerable':![]},..._0x414982[_0x3f6a60(0x1a4)]?{'description':{'value':_0x414982[_0x3f6a60(0x1a4)],'enumerable':![]}}:{}});}
1
+ function a53_0x104c(){var _0x8445f=['method','14238NIuVQg','16991PikHPY','12XRFgsz','3851343VbXzph','10UHMyey','1020295mMwRVu','7OVITCQ','276872byTHWQ','url','14DiYNDB','description','215200KuQBvW','1639kHNYZo','7572bWPEJF','2745040WGMiFr','3LVSAjy'];a53_0x104c=function(){return _0x8445f;};return a53_0x104c();}(function(_0x4956a8,_0x1f2013){var _0x42e92b=a53_0x20c2,_0x5947d7=_0x4956a8();while(!![]){try{var _0x543e25=-parseInt(_0x42e92b(0xf1))/0x1*(parseInt(_0x42e92b(0xe5))/0x2)+-parseInt(_0x42e92b(0xe9))/0x3*(parseInt(_0x42e92b(0xf2))/0x4)+parseInt(_0x42e92b(0xf0))/0x5*(-parseInt(_0x42e92b(0xed))/0x6)+parseInt(_0x42e92b(0xe3))/0x7*(parseInt(_0x42e92b(0xe8))/0x8)+-parseInt(_0x42e92b(0xee))/0x9*(parseInt(_0x42e92b(0xef))/0xa)+-parseInt(_0x42e92b(0xe6))/0xb*(-parseInt(_0x42e92b(0xe7))/0xc)+-parseInt(_0x42e92b(0xec))/0xd*(-parseInt(_0x42e92b(0xeb))/0xe);if(_0x543e25===_0x1f2013)break;else _0x5947d7['push'](_0x5947d7['shift']());}catch(_0x4508fb){_0x5947d7['push'](_0x5947d7['shift']());}}}(a53_0x104c,0x6e1db));function a53_0x20c2(_0x54b9c0,_0x80da80){_0x54b9c0=_0x54b9c0-0xe2;var _0x104c0e=a53_0x104c();var _0x20c262=_0x104c0e[_0x54b9c0];return _0x20c262;}export function asDryRunResult(_0xe7c815,_0x324796){var _0x1484e6=a53_0x20c2;return Object['defineProperties'](_0xe7c815,{'method':{'value':_0x324796[_0x1484e6(0xea)],'enumerable':![]},'url':{'value':_0x324796[_0x1484e6(0xe2)],'enumerable':![]},..._0x324796['description']?{'description':{'value':_0x324796[_0x1484e6(0xe4)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a54_0x13fd32=a54_0x3b5a;(function(_0x5affe7,_0x4089f3){const _0x4ce4bd=a54_0x3b5a,_0x29e54a=_0x5affe7();while(!![]){try{const _0x529476=-parseInt(_0x4ce4bd(0x137))/0x1+parseInt(_0x4ce4bd(0x12b))/0x2+parseInt(_0x4ce4bd(0x13d))/0x3*(-parseInt(_0x4ce4bd(0x134))/0x4)+-parseInt(_0x4ce4bd(0x146))/0x5+-parseInt(_0x4ce4bd(0x140))/0x6*(parseInt(_0x4ce4bd(0x128))/0x7)+parseInt(_0x4ce4bd(0x136))/0x8*(parseInt(_0x4ce4bd(0x139))/0x9)+-parseInt(_0x4ce4bd(0x138))/0xa*(-parseInt(_0x4ce4bd(0x130))/0xb);if(_0x529476===_0x4089f3)break;else _0x29e54a['push'](_0x29e54a['shift']());}catch(_0x14d05b){_0x29e54a['push'](_0x29e54a['shift']());}}}(a54_0x52c6,0xb45cd));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':'string','required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x13fd32(0x14a),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x141)};function a54_0x3b5a(_0xa7d3ee,_0x4149ba){_0xa7d3ee=_0xa7d3ee-0x128;const _0x52c6be=a54_0x52c6();let _0x3b5a55=_0x52c6be[_0xa7d3ee];return _0x3b5a55;}export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x13fd32(0x144),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x143)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x13fd32(0x14b),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x14f)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':a54_0x13fd32(0x14d),'description':a54_0x13fd32(0x13a)};export const CROSS_RELATION_LABEL_FLAG={'name':a54_0x13fd32(0x12d),'type':a54_0x13fd32(0x142),'description':a54_0x13fd32(0x12c)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a54_0x13fd32(0x150),'type':a54_0x13fd32(0x142),'enum':[a54_0x13fd32(0x129),'ONE_TO_MANY',a54_0x13fd32(0x14e),a54_0x13fd32(0x13c)],'description':a54_0x13fd32(0x13f)};export const GLOBAL_SCOPE_FLAG={'name':a54_0x13fd32(0x148),'type':a54_0x13fd32(0x145),'default':![],'description':a54_0x13fd32(0x151)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x13fd32(0x12a)};export const CODE_FLAG={'name':a54_0x13fd32(0x13b),'type':a54_0x13fd32(0x142),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a54_0x13fd32(0x12e)};export const SQLCODE_FLAG={'name':a54_0x13fd32(0x14c),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x13e),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a54_0x13fd32(0x131)}};export const APPCODE_FLAG_OPTIONAL={'name':a54_0x13fd32(0x133),'type':'string','required':![],'description':a54_0x13fd32(0x135)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};function a54_0x52c6(){const _0x77a1c3=['App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','555568UusJXF','1354746vSTgVY','1990hjyioP','153vcFEtl','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','code','MANY_TO_MANY','6oWUjOV','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','383424WJHMfK','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','string','Target\x20DB_TABLE\x20dataset\x20code','to-datasetcode','boolean','4610065mySQoM','dbtype','global','skip-connection-test','from-column','to-column','sqlcode','number','MANY_TO_ONE','Target\x20field\x20name','cardinality','Write\x20to\x20the\x20global\x20configuration','Database\x20product\x20type','MYSQL','49FsTMnP','ONE_TO_ONE','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1880682kKKEdr','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','to-label-column','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','111683gpxqUw','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','appcode','1357036uanBlu'];a54_0x52c6=function(){return _0x77a1c3;};return a54_0x52c6();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a54_0x13fd32(0x12f)};export const DB_TYPE_FLAG={'name':a54_0x13fd32(0x147),'type':a54_0x13fd32(0x142),'required':!![],'description':a54_0x13fd32(0x152),'enum':[a54_0x13fd32(0x153),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a54_0x13fd32(0x149),'type':a54_0x13fd32(0x145),'description':a54_0x13fd32(0x132)};
1
+ const a54_0x332e3e=a54_0x1e91;(function(_0x485c31,_0x5a7357){const _0x31f4a5=a54_0x1e91,_0x4a1e2e=_0x485c31();while(!![]){try{const _0x113c93=-parseInt(_0x31f4a5(0xf8))/0x1*(parseInt(_0x31f4a5(0xff))/0x2)+parseInt(_0x31f4a5(0x102))/0x3*(-parseInt(_0x31f4a5(0x114))/0x4)+parseInt(_0x31f4a5(0x104))/0x5+parseInt(_0x31f4a5(0xfe))/0x6*(-parseInt(_0x31f4a5(0x112))/0x7)+parseInt(_0x31f4a5(0x117))/0x8*(parseInt(_0x31f4a5(0x118))/0x9)+-parseInt(_0x31f4a5(0x11d))/0xa*(parseInt(_0x31f4a5(0x10d))/0xb)+-parseInt(_0x31f4a5(0x107))/0xc*(-parseInt(_0x31f4a5(0xfa))/0xd);if(_0x113c93===_0x5a7357)break;else _0x4a1e2e['push'](_0x4a1e2e['shift']());}catch(_0x310459){_0x4a1e2e['push'](_0x4a1e2e['shift']());}}}(a54_0x5437,0x3bb88));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':a54_0x332e3e(0x119),'required':!![],'description':a54_0x332e3e(0x101)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x332e3e(0x106),'type':'string','required':!![],'description':a54_0x332e3e(0x11e)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x332e3e(0x11c),'type':a54_0x332e3e(0x119),'required':!![],'description':a54_0x332e3e(0x111)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x332e3e(0x116),'type':a54_0x332e3e(0x119),'required':!![],'description':a54_0x332e3e(0x10e)};export const CROSS_RELATION_DBLINK_FLAG={'name':a54_0x332e3e(0xfc),'type':a54_0x332e3e(0x103),'description':'Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted'};export const CROSS_RELATION_LABEL_FLAG={'name':a54_0x332e3e(0x10a),'type':a54_0x332e3e(0x119),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':'cardinality','type':a54_0x332e3e(0x119),'enum':[a54_0x332e3e(0xf6),a54_0x332e3e(0xfb),a54_0x332e3e(0x115),a54_0x332e3e(0x11a)],'description':a54_0x332e3e(0x100)};export const GLOBAL_SCOPE_FLAG={'name':'global','type':a54_0x332e3e(0xf4),'default':![],'description':a54_0x332e3e(0x105)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x332e3e(0x108)};export const CODE_FLAG={'name':a54_0x332e3e(0x110),'type':'string','required':!![],'description':a54_0x332e3e(0x11b),'pattern':DATASET_CODE_PATTERN};function a54_0x1e91(_0x5d54ca,_0x3d8e05){_0x5d54ca=_0x5d54ca-0xf4;const _0x543797=a54_0x5437();let _0x1e9177=_0x543797[_0x5d54ca];return _0x1e9177;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a54_0x332e3e(0xf9),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a54_0x332e3e(0x10c),'type':a54_0x332e3e(0x119),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a54_0x332e3e(0x10f)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a54_0x332e3e(0x103),'required':!![],'description':a54_0x332e3e(0xf7)};export const DB_TYPE_FLAG={'name':a54_0x332e3e(0xf5),'type':'string','required':!![],'description':a54_0x332e3e(0x10b),'enum':[a54_0x332e3e(0x109),a54_0x332e3e(0xfd)]};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a54_0x332e3e(0xf4),'description':a54_0x332e3e(0x113)};function a54_0x5437(){const _0x2b6eb8=['13392977cwPSsn','ONE_TO_MANY','from-dblink-id','POSTGRESQL','68442sIPExj','2VFdwuG','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','Source\x20DB_TABLE\x20dataset\x20code','453qxFVdW','number','1868140lDmzCz','Write\x20to\x20the\x20global\x20configuration','from-column','12TozkNK','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','MYSQL','to-label-column','Database\x20product\x20type','appcode','935JIiQrb','Target\x20field\x20name','App\x20code\x20(e.g.\x20app-xxxxx)','code','Target\x20DB_TABLE\x20dataset\x20code','98xDxMAw','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','11372HPoATL','MANY_TO_ONE','to-column','1808tbDhiA','8757dSCuQK','string','MANY_TO_MANY','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','to-datasetcode','46510hRBhCI','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','boolean','dbtype','ONE_TO_ONE','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','394813aEYkvm','datasetcode'];a54_0x5437=function(){return _0x2b6eb8;};return a54_0x5437();}
@@ -1 +1 @@
1
- function a55_0x1ae5(_0x91a8f5,_0x3e1ed4){_0x91a8f5=_0x91a8f5-0xef;const _0x462174=a55_0x4621();let _0x1ae520=_0x462174[_0x91a8f5];return _0x1ae520;}(function(_0x28218d,_0x298b28){const _0x2210dd=a55_0x1ae5,_0x28934f=_0x28218d();while(!![]){try{const _0x310ecb=parseInt(_0x2210dd(0xf7))/0x1+-parseInt(_0x2210dd(0xfa))/0x2+-parseInt(_0x2210dd(0xf1))/0x3*(-parseInt(_0x2210dd(0xff))/0x4)+parseInt(_0x2210dd(0xf3))/0x5*(parseInt(_0x2210dd(0x100))/0x6)+parseInt(_0x2210dd(0xfe))/0x7*(parseInt(_0x2210dd(0xf5))/0x8)+parseInt(_0x2210dd(0x101))/0x9+-parseInt(_0x2210dd(0xfc))/0xa;if(_0x310ecb===_0x298b28)break;else _0x28934f['push'](_0x28934f['shift']());}catch(_0x135947){_0x28934f['push'](_0x28934f['shift']());}}}(a55_0x4621,0xec32b));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a55_0x4621(){const _0x581b66=['trim','365NuoHHF','validation','14499872PGQESr','\x20path\x20is\x20required.','1572471DDfYlb','size','File\x20not\x20found:\x20','3383036mwOwFe','File\x20is\x20not\x20a\x20regular\x20file:\x20','31659830paVqpV','ceil','7vQvXHB','148qdmHOC','39426cpvixw','3974985TLLOPH','isFile','toFixed','123135SArBwc'];a55_0x4621=function(){return _0x581b66;};return a55_0x4621();}function formatBytes(_0x292cd1){const _0x4c1578=a55_0x1ae5;if(_0x292cd1>=BYTES_PER_MB){const _0x3bddc3=Math[_0x4c1578(0xfd)](_0x292cd1/BYTES_PER_MB*0x64)/0x64;return _0x3bddc3[_0x4c1578(0xf0)](0x2)+'\x20MB';}return _0x292cd1+'\x20B';}export function requireDevelopmentUploadFile(_0x3e9035,_0x28eec3){const _0xdf5e76=a55_0x1ae5,_0x1e5efe=_0x3e9035[_0xdf5e76(0xf2)]();if(!_0x1e5efe)throw CliErrors[_0xdf5e76(0xf4)](_0x28eec3+_0xdf5e76(0xf6));if(!existsSync(_0x1e5efe))throw CliErrors['validation'](_0xdf5e76(0xf9)+_0x1e5efe);const _0x548851=statSync(_0x1e5efe);if(!_0x548851[_0xdf5e76(0xef)]())throw CliErrors[_0xdf5e76(0xf4)](_0xdf5e76(0xfb)+_0x1e5efe);if(_0x548851[_0xdf5e76(0xf8)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x1e5efe+'\x20('+formatBytes(_0x548851[_0xdf5e76(0xf8)])+')');return{'path':_0x1e5efe,'size':_0x548851[_0xdf5e76(0xf8)]};}
1
+ (function(_0x185801,_0x1e7513){const _0x4f2690=a55_0x4035,_0x3643b0=_0x185801();while(!![]){try{const _0x383b5a=parseInt(_0x4f2690(0x165))/0x1*(parseInt(_0x4f2690(0x157))/0x2)+-parseInt(_0x4f2690(0x167))/0x3+parseInt(_0x4f2690(0x15a))/0x4*(-parseInt(_0x4f2690(0x155))/0x5)+-parseInt(_0x4f2690(0x163))/0x6*(parseInt(_0x4f2690(0x156))/0x7)+parseInt(_0x4f2690(0x15e))/0x8*(-parseInt(_0x4f2690(0x161))/0x9)+parseInt(_0x4f2690(0x154))/0xa*(parseInt(_0x4f2690(0x15c))/0xb)+parseInt(_0x4f2690(0x153))/0xc;if(_0x383b5a===_0x1e7513)break;else _0x3643b0['push'](_0x3643b0['shift']());}catch(_0x38dc3b){_0x3643b0['push'](_0x3643b0['shift']());}}}(a55_0x27c2,0xcfcbb));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x580b4c){const _0xc6eceb=a55_0x4035;if(_0x580b4c>=BYTES_PER_MB){const _0x4dba63=Math[_0xc6eceb(0x162)](_0x580b4c/BYTES_PER_MB*0x64)/0x64;return _0x4dba63[_0xc6eceb(0x15d)](0x2)+_0xc6eceb(0x166);}return _0x580b4c+'\x20B';}function a55_0x4035(_0x252e30,_0x121212){_0x252e30=_0x252e30-0x153;const _0x27c2ec=a55_0x27c2();let _0x403574=_0x27c2ec[_0x252e30];return _0x403574;}export function requireDevelopmentUploadFile(_0x27f4a2,_0x139fe1){const _0x9f8b82=a55_0x4035,_0x150f36=_0x27f4a2[_0x9f8b82(0x159)]();if(!_0x150f36)throw CliErrors[_0x9f8b82(0x158)](_0x139fe1+_0x9f8b82(0x15b));if(!existsSync(_0x150f36))throw CliErrors[_0x9f8b82(0x158)]('File\x20not\x20found:\x20'+_0x150f36);const _0x5103a6=statSync(_0x150f36);if(!_0x5103a6[_0x9f8b82(0x164)]())throw CliErrors[_0x9f8b82(0x158)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x150f36);if(_0x5103a6[_0x9f8b82(0x160)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x9f8b82(0x158)](_0x9f8b82(0x15f)+_0x150f36+'\x20('+formatBytes(_0x5103a6[_0x9f8b82(0x160)])+')');return{'path':_0x150f36,'size':_0x5103a6[_0x9f8b82(0x160)]};}function a55_0x27c2(){const _0x4c429e=['153837NItUmS','ceil','6018846VkjLmt','isFile','11rumvuO','\x20MB','4426671RZUUXe','47737524qaTIYK','10hadhNr','20TJtxQr','7xLnYiU','263830MPlncK','validation','trim','1167868qiqAAp','\x20path\x20is\x20required.','1787027hsVhrh','toFixed','512ifNdPi','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','size'];a55_0x27c2=function(){return _0x4c429e;};return a55_0x27c2();}
@@ -1 +1 @@
1
- (function(_0xdb617f,_0x21e44e){const _0x500d62=a56_0xb3a6,_0x2ebcf5=_0xdb617f();while(!![]){try{const _0x3fc563=-parseInt(_0x500d62(0xb0))/0x1*(parseInt(_0x500d62(0xb3))/0x2)+parseInt(_0x500d62(0xbb))/0x3*(parseInt(_0x500d62(0xb9))/0x4)+parseInt(_0x500d62(0xb1))/0x5+parseInt(_0x500d62(0xb8))/0x6*(parseInt(_0x500d62(0xbc))/0x7)+-parseInt(_0x500d62(0xb4))/0x8+-parseInt(_0x500d62(0xb6))/0x9*(-parseInt(_0x500d62(0xad))/0xa)+-parseInt(_0x500d62(0xb2))/0xb;if(_0x3fc563===_0x21e44e)break;else _0x2ebcf5['push'](_0x2ebcf5['shift']());}catch(_0x15c768){_0x2ebcf5['push'](_0x2ebcf5['shift']());}}}(a56_0x4a12,0xcc216));function a56_0xb3a6(_0x100000,_0x3bc066){_0x100000=_0x100000-0xad;const _0x4a120a=a56_0x4a12();let _0xb3a62d=_0x4a120a[_0x100000];return _0xb3a62d;}function a56_0x4a12(){const _0x1ff6f6=['10hxIKpd','App\x20Code\x20cannot\x20be\x20empty','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1648uECYTP','6495115mhwzUI','19212864OMPXGA','1522eBIPdd','1460616stBVOE','length','6934041KAlDqi','test','209478eilKzG','5006860PxwAPM','trim','3vTtXzz','140mTXFRE'];a56_0x4a12=function(){return _0x1ff6f6;};return a56_0x4a12();}export function validateAppcode(_0x24c1db){const _0x282e74=a56_0xb3a6,_0x843d59=_0x24c1db[_0x282e74(0xba)]();if(!_0x843d59)return{'valid':![],'message':_0x282e74(0xae)};if(_0x843d59[_0x282e74(0xb5)]>0x64)return{'valid':![],'message':_0x282e74(0xaf)};if(!/^[A-Za-z0-9_-]+$/[_0x282e74(0xb7)](_0x843d59))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
1
+ (function(_0xbad1dc,_0x37cf23){const _0x268d11=a56_0x2b35,_0x3bd9de=_0xbad1dc();while(!![]){try{const _0x1965b3=parseInt(_0x268d11(0xbc))/0x1+-parseInt(_0x268d11(0xc2))/0x2*(-parseInt(_0x268d11(0xb9))/0x3)+-parseInt(_0x268d11(0xba))/0x4*(parseInt(_0x268d11(0xc0))/0x5)+parseInt(_0x268d11(0xbe))/0x6+parseInt(_0x268d11(0xbd))/0x7+parseInt(_0x268d11(0xc5))/0x8*(parseInt(_0x268d11(0xc6))/0x9)+-parseInt(_0x268d11(0xc4))/0xa*(parseInt(_0x268d11(0xbb))/0xb);if(_0x1965b3===_0x37cf23)break;else _0x3bd9de['push'](_0x3bd9de['shift']());}catch(_0x29420b){_0x3bd9de['push'](_0x3bd9de['shift']());}}}(a56_0x5d89,0xa36ef));function a56_0x2b35(_0x5271b5,_0x421dd3){_0x5271b5=_0x5271b5-0xb9;const _0x5d89d8=a56_0x5d89();let _0x2b35cd=_0x5d89d8[_0x5271b5];return _0x2b35cd;}function a56_0x5d89(){const _0x5bd197=['1585skIUzd','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','48346tZImmV','test','10PcPebs','10670960PKApIV','9NqsgEw','App\x20Code\x20cannot\x20be\x20empty','123kCNTmj','14404KWVtpM','26854839nZutMe','1099227rLJhuu','2286361RZqhGK','3008856lqMImi','length'];a56_0x5d89=function(){return _0x5bd197;};return a56_0x5d89();}export function validateAppcode(_0x2fbcf7){const _0x520c33=a56_0x2b35,_0x31cd9c=_0x2fbcf7['trim']();if(!_0x31cd9c)return{'valid':![],'message':_0x520c33(0xc7)};if(_0x31cd9c[_0x520c33(0xbf)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x520c33(0xc3)](_0x31cd9c))return{'valid':![],'message':_0x520c33(0xc1)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a57_0x5d173e=a57_0x51d7;function a57_0x51d7(_0x123979,_0x3fbbbf){_0x123979=_0x123979-0x81;const _0x57f49d=a57_0x57f4();let _0x51d754=_0x57f49d[_0x123979];return _0x51d754;}(function(_0x51afa6,_0x104c18){const _0x241144=a57_0x51d7,_0xae6859=_0x51afa6();while(!![]){try{const _0x33f333=-parseInt(_0x241144(0x86))/0x1+parseInt(_0x241144(0x91))/0x2*(parseInt(_0x241144(0x81))/0x3)+parseInt(_0x241144(0xa0))/0x4*(parseInt(_0x241144(0x9d))/0x5)+parseInt(_0x241144(0x83))/0x6*(parseInt(_0x241144(0x8d))/0x7)+-parseInt(_0x241144(0x85))/0x8+-parseInt(_0x241144(0x90))/0x9*(-parseInt(_0x241144(0xa2))/0xa)+-parseInt(_0x241144(0x9c))/0xb;if(_0x33f333===_0x104c18)break;else _0xae6859['push'](_0xae6859['shift']());}catch(_0x3c2f40){_0xae6859['push'](_0xae6859['shift']());}}}(a57_0x57f4,0x6186f));import{CliErrors}from'../../errors.js';function a57_0x57f4(){const _0x570b27=['3UbBOaY','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','6924NzPMyp','\x22\x20is\x20not\x20deletable.','3704264BIAazx','517456yYMHgN','\x20config\x20delete\x20<key>\x20[--global]','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','args','riskLevel','Project','623YXaVif','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Global','63vUchmo','1108596SEVLfl','Usage:\x20','trim','Missing\x20key\x20argument.','validation','delete','has','global','\x20already\x20absent','Top-level\x20key\x20\x22','bool','1048278KKKSdH','20MXcBfj','routing','config','358480qwUHoz','defaultApp','656820QwVdzx','boolean'];a57_0x57f4=function(){return _0x570b27;};return a57_0x57f4();}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a57_0x5d173e(0xa1),a57_0x5d173e(0x9e)]);async function execute(_0x4d1625){const _0x30130c=a57_0x5d173e,_0x296b18=_0x4d1625[_0x30130c(0x8a)][0x0]?.[_0x30130c(0x93)]();if(!_0x296b18)throw CliErrors[_0x30130c(0x95)](_0x30130c(0x94),_0x30130c(0x92)+CLI_BIN_NAME+_0x30130c(0x87));if(_0x296b18===_0x30130c(0x8b))throw CliErrors[_0x30130c(0x95)](_0x30130c(0x82));if(!isTopLevelConfigKey(_0x296b18)&&!EXTRA_DELETABLE_KEYS[_0x30130c(0x97)](_0x296b18)&&!LEGACY_DELETABLE_KEYS['has'](_0x296b18))throw CliErrors[_0x30130c(0x95)](_0x30130c(0x9a)+_0x296b18+_0x30130c(0x84),_0x30130c(0x8e));const _0x528ee0=resolveWriteScope({'global':_0x4d1625[_0x30130c(0x9b)](_0x30130c(0x98))}),_0x591845=readScopedConfig(_0x528ee0),_0x2e8162=Object['prototype']['hasOwnProperty']['call'](_0x591845,_0x296b18);_0x2e8162&&(delete _0x591845[_0x296b18],writeScopedConfig(_0x591845,_0x528ee0));const _0x3bf936=_0x528ee0===_0x30130c(0x98)?_0x30130c(0x8f):_0x30130c(0x8c);return{'ok':!![],'message':_0x2e8162?'✓\x20'+_0x3bf936+'\x20'+_0x296b18+'\x20deleted':'✓\x20'+_0x3bf936+'\x20'+_0x296b18+_0x30130c(0x99),'data':{'key':_0x296b18,'scope':_0x528ee0,'changed':_0x2e8162}};}export const configDeleteDefinition={'service':a57_0x5d173e(0x9f),'command':a57_0x5d173e(0x96),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a57_0x5d173e(0x88),'required':!![]}],'flags':[{'name':a57_0x5d173e(0x98),'type':a57_0x5d173e(0xa3),'description':a57_0x5d173e(0x89),'default':![]}],'execute':execute};
1
+ const a57_0x40d17f=a57_0x2808;(function(_0x5756cc,_0x273831){const _0x39b35e=a57_0x2808,_0x41867b=_0x5756cc();while(!![]){try{const _0xab8a26=parseInt(_0x39b35e(0xd8))/0x1*(parseInt(_0x39b35e(0xda))/0x2)+parseInt(_0x39b35e(0xe0))/0x3+-parseInt(_0x39b35e(0xe2))/0x4*(-parseInt(_0x39b35e(0xec))/0x5)+-parseInt(_0x39b35e(0xd0))/0x6+parseInt(_0x39b35e(0xdb))/0x7*(-parseInt(_0x39b35e(0xed))/0x8)+parseInt(_0x39b35e(0xdf))/0x9*(-parseInt(_0x39b35e(0xe9))/0xa)+parseInt(_0x39b35e(0xd2))/0xb*(parseInt(_0x39b35e(0xde))/0xc);if(_0xab8a26===_0x273831)break;else _0x41867b['push'](_0x41867b['shift']());}catch(_0x3746c7){_0x41867b['push'](_0x41867b['shift']());}}}(a57_0x26b6,0x1bad7));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a57_0x40d17f(0xe3),'routing']);async function execute(_0x4b7853){const _0xc798bb=a57_0x40d17f,_0x9a0e02=_0x4b7853[_0xc798bb(0xea)][0x0]?.[_0xc798bb(0xd4)]();if(!_0x9a0e02)throw CliErrors[_0xc798bb(0xd1)](_0xc798bb(0xee),_0xc798bb(0xd7)+CLI_BIN_NAME+_0xc798bb(0xe5));if(_0x9a0e02==='riskLevel')throw CliErrors[_0xc798bb(0xd1)](_0xc798bb(0xd6));if(!isTopLevelConfigKey(_0x9a0e02)&&!EXTRA_DELETABLE_KEYS[_0xc798bb(0xe6)](_0x9a0e02)&&!LEGACY_DELETABLE_KEYS[_0xc798bb(0xe6)](_0x9a0e02))throw CliErrors[_0xc798bb(0xd1)](_0xc798bb(0xeb)+_0x9a0e02+'\x22\x20is\x20not\x20deletable.','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x1bc683=resolveWriteScope({'global':_0x4b7853['bool'](_0xc798bb(0xe4))}),_0x10e654=readScopedConfig(_0x1bc683),_0x4c8ce1=Object[_0xc798bb(0xdd)][_0xc798bb(0xe8)][_0xc798bb(0xdc)](_0x10e654,_0x9a0e02);_0x4c8ce1&&(delete _0x10e654[_0x9a0e02],writeScopedConfig(_0x10e654,_0x1bc683));const _0x2bdc0b=_0x1bc683===_0xc798bb(0xe4)?'Global':_0xc798bb(0xf0);return{'ok':!![],'message':_0x4c8ce1?'✓\x20'+_0x2bdc0b+'\x20'+_0x9a0e02+_0xc798bb(0xef):'✓\x20'+_0x2bdc0b+'\x20'+_0x9a0e02+'\x20already\x20absent','data':{'key':_0x9a0e02,'scope':_0x1bc683,'changed':_0x4c8ce1}};}export const configDeleteDefinition={'service':a57_0x40d17f(0xd3),'command':'delete','description':a57_0x40d17f(0xd9),'risk':a57_0x40d17f(0xe1),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a57_0x40d17f(0xe7),'description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a57_0x40d17f(0xe4),'type':a57_0x40d17f(0xd5),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a57_0x2808(_0x49474b,_0x45e191){_0x49474b=_0x49474b-0xd0;const _0x26b6f0=a57_0x26b6();let _0x280834=_0x26b6f0[_0x49474b];return _0x280834;}function a57_0x26b6(){const _0x46ba45=['prototype','314040yYQOQb','9PCyJgj','448359gHKUDG','write','16uluNvO','defaultApp','global','\x20config\x20delete\x20<key>\x20[--global]','has','key','hasOwnProperty','1875410NPdYog','args','Top-level\x20key\x20\x22','55705gnIxps','328TCLxqu','Missing\x20key\x20argument.','\x20deleted','Project','68028EHRQgz','validation','44UIKPIQ','config','trim','boolean','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','2KKSuJP','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','91900ZleFCH','13377BlwwPN','call'];a57_0x26b6=function(){return _0x46ba45;};return a57_0x26b6();}