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

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 (342) 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.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/{standard-page-status.d.ts → create.d.ts} +1 -1
  144. package/lib/commands/page/create.js +1 -0
  145. package/lib/commands/page/{react → custom}/detail.d.ts +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -0
  147. package/lib/commands/page/{react → custom}/list.d.ts +1 -1
  148. package/lib/commands/page/custom/list.js +1 -0
  149. package/lib/commands/page/{react → custom}/publish.d.ts +1 -1
  150. package/lib/commands/page/custom/publish.js +1 -0
  151. package/lib/commands/page/{react → custom}/shared.d.ts +15 -15
  152. package/lib/commands/page/custom/shared.js +1 -0
  153. package/lib/commands/page/{react → custom}/syntax.d.ts +2 -2
  154. package/lib/commands/page/custom/syntax.js +1 -0
  155. package/lib/commands/page/custom/template.js +1 -0
  156. package/lib/commands/page/{react → custom}/update.d.ts +1 -1
  157. package/lib/commands/page/custom/update.js +1 -0
  158. package/lib/commands/page/data-list-status.d.ts +2 -0
  159. package/lib/commands/page/data-list-status.js +1 -0
  160. package/lib/commands/page/generate-start.js +1 -1
  161. package/lib/commands/page/generate-status.js +1 -1
  162. package/lib/commands/page/index.js +1 -1
  163. package/lib/commands/page/pull.js +1 -1
  164. package/lib/commands/page/push.js +1 -1
  165. package/lib/commands/page/relation-audit.js +1 -1
  166. package/lib/commands/page/restore.js +1 -1
  167. package/lib/commands/page/shared.d.ts +18 -18
  168. package/lib/commands/page/shared.js +1 -1
  169. package/lib/commands/page/sync.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.js +1 -1
  173. package/lib/commands/project/create/materialize-project-template.js +1 -1
  174. package/lib/commands/project/create/project-name.js +1 -1
  175. package/lib/commands/project/create/project-template-archive.js +1 -1
  176. package/lib/commands/project/create/project-template-path.js +1 -1
  177. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  178. package/lib/commands/project/create/use-format-code.js +1 -1
  179. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  180. package/lib/commands/project/index.js +1 -1
  181. package/lib/commands/project/upgrade.js +1 -1
  182. package/lib/commands/registry.js +1 -1
  183. package/lib/commands/role/delete.js +1 -1
  184. package/lib/commands/role/detail.js +1 -1
  185. package/lib/commands/role/index.js +1 -1
  186. package/lib/commands/role/list.js +1 -1
  187. package/lib/commands/role/shared.js +1 -1
  188. package/lib/commands/role/update.js +1 -1
  189. package/lib/commands/role/user-add.js +1 -1
  190. package/lib/commands/role/user-remove.js +1 -1
  191. package/lib/commands/role/user-resolve.js +1 -1
  192. package/lib/commands/run/index.js +1 -1
  193. package/lib/commands/schema.js +1 -1
  194. package/lib/commands/sql/create.js +1 -1
  195. package/lib/commands/sql/delete.js +1 -1
  196. package/lib/commands/sql/detail.js +1 -1
  197. package/lib/commands/sql/exec.js +1 -1
  198. package/lib/commands/sql/index.js +1 -1
  199. package/lib/commands/sql/list.js +1 -1
  200. package/lib/commands/sql/pull.js +1 -1
  201. package/lib/commands/sql/push.js +1 -1
  202. package/lib/commands/sql/shared.js +1 -1
  203. package/lib/commands/sql/status.js +1 -1
  204. package/lib/commands/sql/validate.js +1 -1
  205. package/lib/commands/task/index.js +1 -1
  206. package/lib/commands/task/status.js +1 -1
  207. package/lib/commands/tenant/index.js +1 -1
  208. package/lib/commands/tenant/members-list.js +1 -1
  209. package/lib/commands/tenant/shared.js +1 -1
  210. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  211. package/lib/commands/user-account/index.js +1 -1
  212. package/lib/commands/workspace/add.js +1 -1
  213. package/lib/commands/workspace/index.js +1 -1
  214. package/lib/commands/workspace/remove.js +1 -1
  215. package/lib/config/schema.js +1 -1
  216. package/lib/constant/cdn.js +1 -1
  217. package/lib/constant/cli.js +1 -1
  218. package/lib/constant/defaults.js +1 -1
  219. package/lib/constant/domain.js +1 -1
  220. package/lib/constant/env.js +1 -1
  221. package/lib/constant/output.js +1 -1
  222. package/lib/constant/paths.js +1 -1
  223. package/lib/constant/risk.js +1 -1
  224. package/lib/context/app-resolver.js +1 -1
  225. package/lib/context/auth-resolver.js +1 -1
  226. package/lib/context/config-loader.js +1 -1
  227. package/lib/context.js +1 -1
  228. package/lib/core/alias-resolver.js +1 -1
  229. package/lib/core/api-client.d.ts +43 -43
  230. package/lib/core/api-client.js +1 -1
  231. package/lib/core/bff/config.js +1 -1
  232. package/lib/core/bff/file-system.js +1 -1
  233. package/lib/core/bff/hash.js +1 -1
  234. package/lib/core/bff/lock.js +1 -1
  235. package/lib/core/bff/utils.d.ts +3 -1
  236. package/lib/core/bff/utils.js +1 -1
  237. package/lib/core/db-resolver.js +1 -1
  238. package/lib/core/page/file-system.js +1 -1
  239. package/lib/core/page/hash.js +1 -1
  240. package/lib/core/page/lock.js +1 -1
  241. package/lib/core/sql-index-auditor.js +1 -1
  242. package/lib/core/sql-sync/config.js +1 -1
  243. package/lib/core/sql-sync/file-system.js +1 -1
  244. package/lib/core/sql-sync/hash.js +1 -1
  245. package/lib/core/sql-sync/lock.js +1 -1
  246. package/lib/core/sql-sync/utils.js +1 -1
  247. package/lib/core/sql-validator.js +1 -1
  248. package/lib/errors.js +1 -1
  249. package/lib/framework/build-all-flags.js +1 -1
  250. package/lib/framework/error-output.js +1 -1
  251. package/lib/framework/explicit-yes.js +1 -1
  252. package/lib/framework/flags.js +1 -1
  253. package/lib/framework/help.js +1 -1
  254. package/lib/framework/index.js +1 -1
  255. package/lib/framework/output.js +1 -1
  256. package/lib/framework/response.js +1 -1
  257. package/lib/framework/runner-alias.js +1 -1
  258. package/lib/framework/runner.js +1 -1
  259. package/lib/framework/schema-export.js +1 -1
  260. package/lib/framework/types.js +1 -1
  261. package/lib/generated/build-info.d.ts +4 -4
  262. package/lib/generated/build-info.js +1 -1
  263. package/lib/help.js +1 -1
  264. package/lib/postinstall.js +1 -1
  265. package/lib/runtime/confirmation.js +1 -1
  266. package/lib/runtime/event.js +1 -1
  267. package/lib/runtime/index.js +1 -1
  268. package/lib/runtime/queue.js +1 -1
  269. package/lib/runtime/resolve.js +1 -1
  270. package/lib/skills/builtin-skill.js +1 -1
  271. package/lib/skills/main.js +1 -1
  272. package/lib/skills/npx-skills-add.js +1 -1
  273. package/lib/skills/skill-presence.js +1 -1
  274. package/lib/telemetry/cli-command-trace.js +1 -1
  275. package/lib/telemetry/cli-help-trace.js +1 -1
  276. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  277. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  278. package/lib/telemetry/send-cli-trace-log.js +1 -1
  279. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  280. package/lib/utils/ai_config.js +1 -1
  281. package/lib/utils/apply-jq-filter.js +1 -1
  282. package/lib/utils/cdn-config.js +1 -1
  283. package/lib/utils/check-sdk-version.js +1 -1
  284. package/lib/utils/cli-version-check.js +1 -1
  285. package/lib/utils/cli-version-policy.js +1 -1
  286. package/lib/utils/config.js +1 -1
  287. package/lib/utils/entity-with-id.js +1 -1
  288. package/lib/utils/file-utils.js +1 -1
  289. package/lib/utils/guides-cdn.js +1 -1
  290. package/lib/utils/http-client.js +1 -1
  291. package/lib/utils/is-non-interactive.js +1 -1
  292. package/lib/utils/logger.js +1 -1
  293. package/lib/utils/params.js +1 -1
  294. package/lib/utils/platform.js +1 -1
  295. package/lib/utils/rules-cdn.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +1 -1
  303. package/skills/rabetbase/SKILL.md +34 -34
  304. package/skills/rabetbase/guides/backend-function.md +63 -18
  305. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -0
  306. package/skills/rabetbase/guides/{react-custom-page-workflow.md → custom-page-workflow.md} +45 -45
  307. package/skills/rabetbase/guides/page-development-workflow.md +22 -22
  308. package/skills/rabetbase/knowledge/{react-page → custom-page}/components.md +2 -2
  309. package/skills/rabetbase/knowledge/{react-page → custom-page}/generation-standards.md +6 -6
  310. package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +6 -6
  311. package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +1 -1
  312. package/skills/rabetbase/references/rabetbase-bff-create.md +2 -0
  313. package/skills/rabetbase/references/{rabetbase-standard-page-status.md → rabetbase-data-list-status.md} +6 -6
  314. package/skills/rabetbase/references/rabetbase-dataset-generate.md +1 -1
  315. package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +1 -1
  316. package/skills/rabetbase/references/rabetbase-dataset-relations.md +1 -1
  317. package/skills/rabetbase/references/rabetbase-dataset-restore.md +1 -1
  318. package/skills/rabetbase/references/rabetbase-menu-list.md +1 -1
  319. package/skills/rabetbase/references/rabetbase-page-create.md +31 -0
  320. package/skills/rabetbase/references/{rabetbase-page-react-detail.md → rabetbase-page-custom-detail.md} +5 -5
  321. package/skills/rabetbase/references/{rabetbase-page-react-list.md → rabetbase-page-custom-list.md} +4 -4
  322. package/skills/rabetbase/references/{rabetbase-page-react-publish.md → rabetbase-page-custom-publish.md} +6 -6
  323. package/skills/rabetbase/references/{rabetbase-page-react-update.md → rabetbase-page-custom-update.md} +6 -6
  324. package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -4
  325. package/skills/rabetbase/references/rabetbase-page-generate-status.md +4 -4
  326. package/skills/rabetbase/references/rabetbase-page-pull.md +2 -2
  327. package/skills/rabetbase/references/rabetbase-page-relation-binding.md +1 -1
  328. package/skills/rabetbase/references/rabetbase-page-restore.md +7 -7
  329. package/skills/rabetbase/references/rabetbase-page-sync.md +3 -3
  330. package/skills/rabetbase.manifest.json +12 -12
  331. package/lib/commands/page/react/create.d.ts +0 -2
  332. package/lib/commands/page/react/create.js +0 -1
  333. package/lib/commands/page/react/detail.js +0 -1
  334. package/lib/commands/page/react/list.js +0 -1
  335. package/lib/commands/page/react/publish.js +0 -1
  336. package/lib/commands/page/react/shared.js +0 -1
  337. package/lib/commands/page/react/syntax.js +0 -1
  338. package/lib/commands/page/react/template.js +0 -1
  339. package/lib/commands/page/react/update.js +0 -1
  340. package/lib/commands/page/standard-page-status.js +0 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-create.md +0 -29
  342. /package/lib/commands/page/{react → custom}/template.d.ts +0 -0
@@ -1 +1 @@
1
- const a34_0x30654b=a34_0x2c96;function a34_0x2c96(_0x121a9a,_0x2d1139){_0x121a9a=_0x121a9a-0xda;const _0x198bbe=a34_0x198b();let _0x2c9668=_0x198bbe[_0x121a9a];return _0x2c9668;}(function(_0x174601,_0x509c35){const _0x40831a=a34_0x2c96,_0x2c3295=_0x174601();while(!![]){try{const _0x57df92=parseInt(_0x40831a(0xeb))/0x1*(-parseInt(_0x40831a(0xf1))/0x2)+-parseInt(_0x40831a(0xec))/0x3+-parseInt(_0x40831a(0xee))/0x4*(-parseInt(_0x40831a(0xf0))/0x5)+parseInt(_0x40831a(0xf2))/0x6+-parseInt(_0x40831a(0xed))/0x7+-parseInt(_0x40831a(0xe9))/0x8*(-parseInt(_0x40831a(0xf6))/0x9)+parseInt(_0x40831a(0xdc))/0xa;if(_0x57df92===_0x509c35)break;else _0x2c3295['push'](_0x2c3295['shift']());}catch(_0x22a321){_0x2c3295['push'](_0x2c3295['shift']());}}}(a34_0x198b,0x831d3));function a34_0x198b(){const _0x5666d3=['1682658qVmBDr','name','Return\x20full\x20script\x20objects','Script\x20type\x20filter','1359fImYrp','scriptType','map','10844980XlCcQh','read','type','functionName','verbose','string','(unnamed)','boolean','str','No\x20BFF\x20scripts\x20found.','COMMON','length','list','13944XjEAWI','bool','4Lauwqn','1924776UtchWe','5379185ZbLEpd','774192mseMLW','ENDPOINT','10IXFMMH','34070ifKrur'];a34_0x198b=function(){return _0x5666d3;};return a34_0x198b();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':a34_0x30654b(0xe8),'description':'List\x20BFF\x20scripts','risk':a34_0x30654b(0xdd),'flags':[{'name':a34_0x30654b(0xde),'type':a34_0x30654b(0xe1),'description':a34_0x30654b(0xf5),'default':'ENDPOINT','enum':[a34_0x30654b(0xef),a34_0x30654b(0xe6)]},{'name':'name','type':a34_0x30654b(0xe1),'description':'Filter\x20by\x20script\x20name'},{'name':a34_0x30654b(0xe0),'type':a34_0x30654b(0xe3),'description':a34_0x30654b(0xf4)}],async 'execute'(_0x14a17b){const _0x14e23f=a34_0x30654b,_0x1b539c=await listBffScripts(_0x14a17b['appCode'],_0x14a17b['str'](_0x14e23f(0xde)),{'scriptName':_0x14a17b[_0x14e23f(0xe4)](_0x14e23f(0xf3))||undefined}),_0x4ecf06=_0x14a17b[_0x14e23f(0xea)](_0x14e23f(0xe0));return{'ok':!![],'data':_0x4ecf06?_0x1b539c:_0x1b539c[_0x14e23f(0xdb)](_0x3b167d=>({'id':_0x3b167d['id'],'functionName':_0x3b167d[_0x14e23f(0xdf)]??'','description':_0x3b167d['description']||_0x14e23f(0xe2),'scriptType':_0x3b167d[_0x14e23f(0xda)]})),'message':_0x1b539c[_0x14e23f(0xe7)]===0x0?_0x14e23f(0xe5):undefined};}};
1
+ const a34_0x4f8fab=a34_0x5083;function a34_0x5083(_0x4781bc,_0x432580){_0x4781bc=_0x4781bc-0x1b7;const _0x17396a=a34_0x1739();let _0x50834e=_0x17396a[_0x4781bc];return _0x50834e;}(function(_0x29ba24,_0x2763a1){const _0x49c73e=a34_0x5083,_0x48ff10=_0x29ba24();while(!![]){try{const _0x5859a0=-parseInt(_0x49c73e(0x1c8))/0x1+parseInt(_0x49c73e(0x1b7))/0x2+parseInt(_0x49c73e(0x1c4))/0x3*(-parseInt(_0x49c73e(0x1c0))/0x4)+-parseInt(_0x49c73e(0x1d6))/0x5+parseInt(_0x49c73e(0x1cd))/0x6*(-parseInt(_0x49c73e(0x1c5))/0x7)+parseInt(_0x49c73e(0x1c7))/0x8*(parseInt(_0x49c73e(0x1c3))/0x9)+-parseInt(_0x49c73e(0x1d1))/0xa*(-parseInt(_0x49c73e(0x1ca))/0xb);if(_0x5859a0===_0x2763a1)break;else _0x48ff10['push'](_0x48ff10['shift']());}catch(_0x3d1e86){_0x48ff10['push'](_0x48ff10['shift']());}}}(a34_0x1739,0xc24b2));import{listBffScripts}from'../../core/api-client.js';function a34_0x1739(){const _0x2a9348=['map','6XPbTVS','COMMON','Filter\x20by\x20script\x20name','type','63430SFpGPP','No\x20BFF\x20scripts\x20found.','appCode','description','verbose','6021095cmlLeV','list','2123712KzXYzZ','str','read','string','ENDPOINT','scriptType','name','bool','(unnamed)','4zCZxFH','length','Return\x20full\x20script\x20objects','9PSwQXr','2051484qFcEfT','4424189WEkqCh','functionName','11814104ZXQKDb','1423740OHkufU','bff','3817DeXgSc','List\x20BFF\x20scripts'];a34_0x1739=function(){return _0x2a9348;};return a34_0x1739();}export const bffList={'service':a34_0x4f8fab(0x1c9),'command':a34_0x4f8fab(0x1d7),'description':a34_0x4f8fab(0x1cb),'risk':a34_0x4f8fab(0x1b9),'flags':[{'name':a34_0x4f8fab(0x1d0),'type':a34_0x4f8fab(0x1ba),'description':'Script\x20type\x20filter','default':'ENDPOINT','enum':[a34_0x4f8fab(0x1bb),a34_0x4f8fab(0x1ce)]},{'name':a34_0x4f8fab(0x1bd),'type':a34_0x4f8fab(0x1ba),'description':a34_0x4f8fab(0x1cf)},{'name':a34_0x4f8fab(0x1d5),'type':'boolean','description':a34_0x4f8fab(0x1c2)}],async 'execute'(_0x34684f){const _0x6afc60=a34_0x4f8fab,_0x5d2128=await listBffScripts(_0x34684f[_0x6afc60(0x1d3)],_0x34684f[_0x6afc60(0x1b8)](_0x6afc60(0x1d0)),{'scriptName':_0x34684f[_0x6afc60(0x1b8)](_0x6afc60(0x1bd))||undefined}),_0x3dad50=_0x34684f[_0x6afc60(0x1be)]('verbose');return{'ok':!![],'data':_0x3dad50?_0x5d2128:_0x5d2128[_0x6afc60(0x1cc)](_0x26186e=>({'id':_0x26186e['id'],'functionName':_0x26186e[_0x6afc60(0x1c6)]??'','description':_0x26186e[_0x6afc60(0x1d4)]||_0x6afc60(0x1bf),'scriptType':_0x26186e[_0x6afc60(0x1bc)]})),'message':_0x5d2128[_0x6afc60(0x1c1)]===0x0?_0x6afc60(0x1d2):undefined};}};
@@ -1 +1 @@
1
- const a35_0xfc9ad3=a35_0x3514;(function(_0x45f4b6,_0x28b096){const _0x571f74=a35_0x3514,_0x1ea85b=_0x45f4b6();while(!![]){try{const _0x4791ef=-parseInt(_0x571f74(0x1c6))/0x1*(parseInt(_0x571f74(0x1b7))/0x2)+parseInt(_0x571f74(0x1c3))/0x3+-parseInt(_0x571f74(0x1dd))/0x4+parseInt(_0x571f74(0x1ec))/0x5+-parseInt(_0x571f74(0x1e8))/0x6+-parseInt(_0x571f74(0x1d7))/0x7+parseInt(_0x571f74(0x1f3))/0x8;if(_0x4791ef===_0x28b096)break;else _0x1ea85b['push'](_0x1ea85b['shift']());}catch(_0x1f7357){_0x1ea85b['push'](_0x1ea85b['shift']());}}}(a35_0x3f91,0xf137f));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a35_0x3f91(){const _0x260f24=['functionNode','type','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','trim','Pull\x20only\x20this\x20script\x20type','would_pull','nonInteractive','lockFilePath','scriptType','7492590ZOnvQx','toISOString','str','stringify','No\x20remote\x20BFF\x20scripts\x20found.','appCode','7855920LjJqYj','filePath','hookLocation','question','scriptsRoot','pull','Pull\x20complete:\x20','\x20skipped,\x20','toLowerCase','lockKey','push','3140940PaUooZ','functions','GET','datasetCode','9780520TVavdf','ENDPOINT','message','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptContent','Force\x20pull\x20cancelled.','&type=','12451896CKwwCp','conflict','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','operationType','utf8','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','validation','Lock\x20scope\x20for\x20app\x20\x22','8TWELkb','HOOK','hash','all','apiDir','COMMON','parse','stdin','yes','skipped','cancelled','version','3269232cDYJdy','Would\x20inspect\x20','unresolvable\x20target\x20path','14116NMUTow','force','\x20remote\x20BFF\x20script(s)\x20for\x20pull','\x20pulled,\x20','alias','close','map'];a35_0x3f91=function(){return _0x260f24;};return a35_0x3f91();}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_0xfc9ad3(0x1e2),'description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':'read','flags':[{'name':a35_0xfc9ad3(0x1ce),'type':'string','description':a35_0xfc9ad3(0x1d2),'enum':[a35_0xfc9ad3(0x1bc),a35_0xfc9ad3(0x1ed),a35_0xfc9ad3(0x1b8)]},{'name':'force','type':'boolean','description':a35_0xfc9ad3(0x1ef)}],async 'dryRun'(_0xf6532f){const _0x4c17bd=a35_0xfc9ad3,_0x296c43=loadBffProjectConfig(_0xf6532f['appCode']),_0x339d03=await readBffLockFile(_0x296c43[_0x4c17bd(0x1d5)]),{appLock:_0x881ff0}=ensureLockScope(_0x339d03??createEmptyBffLock(),_0xf6532f[_0x4c17bd(0x1dc)],_0x296c43[_0x4c17bd(0x1e1)],_0x4c17bd(0x1e2)),_0x2544ef=normalizeBffType(_0xf6532f[_0x4c17bd(0x1d9)](_0x4c17bd(0x1ce)))??undefined,_0x4886ba=buildDatasetCodeToAliasMap(_0xf6532f[_0x4c17bd(0x1bb)],_0xf6532f[_0x4c17bd(0x1dc)]),[_0x207127,_0x4104e8]=await Promise[_0x4c17bd(0x1ba)]([listBffScripts(_0xf6532f['appCode'],_0x2544ef),getBffScriptStatistics(_0xf6532f[_0x4c17bd(0x1dc)])]),_0x493c2d=createHookLocationMap(_0x4104e8),_0x53098f=[];for(const _0x14867e of _0x207127){const _0x4ed4fb=resolveRemoteScriptTarget(_0x296c43,_0x14867e,_0x493c2d,_0x881ff0[_0x4c17bd(0x1e9)],_0x4886ba);if(!_0x4ed4fb){_0x53098f[_0x4c17bd(0x1e7)]({'scriptType':_0x14867e[_0x4c17bd(0x1d6)],'functionName':_0x14867e['functionName']??'','status':_0x4c17bd(0x1c0),'reason':_0x4c17bd(0x1c5)});continue;}const _0x4a614c=_0x881ff0['functions'][_0x4ed4fb[_0x4c17bd(0x1e6)]],_0x40b941=_0x14867e[_0x4c17bd(0x1f0)]!=null?computeContentHash(_0x14867e['scriptContent']):undefined,_0x1197ee=await hasUnsyncedLocalChanges(_0x4ed4fb[_0x4c17bd(0x1de)],_0x4a614c,_0x40b941);_0x53098f[_0x4c17bd(0x1e7)]({'lockKey':_0x4ed4fb[_0x4c17bd(0x1e6)],'filePath':_0x4ed4fb[_0x4c17bd(0x1de)],'remoteId':_0x14867e['id']??null,'status':_0x1197ee?_0x4c17bd(0x1b0):_0x4c17bd(0x1d3)});}return{'method':_0x4c17bd(0x1ea),'url':'/api/management/library/scripts/list?appCode='+_0xf6532f[_0x4c17bd(0x1dc)]+(_0x2544ef?_0x4c17bd(0x1f2)+_0x2544ef:''),'body':{'appCode':_0xf6532f[_0x4c17bd(0x1dc)],'filterType':_0x2544ef??null,'files':_0x53098f},'description':_0x4c17bd(0x1c4)+_0x53098f[_0x4c17bd(0x1d0)]+_0x4c17bd(0x1c8)};},async 'execute'(_0x4bb56a){const _0x1bb2f8=a35_0xfc9ad3,_0x145ea7=loadBffProjectConfig(_0x4bb56a['appCode']),_0x2d40bb=await readBffLockFile(_0x145ea7[_0x1bb2f8(0x1d5)]),{lockData:_0x5e5f82,appLock:_0x568cb9}=ensureLockScope(_0x2d40bb??createEmptyBffLock(),_0x4bb56a['appCode'],_0x145ea7[_0x1bb2f8(0x1e1)],_0x1bb2f8(0x1e2)),_0x3f757b=normalizeBffType(_0x4bb56a[_0x1bb2f8(0x1d9)]('type'))??undefined;if(_0x4bb56a[_0x1bb2f8(0x1d9)]('type')&&!_0x3f757b)throw CliErrors[_0x1bb2f8(0x1b5)](_0x1bb2f8(0x1b4));const [_0x5c63da,_0x26a2a2]=await Promise[_0x1bb2f8(0x1ba)]([listBffScripts(_0x4bb56a[_0x1bb2f8(0x1dc)],_0x3f757b),getBffScriptStatistics(_0x4bb56a[_0x1bb2f8(0x1dc)])]);if(_0x5c63da[_0x1bb2f8(0x1d0)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1bb2f8(0x1db)};const _0x510a7f=_0x4bb56a['bool'](_0x1bb2f8(0x1c7));if(_0x510a7f&&!_0x4bb56a[_0x1bb2f8(0x1d4)]){const _0x22c319=await confirmForce();if(!_0x22c319)throw CliErrors[_0x1bb2f8(0x1c1)](_0x1bb2f8(0x1f1));}if(_0x510a7f&&_0x4bb56a[_0x1bb2f8(0x1d4)]){}const _0x1cce04=buildDatasetCodeToAliasMap(_0x4bb56a[_0x1bb2f8(0x1bb)],_0x4bb56a['appCode']),_0x51e060=createHookLocationMap(_0x26a2a2),_0x3f71a3=JSON[_0x1bb2f8(0x1bd)](JSON[_0x1bb2f8(0x1da)](_0x5e5f82)),_0x43a9d3=_0x4bb56a[_0x1bb2f8(0x1dc)],_0x410379=_0x3f71a3['apps'][_0x43a9d3];if(!_0x410379)throw new Error(_0x1bb2f8(0x1b6)+_0x43a9d3+_0x1bb2f8(0x1cf));const _0x313523=[],_0x436ce1=[],_0x47b09b=[];for(const _0x5a7551 of _0x5c63da){const _0x1543df=resolveRemoteScriptTarget(_0x145ea7,_0x5a7551,_0x51e060,_0x568cb9[_0x1bb2f8(0x1e9)],_0x1cce04);if(!_0x1543df){_0x436ce1[_0x1bb2f8(0x1e7)]({'lockKey':_0x5a7551[_0x1bb2f8(0x1d6)]+'/'+_0x5a7551['functionName'],'reason':_0x1bb2f8(0x1c5)});continue;}const _0x2bf790=_0x568cb9[_0x1bb2f8(0x1e9)][_0x1543df[_0x1bb2f8(0x1e6)]];try{if(!_0x5a7551['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x5a7551[_0x1bb2f8(0x1f0)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x430cd3=_0x5a7551[_0x1bb2f8(0x1f0)],_0x305d7e=computeContentHash(_0x430cd3);if(!_0x510a7f){const _0x3ca035=await hasUnsyncedLocalChanges(_0x1543df[_0x1bb2f8(0x1de)],_0x2bf790,_0x305d7e);if(_0x3ca035){_0x436ce1['push']({'lockKey':_0x1543df['lockKey'],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x1543df[_0x1bb2f8(0x1de)]),await writeFile(_0x1543df[_0x1bb2f8(0x1de)],_0x430cd3,_0x1bb2f8(0x1b3));const _0xbfd20e={'hash':_0x305d7e,'remoteId':_0x5a7551['id'],'version':_0x5a7551[_0x1bb2f8(0x1c2)]};_0x1543df['type']===_0x1bb2f8(0x1b8)&&_0x1543df[_0x1bb2f8(0x1df)]&&(_0xbfd20e[_0x1bb2f8(0x1ca)]=_0x1543df['hookLocation'][_0x1bb2f8(0x1ca)],_0xbfd20e[_0x1bb2f8(0x1eb)]=_0x1543df['hookLocation']['datasetCode'],_0xbfd20e[_0x1bb2f8(0x1b2)]=_0x1543df[_0x1bb2f8(0x1df)][_0x1bb2f8(0x1b2)],_0xbfd20e['functionNode']=_0x1543df['hookLocation'][_0x1bb2f8(0x1cd)]),_0x410379[_0x1bb2f8(0x1e9)][_0x1543df[_0x1bb2f8(0x1e6)]]=_0xbfd20e,_0x313523['push']({'lockKey':_0x1543df[_0x1bb2f8(0x1e6)],'remoteId':_0x5a7551['id']});}catch(_0x48966b){_0x47b09b[_0x1bb2f8(0x1e7)]({'lockKey':_0x1543df[_0x1bb2f8(0x1e6)],'error':_0x48966b instanceof Error?_0x48966b[_0x1bb2f8(0x1ee)]:String(_0x48966b)});}}return _0x410379['lastSync']=new Date()[_0x1bb2f8(0x1d8)](),await writeBffLockFile(_0x145ea7[_0x1bb2f8(0x1d5)],_0x3f71a3),{'ok':_0x47b09b[_0x1bb2f8(0x1d0)]===0x0,'data':{'pulled':_0x313523,'skipped':_0x436ce1,'failed':_0x47b09b},'message':_0x1bb2f8(0x1e3)+_0x313523['length']+_0x1bb2f8(0x1c9)+_0x436ce1[_0x1bb2f8(0x1d0)]+_0x1bb2f8(0x1e4)+_0x47b09b[_0x1bb2f8(0x1d0)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x13eeca,_0x25bc1d,_0x46113b){const _0x4a8670=a35_0xfc9ad3;if(!await fileExists(_0x13eeca))return![];const _0x2f859a=await computeFileHash(_0x13eeca);if(!_0x25bc1d)return _0x46113b?_0x2f859a!==_0x46113b:!![];return _0x2f859a!==_0x25bc1d[_0x4a8670(0x1b9)];}function a35_0x3514(_0x248bc7,_0x1f2df3){_0x248bc7=_0x248bc7-0x1b0;const _0x3f91a9=a35_0x3f91();let _0x3514f5=_0x3f91a9[_0x248bc7];return _0x3514f5;}function buildDatasetCodeToAliasMap(_0x2a4969,_0x330be5){const _0x5d0f61=a35_0xfc9ad3,_0x2ef7e9=loadAliasMap(_0x2a4969,undefined,resolveApiFilePath(_0x2a4969,_0x330be5));return new Map(_0x2ef7e9[_0x5d0f61(0x1cc)](_0x37d429=>[_0x37d429['datasetCode'],_0x37d429[_0x5d0f61(0x1ca)]]));}async function confirmForce(){const _0x6d24b=a35_0xfc9ad3,_0x47aee7=createInterface({'input':process[_0x6d24b(0x1be)],'output':process['stderr']}),_0x41c7bb=await new Promise(_0x2c00f5=>{const _0x154e38=_0x6d24b;_0x47aee7[_0x154e38(0x1e0)](_0x154e38(0x1b1),_0x2c00f5);});return _0x47aee7[_0x6d24b(0x1cb)](),['y',_0x6d24b(0x1bf)]['includes'](_0x41c7bb[_0x6d24b(0x1d1)]()[_0x6d24b(0x1e5)]());}
1
+ const a35_0xd798f7=a35_0x1955;function a35_0x1955(_0x2139f0,_0x32690f){_0x2139f0=_0x2139f0-0xce;const _0x384ea8=a35_0x384e();let _0x19558a=_0x384ea8[_0x2139f0];return _0x19558a;}(function(_0x8edb3,_0x58e895){const _0x41c595=a35_0x1955,_0x593a72=_0x8edb3();while(!![]){try{const _0x3f78ec=-parseInt(_0x41c595(0x10e))/0x1+-parseInt(_0x41c595(0x102))/0x2+parseInt(_0x41c595(0x109))/0x3*(parseInt(_0x41c595(0xd8))/0x4)+-parseInt(_0x41c595(0xde))/0x5+-parseInt(_0x41c595(0xee))/0x6+-parseInt(_0x41c595(0x113))/0x7*(parseInt(_0x41c595(0xdc))/0x8)+parseInt(_0x41c595(0xdf))/0x9*(parseInt(_0x41c595(0x106))/0xa);if(_0x3f78ec===_0x58e895)break;else _0x593a72['push'](_0x593a72['shift']());}catch(_0x4d6b27){_0x593a72['push'](_0x593a72['shift']());}}}(a35_0x384e,0x40c3a));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a35_0x384e(){const _0x200b2c=['utf8','hookLocation','2178WjehfX','conflict','yes','nonInteractive','stdin','307813hNyzat','COMMON','filePath','toLowerCase','\x22\x20not\x20found\x20after\x20ensureLockScope.','5061niXTtv','all','ENDPOINT','Would\x20inspect\x20','appCode','\x20pulled,\x20','lockFilePath','\x20failed','length','trim','Force\x20overwrite\x20local\x20unsynced\x20changes','map','cancelled','bff','unresolvable\x20target\x20path','parse','close','scriptContent','1316VHtgRz','functions','local\x20unsynced\x20changes','operationType','72QFoSOn','boolean','1129780kklBrI','4731543yFBSYF','No\x20remote\x20BFF\x20scripts\x20found.','pull','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','Remote\x20script\x20missing\x20id.','&type=','validation','skipped','GET','push','\x20remote\x20BFF\x20script(s)\x20for\x20pull','force','string','scriptType','version','1116738mLWgaK','stringify','functionNode','/api/management/library/scripts/list?appCode=','message','datasetCode','Force\x20pull\x20cancelled.','str','toISOString','hash','type','apps','alias','would_pull','\x20skipped,\x20','bool','lockKey','apiDir','question','Pull\x20complete:\x20','597270vAnEuy','Remote\x20script\x20missing\x20content.','scriptsRoot','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','20WQjJXc'];a35_0x384e=function(){return _0x200b2c;};return a35_0x384e();}import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0xd798f7(0xd3),'command':a35_0xd798f7(0xe1),'description':a35_0xd798f7(0x105),'risk':'read','flags':[{'name':a35_0xd798f7(0xf8),'type':a35_0xd798f7(0xeb),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a35_0xd798f7(0x10f),a35_0xd798f7(0x115),'HOOK']},{'name':a35_0xd798f7(0xea),'type':a35_0xd798f7(0xdd),'description':a35_0xd798f7(0xd0)}],async 'dryRun'(_0xf77cf0){const _0xfcec4b=a35_0xd798f7,_0x2e73fb=loadBffProjectConfig(_0xf77cf0['appCode']),_0x2da646=await readBffLockFile(_0x2e73fb[_0xfcec4b(0x119)]),{appLock:_0x4d64d1}=ensureLockScope(_0x2da646??createEmptyBffLock(),_0xf77cf0[_0xfcec4b(0x117)],_0x2e73fb['scriptsRoot'],'pull'),_0x5cdfec=normalizeBffType(_0xf77cf0[_0xfcec4b(0xf5)](_0xfcec4b(0xf8)))??undefined,_0x4e6e32=buildDatasetCodeToAliasMap(_0xf77cf0[_0xfcec4b(0xff)],_0xf77cf0[_0xfcec4b(0x117)]),[_0x9591e,_0x561c09]=await Promise[_0xfcec4b(0x114)]([listBffScripts(_0xf77cf0['appCode'],_0x5cdfec),getBffScriptStatistics(_0xf77cf0[_0xfcec4b(0x117)])]),_0x30f02c=createHookLocationMap(_0x561c09),_0x208eed=[];for(const _0x5e05bc of _0x9591e){const _0x3ac514=resolveRemoteScriptTarget(_0x2e73fb,_0x5e05bc,_0x30f02c,_0x4d64d1[_0xfcec4b(0xd9)],_0x4e6e32);if(!_0x3ac514){_0x208eed[_0xfcec4b(0xe8)]({'scriptType':_0x5e05bc[_0xfcec4b(0xec)],'functionName':_0x5e05bc['functionName']??'','status':_0xfcec4b(0xe6),'reason':'unresolvable\x20target\x20path'});continue;}const _0x5094b5=_0x4d64d1[_0xfcec4b(0xd9)][_0x3ac514['lockKey']],_0x24050e=_0x5e05bc[_0xfcec4b(0xd7)]!=null?computeContentHash(_0x5e05bc[_0xfcec4b(0xd7)]):undefined,_0xe0e830=await hasUnsyncedLocalChanges(_0x3ac514[_0xfcec4b(0x110)],_0x5094b5,_0x24050e);_0x208eed[_0xfcec4b(0xe8)]({'lockKey':_0x3ac514[_0xfcec4b(0xfe)],'filePath':_0x3ac514[_0xfcec4b(0x110)],'remoteId':_0x5e05bc['id']??null,'status':_0xe0e830?_0xfcec4b(0x10a):_0xfcec4b(0xfb)});}return{'method':_0xfcec4b(0xe7),'url':_0xfcec4b(0xf1)+_0xf77cf0[_0xfcec4b(0x117)]+(_0x5cdfec?_0xfcec4b(0xe4)+_0x5cdfec:''),'body':{'appCode':_0xf77cf0[_0xfcec4b(0x117)],'filterType':_0x5cdfec??null,'files':_0x208eed},'description':_0xfcec4b(0x116)+_0x208eed[_0xfcec4b(0xce)]+_0xfcec4b(0xe9)};},async 'execute'(_0x48b9ca){const _0x5a0baa=a35_0xd798f7,_0x3053b5=loadBffProjectConfig(_0x48b9ca[_0x5a0baa(0x117)]),_0x48edee=await readBffLockFile(_0x3053b5['lockFilePath']),{lockData:_0x149166,appLock:_0x6ae8c3}=ensureLockScope(_0x48edee??createEmptyBffLock(),_0x48b9ca[_0x5a0baa(0x117)],_0x3053b5[_0x5a0baa(0x104)],_0x5a0baa(0xe1)),_0x222133=normalizeBffType(_0x48b9ca[_0x5a0baa(0xf5)](_0x5a0baa(0xf8)))??undefined;if(_0x48b9ca[_0x5a0baa(0xf5)](_0x5a0baa(0xf8))&&!_0x222133)throw CliErrors[_0x5a0baa(0xe5)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0xf0b03a,_0x414131]=await Promise['all']([listBffScripts(_0x48b9ca[_0x5a0baa(0x117)],_0x222133),getBffScriptStatistics(_0x48b9ca['appCode'])]);if(_0xf0b03a[_0x5a0baa(0xce)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5a0baa(0xe0)};const _0x41391b=_0x48b9ca[_0x5a0baa(0xfd)](_0x5a0baa(0xea));if(_0x41391b&&!_0x48b9ca[_0x5a0baa(0x10c)]){const _0x4a8ad4=await confirmForce();if(!_0x4a8ad4)throw CliErrors[_0x5a0baa(0xd2)](_0x5a0baa(0xf4));}if(_0x41391b&&_0x48b9ca[_0x5a0baa(0x10c)]){}const _0x5e4f66=buildDatasetCodeToAliasMap(_0x48b9ca[_0x5a0baa(0xff)],_0x48b9ca[_0x5a0baa(0x117)]),_0x208e49=createHookLocationMap(_0x414131),_0x5b6c97=JSON[_0x5a0baa(0xd5)](JSON[_0x5a0baa(0xef)](_0x149166)),_0x4a3977=_0x48b9ca[_0x5a0baa(0x117)],_0x1d5f71=_0x5b6c97[_0x5a0baa(0xf9)][_0x4a3977];if(!_0x1d5f71)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x4a3977+_0x5a0baa(0x112));const _0xa4af23=[],_0x4a29a0=[],_0x2f6540=[];for(const _0x49bbe4 of _0xf0b03a){const _0x1b507c=resolveRemoteScriptTarget(_0x3053b5,_0x49bbe4,_0x208e49,_0x6ae8c3[_0x5a0baa(0xd9)],_0x5e4f66);if(!_0x1b507c){_0x4a29a0['push']({'lockKey':_0x49bbe4['scriptType']+'/'+_0x49bbe4['functionName'],'reason':_0x5a0baa(0xd4)});continue;}const _0x31de2b=_0x6ae8c3[_0x5a0baa(0xd9)][_0x1b507c['lockKey']];try{if(!_0x49bbe4['id'])throw new Error(_0x5a0baa(0xe3));if(_0x49bbe4[_0x5a0baa(0xd7)]==null)throw new Error(_0x5a0baa(0x103));const _0x5c0a52=_0x49bbe4['scriptContent'],_0x4bf2b3=computeContentHash(_0x5c0a52);if(!_0x41391b){const _0x1065b2=await hasUnsyncedLocalChanges(_0x1b507c['filePath'],_0x31de2b,_0x4bf2b3);if(_0x1065b2){_0x4a29a0['push']({'lockKey':_0x1b507c[_0x5a0baa(0xfe)],'reason':_0x5a0baa(0xda)});continue;}}await ensureParentDirectory(_0x1b507c[_0x5a0baa(0x110)]),await writeFile(_0x1b507c['filePath'],_0x5c0a52,_0x5a0baa(0x107));const _0x4a6b47={'hash':_0x4bf2b3,'remoteId':_0x49bbe4['id'],'version':_0x49bbe4[_0x5a0baa(0xed)]};_0x1b507c[_0x5a0baa(0xf8)]==='HOOK'&&_0x1b507c[_0x5a0baa(0x108)]&&(_0x4a6b47[_0x5a0baa(0xfa)]=_0x1b507c[_0x5a0baa(0x108)][_0x5a0baa(0xfa)],_0x4a6b47['datasetCode']=_0x1b507c['hookLocation'][_0x5a0baa(0xf3)],_0x4a6b47['operationType']=_0x1b507c[_0x5a0baa(0x108)][_0x5a0baa(0xdb)],_0x4a6b47[_0x5a0baa(0xf0)]=_0x1b507c[_0x5a0baa(0x108)][_0x5a0baa(0xf0)]),_0x1d5f71[_0x5a0baa(0xd9)][_0x1b507c[_0x5a0baa(0xfe)]]=_0x4a6b47,_0xa4af23[_0x5a0baa(0xe8)]({'lockKey':_0x1b507c[_0x5a0baa(0xfe)],'remoteId':_0x49bbe4['id']});}catch(_0x5a25af){_0x2f6540[_0x5a0baa(0xe8)]({'lockKey':_0x1b507c[_0x5a0baa(0xfe)],'error':_0x5a25af instanceof Error?_0x5a25af[_0x5a0baa(0xf2)]:String(_0x5a25af)});}}return _0x1d5f71['lastSync']=new Date()[_0x5a0baa(0xf6)](),await writeBffLockFile(_0x3053b5[_0x5a0baa(0x119)],_0x5b6c97),{'ok':_0x2f6540['length']===0x0,'data':{'pulled':_0xa4af23,'skipped':_0x4a29a0,'failed':_0x2f6540},'message':_0x5a0baa(0x101)+_0xa4af23['length']+_0x5a0baa(0x118)+_0x4a29a0[_0x5a0baa(0xce)]+_0x5a0baa(0xfc)+_0x2f6540[_0x5a0baa(0xce)]+_0x5a0baa(0x11a)};}};async function hasUnsyncedLocalChanges(_0x30b98b,_0xef9a10,_0x1cf711){const _0x442125=a35_0xd798f7;if(!await fileExists(_0x30b98b))return![];const _0x370c8e=await computeFileHash(_0x30b98b);if(!_0xef9a10)return _0x1cf711?_0x370c8e!==_0x1cf711:!![];return _0x370c8e!==_0xef9a10[_0x442125(0xf7)];}function buildDatasetCodeToAliasMap(_0x16b1e1,_0x5296eb){const _0x17336f=a35_0xd798f7,_0x11b515=loadAliasMap(_0x16b1e1,undefined,resolveApiFilePath(_0x16b1e1,_0x5296eb));return new Map(_0x11b515[_0x17336f(0xd1)](_0x48323=>[_0x48323[_0x17336f(0xf3)],_0x48323[_0x17336f(0xfa)]]));}async function confirmForce(){const _0x22e238=a35_0xd798f7,_0x341bf7=createInterface({'input':process[_0x22e238(0x10d)],'output':process['stderr']}),_0x21b96c=await new Promise(_0x46eb30=>{const _0x104112=_0x22e238;_0x341bf7[_0x104112(0x100)](_0x104112(0xe2),_0x46eb30);});return _0x341bf7[_0x22e238(0xd6)](),['y',_0x22e238(0x10b)]['includes'](_0x21b96c[_0x22e238(0xcf)]()[_0x22e238(0x111)]());}
@@ -1 +1 @@
1
- const a36_0x1a3051=a36_0x3430;function a36_0x3430(_0x98404c,_0x4aca6b){_0x98404c=_0x98404c-0x149;const _0x56ca3b=a36_0x56ca();let _0x34308a=_0x56ca3b[_0x98404c];return _0x34308a;}(function(_0x3707ec,_0xdb70ea){const _0x275fdb=a36_0x3430,_0x10ad4f=_0x3707ec();while(!![]){try{const _0x472006=-parseInt(_0x275fdb(0x161))/0x1+parseInt(_0x275fdb(0x14e))/0x2*(parseInt(_0x275fdb(0x168))/0x3)+parseInt(_0x275fdb(0x166))/0x4*(-parseInt(_0x275fdb(0x191))/0x5)+parseInt(_0x275fdb(0x16e))/0x6+-parseInt(_0x275fdb(0x192))/0x7*(parseInt(_0x275fdb(0x186))/0x8)+parseInt(_0x275fdb(0x172))/0x9*(parseInt(_0x275fdb(0x180))/0xa)+-parseInt(_0x275fdb(0x19c))/0xb;if(_0x472006===_0xdb70ea)break;else _0x10ad4f['push'](_0x10ad4f['shift']());}catch(_0x29ba1a){_0x10ad4f['push'](_0x10ad4f['shift']());}}}(a36_0x56ca,0x34deb));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a36_0x56ca(){const _0x506396=['version','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','would_push','update','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','remoteId','attempted','toISOString','\x22.\x20','5eFwKiP','28vsRzxq','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Incomplete\x20HOOK\x20path:\x20','filePath','scriptsRoot','runtime\x20cache\x20cleared','set','Would\x20inspect\x20','No\x20local\x20BFF\x20functions\x20found.','214346FMHYED','script','apps','every','some','force','Runtime\x20script\x20cache\x20cleared.','filter','Push\x20complete:\x20','runtime\x20cache\x20clear\x20failed',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','datasetCode','name','79094brGTVi','length','lastSync','values','stringify','runtime\x20cache\x20not\x20needed','lockKey','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','create','get','Cannot\x20resolve\x20dataset\x20for\x20\x22','join','Lock\x20scope\x20for\x20app\x20\x22','datasetCodeToDataset','validation','Push\x20local\x20BFF\x20scripts\x20to\x20remote','message','lockFilePath','ENDPOINT','87793IxDeYu','write','\x20uploaded,\x20','has','/api/management/library/scripts/save','689764BRLHlx','operationType','24eDVqaB','HOOK','status','hash','datasetId','push','512820SbaVfx','type','bff','map','1809ReaWOC','bool','aliasToDatasetCode','COMMON','string','Force\x20push\x20ignoring\x20hash\x20protection','\x22\x20not\x20found\x20after\x20ensureLockScope.','str','parse','POST','Local\x20function\x20not\x20found:\x20','\x20failed,\x20','cleared','functionNode','14650MPzVEB','\x20skipped,\x20','boolean','appCode','functions','unchanged','400072wlXOfA'];a36_0x56ca=function(){return _0x506396;};return a36_0x56ca();}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_0x1a3051(0x170),'command':a36_0x1a3051(0x16d),'description':a36_0x1a3051(0x15d),'risk':a36_0x1a3051(0x162),'flags':[{'name':a36_0x1a3051(0x16f),'type':a36_0x1a3051(0x176),'description':'Push\x20only\x20this\x20script\x20type','enum':[a36_0x1a3051(0x175),a36_0x1a3051(0x160),'HOOK']},{'name':a36_0x1a3051(0x14d),'type':a36_0x1a3051(0x176),'description':a36_0x1a3051(0x18b)},{'name':a36_0x1a3051(0x1a1),'type':a36_0x1a3051(0x182),'description':a36_0x1a3051(0x177)}],async 'dryRun'(_0x240167){const _0x2abc86=a36_0x1a3051,_0x2d7ef7=loadBffProjectConfig(_0x240167[_0x2abc86(0x183)]),_0x1bdd0d=await readBffLockFile(_0x2d7ef7[_0x2abc86(0x15f)]),{appLock:_0x206039}=ensureLockScope(_0x1bdd0d??createEmptyBffLock(),_0x240167[_0x2abc86(0x183)],_0x2d7ef7[_0x2abc86(0x197)],'push'),_0x15a7e9=await getTargetFunctions(_0x2d7ef7,_0x240167),_0x5ac055=_0x240167[_0x2abc86(0x173)]('force'),_0x58400f=[];for(const _0x3c9fcb of _0x15a7e9){const _0x3d0955=await computeFileHash(_0x3c9fcb[_0x2abc86(0x196)]),_0x3ac057=_0x206039[_0x2abc86(0x184)][_0x3c9fcb[_0x2abc86(0x154)]],_0x108ff3=!!_0x3ac057&&_0x3ac057['hash']===_0x3d0955;_0x58400f[_0x2abc86(0x16d)]({'lockKey':_0x3c9fcb[_0x2abc86(0x154)],'filePath':_0x3c9fcb[_0x2abc86(0x196)],'remoteId':_0x3ac057?.[_0x2abc86(0x18d)]??null,'mode':_0x3ac057?.['remoteId']?_0x2abc86(0x18a):_0x2abc86(0x156),'status':!_0x5ac055&&_0x108ff3?_0x2abc86(0x185):_0x2abc86(0x189)});}return{'method':_0x2abc86(0x17b),'url':_0x2abc86(0x165),'body':{'appCode':_0x240167[_0x2abc86(0x183)],'force':_0x5ac055,'files':_0x58400f,'cacheClearAtRuntime':_0x58400f[_0x2abc86(0x1a0)](_0x4a9e6a=>_0x4a9e6a[_0x2abc86(0x16a)]===_0x2abc86(0x189)),'cacheClearAtRuntimeTimes':_0x58400f[_0x2abc86(0x1a0)](_0x3c5649=>_0x3c5649['status']===_0x2abc86(0x189))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2abc86(0x19a)+_0x58400f[_0x2abc86(0x14f)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x4a37d0){const _0x3a1103=a36_0x1a3051,_0x1ab3d3=loadBffProjectConfig(_0x4a37d0[_0x3a1103(0x183)]),_0x2e4a5c=await readBffLockFile(_0x1ab3d3[_0x3a1103(0x15f)]),{lockData:_0x4017d9,appLock:_0x21c0ca}=ensureLockScope(_0x2e4a5c??createEmptyBffLock(),_0x4a37d0['appCode'],_0x1ab3d3[_0x3a1103(0x197)],'push'),_0x4828b9=await getTargetFunctions(_0x1ab3d3,_0x4a37d0);if(_0x4828b9['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3a1103(0x19b)};const _0x13244f=_0x4a37d0[_0x3a1103(0x173)](_0x3a1103(0x1a1)),_0x10b6bd=JSON[_0x3a1103(0x17a)](JSON[_0x3a1103(0x152)](_0x4017d9)),_0x5af191=_0x10b6bd[_0x3a1103(0x19e)][_0x4a37d0[_0x3a1103(0x183)]];if(!_0x5af191)throw new Error(_0x3a1103(0x15a)+_0x4a37d0[_0x3a1103(0x183)]+_0x3a1103(0x178));const _0x4ec0ec=await buildHookMaps(_0x4a37d0['appCode'],_0x4a37d0['apiDir'],_0x4828b9,_0x5af191),_0x340e55=[],_0x250451=[],_0x175f8a=[];for(const _0xc65965 of _0x4828b9){const _0x53a570=await computeFileHash(_0xc65965[_0x3a1103(0x196)]),_0x75e820=_0x5af191[_0x3a1103(0x184)][_0xc65965[_0x3a1103(0x154)]];if(!_0x13244f&&_0x75e820&&_0x75e820[_0x3a1103(0x16b)]===_0x53a570){_0x250451[_0x3a1103(0x16d)]({'lockKey':_0xc65965[_0x3a1103(0x154)],'reason':_0x3a1103(0x185)});continue;}try{await uploadSingleFunction(_0x4a37d0[_0x3a1103(0x183)],_0xc65965,_0x5af191,_0x4ec0ec);const _0x2c51d9=_0x5af191[_0x3a1103(0x184)][_0xc65965[_0x3a1103(0x154)]];_0x340e55[_0x3a1103(0x16d)]({'lockKey':_0xc65965[_0x3a1103(0x154)],'remoteId':_0x2c51d9?.[_0x3a1103(0x18d)]??0x0});}catch(_0x4583c1){_0x175f8a[_0x3a1103(0x16d)]({'lockKey':_0xc65965[_0x3a1103(0x154)],'error':_0x4583c1 instanceof Error?_0x4583c1[_0x3a1103(0x15e)]:String(_0x4583c1)});}}_0x5af191[_0x3a1103(0x150)]=new Date()[_0x3a1103(0x18f)](),await writeBffLockFile(_0x1ab3d3[_0x3a1103(0x15f)],_0x10b6bd),await waitForUploadedLockEntries(_0x1ab3d3[_0x3a1103(0x15f)],_0x4a37d0['appCode'],_0x340e55['map'](_0x20fb11=>_0x20fb11[_0x3a1103(0x154)]));let _0x19cb5d={'attempted':![],'cleared':![]};if(_0x340e55[_0x3a1103(0x14f)]>0x0)try{let _0x4a071e='';for(let _0x1fd2c2=0x0;_0x1fd2c2<CACHE_CLEAR_ATTEMPTS;_0x1fd2c2+=0x1){_0x4a071e=await clearBffScriptCache(),_0x1fd2c2<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x19cb5d={'attempted':!![],'cleared':!![],'message':_0x4a071e||_0x3a1103(0x1a2)};}catch(_0x5be275){_0x19cb5d={'attempted':!![],'cleared':![],'error':_0x5be275 instanceof Error?_0x5be275['message']:String(_0x5be275)};}const _0x4be7aa=_0x175f8a[_0x3a1103(0x14f)]===0x0&&(_0x19cb5d[_0x3a1103(0x18e)]?_0x19cb5d[_0x3a1103(0x17e)]:!![]),_0x4c2e52=_0x19cb5d[_0x3a1103(0x18e)]?_0x19cb5d[_0x3a1103(0x17e)]?_0x3a1103(0x198):_0x3a1103(0x14a):_0x3a1103(0x153);return{'ok':_0x4be7aa,'data':{'uploaded':_0x340e55,'skipped':_0x250451,'failed':_0x175f8a,'cacheClear':_0x19cb5d},'message':_0x3a1103(0x149)+_0x340e55[_0x3a1103(0x14f)]+_0x3a1103(0x163)+_0x250451[_0x3a1103(0x14f)]+_0x3a1103(0x181)+_0x175f8a[_0x3a1103(0x14f)]+_0x3a1103(0x17d)+_0x4c2e52};}};async function getTargetFunctions(_0x5c498d,_0x1f91e1){const _0x3e0010=a36_0x1a3051,_0x267322=_0x1f91e1[_0x3e0010(0x179)](_0x3e0010(0x16f)),_0x8de625=_0x1f91e1[_0x3e0010(0x179)](_0x3e0010(0x14d)),_0x2fab2b=normalizeBffType(_0x267322)??undefined;if(_0x8de625&&!_0x2fab2b)throw CliErrors[_0x3e0010(0x15c)](_0x3e0010(0x155));const _0x21cd4d=await scanLocalBffFunctions(_0x5c498d,_0x2fab2b);if(_0x8de625){const _0xd60ae8=_0x21cd4d[_0x3e0010(0x1a3)](_0x4ac4ac=>_0x4ac4ac[_0x3e0010(0x14d)]===_0x8de625);if(_0xd60ae8['length']===0x0)throw CliErrors['validation'](_0x3e0010(0x17c)+_0x2fab2b+'/'+_0x8de625);return _0xd60ae8;}return _0x21cd4d;}async function buildHookMaps(_0x236618,_0x36713c,_0x53e8fa,_0x20dfa1){const _0x1bf637=a36_0x1a3051,_0x48e207=_0x53e8fa[_0x1bf637(0x1a0)](_0x439b2c=>_0x439b2c[_0x1bf637(0x16f)]===_0x1bf637(0x169));if(!_0x48e207)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xb06d3=loadAliasMap(_0x36713c,undefined,resolveApiFilePath(_0x36713c,_0x236618)),_0x41708c=new Map(_0xb06d3['map'](_0x329a85=>[_0x329a85[_0x1bf637(0x193)],_0x329a85[_0x1bf637(0x14c)]]));for(const _0x50487c of Object[_0x1bf637(0x151)](_0x20dfa1['functions'])){_0x50487c[_0x1bf637(0x193)]&&_0x50487c[_0x1bf637(0x14c)]&&!_0x41708c[_0x1bf637(0x164)](_0x50487c[_0x1bf637(0x193)])&&_0x41708c[_0x1bf637(0x199)](_0x50487c[_0x1bf637(0x193)],_0x50487c['datasetCode']);}const _0x3343f6=await listDatasets(_0x236618),_0x14812d=new Map(_0x3343f6[_0x1bf637(0x171)](_0x22337e=>[_0x22337e['code'],_0x22337e]));return{'aliasToDatasetCode':_0x41708c,'datasetCodeToDataset':_0x14812d};}async function uploadSingleFunction(_0x378501,_0x263443,_0x12bc74,_0x2b609e){const _0x214290=a36_0x1a3051,_0x114955=await readFile(_0x263443[_0x214290(0x196)],'utf8'),_0x11b190=await computeFileHash(_0x263443[_0x214290(0x196)]),_0x4fdabf=_0x12bc74['functions'][_0x263443[_0x214290(0x154)]];if(_0x4fdabf?.[_0x214290(0x18d)]&&_0x4fdabf[_0x214290(0x187)]==null)throw CliErrors[_0x214290(0x15c)](_0x263443[_0x214290(0x154)]+_0x214290(0x14b));let _0x3e5d4c=extractScriptDescription(_0x114955);if(!_0x3e5d4c&&_0x4fdabf?.[_0x214290(0x18d)]){const _0x969ae9=await getBffScriptInfo(_0x4fdabf[_0x214290(0x18d)]);_0x3e5d4c=_0x969ae9[_0x214290(0x18c)]||undefined;}const _0x39e36f={'appCode':_0x378501,'functionName':_0x263443[_0x214290(0x14d)],'scriptType':_0x263443[_0x214290(0x16f)],'scriptContent':_0x114955};if(_0x4fdabf?.[_0x214290(0x18d)])_0x39e36f['id']=_0x4fdabf[_0x214290(0x18d)];if(_0x4fdabf?.[_0x214290(0x187)]!=null)_0x39e36f[_0x214290(0x187)]=_0x4fdabf[_0x214290(0x187)];if(_0x3e5d4c)_0x39e36f[_0x214290(0x18c)]=_0x3e5d4c;if(_0x263443[_0x214290(0x16f)]===_0x214290(0x169)){const _0x1852b4=_0x263443['alias'];if(!_0x1852b4||!_0x263443[_0x214290(0x167)]||!_0x263443[_0x214290(0x17f)])throw CliErrors[_0x214290(0x15c)](_0x214290(0x195)+_0x263443[_0x214290(0x154)]);const _0x1f229c=_0x2b609e[_0x214290(0x174)]['get'](_0x1852b4)??_0x4fdabf?.[_0x214290(0x14c)]??_0x1852b4,_0x39bf0f=_0x2b609e[_0x214290(0x15b)]['get'](_0x1f229c);if(!_0x39bf0f)throw CliErrors[_0x214290(0x15c)](_0x214290(0x158)+_0x1852b4+_0x214290(0x190)+('Run\x20`'+CLI_BIN_NAME+_0x214290(0x188)));_0x39e36f[_0x214290(0x16c)]=_0x39bf0f['id'],_0x39e36f['operationType']=_0x263443[_0x214290(0x167)],_0x39e36f[_0x214290(0x17f)]=_0x263443[_0x214290(0x17f)];}const _0x3d2163=await saveBffScript(_0x39e36f),_0x264ef0=_0x3d2163['id'],_0x3dfc75=_0x3d2163[_0x214290(0x19d)]??await getBffScriptInfo(_0x264ef0),_0x224655={'hash':_0x11b190,'remoteId':_0x264ef0,'version':_0x3dfc75[_0x214290(0x187)]};if(_0x263443['type']===_0x214290(0x169)){const _0x153b34=_0x263443['alias'],_0x5aec0d=_0x2b609e[_0x214290(0x174)][_0x214290(0x157)](_0x153b34)??_0x4fdabf?.['datasetCode']??_0x153b34;_0x2b609e[_0x214290(0x174)][_0x214290(0x164)](_0x153b34)?_0x224655[_0x214290(0x193)]=_0x153b34:_0x224655[_0x214290(0x193)]=_0x4fdabf?.['alias'],_0x224655[_0x214290(0x14c)]=_0x5aec0d,_0x224655['operationType']=_0x263443[_0x214290(0x167)],_0x224655[_0x214290(0x17f)]=_0x263443['functionNode'];}_0x12bc74[_0x214290(0x184)][_0x263443[_0x214290(0x154)]]=_0x224655;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x36df83,_0x4caaa8,_0x5a29b8){const _0x4f7fe1=a36_0x1a3051;if(_0x5a29b8[_0x4f7fe1(0x14f)]===0x0)return;for(let _0x249443=0x0;_0x249443<LOCK_SETTLE_RETRY_COUNT;_0x249443+=0x1){const _0x2677c5=await readBffLockFile(_0x36df83),_0x352325=_0x2677c5?.['apps']?.[_0x4caaa8]?.[_0x4f7fe1(0x184)]??{},_0x135848=_0x5a29b8[_0x4f7fe1(0x19f)](_0x2f434a=>!!_0x352325[_0x2f434a]?.['remoteId']);if(_0x135848)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4f7fe1(0x194)+_0x5a29b8[_0x4f7fe1(0x159)](',\x20')+'.');}
1
+ const a36_0x3c4933=a36_0x496b;(function(_0x46da19,_0x213add){const _0xb7b687=a36_0x496b,_0x12ea84=_0x46da19();while(!![]){try{const _0x39b3f7=-parseInt(_0xb7b687(0xc5))/0x1*(-parseInt(_0xb7b687(0xe5))/0x2)+parseInt(_0xb7b687(0xcf))/0x3+-parseInt(_0xb7b687(0xd3))/0x4+parseInt(_0xb7b687(0xda))/0x5+parseInt(_0xb7b687(0xef))/0x6+parseInt(_0xb7b687(0xf1))/0x7+-parseInt(_0xb7b687(0xf5))/0x8;if(_0x39b3f7===_0x213add)break;else _0x12ea84['push'](_0x12ea84['shift']());}catch(_0x995f02){_0x12ea84['push'](_0x12ea84['shift']());}}}(a36_0x479c,0xbf507));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';function a36_0x496b(_0x5492c7,_0x105d43){_0x5492c7=_0x5492c7-0xc5;const _0x479c0f=a36_0x479c();let _0x496ba1=_0x479c0f[_0x5492c7];return _0x496ba1;}function a36_0x479c(){const _0x9692b3=['map','create','2qTmYVb','write','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','operationType','type','\x20failed,\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','/api/management/library/scripts/save','utf8','1658976PFwWIe','\x20uploaded,\x20','2181011nrEvdI','functions','Push\x20local\x20BFF\x20scripts\x20to\x20remote','lastSync','15888024fkhsoy','runtime\x20cache\x20cleared','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x22.\x20','attempted','validation','set','datasetCode','parse','code','\x20skipped,\x20','some','every','aliasToDatasetCode','bff','POST','filter','hash',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','runtime\x20cache\x20not\x20needed','script','lockKey','get','boolean','filePath','Would\x20inspect\x20','version','unchanged','scriptsRoot','831507ceuEPC','toISOString','Lock\x20scope\x20for\x20app\x20\x22','apiDir','name','description','has','Force\x20push\x20ignoring\x20hash\x20protection','values','length','1588185FdurmZ','appCode','status','lockFilePath','1582656uAfrYs','stringify','string','apps','HOOK','push','alias','6081595wNWkfl','remoteId','join','Push\x20only\x20this\x20script\x20type','force','bool','str','functionNode','cleared'];a36_0x479c=function(){return _0x9692b3;};return a36_0x479c();}import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x3c4933(0x103),'command':a36_0x3c4933(0xd8),'description':a36_0x3c4933(0xf3),'risk':a36_0x3c4933(0xe6),'flags':[{'name':'type','type':a36_0x3c4933(0xd5),'description':a36_0x3c4933(0xdd),'enum':['COMMON','ENDPOINT',a36_0x3c4933(0xd7)]},{'name':a36_0x3c4933(0xc9),'type':a36_0x3c4933(0xd5),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a36_0x3c4933(0xde),'type':a36_0x3c4933(0x10c),'description':a36_0x3c4933(0xcc)}],async 'dryRun'(_0x1cd9c9){const _0x31d627=a36_0x3c4933,_0x685bf9=loadBffProjectConfig(_0x1cd9c9[_0x31d627(0xd0)]),_0x51c6fe=await readBffLockFile(_0x685bf9[_0x31d627(0xd2)]),{appLock:_0x206f21}=ensureLockScope(_0x51c6fe??createEmptyBffLock(),_0x1cd9c9[_0x31d627(0xd0)],_0x685bf9[_0x31d627(0x111)],'push'),_0x36c754=await getTargetFunctions(_0x685bf9,_0x1cd9c9),_0x5c5645=_0x1cd9c9[_0x31d627(0xdf)](_0x31d627(0xde)),_0x452ebb=[];for(const _0x553e88 of _0x36c754){const _0x264ff7=await computeFileHash(_0x553e88[_0x31d627(0x10d)]),_0x4f2664=_0x206f21[_0x31d627(0xf2)][_0x553e88[_0x31d627(0x10a)]],_0x2d3472=!!_0x4f2664&&_0x4f2664[_0x31d627(0x106)]===_0x264ff7;_0x452ebb[_0x31d627(0xd8)]({'lockKey':_0x553e88[_0x31d627(0x10a)],'filePath':_0x553e88['filePath'],'remoteId':_0x4f2664?.[_0x31d627(0xdb)]??null,'mode':_0x4f2664?.['remoteId']?'update':_0x31d627(0xe4),'status':!_0x5c5645&&_0x2d3472?_0x31d627(0x110):'would_push'});}return{'method':_0x31d627(0x104),'url':_0x31d627(0xed),'body':{'appCode':_0x1cd9c9[_0x31d627(0xd0)],'force':_0x5c5645,'files':_0x452ebb,'cacheClearAtRuntime':_0x452ebb['some'](_0x1c61b6=>_0x1c61b6[_0x31d627(0xd1)]==='would_push'),'cacheClearAtRuntimeTimes':_0x452ebb[_0x31d627(0x100)](_0x190e53=>_0x190e53[_0x31d627(0xd1)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x31d627(0x10e)+_0x452ebb[_0x31d627(0xce)]+_0x31d627(0xf7)};},async 'execute'(_0x2d8713){const _0x194bc7=a36_0x3c4933,_0x31da1d=loadBffProjectConfig(_0x2d8713[_0x194bc7(0xd0)]),_0x579955=await readBffLockFile(_0x31da1d[_0x194bc7(0xd2)]),{lockData:_0x2a5152,appLock:_0xf7478}=ensureLockScope(_0x579955??createEmptyBffLock(),_0x2d8713['appCode'],_0x31da1d['scriptsRoot'],_0x194bc7(0xd8)),_0x566cac=await getTargetFunctions(_0x31da1d,_0x2d8713);if(_0x566cac['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x412c33=_0x2d8713[_0x194bc7(0xdf)](_0x194bc7(0xde)),_0x5514d3=JSON[_0x194bc7(0xfd)](JSON[_0x194bc7(0xd4)](_0x2a5152)),_0x271671=_0x5514d3[_0x194bc7(0xd6)][_0x2d8713[_0x194bc7(0xd0)]];if(!_0x271671)throw new Error(_0x194bc7(0xc7)+_0x2d8713['appCode']+_0x194bc7(0xe7));const _0x2403a0=await buildHookMaps(_0x2d8713['appCode'],_0x2d8713[_0x194bc7(0xc8)],_0x566cac,_0x271671),_0x3ec550=[],_0xb0b53a=[],_0x36503c=[];for(const _0x26740c of _0x566cac){const _0x10927d=await computeFileHash(_0x26740c[_0x194bc7(0x10d)]),_0x1d5313=_0x271671[_0x194bc7(0xf2)][_0x26740c[_0x194bc7(0x10a)]];if(!_0x412c33&&_0x1d5313&&_0x1d5313['hash']===_0x10927d){_0xb0b53a[_0x194bc7(0xd8)]({'lockKey':_0x26740c[_0x194bc7(0x10a)],'reason':_0x194bc7(0x110)});continue;}try{await uploadSingleFunction(_0x2d8713['appCode'],_0x26740c,_0x271671,_0x2403a0);const _0xa93459=_0x271671[_0x194bc7(0xf2)][_0x26740c[_0x194bc7(0x10a)]];_0x3ec550[_0x194bc7(0xd8)]({'lockKey':_0x26740c['lockKey'],'remoteId':_0xa93459?.[_0x194bc7(0xdb)]??0x0});}catch(_0x191813){_0x36503c[_0x194bc7(0xd8)]({'lockKey':_0x26740c['lockKey'],'error':_0x191813 instanceof Error?_0x191813[_0x194bc7(0xe8)]:String(_0x191813)});}}_0x271671[_0x194bc7(0xf4)]=new Date()[_0x194bc7(0xc6)](),await writeBffLockFile(_0x31da1d[_0x194bc7(0xd2)],_0x5514d3),await waitForUploadedLockEntries(_0x31da1d['lockFilePath'],_0x2d8713['appCode'],_0x3ec550[_0x194bc7(0xe3)](_0x510674=>_0x510674[_0x194bc7(0x10a)]));let _0x22f207={'attempted':![],'cleared':![]};if(_0x3ec550[_0x194bc7(0xce)]>0x0)try{let _0x7f08a6='';for(let _0x578899=0x0;_0x578899<CACHE_CLEAR_ATTEMPTS;_0x578899+=0x1){_0x7f08a6=await clearBffScriptCache(),_0x578899<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x22f207={'attempted':!![],'cleared':!![],'message':_0x7f08a6||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x2f835e){_0x22f207={'attempted':!![],'cleared':![],'error':_0x2f835e instanceof Error?_0x2f835e[_0x194bc7(0xe8)]:String(_0x2f835e)};}const _0x3ec060=_0x36503c[_0x194bc7(0xce)]===0x0&&(_0x22f207[_0x194bc7(0xf9)]?_0x22f207[_0x194bc7(0xe2)]:!![]),_0x1e3b7c=_0x22f207['attempted']?_0x22f207[_0x194bc7(0xe2)]?_0x194bc7(0xf6):'runtime\x20cache\x20clear\x20failed':_0x194bc7(0x108);return{'ok':_0x3ec060,'data':{'uploaded':_0x3ec550,'skipped':_0xb0b53a,'failed':_0x36503c,'cacheClear':_0x22f207},'message':'Push\x20complete:\x20'+_0x3ec550[_0x194bc7(0xce)]+_0x194bc7(0xf0)+_0xb0b53a[_0x194bc7(0xce)]+_0x194bc7(0xff)+_0x36503c[_0x194bc7(0xce)]+_0x194bc7(0xeb)+_0x1e3b7c};}};async function getTargetFunctions(_0x4c63a7,_0x5d99f2){const _0x2e2ddd=a36_0x3c4933,_0x30dacc=_0x5d99f2[_0x2e2ddd(0xe0)](_0x2e2ddd(0xea)),_0x63a542=_0x5d99f2[_0x2e2ddd(0xe0)](_0x2e2ddd(0xc9)),_0x4b114b=normalizeBffType(_0x30dacc)??undefined;if(_0x63a542&&!_0x4b114b)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x597ea0=await scanLocalBffFunctions(_0x4c63a7,_0x4b114b);if(_0x63a542){const _0x47fbc8=_0x597ea0[_0x2e2ddd(0x105)](_0x495915=>_0x495915[_0x2e2ddd(0xc9)]===_0x63a542);if(_0x47fbc8[_0x2e2ddd(0xce)]===0x0)throw CliErrors[_0x2e2ddd(0xfa)]('Local\x20function\x20not\x20found:\x20'+_0x4b114b+'/'+_0x63a542);return _0x47fbc8;}return _0x597ea0;}async function buildHookMaps(_0x2aa700,_0x281ae9,_0x4991e0,_0x390dab){const _0x79517e=a36_0x3c4933,_0x5d3b9a=_0x4991e0['some'](_0x2d7cde=>_0x2d7cde['type']===_0x79517e(0xd7));if(!_0x5d3b9a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x328c92=loadAliasMap(_0x281ae9,undefined,resolveApiFilePath(_0x281ae9,_0x2aa700)),_0x536d87=new Map(_0x328c92['map'](_0x2ddc59=>[_0x2ddc59[_0x79517e(0xd9)],_0x2ddc59[_0x79517e(0xfc)]]));for(const _0x2ee356 of Object[_0x79517e(0xcd)](_0x390dab[_0x79517e(0xf2)])){_0x2ee356[_0x79517e(0xd9)]&&_0x2ee356[_0x79517e(0xfc)]&&!_0x536d87[_0x79517e(0xcb)](_0x2ee356[_0x79517e(0xd9)])&&_0x536d87[_0x79517e(0xfb)](_0x2ee356[_0x79517e(0xd9)],_0x2ee356[_0x79517e(0xfc)]);}const _0x37ec04=await listDatasets(_0x2aa700),_0x1bf28c=new Map(_0x37ec04[_0x79517e(0xe3)](_0x245764=>[_0x245764[_0x79517e(0xfe)],_0x245764]));return{'aliasToDatasetCode':_0x536d87,'datasetCodeToDataset':_0x1bf28c};}async function uploadSingleFunction(_0x401132,_0x22f729,_0x4d5bab,_0x3668bd){const _0x534923=a36_0x3c4933,_0x3dd7be=await readFile(_0x22f729[_0x534923(0x10d)],_0x534923(0xee)),_0x2de9e7=await computeFileHash(_0x22f729[_0x534923(0x10d)]),_0x172c44=_0x4d5bab['functions'][_0x22f729[_0x534923(0x10a)]];if(_0x172c44?.[_0x534923(0xdb)]&&_0x172c44[_0x534923(0x10f)]==null)throw CliErrors[_0x534923(0xfa)](_0x22f729['lockKey']+_0x534923(0x107));let _0x37d9f5=extractScriptDescription(_0x3dd7be);if(!_0x37d9f5&&_0x172c44?.[_0x534923(0xdb)]){const _0x398752=await getBffScriptInfo(_0x172c44[_0x534923(0xdb)]);_0x37d9f5=_0x398752[_0x534923(0xca)]||undefined;}const _0x1dec8f={'appCode':_0x401132,'functionName':_0x22f729[_0x534923(0xc9)],'scriptType':_0x22f729[_0x534923(0xea)],'scriptContent':_0x3dd7be};if(_0x172c44?.[_0x534923(0xdb)])_0x1dec8f['id']=_0x172c44[_0x534923(0xdb)];if(_0x172c44?.[_0x534923(0x10f)]!=null)_0x1dec8f[_0x534923(0x10f)]=_0x172c44['version'];if(_0x37d9f5)_0x1dec8f[_0x534923(0xca)]=_0x37d9f5;if(_0x22f729[_0x534923(0xea)]===_0x534923(0xd7)){const _0x2a1436=_0x22f729[_0x534923(0xd9)];if(!_0x2a1436||!_0x22f729[_0x534923(0xe9)]||!_0x22f729[_0x534923(0xe1)])throw CliErrors[_0x534923(0xfa)]('Incomplete\x20HOOK\x20path:\x20'+_0x22f729['lockKey']);const _0x34ae24=_0x3668bd[_0x534923(0x102)][_0x534923(0x10b)](_0x2a1436)??_0x172c44?.[_0x534923(0xfc)]??_0x2a1436,_0x19cb7e=_0x3668bd['datasetCodeToDataset'][_0x534923(0x10b)](_0x34ae24);if(!_0x19cb7e)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x2a1436+_0x534923(0xf8)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x1dec8f['datasetId']=_0x19cb7e['id'],_0x1dec8f[_0x534923(0xe9)]=_0x22f729['operationType'],_0x1dec8f[_0x534923(0xe1)]=_0x22f729[_0x534923(0xe1)];}const _0x80cbf3=await saveBffScript(_0x1dec8f),_0x139bb4=_0x80cbf3['id'],_0x302c05=_0x80cbf3[_0x534923(0x109)]??await getBffScriptInfo(_0x139bb4),_0x3b334d={'hash':_0x2de9e7,'remoteId':_0x139bb4,'version':_0x302c05[_0x534923(0x10f)]};if(_0x22f729[_0x534923(0xea)]==='HOOK'){const _0x188a1e=_0x22f729[_0x534923(0xd9)],_0x31e5fd=_0x3668bd[_0x534923(0x102)][_0x534923(0x10b)](_0x188a1e)??_0x172c44?.['datasetCode']??_0x188a1e;_0x3668bd[_0x534923(0x102)][_0x534923(0xcb)](_0x188a1e)?_0x3b334d[_0x534923(0xd9)]=_0x188a1e:_0x3b334d['alias']=_0x172c44?.['alias'],_0x3b334d[_0x534923(0xfc)]=_0x31e5fd,_0x3b334d[_0x534923(0xe9)]=_0x22f729[_0x534923(0xe9)],_0x3b334d['functionNode']=_0x22f729['functionNode'];}_0x4d5bab[_0x534923(0xf2)][_0x22f729[_0x534923(0x10a)]]=_0x3b334d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x48dfe1,_0x2a834c,_0x186106){const _0xfe95fe=a36_0x3c4933;if(_0x186106[_0xfe95fe(0xce)]===0x0)return;for(let _0xc95b9c=0x0;_0xc95b9c<LOCK_SETTLE_RETRY_COUNT;_0xc95b9c+=0x1){const _0x3c93f0=await readBffLockFile(_0x48dfe1),_0x5357e5=_0x3c93f0?.['apps']?.[_0x2a834c]?.[_0xfe95fe(0xf2)]??{},_0x26a618=_0x186106[_0xfe95fe(0x101)](_0x13c552=>!!_0x5357e5[_0x13c552]?.['remoteId']);if(_0x26a618)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xfe95fe(0xec)+_0x186106[_0xfe95fe(0xdc)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a37_0x25104b=a37_0x57ef;(function(_0x27b3d4,_0x1037b3){const _0x471e6a=a37_0x57ef,_0x15c90c=_0x27b3d4();while(!![]){try{const _0x3b019d=-parseInt(_0x471e6a(0xfe))/0x1*(-parseInt(_0x471e6a(0x118))/0x2)+-parseInt(_0x471e6a(0x10a))/0x3*(parseInt(_0x471e6a(0x109))/0x4)+-parseInt(_0x471e6a(0x102))/0x5+-parseInt(_0x471e6a(0x112))/0x6*(-parseInt(_0x471e6a(0x115))/0x7)+-parseInt(_0x471e6a(0x113))/0x8+parseInt(_0x471e6a(0xfd))/0x9*(parseInt(_0x471e6a(0x101))/0xa)+-parseInt(_0x471e6a(0x10f))/0xb*(-parseInt(_0x471e6a(0x105))/0xc);if(_0x3b019d===_0x1037b3)break;else _0x15c90c['push'](_0x15c90c['shift']());}catch(_0x31b75a){_0x15c90c['push'](_0x15c90c['shift']());}}}(a37_0xf364,0xae2b6));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_0xf364(){const _0x3fb133=['11cAcneg','datasetCode','read','56664UYaYQu','3204120tExZkC','lockKey','805CTMDBr','has','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','134mREGmC','length','bff','boolean','push','bool','alias','scriptsRoot','appCode','7209VgvHPS','2779LXmuaK','\x20added,\x20','apiDir','3310tcQQCl','2195070abAQbq','status','\x20modified,\x20','1971504qeFzAw','lockFilePath','remote','\x20unchanged','12MhzMNk','148749qKKFbp','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','functions','hash','\x20remote-only'];a37_0xf364=function(){return _0x3fb133;};return a37_0xf364();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x57ef(_0x33152e,_0x1e87b4){_0x33152e=_0x33152e-0xfb;const _0xf3646a=a37_0xf364();let _0x57ef8c=_0xf3646a[_0x33152e];return _0x57ef8c;}export const bffStatus={'service':a37_0x25104b(0x11a),'command':a37_0x25104b(0x103),'description':a37_0x25104b(0x10b),'risk':a37_0x25104b(0x111),'flags':[{'name':a37_0x25104b(0x107),'type':a37_0x25104b(0x11b),'description':a37_0x25104b(0x117)}],async 'execute'(_0x42ebc2){const _0x29d792=a37_0x25104b,_0x185a26=loadBffProjectConfig(_0x42ebc2['appCode']),_0x46216e=await readBffLockFile(_0x185a26[_0x29d792(0x106)]),{appLock:_0x3c6a34}=ensureLockScope(_0x46216e??createEmptyBffLock(),_0x42ebc2[_0x29d792(0xfc)],_0x185a26[_0x29d792(0xfb)],'status'),_0x3c6dcb=await scanLocalBffFunctions(_0x185a26),_0x2304ce=[],_0xeaae2f=[],_0x70c5=[];for(const _0x533f31 of _0x3c6dcb){const _0x28b0a6=await computeFileHash(_0x533f31['filePath']),_0x5d14ee=_0x3c6a34[_0x29d792(0x10c)][_0x533f31[_0x29d792(0x114)]];if(!_0x5d14ee)_0x2304ce[_0x29d792(0x11c)](_0x533f31['lockKey']);else _0x5d14ee[_0x29d792(0x10d)]!==_0x28b0a6?_0xeaae2f[_0x29d792(0x11c)](_0x533f31[_0x29d792(0x114)]):_0x70c5[_0x29d792(0x11c)](_0x533f31[_0x29d792(0x114)]);}const _0x1f86ec=[];if(_0x42ebc2[_0x29d792(0x11d)](_0x29d792(0x107))){const _0x3dfe77=loadAliasMap(_0x42ebc2[_0x29d792(0x100)],undefined,resolveApiFilePath(_0x42ebc2[_0x29d792(0x100)],_0x42ebc2[_0x29d792(0xfc)])),_0x2921f6=new Map(_0x3dfe77['map'](_0x19378c=>[_0x19378c[_0x29d792(0x110)],_0x19378c[_0x29d792(0x11e)]])),[_0xbcbc7d,_0x31e0cd]=await Promise['all']([listBffScripts(_0x42ebc2[_0x29d792(0xfc)]),getBffScriptStatistics(_0x42ebc2[_0x29d792(0xfc)])]),_0x498fb1=createHookLocationMap(_0x31e0cd),_0x4dc296=new Set(_0x3c6dcb['map'](_0x262ec3=>_0x262ec3[_0x29d792(0x114)]));for(const _0x227524 of _0xbcbc7d){const _0x418ae6=resolveRemoteScriptTarget(_0x185a26,_0x227524,_0x498fb1,_0x3c6a34[_0x29d792(0x10c)],_0x2921f6);_0x418ae6&&!_0x4dc296[_0x29d792(0x116)](_0x418ae6[_0x29d792(0x114)])&&_0x1f86ec['push'](_0x418ae6[_0x29d792(0x114)]);}}const _0x326f95=_0x2304ce[_0x29d792(0x119)]===0x0&&_0xeaae2f['length']===0x0&&_0x1f86ec['length']===0x0;return{'ok':!![],'data':{'added':_0x2304ce,'modified':_0xeaae2f,'unchanged':_0x70c5,'remoteOnly':_0x1f86ec},'message':_0x326f95?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x2304ce[_0x29d792(0x119)]+_0x29d792(0xff)+_0xeaae2f['length']+_0x29d792(0x104)+_0x70c5['length']+_0x29d792(0x108)+(_0x1f86ec[_0x29d792(0x119)]>0x0?',\x20'+_0x1f86ec[_0x29d792(0x119)]+_0x29d792(0x10e):'')};}};
1
+ const a37_0x18c580=a37_0x18fb;(function(_0x5d3b80,_0x2266d7){const _0x3ab86e=a37_0x18fb,_0x5f0645=_0x5d3b80();while(!![]){try{const _0x49f5e6=parseInt(_0x3ab86e(0x145))/0x1*(parseInt(_0x3ab86e(0x151))/0x2)+parseInt(_0x3ab86e(0x14c))/0x3*(-parseInt(_0x3ab86e(0x146))/0x4)+-parseInt(_0x3ab86e(0x152))/0x5*(-parseInt(_0x3ab86e(0x155))/0x6)+-parseInt(_0x3ab86e(0x14e))/0x7+-parseInt(_0x3ab86e(0x153))/0x8*(-parseInt(_0x3ab86e(0x13f))/0x9)+parseInt(_0x3ab86e(0x148))/0xa*(-parseInt(_0x3ab86e(0x13b))/0xb)+-parseInt(_0x3ab86e(0x137))/0xc*(-parseInt(_0x3ab86e(0x150))/0xd);if(_0x49f5e6===_0x2266d7)break;else _0x5f0645['push'](_0x5f0645['shift']());}catch(_0xe131d3){_0x5f0645['push'](_0x5f0645['shift']());}}}(a37_0x5271,0x8b941));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a37_0x5271(){const _0x1dfa5d=['1475698WQrcCN','apiDir','6664138WFHuKK','38VEoruQ','4615frcCwI','2579608fcawYj','length','1086HPnkeX','push','24cFKsXM','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','status','lockKey','22HLotJy','scriptsRoot','filePath','datasetCode','18iqlXOD','appCode','\x20added,\x20','bool','map','All\x20BFF\x20scripts\x20are\x20in\x20sync.','4423xBCiDg','87972ODYCvq','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','2504650jFoaNS','\x20modified,\x20','alias','remote','87UbkaVy','boolean'];a37_0x5271=function(){return _0x1dfa5d;};return a37_0x5271();}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_0x18fb(_0x9a7c34,_0xdc4f1){_0x9a7c34=_0x9a7c34-0x137;const _0x52716c=a37_0x5271();let _0x18fb77=_0x52716c[_0x9a7c34];return _0x18fb77;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a37_0x18c580(0x139),'description':a37_0x18c580(0x147),'risk':'read','flags':[{'name':a37_0x18c580(0x14b),'type':a37_0x18c580(0x14d),'description':a37_0x18c580(0x138)}],async 'execute'(_0x232539){const _0x11f53f=a37_0x18c580,_0x242458=loadBffProjectConfig(_0x232539[_0x11f53f(0x140)]),_0x6e070a=await readBffLockFile(_0x242458['lockFilePath']),{appLock:_0x151c9f}=ensureLockScope(_0x6e070a??createEmptyBffLock(),_0x232539['appCode'],_0x242458[_0x11f53f(0x13c)],_0x11f53f(0x139)),_0x58fa0b=await scanLocalBffFunctions(_0x242458),_0x4425ee=[],_0x51d918=[],_0x2658c4=[];for(const _0x4b6cfe of _0x58fa0b){const _0x5a08a3=await computeFileHash(_0x4b6cfe[_0x11f53f(0x13d)]),_0x1fcb91=_0x151c9f['functions'][_0x4b6cfe[_0x11f53f(0x13a)]];if(!_0x1fcb91)_0x4425ee['push'](_0x4b6cfe['lockKey']);else _0x1fcb91['hash']!==_0x5a08a3?_0x51d918[_0x11f53f(0x156)](_0x4b6cfe['lockKey']):_0x2658c4['push'](_0x4b6cfe[_0x11f53f(0x13a)]);}const _0x49466d=[];if(_0x232539[_0x11f53f(0x142)]('remote')){const _0x125c7a=loadAliasMap(_0x232539[_0x11f53f(0x14f)],undefined,resolveApiFilePath(_0x232539['apiDir'],_0x232539['appCode'])),_0x453cfe=new Map(_0x125c7a['map'](_0x1bad4d=>[_0x1bad4d[_0x11f53f(0x13e)],_0x1bad4d[_0x11f53f(0x14a)]])),[_0x482887,_0x33a440]=await Promise['all']([listBffScripts(_0x232539[_0x11f53f(0x140)]),getBffScriptStatistics(_0x232539[_0x11f53f(0x140)])]),_0xd932b6=createHookLocationMap(_0x33a440),_0x54879c=new Set(_0x58fa0b[_0x11f53f(0x143)](_0x2cdffe=>_0x2cdffe[_0x11f53f(0x13a)]));for(const _0x4fba53 of _0x482887){const _0x1e5d4a=resolveRemoteScriptTarget(_0x242458,_0x4fba53,_0xd932b6,_0x151c9f['functions'],_0x453cfe);_0x1e5d4a&&!_0x54879c['has'](_0x1e5d4a[_0x11f53f(0x13a)])&&_0x49466d[_0x11f53f(0x156)](_0x1e5d4a[_0x11f53f(0x13a)]);}}const _0x54512f=_0x4425ee[_0x11f53f(0x154)]===0x0&&_0x51d918[_0x11f53f(0x154)]===0x0&&_0x49466d[_0x11f53f(0x154)]===0x0;return{'ok':!![],'data':{'added':_0x4425ee,'modified':_0x51d918,'unchanged':_0x2658c4,'remoteOnly':_0x49466d},'message':_0x54512f?_0x11f53f(0x144):_0x4425ee['length']+_0x11f53f(0x141)+_0x51d918[_0x11f53f(0x154)]+_0x11f53f(0x149)+_0x2658c4[_0x11f53f(0x154)]+'\x20unchanged'+(_0x49466d['length']>0x0?',\x20'+_0x49466d[_0x11f53f(0x154)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a38_0x3d1ac6=a38_0x11fa;(function(_0x166aaf,_0xf9c95b){const _0x509205=a38_0x11fa,_0x1e5bbb=_0x166aaf();while(!![]){try{const _0x4219e9=parseInt(_0x509205(0x155))/0x1+parseInt(_0x509205(0x143))/0x2*(parseInt(_0x509205(0x147))/0x3)+-parseInt(_0x509205(0x150))/0x4+-parseInt(_0x509205(0x13e))/0x5+-parseInt(_0x509205(0x13c))/0x6*(parseInt(_0x509205(0x140))/0x7)+parseInt(_0x509205(0x14e))/0x8+parseInt(_0x509205(0x142))/0x9*(-parseInt(_0x509205(0x156))/0xa);if(_0x4219e9===_0xf9c95b)break;else _0x1e5bbb['push'](_0x1e5bbb['shift']());}catch(_0x1720f8){_0x1e5bbb['push'](_0x1e5bbb['shift']());}}}(a38_0x53f4,0x84ecb));function a38_0x11fa(_0x4ff5f0,_0x36820c){_0x4ff5f0=_0x4ff5f0-0x13c;const _0x53f4cb=a38_0x53f4();let _0x11fa3d=_0x53f4cb[_0x4ff5f0];return _0x11fa3d;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a38_0x53f4(){const _0x46a1b4=['install','493865sXPcYH','read','7iWqwIp','installedPath','117cMHrrK','1579874SlunoV','\x20installed','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','3tpBAiS','cwd','inherit',']:\x20','nonInteractive','changed','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','5599088lNHgUU','cli-skill-install','3006952tkrKrg','CLI\x20Built-in\x20Skill\x20','log','\x20via\x20skills@latest','Built-in\x20Skill\x20install\x20failed\x20[','1069778CnHXAX','655480oLBMlZ','skillVersion','code','apiError','1875042fpeWzf'];a38_0x53f4=function(){return _0x46a1b4;};return a38_0x53f4();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a38_0x3d1ac6(0x13d),'description':a38_0x3d1ac6(0x14d),'risk':a38_0x3d1ac6(0x13f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x44432e){const _0xd2687e=a38_0x3d1ac6;logger['setLogPath'](process[_0xd2687e(0x148)]()),logger['info'](_0xd2687e(0x14f),_0xd2687e(0x146));const _0x5157c7=installBuiltinSkill({'stdio':_0x44432e[_0xd2687e(0x14b)]?'pipe':_0xd2687e(0x149)});if(!_0x5157c7['ok'])throw CliErrors[_0xd2687e(0x159)](_0xd2687e(0x154)+_0x5157c7[_0xd2687e(0x158)]+_0xd2687e(0x14a)+(_0x5157c7['error']||'unknown'),_0xd2687e(0x145)+_0x5157c7['repairCommand']);return console[_0xd2687e(0x152)](_0x5157c7[_0xd2687e(0x14c)]?_0xd2687e(0x151)+_0x5157c7[_0xd2687e(0x157)]+_0xd2687e(0x144)+(_0x5157c7[_0xd2687e(0x141)]?'\x20at\x20'+_0x5157c7[_0xd2687e(0x141)]:_0xd2687e(0x153)):'CLI\x20Built-in\x20Skill\x20'+_0x5157c7[_0xd2687e(0x157)]+'\x20is\x20already\x20current'+(_0x5157c7['installedPath']?'\x20at\x20'+_0x5157c7[_0xd2687e(0x141)]:'')),{'ok':!![]};}}];
1
+ function a38_0x32eb(_0x518441,_0xe9e992){_0x518441=_0x518441-0x85;const _0x38e4cb=a38_0x38e4();let _0x32eb19=_0x38e4cb[_0x518441];return _0x32eb19;}const a38_0x4e2b1f=a38_0x32eb;(function(_0x246afb,_0x263560){const _0x35738c=a38_0x32eb,_0x44c2e3=_0x246afb();while(!![]){try{const _0x22e900=parseInt(_0x35738c(0x9e))/0x1*(parseInt(_0x35738c(0x88))/0x2)+-parseInt(_0x35738c(0xa6))/0x3*(parseInt(_0x35738c(0x8f))/0x4)+parseInt(_0x35738c(0x95))/0x5+parseInt(_0x35738c(0x8d))/0x6+parseInt(_0x35738c(0x98))/0x7*(-parseInt(_0x35738c(0x9f))/0x8)+-parseInt(_0x35738c(0x99))/0x9*(parseInt(_0x35738c(0x89))/0xa)+-parseInt(_0x35738c(0x9d))/0xb;if(_0x22e900===_0x263560)break;else _0x44c2e3['push'](_0x44c2e3['shift']());}catch(_0x706396){_0x44c2e3['push'](_0x44c2e3['shift']());}}}(a38_0x38e4,0xcc2a4));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x38e4(){const _0x139e38=['installedPath','changed','code','\x20is\x20already\x20current','pipe','4584920vnhRPS','install','read','184345mmDlyn','99AohbtE','\x20at\x20','setLogPath','unknown','1643444ZFKaye','13765dhhbJN','8qLUETe','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','error','nonInteractive','skillVersion','CLI\x20Built-in\x20Skill\x20','repairCommand','290859ReBStb','info','cli-skill','apiError','138LctWHe','668670eTYAdS','cwd','inherit','log','3356628yvHruz','\x20via\x20skills@latest','28zjfeQg'];a38_0x38e4=function(){return _0x139e38;};return a38_0x38e4();}export const cliSkillDefinitions=[{'service':a38_0x4e2b1f(0x86),'command':a38_0x4e2b1f(0x96),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a38_0x4e2b1f(0x97),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5107e0){const _0x11f01c=a38_0x4e2b1f;logger[_0x11f01c(0x9b)](process[_0x11f01c(0x8a)]()),logger[_0x11f01c(0x85)]('cli-skill-install',_0x11f01c(0xa0));const _0x368316=installBuiltinSkill({'stdio':_0x5107e0[_0x11f01c(0xa2)]?_0x11f01c(0x94):_0x11f01c(0x8b)});if(!_0x368316['ok'])throw CliErrors[_0x11f01c(0x87)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x368316[_0x11f01c(0x92)]+']:\x20'+(_0x368316[_0x11f01c(0xa1)]||_0x11f01c(0x9c)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x368316[_0x11f01c(0xa5)]);return console[_0x11f01c(0x8c)](_0x368316[_0x11f01c(0x91)]?_0x11f01c(0xa4)+_0x368316[_0x11f01c(0xa3)]+'\x20installed'+(_0x368316[_0x11f01c(0x90)]?'\x20at\x20'+_0x368316['installedPath']:_0x11f01c(0x8e)):'CLI\x20Built-in\x20Skill\x20'+_0x368316[_0x11f01c(0xa3)]+_0x11f01c(0x93)+(_0x368316[_0x11f01c(0x90)]?_0x11f01c(0x9a)+_0x368316[_0x11f01c(0x90)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x53d7f4=a39_0x4fb2;(function(_0x587e49,_0x4daba4){const _0x47d790=a39_0x4fb2,_0x28553c=_0x587e49();while(!![]){try{const _0x1a4a90=parseInt(_0x47d790(0x1a6))/0x1*(parseInt(_0x47d790(0x187))/0x2)+-parseInt(_0x47d790(0x189))/0x3+-parseInt(_0x47d790(0x18a))/0x4+-parseInt(_0x47d790(0x15b))/0x5*(parseInt(_0x47d790(0x16e))/0x6)+-parseInt(_0x47d790(0x17a))/0x7+-parseInt(_0x47d790(0x18c))/0x8*(parseInt(_0x47d790(0x173))/0x9)+-parseInt(_0x47d790(0x18e))/0xa*(-parseInt(_0x47d790(0x15d))/0xb);if(_0x1a4a90===_0x4daba4)break;else _0x28553c['push'](_0x28553c['shift']());}catch(_0x9575e9){_0x28553c['push'](_0x28553c['shift']());}}}(a39_0x37c7,0x827fd));import a39_0x51a315 from'chalk';import a39_0x1fa50c from'ora';import a39_0x3d83ad from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';function a39_0x37c7(){const _0x4a91cf=['Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','timeout','4042842SZVxaQ','https://registry.npmjs.org/-/package/','npm','Checking\x20CLI\x20Built-in\x20Skill...','error','2313UONMzX','\x20\x20Run\x20manually:\x20','expected\x20','toLowerCase','Update\x20available:\x20','repairCommand','\x20\x20Try\x20manually:\x20','3499993hMsAmt','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','green','/dist-tags','trim','run','log','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Already\x20on\x20requested\x20version\x20(v','skillVersion','latest','string','\x20→\x20','264356adVayg',',\x20found\x20','1826817wblrkx','1980996aOgQws','start','10216ugespp','warn','247120IeVZoA','Updating\x20via\x20','yellow','state','succeed','fromEntries','json','filter','\x20\x20CLI\x20Built-in\x20Skill\x20','message','Checking\x20for\x20updates...','beta','map','version','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','str','validation','length',']:\x20','source','info','gray','fail','Invalid\x20version:\x20','6ATeYpd','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','bun','object','\x20install\x20-g\x20','red','Beta\x20version:\x20','5oxMjbx','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','1045kDSxOr','valid',',\x20state\x20','Version\x20comparison\x20failed','unknown','\x20is\x20up\x20to\x20date.','update','bool','...','includes','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','current','@latest','entries','\x20cli-skill\x20install'];a39_0x37c7=function(){return _0x4a91cf;};return a39_0x37c7();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x222642=a39_0x4fb2;return GIT_COMMIT!==_0x222642(0x161)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4cd760=a39_0x4fb2,_0x5c16f3=process['execPath'][_0x4cd760(0x176)]();if(_0x5c16f3[_0x4cd760(0x166)](_0x4cd760(0x1a8)))return _0x4cd760(0x1a8);return _0x4cd760(0x170);}const updateFlags=[{'name':a39_0x53d7f4(0x199),'type':'boolean','description':a39_0x53d7f4(0x167),'default':![]},{'name':a39_0x53d7f4(0x19b),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x5148d0){const _0x190dff=a39_0x53d7f4;return _0x5148d0[_0x190dff(0x19d)]('version')['trim']();}async function validateUpdateFlags(_0x5a0366){const _0x18efc3=a39_0x53d7f4,_0x436eec=_0x5a0366[_0x18efc3(0x164)](_0x18efc3(0x199)),_0x54ee7b=getRequestedVersion(_0x5a0366);if(_0x436eec&&_0x54ee7b)throw CliErrors[_0x18efc3(0x19e)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x54ee7b&&!a39_0x3d83ad[_0x18efc3(0x15e)](_0x54ee7b))throw CliErrors['validation'](_0x18efc3(0x1a5)+_0x54ee7b,_0x18efc3(0x15c));}async function fetchNpmDistTags(){const _0xdd2fdd=a39_0x53d7f4;try{const _0x24bc3a=await fetch(_0xdd2fdd(0x16f)+encodeURIComponent(NPM_PACKAGE_NAME)+_0xdd2fdd(0x17d),{'signal':AbortSignal[_0xdd2fdd(0x16d)](0x2710)});if(!_0x24bc3a['ok'])return null;const _0x2fa65e=await _0x24bc3a[_0xdd2fdd(0x194)]();if(!_0x2fa65e||typeof _0x2fa65e!==_0xdd2fdd(0x1a9))return null;return Object[_0xdd2fdd(0x193)](Object[_0xdd2fdd(0x16a)](_0x2fa65e)[_0xdd2fdd(0x195)](([,_0x5c5efa])=>typeof _0x5c5efa===_0xdd2fdd(0x185)&&_0x5c5efa[_0xdd2fdd(0x17e)]()[_0xdd2fdd(0x19f)]>0x0)[_0xdd2fdd(0x19a)](([_0x3a4ad2,_0x20f1b8])=>[_0x3a4ad2,String(_0x20f1b8)[_0xdd2fdd(0x17e)]()]));}catch{return null;}}function a39_0x4fb2(_0x57497a,_0x3ce2c1){_0x57497a=_0x57497a-0x15a;const _0x37c72d=a39_0x37c7();let _0x4fb22f=_0x37c72d[_0x57497a];return _0x4fb22f;}async function fetchNpmDistTagVersion(_0x481adc){const _0x41e528=await fetchNpmDistTags();return _0x41e528?.[_0x481adc]??null;}async function fetchLatestVersion(){const _0x44fe59=a39_0x53d7f4;return fetchNpmDistTagVersion(_0x44fe59(0x184));}async function resolveTargetVersion(_0x289de9){const _0x4c8e3e=a39_0x53d7f4,_0x22131a=getRequestedVersion(_0x289de9);if(_0x22131a)return{'version':_0x22131a,'source':_0x4c8e3e(0x19b)};if(_0x289de9[_0x4c8e3e(0x164)](_0x4c8e3e(0x199))){const _0x42352e=await fetchNpmDistTagVersion(_0x4c8e3e(0x199));if(!_0x42352e)return null;return{'version':_0x42352e,'source':_0x4c8e3e(0x199)};}const _0x5a8b0d=await fetchLatestVersion();if(!_0x5a8b0d)return null;return{'version':_0x5a8b0d,'source':_0x4c8e3e(0x184)};}function shouldInstallTarget(_0x264bcf,_0xf46965){const _0x571c88=a39_0x53d7f4;if(_0xf46965[_0x571c88(0x1a1)]===_0x571c88(0x19b)||_0xf46965[_0x571c88(0x1a1)]==='beta')return!a39_0x3d83ad['eq'](_0x264bcf,_0xf46965['version']);return a39_0x3d83ad['lt'](_0x264bcf,_0xf46965[_0x571c88(0x19b)]);}function getInstallPlanLabel(_0xcf00b6,_0x42cb53){const _0xf337d8=a39_0x53d7f4;switch(_0x42cb53[_0xf337d8(0x1a1)]){case'beta':return _0xf337d8(0x15a)+a39_0x51a315[_0xf337d8(0x190)](_0xcf00b6)+_0xf337d8(0x186)+a39_0x51a315[_0xf337d8(0x17c)](_0x42cb53[_0xf337d8(0x19b)]);case'version':return'Requested\x20version:\x20'+a39_0x51a315[_0xf337d8(0x190)](_0xcf00b6)+_0xf337d8(0x186)+a39_0x51a315[_0xf337d8(0x17c)](_0x42cb53[_0xf337d8(0x19b)]);case'latest':default:return _0xf337d8(0x177)+a39_0x51a315[_0xf337d8(0x190)](_0xcf00b6)+_0xf337d8(0x186)+a39_0x51a315[_0xf337d8(0x17c)](_0x42cb53[_0xf337d8(0x19b)]);}}function repairCurrentBuiltinSkill(){const _0x3d1457=a39_0x53d7f4;console[_0x3d1457(0x180)](a39_0x51a315[_0x3d1457(0x1a3)](_0x3d1457(0x171)));const _0x537342=installBuiltinSkill();if(_0x537342['ok'])return console[_0x3d1457(0x180)](a39_0x51a315[_0x3d1457(0x1a3)](_0x3d1457(0x196)+_0x537342[_0x3d1457(0x183)]+_0x3d1457(0x162))),!![];return console[_0x3d1457(0x18d)](a39_0x51a315[_0x3d1457(0x190)](_0x3d1457(0x19c)+_0x537342['code']+_0x3d1457(0x1a0)+(_0x537342['error']||_0x3d1457(0x161)))),console[_0x3d1457(0x180)](a39_0x51a315[_0x3d1457(0x1a3)](_0x3d1457(0x174)+CLI_BIN_NAME+_0x3d1457(0x16b))),![];}function verifyUpdatedBuiltinSkill(_0x17a3c5){const _0x182432=a39_0x53d7f4,_0xa43758=inspectInstalledBuiltinSkillVersion(_0x17a3c5);if(_0xa43758[_0x182432(0x191)]===_0x182432(0x168))return console[_0x182432(0x180)](a39_0x51a315[_0x182432(0x1a3)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x17a3c5+_0x182432(0x162))),!![];const _0x14bd0d=_0xa43758['skillVersion']?'expected\x20'+_0x17a3c5+_0x182432(0x188)+_0xa43758[_0x182432(0x183)]:_0x182432(0x175)+_0x17a3c5+_0x182432(0x15f)+_0xa43758[_0x182432(0x191)];return console['warn'](a39_0x51a315[_0x182432(0x190)](_0x182432(0x17b)+_0x14bd0d)),console[_0x182432(0x180)](a39_0x51a315[_0x182432(0x1a3)](_0x182432(0x174)+_0xa43758[_0x182432(0x178)])),![];}async function execute(_0x3565ea){const _0x9d50d8=a39_0x53d7f4;await validateUpdateFlags(_0x3565ea);const _0x210544=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x210544);const _0x5bb30b=a39_0x1fa50c(_0x9d50d8(0x198))[_0x9d50d8(0x18b)](),_0x2fad04=await resolveTargetVersion(_0x3565ea);if(!_0x2fad04){const _0x44c4a8=_0x3565ea['bool'](_0x9d50d8(0x199))?_0x9d50d8(0x181):_0x9d50d8(0x16c);return _0x5bb30b[_0x9d50d8(0x1a4)](_0x44c4a8),console[_0x9d50d8(0x180)](a39_0x51a315['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x9d50d8(0x169))),{'ok':![],'message':_0x44c4a8};}const _0x1e4935=a39_0x3d83ad[_0x9d50d8(0x15e)](VERSION),_0x35f24e=a39_0x3d83ad[_0x9d50d8(0x15e)](_0x2fad04[_0x9d50d8(0x19b)]);if(!_0x1e4935||!_0x35f24e)return _0x5bb30b[_0x9d50d8(0x1a4)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x9d50d8(0x160)};if(!shouldInstallTarget(_0x1e4935,_0x2fad04)){const _0x4c6e62=_0x2fad04[_0x9d50d8(0x1a1)]===_0x9d50d8(0x19b)?_0x9d50d8(0x182)+_0x2fad04[_0x9d50d8(0x19b)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x2fad04[_0x9d50d8(0x19b)]+')';return _0x5bb30b[_0x9d50d8(0x192)](_0x4c6e62),{'ok':repairCurrentBuiltinSkill()};}_0x5bb30b[_0x9d50d8(0x1a2)](getInstallPlanLabel(_0x210544,_0x2fad04));const _0x4a8c65=detectPackageManager(),_0x2ca90a=_0x4a8c65===_0x9d50d8(0x170)?resolveNpmBin(_0x9d50d8(0x170)):_0x4a8c65,_0x3fae20=a39_0x1fa50c(_0x9d50d8(0x18f)+_0x4a8c65+_0x9d50d8(0x165))['start']();try{return await execa(_0x2ca90a,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2fad04[_0x9d50d8(0x19b)]],{'stdio':'pipe'}),_0x3fae20[_0x9d50d8(0x192)]('Updated\x20to\x20v'+_0x2fad04['version']),console[_0x9d50d8(0x180)](a39_0x51a315[_0x9d50d8(0x1a3)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0x2fad04['version'])};}catch(_0xb05ecf){return _0x3fae20[_0x9d50d8(0x1a4)]('Update\x20failed'),console[_0x9d50d8(0x172)](a39_0x51a315[_0x9d50d8(0x1ab)]('\x20\x20'+_0xb05ecf[_0x9d50d8(0x197)])),console[_0x9d50d8(0x180)](a39_0x51a315['gray'](_0x9d50d8(0x179)+_0x4a8c65+_0x9d50d8(0x1aa)+NPM_PACKAGE_NAME+'@'+_0x2fad04['version'])),{'ok':![],'message':_0xb05ecf['message']};}}export const updateDefinition={'service':a39_0x53d7f4(0x163),'command':a39_0x53d7f4(0x17f),'description':a39_0x53d7f4(0x1a7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x4ca748=a39_0x5dc6;(function(_0x266894,_0x2bd5f1){const _0x2ada9c=a39_0x5dc6,_0x54727e=_0x266894();while(!![]){try{const _0x5a77c7=parseInt(_0x2ada9c(0x14c))/0x1*(parseInt(_0x2ada9c(0x18b))/0x2)+parseInt(_0x2ada9c(0x153))/0x3+-parseInt(_0x2ada9c(0x152))/0x4*(parseInt(_0x2ada9c(0x156))/0x5)+parseInt(_0x2ada9c(0x147))/0x6*(-parseInt(_0x2ada9c(0x15d))/0x7)+parseInt(_0x2ada9c(0x167))/0x8+-parseInt(_0x2ada9c(0x15f))/0x9+-parseInt(_0x2ada9c(0x150))/0xa*(parseInt(_0x2ada9c(0x17b))/0xb);if(_0x5a77c7===_0x2bd5f1)break;else _0x54727e['push'](_0x54727e['shift']());}catch(_0x5cadf7){_0x54727e['push'](_0x54727e['shift']());}}}(a39_0x270b,0x28632));import a39_0x176489 from'chalk';import a39_0x4079e9 from'ora';import a39_0x416ed3 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';function a39_0x270b(){const _0x574465=['timeout','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','yellow','unknown','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','string','\x20\x20Try\x20manually:\x20','Invalid\x20version:\x20','boolean','pipe','\x20is\x20up\x20to\x20date.','length','valid','12854QXtpbi','bool','str','repairCommand','validation','\x20install\x20-g\x20','fromEntries','update','skillVersion','Updating\x20via\x20','start','964686iKRnsx','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Already\x20on\x20requested\x20version\x20(v','bun','info','28yyapdq',']:\x20','state','\x20\x20Run\x20manually:\x20','980dNmEVv','includes','24zhOKkK','509841YsNfTJ','...','succeed','9205HztABM','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','filter','source','version','warn','log','7RmqqTv','gray','498789OSNCDV','latest','entries','trim','\x20→\x20','install','npm','execPath','720840utfmQJ','Updated\x20to\x20v','green','red',',\x20state\x20','beta','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.',',\x20found\x20','map','object','slice','message','Checking\x20CLI\x20Built-in\x20Skill...','Beta\x20version:\x20','Update\x20available:\x20','expected\x20','run','fail','Update\x20failed','@latest','5313tWWFSs','Checking\x20for\x20updates...'];a39_0x270b=function(){return _0x574465;};return a39_0x270b();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x473bae=a39_0x5dc6;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x473bae(0x171)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1957b4=a39_0x5dc6,_0x32d6d3=process[_0x1957b4(0x166)]['toLowerCase']();if(_0x32d6d3[_0x1957b4(0x151)]('bun'))return _0x1957b4(0x14a);return _0x1957b4(0x165);}const updateFlags=[{'name':a39_0x4ca748(0x16c),'type':a39_0x4ca748(0x186),'description':a39_0x4ca748(0x148),'default':![]},{'name':a39_0x4ca748(0x15a),'type':a39_0x4ca748(0x183),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x4c782a){const _0x57780e=a39_0x4ca748;return _0x4c782a[_0x57780e(0x13e)](_0x57780e(0x15a))[_0x57780e(0x162)]();}async function validateUpdateFlags(_0x29ab13){const _0x39e246=a39_0x4ca748,_0x13e2b6=_0x29ab13[_0x39e246(0x13d)](_0x39e246(0x16c)),_0xe1c540=getRequestedVersion(_0x29ab13);if(_0x13e2b6&&_0xe1c540)throw CliErrors[_0x39e246(0x140)](_0x39e246(0x157),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0xe1c540&&!a39_0x416ed3[_0x39e246(0x18a)](_0xe1c540))throw CliErrors['validation'](_0x39e246(0x185)+_0xe1c540,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x100112=a39_0x4ca748;try{const _0x55843c=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x100112(0x17d)](0x2710)});if(!_0x55843c['ok'])return null;const _0x3adea0=await _0x55843c['json']();if(!_0x3adea0||typeof _0x3adea0!==_0x100112(0x170))return null;return Object[_0x100112(0x142)](Object[_0x100112(0x161)](_0x3adea0)[_0x100112(0x158)](([,_0x4ad3a3])=>typeof _0x4ad3a3==='string'&&_0x4ad3a3[_0x100112(0x162)]()[_0x100112(0x189)]>0x0)[_0x100112(0x16f)](([_0x17526b,_0x4e26df])=>[_0x17526b,String(_0x4e26df)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1f2afe){const _0xc147f9=await fetchNpmDistTags();return _0xc147f9?.[_0x1f2afe]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x595016){const _0x249cc5=a39_0x4ca748,_0x10ac0f=getRequestedVersion(_0x595016);if(_0x10ac0f)return{'version':_0x10ac0f,'source':'version'};if(_0x595016['bool'](_0x249cc5(0x16c))){const _0x4e2f7e=await fetchNpmDistTagVersion(_0x249cc5(0x16c));if(!_0x4e2f7e)return null;return{'version':_0x4e2f7e,'source':_0x249cc5(0x16c)};}const _0x31ee8a=await fetchLatestVersion();if(!_0x31ee8a)return null;return{'version':_0x31ee8a,'source':_0x249cc5(0x160)};}function shouldInstallTarget(_0x739496,_0x527e70){const _0xc7c202=a39_0x4ca748;if(_0x527e70[_0xc7c202(0x159)]===_0xc7c202(0x15a)||_0x527e70['source']==='beta')return!a39_0x416ed3['eq'](_0x739496,_0x527e70[_0xc7c202(0x15a)]);return a39_0x416ed3['lt'](_0x739496,_0x527e70['version']);}function getInstallPlanLabel(_0x2ca836,_0x322ea7){const _0x419b5e=a39_0x4ca748;switch(_0x322ea7[_0x419b5e(0x159)]){case'beta':return _0x419b5e(0x174)+a39_0x176489[_0x419b5e(0x180)](_0x2ca836)+_0x419b5e(0x163)+a39_0x176489['green'](_0x322ea7[_0x419b5e(0x15a)]);case _0x419b5e(0x15a):return'Requested\x20version:\x20'+a39_0x176489[_0x419b5e(0x180)](_0x2ca836)+'\x20→\x20'+a39_0x176489[_0x419b5e(0x169)](_0x322ea7[_0x419b5e(0x15a)]);case _0x419b5e(0x160):default:return _0x419b5e(0x175)+a39_0x176489[_0x419b5e(0x180)](_0x2ca836)+_0x419b5e(0x163)+a39_0x176489[_0x419b5e(0x169)](_0x322ea7['version']);}}function a39_0x5dc6(_0x5b9bf0,_0x54f723){_0x5b9bf0=_0x5b9bf0-0x13d;const _0x270b86=a39_0x270b();let _0x5dc69b=_0x270b86[_0x5b9bf0];return _0x5dc69b;}function repairCurrentBuiltinSkill(){const _0x58abcc=a39_0x4ca748;console[_0x58abcc(0x15c)](a39_0x176489['gray'](_0x58abcc(0x173)));const _0x2946ce=installBuiltinSkill();if(_0x2946ce['ok'])return console[_0x58abcc(0x15c)](a39_0x176489[_0x58abcc(0x15e)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x2946ce[_0x58abcc(0x144)]+_0x58abcc(0x188))),!![];return console[_0x58abcc(0x15b)](a39_0x176489['yellow'](_0x58abcc(0x17f)+_0x2946ce['code']+_0x58abcc(0x14d)+(_0x2946ce['error']||_0x58abcc(0x181)))),console['log'](a39_0x176489[_0x58abcc(0x15e)](_0x58abcc(0x14f)+CLI_BIN_NAME+'\x20cli-skill\x20install')),![];}function verifyUpdatedBuiltinSkill(_0x3f468e){const _0x4f464b=a39_0x4ca748,_0x4c7b2a=inspectInstalledBuiltinSkillVersion(_0x3f468e);if(_0x4c7b2a[_0x4f464b(0x14e)]==='current')return console['log'](a39_0x176489[_0x4f464b(0x15e)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x3f468e+_0x4f464b(0x188))),!![];const _0x46a57e=_0x4c7b2a['skillVersion']?_0x4f464b(0x176)+_0x3f468e+_0x4f464b(0x16e)+_0x4c7b2a[_0x4f464b(0x144)]:_0x4f464b(0x176)+_0x3f468e+_0x4f464b(0x16b)+_0x4c7b2a[_0x4f464b(0x14e)];return console[_0x4f464b(0x15b)](a39_0x176489[_0x4f464b(0x180)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x46a57e)),console['log'](a39_0x176489['gray'](_0x4f464b(0x14f)+_0x4c7b2a[_0x4f464b(0x13f)])),![];}async function execute(_0x178b06){const _0x4b95e1=a39_0x4ca748;await validateUpdateFlags(_0x178b06);const _0x49bd80=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x49bd80);const _0x23afaa=a39_0x4079e9(_0x4b95e1(0x17c))[_0x4b95e1(0x146)](),_0x45e30a=await resolveTargetVersion(_0x178b06);if(!_0x45e30a){const _0x2c401f=_0x178b06[_0x4b95e1(0x13d)]('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x4b95e1(0x17e);return _0x23afaa[_0x4b95e1(0x178)](_0x2c401f),console['log'](a39_0x176489[_0x4b95e1(0x15e)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x4b95e1(0x17a))),{'ok':![],'message':_0x2c401f};}const _0x51d177=a39_0x416ed3['valid'](VERSION),_0x1a0efc=a39_0x416ed3[_0x4b95e1(0x18a)](_0x45e30a[_0x4b95e1(0x15a)]);if(!_0x51d177||!_0x1a0efc)return _0x23afaa[_0x4b95e1(0x178)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x51d177,_0x45e30a)){const _0x5a190f=_0x45e30a['source']===_0x4b95e1(0x15a)?_0x4b95e1(0x149)+_0x45e30a['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x45e30a[_0x4b95e1(0x15a)]+')';return _0x23afaa[_0x4b95e1(0x155)](_0x5a190f),{'ok':repairCurrentBuiltinSkill()};}_0x23afaa[_0x4b95e1(0x14b)](getInstallPlanLabel(_0x49bd80,_0x45e30a));const _0x363820=detectPackageManager(),_0x1be876=_0x363820===_0x4b95e1(0x165)?resolveNpmBin(_0x4b95e1(0x165)):_0x363820,_0x349336=a39_0x4079e9(_0x4b95e1(0x145)+_0x363820+_0x4b95e1(0x154))[_0x4b95e1(0x146)]();try{return await execa(_0x1be876,[_0x4b95e1(0x164),'-g',NPM_PACKAGE_NAME+'@'+_0x45e30a[_0x4b95e1(0x15a)]],{'stdio':_0x4b95e1(0x187)}),_0x349336[_0x4b95e1(0x155)](_0x4b95e1(0x168)+_0x45e30a[_0x4b95e1(0x15a)]),console['log'](a39_0x176489['gray'](_0x4b95e1(0x16d))),{'ok':verifyUpdatedBuiltinSkill(_0x45e30a[_0x4b95e1(0x15a)])};}catch(_0x68eb68){return _0x349336['fail'](_0x4b95e1(0x179)),console['error'](a39_0x176489[_0x4b95e1(0x16a)]('\x20\x20'+_0x68eb68[_0x4b95e1(0x172)])),console['log'](a39_0x176489[_0x4b95e1(0x15e)](_0x4b95e1(0x184)+_0x363820+_0x4b95e1(0x141)+NPM_PACKAGE_NAME+'@'+_0x45e30a['version'])),{'ok':![],'message':_0x68eb68[_0x4b95e1(0x172)]};}}export const updateDefinition={'service':a39_0x4ca748(0x143),'command':a39_0x4ca748(0x177),'description':a39_0x4ca748(0x182),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x27da18,_0x5cd7df){const _0x25c5d7=a40_0x2c4b,_0x74e613=_0x27da18();while(!![]){try{const _0x336538=parseInt(_0x25c5d7(0x19e))/0x1+parseInt(_0x25c5d7(0x1a2))/0x2*(-parseInt(_0x25c5d7(0x1a0))/0x3)+-parseInt(_0x25c5d7(0x19a))/0x4+parseInt(_0x25c5d7(0x1a4))/0x5+-parseInt(_0x25c5d7(0x19d))/0x6*(parseInt(_0x25c5d7(0x19f))/0x7)+-parseInt(_0x25c5d7(0x1a1))/0x8*(parseInt(_0x25c5d7(0x19c))/0x9)+-parseInt(_0x25c5d7(0x19b))/0xa*(-parseInt(_0x25c5d7(0x1a3))/0xb);if(_0x336538===_0x5cd7df)break;else _0x74e613['push'](_0x74e613['shift']());}catch(_0x2bc2b2){_0x74e613['push'](_0x74e613['shift']());}}}(a40_0x1c47,0x68df1));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x2c4b(_0x1b72ae,_0x521964){_0x1b72ae=_0x1b72ae-0x19a;const _0x1c47f6=a40_0x1c47();let _0x2c4b10=_0x1c47f6[_0x1b72ae];return _0x2c4b10;}function a40_0x1c47(){const _0x2719d9=['5238044YizDXH','367716MWIATR','175400mAelAP','8uoLCnw','11jNszgu','2830095IJUEWW','2348420hWifZT','14808260zJIwdN','252rqxRJT','6PdWBXf','822293pxHqLz'];a40_0x1c47=function(){return _0x2719d9;};return a40_0x1c47();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a40_0x57ac(){const _0x211f02=['210567cKYugT','142466ujdVGl','2640932MdWebN','5UnenJj','3875700xPMOeg','2756110qHWiTu','2470424KcUhiK','273516AbytcS'];a40_0x57ac=function(){return _0x211f02;};return a40_0x57ac();}(function(_0x5606a0,_0x2add6e){const _0x32b874=a40_0x738a,_0x61d21a=_0x5606a0();while(!![]){try{const _0x209690=-parseInt(_0x32b874(0x8e))/0x1*(parseInt(_0x32b874(0x8c))/0x2)+parseInt(_0x32b874(0x8b))/0x3+parseInt(_0x32b874(0x8d))/0x4+parseInt(_0x32b874(0x8f))/0x5+-parseInt(_0x32b874(0x8a))/0x6+-parseInt(_0x32b874(0x88))/0x7+-parseInt(_0x32b874(0x89))/0x8;if(_0x209690===_0x2add6e)break;else _0x61d21a['push'](_0x61d21a['shift']());}catch(_0x4d723a){_0x61d21a['push'](_0x61d21a['shift']());}}}(a40_0x57ac,0x61f7e));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x738a(_0x380fec,_0x56ec17){_0x380fec=_0x380fec-0x88;const _0x57ac27=a40_0x57ac();let _0x738a30=_0x57ac27[_0x380fec];return _0x738a30;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x1905c5=a41_0x593f;(function(_0x1e0b89,_0x2e4276){const _0x16a957=a41_0x593f,_0x398fab=_0x1e0b89();while(!![]){try{const _0x5de0ea=parseInt(_0x16a957(0xc1))/0x1*(parseInt(_0x16a957(0xd2))/0x2)+parseInt(_0x16a957(0xbf))/0x3*(-parseInt(_0x16a957(0xd5))/0x4)+-parseInt(_0x16a957(0xcf))/0x5+-parseInt(_0x16a957(0xd4))/0x6*(parseInt(_0x16a957(0xcc))/0x7)+-parseInt(_0x16a957(0xc9))/0x8*(parseInt(_0x16a957(0xd0))/0x9)+-parseInt(_0x16a957(0xc6))/0xa+parseInt(_0x16a957(0xd3))/0xb;if(_0x5de0ea===_0x2e4276)break;else _0x398fab['push'](_0x398fab['shift']());}catch(_0x4ea119){_0x398fab['push'](_0x398fab['shift']());}}}(a41_0x50c1,0x72e09));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a41_0x50c1(){const _0x491924=['bool','3488105QLBVlq','2563443hzvxhq','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1627402tHhQNX','25804768JGOqFx','4647306FYanYg','4BwualK','sdk','appCode','Omit\x20import\x20statements\x20from\x20generated\x20code','name','805995fRpnpW','boolean','1ZNtlfT','codegen','tableName','read','str','3785610GQhtIk','skip-imports','operation','16goevWx','code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','7tipeAR','alias'];a41_0x50c1=function(){return _0x491924;};return a41_0x50c1();}function a41_0x593f(_0x24e224,_0x58462b){_0x24e224=_0x24e224-0xbd;const _0x50c117=a41_0x50c1();let _0x593fac=_0x50c117[_0x24e224];return _0x593fac;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x1905c5(0xc2),'command':a41_0x1905c5(0xd6),'description':a41_0x1905c5(0xd1),'risk':a41_0x1905c5(0xc4),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x1905c5(0xcd),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x1905c5(0xc8),'type':'string','required':!![],'description':a41_0x1905c5(0xcb)},{'name':a41_0x1905c5(0xc7),'type':a41_0x1905c5(0xc0),'description':a41_0x1905c5(0xbd)}],async 'execute'(_0x5285f3){const _0xbb389b=a41_0x1905c5,{dataset:_0x51ef8f,operation:_0x2eebc9}=await getOperationDetail(_0x5285f3[_0xbb389b(0xd7)],_0x5285f3['str'](_0xbb389b(0xca)),_0x5285f3[_0xbb389b(0xc5)](_0xbb389b(0xc8))),_0x1927e0=generateSdkCode(_0x51ef8f,_0x2eebc9,{'includeImports':!_0x5285f3[_0xbb389b(0xce)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x51ef8f[_0xbb389b(0xbe)],'code':_0x51ef8f['code'],'tableName':_0x51ef8f[_0xbb389b(0xc3)]},'operation':_0x5285f3['str'](_0xbb389b(0xc8)),'code':_0x1927e0}};}};
1
+ const a41_0x46dac1=a41_0x2459;(function(_0x46abf7,_0x29e75c){const _0x3c61d6=a41_0x2459,_0x5dc3db=_0x46abf7();while(!![]){try{const _0x5425b8=parseInt(_0x3c61d6(0x1c7))/0x1+-parseInt(_0x3c61d6(0x1d9))/0x2*(-parseInt(_0x3c61d6(0x1d8))/0x3)+-parseInt(_0x3c61d6(0x1d4))/0x4*(parseInt(_0x3c61d6(0x1c1))/0x5)+parseInt(_0x3c61d6(0x1d3))/0x6+-parseInt(_0x3c61d6(0x1da))/0x7*(-parseInt(_0x3c61d6(0x1c6))/0x8)+-parseInt(_0x3c61d6(0x1cc))/0x9*(parseInt(_0x3c61d6(0x1cf))/0xa)+parseInt(_0x3c61d6(0x1c2))/0xb*(parseInt(_0x3c61d6(0x1cb))/0xc);if(_0x5425b8===_0x29e75c)break;else _0x5dc3db['push'](_0x5dc3db['shift']());}catch(_0x2acb48){_0x5dc3db['push'](_0x5dc3db['shift']());}}}(a41_0x2948,0x7220e));function a41_0x2948(){const _0x33416b=['8kUofzY','42190SXMirY','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','boolean','tableName','582696PkKOxS','273519DDtnQh','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','290PRajWC','code','codegen','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1999848EbYszz','4lgYxmt','appCode','operation','skip-imports','6582DtOwOa','596MESKBH','4762051YdchvE','string','alias','4231870iCKUaJ','110NmucAc','name','str','bool'];a41_0x2948=function(){return _0x33416b;};return a41_0x2948();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x2459(_0x4ae2be,_0x24fa1f){_0x4ae2be=_0x4ae2be-0x1bf;const _0x2948d8=a41_0x2948();let _0x245960=_0x2948d8[_0x4ae2be];return _0x245960;}export const codegenSdk={'service':a41_0x46dac1(0x1d1),'command':a41_0x46dac1(0x1ce),'description':a41_0x46dac1(0x1d2),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x46dac1(0x1c0),'type':a41_0x46dac1(0x1bf),'description':a41_0x46dac1(0x1c8)},{'name':a41_0x46dac1(0x1d6),'type':a41_0x46dac1(0x1bf),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0x46dac1(0x1d7),'type':a41_0x46dac1(0x1c9),'description':a41_0x46dac1(0x1cd)}],async 'execute'(_0x5a351f){const _0x38343a=a41_0x46dac1,{dataset:_0x3666c6,operation:_0x12040b}=await getOperationDetail(_0x5a351f[_0x38343a(0x1d5)],_0x5a351f[_0x38343a(0x1c4)](_0x38343a(0x1d0)),_0x5a351f[_0x38343a(0x1c4)](_0x38343a(0x1d6))),_0x41e3e1=generateSdkCode(_0x3666c6,_0x12040b,{'includeImports':!_0x5a351f[_0x38343a(0x1c5)](_0x38343a(0x1d7))});return{'ok':!![],'data':{'dataset':{'name':_0x3666c6[_0x38343a(0x1c3)],'code':_0x3666c6[_0x38343a(0x1d0)],'tableName':_0x3666c6[_0x38343a(0x1ca)]},'operation':_0x5a351f[_0x38343a(0x1c4)](_0x38343a(0x1d6)),'code':_0x41e3e1}};}};
@@ -1 +1 @@
1
- const a42_0x5bf35f=a42_0x3278;(function(_0xd3c8f2,_0x33c0ef){const _0x482dd8=a42_0x3278,_0xf37c71=_0xd3c8f2();while(!![]){try{const _0x4982d7=-parseInt(_0x482dd8(0x6c))/0x1+-parseInt(_0x482dd8(0x74))/0x2*(parseInt(_0x482dd8(0x7a))/0x3)+-parseInt(_0x482dd8(0x7b))/0x4*(-parseInt(_0x482dd8(0x76))/0x5)+parseInt(_0x482dd8(0x85))/0x6+-parseInt(_0x482dd8(0x84))/0x7*(parseInt(_0x482dd8(0x73))/0x8)+parseInt(_0x482dd8(0x82))/0x9*(parseInt(_0x482dd8(0x80))/0xa)+parseInt(_0x482dd8(0x77))/0xb*(parseInt(_0x482dd8(0x70))/0xc);if(_0x4982d7===_0x33c0ef)break;else _0xf37c71['push'](_0xf37c71['shift']());}catch(_0x3abdb4){_0xf37c71['push'](_0xf37c71['shift']());}}}(a42_0x3b9b,0x5ec3d));function a42_0x3278(_0x25d21b,_0x166ee5){_0x25d21b=_0x25d21b-0x6c;const _0x3b9b82=a42_0x3b9b();let _0x3278f7=_0x3b9b82[_0x25d21b];return _0x3278f7;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x5bf35f(0x6d),'command':a42_0x5bf35f(0x78),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x5bf35f(0x6e),'flags':[SQLCODE_FLAG,{'name':'target','type':a42_0x5bf35f(0x75),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a42_0x5bf35f(0x72),'enum':[a42_0x5bf35f(0x72),a42_0x5bf35f(0x71)]},{'name':a42_0x5bf35f(0x6f),'type':'boolean','description':a42_0x5bf35f(0x79)}],async 'execute'(_0x150da9){const _0x5427cd=a42_0x5bf35f,_0x26c0d8=await getSqlQueryInfo(_0x150da9['appCode'],_0x150da9[_0x5427cd(0x83)](_0x5427cd(0x7e))),_0x11b827=_0x150da9[_0x5427cd(0x83)](_0x5427cd(0x7c))||'sdk',_0x298b9e=generateSqlCodeTemplate(_0x26c0d8,{'target':_0x11b827,'includeImports':!_0x150da9[_0x5427cd(0x7d)](_0x5427cd(0x6f))});return{'ok':!![],'data':{'sqlCode':_0x26c0d8[_0x5427cd(0x81)],'sqlName':_0x26c0d8[_0x5427cd(0x7f)],'target':_0x11b827,'code':_0x298b9e}};}};function a42_0x3b9b(){const _0x31d942=['2BwmIoS','string','26665HqfPpN','22SZNuyU','sql','Omit\x20import\x20statements\x20from\x20generated\x20code','468957jYPTGM','124EWjZWq','target','bool','sqlcode','sqlName','6262240HsMehj','sqlCode','9wKCNce','str','667142BReliC','2257848glxOzh','84945IYbqSi','codegen','read','no-imports','1344084pGVqYf','bff','sdk','64VNRsHM'];a42_0x3b9b=function(){return _0x31d942;};return a42_0x3b9b();}
1
+ function a42_0x4bdf(){const _0x4f8faf=['1000kbAnKY','15462gjEOPn','68348uuuwxU','12pTzIXg','target','68753kIzoxJ','344666mczKdz','str','sqlName','531633TFMjGF','1210216GDAQXy','no-imports','appCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','673292xcDKeY','read','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','5XFizkF','sqlCode','bff'];a42_0x4bdf=function(){return _0x4f8faf;};return a42_0x4bdf();}const a42_0x19bd0a=a42_0x2d55;function a42_0x2d55(_0x432548,_0x5690c2){_0x432548=_0x432548-0x197;const _0x4bdf4a=a42_0x4bdf();let _0x2d5560=_0x4bdf4a[_0x432548];return _0x2d5560;}(function(_0x56ae96,_0x45ec88){const _0x5a70ad=a42_0x2d55,_0x4e6782=_0x56ae96();while(!![]){try{const _0x24c7de=-parseInt(_0x5a70ad(0x1a3))/0x1+parseInt(_0x5a70ad(0x1a4))/0x2+-parseInt(_0x5a70ad(0x1a7))/0x3+parseInt(_0x5a70ad(0x197))/0x4*(-parseInt(_0x5a70ad(0x19b))/0x5)+parseInt(_0x5a70ad(0x1a1))/0x6*(parseInt(_0x5a70ad(0x1a0))/0x7)+parseInt(_0x5a70ad(0x1a8))/0x8+parseInt(_0x5a70ad(0x19f))/0x9*(parseInt(_0x5a70ad(0x19e))/0xa);if(_0x24c7de===_0x45ec88)break;else _0x4e6782['push'](_0x4e6782['shift']());}catch(_0x304a6f){_0x4e6782['push'](_0x4e6782['shift']());}}}(a42_0x4bdf,0x1892b));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':'sql','description':a42_0x19bd0a(0x1ab),'risk':a42_0x19bd0a(0x198),'flags':[SQLCODE_FLAG,{'name':a42_0x19bd0a(0x1a2),'type':'string','description':a42_0x19bd0a(0x199),'default':'sdk','enum':['sdk',a42_0x19bd0a(0x19d)]},{'name':a42_0x19bd0a(0x1a9),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0xf28251){const _0x2500b6=a42_0x19bd0a,_0x2fa62a=await getSqlQueryInfo(_0xf28251[_0x2500b6(0x1aa)],_0xf28251[_0x2500b6(0x1a5)]('sqlcode')),_0x1a835b=_0xf28251[_0x2500b6(0x1a5)](_0x2500b6(0x1a2))||_0x2500b6(0x19a),_0x114397=generateSqlCodeTemplate(_0x2fa62a,{'target':_0x1a835b,'includeImports':!_0xf28251['bool'](_0x2500b6(0x1a9))});return{'ok':!![],'data':{'sqlCode':_0x2fa62a[_0x2500b6(0x19c)],'sqlName':_0x2fa62a[_0x2500b6(0x1a6)],'target':_0x1a835b,'code':_0x114397}};}};
@@ -1 +1 @@
1
- (function(_0x3cbf24,_0x3e4ef0){const _0x250376=a43_0x17b0,_0x187e83=_0x3cbf24();while(!![]){try{const _0x4505d6=parseInt(_0x250376(0x10d))/0x1*(-parseInt(_0x250376(0x11d))/0x2)+-parseInt(_0x250376(0x12d))/0x3+parseInt(_0x250376(0x131))/0x4+-parseInt(_0x250376(0x12c))/0x5*(parseInt(_0x250376(0x10a))/0x6)+-parseInt(_0x250376(0x11c))/0x7*(-parseInt(_0x250376(0x10f))/0x8)+parseInt(_0x250376(0x133))/0x9*(-parseInt(_0x250376(0x11e))/0xa)+parseInt(_0x250376(0x12b))/0xb;if(_0x4505d6===_0x3e4ef0)break;else _0x187e83['push'](_0x187e83['shift']());}catch(_0xbee7a9){_0x187e83['push'](_0x187e83['shift']());}}}(a43_0x167c,0x3dae0));function a43_0x17b0(_0x318f6e,_0xc7229b){_0x318f6e=_0x318f6e-0x10a;const _0x167c5e=a43_0x167c();let _0x17b0bf=_0x167c5e[_0x318f6e];return _0x17b0bf;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a43_0x167c(){const _0x52e4a7=['\x22\x20not\x20found.','6toEfvD','Removed\x20app\x20\x22','project','1ejvNST','Use\x20global\x20config\x20scope','520064ZpSQKA','both','Added','App\x20code','apps','length','object','\x20<name>','\x20Set\x20as\x20default\x20app.','inherit','defaultApp','\x20app\x20\x22','keys','21qrPUQc','916998kJGwxy','582740CfRUJz','\x22\x20still\x20defined\x20in\x20','\x20config.','Missing\x20app\x20name.','flagMissing','args','\x20Note:\x20app\x20\x22','\x20<name>\x20[--global]','global','appcode','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20--appcode\x20<code>','projectConfig','15368727AtZLNz','804065rtIrXy','1042365aRegOL','App\x20\x22','bool','validation','373672yGinba','trim','72ykTwac','Usage:\x20','boolean','globalConfig'];a43_0x167c=function(){return _0x52e4a7;};return a43_0x167c();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x50bed1=a43_0x17b0;return[{'name':'appcode','type':'string','description':_0x50bed1(0x112),'required':!![]},{'name':_0x50bed1(0x126),'type':_0x50bed1(0x135),'description':_0x50bed1(0x10e),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x3a741a=a43_0x17b0;return[{'name':_0x3a741a(0x126),'type':_0x3a741a(0x135),'description':_0x3a741a(0x10e),'default':![]}];}export async function validateAppName(_0x2716a7,_0x56c16d){const _0x5be5a3=a43_0x17b0,_0x2c21fd=_0x2716a7['args'][0x0]?.[_0x5be5a3(0x132)]();if(!_0x2c21fd)throw CliErrors[_0x5be5a3(0x130)](_0x5be5a3(0x121),_0x5be5a3(0x134)+CLI_BIN_NAME+'\x20'+_0x56c16d+_0x5be5a3(0x116));}export async function runAppAdd(_0x18ac6a,_0x2e1e0c){const _0x9a407f=a43_0x17b0,_0x5bef88=_0x18ac6a[_0x9a407f(0x123)][0x0]?.['trim']();if(!_0x5bef88)throw CliErrors['validation'](_0x9a407f(0x121),_0x9a407f(0x134)+CLI_BIN_NAME+'\x20'+_0x2e1e0c+_0x9a407f(0x129));const _0x3914b1=_0x18ac6a['str'](_0x9a407f(0x127));if(!_0x3914b1)throw CliErrors[_0x9a407f(0x122)]('appcode',_0x9a407f(0x134)+CLI_BIN_NAME+'\x20'+_0x2e1e0c+_0x9a407f(0x129));const _0x1ed8f6={'global':_0x18ac6a[_0x9a407f(0x12f)](_0x9a407f(0x126))},_0x20fbfd=readConfig(_0x1ed8f6);if(!_0x20fbfd[_0x9a407f(0x113)])_0x20fbfd[_0x9a407f(0x113)]={};const _0x16449a={'appcode':_0x3914b1,...collectAppProfileOverrides(_0x35b088=>_0x18ac6a['str'](_0x35b088))},_0x329fcd=_0x20fbfd[_0x9a407f(0x113)],_0x2d91c0=!!_0x329fcd[_0x5bef88];_0x329fcd[_0x5bef88]=_0x16449a;if(!_0x20fbfd[_0x9a407f(0x119)])_0x20fbfd[_0x9a407f(0x119)]=_0x5bef88;writeConfig(_0x20fbfd,_0x1ed8f6);const _0x271ec4=!_0x2d91c0&&_0x20fbfd[_0x9a407f(0x119)]===_0x5bef88?_0x9a407f(0x117):'',_0x1ca79c=(_0x2d91c0?'Updated':_0x9a407f(0x111))+_0x9a407f(0x11a)+_0x5bef88+'\x22\x20(appcode:\x20'+_0x3914b1+')'+scopeLabel(_0x1ed8f6)+'.'+_0x271ec4;return{'ok':!![],'message':_0x1ca79c};}export async function runAppRemove(_0x5dfe0b,_0x421499){const _0x279c84=a43_0x17b0,_0x4abec7=_0x5dfe0b[_0x279c84(0x123)][0x0]?.['trim']();if(!_0x4abec7)throw CliErrors[_0x279c84(0x130)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x421499+_0x279c84(0x125));const _0x925ed8=_0x5dfe0b[_0x279c84(0x12f)](_0x279c84(0x126)),{config:_0xadaf07,layers:_0x22eedf}=readRawConfigWithLayers(),_0x59fcb6=_0xadaf07[_0x279c84(0x113)]??{};if(!_0x59fcb6[_0x4abec7])throw CliErrors[_0x279c84(0x130)](_0x279c84(0x12e)+_0x4abec7+'\x22\x20not\x20found.');const _0x2de171=_0x22eedf[_0x279c84(0x136)][_0x279c84(0x113)]&&typeof _0x22eedf[_0x279c84(0x136)][_0x279c84(0x113)]==='object'?_0x22eedf[_0x279c84(0x136)]['apps']:{},_0x1690b1=_0x22eedf[_0x279c84(0x12a)][_0x279c84(0x113)]&&typeof _0x22eedf['projectConfig']['apps']===_0x279c84(0x115)?_0x22eedf['projectConfig'][_0x279c84(0x113)]:{},_0x44dfd6=appDefinedIn(_0x4abec7,_0x2de171,_0x1690b1,_0x22eedf[_0x279c84(0x12a)][_0x279c84(0x118)]===![]),_0x3db8c7=resolveAppScopeForWrite(_0x4abec7,_0x925ed8,_0x22eedf),_0x4f3120={'global':_0x3db8c7===_0x279c84(0x126)},_0x52d328=readConfig(_0x4f3120),_0x2a2a57=_0x52d328[_0x279c84(0x113)];if(!_0x2a2a57||!_0x2a2a57[_0x4abec7])throw CliErrors[_0x279c84(0x130)](_0x279c84(0x12e)+_0x4abec7+_0x279c84(0x137));delete _0x2a2a57[_0x4abec7];let _0x279804='';if(_0x52d328[_0x279c84(0x119)]===_0x4abec7){const _0x4d3b59=Object['keys'](_0x2a2a57);_0x52d328['defaultApp']=_0x4d3b59[_0x279c84(0x114)]>0x0?_0x4d3b59[0x0]:undefined,_0x52d328[_0x279c84(0x119)]?_0x279804=_0x279c84(0x128)+_0x52d328[_0x279c84(0x119)]+'\x22.':delete _0x52d328[_0x279c84(0x119)];}Object[_0x279c84(0x11b)](_0x2a2a57)[_0x279c84(0x114)]===0x0&&(delete _0x52d328['apps'],delete _0x52d328['defaultApp']);writeConfig(_0x52d328,_0x4f3120);const _0x134f10=_0x44dfd6===_0x279c84(0x110)?_0x279c84(0x124)+_0x4abec7+_0x279c84(0x11f)+(_0x3db8c7===_0x279c84(0x10c)?_0x279c84(0x126):_0x279c84(0x10c))+_0x279c84(0x120):'';return{'ok':!![],'message':_0x279c84(0x10b)+_0x4abec7+'\x22'+scopeLabel(_0x4f3120)+'.'+_0x279804+_0x134f10};}
1
+ (function(_0x2cf9f0,_0x46f47a){const _0x14d7d8=a43_0x37be,_0x29e859=_0x2cf9f0();while(!![]){try{const _0x31857c=parseInt(_0x14d7d8(0x13f))/0x1+-parseInt(_0x14d7d8(0x11d))/0x2*(-parseInt(_0x14d7d8(0x147))/0x3)+-parseInt(_0x14d7d8(0x12f))/0x4*(-parseInt(_0x14d7d8(0x12a))/0x5)+-parseInt(_0x14d7d8(0x127))/0x6*(parseInt(_0x14d7d8(0x123))/0x7)+-parseInt(_0x14d7d8(0x11a))/0x8*(-parseInt(_0x14d7d8(0x13d))/0x9)+-parseInt(_0x14d7d8(0x122))/0xa*(-parseInt(_0x14d7d8(0x13c))/0xb)+-parseInt(_0x14d7d8(0x144))/0xc;if(_0x31857c===_0x46f47a)break;else _0x29e859['push'](_0x29e859['shift']());}catch(_0x140d1f){_0x29e859['push'](_0x29e859['shift']());}}}(a43_0x47fd,0x8b0f1));function a43_0x37be(_0x32601b,_0x506776){_0x32601b=_0x32601b-0x118;const _0x47fd68=a43_0x47fd();let _0x37beb2=_0x47fd68[_0x32601b];return _0x37beb2;}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_0x47fd(){const _0x359b4f=['defaultApp','App\x20\x22','str','Missing\x20app\x20name.','\x20<name>\x20[--global]','\x22\x20still\x20defined\x20in\x20','Removed\x20app\x20\x22','Added','\x20app\x20\x22','121JktPay','9909eCVGIb','flagMissing','101520UnJAvt','\x20Note:\x20app\x20\x22','global','args','Usage:\x20','7021608ukrKHN','both','\x20Default\x20app\x20changed\x20to\x20\x22','3057NdAwMd','Use\x20global\x20config\x20scope','\x20<name>\x20--appcode\x20<code>','\x22\x20(appcode:\x20','40BjqcwL','bool','App\x20code','1608TQRdkr','string','inherit','validation','\x20config.','91050QlYtjA','28IQtJUD','appcode','projectConfig','length','539802lNfSnb','trim','\x20Set\x20as\x20default\x20app.','348665FDzsVa','apps','object','globalConfig','\x20<name>','28JAkhlL','Updated','keys','\x22\x20not\x20found.'];a43_0x47fd=function(){return _0x359b4f;};return a43_0x47fd();}export function buildAppAddFlags(){const _0x4de6b7=a43_0x37be;return[{'name':'appcode','type':_0x4de6b7(0x11e),'description':_0x4de6b7(0x11c),'required':!![]},{'name':_0x4de6b7(0x141),'type':'boolean','description':_0x4de6b7(0x148),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1acb86=a43_0x37be;return[{'name':'global','type':'boolean','description':_0x1acb86(0x148),'default':![]}];}export async function validateAppName(_0x573876,_0x24f9ed){const _0x5b9bbb=a43_0x37be,_0x215181=_0x573876[_0x5b9bbb(0x142)][0x0]?.['trim']();if(!_0x215181)throw CliErrors[_0x5b9bbb(0x120)]('Missing\x20app\x20name.',_0x5b9bbb(0x143)+CLI_BIN_NAME+'\x20'+_0x24f9ed+_0x5b9bbb(0x12e));}export async function runAppAdd(_0x3867d8,_0x332cdc){const _0x278e3b=a43_0x37be,_0x2c9b5d=_0x3867d8[_0x278e3b(0x142)][0x0]?.['trim']();if(!_0x2c9b5d)throw CliErrors[_0x278e3b(0x120)](_0x278e3b(0x136),_0x278e3b(0x143)+CLI_BIN_NAME+'\x20'+_0x332cdc+_0x278e3b(0x118));const _0x5c499f=_0x3867d8[_0x278e3b(0x135)](_0x278e3b(0x124));if(!_0x5c499f)throw CliErrors[_0x278e3b(0x13e)](_0x278e3b(0x124),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x332cdc+_0x278e3b(0x118));const _0xec70c7={'global':_0x3867d8[_0x278e3b(0x11b)](_0x278e3b(0x141))},_0x41b99f=readConfig(_0xec70c7);if(!_0x41b99f['apps'])_0x41b99f[_0x278e3b(0x12b)]={};const _0x3aba38={'appcode':_0x5c499f,...collectAppProfileOverrides(_0x4abe1b=>_0x3867d8['str'](_0x4abe1b))},_0x5e1124=_0x41b99f[_0x278e3b(0x12b)],_0x585416=!!_0x5e1124[_0x2c9b5d];_0x5e1124[_0x2c9b5d]=_0x3aba38;if(!_0x41b99f[_0x278e3b(0x133)])_0x41b99f['defaultApp']=_0x2c9b5d;writeConfig(_0x41b99f,_0xec70c7);const _0x2b20bb=!_0x585416&&_0x41b99f[_0x278e3b(0x133)]===_0x2c9b5d?_0x278e3b(0x129):'',_0x4aa934=(_0x585416?_0x278e3b(0x130):_0x278e3b(0x13a))+_0x278e3b(0x13b)+_0x2c9b5d+_0x278e3b(0x119)+_0x5c499f+')'+scopeLabel(_0xec70c7)+'.'+_0x2b20bb;return{'ok':!![],'message':_0x4aa934};}export async function runAppRemove(_0x3167d2,_0x3dd0aa){const _0x4afa67=a43_0x37be,_0x359237=_0x3167d2['args'][0x0]?.[_0x4afa67(0x128)]();if(!_0x359237)throw CliErrors['validation'](_0x4afa67(0x136),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3dd0aa+_0x4afa67(0x137));const _0x4a29ac=_0x3167d2[_0x4afa67(0x11b)](_0x4afa67(0x141)),{config:_0x693ed7,layers:_0x14e2c3}=readRawConfigWithLayers(),_0x43a19c=_0x693ed7[_0x4afa67(0x12b)]??{};if(!_0x43a19c[_0x359237])throw CliErrors[_0x4afa67(0x120)](_0x4afa67(0x134)+_0x359237+_0x4afa67(0x132));const _0x1ecfdd=_0x14e2c3[_0x4afa67(0x12d)]['apps']&&typeof _0x14e2c3[_0x4afa67(0x12d)]['apps']===_0x4afa67(0x12c)?_0x14e2c3[_0x4afa67(0x12d)][_0x4afa67(0x12b)]:{},_0x315f5a=_0x14e2c3['projectConfig'][_0x4afa67(0x12b)]&&typeof _0x14e2c3[_0x4afa67(0x125)][_0x4afa67(0x12b)]===_0x4afa67(0x12c)?_0x14e2c3['projectConfig']['apps']:{},_0x4280eb=appDefinedIn(_0x359237,_0x1ecfdd,_0x315f5a,_0x14e2c3[_0x4afa67(0x125)][_0x4afa67(0x11f)]===![]),_0x534f90=resolveAppScopeForWrite(_0x359237,_0x4a29ac,_0x14e2c3),_0x1576cf={'global':_0x534f90===_0x4afa67(0x141)},_0x48a506=readConfig(_0x1576cf),_0x35db21=_0x48a506[_0x4afa67(0x12b)];if(!_0x35db21||!_0x35db21[_0x359237])throw CliErrors[_0x4afa67(0x120)](_0x4afa67(0x134)+_0x359237+_0x4afa67(0x132));delete _0x35db21[_0x359237];let _0x3972f1='';if(_0x48a506[_0x4afa67(0x133)]===_0x359237){const _0x360eb6=Object[_0x4afa67(0x131)](_0x35db21);_0x48a506['defaultApp']=_0x360eb6[_0x4afa67(0x126)]>0x0?_0x360eb6[0x0]:undefined,_0x48a506[_0x4afa67(0x133)]?_0x3972f1=_0x4afa67(0x146)+_0x48a506[_0x4afa67(0x133)]+'\x22.':delete _0x48a506[_0x4afa67(0x133)];}Object['keys'](_0x35db21)['length']===0x0&&(delete _0x48a506[_0x4afa67(0x12b)],delete _0x48a506[_0x4afa67(0x133)]);writeConfig(_0x48a506,_0x1576cf);const _0x3836c4=_0x4280eb===_0x4afa67(0x145)?_0x4afa67(0x140)+_0x359237+_0x4afa67(0x138)+(_0x534f90==='project'?_0x4afa67(0x141):'project')+_0x4afa67(0x121):'';return{'ok':!![],'message':_0x4afa67(0x139)+_0x359237+'\x22'+scopeLabel(_0x1576cf)+'.'+_0x3972f1+_0x3836c4};}
@@ -1 +1 @@
1
- function a44_0x505d(_0x2f91c1,_0x5e1e33){_0x2f91c1=_0x2f91c1-0xb2;const _0x53f7a1=a44_0x53f7();let _0x505d93=_0x53f7a1[_0x2f91c1];return _0x505d93;}(function(_0x559663,_0x57d507){const _0x57ff7f=a44_0x505d,_0x12093a=_0x559663();while(!![]){try{const _0x184809=-parseInt(_0x57ff7f(0xb2))/0x1*(parseInt(_0x57ff7f(0xb8))/0x2)+-parseInt(_0x57ff7f(0xca))/0x3*(parseInt(_0x57ff7f(0xd5))/0x4)+-parseInt(_0x57ff7f(0xbe))/0x5*(-parseInt(_0x57ff7f(0xc0))/0x6)+parseInt(_0x57ff7f(0xb7))/0x7*(-parseInt(_0x57ff7f(0xb9))/0x8)+-parseInt(_0x57ff7f(0xc7))/0x9+parseInt(_0x57ff7f(0xbc))/0xa*(-parseInt(_0x57ff7f(0xb5))/0xb)+parseInt(_0x57ff7f(0xbf))/0xc;if(_0x184809===_0x57d507)break;else _0x12093a['push'](_0x12093a['shift']());}catch(_0x31b779){_0x12093a['push'](_0x12093a['shift']());}}}(a44_0x53f7,0x84947));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x364e9d 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 _0x5ba1ec=a44_0x505d,_0x55ecf7=await input({'message':_0x5ba1ec(0xd6),'validate':_0x420eb9=>{const _0x42896b=_0x5ba1ec,_0x49ce50=validateAppcode(_0x420eb9[_0x42896b(0xbb)]());return _0x49ce50[_0x42896b(0xcc)]||_0x49ce50[_0x42896b(0xba)]||_0x42896b(0xb3);}});return _0x55ecf7['trim']();}function a44_0x53f7(){const _0x106662=['map','valid','appName','\x0a无法获取远程应用列表,请手动输入。','yellow','length','appCode','custom','未找到可用应用。','\x20\x20(','84OLLuuB','请输入\x20App\x20Code:','25nTwiLs','Invalid\x20App\x20Code','manual','1177klkvHg','find','56497YVdwIG','79038gPNCFm','744IwHZGH','message','trim','33730RDNseZ','获取到\x20','85yxiBNu','28505388HQHIoe','116124QcxASS','请选择要绑定的应用:','正在获取可用应用列表...','skip','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','gray','✎\x20手动输入','62010uxROqb','\x0a未找到可用应用。','includes','7863ebLEdb'];a44_0x53f7=function(){return _0x106662;};return a44_0x53f7();}export async function promptAppSelection(_0x172f28){const _0x32e834=a44_0x505d,_0x303e80=[{'name':a44_0x364e9d[_0x32e834(0xcf)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x172f28[_0x32e834(0xcb)]((_0x210d5f,_0x599455)=>({'name':_0x210d5f['appName']+'\x20\x20'+a44_0x364e9d[_0x32e834(0xc5)]('('+_0x210d5f[_0x32e834(0xd1)]+')'),'value':_0x599455}))],_0x424903=await checkbox({'message':_0x32e834(0xbd)+a44_0x364e9d['cyan'](_0x172f28[_0x32e834(0xd0)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x303e80,'loop':![]});if(_0x424903[_0x32e834(0xc9)](-0x1))return'custom';if(_0x424903[_0x32e834(0xd0)]===0x0)return _0x32e834(0xd2);return _0x424903[_0x32e834(0xcb)](_0x1ba520=>_0x172f28[_0x1ba520]);}export async function promptSingleAppSelection(_0x4ed3a8){const _0x2ee00c=a44_0x505d,_0x296b13=[{'name':a44_0x364e9d[_0x2ee00c(0xc5)](_0x2ee00c(0xc4)),'value':_0x2ee00c(0xc3)},{'name':a44_0x364e9d[_0x2ee00c(0xcf)]('✎\x20自定义输入\x20appcode'),'value':_0x2ee00c(0xd2)},..._0x4ed3a8[_0x2ee00c(0xcb)](_0x4ef714=>({'name':_0x4ef714[_0x2ee00c(0xcd)]+'\x20\x20'+a44_0x364e9d[_0x2ee00c(0xc5)]('('+_0x4ef714[_0x2ee00c(0xd1)]+')'),'value':_0x4ef714['appCode']}))],_0xa28163=await select({'message':_0x2ee00c(0xc1),'choices':_0x296b13});if(_0xa28163===_0x2ee00c(0xc3))return _0x2ee00c(0xc3);if(_0xa28163===_0x2ee00c(0xd2))return'custom';return _0x4ed3a8[_0x2ee00c(0xb6)](_0x51d0d2=>_0x51d0d2[_0x2ee00c(0xd1)]===_0xa28163);}export async function selectSingleAppcode(_0xaed405){const _0x3b3985=a44_0x505d;if(!_0xaed405)return writeCliSideChannelLine(a44_0x364e9d['gray']('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x3b3985(0xc2));let _0x2d815c;try{_0x2d815c=await withActiveCookie(_0xaed405,()=>listRemoteApps());}catch(_0x4af848){writeCliSideChannelLine(a44_0x364e9d[_0x3b3985(0xcf)]('无法获取远程应用列表,请手动输入。'));if(_0x4af848 instanceof Error)writeCliSideChannelLine(a44_0x364e9d[_0x3b3985(0xc5)](_0x3b3985(0xd4)+_0x4af848[_0x3b3985(0xba)]+')'));return _fallbackOrSkip();}if(_0x2d815c[_0x3b3985(0xd0)]===0x0)return writeCliSideChannelLine(a44_0x364e9d['yellow'](_0x3b3985(0xd3))),_fallbackOrSkip();const _0x41835c=await promptSingleAppSelection(_0x2d815c);if(_0x41835c===_0x3b3985(0xc3))return'';if(_0x41835c===_0x3b3985(0xd2))return promptCustomAppcode();return _0x41835c['appCode'];}export async function selectMultipleApps(_0x51a26a){const _0x39182d=a44_0x505d;writeCliSideChannelLine(_0x39182d(0xc2));let _0x3d70cd;try{_0x3d70cd=await withActiveCookie(_0x51a26a,()=>listRemoteApps());}catch(_0xe0d423){writeCliSideChannelLine(_0x39182d(0xce));if(_0xe0d423 instanceof Error)writeCliSideChannelLine(_0x39182d(0xd4)+_0xe0d423[_0x39182d(0xba)]+')');return'custom';}if(_0x3d70cd[_0x39182d(0xd0)]===0x0)return writeCliSideChannelLine(_0x39182d(0xc8)),'custom';return promptAppSelection(_0x3d70cd);}async function _fallbackOrSkip(){const _0x33ea68=a44_0x505d,_0x466a59=await select({'message':'App\x20Code:','choices':[{'name':a44_0x364e9d[_0x33ea68(0xc5)]('(跳过,稍后配置)'),'value':_0x33ea68(0xc3)},{'name':a44_0x364e9d[_0x33ea68(0xcf)](_0x33ea68(0xc6)),'value':_0x33ea68(0xb4)}]});if(_0x466a59===_0x33ea68(0xc3))return'';return promptCustomAppcode();}
1
+ (function(_0x11c51a,_0xf5d50e){const _0x2bd800=a44_0x1bb1,_0x2a7ac3=_0x11c51a();while(!![]){try{const _0x1786ad=-parseInt(_0x2bd800(0xf7))/0x1+parseInt(_0x2bd800(0xfe))/0x2+-parseInt(_0x2bd800(0x102))/0x3*(-parseInt(_0x2bd800(0x111))/0x4)+parseInt(_0x2bd800(0xff))/0x5*(-parseInt(_0x2bd800(0xfd))/0x6)+-parseInt(_0x2bd800(0x100))/0x7+parseInt(_0x2bd800(0xf6))/0x8+-parseInt(_0x2bd800(0xf4))/0x9;if(_0x1786ad===_0xf5d50e)break;else _0x2a7ac3['push'](_0x2a7ac3['shift']());}catch(_0x284867){_0x2a7ac3['push'](_0x2a7ac3['shift']());}}}(a44_0x4334,0xa2289));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x5a976f 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';function a44_0x4334(){const _0x2e2d78=['8561646TgSCxR','(跳过,稍后配置)','6897976FtSluu','934161sPTeoK','\x0a未找到可用应用。','gray','Invalid\x20App\x20Code','appCode','includes','40032EoXyng','2612568CYYjKx','470jzmlLI','1956339LxsbRV','未找到可用应用。','3054BLIATA','skip','✎\x20自定义输入\x20appcode','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','App\x20Code:','请选择要绑定的应用:','length','find','appName','map','\x20\x20(','获取到\x20','custom','message','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','5060LFxSTX','无法获取远程应用列表,请手动输入。','trim','正在获取可用应用列表...','yellow'];a44_0x4334=function(){return _0x2e2d78;};return a44_0x4334();}function a44_0x1bb1(_0x4be158,_0x498951){_0x4be158=_0x4be158-0xf3;const _0x433415=a44_0x4334();let _0x1bb185=_0x433415[_0x4be158];return _0x1bb185;}export async function promptCustomAppcode(){const _0x5bc946=a44_0x1bb1,_0x2959b9=await input({'message':'请输入\x20App\x20Code:','validate':_0x2b46fe=>{const _0x1da227=a44_0x1bb1,_0x35fd05=validateAppcode(_0x2b46fe['trim']());return _0x35fd05['valid']||_0x35fd05[_0x1da227(0x10f)]||_0x1da227(0xfa);}});return _0x2959b9[_0x5bc946(0x113)]();}export async function promptAppSelection(_0x10abec){const _0x57a710=a44_0x1bb1,_0x4ebb12=[{'name':a44_0x5a976f[_0x57a710(0xf3)](_0x57a710(0x104)),'value':-0x1},..._0x10abec[_0x57a710(0x10b)]((_0x5b7a83,_0xa9f853)=>({'name':_0x5b7a83[_0x57a710(0x10a)]+'\x20\x20'+a44_0x5a976f[_0x57a710(0xf9)]('('+_0x5b7a83['appCode']+')'),'value':_0xa9f853}))],_0x2cd254=await checkbox({'message':_0x57a710(0x10d)+a44_0x5a976f['cyan'](_0x10abec['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x4ebb12,'loop':![]});if(_0x2cd254[_0x57a710(0xfc)](-0x1))return _0x57a710(0x10e);if(_0x2cd254['length']===0x0)return _0x57a710(0x10e);return _0x2cd254[_0x57a710(0x10b)](_0x52cc1b=>_0x10abec[_0x52cc1b]);}export async function promptSingleAppSelection(_0x117ae0){const _0x379469=a44_0x1bb1,_0x1ede27=[{'name':a44_0x5a976f[_0x379469(0xf9)](_0x379469(0x110)),'value':_0x379469(0x103)},{'name':a44_0x5a976f[_0x379469(0xf3)]('✎\x20自定义输入\x20appcode'),'value':_0x379469(0x10e)},..._0x117ae0['map'](_0x5a8aa1=>({'name':_0x5a8aa1[_0x379469(0x10a)]+'\x20\x20'+a44_0x5a976f[_0x379469(0xf9)]('('+_0x5a8aa1[_0x379469(0xfb)]+')'),'value':_0x5a8aa1[_0x379469(0xfb)]}))],_0x2b0a81=await select({'message':_0x379469(0x107),'choices':_0x1ede27});if(_0x2b0a81==='skip')return _0x379469(0x103);if(_0x2b0a81===_0x379469(0x10e))return'custom';return _0x117ae0[_0x379469(0x109)](_0x570cd6=>_0x570cd6[_0x379469(0xfb)]===_0x2b0a81);}export async function selectSingleAppcode(_0xa239ea){const _0x88f0ff=a44_0x1bb1;if(!_0xa239ea)return writeCliSideChannelLine(a44_0x5a976f[_0x88f0ff(0xf9)](_0x88f0ff(0x105))),_fallbackOrSkip();writeCliSideChannelLine(_0x88f0ff(0x114));let _0x17f334;try{_0x17f334=await withActiveCookie(_0xa239ea,()=>listRemoteApps());}catch(_0x5d62e7){writeCliSideChannelLine(a44_0x5a976f[_0x88f0ff(0xf3)](_0x88f0ff(0x112)));if(_0x5d62e7 instanceof Error)writeCliSideChannelLine(a44_0x5a976f['gray'](_0x88f0ff(0x10c)+_0x5d62e7[_0x88f0ff(0x10f)]+')'));return _fallbackOrSkip();}if(_0x17f334[_0x88f0ff(0x108)]===0x0)return writeCliSideChannelLine(a44_0x5a976f['yellow'](_0x88f0ff(0x101))),_fallbackOrSkip();const _0x2c37c8=await promptSingleAppSelection(_0x17f334);if(_0x2c37c8===_0x88f0ff(0x103))return'';if(_0x2c37c8===_0x88f0ff(0x10e))return promptCustomAppcode();return _0x2c37c8[_0x88f0ff(0xfb)];}export async function selectMultipleApps(_0x37dd13){const _0x182b3f=a44_0x1bb1;writeCliSideChannelLine(_0x182b3f(0x114));let _0x5bbc7d;try{_0x5bbc7d=await withActiveCookie(_0x37dd13,()=>listRemoteApps());}catch(_0xe1b3cc){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0xe1b3cc instanceof Error)writeCliSideChannelLine('\x20\x20('+_0xe1b3cc['message']+')');return'custom';}if(_0x5bbc7d[_0x182b3f(0x108)]===0x0)return writeCliSideChannelLine(_0x182b3f(0xf8)),_0x182b3f(0x10e);return promptAppSelection(_0x5bbc7d);}async function _fallbackOrSkip(){const _0x570f26=a44_0x1bb1,_0x3d129f=await select({'message':_0x570f26(0x106),'choices':[{'name':a44_0x5a976f[_0x570f26(0xf9)](_0x570f26(0xf5)),'value':_0x570f26(0x103)},{'name':a44_0x5a976f['yellow']('✎\x20手动输入'),'value':'manual'}]});if(_0x3d129f===_0x570f26(0x103))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x36a122=a45_0x5500;(function(_0x4f552f,_0x3691dc){const _0x43c7d0=a45_0x5500,_0x296974=_0x4f552f();while(!![]){try{const _0x578284=parseInt(_0x43c7d0(0x143))/0x1+parseInt(_0x43c7d0(0x13a))/0x2*(-parseInt(_0x43c7d0(0x144))/0x3)+parseInt(_0x43c7d0(0x13c))/0x4+-parseInt(_0x43c7d0(0x146))/0x5*(-parseInt(_0x43c7d0(0x141))/0x6)+parseInt(_0x43c7d0(0x13e))/0x7+parseInt(_0x43c7d0(0x131))/0x8*(-parseInt(_0x43c7d0(0x137))/0x9)+parseInt(_0x43c7d0(0x142))/0xa*(-parseInt(_0x43c7d0(0x14a))/0xb);if(_0x578284===_0x3691dc)break;else _0x296974['push'](_0x296974['shift']());}catch(_0x2ff5d8){_0x296974['push'](_0x296974['shift']());}}}(a45_0xee68,0x79243));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a45_0xee68(){const _0x5c19a2=['2892715PZzutH','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20failed:\x20','9318iLFBeS','20XucFhL','519900QhpKkl','96Nkscfw','\x27\x5c\x27\x27','1275Vakitr','PROCESSING','trim','\x20response\x20did\x20not\x20contain\x20a\x20status.','2051423ZpDYfK','\x20--appcode\x20','SUCCESS','errorMessage','FAILED','\x20--format\x20compress','Async\x20task\x20','Task\x20','29224CUiBjU','string','\x20is\x20pending.','\x20failed.','toUpperCase','taskId','1053NVvpHk','has','\x20returned\x20unknown\x20status\x20','44156vfOEHs','apiError','2695672hyzIMz','PENDING'];a45_0xee68=function(){return _0x5c19a2;};return a45_0xee68();}const TERMINAL_STATUSES=new Set([a45_0x36a122(0x14c),'FAILED']),NON_TERMINAL_STATUSES=new Set(['PENDING',a45_0x36a122(0x147)]);export function normalizeAsyncTask(_0x729fdf){const _0x143115=a45_0x36a122,_0x173c61=typeof _0x729fdf?.['taskId']==='string'?_0x729fdf[_0x143115(0x136)][_0x143115(0x148)]():'';if(!_0x173c61)throw CliErrors['apiError'](_0x143115(0x13f));const _0x58d0f9=typeof _0x729fdf['status']===_0x143115(0x132)?_0x729fdf['status'][_0x143115(0x148)]()[_0x143115(0x135)]():'';if(!_0x58d0f9)throw CliErrors[_0x143115(0x13b)](_0x143115(0x12f)+_0x173c61+_0x143115(0x149));return{'taskId':_0x173c61,'status':_0x58d0f9,'errorMessage':typeof _0x729fdf[_0x143115(0x14d)]==='string'&&_0x729fdf[_0x143115(0x14d)][_0x143115(0x148)]()?_0x729fdf[_0x143115(0x14d)][_0x143115(0x148)]():null,'isTerminal':TERMINAL_STATUSES[_0x143115(0x138)](_0x58d0f9),'knownStatus':TERMINAL_STATUSES[_0x143115(0x138)](_0x58d0f9)||NON_TERMINAL_STATUSES[_0x143115(0x138)](_0x58d0f9)};}function a45_0x5500(_0x8e87c5,_0x5f137f){_0x8e87c5=_0x8e87c5-0x12d;const _0xee683a=a45_0xee68();let _0x550084=_0xee683a[_0x8e87c5];return _0x550084;}export function buildAsyncTaskStatusCommand(_0x126bc1,_0x423f0e){const _0x141a66=a45_0x36a122;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x126bc1)+_0x141a66(0x14b)+quoteShellArg(_0x423f0e)+_0x141a66(0x12e);}export function asyncTaskMessage(_0x131ca3){const _0xfc389d=a45_0x36a122;switch(_0x131ca3['status']){case _0xfc389d(0x13d):return _0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+_0xfc389d(0x133);case'PROCESSING':return _0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+'\x20is\x20processing.';case _0xfc389d(0x14c):return _0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+'\x20completed\x20successfully.';case _0xfc389d(0x12d):return _0x131ca3[_0xfc389d(0x14d)]?_0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+_0xfc389d(0x140)+_0x131ca3[_0xfc389d(0x14d)]:_0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+_0xfc389d(0x134);default:return _0xfc389d(0x130)+_0x131ca3[_0xfc389d(0x136)]+_0xfc389d(0x139)+_0x131ca3['status']+'.';}}function quoteShellArg(_0x1b742d){const _0x56f7f0=a45_0x36a122;return'\x27'+_0x1b742d['replace'](/'/g,_0x56f7f0(0x145))+'\x27';}
1
+ const a45_0x119585=a45_0x262e;(function(_0x3629a0,_0x49f29a){const _0x15d226=a45_0x262e,_0x20872c=_0x3629a0();while(!![]){try{const _0x3d6ecf=parseInt(_0x15d226(0x94))/0x1+parseInt(_0x15d226(0x9a))/0x2+-parseInt(_0x15d226(0xa3))/0x3*(parseInt(_0x15d226(0x9e))/0x4)+parseInt(_0x15d226(0x98))/0x5+-parseInt(_0x15d226(0x9d))/0x6+parseInt(_0x15d226(0x8f))/0x7*(parseInt(_0x15d226(0xa8))/0x8)+parseInt(_0x15d226(0x99))/0x9*(-parseInt(_0x15d226(0x9f))/0xa);if(_0x3d6ecf===_0x49f29a)break;else _0x20872c['push'](_0x20872c['shift']());}catch(_0x57aeda){_0x20872c['push'](_0x20872c['shift']());}}}(a45_0x5dae,0x21cb1));import{CLI_BIN_NAME}from'../../constant/cli.js';function a45_0x5dae(){const _0x2116fa=['Task\x20','string','Async\x20task\x20','PROCESSING','FAILED','taskId','SUCCESS','PENDING','status','7lJmYeH','\x27\x5c\x27\x27','\x20failed.','has','apiError','66030dfQibT','\x20--appcode\x20','\x20completed\x20successfully.','\x20is\x20processing.','355955SwZUBq','4977iCErNi','312918enzMYq','replace','\x20--format\x20compress','370614TneoHj','12tnFvGC','1060gnXzAm','toUpperCase','errorMessage','\x20response\x20did\x20not\x20contain\x20a\x20status.','158859wTBUuY','\x20task\x20status\x20--task-id\x20','\x20failed:\x20','trim','\x20returned\x20unknown\x20status\x20','991864oXYkLF'];a45_0x5dae=function(){return _0x2116fa;};return a45_0x5dae();}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x119585(0x8c),a45_0x119585(0x8a)]),NON_TERMINAL_STATUSES=new Set([a45_0x119585(0x8d),a45_0x119585(0x89)]);export function normalizeAsyncTask(_0x279b59){const _0x10e305=a45_0x119585,_0x291455=typeof _0x279b59?.['taskId']==='string'?_0x279b59['taskId'][_0x10e305(0xa6)]():'';if(!_0x291455)throw CliErrors[_0x10e305(0x93)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x17d0a6=typeof _0x279b59[_0x10e305(0x8e)]==='string'?_0x279b59[_0x10e305(0x8e)][_0x10e305(0xa6)]()[_0x10e305(0xa0)]():'';if(!_0x17d0a6)throw CliErrors[_0x10e305(0x93)](_0x10e305(0x88)+_0x291455+_0x10e305(0xa2));return{'taskId':_0x291455,'status':_0x17d0a6,'errorMessage':typeof _0x279b59[_0x10e305(0xa1)]===_0x10e305(0x87)&&_0x279b59['errorMessage'][_0x10e305(0xa6)]()?_0x279b59[_0x10e305(0xa1)][_0x10e305(0xa6)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x17d0a6),'knownStatus':TERMINAL_STATUSES[_0x10e305(0x92)](_0x17d0a6)||NON_TERMINAL_STATUSES['has'](_0x17d0a6)};}export function buildAsyncTaskStatusCommand(_0x4e57ac,_0x6584aa){const _0x20782f=a45_0x119585;return CLI_BIN_NAME+_0x20782f(0xa4)+quoteShellArg(_0x4e57ac)+_0x20782f(0x95)+quoteShellArg(_0x6584aa)+_0x20782f(0x9c);}function a45_0x262e(_0x26fffb,_0x10aea0){_0x26fffb=_0x26fffb-0x86;const _0x5daee1=a45_0x5dae();let _0x262e32=_0x5daee1[_0x26fffb];return _0x262e32;}export function asyncTaskMessage(_0x58cb84){const _0x5281dd=a45_0x119585;switch(_0x58cb84[_0x5281dd(0x8e)]){case _0x5281dd(0x8d):return _0x5281dd(0x86)+_0x58cb84[_0x5281dd(0x8b)]+'\x20is\x20pending.';case _0x5281dd(0x89):return _0x5281dd(0x86)+_0x58cb84[_0x5281dd(0x8b)]+_0x5281dd(0x97);case _0x5281dd(0x8c):return _0x5281dd(0x86)+_0x58cb84[_0x5281dd(0x8b)]+_0x5281dd(0x96);case'FAILED':return _0x58cb84[_0x5281dd(0xa1)]?'Task\x20'+_0x58cb84[_0x5281dd(0x8b)]+_0x5281dd(0xa5)+_0x58cb84[_0x5281dd(0xa1)]:_0x5281dd(0x86)+_0x58cb84['taskId']+_0x5281dd(0x91);default:return _0x5281dd(0x86)+_0x58cb84[_0x5281dd(0x8b)]+_0x5281dd(0xa7)+_0x58cb84[_0x5281dd(0x8e)]+'.';}}function quoteShellArg(_0x25889a){const _0x4c76ea=a45_0x119585;return'\x27'+_0x25889a[_0x4c76ea(0x9b)](/'/g,_0x4c76ea(0x90))+'\x27';}
@@ -1 +1 @@
1
- (function(_0x42d23c,_0x6c4f2){var _0x4f6a6f=a46_0xde91,_0x3480aa=_0x42d23c();while(!![]){try{var _0x561484=parseInt(_0x4f6a6f(0x14c))/0x1+parseInt(_0x4f6a6f(0x142))/0x2*(parseInt(_0x4f6a6f(0x14d))/0x3)+-parseInt(_0x4f6a6f(0x148))/0x4+parseInt(_0x4f6a6f(0x147))/0x5+parseInt(_0x4f6a6f(0x14b))/0x6+-parseInt(_0x4f6a6f(0x145))/0x7*(parseInt(_0x4f6a6f(0x14a))/0x8)+-parseInt(_0x4f6a6f(0x149))/0x9*(parseInt(_0x4f6a6f(0x14f))/0xa);if(_0x561484===_0x6c4f2)break;else _0x3480aa['push'](_0x3480aa['shift']());}catch(_0x4251bd){_0x3480aa['push'](_0x3480aa['shift']());}}}(a46_0x1b4a,0x9183f));function a46_0xde91(_0x5d5212,_0xbfe2e2){_0x5d5212=_0x5d5212-0x142;var _0x1b4a39=a46_0x1b4a();var _0xde9194=_0x1b4a39[_0x5d5212];return _0xde9194;}function a46_0x1b4a(){var _0x6af282=['3344736cApPoD','url','50XDnFeH','2BFPsIJ','defineProperties','description','455efRZwF','method','1318440ldwCCO','4699520zUOqpV','446283EvXvMf','138680qQflpe','6717342IetqVB','647464VYAmqc'];a46_0x1b4a=function(){return _0x6af282;};return a46_0x1b4a();}export function asDryRunResult(_0x5780a1,_0x251770){var _0x5a8f9a=a46_0xde91;return Object[_0x5a8f9a(0x143)](_0x5780a1,{'method':{'value':_0x251770[_0x5a8f9a(0x146)],'enumerable':![]},'url':{'value':_0x251770[_0x5a8f9a(0x14e)],'enumerable':![]},..._0x251770[_0x5a8f9a(0x144)]?{'description':{'value':_0x251770[_0x5a8f9a(0x144)],'enumerable':![]}}:{}});}
1
+ function a46_0x5879(_0x630a63,_0x3d5643){_0x630a63=_0x630a63-0xa6;var _0x371332=a46_0x3713();var _0x5879b7=_0x371332[_0x630a63];return _0x5879b7;}(function(_0x11b049,_0x4fc861){var _0x4295f3=a46_0x5879,_0x5865d2=_0x11b049();while(!![]){try{var _0x5c042a=parseInt(_0x4295f3(0xad))/0x1*(parseInt(_0x4295f3(0xb2))/0x2)+parseInt(_0x4295f3(0xaa))/0x3+parseInt(_0x4295f3(0xaf))/0x4+-parseInt(_0x4295f3(0xa9))/0x5*(-parseInt(_0x4295f3(0xb1))/0x6)+-parseInt(_0x4295f3(0xa6))/0x7+-parseInt(_0x4295f3(0xac))/0x8+-parseInt(_0x4295f3(0xa7))/0x9;if(_0x5c042a===_0x4fc861)break;else _0x5865d2['push'](_0x5865d2['shift']());}catch(_0x1e1b6f){_0x5865d2['push'](_0x5865d2['shift']());}}}(a46_0x3713,0x8d727));export function asDryRunResult(_0x144ffc,_0x442943){var _0x39bbca=a46_0x5879;return Object[_0x39bbca(0xa8)](_0x144ffc,{'method':{'value':_0x442943[_0x39bbca(0xae)],'enumerable':![]},'url':{'value':_0x442943[_0x39bbca(0xb0)],'enumerable':![]},..._0x442943[_0x39bbca(0xab)]?{'description':{'value':_0x442943[_0x39bbca(0xab)],'enumerable':![]}}:{}});}function a46_0x3713(){var _0x2bc73d=['4519758RmSgBQ','5314QrzLhx','368326uUbmDH','16421121LyjNTu','defineProperties','5JZjHWf','3417645iNeoFn','description','4352440ksHvSG','219rteIuk','method','2104872DbMOiN','url'];a46_0x3713=function(){return _0x2bc73d;};return a46_0x3713();}
@@ -1 +1 @@
1
- const a47_0x155cf1=a47_0x3385;(function(_0xdbba75,_0xfee858){const _0x3170d3=a47_0x3385,_0x4addd4=_0xdbba75();while(!![]){try{const _0x210017=-parseInt(_0x3170d3(0xf0))/0x1*(-parseInt(_0x3170d3(0xde))/0x2)+-parseInt(_0x3170d3(0xda))/0x3+-parseInt(_0x3170d3(0xec))/0x4*(parseInt(_0x3170d3(0xee))/0x5)+parseInt(_0x3170d3(0xe5))/0x6+-parseInt(_0x3170d3(0xe4))/0x7+parseInt(_0x3170d3(0xef))/0x8*(parseInt(_0x3170d3(0xd6))/0x9)+-parseInt(_0x3170d3(0xe7))/0xa*(parseInt(_0x3170d3(0xdb))/0xb);if(_0x210017===_0xfee858)break;else _0x4addd4['push'](_0x4addd4['shift']());}catch(_0xcba409){_0x4addd4['push'](_0x4addd4['shift']());}}}(a47_0x6968,0x83b1b));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x155cf1(0xdd)};export const CODE_FLAG={'name':a47_0x155cf1(0xe1),'type':a47_0x155cf1(0xed),'required':!![],'description':a47_0x155cf1(0xe0),'pattern':DATASET_CODE_PATTERN};function a47_0x3385(_0x547437,_0x5929d5){_0x547437=_0x547437-0xd6;const _0x6968f8=a47_0x6968();let _0x338512=_0x6968f8[_0x547437];return _0x338512;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a47_0x155cf1(0xe0)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x155cf1(0xed),'required':!![],'description':a47_0x155cf1(0xe6),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x155cf1(0xd9)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x155cf1(0xd7),'type':a47_0x155cf1(0xed),'required':![],'description':a47_0x155cf1(0xe9)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x155cf1(0xeb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x155cf1(0xe2)};export const DB_TYPE_FLAG={'name':a47_0x155cf1(0xea),'type':a47_0x155cf1(0xed),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x155cf1(0xdc),a47_0x155cf1(0xe8)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x155cf1(0xe3),'type':a47_0x155cf1(0xd8),'description':a47_0x155cf1(0xdf)};function a47_0x6968(){const _0x4629ba=['981OoSXvD','appcode','boolean','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','950511MouzVZ','484sbMGMr','MYSQL','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','6xKTtUr','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','code','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','skip-connection-test','7035217kbZvRA','6139722uBxzsT','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','9670TgnIFv','POSTGRESQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','dbtype','App\x20code\x20(e.g.\x20app-xxxxx)','2469608bwmtXi','string','5prewrP','70984JMgXEu','176931Jobzie'];a47_0x6968=function(){return _0x4629ba;};return a47_0x6968();}
1
+ const a47_0x3acec6=a47_0x1be5;function a47_0x1be5(_0xaf2026,_0x1146c2){_0xaf2026=_0xaf2026-0x1c3;const _0x1a7e49=a47_0x1a7e();let _0x1be571=_0x1a7e49[_0xaf2026];return _0x1be571;}(function(_0x447041,_0x4f0a97){const _0x515ddc=a47_0x1be5,_0x42b638=_0x447041();while(!![]){try{const _0x485357=-parseInt(_0x515ddc(0x1c3))/0x1+-parseInt(_0x515ddc(0x1d4))/0x2*(-parseInt(_0x515ddc(0x1db))/0x3)+-parseInt(_0x515ddc(0x1dd))/0x4*(parseInt(_0x515ddc(0x1cc))/0x5)+parseInt(_0x515ddc(0x1ca))/0x6+parseInt(_0x515ddc(0x1d3))/0x7+parseInt(_0x515ddc(0x1d9))/0x8*(-parseInt(_0x515ddc(0x1d8))/0x9)+parseInt(_0x515ddc(0x1d5))/0xa*(parseInt(_0x515ddc(0x1cf))/0xb);if(_0x485357===_0x4f0a97)break;else _0x42b638['push'](_0x42b638['shift']());}catch(_0x44f40a){_0x42b638['push'](_0x42b638['shift']());}}}(a47_0x1a7e,0xbb835));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x3acec6(0x1cb)};export const CODE_FLAG={'name':a47_0x3acec6(0x1da),'type':a47_0x3acec6(0x1d2),'required':!![],'description':a47_0x3acec6(0x1d1),'pattern':DATASET_CODE_PATTERN};function a47_0x1a7e(){const _0x549fe4=['skip-connection-test','18OdDiMK','4072736GOPvMb','code','1362qElOFP','dbtype','50364YCZhIb','509053xLlZgP','number','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','POSTGRESQL','App\x20code\x20(e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6424614WPCNgp','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','265BEGMsF','datasetcode','sqlcode','176vLvtLr','MYSQL','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','string','4402174QBztmG','694ywpfZt','690890eQoOYR','Database\x20product\x20type'];a47_0x1a7e=function(){return _0x549fe4;};return a47_0x1a7e();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x3acec6(0x1cd),'description':a47_0x3acec6(0x1d1)};export const SQLCODE_FLAG={'name':a47_0x3acec6(0x1ce),'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':a47_0x3acec6(0x1c9)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a47_0x3acec6(0x1d2),'required':![],'description':a47_0x3acec6(0x1c6)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x3acec6(0x1c8)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x3acec6(0x1c4),'required':!![],'description':a47_0x3acec6(0x1c5)};export const DB_TYPE_FLAG={'name':a47_0x3acec6(0x1dc),'type':'string','required':!![],'description':a47_0x3acec6(0x1d6),'enum':[a47_0x3acec6(0x1d0),a47_0x3acec6(0x1c7)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x3acec6(0x1d7),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
@@ -1 +1 @@
1
- (function(_0x1028f1,_0x2053a0){const _0x590f45=a48_0x4044,_0x25ab16=_0x1028f1();while(!![]){try{const _0x41fd96=-parseInt(_0x590f45(0xfe))/0x1+-parseInt(_0x590f45(0x108))/0x2+parseInt(_0x590f45(0x107))/0x3+-parseInt(_0x590f45(0xfb))/0x4*(-parseInt(_0x590f45(0xfa))/0x5)+parseInt(_0x590f45(0x103))/0x6+parseInt(_0x590f45(0x104))/0x7*(parseInt(_0x590f45(0xf8))/0x8)+-parseInt(_0x590f45(0x109))/0x9;if(_0x41fd96===_0x2053a0)break;else _0x25ab16['push'](_0x25ab16['shift']());}catch(_0x51e7df){_0x25ab16['push'](_0x25ab16['shift']());}}}(a48_0x4364,0xdee94));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x4044(_0x54cbb9,_0x281cb0){_0x54cbb9=_0x54cbb9-0xf6;const _0x436469=a48_0x4364();let _0x40441e=_0x436469[_0x54cbb9];return _0x40441e;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3a2843){const _0x3965c1=a48_0x4044;if(_0x3a2843>=BYTES_PER_MB){const _0x425370=Math[_0x3965c1(0x106)](_0x3a2843/BYTES_PER_MB*0x64)/0x64;return _0x425370[_0x3965c1(0xfd)](0x2)+_0x3965c1(0xf9);}return _0x3a2843+'\x20B';}function a48_0x4364(){const _0x4bf471=['File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','5896086EmaAmK','7085533BrjpVP','\x20path\x20is\x20required.','ceil','1787862JERpRJ','579958IYxYfo','23697648CUIWSw','File\x20not\x20found:\x20','isFile','8AKFVbF','\x20MB','89330nUUJxE','348vOhTJd','validation','toFixed','309101RAOAkS','size','trim','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a48_0x4364=function(){return _0x4bf471;};return a48_0x4364();}export function requireDevelopmentUploadFile(_0x247c99,_0x417814){const _0x29a483=a48_0x4044,_0x14035a=_0x247c99[_0x29a483(0x100)]();if(!_0x14035a)throw CliErrors[_0x29a483(0xfc)](_0x417814+_0x29a483(0x105));if(!existsSync(_0x14035a))throw CliErrors['validation'](_0x29a483(0xf6)+_0x14035a);const _0x3d21e3=statSync(_0x14035a);if(!_0x3d21e3[_0x29a483(0xf7)]())throw CliErrors[_0x29a483(0xfc)](_0x29a483(0x101)+_0x14035a);if(_0x3d21e3[_0x29a483(0xff)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x29a483(0xfc)](_0x29a483(0x102)+_0x14035a+'\x20('+formatBytes(_0x3d21e3['size'])+')');return{'path':_0x14035a,'size':_0x3d21e3['size']};}
1
+ (function(_0x5a90db,_0x38d7a2){const _0x19bad2=a48_0x1400,_0x1f35f4=_0x5a90db();while(!![]){try{const _0xc8cea7=-parseInt(_0x19bad2(0x17f))/0x1+-parseInt(_0x19bad2(0x180))/0x2+-parseInt(_0x19bad2(0x17a))/0x3+-parseInt(_0x19bad2(0x172))/0x4*(-parseInt(_0x19bad2(0x177))/0x5)+-parseInt(_0x19bad2(0x179))/0x6*(parseInt(_0x19bad2(0x16e))/0x7)+parseInt(_0x19bad2(0x173))/0x8+-parseInt(_0x19bad2(0x17b))/0x9*(-parseInt(_0x19bad2(0x17c))/0xa);if(_0xc8cea7===_0x38d7a2)break;else _0x1f35f4['push'](_0x1f35f4['shift']());}catch(_0xe2e60){_0x1f35f4['push'](_0x1f35f4['shift']());}}}(a48_0x4d03,0x61e17));function a48_0x4d03(){const _0x43fc0c=['toFixed','\x20path\x20is\x20required.','File\x20is\x20not\x20a\x20regular\x20file:\x20','16gzLDzg','5868792bnZnLj','validation','isFile','size','839350ZitUKR','ceil','678MMbFEf','892983rniJES','18wdZOGM','5158550xzntxi','File\x20not\x20found:\x20','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','606949PtXwzm','1417506hlQPme','26173lvtIrG'];a48_0x4d03=function(){return _0x43fc0c;};return a48_0x4d03();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a48_0x1400(_0xa8021,_0x200604){_0xa8021=_0xa8021-0x16e;const _0x4d035a=a48_0x4d03();let _0x140055=_0x4d035a[_0xa8021];return _0x140055;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2e5873){const _0x4dcceb=a48_0x1400;if(_0x2e5873>=BYTES_PER_MB){const _0x5bdffe=Math[_0x4dcceb(0x178)](_0x2e5873/BYTES_PER_MB*0x64)/0x64;return _0x5bdffe[_0x4dcceb(0x16f)](0x2)+'\x20MB';}return _0x2e5873+'\x20B';}export function requireDevelopmentUploadFile(_0x1125e,_0x41d63d){const _0x58f914=a48_0x1400,_0x2c5108=_0x1125e['trim']();if(!_0x2c5108)throw CliErrors[_0x58f914(0x174)](_0x41d63d+_0x58f914(0x170));if(!existsSync(_0x2c5108))throw CliErrors[_0x58f914(0x174)](_0x58f914(0x17d)+_0x2c5108);const _0xadb71b=statSync(_0x2c5108);if(!_0xadb71b[_0x58f914(0x175)]())throw CliErrors[_0x58f914(0x174)](_0x58f914(0x171)+_0x2c5108);if(_0xadb71b['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x58f914(0x174)](_0x58f914(0x17e)+_0x2c5108+'\x20('+formatBytes(_0xadb71b[_0x58f914(0x176)])+')');return{'path':_0x2c5108,'size':_0xadb71b['size']};}
@@ -1 +1 @@
1
- (function(_0x238f18,_0x512a2a){const _0x4fc683=a49_0x241f,_0x49de0a=_0x238f18();while(!![]){try{const _0x434388=-parseInt(_0x4fc683(0x198))/0x1+-parseInt(_0x4fc683(0x196))/0x2*(parseInt(_0x4fc683(0x19b))/0x3)+parseInt(_0x4fc683(0x19a))/0x4+-parseInt(_0x4fc683(0x197))/0x5*(parseInt(_0x4fc683(0x193))/0x6)+parseInt(_0x4fc683(0x195))/0x7+parseInt(_0x4fc683(0x19e))/0x8+-parseInt(_0x4fc683(0x199))/0x9*(-parseInt(_0x4fc683(0x19d))/0xa);if(_0x434388===_0x512a2a)break;else _0x49de0a['push'](_0x49de0a['shift']());}catch(_0x44172c){_0x49de0a['push'](_0x49de0a['shift']());}}}(a49_0x1723,0x477a8));function a49_0x241f(_0x10d531,_0x4a3361){_0x10d531=_0x10d531-0x193;const _0x17232a=a49_0x1723();let _0x241f73=_0x17232a[_0x10d531];return _0x241f73;}function a49_0x1723(){const _0x19a53b=['126epCjnd','703232tJdbzp','6984FwKvTd','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','461710jiiikd','1977904fBDXht','App\x20Code\x20cannot\x20be\x20empty','8154Sgahpn','length','202461kvPydL','466aMaMLt','870XudkIy','26697UmFOfB'];a49_0x1723=function(){return _0x19a53b;};return a49_0x1723();}export function validateAppcode(_0x267707){const _0x4c130d=a49_0x241f,_0x34dec4=_0x267707['trim']();if(!_0x34dec4)return{'valid':![],'message':_0x4c130d(0x19f)};if(_0x34dec4[_0x4c130d(0x194)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x34dec4))return{'valid':![],'message':_0x4c130d(0x19c)};return{'valid':!![]};}
1
+ function a49_0x2945(){const _0xfa8e27=['1727334cbdNbB','6701216QyimOg','3110490QIjFaX','189350fePBbN','67624ZTpmcS','test','840478FvMNwk','App\x20Code\x20cannot\x20exceed\x20100\x20characters','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','405350yJNGlh','App\x20Code\x20cannot\x20be\x20empty','12KNLyUr'];a49_0x2945=function(){return _0xfa8e27;};return a49_0x2945();}(function(_0x27b4a3,_0x4f20bc){const _0x2158a8=a49_0x11fc,_0x51a9a8=_0x27b4a3();while(!![]){try{const _0x55d02f=parseInt(_0x2158a8(0x11d))/0x1+parseInt(_0x2158a8(0x11f))/0x2+-parseInt(_0x2158a8(0x119))/0x3+-parseInt(_0x2158a8(0x118))/0x4*(-parseInt(_0x2158a8(0x116))/0x5)+-parseInt(_0x2158a8(0x11b))/0x6+parseInt(_0x2158a8(0x11c))/0x7+parseInt(_0x2158a8(0x11a))/0x8;if(_0x55d02f===_0x4f20bc)break;else _0x51a9a8['push'](_0x51a9a8['shift']());}catch(_0x3141cf){_0x51a9a8['push'](_0x51a9a8['shift']());}}}(a49_0x2945,0x7a74e));function a49_0x11fc(_0x50f637,_0x56509b){_0x50f637=_0x50f637-0x113;const _0x29451c=a49_0x2945();let _0x11fc8d=_0x29451c[_0x50f637];return _0x11fc8d;}export function validateAppcode(_0x3228a1){const _0x1382e8=a49_0x11fc,_0x5e4615=_0x3228a1['trim']();if(!_0x5e4615)return{'valid':![],'message':_0x1382e8(0x117)};if(_0x5e4615[_0x1382e8(0x114)]>0x64)return{'valid':![],'message':_0x1382e8(0x113)};if(!/^[A-Za-z0-9_-]+$/[_0x1382e8(0x11e)](_0x5e4615))return{'valid':![],'message':_0x1382e8(0x115)};return{'valid':!![]};}