@lovrabet/rabetbase-cli 2.0.4-beta.5 → 2.0.5

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 (135) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/build.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/doctor.js +1 -1
  53. package/lib/commands/init/index.js +1 -1
  54. package/lib/commands/logs/index.js +1 -1
  55. package/lib/commands/menu/index.js +1 -1
  56. package/lib/commands/menu/shared/compare-table.js +1 -1
  57. package/lib/commands/menu/shared/index.js +1 -1
  58. package/lib/commands/menu/shared/inquirer.js +1 -1
  59. package/lib/commands/menu/shared/local-pages.js +1 -1
  60. package/lib/commands/menu/shared/logic.js +1 -1
  61. package/lib/commands/menu/shared/service.js +1 -1
  62. package/lib/commands/menu/shared/sync-core.js +1 -1
  63. package/lib/commands/menu/shared/update-core.js +1 -1
  64. package/lib/commands/menu/shared/valid-url.js +1 -1
  65. package/lib/commands/menu/sync.js +1 -1
  66. package/lib/commands/menu/update.js +1 -1
  67. package/lib/commands/preview.js +1 -1
  68. package/lib/commands/project/index.js +1 -1
  69. package/lib/commands/project-upgrade.js +1 -1
  70. package/lib/commands/registry.js +1 -1
  71. package/lib/commands/run/index.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/sql/detail.js +1 -1
  74. package/lib/commands/sql/exec.js +1 -1
  75. package/lib/commands/sql/index.js +1 -1
  76. package/lib/commands/sql/list.js +1 -1
  77. package/lib/commands/sql/save.js +1 -1
  78. package/lib/commands/sql/validate.js +1 -1
  79. package/lib/commands/start.js +1 -1
  80. package/lib/constant/cli.js +1 -1
  81. package/lib/constant/domain.js +1 -1
  82. package/lib/constant/env.js +1 -1
  83. package/lib/context.js +1 -1
  84. package/lib/core/alias-resolver.js +1 -1
  85. package/lib/core/api-client.js +1 -1
  86. package/lib/core/bff/config.js +1 -1
  87. package/lib/core/bff/file-system.js +1 -1
  88. package/lib/core/bff/hash.js +1 -1
  89. package/lib/core/bff/lock.js +1 -1
  90. package/lib/core/bff/utils.js +1 -1
  91. package/lib/core/db-resolver.js +1 -1
  92. package/lib/core/sql-validator.js +1 -1
  93. package/lib/create-app/enhanced-guided-create.js +1 -1
  94. package/lib/create-app/format-elapsed.js +1 -1
  95. package/lib/create-app/main.js +1 -1
  96. package/lib/create-app/non-interactive.js +1 -1
  97. package/lib/create-app/use-copy-project-template.js +1 -1
  98. package/lib/create-app/use-format-code.js +1 -1
  99. package/lib/create-app/use-install-dependencies.js +1 -1
  100. package/lib/errors.js +1 -1
  101. package/lib/framework/flags.js +1 -1
  102. package/lib/framework/help.js +1 -1
  103. package/lib/framework/index.js +1 -1
  104. package/lib/framework/output.js +1 -1
  105. package/lib/framework/response.js +1 -1
  106. package/lib/framework/runner.js +1 -1
  107. package/lib/framework/types.js +1 -1
  108. package/lib/generated/build-info.js +1 -1
  109. package/lib/help.js +1 -1
  110. package/lib/init/main.js +1 -1
  111. package/lib/skills/main.js +1 -1
  112. package/lib/skills/npx-skills-add.js +1 -1
  113. package/lib/telemetry/cli-command-trace.js +1 -1
  114. package/lib/telemetry/cli-help-trace.js +1 -1
  115. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  116. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  117. package/lib/telemetry/send-cli-trace-log.js +1 -1
  118. package/lib/utils/ai_config.js +1 -1
  119. package/lib/utils/cdn-config.js +1 -1
  120. package/lib/utils/check-sdk-version.js +1 -1
  121. package/lib/utils/cli-version-check.js +1 -1
  122. package/lib/utils/config.js +1 -1
  123. package/lib/utils/copy-directory.js +1 -1
  124. package/lib/utils/file-utils.js +1 -1
  125. package/lib/utils/guides-cdn.js +1 -1
  126. package/lib/utils/http-client.js +1 -1
  127. package/lib/utils/is-non-interactive.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/platform.js +1 -1
  130. package/lib/utils/rules-cdn.js +1 -1
  131. package/lib/utils/sleep.js +1 -1
  132. package/lib/utils/template-replacer.js +1 -1
  133. package/lib/utils/version.js +1 -1
  134. package/lib/utils/with-active-cookie.js +1 -1
  135. package/package.json +2 -2
@@ -1 +1 @@
1
- function a20_0x4fcc(){const _0x33d91d=['2191085KzaLAM','322832SpUpwc','remote','read','map','List\x20apps\x20available\x20on\x20the\x20platform','21dqzyAd','1ZBgDAS','553185DTaHvp','appCode','312174aomyRg','cookie','483022yZkkzm','104950LSKiCd','2677632CJSCTD','../../core/api-client.js','225wiVWFW'];a20_0x4fcc=function(){return _0x33d91d;};return a20_0x4fcc();}const a20_0x28b3a3=a20_0x1878;(function(_0x3ff343,_0x2cb1ba){const _0x227f38=a20_0x1878,_0x2ee4f6=_0x3ff343();while(!![]){try{const _0x261e22=-parseInt(_0x227f38(0x11a))/0x1*(-parseInt(_0x227f38(0x11f))/0x2)+-parseInt(_0x227f38(0x11b))/0x3+-parseInt(_0x227f38(0x125))/0x4+-parseInt(_0x227f38(0x124))/0x5+parseInt(_0x227f38(0x11d))/0x6*(parseInt(_0x227f38(0x119))/0x7)+parseInt(_0x227f38(0x121))/0x8+parseInt(_0x227f38(0x123))/0x9*(parseInt(_0x227f38(0x120))/0xa);if(_0x261e22===_0x2cb1ba)break;else _0x2ee4f6['push'](_0x2ee4f6['shift']());}catch(_0x272eb8){_0x2ee4f6['push'](_0x2ee4f6['shift']());}}}(a20_0x4fcc,0x4721d));import{listRemoteApps}from'../../core/api-client.js';function a20_0x1878(_0x46f456,_0x17521b){_0x46f456=_0x46f456-0x116;const _0x4fcc41=a20_0x4fcc();let _0x187806=_0x4fcc41[_0x46f456];return _0x187806;}async function execute(_0x28f35d){const _0x2bc866=a20_0x1878,{setActiveCookie:_0x5508df}=await import(_0x2bc866(0x122));_0x5508df(_0x28f35d[_0x2bc866(0x11e)]);const _0x458d87=await listRemoteApps(),_0x476806=_0x458d87[_0x2bc866(0x117)](_0x459f15=>({..._0x459f15['id']!=null?{'id':_0x459f15['id']}:{},'appCode':_0x459f15[_0x2bc866(0x11c)],'appName':_0x459f15['appName'],..._0x459f15['appDesc']!=null?{'appDesc':_0x459f15['appDesc']}:{}}));return{'ok':!![],'data':_0x476806};}export const appRemoteDefinition={'service':'app','command':a20_0x28b3a3(0x126),'description':a20_0x28b3a3(0x118),'risk':a20_0x28b3a3(0x116),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ const a20_0x420ce9=a20_0x492e;(function(_0x5aa8e1,_0x53d778){const _0x5553e1=a20_0x492e,_0x2c463c=_0x5aa8e1();while(!![]){try{const _0x56741b=-parseInt(_0x5553e1(0x7d))/0x1*(parseInt(_0x5553e1(0x8b))/0x2)+-parseInt(_0x5553e1(0x80))/0x3*(-parseInt(_0x5553e1(0x83))/0x4)+parseInt(_0x5553e1(0x7c))/0x5+-parseInt(_0x5553e1(0x82))/0x6*(-parseInt(_0x5553e1(0x87))/0x7)+-parseInt(_0x5553e1(0x81))/0x8+parseInt(_0x5553e1(0x8a))/0x9+parseInt(_0x5553e1(0x89))/0xa;if(_0x56741b===_0x53d778)break;else _0x2c463c['push'](_0x2c463c['shift']());}catch(_0x5e5514){_0x2c463c['push'](_0x2c463c['shift']());}}}(a20_0x5c77,0x2a152));function a20_0x492e(_0xeef9ca,_0x3e5a61){_0xeef9ca=_0xeef9ca-0x7c;const _0x5c77dc=a20_0x5c77();let _0x492ed3=_0x5c77dc[_0xeef9ca];return _0x492ed3;}import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x25730c){const _0x289e81=a20_0x492e,{setActiveCookie:_0x4ce6d0}=await import('../../core/api-client.js');_0x4ce6d0(_0x25730c[_0x289e81(0x84)]);const _0x1b7ba3=await listRemoteApps(),_0x1fab9f=_0x1b7ba3['map'](_0x5f2d04=>({..._0x5f2d04['id']!=null?{'id':_0x5f2d04['id']}:{},'appCode':_0x5f2d04[_0x289e81(0x7e)],'appName':_0x5f2d04['appName'],..._0x5f2d04[_0x289e81(0x86)]!=null?{'appDesc':_0x5f2d04[_0x289e81(0x86)]}:{}}));return{'ok':!![],'data':_0x1fab9f};}export const appRemoteDefinition={'service':'app','command':a20_0x420ce9(0x88),'description':a20_0x420ce9(0x85),'risk':a20_0x420ce9(0x7f),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};function a20_0x5c77(){const _0x58f6f8=['872PlvByd','cookie','List\x20apps\x20available\x20on\x20the\x20platform','appDesc','756xzMLgJ','remote','1074440xMiwsq','2104326fqqvQL','1028LGoHZw','616260HtVPqP','254eeSjmS','appCode','read','789eMCQUg','2582512ttQOpM','5772UmSGBG'];a20_0x5c77=function(){return _0x58f6f8;};return a20_0x5c77();}
@@ -1 +1 @@
1
- const a21_0x6d4bd=a21_0x129c;(function(_0x402612,_0x12c929){const _0x472fd2=a21_0x129c,_0x9ca8a4=_0x402612();while(!![]){try{const _0x4cc209=-parseInt(_0x472fd2(0xd9))/0x1+-parseInt(_0x472fd2(0xd4))/0x2*(parseInt(_0x472fd2(0xe4))/0x3)+-parseInt(_0x472fd2(0xea))/0x4*(parseInt(_0x472fd2(0xd8))/0x5)+-parseInt(_0x472fd2(0xe5))/0x6+parseInt(_0x472fd2(0xdc))/0x7*(parseInt(_0x472fd2(0xe2))/0x8)+-parseInt(_0x472fd2(0xe7))/0x9*(parseInt(_0x472fd2(0xdf))/0xa)+parseInt(_0x472fd2(0xe3))/0xb;if(_0x4cc209===_0x12c929)break;else _0x9ca8a4['push'](_0x9ca8a4['shift']());}catch(_0x21df56){_0x9ca8a4['push'](_0x9ca8a4['shift']());}}}(a21_0x536c,0xc4a90));import{CliErrors}from'../../errors.js';function a21_0x129c(_0x32f827,_0xd2094d){_0x32f827=_0x32f827-0xd0;const _0x536c68=a21_0x536c();let _0x129c45=_0x536c68[_0x32f827];return _0x129c45;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig}from'./shared.js';function a21_0x536c(){const _0x2c14da=['boolean','12YKKJTZ','app','remove','\x20Default\x20app\x20changed\x20to\x20\x22','308375FqBkcp','772207CEwKkh','Usage:\x20','apps','35HMWkGV','App\x20\x22','Removed\x20app\x20\x22','13967890RsSyrm','\x22\x20not\x20found.','global','977704lrEmRl','65112355TFKoXn','524397YbClue','5791110KVDHGc','Remove\x20an\x20app\x20from\x20config','9vOMmMz','Use\x20global\x20config\x20scope','bool','100YiwQbP','string','str','\x20app\x20remove\x20--name\x20<name>','defaultApp'];a21_0x536c=function(){return _0x2c14da;};return a21_0x536c();}async function execute(_0x5b1a95){const _0x44825f=a21_0x129c,_0xa4bf1f=_0x5b1a95[_0x44825f(0xd0)]('name');if(!_0xa4bf1f)throw CliErrors['validation']('Missing\x20app\x20name.',_0x44825f(0xda)+CLI_BIN_NAME+_0x44825f(0xd1));const _0x3e6024={'global':_0x5b1a95[_0x44825f(0xe9)](_0x44825f(0xe1))},_0x3b85f0=readConfig(_0x3e6024),_0x52c7e4=_0x3b85f0['apps'];if(!_0x52c7e4||!_0x52c7e4[_0xa4bf1f])throw CliErrors['validation'](_0x44825f(0xdd)+_0xa4bf1f+_0x44825f(0xe0));delete _0x52c7e4[_0xa4bf1f];let _0x2ee786='';if(_0x3b85f0['defaultApp']===_0xa4bf1f){const _0x2303bd=Object['keys'](_0x52c7e4);_0x3b85f0[_0x44825f(0xd2)]=_0x2303bd['length']>0x0?_0x2303bd[0x0]:undefined,_0x3b85f0[_0x44825f(0xd2)]?_0x2ee786=_0x44825f(0xd7)+_0x3b85f0[_0x44825f(0xd2)]+'\x22.':delete _0x3b85f0[_0x44825f(0xd2)];}return Object['keys'](_0x52c7e4)['length']===0x0&&(delete _0x3b85f0[_0x44825f(0xdb)],delete _0x3b85f0['defaultApp']),writeConfig(_0x3b85f0,_0x3e6024),{'ok':!![],'message':_0x44825f(0xde)+_0xa4bf1f+'\x22.'+_0x2ee786};}export const appRemoveDefinition={'service':a21_0x6d4bd(0xd5),'command':a21_0x6d4bd(0xd6),'description':a21_0x6d4bd(0xe6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'name','type':a21_0x6d4bd(0xeb),'description':'App\x20name\x20to\x20remove','required':!![]},{'name':'global','type':a21_0x6d4bd(0xd3),'description':a21_0x6d4bd(0xe8),'default':![]}],'execute':execute};
1
+ const a21_0x2705de=a21_0x50fb;(function(_0xc75377,_0x361e46){const _0x16c0db=a21_0x50fb,_0x4d4763=_0xc75377();while(!![]){try{const _0x1abda4=-parseInt(_0x16c0db(0xf0))/0x1+-parseInt(_0x16c0db(0xdd))/0x2*(parseInt(_0x16c0db(0xed))/0x3)+-parseInt(_0x16c0db(0xe3))/0x4*(-parseInt(_0x16c0db(0xf2))/0x5)+parseInt(_0x16c0db(0xf4))/0x6*(-parseInt(_0x16c0db(0xee))/0x7)+parseInt(_0x16c0db(0xeb))/0x8+parseInt(_0x16c0db(0xde))/0x9*(-parseInt(_0x16c0db(0xe4))/0xa)+-parseInt(_0x16c0db(0xe5))/0xb*(-parseInt(_0x16c0db(0xe6))/0xc);if(_0x1abda4===_0x361e46)break;else _0x4d4763['push'](_0x4d4763['shift']());}catch(_0x52df90){_0x4d4763['push'](_0x4d4763['shift']());}}}(a21_0x4fcc,0x8248c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a21_0x50fb(_0x1401ad,_0x4a1d32){_0x1401ad=_0x1401ad-0xd6;const _0x4fcc97=a21_0x4fcc();let _0x50fb3c=_0x4fcc97[_0x1401ad];return _0x50fb3c;}function a21_0x4fcc(){const _0x1c177b=['30ZaNgMa','global','str','apps','\x22\x20not\x20found.','Removed\x20app\x20\x22','defaultApp','Remove\x20an\x20app\x20from\x20config','614786zvGhKn','204030BYVNWO','Usage:\x20','length','string','\x20app\x20remove\x20--name\x20<name>','39704dDzOai','240PpfimI','11AuyqVR','27065076iNkwyn','boolean','validation','\x20Default\x20app\x20changed\x20to\x20\x22','Missing\x20app\x20name.','2837176bOzzpO','App\x20name\x20to\x20remove','9frBzdk','363083WxTwaU','name','1065494sNvPwe','keys','360OlQVcy','write'];a21_0x4fcc=function(){return _0x1c177b;};return a21_0x4fcc();}import{readConfig,writeConfig}from'./shared.js';async function execute(_0x14be83){const _0x558359=a21_0x50fb,_0x461b02=_0x14be83[_0x558359(0xd7)](_0x558359(0xef));if(!_0x461b02)throw CliErrors['validation'](_0x558359(0xea),_0x558359(0xdf)+CLI_BIN_NAME+_0x558359(0xe2));const _0x49383a={'global':_0x14be83['bool'](_0x558359(0xd6))},_0x35d8f5=readConfig(_0x49383a),_0x2745e2=_0x35d8f5[_0x558359(0xd8)];if(!_0x2745e2||!_0x2745e2[_0x461b02])throw CliErrors[_0x558359(0xe8)]('App\x20\x22'+_0x461b02+_0x558359(0xd9));delete _0x2745e2[_0x461b02];let _0x164e51='';if(_0x35d8f5[_0x558359(0xdb)]===_0x461b02){const _0x239c5e=Object[_0x558359(0xf1)](_0x2745e2);_0x35d8f5[_0x558359(0xdb)]=_0x239c5e[_0x558359(0xe0)]>0x0?_0x239c5e[0x0]:undefined,_0x35d8f5['defaultApp']?_0x164e51=_0x558359(0xe9)+_0x35d8f5[_0x558359(0xdb)]+'\x22.':delete _0x35d8f5['defaultApp'];}return Object['keys'](_0x2745e2)[_0x558359(0xe0)]===0x0&&(delete _0x35d8f5[_0x558359(0xd8)],delete _0x35d8f5['defaultApp']),writeConfig(_0x35d8f5,_0x49383a),{'ok':!![],'message':_0x558359(0xda)+_0x461b02+'\x22.'+_0x164e51};}export const appRemoveDefinition={'service':'app','command':'remove','description':a21_0x2705de(0xdc),'risk':a21_0x2705de(0xf3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x2705de(0xef),'type':a21_0x2705de(0xe1),'description':a21_0x2705de(0xec),'required':!![]},{'name':a21_0x2705de(0xd6),'type':a21_0x2705de(0xe7),'description':'Use\x20global\x20config\x20scope','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x2a2042,_0x5460a7){const _0x2171c3=a22_0x4fb1,_0x2384bf=_0x2a2042();while(!![]){try{const _0x24b5f7=parseInt(_0x2171c3(0x154))/0x1*(-parseInt(_0x2171c3(0x13f))/0x2)+parseInt(_0x2171c3(0x148))/0x3+-parseInt(_0x2171c3(0x156))/0x4*(parseInt(_0x2171c3(0x152))/0x5)+parseInt(_0x2171c3(0x14f))/0x6*(-parseInt(_0x2171c3(0x14e))/0x7)+parseInt(_0x2171c3(0x150))/0x8*(-parseInt(_0x2171c3(0x153))/0x9)+parseInt(_0x2171c3(0x147))/0xa*(-parseInt(_0x2171c3(0x14a))/0xb)+parseInt(_0x2171c3(0x143))/0xc;if(_0x24b5f7===_0x5460a7)break;else _0x2384bf['push'](_0x2384bf['shift']());}catch(_0x3c0ed8){_0x2384bf['push'](_0x2384bf['shift']());}}}(a22_0x1a63,0xe1282));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function getConfigPath(_0x494248={}){const _0x21acd0=a22_0x4fb1,_0x44d453=_0x494248[_0x21acd0(0x145)]?'global':_0x21acd0(0x140);return resolveWriteConfigPath(_0x44d453);}function a22_0x1a63(){const _0x3d7383=['207120uKWOzV','8iaGKdC','defaultApp','30gfveTt','1856889ypjHog','193YjDGJO','pageSize','1212076REaraF','11010QuyxSa','project','format','\x20(global)','80807544fOHVbJ','apps','global','env','380fvcggg','254904sSTvDw','appcode','343706QtMfhB','riskLevel','app','locale','329vVeClc'];a22_0x1a63=function(){return _0x3d7383;};return a22_0x1a63();}function a22_0x4fb1(_0x4d1db6,_0x362b63){_0x4d1db6=_0x4d1db6-0x13f;const _0x1a63cd=a22_0x1a63();let _0x4fb176=_0x1a63cd[_0x4d1db6];return _0x4fb176;}export function readConfig(_0x433b4e={}){return readConfigFile(getConfigPath(_0x433b4e));}export function writeConfig(_0x52617c,_0x1e8c45={}){writeConfigFile(getConfigPath(_0x1e8c45),_0x52617c);}export function scopeLabel(_0x1a6b8f){const _0x5617c3=a22_0x4fb1;return _0x1a6b8f['global']?_0x5617c3(0x142):'';}export function migrateLegacySingleApp(_0x3114d2,_0x1d626c){const _0x355ea0=a22_0x4fb1,_0x18f7d9=_0x3114d2[_0x355ea0(0x149)]||_0x3114d2[_0x355ea0(0x14c)];if(!_0x18f7d9)return;const _0x375cb0=String(_0x18f7d9);if(_0x375cb0===_0x1d626c)return;const _0x5e84db=[_0x355ea0(0x146),'apiDir','cookie','accessKey',_0x355ea0(0x141),_0x355ea0(0x155),_0x355ea0(0x14b),_0x355ea0(0x14d)],_0x36a0e4={'appcode':_0x18f7d9};for(const _0x878459 of _0x5e84db){if(_0x3114d2[_0x878459]!=null)_0x36a0e4[_0x878459]=_0x3114d2[_0x878459];}_0x3114d2[_0x355ea0(0x144)][_0x375cb0]=_0x36a0e4,_0x3114d2[_0x355ea0(0x151)]=_0x375cb0,delete _0x3114d2[_0x355ea0(0x149)],delete _0x3114d2['app'],console['log']('Migrated\x20existing\x20app\x20\x22'+_0x375cb0+'\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).');}
1
+ (function(_0x475416,_0x4d9a77){const _0x2cfa46=a22_0x5837,_0x21414b=_0x475416();while(!![]){try{const _0x38c2f8=-parseInt(_0x2cfa46(0x146))/0x1+-parseInt(_0x2cfa46(0x145))/0x2+-parseInt(_0x2cfa46(0x14c))/0x3+parseInt(_0x2cfa46(0x142))/0x4+parseInt(_0x2cfa46(0x141))/0x5*(-parseInt(_0x2cfa46(0x13b))/0x6)+-parseInt(_0x2cfa46(0x143))/0x7+parseInt(_0x2cfa46(0x13f))/0x8*(parseInt(_0x2cfa46(0x144))/0x9);if(_0x38c2f8===_0x4d9a77)break;else _0x21414b['push'](_0x21414b['shift']());}catch(_0x1b848c){_0x21414b['push'](_0x21414b['shift']());}}}(a22_0x34df,0x2c52c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function getConfigPath(_0x17116f={}){const _0x47683a=a22_0x5837,_0x4f072e=_0x17116f['global']?_0x47683a(0x148):'project';return resolveWriteConfigPath(_0x4f072e);}export function readConfig(_0x4be4b0={}){return readConfigFile(getConfigPath(_0x4be4b0));}export function writeConfig(_0x472b09,_0x976777={}){writeConfigFile(getConfigPath(_0x976777),_0x472b09);}export function scopeLabel(_0xb67ad0){const _0x51c6ec=a22_0x5837;return _0xb67ad0[_0x51c6ec(0x148)]?_0x51c6ec(0x147):'';}export function migrateLegacySingleApp(_0x3c48ba,_0x5270b9){const _0x4ad9e0=a22_0x5837,_0xdb0bf4=_0x3c48ba['appcode']||_0x3c48ba[_0x4ad9e0(0x13d)];if(!_0xdb0bf4)return;const _0x6eadde=String(_0xdb0bf4);if(_0x6eadde===_0x5270b9)return;const _0xf6bf87=[_0x4ad9e0(0x14b),_0x4ad9e0(0x139),_0x4ad9e0(0x149),'accessKey','format',_0x4ad9e0(0x14d),'riskLevel','locale'],_0x349782={'appcode':_0xdb0bf4};for(const _0x5c6045 of _0xf6bf87){if(_0x3c48ba[_0x5c6045]!=null)_0x349782[_0x5c6045]=_0x3c48ba[_0x5c6045];}_0x3c48ba[_0x4ad9e0(0x140)][_0x6eadde]=_0x349782,_0x3c48ba[_0x4ad9e0(0x13c)]=_0x6eadde,delete _0x3c48ba[_0x4ad9e0(0x138)],delete _0x3c48ba['app'],console[_0x4ad9e0(0x13e)](_0x4ad9e0(0x13a)+_0x6eadde+_0x4ad9e0(0x14a));}function a22_0x5837(_0x229e05,_0x43abdd){_0x229e05=_0x229e05-0x138;const _0x34df53=a22_0x34df();let _0x5837f1=_0x34df53[_0x229e05];return _0x5837f1;}function a22_0x34df(){const _0x49882e=['pageSize','appcode','apiDir','Migrated\x20existing\x20app\x20\x22','1214802FncsCK','defaultApp','app','log','8frzRUz','apps','5aJvaOV','1199056QgonLo','1445969mEuKbT','5648103BfCuDo','78252GCDVMu','180420cRoGUB','\x20(global)','global','cookie','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','env','351609oQGAYJ'];a22_0x34df=function(){return _0x49882e;};return a22_0x34df();}
@@ -1 +1 @@
1
- const a23_0x36a86d=a23_0x5933;(function(_0x52bb5e,_0x451555){const _0x27f5ac=a23_0x5933,_0x2413a0=_0x52bb5e();while(!![]){try{const _0x241d01=parseInt(_0x27f5ac(0x13c))/0x1+parseInt(_0x27f5ac(0x145))/0x2+-parseInt(_0x27f5ac(0x14a))/0x3*(parseInt(_0x27f5ac(0x154))/0x4)+-parseInt(_0x27f5ac(0x14f))/0x5+-parseInt(_0x27f5ac(0x150))/0x6*(-parseInt(_0x27f5ac(0x152))/0x7)+-parseInt(_0x27f5ac(0x147))/0x8+-parseInt(_0x27f5ac(0x138))/0x9*(parseInt(_0x27f5ac(0x143))/0xa);if(_0x241d01===_0x451555)break;else _0x2413a0['push'](_0x2413a0['shift']());}catch(_0x274b29){_0x2413a0['push'](_0x2413a0['shift']());}}}(a23_0x2797,0xd5a49));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a23_0x5933(_0x183101,_0x354864){_0x183101=_0x183101-0x134;const _0x27978e=a23_0x2797();let _0x593376=_0x27978e[_0x183101];return _0x593376;}import{readConfig,writeConfig,scopeLabel}from'./shared.js';async function execute(_0x3ff73c){const _0x3e36ee=a23_0x5933,_0x4759ba=_0x3ff73c[_0x3e36ee(0x14d)](_0x3e36ee(0x142));if(!_0x4759ba)throw CliErrors[_0x3e36ee(0x13e)](_0x3e36ee(0x148),_0x3e36ee(0x140)+CLI_BIN_NAME+_0x3e36ee(0x13b));const _0x222b4c={'global':_0x3ff73c['bool'](_0x3e36ee(0x144))},_0x386701=readConfig(_0x222b4c),_0x5dd411=_0x386701[_0x3e36ee(0x135)]??{};if(!_0x5dd411[_0x4759ba]){const _0x50ae56=Object[_0x3e36ee(0x137)](_0x5dd411),_0x2179b4=_0x50ae56[_0x3e36ee(0x14c)]===0x0?_0x3e36ee(0x155)+CLI_BIN_NAME+_0x3e36ee(0x139)+_0x4759ba+'\x20--appcode\x20<code>`\x20first.':_0x3e36ee(0x13f)+_0x50ae56[_0x3e36ee(0x136)](',\x20');throw CliErrors['validation'](_0x3e36ee(0x13d)+_0x4759ba+_0x3e36ee(0x14b),_0x2179b4);}return _0x386701[_0x3e36ee(0x153)]=_0x4759ba,writeConfig(_0x386701,_0x222b4c),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0x4759ba+_0x3e36ee(0x149)+_0x5dd411[_0x4759ba]['appcode']+')'+scopeLabel(_0x222b4c)};}function a23_0x2797(){const _0x2f85ca=['name','310pNYlPy','global','2372094DjdDMG','Use\x20global\x20config\x20scope','2058304nrcXpQ','Missing\x20app\x20name.','\x22\x20(appcode:\x20','186XYpdLb','\x22\x20not\x20found.','length','str','boolean','5313465LCyVuo','174TSgZRu','write','143213gsDJOm','defaultApp','41012muipmT','Use\x20`','use','apps','join','keys','75861zKMUOq','\x20app\x20add\x20--name\x20','app','\x20app\x20use\x20--name\x20<name>','1312689fVQZCh','App\x20\x22','validation','Available:\x20','Usage:\x20','Switch\x20the\x20default\x20app'];a23_0x2797=function(){return _0x2f85ca;};return a23_0x2797();}export const appUseDefinition={'service':a23_0x36a86d(0x13a),'command':a23_0x36a86d(0x134),'description':a23_0x36a86d(0x141),'risk':a23_0x36a86d(0x151),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a23_0x36a86d(0x142),'type':'string','description':'App\x20name\x20to\x20activate','required':!![]},{'name':'global','type':a23_0x36a86d(0x14e),'description':a23_0x36a86d(0x146),'default':![]}],'execute':execute};
1
+ const a23_0x1bc272=a23_0xa051;(function(_0x11ffe8,_0x5a2dfd){const _0x124aca=a23_0xa051,_0x37dbb4=_0x11ffe8();while(!![]){try{const _0x1d3885=-parseInt(_0x124aca(0x209))/0x1*(parseInt(_0x124aca(0x20d))/0x2)+parseInt(_0x124aca(0x211))/0x3*(-parseInt(_0x124aca(0x202))/0x4)+-parseInt(_0x124aca(0x1f9))/0x5+-parseInt(_0x124aca(0x1fe))/0x6+-parseInt(_0x124aca(0x1fc))/0x7*(parseInt(_0x124aca(0x1f4))/0x8)+-parseInt(_0x124aca(0x20f))/0x9*(parseInt(_0x124aca(0x20a))/0xa)+parseInt(_0x124aca(0x1f7))/0xb;if(_0x1d3885===_0x5a2dfd)break;else _0x37dbb4['push'](_0x37dbb4['shift']());}catch(_0x28351e){_0x37dbb4['push'](_0x37dbb4['shift']());}}}(a23_0x4de7,0x48c5f));function a23_0x4de7(){const _0x15fd8d=['\x22\x20not\x20found.','\x22\x20(appcode:\x20','21644117etsybk','boolean','2449360bNuRwk','validation','Missing\x20app\x20name.','7tnHJjM','defaultApp','799278nbuvwV','name','global','App\x20name\x20to\x20activate','1076mzWTFs','appcode','apps','string','bool','Use\x20`','app','8ADNZML','919510BdNryx','\x20--appcode\x20<code>`\x20first.','Usage:\x20','46454PCtrVA','\x20app\x20add\x20--name\x20','27tbtivn','App\x20\x22','993cQYogU','write','Switch\x20the\x20default\x20app','use','Use\x20global\x20config\x20scope','3966200qfiuMn'];a23_0x4de7=function(){return _0x15fd8d;};return a23_0x4de7();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig,scopeLabel}from'./shared.js';async function execute(_0x38c892){const _0x14ffa1=a23_0xa051,_0x320ee2=_0x38c892['str'](_0x14ffa1(0x1ff));if(!_0x320ee2)throw CliErrors[_0x14ffa1(0x1fa)](_0x14ffa1(0x1fb),_0x14ffa1(0x20c)+CLI_BIN_NAME+'\x20app\x20use\x20--name\x20<name>');const _0x2a7d82={'global':_0x38c892[_0x14ffa1(0x206)]('global')},_0x24a318=readConfig(_0x2a7d82),_0x1e98cb=_0x24a318[_0x14ffa1(0x204)]??{};if(!_0x1e98cb[_0x320ee2]){const _0x141f4d=Object['keys'](_0x1e98cb),_0x31faed=_0x141f4d['length']===0x0?_0x14ffa1(0x207)+CLI_BIN_NAME+_0x14ffa1(0x20e)+_0x320ee2+_0x14ffa1(0x20b):'Available:\x20'+_0x141f4d['join'](',\x20');throw CliErrors[_0x14ffa1(0x1fa)](_0x14ffa1(0x210)+_0x320ee2+_0x14ffa1(0x1f5),_0x31faed);}return _0x24a318[_0x14ffa1(0x1fd)]=_0x320ee2,writeConfig(_0x24a318,_0x2a7d82),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0x320ee2+_0x14ffa1(0x1f6)+_0x1e98cb[_0x320ee2][_0x14ffa1(0x203)]+')'+scopeLabel(_0x2a7d82)};}function a23_0xa051(_0x32e342,_0x4b8a39){_0x32e342=_0x32e342-0x1f0;const _0x4de77e=a23_0x4de7();let _0xa0517a=_0x4de77e[_0x32e342];return _0xa0517a;}export const appUseDefinition={'service':a23_0x1bc272(0x208),'command':a23_0x1bc272(0x1f2),'description':a23_0x1bc272(0x1f1),'risk':a23_0x1bc272(0x1f0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a23_0x1bc272(0x1ff),'type':a23_0x1bc272(0x205),'description':a23_0x1bc272(0x201),'required':!![]},{'name':a23_0x1bc272(0x200),'type':a23_0x1bc272(0x1f8),'description':a23_0x1bc272(0x1f3),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- function a24_0x6604(){const _0x36aaef=['6065gvEarw','11768APKySG','150mrssqj','26081vzwddF','../../auth/auth-server-ui.js','auth','login','2493uoWHjd','!\x20Not\x20logged\x20in','Clear\x20login\x20session','26wGKuwm','1346988suJLtI','1970csxRHF','log','43386ByMGTo','1055688kTALNT','✓\x20Logged\x20out','161EgvjYE','39mmhQep','22916PzVGTR','read','Login\x20via\x20browser'];a24_0x6604=function(){return _0x36aaef;};return a24_0x6604();}function a24_0x500c(_0x52258b,_0x48db93){_0x52258b=_0x52258b-0x144;const _0x660443=a24_0x6604();let _0x500cbe=_0x660443[_0x52258b];return _0x500cbe;}const a24_0x593962=a24_0x500c;(function(_0x4c980b,_0x4579fe){const _0x20bb3f=a24_0x500c,_0x5abff7=_0x4c980b();while(!![]){try{const _0x215610=-parseInt(_0x20bb3f(0x154))/0x1*(-parseInt(_0x20bb3f(0x148))/0x2)+-parseInt(_0x20bb3f(0x149))/0x3+-parseInt(_0x20bb3f(0x151))/0x4*(parseInt(_0x20bb3f(0x156))/0x5)+-parseInt(_0x20bb3f(0x14c))/0x6*(-parseInt(_0x20bb3f(0x14f))/0x7)+-parseInt(_0x20bb3f(0x155))/0x8*(-parseInt(_0x20bb3f(0x145))/0x9)+parseInt(_0x20bb3f(0x14a))/0xa*(parseInt(_0x20bb3f(0x157))/0xb)+parseInt(_0x20bb3f(0x14d))/0xc*(-parseInt(_0x20bb3f(0x150))/0xd);if(_0x215610===_0x4579fe)break;else _0x5abff7['push'](_0x5abff7['shift']());}catch(_0xce986a){_0x5abff7['push'](_0x5abff7['shift']());}}}(a24_0x6604,0x395ac));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a24_0x593962(0x144),'description':a24_0x593962(0x153),'risk':a24_0x593962(0x152),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x37a3ab){const _0x1a45b8=a24_0x593962,{runAuthServer:_0x2bb0f6}=await import(_0x1a45b8(0x158));return await _0x2bb0f6(),{'ok':!![]};}},{'service':a24_0x593962(0x159),'command':'logout','description':a24_0x593962(0x147),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x288149){const _0x559e25=a24_0x593962;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x559e25(0x14b)](_0x559e25(0x14e))):console[_0x559e25(0x14b)](_0x559e25(0x146)),{'ok':!![]};}}];
1
+ function a24_0x22b8(){const _0x337a1a=['199062GvjEFl','536qGCniF','18590170ZlLGXK','read','login','auth','5009130eXsLkp','log','2YyCRRw','6413472XDiBqc','2459220WnKvyY','Clear\x20login\x20session','11FwYDTR','457878ivMuXU','Login\x20via\x20browser','3077775cWJEMs','5kQcKZN','✓\x20Logged\x20out'];a24_0x22b8=function(){return _0x337a1a;};return a24_0x22b8();}const a24_0x449763=a24_0x57d9;(function(_0x132fda,_0x504d92){const _0x4cd949=a24_0x57d9,_0x2136dc=_0x132fda();while(!![]){try{const _0x21fb9d=-parseInt(_0x4cd949(0xc1))/0x1+parseInt(_0x4cd949(0xbc))/0x2*(-parseInt(_0x4cd949(0xc3))/0x3)+parseInt(_0x4cd949(0xbd))/0x4+parseInt(_0x4cd949(0xb2))/0x5*(-parseInt(_0x4cd949(0xbe))/0x6)+parseInt(_0x4cd949(0xba))/0x7+parseInt(_0x4cd949(0xb5))/0x8*(-parseInt(_0x4cd949(0xb4))/0x9)+-parseInt(_0x4cd949(0xb6))/0xa*(-parseInt(_0x4cd949(0xc0))/0xb);if(_0x21fb9d===_0x504d92)break;else _0x2136dc['push'](_0x2136dc['shift']());}catch(_0x3f0058){_0x2136dc['push'](_0x2136dc['shift']());}}}(a24_0x22b8,0xc3e5c));function a24_0x57d9(_0x2eb1d3,_0xa5d403){_0x2eb1d3=_0x2eb1d3-0xb2;const _0x22b821=a24_0x22b8();let _0x57d94d=_0x22b821[_0x2eb1d3];return _0x57d94d;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a24_0x449763(0xb9),'command':a24_0x449763(0xb8),'description':a24_0x449763(0xc2),'risk':a24_0x449763(0xb7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1a5586){const {runAuthServer:_0x13d35f}=await import('../../auth/auth-server-ui.js');return await _0x13d35f(),{'ok':!![]};}},{'service':a24_0x449763(0xb9),'command':'logout','description':a24_0x449763(0xbf),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x458d75){const _0x4202ac=a24_0x449763;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x4202ac(0xb3))):console[_0x4202ac(0xbb)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a25_0x2e49c8=a25_0x4115;(function(_0x1e22a2,_0x2fc100){const _0xb626e8=a25_0x4115,_0x4b2060=_0x1e22a2();while(!![]){try{const _0x3396a8=-parseInt(_0xb626e8(0x1da))/0x1*(parseInt(_0xb626e8(0x1c3))/0x2)+parseInt(_0xb626e8(0x1e3))/0x3*(-parseInt(_0xb626e8(0x1d5))/0x4)+parseInt(_0xb626e8(0x1e6))/0x5*(-parseInt(_0xb626e8(0x1ce))/0x6)+-parseInt(_0xb626e8(0x1d1))/0x7*(parseInt(_0xb626e8(0x1cd))/0x8)+-parseInt(_0xb626e8(0x1c4))/0x9*(parseInt(_0xb626e8(0x1d7))/0xa)+-parseInt(_0xb626e8(0x1d3))/0xb+parseInt(_0xb626e8(0x1df))/0xc*(parseInt(_0xb626e8(0x1db))/0xd);if(_0x3396a8===_0x2fc100)break;else _0x4b2060['push'](_0x4b2060['shift']());}catch(_0x33bda7){_0x4b2060['push'](_0x4b2060['shift']());}}}(a25_0x39e9,0x342ef));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';function a25_0x4115(_0x2e9974,_0x5b04e1){_0x2e9974=_0x2e9974-0x1bd;const _0x39e9ed=a25_0x39e9();let _0x411580=_0x39e9ed[_0x2e9974];return _0x411580;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':a25_0x2e49c8(0x1e1),'command':a25_0x2e49c8(0x1dd),'description':a25_0x2e49c8(0x1d2),'risk':a25_0x2e49c8(0x1c9),'flags':[{'name':'target','type':'string','required':!![],'description':a25_0x2e49c8(0x1bd)}],async 'validate'(_0x403239){const _0x28346a=a25_0x2e49c8,_0x38907c=loadBffProjectConfig(_0x403239['appCode']),_0xaf913e=await readBffLockFile(_0x38907c[_0x28346a(0x1c6)]);if(!_0xaf913e)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x3be5ff){const _0x1a396d=a25_0x2e49c8,_0x339ac1=loadBffProjectConfig(_0x3be5ff[_0x1a396d(0x1ea)]),_0x505a00=await readBffLockFile(_0x339ac1['lockFilePath']);if(!_0x505a00)throw CliErrors[_0x1a396d(0x1ca)](_0x1a396d(0x1dc));const {appLock:_0x4cea01}=ensureLockScope(_0x505a00,_0x3be5ff['appCode'],_0x339ac1[_0x1a396d(0x1e2)],_0x1a396d(0x1dd)),_0x30f670=_0x3be5ff['str'](_0x1a396d(0x1de)),_0x7eb1bd=Object['keys'](_0x4cea01['functions']),_0xc497fb=resolveDeleteTarget(_0x30f670,_0x7eb1bd),_0x40eca3=_0x4cea01[_0x1a396d(0x1e7)][_0xc497fb];if(!_0x40eca3)throw CliErrors[_0x1a396d(0x1ca)](_0x1a396d(0x1be)+_0xc497fb+'\x22.');const _0x2e62e5=resolveLocalFilePathFromLockKey(_0x339ac1,_0xc497fb),_0x35b737=relative(_0x339ac1[_0x1a396d(0x1c1)],_0x2e62e5),_0x1b4de2=join(_0x339ac1[_0x1a396d(0x1e4)],'<timestamp>',_0x35b737);return{'method':_0x1a396d(0x1cf),'url':_0x1a396d(0x1e8),'body':{'appCode':_0x3be5ff['appCode'],'target':_0xc497fb,'remoteId':_0x40eca3[_0x1a396d(0x1cc)],'localFilePath':_0x2e62e5,'trashedPath':_0x1b4de2},'description':_0x1a396d(0x1cb)+_0xc497fb+_0x1a396d(0x1d4)};},async 'execute'(_0x281959){const _0x95d1c0=a25_0x2e49c8,_0x440ef7=loadBffProjectConfig(_0x281959['appCode']),_0xa0a911=await readBffLockFile(_0x440ef7[_0x95d1c0(0x1c6)]);if(!_0xa0a911)throw CliErrors[_0x95d1c0(0x1ca)](_0x95d1c0(0x1dc));const {lockData:_0x2b71cb,appLock:_0x203179}=ensureLockScope(_0xa0a911,_0x281959[_0x95d1c0(0x1ea)],_0x440ef7[_0x95d1c0(0x1e2)],_0x95d1c0(0x1dd)),_0x1e3f71=_0x281959['str'](_0x95d1c0(0x1de)),_0x118ef9=Object[_0x95d1c0(0x1bf)](_0x203179['functions']),_0x29b97f=resolveDeleteTarget(_0x1e3f71,_0x118ef9),_0x4f7e22=_0x203179[_0x95d1c0(0x1e7)][_0x29b97f];if(!_0x4f7e22)throw CliErrors[_0x95d1c0(0x1ca)](_0x95d1c0(0x1be)+_0x29b97f+'\x22.');await deleteBffScript(_0x4f7e22[_0x95d1c0(0x1cc)]),delete _0x203179[_0x95d1c0(0x1e7)][_0x29b97f],_0x203179[_0x95d1c0(0x1eb)]=new Date()[_0x95d1c0(0x1c2)](),await writeBffLockFile(_0x440ef7[_0x95d1c0(0x1c6)],_0x2b71cb);const _0x891d71=resolveLocalFilePathFromLockKey(_0x440ef7,_0x29b97f);let _0x31b0ff;await fileExists(_0x891d71)&&(_0x31b0ff=await moveToTrash(_0x440ef7[_0x95d1c0(0x1c1)],_0x440ef7[_0x95d1c0(0x1e4)],_0x891d71),await cleanupEmptyDirectories(dirname(_0x891d71),_0x440ef7['scriptsRootDir']));const _0x1049dd={'deleted':_0x29b97f,'remoteId':_0x4f7e22[_0x95d1c0(0x1cc)]};if(_0x31b0ff)_0x1049dd['trashedTo']=_0x31b0ff;return{'ok':!![],'data':_0x1049dd,'message':_0x95d1c0(0x1c0)+_0x29b97f+(_0x31b0ff?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x26e99b,_0x5e376c){const _0x92e92e=a25_0x2e49c8;if(_0x26e99b['includes']('/')){const _0x5bbefc=_0x5e376c[_0x92e92e(0x1c7)](_0xf59005=>_0xf59005===_0x26e99b);if(!_0x5bbefc)throw CliErrors[_0x92e92e(0x1ca)](_0x92e92e(0x1c5)+_0x26e99b);return _0x5bbefc;}const _0x9e73eb=_0x5e376c[_0x92e92e(0x1ec)](_0x2f03cc=>_0x2f03cc[_0x92e92e(0x1d8)]('/')['at'](-0x1)===_0x26e99b);if(_0x9e73eb[_0x92e92e(0x1e0)]===0x0)throw CliErrors['validation'](_0x92e92e(0x1c5)+_0x26e99b);if(_0x9e73eb[_0x92e92e(0x1e0)]>0x1)throw CliErrors[_0x92e92e(0x1ca)](_0x92e92e(0x1d0)+_0x26e99b+_0x92e92e(0x1c8)+_0x9e73eb[_0x92e92e(0x1e9)](_0x1ec9f9=>_0x92e92e(0x1d9)+_0x1ec9f9)['join']('\x0a'));return _0x9e73eb[0x0];}async function moveToTrash(_0x3c4f84,_0x2e6d75,_0x342008){const _0x5a0ad2=a25_0x2e49c8,_0x2278d4=new Date()[_0x5a0ad2(0x1c2)]()[_0x5a0ad2(0x1d6)](/[:.]/g,'-'),_0x396221=relative(_0x3c4f84,_0x342008),_0x268de9=join(_0x2e6d75,_0x2278d4,_0x396221);return await mkdir(dirname(_0x268de9),{'recursive':!![]}),await rename(_0x342008,_0x268de9),_0x268de9;}function a25_0x39e9(){const _0x900446=['replace','1129200aYXZcN','split','\x20\x20-\x20','1VedApn','442IVEMqc','BFF\x20lock\x20file\x20not\x20found.','delete','target','500316gikfGc','length','bff','scriptsRoot','3YgIvCH','trashDir','startsWith','113570mTIlBm','functions','/api/management/library/scripts/delete','map','appCode','lastSync','filter','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','No\x20lock\x20entry\x20found\x20for\x20\x22','keys','Deleted\x20','projectRoot','toISOString','425014dYUbSX','27kVSXeU','Function\x20not\x20found:\x20','lockFilePath','find','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','high-risk-write','validation','Would\x20delete\x20','remoteId','1416Goiouv','6ghuSVG','POST','Multiple\x20functions\x20match\x20\x22','14707MFTBCU','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','1902934gSFtdL','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','339868bLchIu'];a25_0x39e9=function(){return _0x900446;};return a25_0x39e9();}async function cleanupEmptyDirectories(_0x2aed15,_0x21a2fb){const _0x260886=a25_0x2e49c8;let _0x5ced07=resolve(_0x2aed15);const _0x1a37cf=resolve(_0x21a2fb);while(_0x5ced07[_0x260886(0x1e5)](''+_0x1a37cf+sep)||_0x5ced07===_0x1a37cf){if(_0x5ced07===_0x1a37cf)return;try{const _0x50c3e9=await readdir(_0x5ced07);if(_0x50c3e9[_0x260886(0x1e0)]>0x0)return;await rmdir(_0x5ced07);}catch{return;}_0x5ced07=dirname(_0x5ced07);}}
1
+ const a25_0x1c63e9=a25_0x8468;(function(_0x53859a,_0x1a62cc){const _0x3a297a=a25_0x8468,_0x218195=_0x53859a();while(!![]){try{const _0x160719=-parseInt(_0x3a297a(0xc4))/0x1+-parseInt(_0x3a297a(0xd7))/0x2+parseInt(_0x3a297a(0xb8))/0x3+-parseInt(_0x3a297a(0xb1))/0x4+-parseInt(_0x3a297a(0xc1))/0x5+parseInt(_0x3a297a(0xaf))/0x6+parseInt(_0x3a297a(0xb4))/0x7;if(_0x160719===_0x1a62cc)break;else _0x218195['push'](_0x218195['shift']());}catch(_0x121c6a){_0x218195['push'](_0x218195['shift']());}}}(a25_0x40d5,0x9d43d));function a25_0x8468(_0x2b1c15,_0x326856){_0x2b1c15=_0x2b1c15-0xad;const _0x40d5e3=a25_0x40d5();let _0x84683e=_0x40d5e3[_0x2b1c15];return _0x84683e;}import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a25_0x40d5(){const _0x5b227f=['\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','find','remoteId','Would\x20delete\x20','Deleted\x20','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','lastSync','filter','No\x20lock\x20entry\x20found\x20for\x20\x22','292928jiuWSY','Function\x20not\x20found:\x20','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','2733576jItkGB','str','596052nfUqoy','<timestamp>','validation','3532795zndFpj','replace','scriptsRoot','POST','1842384ImfKBD','trashDir','BFF\x20lock\x20file\x20not\x20found.','target','functions','startsWith','join','toISOString','lockFilePath','2718785Rnortd','Multiple\x20functions\x20match\x20\x22','delete','91018qcAzJH','projectRoot','keys','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','map','\x20\x20-\x20','length','string','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','appCode'];a25_0x40d5=function(){return _0x5b227f;};return a25_0x40d5();}import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':'bff','command':a25_0x1c63e9(0xc3),'description':a25_0x1c63e9(0xd3),'risk':'high-risk-write','flags':[{'name':a25_0x1c63e9(0xbb),'type':a25_0x1c63e9(0xcb),'required':!![],'description':a25_0x1c63e9(0xcc)}],async 'validate'(_0x85269e){const _0x3aacf2=a25_0x1c63e9,_0x38221e=loadBffProjectConfig(_0x85269e[_0x3aacf2(0xcd)]),_0x3d7b91=await readBffLockFile(_0x38221e[_0x3aacf2(0xc0)]);if(!_0x3d7b91)throw CliErrors[_0x3aacf2(0xb3)](_0x3aacf2(0xc7));},async 'dryRun'(_0x14c388){const _0x35b531=a25_0x1c63e9,_0x24fdc8=loadBffProjectConfig(_0x14c388[_0x35b531(0xcd)]),_0x10b9c1=await readBffLockFile(_0x24fdc8['lockFilePath']);if(!_0x10b9c1)throw CliErrors[_0x35b531(0xb3)]('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x100494}=ensureLockScope(_0x10b9c1,_0x14c388[_0x35b531(0xcd)],_0x24fdc8[_0x35b531(0xb6)],_0x35b531(0xc3)),_0x206c3e=_0x14c388[_0x35b531(0xb0)](_0x35b531(0xbb)),_0x5bf003=Object[_0x35b531(0xc6)](_0x100494[_0x35b531(0xbc)]),_0x18b533=resolveDeleteTarget(_0x206c3e,_0x5bf003),_0x2d915f=_0x100494[_0x35b531(0xbc)][_0x18b533];if(!_0x2d915f)throw CliErrors['validation'](_0x35b531(0xd6)+_0x18b533+'\x22.');const _0x45889e=resolveLocalFilePathFromLockKey(_0x24fdc8,_0x18b533),_0x13be60=relative(_0x24fdc8['projectRoot'],_0x45889e),_0x57754e=join(_0x24fdc8[_0x35b531(0xb9)],_0x35b531(0xb2),_0x13be60);return{'method':_0x35b531(0xb7),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x14c388[_0x35b531(0xcd)],'target':_0x18b533,'remoteId':_0x2d915f[_0x35b531(0xd0)],'localFilePath':_0x45889e,'trashedPath':_0x57754e},'description':_0x35b531(0xd1)+_0x18b533+_0x35b531(0xae)};},async 'execute'(_0x1a3ac2){const _0x64800=a25_0x1c63e9,_0x2b6920=loadBffProjectConfig(_0x1a3ac2[_0x64800(0xcd)]),_0x3f9c3b=await readBffLockFile(_0x2b6920['lockFilePath']);if(!_0x3f9c3b)throw CliErrors['validation'](_0x64800(0xba));const {lockData:_0x155af0,appLock:_0x5efeaf}=ensureLockScope(_0x3f9c3b,_0x1a3ac2[_0x64800(0xcd)],_0x2b6920['scriptsRoot'],_0x64800(0xc3)),_0xca575c=_0x1a3ac2[_0x64800(0xb0)](_0x64800(0xbb)),_0x467c91=Object[_0x64800(0xc6)](_0x5efeaf[_0x64800(0xbc)]),_0x2ec643=resolveDeleteTarget(_0xca575c,_0x467c91),_0x212000=_0x5efeaf['functions'][_0x2ec643];if(!_0x212000)throw CliErrors[_0x64800(0xb3)](_0x64800(0xd6)+_0x2ec643+'\x22.');await deleteBffScript(_0x212000[_0x64800(0xd0)]),delete _0x5efeaf['functions'][_0x2ec643],_0x5efeaf[_0x64800(0xd4)]=new Date()['toISOString'](),await writeBffLockFile(_0x2b6920[_0x64800(0xc0)],_0x155af0);const _0xa1d4e2=resolveLocalFilePathFromLockKey(_0x2b6920,_0x2ec643);let _0x581102;await fileExists(_0xa1d4e2)&&(_0x581102=await moveToTrash(_0x2b6920[_0x64800(0xc5)],_0x2b6920[_0x64800(0xb9)],_0xa1d4e2),await cleanupEmptyDirectories(dirname(_0xa1d4e2),_0x2b6920['scriptsRootDir']));const _0x3bae6e={'deleted':_0x2ec643,'remoteId':_0x212000[_0x64800(0xd0)]};if(_0x581102)_0x3bae6e['trashedTo']=_0x581102;return{'ok':!![],'data':_0x3bae6e,'message':_0x64800(0xd2)+_0x2ec643+(_0x581102?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x57e403,_0x5ed69f){const _0xc3357d=a25_0x1c63e9;if(_0x57e403['includes']('/')){const _0x88968b=_0x5ed69f[_0xc3357d(0xcf)](_0x74be76=>_0x74be76===_0x57e403);if(!_0x88968b)throw CliErrors['validation'](_0xc3357d(0xad)+_0x57e403);return _0x88968b;}const _0x2e1a6a=_0x5ed69f[_0xc3357d(0xd5)](_0x4d7a25=>_0x4d7a25['split']('/')['at'](-0x1)===_0x57e403);if(_0x2e1a6a[_0xc3357d(0xca)]===0x0)throw CliErrors[_0xc3357d(0xb3)](_0xc3357d(0xad)+_0x57e403);if(_0x2e1a6a[_0xc3357d(0xca)]>0x1)throw CliErrors[_0xc3357d(0xb3)](_0xc3357d(0xc2)+_0x57e403+_0xc3357d(0xce)+_0x2e1a6a[_0xc3357d(0xc8)](_0x1b5d0b=>_0xc3357d(0xc9)+_0x1b5d0b)[_0xc3357d(0xbe)]('\x0a'));return _0x2e1a6a[0x0];}async function moveToTrash(_0x4df646,_0x2d7bf5,_0xf37d76){const _0x4e9296=a25_0x1c63e9,_0x3c34fc=new Date()[_0x4e9296(0xbf)]()[_0x4e9296(0xb5)](/[:.]/g,'-'),_0x4cdc33=relative(_0x4df646,_0xf37d76),_0x2ad224=join(_0x2d7bf5,_0x3c34fc,_0x4cdc33);return await mkdir(dirname(_0x2ad224),{'recursive':!![]}),await rename(_0xf37d76,_0x2ad224),_0x2ad224;}async function cleanupEmptyDirectories(_0xe9e649,_0x21f1f4){const _0x2acbde=a25_0x1c63e9;let _0x2eec14=resolve(_0xe9e649);const _0x3ad22b=resolve(_0x21f1f4);while(_0x2eec14[_0x2acbde(0xbd)](''+_0x3ad22b+sep)||_0x2eec14===_0x3ad22b){if(_0x2eec14===_0x3ad22b)return;try{const _0x132436=await readdir(_0x2eec14);if(_0x132436[_0x2acbde(0xca)]>0x0)return;await rmdir(_0x2eec14);}catch{return;}_0x2eec14=dirname(_0x2eec14);}}
@@ -1 +1 @@
1
- const a26_0x39f555=a26_0x2f4b;(function(_0x21f431,_0x3c5831){const _0x21fe89=a26_0x2f4b,_0x3be297=_0x21f431();while(!![]){try{const _0xe12ec3=-parseInt(_0x21fe89(0x14a))/0x1+parseInt(_0x21fe89(0x14d))/0x2*(parseInt(_0x21fe89(0x15b))/0x3)+parseInt(_0x21fe89(0x157))/0x4*(parseInt(_0x21fe89(0x148))/0x5)+parseInt(_0x21fe89(0x159))/0x6+-parseInt(_0x21fe89(0x144))/0x7+parseInt(_0x21fe89(0x156))/0x8*(-parseInt(_0x21fe89(0x152))/0x9)+-parseInt(_0x21fe89(0x153))/0xa*(parseInt(_0x21fe89(0x143))/0xb);if(_0xe12ec3===_0x3c5831)break;else _0x3be297['push'](_0x3be297['shift']());}catch(_0x4a0041){_0x3be297['push'](_0x3be297['shift']());}}}(a26_0x45cf,0xe6047));import{getBffScriptInfo}from'../../core/api-client.js';function a26_0x45cf(){const _0x122fee=['70122FdvPke','description','bff','scriptType','verbose','24795fukHaD','110170LpofhG','detail','appCode','1336FOyqdo','137188VowtpF','Return\x20full\x20raw\x20script\x20object','5020068CLlwgs','updatedTime','6TfciBM','506CsKLaR','504504BeGeuI','(none)','num','Script\x20ID','235HYHnUN','Get\x20BFF\x20script\x20details\x20by\x20ID','537669vzgZZD','scriptContent','bool'];a26_0x45cf=function(){return _0x122fee;};return a26_0x45cf();}function a26_0x2f4b(_0x1850f7,_0x5b0662){_0x1850f7=_0x1850f7-0x143;const _0x45cfcb=a26_0x45cf();let _0x2f4bdd=_0x45cfcb[_0x1850f7];return _0x2f4bdd;}export const bffDetail={'service':a26_0x39f555(0x14f),'command':a26_0x39f555(0x154),'description':a26_0x39f555(0x149),'risk':'read','flags':[{'name':'id','type':'number','required':!![],'description':a26_0x39f555(0x147)},{'name':a26_0x39f555(0x151),'type':'boolean','description':a26_0x39f555(0x158)}],async 'execute'(_0x3b6de2){const _0x235425=a26_0x39f555,_0x2b7f56=await getBffScriptInfo(_0x3b6de2[_0x235425(0x146)]('id')),_0x5ab296=_0x3b6de2[_0x235425(0x14c)](_0x235425(0x151));if(_0x5ab296)return{'ok':!![],'data':_0x2b7f56};return{'ok':!![],'data':{'id':_0x2b7f56['id'],'appCode':_0x2b7f56[_0x235425(0x155)],'scriptType':_0x2b7f56[_0x235425(0x150)],'description':_0x2b7f56[_0x235425(0x14e)]||_0x235425(0x145),'createdTime':_0x2b7f56['createdTime']??'','updatedTime':_0x2b7f56[_0x235425(0x15a)]??'','scriptContent':_0x2b7f56[_0x235425(0x14b)]??''}};}};
1
+ function a26_0x13c3(){const _0x3a009d=['120zoDpzy','Return\x20full\x20raw\x20script\x20object','bff','description','18OpjRKG','244036qNPJaH','Get\x20BFF\x20script\x20details\x20by\x20ID','(none)','number','updatedTime','boolean','1969218EPppKm','detail','6989070qTkjQO','scriptType','4yyCQZu','5087880rKMaeY','2392411FfJUTs','1504488mJuWwm','createdTime','56671grxCHd','num','scriptContent','verbose','read'];a26_0x13c3=function(){return _0x3a009d;};return a26_0x13c3();}const a26_0x16889a=a26_0x5a21;function a26_0x5a21(_0x13c9fe,_0xbe5875){_0x13c9fe=_0x13c9fe-0x156;const _0x13c3e1=a26_0x13c3();let _0x5a2130=_0x13c3e1[_0x13c9fe];return _0x5a2130;}(function(_0xeab9fe,_0x4ccc41){const _0x4ca5cd=a26_0x5a21,_0x18c71b=_0xeab9fe();while(!![]){try{const _0x5014b0=parseInt(_0x4ca5cd(0x15b))/0x1+-parseInt(_0x4ca5cd(0x165))/0x2+parseInt(_0x4ca5cd(0x159))/0x3*(parseInt(_0x4ca5cd(0x156))/0x4)+parseInt(_0x4ca5cd(0x16d))/0x5+-parseInt(_0x4ca5cd(0x164))/0x6*(-parseInt(_0x4ca5cd(0x158))/0x7)+parseInt(_0x4ca5cd(0x157))/0x8+parseInt(_0x4ca5cd(0x16b))/0x9*(-parseInt(_0x4ca5cd(0x160))/0xa);if(_0x5014b0===_0x4ccc41)break;else _0x18c71b['push'](_0x18c71b['shift']());}catch(_0xfa8927){_0x18c71b['push'](_0x18c71b['shift']());}}}(a26_0x13c3,0xd450b));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a26_0x16889a(0x162),'command':a26_0x16889a(0x16c),'description':a26_0x16889a(0x166),'risk':a26_0x16889a(0x15f),'flags':[{'name':'id','type':a26_0x16889a(0x168),'required':!![],'description':'Script\x20ID'},{'name':a26_0x16889a(0x15e),'type':a26_0x16889a(0x16a),'description':a26_0x16889a(0x161)}],async 'execute'(_0x1c0647){const _0x2c2c37=a26_0x16889a,_0x43400c=await getBffScriptInfo(_0x1c0647[_0x2c2c37(0x15c)]('id')),_0xb9d27b=_0x1c0647['bool']('verbose');if(_0xb9d27b)return{'ok':!![],'data':_0x43400c};return{'ok':!![],'data':{'id':_0x43400c['id'],'appCode':_0x43400c['appCode'],'scriptType':_0x43400c[_0x2c2c37(0x16e)],'description':_0x43400c[_0x2c2c37(0x163)]||_0x2c2c37(0x167),'createdTime':_0x43400c[_0x2c2c37(0x15a)]??'','updatedTime':_0x43400c[_0x2c2c37(0x169)]??'','scriptContent':_0x43400c[_0x2c2c37(0x15d)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x549c67,_0x328821){const _0x49c7f8=a27_0x5457,_0x4fa150=_0x549c67();while(!![]){try{const _0x4b6495=parseInt(_0x49c7f8(0x1d0))/0x1*(parseInt(_0x49c7f8(0x1cc))/0x2)+parseInt(_0x49c7f8(0x1ce))/0x3+parseInt(_0x49c7f8(0x1d1))/0x4+parseInt(_0x49c7f8(0x1ca))/0x5+parseInt(_0x49c7f8(0x1c9))/0x6*(parseInt(_0x49c7f8(0x1d2))/0x7)+-parseInt(_0x49c7f8(0x1d3))/0x8*(-parseInt(_0x49c7f8(0x1cd))/0x9)+-parseInt(_0x49c7f8(0x1cf))/0xa*(parseInt(_0x49c7f8(0x1cb))/0xb);if(_0x4b6495===_0x328821)break;else _0x4fa150['push'](_0x4fa150['shift']());}catch(_0x5e9419){_0x4fa150['push'](_0x4fa150['shift']());}}}(a27_0xef86,0x696ea));import{bffList}from'./list.js';function a27_0x5457(_0x5ca5c0,_0x5d0b84){_0x5ca5c0=_0x5ca5c0-0x1c9;const _0xef86d1=a27_0xef86();let _0x545775=_0xef86d1[_0x5ca5c0];return _0x545775;}import{bffDetail}from'./detail.js';import{bffStatus}from'./status.js';import{bffNew}from'./new.js';import{bffPush}from'./push.js';import{bffPull}from'./pull.js';import{bffDelete}from'./delete.js';function a27_0xef86(){const _0x4e51e5=['25218910YTNzfV','66pVOVlm','730764QBXyTR','4550BmnxFG','546552eAEiVV','2742pzVZMK','2350540BlPzGa','11FSzitb','14118YYoTLR','90egioNK','2564424HEfoaf'];a27_0xef86=function(){return _0x4e51e5;};return a27_0xef86();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
1
+ (function(_0x562ff0,_0x49b30e){const _0x17c8e4=a27_0x97fd,_0x18e480=_0x562ff0();while(!![]){try{const _0x4def02=-parseInt(_0x17c8e4(0x1ce))/0x1+parseInt(_0x17c8e4(0x1d4))/0x2*(-parseInt(_0x17c8e4(0x1d6))/0x3)+-parseInt(_0x17c8e4(0x1cf))/0x4*(-parseInt(_0x17c8e4(0x1d0))/0x5)+parseInt(_0x17c8e4(0x1d5))/0x6*(parseInt(_0x17c8e4(0x1cc))/0x7)+-parseInt(_0x17c8e4(0x1d2))/0x8*(parseInt(_0x17c8e4(0x1d7))/0x9)+parseInt(_0x17c8e4(0x1d3))/0xa+-parseInt(_0x17c8e4(0x1cd))/0xb*(parseInt(_0x17c8e4(0x1d1))/0xc);if(_0x4def02===_0x49b30e)break;else _0x18e480['push'](_0x18e480['shift']());}catch(_0x16ee3b){_0x18e480['push'](_0x18e480['shift']());}}}(a27_0x1087,0x2ccf8));import{bffList}from'./list.js';function a27_0x1087(){const _0x37680d=['259PXsAYd','11OzYYxd','192576OyUcOe','1172uxJmNT','3745UXEVNB','529572sNHKEm','158032louBYR','3600970TxtZUL','42892ixqraE','8670ySetRL','27KmZBFc','9ZOwwTT'];a27_0x1087=function(){return _0x37680d;};return a27_0x1087();}import{bffDetail}from'./detail.js';import{bffStatus}from'./status.js';function a27_0x97fd(_0x39efef,_0x144dcb){_0x39efef=_0x39efef-0x1cc;const _0x1087c0=a27_0x1087();let _0x97fd53=_0x1087c0[_0x39efef];return _0x97fd53;}import{bffNew}from'./new.js';import{bffPush}from'./push.js';import{bffPull}from'./pull.js';import{bffDelete}from'./delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a28_0x1a443a=a28_0x270e;function a28_0xb8f0(){const _0x499b0a=['Filter\x20by\x20script\x20name','bool','boolean','string','23628gmYPfW','read','Script\x20type\x20filter','814kVCfcE','392MpDrxQ','List\x20BFF\x20scripts','str','6439744VOphPU','type','43137WDTZMc','functionName','1403162VFGpFP','ENDPOINT','350406YLCdSx','list','230SYIGdJ','7655MzzeId','Return\x20full\x20script\x20objects','2372uyphVw','map','bff','scriptType','11652MfSFMr','name','appCode','3bfKkTv','(unnamed)','verbose'];a28_0xb8f0=function(){return _0x499b0a;};return a28_0xb8f0();}(function(_0xd42693,_0x473769){const _0x370ce8=a28_0x270e,_0x4c18eb=_0xd42693();while(!![]){try{const _0xdbec4c=-parseInt(_0x370ce8(0x75))/0x1+parseInt(_0x370ce8(0x73))/0x2*(-parseInt(_0x370ce8(0x81))/0x3)+-parseInt(_0x370ce8(0x7a))/0x4*(-parseInt(_0x370ce8(0x78))/0x5)+parseInt(_0x370ce8(0x88))/0x6*(-parseInt(_0x370ce8(0x6c))/0x7)+parseInt(_0x370ce8(0x6f))/0x8+parseInt(_0x370ce8(0x71))/0x9*(parseInt(_0x370ce8(0x77))/0xa)+parseInt(_0x370ce8(0x6b))/0xb*(parseInt(_0x370ce8(0x7e))/0xc);if(_0xdbec4c===_0x473769)break;else _0x4c18eb['push'](_0x4c18eb['shift']());}catch(_0x47ab1b){_0x4c18eb['push'](_0x4c18eb['shift']());}}}(a28_0xb8f0,0x97f5d));import{listBffScripts}from'../../core/api-client.js';function a28_0x270e(_0x12b4e8,_0x1edc41){_0x12b4e8=_0x12b4e8-0x69;const _0xb8f00a=a28_0xb8f0();let _0x270e18=_0xb8f00a[_0x12b4e8];return _0x270e18;}export const bffList={'service':a28_0x1a443a(0x7c),'command':a28_0x1a443a(0x76),'description':a28_0x1a443a(0x6d),'risk':a28_0x1a443a(0x69),'flags':[{'name':'type','type':a28_0x1a443a(0x87),'description':a28_0x1a443a(0x6a),'default':'ENDPOINT','enum':[a28_0x1a443a(0x74),'COMMON']},{'name':a28_0x1a443a(0x7f),'type':a28_0x1a443a(0x87),'description':a28_0x1a443a(0x84)},{'name':a28_0x1a443a(0x83),'type':a28_0x1a443a(0x86),'description':a28_0x1a443a(0x79)}],async 'execute'(_0x5d02f7){const _0x3837d9=a28_0x1a443a,_0x476202=await listBffScripts(_0x5d02f7[_0x3837d9(0x80)],_0x5d02f7[_0x3837d9(0x6e)](_0x3837d9(0x70)),{'scriptName':_0x5d02f7[_0x3837d9(0x6e)]('name')||undefined}),_0x3caaa3=_0x5d02f7[_0x3837d9(0x85)](_0x3837d9(0x83));return{'ok':!![],'data':_0x3caaa3?_0x476202:_0x476202[_0x3837d9(0x7b)](_0x515b12=>({'id':_0x515b12['id'],'functionName':_0x515b12[_0x3837d9(0x72)]??'','description':_0x515b12['description']||_0x3837d9(0x82),'scriptType':_0x515b12[_0x3837d9(0x7d)]})),'message':_0x476202['length']===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
1
+ const a28_0x54f83b=a28_0x2b42;(function(_0x366b4d,_0x3903a7){const _0x1a01a9=a28_0x2b42,_0x358ff0=_0x366b4d();while(!![]){try{const _0x5cd5ea=parseInt(_0x1a01a9(0x180))/0x1+-parseInt(_0x1a01a9(0x178))/0x2*(parseInt(_0x1a01a9(0x18e))/0x3)+-parseInt(_0x1a01a9(0x18c))/0x4+-parseInt(_0x1a01a9(0x184))/0x5+parseInt(_0x1a01a9(0x190))/0x6*(parseInt(_0x1a01a9(0x17b))/0x7)+parseInt(_0x1a01a9(0x183))/0x8*(parseInt(_0x1a01a9(0x188))/0x9)+parseInt(_0x1a01a9(0x187))/0xa;if(_0x5cd5ea===_0x3903a7)break;else _0x358ff0['push'](_0x358ff0['shift']());}catch(_0x21d2ca){_0x358ff0['push'](_0x358ff0['shift']());}}}(a28_0x2608,0x2cecd));import{listBffScripts}from'../../core/api-client.js';function a28_0x2b42(_0x2c854f,_0x916961){_0x2c854f=_0x2c854f-0x176;const _0x2608c2=a28_0x2608();let _0x2b4221=_0x2608c2[_0x2c854f];return _0x2b4221;}function a28_0x2608(){const _0x1ef05b=['3198edxFIn','Filter\x20by\x20script\x20name','No\x20BFF\x20scripts\x20found.','str','170876cCSOLP','bff','list','1477MKNGaR','appCode','List\x20BFF\x20scripts','(unnamed)','boolean','337157ahnfFa','type','name','31504EqRFdi','455955jtvZyc','functionName','ENDPOINT','2086800WzDfvY','99ztTuga','string','Return\x20full\x20script\x20objects','COMMON','1022152aHvkgh','bool','6UfpyAi','verbose'];a28_0x2608=function(){return _0x1ef05b;};return a28_0x2608();}export const bffList={'service':a28_0x54f83b(0x179),'command':a28_0x54f83b(0x17a),'description':a28_0x54f83b(0x17d),'risk':'read','flags':[{'name':a28_0x54f83b(0x181),'type':a28_0x54f83b(0x189),'description':'Script\x20type\x20filter','default':a28_0x54f83b(0x186),'enum':[a28_0x54f83b(0x186),a28_0x54f83b(0x18b)]},{'name':'name','type':a28_0x54f83b(0x189),'description':a28_0x54f83b(0x191)},{'name':a28_0x54f83b(0x18f),'type':a28_0x54f83b(0x17f),'description':a28_0x54f83b(0x18a)}],async 'execute'(_0x2394f7){const _0x2fbe6f=a28_0x54f83b,_0x2bd5ed=await listBffScripts(_0x2394f7[_0x2fbe6f(0x17c)],_0x2394f7[_0x2fbe6f(0x177)](_0x2fbe6f(0x181)),{'scriptName':_0x2394f7['str'](_0x2fbe6f(0x182))||undefined}),_0x2cc725=_0x2394f7[_0x2fbe6f(0x18d)]('verbose');return{'ok':!![],'data':_0x2cc725?_0x2bd5ed:_0x2bd5ed['map'](_0x16da5e=>({'id':_0x16da5e['id'],'functionName':_0x16da5e[_0x2fbe6f(0x185)]??'','description':_0x16da5e['description']||_0x2fbe6f(0x17e),'scriptType':_0x16da5e['scriptType']})),'message':_0x2bd5ed['length']===0x0?_0x2fbe6f(0x176):undefined};}};
@@ -1 +1 @@
1
- const a29_0x5f127c=a29_0x1779;(function(_0x1cc087,_0x198c6b){const _0x54291c=a29_0x1779,_0x2dc2e9=_0x1cc087();while(!![]){try{const _0x4f2a91=parseInt(_0x54291c(0x15e))/0x1*(parseInt(_0x54291c(0x14d))/0x2)+parseInt(_0x54291c(0x197))/0x3*(-parseInt(_0x54291c(0x199))/0x4)+-parseInt(_0x54291c(0x156))/0x5+parseInt(_0x54291c(0x189))/0x6*(parseInt(_0x54291c(0x177))/0x7)+-parseInt(_0x54291c(0x15b))/0x8*(-parseInt(_0x54291c(0x16a))/0x9)+-parseInt(_0x54291c(0x176))/0xa+parseInt(_0x54291c(0x145))/0xb*(parseInt(_0x54291c(0x183))/0xc);if(_0x4f2a91===_0x198c6b)break;else _0x2dc2e9['push'](_0x2dc2e9['shift']());}catch(_0x28fcae){_0x2dc2e9['push'](_0x2dc2e9['shift']());}}}(a29_0x58c0,0x91df7));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';function a29_0x1779(_0x597e21,_0x3ff0f2){_0x597e21=_0x597e21-0x141;const _0x58c031=a29_0x58c0();let _0x17791b=_0x58c031[_0x597e21];return _0x17791b;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';function a29_0x58c0(){const _0x2409d3=['operation-type','.js','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','52LkhbkD','COMMON','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','stderr','type','HOOK','bff','join','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','5572830FpSWmD','Trigger\x20node\x20(HOOK\x20only)','entries','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','HOOK\x20requires\x20alias/operation/node\x20options.','438920fMDPSu','scriptsRootDir','/endpoint/','2858esXfiP','name','Operation\x20type\x20\x22','\x22\x20not\x20found.\x20','nonInteractive','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','function-node','\x0a\x20*\x20[触发节点]\x20','tableName','Function\x20name\x20(valid\x20JS\x20identifier)','apiDir','validation','117TMuHdL','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Alias\x20\x22','alias','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','write','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','length','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','new','find','Available\x20aliases:\x20','3059180FYgpXl','1295wrSjsA','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','before','Created\x20','operationType','Select\x20operation\x20type:','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','str','ENDPOINT','Script\x20description','code','TODO:\x20add\x20script\x20description','12KZvZgH','\x20api\x20pull`\x20to\x20refresh.','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Available:\x20','appCode','includes','33294TygrSp','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Select\x20trigger\x20node:','datasetcode','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Select\x20dataset:','No\x20operation\x20types\x20found\x20for\x20dataset\x20','after','datasetCode','description','question','string','map','205398rdsVeP','Invalid\x20function\x20name\x20\x22','24XikZui','parseInt','\x0a\x20*\x20[脚本名称]\x20','\x20function:\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','functionNode','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','keys','isInteger','No\x20datasets\x20found\x20for\x20this\x20app.','6761227qrMGly','No\x20api.ts\x20found.\x20Run\x20`','Operation\x20type\x20(HOOK\x20only)','\x22.\x20','stdin'];a29_0x58c0=function(){return _0x2409d3;};return a29_0x58c0();}import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':a29_0x5f127c(0x153),'command':a29_0x5f127c(0x173),'description':a29_0x5f127c(0x16e),'risk':a29_0x5f127c(0x16f),'flags':[{'name':a29_0x5f127c(0x151),'type':a29_0x5f127c(0x195),'required':!![],'enum':[a29_0x5f127c(0x14e),a29_0x5f127c(0x17f),a29_0x5f127c(0x152)],'description':'Script\x20type'},{'name':a29_0x5f127c(0x15f),'type':'string','required':!![],'description':a29_0x5f127c(0x167)},{'name':'description','type':a29_0x5f127c(0x195),'description':a29_0x5f127c(0x180)},{'name':'alias','type':a29_0x5f127c(0x195),'description':a29_0x5f127c(0x170)},{'name':a29_0x5f127c(0x18c),'type':a29_0x5f127c(0x195),'description':a29_0x5f127c(0x16b)},{'name':a29_0x5f127c(0x14a),'type':a29_0x5f127c(0x195),'description':a29_0x5f127c(0x147)},{'name':a29_0x5f127c(0x164),'type':a29_0x5f127c(0x195),'description':a29_0x5f127c(0x157),'enum':['before',a29_0x5f127c(0x191)]}],async 'validate'(_0x797973){const _0x467653=a29_0x5f127c,_0x3c55a7=_0x797973[_0x467653(0x17e)](_0x467653(0x15f));if(!isValidBffFunctionName(_0x3c55a7))throw CliErrors[_0x467653(0x169)](_0x467653(0x198)+_0x3c55a7+_0x467653(0x163));},async 'execute'(_0x1f4353){const _0x8da50d=a29_0x5f127c,_0x475256=loadBffProjectConfig(_0x1f4353[_0x8da50d(0x187)]),_0x7fd557=_0x1f4353[_0x8da50d(0x17e)](_0x8da50d(0x151)),_0x349041=_0x1f4353[_0x8da50d(0x17e)]('name'),_0x576bc1=_0x1f4353[_0x8da50d(0x17e)]('description')||undefined,_0x1d14b9=_0x7fd557==='HOOK'?await resolveHookOptions(_0x475256,_0x1f4353):undefined,_0x14595d=buildFilePath(_0x475256,_0x7fd557,_0x349041,_0x1d14b9);if(await fileExists(_0x14595d))throw CliErrors[_0x8da50d(0x169)]('File\x20already\x20exists:\x20'+_0x14595d);await mkdir(dirname(_0x14595d),{'recursive':!![]});const _0x105574=generateTemplate(_0x7fd557,_0x349041,_0x1f4353[_0x8da50d(0x187)],_0x576bc1,_0x1d14b9);await writeFile(_0x14595d,_0x105574,'utf8');const _0x3a9f5f={'type':_0x7fd557,'name':_0x349041,'path':_0x14595d};if(_0x576bc1)_0x3a9f5f[_0x8da50d(0x193)]=_0x576bc1;if(_0x1d14b9){if(_0x1d14b9[_0x8da50d(0x16d)])_0x3a9f5f[_0x8da50d(0x16d)]=_0x1d14b9[_0x8da50d(0x16d)];_0x3a9f5f[_0x8da50d(0x192)]=_0x1d14b9[_0x8da50d(0x192)],_0x3a9f5f[_0x8da50d(0x17b)]=_0x1d14b9[_0x8da50d(0x17b)],_0x3a9f5f[_0x8da50d(0x19e)]=_0x1d14b9['functionNode'];}return{'ok':!![],'data':_0x3a9f5f,'message':_0x8da50d(0x17a)+_0x7fd557+_0x8da50d(0x19c)+_0x349041};}};async function resolveHookOptions(_0x565f68,_0x23b0a0){const _0x2c1e5e=a29_0x5f127c,_0x1b69eb=loadAliasMap(_0x23b0a0[_0x2c1e5e(0x168)],undefined,resolveApiFilePath(_0x23b0a0[_0x2c1e5e(0x168)],_0x23b0a0[_0x2c1e5e(0x187)])),_0x51f7eb=_0x1b69eb[_0x2c1e5e(0x171)]>0x0;let _0x39f61e,_0x529619,_0x26fce2;const _0x5b3c96=_0x23b0a0[_0x2c1e5e(0x17e)](_0x2c1e5e(0x16d)),_0x3537fc=_0x23b0a0['str'](_0x2c1e5e(0x18c));if(_0x5b3c96){const _0x6144ec=resolveAlias(_0x23b0a0[_0x2c1e5e(0x168)],_0x5b3c96,undefined,resolveApiFilePath(_0x23b0a0[_0x2c1e5e(0x168)],_0x23b0a0[_0x2c1e5e(0x187)]));if(!_0x6144ec){const _0x562120=_0x51f7eb?_0x2c1e5e(0x175)+_0x1b69eb[_0x2c1e5e(0x196)](_0x4e62c7=>_0x4e62c7[_0x2c1e5e(0x16d)])['join'](',\x20'):_0x2c1e5e(0x146)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x16c)+_0x5b3c96+_0x2c1e5e(0x161)+_0x562120);}_0x39f61e=_0x5b3c96,_0x529619=_0x6144ec;}else{if(_0x3537fc){_0x529619=_0x3537fc;const _0x3d4d59=_0x1b69eb[_0x2c1e5e(0x174)](_0x590469=>_0x590469['datasetCode']===_0x3537fc);_0x39f61e=_0x3d4d59?.[_0x2c1e5e(0x16d)];}else{if(_0x23b0a0['nonInteractive'])throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x185));else{if(_0x51f7eb){const _0x42bcc3=_0x1b69eb['map'](_0x36b6cd=>_0x36b6cd[_0x2c1e5e(0x16d)]+'\x20('+_0x36b6cd[_0x2c1e5e(0x166)]+')'),_0x70c497=await promptSelect(_0x2c1e5e(0x18f),_0x42bcc3),_0x32689f=_0x1b69eb[_0x70c497];if(!_0x32689f)throw CliErrors[_0x2c1e5e(0x169)]('Invalid\x20dataset\x20selection.');_0x39f61e=_0x32689f[_0x2c1e5e(0x16d)],_0x529619=_0x32689f[_0x2c1e5e(0x192)];}else{const _0x229fa2=await listDatasets(_0x23b0a0[_0x2c1e5e(0x187)]);if(_0x229fa2[_0x2c1e5e(0x171)]===0x0)throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x144));const _0x37d760=_0x229fa2['map'](_0x4a036d=>_0x4a036d[_0x2c1e5e(0x15f)]+'\x20('+_0x4a036d[_0x2c1e5e(0x181)]+')'),_0x3e753e=await promptSelect('Select\x20dataset:',_0x37d760),_0x327b5c=_0x229fa2[_0x3e753e];if(!_0x327b5c)throw CliErrors[_0x2c1e5e(0x169)]('Invalid\x20dataset\x20selection.');_0x529619=_0x327b5c[_0x2c1e5e(0x181)],_0x39f61e=undefined;}}}}const _0x26676e=await listDatasets(_0x23b0a0[_0x2c1e5e(0x187)]),_0xa3d72b=_0x26676e[_0x2c1e5e(0x174)](_0x4d2827=>_0x4d2827['code']===_0x529619);if(!_0xa3d72b)throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x19d)+_0x529619+_0x2c1e5e(0x148)+(_0x39f61e?_0x2c1e5e(0x141)+CLI_BIN_NAME+_0x2c1e5e(0x184):''));_0x26fce2=_0xa3d72b['id'];const _0x17a119=_0x39f61e??_0x529619,_0xec09eb=await listBffDatasetOperations(_0x23b0a0[_0x2c1e5e(0x187)],_0x26fce2),_0x283277=_0xec09eb?Object[_0x2c1e5e(0x142)](_0xec09eb):[];if(_0x283277['length']===0x0)throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x190)+_0x17a119+'.');let _0x8a07c6;const _0x37893c=_0x23b0a0[_0x2c1e5e(0x17e)](_0x2c1e5e(0x14a));if(_0x37893c){if(!_0x283277[_0x2c1e5e(0x188)](_0x37893c))throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x160)+_0x37893c+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x17a119+'.\x20'+(_0x2c1e5e(0x186)+_0x283277[_0x2c1e5e(0x154)](',\x20')));_0x8a07c6=_0x37893c;}else{if(_0x23b0a0[_0x2c1e5e(0x162)])throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x18d));const _0x38b636=await promptSelect(_0x2c1e5e(0x17c),_0x283277);_0x8a07c6=_0x283277[_0x38b636]??_0x283277[0x0];}let _0x179eec=normalizeHookFunctionNode(_0x23b0a0[_0x2c1e5e(0x17e)](_0x2c1e5e(0x164)));if(!_0x179eec){if(_0x23b0a0[_0x2c1e5e(0x17e)](_0x2c1e5e(0x164)))throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x17d));if(_0x23b0a0[_0x2c1e5e(0x162)])throw CliErrors[_0x2c1e5e(0x169)](_0x2c1e5e(0x14f));const _0x488ae7=await promptSelect(_0x2c1e5e(0x18b),[_0x2c1e5e(0x179),_0x2c1e5e(0x191)]);_0x179eec=[_0x2c1e5e(0x179),'after'][_0x488ae7]??_0x2c1e5e(0x179);}return{'alias':_0x39f61e,'datasetCode':_0x529619,'datasetId':_0x26fce2,'operationType':_0x8a07c6,'functionNode':_0x179eec};}async function promptSelect(_0x1baac9,_0x15b02f){const _0x5bef2f=a29_0x5f127c;if(_0x15b02f['length']===0x1)return 0x0;for(const [_0x45baf0,_0x407dc5]of _0x15b02f[_0x5bef2f(0x158)]()){process[_0x5bef2f(0x150)][_0x5bef2f(0x16f)]('\x20\x20'+(_0x45baf0+0x1)+'.\x20'+_0x407dc5+'\x0a');}const _0x5f13d9=createInterface({'input':process[_0x5bef2f(0x149)],'output':process[_0x5bef2f(0x150)]});while(!![]){const _0x36e94d=await new Promise(_0x16f953=>{const _0x323224=_0x5bef2f;_0x5f13d9[_0x323224(0x194)](_0x1baac9+'\x20',_0x16f953);}),_0x4d43fb=Number[_0x5bef2f(0x19a)](_0x36e94d['trim'](),0xa);if(Number[_0x5bef2f(0x143)](_0x4d43fb)&&_0x4d43fb>=0x1&&_0x4d43fb<=_0x15b02f['length'])return _0x5f13d9['close'](),_0x4d43fb-0x1;process['stderr']['write'](_0x5bef2f(0x18e)+_0x15b02f[_0x5bef2f(0x171)]+'.\x0a');}}function buildFilePath(_0x4f09a0,_0x3ac343,_0x12dc61,_0x267f53){const _0x13b7f9=a29_0x5f127c;if(_0x3ac343===_0x13b7f9(0x152)){if(!_0x267f53)throw CliErrors['validation'](_0x13b7f9(0x15a));const _0x2fe242=_0x267f53['alias']??_0x267f53[_0x13b7f9(0x192)];return join(_0x4f09a0[_0x13b7f9(0x15c)],'HOOK',_0x2fe242,_0x267f53['operationType'],_0x267f53[_0x13b7f9(0x19e)],_0x12dc61+_0x13b7f9(0x14b));}return join(_0x4f09a0[_0x13b7f9(0x15c)],_0x3ac343,_0x12dc61+'.js');}export function generateTemplate(_0x21bac5,_0x4b46fe,_0x3ebd7b,_0x1dce93,_0x28c5eb){const _0x4d4b11=a29_0x5f127c,_0x2b80c3=_0x1dce93?.['trim']()||_0x4d4b11(0x182);if(_0x21bac5==='COMMON')return _0x4d4b11(0x178)+_0x2b80c3+_0x4d4b11(0x19b)+_0x4b46fe+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x4b46fe+'.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x4b46fe+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x21bac5===_0x4d4b11(0x17f))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2b80c3+_0x4d4b11(0x14c)+_0x3ebd7b+_0x4d4b11(0x15d)+_0x4b46fe+_0x4d4b11(0x172)+_0x4b46fe+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x28c5eb)throw CliErrors[_0x4d4b11(0x169)](_0x4d4b11(0x159));return _0x4d4b11(0x18a)+_0x2b80c3+_0x4d4b11(0x14c)+_0x3ebd7b+'/'+_0x28c5eb[_0x4d4b11(0x192)]+'/'+_0x28c5eb[_0x4d4b11(0x17b)]+_0x4d4b11(0x165)+_0x28c5eb[_0x4d4b11(0x19e)]+_0x4d4b11(0x155)+_0x4b46fe+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
1
+ function a29_0x2427(){const _0xf831dc=['\x22\x20not\x20found.\x20','Alias\x20\x22','validation','nonInteractive','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','code','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','.js','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','COMMON','close','No\x20datasets\x20found\x20for\x20this\x20app.','map','before','Available\x20aliases:\x20','No\x20api.ts\x20found.\x20Run\x20`','alias','apiDir','ENDPOINT','entries','11669704wUeqSw','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','question','754272GOFeFO','6080qYxXyS','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','parseInt','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','write','Operation\x20type\x20(HOOK\x20only)','keys','Operation\x20type\x20\x22','\x0a\x20*\x20[脚本名称]\x20','Created\x20','\x20function:\x20','/endpoint/','Invalid\x20dataset\x20selection.','stdin','HOOK\x20requires\x20alias/operation/node\x20options.','datasetCode','1807122nDPoCg','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','name','function-node','join','tableName','Dataset\x20not\x20found\x20for\x20code\x20\x22','str','\x20api\x20pull`\x20to\x20refresh.','\x22.\x20','\x0a\x20*\x20[触发节点]\x20','682628hmihAG','datasetcode','utf8','Function\x20name\x20(valid\x20JS\x20identifier)','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','Select\x20trigger\x20node:','601982dAaEQR','operation-type','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','isInteger','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','description','2736692UpilWn','operationType','scriptsRootDir','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','No\x20operation\x20types\x20found\x20for\x20dataset\x20','length','File\x20already\x20exists:\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','bff','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','trim','after','find','HOOK','Script\x20type','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','functionNode','string','Script\x20description','425oSXDll','appCode','stderr','type'];a29_0x2427=function(){return _0xf831dc;};return a29_0x2427();}const a29_0x68acd0=a29_0x3339;(function(_0x5cdba3,_0x337fcc){const _0x1989ef=a29_0x3339,_0x105691=_0x5cdba3();while(!![]){try{const _0x5da4ee=-parseInt(_0x1989ef(0xdb))/0x1+-parseInt(_0x1989ef(0xd4))/0x2+-parseInt(_0x1989ef(0x111))/0x3+-parseInt(_0x1989ef(0x112))/0x4*(-parseInt(_0x1989ef(0xf6))/0x5)+parseInt(_0x1989ef(0xc9))/0x6+-parseInt(_0x1989ef(0xe2))/0x7+parseInt(_0x1989ef(0x10e))/0x8;if(_0x5da4ee===_0x337fcc)break;else _0x105691['push'](_0x105691['shift']());}catch(_0x790110){_0x105691['push'](_0x105691['shift']());}}}(a29_0x2427,0x4a140));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':a29_0x68acd0(0xeb),'command':'new','description':a29_0x68acd0(0xe0),'risk':'write','flags':[{'name':'type','type':'string','required':!![],'enum':[a29_0x68acd0(0x103),a29_0x68acd0(0x10c),'HOOK'],'description':a29_0x68acd0(0xf1)},{'name':a29_0x68acd0(0xcb),'type':'string','required':!![],'description':a29_0x68acd0(0xd7)},{'name':a29_0x68acd0(0xe1),'type':a29_0x68acd0(0xf4),'description':a29_0x68acd0(0xf5)},{'name':'alias','type':a29_0x68acd0(0xf4),'description':a29_0x68acd0(0x114)},{'name':'datasetcode','type':a29_0x68acd0(0xf4),'description':a29_0x68acd0(0xd8)},{'name':a29_0x68acd0(0xdc),'type':a29_0x68acd0(0xf4),'description':a29_0x68acd0(0x118)},{'name':'function-node','type':a29_0x68acd0(0xf4),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a29_0x68acd0(0x107),'after']}],async 'validate'(_0x541188){const _0x4063ae=a29_0x68acd0,_0x57ed36=_0x541188['str'](_0x4063ae(0xcb));if(!isValidBffFunctionName(_0x57ed36))throw CliErrors[_0x4063ae(0xfc)]('Invalid\x20function\x20name\x20\x22'+_0x57ed36+_0x4063ae(0xec));},async 'execute'(_0x4880c0){const _0x53565b=a29_0x68acd0,_0x5ad93d=loadBffProjectConfig(_0x4880c0['appCode']),_0x1b66f2=_0x4880c0[_0x53565b(0xd0)](_0x53565b(0xf9)),_0xd2b0cc=_0x4880c0[_0x53565b(0xd0)](_0x53565b(0xcb)),_0x26e01f=_0x4880c0[_0x53565b(0xd0)](_0x53565b(0xe1))||undefined,_0xa0487e=_0x1b66f2===_0x53565b(0xf0)?await resolveHookOptions(_0x5ad93d,_0x4880c0):undefined,_0x13b899=buildFilePath(_0x5ad93d,_0x1b66f2,_0xd2b0cc,_0xa0487e);if(await fileExists(_0x13b899))throw CliErrors[_0x53565b(0xfc)](_0x53565b(0xe9)+_0x13b899);await mkdir(dirname(_0x13b899),{'recursive':!![]});const _0x3cdc1b=generateTemplate(_0x1b66f2,_0xd2b0cc,_0x4880c0['appCode'],_0x26e01f,_0xa0487e);await writeFile(_0x13b899,_0x3cdc1b,_0x53565b(0xd6));const _0x6c0daa={'type':_0x1b66f2,'name':_0xd2b0cc,'path':_0x13b899};if(_0x26e01f)_0x6c0daa[_0x53565b(0xe1)]=_0x26e01f;if(_0xa0487e){if(_0xa0487e[_0x53565b(0x10a)])_0x6c0daa['alias']=_0xa0487e['alias'];_0x6c0daa[_0x53565b(0xc8)]=_0xa0487e[_0x53565b(0xc8)],_0x6c0daa[_0x53565b(0xe3)]=_0xa0487e[_0x53565b(0xe3)],_0x6c0daa[_0x53565b(0xf3)]=_0xa0487e[_0x53565b(0xf3)];}return{'ok':!![],'data':_0x6c0daa,'message':_0x53565b(0xc2)+_0x1b66f2+_0x53565b(0xc3)+_0xd2b0cc};}};async function resolveHookOptions(_0x27bfda,_0xb8807d){const _0x3e9251=a29_0x68acd0,_0x260948=loadAliasMap(_0xb8807d[_0x3e9251(0x10b)],undefined,resolveApiFilePath(_0xb8807d[_0x3e9251(0x10b)],_0xb8807d['appCode'])),_0x244c01=_0x260948[_0x3e9251(0xe8)]>0x0;let _0x565e06,_0x1fe52e,_0x54695b;const _0xc5bcc9=_0xb8807d[_0x3e9251(0xd0)](_0x3e9251(0x10a)),_0x5c28eb=_0xb8807d[_0x3e9251(0xd0)](_0x3e9251(0xd5));if(_0xc5bcc9){const _0x2ea57a=resolveAlias(_0xb8807d['apiDir'],_0xc5bcc9,undefined,resolveApiFilePath(_0xb8807d['apiDir'],_0xb8807d[_0x3e9251(0xf7)]));if(!_0x2ea57a){const _0x15946d=_0x244c01?_0x3e9251(0x108)+_0x260948[_0x3e9251(0x106)](_0x24d5c6=>_0x24d5c6[_0x3e9251(0x10a)])[_0x3e9251(0xcd)](',\x20'):_0x3e9251(0x109)+CLI_BIN_NAME+_0x3e9251(0xea);throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0xfb)+_0xc5bcc9+_0x3e9251(0xfa)+_0x15946d);}_0x565e06=_0xc5bcc9,_0x1fe52e=_0x2ea57a;}else{if(_0x5c28eb){_0x1fe52e=_0x5c28eb;const _0x3dac40=_0x260948[_0x3e9251(0xef)](_0x503093=>_0x503093[_0x3e9251(0xc8)]===_0x5c28eb);_0x565e06=_0x3dac40?.[_0x3e9251(0x10a)];}else{if(_0xb8807d[_0x3e9251(0xfd)])throw CliErrors['validation'](_0x3e9251(0x113));else{if(_0x244c01){const _0x23ae4f=_0x260948[_0x3e9251(0x106)](_0x4509d9=>_0x4509d9[_0x3e9251(0x10a)]+'\x20('+_0x4509d9[_0x3e9251(0xce)]+')'),_0xf51bdf=await promptSelect('Select\x20dataset:',_0x23ae4f),_0x250678=_0x260948[_0xf51bdf];if(!_0x250678)throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0xc5));_0x565e06=_0x250678['alias'],_0x1fe52e=_0x250678[_0x3e9251(0xc8)];}else{const _0x57d15b=await listDatasets(_0xb8807d[_0x3e9251(0xf7)]);if(_0x57d15b[_0x3e9251(0xe8)]===0x0)throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0x105));const _0x34526e=_0x57d15b[_0x3e9251(0x106)](_0x13e297=>_0x13e297[_0x3e9251(0xcb)]+'\x20('+_0x13e297['code']+')'),_0x433b58=await promptSelect('Select\x20dataset:',_0x34526e),_0x525349=_0x57d15b[_0x433b58];if(!_0x525349)throw CliErrors['validation'](_0x3e9251(0xc5));_0x1fe52e=_0x525349[_0x3e9251(0xff)],_0x565e06=undefined;}}}}const _0x2c3663=await listDatasets(_0xb8807d['appCode']),_0xb83d98=_0x2c3663[_0x3e9251(0xef)](_0x48312a=>_0x48312a[_0x3e9251(0xff)]===_0x1fe52e);if(!_0xb83d98)throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0xcf)+_0x1fe52e+_0x3e9251(0xd2)+(_0x565e06?_0x3e9251(0xd9)+CLI_BIN_NAME+_0x3e9251(0xd1):''));_0x54695b=_0xb83d98['id'];const _0x7aa8ad=_0x565e06??_0x1fe52e,_0x6b4745=await listBffDatasetOperations(_0xb8807d['appCode'],_0x54695b),_0x4125e6=_0x6b4745?Object[_0x3e9251(0x119)](_0x6b4745):[];if(_0x4125e6[_0x3e9251(0xe8)]===0x0)throw CliErrors['validation'](_0x3e9251(0xe7)+_0x7aa8ad+'.');let _0x6e9f2d;const _0x136c7a=_0xb8807d[_0x3e9251(0xd0)](_0x3e9251(0xdc));if(_0x136c7a){if(!_0x4125e6['includes'](_0x136c7a))throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0xc0)+_0x136c7a+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x7aa8ad+'.\x20'+('Available:\x20'+_0x4125e6[_0x3e9251(0xcd)](',\x20')));_0x6e9f2d=_0x136c7a;}else{if(_0xb8807d['nonInteractive'])throw CliErrors['validation'](_0x3e9251(0xe6));const _0x1fe1a3=await promptSelect('Select\x20operation\x20type:',_0x4125e6);_0x6e9f2d=_0x4125e6[_0x1fe1a3]??_0x4125e6[0x0];}let _0x418389=normalizeHookFunctionNode(_0xb8807d[_0x3e9251(0xd0)](_0x3e9251(0xcc)));if(!_0x418389){if(_0xb8807d[_0x3e9251(0xd0)](_0x3e9251(0xcc)))throw CliErrors['validation'](_0x3e9251(0x10f));if(_0xb8807d[_0x3e9251(0xfd)])throw CliErrors[_0x3e9251(0xfc)](_0x3e9251(0x100));const _0x169470=await promptSelect(_0x3e9251(0xda),[_0x3e9251(0x107),_0x3e9251(0xee)]);_0x418389=[_0x3e9251(0x107),_0x3e9251(0xee)][_0x169470]??_0x3e9251(0x107);}return{'alias':_0x565e06,'datasetCode':_0x1fe52e,'datasetId':_0x54695b,'operationType':_0x6e9f2d,'functionNode':_0x418389};}async function promptSelect(_0x185562,_0x5cc755){const _0x3091bc=a29_0x68acd0;if(_0x5cc755['length']===0x1)return 0x0;for(const [_0x1caf8d,_0x6d105a]of _0x5cc755[_0x3091bc(0x10d)]()){process['stderr'][_0x3091bc(0x117)]('\x20\x20'+(_0x1caf8d+0x1)+'.\x20'+_0x6d105a+'\x0a');}const _0x4005e5=createInterface({'input':process[_0x3091bc(0xc6)],'output':process[_0x3091bc(0xf8)]});while(!![]){const _0x5cafac=await new Promise(_0x956090=>{const _0x45e5d0=_0x3091bc;_0x4005e5[_0x45e5d0(0x110)](_0x185562+'\x20',_0x956090);}),_0xddd035=Number[_0x3091bc(0x115)](_0x5cafac[_0x3091bc(0xed)](),0xa);if(Number[_0x3091bc(0xde)](_0xddd035)&&_0xddd035>=0x1&&_0xddd035<=_0x5cc755[_0x3091bc(0xe8)])return _0x4005e5[_0x3091bc(0x104)](),_0xddd035-0x1;process['stderr']['write'](_0x3091bc(0xdd)+_0x5cc755[_0x3091bc(0xe8)]+'.\x0a');}}function buildFilePath(_0x33dcb5,_0x1cceaf,_0x3ec331,_0x5e81be){const _0x33f745=a29_0x68acd0;if(_0x1cceaf==='HOOK'){if(!_0x5e81be)throw CliErrors['validation'](_0x33f745(0xc7));const _0x5455f2=_0x5e81be[_0x33f745(0x10a)]??_0x5e81be[_0x33f745(0xc8)];return join(_0x33dcb5['scriptsRootDir'],_0x33f745(0xf0),_0x5455f2,_0x5e81be['operationType'],_0x5e81be[_0x33f745(0xf3)],_0x3ec331+'.js');}return join(_0x33dcb5[_0x33f745(0xe4)],_0x1cceaf,_0x3ec331+_0x33f745(0x101));}function a29_0x3339(_0x4f7540,_0x12aa40){_0x4f7540=_0x4f7540-0xc0;const _0x2427fc=a29_0x2427();let _0x3339dd=_0x2427fc[_0x4f7540];return _0x3339dd;}export function generateTemplate(_0x1f8b6b,_0xe0cd2d,_0x40a148,_0x3603ee,_0x5dce58){const _0x4e08fe=a29_0x68acd0,_0x5a291d=_0x3603ee?.['trim']()||'TODO:\x20add\x20script\x20description';if(_0x1f8b6b===_0x4e08fe(0x103))return _0x4e08fe(0xca)+_0x5a291d+_0x4e08fe(0xc1)+_0xe0cd2d+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0xe0cd2d+_0x4e08fe(0xe5)+_0xe0cd2d+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x1f8b6b===_0x4e08fe(0x10c))return _0x4e08fe(0xf2)+_0x5a291d+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x40a148+_0x4e08fe(0xc4)+_0xe0cd2d+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xe0cd2d+_0x4e08fe(0x102);if(!_0x5dce58)throw CliErrors[_0x4e08fe(0xfc)](_0x4e08fe(0xfe));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x5a291d+_0x4e08fe(0xdf)+_0x40a148+'/'+_0x5dce58[_0x4e08fe(0xc8)]+'/'+_0x5dce58['operationType']+_0x4e08fe(0xd3)+_0x5dce58[_0x4e08fe(0xf3)]+_0x4e08fe(0x116)+_0xe0cd2d+_0x4e08fe(0x102);}
@@ -1 +1 @@
1
- const a30_0x32a3a6=a30_0x242b;(function(_0x2fcea8,_0x136f39){const _0x14402a=a30_0x242b,_0x3365ad=_0x2fcea8();while(!![]){try{const _0x4ebf41=parseInt(_0x14402a(0x1a6))/0x1*(-parseInt(_0x14402a(0x1c6))/0x2)+-parseInt(_0x14402a(0x19a))/0x3+-parseInt(_0x14402a(0x1a4))/0x4+parseInt(_0x14402a(0x1b6))/0x5*(-parseInt(_0x14402a(0x1a7))/0x6)+parseInt(_0x14402a(0x1cb))/0x7*(-parseInt(_0x14402a(0x1bb))/0x8)+-parseInt(_0x14402a(0x190))/0x9+parseInt(_0x14402a(0x197))/0xa*(parseInt(_0x14402a(0x1a1))/0xb);if(_0x4ebf41===_0x136f39)break;else _0x3365ad['push'](_0x3365ad['shift']());}catch(_0x335c1a){_0x3365ad['push'](_0x3365ad['shift']());}}}(a30_0xed86,0x78f7b));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a30_0xed86(){const _0x741288=['Force\x20pull\x20cancelled.','local\x20unsynced\x20changes','str','appCode','lockFilePath','5677542KXJBxk','\x20skipped,\x20','scriptContent','Pull\x20only\x20this\x20script\x20type','validation','apiDir','stringify','3978690CwclnM','pull','/api/management/library/scripts/list?appCode=','2185680dqEtsF','functionName','utf8','functions','\x22\x20not\x20found\x20after\x20ensureLockScope.','operationType','datasetCode','121bYzRIb','hookLocation','Would\x20inspect\x20','2674044ffepFH','\x20pulled,\x20','3pQnnoE','3918660NIJrgq','bff','question','apps','conflict','bool','cancelled','Force\x20overwrite\x20local\x20unsynced\x20changes','Remote\x20script\x20missing\x20id.','&type=','toISOString','ENDPOINT','includes','Remote\x20script\x20missing\x20content.','unresolvable\x20target\x20path','5fsOkUw','COMMON','yes','scriptsRoot','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','8uxCdaa','stdin','lockKey','all','parse','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','skipped','length','toLowerCase','nonInteractive','force','325692IEDrTh','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','stderr','type','alias','4980633gtkAUZ','GET','push','map','No\x20remote\x20BFF\x20scripts\x20found.','scriptType','filePath','write','HOOK','\x20remote\x20BFF\x20script(s)\x20for\x20pull','functionNode','lastSync','\x20failed','hash'];a30_0xed86=function(){return _0x741288;};return a30_0xed86();}function a30_0x242b(_0x136c4b,_0x5049bf){_0x136c4b=_0x136c4b-0x18b;const _0xed8610=a30_0xed86();let _0x242b08=_0xed8610[_0x136c4b];return _0x242b08;}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':a30_0x32a3a6(0x1a8),'command':a30_0x32a3a6(0x198),'description':a30_0x32a3a6(0x1c0),'risk':a30_0x32a3a6(0x1d2),'flags':[{'name':a30_0x32a3a6(0x1c9),'type':'string','description':a30_0x32a3a6(0x193),'enum':[a30_0x32a3a6(0x1b7),a30_0x32a3a6(0x1b2),a30_0x32a3a6(0x1d3)]},{'name':a30_0x32a3a6(0x1c5),'type':'boolean','description':a30_0x32a3a6(0x1ae)}],async 'dryRun'(_0x2795af){const _0x14c3a3=a30_0x32a3a6,_0x4377f6=loadBffProjectConfig(_0x2795af[_0x14c3a3(0x18e)]),_0x4f2d76=await readBffLockFile(_0x4377f6[_0x14c3a3(0x18f)]),{appLock:_0x2687bd}=ensureLockScope(_0x4f2d76??createEmptyBffLock(),_0x2795af['appCode'],_0x4377f6[_0x14c3a3(0x1b9)],_0x14c3a3(0x198)),_0x213120=normalizeBffType(_0x2795af[_0x14c3a3(0x18d)](_0x14c3a3(0x1c9)))??undefined,_0x253bd2=buildDatasetCodeToAliasMap(_0x2795af[_0x14c3a3(0x195)],_0x2795af[_0x14c3a3(0x18e)]),[_0x3084a8,_0x2f7bc8]=await Promise[_0x14c3a3(0x1be)]([listBffScripts(_0x2795af[_0x14c3a3(0x18e)],_0x213120),getBffScriptStatistics(_0x2795af[_0x14c3a3(0x18e)])]),_0x56baff=createHookLocationMap(_0x2f7bc8),_0x4489da=[];for(const _0x6aa8d3 of _0x3084a8){const _0x422d92=resolveRemoteScriptTarget(_0x4377f6,_0x6aa8d3,_0x56baff,_0x2687bd['functions'],_0x253bd2);if(!_0x422d92){_0x4489da[_0x14c3a3(0x1cd)]({'scriptType':_0x6aa8d3[_0x14c3a3(0x1d0)],'functionName':_0x6aa8d3[_0x14c3a3(0x19b)]??'','status':_0x14c3a3(0x1c1),'reason':_0x14c3a3(0x1b5)});continue;}const _0x1748d6=_0x2687bd[_0x14c3a3(0x19d)][_0x422d92[_0x14c3a3(0x1bd)]],_0x1d4f97=_0x6aa8d3['scriptContent']!=null?computeContentHash(_0x6aa8d3[_0x14c3a3(0x192)]):undefined,_0x19e165=await hasUnsyncedLocalChanges(_0x422d92[_0x14c3a3(0x1d1)],_0x1748d6,_0x1d4f97);_0x4489da[_0x14c3a3(0x1cd)]({'lockKey':_0x422d92['lockKey'],'filePath':_0x422d92['filePath'],'remoteId':_0x6aa8d3['id']??null,'status':_0x19e165?_0x14c3a3(0x1ab):'would_pull'});}return{'method':_0x14c3a3(0x1cc),'url':_0x14c3a3(0x199)+_0x2795af[_0x14c3a3(0x18e)]+(_0x213120?_0x14c3a3(0x1b0)+_0x213120:''),'body':{'appCode':_0x2795af['appCode'],'filterType':_0x213120??null,'files':_0x4489da},'description':_0x14c3a3(0x1a3)+_0x4489da['length']+_0x14c3a3(0x1d4)};},async 'execute'(_0x3a6076){const _0x372bd3=a30_0x32a3a6,_0x53dcd6=loadBffProjectConfig(_0x3a6076[_0x372bd3(0x18e)]),_0x4ee48c=await readBffLockFile(_0x53dcd6[_0x372bd3(0x18f)]),{lockData:_0xc20049,appLock:_0x3f8d85}=ensureLockScope(_0x4ee48c??createEmptyBffLock(),_0x3a6076[_0x372bd3(0x18e)],_0x53dcd6['scriptsRoot'],_0x372bd3(0x198)),_0x4dc9a0=normalizeBffType(_0x3a6076[_0x372bd3(0x18d)]('type'))??undefined;if(_0x3a6076[_0x372bd3(0x18d)](_0x372bd3(0x1c9))&&!_0x4dc9a0)throw CliErrors[_0x372bd3(0x194)](_0x372bd3(0x1c7));const [_0x1d0743,_0x207a4f]=await Promise[_0x372bd3(0x1be)]([listBffScripts(_0x3a6076[_0x372bd3(0x18e)],_0x4dc9a0),getBffScriptStatistics(_0x3a6076[_0x372bd3(0x18e)])]);if(_0x1d0743['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x372bd3(0x1cf)};const _0x2fe136=_0x3a6076[_0x372bd3(0x1ac)](_0x372bd3(0x1c5));if(_0x2fe136&&!_0x3a6076[_0x372bd3(0x1c4)]){const _0x20a800=await confirmForce();if(!_0x20a800)throw CliErrors[_0x372bd3(0x1ad)](_0x372bd3(0x18b));}if(_0x2fe136&&_0x3a6076[_0x372bd3(0x1c4)]){}const _0x52b31d=buildDatasetCodeToAliasMap(_0x3a6076[_0x372bd3(0x195)],_0x3a6076['appCode']),_0x412926=createHookLocationMap(_0x207a4f),_0x592b1f=JSON[_0x372bd3(0x1bf)](JSON[_0x372bd3(0x196)](_0xc20049)),_0x97d5bb=_0x3a6076[_0x372bd3(0x18e)],_0x127781=_0x592b1f[_0x372bd3(0x1aa)][_0x97d5bb];if(!_0x127781)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x97d5bb+_0x372bd3(0x19e));const _0x5560ab=[],_0x218dc6=[],_0x4414f8=[];for(const _0x2034e7 of _0x1d0743){const _0x296619=resolveRemoteScriptTarget(_0x53dcd6,_0x2034e7,_0x412926,_0x3f8d85[_0x372bd3(0x19d)],_0x52b31d);if(!_0x296619){_0x218dc6[_0x372bd3(0x1cd)]({'lockKey':_0x2034e7[_0x372bd3(0x1d0)]+'/'+_0x2034e7['functionName'],'reason':_0x372bd3(0x1b5)});continue;}const _0x502cca=_0x3f8d85[_0x372bd3(0x19d)][_0x296619[_0x372bd3(0x1bd)]];try{if(!_0x2034e7['id'])throw new Error(_0x372bd3(0x1af));if(_0x2034e7[_0x372bd3(0x192)]==null)throw new Error(_0x372bd3(0x1b4));const _0x1b386e=_0x2034e7[_0x372bd3(0x192)],_0x177a13=computeContentHash(_0x1b386e);if(!_0x2fe136){const _0x305c48=await hasUnsyncedLocalChanges(_0x296619[_0x372bd3(0x1d1)],_0x502cca,_0x177a13);if(_0x305c48){_0x218dc6[_0x372bd3(0x1cd)]({'lockKey':_0x296619[_0x372bd3(0x1bd)],'reason':_0x372bd3(0x18c)});continue;}}await ensureParentDirectory(_0x296619['filePath']),await writeFile(_0x296619[_0x372bd3(0x1d1)],_0x1b386e,_0x372bd3(0x19c));const _0x186245={'hash':_0x177a13,'remoteId':_0x2034e7['id'],'version':_0x2034e7['version']};_0x296619[_0x372bd3(0x1c9)]===_0x372bd3(0x1d3)&&_0x296619['hookLocation']&&(_0x186245['alias']=_0x296619[_0x372bd3(0x1a2)]['alias'],_0x186245['datasetCode']=_0x296619[_0x372bd3(0x1a2)][_0x372bd3(0x1a0)],_0x186245[_0x372bd3(0x19f)]=_0x296619['hookLocation']['operationType'],_0x186245[_0x372bd3(0x1d5)]=_0x296619['hookLocation'][_0x372bd3(0x1d5)]),_0x127781[_0x372bd3(0x19d)][_0x296619[_0x372bd3(0x1bd)]]=_0x186245,_0x5560ab[_0x372bd3(0x1cd)]({'lockKey':_0x296619['lockKey'],'remoteId':_0x2034e7['id']});}catch(_0x3bcd98){_0x4414f8[_0x372bd3(0x1cd)]({'lockKey':_0x296619['lockKey'],'error':_0x3bcd98 instanceof Error?_0x3bcd98['message']:String(_0x3bcd98)});}}return _0x127781[_0x372bd3(0x1d6)]=new Date()[_0x372bd3(0x1b1)](),await writeBffLockFile(_0x53dcd6[_0x372bd3(0x18f)],_0x592b1f),{'ok':_0x4414f8[_0x372bd3(0x1c2)]===0x0,'data':{'pulled':_0x5560ab,'skipped':_0x218dc6,'failed':_0x4414f8},'message':'Pull\x20complete:\x20'+_0x5560ab[_0x372bd3(0x1c2)]+_0x372bd3(0x1a5)+_0x218dc6[_0x372bd3(0x1c2)]+_0x372bd3(0x191)+_0x4414f8['length']+_0x372bd3(0x1d7)};}};async function hasUnsyncedLocalChanges(_0x1368ae,_0xa8b734,_0x112249){const _0x5898b1=a30_0x32a3a6;if(!await fileExists(_0x1368ae))return![];const _0x135d65=await computeFileHash(_0x1368ae);if(!_0xa8b734)return _0x112249?_0x135d65!==_0x112249:!![];return _0x135d65!==_0xa8b734[_0x5898b1(0x1d8)];}function buildDatasetCodeToAliasMap(_0x313d48,_0x556737){const _0x2dccef=a30_0x32a3a6,_0x511e17=loadAliasMap(_0x313d48,undefined,resolveApiFilePath(_0x313d48,_0x556737));return new Map(_0x511e17[_0x2dccef(0x1ce)](_0x278476=>[_0x278476[_0x2dccef(0x1a0)],_0x278476[_0x2dccef(0x1ca)]]));}async function confirmForce(){const _0x66cdd7=a30_0x32a3a6,_0x53aefc=createInterface({'input':process[_0x66cdd7(0x1bc)],'output':process[_0x66cdd7(0x1c8)]}),_0x3a42df=await new Promise(_0x264206=>{const _0x11f50e=_0x66cdd7;_0x53aefc[_0x11f50e(0x1a9)](_0x11f50e(0x1ba),_0x264206);});return _0x53aefc['close'](),['y',_0x66cdd7(0x1b8)][_0x66cdd7(0x1b3)](_0x3a42df['trim']()[_0x66cdd7(0x1c3)]());}
1
+ const a30_0x39b4da=a30_0xf567;(function(_0x4fa7d8,_0x1b247b){const _0x180497=a30_0xf567,_0x5ac9ef=_0x4fa7d8();while(!![]){try{const _0x4475a7=parseInt(_0x180497(0x106))/0x1+-parseInt(_0x180497(0xe6))/0x2*(-parseInt(_0x180497(0xdb))/0x3)+-parseInt(_0x180497(0x110))/0x4*(-parseInt(_0x180497(0x11f))/0x5)+parseInt(_0x180497(0x10c))/0x6*(-parseInt(_0x180497(0x121))/0x7)+parseInt(_0x180497(0x118))/0x8+parseInt(_0x180497(0xdd))/0x9*(-parseInt(_0x180497(0x119))/0xa)+parseInt(_0x180497(0xd9))/0xb;if(_0x4475a7===_0x1b247b)break;else _0x5ac9ef['push'](_0x5ac9ef['shift']());}catch(_0x356c2b){_0x5ac9ef['push'](_0x5ac9ef['shift']());}}}(a30_0x5a6c,0xc47b8));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a30_0xf567(_0x4f3810,_0x309065){_0x4f3810=_0x4f3810-0xd9;const _0x5a6c60=a30_0x5a6c();let _0xf5671d=_0x5a6c60[_0x4f3810];return _0xf5671d;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a30_0x39b4da(0x127),'command':a30_0x39b4da(0xf4),'description':a30_0x39b4da(0x116),'risk':a30_0x39b4da(0xe2),'flags':[{'name':a30_0x39b4da(0x11e),'type':a30_0x39b4da(0xf0),'description':a30_0x39b4da(0xe7),'enum':[a30_0x39b4da(0x117),a30_0x39b4da(0xee),a30_0x39b4da(0xf3)]},{'name':a30_0x39b4da(0x125),'type':a30_0x39b4da(0xf8),'description':a30_0x39b4da(0xfd)}],async 'dryRun'(_0x228500){const _0xf97464=a30_0x39b4da,_0x598adb=loadBffProjectConfig(_0x228500[_0xf97464(0x109)]),_0x4ad926=await readBffLockFile(_0x598adb[_0xf97464(0x123)]),{appLock:_0x292449}=ensureLockScope(_0x4ad926??createEmptyBffLock(),_0x228500['appCode'],_0x598adb['scriptsRoot'],_0xf97464(0xf4)),_0x147d87=normalizeBffType(_0x228500[_0xf97464(0xf2)](_0xf97464(0x11e)))??undefined,_0x175de5=buildDatasetCodeToAliasMap(_0x228500[_0xf97464(0x100)],_0x228500[_0xf97464(0x109)]),[_0x403fd0,_0x1574dd]=await Promise[_0xf97464(0xef)]([listBffScripts(_0x228500['appCode'],_0x147d87),getBffScriptStatistics(_0x228500[_0xf97464(0x109)])]),_0x5a05f7=createHookLocationMap(_0x1574dd),_0x396661=[];for(const _0x5cc01f of _0x403fd0){const _0x414aea=resolveRemoteScriptTarget(_0x598adb,_0x5cc01f,_0x5a05f7,_0x292449[_0xf97464(0xe1)],_0x175de5);if(!_0x414aea){_0x396661[_0xf97464(0x104)]({'scriptType':_0x5cc01f[_0xf97464(0xeb)],'functionName':_0x5cc01f[_0xf97464(0xe0)]??'','status':_0xf97464(0xf1),'reason':'unresolvable\x20target\x20path'});continue;}const _0x5b217f=_0x292449[_0xf97464(0xe1)][_0x414aea[_0xf97464(0xdc)]],_0x2320ae=_0x5cc01f[_0xf97464(0xff)]!=null?computeContentHash(_0x5cc01f[_0xf97464(0xff)]):undefined,_0x27d6e7=await hasUnsyncedLocalChanges(_0x414aea[_0xf97464(0x11b)],_0x5b217f,_0x2320ae);_0x396661['push']({'lockKey':_0x414aea['lockKey'],'filePath':_0x414aea[_0xf97464(0x11b)],'remoteId':_0x5cc01f['id']??null,'status':_0x27d6e7?_0xf97464(0x102):_0xf97464(0xe8)});}return{'method':'GET','url':_0xf97464(0xed)+_0x228500[_0xf97464(0x109)]+(_0x147d87?_0xf97464(0x103)+_0x147d87:''),'body':{'appCode':_0x228500[_0xf97464(0x109)],'filterType':_0x147d87??null,'files':_0x396661},'description':_0xf97464(0x11a)+_0x396661[_0xf97464(0xec)]+_0xf97464(0xde)};},async 'execute'(_0xde6d21){const _0x207ae9=a30_0x39b4da,_0x1a6b48=loadBffProjectConfig(_0xde6d21['appCode']),_0x2c7ed9=await readBffLockFile(_0x1a6b48['lockFilePath']),{lockData:_0x597d2d,appLock:_0x84d3e5}=ensureLockScope(_0x2c7ed9??createEmptyBffLock(),_0xde6d21['appCode'],_0x1a6b48[_0x207ae9(0x112)],_0x207ae9(0xf4)),_0x7a0bd=normalizeBffType(_0xde6d21[_0x207ae9(0xf2)]('type'))??undefined;if(_0xde6d21[_0x207ae9(0xf2)]('type')&&!_0x7a0bd)throw CliErrors[_0x207ae9(0x122)](_0x207ae9(0xe9));const [_0x44f760,_0x4e8860]=await Promise[_0x207ae9(0xef)]([listBffScripts(_0xde6d21[_0x207ae9(0x109)],_0x7a0bd),getBffScriptStatistics(_0xde6d21['appCode'])]);if(_0x44f760[_0x207ae9(0xec)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x14d2a5=_0xde6d21['bool']('force');if(_0x14d2a5&&!_0xde6d21[_0x207ae9(0x11d)]){const _0x3ec872=await confirmForce();if(!_0x3ec872)throw CliErrors[_0x207ae9(0x10a)](_0x207ae9(0xf5));}if(_0x14d2a5&&_0xde6d21[_0x207ae9(0x11d)]){}const _0x709756=buildDatasetCodeToAliasMap(_0xde6d21[_0x207ae9(0x100)],_0xde6d21[_0x207ae9(0x109)]),_0xdb4898=createHookLocationMap(_0x4e8860),_0x3a553c=JSON[_0x207ae9(0x126)](JSON[_0x207ae9(0x10b)](_0x597d2d)),_0x2f31c3=_0xde6d21[_0x207ae9(0x109)],_0x5283b9=_0x3a553c[_0x207ae9(0xfb)][_0x2f31c3];if(!_0x5283b9)throw new Error(_0x207ae9(0x120)+_0x2f31c3+_0x207ae9(0xf7));const _0x4f3721=[],_0x579bff=[],_0x494c3a=[];for(const _0x29d544 of _0x44f760){const _0x254aaf=resolveRemoteScriptTarget(_0x1a6b48,_0x29d544,_0xdb4898,_0x84d3e5[_0x207ae9(0xe1)],_0x709756);if(!_0x254aaf){_0x579bff[_0x207ae9(0x104)]({'lockKey':_0x29d544[_0x207ae9(0xeb)]+'/'+_0x29d544[_0x207ae9(0xe0)],'reason':_0x207ae9(0x115)});continue;}const _0x42c63e=_0x84d3e5[_0x207ae9(0xe1)][_0x254aaf[_0x207ae9(0xdc)]];try{if(!_0x29d544['id'])throw new Error(_0x207ae9(0x10d));if(_0x29d544[_0x207ae9(0xff)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x462394=_0x29d544['scriptContent'],_0xf35866=computeContentHash(_0x462394);if(!_0x14d2a5){const _0x1290b9=await hasUnsyncedLocalChanges(_0x254aaf[_0x207ae9(0x11b)],_0x42c63e,_0xf35866);if(_0x1290b9){_0x579bff[_0x207ae9(0x104)]({'lockKey':_0x254aaf[_0x207ae9(0xdc)],'reason':_0x207ae9(0xda)});continue;}}await ensureParentDirectory(_0x254aaf[_0x207ae9(0x11b)]),await writeFile(_0x254aaf[_0x207ae9(0x11b)],_0x462394,'utf8');const _0x59d20b={'hash':_0xf35866,'remoteId':_0x29d544['id'],'version':_0x29d544[_0x207ae9(0xf9)]};_0x254aaf['type']===_0x207ae9(0xf3)&&_0x254aaf[_0x207ae9(0xfe)]&&(_0x59d20b[_0x207ae9(0xfa)]=_0x254aaf[_0x207ae9(0xfe)][_0x207ae9(0xfa)],_0x59d20b['datasetCode']=_0x254aaf[_0x207ae9(0xfe)][_0x207ae9(0x113)],_0x59d20b['operationType']=_0x254aaf[_0x207ae9(0xfe)][_0x207ae9(0xfc)],_0x59d20b['functionNode']=_0x254aaf['hookLocation'][_0x207ae9(0x101)]),_0x5283b9[_0x207ae9(0xe1)][_0x254aaf[_0x207ae9(0xdc)]]=_0x59d20b,_0x4f3721[_0x207ae9(0x104)]({'lockKey':_0x254aaf[_0x207ae9(0xdc)],'remoteId':_0x29d544['id']});}catch(_0x23b181){_0x494c3a[_0x207ae9(0x104)]({'lockKey':_0x254aaf[_0x207ae9(0xdc)],'error':_0x23b181 instanceof Error?_0x23b181[_0x207ae9(0xe3)]:String(_0x23b181)});}}return _0x5283b9[_0x207ae9(0x105)]=new Date()[_0x207ae9(0x108)](),await writeBffLockFile(_0x1a6b48[_0x207ae9(0x123)],_0x3a553c),{'ok':_0x494c3a['length']===0x0,'data':{'pulled':_0x4f3721,'skipped':_0x579bff,'failed':_0x494c3a},'message':_0x207ae9(0xe4)+_0x4f3721[_0x207ae9(0xec)]+_0x207ae9(0x124)+_0x579bff['length']+_0x207ae9(0xf6)+_0x494c3a['length']+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x2fb6dd,_0x1dd1d9,_0x596a0b){const _0x185c46=a30_0x39b4da;if(!await fileExists(_0x2fb6dd))return![];const _0x5cc7b1=await computeFileHash(_0x2fb6dd);if(!_0x1dd1d9)return _0x596a0b?_0x5cc7b1!==_0x596a0b:!![];return _0x5cc7b1!==_0x1dd1d9[_0x185c46(0x128)];}function buildDatasetCodeToAliasMap(_0x51a5f3,_0x1d104a){const _0x22670d=a30_0x39b4da,_0x204432=loadAliasMap(_0x51a5f3,undefined,resolveApiFilePath(_0x51a5f3,_0x1d104a));return new Map(_0x204432[_0x22670d(0x111)](_0x3fbf84=>[_0x3fbf84[_0x22670d(0x113)],_0x3fbf84[_0x22670d(0xfa)]]));}async function confirmForce(){const _0x4fcd7c=a30_0x39b4da,_0x4f0dee=createInterface({'input':process[_0x4fcd7c(0x107)],'output':process['stderr']}),_0x3675a0=await new Promise(_0x314ffc=>{const _0x3633c3=_0x4fcd7c;_0x4f0dee[_0x3633c3(0x10f)](_0x3633c3(0x11c),_0x314ffc);});return _0x4f0dee[_0x4fcd7c(0xdf)](),['y',_0x4fcd7c(0x114)][_0x4fcd7c(0xea)](_0x3675a0[_0x4fcd7c(0xe5)]()[_0x4fcd7c(0x10e)]());}function a30_0x5a6c(){const _0x221210=['functionName','functions','write','message','Pull\x20complete:\x20','trim','369970zYAOVn','Pull\x20only\x20this\x20script\x20type','would_pull','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','includes','scriptType','length','/api/management/library/scripts/list?appCode=','ENDPOINT','all','string','skipped','str','HOOK','pull','Force\x20pull\x20cancelled.','\x20skipped,\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','boolean','version','alias','apps','operationType','Force\x20overwrite\x20local\x20unsynced\x20changes','hookLocation','scriptContent','apiDir','functionNode','conflict','&type=','push','lastSync','186505IaZjMd','stdin','toISOString','appCode','cancelled','stringify','5064186sBchxS','Remote\x20script\x20missing\x20id.','toLowerCase','question','389672lnmGCH','map','scriptsRoot','datasetCode','yes','unresolvable\x20target\x20path','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','COMMON','1615952FoYSga','10RvFPRc','Would\x20inspect\x20','filePath','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','nonInteractive','type','55ymsBrL','Lock\x20scope\x20for\x20app\x20\x22','7xUkQel','validation','lockFilePath','\x20pulled,\x20','force','parse','bff','hash','1757987UDxnUe','local\x20unsynced\x20changes','12yFWqCu','lockKey','6399279wfaPOA','\x20remote\x20BFF\x20script(s)\x20for\x20pull','close'];a30_0x5a6c=function(){return _0x221210;};return a30_0x5a6c();}
@@ -1 +1 @@
1
- const a31_0x374596=a31_0x3745;(function(_0x5cf99a,_0x1205e5){const _0x5a05f7=a31_0x3745,_0x29cc31=_0x5cf99a();while(!![]){try{const _0xe8fbb3=parseInt(_0x5a05f7(0x101))/0x1*(parseInt(_0x5a05f7(0xe9))/0x2)+parseInt(_0x5a05f7(0x11a))/0x3*(-parseInt(_0x5a05f7(0x114))/0x4)+-parseInt(_0x5a05f7(0xeb))/0x5*(parseInt(_0x5a05f7(0xe6))/0x6)+-parseInt(_0x5a05f7(0x112))/0x7*(-parseInt(_0x5a05f7(0x10e))/0x8)+parseInt(_0x5a05f7(0x10f))/0x9*(parseInt(_0x5a05f7(0x107))/0xa)+parseInt(_0x5a05f7(0xfe))/0xb+parseInt(_0x5a05f7(0xfb))/0xc*(parseInt(_0x5a05f7(0xe8))/0xd);if(_0xe8fbb3===_0x1205e5)break;else _0x29cc31['push'](_0x29cc31['shift']());}catch(_0x27a772){_0x29cc31['push'](_0x29cc31['shift']());}}}(a31_0x1ece,0xba67a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';function a31_0x3745(_0x5b05cb,_0x3cea1a){_0x5b05cb=_0x5b05cb-0xdf;const _0x1ece55=a31_0x1ece();let _0x37454e=_0x1ece55[_0x5b05cb];return _0x37454e;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a31_0x374596(0x115),'command':a31_0x374596(0xff),'description':a31_0x374596(0x106),'risk':a31_0x374596(0x11f),'flags':[{'name':a31_0x374596(0x110),'type':a31_0x374596(0xe2),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a31_0x374596(0x122),a31_0x374596(0x123)]},{'name':a31_0x374596(0x121),'type':a31_0x374596(0xe2),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':'force','type':'boolean','description':a31_0x374596(0xee)}],async 'dryRun'(_0x580a05){const _0x4d0a40=a31_0x374596,_0x20a82d=loadBffProjectConfig(_0x580a05[_0x4d0a40(0x11b)]),_0x4a35aa=await readBffLockFile(_0x20a82d['lockFilePath']),{appLock:_0x3a60ca}=ensureLockScope(_0x4a35aa??createEmptyBffLock(),_0x580a05[_0x4d0a40(0x11b)],_0x20a82d[_0x4d0a40(0x11e)],'push'),_0x392526=await getTargetFunctions(_0x20a82d,_0x580a05),_0x131de7=_0x580a05['bool']('force'),_0x122298=[];for(const _0x1d8608 of _0x392526){const _0x4784fd=await computeFileHash(_0x1d8608[_0x4d0a40(0xf3)]),_0x3886e9=_0x3a60ca['functions'][_0x1d8608['lockKey']],_0x3d8cec=!!_0x3886e9&&_0x3886e9[_0x4d0a40(0xe0)]===_0x4784fd;_0x122298[_0x4d0a40(0xff)]({'lockKey':_0x1d8608[_0x4d0a40(0xe5)],'filePath':_0x1d8608['filePath'],'remoteId':_0x3886e9?.[_0x4d0a40(0x102)]??null,'mode':_0x3886e9?.[_0x4d0a40(0x102)]?'update':_0x4d0a40(0x105),'status':!_0x131de7&&_0x3d8cec?_0x4d0a40(0xec):_0x4d0a40(0x103)});}return{'method':'POST','url':_0x4d0a40(0xf0),'body':{'appCode':_0x580a05[_0x4d0a40(0x11b)],'force':_0x131de7,'files':_0x122298},'description':_0x4d0a40(0xe4)+_0x122298['length']+_0x4d0a40(0x10d)};},async 'execute'(_0x89dc61){const _0x5075a4=a31_0x374596,_0x26e517=loadBffProjectConfig(_0x89dc61[_0x5075a4(0x11b)]),_0x278c19=await readBffLockFile(_0x26e517[_0x5075a4(0xf9)]),{lockData:_0x4b26e9,appLock:_0x2e5fae}=ensureLockScope(_0x278c19??createEmptyBffLock(),_0x89dc61['appCode'],_0x26e517['scriptsRoot'],_0x5075a4(0xff)),_0x21d887=await getTargetFunctions(_0x26e517,_0x89dc61);if(_0x21d887[_0x5075a4(0xfa)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x5075a4(0x108)};const _0x3808b8=_0x89dc61[_0x5075a4(0xfc)](_0x5075a4(0xf6)),_0x51e8ca=await buildHookMaps(_0x89dc61[_0x5075a4(0x11b)],_0x89dc61[_0x5075a4(0x11c)],_0x21d887,_0x2e5fae),_0x470d1a=[],_0x26fdab=[],_0x36d2ca=[];for(const _0x4e17ca of _0x21d887){const _0x585a08=await computeFileHash(_0x4e17ca[_0x5075a4(0xf3)]),_0x1db17a=_0x2e5fae[_0x5075a4(0x109)][_0x4e17ca[_0x5075a4(0xe5)]];if(!_0x3808b8&&_0x1db17a&&_0x1db17a[_0x5075a4(0xe0)]===_0x585a08){_0x26fdab[_0x5075a4(0xff)]({'lockKey':_0x4e17ca[_0x5075a4(0xe5)],'reason':_0x5075a4(0xec)});continue;}try{await uploadSingleFunction(_0x89dc61[_0x5075a4(0x11b)],_0x4e17ca,_0x2e5fae,_0x51e8ca);const _0x255dc8=_0x2e5fae[_0x5075a4(0x109)][_0x4e17ca[_0x5075a4(0xe5)]];_0x470d1a[_0x5075a4(0xff)]({'lockKey':_0x4e17ca[_0x5075a4(0xe5)],'remoteId':_0x255dc8?.[_0x5075a4(0x102)]??0x0});}catch(_0x5ddc21){_0x36d2ca[_0x5075a4(0xff)]({'lockKey':_0x4e17ca[_0x5075a4(0xe5)],'error':_0x5ddc21 instanceof Error?_0x5ddc21[_0x5075a4(0xf8)]:String(_0x5ddc21)});}}return _0x2e5fae['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x26e517[_0x5075a4(0xf9)],_0x4b26e9),{'ok':_0x36d2ca[_0x5075a4(0xfa)]===0x0,'data':{'uploaded':_0x470d1a,'skipped':_0x26fdab,'failed':_0x36d2ca},'message':'Push\x20complete:\x20'+_0x470d1a['length']+_0x5075a4(0x120)+_0x26fdab[_0x5075a4(0xfa)]+_0x5075a4(0xdf)+_0x36d2ca[_0x5075a4(0xfa)]+_0x5075a4(0xed)};}};async function getTargetFunctions(_0x35e9fa,_0x91e688){const _0x24f68b=a31_0x374596,_0x36fa2b=_0x91e688[_0x24f68b(0x111)](_0x24f68b(0x110)),_0x37cc3f=_0x91e688[_0x24f68b(0x111)](_0x24f68b(0x121)),_0x4875a7=normalizeBffType(_0x36fa2b)??undefined;if(_0x37cc3f&&!_0x4875a7)throw CliErrors[_0x24f68b(0xea)](_0x24f68b(0x117));const _0x2e748d=await scanLocalBffFunctions(_0x35e9fa,_0x4875a7);if(_0x37cc3f){const _0x47eaf4=_0x2e748d[_0x24f68b(0x10b)](_0x2b74a9=>_0x2b74a9['name']===_0x37cc3f);if(_0x47eaf4['length']===0x0)throw CliErrors[_0x24f68b(0xea)]('Local\x20function\x20not\x20found:\x20'+_0x4875a7+'/'+_0x37cc3f);return _0x47eaf4;}return _0x2e748d;}async function buildHookMaps(_0x27a40b,_0x3f3b29,_0x1ea50b,_0x52557e){const _0x1c6647=a31_0x374596,_0x3e592d=_0x1ea50b[_0x1c6647(0xf4)](_0x5101b3=>_0x5101b3[_0x1c6647(0x110)]===_0x1c6647(0x123));if(!_0x3e592d)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x3d2cfb=loadAliasMap(_0x3f3b29,undefined,resolveApiFilePath(_0x3f3b29,_0x27a40b)),_0x44133d=new Map(_0x3d2cfb[_0x1c6647(0xf1)](_0x5974bc=>[_0x5974bc[_0x1c6647(0x10c)],_0x5974bc['datasetCode']]));for(const _0x57a485 of Object['values'](_0x52557e['functions'])){_0x57a485[_0x1c6647(0x10c)]&&_0x57a485[_0x1c6647(0xf7)]&&!_0x44133d[_0x1c6647(0xef)](_0x57a485[_0x1c6647(0x10c)])&&_0x44133d[_0x1c6647(0x119)](_0x57a485[_0x1c6647(0x10c)],_0x57a485['datasetCode']);}const _0x58a5a2=await listDatasets(_0x27a40b),_0x574ef0=new Map(_0x58a5a2[_0x1c6647(0xf1)](_0x35c03e=>[_0x35c03e[_0x1c6647(0xe1)],_0x35c03e['id']]));return{'aliasToDatasetCode':_0x44133d,'datasetCodeToId':_0x574ef0};}async function uploadSingleFunction(_0x46b785,_0x51bdf7,_0x494170,_0x44ef81){const _0x4b4305=a31_0x374596,_0x312ad9=await readFile(_0x51bdf7['filePath'],_0x4b4305(0xfd)),_0x4bcd8c=await computeFileHash(_0x51bdf7[_0x4b4305(0xf3)]),_0x2da821=_0x494170[_0x4b4305(0x109)][_0x51bdf7[_0x4b4305(0xe5)]];if(_0x2da821?.[_0x4b4305(0x102)]&&_0x2da821['version']==null)throw CliErrors[_0x4b4305(0xea)](_0x51bdf7[_0x4b4305(0xe5)]+_0x4b4305(0x116));let _0x34d345=extractScriptDescription(_0x312ad9);if(!_0x34d345&&_0x2da821?.[_0x4b4305(0x102)]){const _0x1b4a9c=await getBffScriptInfo(_0x2da821[_0x4b4305(0x102)]);_0x34d345=_0x1b4a9c[_0x4b4305(0x10a)]||undefined;}const _0x2078c7={'appCode':_0x46b785,'functionName':_0x51bdf7[_0x4b4305(0x121)],'scriptType':_0x51bdf7['type'],'scriptContent':_0x312ad9};if(_0x2da821?.[_0x4b4305(0x102)])_0x2078c7['id']=_0x2da821['remoteId'];if(_0x2da821?.[_0x4b4305(0x118)]!=null)_0x2078c7['version']=_0x2da821[_0x4b4305(0x118)];if(_0x34d345)_0x2078c7[_0x4b4305(0x10a)]=_0x34d345;if(_0x51bdf7[_0x4b4305(0x110)]===_0x4b4305(0x123)){const _0x17ae63=_0x51bdf7[_0x4b4305(0x10c)];if(!_0x17ae63||!_0x51bdf7[_0x4b4305(0xe3)]||!_0x51bdf7[_0x4b4305(0xf5)])throw CliErrors[_0x4b4305(0xea)]('Incomplete\x20HOOK\x20path:\x20'+_0x51bdf7['lockKey']);const _0x3583b9=_0x44ef81[_0x4b4305(0x104)][_0x4b4305(0x113)](_0x17ae63)??_0x2da821?.[_0x4b4305(0xf7)]??_0x17ae63,_0x10ea0b=_0x44ef81[_0x4b4305(0x100)]['get'](_0x3583b9);if(!_0x10ea0b)throw CliErrors[_0x4b4305(0xea)](_0x4b4305(0xe7)+_0x17ae63+'\x22.\x20'+(_0x4b4305(0xf2)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x2078c7[_0x4b4305(0x11d)]=_0x10ea0b,_0x2078c7[_0x4b4305(0xe3)]=_0x51bdf7[_0x4b4305(0xe3)],_0x2078c7['functionNode']=_0x51bdf7['functionNode'];}const _0x117e64=await saveBffScript(_0x2078c7),_0x702923=await getBffScriptInfo(_0x117e64),_0xa90afb={'hash':_0x4bcd8c,'remoteId':_0x117e64,'version':_0x702923[_0x4b4305(0x118)]};if(_0x51bdf7['type']===_0x4b4305(0x123)){const _0x47101c=_0x51bdf7[_0x4b4305(0x10c)],_0x8cc76a=_0x44ef81['aliasToDatasetCode'][_0x4b4305(0x113)](_0x47101c)??_0x2da821?.['datasetCode']??_0x47101c;_0x44ef81[_0x4b4305(0x104)][_0x4b4305(0xef)](_0x47101c)?_0xa90afb['alias']=_0x47101c:_0xa90afb[_0x4b4305(0x10c)]=_0x2da821?.[_0x4b4305(0x10c)],_0xa90afb[_0x4b4305(0xf7)]=_0x8cc76a,_0xa90afb[_0x4b4305(0xe3)]=_0x51bdf7[_0x4b4305(0xe3)],_0xa90afb[_0x4b4305(0xf5)]=_0x51bdf7['functionNode'];}_0x494170[_0x4b4305(0x109)][_0x51bdf7[_0x4b4305(0xe5)]]=_0xa90afb;}function a31_0x1ece(){const _0x3ee759=['497092RGhkwW','validation','395VdnDqU','unchanged','\x20failed','Force\x20push\x20ignoring\x20hash\x20protection','has','/api/management/library/scripts/save','map','Run\x20`','filePath','some','functionNode','force','datasetCode','message','lockFilePath','length','468nWRskn','bool','utf8','4815921IBqUbH','push','datasetCodeToId','1UqAOIY','remoteId','would_push','aliasToDatasetCode','create','Push\x20local\x20BFF\x20scripts\x20to\x20remote','5260xyuuZf','No\x20local\x20BFF\x20functions\x20found.','functions','description','filter','alias','\x20local\x20BFF\x20script(s)\x20for\x20push','36592EutENX','5634nZmuPi','type','str','1309AnALOJ','get','12hMgbrW','bff',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','version','set','1480881zxbuYD','appCode','apiDir','datasetId','scriptsRoot','high-risk-write','\x20uploaded,\x20','name','ENDPOINT','HOOK','\x20skipped,\x20','hash','code','string','operationType','Would\x20inspect\x20','lockKey','47742ZpPjcE','Cannot\x20resolve\x20dataset\x20for\x20\x22','334009iccmlr'];a31_0x1ece=function(){return _0x3ee759;};return a31_0x1ece();}
1
+ const a31_0x44f8a6=a31_0x1a27;(function(_0x15085d,_0x2b3709){const _0x407880=a31_0x1a27,_0x19a20a=_0x15085d();while(!![]){try{const _0x267c02=parseInt(_0x407880(0x9b))/0x1+parseInt(_0x407880(0x9a))/0x2*(parseInt(_0x407880(0x91))/0x3)+-parseInt(_0x407880(0x94))/0x4*(-parseInt(_0x407880(0xae))/0x5)+parseInt(_0x407880(0xab))/0x6+-parseInt(_0x407880(0x97))/0x7+parseInt(_0x407880(0x89))/0x8*(-parseInt(_0x407880(0xa4))/0x9)+-parseInt(_0x407880(0x96))/0xa;if(_0x267c02===_0x2b3709)break;else _0x19a20a['push'](_0x19a20a['shift']());}catch(_0x10aec1){_0x19a20a['push'](_0x19a20a['shift']());}}}(a31_0x30fa,0x33900));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';function a31_0x1a27(_0x60c982,_0x3e58ce){_0x60c982=_0x60c982-0x86;const _0x30faaf=a31_0x30fa();let _0x1a27e5=_0x30faaf[_0x60c982];return _0x1a27e5;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';function a31_0x30fa(){const _0x2b0be1=['314740VeSvco','\x20local\x20BFF\x20script(s)\x20for\x20push','1476500TAhUjr','1061522CqtiTi','map','functionNode','2btaaPh','366049ejOfXg','Force\x20push\x20ignoring\x20hash\x20protection','some','has','force','get','high-risk-write','\x20uploaded,\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','513LCFHlh','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCode','values','HOOK','version','lastSync','363120RjLjrv','Cannot\x20resolve\x20dataset\x20for\x20\x22','datasetId','5PeIowl','Local\x20function\x20not\x20found:\x20','COMMON','unchanged','description','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Incomplete\x20HOOK\x20path:\x20','lockKey','Run\x20`','appCode','create','alias','/api/management/library/scripts/save','length','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','remoteId','operationType','datasetCodeToId','lockFilePath','type','POST','\x22.\x20','filePath','Push\x20only\x20this\x20script\x20type','utf8','message','functions','ENDPOINT','scriptsRoot','bff','aliasToDatasetCode','bool','str','No\x20local\x20BFF\x20functions\x20found.','14664yCrNPA','hash','Would\x20inspect\x20','validation','string','name','push','apiDir','329169rtkLBz','boolean','\x20skipped,\x20'];a31_0x30fa=function(){return _0x2b0be1;};return a31_0x30fa();}import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a31_0x44f8a6(0xcb),'command':a31_0x44f8a6(0x8f),'description':a31_0x44f8a6(0xa5),'risk':a31_0x44f8a6(0xa1),'flags':[{'name':a31_0x44f8a6(0xc1),'type':a31_0x44f8a6(0x8d),'description':a31_0x44f8a6(0xc5),'enum':[a31_0x44f8a6(0xb0),a31_0x44f8a6(0xc9),a31_0x44f8a6(0xa8)]},{'name':'name','type':a31_0x44f8a6(0x8d),'description':a31_0x44f8a6(0xb3)},{'name':a31_0x44f8a6(0x9f),'type':a31_0x44f8a6(0x92),'description':a31_0x44f8a6(0x9c)}],async 'dryRun'(_0x1a0953){const _0x108863=a31_0x44f8a6,_0x34ce50=loadBffProjectConfig(_0x1a0953[_0x108863(0xb7)]),_0xb0839e=await readBffLockFile(_0x34ce50[_0x108863(0xc0)]),{appLock:_0x17b653}=ensureLockScope(_0xb0839e??createEmptyBffLock(),_0x1a0953[_0x108863(0xb7)],_0x34ce50[_0x108863(0xca)],'push'),_0x3470cf=await getTargetFunctions(_0x34ce50,_0x1a0953),_0x5578d9=_0x1a0953[_0x108863(0x86)]('force'),_0x2680d1=[];for(const _0x354a2c of _0x3470cf){const _0x124c96=await computeFileHash(_0x354a2c['filePath']),_0x930bda=_0x17b653[_0x108863(0xc8)][_0x354a2c[_0x108863(0xb5)]],_0x219428=!!_0x930bda&&_0x930bda[_0x108863(0x8a)]===_0x124c96;_0x2680d1['push']({'lockKey':_0x354a2c[_0x108863(0xb5)],'filePath':_0x354a2c[_0x108863(0xc4)],'remoteId':_0x930bda?.[_0x108863(0xbd)]??null,'mode':_0x930bda?.[_0x108863(0xbd)]?'update':_0x108863(0xb8),'status':!_0x5578d9&&_0x219428?_0x108863(0xb1):'would_push'});}return{'method':_0x108863(0xc2),'url':_0x108863(0xba),'body':{'appCode':_0x1a0953[_0x108863(0xb7)],'force':_0x5578d9,'files':_0x2680d1},'description':_0x108863(0x8b)+_0x2680d1[_0x108863(0xbb)]+_0x108863(0x95)};},async 'execute'(_0x953ccc){const _0x518aff=a31_0x44f8a6,_0x346acc=loadBffProjectConfig(_0x953ccc[_0x518aff(0xb7)]),_0x221b1f=await readBffLockFile(_0x346acc[_0x518aff(0xc0)]),{lockData:_0x20de85,appLock:_0x20b68c}=ensureLockScope(_0x221b1f??createEmptyBffLock(),_0x953ccc['appCode'],_0x346acc[_0x518aff(0xca)],_0x518aff(0x8f)),_0x2db17f=await getTargetFunctions(_0x346acc,_0x953ccc);if(_0x2db17f[_0x518aff(0xbb)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x518aff(0x88)};const _0x47a4e2=_0x953ccc[_0x518aff(0x86)]('force'),_0x57a545=await buildHookMaps(_0x953ccc[_0x518aff(0xb7)],_0x953ccc[_0x518aff(0x90)],_0x2db17f,_0x20b68c),_0x4126fb=[],_0x159d37=[],_0x250fcc=[];for(const _0x4e0909 of _0x2db17f){const _0x2b995d=await computeFileHash(_0x4e0909[_0x518aff(0xc4)]),_0x5da31f=_0x20b68c[_0x518aff(0xc8)][_0x4e0909[_0x518aff(0xb5)]];if(!_0x47a4e2&&_0x5da31f&&_0x5da31f[_0x518aff(0x8a)]===_0x2b995d){_0x159d37['push']({'lockKey':_0x4e0909['lockKey'],'reason':_0x518aff(0xb1)});continue;}try{await uploadSingleFunction(_0x953ccc['appCode'],_0x4e0909,_0x20b68c,_0x57a545);const _0x10c63a=_0x20b68c[_0x518aff(0xc8)][_0x4e0909[_0x518aff(0xb5)]];_0x4126fb['push']({'lockKey':_0x4e0909['lockKey'],'remoteId':_0x10c63a?.['remoteId']??0x0});}catch(_0x175c51){_0x250fcc[_0x518aff(0x8f)]({'lockKey':_0x4e0909[_0x518aff(0xb5)],'error':_0x175c51 instanceof Error?_0x175c51[_0x518aff(0xc7)]:String(_0x175c51)});}}return _0x20b68c[_0x518aff(0xaa)]=new Date()['toISOString'](),await writeBffLockFile(_0x346acc[_0x518aff(0xc0)],_0x20de85),{'ok':_0x250fcc[_0x518aff(0xbb)]===0x0,'data':{'uploaded':_0x4126fb,'skipped':_0x159d37,'failed':_0x250fcc},'message':'Push\x20complete:\x20'+_0x4126fb[_0x518aff(0xbb)]+_0x518aff(0xa2)+_0x159d37[_0x518aff(0xbb)]+_0x518aff(0x93)+_0x250fcc[_0x518aff(0xbb)]+'\x20failed'};}};async function getTargetFunctions(_0x1d38ee,_0x1ec0d0){const _0x577cb1=a31_0x44f8a6,_0x37d5e0=_0x1ec0d0['str'](_0x577cb1(0xc1)),_0x4129c0=_0x1ec0d0[_0x577cb1(0x87)]('name'),_0x36cb50=normalizeBffType(_0x37d5e0)??undefined;if(_0x4129c0&&!_0x36cb50)throw CliErrors[_0x577cb1(0x8c)](_0x577cb1(0xa3));const _0x31dea6=await scanLocalBffFunctions(_0x1d38ee,_0x36cb50);if(_0x4129c0){const _0x228279=_0x31dea6['filter'](_0x2f6483=>_0x2f6483[_0x577cb1(0x8e)]===_0x4129c0);if(_0x228279[_0x577cb1(0xbb)]===0x0)throw CliErrors['validation'](_0x577cb1(0xaf)+_0x36cb50+'/'+_0x4129c0);return _0x228279;}return _0x31dea6;}async function buildHookMaps(_0xf13240,_0x1cf450,_0x1dbe15,_0x4ef338){const _0x16b113=a31_0x44f8a6,_0x38175e=_0x1dbe15[_0x16b113(0x9d)](_0x5a52bf=>_0x5a52bf[_0x16b113(0xc1)]===_0x16b113(0xa8));if(!_0x38175e)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x3f11df=loadAliasMap(_0x1cf450,undefined,resolveApiFilePath(_0x1cf450,_0xf13240)),_0x5bb147=new Map(_0x3f11df[_0x16b113(0x98)](_0x3c9b00=>[_0x3c9b00[_0x16b113(0xb9)],_0x3c9b00[_0x16b113(0xa6)]]));for(const _0x1f2e0e of Object[_0x16b113(0xa7)](_0x4ef338['functions'])){_0x1f2e0e[_0x16b113(0xb9)]&&_0x1f2e0e['datasetCode']&&!_0x5bb147[_0x16b113(0x9e)](_0x1f2e0e[_0x16b113(0xb9)])&&_0x5bb147['set'](_0x1f2e0e[_0x16b113(0xb9)],_0x1f2e0e[_0x16b113(0xa6)]);}const _0x1c954d=await listDatasets(_0xf13240),_0x429e2b=new Map(_0x1c954d[_0x16b113(0x98)](_0x72a847=>[_0x72a847['code'],_0x72a847['id']]));return{'aliasToDatasetCode':_0x5bb147,'datasetCodeToId':_0x429e2b};}async function uploadSingleFunction(_0x36d78e,_0x5982c2,_0x4b4dfb,_0x171650){const _0x1e76a3=a31_0x44f8a6,_0x3815a4=await readFile(_0x5982c2[_0x1e76a3(0xc4)],_0x1e76a3(0xc6)),_0x36dec2=await computeFileHash(_0x5982c2['filePath']),_0x271b47=_0x4b4dfb[_0x1e76a3(0xc8)][_0x5982c2[_0x1e76a3(0xb5)]];if(_0x271b47?.['remoteId']&&_0x271b47[_0x1e76a3(0xa9)]==null)throw CliErrors[_0x1e76a3(0x8c)](_0x5982c2[_0x1e76a3(0xb5)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x6e1c62=extractScriptDescription(_0x3815a4);if(!_0x6e1c62&&_0x271b47?.[_0x1e76a3(0xbd)]){const _0x12572c=await getBffScriptInfo(_0x271b47[_0x1e76a3(0xbd)]);_0x6e1c62=_0x12572c[_0x1e76a3(0xb2)]||undefined;}const _0x52a780={'appCode':_0x36d78e,'functionName':_0x5982c2[_0x1e76a3(0x8e)],'scriptType':_0x5982c2[_0x1e76a3(0xc1)],'scriptContent':_0x3815a4};if(_0x271b47?.[_0x1e76a3(0xbd)])_0x52a780['id']=_0x271b47[_0x1e76a3(0xbd)];if(_0x271b47?.['version']!=null)_0x52a780[_0x1e76a3(0xa9)]=_0x271b47[_0x1e76a3(0xa9)];if(_0x6e1c62)_0x52a780['description']=_0x6e1c62;if(_0x5982c2[_0x1e76a3(0xc1)]==='HOOK'){const _0x29f5d9=_0x5982c2[_0x1e76a3(0xb9)];if(!_0x29f5d9||!_0x5982c2[_0x1e76a3(0xbe)]||!_0x5982c2['functionNode'])throw CliErrors[_0x1e76a3(0x8c)](_0x1e76a3(0xb4)+_0x5982c2[_0x1e76a3(0xb5)]);const _0x342441=_0x171650[_0x1e76a3(0xcc)][_0x1e76a3(0xa0)](_0x29f5d9)??_0x271b47?.[_0x1e76a3(0xa6)]??_0x29f5d9,_0x5202ef=_0x171650[_0x1e76a3(0xbf)][_0x1e76a3(0xa0)](_0x342441);if(!_0x5202ef)throw CliErrors['validation'](_0x1e76a3(0xac)+_0x29f5d9+_0x1e76a3(0xc3)+(_0x1e76a3(0xb6)+CLI_BIN_NAME+_0x1e76a3(0xbc)));_0x52a780[_0x1e76a3(0xad)]=_0x5202ef,_0x52a780['operationType']=_0x5982c2[_0x1e76a3(0xbe)],_0x52a780[_0x1e76a3(0x99)]=_0x5982c2[_0x1e76a3(0x99)];}const _0x2381e2=await saveBffScript(_0x52a780),_0x2de79e=await getBffScriptInfo(_0x2381e2),_0x3221d4={'hash':_0x36dec2,'remoteId':_0x2381e2,'version':_0x2de79e['version']};if(_0x5982c2[_0x1e76a3(0xc1)]===_0x1e76a3(0xa8)){const _0x1b0070=_0x5982c2[_0x1e76a3(0xb9)],_0x4bb029=_0x171650[_0x1e76a3(0xcc)][_0x1e76a3(0xa0)](_0x1b0070)??_0x271b47?.[_0x1e76a3(0xa6)]??_0x1b0070;_0x171650[_0x1e76a3(0xcc)][_0x1e76a3(0x9e)](_0x1b0070)?_0x3221d4[_0x1e76a3(0xb9)]=_0x1b0070:_0x3221d4[_0x1e76a3(0xb9)]=_0x271b47?.[_0x1e76a3(0xb9)],_0x3221d4[_0x1e76a3(0xa6)]=_0x4bb029,_0x3221d4['operationType']=_0x5982c2['operationType'],_0x3221d4[_0x1e76a3(0x99)]=_0x5982c2[_0x1e76a3(0x99)];}_0x4b4dfb[_0x1e76a3(0xc8)][_0x5982c2['lockKey']]=_0x3221d4;}
@@ -1 +1 @@
1
- const a32_0x2effad=a32_0x181f;(function(_0x1cc396,_0x1f13f9){const _0x50d4cb=a32_0x181f,_0x6228e2=_0x1cc396();while(!![]){try{const _0x384221=parseInt(_0x50d4cb(0x7d))/0x1+-parseInt(_0x50d4cb(0x81))/0x2+parseInt(_0x50d4cb(0x7e))/0x3+-parseInt(_0x50d4cb(0x83))/0x4*(parseInt(_0x50d4cb(0x68))/0x5)+-parseInt(_0x50d4cb(0x7f))/0x6+parseInt(_0x50d4cb(0x85))/0x7*(-parseInt(_0x50d4cb(0x79))/0x8)+parseInt(_0x50d4cb(0x70))/0x9*(parseInt(_0x50d4cb(0x7c))/0xa);if(_0x384221===_0x1f13f9)break;else _0x6228e2['push'](_0x6228e2['shift']());}catch(_0x456e9d){_0x6228e2['push'](_0x6228e2['shift']());}}}(a32_0x342c,0x61163));function a32_0x181f(_0x1fa3ec,_0x12fb86){_0x1fa3ec=_0x1fa3ec-0x68;const _0x342cff=a32_0x342c();let _0x181f5a=_0x342cff[_0x1fa3ec];return _0x181f5a;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a32_0x2effad(0x6d),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a32_0x2effad(0x6e),'type':a32_0x2effad(0x76),'description':a32_0x2effad(0x6b)}],async 'execute'(_0x56ed12){const _0x3cabb1=a32_0x2effad,_0x893e67=loadBffProjectConfig(_0x56ed12[_0x3cabb1(0x77)]),_0x2dddbc=await readBffLockFile(_0x893e67[_0x3cabb1(0x73)]),{appLock:_0x204e3b}=ensureLockScope(_0x2dddbc??createEmptyBffLock(),_0x56ed12[_0x3cabb1(0x77)],_0x893e67[_0x3cabb1(0x78)],_0x3cabb1(0x6d)),_0x2d1101=await scanLocalBffFunctions(_0x893e67),_0x191eae=[],_0x4ce23a=[],_0x110ea5=[];for(const _0x2212af of _0x2d1101){const _0x4866cb=await computeFileHash(_0x2212af[_0x3cabb1(0x69)]),_0x4fb93e=_0x204e3b[_0x3cabb1(0x6c)][_0x2212af[_0x3cabb1(0x7a)]];if(!_0x4fb93e)_0x191eae[_0x3cabb1(0x84)](_0x2212af[_0x3cabb1(0x7a)]);else _0x4fb93e[_0x3cabb1(0x6a)]!==_0x4866cb?_0x4ce23a['push'](_0x2212af['lockKey']):_0x110ea5[_0x3cabb1(0x84)](_0x2212af[_0x3cabb1(0x7a)]);}const _0x545b73=[];if(_0x56ed12[_0x3cabb1(0x6f)](_0x3cabb1(0x6e))){const _0x488a4d=loadAliasMap(_0x56ed12[_0x3cabb1(0x80)],undefined,resolveApiFilePath(_0x56ed12[_0x3cabb1(0x80)],_0x56ed12[_0x3cabb1(0x77)])),_0x328327=new Map(_0x488a4d[_0x3cabb1(0x86)](_0x284fac=>[_0x284fac[_0x3cabb1(0x71)],_0x284fac[_0x3cabb1(0x87)]])),[_0x3bd1f8,_0x5a4905]=await Promise['all']([listBffScripts(_0x56ed12[_0x3cabb1(0x77)]),getBffScriptStatistics(_0x56ed12[_0x3cabb1(0x77)])]),_0x16a4c6=createHookLocationMap(_0x5a4905),_0x345d54=new Set(_0x2d1101[_0x3cabb1(0x86)](_0x257a46=>_0x257a46[_0x3cabb1(0x7a)]));for(const _0xc5c86e of _0x3bd1f8){const _0x44ecfb=resolveRemoteScriptTarget(_0x893e67,_0xc5c86e,_0x16a4c6,_0x204e3b[_0x3cabb1(0x6c)],_0x328327);_0x44ecfb&&!_0x345d54[_0x3cabb1(0x74)](_0x44ecfb[_0x3cabb1(0x7a)])&&_0x545b73[_0x3cabb1(0x84)](_0x44ecfb[_0x3cabb1(0x7a)]);}}const _0x1e7211=_0x191eae[_0x3cabb1(0x75)]===0x0&&_0x4ce23a[_0x3cabb1(0x75)]===0x0&&_0x545b73[_0x3cabb1(0x75)]===0x0;return{'ok':!![],'data':{'added':_0x191eae,'modified':_0x4ce23a,'unchanged':_0x110ea5,'remoteOnly':_0x545b73},'message':_0x1e7211?_0x3cabb1(0x7b):_0x191eae[_0x3cabb1(0x75)]+'\x20added,\x20'+_0x4ce23a[_0x3cabb1(0x75)]+_0x3cabb1(0x72)+_0x110ea5[_0x3cabb1(0x75)]+_0x3cabb1(0x82)+(_0x545b73[_0x3cabb1(0x75)]>0x0?',\x20'+_0x545b73[_0x3cabb1(0x75)]+_0x3cabb1(0x88):'')};}};function a32_0x342c(){const _0x151053=['106218OHuJft','apiDir','1424966YEyzKJ','\x20unchanged','13136BLsjkx','push','70OhcMfA','map','alias','\x20remote-only','545MMrPQj','filePath','hash','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','functions','status','remote','bool','54LlWzjj','datasetCode','\x20modified,\x20','lockFilePath','has','length','boolean','appCode','scriptsRoot','103480DAnZVg','lockKey','All\x20BFF\x20scripts\x20are\x20in\x20sync.','1250780czREQP','531378PIWuAQ','999939XEKSmt'];a32_0x342c=function(){return _0x151053;};return a32_0x342c();}
1
+ function a32_0x2eef(){const _0x45fe23=['all','3620150vsjPDT','appCode','262983slgNEs','1889679vtAwwd','2363892thOkGU','\x20remote-only','has','length','\x20added,\x20','667675NuQSTV','status','56JhwSlB','alias','\x20unchanged','2DAXZEb','scriptsRoot','filePath','functions','9JGTYbr','lockKey','33352GcdBNU','87854ckLDUZ','map','read','push','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','apiDir','remote','hash','lockFilePath','bff','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'];a32_0x2eef=function(){return _0x45fe23;};return a32_0x2eef();}const a32_0x2a3b0b=a32_0x617c;(function(_0x1214c2,_0x4ab258){const _0x589147=a32_0x617c,_0x217424=_0x1214c2();while(!![]){try{const _0x16b813=-parseInt(_0x589147(0x9c))/0x1+-parseInt(_0x589147(0x95))/0x2*(-parseInt(_0x589147(0xab))/0x3)+parseInt(_0x589147(0x9b))/0x4+parseInt(_0x589147(0x90))/0x5+-parseInt(_0x589147(0xac))/0x6+-parseInt(_0x589147(0xaa))/0x7*(parseInt(_0x589147(0x92))/0x8)+parseInt(_0x589147(0x99))/0x9*(parseInt(_0x589147(0xa8))/0xa);if(_0x16b813===_0x4ab258)break;else _0x217424['push'](_0x217424['shift']());}catch(_0x4016ee){_0x217424['push'](_0x217424['shift']());}}}(a32_0x2eef,0x5ef62));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a32_0x617c(_0x83a641,_0x34c07e){_0x83a641=_0x83a641-0x8d;const _0x2eefd7=a32_0x2eef();let _0x617c74=_0x2eefd7[_0x83a641];return _0x617c74;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a32_0x2a3b0b(0xa5),'command':a32_0x2a3b0b(0x91),'description':a32_0x2a3b0b(0xa0),'risk':a32_0x2a3b0b(0x9e),'flags':[{'name':'remote','type':'boolean','description':a32_0x2a3b0b(0xa6)}],async 'execute'(_0x38071){const _0x24ce4a=a32_0x2a3b0b,_0x233b24=loadBffProjectConfig(_0x38071[_0x24ce4a(0xa9)]),_0x351673=await readBffLockFile(_0x233b24[_0x24ce4a(0xa4)]),{appLock:_0x27c85a}=ensureLockScope(_0x351673??createEmptyBffLock(),_0x38071[_0x24ce4a(0xa9)],_0x233b24[_0x24ce4a(0x96)],_0x24ce4a(0x91)),_0x424c19=await scanLocalBffFunctions(_0x233b24),_0x7ca6a6=[],_0x3d2481=[],_0x23cbec=[];for(const _0x182035 of _0x424c19){const _0x435ebc=await computeFileHash(_0x182035[_0x24ce4a(0x97)]),_0x1b1021=_0x27c85a[_0x24ce4a(0x98)][_0x182035['lockKey']];if(!_0x1b1021)_0x7ca6a6[_0x24ce4a(0x9f)](_0x182035[_0x24ce4a(0x9a)]);else _0x1b1021[_0x24ce4a(0xa3)]!==_0x435ebc?_0x3d2481[_0x24ce4a(0x9f)](_0x182035[_0x24ce4a(0x9a)]):_0x23cbec['push'](_0x182035[_0x24ce4a(0x9a)]);}const _0x25ba4a=[];if(_0x38071['bool'](_0x24ce4a(0xa2))){const _0x4e7554=loadAliasMap(_0x38071[_0x24ce4a(0xa1)],undefined,resolveApiFilePath(_0x38071[_0x24ce4a(0xa1)],_0x38071[_0x24ce4a(0xa9)])),_0x13eaa=new Map(_0x4e7554[_0x24ce4a(0x9d)](_0x16a487=>[_0x16a487['datasetCode'],_0x16a487[_0x24ce4a(0x93)]])),[_0x2742f1,_0x27177f]=await Promise[_0x24ce4a(0xa7)]([listBffScripts(_0x38071[_0x24ce4a(0xa9)]),getBffScriptStatistics(_0x38071['appCode'])]),_0x273836=createHookLocationMap(_0x27177f),_0x5c1667=new Set(_0x424c19['map'](_0x392e68=>_0x392e68[_0x24ce4a(0x9a)]));for(const _0x48c42a of _0x2742f1){const _0x5324c2=resolveRemoteScriptTarget(_0x233b24,_0x48c42a,_0x273836,_0x27c85a[_0x24ce4a(0x98)],_0x13eaa);_0x5324c2&&!_0x5c1667[_0x24ce4a(0x8d)](_0x5324c2[_0x24ce4a(0x9a)])&&_0x25ba4a['push'](_0x5324c2[_0x24ce4a(0x9a)]);}}const _0x371877=_0x7ca6a6[_0x24ce4a(0x8e)]===0x0&&_0x3d2481[_0x24ce4a(0x8e)]===0x0&&_0x25ba4a[_0x24ce4a(0x8e)]===0x0;return{'ok':!![],'data':{'added':_0x7ca6a6,'modified':_0x3d2481,'unchanged':_0x23cbec,'remoteOnly':_0x25ba4a},'message':_0x371877?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x7ca6a6['length']+_0x24ce4a(0x8f)+_0x3d2481[_0x24ce4a(0x8e)]+'\x20modified,\x20'+_0x23cbec[_0x24ce4a(0x8e)]+_0x24ce4a(0x94)+(_0x25ba4a['length']>0x0?',\x20'+_0x25ba4a[_0x24ce4a(0x8e)]+_0x24ce4a(0xad):'')};}};
@@ -1 +1 @@
1
- const a33_0x4c63d9=a33_0x1cfd;(function(_0x2d2fac,_0x29caca){const _0x4a1512=a33_0x1cfd,_0x55705f=_0x2d2fac();while(!![]){try{const _0x56b06e=-parseInt(_0x4a1512(0x1a9))/0x1+parseInt(_0x4a1512(0x1ae))/0x2+-parseInt(_0x4a1512(0x1b1))/0x3+-parseInt(_0x4a1512(0x1b0))/0x4*(parseInt(_0x4a1512(0x1a8))/0x5)+parseInt(_0x4a1512(0x1b5))/0x6+-parseInt(_0x4a1512(0x1b2))/0x7+parseInt(_0x4a1512(0x1ad))/0x8;if(_0x56b06e===_0x29caca)break;else _0x55705f['push'](_0x55705f['shift']());}catch(_0x32672f){_0x55705f['push'](_0x55705f['shift']());}}}(a33_0x37a7,0x55b2c));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runBuild(_0x244a17){return new Promise((_0x417988,_0x595753)=>{const _0x23e8b0=a33_0x1cfd,_0x39ffc5=Date[_0x23e8b0(0x1be)]();_0x244a17[_0x23e8b0(0x1bd)][_0x23e8b0(0x1af)](_0x23e8b0(0x1c3),_0x23e8b0(0x1c0),{'command':'npm\x20run\x20build'});let _0x41a12e='';const _0x7cf74f=spawn(_0x23e8b0(0x1b6),['run',_0x23e8b0(0x1c3)],{'stdio':['inherit',_0x23e8b0(0x1aa),_0x23e8b0(0x1b4)],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x23e8b0(0x1b7)](),_0x23e8b0(0x1bf),'.bin')+delimiter+process.env.PATH}});_0x7cf74f['stderr']?.['on'](_0x23e8b0(0x1ac),_0x1e2f3f=>{_0x41a12e+=_0x1e2f3f['toString']();}),_0x7cf74f['on']('close',_0x293c74=>{const _0x49af61=_0x23e8b0,_0x3ac1af=Date[_0x49af61(0x1be)]()-_0x39ffc5;if(_0x293c74===0x0||_0x293c74===null)_0x244a17['logger'][_0x49af61(0x1b9)](_0x49af61(0x1c3),_0x49af61(0x1c1),_0x3ac1af),_0x417988();else{const _0x4d3782={'exitCode':_0x293c74,'duration':_0x3ac1af,'command':_0x49af61(0x1b3),'cwd':process[_0x49af61(0x1b7)]()};_0x41a12e[_0x49af61(0x1c4)]()&&(_0x4d3782[_0x49af61(0x1c2)]=_0x41a12e[_0x49af61(0x1c4)]()),_0x244a17['logger']['error'](_0x49af61(0x1c3),_0x49af61(0x1bc),_0x4d3782),_0x595753(new Error(_0x49af61(0x1ba)+_0x293c74));}}),_0x7cf74f['on'](_0x23e8b0(0x1bb),_0x555abe=>{const _0x139516=_0x23e8b0,_0x2579ce=Date[_0x139516(0x1be)]()-_0x39ffc5;_0x244a17[_0x139516(0x1bd)][_0x139516(0x1bb)](_0x139516(0x1c3),_0x139516(0x1b8),{'error':_0x555abe['message'],'duration':_0x2579ce,'stderr':_0x41a12e[_0x139516(0x1c4)]()||undefined}),_0x595753(_0x555abe);});});}function a33_0x1cfd(_0xa45e1,_0x5e9231){_0xa45e1=_0xa45e1-0x1a8;const _0x37a76e=a33_0x37a7();let _0x1cfde0=_0x37a76e[_0xa45e1];return _0x1cfde0;}function a33_0x37a7(){const _0x4503f7=['592720jZHrBP','info','11404anJEaf','1958415ZJDfGx','4563692cSwcyI','npm\x20run\x20build','pipe','3647580OIZuJt','npm','cwd','项目构建出错','success','npm\x20run\x20build\x20exited\x20with\x20code\x20','error','项目构建失败','logger','now','node_modules','开始构建项目','项目构建成功','stderr','build','trim','20uCoaKw','433201xohAwQ','inherit','Build\x20project','data','9568768WQWteZ'];a33_0x37a7=function(){return _0x4503f7;};return a33_0x37a7();}export const buildCommand={'name':a33_0x4c63d9(0x1c3),'description':a33_0x4c63d9(0x1ab),async 'run'(_0x1352ac,_0x1c1bca,_0x36bb37){await runBuild(_0x1352ac);}};
1
+ function a33_0x21dc(){const _0x1e33f9=['8hgEHzx','logger','411807MoHXsE','Build\x20project','5468916iUWFJw','3849705zazZMg','build','173367vIRLxB','245684NXOgDh','8101324HQRnwS','run','npm\x20run\x20build','.bin','1030HIklld','3loPECj','error','inherit','node_modules','stderr','项目构建成功','close','开始构建项目','15IUjZsi','项目构建失败','cwd','now','2440566ifcwHa','trim','success','info','npm\x20run\x20build\x20exited\x20with\x20code\x20','npm','项目构建出错','pipe'];a33_0x21dc=function(){return _0x1e33f9;};return a33_0x21dc();}const a33_0x47e2aa=a33_0x3190;(function(_0x533c75,_0x37a83e){const _0x100c07=a33_0x3190,_0x19f12c=_0x533c75();while(!![]){try{const _0x2d5a48=-parseInt(_0x100c07(0x1ad))/0x1*(parseInt(_0x100c07(0x1a7))/0x2)+-parseInt(_0x100c07(0x1a4))/0x3+-parseInt(_0x100c07(0x1a3))/0x4+parseInt(_0x100c07(0x1b5))/0x5*(parseInt(_0x100c07(0x1b9))/0x6)+-parseInt(_0x100c07(0x1a8))/0x7*(parseInt(_0x100c07(0x19f))/0x8)+-parseInt(_0x100c07(0x1a6))/0x9+parseInt(_0x100c07(0x1ac))/0xa*(parseInt(_0x100c07(0x1a1))/0xb);if(_0x2d5a48===_0x37a83e)break;else _0x19f12c['push'](_0x19f12c['shift']());}catch(_0x33b77f){_0x19f12c['push'](_0x19f12c['shift']());}}}(a33_0x21dc,0xd7045));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runBuild(_0x23cdf2){return new Promise((_0x30a125,_0x3aba9d)=>{const _0x1dbc5c=a33_0x3190,_0x454ba7=Date[_0x1dbc5c(0x1b8)]();_0x23cdf2['logger'][_0x1dbc5c(0x1bc)](_0x1dbc5c(0x1a5),_0x1dbc5c(0x1b4),{'command':_0x1dbc5c(0x1aa)});let _0xb5311='';const _0x2a58e9=spawn(_0x1dbc5c(0x19c),[_0x1dbc5c(0x1a9),_0x1dbc5c(0x1a5)],{'stdio':[_0x1dbc5c(0x1af),_0x1dbc5c(0x1af),_0x1dbc5c(0x19e)],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x1dbc5c(0x1b7)](),_0x1dbc5c(0x1b0),_0x1dbc5c(0x1ab))+delimiter+process.env.PATH}});_0x2a58e9['stderr']?.['on']('data',_0x3c0cda=>{_0xb5311+=_0x3c0cda['toString']();}),_0x2a58e9['on'](_0x1dbc5c(0x1b3),_0x163651=>{const _0x290616=_0x1dbc5c,_0x1e109e=Date['now']()-_0x454ba7;if(_0x163651===0x0||_0x163651===null)_0x23cdf2[_0x290616(0x1a0)][_0x290616(0x1bb)]('build',_0x290616(0x1b2),_0x1e109e),_0x30a125();else{const _0x40d4be={'exitCode':_0x163651,'duration':_0x1e109e,'command':_0x290616(0x1aa),'cwd':process[_0x290616(0x1b7)]()};_0xb5311[_0x290616(0x1ba)]()&&(_0x40d4be[_0x290616(0x1b1)]=_0xb5311[_0x290616(0x1ba)]()),_0x23cdf2[_0x290616(0x1a0)]['error'](_0x290616(0x1a5),_0x290616(0x1b6),_0x40d4be),_0x3aba9d(new Error(_0x290616(0x1bd)+_0x163651));}}),_0x2a58e9['on'](_0x1dbc5c(0x1ae),_0x4e7a6f=>{const _0xcf9538=_0x1dbc5c,_0x3d9904=Date[_0xcf9538(0x1b8)]()-_0x454ba7;_0x23cdf2[_0xcf9538(0x1a0)][_0xcf9538(0x1ae)]('build',_0xcf9538(0x19d),{'error':_0x4e7a6f['message'],'duration':_0x3d9904,'stderr':_0xb5311[_0xcf9538(0x1ba)]()||undefined}),_0x3aba9d(_0x4e7a6f);});});}function a33_0x3190(_0x17ba53,_0x2c38fb){_0x17ba53=_0x17ba53-0x19c;const _0x21dc58=a33_0x21dc();let _0x3190f5=_0x21dc58[_0x17ba53];return _0x3190f5;}export const buildCommand={'name':a33_0x47e2aa(0x1a5),'description':a33_0x47e2aa(0x1a2),async 'run'(_0x386789,_0x389e8d,_0x4a1d83){await runBuild(_0x386789);}};
@@ -1 +1 @@
1
- const a34_0x42df77=a34_0x5e8a;(function(_0x586e8b,_0x42dfbd){const _0x2cbd35=a34_0x5e8a,_0xc61536=_0x586e8b();while(!![]){try{const _0x3c1e8b=-parseInt(_0x2cbd35(0x1e7))/0x1+parseInt(_0x2cbd35(0x1e4))/0x2*(parseInt(_0x2cbd35(0x1f1))/0x3)+-parseInt(_0x2cbd35(0x1da))/0x4*(parseInt(_0x2cbd35(0x1cf))/0x5)+parseInt(_0x2cbd35(0x1e2))/0x6+-parseInt(_0x2cbd35(0x1d7))/0x7*(parseInt(_0x2cbd35(0x1d8))/0x8)+-parseInt(_0x2cbd35(0x1e5))/0x9+parseInt(_0x2cbd35(0x1f6))/0xa;if(_0x3c1e8b===_0x42dfbd)break;else _0xc61536['push'](_0xc61536['shift']());}catch(_0x3634e2){_0xc61536['push'](_0xc61536['shift']());}}}(a34_0x1300,0x40dc4));import a34_0x3db758 from'chalk';import a34_0x3fb6ff from'ora';function a34_0x5e8a(_0x22d214,_0x5445df){_0x22d214=_0x22d214-0x1cd;const _0x13004d=a34_0x1300();let _0x5e8ab9=_0x13004d[_0x22d214];return _0x5e8ab9;}import a34_0x3d4487 from'semver';function a34_0x1300(){const _0x5323a4=['Unable\x20to\x20check\x20for\x20updates','execPath','pipe','\x20→\x20','2331260poTgdX','https://registry.npmjs.org/','json','stableVersion','Update\x20failed','green','Checking\x20for\x20updates...','175QiDKcE','fail','npm','bun','error','gray','succeed','run','347879LSoMAk','8MtDrXT','Update\x20available:\x20','20796mBxeiF','Updated\x20to\x20v','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','red','Already\x20up\x20to\x20date\x20(v','message','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','1451850AfrJDu','includes','153422TfgQAv','2366775vmjmIX','update','98351IOHkou','Version\x20comparison\x20failed','yellow','timeout','@latest','/latest','Current\x20version:\x20','\x20install\x20-g\x20','slice','log','15DOMSBG'];a34_0x1300=function(){return _0x5323a4;};return a34_0x1300();}import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x169f78=a34_0x5e8a;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x169f78(0x1ef)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x487227=a34_0x5e8a,_0x455acf=process[_0x487227(0x1f3)]['toLowerCase']();if(_0x455acf[_0x487227(0x1e3)](_0x487227(0x1d2)))return _0x487227(0x1d2);return'npm';}async function fetchLatestNpmVersion(){const _0x5c4778=a34_0x5e8a;try{const _0xfa7c70=await fetch(_0x5c4778(0x1f7)+NPM_PACKAGE_NAME+_0x5c4778(0x1ec),{'signal':AbortSignal[_0x5c4778(0x1ea)](0x2710)});if(!_0xfa7c70['ok'])return null;const _0x31fe2b=await _0xfa7c70[_0x5c4778(0x1f8)]();return _0x31fe2b['version']??null;}catch{return null;}}async function fetchLatestVersion(){const _0x5e1843=a34_0x5e8a,_0x555433=await fetchLatestNpmVersion();if(_0x555433)return _0x555433;const _0x49ac4f=await getCdnConfig();return _0x49ac4f?.['cli']?.[_0x5e1843(0x1f9)]??null;}async function execute(_0x38d6ca){const _0x2e0c67=a34_0x5e8a,_0x1f0a4f=getCurrentVersion();console[_0x2e0c67(0x1f0)](_0x2e0c67(0x1ed)+_0x1f0a4f);const _0x2c5cba=a34_0x3fb6ff(_0x2e0c67(0x1ce))['start'](),_0x41f618=await fetchLatestVersion();if(!_0x41f618)return _0x2c5cba[_0x2e0c67(0x1d0)](_0x2e0c67(0x1dd)),console[_0x2e0c67(0x1f0)](a34_0x3db758[_0x2e0c67(0x1d4)](_0x2e0c67(0x1dc)+NPM_PACKAGE_NAME+_0x2e0c67(0x1eb))),{'ok':![],'message':_0x2e0c67(0x1f2)};const _0x3a0f23=a34_0x3d4487['coerce'](_0x1f0a4f),_0x5861f3=a34_0x3d4487['coerce'](_0x41f618);if(!_0x3a0f23||!_0x5861f3)return _0x2c5cba[_0x2e0c67(0x1d0)](_0x2e0c67(0x1e8)),{'ok':![],'message':_0x2e0c67(0x1e8)};if(!a34_0x3d4487['lt'](_0x3a0f23,_0x5861f3))return _0x2c5cba[_0x2e0c67(0x1d5)](_0x2e0c67(0x1df)+_0x41f618+')'),{'ok':!![]};_0x2c5cba['info'](_0x2e0c67(0x1d9)+a34_0x3db758[_0x2e0c67(0x1e9)](_0x1f0a4f)+_0x2e0c67(0x1f5)+a34_0x3db758[_0x2e0c67(0x1cd)](_0x41f618));const _0x115795=detectPackageManager(),_0x361cfd=_0x115795===_0x2e0c67(0x1d1)?resolveNpmBin(_0x2e0c67(0x1d1)):_0x115795,_0x57301a=a34_0x3fb6ff('Updating\x20via\x20'+_0x115795+'...')['start']();try{return await execa(_0x361cfd,['install','-g',NPM_PACKAGE_NAME+_0x2e0c67(0x1eb)],{'stdio':_0x2e0c67(0x1f4)}),_0x57301a[_0x2e0c67(0x1d5)](_0x2e0c67(0x1db)+_0x41f618),console[_0x2e0c67(0x1f0)](a34_0x3db758[_0x2e0c67(0x1d4)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':!![]};}catch(_0xbc27e6){return _0x57301a[_0x2e0c67(0x1d0)](_0x2e0c67(0x1fa)),console[_0x2e0c67(0x1d3)](a34_0x3db758[_0x2e0c67(0x1de)]('\x20\x20'+_0xbc27e6[_0x2e0c67(0x1e0)])),console[_0x2e0c67(0x1f0)](a34_0x3db758[_0x2e0c67(0x1d4)]('\x20\x20Try\x20manually:\x20'+_0x115795+_0x2e0c67(0x1ee)+NPM_PACKAGE_NAME+_0x2e0c67(0x1eb))),{'ok':![],'message':_0xbc27e6['message']};}}export const updateDefinition={'service':a34_0x42df77(0x1e6),'command':a34_0x42df77(0x1d6),'description':a34_0x42df77(0x1e1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a34_0x5d6cc0=a34_0xdab5;(function(_0x3570eb,_0xdd9c47){const _0x4b1ec0=a34_0xdab5,_0x23ce3a=_0x3570eb();while(!![]){try{const _0x428ba6=parseInt(_0x4b1ec0(0xf5))/0x1*(-parseInt(_0x4b1ec0(0xd8))/0x2)+-parseInt(_0x4b1ec0(0xe1))/0x3*(-parseInt(_0x4b1ec0(0xd3))/0x4)+parseInt(_0x4b1ec0(0xed))/0x5+-parseInt(_0x4b1ec0(0xea))/0x6+-parseInt(_0x4b1ec0(0xfd))/0x7*(parseInt(_0x4b1ec0(0xe3))/0x8)+parseInt(_0x4b1ec0(0xe9))/0x9+parseInt(_0x4b1ec0(0xf4))/0xa;if(_0x428ba6===_0xdd9c47)break;else _0x23ce3a['push'](_0x23ce3a['shift']());}catch(_0x25dd5d){_0x23ce3a['push'](_0x23ce3a['shift']());}}}(a34_0x3559,0x401fb));import a34_0x57d612 from'chalk';import a34_0x12a244 from'ora';import a34_0xb93f35 from'semver';import{execa}from'execa';function a34_0xdab5(_0x32ee29,_0x5382ab){_0x32ee29=_0x32ee29-0xd2;const _0x355902=a34_0x3559();let _0xdab525=_0x355902[_0x32ee29];return _0xdab525;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5ec682=a34_0xdab5,_0x17905b=process[_0x5ec682(0xe7)][_0x5ec682(0xe4)]();if(_0x17905b[_0x5ec682(0xdd)](_0x5ec682(0xeb)))return _0x5ec682(0xeb);return _0x5ec682(0xef);}async function fetchLatestNpmVersion(){const _0xb61b0=a34_0xdab5;try{const _0x22e1d7=await fetch(_0xb61b0(0xd5)+NPM_PACKAGE_NAME+_0xb61b0(0xd6),{'signal':AbortSignal[_0xb61b0(0xdf)](0x2710)});if(!_0x22e1d7['ok'])return null;const _0x18cdb8=await _0x22e1d7['json']();return _0x18cdb8['version']??null;}catch{return null;}}async function fetchLatestVersion(){const _0x2f788b=a34_0xdab5,_0x8c15da=await fetchLatestNpmVersion();if(_0x8c15da)return _0x8c15da;const _0x323233=await getCdnConfig();return _0x323233?.['cli']?.[_0x2f788b(0xd2)]??null;}async function execute(_0x40a6cb){const _0x32a23=a34_0xdab5,_0x1a8c63=getCurrentVersion();console[_0x32a23(0xfb)]('Current\x20version:\x20'+_0x1a8c63);const _0x189938=a34_0x12a244(_0x32a23(0xfc))[_0x32a23(0xe2)](),_0xd3cbe1=await fetchLatestVersion();if(!_0xd3cbe1)return _0x189938[_0x32a23(0xf2)](_0x32a23(0xe5)),console[_0x32a23(0xfb)](a34_0x57d612['gray'](_0x32a23(0xd4)+NPM_PACKAGE_NAME+_0x32a23(0xdc))),{'ok':![],'message':_0x32a23(0xfa)};const _0x38b13f=a34_0xb93f35[_0x32a23(0xf6)](_0x1a8c63),_0x41f896=a34_0xb93f35[_0x32a23(0xf6)](_0xd3cbe1);if(!_0x38b13f||!_0x41f896)return _0x189938[_0x32a23(0xf2)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x32a23(0xdb)};if(!a34_0xb93f35['lt'](_0x38b13f,_0x41f896))return _0x189938[_0x32a23(0xe0)](_0x32a23(0xde)+_0xd3cbe1+')'),{'ok':!![]};_0x189938['info'](_0x32a23(0xf1)+a34_0x57d612[_0x32a23(0xf0)](_0x1a8c63)+_0x32a23(0xf7)+a34_0x57d612[_0x32a23(0xd7)](_0xd3cbe1));const _0x19b3f2=detectPackageManager(),_0x58f007=_0x19b3f2===_0x32a23(0xef)?resolveNpmBin(_0x32a23(0xef)):_0x19b3f2,_0xbde53e=a34_0x12a244(_0x32a23(0xf8)+_0x19b3f2+'...')['start']();try{return await execa(_0x58f007,['install','-g',NPM_PACKAGE_NAME+_0x32a23(0xdc)],{'stdio':'pipe'}),_0xbde53e[_0x32a23(0xe0)]('Updated\x20to\x20v'+_0xd3cbe1),console[_0x32a23(0xfb)](a34_0x57d612[_0x32a23(0xe8)](_0x32a23(0xec))),{'ok':!![]};}catch(_0x3d3af7){return _0xbde53e[_0x32a23(0xf2)](_0x32a23(0xe6)),console['error'](a34_0x57d612[_0x32a23(0xf9)]('\x20\x20'+_0x3d3af7[_0x32a23(0xda)])),console['log'](a34_0x57d612['gray']('\x20\x20Try\x20manually:\x20'+_0x19b3f2+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x32a23(0xdc))),{'ok':![],'message':_0x3d3af7[_0x32a23(0xda)]};}}function a34_0x3559(){const _0x513be5=['succeed','42471JMMkOq','start','227248cvtuit','toLowerCase','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20failed','execPath','gray','2250144ZZLFqk','2292726VHWquK','bun','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','394160wXYadG','run','npm','yellow','Update\x20available:\x20','fail','update','5348420IKhWua','58bnDBmK','coerce','\x20→\x20','Updating\x20via\x20','red','Unable\x20to\x20check\x20for\x20updates','log','Checking\x20for\x20updates...','14DlmoBy','stableVersion','96bRZYRt','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','https://registry.npmjs.org/','/latest','green','17306UHoGap','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','message','Version\x20comparison\x20failed','@latest','includes','Already\x20up\x20to\x20date\x20(v','timeout'];a34_0x3559=function(){return _0x513be5;};return a34_0x3559();}export const updateDefinition={'service':a34_0x5d6cc0(0xf3),'command':a34_0x5d6cc0(0xee),'description':a34_0x5d6cc0(0xd9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a35_0x443b(_0x27b21f,_0xc69697){_0x27b21f=_0x27b21f-0x133;const _0x175c8c=a35_0x175c();let _0x443b86=_0x175c8c[_0x27b21f];return _0x443b86;}(function(_0x1e10ca,_0x5eb959){const _0x187923=a35_0x443b,_0x214b80=_0x1e10ca();while(!![]){try{const _0xc3239f=-parseInt(_0x187923(0x139))/0x1+-parseInt(_0x187923(0x136))/0x2*(parseInt(_0x187923(0x135))/0x3)+-parseInt(_0x187923(0x13a))/0x4*(-parseInt(_0x187923(0x137))/0x5)+-parseInt(_0x187923(0x13b))/0x6+parseInt(_0x187923(0x133))/0x7+parseInt(_0x187923(0x138))/0x8+-parseInt(_0x187923(0x134))/0x9*(-parseInt(_0x187923(0x13c))/0xa);if(_0xc3239f===_0x5eb959)break;else _0x214b80['push'](_0x214b80['shift']());}catch(_0x465b34){_0x214b80['push'](_0x214b80['shift']());}}}(a35_0x175c,0xb7577));import{codegenSdk}from'./sdk.js';function a35_0x175c(){const _0xdf3ecd=['8388660TVobmU','1890120fnctGk','6115823VlQxAx','162qOOWks','6LZwJfT','1302876LuqWRS','1827110QDlOrB','843464gJrKir','1294807qaxGsq','4FlTldK'];a35_0x175c=function(){return _0xdf3ecd;};return a35_0x175c();}import{codegenSql}from'./sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x38c2df,_0x505b59){const _0x584e58=a35_0x202c,_0x48e3d8=_0x38c2df();while(!![]){try{const _0x29d267=parseInt(_0x584e58(0x1ea))/0x1+-parseInt(_0x584e58(0x1f3))/0x2*(parseInt(_0x584e58(0x1ee))/0x3)+parseInt(_0x584e58(0x1f2))/0x4*(-parseInt(_0x584e58(0x1f4))/0x5)+-parseInt(_0x584e58(0x1f0))/0x6*(-parseInt(_0x584e58(0x1eb))/0x7)+parseInt(_0x584e58(0x1f1))/0x8+-parseInt(_0x584e58(0x1ed))/0x9*(-parseInt(_0x584e58(0x1f5))/0xa)+-parseInt(_0x584e58(0x1ec))/0xb*(-parseInt(_0x584e58(0x1ef))/0xc);if(_0x29d267===_0x505b59)break;else _0x48e3d8['push'](_0x48e3d8['shift']());}catch(_0x568c59){_0x48e3d8['push'](_0x48e3d8['shift']());}}}(a35_0x2302,0x5d3fb));function a35_0x2302(){const _0x3a6aa9=['112UGZiuc','209075KNwoFI','260PZvbSW','676077YjvOfC','12817wUKLpy','33561faagSk','125919GvTnzx','38058EhJIZF','624pLZQQU','54DRBGaI','4705952CQWZOl','68hVODbI'];a35_0x2302=function(){return _0x3a6aa9;};return a35_0x2302();}import{codegenSdk}from'./sdk.js';import{codegenSql}from'./sql.js';function a35_0x202c(_0x5b6d6f,_0x3fa067){_0x5b6d6f=_0x5b6d6f-0x1ea;const _0x2302ef=a35_0x2302();let _0x202c36=_0x2302ef[_0x5b6d6f];return _0x202c36;}export const codegenDefinitions=[codegenSdk,codegenSql];