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

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 (347) hide show
  1. package/README.md +3 -2
  2. package/lib/api/api-doc.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/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.d.ts +8 -7
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/types.d.ts +17 -2
  135. package/lib/commands/menu/shared/update-core.js +1 -1
  136. package/lib/commands/menu/shared/valid-url.js +1 -1
  137. package/lib/commands/menu/sync.js +1 -1
  138. package/lib/commands/{page/standard-page-status.d.ts → menu/visibility-update.d.ts} +1 -1
  139. package/lib/commands/menu/visibility-update.js +1 -0
  140. package/lib/commands/notification/config-create.js +1 -1
  141. package/lib/commands/notification/config-delete.js +1 -1
  142. package/lib/commands/notification/config-list.js +1 -1
  143. package/lib/commands/notification/config-update.js +1 -1
  144. package/lib/commands/notification/index.js +1 -1
  145. package/lib/commands/notification/shared.js +1 -1
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/create.d.ts +2 -0
  148. package/lib/commands/page/create.js +1 -0
  149. package/lib/commands/page/{react → custom}/detail.d.ts +1 -1
  150. package/lib/commands/page/custom/detail.js +1 -0
  151. package/lib/commands/page/{react → custom}/list.d.ts +1 -1
  152. package/lib/commands/page/custom/list.js +1 -0
  153. package/lib/commands/page/{react → custom}/publish.d.ts +1 -1
  154. package/lib/commands/page/custom/publish.js +1 -0
  155. package/lib/commands/page/{react → custom}/shared.d.ts +15 -15
  156. package/lib/commands/page/custom/shared.js +1 -0
  157. package/lib/commands/page/{react → custom}/syntax.d.ts +2 -2
  158. package/lib/commands/page/custom/syntax.js +1 -0
  159. package/lib/commands/page/custom/template.js +1 -0
  160. package/lib/commands/page/{react → custom}/update.d.ts +1 -1
  161. package/lib/commands/page/custom/update.js +1 -0
  162. package/lib/commands/page/data-list-status.d.ts +2 -0
  163. package/lib/commands/page/data-list-status.js +1 -0
  164. package/lib/commands/page/generate-start.js +1 -1
  165. package/lib/commands/page/generate-status.js +1 -1
  166. package/lib/commands/page/index.js +1 -1
  167. package/lib/commands/page/pull.js +1 -1
  168. package/lib/commands/page/push.js +1 -1
  169. package/lib/commands/page/relation-audit.js +1 -1
  170. package/lib/commands/page/restore.js +1 -1
  171. package/lib/commands/page/shared.d.ts +18 -18
  172. package/lib/commands/page/shared.js +1 -1
  173. package/lib/commands/page/sync.js +1 -1
  174. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  175. package/lib/commands/project/create/format-elapsed.js +1 -1
  176. package/lib/commands/project/create/main.js +1 -1
  177. package/lib/commands/project/create/materialize-project-template.js +1 -1
  178. package/lib/commands/project/create/project-name.js +1 -1
  179. package/lib/commands/project/create/project-template-archive.js +1 -1
  180. package/lib/commands/project/create/project-template-path.js +1 -1
  181. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  182. package/lib/commands/project/create/use-format-code.js +1 -1
  183. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  184. package/lib/commands/project/index.js +1 -1
  185. package/lib/commands/project/upgrade.js +1 -1
  186. package/lib/commands/registry.js +1 -1
  187. package/lib/commands/role/delete.js +1 -1
  188. package/lib/commands/role/detail.js +1 -1
  189. package/lib/commands/role/index.js +1 -1
  190. package/lib/commands/role/list.js +1 -1
  191. package/lib/commands/role/shared.js +1 -1
  192. package/lib/commands/role/update.js +1 -1
  193. package/lib/commands/role/user-add.js +1 -1
  194. package/lib/commands/role/user-remove.js +1 -1
  195. package/lib/commands/role/user-resolve.js +1 -1
  196. package/lib/commands/run/index.js +1 -1
  197. package/lib/commands/schema.js +1 -1
  198. package/lib/commands/sql/create.js +1 -1
  199. package/lib/commands/sql/delete.js +1 -1
  200. package/lib/commands/sql/detail.js +1 -1
  201. package/lib/commands/sql/exec.js +1 -1
  202. package/lib/commands/sql/index.js +1 -1
  203. package/lib/commands/sql/list.js +1 -1
  204. package/lib/commands/sql/pull.js +1 -1
  205. package/lib/commands/sql/push.js +1 -1
  206. package/lib/commands/sql/shared.js +1 -1
  207. package/lib/commands/sql/status.js +1 -1
  208. package/lib/commands/sql/validate.js +1 -1
  209. package/lib/commands/task/index.js +1 -1
  210. package/lib/commands/task/status.js +1 -1
  211. package/lib/commands/tenant/index.js +1 -1
  212. package/lib/commands/tenant/members-list.js +1 -1
  213. package/lib/commands/tenant/shared.js +1 -1
  214. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  215. package/lib/commands/user-account/index.js +1 -1
  216. package/lib/commands/workspace/add.js +1 -1
  217. package/lib/commands/workspace/index.js +1 -1
  218. package/lib/commands/workspace/remove.js +1 -1
  219. package/lib/config/schema.js +1 -1
  220. package/lib/constant/cdn.js +1 -1
  221. package/lib/constant/cli.js +1 -1
  222. package/lib/constant/defaults.js +1 -1
  223. package/lib/constant/domain.js +1 -1
  224. package/lib/constant/env.js +1 -1
  225. package/lib/constant/output.js +1 -1
  226. package/lib/constant/paths.js +1 -1
  227. package/lib/constant/risk.js +1 -1
  228. package/lib/context/app-resolver.js +1 -1
  229. package/lib/context/auth-resolver.js +1 -1
  230. package/lib/context/config-loader.js +1 -1
  231. package/lib/context.js +1 -1
  232. package/lib/core/alias-resolver.js +1 -1
  233. package/lib/core/api-client.d.ts +43 -43
  234. package/lib/core/api-client.js +1 -1
  235. package/lib/core/bff/config.js +1 -1
  236. package/lib/core/bff/file-system.js +1 -1
  237. package/lib/core/bff/hash.js +1 -1
  238. package/lib/core/bff/lock.js +1 -1
  239. package/lib/core/bff/utils.d.ts +3 -1
  240. package/lib/core/bff/utils.js +1 -1
  241. package/lib/core/db-resolver.js +1 -1
  242. package/lib/core/page/file-system.js +1 -1
  243. package/lib/core/page/hash.js +1 -1
  244. package/lib/core/page/lock.js +1 -1
  245. package/lib/core/sql-index-auditor.js +1 -1
  246. package/lib/core/sql-sync/config.js +1 -1
  247. package/lib/core/sql-sync/file-system.js +1 -1
  248. package/lib/core/sql-sync/hash.js +1 -1
  249. package/lib/core/sql-sync/lock.js +1 -1
  250. package/lib/core/sql-sync/utils.js +1 -1
  251. package/lib/core/sql-validator.js +1 -1
  252. package/lib/errors.js +1 -1
  253. package/lib/framework/build-all-flags.js +1 -1
  254. package/lib/framework/error-output.js +1 -1
  255. package/lib/framework/explicit-yes.js +1 -1
  256. package/lib/framework/flags.js +1 -1
  257. package/lib/framework/help.js +1 -1
  258. package/lib/framework/index.js +1 -1
  259. package/lib/framework/output.js +1 -1
  260. package/lib/framework/response.js +1 -1
  261. package/lib/framework/runner-alias.js +1 -1
  262. package/lib/framework/runner.js +1 -1
  263. package/lib/framework/schema-export.js +1 -1
  264. package/lib/framework/types.js +1 -1
  265. package/lib/generated/build-info.d.ts +4 -4
  266. package/lib/generated/build-info.js +1 -1
  267. package/lib/help.js +1 -1
  268. package/lib/postinstall.js +1 -1
  269. package/lib/runtime/confirmation.js +1 -1
  270. package/lib/runtime/event.js +1 -1
  271. package/lib/runtime/index.js +1 -1
  272. package/lib/runtime/queue.js +1 -1
  273. package/lib/runtime/resolve.js +1 -1
  274. package/lib/skills/builtin-skill.js +1 -1
  275. package/lib/skills/main.js +1 -1
  276. package/lib/skills/npx-skills-add.js +1 -1
  277. package/lib/skills/skill-presence.js +1 -1
  278. package/lib/telemetry/cli-command-trace.js +1 -1
  279. package/lib/telemetry/cli-help-trace.js +1 -1
  280. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  281. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  282. package/lib/telemetry/send-cli-trace-log.js +1 -1
  283. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  284. package/lib/utils/ai_config.js +1 -1
  285. package/lib/utils/apply-jq-filter.js +1 -1
  286. package/lib/utils/cdn-config.js +1 -1
  287. package/lib/utils/check-sdk-version.js +1 -1
  288. package/lib/utils/cli-version-check.js +1 -1
  289. package/lib/utils/cli-version-policy.js +1 -1
  290. package/lib/utils/config.js +1 -1
  291. package/lib/utils/entity-with-id.js +1 -1
  292. package/lib/utils/file-utils.js +1 -1
  293. package/lib/utils/guides-cdn.js +1 -1
  294. package/lib/utils/http-client.js +1 -1
  295. package/lib/utils/is-non-interactive.js +1 -1
  296. package/lib/utils/logger.js +1 -1
  297. package/lib/utils/params.js +1 -1
  298. package/lib/utils/platform.js +1 -1
  299. package/lib/utils/rules-cdn.js +1 -1
  300. package/lib/utils/sleep.js +1 -1
  301. package/lib/utils/template-replacer.js +1 -1
  302. package/lib/utils/update-notice.js +1 -1
  303. package/lib/utils/version.js +1 -1
  304. package/lib/utils/with-active-cookie.js +1 -1
  305. package/lib/utils/write-cli-side-channel.js +1 -1
  306. package/package.json +1 -1
  307. package/skills/rabetbase/SKILL.md +35 -34
  308. package/skills/rabetbase/guides/backend-function.md +63 -18
  309. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -0
  310. package/skills/rabetbase/guides/{react-custom-page-workflow.md → custom-page-workflow.md} +45 -45
  311. package/skills/rabetbase/guides/page-development-workflow.md +22 -22
  312. package/skills/rabetbase/knowledge/{react-page → custom-page}/components.md +2 -2
  313. package/skills/rabetbase/knowledge/{react-page → custom-page}/generation-standards.md +6 -6
  314. package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +6 -6
  315. package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +1 -1
  316. package/skills/rabetbase/references/rabetbase-bff-create.md +2 -0
  317. package/skills/rabetbase/references/{rabetbase-standard-page-status.md → rabetbase-data-list-status.md} +6 -6
  318. package/skills/rabetbase/references/rabetbase-dataset-generate.md +1 -1
  319. package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +1 -1
  320. package/skills/rabetbase/references/rabetbase-dataset-relations.md +1 -1
  321. package/skills/rabetbase/references/rabetbase-dataset-restore.md +1 -1
  322. package/skills/rabetbase/references/rabetbase-menu-list.md +4 -2
  323. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
  324. package/skills/rabetbase/references/rabetbase-page-create.md +31 -0
  325. package/skills/rabetbase/references/{rabetbase-page-react-detail.md → rabetbase-page-custom-detail.md} +5 -5
  326. package/skills/rabetbase/references/{rabetbase-page-react-list.md → rabetbase-page-custom-list.md} +4 -4
  327. package/skills/rabetbase/references/{rabetbase-page-react-publish.md → rabetbase-page-custom-publish.md} +6 -6
  328. package/skills/rabetbase/references/{rabetbase-page-react-update.md → rabetbase-page-custom-update.md} +6 -6
  329. package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -4
  330. package/skills/rabetbase/references/rabetbase-page-generate-status.md +4 -4
  331. package/skills/rabetbase/references/rabetbase-page-pull.md +2 -2
  332. package/skills/rabetbase/references/rabetbase-page-relation-binding.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-page-restore.md +7 -7
  334. package/skills/rabetbase/references/rabetbase-page-sync.md +3 -3
  335. package/skills/rabetbase.manifest.json +13 -12
  336. package/lib/commands/page/react/create.d.ts +0 -2
  337. package/lib/commands/page/react/create.js +0 -1
  338. package/lib/commands/page/react/detail.js +0 -1
  339. package/lib/commands/page/react/list.js +0 -1
  340. package/lib/commands/page/react/publish.js +0 -1
  341. package/lib/commands/page/react/shared.js +0 -1
  342. package/lib/commands/page/react/syntax.js +0 -1
  343. package/lib/commands/page/react/template.js +0 -1
  344. package/lib/commands/page/react/update.js +0 -1
  345. package/lib/commands/page/standard-page-status.js +0 -1
  346. package/skills/rabetbase/references/rabetbase-page-react-create.md +0 -29
  347. /package/lib/commands/page/{react → custom}/template.d.ts +0 -0
@@ -1 +1 @@
1
- const a34_0x165a46=a34_0x5394;(function(_0x265621,_0x269ad3){const _0x2923a8=a34_0x5394,_0xe491ff=_0x265621();while(!![]){try{const _0x221138=parseInt(_0x2923a8(0x98))/0x1*(parseInt(_0x2923a8(0x7e))/0x2)+-parseInt(_0x2923a8(0x8d))/0x3+parseInt(_0x2923a8(0x8e))/0x4*(parseInt(_0x2923a8(0x99))/0x5)+parseInt(_0x2923a8(0x86))/0x6+parseInt(_0x2923a8(0x8c))/0x7*(parseInt(_0x2923a8(0x7d))/0x8)+parseInt(_0x2923a8(0x88))/0x9*(-parseInt(_0x2923a8(0x91))/0xa)+parseInt(_0x2923a8(0x8a))/0xb;if(_0x221138===_0x269ad3)break;else _0xe491ff['push'](_0xe491ff['shift']());}catch(_0x52a4f8){_0xe491ff['push'](_0xe491ff['shift']());}}}(a34_0x5812,0x74865));function a34_0x5394(_0x2811a5,_0x567c15){_0x2811a5=_0x2811a5-0x7d;const _0x581222=a34_0x5812();let _0x5394b9=_0x581222[_0x2811a5];return _0x5394b9;}import{listBffScripts}from'../../core/api-client.js';function a34_0x5812(){const _0x44e818=['read','verbose','type','appCode','map','74354ycXMOL','5xuaEyo','COMMON','bff','description','3875944aKaOCd','6QNmCoQ','str','No\x20BFF\x20scripts\x20found.','ENDPOINT','string','length','list','(unnamed)','1787316PIAxAC','name','19476vUNbgB','Filter\x20by\x20script\x20name','4637369DFzMEE','Return\x20full\x20script\x20objects','7lCIUMy','1649766QzxVFx','1430348tOnFIz','List\x20BFF\x20scripts','Script\x20type\x20filter','3500ICGivy','boolean'];a34_0x5812=function(){return _0x44e818;};return a34_0x5812();}export const bffList={'service':a34_0x165a46(0x9b),'command':a34_0x165a46(0x84),'description':a34_0x165a46(0x8f),'risk':a34_0x165a46(0x93),'flags':[{'name':a34_0x165a46(0x95),'type':'string','description':a34_0x165a46(0x90),'default':a34_0x165a46(0x81),'enum':[a34_0x165a46(0x81),a34_0x165a46(0x9a)]},{'name':a34_0x165a46(0x87),'type':a34_0x165a46(0x82),'description':a34_0x165a46(0x89)},{'name':a34_0x165a46(0x94),'type':a34_0x165a46(0x92),'description':a34_0x165a46(0x8b)}],async 'execute'(_0x572dba){const _0x5df10d=a34_0x165a46,_0x44f293=await listBffScripts(_0x572dba[_0x5df10d(0x96)],_0x572dba[_0x5df10d(0x7f)](_0x5df10d(0x95)),{'scriptName':_0x572dba[_0x5df10d(0x7f)](_0x5df10d(0x87))||undefined}),_0x2a1464=_0x572dba['bool'](_0x5df10d(0x94));return{'ok':!![],'data':_0x2a1464?_0x44f293:_0x44f293[_0x5df10d(0x97)](_0x53d21b=>({'id':_0x53d21b['id'],'functionName':_0x53d21b['functionName']??'','description':_0x53d21b[_0x5df10d(0x9c)]||_0x5df10d(0x85),'scriptType':_0x53d21b['scriptType']})),'message':_0x44f293[_0x5df10d(0x83)]===0x0?_0x5df10d(0x80):undefined};}};
1
+ const a34_0x519291=a34_0x4012;function a34_0x4012(_0x14ed12,_0x324e33){_0x14ed12=_0x14ed12-0x177;const _0x3eb85b=a34_0x3eb8();let _0x401268=_0x3eb85b[_0x14ed12];return _0x401268;}(function(_0x21e168,_0x55516d){const _0x1e7ad6=a34_0x4012,_0x141089=_0x21e168();while(!![]){try{const _0xa17420=-parseInt(_0x1e7ad6(0x185))/0x1+parseInt(_0x1e7ad6(0x190))/0x2+-parseInt(_0x1e7ad6(0x18f))/0x3+-parseInt(_0x1e7ad6(0x17a))/0x4+-parseInt(_0x1e7ad6(0x18e))/0x5*(-parseInt(_0x1e7ad6(0x183))/0x6)+parseInt(_0x1e7ad6(0x177))/0x7+parseInt(_0x1e7ad6(0x192))/0x8;if(_0xa17420===_0x55516d)break;else _0x141089['push'](_0x141089['shift']());}catch(_0x4b357e){_0x141089['push'](_0x141089['shift']());}}}(a34_0x3eb8,0x8bef3));function a34_0x3eb8(){const _0x5397ef=['scriptType','3351188QpGZSB','ENDPOINT','(unnamed)','list','Filter\x20by\x20script\x20name','Return\x20full\x20script\x20objects','List\x20BFF\x20scripts','read','COMMON','6384246hrmrAX','string','577191XYxpQP','bff','appCode','length','functionName','Script\x20type\x20filter','description','map','verbose','5GnxusO','931119tXYnvF','1703496snRnwv','name','1401672NXZjGQ','str','1452738Nshted','type'];a34_0x3eb8=function(){return _0x5397ef;};return a34_0x3eb8();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x519291(0x186),'command':a34_0x519291(0x17d),'description':a34_0x519291(0x180),'risk':a34_0x519291(0x181),'flags':[{'name':a34_0x519291(0x178),'type':a34_0x519291(0x184),'description':a34_0x519291(0x18a),'default':a34_0x519291(0x17b),'enum':[a34_0x519291(0x17b),a34_0x519291(0x182)]},{'name':a34_0x519291(0x191),'type':a34_0x519291(0x184),'description':a34_0x519291(0x17e)},{'name':a34_0x519291(0x18d),'type':'boolean','description':a34_0x519291(0x17f)}],async 'execute'(_0xfc475b){const _0xbaed0b=a34_0x519291,_0x168948=await listBffScripts(_0xfc475b[_0xbaed0b(0x187)],_0xfc475b['str'](_0xbaed0b(0x178)),{'scriptName':_0xfc475b[_0xbaed0b(0x193)](_0xbaed0b(0x191))||undefined}),_0x33888d=_0xfc475b['bool'](_0xbaed0b(0x18d));return{'ok':!![],'data':_0x33888d?_0x168948:_0x168948[_0xbaed0b(0x18c)](_0x16cb0f=>({'id':_0x16cb0f['id'],'functionName':_0x16cb0f[_0xbaed0b(0x189)]??'','description':_0x16cb0f[_0xbaed0b(0x18b)]||_0xbaed0b(0x17c),'scriptType':_0x16cb0f[_0xbaed0b(0x179)]})),'message':_0x168948[_0xbaed0b(0x188)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
1
- const a35_0x10caa5=a35_0x3ded;(function(_0x5286f0,_0x55d38e){const _0x245c38=a35_0x3ded,_0x36490b=_0x5286f0();while(!![]){try{const _0x3c7161=-parseInt(_0x245c38(0x16a))/0x1+-parseInt(_0x245c38(0x127))/0x2*(parseInt(_0x245c38(0x143))/0x3)+-parseInt(_0x245c38(0x148))/0x4+parseInt(_0x245c38(0x141))/0x5*(parseInt(_0x245c38(0x15e))/0x6)+parseInt(_0x245c38(0x125))/0x7+parseInt(_0x245c38(0x164))/0x8+-parseInt(_0x245c38(0x146))/0x9;if(_0x3c7161===_0x55d38e)break;else _0x36490b['push'](_0x36490b['shift']());}catch(_0x3474f1){_0x36490b['push'](_0x36490b['shift']());}}}(a35_0x79a2,0xc6361));function a35_0x3ded(_0x42df0e,_0x3c1670){_0x42df0e=_0x42df0e-0x124;const _0x79a2ca=a35_0x79a2();let _0x3dedcf=_0x79a2ca[_0x42df0e];return _0x3dedcf;}import{createInterface}from'node:readline';function a35_0x79a2(){const _0xf31271=['apiDir','/api/management/library/scripts/list?appCode=','HOOK','close','yes','question','type','stringify','scriptType','includes','alias','would_pull','operationType','string','local\x20unsynced\x20changes','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','No\x20remote\x20BFF\x20scripts\x20found.','55570BgyLez','unresolvable\x20target\x20path','3zzmwpY','\x20failed','Force\x20pull\x20cancelled.','750483kJuspb','Pull\x20complete:\x20','4676060XZOlck','functionName','\x20pulled,\x20','boolean','scriptsRoot','datasetCode','push','map','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','pull','hookLocation','Would\x20inspect\x20','Remote\x20script\x20missing\x20content.','force','conflict','parse','&type=','skipped','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Pull\x20only\x20this\x20script\x20type','functions','lockKey','450vuqWxV','stdin','all','lockFilePath','\x20remote\x20BFF\x20script(s)\x20for\x20pull','length','1422536NdpBFe','appCode','bool','nonInteractive','filePath','toISOString','16142JiWOuj','read','9149021tggWxO','ENDPOINT','475906tTWlyz','str','Remote\x20script\x20missing\x20id.','toLowerCase','GET','validation','COMMON','scriptContent'];a35_0x79a2=function(){return _0xf31271;};return a35_0x79a2();}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a35_0x10caa5(0x151),'description':a35_0x10caa5(0x150),'risk':a35_0x10caa5(0x124),'flags':[{'name':a35_0x10caa5(0x135),'type':a35_0x10caa5(0x13c),'description':a35_0x10caa5(0x15b),'enum':[a35_0x10caa5(0x12d),a35_0x10caa5(0x126),a35_0x10caa5(0x131)]},{'name':a35_0x10caa5(0x155),'type':a35_0x10caa5(0x14b),'description':a35_0x10caa5(0x13f)}],async 'dryRun'(_0x5a3eb0){const _0x1cb68d=a35_0x10caa5,_0x4cbf01=loadBffProjectConfig(_0x5a3eb0[_0x1cb68d(0x165)]),_0x4bdfa9=await readBffLockFile(_0x4cbf01[_0x1cb68d(0x161)]),{appLock:_0x5296f0}=ensureLockScope(_0x4bdfa9??createEmptyBffLock(),_0x5a3eb0[_0x1cb68d(0x165)],_0x4cbf01['scriptsRoot'],'pull'),_0x3d217a=normalizeBffType(_0x5a3eb0[_0x1cb68d(0x128)]('type'))??undefined,_0x65f02=buildDatasetCodeToAliasMap(_0x5a3eb0[_0x1cb68d(0x12f)],_0x5a3eb0[_0x1cb68d(0x165)]),[_0x3240bf,_0x302b9b]=await Promise[_0x1cb68d(0x160)]([listBffScripts(_0x5a3eb0[_0x1cb68d(0x165)],_0x3d217a),getBffScriptStatistics(_0x5a3eb0[_0x1cb68d(0x165)])]),_0x322748=createHookLocationMap(_0x302b9b),_0x1d4d38=[];for(const _0x111ef4 of _0x3240bf){const _0x5fb9e9=resolveRemoteScriptTarget(_0x4cbf01,_0x111ef4,_0x322748,_0x5296f0[_0x1cb68d(0x15c)],_0x65f02);if(!_0x5fb9e9){_0x1d4d38[_0x1cb68d(0x14e)]({'scriptType':_0x111ef4[_0x1cb68d(0x137)],'functionName':_0x111ef4['functionName']??'','status':_0x1cb68d(0x159),'reason':_0x1cb68d(0x142)});continue;}const _0x19dbaf=_0x5296f0[_0x1cb68d(0x15c)][_0x5fb9e9['lockKey']],_0x19c83c=_0x111ef4['scriptContent']!=null?computeContentHash(_0x111ef4[_0x1cb68d(0x12e)]):undefined,_0x49ab4b=await hasUnsyncedLocalChanges(_0x5fb9e9['filePath'],_0x19dbaf,_0x19c83c);_0x1d4d38[_0x1cb68d(0x14e)]({'lockKey':_0x5fb9e9[_0x1cb68d(0x15d)],'filePath':_0x5fb9e9[_0x1cb68d(0x168)],'remoteId':_0x111ef4['id']??null,'status':_0x49ab4b?_0x1cb68d(0x156):_0x1cb68d(0x13a)});}return{'method':_0x1cb68d(0x12b),'url':_0x1cb68d(0x130)+_0x5a3eb0[_0x1cb68d(0x165)]+(_0x3d217a?_0x1cb68d(0x158)+_0x3d217a:''),'body':{'appCode':_0x5a3eb0[_0x1cb68d(0x165)],'filterType':_0x3d217a??null,'files':_0x1d4d38},'description':_0x1cb68d(0x153)+_0x1d4d38['length']+_0x1cb68d(0x162)};},async 'execute'(_0x3d6248){const _0x3dcfdc=a35_0x10caa5,_0x86d1a=loadBffProjectConfig(_0x3d6248[_0x3dcfdc(0x165)]),_0xc90a9d=await readBffLockFile(_0x86d1a[_0x3dcfdc(0x161)]),{lockData:_0x5a400f,appLock:_0xc6196e}=ensureLockScope(_0xc90a9d??createEmptyBffLock(),_0x3d6248[_0x3dcfdc(0x165)],_0x86d1a[_0x3dcfdc(0x14c)],_0x3dcfdc(0x151)),_0x4bfd63=normalizeBffType(_0x3d6248['str'](_0x3dcfdc(0x135)))??undefined;if(_0x3d6248[_0x3dcfdc(0x128)](_0x3dcfdc(0x135))&&!_0x4bfd63)throw CliErrors[_0x3dcfdc(0x12c)](_0x3dcfdc(0x15a));const [_0x2e9a78,_0x50c3d9]=await Promise[_0x3dcfdc(0x160)]([listBffScripts(_0x3d6248[_0x3dcfdc(0x165)],_0x4bfd63),getBffScriptStatistics(_0x3d6248[_0x3dcfdc(0x165)])]);if(_0x2e9a78[_0x3dcfdc(0x163)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x3dcfdc(0x140)};const _0x38d13c=_0x3d6248[_0x3dcfdc(0x166)](_0x3dcfdc(0x155));if(_0x38d13c&&!_0x3d6248[_0x3dcfdc(0x167)]){const _0x3fdaa5=await confirmForce();if(!_0x3fdaa5)throw CliErrors['cancelled'](_0x3dcfdc(0x145));}if(_0x38d13c&&_0x3d6248[_0x3dcfdc(0x167)]){}const _0x4ac355=buildDatasetCodeToAliasMap(_0x3d6248[_0x3dcfdc(0x12f)],_0x3d6248['appCode']),_0x227277=createHookLocationMap(_0x50c3d9),_0x3e5d29=JSON[_0x3dcfdc(0x157)](JSON[_0x3dcfdc(0x136)](_0x5a400f)),_0x405a6a=_0x3d6248['appCode'],_0x50fe6c=_0x3e5d29['apps'][_0x405a6a];if(!_0x50fe6c)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x405a6a+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x45b1ab=[],_0x5d0d17=[],_0x404c1d=[];for(const _0x214bed of _0x2e9a78){const _0x2bc967=resolveRemoteScriptTarget(_0x86d1a,_0x214bed,_0x227277,_0xc6196e[_0x3dcfdc(0x15c)],_0x4ac355);if(!_0x2bc967){_0x5d0d17[_0x3dcfdc(0x14e)]({'lockKey':_0x214bed['scriptType']+'/'+_0x214bed[_0x3dcfdc(0x149)],'reason':_0x3dcfdc(0x142)});continue;}const _0x1e52e3=_0xc6196e[_0x3dcfdc(0x15c)][_0x2bc967[_0x3dcfdc(0x15d)]];try{if(!_0x214bed['id'])throw new Error(_0x3dcfdc(0x129));if(_0x214bed[_0x3dcfdc(0x12e)]==null)throw new Error(_0x3dcfdc(0x154));const _0x5757c8=_0x214bed['scriptContent'],_0x31af4d=computeContentHash(_0x5757c8);if(!_0x38d13c){const _0x53bf1a=await hasUnsyncedLocalChanges(_0x2bc967[_0x3dcfdc(0x168)],_0x1e52e3,_0x31af4d);if(_0x53bf1a){_0x5d0d17[_0x3dcfdc(0x14e)]({'lockKey':_0x2bc967[_0x3dcfdc(0x15d)],'reason':_0x3dcfdc(0x13d)});continue;}}await ensureParentDirectory(_0x2bc967[_0x3dcfdc(0x168)]),await writeFile(_0x2bc967[_0x3dcfdc(0x168)],_0x5757c8,'utf8');const _0x58c215={'hash':_0x31af4d,'remoteId':_0x214bed['id'],'version':_0x214bed['version']};_0x2bc967[_0x3dcfdc(0x135)]===_0x3dcfdc(0x131)&&_0x2bc967['hookLocation']&&(_0x58c215[_0x3dcfdc(0x139)]=_0x2bc967[_0x3dcfdc(0x152)][_0x3dcfdc(0x139)],_0x58c215[_0x3dcfdc(0x14d)]=_0x2bc967[_0x3dcfdc(0x152)][_0x3dcfdc(0x14d)],_0x58c215[_0x3dcfdc(0x13b)]=_0x2bc967['hookLocation'][_0x3dcfdc(0x13b)],_0x58c215['functionNode']=_0x2bc967[_0x3dcfdc(0x152)]['functionNode']),_0x50fe6c['functions'][_0x2bc967[_0x3dcfdc(0x15d)]]=_0x58c215,_0x45b1ab[_0x3dcfdc(0x14e)]({'lockKey':_0x2bc967[_0x3dcfdc(0x15d)],'remoteId':_0x214bed['id']});}catch(_0x4c0c2f){_0x404c1d[_0x3dcfdc(0x14e)]({'lockKey':_0x2bc967[_0x3dcfdc(0x15d)],'error':_0x4c0c2f instanceof Error?_0x4c0c2f['message']:String(_0x4c0c2f)});}}return _0x50fe6c['lastSync']=new Date()[_0x3dcfdc(0x169)](),await writeBffLockFile(_0x86d1a[_0x3dcfdc(0x161)],_0x3e5d29),{'ok':_0x404c1d[_0x3dcfdc(0x163)]===0x0,'data':{'pulled':_0x45b1ab,'skipped':_0x5d0d17,'failed':_0x404c1d},'message':_0x3dcfdc(0x147)+_0x45b1ab[_0x3dcfdc(0x163)]+_0x3dcfdc(0x14a)+_0x5d0d17[_0x3dcfdc(0x163)]+'\x20skipped,\x20'+_0x404c1d['length']+_0x3dcfdc(0x144)};}};async function hasUnsyncedLocalChanges(_0x3f075a,_0x13a2fd,_0x3548cc){if(!await fileExists(_0x3f075a))return![];const _0x2e88de=await computeFileHash(_0x3f075a);if(!_0x13a2fd)return _0x3548cc?_0x2e88de!==_0x3548cc:!![];return _0x2e88de!==_0x13a2fd['hash'];}function buildDatasetCodeToAliasMap(_0x4e0547,_0x3b72d2){const _0x2a8ff4=a35_0x10caa5,_0x11d077=loadAliasMap(_0x4e0547,undefined,resolveApiFilePath(_0x4e0547,_0x3b72d2));return new Map(_0x11d077[_0x2a8ff4(0x14f)](_0x3cb21a=>[_0x3cb21a[_0x2a8ff4(0x14d)],_0x3cb21a['alias']]));}async function confirmForce(){const _0x5091ca=a35_0x10caa5,_0x3dfd4b=createInterface({'input':process[_0x5091ca(0x15f)],'output':process['stderr']}),_0xf49453=await new Promise(_0x5048a1=>{const _0x3fc2da=_0x5091ca;_0x3dfd4b[_0x3fc2da(0x134)](_0x3fc2da(0x13e),_0x5048a1);});return _0x3dfd4b[_0x5091ca(0x132)](),['y',_0x5091ca(0x133)][_0x5091ca(0x138)](_0xf49453['trim']()[_0x5091ca(0x12a)]());}
1
+ const a35_0xaba1f0=a35_0x333b;(function(_0xd50f88,_0x5530cf){const _0x100730=a35_0x333b,_0xe600f9=_0xd50f88();while(!![]){try{const _0x509053=parseInt(_0x100730(0x16e))/0x1+-parseInt(_0x100730(0x146))/0x2*(-parseInt(_0x100730(0x158))/0x3)+-parseInt(_0x100730(0x161))/0x4*(-parseInt(_0x100730(0x149))/0x5)+-parseInt(_0x100730(0x14d))/0x6+-parseInt(_0x100730(0x178))/0x7*(parseInt(_0x100730(0x15c))/0x8)+-parseInt(_0x100730(0x148))/0x9+-parseInt(_0x100730(0x14a))/0xa*(-parseInt(_0x100730(0x164))/0xb);if(_0x509053===_0x5530cf)break;else _0xe600f9['push'](_0xe600f9['shift']());}catch(_0x363bdc){_0xe600f9['push'](_0xe600f9['shift']());}}}(a35_0xc913,0x3e934));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a35_0xc913(){const _0x302a63=['str','7lmyTcl','Remote\x20script\x20missing\x20id.','force','stdin','skipped','hash','toISOString','bff','Force\x20pull\x20cancelled.','Pull\x20only\x20this\x20script\x20type','lockFilePath','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','conflict','HOOK','stringify','apps','apiDir','appCode','filePath','Lock\x20scope\x20for\x20app\x20\x22','message','trim','utf8','read','2wNCZWO','question','4461813XfDiIp','10uOMVtb','970SNbYTZ','bool','datasetCode','901506tilNjn','\x22\x20not\x20found\x20after\x20ensureLockScope.','lastSync','cancelled','COMMON','unresolvable\x20target\x20path','Would\x20inspect\x20','includes','functionNode','operationType','parse','734769eysCgM','all','scriptType','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','1192472DGdXyC','local\x20unsynced\x20changes','\x20failed','push','hookLocation','346508SovPor','scriptContent','stderr','15103fJqwAr','lockKey','scriptsRoot','would_pull','No\x20remote\x20BFF\x20scripts\x20found.','nonInteractive','length','close','/api/management/library/scripts/list?appCode=','alias','500017kHwALM','pull','&type=','functions','type','\x20skipped,\x20','functionName','version','map'];a35_0xc913=function(){return _0x302a63;};return a35_0xc913();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a35_0x333b(_0x4b8193,_0x2325cf){_0x4b8193=_0x4b8193-0x143;const _0xc9139d=a35_0xc913();let _0x333b01=_0xc9139d[_0x4b8193];return _0x333b01;}import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0xaba1f0(0x17f),'command':a35_0xaba1f0(0x16f),'description':a35_0xaba1f0(0x183),'risk':a35_0xaba1f0(0x145),'flags':[{'name':'type','type':'string','description':a35_0xaba1f0(0x181),'enum':[a35_0xaba1f0(0x151),'ENDPOINT',a35_0xaba1f0(0x185)]},{'name':a35_0xaba1f0(0x17a),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x2cb212){const _0x1e09ca=a35_0xaba1f0,_0x15d0ec=loadBffProjectConfig(_0x2cb212['appCode']),_0x15f778=await readBffLockFile(_0x15d0ec[_0x1e09ca(0x182)]),{appLock:_0x46ee95}=ensureLockScope(_0x15f778??createEmptyBffLock(),_0x2cb212['appCode'],_0x15d0ec[_0x1e09ca(0x166)],'pull'),_0x200f9d=normalizeBffType(_0x2cb212[_0x1e09ca(0x177)](_0x1e09ca(0x172)))??undefined,_0xd9fc8d=buildDatasetCodeToAliasMap(_0x2cb212[_0x1e09ca(0x188)],_0x2cb212[_0x1e09ca(0x189)]),[_0x4cc89c,_0xf51204]=await Promise[_0x1e09ca(0x159)]([listBffScripts(_0x2cb212[_0x1e09ca(0x189)],_0x200f9d),getBffScriptStatistics(_0x2cb212[_0x1e09ca(0x189)])]),_0x17dcac=createHookLocationMap(_0xf51204),_0x53b9f0=[];for(const _0x26675c of _0x4cc89c){const _0x108ad8=resolveRemoteScriptTarget(_0x15d0ec,_0x26675c,_0x17dcac,_0x46ee95['functions'],_0xd9fc8d);if(!_0x108ad8){_0x53b9f0[_0x1e09ca(0x15f)]({'scriptType':_0x26675c[_0x1e09ca(0x15a)],'functionName':_0x26675c[_0x1e09ca(0x174)]??'','status':_0x1e09ca(0x17c),'reason':_0x1e09ca(0x152)});continue;}const _0x4d483b=_0x46ee95[_0x1e09ca(0x171)][_0x108ad8['lockKey']],_0x3aa0e2=_0x26675c['scriptContent']!=null?computeContentHash(_0x26675c[_0x1e09ca(0x162)]):undefined,_0x1ce84f=await hasUnsyncedLocalChanges(_0x108ad8[_0x1e09ca(0x18a)],_0x4d483b,_0x3aa0e2);_0x53b9f0['push']({'lockKey':_0x108ad8[_0x1e09ca(0x165)],'filePath':_0x108ad8[_0x1e09ca(0x18a)],'remoteId':_0x26675c['id']??null,'status':_0x1ce84f?_0x1e09ca(0x184):_0x1e09ca(0x167)});}return{'method':'GET','url':_0x1e09ca(0x16c)+_0x2cb212[_0x1e09ca(0x189)]+(_0x200f9d?_0x1e09ca(0x170)+_0x200f9d:''),'body':{'appCode':_0x2cb212[_0x1e09ca(0x189)],'filterType':_0x200f9d??null,'files':_0x53b9f0},'description':_0x1e09ca(0x153)+_0x53b9f0['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x298b7e){const _0x225300=a35_0xaba1f0,_0x32a0f5=loadBffProjectConfig(_0x298b7e[_0x225300(0x189)]),_0xe6a646=await readBffLockFile(_0x32a0f5[_0x225300(0x182)]),{lockData:_0x4c31f1,appLock:_0x2885da}=ensureLockScope(_0xe6a646??createEmptyBffLock(),_0x298b7e['appCode'],_0x32a0f5[_0x225300(0x166)],_0x225300(0x16f)),_0x23ea09=normalizeBffType(_0x298b7e[_0x225300(0x177)](_0x225300(0x172)))??undefined;if(_0x298b7e[_0x225300(0x177)](_0x225300(0x172))&&!_0x23ea09)throw CliErrors['validation']('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x1a4a48,_0x53d2f6]=await Promise['all']([listBffScripts(_0x298b7e[_0x225300(0x189)],_0x23ea09),getBffScriptStatistics(_0x298b7e[_0x225300(0x189)])]);if(_0x1a4a48[_0x225300(0x16a)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x225300(0x168)};const _0x4e0f58=_0x298b7e[_0x225300(0x14b)](_0x225300(0x17a));if(_0x4e0f58&&!_0x298b7e[_0x225300(0x169)]){const _0x4dc843=await confirmForce();if(!_0x4dc843)throw CliErrors[_0x225300(0x150)](_0x225300(0x180));}if(_0x4e0f58&&_0x298b7e[_0x225300(0x169)]){}const _0x2dc75a=buildDatasetCodeToAliasMap(_0x298b7e[_0x225300(0x188)],_0x298b7e[_0x225300(0x189)]),_0x5251c2=createHookLocationMap(_0x53d2f6),_0xd6a8b5=JSON[_0x225300(0x157)](JSON[_0x225300(0x186)](_0x4c31f1)),_0xc89e25=_0x298b7e[_0x225300(0x189)],_0x571a3c=_0xd6a8b5[_0x225300(0x187)][_0xc89e25];if(!_0x571a3c)throw new Error(_0x225300(0x18b)+_0xc89e25+_0x225300(0x14e));const _0x10fbe4=[],_0x39c588=[],_0x3e2f91=[];for(const _0x123b55 of _0x1a4a48){const _0x546ea2=resolveRemoteScriptTarget(_0x32a0f5,_0x123b55,_0x5251c2,_0x2885da['functions'],_0x2dc75a);if(!_0x546ea2){_0x39c588[_0x225300(0x15f)]({'lockKey':_0x123b55[_0x225300(0x15a)]+'/'+_0x123b55[_0x225300(0x174)],'reason':_0x225300(0x152)});continue;}const _0x4efdda=_0x2885da[_0x225300(0x171)][_0x546ea2[_0x225300(0x165)]];try{if(!_0x123b55['id'])throw new Error(_0x225300(0x179));if(_0x123b55[_0x225300(0x162)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x893f32=_0x123b55[_0x225300(0x162)],_0x29f35b=computeContentHash(_0x893f32);if(!_0x4e0f58){const _0x4a4f89=await hasUnsyncedLocalChanges(_0x546ea2['filePath'],_0x4efdda,_0x29f35b);if(_0x4a4f89){_0x39c588[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'reason':_0x225300(0x15d)});continue;}}await ensureParentDirectory(_0x546ea2[_0x225300(0x18a)]),await writeFile(_0x546ea2[_0x225300(0x18a)],_0x893f32,_0x225300(0x144));const _0x1ba898={'hash':_0x29f35b,'remoteId':_0x123b55['id'],'version':_0x123b55[_0x225300(0x175)]};_0x546ea2[_0x225300(0x172)]===_0x225300(0x185)&&_0x546ea2[_0x225300(0x160)]&&(_0x1ba898[_0x225300(0x16d)]=_0x546ea2['hookLocation']['alias'],_0x1ba898[_0x225300(0x14c)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x14c)],_0x1ba898[_0x225300(0x156)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x156)],_0x1ba898[_0x225300(0x155)]=_0x546ea2[_0x225300(0x160)][_0x225300(0x155)]),_0x571a3c[_0x225300(0x171)][_0x546ea2[_0x225300(0x165)]]=_0x1ba898,_0x10fbe4[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'remoteId':_0x123b55['id']});}catch(_0x589555){_0x3e2f91[_0x225300(0x15f)]({'lockKey':_0x546ea2[_0x225300(0x165)],'error':_0x589555 instanceof Error?_0x589555[_0x225300(0x18c)]:String(_0x589555)});}}return _0x571a3c[_0x225300(0x14f)]=new Date()[_0x225300(0x17e)](),await writeBffLockFile(_0x32a0f5[_0x225300(0x182)],_0xd6a8b5),{'ok':_0x3e2f91[_0x225300(0x16a)]===0x0,'data':{'pulled':_0x10fbe4,'skipped':_0x39c588,'failed':_0x3e2f91},'message':'Pull\x20complete:\x20'+_0x10fbe4['length']+'\x20pulled,\x20'+_0x39c588[_0x225300(0x16a)]+_0x225300(0x173)+_0x3e2f91['length']+_0x225300(0x15e)};}};async function hasUnsyncedLocalChanges(_0x499b0a,_0x1b9c89,_0x15ebca){const _0x31a1c8=a35_0xaba1f0;if(!await fileExists(_0x499b0a))return![];const _0x54b9d3=await computeFileHash(_0x499b0a);if(!_0x1b9c89)return _0x15ebca?_0x54b9d3!==_0x15ebca:!![];return _0x54b9d3!==_0x1b9c89[_0x31a1c8(0x17d)];}function buildDatasetCodeToAliasMap(_0x387a4e,_0x5e8759){const _0x4f7180=a35_0xaba1f0,_0x5db3a0=loadAliasMap(_0x387a4e,undefined,resolveApiFilePath(_0x387a4e,_0x5e8759));return new Map(_0x5db3a0[_0x4f7180(0x176)](_0x368e07=>[_0x368e07[_0x4f7180(0x14c)],_0x368e07[_0x4f7180(0x16d)]]));}async function confirmForce(){const _0x31ed2c=a35_0xaba1f0,_0x2d729e=createInterface({'input':process[_0x31ed2c(0x17b)],'output':process[_0x31ed2c(0x163)]}),_0x20a147=await new Promise(_0x33f48c=>{const _0x241f28=_0x31ed2c;_0x2d729e[_0x241f28(0x147)](_0x241f28(0x15b),_0x33f48c);});return _0x2d729e[_0x31ed2c(0x16b)](),['y','yes'][_0x31ed2c(0x154)](_0x20a147[_0x31ed2c(0x143)]()['toLowerCase']());}
@@ -1 +1 @@
1
- const a36_0x17c61d=a36_0x332e;(function(_0x387a24,_0x2c671b){const _0xd46ce7=a36_0x332e,_0x2f1cfb=_0x387a24();while(!![]){try{const _0x4ca4db=-parseInt(_0xd46ce7(0xb3))/0x1*(-parseInt(_0xd46ce7(0xc6))/0x2)+parseInt(_0xd46ce7(0xea))/0x3*(parseInt(_0xd46ce7(0xb7))/0x4)+parseInt(_0xd46ce7(0xbb))/0x5*(parseInt(_0xd46ce7(0xba))/0x6)+parseInt(_0xd46ce7(0xb2))/0x7+parseInt(_0xd46ce7(0xca))/0x8*(parseInt(_0xd46ce7(0xe7))/0x9)+parseInt(_0xd46ce7(0xcd))/0xa*(parseInt(_0xd46ce7(0xc1))/0xb)+-parseInt(_0xd46ce7(0xf0))/0xc;if(_0x4ca4db===_0x2c671b)break;else _0x2f1cfb['push'](_0x2f1cfb['shift']());}catch(_0x3cd7ad){_0x2f1cfb['push'](_0x2f1cfb['shift']());}}}(a36_0xb1ca,0xa5b11));import{readFile}from'node:fs/promises';function a36_0xb1ca(){const _0x21a786=['map','\x20skipped,\x20','message','appCode','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','force','alias','Force\x20push\x20ignoring\x20hash\x20protection','apiDir','every','aliasToDatasetCode','Push\x20local\x20BFF\x20scripts\x20to\x20remote','validation','datasetCode','filter','Incomplete\x20HOOK\x20path:\x20','would_push','functionNode','set','3226995XWtiOC','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','string','27DtIacf','script','version','functions','cleared','POST','46466052WKvrlO','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','attempted','Lock\x20scope\x20for\x20app\x20\x22','Run\x20`','bff','ENDPOINT','type','values','has','lockFilePath','write','scriptsRoot','push','Push\x20complete:\x20','datasetId','Cannot\x20resolve\x20dataset\x20for\x20\x22','length','No\x20local\x20BFF\x20functions\x20found.','utf8','description','Local\x20function\x20not\x20found:\x20','join','8584401SavUFA','589292oTfTMM','status','Push\x20only\x20this\x20script\x20type','runtime\x20cache\x20not\x20needed','231832Tqotlr','datasetCodeToDataset','some','804mYEoXv','2425tXVwoJ','filePath','update','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','runtime\x20cache\x20clear\x20failed','44bMFSqs','remoteId','name','bool','\x22\x20not\x20found\x20after\x20ensureLockScope.','2GIIjSD','get','str','operationType','24AyIzEI','Runtime\x20script\x20cache\x20cleared.','\x20failed,\x20','2682330mNTcXl','lockKey','apps',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','HOOK','stringify','hash'];a36_0xb1ca=function(){return _0x21a786;};return a36_0xb1ca();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a36_0x332e(_0x50f9db,_0x424ab2){_0x50f9db=_0x50f9db-0xaa;const _0xb1ca54=a36_0xb1ca();let _0x332e0e=_0xb1ca54[_0x50f9db];return _0x332e0e;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x17c61d(0xf5),'command':'push','description':a36_0x17c61d(0xdf),'risk':a36_0x17c61d(0xfb),'flags':[{'name':a36_0x17c61d(0xf7),'type':'string','description':a36_0x17c61d(0xb5),'enum':['COMMON',a36_0x17c61d(0xf6),a36_0x17c61d(0xd1)]},{'name':a36_0x17c61d(0xc3),'type':a36_0x17c61d(0xe9),'description':a36_0x17c61d(0xbf)},{'name':a36_0x17c61d(0xd9),'type':'boolean','description':a36_0x17c61d(0xdb)}],async 'dryRun'(_0x5892cf){const _0x4cfca4=a36_0x17c61d,_0x376d58=loadBffProjectConfig(_0x5892cf[_0x4cfca4(0xd7)]),_0x31e554=await readBffLockFile(_0x376d58[_0x4cfca4(0xfa)]),{appLock:_0x1185c9}=ensureLockScope(_0x31e554??createEmptyBffLock(),_0x5892cf[_0x4cfca4(0xd7)],_0x376d58[_0x4cfca4(0xfc)],_0x4cfca4(0xfd)),_0x3a412e=await getTargetFunctions(_0x376d58,_0x5892cf),_0x480c19=_0x5892cf[_0x4cfca4(0xc4)](_0x4cfca4(0xd9)),_0x1f27f9=[];for(const _0x3ffe51 of _0x3a412e){const _0x462fed=await computeFileHash(_0x3ffe51['filePath']),_0x58ca37=_0x1185c9[_0x4cfca4(0xed)][_0x3ffe51[_0x4cfca4(0xce)]],_0x3e1b3f=!!_0x58ca37&&_0x58ca37[_0x4cfca4(0xd3)]===_0x462fed;_0x1f27f9[_0x4cfca4(0xfd)]({'lockKey':_0x3ffe51[_0x4cfca4(0xce)],'filePath':_0x3ffe51[_0x4cfca4(0xbc)],'remoteId':_0x58ca37?.[_0x4cfca4(0xc2)]??null,'mode':_0x58ca37?.[_0x4cfca4(0xc2)]?_0x4cfca4(0xbd):'create','status':!_0x480c19&&_0x3e1b3f?'unchanged':_0x4cfca4(0xe4)});}return{'method':_0x4cfca4(0xef),'url':'/api/management/library/scripts/save','body':{'appCode':_0x5892cf[_0x4cfca4(0xd7)],'force':_0x480c19,'files':_0x1f27f9,'cacheClearAtRuntime':_0x1f27f9['some'](_0x5e0553=>_0x5e0553['status']===_0x4cfca4(0xe4)),'cacheClearAtRuntimeTimes':_0x1f27f9[_0x4cfca4(0xb9)](_0x148eda=>_0x148eda[_0x4cfca4(0xb4)]===_0x4cfca4(0xe4))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x1f27f9[_0x4cfca4(0xac)]+_0x4cfca4(0xe8)};},async 'execute'(_0x4c4f1e){const _0x4fcb2b=a36_0x17c61d,_0x16693d=loadBffProjectConfig(_0x4c4f1e[_0x4fcb2b(0xd7)]),_0x56dde2=await readBffLockFile(_0x16693d[_0x4fcb2b(0xfa)]),{lockData:_0xf94431,appLock:_0x322932}=ensureLockScope(_0x56dde2??createEmptyBffLock(),_0x4c4f1e[_0x4fcb2b(0xd7)],_0x16693d[_0x4fcb2b(0xfc)],_0x4fcb2b(0xfd)),_0x1279f2=await getTargetFunctions(_0x16693d,_0x4c4f1e);if(_0x1279f2[_0x4fcb2b(0xac)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4fcb2b(0xad)};const _0x1abf08=_0x4c4f1e['bool'](_0x4fcb2b(0xd9)),_0x303b2d=JSON['parse'](JSON[_0x4fcb2b(0xd2)](_0xf94431)),_0x352f16=_0x303b2d['apps'][_0x4c4f1e[_0x4fcb2b(0xd7)]];if(!_0x352f16)throw new Error(_0x4fcb2b(0xf3)+_0x4c4f1e[_0x4fcb2b(0xd7)]+_0x4fcb2b(0xc5));const _0x10fe3c=await buildHookMaps(_0x4c4f1e['appCode'],_0x4c4f1e[_0x4fcb2b(0xdc)],_0x1279f2,_0x352f16),_0x5c59c7=[],_0x5259ea=[],_0x31a08d=[];for(const _0x16e15 of _0x1279f2){const _0x5cdb55=await computeFileHash(_0x16e15[_0x4fcb2b(0xbc)]),_0x2bceff=_0x352f16['functions'][_0x16e15['lockKey']];if(!_0x1abf08&&_0x2bceff&&_0x2bceff[_0x4fcb2b(0xd3)]===_0x5cdb55){_0x5259ea[_0x4fcb2b(0xfd)]({'lockKey':_0x16e15['lockKey'],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x4c4f1e[_0x4fcb2b(0xd7)],_0x16e15,_0x352f16,_0x10fe3c);const _0x42b98c=_0x352f16['functions'][_0x16e15[_0x4fcb2b(0xce)]];_0x5c59c7[_0x4fcb2b(0xfd)]({'lockKey':_0x16e15[_0x4fcb2b(0xce)],'remoteId':_0x42b98c?.[_0x4fcb2b(0xc2)]??0x0});}catch(_0x2f0fe0){_0x31a08d[_0x4fcb2b(0xfd)]({'lockKey':_0x16e15['lockKey'],'error':_0x2f0fe0 instanceof Error?_0x2f0fe0[_0x4fcb2b(0xd6)]:String(_0x2f0fe0)});}}_0x352f16['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x16693d[_0x4fcb2b(0xfa)],_0x303b2d),await waitForUploadedLockEntries(_0x16693d[_0x4fcb2b(0xfa)],_0x4c4f1e[_0x4fcb2b(0xd7)],_0x5c59c7[_0x4fcb2b(0xd4)](_0x4be9aa=>_0x4be9aa[_0x4fcb2b(0xce)]));let _0x489a98={'attempted':![],'cleared':![]};if(_0x5c59c7[_0x4fcb2b(0xac)]>0x0)try{let _0x41804e='';for(let _0x32320f=0x0;_0x32320f<CACHE_CLEAR_ATTEMPTS;_0x32320f+=0x1){_0x41804e=await clearBffScriptCache(),_0x32320f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x489a98={'attempted':!![],'cleared':!![],'message':_0x41804e||_0x4fcb2b(0xcb)};}catch(_0x2bfb31){_0x489a98={'attempted':!![],'cleared':![],'error':_0x2bfb31 instanceof Error?_0x2bfb31[_0x4fcb2b(0xd6)]:String(_0x2bfb31)};}const _0x463dbe=_0x31a08d[_0x4fcb2b(0xac)]===0x0&&(_0x489a98[_0x4fcb2b(0xf2)]?_0x489a98['cleared']:!![]),_0x31296e=_0x489a98[_0x4fcb2b(0xf2)]?_0x489a98[_0x4fcb2b(0xee)]?'runtime\x20cache\x20cleared':_0x4fcb2b(0xc0):_0x4fcb2b(0xb6);return{'ok':_0x463dbe,'data':{'uploaded':_0x5c59c7,'skipped':_0x5259ea,'failed':_0x31a08d,'cacheClear':_0x489a98},'message':_0x4fcb2b(0xfe)+_0x5c59c7['length']+'\x20uploaded,\x20'+_0x5259ea[_0x4fcb2b(0xac)]+_0x4fcb2b(0xd5)+_0x31a08d['length']+_0x4fcb2b(0xcc)+_0x31296e};}};async function getTargetFunctions(_0x3281e1,_0x39ddaf){const _0x574e7c=a36_0x17c61d,_0x5ed94a=_0x39ddaf[_0x574e7c(0xc8)](_0x574e7c(0xf7)),_0x5048f6=_0x39ddaf['str'](_0x574e7c(0xc3)),_0xa8c689=normalizeBffType(_0x5ed94a)??undefined;if(_0x5048f6&&!_0xa8c689)throw CliErrors[_0x574e7c(0xe0)](_0x574e7c(0xd8));const _0x28dad3=await scanLocalBffFunctions(_0x3281e1,_0xa8c689);if(_0x5048f6){const _0x5e082f=_0x28dad3[_0x574e7c(0xe2)](_0x2b811a=>_0x2b811a[_0x574e7c(0xc3)]===_0x5048f6);if(_0x5e082f[_0x574e7c(0xac)]===0x0)throw CliErrors[_0x574e7c(0xe0)](_0x574e7c(0xb0)+_0xa8c689+'/'+_0x5048f6);return _0x5e082f;}return _0x28dad3;}async function buildHookMaps(_0x33143a,_0x109da0,_0x19c9ad,_0x26ec52){const _0xd06c7b=a36_0x17c61d,_0x48c430=_0x19c9ad[_0xd06c7b(0xb9)](_0x161882=>_0x161882[_0xd06c7b(0xf7)]==='HOOK');if(!_0x48c430)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5e3b0e=loadAliasMap(_0x109da0,undefined,resolveApiFilePath(_0x109da0,_0x33143a)),_0x4d6378=new Map(_0x5e3b0e[_0xd06c7b(0xd4)](_0x5f1132=>[_0x5f1132[_0xd06c7b(0xda)],_0x5f1132[_0xd06c7b(0xe1)]]));for(const _0x3ec77d of Object[_0xd06c7b(0xf8)](_0x26ec52[_0xd06c7b(0xed)])){_0x3ec77d[_0xd06c7b(0xda)]&&_0x3ec77d[_0xd06c7b(0xe1)]&&!_0x4d6378[_0xd06c7b(0xf9)](_0x3ec77d[_0xd06c7b(0xda)])&&_0x4d6378[_0xd06c7b(0xe6)](_0x3ec77d[_0xd06c7b(0xda)],_0x3ec77d['datasetCode']);}const _0x3aa349=await listDatasets(_0x33143a),_0x5b4a3d=new Map(_0x3aa349['map'](_0x44b8ec=>[_0x44b8ec['code'],_0x44b8ec]));return{'aliasToDatasetCode':_0x4d6378,'datasetCodeToDataset':_0x5b4a3d};}async function uploadSingleFunction(_0x3ad0f0,_0x1b168f,_0x30e060,_0x407afe){const _0x4a6c72=a36_0x17c61d,_0x25da08=await readFile(_0x1b168f[_0x4a6c72(0xbc)],_0x4a6c72(0xae)),_0x61d4b1=await computeFileHash(_0x1b168f[_0x4a6c72(0xbc)]),_0x1d70a9=_0x30e060['functions'][_0x1b168f[_0x4a6c72(0xce)]];if(_0x1d70a9?.[_0x4a6c72(0xc2)]&&_0x1d70a9[_0x4a6c72(0xec)]==null)throw CliErrors[_0x4a6c72(0xe0)](_0x1b168f['lockKey']+_0x4a6c72(0xd0));let _0x1337d2=extractScriptDescription(_0x25da08);if(!_0x1337d2&&_0x1d70a9?.['remoteId']){const _0x432fd1=await getBffScriptInfo(_0x1d70a9[_0x4a6c72(0xc2)]);_0x1337d2=_0x432fd1[_0x4a6c72(0xaf)]||undefined;}const _0x4ad84e={'appCode':_0x3ad0f0,'functionName':_0x1b168f[_0x4a6c72(0xc3)],'scriptType':_0x1b168f[_0x4a6c72(0xf7)],'scriptContent':_0x25da08};if(_0x1d70a9?.[_0x4a6c72(0xc2)])_0x4ad84e['id']=_0x1d70a9[_0x4a6c72(0xc2)];if(_0x1d70a9?.[_0x4a6c72(0xec)]!=null)_0x4ad84e[_0x4a6c72(0xec)]=_0x1d70a9[_0x4a6c72(0xec)];if(_0x1337d2)_0x4ad84e[_0x4a6c72(0xaf)]=_0x1337d2;if(_0x1b168f[_0x4a6c72(0xf7)]===_0x4a6c72(0xd1)){const _0xafc0fd=_0x1b168f['alias'];if(!_0xafc0fd||!_0x1b168f[_0x4a6c72(0xc9)]||!_0x1b168f[_0x4a6c72(0xe5)])throw CliErrors['validation'](_0x4a6c72(0xe3)+_0x1b168f[_0x4a6c72(0xce)]);const _0x3ba547=_0x407afe[_0x4a6c72(0xde)]['get'](_0xafc0fd)??_0x1d70a9?.['datasetCode']??_0xafc0fd,_0x15567e=_0x407afe[_0x4a6c72(0xb8)][_0x4a6c72(0xc7)](_0x3ba547);if(!_0x15567e)throw CliErrors[_0x4a6c72(0xe0)](_0x4a6c72(0xab)+_0xafc0fd+'\x22.\x20'+(_0x4a6c72(0xf4)+CLI_BIN_NAME+_0x4a6c72(0xf1)));_0x4ad84e[_0x4a6c72(0xaa)]=_0x15567e['id'],_0x4ad84e['operationType']=_0x1b168f[_0x4a6c72(0xc9)],_0x4ad84e[_0x4a6c72(0xe5)]=_0x1b168f[_0x4a6c72(0xe5)];}const _0x5270ec=await saveBffScript(_0x4ad84e),_0x438d79=_0x5270ec['id'],_0x23820d=_0x5270ec[_0x4a6c72(0xeb)]??await getBffScriptInfo(_0x438d79),_0x48aae3={'hash':_0x61d4b1,'remoteId':_0x438d79,'version':_0x23820d[_0x4a6c72(0xec)]};if(_0x1b168f[_0x4a6c72(0xf7)]===_0x4a6c72(0xd1)){const _0x1275b6=_0x1b168f[_0x4a6c72(0xda)],_0x14522e=_0x407afe[_0x4a6c72(0xde)]['get'](_0x1275b6)??_0x1d70a9?.[_0x4a6c72(0xe1)]??_0x1275b6;_0x407afe[_0x4a6c72(0xde)][_0x4a6c72(0xf9)](_0x1275b6)?_0x48aae3[_0x4a6c72(0xda)]=_0x1275b6:_0x48aae3[_0x4a6c72(0xda)]=_0x1d70a9?.['alias'],_0x48aae3[_0x4a6c72(0xe1)]=_0x14522e,_0x48aae3[_0x4a6c72(0xc9)]=_0x1b168f['operationType'],_0x48aae3[_0x4a6c72(0xe5)]=_0x1b168f[_0x4a6c72(0xe5)];}_0x30e060[_0x4a6c72(0xed)][_0x1b168f[_0x4a6c72(0xce)]]=_0x48aae3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3c5658,_0x36a12e,_0x487c99){const _0x160e27=a36_0x17c61d;if(_0x487c99[_0x160e27(0xac)]===0x0)return;for(let _0x42c5e2=0x0;_0x42c5e2<LOCK_SETTLE_RETRY_COUNT;_0x42c5e2+=0x1){const _0x59c568=await readBffLockFile(_0x3c5658),_0xe3ecc=_0x59c568?.[_0x160e27(0xcf)]?.[_0x36a12e]?.[_0x160e27(0xed)]??{},_0x2279b1=_0x487c99[_0x160e27(0xdd)](_0x36c464=>!!_0xe3ecc[_0x36c464]?.['remoteId']);if(_0x2279b1)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x160e27(0xbe)+_0x487c99[_0x160e27(0xb1)](',\x20')+'.');}
1
+ const a36_0x208ae3=a36_0x1735;(function(_0x192e60,_0x17e882){const _0x25f6b7=a36_0x1735,_0x28843a=_0x192e60();while(!![]){try{const _0x4c896c=-parseInt(_0x25f6b7(0x141))/0x1+parseInt(_0x25f6b7(0x162))/0x2*(parseInt(_0x25f6b7(0x14f))/0x3)+parseInt(_0x25f6b7(0x122))/0x4+parseInt(_0x25f6b7(0x127))/0x5+parseInt(_0x25f6b7(0x13f))/0x6*(-parseInt(_0x25f6b7(0x153))/0x7)+-parseInt(_0x25f6b7(0x152))/0x8*(parseInt(_0x25f6b7(0x140))/0x9)+parseInt(_0x25f6b7(0x137))/0xa;if(_0x4c896c===_0x17e882)break;else _0x28843a['push'](_0x28843a['shift']());}catch(_0x478e30){_0x28843a['push'](_0x28843a['shift']());}}}(a36_0xcb76,0x42aea));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a36_0x1735(_0x38ab34,_0x47df9f){_0x38ab34=_0x38ab34-0x11e;const _0xcb7693=a36_0xcb76();let _0x173513=_0xcb7693[_0x38ab34];return _0x173513;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a36_0xcb76(){const _0x44343f=['Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','ENDPOINT','map','Incomplete\x20HOOK\x20path:\x20','operationType','lastSync','remoteId','create','1109692qRYXNE','type','Run\x20`','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','hash','246985lUCfGw','scriptsRoot','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x22.\x20','bool','attempted','force','string','aliasToDatasetCode','utf8','Runtime\x20script\x20cache\x20cleared.','stringify','description','functionNode','push','length','8837590omfPny','lockFilePath','bff','unchanged','status','would_push','every','runtime\x20cache\x20cleared','30gdUfQM','3748617apiseY','375397tOkMkr','some','\x20skipped,\x20','write','boolean','Lock\x20scope\x20for\x20app\x20\x22','appCode','apiDir','functions','script','str','HOOK','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','341538FzYMYC','join','message','8ynrCDA','363139WvmjIZ','filePath','update','Local\x20function\x20not\x20found:\x20','validation','has','POST','Would\x20inspect\x20','lockKey','name','version','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','apps','datasetCode','toISOString','2GqhCAJ','No\x20local\x20BFF\x20functions\x20found.','alias','parse','get','\x20uploaded,\x20','set','datasetId','code'];a36_0xcb76=function(){return _0x44343f;};return a36_0xcb76();}export const bffPush={'service':a36_0x208ae3(0x139),'command':a36_0x208ae3(0x135),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a36_0x208ae3(0x144),'flags':[{'name':a36_0x208ae3(0x123),'type':a36_0x208ae3(0x12e),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x208ae3(0x16c),a36_0x208ae3(0x14c)]},{'name':'name','type':a36_0x208ae3(0x12e),'description':a36_0x208ae3(0x14d)},{'name':a36_0x208ae3(0x12d),'type':a36_0x208ae3(0x145),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x55b4f9){const _0x118326=a36_0x208ae3,_0x1fb96f=loadBffProjectConfig(_0x55b4f9[_0x118326(0x147)]),_0x2e7249=await readBffLockFile(_0x1fb96f[_0x118326(0x138)]),{appLock:_0x1af2ec}=ensureLockScope(_0x2e7249??createEmptyBffLock(),_0x55b4f9[_0x118326(0x147)],_0x1fb96f[_0x118326(0x128)],'push'),_0x5d4c18=await getTargetFunctions(_0x1fb96f,_0x55b4f9),_0x573cdd=_0x55b4f9[_0x118326(0x12b)](_0x118326(0x12d)),_0x3571f7=[];for(const _0x40ff5c of _0x5d4c18){const _0x276876=await computeFileHash(_0x40ff5c[_0x118326(0x154)]),_0x38f995=_0x1af2ec[_0x118326(0x149)][_0x40ff5c[_0x118326(0x15b)]],_0x1b39fe=!!_0x38f995&&_0x38f995[_0x118326(0x126)]===_0x276876;_0x3571f7[_0x118326(0x135)]({'lockKey':_0x40ff5c[_0x118326(0x15b)],'filePath':_0x40ff5c['filePath'],'remoteId':_0x38f995?.['remoteId']??null,'mode':_0x38f995?.[_0x118326(0x120)]?_0x118326(0x155):_0x118326(0x121),'status':!_0x573cdd&&_0x1b39fe?_0x118326(0x13a):'would_push'});}return{'method':_0x118326(0x159),'url':'/api/management/library/scripts/save','body':{'appCode':_0x55b4f9['appCode'],'force':_0x573cdd,'files':_0x3571f7,'cacheClearAtRuntime':_0x3571f7[_0x118326(0x142)](_0x325f9c=>_0x325f9c[_0x118326(0x13b)]===_0x118326(0x13c)),'cacheClearAtRuntimeTimes':_0x3571f7[_0x118326(0x142)](_0xa989d7=>_0xa989d7[_0x118326(0x13b)]===_0x118326(0x13c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x118326(0x15a)+_0x3571f7[_0x118326(0x136)]+_0x118326(0x129)};},async 'execute'(_0x3f6099){const _0x4d3a7f=a36_0x208ae3,_0x5678d9=loadBffProjectConfig(_0x3f6099[_0x4d3a7f(0x147)]),_0xf746ed=await readBffLockFile(_0x5678d9[_0x4d3a7f(0x138)]),{lockData:_0x5be1b1,appLock:_0x40a943}=ensureLockScope(_0xf746ed??createEmptyBffLock(),_0x3f6099[_0x4d3a7f(0x147)],_0x5678d9[_0x4d3a7f(0x128)],_0x4d3a7f(0x135)),_0x5db2ce=await getTargetFunctions(_0x5678d9,_0x3f6099);if(_0x5db2ce[_0x4d3a7f(0x136)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4d3a7f(0x163)};const _0x2a627a=_0x3f6099[_0x4d3a7f(0x12b)]('force'),_0xcc009a=JSON[_0x4d3a7f(0x165)](JSON[_0x4d3a7f(0x132)](_0x5be1b1)),_0x477787=_0xcc009a[_0x4d3a7f(0x15f)][_0x3f6099[_0x4d3a7f(0x147)]];if(!_0x477787)throw new Error(_0x4d3a7f(0x146)+_0x3f6099[_0x4d3a7f(0x147)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x37d55c=await buildHookMaps(_0x3f6099[_0x4d3a7f(0x147)],_0x3f6099[_0x4d3a7f(0x148)],_0x5db2ce,_0x477787),_0x3c0bf2=[],_0x5f7cc6=[],_0x548465=[];for(const _0x212d9d of _0x5db2ce){const _0x14fb46=await computeFileHash(_0x212d9d[_0x4d3a7f(0x154)]),_0x175e70=_0x477787[_0x4d3a7f(0x149)][_0x212d9d[_0x4d3a7f(0x15b)]];if(!_0x2a627a&&_0x175e70&&_0x175e70[_0x4d3a7f(0x126)]===_0x14fb46){_0x5f7cc6[_0x4d3a7f(0x135)]({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'reason':_0x4d3a7f(0x13a)});continue;}try{await uploadSingleFunction(_0x3f6099[_0x4d3a7f(0x147)],_0x212d9d,_0x477787,_0x37d55c);const _0x190855=_0x477787['functions'][_0x212d9d[_0x4d3a7f(0x15b)]];_0x3c0bf2[_0x4d3a7f(0x135)]({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'remoteId':_0x190855?.[_0x4d3a7f(0x120)]??0x0});}catch(_0x40a104){_0x548465['push']({'lockKey':_0x212d9d[_0x4d3a7f(0x15b)],'error':_0x40a104 instanceof Error?_0x40a104[_0x4d3a7f(0x151)]:String(_0x40a104)});}}_0x477787[_0x4d3a7f(0x11f)]=new Date()[_0x4d3a7f(0x161)](),await writeBffLockFile(_0x5678d9['lockFilePath'],_0xcc009a),await waitForUploadedLockEntries(_0x5678d9[_0x4d3a7f(0x138)],_0x3f6099['appCode'],_0x3c0bf2[_0x4d3a7f(0x16d)](_0x56f1c6=>_0x56f1c6['lockKey']));let _0x4f9fe4={'attempted':![],'cleared':![]};if(_0x3c0bf2[_0x4d3a7f(0x136)]>0x0)try{let _0x2f2c6b='';for(let _0x3856b6=0x0;_0x3856b6<CACHE_CLEAR_ATTEMPTS;_0x3856b6+=0x1){_0x2f2c6b=await clearBffScriptCache(),_0x3856b6<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f9fe4={'attempted':!![],'cleared':!![],'message':_0x2f2c6b||_0x4d3a7f(0x131)};}catch(_0x47154f){_0x4f9fe4={'attempted':!![],'cleared':![],'error':_0x47154f instanceof Error?_0x47154f[_0x4d3a7f(0x151)]:String(_0x47154f)};}const _0x426da6=_0x548465[_0x4d3a7f(0x136)]===0x0&&(_0x4f9fe4[_0x4d3a7f(0x12c)]?_0x4f9fe4['cleared']:!![]),_0x2c16d9=_0x4f9fe4['attempted']?_0x4f9fe4['cleared']?_0x4d3a7f(0x13e):'runtime\x20cache\x20clear\x20failed':'runtime\x20cache\x20not\x20needed';return{'ok':_0x426da6,'data':{'uploaded':_0x3c0bf2,'skipped':_0x5f7cc6,'failed':_0x548465,'cacheClear':_0x4f9fe4},'message':'Push\x20complete:\x20'+_0x3c0bf2[_0x4d3a7f(0x136)]+_0x4d3a7f(0x167)+_0x5f7cc6['length']+_0x4d3a7f(0x143)+_0x548465['length']+'\x20failed,\x20'+_0x2c16d9};}};async function getTargetFunctions(_0x533daa,_0x2bdc7f){const _0x50eca0=a36_0x208ae3,_0x21ac1a=_0x2bdc7f[_0x50eca0(0x14b)](_0x50eca0(0x123)),_0x4ec5c7=_0x2bdc7f['str'](_0x50eca0(0x15c)),_0xfc0a63=normalizeBffType(_0x21ac1a)??undefined;if(_0x4ec5c7&&!_0xfc0a63)throw CliErrors[_0x50eca0(0x157)](_0x50eca0(0x15e));const _0x35d995=await scanLocalBffFunctions(_0x533daa,_0xfc0a63);if(_0x4ec5c7){const _0x3aae34=_0x35d995['filter'](_0x51738f=>_0x51738f[_0x50eca0(0x15c)]===_0x4ec5c7);if(_0x3aae34[_0x50eca0(0x136)]===0x0)throw CliErrors[_0x50eca0(0x157)](_0x50eca0(0x156)+_0xfc0a63+'/'+_0x4ec5c7);return _0x3aae34;}return _0x35d995;}async function buildHookMaps(_0x418a3d,_0x411667,_0x37eea5,_0xc2d8b6){const _0x4486fa=a36_0x208ae3,_0x265261=_0x37eea5[_0x4486fa(0x142)](_0x3efcb1=>_0x3efcb1[_0x4486fa(0x123)]===_0x4486fa(0x14c));if(!_0x265261)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2ab410=loadAliasMap(_0x411667,undefined,resolveApiFilePath(_0x411667,_0x418a3d)),_0x4512b1=new Map(_0x2ab410[_0x4486fa(0x16d)](_0x268f14=>[_0x268f14[_0x4486fa(0x164)],_0x268f14['datasetCode']]));for(const _0x267098 of Object['values'](_0xc2d8b6[_0x4486fa(0x149)])){_0x267098[_0x4486fa(0x164)]&&_0x267098[_0x4486fa(0x160)]&&!_0x4512b1['has'](_0x267098[_0x4486fa(0x164)])&&_0x4512b1[_0x4486fa(0x168)](_0x267098[_0x4486fa(0x164)],_0x267098[_0x4486fa(0x160)]);}const _0x50ffb1=await listDatasets(_0x418a3d),_0x3a10a1=new Map(_0x50ffb1[_0x4486fa(0x16d)](_0x3766fc=>[_0x3766fc[_0x4486fa(0x16a)],_0x3766fc]));return{'aliasToDatasetCode':_0x4512b1,'datasetCodeToDataset':_0x3a10a1};}async function uploadSingleFunction(_0x40765b,_0x2f2908,_0x53d391,_0x5dd8a7){const _0x3d8ab8=a36_0x208ae3,_0x2807d1=await readFile(_0x2f2908[_0x3d8ab8(0x154)],_0x3d8ab8(0x130)),_0x3ede29=await computeFileHash(_0x2f2908[_0x3d8ab8(0x154)]),_0x302b4e=_0x53d391['functions'][_0x2f2908['lockKey']];if(_0x302b4e?.[_0x3d8ab8(0x120)]&&_0x302b4e['version']==null)throw CliErrors[_0x3d8ab8(0x157)](_0x2f2908[_0x3d8ab8(0x15b)]+_0x3d8ab8(0x14e));let _0x4a7dcf=extractScriptDescription(_0x2807d1);if(!_0x4a7dcf&&_0x302b4e?.[_0x3d8ab8(0x120)]){const _0x15ff7a=await getBffScriptInfo(_0x302b4e[_0x3d8ab8(0x120)]);_0x4a7dcf=_0x15ff7a['description']||undefined;}const _0x43a250={'appCode':_0x40765b,'functionName':_0x2f2908['name'],'scriptType':_0x2f2908[_0x3d8ab8(0x123)],'scriptContent':_0x2807d1};if(_0x302b4e?.[_0x3d8ab8(0x120)])_0x43a250['id']=_0x302b4e[_0x3d8ab8(0x120)];if(_0x302b4e?.['version']!=null)_0x43a250['version']=_0x302b4e[_0x3d8ab8(0x15d)];if(_0x4a7dcf)_0x43a250[_0x3d8ab8(0x133)]=_0x4a7dcf;if(_0x2f2908[_0x3d8ab8(0x123)]===_0x3d8ab8(0x14c)){const _0x5cf2ed=_0x2f2908[_0x3d8ab8(0x164)];if(!_0x5cf2ed||!_0x2f2908[_0x3d8ab8(0x11e)]||!_0x2f2908[_0x3d8ab8(0x134)])throw CliErrors[_0x3d8ab8(0x157)](_0x3d8ab8(0x16e)+_0x2f2908[_0x3d8ab8(0x15b)]);const _0x529892=_0x5dd8a7[_0x3d8ab8(0x12f)][_0x3d8ab8(0x166)](_0x5cf2ed)??_0x302b4e?.['datasetCode']??_0x5cf2ed,_0x147426=_0x5dd8a7['datasetCodeToDataset']['get'](_0x529892);if(!_0x147426)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x5cf2ed+_0x3d8ab8(0x12a)+(_0x3d8ab8(0x124)+CLI_BIN_NAME+_0x3d8ab8(0x125)));_0x43a250[_0x3d8ab8(0x169)]=_0x147426['id'],_0x43a250[_0x3d8ab8(0x11e)]=_0x2f2908[_0x3d8ab8(0x11e)],_0x43a250['functionNode']=_0x2f2908[_0x3d8ab8(0x134)];}const _0x5b7485=await saveBffScript(_0x43a250),_0x516c5c=_0x5b7485['id'],_0x61afa8=_0x5b7485[_0x3d8ab8(0x14a)]??await getBffScriptInfo(_0x516c5c),_0x6bf424={'hash':_0x3ede29,'remoteId':_0x516c5c,'version':_0x61afa8[_0x3d8ab8(0x15d)]};if(_0x2f2908[_0x3d8ab8(0x123)]===_0x3d8ab8(0x14c)){const _0x368fae=_0x2f2908[_0x3d8ab8(0x164)],_0x4f9fc9=_0x5dd8a7['aliasToDatasetCode']['get'](_0x368fae)??_0x302b4e?.[_0x3d8ab8(0x160)]??_0x368fae;_0x5dd8a7[_0x3d8ab8(0x12f)][_0x3d8ab8(0x158)](_0x368fae)?_0x6bf424[_0x3d8ab8(0x164)]=_0x368fae:_0x6bf424[_0x3d8ab8(0x164)]=_0x302b4e?.[_0x3d8ab8(0x164)],_0x6bf424[_0x3d8ab8(0x160)]=_0x4f9fc9,_0x6bf424[_0x3d8ab8(0x11e)]=_0x2f2908[_0x3d8ab8(0x11e)],_0x6bf424['functionNode']=_0x2f2908[_0x3d8ab8(0x134)];}_0x53d391[_0x3d8ab8(0x149)][_0x2f2908[_0x3d8ab8(0x15b)]]=_0x6bf424;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1b8d5e,_0x44a311,_0x16d0c0){const _0x1a9de6=a36_0x208ae3;if(_0x16d0c0['length']===0x0)return;for(let _0x573c13=0x0;_0x573c13<LOCK_SETTLE_RETRY_COUNT;_0x573c13+=0x1){const _0x31b022=await readBffLockFile(_0x1b8d5e),_0x95232=_0x31b022?.[_0x1a9de6(0x15f)]?.[_0x44a311]?.['functions']??{},_0x2f0fec=_0x16d0c0[_0x1a9de6(0x13d)](_0x2e0fcd=>!!_0x95232[_0x2e0fcd]?.[_0x1a9de6(0x120)]);if(_0x2f0fec)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1a9de6(0x16b)+_0x16d0c0[_0x1a9de6(0x150)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a37_0x67cd31=a37_0x4258;(function(_0xbe3895,_0x50d771){const _0x50a193=a37_0x4258,_0x5f2ba8=_0xbe3895();while(!![]){try{const _0x315714=-parseInt(_0x50a193(0x142))/0x1+parseInt(_0x50a193(0x132))/0x2+-parseInt(_0x50a193(0x13a))/0x3+parseInt(_0x50a193(0x128))/0x4*(parseInt(_0x50a193(0x136))/0x5)+parseInt(_0x50a193(0x13b))/0x6+-parseInt(_0x50a193(0x12d))/0x7+-parseInt(_0x50a193(0x144))/0x8*(-parseInt(_0x50a193(0x13d))/0x9);if(_0x315714===_0x50d771)break;else _0x5f2ba8['push'](_0x5f2ba8['shift']());}catch(_0x32bf32){_0x5f2ba8['push'](_0x5f2ba8['shift']());}}}(a37_0x8fa9,0x77907));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x8fa9(){const _0xc1a7c9=['16645ZmOFLn','\x20added,\x20','lockKey','scriptsRoot','353751eEeTXh','358152rxrAyB','length','657NcaSql','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','apiDir','\x20unchanged','appCode','6016tZXwEs','remote','424RFAolV','bool','212DDBwBR','functions','push','map','boolean','3769388NyTZQT','read','alias','filePath','all','1824308NypFLH','lockFilePath','has','datasetCode'];a37_0x8fa9=function(){return _0xc1a7c9;};return a37_0x8fa9();}function a37_0x4258(_0x4e2a48,_0x4e7b16){_0x4e2a48=_0x4e2a48-0x128;const _0x8fa982=a37_0x8fa9();let _0x4258ca=_0x8fa982[_0x4e2a48];return _0x4258ca;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':'status','description':a37_0x67cd31(0x13e),'risk':a37_0x67cd31(0x12e),'flags':[{'name':'remote','type':a37_0x67cd31(0x12c),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x52b211){const _0x28263e=a37_0x67cd31,_0x54c8e3=loadBffProjectConfig(_0x52b211['appCode']),_0xa791b3=await readBffLockFile(_0x54c8e3[_0x28263e(0x133)]),{appLock:_0x2a734f}=ensureLockScope(_0xa791b3??createEmptyBffLock(),_0x52b211[_0x28263e(0x141)],_0x54c8e3[_0x28263e(0x139)],'status'),_0x1df7b4=await scanLocalBffFunctions(_0x54c8e3),_0x4f84c0=[],_0xe4f7c6=[],_0x42bceb=[];for(const _0x3292ba of _0x1df7b4){const _0x35eacb=await computeFileHash(_0x3292ba[_0x28263e(0x130)]),_0x457885=_0x2a734f[_0x28263e(0x129)][_0x3292ba[_0x28263e(0x138)]];if(!_0x457885)_0x4f84c0[_0x28263e(0x12a)](_0x3292ba[_0x28263e(0x138)]);else _0x457885['hash']!==_0x35eacb?_0xe4f7c6[_0x28263e(0x12a)](_0x3292ba[_0x28263e(0x138)]):_0x42bceb['push'](_0x3292ba[_0x28263e(0x138)]);}const _0x2aaaca=[];if(_0x52b211[_0x28263e(0x145)](_0x28263e(0x143))){const _0x267daa=loadAliasMap(_0x52b211[_0x28263e(0x13f)],undefined,resolveApiFilePath(_0x52b211[_0x28263e(0x13f)],_0x52b211[_0x28263e(0x141)])),_0x2308b8=new Map(_0x267daa[_0x28263e(0x12b)](_0x3f65a2=>[_0x3f65a2[_0x28263e(0x135)],_0x3f65a2[_0x28263e(0x12f)]])),[_0x55103f,_0x3faca8]=await Promise[_0x28263e(0x131)]([listBffScripts(_0x52b211[_0x28263e(0x141)]),getBffScriptStatistics(_0x52b211['appCode'])]),_0x5a84dd=createHookLocationMap(_0x3faca8),_0x1e28fe=new Set(_0x1df7b4[_0x28263e(0x12b)](_0x3ca56b=>_0x3ca56b[_0x28263e(0x138)]));for(const _0x4d3331 of _0x55103f){const _0x1a74f1=resolveRemoteScriptTarget(_0x54c8e3,_0x4d3331,_0x5a84dd,_0x2a734f[_0x28263e(0x129)],_0x2308b8);_0x1a74f1&&!_0x1e28fe[_0x28263e(0x134)](_0x1a74f1[_0x28263e(0x138)])&&_0x2aaaca[_0x28263e(0x12a)](_0x1a74f1[_0x28263e(0x138)]);}}const _0x465462=_0x4f84c0[_0x28263e(0x13c)]===0x0&&_0xe4f7c6[_0x28263e(0x13c)]===0x0&&_0x2aaaca[_0x28263e(0x13c)]===0x0;return{'ok':!![],'data':{'added':_0x4f84c0,'modified':_0xe4f7c6,'unchanged':_0x42bceb,'remoteOnly':_0x2aaaca},'message':_0x465462?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x4f84c0[_0x28263e(0x13c)]+_0x28263e(0x137)+_0xe4f7c6['length']+'\x20modified,\x20'+_0x42bceb[_0x28263e(0x13c)]+_0x28263e(0x140)+(_0x2aaaca[_0x28263e(0x13c)]>0x0?',\x20'+_0x2aaaca[_0x28263e(0x13c)]+'\x20remote-only':'')};}};
1
+ const a37_0x421664=a37_0x2693;(function(_0x396659,_0x2d8a70){const _0x33c469=a37_0x2693,_0x519101=_0x396659();while(!![]){try{const _0x2f2bcb=-parseInt(_0x33c469(0x126))/0x1*(-parseInt(_0x33c469(0x113))/0x2)+-parseInt(_0x33c469(0x12a))/0x3*(-parseInt(_0x33c469(0x127))/0x4)+-parseInt(_0x33c469(0x120))/0x5+-parseInt(_0x33c469(0x121))/0x6+parseInt(_0x33c469(0x130))/0x7*(parseInt(_0x33c469(0x125))/0x8)+parseInt(_0x33c469(0x116))/0x9+parseInt(_0x33c469(0x10f))/0xa*(parseInt(_0x33c469(0x11a))/0xb);if(_0x2f2bcb===_0x2d8a70)break;else _0x519101['push'](_0x519101['shift']());}catch(_0x19c8a5){_0x519101['push'](_0x519101['shift']());}}}(a37_0x575d,0x59ae1));function a37_0x2693(_0x527de1,_0x2b6ac0){_0x527de1=_0x527de1-0x10f;const _0x575dfc=a37_0x575d();let _0x2693d4=_0x575dfc[_0x527de1];return _0x2693d4;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x575d(){const _0x21d2ec=['push','717084izOsgL','All\x20BFF\x20scripts\x20are\x20in\x20sync.','functions','appCode','99ZuTSTT','lockFilePath','boolean','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','remote','filePath','1583510gtbmPm','4195542PGSiuM','lockKey','status','alias','3032NtFbRX','36899FtjXAK','323724SzJjET','length','bool','3smsCGT','read','has','apiDir','scriptsRoot','hash','2471GrFGBU','bff','922890mlybcw','\x20remote-only','\x20modified,\x20','map','14dylaod','\x20unchanged'];a37_0x575d=function(){return _0x21d2ec;};return a37_0x575d();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0x421664(0x131),'command':a37_0x421664(0x123),'description':a37_0x421664(0x11d),'risk':a37_0x421664(0x12b),'flags':[{'name':a37_0x421664(0x11e),'type':a37_0x421664(0x11c),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x1094ab){const _0x68b901=a37_0x421664,_0x2ad07e=loadBffProjectConfig(_0x1094ab['appCode']),_0x584f2b=await readBffLockFile(_0x2ad07e[_0x68b901(0x11b)]),{appLock:_0x3b7563}=ensureLockScope(_0x584f2b??createEmptyBffLock(),_0x1094ab[_0x68b901(0x119)],_0x2ad07e[_0x68b901(0x12e)],'status'),_0x19aa21=await scanLocalBffFunctions(_0x2ad07e),_0x24ee99=[],_0x5bf3a9=[],_0x2ec291=[];for(const _0x58b570 of _0x19aa21){const _0xe03e47=await computeFileHash(_0x58b570[_0x68b901(0x11f)]),_0x275bf5=_0x3b7563[_0x68b901(0x118)][_0x58b570['lockKey']];if(!_0x275bf5)_0x24ee99[_0x68b901(0x115)](_0x58b570[_0x68b901(0x122)]);else _0x275bf5[_0x68b901(0x12f)]!==_0xe03e47?_0x5bf3a9[_0x68b901(0x115)](_0x58b570['lockKey']):_0x2ec291[_0x68b901(0x115)](_0x58b570['lockKey']);}const _0x44cc31=[];if(_0x1094ab[_0x68b901(0x129)]('remote')){const _0x3f839d=loadAliasMap(_0x1094ab[_0x68b901(0x12d)],undefined,resolveApiFilePath(_0x1094ab['apiDir'],_0x1094ab[_0x68b901(0x119)])),_0x441831=new Map(_0x3f839d[_0x68b901(0x112)](_0x37dba8=>[_0x37dba8['datasetCode'],_0x37dba8[_0x68b901(0x124)]])),[_0x4d5ea7,_0x5d7036]=await Promise['all']([listBffScripts(_0x1094ab[_0x68b901(0x119)]),getBffScriptStatistics(_0x1094ab[_0x68b901(0x119)])]),_0x58e95a=createHookLocationMap(_0x5d7036),_0x4c41dc=new Set(_0x19aa21[_0x68b901(0x112)](_0x215722=>_0x215722[_0x68b901(0x122)]));for(const _0x59199d of _0x4d5ea7){const _0x4e99c7=resolveRemoteScriptTarget(_0x2ad07e,_0x59199d,_0x58e95a,_0x3b7563['functions'],_0x441831);_0x4e99c7&&!_0x4c41dc[_0x68b901(0x12c)](_0x4e99c7['lockKey'])&&_0x44cc31['push'](_0x4e99c7[_0x68b901(0x122)]);}}const _0x2a0f8a=_0x24ee99[_0x68b901(0x128)]===0x0&&_0x5bf3a9[_0x68b901(0x128)]===0x0&&_0x44cc31[_0x68b901(0x128)]===0x0;return{'ok':!![],'data':{'added':_0x24ee99,'modified':_0x5bf3a9,'unchanged':_0x2ec291,'remoteOnly':_0x44cc31},'message':_0x2a0f8a?_0x68b901(0x117):_0x24ee99[_0x68b901(0x128)]+'\x20added,\x20'+_0x5bf3a9['length']+_0x68b901(0x111)+_0x2ec291[_0x68b901(0x128)]+_0x68b901(0x114)+(_0x44cc31[_0x68b901(0x128)]>0x0?',\x20'+_0x44cc31[_0x68b901(0x128)]+_0x68b901(0x110):'')};}};
@@ -1 +1 @@
1
- function a38_0x3a28(){const _0x2377d3=['\x20is\x20already\x20current','install','installedPath','inherit','error','apiError','log','pipe','skillVersion','\x20at\x20','nonInteractive','CLI\x20Built-in\x20Skill\x20','119835ceyNqN','21940loAWVI','cwd','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','5400200WHnghA','1674416pCAWff','9KnqJOF','2597320KUVMPF','12drNvhw','446407RjxtIy','cli-skill-install','repairCommand','17269MbIAsE','info','cli-skill','setLogPath',']:\x20','28bspBcz','read','426HJGxrk','Built-in\x20Skill\x20install\x20failed\x20[','changed'];a38_0x3a28=function(){return _0x2377d3;};return a38_0x3a28();}const a38_0x1829ef=a38_0x4326;function a38_0x4326(_0x2d42ea,_0x1a6059){_0x2d42ea=_0x2d42ea-0x81;const _0x3a285e=a38_0x3a28();let _0x4326bf=_0x3a285e[_0x2d42ea];return _0x4326bf;}(function(_0x38c215,_0x108d9e){const _0x52fb15=a38_0x4326,_0x1a6fd=_0x38c215();while(!![]){try{const _0x561790=parseInt(_0x52fb15(0x8e))/0x1+parseInt(_0x52fb15(0x86))/0x2*(-parseInt(_0x52fb15(0x8d))/0x3)+parseInt(_0x52fb15(0x96))/0x4*(-parseInt(_0x52fb15(0x85))/0x5)+parseInt(_0x52fb15(0x98))/0x6*(parseInt(_0x52fb15(0x91))/0x7)+parseInt(_0x52fb15(0x8a))/0x8*(parseInt(_0x52fb15(0x8b))/0x9)+-parseInt(_0x52fb15(0x89))/0xa+parseInt(_0x52fb15(0x8c))/0xb;if(_0x561790===_0x108d9e)break;else _0x1a6fd['push'](_0x1a6fd['shift']());}catch(_0x4702a6){_0x1a6fd['push'](_0x1a6fd['shift']());}}}(a38_0x3a28,0x4cfb5));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x1829ef(0x93),'command':a38_0x1829ef(0x9c),'description':a38_0x1829ef(0x88),'risk':a38_0x1829ef(0x97),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3f09f0){const _0x52ab6f=a38_0x1829ef;logger[_0x52ab6f(0x94)](process[_0x52ab6f(0x87)]()),logger[_0x52ab6f(0x92)](_0x52ab6f(0x8f),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x33d27f=installBuiltinSkill({'stdio':_0x3f09f0[_0x52ab6f(0x83)]?_0x52ab6f(0xa2):_0x52ab6f(0x9e)});if(!_0x33d27f['ok'])throw CliErrors[_0x52ab6f(0xa0)](_0x52ab6f(0x99)+_0x33d27f['code']+_0x52ab6f(0x95)+(_0x33d27f[_0x52ab6f(0x9f)]||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x33d27f[_0x52ab6f(0x90)]);return console[_0x52ab6f(0xa1)](_0x33d27f[_0x52ab6f(0x9a)]?_0x52ab6f(0x84)+_0x33d27f[_0x52ab6f(0x81)]+'\x20installed'+(_0x33d27f[_0x52ab6f(0x9d)]?'\x20at\x20'+_0x33d27f[_0x52ab6f(0x9d)]:'\x20via\x20skills@latest'):_0x52ab6f(0x84)+_0x33d27f[_0x52ab6f(0x81)]+_0x52ab6f(0x9b)+(_0x33d27f[_0x52ab6f(0x9d)]?_0x52ab6f(0x82)+_0x33d27f['installedPath']:'')),{'ok':!![]};}}];
1
+ const a38_0x253284=a38_0x14cb;(function(_0x29f7d6,_0x47af80){const _0x15b5c1=a38_0x14cb,_0x236f8c=_0x29f7d6();while(!![]){try{const _0x501f6f=-parseInt(_0x15b5c1(0x94))/0x1+-parseInt(_0x15b5c1(0x9c))/0x2+parseInt(_0x15b5c1(0xac))/0x3+-parseInt(_0x15b5c1(0xaa))/0x4+parseInt(_0x15b5c1(0xa1))/0x5+-parseInt(_0x15b5c1(0x9b))/0x6*(-parseInt(_0x15b5c1(0x96))/0x7)+parseInt(_0x15b5c1(0x9e))/0x8*(-parseInt(_0x15b5c1(0x93))/0x9);if(_0x501f6f===_0x47af80)break;else _0x236f8c['push'](_0x236f8c['shift']());}catch(_0x3376b7){_0x236f8c['push'](_0x236f8c['shift']());}}}(a38_0x4658,0x298cc));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x4658(){const _0x348fb1=['code','840290nJGHsP','read','nonInteractive','error','skillVersion','installedPath','cli-skill-install','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Built-in\x20Skill\x20install\x20failed\x20[','453736IeEFfc','inherit','559077xyPppM','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','apiError','log','info','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','changed','setLogPath','CLI\x20Built-in\x20Skill\x20','\x20via\x20skills@latest','repairCommand','227952QDwXKI','9558IXAmIo','install','844739YPGapk','unknown','cwd','cli-skill','\x20at\x20','6ZkEwsj','313172iiHndF','pipe','8xpiQNZ',']:\x20'];a38_0x4658=function(){return _0x348fb1;};return a38_0x4658();}function a38_0x14cb(_0x357be0,_0x56f274){_0x357be0=_0x357be0-0x92;const _0x4658b9=a38_0x4658();let _0x14cb10=_0x4658b9[_0x357be0];return _0x14cb10;}export const cliSkillDefinitions=[{'service':a38_0x253284(0x99),'command':a38_0x253284(0x95),'description':a38_0x253284(0xb1),'risk':a38_0x253284(0xa2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2c9936){const _0x5d34fa=a38_0x253284;logger[_0x5d34fa(0xb3)](process[_0x5d34fa(0x98)]()),logger[_0x5d34fa(0xb0)](_0x5d34fa(0xa7),_0x5d34fa(0xad));const _0x417a71=installBuiltinSkill({'stdio':_0x2c9936[_0x5d34fa(0xa3)]?_0x5d34fa(0x9d):_0x5d34fa(0xab)});if(!_0x417a71['ok'])throw CliErrors[_0x5d34fa(0xae)](_0x5d34fa(0xa9)+_0x417a71[_0x5d34fa(0xa0)]+_0x5d34fa(0x9f)+(_0x417a71[_0x5d34fa(0xa4)]||_0x5d34fa(0x97)),_0x5d34fa(0xa8)+_0x417a71[_0x5d34fa(0x92)]);return console[_0x5d34fa(0xaf)](_0x417a71[_0x5d34fa(0xb2)]?_0x5d34fa(0xb4)+_0x417a71['skillVersion']+'\x20installed'+(_0x417a71[_0x5d34fa(0xa6)]?_0x5d34fa(0x9a)+_0x417a71[_0x5d34fa(0xa6)]:_0x5d34fa(0xb5)):'CLI\x20Built-in\x20Skill\x20'+_0x417a71[_0x5d34fa(0xa5)]+'\x20is\x20already\x20current'+(_0x417a71[_0x5d34fa(0xa6)]?'\x20at\x20'+_0x417a71[_0x5d34fa(0xa6)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x3e782b=a39_0x3aba;(function(_0x44a4b3,_0x3b3807){const _0x54f695=a39_0x3aba,_0x37b532=_0x44a4b3();while(!![]){try{const _0x47a3e5=-parseInt(_0x54f695(0xe2))/0x1*(-parseInt(_0x54f695(0xbe))/0x2)+parseInt(_0x54f695(0xee))/0x3+-parseInt(_0x54f695(0xe0))/0x4*(-parseInt(_0x54f695(0xe4))/0x5)+parseInt(_0x54f695(0xda))/0x6*(-parseInt(_0x54f695(0xd1))/0x7)+-parseInt(_0x54f695(0xd6))/0x8+-parseInt(_0x54f695(0xc3))/0x9+-parseInt(_0x54f695(0xb1))/0xa*(-parseInt(_0x54f695(0xed))/0xb);if(_0x47a3e5===_0x3b3807)break;else _0x37b532['push'](_0x37b532['shift']());}catch(_0x53c8e3){_0x37b532['push'](_0x37b532['shift']());}}}(a39_0x42bd,0x4e3bd));import a39_0xba5684 from'chalk';import a39_0x568967 from'ora';function a39_0x3aba(_0x10f0b7,_0x426947){_0x10f0b7=_0x10f0b7-0xac;const _0x42bdfc=a39_0x42bd();let _0x3abae2=_0x42bdfc[_0x10f0b7];return _0x3abae2;}import a39_0xe1410b 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 _0x4872d8=a39_0x3aba;return GIT_COMMIT!==_0x4872d8(0xc6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4872d8(0xc2)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1293ea=a39_0x3aba,_0x48aaeb=process[_0x1293ea(0xba)][_0x1293ea(0xdf)]();if(_0x48aaeb['includes'](_0x1293ea(0xea)))return'bun';return _0x1293ea(0xc1);}const updateFlags=[{'name':a39_0x3e782b(0xd4),'type':a39_0x3e782b(0xd2),'description':a39_0x3e782b(0xd0),'default':![]},{'name':a39_0x3e782b(0x101),'type':a39_0x3e782b(0xb0),'description':a39_0x3e782b(0xb7)}];function getRequestedVersion(_0xa1c0eb){const _0x1625c1=a39_0x3e782b;return _0xa1c0eb[_0x1625c1(0xc5)]('version')[_0x1625c1(0xdc)]();}async function validateUpdateFlags(_0x3a6c71){const _0x39c6f7=a39_0x3e782b,_0x8dbb52=_0x3a6c71[_0x39c6f7(0xe7)]('beta'),_0x42ba48=getRequestedVersion(_0x3a6c71);if(_0x8dbb52&&_0x42ba48)throw CliErrors[_0x39c6f7(0xf3)](_0x39c6f7(0xcf),_0x39c6f7(0xf4));if(_0x42ba48&&!a39_0xe1410b[_0x39c6f7(0xd7)](_0x42ba48))throw CliErrors[_0x39c6f7(0xf3)]('Invalid\x20version:\x20'+_0x42ba48,_0x39c6f7(0xf7));}async function fetchNpmDistTags(){const _0x532c05=a39_0x3e782b;try{const _0x4debee=await fetch(_0x532c05(0xcd)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x532c05(0xbf),{'signal':AbortSignal[_0x532c05(0xca)](0x2710)});if(!_0x4debee['ok'])return null;const _0x1a1ff8=await _0x4debee[_0x532c05(0xd9)]();if(!_0x1a1ff8||typeof _0x1a1ff8!==_0x532c05(0xb8))return null;return Object[_0x532c05(0xbc)](Object[_0x532c05(0xe6)](_0x1a1ff8)[_0x532c05(0xfd)](([,_0x5bc6b5])=>typeof _0x5bc6b5===_0x532c05(0xb0)&&_0x5bc6b5[_0x532c05(0xdc)]()[_0x532c05(0xff)]>0x0)['map'](([_0x3d9c23,_0x4ef2bc])=>[_0x3d9c23,String(_0x4ef2bc)[_0x532c05(0xdc)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x314bab){const _0x440f8c=await fetchNpmDistTags();return _0x440f8c?.[_0x314bab]??null;}async function fetchLatestVersion(){const _0x38b4da=a39_0x3e782b;return fetchNpmDistTagVersion(_0x38b4da(0xae));}async function resolveTargetVersion(_0x9d508d){const _0x2e66e5=a39_0x3e782b,_0x516fe8=getRequestedVersion(_0x9d508d);if(_0x516fe8)return{'version':_0x516fe8,'source':_0x2e66e5(0x101)};if(_0x9d508d[_0x2e66e5(0xe7)](_0x2e66e5(0xd4))){const _0x58e901=await fetchNpmDistTagVersion(_0x2e66e5(0xd4));if(!_0x58e901)return null;return{'version':_0x58e901,'source':_0x2e66e5(0xd4)};}const _0x13a563=await fetchLatestVersion();if(!_0x13a563)return null;return{'version':_0x13a563,'source':_0x2e66e5(0xae)};}function shouldInstallTarget(_0x500bd5,_0x1c76a){const _0x5501bf=a39_0x3e782b;if(_0x1c76a[_0x5501bf(0xc0)]===_0x5501bf(0x101)||_0x1c76a[_0x5501bf(0xc0)]==='beta')return!a39_0xe1410b['eq'](_0x500bd5,_0x1c76a[_0x5501bf(0x101)]);return a39_0xe1410b['lt'](_0x500bd5,_0x1c76a[_0x5501bf(0x101)]);}function getInstallPlanLabel(_0x5dda02,_0x28e38e){const _0x246df2=a39_0x3e782b;switch(_0x28e38e[_0x246df2(0xc0)]){case _0x246df2(0xd4):return _0x246df2(0xef)+a39_0xba5684['yellow'](_0x5dda02)+'\x20→\x20'+a39_0xba5684[_0x246df2(0xdb)](_0x28e38e[_0x246df2(0x101)]);case'version':return _0x246df2(0xd8)+a39_0xba5684['yellow'](_0x5dda02)+_0x246df2(0xb6)+a39_0xba5684['green'](_0x28e38e[_0x246df2(0x101)]);case _0x246df2(0xae):default:return _0x246df2(0xfa)+a39_0xba5684['yellow'](_0x5dda02)+_0x246df2(0xb6)+a39_0xba5684[_0x246df2(0xdb)](_0x28e38e[_0x246df2(0x101)]);}}function repairCurrentBuiltinSkill(){const _0x620f37=a39_0x3e782b;console['log'](a39_0xba5684['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2564d1=installBuiltinSkill();if(_0x2564d1['ok'])return console[_0x620f37(0xe3)](a39_0xba5684['gray'](_0x620f37(0xc4)+_0x2564d1[_0x620f37(0xbb)]+_0x620f37(0xec))),!![];return console[_0x620f37(0xcb)](a39_0xba5684[_0x620f37(0xaf)](_0x620f37(0x100)+_0x2564d1[_0x620f37(0xf1)]+_0x620f37(0xe5)+(_0x2564d1[_0x620f37(0xf6)]||_0x620f37(0xc6)))),console[_0x620f37(0xe3)](a39_0xba5684['gray'](_0x620f37(0xb5)+CLI_BIN_NAME+_0x620f37(0xc9))),![];}function verifyUpdatedBuiltinSkill(_0x28746d){const _0x16db72=a39_0x3e782b,_0x355ac5=inspectInstalledBuiltinSkillVersion(_0x28746d);if(_0x355ac5['state']===_0x16db72(0xfb))return console[_0x16db72(0xe3)](a39_0xba5684[_0x16db72(0xe9)](_0x16db72(0xc4)+_0x28746d+'\x20is\x20up\x20to\x20date.')),!![];const _0x580138=_0x355ac5[_0x16db72(0xbb)]?'expected\x20'+_0x28746d+',\x20found\x20'+_0x355ac5[_0x16db72(0xbb)]:_0x16db72(0xd5)+_0x28746d+_0x16db72(0xb2)+_0x355ac5[_0x16db72(0xe1)];return console[_0x16db72(0xcb)](a39_0xba5684[_0x16db72(0xaf)](_0x16db72(0x102)+_0x580138)),console['log'](a39_0xba5684['gray'](_0x16db72(0xb5)+_0x355ac5[_0x16db72(0xc8)])),![];}async function execute(_0x3fb757){const _0x280b2f=a39_0x3e782b;await validateUpdateFlags(_0x3fb757);const _0x34d3f1=getCurrentVersion();console[_0x280b2f(0xe3)]('Current\x20version:\x20'+_0x34d3f1);const _0x400e7b=a39_0x568967(_0x280b2f(0xb3))[_0x280b2f(0xd3)](),_0x358fbe=await resolveTargetVersion(_0x3fb757);if(!_0x358fbe){const _0x5732f3=_0x3fb757['bool'](_0x280b2f(0xd4))?_0x280b2f(0xfe):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x400e7b[_0x280b2f(0xf0)](_0x5732f3),console['log'](a39_0xba5684['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x5732f3};}const _0x411e43=a39_0xe1410b[_0x280b2f(0xd7)](VERSION),_0x490303=a39_0xe1410b[_0x280b2f(0xd7)](_0x358fbe['version']);if(!_0x411e43||!_0x490303)return _0x400e7b[_0x280b2f(0xf0)](_0x280b2f(0xb9)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x411e43,_0x358fbe)){const _0x5bb475=_0x358fbe['source']===_0x280b2f(0x101)?_0x280b2f(0xcc)+_0x358fbe[_0x280b2f(0x101)]+')':_0x280b2f(0xce)+_0x358fbe[_0x280b2f(0x101)]+')';return _0x400e7b['succeed'](_0x5bb475),{'ok':repairCurrentBuiltinSkill()};}_0x400e7b[_0x280b2f(0xf5)](getInstallPlanLabel(_0x34d3f1,_0x358fbe));const _0x3bf4ef=detectPackageManager(),_0x2dfbb0=_0x3bf4ef===_0x280b2f(0xc1)?resolveNpmBin(_0x280b2f(0xc1)):_0x3bf4ef,_0x478618=a39_0x568967(_0x280b2f(0xdd)+_0x3bf4ef+'...')[_0x280b2f(0xd3)]();try{return await execa(_0x2dfbb0,['install','-g',NPM_PACKAGE_NAME+'@'+_0x358fbe[_0x280b2f(0x101)]],{'stdio':_0x280b2f(0xb4)}),_0x478618[_0x280b2f(0xf8)](_0x280b2f(0xe8)+_0x358fbe[_0x280b2f(0x101)]),console[_0x280b2f(0xe3)](a39_0xba5684[_0x280b2f(0xe9)](_0x280b2f(0xeb))),{'ok':verifyUpdatedBuiltinSkill(_0x358fbe[_0x280b2f(0x101)])};}catch(_0x1b28fe){return _0x478618[_0x280b2f(0xf0)](_0x280b2f(0xc7)),console[_0x280b2f(0xf6)](a39_0xba5684[_0x280b2f(0xf9)]('\x20\x20'+_0x1b28fe[_0x280b2f(0xde)])),console[_0x280b2f(0xe3)](a39_0xba5684['gray'](_0x280b2f(0xbd)+_0x3bf4ef+_0x280b2f(0xfc)+NPM_PACKAGE_NAME+'@'+_0x358fbe[_0x280b2f(0x101)])),{'ok':![],'message':_0x1b28fe['message']};}}export const updateDefinition={'service':a39_0x3e782b(0xac),'command':'run','description':a39_0x3e782b(0xf2),'risk':a39_0x3e782b(0xad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a39_0x42bd(){const _0x1fe19a=['execPath','skillVersion','fromEntries','\x20\x20Try\x20manually:\x20','619996RGYMBs','/dist-tags','source','npm','slice','4158558ytSlHD','\x20\x20CLI\x20Built-in\x20Skill\x20','str','unknown','Update\x20failed','repairCommand','\x20cli-skill\x20install','timeout','warn','Already\x20on\x20requested\x20version\x20(v','https://registry.npmjs.org/-/package/','Already\x20up\x20to\x20date\x20(v','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','804937DAVYDe','boolean','start','beta','expected\x20','966936vEaHVY','valid','Requested\x20version:\x20','json','24RRGMjq','green','trim','Updating\x20via\x20','message','toLowerCase','4nZPzJy','state','2ZbAEMt','log','1862505jJGgVh',']:\x20','entries','bool','Updated\x20to\x20v','gray','bun','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20is\x20up\x20to\x20date.','46090oDAZDT','194913mxKjHs','Beta\x20version:\x20','fail','code','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','validation','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','info','error','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','succeed','red','Update\x20available:\x20','current','\x20install\x20-g\x20','filter','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','length','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','version','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','update','read','latest','yellow','string','730HEtxbh',',\x20state\x20','Checking\x20for\x20updates...','pipe','\x20\x20Run\x20manually:\x20','\x20→\x20','Install\x20a\x20specific\x20CLI\x20version','object','Version\x20comparison\x20failed'];a39_0x42bd=function(){return _0x1fe19a;};return a39_0x42bd();}
1
+ const a39_0x59dd80=a39_0x151a;(function(_0x4355e8,_0x1de3cf){const _0x8eec00=a39_0x151a,_0xa619fe=_0x4355e8();while(!![]){try{const _0x2b21e6=parseInt(_0x8eec00(0x97))/0x1*(parseInt(_0x8eec00(0x93))/0x2)+-parseInt(_0x8eec00(0xde))/0x3*(-parseInt(_0x8eec00(0xce))/0x4)+-parseInt(_0x8eec00(0xca))/0x5+parseInt(_0x8eec00(0xb9))/0x6+parseInt(_0x8eec00(0xae))/0x7*(parseInt(_0x8eec00(0xe1))/0x8)+parseInt(_0x8eec00(0xbc))/0x9+parseInt(_0x8eec00(0xa9))/0xa*(-parseInt(_0x8eec00(0xc9))/0xb);if(_0x2b21e6===_0x1de3cf)break;else _0xa619fe['push'](_0xa619fe['shift']());}catch(_0x2d8f76){_0xa619fe['push'](_0xa619fe['shift']());}}}(a39_0x4a9a,0x7a588));import a39_0x3da42f from'chalk';import a39_0x24b1d7 from'ora';import a39_0x4855a9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a39_0x4a9a(){const _0x548067=['run','trim','/dist-tags','update','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest','unknown','fromEntries','str','execPath','filter','\x20→\x20','expected\x20','Invalid\x20version:\x20','1070fGPgis','start','npm','fail','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7rENBtw','Already\x20on\x20requested\x20version\x20(v','toLowerCase','entries','gray','source','\x20cli-skill\x20install','Install\x20a\x20specific\x20CLI\x20version','@latest','yellow','green','73320jrKjAn','info','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','6932691pKLRKG','\x20install\x20-g\x20','warn','timeout','validation','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','red','object','string',']:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','length','valid','96206NNmZVz','1838440KwlSAm',',\x20found\x20','skillVersion','Already\x20up\x20to\x20date\x20(v','1104ZBlcsg','Requested\x20version:\x20','Update\x20available:\x20','bun','message','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Updated\x20to\x20v','https://registry.npmjs.org/-/package/','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20failed','slice','install','\x20\x20CLI\x20Built-in\x20Skill\x20','code','includes','log','381dZQMBD',',\x20state\x20','bool','4055144ZKreYq','beta','version','state','2292OVpbpD','Version\x20comparison\x20failed','Current\x20version:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','419ulIpXH','error','current','succeed'];a39_0x4a9a=function(){return _0x548067;};return a39_0x4a9a();}import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x11b24e=a39_0x151a;return GIT_COMMIT!==_0x11b24e(0xa1)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x11b24e(0xd8)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x56945b=a39_0x151a,_0x21a251=process[_0x56945b(0xa4)][_0x56945b(0xb0)]();if(_0x21a251[_0x56945b(0xdc)]('bun'))return _0x56945b(0xd1);return _0x56945b(0xab);}const updateFlags=[{'name':a39_0x59dd80(0x90),'type':'boolean','description':a39_0x59dd80(0x9f),'default':![]},{'name':'version','type':a39_0x59dd80(0xc4),'description':a39_0x59dd80(0xb5)}];function getRequestedVersion(_0x5ad522){const _0x172543=a39_0x59dd80;return _0x5ad522[_0x172543(0xa3)](_0x172543(0x91))[_0x172543(0x9c)]();}async function validateUpdateFlags(_0x17f15c){const _0x216721=a39_0x59dd80,_0x237d48=_0x17f15c['bool'](_0x216721(0x90)),_0x2e24b7=getRequestedVersion(_0x17f15c);if(_0x237d48&&_0x2e24b7)throw CliErrors[_0x216721(0xc0)](_0x216721(0xd6),_0x216721(0xad));if(_0x2e24b7&&!a39_0x4855a9[_0x216721(0xc8)](_0x2e24b7))throw CliErrors[_0x216721(0xc0)](_0x216721(0xa8)+_0x2e24b7,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}function a39_0x151a(_0x40b379,_0x32495c){_0x40b379=_0x40b379-0x90;const _0x4a9a07=a39_0x4a9a();let _0x151aab=_0x4a9a07[_0x40b379];return _0x151aab;}async function fetchNpmDistTags(){const _0x21e79d=a39_0x59dd80;try{const _0x537c01=await fetch(_0x21e79d(0xd5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21e79d(0x9d),{'signal':AbortSignal[_0x21e79d(0xbf)](0x2710)});if(!_0x537c01['ok'])return null;const _0x217150=await _0x537c01['json']();if(!_0x217150||typeof _0x217150!==_0x21e79d(0xc3))return null;return Object[_0x21e79d(0xa2)](Object[_0x21e79d(0xb1)](_0x217150)[_0x21e79d(0xa5)](([,_0x51f1a8])=>typeof _0x51f1a8==='string'&&_0x51f1a8[_0x21e79d(0x9c)]()[_0x21e79d(0xc7)]>0x0)['map'](([_0x3dd67f,_0x292c0b])=>[_0x3dd67f,String(_0x292c0b)[_0x21e79d(0x9c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xfaa59e){const _0x56e6e0=await fetchNpmDistTags();return _0x56e6e0?.[_0xfaa59e]??null;}async function fetchLatestVersion(){const _0x11593f=a39_0x59dd80;return fetchNpmDistTagVersion(_0x11593f(0xa0));}async function resolveTargetVersion(_0x406135){const _0x21532e=a39_0x59dd80,_0x1faff0=getRequestedVersion(_0x406135);if(_0x1faff0)return{'version':_0x1faff0,'source':_0x21532e(0x91)};if(_0x406135['bool'](_0x21532e(0x90))){const _0x428c49=await fetchNpmDistTagVersion(_0x21532e(0x90));if(!_0x428c49)return null;return{'version':_0x428c49,'source':'beta'};}const _0x434c30=await fetchLatestVersion();if(!_0x434c30)return null;return{'version':_0x434c30,'source':_0x21532e(0xa0)};}function shouldInstallTarget(_0x20a3a7,_0x13d372){const _0x5503fa=a39_0x59dd80;if(_0x13d372[_0x5503fa(0xb3)]===_0x5503fa(0x91)||_0x13d372[_0x5503fa(0xb3)]==='beta')return!a39_0x4855a9['eq'](_0x20a3a7,_0x13d372[_0x5503fa(0x91)]);return a39_0x4855a9['lt'](_0x20a3a7,_0x13d372[_0x5503fa(0x91)]);}function getInstallPlanLabel(_0x388d15,_0x22e767){const _0x41fb88=a39_0x59dd80;switch(_0x22e767[_0x41fb88(0xb3)]){case _0x41fb88(0x90):return'Beta\x20version:\x20'+a39_0x3da42f['yellow'](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f[_0x41fb88(0xb8)](_0x22e767['version']);case _0x41fb88(0x91):return _0x41fb88(0xcf)+a39_0x3da42f[_0x41fb88(0xb7)](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f[_0x41fb88(0xb8)](_0x22e767['version']);case _0x41fb88(0xa0):default:return _0x41fb88(0xd0)+a39_0x3da42f[_0x41fb88(0xb7)](_0x388d15)+_0x41fb88(0xa6)+a39_0x3da42f['green'](_0x22e767[_0x41fb88(0x91)]);}}function repairCurrentBuiltinSkill(){const _0x163390=a39_0x59dd80;console[_0x163390(0xdd)](a39_0x3da42f['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x4b9e7e=installBuiltinSkill();if(_0x4b9e7e['ok'])return console[_0x163390(0xdd)](a39_0x3da42f[_0x163390(0xb2)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4b9e7e['skillVersion']+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x163390(0xbe)](a39_0x3da42f['yellow'](_0x163390(0xd3)+_0x4b9e7e[_0x163390(0xdb)]+_0x163390(0xc5)+(_0x4b9e7e['error']||'unknown'))),console['log'](a39_0x3da42f[_0x163390(0xb2)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x163390(0xb4))),![];}function verifyUpdatedBuiltinSkill(_0x3fb392){const _0xbf67d6=a39_0x59dd80,_0x15eace=inspectInstalledBuiltinSkillVersion(_0x3fb392);if(_0x15eace[_0xbf67d6(0x92)]===_0xbf67d6(0x99))return console['log'](a39_0x3da42f[_0xbf67d6(0xb2)](_0xbf67d6(0xda)+_0x3fb392+'\x20is\x20up\x20to\x20date.')),!![];const _0x1a2ba6=_0x15eace[_0xbf67d6(0xcc)]?_0xbf67d6(0xa7)+_0x3fb392+_0xbf67d6(0xcb)+_0x15eace[_0xbf67d6(0xcc)]:_0xbf67d6(0xa7)+_0x3fb392+_0xbf67d6(0xdf)+_0x15eace['state'];return console[_0xbf67d6(0xbe)](a39_0x3da42f['yellow']('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x1a2ba6)),console['log'](a39_0x3da42f[_0xbf67d6(0xb2)]('\x20\x20Run\x20manually:\x20'+_0x15eace['repairCommand'])),![];}async function execute(_0x36b8bc){const _0x214ba5=a39_0x59dd80;await validateUpdateFlags(_0x36b8bc);const _0x1a4d55=getCurrentVersion();console[_0x214ba5(0xdd)](_0x214ba5(0x95)+_0x1a4d55);const _0x5c346a=a39_0x24b1d7('Checking\x20for\x20updates...')[_0x214ba5(0xaa)](),_0xd25dde=await resolveTargetVersion(_0x36b8bc);if(!_0xd25dde){const _0x46aa0c=_0x36b8bc[_0x214ba5(0xe0)](_0x214ba5(0x90))?_0x214ba5(0xbb):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5c346a['fail'](_0x46aa0c),console['log'](a39_0x3da42f['gray'](_0x214ba5(0xc6)+NPM_PACKAGE_NAME+_0x214ba5(0xb6))),{'ok':![],'message':_0x46aa0c};}const _0x3566e4=a39_0x4855a9[_0x214ba5(0xc8)](VERSION),_0xc6917a=a39_0x4855a9[_0x214ba5(0xc8)](_0xd25dde[_0x214ba5(0x91)]);if(!_0x3566e4||!_0xc6917a)return _0x5c346a[_0x214ba5(0xac)](_0x214ba5(0x94)),{'ok':![],'message':_0x214ba5(0x94)};if(!shouldInstallTarget(_0x3566e4,_0xd25dde)){const _0x33069a=_0xd25dde[_0x214ba5(0xb3)]===_0x214ba5(0x91)?_0x214ba5(0xaf)+_0xd25dde[_0x214ba5(0x91)]+')':_0x214ba5(0xcd)+_0xd25dde[_0x214ba5(0x91)]+')';return _0x5c346a[_0x214ba5(0x9a)](_0x33069a),{'ok':repairCurrentBuiltinSkill()};}_0x5c346a[_0x214ba5(0xba)](getInstallPlanLabel(_0x1a4d55,_0xd25dde));const _0x3c602d=detectPackageManager(),_0x5c55c2=_0x3c602d===_0x214ba5(0xab)?resolveNpmBin(_0x214ba5(0xab)):_0x3c602d,_0x15293c=a39_0x24b1d7('Updating\x20via\x20'+_0x3c602d+'...')[_0x214ba5(0xaa)]();try{return await execa(_0x5c55c2,[_0x214ba5(0xd9),'-g',NPM_PACKAGE_NAME+'@'+_0xd25dde['version']],{'stdio':'pipe'}),_0x15293c[_0x214ba5(0x9a)](_0x214ba5(0xd4)+_0xd25dde['version']),console[_0x214ba5(0xdd)](a39_0x3da42f[_0x214ba5(0xb2)](_0x214ba5(0x96))),{'ok':verifyUpdatedBuiltinSkill(_0xd25dde[_0x214ba5(0x91)])};}catch(_0x51d555){return _0x15293c[_0x214ba5(0xac)](_0x214ba5(0xd7)),console[_0x214ba5(0x98)](a39_0x3da42f[_0x214ba5(0xc2)]('\x20\x20'+_0x51d555[_0x214ba5(0xd2)])),console[_0x214ba5(0xdd)](a39_0x3da42f[_0x214ba5(0xb2)]('\x20\x20Try\x20manually:\x20'+_0x3c602d+_0x214ba5(0xbd)+NPM_PACKAGE_NAME+'@'+_0xd25dde[_0x214ba5(0x91)])),{'ok':![],'message':_0x51d555[_0x214ba5(0xd2)]};}}export const updateDefinition={'service':a39_0x59dd80(0x9e),'command':a39_0x59dd80(0x9b),'description':a39_0x59dd80(0xc1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a40_0x2715(_0x217b9e,_0xb32156){_0x217b9e=_0x217b9e-0xf1;const _0xcead90=a40_0xcead();let _0x271585=_0xcead90[_0x217b9e];return _0x271585;}(function(_0x597bf3,_0x448071){const _0x5a7d19=a40_0x2715,_0x3f11b2=_0x597bf3();while(!![]){try{const _0xa8a75d=parseInt(_0x5a7d19(0xf5))/0x1+-parseInt(_0x5a7d19(0xfa))/0x2*(parseInt(_0x5a7d19(0xf8))/0x3)+parseInt(_0x5a7d19(0xf6))/0x4+parseInt(_0x5a7d19(0xf7))/0x5*(parseInt(_0x5a7d19(0xf9))/0x6)+parseInt(_0x5a7d19(0xf2))/0x7+-parseInt(_0x5a7d19(0xf4))/0x8*(-parseInt(_0x5a7d19(0xf1))/0x9)+-parseInt(_0x5a7d19(0xf3))/0xa;if(_0xa8a75d===_0x448071)break;else _0x3f11b2['push'](_0x3f11b2['shift']());}catch(_0x27c5f9){_0x3f11b2['push'](_0x3f11b2['shift']());}}}(a40_0xcead,0xc4dfb));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0xcead(){const _0x4d8453=['9vUZypo','5964987kxACvj','8425490VxeYQc','451144PvJSgN','531332WZBUsC','5068136wyASmc','30GkhZPa','4275ABGtqb','515244VZgcrN','2208biahca'];a40_0xcead=function(){return _0x4d8453;};return a40_0xcead();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a40_0x4102(){const _0x37a24b=['1064612BVfocF','5OOcKDR','1506naLUCI','596ILJttE','2364fwrUpa','133rPTvTU','760mDOYcm','27357yAjJmx','58040fsgZCL','50022iepbJt','1638534nDohYQ','365862kablvj'];a40_0x4102=function(){return _0x37a24b;};return a40_0x4102();}(function(_0x11d58c,_0x43f60e){const _0x48f10b=a40_0x5939,_0x4dee81=_0x11d58c();while(!![]){try{const _0x4909b4=-parseInt(_0x48f10b(0xef))/0x1+parseInt(_0x48f10b(0xf0))/0x2+-parseInt(_0x48f10b(0xf2))/0x3*(-parseInt(_0x48f10b(0xf3))/0x4)+parseInt(_0x48f10b(0xf1))/0x5*(parseInt(_0x48f10b(0xee))/0x6)+-parseInt(_0x48f10b(0xe9))/0x7*(parseInt(_0x48f10b(0xec))/0x8)+-parseInt(_0x48f10b(0xed))/0x9*(-parseInt(_0x48f10b(0xea))/0xa)+-parseInt(_0x48f10b(0xeb))/0xb*(parseInt(_0x48f10b(0xe8))/0xc);if(_0x4909b4===_0x43f60e)break;else _0x4dee81['push'](_0x4dee81['shift']());}catch(_0x1dedd1){_0x4dee81['push'](_0x4dee81['shift']());}}}(a40_0x4102,0x4b6db));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x5939(_0x17a596,_0x169db4){_0x17a596=_0x17a596-0xe8;const _0x4102ff=a40_0x4102();let _0x59393c=_0x4102ff[_0x17a596];return _0x59393c;}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x464dc5=a41_0x36ee;(function(_0x536cf1,_0x34e567){const _0x4c1b6c=a41_0x36ee,_0x4ce33c=_0x536cf1();while(!![]){try{const _0x5b30fd=-parseInt(_0x4c1b6c(0xd0))/0x1+parseInt(_0x4c1b6c(0xc8))/0x2+-parseInt(_0x4c1b6c(0xd3))/0x3*(parseInt(_0x4c1b6c(0xc6))/0x4)+parseInt(_0x4c1b6c(0xc7))/0x5*(parseInt(_0x4c1b6c(0xd8))/0x6)+-parseInt(_0x4c1b6c(0xce))/0x7+-parseInt(_0x4c1b6c(0xc2))/0x8+parseInt(_0x4c1b6c(0xcf))/0x9;if(_0x5b30fd===_0x34e567)break;else _0x4ce33c['push'](_0x4ce33c['shift']());}catch(_0x2c05ad){_0x4ce33c['push'](_0x4ce33c['shift']());}}}(a41_0x3a9e,0x79538));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x36ee(_0x3d6cf3,_0x186925){_0x3d6cf3=_0x3d6cf3-0xc2;const _0x3a9ec2=a41_0x3a9e();let _0x36ee48=_0x3a9ec2[_0x3d6cf3];return _0x36ee48;}export const codegenSdk={'service':a41_0x464dc5(0xd1),'command':a41_0x464dc5(0xcc),'description':a41_0x464dc5(0xd4),'risk':a41_0x464dc5(0xd6),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x464dc5(0xc5),'type':'string','description':a41_0x464dc5(0xd7)},{'name':'operation','type':a41_0x464dc5(0xc3),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0x464dc5(0xc4),'type':'boolean','description':a41_0x464dc5(0xcd)}],async 'execute'(_0x2aa89f){const _0x2225ad=a41_0x464dc5,{dataset:_0x1d36f6,operation:_0x257889}=await getOperationDetail(_0x2aa89f['appCode'],_0x2aa89f['str']('code'),_0x2aa89f[_0x2225ad(0xcb)](_0x2225ad(0xca))),_0x27f5ed=generateSdkCode(_0x1d36f6,_0x257889,{'includeImports':!_0x2aa89f['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1d36f6[_0x2225ad(0xd5)],'code':_0x1d36f6[_0x2225ad(0xd2)],'tableName':_0x1d36f6[_0x2225ad(0xc9)]},'operation':_0x2aa89f['str']('operation'),'code':_0x27f5ed}};}};function a41_0x3a9e(){const _0x2cc63b=['Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','6078TUSNnV','7803904TqAkpr','string','skip-imports','alias','1384ZmZctw','4880ELDzTE','326640IiMaDM','tableName','operation','str','sdk','Omit\x20import\x20statements\x20from\x20generated\x20code','4521223stNgLl','16064064iWgAgu','529665wwfNCj','codegen','code','2505yJakkB','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','name','read'];a41_0x3a9e=function(){return _0x2cc63b;};return a41_0x3a9e();}
1
+ const a41_0x558fad=a41_0x1503;function a41_0x1503(_0x332c9e,_0x13aaf8){_0x332c9e=_0x332c9e-0x197;const _0x176729=a41_0x1767();let _0x1503db=_0x176729[_0x332c9e];return _0x1503db;}(function(_0x550a59,_0x105963){const _0x383847=a41_0x1503,_0x2978f9=_0x550a59();while(!![]){try{const _0x55774e=-parseInt(_0x383847(0x1a1))/0x1+parseInt(_0x383847(0x1a4))/0x2*(parseInt(_0x383847(0x19b))/0x3)+parseInt(_0x383847(0x1ac))/0x4*(parseInt(_0x383847(0x1a2))/0x5)+parseInt(_0x383847(0x19c))/0x6*(parseInt(_0x383847(0x1ad))/0x7)+parseInt(_0x383847(0x1ae))/0x8*(parseInt(_0x383847(0x199))/0x9)+parseInt(_0x383847(0x19f))/0xa*(parseInt(_0x383847(0x19d))/0xb)+-parseInt(_0x383847(0x1aa))/0xc;if(_0x55774e===_0x105963)break;else _0x2978f9['push'](_0x2978f9['shift']());}catch(_0x3d0a5c){_0x2978f9['push'](_0x2978f9['shift']());}}}(a41_0x1767,0x6696a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x558fad(0x1a9),'command':a41_0x558fad(0x19a),'description':a41_0x558fad(0x1ab),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x558fad(0x197),'type':a41_0x558fad(0x1a0),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x558fad(0x1a3),'type':a41_0x558fad(0x1a0),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':'boolean','description':a41_0x558fad(0x198)}],async 'execute'(_0x242d6f){const _0x1b1f04=a41_0x558fad,{dataset:_0x2dc040,operation:_0x421fc8}=await getOperationDetail(_0x242d6f[_0x1b1f04(0x1a7)],_0x242d6f[_0x1b1f04(0x1a8)]('code'),_0x242d6f['str']('operation')),_0x2329f1=generateSdkCode(_0x2dc040,_0x421fc8,{'includeImports':!_0x242d6f['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2dc040[_0x1b1f04(0x1a6)],'code':_0x2dc040[_0x1b1f04(0x1a5)],'tableName':_0x2dc040[_0x1b1f04(0x19e)]},'operation':_0x242d6f[_0x1b1f04(0x1a8)](_0x1b1f04(0x1a3)),'code':_0x2329f1}};}};function a41_0x1767(){const _0x5cbfaa=['1793JKDLEh','tableName','50390linihf','string','454885hqyrNx','38450stebCU','operation','763918yGyIUW','code','name','appCode','str','codegen','27446004ZqgQWq','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','248UdYTWp','7pnhWcy','5242984Plsqqd','alias','Omit\x20import\x20statements\x20from\x20generated\x20code','9bTdzhg','sdk','6TJoLNj','2668956zEbTMT'];a41_0x1767=function(){return _0x5cbfaa;};return a41_0x1767();}
@@ -1 +1 @@
1
- const a42_0x52c7d7=a42_0x2d47;function a42_0x2d47(_0x39fe73,_0x393550){_0x39fe73=_0x39fe73-0xfd;const _0x20842c=a42_0x2084();let _0x2d471e=_0x20842c[_0x39fe73];return _0x2d471e;}(function(_0x2fe571,_0x874dc4){const _0xfeb813=a42_0x2d47,_0x1ef87e=_0x2fe571();while(!![]){try{const _0x5d3631=-parseInt(_0xfeb813(0x100))/0x1+-parseInt(_0xfeb813(0x10e))/0x2+-parseInt(_0xfeb813(0x10c))/0x3*(-parseInt(_0xfeb813(0x112))/0x4)+parseInt(_0xfeb813(0x104))/0x5*(-parseInt(_0xfeb813(0x10a))/0x6)+-parseInt(_0xfeb813(0x105))/0x7*(parseInt(_0xfeb813(0xff))/0x8)+parseInt(_0xfeb813(0x111))/0x9*(-parseInt(_0xfeb813(0x101))/0xa)+parseInt(_0xfeb813(0x106))/0xb*(parseInt(_0xfeb813(0xfd))/0xc);if(_0x5d3631===_0x874dc4)break;else _0x1ef87e['push'](_0x1ef87e['shift']());}catch(_0x3decb3){_0x1ef87e['push'](_0x1ef87e['shift']());}}}(a42_0x2084,0xae415));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a42_0x2084(){const _0x24794e=['3AFddDK','sdk','2656854VPgBxt','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','8390934nKmGVE','5585036CkUrru','no-imports','appCode','1826556FLYaBM','Omit\x20import\x20statements\x20from\x20generated\x20code','216pnrPNl','1059296GpcAkM','10cePxWW','str','target','532275hzlgZv','283150kTNANw','308LEMTLx','string','sqlcode','bool','30MnqhJL','read'];a42_0x2084=function(){return _0x24794e;};return a42_0x2084();}export const codegenSql={'service':'codegen','command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x52c7d7(0x10b),'flags':[SQLCODE_FLAG,{'name':a42_0x52c7d7(0x103),'type':a42_0x52c7d7(0x107),'description':a42_0x52c7d7(0x110),'default':a42_0x52c7d7(0x10d),'enum':[a42_0x52c7d7(0x10d),a42_0x52c7d7(0x10f)]},{'name':'no-imports','type':'boolean','description':a42_0x52c7d7(0xfe)}],async 'execute'(_0x209793){const _0x57b0a4=a42_0x52c7d7,_0x4d9e24=await getSqlQueryInfo(_0x209793[_0x57b0a4(0x114)],_0x209793[_0x57b0a4(0x102)](_0x57b0a4(0x108))),_0xcadd56=_0x209793[_0x57b0a4(0x102)]('target')||'sdk',_0x1a9347=generateSqlCodeTemplate(_0x4d9e24,{'target':_0xcadd56,'includeImports':!_0x209793[_0x57b0a4(0x109)](_0x57b0a4(0x113))});return{'ok':!![],'data':{'sqlCode':_0x4d9e24['sqlCode'],'sqlName':_0x4d9e24['sqlName'],'target':_0xcadd56,'code':_0x1a9347}};}};
1
+ const a42_0x3eca31=a42_0x1b06;(function(_0x4bd09f,_0x1c57a4){const _0x106800=a42_0x1b06,_0x4218da=_0x4bd09f();while(!![]){try{const _0xf6f852=-parseInt(_0x106800(0x17c))/0x1*(-parseInt(_0x106800(0x18b))/0x2)+parseInt(_0x106800(0x183))/0x3+-parseInt(_0x106800(0x180))/0x4*(parseInt(_0x106800(0x195))/0x5)+-parseInt(_0x106800(0x189))/0x6*(-parseInt(_0x106800(0x184))/0x7)+parseInt(_0x106800(0x181))/0x8*(-parseInt(_0x106800(0x191))/0x9)+parseInt(_0x106800(0x18a))/0xa*(-parseInt(_0x106800(0x17f))/0xb)+-parseInt(_0x106800(0x190))/0xc*(parseInt(_0x106800(0x186))/0xd);if(_0xf6f852===_0x1c57a4)break;else _0x4218da['push'](_0x4218da['shift']());}catch(_0x19661a){_0x4218da['push'](_0x4218da['shift']());}}}(a42_0x2648,0x4f738));function a42_0x1b06(_0x37c1e0,_0x970d72){_0x37c1e0=_0x37c1e0-0x17c;const _0x2648a6=a42_0x2648();let _0x1b0663=_0x2648a6[_0x37c1e0];return _0x1b0663;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x3eca31(0x193),'command':a42_0x3eca31(0x17e),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x3eca31(0x182),'flags':[SQLCODE_FLAG,{'name':a42_0x3eca31(0x185),'type':a42_0x3eca31(0x17d),'description':a42_0x3eca31(0x196),'default':a42_0x3eca31(0x188),'enum':[a42_0x3eca31(0x188),a42_0x3eca31(0x18c)]},{'name':a42_0x3eca31(0x192),'type':a42_0x3eca31(0x18f),'description':a42_0x3eca31(0x194)}],async 'execute'(_0x1013e9){const _0x32325a=a42_0x3eca31,_0x17a4da=await getSqlQueryInfo(_0x1013e9['appCode'],_0x1013e9[_0x32325a(0x197)](_0x32325a(0x18e))),_0x57730a=_0x1013e9['str']('target')||'sdk',_0x110153=generateSqlCodeTemplate(_0x17a4da,{'target':_0x57730a,'includeImports':!_0x1013e9[_0x32325a(0x187)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x17a4da['sqlCode'],'sqlName':_0x17a4da[_0x32325a(0x18d)],'target':_0x57730a,'code':_0x110153}};}};function a42_0x2648(){const _0x450bbc=['449057pIkfDB','string','sql','11sfxMzK','863412njEtMA','2344sXxSmE','read','1820004DRYTKY','189UHbKPn','target','73801FSHPCL','bool','sdk','109296uJxCrr','2689110rbVaLG','2YRiIOL','bff','sqlName','sqlcode','boolean','444KAhSRv','9567DFmLtp','no-imports','codegen','Omit\x20import\x20statements\x20from\x20generated\x20code','10lyylwo','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','str'];a42_0x2648=function(){return _0x450bbc;};return a42_0x2648();}
@@ -1 +1 @@
1
- function a43_0x9d77(){const _0x514794=['defaultApp','1uGDpkp','bool','keys','Usage:\x20','\x20<name>\x20[--global]','\x20config.','\x20app\x20\x22','project','\x20<name>\x20--appcode\x20<code>','flagMissing','\x22\x20(appcode:\x20','961833ncAYYR','projectConfig','\x22\x20not\x20found.','global','227990BbkwWR','appcode','Use\x20global\x20config\x20scope','3474FFHGlV','60ThSviq','boolean','4JOLObb','1230200XUluPq','\x22\x20still\x20defined\x20in\x20','length','Updated','App\x20\x22','\x20Set\x20as\x20default\x20app.','\x20<name>','8780yTzdLQ','\x20Default\x20app\x20changed\x20to\x20\x22','object','48wMFyia','apps','globalConfig','Removed\x20app\x20\x22','string','str','2889051KoPrFS','2669536VuYEAF','640360yxEbdw','validation','trim','args'];a43_0x9d77=function(){return _0x514794;};return a43_0x9d77();}(function(_0x228e51,_0x11e9df){const _0x498cf3=a43_0x2510,_0x5a6e6b=_0x228e51();while(!![]){try{const _0x3991e1=-parseInt(_0x498cf3(0x9f))/0x1*(parseInt(_0x498cf3(0x9a))/0x2)+-parseInt(_0x498cf3(0xaa))/0x3*(parseInt(_0x498cf3(0xb4))/0x4)+-parseInt(_0x498cf3(0xb5))/0x5+-parseInt(_0x498cf3(0x92))/0x6*(parseInt(_0x498cf3(0xae))/0x7)+-parseInt(_0x498cf3(0x99))/0x8+parseInt(_0x498cf3(0xb1))/0x9*(parseInt(_0x498cf3(0xbc))/0xa)+parseInt(_0x498cf3(0x98))/0xb*(parseInt(_0x498cf3(0xb2))/0xc);if(_0x3991e1===_0x11e9df)break;else _0x5a6e6b['push'](_0x5a6e6b['shift']());}catch(_0xe42c99){_0x5a6e6b['push'](_0x5a6e6b['shift']());}}}(a43_0x9d77,0x29c16));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x440c20=a43_0x2510;return[{'name':_0x440c20(0xaf),'type':_0x440c20(0x96),'description':'App\x20code','required':!![]},{'name':'global','type':_0x440c20(0xb3),'description':_0x440c20(0xb0),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x976338=a43_0x2510;return[{'name':_0x976338(0xad),'type':'boolean','description':_0x976338(0xb0),'default':![]}];}export async function validateAppName(_0x7f6e79,_0x2e4c1b){const _0x12ee86=a43_0x2510,_0x425514=_0x7f6e79[_0x12ee86(0x9d)][0x0]?.[_0x12ee86(0x9c)]();if(!_0x425514)throw CliErrors['validation']('Missing\x20app\x20name.',_0x12ee86(0xa2)+CLI_BIN_NAME+'\x20'+_0x2e4c1b+_0x12ee86(0xbb));}function a43_0x2510(_0x57efda,_0x5bdddd){_0x57efda=_0x57efda-0x92;const _0x9d773=a43_0x9d77();let _0x2510ed=_0x9d773[_0x57efda];return _0x2510ed;}export async function runAppAdd(_0x4d3740,_0x1b3ae6){const _0x400e95=a43_0x2510,_0x26344f=_0x4d3740['args'][0x0]?.['trim']();if(!_0x26344f)throw CliErrors[_0x400e95(0x9b)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1b3ae6+_0x400e95(0xa7));const _0x17c96a=_0x4d3740[_0x400e95(0x97)](_0x400e95(0xaf));if(!_0x17c96a)throw CliErrors[_0x400e95(0xa8)](_0x400e95(0xaf),_0x400e95(0xa2)+CLI_BIN_NAME+'\x20'+_0x1b3ae6+'\x20<name>\x20--appcode\x20<code>');const _0x2c661c={'global':_0x4d3740[_0x400e95(0xa0)]('global')},_0x4e5ad7=readConfig(_0x2c661c);if(!_0x4e5ad7[_0x400e95(0x93)])_0x4e5ad7['apps']={};const _0x223e5b={'appcode':_0x17c96a,...collectAppProfileOverrides(_0x69398a=>_0x4d3740['str'](_0x69398a))},_0x5c5ac5=_0x4e5ad7[_0x400e95(0x93)],_0x1afdad=!!_0x5c5ac5[_0x26344f];_0x5c5ac5[_0x26344f]=_0x223e5b;if(!_0x4e5ad7[_0x400e95(0x9e)])_0x4e5ad7['defaultApp']=_0x26344f;writeConfig(_0x4e5ad7,_0x2c661c);const _0x5e4557=!_0x1afdad&&_0x4e5ad7[_0x400e95(0x9e)]===_0x26344f?_0x400e95(0xba):'',_0xb6195=(_0x1afdad?_0x400e95(0xb8):'Added')+_0x400e95(0xa5)+_0x26344f+_0x400e95(0xa9)+_0x17c96a+')'+scopeLabel(_0x2c661c)+'.'+_0x5e4557;return{'ok':!![],'message':_0xb6195};}export async function runAppRemove(_0x55c84c,_0x39f9c6){const _0x3b8769=a43_0x2510,_0x4fa301=_0x55c84c[_0x3b8769(0x9d)][0x0]?.[_0x3b8769(0x9c)]();if(!_0x4fa301)throw CliErrors['validation']('Missing\x20app\x20name.',_0x3b8769(0xa2)+CLI_BIN_NAME+'\x20'+_0x39f9c6+_0x3b8769(0xa3));const _0xcd47b8=_0x55c84c['bool'](_0x3b8769(0xad)),{config:_0x1d05b5,layers:_0x138dda}=readRawConfigWithLayers(),_0x2dbecc=_0x1d05b5[_0x3b8769(0x93)]??{};if(!_0x2dbecc[_0x4fa301])throw CliErrors[_0x3b8769(0x9b)](_0x3b8769(0xb9)+_0x4fa301+_0x3b8769(0xac));const _0x349bf6=_0x138dda['globalConfig'][_0x3b8769(0x93)]&&typeof _0x138dda[_0x3b8769(0x94)]['apps']===_0x3b8769(0xbe)?_0x138dda['globalConfig'][_0x3b8769(0x93)]:{},_0x50a6b6=_0x138dda[_0x3b8769(0xab)][_0x3b8769(0x93)]&&typeof _0x138dda[_0x3b8769(0xab)][_0x3b8769(0x93)]===_0x3b8769(0xbe)?_0x138dda[_0x3b8769(0xab)][_0x3b8769(0x93)]:{},_0x211049=appDefinedIn(_0x4fa301,_0x349bf6,_0x50a6b6,_0x138dda[_0x3b8769(0xab)]['inherit']===![]),_0x8d914a=resolveAppScopeForWrite(_0x4fa301,_0xcd47b8,_0x138dda),_0x197c3b={'global':_0x8d914a===_0x3b8769(0xad)},_0x492052=readConfig(_0x197c3b),_0x4febb5=_0x492052['apps'];if(!_0x4febb5||!_0x4febb5[_0x4fa301])throw CliErrors[_0x3b8769(0x9b)](_0x3b8769(0xb9)+_0x4fa301+_0x3b8769(0xac));delete _0x4febb5[_0x4fa301];let _0x2e73ec='';if(_0x492052[_0x3b8769(0x9e)]===_0x4fa301){const _0x4f28d7=Object[_0x3b8769(0xa1)](_0x4febb5);_0x492052[_0x3b8769(0x9e)]=_0x4f28d7[_0x3b8769(0xb7)]>0x0?_0x4f28d7[0x0]:undefined,_0x492052[_0x3b8769(0x9e)]?_0x2e73ec=_0x3b8769(0xbd)+_0x492052['defaultApp']+'\x22.':delete _0x492052['defaultApp'];}Object[_0x3b8769(0xa1)](_0x4febb5)[_0x3b8769(0xb7)]===0x0&&(delete _0x492052[_0x3b8769(0x93)],delete _0x492052[_0x3b8769(0x9e)]);writeConfig(_0x492052,_0x197c3b);const _0x8dd02d=_0x211049==='both'?'\x20Note:\x20app\x20\x22'+_0x4fa301+_0x3b8769(0xb6)+(_0x8d914a===_0x3b8769(0xa6)?_0x3b8769(0xad):_0x3b8769(0xa6))+_0x3b8769(0xa4):'';return{'ok':!![],'message':_0x3b8769(0x95)+_0x4fa301+'\x22'+scopeLabel(_0x197c3b)+'.'+_0x2e73ec+_0x8dd02d};}
1
+ (function(_0x290e38,_0x3303bc){const _0x1ec7b1=a43_0x1474,_0x4a77f7=_0x290e38();while(!![]){try{const _0x320c2b=-parseInt(_0x1ec7b1(0x11a))/0x1+-parseInt(_0x1ec7b1(0x10a))/0x2+parseInt(_0x1ec7b1(0x102))/0x3*(-parseInt(_0x1ec7b1(0x105))/0x4)+-parseInt(_0x1ec7b1(0x106))/0x5*(parseInt(_0x1ec7b1(0x116))/0x6)+-parseInt(_0x1ec7b1(0xfc))/0x7*(-parseInt(_0x1ec7b1(0x10b))/0x8)+parseInt(_0x1ec7b1(0x114))/0x9*(parseInt(_0x1ec7b1(0xf3))/0xa)+parseInt(_0x1ec7b1(0xf9))/0xb;if(_0x320c2b===_0x3303bc)break;else _0x4a77f7['push'](_0x4a77f7['shift']());}catch(_0xef7ad4){_0x4a77f7['push'](_0x4a77f7['shift']());}}}(a43_0x45fa,0xd3ff6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a43_0x1474(_0x16dfd6,_0xd8a54b){_0x16dfd6=_0x16dfd6-0xf0;const _0x45fa91=a43_0x45fa();let _0x1474b8=_0x45fa91[_0x16dfd6];return _0x1474b8;}export function buildAppAddFlags(){const _0x1494fd=a43_0x1474;return[{'name':_0x1494fd(0x10f),'type':_0x1494fd(0xf6),'description':'App\x20code','required':!![]},{'name':_0x1494fd(0xf2),'type':_0x1494fd(0x101),'description':_0x1494fd(0x110),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x2ca0e3=a43_0x1474;return[{'name':_0x2ca0e3(0xf2),'type':_0x2ca0e3(0x101),'description':_0x2ca0e3(0x110),'default':![]}];}export async function validateAppName(_0x4f161b,_0x271f73){const _0x5ee71f=a43_0x1474,_0x1c34da=_0x4f161b[_0x5ee71f(0xf1)][0x0]?.[_0x5ee71f(0xff)]();if(!_0x1c34da)throw CliErrors[_0x5ee71f(0xf7)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x271f73+'\x20<name>');}export async function runAppAdd(_0x440226,_0x3bb542){const _0x6afafc=a43_0x1474,_0x447f7c=_0x440226[_0x6afafc(0xf1)][0x0]?.['trim']();if(!_0x447f7c)throw CliErrors[_0x6afafc(0xf7)](_0x6afafc(0x104),_0x6afafc(0x115)+CLI_BIN_NAME+'\x20'+_0x3bb542+_0x6afafc(0x10c));const _0x4cafec=_0x440226[_0x6afafc(0x111)]('appcode');if(!_0x4cafec)throw CliErrors[_0x6afafc(0x109)](_0x6afafc(0x10f),_0x6afafc(0x115)+CLI_BIN_NAME+'\x20'+_0x3bb542+'\x20<name>\x20--appcode\x20<code>');const _0x2e7335={'global':_0x440226[_0x6afafc(0xf5)](_0x6afafc(0xf2))},_0x3b78f7=readConfig(_0x2e7335);if(!_0x3b78f7[_0x6afafc(0x100)])_0x3b78f7[_0x6afafc(0x100)]={};const _0x2b5c7f={'appcode':_0x4cafec,...collectAppProfileOverrides(_0xce7828=>_0x440226['str'](_0xce7828))},_0x1807da=_0x3b78f7[_0x6afafc(0x100)],_0x4dbec5=!!_0x1807da[_0x447f7c];_0x1807da[_0x447f7c]=_0x2b5c7f;if(!_0x3b78f7[_0x6afafc(0x118)])_0x3b78f7[_0x6afafc(0x118)]=_0x447f7c;writeConfig(_0x3b78f7,_0x2e7335);const _0xdffda=!_0x4dbec5&&_0x3b78f7[_0x6afafc(0x118)]===_0x447f7c?_0x6afafc(0xf0):'',_0x14b499=(_0x4dbec5?'Updated':_0x6afafc(0xfb))+_0x6afafc(0xfd)+_0x447f7c+'\x22\x20(appcode:\x20'+_0x4cafec+')'+scopeLabel(_0x2e7335)+'.'+_0xdffda;return{'ok':!![],'message':_0x14b499};}function a43_0x45fa(){const _0x22606f=['globalConfig','defaultApp','\x20<name>\x20[--global]','672783molTHK','\x20Set\x20as\x20default\x20app.','args','global','70VjUNgD','\x20config.','bool','string','validation','\x20Default\x20app\x20changed\x20to\x20\x22','52523669WKZjxG','both','Added','35rgkKvx','\x20app\x20\x22','length','trim','apps','boolean','3GnBAWa','\x22\x20still\x20defined\x20in\x20','Missing\x20app\x20name.','5134936hWayvE','453340GidFLf','projectConfig','App\x20\x22','flagMissing','1639576DXnjAY','35848GSiGsF','\x20<name>\x20--appcode\x20<code>','\x22\x20not\x20found.','keys','appcode','Use\x20global\x20config\x20scope','str','project','inherit','33489SqsQBH','Usage:\x20','78nMUbUq'];a43_0x45fa=function(){return _0x22606f;};return a43_0x45fa();}export async function runAppRemove(_0x553fca,_0x3c3e48){const _0x5c6db6=a43_0x1474,_0x27d210=_0x553fca[_0x5c6db6(0xf1)][0x0]?.[_0x5c6db6(0xff)]();if(!_0x27d210)throw CliErrors['validation'](_0x5c6db6(0x104),_0x5c6db6(0x115)+CLI_BIN_NAME+'\x20'+_0x3c3e48+_0x5c6db6(0x119));const _0x17663e=_0x553fca['bool'](_0x5c6db6(0xf2)),{config:_0x8ee9d8,layers:_0x18878e}=readRawConfigWithLayers(),_0x4b98d7=_0x8ee9d8[_0x5c6db6(0x100)]??{};if(!_0x4b98d7[_0x27d210])throw CliErrors[_0x5c6db6(0xf7)](_0x5c6db6(0x108)+_0x27d210+_0x5c6db6(0x10d));const _0x14d354=_0x18878e[_0x5c6db6(0x117)][_0x5c6db6(0x100)]&&typeof _0x18878e['globalConfig'][_0x5c6db6(0x100)]==='object'?_0x18878e[_0x5c6db6(0x117)][_0x5c6db6(0x100)]:{},_0x50222f=_0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x100)]&&typeof _0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x100)]==='object'?_0x18878e[_0x5c6db6(0x107)]['apps']:{},_0x273977=appDefinedIn(_0x27d210,_0x14d354,_0x50222f,_0x18878e[_0x5c6db6(0x107)][_0x5c6db6(0x113)]===![]),_0x29610c=resolveAppScopeForWrite(_0x27d210,_0x17663e,_0x18878e),_0x4dabfe={'global':_0x29610c===_0x5c6db6(0xf2)},_0x387cef=readConfig(_0x4dabfe),_0x4bb22a=_0x387cef[_0x5c6db6(0x100)];if(!_0x4bb22a||!_0x4bb22a[_0x27d210])throw CliErrors[_0x5c6db6(0xf7)]('App\x20\x22'+_0x27d210+_0x5c6db6(0x10d));delete _0x4bb22a[_0x27d210];let _0x3c29ac='';if(_0x387cef[_0x5c6db6(0x118)]===_0x27d210){const _0xdbf43b=Object[_0x5c6db6(0x10e)](_0x4bb22a);_0x387cef[_0x5c6db6(0x118)]=_0xdbf43b[_0x5c6db6(0xfe)]>0x0?_0xdbf43b[0x0]:undefined,_0x387cef[_0x5c6db6(0x118)]?_0x3c29ac=_0x5c6db6(0xf8)+_0x387cef[_0x5c6db6(0x118)]+'\x22.':delete _0x387cef['defaultApp'];}Object['keys'](_0x4bb22a)[_0x5c6db6(0xfe)]===0x0&&(delete _0x387cef[_0x5c6db6(0x100)],delete _0x387cef['defaultApp']);writeConfig(_0x387cef,_0x4dabfe);const _0x51f116=_0x273977===_0x5c6db6(0xfa)?'\x20Note:\x20app\x20\x22'+_0x27d210+_0x5c6db6(0x103)+(_0x29610c===_0x5c6db6(0x112)?_0x5c6db6(0xf2):_0x5c6db6(0x112))+_0x5c6db6(0xf4):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x27d210+'\x22'+scopeLabel(_0x4dabfe)+'.'+_0x3c29ac+_0x51f116};}
@@ -1 +1 @@
1
- function a44_0x2293(){const _0x53e0fe=['727518mixvwr','Invalid\x20App\x20Code','custom','8IZtZOv','2885265wpIyKG','434924jpXAqB','length','(跳过,稍后配置)','10637qdPWBe','map','正在获取可用应用列表...','App\x20Code:','✎\x20自定义输入\x20appcode','\x0a无法获取远程应用列表,请手动输入。','appName','5VUKCjJ','2864rJCYgY','7228251ehjEXP','\x20\x20(','appCode','✎\x20手动输入','27470CpAEtd','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','136fdzRtm','无法获取远程应用列表,请手动输入。','4486156QHLlyf','gray','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','获取到\x20','yellow','skip','请输入\x20App\x20Code:','message','trim'];a44_0x2293=function(){return _0x53e0fe;};return a44_0x2293();}(function(_0x2bc183,_0x1af38e){const _0x180452=a44_0xdfc9,_0x1e6530=_0x2bc183();while(!![]){try{const _0x1bc5de=-parseInt(_0x180452(0x8d))/0x1*(-parseInt(_0x180452(0x94))/0x2)+parseInt(_0x180452(0xa3))/0x3+parseInt(_0x180452(0x96))/0x4*(parseInt(_0x180452(0xae))/0x5)+parseInt(_0x180452(0x9f))/0x6+parseInt(_0x180452(0xa4))/0x7+-parseInt(_0x180452(0xa2))/0x8*(-parseInt(_0x180452(0x8e))/0x9)+-parseInt(_0x180452(0x92))/0xa*(parseInt(_0x180452(0xa7))/0xb);if(_0x1bc5de===_0x1af38e)break;else _0x1e6530['push'](_0x1e6530['shift']());}catch(_0x332937){_0x1e6530['push'](_0x1e6530['shift']());}}}(a44_0x2293,0x947dd));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x50cbb4 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 _0x244d7a=a44_0xdfc9,_0x2afd2a=await input({'message':_0x244d7a(0x9c),'validate':_0x4e0edc=>{const _0x27c83a=_0x244d7a,_0x2ab180=validateAppcode(_0x4e0edc[_0x27c83a(0x9e)]());return _0x2ab180['valid']||_0x2ab180[_0x27c83a(0x9d)]||_0x27c83a(0xa0);}});return _0x2afd2a[_0x244d7a(0x9e)]();}function a44_0xdfc9(_0x1af0c4,_0x2c21f2){_0x1af0c4=_0x1af0c4-0x8d;const _0x229392=a44_0x2293();let _0xdfc99=_0x229392[_0x1af0c4];return _0xdfc99;}export async function promptAppSelection(_0x2ecb0a){const _0x120032=a44_0xdfc9,_0x284076=[{'name':a44_0x50cbb4[_0x120032(0x9a)](_0x120032(0xab)),'value':-0x1},..._0x2ecb0a[_0x120032(0xa8)]((_0x1c1208,_0x586edd)=>({'name':_0x1c1208['appName']+'\x20\x20'+a44_0x50cbb4[_0x120032(0x97)]('('+_0x1c1208[_0x120032(0x90)]+')'),'value':_0x586edd}))],_0x11eae5=await checkbox({'message':_0x120032(0x99)+a44_0x50cbb4['cyan'](_0x2ecb0a[_0x120032(0xa5)])+_0x120032(0x98),'choices':_0x284076,'loop':![]});if(_0x11eae5['includes'](-0x1))return _0x120032(0xa1);if(_0x11eae5[_0x120032(0xa5)]===0x0)return _0x120032(0xa1);return _0x11eae5['map'](_0x100500=>_0x2ecb0a[_0x100500]);}export async function promptSingleAppSelection(_0x307af7){const _0x347523=a44_0xdfc9,_0x35e9f1=[{'name':a44_0x50cbb4[_0x347523(0x97)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x347523(0x9b)},{'name':a44_0x50cbb4[_0x347523(0x9a)](_0x347523(0xab)),'value':_0x347523(0xa1)},..._0x307af7[_0x347523(0xa8)](_0x455ba8=>({'name':_0x455ba8[_0x347523(0xad)]+'\x20\x20'+a44_0x50cbb4['gray']('('+_0x455ba8[_0x347523(0x90)]+')'),'value':_0x455ba8['appCode']}))],_0x1a1612=await select({'message':'请选择要绑定的应用:','choices':_0x35e9f1});if(_0x1a1612===_0x347523(0x9b))return _0x347523(0x9b);if(_0x1a1612===_0x347523(0xa1))return _0x347523(0xa1);return _0x307af7['find'](_0x26c580=>_0x26c580['appCode']===_0x1a1612);}export async function selectSingleAppcode(_0xd577e2){const _0x130bb7=a44_0xdfc9;if(!_0xd577e2)return writeCliSideChannelLine(a44_0x50cbb4[_0x130bb7(0x97)](_0x130bb7(0x93))),_fallbackOrSkip();writeCliSideChannelLine(_0x130bb7(0xa9));let _0xbe2699;try{_0xbe2699=await withActiveCookie(_0xd577e2,()=>listRemoteApps());}catch(_0x464c92){writeCliSideChannelLine(a44_0x50cbb4['yellow'](_0x130bb7(0x95)));if(_0x464c92 instanceof Error)writeCliSideChannelLine(a44_0x50cbb4[_0x130bb7(0x97)]('\x20\x20('+_0x464c92[_0x130bb7(0x9d)]+')'));return _fallbackOrSkip();}if(_0xbe2699['length']===0x0)return writeCliSideChannelLine(a44_0x50cbb4[_0x130bb7(0x9a)]('未找到可用应用。')),_fallbackOrSkip();const _0x471ebf=await promptSingleAppSelection(_0xbe2699);if(_0x471ebf===_0x130bb7(0x9b))return'';if(_0x471ebf===_0x130bb7(0xa1))return promptCustomAppcode();return _0x471ebf[_0x130bb7(0x90)];}export async function selectMultipleApps(_0x3dbe64){const _0x256097=a44_0xdfc9;writeCliSideChannelLine(_0x256097(0xa9));let _0xd9f4bb;try{_0xd9f4bb=await withActiveCookie(_0x3dbe64,()=>listRemoteApps());}catch(_0x315e91){writeCliSideChannelLine(_0x256097(0xac));if(_0x315e91 instanceof Error)writeCliSideChannelLine(_0x256097(0x8f)+_0x315e91['message']+')');return _0x256097(0xa1);}if(_0xd9f4bb[_0x256097(0xa5)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x256097(0xa1);return promptAppSelection(_0xd9f4bb);}async function _fallbackOrSkip(){const _0x2f9e92=a44_0xdfc9,_0x1aae3e=await select({'message':_0x2f9e92(0xaa),'choices':[{'name':a44_0x50cbb4['gray'](_0x2f9e92(0xa6)),'value':_0x2f9e92(0x9b)},{'name':a44_0x50cbb4[_0x2f9e92(0x9a)](_0x2f9e92(0x91)),'value':'manual'}]});if(_0x1aae3e===_0x2f9e92(0x9b))return'';return promptCustomAppcode();}
1
+ (function(_0x4b95a1,_0x310106){const _0x35c021=a44_0xe5a8,_0x5f2a49=_0x4b95a1();while(!![]){try{const _0x2c5019=parseInt(_0x35c021(0x1e2))/0x1*(-parseInt(_0x35c021(0x1d1))/0x2)+-parseInt(_0x35c021(0x1dc))/0x3*(parseInt(_0x35c021(0x1e7))/0x4)+parseInt(_0x35c021(0x1cc))/0x5+parseInt(_0x35c021(0x1df))/0x6*(-parseInt(_0x35c021(0x1e0))/0x7)+-parseInt(_0x35c021(0x1dd))/0x8+parseInt(_0x35c021(0x1cb))/0x9*(-parseInt(_0x35c021(0x1de))/0xa)+parseInt(_0x35c021(0x1d8))/0xb*(parseInt(_0x35c021(0x1d3))/0xc);if(_0x2c5019===_0x310106)break;else _0x5f2a49['push'](_0x5f2a49['shift']());}catch(_0x2283df){_0x5f2a49['push'](_0x5f2a49['shift']());}}}(a44_0x414c,0x563e9));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x2a8cef from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a44_0xe5a8(_0x3341b8,_0xf0b838){_0x3341b8=_0x3341b8-0x1c9;const _0x414ccc=a44_0x414c();let _0xe5a8fc=_0x414ccc[_0x3341b8];return _0xe5a8fc;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x2ed1a9=a44_0xe5a8,_0x21668f=await input({'message':'请输入\x20App\x20Code:','validate':_0x22b27f=>{const _0x690272=a44_0xe5a8,_0x3cc172=validateAppcode(_0x22b27f[_0x690272(0x1d4)]());return _0x3cc172[_0x690272(0x1e9)]||_0x3cc172['message']||'Invalid\x20App\x20Code';}});return _0x21668f[_0x2ed1a9(0x1d4)]();}export async function promptAppSelection(_0x14eae5){const _0x3e031f=a44_0xe5a8,_0x5ae561=[{'name':a44_0x2a8cef[_0x3e031f(0x1d7)](_0x3e031f(0x1e3)),'value':-0x1},..._0x14eae5['map']((_0x4a4f24,_0x1ddafb)=>({'name':_0x4a4f24[_0x3e031f(0x1ed)]+'\x20\x20'+a44_0x2a8cef[_0x3e031f(0x1d0)]('('+_0x4a4f24[_0x3e031f(0x1eb)]+')'),'value':_0x1ddafb}))],_0x57c506=await checkbox({'message':'获取到\x20'+a44_0x2a8cef['cyan'](_0x14eae5[_0x3e031f(0x1e1)])+_0x3e031f(0x1ea),'choices':_0x5ae561,'loop':![]});if(_0x57c506[_0x3e031f(0x1d9)](-0x1))return'custom';if(_0x57c506['length']===0x0)return _0x3e031f(0x1e8);return _0x57c506['map'](_0x852760=>_0x14eae5[_0x852760]);}function a44_0x414c(){const _0x5d9749=['未找到可用应用。','gray','2DGSZJT','\x20\x20(','780AjHApq','trim','请选择要绑定的应用:','manual','yellow','232397tHSxxR','includes','(跳过,稍后配置)','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','9oMKcMV','4185560etXUxc','290400skUWHw','5034SWXvyI','721qlsRcU','length','564831RidkHl','✎\x20自定义输入\x20appcode','message','map','无法获取远程应用列表,请手动输入。','1416SiIVRt','custom','valid','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','appCode','✎\x20手动输入','appName','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','find','108ulyUsX','2519935iXVJbN','App\x20Code:','skip'];a44_0x414c=function(){return _0x5d9749;};return a44_0x414c();}export async function promptSingleAppSelection(_0x201a51){const _0x416635=a44_0xe5a8,_0x4a9846=[{'name':a44_0x2a8cef[_0x416635(0x1d0)](_0x416635(0x1db)),'value':_0x416635(0x1ce)},{'name':a44_0x2a8cef[_0x416635(0x1d7)](_0x416635(0x1e3)),'value':_0x416635(0x1e8)},..._0x201a51[_0x416635(0x1e5)](_0xb4167=>({'name':_0xb4167['appName']+'\x20\x20'+a44_0x2a8cef[_0x416635(0x1d0)]('('+_0xb4167[_0x416635(0x1eb)]+')'),'value':_0xb4167['appCode']}))],_0x2811b1=await select({'message':_0x416635(0x1d5),'choices':_0x4a9846});if(_0x2811b1===_0x416635(0x1ce))return _0x416635(0x1ce);if(_0x2811b1==='custom')return'custom';return _0x201a51[_0x416635(0x1ca)](_0x4a9971=>_0x4a9971[_0x416635(0x1eb)]===_0x2811b1);}export async function selectSingleAppcode(_0x4f7ac1){const _0xd1631=a44_0xe5a8;if(!_0x4f7ac1)return writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d0)](_0xd1631(0x1c9))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0xb22d6a;try{_0xb22d6a=await withActiveCookie(_0x4f7ac1,()=>listRemoteApps());}catch(_0x3b5453){writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d7)](_0xd1631(0x1e6)));if(_0x3b5453 instanceof Error)writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d0)](_0xd1631(0x1d2)+_0x3b5453[_0xd1631(0x1e4)]+')'));return _fallbackOrSkip();}if(_0xb22d6a[_0xd1631(0x1e1)]===0x0)return writeCliSideChannelLine(a44_0x2a8cef[_0xd1631(0x1d7)](_0xd1631(0x1cf))),_fallbackOrSkip();const _0x34eaed=await promptSingleAppSelection(_0xb22d6a);if(_0x34eaed===_0xd1631(0x1ce))return'';if(_0x34eaed===_0xd1631(0x1e8))return promptCustomAppcode();return _0x34eaed[_0xd1631(0x1eb)];}export async function selectMultipleApps(_0x3d7e16){const _0x32a8f7=a44_0xe5a8;writeCliSideChannelLine('正在获取可用应用列表...');let _0x4d04f6;try{_0x4d04f6=await withActiveCookie(_0x3d7e16,()=>listRemoteApps());}catch(_0x319ed0){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x319ed0 instanceof Error)writeCliSideChannelLine(_0x32a8f7(0x1d2)+_0x319ed0['message']+')');return _0x32a8f7(0x1e8);}if(_0x4d04f6[_0x32a8f7(0x1e1)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x32a8f7(0x1e8);return promptAppSelection(_0x4d04f6);}async function _fallbackOrSkip(){const _0x4ff818=a44_0xe5a8,_0x420bda=await select({'message':_0x4ff818(0x1cd),'choices':[{'name':a44_0x2a8cef[_0x4ff818(0x1d0)](_0x4ff818(0x1da)),'value':_0x4ff818(0x1ce)},{'name':a44_0x2a8cef['yellow'](_0x4ff818(0x1ec)),'value':_0x4ff818(0x1d6)}]});if(_0x420bda===_0x4ff818(0x1ce))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x5d88a2=a45_0x1eae;(function(_0x104329,_0x5c7232){const _0x5c1e87=a45_0x1eae,_0x59b19f=_0x104329();while(!![]){try{const _0x16f554=parseInt(_0x5c1e87(0x92))/0x1+parseInt(_0x5c1e87(0x93))/0x2+-parseInt(_0x5c1e87(0x82))/0x3+parseInt(_0x5c1e87(0x9b))/0x4*(-parseInt(_0x5c1e87(0x8c))/0x5)+-parseInt(_0x5c1e87(0x7f))/0x6*(parseInt(_0x5c1e87(0x87))/0x7)+parseInt(_0x5c1e87(0x98))/0x8*(-parseInt(_0x5c1e87(0x81))/0x9)+parseInt(_0x5c1e87(0x90))/0xa*(parseInt(_0x5c1e87(0x99))/0xb);if(_0x16f554===_0x5c7232)break;else _0x59b19f['push'](_0x59b19f['shift']());}catch(_0x57cd27){_0x59b19f['push'](_0x59b19f['shift']());}}}(a45_0x47c5,0x2ec25));function a45_0x47c5(){const _0x37048a=['32889JSGWuX','apiError','SUCCESS','\x20completed\x20successfully.','\x20--appcode\x20','10073FsieAh','errorMessage','string','\x20returned\x20unknown\x20status\x20','trim','1865095wHXlWp','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','PROCESSING','90rVKVDY','replace','128208yWrlvJ','181474ZDnbwA','\x20is\x20pending.','taskId','status','toUpperCase','16WBhnGy','736549bZHFsx','\x20failed.','4mPQxgG','\x20task\x20status\x20--task-id\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','PENDING','\x20failed:\x20','FAILED','Task\x20','\x27\x5c\x27\x27','654MqmFJl','\x20is\x20processing.','401481XUDIuQ'];a45_0x47c5=function(){return _0x37048a;};return a45_0x47c5();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x5d88a2(0x84),'FAILED']),NON_TERMINAL_STATUSES=new Set([a45_0x5d88a2(0x7a),a45_0x5d88a2(0x8f)]);export function normalizeAsyncTask(_0xf21f97){const _0x519329=a45_0x5d88a2,_0x3945a4=typeof _0xf21f97?.['taskId']===_0x519329(0x89)?_0xf21f97[_0x519329(0x95)][_0x519329(0x8b)]():'';if(!_0x3945a4)throw CliErrors['apiError'](_0x519329(0x8e));const _0xc47879=typeof _0xf21f97['status']==='string'?_0xf21f97['status'][_0x519329(0x8b)]()[_0x519329(0x97)]():'';if(!_0xc47879)throw CliErrors[_0x519329(0x83)]('Async\x20task\x20'+_0x3945a4+_0x519329(0x79));return{'taskId':_0x3945a4,'status':_0xc47879,'errorMessage':typeof _0xf21f97[_0x519329(0x88)]==='string'&&_0xf21f97[_0x519329(0x88)]['trim']()?_0xf21f97[_0x519329(0x88)][_0x519329(0x8b)]():null,'isTerminal':TERMINAL_STATUSES[_0x519329(0x8d)](_0xc47879),'knownStatus':TERMINAL_STATUSES[_0x519329(0x8d)](_0xc47879)||NON_TERMINAL_STATUSES[_0x519329(0x8d)](_0xc47879)};}export function buildAsyncTaskStatusCommand(_0x5eecbf,_0x5662ea){const _0x40cfa8=a45_0x5d88a2;return CLI_BIN_NAME+_0x40cfa8(0x9c)+quoteShellArg(_0x5eecbf)+_0x40cfa8(0x86)+quoteShellArg(_0x5662ea)+'\x20--format\x20compress';}function a45_0x1eae(_0x1f7559,_0x500f0d){_0x1f7559=_0x1f7559-0x79;const _0x47c583=a45_0x47c5();let _0x1eae41=_0x47c583[_0x1f7559];return _0x1eae41;}export function asyncTaskMessage(_0x2d9de9){const _0x26b686=a45_0x5d88a2;switch(_0x2d9de9[_0x26b686(0x96)]){case'PENDING':return'Task\x20'+_0x2d9de9[_0x26b686(0x95)]+_0x26b686(0x94);case _0x26b686(0x8f):return _0x26b686(0x7d)+_0x2d9de9['taskId']+_0x26b686(0x80);case _0x26b686(0x84):return _0x26b686(0x7d)+_0x2d9de9['taskId']+_0x26b686(0x85);case _0x26b686(0x7c):return _0x2d9de9['errorMessage']?_0x26b686(0x7d)+_0x2d9de9[_0x26b686(0x95)]+_0x26b686(0x7b)+_0x2d9de9[_0x26b686(0x88)]:_0x26b686(0x7d)+_0x2d9de9[_0x26b686(0x95)]+_0x26b686(0x9a);default:return'Task\x20'+_0x2d9de9['taskId']+_0x26b686(0x8a)+_0x2d9de9[_0x26b686(0x96)]+'.';}}function quoteShellArg(_0x1c96e8){const _0x41c914=a45_0x5d88a2;return'\x27'+_0x1c96e8[_0x41c914(0x91)](/'/g,_0x41c914(0x7e))+'\x27';}
1
+ function a45_0x3d5e(_0x3abf44,_0x34cc54){_0x3abf44=_0x3abf44-0xab;const _0xfff3cb=a45_0xfff3();let _0x3d5e39=_0xfff3cb[_0x3abf44];return _0x3d5e39;}const a45_0x54f89a=a45_0x3d5e;(function(_0x32d779,_0x4c98f1){const _0x4196ac=a45_0x3d5e,_0xe8bd20=_0x32d779();while(!![]){try{const _0x105e9e=parseInt(_0x4196ac(0xc5))/0x1*(parseInt(_0x4196ac(0xc6))/0x2)+parseInt(_0x4196ac(0xb6))/0x3+parseInt(_0x4196ac(0xb1))/0x4*(parseInt(_0x4196ac(0xc8))/0x5)+-parseInt(_0x4196ac(0xc3))/0x6+-parseInt(_0x4196ac(0xab))/0x7*(-parseInt(_0x4196ac(0xcb))/0x8)+parseInt(_0x4196ac(0xb2))/0x9*(parseInt(_0x4196ac(0xb4))/0xa)+parseInt(_0x4196ac(0xbb))/0xb*(-parseInt(_0x4196ac(0xb0))/0xc);if(_0x105e9e===_0x4c98f1)break;else _0xe8bd20['push'](_0xe8bd20['shift']());}catch(_0x615034){_0xe8bd20['push'](_0xe8bd20['shift']());}}}(a45_0xfff3,0xf2030));function a45_0xfff3(){const _0x424055=['\x20failed.','21ffdrhT','toUpperCase','string','status','errorMessage','488772oIGaWY','698220mZUIul','3463911nGPLgy','trim','20JfwuGb','PROCESSING','1567695TLRWmu','\x20--appcode\x20','\x20is\x20processing.','Task\x20','taskId','1210trYWxm','\x20returned\x20unknown\x20status\x20','has','SUCCESS','\x20--format\x20compress','FAILED','\x20response\x20did\x20not\x20contain\x20a\x20status.','PENDING','180792LgwllV','\x20failed:\x20','1236661DAWCNU','2EkmGdj','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','45gCmFMP','apiError','\x20task\x20status\x20--task-id\x20','3738248dqRVzq','\x20completed\x20successfully.'];a45_0xfff3=function(){return _0x424055;};return a45_0xfff3();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x54f89a(0xbe),a45_0x54f89a(0xc0)]),NON_TERMINAL_STATUSES=new Set([a45_0x54f89a(0xc2),a45_0x54f89a(0xb5)]);export function normalizeAsyncTask(_0x20d119){const _0x28275a=a45_0x54f89a,_0x10c98e=typeof _0x20d119?.[_0x28275a(0xba)]===_0x28275a(0xad)?_0x20d119[_0x28275a(0xba)][_0x28275a(0xb3)]():'';if(!_0x10c98e)throw CliErrors[_0x28275a(0xc9)](_0x28275a(0xc7));const _0x3f9e7c=typeof _0x20d119['status']===_0x28275a(0xad)?_0x20d119[_0x28275a(0xae)][_0x28275a(0xb3)]()[_0x28275a(0xac)]():'';if(!_0x3f9e7c)throw CliErrors[_0x28275a(0xc9)]('Async\x20task\x20'+_0x10c98e+_0x28275a(0xc1));return{'taskId':_0x10c98e,'status':_0x3f9e7c,'errorMessage':typeof _0x20d119['errorMessage']===_0x28275a(0xad)&&_0x20d119['errorMessage'][_0x28275a(0xb3)]()?_0x20d119[_0x28275a(0xaf)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x28275a(0xbd)](_0x3f9e7c),'knownStatus':TERMINAL_STATUSES[_0x28275a(0xbd)](_0x3f9e7c)||NON_TERMINAL_STATUSES['has'](_0x3f9e7c)};}export function buildAsyncTaskStatusCommand(_0x5a4c91,_0x478438){const _0x54e095=a45_0x54f89a;return CLI_BIN_NAME+_0x54e095(0xca)+quoteShellArg(_0x5a4c91)+_0x54e095(0xb7)+quoteShellArg(_0x478438)+_0x54e095(0xbf);}export function asyncTaskMessage(_0x389e7f){const _0x5f3e63=a45_0x54f89a;switch(_0x389e7f[_0x5f3e63(0xae)]){case'PENDING':return _0x5f3e63(0xb9)+_0x389e7f[_0x5f3e63(0xba)]+'\x20is\x20pending.';case _0x5f3e63(0xb5):return'Task\x20'+_0x389e7f[_0x5f3e63(0xba)]+_0x5f3e63(0xb8);case'SUCCESS':return'Task\x20'+_0x389e7f['taskId']+_0x5f3e63(0xcc);case _0x5f3e63(0xc0):return _0x389e7f[_0x5f3e63(0xaf)]?'Task\x20'+_0x389e7f['taskId']+_0x5f3e63(0xc4)+_0x389e7f[_0x5f3e63(0xaf)]:_0x5f3e63(0xb9)+_0x389e7f['taskId']+_0x5f3e63(0xcd);default:return _0x5f3e63(0xb9)+_0x389e7f[_0x5f3e63(0xba)]+_0x5f3e63(0xbc)+_0x389e7f[_0x5f3e63(0xae)]+'.';}}function quoteShellArg(_0x2946b1){return'\x27'+_0x2946b1['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
@@ -1 +1 @@
1
- (function(_0x370bd4,_0x40ab72){var _0x14aab7=a46_0x3390,_0xa06e1a=_0x370bd4();while(!![]){try{var _0x3b4973=-parseInt(_0x14aab7(0x182))/0x1*(parseInt(_0x14aab7(0x180))/0x2)+-parseInt(_0x14aab7(0x17d))/0x3+-parseInt(_0x14aab7(0x17f))/0x4*(-parseInt(_0x14aab7(0x181))/0x5)+-parseInt(_0x14aab7(0x17a))/0x6*(-parseInt(_0x14aab7(0x184))/0x7)+-parseInt(_0x14aab7(0x183))/0x8+parseInt(_0x14aab7(0x17b))/0x9+parseInt(_0x14aab7(0x185))/0xa;if(_0x3b4973===_0x40ab72)break;else _0xa06e1a['push'](_0xa06e1a['shift']());}catch(_0x17fbc8){_0xa06e1a['push'](_0xa06e1a['shift']());}}}(a46_0x1094,0x878c5));function a46_0x1094(){var _0x17e331=['6778926aCbutE','defineProperties','3056565xZZEFc','url','1149076kCxYnN','1591676FhJXTN','15XYzkZA','1DpbpHA','6925736Zxipou','60851GvhPMI','14728130NFgoao','method','description','102kPpTHh'];a46_0x1094=function(){return _0x17e331;};return a46_0x1094();}function a46_0x3390(_0x216789,_0xbe121e){_0x216789=_0x216789-0x178;var _0x10947d=a46_0x1094();var _0x339050=_0x10947d[_0x216789];return _0x339050;}export function asDryRunResult(_0xc10721,_0x1c4731){var _0x4400de=a46_0x3390;return Object[_0x4400de(0x17c)](_0xc10721,{'method':{'value':_0x1c4731[_0x4400de(0x178)],'enumerable':![]},'url':{'value':_0x1c4731[_0x4400de(0x17e)],'enumerable':![]},..._0x1c4731[_0x4400de(0x179)]?{'description':{'value':_0x1c4731[_0x4400de(0x179)],'enumerable':![]}}:{}});}
1
+ function a46_0xeea2(_0x2f264f,_0x1857fc){_0x2f264f=_0x2f264f-0xc9;var _0x1b9a20=a46_0x1b9a();var _0xeea223=_0x1b9a20[_0x2f264f];return _0xeea223;}function a46_0x1b9a(){var _0x442a81=['description','1352760vfuExx','4mdulHX','5jLoIfm','2573046TuurQJ','20SyuWnH','url','406idpAse','2128320MLyVPr','1689830cUZLbj','2641529OwNpbN','8232ydYRnD','6iQmQUm','124342BiuwAX'];a46_0x1b9a=function(){return _0x442a81;};return a46_0x1b9a();}(function(_0x1f2cf9,_0x2e35c5){var _0x2ab2b5=a46_0xeea2,_0x15b822=_0x1f2cf9();while(!![]){try{var _0x2bb213=-parseInt(_0x2ab2b5(0xd1))/0x1*(-parseInt(_0x2ab2b5(0xcd))/0x2)+-parseInt(_0x2ab2b5(0xcf))/0x3*(parseInt(_0x2ab2b5(0xd0))/0x4)+parseInt(_0x2ab2b5(0xc9))/0x5*(parseInt(_0x2ab2b5(0xcc))/0x6)+parseInt(_0x2ab2b5(0xd5))/0x7*(parseInt(_0x2ab2b5(0xcb))/0x8)+parseInt(_0x2ab2b5(0xd2))/0x9+parseInt(_0x2ab2b5(0xd3))/0xa*(-parseInt(_0x2ab2b5(0xca))/0xb)+parseInt(_0x2ab2b5(0xd6))/0xc;if(_0x2bb213===_0x2e35c5)break;else _0x15b822['push'](_0x15b822['shift']());}catch(_0x16fd16){_0x15b822['push'](_0x15b822['shift']());}}}(a46_0x1b9a,0x3abaf));export function asDryRunResult(_0x263e7f,_0x504a7b){var _0x5137f7=a46_0xeea2;return Object['defineProperties'](_0x263e7f,{'method':{'value':_0x504a7b['method'],'enumerable':![]},'url':{'value':_0x504a7b[_0x5137f7(0xd4)],'enumerable':![]},..._0x504a7b['description']?{'description':{'value':_0x504a7b[_0x5137f7(0xce)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a47_0x5b0453=a47_0x4617;(function(_0x4f27a1,_0xa09da1){const _0xb9534=a47_0x4617,_0x4ad537=_0x4f27a1();while(!![]){try{const _0x24bd9a=parseInt(_0xb9534(0x129))/0x1*(parseInt(_0xb9534(0x122))/0x2)+-parseInt(_0xb9534(0x123))/0x3*(parseInt(_0xb9534(0x124))/0x4)+parseInt(_0xb9534(0x119))/0x5+parseInt(_0xb9534(0x11b))/0x6+-parseInt(_0xb9534(0x120))/0x7+-parseInt(_0xb9534(0x12b))/0x8+parseInt(_0xb9534(0x11c))/0x9;if(_0x24bd9a===_0xa09da1)break;else _0x4ad537['push'](_0x4ad537['shift']());}catch(_0x1c52d8){_0x4ad537['push'](_0x4ad537['shift']());}}}(a47_0x39ee,0x953f3));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x5b0453(0x128)};export const CODE_FLAG={'name':a47_0x5b0453(0x117),'type':a47_0x5b0453(0x115),'required':!![],'description':a47_0x5b0453(0x127),'pattern':DATASET_CODE_PATTERN};function a47_0x39ee(){const _0x4b43e5=['MYSQL','230380tQBDDe','3248943ySBVNF','4oLlvQh','appcode','sqlcode','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1RviusL','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','9050216NTAFyf','string','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','code','datasetcode','1032915ygyvkJ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','685806LhUAFA','22503186fmqKbJ','dbtype','POSTGRESQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','775985wbPNtz'];a47_0x39ee=function(){return _0x4b43e5;};return a47_0x39ee();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x5b0453(0x118),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':a47_0x5b0453(0x126),'type':'string','required':!![],'description':a47_0x5b0453(0x11f),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x5b0453(0x11a)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x5b0453(0x125),'type':a47_0x5b0453(0x115),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};function a47_0x4617(_0x1d230e,_0x130c06){_0x1d230e=_0x1d230e-0x115;const _0x39ee76=a47_0x39ee();let _0x46177b=_0x39ee76[_0x1d230e];return _0x46177b;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x5b0453(0x12a)};export const DB_TYPE_FLAG={'name':a47_0x5b0453(0x11d),'type':a47_0x5b0453(0x115),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x5b0453(0x121),a47_0x5b0453(0x11e)]};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':'boolean','description':a47_0x5b0453(0x116)};
1
+ const a47_0x1551df=a47_0x3a36;(function(_0x453856,_0x21e499){const _0x2e45ca=a47_0x3a36,_0x3e1082=_0x453856();while(!![]){try{const _0x5eb36c=-parseInt(_0x2e45ca(0x1d9))/0x1*(parseInt(_0x2e45ca(0x1df))/0x2)+parseInt(_0x2e45ca(0x1e1))/0x3+parseInt(_0x2e45ca(0x1e9))/0x4+parseInt(_0x2e45ca(0x1d8))/0x5*(parseInt(_0x2e45ca(0x1e8))/0x6)+parseInt(_0x2e45ca(0x1ec))/0x7+-parseInt(_0x2e45ca(0x1dc))/0x8+-parseInt(_0x2e45ca(0x1dd))/0x9;if(_0x5eb36c===_0x21e499)break;else _0x3e1082['push'](_0x3e1082['shift']());}catch(_0x1a95ac){_0x3e1082['push'](_0x3e1082['shift']());}}}(a47_0x206c,0x91183));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x1551df(0x1e3)};export const CODE_FLAG={'name':a47_0x1551df(0x1da),'type':a47_0x1551df(0x1eb),'required':!![],'description':a47_0x1551df(0x1e2),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1551df(0x1e4),'description':a47_0x1551df(0x1e2)};export const SQLCODE_FLAG={'name':a47_0x1551df(0x1ee),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1551df(0x1e7),'type':a47_0x1551df(0x1eb),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x1551df(0x1ea)};function a47_0x3a36(_0x46d49b,_0x4ab590){_0x46d49b=_0x46d49b-0x1d8;const _0x206c2d=a47_0x206c();let _0x3a36d9=_0x206c2d[_0x46d49b];return _0x3a36d9;}function a47_0x206c(){const _0x4ee2ef=['252364xWWnCO','skip-connection-test','2904999MMyAnj','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','datasetcode','POSTGRESQL','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','appcode','6yHQxAx','2335360BNzsVD','App\x20code\x20(e.g.\x20app-xxxxx)','string','79821vdfqHX','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','sqlcode','boolean','1652465hHaucy','1CEASKc','code','MYSQL','2277608uNtuly','7999911bGtMMy','Database\x20product\x20type'];a47_0x206c=function(){return _0x4ee2ef;};return a47_0x206c();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x1551df(0x1ed)};export const DB_TYPE_FLAG={'name':'dbtype','type':a47_0x1551df(0x1eb),'required':!![],'description':a47_0x1551df(0x1de),'enum':[a47_0x1551df(0x1db),a47_0x1551df(0x1e5)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x1551df(0x1e0),'type':a47_0x1551df(0x1ef),'description':a47_0x1551df(0x1e6)};
@@ -1 +1 @@
1
- (function(_0x8927b,_0x79ba7b){const _0xd06975=a48_0x3ad9,_0x2575ca=_0x8927b();while(!![]){try{const _0x111e40=-parseInt(_0xd06975(0xd0))/0x1+-parseInt(_0xd06975(0xdf))/0x2+parseInt(_0xd06975(0xd1))/0x3+parseInt(_0xd06975(0xdc))/0x4*(-parseInt(_0xd06975(0xcf))/0x5)+parseInt(_0xd06975(0xd7))/0x6*(-parseInt(_0xd06975(0xdb))/0x7)+-parseInt(_0xd06975(0xd5))/0x8+parseInt(_0xd06975(0xd2))/0x9;if(_0x111e40===_0x79ba7b)break;else _0x2575ca['push'](_0x2575ca['shift']());}catch(_0x20678b){_0x2575ca['push'](_0x2575ca['shift']());}}}(a48_0x5484,0x8a8a9));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 a48_0x3ad9(_0x295ff6,_0x5790e8){_0x295ff6=_0x295ff6-0xce;const _0x5484cb=a48_0x5484();let _0x3ad91c=_0x5484cb[_0x295ff6];return _0x3ad91c;}function formatBytes(_0x3b2521){const _0x57df79=a48_0x3ad9;if(_0x3b2521>=BYTES_PER_MB){const _0x369ebe=Math[_0x57df79(0xce)](_0x3b2521/BYTES_PER_MB*0x64)/0x64;return _0x369ebe[_0x57df79(0xd6)](0x2)+_0x57df79(0xde);}return _0x3b2521+'\x20B';}function a48_0x5484(){const _0x7c6e8c=['toFixed','5052jBrUwo','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','size','File\x20is\x20not\x20a\x20regular\x20file:\x20','3647YxmZuO','2107348vovkga','\x20path\x20is\x20required.','\x20MB','1866410mJIyAR','ceil','10mIJliR','745864RTAmRM','2369043xqfyxI','35724168WCFexi','trim','validation','8161144kFTXgN'];a48_0x5484=function(){return _0x7c6e8c;};return a48_0x5484();}export function requireDevelopmentUploadFile(_0x6fed7f,_0x2e73d3){const _0x57445e=a48_0x3ad9,_0x47390d=_0x6fed7f[_0x57445e(0xd3)]();if(!_0x47390d)throw CliErrors[_0x57445e(0xd4)](_0x2e73d3+_0x57445e(0xdd));if(!existsSync(_0x47390d))throw CliErrors[_0x57445e(0xd4)]('File\x20not\x20found:\x20'+_0x47390d);const _0x55d92e=statSync(_0x47390d);if(!_0x55d92e['isFile']())throw CliErrors[_0x57445e(0xd4)](_0x57445e(0xda)+_0x47390d);if(_0x55d92e[_0x57445e(0xd9)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x57445e(0xd4)](_0x57445e(0xd8)+_0x47390d+'\x20('+formatBytes(_0x55d92e['size'])+')');return{'path':_0x47390d,'size':_0x55d92e[_0x57445e(0xd9)]};}
1
+ (function(_0x49e605,_0x410bc9){const _0x4071e5=a48_0x3199,_0x27d73f=_0x49e605();while(!![]){try{const _0x136d93=-parseInt(_0x4071e5(0x190))/0x1*(parseInt(_0x4071e5(0x18f))/0x2)+parseInt(_0x4071e5(0x18a))/0x3+-parseInt(_0x4071e5(0x182))/0x4*(parseInt(_0x4071e5(0x191))/0x5)+parseInt(_0x4071e5(0x18e))/0x6*(-parseInt(_0x4071e5(0x187))/0x7)+parseInt(_0x4071e5(0x192))/0x8+-parseInt(_0x4071e5(0x18c))/0x9+-parseInt(_0x4071e5(0x181))/0xa*(-parseInt(_0x4071e5(0x184))/0xb);if(_0x136d93===_0x410bc9)break;else _0x27d73f['push'](_0x27d73f['shift']());}catch(_0x754838){_0x27d73f['push'](_0x27d73f['shift']());}}}(a48_0x21c5,0x273e9));import{existsSync,statSync}from'node:fs';function a48_0x21c5(){const _0x44af5d=['\x20MB','1822752RLpenA','validation','239784prNQbz','2GWqiTw','11901hbPxxG','5FqzVzv','2296688VVuhGM','ceil','5603820KRTjcT','1236724GkjsRe','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','11vacYLn','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','42wlIQkv','size','toFixed','230013zvAmJQ'];a48_0x21c5=function(){return _0x44af5d;};return a48_0x21c5();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x3199(_0x3ef1f0,_0x339125){_0x3ef1f0=_0x3ef1f0-0x180;const _0x21c5b7=a48_0x21c5();let _0x3199a4=_0x21c5b7[_0x3ef1f0];return _0x3199a4;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x311657){const _0xa84153=a48_0x3199;if(_0x311657>=BYTES_PER_MB){const _0x111d39=Math[_0xa84153(0x180)](_0x311657/BYTES_PER_MB*0x64)/0x64;return _0x111d39[_0xa84153(0x189)](0x2)+_0xa84153(0x18b);}return _0x311657+'\x20B';}export function requireDevelopmentUploadFile(_0x4f26c5,_0x1330a2){const _0x2468a1=a48_0x3199,_0x469c83=_0x4f26c5[_0x2468a1(0x186)]();if(!_0x469c83)throw CliErrors[_0x2468a1(0x18d)](_0x1330a2+'\x20path\x20is\x20required.');if(!existsSync(_0x469c83))throw CliErrors[_0x2468a1(0x18d)]('File\x20not\x20found:\x20'+_0x469c83);const _0x4ce6ad=statSync(_0x469c83);if(!_0x4ce6ad['isFile']())throw CliErrors[_0x2468a1(0x18d)](_0x2468a1(0x185)+_0x469c83);if(_0x4ce6ad[_0x2468a1(0x188)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2468a1(0x18d)](_0x2468a1(0x183)+_0x469c83+'\x20('+formatBytes(_0x4ce6ad[_0x2468a1(0x188)])+')');return{'path':_0x469c83,'size':_0x4ce6ad[_0x2468a1(0x188)]};}
@@ -1 +1 @@
1
- function a49_0x46c0(){const _0x35d8be=['App\x20Code\x20cannot\x20be\x20empty','trim','6138711rOQzbp','278YXZQoa','3381890tJnwFx','48ZyGOzX','433488KYMzqd','3280872mPVzcs','App\x20Code\x20cannot\x20exceed\x20100\x20characters','2553hIWFwF','143073mbJaAD','10OhQVNd','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','913281DdKDSb'];a49_0x46c0=function(){return _0x35d8be;};return a49_0x46c0();}(function(_0x12dd5d,_0x35ec82){const _0x571093=a49_0x5f11,_0x123c7f=_0x12dd5d();while(!![]){try{const _0x1a6c29=-parseInt(_0x571093(0x1ac))/0x1*(parseInt(_0x571093(0x1b5))/0x2)+-parseInt(_0x571093(0x1b1))/0x3+parseInt(_0x571093(0x1b8))/0x4+parseInt(_0x571093(0x1b6))/0x5+-parseInt(_0x571093(0x1aa))/0x6+-parseInt(_0x571093(0x1ad))/0x7*(-parseInt(_0x571093(0x1b7))/0x8)+parseInt(_0x571093(0x1b4))/0x9*(parseInt(_0x571093(0x1ae))/0xa);if(_0x1a6c29===_0x35ec82)break;else _0x123c7f['push'](_0x123c7f['shift']());}catch(_0x18000c){_0x123c7f['push'](_0x123c7f['shift']());}}}(a49_0x46c0,0x5d97d));function a49_0x5f11(_0x38911c,_0x161824){_0x38911c=_0x38911c-0x1aa;const _0x46c0ef=a49_0x46c0();let _0x5f11e5=_0x46c0ef[_0x38911c];return _0x5f11e5;}export function validateAppcode(_0x51a76d){const _0x45a896=a49_0x5f11,_0xc47f73=_0x51a76d[_0x45a896(0x1b3)]();if(!_0xc47f73)return{'valid':![],'message':_0x45a896(0x1b2)};if(_0xc47f73['length']>0x64)return{'valid':![],'message':_0x45a896(0x1ab)};if(!/^[A-Za-z0-9_-]+$/[_0x45a896(0x1b0)](_0xc47f73))return{'valid':![],'message':_0x45a896(0x1af)};return{'valid':!![]};}
1
+ function a49_0x45b8(_0x1a40ff,_0x5506f5){_0x1a40ff=_0x1a40ff-0x89;const _0x378e8d=a49_0x378e();let _0x45b876=_0x378e8d[_0x1a40ff];return _0x45b876;}(function(_0x163582,_0x53d0fa){const _0x6131e8=a49_0x45b8,_0xb7946e=_0x163582();while(!![]){try{const _0xa6134d=-parseInt(_0x6131e8(0x93))/0x1+-parseInt(_0x6131e8(0x8b))/0x2+parseInt(_0x6131e8(0x8f))/0x3+-parseInt(_0x6131e8(0x8c))/0x4*(-parseInt(_0x6131e8(0x8d))/0x5)+-parseInt(_0x6131e8(0x94))/0x6*(parseInt(_0x6131e8(0x8e))/0x7)+parseInt(_0x6131e8(0x95))/0x8+parseInt(_0x6131e8(0x89))/0x9;if(_0xa6134d===_0x53d0fa)break;else _0xb7946e['push'](_0xb7946e['shift']());}catch(_0x42bf64){_0xb7946e['push'](_0xb7946e['shift']());}}}(a49_0x378e,0x7fc05));function a49_0x378e(){const _0x50e457=['1674072yrPHHH','App\x20Code\x20cannot\x20be\x20empty','16034031dQVbjy','test','1608904POtyXn','20VkKSfm','1019485YRrmhA','1639477GkUsQN','264894dotTbh','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','834036apHpVJ','24KrmrAL'];a49_0x378e=function(){return _0x50e457;};return a49_0x378e();}export function validateAppcode(_0x1bfbaf){const _0x61818d=a49_0x45b8,_0x1abb68=_0x1bfbaf[_0x61818d(0x91)]();if(!_0x1abb68)return{'valid':![],'message':_0x61818d(0x96)};if(_0x1abb68['length']>0x64)return{'valid':![],'message':_0x61818d(0x90)};if(!/^[A-Za-z0-9_-]+$/[_0x61818d(0x8a)](_0x1abb68))return{'valid':![],'message':_0x61818d(0x92)};return{'valid':!![]};}