@lovrabet/rabetbase-cli 2.3.3 → 2.3.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +99 -560
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/discover.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +19 -3
  220. package/lib/commands/app/use.js +0 -1
@@ -1 +1 @@
1
- (function(_0x558dd4,_0x6af44b){const _0x161bfb=a35_0x2bea,_0x524769=_0x558dd4();while(!![]){try{const _0x140d9b=-parseInt(_0x161bfb(0x1d1))/0x1+-parseInt(_0x161bfb(0x1d3))/0x2+-parseInt(_0x161bfb(0x1ce))/0x3+parseInt(_0x161bfb(0x1d5))/0x4+-parseInt(_0x161bfb(0x1d2))/0x5*(parseInt(_0x161bfb(0x1d0))/0x6)+-parseInt(_0x161bfb(0x1d4))/0x7+parseInt(_0x161bfb(0x1cf))/0x8;if(_0x140d9b===_0x6af44b)break;else _0x524769['push'](_0x524769['shift']());}catch(_0x49f669){_0x524769['push'](_0x524769['shift']());}}}(a35_0x39c5,0x3e285));function a35_0x39c5(){const _0x19936e=['224721FVYGWj','10lEZrPB','1668HAHqVl','2394567UCWXGN','1909272eOtgVa','1097958DiAGRm','9454904VmAauE','1412886HEzsbJ'];a35_0x39c5=function(){return _0x19936e;};return a35_0x39c5();}import{bffList}from'../../commands/bff/list.js';function a35_0x2bea(_0x25fc36,_0x346817){_0x25fc36=_0x25fc36-0x1ce;const _0x39c567=a35_0x39c5();let _0x2beadb=_0x39c567[_0x25fc36];return _0x2beadb;}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0xe4cb12,_0x8bf011){const _0xc1fe35=a34_0x5439,_0x29d47a=_0xe4cb12();while(!![]){try{const _0x189e61=parseInt(_0xc1fe35(0x1a4))/0x1*(-parseInt(_0xc1fe35(0x1a5))/0x2)+parseInt(_0xc1fe35(0x19c))/0x3*(parseInt(_0xc1fe35(0x19e))/0x4)+-parseInt(_0xc1fe35(0x1a6))/0x5+parseInt(_0xc1fe35(0x1a7))/0x6*(-parseInt(_0xc1fe35(0x19d))/0x7)+parseInt(_0xc1fe35(0x1a0))/0x8*(parseInt(_0xc1fe35(0x1a1))/0x9)+-parseInt(_0xc1fe35(0x1a3))/0xa+parseInt(_0xc1fe35(0x19f))/0xb*(parseInt(_0xc1fe35(0x1a2))/0xc);if(_0x189e61===_0x8bf011)break;else _0x29d47a['push'](_0x29d47a['shift']());}catch(_0x22757d){_0x29d47a['push'](_0x29d47a['shift']());}}}(a34_0x454e,0xeb881));import{bffList}from'../../commands/bff/list.js';function a34_0x454e(){const _0x48114=['147590zgisKZ','1114164fTxObG','3zlOixH','56zVjWvE','967036hpJXiK','5766695cdkiWh','64EkTOAb','1490157YCOrAr','72RSRCni','7823470DEkTwz','1qgPFwW','2899318mvmQKh'];a34_0x454e=function(){return _0x48114;};return a34_0x454e();}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a34_0x5439(_0x5d824e,_0x341f5a){_0x5d824e=_0x5d824e-0x19c;const _0x454e92=a34_0x454e();let _0x5439d4=_0x454e92[_0x5d824e];return _0x5439d4;}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a36_0x226553=a36_0x3a7b;function a36_0x4384(){const _0x858f78=['List\x20BFF\x20scripts','type','1568819YRhDRy','string','str','Filter\x20by\x20script\x20name','673563pnjVnp','map','ENDPOINT','length','bff','9SEGUIP','98915AbCGRE','list','bool','COMMON','819076AzBbSd','Return\x20full\x20script\x20objects','scriptType','No\x20BFF\x20scripts\x20found.','348826ZNEJnW','492738vaBxCY','description','read','verbose','boolean','2lmHyxD','1756024hgGver','Script\x20type\x20filter','name','(unnamed)'];a36_0x4384=function(){return _0x858f78;};return a36_0x4384();}(function(_0x3388e3,_0x4b9a35){const _0x4bf84e=a36_0x3a7b,_0x1b990a=_0x3388e3();while(!![]){try{const _0x49b18a=parseInt(_0x4bf84e(0x1a9))/0x1*(-parseInt(_0x4bf84e(0x1a3))/0x2)+-parseInt(_0x4bf84e(0x1b4))/0x3+parseInt(_0x4bf84e(0x1be))/0x4+parseInt(_0x4bf84e(0x1ba))/0x5+parseInt(_0x4bf84e(0x1a4))/0x6+parseInt(_0x4bf84e(0x1b0))/0x7+-parseInt(_0x4bf84e(0x1aa))/0x8*(-parseInt(_0x4bf84e(0x1b9))/0x9);if(_0x49b18a===_0x4b9a35)break;else _0x1b990a['push'](_0x1b990a['shift']());}catch(_0x2b2422){_0x1b990a['push'](_0x1b990a['shift']());}}}(a36_0x4384,0x2b334));import{listBffScripts}from'../../core/api-client.js';function a36_0x3a7b(_0x58e0c5,_0x279aa0){_0x58e0c5=_0x58e0c5-0x1a1;const _0x438401=a36_0x4384();let _0x3a7b71=_0x438401[_0x58e0c5];return _0x3a7b71;}export const bffList={'service':a36_0x226553(0x1b8),'command':a36_0x226553(0x1bb),'description':a36_0x226553(0x1ae),'risk':a36_0x226553(0x1a6),'flags':[{'name':'type','type':a36_0x226553(0x1b1),'description':a36_0x226553(0x1ab),'default':a36_0x226553(0x1b6),'enum':[a36_0x226553(0x1b6),a36_0x226553(0x1bd)]},{'name':a36_0x226553(0x1ac),'type':a36_0x226553(0x1b1),'description':a36_0x226553(0x1b3)},{'name':a36_0x226553(0x1a7),'type':a36_0x226553(0x1a8),'description':a36_0x226553(0x1bf)}],async 'execute'(_0x27f30f){const _0x9f2bea=a36_0x226553,_0x4a4fb6=await listBffScripts(_0x27f30f['appCode'],_0x27f30f[_0x9f2bea(0x1b2)](_0x9f2bea(0x1af)),{'scriptName':_0x27f30f['str']('name')||undefined}),_0x1c817d=_0x27f30f[_0x9f2bea(0x1bc)]('verbose');return{'ok':!![],'data':_0x1c817d?_0x4a4fb6:_0x4a4fb6[_0x9f2bea(0x1b5)](_0x2272ec=>({'id':_0x2272ec['id'],'functionName':_0x2272ec['functionName']??'','description':_0x2272ec[_0x9f2bea(0x1a5)]||_0x9f2bea(0x1ad),'scriptType':_0x2272ec[_0x9f2bea(0x1a1)]})),'message':_0x4a4fb6[_0x9f2bea(0x1b7)]===0x0?_0x9f2bea(0x1a2):undefined};}};
1
+ const a35_0x596276=a35_0x4359;function a35_0x4359(_0x569d03,_0x49a040){_0x569d03=_0x569d03-0x129;const _0x341ea0=a35_0x341e();let _0x4359a3=_0x341ea0[_0x569d03];return _0x4359a3;}(function(_0x30f8b2,_0x3354b1){const _0x1b3b29=a35_0x4359,_0x200a5a=_0x30f8b2();while(!![]){try{const _0x2ba091=-parseInt(_0x1b3b29(0x130))/0x1*(-parseInt(_0x1b3b29(0x147))/0x2)+parseInt(_0x1b3b29(0x136))/0x3*(-parseInt(_0x1b3b29(0x13a))/0x4)+-parseInt(_0x1b3b29(0x141))/0x5*(parseInt(_0x1b3b29(0x138))/0x6)+parseInt(_0x1b3b29(0x146))/0x7*(parseInt(_0x1b3b29(0x129))/0x8)+parseInt(_0x1b3b29(0x12f))/0x9+-parseInt(_0x1b3b29(0x13d))/0xa*(parseInt(_0x1b3b29(0x131))/0xb)+parseInt(_0x1b3b29(0x132))/0xc*(-parseInt(_0x1b3b29(0x144))/0xd);if(_0x2ba091===_0x3354b1)break;else _0x200a5a['push'](_0x200a5a['shift']());}catch(_0x1c5843){_0x200a5a['push'](_0x200a5a['shift']());}}}(a35_0x341e,0xb9913));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':a35_0x596276(0x13f),'description':a35_0x596276(0x148),'risk':a35_0x596276(0x142),'flags':[{'name':'type','type':'string','description':'Script\x20type\x20filter','default':a35_0x596276(0x13c),'enum':[a35_0x596276(0x13c),a35_0x596276(0x137)]},{'name':a35_0x596276(0x12b),'type':a35_0x596276(0x134),'description':'Filter\x20by\x20script\x20name'},{'name':a35_0x596276(0x12c),'type':a35_0x596276(0x145),'description':a35_0x596276(0x12e)}],async 'execute'(_0x5b4677){const _0x1d27c2=a35_0x596276,_0x2cd783=await listBffScripts(_0x5b4677[_0x1d27c2(0x143)],_0x5b4677[_0x1d27c2(0x135)]('type'),{'scriptName':_0x5b4677[_0x1d27c2(0x135)](_0x1d27c2(0x12b))||undefined}),_0x17298e=_0x5b4677[_0x1d27c2(0x13b)](_0x1d27c2(0x12c));return{'ok':!![],'data':_0x17298e?_0x2cd783:_0x2cd783[_0x1d27c2(0x139)](_0x2d14b5=>({'id':_0x2d14b5['id'],'functionName':_0x2d14b5['functionName']??'','description':_0x2d14b5[_0x1d27c2(0x12d)]||_0x1d27c2(0x133),'scriptType':_0x2d14b5[_0x1d27c2(0x12a)]})),'message':_0x2cd783[_0x1d27c2(0x140)]===0x0?_0x1d27c2(0x13e):undefined};}};function a35_0x341e(){const _0x176a32=['24RMruzR','(unnamed)','string','str','3CJDWjB','COMMON','18RAGdsf','map','2936300wOuEvz','bool','ENDPOINT','4326210FkhwWj','No\x20BFF\x20scripts\x20found.','list','length','2019040fBRwNO','read','appCode','1759979LDetSp','boolean','350ojTBph','320jlUfdQ','List\x20BFF\x20scripts','240776ePZtAO','scriptType','name','verbose','description','Return\x20full\x20script\x20objects','8278191qkcbbq','6152ZPyzRc','11BjKAOr'];a35_0x341e=function(){return _0x176a32;};return a35_0x341e();}
@@ -1 +1 @@
1
- const a37_0xf047b6=a37_0x4a64;(function(_0x3de2e4,_0x4dfae6){const _0x406f67=a37_0x4a64,_0x4aa9d3=_0x3de2e4();while(!![]){try{const _0x462ea2=parseInt(_0x406f67(0xa8))/0x1*(-parseInt(_0x406f67(0xa6))/0x2)+-parseInt(_0x406f67(0xb8))/0x3+parseInt(_0x406f67(0xcf))/0x4*(-parseInt(_0x406f67(0xa9))/0x5)+-parseInt(_0x406f67(0xb1))/0x6*(parseInt(_0x406f67(0x9d))/0x7)+parseInt(_0x406f67(0xcc))/0x8*(parseInt(_0x406f67(0xb6))/0x9)+-parseInt(_0x406f67(0xaf))/0xa+parseInt(_0x406f67(0x9a))/0xb;if(_0x462ea2===_0x4dfae6)break;else _0x4aa9d3['push'](_0x4aa9d3['shift']());}catch(_0x3d8418){_0x4aa9d3['push'](_0x4aa9d3['shift']());}}}(a37_0x426c,0x87560));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';function a37_0x426c(){const _0x985cbf=['cancelled','\x20failed','hookLocation','map','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','functionNode','yes','functions','question','&type=','scriptContent','17796801PwLnsZ','parse','Pull\x20only\x20this\x20script\x20type','7LIvlQZ','type','scriptType','GET','length','Force\x20overwrite\x20local\x20unsynced\x20changes','force','nonInteractive','apiDir','692OoAZHE','message','199lZnGDy','218910skEKVs','appCode','local\x20unsynced\x20changes','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','lockFilePath','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','6007750UCRoPA','datasetCode','4758678gUCWHt','ENDPOINT','pull','Remote\x20script\x20missing\x20content.','\x22\x20not\x20found\x20after\x20ensureLockScope.','150597ERlmGa','stringify','655659NSJlMJ','version','stdin','Lock\x20scope\x20for\x20app\x20\x22','Force\x20pull\x20cancelled.','filePath','Would\x20inspect\x20','skipped','\x20skipped,\x20','validation','utf8','functionName','\x20pulled,\x20','Pull\x20complete:\x20','bool','bff','write','/api/management/library/scripts/list?appCode=','unresolvable\x20target\x20path','trim','400YGPhZp','includes','\x20remote\x20BFF\x20script(s)\x20for\x20pull','20UQyJLI','COMMON','all','str','toISOString','boolean','scriptsRoot','stderr','toLowerCase','lastSync','lockKey','HOOK','push','operationType','alias'];a37_0x426c=function(){return _0x985cbf;};return a37_0x426c();}function a37_0x4a64(_0x41dc4e,_0x5b8929){_0x41dc4e=_0x41dc4e-0x8f;const _0x426c4b=a37_0x426c();let _0x4a64fe=_0x426c4b[_0x41dc4e];return _0x4a64fe;}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':a37_0xf047b6(0xc7),'command':a37_0xf047b6(0xb3),'description':a37_0xf047b6(0x93),'risk':a37_0xf047b6(0xc8),'flags':[{'name':a37_0xf047b6(0x9e),'type':'string','description':a37_0xf047b6(0x9c),'enum':[a37_0xf047b6(0xd0),a37_0xf047b6(0xb2),a37_0xf047b6(0xda)]},{'name':a37_0xf047b6(0xa3),'type':a37_0xf047b6(0xd4),'description':a37_0xf047b6(0xa2)}],async 'dryRun'(_0xc91ca1){const _0x2cbd86=a37_0xf047b6,_0x3837a9=loadBffProjectConfig(_0xc91ca1[_0x2cbd86(0xaa)]),_0x566345=await readBffLockFile(_0x3837a9[_0x2cbd86(0xad)]),{appLock:_0x5c7b29}=ensureLockScope(_0x566345??createEmptyBffLock(),_0xc91ca1[_0x2cbd86(0xaa)],_0x3837a9['scriptsRoot'],_0x2cbd86(0xb3)),_0x268896=normalizeBffType(_0xc91ca1[_0x2cbd86(0xd2)]('type'))??undefined,_0x407baf=buildDatasetCodeToAliasMap(_0xc91ca1[_0x2cbd86(0xa5)],_0xc91ca1['appCode']),[_0xa8dd4e,_0x4c2ecd]=await Promise[_0x2cbd86(0xd1)]([listBffScripts(_0xc91ca1[_0x2cbd86(0xaa)],_0x268896),getBffScriptStatistics(_0xc91ca1[_0x2cbd86(0xaa)])]),_0x4ec530=createHookLocationMap(_0x4c2ecd),_0x4208ba=[];for(const _0x315b62 of _0xa8dd4e){const _0x2e4abc=resolveRemoteScriptTarget(_0x3837a9,_0x315b62,_0x4ec530,_0x5c7b29[_0x2cbd86(0x96)],_0x407baf);if(!_0x2e4abc){_0x4208ba[_0x2cbd86(0xdb)]({'scriptType':_0x315b62['scriptType'],'functionName':_0x315b62[_0x2cbd86(0xc3)]??'','status':_0x2cbd86(0xbf),'reason':_0x2cbd86(0xca)});continue;}const _0x32e021=_0x5c7b29[_0x2cbd86(0x96)][_0x2e4abc[_0x2cbd86(0xd9)]],_0x25232b=_0x315b62[_0x2cbd86(0x99)]!=null?computeContentHash(_0x315b62[_0x2cbd86(0x99)]):undefined,_0x10c1d8=await hasUnsyncedLocalChanges(_0x2e4abc[_0x2cbd86(0xbd)],_0x32e021,_0x25232b);_0x4208ba[_0x2cbd86(0xdb)]({'lockKey':_0x2e4abc[_0x2cbd86(0xd9)],'filePath':_0x2e4abc[_0x2cbd86(0xbd)],'remoteId':_0x315b62['id']??null,'status':_0x10c1d8?'conflict':'would_pull'});}return{'method':_0x2cbd86(0xa0),'url':_0x2cbd86(0xc9)+_0xc91ca1[_0x2cbd86(0xaa)]+(_0x268896?_0x2cbd86(0x98)+_0x268896:''),'body':{'appCode':_0xc91ca1[_0x2cbd86(0xaa)],'filterType':_0x268896??null,'files':_0x4208ba},'description':_0x2cbd86(0xbe)+_0x4208ba[_0x2cbd86(0xa1)]+_0x2cbd86(0xce)};},async 'execute'(_0x5af27d){const _0xd3721d=a37_0xf047b6,_0x298b83=loadBffProjectConfig(_0x5af27d[_0xd3721d(0xaa)]),_0x9dc69b=await readBffLockFile(_0x298b83[_0xd3721d(0xad)]),{lockData:_0x16ef88,appLock:_0x36b3a5}=ensureLockScope(_0x9dc69b??createEmptyBffLock(),_0x5af27d[_0xd3721d(0xaa)],_0x298b83[_0xd3721d(0xd5)],'pull'),_0x2b6ba9=normalizeBffType(_0x5af27d[_0xd3721d(0xd2)](_0xd3721d(0x9e)))??undefined;if(_0x5af27d[_0xd3721d(0xd2)]('type')&&!_0x2b6ba9)throw CliErrors[_0xd3721d(0xc1)](_0xd3721d(0xac));const [_0x2a8b20,_0x342de0]=await Promise[_0xd3721d(0xd1)]([listBffScripts(_0x5af27d[_0xd3721d(0xaa)],_0x2b6ba9),getBffScriptStatistics(_0x5af27d[_0xd3721d(0xaa)])]);if(_0x2a8b20['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x26a99d=_0x5af27d[_0xd3721d(0xc6)](_0xd3721d(0xa3));if(_0x26a99d&&!_0x5af27d['nonInteractive']){const _0x39ea97=await confirmForce();if(!_0x39ea97)throw CliErrors[_0xd3721d(0x8f)](_0xd3721d(0xbc));}if(_0x26a99d&&_0x5af27d[_0xd3721d(0xa4)]){}const _0x15c170=buildDatasetCodeToAliasMap(_0x5af27d[_0xd3721d(0xa5)],_0x5af27d[_0xd3721d(0xaa)]),_0x212a6c=createHookLocationMap(_0x342de0),_0xa4e909=JSON[_0xd3721d(0x9b)](JSON[_0xd3721d(0xb7)](_0x16ef88)),_0x116f0c=_0x5af27d[_0xd3721d(0xaa)],_0x5d3f6a=_0xa4e909['apps'][_0x116f0c];if(!_0x5d3f6a)throw new Error(_0xd3721d(0xbb)+_0x116f0c+_0xd3721d(0xb5));const _0x4f7950=[],_0xd3a952=[],_0x5ab3b2=[];for(const _0x3967cf of _0x2a8b20){const _0x49195a=resolveRemoteScriptTarget(_0x298b83,_0x3967cf,_0x212a6c,_0x36b3a5['functions'],_0x15c170);if(!_0x49195a){_0xd3a952['push']({'lockKey':_0x3967cf[_0xd3721d(0x9f)]+'/'+_0x3967cf['functionName'],'reason':_0xd3721d(0xca)});continue;}const _0x2a0377=_0x36b3a5[_0xd3721d(0x96)][_0x49195a['lockKey']];try{if(!_0x3967cf['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x3967cf[_0xd3721d(0x99)]==null)throw new Error(_0xd3721d(0xb4));const _0x2aec59=_0x3967cf[_0xd3721d(0x99)],_0x393879=computeContentHash(_0x2aec59);if(!_0x26a99d){const _0x4d19ac=await hasUnsyncedLocalChanges(_0x49195a['filePath'],_0x2a0377,_0x393879);if(_0x4d19ac){_0xd3a952[_0xd3721d(0xdb)]({'lockKey':_0x49195a['lockKey'],'reason':_0xd3721d(0xab)});continue;}}await ensureParentDirectory(_0x49195a[_0xd3721d(0xbd)]),await writeFile(_0x49195a[_0xd3721d(0xbd)],_0x2aec59,_0xd3721d(0xc2));const _0x1436c6={'hash':_0x393879,'remoteId':_0x3967cf['id'],'version':_0x3967cf[_0xd3721d(0xb9)]};_0x49195a[_0xd3721d(0x9e)]===_0xd3721d(0xda)&&_0x49195a[_0xd3721d(0x91)]&&(_0x1436c6[_0xd3721d(0xdd)]=_0x49195a[_0xd3721d(0x91)]['alias'],_0x1436c6['datasetCode']=_0x49195a['hookLocation'][_0xd3721d(0xb0)],_0x1436c6[_0xd3721d(0xdc)]=_0x49195a['hookLocation'][_0xd3721d(0xdc)],_0x1436c6[_0xd3721d(0x94)]=_0x49195a[_0xd3721d(0x91)][_0xd3721d(0x94)]),_0x5d3f6a[_0xd3721d(0x96)][_0x49195a[_0xd3721d(0xd9)]]=_0x1436c6,_0x4f7950[_0xd3721d(0xdb)]({'lockKey':_0x49195a[_0xd3721d(0xd9)],'remoteId':_0x3967cf['id']});}catch(_0x16a594){_0x5ab3b2[_0xd3721d(0xdb)]({'lockKey':_0x49195a['lockKey'],'error':_0x16a594 instanceof Error?_0x16a594[_0xd3721d(0xa7)]:String(_0x16a594)});}}return _0x5d3f6a[_0xd3721d(0xd8)]=new Date()[_0xd3721d(0xd3)](),await writeBffLockFile(_0x298b83[_0xd3721d(0xad)],_0xa4e909),{'ok':_0x5ab3b2[_0xd3721d(0xa1)]===0x0,'data':{'pulled':_0x4f7950,'skipped':_0xd3a952,'failed':_0x5ab3b2},'message':_0xd3721d(0xc5)+_0x4f7950[_0xd3721d(0xa1)]+_0xd3721d(0xc4)+_0xd3a952[_0xd3721d(0xa1)]+_0xd3721d(0xc0)+_0x5ab3b2[_0xd3721d(0xa1)]+_0xd3721d(0x90)};}};async function hasUnsyncedLocalChanges(_0x4d79c3,_0x5140f2,_0x11b47b){if(!await fileExists(_0x4d79c3))return![];const _0x56351d=await computeFileHash(_0x4d79c3);if(!_0x5140f2)return _0x11b47b?_0x56351d!==_0x11b47b:!![];return _0x56351d!==_0x5140f2['hash'];}function buildDatasetCodeToAliasMap(_0x47a925,_0x1cfd39){const _0x25fe7b=a37_0xf047b6,_0x3309ed=loadAliasMap(_0x47a925,undefined,resolveApiFilePath(_0x47a925,_0x1cfd39));return new Map(_0x3309ed[_0x25fe7b(0x92)](_0x62245f=>[_0x62245f['datasetCode'],_0x62245f[_0x25fe7b(0xdd)]]));}async function confirmForce(){const _0x1a7e89=a37_0xf047b6,_0x409056=createInterface({'input':process[_0x1a7e89(0xba)],'output':process[_0x1a7e89(0xd6)]}),_0x203a73=await new Promise(_0x2b3c7d=>{const _0x418b17=_0x1a7e89;_0x409056[_0x418b17(0x97)](_0x418b17(0xae),_0x2b3c7d);});return _0x409056['close'](),['y',_0x1a7e89(0x95)][_0x1a7e89(0xcd)](_0x203a73[_0x1a7e89(0xcb)]()[_0x1a7e89(0xd7)]());}
1
+ const a36_0x369be2=a36_0x7c75;(function(_0x557cc8,_0x923ba8){const _0xa9a65b=a36_0x7c75,_0x133644=_0x557cc8();while(!![]){try{const _0x4ea79a=-parseInt(_0xa9a65b(0x102))/0x1+parseInt(_0xa9a65b(0x10a))/0x2+-parseInt(_0xa9a65b(0xd7))/0x3*(parseInt(_0xa9a65b(0x109))/0x4)+parseInt(_0xa9a65b(0xd8))/0x5*(parseInt(_0xa9a65b(0x106))/0x6)+-parseInt(_0xa9a65b(0xd4))/0x7*(-parseInt(_0xa9a65b(0xce))/0x8)+parseInt(_0xa9a65b(0xdc))/0x9*(-parseInt(_0xa9a65b(0xfc))/0xa)+-parseInt(_0xa9a65b(0xe2))/0xb;if(_0x4ea79a===_0x923ba8)break;else _0x133644['push'](_0x133644['shift']());}catch(_0x2edd85){_0x133644['push'](_0x133644['shift']());}}}(a36_0x4a89,0x9b54a));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';function a36_0x7c75(_0x40a4fc,_0x8f6d6a){_0x40a4fc=_0x40a4fc-0xc2;const _0x4a890d=a36_0x4a89();let _0x7c7513=_0x4a890d[_0x40a4fc];return _0x7c7513;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x4a89(){const _0x293488=['10fdMgWF','unresolvable\x20target\x20path','Force\x20overwrite\x20local\x20unsynced\x20changes','\x20remote\x20BFF\x20script(s)\x20for\x20pull','utf8','force','27637iqlOIG','ENDPOINT','push','hash','6JRDEhX','skipped','type','20OHNlHb','1191282UaVamt','scriptType','\x20failed','functionName','boolean','functions','includes','operationType','Pull\x20only\x20this\x20script\x20type','lockKey','lockFilePath','\x20pulled,\x20','/api/management/library/scripts/list?appCode=','\x22\x20not\x20found\x20after\x20ensureLockScope.','16816nXeycE','length','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','filePath','apps','appCode','2373HGQEJy','conflict','Pull\x20complete:\x20','222603bAagEV','3318785yWIeyH','all','alias','Force\x20pull\x20cancelled.','320958kzdpqN','hookLocation','toISOString','version','stdin','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','9915818fzkGlg','stderr','map','stringify','would_pull','validation','toLowerCase','str','\x20skipped,\x20','scriptContent','trim','lastSync','apiDir','string','parse','bool','datasetCode','HOOK','GET','cancelled','Lock\x20scope\x20for\x20app\x20\x22','pull','bff','No\x20remote\x20BFF\x20scripts\x20found.','local\x20unsynced\x20changes','nonInteractive'];a36_0x4a89=function(){return _0x293488;};return a36_0x4a89();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x369be2(0xf8),'command':'pull','description':a36_0x369be2(0xe1),'risk':'write','flags':[{'name':'type','type':a36_0x369be2(0xef),'description':a36_0x369be2(0xc8),'enum':['COMMON',a36_0x369be2(0x103),a36_0x369be2(0xf3)]},{'name':a36_0x369be2(0x101),'type':a36_0x369be2(0xc4),'description':a36_0x369be2(0xfe)}],async 'dryRun'(_0x19ebd0){const _0xf30a25=a36_0x369be2,_0x25ae2e=loadBffProjectConfig(_0x19ebd0[_0xf30a25(0xd3)]),_0x2b8f2f=await readBffLockFile(_0x25ae2e['lockFilePath']),{appLock:_0x56babd}=ensureLockScope(_0x2b8f2f??createEmptyBffLock(),_0x19ebd0[_0xf30a25(0xd3)],_0x25ae2e['scriptsRoot'],'pull'),_0x57550f=normalizeBffType(_0x19ebd0[_0xf30a25(0xe9)](_0xf30a25(0x108)))??undefined,_0x2cf815=buildDatasetCodeToAliasMap(_0x19ebd0['apiDir'],_0x19ebd0[_0xf30a25(0xd3)]),[_0x1fd942,_0x4af2f6]=await Promise[_0xf30a25(0xd9)]([listBffScripts(_0x19ebd0[_0xf30a25(0xd3)],_0x57550f),getBffScriptStatistics(_0x19ebd0[_0xf30a25(0xd3)])]),_0x5c9581=createHookLocationMap(_0x4af2f6),_0x1f5dfe=[];for(const _0x4fb62a of _0x1fd942){const _0x2d8527=resolveRemoteScriptTarget(_0x25ae2e,_0x4fb62a,_0x5c9581,_0x56babd[_0xf30a25(0xc5)],_0x2cf815);if(!_0x2d8527){_0x1f5dfe['push']({'scriptType':_0x4fb62a['scriptType'],'functionName':_0x4fb62a[_0xf30a25(0xc3)]??'','status':_0xf30a25(0x107),'reason':_0xf30a25(0xfd)});continue;}const _0x36e2d1=_0x56babd[_0xf30a25(0xc5)][_0x2d8527[_0xf30a25(0xc9)]],_0x2231bf=_0x4fb62a[_0xf30a25(0xeb)]!=null?computeContentHash(_0x4fb62a[_0xf30a25(0xeb)]):undefined,_0x10ea35=await hasUnsyncedLocalChanges(_0x2d8527[_0xf30a25(0xd1)],_0x36e2d1,_0x2231bf);_0x1f5dfe['push']({'lockKey':_0x2d8527[_0xf30a25(0xc9)],'filePath':_0x2d8527['filePath'],'remoteId':_0x4fb62a['id']??null,'status':_0x10ea35?_0xf30a25(0xd5):_0xf30a25(0xe6)});}return{'method':_0xf30a25(0xf4),'url':_0xf30a25(0xcc)+_0x19ebd0[_0xf30a25(0xd3)]+(_0x57550f?'&type='+_0x57550f:''),'body':{'appCode':_0x19ebd0[_0xf30a25(0xd3)],'filterType':_0x57550f??null,'files':_0x1f5dfe},'description':'Would\x20inspect\x20'+_0x1f5dfe[_0xf30a25(0xcf)]+_0xf30a25(0xff)};},async 'execute'(_0x227bb3){const _0x427e8b=a36_0x369be2,_0x1c54d9=loadBffProjectConfig(_0x227bb3[_0x427e8b(0xd3)]),_0x43a9f8=await readBffLockFile(_0x1c54d9[_0x427e8b(0xca)]),{lockData:_0xdcc43,appLock:_0x54864f}=ensureLockScope(_0x43a9f8??createEmptyBffLock(),_0x227bb3[_0x427e8b(0xd3)],_0x1c54d9['scriptsRoot'],_0x427e8b(0xf7)),_0x9fa911=normalizeBffType(_0x227bb3['str'](_0x427e8b(0x108)))??undefined;if(_0x227bb3[_0x427e8b(0xe9)]('type')&&!_0x9fa911)throw CliErrors[_0x427e8b(0xe7)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x548ee1,_0x4884e7]=await Promise['all']([listBffScripts(_0x227bb3[_0x427e8b(0xd3)],_0x9fa911),getBffScriptStatistics(_0x227bb3['appCode'])]);if(_0x548ee1['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x427e8b(0xf9)};const _0x13a4fd=_0x227bb3[_0x427e8b(0xf1)](_0x427e8b(0x101));if(_0x13a4fd&&!_0x227bb3[_0x427e8b(0xfb)]){const _0x31bdf9=await confirmForce();if(!_0x31bdf9)throw CliErrors[_0x427e8b(0xf5)](_0x427e8b(0xdb));}if(_0x13a4fd&&_0x227bb3[_0x427e8b(0xfb)]){}const _0x1df6b5=buildDatasetCodeToAliasMap(_0x227bb3[_0x427e8b(0xee)],_0x227bb3['appCode']),_0x2b954c=createHookLocationMap(_0x4884e7),_0x15b8a=JSON[_0x427e8b(0xf0)](JSON[_0x427e8b(0xe5)](_0xdcc43)),_0x2b3a4c=_0x227bb3['appCode'],_0x1b3991=_0x15b8a[_0x427e8b(0xd2)][_0x2b3a4c];if(!_0x1b3991)throw new Error(_0x427e8b(0xf6)+_0x2b3a4c+_0x427e8b(0xcd));const _0xb235b5=[],_0x460bb2=[],_0x2cbb52=[];for(const _0x31193d of _0x548ee1){const _0x1cb6ca=resolveRemoteScriptTarget(_0x1c54d9,_0x31193d,_0x2b954c,_0x54864f['functions'],_0x1df6b5);if(!_0x1cb6ca){_0x460bb2[_0x427e8b(0x104)]({'lockKey':_0x31193d[_0x427e8b(0x10b)]+'/'+_0x31193d[_0x427e8b(0xc3)],'reason':_0x427e8b(0xfd)});continue;}const _0x4a9c1e=_0x54864f[_0x427e8b(0xc5)][_0x1cb6ca[_0x427e8b(0xc9)]];try{if(!_0x31193d['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x31193d['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x46f0fc=_0x31193d[_0x427e8b(0xeb)],_0x5c435f=computeContentHash(_0x46f0fc);if(!_0x13a4fd){const _0x2f4c0b=await hasUnsyncedLocalChanges(_0x1cb6ca[_0x427e8b(0xd1)],_0x4a9c1e,_0x5c435f);if(_0x2f4c0b){_0x460bb2[_0x427e8b(0x104)]({'lockKey':_0x1cb6ca[_0x427e8b(0xc9)],'reason':_0x427e8b(0xfa)});continue;}}await ensureParentDirectory(_0x1cb6ca[_0x427e8b(0xd1)]),await writeFile(_0x1cb6ca[_0x427e8b(0xd1)],_0x46f0fc,_0x427e8b(0x100));const _0x394d0a={'hash':_0x5c435f,'remoteId':_0x31193d['id'],'version':_0x31193d[_0x427e8b(0xdf)]};_0x1cb6ca[_0x427e8b(0x108)]===_0x427e8b(0xf3)&&_0x1cb6ca[_0x427e8b(0xdd)]&&(_0x394d0a['alias']=_0x1cb6ca[_0x427e8b(0xdd)][_0x427e8b(0xda)],_0x394d0a[_0x427e8b(0xf2)]=_0x1cb6ca[_0x427e8b(0xdd)][_0x427e8b(0xf2)],_0x394d0a[_0x427e8b(0xc7)]=_0x1cb6ca[_0x427e8b(0xdd)][_0x427e8b(0xc7)],_0x394d0a['functionNode']=_0x1cb6ca[_0x427e8b(0xdd)]['functionNode']),_0x1b3991[_0x427e8b(0xc5)][_0x1cb6ca[_0x427e8b(0xc9)]]=_0x394d0a,_0xb235b5[_0x427e8b(0x104)]({'lockKey':_0x1cb6ca[_0x427e8b(0xc9)],'remoteId':_0x31193d['id']});}catch(_0x4c7140){_0x2cbb52[_0x427e8b(0x104)]({'lockKey':_0x1cb6ca[_0x427e8b(0xc9)],'error':_0x4c7140 instanceof Error?_0x4c7140['message']:String(_0x4c7140)});}}return _0x1b3991[_0x427e8b(0xed)]=new Date()[_0x427e8b(0xde)](),await writeBffLockFile(_0x1c54d9[_0x427e8b(0xca)],_0x15b8a),{'ok':_0x2cbb52[_0x427e8b(0xcf)]===0x0,'data':{'pulled':_0xb235b5,'skipped':_0x460bb2,'failed':_0x2cbb52},'message':_0x427e8b(0xd6)+_0xb235b5[_0x427e8b(0xcf)]+_0x427e8b(0xcb)+_0x460bb2[_0x427e8b(0xcf)]+_0x427e8b(0xea)+_0x2cbb52[_0x427e8b(0xcf)]+_0x427e8b(0xc2)};}};async function hasUnsyncedLocalChanges(_0x59a757,_0x1df411,_0x4c2f14){const _0x3a0551=a36_0x369be2;if(!await fileExists(_0x59a757))return![];const _0x32af3f=await computeFileHash(_0x59a757);if(!_0x1df411)return _0x4c2f14?_0x32af3f!==_0x4c2f14:!![];return _0x32af3f!==_0x1df411[_0x3a0551(0x105)];}function buildDatasetCodeToAliasMap(_0x3ce086,_0x34088a){const _0x413321=a36_0x369be2,_0x36bd5d=loadAliasMap(_0x3ce086,undefined,resolveApiFilePath(_0x3ce086,_0x34088a));return new Map(_0x36bd5d[_0x413321(0xe4)](_0x1dc529=>[_0x1dc529[_0x413321(0xf2)],_0x1dc529[_0x413321(0xda)]]));}async function confirmForce(){const _0x12e2fc=a36_0x369be2,_0x48d4c0=createInterface({'input':process[_0x12e2fc(0xe0)],'output':process[_0x12e2fc(0xe3)]}),_0x457f30=await new Promise(_0xc678ca=>{const _0x45a7be=_0x12e2fc;_0x48d4c0['question'](_0x45a7be(0xd0),_0xc678ca);});return _0x48d4c0['close'](),['y','yes'][_0x12e2fc(0xc6)](_0x457f30[_0x12e2fc(0xec)]()[_0x12e2fc(0xe8)]());}
@@ -1 +1 @@
1
- const a38_0x4f18ce=a38_0x38e9;function a38_0x3a19(){const _0x1f181f=['description','/api/management/library/scripts/save','script','operationType','str','status','validation','parse','4fjKUdD','54ONWfBU','HOOK','code','push','utf8','some','would_push','bool','get','datasetCodeToDataset','196703rSNHcR','COMMON','468688Ibwcyq','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','lockKey','aliasToDatasetCode','update','6679400lNXeUA','string','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20uploaded,\x20','runtime\x20cache\x20not\x20needed','Push\x20only\x20this\x20script\x20type','has','name','every','743756ocVZnT','\x20skipped,\x20','Push\x20complete:\x20','type','functionNode','Lock\x20scope\x20for\x20app\x20\x22','functions','hash','Would\x20inspect\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','datasetId','join','runtime\x20cache\x20cleared','\x22\x20not\x20found\x20after\x20ensureLockScope.','datasetCode','70938MJMZGm','1943160rughTv','lockFilePath','Local\x20function\x20not\x20found:\x20','high-risk-write','remoteId','unchanged','force','attempted','\x22.\x20','message','version','stringify','\x20failed,\x20','940kYVuob','cleared','Force\x20push\x20ignoring\x20hash\x20protection','map','boolean','Push\x20local\x20BFF\x20scripts\x20to\x20remote','lastSync','282VSyKlQ','runtime\x20cache\x20clear\x20failed','appCode','apiDir','POST','Runtime\x20script\x20cache\x20cleared.','filePath','bff','length','Cannot\x20resolve\x20dataset\x20for\x20\x22','alias','scriptsRoot','apps','638985eaIEZC'];a38_0x3a19=function(){return _0x1f181f;};return a38_0x3a19();}(function(_0x11051d,_0x298370){const _0x1a81a7=a38_0x38e9,_0x2e0531=_0x11051d();while(!![]){try{const _0x232d18=-parseInt(_0x1a81a7(0x1bb))/0x1+-parseInt(_0x1a81a7(0x176))/0x2+-parseInt(_0x1a81a7(0x1a7))/0x3+parseInt(_0x1a81a7(0x1b0))/0x4*(-parseInt(_0x1a81a7(0x1c2))/0x5)+parseInt(_0x1a81a7(0x19a))/0x6*(parseInt(_0x1a81a7(0x185))/0x7)+parseInt(_0x1a81a7(0x186))/0x8*(-parseInt(_0x1a81a7(0x1b1))/0x9)+-parseInt(_0x1a81a7(0x193))/0xa*(-parseInt(_0x1a81a7(0x1bd))/0xb);if(_0x232d18===_0x298370)break;else _0x2e0531['push'](_0x2e0531['shift']());}catch(_0x52770a){_0x2e0531['push'](_0x2e0531['shift']());}}}(a38_0x3a19,0xdd580));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';function a38_0x38e9(_0x2a3473,_0xf36aa9){_0x2a3473=_0x2a3473-0x175;const _0x3a19a9=a38_0x3a19();let _0x38e95d=_0x3a19a9[_0x2a3473];return _0x38e95d;}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a38_0x4f18ce(0x1a1),'command':'push','description':a38_0x4f18ce(0x198),'risk':a38_0x4f18ce(0x189),'flags':[{'name':'type','type':'string','description':a38_0x4f18ce(0x1c7),'enum':[a38_0x4f18ce(0x1bc),'ENDPOINT','HOOK']},{'name':a38_0x4f18ce(0x1c9),'type':a38_0x4f18ce(0x1c3),'description':a38_0x4f18ce(0x1be)},{'name':a38_0x4f18ce(0x18c),'type':a38_0x4f18ce(0x197),'description':a38_0x4f18ce(0x195)}],async 'dryRun'(_0xab342e){const _0x1a034c=a38_0x4f18ce,_0x4a2f48=loadBffProjectConfig(_0xab342e[_0x1a034c(0x19c)]),_0x4ab9a7=await readBffLockFile(_0x4a2f48[_0x1a034c(0x187)]),{appLock:_0x276144}=ensureLockScope(_0x4ab9a7??createEmptyBffLock(),_0xab342e[_0x1a034c(0x19c)],_0x4a2f48['scriptsRoot'],_0x1a034c(0x1b4)),_0x44f842=await getTargetFunctions(_0x4a2f48,_0xab342e),_0x3de597=_0xab342e[_0x1a034c(0x1b8)](_0x1a034c(0x18c)),_0x2d748b=[];for(const _0x3d74aa of _0x44f842){const _0x45e066=await computeFileHash(_0x3d74aa[_0x1a034c(0x1a0)]),_0x476659=_0x276144['functions'][_0x3d74aa[_0x1a034c(0x1bf)]],_0x5d49c5=!!_0x476659&&_0x476659[_0x1a034c(0x17d)]===_0x45e066;_0x2d748b['push']({'lockKey':_0x3d74aa[_0x1a034c(0x1bf)],'filePath':_0x3d74aa[_0x1a034c(0x1a0)],'remoteId':_0x476659?.['remoteId']??null,'mode':_0x476659?.[_0x1a034c(0x18a)]?_0x1a034c(0x1c1):'create','status':!_0x3de597&&_0x5d49c5?_0x1a034c(0x18b):_0x1a034c(0x1b7)});}return{'method':_0x1a034c(0x19e),'url':_0x1a034c(0x1a9),'body':{'appCode':_0xab342e[_0x1a034c(0x19c)],'force':_0x3de597,'files':_0x2d748b,'cacheClearAtRuntime':_0x2d748b[_0x1a034c(0x1b6)](_0x502f1f=>_0x502f1f[_0x1a034c(0x1ad)]==='would_push'),'cacheClearAtRuntimeTimes':_0x2d748b[_0x1a034c(0x1b6)](_0x291a76=>_0x291a76['status']===_0x1a034c(0x1b7))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1a034c(0x17e)+_0x2d748b[_0x1a034c(0x1a2)]+_0x1a034c(0x17f)};},async 'execute'(_0x55b18e){const _0x30fe7e=a38_0x4f18ce,_0x436093=loadBffProjectConfig(_0x55b18e[_0x30fe7e(0x19c)]),_0x23b2f0=await readBffLockFile(_0x436093[_0x30fe7e(0x187)]),{lockData:_0x9469f8,appLock:_0x588c2a}=ensureLockScope(_0x23b2f0??createEmptyBffLock(),_0x55b18e[_0x30fe7e(0x19c)],_0x436093[_0x30fe7e(0x1a5)],_0x30fe7e(0x1b4)),_0x2c7aef=await getTargetFunctions(_0x436093,_0x55b18e);if(_0x2c7aef['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0xd50a99=_0x55b18e[_0x30fe7e(0x1b8)](_0x30fe7e(0x18c)),_0x335113=JSON[_0x30fe7e(0x1af)](JSON[_0x30fe7e(0x191)](_0x9469f8)),_0x44c42b=_0x335113['apps'][_0x55b18e[_0x30fe7e(0x19c)]];if(!_0x44c42b)throw new Error(_0x30fe7e(0x17b)+_0x55b18e['appCode']+_0x30fe7e(0x183));const _0x2cbb35=await buildHookMaps(_0x55b18e[_0x30fe7e(0x19c)],_0x55b18e[_0x30fe7e(0x19d)],_0x2c7aef,_0x44c42b),_0x49ccc8=[],_0x5cbb28=[],_0x21761c=[];for(const _0x59d356 of _0x2c7aef){const _0x38e318=await computeFileHash(_0x59d356[_0x30fe7e(0x1a0)]),_0x232b68=_0x44c42b[_0x30fe7e(0x17c)][_0x59d356[_0x30fe7e(0x1bf)]];if(!_0xd50a99&&_0x232b68&&_0x232b68[_0x30fe7e(0x17d)]===_0x38e318){_0x5cbb28[_0x30fe7e(0x1b4)]({'lockKey':_0x59d356[_0x30fe7e(0x1bf)],'reason':_0x30fe7e(0x18b)});continue;}try{await uploadSingleFunction(_0x55b18e['appCode'],_0x59d356,_0x44c42b,_0x2cbb35);const _0x5905f0=_0x44c42b[_0x30fe7e(0x17c)][_0x59d356['lockKey']];_0x49ccc8['push']({'lockKey':_0x59d356['lockKey'],'remoteId':_0x5905f0?.[_0x30fe7e(0x18a)]??0x0});}catch(_0x3e827a){_0x21761c['push']({'lockKey':_0x59d356[_0x30fe7e(0x1bf)],'error':_0x3e827a instanceof Error?_0x3e827a[_0x30fe7e(0x18f)]:String(_0x3e827a)});}}_0x44c42b[_0x30fe7e(0x199)]=new Date()['toISOString'](),await writeBffLockFile(_0x436093[_0x30fe7e(0x187)],_0x335113),await waitForUploadedLockEntries(_0x436093['lockFilePath'],_0x55b18e[_0x30fe7e(0x19c)],_0x49ccc8[_0x30fe7e(0x196)](_0x58b211=>_0x58b211[_0x30fe7e(0x1bf)]));let _0x3b7813={'attempted':![],'cleared':![]};if(_0x49ccc8[_0x30fe7e(0x1a2)]>0x0)try{let _0x1296a2='';for(let _0x4c541a=0x0;_0x4c541a<CACHE_CLEAR_ATTEMPTS;_0x4c541a+=0x1){_0x1296a2=await clearBffScriptCache(),_0x4c541a<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3b7813={'attempted':!![],'cleared':!![],'message':_0x1296a2||_0x30fe7e(0x19f)};}catch(_0x34ccb4){_0x3b7813={'attempted':!![],'cleared':![],'error':_0x34ccb4 instanceof Error?_0x34ccb4['message']:String(_0x34ccb4)};}const _0x4edd76=_0x21761c[_0x30fe7e(0x1a2)]===0x0&&(_0x3b7813[_0x30fe7e(0x18d)]?_0x3b7813[_0x30fe7e(0x194)]:!![]),_0x2a7665=_0x3b7813[_0x30fe7e(0x18d)]?_0x3b7813['cleared']?_0x30fe7e(0x182):_0x30fe7e(0x19b):_0x30fe7e(0x1c6);return{'ok':_0x4edd76,'data':{'uploaded':_0x49ccc8,'skipped':_0x5cbb28,'failed':_0x21761c,'cacheClear':_0x3b7813},'message':_0x30fe7e(0x178)+_0x49ccc8['length']+_0x30fe7e(0x1c5)+_0x5cbb28[_0x30fe7e(0x1a2)]+_0x30fe7e(0x177)+_0x21761c['length']+_0x30fe7e(0x192)+_0x2a7665};}};async function getTargetFunctions(_0x3d4d68,_0x198b94){const _0x3201b0=a38_0x4f18ce,_0x48c417=_0x198b94[_0x3201b0(0x1ac)]('type'),_0x216565=_0x198b94['str'](_0x3201b0(0x1c9)),_0x446784=normalizeBffType(_0x48c417)??undefined;if(_0x216565&&!_0x446784)throw CliErrors[_0x3201b0(0x1ae)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x183941=await scanLocalBffFunctions(_0x3d4d68,_0x446784);if(_0x216565){const _0x58cfc6=_0x183941['filter'](_0x3b0143=>_0x3b0143['name']===_0x216565);if(_0x58cfc6[_0x3201b0(0x1a2)]===0x0)throw CliErrors[_0x3201b0(0x1ae)](_0x3201b0(0x188)+_0x446784+'/'+_0x216565);return _0x58cfc6;}return _0x183941;}async function buildHookMaps(_0x305f50,_0x5164b3,_0x5da9bb,_0x5cf489){const _0x372be7=a38_0x4f18ce,_0x2db241=_0x5da9bb[_0x372be7(0x1b6)](_0x47b139=>_0x47b139[_0x372be7(0x179)]===_0x372be7(0x1b2));if(!_0x2db241)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2518e7=loadAliasMap(_0x5164b3,undefined,resolveApiFilePath(_0x5164b3,_0x305f50)),_0x49d1d0=new Map(_0x2518e7[_0x372be7(0x196)](_0x56793f=>[_0x56793f['alias'],_0x56793f[_0x372be7(0x184)]]));for(const _0x548874 of Object['values'](_0x5cf489[_0x372be7(0x17c)])){_0x548874[_0x372be7(0x1a4)]&&_0x548874[_0x372be7(0x184)]&&!_0x49d1d0['has'](_0x548874[_0x372be7(0x1a4)])&&_0x49d1d0['set'](_0x548874['alias'],_0x548874[_0x372be7(0x184)]);}const _0x41cd9c=await listDatasets(_0x305f50),_0x4f566c=new Map(_0x41cd9c['map'](_0x2d1eea=>[_0x2d1eea[_0x372be7(0x1b3)],_0x2d1eea]));return{'aliasToDatasetCode':_0x49d1d0,'datasetCodeToDataset':_0x4f566c};}async function uploadSingleFunction(_0x5c28b5,_0x51b27d,_0x505497,_0x4702cf){const _0x1db876=a38_0x4f18ce,_0x2472b1=await readFile(_0x51b27d[_0x1db876(0x1a0)],_0x1db876(0x1b5)),_0x1638e4=await computeFileHash(_0x51b27d[_0x1db876(0x1a0)]),_0x2fcb89=_0x505497[_0x1db876(0x17c)][_0x51b27d[_0x1db876(0x1bf)]];if(_0x2fcb89?.[_0x1db876(0x18a)]&&_0x2fcb89[_0x1db876(0x190)]==null)throw CliErrors['validation'](_0x51b27d[_0x1db876(0x1bf)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x44ceb7=extractScriptDescription(_0x2472b1);if(!_0x44ceb7&&_0x2fcb89?.[_0x1db876(0x18a)]){const _0x129bb0=await getBffScriptInfo(_0x2fcb89[_0x1db876(0x18a)]);_0x44ceb7=_0x129bb0['description']||undefined;}const _0x4aaebc={'appCode':_0x5c28b5,'functionName':_0x51b27d[_0x1db876(0x1c9)],'scriptType':_0x51b27d['type'],'scriptContent':_0x2472b1};if(_0x2fcb89?.[_0x1db876(0x18a)])_0x4aaebc['id']=_0x2fcb89[_0x1db876(0x18a)];if(_0x2fcb89?.[_0x1db876(0x190)]!=null)_0x4aaebc[_0x1db876(0x190)]=_0x2fcb89[_0x1db876(0x190)];if(_0x44ceb7)_0x4aaebc[_0x1db876(0x1a8)]=_0x44ceb7;if(_0x51b27d[_0x1db876(0x179)]===_0x1db876(0x1b2)){const _0x44182d=_0x51b27d[_0x1db876(0x1a4)];if(!_0x44182d||!_0x51b27d['operationType']||!_0x51b27d[_0x1db876(0x17a)])throw CliErrors[_0x1db876(0x1ae)]('Incomplete\x20HOOK\x20path:\x20'+_0x51b27d[_0x1db876(0x1bf)]);const _0x2559ea=_0x4702cf[_0x1db876(0x1c0)]['get'](_0x44182d)??_0x2fcb89?.['datasetCode']??_0x44182d,_0x38f0bd=_0x4702cf[_0x1db876(0x1ba)][_0x1db876(0x1b9)](_0x2559ea);if(!_0x38f0bd)throw CliErrors['validation'](_0x1db876(0x1a3)+_0x44182d+_0x1db876(0x18e)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x4aaebc[_0x1db876(0x180)]=_0x38f0bd['id'],_0x4aaebc[_0x1db876(0x1ab)]=_0x51b27d[_0x1db876(0x1ab)],_0x4aaebc[_0x1db876(0x17a)]=_0x51b27d['functionNode'];}const _0x23a804=await saveBffScript(_0x4aaebc),_0x5f0357=_0x23a804['id'],_0x3ca68c=_0x23a804[_0x1db876(0x1aa)]??await getBffScriptInfo(_0x5f0357),_0x3008ab={'hash':_0x1638e4,'remoteId':_0x5f0357,'version':_0x3ca68c[_0x1db876(0x190)]};if(_0x51b27d[_0x1db876(0x179)]==='HOOK'){const _0x163d42=_0x51b27d[_0x1db876(0x1a4)],_0x30a633=_0x4702cf[_0x1db876(0x1c0)][_0x1db876(0x1b9)](_0x163d42)??_0x2fcb89?.[_0x1db876(0x184)]??_0x163d42;_0x4702cf['aliasToDatasetCode'][_0x1db876(0x1c8)](_0x163d42)?_0x3008ab[_0x1db876(0x1a4)]=_0x163d42:_0x3008ab[_0x1db876(0x1a4)]=_0x2fcb89?.[_0x1db876(0x1a4)],_0x3008ab['datasetCode']=_0x30a633,_0x3008ab[_0x1db876(0x1ab)]=_0x51b27d[_0x1db876(0x1ab)],_0x3008ab[_0x1db876(0x17a)]=_0x51b27d[_0x1db876(0x17a)];}_0x505497[_0x1db876(0x17c)][_0x51b27d['lockKey']]=_0x3008ab;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x12b758,_0x5207e5,_0x2efa47){const _0x163f27=a38_0x4f18ce;if(_0x2efa47['length']===0x0)return;for(let _0x27c3c9=0x0;_0x27c3c9<LOCK_SETTLE_RETRY_COUNT;_0x27c3c9+=0x1){const _0x3ee043=await readBffLockFile(_0x12b758),_0x3a0e29=_0x3ee043?.[_0x163f27(0x1a6)]?.[_0x5207e5]?.[_0x163f27(0x17c)]??{},_0x196780=_0x2efa47[_0x163f27(0x175)](_0xe4ca5a=>!!_0x3a0e29[_0xe4ca5a]?.[_0x163f27(0x18a)]);if(_0x196780)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x163f27(0x1c4)+_0x2efa47[_0x163f27(0x181)](',\x20')+'.');}
1
+ const a37_0xf221a0=a37_0x5a1f;(function(_0x24fbe2,_0x3c956e){const _0x2329e6=a37_0x5a1f,_0x5670b5=_0x24fbe2();while(!![]){try{const _0x2d5b88=-parseInt(_0x2329e6(0x156))/0x1+-parseInt(_0x2329e6(0x189))/0x2+parseInt(_0x2329e6(0x17d))/0x3*(-parseInt(_0x2329e6(0x15e))/0x4)+parseInt(_0x2329e6(0x18c))/0x5+parseInt(_0x2329e6(0x16b))/0x6*(-parseInt(_0x2329e6(0x179))/0x7)+parseInt(_0x2329e6(0x173))/0x8*(parseInt(_0x2329e6(0x162))/0x9)+parseInt(_0x2329e6(0x15f))/0xa;if(_0x2d5b88===_0x3c956e)break;else _0x5670b5['push'](_0x5670b5['shift']());}catch(_0x8d1fac){_0x5670b5['push'](_0x5670b5['shift']());}}}(a37_0x20cf,0x31f7c));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';function a37_0x5a1f(_0x3fc42f,_0x5f5bf0){_0x3fc42f=_0x3fc42f-0x14e;const _0x20cf2a=a37_0x20cf();let _0x5a1f1c=_0x20cf2a[_0x3fc42f];return _0x5a1f1c;}import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a37_0x20cf(){const _0x56ce4f=['946392uCXuWq','/api/management/library/scripts/save','push','set','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','join','1246Kzwztz','Would\x20inspect\x20','POST','datasetCode','116070PdmMdF','Force\x20push\x20ignoring\x20hash\x20protection','utf8','alias','filePath','validation','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','name','remoteId','code','update','Lock\x20scope\x20for\x20app\x20\x22','157064QBOoFn','HOOK','scriptsRoot','590370otwSEh','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','datasetCodeToDataset','unchanged','script','type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','COMMON','map','aliasToDatasetCode','boolean','force','str','lastSync','cleared','\x20skipped,\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','version','functions','\x22.\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','appCode','status','attempted','ENDPOINT','get','has','308504sDFRHs','runtime\x20cache\x20not\x20needed','description','some','Incomplete\x20HOOK\x20path:\x20','string','length','runtime\x20cache\x20clear\x20failed','40kemKPP','9322280LIVTRn','lockFilePath','runtime\x20cache\x20cleared','18VntTVV','\x20uploaded,\x20','would_push','parse','hash','high-risk-write','apps','bool','lockKey','10392fbCroh','Push\x20only\x20this\x20script\x20type','Local\x20function\x20not\x20found:\x20','operationType','Push\x20complete:\x20','functionNode','Run\x20`','message'];a37_0x20cf=function(){return _0x56ce4f;};return a37_0x20cf();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0xf221a0(0x167),'flags':[{'name':a37_0xf221a0(0x191),'type':a37_0xf221a0(0x15b),'description':a37_0xf221a0(0x16c),'enum':[a37_0xf221a0(0x193),a37_0xf221a0(0x153),a37_0xf221a0(0x18a)]},{'name':a37_0xf221a0(0x184),'type':'string','description':a37_0xf221a0(0x177)},{'name':a37_0xf221a0(0x197),'type':a37_0xf221a0(0x196),'description':a37_0xf221a0(0x17e)}],async 'dryRun'(_0x1e167b){const _0x1aea88=a37_0xf221a0,_0x148b1c=loadBffProjectConfig(_0x1e167b[_0x1aea88(0x150)]),_0x3d373c=await readBffLockFile(_0x148b1c[_0x1aea88(0x160)]),{appLock:_0x676c36}=ensureLockScope(_0x3d373c??createEmptyBffLock(),_0x1e167b[_0x1aea88(0x150)],_0x148b1c['scriptsRoot'],'push'),_0xc2d75a=await getTargetFunctions(_0x148b1c,_0x1e167b),_0x117af2=_0x1e167b[_0x1aea88(0x169)](_0x1aea88(0x197)),_0x524d7a=[];for(const _0x422791 of _0xc2d75a){const _0x56aa20=await computeFileHash(_0x422791[_0x1aea88(0x181)]),_0x2a181e=_0x676c36[_0x1aea88(0x19e)][_0x422791[_0x1aea88(0x16a)]],_0x426edc=!!_0x2a181e&&_0x2a181e[_0x1aea88(0x166)]===_0x56aa20;_0x524d7a[_0x1aea88(0x175)]({'lockKey':_0x422791[_0x1aea88(0x16a)],'filePath':_0x422791[_0x1aea88(0x181)],'remoteId':_0x2a181e?.[_0x1aea88(0x185)]??null,'mode':_0x2a181e?.[_0x1aea88(0x185)]?_0x1aea88(0x187):'create','status':!_0x117af2&&_0x426edc?_0x1aea88(0x18f):'would_push'});}return{'method':_0x1aea88(0x17b),'url':_0x1aea88(0x174),'body':{'appCode':_0x1e167b['appCode'],'force':_0x117af2,'files':_0x524d7a,'cacheClearAtRuntime':_0x524d7a[_0x1aea88(0x159)](_0x3babf7=>_0x3babf7[_0x1aea88(0x151)]==='would_push'),'cacheClearAtRuntimeTimes':_0x524d7a[_0x1aea88(0x159)](_0xded662=>_0xded662[_0x1aea88(0x151)]===_0x1aea88(0x164))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1aea88(0x17a)+_0x524d7a['length']+_0x1aea88(0x183)};},async 'execute'(_0x56df83){const _0x491f35=a37_0xf221a0,_0x39e714=loadBffProjectConfig(_0x56df83[_0x491f35(0x150)]),_0x5ac51e=await readBffLockFile(_0x39e714[_0x491f35(0x160)]),{lockData:_0x1d2156,appLock:_0x492b91}=ensureLockScope(_0x5ac51e??createEmptyBffLock(),_0x56df83[_0x491f35(0x150)],_0x39e714[_0x491f35(0x18b)],_0x491f35(0x175)),_0x3acf66=await getTargetFunctions(_0x39e714,_0x56df83);if(_0x3acf66['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x2d9700=_0x56df83[_0x491f35(0x169)](_0x491f35(0x197)),_0xe2338f=JSON[_0x491f35(0x165)](JSON['stringify'](_0x1d2156)),_0x37f0b5=_0xe2338f['apps'][_0x56df83['appCode']];if(!_0x37f0b5)throw new Error(_0x491f35(0x188)+_0x56df83[_0x491f35(0x150)]+_0x491f35(0x14f));const _0x19a704=await buildHookMaps(_0x56df83[_0x491f35(0x150)],_0x56df83['apiDir'],_0x3acf66,_0x37f0b5),_0x5e5bc2=[],_0x50bc89=[],_0x20cab=[];for(const _0x22e742 of _0x3acf66){const _0x327d9c=await computeFileHash(_0x22e742['filePath']),_0x435dcf=_0x37f0b5['functions'][_0x22e742['lockKey']];if(!_0x2d9700&&_0x435dcf&&_0x435dcf[_0x491f35(0x166)]===_0x327d9c){_0x50bc89[_0x491f35(0x175)]({'lockKey':_0x22e742[_0x491f35(0x16a)],'reason':_0x491f35(0x18f)});continue;}try{await uploadSingleFunction(_0x56df83['appCode'],_0x22e742,_0x37f0b5,_0x19a704);const _0x22bbd6=_0x37f0b5[_0x491f35(0x19e)][_0x22e742[_0x491f35(0x16a)]];_0x5e5bc2[_0x491f35(0x175)]({'lockKey':_0x22e742[_0x491f35(0x16a)],'remoteId':_0x22bbd6?.['remoteId']??0x0});}catch(_0x217a4f){_0x20cab[_0x491f35(0x175)]({'lockKey':_0x22e742[_0x491f35(0x16a)],'error':_0x217a4f instanceof Error?_0x217a4f['message']:String(_0x217a4f)});}}_0x37f0b5[_0x491f35(0x199)]=new Date()['toISOString'](),await writeBffLockFile(_0x39e714[_0x491f35(0x160)],_0xe2338f),await waitForUploadedLockEntries(_0x39e714['lockFilePath'],_0x56df83['appCode'],_0x5e5bc2['map'](_0xcba0e2=>_0xcba0e2['lockKey']));let _0x4a55d4={'attempted':![],'cleared':![]};if(_0x5e5bc2[_0x491f35(0x15c)]>0x0)try{let _0x365b24='';for(let _0x32ec11=0x0;_0x32ec11<CACHE_CLEAR_ATTEMPTS;_0x32ec11+=0x1){_0x365b24=await clearBffScriptCache(),_0x32ec11<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4a55d4={'attempted':!![],'cleared':!![],'message':_0x365b24||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x13740d){_0x4a55d4={'attempted':!![],'cleared':![],'error':_0x13740d instanceof Error?_0x13740d[_0x491f35(0x172)]:String(_0x13740d)};}const _0x46e35e=_0x20cab[_0x491f35(0x15c)]===0x0&&(_0x4a55d4[_0x491f35(0x152)]?_0x4a55d4[_0x491f35(0x19a)]:!![]),_0x19eec1=_0x4a55d4[_0x491f35(0x152)]?_0x4a55d4[_0x491f35(0x19a)]?_0x491f35(0x161):_0x491f35(0x15d):_0x491f35(0x157);return{'ok':_0x46e35e,'data':{'uploaded':_0x5e5bc2,'skipped':_0x50bc89,'failed':_0x20cab,'cacheClear':_0x4a55d4},'message':_0x491f35(0x16f)+_0x5e5bc2['length']+_0x491f35(0x163)+_0x50bc89['length']+_0x491f35(0x19b)+_0x20cab['length']+'\x20failed,\x20'+_0x19eec1};}};async function getTargetFunctions(_0xd76640,_0x5a4cab){const _0x4c3708=a37_0xf221a0,_0x2e3cdb=_0x5a4cab[_0x4c3708(0x198)](_0x4c3708(0x191)),_0x310c66=_0x5a4cab[_0x4c3708(0x198)](_0x4c3708(0x184)),_0x274cba=normalizeBffType(_0x2e3cdb)??undefined;if(_0x310c66&&!_0x274cba)throw CliErrors[_0x4c3708(0x182)](_0x4c3708(0x192));const _0x4c8b1e=await scanLocalBffFunctions(_0xd76640,_0x274cba);if(_0x310c66){const _0x338e3f=_0x4c8b1e['filter'](_0x424118=>_0x424118[_0x4c3708(0x184)]===_0x310c66);if(_0x338e3f[_0x4c3708(0x15c)]===0x0)throw CliErrors[_0x4c3708(0x182)](_0x4c3708(0x16d)+_0x274cba+'/'+_0x310c66);return _0x338e3f;}return _0x4c8b1e;}async function buildHookMaps(_0x540600,_0x37af93,_0x1d4181,_0x5e39fd){const _0xbe3c7a=a37_0xf221a0,_0x577db8=_0x1d4181[_0xbe3c7a(0x159)](_0x28228b=>_0x28228b['type']===_0xbe3c7a(0x18a));if(!_0x577db8)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x35ac92=loadAliasMap(_0x37af93,undefined,resolveApiFilePath(_0x37af93,_0x540600)),_0x10184d=new Map(_0x35ac92[_0xbe3c7a(0x194)](_0x2ed0d4=>[_0x2ed0d4[_0xbe3c7a(0x180)],_0x2ed0d4[_0xbe3c7a(0x17c)]]));for(const _0x3c1007 of Object['values'](_0x5e39fd[_0xbe3c7a(0x19e)])){_0x3c1007[_0xbe3c7a(0x180)]&&_0x3c1007[_0xbe3c7a(0x17c)]&&!_0x10184d['has'](_0x3c1007[_0xbe3c7a(0x180)])&&_0x10184d[_0xbe3c7a(0x176)](_0x3c1007[_0xbe3c7a(0x180)],_0x3c1007[_0xbe3c7a(0x17c)]);}const _0x5a9d85=await listDatasets(_0x540600),_0x19cd46=new Map(_0x5a9d85[_0xbe3c7a(0x194)](_0x1d3fd3=>[_0x1d3fd3[_0xbe3c7a(0x186)],_0x1d3fd3]));return{'aliasToDatasetCode':_0x10184d,'datasetCodeToDataset':_0x19cd46};}async function uploadSingleFunction(_0x6c7f9d,_0x18a780,_0x2eade3,_0x57cdda){const _0xd1ca50=a37_0xf221a0,_0x51ba83=await readFile(_0x18a780['filePath'],_0xd1ca50(0x17f)),_0x2f0618=await computeFileHash(_0x18a780[_0xd1ca50(0x181)]),_0x491cc5=_0x2eade3[_0xd1ca50(0x19e)][_0x18a780['lockKey']];if(_0x491cc5?.['remoteId']&&_0x491cc5[_0xd1ca50(0x19d)]==null)throw CliErrors[_0xd1ca50(0x182)](_0x18a780['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0xd70a7c=extractScriptDescription(_0x51ba83);if(!_0xd70a7c&&_0x491cc5?.[_0xd1ca50(0x185)]){const _0x18e659=await getBffScriptInfo(_0x491cc5[_0xd1ca50(0x185)]);_0xd70a7c=_0x18e659[_0xd1ca50(0x158)]||undefined;}const _0x527b97={'appCode':_0x6c7f9d,'functionName':_0x18a780[_0xd1ca50(0x184)],'scriptType':_0x18a780[_0xd1ca50(0x191)],'scriptContent':_0x51ba83};if(_0x491cc5?.[_0xd1ca50(0x185)])_0x527b97['id']=_0x491cc5['remoteId'];if(_0x491cc5?.[_0xd1ca50(0x19d)]!=null)_0x527b97[_0xd1ca50(0x19d)]=_0x491cc5[_0xd1ca50(0x19d)];if(_0xd70a7c)_0x527b97[_0xd1ca50(0x158)]=_0xd70a7c;if(_0x18a780[_0xd1ca50(0x191)]===_0xd1ca50(0x18a)){const _0x335993=_0x18a780['alias'];if(!_0x335993||!_0x18a780[_0xd1ca50(0x16e)]||!_0x18a780[_0xd1ca50(0x170)])throw CliErrors[_0xd1ca50(0x182)](_0xd1ca50(0x15a)+_0x18a780[_0xd1ca50(0x16a)]);const _0x1cb5d1=_0x57cdda[_0xd1ca50(0x195)]['get'](_0x335993)??_0x491cc5?.[_0xd1ca50(0x17c)]??_0x335993,_0x5ce58e=_0x57cdda[_0xd1ca50(0x18e)][_0xd1ca50(0x154)](_0x1cb5d1);if(!_0x5ce58e)throw CliErrors[_0xd1ca50(0x182)](_0xd1ca50(0x19c)+_0x335993+_0xd1ca50(0x14e)+(_0xd1ca50(0x171)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x527b97['datasetId']=_0x5ce58e['id'],_0x527b97['operationType']=_0x18a780['operationType'],_0x527b97[_0xd1ca50(0x170)]=_0x18a780[_0xd1ca50(0x170)];}const _0x449c38=await saveBffScript(_0x527b97),_0x2aede6=_0x449c38['id'],_0x3594d7=_0x449c38[_0xd1ca50(0x190)]??await getBffScriptInfo(_0x2aede6),_0x542fee={'hash':_0x2f0618,'remoteId':_0x2aede6,'version':_0x3594d7['version']};if(_0x18a780[_0xd1ca50(0x191)]===_0xd1ca50(0x18a)){const _0x250a02=_0x18a780[_0xd1ca50(0x180)],_0x2c44d4=_0x57cdda[_0xd1ca50(0x195)][_0xd1ca50(0x154)](_0x250a02)??_0x491cc5?.['datasetCode']??_0x250a02;_0x57cdda[_0xd1ca50(0x195)][_0xd1ca50(0x155)](_0x250a02)?_0x542fee[_0xd1ca50(0x180)]=_0x250a02:_0x542fee['alias']=_0x491cc5?.[_0xd1ca50(0x180)],_0x542fee[_0xd1ca50(0x17c)]=_0x2c44d4,_0x542fee['operationType']=_0x18a780[_0xd1ca50(0x16e)],_0x542fee[_0xd1ca50(0x170)]=_0x18a780[_0xd1ca50(0x170)];}_0x2eade3[_0xd1ca50(0x19e)][_0x18a780[_0xd1ca50(0x16a)]]=_0x542fee;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x42c2ae,_0x3d7b43,_0x54e917){const _0x2c5039=a37_0xf221a0;if(_0x54e917[_0x2c5039(0x15c)]===0x0)return;for(let _0x20d7d0=0x0;_0x20d7d0<LOCK_SETTLE_RETRY_COUNT;_0x20d7d0+=0x1){const _0x28d7b4=await readBffLockFile(_0x42c2ae),_0x143e79=_0x28d7b4?.[_0x2c5039(0x168)]?.[_0x3d7b43]?.[_0x2c5039(0x19e)]??{},_0x96afab=_0x54e917['every'](_0x59017f=>!!_0x143e79[_0x59017f]?.[_0x2c5039(0x185)]);if(_0x96afab)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2c5039(0x18d)+_0x54e917[_0x2c5039(0x178)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a39_0x4979d1=a39_0x2cdc;(function(_0x2f2acf,_0x40c551){const _0x4e3996=a39_0x2cdc,_0xcb9611=_0x2f2acf();while(!![]){try{const _0x25376d=parseInt(_0x4e3996(0xe2))/0x1+-parseInt(_0x4e3996(0xf5))/0x2*(parseInt(_0x4e3996(0xef))/0x3)+-parseInt(_0x4e3996(0xd9))/0x4+parseInt(_0x4e3996(0xeb))/0x5+parseInt(_0x4e3996(0xf8))/0x6*(parseInt(_0x4e3996(0xda))/0x7)+parseInt(_0x4e3996(0xf9))/0x8+-parseInt(_0x4e3996(0xf1))/0x9*(parseInt(_0x4e3996(0xe8))/0xa);if(_0x25376d===_0x40c551)break;else _0xcb9611['push'](_0xcb9611['shift']());}catch(_0x188816){_0xcb9611['push'](_0xcb9611['shift']());}}}(a39_0x5800,0x7762a));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a39_0x2cdc(_0x2f091c,_0x50cbbf){_0x2f091c=_0x2f091c-0xd9;const _0x5800a2=a39_0x5800();let _0x2cdcc6=_0x5800a2[_0x2f091c];return _0x2cdcc6;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a39_0x5800(){const _0x5be589=['3602190uOKyeS','functions','apiDir','alias','1073001vNDSqu','lockKey','4419KzzJiP','lockFilePath','read','status','2gjYwxz','push','\x20unchanged','15864NJSEwp','1987168gcifMF','880812bLUpyw','539krFxPu','All\x20BFF\x20scripts\x20are\x20in\x20sync.','filePath','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','bff','hash','map','appCode','365319lUlnoG','length','datasetCode','remote','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','boolean','9590tIVdyP','\x20remote-only','\x20modified,\x20'];a39_0x5800=function(){return _0x5be589;};return a39_0x5800();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a39_0x4979d1(0xde),'command':a39_0x4979d1(0xf4),'description':a39_0x4979d1(0xdd),'risk':a39_0x4979d1(0xf3),'flags':[{'name':a39_0x4979d1(0xe5),'type':a39_0x4979d1(0xe7),'description':a39_0x4979d1(0xe6)}],async 'execute'(_0x56abcd){const _0xbea00f=a39_0x4979d1,_0xc6bcb1=loadBffProjectConfig(_0x56abcd[_0xbea00f(0xe1)]),_0x504a11=await readBffLockFile(_0xc6bcb1[_0xbea00f(0xf2)]),{appLock:_0x9c4ba3}=ensureLockScope(_0x504a11??createEmptyBffLock(),_0x56abcd[_0xbea00f(0xe1)],_0xc6bcb1['scriptsRoot'],'status'),_0x1627e8=await scanLocalBffFunctions(_0xc6bcb1),_0x5904b1=[],_0x51f1e7=[],_0x3bdf48=[];for(const _0x4f1b4e of _0x1627e8){const _0x37516e=await computeFileHash(_0x4f1b4e[_0xbea00f(0xdc)]),_0x58e73b=_0x9c4ba3[_0xbea00f(0xec)][_0x4f1b4e['lockKey']];if(!_0x58e73b)_0x5904b1[_0xbea00f(0xf6)](_0x4f1b4e[_0xbea00f(0xf0)]);else _0x58e73b[_0xbea00f(0xdf)]!==_0x37516e?_0x51f1e7[_0xbea00f(0xf6)](_0x4f1b4e[_0xbea00f(0xf0)]):_0x3bdf48[_0xbea00f(0xf6)](_0x4f1b4e[_0xbea00f(0xf0)]);}const _0x128446=[];if(_0x56abcd['bool']('remote')){const _0x1f5185=loadAliasMap(_0x56abcd[_0xbea00f(0xed)],undefined,resolveApiFilePath(_0x56abcd[_0xbea00f(0xed)],_0x56abcd['appCode'])),_0x1870a7=new Map(_0x1f5185['map'](_0x209315=>[_0x209315[_0xbea00f(0xe4)],_0x209315[_0xbea00f(0xee)]])),[_0x5b5803,_0x49d24d]=await Promise['all']([listBffScripts(_0x56abcd[_0xbea00f(0xe1)]),getBffScriptStatistics(_0x56abcd[_0xbea00f(0xe1)])]),_0x48c2e9=createHookLocationMap(_0x49d24d),_0x6940c1=new Set(_0x1627e8[_0xbea00f(0xe0)](_0x375713=>_0x375713['lockKey']));for(const _0x534c39 of _0x5b5803){const _0x3b0368=resolveRemoteScriptTarget(_0xc6bcb1,_0x534c39,_0x48c2e9,_0x9c4ba3[_0xbea00f(0xec)],_0x1870a7);_0x3b0368&&!_0x6940c1['has'](_0x3b0368['lockKey'])&&_0x128446[_0xbea00f(0xf6)](_0x3b0368[_0xbea00f(0xf0)]);}}const _0x57b414=_0x5904b1[_0xbea00f(0xe3)]===0x0&&_0x51f1e7[_0xbea00f(0xe3)]===0x0&&_0x128446[_0xbea00f(0xe3)]===0x0;return{'ok':!![],'data':{'added':_0x5904b1,'modified':_0x51f1e7,'unchanged':_0x3bdf48,'remoteOnly':_0x128446},'message':_0x57b414?_0xbea00f(0xdb):_0x5904b1[_0xbea00f(0xe3)]+'\x20added,\x20'+_0x51f1e7[_0xbea00f(0xe3)]+_0xbea00f(0xea)+_0x3bdf48[_0xbea00f(0xe3)]+_0xbea00f(0xf7)+(_0x128446['length']>0x0?',\x20'+_0x128446[_0xbea00f(0xe3)]+_0xbea00f(0xe9):'')};}};
1
+ const a38_0x3bfe09=a38_0x58a5;(function(_0x3d4b73,_0x38da16){const _0x538c2f=a38_0x58a5,_0x1476fb=_0x3d4b73();while(!![]){try{const _0x41fd31=parseInt(_0x538c2f(0x101))/0x1+-parseInt(_0x538c2f(0xfb))/0x2+parseInt(_0x538c2f(0x113))/0x3*(parseInt(_0x538c2f(0x10d))/0x4)+parseInt(_0x538c2f(0x105))/0x5+parseInt(_0x538c2f(0x107))/0x6*(-parseInt(_0x538c2f(0xf9))/0x7)+-parseInt(_0x538c2f(0x104))/0x8+parseInt(_0x538c2f(0x10b))/0x9;if(_0x41fd31===_0x38da16)break;else _0x1476fb['push'](_0x1476fb['shift']());}catch(_0x4e6c43){_0x1476fb['push'](_0x1476fb['shift']());}}}(a38_0x4aba,0x701a5));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';function a38_0x58a5(_0x112beb,_0x4c15b4){_0x112beb=_0x112beb-0xf7;const _0x4aba18=a38_0x4aba();let _0x58a5a8=_0x4aba18[_0x112beb];return _0x58a5a8;}function a38_0x4aba(){const _0x24a3e6=['apiDir','read','functions','11244789WEGIwG','datasetCode','95248lYtMoO','lockFilePath','hash','status','bff','bool','3SViShL','\x20remote-only','length','all','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20modified,\x20','2401cvWvAc','push','1554864gVGbcW','remote','appCode','has','boolean','map','678501nUqbuE','filePath','alias','4610688bPjLJq','878690qDDpHR','lockKey','5502SfDOSO'];a38_0x4aba=function(){return _0x24a3e6;};return a38_0x4aba();}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':a38_0x3bfe09(0x111),'command':a38_0x3bfe09(0x110),'description':a38_0x3bfe09(0xf7),'risk':a38_0x3bfe09(0x109),'flags':[{'name':a38_0x3bfe09(0xfc),'type':a38_0x3bfe09(0xff),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x4da08b){const _0x80b1e6=a38_0x3bfe09,_0x5ef20b=loadBffProjectConfig(_0x4da08b['appCode']),_0x385679=await readBffLockFile(_0x5ef20b[_0x80b1e6(0x10e)]),{appLock:_0x580cbb}=ensureLockScope(_0x385679??createEmptyBffLock(),_0x4da08b['appCode'],_0x5ef20b['scriptsRoot'],_0x80b1e6(0x110)),_0x55ff62=await scanLocalBffFunctions(_0x5ef20b),_0x23258e=[],_0x9f9d98=[],_0x3b0fc7=[];for(const _0x50e8c9 of _0x55ff62){const _0x4c8b03=await computeFileHash(_0x50e8c9[_0x80b1e6(0x102)]),_0x43980e=_0x580cbb['functions'][_0x50e8c9[_0x80b1e6(0x106)]];if(!_0x43980e)_0x23258e['push'](_0x50e8c9[_0x80b1e6(0x106)]);else _0x43980e[_0x80b1e6(0x10f)]!==_0x4c8b03?_0x9f9d98['push'](_0x50e8c9['lockKey']):_0x3b0fc7[_0x80b1e6(0xfa)](_0x50e8c9[_0x80b1e6(0x106)]);}const _0x4830f2=[];if(_0x4da08b[_0x80b1e6(0x112)](_0x80b1e6(0xfc))){const _0x40c76a=loadAliasMap(_0x4da08b['apiDir'],undefined,resolveApiFilePath(_0x4da08b[_0x80b1e6(0x108)],_0x4da08b['appCode'])),_0x367939=new Map(_0x40c76a[_0x80b1e6(0x100)](_0x449785=>[_0x449785[_0x80b1e6(0x10c)],_0x449785[_0x80b1e6(0x103)]])),[_0xc47395,_0x4c5264]=await Promise[_0x80b1e6(0x116)]([listBffScripts(_0x4da08b[_0x80b1e6(0xfd)]),getBffScriptStatistics(_0x4da08b[_0x80b1e6(0xfd)])]),_0x58a017=createHookLocationMap(_0x4c5264),_0x3ef1eb=new Set(_0x55ff62[_0x80b1e6(0x100)](_0x523df5=>_0x523df5[_0x80b1e6(0x106)]));for(const _0x4ab57f of _0xc47395){const _0x3b9b46=resolveRemoteScriptTarget(_0x5ef20b,_0x4ab57f,_0x58a017,_0x580cbb[_0x80b1e6(0x10a)],_0x367939);_0x3b9b46&&!_0x3ef1eb[_0x80b1e6(0xfe)](_0x3b9b46[_0x80b1e6(0x106)])&&_0x4830f2[_0x80b1e6(0xfa)](_0x3b9b46['lockKey']);}}const _0x24c0c9=_0x23258e[_0x80b1e6(0x115)]===0x0&&_0x9f9d98[_0x80b1e6(0x115)]===0x0&&_0x4830f2[_0x80b1e6(0x115)]===0x0;return{'ok':!![],'data':{'added':_0x23258e,'modified':_0x9f9d98,'unchanged':_0x3b0fc7,'remoteOnly':_0x4830f2},'message':_0x24c0c9?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x23258e[_0x80b1e6(0x115)]+'\x20added,\x20'+_0x9f9d98['length']+_0x80b1e6(0xf8)+_0x3b0fc7[_0x80b1e6(0x115)]+'\x20unchanged'+(_0x4830f2[_0x80b1e6(0x115)]>0x0?',\x20'+_0x4830f2[_0x80b1e6(0x115)]+_0x80b1e6(0x114):'')};}};
@@ -1 +1 @@
1
- const a40_0x428b0a=a40_0x2035;(function(_0x5c86bf,_0x21a83b){const _0x5ae807=a40_0x2035,_0x7444e=_0x5c86bf();while(!![]){try{const _0x351d73=parseInt(_0x5ae807(0x1d3))/0x1+parseInt(_0x5ae807(0x1c4))/0x2*(parseInt(_0x5ae807(0x1c5))/0x3)+parseInt(_0x5ae807(0x1cd))/0x4+-parseInt(_0x5ae807(0x1d9))/0x5+parseInt(_0x5ae807(0x1cb))/0x6+parseInt(_0x5ae807(0x1d7))/0x7*(parseInt(_0x5ae807(0x1d8))/0x8)+-parseInt(_0x5ae807(0x1d5))/0x9*(parseInt(_0x5ae807(0x1d4))/0xa);if(_0x351d73===_0x21a83b)break;else _0x7444e['push'](_0x7444e['shift']());}catch(_0x5274ac){_0x7444e['push'](_0x7444e['shift']());}}}(a40_0xdf90,0x70a02));function a40_0xdf90(){const _0x3140fe=['error','2754144IipCnx','skipped','../../skills/npx-skills-add.js','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','npx\x20skills\x20add\x20failed:\x20','log','276377XzNdeO','17620310dQewQY','9UoJTLG','apiError','182tcIGYJ','46808yhNoyE','103805STzxgU','cwd','write','6RQhAcz','781653xybRJq',')...','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','inherit','install','cli-skill-install','2072484vimOqN'];a40_0xdf90=function(){return _0x3140fe;};return a40_0xdf90();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a40_0x2035(_0x18349b,_0x499598){_0x18349b=_0x18349b-0x1c3;const _0xdf9040=a40_0xdf90();let _0x203514=_0xdf9040[_0x18349b];return _0x203514;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a40_0x428b0a(0x1c9),'description':a40_0x428b0a(0x1d0),'risk':a40_0x428b0a(0x1c3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x463953){const _0x394bb8=a40_0x428b0a;logger['setLogPath'](process[_0x394bb8(0x1da)]()),logger['info'](_0x394bb8(0x1ca),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x5e3021,RABETBASE_SKILL_SOURCE:_0x58afe7,runNpxSkillsAddGlobal:_0x4550cf}=await import(_0x394bb8(0x1cf)),_0x4ab482=_0x463953['nonInteractive']?'pipe':_0x394bb8(0x1c8);console[_0x394bb8(0x1d2)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x5e3021+_0x394bb8(0x1c6));const _0x423046=_0x4550cf(process['cwd'](),_0x58afe7,{'stdio':_0x4ab482});if(_0x423046[_0x394bb8(0x1ce)])console['log']('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x423046['ok'])console[_0x394bb8(0x1d2)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x394bb8(0x1d6)](_0x394bb8(0x1d1)+(_0x423046[_0x394bb8(0x1cc)]||'unknown'),_0x394bb8(0x1c7)+_0x5e3021);}return{'ok':!![]};}}];
1
+ function a39_0x519b(_0x259fb4,_0x543f94){_0x259fb4=_0x259fb4-0x121;const _0x3a534e=a39_0x3a53();let _0x519b18=_0x3a534e[_0x259fb4];return _0x519b18;}const a39_0x169543=a39_0x519b;function a39_0x3a53(){const _0x3e60da=['pipe','install','2704220vVfSKo','3412360PYahUA','cwd','cli-skill','info','232116CcFUey','4ncFsQl','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','../../skills/npx-skills-add.js','skipped','38DzqFre','3870642fUxIDV','CLI\x20Built-in\x20Skill\x20installed','log','2262400bTwzwc','10303qTLTFp','cli-skill-install','nonInteractive','apiError','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(',')...','error','160UlQCKp','write','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','289674CnLgvS'];a39_0x3a53=function(){return _0x3e60da;};return a39_0x3a53();}(function(_0x1425d7,_0x3f6897){const _0x2545cf=a39_0x519b,_0x1e01e7=_0x1425d7();while(!![]){try{const _0x42d1cb=-parseInt(_0x2545cf(0x133))/0x1*(-parseInt(_0x2545cf(0x12e))/0x2)+-parseInt(_0x2545cf(0x128))/0x3*(-parseInt(_0x2545cf(0x129))/0x4)+-parseInt(_0x2545cf(0x132))/0x5+parseInt(_0x2545cf(0x12f))/0x6+-parseInt(_0x2545cf(0x124))/0x7+-parseInt(_0x2545cf(0x13b))/0x8*(-parseInt(_0x2545cf(0x13e))/0x9)+-parseInt(_0x2545cf(0x123))/0xa;if(_0x42d1cb===_0x3f6897)break;else _0x1e01e7['push'](_0x1e01e7['shift']());}catch(_0x53dfa3){_0x1e01e7['push'](_0x1e01e7['shift']());}}}(a39_0x3a53,0x55d56));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x169543(0x126),'command':a39_0x169543(0x122),'description':a39_0x169543(0x13d),'risk':a39_0x169543(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x534e4f){const _0x4142cc=a39_0x169543;logger['setLogPath'](process['cwd']()),logger[_0x4142cc(0x127)](_0x4142cc(0x134),_0x4142cc(0x12a));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x21c0c9,RABETBASE_SKILL_SOURCE:_0x13af67,runNpxSkillsAddGlobal:_0x27b955}=await import(_0x4142cc(0x12c)),_0x205d66=_0x534e4f[_0x4142cc(0x135)]?_0x4142cc(0x121):'inherit';console['log'](_0x4142cc(0x138)+_0x21c0c9+_0x4142cc(0x139));const _0x23914b=_0x27b955(process[_0x4142cc(0x125)](),_0x13af67,{'stdio':_0x205d66});if(_0x23914b[_0x4142cc(0x12d)])console[_0x4142cc(0x131)](_0x4142cc(0x137));else{if(_0x23914b['ok'])console[_0x4142cc(0x131)](_0x4142cc(0x130));else throw CliErrors[_0x4142cc(0x136)](_0x4142cc(0x12b)+(_0x23914b[_0x4142cc(0x13a)]||'unknown'),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x21c0c9);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a41_0x8cd2c8=a41_0x3d88;function a41_0x3d88(_0xfb3f12,_0x3ad815){_0xfb3f12=_0xfb3f12-0x1dc;const _0x4c1b22=a41_0x4c1b();let _0x3d88b7=_0x4c1b22[_0xfb3f12];return _0x3d88b7;}(function(_0x415829,_0x53ae1d){const _0x348697=a41_0x3d88,_0x270e54=_0x415829();while(!![]){try{const _0x2f6eff=-parseInt(_0x348697(0x1ed))/0x1+parseInt(_0x348697(0x21e))/0x2*(-parseInt(_0x348697(0x1f9))/0x3)+-parseInt(_0x348697(0x1fe))/0x4*(parseInt(_0x348697(0x203))/0x5)+parseInt(_0x348697(0x209))/0x6+-parseInt(_0x348697(0x215))/0x7*(parseInt(_0x348697(0x206))/0x8)+-parseInt(_0x348697(0x217))/0x9+-parseInt(_0x348697(0x1f0))/0xa*(-parseInt(_0x348697(0x21c))/0xb);if(_0x2f6eff===_0x53ae1d)break;else _0x270e54['push'](_0x270e54['shift']());}catch(_0x327dfb){_0x270e54['push'](_0x270e54['shift']());}}}(a41_0x4c1b,0x5d6ed));import a41_0x386294 from'chalk';import a41_0x34f208 from'ora';import a41_0x199e1b from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x447b44=a41_0x3d88;return GIT_COMMIT!==_0x447b44(0x21d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x447b44(0x221)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x200b99=a41_0x3d88,_0x376490=process[_0x200b99(0x20c)][_0x200b99(0x228)]();if(_0x376490[_0x200b99(0x1e2)](_0x200b99(0x1eb)))return _0x200b99(0x1eb);return _0x200b99(0x1fc);}function a41_0x4c1b(){const _0xeb6254=['1231890sfAlyE','...','Invalid\x20version:\x20','437064IGTcFA','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','3937824RFNhHm','pipe','Updated\x20to\x20v','execPath','flag','Requested\x20version:\x20','map','run','green','skills','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','91rsKzua','source','4583772szjZnB','bool','log','error','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','5528875AmWqHW','unknown','32GTaypN','timeout','version','slice','yellow','valid','trim','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','beta','Current\x20version:\x20','toLowerCase','gray','\x20\x20Run\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Checking\x20for\x20updates...','fromEntries','filter','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','latest','includes','start','Update\x20failed','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20install\x20-g\x20','info','nonInteractive','Update\x20available:\x20','fail','bun','https://registry.npmjs.org/-/package/','128379ljyQIv','Install\x20a\x20specific\x20CLI\x20version','Already\x20up\x20to\x20date\x20(v','30rQRMeL','message','validation','Version\x20comparison\x20failed','no-skills','object','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','warn','write','35097hzvgoO','inherit','boolean','npm','succeed','4WkglFb','\x20→\x20','Beta\x20version:\x20','red','length'];a41_0x4c1b=function(){return _0xeb6254;};return a41_0x4c1b();}const updateFlags=[{'name':'beta','type':'boolean','description':a41_0x8cd2c8(0x207),'default':![]},{'name':a41_0x8cd2c8(0x220),'type':'string','description':a41_0x8cd2c8(0x1ee)},{'name':'no-skills','type':a41_0x8cd2c8(0x1fb),'description':a41_0x8cd2c8(0x208),'default':![]},{'name':a41_0x8cd2c8(0x212),'type':a41_0x8cd2c8(0x1fb),'description':a41_0x8cd2c8(0x21b),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x86ccf0){const _0x11dfba=a41_0x8cd2c8;return _0x86ccf0['str'](_0x11dfba(0x220))['trim']();}function shouldSkipCliSkill(_0x238935){const _0xbb723c=a41_0x8cd2c8;return _0x238935[_0xbb723c(0x218)](_0xbb723c(0x1f4))||_0x238935[_0xbb723c(0x20d)](_0xbb723c(0x212))===![];}async function validateUpdateFlags(_0x5ac7a9){const _0x30c8c0=a41_0x8cd2c8,_0x51d6db=_0x5ac7a9[_0x30c8c0(0x218)](_0x30c8c0(0x226)),_0x357e18=getRequestedVersion(_0x5ac7a9);if(_0x51d6db&&_0x357e18)throw CliErrors[_0x30c8c0(0x1f2)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x30c8c0(0x1e5));if(_0x357e18&&!a41_0x199e1b[_0x30c8c0(0x223)](_0x357e18))throw CliErrors['validation'](_0x30c8c0(0x205)+_0x357e18,_0x30c8c0(0x1e0));}async function fetchNpmDistTags(){const _0x276319=a41_0x8cd2c8;try{const _0x44d617=await fetch(_0x276319(0x1ec)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x276319(0x21f)](0x2710)});if(!_0x44d617['ok'])return null;const _0xe6d134=await _0x44d617['json']();if(!_0xe6d134||typeof _0xe6d134!==_0x276319(0x1f5))return null;return Object[_0x276319(0x1de)](Object['entries'](_0xe6d134)[_0x276319(0x1df)](([,_0x3dc7a0])=>typeof _0x3dc7a0==='string'&&_0x3dc7a0[_0x276319(0x224)]()[_0x276319(0x202)]>0x0)[_0x276319(0x20f)](([_0x50c66a,_0x2a86e9])=>[_0x50c66a,String(_0x2a86e9)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x18b28a){const _0x3376f6=await fetchNpmDistTags();return _0x3376f6?.[_0x18b28a]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x8749b9){const _0x117f2f=a41_0x8cd2c8,_0x6e09dd=getRequestedVersion(_0x8749b9);if(_0x6e09dd)return{'version':_0x6e09dd,'source':_0x117f2f(0x220)};if(_0x8749b9[_0x117f2f(0x218)](_0x117f2f(0x226))){const _0x174bed=await fetchNpmDistTagVersion(_0x117f2f(0x226));if(!_0x174bed)return null;return{'version':_0x174bed,'source':_0x117f2f(0x226)};}const _0x2899b4=await fetchLatestVersion();if(!_0x2899b4)return null;return{'version':_0x2899b4,'source':_0x117f2f(0x1e1)};}function shouldInstallTarget(_0x4a33e6,_0x338bec){const _0x2dcea4=a41_0x8cd2c8;if(_0x338bec['source']===_0x2dcea4(0x220)||_0x338bec[_0x2dcea4(0x216)]===_0x2dcea4(0x226))return!a41_0x199e1b['eq'](_0x4a33e6,_0x338bec[_0x2dcea4(0x220)]);return a41_0x199e1b['lt'](_0x4a33e6,_0x338bec[_0x2dcea4(0x220)]);}function getInstallPlanLabel(_0x3f7f11,_0x112d08){const _0x3dd057=a41_0x8cd2c8;switch(_0x112d08[_0x3dd057(0x216)]){case _0x3dd057(0x226):return _0x3dd057(0x200)+a41_0x386294[_0x3dd057(0x222)](_0x3f7f11)+_0x3dd057(0x1ff)+a41_0x386294[_0x3dd057(0x211)](_0x112d08[_0x3dd057(0x220)]);case'version':return _0x3dd057(0x20e)+a41_0x386294[_0x3dd057(0x222)](_0x3f7f11)+_0x3dd057(0x1ff)+a41_0x386294[_0x3dd057(0x211)](_0x112d08['version']);case _0x3dd057(0x1e1):default:return _0x3dd057(0x1e9)+a41_0x386294[_0x3dd057(0x222)](_0x3f7f11)+_0x3dd057(0x1ff)+a41_0x386294[_0x3dd057(0x211)](_0x112d08[_0x3dd057(0x220)]);}}async function installCliSkill(_0x9068ec){const _0x34d4c0=a41_0x8cd2c8;console[_0x34d4c0(0x219)](a41_0x386294[_0x34d4c0(0x229)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x4f4838=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x9068ec?_0x34d4c0(0x20a):_0x34d4c0(0x1fa)});if(_0x4f4838['skipped']){console[_0x34d4c0(0x219)](a41_0x386294[_0x34d4c0(0x229)](_0x34d4c0(0x225)));return;}if(_0x4f4838['ok']){console[_0x34d4c0(0x219)](a41_0x386294[_0x34d4c0(0x229)](_0x34d4c0(0x1f6)));return;}console[_0x34d4c0(0x1f7)](a41_0x386294[_0x34d4c0(0x222)](_0x34d4c0(0x213)+(_0x4f4838[_0x34d4c0(0x21a)]||'unknown'))),console['log'](a41_0x386294[_0x34d4c0(0x229)](_0x34d4c0(0x22a)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x3ff1b6){const _0x55ae0d=a41_0x8cd2c8;await validateUpdateFlags(_0x3ff1b6);const _0x23c1d9=getCurrentVersion();console['log'](_0x55ae0d(0x227)+_0x23c1d9);const _0x162080=a41_0x34f208(_0x55ae0d(0x1dd))[_0x55ae0d(0x1e3)](),_0x408328=await resolveTargetVersion(_0x3ff1b6);if(!_0x408328){const _0x1f922e=_0x3ff1b6[_0x55ae0d(0x218)](_0x55ae0d(0x226))?_0x55ae0d(0x214):_0x55ae0d(0x1dc);return _0x162080['fail'](_0x1f922e),console[_0x55ae0d(0x219)](a41_0x386294[_0x55ae0d(0x229)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1f922e};}const _0x26fb44=a41_0x199e1b[_0x55ae0d(0x223)](VERSION),_0x125cee=a41_0x199e1b[_0x55ae0d(0x223)](_0x408328[_0x55ae0d(0x220)]);if(!_0x26fb44||!_0x125cee)return _0x162080[_0x55ae0d(0x1ea)](_0x55ae0d(0x1f3)),{'ok':![],'message':_0x55ae0d(0x1f3)};if(!shouldInstallTarget(_0x26fb44,_0x408328)){const _0x26ab32=_0x408328[_0x55ae0d(0x216)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x408328['version']+')':_0x55ae0d(0x1ef)+_0x408328[_0x55ae0d(0x220)]+')';return _0x162080[_0x55ae0d(0x1fd)](_0x26ab32),shouldSkipCliSkill(_0x3ff1b6)?console[_0x55ae0d(0x219)](a41_0x386294['gray']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x3ff1b6[_0x55ae0d(0x1e8)]),{'ok':!![]};}_0x162080[_0x55ae0d(0x1e7)](getInstallPlanLabel(_0x23c1d9,_0x408328));const _0xb5a0d1=detectPackageManager(),_0xd902f=_0xb5a0d1==='npm'?resolveNpmBin(_0x55ae0d(0x1fc)):_0xb5a0d1,_0x37d1c9=a41_0x34f208('Updating\x20via\x20'+_0xb5a0d1+_0x55ae0d(0x204))['start']();try{return await execa(_0xd902f,['install','-g',NPM_PACKAGE_NAME+'@'+_0x408328[_0x55ae0d(0x220)]],{'stdio':_0x55ae0d(0x20a)}),_0x37d1c9['succeed'](_0x55ae0d(0x20b)+_0x408328[_0x55ae0d(0x220)]),console['log'](a41_0x386294[_0x55ae0d(0x229)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x3ff1b6)?console[_0x55ae0d(0x219)](a41_0x386294[_0x55ae0d(0x229)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x3ff1b6['nonInteractive']),{'ok':!![]};}catch(_0x3c1352){return _0x37d1c9[_0x55ae0d(0x1ea)](_0x55ae0d(0x1e4)),console[_0x55ae0d(0x21a)](a41_0x386294[_0x55ae0d(0x201)]('\x20\x20'+_0x3c1352[_0x55ae0d(0x1f1)])),console[_0x55ae0d(0x219)](a41_0x386294[_0x55ae0d(0x229)]('\x20\x20Try\x20manually:\x20'+_0xb5a0d1+_0x55ae0d(0x1e6)+NPM_PACKAGE_NAME+'@'+_0x408328['version'])),{'ok':![],'message':_0x3c1352[_0x55ae0d(0x1f1)]};}}export const updateDefinition={'service':'update','command':a41_0x8cd2c8(0x210),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a41_0x8cd2c8(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ function a40_0x15df(_0x118017,_0x25ffea){_0x118017=_0x118017-0x19f;const _0x22b2a5=a40_0x22b2();let _0x15df72=_0x22b2a5[_0x118017];return _0x15df72;}const a40_0x5c1ef4=a40_0x15df;(function(_0x5c6305,_0x52e99c){const _0x1200ba=a40_0x15df,_0x18e9b9=_0x5c6305();while(!![]){try{const _0x131bd5=parseInt(_0x1200ba(0x1e6))/0x1*(-parseInt(_0x1200ba(0x1da))/0x2)+-parseInt(_0x1200ba(0x1b4))/0x3+parseInt(_0x1200ba(0x1d2))/0x4+parseInt(_0x1200ba(0x1c8))/0x5+parseInt(_0x1200ba(0x1b6))/0x6*(parseInt(_0x1200ba(0x1ce))/0x7)+-parseInt(_0x1200ba(0x1cf))/0x8+-parseInt(_0x1200ba(0x1b0))/0x9*(-parseInt(_0x1200ba(0x1a4))/0xa);if(_0x131bd5===_0x52e99c)break;else _0x18e9b9['push'](_0x18e9b9['shift']());}catch(_0x129c55){_0x18e9b9['push'](_0x18e9b9['shift']());}}}(a40_0x22b2,0x8b905));import a40_0x418b0e from'chalk';import a40_0xd70087 from'ora';import a40_0x302333 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4e58ca=a40_0x15df;return GIT_COMMIT!==_0x4e58ca(0x1b7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4e58ca(0x1a1)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2c7960=a40_0x15df,_0x21c07b=process[_0x2c7960(0x1c5)][_0x2c7960(0x1bd)]();if(_0x21c07b['includes'](_0x2c7960(0x1de)))return'bun';return _0x2c7960(0x1d3);}const updateFlags=[{'name':a40_0x5c1ef4(0x1dd),'type':a40_0x5c1ef4(0x1dc),'description':a40_0x5c1ef4(0x1ac),'default':![]},{'name':'version','type':'string','description':a40_0x5c1ef4(0x1bc)},{'name':'no-skills','type':'boolean','description':a40_0x5c1ef4(0x1be),'default':![]},{'name':a40_0x5c1ef4(0x1c9),'type':a40_0x5c1ef4(0x1dc),'description':a40_0x5c1ef4(0x1e7),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x50039b){const _0x29bd92=a40_0x5c1ef4;return _0x50039b[_0x29bd92(0x1e8)](_0x29bd92(0x1ab))[_0x29bd92(0x1c7)]();}function a40_0x22b2(){const _0x1ff032=['\x20install\x20-g\x20','9350jcRrjj','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','boolean','beta','bun','source','red','yellow','Already\x20on\x20requested\x20version\x20(v','Update\x20available:\x20','length','pipe','225CmOZva','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','str','object','Requested\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','fromEntries','warn','\x20→\x20','@latest','timeout','slice','nonInteractive','start','50NGlrND','\x20cli-skill\x20install','log','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','latest','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','entries','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','install','info','2628486ZBMHEH','Update\x20failed','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','2064171gjlgtT','Current\x20version:\x20','156042MgeTjQ','unknown','Version\x20comparison\x20failed','...','Invalid\x20version:\x20','Updated\x20to\x20v','Install\x20a\x20specific\x20CLI\x20version','toLowerCase','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','gray','bool','flag','Updating\x20via\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','/dist-tags','execPath','fail','trim','4923495pEynrM','skills','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','string','map','231KadTxf','8441256cjEIKa','run','skipped','254168HRXVzY','npm','\x20\x20Try\x20manually:\x20','green','\x20\x20Run\x20manually:\x20','Already\x20up\x20to\x20date\x20(v','error'];a40_0x22b2=function(){return _0x1ff032;};return a40_0x22b2();}function shouldSkipCliSkill(_0x398fd8){const _0x3a65ff=a40_0x5c1ef4;return _0x398fd8[_0x3a65ff(0x1c0)]('no-skills')||_0x398fd8[_0x3a65ff(0x1c1)](_0x3a65ff(0x1c9))===![];}async function validateUpdateFlags(_0x150c50){const _0x1bb759=a40_0x5c1ef4,_0xce5ec2=_0x150c50[_0x1bb759(0x1c0)](_0x1bb759(0x1dd)),_0x4c8cf0=getRequestedVersion(_0x150c50);if(_0xce5ec2&&_0x4c8cf0)throw CliErrors['validation'](_0x1bb759(0x1db),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4c8cf0&&!a40_0x302333['valid'](_0x4c8cf0))throw CliErrors['validation'](_0x1bb759(0x1ba)+_0x4c8cf0,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x36fef0=a40_0x5c1ef4;try{const _0x571ce8=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x36fef0(0x1c4),{'signal':AbortSignal[_0x36fef0(0x1a0)](0x2710)});if(!_0x571ce8['ok'])return null;const _0x581eab=await _0x571ce8['json']();if(!_0x581eab||typeof _0x581eab!==_0x36fef0(0x1e9))return null;return Object[_0x36fef0(0x1ec)](Object[_0x36fef0(0x1aa)](_0x581eab)['filter'](([,_0x57e258])=>typeof _0x57e258===_0x36fef0(0x1cc)&&_0x57e258[_0x36fef0(0x1c7)]()[_0x36fef0(0x1e4)]>0x0)[_0x36fef0(0x1cd)](([_0x581215,_0x273ec4])=>[_0x581215,String(_0x273ec4)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x590bfd){const _0x45f208=await fetchNpmDistTags();return _0x45f208?.[_0x590bfd]??null;}async function fetchLatestVersion(){const _0x18e67b=a40_0x5c1ef4;return fetchNpmDistTagVersion(_0x18e67b(0x1a8));}async function resolveTargetVersion(_0x2f1827){const _0x5c360f=a40_0x5c1ef4,_0x3140bc=getRequestedVersion(_0x2f1827);if(_0x3140bc)return{'version':_0x3140bc,'source':'version'};if(_0x2f1827['bool'](_0x5c360f(0x1dd))){const _0x31274e=await fetchNpmDistTagVersion(_0x5c360f(0x1dd));if(!_0x31274e)return null;return{'version':_0x31274e,'source':'beta'};}const _0x77ef9a=await fetchLatestVersion();if(!_0x77ef9a)return null;return{'version':_0x77ef9a,'source':'latest'};}function shouldInstallTarget(_0x413484,_0x487463){const _0x58e84b=a40_0x5c1ef4;if(_0x487463[_0x58e84b(0x1df)]===_0x58e84b(0x1ab)||_0x487463['source']===_0x58e84b(0x1dd))return!a40_0x302333['eq'](_0x413484,_0x487463['version']);return a40_0x302333['lt'](_0x413484,_0x487463[_0x58e84b(0x1ab)]);}function getInstallPlanLabel(_0x5be15f,_0x5f399a){const _0x5d4ba5=a40_0x5c1ef4;switch(_0x5f399a[_0x5d4ba5(0x1df)]){case'beta':return'Beta\x20version:\x20'+a40_0x418b0e['yellow'](_0x5be15f)+_0x5d4ba5(0x1ee)+a40_0x418b0e[_0x5d4ba5(0x1d5)](_0x5f399a[_0x5d4ba5(0x1ab)]);case'version':return _0x5d4ba5(0x1ea)+a40_0x418b0e[_0x5d4ba5(0x1e1)](_0x5be15f)+_0x5d4ba5(0x1ee)+a40_0x418b0e[_0x5d4ba5(0x1d5)](_0x5f399a[_0x5d4ba5(0x1ab)]);case _0x5d4ba5(0x1a8):default:return _0x5d4ba5(0x1e3)+a40_0x418b0e[_0x5d4ba5(0x1e1)](_0x5be15f)+_0x5d4ba5(0x1ee)+a40_0x418b0e[_0x5d4ba5(0x1d5)](_0x5f399a[_0x5d4ba5(0x1ab)]);}}async function installCliSkill(_0x26c892){const _0x2251fd=a40_0x5c1ef4;console[_0x2251fd(0x1a6)](a40_0x418b0e['gray'](_0x2251fd(0x1b2)));const _0x11e9d0=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x26c892?_0x2251fd(0x1e5):'inherit'});if(_0x11e9d0[_0x2251fd(0x1d1)]){console['log'](a40_0x418b0e['gray'](_0x2251fd(0x1a7)));return;}if(_0x11e9d0['ok']){console['log'](a40_0x418b0e[_0x2251fd(0x1bf)](_0x2251fd(0x1ad)));return;}console[_0x2251fd(0x1ed)](a40_0x418b0e[_0x2251fd(0x1e1)](_0x2251fd(0x1b3)+(_0x11e9d0[_0x2251fd(0x1d8)]||_0x2251fd(0x1b7)))),console[_0x2251fd(0x1a6)](a40_0x418b0e['gray'](_0x2251fd(0x1d6)+CLI_BIN_NAME+_0x2251fd(0x1a5)));}async function execute(_0x46ab9d){const _0x12e3d1=a40_0x5c1ef4;await validateUpdateFlags(_0x46ab9d);const _0x47ede3=getCurrentVersion();console[_0x12e3d1(0x1a6)](_0x12e3d1(0x1b5)+_0x47ede3);const _0x5adbd4=a40_0xd70087('Checking\x20for\x20updates...')[_0x12e3d1(0x1a3)](),_0x5bf481=await resolveTargetVersion(_0x46ab9d);if(!_0x5bf481){const _0x4a3bff=_0x46ab9d[_0x12e3d1(0x1c0)](_0x12e3d1(0x1dd))?_0x12e3d1(0x1eb):_0x12e3d1(0x1c3);return _0x5adbd4[_0x12e3d1(0x1c6)](_0x4a3bff),console[_0x12e3d1(0x1a6)](a40_0x418b0e[_0x12e3d1(0x1bf)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x12e3d1(0x19f))),{'ok':![],'message':_0x4a3bff};}const _0x5ced8c=a40_0x302333['valid'](VERSION),_0x1d52ef=a40_0x302333['valid'](_0x5bf481[_0x12e3d1(0x1ab)]);if(!_0x5ced8c||!_0x1d52ef)return _0x5adbd4[_0x12e3d1(0x1c6)](_0x12e3d1(0x1b8)),{'ok':![],'message':_0x12e3d1(0x1b8)};if(!shouldInstallTarget(_0x5ced8c,_0x5bf481)){const _0x16adc9=_0x5bf481[_0x12e3d1(0x1df)]===_0x12e3d1(0x1ab)?_0x12e3d1(0x1e2)+_0x5bf481[_0x12e3d1(0x1ab)]+')':_0x12e3d1(0x1d7)+_0x5bf481[_0x12e3d1(0x1ab)]+')';return _0x5adbd4['succeed'](_0x16adc9),shouldSkipCliSkill(_0x46ab9d)?console[_0x12e3d1(0x1a6)](a40_0x418b0e[_0x12e3d1(0x1bf)](_0x12e3d1(0x1ca))):await installCliSkill(_0x46ab9d[_0x12e3d1(0x1a2)]),{'ok':!![]};}_0x5adbd4[_0x12e3d1(0x1af)](getInstallPlanLabel(_0x47ede3,_0x5bf481));const _0x3cf744=detectPackageManager(),_0x419c52=_0x3cf744==='npm'?resolveNpmBin(_0x12e3d1(0x1d3)):_0x3cf744,_0x11b2cb=a40_0xd70087(_0x12e3d1(0x1c2)+_0x3cf744+_0x12e3d1(0x1b9))[_0x12e3d1(0x1a3)]();try{return await execa(_0x419c52,[_0x12e3d1(0x1ae),'-g',NPM_PACKAGE_NAME+'@'+_0x5bf481[_0x12e3d1(0x1ab)]],{'stdio':_0x12e3d1(0x1e5)}),_0x11b2cb['succeed'](_0x12e3d1(0x1bb)+_0x5bf481['version']),console[_0x12e3d1(0x1a6)](a40_0x418b0e[_0x12e3d1(0x1bf)](_0x12e3d1(0x1a9))),shouldSkipCliSkill(_0x46ab9d)?console[_0x12e3d1(0x1a6)](a40_0x418b0e[_0x12e3d1(0x1bf)](_0x12e3d1(0x1ca))):await installCliSkill(_0x46ab9d[_0x12e3d1(0x1a2)]),{'ok':!![]};}catch(_0x531549){return _0x11b2cb[_0x12e3d1(0x1c6)](_0x12e3d1(0x1b1)),console[_0x12e3d1(0x1d8)](a40_0x418b0e[_0x12e3d1(0x1e0)]('\x20\x20'+_0x531549['message'])),console[_0x12e3d1(0x1a6)](a40_0x418b0e[_0x12e3d1(0x1bf)](_0x12e3d1(0x1d4)+_0x3cf744+_0x12e3d1(0x1d9)+NPM_PACKAGE_NAME+'@'+_0x5bf481['version'])),{'ok':![],'message':_0x531549['message']};}}export const updateDefinition={'service':'update','command':a40_0x5c1ef4(0x1d0),'description':a40_0x5c1ef4(0x1cb),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a42_0x17e4(){const _0x150958=['456UmssVk','29552PETLdR','571156PEMADs','474708RDdzLh','249861QZesPW','1805JWWyvE','7297911xpQQos','118147JaZPxk','476wIcWIm','10fRosvu'];a42_0x17e4=function(){return _0x150958;};return a42_0x17e4();}(function(_0x4074cb,_0x1d8ade){const _0x4c24bc=a42_0x31d6,_0x47b3e7=_0x4074cb();while(!![]){try{const _0xa2110=parseInt(_0x4c24bc(0x1f5))/0x1+-parseInt(_0x4c24bc(0x1f0))/0x2+-parseInt(_0x4c24bc(0x1f2))/0x3+-parseInt(_0x4c24bc(0x1ee))/0x4*(parseInt(_0x4c24bc(0x1f3))/0x5)+-parseInt(_0x4c24bc(0x1f1))/0x6+-parseInt(_0x4c24bc(0x1ec))/0x7*(parseInt(_0x4c24bc(0x1ef))/0x8)+parseInt(_0x4c24bc(0x1f4))/0x9*(parseInt(_0x4c24bc(0x1ed))/0xa);if(_0xa2110===_0x1d8ade)break;else _0x47b3e7['push'](_0x47b3e7['shift']());}catch(_0x6b1e81){_0x47b3e7['push'](_0x47b3e7['shift']());}}}(a42_0x17e4,0x2e119));function a42_0x31d6(_0x4c111a,_0x4fe049){_0x4c111a=_0x4c111a-0x1ec;const _0x17e485=a42_0x17e4();let _0x31d6a9=_0x17e485[_0x4c111a];return _0x31d6a9;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x29ae79,_0x24d4ab){const _0x3614e3=a41_0x5870,_0x1c49d9=_0x29ae79();while(!![]){try{const _0x41f28b=-parseInt(_0x3614e3(0x1a0))/0x1*(parseInt(_0x3614e3(0x1a4))/0x2)+parseInt(_0x3614e3(0x19f))/0x3*(parseInt(_0x3614e3(0x1a7))/0x4)+parseInt(_0x3614e3(0x1a9))/0x5*(-parseInt(_0x3614e3(0x1a1))/0x6)+parseInt(_0x3614e3(0x1a6))/0x7+parseInt(_0x3614e3(0x1a2))/0x8+-parseInt(_0x3614e3(0x1a3))/0x9+parseInt(_0x3614e3(0x1a5))/0xa*(parseInt(_0x3614e3(0x1a8))/0xb);if(_0x41f28b===_0x24d4ab)break;else _0x1c49d9['push'](_0x1c49d9['shift']());}catch(_0x5e9219){_0x1c49d9['push'](_0x1c49d9['shift']());}}}(a41_0x4680,0x18f9c));function a41_0x5870(_0x53c23e,_0xdf04ea){_0x53c23e=_0x53c23e-0x19f;const _0x468099=a41_0x4680();let _0x587074=_0x468099[_0x53c23e];return _0x587074;}function a41_0x4680(){const _0x1402b7=['8013KmWrtn','1ENcsZA','5802xkAVTA','385672SzDNGo','1066644lhpbEx','163418hLfPzB','20bDuOCi','173362ANsfyv','72pwaIAJ','1019370usuBKw','20bYMMGP'];a41_0x4680=function(){return _0x1402b7;};return a41_0x4680();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a43_0x2626d3=a43_0x5ebc;function a43_0x3778(){const _0x507412=['bool','sdk','read','str','1rdFKAa','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','name','628ghIfmW','12560pbrExO','1518888ERKArn','556983QDIvMI','2259756wijRxo','code','appCode','5990160vsqdgs','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','3433822PXQOLN','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','569757JNvSYl','alias','string','tableName'];a43_0x3778=function(){return _0x507412;};return a43_0x3778();}(function(_0x35c830,_0x420207){const _0x37a5cd=a43_0x5ebc,_0x4828bf=_0x35c830();while(!![]){try{const _0x3a5327=parseInt(_0x37a5cd(0x119))/0x1*(-parseInt(_0x37a5cd(0x11e))/0x2)+parseInt(_0x37a5cd(0x111))/0x3+parseInt(_0x37a5cd(0x11c))/0x4*(parseInt(_0x37a5cd(0x11d))/0x5)+parseInt(_0x37a5cd(0x120))/0x6+-parseInt(_0x37a5cd(0x125))/0x7+parseInt(_0x37a5cd(0x123))/0x8+-parseInt(_0x37a5cd(0x11f))/0x9;if(_0x3a5327===_0x420207)break;else _0x4828bf['push'](_0x4828bf['shift']());}catch(_0x568c12){_0x4828bf['push'](_0x4828bf['shift']());}}}(a43_0x3778,0x611fe));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a43_0x5ebc(_0x2c0137,_0x5b4772){_0x2c0137=_0x2c0137-0x110;const _0x3778fa=a43_0x3778();let _0x5ebc19=_0x3778fa[_0x2c0137];return _0x5ebc19;}export const codegenSdk={'service':'codegen','command':a43_0x2626d3(0x116),'description':a43_0x2626d3(0x11a),'risk':a43_0x2626d3(0x117),'flags':[CODE_FLAG_OPTIONAL,{'name':a43_0x2626d3(0x112),'type':a43_0x2626d3(0x113),'description':a43_0x2626d3(0x110)},{'name':'operation','type':a43_0x2626d3(0x113),'required':!![],'description':a43_0x2626d3(0x124)},{'name':a43_0x2626d3(0x126),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1b4f19){const _0x4e81f6=a43_0x2626d3,{dataset:_0x1193b3,operation:_0x43ea97}=await getOperationDetail(_0x1b4f19[_0x4e81f6(0x122)],_0x1b4f19[_0x4e81f6(0x118)]('code'),_0x1b4f19['str']('operation')),_0x225435=generateSdkCode(_0x1193b3,_0x43ea97,{'includeImports':!_0x1b4f19[_0x4e81f6(0x115)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1193b3[_0x4e81f6(0x11b)],'code':_0x1193b3[_0x4e81f6(0x121)],'tableName':_0x1193b3[_0x4e81f6(0x114)]},'operation':_0x1b4f19['str']('operation'),'code':_0x225435}};}};
1
+ const a42_0x5f2342=a42_0x1523;(function(_0x486734,_0x3046f6){const _0x2a1d40=a42_0x1523,_0x3d6c99=_0x486734();while(!![]){try{const _0x2dd395=-parseInt(_0x2a1d40(0x1d3))/0x1*(-parseInt(_0x2a1d40(0x1d6))/0x2)+parseInt(_0x2a1d40(0x1ce))/0x3*(-parseInt(_0x2a1d40(0x1cb))/0x4)+-parseInt(_0x2a1d40(0x1e4))/0x5+parseInt(_0x2a1d40(0x1de))/0x6*(parseInt(_0x2a1d40(0x1da))/0x7)+-parseInt(_0x2a1d40(0x1c9))/0x8*(parseInt(_0x2a1d40(0x1d2))/0x9)+parseInt(_0x2a1d40(0x1e3))/0xa*(-parseInt(_0x2a1d40(0x1d1))/0xb)+parseInt(_0x2a1d40(0x1c8))/0xc*(parseInt(_0x2a1d40(0x1d7))/0xd);if(_0x2dd395===_0x3046f6)break;else _0x3d6c99['push'](_0x3d6c99['shift']());}catch(_0x4a7136){_0x3d6c99['push'](_0x3d6c99['shift']());}}}(a42_0x3d39,0xb30fb));function a42_0x1523(_0x541da6,_0x47daa0){_0x541da6=_0x541da6-0x1c8;const _0x3d39ec=a42_0x3d39();let _0x152350=_0x3d39ec[_0x541da6];return _0x152350;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x3d39(){const _0x166224=['sdk','str','12622510kULpAE','1180480ufLdjb','alias','732HYdvdj','2712kGoOFd','codegen','28EzlpTo','name','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','532893uGKHbU','code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','11LCjnHS','20421HTrOkz','1OqSWEg','string','Omit\x20import\x20statements\x20from\x20generated\x20code','1038556pVOfvk','563446ZfFEZF','bool','boolean','21875pAJpWJ','operation','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','appCode','2076QWMIHS','skip-imports','tableName'];a42_0x3d39=function(){return _0x166224;};return a42_0x3d39();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x5f2342(0x1ca),'command':a42_0x5f2342(0x1e1),'description':a42_0x5f2342(0x1dc),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x5f2342(0x1e5),'type':a42_0x5f2342(0x1d4),'description':a42_0x5f2342(0x1cd)},{'name':a42_0x5f2342(0x1db),'type':a42_0x5f2342(0x1d4),'required':!![],'description':a42_0x5f2342(0x1d0)},{'name':'skip-imports','type':a42_0x5f2342(0x1d9),'description':a42_0x5f2342(0x1d5)}],async 'execute'(_0x2689d7){const _0x491386=a42_0x5f2342,{dataset:_0x590302,operation:_0x52b88a}=await getOperationDetail(_0x2689d7[_0x491386(0x1dd)],_0x2689d7[_0x491386(0x1e2)](_0x491386(0x1cf)),_0x2689d7[_0x491386(0x1e2)]('operation')),_0x1c8135=generateSdkCode(_0x590302,_0x52b88a,{'includeImports':!_0x2689d7[_0x491386(0x1d8)](_0x491386(0x1df))});return{'ok':!![],'data':{'dataset':{'name':_0x590302[_0x491386(0x1cc)],'code':_0x590302['code'],'tableName':_0x590302[_0x491386(0x1e0)]},'operation':_0x2689d7[_0x491386(0x1e2)](_0x491386(0x1db)),'code':_0x1c8135}};}};
@@ -1 +1 @@
1
- function a44_0x55de(){const _0x354584=['Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','sqlCode','string','codegen','728796uBwveW','29374tlikrg','14FtCZGi','bff','1352697uVySZa','5iQzTpF','833035TwjKFk','3543288QYNOMD','647116sggMqc','appCode','sqlName','read','str','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','9TSSfOR','14722930zchsfW','no-imports','bool','Code\x20target:\x20sdk\x20(default)\x20or\x20bff'];a44_0x55de=function(){return _0x354584;};return a44_0x55de();}const a44_0x2c7438=a44_0x503c;(function(_0x2e6c03,_0x370940){const _0x5edd89=a44_0x503c,_0x137bdd=_0x2e6c03();while(!![]){try{const _0x2e6883=parseInt(_0x5edd89(0x1a0))/0x1*(-parseInt(_0x5edd89(0x1a1))/0x2)+-parseInt(_0x5edd89(0x1a3))/0x3+parseInt(_0x5edd89(0x1a7))/0x4*(parseInt(_0x5edd89(0x1a4))/0x5)+-parseInt(_0x5edd89(0x1b7))/0x6+-parseInt(_0x5edd89(0x1a5))/0x7+-parseInt(_0x5edd89(0x1a6))/0x8*(parseInt(_0x5edd89(0x1ad))/0x9)+parseInt(_0x5edd89(0x1ae))/0xa;if(_0x2e6883===_0x370940)break;else _0x137bdd['push'](_0x137bdd['shift']());}catch(_0x2d70be){_0x137bdd['push'](_0x137bdd['shift']());}}}(a44_0x55de,0x47d1d));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a44_0x503c(_0x31c251,_0x349fe3){_0x31c251=_0x31c251-0x1a0;const _0x55de04=a44_0x55de();let _0x503c01=_0x55de04[_0x31c251];return _0x503c01;}export const codegenSql={'service':a44_0x2c7438(0x1b6),'command':'sql','description':a44_0x2c7438(0x1ac),'risk':a44_0x2c7438(0x1aa),'flags':[SQLCODE_FLAG,{'name':'target','type':a44_0x2c7438(0x1b5),'description':a44_0x2c7438(0x1b1),'default':a44_0x2c7438(0x1b3),'enum':['sdk',a44_0x2c7438(0x1a2)]},{'name':a44_0x2c7438(0x1af),'type':'boolean','description':a44_0x2c7438(0x1b2)}],async 'execute'(_0x4f0c1c){const _0x49a739=a44_0x2c7438,_0xb47a7c=await getSqlQueryInfo(_0x4f0c1c[_0x49a739(0x1a8)],_0x4f0c1c['str']('sqlcode')),_0x165139=_0x4f0c1c[_0x49a739(0x1ab)]('target')||_0x49a739(0x1b3),_0x10f693=generateSqlCodeTemplate(_0xb47a7c,{'target':_0x165139,'includeImports':!_0x4f0c1c[_0x49a739(0x1b0)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0xb47a7c[_0x49a739(0x1b4)],'sqlName':_0xb47a7c[_0x49a739(0x1a9)],'target':_0x165139,'code':_0x10f693}};}};
1
+ const a43_0x4f4987=a43_0x2c88;(function(_0x1b8dfb,_0x2b955e){const _0x56e395=a43_0x2c88,_0x373af8=_0x1b8dfb();while(!![]){try{const _0x26b586=parseInt(_0x56e395(0xe5))/0x1+-parseInt(_0x56e395(0xdf))/0x2*(-parseInt(_0x56e395(0xf6))/0x3)+-parseInt(_0x56e395(0xeb))/0x4*(parseInt(_0x56e395(0xf7))/0x5)+-parseInt(_0x56e395(0xf0))/0x6+-parseInt(_0x56e395(0xee))/0x7*(parseInt(_0x56e395(0xe8))/0x8)+-parseInt(_0x56e395(0xe1))/0x9*(-parseInt(_0x56e395(0xed))/0xa)+parseInt(_0x56e395(0xec))/0xb*(parseInt(_0x56e395(0xe7))/0xc);if(_0x26b586===_0x2b955e)break;else _0x373af8['push'](_0x373af8['shift']());}catch(_0x12ce71){_0x373af8['push'](_0x373af8['shift']());}}}(a43_0x4b1a,0x44a23));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x2c88(_0x2cdab6,_0x2a8b5b){_0x2cdab6=_0x2cdab6-0xdf;const _0x4b1a52=a43_0x4b1a();let _0x2c8816=_0x4b1a52[_0x2cdab6];return _0x2c8816;}function a43_0x4b1a(){const _0x83fc13=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','target','15020BFVlba','1342MbDFHd','20yUschr','49onwDVq','sqlCode','2121672AUPDma','read','bff','string','boolean','sql','66djzehQ','125RHcEQc','1702OffuvI','sqlcode','518652oNPvTv','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','236006zbFMVo','no-imports','71772ODUWgj','424064RWQuqB'];a43_0x4b1a=function(){return _0x83fc13;};return a43_0x4b1a();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0x4f4987(0xf5),'description':a43_0x4f4987(0xe4),'risk':a43_0x4f4987(0xf1),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x4f4987(0xf3),'description':a43_0x4f4987(0xe9),'default':'sdk','enum':[a43_0x4f4987(0xe3),a43_0x4f4987(0xf2)]},{'name':a43_0x4f4987(0xe6),'type':a43_0x4f4987(0xf4),'description':a43_0x4f4987(0xe2)}],async 'execute'(_0x10492b){const _0x855cc9=a43_0x4f4987,_0x53c9e6=await getSqlQueryInfo(_0x10492b['appCode'],_0x10492b['str'](_0x855cc9(0xe0))),_0x2fd71d=_0x10492b['str'](_0x855cc9(0xea))||_0x855cc9(0xe3),_0x131f47=generateSqlCodeTemplate(_0x53c9e6,{'target':_0x2fd71d,'includeImports':!_0x10492b['bool'](_0x855cc9(0xe6))});return{'ok':!![],'data':{'sqlCode':_0x53c9e6[_0x855cc9(0xef)],'sqlName':_0x53c9e6['sqlName'],'target':_0x2fd71d,'code':_0x131f47}};}};
@@ -1 +1 @@
1
- (function(_0xefabfd,_0x253d33){const _0x400fd6=a45_0x4858,_0x1cf415=_0xefabfd();while(!![]){try{const _0x61c2ff=-parseInt(_0x400fd6(0x131))/0x1+-parseInt(_0x400fd6(0x135))/0x2*(-parseInt(_0x400fd6(0x133))/0x3)+parseInt(_0x400fd6(0x14a))/0x4*(-parseInt(_0x400fd6(0x128))/0x5)+parseInt(_0x400fd6(0x146))/0x6*(-parseInt(_0x400fd6(0x143))/0x7)+parseInt(_0x400fd6(0x132))/0x8*(parseInt(_0x400fd6(0x13e))/0x9)+parseInt(_0x400fd6(0x13c))/0xa+-parseInt(_0x400fd6(0x144))/0xb*(-parseInt(_0x400fd6(0x134))/0xc);if(_0x61c2ff===_0x253d33)break;else _0x1cf415['push'](_0x1cf415['shift']());}catch(_0x3a7656){_0x1cf415['push'](_0x1cf415['shift']());}}}(a45_0x4c49,0x2b581));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x21caed 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 _0x362ae2=a45_0x4858,_0x3fd1c8=await input({'message':_0x362ae2(0x12c),'validate':_0x1e0598=>{const _0x59adf9=_0x362ae2,_0x58729a=validateAppcode(_0x1e0598[_0x59adf9(0x123)]());return _0x58729a[_0x59adf9(0x129)]||_0x58729a[_0x59adf9(0x130)]||_0x59adf9(0x127);}});return _0x3fd1c8['trim']();}export async function promptAppSelection(_0x3e6dc9){const _0x5a1335=a45_0x4858,_0x552440=[{'name':a45_0x21caed[_0x5a1335(0x136)](_0x5a1335(0x140)),'value':-0x1},..._0x3e6dc9['map']((_0x23099c,_0x3b03ed)=>({'name':_0x23099c['appName']+'\x20\x20'+a45_0x21caed[_0x5a1335(0x122)]('('+_0x23099c[_0x5a1335(0x14b)]+')'),'value':_0x3b03ed}))],_0x1d729f=await checkbox({'message':_0x5a1335(0x12e)+a45_0x21caed[_0x5a1335(0x12d)](_0x3e6dc9['length'])+_0x5a1335(0x148),'choices':_0x552440,'loop':![]});if(_0x1d729f[_0x5a1335(0x149)](-0x1))return'custom';if(_0x1d729f[_0x5a1335(0x12b)]===0x0)return _0x5a1335(0x12a);return _0x1d729f[_0x5a1335(0x126)](_0x30a9e4=>_0x3e6dc9[_0x30a9e4]);}export async function promptSingleAppSelection(_0x16dbdb){const _0x2e1561=a45_0x4858,_0xee5a4f=[{'name':a45_0x21caed[_0x2e1561(0x122)](_0x2e1561(0x13d)),'value':'skip'},{'name':a45_0x21caed[_0x2e1561(0x136)](_0x2e1561(0x140)),'value':'custom'},..._0x16dbdb['map'](_0x57e92b=>({'name':_0x57e92b[_0x2e1561(0x12f)]+'\x20\x20'+a45_0x21caed[_0x2e1561(0x122)]('('+_0x57e92b[_0x2e1561(0x14b)]+')'),'value':_0x57e92b[_0x2e1561(0x14b)]}))],_0x207bb4=await select({'message':_0x2e1561(0x120),'choices':_0xee5a4f});if(_0x207bb4===_0x2e1561(0x141))return'skip';if(_0x207bb4===_0x2e1561(0x12a))return _0x2e1561(0x12a);return _0x16dbdb[_0x2e1561(0x13a)](_0x43b25e=>_0x43b25e[_0x2e1561(0x14b)]===_0x207bb4);}function a45_0x4858(_0x4d8d2b,_0x51d2f3){_0x4d8d2b=_0x4d8d2b-0x120;const _0x4c49eb=a45_0x4c49();let _0x48588a=_0x4c49eb[_0x4d8d2b];return _0x48588a;}export async function selectSingleAppcode(_0xb1cdbe){const _0x41e389=a45_0x4858;if(!_0xb1cdbe)return writeCliSideChannelLine(a45_0x21caed[_0x41e389(0x122)](_0x41e389(0x125))),_fallbackOrSkip();writeCliSideChannelLine(_0x41e389(0x121));let _0x23b3da;try{_0x23b3da=await withActiveCookie(_0xb1cdbe,()=>listRemoteApps());}catch(_0x44ac9d){writeCliSideChannelLine(a45_0x21caed[_0x41e389(0x136)](_0x41e389(0x139)));if(_0x44ac9d instanceof Error)writeCliSideChannelLine(a45_0x21caed[_0x41e389(0x122)]('\x20\x20('+_0x44ac9d[_0x41e389(0x130)]+')'));return _fallbackOrSkip();}if(_0x23b3da[_0x41e389(0x12b)]===0x0)return writeCliSideChannelLine(a45_0x21caed[_0x41e389(0x136)](_0x41e389(0x13f))),_fallbackOrSkip();const _0x49dd83=await promptSingleAppSelection(_0x23b3da);if(_0x49dd83===_0x41e389(0x141))return'';if(_0x49dd83===_0x41e389(0x12a))return promptCustomAppcode();return _0x49dd83[_0x41e389(0x14b)];}export async function selectMultipleApps(_0x3a67eb){const _0x18942a=a45_0x4858;writeCliSideChannelLine('正在获取可用应用列表...');let _0x11f54d;try{_0x11f54d=await withActiveCookie(_0x3a67eb,()=>listRemoteApps());}catch(_0x4f2b4d){writeCliSideChannelLine(_0x18942a(0x138));if(_0x4f2b4d instanceof Error)writeCliSideChannelLine(_0x18942a(0x137)+_0x4f2b4d[_0x18942a(0x130)]+')');return _0x18942a(0x12a);}if(_0x11f54d['length']===0x0)return writeCliSideChannelLine(_0x18942a(0x13b)),_0x18942a(0x12a);return promptAppSelection(_0x11f54d);}async function _fallbackOrSkip(){const _0x4efd21=a45_0x4858,_0x16ad51=await select({'message':_0x4efd21(0x142),'choices':[{'name':a45_0x21caed[_0x4efd21(0x122)](_0x4efd21(0x124)),'value':_0x4efd21(0x141)},{'name':a45_0x21caed[_0x4efd21(0x136)](_0x4efd21(0x147)),'value':_0x4efd21(0x145)}]});if(_0x16ad51===_0x4efd21(0x141))return'';return promptCustomAppcode();}function a45_0x4c49(){const _0x3b61c5=['87144FAntdN','159Vmwanp','18204wupiKe','226JUrpPn','yellow','\x20\x20(','\x0a无法获取远程应用列表,请手动输入。','无法获取远程应用列表,请手动输入。','find','\x0a未找到可用应用。','1678850MVtimP','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','198ALsuDG','未找到可用应用。','✎\x20自定义输入\x20appcode','skip','App\x20Code:','14pgVBsL','209izKHKX','manual','10662lhfnkt','✎\x20手动输入','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','includes','9164XnNswc','appCode','请选择要绑定的应用:','正在获取可用应用列表...','gray','trim','(跳过,稍后配置)','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','map','Invalid\x20App\x20Code','545VIKSbz','valid','custom','length','请输入\x20App\x20Code:','cyan','获取到\x20','appName','message','11533tuDsHP'];a45_0x4c49=function(){return _0x3b61c5;};return a45_0x4c49();}
1
+ (function(_0x44d19b,_0x3de841){const _0x5dc330=a44_0x5974,_0x8d9a1d=_0x44d19b();while(!![]){try{const _0x3050e9=parseInt(_0x5dc330(0x12a))/0x1*(parseInt(_0x5dc330(0x135))/0x2)+-parseInt(_0x5dc330(0x12d))/0x3+-parseInt(_0x5dc330(0x125))/0x4*(-parseInt(_0x5dc330(0x11f))/0x5)+parseInt(_0x5dc330(0x122))/0x6+parseInt(_0x5dc330(0x121))/0x7+-parseInt(_0x5dc330(0x124))/0x8*(-parseInt(_0x5dc330(0x133))/0x9)+-parseInt(_0x5dc330(0x126))/0xa;if(_0x3050e9===_0x3de841)break;else _0x8d9a1d['push'](_0x8d9a1d['shift']());}catch(_0xe9efb1){_0x8d9a1d['push'](_0x8d9a1d['shift']());}}}(a44_0x31ae,0xc5efb));import{input,checkbox,select}from'@inquirer/prompts';function a44_0x31ae(){const _0x3e9a9a=['skip','appCode','1415266egqqap','请输入\x20App\x20Code:','(跳过,稍后配置)','749694CMoPQb','message','正在获取可用应用列表...','✎\x20自定义输入\x20appcode','无法获取远程应用列表,请手动输入。','Invalid\x20App\x20Code','657918EgcNNf','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','2djIzKv','\x0a未找到可用应用。','gray','map','yellow','\x20\x20(','appName','App\x20Code:','custom','\x0a无法获取远程应用列表,请手动输入。','6280BYzjHS','length','1118264rzwXLI','3587868KIJEun','✎\x20手动输入','104VYwuGS','4252inxasQ','33978050TjniVe','请选择要绑定的应用:'];a44_0x31ae=function(){return _0x3e9a9a;};return a44_0x31ae();}import a44_0x24b91b 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 _0x20e3c1=a44_0x5974,_0x11411d=await input({'message':_0x20e3c1(0x12b),'validate':_0x28d76f=>{const _0x142aee=_0x20e3c1,_0x3d713e=validateAppcode(_0x28d76f['trim']());return _0x3d713e['valid']||_0x3d713e[_0x142aee(0x12e)]||_0x142aee(0x132);}});return _0x11411d['trim']();}export async function promptAppSelection(_0x5cd057){const _0x5e46ee=a44_0x5974,_0x287d76=[{'name':a44_0x24b91b[_0x5e46ee(0x139)](_0x5e46ee(0x130)),'value':-0x1},..._0x5cd057[_0x5e46ee(0x138)]((_0x4c488b,_0x15688c)=>({'name':_0x4c488b['appName']+'\x20\x20'+a44_0x24b91b[_0x5e46ee(0x137)]('('+_0x4c488b[_0x5e46ee(0x129)]+')'),'value':_0x15688c}))],_0x79db69=await checkbox({'message':'获取到\x20'+a44_0x24b91b['cyan'](_0x5cd057[_0x5e46ee(0x120)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x287d76,'loop':![]});if(_0x79db69['includes'](-0x1))return _0x5e46ee(0x11d);if(_0x79db69[_0x5e46ee(0x120)]===0x0)return _0x5e46ee(0x11d);return _0x79db69['map'](_0x379126=>_0x5cd057[_0x379126]);}export async function promptSingleAppSelection(_0x21114d){const _0x2a7499=a44_0x5974,_0x11026f=[{'name':a44_0x24b91b[_0x2a7499(0x137)](_0x2a7499(0x134)),'value':_0x2a7499(0x128)},{'name':a44_0x24b91b[_0x2a7499(0x139)](_0x2a7499(0x130)),'value':_0x2a7499(0x11d)},..._0x21114d[_0x2a7499(0x138)](_0x55eda4=>({'name':_0x55eda4[_0x2a7499(0x11b)]+'\x20\x20'+a44_0x24b91b[_0x2a7499(0x137)]('('+_0x55eda4[_0x2a7499(0x129)]+')'),'value':_0x55eda4[_0x2a7499(0x129)]}))],_0x3b9c45=await select({'message':_0x2a7499(0x127),'choices':_0x11026f});if(_0x3b9c45==='skip')return'skip';if(_0x3b9c45==='custom')return _0x2a7499(0x11d);return _0x21114d['find'](_0x52bea9=>_0x52bea9[_0x2a7499(0x129)]===_0x3b9c45);}export async function selectSingleAppcode(_0x13dd6f){const _0x1400d8=a44_0x5974;if(!_0x13dd6f)return writeCliSideChannelLine(a44_0x24b91b['gray']('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x1400d8(0x12f));let _0x1b7bdf;try{_0x1b7bdf=await withActiveCookie(_0x13dd6f,()=>listRemoteApps());}catch(_0x51e6fd){writeCliSideChannelLine(a44_0x24b91b[_0x1400d8(0x139)](_0x1400d8(0x131)));if(_0x51e6fd instanceof Error)writeCliSideChannelLine(a44_0x24b91b[_0x1400d8(0x137)](_0x1400d8(0x11a)+_0x51e6fd['message']+')'));return _fallbackOrSkip();}if(_0x1b7bdf[_0x1400d8(0x120)]===0x0)return writeCliSideChannelLine(a44_0x24b91b[_0x1400d8(0x139)]('未找到可用应用。')),_fallbackOrSkip();const _0x3a682f=await promptSingleAppSelection(_0x1b7bdf);if(_0x3a682f==='skip')return'';if(_0x3a682f===_0x1400d8(0x11d))return promptCustomAppcode();return _0x3a682f[_0x1400d8(0x129)];}function a44_0x5974(_0x6b7240,_0xe491d3){_0x6b7240=_0x6b7240-0x11a;const _0x31ae18=a44_0x31ae();let _0x5974bf=_0x31ae18[_0x6b7240];return _0x5974bf;}export async function selectMultipleApps(_0x4be506){const _0x578575=a44_0x5974;writeCliSideChannelLine(_0x578575(0x12f));let _0x73986b;try{_0x73986b=await withActiveCookie(_0x4be506,()=>listRemoteApps());}catch(_0x8418e4){writeCliSideChannelLine(_0x578575(0x11e));if(_0x8418e4 instanceof Error)writeCliSideChannelLine(_0x578575(0x11a)+_0x8418e4[_0x578575(0x12e)]+')');return'custom';}if(_0x73986b[_0x578575(0x120)]===0x0)return writeCliSideChannelLine(_0x578575(0x136)),'custom';return promptAppSelection(_0x73986b);}async function _fallbackOrSkip(){const _0x5ebdfb=a44_0x5974,_0x3a9ac2=await select({'message':_0x5ebdfb(0x11c),'choices':[{'name':a44_0x24b91b[_0x5ebdfb(0x137)](_0x5ebdfb(0x12c)),'value':_0x5ebdfb(0x128)},{'name':a44_0x24b91b[_0x5ebdfb(0x139)](_0x5ebdfb(0x123)),'value':'manual'}]});if(_0x3a9ac2===_0x5ebdfb(0x128))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x2ba0d4=a46_0x1102;(function(_0x504460,_0x49b692){const _0x328177=a46_0x1102,_0x2a8a90=_0x504460();while(!![]){try{const _0x435634=parseInt(_0x328177(0xd6))/0x1+parseInt(_0x328177(0xcf))/0x2*(-parseInt(_0x328177(0xe2))/0x3)+parseInt(_0x328177(0xd4))/0x4+parseInt(_0x328177(0xda))/0x5+parseInt(_0x328177(0xde))/0x6*(parseInt(_0x328177(0xdd))/0x7)+-parseInt(_0x328177(0xdc))/0x8*(parseInt(_0x328177(0xd7))/0x9)+parseInt(_0x328177(0xd3))/0xa;if(_0x435634===_0x49b692)break;else _0x2a8a90['push'](_0x2a8a90['shift']());}catch(_0x22f752){_0x2a8a90['push'](_0x2a8a90['shift']());}}}(a46_0x34f0,0x40830));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a46_0x2ba0d4(0xe1),'description':a46_0x2ba0d4(0xd5)};export const SQLCODE_FLAG={'name':a46_0x2ba0d4(0xe4),'type':a46_0x2ba0d4(0xe0),'required':!![],'description':a46_0x2ba0d4(0xdb),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a46_0x1102(_0x1dfc98,_0x5e60c0){_0x1dfc98=_0x1dfc98-0xcf;const _0x34f04a=a46_0x34f0();let _0x1102ba=_0x34f04a[_0x1dfc98];return _0x1102ba;}export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':'string','required':![],'description':a46_0x2ba0d4(0xe3)};function a46_0x34f0(){const _0x43de0b=['592175jgkrvS','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','199064iqTBvM','1330567dJLGbC','6TjYzSv','dbtype','string','datasetcode','84tnPJhB','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','sqlcode','17178AcPAwC','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','MYSQL','POSTGRESQL','4934280zNxBmc','295444OoRqmq','Dataset\x20code\x20(32-char\x20hex\x20UUID)','126587iNLPlw','180EsNgQM','Database\x20product\x20type','number'];a46_0x34f0=function(){return _0x43de0b;};return a46_0x34f0();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a46_0x2ba0d4(0xd9),'required':!![],'description':a46_0x2ba0d4(0xd0)};export const DB_TYPE_FLAG={'name':a46_0x2ba0d4(0xdf),'type':a46_0x2ba0d4(0xe0),'required':!![],'description':a46_0x2ba0d4(0xd8),'enum':[a46_0x2ba0d4(0xd1),a46_0x2ba0d4(0xd2)]};
1
+ const a45_0x1d5920=a45_0x482c;(function(_0x5b0687,_0x53a6ae){const _0x583f70=a45_0x482c,_0x496058=_0x5b0687();while(!![]){try{const _0x3345bd=parseInt(_0x583f70(0xef))/0x1+-parseInt(_0x583f70(0xe5))/0x2*(-parseInt(_0x583f70(0xe6))/0x3)+-parseInt(_0x583f70(0xf7))/0x4+-parseInt(_0x583f70(0xe7))/0x5*(parseInt(_0x583f70(0xee))/0x6)+-parseInt(_0x583f70(0xe8))/0x7*(parseInt(_0x583f70(0xea))/0x8)+parseInt(_0x583f70(0xed))/0x9*(parseInt(_0x583f70(0xe3))/0xa)+-parseInt(_0x583f70(0xe9))/0xb*(-parseInt(_0x583f70(0xf4))/0xc);if(_0x3345bd===_0x53a6ae)break;else _0x496058['push'](_0x496058['shift']());}catch(_0x551360){_0x496058['push'](_0x496058['shift']());}}}(a45_0x3a09,0x2fadb));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a45_0x1d5920(0xf0)};export const CODE_FLAG={'name':'code','type':a45_0x1d5920(0xec),'required':!![],'description':a45_0x1d5920(0xf9),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a45_0x1d5920(0xf6),'description':a45_0x1d5920(0xf9)};export const SQLCODE_FLAG={'name':a45_0x1d5920(0xf8),'type':a45_0x1d5920(0xec),'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':a45_0x1d5920(0xeb)}};export const APPCODE_FLAG_OPTIONAL={'name':a45_0x1d5920(0xf2),'type':'string','required':![],'description':a45_0x1d5920(0xf5)};function a45_0x482c(_0xd2d462,_0x41542b){_0xd2d462=_0xd2d462-0xe2;const _0x3a098b=a45_0x3a09();let _0x482c72=_0x3a098b[_0xd2d462];return _0x482c72;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a45_0x3a09(){const _0x2f5ca9=['Database\x20product\x20type','appcode','dbtype','60gGeYuC','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','datasetcode','363620WHjguv','sqlcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','number','3575190ldxerU','MYSQL','16rcGPKA','37509gXFWPH','1476775AjAzLD','24815NdlyIf','406109jdTRdG','776AOsQdO','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','string','9TsBdOt','6gwEWpY','283278zJJISS','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'];a45_0x3a09=function(){return _0x2f5ca9;};return a45_0x3a09();}export const DBLINK_ID_FLAG={'name':'id','type':a45_0x1d5920(0xe2),'required':!![],'description':a45_0x1d5920(0xfa)};export const DB_TYPE_FLAG={'name':a45_0x1d5920(0xf3),'type':'string','required':!![],'description':a45_0x1d5920(0xf1),'enum':[a45_0x1d5920(0xe4),'POSTGRESQL']};
@@ -1 +1 @@
1
- (function(_0x5b8099,_0x281eb3){const _0x1f2c63=a47_0x4dbb,_0x3f040b=_0x5b8099();while(!![]){try{const _0x4716eb=parseInt(_0x1f2c63(0x1e5))/0x1+parseInt(_0x1f2c63(0x1e6))/0x2*(-parseInt(_0x1f2c63(0x1df))/0x3)+-parseInt(_0x1f2c63(0x1dd))/0x4+parseInt(_0x1f2c63(0x1db))/0x5+parseInt(_0x1f2c63(0x1e3))/0x6*(-parseInt(_0x1f2c63(0x1e2))/0x7)+parseInt(_0x1f2c63(0x1da))/0x8+-parseInt(_0x1f2c63(0x1e4))/0x9;if(_0x4716eb===_0x281eb3)break;else _0x3f040b['push'](_0x3f040b['shift']());}catch(_0x3341d8){_0x3f040b['push'](_0x3f040b['shift']());}}}(a47_0x2a46,0x82081));function a47_0x4dbb(_0x3de5ed,_0x30f64c){_0x3de5ed=_0x3de5ed-0x1da;const _0x2a46fa=a47_0x2a46();let _0x4dbb77=_0x2a46fa[_0x3de5ed];return _0x4dbb77;}export function validateAppcode(_0x595735){const _0x1eb244=a47_0x4dbb,_0x3ad692=_0x595735[_0x1eb244(0x1e1)]();if(!_0x3ad692)return{'valid':![],'message':_0x1eb244(0x1de)};if(_0x3ad692[_0x1eb244(0x1dc)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x1eb244(0x1e0)](_0x3ad692))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a47_0x2a46(){const _0x2c9d97=['767272bLpSIP','App\x20Code\x20cannot\x20be\x20empty','3jfeHKd','test','trim','287itJqRF','32046XkUDnh','1046700OMvAsa','377740ndcHSS','836858RGtolV','2760480VNOgke','3776685TlPfDI','length'];a47_0x2a46=function(){return _0x2c9d97;};return a47_0x2a46();}
1
+ (function(_0x396254,_0x238520){const _0x464b22=a46_0x4de3,_0x248d1e=_0x396254();while(!![]){try{const _0x3b9468=-parseInt(_0x464b22(0x1e8))/0x1*(parseInt(_0x464b22(0x1e9))/0x2)+parseInt(_0x464b22(0x1f4))/0x3*(parseInt(_0x464b22(0x1f0))/0x4)+parseInt(_0x464b22(0x1ea))/0x5*(-parseInt(_0x464b22(0x1f3))/0x6)+-parseInt(_0x464b22(0x1f2))/0x7*(parseInt(_0x464b22(0x1f7))/0x8)+parseInt(_0x464b22(0x1ed))/0x9*(-parseInt(_0x464b22(0x1e7))/0xa)+-parseInt(_0x464b22(0x1f1))/0xb*(parseInt(_0x464b22(0x1eb))/0xc)+parseInt(_0x464b22(0x1ec))/0xd;if(_0x3b9468===_0x238520)break;else _0x248d1e['push'](_0x248d1e['shift']());}catch(_0x156af9){_0x248d1e['push'](_0x248d1e['shift']());}}}(a46_0x250d,0x3d827));function a46_0x4de3(_0x360449,_0x2f0b21){_0x360449=_0x360449-0x1e7;const _0x250d1d=a46_0x250d();let _0x4de302=_0x250d1d[_0x360449];return _0x4de302;}export function validateAppcode(_0x506def){const _0x4989e5=a46_0x4de3,_0xfc2c0a=_0x506def[_0x4989e5(0x1ee)]();if(!_0xfc2c0a)return{'valid':![],'message':_0x4989e5(0x1f6)};if(_0xfc2c0a[_0x4989e5(0x1f5)]>0x64)return{'valid':![],'message':_0x4989e5(0x1ef)};if(!/^[A-Za-z0-9_-]+$/['test'](_0xfc2c0a))return{'valid':![],'message':_0x4989e5(0x1f8)};return{'valid':!![]};}function a46_0x250d(){const _0xb09dec=['11Lrugxa','14VHBsfO','474mUobxp','3TMkGZl','length','App\x20Code\x20cannot\x20be\x20empty','1712792ceFwAb','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','20ctLVLC','29bxSMaS','21426RwDOGW','11855kWmUnO','5354256NDlGqd','19120036jmwBQl','996768uYKwUM','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1500188xVbXzz'];a46_0x250d=function(){return _0xb09dec;};return a46_0x250d();}
@@ -1 +1 @@
1
- const a48_0x3f049e=a48_0x2352;(function(_0x2236d9,_0x9e8528){const _0x402aa8=a48_0x2352,_0x8a2229=_0x2236d9();while(!![]){try{const _0x53ba88=-parseInt(_0x402aa8(0x193))/0x1*(-parseInt(_0x402aa8(0x192))/0x2)+-parseInt(_0x402aa8(0x180))/0x3+-parseInt(_0x402aa8(0x18b))/0x4*(parseInt(_0x402aa8(0x182))/0x5)+parseInt(_0x402aa8(0x191))/0x6*(parseInt(_0x402aa8(0x190))/0x7)+parseInt(_0x402aa8(0x17c))/0x8*(parseInt(_0x402aa8(0x183))/0x9)+-parseInt(_0x402aa8(0x187))/0xa+parseInt(_0x402aa8(0x185))/0xb;if(_0x53ba88===_0x9e8528)break;else _0x8a2229['push'](_0x8a2229['shift']());}catch(_0xbba10b){_0x8a2229['push'](_0x8a2229['shift']());}}}(a48_0x4d00,0xf262f));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x107046){const _0xe52b7f=a48_0x2352,_0x35cb08=_0x107046['str'](_0xe52b7f(0x18c));if(!_0x35cb08)throw CliErrors[_0xe52b7f(0x189)](_0xe52b7f(0x18d),_0xe52b7f(0x17d)+CLI_BIN_NAME+_0xe52b7f(0x17e));const _0xe5f793=readConfig(),_0x4ff057=_0x35cb08===_0xe52b7f(0x18f)?_0xe52b7f(0x18e):_0x35cb08,_0x5d26f5=_0xe5f793[_0x4ff057];if(_0x5d26f5===undefined)throw CliErrors[_0xe52b7f(0x189)](_0xe52b7f(0x18a)+_0x35cb08);return{'ok':!![],'data':typeof _0x5d26f5===_0xe52b7f(0x181)?_0x5d26f5:{[_0x4ff057]:_0x5d26f5},'message':typeof _0x5d26f5==='object'?undefined:String(_0x5d26f5)};}function a48_0x2352(_0x171ed8,_0x42ff58){_0x171ed8=_0x171ed8-0x17c;const _0x4d0012=a48_0x4d00();let _0x235205=_0x4d0012[_0x171ed8];return _0x235205;}function a48_0x4d00(){const _0x42b82e=['key','Missing\x20key.','appcode','app','7WhVTsn','5056374yGIbYw','2cxDdXR','744493pcowTG','3611448brxDvk','Usage:\x20','\x20config\x20get\x20--key\x20<key>','config','2889030yMQnPy','object','435oeyrdj','18LxBFfK','string','4104408ndcvHn','Get\x20a\x20config\x20value\x20by\x20key','4272340UoxMNB','read','validation','Key\x20not\x20found:\x20','22076PmakTp'];a48_0x4d00=function(){return _0x42b82e;};return a48_0x4d00();}export const configGetDefinition={'service':a48_0x3f049e(0x17f),'command':'get','description':a48_0x3f049e(0x186),'risk':a48_0x3f049e(0x188),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a48_0x3f049e(0x18c),'type':a48_0x3f049e(0x184),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a47_0x24aaa4=a47_0x1b81;(function(_0x242d8e,_0x36ccd3){const _0x5bc25c=a47_0x1b81,_0x388cd5=_0x242d8e();while(!![]){try{const _0x58bc74=-parseInt(_0x5bc25c(0x103))/0x1*(parseInt(_0x5bc25c(0x10e))/0x2)+parseInt(_0x5bc25c(0x105))/0x3*(parseInt(_0x5bc25c(0x114))/0x4)+-parseInt(_0x5bc25c(0x112))/0x5+-parseInt(_0x5bc25c(0x113))/0x6*(-parseInt(_0x5bc25c(0x10d))/0x7)+parseInt(_0x5bc25c(0x104))/0x8*(parseInt(_0x5bc25c(0x108))/0x9)+parseInt(_0x5bc25c(0xfe))/0xa*(-parseInt(_0x5bc25c(0xfc))/0xb)+-parseInt(_0x5bc25c(0x10a))/0xc*(parseInt(_0x5bc25c(0x109))/0xd);if(_0x58bc74===_0x36ccd3)break;else _0x388cd5['push'](_0x388cd5['shift']());}catch(_0x30775f){_0x388cd5['push'](_0x388cd5['shift']());}}}(a47_0x5f25,0xf0c12));import{CliErrors}from'../../errors.js';function a47_0x1b81(_0x47b459,_0x2127e2){_0x47b459=_0x47b459-0xfb;const _0x5f2550=a47_0x5f25();let _0x1b81bd=_0x5f2550[_0x47b459];return _0x1b81bd;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5a5367){const _0x453a1c=a47_0x1b81,_0xa64205=_0x5a5367[_0x453a1c(0xfd)]('key');if(!_0xa64205)throw CliErrors[_0x453a1c(0x10f)](_0x453a1c(0xfb),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x2b4801=readConfig(),_0x1c9216=_0xa64205===_0x453a1c(0x111)?_0x453a1c(0x101):_0xa64205,_0x12b187=_0x2b4801[_0x1c9216];if(_0x12b187===undefined)throw CliErrors['validation'](_0x453a1c(0x100)+_0xa64205);return{'ok':!![],'data':typeof _0x12b187===_0x453a1c(0x107)?_0x12b187:{[_0x1c9216]:_0x12b187},'message':typeof _0x12b187===_0x453a1c(0x107)?undefined:String(_0x12b187)};}function a47_0x5f25(){const _0x329869=['1446SUBIxT','688gAqIwE','Missing\x20key.','8665679eRHfPm','str','10RXpPiV','config','Key\x20not\x20found:\x20','appcode','string','3334VGeGrK','80xKPMDH','24246SZgtEl','get','object','1444833KpEIZV','31690321potgfQ','12vwMwzK','Get\x20a\x20config\x20value\x20by\x20key','key','53137rxVokQ','6prqYDx','validation','read','app','3016335UzGLQW'];a47_0x5f25=function(){return _0x329869;};return a47_0x5f25();}export const configGetDefinition={'service':a47_0x24aaa4(0xff),'command':a47_0x24aaa4(0x106),'description':a47_0x24aaa4(0x10b),'risk':a47_0x24aaa4(0x110),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a47_0x24aaa4(0x10c),'type':a47_0x24aaa4(0x102),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x465d43,_0x496d7b){const _0x7e848a=a49_0x24ca,_0x5644dc=_0x465d43();while(!![]){try{const _0x466431=parseInt(_0x7e848a(0x1e6))/0x1+parseInt(_0x7e848a(0x1e7))/0x2*(-parseInt(_0x7e848a(0x1e9))/0x3)+parseInt(_0x7e848a(0x1ed))/0x4*(-parseInt(_0x7e848a(0x1f0))/0x5)+parseInt(_0x7e848a(0x1ea))/0x6+-parseInt(_0x7e848a(0x1ec))/0x7*(parseInt(_0x7e848a(0x1e5))/0x8)+-parseInt(_0x7e848a(0x1ee))/0x9*(-parseInt(_0x7e848a(0x1ef))/0xa)+parseInt(_0x7e848a(0x1e8))/0xb*(parseInt(_0x7e848a(0x1eb))/0xc);if(_0x466431===_0x496d7b)break;else _0x5644dc['push'](_0x5644dc['shift']());}catch(_0x4d283b){_0x5644dc['push'](_0x5644dc['shift']());}}}(a49_0x32bc,0x2e09d));function a49_0x24ca(_0x5e054,_0x42051e){_0x5e054=_0x5e054-0x1e5;const _0x32bc32=a49_0x32bc();let _0x24ca42=_0x32bc32[_0x5e054];return _0x24ca42;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a49_0x32bc(){const _0x1e63b6=['1103874phDtMu','1360740DqfMjy','308Ukdfkl','16424LBJxJE','207ymnTdR','61150eFJgFu','225dBoBcf','14856frWbfn','119344kJNXwT','25578KLyNNU','11UTRcHX','24BxEfgL'];a49_0x32bc=function(){return _0x1e63b6;};return a49_0x32bc();}
1
+ (function(_0x2bb213,_0x7f8da4){const _0x10ff59=a48_0x57d3,_0x2f0818=_0x2bb213();while(!![]){try{const _0x464b2f=parseInt(_0x10ff59(0x122))/0x1+parseInt(_0x10ff59(0x123))/0x2*(parseInt(_0x10ff59(0x128))/0x3)+parseInt(_0x10ff59(0x120))/0x4*(parseInt(_0x10ff59(0x12a))/0x5)+-parseInt(_0x10ff59(0x127))/0x6*(-parseInt(_0x10ff59(0x124))/0x7)+parseInt(_0x10ff59(0x121))/0x8*(parseInt(_0x10ff59(0x125))/0x9)+-parseInt(_0x10ff59(0x129))/0xa+-parseInt(_0x10ff59(0x126))/0xb;if(_0x464b2f===_0x7f8da4)break;else _0x2f0818['push'](_0x2f0818['shift']());}catch(_0x112136){_0x2f0818['push'](_0x2f0818['shift']());}}}(a48_0x6288,0xaf7a5));function a48_0x57d3(_0x3b8241,_0x2ce7da){_0x3b8241=_0x3b8241-0x120;const _0x62887b=a48_0x6288();let _0x57d35d=_0x62887b[_0x3b8241];return _0x57d35d;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a48_0x6288(){const _0x460241=['3207ONUxlz','8143830vlNEWI','80hcassZ','45528QTRtNY','2136lXmiRe','1374505wRXUoB','1626IQeZwj','35959eLIedO','14913bsIRfL','25477760zgEAMX','1146AaqNXz'];a48_0x6288=function(){return _0x460241;};return a48_0x6288();}
@@ -1 +1 @@
1
- function a50_0x6ea4(_0x3cf5d,_0x120e20){_0x3cf5d=_0x3cf5d-0x1d4;const _0x820b8e=a50_0x820b();let _0x6ea49a=_0x820b8e[_0x3cf5d];return _0x6ea49a;}const a50_0x14e9f6=a50_0x6ea4;(function(_0x134194,_0x5aa007){const _0x3a2052=a50_0x6ea4,_0x5e538e=_0x134194();while(!![]){try{const _0x28c383=parseInt(_0x3a2052(0x1d6))/0x1*(-parseInt(_0x3a2052(0x1e0))/0x2)+-parseInt(_0x3a2052(0x1e1))/0x3+parseInt(_0x3a2052(0x1df))/0x4*(-parseInt(_0x3a2052(0x1de))/0x5)+-parseInt(_0x3a2052(0x1e3))/0x6+-parseInt(_0x3a2052(0x1dd))/0x7*(-parseInt(_0x3a2052(0x1d8))/0x8)+parseInt(_0x3a2052(0x1d5))/0x9+-parseInt(_0x3a2052(0x1e2))/0xa*(-parseInt(_0x3a2052(0x1dc))/0xb);if(_0x28c383===_0x5aa007)break;else _0x5e538e['push'](_0x5e538e['shift']());}catch(_0x3d18c8){_0x5e538e['push'](_0x5e538e['shift']());}}}(a50_0x820b,0x889a0));import{readScopedConfig}from'../../commands/config/shared.js';function a50_0x820b(){const _0x122a3a=['110989iQnYZT','global','20464XxuvbI','bool','List\x20all\x20config\x20values','read','11zogDnR','553EvEQKn','910wRZYrj','22156YGRfzl','18upZoGH','1787151GcCJrQ','30456590ngfJgF','676194qpnjmQ','list','244746OFEynh'];a50_0x820b=function(){return _0x122a3a;};return a50_0x820b();}import{readConfig}from'../../utils/config.js';async function execute(_0x3ca65a){const _0x29f4e0=a50_0x6ea4,_0xcaa08=_0x3ca65a[_0x29f4e0(0x1d9)](_0x29f4e0(0x1d7))?readScopedConfig(_0x29f4e0(0x1d7)):readConfig();return{'ok':!![],'data':_0xcaa08};}export const configListDefinition={'service':'config','command':a50_0x14e9f6(0x1d4),'description':a50_0x14e9f6(0x1da),'risk':a50_0x14e9f6(0x1db),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a49_0x274643=a49_0xe25d;(function(_0x21b7ec,_0x2947bc){const _0x443fcc=a49_0xe25d,_0x273e13=_0x21b7ec();while(!![]){try{const _0x378fe4=parseInt(_0x443fcc(0xe2))/0x1*(-parseInt(_0x443fcc(0xe8))/0x2)+parseInt(_0x443fcc(0xed))/0x3*(-parseInt(_0x443fcc(0xe6))/0x4)+-parseInt(_0x443fcc(0xdb))/0x5*(parseInt(_0x443fcc(0xe4))/0x6)+-parseInt(_0x443fcc(0xdc))/0x7*(parseInt(_0x443fcc(0xeb))/0x8)+-parseInt(_0x443fcc(0xe0))/0x9*(-parseInt(_0x443fcc(0xdd))/0xa)+parseInt(_0x443fcc(0xe9))/0xb*(parseInt(_0x443fcc(0xde))/0xc)+-parseInt(_0x443fcc(0xdf))/0xd*(-parseInt(_0x443fcc(0xe7))/0xe);if(_0x378fe4===_0x2947bc)break;else _0x273e13['push'](_0x273e13['shift']());}catch(_0x21cf65){_0x273e13['push'](_0x273e13['shift']());}}}(a49_0x5277,0x393a4));function a49_0xe25d(_0x29a35d,_0x2dd632){_0x29a35d=_0x29a35d-0xda;const _0x5277f5=a49_0x5277();let _0xe25d7e=_0x5277f5[_0x29a35d];return _0xe25d7e;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x28880f){const _0x31ae90=a49_0xe25d,_0x7a79a2=_0x28880f[_0x31ae90(0xec)](_0x31ae90(0xe3))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x7a79a2};}export const configListDefinition={'service':'config','command':a49_0x274643(0xea),'description':a49_0x274643(0xe5),'risk':a49_0x274643(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':a49_0x274643(0xe1),'default':![]}],'execute':execute};function a49_0x5277(){const _0x145615=['67930CbcYAR','287412LooCgq','40183IDqZQE','387dfScHf','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','69WXMgqv','global','6xKUbtO','List\x20all\x20config\x20values','4dCGAZT','2842tFVbFA','3298wgTPDl','22gVcdNZ','list','32wlZKFD','bool','894705CuJBFZ','read','1161830UpVCFt','155204MpdQzc'];a49_0x5277=function(){return _0x145615;};return a49_0x5277();}
@@ -1 +1 @@
1
- const a51_0x5b1100=a51_0x4047;(function(_0x37955d,_0x185f0a){const _0x28e604=a51_0x4047,_0xff86f1=_0x37955d();while(!![]){try{const _0xe76715=-parseInt(_0x28e604(0x7d))/0x1*(parseInt(_0x28e604(0x8f))/0x2)+-parseInt(_0x28e604(0x7a))/0x3+-parseInt(_0x28e604(0x91))/0x4+parseInt(_0x28e604(0x6e))/0x5+parseInt(_0x28e604(0x96))/0x6+-parseInt(_0x28e604(0x73))/0x7*(-parseInt(_0x28e604(0x67))/0x8)+parseInt(_0x28e604(0x87))/0x9;if(_0xe76715===_0x185f0a)break;else _0xff86f1['push'](_0xff86f1['shift']());}catch(_0x3624ed){_0xff86f1['push'](_0xff86f1['shift']());}}}(a51_0x1455,0xbd067));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a51_0x4047(_0x3728f3,_0x553407){_0x3728f3=_0x3728f3-0x67;const _0x145500=a51_0x1455();let _0x4047a0=_0x145500[_0x3728f3];return _0x4047a0;}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x1455(){const _0x4d33e1=['boolean','Invalid\x20locale\x20value.','Project','228eKnkLw','key','6127884OtKEXj','str','validation','Settable\x20top-level\x20keys:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','1430574PtZezO','2402280TRgsgw','object','riskLevel','Invalid\x20value\x20for\x20\x22','length','join','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','2372555Ajbdxr','Config\x20value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Usage:\x20','env','21trkTbU','apps','Top-level\x20key\x20\x22','Use\x20`','string','\x20app\x20add\x20<name>\x20--appcode\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','899355XoxLSO','includes','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','77rMOqzf','locale','bool','set','value','Global','Missing\x20key.','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Set\x20a\x20config\x20value','keys','9008874qfTpfb','\x22\x20is\x20not\x20settable.','global','appcode','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US'];a51_0x1455=function(){return _0x4d33e1;};return a51_0x1455();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0xe2a7dd){const _0x245efa=a51_0x4047,_0x339e66=_0xe2a7dd[_0x245efa(0x92)](_0x245efa(0x90)),_0x2cf158=_0xe2a7dd[_0x245efa(0x92)](_0x245efa(0x81));if(!_0x339e66)throw CliErrors['validation'](_0x245efa(0x83),_0x245efa(0x71)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x2cf158===undefined||_0x2cf158==='')throw CliErrors[_0x245efa(0x93)]('Missing\x20value.',_0x245efa(0x71)+CLI_BIN_NAME+_0x245efa(0x6d));if(_0x2cf158[_0x245efa(0x6b)]>0x1f4)throw CliErrors[_0x245efa(0x93)](_0x245efa(0x70));if(!isTopLevelConfigKey(_0x339e66))throw CliErrors[_0x245efa(0x93)](_0x245efa(0x75)+_0x339e66+_0x245efa(0x88),_0x245efa(0x94)+getTopLevelConfigKeySummary());if(_0x339e66===_0x245efa(0x69))throw CliErrors[_0x245efa(0x93)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x339e66]&&!CONFIG_ENUM_VALUES[_0x339e66][_0x245efa(0x7b)](_0x2cf158))throw CliErrors[_0x245efa(0x93)](_0x245efa(0x6a)+_0x339e66+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x339e66][_0x245efa(0x6c)](',\x20'));if(_0x339e66==='locale'&&!normalizeLocale(_0x2cf158))throw CliErrors['validation'](_0x245efa(0x8d),_0x245efa(0x8b));const _0x30ba42={'global':_0xe2a7dd[_0x245efa(0x7f)](_0x245efa(0x89))},_0x415b47=resolveWriteScope(_0x30ba42),_0x1035c7=readScopedConfig(_0x415b47);let _0x5668ca=_0x339e66,_0x563e1e=_0x2cf158;_0x339e66==='app'&&(_0x5668ca='appcode',delete _0x1035c7['app']);_0x339e66===_0x245efa(0x7e)&&(_0x563e1e=normalizeLocale(_0x2cf158));if(_0x339e66==='env'){_0x563e1e=normalizeEnv(_0x2cf158);if(!isProduction(_0x563e1e)&&!isDaily(_0x563e1e))throw CliErrors[_0x245efa(0x93)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x245efa(0x95));}if(_0x339e66===_0x245efa(0x8a)){const _0x2e8742=_0x1035c7[_0x245efa(0x74)]&&typeof _0x1035c7['apps']===_0x245efa(0x68)?Object[_0x245efa(0x86)](_0x1035c7['apps']):[];if(_0x2e8742[_0x245efa(0x6b)]>0x0)throw CliErrors[_0x245efa(0x93)](_0x245efa(0x79),_0x245efa(0x76)+CLI_BIN_NAME+_0x245efa(0x78)+_0x563e1e+'`,\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x7deb7=buildCanonicalProjectConfig({..._0x1035c7},{'appCodes':[_0x563e1e],'env':typeof _0x1035c7[_0x245efa(0x72)]===_0x245efa(0x77)?_0x1035c7[_0x245efa(0x72)]:undefined});writeScopedConfig(_0x7deb7,_0x415b47);const _0x59cff9=_0x415b47===_0x245efa(0x89)?'Global':_0x245efa(0x8e);return{'ok':!![],'message':'✓\x20'+_0x59cff9+'\x20appcode\x20set\x20to:\x20'+_0x563e1e+_0x245efa(0x7c)};}_0x1035c7[_0x5668ca]=_0x563e1e,writeScopedConfig(_0x1035c7,_0x415b47);const _0x1fa626=_0x415b47==='global'?_0x245efa(0x82):_0x245efa(0x8e);return{'ok':!![],'message':'✓\x20'+_0x1fa626+'\x20'+_0x5668ca+'\x20set\x20to:\x20'+_0x563e1e};}export const configSetDefinition={'service':'config','command':a51_0x5b1100(0x80),'description':a51_0x5b1100(0x85),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x5b1100(0x90),'type':a51_0x5b1100(0x77),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a51_0x5b1100(0x81),'type':a51_0x5b1100(0x77),'description':a51_0x5b1100(0x6f),'required':!![]},{'name':'global','type':a51_0x5b1100(0x8c),'description':a51_0x5b1100(0x84),'default':![]}],'execute':execute};
1
+ function a50_0x45c6(){const _0x3d8db0=['length','2633170oZHNqL','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','370tcAHdi','apps','appcode','bool','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','global','validation','Config\x20value','Global','Settable\x20top-level\x20keys:\x20','env','Project','3975651RvtnVJ','929524NXPyLY','str','Missing\x20key.','2397444UyKGXq','Usage:\x20','\x22.\x20Allowed:\x20','3YouUAE','string','config','Invalid\x20value\x20for\x20\x22','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','write','3200184cekpRi','Missing\x20value.','join','\x20set\x20to:\x20','key','Use\x20`','34uHEEXJ','Invalid\x20locale\x20value.','riskLevel','keys','35021Tvdqho','boolean','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','value','Top-level\x20key\x20\x22','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','object','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','locale','8dSBdqE','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','app','226765fEzEcq'];a50_0x45c6=function(){return _0x3d8db0;};return a50_0x45c6();}const a50_0x4fc045=a50_0x830a;(function(_0xaf404a,_0x5ddb19){const _0x4e6365=a50_0x830a,_0x29f365=_0xaf404a();while(!![]){try{const _0x3d14de=parseInt(_0x4e6365(0xbf))/0x1*(parseInt(_0x4e6365(0xbb))/0x2)+parseInt(_0x4e6365(0xaf))/0x3*(-parseInt(_0x4e6365(0xa9))/0x4)+parseInt(_0x4e6365(0x9a))/0x5+-parseInt(_0x4e6365(0xb5))/0x6+-parseInt(_0x4e6365(0xac))/0x7*(parseInt(_0x4e6365(0xc8))/0x8)+-parseInt(_0x4e6365(0xa8))/0x9+-parseInt(_0x4e6365(0x9c))/0xa*(-parseInt(_0x4e6365(0xcb))/0xb);if(_0x3d14de===_0x5ddb19)break;else _0x29f365['push'](_0x29f365['shift']());}catch(_0x22051a){_0x29f365['push'](_0x29f365['shift']());}}}(a50_0x45c6,0x51bb2));function a50_0x830a(_0x567bcb,_0xe5c7a5){_0x567bcb=_0x567bcb-0x99;const _0x45c607=a50_0x45c6();let _0x830a30=_0x45c607[_0x567bcb];return _0x830a30;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x97ea69){const _0x4b6e8f=a50_0x830a,_0x1c0e87=_0x97ea69[_0x4b6e8f(0xaa)](_0x4b6e8f(0xb9)),_0x4a2083=_0x97ea69['str'](_0x4b6e8f(0xc2));if(!_0x1c0e87)throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xab),_0x4b6e8f(0xad)+CLI_BIN_NAME+_0x4b6e8f(0xc9));if(_0x4a2083===undefined||_0x4a2083==='')throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xb6),_0x4b6e8f(0xad)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4a2083[_0x4b6e8f(0x99)]>0x1f4)throw CliErrors['validation'](_0x4b6e8f(0xa0));if(!isTopLevelConfigKey(_0x1c0e87))throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xc3)+_0x1c0e87+'\x22\x20is\x20not\x20settable.',_0x4b6e8f(0xa5)+getTopLevelConfigKeySummary());if(_0x1c0e87===_0x4b6e8f(0xbd))throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xc6));if(CONFIG_ENUM_VALUES[_0x1c0e87]&&!CONFIG_ENUM_VALUES[_0x1c0e87]['includes'](_0x4a2083))throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xb2)+_0x1c0e87+_0x4b6e8f(0xae)+CONFIG_ENUM_VALUES[_0x1c0e87][_0x4b6e8f(0xb7)](',\x20'));if(_0x1c0e87==='locale'&&!normalizeLocale(_0x4a2083))throw CliErrors[_0x4b6e8f(0xa2)](_0x4b6e8f(0xbc),_0x4b6e8f(0xc4));const _0x186a30={'global':_0x97ea69[_0x4b6e8f(0x9f)](_0x4b6e8f(0xa1))},_0xe63a16=resolveWriteScope(_0x186a30),_0x3960bb=readScopedConfig(_0xe63a16);let _0x38e771=_0x1c0e87,_0x3ac1fe=_0x4a2083;_0x1c0e87===_0x4b6e8f(0xca)&&(_0x38e771='appcode',delete _0x3960bb['app']);_0x1c0e87===_0x4b6e8f(0xc7)&&(_0x3ac1fe=normalizeLocale(_0x4a2083));if(_0x1c0e87==='env'){_0x3ac1fe=normalizeEnv(_0x4a2083);if(!isProduction(_0x3ac1fe)&&!isDaily(_0x3ac1fe))throw CliErrors[_0x4b6e8f(0xa2)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x4b6e8f(0xc1));}if(_0x1c0e87===_0x4b6e8f(0x9e)){const _0x33a4d4=_0x3960bb['apps']&&typeof _0x3960bb[_0x4b6e8f(0x9d)]===_0x4b6e8f(0xc5)?Object[_0x4b6e8f(0xbe)](_0x3960bb[_0x4b6e8f(0x9d)]):[];if(_0x33a4d4[_0x4b6e8f(0x99)]>0x0)throw CliErrors[_0x4b6e8f(0xa2)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x4b6e8f(0xba)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20'+_0x3ac1fe+'`,\x20`'+CLI_BIN_NAME+_0x4b6e8f(0x9b));const _0x5e01e6=buildCanonicalProjectConfig({..._0x3960bb},{'appCodes':[_0x3ac1fe],'env':typeof _0x3960bb[_0x4b6e8f(0xa6)]===_0x4b6e8f(0xb0)?_0x3960bb[_0x4b6e8f(0xa6)]:undefined});writeScopedConfig(_0x5e01e6,_0xe63a16);const _0x2a4b9c=_0xe63a16==='global'?_0x4b6e8f(0xa4):_0x4b6e8f(0xa7);return{'ok':!![],'message':'✓\x20'+_0x2a4b9c+'\x20appcode\x20set\x20to:\x20'+_0x3ac1fe+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x3960bb[_0x38e771]=_0x3ac1fe,writeScopedConfig(_0x3960bb,_0xe63a16);const _0x286ba9=_0xe63a16===_0x4b6e8f(0xa1)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x286ba9+'\x20'+_0x38e771+_0x4b6e8f(0xb8)+_0x3ac1fe};}export const configSetDefinition={'service':a50_0x4fc045(0xb1),'command':'set','description':'Set\x20a\x20config\x20value','risk':a50_0x4fc045(0xb4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x4fc045(0xb0),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a50_0x4fc045(0xc2),'type':a50_0x4fc045(0xb0),'description':a50_0x4fc045(0xa3),'required':!![]},{'name':a50_0x4fc045(0xa1),'type':a50_0x4fc045(0xc0),'description':a50_0x4fc045(0xb3),'default':![]}],'execute':execute};