@lovrabet/rabetbase-cli 2.0.7 → 2.0.8

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 (137) 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 -1
  67. package/lib/commands/project/create/format-elapsed.js +1 -1
  68. package/lib/commands/project/create/main.js +1 -1
  69. package/lib/commands/project/create/non-interactive.js +1 -1
  70. package/lib/commands/project/create/project-template-path.js +1 -1
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  72. package/lib/commands/project/create/use-format-code.js +1 -1
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -1
  76. package/lib/commands/project/upgrade.js +1 -1
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/schema.js +1 -0
  80. package/lib/commands/skill/index.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/sql/list.js +1 -1
  85. package/lib/commands/sql/save.js +1 -1
  86. package/lib/commands/sql/validate.js +1 -1
  87. package/lib/constant/cli.js +1 -1
  88. package/lib/constant/domain.js +1 -1
  89. package/lib/constant/env.js +1 -1
  90. package/lib/context.js +1 -1
  91. package/lib/core/alias-resolver.js +1 -1
  92. package/lib/core/api-client.js +1 -1
  93. package/lib/core/bff/config.js +1 -1
  94. package/lib/core/bff/file-system.js +1 -1
  95. package/lib/core/bff/hash.js +1 -1
  96. package/lib/core/bff/lock.js +1 -1
  97. package/lib/core/bff/utils.js +1 -1
  98. package/lib/core/db-resolver.js +1 -1
  99. package/lib/core/sql-validator.js +1 -1
  100. package/lib/errors.js +1 -1
  101. package/lib/framework/build-all-flags.js +1 -0
  102. package/lib/framework/flags.js +1 -1
  103. package/lib/framework/help.js +1 -1
  104. package/lib/framework/index.js +1 -1
  105. package/lib/framework/output.js +1 -1
  106. package/lib/framework/response.js +1 -1
  107. package/lib/framework/runner.js +1 -1
  108. package/lib/framework/schema-export.js +1 -0
  109. package/lib/framework/types.js +1 -1
  110. package/lib/generated/build-info.js +1 -1
  111. package/lib/help.js +1 -1
  112. package/lib/skills/main.js +1 -1
  113. package/lib/skills/npx-skills-add.js +1 -1
  114. package/lib/telemetry/cli-command-trace.js +1 -1
  115. package/lib/telemetry/cli-help-trace.js +1 -1
  116. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  117. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  118. package/lib/telemetry/send-cli-trace-log.js +1 -1
  119. package/lib/utils/ai_config.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -0
  121. package/lib/utils/cdn-config.js +1 -1
  122. package/lib/utils/check-sdk-version.js +1 -1
  123. package/lib/utils/cli-version-check.js +1 -1
  124. package/lib/utils/config.js +1 -1
  125. package/lib/utils/copy-directory.js +1 -1
  126. package/lib/utils/file-utils.js +1 -1
  127. package/lib/utils/guides-cdn.js +1 -1
  128. package/lib/utils/http-client.js +1 -1
  129. package/lib/utils/is-non-interactive.js +1 -1
  130. package/lib/utils/logger.js +1 -1
  131. package/lib/utils/platform.js +1 -1
  132. package/lib/utils/rules-cdn.js +1 -1
  133. package/lib/utils/sleep.js +1 -1
  134. package/lib/utils/template-replacer.js +1 -1
  135. package/lib/utils/version.js +1 -1
  136. package/lib/utils/with-active-cookie.js +1 -1
  137. package/package.json +4 -2
@@ -1 +1 @@
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
+ function a20_0x1d16(_0x11b483,_0x2e5cfd){_0x11b483=_0x11b483-0x88;const _0x7db397=a20_0x7db3();let _0x1d1682=_0x7db397[_0x11b483];return _0x1d1682;}const a20_0x2db5e1=a20_0x1d16;(function(_0xf24f21,_0x5e7129){const _0x30c11f=a20_0x1d16,_0x33d2b2=_0xf24f21();while(!![]){try{const _0x56b6f2=-parseInt(_0x30c11f(0x89))/0x1+-parseInt(_0x30c11f(0x93))/0x2+parseInt(_0x30c11f(0x90))/0x3+parseInt(_0x30c11f(0x8f))/0x4+parseInt(_0x30c11f(0x95))/0x5+-parseInt(_0x30c11f(0x88))/0x6*(parseInt(_0x30c11f(0x8d))/0x7)+parseInt(_0x30c11f(0x94))/0x8;if(_0x56b6f2===_0x5e7129)break;else _0x33d2b2['push'](_0x33d2b2['shift']());}catch(_0x41d56e){_0x33d2b2['push'](_0x33d2b2['shift']());}}}(a20_0x7db3,0x1dee3));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x562f14){const _0x3aa685=a20_0x1d16,{setActiveCookie:_0x2a2462}=await import('../../core/api-client.js');_0x2a2462(_0x562f14[_0x3aa685(0x8c)]);const _0x16acc9=await listRemoteApps(),_0x409005=_0x16acc9['map'](_0x50fa9a=>({..._0x50fa9a['id']!=null?{'id':_0x50fa9a['id']}:{},'appCode':_0x50fa9a['appCode'],'appName':_0x50fa9a[_0x3aa685(0x8b)],..._0x50fa9a['appDesc']!=null?{'appDesc':_0x50fa9a[_0x3aa685(0x91)]}:{}}));return{'ok':!![],'data':_0x409005};}function a20_0x7db3(){const _0x3c9ee2=['281376cPBrvm','381714ZBwlRC','appDesc','List\x20apps\x20available\x20on\x20the\x20platform','68936VFGuRv','1004888BUJYre','61415mCtzuQ','12042oMNyQl','148308APHxBT','read','appName','cookie','105pEYvFl','app'];a20_0x7db3=function(){return _0x3c9ee2;};return a20_0x7db3();}export const appRemoteDefinition={'service':a20_0x2db5e1(0x8e),'command':'remote','description':a20_0x2db5e1(0x92),'risk':a20_0x2db5e1(0x8a),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
@@ -1 +1 @@
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
+ const a21_0x4d0689=a21_0x1633;(function(_0x3566e2,_0x4ad33a){const _0x25c8e3=a21_0x1633,_0x2b7bf4=_0x3566e2();while(!![]){try{const _0x4c2b5e=-parseInt(_0x25c8e3(0x135))/0x1+-parseInt(_0x25c8e3(0x130))/0x2*(parseInt(_0x25c8e3(0x14b))/0x3)+parseInt(_0x25c8e3(0x12e))/0x4+-parseInt(_0x25c8e3(0x129))/0x5+-parseInt(_0x25c8e3(0x143))/0x6*(-parseInt(_0x25c8e3(0x147))/0x7)+-parseInt(_0x25c8e3(0x13a))/0x8+-parseInt(_0x25c8e3(0x12d))/0x9*(-parseInt(_0x25c8e3(0x134))/0xa);if(_0x4c2b5e===_0x4ad33a)break;else _0x2b7bf4['push'](_0x2b7bf4['shift']());}catch(_0x5e991e){_0x2b7bf4['push'](_0x2b7bf4['shift']());}}}(a21_0x315d,0x85a23));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers}from'../../context.js';function a21_0x315d(){const _0x4a6b4d=['projectConfig','\x20Default\x20app\x20changed\x20to\x20\x22','App\x20profile\x20name\x20to\x20remove','Usage:\x20','boolean','6oBedcZ','defaultApp','validation','name','103971rIVisS','\x20config.','keys','apps','3144rPmdQe','global','5061580pMIDxh','Remove\x20an\x20app\x20from\x20config','trim','app','21136806tNwQSH','2768712UIRPjP','args','1082eGSuvl','\x20app\x20remove\x20<name>\x20[--global]','length','object','10PYmvcb','733078SYnCLW','\x22\x20not\x20found.','Use\x20global\x20config\x20scope','Missing\x20app\x20name.','project','1566720gYMrKn','remove','Removed\x20app\x20\x22','\x20Note:\x20app\x20\x22'];a21_0x315d=function(){return _0x4a6b4d;};return a21_0x315d();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'./shared.js';async function validateArgs(_0x584409){const _0xa706aa=a21_0x1633,_0x5e365f=_0x584409[_0xa706aa(0x12f)][0x0]?.[_0xa706aa(0x12b)]();if(!_0x5e365f)throw CliErrors[_0xa706aa(0x145)](_0xa706aa(0x138),_0xa706aa(0x141)+CLI_BIN_NAME+_0xa706aa(0x131));}async function execute(_0x5bde00){const _0x2ea80d=a21_0x1633,_0x257840=_0x5bde00[_0x2ea80d(0x12f)][0x0]?.[_0x2ea80d(0x12b)]();if(!_0x257840)throw CliErrors[_0x2ea80d(0x145)](_0x2ea80d(0x138),'Usage:\x20'+CLI_BIN_NAME+_0x2ea80d(0x131));const _0x34895f=_0x5bde00['bool']('global'),{config:_0x59850d,layers:_0x3965af}=readRawConfigWithLayers(),_0x9da8fd=_0x59850d[_0x2ea80d(0x14a)]??{};if(!_0x9da8fd[_0x257840])throw CliErrors['validation']('App\x20\x22'+_0x257840+'\x22\x20not\x20found.');const _0x4654a4=_0x3965af['globalConfig'][_0x2ea80d(0x14a)]&&typeof _0x3965af['globalConfig'][_0x2ea80d(0x14a)]===_0x2ea80d(0x133)?_0x3965af['globalConfig'][_0x2ea80d(0x14a)]:{},_0x14dbb1=_0x3965af[_0x2ea80d(0x13e)][_0x2ea80d(0x14a)]&&typeof _0x3965af[_0x2ea80d(0x13e)][_0x2ea80d(0x14a)]==='object'?_0x3965af[_0x2ea80d(0x13e)][_0x2ea80d(0x14a)]:{},_0x1f3da8=appDefinedIn(_0x257840,_0x4654a4,_0x14dbb1),_0xd7b1f5=resolveAppScopeForWrite(_0x257840,_0x34895f,_0x3965af),_0x15701c={'global':_0xd7b1f5===_0x2ea80d(0x14c)},_0x3e175d=readConfig(_0x15701c),_0x230d1d=_0x3e175d[_0x2ea80d(0x14a)];if(!_0x230d1d||!_0x230d1d[_0x257840])throw CliErrors[_0x2ea80d(0x145)]('App\x20\x22'+_0x257840+_0x2ea80d(0x136));delete _0x230d1d[_0x257840];let _0x3b25b7='';if(_0x3e175d[_0x2ea80d(0x144)]===_0x257840){const _0x487a3e=Object['keys'](_0x230d1d);_0x3e175d['defaultApp']=_0x487a3e[_0x2ea80d(0x132)]>0x0?_0x487a3e[0x0]:undefined,_0x3e175d['defaultApp']?_0x3b25b7=_0x2ea80d(0x13f)+_0x3e175d[_0x2ea80d(0x144)]+'\x22.':delete _0x3e175d[_0x2ea80d(0x144)];}Object[_0x2ea80d(0x149)](_0x230d1d)['length']===0x0&&(delete _0x3e175d[_0x2ea80d(0x14a)],delete _0x3e175d[_0x2ea80d(0x144)]);writeConfig(_0x3e175d,_0x15701c);const _0x2c45fc=_0x1f3da8==='both'?_0x2ea80d(0x13d)+_0x257840+'\x22\x20still\x20defined\x20in\x20'+(_0xd7b1f5===_0x2ea80d(0x139)?'global':_0x2ea80d(0x139))+_0x2ea80d(0x148):'';return{'ok':!![],'message':_0x2ea80d(0x13c)+_0x257840+'\x22'+scopeLabel(_0x15701c)+'.'+_0x3b25b7+_0x2c45fc};}function a21_0x1633(_0x20b99c,_0x1abb6c){_0x20b99c=_0x20b99c-0x129;const _0x315d77=a21_0x315d();let _0x1633c1=_0x315d77[_0x20b99c];return _0x1633c1;}export const appRemoveDefinition={'service':a21_0x4d0689(0x12c),'command':a21_0x4d0689(0x13b),'description':a21_0x4d0689(0x12a),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a21_0x4d0689(0x146),'description':a21_0x4d0689(0x140),'required':!![]}],'flags':[{'name':a21_0x4d0689(0x14c),'type':a21_0x4d0689(0x142),'description':a21_0x4d0689(0x137),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
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
+ (function(_0x568b68,_0x480820){const _0x1095e5=a22_0x2924,_0x46a89a=_0x568b68();while(!![]){try{const _0x1dcbe9=parseInt(_0x1095e5(0x1fd))/0x1*(-parseInt(_0x1095e5(0x1ef))/0x2)+parseInt(_0x1095e5(0x1f8))/0x3*(-parseInt(_0x1095e5(0x1f1))/0x4)+parseInt(_0x1095e5(0x1fb))/0x5+parseInt(_0x1095e5(0x205))/0x6*(parseInt(_0x1095e5(0x1ec))/0x7)+-parseInt(_0x1095e5(0x1ff))/0x8*(parseInt(_0x1095e5(0x1f5))/0x9)+parseInt(_0x1095e5(0x200))/0xa+parseInt(_0x1095e5(0x20d))/0xb*(parseInt(_0x1095e5(0x1f7))/0xc);if(_0x1dcbe9===_0x480820)break;else _0x46a89a['push'](_0x46a89a['shift']());}catch(_0x2282c2){_0x46a89a['push'](_0x46a89a['shift']());}}}(a22_0x3d44,0x6fa02));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a22_0x2924(_0x213be9,_0x16730e){_0x213be9=_0x213be9-0x1ea;const _0x3d4442=a22_0x3d44();let _0x292467=_0x3d4442[_0x213be9];return _0x292467;}export function resolveAppScopeForWrite(_0x179b70,_0x3cfd06,_0x4f0999){const _0x2c31ce=a22_0x2924;if(_0x3cfd06)return _0x2c31ce(0x1f3);const _0x7c0b4e=_0x4f0999[_0x2c31ce(0x1fc)][_0x2c31ce(0x1ed)]&&typeof _0x4f0999[_0x2c31ce(0x1fc)][_0x2c31ce(0x1ed)]===_0x2c31ce(0x1ea)?_0x4f0999[_0x2c31ce(0x1fc)][_0x2c31ce(0x1ed)]:{},_0x4f6827=_0x4f0999[_0x2c31ce(0x20b)][_0x2c31ce(0x1ed)]&&typeof _0x4f0999[_0x2c31ce(0x20b)][_0x2c31ce(0x1ed)]===_0x2c31ce(0x1ea)?_0x4f0999[_0x2c31ce(0x20b)][_0x2c31ce(0x1ed)]:{};if(Object['prototype'][_0x2c31ce(0x203)]['call'](_0x7c0b4e,_0x179b70))return _0x2c31ce(0x204);if(Object[_0x2c31ce(0x201)][_0x2c31ce(0x203)][_0x2c31ce(0x202)](_0x4f6827,_0x179b70))return'global';return _0x2c31ce(0x204);}export function appDefinedIn(_0x2c107b,_0xe420e3,_0x352f41){const _0x1389ac=a22_0x2924,_0x2ff079=Object['prototype']['hasOwnProperty'][_0x1389ac(0x202)](_0xe420e3,_0x2c107b),_0x5c208a=Object['prototype'][_0x1389ac(0x203)]['call'](_0x352f41,_0x2c107b);if(_0x2ff079&&_0x5c208a)return _0x1389ac(0x20a);if(_0x5c208a)return'project';return _0x1389ac(0x1f3);}export function resolveDefaultAppSource(_0x1df96e){const _0x48e512=a22_0x2924,_0x56ead0=_0x1df96e[_0x48e512(0x1fc)][_0x48e512(0x1ed)]&&typeof _0x1df96e[_0x48e512(0x1fc)][_0x48e512(0x1ed)]===_0x48e512(0x1ea)?_0x1df96e[_0x48e512(0x1fc)]['apps']:{};if(_0x48e512(0x1ee)in _0x1df96e[_0x48e512(0x1fc)])return _0x48e512(0x204);if(Object[_0x48e512(0x20c)](_0x56ead0)[_0x48e512(0x1eb)]>0x0)return _0x48e512(0x204);if(_0x1df96e[_0x48e512(0x20b)]['defaultApp'])return _0x48e512(0x1f3);return null;}export function getConfigPath(_0x4490e7={}){const _0x425ae7=a22_0x2924,_0x2a411b=_0x4490e7[_0x425ae7(0x1f3)]?_0x425ae7(0x1f3):'project';return resolveWriteConfigPath(_0x2a411b);}function a22_0x3d44(){const _0x1b8c82=['hasOwnProperty','project','174FhoXfS','apiDir','riskLevel','env','appcode','both','globalConfig','keys','55bwKCpa','object','length','126147pDdouA','apps','defaultApp','806248ivGTZy','locale','976092FXlhPF','accessKey','global','format','103311JHXgkr','cookie','3341688UAfXtO','3eoZGIB','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','\x20(global)','1486310wrUJfx','projectConfig','2UnZRLa','app','584YPbLLD','1332150eBpxMY','prototype','call'];a22_0x3d44=function(){return _0x1b8c82;};return a22_0x3d44();}export function readConfig(_0x51c5a5={}){return readConfigFile(getConfigPath(_0x51c5a5));}export function writeConfig(_0x2386c1,_0x4a124d={}){writeConfigFile(getConfigPath(_0x4a124d),_0x2386c1);}export function scopeLabel(_0x158300){const _0x2887cf=a22_0x2924;return _0x158300['global']?_0x2887cf(0x1fa):'';}export function migrateLegacySingleApp(_0x511750,_0x17ccde){const _0x4de2bf=a22_0x2924,_0x54a1f1=_0x511750[_0x4de2bf(0x209)]||_0x511750[_0x4de2bf(0x1fe)];if(!_0x54a1f1)return;const _0x2b4366=String(_0x54a1f1);if(_0x2b4366===_0x17ccde)return;const _0x443046=[_0x4de2bf(0x208),_0x4de2bf(0x206),_0x4de2bf(0x1f6),_0x4de2bf(0x1f2),_0x4de2bf(0x1f4),'pageSize',_0x4de2bf(0x207),_0x4de2bf(0x1f0)],_0x5969e4={'appcode':_0x54a1f1};for(const _0x2fd863 of _0x443046){if(_0x511750[_0x2fd863]!=null)_0x5969e4[_0x2fd863]=_0x511750[_0x2fd863];}_0x511750[_0x4de2bf(0x1ed)][_0x2b4366]=_0x5969e4,_0x511750[_0x4de2bf(0x1ee)]=_0x2b4366,delete _0x511750[_0x4de2bf(0x209)],delete _0x511750[_0x4de2bf(0x1fe)],console['log']('Migrated\x20existing\x20app\x20\x22'+_0x2b4366+_0x4de2bf(0x1f9));}
@@ -1 +1 @@
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
+ const a23_0x239e64=a23_0x53b2;(function(_0x45f31f,_0x1a9c00){const _0x30df98=a23_0x53b2,_0x137aa1=_0x45f31f();while(!![]){try{const _0x15fe44=-parseInt(_0x30df98(0x1e8))/0x1+parseInt(_0x30df98(0x1e3))/0x2*(parseInt(_0x30df98(0x1f4))/0x3)+-parseInt(_0x30df98(0x1fa))/0x4*(-parseInt(_0x30df98(0x1de))/0x5)+parseInt(_0x30df98(0x1ee))/0x6+parseInt(_0x30df98(0x1ef))/0x7*(parseInt(_0x30df98(0x1e2))/0x8)+parseInt(_0x30df98(0x1e7))/0x9*(parseInt(_0x30df98(0x1ea))/0xa)+parseInt(_0x30df98(0x1f6))/0xb*(-parseInt(_0x30df98(0x1e9))/0xc);if(_0x15fe44===_0x1a9c00)break;else _0x137aa1['push'](_0x137aa1['shift']());}catch(_0x1397c7){_0x137aa1['push'](_0x137aa1['shift']());}}}(a23_0x5a4a,0x621a8));import{CliErrors}from'../../errors.js';function a23_0x5a4a(){const _0xa5cad6=['Usage:\x20','91398FFJXfV','global','642455SWeoaY','length','\x20app\x20use\x20<name>\x20[--global]','Missing\x20app\x20name.','772xutbYJ','join','Use\x20`','bool','Switch\x20the\x20default\x20app','App\x20\x22','name','apps','9185leeNPF','\x22\x20not\x20found.','appcode','Use\x20global\x20config\x20scope','967912QXZCRo','42ylvDQt','defaultApp','validation','app','171pusgBV','651393gTapAT','132RztQLB','21130fhDxHt','args','boolean','\x20--appcode\x20<code>`\x20first.','1789434ArWuaL','21AuBCeL','\x22\x20(appcode:\x20','Default\x20app\x20set\x20to\x20\x22','trim'];a23_0x5a4a=function(){return _0xa5cad6;};return a23_0x5a4a();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite}from'./shared.js';async function validateArgs(_0x224c74){const _0x2e6425=a23_0x53b2,_0x5c053f=_0x224c74[_0x2e6425(0x1eb)][0x0]?.[_0x2e6425(0x1f2)]();if(!_0x5c053f)throw CliErrors['validation'](_0x2e6425(0x1f9),_0x2e6425(0x1f3)+CLI_BIN_NAME+_0x2e6425(0x1f8));}async function execute(_0x3de035){const _0x3f3ffa=a23_0x53b2,_0x494701=_0x3de035[_0x3f3ffa(0x1eb)][0x0]?.[_0x3f3ffa(0x1f2)]();if(!_0x494701)throw CliErrors[_0x3f3ffa(0x1e5)](_0x3f3ffa(0x1f9),_0x3f3ffa(0x1f3)+CLI_BIN_NAME+_0x3f3ffa(0x1f8));const _0x41dd81=_0x3de035[_0x3f3ffa(0x1fd)](_0x3f3ffa(0x1f5)),{config:_0x1b0a21,layers:_0x5f13ba}=readRawConfigWithLayers(),_0x2a7e1e=_0x1b0a21[_0x3f3ffa(0x201)]??{};if(!_0x2a7e1e[_0x494701]){const _0x15e1da=Object['keys'](_0x2a7e1e),_0x31d3e4=_0x15e1da[_0x3f3ffa(0x1f7)]===0x0?_0x3f3ffa(0x1fc)+CLI_BIN_NAME+'\x20app\x20add\x20'+_0x494701+_0x3f3ffa(0x1ed):'Available:\x20'+_0x15e1da[_0x3f3ffa(0x1fb)](',\x20');throw CliErrors[_0x3f3ffa(0x1e5)](_0x3f3ffa(0x1ff)+_0x494701+_0x3f3ffa(0x1df),_0x31d3e4);}const _0x23ce62=resolveAppScopeForWrite(_0x494701,_0x41dd81,_0x5f13ba),_0x185d1c={'global':_0x23ce62===_0x3f3ffa(0x1f5)},_0x5da4b4=readConfig(_0x185d1c);return _0x5da4b4[_0x3f3ffa(0x1e4)]=_0x494701,writeConfig(_0x5da4b4,_0x185d1c),{'ok':!![],'message':_0x3f3ffa(0x1f1)+_0x494701+_0x3f3ffa(0x1f0)+_0x2a7e1e[_0x494701][_0x3f3ffa(0x1e0)]+')'+scopeLabel(_0x185d1c)};}function a23_0x53b2(_0x21ec34,_0x2c6638){_0x21ec34=_0x21ec34-0x1de;const _0x5a4a1b=a23_0x5a4a();let _0x53b231=_0x5a4a1b[_0x21ec34];return _0x53b231;}export const appUseDefinition={'service':a23_0x239e64(0x1e6),'command':'use','description':a23_0x239e64(0x1fe),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a23_0x239e64(0x200),'description':'App\x20profile\x20name\x20to\x20activate','required':!![]}],'flags':[{'name':a23_0x239e64(0x1f5),'type':a23_0x239e64(0x1ec),'description':a23_0x239e64(0x1e1),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
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
+ function a24_0xce23(){const _0x1d8823=['✓\x20Logged\x20out','log','30540HtGLAm','5584072LSIBhU','../../auth/auth-server-ui.js','3076632ZvEQAW','9713403fUvMqX','1553zUtWyb','252190qHLWme','583rTNStR','1218kzGRng','5rpXyex','login','write','!\x20Not\x20logged\x20in','32067zgjWUw','1906gtRIoY'];a24_0xce23=function(){return _0x1d8823;};return a24_0xce23();}const a24_0x592572=a24_0x2eb9;function a24_0x2eb9(_0x179f84,_0x2106b8){_0x179f84=_0x179f84-0x1ee;const _0xce23df=a24_0xce23();let _0x2eb9f3=_0xce23df[_0x179f84];return _0x2eb9f3;}(function(_0x12c303,_0x116e02){const _0x442eaf=a24_0x2eb9,_0x3d65a7=_0x12c303();while(!![]){try{const _0x4c7c50=parseInt(_0x442eaf(0x1fa))/0x1*(parseInt(_0x442eaf(0x1f2))/0x2)+parseInt(_0x442eaf(0x1f5))/0x3+parseInt(_0x442eaf(0x1f8))/0x4*(parseInt(_0x442eaf(0x1fe))/0x5)+-parseInt(_0x442eaf(0x1fd))/0x6*(parseInt(_0x442eaf(0x1f1))/0x7)+-parseInt(_0x442eaf(0x1f6))/0x8+-parseInt(_0x442eaf(0x1f9))/0x9+-parseInt(_0x442eaf(0x1fb))/0xa*(-parseInt(_0x442eaf(0x1fc))/0xb);if(_0x4c7c50===_0x116e02)break;else _0x3d65a7['push'](_0x3d65a7['shift']());}catch(_0x46e650){_0x3d65a7['push'](_0x3d65a7['shift']());}}}(a24_0xce23,0xd8f9f));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a24_0x592572(0x1ee),'description':'Login\x20via\x20browser','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x61be92){const _0x29881e=a24_0x592572,{runAuthServer:_0x2adf66}=await import(_0x29881e(0x1f7));return await _0x2adf66(),{'ok':!![]};}},{'service':'auth','command':'logout','description':'Clear\x20login\x20session','risk':a24_0x592572(0x1ef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x28f5eb){const _0x5eea47=a24_0x592572;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5eea47(0x1f4)](_0x5eea47(0x1f3))):console['log'](_0x5eea47(0x1f0)),{'ok':!![]};}}];
@@ -1 +1 @@
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
+ const a25_0xdd4b87=a25_0x4e0f;(function(_0x11fff9,_0x5eee7b){const _0x461b89=a25_0x4e0f,_0x44be59=_0x11fff9();while(!![]){try{const _0x1c2199=-parseInt(_0x461b89(0xca))/0x1*(parseInt(_0x461b89(0xb8))/0x2)+-parseInt(_0x461b89(0xa8))/0x3*(-parseInt(_0x461b89(0xc9))/0x4)+-parseInt(_0x461b89(0xad))/0x5*(parseInt(_0x461b89(0xb1))/0x6)+parseInt(_0x461b89(0xbf))/0x7*(-parseInt(_0x461b89(0xa9))/0x8)+parseInt(_0x461b89(0x9c))/0x9+-parseInt(_0x461b89(0x9b))/0xa*(-parseInt(_0x461b89(0xb6))/0xb)+parseInt(_0x461b89(0xaf))/0xc;if(_0x1c2199===_0x5eee7b)break;else _0x44be59['push'](_0x44be59['shift']());}catch(_0x2eb8b4){_0x44be59['push'](_0x44be59['shift']());}}}(a25_0x4823,0xb7d62));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a25_0x4e0f(_0x586679,_0x2613b7){_0x586679=_0x586679-0x9b;const _0x482320=a25_0x4823();let _0x4e0f86=_0x482320[_0x586679];return _0x4e0f86;}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a25_0x4823(){const _0x5879b9=['lockFilePath','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','42581fUKJEq','lastSync','trashedTo','Function\x20not\x20found:\x20','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','scriptsRoot','POST','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','BFF\x20lock\x20file\x20not\x20found.','functions','339632qZlKlL','4483DJPlcK','split','\x20\x20-\x20','20sIDhuq','5001057yOflto','delete','<timestamp>','filter','toISOString','string','Would\x20delete\x20','remoteId','appCode','scriptsRootDir','map','Deleted\x20','45CrPvAy','1016xMKhPl','validation','\x20(local\x20file\x20moved\x20to\x20trash)','/api/management/library/scripts/delete','70tKCyon','No\x20lock\x20entry\x20found\x20for\x20\x22','18782640oKWDBK','replace','517146vSszfL','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','bff','str','high-risk-write','746185CQHkUC','target','356piaDKG','trashDir','length','projectRoot','find'];a25_0x4823=function(){return _0x5879b9;};return a25_0x4823();}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':a25_0xdd4b87(0xb3),'command':a25_0xdd4b87(0x9d),'description':a25_0xdd4b87(0xc3),'risk':a25_0xdd4b87(0xb5),'flags':[{'name':a25_0xdd4b87(0xb7),'type':a25_0xdd4b87(0xa1),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x3b930e){const _0x2cd9c6=a25_0xdd4b87,_0x32372c=loadBffProjectConfig(_0x3b930e[_0x2cd9c6(0xa4)]),_0x2b25ad=await readBffLockFile(_0x32372c['lockFilePath']);if(!_0x2b25ad)throw CliErrors[_0x2cd9c6(0xaa)](_0x2cd9c6(0xb2));},async 'dryRun'(_0x5a2bae){const _0x4c727d=a25_0xdd4b87,_0x1c52de=loadBffProjectConfig(_0x5a2bae['appCode']),_0x99d7cc=await readBffLockFile(_0x1c52de[_0x4c727d(0xbd)]);if(!_0x99d7cc)throw CliErrors[_0x4c727d(0xaa)]('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x130563}=ensureLockScope(_0x99d7cc,_0x5a2bae['appCode'],_0x1c52de[_0x4c727d(0xc4)],_0x4c727d(0x9d)),_0x3747bb=_0x5a2bae['str'](_0x4c727d(0xb7)),_0x561ff8=Object['keys'](_0x130563[_0x4c727d(0xc8)]),_0x4a278a=resolveDeleteTarget(_0x3747bb,_0x561ff8),_0x115f6b=_0x130563[_0x4c727d(0xc8)][_0x4a278a];if(!_0x115f6b)throw CliErrors[_0x4c727d(0xaa)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x4a278a+'\x22.');const _0x1980a8=resolveLocalFilePathFromLockKey(_0x1c52de,_0x4a278a),_0x4c6eb6=relative(_0x1c52de[_0x4c727d(0xbb)],_0x1980a8),_0xd34e6d=join(_0x1c52de[_0x4c727d(0xb9)],_0x4c727d(0x9e),_0x4c6eb6);return{'method':_0x4c727d(0xc5),'url':_0x4c727d(0xac),'body':{'appCode':_0x5a2bae[_0x4c727d(0xa4)],'target':_0x4a278a,'remoteId':_0x115f6b[_0x4c727d(0xa3)],'localFilePath':_0x1980a8,'trashedPath':_0xd34e6d},'description':_0x4c727d(0xa2)+_0x4a278a+_0x4c727d(0xc6)};},async 'execute'(_0x201752){const _0x230981=a25_0xdd4b87,_0x3fc93b=loadBffProjectConfig(_0x201752[_0x230981(0xa4)]),_0x27d1aa=await readBffLockFile(_0x3fc93b[_0x230981(0xbd)]);if(!_0x27d1aa)throw CliErrors['validation'](_0x230981(0xc7));const {lockData:_0x5ab009,appLock:_0x218af3}=ensureLockScope(_0x27d1aa,_0x201752['appCode'],_0x3fc93b['scriptsRoot'],_0x230981(0x9d)),_0x1aa66e=_0x201752[_0x230981(0xb4)](_0x230981(0xb7)),_0x4076d6=Object['keys'](_0x218af3[_0x230981(0xc8)]),_0x521fb9=resolveDeleteTarget(_0x1aa66e,_0x4076d6),_0xf98b47=_0x218af3[_0x230981(0xc8)][_0x521fb9];if(!_0xf98b47)throw CliErrors[_0x230981(0xaa)](_0x230981(0xae)+_0x521fb9+'\x22.');await deleteBffScript(_0xf98b47[_0x230981(0xa3)]),delete _0x218af3[_0x230981(0xc8)][_0x521fb9],_0x218af3[_0x230981(0xc0)]=new Date()[_0x230981(0xa0)](),await writeBffLockFile(_0x3fc93b['lockFilePath'],_0x5ab009);const _0x33d944=resolveLocalFilePathFromLockKey(_0x3fc93b,_0x521fb9);let _0x555cf4;await fileExists(_0x33d944)&&(_0x555cf4=await moveToTrash(_0x3fc93b[_0x230981(0xbb)],_0x3fc93b[_0x230981(0xb9)],_0x33d944),await cleanupEmptyDirectories(dirname(_0x33d944),_0x3fc93b[_0x230981(0xa5)]));const _0x381f4a={'deleted':_0x521fb9,'remoteId':_0xf98b47[_0x230981(0xa3)]};if(_0x555cf4)_0x381f4a[_0x230981(0xc1)]=_0x555cf4;return{'ok':!![],'data':_0x381f4a,'message':_0x230981(0xa7)+_0x521fb9+(_0x555cf4?_0x230981(0xab):'')};}};function resolveDeleteTarget(_0x28528e,_0x5a5715){const _0x26261e=a25_0xdd4b87;if(_0x28528e['includes']('/')){const _0x3c0c4f=_0x5a5715[_0x26261e(0xbc)](_0x54546e=>_0x54546e===_0x28528e);if(!_0x3c0c4f)throw CliErrors['validation'](_0x26261e(0xc2)+_0x28528e);return _0x3c0c4f;}const _0x2bc858=_0x5a5715[_0x26261e(0x9f)](_0x244404=>_0x244404[_0x26261e(0xcb)]('/')['at'](-0x1)===_0x28528e);if(_0x2bc858[_0x26261e(0xba)]===0x0)throw CliErrors[_0x26261e(0xaa)](_0x26261e(0xc2)+_0x28528e);if(_0x2bc858[_0x26261e(0xba)]>0x1)throw CliErrors[_0x26261e(0xaa)]('Multiple\x20functions\x20match\x20\x22'+_0x28528e+_0x26261e(0xbe)+_0x2bc858[_0x26261e(0xa6)](_0x233d51=>_0x26261e(0xcc)+_0x233d51)['join']('\x0a'));return _0x2bc858[0x0];}async function moveToTrash(_0x1d162a,_0x3e53e5,_0x32531b){const _0x542cf7=a25_0xdd4b87,_0x601d96=new Date()[_0x542cf7(0xa0)]()[_0x542cf7(0xb0)](/[:.]/g,'-'),_0x269dc1=relative(_0x1d162a,_0x32531b),_0x49d723=join(_0x3e53e5,_0x601d96,_0x269dc1);return await mkdir(dirname(_0x49d723),{'recursive':!![]}),await rename(_0x32531b,_0x49d723),_0x49d723;}async function cleanupEmptyDirectories(_0x5bb919,_0x1058a0){const _0x544ff2=a25_0xdd4b87;let _0x2c9226=resolve(_0x5bb919);const _0x49c7a5=resolve(_0x1058a0);while(_0x2c9226['startsWith'](''+_0x49c7a5+sep)||_0x2c9226===_0x49c7a5){if(_0x2c9226===_0x49c7a5)return;try{const _0x17c772=await readdir(_0x2c9226);if(_0x17c772[_0x544ff2(0xba)]>0x0)return;await rmdir(_0x2c9226);}catch{return;}_0x2c9226=dirname(_0x2c9226);}}
@@ -1 +1 @@
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
+ const a26_0x107f8d=a26_0x1bac;function a26_0x1bac(_0x194b92,_0xc93a1d){_0x194b92=_0x194b92-0x82;const _0x121997=a26_0x1219();let _0x1bacb6=_0x121997[_0x194b92];return _0x1bacb6;}(function(_0x474ee0,_0x4abbff){const _0x316c3d=a26_0x1bac,_0x4c841a=_0x474ee0();while(!![]){try{const _0x58ddc3=-parseInt(_0x316c3d(0x85))/0x1+-parseInt(_0x316c3d(0x96))/0x2*(parseInt(_0x316c3d(0x91))/0x3)+-parseInt(_0x316c3d(0x84))/0x4*(parseInt(_0x316c3d(0x8b))/0x5)+-parseInt(_0x316c3d(0x86))/0x6*(-parseInt(_0x316c3d(0x8c))/0x7)+parseInt(_0x316c3d(0x8a))/0x8+parseInt(_0x316c3d(0x94))/0x9+-parseInt(_0x316c3d(0x83))/0xa;if(_0x58ddc3===_0x4abbff)break;else _0x4c841a['push'](_0x4c841a['shift']());}catch(_0xa4cb9b){_0x4c841a['push'](_0x4c841a['shift']());}}}(a26_0x1219,0x71769));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a26_0x107f8d(0x92),'command':a26_0x107f8d(0x89),'description':a26_0x107f8d(0x8f),'risk':'read','flags':[{'name':'id','type':'number','required':!![],'description':a26_0x107f8d(0x95)},{'name':a26_0x107f8d(0x88),'type':'boolean','description':a26_0x107f8d(0x87)}],async 'execute'(_0x42c9d2){const _0x43a3aa=a26_0x107f8d,_0x460eb7=await getBffScriptInfo(_0x42c9d2['num']('id')),_0x1f5913=_0x42c9d2['bool'](_0x43a3aa(0x88));if(_0x1f5913)return{'ok':!![],'data':_0x460eb7};return{'ok':!![],'data':{'id':_0x460eb7['id'],'appCode':_0x460eb7[_0x43a3aa(0x90)],'scriptType':_0x460eb7[_0x43a3aa(0x8e)],'description':_0x460eb7[_0x43a3aa(0x82)]||_0x43a3aa(0x93),'createdTime':_0x460eb7[_0x43a3aa(0x8d)]??'','updatedTime':_0x460eb7['updatedTime']??'','scriptContent':_0x460eb7[_0x43a3aa(0x97)]??''}};}};function a26_0x1219(){const _0x2ee521=['2393155QDoDPx','1057QaeAhr','createdTime','scriptType','Get\x20BFF\x20script\x20details\x20by\x20ID','appCode','1191RFDLpC','bff','(none)','7325199nBWjeg','Script\x20ID','3058kgIuIA','scriptContent','description','263480oKJGHg','4sXNGem','323764dQtgBj','34710pFkEIH','Return\x20full\x20raw\x20script\x20object','verbose','detail','1704440XHesci'];a26_0x1219=function(){return _0x2ee521;};return a26_0x1219();}
@@ -1 +1 @@
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
+ (function(_0x40df0e,_0x3ca057){const _0x41a38e=a27_0x3c89,_0x3aa9e2=_0x40df0e();while(!![]){try{const _0xd5feca=parseInt(_0x41a38e(0x7d))/0x1*(-parseInt(_0x41a38e(0x7b))/0x2)+parseInt(_0x41a38e(0x7a))/0x3+parseInt(_0x41a38e(0x7e))/0x4*(parseInt(_0x41a38e(0x79))/0x5)+parseInt(_0x41a38e(0x7c))/0x6*(parseInt(_0x41a38e(0x82))/0x7)+-parseInt(_0x41a38e(0x81))/0x8*(parseInt(_0x41a38e(0x78))/0x9)+parseInt(_0x41a38e(0x7f))/0xa+parseInt(_0x41a38e(0x80))/0xb;if(_0xd5feca===_0x3ca057)break;else _0x3aa9e2['push'](_0x3aa9e2['shift']());}catch(_0x7f9d50){_0x3aa9e2['push'](_0x3aa9e2['shift']());}}}(a27_0x2074,0xb24e8));import{bffList}from'./list.js';import{bffDetail}from'./detail.js';import{bffStatus}from'./status.js';function a27_0x3c89(_0x190f8c,_0x2d7a3f){_0x190f8c=_0x190f8c-0x78;const _0x20744d=a27_0x2074();let _0x3c89d8=_0x20744d[_0x190f8c];return _0x3c89d8;}import{bffNew}from'./new.js';import{bffPush}from'./push.js';import{bffPull}from'./pull.js';import{bffDelete}from'./delete.js';function a27_0x2074(){const _0xa43cd7=['10768560OudALy','3274073XncyIU','213736HFUcur','4952962jTPKQj','288UIMPpe','255AlEtIw','1900599ZlKBxR','484jDvVuB','6qqHPwL','5826VKxWDY','21928IpgqEp'];a27_0x2074=function(){return _0xa43cd7;};return a27_0x2074();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
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
+ const a28_0x5714ef=a28_0x4251;(function(_0x277262,_0x185a64){const _0x524cea=a28_0x4251,_0x40bba4=_0x277262();while(!![]){try{const _0x2d5c4b=-parseInt(_0x524cea(0x1b2))/0x1+-parseInt(_0x524cea(0x1be))/0x2*(parseInt(_0x524cea(0x1b9))/0x3)+-parseInt(_0x524cea(0x1bc))/0x4+-parseInt(_0x524cea(0x1c5))/0x5*(parseInt(_0x524cea(0x1bb))/0x6)+-parseInt(_0x524cea(0x1c8))/0x7+parseInt(_0x524cea(0x1c2))/0x8+parseInt(_0x524cea(0x1c7))/0x9;if(_0x2d5c4b===_0x185a64)break;else _0x40bba4['push'](_0x40bba4['shift']());}catch(_0x5aab61){_0x40bba4['push'](_0x40bba4['shift']());}}}(a28_0x4125,0x5f9dc));function a28_0x4125(){const _0x977129=['14829921nURXla','1674120xAHxsy','name','appCode','List\x20BFF\x20scripts','404653ipiKAi','description','COMMON','Script\x20type\x20filter','map','verbose','(unnamed)','345BvgFdA','read','1624908VYzrwA','2745504iSIkwF','string','3698zdJgRW','ENDPOINT','length','Filter\x20by\x20script\x20name','4460136zkiSSb','boolean','list','5GVqWBD','type'];a28_0x4125=function(){return _0x977129;};return a28_0x4125();}import{listBffScripts}from'../../core/api-client.js';function a28_0x4251(_0x22aef1,_0x2a62d7){_0x22aef1=_0x22aef1-0x1b0;const _0x412565=a28_0x4125();let _0x42515e=_0x412565[_0x22aef1];return _0x42515e;}export const bffList={'service':'bff','command':a28_0x5714ef(0x1c4),'description':a28_0x5714ef(0x1b1),'risk':a28_0x5714ef(0x1ba),'flags':[{'name':'type','type':'string','description':a28_0x5714ef(0x1b5),'default':a28_0x5714ef(0x1bf),'enum':[a28_0x5714ef(0x1bf),a28_0x5714ef(0x1b4)]},{'name':a28_0x5714ef(0x1c9),'type':a28_0x5714ef(0x1bd),'description':a28_0x5714ef(0x1c1)},{'name':a28_0x5714ef(0x1b7),'type':a28_0x5714ef(0x1c3),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x17f8a1){const _0x2e8770=a28_0x5714ef,_0x2c3e95=await listBffScripts(_0x17f8a1[_0x2e8770(0x1b0)],_0x17f8a1['str'](_0x2e8770(0x1c6)),{'scriptName':_0x17f8a1['str'](_0x2e8770(0x1c9))||undefined}),_0x35d335=_0x17f8a1['bool'](_0x2e8770(0x1b7));return{'ok':!![],'data':_0x35d335?_0x2c3e95:_0x2c3e95[_0x2e8770(0x1b6)](_0x2e15c2=>({'id':_0x2e15c2['id'],'functionName':_0x2e15c2['functionName']??'','description':_0x2e15c2[_0x2e8770(0x1b3)]||_0x2e8770(0x1b8),'scriptType':_0x2e15c2['scriptType']})),'message':_0x2c3e95[_0x2e8770(0x1c0)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
@@ -1 +1 @@
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
+ const a29_0x148bc3=a29_0x10df;(function(_0x1be716,_0xc079e4){const _0x1d601d=a29_0x10df,_0x32351f=_0x1be716();while(!![]){try{const _0x5afedf=parseInt(_0x1d601d(0xcc))/0x1+-parseInt(_0x1d601d(0xec))/0x2*(parseInt(_0x1d601d(0x10b))/0x3)+-parseInt(_0x1d601d(0x107))/0x4*(-parseInt(_0x1d601d(0xed))/0x5)+parseInt(_0x1d601d(0xda))/0x6*(-parseInt(_0x1d601d(0xf4))/0x7)+-parseInt(_0x1d601d(0x10a))/0x8*(parseInt(_0x1d601d(0xd6))/0x9)+-parseInt(_0x1d601d(0xfe))/0xa*(parseInt(_0x1d601d(0xf1))/0xb)+parseInt(_0x1d601d(0x110))/0xc;if(_0x5afedf===_0xc079e4)break;else _0x32351f['push'](_0x32351f['shift']());}catch(_0x3ffd3c){_0x32351f['push'](_0x32351f['shift']());}}}(a29_0x5b04,0xc45ed));import{createInterface}from'node:readline';function a29_0x5b04(){const _0x177235=['226900onhBds','apiDir','ENDPOINT','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','No\x20datasets\x20found\x20for\x20this\x20app.','Operation\x20type\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','stderr','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','\x0a\x20*\x20[脚本名称]\x20','279HfjfWI','map','validation','after','11370lfTxsz','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','operationType','Script\x20type','datasetCode','Select\x20dataset:','stdin','string','includes','.js','new','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','tableName','functionNode','Invalid\x20function\x20name\x20\x22','before','2FNpZek','5084265WiaPAS','HOOK\x20requires\x20alias/operation/node\x20options.','No\x20api.ts\x20found.\x20Run\x20`','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','33eGvAys','code','Trigger\x20node\x20(HOOK\x20only)','5012mxpcyU','HOOK','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','write','Invalid\x20dataset\x20selection.','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','name','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','/endpoint/','length','3848030wjtqbW','scriptsRootDir','alias','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Function\x20name\x20(valid\x20JS\x20identifier)','datasetcode','str','nonInteractive','4UHoASK','function-node','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','210928XfvqWc','1794189zwrSaQ','\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','trim','\x0a\x20*\x20[触发节点]\x20','Select\x20trigger\x20node:','41846616LYiWwZ','appCode','keys','operation-type','find','join','.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','Dataset\x20not\x20found\x20for\x20code\x20\x22','description','entries','\x22\x20not\x20found.\x20','type','bff','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.'];a29_0x5b04=function(){return _0x177235;};return a29_0x5b04();}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';function a29_0x10df(_0x44a897,_0x54027a){_0x44a897=_0x44a897-0xc6;const _0x5b046b=a29_0x5b04();let _0x10dfff=_0x5b046b[_0x44a897];return _0x10dfff;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':a29_0x148bc3(0xca),'command':a29_0x148bc3(0xe6),'description':a29_0x148bc3(0xcf),'risk':a29_0x148bc3(0xf7),'flags':[{'name':'type','type':'string','required':!![],'enum':['COMMON',a29_0x148bc3(0xce),a29_0x148bc3(0xf5)],'description':a29_0x148bc3(0xdf)},{'name':a29_0x148bc3(0xfa),'type':a29_0x148bc3(0xe3),'required':!![],'description':a29_0x148bc3(0x103)},{'name':'description','type':'string','description':'Script\x20description'},{'name':a29_0x148bc3(0x100),'type':a29_0x148bc3(0xe3),'description':a29_0x148bc3(0xf9)},{'name':a29_0x148bc3(0x104),'type':'string','description':a29_0x148bc3(0xdd)},{'name':a29_0x148bc3(0x113),'type':a29_0x148bc3(0xe3),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a29_0x148bc3(0x108),'type':a29_0x148bc3(0xe3),'description':a29_0x148bc3(0xf3),'enum':['before',a29_0x148bc3(0xd9)]}],async 'validate'(_0x188845){const _0x5f11ad=a29_0x148bc3,_0x1afbef=_0x188845[_0x5f11ad(0x105)]('name');if(!isValidBffFunctionName(_0x1afbef))throw CliErrors[_0x5f11ad(0xd8)](_0x5f11ad(0xea)+_0x1afbef+_0x5f11ad(0x101));},async 'execute'(_0x583fd7){const _0x3d93fb=a29_0x148bc3,_0x55aaf4=loadBffProjectConfig(_0x583fd7[_0x3d93fb(0x111)]),_0x34251a=_0x583fd7['str'](_0x3d93fb(0xc9)),_0x4711b4=_0x583fd7['str'](_0x3d93fb(0xfa)),_0x57958f=_0x583fd7[_0x3d93fb(0x105)](_0x3d93fb(0xc6))||undefined,_0x186a4e=_0x34251a==='HOOK'?await resolveHookOptions(_0x55aaf4,_0x583fd7):undefined,_0x50daf8=buildFilePath(_0x55aaf4,_0x34251a,_0x4711b4,_0x186a4e);if(await fileExists(_0x50daf8))throw CliErrors[_0x3d93fb(0xd8)]('File\x20already\x20exists:\x20'+_0x50daf8);await mkdir(dirname(_0x50daf8),{'recursive':!![]});const _0x4e6716=generateTemplate(_0x34251a,_0x4711b4,_0x583fd7[_0x3d93fb(0x111)],_0x57958f,_0x186a4e);await writeFile(_0x50daf8,_0x4e6716,'utf8');const _0x54293a={'type':_0x34251a,'name':_0x4711b4,'path':_0x50daf8};if(_0x57958f)_0x54293a[_0x3d93fb(0xc6)]=_0x57958f;if(_0x186a4e){if(_0x186a4e['alias'])_0x54293a[_0x3d93fb(0x100)]=_0x186a4e['alias'];_0x54293a['datasetCode']=_0x186a4e[_0x3d93fb(0xe0)],_0x54293a[_0x3d93fb(0xde)]=_0x186a4e[_0x3d93fb(0xde)],_0x54293a[_0x3d93fb(0xe9)]=_0x186a4e['functionNode'];}return{'ok':!![],'data':_0x54293a,'message':'Created\x20'+_0x34251a+'\x20function:\x20'+_0x4711b4};}};async function resolveHookOptions(_0x42d99f,_0x36a520){const _0x43d02c=a29_0x148bc3,_0x5520a4=loadAliasMap(_0x36a520[_0x43d02c(0xcd)],undefined,resolveApiFilePath(_0x36a520['apiDir'],_0x36a520[_0x43d02c(0x111)])),_0x5bfa77=_0x5520a4[_0x43d02c(0xfd)]>0x0;let _0xffaa8c,_0x2b92ba,_0x404019;const _0x423373=_0x36a520[_0x43d02c(0x105)](_0x43d02c(0x100)),_0x24f551=_0x36a520[_0x43d02c(0x105)](_0x43d02c(0x104));if(_0x423373){const _0x41a2b6=resolveAlias(_0x36a520[_0x43d02c(0xcd)],_0x423373,undefined,resolveApiFilePath(_0x36a520[_0x43d02c(0xcd)],_0x36a520['appCode']));if(!_0x41a2b6){const _0x2c2973=_0x5bfa77?'Available\x20aliases:\x20'+_0x5520a4[_0x43d02c(0xd7)](_0x4d8f28=>_0x4d8f28['alias'])[_0x43d02c(0x115)](',\x20'):_0x43d02c(0xef)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x43d02c(0xd8)]('Alias\x20\x22'+_0x423373+_0x43d02c(0xc8)+_0x2c2973);}_0xffaa8c=_0x423373,_0x2b92ba=_0x41a2b6;}else{if(_0x24f551){_0x2b92ba=_0x24f551;const _0x598c53=_0x5520a4[_0x43d02c(0x114)](_0x3b393a=>_0x3b393a[_0x43d02c(0xe0)]===_0x24f551);_0xffaa8c=_0x598c53?.[_0x43d02c(0x100)];}else{if(_0x36a520[_0x43d02c(0x106)])throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0x102));else{if(_0x5bfa77){const _0x5be4df=_0x5520a4['map'](_0x2aebb9=>_0x2aebb9['alias']+'\x20('+_0x2aebb9[_0x43d02c(0xe8)]+')'),_0x34b7de=await promptSelect(_0x43d02c(0xe1),_0x5be4df),_0x4fe32e=_0x5520a4[_0x34b7de];if(!_0x4fe32e)throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0xf8));_0xffaa8c=_0x4fe32e[_0x43d02c(0x100)],_0x2b92ba=_0x4fe32e[_0x43d02c(0xe0)];}else{const _0x4e704a=await listDatasets(_0x36a520[_0x43d02c(0x111)]);if(_0x4e704a[_0x43d02c(0xfd)]===0x0)throw CliErrors['validation'](_0x43d02c(0xd0));const _0x58aaf7=_0x4e704a[_0x43d02c(0xd7)](_0x847a0b=>_0x847a0b[_0x43d02c(0xfa)]+'\x20('+_0x847a0b['code']+')'),_0x552ba8=await promptSelect(_0x43d02c(0xe1),_0x58aaf7),_0x249089=_0x4e704a[_0x552ba8];if(!_0x249089)throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0xf8));_0x2b92ba=_0x249089[_0x43d02c(0xf2)],_0xffaa8c=undefined;}}}}const _0xb843ee=await listDatasets(_0x36a520[_0x43d02c(0x111)]),_0x1e37b1=_0xb843ee['find'](_0x30bbe1=>_0x30bbe1[_0x43d02c(0xf2)]===_0x2b92ba);if(!_0x1e37b1)throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0x117)+_0x2b92ba+'\x22.\x20'+(_0xffaa8c?_0x43d02c(0xdc)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x404019=_0x1e37b1['id'];const _0x27482a=_0xffaa8c??_0x2b92ba,_0x4334b4=await listBffDatasetOperations(_0x36a520[_0x43d02c(0x111)],_0x404019),_0x31af5f=_0x4334b4?Object[_0x43d02c(0x112)](_0x4334b4):[];if(_0x31af5f[_0x43d02c(0xfd)]===0x0)throw CliErrors['validation']('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x27482a+'.');let _0x243614;const _0x552778=_0x36a520[_0x43d02c(0x105)]('operation-type');if(_0x552778){if(!_0x31af5f[_0x43d02c(0xe4)](_0x552778))throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0xd1)+_0x552778+_0x43d02c(0xd2)+_0x27482a+'.\x20'+('Available:\x20'+_0x31af5f[_0x43d02c(0x115)](',\x20')));_0x243614=_0x552778;}else{if(_0x36a520[_0x43d02c(0x106)])throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0x109));const _0x4cff18=await promptSelect('Select\x20operation\x20type:',_0x31af5f);_0x243614=_0x31af5f[_0x4cff18]??_0x31af5f[0x0];}let _0x5929b2=normalizeHookFunctionNode(_0x36a520['str'](_0x43d02c(0x108)));if(!_0x5929b2){if(_0x36a520[_0x43d02c(0x105)]('function-node'))throw CliErrors['validation'](_0x43d02c(0xe7));if(_0x36a520[_0x43d02c(0x106)])throw CliErrors[_0x43d02c(0xd8)](_0x43d02c(0xcb));const _0x19afa8=await promptSelect(_0x43d02c(0x10f),['before',_0x43d02c(0xd9)]);_0x5929b2=[_0x43d02c(0xeb),_0x43d02c(0xd9)][_0x19afa8]??'before';}return{'alias':_0xffaa8c,'datasetCode':_0x2b92ba,'datasetId':_0x404019,'operationType':_0x243614,'functionNode':_0x5929b2};}async function promptSelect(_0x48615d,_0x899b1e){const _0xe4d234=a29_0x148bc3;if(_0x899b1e[_0xe4d234(0xfd)]===0x1)return 0x0;for(const [_0x6b6e0a,_0x1e7799]of _0x899b1e[_0xe4d234(0xc7)]()){process[_0xe4d234(0xd3)][_0xe4d234(0xf7)]('\x20\x20'+(_0x6b6e0a+0x1)+'.\x20'+_0x1e7799+'\x0a');}const _0x1019ad=createInterface({'input':process[_0xe4d234(0xe2)],'output':process[_0xe4d234(0xd3)]});while(!![]){const _0x20f416=await new Promise(_0x5cbc89=>{_0x1019ad['question'](_0x48615d+'\x20',_0x5cbc89);}),_0x1de874=Number['parseInt'](_0x20f416[_0xe4d234(0x10d)](),0xa);if(Number['isInteger'](_0x1de874)&&_0x1de874>=0x1&&_0x1de874<=_0x899b1e[_0xe4d234(0xfd)])return _0x1019ad['close'](),_0x1de874-0x1;process[_0xe4d234(0xd3)]['write'](_0xe4d234(0xf6)+_0x899b1e[_0xe4d234(0xfd)]+'.\x0a');}}function buildFilePath(_0x42dc64,_0x1d3d95,_0x2628f9,_0x2bd089){const _0x5c257c=a29_0x148bc3;if(_0x1d3d95===_0x5c257c(0xf5)){if(!_0x2bd089)throw CliErrors[_0x5c257c(0xd8)](_0x5c257c(0xee));const _0x2bb0dd=_0x2bd089[_0x5c257c(0x100)]??_0x2bd089['datasetCode'];return join(_0x42dc64['scriptsRootDir'],_0x5c257c(0xf5),_0x2bb0dd,_0x2bd089['operationType'],_0x2bd089['functionNode'],_0x2628f9+_0x5c257c(0xe5));}return join(_0x42dc64[_0x5c257c(0xff)],_0x1d3d95,_0x2628f9+'.js');}export function generateTemplate(_0x25ea3c,_0x8cb2b3,_0x40d4cb,_0x1b4c16,_0x48af37){const _0x3f58ca=a29_0x148bc3,_0x17bf82=_0x1b4c16?.[_0x3f58ca(0x10d)]()||'TODO:\x20add\x20script\x20description';if(_0x25ea3c==='COMMON')return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x17bf82+_0x3f58ca(0xd5)+_0x8cb2b3+_0x3f58ca(0xd4)+_0x8cb2b3+_0x3f58ca(0x116)+_0x8cb2b3+_0x3f58ca(0xfb);if(_0x25ea3c===_0x3f58ca(0xce))return _0x3f58ca(0xf0)+_0x17bf82+_0x3f58ca(0xdb)+_0x40d4cb+_0x3f58ca(0xfc)+_0x8cb2b3+_0x3f58ca(0x10c)+_0x8cb2b3+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x48af37)throw CliErrors['validation']('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x17bf82+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x40d4cb+'/'+_0x48af37[_0x3f58ca(0xe0)]+'/'+_0x48af37[_0x3f58ca(0xde)]+_0x3f58ca(0x10e)+_0x48af37[_0x3f58ca(0xe9)]+'\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'+_0x8cb2b3+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
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
+ const a30_0x222e80=a30_0x5b78;(function(_0x305bef,_0x233707){const _0x298010=a30_0x5b78,_0x3ee075=_0x305bef();while(!![]){try{const _0xebeec1=parseInt(_0x298010(0x1a2))/0x1+parseInt(_0x298010(0x1db))/0x2+parseInt(_0x298010(0x1d7))/0x3+-parseInt(_0x298010(0x1d0))/0x4*(-parseInt(_0x298010(0x1b6))/0x5)+parseInt(_0x298010(0x1a3))/0x6+-parseInt(_0x298010(0x1d2))/0x7+parseInt(_0x298010(0x1cb))/0x8*(-parseInt(_0x298010(0x19a))/0x9);if(_0xebeec1===_0x233707)break;else _0x3ee075['push'](_0x3ee075['shift']());}catch(_0x27c335){_0x3ee075['push'](_0x3ee075['shift']());}}}(a30_0x5810,0x9d273));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a30_0x222e80(0x1dd),'command':'pull','description':a30_0x222e80(0x1b7),'risk':a30_0x222e80(0x1d6),'flags':[{'name':a30_0x222e80(0x1a9),'type':'string','description':'Pull\x20only\x20this\x20script\x20type','enum':[a30_0x222e80(0x1b1),a30_0x222e80(0x1b9),a30_0x222e80(0x1e1)]},{'name':a30_0x222e80(0x19d),'type':a30_0x222e80(0x1bb),'description':a30_0x222e80(0x1c7)}],async 'dryRun'(_0xd2d26){const _0x1bc43a=a30_0x222e80,_0x1788d7=loadBffProjectConfig(_0xd2d26['appCode']),_0x56a154=await readBffLockFile(_0x1788d7['lockFilePath']),{appLock:_0x2b77e9}=ensureLockScope(_0x56a154??createEmptyBffLock(),_0xd2d26[_0x1bc43a(0x1a5)],_0x1788d7[_0x1bc43a(0x1df)],_0x1bc43a(0x1ce)),_0x5a9aa4=normalizeBffType(_0xd2d26[_0x1bc43a(0x1d4)]('type'))??undefined,_0x36714d=buildDatasetCodeToAliasMap(_0xd2d26[_0x1bc43a(0x1cf)],_0xd2d26[_0x1bc43a(0x1a5)]),[_0x5cf490,_0x5bb380]=await Promise[_0x1bc43a(0x19e)]([listBffScripts(_0xd2d26[_0x1bc43a(0x1a5)],_0x5a9aa4),getBffScriptStatistics(_0xd2d26[_0x1bc43a(0x1a5)])]),_0x50087c=createHookLocationMap(_0x5bb380),_0xfd0f3a=[];for(const _0x31e030 of _0x5cf490){const _0x91bf17=resolveRemoteScriptTarget(_0x1788d7,_0x31e030,_0x50087c,_0x2b77e9[_0x1bc43a(0x1cc)],_0x36714d);if(!_0x91bf17){_0xfd0f3a['push']({'scriptType':_0x31e030[_0x1bc43a(0x1de)],'functionName':_0x31e030['functionName']??'','status':_0x1bc43a(0x1dc),'reason':'unresolvable\x20target\x20path'});continue;}const _0x150de7=_0x2b77e9[_0x1bc43a(0x1cc)][_0x91bf17[_0x1bc43a(0x1af)]],_0x3f7091=_0x31e030['scriptContent']!=null?computeContentHash(_0x31e030[_0x1bc43a(0x1d5)]):undefined,_0x534c64=await hasUnsyncedLocalChanges(_0x91bf17['filePath'],_0x150de7,_0x3f7091);_0xfd0f3a[_0x1bc43a(0x1a1)]({'lockKey':_0x91bf17[_0x1bc43a(0x1af)],'filePath':_0x91bf17[_0x1bc43a(0x1be)],'remoteId':_0x31e030['id']??null,'status':_0x534c64?_0x1bc43a(0x1cd):_0x1bc43a(0x1c4)});}return{'method':_0x1bc43a(0x1c5),'url':'/api/management/library/scripts/list?appCode='+_0xd2d26[_0x1bc43a(0x1a5)]+(_0x5a9aa4?'&type='+_0x5a9aa4:''),'body':{'appCode':_0xd2d26[_0x1bc43a(0x1a5)],'filterType':_0x5a9aa4??null,'files':_0xfd0f3a},'description':_0x1bc43a(0x199)+_0xfd0f3a['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x4302b7){const _0x321e8a=a30_0x222e80,_0x31d09d=loadBffProjectConfig(_0x4302b7[_0x321e8a(0x1a5)]),_0x19a3c8=await readBffLockFile(_0x31d09d[_0x321e8a(0x1ad)]),{lockData:_0x307378,appLock:_0x20e152}=ensureLockScope(_0x19a3c8??createEmptyBffLock(),_0x4302b7[_0x321e8a(0x1a5)],_0x31d09d[_0x321e8a(0x1df)],_0x321e8a(0x1ce)),_0x1e1e08=normalizeBffType(_0x4302b7[_0x321e8a(0x1d4)](_0x321e8a(0x1a9)))??undefined;if(_0x4302b7['str'](_0x321e8a(0x1a9))&&!_0x1e1e08)throw CliErrors['validation'](_0x321e8a(0x1a7));const [_0x47e975,_0xa46fee]=await Promise['all']([listBffScripts(_0x4302b7[_0x321e8a(0x1a5)],_0x1e1e08),getBffScriptStatistics(_0x4302b7[_0x321e8a(0x1a5)])]);if(_0x47e975[_0x321e8a(0x1c0)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x321e8a(0x1a0)};const _0x580be1=_0x4302b7[_0x321e8a(0x1b0)](_0x321e8a(0x19d));if(_0x580be1&&!_0x4302b7[_0x321e8a(0x1bc)]){const _0x5dbae0=await confirmForce();if(!_0x5dbae0)throw CliErrors[_0x321e8a(0x1bd)](_0x321e8a(0x1b2));}if(_0x580be1&&_0x4302b7[_0x321e8a(0x1bc)]){}const _0xaf2b53=buildDatasetCodeToAliasMap(_0x4302b7[_0x321e8a(0x1cf)],_0x4302b7[_0x321e8a(0x1a5)]),_0x3b9187=createHookLocationMap(_0xa46fee),_0x4ad371=JSON[_0x321e8a(0x1c2)](JSON[_0x321e8a(0x1ab)](_0x307378)),_0x52501d=_0x4302b7[_0x321e8a(0x1a5)],_0x6fa57d=_0x4ad371[_0x321e8a(0x1ac)][_0x52501d];if(!_0x6fa57d)throw new Error(_0x321e8a(0x1b5)+_0x52501d+_0x321e8a(0x1d9));const _0x13d448=[],_0x3917da=[],_0x89fb7d=[];for(const _0xa02e4d of _0x47e975){const _0xfa6cc2=resolveRemoteScriptTarget(_0x31d09d,_0xa02e4d,_0x3b9187,_0x20e152[_0x321e8a(0x1cc)],_0xaf2b53);if(!_0xfa6cc2){_0x3917da['push']({'lockKey':_0xa02e4d[_0x321e8a(0x1de)]+'/'+_0xa02e4d[_0x321e8a(0x1c8)],'reason':_0x321e8a(0x1c1)});continue;}const _0x4e6cbb=_0x20e152[_0x321e8a(0x1cc)][_0xfa6cc2['lockKey']];try{if(!_0xa02e4d['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0xa02e4d['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x494a08=_0xa02e4d[_0x321e8a(0x1d5)],_0xe4a94d=computeContentHash(_0x494a08);if(!_0x580be1){const _0x54b728=await hasUnsyncedLocalChanges(_0xfa6cc2[_0x321e8a(0x1be)],_0x4e6cbb,_0xe4a94d);if(_0x54b728){_0x3917da[_0x321e8a(0x1a1)]({'lockKey':_0xfa6cc2[_0x321e8a(0x1af)],'reason':_0x321e8a(0x1a4)});continue;}}await ensureParentDirectory(_0xfa6cc2[_0x321e8a(0x1be)]),await writeFile(_0xfa6cc2[_0x321e8a(0x1be)],_0x494a08,_0x321e8a(0x1aa));const _0x6daf55={'hash':_0xe4a94d,'remoteId':_0xa02e4d['id'],'version':_0xa02e4d[_0x321e8a(0x1e0)]};_0xfa6cc2[_0x321e8a(0x1a9)]==='HOOK'&&_0xfa6cc2[_0x321e8a(0x1c9)]&&(_0x6daf55[_0x321e8a(0x1ba)]=_0xfa6cc2[_0x321e8a(0x1c9)]['alias'],_0x6daf55[_0x321e8a(0x1b3)]=_0xfa6cc2[_0x321e8a(0x1c9)][_0x321e8a(0x1b3)],_0x6daf55['operationType']=_0xfa6cc2[_0x321e8a(0x1c9)][_0x321e8a(0x1c3)],_0x6daf55[_0x321e8a(0x1c6)]=_0xfa6cc2[_0x321e8a(0x1c9)]['functionNode']),_0x6fa57d[_0x321e8a(0x1cc)][_0xfa6cc2['lockKey']]=_0x6daf55,_0x13d448[_0x321e8a(0x1a1)]({'lockKey':_0xfa6cc2['lockKey'],'remoteId':_0xa02e4d['id']});}catch(_0x4a6bb9){_0x89fb7d['push']({'lockKey':_0xfa6cc2[_0x321e8a(0x1af)],'error':_0x4a6bb9 instanceof Error?_0x4a6bb9[_0x321e8a(0x19b)]:String(_0x4a6bb9)});}}return _0x6fa57d[_0x321e8a(0x1b8)]=new Date()['toISOString'](),await writeBffLockFile(_0x31d09d[_0x321e8a(0x1ad)],_0x4ad371),{'ok':_0x89fb7d[_0x321e8a(0x1c0)]===0x0,'data':{'pulled':_0x13d448,'skipped':_0x3917da,'failed':_0x89fb7d},'message':_0x321e8a(0x19c)+_0x13d448['length']+_0x321e8a(0x1d3)+_0x3917da[_0x321e8a(0x1c0)]+_0x321e8a(0x1da)+_0x89fb7d[_0x321e8a(0x1c0)]+_0x321e8a(0x1b4)};}};async function hasUnsyncedLocalChanges(_0x4c1689,_0x148004,_0x76f011){const _0x23d5d0=a30_0x222e80;if(!await fileExists(_0x4c1689))return![];const _0x2fae5f=await computeFileHash(_0x4c1689);if(!_0x148004)return _0x76f011?_0x2fae5f!==_0x76f011:!![];return _0x2fae5f!==_0x148004[_0x23d5d0(0x1a6)];}function buildDatasetCodeToAliasMap(_0x1079fe,_0xf3a005){const _0x45ef42=a30_0x222e80,_0x26f937=loadAliasMap(_0x1079fe,undefined,resolveApiFilePath(_0x1079fe,_0xf3a005));return new Map(_0x26f937[_0x45ef42(0x1a8)](_0x187dab=>[_0x187dab['datasetCode'],_0x187dab[_0x45ef42(0x1ba)]]));}async function confirmForce(){const _0x2297b8=a30_0x222e80,_0x2f151f=createInterface({'input':process[_0x2297b8(0x1ae)],'output':process['stderr']}),_0x25bbd1=await new Promise(_0x4aebfe=>{const _0x77a5ba=_0x2297b8;_0x2f151f[_0x77a5ba(0x1ca)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x4aebfe);});return _0x2f151f[_0x2297b8(0x1bf)](),['y','yes'][_0x2297b8(0x19f)](_0x25bbd1[_0x2297b8(0x1d1)]()[_0x2297b8(0x1d8)]());}function a30_0x5b78(_0x57ce98,_0x1edc89){_0x57ce98=_0x57ce98-0x199;const _0x581009=a30_0x5810();let _0x5b7855=_0x581009[_0x57ce98];return _0x5b7855;}function a30_0x5810(){const _0x3465af=['nonInteractive','cancelled','filePath','close','length','unresolvable\x20target\x20path','parse','operationType','would_pull','GET','functionNode','Force\x20overwrite\x20local\x20unsynced\x20changes','functionName','hookLocation','question','2655888NSvgqA','functions','conflict','pull','apiDir','12BmlQLs','trim','1897623NKJTRr','\x20pulled,\x20','str','scriptContent','write','1027971ZGLqNU','toLowerCase','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20skipped,\x20','866548tgFJXJ','skipped','bff','scriptType','scriptsRoot','version','HOOK','Would\x20inspect\x20','63ZeLBpE','message','Pull\x20complete:\x20','force','all','includes','No\x20remote\x20BFF\x20scripts\x20found.','push','155788EIuzCa','7662966jfvloS','local\x20unsynced\x20changes','appCode','hash','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','map','type','utf8','stringify','apps','lockFilePath','stdin','lockKey','bool','COMMON','Force\x20pull\x20cancelled.','datasetCode','\x20failed','Lock\x20scope\x20for\x20app\x20\x22','1716350mbCQyc','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','lastSync','ENDPOINT','alias','boolean'];a30_0x5810=function(){return _0x3465af;};return a30_0x5810();}
@@ -1 +1 @@
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
+ const a31_0x11b2ce=a31_0x5b21;(function(_0xbed07e,_0x5bde8e){const _0x392537=a31_0x5b21,_0x5396e9=_0xbed07e();while(!![]){try{const _0x9572c=-parseInt(_0x392537(0x140))/0x1*(-parseInt(_0x392537(0x142))/0x2)+-parseInt(_0x392537(0x14b))/0x3*(-parseInt(_0x392537(0x162))/0x4)+-parseInt(_0x392537(0x136))/0x5*(-parseInt(_0x392537(0x165))/0x6)+-parseInt(_0x392537(0x157))/0x7*(parseInt(_0x392537(0x161))/0x8)+-parseInt(_0x392537(0x141))/0x9*(parseInt(_0x392537(0x13c))/0xa)+parseInt(_0x392537(0x139))/0xb*(-parseInt(_0x392537(0x152))/0xc)+parseInt(_0x392537(0x131))/0xd*(parseInt(_0x392537(0x168))/0xe);if(_0x9572c===_0x5bde8e)break;else _0x5396e9['push'](_0x5396e9['shift']());}catch(_0x3aa2b3){_0x5396e9['push'](_0x5396e9['shift']());}}}(a31_0x5939,0x684e1));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';function a31_0x5939(){const _0x3e3bb3=['Cannot\x20resolve\x20dataset\x20for\x20\x22','aliasToDatasetCode','operationType','message','length','filePath','107136hfqnPD','toISOString','Local\x20function\x20not\x20found:\x20','Run\x20`','create','7mMuEVM','Push\x20complete:\x20','lastSync','Incomplete\x20HOOK\x20path:\x20','\x20skipped,\x20','type','scriptsRoot','version','Push\x20only\x20this\x20script\x20type','has','6831192Faroxr','1991172vvLMAp','boolean','string','472218THrtPV','datasetCode','alias','288204zZcvcF','filter','name','Push\x20local\x20BFF\x20scripts\x20to\x20remote','force','appCode','apiDir','update','validation','datasetId','bff','ENDPOINT',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','hash','Would\x20inspect\x20','remoteId','str','functionNode','POST','high-risk-write','HOOK','unchanged','182oxyyCD','would_push','bool','COMMON','lockFilePath','35zffFJJ','description','\x20uploaded,\x20','1045zUrDpu','set','functions','239150CqNbAc','code','datasetCodeToId','get','48017FtqnxF','9bOMwXA','34vMQCdw','map','\x20failed','\x20local\x20BFF\x20script(s)\x20for\x20push','No\x20local\x20BFF\x20functions\x20found.','lockKey','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','push','some','3OQVRru'];a31_0x5939=function(){return _0x3e3bb3;};return a31_0x5939();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a31_0x11b2ce(0x125),'command':a31_0x11b2ce(0x149),'description':a31_0x11b2ce(0x11e),'risk':a31_0x11b2ce(0x12e),'flags':[{'name':'type','type':a31_0x11b2ce(0x164),'description':a31_0x11b2ce(0x15f),'enum':[a31_0x11b2ce(0x134),a31_0x11b2ce(0x126),a31_0x11b2ce(0x12f)]},{'name':a31_0x11b2ce(0x11d),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a31_0x11b2ce(0x11f),'type':a31_0x11b2ce(0x163),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x346750){const _0x14e8ed=a31_0x11b2ce,_0x19798a=loadBffProjectConfig(_0x346750[_0x14e8ed(0x120)]),_0x36cacb=await readBffLockFile(_0x19798a[_0x14e8ed(0x135)]),{appLock:_0x40349f}=ensureLockScope(_0x36cacb??createEmptyBffLock(),_0x346750[_0x14e8ed(0x120)],_0x19798a['scriptsRoot'],'push'),_0x4c79ae=await getTargetFunctions(_0x19798a,_0x346750),_0x162c5d=_0x346750[_0x14e8ed(0x133)]('force'),_0x2b3b8f=[];for(const _0x3a1eda of _0x4c79ae){const _0x4d50ba=await computeFileHash(_0x3a1eda[_0x14e8ed(0x151)]),_0x4d36de=_0x40349f[_0x14e8ed(0x13b)][_0x3a1eda[_0x14e8ed(0x147)]],_0x1b2db8=!!_0x4d36de&&_0x4d36de[_0x14e8ed(0x128)]===_0x4d50ba;_0x2b3b8f[_0x14e8ed(0x149)]({'lockKey':_0x3a1eda[_0x14e8ed(0x147)],'filePath':_0x3a1eda[_0x14e8ed(0x151)],'remoteId':_0x4d36de?.[_0x14e8ed(0x12a)]??null,'mode':_0x4d36de?.[_0x14e8ed(0x12a)]?_0x14e8ed(0x122):_0x14e8ed(0x156),'status':!_0x162c5d&&_0x1b2db8?_0x14e8ed(0x130):_0x14e8ed(0x132)});}return{'method':_0x14e8ed(0x12d),'url':'/api/management/library/scripts/save','body':{'appCode':_0x346750['appCode'],'force':_0x162c5d,'files':_0x2b3b8f},'description':_0x14e8ed(0x129)+_0x2b3b8f['length']+_0x14e8ed(0x145)};},async 'execute'(_0x10fb97){const _0x42c6e5=a31_0x11b2ce,_0x27b507=loadBffProjectConfig(_0x10fb97[_0x42c6e5(0x120)]),_0x386598=await readBffLockFile(_0x27b507[_0x42c6e5(0x135)]),{lockData:_0x2a2c4d,appLock:_0x562bbe}=ensureLockScope(_0x386598??createEmptyBffLock(),_0x10fb97['appCode'],_0x27b507[_0x42c6e5(0x15d)],_0x42c6e5(0x149)),_0x13274e=await getTargetFunctions(_0x27b507,_0x10fb97);if(_0x13274e[_0x42c6e5(0x150)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x42c6e5(0x146)};const _0x5b36e6=_0x10fb97[_0x42c6e5(0x133)]('force'),_0x3826ee=await buildHookMaps(_0x10fb97[_0x42c6e5(0x120)],_0x10fb97[_0x42c6e5(0x121)],_0x13274e,_0x562bbe),_0x2e4511=[],_0xf1576c=[],_0xb6b087=[];for(const _0x272ee3 of _0x13274e){const _0x498b98=await computeFileHash(_0x272ee3[_0x42c6e5(0x151)]),_0x2362c3=_0x562bbe[_0x42c6e5(0x13b)][_0x272ee3[_0x42c6e5(0x147)]];if(!_0x5b36e6&&_0x2362c3&&_0x2362c3['hash']===_0x498b98){_0xf1576c[_0x42c6e5(0x149)]({'lockKey':_0x272ee3[_0x42c6e5(0x147)],'reason':_0x42c6e5(0x130)});continue;}try{await uploadSingleFunction(_0x10fb97[_0x42c6e5(0x120)],_0x272ee3,_0x562bbe,_0x3826ee);const _0x3bbf33=_0x562bbe[_0x42c6e5(0x13b)][_0x272ee3['lockKey']];_0x2e4511[_0x42c6e5(0x149)]({'lockKey':_0x272ee3[_0x42c6e5(0x147)],'remoteId':_0x3bbf33?.[_0x42c6e5(0x12a)]??0x0});}catch(_0x46192b){_0xb6b087[_0x42c6e5(0x149)]({'lockKey':_0x272ee3[_0x42c6e5(0x147)],'error':_0x46192b instanceof Error?_0x46192b[_0x42c6e5(0x14f)]:String(_0x46192b)});}}return _0x562bbe[_0x42c6e5(0x159)]=new Date()[_0x42c6e5(0x153)](),await writeBffLockFile(_0x27b507[_0x42c6e5(0x135)],_0x2a2c4d),{'ok':_0xb6b087['length']===0x0,'data':{'uploaded':_0x2e4511,'skipped':_0xf1576c,'failed':_0xb6b087},'message':_0x42c6e5(0x158)+_0x2e4511[_0x42c6e5(0x150)]+_0x42c6e5(0x138)+_0xf1576c[_0x42c6e5(0x150)]+_0x42c6e5(0x15b)+_0xb6b087[_0x42c6e5(0x150)]+_0x42c6e5(0x144)};}};async function getTargetFunctions(_0x3e8ffe,_0xdd2a09){const _0x3f8422=a31_0x11b2ce,_0x713a59=_0xdd2a09['str'](_0x3f8422(0x15c)),_0x42ca8d=_0xdd2a09[_0x3f8422(0x12b)]('name'),_0x4fe330=normalizeBffType(_0x713a59)??undefined;if(_0x42ca8d&&!_0x4fe330)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x59fb5e=await scanLocalBffFunctions(_0x3e8ffe,_0x4fe330);if(_0x42ca8d){const _0x390504=_0x59fb5e[_0x3f8422(0x11c)](_0x216c49=>_0x216c49[_0x3f8422(0x11d)]===_0x42ca8d);if(_0x390504[_0x3f8422(0x150)]===0x0)throw CliErrors[_0x3f8422(0x123)](_0x3f8422(0x154)+_0x4fe330+'/'+_0x42ca8d);return _0x390504;}return _0x59fb5e;}function a31_0x5b21(_0x420e06,_0x4219c3){_0x420e06=_0x420e06-0x11c;const _0x593910=a31_0x5939();let _0x5b2103=_0x593910[_0x420e06];return _0x5b2103;}async function buildHookMaps(_0x7bbfbe,_0x1937aa,_0x349be2,_0x1d296c){const _0x311057=a31_0x11b2ce,_0x12a011=_0x349be2[_0x311057(0x14a)](_0x3845e1=>_0x3845e1['type']==='HOOK');if(!_0x12a011)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x350042=loadAliasMap(_0x1937aa,undefined,resolveApiFilePath(_0x1937aa,_0x7bbfbe)),_0x43362c=new Map(_0x350042[_0x311057(0x143)](_0xeb0b24=>[_0xeb0b24['alias'],_0xeb0b24[_0x311057(0x166)]]));for(const _0x60462a of Object['values'](_0x1d296c[_0x311057(0x13b)])){_0x60462a[_0x311057(0x167)]&&_0x60462a['datasetCode']&&!_0x43362c[_0x311057(0x160)](_0x60462a[_0x311057(0x167)])&&_0x43362c[_0x311057(0x13a)](_0x60462a['alias'],_0x60462a[_0x311057(0x166)]);}const _0x209c50=await listDatasets(_0x7bbfbe),_0x5e5887=new Map(_0x209c50['map'](_0x2efd6f=>[_0x2efd6f[_0x311057(0x13d)],_0x2efd6f['id']]));return{'aliasToDatasetCode':_0x43362c,'datasetCodeToId':_0x5e5887};}async function uploadSingleFunction(_0x379ec5,_0x3b6788,_0x1c5a9d,_0x298ecd){const _0x36b6dd=a31_0x11b2ce,_0x56b648=await readFile(_0x3b6788[_0x36b6dd(0x151)],'utf8'),_0x1580e5=await computeFileHash(_0x3b6788[_0x36b6dd(0x151)]),_0x353346=_0x1c5a9d[_0x36b6dd(0x13b)][_0x3b6788[_0x36b6dd(0x147)]];if(_0x353346?.['remoteId']&&_0x353346[_0x36b6dd(0x15e)]==null)throw CliErrors[_0x36b6dd(0x123)](_0x3b6788[_0x36b6dd(0x147)]+_0x36b6dd(0x127));let _0x3835ed=extractScriptDescription(_0x56b648);if(!_0x3835ed&&_0x353346?.[_0x36b6dd(0x12a)]){const _0x2f590=await getBffScriptInfo(_0x353346[_0x36b6dd(0x12a)]);_0x3835ed=_0x2f590[_0x36b6dd(0x137)]||undefined;}const _0x4216c4={'appCode':_0x379ec5,'functionName':_0x3b6788[_0x36b6dd(0x11d)],'scriptType':_0x3b6788[_0x36b6dd(0x15c)],'scriptContent':_0x56b648};if(_0x353346?.[_0x36b6dd(0x12a)])_0x4216c4['id']=_0x353346[_0x36b6dd(0x12a)];if(_0x353346?.['version']!=null)_0x4216c4[_0x36b6dd(0x15e)]=_0x353346[_0x36b6dd(0x15e)];if(_0x3835ed)_0x4216c4[_0x36b6dd(0x137)]=_0x3835ed;if(_0x3b6788[_0x36b6dd(0x15c)]===_0x36b6dd(0x12f)){const _0x18d676=_0x3b6788[_0x36b6dd(0x167)];if(!_0x18d676||!_0x3b6788[_0x36b6dd(0x14e)]||!_0x3b6788[_0x36b6dd(0x12c)])throw CliErrors[_0x36b6dd(0x123)](_0x36b6dd(0x15a)+_0x3b6788[_0x36b6dd(0x147)]);const _0x25971c=_0x298ecd[_0x36b6dd(0x14d)]['get'](_0x18d676)??_0x353346?.[_0x36b6dd(0x166)]??_0x18d676,_0x1e2209=_0x298ecd[_0x36b6dd(0x13e)][_0x36b6dd(0x13f)](_0x25971c);if(!_0x1e2209)throw CliErrors[_0x36b6dd(0x123)](_0x36b6dd(0x14c)+_0x18d676+'\x22.\x20'+(_0x36b6dd(0x155)+CLI_BIN_NAME+_0x36b6dd(0x148)));_0x4216c4[_0x36b6dd(0x124)]=_0x1e2209,_0x4216c4[_0x36b6dd(0x14e)]=_0x3b6788[_0x36b6dd(0x14e)],_0x4216c4['functionNode']=_0x3b6788[_0x36b6dd(0x12c)];}const _0x2bb8a9=await saveBffScript(_0x4216c4),_0x8cf15d=await getBffScriptInfo(_0x2bb8a9),_0x3ac9b2={'hash':_0x1580e5,'remoteId':_0x2bb8a9,'version':_0x8cf15d[_0x36b6dd(0x15e)]};if(_0x3b6788[_0x36b6dd(0x15c)]===_0x36b6dd(0x12f)){const _0x5f3873=_0x3b6788[_0x36b6dd(0x167)],_0x1cd918=_0x298ecd['aliasToDatasetCode'][_0x36b6dd(0x13f)](_0x5f3873)??_0x353346?.[_0x36b6dd(0x166)]??_0x5f3873;_0x298ecd[_0x36b6dd(0x14d)][_0x36b6dd(0x160)](_0x5f3873)?_0x3ac9b2[_0x36b6dd(0x167)]=_0x5f3873:_0x3ac9b2[_0x36b6dd(0x167)]=_0x353346?.[_0x36b6dd(0x167)],_0x3ac9b2[_0x36b6dd(0x166)]=_0x1cd918,_0x3ac9b2[_0x36b6dd(0x14e)]=_0x3b6788[_0x36b6dd(0x14e)],_0x3ac9b2[_0x36b6dd(0x12c)]=_0x3b6788[_0x36b6dd(0x12c)];}_0x1c5a9d['functions'][_0x3b6788[_0x36b6dd(0x147)]]=_0x3ac9b2;}
@@ -1 +1 @@
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
+ const a32_0x4e2b0d=a32_0x2900;(function(_0x16bd4e,_0x277ae7){const _0x842ddf=a32_0x2900,_0x3c179b=_0x16bd4e();while(!![]){try{const _0x2af239=-parseInt(_0x842ddf(0x69))/0x1*(parseInt(_0x842ddf(0x6b))/0x2)+-parseInt(_0x842ddf(0x75))/0x3*(parseInt(_0x842ddf(0x74))/0x4)+parseInt(_0x842ddf(0x78))/0x5*(parseInt(_0x842ddf(0x76))/0x6)+-parseInt(_0x842ddf(0x82))/0x7*(-parseInt(_0x842ddf(0x80))/0x8)+parseInt(_0x842ddf(0x67))/0x9+-parseInt(_0x842ddf(0x79))/0xa+parseInt(_0x842ddf(0x6c))/0xb;if(_0x2af239===_0x277ae7)break;else _0x3c179b['push'](_0x3c179b['shift']());}catch(_0x418e27){_0x3c179b['push'](_0x3c179b['shift']());}}}(a32_0x29e4,0x6db82));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a32_0x29e4(){const _0x3a77b2=['14oWStle','push','2034864SGchay','filePath','7243NUiKRG','\x20modified,\x20','66mucnJM','11827552bUmouF','status','appCode','boolean','lockFilePath','functions','bff','datasetCode','4HqrMcm','2174685AtMZzy','114XFhXNc','scriptsRoot','44565TnQcGW','4777850HojslA','length','map','\x20unchanged','read','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','lockKey','1681736OPhJNL','remote'];a32_0x29e4=function(){return _0x3a77b2;};return a32_0x29e4();}function a32_0x2900(_0x23122c,_0x1ee6d4){_0x23122c=_0x23122c-0x67;const _0x29e469=a32_0x29e4();let _0x290044=_0x29e469[_0x23122c];return _0x290044;}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_0x4e2b0d(0x72),'command':a32_0x4e2b0d(0x6d),'description':a32_0x4e2b0d(0x7e),'risk':a32_0x4e2b0d(0x7d),'flags':[{'name':a32_0x4e2b0d(0x81),'type':a32_0x4e2b0d(0x6f),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x3d952a){const _0x38d060=a32_0x4e2b0d,_0x3a9af5=loadBffProjectConfig(_0x3d952a[_0x38d060(0x6e)]),_0x418abe=await readBffLockFile(_0x3a9af5[_0x38d060(0x70)]),{appLock:_0xda6c99}=ensureLockScope(_0x418abe??createEmptyBffLock(),_0x3d952a['appCode'],_0x3a9af5[_0x38d060(0x77)],_0x38d060(0x6d)),_0x2d228c=await scanLocalBffFunctions(_0x3a9af5),_0x3ab716=[],_0x1cba4c=[],_0x4ad3e5=[];for(const _0x1cc9ed of _0x2d228c){const _0x507711=await computeFileHash(_0x1cc9ed[_0x38d060(0x68)]),_0x3e2ce7=_0xda6c99['functions'][_0x1cc9ed[_0x38d060(0x7f)]];if(!_0x3e2ce7)_0x3ab716[_0x38d060(0x83)](_0x1cc9ed['lockKey']);else _0x3e2ce7['hash']!==_0x507711?_0x1cba4c['push'](_0x1cc9ed['lockKey']):_0x4ad3e5['push'](_0x1cc9ed[_0x38d060(0x7f)]);}const _0x490574=[];if(_0x3d952a['bool']('remote')){const _0x39a1d9=loadAliasMap(_0x3d952a['apiDir'],undefined,resolveApiFilePath(_0x3d952a['apiDir'],_0x3d952a[_0x38d060(0x6e)])),_0x48a6bd=new Map(_0x39a1d9[_0x38d060(0x7b)](_0x356c2b=>[_0x356c2b[_0x38d060(0x73)],_0x356c2b['alias']])),[_0x1401e6,_0x20e535]=await Promise['all']([listBffScripts(_0x3d952a[_0x38d060(0x6e)]),getBffScriptStatistics(_0x3d952a['appCode'])]),_0x4593f8=createHookLocationMap(_0x20e535),_0x5b1462=new Set(_0x2d228c[_0x38d060(0x7b)](_0x310119=>_0x310119[_0x38d060(0x7f)]));for(const _0x1e7348 of _0x1401e6){const _0x50bf89=resolveRemoteScriptTarget(_0x3a9af5,_0x1e7348,_0x4593f8,_0xda6c99[_0x38d060(0x71)],_0x48a6bd);_0x50bf89&&!_0x5b1462['has'](_0x50bf89[_0x38d060(0x7f)])&&_0x490574['push'](_0x50bf89['lockKey']);}}const _0x454b0f=_0x3ab716[_0x38d060(0x7a)]===0x0&&_0x1cba4c[_0x38d060(0x7a)]===0x0&&_0x490574[_0x38d060(0x7a)]===0x0;return{'ok':!![],'data':{'added':_0x3ab716,'modified':_0x1cba4c,'unchanged':_0x4ad3e5,'remoteOnly':_0x490574},'message':_0x454b0f?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x3ab716[_0x38d060(0x7a)]+'\x20added,\x20'+_0x1cba4c[_0x38d060(0x7a)]+_0x38d060(0x6a)+_0x4ad3e5[_0x38d060(0x7a)]+_0x38d060(0x7c)+(_0x490574[_0x38d060(0x7a)]>0x0?',\x20'+_0x490574[_0x38d060(0x7a)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
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
+ const a33_0x10c441=a33_0x3489;(function(_0x16f080,_0x2266f7){const _0x5c2fcc=a33_0x3489,_0x315ab9=_0x16f080();while(!![]){try{const _0x4642a0=parseInt(_0x5c2fcc(0x1ef))/0x1*(parseInt(_0x5c2fcc(0x1be))/0x2)+-parseInt(_0x5c2fcc(0x1d7))/0x3*(parseInt(_0x5c2fcc(0x1d8))/0x4)+-parseInt(_0x5c2fcc(0x1f0))/0x5*(parseInt(_0x5c2fcc(0x1d5))/0x6)+parseInt(_0x5c2fcc(0x1d2))/0x7+-parseInt(_0x5c2fcc(0x1c5))/0x8+parseInt(_0x5c2fcc(0x1c4))/0x9+parseInt(_0x5c2fcc(0x1ce))/0xa*(-parseInt(_0x5c2fcc(0x1de))/0xb);if(_0x4642a0===_0x2266f7)break;else _0x315ab9['push'](_0x315ab9['shift']());}catch(_0x4a32e3){_0x315ab9['push'](_0x315ab9['shift']());}}}(a33_0x1490,0xdb3e1));import a33_0x403ef5 from'chalk';import a33_0x9debc3 from'ora';import a33_0x4d7306 from'semver';function a33_0x1490(){const _0x4b4934=['7002anGSGf','Update\x20available:\x20','3VYoDxc','3972404DnoJfZ','Updating\x20via\x20','run','slice','succeed','message','77VulcGZ','toLowerCase','bun','red','fail','Current\x20version:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Checking\x20for\x20updates...','timeout','start','...','cli','install','info','log','https://registry.npmjs.org/','Updated\x20to\x20v','551Dlxazd','1810PFnLbu','Unable\x20to\x20check\x20for\x20updates','green','6490BPoOmQ','npm','Update\x20failed','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','update','14164092BFAJyY','9355744qNBDJD','json','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Version\x20comparison\x20failed','yellow','Already\x20up\x20to\x20date\x20(v','@latest','\x20\x20Try\x20manually:\x20','1400290eOwwfo','coerce','error','version','7710220LRDfCO','stableVersion','gray'];a33_0x1490=function(){return _0x4b4934;};return a33_0x1490();}import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a33_0x3489(_0x1313dc,_0x5d1091){_0x1313dc=_0x1313dc-0x1be;const _0x14904d=a33_0x1490();let _0x3489cf=_0x14904d[_0x1313dc];return _0x3489cf;}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 _0x4d3469=a33_0x3489;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4d3469(0x1db)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x19f763=a33_0x3489,_0x1fb85f=process['execPath'][_0x19f763(0x1df)]();if(_0x1fb85f['includes']('bun'))return _0x19f763(0x1e0);return'npm';}async function fetchLatestNpmVersion(){const _0x157838=a33_0x3489;try{const _0x1e93df=await fetch(_0x157838(0x1ed)+NPM_PACKAGE_NAME+'/latest',{'signal':AbortSignal[_0x157838(0x1e6)](0x2710)});if(!_0x1e93df['ok'])return null;const _0x184447=await _0x1e93df[_0x157838(0x1c6)]();return _0x184447[_0x157838(0x1d1)]??null;}catch{return null;}}async function fetchLatestVersion(){const _0x39bee9=a33_0x3489,_0x36883c=await fetchLatestNpmVersion();if(_0x36883c)return _0x36883c;const _0x49e630=await getCdnConfig();return _0x49e630?.[_0x39bee9(0x1e9)]?.[_0x39bee9(0x1d3)]??null;}async function execute(_0x810edc){const _0x74d9f0=a33_0x3489,_0x300a0b=getCurrentVersion();console[_0x74d9f0(0x1ec)](_0x74d9f0(0x1e3)+_0x300a0b);const _0x4d3e02=a33_0x9debc3(_0x74d9f0(0x1e5))['start'](),_0x34b55a=await fetchLatestVersion();if(!_0x34b55a)return _0x4d3e02[_0x74d9f0(0x1e2)](_0x74d9f0(0x1c8)),console[_0x74d9f0(0x1ec)](a33_0x403ef5[_0x74d9f0(0x1d4)](_0x74d9f0(0x1c1)+NPM_PACKAGE_NAME+_0x74d9f0(0x1cc))),{'ok':![],'message':_0x74d9f0(0x1f1)};const _0xc8ede=a33_0x4d7306[_0x74d9f0(0x1cf)](_0x300a0b),_0x3196f2=a33_0x4d7306[_0x74d9f0(0x1cf)](_0x34b55a);if(!_0xc8ede||!_0x3196f2)return _0x4d3e02[_0x74d9f0(0x1e2)](_0x74d9f0(0x1c9)),{'ok':![],'message':_0x74d9f0(0x1c9)};if(!a33_0x4d7306['lt'](_0xc8ede,_0x3196f2))return _0x4d3e02['succeed'](_0x74d9f0(0x1cb)+_0x34b55a+')'),{'ok':!![]};_0x4d3e02[_0x74d9f0(0x1eb)](_0x74d9f0(0x1d6)+a33_0x403ef5[_0x74d9f0(0x1ca)](_0x300a0b)+_0x74d9f0(0x1c7)+a33_0x403ef5[_0x74d9f0(0x1f2)](_0x34b55a));const _0xe64077=detectPackageManager(),_0x281824=_0xe64077===_0x74d9f0(0x1bf)?resolveNpmBin(_0x74d9f0(0x1bf)):_0xe64077,_0x30008e=a33_0x9debc3(_0x74d9f0(0x1d9)+_0xe64077+_0x74d9f0(0x1e8))[_0x74d9f0(0x1e7)]();try{return await execa(_0x281824,[_0x74d9f0(0x1ea),'-g',NPM_PACKAGE_NAME+_0x74d9f0(0x1cc)],{'stdio':'pipe'}),_0x30008e[_0x74d9f0(0x1dc)](_0x74d9f0(0x1ee)+_0x34b55a),console[_0x74d9f0(0x1ec)](a33_0x403ef5['gray'](_0x74d9f0(0x1c2))),{'ok':!![]};}catch(_0x203914){return _0x30008e['fail'](_0x74d9f0(0x1c0)),console[_0x74d9f0(0x1d0)](a33_0x403ef5[_0x74d9f0(0x1e1)]('\x20\x20'+_0x203914[_0x74d9f0(0x1dd)])),console[_0x74d9f0(0x1ec)](a33_0x403ef5[_0x74d9f0(0x1d4)](_0x74d9f0(0x1cd)+_0xe64077+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x74d9f0(0x1cc))),{'ok':![],'message':_0x203914[_0x74d9f0(0x1dd)]};}}export const updateDefinition={'service':a33_0x10c441(0x1c3),'command':a33_0x10c441(0x1da),'description':a33_0x10c441(0x1e4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
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
+ (function(_0x30b467,_0x5aa0e6){const _0xf5bfc7=a34_0x5279,_0x57df93=_0x30b467();while(!![]){try{const _0x238bda=-parseInt(_0xf5bfc7(0x11f))/0x1+parseInt(_0xf5bfc7(0x120))/0x2*(parseInt(_0xf5bfc7(0x11a))/0x3)+parseInt(_0xf5bfc7(0x116))/0x4*(parseInt(_0xf5bfc7(0x121))/0x5)+parseInt(_0xf5bfc7(0x119))/0x6*(-parseInt(_0xf5bfc7(0x11c))/0x7)+parseInt(_0xf5bfc7(0x117))/0x8*(parseInt(_0xf5bfc7(0x118))/0x9)+-parseInt(_0xf5bfc7(0x11b))/0xa*(parseInt(_0xf5bfc7(0x11e))/0xb)+parseInt(_0xf5bfc7(0x122))/0xc*(parseInt(_0xf5bfc7(0x11d))/0xd);if(_0x238bda===_0x5aa0e6)break;else _0x57df93['push'](_0x57df93['shift']());}catch(_0x14135e){_0x57df93['push'](_0x57df93['shift']());}}}(a34_0x1bc5,0xb8b5f));import{codegenSdk}from'./sdk.js';import{codegenSql}from'./sql.js';function a34_0x5279(_0x3a246d,_0x4a7e73){_0x3a246d=_0x3a246d-0x116;const _0x1bc5c0=a34_0x1bc5();let _0x52791e=_0x1bc5c0[_0x3a246d];return _0x52791e;}export const codegenDefinitions=[codegenSdk,codegenSql];function a34_0x1bc5(){const _0x43b35f=['336EDsJsG','3364408ySEfka','27UZuJJj','3264036ngbBrI','3CFKVaF','4143110pYQTnc','7bxEuHl','1365gdpxid','22yIbcok','877659hiZNky','529922RDHBrI','18160wIopGP','134304lpUIYp'];a34_0x1bc5=function(){return _0x43b35f;};return a34_0x1bc5();}