@lovrabet/rabetbase-cli 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) 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/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -0
  67. package/lib/commands/project/create/format-elapsed.js +1 -0
  68. package/lib/commands/project/create/main.js +1 -0
  69. package/lib/commands/project/create/non-interactive.js +1 -0
  70. package/lib/commands/project/create/project-template-path.js +1 -0
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -0
  72. package/lib/commands/project/create/use-format-code.js +1 -0
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -0
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -0
  76. package/lib/commands/project/upgrade.js +1 -0
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/skill/index.js +1 -1
  80. package/lib/commands/sql/detail.js +1 -1
  81. package/lib/commands/sql/exec.js +1 -1
  82. package/lib/commands/sql/index.js +1 -1
  83. package/lib/commands/sql/list.js +1 -1
  84. package/lib/commands/sql/save.js +1 -1
  85. package/lib/commands/sql/validate.js +1 -1
  86. package/lib/constant/cli.js +1 -1
  87. package/lib/constant/domain.js +1 -1
  88. package/lib/constant/env.js +1 -1
  89. package/lib/context.js +1 -1
  90. package/lib/core/alias-resolver.js +1 -1
  91. package/lib/core/api-client.js +1 -1
  92. package/lib/core/bff/config.js +1 -1
  93. package/lib/core/bff/file-system.js +1 -1
  94. package/lib/core/bff/hash.js +1 -1
  95. package/lib/core/bff/lock.js +1 -1
  96. package/lib/core/bff/utils.js +1 -1
  97. package/lib/core/db-resolver.js +1 -1
  98. package/lib/core/sql-validator.js +1 -1
  99. package/lib/errors.js +1 -1
  100. package/lib/framework/flags.js +1 -1
  101. package/lib/framework/help.js +1 -1
  102. package/lib/framework/index.js +1 -1
  103. package/lib/framework/output.js +1 -1
  104. package/lib/framework/response.js +1 -1
  105. package/lib/framework/runner.js +1 -1
  106. package/lib/framework/types.js +1 -1
  107. package/lib/generated/build-info.js +1 -1
  108. package/lib/help.js +1 -1
  109. package/lib/skills/main.js +1 -1
  110. package/lib/skills/npx-skills-add.js +1 -1
  111. package/lib/telemetry/cli-command-trace.js +1 -1
  112. package/lib/telemetry/cli-help-trace.js +1 -1
  113. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  114. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  115. package/lib/telemetry/send-cli-trace-log.js +1 -1
  116. package/lib/utils/ai_config.js +1 -1
  117. package/lib/utils/cdn-config.js +1 -1
  118. package/lib/utils/check-sdk-version.js +1 -1
  119. package/lib/utils/cli-version-check.js +1 -1
  120. package/lib/utils/config.js +1 -1
  121. package/lib/utils/copy-directory.js +1 -1
  122. package/lib/utils/file-utils.js +1 -1
  123. package/lib/utils/guides-cdn.js +1 -1
  124. package/lib/utils/http-client.js +1 -1
  125. package/lib/utils/is-non-interactive.js +1 -1
  126. package/lib/utils/logger.js +1 -1
  127. package/lib/utils/platform.js +1 -1
  128. package/lib/utils/rules-cdn.js +1 -1
  129. package/lib/utils/sleep.js +1 -1
  130. package/lib/utils/template-replacer.js +1 -1
  131. package/lib/utils/version.js +1 -1
  132. package/lib/utils/with-active-cookie.js +1 -1
  133. package/package.json +1 -1
  134. package/lib/commands/build.js +0 -1
  135. package/lib/commands/preview.js +0 -1
  136. package/lib/commands/project-upgrade.js +0 -1
  137. package/lib/commands/start.js +0 -1
  138. package/lib/create-app/enhanced-guided-create.js +0 -1
  139. package/lib/create-app/format-elapsed.js +0 -1
  140. package/lib/create-app/main.js +0 -1
  141. package/lib/create-app/non-interactive.js +0 -1
  142. package/lib/create-app/use-copy-project-template.js +0 -1
  143. package/lib/create-app/use-format-code.js +0 -1
  144. package/lib/create-app/use-install-dependencies.js +0 -1
  145. package/lib/init/main.js +0 -1
@@ -1 +1 @@
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
+ const a20_0x3bd5b0=a20_0x3165;(function(_0x55354a,_0x3ea66e){const _0x3ab50c=a20_0x3165,_0x1a2456=_0x55354a();while(!![]){try{const _0x1aaac0=-parseInt(_0x3ab50c(0xeb))/0x1+parseInt(_0x3ab50c(0xf2))/0x2*(-parseInt(_0x3ab50c(0xf5))/0x3)+parseInt(_0x3ab50c(0xf6))/0x4+-parseInt(_0x3ab50c(0xf3))/0x5*(parseInt(_0x3ab50c(0xf0))/0x6)+parseInt(_0x3ab50c(0xf1))/0x7*(parseInt(_0x3ab50c(0xf8))/0x8)+parseInt(_0x3ab50c(0xef))/0x9+-parseInt(_0x3ab50c(0xea))/0xa;if(_0x1aaac0===_0x3ea66e)break;else _0x1a2456['push'](_0x1a2456['shift']());}catch(_0x53d2c1){_0x1a2456['push'](_0x1a2456['shift']());}}}(a20_0xd932,0xeb1be));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x507958){const _0x36fe0c=a20_0x3165,{setActiveCookie:_0x4cb803}=await import('../../core/api-client.js');_0x4cb803(_0x507958[_0x36fe0c(0xec)]);const _0xcdc319=await listRemoteApps(),_0x17ec1d=_0xcdc319[_0x36fe0c(0xed)](_0x4848a7=>({..._0x4848a7['id']!=null?{'id':_0x4848a7['id']}:{},'appCode':_0x4848a7[_0x36fe0c(0xf7)],'appName':_0x4848a7['appName'],..._0x4848a7[_0x36fe0c(0xf4)]!=null?{'appDesc':_0x4848a7[_0x36fe0c(0xf4)]}:{}}));return{'ok':!![],'data':_0x17ec1d};}export const appRemoteDefinition={'service':a20_0x3bd5b0(0xee),'command':'remote','description':a20_0x3bd5b0(0xe8),'risk':a20_0x3bd5b0(0xe9),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};function a20_0x3165(_0x534c15,_0x14d5cb){_0x534c15=_0x534c15-0xe8;const _0xd932e6=a20_0xd932();let _0x3165fc=_0xd932e6[_0x534c15];return _0x3165fc;}function a20_0xd932(){const _0x12700b=['appDesc','2696784hdITkO','4701960FZtkMV','appCode','24CspgAd','List\x20apps\x20available\x20on\x20the\x20platform','read','8492820eKpEyj','1032555LTiLLK','cookie','map','app','12511197QRaxBd','630wyIgAT','2751217pmJHqH','2GBbDVC','45ohmicG'];a20_0xd932=function(){return _0x12700b;};return a20_0xd932();}
@@ -1 +1 @@
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
+ function a21_0x2ca8(_0x347073,_0x27f5df){_0x347073=_0x347073-0x1c7;const _0x3ac144=a21_0x3ac1();let _0x2ca866=_0x3ac144[_0x347073];return _0x2ca866;}const a21_0x1fd10e=a21_0x2ca8;(function(_0x11c066,_0x370c12){const _0x3e082b=a21_0x2ca8,_0xda513b=_0x11c066();while(!![]){try{const _0x1c294c=parseInt(_0x3e082b(0x1cf))/0x1+parseInt(_0x3e082b(0x1cc))/0x2*(-parseInt(_0x3e082b(0x1e1))/0x3)+-parseInt(_0x3e082b(0x1d8))/0x4+-parseInt(_0x3e082b(0x1d9))/0x5+parseInt(_0x3e082b(0x1db))/0x6+-parseInt(_0x3e082b(0x1ca))/0x7+parseInt(_0x3e082b(0x1d4))/0x8*(parseInt(_0x3e082b(0x1e0))/0x9);if(_0x1c294c===_0x370c12)break;else _0xda513b['push'](_0xda513b['shift']());}catch(_0x469268){_0xda513b['push'](_0xda513b['shift']());}}}(a21_0x3ac1,0x72ea0));import{CliErrors}from'../../errors.js';function a21_0x3ac1(){const _0x2cc2e1=['name','App\x20\x22','App\x20name\x20to\x20remove','5334994nwycIK','Missing\x20app\x20name.','994090aHOZUa','write','keys','702015OQhLov','defaultApp','Removed\x20app\x20\x22','apps','\x22\x20not\x20found.','2468080kaFeYz','string','length','validation','3647556tYMYNl','1730420DPbKtP','Usage:\x20','4459698XeLYVQ','Remove\x20an\x20app\x20from\x20config','remove','\x20app\x20remove\x20--name\x20<name>','global','45rnRizK','3vZZDqZ','Use\x20global\x20config\x20scope','\x20Default\x20app\x20changed\x20to\x20\x22','bool'];a21_0x3ac1=function(){return _0x2cc2e1;};return a21_0x3ac1();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig}from'./shared.js';async function execute(_0x2e8d20){const _0x53ff68=a21_0x2ca8,_0x1c3076=_0x2e8d20['str'](_0x53ff68(0x1c7));if(!_0x1c3076)throw CliErrors[_0x53ff68(0x1d7)](_0x53ff68(0x1cb),_0x53ff68(0x1da)+CLI_BIN_NAME+_0x53ff68(0x1de));const _0x234813={'global':_0x2e8d20[_0x53ff68(0x1e4)](_0x53ff68(0x1df))},_0x358f45=readConfig(_0x234813),_0x2b3c8b=_0x358f45[_0x53ff68(0x1d2)];if(!_0x2b3c8b||!_0x2b3c8b[_0x1c3076])throw CliErrors['validation'](_0x53ff68(0x1c8)+_0x1c3076+_0x53ff68(0x1d3));delete _0x2b3c8b[_0x1c3076];let _0x49a131='';if(_0x358f45[_0x53ff68(0x1d0)]===_0x1c3076){const _0x5d2f28=Object[_0x53ff68(0x1ce)](_0x2b3c8b);_0x358f45[_0x53ff68(0x1d0)]=_0x5d2f28[_0x53ff68(0x1d6)]>0x0?_0x5d2f28[0x0]:undefined,_0x358f45['defaultApp']?_0x49a131=_0x53ff68(0x1e3)+_0x358f45[_0x53ff68(0x1d0)]+'\x22.':delete _0x358f45[_0x53ff68(0x1d0)];}return Object[_0x53ff68(0x1ce)](_0x2b3c8b)[_0x53ff68(0x1d6)]===0x0&&(delete _0x358f45[_0x53ff68(0x1d2)],delete _0x358f45[_0x53ff68(0x1d0)]),writeConfig(_0x358f45,_0x234813),{'ok':!![],'message':_0x53ff68(0x1d1)+_0x1c3076+'\x22.'+_0x49a131};}export const appRemoveDefinition={'service':'app','command':a21_0x1fd10e(0x1dd),'description':a21_0x1fd10e(0x1dc),'risk':a21_0x1fd10e(0x1cd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'name','type':a21_0x1fd10e(0x1d5),'description':a21_0x1fd10e(0x1c9),'required':!![]},{'name':a21_0x1fd10e(0x1df),'type':'boolean','description':a21_0x1fd10e(0x1e2),'default':![]}],'execute':execute};
@@ -1 +1 @@
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
+ (function(_0x114581,_0x1fdee5){const _0x28109b=a22_0x3c04,_0x23ca07=_0x114581();while(!![]){try{const _0x2a5018=parseInt(_0x28109b(0x186))/0x1+-parseInt(_0x28109b(0x18a))/0x2*(-parseInt(_0x28109b(0x18c))/0x3)+parseInt(_0x28109b(0x189))/0x4+parseInt(_0x28109b(0x183))/0x5*(-parseInt(_0x28109b(0x188))/0x6)+-parseInt(_0x28109b(0x18e))/0x7+parseInt(_0x28109b(0x195))/0x8+parseInt(_0x28109b(0x193))/0x9*(-parseInt(_0x28109b(0x196))/0xa);if(_0x2a5018===_0x1fdee5)break;else _0x23ca07['push'](_0x23ca07['shift']());}catch(_0x550ef0){_0x23ca07['push'](_0x23ca07['shift']());}}}(a22_0x1571,0x19d76));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function getConfigPath(_0x31f6de={}){const _0x37db61=a22_0x3c04,_0x31d8fe=_0x31f6de['global']?_0x37db61(0x18d):_0x37db61(0x192);return resolveWriteConfigPath(_0x31d8fe);}function a22_0x3c04(_0x5db268,_0x2d2a78){_0x5db268=_0x5db268-0x183;const _0x1571ee=a22_0x1571();let _0x3c04d7=_0x1571ee[_0x5db268];return _0x3c04d7;}export function readConfig(_0x10b83a={}){return readConfigFile(getConfigPath(_0x10b83a));}function a22_0x1571(){const _0x5951a7=['locale','apps','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','appcode','2865MEsZcr','Migrated\x20existing\x20app\x20\x22','log','185464YYKWks','apiDir','534vRLuBf','17332qXcJNS','10742toNkOE','riskLevel','63xHYAQd','global','30296LvogyK','app','pageSize','defaultApp','project','9iWpfre','cookie','48448TFwmDM','1474730tGNPgI'];a22_0x1571=function(){return _0x5951a7;};return a22_0x1571();}export function writeConfig(_0x1c4dc6,_0x347e74={}){writeConfigFile(getConfigPath(_0x347e74),_0x1c4dc6);}export function scopeLabel(_0x32d98){const _0x448caa=a22_0x3c04;return _0x32d98[_0x448caa(0x18d)]?'\x20(global)':'';}export function migrateLegacySingleApp(_0x3ef1c8,_0x6d6b67){const _0x929ecd=a22_0x3c04,_0x15c031=_0x3ef1c8[_0x929ecd(0x19a)]||_0x3ef1c8[_0x929ecd(0x18f)];if(!_0x15c031)return;const _0x31e636=String(_0x15c031);if(_0x31e636===_0x6d6b67)return;const _0x21209a=['env',_0x929ecd(0x187),_0x929ecd(0x194),'accessKey','format',_0x929ecd(0x190),_0x929ecd(0x18b),_0x929ecd(0x197)],_0x398c45={'appcode':_0x15c031};for(const _0x4f8d29 of _0x21209a){if(_0x3ef1c8[_0x4f8d29]!=null)_0x398c45[_0x4f8d29]=_0x3ef1c8[_0x4f8d29];}_0x3ef1c8[_0x929ecd(0x198)][_0x31e636]=_0x398c45,_0x3ef1c8[_0x929ecd(0x191)]=_0x31e636,delete _0x3ef1c8['appcode'],delete _0x3ef1c8[_0x929ecd(0x18f)],console[_0x929ecd(0x185)](_0x929ecd(0x184)+_0x31e636+_0x929ecd(0x199));}
@@ -1 +1 @@
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
+ const a23_0x3fa2ca=a23_0x4156;function a23_0x13fa(){const _0x25996a=['App\x20\x22','24942Vzgmmu','bool','string','Use\x20global\x20config\x20scope','\x20--appcode\x20<code>`\x20first.','\x20app\x20add\x20--name\x20','Available:\x20','appcode','19363170hWAHmx','name','write','\x22\x20not\x20found.','15YZeOnd','Missing\x20app\x20name.','App\x20name\x20to\x20activate','234488KSdsiT','Switch\x20the\x20default\x20app','878895fTBxze','validation','903rNrBBU','626680xLwLCD','21096OAFyjb','app','1717174PmEPlD','Use\x20`','90zpYefC','str','defaultApp','use','Default\x20app\x20set\x20to\x20\x22','\x22\x20(appcode:\x20','join'];a23_0x13fa=function(){return _0x25996a;};return a23_0x13fa();}(function(_0x5dce07,_0x441154){const _0x5f3f53=a23_0x4156,_0x22b3bc=_0x5dce07();while(!![]){try{const _0x2ca631=parseInt(_0x5f3f53(0x1d3))/0x1+-parseInt(_0x5f3f53(0x1d9))/0x2+parseInt(_0x5f3f53(0x1d7))/0x3+parseInt(_0x5f3f53(0x1d1))/0x4*(-parseInt(_0x5f3f53(0x1ce))/0x5)+-parseInt(_0x5f3f53(0x1c2))/0x6*(parseInt(_0x5f3f53(0x1d5))/0x7)+-parseInt(_0x5f3f53(0x1d6))/0x8*(parseInt(_0x5f3f53(0x1db))/0x9)+parseInt(_0x5f3f53(0x1ca))/0xa;if(_0x2ca631===_0x441154)break;else _0x22b3bc['push'](_0x22b3bc['shift']());}catch(_0x11b095){_0x22b3bc['push'](_0x22b3bc['shift']());}}}(a23_0x13fa,0x724dc));import{CliErrors}from'../../errors.js';function a23_0x4156(_0x4d0c8f,_0x32133a){_0x4d0c8f=_0x4d0c8f-0x1c1;const _0x13fa4c=a23_0x13fa();let _0x415658=_0x13fa4c[_0x4d0c8f];return _0x415658;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig,scopeLabel}from'./shared.js';async function execute(_0x18616c){const _0x22e69e=a23_0x4156,_0x23d4a3=_0x18616c[_0x22e69e(0x1dc)](_0x22e69e(0x1cb));if(!_0x23d4a3)throw CliErrors[_0x22e69e(0x1d4)](_0x22e69e(0x1cf),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20--name\x20<name>');const _0x12e1af={'global':_0x18616c[_0x22e69e(0x1c3)]('global')},_0x3bff61=readConfig(_0x12e1af),_0x972e68=_0x3bff61['apps']??{};if(!_0x972e68[_0x23d4a3]){const _0x4f6823=Object['keys'](_0x972e68),_0x28a1bd=_0x4f6823['length']===0x0?_0x22e69e(0x1da)+CLI_BIN_NAME+_0x22e69e(0x1c7)+_0x23d4a3+_0x22e69e(0x1c6):_0x22e69e(0x1c8)+_0x4f6823[_0x22e69e(0x1e1)](',\x20');throw CliErrors['validation'](_0x22e69e(0x1c1)+_0x23d4a3+_0x22e69e(0x1cd),_0x28a1bd);}return _0x3bff61[_0x22e69e(0x1dd)]=_0x23d4a3,writeConfig(_0x3bff61,_0x12e1af),{'ok':!![],'message':_0x22e69e(0x1df)+_0x23d4a3+_0x22e69e(0x1e0)+_0x972e68[_0x23d4a3][_0x22e69e(0x1c9)]+')'+scopeLabel(_0x12e1af)};}export const appUseDefinition={'service':a23_0x3fa2ca(0x1d8),'command':a23_0x3fa2ca(0x1de),'description':a23_0x3fa2ca(0x1d2),'risk':a23_0x3fa2ca(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'name','type':a23_0x3fa2ca(0x1c4),'description':a23_0x3fa2ca(0x1d0),'required':!![]},{'name':'global','type':'boolean','description':a23_0x3fa2ca(0x1c5),'default':![]}],'execute':execute};
@@ -1 +1 @@
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
+ const a24_0x268df5=a24_0x1cee;(function(_0x3da676,_0x318357){const _0x459536=a24_0x1cee,_0x57c39b=_0x3da676();while(!![]){try{const _0x55bc61=-parseInt(_0x459536(0x167))/0x1+-parseInt(_0x459536(0x160))/0x2+parseInt(_0x459536(0x165))/0x3+-parseInt(_0x459536(0x16d))/0x4*(parseInt(_0x459536(0x161))/0x5)+-parseInt(_0x459536(0x164))/0x6*(parseInt(_0x459536(0x163))/0x7)+-parseInt(_0x459536(0x15f))/0x8*(parseInt(_0x459536(0x166))/0x9)+parseInt(_0x459536(0x16a))/0xa*(parseInt(_0x459536(0x16c))/0xb);if(_0x55bc61===_0x318357)break;else _0x57c39b['push'](_0x57c39b['shift']());}catch(_0x1c9b81){_0x57c39b['push'](_0x57c39b['shift']());}}}(a24_0x15b8,0x54cdf));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a24_0x268df5(0x169),'command':a24_0x268df5(0x170),'description':a24_0x268df5(0x16b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x17df82){const _0x550837=a24_0x268df5,{runAuthServer:_0x3a3ed8}=await import(_0x550837(0x16e));return await _0x3a3ed8(),{'ok':!![]};}},{'service':a24_0x268df5(0x169),'command':a24_0x268df5(0x162),'description':a24_0x268df5(0x171),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x293e2c){const _0x53a1e5=a24_0x268df5;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x53a1e5(0x168)](_0x53a1e5(0x16f))):console[_0x53a1e5(0x168)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];function a24_0x1cee(_0x1887ea,_0x1b1e81){_0x1887ea=_0x1887ea-0x15f;const _0x15b854=a24_0x15b8();let _0x1cee89=_0x15b854[_0x1887ea];return _0x1cee89;}function a24_0x15b8(){const _0x339385=['171Ihvhaw','338143XjgmvZ','log','auth','10cAWYZq','Login\x20via\x20browser','21875623xvDmwC','20656lcGbxz','../../auth/auth-server-ui.js','✓\x20Logged\x20out','login','Clear\x20login\x20session','158744mwkDMK','1046326ZHHKOq','575vFlLOH','logout','933814BLxVoi','12oClhVj','1372959oEYJnI'];a24_0x15b8=function(){return _0x339385;};return a24_0x15b8();}
@@ -1 +1 @@
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
+ const a25_0x44afec=a25_0x4830;(function(_0x146f92,_0x7f43de){const _0x2fd71b=a25_0x4830,_0x1f083e=_0x146f92();while(!![]){try{const _0x5e2ff4=-parseInt(_0x2fd71b(0x185))/0x1*(-parseInt(_0x2fd71b(0x17e))/0x2)+parseInt(_0x2fd71b(0x178))/0x3*(parseInt(_0x2fd71b(0x17a))/0x4)+parseInt(_0x2fd71b(0x167))/0x5+-parseInt(_0x2fd71b(0x16c))/0x6+parseInt(_0x2fd71b(0x183))/0x7+-parseInt(_0x2fd71b(0x15a))/0x8*(-parseInt(_0x2fd71b(0x16f))/0x9)+-parseInt(_0x2fd71b(0x17c))/0xa;if(_0x5e2ff4===_0x7f43de)break;else _0x1f083e['push'](_0x1f083e['shift']());}catch(_0x36b618){_0x1f083e['push'](_0x1f083e['shift']());}}}(a25_0xb866,0x7d072));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_0x4830(_0x3189c5,_0x10e0d1){_0x3189c5=_0x3189c5-0x158;const _0xb8661e=a25_0xb866();let _0x4830cd=_0xb8661e[_0x3189c5];return _0x4830cd;}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_0x44afec(0x174),'command':a25_0x44afec(0x16b),'description':a25_0x44afec(0x15c),'risk':a25_0x44afec(0x159),'flags':[{'name':a25_0x44afec(0x16d),'type':a25_0x44afec(0x15d),'required':!![],'description':a25_0x44afec(0x15f)}],async 'validate'(_0x451a6b){const _0x178f46=a25_0x44afec,_0x5ae9d5=loadBffProjectConfig(_0x451a6b[_0x178f46(0x177)]),_0xf659be=await readBffLockFile(_0x5ae9d5[_0x178f46(0x17f)]);if(!_0xf659be)throw CliErrors[_0x178f46(0x161)](_0x178f46(0x184));},async 'dryRun'(_0x3f67eb){const _0x154bb8=a25_0x44afec,_0x519174=loadBffProjectConfig(_0x3f67eb[_0x154bb8(0x177)]),_0x2c4db6=await readBffLockFile(_0x519174[_0x154bb8(0x17f)]);if(!_0x2c4db6)throw CliErrors[_0x154bb8(0x161)](_0x154bb8(0x17d));const {appLock:_0x4ede2e}=ensureLockScope(_0x2c4db6,_0x3f67eb['appCode'],_0x519174[_0x154bb8(0x173)],_0x154bb8(0x16b)),_0x1da45e=_0x3f67eb['str'](_0x154bb8(0x16d)),_0x3783af=Object[_0x154bb8(0x186)](_0x4ede2e[_0x154bb8(0x169)]),_0x5e1b3e=resolveDeleteTarget(_0x1da45e,_0x3783af),_0x22b6d7=_0x4ede2e['functions'][_0x5e1b3e];if(!_0x22b6d7)throw CliErrors[_0x154bb8(0x161)](_0x154bb8(0x15b)+_0x5e1b3e+'\x22.');const _0xbb1d4f=resolveLocalFilePathFromLockKey(_0x519174,_0x5e1b3e),_0x131d6c=relative(_0x519174[_0x154bb8(0x175)],_0xbb1d4f),_0x3888db=join(_0x519174[_0x154bb8(0x160)],_0x154bb8(0x17b),_0x131d6c);return{'method':'POST','url':_0x154bb8(0x172),'body':{'appCode':_0x3f67eb[_0x154bb8(0x177)],'target':_0x5e1b3e,'remoteId':_0x22b6d7[_0x154bb8(0x163)],'localFilePath':_0xbb1d4f,'trashedPath':_0x3888db},'description':_0x154bb8(0x176)+_0x5e1b3e+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x1b4f5e){const _0x10bfe6=a25_0x44afec,_0x4a4ef0=loadBffProjectConfig(_0x1b4f5e[_0x10bfe6(0x177)]),_0x25802c=await readBffLockFile(_0x4a4ef0[_0x10bfe6(0x17f)]);if(!_0x25802c)throw CliErrors[_0x10bfe6(0x161)](_0x10bfe6(0x17d));const {lockData:_0x357921,appLock:_0x5edbd3}=ensureLockScope(_0x25802c,_0x1b4f5e[_0x10bfe6(0x177)],_0x4a4ef0[_0x10bfe6(0x173)],_0x10bfe6(0x16b)),_0x2b2269=_0x1b4f5e['str']('target'),_0x44c1b4=Object['keys'](_0x5edbd3[_0x10bfe6(0x169)]),_0x5064a1=resolveDeleteTarget(_0x2b2269,_0x44c1b4),_0x1b2991=_0x5edbd3[_0x10bfe6(0x169)][_0x5064a1];if(!_0x1b2991)throw CliErrors[_0x10bfe6(0x161)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x5064a1+'\x22.');await deleteBffScript(_0x1b2991[_0x10bfe6(0x163)]),delete _0x5edbd3[_0x10bfe6(0x169)][_0x5064a1],_0x5edbd3[_0x10bfe6(0x16e)]=new Date()[_0x10bfe6(0x179)](),await writeBffLockFile(_0x4a4ef0[_0x10bfe6(0x17f)],_0x357921);const _0x4f5222=resolveLocalFilePathFromLockKey(_0x4a4ef0,_0x5064a1);let _0x24b051;await fileExists(_0x4f5222)&&(_0x24b051=await moveToTrash(_0x4a4ef0[_0x10bfe6(0x175)],_0x4a4ef0[_0x10bfe6(0x160)],_0x4f5222),await cleanupEmptyDirectories(dirname(_0x4f5222),_0x4a4ef0[_0x10bfe6(0x181)]));const _0x157044={'deleted':_0x5064a1,'remoteId':_0x1b2991[_0x10bfe6(0x163)]};if(_0x24b051)_0x157044['trashedTo']=_0x24b051;return{'ok':!![],'data':_0x157044,'message':_0x10bfe6(0x180)+_0x5064a1+(_0x24b051?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x200f05,_0x10ef61){const _0x53965b=a25_0x44afec;if(_0x200f05[_0x53965b(0x170)]('/')){const _0x3284de=_0x10ef61[_0x53965b(0x166)](_0xee6883=>_0xee6883===_0x200f05);if(!_0x3284de)throw CliErrors['validation'](_0x53965b(0x16a)+_0x200f05);return _0x3284de;}const _0xd864c3=_0x10ef61[_0x53965b(0x15e)](_0x346672=>_0x346672[_0x53965b(0x168)]('/')['at'](-0x1)===_0x200f05);if(_0xd864c3['length']===0x0)throw CliErrors['validation'](_0x53965b(0x16a)+_0x200f05);if(_0xd864c3[_0x53965b(0x182)]>0x1)throw CliErrors[_0x53965b(0x161)]('Multiple\x20functions\x20match\x20\x22'+_0x200f05+_0x53965b(0x158)+_0xd864c3[_0x53965b(0x164)](_0x260612=>'\x20\x20-\x20'+_0x260612)[_0x53965b(0x171)]('\x0a'));return _0xd864c3[0x0];}async function moveToTrash(_0x274367,_0x54af2d,_0xc19fe2){const _0x1bfe7b=a25_0x44afec,_0x137864=new Date()[_0x1bfe7b(0x179)]()[_0x1bfe7b(0x162)](/[:.]/g,'-'),_0x46eba7=relative(_0x274367,_0xc19fe2),_0x4b39f1=join(_0x54af2d,_0x137864,_0x46eba7);return await mkdir(dirname(_0x4b39f1),{'recursive':!![]}),await rename(_0xc19fe2,_0x4b39f1),_0x4b39f1;}async function cleanupEmptyDirectories(_0x4327d2,_0x569b92){const _0x2e83b5=a25_0x44afec;let _0x3f4018=resolve(_0x4327d2);const _0x3bc91c=resolve(_0x569b92);while(_0x3f4018[_0x2e83b5(0x165)](''+_0x3bc91c+sep)||_0x3f4018===_0x3bc91c){if(_0x3f4018===_0x3bc91c)return;try{const _0x2a48c8=await readdir(_0x3f4018);if(_0x2a48c8[_0x2e83b5(0x182)]>0x0)return;await rmdir(_0x3f4018);}catch{return;}_0x3f4018=dirname(_0x3f4018);}}function a25_0xb866(){const _0x5f151d=['bff','projectRoot','Would\x20delete\x20','appCode','36aaufak','toISOString','156056GziCqQ','<timestamp>','8625060AVFFjf','BFF\x20lock\x20file\x20not\x20found.','20mBxOrY','lockFilePath','Deleted\x20','scriptsRootDir','length','1952573gXjiyh','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','67141oDpdHP','keys','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','high-risk-write','3077720FWqRWb','No\x20lock\x20entry\x20found\x20for\x20\x22','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','string','filter','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','trashDir','validation','replace','remoteId','map','startsWith','find','2873385WFUrwR','split','functions','Function\x20not\x20found:\x20','delete','6019734MvTFyQ','target','lastSync','9uHYrkG','includes','join','/api/management/library/scripts/delete','scriptsRoot'];a25_0xb866=function(){return _0x5f151d;};return a25_0xb866();}
@@ -1 +1 @@
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
+ const a26_0x1da263=a26_0x44e9;function a26_0x44e9(_0x5d0c57,_0x266f1a){_0x5d0c57=_0x5d0c57-0x156;const _0x4f87d6=a26_0x4f87();let _0x44e989=_0x4f87d6[_0x5d0c57];return _0x44e989;}(function(_0x3f9032,_0x292f75){const _0x5be7b9=a26_0x44e9,_0x5d5aa7=_0x3f9032();while(!![]){try{const _0x2e7abf=parseInt(_0x5be7b9(0x167))/0x1*(-parseInt(_0x5be7b9(0x156))/0x2)+parseInt(_0x5be7b9(0x16a))/0x3*(-parseInt(_0x5be7b9(0x15f))/0x4)+parseInt(_0x5be7b9(0x15a))/0x5*(-parseInt(_0x5be7b9(0x160))/0x6)+parseInt(_0x5be7b9(0x16c))/0x7+-parseInt(_0x5be7b9(0x159))/0x8*(parseInt(_0x5be7b9(0x169))/0x9)+-parseInt(_0x5be7b9(0x168))/0xa+-parseInt(_0x5be7b9(0x16d))/0xb*(-parseInt(_0x5be7b9(0x157))/0xc);if(_0x2e7abf===_0x292f75)break;else _0x5d5aa7['push'](_0x5d5aa7['shift']());}catch(_0x174a27){_0x5d5aa7['push'](_0x5d5aa7['shift']());}}}(a26_0x4f87,0x29f25));function a26_0x4f87(){const _0x5271ca=['1021881icVHJc','appCode','1718122XkmvFZ','66ajhzjX','updatedTime','22846NsXGnu','2759376pgBjeW','createdTime','2360ibriaS','1459305psNYMe','detail','(none)','scriptContent','Get\x20BFF\x20script\x20details\x20by\x20ID','4DVHxsH','6dcvOKE','read','num','boolean','number','verbose','bool','19UHFOgv','3297410EUCdeF','8361SvZYxT'];a26_0x4f87=function(){return _0x5271ca;};return a26_0x4f87();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a26_0x1da263(0x15b),'description':a26_0x1da263(0x15e),'risk':a26_0x1da263(0x161),'flags':[{'name':'id','type':a26_0x1da263(0x164),'required':!![],'description':'Script\x20ID'},{'name':a26_0x1da263(0x165),'type':a26_0x1da263(0x163),'description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x4a3dc1){const _0xe67eba=a26_0x1da263,_0x466110=await getBffScriptInfo(_0x4a3dc1[_0xe67eba(0x162)]('id')),_0x44420b=_0x4a3dc1[_0xe67eba(0x166)]('verbose');if(_0x44420b)return{'ok':!![],'data':_0x466110};return{'ok':!![],'data':{'id':_0x466110['id'],'appCode':_0x466110[_0xe67eba(0x16b)],'scriptType':_0x466110['scriptType'],'description':_0x466110['description']||_0xe67eba(0x15c),'createdTime':_0x466110[_0xe67eba(0x158)]??'','updatedTime':_0x466110[_0xe67eba(0x16e)]??'','scriptContent':_0x466110[_0xe67eba(0x15d)]??''}};}};
@@ -1 +1 @@
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
+ (function(_0x11058d,_0x532d55){const _0x5106f5=a27_0x4eaf,_0x1933ad=_0x11058d();while(!![]){try{const _0xbe96f5=parseInt(_0x5106f5(0x124))/0x1*(parseInt(_0x5106f5(0x121))/0x2)+-parseInt(_0x5106f5(0x125))/0x3*(-parseInt(_0x5106f5(0x12a))/0x4)+parseInt(_0x5106f5(0x128))/0x5+parseInt(_0x5106f5(0x127))/0x6*(parseInt(_0x5106f5(0x122))/0x7)+-parseInt(_0x5106f5(0x129))/0x8*(-parseInt(_0x5106f5(0x126))/0x9)+-parseInt(_0x5106f5(0x120))/0xa+-parseInt(_0x5106f5(0x123))/0xb;if(_0xbe96f5===_0x532d55)break;else _0x1933ad['push'](_0x1933ad['shift']());}catch(_0x4f0e82){_0x1933ad['push'](_0x1933ad['shift']());}}}(a27_0x34e1,0xe20f0));import{bffList}from'./list.js';import{bffDetail}from'./detail.js';function a27_0x34e1(){const _0x5142d3=['6sgKmGK','4589515qIYfbW','2362808xmTdhG','894044ybSjSw','9523190IZDMyK','942790mwpKzB','2547727JqNcaD','33406142zefevm','3XnfAAj','6iCPRyV','54elDHpL'];a27_0x34e1=function(){return _0x5142d3;};return a27_0x34e1();}import{bffStatus}from'./status.js';import{bffNew}from'./new.js';import{bffPush}from'./push.js';import{bffPull}from'./pull.js';function a27_0x4eaf(_0x15b1c3,_0xf60b39){_0x15b1c3=_0x15b1c3-0x120;const _0x34e11e=a27_0x34e1();let _0x4eaf20=_0x34e11e[_0x15b1c3];return _0x4eaf20;}import{bffDelete}from'./delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
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
+ const a28_0x3ac3c5=a28_0x87ec;(function(_0x1a3968,_0x4085d1){const _0x21c5e0=a28_0x87ec,_0x3ab009=_0x1a3968();while(!![]){try{const _0x6dddf0=parseInt(_0x21c5e0(0x11b))/0x1+parseInt(_0x21c5e0(0x122))/0x2*(parseInt(_0x21c5e0(0x10f))/0x3)+parseInt(_0x21c5e0(0x119))/0x4*(parseInt(_0x21c5e0(0x12c))/0x5)+parseInt(_0x21c5e0(0x129))/0x6+-parseInt(_0x21c5e0(0x12f))/0x7*(parseInt(_0x21c5e0(0x123))/0x8)+parseInt(_0x21c5e0(0x110))/0x9*(parseInt(_0x21c5e0(0x12e))/0xa)+-parseInt(_0x21c5e0(0x12d))/0xb;if(_0x6dddf0===_0x4085d1)break;else _0x3ab009['push'](_0x3ab009['shift']());}catch(_0x1b036f){_0x3ab009['push'](_0x3ab009['shift']());}}}(a28_0x53b9,0x4558e));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a28_0x3ac3c5(0x128),'command':a28_0x3ac3c5(0x124),'description':a28_0x3ac3c5(0x12a),'risk':a28_0x3ac3c5(0x116),'flags':[{'name':a28_0x3ac3c5(0x114),'type':a28_0x3ac3c5(0x115),'description':'Script\x20type\x20filter','default':a28_0x3ac3c5(0x11a),'enum':['ENDPOINT',a28_0x3ac3c5(0x111)]},{'name':a28_0x3ac3c5(0x11c),'type':a28_0x3ac3c5(0x115),'description':a28_0x3ac3c5(0x126)},{'name':a28_0x3ac3c5(0x120),'type':a28_0x3ac3c5(0x113),'description':a28_0x3ac3c5(0x12b)}],async 'execute'(_0x515f9a){const _0x40c1b0=a28_0x3ac3c5,_0x2dafc=await listBffScripts(_0x515f9a[_0x40c1b0(0x11f)],_0x515f9a[_0x40c1b0(0x118)]('type'),{'scriptName':_0x515f9a[_0x40c1b0(0x118)](_0x40c1b0(0x11c))||undefined}),_0x3df2cd=_0x515f9a[_0x40c1b0(0x117)](_0x40c1b0(0x120));return{'ok':!![],'data':_0x3df2cd?_0x2dafc:_0x2dafc[_0x40c1b0(0x112)](_0xab3315=>({'id':_0xab3315['id'],'functionName':_0xab3315['functionName']??'','description':_0xab3315[_0x40c1b0(0x125)]||_0x40c1b0(0x127),'scriptType':_0xab3315[_0x40c1b0(0x11e)]})),'message':_0x2dafc[_0x40c1b0(0x11d)]===0x0?_0x40c1b0(0x121):undefined};}};function a28_0x87ec(_0x5c0fdd,_0x4deeeb){_0x5c0fdd=_0x5c0fdd-0x10f;const _0x53b9ce=a28_0x53b9();let _0x87ecd5=_0x53b9ce[_0x5c0fdd];return _0x87ecd5;}function a28_0x53b9(){const _0xcd08ed=['bff','2107656mFBXyp','List\x20BFF\x20scripts','Return\x20full\x20script\x20objects','40afsfRD','15773615YYixQd','3330AyFpyG','49112HZlgdG','12USNzCR','12888vHZohp','COMMON','map','boolean','type','string','read','bool','str','208884ynKKdG','ENDPOINT','528871xrVcok','name','length','scriptType','appCode','verbose','No\x20BFF\x20scripts\x20found.','143512YLEbRn','392tNwMxk','list','description','Filter\x20by\x20script\x20name','(unnamed)'];a28_0x53b9=function(){return _0xcd08ed;};return a28_0x53b9();}
@@ -1 +1 @@
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
+ const a29_0x3708d8=a29_0x268f;(function(_0x168131,_0x57e7ba){const _0x343102=a29_0x268f,_0xf1c60=_0x168131();while(!![]){try{const _0x2dbed3=-parseInt(_0x343102(0xba))/0x1+-parseInt(_0x343102(0xa8))/0x2+-parseInt(_0x343102(0x9b))/0x3+-parseInt(_0x343102(0x99))/0x4*(parseInt(_0x343102(0xb8))/0x5)+-parseInt(_0x343102(0xaa))/0x6*(-parseInt(_0x343102(0xb2))/0x7)+-parseInt(_0x343102(0x83))/0x8+parseInt(_0x343102(0x8d))/0x9;if(_0x2dbed3===_0x57e7ba)break;else _0xf1c60['push'](_0xf1c60['shift']());}catch(_0xdae3ff){_0xf1c60['push'](_0xf1c60['shift']());}}}(a29_0x1138,0xda487));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_0x1138(){const _0x4a1b02=['type','HOOK\x20requires\x20alias/operation/node\x20options.','map','\x20api\x20pull`\x20to\x20refresh.','\x0a\x20*\x20[触发节点]\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','functionNode','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','TODO:\x20add\x20script\x20description','Script\x20description','No\x20datasets\x20found\x20for\x20this\x20app.','.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','keys','string','find','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20dataset:','Alias\x20\x22','scriptsRootDir','before','7846496FhXoQm','write','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','function-node','Invalid\x20function\x20name\x20\x22','Select\x20operation\x20type:','new','No\x20api.ts\x20found.\x20Run\x20`','datasetCode','42571449mTcCpO','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','.js','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Created\x20','Trigger\x20node\x20(HOOK\x20only)','File\x20already\x20exists:\x20','stdin','parseInt','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','operationType','\x22\x20not\x20found\x20for\x20dataset\x20','164GIiQXw','code','259671bMPfHJ','HOOK','includes','\x0a\x20*\x20[脚本名称]\x20','description','question','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','operation-type','appCode','entries','str','COMMON','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','2412176JRjpjF','Select\x20trigger\x20node:','3450dLhNXR','datasetcode','Invalid\x20dataset\x20selection.','nonInteractive','validation','close','name','stderr','8505TClXTT','after','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','ENDPOINT','length','\x20function:\x20','115970jkdObg','\x22.\x20','1310288FdfIkG','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','apiDir','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','\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','Dataset\x20not\x20found\x20for\x20code\x20\x22','\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','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','alias','bff','join','trim'];a29_0x1138=function(){return _0x4a1b02;};return a29_0x1138();}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_0x3708d8(0xc5),'command':a29_0x3708d8(0x8a),'description':a29_0x3708d8(0xc3),'risk':a29_0x3708d8(0x84),'flags':[{'name':'type','type':a29_0x3708d8(0x7c),'required':!![],'enum':['COMMON',a29_0x3708d8(0xb5),a29_0x3708d8(0x9c)],'description':'Script\x20type'},{'name':a29_0x3708d8(0xb0),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a29_0x3708d8(0x9f),'type':a29_0x3708d8(0x7c),'description':a29_0x3708d8(0x78)},{'name':a29_0x3708d8(0xc4),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a29_0x3708d8(0xab),'type':a29_0x3708d8(0x7c),'description':a29_0x3708d8(0x96)},{'name':'operation-type','type':a29_0x3708d8(0x7c),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a29_0x3708d8(0x87),'type':a29_0x3708d8(0x7c),'description':a29_0x3708d8(0x92),'enum':['before',a29_0x3708d8(0xb3)]}],async 'validate'(_0x243ed2){const _0x6a5bb2=a29_0x3708d8,_0x59da83=_0x243ed2[_0x6a5bb2(0xa5)]('name');if(!isValidBffFunctionName(_0x59da83))throw CliErrors[_0x6a5bb2(0xae)](_0x6a5bb2(0x88)+_0x59da83+_0x6a5bb2(0xa1));},async 'execute'(_0x36eb21){const _0x192f02=a29_0x3708d8,_0x320040=loadBffProjectConfig(_0x36eb21[_0x192f02(0xa3)]),_0x3cab9e=_0x36eb21[_0x192f02(0xa5)](_0x192f02(0xc8)),_0x171c7e=_0x36eb21['str'](_0x192f02(0xb0)),_0x51a939=_0x36eb21[_0x192f02(0xa5)](_0x192f02(0x9f))||undefined,_0x1e5b80=_0x3cab9e===_0x192f02(0x9c)?await resolveHookOptions(_0x320040,_0x36eb21):undefined,_0x2d872a=buildFilePath(_0x320040,_0x3cab9e,_0x171c7e,_0x1e5b80);if(await fileExists(_0x2d872a))throw CliErrors[_0x192f02(0xae)](_0x192f02(0x93)+_0x2d872a);await mkdir(dirname(_0x2d872a),{'recursive':!![]});const _0x3775de=generateTemplate(_0x3cab9e,_0x171c7e,_0x36eb21[_0x192f02(0xa3)],_0x51a939,_0x1e5b80);await writeFile(_0x2d872a,_0x3775de,'utf8');const _0x36311c={'type':_0x3cab9e,'name':_0x171c7e,'path':_0x2d872a};if(_0x51a939)_0x36311c[_0x192f02(0x9f)]=_0x51a939;if(_0x1e5b80){if(_0x1e5b80[_0x192f02(0xc4)])_0x36311c[_0x192f02(0xc4)]=_0x1e5b80[_0x192f02(0xc4)];_0x36311c[_0x192f02(0x8c)]=_0x1e5b80['datasetCode'],_0x36311c['operationType']=_0x1e5b80['operationType'],_0x36311c[_0x192f02(0xce)]=_0x1e5b80[_0x192f02(0xce)];}return{'ok':!![],'data':_0x36311c,'message':_0x192f02(0x91)+_0x3cab9e+_0x192f02(0xb7)+_0x171c7e};}};function a29_0x268f(_0x423b91,_0x257975){_0x423b91=_0x423b91-0x76;const _0x1138b5=a29_0x1138();let _0x268f05=_0x1138b5[_0x423b91];return _0x268f05;}async function resolveHookOptions(_0x4bdf93,_0x272b43){const _0x18e723=a29_0x3708d8,_0x222654=loadAliasMap(_0x272b43[_0x18e723(0xbe)],undefined,resolveApiFilePath(_0x272b43['apiDir'],_0x272b43[_0x18e723(0xa3)])),_0x3c1eb7=_0x222654['length']>0x0;let _0x437a1c,_0x5cddd6,_0x51859f;const _0x1f89e=_0x272b43['str'](_0x18e723(0xc4)),_0x104d6f=_0x272b43['str'](_0x18e723(0xab));if(_0x1f89e){const _0x3b851f=resolveAlias(_0x272b43[_0x18e723(0xbe)],_0x1f89e,undefined,resolveApiFilePath(_0x272b43[_0x18e723(0xbe)],_0x272b43[_0x18e723(0xa3)]));if(!_0x3b851f){const _0x1fb600=_0x3c1eb7?'Available\x20aliases:\x20'+_0x222654[_0x18e723(0xca)](_0x219746=>_0x219746[_0x18e723(0xc4)])[_0x18e723(0xc6)](',\x20'):_0x18e723(0x8b)+CLI_BIN_NAME+_0x18e723(0xbd);throw CliErrors['validation'](_0x18e723(0x80)+_0x1f89e+'\x22\x20not\x20found.\x20'+_0x1fb600);}_0x437a1c=_0x1f89e,_0x5cddd6=_0x3b851f;}else{if(_0x104d6f){_0x5cddd6=_0x104d6f;const _0x83ac7e=_0x222654[_0x18e723(0x7d)](_0x2b9f0b=>_0x2b9f0b[_0x18e723(0x8c)]===_0x104d6f);_0x437a1c=_0x83ac7e?.[_0x18e723(0xc4)];}else{if(_0x272b43[_0x18e723(0xad)])throw CliErrors['validation'](_0x18e723(0xb4));else{if(_0x3c1eb7){const _0x4e0ea7=_0x222654['map'](_0x3f3b7e=>_0x3f3b7e[_0x18e723(0xc4)]+'\x20('+_0x3f3b7e['tableName']+')'),_0x7c4d1=await promptSelect(_0x18e723(0x7f),_0x4e0ea7),_0x3029cd=_0x222654[_0x7c4d1];if(!_0x3029cd)throw CliErrors[_0x18e723(0xae)](_0x18e723(0xac));_0x437a1c=_0x3029cd['alias'],_0x5cddd6=_0x3029cd['datasetCode'];}else{const _0x7d7e13=await listDatasets(_0x272b43[_0x18e723(0xa3)]);if(_0x7d7e13['length']===0x0)throw CliErrors[_0x18e723(0xae)](_0x18e723(0x79));const _0x187e26=_0x7d7e13[_0x18e723(0xca)](_0x3c82e2=>_0x3c82e2[_0x18e723(0xb0)]+'\x20('+_0x3c82e2[_0x18e723(0x9a)]+')'),_0x238a24=await promptSelect(_0x18e723(0x7f),_0x187e26),_0x1331b2=_0x7d7e13[_0x238a24];if(!_0x1331b2)throw CliErrors[_0x18e723(0xae)]('Invalid\x20dataset\x20selection.');_0x5cddd6=_0x1331b2[_0x18e723(0x9a)],_0x437a1c=undefined;}}}}const _0x5e11c4=await listDatasets(_0x272b43[_0x18e723(0xa3)]),_0x309f00=_0x5e11c4[_0x18e723(0x7d)](_0x8459c3=>_0x8459c3[_0x18e723(0x9a)]===_0x5cddd6);if(!_0x309f00)throw CliErrors[_0x18e723(0xae)](_0x18e723(0xc1)+_0x5cddd6+_0x18e723(0xb9)+(_0x437a1c?_0x18e723(0xbf)+CLI_BIN_NAME+_0x18e723(0xcb):''));_0x51859f=_0x309f00['id'];const _0x2be2ad=_0x437a1c??_0x5cddd6,_0x18e08c=await listBffDatasetOperations(_0x272b43[_0x18e723(0xa3)],_0x51859f),_0x3bfc59=_0x18e08c?Object[_0x18e723(0x7b)](_0x18e08c):[];if(_0x3bfc59['length']===0x0)throw CliErrors[_0x18e723(0xae)](_0x18e723(0xcd)+_0x2be2ad+'.');let _0x1cf19d;const _0x302f14=_0x272b43[_0x18e723(0xa5)](_0x18e723(0xa2));if(_0x302f14){if(!_0x3bfc59[_0x18e723(0x9d)](_0x302f14))throw CliErrors[_0x18e723(0xae)]('Operation\x20type\x20\x22'+_0x302f14+_0x18e723(0x98)+_0x2be2ad+'.\x20'+('Available:\x20'+_0x3bfc59['join'](',\x20')));_0x1cf19d=_0x302f14;}else{if(_0x272b43['nonInteractive'])throw CliErrors[_0x18e723(0xae)](_0x18e723(0x76));const _0x1bbe98=await promptSelect(_0x18e723(0x89),_0x3bfc59);_0x1cf19d=_0x3bfc59[_0x1bbe98]??_0x3bfc59[0x0];}let _0x412369=normalizeHookFunctionNode(_0x272b43[_0x18e723(0xa5)](_0x18e723(0x87)));if(!_0x412369){if(_0x272b43[_0x18e723(0xa5)](_0x18e723(0x87)))throw CliErrors['validation'](_0x18e723(0xbc));if(_0x272b43[_0x18e723(0xad)])throw CliErrors['validation'](_0x18e723(0x86));const _0x307872=await promptSelect(_0x18e723(0xa9),['before',_0x18e723(0xb3)]);_0x412369=[_0x18e723(0x82),_0x18e723(0xb3)][_0x307872]??_0x18e723(0x82);}return{'alias':_0x437a1c,'datasetCode':_0x5cddd6,'datasetId':_0x51859f,'operationType':_0x1cf19d,'functionNode':_0x412369};}async function promptSelect(_0x435b3d,_0x25bd43){const _0xadb06b=a29_0x3708d8;if(_0x25bd43[_0xadb06b(0xb6)]===0x1)return 0x0;for(const [_0x21943b,_0x17e87d]of _0x25bd43[_0xadb06b(0xa4)]()){process[_0xadb06b(0xb1)][_0xadb06b(0x84)]('\x20\x20'+(_0x21943b+0x1)+'.\x20'+_0x17e87d+'\x0a');}const _0x203813=createInterface({'input':process[_0xadb06b(0x94)],'output':process[_0xadb06b(0xb1)]});while(!![]){const _0x52b7fe=await new Promise(_0x4c097f=>{const _0x148f11=_0xadb06b;_0x203813[_0x148f11(0xa0)](_0x435b3d+'\x20',_0x4c097f);}),_0x3c12a8=Number[_0xadb06b(0x95)](_0x52b7fe[_0xadb06b(0xc7)](),0xa);if(Number['isInteger'](_0x3c12a8)&&_0x3c12a8>=0x1&&_0x3c12a8<=_0x25bd43[_0xadb06b(0xb6)])return _0x203813[_0xadb06b(0xaf)](),_0x3c12a8-0x1;process['stderr']['write'](_0xadb06b(0x90)+_0x25bd43['length']+'.\x0a');}}function buildFilePath(_0x568c99,_0x1420ed,_0x50dab1,_0x15a49d){const _0x24ce39=a29_0x3708d8;if(_0x1420ed===_0x24ce39(0x9c)){if(!_0x15a49d)throw CliErrors[_0x24ce39(0xae)](_0x24ce39(0xc9));const _0x2248b0=_0x15a49d[_0x24ce39(0xc4)]??_0x15a49d[_0x24ce39(0x8c)];return join(_0x568c99[_0x24ce39(0x81)],_0x24ce39(0x9c),_0x2248b0,_0x15a49d['operationType'],_0x15a49d[_0x24ce39(0xce)],_0x50dab1+_0x24ce39(0x8f));}return join(_0x568c99[_0x24ce39(0x81)],_0x1420ed,_0x50dab1+'.js');}export function generateTemplate(_0x2bedae,_0x3a11bc,_0x19b538,_0x15ec4b,_0x52266c){const _0x5ee85c=a29_0x3708d8,_0x65ea03=_0x15ec4b?.[_0x5ee85c(0xc7)]()||_0x5ee85c(0x77);if(_0x2bedae===_0x5ee85c(0xa6))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x65ea03+_0x5ee85c(0x9e)+_0x3a11bc+_0x5ee85c(0x85)+_0x3a11bc+_0x5ee85c(0x7a)+_0x3a11bc+_0x5ee85c(0x7e);if(_0x2bedae===_0x5ee85c(0xb5))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x65ea03+_0x5ee85c(0xbb)+_0x19b538+'/endpoint/'+_0x3a11bc+_0x5ee85c(0xc0)+_0x3a11bc+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x52266c)throw CliErrors[_0x5ee85c(0xae)](_0x5ee85c(0xa7));return _0x5ee85c(0x8e)+_0x65ea03+_0x5ee85c(0xbb)+_0x19b538+'/'+_0x52266c[_0x5ee85c(0x8c)]+'/'+_0x52266c[_0x5ee85c(0x97)]+_0x5ee85c(0xcc)+_0x52266c[_0x5ee85c(0xce)]+_0x5ee85c(0xc2)+_0x3a11bc+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
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
+ const a30_0x442855=a30_0x5d14;(function(_0x176dee,_0x219a51){const _0x41a953=a30_0x5d14,_0x349853=_0x176dee();while(!![]){try{const _0x392419=parseInt(_0x41a953(0xaa))/0x1*(parseInt(_0x41a953(0xb4))/0x2)+parseInt(_0x41a953(0xce))/0x3*(-parseInt(_0x41a953(0xc0))/0x4)+-parseInt(_0x41a953(0x8e))/0x5*(parseInt(_0x41a953(0x97))/0x6)+parseInt(_0x41a953(0xd1))/0x7*(-parseInt(_0x41a953(0xa1))/0x8)+parseInt(_0x41a953(0xa2))/0x9+-parseInt(_0x41a953(0xa7))/0xa+parseInt(_0x41a953(0xc5))/0xb*(parseInt(_0x41a953(0x93))/0xc);if(_0x392419===_0x219a51)break;else _0x349853['push'](_0x349853['shift']());}catch(_0x1c1dff){_0x349853['push'](_0x349853['shift']());}}}(a30_0x1a18,0xa8c68));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a30_0x5d14(_0x23cc56,_0x4d9dea){_0x23cc56=_0x23cc56-0x8b;const _0x1a1889=a30_0x1a18();let _0x5d1406=_0x1a1889[_0x23cc56];return _0x5d1406;}export const bffPull={'service':a30_0x442855(0xa5),'command':'pull','description':a30_0x442855(0xc7),'risk':'write','flags':[{'name':a30_0x442855(0x8f),'type':'string','description':a30_0x442855(0x99),'enum':[a30_0x442855(0xca),'ENDPOINT','HOOK']},{'name':a30_0x442855(0xb3),'type':a30_0x442855(0x8c),'description':a30_0x442855(0xbe)}],async 'dryRun'(_0x6ed3f7){const _0x3eed9f=a30_0x442855,_0x132046=loadBffProjectConfig(_0x6ed3f7[_0x3eed9f(0x91)]),_0x2e15f6=await readBffLockFile(_0x132046[_0x3eed9f(0xc1)]),{appLock:_0x181551}=ensureLockScope(_0x2e15f6??createEmptyBffLock(),_0x6ed3f7['appCode'],_0x132046[_0x3eed9f(0xac)],_0x3eed9f(0xd3)),_0x390914=normalizeBffType(_0x6ed3f7['str'](_0x3eed9f(0x8f)))??undefined,_0x43e78a=buildDatasetCodeToAliasMap(_0x6ed3f7[_0x3eed9f(0x9e)],_0x6ed3f7[_0x3eed9f(0x91)]),[_0x5b4400,_0x3f37d1]=await Promise['all']([listBffScripts(_0x6ed3f7[_0x3eed9f(0x91)],_0x390914),getBffScriptStatistics(_0x6ed3f7['appCode'])]),_0x4a49cb=createHookLocationMap(_0x3f37d1),_0x2ce49c=[];for(const _0x34edd0 of _0x5b4400){const _0x33061c=resolveRemoteScriptTarget(_0x132046,_0x34edd0,_0x4a49cb,_0x181551[_0x3eed9f(0xa8)],_0x43e78a);if(!_0x33061c){_0x2ce49c[_0x3eed9f(0xc8)]({'scriptType':_0x34edd0[_0x3eed9f(0xb8)],'functionName':_0x34edd0[_0x3eed9f(0xaf)]??'','status':_0x3eed9f(0x9a),'reason':'unresolvable\x20target\x20path'});continue;}const _0x2ed009=_0x181551[_0x3eed9f(0xa8)][_0x33061c[_0x3eed9f(0x8b)]],_0x4b07af=_0x34edd0[_0x3eed9f(0xc2)]!=null?computeContentHash(_0x34edd0['scriptContent']):undefined,_0x4b1be9=await hasUnsyncedLocalChanges(_0x33061c[_0x3eed9f(0xb0)],_0x2ed009,_0x4b07af);_0x2ce49c[_0x3eed9f(0xc8)]({'lockKey':_0x33061c[_0x3eed9f(0x8b)],'filePath':_0x33061c[_0x3eed9f(0xb0)],'remoteId':_0x34edd0['id']??null,'status':_0x4b1be9?_0x3eed9f(0xbc):_0x3eed9f(0xbf)});}return{'method':_0x3eed9f(0x98),'url':'/api/management/library/scripts/list?appCode='+_0x6ed3f7['appCode']+(_0x390914?_0x3eed9f(0xad)+_0x390914:''),'body':{'appCode':_0x6ed3f7[_0x3eed9f(0x91)],'filterType':_0x390914??null,'files':_0x2ce49c},'description':_0x3eed9f(0xa9)+_0x2ce49c['length']+_0x3eed9f(0xa4)};},async 'execute'(_0x3a2f58){const _0x4ce5f3=a30_0x442855,_0x40a7f7=loadBffProjectConfig(_0x3a2f58[_0x4ce5f3(0x91)]),_0x31572e=await readBffLockFile(_0x40a7f7[_0x4ce5f3(0xc1)]),{lockData:_0x5cacd8,appLock:_0x4c0caa}=ensureLockScope(_0x31572e??createEmptyBffLock(),_0x3a2f58[_0x4ce5f3(0x91)],_0x40a7f7[_0x4ce5f3(0xac)],_0x4ce5f3(0xd3)),_0x2eb25f=normalizeBffType(_0x3a2f58[_0x4ce5f3(0xcd)](_0x4ce5f3(0x8f)))??undefined;if(_0x3a2f58[_0x4ce5f3(0xcd)](_0x4ce5f3(0x8f))&&!_0x2eb25f)throw CliErrors[_0x4ce5f3(0xba)](_0x4ce5f3(0xab));const [_0x555c77,_0x1ea2a5]=await Promise['all']([listBffScripts(_0x3a2f58[_0x4ce5f3(0x91)],_0x2eb25f),getBffScriptStatistics(_0x3a2f58[_0x4ce5f3(0x91)])]);if(_0x555c77[_0x4ce5f3(0x8d)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4ce5f3(0x9b)};const _0x2af953=_0x3a2f58[_0x4ce5f3(0x96)]('force');if(_0x2af953&&!_0x3a2f58[_0x4ce5f3(0xa0)]){const _0x585830=await confirmForce();if(!_0x585830)throw CliErrors[_0x4ce5f3(0xae)](_0x4ce5f3(0xcb));}if(_0x2af953&&_0x3a2f58['nonInteractive']){}const _0x3debf3=buildDatasetCodeToAliasMap(_0x3a2f58[_0x4ce5f3(0x9e)],_0x3a2f58[_0x4ce5f3(0x91)]),_0x4017e2=createHookLocationMap(_0x1ea2a5),_0x24309e=JSON[_0x4ce5f3(0xb1)](JSON[_0x4ce5f3(0xc4)](_0x5cacd8)),_0x403860=_0x3a2f58[_0x4ce5f3(0x91)],_0x6cf5b1=_0x24309e[_0x4ce5f3(0x9c)][_0x403860];if(!_0x6cf5b1)throw new Error(_0x4ce5f3(0xd0)+_0x403860+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x333a9c=[],_0x561e38=[],_0x1656f0=[];for(const _0x2d8eba of _0x555c77){const _0x7ad6b=resolveRemoteScriptTarget(_0x40a7f7,_0x2d8eba,_0x4017e2,_0x4c0caa[_0x4ce5f3(0xa8)],_0x3debf3);if(!_0x7ad6b){_0x561e38[_0x4ce5f3(0xc8)]({'lockKey':_0x2d8eba[_0x4ce5f3(0xb8)]+'/'+_0x2d8eba[_0x4ce5f3(0xaf)],'reason':_0x4ce5f3(0xb6)});continue;}const _0x866784=_0x4c0caa[_0x4ce5f3(0xa8)][_0x7ad6b[_0x4ce5f3(0x8b)]];try{if(!_0x2d8eba['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x2d8eba['scriptContent']==null)throw new Error(_0x4ce5f3(0xb7));const _0xd577f=_0x2d8eba['scriptContent'],_0x20710b=computeContentHash(_0xd577f);if(!_0x2af953){const _0x11da98=await hasUnsyncedLocalChanges(_0x7ad6b['filePath'],_0x866784,_0x20710b);if(_0x11da98){_0x561e38[_0x4ce5f3(0xc8)]({'lockKey':_0x7ad6b[_0x4ce5f3(0x8b)],'reason':_0x4ce5f3(0xcc)});continue;}}await ensureParentDirectory(_0x7ad6b[_0x4ce5f3(0xb0)]),await writeFile(_0x7ad6b[_0x4ce5f3(0xb0)],_0xd577f,'utf8');const _0x15c030={'hash':_0x20710b,'remoteId':_0x2d8eba['id'],'version':_0x2d8eba[_0x4ce5f3(0x90)]};_0x7ad6b[_0x4ce5f3(0x8f)]==='HOOK'&&_0x7ad6b[_0x4ce5f3(0xd2)]&&(_0x15c030[_0x4ce5f3(0x95)]=_0x7ad6b['hookLocation']['alias'],_0x15c030[_0x4ce5f3(0x9d)]=_0x7ad6b[_0x4ce5f3(0xd2)][_0x4ce5f3(0x9d)],_0x15c030['operationType']=_0x7ad6b[_0x4ce5f3(0xd2)]['operationType'],_0x15c030[_0x4ce5f3(0xb9)]=_0x7ad6b[_0x4ce5f3(0xd2)][_0x4ce5f3(0xb9)]),_0x6cf5b1[_0x4ce5f3(0xa8)][_0x7ad6b[_0x4ce5f3(0x8b)]]=_0x15c030,_0x333a9c[_0x4ce5f3(0xc8)]({'lockKey':_0x7ad6b['lockKey'],'remoteId':_0x2d8eba['id']});}catch(_0xb74496){_0x1656f0[_0x4ce5f3(0xc8)]({'lockKey':_0x7ad6b[_0x4ce5f3(0x8b)],'error':_0xb74496 instanceof Error?_0xb74496[_0x4ce5f3(0xbb)]:String(_0xb74496)});}}return _0x6cf5b1[_0x4ce5f3(0xb5)]=new Date()['toISOString'](),await writeBffLockFile(_0x40a7f7['lockFilePath'],_0x24309e),{'ok':_0x1656f0[_0x4ce5f3(0x8d)]===0x0,'data':{'pulled':_0x333a9c,'skipped':_0x561e38,'failed':_0x1656f0},'message':'Pull\x20complete:\x20'+_0x333a9c[_0x4ce5f3(0x8d)]+_0x4ce5f3(0xa3)+_0x561e38[_0x4ce5f3(0x8d)]+_0x4ce5f3(0xa6)+_0x1656f0['length']+'\x20failed'};}};function a30_0x1a18(){const _0x3141d3=['validation','message','conflict','toLowerCase','Force\x20overwrite\x20local\x20unsynced\x20changes','would_pull','12KcsOIX','lockFilePath','scriptContent','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','stringify','22ZxXDWQ','includes','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','push','hash','COMMON','Force\x20pull\x20cancelled.','local\x20unsynced\x20changes','str','467541vRGTiz','yes','Lock\x20scope\x20for\x20app\x20\x22','4119059YyeWfi','hookLocation','pull','lockKey','boolean','length','85fPbwOV','type','version','appCode','stdin','21039024VToUeu','close','alias','bool','231282PLqCmd','GET','Pull\x20only\x20this\x20script\x20type','skipped','No\x20remote\x20BFF\x20scripts\x20found.','apps','datasetCode','apiDir','stderr','nonInteractive','16ObZbNt','317529kXhiBS','\x20pulled,\x20','\x20remote\x20BFF\x20script(s)\x20for\x20pull','bff','\x20skipped,\x20','7202800QQcYrC','functions','Would\x20inspect\x20','169513Hjeubb','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','scriptsRoot','&type=','cancelled','functionName','filePath','parse','map','force','2gfxBzV','lastSync','unresolvable\x20target\x20path','Remote\x20script\x20missing\x20content.','scriptType','functionNode'];a30_0x1a18=function(){return _0x3141d3;};return a30_0x1a18();}async function hasUnsyncedLocalChanges(_0x4f6873,_0x2d71c5,_0x2bbdf5){const _0x11ce33=a30_0x442855;if(!await fileExists(_0x4f6873))return![];const _0x297e5f=await computeFileHash(_0x4f6873);if(!_0x2d71c5)return _0x2bbdf5?_0x297e5f!==_0x2bbdf5:!![];return _0x297e5f!==_0x2d71c5[_0x11ce33(0xc9)];}function buildDatasetCodeToAliasMap(_0x5240cb,_0x405ffc){const _0x299a4f=a30_0x442855,_0x22f0f9=loadAliasMap(_0x5240cb,undefined,resolveApiFilePath(_0x5240cb,_0x405ffc));return new Map(_0x22f0f9[_0x299a4f(0xb2)](_0x4a5b91=>[_0x4a5b91['datasetCode'],_0x4a5b91[_0x299a4f(0x95)]]));}async function confirmForce(){const _0x1e6d13=a30_0x442855,_0x4d9c0a=createInterface({'input':process[_0x1e6d13(0x92)],'output':process[_0x1e6d13(0x9f)]}),_0x25647c=await new Promise(_0x18aee6=>{const _0x3f5f9c=_0x1e6d13;_0x4d9c0a['question'](_0x3f5f9c(0xc3),_0x18aee6);});return _0x4d9c0a[_0x1e6d13(0x94)](),['y',_0x1e6d13(0xcf)][_0x1e6d13(0xc6)](_0x25647c['trim']()[_0x1e6d13(0xbd)]());}
@@ -1 +1 @@
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
+ const a31_0x4256bd=a31_0x2fba;(function(_0x402c7c,_0x196db9){const _0x39d82f=a31_0x2fba,_0x13342d=_0x402c7c();while(!![]){try{const _0x18d995=parseInt(_0x39d82f(0x206))/0x1+parseInt(_0x39d82f(0x20c))/0x2*(parseInt(_0x39d82f(0x21d))/0x3)+-parseInt(_0x39d82f(0x223))/0x4*(-parseInt(_0x39d82f(0x1e5))/0x5)+parseInt(_0x39d82f(0x221))/0x6*(-parseInt(_0x39d82f(0x1fe))/0x7)+-parseInt(_0x39d82f(0x1f9))/0x8+-parseInt(_0x39d82f(0x21c))/0x9+-parseInt(_0x39d82f(0x211))/0xa*(-parseInt(_0x39d82f(0x1e7))/0xb);if(_0x18d995===_0x196db9)break;else _0x13342d['push'](_0x13342d['shift']());}catch(_0x28c352){_0x13342d['push'](_0x13342d['shift']());}}}(a31_0x4b54,0xd8974));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';function a31_0x2fba(_0x123eeb,_0x20a4d6){_0x123eeb=_0x123eeb-0x1e4;const _0x4b5452=a31_0x4b54();let _0x2fbaff=_0x4b5452[_0x123eeb];return _0x2fbaff;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a31_0x4b54(){const _0x23c0d4=['boolean','high-risk-write','lockFilePath','58280oXfdat','str','scriptsRoot','lastSync','Force\x20push\x20ignoring\x20hash\x20protection','description','apiDir','has','remoteId','functions','Push\x20local\x20BFF\x20scripts\x20to\x20remote','5133312pBDhGH','12yoWuFY','datasetCode','Run\x20`','datasetId','10402158kXYQLh','appCode','1984388LSbFBV','aliasToDatasetCode','type','ENDPOINT','Push\x20complete:\x20','No\x20local\x20BFF\x20functions\x20found.','COMMON','/api/management/library/scripts/save','5HSamkd','version','5390aGEHgf','Incomplete\x20HOOK\x20path:\x20','\x22.\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','\x20local\x20BFF\x20script(s)\x20for\x20push','lockKey','map','functionNode','push','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','toISOString','operationType','validation','utf8','HOOK','values','length','alias','7129664dJuzUa','get','bff','force','Cannot\x20resolve\x20dataset\x20for\x20\x22','7OOrvMS','string','filePath','hash','unchanged','\x20uploaded,\x20','Push\x20only\x20this\x20script\x20type','some','45436Iqrdjq','bool','Local\x20function\x20not\x20found:\x20','name','Would\x20inspect\x20','would_push','342586oyeINX','update'];a31_0x4b54=function(){return _0x23c0d4;};return a31_0x4b54();}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_0x4256bd(0x1fb),'command':'push','description':a31_0x4256bd(0x21b),'risk':a31_0x4256bd(0x20f),'flags':[{'name':a31_0x4256bd(0x225),'type':a31_0x4256bd(0x1ff),'description':a31_0x4256bd(0x204),'enum':[a31_0x4256bd(0x229),a31_0x4256bd(0x226),a31_0x4256bd(0x1f5)]},{'name':a31_0x4256bd(0x209),'type':a31_0x4256bd(0x1ff),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a31_0x4256bd(0x1fc),'type':a31_0x4256bd(0x20e),'description':a31_0x4256bd(0x215)}],async 'dryRun'(_0x5f2310){const _0x59f9ad=a31_0x4256bd,_0x274692=loadBffProjectConfig(_0x5f2310[_0x59f9ad(0x222)]),_0xe7ed2b=await readBffLockFile(_0x274692[_0x59f9ad(0x210)]),{appLock:_0x360eb2}=ensureLockScope(_0xe7ed2b??createEmptyBffLock(),_0x5f2310[_0x59f9ad(0x222)],_0x274692[_0x59f9ad(0x213)],_0x59f9ad(0x1ef)),_0x56655b=await getTargetFunctions(_0x274692,_0x5f2310),_0x101066=_0x5f2310['bool'](_0x59f9ad(0x1fc)),_0x2eadea=[];for(const _0x3a7b28 of _0x56655b){const _0x291e18=await computeFileHash(_0x3a7b28[_0x59f9ad(0x200)]),_0xb8aa06=_0x360eb2['functions'][_0x3a7b28[_0x59f9ad(0x1ec)]],_0x3950dc=!!_0xb8aa06&&_0xb8aa06[_0x59f9ad(0x201)]===_0x291e18;_0x2eadea[_0x59f9ad(0x1ef)]({'lockKey':_0x3a7b28[_0x59f9ad(0x1ec)],'filePath':_0x3a7b28[_0x59f9ad(0x200)],'remoteId':_0xb8aa06?.[_0x59f9ad(0x219)]??null,'mode':_0xb8aa06?.[_0x59f9ad(0x219)]?_0x59f9ad(0x20d):'create','status':!_0x101066&&_0x3950dc?_0x59f9ad(0x202):_0x59f9ad(0x20b)});}return{'method':'POST','url':_0x59f9ad(0x1e4),'body':{'appCode':_0x5f2310['appCode'],'force':_0x101066,'files':_0x2eadea},'description':_0x59f9ad(0x20a)+_0x2eadea['length']+_0x59f9ad(0x1eb)};},async 'execute'(_0x5b4d45){const _0x3a9ec0=a31_0x4256bd,_0x16d571=loadBffProjectConfig(_0x5b4d45[_0x3a9ec0(0x222)]),_0x3dde48=await readBffLockFile(_0x16d571[_0x3a9ec0(0x210)]),{lockData:_0x3bc190,appLock:_0x3d8020}=ensureLockScope(_0x3dde48??createEmptyBffLock(),_0x5b4d45[_0x3a9ec0(0x222)],_0x16d571[_0x3a9ec0(0x213)],'push'),_0x383f0e=await getTargetFunctions(_0x16d571,_0x5b4d45);if(_0x383f0e[_0x3a9ec0(0x1f7)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3a9ec0(0x228)};const _0x5e2ac0=_0x5b4d45[_0x3a9ec0(0x207)](_0x3a9ec0(0x1fc)),_0x2c15a2=await buildHookMaps(_0x5b4d45[_0x3a9ec0(0x222)],_0x5b4d45[_0x3a9ec0(0x217)],_0x383f0e,_0x3d8020),_0x37f938=[],_0x2fe0d8=[],_0xbfbcb=[];for(const _0x44fd55 of _0x383f0e){const _0x336a4b=await computeFileHash(_0x44fd55[_0x3a9ec0(0x200)]),_0xa502c4=_0x3d8020[_0x3a9ec0(0x21a)][_0x44fd55[_0x3a9ec0(0x1ec)]];if(!_0x5e2ac0&&_0xa502c4&&_0xa502c4[_0x3a9ec0(0x201)]===_0x336a4b){_0x2fe0d8[_0x3a9ec0(0x1ef)]({'lockKey':_0x44fd55[_0x3a9ec0(0x1ec)],'reason':_0x3a9ec0(0x202)});continue;}try{await uploadSingleFunction(_0x5b4d45[_0x3a9ec0(0x222)],_0x44fd55,_0x3d8020,_0x2c15a2);const _0x43e6d1=_0x3d8020[_0x3a9ec0(0x21a)][_0x44fd55[_0x3a9ec0(0x1ec)]];_0x37f938[_0x3a9ec0(0x1ef)]({'lockKey':_0x44fd55[_0x3a9ec0(0x1ec)],'remoteId':_0x43e6d1?.[_0x3a9ec0(0x219)]??0x0});}catch(_0x5d9ae8){_0xbfbcb[_0x3a9ec0(0x1ef)]({'lockKey':_0x44fd55[_0x3a9ec0(0x1ec)],'error':_0x5d9ae8 instanceof Error?_0x5d9ae8['message']:String(_0x5d9ae8)});}}return _0x3d8020[_0x3a9ec0(0x214)]=new Date()[_0x3a9ec0(0x1f1)](),await writeBffLockFile(_0x16d571[_0x3a9ec0(0x210)],_0x3bc190),{'ok':_0xbfbcb[_0x3a9ec0(0x1f7)]===0x0,'data':{'uploaded':_0x37f938,'skipped':_0x2fe0d8,'failed':_0xbfbcb},'message':_0x3a9ec0(0x227)+_0x37f938[_0x3a9ec0(0x1f7)]+_0x3a9ec0(0x203)+_0x2fe0d8[_0x3a9ec0(0x1f7)]+'\x20skipped,\x20'+_0xbfbcb[_0x3a9ec0(0x1f7)]+'\x20failed'};}};async function getTargetFunctions(_0x349cff,_0x48fa7a){const _0x37e98e=a31_0x4256bd,_0x449e94=_0x48fa7a['str']('type'),_0x23c4c3=_0x48fa7a[_0x37e98e(0x212)](_0x37e98e(0x209)),_0x270433=normalizeBffType(_0x449e94)??undefined;if(_0x23c4c3&&!_0x270433)throw CliErrors[_0x37e98e(0x1f3)](_0x37e98e(0x1f0));const _0x52d02f=await scanLocalBffFunctions(_0x349cff,_0x270433);if(_0x23c4c3){const _0x426b4f=_0x52d02f['filter'](_0x93072=>_0x93072[_0x37e98e(0x209)]===_0x23c4c3);if(_0x426b4f[_0x37e98e(0x1f7)]===0x0)throw CliErrors[_0x37e98e(0x1f3)](_0x37e98e(0x208)+_0x270433+'/'+_0x23c4c3);return _0x426b4f;}return _0x52d02f;}async function buildHookMaps(_0x45e866,_0x45f525,_0x3152e0,_0x489da7){const _0xfff472=a31_0x4256bd,_0x341731=_0x3152e0[_0xfff472(0x205)](_0x39ffad=>_0x39ffad[_0xfff472(0x225)]===_0xfff472(0x1f5));if(!_0x341731)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x1a98b6=loadAliasMap(_0x45f525,undefined,resolveApiFilePath(_0x45f525,_0x45e866)),_0x6bec5c=new Map(_0x1a98b6[_0xfff472(0x1ed)](_0x11b127=>[_0x11b127[_0xfff472(0x1f8)],_0x11b127[_0xfff472(0x21e)]]));for(const _0x38c6dc of Object[_0xfff472(0x1f6)](_0x489da7['functions'])){_0x38c6dc[_0xfff472(0x1f8)]&&_0x38c6dc[_0xfff472(0x21e)]&&!_0x6bec5c[_0xfff472(0x218)](_0x38c6dc[_0xfff472(0x1f8)])&&_0x6bec5c['set'](_0x38c6dc['alias'],_0x38c6dc['datasetCode']);}const _0x2fe436=await listDatasets(_0x45e866),_0x402c0e=new Map(_0x2fe436[_0xfff472(0x1ed)](_0x510c0e=>[_0x510c0e['code'],_0x510c0e['id']]));return{'aliasToDatasetCode':_0x6bec5c,'datasetCodeToId':_0x402c0e};}async function uploadSingleFunction(_0x5db8ae,_0x32e28b,_0x3f0085,_0x290ec2){const _0x55d6f4=a31_0x4256bd,_0x5b9f8c=await readFile(_0x32e28b[_0x55d6f4(0x200)],_0x55d6f4(0x1f4)),_0x40abb9=await computeFileHash(_0x32e28b[_0x55d6f4(0x200)]),_0x28f2c7=_0x3f0085['functions'][_0x32e28b[_0x55d6f4(0x1ec)]];if(_0x28f2c7?.[_0x55d6f4(0x219)]&&_0x28f2c7[_0x55d6f4(0x1e6)]==null)throw CliErrors[_0x55d6f4(0x1f3)](_0x32e28b[_0x55d6f4(0x1ec)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x502aa9=extractScriptDescription(_0x5b9f8c);if(!_0x502aa9&&_0x28f2c7?.['remoteId']){const _0x4d5a60=await getBffScriptInfo(_0x28f2c7[_0x55d6f4(0x219)]);_0x502aa9=_0x4d5a60[_0x55d6f4(0x216)]||undefined;}const _0x39ec50={'appCode':_0x5db8ae,'functionName':_0x32e28b[_0x55d6f4(0x209)],'scriptType':_0x32e28b[_0x55d6f4(0x225)],'scriptContent':_0x5b9f8c};if(_0x28f2c7?.['remoteId'])_0x39ec50['id']=_0x28f2c7[_0x55d6f4(0x219)];if(_0x28f2c7?.[_0x55d6f4(0x1e6)]!=null)_0x39ec50[_0x55d6f4(0x1e6)]=_0x28f2c7['version'];if(_0x502aa9)_0x39ec50[_0x55d6f4(0x216)]=_0x502aa9;if(_0x32e28b['type']==='HOOK'){const _0x3d77ef=_0x32e28b[_0x55d6f4(0x1f8)];if(!_0x3d77ef||!_0x32e28b[_0x55d6f4(0x1f2)]||!_0x32e28b[_0x55d6f4(0x1ee)])throw CliErrors[_0x55d6f4(0x1f3)](_0x55d6f4(0x1e8)+_0x32e28b[_0x55d6f4(0x1ec)]);const _0x2fc031=_0x290ec2[_0x55d6f4(0x224)][_0x55d6f4(0x1fa)](_0x3d77ef)??_0x28f2c7?.[_0x55d6f4(0x21e)]??_0x3d77ef,_0x2c94ce=_0x290ec2['datasetCodeToId']['get'](_0x2fc031);if(!_0x2c94ce)throw CliErrors[_0x55d6f4(0x1f3)](_0x55d6f4(0x1fd)+_0x3d77ef+_0x55d6f4(0x1e9)+(_0x55d6f4(0x21f)+CLI_BIN_NAME+_0x55d6f4(0x1ea)));_0x39ec50[_0x55d6f4(0x220)]=_0x2c94ce,_0x39ec50[_0x55d6f4(0x1f2)]=_0x32e28b['operationType'],_0x39ec50[_0x55d6f4(0x1ee)]=_0x32e28b[_0x55d6f4(0x1ee)];}const _0x84b9ef=await saveBffScript(_0x39ec50),_0x21cab9=await getBffScriptInfo(_0x84b9ef),_0x56b978={'hash':_0x40abb9,'remoteId':_0x84b9ef,'version':_0x21cab9[_0x55d6f4(0x1e6)]};if(_0x32e28b[_0x55d6f4(0x225)]===_0x55d6f4(0x1f5)){const _0xe669f0=_0x32e28b[_0x55d6f4(0x1f8)],_0x319401=_0x290ec2['aliasToDatasetCode']['get'](_0xe669f0)??_0x28f2c7?.[_0x55d6f4(0x21e)]??_0xe669f0;_0x290ec2['aliasToDatasetCode'][_0x55d6f4(0x218)](_0xe669f0)?_0x56b978['alias']=_0xe669f0:_0x56b978[_0x55d6f4(0x1f8)]=_0x28f2c7?.[_0x55d6f4(0x1f8)],_0x56b978[_0x55d6f4(0x21e)]=_0x319401,_0x56b978[_0x55d6f4(0x1f2)]=_0x32e28b[_0x55d6f4(0x1f2)],_0x56b978['functionNode']=_0x32e28b[_0x55d6f4(0x1ee)];}_0x3f0085[_0x55d6f4(0x21a)][_0x32e28b[_0x55d6f4(0x1ec)]]=_0x56b978;}
@@ -1 +1 @@
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
+ const a32_0x44b960=a32_0x215c;(function(_0x274ea3,_0x18ded0){const _0x461e98=a32_0x215c,_0x4fa8ba=_0x274ea3();while(!![]){try{const _0x10148a=-parseInt(_0x461e98(0x88))/0x1*(parseInt(_0x461e98(0x84))/0x2)+-parseInt(_0x461e98(0x93))/0x3*(parseInt(_0x461e98(0x9c))/0x4)+-parseInt(_0x461e98(0x89))/0x5+-parseInt(_0x461e98(0x92))/0x6*(parseInt(_0x461e98(0x85))/0x7)+parseInt(_0x461e98(0x8f))/0x8*(parseInt(_0x461e98(0x7f))/0x9)+parseInt(_0x461e98(0x95))/0xa+parseInt(_0x461e98(0x9b))/0xb;if(_0x10148a===_0x18ded0)break;else _0x4fa8ba['push'](_0x4fa8ba['shift']());}catch(_0x3735f0){_0x4fa8ba['push'](_0x4fa8ba['shift']());}}}(a32_0x41d4,0x1b765));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a32_0x215c(_0x1e2120,_0xbeb7a7){_0x1e2120=_0x1e2120-0x7e;const _0x41d474=a32_0x41d4();let _0x215c60=_0x41d474[_0x1e2120];return _0x215c60;}function a32_0x41d4(){const _0x418761=['All\x20BFF\x20scripts\x20are\x20in\x20sync.','36782akpgCN','7NAHfwK','functions','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','1GwsRjD','675070ATMTgx','length','bool','all','lockFilePath','bff','573416sfZWcI','boolean','lockKey','923736Lhjkap','789irrNVy','apiDir','1300380lCEFru','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','remote','\x20added,\x20','map','filePath','3047264veZldS','3076PjEcFb','scriptsRoot','push','appCode','\x20remote-only','datasetCode','27cCnLef','hash','alias','has'];a32_0x41d4=function(){return _0x418761;};return a32_0x41d4();}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_0x44b960(0x8e),'command':'status','description':a32_0x44b960(0x96),'risk':'read','flags':[{'name':a32_0x44b960(0x97),'type':a32_0x44b960(0x90),'description':a32_0x44b960(0x87)}],async 'execute'(_0x4d7d5c){const _0x1bf3f4=a32_0x44b960,_0x88f04=loadBffProjectConfig(_0x4d7d5c['appCode']),_0x406019=await readBffLockFile(_0x88f04[_0x1bf3f4(0x8d)]),{appLock:_0x34e7e6}=ensureLockScope(_0x406019??createEmptyBffLock(),_0x4d7d5c[_0x1bf3f4(0x9f)],_0x88f04[_0x1bf3f4(0x9d)],'status'),_0x34c16d=await scanLocalBffFunctions(_0x88f04),_0x2409e4=[],_0x5a38f1=[],_0x1322a4=[];for(const _0x1fd3da of _0x34c16d){const _0x4aa569=await computeFileHash(_0x1fd3da[_0x1bf3f4(0x9a)]),_0x5ba14f=_0x34e7e6[_0x1bf3f4(0x86)][_0x1fd3da[_0x1bf3f4(0x91)]];if(!_0x5ba14f)_0x2409e4[_0x1bf3f4(0x9e)](_0x1fd3da[_0x1bf3f4(0x91)]);else _0x5ba14f[_0x1bf3f4(0x80)]!==_0x4aa569?_0x5a38f1['push'](_0x1fd3da[_0x1bf3f4(0x91)]):_0x1322a4['push'](_0x1fd3da[_0x1bf3f4(0x91)]);}const _0x275bbf=[];if(_0x4d7d5c[_0x1bf3f4(0x8b)](_0x1bf3f4(0x97))){const _0x246b94=loadAliasMap(_0x4d7d5c[_0x1bf3f4(0x94)],undefined,resolveApiFilePath(_0x4d7d5c[_0x1bf3f4(0x94)],_0x4d7d5c[_0x1bf3f4(0x9f)])),_0x84cc6=new Map(_0x246b94['map'](_0x80e497=>[_0x80e497[_0x1bf3f4(0x7e)],_0x80e497[_0x1bf3f4(0x81)]])),[_0x1c71eb,_0x18dab9]=await Promise[_0x1bf3f4(0x8c)]([listBffScripts(_0x4d7d5c[_0x1bf3f4(0x9f)]),getBffScriptStatistics(_0x4d7d5c[_0x1bf3f4(0x9f)])]),_0x239c5b=createHookLocationMap(_0x18dab9),_0x3f05e1=new Set(_0x34c16d[_0x1bf3f4(0x99)](_0x3e54ef=>_0x3e54ef['lockKey']));for(const _0x479e04 of _0x1c71eb){const _0x2a64e7=resolveRemoteScriptTarget(_0x88f04,_0x479e04,_0x239c5b,_0x34e7e6[_0x1bf3f4(0x86)],_0x84cc6);_0x2a64e7&&!_0x3f05e1[_0x1bf3f4(0x82)](_0x2a64e7[_0x1bf3f4(0x91)])&&_0x275bbf[_0x1bf3f4(0x9e)](_0x2a64e7[_0x1bf3f4(0x91)]);}}const _0x10e7b8=_0x2409e4[_0x1bf3f4(0x8a)]===0x0&&_0x5a38f1[_0x1bf3f4(0x8a)]===0x0&&_0x275bbf[_0x1bf3f4(0x8a)]===0x0;return{'ok':!![],'data':{'added':_0x2409e4,'modified':_0x5a38f1,'unchanged':_0x1322a4,'remoteOnly':_0x275bbf},'message':_0x10e7b8?_0x1bf3f4(0x83):_0x2409e4['length']+_0x1bf3f4(0x98)+_0x5a38f1[_0x1bf3f4(0x8a)]+'\x20modified,\x20'+_0x1322a4[_0x1bf3f4(0x8a)]+'\x20unchanged'+(_0x275bbf[_0x1bf3f4(0x8a)]>0x0?',\x20'+_0x275bbf[_0x1bf3f4(0x8a)]+_0x1bf3f4(0xa0):'')};}};
@@ -1 +1 @@
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
+ const a33_0x3534ce=a33_0x5503;(function(_0x2fdc9b,_0x4d2c82){const _0x296260=a33_0x5503,_0x1125fd=_0x2fdc9b();while(!![]){try{const _0x4f4c4a=parseInt(_0x296260(0x208))/0x1*(-parseInt(_0x296260(0x1e5))/0x2)+-parseInt(_0x296260(0x1ff))/0x3+parseInt(_0x296260(0x1f3))/0x4*(parseInt(_0x296260(0x1f4))/0x5)+parseInt(_0x296260(0x1f6))/0x6*(-parseInt(_0x296260(0x1ec))/0x7)+-parseInt(_0x296260(0x1ea))/0x8*(parseInt(_0x296260(0x1fc))/0x9)+-parseInt(_0x296260(0x20e))/0xa+parseInt(_0x296260(0x20d))/0xb*(parseInt(_0x296260(0x202))/0xc);if(_0x4f4c4a===_0x4d2c82)break;else _0x1125fd['push'](_0x1125fd['shift']());}catch(_0x4254a6){_0x1125fd['push'](_0x1125fd['shift']());}}}(a33_0x228d,0xa5ad0));function a33_0x228d(){const _0x270022=['gray','green','14SCRyzl','\x20install\x20-g\x20','version','red','includes','146248uGmPtb','Update\x20available:\x20','873187apmDXm','log','info','Version\x20comparison\x20failed','@latest','write','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','238268tMIOpx','35fyhubg','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','12bqcPqh','unknown','Current\x20version:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','coerce','https://registry.npmjs.org/','171UKAUZY','message','install','2491275MeFXrE','/latest','pipe','16548yWgmhd','timeout','json','yellow','Unable\x20to\x20check\x20for\x20updates','succeed','119356BrppeP','...','Already\x20up\x20to\x20date\x20(v','npm','Update\x20failed','28083thTLsf','9962100IwVOQt','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','slice','stableVersion','bun','Updated\x20to\x20v','fail'];a33_0x228d=function(){return _0x270022;};return a33_0x228d();}import a33_0x525dcc from'chalk';import a33_0x26c494 from'ora';import a33_0x2710c5 from'semver';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 _0x31a766=a33_0x5503;return GIT_COMMIT!==_0x31a766(0x1f7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x31a766(0x210)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x15957f=a33_0x5503,_0x2e0104=process['execPath']['toLowerCase']();if(_0x2e0104[_0x15957f(0x1e9)](_0x15957f(0x212)))return _0x15957f(0x212);return _0x15957f(0x20b);}async function fetchLatestNpmVersion(){const _0xd061c4=a33_0x5503;try{const _0x501bc5=await fetch(_0xd061c4(0x1fb)+NPM_PACKAGE_NAME+_0xd061c4(0x200),{'signal':AbortSignal[_0xd061c4(0x203)](0x2710)});if(!_0x501bc5['ok'])return null;const _0x271af4=await _0x501bc5[_0xd061c4(0x204)]();return _0x271af4[_0xd061c4(0x1e7)]??null;}catch{return null;}}async function fetchLatestVersion(){const _0x2ce3ff=a33_0x5503,_0x414454=await fetchLatestNpmVersion();if(_0x414454)return _0x414454;const _0x4bf1e2=await getCdnConfig();return _0x4bf1e2?.['cli']?.[_0x2ce3ff(0x211)]??null;}async function execute(_0x3d0d0d){const _0x2b83df=a33_0x5503,_0x121fcd=getCurrentVersion();console[_0x2b83df(0x1ed)](_0x2b83df(0x1f8)+_0x121fcd);const _0x1e136a=a33_0x26c494('Checking\x20for\x20updates...')['start'](),_0x203364=await fetchLatestVersion();if(!_0x203364)return _0x1e136a[_0x2b83df(0x214)](_0x2b83df(0x1f9)),console[_0x2b83df(0x1ed)](a33_0x525dcc['gray'](_0x2b83df(0x1f5)+NPM_PACKAGE_NAME+_0x2b83df(0x1f0))),{'ok':![],'message':_0x2b83df(0x206)};const _0x507724=a33_0x2710c5[_0x2b83df(0x1fa)](_0x121fcd),_0x47a8e7=a33_0x2710c5[_0x2b83df(0x1fa)](_0x203364);if(!_0x507724||!_0x47a8e7)return _0x1e136a[_0x2b83df(0x214)](_0x2b83df(0x1ef)),{'ok':![],'message':_0x2b83df(0x1ef)};if(!a33_0x2710c5['lt'](_0x507724,_0x47a8e7))return _0x1e136a[_0x2b83df(0x207)](_0x2b83df(0x20a)+_0x203364+')'),{'ok':!![]};_0x1e136a[_0x2b83df(0x1ee)](_0x2b83df(0x1eb)+a33_0x525dcc[_0x2b83df(0x205)](_0x121fcd)+'\x20→\x20'+a33_0x525dcc[_0x2b83df(0x1e4)](_0x203364));const _0x55aa65=detectPackageManager(),_0x5aeca7=_0x55aa65===_0x2b83df(0x20b)?resolveNpmBin(_0x2b83df(0x20b)):_0x55aa65,_0x133a09=a33_0x26c494('Updating\x20via\x20'+_0x55aa65+_0x2b83df(0x209))['start']();try{return await execa(_0x5aeca7,[_0x2b83df(0x1fe),'-g',NPM_PACKAGE_NAME+_0x2b83df(0x1f0)],{'stdio':_0x2b83df(0x201)}),_0x133a09['succeed'](_0x2b83df(0x213)+_0x203364),console[_0x2b83df(0x1ed)](a33_0x525dcc[_0x2b83df(0x1e3)](_0x2b83df(0x20f))),{'ok':!![]};}catch(_0x234738){return _0x133a09[_0x2b83df(0x214)](_0x2b83df(0x20c)),console['error'](a33_0x525dcc[_0x2b83df(0x1e8)]('\x20\x20'+_0x234738[_0x2b83df(0x1fd)])),console[_0x2b83df(0x1ed)](a33_0x525dcc[_0x2b83df(0x1e3)]('\x20\x20Try\x20manually:\x20'+_0x55aa65+_0x2b83df(0x1e6)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x234738[_0x2b83df(0x1fd)]};}}function a33_0x5503(_0x1fb168,_0x294a74){_0x1fb168=_0x1fb168-0x1e3;const _0x228da3=a33_0x228d();let _0x5503ba=_0x228da3[_0x1fb168];return _0x5503ba;}export const updateDefinition={'service':'update','command':'run','description':a33_0x3534ce(0x1f2),'risk':a33_0x3534ce(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
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];
1
+ (function(_0x191e20,_0x6c51f4){const _0x1f0af6=a34_0xac80,_0x53a80d=_0x191e20();while(!![]){try{const _0x4c9216=-parseInt(_0x1f0af6(0xfe))/0x1+-parseInt(_0x1f0af6(0xfb))/0x2+parseInt(_0x1f0af6(0x103))/0x3+parseInt(_0x1f0af6(0xfd))/0x4*(-parseInt(_0x1f0af6(0x101))/0x5)+parseInt(_0x1f0af6(0x100))/0x6+parseInt(_0x1f0af6(0x102))/0x7*(parseInt(_0x1f0af6(0xff))/0x8)+parseInt(_0x1f0af6(0xfc))/0x9;if(_0x4c9216===_0x6c51f4)break;else _0x53a80d['push'](_0x53a80d['shift']());}catch(_0x2588ff){_0x53a80d['push'](_0x53a80d['shift']());}}}(a34_0x4ca0,0x77cf7));function a34_0xac80(_0x2502ca,_0x4e94c0){_0x2502ca=_0x2502ca-0xfb;const _0x4ca061=a34_0x4ca0();let _0xac80f1=_0x4ca061[_0x2502ca];return _0xac80f1;}import{codegenSdk}from'./sdk.js';function a34_0x4ca0(){const _0x49ff8a=['305yzcDoj','199115oQdLLV','506142jErbDp','441566rtLCCS','7321653asjQEq','50936qtjQOG','105710UDXkmf','128VqDVhl','939954xORXpS'];a34_0x4ca0=function(){return _0x49ff8a;};return a34_0x4ca0();}import{codegenSql}from'./sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a36_0x165ff5=a36_0x478b;(function(_0x4340f3,_0x58d2c6){const _0x5dc903=a36_0x478b,_0x2b7b74=_0x4340f3();while(!![]){try{const _0x1b6dab=-parseInt(_0x5dc903(0x144))/0x1+parseInt(_0x5dc903(0x14d))/0x2+parseInt(_0x5dc903(0x14f))/0x3+parseInt(_0x5dc903(0x151))/0x4+-parseInt(_0x5dc903(0x155))/0x5+parseInt(_0x5dc903(0x14c))/0x6+parseInt(_0x5dc903(0x157))/0x7*(-parseInt(_0x5dc903(0x152))/0x8);if(_0x1b6dab===_0x58d2c6)break;else _0x2b7b74['push'](_0x2b7b74['shift']());}catch(_0x19d1ca){_0x2b7b74['push'](_0x2b7b74['shift']());}}}(a36_0x3d9a,0xdd4f9));function a36_0x478b(_0xd87b0b,_0xbb4de4){_0xd87b0b=_0xd87b0b-0x142;const _0x3d9a03=a36_0x3d9a();let _0x478bce=_0x3d9a03[_0xd87b0b];return _0x478bce;}function a36_0x3d9a(){const _0x3bee3a=['bool','boolean','codegen','name','string','read','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','8685612KelsbN','596264YBlNpG','sdk','2874726iEKnSz','operation','6940416rVOjQl','10725704fynxTh','str','appCode','4012705gszVfm','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','14qYToBN','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Omit\x20import\x20statements\x20from\x20generated\x20code','code','skip-imports','48624YqgWQO'];a36_0x3d9a=function(){return _0x3bee3a;};return a36_0x3d9a();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../common/flags.js';export const codegenSdk={'service':a36_0x165ff5(0x147),'command':a36_0x165ff5(0x14e),'description':a36_0x165ff5(0x14b),'risk':a36_0x165ff5(0x14a),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a36_0x165ff5(0x149),'description':a36_0x165ff5(0x156)},{'name':a36_0x165ff5(0x150),'type':a36_0x165ff5(0x149),'required':!![],'description':a36_0x165ff5(0x158)},{'name':a36_0x165ff5(0x143),'type':a36_0x165ff5(0x146),'description':a36_0x165ff5(0x159)}],async 'execute'(_0xe93cad){const _0x5e2bed=a36_0x165ff5,{dataset:_0x1b1680,operation:_0x4ec757}=await getOperationDetail(_0xe93cad[_0x5e2bed(0x154)],_0xe93cad[_0x5e2bed(0x153)]('code'),_0xe93cad['str']('operation')),_0x3eccd6=generateSdkCode(_0x1b1680,_0x4ec757,{'includeImports':!_0xe93cad[_0x5e2bed(0x145)](_0x5e2bed(0x143))});return{'ok':!![],'data':{'dataset':{'name':_0x1b1680[_0x5e2bed(0x148)],'code':_0x1b1680[_0x5e2bed(0x142)],'tableName':_0x1b1680['tableName']},'operation':_0xe93cad[_0x5e2bed(0x153)](_0x5e2bed(0x150)),'code':_0x3eccd6}};}};
1
+ const a35_0x70c099=a35_0x5eaa;(function(_0x382dbc,_0x442050){const _0x1d9f80=a35_0x5eaa,_0x14a401=_0x382dbc();while(!![]){try{const _0x59cd68=parseInt(_0x1d9f80(0xa5))/0x1+-parseInt(_0x1d9f80(0xad))/0x2+parseInt(_0x1d9f80(0xa8))/0x3*(-parseInt(_0x1d9f80(0xae))/0x4)+-parseInt(_0x1d9f80(0x9b))/0x5+parseInt(_0x1d9f80(0x9a))/0x6*(parseInt(_0x1d9f80(0xac))/0x7)+parseInt(_0x1d9f80(0xa1))/0x8+parseInt(_0x1d9f80(0xa9))/0x9;if(_0x59cd68===_0x442050)break;else _0x14a401['push'](_0x14a401['shift']());}catch(_0x4c0d2e){_0x14a401['push'](_0x14a401['shift']());}}}(a35_0x1aee,0x73841));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a35_0x5eaa(_0x5b76b6,_0x1056b1){_0x5b76b6=_0x5b76b6-0x99;const _0x1aee8a=a35_0x1aee();let _0x5eaab4=_0x1aee8a[_0x5b76b6];return _0x5eaab4;}import{CODE_FLAG_OPTIONAL}from'../common/flags.js';export const codegenSdk={'service':a35_0x70c099(0xab),'command':a35_0x70c099(0xa2),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a35_0x70c099(0x9c),'type':'string','description':a35_0x70c099(0xaa)},{'name':a35_0x70c099(0xa0),'type':'string','required':!![],'description':a35_0x70c099(0xa4)},{'name':a35_0x70c099(0xa7),'type':a35_0x70c099(0xa6),'description':a35_0x70c099(0x9d)}],async 'execute'(_0x408537){const _0x4f30f1=a35_0x70c099,{dataset:_0x3c4e7d,operation:_0x4cb615}=await getOperationDetail(_0x408537['appCode'],_0x408537[_0x4f30f1(0x99)](_0x4f30f1(0xa3)),_0x408537['str'](_0x4f30f1(0xa0))),_0x1472f2=generateSdkCode(_0x3c4e7d,_0x4cb615,{'includeImports':!_0x408537['bool'](_0x4f30f1(0xa7))});return{'ok':!![],'data':{'dataset':{'name':_0x3c4e7d[_0x4f30f1(0x9e)],'code':_0x3c4e7d[_0x4f30f1(0xa3)],'tableName':_0x3c4e7d[_0x4f30f1(0x9f)]},'operation':_0x408537[_0x4f30f1(0x99)](_0x4f30f1(0xa0)),'code':_0x1472f2}};}};function a35_0x1aee(){const _0x64ca7a=['alias','Omit\x20import\x20statements\x20from\x20generated\x20code','name','tableName','operation','3697960yiHAts','sdk','code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','770907VXszsw','boolean','skip-imports','6dmWIBb','6048387XnNvaA','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','codegen','2583063JpMnrU','110020ovjuVD','1868996UdhTUT','str','6sqgcnq','4057715UdFFeK'];a35_0x1aee=function(){return _0x64ca7a;};return a35_0x1aee();}