@lovrabet/rabetbase-cli 2.3.16-beta.5 → 2.3.16-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.d.ts +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.d.ts +4 -4
  240. package/lib/generated/build-info.js +1 -1
  241. package/lib/help.js +1 -1
  242. package/lib/runtime/confirmation.js +1 -1
  243. package/lib/runtime/event.js +1 -1
  244. package/lib/runtime/index.js +1 -1
  245. package/lib/runtime/queue.js +1 -1
  246. package/lib/runtime/resolve.js +1 -1
  247. package/lib/skills/main.js +1 -1
  248. package/lib/skills/npx-skills-add.js +1 -1
  249. package/lib/skills/skill-presence.js +1 -1
  250. package/lib/telemetry/cli-command-trace.js +1 -1
  251. package/lib/telemetry/cli-help-trace.js +1 -1
  252. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  253. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  254. package/lib/telemetry/send-cli-trace-log.js +1 -1
  255. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  256. package/lib/utils/ai_config.js +1 -1
  257. package/lib/utils/apply-jq-filter.js +1 -1
  258. package/lib/utils/cdn-config.js +1 -1
  259. package/lib/utils/check-sdk-version.js +1 -1
  260. package/lib/utils/cli-version-check.js +1 -1
  261. package/lib/utils/cli-version-policy.js +1 -1
  262. package/lib/utils/config.js +1 -1
  263. package/lib/utils/copy-directory.js +1 -1
  264. package/lib/utils/entity-with-id.js +1 -1
  265. package/lib/utils/file-utils.js +1 -1
  266. package/lib/utils/guides-cdn.js +1 -1
  267. package/lib/utils/http-client.js +1 -1
  268. package/lib/utils/is-non-interactive.js +1 -1
  269. package/lib/utils/logger.js +1 -1
  270. package/lib/utils/params.js +1 -1
  271. package/lib/utils/platform.js +1 -1
  272. package/lib/utils/rules-cdn.js +1 -1
  273. package/lib/utils/sleep.js +1 -1
  274. package/lib/utils/template-replacer.js +1 -1
  275. package/lib/utils/update-notice.js +1 -1
  276. package/lib/utils/version.js +1 -1
  277. package/lib/utils/with-active-cookie.js +1 -1
  278. package/lib/utils/write-cli-side-channel.js +1 -1
  279. package/package.json +1 -1
@@ -1 +1 @@
1
- const a34_0x4dc76=a34_0x59a8;function a34_0x59a8(_0x550963,_0x221bed){_0x550963=_0x550963-0x198;const _0x208e2d=a34_0x208e();let _0x59a89f=_0x208e2d[_0x550963];return _0x59a89f;}(function(_0x49ed46,_0x33dca1){const _0x49d051=a34_0x59a8,_0x12f1f4=_0x49ed46();while(!![]){try{const _0x4758cc=-parseInt(_0x49d051(0x1a4))/0x1+parseInt(_0x49d051(0x1ac))/0x2*(parseInt(_0x49d051(0x1b6))/0x3)+parseInt(_0x49d051(0x19f))/0x4*(-parseInt(_0x49d051(0x1a5))/0x5)+parseInt(_0x49d051(0x1b7))/0x6+-parseInt(_0x49d051(0x1b2))/0x7*(parseInt(_0x49d051(0x1b3))/0x8)+-parseInt(_0x49d051(0x1ab))/0x9*(parseInt(_0x49d051(0x19e))/0xa)+parseInt(_0x49d051(0x1a3))/0xb;if(_0x4758cc===_0x33dca1)break;else _0x12f1f4['push'](_0x12f1f4['shift']());}catch(_0x47c669){_0x12f1f4['push'](_0x12f1f4['shift']());}}}(a34_0x208e,0x32d3f));import{listBffScripts}from'../../core/api-client.js';function a34_0x208e(){const _0x3c7c6f=['17710EoIjFL','name','length','appCode','scriptType','description','9eXhsui','114888cCzBSc','str','functionName','map','Return\x20full\x20script\x20objects','verbose','64029ldZbnT','168voiOYp','ENDPOINT','Filter\x20by\x20script\x20name','21aVQKmq','2273214LSxGQl','string','bool','COMMON','List\x20BFF\x20scripts','list','(unnamed)','1859080pDLQmk','40aDuEWv','boolean','read','type','562452NupJZX','210503tryERu'];a34_0x208e=function(){return _0x3c7c6f;};return a34_0x208e();}export const bffList={'service':'bff','command':a34_0x4dc76(0x19c),'description':a34_0x4dc76(0x19b),'risk':a34_0x4dc76(0x1a1),'flags':[{'name':a34_0x4dc76(0x1a2),'type':a34_0x4dc76(0x198),'description':'Script\x20type\x20filter','default':'ENDPOINT','enum':[a34_0x4dc76(0x1b4),a34_0x4dc76(0x19a)]},{'name':a34_0x4dc76(0x1a6),'type':a34_0x4dc76(0x198),'description':a34_0x4dc76(0x1b5)},{'name':'verbose','type':a34_0x4dc76(0x1a0),'description':a34_0x4dc76(0x1b0)}],async 'execute'(_0x20d95a){const _0x38a767=a34_0x4dc76,_0x42d1b2=await listBffScripts(_0x20d95a[_0x38a767(0x1a8)],_0x20d95a[_0x38a767(0x1ad)](_0x38a767(0x1a2)),{'scriptName':_0x20d95a['str'](_0x38a767(0x1a6))||undefined}),_0x14decd=_0x20d95a[_0x38a767(0x199)](_0x38a767(0x1b1));return{'ok':!![],'data':_0x14decd?_0x42d1b2:_0x42d1b2[_0x38a767(0x1af)](_0x4c6729=>({'id':_0x4c6729['id'],'functionName':_0x4c6729[_0x38a767(0x1ae)]??'','description':_0x4c6729[_0x38a767(0x1aa)]||_0x38a767(0x19d),'scriptType':_0x4c6729[_0x38a767(0x1a9)]})),'message':_0x42d1b2[_0x38a767(0x1a7)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
1
+ const a34_0x480370=a34_0x750d;function a34_0x750d(_0x43eb75,_0x55f17d){_0x43eb75=_0x43eb75-0x1ce;const _0x3567cc=a34_0x3567();let _0x750da7=_0x3567cc[_0x43eb75];return _0x750da7;}(function(_0x13cf10,_0x422208){const _0x2edec7=a34_0x750d,_0x37a849=_0x13cf10();while(!![]){try{const _0x25d687=-parseInt(_0x2edec7(0x1d3))/0x1*(parseInt(_0x2edec7(0x1e8))/0x2)+parseInt(_0x2edec7(0x1d6))/0x3*(parseInt(_0x2edec7(0x1dd))/0x4)+parseInt(_0x2edec7(0x1d2))/0x5*(-parseInt(_0x2edec7(0x1eb))/0x6)+parseInt(_0x2edec7(0x1ea))/0x7*(parseInt(_0x2edec7(0x1e3))/0x8)+-parseInt(_0x2edec7(0x1dc))/0x9*(-parseInt(_0x2edec7(0x1df))/0xa)+-parseInt(_0x2edec7(0x1e2))/0xb*(parseInt(_0x2edec7(0x1cf))/0xc)+-parseInt(_0x2edec7(0x1e6))/0xd*(-parseInt(_0x2edec7(0x1ed))/0xe);if(_0x25d687===_0x422208)break;else _0x37a849['push'](_0x37a849['shift']());}catch(_0x443a48){_0x37a849['push'](_0x37a849['shift']());}}}(a34_0x3567,0x6960a));function a34_0x3567(){const _0x3a7cc1=['133ifPbTt','234fDdlTZ','str','11914arjoKn','verbose','120VKwJiS','length','scriptType','58570fKVToN','1JECDtt','type','Script\x20type\x20filter','8109hoVIHY','bool','name','ENDPOINT','map','description','1526193sCvDRm','104yErhsf','bff','10qrFmCm','string','functionName','602195qeBfDq','205592GjdelF','read','COMMON','16367uaQmZF','list','727246kdNtcJ','List\x20BFF\x20scripts'];a34_0x3567=function(){return _0x3a7cc1;};return a34_0x3567();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x480370(0x1de),'command':a34_0x480370(0x1e7),'description':a34_0x480370(0x1e9),'risk':a34_0x480370(0x1e4),'flags':[{'name':a34_0x480370(0x1d4),'type':'string','description':a34_0x480370(0x1d5),'default':a34_0x480370(0x1d9),'enum':[a34_0x480370(0x1d9),a34_0x480370(0x1e5)]},{'name':'name','type':a34_0x480370(0x1e0),'description':'Filter\x20by\x20script\x20name'},{'name':a34_0x480370(0x1ce),'type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x402fdb){const _0x306285=a34_0x480370,_0x4d716a=await listBffScripts(_0x402fdb['appCode'],_0x402fdb[_0x306285(0x1ec)](_0x306285(0x1d4)),{'scriptName':_0x402fdb[_0x306285(0x1ec)](_0x306285(0x1d8))||undefined}),_0x2d2212=_0x402fdb[_0x306285(0x1d7)]('verbose');return{'ok':!![],'data':_0x2d2212?_0x4d716a:_0x4d716a[_0x306285(0x1da)](_0x2f5942=>({'id':_0x2f5942['id'],'functionName':_0x2f5942[_0x306285(0x1e1)]??'','description':_0x2f5942[_0x306285(0x1db)]||'(unnamed)','scriptType':_0x2f5942[_0x306285(0x1d1)]})),'message':_0x4d716a[_0x306285(0x1d0)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
1
- const a35_0x151f79=a35_0x526c;(function(_0x32ab6d,_0x168313){const _0x39d838=a35_0x526c,_0x35dcd6=_0x32ab6d();while(!![]){try{const _0x11c494=-parseInt(_0x39d838(0x19d))/0x1*(parseInt(_0x39d838(0x18b))/0x2)+parseInt(_0x39d838(0x181))/0x3+-parseInt(_0x39d838(0x1b6))/0x4+parseInt(_0x39d838(0x1ab))/0x5*(parseInt(_0x39d838(0x175))/0x6)+parseInt(_0x39d838(0x18f))/0x7*(parseInt(_0x39d838(0x19e))/0x8)+parseInt(_0x39d838(0x1a6))/0x9+parseInt(_0x39d838(0x187))/0xa*(-parseInt(_0x39d838(0x194))/0xb);if(_0x11c494===_0x168313)break;else _0x35dcd6['push'](_0x35dcd6['shift']());}catch(_0x516ce0){_0x35dcd6['push'](_0x35dcd6['shift']());}}}(a35_0xfbea,0xc5f77));function a35_0xfbea(){const _0x65de9=['appCode','functionNode','hash','HOOK','4990464YoGHrX','includes','Force\x20pull\x20cancelled.','local\x20unsynced\x20changes','hookLocation','5jUpCwZ','map','Pull\x20only\x20this\x20script\x20type','apiDir','COMMON','\x22\x20not\x20found\x20after\x20ensureLockScope.','lockKey','message','Remote\x20script\x20missing\x20content.','ENDPOINT','scriptContent','3524464CdCNhw','alias','stderr','\x20remote\x20BFF\x20script(s)\x20for\x20pull','scriptsRoot','stringify','boolean','scriptType','conflict','4478412nUcnZn','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','close','nonInteractive','toLowerCase','functions','functionName','stdin','Would\x20inspect\x20','toISOString','validation','pull','2429697ewmGEz','utf8','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','str','lockFilePath','parse','1566230TDFhov','operationType','Force\x20overwrite\x20local\x20unsynced\x20changes','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','2jgPkIK','filePath','\x20pulled,\x20','push','28gHbPFn','/api/management/library/scripts/list?appCode=','datasetCode','Remote\x20script\x20missing\x20id.','\x20skipped,\x20','33SfOOvJ','string','skipped','&type=','read','Pull\x20complete:\x20','apps','yes','bff','992237BBcSAr','2086592YHcysG','type','length','\x20failed'];a35_0xfbea=function(){return _0x65de9;};return a35_0xfbea();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a35_0x526c(_0x511050,_0x28458f){_0x511050=_0x511050-0x16f;const _0xfbea8e=a35_0xfbea();let _0x526cae=_0xfbea8e[_0x511050];return _0x526cae;}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x151f79(0x19c),'command':a35_0x151f79(0x180),'description':a35_0x151f79(0x183),'risk':a35_0x151f79(0x198),'flags':[{'name':a35_0x151f79(0x19f),'type':a35_0x151f79(0x195),'description':a35_0x151f79(0x1ad),'enum':[a35_0x151f79(0x1af),a35_0x151f79(0x1b4),a35_0x151f79(0x1a5)]},{'name':'force','type':a35_0x151f79(0x172),'description':a35_0x151f79(0x189)}],async 'dryRun'(_0x5c21ca){const _0x8cbe90=a35_0x151f79,_0x2a8498=loadBffProjectConfig(_0x5c21ca[_0x8cbe90(0x1a2)]),_0x43b1cf=await readBffLockFile(_0x2a8498['lockFilePath']),{appLock:_0x4cd164}=ensureLockScope(_0x43b1cf??createEmptyBffLock(),_0x5c21ca[_0x8cbe90(0x1a2)],_0x2a8498[_0x8cbe90(0x170)],'pull'),_0x45f1c2=normalizeBffType(_0x5c21ca[_0x8cbe90(0x184)]('type'))??undefined,_0x5c43f3=buildDatasetCodeToAliasMap(_0x5c21ca['apiDir'],_0x5c21ca[_0x8cbe90(0x1a2)]),[_0xefdf6f,_0x22ef88]=await Promise['all']([listBffScripts(_0x5c21ca[_0x8cbe90(0x1a2)],_0x45f1c2),getBffScriptStatistics(_0x5c21ca[_0x8cbe90(0x1a2)])]),_0x4900ff=createHookLocationMap(_0x22ef88),_0x17015c=[];for(const _0x53a904 of _0xefdf6f){const _0x2fb0c0=resolveRemoteScriptTarget(_0x2a8498,_0x53a904,_0x4900ff,_0x4cd164['functions'],_0x5c43f3);if(!_0x2fb0c0){_0x17015c[_0x8cbe90(0x18e)]({'scriptType':_0x53a904['scriptType'],'functionName':_0x53a904[_0x8cbe90(0x17b)]??'','status':_0x8cbe90(0x196),'reason':'unresolvable\x20target\x20path'});continue;}const _0x213fa5=_0x4cd164['functions'][_0x2fb0c0['lockKey']],_0x2760d6=_0x53a904['scriptContent']!=null?computeContentHash(_0x53a904[_0x8cbe90(0x1b5)]):undefined,_0x1a6c75=await hasUnsyncedLocalChanges(_0x2fb0c0[_0x8cbe90(0x18c)],_0x213fa5,_0x2760d6);_0x17015c[_0x8cbe90(0x18e)]({'lockKey':_0x2fb0c0[_0x8cbe90(0x1b1)],'filePath':_0x2fb0c0[_0x8cbe90(0x18c)],'remoteId':_0x53a904['id']??null,'status':_0x1a6c75?_0x8cbe90(0x174):'would_pull'});}return{'method':'GET','url':_0x8cbe90(0x190)+_0x5c21ca[_0x8cbe90(0x1a2)]+(_0x45f1c2?_0x8cbe90(0x197)+_0x45f1c2:''),'body':{'appCode':_0x5c21ca[_0x8cbe90(0x1a2)],'filterType':_0x45f1c2??null,'files':_0x17015c},'description':_0x8cbe90(0x17d)+_0x17015c[_0x8cbe90(0x1a0)]+_0x8cbe90(0x16f)};},async 'execute'(_0x3084b7){const _0x2a8571=a35_0x151f79,_0x77aab4=loadBffProjectConfig(_0x3084b7[_0x2a8571(0x1a2)]),_0x33c5b8=await readBffLockFile(_0x77aab4[_0x2a8571(0x185)]),{lockData:_0x22f93d,appLock:_0xc60fa0}=ensureLockScope(_0x33c5b8??createEmptyBffLock(),_0x3084b7[_0x2a8571(0x1a2)],_0x77aab4['scriptsRoot'],'pull'),_0x389e27=normalizeBffType(_0x3084b7[_0x2a8571(0x184)](_0x2a8571(0x19f)))??undefined;if(_0x3084b7[_0x2a8571(0x184)](_0x2a8571(0x19f))&&!_0x389e27)throw CliErrors[_0x2a8571(0x17f)](_0x2a8571(0x18a));const [_0x9052ee,_0x4c203c]=await Promise['all']([listBffScripts(_0x3084b7[_0x2a8571(0x1a2)],_0x389e27),getBffScriptStatistics(_0x3084b7[_0x2a8571(0x1a2)])]);if(_0x9052ee[_0x2a8571(0x1a0)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x4aa655=_0x3084b7['bool']('force');if(_0x4aa655&&!_0x3084b7[_0x2a8571(0x178)]){const _0x793ab2=await confirmForce();if(!_0x793ab2)throw CliErrors['cancelled'](_0x2a8571(0x1a8));}if(_0x4aa655&&_0x3084b7[_0x2a8571(0x178)]){}const _0x10c152=buildDatasetCodeToAliasMap(_0x3084b7[_0x2a8571(0x1ae)],_0x3084b7[_0x2a8571(0x1a2)]),_0x135802=createHookLocationMap(_0x4c203c),_0x34d2e5=JSON[_0x2a8571(0x186)](JSON[_0x2a8571(0x171)](_0x22f93d)),_0x31e212=_0x3084b7[_0x2a8571(0x1a2)],_0x3d63aa=_0x34d2e5[_0x2a8571(0x19a)][_0x31e212];if(!_0x3d63aa)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x31e212+_0x2a8571(0x1b0));const _0x4b7dbc=[],_0x29c1c0=[],_0x19f51b=[];for(const _0x323f46 of _0x9052ee){const _0x43b2ea=resolveRemoteScriptTarget(_0x77aab4,_0x323f46,_0x135802,_0xc60fa0[_0x2a8571(0x17a)],_0x10c152);if(!_0x43b2ea){_0x29c1c0[_0x2a8571(0x18e)]({'lockKey':_0x323f46[_0x2a8571(0x173)]+'/'+_0x323f46['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x11dc5b=_0xc60fa0[_0x2a8571(0x17a)][_0x43b2ea[_0x2a8571(0x1b1)]];try{if(!_0x323f46['id'])throw new Error(_0x2a8571(0x192));if(_0x323f46[_0x2a8571(0x1b5)]==null)throw new Error(_0x2a8571(0x1b3));const _0x31b661=_0x323f46[_0x2a8571(0x1b5)],_0x38261e=computeContentHash(_0x31b661);if(!_0x4aa655){const _0x47a2cf=await hasUnsyncedLocalChanges(_0x43b2ea[_0x2a8571(0x18c)],_0x11dc5b,_0x38261e);if(_0x47a2cf){_0x29c1c0[_0x2a8571(0x18e)]({'lockKey':_0x43b2ea['lockKey'],'reason':_0x2a8571(0x1a9)});continue;}}await ensureParentDirectory(_0x43b2ea[_0x2a8571(0x18c)]),await writeFile(_0x43b2ea['filePath'],_0x31b661,_0x2a8571(0x182));const _0x52bc76={'hash':_0x38261e,'remoteId':_0x323f46['id'],'version':_0x323f46['version']};_0x43b2ea[_0x2a8571(0x19f)]===_0x2a8571(0x1a5)&&_0x43b2ea['hookLocation']&&(_0x52bc76[_0x2a8571(0x1b7)]=_0x43b2ea[_0x2a8571(0x1aa)][_0x2a8571(0x1b7)],_0x52bc76['datasetCode']=_0x43b2ea[_0x2a8571(0x1aa)][_0x2a8571(0x191)],_0x52bc76[_0x2a8571(0x188)]=_0x43b2ea[_0x2a8571(0x1aa)]['operationType'],_0x52bc76[_0x2a8571(0x1a3)]=_0x43b2ea['hookLocation'][_0x2a8571(0x1a3)]),_0x3d63aa['functions'][_0x43b2ea[_0x2a8571(0x1b1)]]=_0x52bc76,_0x4b7dbc[_0x2a8571(0x18e)]({'lockKey':_0x43b2ea[_0x2a8571(0x1b1)],'remoteId':_0x323f46['id']});}catch(_0x400daf){_0x19f51b['push']({'lockKey':_0x43b2ea[_0x2a8571(0x1b1)],'error':_0x400daf instanceof Error?_0x400daf[_0x2a8571(0x1b2)]:String(_0x400daf)});}}return _0x3d63aa['lastSync']=new Date()[_0x2a8571(0x17e)](),await writeBffLockFile(_0x77aab4['lockFilePath'],_0x34d2e5),{'ok':_0x19f51b[_0x2a8571(0x1a0)]===0x0,'data':{'pulled':_0x4b7dbc,'skipped':_0x29c1c0,'failed':_0x19f51b},'message':_0x2a8571(0x199)+_0x4b7dbc[_0x2a8571(0x1a0)]+_0x2a8571(0x18d)+_0x29c1c0[_0x2a8571(0x1a0)]+_0x2a8571(0x193)+_0x19f51b[_0x2a8571(0x1a0)]+_0x2a8571(0x1a1)};}};async function hasUnsyncedLocalChanges(_0x1db768,_0x342176,_0x54024d){const _0x420e43=a35_0x151f79;if(!await fileExists(_0x1db768))return![];const _0x5a961c=await computeFileHash(_0x1db768);if(!_0x342176)return _0x54024d?_0x5a961c!==_0x54024d:!![];return _0x5a961c!==_0x342176[_0x420e43(0x1a4)];}function buildDatasetCodeToAliasMap(_0x5f0161,_0x59e39c){const _0x590792=a35_0x151f79,_0x3e7f64=loadAliasMap(_0x5f0161,undefined,resolveApiFilePath(_0x5f0161,_0x59e39c));return new Map(_0x3e7f64[_0x590792(0x1ac)](_0x29d867=>[_0x29d867[_0x590792(0x191)],_0x29d867[_0x590792(0x1b7)]]));}async function confirmForce(){const _0x5aa615=a35_0x151f79,_0x3a9a49=createInterface({'input':process[_0x5aa615(0x17c)],'output':process[_0x5aa615(0x1b8)]}),_0x57386b=await new Promise(_0x5b6d24=>{const _0x308946=_0x5aa615;_0x3a9a49['question'](_0x308946(0x176),_0x5b6d24);});return _0x3a9a49[_0x5aa615(0x177)](),['y',_0x5aa615(0x19b)][_0x5aa615(0x1a7)](_0x57386b['trim']()[_0x5aa615(0x179)]());}
1
+ const a35_0x1ba252=a35_0x906a;(function(_0x145f97,_0x1ca1be){const _0x94150e=a35_0x906a,_0x41d247=_0x145f97();while(!![]){try{const _0x37d465=parseInt(_0x94150e(0x224))/0x1*(-parseInt(_0x94150e(0x22a))/0x2)+parseInt(_0x94150e(0x1eb))/0x3*(-parseInt(_0x94150e(0x232))/0x4)+parseInt(_0x94150e(0x1ff))/0x5+parseInt(_0x94150e(0x219))/0x6+-parseInt(_0x94150e(0x1fc))/0x7*(-parseInt(_0x94150e(0x212))/0x8)+-parseInt(_0x94150e(0x1ee))/0x9+parseInt(_0x94150e(0x202))/0xa*(parseInt(_0x94150e(0x1f5))/0xb);if(_0x37d465===_0x1ca1be)break;else _0x41d247['push'](_0x41d247['shift']());}catch(_0x157f98){_0x41d247['push'](_0x41d247['shift']());}}}(a35_0x8ce6,0xcf64a));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x1ba252(0x1f4),'command':a35_0x1ba252(0x208),'description':a35_0x1ba252(0x228),'risk':a35_0x1ba252(0x216),'flags':[{'name':'type','type':a35_0x1ba252(0x21a),'description':a35_0x1ba252(0x229),'enum':[a35_0x1ba252(0x1f8),a35_0x1ba252(0x1f1),'HOOK']},{'name':a35_0x1ba252(0x1fa),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x17d3a9){const _0x111105=a35_0x1ba252,_0x42881b=loadBffProjectConfig(_0x17d3a9[_0x111105(0x205)]),_0x16509a=await readBffLockFile(_0x42881b[_0x111105(0x1fb)]),{appLock:_0x116988}=ensureLockScope(_0x16509a??createEmptyBffLock(),_0x17d3a9[_0x111105(0x205)],_0x42881b[_0x111105(0x204)],_0x111105(0x208)),_0x204fbb=normalizeBffType(_0x17d3a9[_0x111105(0x209)]('type'))??undefined,_0x29659c=buildDatasetCodeToAliasMap(_0x17d3a9[_0x111105(0x201)],_0x17d3a9['appCode']),[_0x33d6d4,_0x37f948]=await Promise[_0x111105(0x21d)]([listBffScripts(_0x17d3a9[_0x111105(0x205)],_0x204fbb),getBffScriptStatistics(_0x17d3a9[_0x111105(0x205)])]),_0x1a1e83=createHookLocationMap(_0x37f948),_0x445ef4=[];for(const _0x3e525e of _0x33d6d4){const _0x46a2f5=resolveRemoteScriptTarget(_0x42881b,_0x3e525e,_0x1a1e83,_0x116988[_0x111105(0x211)],_0x29659c);if(!_0x46a2f5){_0x445ef4[_0x111105(0x1ed)]({'scriptType':_0x3e525e[_0x111105(0x21f)],'functionName':_0x3e525e[_0x111105(0x230)]??'','status':'skipped','reason':'unresolvable\x20target\x20path'});continue;}const _0x14963e=_0x116988[_0x111105(0x211)][_0x46a2f5['lockKey']],_0x2a2b79=_0x3e525e[_0x111105(0x1ef)]!=null?computeContentHash(_0x3e525e[_0x111105(0x1ef)]):undefined,_0x54d62f=await hasUnsyncedLocalChanges(_0x46a2f5[_0x111105(0x20b)],_0x14963e,_0x2a2b79);_0x445ef4[_0x111105(0x1ed)]({'lockKey':_0x46a2f5['lockKey'],'filePath':_0x46a2f5[_0x111105(0x20b)],'remoteId':_0x3e525e['id']??null,'status':_0x54d62f?'conflict':_0x111105(0x1e9)});}return{'method':_0x111105(0x226),'url':_0x111105(0x20a)+_0x17d3a9[_0x111105(0x205)]+(_0x204fbb?_0x111105(0x1ec)+_0x204fbb:''),'body':{'appCode':_0x17d3a9[_0x111105(0x205)],'filterType':_0x204fbb??null,'files':_0x445ef4},'description':_0x111105(0x206)+_0x445ef4[_0x111105(0x1f3)]+_0x111105(0x227)};},async 'execute'(_0x5afdf9){const _0x16dac7=a35_0x1ba252,_0x4bacd2=loadBffProjectConfig(_0x5afdf9[_0x16dac7(0x205)]),_0x1698cc=await readBffLockFile(_0x4bacd2[_0x16dac7(0x1fb)]),{lockData:_0x284295,appLock:_0x49205e}=ensureLockScope(_0x1698cc??createEmptyBffLock(),_0x5afdf9[_0x16dac7(0x205)],_0x4bacd2[_0x16dac7(0x204)],_0x16dac7(0x208)),_0x40c257=normalizeBffType(_0x5afdf9['str']('type'))??undefined;if(_0x5afdf9[_0x16dac7(0x209)](_0x16dac7(0x1fe))&&!_0x40c257)throw CliErrors[_0x16dac7(0x1f7)](_0x16dac7(0x221));const [_0x2f570f,_0x4b04f7]=await Promise[_0x16dac7(0x21d)]([listBffScripts(_0x5afdf9['appCode'],_0x40c257),getBffScriptStatistics(_0x5afdf9[_0x16dac7(0x205)])]);if(_0x2f570f['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x16dac7(0x20f)};const _0x3f2cd2=_0x5afdf9[_0x16dac7(0x22e)](_0x16dac7(0x1fa));if(_0x3f2cd2&&!_0x5afdf9[_0x16dac7(0x1ea)]){const _0x43752e=await confirmForce();if(!_0x43752e)throw CliErrors[_0x16dac7(0x217)](_0x16dac7(0x215));}if(_0x3f2cd2&&_0x5afdf9[_0x16dac7(0x1ea)]){}const _0x34985d=buildDatasetCodeToAliasMap(_0x5afdf9[_0x16dac7(0x201)],_0x5afdf9[_0x16dac7(0x205)]),_0x2d9ad3=createHookLocationMap(_0x4b04f7),_0x28154c=JSON[_0x16dac7(0x22d)](JSON[_0x16dac7(0x22c)](_0x284295)),_0x4e62bd=_0x5afdf9['appCode'],_0x4f2b43=_0x28154c[_0x16dac7(0x21c)][_0x4e62bd];if(!_0x4f2b43)throw new Error(_0x16dac7(0x20c)+_0x4e62bd+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x256ca1=[],_0x11525f=[],_0x29c8be=[];for(const _0x4de535 of _0x2f570f){const _0x4b4af1=resolveRemoteScriptTarget(_0x4bacd2,_0x4de535,_0x2d9ad3,_0x49205e[_0x16dac7(0x211)],_0x34985d);if(!_0x4b4af1){_0x11525f[_0x16dac7(0x1ed)]({'lockKey':_0x4de535[_0x16dac7(0x21f)]+'/'+_0x4de535[_0x16dac7(0x230)],'reason':_0x16dac7(0x22b)});continue;}const _0x577347=_0x49205e[_0x16dac7(0x211)][_0x4b4af1[_0x16dac7(0x1f6)]];try{if(!_0x4de535['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x4de535[_0x16dac7(0x1ef)]==null)throw new Error(_0x16dac7(0x231));const _0x248501=_0x4de535[_0x16dac7(0x1ef)],_0x530251=computeContentHash(_0x248501);if(!_0x3f2cd2){const _0x566dae=await hasUnsyncedLocalChanges(_0x4b4af1[_0x16dac7(0x20b)],_0x577347,_0x530251);if(_0x566dae){_0x11525f[_0x16dac7(0x1ed)]({'lockKey':_0x4b4af1[_0x16dac7(0x1f6)],'reason':_0x16dac7(0x222)});continue;}}await ensureParentDirectory(_0x4b4af1[_0x16dac7(0x20b)]),await writeFile(_0x4b4af1[_0x16dac7(0x20b)],_0x248501,_0x16dac7(0x20d));const _0x85f0bd={'hash':_0x530251,'remoteId':_0x4de535['id'],'version':_0x4de535[_0x16dac7(0x1f2)]};_0x4b4af1[_0x16dac7(0x1fe)]===_0x16dac7(0x21e)&&_0x4b4af1['hookLocation']&&(_0x85f0bd[_0x16dac7(0x1fd)]=_0x4b4af1[_0x16dac7(0x203)][_0x16dac7(0x1fd)],_0x85f0bd[_0x16dac7(0x223)]=_0x4b4af1['hookLocation'][_0x16dac7(0x223)],_0x85f0bd['operationType']=_0x4b4af1[_0x16dac7(0x203)][_0x16dac7(0x218)],_0x85f0bd[_0x16dac7(0x210)]=_0x4b4af1[_0x16dac7(0x203)][_0x16dac7(0x210)]),_0x4f2b43['functions'][_0x4b4af1[_0x16dac7(0x1f6)]]=_0x85f0bd,_0x256ca1[_0x16dac7(0x1ed)]({'lockKey':_0x4b4af1[_0x16dac7(0x1f6)],'remoteId':_0x4de535['id']});}catch(_0x2f9ba0){_0x29c8be[_0x16dac7(0x1ed)]({'lockKey':_0x4b4af1[_0x16dac7(0x1f6)],'error':_0x2f9ba0 instanceof Error?_0x2f9ba0['message']:String(_0x2f9ba0)});}}return _0x4f2b43['lastSync']=new Date()[_0x16dac7(0x220)](),await writeBffLockFile(_0x4bacd2[_0x16dac7(0x1fb)],_0x28154c),{'ok':_0x29c8be[_0x16dac7(0x1f3)]===0x0,'data':{'pulled':_0x256ca1,'skipped':_0x11525f,'failed':_0x29c8be},'message':'Pull\x20complete:\x20'+_0x256ca1[_0x16dac7(0x1f3)]+'\x20pulled,\x20'+_0x11525f[_0x16dac7(0x1f3)]+_0x16dac7(0x213)+_0x29c8be[_0x16dac7(0x1f3)]+_0x16dac7(0x207)};}};async function hasUnsyncedLocalChanges(_0x41eadd,_0x5eb8ff,_0x50120a){const _0x306b64=a35_0x1ba252;if(!await fileExists(_0x41eadd))return![];const _0x3ca092=await computeFileHash(_0x41eadd);if(!_0x5eb8ff)return _0x50120a?_0x3ca092!==_0x50120a:!![];return _0x3ca092!==_0x5eb8ff[_0x306b64(0x1f9)];}function a35_0x906a(_0x28a747,_0x28a327){_0x28a747=_0x28a747-0x1e9;const _0x8ce6f5=a35_0x8ce6();let _0x906ada=_0x8ce6f5[_0x28a747];return _0x906ada;}function a35_0x8ce6(){const _0x669db7=['77jlfXcQ','lockKey','validation','COMMON','hash','force','lockFilePath','35rGRkEy','alias','type','3426935ofUtGN','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','apiDir','4038230aiBcoR','hookLocation','scriptsRoot','appCode','Would\x20inspect\x20','\x20failed','pull','str','/api/management/library/scripts/list?appCode=','filePath','Lock\x20scope\x20for\x20app\x20\x22','utf8','stdin','No\x20remote\x20BFF\x20scripts\x20found.','functionNode','functions','1402216bsNUAM','\x20skipped,\x20','map','Force\x20pull\x20cancelled.','read','cancelled','operationType','781896ovDQRd','string','toLowerCase','apps','all','HOOK','scriptType','toISOString','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','local\x20unsynced\x20changes','datasetCode','226557nEmzVd','stderr','GET','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Pull\x20only\x20this\x20script\x20type','14ESPWlt','unresolvable\x20target\x20path','stringify','parse','bool','yes','functionName','Remote\x20script\x20missing\x20content.','26580rcknnL','would_pull','nonInteractive','225oMBxXm','&type=','push','14265837hCdqii','scriptContent','includes','ENDPOINT','version','length','bff'];a35_0x8ce6=function(){return _0x669db7;};return a35_0x8ce6();}function buildDatasetCodeToAliasMap(_0x28acd6,_0x28f8ae){const _0x4dddc3=a35_0x1ba252,_0x5b2626=loadAliasMap(_0x28acd6,undefined,resolveApiFilePath(_0x28acd6,_0x28f8ae));return new Map(_0x5b2626[_0x4dddc3(0x214)](_0x5277c6=>[_0x5277c6[_0x4dddc3(0x223)],_0x5277c6['alias']]));}async function confirmForce(){const _0x3a3a27=a35_0x1ba252,_0x51c283=createInterface({'input':process[_0x3a3a27(0x20e)],'output':process[_0x3a3a27(0x225)]}),_0x4a8483=await new Promise(_0x3723cf=>{const _0x3de9d6=_0x3a3a27;_0x51c283['question'](_0x3de9d6(0x200),_0x3723cf);});return _0x51c283['close'](),['y',_0x3a3a27(0x22f)][_0x3a3a27(0x1f0)](_0x4a8483['trim']()[_0x3a3a27(0x21b)]());}
@@ -1 +1 @@
1
- const a36_0x21a9e9=a36_0x2388;(function(_0x1460b0,_0x21d7b9){const _0x19cc6f=a36_0x2388,_0x262f55=_0x1460b0();while(!![]){try{const _0x1742dc=parseInt(_0x19cc6f(0x15b))/0x1+parseInt(_0x19cc6f(0x183))/0x2*(parseInt(_0x19cc6f(0x1a2))/0x3)+parseInt(_0x19cc6f(0x158))/0x4*(parseInt(_0x19cc6f(0x17c))/0x5)+-parseInt(_0x19cc6f(0x198))/0x6+parseInt(_0x19cc6f(0x187))/0x7+-parseInt(_0x19cc6f(0x18b))/0x8+-parseInt(_0x19cc6f(0x177))/0x9;if(_0x1742dc===_0x21d7b9)break;else _0x262f55['push'](_0x262f55['shift']());}catch(_0x502a24){_0x262f55['push'](_0x262f55['shift']());}}}(a36_0x4c97,0x983ff));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a36_0x4c97(){const _0x4b5458=['Run\x20`','Runtime\x20script\x20cache\x20cleared.','lastSync','1012465vOTMYs','datasetCode','lockFilePath','description','length','runtime\x20cache\x20not\x20needed','functionNode','2dAJkwl','utf8','ENDPOINT','\x22.\x20','6500032QNmXGx','name','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','datasetId','858320PVoySs','No\x20local\x20BFF\x20functions\x20found.','stringify','version','alias','validation','unchanged','runtime\x20cache\x20cleared','remoteId','some','Push\x20local\x20BFF\x20scripts\x20to\x20remote','HOOK','str','5861202uMrvCv','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','force','\x22\x20not\x20found\x20after\x20ensureLockScope.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Would\x20inspect\x20','every','operationType','Cannot\x20resolve\x20dataset\x20for\x20\x22','filter','2835060WuMGKV','bool','COMMON','hash','would_push','has','16vGdMVl','cleared','\x20skipped,\x20','520206yscxRH','set','string','Incomplete\x20HOOK\x20path:\x20','script','filePath','get','appCode','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Force\x20push\x20ignoring\x20hash\x20protection','type','values','Lock\x20scope\x20for\x20app\x20\x22','create','scriptsRoot','code','toISOString','parse','map','status','datasetCodeToDataset','push','functions','aliasToDatasetCode','message','POST','Push\x20only\x20this\x20script\x20type','13464018nlhPzZ','lockKey'];a36_0x4c97=function(){return _0x4b5458;};return a36_0x4c97();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a36_0x21a9e9(0x171),'description':a36_0x21a9e9(0x195),'risk':'high-risk-write','flags':[{'name':a36_0x21a9e9(0x166),'type':a36_0x21a9e9(0x15d),'description':a36_0x21a9e9(0x176),'enum':[a36_0x21a9e9(0x1a4),a36_0x21a9e9(0x185),'HOOK']},{'name':a36_0x21a9e9(0x188),'type':'string','description':a36_0x21a9e9(0x19c)},{'name':a36_0x21a9e9(0x19a),'type':'boolean','description':a36_0x21a9e9(0x165)}],async 'dryRun'(_0x2c656a){const _0x526fa3=a36_0x21a9e9,_0x23b2b4=loadBffProjectConfig(_0x2c656a[_0x526fa3(0x162)]),_0x54bc6b=await readBffLockFile(_0x23b2b4[_0x526fa3(0x17e)]),{appLock:_0x49d729}=ensureLockScope(_0x54bc6b??createEmptyBffLock(),_0x2c656a['appCode'],_0x23b2b4[_0x526fa3(0x16a)],_0x526fa3(0x171)),_0x376504=await getTargetFunctions(_0x23b2b4,_0x2c656a),_0x269e38=_0x2c656a[_0x526fa3(0x1a3)]('force'),_0x43d308=[];for(const _0x14af60 of _0x376504){const _0x3465b6=await computeFileHash(_0x14af60['filePath']),_0x38d426=_0x49d729[_0x526fa3(0x172)][_0x14af60[_0x526fa3(0x178)]],_0x5449c4=!!_0x38d426&&_0x38d426[_0x526fa3(0x1a5)]===_0x3465b6;_0x43d308['push']({'lockKey':_0x14af60['lockKey'],'filePath':_0x14af60[_0x526fa3(0x160)],'remoteId':_0x38d426?.[_0x526fa3(0x193)]??null,'mode':_0x38d426?.[_0x526fa3(0x193)]?'update':_0x526fa3(0x169),'status':!_0x269e38&&_0x5449c4?'unchanged':_0x526fa3(0x1a6)});}return{'method':_0x526fa3(0x175),'url':'/api/management/library/scripts/save','body':{'appCode':_0x2c656a[_0x526fa3(0x162)],'force':_0x269e38,'files':_0x43d308,'cacheClearAtRuntime':_0x43d308[_0x526fa3(0x194)](_0x4ff7cb=>_0x4ff7cb[_0x526fa3(0x16f)]===_0x526fa3(0x1a6)),'cacheClearAtRuntimeTimes':_0x43d308['some'](_0x19eea7=>_0x19eea7[_0x526fa3(0x16f)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x526fa3(0x19d)+_0x43d308[_0x526fa3(0x180)]+_0x526fa3(0x164)};},async 'execute'(_0x44e63e){const _0xf1418c=a36_0x21a9e9,_0x40897d=loadBffProjectConfig(_0x44e63e['appCode']),_0x43858b=await readBffLockFile(_0x40897d[_0xf1418c(0x17e)]),{lockData:_0x512bac,appLock:_0x8483a9}=ensureLockScope(_0x43858b??createEmptyBffLock(),_0x44e63e[_0xf1418c(0x162)],_0x40897d['scriptsRoot'],'push'),_0x26228d=await getTargetFunctions(_0x40897d,_0x44e63e);if(_0x26228d[_0xf1418c(0x180)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xf1418c(0x18c)};const _0x2b137b=_0x44e63e[_0xf1418c(0x1a3)](_0xf1418c(0x19a)),_0x14e162=JSON[_0xf1418c(0x16d)](JSON[_0xf1418c(0x18d)](_0x512bac)),_0x34ba29=_0x14e162['apps'][_0x44e63e[_0xf1418c(0x162)]];if(!_0x34ba29)throw new Error(_0xf1418c(0x168)+_0x44e63e[_0xf1418c(0x162)]+_0xf1418c(0x19b));const _0xf6dfca=await buildHookMaps(_0x44e63e['appCode'],_0x44e63e['apiDir'],_0x26228d,_0x34ba29),_0x2a91ed=[],_0x569f16=[],_0x30cc35=[];for(const _0x5639bd of _0x26228d){const _0x3645b7=await computeFileHash(_0x5639bd[_0xf1418c(0x160)]),_0x11c66f=_0x34ba29[_0xf1418c(0x172)][_0x5639bd[_0xf1418c(0x178)]];if(!_0x2b137b&&_0x11c66f&&_0x11c66f['hash']===_0x3645b7){_0x569f16[_0xf1418c(0x171)]({'lockKey':_0x5639bd['lockKey'],'reason':_0xf1418c(0x191)});continue;}try{await uploadSingleFunction(_0x44e63e[_0xf1418c(0x162)],_0x5639bd,_0x34ba29,_0xf6dfca);const _0x1b83a8=_0x34ba29[_0xf1418c(0x172)][_0x5639bd[_0xf1418c(0x178)]];_0x2a91ed[_0xf1418c(0x171)]({'lockKey':_0x5639bd['lockKey'],'remoteId':_0x1b83a8?.[_0xf1418c(0x193)]??0x0});}catch(_0x3ddaf5){_0x30cc35[_0xf1418c(0x171)]({'lockKey':_0x5639bd[_0xf1418c(0x178)],'error':_0x3ddaf5 instanceof Error?_0x3ddaf5[_0xf1418c(0x174)]:String(_0x3ddaf5)});}}_0x34ba29[_0xf1418c(0x17b)]=new Date()[_0xf1418c(0x16c)](),await writeBffLockFile(_0x40897d[_0xf1418c(0x17e)],_0x14e162),await waitForUploadedLockEntries(_0x40897d[_0xf1418c(0x17e)],_0x44e63e['appCode'],_0x2a91ed[_0xf1418c(0x16e)](_0x3a24bd=>_0x3a24bd[_0xf1418c(0x178)]));let _0x5b8c9a={'attempted':![],'cleared':![]};if(_0x2a91ed[_0xf1418c(0x180)]>0x0)try{let _0x1b9e53='';for(let _0x66b7f6=0x0;_0x66b7f6<CACHE_CLEAR_ATTEMPTS;_0x66b7f6+=0x1){_0x1b9e53=await clearBffScriptCache(),_0x66b7f6<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5b8c9a={'attempted':!![],'cleared':!![],'message':_0x1b9e53||_0xf1418c(0x17a)};}catch(_0x5a31a2){_0x5b8c9a={'attempted':!![],'cleared':![],'error':_0x5a31a2 instanceof Error?_0x5a31a2['message']:String(_0x5a31a2)};}const _0x51152b=_0x30cc35[_0xf1418c(0x180)]===0x0&&(_0x5b8c9a['attempted']?_0x5b8c9a[_0xf1418c(0x159)]:!![]),_0x510a9f=_0x5b8c9a['attempted']?_0x5b8c9a[_0xf1418c(0x159)]?_0xf1418c(0x192):'runtime\x20cache\x20clear\x20failed':_0xf1418c(0x181);return{'ok':_0x51152b,'data':{'uploaded':_0x2a91ed,'skipped':_0x569f16,'failed':_0x30cc35,'cacheClear':_0x5b8c9a},'message':'Push\x20complete:\x20'+_0x2a91ed[_0xf1418c(0x180)]+'\x20uploaded,\x20'+_0x569f16[_0xf1418c(0x180)]+_0xf1418c(0x15a)+_0x30cc35[_0xf1418c(0x180)]+'\x20failed,\x20'+_0x510a9f};}};async function getTargetFunctions(_0x2d9c85,_0xcbd271){const _0x435bdf=a36_0x21a9e9,_0x31299e=_0xcbd271[_0x435bdf(0x197)](_0x435bdf(0x166)),_0x45b96a=_0xcbd271[_0x435bdf(0x197)]('name'),_0x1805ae=normalizeBffType(_0x31299e)??undefined;if(_0x45b96a&&!_0x1805ae)throw CliErrors[_0x435bdf(0x190)](_0x435bdf(0x163));const _0x43fdf1=await scanLocalBffFunctions(_0x2d9c85,_0x1805ae);if(_0x45b96a){const _0x304cea=_0x43fdf1[_0x435bdf(0x1a1)](_0xd59eaa=>_0xd59eaa[_0x435bdf(0x188)]===_0x45b96a);if(_0x304cea[_0x435bdf(0x180)]===0x0)throw CliErrors[_0x435bdf(0x190)]('Local\x20function\x20not\x20found:\x20'+_0x1805ae+'/'+_0x45b96a);return _0x304cea;}return _0x43fdf1;}async function buildHookMaps(_0x32459f,_0x34635a,_0x2d9904,_0x3edaee){const _0xef71d1=a36_0x21a9e9,_0x49ec86=_0x2d9904[_0xef71d1(0x194)](_0x123a09=>_0x123a09[_0xef71d1(0x166)]===_0xef71d1(0x196));if(!_0x49ec86)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2f5077=loadAliasMap(_0x34635a,undefined,resolveApiFilePath(_0x34635a,_0x32459f)),_0x38c746=new Map(_0x2f5077[_0xef71d1(0x16e)](_0xa2ad61=>[_0xa2ad61[_0xef71d1(0x18f)],_0xa2ad61['datasetCode']]));for(const _0x4e495c of Object[_0xef71d1(0x167)](_0x3edaee[_0xef71d1(0x172)])){_0x4e495c[_0xef71d1(0x18f)]&&_0x4e495c[_0xef71d1(0x17d)]&&!_0x38c746[_0xef71d1(0x157)](_0x4e495c[_0xef71d1(0x18f)])&&_0x38c746[_0xef71d1(0x15c)](_0x4e495c['alias'],_0x4e495c[_0xef71d1(0x17d)]);}const _0xde5f5=await listDatasets(_0x32459f),_0x55b65c=new Map(_0xde5f5[_0xef71d1(0x16e)](_0x41252a=>[_0x41252a[_0xef71d1(0x16b)],_0x41252a]));return{'aliasToDatasetCode':_0x38c746,'datasetCodeToDataset':_0x55b65c};}async function uploadSingleFunction(_0x34d08f,_0x411bb5,_0x56588f,_0x35faf3){const _0x56a720=a36_0x21a9e9,_0x29e805=await readFile(_0x411bb5[_0x56a720(0x160)],_0x56a720(0x184)),_0x25b65a=await computeFileHash(_0x411bb5['filePath']),_0x117e5f=_0x56588f['functions'][_0x411bb5[_0x56a720(0x178)]];if(_0x117e5f?.['remoteId']&&_0x117e5f[_0x56a720(0x18e)]==null)throw CliErrors[_0x56a720(0x190)](_0x411bb5[_0x56a720(0x178)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x5947a9=extractScriptDescription(_0x29e805);if(!_0x5947a9&&_0x117e5f?.['remoteId']){const _0x25d462=await getBffScriptInfo(_0x117e5f['remoteId']);_0x5947a9=_0x25d462[_0x56a720(0x17f)]||undefined;}const _0x1f3d6b={'appCode':_0x34d08f,'functionName':_0x411bb5[_0x56a720(0x188)],'scriptType':_0x411bb5['type'],'scriptContent':_0x29e805};if(_0x117e5f?.[_0x56a720(0x193)])_0x1f3d6b['id']=_0x117e5f[_0x56a720(0x193)];if(_0x117e5f?.[_0x56a720(0x18e)]!=null)_0x1f3d6b[_0x56a720(0x18e)]=_0x117e5f[_0x56a720(0x18e)];if(_0x5947a9)_0x1f3d6b[_0x56a720(0x17f)]=_0x5947a9;if(_0x411bb5[_0x56a720(0x166)]==='HOOK'){const _0xee211b=_0x411bb5[_0x56a720(0x18f)];if(!_0xee211b||!_0x411bb5[_0x56a720(0x19f)]||!_0x411bb5[_0x56a720(0x182)])throw CliErrors[_0x56a720(0x190)](_0x56a720(0x15e)+_0x411bb5['lockKey']);const _0x51d0f2=_0x35faf3['aliasToDatasetCode']['get'](_0xee211b)??_0x117e5f?.[_0x56a720(0x17d)]??_0xee211b,_0x13d016=_0x35faf3[_0x56a720(0x170)]['get'](_0x51d0f2);if(!_0x13d016)throw CliErrors[_0x56a720(0x190)](_0x56a720(0x1a0)+_0xee211b+_0x56a720(0x186)+(_0x56a720(0x179)+CLI_BIN_NAME+_0x56a720(0x199)));_0x1f3d6b[_0x56a720(0x18a)]=_0x13d016['id'],_0x1f3d6b['operationType']=_0x411bb5[_0x56a720(0x19f)],_0x1f3d6b[_0x56a720(0x182)]=_0x411bb5[_0x56a720(0x182)];}const _0x5c347e=await saveBffScript(_0x1f3d6b),_0x1dc2d2=_0x5c347e['id'],_0x49bf99=_0x5c347e[_0x56a720(0x15f)]??await getBffScriptInfo(_0x1dc2d2),_0x2ae672={'hash':_0x25b65a,'remoteId':_0x1dc2d2,'version':_0x49bf99['version']};if(_0x411bb5[_0x56a720(0x166)]===_0x56a720(0x196)){const _0xd34be3=_0x411bb5[_0x56a720(0x18f)],_0x132320=_0x35faf3[_0x56a720(0x173)][_0x56a720(0x161)](_0xd34be3)??_0x117e5f?.[_0x56a720(0x17d)]??_0xd34be3;_0x35faf3[_0x56a720(0x173)][_0x56a720(0x157)](_0xd34be3)?_0x2ae672[_0x56a720(0x18f)]=_0xd34be3:_0x2ae672[_0x56a720(0x18f)]=_0x117e5f?.[_0x56a720(0x18f)],_0x2ae672[_0x56a720(0x17d)]=_0x132320,_0x2ae672[_0x56a720(0x19f)]=_0x411bb5[_0x56a720(0x19f)],_0x2ae672[_0x56a720(0x182)]=_0x411bb5[_0x56a720(0x182)];}_0x56588f[_0x56a720(0x172)][_0x411bb5['lockKey']]=_0x2ae672;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a36_0x2388(_0x49051d,_0x13292d){_0x49051d=_0x49051d-0x157;const _0x4c97ca=a36_0x4c97();let _0x23884b=_0x4c97ca[_0x49051d];return _0x23884b;}async function waitForUploadedLockEntries(_0x3682c8,_0x300317,_0x4e951f){const _0x14397d=a36_0x21a9e9;if(_0x4e951f[_0x14397d(0x180)]===0x0)return;for(let _0x21a2b1=0x0;_0x21a2b1<LOCK_SETTLE_RETRY_COUNT;_0x21a2b1+=0x1){const _0x526230=await readBffLockFile(_0x3682c8),_0x55c206=_0x526230?.['apps']?.[_0x300317]?.[_0x14397d(0x172)]??{},_0x8e94c4=_0x4e951f[_0x14397d(0x19e)](_0x28bc62=>!!_0x55c206[_0x28bc62]?.[_0x14397d(0x193)]);if(_0x8e94c4)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x14397d(0x189)+_0x4e951f['join'](',\x20')+'.');}
1
+ const a36_0x467fd1=a36_0x1ee4;(function(_0x35ae96,_0x1daa55){const _0x42f272=a36_0x1ee4,_0xe11b0b=_0x35ae96();while(!![]){try{const _0x3d31d2=parseInt(_0x42f272(0x1e0))/0x1+-parseInt(_0x42f272(0x1db))/0x2+parseInt(_0x42f272(0x1aa))/0x3+parseInt(_0x42f272(0x19a))/0x4+parseInt(_0x42f272(0x1d3))/0x5*(-parseInt(_0x42f272(0x1c5))/0x6)+-parseInt(_0x42f272(0x19e))/0x7*(-parseInt(_0x42f272(0x1b1))/0x8)+-parseInt(_0x42f272(0x1b4))/0x9;if(_0x3d31d2===_0x1daa55)break;else _0xe11b0b['push'](_0xe11b0b['shift']());}catch(_0x3bff59){_0xe11b0b['push'](_0xe11b0b['shift']());}}}(a36_0x5bfa,0xc495d));function a36_0x1ee4(_0x1f34ca,_0x5b13ac){_0x1f34ca=_0x1f34ca-0x194;const _0x5bfa0d=a36_0x5bfa();let _0x1ee49d=_0x5bfa0d[_0x1f34ca];return _0x1ee49d;}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';function a36_0x5bfa(){const _0x5de285=['Cannot\x20resolve\x20dataset\x20for\x20\x22','824712JEIpuR','No\x20local\x20BFF\x20functions\x20found.','cleared','Push\x20local\x20BFF\x20scripts\x20to\x20remote','\x20skipped,\x20','697666fvVYwt','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','code','status','HOOK','remoteId','lockFilePath','runtime\x20cache\x20cleared','4000672yuEqza','stringify','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','script','38899rvuyyT','functions','lockKey','Force\x20push\x20ignoring\x20hash\x20protection','Push\x20only\x20this\x20script\x20type','datasetCode','type','datasetId','scriptsRoot','attempted','apps','would_push','2108772FlIZSu','unchanged','boolean','aliasToDatasetCode','parse','hash','\x20uploaded,\x20','384CNCWrU','functionNode','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','6853347YCJUzT','version','get','ENDPOINT','update','bool','str','bff','Run\x20`','runtime\x20cache\x20not\x20needed','join','operationType','\x20failed,\x20','name','COMMON','create','high-risk-write','4130652zkxNkS','map','some','message','lastSync','force','datasetCodeToDataset','push','appCode','apiDir','runtime\x20cache\x20clear\x20failed','utf8','POST','string','5LyowED','Incomplete\x20HOOK\x20path:\x20','filePath','alias','validation','length','\x22.\x20'];a36_0x5bfa=function(){return _0x5de285;};return a36_0x5bfa();}import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x467fd1(0x1bb),'command':a36_0x467fd1(0x1cc),'description':a36_0x467fd1(0x1de),'risk':a36_0x467fd1(0x1c4),'flags':[{'name':'type','type':a36_0x467fd1(0x1d2),'description':a36_0x467fd1(0x1a2),'enum':[a36_0x467fd1(0x1c2),a36_0x467fd1(0x1b7),a36_0x467fd1(0x196)]},{'name':a36_0x467fd1(0x1c1),'type':a36_0x467fd1(0x1d2),'description':a36_0x467fd1(0x1e2)},{'name':a36_0x467fd1(0x1ca),'type':a36_0x467fd1(0x1ac),'description':a36_0x467fd1(0x1a1)}],async 'dryRun'(_0x508180){const _0x24294b=a36_0x467fd1,_0x1f4c89=loadBffProjectConfig(_0x508180[_0x24294b(0x1cd)]),_0x534b20=await readBffLockFile(_0x1f4c89['lockFilePath']),{appLock:_0x185799}=ensureLockScope(_0x534b20??createEmptyBffLock(),_0x508180[_0x24294b(0x1cd)],_0x1f4c89[_0x24294b(0x1a6)],'push'),_0x1595a5=await getTargetFunctions(_0x1f4c89,_0x508180),_0xbaf0f5=_0x508180[_0x24294b(0x1b9)]('force'),_0x4ed317=[];for(const _0x5d69f5 of _0x1595a5){const _0xb7cc54=await computeFileHash(_0x5d69f5['filePath']),_0x18f4bd=_0x185799[_0x24294b(0x19f)][_0x5d69f5[_0x24294b(0x1a0)]],_0x2bd975=!!_0x18f4bd&&_0x18f4bd[_0x24294b(0x1af)]===_0xb7cc54;_0x4ed317['push']({'lockKey':_0x5d69f5[_0x24294b(0x1a0)],'filePath':_0x5d69f5[_0x24294b(0x1d5)],'remoteId':_0x18f4bd?.[_0x24294b(0x197)]??null,'mode':_0x18f4bd?.[_0x24294b(0x197)]?_0x24294b(0x1b8):_0x24294b(0x1c3),'status':!_0xbaf0f5&&_0x2bd975?_0x24294b(0x1ab):_0x24294b(0x1a9)});}return{'method':_0x24294b(0x1d1),'url':'/api/management/library/scripts/save','body':{'appCode':_0x508180['appCode'],'force':_0xbaf0f5,'files':_0x4ed317,'cacheClearAtRuntime':_0x4ed317['some'](_0xd6b351=>_0xd6b351['status']==='would_push'),'cacheClearAtRuntimeTimes':_0x4ed317[_0x24294b(0x1c7)](_0x5e1f03=>_0x5e1f03[_0x24294b(0x195)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x4ed317[_0x24294b(0x1d8)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0xe2b802){const _0x272dfc=a36_0x467fd1,_0x53b55c=loadBffProjectConfig(_0xe2b802[_0x272dfc(0x1cd)]),_0x4311ba=await readBffLockFile(_0x53b55c[_0x272dfc(0x198)]),{lockData:_0x279a4e,appLock:_0x2712a2}=ensureLockScope(_0x4311ba??createEmptyBffLock(),_0xe2b802[_0x272dfc(0x1cd)],_0x53b55c['scriptsRoot'],_0x272dfc(0x1cc)),_0x336fd7=await getTargetFunctions(_0x53b55c,_0xe2b802);if(_0x336fd7[_0x272dfc(0x1d8)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x272dfc(0x1dc)};const _0x1297dc=_0xe2b802[_0x272dfc(0x1b9)](_0x272dfc(0x1ca)),_0x1737f8=JSON[_0x272dfc(0x1ae)](JSON[_0x272dfc(0x19b)](_0x279a4e)),_0x37ccd0=_0x1737f8[_0x272dfc(0x1a8)][_0xe2b802[_0x272dfc(0x1cd)]];if(!_0x37ccd0)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xe2b802['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x317e33=await buildHookMaps(_0xe2b802['appCode'],_0xe2b802[_0x272dfc(0x1ce)],_0x336fd7,_0x37ccd0),_0x460696=[],_0x5568c4=[],_0x576a95=[];for(const _0x509b10 of _0x336fd7){const _0x121224=await computeFileHash(_0x509b10[_0x272dfc(0x1d5)]),_0x2b42e4=_0x37ccd0[_0x272dfc(0x19f)][_0x509b10[_0x272dfc(0x1a0)]];if(!_0x1297dc&&_0x2b42e4&&_0x2b42e4[_0x272dfc(0x1af)]===_0x121224){_0x5568c4[_0x272dfc(0x1cc)]({'lockKey':_0x509b10[_0x272dfc(0x1a0)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0xe2b802['appCode'],_0x509b10,_0x37ccd0,_0x317e33);const _0x2c50b5=_0x37ccd0[_0x272dfc(0x19f)][_0x509b10[_0x272dfc(0x1a0)]];_0x460696[_0x272dfc(0x1cc)]({'lockKey':_0x509b10[_0x272dfc(0x1a0)],'remoteId':_0x2c50b5?.[_0x272dfc(0x197)]??0x0});}catch(_0x4bda23){_0x576a95['push']({'lockKey':_0x509b10['lockKey'],'error':_0x4bda23 instanceof Error?_0x4bda23[_0x272dfc(0x1c8)]:String(_0x4bda23)});}}_0x37ccd0[_0x272dfc(0x1c9)]=new Date()['toISOString'](),await writeBffLockFile(_0x53b55c[_0x272dfc(0x198)],_0x1737f8),await waitForUploadedLockEntries(_0x53b55c[_0x272dfc(0x198)],_0xe2b802[_0x272dfc(0x1cd)],_0x460696[_0x272dfc(0x1c6)](_0x3b373f=>_0x3b373f['lockKey']));let _0x49a626={'attempted':![],'cleared':![]};if(_0x460696[_0x272dfc(0x1d8)]>0x0)try{let _0x137ab5='';for(let _0x219375=0x0;_0x219375<CACHE_CLEAR_ATTEMPTS;_0x219375+=0x1){_0x137ab5=await clearBffScriptCache(),_0x219375<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x49a626={'attempted':!![],'cleared':!![],'message':_0x137ab5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x228dab){_0x49a626={'attempted':!![],'cleared':![],'error':_0x228dab instanceof Error?_0x228dab['message']:String(_0x228dab)};}const _0x46bd3e=_0x576a95['length']===0x0&&(_0x49a626[_0x272dfc(0x1a7)]?_0x49a626[_0x272dfc(0x1dd)]:!![]),_0x2e102b=_0x49a626[_0x272dfc(0x1a7)]?_0x49a626[_0x272dfc(0x1dd)]?_0x272dfc(0x199):_0x272dfc(0x1cf):_0x272dfc(0x1bd);return{'ok':_0x46bd3e,'data':{'uploaded':_0x460696,'skipped':_0x5568c4,'failed':_0x576a95,'cacheClear':_0x49a626},'message':'Push\x20complete:\x20'+_0x460696['length']+_0x272dfc(0x1b0)+_0x5568c4['length']+_0x272dfc(0x1df)+_0x576a95[_0x272dfc(0x1d8)]+_0x272dfc(0x1c0)+_0x2e102b};}};async function getTargetFunctions(_0x421b01,_0x22bd06){const _0x15f093=a36_0x467fd1,_0x1c556c=_0x22bd06[_0x15f093(0x1ba)](_0x15f093(0x1a4)),_0x2d2777=_0x22bd06['str'](_0x15f093(0x1c1)),_0x4c0853=normalizeBffType(_0x1c556c)??undefined;if(_0x2d2777&&!_0x4c0853)throw CliErrors[_0x15f093(0x1d7)](_0x15f093(0x19c));const _0x3ee595=await scanLocalBffFunctions(_0x421b01,_0x4c0853);if(_0x2d2777){const _0x534fc2=_0x3ee595['filter'](_0x2ccf38=>_0x2ccf38[_0x15f093(0x1c1)]===_0x2d2777);if(_0x534fc2[_0x15f093(0x1d8)]===0x0)throw CliErrors[_0x15f093(0x1d7)]('Local\x20function\x20not\x20found:\x20'+_0x4c0853+'/'+_0x2d2777);return _0x534fc2;}return _0x3ee595;}async function buildHookMaps(_0x1975e0,_0x39e086,_0x3964b4,_0xfebc42){const _0x1dbe85=a36_0x467fd1,_0x138e40=_0x3964b4['some'](_0x3b9880=>_0x3b9880[_0x1dbe85(0x1a4)]===_0x1dbe85(0x196));if(!_0x138e40)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3ca157=loadAliasMap(_0x39e086,undefined,resolveApiFilePath(_0x39e086,_0x1975e0)),_0x33308e=new Map(_0x3ca157[_0x1dbe85(0x1c6)](_0x52ec0e=>[_0x52ec0e[_0x1dbe85(0x1d6)],_0x52ec0e['datasetCode']]));for(const _0x1fd8b1 of Object['values'](_0xfebc42[_0x1dbe85(0x19f)])){_0x1fd8b1['alias']&&_0x1fd8b1[_0x1dbe85(0x1a3)]&&!_0x33308e[_0x1dbe85(0x1e1)](_0x1fd8b1['alias'])&&_0x33308e['set'](_0x1fd8b1[_0x1dbe85(0x1d6)],_0x1fd8b1[_0x1dbe85(0x1a3)]);}const _0x145f17=await listDatasets(_0x1975e0),_0x1b0bb1=new Map(_0x145f17[_0x1dbe85(0x1c6)](_0xa7a9a6=>[_0xa7a9a6[_0x1dbe85(0x194)],_0xa7a9a6]));return{'aliasToDatasetCode':_0x33308e,'datasetCodeToDataset':_0x1b0bb1};}async function uploadSingleFunction(_0x4aa531,_0x1a45b5,_0x1401e7,_0x36e306){const _0x33b51b=a36_0x467fd1,_0x323f04=await readFile(_0x1a45b5[_0x33b51b(0x1d5)],_0x33b51b(0x1d0)),_0x41ac15=await computeFileHash(_0x1a45b5['filePath']),_0x36dc45=_0x1401e7[_0x33b51b(0x19f)][_0x1a45b5[_0x33b51b(0x1a0)]];if(_0x36dc45?.['remoteId']&&_0x36dc45[_0x33b51b(0x1b5)]==null)throw CliErrors[_0x33b51b(0x1d7)](_0x1a45b5[_0x33b51b(0x1a0)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x3ba27c=extractScriptDescription(_0x323f04);if(!_0x3ba27c&&_0x36dc45?.[_0x33b51b(0x197)]){const _0x298a50=await getBffScriptInfo(_0x36dc45[_0x33b51b(0x197)]);_0x3ba27c=_0x298a50[_0x33b51b(0x1e3)]||undefined;}const _0x119ce6={'appCode':_0x4aa531,'functionName':_0x1a45b5[_0x33b51b(0x1c1)],'scriptType':_0x1a45b5[_0x33b51b(0x1a4)],'scriptContent':_0x323f04};if(_0x36dc45?.[_0x33b51b(0x197)])_0x119ce6['id']=_0x36dc45[_0x33b51b(0x197)];if(_0x36dc45?.['version']!=null)_0x119ce6['version']=_0x36dc45[_0x33b51b(0x1b5)];if(_0x3ba27c)_0x119ce6['description']=_0x3ba27c;if(_0x1a45b5['type']===_0x33b51b(0x196)){const _0x59222d=_0x1a45b5[_0x33b51b(0x1d6)];if(!_0x59222d||!_0x1a45b5[_0x33b51b(0x1bf)]||!_0x1a45b5[_0x33b51b(0x1b2)])throw CliErrors[_0x33b51b(0x1d7)](_0x33b51b(0x1d4)+_0x1a45b5[_0x33b51b(0x1a0)]);const _0x415f4c=_0x36e306['aliasToDatasetCode'][_0x33b51b(0x1b6)](_0x59222d)??_0x36dc45?.[_0x33b51b(0x1a3)]??_0x59222d,_0x220b14=_0x36e306[_0x33b51b(0x1cb)]['get'](_0x415f4c);if(!_0x220b14)throw CliErrors[_0x33b51b(0x1d7)](_0x33b51b(0x1da)+_0x59222d+_0x33b51b(0x1d9)+(_0x33b51b(0x1bc)+CLI_BIN_NAME+_0x33b51b(0x1b3)));_0x119ce6[_0x33b51b(0x1a5)]=_0x220b14['id'],_0x119ce6['operationType']=_0x1a45b5[_0x33b51b(0x1bf)],_0x119ce6[_0x33b51b(0x1b2)]=_0x1a45b5[_0x33b51b(0x1b2)];}const _0x37a680=await saveBffScript(_0x119ce6),_0x21ca98=_0x37a680['id'],_0x3e1922=_0x37a680[_0x33b51b(0x19d)]??await getBffScriptInfo(_0x21ca98),_0x548556={'hash':_0x41ac15,'remoteId':_0x21ca98,'version':_0x3e1922[_0x33b51b(0x1b5)]};if(_0x1a45b5[_0x33b51b(0x1a4)]===_0x33b51b(0x196)){const _0x4b1d3e=_0x1a45b5['alias'],_0x38457a=_0x36e306['aliasToDatasetCode'][_0x33b51b(0x1b6)](_0x4b1d3e)??_0x36dc45?.[_0x33b51b(0x1a3)]??_0x4b1d3e;_0x36e306[_0x33b51b(0x1ad)]['has'](_0x4b1d3e)?_0x548556[_0x33b51b(0x1d6)]=_0x4b1d3e:_0x548556[_0x33b51b(0x1d6)]=_0x36dc45?.[_0x33b51b(0x1d6)],_0x548556['datasetCode']=_0x38457a,_0x548556[_0x33b51b(0x1bf)]=_0x1a45b5[_0x33b51b(0x1bf)],_0x548556[_0x33b51b(0x1b2)]=_0x1a45b5[_0x33b51b(0x1b2)];}_0x1401e7[_0x33b51b(0x19f)][_0x1a45b5['lockKey']]=_0x548556;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x280600,_0x277327,_0x337fab){const _0x38f88e=a36_0x467fd1;if(_0x337fab[_0x38f88e(0x1d8)]===0x0)return;for(let _0xfc167b=0x0;_0xfc167b<LOCK_SETTLE_RETRY_COUNT;_0xfc167b+=0x1){const _0x32e77e=await readBffLockFile(_0x280600),_0x41ca32=_0x32e77e?.[_0x38f88e(0x1a8)]?.[_0x277327]?.[_0x38f88e(0x19f)]??{},_0x3b5c4a=_0x337fab['every'](_0x33c727=>!!_0x41ca32[_0x33c727]?.[_0x38f88e(0x197)]);if(_0x3b5c4a)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x337fab[_0x38f88e(0x1be)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a37_0x4a88(){const _0x4e45ca=['291054cEFTjl','2416672BQPHoG','map','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20added,\x20','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','push','6422tmmuBI','status','\x20remote-only','hash','length','lockFilePath','\x20unchanged','remote','837598ZkkrEt','apiDir','All\x20BFF\x20scripts\x20are\x20in\x20sync.','functions','datasetCode','has','boolean','scriptsRoot','2224684XYlDGB','appCode','filePath','9RNSOrt','20LOJmRP','read','68qTSvee','all','345QVSpqI','lockKey','11957qztJZt','\x20modified,\x20','231895zBPVQm'];a37_0x4a88=function(){return _0x4e45ca;};return a37_0x4a88();}const a37_0x30da18=a37_0x1566;(function(_0x30e616,_0x111d7c){const _0x143072=a37_0x1566,_0x4ed76b=_0x30e616();while(!![]){try{const _0x3489a1=parseInt(_0x143072(0x1f1))/0x1+-parseInt(_0x143072(0x20d))/0x2*(-parseInt(_0x143072(0x201))/0x3)+parseInt(_0x143072(0x1ff))/0x4*(-parseInt(_0x143072(0x205))/0x5)+parseInt(_0x143072(0x206))/0x6+parseInt(_0x143072(0x1f9))/0x7+-parseInt(_0x143072(0x207))/0x8*(parseInt(_0x143072(0x1fc))/0x9)+parseInt(_0x143072(0x1fd))/0xa*(-parseInt(_0x143072(0x203))/0xb);if(_0x3489a1===_0x111d7c)break;else _0x4ed76b['push'](_0x4ed76b['shift']());}catch(_0x1fd660){_0x4ed76b['push'](_0x4ed76b['shift']());}}}(a37_0x4a88,0x754e3));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_0x1566(_0x1cd08c,_0x4e5b3b){_0x1cd08c=_0x1cd08c-0x1ec;const _0x4a880c=a37_0x4a88();let _0x156643=_0x4a880c[_0x1cd08c];return _0x156643;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a37_0x30da18(0x20e),'description':a37_0x30da18(0x20b),'risk':a37_0x30da18(0x1fe),'flags':[{'name':a37_0x30da18(0x1f0),'type':a37_0x30da18(0x1f7),'description':a37_0x30da18(0x209)}],async 'execute'(_0x588668){const _0x41bc86=a37_0x30da18,_0x53587b=loadBffProjectConfig(_0x588668['appCode']),_0x40b216=await readBffLockFile(_0x53587b[_0x41bc86(0x1ee)]),{appLock:_0x36706e}=ensureLockScope(_0x40b216??createEmptyBffLock(),_0x588668[_0x41bc86(0x1fa)],_0x53587b[_0x41bc86(0x1f8)],_0x41bc86(0x20e)),_0x418215=await scanLocalBffFunctions(_0x53587b),_0x316fa7=[],_0x5a2844=[],_0x5e9a5a=[];for(const _0x2d4f5d of _0x418215){const _0x40faaa=await computeFileHash(_0x2d4f5d[_0x41bc86(0x1fb)]),_0x3837d1=_0x36706e[_0x41bc86(0x1f4)][_0x2d4f5d[_0x41bc86(0x202)]];if(!_0x3837d1)_0x316fa7[_0x41bc86(0x20c)](_0x2d4f5d[_0x41bc86(0x202)]);else _0x3837d1[_0x41bc86(0x1ec)]!==_0x40faaa?_0x5a2844[_0x41bc86(0x20c)](_0x2d4f5d[_0x41bc86(0x202)]):_0x5e9a5a[_0x41bc86(0x20c)](_0x2d4f5d[_0x41bc86(0x202)]);}const _0x24a617=[];if(_0x588668['bool'](_0x41bc86(0x1f0))){const _0x5989fc=loadAliasMap(_0x588668['apiDir'],undefined,resolveApiFilePath(_0x588668[_0x41bc86(0x1f2)],_0x588668[_0x41bc86(0x1fa)])),_0x111326=new Map(_0x5989fc[_0x41bc86(0x208)](_0x5b38c7=>[_0x5b38c7[_0x41bc86(0x1f5)],_0x5b38c7['alias']])),[_0x23397d,_0x442a89]=await Promise[_0x41bc86(0x200)]([listBffScripts(_0x588668[_0x41bc86(0x1fa)]),getBffScriptStatistics(_0x588668[_0x41bc86(0x1fa)])]),_0x3fab6c=createHookLocationMap(_0x442a89),_0x19e366=new Set(_0x418215['map'](_0x4134ed=>_0x4134ed[_0x41bc86(0x202)]));for(const _0x55773d of _0x23397d){const _0x3e4690=resolveRemoteScriptTarget(_0x53587b,_0x55773d,_0x3fab6c,_0x36706e[_0x41bc86(0x1f4)],_0x111326);_0x3e4690&&!_0x19e366[_0x41bc86(0x1f6)](_0x3e4690['lockKey'])&&_0x24a617[_0x41bc86(0x20c)](_0x3e4690[_0x41bc86(0x202)]);}}const _0x368641=_0x316fa7[_0x41bc86(0x1ed)]===0x0&&_0x5a2844[_0x41bc86(0x1ed)]===0x0&&_0x24a617[_0x41bc86(0x1ed)]===0x0;return{'ok':!![],'data':{'added':_0x316fa7,'modified':_0x5a2844,'unchanged':_0x5e9a5a,'remoteOnly':_0x24a617},'message':_0x368641?_0x41bc86(0x1f3):_0x316fa7['length']+_0x41bc86(0x20a)+_0x5a2844['length']+_0x41bc86(0x204)+_0x5e9a5a[_0x41bc86(0x1ed)]+_0x41bc86(0x1ef)+(_0x24a617[_0x41bc86(0x1ed)]>0x0?',\x20'+_0x24a617[_0x41bc86(0x1ed)]+_0x41bc86(0x20f):'')};}};
1
+ const a37_0xcf25b2=a37_0x420d;(function(_0x1074be,_0x3da69e){const _0x348b33=a37_0x420d,_0x2a8b9e=_0x1074be();while(!![]){try{const _0x18f965=-parseInt(_0x348b33(0x16e))/0x1*(parseInt(_0x348b33(0x16b))/0x2)+parseInt(_0x348b33(0x17b))/0x3*(-parseInt(_0x348b33(0x174))/0x4)+-parseInt(_0x348b33(0x17f))/0x5*(parseInt(_0x348b33(0x177))/0x6)+-parseInt(_0x348b33(0x168))/0x7+parseInt(_0x348b33(0x17e))/0x8+-parseInt(_0x348b33(0x175))/0x9+parseInt(_0x348b33(0x179))/0xa;if(_0x18f965===_0x3da69e)break;else _0x2a8b9e['push'](_0x2a8b9e['shift']());}catch(_0x15af8e){_0x2a8b9e['push'](_0x2a8b9e['shift']());}}}(a37_0x52f4,0xcafa8));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a37_0x52f4(){const _0x3af426=['3819215qXABCw','push','alias','read','has','lockKey','\x20added,\x20','bff','all','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','9303287HUppXB','filePath','length','2MkseIC','status','map','1052819wnEPmn','remote','scriptsRoot','appCode','boolean','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','204bxHLEo','14004126oxcdeq','\x20remote-only','6ZQgObp','lockFilePath','51963680XQyWiA','functions','47412fwgKlU','\x20unchanged','apiDir','9142024auhrFF'];a37_0x52f4=function(){return _0x3af426;};return a37_0x52f4();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x420d(_0x3bf6a6,_0x1346d3){_0x3bf6a6=_0x3bf6a6-0x163;const _0x52f46c=a37_0x52f4();let _0x420da2=_0x52f46c[_0x3bf6a6];return _0x420da2;}export const bffStatus={'service':a37_0xcf25b2(0x165),'command':a37_0xcf25b2(0x16c),'description':a37_0xcf25b2(0x173),'risk':a37_0xcf25b2(0x182),'flags':[{'name':'remote','type':a37_0xcf25b2(0x172),'description':a37_0xcf25b2(0x167)}],async 'execute'(_0x28e980){const _0x28dfa2=a37_0xcf25b2,_0x2893c5=loadBffProjectConfig(_0x28e980[_0x28dfa2(0x171)]),_0x101eb7=await readBffLockFile(_0x2893c5[_0x28dfa2(0x178)]),{appLock:_0x460c71}=ensureLockScope(_0x101eb7??createEmptyBffLock(),_0x28e980[_0x28dfa2(0x171)],_0x2893c5[_0x28dfa2(0x170)],_0x28dfa2(0x16c)),_0x32fff4=await scanLocalBffFunctions(_0x2893c5),_0x193bea=[],_0x4b5f0a=[],_0x3fecb3=[];for(const _0x27e3f4 of _0x32fff4){const _0x2f3a99=await computeFileHash(_0x27e3f4[_0x28dfa2(0x169)]),_0x18733f=_0x460c71[_0x28dfa2(0x17a)][_0x27e3f4[_0x28dfa2(0x163)]];if(!_0x18733f)_0x193bea['push'](_0x27e3f4[_0x28dfa2(0x163)]);else _0x18733f['hash']!==_0x2f3a99?_0x4b5f0a[_0x28dfa2(0x180)](_0x27e3f4[_0x28dfa2(0x163)]):_0x3fecb3[_0x28dfa2(0x180)](_0x27e3f4[_0x28dfa2(0x163)]);}const _0x5cf938=[];if(_0x28e980['bool'](_0x28dfa2(0x16f))){const _0x2fa758=loadAliasMap(_0x28e980[_0x28dfa2(0x17d)],undefined,resolveApiFilePath(_0x28e980[_0x28dfa2(0x17d)],_0x28e980[_0x28dfa2(0x171)])),_0x47c8b6=new Map(_0x2fa758[_0x28dfa2(0x16d)](_0x3e5d44=>[_0x3e5d44['datasetCode'],_0x3e5d44[_0x28dfa2(0x181)]])),[_0x2affa1,_0x2ed163]=await Promise[_0x28dfa2(0x166)]([listBffScripts(_0x28e980['appCode']),getBffScriptStatistics(_0x28e980[_0x28dfa2(0x171)])]),_0x584ab4=createHookLocationMap(_0x2ed163),_0x3bb6c8=new Set(_0x32fff4[_0x28dfa2(0x16d)](_0x35a152=>_0x35a152[_0x28dfa2(0x163)]));for(const _0x19b73d of _0x2affa1){const _0x3a3b01=resolveRemoteScriptTarget(_0x2893c5,_0x19b73d,_0x584ab4,_0x460c71[_0x28dfa2(0x17a)],_0x47c8b6);_0x3a3b01&&!_0x3bb6c8[_0x28dfa2(0x183)](_0x3a3b01[_0x28dfa2(0x163)])&&_0x5cf938[_0x28dfa2(0x180)](_0x3a3b01[_0x28dfa2(0x163)]);}}const _0x12ab85=_0x193bea[_0x28dfa2(0x16a)]===0x0&&_0x4b5f0a[_0x28dfa2(0x16a)]===0x0&&_0x5cf938['length']===0x0;return{'ok':!![],'data':{'added':_0x193bea,'modified':_0x4b5f0a,'unchanged':_0x3fecb3,'remoteOnly':_0x5cf938},'message':_0x12ab85?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x193bea['length']+_0x28dfa2(0x164)+_0x4b5f0a[_0x28dfa2(0x16a)]+'\x20modified,\x20'+_0x3fecb3[_0x28dfa2(0x16a)]+_0x28dfa2(0x17c)+(_0x5cf938[_0x28dfa2(0x16a)]>0x0?',\x20'+_0x5cf938['length']+_0x28dfa2(0x176):'')};}};
@@ -1 +1 @@
1
- const a38_0x4cc3ee=a38_0x2dfb;(function(_0x25946a,_0x53c819){const _0x14f2d9=a38_0x2dfb,_0xae0755=_0x25946a();while(!![]){try{const _0x4a4c45=-parseInt(_0x14f2d9(0x1a4))/0x1*(parseInt(_0x14f2d9(0x1a5))/0x2)+parseInt(_0x14f2d9(0x195))/0x3+-parseInt(_0x14f2d9(0x194))/0x4*(parseInt(_0x14f2d9(0x193))/0x5)+parseInt(_0x14f2d9(0x1a9))/0x6*(parseInt(_0x14f2d9(0x1a1))/0x7)+parseInt(_0x14f2d9(0x199))/0x8+-parseInt(_0x14f2d9(0x19c))/0x9*(-parseInt(_0x14f2d9(0x19f))/0xa)+-parseInt(_0x14f2d9(0x1a0))/0xb;if(_0x4a4c45===_0x53c819)break;else _0xae0755['push'](_0xae0755['shift']());}catch(_0x8c48a0){_0xae0755['push'](_0xae0755['shift']());}}}(a38_0x18c3,0xa3ce6));function a38_0x18c3(){const _0x1d5fdf=['5XWdQDH','2955748ZtoQcO','15072wmshdo','info','CLI\x20Built-in\x20Skill\x20installed','cli-skill','4190040kaFwJm','log','install','8149221wMmEik','cli-skill-install','pipe','10cyZcaV','402688nLqPBd','7rRUjrB','cwd','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','15443sCvqvn','12ewHxVm','inherit','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','629430SLtiNT','unknown','error','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','nonInteractive'];a38_0x18c3=function(){return _0x1d5fdf;};return a38_0x18c3();}import{CliErrors}from'../../errors.js';function a38_0x2dfb(_0xd91514,_0x2946dc){_0xd91514=_0xd91514-0x193;const _0x18c31b=a38_0x18c3();let _0x2dfbd1=_0x18c31b[_0xd91514];return _0x2dfbd1;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x4cc3ee(0x198),'command':a38_0x4cc3ee(0x19b),'description':a38_0x4cc3ee(0x1a3),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2f1e3a){const _0x27430b=a38_0x4cc3ee;logger['setLogPath'](process[_0x27430b(0x1a2)]()),logger[_0x27430b(0x196)](_0x27430b(0x19d),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4ed896,RABETBASE_SKILL_SOURCE:_0x31e70d,runNpxSkillsAddGlobal:_0x111ebb}=await import('../../skills/npx-skills-add.js'),_0x3f16da=_0x2f1e3a[_0x27430b(0x1ad)]?_0x27430b(0x19e):_0x27430b(0x1a6);console[_0x27430b(0x19a)](_0x27430b(0x1a8)+_0x4ed896+')...');const _0x567a3b=_0x111ebb(process['cwd'](),_0x31e70d,{'stdio':_0x3f16da});if(_0x567a3b['skipped'])console[_0x27430b(0x19a)](_0x27430b(0x1ac));else{if(_0x567a3b['ok'])console[_0x27430b(0x19a)](_0x27430b(0x197));else throw CliErrors['apiError']('npx\x20skills\x20add\x20failed:\x20'+(_0x567a3b[_0x27430b(0x1ab)]||_0x27430b(0x1aa)),_0x27430b(0x1a7)+_0x4ed896);}return{'ok':!![]};}}];
1
+ const a38_0x5b0307=a38_0x3605;(function(_0x2c9210,_0x553d9a){const _0x1c8c29=a38_0x3605,_0x5dfa69=_0x2c9210();while(!![]){try{const _0x42e6cd=-parseInt(_0x1c8c29(0x1ec))/0x1*(parseInt(_0x1c8c29(0x1f8))/0x2)+parseInt(_0x1c8c29(0x1ee))/0x3*(parseInt(_0x1c8c29(0x1ed))/0x4)+-parseInt(_0x1c8c29(0x1e6))/0x5*(-parseInt(_0x1c8c29(0x1e8))/0x6)+parseInt(_0x1c8c29(0x1f6))/0x7+parseInt(_0x1c8c29(0x1f7))/0x8+parseInt(_0x1c8c29(0x1dd))/0x9+-parseInt(_0x1c8c29(0x1f1))/0xa;if(_0x42e6cd===_0x553d9a)break;else _0x5dfa69['push'](_0x5dfa69['shift']());}catch(_0x508265){_0x5dfa69['push'](_0x5dfa69['shift']());}}}(a38_0x76a7,0xefc6a));function a38_0x76a7(){const _0x563c06=['cli-skill','330RVTYTS','pipe','77676HSvSdf','apiError','log','read','3WOOkxu','4ZReQFy','3390951SkMAjA',')...','cwd','14721950KoWxqS','inherit','unknown','npx\x20skills\x20add\x20failed:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','2550142CYvyHF','1498144RoNHAs','1119214ZgcmwY','14371299WKWkLA','error','install','skipped','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','setLogPath','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a38_0x76a7=function(){return _0x563c06;};return a38_0x76a7();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a38_0x3605(_0x59597e,_0x38b3ed){_0x59597e=_0x59597e-0x1dd;const _0x76a7e2=a38_0x76a7();let _0x360563=_0x76a7e2[_0x59597e];return _0x360563;}export const cliSkillDefinitions=[{'service':a38_0x5b0307(0x1e5),'command':a38_0x5b0307(0x1df),'description':a38_0x5b0307(0x1e1),'risk':a38_0x5b0307(0x1eb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x291cc7){const _0x4b2e88=a38_0x5b0307;logger[_0x4b2e88(0x1e3)](process['cwd']()),logger['info']('cli-skill-install',_0x4b2e88(0x1e4));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4ef033,RABETBASE_SKILL_SOURCE:_0x314989,runNpxSkillsAddGlobal:_0x1d1bfe}=await import('../../skills/npx-skills-add.js'),_0x4ae842=_0x291cc7['nonInteractive']?_0x4b2e88(0x1e7):_0x4b2e88(0x1f2);console[_0x4b2e88(0x1ea)](_0x4b2e88(0x1f5)+_0x4ef033+_0x4b2e88(0x1ef));const _0x549c24=_0x1d1bfe(process[_0x4b2e88(0x1f0)](),_0x314989,{'stdio':_0x4ae842});if(_0x549c24[_0x4b2e88(0x1e0)])console[_0x4b2e88(0x1ea)](_0x4b2e88(0x1e2));else{if(_0x549c24['ok'])console[_0x4b2e88(0x1ea)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x4b2e88(0x1e9)](_0x4b2e88(0x1f4)+(_0x549c24[_0x4b2e88(0x1de)]||_0x4b2e88(0x1f3)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x4ef033);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x20e17d=a39_0x18f4;(function(_0x13489a,_0x413e3e){const _0x40faaa=a39_0x18f4,_0x764862=_0x13489a();while(!![]){try{const _0x17a50f=parseInt(_0x40faaa(0x1e6))/0x1+-parseInt(_0x40faaa(0x1ba))/0x2*(parseInt(_0x40faaa(0x1ed))/0x3)+parseInt(_0x40faaa(0x1b4))/0x4*(parseInt(_0x40faaa(0x1b3))/0x5)+parseInt(_0x40faaa(0x1da))/0x6*(-parseInt(_0x40faaa(0x1ab))/0x7)+parseInt(_0x40faaa(0x197))/0x8*(-parseInt(_0x40faaa(0x1bd))/0x9)+-parseInt(_0x40faaa(0x1c7))/0xa+-parseInt(_0x40faaa(0x19a))/0xb*(-parseInt(_0x40faaa(0x1b2))/0xc);if(_0x17a50f===_0x413e3e)break;else _0x764862['push'](_0x764862['shift']());}catch(_0x5d4b6){_0x764862['push'](_0x764862['shift']());}}}(a39_0x4911,0x3e2b7));import a39_0x282ed9 from'chalk';import a39_0x38ed2e from'ora';import a39_0xf06534 from'semver';function a39_0x18f4(_0x5bdae3,_0x4429ca){_0x5bdae3=_0x5bdae3-0x196;const _0x4911a8=a39_0x4911();let _0x18f4b4=_0x4911a8[_0x5bdae3];return _0x18f4b4;}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{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x40cb2a=a39_0x18f4;return GIT_COMMIT!==_0x40cb2a(0x1b7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x40cb2a(0x1ec)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3cb061=a39_0x18f4,_0x9b1595=process[_0x3cb061(0x1a9)]['toLowerCase']();if(_0x9b1595['includes']('bun'))return'bun';return _0x3cb061(0x1a3);}const updateFlags=[{'name':a39_0x20e17d(0x1d4),'type':a39_0x20e17d(0x1e8),'description':a39_0x20e17d(0x1ac),'default':![]},{'name':a39_0x20e17d(0x19d),'type':a39_0x20e17d(0x1c2),'description':a39_0x20e17d(0x1e2)},{'name':'no-skills','type':a39_0x20e17d(0x1e8),'description':a39_0x20e17d(0x1be),'default':![]},{'name':a39_0x20e17d(0x1cf),'type':a39_0x20e17d(0x1e8),'description':a39_0x20e17d(0x1a5),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x461eeb){const _0x493b51=a39_0x20e17d;return _0x461eeb['str']('version')[_0x493b51(0x19c)]();}function shouldSkipCliSkill(_0xe8d04f){const _0x107d9b=a39_0x20e17d;return _0xe8d04f[_0x107d9b(0x1db)](_0x107d9b(0x1d9))||_0xe8d04f[_0x107d9b(0x1d5)](_0x107d9b(0x1cf))===![];}async function validateUpdateFlags(_0x1fe773){const _0x4268e3=a39_0x20e17d,_0x4457bd=_0x1fe773[_0x4268e3(0x1db)](_0x4268e3(0x1d4)),_0x617aa0=getRequestedVersion(_0x1fe773);if(_0x4457bd&&_0x617aa0)throw CliErrors[_0x4268e3(0x1cb)](_0x4268e3(0x1a7),_0x4268e3(0x1d3));if(_0x617aa0&&!a39_0xf06534[_0x4268e3(0x1a2)](_0x617aa0))throw CliErrors[_0x4268e3(0x1cb)](_0x4268e3(0x19b)+_0x617aa0,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x21d456=a39_0x20e17d;try{const _0x5d3e52=await fetch(_0x21d456(0x1c5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21d456(0x1af),{'signal':AbortSignal[_0x21d456(0x199)](0x2710)});if(!_0x5d3e52['ok'])return null;const _0x8132f9=await _0x5d3e52[_0x21d456(0x196)]();if(!_0x8132f9||typeof _0x8132f9!==_0x21d456(0x1ae))return null;return Object[_0x21d456(0x1cc)](Object['entries'](_0x8132f9)[_0x21d456(0x1d6)](([,_0x39b22e])=>typeof _0x39b22e===_0x21d456(0x1c2)&&_0x39b22e['trim']()[_0x21d456(0x1e0)]>0x0)[_0x21d456(0x1a6)](([_0x41a19c,_0x33e229])=>[_0x41a19c,String(_0x33e229)[_0x21d456(0x19c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1ce867){const _0x3d647d=await fetchNpmDistTags();return _0x3d647d?.[_0x1ce867]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x345f84){const _0x54f60c=a39_0x20e17d,_0x245419=getRequestedVersion(_0x345f84);if(_0x245419)return{'version':_0x245419,'source':_0x54f60c(0x19d)};if(_0x345f84[_0x54f60c(0x1db)](_0x54f60c(0x1d4))){const _0x5760c7=await fetchNpmDistTagVersion(_0x54f60c(0x1d4));if(!_0x5760c7)return null;return{'version':_0x5760c7,'source':_0x54f60c(0x1d4)};}const _0x17dd60=await fetchLatestVersion();if(!_0x17dd60)return null;return{'version':_0x17dd60,'source':'latest'};}function shouldInstallTarget(_0x3dd1ce,_0x4d24b9){const _0x31145e=a39_0x20e17d;if(_0x4d24b9['source']===_0x31145e(0x19d)||_0x4d24b9[_0x31145e(0x1b8)]===_0x31145e(0x1d4))return!a39_0xf06534['eq'](_0x3dd1ce,_0x4d24b9['version']);return a39_0xf06534['lt'](_0x3dd1ce,_0x4d24b9['version']);}function a39_0x4911(){const _0x2f0e88=['warn','\x20install\x20-g\x20','https://registry.npmjs.org/-/package/','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','3069170hHhdEC','inherit','\x20\x20Try\x20manually:\x20','skipped','validation','fromEntries','Updating\x20via\x20','message','skills','update','log','run','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','beta','flag','filter','cwd','Version\x20comparison\x20failed','no-skills','1774554pAAQNO','bool','succeed','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20Run\x20manually:\x20','latest','length','error','Install\x20a\x20specific\x20CLI\x20version','nonInteractive','@latest','Beta\x20version:\x20','192482tbyCsM','Already\x20up\x20to\x20date\x20(v','boolean','gray','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','fail','slice','3QEoXAF','json','2848FbLtUW','Updated\x20to\x20v','timeout','44mWMDxa','Invalid\x20version:\x20','trim','version','pipe','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Already\x20on\x20requested\x20version\x20(v','info','valid','npm','install','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','map','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20cli-skill\x20install','execPath','yellow','7oVqXLX','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','green','object','/dist-tags','Current\x20version:\x20','Update\x20failed','3172728UkMWDx','174290nuYceS','4EuKgXk','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Checking\x20for\x20updates...','unknown','source','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','366042uXkOOM','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','...','6183zrAVly','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','start','\x20→\x20','red','string'];a39_0x4911=function(){return _0x2f0e88;};return a39_0x4911();}function getInstallPlanLabel(_0x3bab12,_0x5e5020){const _0x164e77=a39_0x20e17d;switch(_0x5e5020[_0x164e77(0x1b8)]){case'beta':return _0x164e77(0x1e5)+a39_0x282ed9[_0x164e77(0x1aa)](_0x3bab12)+_0x164e77(0x1c0)+a39_0x282ed9[_0x164e77(0x1ad)](_0x5e5020[_0x164e77(0x19d)]);case _0x164e77(0x19d):return'Requested\x20version:\x20'+a39_0x282ed9[_0x164e77(0x1aa)](_0x3bab12)+'\x20→\x20'+a39_0x282ed9['green'](_0x5e5020[_0x164e77(0x19d)]);case _0x164e77(0x1df):default:return'Update\x20available:\x20'+a39_0x282ed9['yellow'](_0x3bab12)+'\x20→\x20'+a39_0x282ed9['green'](_0x5e5020[_0x164e77(0x19d)]);}}async function installCliSkill(_0x41f0ae){const _0x287d96=a39_0x20e17d;console[_0x287d96(0x1d1)](a39_0x282ed9[_0x287d96(0x1e9)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x43d691=runNpxSkillsAddGlobal(process[_0x287d96(0x1d7)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x41f0ae?_0x287d96(0x19e):_0x287d96(0x1c8)});if(_0x43d691[_0x287d96(0x1ca)]){console[_0x287d96(0x1d1)](a39_0x282ed9[_0x287d96(0x1e9)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x43d691['ok']){console[_0x287d96(0x1d1)](a39_0x282ed9[_0x287d96(0x1e9)](_0x287d96(0x1b9)));return;}console[_0x287d96(0x1c3)](a39_0x282ed9[_0x287d96(0x1aa)](_0x287d96(0x1bb)+(_0x43d691[_0x287d96(0x1e1)]||_0x287d96(0x1b7)))),console[_0x287d96(0x1d1)](a39_0x282ed9[_0x287d96(0x1e9)](_0x287d96(0x1de)+CLI_BIN_NAME+_0x287d96(0x1a8)));}async function execute(_0x429548){const _0x1fceae=a39_0x20e17d;await validateUpdateFlags(_0x429548);const _0x4988d2=getCurrentVersion();console[_0x1fceae(0x1d1)](_0x1fceae(0x1b0)+_0x4988d2);const _0x36ef59=a39_0x38ed2e(_0x1fceae(0x1b6))[_0x1fceae(0x1bf)](),_0x112e5f=await resolveTargetVersion(_0x429548);if(!_0x112e5f){const _0x4c3340=_0x429548[_0x1fceae(0x1db)](_0x1fceae(0x1d4))?_0x1fceae(0x1ea):_0x1fceae(0x1dd);return _0x36ef59['fail'](_0x4c3340),console['log'](a39_0x282ed9[_0x1fceae(0x1e9)](_0x1fceae(0x1c6)+NPM_PACKAGE_NAME+_0x1fceae(0x1e4))),{'ok':![],'message':_0x4c3340};}const _0x26fa9b=a39_0xf06534[_0x1fceae(0x1a2)](VERSION),_0x3f4eaf=a39_0xf06534[_0x1fceae(0x1a2)](_0x112e5f[_0x1fceae(0x19d)]);if(!_0x26fa9b||!_0x3f4eaf)return _0x36ef59[_0x1fceae(0x1eb)](_0x1fceae(0x1d8)),{'ok':![],'message':_0x1fceae(0x1d8)};if(!shouldInstallTarget(_0x26fa9b,_0x112e5f)){const _0x2e9262=_0x112e5f[_0x1fceae(0x1b8)]==='version'?_0x1fceae(0x1a0)+_0x112e5f[_0x1fceae(0x19d)]+')':_0x1fceae(0x1e7)+_0x112e5f[_0x1fceae(0x19d)]+')';return _0x36ef59[_0x1fceae(0x1dc)](_0x2e9262),shouldSkipCliSkill(_0x429548)?console[_0x1fceae(0x1d1)](a39_0x282ed9[_0x1fceae(0x1e9)](_0x1fceae(0x19f))):await installCliSkill(_0x429548[_0x1fceae(0x1e3)]),{'ok':!![]};}_0x36ef59[_0x1fceae(0x1a1)](getInstallPlanLabel(_0x4988d2,_0x112e5f));const _0x2075bc=detectPackageManager(),_0x115b2a=_0x2075bc===_0x1fceae(0x1a3)?resolveNpmBin(_0x1fceae(0x1a3)):_0x2075bc,_0x500860=a39_0x38ed2e(_0x1fceae(0x1cd)+_0x2075bc+_0x1fceae(0x1bc))['start']();try{return await execa(_0x115b2a,[_0x1fceae(0x1a4),'-g',NPM_PACKAGE_NAME+'@'+_0x112e5f[_0x1fceae(0x19d)]],{'stdio':'pipe'}),_0x500860[_0x1fceae(0x1dc)](_0x1fceae(0x198)+_0x112e5f[_0x1fceae(0x19d)]),console['log'](a39_0x282ed9[_0x1fceae(0x1e9)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x429548)?console[_0x1fceae(0x1d1)](a39_0x282ed9['gray'](_0x1fceae(0x19f))):await installCliSkill(_0x429548[_0x1fceae(0x1e3)]),{'ok':!![]};}catch(_0x257da5){return _0x500860['fail'](_0x1fceae(0x1b1)),console[_0x1fceae(0x1e1)](a39_0x282ed9[_0x1fceae(0x1c1)]('\x20\x20'+_0x257da5[_0x1fceae(0x1ce)])),console[_0x1fceae(0x1d1)](a39_0x282ed9[_0x1fceae(0x1e9)](_0x1fceae(0x1c9)+_0x2075bc+_0x1fceae(0x1c4)+NPM_PACKAGE_NAME+'@'+_0x112e5f[_0x1fceae(0x19d)])),{'ok':![],'message':_0x257da5[_0x1fceae(0x1ce)]};}}export const updateDefinition={'service':a39_0x20e17d(0x1d0),'command':a39_0x20e17d(0x1d2),'description':a39_0x20e17d(0x1b5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x45dd45=a39_0x2060;(function(_0x413f1d,_0x3f19e4){const _0x20f59f=a39_0x2060,_0x3e72ff=_0x413f1d();while(!![]){try{const _0x1ac400=-parseInt(_0x20f59f(0x1f9))/0x1+parseInt(_0x20f59f(0x205))/0x2*(parseInt(_0x20f59f(0x1ff))/0x3)+-parseInt(_0x20f59f(0x1c9))/0x4*(parseInt(_0x20f59f(0x1de))/0x5)+-parseInt(_0x20f59f(0x1e3))/0x6*(-parseInt(_0x20f59f(0x210))/0x7)+parseInt(_0x20f59f(0x1da))/0x8*(parseInt(_0x20f59f(0x1d6))/0x9)+parseInt(_0x20f59f(0x20c))/0xa+-parseInt(_0x20f59f(0x20b))/0xb*(parseInt(_0x20f59f(0x1ce))/0xc);if(_0x1ac400===_0x3f19e4)break;else _0x3e72ff['push'](_0x3e72ff['shift']());}catch(_0x407f9e){_0x3e72ff['push'](_0x3e72ff['shift']());}}}(a39_0x5242,0x188f2));import a39_0x4f71f7 from'chalk';import a39_0xdf470d from'ora';function a39_0x5242(){const _0x1ac73c=['\x20install\x20-g\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','error','76hhzUpH','boolean','\x20\x20Try\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','yellow','24KlPclP','green','update','log','@latest','map','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','193554lsKtGf','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','valid','24hZmwTg','Version\x20comparison\x20failed','Updating\x20via\x20','fromEntries','45635uitHic','Requested\x20version:\x20','https://registry.npmjs.org/-/package/','bun','gray','258DUNbYr','Invalid\x20version:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','skills','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20→\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','string','run','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','unknown','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Run\x20manually:\x20','includes','version','succeed','Already\x20on\x20requested\x20version\x20(v','beta','Checking\x20for\x20updates...','length','message','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','90905RIstJO','flag','fail','\x20cli-skill\x20install','validation','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','545289LjLWhp','info','bool','inherit','toLowerCase','json','2aXEARZ','warn','npm','Current\x20version:\x20','trim','...','1349458CWbpla','1811080WGipSK','source','read','install','29771ZSAmXt','no-skills','start','skipped','/dist-tags'];a39_0x5242=function(){return _0x1ac73c;};return a39_0x5242();}import a39_0x486e75 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{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x23b8e8=a39_0x2060;return GIT_COMMIT!==_0x23b8e8(0x1ed)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function a39_0x2060(_0x2815cb,_0x4af26f){_0x2815cb=_0x2815cb-0x1c9;const _0x524257=a39_0x5242();let _0x20601c=_0x524257[_0x2815cb];return _0x20601c;}function detectPackageManager(){const _0x4d563d=a39_0x2060,_0x2a9c1c=process['execPath'][_0x4d563d(0x203)]();if(_0x2a9c1c[_0x4d563d(0x1f0)]('bun'))return _0x4d563d(0x1e1);return _0x4d563d(0x207);}const updateFlags=[{'name':a39_0x45dd45(0x1f4),'type':'boolean','description':a39_0x45dd45(0x1ee),'default':![]},{'name':a39_0x45dd45(0x1f1),'type':a39_0x45dd45(0x1ea),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a39_0x45dd45(0x211),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':a39_0x45dd45(0x1ca),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2e1a4b){const _0x28f51c=a39_0x45dd45;return _0x2e1a4b['str'](_0x28f51c(0x1f1))[_0x28f51c(0x209)]();}function shouldSkipCliSkill(_0x6e7d78){const _0x4e010d=a39_0x45dd45;return _0x6e7d78[_0x4e010d(0x201)](_0x4e010d(0x211))||_0x6e7d78[_0x4e010d(0x1fa)](_0x4e010d(0x1e6))===![];}async function validateUpdateFlags(_0x834d55){const _0x414499=a39_0x45dd45,_0x3263b0=_0x834d55[_0x414499(0x201)](_0x414499(0x1f4)),_0x346b28=getRequestedVersion(_0x834d55);if(_0x3263b0&&_0x346b28)throw CliErrors[_0x414499(0x1fd)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x414499(0x1e5));if(_0x346b28&&!a39_0x486e75[_0x414499(0x1d9)](_0x346b28))throw CliErrors['validation'](_0x414499(0x1e4)+_0x346b28,_0x414499(0x1e7));}async function fetchNpmDistTags(){const _0x3311aa=a39_0x45dd45;try{const _0x46ec64=await fetch(_0x3311aa(0x1e0)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3311aa(0x214),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x46ec64['ok'])return null;const _0x1dea64=await _0x46ec64[_0x3311aa(0x204)]();if(!_0x1dea64||typeof _0x1dea64!=='object')return null;return Object[_0x3311aa(0x1dd)](Object['entries'](_0x1dea64)['filter'](([,_0x10a6ed])=>typeof _0x10a6ed===_0x3311aa(0x1ea)&&_0x10a6ed[_0x3311aa(0x209)]()[_0x3311aa(0x1f6)]>0x0)[_0x3311aa(0x1d3)](([_0x3b5d7d,_0x2932da])=>[_0x3b5d7d,String(_0x2932da)[_0x3311aa(0x209)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5adb60){const _0x257c3a=await fetchNpmDistTags();return _0x257c3a?.[_0x5adb60]??null;}async function fetchLatestVersion(){const _0x37a1a6=a39_0x45dd45;return fetchNpmDistTagVersion(_0x37a1a6(0x1d5));}async function resolveTargetVersion(_0x530bf4){const _0x4b0a15=a39_0x45dd45,_0xee537b=getRequestedVersion(_0x530bf4);if(_0xee537b)return{'version':_0xee537b,'source':_0x4b0a15(0x1f1)};if(_0x530bf4[_0x4b0a15(0x201)](_0x4b0a15(0x1f4))){const _0x42c480=await fetchNpmDistTagVersion('beta');if(!_0x42c480)return null;return{'version':_0x42c480,'source':_0x4b0a15(0x1f4)};}const _0x596262=await fetchLatestVersion();if(!_0x596262)return null;return{'version':_0x596262,'source':_0x4b0a15(0x1d5)};}function shouldInstallTarget(_0x3e6195,_0x29fc96){const _0xcde800=a39_0x45dd45;if(_0x29fc96[_0xcde800(0x20d)]==='version'||_0x29fc96[_0xcde800(0x20d)]==='beta')return!a39_0x486e75['eq'](_0x3e6195,_0x29fc96[_0xcde800(0x1f1)]);return a39_0x486e75['lt'](_0x3e6195,_0x29fc96[_0xcde800(0x1f1)]);}function getInstallPlanLabel(_0x46018f,_0x4ff451){const _0x3a52ac=a39_0x45dd45;switch(_0x4ff451[_0x3a52ac(0x20d)]){case'beta':return'Beta\x20version:\x20'+a39_0x4f71f7[_0x3a52ac(0x1cd)](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);case _0x3a52ac(0x1f1):return _0x3a52ac(0x1df)+a39_0x4f71f7[_0x3a52ac(0x1cd)](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);case _0x3a52ac(0x1d5):default:return'Update\x20available:\x20'+a39_0x4f71f7['yellow'](_0x46018f)+_0x3a52ac(0x1e8)+a39_0x4f71f7[_0x3a52ac(0x1cf)](_0x4ff451[_0x3a52ac(0x1f1)]);}}async function installCliSkill(_0x5a3214){const _0x5bced2=a39_0x45dd45;console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1d7)));const _0x3d1d99=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5a3214?'pipe':_0x5bced2(0x202)});if(_0x3d1d99[_0x5bced2(0x213)]){console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x3d1d99['ok']){console[_0x5bced2(0x1d1)](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1e9)));return;}console[_0x5bced2(0x206)](a39_0x4f71f7[_0x5bced2(0x1cd)](_0x5bced2(0x216)+(_0x3d1d99['error']||_0x5bced2(0x1ed)))),console['log'](a39_0x4f71f7[_0x5bced2(0x1e2)](_0x5bced2(0x1ef)+CLI_BIN_NAME+_0x5bced2(0x1fc)));}async function execute(_0x458283){const _0x3fec7d=a39_0x45dd45;await validateUpdateFlags(_0x458283);const _0x2449f6=getCurrentVersion();console[_0x3fec7d(0x1d1)](_0x3fec7d(0x208)+_0x2449f6);const _0x5cc95c=a39_0xdf470d(_0x3fec7d(0x1f5))[_0x3fec7d(0x212)](),_0x2caf89=await resolveTargetVersion(_0x458283);if(!_0x2caf89){const _0x1e5c1d=_0x458283[_0x3fec7d(0x201)](_0x3fec7d(0x1f4))?_0x3fec7d(0x1f8):_0x3fec7d(0x1cc);return _0x5cc95c[_0x3fec7d(0x1fb)](_0x1e5c1d),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1d8)+NPM_PACKAGE_NAME+_0x3fec7d(0x1d2))),{'ok':![],'message':_0x1e5c1d};}const _0x49bfd8=a39_0x486e75['valid'](VERSION),_0x1c54a9=a39_0x486e75[_0x3fec7d(0x1d9)](_0x2caf89[_0x3fec7d(0x1f1)]);if(!_0x49bfd8||!_0x1c54a9)return _0x5cc95c[_0x3fec7d(0x1fb)](_0x3fec7d(0x1db)),{'ok':![],'message':_0x3fec7d(0x1db)};if(!shouldInstallTarget(_0x49bfd8,_0x2caf89)){const _0x75cbd5=_0x2caf89[_0x3fec7d(0x20d)]===_0x3fec7d(0x1f1)?_0x3fec7d(0x1f3)+_0x2caf89['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x2caf89[_0x3fec7d(0x1f1)]+')';return _0x5cc95c[_0x3fec7d(0x1f2)](_0x75cbd5),shouldSkipCliSkill(_0x458283)?console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1fe))):await installCliSkill(_0x458283['nonInteractive']),{'ok':!![]};}_0x5cc95c[_0x3fec7d(0x200)](getInstallPlanLabel(_0x2449f6,_0x2caf89));const _0x146260=detectPackageManager(),_0x4fdc58=_0x146260===_0x3fec7d(0x207)?resolveNpmBin(_0x3fec7d(0x207)):_0x146260,_0x355286=a39_0xdf470d(_0x3fec7d(0x1dc)+_0x146260+_0x3fec7d(0x20a))[_0x3fec7d(0x212)]();try{return await execa(_0x4fdc58,[_0x3fec7d(0x20f),'-g',NPM_PACKAGE_NAME+'@'+_0x2caf89[_0x3fec7d(0x1f1)]],{'stdio':'pipe'}),_0x355286['succeed']('Updated\x20to\x20v'+_0x2caf89[_0x3fec7d(0x1f1)]),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1d4))),shouldSkipCliSkill(_0x458283)?console['log'](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1fe))):await installCliSkill(_0x458283['nonInteractive']),{'ok':!![]};}catch(_0x3f060e){return _0x355286['fail']('Update\x20failed'),console[_0x3fec7d(0x217)](a39_0x4f71f7['red']('\x20\x20'+_0x3f060e[_0x3fec7d(0x1f7)])),console[_0x3fec7d(0x1d1)](a39_0x4f71f7[_0x3fec7d(0x1e2)](_0x3fec7d(0x1cb)+_0x146260+_0x3fec7d(0x215)+NPM_PACKAGE_NAME+'@'+_0x2caf89[_0x3fec7d(0x1f1)])),{'ok':![],'message':_0x3f060e[_0x3fec7d(0x1f7)]};}}export const updateDefinition={'service':a39_0x45dd45(0x1d0),'command':a39_0x45dd45(0x1eb),'description':a39_0x45dd45(0x1ec),'risk':a39_0x45dd45(0x20e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x2be995,_0x4bdb03){const _0x3d4c80=a40_0x1d57,_0x292a76=_0x2be995();while(!![]){try{const _0x2eb208=-parseInt(_0x3d4c80(0xf5))/0x1*(parseInt(_0x3d4c80(0xf8))/0x2)+-parseInt(_0x3d4c80(0xf1))/0x3+-parseInt(_0x3d4c80(0xf3))/0x4+-parseInt(_0x3d4c80(0xf2))/0x5+-parseInt(_0x3d4c80(0xf0))/0x6+-parseInt(_0x3d4c80(0xf7))/0x7+-parseInt(_0x3d4c80(0xf6))/0x8*(-parseInt(_0x3d4c80(0xf4))/0x9);if(_0x2eb208===_0x4bdb03)break;else _0x292a76['push'](_0x292a76['shift']());}catch(_0x41d3d8){_0x292a76['push'](_0x292a76['shift']());}}}(a40_0x1813,0x893c1));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x1813(){const _0x219b7a=['1105049spShFo','8rYmuyl','851277pDUiEA','2qoktzs','2597232XuqDAy','3026004BmLZXl','3284815reNfDh','3671492fNcVBQ','43246341HiCWZK'];a40_0x1813=function(){return _0x219b7a;};return a40_0x1813();}import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x1d57(_0x2d73de,_0x82440b){_0x2d73de=_0x2d73de-0xf0;const _0x1813ce=a40_0x1813();let _0x1d57f9=_0x1813ce[_0x2d73de];return _0x1d57f9;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x2f9540,_0x3a5d25){const _0x5247fc=a40_0x243b,_0x48fb14=_0x2f9540();while(!![]){try{const _0x2a9e99=-parseInt(_0x5247fc(0x18e))/0x1*(parseInt(_0x5247fc(0x185))/0x2)+parseInt(_0x5247fc(0x186))/0x3*(-parseInt(_0x5247fc(0x18b))/0x4)+-parseInt(_0x5247fc(0x18d))/0x5+-parseInt(_0x5247fc(0x18c))/0x6+-parseInt(_0x5247fc(0x188))/0x7+parseInt(_0x5247fc(0x18a))/0x8+-parseInt(_0x5247fc(0x187))/0x9*(-parseInt(_0x5247fc(0x189))/0xa);if(_0x2a9e99===_0x3a5d25)break;else _0x48fb14['push'](_0x48fb14['shift']());}catch(_0x524062){_0x48fb14['push'](_0x48fb14['shift']());}}}(a40_0x31b2,0xb5485));import{codegenSdk}from'../../commands/codegen/sdk.js';function a40_0x243b(_0x3059f7,_0x4ed1f8){_0x3059f7=_0x3059f7-0x185;const _0x31b20c=a40_0x31b2();let _0x243b68=_0x31b20c[_0x3059f7];return _0x243b68;}function a40_0x31b2(){const _0x5449a5=['8DTfmcr','692304jlJFaj','4897205nPckFL','59KvtgTQ','29738chxVyH','1051818TocmLR','9333FYmROp','5406205DMEsvg','29570bWHMAc','8973976CVTevc'];a40_0x31b2=function(){return _0x5449a5;};return a40_0x31b2();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x1bb7ed=a41_0x4855;(function(_0x48f029,_0x3e3c91){const _0x47e1eb=a41_0x4855,_0x1fce85=_0x48f029();while(!![]){try{const _0x486616=parseInt(_0x47e1eb(0x7d))/0x1*(parseInt(_0x47e1eb(0x6d))/0x2)+-parseInt(_0x47e1eb(0x6c))/0x3+-parseInt(_0x47e1eb(0x6f))/0x4+parseInt(_0x47e1eb(0x7c))/0x5+parseInt(_0x47e1eb(0x73))/0x6*(parseInt(_0x47e1eb(0x70))/0x7)+parseInt(_0x47e1eb(0x74))/0x8+-parseInt(_0x47e1eb(0x7b))/0x9;if(_0x486616===_0x3e3c91)break;else _0x1fce85['push'](_0x1fce85['shift']());}catch(_0x132652){_0x1fce85['push'](_0x1fce85['shift']());}}}(a41_0x1671,0x731cf));function a41_0x1671(){const _0x5d2b70=['str','bool','12918861oXdtnT','1766730toTSXx','75147wvkezG','appCode','boolean','Omit\x20import\x20statements\x20from\x20generated\x20code','skip-imports','66669KINUoi','22lHZIXe','code','3481012hrqTKp','5007499QQbPxi','operation','alias','6wBfrEt','7232704IRyQFS','read','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','name'];a41_0x1671=function(){return _0x5d2b70;};return a41_0x1671();}function a41_0x4855(_0x2c6673,_0x19478d){_0x2c6673=_0x2c6673-0x69;const _0x1671fc=a41_0x1671();let _0x485524=_0x1671fc[_0x2c6673];return _0x485524;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a41_0x1bb7ed(0x75),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x1bb7ed(0x72),'type':'string','description':a41_0x1bb7ed(0x77)},{'name':a41_0x1bb7ed(0x71),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0x1bb7ed(0x6b),'type':a41_0x1bb7ed(0x69),'description':a41_0x1bb7ed(0x6a)}],async 'execute'(_0x45b537){const _0x4281a0=a41_0x1bb7ed,{dataset:_0x282750,operation:_0x42419c}=await getOperationDetail(_0x45b537[_0x4281a0(0x7e)],_0x45b537['str']('code'),_0x45b537[_0x4281a0(0x79)](_0x4281a0(0x71))),_0x4dae4c=generateSdkCode(_0x282750,_0x42419c,{'includeImports':!_0x45b537[_0x4281a0(0x7a)](_0x4281a0(0x6b))});return{'ok':!![],'data':{'dataset':{'name':_0x282750[_0x4281a0(0x78)],'code':_0x282750[_0x4281a0(0x6e)],'tableName':_0x282750[_0x4281a0(0x76)]},'operation':_0x45b537[_0x4281a0(0x79)](_0x4281a0(0x71)),'code':_0x4dae4c}};}};
1
+ const a41_0x24d0c1=a41_0x2cc9;(function(_0x5a8010,_0x2e41d6){const _0x4c6f23=a41_0x2cc9,_0x278309=_0x5a8010();while(!![]){try{const _0x31619b=parseInt(_0x4c6f23(0x168))/0x1+-parseInt(_0x4c6f23(0x16a))/0x2+-parseInt(_0x4c6f23(0x177))/0x3+-parseInt(_0x4c6f23(0x171))/0x4*(parseInt(_0x4c6f23(0x166))/0x5)+-parseInt(_0x4c6f23(0x17a))/0x6+parseInt(_0x4c6f23(0x178))/0x7+parseInt(_0x4c6f23(0x17d))/0x8*(parseInt(_0x4c6f23(0x167))/0x9);if(_0x31619b===_0x2e41d6)break;else _0x278309['push'](_0x278309['shift']());}catch(_0x1bf28d){_0x278309['push'](_0x278309['shift']());}}}(a41_0x2e82,0x3253d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x24d0c1(0x16d),'command':a41_0x24d0c1(0x17b),'description':a41_0x24d0c1(0x16e),'risk':a41_0x24d0c1(0x176),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x24d0c1(0x173),'type':a41_0x24d0c1(0x170),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x24d0c1(0x172),'type':a41_0x24d0c1(0x170),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0x24d0c1(0x17c),'type':a41_0x24d0c1(0x16f),'description':a41_0x24d0c1(0x169)}],async 'execute'(_0x33da5b){const _0x427018=a41_0x24d0c1,{dataset:_0x68f72e,operation:_0x3b71bd}=await getOperationDetail(_0x33da5b[_0x427018(0x175)],_0x33da5b[_0x427018(0x16b)](_0x427018(0x174)),_0x33da5b['str'](_0x427018(0x172))),_0xb9806a=generateSdkCode(_0x68f72e,_0x3b71bd,{'includeImports':!_0x33da5b['bool'](_0x427018(0x17c))});return{'ok':!![],'data':{'dataset':{'name':_0x68f72e[_0x427018(0x179)],'code':_0x68f72e[_0x427018(0x174)],'tableName':_0x68f72e[_0x427018(0x16c)]},'operation':_0x33da5b[_0x427018(0x16b)](_0x427018(0x172)),'code':_0xb9806a}};}};function a41_0x2cc9(_0x567721,_0x367f7f){_0x567721=_0x567721-0x166;const _0x2e823e=a41_0x2e82();let _0x2cc9d7=_0x2e823e[_0x567721];return _0x2cc9d7;}function a41_0x2e82(){const _0x6a9d97=['Omit\x20import\x20statements\x20from\x20generated\x20code','114402lSYpQa','str','tableName','codegen','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','boolean','string','232mIKFlw','operation','alias','code','appCode','read','1134564qkSqgR','1664516wrfaZs','name','1435152vSEOWY','sdk','skip-imports','20000PikEmA','28610OeTHJk','2682UTXskm','229810NHKoeL'];a41_0x2e82=function(){return _0x6a9d97;};return a41_0x2e82();}
@@ -1 +1 @@
1
- const a42_0x5333dc=a42_0x4d4a;(function(_0x151f49,_0x157f64){const _0x3e7a4f=a42_0x4d4a,_0x330455=_0x151f49();while(!![]){try{const _0x52a623=-parseInt(_0x3e7a4f(0x16c))/0x1*(parseInt(_0x3e7a4f(0x16f))/0x2)+-parseInt(_0x3e7a4f(0x169))/0x3+parseInt(_0x3e7a4f(0x175))/0x4+-parseInt(_0x3e7a4f(0x167))/0x5+parseInt(_0x3e7a4f(0x176))/0x6+-parseInt(_0x3e7a4f(0x173))/0x7*(-parseInt(_0x3e7a4f(0x164))/0x8)+parseInt(_0x3e7a4f(0x168))/0x9;if(_0x52a623===_0x157f64)break;else _0x330455['push'](_0x330455['shift']());}catch(_0x3c7ce9){_0x330455['push'](_0x330455['shift']());}}}(a42_0x407a,0x5fbe7));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a42_0x407a(){const _0x276b57=['string','sdk','Omit\x20import\x20statements\x20from\x20generated\x20code','7DFFONy','sql','292920mMYHFZ','2840988rdMcCB','target','sqlName','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','5000480fjCkvP','str','appCode','3078330DcyMKM','8689860ubwKAz','1706316WrDFgv','boolean','codegen','67tCrvcK','read','bool','16738PZhroW'];a42_0x407a=function(){return _0x276b57;};return a42_0x407a();}function a42_0x4d4a(_0x6faf1d,_0x2f2a1f){_0x6faf1d=_0x6faf1d-0x163;const _0x407af5=a42_0x407a();let _0x4d4aff=_0x407af5[_0x6faf1d];return _0x4d4aff;}export const codegenSql={'service':a42_0x5333dc(0x16b),'command':a42_0x5333dc(0x174),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x5333dc(0x16d),'flags':[SQLCODE_FLAG,{'name':a42_0x5333dc(0x177),'type':a42_0x5333dc(0x170),'description':a42_0x5333dc(0x163),'default':a42_0x5333dc(0x171),'enum':['sdk','bff']},{'name':'no-imports','type':a42_0x5333dc(0x16a),'description':a42_0x5333dc(0x172)}],async 'execute'(_0x15afd3){const _0x5cefbc=a42_0x5333dc,_0x1b859c=await getSqlQueryInfo(_0x15afd3[_0x5cefbc(0x166)],_0x15afd3[_0x5cefbc(0x165)]('sqlcode')),_0x1ee98c=_0x15afd3['str'](_0x5cefbc(0x177))||_0x5cefbc(0x171),_0x17ffeb=generateSqlCodeTemplate(_0x1b859c,{'target':_0x1ee98c,'includeImports':!_0x15afd3[_0x5cefbc(0x16e)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x1b859c['sqlCode'],'sqlName':_0x1b859c[_0x5cefbc(0x178)],'target':_0x1ee98c,'code':_0x17ffeb}};}};
1
+ const a42_0x32ea69=a42_0x6ba3;(function(_0x436e53,_0x526671){const _0x774f7f=a42_0x6ba3,_0x24a411=_0x436e53();while(!![]){try{const _0xfba231=-parseInt(_0x774f7f(0x1bb))/0x1+parseInt(_0x774f7f(0x1b8))/0x2*(parseInt(_0x774f7f(0x1ba))/0x3)+-parseInt(_0x774f7f(0x1b6))/0x4+-parseInt(_0x774f7f(0x1ab))/0x5+-parseInt(_0x774f7f(0x1a8))/0x6+parseInt(_0x774f7f(0x1ac))/0x7+parseInt(_0x774f7f(0x1b7))/0x8;if(_0xfba231===_0x526671)break;else _0x24a411['push'](_0x24a411['shift']());}catch(_0x226dc4){_0x24a411['push'](_0x24a411['shift']());}}}(a42_0x5a1b,0x5bea3));function a42_0x6ba3(_0x1e3fb8,_0x338dfb){_0x1e3fb8=_0x1e3fb8-0x1a5;const _0x5a1b93=a42_0x5a1b();let _0x6ba3b6=_0x5a1b93[_0x1e3fb8];return _0x6ba3b6;}function a42_0x5a1b(){const _0x22aed5=['bool','appCode','3762710vfvTKZ','1285879NVMCqJ','str','sdk','no-imports','sqlcode','boolean','sql','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','string','2074164FKfqTR','21438008WFewyF','2UpCNpn','Omit\x20import\x20statements\x20from\x20generated\x20code','708051WHnjcC','752174kpBlmf','target','sqlCode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','codegen','sqlName','4198350sLwdFi'];a42_0x5a1b=function(){return _0x22aed5;};return a42_0x5a1b();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x32ea69(0x1a6),'command':a42_0x32ea69(0x1b2),'description':a42_0x32ea69(0x1b4),'risk':a42_0x32ea69(0x1b3),'flags':[SQLCODE_FLAG,{'name':a42_0x32ea69(0x1bc),'type':a42_0x32ea69(0x1b5),'description':a42_0x32ea69(0x1a5),'default':a42_0x32ea69(0x1ae),'enum':[a42_0x32ea69(0x1ae),'bff']},{'name':'no-imports','type':a42_0x32ea69(0x1b1),'description':a42_0x32ea69(0x1b9)}],async 'execute'(_0x53fe83){const _0x4697e2=a42_0x32ea69,_0x159209=await getSqlQueryInfo(_0x53fe83[_0x4697e2(0x1aa)],_0x53fe83[_0x4697e2(0x1ad)](_0x4697e2(0x1b0))),_0x2751e3=_0x53fe83['str'](_0x4697e2(0x1bc))||_0x4697e2(0x1ae),_0x2ff19d=generateSqlCodeTemplate(_0x159209,{'target':_0x2751e3,'includeImports':!_0x53fe83[_0x4697e2(0x1a9)](_0x4697e2(0x1af))});return{'ok':!![],'data':{'sqlCode':_0x159209[_0x4697e2(0x1bd)],'sqlName':_0x159209[_0x4697e2(0x1a7)],'target':_0x2751e3,'code':_0x2ff19d}};}};
@@ -1 +1 @@
1
- (function(_0xbd4b0,_0x1dbe4d){const _0x5105cb=a43_0x4133,_0x29adea=_0xbd4b0();while(!![]){try{const _0x3b36b8=-parseInt(_0x5105cb(0x1f2))/0x1+parseInt(_0x5105cb(0x1d7))/0x2*(parseInt(_0x5105cb(0x1d6))/0x3)+-parseInt(_0x5105cb(0x1ef))/0x4*(parseInt(_0x5105cb(0x1e6))/0x5)+-parseInt(_0x5105cb(0x1f8))/0x6+-parseInt(_0x5105cb(0x1dd))/0x7+-parseInt(_0x5105cb(0x1d9))/0x8*(parseInt(_0x5105cb(0x1ed))/0x9)+-parseInt(_0x5105cb(0x1f3))/0xa*(-parseInt(_0x5105cb(0x1e3))/0xb);if(_0x3b36b8===_0x1dbe4d)break;else _0x29adea['push'](_0x29adea['shift']());}catch(_0x557a11){_0x29adea['push'](_0x29adea['shift']());}}}(a43_0x2f12,0x941a3));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a43_0x4133(_0x2d2a31,_0x59d1ea){_0x2d2a31=_0x2d2a31-0x1cc;const _0x2f12c4=a43_0x2f12();let _0x413345=_0x2f12c4[_0x2d2a31];return _0x413345;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x57abb8=a43_0x4133;return[{'name':_0x57abb8(0x1eb),'type':'string','description':_0x57abb8(0x1d3),'required':!![]},{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4304cc=a43_0x4133;return[{'name':_0x4304cc(0x1e5),'type':_0x4304cc(0x1f1),'description':_0x4304cc(0x1d5),'default':![]}];}function a43_0x2f12(){const _0x4b819a=['252NfVfjL','validation','8BbAyxE','App\x20\x22','boolean','218071HKfuvd','50tjSGvE','keys','Updated','\x22\x20not\x20found.','args','1860012ncNzTj','\x22\x20(appcode:\x20','project','Usage:\x20','inherit','both','flagMissing','\x20Set\x20as\x20default\x20app.','\x20<name>\x20[--global]','Added','App\x20code','\x20config.','Use\x20global\x20config\x20scope','3odoxwR','1117726SkCmnQ','projectConfig','285696iSmJMc','object','\x20Default\x20app\x20changed\x20to\x20\x22','globalConfig','6028365uPVFGh','str','trim','\x20app\x20\x22','\x20Note:\x20app\x20\x22','Missing\x20app\x20name.','7570750CqOneh','Removed\x20app\x20\x22','global','2510705rjOJMV','apps','length','bool','defaultApp','appcode','\x20<name>\x20--appcode\x20<code>'];a43_0x2f12=function(){return _0x4b819a;};return a43_0x2f12();}export async function validateAppName(_0x139e5e,_0x1c02d5){const _0x4950a4=a43_0x4133,_0x2e5791=_0x139e5e[_0x4950a4(0x1f7)][0x0]?.[_0x4950a4(0x1df)]();if(!_0x2e5791)throw CliErrors[_0x4950a4(0x1ee)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1c02d5+'\x20<name>');}export async function runAppAdd(_0x5b9cd0,_0x3ca393){const _0x2d2f61=a43_0x4133,_0x26a6c1=_0x5b9cd0[_0x2d2f61(0x1f7)][0x0]?.[_0x2d2f61(0x1df)]();if(!_0x26a6c1)throw CliErrors['validation'](_0x2d2f61(0x1e2),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3ca393+_0x2d2f61(0x1ec));const _0x3ca3d2=_0x5b9cd0['str']('appcode');if(!_0x3ca3d2)throw CliErrors[_0x2d2f61(0x1cf)](_0x2d2f61(0x1eb),_0x2d2f61(0x1cc)+CLI_BIN_NAME+'\x20'+_0x3ca393+_0x2d2f61(0x1ec));const _0x3480f0={'global':_0x5b9cd0['bool'](_0x2d2f61(0x1e5))},_0x5b68c9=readConfig(_0x3480f0);if(!_0x5b68c9[_0x2d2f61(0x1e7)])_0x5b68c9[_0x2d2f61(0x1e7)]={};const _0x23299d={'appcode':_0x3ca3d2,...collectAppProfileOverrides(_0x4384e7=>_0x5b9cd0[_0x2d2f61(0x1de)](_0x4384e7))},_0x3158cd=_0x5b68c9['apps'],_0x13a606=!!_0x3158cd[_0x26a6c1];_0x3158cd[_0x26a6c1]=_0x23299d;if(!_0x5b68c9[_0x2d2f61(0x1ea)])_0x5b68c9[_0x2d2f61(0x1ea)]=_0x26a6c1;writeConfig(_0x5b68c9,_0x3480f0);const _0x42a7c1=!_0x13a606&&_0x5b68c9[_0x2d2f61(0x1ea)]===_0x26a6c1?_0x2d2f61(0x1d0):'',_0x11300f=(_0x13a606?_0x2d2f61(0x1f5):_0x2d2f61(0x1d2))+_0x2d2f61(0x1e0)+_0x26a6c1+_0x2d2f61(0x1f9)+_0x3ca3d2+')'+scopeLabel(_0x3480f0)+'.'+_0x42a7c1;return{'ok':!![],'message':_0x11300f};}export async function runAppRemove(_0x3f64fa,_0x11da34){const _0x2f4398=a43_0x4133,_0xe01f12=_0x3f64fa[_0x2f4398(0x1f7)][0x0]?.[_0x2f4398(0x1df)]();if(!_0xe01f12)throw CliErrors[_0x2f4398(0x1ee)]('Missing\x20app\x20name.',_0x2f4398(0x1cc)+CLI_BIN_NAME+'\x20'+_0x11da34+_0x2f4398(0x1d1));const _0x3bc1b8=_0x3f64fa[_0x2f4398(0x1e9)](_0x2f4398(0x1e5)),{config:_0x1f7ebf,layers:_0x2c18d3}=readRawConfigWithLayers(),_0xeec228=_0x1f7ebf[_0x2f4398(0x1e7)]??{};if(!_0xeec228[_0xe01f12])throw CliErrors[_0x2f4398(0x1ee)](_0x2f4398(0x1f0)+_0xe01f12+_0x2f4398(0x1f6));const _0x813a4e=_0x2c18d3[_0x2f4398(0x1dc)]['apps']&&typeof _0x2c18d3[_0x2f4398(0x1dc)]['apps']==='object'?_0x2c18d3['globalConfig'][_0x2f4398(0x1e7)]:{},_0x548667=_0x2c18d3[_0x2f4398(0x1d8)]['apps']&&typeof _0x2c18d3[_0x2f4398(0x1d8)][_0x2f4398(0x1e7)]===_0x2f4398(0x1da)?_0x2c18d3[_0x2f4398(0x1d8)][_0x2f4398(0x1e7)]:{},_0x419217=appDefinedIn(_0xe01f12,_0x813a4e,_0x548667,_0x2c18d3[_0x2f4398(0x1d8)][_0x2f4398(0x1cd)]===![]),_0x2cda4a=resolveAppScopeForWrite(_0xe01f12,_0x3bc1b8,_0x2c18d3),_0x5c3295={'global':_0x2cda4a===_0x2f4398(0x1e5)},_0x541f02=readConfig(_0x5c3295),_0x808443=_0x541f02[_0x2f4398(0x1e7)];if(!_0x808443||!_0x808443[_0xe01f12])throw CliErrors[_0x2f4398(0x1ee)](_0x2f4398(0x1f0)+_0xe01f12+_0x2f4398(0x1f6));delete _0x808443[_0xe01f12];let _0x5b01d6='';if(_0x541f02['defaultApp']===_0xe01f12){const _0x287ba8=Object[_0x2f4398(0x1f4)](_0x808443);_0x541f02[_0x2f4398(0x1ea)]=_0x287ba8[_0x2f4398(0x1e8)]>0x0?_0x287ba8[0x0]:undefined,_0x541f02[_0x2f4398(0x1ea)]?_0x5b01d6=_0x2f4398(0x1db)+_0x541f02[_0x2f4398(0x1ea)]+'\x22.':delete _0x541f02[_0x2f4398(0x1ea)];}Object[_0x2f4398(0x1f4)](_0x808443)['length']===0x0&&(delete _0x541f02[_0x2f4398(0x1e7)],delete _0x541f02['defaultApp']);writeConfig(_0x541f02,_0x5c3295);const _0x12f0b5=_0x419217===_0x2f4398(0x1ce)?_0x2f4398(0x1e1)+_0xe01f12+'\x22\x20still\x20defined\x20in\x20'+(_0x2cda4a===_0x2f4398(0x1fa)?'global':_0x2f4398(0x1fa))+_0x2f4398(0x1d4):'';return{'ok':!![],'message':_0x2f4398(0x1e4)+_0xe01f12+'\x22'+scopeLabel(_0x5c3295)+'.'+_0x5b01d6+_0x12f0b5};}
1
+ function a43_0x4f8d(_0x15d3bf,_0xb3dcbd){_0x15d3bf=_0x15d3bf-0xdb;const _0x5adf8c=a43_0x5adf();let _0x4f8d6d=_0x5adf8c[_0x15d3bf];return _0x4f8d6d;}(function(_0x152e88,_0x1aab89){const _0x58e2da=a43_0x4f8d,_0x294b3d=_0x152e88();while(!![]){try{const _0x41938f=parseInt(_0x58e2da(0xef))/0x1*(-parseInt(_0x58e2da(0xeb))/0x2)+-parseInt(_0x58e2da(0xed))/0x3+-parseInt(_0x58e2da(0xdf))/0x4*(parseInt(_0x58e2da(0x104))/0x5)+-parseInt(_0x58e2da(0xe0))/0x6+parseInt(_0x58e2da(0xfc))/0x7*(-parseInt(_0x58e2da(0x105))/0x8)+parseInt(_0x58e2da(0xf3))/0x9+-parseInt(_0x58e2da(0xfb))/0xa*(-parseInt(_0x58e2da(0xea))/0xb);if(_0x41938f===_0x1aab89)break;else _0x294b3d['push'](_0x294b3d['shift']());}catch(_0x165396){_0x294b3d['push'](_0x294b3d['shift']());}}}(a43_0x5adf,0xb5065));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';function a43_0x5adf(){const _0x4d1730=['Use\x20global\x20config\x20scope','329895QOebdW','2762808ZYmKvL','\x22\x20still\x20defined\x20in\x20','App\x20code','globalConfig','Updated','Missing\x20app\x20name.','52eFOuAA','2512296oOeRnJ','appcode','\x22\x20not\x20found.','bool','boolean','\x20Note:\x20app\x20\x22','\x20app\x20\x22','both','global','\x20config.','22nGIrTx','46294ocFLxR','\x22\x20(appcode:\x20','1774485xwoCze','App\x20\x22','37pvLwyj','\x20Default\x20app\x20changed\x20to\x20\x22','Usage:\x20','defaultApp','3338145kpBxsg','\x20<name>','validation','keys','\x20<name>\x20--appcode\x20<code>','length','str','project','20655010sZQbtg','21XjTFsF','apps','string','projectConfig','args','object','trim'];a43_0x5adf=function(){return _0x4d1730;};return a43_0x5adf();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x245e97=a43_0x4f8d;return[{'name':'appcode','type':_0x245e97(0xfe),'description':_0x245e97(0xdb),'required':!![]},{'name':_0x245e97(0xe8),'type':_0x245e97(0xe4),'description':_0x245e97(0x103),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x270951=a43_0x4f8d;return[{'name':_0x270951(0xe8),'type':_0x270951(0xe4),'description':_0x270951(0x103),'default':![]}];}export async function validateAppName(_0x5dc8ec,_0x288f3e){const _0x323ee9=a43_0x4f8d,_0x1d4652=_0x5dc8ec[_0x323ee9(0x100)][0x0]?.[_0x323ee9(0x102)]();if(!_0x1d4652)throw CliErrors[_0x323ee9(0xf5)](_0x323ee9(0xde),_0x323ee9(0xf1)+CLI_BIN_NAME+'\x20'+_0x288f3e+_0x323ee9(0xf4));}export async function runAppAdd(_0x4e28d7,_0x52cf63){const _0x6157c3=a43_0x4f8d,_0x5a4749=_0x4e28d7['args'][0x0]?.[_0x6157c3(0x102)]();if(!_0x5a4749)throw CliErrors[_0x6157c3(0xf5)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x52cf63+_0x6157c3(0xf7));const _0x134b55=_0x4e28d7['str'](_0x6157c3(0xe1));if(!_0x134b55)throw CliErrors['flagMissing'](_0x6157c3(0xe1),_0x6157c3(0xf1)+CLI_BIN_NAME+'\x20'+_0x52cf63+_0x6157c3(0xf7));const _0x4d6fa6={'global':_0x4e28d7[_0x6157c3(0xe3)](_0x6157c3(0xe8))},_0x2a5ad0=readConfig(_0x4d6fa6);if(!_0x2a5ad0[_0x6157c3(0xfd)])_0x2a5ad0[_0x6157c3(0xfd)]={};const _0x332797={'appcode':_0x134b55,...collectAppProfileOverrides(_0x18aeb3=>_0x4e28d7[_0x6157c3(0xf9)](_0x18aeb3))},_0x521b5a=_0x2a5ad0[_0x6157c3(0xfd)],_0x287327=!!_0x521b5a[_0x5a4749];_0x521b5a[_0x5a4749]=_0x332797;if(!_0x2a5ad0[_0x6157c3(0xf2)])_0x2a5ad0['defaultApp']=_0x5a4749;writeConfig(_0x2a5ad0,_0x4d6fa6);const _0x556258=!_0x287327&&_0x2a5ad0[_0x6157c3(0xf2)]===_0x5a4749?'\x20Set\x20as\x20default\x20app.':'',_0x374056=(_0x287327?_0x6157c3(0xdd):'Added')+_0x6157c3(0xe6)+_0x5a4749+_0x6157c3(0xec)+_0x134b55+')'+scopeLabel(_0x4d6fa6)+'.'+_0x556258;return{'ok':!![],'message':_0x374056};}export async function runAppRemove(_0x37bacb,_0x539de){const _0x24dc20=a43_0x4f8d,_0x4790c2=_0x37bacb[_0x24dc20(0x100)][0x0]?.['trim']();if(!_0x4790c2)throw CliErrors['validation'](_0x24dc20(0xde),_0x24dc20(0xf1)+CLI_BIN_NAME+'\x20'+_0x539de+'\x20<name>\x20[--global]');const _0x2fa295=_0x37bacb[_0x24dc20(0xe3)](_0x24dc20(0xe8)),{config:_0x567626,layers:_0x3ce8e2}=readRawConfigWithLayers(),_0x430dc6=_0x567626[_0x24dc20(0xfd)]??{};if(!_0x430dc6[_0x4790c2])throw CliErrors[_0x24dc20(0xf5)](_0x24dc20(0xee)+_0x4790c2+_0x24dc20(0xe2));const _0x54af80=_0x3ce8e2[_0x24dc20(0xdc)][_0x24dc20(0xfd)]&&typeof _0x3ce8e2[_0x24dc20(0xdc)]['apps']===_0x24dc20(0x101)?_0x3ce8e2[_0x24dc20(0xdc)][_0x24dc20(0xfd)]:{},_0x55d0de=_0x3ce8e2[_0x24dc20(0xff)]['apps']&&typeof _0x3ce8e2[_0x24dc20(0xff)]['apps']==='object'?_0x3ce8e2[_0x24dc20(0xff)]['apps']:{},_0x4f9168=appDefinedIn(_0x4790c2,_0x54af80,_0x55d0de,_0x3ce8e2[_0x24dc20(0xff)]['inherit']===![]),_0x532449=resolveAppScopeForWrite(_0x4790c2,_0x2fa295,_0x3ce8e2),_0x52fd42={'global':_0x532449===_0x24dc20(0xe8)},_0x616e7f=readConfig(_0x52fd42),_0x5881b4=_0x616e7f[_0x24dc20(0xfd)];if(!_0x5881b4||!_0x5881b4[_0x4790c2])throw CliErrors['validation'](_0x24dc20(0xee)+_0x4790c2+_0x24dc20(0xe2));delete _0x5881b4[_0x4790c2];let _0x57e2e2='';if(_0x616e7f[_0x24dc20(0xf2)]===_0x4790c2){const _0x6e2b18=Object['keys'](_0x5881b4);_0x616e7f[_0x24dc20(0xf2)]=_0x6e2b18[_0x24dc20(0xf8)]>0x0?_0x6e2b18[0x0]:undefined,_0x616e7f[_0x24dc20(0xf2)]?_0x57e2e2=_0x24dc20(0xf0)+_0x616e7f[_0x24dc20(0xf2)]+'\x22.':delete _0x616e7f[_0x24dc20(0xf2)];}Object[_0x24dc20(0xf6)](_0x5881b4)['length']===0x0&&(delete _0x616e7f[_0x24dc20(0xfd)],delete _0x616e7f['defaultApp']);writeConfig(_0x616e7f,_0x52fd42);const _0x17f798=_0x4f9168===_0x24dc20(0xe7)?_0x24dc20(0xe5)+_0x4790c2+_0x24dc20(0x106)+(_0x532449===_0x24dc20(0xfa)?_0x24dc20(0xe8):'project')+_0x24dc20(0xe9):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x4790c2+'\x22'+scopeLabel(_0x52fd42)+'.'+_0x57e2e2+_0x17f798};}
@@ -1 +1 @@
1
- (function(_0x1952af,_0x1a3321){const _0x5ed25c=a44_0x49d8,_0x567d10=_0x1952af();while(!![]){try{const _0x483503=-parseInt(_0x5ed25c(0x1dd))/0x1+parseInt(_0x5ed25c(0x1de))/0x2*(-parseInt(_0x5ed25c(0x1df))/0x3)+parseInt(_0x5ed25c(0x1da))/0x4*(parseInt(_0x5ed25c(0x1e1))/0x5)+-parseInt(_0x5ed25c(0x1d1))/0x6*(-parseInt(_0x5ed25c(0x1cf))/0x7)+-parseInt(_0x5ed25c(0x1eb))/0x8*(parseInt(_0x5ed25c(0x1d5))/0x9)+parseInt(_0x5ed25c(0x1c7))/0xa*(parseInt(_0x5ed25c(0x1cb))/0xb)+-parseInt(_0x5ed25c(0x1c8))/0xc*(-parseInt(_0x5ed25c(0x1e5))/0xd);if(_0x483503===_0x1a3321)break;else _0x567d10['push'](_0x567d10['shift']());}catch(_0xf7fac6){_0x567d10['push'](_0x567d10['shift']());}}}(a44_0x2e29,0xc21cc));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x275162 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x2e29(){const _0x1f355f=['15031354PxZjek','valid','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','\x20\x20(','yellow','includes','4384pNMXvz','appName','map','appCode','length','825830nEOcvl','12sFtkMp','manual','正在获取可用应用列表...','55oQQyxn','App\x20Code:','find','✎\x20手动输入','298914UOMUVe','\x0a无法获取远程应用列表,请手动输入。','210DWLPEo','未找到可用应用。','trim','✎\x20自定义输入\x20appcode','19575NEBAPj','Invalid\x20App\x20Code','(跳过,稍后配置)','无法获取远程应用列表,请手动输入。','cyan','27268oSkVon','获取到\x20','skip','1304588OpeOen','109790WBiGfh','33geXvgO','gray','610BAEEZq','message','请输入\x20App\x20Code:','custom'];a44_0x2e29=function(){return _0x1f355f;};return a44_0x2e29();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0xdff64=a44_0x49d8,_0x57bfc9=await input({'message':_0xdff64(0x1e3),'validate':_0x4e7666=>{const _0x2cfaf7=_0xdff64,_0x1c04a6=validateAppcode(_0x4e7666[_0x2cfaf7(0x1d3)]());return _0x1c04a6[_0x2cfaf7(0x1e6)]||_0x1c04a6['message']||_0x2cfaf7(0x1d6);}});return _0x57bfc9[_0xdff64(0x1d3)]();}export async function promptAppSelection(_0x531668){const _0x17fb0c=a44_0x49d8,_0x14a18f=[{'name':a44_0x275162[_0x17fb0c(0x1e9)](_0x17fb0c(0x1d4)),'value':-0x1},..._0x531668[_0x17fb0c(0x1c4)]((_0x2580da,_0x1c09ff)=>({'name':_0x2580da[_0x17fb0c(0x1c3)]+'\x20\x20'+a44_0x275162[_0x17fb0c(0x1e0)]('('+_0x2580da[_0x17fb0c(0x1c5)]+')'),'value':_0x1c09ff}))],_0x2d28a8=await checkbox({'message':_0x17fb0c(0x1db)+a44_0x275162[_0x17fb0c(0x1d9)](_0x531668[_0x17fb0c(0x1c6)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x14a18f,'loop':![]});if(_0x2d28a8[_0x17fb0c(0x1ea)](-0x1))return _0x17fb0c(0x1e4);if(_0x2d28a8[_0x17fb0c(0x1c6)]===0x0)return'custom';return _0x2d28a8[_0x17fb0c(0x1c4)](_0x9d706b=>_0x531668[_0x9d706b]);}export async function promptSingleAppSelection(_0x303fdf){const _0x3dd1bb=a44_0x49d8,_0x3416dc=[{'name':a44_0x275162[_0x3dd1bb(0x1e0)](_0x3dd1bb(0x1e7)),'value':_0x3dd1bb(0x1dc)},{'name':a44_0x275162['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x3dd1bb(0x1e4)},..._0x303fdf[_0x3dd1bb(0x1c4)](_0x1b16fd=>({'name':_0x1b16fd[_0x3dd1bb(0x1c3)]+'\x20\x20'+a44_0x275162['gray']('('+_0x1b16fd[_0x3dd1bb(0x1c5)]+')'),'value':_0x1b16fd[_0x3dd1bb(0x1c5)]}))],_0x461ac1=await select({'message':'请选择要绑定的应用:','choices':_0x3416dc});if(_0x461ac1==='skip')return'skip';if(_0x461ac1===_0x3dd1bb(0x1e4))return _0x3dd1bb(0x1e4);return _0x303fdf[_0x3dd1bb(0x1cd)](_0x1f6c52=>_0x1f6c52['appCode']===_0x461ac1);}export async function selectSingleAppcode(_0x4ada78){const _0x16440c=a44_0x49d8;if(!_0x4ada78)return writeCliSideChannelLine(a44_0x275162[_0x16440c(0x1e0)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x16440c(0x1ca));let _0xcf0550;try{_0xcf0550=await withActiveCookie(_0x4ada78,()=>listRemoteApps());}catch(_0x560b83){writeCliSideChannelLine(a44_0x275162[_0x16440c(0x1e9)](_0x16440c(0x1d8)));if(_0x560b83 instanceof Error)writeCliSideChannelLine(a44_0x275162[_0x16440c(0x1e0)](_0x16440c(0x1e8)+_0x560b83[_0x16440c(0x1e2)]+')'));return _fallbackOrSkip();}if(_0xcf0550[_0x16440c(0x1c6)]===0x0)return writeCliSideChannelLine(a44_0x275162[_0x16440c(0x1e9)](_0x16440c(0x1d2))),_fallbackOrSkip();const _0x46df3b=await promptSingleAppSelection(_0xcf0550);if(_0x46df3b===_0x16440c(0x1dc))return'';if(_0x46df3b===_0x16440c(0x1e4))return promptCustomAppcode();return _0x46df3b['appCode'];}export async function selectMultipleApps(_0x5d00e0){const _0x1b9cfa=a44_0x49d8;writeCliSideChannelLine(_0x1b9cfa(0x1ca));let _0x2f73fa;try{_0x2f73fa=await withActiveCookie(_0x5d00e0,()=>listRemoteApps());}catch(_0x5dd6e8){writeCliSideChannelLine(_0x1b9cfa(0x1d0));if(_0x5dd6e8 instanceof Error)writeCliSideChannelLine(_0x1b9cfa(0x1e8)+_0x5dd6e8[_0x1b9cfa(0x1e2)]+')');return _0x1b9cfa(0x1e4);}if(_0x2f73fa[_0x1b9cfa(0x1c6)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x1b9cfa(0x1e4);return promptAppSelection(_0x2f73fa);}function a44_0x49d8(_0x4f0a5a,_0x2bc7a5){_0x4f0a5a=_0x4f0a5a-0x1c3;const _0x2e2972=a44_0x2e29();let _0x49d807=_0x2e2972[_0x4f0a5a];return _0x49d807;}async function _fallbackOrSkip(){const _0x4c0eba=a44_0x49d8,_0x2bc19e=await select({'message':_0x4c0eba(0x1cc),'choices':[{'name':a44_0x275162[_0x4c0eba(0x1e0)](_0x4c0eba(0x1d7)),'value':'skip'},{'name':a44_0x275162[_0x4c0eba(0x1e9)](_0x4c0eba(0x1ce)),'value':_0x4c0eba(0x1c9)}]});if(_0x2bc19e==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x1c3871,_0x492593){const _0x5489fb=a44_0xaf7b,_0x17d99d=_0x1c3871();while(!![]){try{const _0x1fb6d6=parseInt(_0x5489fb(0x1e8))/0x1*(parseInt(_0x5489fb(0x1d3))/0x2)+-parseInt(_0x5489fb(0x1e0))/0x3+-parseInt(_0x5489fb(0x1e6))/0x4+-parseInt(_0x5489fb(0x1cd))/0x5+-parseInt(_0x5489fb(0x1e3))/0x6*(-parseInt(_0x5489fb(0x1d5))/0x7)+-parseInt(_0x5489fb(0x1db))/0x8*(-parseInt(_0x5489fb(0x1ed))/0x9)+-parseInt(_0x5489fb(0x1e2))/0xa*(-parseInt(_0x5489fb(0x1eb))/0xb);if(_0x1fb6d6===_0x492593)break;else _0x17d99d['push'](_0x17d99d['shift']());}catch(_0x2bdb4d){_0x17d99d['push'](_0x17d99d['shift']());}}}(a44_0x1156,0xf2843));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x295650 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x1156(){const _0x515e85=['find','7353112xnqwjP','gray','1fvnmXW','appCode','请输入\x20App\x20Code:','34337171XSXpMq','正在获取可用应用列表...','954675arQjUX','获取到\x20','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','trim','6618245AlfibV','message','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','✎\x20自定义输入\x20appcode','appName','217942MzRjzZ','custom','7OhJmsL','cyan','skip','\x20\x20(','length','yellow','88IxWcpx','\x0a未找到可用应用。','map','(跳过,稍后配置)','Invalid\x20App\x20Code','5317035SSnubO','includes','10LEVDDA','9181572uireVl','valid'];a44_0x1156=function(){return _0x515e85;};return a44_0x1156();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x1a240b=a44_0xaf7b,_0x113ece=await input({'message':_0x1a240b(0x1ea),'validate':_0x6a98b6=>{const _0x35ea61=_0x1a240b,_0x536770=validateAppcode(_0x6a98b6[_0x35ea61(0x1cc)]());return _0x536770[_0x35ea61(0x1e4)]||_0x536770[_0x35ea61(0x1ce)]||_0x35ea61(0x1df);}});return _0x113ece['trim']();}export async function promptAppSelection(_0xc8fe56){const _0xc17bb5=a44_0xaf7b,_0x2a3ae6=[{'name':a44_0x295650[_0xc17bb5(0x1da)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0xc8fe56[_0xc17bb5(0x1dd)]((_0x1ce38b,_0x116955)=>({'name':_0x1ce38b[_0xc17bb5(0x1d2)]+'\x20\x20'+a44_0x295650['gray']('('+_0x1ce38b[_0xc17bb5(0x1e9)]+')'),'value':_0x116955}))],_0x3adf0b=await checkbox({'message':_0xc17bb5(0x1ee)+a44_0x295650[_0xc17bb5(0x1d6)](_0xc8fe56[_0xc17bb5(0x1d9)])+_0xc17bb5(0x1ef),'choices':_0x2a3ae6,'loop':![]});if(_0x3adf0b[_0xc17bb5(0x1e1)](-0x1))return _0xc17bb5(0x1d4);if(_0x3adf0b[_0xc17bb5(0x1d9)]===0x0)return'custom';return _0x3adf0b['map'](_0x3d2ee5=>_0xc8fe56[_0x3d2ee5]);}export async function promptSingleAppSelection(_0x36c29f){const _0x18a071=a44_0xaf7b,_0x121489=[{'name':a44_0x295650[_0x18a071(0x1e7)](_0x18a071(0x1d0)),'value':'skip'},{'name':a44_0x295650[_0x18a071(0x1da)](_0x18a071(0x1d1)),'value':_0x18a071(0x1d4)},..._0x36c29f['map'](_0x3cbbb2=>({'name':_0x3cbbb2[_0x18a071(0x1d2)]+'\x20\x20'+a44_0x295650[_0x18a071(0x1e7)]('('+_0x3cbbb2[_0x18a071(0x1e9)]+')'),'value':_0x3cbbb2[_0x18a071(0x1e9)]}))],_0x2c24aa=await select({'message':'请选择要绑定的应用:','choices':_0x121489});if(_0x2c24aa===_0x18a071(0x1d7))return'skip';if(_0x2c24aa===_0x18a071(0x1d4))return _0x18a071(0x1d4);return _0x36c29f[_0x18a071(0x1e5)](_0x38f2f5=>_0x38f2f5[_0x18a071(0x1e9)]===_0x2c24aa);}export async function selectSingleAppcode(_0x35c1c2){const _0x327574=a44_0xaf7b;if(!_0x35c1c2)return writeCliSideChannelLine(a44_0x295650[_0x327574(0x1e7)](_0x327574(0x1cf))),_fallbackOrSkip();writeCliSideChannelLine(_0x327574(0x1ec));let _0x402f0d;try{_0x402f0d=await withActiveCookie(_0x35c1c2,()=>listRemoteApps());}catch(_0x294539){writeCliSideChannelLine(a44_0x295650[_0x327574(0x1da)]('无法获取远程应用列表,请手动输入。'));if(_0x294539 instanceof Error)writeCliSideChannelLine(a44_0x295650[_0x327574(0x1e7)](_0x327574(0x1d8)+_0x294539[_0x327574(0x1ce)]+')'));return _fallbackOrSkip();}if(_0x402f0d['length']===0x0)return writeCliSideChannelLine(a44_0x295650[_0x327574(0x1da)]('未找到可用应用。')),_fallbackOrSkip();const _0x22e9ba=await promptSingleAppSelection(_0x402f0d);if(_0x22e9ba===_0x327574(0x1d7))return'';if(_0x22e9ba===_0x327574(0x1d4))return promptCustomAppcode();return _0x22e9ba[_0x327574(0x1e9)];}export async function selectMultipleApps(_0xdd1fb7){const _0x425342=a44_0xaf7b;writeCliSideChannelLine(_0x425342(0x1ec));let _0x54d342;try{_0x54d342=await withActiveCookie(_0xdd1fb7,()=>listRemoteApps());}catch(_0x392307){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x392307 instanceof Error)writeCliSideChannelLine(_0x425342(0x1d8)+_0x392307['message']+')');return _0x425342(0x1d4);}if(_0x54d342[_0x425342(0x1d9)]===0x0)return writeCliSideChannelLine(_0x425342(0x1dc)),_0x425342(0x1d4);return promptAppSelection(_0x54d342);}function a44_0xaf7b(_0x2266c3,_0x3d8d01){_0x2266c3=_0x2266c3-0x1cc;const _0x1156e8=a44_0x1156();let _0xaf7b45=_0x1156e8[_0x2266c3];return _0xaf7b45;}async function _fallbackOrSkip(){const _0x41e3c9=a44_0xaf7b,_0xf59c27=await select({'message':'App\x20Code:','choices':[{'name':a44_0x295650[_0x41e3c9(0x1e7)](_0x41e3c9(0x1de)),'value':_0x41e3c9(0x1d7)},{'name':a44_0x295650[_0x41e3c9(0x1da)]('✎\x20手动输入'),'value':'manual'}]});if(_0xf59c27==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x2cd4db=a45_0x36da;(function(_0x2be307,_0x23d44c){const _0x8d3803=a45_0x36da,_0x49688e=_0x2be307();while(!![]){try{const _0x59ae28=-parseInt(_0x8d3803(0x205))/0x1+parseInt(_0x8d3803(0x202))/0x2+parseInt(_0x8d3803(0x1fa))/0x3+parseInt(_0x8d3803(0x203))/0x4*(-parseInt(_0x8d3803(0x1f6))/0x5)+parseInt(_0x8d3803(0x20c))/0x6*(parseInt(_0x8d3803(0x1fc))/0x7)+parseInt(_0x8d3803(0x200))/0x8*(parseInt(_0x8d3803(0x211))/0x9)+-parseInt(_0x8d3803(0x20e))/0xa;if(_0x59ae28===_0x23d44c)break;else _0x49688e['push'](_0x49688e['shift']());}catch(_0x3015f9){_0x49688e['push'](_0x49688e['shift']());}}}(a45_0xc3bc,0x7fffb));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x2cd4db(0x1fe)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a45_0x2cd4db(0x208)]);export function normalizeAsyncTask(_0x1b33cd){const _0x803f22=a45_0x2cd4db,_0xb1c8a4=typeof _0x1b33cd?.['taskId']===_0x803f22(0x204)?_0x1b33cd[_0x803f22(0x209)][_0x803f22(0x20d)]():'';if(!_0xb1c8a4)throw CliErrors[_0x803f22(0x20a)](_0x803f22(0x207));const _0x1e21e4=typeof _0x1b33cd[_0x803f22(0x201)]===_0x803f22(0x204)?_0x1b33cd[_0x803f22(0x201)][_0x803f22(0x20d)]()[_0x803f22(0x1f8)]():'';if(!_0x1e21e4)throw CliErrors['apiError'](_0x803f22(0x20b)+_0xb1c8a4+_0x803f22(0x210));return{'taskId':_0xb1c8a4,'status':_0x1e21e4,'errorMessage':typeof _0x1b33cd[_0x803f22(0x1f7)]===_0x803f22(0x204)&&_0x1b33cd[_0x803f22(0x1f7)][_0x803f22(0x20d)]()?_0x1b33cd[_0x803f22(0x1f7)][_0x803f22(0x20d)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x1e21e4),'knownStatus':TERMINAL_STATUSES[_0x803f22(0x206)](_0x1e21e4)||NON_TERMINAL_STATUSES[_0x803f22(0x206)](_0x1e21e4)};}export function buildAsyncTaskStatusCommand(_0x2c1d44,_0x3bd74b){const _0x480c2b=a45_0x2cd4db;return CLI_BIN_NAME+_0x480c2b(0x1f9)+quoteShellArg(_0x2c1d44)+'\x20--appcode\x20'+quoteShellArg(_0x3bd74b)+'\x20--format\x20compress';}function a45_0x36da(_0x4e8895,_0x5da3a9){_0x4e8895=_0x4e8895-0x1f3;const _0xc3bcec=a45_0xc3bc();let _0x36dae0=_0xc3bcec[_0x4e8895];return _0x36dae0;}export function asyncTaskMessage(_0x280b5a){const _0x346f4c=a45_0x2cd4db;switch(_0x280b5a[_0x346f4c(0x201)]){case _0x346f4c(0x1ff):return _0x346f4c(0x1f3)+_0x280b5a[_0x346f4c(0x209)]+_0x346f4c(0x1f5);case _0x346f4c(0x208):return _0x346f4c(0x1f3)+_0x280b5a[_0x346f4c(0x209)]+'\x20is\x20processing.';case _0x346f4c(0x1fd):return _0x346f4c(0x1f3)+_0x280b5a[_0x346f4c(0x209)]+'\x20completed\x20successfully.';case'FAILED':return _0x280b5a[_0x346f4c(0x1f7)]?'Task\x20'+_0x280b5a[_0x346f4c(0x209)]+_0x346f4c(0x1f4)+_0x280b5a['errorMessage']:_0x346f4c(0x1f3)+_0x280b5a['taskId']+'\x20failed.';default:return _0x346f4c(0x1f3)+_0x280b5a[_0x346f4c(0x209)]+'\x20returned\x20unknown\x20status\x20'+_0x280b5a[_0x346f4c(0x201)]+'.';}}function quoteShellArg(_0x3023e4){const _0x564ca4=a45_0x2cd4db;return'\x27'+_0x3023e4[_0x564ca4(0x20f)](/'/g,_0x564ca4(0x1fb))+'\x27';}function a45_0xc3bc(){const _0x2731c2=['8tHknyf','status','1533214bBOIQr','2076OuOWYe','string','837206gggaSm','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','PROCESSING','taskId','apiError','Async\x20task\x20','6FrIELT','trim','356620MejCgo','replace','\x20response\x20did\x20not\x20contain\x20a\x20status.','5218317nngeJo','Task\x20','\x20failed:\x20','\x20is\x20pending.','9110utDFiz','errorMessage','toUpperCase','\x20task\x20status\x20--task-id\x20','1980960JsatzQ','\x27\x5c\x27\x27','2352203SAmnAQ','SUCCESS','FAILED','PENDING'];a45_0xc3bc=function(){return _0x2731c2;};return a45_0xc3bc();}
1
+ const a45_0x2d6a27=a45_0x1e52;(function(_0x3b5ab1,_0x52c000){const _0x5f220d=a45_0x1e52,_0x31ddce=_0x3b5ab1();while(!![]){try{const _0x243084=parseInt(_0x5f220d(0xa8))/0x1*(-parseInt(_0x5f220d(0x9f))/0x2)+parseInt(_0x5f220d(0x95))/0x3+parseInt(_0x5f220d(0xab))/0x4+parseInt(_0x5f220d(0x9e))/0x5*(parseInt(_0x5f220d(0xa1))/0x6)+parseInt(_0x5f220d(0x97))/0x7*(parseInt(_0x5f220d(0x96))/0x8)+parseInt(_0x5f220d(0xb1))/0x9+-parseInt(_0x5f220d(0x9d))/0xa;if(_0x243084===_0x52c000)break;else _0x31ddce['push'](_0x31ddce['shift']());}catch(_0x5811db){_0x31ddce['push'](_0x31ddce['shift']());}}}(a45_0x2614,0x24e2a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x2d6a27(0x99)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a45_0x2d6a27(0xa2)]);function a45_0x1e52(_0x5b623c,_0x58eac4){_0x5b623c=_0x5b623c-0x95;const _0x26147b=a45_0x2614();let _0x1e52e7=_0x26147b[_0x5b623c];return _0x1e52e7;}function a45_0x2614(){const _0x6ca24a=['string','replace','SUCCESS','13932gKGGko','40384vqGBBv','322nUFGuo','has','FAILED','toUpperCase','\x20failed.','PENDING','6154820irswlg','435jfZGUX','8AEAHMp','status','19506xXIDBv','PROCESSING','taskId','Task\x20','Async\x20task\x20','\x20failed:\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','22051SBpLIg','trim','apiError','602596KuZKQV','\x27\x5c\x27\x27','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','\x20completed\x20successfully.','\x20is\x20pending.','1659870PLkdmE','errorMessage'];a45_0x2614=function(){return _0x6ca24a;};return a45_0x2614();}export function normalizeAsyncTask(_0x1ebc51){const _0x3502eb=a45_0x2d6a27,_0x6de70b=typeof _0x1ebc51?.[_0x3502eb(0xa3)]===_0x3502eb(0xb3)?_0x1ebc51['taskId']['trim']():'';if(!_0x6de70b)throw CliErrors[_0x3502eb(0xaa)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x5b19ad=typeof _0x1ebc51['status']==='string'?_0x1ebc51[_0x3502eb(0xa0)][_0x3502eb(0xa9)]()[_0x3502eb(0x9a)]():'';if(!_0x5b19ad)throw CliErrors[_0x3502eb(0xaa)](_0x3502eb(0xa5)+_0x6de70b+_0x3502eb(0xa7));return{'taskId':_0x6de70b,'status':_0x5b19ad,'errorMessage':typeof _0x1ebc51[_0x3502eb(0xb2)]===_0x3502eb(0xb3)&&_0x1ebc51[_0x3502eb(0xb2)][_0x3502eb(0xa9)]()?_0x1ebc51[_0x3502eb(0xb2)][_0x3502eb(0xa9)]():null,'isTerminal':TERMINAL_STATUSES[_0x3502eb(0x98)](_0x5b19ad),'knownStatus':TERMINAL_STATUSES[_0x3502eb(0x98)](_0x5b19ad)||NON_TERMINAL_STATUSES['has'](_0x5b19ad)};}export function buildAsyncTaskStatusCommand(_0x5588d1,_0xbff78f){return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x5588d1)+'\x20--appcode\x20'+quoteShellArg(_0xbff78f)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x923ce4){const _0x3ac964=a45_0x2d6a27;switch(_0x923ce4['status']){case _0x3ac964(0x9c):return'Task\x20'+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xb0);case _0x3ac964(0xa2):return _0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xad);case _0x3ac964(0xb5):return'Task\x20'+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xaf);case _0x3ac964(0x99):return _0x923ce4[_0x3ac964(0xb2)]?_0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0xa6)+_0x923ce4['errorMessage']:_0x3ac964(0xa4)+_0x923ce4[_0x3ac964(0xa3)]+_0x3ac964(0x9b);default:return _0x3ac964(0xa4)+_0x923ce4['taskId']+_0x3ac964(0xae)+_0x923ce4[_0x3ac964(0xa0)]+'.';}}function quoteShellArg(_0x271eb0){const _0x4d37bc=a45_0x2d6a27;return'\x27'+_0x271eb0[_0x4d37bc(0xb4)](/'/g,_0x4d37bc(0xac))+'\x27';}
@@ -1 +1 @@
1
- function a46_0x4a8c(){var _0x2c7fdc=['4RwUyqH','10VNzyNI','10428888PJFPjo','11366404VZdKAf','48WNFbXX','19026029KBfYIY','defineProperties','description','10mgeQjf','3602442WahTmR','31184fqFXJP','1923399Avdmdb','url','67zWTIwl','method','1783653XsiWsm'];a46_0x4a8c=function(){return _0x2c7fdc;};return a46_0x4a8c();}function a46_0x349c(_0x321ac5,_0xa3e84f){_0x321ac5=_0x321ac5-0x143;var _0x4a8cc1=a46_0x4a8c();var _0x349c85=_0x4a8cc1[_0x321ac5];return _0x349c85;}(function(_0x30bdad,_0x33f27c){var _0x4f5409=a46_0x349c,_0x52a7b8=_0x30bdad();while(!![]){try{var _0x5d2aa2=parseInt(_0x4f5409(0x148))/0x1*(parseInt(_0x4f5409(0x145))/0x2)+-parseInt(_0x4f5409(0x14a))/0x3*(-parseInt(_0x4f5409(0x14b))/0x4)+-parseInt(_0x4f5409(0x14c))/0x5*(parseInt(_0x4f5409(0x144))/0x6)+-parseInt(_0x4f5409(0x14e))/0x7+parseInt(_0x4f5409(0x14f))/0x8*(parseInt(_0x4f5409(0x146))/0x9)+-parseInt(_0x4f5409(0x143))/0xa*(-parseInt(_0x4f5409(0x150))/0xb)+-parseInt(_0x4f5409(0x14d))/0xc;if(_0x5d2aa2===_0x33f27c)break;else _0x52a7b8['push'](_0x52a7b8['shift']());}catch(_0x3dbcac){_0x52a7b8['push'](_0x52a7b8['shift']());}}}(a46_0x4a8c,0xe9c14));export function asDryRunResult(_0x1e70fd,_0x459772){var _0x7b93fb=a46_0x349c;return Object[_0x7b93fb(0x151)](_0x1e70fd,{'method':{'value':_0x459772[_0x7b93fb(0x149)],'enumerable':![]},'url':{'value':_0x459772[_0x7b93fb(0x147)],'enumerable':![]},..._0x459772[_0x7b93fb(0x152)]?{'description':{'value':_0x459772[_0x7b93fb(0x152)],'enumerable':![]}}:{}});}
1
+ function a46_0x18a8(_0x5a7bba,_0x86821b){_0x5a7bba=_0x5a7bba-0x1f0;var _0x19df6b=a46_0x19df();var _0x18a847=_0x19df6b[_0x5a7bba];return _0x18a847;}(function(_0x1034c9,_0x4bb915){var _0x11ca81=a46_0x18a8,_0x49b6e2=_0x1034c9();while(!![]){try{var _0x3e58d1=parseInt(_0x11ca81(0x1fd))/0x1*(parseInt(_0x11ca81(0x1fe))/0x2)+parseInt(_0x11ca81(0x1fc))/0x3+-parseInt(_0x11ca81(0x1f7))/0x4*(-parseInt(_0x11ca81(0x1fa))/0x5)+parseInt(_0x11ca81(0x1f8))/0x6*(-parseInt(_0x11ca81(0x1fb))/0x7)+parseInt(_0x11ca81(0x1f5))/0x8*(parseInt(_0x11ca81(0x1f3))/0x9)+-parseInt(_0x11ca81(0x1f9))/0xa+-parseInt(_0x11ca81(0x1f0))/0xb*(parseInt(_0x11ca81(0x1f4))/0xc);if(_0x3e58d1===_0x4bb915)break;else _0x49b6e2['push'](_0x49b6e2['shift']());}catch(_0x12bbc1){_0x49b6e2['push'](_0x49b6e2['shift']());}}}(a46_0x19df,0x251a8));export function asDryRunResult(_0x55da60,_0x582133){var _0x378786=a46_0x18a8;return Object[_0x378786(0x1f2)](_0x55da60,{'method':{'value':_0x582133['method'],'enumerable':![]},'url':{'value':_0x582133[_0x378786(0x1f1)],'enumerable':![]},..._0x582133[_0x378786(0x1f6)]?{'description':{'value':_0x582133[_0x378786(0x1f6)],'enumerable':![]}}:{}});}function a46_0x19df(){var _0x24660e=['211977KTrLYS','1968108SDEFMI','48DUTmuz','description','196812xEsuuS','300zkenGO','625680OHiIAz','15diaIOp','18781nNIczW','642129EnlNPE','1ggguRS','347484RdXgWa','22mAJhxA','url','defineProperties'];a46_0x19df=function(){return _0x24660e;};return a46_0x19df();}
@@ -1 +1 @@
1
- const a47_0x35eec4=a47_0x4b06;(function(_0x167798,_0x12b8ce){const _0x417fd4=a47_0x4b06,_0x31461c=_0x167798();while(!![]){try{const _0xe906e8=-parseInt(_0x417fd4(0x117))/0x1*(-parseInt(_0x417fd4(0x11f))/0x2)+-parseInt(_0x417fd4(0x11b))/0x3+-parseInt(_0x417fd4(0x11a))/0x4*(parseInt(_0x417fd4(0x11d))/0x5)+parseInt(_0x417fd4(0x119))/0x6+-parseInt(_0x417fd4(0x112))/0x7*(parseInt(_0x417fd4(0x121))/0x8)+-parseInt(_0x417fd4(0x110))/0x9+parseInt(_0x417fd4(0x115))/0xa*(parseInt(_0x417fd4(0x10b))/0xb);if(_0xe906e8===_0x12b8ce)break;else _0x31461c['push'](_0x31461c['shift']());}catch(_0x28afaf){_0x31461c['push'](_0x31461c['shift']());}}}(a47_0x5788,0xbba76));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x35eec4(0x107)};export const CODE_FLAG={'name':a47_0x35eec4(0x10a),'type':a47_0x35eec4(0x114),'required':!![],'description':a47_0x35eec4(0x10f),'pattern':DATASET_CODE_PATTERN};function a47_0x5788(){const _0x457ca9=['Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','code','11AsHpMy','appcode','MYSQL','datasetcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8452629kpLuha','Database\x20product\x20type','294DkKAlc','number','string','33121870wYFHOE','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','1250hQIXls','App\x20code\x20(e.g.\x20app-xxxxx)','5222142DirWpV','5288AEacih','3305529ztzOSA','sqlcode','4585EiYUJn','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1060HJDwSa','dbtype','156784dUzMpc','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'];a47_0x5788=function(){return _0x457ca9;};return a47_0x5788();}function a47_0x4b06(_0x520375,_0x5b5f04){_0x520375=_0x520375-0x107;const _0x57885a=a47_0x5788();let _0x4b0688=_0x57885a[_0x520375];return _0x4b0688;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x35eec4(0x10e),'description':a47_0x35eec4(0x10f)};export const SQLCODE_FLAG={'name':a47_0x35eec4(0x11c),'type':a47_0x35eec4(0x114),'required':!![],'description':a47_0x35eec4(0x11e),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x35eec4(0x116)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x35eec4(0x10c),'type':a47_0x35eec4(0x114),'required':![],'description':a47_0x35eec4(0x108)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x35eec4(0x118)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x35eec4(0x113),'required':!![],'description':a47_0x35eec4(0x109)};export const DB_TYPE_FLAG={'name':a47_0x35eec4(0x120),'type':'string','required':!![],'description':a47_0x35eec4(0x111),'enum':[a47_0x35eec4(0x10d),'POSTGRESQL']};
1
+ const a47_0x498053=a47_0x181b;(function(_0x759dc8,_0xc15763){const _0x2131ea=a47_0x181b,_0x30baee=_0x759dc8();while(!![]){try{const _0x3e880b=-parseInt(_0x2131ea(0x1af))/0x1+parseInt(_0x2131ea(0x1ae))/0x2*(-parseInt(_0x2131ea(0x1a2))/0x3)+parseInt(_0x2131ea(0x1a1))/0x4*(-parseInt(_0x2131ea(0x1a7))/0x5)+-parseInt(_0x2131ea(0x1b2))/0x6*(-parseInt(_0x2131ea(0x1b1))/0x7)+parseInt(_0x2131ea(0x1ad))/0x8+parseInt(_0x2131ea(0x1b3))/0x9+parseInt(_0x2131ea(0x1a5))/0xa;if(_0x3e880b===_0xc15763)break;else _0x30baee['push'](_0x30baee['shift']());}catch(_0x29bb84){_0x30baee['push'](_0x30baee['shift']());}}}(a47_0x1f62,0x48132));function a47_0x1f62(){const _0x4f6fc2=['Database\x20product\x20type','1000690isBmUv','Dataset\x20code\x20(32-char\x20hex\x20UUID)','5BRxLrc','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','code','3241472hAByYk','2aOCjmC','73217bcIsaB','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','21476OcRpSl','102pSFRkn','3838050cLvvVJ','number','sqlcode','dbtype','370668QcVSlt','1568271unbBed','POSTGRESQL'];a47_0x1f62=function(){return _0x4f6fc2;};return a47_0x1f62();}function a47_0x181b(_0x4e48b7,_0x21d06c){_0x4e48b7=_0x4e48b7-0x1a1;const _0x1f621c=a47_0x1f62();let _0x181b94=_0x1f621c[_0x4e48b7];return _0x181b94;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a47_0x498053(0x1ac),'type':'string','required':!![],'description':a47_0x498053(0x1a6),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a47_0x498053(0x1b5),'type':a47_0x498053(0x1aa),'required':!![],'description':a47_0x498053(0x1a9),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x498053(0x1a8),'type':'string','required':![],'description':a47_0x498053(0x1b0)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x498053(0x1b4),'required':!![],'description':a47_0x498053(0x1ab)};export const DB_TYPE_FLAG={'name':a47_0x498053(0x1b6),'type':'string','required':!![],'description':a47_0x498053(0x1a4),'enum':['MYSQL',a47_0x498053(0x1a3)]};
@@ -1 +1 @@
1
- (function(_0x19906a,_0x5380ab){const _0x493b56=a48_0x5ddb,_0x3b8487=_0x19906a();while(!![]){try{const _0xfaeefc=parseInt(_0x493b56(0x151))/0x1*(parseInt(_0x493b56(0x14e))/0x2)+parseInt(_0x493b56(0x14b))/0x3+-parseInt(_0x493b56(0x150))/0x4+-parseInt(_0x493b56(0x14a))/0x5+-parseInt(_0x493b56(0x158))/0x6+parseInt(_0x493b56(0x146))/0x7*(-parseInt(_0x493b56(0x14c))/0x8)+-parseInt(_0x493b56(0x147))/0x9*(-parseInt(_0x493b56(0x14d))/0xa);if(_0xfaeefc===_0x5380ab)break;else _0x3b8487['push'](_0x3b8487['shift']());}catch(_0x39c4d3){_0x3b8487['push'](_0x3b8487['shift']());}}}(a48_0x5d75,0x8ea09));function a48_0x5ddb(_0x131774,_0x57f1e4){_0x131774=_0x131774-0x146;const _0x5d75d8=a48_0x5d75();let _0x5ddb33=_0x5d75d8[_0x131774];return _0x5ddb33;}import{existsSync,statSync}from'node:fs';function a48_0x5d75(){const _0x37a6cf=['\x20MB','File\x20not\x20found:\x20','ceil','4363404OcsHdF','size','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','119SDXada','99549XMheop','trim','validation','5593240mormUS','1483647bgUJFb','59224rGZivg','1110kKhiuc','2LoORBN','toFixed','622560TnkVtb','989254llhbme','\x20path\x20is\x20required.','isFile','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a48_0x5d75=function(){return _0x37a6cf;};return a48_0x5d75();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2da2ef){const _0x5ad6be=a48_0x5ddb;if(_0x2da2ef>=BYTES_PER_MB){const _0x326554=Math[_0x5ad6be(0x157)](_0x2da2ef/BYTES_PER_MB*0x64)/0x64;return _0x326554[_0x5ad6be(0x14f)](0x2)+_0x5ad6be(0x155);}return _0x2da2ef+'\x20B';}export function requireDevelopmentUploadFile(_0x55e877,_0x41d0b6){const _0x4dfba3=a48_0x5ddb,_0x18a52d=_0x55e877[_0x4dfba3(0x148)]();if(!_0x18a52d)throw CliErrors[_0x4dfba3(0x149)](_0x41d0b6+_0x4dfba3(0x152));if(!existsSync(_0x18a52d))throw CliErrors[_0x4dfba3(0x149)](_0x4dfba3(0x156)+_0x18a52d);const _0x559658=statSync(_0x18a52d);if(!_0x559658[_0x4dfba3(0x153)]())throw CliErrors[_0x4dfba3(0x149)](_0x4dfba3(0x154)+_0x18a52d);if(_0x559658['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4dfba3(0x149)](_0x4dfba3(0x15a)+_0x18a52d+'\x20('+formatBytes(_0x559658[_0x4dfba3(0x159)])+')');return{'path':_0x18a52d,'size':_0x559658['size']};}
1
+ (function(_0x5cca76,_0x357bfe){const _0x5dee83=a48_0x1d8c,_0x2284df=_0x5cca76();while(!![]){try{const _0xed1313=-parseInt(_0x5dee83(0x126))/0x1*(-parseInt(_0x5dee83(0x116))/0x2)+parseInt(_0x5dee83(0x11a))/0x3+-parseInt(_0x5dee83(0x124))/0x4+parseInt(_0x5dee83(0x11e))/0x5*(-parseInt(_0x5dee83(0x11c))/0x6)+-parseInt(_0x5dee83(0x129))/0x7+parseInt(_0x5dee83(0x11d))/0x8+-parseInt(_0x5dee83(0x117))/0x9*(-parseInt(_0x5dee83(0x119))/0xa);if(_0xed1313===_0x357bfe)break;else _0x2284df['push'](_0x2284df['shift']());}catch(_0x524709){_0x2284df['push'](_0x2284df['shift']());}}}(a48_0x2447,0x931b3));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x1d8c(_0x2e03ce,_0x4b4d7f){_0x2e03ce=_0x2e03ce-0x116;const _0x244769=a48_0x2447();let _0x1d8cb8=_0x244769[_0x2e03ce];return _0x1d8cb8;}function a48_0x2447(){const _0x53b87a=['36745ODAphq','File\x20is\x20not\x20a\x20regular\x20file:\x20','ceil','3594941MoMhJd','6OBCyaF','207TUVLZe','toFixed','233600pPHGqT','1964841VlSXDc','validation','6EOSPDN','6575928WVUbih','2264235MJMWks','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20MB','\x20path\x20is\x20required.','size','File\x20not\x20found:\x20','2221984YysjTm','trim'];a48_0x2447=function(){return _0x53b87a;};return a48_0x2447();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x16648f){const _0x1eac6a=a48_0x1d8c;if(_0x16648f>=BYTES_PER_MB){const _0xfea9a6=Math[_0x1eac6a(0x128)](_0x16648f/BYTES_PER_MB*0x64)/0x64;return _0xfea9a6[_0x1eac6a(0x118)](0x2)+_0x1eac6a(0x120);}return _0x16648f+'\x20B';}export function requireDevelopmentUploadFile(_0x55c699,_0x4618e0){const _0x4f7988=a48_0x1d8c,_0x17f1a9=_0x55c699[_0x4f7988(0x125)]();if(!_0x17f1a9)throw CliErrors['validation'](_0x4618e0+_0x4f7988(0x121));if(!existsSync(_0x17f1a9))throw CliErrors[_0x4f7988(0x11b)](_0x4f7988(0x123)+_0x17f1a9);const _0x30b1ad=statSync(_0x17f1a9);if(!_0x30b1ad['isFile']())throw CliErrors[_0x4f7988(0x11b)](_0x4f7988(0x127)+_0x17f1a9);if(_0x30b1ad['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x4f7988(0x11f)+_0x17f1a9+'\x20('+formatBytes(_0x30b1ad['size'])+')');return{'path':_0x17f1a9,'size':_0x30b1ad[_0x4f7988(0x122)]};}
@@ -1 +1 @@
1
- (function(_0x523a6b,_0x32c2fe){const _0x577dc9=a49_0x5206,_0x3246b1=_0x523a6b();while(!![]){try{const _0x474938=parseInt(_0x577dc9(0x1c4))/0x1+parseInt(_0x577dc9(0x1b7))/0x2+parseInt(_0x577dc9(0x1ba))/0x3+-parseInt(_0x577dc9(0x1b8))/0x4+parseInt(_0x577dc9(0x1c1))/0x5*(-parseInt(_0x577dc9(0x1bc))/0x6)+-parseInt(_0x577dc9(0x1c0))/0x7*(-parseInt(_0x577dc9(0x1b9))/0x8)+parseInt(_0x577dc9(0x1be))/0x9;if(_0x474938===_0x32c2fe)break;else _0x3246b1['push'](_0x3246b1['shift']());}catch(_0x3b384f){_0x3246b1['push'](_0x3246b1['shift']());}}}(a49_0x1b59,0xcb904));function a49_0x5206(_0x19afeb,_0x54a56d){_0x19afeb=_0x19afeb-0x1b7;const _0x1b591e=a49_0x1b59();let _0x520684=_0x1b591e[_0x19afeb];return _0x520684;}export function validateAppcode(_0xa01c03){const _0x1ad243=a49_0x5206,_0x4e90a6=_0xa01c03[_0x1ad243(0x1c3)]();if(!_0x4e90a6)return{'valid':![],'message':_0x1ad243(0x1bf)};if(_0x4e90a6[_0x1ad243(0x1c2)]>0x64)return{'valid':![],'message':_0x1ad243(0x1bd)};if(!/^[A-Za-z0-9_-]+$/[_0x1ad243(0x1c5)](_0x4e90a6))return{'valid':![],'message':_0x1ad243(0x1bb)};return{'valid':!![]};}function a49_0x1b59(){const _0x1b6a24=['4138512ewgfqg','6840840sDybiD','4324545NoDtse','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','12GFMqdf','App\x20Code\x20cannot\x20exceed\x20100\x20characters','2059938YQltnB','App\x20Code\x20cannot\x20be\x20empty','7LHrdrq','3116980hfIUFl','length','trim','222668xmczVU','test','734092QpKzUh'];a49_0x1b59=function(){return _0x1b6a24;};return a49_0x1b59();}
1
+ function a49_0x2c15(_0x2bea72,_0x1a4a48){_0x2bea72=_0x2bea72-0x9a;const _0x29392b=a49_0x2939();let _0x2c152a=_0x29392b[_0x2bea72];return _0x2c152a;}(function(_0x1f622d,_0x462bc2){const _0x4c7278=a49_0x2c15,_0xaba1b4=_0x1f622d();while(!![]){try{const _0x5b5f22=parseInt(_0x4c7278(0x9b))/0x1*(parseInt(_0x4c7278(0xa8))/0x2)+-parseInt(_0x4c7278(0x9e))/0x3+-parseInt(_0x4c7278(0xa3))/0x4*(-parseInt(_0x4c7278(0xa4))/0x5)+parseInt(_0x4c7278(0x9d))/0x6+-parseInt(_0x4c7278(0xa1))/0x7*(parseInt(_0x4c7278(0x9a))/0x8)+-parseInt(_0x4c7278(0xa0))/0x9+parseInt(_0x4c7278(0xa9))/0xa;if(_0x5b5f22===_0x462bc2)break;else _0xaba1b4['push'](_0xaba1b4['shift']());}catch(_0x467a59){_0xaba1b4['push'](_0xaba1b4['shift']());}}}(a49_0x2939,0x865b1));function a49_0x2939(){const _0x1d5521=['63BtjogX','App\x20Code\x20cannot\x20exceed\x20100\x20characters','28MLMOLg','474795BQtESJ','length','trim','App\x20Code\x20cannot\x20be\x20empty','26yttVvE','1950070EhKDkB','840816ZBPsyV','25457GNBgzI','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','3616368CYBTvB','785979OapOkW','test','316413XqnqiF'];a49_0x2939=function(){return _0x1d5521;};return a49_0x2939();}export function validateAppcode(_0x4bec88){const _0x10d03c=a49_0x2c15,_0x36a019=_0x4bec88[_0x10d03c(0xa6)]();if(!_0x36a019)return{'valid':![],'message':_0x10d03c(0xa7)};if(_0x36a019[_0x10d03c(0xa5)]>0x64)return{'valid':![],'message':_0x10d03c(0xa2)};if(!/^[A-Za-z0-9_-]+$/[_0x10d03c(0x9f)](_0x36a019))return{'valid':![],'message':_0x10d03c(0x9c)};return{'valid':!![]};}