@lovrabet/rabetbase-cli 2.4.3-beta.1 → 2.4.3

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 (294) 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/react/create.js +1 -1
  141. package/lib/commands/page/react/detail.js +1 -1
  142. package/lib/commands/page/react/list.js +1 -1
  143. package/lib/commands/page/react/publish.js +1 -1
  144. package/lib/commands/page/react/shared.js +1 -1
  145. package/lib/commands/page/react/syntax.js +1 -1
  146. package/lib/commands/page/react/template.js +1 -1
  147. package/lib/commands/page/react/update.js +1 -1
  148. package/lib/commands/page/relation-audit.js +1 -1
  149. package/lib/commands/page/restore.js +1 -1
  150. package/lib/commands/page/shared.js +1 -1
  151. package/lib/commands/page/standard-page-status.js +1 -1
  152. package/lib/commands/page/sync.js +1 -1
  153. package/lib/commands/permit/index.js +1 -1
  154. package/lib/commands/permit/page-get.js +1 -1
  155. package/lib/commands/permit/page-set.js +1 -1
  156. package/lib/commands/permit/role-apis-set.js +1 -1
  157. package/lib/commands/permit/role-menus-set.js +1 -1
  158. package/lib/commands/permit/role-menus.js +1 -1
  159. package/lib/commands/permit/shared.js +1 -1
  160. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  161. package/lib/commands/project/create/format-elapsed.js +1 -1
  162. package/lib/commands/project/create/main.js +1 -1
  163. package/lib/commands/project/create/non-interactive.js +1 -1
  164. package/lib/commands/project/create/project-template-path.js +1 -1
  165. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  166. package/lib/commands/project/create/use-format-code.js +1 -1
  167. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  168. package/lib/commands/project/index.js +1 -1
  169. package/lib/commands/project/upgrade.js +1 -1
  170. package/lib/commands/registry.js +1 -1
  171. package/lib/commands/role/create.js +1 -1
  172. package/lib/commands/role/delete.js +1 -1
  173. package/lib/commands/role/detail.js +1 -1
  174. package/lib/commands/role/index.js +1 -1
  175. package/lib/commands/role/list.js +1 -1
  176. package/lib/commands/role/shared.js +1 -1
  177. package/lib/commands/role/update.js +1 -1
  178. package/lib/commands/role/user-add.js +1 -1
  179. package/lib/commands/role/user-remove.js +1 -1
  180. package/lib/commands/role/user-resolve.js +1 -1
  181. package/lib/commands/run/index.js +1 -1
  182. package/lib/commands/schema.js +1 -1
  183. package/lib/commands/sql/create.js +1 -1
  184. package/lib/commands/sql/delete.js +1 -1
  185. package/lib/commands/sql/detail.js +1 -1
  186. package/lib/commands/sql/exec.js +1 -1
  187. package/lib/commands/sql/index.js +1 -1
  188. package/lib/commands/sql/list.js +1 -1
  189. package/lib/commands/sql/pull.js +1 -1
  190. package/lib/commands/sql/push.js +1 -1
  191. package/lib/commands/sql/shared.js +1 -1
  192. package/lib/commands/sql/status.js +1 -1
  193. package/lib/commands/sql/validate.js +1 -1
  194. package/lib/commands/task/index.js +1 -1
  195. package/lib/commands/task/status.js +1 -1
  196. package/lib/commands/tenant/index.js +1 -1
  197. package/lib/commands/tenant/members-list.js +1 -1
  198. package/lib/commands/tenant/shared.js +1 -1
  199. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  200. package/lib/commands/user-account/index.js +1 -1
  201. package/lib/commands/workspace/add.js +1 -1
  202. package/lib/commands/workspace/index.js +1 -1
  203. package/lib/commands/workspace/remove.js +1 -1
  204. package/lib/config/schema.js +1 -1
  205. package/lib/constant/cdn.js +1 -1
  206. package/lib/constant/cli.js +1 -1
  207. package/lib/constant/defaults.js +1 -1
  208. package/lib/constant/domain.js +1 -1
  209. package/lib/constant/env.js +1 -1
  210. package/lib/constant/output.js +1 -1
  211. package/lib/constant/paths.js +1 -1
  212. package/lib/constant/risk.js +1 -1
  213. package/lib/context/app-resolver.js +1 -1
  214. package/lib/context/auth-resolver.js +1 -1
  215. package/lib/context/config-loader.js +1 -1
  216. package/lib/context.js +1 -1
  217. package/lib/core/alias-resolver.js +1 -1
  218. package/lib/core/api-client.js +1 -1
  219. package/lib/core/bff/config.js +1 -1
  220. package/lib/core/bff/file-system.js +1 -1
  221. package/lib/core/bff/hash.js +1 -1
  222. package/lib/core/bff/lock.js +1 -1
  223. package/lib/core/bff/utils.js +1 -1
  224. package/lib/core/db-resolver.js +1 -1
  225. package/lib/core/page/file-system.js +1 -1
  226. package/lib/core/page/hash.js +1 -1
  227. package/lib/core/page/lock.js +1 -1
  228. package/lib/core/sql-index-auditor.js +1 -1
  229. package/lib/core/sql-sync/config.js +1 -1
  230. package/lib/core/sql-sync/file-system.js +1 -1
  231. package/lib/core/sql-sync/hash.js +1 -1
  232. package/lib/core/sql-sync/lock.js +1 -1
  233. package/lib/core/sql-sync/utils.js +1 -1
  234. package/lib/core/sql-validator.js +1 -1
  235. package/lib/errors.js +1 -1
  236. package/lib/framework/build-all-flags.js +1 -1
  237. package/lib/framework/error-output.js +1 -1
  238. package/lib/framework/explicit-yes.js +1 -1
  239. package/lib/framework/flags.js +1 -1
  240. package/lib/framework/help.js +1 -1
  241. package/lib/framework/index.js +1 -1
  242. package/lib/framework/output.js +1 -1
  243. package/lib/framework/response.js +1 -1
  244. package/lib/framework/runner-alias.js +1 -1
  245. package/lib/framework/runner.js +1 -1
  246. package/lib/framework/schema-export.js +1 -1
  247. package/lib/framework/types.js +1 -1
  248. package/lib/generated/build-info.d.ts +4 -4
  249. package/lib/generated/build-info.js +1 -1
  250. package/lib/help.js +1 -1
  251. package/lib/postinstall.js +1 -1
  252. package/lib/runtime/confirmation.js +1 -1
  253. package/lib/runtime/event.js +1 -1
  254. package/lib/runtime/index.js +1 -1
  255. package/lib/runtime/queue.js +1 -1
  256. package/lib/runtime/resolve.js +1 -1
  257. package/lib/skills/builtin-skill.js +1 -1
  258. package/lib/skills/main.js +1 -1
  259. package/lib/skills/npx-skills-add.js +1 -1
  260. package/lib/skills/skill-presence.js +1 -1
  261. package/lib/telemetry/cli-command-trace.js +1 -1
  262. package/lib/telemetry/cli-help-trace.js +1 -1
  263. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  264. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  265. package/lib/telemetry/send-cli-trace-log.js +1 -1
  266. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  267. package/lib/utils/ai_config.js +1 -1
  268. package/lib/utils/apply-jq-filter.js +1 -1
  269. package/lib/utils/cdn-config.js +1 -1
  270. package/lib/utils/check-sdk-version.js +1 -1
  271. package/lib/utils/cli-version-check.js +1 -1
  272. package/lib/utils/cli-version-policy.js +1 -1
  273. package/lib/utils/config.js +1 -1
  274. package/lib/utils/copy-directory.js +1 -1
  275. package/lib/utils/entity-with-id.js +1 -1
  276. package/lib/utils/file-utils.js +1 -1
  277. package/lib/utils/guides-cdn.js +1 -1
  278. package/lib/utils/http-client.js +1 -1
  279. package/lib/utils/is-non-interactive.js +1 -1
  280. package/lib/utils/logger.js +1 -1
  281. package/lib/utils/params.js +1 -1
  282. package/lib/utils/platform.js +1 -1
  283. package/lib/utils/rules-cdn.js +1 -1
  284. package/lib/utils/sleep.js +1 -1
  285. package/lib/utils/template-replacer.js +1 -1
  286. package/lib/utils/update-notice.js +1 -1
  287. package/lib/utils/version.js +1 -1
  288. package/lib/utils/with-active-cookie.js +1 -1
  289. package/lib/utils/write-cli-side-channel.js +1 -1
  290. package/package.json +1 -1
  291. package/skills/rabetbase/SKILL.md +1 -1
  292. package/skills/rabetbase/guides/react-custom-page-workflow.md +9 -3
  293. package/skills/rabetbase/knowledge/react-page/generation-standards.md +13 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a34_0x6f0cda=a34_0x393d;function a34_0x31e7(){const _0x437e6a=['str','3957xmWKwq','type','1520250UhvTmL','verbose','105322AIIfQM','No\x20BFF\x20scripts\x20found.','10NsJePt','(unnamed)','716784IPmPFq','3870sRKDiI','bool','scriptType','COMMON','map','5068DTvQft','bff','list','functionName','904AYNjoq','ENDPOINT','9118242pBcItQ','length','554BGjROx','read','string','16951407IhMsKF','Script\x20type\x20filter','List\x20BFF\x20scripts','name','appCode'];a34_0x31e7=function(){return _0x437e6a;};return a34_0x31e7();}function a34_0x393d(_0x560077,_0x5191e0){_0x560077=_0x560077-0x120;const _0x31e730=a34_0x31e7();let _0x393dac=_0x31e730[_0x560077];return _0x393dac;}(function(_0x541df6,_0x80edda){const _0xd02a28=a34_0x393d,_0x3ff149=_0x541df6();while(!![]){try{const _0x359a48=parseInt(_0xd02a28(0x135))/0x1*(-parseInt(_0xd02a28(0x12c))/0x2)+parseInt(_0xd02a28(0x13e))/0x3*(parseInt(_0xd02a28(0x124))/0x4)+-parseInt(_0xd02a28(0x137))/0x5+-parseInt(_0xd02a28(0x13d))/0x6+parseInt(_0xd02a28(0x139))/0x7*(-parseInt(_0xd02a28(0x128))/0x8)+parseInt(_0xd02a28(0x12a))/0x9*(parseInt(_0xd02a28(0x13b))/0xa)+parseInt(_0xd02a28(0x12f))/0xb;if(_0x359a48===_0x80edda)break;else _0x3ff149['push'](_0x3ff149['shift']());}catch(_0x2e292e){_0x3ff149['push'](_0x3ff149['shift']());}}}(a34_0x31e7,0xec864));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x6f0cda(0x125),'command':a34_0x6f0cda(0x126),'description':a34_0x6f0cda(0x131),'risk':a34_0x6f0cda(0x12d),'flags':[{'name':a34_0x6f0cda(0x136),'type':a34_0x6f0cda(0x12e),'description':a34_0x6f0cda(0x130),'default':a34_0x6f0cda(0x129),'enum':[a34_0x6f0cda(0x129),a34_0x6f0cda(0x122)]},{'name':'name','type':a34_0x6f0cda(0x12e),'description':'Filter\x20by\x20script\x20name'},{'name':a34_0x6f0cda(0x138),'type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x3fafae){const _0x3b9e25=a34_0x6f0cda,_0xbc0b5b=await listBffScripts(_0x3fafae[_0x3b9e25(0x133)],_0x3fafae[_0x3b9e25(0x134)](_0x3b9e25(0x136)),{'scriptName':_0x3fafae[_0x3b9e25(0x134)](_0x3b9e25(0x132))||undefined}),_0x1da25c=_0x3fafae[_0x3b9e25(0x120)](_0x3b9e25(0x138));return{'ok':!![],'data':_0x1da25c?_0xbc0b5b:_0xbc0b5b[_0x3b9e25(0x123)](_0x50719f=>({'id':_0x50719f['id'],'functionName':_0x50719f[_0x3b9e25(0x127)]??'','description':_0x50719f['description']||_0x3b9e25(0x13c),'scriptType':_0x50719f[_0x3b9e25(0x121)]})),'message':_0xbc0b5b[_0x3b9e25(0x12b)]===0x0?_0x3b9e25(0x13a):undefined};}};
1
+ function a34_0x33a8(){const _0x124f00=['str','Return\x20full\x20script\x20objects','12937016OGxnrV','List\x20BFF\x20scripts','5QxBpnF','list','bool','No\x20BFF\x20scripts\x20found.','7FbeRfQ','type','map','length','31609728UomDlW','string','154LdCTuC','ENDPOINT','read','416692hPdYGD','57dJUfTo','verbose','description','463560mOLSxn','COMMON','14558058bOhprk','bff','9289002EGqfbl','9792UXlmgB','18mKKNSs','(unnamed)'];a34_0x33a8=function(){return _0x124f00;};return a34_0x33a8();}const a34_0x1114e8=a34_0x11ad;function a34_0x11ad(_0x489933,_0x18fca8){_0x489933=_0x489933-0x67;const _0x33a883=a34_0x33a8();let _0x11ad5f=_0x33a883[_0x489933];return _0x11ad5f;}(function(_0xc5c8a4,_0x11f027){const _0x1d88ee=a34_0x11ad,_0x17d343=_0xc5c8a4();while(!![]){try{const _0x2ced13=parseInt(_0x1d88ee(0x77))/0x1*(-parseInt(_0x1d88ee(0x7f))/0x2)+parseInt(_0x1d88ee(0x80))/0x3*(-parseInt(_0x1d88ee(0x76))/0x4)+parseInt(_0x1d88ee(0x69))/0x5*(-parseInt(_0x1d88ee(0x7e))/0x6)+-parseInt(_0x1d88ee(0x6d))/0x7*(-parseInt(_0x1d88ee(0x67))/0x8)+-parseInt(_0x1d88ee(0x7c))/0x9+parseInt(_0x1d88ee(0x7a))/0xa*(parseInt(_0x1d88ee(0x73))/0xb)+parseInt(_0x1d88ee(0x71))/0xc;if(_0x2ced13===_0x11f027)break;else _0x17d343['push'](_0x17d343['shift']());}catch(_0x10325a){_0x17d343['push'](_0x17d343['shift']());}}}(a34_0x33a8,0xcabd0));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x1114e8(0x7d),'command':a34_0x1114e8(0x6a),'description':a34_0x1114e8(0x68),'risk':a34_0x1114e8(0x75),'flags':[{'name':a34_0x1114e8(0x6e),'type':a34_0x1114e8(0x72),'description':'Script\x20type\x20filter','default':a34_0x1114e8(0x74),'enum':['ENDPOINT',a34_0x1114e8(0x7b)]},{'name':'name','type':a34_0x1114e8(0x72),'description':'Filter\x20by\x20script\x20name'},{'name':a34_0x1114e8(0x78),'type':'boolean','description':a34_0x1114e8(0x83)}],async 'execute'(_0x122cd4){const _0x4792aa=a34_0x1114e8,_0x1061a0=await listBffScripts(_0x122cd4['appCode'],_0x122cd4[_0x4792aa(0x82)](_0x4792aa(0x6e)),{'scriptName':_0x122cd4[_0x4792aa(0x82)]('name')||undefined}),_0x38e52d=_0x122cd4[_0x4792aa(0x6b)](_0x4792aa(0x78));return{'ok':!![],'data':_0x38e52d?_0x1061a0:_0x1061a0[_0x4792aa(0x6f)](_0x3875d5=>({'id':_0x3875d5['id'],'functionName':_0x3875d5['functionName']??'','description':_0x3875d5[_0x4792aa(0x79)]||_0x4792aa(0x81),'scriptType':_0x3875d5['scriptType']})),'message':_0x1061a0[_0x4792aa(0x70)]===0x0?_0x4792aa(0x6c):undefined};}};
@@ -1 +1 @@
1
- const a35_0x1e3578=a35_0x1545;(function(_0x237a31,_0x96c00e){const _0x5df97b=a35_0x1545,_0x37fa68=_0x237a31();while(!![]){try{const _0x22fc07=-parseInt(_0x5df97b(0xc0))/0x1*(parseInt(_0x5df97b(0xf2))/0x2)+parseInt(_0x5df97b(0xc3))/0x3+parseInt(_0x5df97b(0xd5))/0x4+-parseInt(_0x5df97b(0xfa))/0x5+parseInt(_0x5df97b(0xf4))/0x6+parseInt(_0x5df97b(0xc2))/0x7+-parseInt(_0x5df97b(0xe9))/0x8;if(_0x22fc07===_0x96c00e)break;else _0x37fa68['push'](_0x37fa68['shift']());}catch(_0x21f1e8){_0x37fa68['push'](_0x37fa68['shift']());}}}(a35_0x52d4,0x4c29e));import{createInterface}from'node:readline';function a35_0x52d4(){const _0x2174ea=['2729840qMUrgW','read','hash','push','apps','map','\x20remote\x20BFF\x20script(s)\x20for\x20pull','operationType','trim','includes','skipped','pull','14860UJikrK','parse','1102038MQwvPf','868446lPvoaS','toLowerCase','force','scriptsRoot','\x20pulled,\x20','functionNode','scriptType','COMMON','alias','would_pull','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','str','validation','/api/management/library/scripts/list?appCode=','No\x20remote\x20BFF\x20scripts\x20found.','appCode','question','utf8','1164140vPiZrS','toISOString','HOOK','local\x20unsynced\x20changes','functions','version','stringify','message','boolean','Lock\x20scope\x20for\x20app\x20\x22','Pull\x20complete:\x20','ENDPOINT','filePath','scriptContent','bool','GET','nonInteractive','bff','type','unresolvable\x20target\x20path','1946280TaTWNC','Would\x20inspect\x20','stdin','Force\x20overwrite\x20local\x20unsynced\x20changes','length','\x20skipped,\x20','string','datasetCode','Remote\x20script\x20missing\x20id.','2BhdmdP','lockFilePath','2268768ITqRYc','all','lockKey','functionName','hookLocation','apiDir'];a35_0x52d4=function(){return _0x2174ea;};return a35_0x52d4();}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a35_0x1545(_0x468ddc,_0x26580b){_0x468ddc=_0x468ddc-0xb8;const _0x52d427=a35_0x52d4();let _0x154518=_0x52d427[_0x468ddc];return _0x154518;}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_0x1e3578(0xe6),'command':'pull','description':a35_0x1e3578(0xcd),'risk':a35_0x1e3578(0xfb),'flags':[{'name':a35_0x1e3578(0xe7),'type':a35_0x1e3578(0xef),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a35_0x1e3578(0xca),a35_0x1e3578(0xe0),a35_0x1e3578(0xd7)]},{'name':a35_0x1e3578(0xc5),'type':a35_0x1e3578(0xdd),'description':a35_0x1e3578(0xec)}],async 'dryRun'(_0x4536b5){const _0x27c8a5=a35_0x1e3578,_0x3e0e9d=loadBffProjectConfig(_0x4536b5[_0x27c8a5(0xd2)]),_0x4ed631=await readBffLockFile(_0x3e0e9d['lockFilePath']),{appLock:_0x13efaa}=ensureLockScope(_0x4ed631??createEmptyBffLock(),_0x4536b5['appCode'],_0x3e0e9d[_0x27c8a5(0xc6)],_0x27c8a5(0xbf)),_0x5256cc=normalizeBffType(_0x4536b5[_0x27c8a5(0xce)](_0x27c8a5(0xe7)))??undefined,_0x31fddf=buildDatasetCodeToAliasMap(_0x4536b5['apiDir'],_0x4536b5[_0x27c8a5(0xd2)]),[_0x333937,_0x423063]=await Promise[_0x27c8a5(0xf5)]([listBffScripts(_0x4536b5[_0x27c8a5(0xd2)],_0x5256cc),getBffScriptStatistics(_0x4536b5[_0x27c8a5(0xd2)])]),_0xf07ce2=createHookLocationMap(_0x423063),_0x469d5c=[];for(const _0x1d9b0d of _0x333937){const _0x5b58fc=resolveRemoteScriptTarget(_0x3e0e9d,_0x1d9b0d,_0xf07ce2,_0x13efaa['functions'],_0x31fddf);if(!_0x5b58fc){_0x469d5c[_0x27c8a5(0xfd)]({'scriptType':_0x1d9b0d[_0x27c8a5(0xc9)],'functionName':_0x1d9b0d[_0x27c8a5(0xf7)]??'','status':_0x27c8a5(0xbe),'reason':_0x27c8a5(0xe8)});continue;}const _0x441209=_0x13efaa[_0x27c8a5(0xd9)][_0x5b58fc['lockKey']],_0x5236b3=_0x1d9b0d['scriptContent']!=null?computeContentHash(_0x1d9b0d[_0x27c8a5(0xe2)]):undefined,_0x54ad28=await hasUnsyncedLocalChanges(_0x5b58fc[_0x27c8a5(0xe1)],_0x441209,_0x5236b3);_0x469d5c[_0x27c8a5(0xfd)]({'lockKey':_0x5b58fc[_0x27c8a5(0xf6)],'filePath':_0x5b58fc[_0x27c8a5(0xe1)],'remoteId':_0x1d9b0d['id']??null,'status':_0x54ad28?'conflict':_0x27c8a5(0xcc)});}return{'method':_0x27c8a5(0xe4),'url':_0x27c8a5(0xd0)+_0x4536b5[_0x27c8a5(0xd2)]+(_0x5256cc?'&type='+_0x5256cc:''),'body':{'appCode':_0x4536b5[_0x27c8a5(0xd2)],'filterType':_0x5256cc??null,'files':_0x469d5c},'description':_0x27c8a5(0xea)+_0x469d5c[_0x27c8a5(0xed)]+_0x27c8a5(0xba)};},async 'execute'(_0x537292){const _0x1908d1=a35_0x1e3578,_0x2f9efa=loadBffProjectConfig(_0x537292['appCode']),_0x20e448=await readBffLockFile(_0x2f9efa[_0x1908d1(0xf3)]),{lockData:_0x424cfb,appLock:_0x234d56}=ensureLockScope(_0x20e448??createEmptyBffLock(),_0x537292[_0x1908d1(0xd2)],_0x2f9efa['scriptsRoot'],'pull'),_0x12883d=normalizeBffType(_0x537292[_0x1908d1(0xce)](_0x1908d1(0xe7)))??undefined;if(_0x537292[_0x1908d1(0xce)](_0x1908d1(0xe7))&&!_0x12883d)throw CliErrors[_0x1908d1(0xcf)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x2a4b42,_0x27586d]=await Promise['all']([listBffScripts(_0x537292[_0x1908d1(0xd2)],_0x12883d),getBffScriptStatistics(_0x537292[_0x1908d1(0xd2)])]);if(_0x2a4b42[_0x1908d1(0xed)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1908d1(0xd1)};const _0x220a33=_0x537292[_0x1908d1(0xe3)](_0x1908d1(0xc5));if(_0x220a33&&!_0x537292['nonInteractive']){const _0x1436da=await confirmForce();if(!_0x1436da)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0x220a33&&_0x537292[_0x1908d1(0xe5)]){}const _0x33ae19=buildDatasetCodeToAliasMap(_0x537292[_0x1908d1(0xf9)],_0x537292[_0x1908d1(0xd2)]),_0xfc9fd4=createHookLocationMap(_0x27586d),_0x2e09ff=JSON[_0x1908d1(0xc1)](JSON[_0x1908d1(0xdb)](_0x424cfb)),_0x1ed145=_0x537292[_0x1908d1(0xd2)],_0x433d1a=_0x2e09ff[_0x1908d1(0xb8)][_0x1ed145];if(!_0x433d1a)throw new Error(_0x1908d1(0xde)+_0x1ed145+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x4a09a0=[],_0x187ce5=[],_0x367f5f=[];for(const _0xc4a45f of _0x2a4b42){const _0x25eec9=resolveRemoteScriptTarget(_0x2f9efa,_0xc4a45f,_0xfc9fd4,_0x234d56['functions'],_0x33ae19);if(!_0x25eec9){_0x187ce5[_0x1908d1(0xfd)]({'lockKey':_0xc4a45f[_0x1908d1(0xc9)]+'/'+_0xc4a45f['functionName'],'reason':_0x1908d1(0xe8)});continue;}const _0x3ad2d8=_0x234d56[_0x1908d1(0xd9)][_0x25eec9['lockKey']];try{if(!_0xc4a45f['id'])throw new Error(_0x1908d1(0xf1));if(_0xc4a45f['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x5bc669=_0xc4a45f['scriptContent'],_0x5c5c3b=computeContentHash(_0x5bc669);if(!_0x220a33){const _0x1a21a5=await hasUnsyncedLocalChanges(_0x25eec9[_0x1908d1(0xe1)],_0x3ad2d8,_0x5c5c3b);if(_0x1a21a5){_0x187ce5[_0x1908d1(0xfd)]({'lockKey':_0x25eec9[_0x1908d1(0xf6)],'reason':_0x1908d1(0xd8)});continue;}}await ensureParentDirectory(_0x25eec9[_0x1908d1(0xe1)]),await writeFile(_0x25eec9[_0x1908d1(0xe1)],_0x5bc669,_0x1908d1(0xd4));const _0x3a8736={'hash':_0x5c5c3b,'remoteId':_0xc4a45f['id'],'version':_0xc4a45f[_0x1908d1(0xda)]};_0x25eec9[_0x1908d1(0xe7)]===_0x1908d1(0xd7)&&_0x25eec9[_0x1908d1(0xf8)]&&(_0x3a8736[_0x1908d1(0xcb)]=_0x25eec9[_0x1908d1(0xf8)][_0x1908d1(0xcb)],_0x3a8736[_0x1908d1(0xf0)]=_0x25eec9[_0x1908d1(0xf8)][_0x1908d1(0xf0)],_0x3a8736[_0x1908d1(0xbb)]=_0x25eec9[_0x1908d1(0xf8)][_0x1908d1(0xbb)],_0x3a8736[_0x1908d1(0xc8)]=_0x25eec9[_0x1908d1(0xf8)][_0x1908d1(0xc8)]),_0x433d1a['functions'][_0x25eec9[_0x1908d1(0xf6)]]=_0x3a8736,_0x4a09a0['push']({'lockKey':_0x25eec9['lockKey'],'remoteId':_0xc4a45f['id']});}catch(_0x110996){_0x367f5f['push']({'lockKey':_0x25eec9['lockKey'],'error':_0x110996 instanceof Error?_0x110996[_0x1908d1(0xdc)]:String(_0x110996)});}}return _0x433d1a['lastSync']=new Date()[_0x1908d1(0xd6)](),await writeBffLockFile(_0x2f9efa[_0x1908d1(0xf3)],_0x2e09ff),{'ok':_0x367f5f[_0x1908d1(0xed)]===0x0,'data':{'pulled':_0x4a09a0,'skipped':_0x187ce5,'failed':_0x367f5f},'message':_0x1908d1(0xdf)+_0x4a09a0[_0x1908d1(0xed)]+_0x1908d1(0xc7)+_0x187ce5['length']+_0x1908d1(0xee)+_0x367f5f[_0x1908d1(0xed)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0xb8c783,_0xb339de,_0x28eb17){const _0x39fc09=a35_0x1e3578;if(!await fileExists(_0xb8c783))return![];const _0x11c18e=await computeFileHash(_0xb8c783);if(!_0xb339de)return _0x28eb17?_0x11c18e!==_0x28eb17:!![];return _0x11c18e!==_0xb339de[_0x39fc09(0xfc)];}function buildDatasetCodeToAliasMap(_0x413515,_0x25be09){const _0x31a299=a35_0x1e3578,_0x2e4781=loadAliasMap(_0x413515,undefined,resolveApiFilePath(_0x413515,_0x25be09));return new Map(_0x2e4781[_0x31a299(0xb9)](_0x4ccbc9=>[_0x4ccbc9[_0x31a299(0xf0)],_0x4ccbc9[_0x31a299(0xcb)]]));}async function confirmForce(){const _0x1f4c83=a35_0x1e3578,_0x486cce=createInterface({'input':process[_0x1f4c83(0xeb)],'output':process['stderr']}),_0x3115b7=await new Promise(_0x27caff=>{const _0x36e389=_0x1f4c83;_0x486cce[_0x36e389(0xd3)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x27caff);});return _0x486cce['close'](),['y','yes'][_0x1f4c83(0xbd)](_0x3115b7[_0x1f4c83(0xbc)]()[_0x1f4c83(0xc4)]());}
1
+ const a35_0x4815a9=a35_0x47fa;function a35_0x47fa(_0x1c8639,_0x4eb4d5){_0x1c8639=_0x1c8639-0x170;const _0x276ca7=a35_0x276c();let _0x47fafe=_0x276ca7[_0x1c8639];return _0x47fafe;}(function(_0x45670b,_0x57ef74){const _0x500057=a35_0x47fa,_0x2a1920=_0x45670b();while(!![]){try{const _0x39a393=-parseInt(_0x500057(0x18a))/0x1+-parseInt(_0x500057(0x18d))/0x2+-parseInt(_0x500057(0x1af))/0x3+-parseInt(_0x500057(0x179))/0x4*(-parseInt(_0x500057(0x195))/0x5)+parseInt(_0x500057(0x19f))/0x6+-parseInt(_0x500057(0x193))/0x7+parseInt(_0x500057(0x1b4))/0x8;if(_0x39a393===_0x57ef74)break;else _0x2a1920['push'](_0x2a1920['shift']());}catch(_0x1ef556){_0x2a1920['push'](_0x2a1920['shift']());}}}(a35_0x276c,0x74012));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a35_0x276c(){const _0x42dae8=['\x22\x20not\x20found\x20after\x20ensureLockScope.','Force\x20pull\x20cancelled.','cancelled','length','8658504KqiJsJ','\x20pulled,\x20','apiDir','map','HOOK','utf8','Lock\x20scope\x20for\x20app\x20\x22','Remote\x20script\x20missing\x20id.','trim','includes','stderr','string','4KxAalA','pull','unresolvable\x20target\x20path','scriptType','validation','apps','question','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','hookLocation','boolean','\x20failed','No\x20remote\x20BFF\x20scripts\x20found.','stringify','str','push','Pull\x20only\x20this\x20script\x20type','toISOString','189744NGRbKc','functions','operationType','1100676uPHCHN','\x20skipped,\x20','GET','filePath','close','Force\x20overwrite\x20local\x20unsynced\x20changes','3024637wEeZeq','ENDPOINT','607795YFYwUy','scriptContent','version','local\x20unsynced\x20changes','functionNode','datasetCode','&type=','type','functionName','scriptsRoot','3258120CHMDuu','skipped','yes','Pull\x20complete:\x20','alias','conflict','nonInteractive','lockFilePath','Would\x20inspect\x20','all','lastSync','appCode','lockKey','parse','Remote\x20script\x20missing\x20content.','force','298695epTrwk'];a35_0x276c=function(){return _0x42dae8;};return a35_0x276c();}import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a35_0x4815a9(0x17a),'description':a35_0x4815a9(0x180),'risk':'read','flags':[{'name':'type','type':a35_0x4815a9(0x178),'description':a35_0x4815a9(0x188),'enum':['COMMON',a35_0x4815a9(0x194),a35_0x4815a9(0x171)]},{'name':'force','type':a35_0x4815a9(0x182),'description':a35_0x4815a9(0x192)}],async 'dryRun'(_0x1497af){const _0xcc6e74=a35_0x4815a9,_0x5355a9=loadBffProjectConfig(_0x1497af[_0xcc6e74(0x1aa)]),_0x50fdb3=await readBffLockFile(_0x5355a9['lockFilePath']),{appLock:_0x43b54c}=ensureLockScope(_0x50fdb3??createEmptyBffLock(),_0x1497af[_0xcc6e74(0x1aa)],_0x5355a9[_0xcc6e74(0x19e)],_0xcc6e74(0x17a)),_0x5382cb=normalizeBffType(_0x1497af['str'](_0xcc6e74(0x19c)))??undefined,_0x1b5268=buildDatasetCodeToAliasMap(_0x1497af[_0xcc6e74(0x1b6)],_0x1497af[_0xcc6e74(0x1aa)]),[_0x19d952,_0x221f0e]=await Promise[_0xcc6e74(0x1a8)]([listBffScripts(_0x1497af[_0xcc6e74(0x1aa)],_0x5382cb),getBffScriptStatistics(_0x1497af[_0xcc6e74(0x1aa)])]),_0xb43956=createHookLocationMap(_0x221f0e),_0x51c48f=[];for(const _0x27437d of _0x19d952){const _0x5aade8=resolveRemoteScriptTarget(_0x5355a9,_0x27437d,_0xb43956,_0x43b54c['functions'],_0x1b5268);if(!_0x5aade8){_0x51c48f[_0xcc6e74(0x187)]({'scriptType':_0x27437d[_0xcc6e74(0x17c)],'functionName':_0x27437d[_0xcc6e74(0x19d)]??'','status':_0xcc6e74(0x1a0),'reason':'unresolvable\x20target\x20path'});continue;}const _0x5c0c7d=_0x43b54c['functions'][_0x5aade8[_0xcc6e74(0x1ab)]],_0x270c70=_0x27437d['scriptContent']!=null?computeContentHash(_0x27437d[_0xcc6e74(0x196)]):undefined,_0x4c8663=await hasUnsyncedLocalChanges(_0x5aade8[_0xcc6e74(0x190)],_0x5c0c7d,_0x270c70);_0x51c48f[_0xcc6e74(0x187)]({'lockKey':_0x5aade8[_0xcc6e74(0x1ab)],'filePath':_0x5aade8[_0xcc6e74(0x190)],'remoteId':_0x27437d['id']??null,'status':_0x4c8663?_0xcc6e74(0x1a4):'would_pull'});}return{'method':_0xcc6e74(0x18f),'url':'/api/management/library/scripts/list?appCode='+_0x1497af[_0xcc6e74(0x1aa)]+(_0x5382cb?_0xcc6e74(0x19b)+_0x5382cb:''),'body':{'appCode':_0x1497af[_0xcc6e74(0x1aa)],'filterType':_0x5382cb??null,'files':_0x51c48f},'description':_0xcc6e74(0x1a7)+_0x51c48f[_0xcc6e74(0x1b3)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x43035a){const _0x451ea0=a35_0x4815a9,_0x3f13b5=loadBffProjectConfig(_0x43035a[_0x451ea0(0x1aa)]),_0x1c8526=await readBffLockFile(_0x3f13b5['lockFilePath']),{lockData:_0x710281,appLock:_0x2adbc8}=ensureLockScope(_0x1c8526??createEmptyBffLock(),_0x43035a['appCode'],_0x3f13b5['scriptsRoot'],_0x451ea0(0x17a)),_0x49652d=normalizeBffType(_0x43035a[_0x451ea0(0x186)](_0x451ea0(0x19c)))??undefined;if(_0x43035a[_0x451ea0(0x186)]('type')&&!_0x49652d)throw CliErrors[_0x451ea0(0x17d)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x108c4d,_0x53038d]=await Promise[_0x451ea0(0x1a8)]([listBffScripts(_0x43035a['appCode'],_0x49652d),getBffScriptStatistics(_0x43035a[_0x451ea0(0x1aa)])]);if(_0x108c4d['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x451ea0(0x184)};const _0x17928b=_0x43035a['bool'](_0x451ea0(0x1ae));if(_0x17928b&&!_0x43035a[_0x451ea0(0x1a5)]){const _0x40182b=await confirmForce();if(!_0x40182b)throw CliErrors[_0x451ea0(0x1b2)](_0x451ea0(0x1b1));}if(_0x17928b&&_0x43035a[_0x451ea0(0x1a5)]){}const _0x197a30=buildDatasetCodeToAliasMap(_0x43035a['apiDir'],_0x43035a[_0x451ea0(0x1aa)]),_0x2536e=createHookLocationMap(_0x53038d),_0x3a58b9=JSON[_0x451ea0(0x1ac)](JSON[_0x451ea0(0x185)](_0x710281)),_0x1e0615=_0x43035a[_0x451ea0(0x1aa)],_0xbb5c59=_0x3a58b9[_0x451ea0(0x17e)][_0x1e0615];if(!_0xbb5c59)throw new Error(_0x451ea0(0x173)+_0x1e0615+_0x451ea0(0x1b0));const _0x58f3cd=[],_0x3cfb60=[],_0x477b6e=[];for(const _0x262d4b of _0x108c4d){const _0x5f4c2a=resolveRemoteScriptTarget(_0x3f13b5,_0x262d4b,_0x2536e,_0x2adbc8[_0x451ea0(0x18b)],_0x197a30);if(!_0x5f4c2a){_0x3cfb60[_0x451ea0(0x187)]({'lockKey':_0x262d4b[_0x451ea0(0x17c)]+'/'+_0x262d4b[_0x451ea0(0x19d)],'reason':_0x451ea0(0x17b)});continue;}const _0x508b65=_0x2adbc8[_0x451ea0(0x18b)][_0x5f4c2a['lockKey']];try{if(!_0x262d4b['id'])throw new Error(_0x451ea0(0x174));if(_0x262d4b[_0x451ea0(0x196)]==null)throw new Error(_0x451ea0(0x1ad));const _0x86ae70=_0x262d4b['scriptContent'],_0x5529ac=computeContentHash(_0x86ae70);if(!_0x17928b){const _0x4981ba=await hasUnsyncedLocalChanges(_0x5f4c2a[_0x451ea0(0x190)],_0x508b65,_0x5529ac);if(_0x4981ba){_0x3cfb60[_0x451ea0(0x187)]({'lockKey':_0x5f4c2a[_0x451ea0(0x1ab)],'reason':_0x451ea0(0x198)});continue;}}await ensureParentDirectory(_0x5f4c2a[_0x451ea0(0x190)]),await writeFile(_0x5f4c2a[_0x451ea0(0x190)],_0x86ae70,_0x451ea0(0x172));const _0x43a51e={'hash':_0x5529ac,'remoteId':_0x262d4b['id'],'version':_0x262d4b[_0x451ea0(0x197)]};_0x5f4c2a[_0x451ea0(0x19c)]==='HOOK'&&_0x5f4c2a[_0x451ea0(0x181)]&&(_0x43a51e[_0x451ea0(0x1a3)]=_0x5f4c2a[_0x451ea0(0x181)][_0x451ea0(0x1a3)],_0x43a51e[_0x451ea0(0x19a)]=_0x5f4c2a[_0x451ea0(0x181)][_0x451ea0(0x19a)],_0x43a51e[_0x451ea0(0x18c)]=_0x5f4c2a['hookLocation'][_0x451ea0(0x18c)],_0x43a51e[_0x451ea0(0x199)]=_0x5f4c2a['hookLocation'][_0x451ea0(0x199)]),_0xbb5c59['functions'][_0x5f4c2a['lockKey']]=_0x43a51e,_0x58f3cd['push']({'lockKey':_0x5f4c2a['lockKey'],'remoteId':_0x262d4b['id']});}catch(_0x341411){_0x477b6e[_0x451ea0(0x187)]({'lockKey':_0x5f4c2a[_0x451ea0(0x1ab)],'error':_0x341411 instanceof Error?_0x341411['message']:String(_0x341411)});}}return _0xbb5c59[_0x451ea0(0x1a9)]=new Date()[_0x451ea0(0x189)](),await writeBffLockFile(_0x3f13b5[_0x451ea0(0x1a6)],_0x3a58b9),{'ok':_0x477b6e[_0x451ea0(0x1b3)]===0x0,'data':{'pulled':_0x58f3cd,'skipped':_0x3cfb60,'failed':_0x477b6e},'message':_0x451ea0(0x1a2)+_0x58f3cd[_0x451ea0(0x1b3)]+_0x451ea0(0x1b5)+_0x3cfb60['length']+_0x451ea0(0x18e)+_0x477b6e[_0x451ea0(0x1b3)]+_0x451ea0(0x183)};}};async function hasUnsyncedLocalChanges(_0x258311,_0x35578d,_0x271c87){if(!await fileExists(_0x258311))return![];const _0x5082c0=await computeFileHash(_0x258311);if(!_0x35578d)return _0x271c87?_0x5082c0!==_0x271c87:!![];return _0x5082c0!==_0x35578d['hash'];}function buildDatasetCodeToAliasMap(_0x34e5ae,_0x16f1d3){const _0x2c0e93=a35_0x4815a9,_0x3a87de=loadAliasMap(_0x34e5ae,undefined,resolveApiFilePath(_0x34e5ae,_0x16f1d3));return new Map(_0x3a87de[_0x2c0e93(0x170)](_0x3be52d=>[_0x3be52d['datasetCode'],_0x3be52d['alias']]));}async function confirmForce(){const _0x490bf6=a35_0x4815a9,_0x238e57=createInterface({'input':process['stdin'],'output':process[_0x490bf6(0x177)]}),_0x41e12c=await new Promise(_0x3e225c=>{const _0x8173c8=_0x490bf6;_0x238e57[_0x8173c8(0x17f)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x3e225c);});return _0x238e57[_0x490bf6(0x191)](),['y',_0x490bf6(0x1a1)][_0x490bf6(0x176)](_0x41e12c[_0x490bf6(0x175)]()['toLowerCase']());}
@@ -1 +1 @@
1
- const a36_0x31fde4=a36_0x45d0;(function(_0x5333e1,_0x5235b7){const _0x19515a=a36_0x45d0,_0x1dcd28=_0x5333e1();while(!![]){try{const _0x239784=-parseInt(_0x19515a(0x138))/0x1+parseInt(_0x19515a(0x143))/0x2*(-parseInt(_0x19515a(0x17d))/0x3)+parseInt(_0x19515a(0x131))/0x4*(-parseInt(_0x19515a(0x177))/0x5)+parseInt(_0x19515a(0x135))/0x6*(parseInt(_0x19515a(0x137))/0x7)+parseInt(_0x19515a(0x16f))/0x8+parseInt(_0x19515a(0x156))/0x9+parseInt(_0x19515a(0x140))/0xa;if(_0x239784===_0x5235b7)break;else _0x1dcd28['push'](_0x1dcd28['shift']());}catch(_0xae846c){_0x1dcd28['push'](_0x1dcd28['shift']());}}}(a36_0x3bb3,0xcb020));function a36_0x3bb3(){const _0xa5d422=['runtime\x20cache\x20clear\x20failed','93tvYmww','force','/api/management/library/scripts/save','lockKey','5441132UpQMwB','string','length','datasetCode','252gwGGeT','functions','43029tCfwjC','726990txUQFq','Push\x20complete:\x20','utf8','cleared','apps','Run\x20`','runtime\x20cache\x20cleared','COMMON','19543790BQrdOY','script','parse','7542cXomXO','version','scriptsRoot','name','filePath','alias','remoteId','POST','type','get','appCode','\x22.\x20','str','unchanged','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','runtime\x20cache\x20not\x20needed','stringify',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','push','3765303HedRKY','Incomplete\x20HOOK\x20path:\x20','attempted','some','has','map','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','boolean','status','\x20uploaded,\x20','Lock\x20scope\x20for\x20app\x20\x22','would_push','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','validation','aliasToDatasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Force\x20push\x20ignoring\x20hash\x20protection','functionNode','Runtime\x20script\x20cache\x20cleared.','ENDPOINT','operationType','every','HOOK','set','apiDir','3238192HRCXHO','lockFilePath','\x20failed,\x20','\x20skipped,\x20','description','update','toISOString','No\x20local\x20BFF\x20functions\x20found.','5vilAuT','datasetCodeToDataset','join','bool','Push\x20only\x20this\x20script\x20type'];a36_0x3bb3=function(){return _0xa5d422;};return a36_0x3bb3();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a36_0x45d0(_0x39f8cc,_0x154e42){_0x39f8cc=_0x39f8cc-0x130;const _0x3bb34b=a36_0x3bb3();let _0x45d0c8=_0x3bb34b[_0x39f8cc];return _0x45d0c8;}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':'high-risk-write','flags':[{'name':a36_0x31fde4(0x14b),'type':a36_0x31fde4(0x132),'description':a36_0x31fde4(0x17b),'enum':[a36_0x31fde4(0x13f),a36_0x31fde4(0x169),a36_0x31fde4(0x16c)]},{'name':a36_0x31fde4(0x146),'type':a36_0x31fde4(0x132),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a36_0x31fde4(0x17e),'type':a36_0x31fde4(0x15d),'description':a36_0x31fde4(0x166)}],async 'dryRun'(_0x506e59){const _0x755b6e=a36_0x31fde4,_0x521992=loadBffProjectConfig(_0x506e59[_0x755b6e(0x14d)]),_0x3c5b54=await readBffLockFile(_0x521992[_0x755b6e(0x170)]),{appLock:_0x49d059}=ensureLockScope(_0x3c5b54??createEmptyBffLock(),_0x506e59[_0x755b6e(0x14d)],_0x521992[_0x755b6e(0x145)],_0x755b6e(0x155)),_0x897d47=await getTargetFunctions(_0x521992,_0x506e59),_0x1884d4=_0x506e59[_0x755b6e(0x17a)](_0x755b6e(0x17e)),_0x34db15=[];for(const _0x2a6e89 of _0x897d47){const _0x4ada89=await computeFileHash(_0x2a6e89[_0x755b6e(0x147)]),_0x317686=_0x49d059[_0x755b6e(0x136)][_0x2a6e89[_0x755b6e(0x130)]],_0x109ba1=!!_0x317686&&_0x317686['hash']===_0x4ada89;_0x34db15[_0x755b6e(0x155)]({'lockKey':_0x2a6e89[_0x755b6e(0x130)],'filePath':_0x2a6e89[_0x755b6e(0x147)],'remoteId':_0x317686?.[_0x755b6e(0x149)]??null,'mode':_0x317686?.[_0x755b6e(0x149)]?_0x755b6e(0x174):'create','status':!_0x1884d4&&_0x109ba1?_0x755b6e(0x150):_0x755b6e(0x161)});}return{'method':_0x755b6e(0x14a),'url':_0x755b6e(0x17f),'body':{'appCode':_0x506e59[_0x755b6e(0x14d)],'force':_0x1884d4,'files':_0x34db15,'cacheClearAtRuntime':_0x34db15[_0x755b6e(0x159)](_0x3ffeda=>_0x3ffeda[_0x755b6e(0x15e)]===_0x755b6e(0x161)),'cacheClearAtRuntimeTimes':_0x34db15[_0x755b6e(0x159)](_0x404f97=>_0x404f97['status']===_0x755b6e(0x161))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x34db15[_0x755b6e(0x133)]+_0x755b6e(0x162)};},async 'execute'(_0x2f0df0){const _0x48b03e=a36_0x31fde4,_0x51fb3f=loadBffProjectConfig(_0x2f0df0['appCode']),_0x3aa142=await readBffLockFile(_0x51fb3f[_0x48b03e(0x170)]),{lockData:_0x2a9d20,appLock:_0x3a2489}=ensureLockScope(_0x3aa142??createEmptyBffLock(),_0x2f0df0[_0x48b03e(0x14d)],_0x51fb3f[_0x48b03e(0x145)],_0x48b03e(0x155)),_0x306e1f=await getTargetFunctions(_0x51fb3f,_0x2f0df0);if(_0x306e1f[_0x48b03e(0x133)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x48b03e(0x176)};const _0x5791a7=_0x2f0df0[_0x48b03e(0x17a)](_0x48b03e(0x17e)),_0x5d6724=JSON[_0x48b03e(0x142)](JSON[_0x48b03e(0x153)](_0x2a9d20)),_0x4f740d=_0x5d6724[_0x48b03e(0x13c)][_0x2f0df0[_0x48b03e(0x14d)]];if(!_0x4f740d)throw new Error(_0x48b03e(0x160)+_0x2f0df0[_0x48b03e(0x14d)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x508240=await buildHookMaps(_0x2f0df0[_0x48b03e(0x14d)],_0x2f0df0[_0x48b03e(0x16e)],_0x306e1f,_0x4f740d),_0x29c409=[],_0x3909c5=[],_0x588ed0=[];for(const _0x454afe of _0x306e1f){const _0x26b3fe=await computeFileHash(_0x454afe[_0x48b03e(0x147)]),_0xe00a65=_0x4f740d[_0x48b03e(0x136)][_0x454afe[_0x48b03e(0x130)]];if(!_0x5791a7&&_0xe00a65&&_0xe00a65['hash']===_0x26b3fe){_0x3909c5[_0x48b03e(0x155)]({'lockKey':_0x454afe[_0x48b03e(0x130)],'reason':_0x48b03e(0x150)});continue;}try{await uploadSingleFunction(_0x2f0df0[_0x48b03e(0x14d)],_0x454afe,_0x4f740d,_0x508240);const _0x324235=_0x4f740d[_0x48b03e(0x136)][_0x454afe[_0x48b03e(0x130)]];_0x29c409[_0x48b03e(0x155)]({'lockKey':_0x454afe[_0x48b03e(0x130)],'remoteId':_0x324235?.['remoteId']??0x0});}catch(_0x38afbc){_0x588ed0['push']({'lockKey':_0x454afe[_0x48b03e(0x130)],'error':_0x38afbc instanceof Error?_0x38afbc['message']:String(_0x38afbc)});}}_0x4f740d['lastSync']=new Date()[_0x48b03e(0x175)](),await writeBffLockFile(_0x51fb3f[_0x48b03e(0x170)],_0x5d6724),await waitForUploadedLockEntries(_0x51fb3f['lockFilePath'],_0x2f0df0['appCode'],_0x29c409[_0x48b03e(0x15b)](_0x5a031c=>_0x5a031c['lockKey']));let _0x4cb101={'attempted':![],'cleared':![]};if(_0x29c409[_0x48b03e(0x133)]>0x0)try{let _0x4a69c2='';for(let _0x7e6061=0x0;_0x7e6061<CACHE_CLEAR_ATTEMPTS;_0x7e6061+=0x1){_0x4a69c2=await clearBffScriptCache(),_0x7e6061<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4cb101={'attempted':!![],'cleared':!![],'message':_0x4a69c2||_0x48b03e(0x168)};}catch(_0x3b7b79){_0x4cb101={'attempted':!![],'cleared':![],'error':_0x3b7b79 instanceof Error?_0x3b7b79['message']:String(_0x3b7b79)};}const _0x52f17b=_0x588ed0[_0x48b03e(0x133)]===0x0&&(_0x4cb101['attempted']?_0x4cb101['cleared']:!![]),_0x3b3743=_0x4cb101[_0x48b03e(0x158)]?_0x4cb101[_0x48b03e(0x13b)]?_0x48b03e(0x13e):_0x48b03e(0x17c):_0x48b03e(0x152);return{'ok':_0x52f17b,'data':{'uploaded':_0x29c409,'skipped':_0x3909c5,'failed':_0x588ed0,'cacheClear':_0x4cb101},'message':_0x48b03e(0x139)+_0x29c409[_0x48b03e(0x133)]+_0x48b03e(0x15f)+_0x3909c5[_0x48b03e(0x133)]+_0x48b03e(0x172)+_0x588ed0[_0x48b03e(0x133)]+_0x48b03e(0x171)+_0x3b3743};}};async function getTargetFunctions(_0x45d7c0,_0x5127cf){const _0x450d96=a36_0x31fde4,_0x3eefda=_0x5127cf[_0x450d96(0x14f)]('type'),_0x2ee436=_0x5127cf[_0x450d96(0x14f)](_0x450d96(0x146)),_0x5854af=normalizeBffType(_0x3eefda)??undefined;if(_0x2ee436&&!_0x5854af)throw CliErrors[_0x450d96(0x163)](_0x450d96(0x15c));const _0x37a6ee=await scanLocalBffFunctions(_0x45d7c0,_0x5854af);if(_0x2ee436){const _0x30d567=_0x37a6ee['filter'](_0x111267=>_0x111267['name']===_0x2ee436);if(_0x30d567[_0x450d96(0x133)]===0x0)throw CliErrors[_0x450d96(0x163)]('Local\x20function\x20not\x20found:\x20'+_0x5854af+'/'+_0x2ee436);return _0x30d567;}return _0x37a6ee;}async function buildHookMaps(_0x1add7a,_0x18cd61,_0x4d998c,_0x266893){const _0x388009=a36_0x31fde4,_0x36e8c2=_0x4d998c[_0x388009(0x159)](_0x3a2c5b=>_0x3a2c5b[_0x388009(0x14b)]==='HOOK');if(!_0x36e8c2)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2cd48b=loadAliasMap(_0x18cd61,undefined,resolveApiFilePath(_0x18cd61,_0x1add7a)),_0x847861=new Map(_0x2cd48b[_0x388009(0x15b)](_0x541db4=>[_0x541db4[_0x388009(0x148)],_0x541db4[_0x388009(0x134)]]));for(const _0x5ad9a7 of Object['values'](_0x266893['functions'])){_0x5ad9a7['alias']&&_0x5ad9a7['datasetCode']&&!_0x847861['has'](_0x5ad9a7[_0x388009(0x148)])&&_0x847861[_0x388009(0x16d)](_0x5ad9a7[_0x388009(0x148)],_0x5ad9a7['datasetCode']);}const _0x10d99f=await listDatasets(_0x1add7a),_0x4d0091=new Map(_0x10d99f[_0x388009(0x15b)](_0x458746=>[_0x458746['code'],_0x458746]));return{'aliasToDatasetCode':_0x847861,'datasetCodeToDataset':_0x4d0091};}async function uploadSingleFunction(_0x30d9b0,_0x588686,_0x124451,_0x39d08c){const _0x1a9360=a36_0x31fde4,_0x5eeff5=await readFile(_0x588686['filePath'],_0x1a9360(0x13a)),_0x5d1e6a=await computeFileHash(_0x588686['filePath']),_0x2d0af5=_0x124451[_0x1a9360(0x136)][_0x588686[_0x1a9360(0x130)]];if(_0x2d0af5?.[_0x1a9360(0x149)]&&_0x2d0af5[_0x1a9360(0x144)]==null)throw CliErrors[_0x1a9360(0x163)](_0x588686['lockKey']+_0x1a9360(0x154));let _0xcfad8b=extractScriptDescription(_0x5eeff5);if(!_0xcfad8b&&_0x2d0af5?.[_0x1a9360(0x149)]){const _0x72c017=await getBffScriptInfo(_0x2d0af5[_0x1a9360(0x149)]);_0xcfad8b=_0x72c017[_0x1a9360(0x173)]||undefined;}const _0x419020={'appCode':_0x30d9b0,'functionName':_0x588686[_0x1a9360(0x146)],'scriptType':_0x588686[_0x1a9360(0x14b)],'scriptContent':_0x5eeff5};if(_0x2d0af5?.['remoteId'])_0x419020['id']=_0x2d0af5[_0x1a9360(0x149)];if(_0x2d0af5?.[_0x1a9360(0x144)]!=null)_0x419020[_0x1a9360(0x144)]=_0x2d0af5['version'];if(_0xcfad8b)_0x419020['description']=_0xcfad8b;if(_0x588686['type']==='HOOK'){const _0x5c94aa=_0x588686[_0x1a9360(0x148)];if(!_0x5c94aa||!_0x588686[_0x1a9360(0x16a)]||!_0x588686['functionNode'])throw CliErrors['validation'](_0x1a9360(0x157)+_0x588686[_0x1a9360(0x130)]);const _0x3d4afb=_0x39d08c[_0x1a9360(0x164)][_0x1a9360(0x14c)](_0x5c94aa)??_0x2d0af5?.[_0x1a9360(0x134)]??_0x5c94aa,_0x28da80=_0x39d08c[_0x1a9360(0x178)][_0x1a9360(0x14c)](_0x3d4afb);if(!_0x28da80)throw CliErrors[_0x1a9360(0x163)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x5c94aa+_0x1a9360(0x14e)+(_0x1a9360(0x13d)+CLI_BIN_NAME+_0x1a9360(0x151)));_0x419020['datasetId']=_0x28da80['id'],_0x419020[_0x1a9360(0x16a)]=_0x588686[_0x1a9360(0x16a)],_0x419020['functionNode']=_0x588686[_0x1a9360(0x167)];}const _0xabe83f=await saveBffScript(_0x419020),_0x84e910=_0xabe83f['id'],_0x432059=_0xabe83f[_0x1a9360(0x141)]??await getBffScriptInfo(_0x84e910),_0x5d4666={'hash':_0x5d1e6a,'remoteId':_0x84e910,'version':_0x432059[_0x1a9360(0x144)]};if(_0x588686[_0x1a9360(0x14b)]===_0x1a9360(0x16c)){const _0x373382=_0x588686[_0x1a9360(0x148)],_0x54a21e=_0x39d08c[_0x1a9360(0x164)][_0x1a9360(0x14c)](_0x373382)??_0x2d0af5?.[_0x1a9360(0x134)]??_0x373382;_0x39d08c['aliasToDatasetCode'][_0x1a9360(0x15a)](_0x373382)?_0x5d4666[_0x1a9360(0x148)]=_0x373382:_0x5d4666[_0x1a9360(0x148)]=_0x2d0af5?.[_0x1a9360(0x148)],_0x5d4666[_0x1a9360(0x134)]=_0x54a21e,_0x5d4666[_0x1a9360(0x16a)]=_0x588686['operationType'],_0x5d4666[_0x1a9360(0x167)]=_0x588686['functionNode'];}_0x124451[_0x1a9360(0x136)][_0x588686['lockKey']]=_0x5d4666;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5e8abc,_0x31f0e3,_0x3aac14){const _0x4874e3=a36_0x31fde4;if(_0x3aac14['length']===0x0)return;for(let _0xb45e02=0x0;_0xb45e02<LOCK_SETTLE_RETRY_COUNT;_0xb45e02+=0x1){const _0x34e94c=await readBffLockFile(_0x5e8abc),_0x562f9b=_0x34e94c?.[_0x4874e3(0x13c)]?.[_0x31f0e3]?.[_0x4874e3(0x136)]??{},_0x34b368=_0x3aac14[_0x4874e3(0x16b)](_0x3f18e4=>!!_0x562f9b[_0x3f18e4]?.['remoteId']);if(_0x34b368)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4874e3(0x165)+_0x3aac14[_0x4874e3(0x179)](',\x20')+'.');}
1
+ const a36_0x11dafd=a36_0x5b7c;function a36_0x340b(){const _0x44255a=['\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','toISOString','get','9hXZFuq','force','COMMON','8312UeWQwT','aliasToDatasetCode','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','datasetCode','\x20skipped,\x20','Lock\x20scope\x20for\x20app\x20\x22','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','version','name','attempted','datasetId','Cannot\x20resolve\x20dataset\x20for\x20\x22','functionNode','functions','every','Runtime\x20script\x20cache\x20cleared.','filePath','Local\x20function\x20not\x20found:\x20','\x20uploaded,\x20','boolean','Push\x20only\x20this\x20script\x20type','set','map','lockKey','13104HNfwiE','validation','length','has','cleared','177774fJDSeu','Run\x20`','738663xSshyk','description',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','utf8','parse','join','appCode','hash','push','string','create','would_push','/api/management/library/scripts/save','Push\x20local\x20BFF\x20scripts\x20to\x20remote','apps','remoteId','some','lockFilePath','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','values','Force\x20push\x20ignoring\x20hash\x20protection','runtime\x20cache\x20not\x20needed','63aKoxqa','HOOK','scriptsRoot','message','294480psrrfu','774025bmjUGL','runtime\x20cache\x20clear\x20failed','Would\x20inspect\x20','1374360tWasHj','operationType','Push\x20complete:\x20','status','code','datasetCodeToDataset','type','bool'];a36_0x340b=function(){return _0x44255a;};return a36_0x340b();}(function(_0x490401,_0x4e98f0){const _0x331eb7=a36_0x5b7c,_0x2993a1=_0x490401();while(!![]){try{const _0x42c07f=parseInt(_0x331eb7(0x1bb))/0x1+parseInt(_0x331eb7(0x1a9))/0x2+parseInt(_0x331eb7(0x18f))/0x3+parseInt(_0x331eb7(0x188))/0x4+-parseInt(_0x331eb7(0x1aa))/0x5+parseInt(_0x331eb7(0x18d))/0x6*(-parseInt(_0x331eb7(0x1a5))/0x7)+-parseInt(_0x331eb7(0x1ad))/0x8*(-parseInt(_0x331eb7(0x1b8))/0x9);if(_0x42c07f===_0x4e98f0)break;else _0x2993a1['push'](_0x2993a1['shift']());}catch(_0x56f9e3){_0x2993a1['push'](_0x2993a1['shift']());}}}(a36_0x340b,0x25ef2));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';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_0x11dafd(0x197),'description':a36_0x11dafd(0x19c),'risk':'high-risk-write','flags':[{'name':a36_0x11dafd(0x1b3),'type':a36_0x11dafd(0x198),'description':a36_0x11dafd(0x184),'enum':[a36_0x11dafd(0x1ba),'ENDPOINT',a36_0x11dafd(0x1a6)]},{'name':a36_0x11dafd(0x1c4),'type':a36_0x11dafd(0x198),'description':a36_0x11dafd(0x1a1)},{'name':a36_0x11dafd(0x1b9),'type':a36_0x11dafd(0x183),'description':a36_0x11dafd(0x1a3)}],async 'dryRun'(_0x53ba16){const _0x11b083=a36_0x11dafd,_0x33c645=loadBffProjectConfig(_0x53ba16[_0x11b083(0x195)]),_0x40ece9=await readBffLockFile(_0x33c645['lockFilePath']),{appLock:_0x3ab123}=ensureLockScope(_0x40ece9??createEmptyBffLock(),_0x53ba16[_0x11b083(0x195)],_0x33c645[_0x11b083(0x1a7)],_0x11b083(0x197)),_0x5411bd=await getTargetFunctions(_0x33c645,_0x53ba16),_0x24d58=_0x53ba16[_0x11b083(0x1b4)](_0x11b083(0x1b9)),_0x5ada05=[];for(const _0x1e3a8b of _0x5411bd){const _0x48f8fb=await computeFileHash(_0x1e3a8b['filePath']),_0x53f2ea=_0x3ab123[_0x11b083(0x17d)][_0x1e3a8b[_0x11b083(0x187)]],_0x1db251=!!_0x53f2ea&&_0x53f2ea[_0x11b083(0x196)]===_0x48f8fb;_0x5ada05[_0x11b083(0x197)]({'lockKey':_0x1e3a8b[_0x11b083(0x187)],'filePath':_0x1e3a8b[_0x11b083(0x180)],'remoteId':_0x53f2ea?.[_0x11b083(0x19e)]??null,'mode':_0x53f2ea?.[_0x11b083(0x19e)]?'update':_0x11b083(0x199),'status':!_0x24d58&&_0x1db251?'unchanged':_0x11b083(0x19a)});}return{'method':'POST','url':_0x11b083(0x19b),'body':{'appCode':_0x53ba16[_0x11b083(0x195)],'force':_0x24d58,'files':_0x5ada05,'cacheClearAtRuntime':_0x5ada05['some'](_0x1dae05=>_0x1dae05[_0x11b083(0x1b0)]==='would_push'),'cacheClearAtRuntimeTimes':_0x5ada05['some'](_0x5a2127=>_0x5a2127[_0x11b083(0x1b0)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x11b083(0x1ac)+_0x5ada05['length']+_0x11b083(0x1bd)};},async 'execute'(_0x216172){const _0x5de229=a36_0x11dafd,_0x2e204d=loadBffProjectConfig(_0x216172[_0x5de229(0x195)]),_0xfad9e9=await readBffLockFile(_0x2e204d[_0x5de229(0x1a0)]),{lockData:_0xb4f82d,appLock:_0x108bed}=ensureLockScope(_0xfad9e9??createEmptyBffLock(),_0x216172[_0x5de229(0x195)],_0x2e204d[_0x5de229(0x1a7)],_0x5de229(0x197)),_0x3662f6=await getTargetFunctions(_0x2e204d,_0x216172);if(_0x3662f6[_0x5de229(0x18a)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x22fa79=_0x216172[_0x5de229(0x1b4)]('force'),_0x1a13ec=JSON[_0x5de229(0x193)](JSON['stringify'](_0xb4f82d)),_0x11d1ca=_0x1a13ec[_0x5de229(0x19d)][_0x216172[_0x5de229(0x195)]];if(!_0x11d1ca)throw new Error(_0x5de229(0x1c0)+_0x216172[_0x5de229(0x195)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x403618=await buildHookMaps(_0x216172[_0x5de229(0x195)],_0x216172['apiDir'],_0x3662f6,_0x11d1ca),_0x2e713c=[],_0x1f42bb=[],_0x304d9d=[];for(const _0x522ef9 of _0x3662f6){const _0xa7c061=await computeFileHash(_0x522ef9[_0x5de229(0x180)]),_0x2404a6=_0x11d1ca[_0x5de229(0x17d)][_0x522ef9['lockKey']];if(!_0x22fa79&&_0x2404a6&&_0x2404a6[_0x5de229(0x196)]===_0xa7c061){_0x1f42bb[_0x5de229(0x197)]({'lockKey':_0x522ef9['lockKey'],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x216172[_0x5de229(0x195)],_0x522ef9,_0x11d1ca,_0x403618);const _0x4bed0a=_0x11d1ca[_0x5de229(0x17d)][_0x522ef9[_0x5de229(0x187)]];_0x2e713c[_0x5de229(0x197)]({'lockKey':_0x522ef9[_0x5de229(0x187)],'remoteId':_0x4bed0a?.[_0x5de229(0x19e)]??0x0});}catch(_0x4b2cdb){_0x304d9d[_0x5de229(0x197)]({'lockKey':_0x522ef9[_0x5de229(0x187)],'error':_0x4b2cdb instanceof Error?_0x4b2cdb['message']:String(_0x4b2cdb)});}}_0x11d1ca['lastSync']=new Date()[_0x5de229(0x1b6)](),await writeBffLockFile(_0x2e204d[_0x5de229(0x1a0)],_0x1a13ec),await waitForUploadedLockEntries(_0x2e204d[_0x5de229(0x1a0)],_0x216172['appCode'],_0x2e713c['map'](_0x24ce7f=>_0x24ce7f['lockKey']));let _0x660f3a={'attempted':![],'cleared':![]};if(_0x2e713c['length']>0x0)try{let _0xc05ea8='';for(let _0x4bc848=0x0;_0x4bc848<CACHE_CLEAR_ATTEMPTS;_0x4bc848+=0x1){_0xc05ea8=await clearBffScriptCache(),_0x4bc848<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x660f3a={'attempted':!![],'cleared':!![],'message':_0xc05ea8||_0x5de229(0x17f)};}catch(_0x5ba9b3){_0x660f3a={'attempted':!![],'cleared':![],'error':_0x5ba9b3 instanceof Error?_0x5ba9b3[_0x5de229(0x1a8)]:String(_0x5ba9b3)};}const _0x2d5a66=_0x304d9d['length']===0x0&&(_0x660f3a[_0x5de229(0x1c5)]?_0x660f3a[_0x5de229(0x18c)]:!![]),_0x15bb09=_0x660f3a[_0x5de229(0x1c5)]?_0x660f3a[_0x5de229(0x18c)]?'runtime\x20cache\x20cleared':_0x5de229(0x1ab):_0x5de229(0x1a4);return{'ok':_0x2d5a66,'data':{'uploaded':_0x2e713c,'skipped':_0x1f42bb,'failed':_0x304d9d,'cacheClear':_0x660f3a},'message':_0x5de229(0x1af)+_0x2e713c[_0x5de229(0x18a)]+_0x5de229(0x182)+_0x1f42bb[_0x5de229(0x18a)]+_0x5de229(0x1bf)+_0x304d9d[_0x5de229(0x18a)]+'\x20failed,\x20'+_0x15bb09};}};async function getTargetFunctions(_0x237faf,_0x4ed7d4){const _0x5c10b6=a36_0x11dafd,_0x2b330b=_0x4ed7d4['str']('type'),_0x2ffca6=_0x4ed7d4['str']('name'),_0x47fce0=normalizeBffType(_0x2b330b)??undefined;if(_0x2ffca6&&!_0x47fce0)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x27ab48=await scanLocalBffFunctions(_0x237faf,_0x47fce0);if(_0x2ffca6){const _0x525210=_0x27ab48['filter'](_0x1030ec=>_0x1030ec[_0x5c10b6(0x1c4)]===_0x2ffca6);if(_0x525210[_0x5c10b6(0x18a)]===0x0)throw CliErrors[_0x5c10b6(0x189)](_0x5c10b6(0x181)+_0x47fce0+'/'+_0x2ffca6);return _0x525210;}return _0x27ab48;}function a36_0x5b7c(_0x4aec88,_0x1a2d47){_0x4aec88=_0x4aec88-0x17c;const _0x340b3f=a36_0x340b();let _0x5b7ccb=_0x340b3f[_0x4aec88];return _0x5b7ccb;}async function buildHookMaps(_0x1ce1b6,_0x2846b9,_0x2c7a4a,_0x5c242f){const _0x1d208f=a36_0x11dafd,_0x50e06b=_0x2c7a4a[_0x1d208f(0x19f)](_0x2882f6=>_0x2882f6[_0x1d208f(0x1b3)]===_0x1d208f(0x1a6));if(!_0x50e06b)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x942edd=loadAliasMap(_0x2846b9,undefined,resolveApiFilePath(_0x2846b9,_0x1ce1b6)),_0x351223=new Map(_0x942edd[_0x1d208f(0x186)](_0x512f00=>[_0x512f00[_0x1d208f(0x1c1)],_0x512f00[_0x1d208f(0x1be)]]));for(const _0x1611dd of Object[_0x1d208f(0x1a2)](_0x5c242f['functions'])){_0x1611dd[_0x1d208f(0x1c1)]&&_0x1611dd[_0x1d208f(0x1be)]&&!_0x351223[_0x1d208f(0x18b)](_0x1611dd[_0x1d208f(0x1c1)])&&_0x351223[_0x1d208f(0x185)](_0x1611dd[_0x1d208f(0x1c1)],_0x1611dd['datasetCode']);}const _0x197223=await listDatasets(_0x1ce1b6),_0x87605c=new Map(_0x197223[_0x1d208f(0x186)](_0x2b95a8=>[_0x2b95a8[_0x1d208f(0x1b1)],_0x2b95a8]));return{'aliasToDatasetCode':_0x351223,'datasetCodeToDataset':_0x87605c};}async function uploadSingleFunction(_0x5c826a,_0x105b9,_0x413812,_0x5b797c){const _0x33559c=a36_0x11dafd,_0x448d41=await readFile(_0x105b9['filePath'],_0x33559c(0x192)),_0xfbef63=await computeFileHash(_0x105b9[_0x33559c(0x180)]),_0x1af37f=_0x413812[_0x33559c(0x17d)][_0x105b9['lockKey']];if(_0x1af37f?.['remoteId']&&_0x1af37f[_0x33559c(0x1c3)]==null)throw CliErrors[_0x33559c(0x189)](_0x105b9[_0x33559c(0x187)]+_0x33559c(0x191));let _0x3b0b32=extractScriptDescription(_0x448d41);if(!_0x3b0b32&&_0x1af37f?.[_0x33559c(0x19e)]){const _0x1874dd=await getBffScriptInfo(_0x1af37f[_0x33559c(0x19e)]);_0x3b0b32=_0x1874dd[_0x33559c(0x190)]||undefined;}const _0x3663b1={'appCode':_0x5c826a,'functionName':_0x105b9[_0x33559c(0x1c4)],'scriptType':_0x105b9['type'],'scriptContent':_0x448d41};if(_0x1af37f?.[_0x33559c(0x19e)])_0x3663b1['id']=_0x1af37f[_0x33559c(0x19e)];if(_0x1af37f?.[_0x33559c(0x1c3)]!=null)_0x3663b1[_0x33559c(0x1c3)]=_0x1af37f[_0x33559c(0x1c3)];if(_0x3b0b32)_0x3663b1[_0x33559c(0x190)]=_0x3b0b32;if(_0x105b9['type']===_0x33559c(0x1a6)){const _0x371375=_0x105b9[_0x33559c(0x1c1)];if(!_0x371375||!_0x105b9[_0x33559c(0x1ae)]||!_0x105b9['functionNode'])throw CliErrors[_0x33559c(0x189)]('Incomplete\x20HOOK\x20path:\x20'+_0x105b9[_0x33559c(0x187)]);const _0x31909c=_0x5b797c[_0x33559c(0x1bc)][_0x33559c(0x1b7)](_0x371375)??_0x1af37f?.[_0x33559c(0x1be)]??_0x371375,_0x56a2e8=_0x5b797c[_0x33559c(0x1b2)][_0x33559c(0x1b7)](_0x31909c);if(!_0x56a2e8)throw CliErrors[_0x33559c(0x189)](_0x33559c(0x1c7)+_0x371375+'\x22.\x20'+(_0x33559c(0x18e)+CLI_BIN_NAME+_0x33559c(0x1b5)));_0x3663b1[_0x33559c(0x1c6)]=_0x56a2e8['id'],_0x3663b1[_0x33559c(0x1ae)]=_0x105b9['operationType'],_0x3663b1[_0x33559c(0x17c)]=_0x105b9[_0x33559c(0x17c)];}const _0x453c44=await saveBffScript(_0x3663b1),_0x125c12=_0x453c44['id'],_0x397dd0=_0x453c44['script']??await getBffScriptInfo(_0x125c12),_0x382fc3={'hash':_0xfbef63,'remoteId':_0x125c12,'version':_0x397dd0[_0x33559c(0x1c3)]};if(_0x105b9[_0x33559c(0x1b3)]===_0x33559c(0x1a6)){const _0x578805=_0x105b9[_0x33559c(0x1c1)],_0x51471a=_0x5b797c['aliasToDatasetCode'][_0x33559c(0x1b7)](_0x578805)??_0x1af37f?.[_0x33559c(0x1be)]??_0x578805;_0x5b797c['aliasToDatasetCode'][_0x33559c(0x18b)](_0x578805)?_0x382fc3[_0x33559c(0x1c1)]=_0x578805:_0x382fc3[_0x33559c(0x1c1)]=_0x1af37f?.['alias'],_0x382fc3['datasetCode']=_0x51471a,_0x382fc3[_0x33559c(0x1ae)]=_0x105b9[_0x33559c(0x1ae)],_0x382fc3['functionNode']=_0x105b9[_0x33559c(0x17c)];}_0x413812[_0x33559c(0x17d)][_0x105b9[_0x33559c(0x187)]]=_0x382fc3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x13010c,_0x2edb79,_0x2cc611){const _0x5a7fe6=a36_0x11dafd;if(_0x2cc611[_0x5a7fe6(0x18a)]===0x0)return;for(let _0x2c61fd=0x0;_0x2c61fd<LOCK_SETTLE_RETRY_COUNT;_0x2c61fd+=0x1){const _0x50fede=await readBffLockFile(_0x13010c),_0x184b13=_0x50fede?.[_0x5a7fe6(0x19d)]?.[_0x2edb79]?.[_0x5a7fe6(0x17d)]??{},_0x3039b1=_0x2cc611[_0x5a7fe6(0x17e)](_0x406d4d=>!!_0x184b13[_0x406d4d]?.[_0x5a7fe6(0x19e)]);if(_0x3039b1)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5a7fe6(0x1c2)+_0x2cc611[_0x5a7fe6(0x194)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a37_0x13b8(_0x311bb4,_0x44fa69){_0x311bb4=_0x311bb4-0x80;const _0x5c5fc7=a37_0x5c5f();let _0x13b879=_0x5c5fc7[_0x311bb4];return _0x13b879;}const a37_0x223f59=a37_0x13b8;(function(_0x4ae913,_0x5f3a56){const _0x5dbab2=a37_0x13b8,_0x48834b=_0x4ae913();while(!![]){try{const _0x2434de=parseInt(_0x5dbab2(0x80))/0x1+-parseInt(_0x5dbab2(0x90))/0x2+-parseInt(_0x5dbab2(0x98))/0x3*(parseInt(_0x5dbab2(0x9c))/0x4)+parseInt(_0x5dbab2(0x9d))/0x5*(-parseInt(_0x5dbab2(0x8e))/0x6)+parseInt(_0x5dbab2(0x91))/0x7+parseInt(_0x5dbab2(0x9b))/0x8+parseInt(_0x5dbab2(0x85))/0x9;if(_0x2434de===_0x5f3a56)break;else _0x48834b['push'](_0x48834b['shift']());}catch(_0xd7f459){_0x48834b['push'](_0x48834b['shift']());}}}(a37_0x5c5f,0x91780));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a37_0x5c5f(){const _0x270f45=['86264ncSOIv','5WBZqRo','push','31325qvdVxa','bff','alias','remote','boolean','16226307wczrkd','functions','\x20added,\x20','\x20remote-only','\x20unchanged','map','hash','bool','lockFilePath','7119786PmmJZC','lockKey','894560KDtKpT','3168011jObVwT','has','length','scriptsRoot','apiDir','appCode','all','54UJkaAP','All\x20BFF\x20scripts\x20are\x20in\x20sync.','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','2648944lQokKE'];a37_0x5c5f=function(){return _0x270f45;};return a37_0x5c5f();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0x223f59(0x81),'command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':a37_0x223f59(0x84),'description':a37_0x223f59(0x9a)}],async 'execute'(_0xdfad0d){const _0x25d933=a37_0x223f59,_0x48cebf=loadBffProjectConfig(_0xdfad0d[_0x25d933(0x96)]),_0x790f42=await readBffLockFile(_0x48cebf[_0x25d933(0x8d)]),{appLock:_0x5d9189}=ensureLockScope(_0x790f42??createEmptyBffLock(),_0xdfad0d[_0x25d933(0x96)],_0x48cebf[_0x25d933(0x94)],'status'),_0x1f0c6f=await scanLocalBffFunctions(_0x48cebf),_0x411608=[],_0x1e47c8=[],_0x406f3c=[];for(const _0x104e2c of _0x1f0c6f){const _0x25df79=await computeFileHash(_0x104e2c['filePath']),_0x556019=_0x5d9189['functions'][_0x104e2c[_0x25d933(0x8f)]];if(!_0x556019)_0x411608[_0x25d933(0x9e)](_0x104e2c[_0x25d933(0x8f)]);else _0x556019[_0x25d933(0x8b)]!==_0x25df79?_0x1e47c8[_0x25d933(0x9e)](_0x104e2c[_0x25d933(0x8f)]):_0x406f3c[_0x25d933(0x9e)](_0x104e2c['lockKey']);}const _0x3f9011=[];if(_0xdfad0d[_0x25d933(0x8c)](_0x25d933(0x83))){const _0x494985=loadAliasMap(_0xdfad0d[_0x25d933(0x95)],undefined,resolveApiFilePath(_0xdfad0d['apiDir'],_0xdfad0d[_0x25d933(0x96)])),_0x55f2ce=new Map(_0x494985[_0x25d933(0x8a)](_0x533da2=>[_0x533da2['datasetCode'],_0x533da2[_0x25d933(0x82)]])),[_0x4fb128,_0x599fa4]=await Promise[_0x25d933(0x97)]([listBffScripts(_0xdfad0d['appCode']),getBffScriptStatistics(_0xdfad0d['appCode'])]),_0x3f63e4=createHookLocationMap(_0x599fa4),_0x365715=new Set(_0x1f0c6f[_0x25d933(0x8a)](_0x41171d=>_0x41171d[_0x25d933(0x8f)]));for(const _0x51a297 of _0x4fb128){const _0x97c58=resolveRemoteScriptTarget(_0x48cebf,_0x51a297,_0x3f63e4,_0x5d9189[_0x25d933(0x86)],_0x55f2ce);_0x97c58&&!_0x365715[_0x25d933(0x92)](_0x97c58[_0x25d933(0x8f)])&&_0x3f9011['push'](_0x97c58['lockKey']);}}const _0x2e50c2=_0x411608[_0x25d933(0x93)]===0x0&&_0x1e47c8[_0x25d933(0x93)]===0x0&&_0x3f9011[_0x25d933(0x93)]===0x0;return{'ok':!![],'data':{'added':_0x411608,'modified':_0x1e47c8,'unchanged':_0x406f3c,'remoteOnly':_0x3f9011},'message':_0x2e50c2?_0x25d933(0x99):_0x411608[_0x25d933(0x93)]+_0x25d933(0x87)+_0x1e47c8[_0x25d933(0x93)]+'\x20modified,\x20'+_0x406f3c[_0x25d933(0x93)]+_0x25d933(0x89)+(_0x3f9011['length']>0x0?',\x20'+_0x3f9011[_0x25d933(0x93)]+_0x25d933(0x88):'')};}};
1
+ const a37_0x2b40d7=a37_0x125b;function a37_0x125b(_0x36b6a2,_0x52e1eb){_0x36b6a2=_0x36b6a2-0x86;const _0x4603cc=a37_0x4603();let _0x125ba5=_0x4603cc[_0x36b6a2];return _0x125ba5;}(function(_0x50c4d0,_0x468a19){const _0x22fe17=a37_0x125b,_0x3e2557=_0x50c4d0();while(!![]){try{const _0x164670=-parseInt(_0x22fe17(0x86))/0x1*(parseInt(_0x22fe17(0x90))/0x2)+parseInt(_0x22fe17(0x8f))/0x3*(parseInt(_0x22fe17(0x98))/0x4)+parseInt(_0x22fe17(0x92))/0x5*(parseInt(_0x22fe17(0xa3))/0x6)+parseInt(_0x22fe17(0x8e))/0x7+parseInt(_0x22fe17(0x8b))/0x8*(parseInt(_0x22fe17(0x8d))/0x9)+parseInt(_0x22fe17(0x8c))/0xa+-parseInt(_0x22fe17(0xa1))/0xb;if(_0x164670===_0x468a19)break;else _0x3e2557['push'](_0x3e2557['shift']());}catch(_0x1c13e8){_0x3e2557['push'](_0x3e2557['shift']());}}}(a37_0x4603,0x24dda));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';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x4603(){const _0x137cc6=['hash','remote','\x20modified,\x20','alias','6136fUMxiQ','2528980YfQuYY','738AoQFKm','1447691DCyshr','51wpcBFp','2QQLIuY','functions','579295xsfQNA','push','length','lockKey','filePath','all','28788upIBCC','bool','bff','\x20unchanged','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','has','map','apiDir','lockFilePath','5749645TUHxBi','appCode','12OMQnnS','datasetCode','202975tueOsF'];a37_0x4603=function(){return _0x137cc6;};return a37_0x4603();}export const bffStatus={'service':a37_0x2b40d7(0x9a),'command':'status','description':a37_0x2b40d7(0x9c),'risk':'read','flags':[{'name':a37_0x2b40d7(0x88),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x39fcfa){const _0x74c4ce=a37_0x2b40d7,_0x28cffd=loadBffProjectConfig(_0x39fcfa['appCode']),_0x10b116=await readBffLockFile(_0x28cffd[_0x74c4ce(0xa0)]),{appLock:_0x1aad6f}=ensureLockScope(_0x10b116??createEmptyBffLock(),_0x39fcfa[_0x74c4ce(0xa2)],_0x28cffd['scriptsRoot'],'status'),_0x145afa=await scanLocalBffFunctions(_0x28cffd),_0x338dea=[],_0x2f2432=[],_0x50d780=[];for(const _0x33fe35 of _0x145afa){const _0x5e8e7d=await computeFileHash(_0x33fe35[_0x74c4ce(0x96)]),_0x47a92b=_0x1aad6f[_0x74c4ce(0x91)][_0x33fe35[_0x74c4ce(0x95)]];if(!_0x47a92b)_0x338dea[_0x74c4ce(0x93)](_0x33fe35[_0x74c4ce(0x95)]);else _0x47a92b[_0x74c4ce(0x87)]!==_0x5e8e7d?_0x2f2432['push'](_0x33fe35[_0x74c4ce(0x95)]):_0x50d780[_0x74c4ce(0x93)](_0x33fe35[_0x74c4ce(0x95)]);}const _0x153012=[];if(_0x39fcfa[_0x74c4ce(0x99)](_0x74c4ce(0x88))){const _0xef910=loadAliasMap(_0x39fcfa[_0x74c4ce(0x9f)],undefined,resolveApiFilePath(_0x39fcfa[_0x74c4ce(0x9f)],_0x39fcfa['appCode'])),_0x3af12e=new Map(_0xef910[_0x74c4ce(0x9e)](_0x5ac298=>[_0x5ac298[_0x74c4ce(0xa4)],_0x5ac298[_0x74c4ce(0x8a)]])),[_0x11ba91,_0x1a4cc1]=await Promise[_0x74c4ce(0x97)]([listBffScripts(_0x39fcfa[_0x74c4ce(0xa2)]),getBffScriptStatistics(_0x39fcfa[_0x74c4ce(0xa2)])]),_0x2d75cf=createHookLocationMap(_0x1a4cc1),_0x49b3b4=new Set(_0x145afa['map'](_0x4c5d57=>_0x4c5d57['lockKey']));for(const _0x37db92 of _0x11ba91){const _0x19b514=resolveRemoteScriptTarget(_0x28cffd,_0x37db92,_0x2d75cf,_0x1aad6f['functions'],_0x3af12e);_0x19b514&&!_0x49b3b4[_0x74c4ce(0x9d)](_0x19b514[_0x74c4ce(0x95)])&&_0x153012[_0x74c4ce(0x93)](_0x19b514[_0x74c4ce(0x95)]);}}const _0x163324=_0x338dea['length']===0x0&&_0x2f2432['length']===0x0&&_0x153012[_0x74c4ce(0x94)]===0x0;return{'ok':!![],'data':{'added':_0x338dea,'modified':_0x2f2432,'unchanged':_0x50d780,'remoteOnly':_0x153012},'message':_0x163324?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x338dea['length']+'\x20added,\x20'+_0x2f2432[_0x74c4ce(0x94)]+_0x74c4ce(0x89)+_0x50d780[_0x74c4ce(0x94)]+_0x74c4ce(0x9b)+(_0x153012[_0x74c4ce(0x94)]>0x0?',\x20'+_0x153012[_0x74c4ce(0x94)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a38_0x5109c6=a38_0x5834;(function(_0x40e875,_0x77405){const _0x199006=a38_0x5834,_0x2a3c08=_0x40e875();while(!![]){try{const _0x1cc930=-parseInt(_0x199006(0x1a0))/0x1+-parseInt(_0x199006(0x1af))/0x2*(-parseInt(_0x199006(0x1aa))/0x3)+-parseInt(_0x199006(0x1b0))/0x4+parseInt(_0x199006(0x19a))/0x5*(-parseInt(_0x199006(0x199))/0x6)+-parseInt(_0x199006(0x1b5))/0x7*(parseInt(_0x199006(0x1a9))/0x8)+parseInt(_0x199006(0x196))/0x9+parseInt(_0x199006(0x1b1))/0xa*(parseInt(_0x199006(0x1b2))/0xb);if(_0x1cc930===_0x77405)break;else _0x2a3c08['push'](_0x2a3c08['shift']());}catch(_0x438eaf){_0x2a3c08['push'](_0x2a3c08['shift']());}}}(a38_0x3156,0x9b080));function a38_0x5834(_0x17e769,_0x110104){_0x17e769=_0x17e769-0x196;const _0x3156ba=a38_0x3156();let _0x58341a=_0x3156ba[_0x17e769];return _0x58341a;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x3156(){const _0x3bc92b=['Built-in\x20Skill\x20install\x20failed\x20[','6IPGliu','6277875rwNqSF','code','pipe','changed','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','CLI\x20Built-in\x20Skill\x20','790020fNfAjN','installedPath','log','\x20at\x20','setLogPath','skillVersion','nonInteractive','unknown',']:\x20','8ONCZsP','3fmfTaG','\x20installed','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','996964QSaydG','2170352rNRUqQ','11839450MBBuCd','22AXzeFC','apiError','cli-skill-install','4301976zKhEGR','8742483EJsmZq','inherit'];a38_0x3156=function(){return _0x3bc92b;};return a38_0x3156();}export const cliSkillDefinitions=[{'service':'cli-skill','command':a38_0x5109c6(0x1ad),'description':a38_0x5109c6(0x1ae),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2e4f25){const _0x216b81=a38_0x5109c6;logger[_0x216b81(0x1a4)](process['cwd']()),logger['info'](_0x216b81(0x1b4),_0x216b81(0x1ac));const _0x2ec630=installBuiltinSkill({'stdio':_0x2e4f25[_0x216b81(0x1a6)]?_0x216b81(0x19c):_0x216b81(0x197)});if(!_0x2ec630['ok'])throw CliErrors[_0x216b81(0x1b3)](_0x216b81(0x198)+_0x2ec630[_0x216b81(0x19b)]+_0x216b81(0x1a8)+(_0x2ec630['error']||_0x216b81(0x1a7)),_0x216b81(0x19e)+_0x2ec630['repairCommand']);return console[_0x216b81(0x1a2)](_0x2ec630[_0x216b81(0x19d)]?'CLI\x20Built-in\x20Skill\x20'+_0x2ec630[_0x216b81(0x1a5)]+_0x216b81(0x1ab)+(_0x2ec630[_0x216b81(0x1a1)]?_0x216b81(0x1a3)+_0x2ec630[_0x216b81(0x1a1)]:'\x20via\x20skills@latest'):_0x216b81(0x19f)+_0x2ec630[_0x216b81(0x1a5)]+'\x20is\x20already\x20current'+(_0x2ec630[_0x216b81(0x1a1)]?'\x20at\x20'+_0x2ec630[_0x216b81(0x1a1)]:'')),{'ok':!![]};}}];
1
+ const a38_0x827ad3=a38_0x39ee;(function(_0x3895f2,_0x27e2ad){const _0x4bd275=a38_0x39ee,_0x4ff0fb=_0x3895f2();while(!![]){try{const _0x57c8d1=-parseInt(_0x4bd275(0x1d3))/0x1*(parseInt(_0x4bd275(0x1c1))/0x2)+parseInt(_0x4bd275(0x1c6))/0x3*(-parseInt(_0x4bd275(0x1db))/0x4)+parseInt(_0x4bd275(0x1c3))/0x5*(parseInt(_0x4bd275(0x1c4))/0x6)+-parseInt(_0x4bd275(0x1cd))/0x7+parseInt(_0x4bd275(0x1ce))/0x8+-parseInt(_0x4bd275(0x1c2))/0x9+parseInt(_0x4bd275(0x1d8))/0xa*(parseInt(_0x4bd275(0x1d7))/0xb);if(_0x57c8d1===_0x27e2ad)break;else _0x4ff0fb['push'](_0x4ff0fb['shift']());}catch(_0x160a8b){_0x4ff0fb['push'](_0x4ff0fb['shift']());}}}(a38_0x21f8,0x9c8e9));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x21f8(){const _0x2179e6=['unknown','15ZvyFBZ','installedPath','install','cli-skill','repairCommand','\x20is\x20already\x20current','Built-in\x20Skill\x20install\x20failed\x20[','6098764bItWid','3850152Qkknym','skillVersion',']:\x20','\x20installed','cli-skill-install','17tSUaOC','inherit','error','info','396STQEuu','219410XGnxak','changed','cwd','534176GmeXLk','CLI\x20Built-in\x20Skill\x20','nonInteractive','code','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','9774bFMVyb','1562112ujAGDt','832665QIcIwv','42IXgtsm'];a38_0x21f8=function(){return _0x2179e6;};return a38_0x21f8();}function a38_0x39ee(_0x243ca5,_0x2769a6){_0x243ca5=_0x243ca5-0x1bf;const _0x21f82f=a38_0x21f8();let _0x39eef7=_0x21f82f[_0x243ca5];return _0x39eef7;}export const cliSkillDefinitions=[{'service':a38_0x827ad3(0x1c9),'command':a38_0x827ad3(0x1c8),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1c9e5b){const _0x289a41=a38_0x827ad3;logger['setLogPath'](process[_0x289a41(0x1da)]()),logger[_0x289a41(0x1d6)](_0x289a41(0x1d2),_0x289a41(0x1c0));const _0x549a47=installBuiltinSkill({'stdio':_0x1c9e5b[_0x289a41(0x1dd)]?'pipe':_0x289a41(0x1d4)});if(!_0x549a47['ok'])throw CliErrors['apiError'](_0x289a41(0x1cc)+_0x549a47[_0x289a41(0x1bf)]+_0x289a41(0x1d0)+(_0x549a47[_0x289a41(0x1d5)]||_0x289a41(0x1c5)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x549a47[_0x289a41(0x1ca)]);return console['log'](_0x549a47[_0x289a41(0x1d9)]?_0x289a41(0x1dc)+_0x549a47[_0x289a41(0x1cf)]+_0x289a41(0x1d1)+(_0x549a47[_0x289a41(0x1c7)]?'\x20at\x20'+_0x549a47['installedPath']:'\x20via\x20skills@latest'):'CLI\x20Built-in\x20Skill\x20'+_0x549a47[_0x289a41(0x1cf)]+_0x289a41(0x1cb)+(_0x549a47[_0x289a41(0x1c7)]?'\x20at\x20'+_0x549a47[_0x289a41(0x1c7)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x3a9aaf=a39_0x5e17;(function(_0xf3126b,_0x440898){const _0x2da3ad=a39_0x5e17,_0xd0cf66=_0xf3126b();while(!![]){try{const _0x4d1c93=-parseInt(_0x2da3ad(0x181))/0x1*(-parseInt(_0x2da3ad(0x19d))/0x2)+-parseInt(_0x2da3ad(0x199))/0x3*(-parseInt(_0x2da3ad(0x1a6))/0x4)+-parseInt(_0x2da3ad(0x174))/0x5*(-parseInt(_0x2da3ad(0x1a8))/0x6)+parseInt(_0x2da3ad(0x196))/0x7*(parseInt(_0x2da3ad(0x16e))/0x8)+parseInt(_0x2da3ad(0x169))/0x9*(parseInt(_0x2da3ad(0x162))/0xa)+-parseInt(_0x2da3ad(0x183))/0xb+-parseInt(_0x2da3ad(0x1a5))/0xc;if(_0x4d1c93===_0x440898)break;else _0xd0cf66['push'](_0xd0cf66['shift']());}catch(_0x21aed9){_0xd0cf66['push'](_0xd0cf66['shift']());}}}(a39_0x4c25,0xeec7e));import a39_0x4fbdf4 from'chalk';function a39_0x4c25(){const _0x4d0077=['beta','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','includes','Updating\x20via\x20','gray','yellow','string','npm','entries','10gktduG','Update\x20available:\x20','code','execPath','current','json','fail','12221217LSiTik','validation','expected\x20','length','warn','816CudDZl','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','...',',\x20state\x20','Current\x20version:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','10ZukoeE','Checking\x20CLI\x20Built-in\x20Skill...',',\x20found\x20','bun','Already\x20up\x20to\x20date\x20(v','state','Install\x20a\x20specific\x20CLI\x20version',']:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Beta\x20version:\x20','@latest','pipe','source','4EmWGbR','bool','6739370QhBKvF','trim','read','\x20is\x20up\x20to\x20date.','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','object','succeed','fromEntries','\x20cli-skill\x20install','latest','info','Version\x20comparison\x20failed','Invalid\x20version:\x20','Update\x20failed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','skillVersion','version','\x20\x20CLI\x20Built-in\x20Skill\x20','green','38087ZYuckv','Requested\x20version:\x20','\x20install\x20-g\x20','1909641jMNslo','unknown','install','update','884346rMoLEa','/dist-tags','repairCommand','Checking\x20for\x20updates...','valid','filter','\x20→\x20','log','48160548ysdIcN','8fKnuvs','Already\x20on\x20requested\x20version\x20(v','1948242zsCNZF','\x20\x20Try\x20manually:\x20','message','boolean','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','error'];a39_0x4c25=function(){return _0x4d0077;};return a39_0x4c25();}import a39_0xd8319d from'ora';import a39_0x1b318b from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';function a39_0x5e17(_0x4c3a2b,_0x8800d0){_0x4c3a2b=_0x4c3a2b-0x15d;const _0x4c253e=a39_0x4c25();let _0x5e17be=_0x4c253e[_0x4c3a2b];return _0x5e17be;}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1eecff=a39_0x5e17,_0x13d968=process[_0x1eecff(0x165)]['toLowerCase']();if(_0x13d968[_0x1eecff(0x1b0)](_0x1eecff(0x177)))return _0x1eecff(0x177);return'npm';}const updateFlags=[{'name':a39_0x3a9aaf(0x1ae),'type':a39_0x3a9aaf(0x1ab),'description':a39_0x3a9aaf(0x1af),'default':![]},{'name':a39_0x3a9aaf(0x193),'type':a39_0x3a9aaf(0x15f),'description':a39_0x3a9aaf(0x17a)}];function getRequestedVersion(_0x370fc9){const _0x5e2ce3=a39_0x3a9aaf;return _0x370fc9['str'](_0x5e2ce3(0x193))[_0x5e2ce3(0x184)]();}async function validateUpdateFlags(_0xb6dcf7){const _0x5f1527=a39_0x3a9aaf,_0x231430=_0xb6dcf7['bool'](_0x5f1527(0x1ae)),_0x4a594b=getRequestedVersion(_0xb6dcf7);if(_0x231430&&_0x4a594b)throw CliErrors[_0x5f1527(0x16a)](_0x5f1527(0x1ac),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4a594b&&!a39_0x1b318b[_0x5f1527(0x1a1)](_0x4a594b))throw CliErrors[_0x5f1527(0x16a)](_0x5f1527(0x18f)+_0x4a594b,_0x5f1527(0x191));}async function fetchNpmDistTags(){const _0x4e55a8=a39_0x3a9aaf;try{const _0xab7b61=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4e55a8(0x19e),{'signal':AbortSignal['timeout'](0x2710)});if(!_0xab7b61['ok'])return null;const _0x40e710=await _0xab7b61[_0x4e55a8(0x167)]();if(!_0x40e710||typeof _0x40e710!==_0x4e55a8(0x188))return null;return Object[_0x4e55a8(0x18a)](Object[_0x4e55a8(0x161)](_0x40e710)[_0x4e55a8(0x1a2)](([,_0x31b953])=>typeof _0x31b953===_0x4e55a8(0x15f)&&_0x31b953['trim']()[_0x4e55a8(0x16c)]>0x0)['map'](([_0x1c1eb1,_0xa386e2])=>[_0x1c1eb1,String(_0xa386e2)[_0x4e55a8(0x184)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x187e1a){const _0x66d178=await fetchNpmDistTags();return _0x66d178?.[_0x187e1a]??null;}async function fetchLatestVersion(){const _0x2e451f=a39_0x3a9aaf;return fetchNpmDistTagVersion(_0x2e451f(0x18c));}async function resolveTargetVersion(_0x3eab94){const _0x25f5fb=a39_0x3a9aaf,_0x430bcf=getRequestedVersion(_0x3eab94);if(_0x430bcf)return{'version':_0x430bcf,'source':'version'};if(_0x3eab94[_0x25f5fb(0x182)](_0x25f5fb(0x1ae))){const _0x384ecf=await fetchNpmDistTagVersion(_0x25f5fb(0x1ae));if(!_0x384ecf)return null;return{'version':_0x384ecf,'source':_0x25f5fb(0x1ae)};}const _0x29cfca=await fetchLatestVersion();if(!_0x29cfca)return null;return{'version':_0x29cfca,'source':_0x25f5fb(0x18c)};}function shouldInstallTarget(_0x400c7e,_0x206862){const _0x18ebe8=a39_0x3a9aaf;if(_0x206862[_0x18ebe8(0x180)]===_0x18ebe8(0x193)||_0x206862[_0x18ebe8(0x180)]===_0x18ebe8(0x1ae))return!a39_0x1b318b['eq'](_0x400c7e,_0x206862[_0x18ebe8(0x193)]);return a39_0x1b318b['lt'](_0x400c7e,_0x206862[_0x18ebe8(0x193)]);}function getInstallPlanLabel(_0x3776c0,_0x1d96a3){const _0x5edbd6=a39_0x3a9aaf;switch(_0x1d96a3['source']){case'beta':return _0x5edbd6(0x17d)+a39_0x4fbdf4['yellow'](_0x3776c0)+'\x20→\x20'+a39_0x4fbdf4[_0x5edbd6(0x195)](_0x1d96a3[_0x5edbd6(0x193)]);case _0x5edbd6(0x193):return _0x5edbd6(0x197)+a39_0x4fbdf4[_0x5edbd6(0x15e)](_0x3776c0)+_0x5edbd6(0x1a3)+a39_0x4fbdf4[_0x5edbd6(0x195)](_0x1d96a3[_0x5edbd6(0x193)]);case'latest':default:return _0x5edbd6(0x163)+a39_0x4fbdf4[_0x5edbd6(0x15e)](_0x3776c0)+_0x5edbd6(0x1a3)+a39_0x4fbdf4[_0x5edbd6(0x195)](_0x1d96a3['version']);}}function repairCurrentBuiltinSkill(){const _0x2c2abc=a39_0x3a9aaf;console['log'](a39_0x4fbdf4[_0x2c2abc(0x15d)](_0x2c2abc(0x175)));const _0x2710f0=installBuiltinSkill();if(_0x2710f0['ok'])return console[_0x2c2abc(0x1a4)](a39_0x4fbdf4['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x2710f0['skillVersion']+_0x2c2abc(0x186))),!![];return console['warn'](a39_0x4fbdf4[_0x2c2abc(0x15e)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x2710f0[_0x2c2abc(0x164)]+_0x2c2abc(0x17b)+(_0x2710f0['error']||_0x2c2abc(0x19a)))),console['log'](a39_0x4fbdf4[_0x2c2abc(0x15d)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x2c2abc(0x18b))),![];}function verifyUpdatedBuiltinSkill(_0x25e141){const _0xf76aab=a39_0x3a9aaf,_0xe4b171=inspectInstalledBuiltinSkillVersion(_0x25e141);if(_0xe4b171[_0xf76aab(0x179)]===_0xf76aab(0x166))return console[_0xf76aab(0x1a4)](a39_0x4fbdf4[_0xf76aab(0x15d)](_0xf76aab(0x194)+_0x25e141+'\x20is\x20up\x20to\x20date.')),!![];const _0x4340e0=_0xe4b171['skillVersion']?_0xf76aab(0x16b)+_0x25e141+_0xf76aab(0x176)+_0xe4b171[_0xf76aab(0x192)]:_0xf76aab(0x16b)+_0x25e141+_0xf76aab(0x171)+_0xe4b171[_0xf76aab(0x179)];return console[_0xf76aab(0x16d)](a39_0x4fbdf4[_0xf76aab(0x15e)](_0xf76aab(0x16f)+_0x4340e0)),console[_0xf76aab(0x1a4)](a39_0x4fbdf4['gray']('\x20\x20Run\x20manually:\x20'+_0xe4b171[_0xf76aab(0x19f)])),![];}async function execute(_0x37cd79){const _0x3ec09a=a39_0x3a9aaf;await validateUpdateFlags(_0x37cd79);const _0x823b6c=getCurrentVersion();console[_0x3ec09a(0x1a4)](_0x3ec09a(0x172)+_0x823b6c);const _0x5185cf=a39_0xd8319d(_0x3ec09a(0x1a0))['start'](),_0xf116e0=await resolveTargetVersion(_0x37cd79);if(!_0xf116e0){const _0x1731a5=_0x37cd79[_0x3ec09a(0x182)]('beta')?_0x3ec09a(0x187):_0x3ec09a(0x17c);return _0x5185cf[_0x3ec09a(0x168)](_0x1731a5),console[_0x3ec09a(0x1a4)](a39_0x4fbdf4['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x3ec09a(0x17e))),{'ok':![],'message':_0x1731a5};}const _0x188030=a39_0x1b318b[_0x3ec09a(0x1a1)](VERSION),_0x41f6b9=a39_0x1b318b[_0x3ec09a(0x1a1)](_0xf116e0[_0x3ec09a(0x193)]);if(!_0x188030||!_0x41f6b9)return _0x5185cf[_0x3ec09a(0x168)](_0x3ec09a(0x18e)),{'ok':![],'message':_0x3ec09a(0x18e)};if(!shouldInstallTarget(_0x188030,_0xf116e0)){const _0xd01c85=_0xf116e0['source']===_0x3ec09a(0x193)?_0x3ec09a(0x1a7)+_0xf116e0[_0x3ec09a(0x193)]+')':_0x3ec09a(0x178)+_0xf116e0[_0x3ec09a(0x193)]+')';return _0x5185cf[_0x3ec09a(0x189)](_0xd01c85),{'ok':repairCurrentBuiltinSkill()};}_0x5185cf[_0x3ec09a(0x18d)](getInstallPlanLabel(_0x823b6c,_0xf116e0));const _0x49c0e4=detectPackageManager(),_0x108754=_0x49c0e4===_0x3ec09a(0x160)?resolveNpmBin('npm'):_0x49c0e4,_0x4cfa28=a39_0xd8319d(_0x3ec09a(0x1b1)+_0x49c0e4+_0x3ec09a(0x170))['start']();try{return await execa(_0x108754,[_0x3ec09a(0x19b),'-g',NPM_PACKAGE_NAME+'@'+_0xf116e0[_0x3ec09a(0x193)]],{'stdio':_0x3ec09a(0x17f)}),_0x4cfa28[_0x3ec09a(0x189)]('Updated\x20to\x20v'+_0xf116e0[_0x3ec09a(0x193)]),console[_0x3ec09a(0x1a4)](a39_0x4fbdf4['gray'](_0x3ec09a(0x173))),{'ok':verifyUpdatedBuiltinSkill(_0xf116e0[_0x3ec09a(0x193)])};}catch(_0x4dab2b){return _0x4cfa28[_0x3ec09a(0x168)](_0x3ec09a(0x190)),console[_0x3ec09a(0x1ad)](a39_0x4fbdf4['red']('\x20\x20'+_0x4dab2b[_0x3ec09a(0x1aa)])),console[_0x3ec09a(0x1a4)](a39_0x4fbdf4[_0x3ec09a(0x15d)](_0x3ec09a(0x1a9)+_0x49c0e4+_0x3ec09a(0x198)+NPM_PACKAGE_NAME+'@'+_0xf116e0[_0x3ec09a(0x193)])),{'ok':![],'message':_0x4dab2b[_0x3ec09a(0x1aa)]};}}export const updateDefinition={'service':a39_0x3a9aaf(0x19c),'command':'run','description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a39_0x3a9aaf(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x4dbf41=a39_0x5cef;(function(_0x2690d0,_0x7ae4dc){const _0x2cb7a2=a39_0x5cef,_0x1731ec=_0x2690d0();while(!![]){try{const _0x2a5b82=-parseInt(_0x2cb7a2(0x1a3))/0x1+parseInt(_0x2cb7a2(0x173))/0x2+-parseInt(_0x2cb7a2(0x192))/0x3+parseInt(_0x2cb7a2(0x1b0))/0x4+-parseInt(_0x2cb7a2(0x183))/0x5+-parseInt(_0x2cb7a2(0x1a6))/0x6+parseInt(_0x2cb7a2(0x184))/0x7;if(_0x2a5b82===_0x7ae4dc)break;else _0x1731ec['push'](_0x1731ec['shift']());}catch(_0x5c5f09){_0x1731ec['push'](_0x1731ec['shift']());}}}(a39_0x18aa,0x3d278));function a39_0x18aa(){const _0xc960df=['install','...','succeed','Updated\x20to\x20v','284950zXHNsc','1057287lYLaxw','warn','Already\x20on\x20requested\x20version\x20(v','beta','length','fail','yellow','toLowerCase','skillVersion','timeout','fromEntries','\x20install\x20-g\x20','expected\x20','info','72138hhGsJQ','https://registry.npmjs.org/-/package/','Version\x20comparison\x20failed','npm','/dist-tags','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','state','message','gray','green','\x20cli-skill\x20install','bool','map','Updating\x20via\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','version','\x20\x20Try\x20manually:\x20','90625YkQWBo','Already\x20up\x20to\x20date\x20(v','execPath','268128AcHmnj','slice','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','boolean','latest','log',',\x20found\x20','red','Update\x20failed','10668pngqvG','error','Checking\x20CLI\x20Built-in\x20Skill...','\x20→\x20','string','current','source','code','valid','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20Run\x20manually:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','read','object','run','pipe','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','bun','626258bqOnoo','includes','\x20is\x20up\x20to\x20date.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','json','start','Beta\x20version:\x20','Checking\x20for\x20updates...','unknown','validation','trim'];a39_0x18aa=function(){return _0xc960df;};return a39_0x18aa();}import a39_0x5eaf3e from'chalk';import a39_0x58d3c3 from'ora';import a39_0x2daeaf from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x1c561d=a39_0x5cef;return GIT_COMMIT!==_0x1c561d(0x17c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1c561d(0x1a7)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5e1056=a39_0x5cef,_0x27bb1d=process[_0x5e1056(0x1a5)][_0x5e1056(0x18b)]();if(_0x27bb1d[_0x5e1056(0x174)](_0x5e1056(0x172)))return'bun';return _0x5e1056(0x195);}const updateFlags=[{'name':a39_0x4dbf41(0x187),'type':a39_0x4dbf41(0x1aa),'description':a39_0x4dbf41(0x1a0),'default':![]},{'name':a39_0x4dbf41(0x1a1),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x558648){const _0x3fe51a=a39_0x4dbf41;return _0x558648['str'](_0x3fe51a(0x1a1))[_0x3fe51a(0x17e)]();}async function validateUpdateFlags(_0x274c2a){const _0x47fb86=a39_0x4dbf41,_0x6978b0=_0x274c2a[_0x47fb86(0x19d)](_0x47fb86(0x187)),_0x33d79d=getRequestedVersion(_0x274c2a);if(_0x6978b0&&_0x33d79d)throw CliErrors['validation'](_0x47fb86(0x171),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x33d79d&&!a39_0x2daeaf[_0x47fb86(0x169)](_0x33d79d))throw CliErrors[_0x47fb86(0x17d)]('Invalid\x20version:\x20'+_0x33d79d,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2a8248=a39_0x4dbf41;try{const _0x2564a4=await fetch(_0x2a8248(0x193)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2a8248(0x196),{'signal':AbortSignal[_0x2a8248(0x18d)](0x2710)});if(!_0x2564a4['ok'])return null;const _0x972db9=await _0x2564a4[_0x2a8248(0x178)]();if(!_0x972db9||typeof _0x972db9!==_0x2a8248(0x16e))return null;return Object[_0x2a8248(0x18e)](Object['entries'](_0x972db9)['filter'](([,_0xea7176])=>typeof _0xea7176===_0x2a8248(0x165)&&_0xea7176['trim']()[_0x2a8248(0x188)]>0x0)[_0x2a8248(0x19e)](([_0xb7da57,_0x58fec6])=>[_0xb7da57,String(_0x58fec6)[_0x2a8248(0x17e)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xbdd93c){const _0x19b5d1=await fetchNpmDistTags();return _0x19b5d1?.[_0xbdd93c]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}function a39_0x5cef(_0x1b0e13,_0x182f68){_0x1b0e13=_0x1b0e13-0x163;const _0x18aaa1=a39_0x18aa();let _0x5cefef=_0x18aaa1[_0x1b0e13];return _0x5cefef;}async function resolveTargetVersion(_0x4afba0){const _0x3d76d3=a39_0x4dbf41,_0x5919d1=getRequestedVersion(_0x4afba0);if(_0x5919d1)return{'version':_0x5919d1,'source':_0x3d76d3(0x1a1)};if(_0x4afba0[_0x3d76d3(0x19d)]('beta')){const _0x1e67e9=await fetchNpmDistTagVersion(_0x3d76d3(0x187));if(!_0x1e67e9)return null;return{'version':_0x1e67e9,'source':_0x3d76d3(0x187)};}const _0x2db6=await fetchLatestVersion();if(!_0x2db6)return null;return{'version':_0x2db6,'source':_0x3d76d3(0x1ab)};}function shouldInstallTarget(_0x1200d3,_0x577198){const _0x40dcd2=a39_0x4dbf41;if(_0x577198[_0x40dcd2(0x167)]===_0x40dcd2(0x1a1)||_0x577198[_0x40dcd2(0x167)]===_0x40dcd2(0x187))return!a39_0x2daeaf['eq'](_0x1200d3,_0x577198[_0x40dcd2(0x1a1)]);return a39_0x2daeaf['lt'](_0x1200d3,_0x577198[_0x40dcd2(0x1a1)]);}function getInstallPlanLabel(_0x10febc,_0x1e57ab){const _0xf9fbe7=a39_0x4dbf41;switch(_0x1e57ab[_0xf9fbe7(0x167)]){case _0xf9fbe7(0x187):return _0xf9fbe7(0x17a)+a39_0x5eaf3e[_0xf9fbe7(0x18a)](_0x10febc)+'\x20→\x20'+a39_0x5eaf3e[_0xf9fbe7(0x19b)](_0x1e57ab[_0xf9fbe7(0x1a1)]);case _0xf9fbe7(0x1a1):return _0xf9fbe7(0x177)+a39_0x5eaf3e[_0xf9fbe7(0x18a)](_0x10febc)+_0xf9fbe7(0x164)+a39_0x5eaf3e['green'](_0x1e57ab[_0xf9fbe7(0x1a1)]);case'latest':default:return'Update\x20available:\x20'+a39_0x5eaf3e[_0xf9fbe7(0x18a)](_0x10febc)+_0xf9fbe7(0x164)+a39_0x5eaf3e[_0xf9fbe7(0x19b)](_0x1e57ab[_0xf9fbe7(0x1a1)]);}}function repairCurrentBuiltinSkill(){const _0x233cca=a39_0x4dbf41;console[_0x233cca(0x1ac)](a39_0x5eaf3e['gray'](_0x233cca(0x163)));const _0x51b6d1=installBuiltinSkill();if(_0x51b6d1['ok'])return console[_0x233cca(0x1ac)](a39_0x5eaf3e[_0x233cca(0x19a)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x51b6d1[_0x233cca(0x18c)]+_0x233cca(0x175))),!![];return console['warn'](a39_0x5eaf3e[_0x233cca(0x18a)](_0x233cca(0x16a)+_0x51b6d1[_0x233cca(0x168)]+']:\x20'+(_0x51b6d1[_0x233cca(0x1b1)]||_0x233cca(0x17c)))),console[_0x233cca(0x1ac)](a39_0x5eaf3e[_0x233cca(0x19a)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x233cca(0x19c))),![];}function verifyUpdatedBuiltinSkill(_0x4cfc78){const _0x5c8276=a39_0x4dbf41,_0x1b6380=inspectInstalledBuiltinSkillVersion(_0x4cfc78);if(_0x1b6380[_0x5c8276(0x198)]===_0x5c8276(0x166))return console['log'](a39_0x5eaf3e[_0x5c8276(0x19a)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4cfc78+_0x5c8276(0x175))),!![];const _0x48811e=_0x1b6380[_0x5c8276(0x18c)]?_0x5c8276(0x190)+_0x4cfc78+_0x5c8276(0x1ad)+_0x1b6380[_0x5c8276(0x18c)]:_0x5c8276(0x190)+_0x4cfc78+',\x20state\x20'+_0x1b6380[_0x5c8276(0x198)];return console[_0x5c8276(0x185)](a39_0x5eaf3e[_0x5c8276(0x18a)](_0x5c8276(0x1a8)+_0x48811e)),console[_0x5c8276(0x1ac)](a39_0x5eaf3e[_0x5c8276(0x19a)](_0x5c8276(0x16b)+_0x1b6380['repairCommand'])),![];}async function execute(_0x3c74f6){const _0x1379ea=a39_0x4dbf41;await validateUpdateFlags(_0x3c74f6);const _0x2ea98b=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x2ea98b);const _0x540506=a39_0x58d3c3(_0x1379ea(0x17b))[_0x1379ea(0x179)](),_0xc4652d=await resolveTargetVersion(_0x3c74f6);if(!_0xc4652d){const _0x1f6233=_0x3c74f6[_0x1379ea(0x19d)]('beta')?_0x1379ea(0x16c):_0x1379ea(0x1a9);return _0x540506[_0x1379ea(0x189)](_0x1f6233),console[_0x1379ea(0x1ac)](a39_0x5eaf3e[_0x1379ea(0x19a)](_0x1379ea(0x176)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1f6233};}const _0x45c8c5=a39_0x2daeaf[_0x1379ea(0x169)](VERSION),_0x1b706f=a39_0x2daeaf[_0x1379ea(0x169)](_0xc4652d[_0x1379ea(0x1a1)]);if(!_0x45c8c5||!_0x1b706f)return _0x540506[_0x1379ea(0x189)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x1379ea(0x194)};if(!shouldInstallTarget(_0x45c8c5,_0xc4652d)){const _0x2579dd=_0xc4652d[_0x1379ea(0x167)]===_0x1379ea(0x1a1)?_0x1379ea(0x186)+_0xc4652d[_0x1379ea(0x1a1)]+')':_0x1379ea(0x1a4)+_0xc4652d[_0x1379ea(0x1a1)]+')';return _0x540506[_0x1379ea(0x181)](_0x2579dd),{'ok':repairCurrentBuiltinSkill()};}_0x540506[_0x1379ea(0x191)](getInstallPlanLabel(_0x2ea98b,_0xc4652d));const _0x1c4341=detectPackageManager(),_0x41026a=_0x1c4341==='npm'?resolveNpmBin('npm'):_0x1c4341,_0x3c3a47=a39_0x58d3c3(_0x1379ea(0x19f)+_0x1c4341+_0x1379ea(0x180))[_0x1379ea(0x179)]();try{return await execa(_0x41026a,[_0x1379ea(0x17f),'-g',NPM_PACKAGE_NAME+'@'+_0xc4652d[_0x1379ea(0x1a1)]],{'stdio':_0x1379ea(0x170)}),_0x3c3a47['succeed'](_0x1379ea(0x182)+_0xc4652d['version']),console[_0x1379ea(0x1ac)](a39_0x5eaf3e['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0xc4652d[_0x1379ea(0x1a1)])};}catch(_0x813dd1){return _0x3c3a47[_0x1379ea(0x189)](_0x1379ea(0x1af)),console[_0x1379ea(0x1b1)](a39_0x5eaf3e[_0x1379ea(0x1ae)]('\x20\x20'+_0x813dd1['message'])),console[_0x1379ea(0x1ac)](a39_0x5eaf3e[_0x1379ea(0x19a)](_0x1379ea(0x1a2)+_0x1c4341+_0x1379ea(0x18f)+NPM_PACKAGE_NAME+'@'+_0xc4652d[_0x1379ea(0x1a1)])),{'ok':![],'message':_0x813dd1[_0x1379ea(0x199)]};}}export const updateDefinition={'service':'update','command':a39_0x4dbf41(0x16f),'description':a39_0x4dbf41(0x197),'risk':a39_0x4dbf41(0x16d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x529594,_0x7df98){const _0x596fbc=a40_0x5843,_0x37c7f4=_0x529594();while(!![]){try{const _0x2d19da=parseInt(_0x596fbc(0x175))/0x1+-parseInt(_0x596fbc(0x177))/0x2+parseInt(_0x596fbc(0x172))/0x3*(-parseInt(_0x596fbc(0x171))/0x4)+-parseInt(_0x596fbc(0x178))/0x5+parseInt(_0x596fbc(0x173))/0x6+-parseInt(_0x596fbc(0x174))/0x7+parseInt(_0x596fbc(0x176))/0x8;if(_0x2d19da===_0x7df98)break;else _0x37c7f4['push'](_0x37c7f4['shift']());}catch(_0x323333){_0x37c7f4['push'](_0x37c7f4['shift']());}}}(a40_0x1fc8,0x2e665));function a40_0x1fc8(){const _0x4765ea=['3849208kQzAfl','129550ACfcVY','874700eKJVjX','320308uJHUWJ','12pMzjbR','148410QhqoUi','425845OCEIOy','305025VXARGN'];a40_0x1fc8=function(){return _0x4765ea;};return a40_0x1fc8();}function a40_0x5843(_0x3655bc,_0x468cab){_0x3655bc=_0x3655bc-0x171;const _0x1fc802=a40_0x1fc8();let _0x584340=_0x1fc802[_0x3655bc];return _0x584340;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a40_0x5cd3(){const _0x354c14=['156443FdjSVu','2918328wtNDro','6cDojSZ','53697RUiOnI','1585782whAwSc','8445985JYlHLM','160TclHQn','82sXEmtK','703255CuPurY','2321252Omaqju'];a40_0x5cd3=function(){return _0x354c14;};return a40_0x5cd3();}(function(_0x4da1d7,_0x1945ca){const _0x408420=a40_0x9ecd,_0x1227b5=_0x4da1d7();while(!![]){try{const _0x2041c9=parseInt(_0x408420(0x1e8))/0x1+parseInt(_0x408420(0x1e7))/0x2*(-parseInt(_0x408420(0x1e3))/0x3)+-parseInt(_0x408420(0x1e9))/0x4+-parseInt(_0x408420(0x1e5))/0x5+parseInt(_0x408420(0x1e2))/0x6*(-parseInt(_0x408420(0x1ea))/0x7)+parseInt(_0x408420(0x1e1))/0x8+-parseInt(_0x408420(0x1e4))/0x9*(-parseInt(_0x408420(0x1e6))/0xa);if(_0x2041c9===_0x1945ca)break;else _0x1227b5['push'](_0x1227b5['shift']());}catch(_0x37c1b1){_0x1227b5['push'](_0x1227b5['shift']());}}}(a40_0x5cd3,0xd2538));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x9ecd(_0xdc6b6b,_0x5856fe){_0xdc6b6b=_0xdc6b6b-0x1e1;const _0x5cd368=a40_0x5cd3();let _0x9ecd53=_0x5cd368[_0xdc6b6b];return _0x9ecd53;}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a41_0x1bc7(){const _0x264c75=['4384248PnbyuY','Omit\x20import\x20statements\x20from\x20generated\x20code','151470ZaNvpr','string','22qrnhca','90OFYZZT','298347MhcdRO','code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','operation','codegen','read','315PrxaBp','31432ujsltz','1248821aXdzwk','str','boolean','6546OQMiym','name','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','bool','858Inscgf','alias','appCode','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','6645fmPoBs','8mQLCdl','tableName'];a41_0x1bc7=function(){return _0x264c75;};return a41_0x1bc7();}const a41_0x585268=a41_0x5b70;(function(_0x48b1ac,_0x47aed6){const _0x45ad26=a41_0x5b70,_0x561196=_0x48b1ac();while(!![]){try{const _0x1c509e=-parseInt(_0x45ad26(0x16d))/0x1*(-parseInt(_0x45ad26(0x17a))/0x2)+parseInt(_0x45ad26(0x16f))/0x3*(-parseInt(_0x45ad26(0x167))/0x4)+parseInt(_0x45ad26(0x182))/0x5*(-parseInt(_0x45ad26(0x17e))/0x6)+-parseInt(_0x45ad26(0x177))/0x7+parseInt(_0x45ad26(0x176))/0x8*(parseInt(_0x45ad26(0x175))/0x9)+-parseInt(_0x45ad26(0x16e))/0xa*(-parseInt(_0x45ad26(0x16b))/0xb)+parseInt(_0x45ad26(0x169))/0xc;if(_0x1c509e===_0x47aed6)break;else _0x561196['push'](_0x561196['shift']());}catch(_0x4a14dd){_0x561196['push'](_0x561196['shift']());}}}(a41_0x1bc7,0x20181));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x5b70(_0x516c8f,_0x5330df){_0x516c8f=_0x516c8f-0x167;const _0x1bc7cc=a41_0x1bc7();let _0x5b70b1=_0x1bc7cc[_0x516c8f];return _0x5b70b1;}export const codegenSdk={'service':a41_0x585268(0x173),'command':'sdk','description':a41_0x585268(0x17c),'risk':a41_0x585268(0x174),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x585268(0x17f),'type':a41_0x585268(0x16c),'description':a41_0x585268(0x181)},{'name':a41_0x585268(0x172),'type':a41_0x585268(0x16c),'required':!![],'description':a41_0x585268(0x171)},{'name':'skip-imports','type':a41_0x585268(0x179),'description':a41_0x585268(0x16a)}],async 'execute'(_0xcd8f39){const _0x10fa78=a41_0x585268,{dataset:_0x2f99dc,operation:_0x2283d7}=await getOperationDetail(_0xcd8f39[_0x10fa78(0x180)],_0xcd8f39['str']('code'),_0xcd8f39[_0x10fa78(0x178)](_0x10fa78(0x172))),_0x53b9a3=generateSdkCode(_0x2f99dc,_0x2283d7,{'includeImports':!_0xcd8f39[_0x10fa78(0x17d)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2f99dc[_0x10fa78(0x17b)],'code':_0x2f99dc[_0x10fa78(0x170)],'tableName':_0x2f99dc[_0x10fa78(0x168)]},'operation':_0xcd8f39[_0x10fa78(0x178)](_0x10fa78(0x172)),'code':_0x53b9a3}};}};
1
+ const a41_0xb7a6f2=a41_0xba8b;(function(_0x51f5bb,_0x130f9f){const _0x431962=a41_0xba8b,_0x129ce8=_0x51f5bb();while(!![]){try{const _0x306e5b=parseInt(_0x431962(0x154))/0x1+-parseInt(_0x431962(0x150))/0x2+-parseInt(_0x431962(0x158))/0x3+-parseInt(_0x431962(0x14c))/0x4*(-parseInt(_0x431962(0x14a))/0x5)+parseInt(_0x431962(0x146))/0x6+parseInt(_0x431962(0x156))/0x7+parseInt(_0x431962(0x15b))/0x8;if(_0x306e5b===_0x130f9f)break;else _0x129ce8['push'](_0x129ce8['shift']());}catch(_0x1df40a){_0x129ce8['push'](_0x129ce8['shift']());}}}(a41_0x28b3,0xec16c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0xb7a6f2(0x144),'command':a41_0xb7a6f2(0x159),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a41_0xb7a6f2(0x14f),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0xb7a6f2(0x155),'type':a41_0xb7a6f2(0x14d),'description':a41_0xb7a6f2(0x152)},{'name':a41_0xb7a6f2(0x148),'type':a41_0xb7a6f2(0x14d),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a41_0xb7a6f2(0x151),'type':a41_0xb7a6f2(0x157),'description':a41_0xb7a6f2(0x145)}],async 'execute'(_0x434b7e){const _0x29b22f=a41_0xb7a6f2,{dataset:_0x13276f,operation:_0x5e5611}=await getOperationDetail(_0x434b7e[_0x29b22f(0x149)],_0x434b7e[_0x29b22f(0x147)](_0x29b22f(0x14b)),_0x434b7e[_0x29b22f(0x147)](_0x29b22f(0x148))),_0x1b1886=generateSdkCode(_0x13276f,_0x5e5611,{'includeImports':!_0x434b7e[_0x29b22f(0x15a)](_0x29b22f(0x151))});return{'ok':!![],'data':{'dataset':{'name':_0x13276f[_0x29b22f(0x153)],'code':_0x13276f[_0x29b22f(0x14b)],'tableName':_0x13276f[_0x29b22f(0x14e)]},'operation':_0x434b7e[_0x29b22f(0x147)](_0x29b22f(0x148)),'code':_0x1b1886}};}};function a41_0xba8b(_0x529477,_0x1baf27){_0x529477=_0x529477-0x144;const _0x28b38f=a41_0x28b3();let _0xba8bb4=_0x28b38f[_0x529477];return _0xba8bb4;}function a41_0x28b3(){const _0x2e123e=['40hFsSuk','code','291736LHOMrR','string','tableName','read','3512174NziTVD','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','name','1047060PKdyeq','alias','5438608dMJSIC','boolean','4652067oqbiIZ','sdk','bool','12507632VHFccf','codegen','Omit\x20import\x20statements\x20from\x20generated\x20code','1817196ggwxMr','str','operation','appCode'];a41_0x28b3=function(){return _0x2e123e;};return a41_0x28b3();}
@@ -1 +1 @@
1
- function a42_0x2ecb(){const _0x475ce8=['codegen','2371536dWdkxL','str','64956yEwXqO','30BQYGrk','no-imports','boolean','appCode','sqlCode','sql','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','404895iBtLQB','sqlcode','read','238PojDKy','bff','Omit\x20import\x20statements\x20from\x20generated\x20code','4330816FjAkOC','4tVWNuM','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','1209680yssBbo','621305ivoXUA','string','target','190497lVeFmB','sdk'];a42_0x2ecb=function(){return _0x475ce8;};return a42_0x2ecb();}const a42_0x41329d=a42_0x157f;(function(_0x3e72e7,_0x504792){const _0x320042=a42_0x157f,_0x1ce276=_0x3e72e7();while(!![]){try{const _0x39f00d=parseInt(_0x320042(0xec))/0x1+-parseInt(_0x320042(0xdb))/0x2*(-parseInt(_0x320042(0xef))/0x3)+parseInt(_0x320042(0xe9))/0x4*(parseInt(_0x320042(0xe2))/0x5)+-parseInt(_0x320042(0xda))/0x6*(parseInt(_0x320042(0xe5))/0x7)+-parseInt(_0x320042(0xe8))/0x8+-parseInt(_0x320042(0xf2))/0x9+parseInt(_0x320042(0xeb))/0xa;if(_0x39f00d===_0x504792)break;else _0x1ce276['push'](_0x1ce276['shift']());}catch(_0x1065d5){_0x1ce276['push'](_0x1ce276['shift']());}}}(a42_0x2ecb,0x932ad));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a42_0x157f(_0x42808f,_0x2b0871){_0x42808f=_0x42808f-0xd9;const _0x2ecba0=a42_0x2ecb();let _0x157f4d=_0x2ecba0[_0x42808f];return _0x157f4d;}export const codegenSql={'service':a42_0x41329d(0xf1),'command':a42_0x41329d(0xe0),'description':a42_0x41329d(0xea),'risk':a42_0x41329d(0xe4),'flags':[SQLCODE_FLAG,{'name':'target','type':a42_0x41329d(0xed),'description':a42_0x41329d(0xe1),'default':a42_0x41329d(0xf0),'enum':['sdk',a42_0x41329d(0xe6)]},{'name':a42_0x41329d(0xdc),'type':a42_0x41329d(0xdd),'description':a42_0x41329d(0xe7)}],async 'execute'(_0x38cdcf){const _0x4e73a3=a42_0x41329d,_0x4fb936=await getSqlQueryInfo(_0x38cdcf[_0x4e73a3(0xde)],_0x38cdcf['str'](_0x4e73a3(0xe3))),_0x4b5bdc=_0x38cdcf[_0x4e73a3(0xd9)](_0x4e73a3(0xee))||'sdk',_0x5ccb9a=generateSqlCodeTemplate(_0x4fb936,{'target':_0x4b5bdc,'includeImports':!_0x38cdcf['bool'](_0x4e73a3(0xdc))});return{'ok':!![],'data':{'sqlCode':_0x4fb936[_0x4e73a3(0xdf)],'sqlName':_0x4fb936['sqlName'],'target':_0x4b5bdc,'code':_0x5ccb9a}};}};
1
+ const a42_0x3e663f=a42_0x59a6;function a42_0x3613(){const _0x1904bd=['sqlCode','str','read','1MAbieC','342435BZnyTq','7065BDUxts','sqlcode','sdk','6ToZQlT','1749960byjRFD','284904wVGDeW','boolean','331618KoSUPv','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bff','sqlName','5610Yoivlh','243124SJwzvO','Omit\x20import\x20statements\x20from\x20generated\x20code','codegen','appCode','no-imports','640365XEwRhG'];a42_0x3613=function(){return _0x1904bd;};return a42_0x3613();}function a42_0x59a6(_0x3e7231,_0xcdaed1){_0x3e7231=_0x3e7231-0x102;const _0x361318=a42_0x3613();let _0x59a674=_0x361318[_0x3e7231];return _0x59a674;}(function(_0x40e58c,_0x29899f){const _0x3720c0=a42_0x59a6,_0xc6784=_0x40e58c();while(!![]){try{const _0x2f4f73=-parseInt(_0x3720c0(0x116))/0x1*(parseInt(_0x3720c0(0x10d))/0x2)+parseInt(_0x3720c0(0x112))/0x3+-parseInt(_0x3720c0(0x106))/0x4+-parseInt(_0x3720c0(0x117))/0x5+-parseInt(_0x3720c0(0x104))/0x6*(parseInt(_0x3720c0(0x108))/0x7)+-parseInt(_0x3720c0(0x105))/0x8+parseInt(_0x3720c0(0x118))/0x9*(parseInt(_0x3720c0(0x10c))/0xa);if(_0x2f4f73===_0x29899f)break;else _0xc6784['push'](_0xc6784['shift']());}catch(_0x2d9880){_0xc6784['push'](_0xc6784['shift']());}}}(a42_0x3613,0x1edee));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x3e663f(0x10f),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x3e663f(0x115),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a42_0x3e663f(0x109),'default':a42_0x3e663f(0x103),'enum':[a42_0x3e663f(0x103),a42_0x3e663f(0x10a)]},{'name':a42_0x3e663f(0x111),'type':a42_0x3e663f(0x107),'description':a42_0x3e663f(0x10e)}],async 'execute'(_0x1915c6){const _0x5ca52a=a42_0x3e663f,_0x1e5a30=await getSqlQueryInfo(_0x1915c6[_0x5ca52a(0x110)],_0x1915c6['str'](_0x5ca52a(0x102))),_0x168e3c=_0x1915c6[_0x5ca52a(0x114)]('target')||'sdk',_0x33d929=generateSqlCodeTemplate(_0x1e5a30,{'target':_0x168e3c,'includeImports':!_0x1915c6['bool'](_0x5ca52a(0x111))});return{'ok':!![],'data':{'sqlCode':_0x1e5a30[_0x5ca52a(0x113)],'sqlName':_0x1e5a30[_0x5ca52a(0x10b)],'target':_0x168e3c,'code':_0x33d929}};}};
@@ -1 +1 @@
1
- (function(_0x1a77fa,_0x26d515){const _0x45e150=a43_0x4f7f,_0x376b48=_0x1a77fa();while(!![]){try{const _0x291f17=-parseInt(_0x45e150(0x171))/0x1+parseInt(_0x45e150(0x180))/0x2+parseInt(_0x45e150(0x18d))/0x3*(-parseInt(_0x45e150(0x177))/0x4)+parseInt(_0x45e150(0x17b))/0x5*(parseInt(_0x45e150(0x18f))/0x6)+-parseInt(_0x45e150(0x17a))/0x7*(-parseInt(_0x45e150(0x170))/0x8)+parseInt(_0x45e150(0x16a))/0x9+-parseInt(_0x45e150(0x16d))/0xa;if(_0x291f17===_0x26d515)break;else _0x376b48['push'](_0x376b48['shift']());}catch(_0x2c3601){_0x376b48['push'](_0x376b48['shift']());}}}(a43_0x47de,0xe19e4));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a43_0x47de(){const _0x349511=['global','flagMissing','Use\x20global\x20config\x20scope','App\x20code','\x20Set\x20as\x20default\x20app.','inherit','projectConfig','keys','\x20Default\x20app\x20changed\x20to\x20\x22','4483833gGkouV','Usage:\x20','4452RYOdut','\x22\x20not\x20found.','validation','length','\x20app\x20\x22','string','globalConfig','\x20<name>\x20--appcode\x20<code>','10646091NyKBPj','str','\x20<name>','1227760gbqCmL','both','App\x20\x22','8vCyNSL','1096313fgLXKI','\x20config.','\x20<name>\x20[--global]','\x22\x20(appcode:\x20','trim','Missing\x20app\x20name.','4ejqott','appcode','boolean','12744305ITcDyw','1380JQVnhu','\x20Note:\x20app\x20\x22','Updated','object','bool','859052IONQiD','defaultApp','apps','args'];a43_0x47de=function(){return _0x349511;};return a43_0x47de();}import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x2d6293=a43_0x4f7f;return[{'name':_0x2d6293(0x178),'type':_0x2d6293(0x194),'description':_0x2d6293(0x187),'required':!![]},{'name':'global','type':_0x2d6293(0x179),'description':_0x2d6293(0x186),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x38e72d=a43_0x4f7f;return[{'name':_0x38e72d(0x184),'type':_0x38e72d(0x179),'description':_0x38e72d(0x186),'default':![]}];}export async function validateAppName(_0x16deef,_0x4f6920){const _0x46f1bb=a43_0x4f7f,_0x2caa80=_0x16deef[_0x46f1bb(0x183)][0x0]?.[_0x46f1bb(0x175)]();if(!_0x2caa80)throw CliErrors[_0x46f1bb(0x191)](_0x46f1bb(0x176),_0x46f1bb(0x18e)+CLI_BIN_NAME+'\x20'+_0x4f6920+_0x46f1bb(0x16c));}export async function runAppAdd(_0x1c06a2,_0x304367){const _0xe75c43=a43_0x4f7f,_0x5bae8a=_0x1c06a2[_0xe75c43(0x183)][0x0]?.[_0xe75c43(0x175)]();if(!_0x5bae8a)throw CliErrors[_0xe75c43(0x191)](_0xe75c43(0x176),_0xe75c43(0x18e)+CLI_BIN_NAME+'\x20'+_0x304367+_0xe75c43(0x196));const _0x300e66=_0x1c06a2[_0xe75c43(0x16b)](_0xe75c43(0x178));if(!_0x300e66)throw CliErrors[_0xe75c43(0x185)]('appcode',_0xe75c43(0x18e)+CLI_BIN_NAME+'\x20'+_0x304367+_0xe75c43(0x196));const _0x3bdf00={'global':_0x1c06a2[_0xe75c43(0x17f)](_0xe75c43(0x184))},_0x33cc24=readConfig(_0x3bdf00);if(!_0x33cc24[_0xe75c43(0x182)])_0x33cc24['apps']={};const _0x3814d6={'appcode':_0x300e66,...collectAppProfileOverrides(_0x5606ce=>_0x1c06a2['str'](_0x5606ce))},_0x448baa=_0x33cc24[_0xe75c43(0x182)],_0x3e16e2=!!_0x448baa[_0x5bae8a];_0x448baa[_0x5bae8a]=_0x3814d6;if(!_0x33cc24[_0xe75c43(0x181)])_0x33cc24['defaultApp']=_0x5bae8a;writeConfig(_0x33cc24,_0x3bdf00);const _0x2eb72b=!_0x3e16e2&&_0x33cc24[_0xe75c43(0x181)]===_0x5bae8a?_0xe75c43(0x188):'',_0x2bd241=(_0x3e16e2?_0xe75c43(0x17d):'Added')+_0xe75c43(0x193)+_0x5bae8a+_0xe75c43(0x174)+_0x300e66+')'+scopeLabel(_0x3bdf00)+'.'+_0x2eb72b;return{'ok':!![],'message':_0x2bd241};}function a43_0x4f7f(_0x5b9bf0,_0x50e70f){_0x5b9bf0=_0x5b9bf0-0x16a;const _0x47defb=a43_0x47de();let _0x4f7fa9=_0x47defb[_0x5b9bf0];return _0x4f7fa9;}export async function runAppRemove(_0x234eed,_0x5a5fa0){const _0xb1d8fb=a43_0x4f7f,_0x2ec52d=_0x234eed['args'][0x0]?.[_0xb1d8fb(0x175)]();if(!_0x2ec52d)throw CliErrors[_0xb1d8fb(0x191)]('Missing\x20app\x20name.',_0xb1d8fb(0x18e)+CLI_BIN_NAME+'\x20'+_0x5a5fa0+_0xb1d8fb(0x173));const _0x2f2ea0=_0x234eed[_0xb1d8fb(0x17f)](_0xb1d8fb(0x184)),{config:_0x14207d,layers:_0x5b4f7c}=readRawConfigWithLayers(),_0x3a2b18=_0x14207d['apps']??{};if(!_0x3a2b18[_0x2ec52d])throw CliErrors[_0xb1d8fb(0x191)](_0xb1d8fb(0x16f)+_0x2ec52d+_0xb1d8fb(0x190));const _0x5076b1=_0x5b4f7c[_0xb1d8fb(0x195)][_0xb1d8fb(0x182)]&&typeof _0x5b4f7c[_0xb1d8fb(0x195)][_0xb1d8fb(0x182)]===_0xb1d8fb(0x17e)?_0x5b4f7c[_0xb1d8fb(0x195)][_0xb1d8fb(0x182)]:{},_0x10ac0c=_0x5b4f7c[_0xb1d8fb(0x18a)][_0xb1d8fb(0x182)]&&typeof _0x5b4f7c[_0xb1d8fb(0x18a)][_0xb1d8fb(0x182)]===_0xb1d8fb(0x17e)?_0x5b4f7c[_0xb1d8fb(0x18a)][_0xb1d8fb(0x182)]:{},_0xfc49ae=appDefinedIn(_0x2ec52d,_0x5076b1,_0x10ac0c,_0x5b4f7c['projectConfig'][_0xb1d8fb(0x189)]===![]),_0x4c21a2=resolveAppScopeForWrite(_0x2ec52d,_0x2f2ea0,_0x5b4f7c),_0x4a0b84={'global':_0x4c21a2===_0xb1d8fb(0x184)},_0x2cc050=readConfig(_0x4a0b84),_0x15877c=_0x2cc050[_0xb1d8fb(0x182)];if(!_0x15877c||!_0x15877c[_0x2ec52d])throw CliErrors[_0xb1d8fb(0x191)](_0xb1d8fb(0x16f)+_0x2ec52d+_0xb1d8fb(0x190));delete _0x15877c[_0x2ec52d];let _0x1b88d6='';if(_0x2cc050[_0xb1d8fb(0x181)]===_0x2ec52d){const _0x509b33=Object[_0xb1d8fb(0x18b)](_0x15877c);_0x2cc050['defaultApp']=_0x509b33[_0xb1d8fb(0x192)]>0x0?_0x509b33[0x0]:undefined,_0x2cc050[_0xb1d8fb(0x181)]?_0x1b88d6=_0xb1d8fb(0x18c)+_0x2cc050['defaultApp']+'\x22.':delete _0x2cc050[_0xb1d8fb(0x181)];}Object['keys'](_0x15877c)[_0xb1d8fb(0x192)]===0x0&&(delete _0x2cc050[_0xb1d8fb(0x182)],delete _0x2cc050[_0xb1d8fb(0x181)]);writeConfig(_0x2cc050,_0x4a0b84);const _0x337937=_0xfc49ae===_0xb1d8fb(0x16e)?_0xb1d8fb(0x17c)+_0x2ec52d+'\x22\x20still\x20defined\x20in\x20'+(_0x4c21a2==='project'?_0xb1d8fb(0x184):'project')+_0xb1d8fb(0x172):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x2ec52d+'\x22'+scopeLabel(_0x4a0b84)+'.'+_0x1b88d6+_0x337937};}
1
+ (function(_0x1954f6,_0x483276){const _0x1e0168=a43_0x26fb,_0x1071f6=_0x1954f6();while(!![]){try{const _0x2aa4bd=-parseInt(_0x1e0168(0xd6))/0x1+parseInt(_0x1e0168(0xe3))/0x2+-parseInt(_0x1e0168(0xd9))/0x3*(-parseInt(_0x1e0168(0xf2))/0x4)+-parseInt(_0x1e0168(0xde))/0x5*(-parseInt(_0x1e0168(0xe0))/0x6)+parseInt(_0x1e0168(0xd1))/0x7+parseInt(_0x1e0168(0xe5))/0x8*(parseInt(_0x1e0168(0xf1))/0x9)+parseInt(_0x1e0168(0xe4))/0xa*(-parseInt(_0x1e0168(0xf8))/0xb);if(_0x2aa4bd===_0x483276)break;else _0x1071f6['push'](_0x1071f6['shift']());}catch(_0x217559){_0x1071f6['push'](_0x1071f6['shift']());}}}(a43_0x5d23,0xcd720));import{CliErrors}from'../../errors.js';function a43_0x26fb(_0x470202,_0x1f8957){_0x470202=_0x470202-0xce;const _0x5d23bf=a43_0x5d23();let _0x26fbae=_0x5d23bf[_0x470202];return _0x26fbae;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x5005c0=a43_0x26fb;return[{'name':'appcode','type':_0x5005c0(0xdf),'description':_0x5005c0(0xf7),'required':!![]},{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x49cc94=a43_0x26fb;return[{'name':_0x49cc94(0xe6),'type':'boolean','description':_0x49cc94(0xcf),'default':![]}];}export async function validateAppName(_0x5d10df,_0x224e38){const _0x2199fd=a43_0x26fb,_0x38d90b=_0x5d10df['args'][0x0]?.[_0x2199fd(0xdc)]();if(!_0x38d90b)throw CliErrors[_0x2199fd(0xed)](_0x2199fd(0xd3),_0x2199fd(0xe2)+CLI_BIN_NAME+'\x20'+_0x224e38+'\x20<name>');}function a43_0x5d23(){const _0x1252d5=['globalConfig','\x22\x20still\x20defined\x20in\x20','length','\x20Set\x20as\x20default\x20app.','validation','str','Added','flagMissing','81dEsyLu','3124EWIpuj','\x20<name>\x20[--global]','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20--appcode\x20<code>','Removed\x20app\x20\x22','App\x20code','11OEsYvC','object','\x20app\x20\x22','Use\x20global\x20config\x20scope','appcode','2220491UFzcoa','apps','Missing\x20app\x20name.','args','inherit','792966TQEqCe','\x20config.','App\x20\x22','5979YFXnBm','projectConfig','\x22\x20not\x20found.','trim','defaultApp','374930gLbfdi','string','42TUmUjJ','bool','Usage:\x20','197978hoeZgz','24409390wZdafl','1402464GvzrHH','global','\x20Note:\x20app\x20\x22','keys'];a43_0x5d23=function(){return _0x1252d5;};return a43_0x5d23();}export async function runAppAdd(_0xdec416,_0x7efadc){const _0x5226ce=a43_0x26fb,_0x5c9e4c=_0xdec416['args'][0x0]?.[_0x5226ce(0xdc)]();if(!_0x5c9e4c)throw CliErrors[_0x5226ce(0xed)](_0x5226ce(0xd3),_0x5226ce(0xe2)+CLI_BIN_NAME+'\x20'+_0x7efadc+_0x5226ce(0xf5));const _0x270bf6=_0xdec416['str']('appcode');if(!_0x270bf6)throw CliErrors[_0x5226ce(0xf0)](_0x5226ce(0xd0),_0x5226ce(0xe2)+CLI_BIN_NAME+'\x20'+_0x7efadc+_0x5226ce(0xf5));const _0x2ab703={'global':_0xdec416[_0x5226ce(0xe1)](_0x5226ce(0xe6))},_0x38ce9b=readConfig(_0x2ab703);if(!_0x38ce9b['apps'])_0x38ce9b['apps']={};const _0x5c6c1d={'appcode':_0x270bf6,...collectAppProfileOverrides(_0x22ec96=>_0xdec416[_0x5226ce(0xee)](_0x22ec96))},_0x488cb8=_0x38ce9b[_0x5226ce(0xd2)],_0x2909e2=!!_0x488cb8[_0x5c9e4c];_0x488cb8[_0x5c9e4c]=_0x5c6c1d;if(!_0x38ce9b[_0x5226ce(0xdd)])_0x38ce9b['defaultApp']=_0x5c9e4c;writeConfig(_0x38ce9b,_0x2ab703);const _0x180497=!_0x2909e2&&_0x38ce9b[_0x5226ce(0xdd)]===_0x5c9e4c?_0x5226ce(0xec):'',_0x5eb676=(_0x2909e2?'Updated':_0x5226ce(0xef))+_0x5226ce(0xce)+_0x5c9e4c+'\x22\x20(appcode:\x20'+_0x270bf6+')'+scopeLabel(_0x2ab703)+'.'+_0x180497;return{'ok':!![],'message':_0x5eb676};}export async function runAppRemove(_0x452a45,_0x50d0ea){const _0x5dd206=a43_0x26fb,_0x31cf8a=_0x452a45[_0x5dd206(0xd4)][0x0]?.[_0x5dd206(0xdc)]();if(!_0x31cf8a)throw CliErrors['validation']('Missing\x20app\x20name.',_0x5dd206(0xe2)+CLI_BIN_NAME+'\x20'+_0x50d0ea+_0x5dd206(0xf3));const _0x413f79=_0x452a45[_0x5dd206(0xe1)](_0x5dd206(0xe6)),{config:_0x7e9de3,layers:_0x2e60c5}=readRawConfigWithLayers(),_0x529ade=_0x7e9de3[_0x5dd206(0xd2)]??{};if(!_0x529ade[_0x31cf8a])throw CliErrors[_0x5dd206(0xed)](_0x5dd206(0xd8)+_0x31cf8a+_0x5dd206(0xdb));const _0x209340=_0x2e60c5[_0x5dd206(0xe9)][_0x5dd206(0xd2)]&&typeof _0x2e60c5['globalConfig'][_0x5dd206(0xd2)]==='object'?_0x2e60c5[_0x5dd206(0xe9)][_0x5dd206(0xd2)]:{},_0x4b6b4e=_0x2e60c5['projectConfig']['apps']&&typeof _0x2e60c5[_0x5dd206(0xda)][_0x5dd206(0xd2)]===_0x5dd206(0xf9)?_0x2e60c5[_0x5dd206(0xda)][_0x5dd206(0xd2)]:{},_0x34ef5d=appDefinedIn(_0x31cf8a,_0x209340,_0x4b6b4e,_0x2e60c5[_0x5dd206(0xda)][_0x5dd206(0xd5)]===![]),_0x49301c=resolveAppScopeForWrite(_0x31cf8a,_0x413f79,_0x2e60c5),_0x2b5279={'global':_0x49301c===_0x5dd206(0xe6)},_0x4b1950=readConfig(_0x2b5279),_0x2169ea=_0x4b1950['apps'];if(!_0x2169ea||!_0x2169ea[_0x31cf8a])throw CliErrors[_0x5dd206(0xed)](_0x5dd206(0xd8)+_0x31cf8a+_0x5dd206(0xdb));delete _0x2169ea[_0x31cf8a];let _0x3aff7e='';if(_0x4b1950[_0x5dd206(0xdd)]===_0x31cf8a){const _0x47712f=Object['keys'](_0x2169ea);_0x4b1950['defaultApp']=_0x47712f[_0x5dd206(0xeb)]>0x0?_0x47712f[0x0]:undefined,_0x4b1950[_0x5dd206(0xdd)]?_0x3aff7e=_0x5dd206(0xf4)+_0x4b1950[_0x5dd206(0xdd)]+'\x22.':delete _0x4b1950[_0x5dd206(0xdd)];}Object[_0x5dd206(0xe8)](_0x2169ea)[_0x5dd206(0xeb)]===0x0&&(delete _0x4b1950[_0x5dd206(0xd2)],delete _0x4b1950['defaultApp']);writeConfig(_0x4b1950,_0x2b5279);const _0x3ca386=_0x34ef5d==='both'?_0x5dd206(0xe7)+_0x31cf8a+_0x5dd206(0xea)+(_0x49301c==='project'?_0x5dd206(0xe6):'project')+_0x5dd206(0xd7):'';return{'ok':!![],'message':_0x5dd206(0xf6)+_0x31cf8a+'\x22'+scopeLabel(_0x2b5279)+'.'+_0x3aff7e+_0x3ca386};}
@@ -1 +1 @@
1
- (function(_0x408d2f,_0x4e705f){const _0x1022cd=a44_0x1e81,_0x515675=_0x408d2f();while(!![]){try{const _0x1b3bd1=-parseInt(_0x1022cd(0x193))/0x1*(-parseInt(_0x1022cd(0x1a7))/0x2)+-parseInt(_0x1022cd(0x1a1))/0x3*(-parseInt(_0x1022cd(0x199))/0x4)+-parseInt(_0x1022cd(0x18d))/0x5*(parseInt(_0x1022cd(0x18f))/0x6)+-parseInt(_0x1022cd(0x18b))/0x7+parseInt(_0x1022cd(0x1a4))/0x8+parseInt(_0x1022cd(0x189))/0x9*(parseInt(_0x1022cd(0x19d))/0xa)+-parseInt(_0x1022cd(0x1a2))/0xb;if(_0x1b3bd1===_0x4e705f)break;else _0x515675['push'](_0x515675['shift']());}catch(_0x422b23){_0x515675['push'](_0x515675['shift']());}}}(a44_0x1715,0xa3f60));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x1ab9d2 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a44_0x1e81(_0x9e6dea,_0x4e5461){_0x9e6dea=_0x9e6dea-0x185;const _0x171547=a44_0x1715();let _0x1e8194=_0x171547[_0x9e6dea];return _0x1e8194;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3c0fee=a44_0x1e81,_0x4a4191=await input({'message':_0x3c0fee(0x1aa),'validate':_0x209184=>{const _0x25cdf0=_0x3c0fee,_0xfc9e15=validateAppcode(_0x209184['trim']());return _0xfc9e15[_0x25cdf0(0x19f)]||_0xfc9e15[_0x25cdf0(0x190)]||_0x25cdf0(0x196);}});return _0x4a4191[_0x3c0fee(0x195)]();}export async function promptAppSelection(_0x10dc92){const _0x24c3f1=a44_0x1e81,_0x19a4a0=[{'name':a44_0x1ab9d2[_0x24c3f1(0x187)](_0x24c3f1(0x194)),'value':-0x1},..._0x10dc92[_0x24c3f1(0x19b)]((_0x4e0899,_0x17d173)=>({'name':_0x4e0899['appName']+'\x20\x20'+a44_0x1ab9d2[_0x24c3f1(0x1a6)]('('+_0x4e0899[_0x24c3f1(0x19a)]+')'),'value':_0x17d173}))],_0x163e26=await checkbox({'message':_0x24c3f1(0x197)+a44_0x1ab9d2[_0x24c3f1(0x19c)](_0x10dc92[_0x24c3f1(0x191)])+_0x24c3f1(0x1a9),'choices':_0x19a4a0,'loop':![]});if(_0x163e26[_0x24c3f1(0x1a8)](-0x1))return'custom';if(_0x163e26[_0x24c3f1(0x191)]===0x0)return _0x24c3f1(0x188);return _0x163e26['map'](_0x1c01a4=>_0x10dc92[_0x1c01a4]);}export async function promptSingleAppSelection(_0x3bdbb2){const _0x2991d9=a44_0x1e81,_0x497b11=[{'name':a44_0x1ab9d2[_0x2991d9(0x1a6)](_0x2991d9(0x18a)),'value':_0x2991d9(0x19e)},{'name':a44_0x1ab9d2[_0x2991d9(0x187)](_0x2991d9(0x194)),'value':'custom'},..._0x3bdbb2[_0x2991d9(0x19b)](_0x4de07d=>({'name':_0x4de07d[_0x2991d9(0x186)]+'\x20\x20'+a44_0x1ab9d2[_0x2991d9(0x1a6)]('('+_0x4de07d[_0x2991d9(0x19a)]+')'),'value':_0x4de07d[_0x2991d9(0x19a)]}))],_0x4c1279=await select({'message':'请选择要绑定的应用:','choices':_0x497b11});if(_0x4c1279===_0x2991d9(0x19e))return _0x2991d9(0x19e);if(_0x4c1279===_0x2991d9(0x188))return'custom';return _0x3bdbb2['find'](_0x480561=>_0x480561[_0x2991d9(0x19a)]===_0x4c1279);}export async function selectSingleAppcode(_0x4cae63){const _0x48596e=a44_0x1e81;if(!_0x4cae63)return writeCliSideChannelLine(a44_0x1ab9d2[_0x48596e(0x1a6)](_0x48596e(0x1a0))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x900274;try{_0x900274=await withActiveCookie(_0x4cae63,()=>listRemoteApps());}catch(_0x1bde1c){writeCliSideChannelLine(a44_0x1ab9d2[_0x48596e(0x187)](_0x48596e(0x198)));if(_0x1bde1c instanceof Error)writeCliSideChannelLine(a44_0x1ab9d2[_0x48596e(0x1a6)](_0x48596e(0x18c)+_0x1bde1c[_0x48596e(0x190)]+')'));return _fallbackOrSkip();}if(_0x900274[_0x48596e(0x191)]===0x0)return writeCliSideChannelLine(a44_0x1ab9d2['yellow'](_0x48596e(0x192))),_fallbackOrSkip();const _0x5b8a6b=await promptSingleAppSelection(_0x900274);if(_0x5b8a6b===_0x48596e(0x19e))return'';if(_0x5b8a6b===_0x48596e(0x188))return promptCustomAppcode();return _0x5b8a6b['appCode'];}export async function selectMultipleApps(_0x1b9f00){const _0x3bb4e3=a44_0x1e81;writeCliSideChannelLine(_0x3bb4e3(0x1a5));let _0x391371;try{_0x391371=await withActiveCookie(_0x1b9f00,()=>listRemoteApps());}catch(_0x147956){writeCliSideChannelLine(_0x3bb4e3(0x18e));if(_0x147956 instanceof Error)writeCliSideChannelLine(_0x3bb4e3(0x18c)+_0x147956['message']+')');return _0x3bb4e3(0x188);}if(_0x391371[_0x3bb4e3(0x191)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x3bb4e3(0x188);return promptAppSelection(_0x391371);}async function _fallbackOrSkip(){const _0x2cc742=a44_0x1e81,_0x4a849a=await select({'message':'App\x20Code:','choices':[{'name':a44_0x1ab9d2['gray']('(跳过,稍后配置)'),'value':_0x2cc742(0x19e)},{'name':a44_0x1ab9d2[_0x2cc742(0x187)](_0x2cc742(0x185)),'value':_0x2cc742(0x1a3)}]});if(_0x4a849a==='skip')return'';return promptCustomAppcode();}function a44_0x1715(){const _0xa986ae=['\x0a无法获取远程应用列表,请手动输入。','1081446TXgBVI','message','length','未找到可用应用。','1cBfSXN','✎\x20自定义输入\x20appcode','trim','Invalid\x20App\x20Code','获取到\x20','无法获取远程应用列表,请手动输入。','2776KYiRkh','appCode','map','cyan','1790ZEmJWJ','skip','valid','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','4542rsrUYv','9839137mHkiwj','manual','2694296MuQOKd','正在获取可用应用列表...','gray','907170GcxiFL','includes','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','请输入\x20App\x20Code:','✎\x20手动输入','appName','yellow','custom','26829yCBuJw','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','3137078WjoFZP','\x20\x20(','10cyUevX'];a44_0x1715=function(){return _0xa986ae;};return a44_0x1715();}
1
+ (function(_0x619d7a,_0x43af48){const _0x12e13f=a44_0x36bf,_0x536a6a=_0x619d7a();while(!![]){try{const _0x1ce61c=parseInt(_0x12e13f(0x101))/0x1+parseInt(_0x12e13f(0x10e))/0x2*(-parseInt(_0x12e13f(0x10a))/0x3)+-parseInt(_0x12e13f(0xf1))/0x4*(parseInt(_0x12e13f(0x107))/0x5)+parseInt(_0x12e13f(0xf5))/0x6*(-parseInt(_0x12e13f(0x108))/0x7)+parseInt(_0x12e13f(0x10b))/0x8*(-parseInt(_0x12e13f(0xfd))/0x9)+-parseInt(_0x12e13f(0x103))/0xa*(parseInt(_0x12e13f(0x110))/0xb)+-parseInt(_0x12e13f(0xf6))/0xc*(-parseInt(_0x12e13f(0x111))/0xd);if(_0x1ce61c===_0x43af48)break;else _0x536a6a['push'](_0x536a6a['shift']());}catch(_0x1633ad){_0x536a6a['push'](_0x536a6a['shift']());}}}(a44_0x361a,0xccc61));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x3cecc5 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a44_0x36bf(_0x2f040b,_0x5d733f){_0x2f040b=_0x2f040b-0xef;const _0x361aac=a44_0x361a();let _0x36bfdf=_0x361aac[_0x2f040b];return _0x36bfdf;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x56e462=a44_0x36bf,_0x53ae9b=await input({'message':_0x56e462(0x115),'validate':_0x5b623e=>{const _0x257f4e=_0x56e462,_0x5484c3=validateAppcode(_0x5b623e[_0x257f4e(0xf9)]());return _0x5484c3[_0x257f4e(0x10f)]||_0x5484c3[_0x257f4e(0x114)]||'Invalid\x20App\x20Code';}});return _0x53ae9b['trim']();}function a44_0x361a(){const _0x4ec408=['15048BNDedA','custom','正在获取可用应用列表...','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','1402655ZzCnbZ','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','2790yRjJLJ','App\x20Code:','无法获取远程应用列表,请手动输入。','gray','2945sLqTod','7NzMFTs','\x0a无法获取远程应用列表,请手动输入。','1126821kEnnAc','6848fQbaGy','length','map','8fgQFug','valid','66077dUQzvY','3594409xoOQvU','✎\x20自定义输入\x20appcode','✎\x20手动输入','message','请输入\x20App\x20Code:','未找到可用应用。','(跳过,稍后配置)','1148RRvzZS','skip','\x0a未找到可用应用。','\x20\x20(','2913762kNsAyl','204eGqgxM','appCode','yellow','trim','manual','includes','获取到\x20'];a44_0x361a=function(){return _0x4ec408;};return a44_0x361a();}export async function promptAppSelection(_0x49acfd){const _0x1e3a21=a44_0x36bf,_0x59b649=[{'name':a44_0x3cecc5['yellow'](_0x1e3a21(0x112)),'value':-0x1},..._0x49acfd['map']((_0x42f73a,_0x54ec08)=>({'name':_0x42f73a['appName']+'\x20\x20'+a44_0x3cecc5[_0x1e3a21(0x106)]('('+_0x42f73a['appCode']+')'),'value':_0x54ec08}))],_0x2a3950=await checkbox({'message':_0x1e3a21(0xfc)+a44_0x3cecc5['cyan'](_0x49acfd[_0x1e3a21(0x10c)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x59b649,'loop':![]});if(_0x2a3950[_0x1e3a21(0xfb)](-0x1))return'custom';if(_0x2a3950['length']===0x0)return _0x1e3a21(0xfe);return _0x2a3950[_0x1e3a21(0x10d)](_0x24239a=>_0x49acfd[_0x24239a]);}export async function promptSingleAppSelection(_0x1a4712){const _0x17ccb0=a44_0x36bf,_0x4dd93d=[{'name':a44_0x3cecc5['gray'](_0x17ccb0(0x102)),'value':_0x17ccb0(0xf2)},{'name':a44_0x3cecc5['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x17ccb0(0xfe)},..._0x1a4712[_0x17ccb0(0x10d)](_0x433792=>({'name':_0x433792['appName']+'\x20\x20'+a44_0x3cecc5[_0x17ccb0(0x106)]('('+_0x433792['appCode']+')'),'value':_0x433792[_0x17ccb0(0xf7)]}))],_0x26f898=await select({'message':'请选择要绑定的应用:','choices':_0x4dd93d});if(_0x26f898==='skip')return _0x17ccb0(0xf2);if(_0x26f898===_0x17ccb0(0xfe))return'custom';return _0x1a4712['find'](_0x50ece4=>_0x50ece4[_0x17ccb0(0xf7)]===_0x26f898);}export async function selectSingleAppcode(_0x1791f7){const _0x4fcc5a=a44_0x36bf;if(!_0x1791f7)return writeCliSideChannelLine(a44_0x3cecc5[_0x4fcc5a(0x106)](_0x4fcc5a(0x100))),_fallbackOrSkip();writeCliSideChannelLine(_0x4fcc5a(0xff));let _0x498a45;try{_0x498a45=await withActiveCookie(_0x1791f7,()=>listRemoteApps());}catch(_0x4c6f02){writeCliSideChannelLine(a44_0x3cecc5[_0x4fcc5a(0xf8)](_0x4fcc5a(0x105)));if(_0x4c6f02 instanceof Error)writeCliSideChannelLine(a44_0x3cecc5[_0x4fcc5a(0x106)]('\x20\x20('+_0x4c6f02[_0x4fcc5a(0x114)]+')'));return _fallbackOrSkip();}if(_0x498a45[_0x4fcc5a(0x10c)]===0x0)return writeCliSideChannelLine(a44_0x3cecc5[_0x4fcc5a(0xf8)](_0x4fcc5a(0xef))),_fallbackOrSkip();const _0x1453ec=await promptSingleAppSelection(_0x498a45);if(_0x1453ec==='skip')return'';if(_0x1453ec===_0x4fcc5a(0xfe))return promptCustomAppcode();return _0x1453ec[_0x4fcc5a(0xf7)];}export async function selectMultipleApps(_0x3f3927){const _0x341feb=a44_0x36bf;writeCliSideChannelLine(_0x341feb(0xff));let _0x352543;try{_0x352543=await withActiveCookie(_0x3f3927,()=>listRemoteApps());}catch(_0x99bfcf){writeCliSideChannelLine(_0x341feb(0x109));if(_0x99bfcf instanceof Error)writeCliSideChannelLine(_0x341feb(0xf4)+_0x99bfcf[_0x341feb(0x114)]+')');return _0x341feb(0xfe);}if(_0x352543[_0x341feb(0x10c)]===0x0)return writeCliSideChannelLine(_0x341feb(0xf3)),_0x341feb(0xfe);return promptAppSelection(_0x352543);}async function _fallbackOrSkip(){const _0x22f78d=a44_0x36bf,_0x48e3b7=await select({'message':_0x22f78d(0x104),'choices':[{'name':a44_0x3cecc5[_0x22f78d(0x106)](_0x22f78d(0xf0)),'value':_0x22f78d(0xf2)},{'name':a44_0x3cecc5[_0x22f78d(0xf8)](_0x22f78d(0x113)),'value':_0x22f78d(0xfa)}]});if(_0x48e3b7===_0x22f78d(0xf2))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x4bfa2f=a45_0x1854;(function(_0x49289c,_0x9f8f9d){const _0x40b953=a45_0x1854,_0x36bf10=_0x49289c();while(!![]){try{const _0x256c24=-parseInt(_0x40b953(0x171))/0x1+parseInt(_0x40b953(0x173))/0x2+parseInt(_0x40b953(0x16c))/0x3+parseInt(_0x40b953(0x178))/0x4+-parseInt(_0x40b953(0x160))/0x5*(-parseInt(_0x40b953(0x16f))/0x6)+-parseInt(_0x40b953(0x16e))/0x7*(-parseInt(_0x40b953(0x17f))/0x8)+parseInt(_0x40b953(0x175))/0x9*(-parseInt(_0x40b953(0x167))/0xa);if(_0x256c24===_0x9f8f9d)break;else _0x36bf10['push'](_0x36bf10['shift']());}catch(_0x265805){_0x36bf10['push'](_0x36bf10['shift']());}}}(a45_0x1447,0x4f0df));import{CLI_BIN_NAME}from'../../constant/cli.js';function a45_0x1854(_0x14cc2c,_0x159526){_0x14cc2c=_0x14cc2c-0x160;const _0x14470b=a45_0x1447();let _0x18549e=_0x14470b[_0x14cc2c];return _0x18549e;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x4bfa2f(0x17e),a45_0x4bfa2f(0x164)]),NON_TERMINAL_STATUSES=new Set([a45_0x4bfa2f(0x17a),a45_0x4bfa2f(0x176)]);export function normalizeAsyncTask(_0x5a9d82){const _0x384a6d=a45_0x4bfa2f,_0xbee218=typeof _0x5a9d82?.['taskId']==='string'?_0x5a9d82[_0x384a6d(0x166)]['trim']():'';if(!_0xbee218)throw CliErrors[_0x384a6d(0x172)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x1014b9=typeof _0x5a9d82['status']===_0x384a6d(0x16d)?_0x5a9d82[_0x384a6d(0x161)][_0x384a6d(0x170)]()[_0x384a6d(0x17b)]():'';if(!_0x1014b9)throw CliErrors['apiError'](_0x384a6d(0x169)+_0xbee218+_0x384a6d(0x162));return{'taskId':_0xbee218,'status':_0x1014b9,'errorMessage':typeof _0x5a9d82[_0x384a6d(0x17d)]===_0x384a6d(0x16d)&&_0x5a9d82[_0x384a6d(0x17d)]['trim']()?_0x5a9d82[_0x384a6d(0x17d)][_0x384a6d(0x170)]():null,'isTerminal':TERMINAL_STATUSES[_0x384a6d(0x163)](_0x1014b9),'knownStatus':TERMINAL_STATUSES[_0x384a6d(0x163)](_0x1014b9)||NON_TERMINAL_STATUSES['has'](_0x1014b9)};}function a45_0x1447(){const _0x482a4f=['has','FAILED','\x20is\x20pending.','taskId','1172270MNrMHz','\x20task\x20status\x20--task-id\x20','Async\x20task\x20','Task\x20','\x20returned\x20unknown\x20status\x20','1212471FXNzMa','string','63lZLsZZ','2013894QsHmSK','trim','278606UVEgnN','apiError','903394wOkZJM','\x20failed.','90ZcVhMh','PROCESSING','\x20is\x20processing.','178696FHKyAm','\x20--appcode\x20','PENDING','toUpperCase','\x20failed:\x20','errorMessage','SUCCESS','478672ZdfURr','5DHlSeC','status','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a45_0x1447=function(){return _0x482a4f;};return a45_0x1447();}export function buildAsyncTaskStatusCommand(_0x420324,_0x2f2088){const _0x6dc77=a45_0x4bfa2f;return CLI_BIN_NAME+_0x6dc77(0x168)+quoteShellArg(_0x420324)+_0x6dc77(0x179)+quoteShellArg(_0x2f2088)+'\x20--format\x20compress';}export function asyncTaskMessage(_0xe3fc19){const _0x72f369=a45_0x4bfa2f;switch(_0xe3fc19['status']){case'PENDING':return _0x72f369(0x16a)+_0xe3fc19[_0x72f369(0x166)]+_0x72f369(0x165);case _0x72f369(0x176):return'Task\x20'+_0xe3fc19['taskId']+_0x72f369(0x177);case'SUCCESS':return'Task\x20'+_0xe3fc19['taskId']+'\x20completed\x20successfully.';case _0x72f369(0x164):return _0xe3fc19[_0x72f369(0x17d)]?_0x72f369(0x16a)+_0xe3fc19[_0x72f369(0x166)]+_0x72f369(0x17c)+_0xe3fc19[_0x72f369(0x17d)]:'Task\x20'+_0xe3fc19[_0x72f369(0x166)]+_0x72f369(0x174);default:return'Task\x20'+_0xe3fc19[_0x72f369(0x166)]+_0x72f369(0x16b)+_0xe3fc19[_0x72f369(0x161)]+'.';}}function quoteShellArg(_0x4cd8f1){return'\x27'+_0x4cd8f1['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
1
+ const a45_0x10800c=a45_0x430a;function a45_0x430a(_0x301037,_0x26122f){_0x301037=_0x301037-0x11b;const _0x38ab12=a45_0x38ab();let _0x430ab5=_0x38ab12[_0x301037];return _0x430ab5;}(function(_0x3796a4,_0x37adf5){const _0x442254=a45_0x430a,_0x12c687=_0x3796a4();while(!![]){try{const _0x3f9543=parseInt(_0x442254(0x121))/0x1+-parseInt(_0x442254(0x11f))/0x2*(-parseInt(_0x442254(0x12c))/0x3)+parseInt(_0x442254(0x135))/0x4*(parseInt(_0x442254(0x120))/0x5)+-parseInt(_0x442254(0x124))/0x6*(parseInt(_0x442254(0x125))/0x7)+-parseInt(_0x442254(0x13c))/0x8+parseInt(_0x442254(0x134))/0x9*(-parseInt(_0x442254(0x11e))/0xa)+-parseInt(_0x442254(0x131))/0xb*(-parseInt(_0x442254(0x12a))/0xc);if(_0x3f9543===_0x37adf5)break;else _0x12c687['push'](_0x12c687['shift']());}catch(_0x4f3319){_0x12c687['push'](_0x12c687['shift']());}}}(a45_0x38ab,0x97489));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x10800c(0x13a),a45_0x10800c(0x11d)]),NON_TERMINAL_STATUSES=new Set([a45_0x10800c(0x123),a45_0x10800c(0x12e)]);export function normalizeAsyncTask(_0xcea844){const _0x26b4af=a45_0x10800c,_0x267996=typeof _0xcea844?.[_0x26b4af(0x12b)]===_0x26b4af(0x126)?_0xcea844[_0x26b4af(0x12b)][_0x26b4af(0x138)]():'';if(!_0x267996)throw CliErrors[_0x26b4af(0x129)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x4bb6bf=typeof _0xcea844[_0x26b4af(0x133)]===_0x26b4af(0x126)?_0xcea844[_0x26b4af(0x133)][_0x26b4af(0x138)]()[_0x26b4af(0x11c)]():'';if(!_0x4bb6bf)throw CliErrors['apiError'](_0x26b4af(0x137)+_0x267996+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x267996,'status':_0x4bb6bf,'errorMessage':typeof _0xcea844[_0x26b4af(0x132)]===_0x26b4af(0x126)&&_0xcea844['errorMessage'][_0x26b4af(0x138)]()?_0xcea844[_0x26b4af(0x132)][_0x26b4af(0x138)]():null,'isTerminal':TERMINAL_STATUSES[_0x26b4af(0x12f)](_0x4bb6bf),'knownStatus':TERMINAL_STATUSES[_0x26b4af(0x12f)](_0x4bb6bf)||NON_TERMINAL_STATUSES[_0x26b4af(0x12f)](_0x4bb6bf)};}export function buildAsyncTaskStatusCommand(_0x20012a,_0x937fed){const _0x2b1477=a45_0x10800c;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x20012a)+_0x2b1477(0x13d)+quoteShellArg(_0x937fed)+_0x2b1477(0x136);}export function asyncTaskMessage(_0xfef4c5){const _0x1f835c=a45_0x10800c;switch(_0xfef4c5[_0x1f835c(0x133)]){case _0x1f835c(0x123):return _0x1f835c(0x13b)+_0xfef4c5['taskId']+'\x20is\x20pending.';case _0x1f835c(0x12e):return'Task\x20'+_0xfef4c5['taskId']+_0x1f835c(0x130);case _0x1f835c(0x13a):return _0x1f835c(0x13b)+_0xfef4c5[_0x1f835c(0x12b)]+_0x1f835c(0x12d);case'FAILED':return _0xfef4c5[_0x1f835c(0x132)]?_0x1f835c(0x13b)+_0xfef4c5[_0x1f835c(0x12b)]+_0x1f835c(0x128)+_0xfef4c5['errorMessage']:_0x1f835c(0x13b)+_0xfef4c5[_0x1f835c(0x12b)]+_0x1f835c(0x122);default:return _0x1f835c(0x13b)+_0xfef4c5[_0x1f835c(0x12b)]+_0x1f835c(0x11b)+_0xfef4c5[_0x1f835c(0x133)]+'.';}}function a45_0x38ab(){const _0x211b8c=['\x20--appcode\x20','\x20returned\x20unknown\x20status\x20','toUpperCase','FAILED','386990XRkYsz','25924HFHZpt','15ZjFHVX','893578BbqOBt','\x20failed.','PENDING','293748nkvnnx','140BkDoPw','string','replace','\x20failed:\x20','apiError','11724QHPYsO','taskId','153krzWMc','\x20completed\x20successfully.','PROCESSING','has','\x20is\x20processing.','7953hTdsXX','errorMessage','status','171FqFFDS','866216gYMIVB','\x20--format\x20compress','Async\x20task\x20','trim','\x27\x5c\x27\x27','SUCCESS','Task\x20','4612600hoETkq'];a45_0x38ab=function(){return _0x211b8c;};return a45_0x38ab();}function quoteShellArg(_0x47ef33){const _0x418d00=a45_0x10800c;return'\x27'+_0x47ef33[_0x418d00(0x127)](/'/g,_0x418d00(0x139))+'\x27';}
@@ -1 +1 @@
1
- (function(_0x385f43,_0x1e916b){var _0x3efc3f=a46_0x5468,_0x2b735f=_0x385f43();while(!![]){try{var _0x518a84=-parseInt(_0x3efc3f(0xde))/0x1+parseInt(_0x3efc3f(0xe1))/0x2+parseInt(_0x3efc3f(0xdd))/0x3*(parseInt(_0x3efc3f(0xe7))/0x4)+parseInt(_0x3efc3f(0xdf))/0x5+parseInt(_0x3efc3f(0xe2))/0x6*(-parseInt(_0x3efc3f(0xd9))/0x7)+parseInt(_0x3efc3f(0xdb))/0x8*(-parseInt(_0x3efc3f(0xe6))/0x9)+parseInt(_0x3efc3f(0xe0))/0xa*(parseInt(_0x3efc3f(0xdc))/0xb);if(_0x518a84===_0x1e916b)break;else _0x2b735f['push'](_0x2b735f['shift']());}catch(_0x6feaf7){_0x2b735f['push'](_0x2b735f['shift']());}}}(a46_0x5915,0x2adb4));export function asDryRunResult(_0x4a7f72,_0x3760e7){var _0x3d7928=a46_0x5468;return Object[_0x3d7928(0xe5)](_0x4a7f72,{'method':{'value':_0x3760e7[_0x3d7928(0xe4)],'enumerable':![]},'url':{'value':_0x3760e7[_0x3d7928(0xda)],'enumerable':![]},..._0x3760e7[_0x3d7928(0xe3)]?{'description':{'value':_0x3760e7[_0x3d7928(0xe3)],'enumerable':![]}}:{}});}function a46_0x5468(_0x3ab8a7,_0x5b7cbd){_0x3ab8a7=_0x3ab8a7-0xd9;var _0x591523=a46_0x5915();var _0x5468c4=_0x591523[_0x3ab8a7];return _0x5468c4;}function a46_0x5915(){var _0x4b2fbd=['method','defineProperties','9IlEkCf','796vdvLsf','18284KbBJdm','url','991320VzPRXt','2629rHqfRu','3867pRkEoq','34463GQzITr','701105PvrVrp','1030TwFMAe','274402vDczpf','516ipbDWG','description'];a46_0x5915=function(){return _0x4b2fbd;};return a46_0x5915();}
1
+ (function(_0x26aabd,_0x2ba9a7){var _0x408f40=a46_0x2f7c,_0x19e2c3=_0x26aabd();while(!![]){try{var _0x192cd4=parseInt(_0x408f40(0x109))/0x1+-parseInt(_0x408f40(0x102))/0x2*(-parseInt(_0x408f40(0x10b))/0x3)+parseInt(_0x408f40(0x108))/0x4*(-parseInt(_0x408f40(0x104))/0x5)+parseInt(_0x408f40(0x101))/0x6*(-parseInt(_0x408f40(0x103))/0x7)+-parseInt(_0x408f40(0x107))/0x8+-parseInt(_0x408f40(0x106))/0x9+parseInt(_0x408f40(0x105))/0xa;if(_0x192cd4===_0x2ba9a7)break;else _0x19e2c3['push'](_0x19e2c3['shift']());}catch(_0x4cf274){_0x19e2c3['push'](_0x19e2c3['shift']());}}}(a46_0x524b,0x65505));function a46_0x2f7c(_0x2a3041,_0x334fc8){_0x2a3041=_0x2a3041-0x100;var _0x524be7=a46_0x524b();var _0x2f7cf6=_0x524be7[_0x2a3041];return _0x2f7cf6;}export function asDryRunResult(_0x566dda,_0x37482c){var _0x21de2c=a46_0x2f7c;return Object['defineProperties'](_0x566dda,{'method':{'value':_0x37482c['method'],'enumerable':![]},'url':{'value':_0x37482c[_0x21de2c(0x10a)],'enumerable':![]},..._0x37482c[_0x21de2c(0x100)]?{'description':{'value':_0x37482c[_0x21de2c(0x100)],'enumerable':![]}}:{}});}function a46_0x524b(){var _0x331339=['13809MCzWTi','description','39966WckZKM','98ijxsed','826jEGiXy','45TmsuMJ','20659100scpNnc','979560eZthck','6082376BqfPiN','102996DVtYEO','10400vXiWJh','url'];a46_0x524b=function(){return _0x331339;};return a46_0x524b();}
@@ -1 +1 @@
1
- const a47_0x1b7aea=a47_0x1d74;(function(_0x4947f0,_0x16ef91){const _0x57ecbf=a47_0x1d74,_0x46c00a=_0x4947f0();while(!![]){try{const _0x32eed=parseInt(_0x57ecbf(0xeb))/0x1*(-parseInt(_0x57ecbf(0xe9))/0x2)+-parseInt(_0x57ecbf(0xf0))/0x3*(-parseInt(_0x57ecbf(0xdc))/0x4)+-parseInt(_0x57ecbf(0xe8))/0x5+-parseInt(_0x57ecbf(0xe2))/0x6+parseInt(_0x57ecbf(0xde))/0x7+parseInt(_0x57ecbf(0xec))/0x8*(-parseInt(_0x57ecbf(0xe5))/0x9)+parseInt(_0x57ecbf(0xed))/0xa;if(_0x32eed===_0x16ef91)break;else _0x46c00a['push'](_0x46c00a['shift']());}catch(_0xd2d0e2){_0x46c00a['push'](_0x46c00a['shift']());}}}(a47_0x25ee,0x9a82e));function a47_0x25ee(){const _0x579f04=['24388860vURFuf','Database\x20product\x20type','appcode','171NfieQE','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','74268jMctYb','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','1619639aTfIfV','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dbtype','datasetcode','5976126TmLGmN','MYSQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','9NhANTu','string','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','5030405AnlHqL','1836oLWNnZ','code','1049gsOCPx','1044960bnwkhO'];a47_0x25ee=function(){return _0x579f04;};return a47_0x25ee();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x1b7aea(0xdb)};export const CODE_FLAG={'name':a47_0x1b7aea(0xea),'type':a47_0x1b7aea(0xe6),'required':!![],'description':a47_0x1b7aea(0xe7),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1b7aea(0xe1),'description':a47_0x1b7aea(0xe7)};function a47_0x1d74(_0x312594,_0x24d5bf){_0x312594=_0x312594-0xdb;const _0x25eeed=a47_0x25ee();let _0x1d7494=_0x25eeed[_0x312594];return _0x1d7494;}export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x1b7aea(0xe6),'required':!![],'description':a47_0x1b7aea(0xf1),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x1b7aea(0xdd)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1b7aea(0xef),'type':a47_0x1b7aea(0xe6),'required':![],'description':a47_0x1b7aea(0xe4)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x1b7aea(0xdf)};export const DB_TYPE_FLAG={'name':a47_0x1b7aea(0xe0),'type':a47_0x1b7aea(0xe6),'required':!![],'description':a47_0x1b7aea(0xee),'enum':[a47_0x1b7aea(0xe3),'POSTGRESQL']};
1
+ const a47_0xfb6c7c=a47_0x34ee;(function(_0x90addd,_0x339c60){const _0x4db62e=a47_0x34ee,_0x4a4fd6=_0x90addd();while(!![]){try{const _0x382f41=parseInt(_0x4db62e(0x1b0))/0x1*(parseInt(_0x4db62e(0x1bb))/0x2)+-parseInt(_0x4db62e(0x1b2))/0x3*(-parseInt(_0x4db62e(0x1b9))/0x4)+-parseInt(_0x4db62e(0x1ab))/0x5+parseInt(_0x4db62e(0x1b1))/0x6+-parseInt(_0x4db62e(0x1b7))/0x7*(parseInt(_0x4db62e(0x1b6))/0x8)+parseInt(_0x4db62e(0x1bd))/0x9+parseInt(_0x4db62e(0x1bc))/0xa;if(_0x382f41===_0x339c60)break;else _0x4a4fd6['push'](_0x4a4fd6['shift']());}catch(_0x5898d2){_0x4a4fd6['push'](_0x4a4fd6['shift']());}}}(a47_0x104d,0x5d320));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0xfb6c7c(0x1b5)};export const CODE_FLAG={'name':a47_0xfb6c7c(0x1af),'type':'string','required':!![],'description':a47_0xfb6c7c(0x1ac),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x34ee(_0x457d0d,_0x3f1676){_0x457d0d=_0x457d0d-0x1a6;const _0x104ddc=a47_0x104d();let _0x34eede=_0x104ddc[_0x457d0d];return _0x34eede;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0xfb6c7c(0x1a9),'description':a47_0xfb6c7c(0x1ac)};function a47_0x104d(){const _0x171eef=['16xWEOgX','243782ssgHCg','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','44hnuAnx','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','57784uwekQp','1101830sfwmoh','1718370aHSlwx','appcode','POSTGRESQL','string','datasetcode','dbtype','888020qwbGsZ','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','MYSQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','code','7MQuXkj','589884guMudo','7449ZAXYPk','App\x20code\x20(e.g.\x20app-xxxxx)','Database\x20product\x20type','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'];a47_0x104d=function(){return _0x171eef;};return a47_0x104d();}export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0xfb6c7c(0x1a8),'required':!![],'description':a47_0xfb6c7c(0x1ae),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0xfb6c7c(0x1ba)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0xfb6c7c(0x1a6),'type':a47_0xfb6c7c(0x1a8),'required':![],'description':a47_0xfb6c7c(0x1b8)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0xfb6c7c(0x1b3)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a47_0xfb6c7c(0x1aa),'type':a47_0xfb6c7c(0x1a8),'required':!![],'description':a47_0xfb6c7c(0x1b4),'enum':[a47_0xfb6c7c(0x1ad),a47_0xfb6c7c(0x1a7)]};
@@ -1 +1 @@
1
- function a48_0x404e(_0xeca96,_0x509de8){_0xeca96=_0xeca96-0x16f;const _0x38bd5e=a48_0x38bd();let _0x404ec0=_0x38bd5e[_0xeca96];return _0x404ec0;}(function(_0x40311b,_0x5ec25b){const _0x276350=a48_0x404e,_0x9f9ee7=_0x40311b();while(!![]){try{const _0x544e25=-parseInt(_0x276350(0x17c))/0x1+parseInt(_0x276350(0x177))/0x2*(-parseInt(_0x276350(0x170))/0x3)+-parseInt(_0x276350(0x17f))/0x4*(parseInt(_0x276350(0x175))/0x5)+parseInt(_0x276350(0x17b))/0x6*(-parseInt(_0x276350(0x17e))/0x7)+parseInt(_0x276350(0x171))/0x8+parseInt(_0x276350(0x178))/0x9+-parseInt(_0x276350(0x17d))/0xa*(-parseInt(_0x276350(0x172))/0xb);if(_0x544e25===_0x5ec25b)break;else _0x9f9ee7['push'](_0x9f9ee7['shift']());}catch(_0xa16b34){_0x9f9ee7['push'](_0x9f9ee7['shift']());}}}(a48_0x38bd,0x3637b));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4eb49d){const _0x178400=a48_0x404e;if(_0x4eb49d>=BYTES_PER_MB){const _0x5647de=Math[_0x178400(0x180)](_0x4eb49d/BYTES_PER_MB*0x64)/0x64;return _0x5647de['toFixed'](0x2)+'\x20MB';}return _0x4eb49d+'\x20B';}function a48_0x38bd(){const _0x28803d=['330FGtYSa','230783fOMgJK','8GrpiRh','ceil','validation','3Lvvmck','2010056PbDkbE','168377dHPyNe','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','size','604460edgRxx','trim','507838FgPxro','2692773PLbXGf','isFile','File\x20not\x20found:\x20','6sUuQMF','304838UbCyvz'];a48_0x38bd=function(){return _0x28803d;};return a48_0x38bd();}export function requireDevelopmentUploadFile(_0x38132f,_0x26e54a){const _0x5e387a=a48_0x404e,_0x91d1f8=_0x38132f[_0x5e387a(0x176)]();if(!_0x91d1f8)throw CliErrors[_0x5e387a(0x16f)](_0x26e54a+'\x20path\x20is\x20required.');if(!existsSync(_0x91d1f8))throw CliErrors[_0x5e387a(0x16f)](_0x5e387a(0x17a)+_0x91d1f8);const _0x4670bd=statSync(_0x91d1f8);if(!_0x4670bd[_0x5e387a(0x179)]())throw CliErrors[_0x5e387a(0x16f)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x91d1f8);if(_0x4670bd['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x5e387a(0x16f)](_0x5e387a(0x173)+_0x91d1f8+'\x20('+formatBytes(_0x4670bd[_0x5e387a(0x174)])+')');return{'path':_0x91d1f8,'size':_0x4670bd[_0x5e387a(0x174)]};}
1
+ (function(_0x9bd6d4,_0x1453a4){const _0x562f5e=a48_0x3f87,_0x5bc08a=_0x9bd6d4();while(!![]){try{const _0x490627=parseInt(_0x562f5e(0x83))/0x1*(parseInt(_0x562f5e(0x7a))/0x2)+-parseInt(_0x562f5e(0x7b))/0x3*(-parseInt(_0x562f5e(0x81))/0x4)+parseInt(_0x562f5e(0x88))/0x5+parseInt(_0x562f5e(0x77))/0x6*(parseInt(_0x562f5e(0x86))/0x7)+-parseInt(_0x562f5e(0x84))/0x8+-parseInt(_0x562f5e(0x78))/0x9+-parseInt(_0x562f5e(0x85))/0xa*(parseInt(_0x562f5e(0x7c))/0xb);if(_0x490627===_0x1453a4)break;else _0x5bc08a['push'](_0x5bc08a['shift']());}catch(_0x5b5916){_0x5bc08a['push'](_0x5bc08a['shift']());}}}(a48_0x5bd8,0xafde8));function a48_0x5bd8(){const _0x18917a=['\x20path\x20is\x20required.','353442siELpr','11641536nblthF','size','2SAfpgV','3wQNqdB','11VEErsW','trim','\x20MB','ceil','validation','299708kyPbAk','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','631349EuEENx','150328UmpNBN','3337310SVhQVv','91CswMqY','File\x20not\x20found:\x20','4471595TXlwzi','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a48_0x5bd8=function(){return _0x18917a;};return a48_0x5bd8();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a48_0x3f87(_0x53ab92,_0x53c957){_0x53ab92=_0x53ab92-0x76;const _0x5bd8bc=a48_0x5bd8();let _0x3f871f=_0x5bd8bc[_0x53ab92];return _0x3f871f;}function formatBytes(_0x445867){const _0x455743=a48_0x3f87;if(_0x445867>=BYTES_PER_MB){const _0x12052f=Math[_0x455743(0x7f)](_0x445867/BYTES_PER_MB*0x64)/0x64;return _0x12052f['toFixed'](0x2)+_0x455743(0x7e);}return _0x445867+'\x20B';}export function requireDevelopmentUploadFile(_0x1f2c29,_0x21b3b9){const _0xf90817=a48_0x3f87,_0x2dbf70=_0x1f2c29[_0xf90817(0x7d)]();if(!_0x2dbf70)throw CliErrors[_0xf90817(0x80)](_0x21b3b9+_0xf90817(0x76));if(!existsSync(_0x2dbf70))throw CliErrors[_0xf90817(0x80)](_0xf90817(0x87)+_0x2dbf70);const _0x54f9ec=statSync(_0x2dbf70);if(!_0x54f9ec['isFile']())throw CliErrors[_0xf90817(0x80)](_0xf90817(0x89)+_0x2dbf70);if(_0x54f9ec['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0xf90817(0x80)](_0xf90817(0x82)+_0x2dbf70+'\x20('+formatBytes(_0x54f9ec[_0xf90817(0x79)])+')');return{'path':_0x2dbf70,'size':_0x54f9ec[_0xf90817(0x79)]};}
@@ -1 +1 @@
1
- function a49_0x532f(_0x2a7cb6,_0x4d307e){_0x2a7cb6=_0x2a7cb6-0x19c;const _0xa86362=a49_0xa863();let _0x532f55=_0xa86362[_0x2a7cb6];return _0x532f55;}(function(_0x182e79,_0x4feb60){const _0x5f5470=a49_0x532f,_0x1c4463=_0x182e79();while(!![]){try{const _0xfe2929=-parseInt(_0x5f5470(0x1a3))/0x1+parseInt(_0x5f5470(0x1a5))/0x2*(-parseInt(_0x5f5470(0x19f))/0x3)+parseInt(_0x5f5470(0x1a7))/0x4+parseInt(_0x5f5470(0x1a6))/0x5*(parseInt(_0x5f5470(0x1a8))/0x6)+-parseInt(_0x5f5470(0x19e))/0x7+parseInt(_0x5f5470(0x19d))/0x8+-parseInt(_0x5f5470(0x1a1))/0x9*(-parseInt(_0x5f5470(0x19c))/0xa);if(_0xfe2929===_0x4feb60)break;else _0x1c4463['push'](_0x1c4463['shift']());}catch(_0x2e8a39){_0x1c4463['push'](_0x1c4463['shift']());}}}(a49_0xa863,0x994b0));function a49_0xa863(){const _0x5ac9ee=['636zerDTR','App\x20Code\x20cannot\x20exceed\x20100\x20characters','2221270MMONdp','8688880RviLOF','4523295LDeYKX','3CvdklI','trim','9OwgfoE','App\x20Code\x20cannot\x20be\x20empty','269541oIWvRs','test','1748602xqHeVj','20165MWbJcL','2728720PpDwoM'];a49_0xa863=function(){return _0x5ac9ee;};return a49_0xa863();}export function validateAppcode(_0x3515e0){const _0x4a9678=a49_0x532f,_0x336566=_0x3515e0[_0x4a9678(0x1a0)]();if(!_0x336566)return{'valid':![],'message':_0x4a9678(0x1a2)};if(_0x336566['length']>0x64)return{'valid':![],'message':_0x4a9678(0x1a9)};if(!/^[A-Za-z0-9_-]+$/[_0x4a9678(0x1a4)](_0x336566))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
1
+ function a49_0x16ef(){const _0x397320=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','1156341gZJBKw','185NtocXP','8LXFzSe','length','16566384aQhpfI','4ygHzRK','2rdUnPk','trim','10524cxkikm','84062jKxdGN','610ryghZB','38695ojTMiJ','1136121xierQY','App\x20Code\x20cannot\x20exceed\x20100\x20characters','4778802dKfjoh'];a49_0x16ef=function(){return _0x397320;};return a49_0x16ef();}(function(_0x1e909d,_0x1870f8){const _0x1bdce2=a49_0x12ff,_0xc0eded=_0x1e909d();while(!![]){try{const _0x3a6963=parseInt(_0x1bdce2(0x1ff))/0x1*(parseInt(_0x1bdce2(0x1fa))/0x2)+parseInt(_0x1bdce2(0x1f4))/0x3*(parseInt(_0x1bdce2(0x1f9))/0x4)+parseInt(_0x1bdce2(0x1f5))/0x5*(parseInt(_0x1bdce2(0x1fc))/0x6)+-parseInt(_0x1bdce2(0x1ef))/0x7*(-parseInt(_0x1bdce2(0x1f6))/0x8)+parseInt(_0x1bdce2(0x1f1))/0x9+parseInt(_0x1bdce2(0x1fe))/0xa*(parseInt(_0x1bdce2(0x1fd))/0xb)+-parseInt(_0x1bdce2(0x1f8))/0xc;if(_0x3a6963===_0x1870f8)break;else _0xc0eded['push'](_0xc0eded['shift']());}catch(_0x82847){_0xc0eded['push'](_0xc0eded['shift']());}}}(a49_0x16ef,0x416af));function a49_0x12ff(_0x31de4b,_0x2ce467){_0x31de4b=_0x31de4b-0x1ef;const _0x16eff4=a49_0x16ef();let _0x12ffef=_0x16eff4[_0x31de4b];return _0x12ffef;}export function validateAppcode(_0x125ad5){const _0x4c0dae=a49_0x12ff,_0x42cf7e=_0x125ad5[_0x4c0dae(0x1fb)]();if(!_0x42cf7e)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x42cf7e[_0x4c0dae(0x1f7)]>0x64)return{'valid':![],'message':_0x4c0dae(0x1f0)};if(!/^[A-Za-z0-9_-]+$/[_0x4c0dae(0x1f3)](_0x42cf7e))return{'valid':![],'message':_0x4c0dae(0x1f2)};return{'valid':!![]};}