@lovrabet/rabetbase-cli 2.4.7-beta.2 → 2.4.7

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/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/search.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/menu/visibility-update.js +1 -1
  137. package/lib/commands/notification/config-create.js +1 -1
  138. package/lib/commands/notification/config-delete.js +1 -1
  139. package/lib/commands/notification/config-list.js +1 -1
  140. package/lib/commands/notification/config-update.js +1 -1
  141. package/lib/commands/notification/index.js +1 -1
  142. package/lib/commands/notification/shared.js +1 -1
  143. package/lib/commands/ocr/index.js +1 -1
  144. package/lib/commands/page/create.js +1 -1
  145. package/lib/commands/page/custom/detail.js +1 -1
  146. package/lib/commands/page/custom/list.js +1 -1
  147. package/lib/commands/page/custom/publish.js +1 -1
  148. package/lib/commands/page/custom/shared.js +1 -1
  149. package/lib/commands/page/custom/syntax.js +1 -1
  150. package/lib/commands/page/custom/template.js +1 -1
  151. package/lib/commands/page/custom/update.js +1 -1
  152. package/lib/commands/page/data-list-status.js +1 -1
  153. package/lib/commands/page/generate-start.js +1 -1
  154. package/lib/commands/page/generate-status.js +1 -1
  155. package/lib/commands/page/index.js +1 -1
  156. package/lib/commands/page/pull.js +1 -1
  157. package/lib/commands/page/push.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/sync.js +1 -1
  162. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  163. package/lib/commands/project/create/format-elapsed.js +1 -1
  164. package/lib/commands/project/create/main.js +1 -1
  165. package/lib/commands/project/create/materialize-project-template.js +1 -1
  166. package/lib/commands/project/create/project-name.js +1 -1
  167. package/lib/commands/project/create/project-template-archive.js +1 -1
  168. package/lib/commands/project/create/project-template-path.js +1 -1
  169. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  170. package/lib/commands/project/create/use-format-code.js +1 -1
  171. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  172. package/lib/commands/project/index.js +1 -1
  173. package/lib/commands/project/upgrade.js +1 -1
  174. package/lib/commands/registry.js +1 -1
  175. package/lib/commands/role/delete.js +1 -1
  176. package/lib/commands/role/detail.js +1 -1
  177. package/lib/commands/role/index.js +1 -1
  178. package/lib/commands/role/list.js +1 -1
  179. package/lib/commands/role/shared.js +1 -1
  180. package/lib/commands/role/update.js +1 -1
  181. package/lib/commands/role/user-add.js +1 -1
  182. package/lib/commands/role/user-remove.js +1 -1
  183. package/lib/commands/role/user-resolve.js +1 -1
  184. package/lib/commands/run/index.js +1 -1
  185. package/lib/commands/schema.js +1 -1
  186. package/lib/commands/sql/create.js +1 -1
  187. package/lib/commands/sql/delete.js +1 -1
  188. package/lib/commands/sql/detail.js +1 -1
  189. package/lib/commands/sql/exec.js +1 -1
  190. package/lib/commands/sql/index.js +1 -1
  191. package/lib/commands/sql/list.js +1 -1
  192. package/lib/commands/sql/pull.js +1 -1
  193. package/lib/commands/sql/push.js +1 -1
  194. package/lib/commands/sql/shared.js +1 -1
  195. package/lib/commands/sql/status.js +1 -1
  196. package/lib/commands/sql/validate.js +1 -1
  197. package/lib/commands/task/index.js +1 -1
  198. package/lib/commands/task/status.js +1 -1
  199. package/lib/commands/tenant/index.js +1 -1
  200. package/lib/commands/tenant/members-list.js +1 -1
  201. package/lib/commands/tenant/shared.js +1 -1
  202. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  203. package/lib/commands/user-account/index.js +1 -1
  204. package/lib/commands/workspace/add.js +1 -1
  205. package/lib/commands/workspace/index.js +1 -1
  206. package/lib/commands/workspace/remove.js +1 -1
  207. package/lib/config/schema.js +1 -1
  208. package/lib/constant/cdn.js +1 -1
  209. package/lib/constant/cli.js +1 -1
  210. package/lib/constant/defaults.js +1 -1
  211. package/lib/constant/domain.js +1 -1
  212. package/lib/constant/env.js +1 -1
  213. package/lib/constant/output.js +1 -1
  214. package/lib/constant/paths.js +1 -1
  215. package/lib/constant/risk.js +1 -1
  216. package/lib/context/app-resolver.js +1 -1
  217. package/lib/context/auth-resolver.js +1 -1
  218. package/lib/context/config-loader.js +1 -1
  219. package/lib/context.js +1 -1
  220. package/lib/core/alias-resolver.js +1 -1
  221. package/lib/core/api-client.js +1 -1
  222. package/lib/core/bff/config.js +1 -1
  223. package/lib/core/bff/file-system.js +1 -1
  224. package/lib/core/bff/hash.js +1 -1
  225. package/lib/core/bff/lock.js +1 -1
  226. package/lib/core/bff/utils.js +1 -1
  227. package/lib/core/db-resolver.js +1 -1
  228. package/lib/core/page/file-system.js +1 -1
  229. package/lib/core/page/hash.js +1 -1
  230. package/lib/core/page/lock.js +1 -1
  231. package/lib/core/sql-index-auditor.js +1 -1
  232. package/lib/core/sql-sync/config.js +1 -1
  233. package/lib/core/sql-sync/file-system.js +1 -1
  234. package/lib/core/sql-sync/hash.js +1 -1
  235. package/lib/core/sql-sync/lock.js +1 -1
  236. package/lib/core/sql-sync/utils.js +1 -1
  237. package/lib/core/sql-validator.js +1 -1
  238. package/lib/errors.js +1 -1
  239. package/lib/framework/build-all-flags.js +1 -1
  240. package/lib/framework/error-output.js +1 -1
  241. package/lib/framework/explicit-yes.js +1 -1
  242. package/lib/framework/flags.js +1 -1
  243. package/lib/framework/help.js +1 -1
  244. package/lib/framework/index.js +1 -1
  245. package/lib/framework/output.js +1 -1
  246. package/lib/framework/response.js +1 -1
  247. package/lib/framework/runner-alias.js +1 -1
  248. package/lib/framework/runner.js +1 -1
  249. package/lib/framework/schema-export.js +1 -1
  250. package/lib/framework/types.js +1 -1
  251. package/lib/generated/build-info.d.ts +4 -4
  252. package/lib/generated/build-info.js +1 -1
  253. package/lib/help.js +1 -1
  254. package/lib/postinstall.js +1 -1
  255. package/lib/runtime/confirmation.js +1 -1
  256. package/lib/runtime/event.js +1 -1
  257. package/lib/runtime/index.js +1 -1
  258. package/lib/runtime/queue.js +1 -1
  259. package/lib/runtime/resolve.js +1 -1
  260. package/lib/skills/builtin-skill.js +1 -1
  261. package/lib/skills/main.js +1 -1
  262. package/lib/skills/npx-skills-add.js +1 -1
  263. package/lib/skills/skill-presence.js +1 -1
  264. package/lib/telemetry/cli-command-trace.js +1 -1
  265. package/lib/telemetry/cli-help-trace.js +1 -1
  266. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  267. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  268. package/lib/telemetry/send-cli-trace-log.js +1 -1
  269. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  270. package/lib/utils/ai_config.js +1 -1
  271. package/lib/utils/apply-jq-filter.js +1 -1
  272. package/lib/utils/cdn-config.js +1 -1
  273. package/lib/utils/check-sdk-version.js +1 -1
  274. package/lib/utils/cli-version-check.js +1 -1
  275. package/lib/utils/cli-version-policy.js +1 -1
  276. package/lib/utils/config.js +1 -1
  277. package/lib/utils/entity-with-id.js +1 -1
  278. package/lib/utils/file-utils.js +1 -1
  279. package/lib/utils/guides-cdn.js +1 -1
  280. package/lib/utils/http-client.js +1 -1
  281. package/lib/utils/is-non-interactive.js +1 -1
  282. package/lib/utils/logger.js +1 -1
  283. package/lib/utils/params.js +1 -1
  284. package/lib/utils/platform.js +1 -1
  285. package/lib/utils/rules-cdn.js +1 -1
  286. package/lib/utils/sleep.js +1 -1
  287. package/lib/utils/template-replacer.js +1 -1
  288. package/lib/utils/update-notice.js +1 -1
  289. package/lib/utils/version.js +1 -1
  290. package/lib/utils/with-active-cookie.js +1 -1
  291. package/lib/utils/write-cli-side-channel.js +1 -1
  292. package/package.json +1 -1
  293. package/skills/rabetbase/SKILL.md +1 -1
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a34_0xef61(){const _0x41eb82=['boolean','bff','6018830LjXpMe','Filter\x20by\x20script\x20name','functionName','type','length','938959yJxVpV','Return\x20full\x20script\x20objects','1885256qhqTxP','179348YefFbp','string','48kYEoSo','scriptType','(unnamed)','verbose','list','13469710kcgvrF','bool','name','ENDPOINT','12128144DoDzkV','description','str','List\x20Backend\x20Function\x20scripts','78pqWKTB','9YzXDBD','1625549IPjFUu'];a34_0xef61=function(){return _0x41eb82;};return a34_0xef61();}const a34_0xb443f6=a34_0x575f;(function(_0x1317e0,_0x542c54){const _0x21275e=a34_0x575f,_0x47f00f=_0x1317e0();while(!![]){try{const _0x14f402=-parseInt(_0x21275e(0xf6))/0x1+-parseInt(_0x21275e(0xe4))/0x2+-parseInt(_0x21275e(0xe7))/0x3*(-parseInt(_0x21275e(0xe5))/0x4)+parseInt(_0x21275e(0xdd))/0x5+-parseInt(_0x21275e(0xf4))/0x6*(-parseInt(_0x21275e(0xe2))/0x7)+-parseInt(_0x21275e(0xf0))/0x8+parseInt(_0x21275e(0xf5))/0x9*(parseInt(_0x21275e(0xec))/0xa);if(_0x14f402===_0x542c54)break;else _0x47f00f['push'](_0x47f00f['shift']());}catch(_0x322ff6){_0x47f00f['push'](_0x47f00f['shift']());}}}(a34_0xef61,0xe27e3));function a34_0x575f(_0x5ed1fe,_0x4e4a9f){_0x5ed1fe=_0x5ed1fe-0xdd;const _0xef6172=a34_0xef61();let _0x575f20=_0xef6172[_0x5ed1fe];return _0x575f20;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0xb443f6(0xf8),'command':a34_0xb443f6(0xeb),'description':a34_0xb443f6(0xf3),'risk':'read','flags':[{'name':'type','type':a34_0xb443f6(0xe6),'description':'Script\x20type\x20filter','default':a34_0xb443f6(0xef),'enum':[a34_0xb443f6(0xef),'COMMON']},{'name':a34_0xb443f6(0xee),'type':'string','description':a34_0xb443f6(0xde)},{'name':a34_0xb443f6(0xea),'type':a34_0xb443f6(0xf7),'description':a34_0xb443f6(0xe3)}],async 'execute'(_0x5b47b8){const _0x2c584d=a34_0xb443f6,_0x3dee09=await listBffScripts(_0x5b47b8['appCode'],_0x5b47b8[_0x2c584d(0xf2)](_0x2c584d(0xe0)),{'scriptName':_0x5b47b8[_0x2c584d(0xf2)]('name')||undefined}),_0x51c419=_0x5b47b8[_0x2c584d(0xed)](_0x2c584d(0xea));return{'ok':!![],'data':_0x51c419?_0x3dee09:_0x3dee09['map'](_0xb2083e=>({'id':_0xb2083e['id'],'functionName':_0xb2083e[_0x2c584d(0xdf)]??'','description':_0xb2083e[_0x2c584d(0xf1)]||_0x2c584d(0xe9),'scriptType':_0xb2083e[_0x2c584d(0xe8)]})),'message':_0x3dee09[_0x2c584d(0xe1)]===0x0?'No\x20Backend\x20Function\x20scripts\x20found.':undefined};}};
1
+ const a34_0x199587=a34_0x3b72;function a34_0x5037(){const _0x2611ed=['bool','440shfxzT','functionName','4961yepsKJ','description','1022804pkUxfm','Filter\x20by\x20script\x20name','list','boolean','11070RRZqVo','13485llngGG','type','94144FBdkUi','174KhKaPE','10310pANuKt','scriptType','string','16353qXoLmS','Script\x20type\x20filter','1576JiSSfU','Return\x20full\x20script\x20objects','3315648RmJlkz','(unnamed)','COMMON','verbose','appCode','str','name','List\x20Backend\x20Function\x20scripts','bff'];a34_0x5037=function(){return _0x2611ed;};return a34_0x5037();}(function(_0x2ec534,_0x70adc6){const _0x3f93a5=a34_0x3b72,_0x50fac6=_0x2ec534();while(!![]){try{const _0x202c19=-parseInt(_0x3f93a5(0x1ec))/0x1+parseInt(_0x3f93a5(0x1e5))/0x2+parseInt(_0x3f93a5(0x1e9))/0x3*(-parseInt(_0x3f93a5(0x1e1))/0x4)+parseInt(_0x3f93a5(0x1ea))/0x5*(-parseInt(_0x3f93a5(0x1ed))/0x6)+-parseInt(_0x3f93a5(0x1d7))/0x7+-parseInt(_0x3f93a5(0x1d5))/0x8*(-parseInt(_0x3f93a5(0x1d3))/0x9)+parseInt(_0x3f93a5(0x1d0))/0xa*(parseInt(_0x3f93a5(0x1e3))/0xb);if(_0x202c19===_0x70adc6)break;else _0x50fac6['push'](_0x50fac6['shift']());}catch(_0x103580){_0x50fac6['push'](_0x50fac6['shift']());}}}(a34_0x5037,0x44f2b));import{listBffScripts}from'../../core/api-client.js';function a34_0x3b72(_0x53a321,_0x422383){_0x53a321=_0x53a321-0x1d0;const _0x5037ac=a34_0x5037();let _0x3b7228=_0x5037ac[_0x53a321];return _0x3b7228;}export const bffList={'service':a34_0x199587(0x1df),'command':a34_0x199587(0x1e7),'description':a34_0x199587(0x1de),'risk':'read','flags':[{'name':'type','type':a34_0x199587(0x1d2),'description':a34_0x199587(0x1d4),'default':'ENDPOINT','enum':['ENDPOINT',a34_0x199587(0x1d9)]},{'name':a34_0x199587(0x1dd),'type':'string','description':a34_0x199587(0x1e6)},{'name':a34_0x199587(0x1da),'type':a34_0x199587(0x1e8),'description':a34_0x199587(0x1d6)}],async 'execute'(_0x67a784){const _0xab8cd5=a34_0x199587,_0x2c13b7=await listBffScripts(_0x67a784[_0xab8cd5(0x1db)],_0x67a784[_0xab8cd5(0x1dc)](_0xab8cd5(0x1eb)),{'scriptName':_0x67a784[_0xab8cd5(0x1dc)]('name')||undefined}),_0x10caf6=_0x67a784[_0xab8cd5(0x1e0)]('verbose');return{'ok':!![],'data':_0x10caf6?_0x2c13b7:_0x2c13b7['map'](_0x3a4745=>({'id':_0x3a4745['id'],'functionName':_0x3a4745[_0xab8cd5(0x1e2)]??'','description':_0x3a4745[_0xab8cd5(0x1e4)]||_0xab8cd5(0x1d8),'scriptType':_0x3a4745[_0xab8cd5(0x1d1)]})),'message':_0x2c13b7['length']===0x0?'No\x20Backend\x20Function\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
1
- const a35_0x6eb12=a35_0xf5e0;(function(_0x2bec7c,_0x27c396){const _0x337292=a35_0xf5e0,_0x50769d=_0x2bec7c();while(!![]){try{const _0x14841c=-parseInt(_0x337292(0x211))/0x1*(parseInt(_0x337292(0x204))/0x2)+-parseInt(_0x337292(0x1fe))/0x3+-parseInt(_0x337292(0x216))/0x4+parseInt(_0x337292(0x1ec))/0x5*(-parseInt(_0x337292(0x214))/0x6)+parseInt(_0x337292(0x1e2))/0x7*(-parseInt(_0x337292(0x206))/0x8)+parseInt(_0x337292(0x1f7))/0x9*(parseInt(_0x337292(0x1fd))/0xa)+parseInt(_0x337292(0x20b))/0xb;if(_0x14841c===_0x27c396)break;else _0x50769d['push'](_0x50769d['shift']());}catch(_0x48a96b){_0x50769d['push'](_0x50769d['shift']());}}}(a35_0x3a62,0xc6097));function a35_0x3a62(){const _0x723f26=['pull','\x20pulled,\x20','functionNode','push','Pull\x20only\x20this\x20script\x20type','all','operationType','Pull\x20complete:\x20','functionName','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','length','functions','map','bff','boolean','119rvdAYx','type','stdin','includes','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','GET','alias','hookLocation','hash','Would\x20inspect\x20','424405wLnqiP','\x22\x20not\x20found\x20after\x20ensureLockScope.','trim','filePath','validation','Force\x20pull\x20cancelled.','\x20skipped,\x20','bool','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','cancelled','lockKey','549eqnukr','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','appCode','&type=','conflict','scriptType','120830nHWUGS','1689450JJOnXx','would_pull','datasetCode','\x20failed','HOOK','version','1210868nnBIGD','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','78424SxZSdP','local\x20unsynced\x20changes','stringify','apiDir','force','25429679eCHTEb','unresolvable\x20target\x20path','toLowerCase','scriptContent','Lock\x20scope\x20for\x20app\x20\x22','skipped','1XlTlEn','parse','message','36GlYjnm','str','1572688nYsRbB','close','lockFilePath'];a35_0x3a62=function(){return _0x723f26;};return a35_0x3a62();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x6eb12(0x1e0),'command':a35_0x6eb12(0x219),'description':a35_0x6eb12(0x1f4),'risk':'read','flags':[{'name':a35_0x6eb12(0x1e3),'type':'string','description':a35_0x6eb12(0x21d),'enum':['COMMON','ENDPOINT',a35_0x6eb12(0x202)]},{'name':a35_0x6eb12(0x20a),'type':a35_0x6eb12(0x1e1),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x213feb){const _0x723f35=a35_0x6eb12,_0x42359e=loadBffProjectConfig(_0x213feb[_0x723f35(0x1f9)]),_0x5037b7=await readBffLockFile(_0x42359e[_0x723f35(0x218)]),{appLock:_0x49b805}=ensureLockScope(_0x5037b7??createEmptyBffLock(),_0x213feb[_0x723f35(0x1f9)],_0x42359e['scriptsRoot'],_0x723f35(0x219)),_0x49c7ca=normalizeBffType(_0x213feb[_0x723f35(0x215)](_0x723f35(0x1e3)))??undefined,_0x11c42c=buildDatasetCodeToAliasMap(_0x213feb['apiDir'],_0x213feb['appCode']),[_0x4965d2,_0x44e064]=await Promise['all']([listBffScripts(_0x213feb[_0x723f35(0x1f9)],_0x49c7ca),getBffScriptStatistics(_0x213feb[_0x723f35(0x1f9)])]),_0x117baf=createHookLocationMap(_0x44e064),_0x314210=[];for(const _0x42eabe of _0x4965d2){const _0x5b930d=resolveRemoteScriptTarget(_0x42359e,_0x42eabe,_0x117baf,_0x49b805[_0x723f35(0x224)],_0x11c42c);if(!_0x5b930d){_0x314210[_0x723f35(0x21c)]({'scriptType':_0x42eabe[_0x723f35(0x1fc)],'functionName':_0x42eabe[_0x723f35(0x221)]??'','status':_0x723f35(0x210),'reason':_0x723f35(0x20c)});continue;}const _0x7d84f3=_0x49b805['functions'][_0x5b930d[_0x723f35(0x1f6)]],_0x3e4899=_0x42eabe[_0x723f35(0x20e)]!=null?computeContentHash(_0x42eabe['scriptContent']):undefined,_0x3da1ba=await hasUnsyncedLocalChanges(_0x5b930d[_0x723f35(0x1ef)],_0x7d84f3,_0x3e4899);_0x314210[_0x723f35(0x21c)]({'lockKey':_0x5b930d[_0x723f35(0x1f6)],'filePath':_0x5b930d[_0x723f35(0x1ef)],'remoteId':_0x42eabe['id']??null,'status':_0x3da1ba?_0x723f35(0x1fb):_0x723f35(0x1ff)});}return{'method':_0x723f35(0x1e7),'url':'/api/management/library/scripts/list?appCode='+_0x213feb[_0x723f35(0x1f9)]+(_0x49c7ca?_0x723f35(0x1fa)+_0x49c7ca:''),'body':{'appCode':_0x213feb['appCode'],'filterType':_0x49c7ca??null,'files':_0x314210},'description':_0x723f35(0x1eb)+_0x314210[_0x723f35(0x223)]+_0x723f35(0x222)};},async 'execute'(_0x5396ee){const _0x55b082=a35_0x6eb12,_0x37a6b8=loadBffProjectConfig(_0x5396ee[_0x55b082(0x1f9)]),_0x582f7d=await readBffLockFile(_0x37a6b8[_0x55b082(0x218)]),{lockData:_0x31bf60,appLock:_0x3dd54b}=ensureLockScope(_0x582f7d??createEmptyBffLock(),_0x5396ee[_0x55b082(0x1f9)],_0x37a6b8['scriptsRoot'],_0x55b082(0x219)),_0x4e01f2=normalizeBffType(_0x5396ee[_0x55b082(0x215)]('type'))??undefined;if(_0x5396ee[_0x55b082(0x215)](_0x55b082(0x1e3))&&!_0x4e01f2)throw CliErrors[_0x55b082(0x1f0)](_0x55b082(0x1f8));const [_0x4353ef,_0x2ff2a9]=await Promise[_0x55b082(0x21e)]([listBffScripts(_0x5396ee['appCode'],_0x4e01f2),getBffScriptStatistics(_0x5396ee['appCode'])]);if(_0x4353ef['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x55b082(0x1e6)};const _0x148d66=_0x5396ee[_0x55b082(0x1f3)](_0x55b082(0x20a));if(_0x148d66&&!_0x5396ee['nonInteractive']){const _0x15c732=await confirmForce();if(!_0x15c732)throw CliErrors[_0x55b082(0x1f5)](_0x55b082(0x1f1));}if(_0x148d66&&_0x5396ee['nonInteractive']){}const _0x44f5c7=buildDatasetCodeToAliasMap(_0x5396ee[_0x55b082(0x209)],_0x5396ee[_0x55b082(0x1f9)]),_0x320088=createHookLocationMap(_0x2ff2a9),_0x13547f=JSON[_0x55b082(0x212)](JSON[_0x55b082(0x208)](_0x31bf60)),_0x599173=_0x5396ee[_0x55b082(0x1f9)],_0x2eafb3=_0x13547f['apps'][_0x599173];if(!_0x2eafb3)throw new Error(_0x55b082(0x20f)+_0x599173+_0x55b082(0x1ed));const _0x46e276=[],_0x5f139a=[],_0x41b857=[];for(const _0x5882ae of _0x4353ef){const _0x3ec23d=resolveRemoteScriptTarget(_0x37a6b8,_0x5882ae,_0x320088,_0x3dd54b[_0x55b082(0x224)],_0x44f5c7);if(!_0x3ec23d){_0x5f139a[_0x55b082(0x21c)]({'lockKey':_0x5882ae[_0x55b082(0x1fc)]+'/'+_0x5882ae[_0x55b082(0x221)],'reason':_0x55b082(0x20c)});continue;}const _0x2cb92f=_0x3dd54b[_0x55b082(0x224)][_0x3ec23d['lockKey']];try{if(!_0x5882ae['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x5882ae[_0x55b082(0x20e)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x2b326c=_0x5882ae['scriptContent'],_0x5222af=computeContentHash(_0x2b326c);if(!_0x148d66){const _0x352ab7=await hasUnsyncedLocalChanges(_0x3ec23d[_0x55b082(0x1ef)],_0x2cb92f,_0x5222af);if(_0x352ab7){_0x5f139a['push']({'lockKey':_0x3ec23d[_0x55b082(0x1f6)],'reason':_0x55b082(0x207)});continue;}}await ensureParentDirectory(_0x3ec23d['filePath']),await writeFile(_0x3ec23d[_0x55b082(0x1ef)],_0x2b326c,'utf8');const _0x4ddcc1={'hash':_0x5222af,'remoteId':_0x5882ae['id'],'version':_0x5882ae[_0x55b082(0x203)]};_0x3ec23d[_0x55b082(0x1e3)]==='HOOK'&&_0x3ec23d[_0x55b082(0x1e9)]&&(_0x4ddcc1['alias']=_0x3ec23d['hookLocation'][_0x55b082(0x1e8)],_0x4ddcc1['datasetCode']=_0x3ec23d['hookLocation'][_0x55b082(0x200)],_0x4ddcc1[_0x55b082(0x21f)]=_0x3ec23d[_0x55b082(0x1e9)][_0x55b082(0x21f)],_0x4ddcc1[_0x55b082(0x21b)]=_0x3ec23d['hookLocation'][_0x55b082(0x21b)]),_0x2eafb3[_0x55b082(0x224)][_0x3ec23d['lockKey']]=_0x4ddcc1,_0x46e276['push']({'lockKey':_0x3ec23d[_0x55b082(0x1f6)],'remoteId':_0x5882ae['id']});}catch(_0x4f6ec5){_0x41b857[_0x55b082(0x21c)]({'lockKey':_0x3ec23d[_0x55b082(0x1f6)],'error':_0x4f6ec5 instanceof Error?_0x4f6ec5[_0x55b082(0x213)]:String(_0x4f6ec5)});}}return _0x2eafb3['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x37a6b8[_0x55b082(0x218)],_0x13547f),{'ok':_0x41b857[_0x55b082(0x223)]===0x0,'data':{'pulled':_0x46e276,'skipped':_0x5f139a,'failed':_0x41b857},'message':_0x55b082(0x220)+_0x46e276[_0x55b082(0x223)]+_0x55b082(0x21a)+_0x5f139a[_0x55b082(0x223)]+_0x55b082(0x1f2)+_0x41b857[_0x55b082(0x223)]+_0x55b082(0x201)};}};async function hasUnsyncedLocalChanges(_0x4f9beb,_0x3443da,_0x7574aa){const _0x2c732c=a35_0x6eb12;if(!await fileExists(_0x4f9beb))return![];const _0x5544e8=await computeFileHash(_0x4f9beb);if(!_0x3443da)return _0x7574aa?_0x5544e8!==_0x7574aa:!![];return _0x5544e8!==_0x3443da[_0x2c732c(0x1ea)];}function a35_0xf5e0(_0x45bee8,_0x1089b0){_0x45bee8=_0x45bee8-0x1df;const _0x3a62d5=a35_0x3a62();let _0xf5e0f1=_0x3a62d5[_0x45bee8];return _0xf5e0f1;}function buildDatasetCodeToAliasMap(_0x47b2ee,_0x5546a6){const _0x253783=a35_0x6eb12,_0x159c98=loadAliasMap(_0x47b2ee,undefined,resolveApiFilePath(_0x47b2ee,_0x5546a6));return new Map(_0x159c98[_0x253783(0x1df)](_0x518ef8=>[_0x518ef8[_0x253783(0x200)],_0x518ef8[_0x253783(0x1e8)]]));}async function confirmForce(){const _0x2a8e1f=a35_0x6eb12,_0x324c17=createInterface({'input':process[_0x2a8e1f(0x1e4)],'output':process['stderr']}),_0x400538=await new Promise(_0x17d964=>{const _0x39dbe1=_0x2a8e1f;_0x324c17['question'](_0x39dbe1(0x205),_0x17d964);});return _0x324c17[_0x2a8e1f(0x217)](),['y','yes'][_0x2a8e1f(0x1e5)](_0x400538[_0x2a8e1f(0x1ee)]()[_0x2a8e1f(0x20d)]());}
1
+ const a35_0x1907c9=a35_0x31f6;function a35_0x31f6(_0x3170d9,_0x3ac88c){_0x3170d9=_0x3170d9-0x1a3;const _0x2c578a=a35_0x2c57();let _0x31f68a=_0x2c578a[_0x3170d9];return _0x31f68a;}(function(_0x52c44b,_0x529a8b){const _0x431941=a35_0x31f6,_0xac1a4=_0x52c44b();while(!![]){try{const _0x1b54ff=parseInt(_0x431941(0x1d9))/0x1+parseInt(_0x431941(0x1c3))/0x2+-parseInt(_0x431941(0x1e3))/0x3*(-parseInt(_0x431941(0x1e9))/0x4)+parseInt(_0x431941(0x1d3))/0x5+-parseInt(_0x431941(0x1cd))/0x6*(-parseInt(_0x431941(0x1be))/0x7)+-parseInt(_0x431941(0x1b3))/0x8*(-parseInt(_0x431941(0x1d5))/0x9)+-parseInt(_0x431941(0x1c7))/0xa*(parseInt(_0x431941(0x1ec))/0xb);if(_0x1b54ff===_0x529a8b)break;else _0xac1a4['push'](_0xac1a4['shift']());}catch(_0x173c75){_0xac1a4['push'](_0xac1a4['shift']());}}}(a35_0x2c57,0x45fb7));import{createInterface}from'node:readline';function a35_0x2c57(){const _0x50938c=['apiDir','conflict','stdin','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','read','bool','local\x20unsynced\x20changes','length','appCode','28qOvhGF','Lock\x20scope\x20for\x20app\x20\x22','Would\x20inspect\x20','scriptContent','lastSync','941850gRKtpe','scriptsRoot','version','lockFilePath','110SdmhuC','alias','hookLocation','/api/management/library/scripts/list?appCode=','Force\x20pull\x20cancelled.','functions','126168NIXkGf','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','\x20skipped,\x20','nonInteractive','scriptType','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','2505640gNhDsY','cancelled','18vYvUQe','pull','push','toISOString','337507ecUnXA','all','yes','datasetCode','functionName','GET','boolean','\x22\x20not\x20found\x20after\x20ensureLockScope.','Remote\x20script\x20missing\x20id.','str','20286fOtHeR','&type=','message','utf8','toLowerCase','close','124hCvgqf','operationType','includes','1457489hKOoga','force','apps','map','ENDPOINT','lockKey','Pull\x20complete:\x20','HOOK','filePath','stderr','Pull\x20only\x20this\x20script\x20type','functionNode','bff','validation','trim','type','parse','Remote\x20script\x20missing\x20content.','563368zRnUQj','unresolvable\x20target\x20path'];a35_0x2c57=function(){return _0x50938c;};return a35_0x2c57();}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x1907c9(0x1ad),'command':'pull','description':a35_0x1907c9(0x1d2),'risk':a35_0x1907c9(0x1b9),'flags':[{'name':a35_0x1907c9(0x1b0),'type':'string','description':a35_0x1907c9(0x1ab),'enum':['COMMON',a35_0x1907c9(0x1a5),'HOOK']},{'name':a35_0x1907c9(0x1ed),'type':a35_0x1907c9(0x1df),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x415c5f){const _0x52b33d=a35_0x1907c9,_0x3a22db=loadBffProjectConfig(_0x415c5f['appCode']),_0x3e700=await readBffLockFile(_0x3a22db[_0x52b33d(0x1c6)]),{appLock:_0x1356e0}=ensureLockScope(_0x3e700??createEmptyBffLock(),_0x415c5f[_0x52b33d(0x1bd)],_0x3a22db[_0x52b33d(0x1c4)],_0x52b33d(0x1d6)),_0x10a2f8=normalizeBffType(_0x415c5f[_0x52b33d(0x1e2)](_0x52b33d(0x1b0)))??undefined,_0x9a2b3d=buildDatasetCodeToAliasMap(_0x415c5f[_0x52b33d(0x1b5)],_0x415c5f['appCode']),[_0x3d4bba,_0x147a29]=await Promise['all']([listBffScripts(_0x415c5f[_0x52b33d(0x1bd)],_0x10a2f8),getBffScriptStatistics(_0x415c5f[_0x52b33d(0x1bd)])]),_0x1ffb21=createHookLocationMap(_0x147a29),_0x535a3d=[];for(const _0x2e4789 of _0x3d4bba){const _0x4becbe=resolveRemoteScriptTarget(_0x3a22db,_0x2e4789,_0x1ffb21,_0x1356e0[_0x52b33d(0x1cc)],_0x9a2b3d);if(!_0x4becbe){_0x535a3d['push']({'scriptType':_0x2e4789[_0x52b33d(0x1d1)],'functionName':_0x2e4789[_0x52b33d(0x1dd)]??'','status':'skipped','reason':'unresolvable\x20target\x20path'});continue;}const _0x588a1b=_0x1356e0[_0x52b33d(0x1cc)][_0x4becbe[_0x52b33d(0x1a6)]],_0x587e80=_0x2e4789[_0x52b33d(0x1c1)]!=null?computeContentHash(_0x2e4789[_0x52b33d(0x1c1)]):undefined,_0x1c1754=await hasUnsyncedLocalChanges(_0x4becbe['filePath'],_0x588a1b,_0x587e80);_0x535a3d[_0x52b33d(0x1d7)]({'lockKey':_0x4becbe['lockKey'],'filePath':_0x4becbe[_0x52b33d(0x1a9)],'remoteId':_0x2e4789['id']??null,'status':_0x1c1754?_0x52b33d(0x1b6):'would_pull'});}return{'method':_0x52b33d(0x1de),'url':_0x52b33d(0x1ca)+_0x415c5f[_0x52b33d(0x1bd)]+(_0x10a2f8?_0x52b33d(0x1e4)+_0x10a2f8:''),'body':{'appCode':_0x415c5f[_0x52b33d(0x1bd)],'filterType':_0x10a2f8??null,'files':_0x535a3d},'description':_0x52b33d(0x1c0)+_0x535a3d[_0x52b33d(0x1bc)]+'\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull'};},async 'execute'(_0x510459){const _0x359691=a35_0x1907c9,_0x15cc0c=loadBffProjectConfig(_0x510459[_0x359691(0x1bd)]),_0x589d5b=await readBffLockFile(_0x15cc0c[_0x359691(0x1c6)]),{lockData:_0x4ba55b,appLock:_0x144dee}=ensureLockScope(_0x589d5b??createEmptyBffLock(),_0x510459[_0x359691(0x1bd)],_0x15cc0c['scriptsRoot'],_0x359691(0x1d6)),_0x2d78ea=normalizeBffType(_0x510459['str'](_0x359691(0x1b0)))??undefined;if(_0x510459[_0x359691(0x1e2)](_0x359691(0x1b0))&&!_0x2d78ea)throw CliErrors[_0x359691(0x1ae)](_0x359691(0x1b8));const [_0x25a839,_0x24f5c5]=await Promise[_0x359691(0x1da)]([listBffScripts(_0x510459[_0x359691(0x1bd)],_0x2d78ea),getBffScriptStatistics(_0x510459[_0x359691(0x1bd)])]);if(_0x25a839['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x359691(0x1ce)};const _0x25dd5a=_0x510459[_0x359691(0x1ba)]('force');if(_0x25dd5a&&!_0x510459['nonInteractive']){const _0xd0964=await confirmForce();if(!_0xd0964)throw CliErrors[_0x359691(0x1d4)](_0x359691(0x1cb));}if(_0x25dd5a&&_0x510459[_0x359691(0x1d0)]){}const _0x29e914=buildDatasetCodeToAliasMap(_0x510459['apiDir'],_0x510459[_0x359691(0x1bd)]),_0x4606b3=createHookLocationMap(_0x24f5c5),_0x1814d7=JSON[_0x359691(0x1b1)](JSON['stringify'](_0x4ba55b)),_0x5d9d73=_0x510459[_0x359691(0x1bd)],_0x39bd59=_0x1814d7[_0x359691(0x1a3)][_0x5d9d73];if(!_0x39bd59)throw new Error(_0x359691(0x1bf)+_0x5d9d73+_0x359691(0x1e0));const _0x34afc7=[],_0x1b4b15=[],_0x3de121=[];for(const _0x2a3bdf of _0x25a839){const _0x4c5489=resolveRemoteScriptTarget(_0x15cc0c,_0x2a3bdf,_0x4606b3,_0x144dee['functions'],_0x29e914);if(!_0x4c5489){_0x1b4b15[_0x359691(0x1d7)]({'lockKey':_0x2a3bdf[_0x359691(0x1d1)]+'/'+_0x2a3bdf[_0x359691(0x1dd)],'reason':_0x359691(0x1b4)});continue;}const _0x563d22=_0x144dee['functions'][_0x4c5489['lockKey']];try{if(!_0x2a3bdf['id'])throw new Error(_0x359691(0x1e1));if(_0x2a3bdf[_0x359691(0x1c1)]==null)throw new Error(_0x359691(0x1b2));const _0x1de40e=_0x2a3bdf[_0x359691(0x1c1)],_0x564060=computeContentHash(_0x1de40e);if(!_0x25dd5a){const _0x3d7f08=await hasUnsyncedLocalChanges(_0x4c5489[_0x359691(0x1a9)],_0x563d22,_0x564060);if(_0x3d7f08){_0x1b4b15[_0x359691(0x1d7)]({'lockKey':_0x4c5489[_0x359691(0x1a6)],'reason':_0x359691(0x1bb)});continue;}}await ensureParentDirectory(_0x4c5489[_0x359691(0x1a9)]),await writeFile(_0x4c5489[_0x359691(0x1a9)],_0x1de40e,_0x359691(0x1e6));const _0x498fad={'hash':_0x564060,'remoteId':_0x2a3bdf['id'],'version':_0x2a3bdf[_0x359691(0x1c5)]};_0x4c5489['type']===_0x359691(0x1a8)&&_0x4c5489['hookLocation']&&(_0x498fad['alias']=_0x4c5489['hookLocation']['alias'],_0x498fad['datasetCode']=_0x4c5489[_0x359691(0x1c9)][_0x359691(0x1dc)],_0x498fad[_0x359691(0x1ea)]=_0x4c5489[_0x359691(0x1c9)]['operationType'],_0x498fad[_0x359691(0x1ac)]=_0x4c5489[_0x359691(0x1c9)][_0x359691(0x1ac)]),_0x39bd59[_0x359691(0x1cc)][_0x4c5489[_0x359691(0x1a6)]]=_0x498fad,_0x34afc7[_0x359691(0x1d7)]({'lockKey':_0x4c5489[_0x359691(0x1a6)],'remoteId':_0x2a3bdf['id']});}catch(_0x15c074){_0x3de121['push']({'lockKey':_0x4c5489[_0x359691(0x1a6)],'error':_0x15c074 instanceof Error?_0x15c074[_0x359691(0x1e5)]:String(_0x15c074)});}}return _0x39bd59[_0x359691(0x1c2)]=new Date()[_0x359691(0x1d8)](),await writeBffLockFile(_0x15cc0c[_0x359691(0x1c6)],_0x1814d7),{'ok':_0x3de121[_0x359691(0x1bc)]===0x0,'data':{'pulled':_0x34afc7,'skipped':_0x1b4b15,'failed':_0x3de121},'message':_0x359691(0x1a7)+_0x34afc7[_0x359691(0x1bc)]+'\x20pulled,\x20'+_0x1b4b15[_0x359691(0x1bc)]+_0x359691(0x1cf)+_0x3de121[_0x359691(0x1bc)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x3a4576,_0x3bbe1c,_0x2b70b0){if(!await fileExists(_0x3a4576))return![];const _0x216575=await computeFileHash(_0x3a4576);if(!_0x3bbe1c)return _0x2b70b0?_0x216575!==_0x2b70b0:!![];return _0x216575!==_0x3bbe1c['hash'];}function buildDatasetCodeToAliasMap(_0x334a44,_0xf8909f){const _0x2e69eb=a35_0x1907c9,_0xac339f=loadAliasMap(_0x334a44,undefined,resolveApiFilePath(_0x334a44,_0xf8909f));return new Map(_0xac339f[_0x2e69eb(0x1a4)](_0x267f1e=>[_0x267f1e['datasetCode'],_0x267f1e[_0x2e69eb(0x1c8)]]));}async function confirmForce(){const _0x36ea90=a35_0x1907c9,_0x3a7f40=createInterface({'input':process[_0x36ea90(0x1b7)],'output':process[_0x36ea90(0x1aa)]}),_0x138cf3=await new Promise(_0x4f90b6=>{_0x3a7f40['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x4f90b6);});return _0x3a7f40[_0x36ea90(0x1e8)](),['y',_0x36ea90(0x1db)][_0x36ea90(0x1eb)](_0x138cf3[_0x36ea90(0x1af)]()[_0x36ea90(0x1e7)]());}
@@ -1 +1 @@
1
- const a36_0x4faabe=a36_0x204a;(function(_0x14b5b4,_0x32fcb3){const _0x369ff8=a36_0x204a,_0x2422b8=_0x14b5b4();while(!![]){try{const _0x275535=parseInt(_0x369ff8(0xaf))/0x1+parseInt(_0x369ff8(0xc2))/0x2+-parseInt(_0x369ff8(0xc1))/0x3+parseInt(_0x369ff8(0xd9))/0x4*(-parseInt(_0x369ff8(0xea))/0x5)+parseInt(_0x369ff8(0xb6))/0x6*(parseInt(_0x369ff8(0xb9))/0x7)+-parseInt(_0x369ff8(0xd2))/0x8+-parseInt(_0x369ff8(0xf8))/0x9;if(_0x275535===_0x32fcb3)break;else _0x2422b8['push'](_0x2422b8['shift']());}catch(_0x1cce3e){_0x2422b8['push'](_0x2422b8['shift']());}}}(a36_0x2892,0xeda6c));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a36_0x204a(_0x544503,_0x2c810c){_0x544503=_0x544503-0xa9;const _0x289299=a36_0x2892();let _0x204ae0=_0x289299[_0x544503];return _0x204ae0;}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_0x4faabe(0xdd),'description':a36_0x4faabe(0xbf),'risk':a36_0x4faabe(0xcf),'flags':[{'name':'type','type':a36_0x4faabe(0xc6),'description':a36_0x4faabe(0xf6),'enum':[a36_0x4faabe(0xd4),'ENDPOINT',a36_0x4faabe(0xd6)]},{'name':'name','type':a36_0x4faabe(0xc6),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':'force','type':'boolean','description':a36_0x4faabe(0xe0)}],async 'dryRun'(_0x2c270d){const _0x446ee5=a36_0x4faabe,_0x1e5ad0=loadBffProjectConfig(_0x2c270d[_0x446ee5(0xfa)]),_0x5a1ce6=await readBffLockFile(_0x1e5ad0[_0x446ee5(0xe4)]),{appLock:_0x36fe63}=ensureLockScope(_0x5a1ce6??createEmptyBffLock(),_0x2c270d[_0x446ee5(0xfa)],_0x1e5ad0['scriptsRoot'],_0x446ee5(0xdd)),_0x4d43a0=await getTargetFunctions(_0x1e5ad0,_0x2c270d),_0x29b24f=_0x2c270d['bool'](_0x446ee5(0xf1)),_0x2af7c=[];for(const _0x5c3335 of _0x4d43a0){const _0x1ca159=await computeFileHash(_0x5c3335['filePath']),_0x955661=_0x36fe63['functions'][_0x5c3335[_0x446ee5(0xee)]],_0x5867ee=!!_0x955661&&_0x955661['hash']===_0x1ca159;_0x2af7c[_0x446ee5(0xdd)]({'lockKey':_0x5c3335[_0x446ee5(0xee)],'filePath':_0x5c3335[_0x446ee5(0xe7)],'remoteId':_0x955661?.[_0x446ee5(0xb4)]??null,'mode':_0x955661?.['remoteId']?_0x446ee5(0xc5):_0x446ee5(0xf0),'status':!_0x29b24f&&_0x5867ee?'unchanged':'would_push'});}return{'method':_0x446ee5(0xd7),'url':_0x446ee5(0xb7),'body':{'appCode':_0x2c270d[_0x446ee5(0xfa)],'force':_0x29b24f,'files':_0x2af7c,'cacheClearAtRuntime':_0x2af7c[_0x446ee5(0xac)](_0x212867=>_0x212867[_0x446ee5(0xda)]===_0x446ee5(0xaa)),'cacheClearAtRuntimeTimes':_0x2af7c[_0x446ee5(0xac)](_0x1c9269=>_0x1c9269['status']===_0x446ee5(0xaa))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x2af7c[_0x446ee5(0xce)]+_0x446ee5(0xef)};},async 'execute'(_0x535a08){const _0x1316c5=a36_0x4faabe,_0x5efff5=loadBffProjectConfig(_0x535a08[_0x1316c5(0xfa)]),_0x78853c=await readBffLockFile(_0x5efff5[_0x1316c5(0xe4)]),{lockData:_0x4555ac,appLock:_0x214d56}=ensureLockScope(_0x78853c??createEmptyBffLock(),_0x535a08['appCode'],_0x5efff5[_0x1316c5(0xbd)],_0x1316c5(0xdd)),_0xf3ef60=await getTargetFunctions(_0x5efff5,_0x535a08);if(_0xf3ef60['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1316c5(0xf4)};const _0x48ea6a=_0x535a08[_0x1316c5(0xdf)](_0x1316c5(0xf1)),_0x522b34=JSON[_0x1316c5(0xe2)](JSON[_0x1316c5(0xde)](_0x4555ac)),_0x46ece3=_0x522b34[_0x1316c5(0xc3)][_0x535a08[_0x1316c5(0xfa)]];if(!_0x46ece3)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x535a08[_0x1316c5(0xfa)]+_0x1316c5(0xfb));const _0x983fae=await buildHookMaps(_0x535a08[_0x1316c5(0xfa)],_0x535a08[_0x1316c5(0xed)],_0xf3ef60,_0x46ece3),_0xbda3f8=[],_0x38d8ab=[],_0x10376e=[];for(const _0x3905a2 of _0xf3ef60){const _0x11c196=await computeFileHash(_0x3905a2[_0x1316c5(0xe7)]),_0x42aa7d=_0x46ece3['functions'][_0x3905a2[_0x1316c5(0xee)]];if(!_0x48ea6a&&_0x42aa7d&&_0x42aa7d['hash']===_0x11c196){_0x38d8ab[_0x1316c5(0xdd)]({'lockKey':_0x3905a2[_0x1316c5(0xee)],'reason':_0x1316c5(0xdb)});continue;}try{await uploadSingleFunction(_0x535a08[_0x1316c5(0xfa)],_0x3905a2,_0x46ece3,_0x983fae);const _0x511f34=_0x46ece3['functions'][_0x3905a2[_0x1316c5(0xee)]];_0xbda3f8[_0x1316c5(0xdd)]({'lockKey':_0x3905a2['lockKey'],'remoteId':_0x511f34?.[_0x1316c5(0xb4)]??0x0});}catch(_0x25f5a4){_0x10376e['push']({'lockKey':_0x3905a2[_0x1316c5(0xee)],'error':_0x25f5a4 instanceof Error?_0x25f5a4[_0x1316c5(0xd5)]:String(_0x25f5a4)});}}_0x46ece3[_0x1316c5(0xcc)]=new Date()[_0x1316c5(0xa9)](),await writeBffLockFile(_0x5efff5[_0x1316c5(0xe4)],_0x522b34),await waitForUploadedLockEntries(_0x5efff5['lockFilePath'],_0x535a08[_0x1316c5(0xfa)],_0xbda3f8['map'](_0x5f35ad=>_0x5f35ad[_0x1316c5(0xee)]));let _0x493077={'attempted':![],'cleared':![]};if(_0xbda3f8['length']>0x0)try{let _0x48b2a9='';for(let _0x3771cf=0x0;_0x3771cf<CACHE_CLEAR_ATTEMPTS;_0x3771cf+=0x1){_0x48b2a9=await clearBffScriptCache(),_0x3771cf<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x493077={'attempted':!![],'cleared':!![],'message':_0x48b2a9||_0x1316c5(0xba)};}catch(_0x150856){_0x493077={'attempted':!![],'cleared':![],'error':_0x150856 instanceof Error?_0x150856[_0x1316c5(0xd5)]:String(_0x150856)};}const _0x3b9e9e=_0x10376e['length']===0x0&&(_0x493077['attempted']?_0x493077[_0x1316c5(0xfc)]:!![]),_0x5ab5bb=_0x493077[_0x1316c5(0xec)]?_0x493077['cleared']?'runtime\x20cache\x20cleared':_0x1316c5(0xbe):'runtime\x20cache\x20not\x20needed';return{'ok':_0x3b9e9e,'data':{'uploaded':_0xbda3f8,'skipped':_0x38d8ab,'failed':_0x10376e,'cacheClear':_0x493077},'message':_0x1316c5(0xb8)+_0xbda3f8[_0x1316c5(0xce)]+_0x1316c5(0xf7)+_0x38d8ab[_0x1316c5(0xce)]+_0x1316c5(0xf3)+_0x10376e['length']+_0x1316c5(0xb5)+_0x5ab5bb};}};async function getTargetFunctions(_0x236952,_0x48b5dd){const _0x105d3a=a36_0x4faabe,_0x45d1b7=_0x48b5dd[_0x105d3a(0xdc)](_0x105d3a(0xb3)),_0x44651f=_0x48b5dd[_0x105d3a(0xdc)](_0x105d3a(0xb0)),_0x1d1c8c=normalizeBffType(_0x45d1b7)??undefined;if(_0x44651f&&!_0x1d1c8c)throw CliErrors[_0x105d3a(0xca)](_0x105d3a(0xc0));const _0x318319=await scanLocalBffFunctions(_0x236952,_0x1d1c8c);if(_0x44651f){const _0x322da6=_0x318319[_0x105d3a(0xe3)](_0xe187bb=>_0xe187bb[_0x105d3a(0xb0)]===_0x44651f);if(_0x322da6['length']===0x0)throw CliErrors[_0x105d3a(0xca)](_0x105d3a(0xeb)+_0x1d1c8c+'/'+_0x44651f);return _0x322da6;}return _0x318319;}async function buildHookMaps(_0x378c2f,_0x1f16d5,_0x5c3798,_0x20411c){const _0x53133e=a36_0x4faabe,_0x3cafac=_0x5c3798[_0x53133e(0xac)](_0x41b406=>_0x41b406[_0x53133e(0xb3)]===_0x53133e(0xd6));if(!_0x3cafac)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5d7553=loadAliasMap(_0x1f16d5,undefined,resolveApiFilePath(_0x1f16d5,_0x378c2f)),_0x40b424=new Map(_0x5d7553[_0x53133e(0xd0)](_0x4df4d0=>[_0x4df4d0[_0x53133e(0xe5)],_0x4df4d0['datasetCode']]));for(const _0x47545a of Object[_0x53133e(0xe6)](_0x20411c[_0x53133e(0xd3)])){_0x47545a[_0x53133e(0xe5)]&&_0x47545a['datasetCode']&&!_0x40b424[_0x53133e(0xcb)](_0x47545a[_0x53133e(0xe5)])&&_0x40b424[_0x53133e(0xc9)](_0x47545a[_0x53133e(0xe5)],_0x47545a['datasetCode']);}const _0x3b3752=await listDatasets(_0x378c2f),_0x1c26e2=new Map(_0x3b3752[_0x53133e(0xd0)](_0xae1675=>[_0xae1675[_0x53133e(0xf5)],_0xae1675]));return{'aliasToDatasetCode':_0x40b424,'datasetCodeToDataset':_0x1c26e2};}async function uploadSingleFunction(_0x1a1610,_0x226b00,_0xb3195,_0x34d07a){const _0x5a30ec=a36_0x4faabe,_0x59745=await readFile(_0x226b00[_0x5a30ec(0xe7)],'utf8'),_0x4879c2=await computeFileHash(_0x226b00[_0x5a30ec(0xe7)]),_0x284f0a=_0xb3195['functions'][_0x226b00[_0x5a30ec(0xee)]];if(_0x284f0a?.[_0x5a30ec(0xb4)]&&_0x284f0a[_0x5a30ec(0xab)]==null)throw CliErrors[_0x5a30ec(0xca)](_0x226b00[_0x5a30ec(0xee)]+_0x5a30ec(0xe9));let _0x2b86a6=extractScriptDescription(_0x59745);if(!_0x2b86a6&&_0x284f0a?.['remoteId']){const _0x16924e=await getBffScriptInfo(_0x284f0a[_0x5a30ec(0xb4)]);_0x2b86a6=_0x16924e[_0x5a30ec(0xc8)]||undefined;}const _0xeb6c09={'appCode':_0x1a1610,'functionName':_0x226b00[_0x5a30ec(0xb0)],'scriptType':_0x226b00['type'],'scriptContent':_0x59745};if(_0x284f0a?.[_0x5a30ec(0xb4)])_0xeb6c09['id']=_0x284f0a[_0x5a30ec(0xb4)];if(_0x284f0a?.['version']!=null)_0xeb6c09[_0x5a30ec(0xab)]=_0x284f0a[_0x5a30ec(0xab)];if(_0x2b86a6)_0xeb6c09[_0x5a30ec(0xc8)]=_0x2b86a6;if(_0x226b00[_0x5a30ec(0xb3)]==='HOOK'){const _0x1a80ae=_0x226b00[_0x5a30ec(0xe5)];if(!_0x1a80ae||!_0x226b00[_0x5a30ec(0xd8)]||!_0x226b00[_0x5a30ec(0xd1)])throw CliErrors[_0x5a30ec(0xca)](_0x5a30ec(0xe1)+_0x226b00[_0x5a30ec(0xee)]);const _0x2f3511=_0x34d07a['aliasToDatasetCode'][_0x5a30ec(0xc4)](_0x1a80ae)??_0x284f0a?.[_0x5a30ec(0xb1)]??_0x1a80ae,_0x512dba=_0x34d07a[_0x5a30ec(0xe8)]['get'](_0x2f3511);if(!_0x512dba)throw CliErrors[_0x5a30ec(0xca)](_0x5a30ec(0xcd)+_0x1a80ae+_0x5a30ec(0xbc)+(_0x5a30ec(0xf9)+CLI_BIN_NAME+_0x5a30ec(0xf2)));_0xeb6c09[_0x5a30ec(0xbb)]=_0x512dba['id'],_0xeb6c09[_0x5a30ec(0xd8)]=_0x226b00[_0x5a30ec(0xd8)],_0xeb6c09[_0x5a30ec(0xd1)]=_0x226b00[_0x5a30ec(0xd1)];}const _0x2bae9a=await saveBffScript(_0xeb6c09),_0x3cf652=_0x2bae9a['id'],_0x25e558=_0x2bae9a['script']??await getBffScriptInfo(_0x3cf652),_0x3c685e={'hash':_0x4879c2,'remoteId':_0x3cf652,'version':_0x25e558[_0x5a30ec(0xab)]};if(_0x226b00['type']===_0x5a30ec(0xd6)){const _0x34eb9a=_0x226b00[_0x5a30ec(0xe5)],_0x325108=_0x34d07a[_0x5a30ec(0xad)][_0x5a30ec(0xc4)](_0x34eb9a)??_0x284f0a?.['datasetCode']??_0x34eb9a;_0x34d07a[_0x5a30ec(0xad)][_0x5a30ec(0xcb)](_0x34eb9a)?_0x3c685e[_0x5a30ec(0xe5)]=_0x34eb9a:_0x3c685e[_0x5a30ec(0xe5)]=_0x284f0a?.[_0x5a30ec(0xe5)],_0x3c685e[_0x5a30ec(0xb1)]=_0x325108,_0x3c685e['operationType']=_0x226b00[_0x5a30ec(0xd8)],_0x3c685e[_0x5a30ec(0xd1)]=_0x226b00[_0x5a30ec(0xd1)];}_0xb3195[_0x5a30ec(0xd3)][_0x226b00[_0x5a30ec(0xee)]]=_0x3c685e;}function a36_0x2892(){const _0xde4f74=['/api/management/library/scripts/save','Push\x20complete:\x20','112RZJZUt','Runtime\x20script\x20cache\x20cleared.','datasetId','\x22.\x20','scriptsRoot','runtime\x20cache\x20clear\x20failed','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','1620573rHbDbu','2199746QvWjyc','apps','get','update','string','join','description','set','validation','has','lastSync','Cannot\x20resolve\x20dataset\x20for\x20\x22','length','write','map','functionNode','819256SUPmJh','functions','COMMON','message','HOOK','POST','operationType','396236ZzmLiY','status','unchanged','str','push','stringify','bool','Force\x20push\x20ignoring\x20hash\x20protection','Incomplete\x20HOOK\x20path:\x20','parse','filter','lockFilePath','alias','values','filePath','datasetCodeToDataset',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','75ZztJmj','Local\x20function\x20not\x20found:\x20','attempted','apiDir','lockKey','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','create','force','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','\x20skipped,\x20','No\x20local\x20Backend\x20Function\x20scripts\x20found.','code','Push\x20only\x20this\x20script\x20type','\x20uploaded,\x20','7558146OMfWnm','Run\x20`','appCode','\x22\x20not\x20found\x20after\x20ensureLockScope.','cleared','toISOString','would_push','version','some','aliasToDatasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','1719184agTLvX','name','datasetCode','every','type','remoteId','\x20failed,\x20','420990NtDEmO'];a36_0x2892=function(){return _0xde4f74;};return a36_0x2892();}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x22a889,_0x4f363e,_0x2bea71){const _0x4fe587=a36_0x4faabe;if(_0x2bea71['length']===0x0)return;for(let _0x23ca7c=0x0;_0x23ca7c<LOCK_SETTLE_RETRY_COUNT;_0x23ca7c+=0x1){const _0x184459=await readBffLockFile(_0x22a889),_0x72bdd8=_0x184459?.[_0x4fe587(0xc3)]?.[_0x4f363e]?.[_0x4fe587(0xd3)]??{},_0x1bdf9f=_0x2bea71[_0x4fe587(0xb2)](_0x51f97d=>!!_0x72bdd8[_0x51f97d]?.['remoteId']);if(_0x1bdf9f)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4fe587(0xae)+_0x2bea71[_0x4fe587(0xc7)](',\x20')+'.');}
1
+ const a36_0x2b2c22=a36_0x33fb;(function(_0xb129a7,_0x19c945){const _0x87db86=a36_0x33fb,_0x12a9ee=_0xb129a7();while(!![]){try{const _0x57fe15=parseInt(_0x87db86(0x163))/0x1*(parseInt(_0x87db86(0x199))/0x2)+-parseInt(_0x87db86(0x181))/0x3+parseInt(_0x87db86(0x1a1))/0x4+parseInt(_0x87db86(0x179))/0x5+parseInt(_0x87db86(0x16d))/0x6*(parseInt(_0x87db86(0x166))/0x7)+parseInt(_0x87db86(0x15c))/0x8*(parseInt(_0x87db86(0x1a4))/0x9)+parseInt(_0x87db86(0x161))/0xa*(-parseInt(_0x87db86(0x19f))/0xb);if(_0x57fe15===_0x19c945)break;else _0x12a9ee['push'](_0x12a9ee['shift']());}catch(_0x129bda){_0x12a9ee['push'](_0x12a9ee['shift']());}}}(a36_0x4efd,0x79231));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a36_0x33fb(_0x1310aa,_0x18b75c){_0x1310aa=_0x1310aa-0x152;const _0x4efdba=a36_0x4efd();let _0x33fb40=_0x4efdba[_0x1310aa];return _0x33fb40;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x2b2c22(0x165),'command':a36_0x2b2c22(0x19c),'description':a36_0x2b2c22(0x191),'risk':'write','flags':[{'name':'type','type':a36_0x2b2c22(0x1a6),'description':a36_0x2b2c22(0x189),'enum':[a36_0x2b2c22(0x19d),a36_0x2b2c22(0x15a),a36_0x2b2c22(0x18a)]},{'name':a36_0x2b2c22(0x197),'type':'string','description':a36_0x2b2c22(0x169)},{'name':a36_0x2b2c22(0x159),'type':'boolean','description':a36_0x2b2c22(0x17f)}],async 'dryRun'(_0x491b9e){const _0x3bc0bc=a36_0x2b2c22,_0xa3017f=loadBffProjectConfig(_0x491b9e['appCode']),_0x56d426=await readBffLockFile(_0xa3017f[_0x3bc0bc(0x156)]),{appLock:_0x22e559}=ensureLockScope(_0x56d426??createEmptyBffLock(),_0x491b9e[_0x3bc0bc(0x177)],_0xa3017f['scriptsRoot'],'push'),_0x937b6=await getTargetFunctions(_0xa3017f,_0x491b9e),_0x58d68d=_0x491b9e[_0x3bc0bc(0x182)](_0x3bc0bc(0x159)),_0x5da70e=[];for(const _0x5c4b50 of _0x937b6){const _0x16d85f=await computeFileHash(_0x5c4b50[_0x3bc0bc(0x175)]),_0x4e82e1=_0x22e559[_0x3bc0bc(0x195)][_0x5c4b50[_0x3bc0bc(0x188)]],_0x6f0d5=!!_0x4e82e1&&_0x4e82e1['hash']===_0x16d85f;_0x5da70e[_0x3bc0bc(0x19c)]({'lockKey':_0x5c4b50[_0x3bc0bc(0x188)],'filePath':_0x5c4b50[_0x3bc0bc(0x175)],'remoteId':_0x4e82e1?.[_0x3bc0bc(0x194)]??null,'mode':_0x4e82e1?.[_0x3bc0bc(0x194)]?_0x3bc0bc(0x17b):_0x3bc0bc(0x186),'status':!_0x58d68d&&_0x6f0d5?_0x3bc0bc(0x17e):_0x3bc0bc(0x153)});}return{'method':'POST','url':_0x3bc0bc(0x158),'body':{'appCode':_0x491b9e[_0x3bc0bc(0x177)],'force':_0x58d68d,'files':_0x5da70e,'cacheClearAtRuntime':_0x5da70e[_0x3bc0bc(0x152)](_0x5d9c95=>_0x5d9c95['status']===_0x3bc0bc(0x153)),'cacheClearAtRuntimeTimes':_0x5da70e[_0x3bc0bc(0x152)](_0x3825fd=>_0x3825fd['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x5da70e[_0x3bc0bc(0x154)]+_0x3bc0bc(0x170)};},async 'execute'(_0x516a7e){const _0x56ddd1=a36_0x2b2c22,_0x541a12=loadBffProjectConfig(_0x516a7e[_0x56ddd1(0x177)]),_0x3ddd82=await readBffLockFile(_0x541a12[_0x56ddd1(0x156)]),{lockData:_0x13c276,appLock:_0x5f4d15}=ensureLockScope(_0x3ddd82??createEmptyBffLock(),_0x516a7e[_0x56ddd1(0x177)],_0x541a12[_0x56ddd1(0x192)],_0x56ddd1(0x19c)),_0x5bf4d9=await getTargetFunctions(_0x541a12,_0x516a7e);if(_0x5bf4d9['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x56ddd1(0x167)};const _0x15688c=_0x516a7e[_0x56ddd1(0x182)](_0x56ddd1(0x159)),_0x2b8982=JSON['parse'](JSON[_0x56ddd1(0x1a2)](_0x13c276)),_0x1e7adf=_0x2b8982['apps'][_0x516a7e['appCode']];if(!_0x1e7adf)throw new Error(_0x56ddd1(0x190)+_0x516a7e['appCode']+_0x56ddd1(0x1a3));const _0x569799=await buildHookMaps(_0x516a7e['appCode'],_0x516a7e['apiDir'],_0x5bf4d9,_0x1e7adf),_0x4807ab=[],_0x42e18c=[],_0x5210c9=[];for(const _0x5878df of _0x5bf4d9){const _0x1b2da3=await computeFileHash(_0x5878df[_0x56ddd1(0x175)]),_0x35eb1d=_0x1e7adf['functions'][_0x5878df[_0x56ddd1(0x188)]];if(!_0x15688c&&_0x35eb1d&&_0x35eb1d['hash']===_0x1b2da3){_0x42e18c[_0x56ddd1(0x19c)]({'lockKey':_0x5878df[_0x56ddd1(0x188)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x516a7e['appCode'],_0x5878df,_0x1e7adf,_0x569799);const _0x5c72b0=_0x1e7adf[_0x56ddd1(0x195)][_0x5878df[_0x56ddd1(0x188)]];_0x4807ab[_0x56ddd1(0x19c)]({'lockKey':_0x5878df[_0x56ddd1(0x188)],'remoteId':_0x5c72b0?.['remoteId']??0x0});}catch(_0x552229){_0x5210c9[_0x56ddd1(0x19c)]({'lockKey':_0x5878df[_0x56ddd1(0x188)],'error':_0x552229 instanceof Error?_0x552229['message']:String(_0x552229)});}}_0x1e7adf[_0x56ddd1(0x184)]=new Date()[_0x56ddd1(0x17c)](),await writeBffLockFile(_0x541a12[_0x56ddd1(0x156)],_0x2b8982),await waitForUploadedLockEntries(_0x541a12[_0x56ddd1(0x156)],_0x516a7e['appCode'],_0x4807ab['map'](_0x18e01f=>_0x18e01f[_0x56ddd1(0x188)]));let _0x3c3bf0={'attempted':![],'cleared':![]};if(_0x4807ab[_0x56ddd1(0x154)]>0x0)try{let _0x4b841b='';for(let _0x239765=0x0;_0x239765<CACHE_CLEAR_ATTEMPTS;_0x239765+=0x1){_0x4b841b=await clearBffScriptCache(),_0x239765<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3c3bf0={'attempted':!![],'cleared':!![],'message':_0x4b841b||_0x56ddd1(0x171)};}catch(_0x2c42c2){_0x3c3bf0={'attempted':!![],'cleared':![],'error':_0x2c42c2 instanceof Error?_0x2c42c2[_0x56ddd1(0x15b)]:String(_0x2c42c2)};}const _0x3968f3=_0x5210c9[_0x56ddd1(0x154)]===0x0&&(_0x3c3bf0[_0x56ddd1(0x160)]?_0x3c3bf0[_0x56ddd1(0x17a)]:!![]),_0x2fb0ff=_0x3c3bf0[_0x56ddd1(0x160)]?_0x3c3bf0[_0x56ddd1(0x17a)]?_0x56ddd1(0x1a0):_0x56ddd1(0x176):_0x56ddd1(0x15e);return{'ok':_0x3968f3,'data':{'uploaded':_0x4807ab,'skipped':_0x42e18c,'failed':_0x5210c9,'cacheClear':_0x3c3bf0},'message':'Push\x20complete:\x20'+_0x4807ab[_0x56ddd1(0x154)]+_0x56ddd1(0x19b)+_0x42e18c[_0x56ddd1(0x154)]+'\x20skipped,\x20'+_0x5210c9['length']+_0x56ddd1(0x174)+_0x2fb0ff};}};async function getTargetFunctions(_0x3330d7,_0x56375e){const _0x447c6f=a36_0x2b2c22,_0x395450=_0x56375e[_0x447c6f(0x185)](_0x447c6f(0x16b)),_0x1f37f0=_0x56375e[_0x447c6f(0x185)](_0x447c6f(0x197)),_0x1b8a27=normalizeBffType(_0x395450)??undefined;if(_0x1f37f0&&!_0x1b8a27)throw CliErrors[_0x447c6f(0x15f)](_0x447c6f(0x18e));const _0x2dc6a6=await scanLocalBffFunctions(_0x3330d7,_0x1b8a27);if(_0x1f37f0){const _0x1a2f94=_0x2dc6a6[_0x447c6f(0x162)](_0x1c2c03=>_0x1c2c03[_0x447c6f(0x197)]===_0x1f37f0);if(_0x1a2f94[_0x447c6f(0x154)]===0x0)throw CliErrors[_0x447c6f(0x15f)]('Local\x20function\x20not\x20found:\x20'+_0x1b8a27+'/'+_0x1f37f0);return _0x1a2f94;}return _0x2dc6a6;}async function buildHookMaps(_0x398c60,_0xa5e19a,_0x2b1279,_0x208037){const _0x2ec3c6=a36_0x2b2c22,_0x15e170=_0x2b1279[_0x2ec3c6(0x152)](_0x3c8d96=>_0x3c8d96['type']==='HOOK');if(!_0x15e170)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x27155f=loadAliasMap(_0xa5e19a,undefined,resolveApiFilePath(_0xa5e19a,_0x398c60)),_0x401cfd=new Map(_0x27155f[_0x2ec3c6(0x196)](_0x467a20=>[_0x467a20[_0x2ec3c6(0x173)],_0x467a20[_0x2ec3c6(0x172)]]));for(const _0x5be0d1 of Object[_0x2ec3c6(0x16c)](_0x208037[_0x2ec3c6(0x195)])){_0x5be0d1['alias']&&_0x5be0d1['datasetCode']&&!_0x401cfd[_0x2ec3c6(0x16a)](_0x5be0d1[_0x2ec3c6(0x173)])&&_0x401cfd[_0x2ec3c6(0x15d)](_0x5be0d1['alias'],_0x5be0d1['datasetCode']);}const _0x28c84f=await listDatasets(_0x398c60),_0x2898c2=new Map(_0x28c84f['map'](_0x5b69be=>[_0x5b69be[_0x2ec3c6(0x18d)],_0x5b69be]));return{'aliasToDatasetCode':_0x401cfd,'datasetCodeToDataset':_0x2898c2};}async function uploadSingleFunction(_0x1e3961,_0x14c1cc,_0x17fe9d,_0x172029){const _0x3b8850=a36_0x2b2c22,_0x3416f3=await readFile(_0x14c1cc[_0x3b8850(0x175)],_0x3b8850(0x19a)),_0xccedc5=await computeFileHash(_0x14c1cc[_0x3b8850(0x175)]),_0x891f4f=_0x17fe9d[_0x3b8850(0x195)][_0x14c1cc[_0x3b8850(0x188)]];if(_0x891f4f?.['remoteId']&&_0x891f4f[_0x3b8850(0x187)]==null)throw CliErrors[_0x3b8850(0x15f)](_0x14c1cc['lockKey']+_0x3b8850(0x16f));let _0x30e3be=extractScriptDescription(_0x3416f3);if(!_0x30e3be&&_0x891f4f?.['remoteId']){const _0x2538e6=await getBffScriptInfo(_0x891f4f[_0x3b8850(0x194)]);_0x30e3be=_0x2538e6[_0x3b8850(0x178)]||undefined;}const _0xad2a11={'appCode':_0x1e3961,'functionName':_0x14c1cc['name'],'scriptType':_0x14c1cc[_0x3b8850(0x16b)],'scriptContent':_0x3416f3};if(_0x891f4f?.[_0x3b8850(0x194)])_0xad2a11['id']=_0x891f4f[_0x3b8850(0x194)];if(_0x891f4f?.[_0x3b8850(0x187)]!=null)_0xad2a11[_0x3b8850(0x187)]=_0x891f4f['version'];if(_0x30e3be)_0xad2a11[_0x3b8850(0x178)]=_0x30e3be;if(_0x14c1cc[_0x3b8850(0x16b)]===_0x3b8850(0x18a)){const _0x476697=_0x14c1cc[_0x3b8850(0x173)];if(!_0x476697||!_0x14c1cc[_0x3b8850(0x16e)]||!_0x14c1cc['functionNode'])throw CliErrors[_0x3b8850(0x15f)](_0x3b8850(0x18b)+_0x14c1cc[_0x3b8850(0x188)]);const _0x23f3cc=_0x172029[_0x3b8850(0x168)]['get'](_0x476697)??_0x891f4f?.[_0x3b8850(0x172)]??_0x476697,_0x27de63=_0x172029['datasetCodeToDataset'][_0x3b8850(0x155)](_0x23f3cc);if(!_0x27de63)throw CliErrors['validation'](_0x3b8850(0x1a5)+_0x476697+_0x3b8850(0x17d)+(_0x3b8850(0x19e)+CLI_BIN_NAME+_0x3b8850(0x18c)));_0xad2a11[_0x3b8850(0x164)]=_0x27de63['id'],_0xad2a11[_0x3b8850(0x16e)]=_0x14c1cc[_0x3b8850(0x16e)],_0xad2a11[_0x3b8850(0x183)]=_0x14c1cc['functionNode'];}const _0x300d69=await saveBffScript(_0xad2a11),_0x37d04f=_0x300d69['id'],_0x5f38bf=_0x300d69[_0x3b8850(0x157)]??await getBffScriptInfo(_0x37d04f),_0x12fe7c={'hash':_0xccedc5,'remoteId':_0x37d04f,'version':_0x5f38bf[_0x3b8850(0x187)]};if(_0x14c1cc[_0x3b8850(0x16b)]==='HOOK'){const _0x277c1f=_0x14c1cc[_0x3b8850(0x173)],_0x43014a=_0x172029['aliasToDatasetCode']['get'](_0x277c1f)??_0x891f4f?.[_0x3b8850(0x172)]??_0x277c1f;_0x172029[_0x3b8850(0x168)][_0x3b8850(0x16a)](_0x277c1f)?_0x12fe7c[_0x3b8850(0x173)]=_0x277c1f:_0x12fe7c[_0x3b8850(0x173)]=_0x891f4f?.[_0x3b8850(0x173)],_0x12fe7c['datasetCode']=_0x43014a,_0x12fe7c[_0x3b8850(0x16e)]=_0x14c1cc[_0x3b8850(0x16e)],_0x12fe7c[_0x3b8850(0x183)]=_0x14c1cc[_0x3b8850(0x183)];}_0x17fe9d[_0x3b8850(0x195)][_0x14c1cc[_0x3b8850(0x188)]]=_0x12fe7c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1627ee,_0x4b9229,_0xc5d3b6){const _0x503426=a36_0x2b2c22;if(_0xc5d3b6[_0x503426(0x154)]===0x0)return;for(let _0x1a9d72=0x0;_0x1a9d72<LOCK_SETTLE_RETRY_COUNT;_0x1a9d72+=0x1){const _0x154192=await readBffLockFile(_0x1627ee),_0x1e84d4=_0x154192?.[_0x503426(0x180)]?.[_0x4b9229]?.[_0x503426(0x195)]??{},_0x4a9d81=_0xc5d3b6[_0x503426(0x18f)](_0x2c2cc=>!!_0x1e84d4[_0x2c2cc]?.['remoteId']);if(_0x4a9d81)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x503426(0x193)+_0xc5d3b6[_0x503426(0x198)](',\x20')+'.');}function a36_0x4efd(){const _0x1b60b7=['would_push','length','get','lockFilePath','script','/api/management/library/scripts/save','force','ENDPOINT','message','8iCZVIq','set','runtime\x20cache\x20not\x20needed','validation','attempted','20vxkkxm','filter','115781qdJlWz','datasetId','bff','5560681nCxtpX','No\x20local\x20Backend\x20Function\x20scripts\x20found.','aliasToDatasetCode','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','has','type','values','6EetdXJ','operationType',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Runtime\x20script\x20cache\x20cleared.','datasetCode','alias','\x20failed,\x20','filePath','runtime\x20cache\x20clear\x20failed','appCode','description','1512140LphWxW','cleared','update','toISOString','\x22.\x20','unchanged','Force\x20push\x20ignoring\x20hash\x20protection','apps','1792065KqoZht','bool','functionNode','lastSync','str','create','version','lockKey','Push\x20only\x20this\x20script\x20type','HOOK','Incomplete\x20HOOK\x20path:\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','code','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','every','Lock\x20scope\x20for\x20app\x20\x22','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','scriptsRoot','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','remoteId','functions','map','name','join','14SWLVUh','utf8','\x20uploaded,\x20','push','COMMON','Run\x20`','10027083guUXfl','runtime\x20cache\x20cleared','3397464lcnOLw','stringify','\x22\x20not\x20found\x20after\x20ensureLockScope.','1439946zOwOQl','Cannot\x20resolve\x20dataset\x20for\x20\x22','string','some'];a36_0x4efd=function(){return _0x1b60b7;};return a36_0x4efd();}
@@ -1 +1 @@
1
- const a37_0x1b76e1=a37_0x18c7;(function(_0x434379,_0x19c7b9){const _0x13d600=a37_0x18c7,_0x1c5a2d=_0x434379();while(!![]){try{const _0x2d673a=-parseInt(_0x13d600(0x178))/0x1*(parseInt(_0x13d600(0x179))/0x2)+-parseInt(_0x13d600(0x173))/0x3*(parseInt(_0x13d600(0x15f))/0x4)+parseInt(_0x13d600(0x17b))/0x5*(-parseInt(_0x13d600(0x166))/0x6)+parseInt(_0x13d600(0x16b))/0x7*(-parseInt(_0x13d600(0x15e))/0x8)+parseInt(_0x13d600(0x160))/0x9+parseInt(_0x13d600(0x15c))/0xa*(parseInt(_0x13d600(0x17d))/0xb)+-parseInt(_0x13d600(0x162))/0xc*(-parseInt(_0x13d600(0x16c))/0xd);if(_0x2d673a===_0x19c7b9)break;else _0x1c5a2d['push'](_0x1c5a2d['shift']());}catch(_0x2545fe){_0x1c5a2d['push'](_0x1c5a2d['shift']());}}}(a37_0x3440,0x66513));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a37_0x3440(){const _0x12afa5=['lockKey','263269xGLwsd','2aKGLVI','\x20remote-only','268620ARxlVS','appCode','2236542iLDhyT','status','lockFilePath','boolean','10XatIhd','push','781800dDESTm','36620HsAbpl','6857055kPzccW','bff','156dStgjm','all','functions','\x20unchanged','30HlZAEc','\x20modified,\x20','alias','scriptsRoot','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','14xmfnTp','400933GSnzMx','map','filePath','bool','length','hash','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','72ujsvwN','apiDir','remote','\x20added,\x20'];a37_0x3440=function(){return _0x12afa5;};return a37_0x3440();}function a37_0x18c7(_0x58b459,_0x3a7028){_0x58b459=_0x58b459-0x159;const _0x3440ef=a37_0x3440();let _0x18c755=_0x3440ef[_0x58b459];return _0x18c755;}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_0x1b76e1(0x161),'command':'status','description':a37_0x1b76e1(0x16a),'risk':'read','flags':[{'name':'remote','type':a37_0x1b76e1(0x15b),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x1e8b7e){const _0x33cff4=a37_0x1b76e1,_0x520a43=loadBffProjectConfig(_0x1e8b7e[_0x33cff4(0x17c)]),_0x3e5305=await readBffLockFile(_0x520a43[_0x33cff4(0x15a)]),{appLock:_0x4ecc7f}=ensureLockScope(_0x3e5305??createEmptyBffLock(),_0x1e8b7e[_0x33cff4(0x17c)],_0x520a43[_0x33cff4(0x169)],_0x33cff4(0x159)),_0x22201c=await scanLocalBffFunctions(_0x520a43),_0x55e26a=[],_0x58bcba=[],_0x29f30e=[];for(const _0x33e39a of _0x22201c){const _0x14ae46=await computeFileHash(_0x33e39a[_0x33cff4(0x16e)]),_0x2b2970=_0x4ecc7f[_0x33cff4(0x164)][_0x33e39a[_0x33cff4(0x177)]];if(!_0x2b2970)_0x55e26a['push'](_0x33e39a[_0x33cff4(0x177)]);else _0x2b2970[_0x33cff4(0x171)]!==_0x14ae46?_0x58bcba[_0x33cff4(0x15d)](_0x33e39a['lockKey']):_0x29f30e[_0x33cff4(0x15d)](_0x33e39a[_0x33cff4(0x177)]);}const _0x4ea309=[];if(_0x1e8b7e[_0x33cff4(0x16f)](_0x33cff4(0x175))){const _0x55842a=loadAliasMap(_0x1e8b7e[_0x33cff4(0x174)],undefined,resolveApiFilePath(_0x1e8b7e[_0x33cff4(0x174)],_0x1e8b7e[_0x33cff4(0x17c)])),_0x487069=new Map(_0x55842a[_0x33cff4(0x16d)](_0x5e79c3=>[_0x5e79c3['datasetCode'],_0x5e79c3[_0x33cff4(0x168)]])),[_0x326abb,_0x518c93]=await Promise[_0x33cff4(0x163)]([listBffScripts(_0x1e8b7e[_0x33cff4(0x17c)]),getBffScriptStatistics(_0x1e8b7e[_0x33cff4(0x17c)])]),_0x46fb3b=createHookLocationMap(_0x518c93),_0xb57a27=new Set(_0x22201c['map'](_0x581f94=>_0x581f94[_0x33cff4(0x177)]));for(const _0x1716b1 of _0x326abb){const _0x4d3f58=resolveRemoteScriptTarget(_0x520a43,_0x1716b1,_0x46fb3b,_0x4ecc7f['functions'],_0x487069);_0x4d3f58&&!_0xb57a27['has'](_0x4d3f58[_0x33cff4(0x177)])&&_0x4ea309[_0x33cff4(0x15d)](_0x4d3f58['lockKey']);}}const _0x8ee5a5=_0x55e26a['length']===0x0&&_0x58bcba[_0x33cff4(0x170)]===0x0&&_0x4ea309[_0x33cff4(0x170)]===0x0;return{'ok':!![],'data':{'added':_0x55e26a,'modified':_0x58bcba,'unchanged':_0x29f30e,'remoteOnly':_0x4ea309},'message':_0x8ee5a5?_0x33cff4(0x172):_0x55e26a[_0x33cff4(0x170)]+_0x33cff4(0x176)+_0x58bcba['length']+_0x33cff4(0x167)+_0x29f30e[_0x33cff4(0x170)]+_0x33cff4(0x165)+(_0x4ea309[_0x33cff4(0x170)]>0x0?',\x20'+_0x4ea309[_0x33cff4(0x170)]+_0x33cff4(0x17a):'')};}};
1
+ const a37_0xe2434b=a37_0x3945;(function(_0x3f4006,_0x29ae45){const _0x29885f=a37_0x3945,_0x1d16a0=_0x3f4006();while(!![]){try{const _0x1356e1=parseInt(_0x29885f(0x102))/0x1*(parseInt(_0x29885f(0x117))/0x2)+parseInt(_0x29885f(0x107))/0x3+-parseInt(_0x29885f(0x112))/0x4+parseInt(_0x29885f(0x103))/0x5*(parseInt(_0x29885f(0x115))/0x6)+-parseInt(_0x29885f(0x114))/0x7*(-parseInt(_0x29885f(0x110))/0x8)+parseInt(_0x29885f(0x10f))/0x9+-parseInt(_0x29885f(0x104))/0xa;if(_0x1356e1===_0x29ae45)break;else _0x1d16a0['push'](_0x1d16a0['shift']());}catch(_0x18e037){_0x1d16a0['push'](_0x1d16a0['shift']());}}}(a37_0x5dd7,0xbc657));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x5dd7(){const _0xa037aa=['lockFilePath','\x20modified,\x20','hash','boolean','12274164crVxvC','32mZNPMX','scriptsRoot','4365124JoAnwI','map','1352449KfGRFg','12WqawCV','apiDir','32CCycqh','length','bff','push','status','lockKey','92561WWhhoZ','28685xSBuJg','20463810UkRoEq','appCode','\x20remote-only','840777tEngfS','functions','\x20added,\x20','alias'];a37_0x5dd7=function(){return _0xa037aa;};return a37_0x5dd7();}function a37_0x3945(_0x27d988,_0x13fb7e){_0x27d988=_0x27d988-0xff;const _0x5dd79f=a37_0x5dd7();let _0x3945a7=_0x5dd79f[_0x27d988];return _0x3945a7;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0xe2434b(0x119),'command':a37_0xe2434b(0x100),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':a37_0xe2434b(0x10e),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x41684d){const _0x32d16=a37_0xe2434b,_0x3e3657=loadBffProjectConfig(_0x41684d['appCode']),_0x3534e8=await readBffLockFile(_0x3e3657[_0x32d16(0x10b)]),{appLock:_0x311635}=ensureLockScope(_0x3534e8??createEmptyBffLock(),_0x41684d[_0x32d16(0x105)],_0x3e3657[_0x32d16(0x111)],_0x32d16(0x100)),_0x1944a7=await scanLocalBffFunctions(_0x3e3657),_0x283f55=[],_0x1e558e=[],_0x527964=[];for(const _0x3598a1 of _0x1944a7){const _0x5ef6bb=await computeFileHash(_0x3598a1['filePath']),_0x55c3ae=_0x311635[_0x32d16(0x108)][_0x3598a1[_0x32d16(0x101)]];if(!_0x55c3ae)_0x283f55[_0x32d16(0xff)](_0x3598a1['lockKey']);else _0x55c3ae[_0x32d16(0x10d)]!==_0x5ef6bb?_0x1e558e[_0x32d16(0xff)](_0x3598a1[_0x32d16(0x101)]):_0x527964[_0x32d16(0xff)](_0x3598a1['lockKey']);}const _0x3e0452=[];if(_0x41684d['bool']('remote')){const _0x62d044=loadAliasMap(_0x41684d[_0x32d16(0x116)],undefined,resolveApiFilePath(_0x41684d[_0x32d16(0x116)],_0x41684d['appCode'])),_0x23c2b6=new Map(_0x62d044[_0x32d16(0x113)](_0x1c7b47=>[_0x1c7b47['datasetCode'],_0x1c7b47[_0x32d16(0x10a)]])),[_0x2ed49c,_0x9f4059]=await Promise['all']([listBffScripts(_0x41684d['appCode']),getBffScriptStatistics(_0x41684d[_0x32d16(0x105)])]),_0x1679f1=createHookLocationMap(_0x9f4059),_0x5c3818=new Set(_0x1944a7[_0x32d16(0x113)](_0x4592a3=>_0x4592a3[_0x32d16(0x101)]));for(const _0x50d8af of _0x2ed49c){const _0x30472a=resolveRemoteScriptTarget(_0x3e3657,_0x50d8af,_0x1679f1,_0x311635[_0x32d16(0x108)],_0x23c2b6);_0x30472a&&!_0x5c3818['has'](_0x30472a[_0x32d16(0x101)])&&_0x3e0452[_0x32d16(0xff)](_0x30472a[_0x32d16(0x101)]);}}const _0x28a4bb=_0x283f55[_0x32d16(0x118)]===0x0&&_0x1e558e[_0x32d16(0x118)]===0x0&&_0x3e0452[_0x32d16(0x118)]===0x0;return{'ok':!![],'data':{'added':_0x283f55,'modified':_0x1e558e,'unchanged':_0x527964,'remoteOnly':_0x3e0452},'message':_0x28a4bb?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x283f55['length']+_0x32d16(0x109)+_0x1e558e[_0x32d16(0x118)]+_0x32d16(0x10c)+_0x527964[_0x32d16(0x118)]+'\x20unchanged'+(_0x3e0452['length']>0x0?',\x20'+_0x3e0452[_0x32d16(0x118)]+_0x32d16(0x106):'')};}};
@@ -1 +1 @@
1
- function a38_0x195f(_0x4ff73f,_0x16c5df){_0x4ff73f=_0x4ff73f-0x1f3;const _0x256057=a38_0x2560();let _0x195fa8=_0x256057[_0x4ff73f];return _0x195fa8;}const a38_0x37f79b=a38_0x195f;(function(_0x3c4287,_0x40c2a7){const _0xe651ac=a38_0x195f,_0x4a7f42=_0x3c4287();while(!![]){try{const _0x4bc45f=-parseInt(_0xe651ac(0x218))/0x1+parseInt(_0xe651ac(0x213))/0x2*(-parseInt(_0xe651ac(0x20d))/0x3)+-parseInt(_0xe651ac(0x20e))/0x4*(parseInt(_0xe651ac(0x1f3))/0x5)+-parseInt(_0xe651ac(0x215))/0x6*(parseInt(_0xe651ac(0x214))/0x7)+parseInt(_0xe651ac(0x20a))/0x8*(-parseInt(_0xe651ac(0x208))/0x9)+-parseInt(_0xe651ac(0x207))/0xa*(-parseInt(_0xe651ac(0x1f4))/0xb)+parseInt(_0xe651ac(0x210))/0xc*(parseInt(_0xe651ac(0x20b))/0xd);if(_0x4bc45f===_0x40c2a7)break;else _0x4a7f42['push'](_0x4a7f42['shift']());}catch(_0xf79cb){_0x4a7f42['push'](_0x4a7f42['shift']());}}}(a38_0x2560,0x4b3f3));import{CliErrors}from'../../errors.js';function a38_0x2560(){const _0x56d7f2=['4063110WUAasU','9ewnIZB','code','4801256OWFVhy','351273Zfhjli','\x20at\x20','953283gVupjk','205804ECNhQx','nonInteractive','876OPyVWm','apiError','Built-in\x20Skill\x20install\x20failed\x20[','2tjOPWE','2552221rAwgmx','6mIaikr','\x20via\x20skills@latest','install','273602DWiMWR','error','50nEBMSR','11vYKLXj','log','repairCommand','installedPath','CLI\x20Built-in\x20Skill\x20','info','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','cli-skill-install',']:\x20','skillVersion','setLogPath','unknown','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','\x20installed','cli-skill','changed','read','\x20is\x20already\x20current','cwd'];a38_0x2560=function(){return _0x56d7f2;};return a38_0x2560();}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x37f79b(0x202),'command':a38_0x37f79b(0x217),'description':a38_0x37f79b(0x200),'risk':a38_0x37f79b(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x26d1d1){const _0x9bcaac=a38_0x37f79b;logger[_0x9bcaac(0x1fe)](process[_0x9bcaac(0x206)]()),logger[_0x9bcaac(0x1f9)](_0x9bcaac(0x1fb),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x1337d5=installBuiltinSkill({'stdio':_0x26d1d1[_0x9bcaac(0x20f)]?'pipe':'inherit'});if(!_0x1337d5['ok'])throw CliErrors[_0x9bcaac(0x211)](_0x9bcaac(0x212)+_0x1337d5[_0x9bcaac(0x209)]+_0x9bcaac(0x1fc)+(_0x1337d5[_0x9bcaac(0x219)]||_0x9bcaac(0x1ff)),_0x9bcaac(0x1fa)+_0x1337d5[_0x9bcaac(0x1f6)]);return console[_0x9bcaac(0x1f5)](_0x1337d5[_0x9bcaac(0x203)]?_0x9bcaac(0x1f8)+_0x1337d5[_0x9bcaac(0x1fd)]+_0x9bcaac(0x201)+(_0x1337d5[_0x9bcaac(0x1f7)]?_0x9bcaac(0x20c)+_0x1337d5[_0x9bcaac(0x1f7)]:_0x9bcaac(0x216)):_0x9bcaac(0x1f8)+_0x1337d5['skillVersion']+_0x9bcaac(0x205)+(_0x1337d5[_0x9bcaac(0x1f7)]?_0x9bcaac(0x20c)+_0x1337d5['installedPath']:'')),{'ok':!![]};}}];
1
+ const a38_0x1dc6ba=a38_0x1288;(function(_0x280121,_0x1e2319){const _0x589560=a38_0x1288,_0x543e81=_0x280121();while(!![]){try{const _0x32cfb8=parseInt(_0x589560(0x14f))/0x1*(-parseInt(_0x589560(0x153))/0x2)+-parseInt(_0x589560(0x146))/0x3*(-parseInt(_0x589560(0x14c))/0x4)+-parseInt(_0x589560(0x138))/0x5*(-parseInt(_0x589560(0x156))/0x6)+parseInt(_0x589560(0x14b))/0x7*(parseInt(_0x589560(0x13a))/0x8)+parseInt(_0x589560(0x143))/0x9*(parseInt(_0x589560(0x13b))/0xa)+parseInt(_0x589560(0x140))/0xb+-parseInt(_0x589560(0x148))/0xc;if(_0x32cfb8===_0x1e2319)break;else _0x543e81['push'](_0x543e81['shift']());}catch(_0x1ac93a){_0x543e81['push'](_0x543e81['shift']());}}}(a38_0x5d60,0x4ef53));function a38_0x5d60(){const _0x35023b=['\x20at\x20','592929WxSehH','installedPath','23322648uJnzwr','CLI\x20Built-in\x20Skill\x20','repairCommand','7CktTXi','8UyCOLf','cli-skill-install','inherit','7vLMThK','Built-in\x20Skill\x20install\x20failed\x20[','cwd','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','120360qenQNm','skillVersion','install','3716772ZmVYYb','unknown','5dwyBIt','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','4343384kfjjPt','778580kTyQgL','read','info','changed','nonInteractive','6441028mBequU','\x20installed','\x20via\x20skills@latest','63DnIRQT','log'];a38_0x5d60=function(){return _0x35023b;};return a38_0x5d60();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a38_0x1288(_0x289497,_0x5aa0a4){_0x289497=_0x289497-0x138;const _0x5d6076=a38_0x5d60();let _0x12885b=_0x5d6076[_0x289497];return _0x12885b;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a38_0x1dc6ba(0x155),'description':a38_0x1dc6ba(0x139),'risk':a38_0x1dc6ba(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4fc938){const _0x140677=a38_0x1dc6ba;logger['setLogPath'](process[_0x140677(0x151)]()),logger[_0x140677(0x13d)](_0x140677(0x14d),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x3d525b=installBuiltinSkill({'stdio':_0x4fc938[_0x140677(0x13f)]?'pipe':_0x140677(0x14e)});if(!_0x3d525b['ok'])throw CliErrors['apiError'](_0x140677(0x150)+_0x3d525b['code']+']:\x20'+(_0x3d525b['error']||_0x140677(0x157)),_0x140677(0x152)+_0x3d525b[_0x140677(0x14a)]);return console[_0x140677(0x144)](_0x3d525b[_0x140677(0x13e)]?_0x140677(0x149)+_0x3d525b[_0x140677(0x154)]+_0x140677(0x141)+(_0x3d525b[_0x140677(0x147)]?'\x20at\x20'+_0x3d525b[_0x140677(0x147)]:_0x140677(0x142)):_0x140677(0x149)+_0x3d525b[_0x140677(0x154)]+'\x20is\x20already\x20current'+(_0x3d525b[_0x140677(0x147)]?_0x140677(0x145)+_0x3d525b[_0x140677(0x147)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x2b92fb=a39_0x1da0;(function(_0x9d2571,_0x1c136a){const _0xd7d043=a39_0x1da0,_0x135e26=_0x9d2571();while(!![]){try{const _0x4bc891=-parseInt(_0xd7d043(0xcd))/0x1*(parseInt(_0xd7d043(0x104))/0x2)+-parseInt(_0xd7d043(0x105))/0x3+parseInt(_0xd7d043(0xf1))/0x4*(-parseInt(_0xd7d043(0x112))/0x5)+parseInt(_0xd7d043(0xcf))/0x6*(parseInt(_0xd7d043(0xef))/0x7)+-parseInt(_0xd7d043(0xea))/0x8+-parseInt(_0xd7d043(0x119))/0x9*(-parseInt(_0xd7d043(0xce))/0xa)+parseInt(_0xd7d043(0xd0))/0xb*(parseInt(_0xd7d043(0xe7))/0xc);if(_0x4bc891===_0x1c136a)break;else _0x135e26['push'](_0x135e26['shift']());}catch(_0x22f967){_0x135e26['push'](_0x135e26['shift']());}}}(a39_0x56bd,0x8a6b5));function a39_0x1da0(_0x273831,_0x44f5bf){_0x273831=_0x273831-0xc4;const _0x56bd36=a39_0x56bd();let _0x1da008=_0x56bd36[_0x273831];return _0x1da008;}import a39_0xa5d30f from'chalk';import a39_0x15bb54 from'ora';import a39_0x5f4367 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 _0xa1d1b4=a39_0x1da0;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xa1d1b4(0x114)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x51a2e9=a39_0x1da0,_0x2bb651=process[_0x51a2e9(0xc7)][_0x51a2e9(0xfa)]();if(_0x2bb651[_0x51a2e9(0xde)]('bun'))return _0x51a2e9(0xc4);return'npm';}const updateFlags=[{'name':a39_0x2b92fb(0x106),'type':a39_0x2b92fb(0xe1),'description':a39_0x2b92fb(0x116),'default':![]},{'name':'version','type':a39_0x2b92fb(0xe3),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x2fc906){const _0x32c2fb=a39_0x2b92fb;return _0x2fc906['str'](_0x32c2fb(0xfd))[_0x32c2fb(0x101)]();}async function validateUpdateFlags(_0x288761){const _0x579a8c=a39_0x2b92fb,_0x45933c=_0x288761['bool'](_0x579a8c(0x106)),_0x91bda7=getRequestedVersion(_0x288761);if(_0x45933c&&_0x91bda7)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x579a8c(0x102));if(_0x91bda7&&!a39_0x5f4367[_0x579a8c(0xc5)](_0x91bda7))throw CliErrors['validation'](_0x579a8c(0xfb)+_0x91bda7,_0x579a8c(0xf2));}async function fetchNpmDistTags(){const _0x51c55c=a39_0x2b92fb;try{const _0x583695=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x51c55c(0xf5),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x583695['ok'])return null;const _0x451d57=await _0x583695[_0x51c55c(0xd1)]();if(!_0x451d57||typeof _0x451d57!==_0x51c55c(0xd9))return null;return Object['fromEntries'](Object['entries'](_0x451d57)[_0x51c55c(0xff)](([,_0x28a595])=>typeof _0x28a595===_0x51c55c(0xe3)&&_0x28a595['trim']()[_0x51c55c(0xcc)]>0x0)[_0x51c55c(0xe0)](([_0x2c7d51,_0x478dd9])=>[_0x2c7d51,String(_0x478dd9)[_0x51c55c(0x101)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5cef20){const _0x22fe85=await fetchNpmDistTags();return _0x22fe85?.[_0x5cef20]??null;}function a39_0x56bd(){const _0x3467ca=['694669xmVTzk','2426210tphKwE','18594QrGiSv','41899EVGdir','json','warn','Checking\x20CLI\x20Built-in\x20Skill...','Already\x20on\x20requested\x20version\x20(v','yellow','current','Already\x20up\x20to\x20date\x20(v','npm','object','update','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','source','log','includes','Version\x20comparison\x20failed','map','boolean','Updated\x20to\x20v','string',',\x20found\x20','run','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','5604SDhTFq','Update\x20failed','Beta\x20version:\x20','2459808NvZeOc','succeed','\x20cli-skill\x20install','gray','info','1582BJoctL','Requested\x20version:\x20','366516FnkPwk','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20is\x20up\x20to\x20date.','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','/dist-tags','install','fail',',\x20state\x20','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','toLowerCase','Invalid\x20version:\x20','...','version','error','filter','bool','trim','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','2UKfjik','2633403tRFArw','beta','green','code','skillVersion','latest','Current\x20version:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','pipe','message','@latest','\x20→\x20','start','15RZqLRN','expected\x20','slice','state','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20install\x20-g\x20','\x20\x20Try\x20manually:\x20','9LexPxd','read','bun','valid','unknown','execPath','\x20\x20Run\x20manually:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Updating\x20via\x20','Update\x20available:\x20','length'];a39_0x56bd=function(){return _0x3467ca;};return a39_0x56bd();}async function fetchLatestVersion(){const _0x1923b2=a39_0x2b92fb;return fetchNpmDistTagVersion(_0x1923b2(0x10a));}async function resolveTargetVersion(_0x475e7b){const _0x39c85c=a39_0x2b92fb,_0x5471b0=getRequestedVersion(_0x475e7b);if(_0x5471b0)return{'version':_0x5471b0,'source':_0x39c85c(0xfd)};if(_0x475e7b[_0x39c85c(0x100)]('beta')){const _0x33db4a=await fetchNpmDistTagVersion(_0x39c85c(0x106));if(!_0x33db4a)return null;return{'version':_0x33db4a,'source':'beta'};}const _0x5591b3=await fetchLatestVersion();if(!_0x5591b3)return null;return{'version':_0x5591b3,'source':_0x39c85c(0x10a)};}function shouldInstallTarget(_0x241d61,_0x1eb5ab){const _0x1cb7b9=a39_0x2b92fb;if(_0x1eb5ab[_0x1cb7b9(0xdc)]==='version'||_0x1eb5ab[_0x1cb7b9(0xdc)]===_0x1cb7b9(0x106))return!a39_0x5f4367['eq'](_0x241d61,_0x1eb5ab[_0x1cb7b9(0xfd)]);return a39_0x5f4367['lt'](_0x241d61,_0x1eb5ab[_0x1cb7b9(0xfd)]);}function getInstallPlanLabel(_0x5810b4,_0x1ef68a){const _0x18aacb=a39_0x2b92fb;switch(_0x1ef68a['source']){case _0x18aacb(0x106):return _0x18aacb(0xe9)+a39_0xa5d30f['yellow'](_0x5810b4)+_0x18aacb(0x110)+a39_0xa5d30f[_0x18aacb(0x107)](_0x1ef68a[_0x18aacb(0xfd)]);case _0x18aacb(0xfd):return _0x18aacb(0xf0)+a39_0xa5d30f[_0x18aacb(0xd5)](_0x5810b4)+'\x20→\x20'+a39_0xa5d30f[_0x18aacb(0x107)](_0x1ef68a[_0x18aacb(0xfd)]);case _0x18aacb(0x10a):default:return _0x18aacb(0xcb)+a39_0xa5d30f[_0x18aacb(0xd5)](_0x5810b4)+_0x18aacb(0x110)+a39_0xa5d30f['green'](_0x1ef68a[_0x18aacb(0xfd)]);}}function repairCurrentBuiltinSkill(){const _0x39b46d=a39_0x2b92fb;console[_0x39b46d(0xdd)](a39_0xa5d30f[_0x39b46d(0xed)](_0x39b46d(0xd3)));const _0x57def1=installBuiltinSkill();if(_0x57def1['ok'])return console['log'](a39_0xa5d30f['gray'](_0x39b46d(0x10c)+_0x57def1['skillVersion']+_0x39b46d(0xf3))),!![];return console[_0x39b46d(0xd2)](a39_0xa5d30f['yellow'](_0x39b46d(0xf4)+_0x57def1[_0x39b46d(0x108)]+']:\x20'+(_0x57def1['error']||_0x39b46d(0xc6)))),console['log'](a39_0xa5d30f[_0x39b46d(0xed)](_0x39b46d(0xc8)+CLI_BIN_NAME+_0x39b46d(0xec))),![];}function verifyUpdatedBuiltinSkill(_0x59f78e){const _0x4adedf=a39_0x2b92fb,_0x3f0eaa=inspectInstalledBuiltinSkillVersion(_0x59f78e);if(_0x3f0eaa[_0x4adedf(0x115)]===_0x4adedf(0xd6))return console[_0x4adedf(0xdd)](a39_0xa5d30f[_0x4adedf(0xed)](_0x4adedf(0x10c)+_0x59f78e+_0x4adedf(0xf3))),!![];const _0x5ee74a=_0x3f0eaa[_0x4adedf(0x109)]?_0x4adedf(0x113)+_0x59f78e+_0x4adedf(0xe4)+_0x3f0eaa[_0x4adedf(0x109)]:_0x4adedf(0x113)+_0x59f78e+_0x4adedf(0xf8)+_0x3f0eaa['state'];return console[_0x4adedf(0xd2)](a39_0xa5d30f[_0x4adedf(0xd5)](_0x4adedf(0xf9)+_0x5ee74a)),console['log'](a39_0xa5d30f[_0x4adedf(0xed)](_0x4adedf(0xc8)+_0x3f0eaa['repairCommand'])),![];}async function execute(_0x5635cf){const _0x3c3881=a39_0x2b92fb;await validateUpdateFlags(_0x5635cf);const _0x52dca1=getCurrentVersion();console[_0x3c3881(0xdd)](_0x3c3881(0x10b)+_0x52dca1);const _0x588fe4=a39_0x15bb54('Checking\x20for\x20updates...')['start'](),_0x2ef321=await resolveTargetVersion(_0x5635cf);if(!_0x2ef321){const _0x17e08e=_0x5635cf['bool'](_0x3c3881(0x106))?_0x3c3881(0x103):_0x3c3881(0xdb);return _0x588fe4[_0x3c3881(0xf7)](_0x17e08e),console[_0x3c3881(0xdd)](a39_0xa5d30f[_0x3c3881(0xed)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x3c3881(0x10f))),{'ok':![],'message':_0x17e08e};}const _0x1e9667=a39_0x5f4367[_0x3c3881(0xc5)](VERSION),_0x2a6dc4=a39_0x5f4367[_0x3c3881(0xc5)](_0x2ef321['version']);if(!_0x1e9667||!_0x2a6dc4)return _0x588fe4['fail']('Version\x20comparison\x20failed'),{'ok':![],'message':_0x3c3881(0xdf)};if(!shouldInstallTarget(_0x1e9667,_0x2ef321)){const _0x5873c9=_0x2ef321['source']==='version'?_0x3c3881(0xd4)+_0x2ef321[_0x3c3881(0xfd)]+')':_0x3c3881(0xd7)+_0x2ef321[_0x3c3881(0xfd)]+')';return _0x588fe4[_0x3c3881(0xeb)](_0x5873c9),{'ok':repairCurrentBuiltinSkill()};}_0x588fe4[_0x3c3881(0xee)](getInstallPlanLabel(_0x52dca1,_0x2ef321));const _0x2a424b=detectPackageManager(),_0x565a0c=_0x2a424b===_0x3c3881(0xd8)?resolveNpmBin('npm'):_0x2a424b,_0x5e49a3=a39_0x15bb54(_0x3c3881(0xca)+_0x2a424b+_0x3c3881(0xfc))[_0x3c3881(0x111)]();try{return await execa(_0x565a0c,[_0x3c3881(0xf6),'-g',NPM_PACKAGE_NAME+'@'+_0x2ef321[_0x3c3881(0xfd)]],{'stdio':_0x3c3881(0x10d)}),_0x5e49a3[_0x3c3881(0xeb)](_0x3c3881(0xe2)+_0x2ef321[_0x3c3881(0xfd)]),console[_0x3c3881(0xdd)](a39_0xa5d30f[_0x3c3881(0xed)](_0x3c3881(0xe6))),{'ok':verifyUpdatedBuiltinSkill(_0x2ef321[_0x3c3881(0xfd)])};}catch(_0x4cd413){return _0x5e49a3[_0x3c3881(0xf7)](_0x3c3881(0xe8)),console[_0x3c3881(0xfe)](a39_0xa5d30f['red']('\x20\x20'+_0x4cd413['message'])),console[_0x3c3881(0xdd)](a39_0xa5d30f[_0x3c3881(0xed)](_0x3c3881(0x118)+_0x2a424b+_0x3c3881(0x117)+NPM_PACKAGE_NAME+'@'+_0x2ef321[_0x3c3881(0xfd)])),{'ok':![],'message':_0x4cd413[_0x3c3881(0x10e)]};}}export const updateDefinition={'service':a39_0x2b92fb(0xda),'command':a39_0x2b92fb(0xe5),'description':a39_0x2b92fb(0xc9),'risk':a39_0x2b92fb(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x1036e2=a39_0xa30d;(function(_0x1dd4ed,_0x4fa1db){const _0x244cef=a39_0xa30d,_0x32b125=_0x1dd4ed();while(!![]){try{const _0x443ea2=-parseInt(_0x244cef(0x13b))/0x1*(parseInt(_0x244cef(0x10d))/0x2)+parseInt(_0x244cef(0x12d))/0x3+-parseInt(_0x244cef(0x11a))/0x4*(-parseInt(_0x244cef(0x158))/0x5)+parseInt(_0x244cef(0x142))/0x6+parseInt(_0x244cef(0x159))/0x7*(-parseInt(_0x244cef(0x14b))/0x8)+-parseInt(_0x244cef(0x113))/0x9*(parseInt(_0x244cef(0x11f))/0xa)+-parseInt(_0x244cef(0x13c))/0xb*(-parseInt(_0x244cef(0x12c))/0xc);if(_0x443ea2===_0x4fa1db)break;else _0x32b125['push'](_0x32b125['shift']());}catch(_0x33a9a4){_0x32b125['push'](_0x32b125['shift']());}}}(a39_0x5ad5,0xa2946));import a39_0x29bbfb from'chalk';import a39_0x1f0f9d from'ora';import a39_0x8f65fb 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 _0x1ccdc2=a39_0xa30d;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1ccdc2(0x153)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x30934a=a39_0xa30d,_0x25820d=process[_0x30934a(0x139)][_0x30934a(0x12e)]();if(_0x25820d[_0x30934a(0x123)]('bun'))return'bun';return _0x30934a(0x12a);}const updateFlags=[{'name':a39_0x1036e2(0x114),'type':'boolean','description':a39_0x1036e2(0x10c),'default':![]},{'name':'version','type':a39_0x1036e2(0x10b),'description':a39_0x1036e2(0x14f)}];function getRequestedVersion(_0x592378){const _0x2ff1fe=a39_0x1036e2;return _0x592378[_0x2ff1fe(0x14e)]('version')[_0x2ff1fe(0x15a)]();}function a39_0x5ad5(){const _0x5a4898=['Already\x20up\x20to\x20date\x20(v','start','error','state','green',',\x20found\x20','execPath','read','164791BrPKoM','14931829JNjzkv',']:\x20','length','Update\x20failed','Updating\x20via\x20','latest','7607274vVPrTE','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','fail',',\x20state\x20','unknown','yellow','skillVersion','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20is\x20up\x20to\x20date.','90856DwGmgT','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20→\x20','str','Install\x20a\x20specific\x20CLI\x20version','/dist-tags','Already\x20on\x20requested\x20version\x20(v','\x20\x20Run\x20manually:\x20','slice','version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','object','gray','5CBUdAn','553KpdOjM','trim','Checking\x20for\x20updates...','bool','Requested\x20version:\x20','info','succeed','string','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','14jedyBD','update','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Checking\x20CLI\x20Built-in\x20Skill...','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','red','1493847smXYZp','beta','expected\x20','source','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updated\x20to\x20v','\x20install\x20-g\x20','140752qeSgfI','\x20cli-skill\x20install','\x20\x20CLI\x20Built-in\x20Skill\x20','timeout','run','10pdWGYN','valid','warn','fromEntries','includes','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','validation','message','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Version\x20comparison\x20failed','current','npm','map','12kVzXWw','666429ujYmLs','toLowerCase','...','Beta\x20version:\x20','filter','log'];a39_0x5ad5=function(){return _0x5a4898;};return a39_0x5ad5();}async function validateUpdateFlags(_0x399362){const _0x21c7c0=a39_0x1036e2,_0x21ebc0=_0x399362[_0x21c7c0(0x107)]('beta'),_0x50ccd7=getRequestedVersion(_0x399362);if(_0x21ebc0&&_0x50ccd7)throw CliErrors['validation'](_0x21c7c0(0x127),_0x21c7c0(0x117));if(_0x50ccd7&&!a39_0x8f65fb[_0x21c7c0(0x120)](_0x50ccd7))throw CliErrors[_0x21c7c0(0x125)]('Invalid\x20version:\x20'+_0x50ccd7,_0x21c7c0(0x10f));}async function fetchNpmDistTags(){const _0x286e31=a39_0x1036e2;try{const _0x54c344=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x286e31(0x150),{'signal':AbortSignal[_0x286e31(0x11d)](0x2710)});if(!_0x54c344['ok'])return null;const _0x32cbe2=await _0x54c344['json']();if(!_0x32cbe2||typeof _0x32cbe2!==_0x286e31(0x156))return null;return Object[_0x286e31(0x122)](Object['entries'](_0x32cbe2)[_0x286e31(0x131)](([,_0x33a486])=>typeof _0x33a486===_0x286e31(0x10b)&&_0x33a486['trim']()[_0x286e31(0x13e)]>0x0)[_0x286e31(0x12b)](([_0x477724,_0x3e3aa3])=>[_0x477724,String(_0x3e3aa3)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x46f25c){const _0x25be08=await fetchNpmDistTags();return _0x25be08?.[_0x46f25c]??null;}async function fetchLatestVersion(){const _0xfd636f=a39_0x1036e2;return fetchNpmDistTagVersion(_0xfd636f(0x141));}async function resolveTargetVersion(_0x5ba5ed){const _0x13ef21=a39_0x1036e2,_0x3394b8=getRequestedVersion(_0x5ba5ed);if(_0x3394b8)return{'version':_0x3394b8,'source':_0x13ef21(0x154)};if(_0x5ba5ed[_0x13ef21(0x107)](_0x13ef21(0x114))){const _0x3b78e5=await fetchNpmDistTagVersion(_0x13ef21(0x114));if(!_0x3b78e5)return null;return{'version':_0x3b78e5,'source':_0x13ef21(0x114)};}const _0x4473d5=await fetchLatestVersion();if(!_0x4473d5)return null;return{'version':_0x4473d5,'source':'latest'};}function shouldInstallTarget(_0x407852,_0x24ed7a){const _0x2b09aa=a39_0x1036e2;if(_0x24ed7a[_0x2b09aa(0x116)]===_0x2b09aa(0x154)||_0x24ed7a['source']===_0x2b09aa(0x114))return!a39_0x8f65fb['eq'](_0x407852,_0x24ed7a[_0x2b09aa(0x154)]);return a39_0x8f65fb['lt'](_0x407852,_0x24ed7a[_0x2b09aa(0x154)]);}function getInstallPlanLabel(_0x167992,_0x12bf85){const _0x44bbfe=a39_0x1036e2;switch(_0x12bf85['source']){case _0x44bbfe(0x114):return _0x44bbfe(0x130)+a39_0x29bbfb[_0x44bbfe(0x147)](_0x167992)+_0x44bbfe(0x14d)+a39_0x29bbfb[_0x44bbfe(0x137)](_0x12bf85[_0x44bbfe(0x154)]);case _0x44bbfe(0x154):return _0x44bbfe(0x108)+a39_0x29bbfb[_0x44bbfe(0x147)](_0x167992)+_0x44bbfe(0x14d)+a39_0x29bbfb[_0x44bbfe(0x137)](_0x12bf85['version']);case _0x44bbfe(0x141):default:return'Update\x20available:\x20'+a39_0x29bbfb['yellow'](_0x167992)+'\x20→\x20'+a39_0x29bbfb['green'](_0x12bf85[_0x44bbfe(0x154)]);}}function repairCurrentBuiltinSkill(){const _0x2f70dd=a39_0x1036e2;console[_0x2f70dd(0x132)](a39_0x29bbfb[_0x2f70dd(0x157)](_0x2f70dd(0x110)));const _0x1e05f4=installBuiltinSkill();if(_0x1e05f4['ok'])return console[_0x2f70dd(0x132)](a39_0x29bbfb[_0x2f70dd(0x157)](_0x2f70dd(0x11c)+_0x1e05f4[_0x2f70dd(0x148)]+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x2f70dd(0x121)](a39_0x29bbfb[_0x2f70dd(0x147)](_0x2f70dd(0x149)+_0x1e05f4['code']+_0x2f70dd(0x13d)+(_0x1e05f4[_0x2f70dd(0x135)]||_0x2f70dd(0x146)))),console[_0x2f70dd(0x132)](a39_0x29bbfb[_0x2f70dd(0x157)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x2f70dd(0x11b))),![];}function verifyUpdatedBuiltinSkill(_0x240509){const _0x5d29f0=a39_0x1036e2,_0x173079=inspectInstalledBuiltinSkillVersion(_0x240509);if(_0x173079[_0x5d29f0(0x136)]===_0x5d29f0(0x129))return console[_0x5d29f0(0x132)](a39_0x29bbfb[_0x5d29f0(0x157)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x240509+_0x5d29f0(0x14a))),!![];const _0x34cb59=_0x173079[_0x5d29f0(0x148)]?_0x5d29f0(0x115)+_0x240509+_0x5d29f0(0x138)+_0x173079[_0x5d29f0(0x148)]:_0x5d29f0(0x115)+_0x240509+_0x5d29f0(0x145)+_0x173079['state'];return console['warn'](a39_0x29bbfb[_0x5d29f0(0x147)](_0x5d29f0(0x124)+_0x34cb59)),console[_0x5d29f0(0x132)](a39_0x29bbfb['gray'](_0x5d29f0(0x152)+_0x173079['repairCommand'])),![];}async function execute(_0x5ce212){const _0x51d2be=a39_0x1036e2;await validateUpdateFlags(_0x5ce212);const _0x401737=getCurrentVersion();console[_0x51d2be(0x132)]('Current\x20version:\x20'+_0x401737);const _0x2c6394=a39_0x1f0f9d(_0x51d2be(0x15b))['start'](),_0x255d5c=await resolveTargetVersion(_0x5ce212);if(!_0x255d5c){const _0x4930d1=_0x5ce212['bool'](_0x51d2be(0x114))?_0x51d2be(0x14c):_0x51d2be(0x111);return _0x2c6394['fail'](_0x4930d1),console[_0x51d2be(0x132)](a39_0x29bbfb[_0x51d2be(0x157)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4930d1};}const _0x4149ca=a39_0x8f65fb[_0x51d2be(0x120)](VERSION),_0x390dac=a39_0x8f65fb['valid'](_0x255d5c['version']);if(!_0x4149ca||!_0x390dac)return _0x2c6394[_0x51d2be(0x144)](_0x51d2be(0x128)),{'ok':![],'message':_0x51d2be(0x128)};if(!shouldInstallTarget(_0x4149ca,_0x255d5c)){const _0x56778c=_0x255d5c[_0x51d2be(0x116)]===_0x51d2be(0x154)?_0x51d2be(0x151)+_0x255d5c[_0x51d2be(0x154)]+')':_0x51d2be(0x133)+_0x255d5c[_0x51d2be(0x154)]+')';return _0x2c6394[_0x51d2be(0x10a)](_0x56778c),{'ok':repairCurrentBuiltinSkill()};}_0x2c6394[_0x51d2be(0x109)](getInstallPlanLabel(_0x401737,_0x255d5c));const _0x2917e9=detectPackageManager(),_0x39cd55=_0x2917e9===_0x51d2be(0x12a)?resolveNpmBin(_0x51d2be(0x12a)):_0x2917e9,_0x18aa02=a39_0x1f0f9d(_0x51d2be(0x140)+_0x2917e9+_0x51d2be(0x12f))[_0x51d2be(0x134)]();try{return await execa(_0x39cd55,['install','-g',NPM_PACKAGE_NAME+'@'+_0x255d5c[_0x51d2be(0x154)]],{'stdio':'pipe'}),_0x18aa02[_0x51d2be(0x10a)](_0x51d2be(0x118)+_0x255d5c[_0x51d2be(0x154)]),console['log'](a39_0x29bbfb[_0x51d2be(0x157)](_0x51d2be(0x155))),{'ok':verifyUpdatedBuiltinSkill(_0x255d5c['version'])};}catch(_0xc382b){return _0x18aa02['fail'](_0x51d2be(0x13f)),console[_0x51d2be(0x135)](a39_0x29bbfb[_0x51d2be(0x112)]('\x20\x20'+_0xc382b[_0x51d2be(0x126)])),console[_0x51d2be(0x132)](a39_0x29bbfb[_0x51d2be(0x157)]('\x20\x20Try\x20manually:\x20'+_0x2917e9+_0x51d2be(0x119)+NPM_PACKAGE_NAME+'@'+_0x255d5c[_0x51d2be(0x154)])),{'ok':![],'message':_0xc382b['message']};}}function a39_0xa30d(_0x59270f,_0x3e8530){_0x59270f=_0x59270f-0x107;const _0x5ad51=a39_0x5ad5();let _0xa30d23=_0x5ad51[_0x59270f];return _0xa30d23;}export const updateDefinition={'service':a39_0x1036e2(0x10e),'command':a39_0x1036e2(0x11e),'description':a39_0x1036e2(0x143),'risk':a39_0x1036e2(0x13a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x45d6bb,_0xf6c73){const _0x39a494=a40_0x3d5b,_0x448f4a=_0x45d6bb();while(!![]){try{const _0x2bd92d=parseInt(_0x39a494(0xb9))/0x1*(parseInt(_0x39a494(0xbd))/0x2)+-parseInt(_0x39a494(0xbe))/0x3+-parseInt(_0x39a494(0xb7))/0x4+-parseInt(_0x39a494(0xbb))/0x5+-parseInt(_0x39a494(0xba))/0x6+-parseInt(_0x39a494(0xbc))/0x7+parseInt(_0x39a494(0xb8))/0x8;if(_0x2bd92d===_0xf6c73)break;else _0x448f4a['push'](_0x448f4a['shift']());}catch(_0x5b1345){_0x448f4a['push'](_0x448f4a['shift']());}}}(a40_0x422d,0xa9e89));function a40_0x422d(){const _0x2bf92b=['368631wxWERQ','4938436qtwHoN','26289712Xhfgqp','33855lydULf','6767004aZKFrb','4708970CgmlJf','1014650amqLcT','58cLcGvX'];a40_0x422d=function(){return _0x2bf92b;};return a40_0x422d();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x3d5b(_0x3bf01a,_0xab4564){_0x3bf01a=_0x3bf01a-0xb7;const _0x422d87=a40_0x422d();let _0x3d5bfc=_0x422d87[_0x3bf01a];return _0x3d5bfc;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x2068a3,_0x3d8d49){const _0x473685=a40_0x5ac4,_0x2eb821=_0x2068a3();while(!![]){try{const _0x5b8a2c=parseInt(_0x473685(0x144))/0x1*(-parseInt(_0x473685(0x141))/0x2)+-parseInt(_0x473685(0x13a))/0x3+-parseInt(_0x473685(0x145))/0x4*(parseInt(_0x473685(0x140))/0x5)+-parseInt(_0x473685(0x13c))/0x6+parseInt(_0x473685(0x13e))/0x7*(parseInt(_0x473685(0x143))/0x8)+-parseInt(_0x473685(0x13b))/0x9*(parseInt(_0x473685(0x13d))/0xa)+-parseInt(_0x473685(0x142))/0xb*(-parseInt(_0x473685(0x13f))/0xc);if(_0x5b8a2c===_0x3d8d49)break;else _0x2eb821['push'](_0x2eb821['shift']());}catch(_0x41c388){_0x2eb821['push'](_0x2eb821['shift']());}}}(a40_0xa495,0xbd1c1));function a40_0x5ac4(_0x1bdfe7,_0x2c0b35){_0x1bdfe7=_0x1bdfe7-0x13a;const _0xa49504=a40_0xa495();let _0x5ac47a=_0xa49504[_0x1bdfe7];return _0x5ac47a;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0xa495(){const _0x3a1dea=['6450216FPYThl','4972610GEQpxa','5517379LzSBCn','67284CWZbfG','5035feqtdX','100388FZIunG','6622ZRaKZm','8TGRNNn','2aMxFqv','1168uuuUVh','2775084hbOiIY','18sTrJhF'];a40_0xa495=function(){return _0x3a1dea;};return a40_0xa495();}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x35c1f4=a41_0x153b;(function(_0x1bb4b8,_0x62c82f){const _0x1dc823=a41_0x153b,_0xbded10=_0x1bb4b8();while(!![]){try{const _0x4cc104=-parseInt(_0x1dc823(0x157))/0x1+parseInt(_0x1dc823(0x15e))/0x2+-parseInt(_0x1dc823(0x158))/0x3+-parseInt(_0x1dc823(0x160))/0x4*(-parseInt(_0x1dc823(0x155))/0x5)+-parseInt(_0x1dc823(0x15d))/0x6+parseInt(_0x1dc823(0x15b))/0x7*(parseInt(_0x1dc823(0x163))/0x8)+-parseInt(_0x1dc823(0x152))/0x9*(-parseInt(_0x1dc823(0x156))/0xa);if(_0x4cc104===_0x62c82f)break;else _0xbded10['push'](_0xbded10['shift']());}catch(_0x34a613){_0xbded10['push'](_0xbded10['shift']());}}}(a41_0x34d6,0x3530c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x153b(_0x19d6f0,_0x25c473){_0x19d6f0=_0x19d6f0-0x151;const _0x34d690=a41_0x34d6();let _0x153b4a=_0x34d690[_0x19d6f0];return _0x153b4a;}function a41_0x34d6(){const _0x3a12ac=['70LmbNAZ','320312OMPMCi','257301Qpmiix','sdk','name','2493778auiXdj','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1812042IGnbwZ','185950yVBqrE','string','61928hkuLEg','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Omit\x20import\x20statements\x20from\x20generated\x20code','8gpeWqX','code','alias','read','str','95391nItYqt','operation','appCode','130jIVBOR'];a41_0x34d6=function(){return _0x3a12ac;};return a41_0x34d6();}export const codegenSdk={'service':'codegen','command':a41_0x35c1f4(0x159),'description':a41_0x35c1f4(0x15c),'risk':a41_0x35c1f4(0x166),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x35c1f4(0x165),'type':a41_0x35c1f4(0x15f),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x35c1f4(0x153),'type':a41_0x35c1f4(0x15f),'required':!![],'description':a41_0x35c1f4(0x161)},{'name':'skip-imports','type':'boolean','description':a41_0x35c1f4(0x162)}],async 'execute'(_0xcb23dc){const _0xb88910=a41_0x35c1f4,{dataset:_0x4a00f8,operation:_0x345311}=await getOperationDetail(_0xcb23dc[_0xb88910(0x154)],_0xcb23dc[_0xb88910(0x151)](_0xb88910(0x164)),_0xcb23dc[_0xb88910(0x151)]('operation')),_0x4554d5=generateSdkCode(_0x4a00f8,_0x345311,{'includeImports':!_0xcb23dc['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x4a00f8[_0xb88910(0x15a)],'code':_0x4a00f8['code'],'tableName':_0x4a00f8['tableName']},'operation':_0xcb23dc[_0xb88910(0x151)](_0xb88910(0x153)),'code':_0x4554d5}};}};
1
+ const a41_0x31dcc9=a41_0x25fe;(function(_0x14d6f6,_0x45eda7){const _0x21ec80=a41_0x25fe,_0x106e9f=_0x14d6f6();while(!![]){try{const _0x4ff460=-parseInt(_0x21ec80(0x89))/0x1*(parseInt(_0x21ec80(0x8e))/0x2)+-parseInt(_0x21ec80(0x92))/0x3*(parseInt(_0x21ec80(0x8b))/0x4)+-parseInt(_0x21ec80(0x7f))/0x5*(parseInt(_0x21ec80(0x85))/0x6)+-parseInt(_0x21ec80(0x84))/0x7+-parseInt(_0x21ec80(0x82))/0x8+-parseInt(_0x21ec80(0x8c))/0x9+parseInt(_0x21ec80(0x91))/0xa;if(_0x4ff460===_0x45eda7)break;else _0x106e9f['push'](_0x106e9f['shift']());}catch(_0x45e591){_0x106e9f['push'](_0x106e9f['shift']());}}}(a41_0x3122,0xac4b0));function a41_0x3122(){const _0x3dede9=['325738PgxsWb','Omit\x20import\x20statements\x20from\x20generated\x20code','skip-imports','54347910uCHseC','186YmFSso','str','string','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','codegen','appCode','403165pvBztD','name','code','5861392GDwNJN','boolean','8180613ytqQEn','60vTihDQ','bool','operation','alias','3lEAaHl','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','19516PEmHYg','11072799hPDADc','tableName'];a41_0x3122=function(){return _0x3dede9;};return a41_0x3122();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x25fe(_0x4ac3d6,_0x415457){_0x4ac3d6=_0x4ac3d6-0x7d;const _0x312207=a41_0x3122();let _0x25fed6=_0x312207[_0x4ac3d6];return _0x25fed6;}export const codegenSdk={'service':a41_0x31dcc9(0x7d),'command':'sdk','description':a41_0x31dcc9(0x8a),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x31dcc9(0x88),'type':a41_0x31dcc9(0x94),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x31dcc9(0x87),'type':'string','required':!![],'description':a41_0x31dcc9(0x95)},{'name':a41_0x31dcc9(0x90),'type':a41_0x31dcc9(0x83),'description':a41_0x31dcc9(0x8f)}],async 'execute'(_0x5a87fd){const _0x562f35=a41_0x31dcc9,{dataset:_0x284ea3,operation:_0x2222eb}=await getOperationDetail(_0x5a87fd[_0x562f35(0x7e)],_0x5a87fd[_0x562f35(0x93)]('code'),_0x5a87fd[_0x562f35(0x93)](_0x562f35(0x87))),_0x4ef69c=generateSdkCode(_0x284ea3,_0x2222eb,{'includeImports':!_0x5a87fd[_0x562f35(0x86)](_0x562f35(0x90))});return{'ok':!![],'data':{'dataset':{'name':_0x284ea3[_0x562f35(0x80)],'code':_0x284ea3[_0x562f35(0x81)],'tableName':_0x284ea3[_0x562f35(0x8d)]},'operation':_0x5a87fd[_0x562f35(0x93)]('operation'),'code':_0x4ef69c}};}};
@@ -1 +1 @@
1
- const a42_0x285043=a42_0x5409;function a42_0x5409(_0x3be252,_0x2a34e7){_0x3be252=_0x3be252-0x140;const _0x10b7c7=a42_0x10b7();let _0x54091f=_0x10b7c7[_0x3be252];return _0x54091f;}(function(_0x39aa58,_0x1102bb){const _0x5a8f58=a42_0x5409,_0x382614=_0x39aa58();while(!![]){try{const _0x4ed77e=-parseInt(_0x5a8f58(0x154))/0x1+parseInt(_0x5a8f58(0x14d))/0x2+-parseInt(_0x5a8f58(0x158))/0x3*(-parseInt(_0x5a8f58(0x14e))/0x4)+-parseInt(_0x5a8f58(0x14a))/0x5+parseInt(_0x5a8f58(0x153))/0x6*(parseInt(_0x5a8f58(0x150))/0x7)+-parseInt(_0x5a8f58(0x14f))/0x8*(-parseInt(_0x5a8f58(0x146))/0x9)+-parseInt(_0x5a8f58(0x140))/0xa;if(_0x4ed77e===_0x1102bb)break;else _0x382614['push'](_0x382614['shift']());}catch(_0x50c204){_0x382614['push'](_0x382614['shift']());}}}(a42_0x10b7,0x65dde));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a42_0x10b7(){const _0x5d0f7e=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','boolean','sql','bff','read','90jEBrrQ','target','no-imports','sqlCode','710770rryLKM','codegen','str','611456RvtGoL','1923676zBYGMS','550232aCvyEB','602hSpmCN','sqlName','sdk','19554DSmzmL','439165wLixrp','sqlcode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','bool','3ILhBKV','7561460kmazsd'];a42_0x10b7=function(){return _0x5d0f7e;};return a42_0x10b7();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x285043(0x14b),'command':a42_0x285043(0x143),'description':a42_0x285043(0x156),'risk':a42_0x285043(0x145),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a42_0x285043(0x141),'default':a42_0x285043(0x152),'enum':['sdk',a42_0x285043(0x144)]},{'name':a42_0x285043(0x148),'type':a42_0x285043(0x142),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2a3473){const _0x1148a4=a42_0x285043,_0xc4563a=await getSqlQueryInfo(_0x2a3473['appCode'],_0x2a3473[_0x1148a4(0x14c)](_0x1148a4(0x155))),_0x2557c2=_0x2a3473['str'](_0x1148a4(0x147))||_0x1148a4(0x152),_0x373246=generateSqlCodeTemplate(_0xc4563a,{'target':_0x2557c2,'includeImports':!_0x2a3473[_0x1148a4(0x157)](_0x1148a4(0x148))});return{'ok':!![],'data':{'sqlCode':_0xc4563a[_0x1148a4(0x149)],'sqlName':_0xc4563a[_0x1148a4(0x151)],'target':_0x2557c2,'code':_0x373246}};}};
1
+ const a42_0x4bc4ea=a42_0x4b19;(function(_0x210533,_0x15696e){const _0x39de0a=a42_0x4b19,_0x51529a=_0x210533();while(!![]){try{const _0x223c4a=-parseInt(_0x39de0a(0x161))/0x1+parseInt(_0x39de0a(0x15b))/0x2*(parseInt(_0x39de0a(0x160))/0x3)+parseInt(_0x39de0a(0x154))/0x4*(-parseInt(_0x39de0a(0x15d))/0x5)+parseInt(_0x39de0a(0x165))/0x6+-parseInt(_0x39de0a(0x164))/0x7+parseInt(_0x39de0a(0x151))/0x8+-parseInt(_0x39de0a(0x15a))/0x9;if(_0x223c4a===_0x15696e)break;else _0x51529a['push'](_0x51529a['shift']());}catch(_0x5dafca){_0x51529a['push'](_0x51529a['shift']());}}}(a42_0x2ab2,0xa63ae));function a42_0x4b19(_0x2e4df5,_0xb26be2){_0x2e4df5=_0x2e4df5-0x150;const _0x2ab205=a42_0x2ab2();let _0x4b1922=_0x2ab205[_0x2e4df5];return _0x4b1922;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a42_0x4bc4ea(0x15e),'description':a42_0x4bc4ea(0x162),'risk':a42_0x4bc4ea(0x158),'flags':[SQLCODE_FLAG,{'name':a42_0x4bc4ea(0x15c),'type':a42_0x4bc4ea(0x15f),'description':a42_0x4bc4ea(0x163),'default':a42_0x4bc4ea(0x152),'enum':[a42_0x4bc4ea(0x152),a42_0x4bc4ea(0x155)]},{'name':a42_0x4bc4ea(0x166),'type':a42_0x4bc4ea(0x157),'description':a42_0x4bc4ea(0x159)}],async 'execute'(_0x2111af){const _0x527f28=a42_0x4bc4ea,_0x4853b=await getSqlQueryInfo(_0x2111af['appCode'],_0x2111af[_0x527f28(0x150)]('sqlcode')),_0x470999=_0x2111af[_0x527f28(0x150)](_0x527f28(0x15c))||'sdk',_0x5b1a78=generateSqlCodeTemplate(_0x4853b,{'target':_0x470999,'includeImports':!_0x2111af[_0x527f28(0x156)](_0x527f28(0x166))});return{'ok':!![],'data':{'sqlCode':_0x4853b[_0x527f28(0x153)],'sqlName':_0x4853b['sqlName'],'target':_0x470999,'code':_0x5b1a78}};}};function a42_0x2ab2(){const _0x292f9f=['Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','1794121hfaJKf','4986876kOaJlG','no-imports','str','7070928OKCBQX','sdk','sqlCode','1751392IRtnUq','bff','bool','boolean','read','Omit\x20import\x20statements\x20from\x20generated\x20code','5247594IWnICO','22zTcvVS','target','5BQAAnH','sql','string','303549oafGoh','869930QrWiwS'];a42_0x2ab2=function(){return _0x292f9f;};return a42_0x2ab2();}
@@ -1 +1 @@
1
- (function(_0x3e4234,_0x57c1ef){const _0x58fa51=a43_0xe2a2,_0x386051=_0x3e4234();while(!![]){try{const _0x10efd1=-parseInt(_0x58fa51(0x98))/0x1+parseInt(_0x58fa51(0x9a))/0x2*(-parseInt(_0x58fa51(0x8f))/0x3)+parseInt(_0x58fa51(0x82))/0x4*(-parseInt(_0x58fa51(0x80))/0x5)+-parseInt(_0x58fa51(0x9e))/0x6*(-parseInt(_0x58fa51(0x7e))/0x7)+-parseInt(_0x58fa51(0x7c))/0x8*(-parseInt(_0x58fa51(0x8c))/0x9)+-parseInt(_0x58fa51(0x9f))/0xa*(-parseInt(_0x58fa51(0x91))/0xb)+parseInt(_0x58fa51(0x96))/0xc;if(_0x10efd1===_0x57c1ef)break;else _0x386051['push'](_0x386051['shift']());}catch(_0x35752f){_0x386051['push'](_0x386051['shift']());}}}(a43_0x157b,0xf0a3c));import{CliErrors}from'../../errors.js';function a43_0x157b(){const _0x195a6c=['29195RrXjjC','object','92ihjzKx','Usage:\x20','projectConfig','string','validation','args','apps','str','Removed\x20app\x20\x22','App\x20\x22','324909WEPMPM','\x22\x20(appcode:\x20','global','37725fEuzsp','Added','1871507kdcKkq','Use\x20global\x20config\x20scope','Missing\x20app\x20name.','inherit','\x20config.','6021636qLrihW','appcode','1718110CqshEV','\x20Set\x20as\x20default\x20app.','34XlvaaN','\x20Note:\x20app\x20\x22','globalConfig','trim','444NVCYNT','20VtyLvu','defaultApp','\x20<name>\x20[--global]','boolean','keys','bool','\x20<name>\x20--appcode\x20<code>','flagMissing','232yUzHBh','Updated','109998ZLEdTm','both'];a43_0x157b=function(){return _0x195a6c;};return a43_0x157b();}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 _0x5390af=a43_0xe2a2;return[{'name':_0x5390af(0x97),'type':_0x5390af(0x85),'description':'App\x20code','required':!![]},{'name':_0x5390af(0x8e),'type':_0x5390af(0xa2),'description':_0x5390af(0x92),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x97ec25=a43_0xe2a2;return[{'name':_0x97ec25(0x8e),'type':'boolean','description':_0x97ec25(0x92),'default':![]}];}export async function validateAppName(_0x458975,_0x58bbc4){const _0x30d68b=a43_0xe2a2,_0x8a56d7=_0x458975[_0x30d68b(0x87)][0x0]?.[_0x30d68b(0x9d)]();if(!_0x8a56d7)throw CliErrors['validation'](_0x30d68b(0x93),_0x30d68b(0x83)+CLI_BIN_NAME+'\x20'+_0x58bbc4+'\x20<name>');}export async function runAppAdd(_0x5ef5cc,_0xe3d675){const _0x3464b5=a43_0xe2a2,_0x4f0c0e=_0x5ef5cc[_0x3464b5(0x87)][0x0]?.[_0x3464b5(0x9d)]();if(!_0x4f0c0e)throw CliErrors[_0x3464b5(0x86)](_0x3464b5(0x93),_0x3464b5(0x83)+CLI_BIN_NAME+'\x20'+_0xe3d675+_0x3464b5(0x7a));const _0x4b45c4=_0x5ef5cc[_0x3464b5(0x89)](_0x3464b5(0x97));if(!_0x4b45c4)throw CliErrors[_0x3464b5(0x7b)](_0x3464b5(0x97),_0x3464b5(0x83)+CLI_BIN_NAME+'\x20'+_0xe3d675+_0x3464b5(0x7a));const _0x20aded={'global':_0x5ef5cc[_0x3464b5(0x79)](_0x3464b5(0x8e))},_0x2a9f18=readConfig(_0x20aded);if(!_0x2a9f18[_0x3464b5(0x88)])_0x2a9f18[_0x3464b5(0x88)]={};const _0x1d612d={'appcode':_0x4b45c4,...collectAppProfileOverrides(_0x28e5e3=>_0x5ef5cc[_0x3464b5(0x89)](_0x28e5e3))},_0x3b5627=_0x2a9f18[_0x3464b5(0x88)],_0x27d9d4=!!_0x3b5627[_0x4f0c0e];_0x3b5627[_0x4f0c0e]=_0x1d612d;if(!_0x2a9f18[_0x3464b5(0xa0)])_0x2a9f18[_0x3464b5(0xa0)]=_0x4f0c0e;writeConfig(_0x2a9f18,_0x20aded);const _0x464963=!_0x27d9d4&&_0x2a9f18[_0x3464b5(0xa0)]===_0x4f0c0e?_0x3464b5(0x99):'',_0x4b68ad=(_0x27d9d4?_0x3464b5(0x7d):_0x3464b5(0x90))+'\x20app\x20\x22'+_0x4f0c0e+_0x3464b5(0x8d)+_0x4b45c4+')'+scopeLabel(_0x20aded)+'.'+_0x464963;return{'ok':!![],'message':_0x4b68ad};}function a43_0xe2a2(_0x2f4c4c,_0x3f00b8){_0x2f4c4c=_0x2f4c4c-0x79;const _0x157b46=a43_0x157b();let _0xe2a2f7=_0x157b46[_0x2f4c4c];return _0xe2a2f7;}export async function runAppRemove(_0x9bce32,_0x13eeff){const _0x2ec842=a43_0xe2a2,_0x3b27bd=_0x9bce32[_0x2ec842(0x87)][0x0]?.[_0x2ec842(0x9d)]();if(!_0x3b27bd)throw CliErrors[_0x2ec842(0x86)](_0x2ec842(0x93),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x13eeff+_0x2ec842(0xa1));const _0x4fc667=_0x9bce32[_0x2ec842(0x79)](_0x2ec842(0x8e)),{config:_0xf10244,layers:_0x4aa0e2}=readRawConfigWithLayers(),_0x37781e=_0xf10244[_0x2ec842(0x88)]??{};if(!_0x37781e[_0x3b27bd])throw CliErrors['validation'](_0x2ec842(0x8b)+_0x3b27bd+'\x22\x20not\x20found.');const _0x2e4cbf=_0x4aa0e2['globalConfig'][_0x2ec842(0x88)]&&typeof _0x4aa0e2[_0x2ec842(0x9c)]['apps']==='object'?_0x4aa0e2['globalConfig'][_0x2ec842(0x88)]:{},_0x1c2e53=_0x4aa0e2[_0x2ec842(0x84)]['apps']&&typeof _0x4aa0e2[_0x2ec842(0x84)][_0x2ec842(0x88)]===_0x2ec842(0x81)?_0x4aa0e2[_0x2ec842(0x84)][_0x2ec842(0x88)]:{},_0x2d8a03=appDefinedIn(_0x3b27bd,_0x2e4cbf,_0x1c2e53,_0x4aa0e2[_0x2ec842(0x84)][_0x2ec842(0x94)]===![]),_0xf44bce=resolveAppScopeForWrite(_0x3b27bd,_0x4fc667,_0x4aa0e2),_0x2e4828={'global':_0xf44bce===_0x2ec842(0x8e)},_0x272035=readConfig(_0x2e4828),_0x4126cd=_0x272035['apps'];if(!_0x4126cd||!_0x4126cd[_0x3b27bd])throw CliErrors[_0x2ec842(0x86)](_0x2ec842(0x8b)+_0x3b27bd+'\x22\x20not\x20found.');delete _0x4126cd[_0x3b27bd];let _0x4c5dd3='';if(_0x272035[_0x2ec842(0xa0)]===_0x3b27bd){const _0x47932d=Object['keys'](_0x4126cd);_0x272035[_0x2ec842(0xa0)]=_0x47932d['length']>0x0?_0x47932d[0x0]:undefined,_0x272035['defaultApp']?_0x4c5dd3='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x272035[_0x2ec842(0xa0)]+'\x22.':delete _0x272035[_0x2ec842(0xa0)];}Object[_0x2ec842(0xa3)](_0x4126cd)['length']===0x0&&(delete _0x272035[_0x2ec842(0x88)],delete _0x272035[_0x2ec842(0xa0)]);writeConfig(_0x272035,_0x2e4828);const _0x16b4df=_0x2d8a03===_0x2ec842(0x7f)?_0x2ec842(0x9b)+_0x3b27bd+'\x22\x20still\x20defined\x20in\x20'+(_0xf44bce==='project'?'global':'project')+_0x2ec842(0x95):'';return{'ok':!![],'message':_0x2ec842(0x8a)+_0x3b27bd+'\x22'+scopeLabel(_0x2e4828)+'.'+_0x4c5dd3+_0x16b4df};}
1
+ function a43_0x3eb4(_0x4156a3,_0x140f78){_0x4156a3=_0x4156a3-0xd6;const _0x3a80d4=a43_0x3a80();let _0x3eb49=_0x3a80d4[_0x4156a3];return _0x3eb49;}(function(_0x162b4d,_0x2ff55e){const _0x3fcaa6=a43_0x3eb4,_0x1462e7=_0x162b4d();while(!![]){try{const _0x4a9a50=-parseInt(_0x3fcaa6(0xf0))/0x1*(parseInt(_0x3fcaa6(0xf5))/0x2)+parseInt(_0x3fcaa6(0xf4))/0x3*(parseInt(_0x3fcaa6(0xeb))/0x4)+-parseInt(_0x3fcaa6(0xde))/0x5+parseInt(_0x3fcaa6(0xd9))/0x6+parseInt(_0x3fcaa6(0xfd))/0x7*(-parseInt(_0x3fcaa6(0xe6))/0x8)+parseInt(_0x3fcaa6(0xfb))/0x9*(-parseInt(_0x3fcaa6(0xef))/0xa)+parseInt(_0x3fcaa6(0xe1))/0xb*(parseInt(_0x3fcaa6(0xdb))/0xc);if(_0x4a9a50===_0x2ff55e)break;else _0x1462e7['push'](_0x1462e7['shift']());}catch(_0x22b2cf){_0x1462e7['push'](_0x1462e7['shift']());}}}(a43_0x3a80,0xb297f));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x560c35=a43_0x3eb4;return[{'name':_0x560c35(0xd6),'type':'string','description':_0x560c35(0xfc),'required':!![]},{'name':_0x560c35(0xe4),'type':_0x560c35(0xf6),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x8cc3ad=a43_0x3eb4;return[{'name':_0x8cc3ad(0xe4),'type':_0x8cc3ad(0xf6),'description':_0x8cc3ad(0x101),'default':![]}];}function a43_0x3a80(){const _0x17a17b=['bool','App\x20\x22','length','args','4PeqPCx','str','Usage:\x20','defaultApp','3728570DwwKpG','160508nVEGrQ','globalConfig','\x22\x20still\x20defined\x20in\x20','\x20app\x20\x22','3612003TRPXRD','18nIzPJh','boolean','apps','\x20Set\x20as\x20default\x20app.','keys','\x22\x20not\x20found.','9ELrsPK','App\x20code','14fgFbpL','object','\x20Default\x20app\x20changed\x20to\x20\x22','Missing\x20app\x20name.','Use\x20global\x20config\x20scope','\x20<name>\x20--appcode\x20<code>','Removed\x20app\x20\x22','appcode','\x20<name>','projectConfig','165090dFbdAZ','validation','204NAxBuN','\x20<name>\x20[--global]','\x22\x20(appcode:\x20','3687215ICEppB','flagMissing','trim','1370809XAuHxS','both','project','global','inherit','254592DxgjiZ'];a43_0x3a80=function(){return _0x17a17b;};return a43_0x3a80();}export async function validateAppName(_0x3497a9,_0x26da99){const _0x465476=a43_0x3eb4,_0x46b14f=_0x3497a9[_0x465476(0xea)][0x0]?.[_0x465476(0xe0)]();if(!_0x46b14f)throw CliErrors['validation']('Missing\x20app\x20name.',_0x465476(0xed)+CLI_BIN_NAME+'\x20'+_0x26da99+_0x465476(0xd7));}export async function runAppAdd(_0x1cebc1,_0xecc237){const _0x45be8b=a43_0x3eb4,_0x348c51=_0x1cebc1[_0x45be8b(0xea)][0x0]?.['trim']();if(!_0x348c51)throw CliErrors[_0x45be8b(0xda)]('Missing\x20app\x20name.',_0x45be8b(0xed)+CLI_BIN_NAME+'\x20'+_0xecc237+_0x45be8b(0x102));const _0x19e3e5=_0x1cebc1[_0x45be8b(0xec)](_0x45be8b(0xd6));if(!_0x19e3e5)throw CliErrors[_0x45be8b(0xdf)](_0x45be8b(0xd6),_0x45be8b(0xed)+CLI_BIN_NAME+'\x20'+_0xecc237+_0x45be8b(0x102));const _0x399b0e={'global':_0x1cebc1['bool'](_0x45be8b(0xe4))},_0x388b97=readConfig(_0x399b0e);if(!_0x388b97[_0x45be8b(0xf7)])_0x388b97[_0x45be8b(0xf7)]={};const _0x555554={'appcode':_0x19e3e5,...collectAppProfileOverrides(_0x140424=>_0x1cebc1[_0x45be8b(0xec)](_0x140424))},_0x48463f=_0x388b97[_0x45be8b(0xf7)],_0x259582=!!_0x48463f[_0x348c51];_0x48463f[_0x348c51]=_0x555554;if(!_0x388b97[_0x45be8b(0xee)])_0x388b97[_0x45be8b(0xee)]=_0x348c51;writeConfig(_0x388b97,_0x399b0e);const _0x100388=!_0x259582&&_0x388b97[_0x45be8b(0xee)]===_0x348c51?_0x45be8b(0xf8):'',_0x4f01aa=(_0x259582?'Updated':'Added')+_0x45be8b(0xf3)+_0x348c51+_0x45be8b(0xdd)+_0x19e3e5+')'+scopeLabel(_0x399b0e)+'.'+_0x100388;return{'ok':!![],'message':_0x4f01aa};}export async function runAppRemove(_0x196ffd,_0x1dbc3b){const _0x4d3d17=a43_0x3eb4,_0x1b6498=_0x196ffd[_0x4d3d17(0xea)][0x0]?.[_0x4d3d17(0xe0)]();if(!_0x1b6498)throw CliErrors[_0x4d3d17(0xda)](_0x4d3d17(0x100),_0x4d3d17(0xed)+CLI_BIN_NAME+'\x20'+_0x1dbc3b+_0x4d3d17(0xdc));const _0x347fc0=_0x196ffd[_0x4d3d17(0xe7)](_0x4d3d17(0xe4)),{config:_0x10be1a,layers:_0x2299ca}=readRawConfigWithLayers(),_0x421a17=_0x10be1a[_0x4d3d17(0xf7)]??{};if(!_0x421a17[_0x1b6498])throw CliErrors[_0x4d3d17(0xda)](_0x4d3d17(0xe8)+_0x1b6498+'\x22\x20not\x20found.');const _0x4b69cb=_0x2299ca[_0x4d3d17(0xf1)]['apps']&&typeof _0x2299ca[_0x4d3d17(0xf1)][_0x4d3d17(0xf7)]===_0x4d3d17(0xfe)?_0x2299ca['globalConfig'][_0x4d3d17(0xf7)]:{},_0x5d2cb2=_0x2299ca['projectConfig']['apps']&&typeof _0x2299ca['projectConfig'][_0x4d3d17(0xf7)]===_0x4d3d17(0xfe)?_0x2299ca[_0x4d3d17(0xd8)][_0x4d3d17(0xf7)]:{},_0x369757=appDefinedIn(_0x1b6498,_0x4b69cb,_0x5d2cb2,_0x2299ca[_0x4d3d17(0xd8)][_0x4d3d17(0xe5)]===![]),_0x581208=resolveAppScopeForWrite(_0x1b6498,_0x347fc0,_0x2299ca),_0x460671={'global':_0x581208===_0x4d3d17(0xe4)},_0x10a925=readConfig(_0x460671),_0x15c76a=_0x10a925[_0x4d3d17(0xf7)];if(!_0x15c76a||!_0x15c76a[_0x1b6498])throw CliErrors[_0x4d3d17(0xda)](_0x4d3d17(0xe8)+_0x1b6498+_0x4d3d17(0xfa));delete _0x15c76a[_0x1b6498];let _0x21143b='';if(_0x10a925[_0x4d3d17(0xee)]===_0x1b6498){const _0x17a29a=Object[_0x4d3d17(0xf9)](_0x15c76a);_0x10a925['defaultApp']=_0x17a29a[_0x4d3d17(0xe9)]>0x0?_0x17a29a[0x0]:undefined,_0x10a925[_0x4d3d17(0xee)]?_0x21143b=_0x4d3d17(0xff)+_0x10a925[_0x4d3d17(0xee)]+'\x22.':delete _0x10a925[_0x4d3d17(0xee)];}Object[_0x4d3d17(0xf9)](_0x15c76a)[_0x4d3d17(0xe9)]===0x0&&(delete _0x10a925[_0x4d3d17(0xf7)],delete _0x10a925['defaultApp']);writeConfig(_0x10a925,_0x460671);const _0x1eabdf=_0x369757===_0x4d3d17(0xe2)?'\x20Note:\x20app\x20\x22'+_0x1b6498+_0x4d3d17(0xf2)+(_0x581208==='project'?_0x4d3d17(0xe4):_0x4d3d17(0xe3))+'\x20config.':'';return{'ok':!![],'message':_0x4d3d17(0x103)+_0x1b6498+'\x22'+scopeLabel(_0x460671)+'.'+_0x21143b+_0x1eabdf};}
@@ -1 +1 @@
1
- (function(_0x3697d2,_0x1539c6){const _0x298b70=a44_0x3c15,_0x226f9d=_0x3697d2();while(!![]){try{const _0x3f41e2=parseInt(_0x298b70(0xc8))/0x1+-parseInt(_0x298b70(0xec))/0x2*(-parseInt(_0x298b70(0xda))/0x3)+parseInt(_0x298b70(0xd4))/0x4*(parseInt(_0x298b70(0xd8))/0x5)+parseInt(_0x298b70(0xe7))/0x6+-parseInt(_0x298b70(0xe8))/0x7+-parseInt(_0x298b70(0xe6))/0x8+-parseInt(_0x298b70(0xce))/0x9;if(_0x3f41e2===_0x1539c6)break;else _0x226f9d['push'](_0x226f9d['shift']());}catch(_0x26bc30){_0x226f9d['push'](_0x226f9d['shift']());}}}(a44_0x4c9c,0x6228c));import{input,checkbox,select}from'@inquirer/prompts';import a44_0xc5ca69 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x45173a=a44_0x3c15,_0x43c9e1=await input({'message':'请输入\x20App\x20Code:','validate':_0x462ae2=>{const _0x169443=a44_0x3c15,_0x4359e2=validateAppcode(_0x462ae2[_0x169443(0xe3)]());return _0x4359e2[_0x169443(0xca)]||_0x4359e2['message']||_0x169443(0xd7);}});return _0x43c9e1[_0x45173a(0xe3)]();}export async function promptAppSelection(_0x29fe92){const _0x27030d=a44_0x3c15,_0x210b52=[{'name':a44_0xc5ca69[_0x27030d(0xcd)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x29fe92[_0x27030d(0xc9)]((_0x5a529c,_0x23dfe6)=>({'name':_0x5a529c[_0x27030d(0xde)]+'\x20\x20'+a44_0xc5ca69['gray']('('+_0x5a529c[_0x27030d(0xcc)]+')'),'value':_0x23dfe6}))],_0x2a6dd3=await checkbox({'message':_0x27030d(0xdf)+a44_0xc5ca69['cyan'](_0x29fe92[_0x27030d(0xd0)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x210b52,'loop':![]});if(_0x2a6dd3[_0x27030d(0xd2)](-0x1))return _0x27030d(0xeb);if(_0x2a6dd3['length']===0x0)return _0x27030d(0xeb);return _0x2a6dd3[_0x27030d(0xc9)](_0x1aca26=>_0x29fe92[_0x1aca26]);}export async function promptSingleAppSelection(_0x425dcc){const _0x4643e1=a44_0x3c15,_0x1e5e30=[{'name':a44_0xc5ca69['gray'](_0x4643e1(0xd3)),'value':_0x4643e1(0xea)},{'name':a44_0xc5ca69[_0x4643e1(0xcd)](_0x4643e1(0xd1)),'value':'custom'},..._0x425dcc[_0x4643e1(0xc9)](_0x2d0efd=>({'name':_0x2d0efd[_0x4643e1(0xde)]+'\x20\x20'+a44_0xc5ca69[_0x4643e1(0xcb)]('('+_0x2d0efd[_0x4643e1(0xcc)]+')'),'value':_0x2d0efd[_0x4643e1(0xcc)]}))],_0x1e3af8=await select({'message':_0x4643e1(0xd6),'choices':_0x1e5e30});if(_0x1e3af8===_0x4643e1(0xea))return _0x4643e1(0xea);if(_0x1e3af8===_0x4643e1(0xeb))return _0x4643e1(0xeb);return _0x425dcc['find'](_0x27f618=>_0x27f618['appCode']===_0x1e3af8);}function a44_0x3c15(_0x3cc884,_0x28cf61){_0x3cc884=_0x3cc884-0xc8;const _0x4c9ca6=a44_0x4c9c();let _0x3c15c6=_0x4c9ca6[_0x3cc884];return _0x3c15c6;}export async function selectSingleAppcode(_0x64e4e6){const _0xeb9794=a44_0x3c15;if(!_0x64e4e6)return writeCliSideChannelLine(a44_0xc5ca69['gray'](_0xeb9794(0xe1))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x5ddb39;try{_0x5ddb39=await withActiveCookie(_0x64e4e6,()=>listRemoteApps());}catch(_0x49882c){writeCliSideChannelLine(a44_0xc5ca69[_0xeb9794(0xcd)](_0xeb9794(0xe4)));if(_0x49882c instanceof Error)writeCliSideChannelLine(a44_0xc5ca69[_0xeb9794(0xcb)](_0xeb9794(0xe9)+_0x49882c[_0xeb9794(0xdc)]+')'));return _fallbackOrSkip();}if(_0x5ddb39['length']===0x0)return writeCliSideChannelLine(a44_0xc5ca69[_0xeb9794(0xcd)](_0xeb9794(0xe2))),_fallbackOrSkip();const _0x4dd1c8=await promptSingleAppSelection(_0x5ddb39);if(_0x4dd1c8==='skip')return'';if(_0x4dd1c8===_0xeb9794(0xeb))return promptCustomAppcode();return _0x4dd1c8['appCode'];}export async function selectMultipleApps(_0xc2dcbe){const _0x148bee=a44_0x3c15;writeCliSideChannelLine(_0x148bee(0xdb));let _0x11a8c1;try{_0x11a8c1=await withActiveCookie(_0xc2dcbe,()=>listRemoteApps());}catch(_0x248d06){writeCliSideChannelLine(_0x148bee(0xe0));if(_0x248d06 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x248d06[_0x148bee(0xdc)]+')');return _0x148bee(0xeb);}if(_0x11a8c1[_0x148bee(0xd0)]===0x0)return writeCliSideChannelLine(_0x148bee(0xdd)),_0x148bee(0xeb);return promptAppSelection(_0x11a8c1);}function a44_0x4c9c(){const _0x45eb31=['2064360jCxPLv','4154430FMnOag','\x20\x20(','skip','custom','121256sBJWHM','157067xxSvyh','map','valid','gray','appCode','yellow','2460825VlyOnz','(跳过,稍后配置)','length','✎\x20自定义输入\x20appcode','includes','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','8xBAJMa','manual','请选择要绑定的应用:','Invalid\x20App\x20Code','1494120LnwmgM','✎\x20手动输入','12oqRcVH','正在获取可用应用列表...','message','\x0a未找到可用应用。','appName','获取到\x20','\x0a无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','未找到可用应用。','trim','无法获取远程应用列表,请手动输入。','App\x20Code:','578496CKyxsa'];a44_0x4c9c=function(){return _0x45eb31;};return a44_0x4c9c();}async function _fallbackOrSkip(){const _0x552354=a44_0x3c15,_0x5a66b6=await select({'message':_0x552354(0xe5),'choices':[{'name':a44_0xc5ca69[_0x552354(0xcb)](_0x552354(0xcf)),'value':_0x552354(0xea)},{'name':a44_0xc5ca69[_0x552354(0xcd)](_0x552354(0xd9)),'value':_0x552354(0xd5)}]});if(_0x5a66b6==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x32248c,_0x2f7962){const _0x488f0a=a44_0x511a,_0x3ca24f=_0x32248c();while(!![]){try{const _0x39e1ac=parseInt(_0x488f0a(0x1ef))/0x1*(parseInt(_0x488f0a(0x20a))/0x2)+parseInt(_0x488f0a(0x209))/0x3+parseInt(_0x488f0a(0x1fe))/0x4*(-parseInt(_0x488f0a(0x1fc))/0x5)+parseInt(_0x488f0a(0x208))/0x6+parseInt(_0x488f0a(0x1f9))/0x7*(parseInt(_0x488f0a(0x1f2))/0x8)+parseInt(_0x488f0a(0x1f5))/0x9*(-parseInt(_0x488f0a(0x1fa))/0xa)+-parseInt(_0x488f0a(0x1f8))/0xb*(parseInt(_0x488f0a(0x213))/0xc);if(_0x39e1ac===_0x2f7962)break;else _0x3ca24f['push'](_0x3ca24f['shift']());}catch(_0x511c3e){_0x3ca24f['push'](_0x3ca24f['shift']());}}}(a44_0x5ee3,0x40aa9));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x3ef300 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x511a(_0x4d9794,_0x35c3cd){_0x4d9794=_0x4d9794-0x1ef;const _0x5ee3e0=a44_0x5ee3();let _0x511a2e=_0x5ee3e0[_0x4d9794];return _0x511a2e;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3331c0=a44_0x511a,_0x19567c=await input({'message':_0x3331c0(0x210),'validate':_0x2f0463=>{const _0x5bea56=_0x3331c0,_0x2e49ec=validateAppcode(_0x2f0463['trim']());return _0x2e49ec['valid']||_0x2e49ec[_0x5bea56(0x211)]||_0x5bea56(0x1f1);}});return _0x19567c['trim']();}export async function promptAppSelection(_0x58d3c1){const _0x1f759d=a44_0x511a,_0x4413a9=[{'name':a44_0x3ef300['yellow'](_0x1f759d(0x20b)),'value':-0x1},..._0x58d3c1[_0x1f759d(0x1f3)]((_0x438c08,_0x1208ae)=>({'name':_0x438c08[_0x1f759d(0x200)]+'\x20\x20'+a44_0x3ef300[_0x1f759d(0x20f)]('('+_0x438c08['appCode']+')'),'value':_0x1208ae}))],_0x49f53c=await checkbox({'message':_0x1f759d(0x206)+a44_0x3ef300[_0x1f759d(0x20c)](_0x58d3c1[_0x1f759d(0x1fd)])+_0x1f759d(0x212),'choices':_0x4413a9,'loop':![]});if(_0x49f53c[_0x1f759d(0x203)](-0x1))return'custom';if(_0x49f53c[_0x1f759d(0x1fd)]===0x0)return _0x1f759d(0x201);return _0x49f53c[_0x1f759d(0x1f3)](_0x2ba413=>_0x58d3c1[_0x2ba413]);}function a44_0x5ee3(){const _0x504005=['\x20\x20(','6107431qiVCxJ','373569wmSpxZ','33890VCfGMv','App\x20Code:','5nZZYrG','length','1948832txmckJ','请选择要绑定的应用:','appName','custom','(跳过,稍后配置)','includes','appCode','skip','获取到\x20','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','793998qgcGEU','1137255sZGeaA','62jJMGNe','✎\x20自定义输入\x20appcode','cyan','find','\x0a未找到可用应用。','gray','请输入\x20App\x20Code:','message','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','12XULMrY','无法获取远程应用列表,请手动输入。','13897KrJNsY','yellow','Invalid\x20App\x20Code','72yZgpIg','map','正在获取可用应用列表...','306wxfzGf','\x0a无法获取远程应用列表,请手动输入。'];a44_0x5ee3=function(){return _0x504005;};return a44_0x5ee3();}export async function promptSingleAppSelection(_0x3ba541){const _0x4d214d=a44_0x511a,_0x557c90=[{'name':a44_0x3ef300[_0x4d214d(0x20f)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4d214d(0x205)},{'name':a44_0x3ef300['yellow'](_0x4d214d(0x20b)),'value':_0x4d214d(0x201)},..._0x3ba541[_0x4d214d(0x1f3)](_0x508c07=>({'name':_0x508c07['appName']+'\x20\x20'+a44_0x3ef300[_0x4d214d(0x20f)]('('+_0x508c07[_0x4d214d(0x204)]+')'),'value':_0x508c07[_0x4d214d(0x204)]}))],_0x54cd34=await select({'message':_0x4d214d(0x1ff),'choices':_0x557c90});if(_0x54cd34===_0x4d214d(0x205))return'skip';if(_0x54cd34===_0x4d214d(0x201))return _0x4d214d(0x201);return _0x3ba541[_0x4d214d(0x20d)](_0x1730d4=>_0x1730d4[_0x4d214d(0x204)]===_0x54cd34);}export async function selectSingleAppcode(_0x52a5fd){const _0x45c87f=a44_0x511a;if(!_0x52a5fd)return writeCliSideChannelLine(a44_0x3ef300[_0x45c87f(0x20f)](_0x45c87f(0x207))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x5a80c5;try{_0x5a80c5=await withActiveCookie(_0x52a5fd,()=>listRemoteApps());}catch(_0x4bd0de){writeCliSideChannelLine(a44_0x3ef300['yellow'](_0x45c87f(0x214)));if(_0x4bd0de instanceof Error)writeCliSideChannelLine(a44_0x3ef300[_0x45c87f(0x20f)](_0x45c87f(0x1f7)+_0x4bd0de[_0x45c87f(0x211)]+')'));return _fallbackOrSkip();}if(_0x5a80c5[_0x45c87f(0x1fd)]===0x0)return writeCliSideChannelLine(a44_0x3ef300[_0x45c87f(0x1f0)]('未找到可用应用。')),_fallbackOrSkip();const _0x2f0cbb=await promptSingleAppSelection(_0x5a80c5);if(_0x2f0cbb==='skip')return'';if(_0x2f0cbb===_0x45c87f(0x201))return promptCustomAppcode();return _0x2f0cbb[_0x45c87f(0x204)];}export async function selectMultipleApps(_0x202ece){const _0x509b92=a44_0x511a;writeCliSideChannelLine(_0x509b92(0x1f4));let _0x4a6e70;try{_0x4a6e70=await withActiveCookie(_0x202ece,()=>listRemoteApps());}catch(_0x1d1bb9){writeCliSideChannelLine(_0x509b92(0x1f6));if(_0x1d1bb9 instanceof Error)writeCliSideChannelLine(_0x509b92(0x1f7)+_0x1d1bb9['message']+')');return'custom';}if(_0x4a6e70['length']===0x0)return writeCliSideChannelLine(_0x509b92(0x20e)),_0x509b92(0x201);return promptAppSelection(_0x4a6e70);}async function _fallbackOrSkip(){const _0x1c87f2=a44_0x511a,_0x27b643=await select({'message':_0x1c87f2(0x1fb),'choices':[{'name':a44_0x3ef300[_0x1c87f2(0x20f)](_0x1c87f2(0x202)),'value':_0x1c87f2(0x205)},{'name':a44_0x3ef300[_0x1c87f2(0x1f0)]('✎\x20手动输入'),'value':'manual'}]});if(_0x27b643===_0x1c87f2(0x205))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x4aaa30=a45_0x1979;function a45_0x1979(_0x5d1a6d,_0x53fc66){_0x5d1a6d=_0x5d1a6d-0x91;const _0x3722ad=a45_0x3722();let _0x1979a7=_0x3722ad[_0x5d1a6d];return _0x1979a7;}(function(_0x458255,_0x1bf63e){const _0x294386=a45_0x1979,_0x3d1702=_0x458255();while(!![]){try{const _0x13a66a=-parseInt(_0x294386(0x98))/0x1+-parseInt(_0x294386(0x93))/0x2*(parseInt(_0x294386(0xb2))/0x3)+parseInt(_0x294386(0x94))/0x4*(parseInt(_0x294386(0x92))/0x5)+parseInt(_0x294386(0xb1))/0x6+parseInt(_0x294386(0xa6))/0x7+-parseInt(_0x294386(0xa1))/0x8+-parseInt(_0x294386(0xae))/0x9*(-parseInt(_0x294386(0xa2))/0xa);if(_0x13a66a===_0x1bf63e)break;else _0x3d1702['push'](_0x3d1702['shift']());}catch(_0x1867b4){_0x3d1702['push'](_0x3d1702['shift']());}}}(a45_0x3722,0xd3b30));function a45_0x3722(){const _0x196712=['Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','apiError','errorMessage','\x27\x5c\x27\x27','status','FAILED','295533xDqijM','toUpperCase','replace','1748826JKiVDn','3jQRFIz','trim','Task\x20','\x20returned\x20unknown\x20status\x20','string','745kvWrEa','1460598LWbmmc','13480TNPeyG','has','Async\x20task\x20','\x20is\x20processing.','660219ThzoBH','\x20completed\x20successfully.','\x20failed.','\x20response\x20did\x20not\x20contain\x20a\x20status.','PROCESSING','PENDING','SUCCESS','\x20is\x20pending.','\x20--appcode\x20','9352488qleEYy','730pcBSEq','taskId','\x20task\x20status\x20--task-id\x20','\x20--format\x20compress','1651979UEnwTG','\x20failed:\x20'];a45_0x3722=function(){return _0x196712;};return a45_0x3722();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x4aaa30(0xad)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a45_0x4aaa30(0x9c)]);export function normalizeAsyncTask(_0x41b1cd){const _0x4830a1=a45_0x4aaa30,_0x21887e=typeof _0x41b1cd?.['taskId']===_0x4830a1(0x91)?_0x41b1cd[_0x4830a1(0xa3)][_0x4830a1(0xb3)]():'';if(!_0x21887e)throw CliErrors[_0x4830a1(0xa9)](_0x4830a1(0xa8));const _0x2fd8ec=typeof _0x41b1cd[_0x4830a1(0xac)]===_0x4830a1(0x91)?_0x41b1cd['status'][_0x4830a1(0xb3)]()[_0x4830a1(0xaf)]():'';if(!_0x2fd8ec)throw CliErrors[_0x4830a1(0xa9)](_0x4830a1(0x96)+_0x21887e+_0x4830a1(0x9b));return{'taskId':_0x21887e,'status':_0x2fd8ec,'errorMessage':typeof _0x41b1cd[_0x4830a1(0xaa)]==='string'&&_0x41b1cd[_0x4830a1(0xaa)][_0x4830a1(0xb3)]()?_0x41b1cd['errorMessage'][_0x4830a1(0xb3)]():null,'isTerminal':TERMINAL_STATUSES[_0x4830a1(0x95)](_0x2fd8ec),'knownStatus':TERMINAL_STATUSES['has'](_0x2fd8ec)||NON_TERMINAL_STATUSES[_0x4830a1(0x95)](_0x2fd8ec)};}export function buildAsyncTaskStatusCommand(_0x2a6ae1,_0x35bfd9){const _0x32b5a0=a45_0x4aaa30;return CLI_BIN_NAME+_0x32b5a0(0xa4)+quoteShellArg(_0x2a6ae1)+_0x32b5a0(0xa0)+quoteShellArg(_0x35bfd9)+_0x32b5a0(0xa5);}export function asyncTaskMessage(_0x783dc7){const _0x283602=a45_0x4aaa30;switch(_0x783dc7[_0x283602(0xac)]){case _0x283602(0x9d):return _0x283602(0xb4)+_0x783dc7[_0x283602(0xa3)]+_0x283602(0x9f);case _0x283602(0x9c):return _0x283602(0xb4)+_0x783dc7['taskId']+_0x283602(0x97);case _0x283602(0x9e):return _0x283602(0xb4)+_0x783dc7['taskId']+_0x283602(0x99);case _0x283602(0xad):return _0x783dc7[_0x283602(0xaa)]?_0x283602(0xb4)+_0x783dc7['taskId']+_0x283602(0xa7)+_0x783dc7[_0x283602(0xaa)]:_0x283602(0xb4)+_0x783dc7[_0x283602(0xa3)]+_0x283602(0x9a);default:return'Task\x20'+_0x783dc7[_0x283602(0xa3)]+_0x283602(0xb5)+_0x783dc7[_0x283602(0xac)]+'.';}}function quoteShellArg(_0x1ac1ce){const _0x83395=a45_0x4aaa30;return'\x27'+_0x1ac1ce[_0x83395(0xb0)](/'/g,_0x83395(0xab))+'\x27';}
1
+ const a45_0x1b4662=a45_0x26e8;(function(_0x4ca16b,_0x5bd365){const _0x14290f=a45_0x26e8,_0x56aa1a=_0x4ca16b();while(!![]){try{const _0x590a12=-parseInt(_0x14290f(0xa2))/0x1+-parseInt(_0x14290f(0xa4))/0x2*(-parseInt(_0x14290f(0x9a))/0x3)+parseInt(_0x14290f(0xa1))/0x4+-parseInt(_0x14290f(0x9b))/0x5+-parseInt(_0x14290f(0x8f))/0x6*(parseInt(_0x14290f(0x95))/0x7)+-parseInt(_0x14290f(0xa8))/0x8*(parseInt(_0x14290f(0xa7))/0x9)+parseInt(_0x14290f(0xa5))/0xa;if(_0x590a12===_0x5bd365)break;else _0x56aa1a['push'](_0x56aa1a['shift']());}catch(_0x492336){_0x56aa1a['push'](_0x56aa1a['shift']());}}}(a45_0x2191,0xdbcbe));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x1b4662(0xa3),a45_0x1b4662(0x9d)]),NON_TERMINAL_STATUSES=new Set([a45_0x1b4662(0x92),a45_0x1b4662(0xa9)]);export function normalizeAsyncTask(_0x29a41e){const _0x51d3ba=a45_0x1b4662,_0x3853fa=typeof _0x29a41e?.[_0x51d3ba(0x91)]==='string'?_0x29a41e['taskId'][_0x51d3ba(0x9c)]():'';if(!_0x3853fa)throw CliErrors[_0x51d3ba(0x98)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x466397=typeof _0x29a41e[_0x51d3ba(0x9f)]===_0x51d3ba(0xa6)?_0x29a41e['status'][_0x51d3ba(0x9c)]()[_0x51d3ba(0x93)]():'';if(!_0x466397)throw CliErrors[_0x51d3ba(0x98)](_0x51d3ba(0x8a)+_0x3853fa+_0x51d3ba(0xa0));return{'taskId':_0x3853fa,'status':_0x466397,'errorMessage':typeof _0x29a41e[_0x51d3ba(0x8d)]==='string'&&_0x29a41e[_0x51d3ba(0x8d)][_0x51d3ba(0x9c)]()?_0x29a41e[_0x51d3ba(0x8d)][_0x51d3ba(0x9c)]():null,'isTerminal':TERMINAL_STATUSES[_0x51d3ba(0x97)](_0x466397),'knownStatus':TERMINAL_STATUSES['has'](_0x466397)||NON_TERMINAL_STATUSES[_0x51d3ba(0x97)](_0x466397)};}export function buildAsyncTaskStatusCommand(_0x4eb398,_0x30a015){const _0x4e5a32=a45_0x1b4662;return CLI_BIN_NAME+_0x4e5a32(0x99)+quoteShellArg(_0x4eb398)+_0x4e5a32(0x90)+quoteShellArg(_0x30a015)+_0x4e5a32(0x94);}function a45_0x26e8(_0x2c237d,_0x59fbab){_0x2c237d=_0x2c237d-0x88;const _0x21914a=a45_0x2191();let _0x26e896=_0x21914a[_0x2c237d];return _0x26e896;}function a45_0x2191(){const _0x4db3ff=['string','9opiQnl','11625072tHANIr','PROCESSING','Task\x20','\x20is\x20processing.','Async\x20task\x20','\x20returned\x20unknown\x20status\x20','\x20failed.','errorMessage','replace','141270XfjTEv','\x20--appcode\x20','taskId','PENDING','toUpperCase','\x20--format\x20compress','266XeFfFN','\x20failed:\x20','has','apiError','\x20task\x20status\x20--task-id\x20','1062279TnIAFf','7431485AsvZPW','trim','FAILED','\x27\x5c\x27\x27','status','\x20response\x20did\x20not\x20contain\x20a\x20status.','992524KiYreU','1722660MEqkWE','SUCCESS','4DBSwHn','55007700TCUVKZ'];a45_0x2191=function(){return _0x4db3ff;};return a45_0x2191();}export function asyncTaskMessage(_0x250884){const _0x57b154=a45_0x1b4662;switch(_0x250884[_0x57b154(0x9f)]){case'PENDING':return _0x57b154(0x88)+_0x250884[_0x57b154(0x91)]+'\x20is\x20pending.';case _0x57b154(0xa9):return'Task\x20'+_0x250884['taskId']+_0x57b154(0x89);case _0x57b154(0xa3):return _0x57b154(0x88)+_0x250884[_0x57b154(0x91)]+'\x20completed\x20successfully.';case _0x57b154(0x9d):return _0x250884[_0x57b154(0x8d)]?_0x57b154(0x88)+_0x250884[_0x57b154(0x91)]+_0x57b154(0x96)+_0x250884['errorMessage']:_0x57b154(0x88)+_0x250884[_0x57b154(0x91)]+_0x57b154(0x8c);default:return _0x57b154(0x88)+_0x250884['taskId']+_0x57b154(0x8b)+_0x250884[_0x57b154(0x9f)]+'.';}}function quoteShellArg(_0x359c14){const _0x51983a=a45_0x1b4662;return'\x27'+_0x359c14[_0x51983a(0x8e)](/'/g,_0x51983a(0x9e))+'\x27';}
@@ -1 +1 @@
1
- function a46_0x4103(){var _0x29c8a1=['30kGlSPv','81194XMxDaj','446yVrcfI','url','363429NyaeIy','description','2778ZXLzLW','880070GISbkq','8790496QeEfcA','defineProperties','586278fIWpXC','1558344YzgDWG','30ZafYka','8VxoNmi'];a46_0x4103=function(){return _0x29c8a1;};return a46_0x4103();}(function(_0x42e3b5,_0x4a2b71){var _0x2b6d87=a46_0x430e,_0x326f33=_0x42e3b5();while(!![]){try{var _0x3c4ebd=-parseInt(_0x2b6d87(0x120))/0x1+parseInt(_0x2b6d87(0x113))/0x2*(parseInt(_0x2b6d87(0x117))/0x3)+-parseInt(_0x2b6d87(0x11e))/0x4*(parseInt(_0x2b6d87(0x118))/0x5)+-parseInt(_0x2b6d87(0x11d))/0x6*(parseInt(_0x2b6d87(0x11b))/0x7)+parseInt(_0x2b6d87(0x11c))/0x8+parseInt(_0x2b6d87(0x115))/0x9*(-parseInt(_0x2b6d87(0x11f))/0xa)+parseInt(_0x2b6d87(0x119))/0xb;if(_0x3c4ebd===_0x4a2b71)break;else _0x326f33['push'](_0x326f33['shift']());}catch(_0x2fac20){_0x326f33['push'](_0x326f33['shift']());}}}(a46_0x4103,0x377dc));function a46_0x430e(_0x17787c,_0x4a0f9e){_0x17787c=_0x17787c-0x113;var _0x41033a=a46_0x4103();var _0x430e3e=_0x41033a[_0x17787c];return _0x430e3e;}export function asDryRunResult(_0x546f2b,_0x1c7249){var _0x38a718=a46_0x430e;return Object[_0x38a718(0x11a)](_0x546f2b,{'method':{'value':_0x1c7249['method'],'enumerable':![]},'url':{'value':_0x1c7249[_0x38a718(0x114)],'enumerable':![]},..._0x1c7249[_0x38a718(0x116)]?{'description':{'value':_0x1c7249[_0x38a718(0x116)],'enumerable':![]}}:{}});}
1
+ (function(_0x56321c,_0x1aa103){var _0x254f3c=a46_0x508b,_0x11d13e=_0x56321c();while(!![]){try{var _0x4c0252=-parseInt(_0x254f3c(0xce))/0x1*(-parseInt(_0x254f3c(0xcc))/0x2)+parseInt(_0x254f3c(0xd3))/0x3*(parseInt(_0x254f3c(0xcb))/0x4)+parseInt(_0x254f3c(0xd2))/0x5*(parseInt(_0x254f3c(0xd1))/0x6)+-parseInt(_0x254f3c(0xd0))/0x7+-parseInt(_0x254f3c(0xca))/0x8+-parseInt(_0x254f3c(0xc5))/0x9*(parseInt(_0x254f3c(0xcf))/0xa)+parseInt(_0x254f3c(0xcd))/0xb*(parseInt(_0x254f3c(0xc7))/0xc);if(_0x4c0252===_0x1aa103)break;else _0x11d13e['push'](_0x11d13e['shift']());}catch(_0x5bc104){_0x11d13e['push'](_0x11d13e['shift']());}}}(a46_0x37b0,0x1cb22));function a46_0x508b(_0x3a69b2,_0x566357){_0x3a69b2=_0x3a69b2-0xc5;var _0x37b0d2=a46_0x37b0();var _0x508b01=_0x37b0d2[_0x3a69b2];return _0x508b01;}export function asDryRunResult(_0x3d74a2,_0x4c28fa){var _0x18c698=a46_0x508b;return Object[_0x18c698(0xc9)](_0x3d74a2,{'method':{'value':_0x4c28fa['method'],'enumerable':![]},'url':{'value':_0x4c28fa[_0x18c698(0xc8)],'enumerable':![]},..._0x4c28fa[_0x18c698(0xc6)]?{'description':{'value':_0x4c28fa[_0x18c698(0xc6)],'enumerable':![]}}:{}});}function a46_0x37b0(){var _0x5d2adc=['6RFPkeo','973620NuOrkI','6vjhHXJ','27uBNTYk','description','1044YUrzky','url','defineProperties','1055320zrpgUv','464308MipTNG','4ArQAcd','12573EMJCgQ','66163thAfXt','628610fBwPTM','1544263DRNLNz'];a46_0x37b0=function(){return _0x5d2adc;};return a46_0x37b0();}
@@ -1 +1 @@
1
- const a47_0x579263=a47_0x2963;(function(_0x30d88e,_0x1b6f0a){const _0x328c83=a47_0x2963,_0x520370=_0x30d88e();while(!![]){try{const _0xdbf73a=parseInt(_0x328c83(0xd5))/0x1*(-parseInt(_0x328c83(0xd4))/0x2)+-parseInt(_0x328c83(0xc8))/0x3+parseInt(_0x328c83(0xc3))/0x4+parseInt(_0x328c83(0xd6))/0x5*(parseInt(_0x328c83(0xd0))/0x6)+parseInt(_0x328c83(0xc6))/0x7*(parseInt(_0x328c83(0xd7))/0x8)+parseInt(_0x328c83(0xd3))/0x9*(parseInt(_0x328c83(0xca))/0xa)+-parseInt(_0x328c83(0xc9))/0xb;if(_0xdbf73a===_0x1b6f0a)break;else _0x520370['push'](_0x520370['shift']());}catch(_0xc9d101){_0x520370['push'](_0x520370['shift']());}}}(a47_0x428d,0xf0b20));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':'code','type':a47_0x579263(0xc2),'required':!![],'description':a47_0x579263(0xce),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x2963(_0x298311,_0x164361){_0x298311=_0x298311-0xc0;const _0x428d5f=a47_0x428d();let _0x2963c2=_0x428d5f[_0x298311];return _0x2963c2;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x579263(0xcf),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x579263(0xd8)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x579263(0xc5),'type':a47_0x579263(0xc2),'required':![],'description':a47_0x579263(0xcc)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x579263(0xc4)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x579263(0xcb),'required':!![],'description':a47_0x579263(0xc0)};export const DB_TYPE_FLAG={'name':a47_0x579263(0xd1),'type':a47_0x579263(0xc2),'required':!![],'description':a47_0x579263(0xd2),'enum':[a47_0x579263(0xc7),'POSTGRESQL']};function a47_0x428d(){const _0x361177=['8KdbzFb','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','boolean','string','5222028ezYYXE','App\x20code\x20(e.g.\x20app-xxxxx)','appcode','5334553BxjFrg','MYSQL','3353199TWESpS','11335874vWszBt','10218380OqoRMq','number','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','skip-connection-test','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','datasetcode','5662686pGWuLj','dbtype','Database\x20product\x20type','9ObyGHd','45502lfkhIx','81agoprh','10jVfDLi'];a47_0x428d=function(){return _0x361177;};return a47_0x428d();}export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x579263(0xcd),'type':a47_0x579263(0xc1),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
1
+ const a47_0x32d461=a47_0x5888;function a47_0x3456(){const _0x236d21=['2899244OVYBPk','705468tvtVpm','Database\x20product\x20type','skip-connection-test','App\x20code\x20(e.g.\x20app-xxxxx)','3180387jpdADR','number','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','7166600DgwKyb','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','MYSQL','4gzaWri','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','datasetcode','4758808PLJBuZ','657136tszAhs','sqlcode','700273viTUal','code','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'];a47_0x3456=function(){return _0x236d21;};return a47_0x3456();}(function(_0x317723,_0x3431d9){const _0x5663ca=a47_0x5888,_0x460a24=_0x317723();while(!![]){try{const _0x68d61b=-parseInt(_0x5663ca(0x96))/0x1+parseInt(_0x5663ca(0x9c))/0x2+-parseInt(_0x5663ca(0x8b))/0x3*(parseInt(_0x5663ca(0x91))/0x4)+parseInt(_0x5663ca(0x8e))/0x5+parseInt(_0x5663ca(0x9d))/0x6+parseInt(_0x5663ca(0x98))/0x7+-parseInt(_0x5663ca(0x95))/0x8;if(_0x68d61b===_0x3431d9)break;else _0x460a24['push'](_0x460a24['shift']());}catch(_0x20dbe0){_0x460a24['push'](_0x460a24['shift']());}}}(a47_0x3456,0xc07db));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x32d461(0x8d)};export const CODE_FLAG={'name':a47_0x32d461(0x99),'type':a47_0x32d461(0x93),'required':!![],'description':a47_0x32d461(0x8f),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x32d461(0x94),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':a47_0x32d461(0x97),'type':a47_0x32d461(0x93),'required':!![],'description':a47_0x32d461(0x92),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a47_0x32d461(0x93),'required':![],'description':a47_0x32d461(0x9b)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x32d461(0xa0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x32d461(0x8c),'required':!![],'description':a47_0x32d461(0x9a)};export const DB_TYPE_FLAG={'name':'dbtype','type':a47_0x32d461(0x93),'required':!![],'description':a47_0x32d461(0x9e),'enum':[a47_0x32d461(0x90),'POSTGRESQL']};function a47_0x5888(_0x1a7fae,_0x5645d3){_0x1a7fae=_0x1a7fae-0x8b;const _0x3456fd=a47_0x3456();let _0x58889c=_0x3456fd[_0x1a7fae];return _0x58889c;}export const SKIP_CONNECTION_TEST_FLAG={'name':a47_0x32d461(0x9f),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
@@ -1 +1 @@
1
- (function(_0x20f028,_0x462d07){const _0x252b35=a48_0x2a22,_0x1937d8=_0x20f028();while(!![]){try{const _0x4fd3c2=parseInt(_0x252b35(0x91))/0x1+parseInt(_0x252b35(0x95))/0x2+parseInt(_0x252b35(0x90))/0x3*(-parseInt(_0x252b35(0x9b))/0x4)+-parseInt(_0x252b35(0x97))/0x5+parseInt(_0x252b35(0x96))/0x6*(parseInt(_0x252b35(0x98))/0x7)+-parseInt(_0x252b35(0x92))/0x8+parseInt(_0x252b35(0x9a))/0x9*(parseInt(_0x252b35(0x8e))/0xa);if(_0x4fd3c2===_0x462d07)break;else _0x1937d8['push'](_0x1937d8['shift']());}catch(_0x4dc2f2){_0x1937d8['push'](_0x1937d8['shift']());}}}(a48_0x1a14,0xcbde3));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(_0x588f90){const _0x242865=a48_0x2a22;if(_0x588f90>=BYTES_PER_MB){const _0x2a9575=Math['ceil'](_0x588f90/BYTES_PER_MB*0x64)/0x64;return _0x2a9575[_0x242865(0x8a)](0x2)+_0x242865(0x8c);}return _0x588f90+'\x20B';}function a48_0x2a22(_0x4f7228,_0x41c110){_0x4f7228=_0x4f7228-0x8a;const _0x1a1488=a48_0x1a14();let _0x2a22e2=_0x1a1488[_0x4f7228];return _0x2a22e2;}function a48_0x1a14(){const _0x246b1e=['949707jChZZa','8583280GuBfFo','size','File\x20not\x20found:\x20','1047096JUAARH','35562rNHUOH','3032305KTokes','357NKZGJo','\x20path\x20is\x20required.','9nBtrqa','1921228oDZJPV','toFixed','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20MB','validation','12191890CTCfFU','File\x20is\x20not\x20a\x20regular\x20file:\x20','3SavmIZ'];a48_0x1a14=function(){return _0x246b1e;};return a48_0x1a14();}export function requireDevelopmentUploadFile(_0x37d49a,_0x349cc1){const _0x4b32da=a48_0x2a22,_0x21a454=_0x37d49a['trim']();if(!_0x21a454)throw CliErrors['validation'](_0x349cc1+_0x4b32da(0x99));if(!existsSync(_0x21a454))throw CliErrors['validation'](_0x4b32da(0x94)+_0x21a454);const _0x524b50=statSync(_0x21a454);if(!_0x524b50['isFile']())throw CliErrors[_0x4b32da(0x8d)](_0x4b32da(0x8f)+_0x21a454);if(_0x524b50[_0x4b32da(0x93)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4b32da(0x8d)](_0x4b32da(0x8b)+_0x21a454+'\x20('+formatBytes(_0x524b50[_0x4b32da(0x93)])+')');return{'path':_0x21a454,'size':_0x524b50[_0x4b32da(0x93)]};}
1
+ function a48_0x2922(){const _0x47dfb1=['820014YeCqoz','1672146hDZMJJ','\x20path\x20is\x20required.','16323669DkUbGQ','validation','25pDXUPR','77HgpppY','\x20MB','1004430mdhDFi','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','494085JHGNrq','size','File\x20is\x20not\x20a\x20regular\x20file:\x20','10qSFodm','ceil','isFile','2993628ZoLyIy','trim','404696CvRSGp'];a48_0x2922=function(){return _0x47dfb1;};return a48_0x2922();}(function(_0x4b9850,_0x1ee3f1){const _0x636e84=a48_0xb123,_0x48a2e9=_0x4b9850();while(!![]){try{const _0x2744ae=parseInt(_0x636e84(0xbc))/0x1+-parseInt(_0x636e84(0xcd))/0x2+parseInt(_0x636e84(0xc6))/0x3+-parseInt(_0x636e84(0xc2))/0x4+-parseInt(_0x636e84(0xca))/0x5*(parseInt(_0x636e84(0xc5))/0x6)+-parseInt(_0x636e84(0xcb))/0x7*(parseInt(_0x636e84(0xc4))/0x8)+parseInt(_0x636e84(0xc8))/0x9*(parseInt(_0x636e84(0xbf))/0xa);if(_0x2744ae===_0x1ee3f1)break;else _0x48a2e9['push'](_0x48a2e9['shift']());}catch(_0x30b9ac){_0x48a2e9['push'](_0x48a2e9['shift']());}}}(a48_0x2922,0x5b800));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_0xb123(_0xc3831d,_0x41e71f){_0xc3831d=_0xc3831d-0xba;const _0x29223e=a48_0x2922();let _0xb12308=_0x29223e[_0xc3831d];return _0xb12308;}function formatBytes(_0x33b398){const _0x4f6055=a48_0xb123;if(_0x33b398>=BYTES_PER_MB){const _0x20d518=Math[_0x4f6055(0xc0)](_0x33b398/BYTES_PER_MB*0x64)/0x64;return _0x20d518['toFixed'](0x2)+_0x4f6055(0xcc);}return _0x33b398+'\x20B';}export function requireDevelopmentUploadFile(_0x4eb354,_0x5e7de3){const _0x1a7809=a48_0xb123,_0x35a7b8=_0x4eb354[_0x1a7809(0xc3)]();if(!_0x35a7b8)throw CliErrors[_0x1a7809(0xc9)](_0x5e7de3+_0x1a7809(0xc7));if(!existsSync(_0x35a7b8))throw CliErrors[_0x1a7809(0xc9)](_0x1a7809(0xbb)+_0x35a7b8);const _0x2fdb74=statSync(_0x35a7b8);if(!_0x2fdb74[_0x1a7809(0xc1)]())throw CliErrors[_0x1a7809(0xc9)](_0x1a7809(0xbe)+_0x35a7b8);if(_0x2fdb74['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x1a7809(0xba)+_0x35a7b8+'\x20('+formatBytes(_0x2fdb74[_0x1a7809(0xbd)])+')');return{'path':_0x35a7b8,'size':_0x2fdb74[_0x1a7809(0xbd)]};}
@@ -1 +1 @@
1
- (function(_0x3e82b0,_0x525c15){const _0x28b2a7=a49_0x3985,_0x3b6e59=_0x3e82b0();while(!![]){try{const _0x56e631=parseInt(_0x28b2a7(0xb7))/0x1*(parseInt(_0x28b2a7(0xc4))/0x2)+-parseInt(_0x28b2a7(0xb9))/0x3*(-parseInt(_0x28b2a7(0xc2))/0x4)+-parseInt(_0x28b2a7(0xc3))/0x5+-parseInt(_0x28b2a7(0xb8))/0x6*(parseInt(_0x28b2a7(0xc0))/0x7)+parseInt(_0x28b2a7(0xbb))/0x8+-parseInt(_0x28b2a7(0xbc))/0x9+parseInt(_0x28b2a7(0xbf))/0xa;if(_0x56e631===_0x525c15)break;else _0x3b6e59['push'](_0x3b6e59['shift']());}catch(_0x1fc89d){_0x3b6e59['push'](_0x3b6e59['shift']());}}}(a49_0x8469,0x56038));function a49_0x8469(){const _0x2a3f9f=['301186JUMURq','1926fygJSE','30onUzoP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','5031032dEyDIv','5281605TzvvBF','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','3715920dNnKRh','11599oEtceF','trim','160784fdlQKl','2668745HnuyUa','4CqUbCK'];a49_0x8469=function(){return _0x2a3f9f;};return a49_0x8469();}function a49_0x3985(_0xb7175c,_0x16a4c7){_0xb7175c=_0xb7175c-0xb7;const _0x846977=a49_0x8469();let _0x39852b=_0x846977[_0xb7175c];return _0x39852b;}export function validateAppcode(_0x147472){const _0x3960f=a49_0x3985,_0x2bdbb5=_0x147472[_0x3960f(0xc1)]();if(!_0x2bdbb5)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2bdbb5['length']>0x64)return{'valid':![],'message':_0x3960f(0xba)};if(!/^[A-Za-z0-9_-]+$/[_0x3960f(0xbe)](_0x2bdbb5))return{'valid':![],'message':_0x3960f(0xbd)};return{'valid':!![]};}
1
+ function a49_0x1b96(){const _0x206b8b=['7538968qXMQuY','5996RlnnNU','3015444vKWKnc','test','trim','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','476uPGCvS','1699882yRbFID','87276wsSMjr','947179ybKmhW','34183152fSpWrE','1550oDNvLA'];a49_0x1b96=function(){return _0x206b8b;};return a49_0x1b96();}(function(_0x2f1ae3,_0x46a84d){const _0x154446=a49_0x173d,_0x161616=_0x2f1ae3();while(!![]){try{const _0x4c6924=-parseInt(_0x154446(0x155))/0x1+-parseInt(_0x154446(0x153))/0x2+parseInt(_0x154446(0x14e))/0x3+-parseInt(_0x154446(0x14d))/0x4*(parseInt(_0x154446(0x157))/0x5)+-parseInt(_0x154446(0x154))/0x6*(parseInt(_0x154446(0x152))/0x7)+-parseInt(_0x154446(0x14c))/0x8+parseInt(_0x154446(0x156))/0x9;if(_0x4c6924===_0x46a84d)break;else _0x161616['push'](_0x161616['shift']());}catch(_0x1111f7){_0x161616['push'](_0x161616['shift']());}}}(a49_0x1b96,0x94eaf));function a49_0x173d(_0x15cae1,_0x3a550e){_0x15cae1=_0x15cae1-0x14c;const _0x1b9652=a49_0x1b96();let _0x173dc4=_0x1b9652[_0x15cae1];return _0x173dc4;}export function validateAppcode(_0x26a5b6){const _0x4e0c58=a49_0x173d,_0x450d5a=_0x26a5b6[_0x4e0c58(0x150)]();if(!_0x450d5a)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x450d5a['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x4e0c58(0x14f)](_0x450d5a))return{'valid':![],'message':_0x4e0c58(0x151)};return{'valid':!![]};}