@lovrabet/rabetbase-cli 2.1.7-beta.2 → 2.1.7-beta.4

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 (196) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/delete.js +1 -1
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.js +1 -1
  54. package/lib/commands/dataset/link-create.js +1 -1
  55. package/lib/commands/dataset/link-delete.js +1 -1
  56. package/lib/commands/dataset/link-shared.js +1 -1
  57. package/lib/commands/dataset/link-update.js +1 -1
  58. package/lib/commands/dataset/links.js +1 -1
  59. package/lib/commands/dataset/list.js +1 -1
  60. package/lib/commands/dataset/operations.js +1 -1
  61. package/lib/commands/db/analyze-cancel.js +1 -1
  62. package/lib/commands/db/analyze-start.js +1 -1
  63. package/lib/commands/db/analyze-status.js +1 -1
  64. package/lib/commands/db/create.js +1 -1
  65. package/lib/commands/db/delete.js +1 -1
  66. package/lib/commands/db/detail.js +1 -1
  67. package/lib/commands/db/diff.js +1 -1
  68. package/lib/commands/db/index.js +1 -1
  69. package/lib/commands/db/list.js +1 -1
  70. package/lib/commands/db/shared.js +1 -1
  71. package/lib/commands/db/tables.js +1 -1
  72. package/lib/commands/db/test.js +1 -1
  73. package/lib/commands/db/update.js +1 -1
  74. package/lib/commands/doctor.js +1 -1
  75. package/lib/commands/init/index.js +1 -1
  76. package/lib/commands/issue/index.js +1 -1
  77. package/lib/commands/issue/report.js +1 -1
  78. package/lib/commands/logs/index.js +1 -1
  79. package/lib/commands/menu/index.js +1 -1
  80. package/lib/commands/menu/shared/compare-table.js +1 -1
  81. package/lib/commands/menu/shared/index.js +1 -1
  82. package/lib/commands/menu/shared/inquirer.js +1 -1
  83. package/lib/commands/menu/shared/local-pages.js +1 -1
  84. package/lib/commands/menu/shared/logic.js +1 -1
  85. package/lib/commands/menu/shared/service.js +1 -1
  86. package/lib/commands/menu/shared/sync-core.js +1 -1
  87. package/lib/commands/menu/shared/update-core.js +1 -1
  88. package/lib/commands/menu/shared/valid-url.js +1 -1
  89. package/lib/commands/menu/sync.js +1 -1
  90. package/lib/commands/menu/update.js +1 -1
  91. package/lib/commands/page/generate-start.js +1 -1
  92. package/lib/commands/page/generate-status.js +1 -1
  93. package/lib/commands/page/index.js +1 -1
  94. package/lib/commands/page/pull.js +1 -1
  95. package/lib/commands/page/push.js +1 -1
  96. package/lib/commands/page/shared.js +1 -1
  97. package/lib/commands/page/standard-page-status.js +1 -1
  98. package/lib/commands/page/sync.js +1 -1
  99. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  100. package/lib/commands/project/create/format-elapsed.js +1 -1
  101. package/lib/commands/project/create/main.js +1 -1
  102. package/lib/commands/project/create/non-interactive.js +1 -1
  103. package/lib/commands/project/create/project-template-path.js +1 -1
  104. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  105. package/lib/commands/project/create/use-format-code.js +1 -1
  106. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  107. package/lib/commands/project/index.js +1 -1
  108. package/lib/commands/project/init.js +1 -1
  109. package/lib/commands/project/upgrade.js +1 -1
  110. package/lib/commands/registry.js +1 -1
  111. package/lib/commands/run/index.js +1 -1
  112. package/lib/commands/schema.js +1 -1
  113. package/lib/commands/skill/index.js +1 -1
  114. package/lib/commands/sql/create.js +1 -1
  115. package/lib/commands/sql/delete.js +1 -1
  116. package/lib/commands/sql/detail.js +1 -1
  117. package/lib/commands/sql/exec.js +1 -1
  118. package/lib/commands/sql/index.js +1 -1
  119. package/lib/commands/sql/list.js +1 -1
  120. package/lib/commands/sql/pull.js +1 -1
  121. package/lib/commands/sql/push.js +1 -1
  122. package/lib/commands/sql/save.js +1 -1
  123. package/lib/commands/sql/shared.js +1 -1
  124. package/lib/commands/sql/status.js +1 -1
  125. package/lib/commands/sql/validate.js +1 -1
  126. package/lib/config/schema.js +1 -1
  127. package/lib/constant/cdn.js +1 -1
  128. package/lib/constant/cli.js +1 -1
  129. package/lib/constant/defaults.js +1 -1
  130. package/lib/constant/domain.js +1 -1
  131. package/lib/constant/env.js +1 -1
  132. package/lib/constant/output.js +1 -1
  133. package/lib/constant/paths.js +1 -1
  134. package/lib/constant/risk.js +1 -1
  135. package/lib/context.js +1 -1
  136. package/lib/core/alias-resolver.js +1 -1
  137. package/lib/core/api-client.js +1 -1
  138. package/lib/core/bff/config.js +1 -1
  139. package/lib/core/bff/file-system.js +1 -1
  140. package/lib/core/bff/hash.js +1 -1
  141. package/lib/core/bff/lock.js +1 -1
  142. package/lib/core/bff/utils.js +1 -1
  143. package/lib/core/db-resolver.js +1 -1
  144. package/lib/core/page/file-system.js +1 -1
  145. package/lib/core/page/hash.js +1 -1
  146. package/lib/core/page/lock.js +1 -1
  147. package/lib/core/sql-sync/config.js +1 -1
  148. package/lib/core/sql-sync/file-system.js +1 -1
  149. package/lib/core/sql-sync/hash.js +1 -1
  150. package/lib/core/sql-sync/lock.js +1 -1
  151. package/lib/core/sql-sync/utils.js +1 -1
  152. package/lib/core/sql-validator.js +1 -1
  153. package/lib/errors.js +1 -1
  154. package/lib/framework/build-all-flags.js +1 -1
  155. package/lib/framework/flags.js +1 -1
  156. package/lib/framework/help.js +1 -1
  157. package/lib/framework/index.js +1 -1
  158. package/lib/framework/output.js +1 -1
  159. package/lib/framework/response.js +1 -1
  160. package/lib/framework/runner-alias.js +1 -1
  161. package/lib/framework/runner.js +1 -1
  162. package/lib/framework/schema-export.js +1 -1
  163. package/lib/framework/types.js +1 -1
  164. package/lib/generated/build-info.js +1 -1
  165. package/lib/help.js +1 -1
  166. package/lib/skills/main.js +1 -1
  167. package/lib/skills/npx-skills-add.js +1 -1
  168. package/lib/telemetry/cli-command-trace.js +1 -1
  169. package/lib/telemetry/cli-help-trace.js +1 -1
  170. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  171. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  172. package/lib/telemetry/send-cli-trace-log.js +1 -1
  173. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  174. package/lib/utils/ai_config.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cdn-config.js +1 -1
  177. package/lib/utils/check-sdk-version.js +1 -1
  178. package/lib/utils/cli-version-check.js +1 -1
  179. package/lib/utils/cli-version-policy.js +1 -1
  180. package/lib/utils/config.js +1 -1
  181. package/lib/utils/copy-directory.js +1 -1
  182. package/lib/utils/entity-with-id.js +1 -1
  183. package/lib/utils/file-utils.js +1 -1
  184. package/lib/utils/guides-cdn.js +1 -1
  185. package/lib/utils/http-client.js +1 -1
  186. package/lib/utils/is-non-interactive.js +1 -1
  187. package/lib/utils/logger.js +1 -1
  188. package/lib/utils/params.js +1 -1
  189. package/lib/utils/platform.js +1 -1
  190. package/lib/utils/rules-cdn.js +1 -1
  191. package/lib/utils/sleep.js +1 -1
  192. package/lib/utils/template-replacer.js +1 -1
  193. package/lib/utils/version.js +1 -1
  194. package/lib/utils/with-active-cookie.js +1 -1
  195. package/lib/utils/write-cli-side-channel.js +1 -1
  196. package/package.json +1 -1
@@ -1 +1 @@
1
- function a19_0x554e(_0x505c5f,_0x18e1f2){_0x505c5f=_0x505c5f-0x10a;const _0x5ca1eb=a19_0x5ca1();let _0x554e00=_0x5ca1eb[_0x505c5f];return _0x554e00;}const a19_0x1b6b64=a19_0x554e;function a19_0x5ca1(){const _0x3c7c63=['306348EsJcOl','map','2698101YAlGrz','remote','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','702836hzjtJW','6jCauuK','app','754144ziEGRS','412314Yfjdet','read','../../core/api-client.js','cookie','1081195svZtkO','49MCGsZV','263649zQhEut','platform','appName','appCode','appDesc'];a19_0x5ca1=function(){return _0x3c7c63;};return a19_0x5ca1();}(function(_0x5e0652,_0x49b18e){const _0x13a627=a19_0x554e,_0x2ed473=_0x5e0652();while(!![]){try{const _0x4283a6=-parseInt(_0x13a627(0x10c))/0x1+-parseInt(_0x13a627(0x117))/0x2*(-parseInt(_0x13a627(0x11a))/0x3)+parseInt(_0x13a627(0x116))/0x4+-parseInt(_0x13a627(0x10a))/0x5+-parseInt(_0x13a627(0x111))/0x6*(-parseInt(_0x13a627(0x10b))/0x7)+parseInt(_0x13a627(0x119))/0x8+-parseInt(_0x13a627(0x113))/0x9;if(_0x4283a6===_0x49b18e)break;else _0x2ed473['push'](_0x2ed473['shift']());}catch(_0x42a33a){_0x2ed473['push'](_0x2ed473['shift']());}}}(a19_0x5ca1,0x3f7b4));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x3a3d8a){const _0x30b0b1=a19_0x554e,{setActiveCookie:_0x107617}=await import(_0x30b0b1(0x11c));_0x107617(_0x3a3d8a[_0x30b0b1(0x11d)]);const _0x1957e6=await listRemoteApps();return{'ok':!![],'data':{'items':_0x1957e6[_0x30b0b1(0x112)](_0x225ef1=>({..._0x225ef1['id']!=null?{'id':_0x225ef1['id']}:{},'appCode':_0x225ef1[_0x30b0b1(0x10f)],'appName':_0x225ef1[_0x30b0b1(0x10e)],..._0x225ef1[_0x30b0b1(0x110)]!=null?{'appDesc':_0x225ef1[_0x30b0b1(0x110)]}:{}})),'meta':{'source':_0x30b0b1(0x10d)}}};}export const appRemoteDefinition={'service':a19_0x1b6b64(0x118),'command':a19_0x1b6b64(0x114),'description':a19_0x1b6b64(0x115),'risk':a19_0x1b6b64(0x11b),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ function a19_0x4714(_0x414bb0,_0x4caf31){_0x414bb0=_0x414bb0-0x12e;const _0x2edaa9=a19_0x2eda();let _0x471451=_0x2edaa9[_0x414bb0];return _0x471451;}const a19_0x2949e3=a19_0x4714;(function(_0x500d59,_0x4db901){const _0xb31e17=a19_0x4714,_0x477158=_0x500d59();while(!![]){try{const _0x535d27=parseInt(_0xb31e17(0x130))/0x1+-parseInt(_0xb31e17(0x13e))/0x2*(-parseInt(_0xb31e17(0x131))/0x3)+parseInt(_0xb31e17(0x134))/0x4+parseInt(_0xb31e17(0x135))/0x5*(parseInt(_0xb31e17(0x139))/0x6)+parseInt(_0xb31e17(0x140))/0x7+parseInt(_0xb31e17(0x12e))/0x8+-parseInt(_0xb31e17(0x13d))/0x9;if(_0x535d27===_0x4db901)break;else _0x477158['push'](_0x477158['shift']());}catch(_0x6e105){_0x477158['push'](_0x477158['shift']());}}}(a19_0x2eda,0xccf92));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x39db82){const _0x6fdf0f=a19_0x4714,{setActiveCookie:_0x3b0928}=await import(_0x6fdf0f(0x133));_0x3b0928(_0x39db82[_0x6fdf0f(0x136)]);const _0x4e26ac=await listRemoteApps();return{'ok':!![],'data':{'items':_0x4e26ac[_0x6fdf0f(0x138)](_0x1d3ce2=>({..._0x1d3ce2['id']!=null?{'id':_0x1d3ce2['id']}:{},'appCode':_0x1d3ce2[_0x6fdf0f(0x141)],'appName':_0x1d3ce2[_0x6fdf0f(0x13f)],..._0x1d3ce2[_0x6fdf0f(0x12f)]!=null?{'appDesc':_0x1d3ce2['appDesc']}:{}})),'meta':{'source':_0x6fdf0f(0x13a)}}};}function a19_0x2eda(){const _0x212c73=['appName','9777481AXNwjP','appCode','9683368CrGtfM','appDesc','283536aJfNPw','377031aGQksx','app','../../core/api-client.js','1420776fhTsgV','775cjaKeH','cookie','read','map','58686gXzBfv','platform','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','remote','46612701EiRLyH','20xggPSB'];a19_0x2eda=function(){return _0x212c73;};return a19_0x2eda();}export const appRemoteDefinition={'service':a19_0x2949e3(0x132),'command':a19_0x2949e3(0x13c),'description':a19_0x2949e3(0x13b),'risk':a19_0x2949e3(0x137),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a20_0x1f5b(){const _0x12ac7b=['4293915jdDGaa','959076qpgAmp','6lIAssn','10604630IaHCIs','1301908mdpNjI','6CfRiWK','40XaujSK','5033147fTRtKB','673325XVOzMa','1793384lmgPpO'];a20_0x1f5b=function(){return _0x12ac7b;};return a20_0x1f5b();}(function(_0x503064,_0xcef6a3){const _0x5e026a=a20_0x4c1c,_0x10d699=_0x503064();while(!![]){try{const _0x3cb7a2=-parseInt(_0x5e026a(0x1be))/0x1+parseInt(_0x5e026a(0x1bf))/0x2+parseInt(_0x5e026a(0x1c2))/0x3*(parseInt(_0x5e026a(0x1ba))/0x4)+parseInt(_0x5e026a(0x1c0))/0x5*(parseInt(_0x5e026a(0x1bb))/0x6)+-parseInt(_0x5e026a(0x1bd))/0x7+-parseInt(_0x5e026a(0x1bc))/0x8*(-parseInt(_0x5e026a(0x1c1))/0x9)+-parseInt(_0x5e026a(0x1c3))/0xa;if(_0x3cb7a2===_0xcef6a3)break;else _0x10d699['push'](_0x10d699['shift']());}catch(_0x23c368){_0x10d699['push'](_0x10d699['shift']());}}}(a20_0x1f5b,0x76c28));function a20_0x4c1c(_0x41ee3a,_0x2f2c7a){_0x41ee3a=_0x41ee3a-0x1ba;const _0x1f5bbc=a20_0x1f5b();let _0x4c1c34=_0x1f5bbc[_0x41ee3a];return _0x4c1c34;}import{appListDefinition}from'../../commands/app/list.js';import{appRemoteDefinition}from'../../commands/app/discover.js';import{appUseDefinition}from'../../commands/app/use.js';import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
1
+ (function(_0x24d348,_0x5c7886){const _0x5e174a=a20_0x47ca,_0x4eafd6=_0x24d348();while(!![]){try{const _0x54b810=-parseInt(_0x5e174a(0x70))/0x1*(parseInt(_0x5e174a(0x75))/0x2)+parseInt(_0x5e174a(0x73))/0x3+-parseInt(_0x5e174a(0x76))/0x4*(-parseInt(_0x5e174a(0x6d))/0x5)+-parseInt(_0x5e174a(0x71))/0x6*(-parseInt(_0x5e174a(0x77))/0x7)+-parseInt(_0x5e174a(0x6e))/0x8*(-parseInt(_0x5e174a(0x6f))/0x9)+-parseInt(_0x5e174a(0x79))/0xa*(-parseInt(_0x5e174a(0x78))/0xb)+-parseInt(_0x5e174a(0x74))/0xc*(parseInt(_0x5e174a(0x72))/0xd);if(_0x54b810===_0x5c7886)break;else _0x4eafd6['push'](_0x4eafd6['shift']());}catch(_0x3166a1){_0x4eafd6['push'](_0x4eafd6['shift']());}}}(a20_0x273f,0xebb49));import{appListDefinition}from'../../commands/app/list.js';import{appRemoteDefinition}from'../../commands/app/discover.js';import{appUseDefinition}from'../../commands/app/use.js';import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';function a20_0x47ca(_0x2c05e4,_0x3f707d){_0x2c05e4=_0x2c05e4-0x6d;const _0x273f78=a20_0x273f();let _0x47ca38=_0x273f78[_0x2c05e4];return _0x47ca38;}function a20_0x273f(){const _0x4888e5=['2748CnZKnU','1986644IxvNAL','5490124GGftCU','1393FNAorN','348821GBeIum','310WNDifD','5lSwpHF','272DLMlgi','369918LqvUep','1uqLtRj','10356GvkMcs','134797eIGLSM','710274WRKhAK'];a20_0x273f=function(){return _0x4888e5;};return a20_0x273f();}export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
@@ -1 +1 @@
1
- function a21_0x4fbf(_0x54203c,_0x417ae5){_0x54203c=_0x54203c-0x1ac;const _0xdf3896=a21_0xdf38();let _0x4fbfbf=_0xdf3896[_0x54203c];return _0x4fbfbf;}const a21_0x40d94f=a21_0x4fbf;(function(_0x10dd5c,_0x71afab){const _0x439cc1=a21_0x4fbf,_0x11b170=_0x10dd5c();while(!![]){try{const _0x2bba33=-parseInt(_0x439cc1(0x1c8))/0x1*(-parseInt(_0x439cc1(0x1b1))/0x2)+-parseInt(_0x439cc1(0x1b2))/0x3+-parseInt(_0x439cc1(0x1bd))/0x4+parseInt(_0x439cc1(0x1ac))/0x5*(parseInt(_0x439cc1(0x1b7))/0x6)+parseInt(_0x439cc1(0x1cc))/0x7+parseInt(_0x439cc1(0x1c7))/0x8*(parseInt(_0x439cc1(0x1c3))/0x9)+parseInt(_0x439cc1(0x1bb))/0xa*(-parseInt(_0x439cc1(0x1bf))/0xb);if(_0x2bba33===_0x71afab)break;else _0x11b170['push'](_0x11b170['shift']());}catch(_0x2ac4cd){_0x11b170['push'](_0x11b170['shift']());}}}(a21_0xdf38,0x39d22));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function a21_0xdf38(){const _0x47ab02=['No\x20apps\x20configured','25ZpPRTP','list','object','boolean','defaultApp','10UkZPcZ','1263492RuBqYF','mergedCli','global','length','\x20in\x20','84426dCgQPT','globalConfig','isCurrent','project','90THuGfS','List\x20all\x20configured\x20apps','1235780JshknX','projectPath','112321WZDkWb','merged','entries','bool','3932892OmBucl','push','inherit','.\x20Use\x20`','8TDKlBT','76547ApLRkV','appcode','apps','globalPath','1181348dXFekf','projectConfig'];a21_0xdf38=function(){return _0x47ab02;};return a21_0xdf38();}function buildItemsFromLayer(_0x3a9694,_0x164a0a){const _0x2cf053=a21_0x4fbf,_0x615c80=[],_0x41463a=_0x3a9694[_0x2cf053(0x1ca)]&&typeof _0x3a9694[_0x2cf053(0x1ca)]===_0x2cf053(0x1ae)?_0x3a9694[_0x2cf053(0x1ca)]:{},_0x122c72=_0x3a9694[_0x2cf053(0x1b0)]||undefined;for(const [_0x24b5aa,_0x227758]of Object[_0x2cf053(0x1c1)](_0x41463a)){if(!_0x227758||typeof _0x227758!==_0x2cf053(0x1ae)||!_0x227758[_0x2cf053(0x1c9)])continue;_0x615c80[_0x2cf053(0x1c4)]({'name':_0x24b5aa,'appcode':_0x227758['appcode'],'named':!![],'definedIn':_0x164a0a,'isDefault':_0x24b5aa===_0x122c72,...buildAppProfileListFields(_0x227758)});}return _0x615c80;}function buildMergedItems(_0x20bbc4,_0x2bf6b2){const _0xac6a87=a21_0x4fbf,{apps:apps={},defaultApp:_0x4218d2}=_0x20bbc4,_0x17dba8=_0x2bf6b2[_0xac6a87(0x1b8)][_0xac6a87(0x1ca)]&&typeof _0x2bf6b2[_0xac6a87(0x1b8)][_0xac6a87(0x1ca)]===_0xac6a87(0x1ae)?_0x2bf6b2['globalConfig'][_0xac6a87(0x1ca)]:{},_0x410663=_0x2bf6b2['projectConfig'][_0xac6a87(0x1ca)]&&typeof _0x2bf6b2['projectConfig']['apps']===_0xac6a87(0x1ae)?_0x2bf6b2['projectConfig'][_0xac6a87(0x1ca)]:{},_0x30a289=_0x2bf6b2[_0xac6a87(0x1cd)][_0xac6a87(0x1c5)]===![],_0x2f84fc=Object[_0xac6a87(0x1c1)](apps),_0x1781af=_0x2f84fc['map'](([_0x1c81ff,_0x44fb90])=>({'name':_0x1c81ff,'appcode':_0x44fb90[_0xac6a87(0x1c9)],'named':!![],'definedIn':appDefinedIn(_0x1c81ff,_0x17dba8,_0x410663,_0x30a289),'isDefault':_0x1c81ff===_0x4218d2,...buildAppProfileListFields(_0x44fb90)}));return _0x1781af;}async function execute(_0x26dddb){const _0xd57b01=a21_0x4fbf,_0x38b918=_0x26dddb[_0xd57b01(0x1c2)](_0xd57b01(0x1b4)),_0x3d92b6=_0x26dddb['bool']('project'),_0x222288=_0x38b918?_0xd57b01(0x1b4):_0x3d92b6?_0xd57b01(0x1ba):_0xd57b01(0x1c0),{config:_0x3b1752,layers:_0x142f58}=readRawConfigWithLayers(),_0x5896d9=resolveDefaultAppSource(_0x142f58),{defaultApp:_0x471359}=_0x3b1752;let _0xe74a65,_0x298240;switch(_0x222288){case _0xd57b01(0x1b4):_0xe74a65=buildItemsFromLayer(_0x142f58[_0xd57b01(0x1b8)],'global'),_0x298240=_0x142f58[_0xd57b01(0x1cb)];break;case _0xd57b01(0x1ba):_0xe74a65=buildItemsFromLayer(_0x142f58[_0xd57b01(0x1cd)],_0xd57b01(0x1ba)),_0x298240=_0x142f58[_0xd57b01(0x1be)];break;default:_0xe74a65=buildMergedItems(_0x3b1752,_0x142f58);break;}enrichAppListItemsWithMergedSelection(_0xe74a65,_0x26dddb[_0xd57b01(0x1b3)]);if(_0xe74a65[_0xd57b01(0x1b5)]===0x0){const _0x5b2c94=_0x222288===_0xd57b01(0x1c0)?'':_0xd57b01(0x1b6)+_0x222288+'\x20config';return{'ok':!![],'data':[],'message':_0xd57b01(0x1ce)+_0x5b2c94+_0xd57b01(0x1c6)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x3f73ee=_0xe74a65['find'](_0x56df35=>_0x56df35[_0xd57b01(0x1b9)]===!![]),_0x433eaf=_0x471359??_0x3f73ee?.['appcode']??null,_0x2edc00=_0x222288===_0xd57b01(0x1c0)?{'globalPath':_0x142f58['globalPath']??null,'projectPath':_0x142f58['projectPath']??null,'defaultApp':_0x433eaf,'defaultAppSource':_0x471359!=null?_0x5896d9:null}:{'scope':_0x222288,'configPath':_0x298240??null};return{'ok':!![],'data':{'items':_0xe74a65,'meta':_0x2edc00}};}export const appListDefinition={'service':'app','command':a21_0x40d94f(0x1ad),'description':a21_0x40d94f(0x1bc),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x40d94f(0x1b4),'type':a21_0x40d94f(0x1af),'description':'Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','default':![]},{'name':a21_0x40d94f(0x1ba),'type':'boolean','description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],'execute':execute};
1
+ const a21_0x5444ef=a21_0x3959;(function(_0x536fa3,_0x2b14d3){const _0x21f3b4=a21_0x3959,_0x5e8580=_0x536fa3();while(!![]){try{const _0x49a9c4=parseInt(_0x21f3b4(0x101))/0x1*(parseInt(_0x21f3b4(0x100))/0x2)+-parseInt(_0x21f3b4(0xff))/0x3+parseInt(_0x21f3b4(0x113))/0x4*(parseInt(_0x21f3b4(0x10d))/0x5)+-parseInt(_0x21f3b4(0x119))/0x6+-parseInt(_0x21f3b4(0x10e))/0x7+-parseInt(_0x21f3b4(0xfd))/0x8+parseInt(_0x21f3b4(0xfe))/0x9;if(_0x49a9c4===_0x2b14d3)break;else _0x5e8580['push'](_0x5e8580['shift']());}catch(_0x3d915b){_0x5e8580['push'](_0x5e8580['shift']());}}}(a21_0x51ec,0xb1953));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';function a21_0x51ec(){const _0x61ade2=['global','mergedCli','bool','entries','List\x20all\x20configured\x20apps','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','No\x20apps\x20configured','length','push','projectPath','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','13245ctBUin','7878451VymfJS','apps','app','project','boolean','172FRiASQ','list','object','appcode','find','.\x20Use\x20`','6782808uKSrhH','globalConfig','merged','\x20in\x20','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','projectConfig','11376664nEDUXf','42736221GYWBzF','3076746tIjOpk','126362oFBufD','9DKblBC'];a21_0x51ec=function(){return _0x61ade2;};return a21_0x51ec();}function a21_0x3959(_0x4e1f2e,_0x495431){_0x4e1f2e=_0x4e1f2e-0xfd;const _0x51ec97=a21_0x51ec();let _0x395931=_0x51ec97[_0x4e1f2e];return _0x395931;}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function buildItemsFromLayer(_0x568afb,_0x3e8aa2){const _0x9798ea=a21_0x3959,_0x2ebab3=[],_0x698d43=_0x568afb[_0x9798ea(0x10f)]&&typeof _0x568afb[_0x9798ea(0x10f)]==='object'?_0x568afb[_0x9798ea(0x10f)]:{},_0xc5661b=_0x568afb['defaultApp']||undefined;for(const [_0x353a9e,_0x5bf4f1]of Object[_0x9798ea(0x105)](_0x698d43)){if(!_0x5bf4f1||typeof _0x5bf4f1!=='object'||!_0x5bf4f1[_0x9798ea(0x116)])continue;_0x2ebab3[_0x9798ea(0x10a)]({'name':_0x353a9e,'appcode':_0x5bf4f1[_0x9798ea(0x116)],'named':!![],'definedIn':_0x3e8aa2,'isDefault':_0x353a9e===_0xc5661b,...buildAppProfileListFields(_0x5bf4f1)});}return _0x2ebab3;}function buildMergedItems(_0xa44878,_0x53fa22){const _0x693550=a21_0x3959,{apps:apps={},defaultApp:_0x4aa71d}=_0xa44878,_0x49f05a=_0x53fa22['globalConfig'][_0x693550(0x10f)]&&typeof _0x53fa22[_0x693550(0x11a)][_0x693550(0x10f)]===_0x693550(0x115)?_0x53fa22[_0x693550(0x11a)][_0x693550(0x10f)]:{},_0x5cd5cd=_0x53fa22['projectConfig'][_0x693550(0x10f)]&&typeof _0x53fa22['projectConfig'][_0x693550(0x10f)]===_0x693550(0x115)?_0x53fa22[_0x693550(0x11e)][_0x693550(0x10f)]:{},_0x3442bd=_0x53fa22[_0x693550(0x11e)]['inherit']===![],_0x44f38d=Object[_0x693550(0x105)](apps),_0x43853a=_0x44f38d['map'](([_0x5346aa,_0x1feae3])=>({'name':_0x5346aa,'appcode':_0x1feae3[_0x693550(0x116)],'named':!![],'definedIn':appDefinedIn(_0x5346aa,_0x49f05a,_0x5cd5cd,_0x3442bd),'isDefault':_0x5346aa===_0x4aa71d,...buildAppProfileListFields(_0x1feae3)}));return _0x43853a;}async function execute(_0x2db6fa){const _0x270a5e=a21_0x3959,_0x427985=_0x2db6fa['bool'](_0x270a5e(0x102)),_0x6bbfd2=_0x2db6fa[_0x270a5e(0x104)](_0x270a5e(0x111)),_0x2c2011=_0x427985?_0x270a5e(0x102):_0x6bbfd2?_0x270a5e(0x111):'merged',{config:_0x173013,layers:_0x2feab4}=readRawConfigWithLayers(),_0x2473e9=resolveDefaultAppSource(_0x2feab4),{defaultApp:_0x34dc09}=_0x173013;let _0x2b8148,_0x479ff1;switch(_0x2c2011){case'global':_0x2b8148=buildItemsFromLayer(_0x2feab4[_0x270a5e(0x11a)],_0x270a5e(0x102)),_0x479ff1=_0x2feab4['globalPath'];break;case _0x270a5e(0x111):_0x2b8148=buildItemsFromLayer(_0x2feab4[_0x270a5e(0x11e)],_0x270a5e(0x111)),_0x479ff1=_0x2feab4[_0x270a5e(0x10b)];break;default:_0x2b8148=buildMergedItems(_0x173013,_0x2feab4);break;}enrichAppListItemsWithMergedSelection(_0x2b8148,_0x2db6fa[_0x270a5e(0x103)]);if(_0x2b8148[_0x270a5e(0x109)]===0x0){const _0x54a200=_0x2c2011==='merged'?'':_0x270a5e(0x11c)+_0x2c2011+'\x20config';return{'ok':!![],'data':[],'message':_0x270a5e(0x108)+_0x54a200+_0x270a5e(0x118)+CLI_BIN_NAME+_0x270a5e(0x107)};}const _0x3971ab=_0x2b8148[_0x270a5e(0x117)](_0x49e01b=>_0x49e01b['isCurrent']===!![]),_0x56ad59=_0x34dc09??_0x3971ab?.[_0x270a5e(0x116)]??null,_0x55f6ef=_0x2c2011===_0x270a5e(0x11b)?{'globalPath':_0x2feab4['globalPath']??null,'projectPath':_0x2feab4[_0x270a5e(0x10b)]??null,'defaultApp':_0x56ad59,'defaultAppSource':_0x34dc09!=null?_0x2473e9:null}:{'scope':_0x2c2011,'configPath':_0x479ff1??null};return{'ok':!![],'data':{'items':_0x2b8148,'meta':_0x55f6ef}};}export const appListDefinition={'service':a21_0x5444ef(0x110),'command':a21_0x5444ef(0x114),'description':a21_0x5444ef(0x106),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x5444ef(0x102),'type':a21_0x5444ef(0x112),'description':a21_0x5444ef(0x11d),'default':![]},{'name':a21_0x5444ef(0x111),'type':a21_0x5444ef(0x112),'description':a21_0x5444ef(0x10c),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a22_0x59f42c=a22_0x3fe2;(function(_0x2baae7,_0x504e23){const _0x1b2938=a22_0x3fe2,_0x5ba7b3=_0x2baae7();while(!![]){try{const _0x4a1572=parseInt(_0x1b2938(0x1c6))/0x1+parseInt(_0x1b2938(0x1d1))/0x2+parseInt(_0x1b2938(0x1c9))/0x3*(parseInt(_0x1b2938(0x1c5))/0x4)+-parseInt(_0x1b2938(0x1ba))/0x5*(parseInt(_0x1b2938(0x1ce))/0x6)+parseInt(_0x1b2938(0x1aa))/0x7*(-parseInt(_0x1b2938(0x1c8))/0x8)+-parseInt(_0x1b2938(0x1cf))/0x9*(parseInt(_0x1b2938(0x1b7))/0xa)+parseInt(_0x1b2938(0x1c1))/0xb;if(_0x4a1572===_0x504e23)break;else _0x5ba7b3['push'](_0x5ba7b3['shift']());}catch(_0x32ce27){_0x5ba7b3['push'](_0x5ba7b3['shift']());}}}(a22_0x2442,0x8c699));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x3fe2(_0x104920,_0x3c6221){_0x104920=_0x104920-0x1aa;const _0x2442d3=a22_0x2442();let _0x3fe28c=_0x2442d3[_0x104920];return _0x3fe28c;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';async function validateArgs(_0x3a38dc){const _0x4c5395=a22_0x3fe2,_0x26f61e=_0x3a38dc[_0x4c5395(0x1ad)][0x0]?.[_0x4c5395(0x1ae)]();if(!_0x26f61e)throw CliErrors[_0x4c5395(0x1c2)](_0x4c5395(0x1b9),_0x4c5395(0x1b6)+CLI_BIN_NAME+_0x4c5395(0x1cd));}async function execute(_0x18b496){const _0x2b3e7b=a22_0x3fe2,_0x5528eb=_0x18b496[_0x2b3e7b(0x1ad)][0x0]?.[_0x2b3e7b(0x1ae)]();if(!_0x5528eb)throw CliErrors[_0x2b3e7b(0x1c2)](_0x2b3e7b(0x1b9),_0x2b3e7b(0x1b6)+CLI_BIN_NAME+_0x2b3e7b(0x1cd));const _0x150973=_0x18b496[_0x2b3e7b(0x1b3)](_0x2b3e7b(0x1d0)),{config:_0x225f31,layers:_0x5aaad8}=readRawConfigWithLayers(),_0x1092eb=_0x225f31[_0x2b3e7b(0x1cb)]??{};if(!_0x1092eb[_0x5528eb])throw CliErrors[_0x2b3e7b(0x1c2)]('App\x20\x22'+_0x5528eb+_0x2b3e7b(0x1be));const _0x348608=_0x5aaad8[_0x2b3e7b(0x1c4)][_0x2b3e7b(0x1cb)]&&typeof _0x5aaad8[_0x2b3e7b(0x1c4)]['apps']===_0x2b3e7b(0x1ac)?_0x5aaad8[_0x2b3e7b(0x1c4)]['apps']:{},_0x323878=_0x5aaad8[_0x2b3e7b(0x1ca)][_0x2b3e7b(0x1cb)]&&typeof _0x5aaad8['projectConfig'][_0x2b3e7b(0x1cb)]===_0x2b3e7b(0x1ac)?_0x5aaad8[_0x2b3e7b(0x1ca)]['apps']:{},_0x4fcad5=appDefinedIn(_0x5528eb,_0x348608,_0x323878,_0x5aaad8[_0x2b3e7b(0x1ca)][_0x2b3e7b(0x1b1)]===![]),_0x334d51=resolveAppScopeForWrite(_0x5528eb,_0x150973,_0x5aaad8),_0x23edac={'global':_0x334d51==='global'},_0x5ba8f1=readConfig(_0x23edac),_0x475e20=_0x5ba8f1[_0x2b3e7b(0x1cb)];if(!_0x475e20||!_0x475e20[_0x5528eb])throw CliErrors['validation'](_0x2b3e7b(0x1c3)+_0x5528eb+_0x2b3e7b(0x1be));delete _0x475e20[_0x5528eb];let _0x47834e='';if(_0x5ba8f1[_0x2b3e7b(0x1b0)]===_0x5528eb){const _0x112615=Object[_0x2b3e7b(0x1bb)](_0x475e20);_0x5ba8f1[_0x2b3e7b(0x1b0)]=_0x112615[_0x2b3e7b(0x1c0)]>0x0?_0x112615[0x0]:undefined,_0x5ba8f1[_0x2b3e7b(0x1b0)]?_0x47834e='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x5ba8f1[_0x2b3e7b(0x1b0)]+'\x22.':delete _0x5ba8f1[_0x2b3e7b(0x1b0)];}Object[_0x2b3e7b(0x1bb)](_0x475e20)[_0x2b3e7b(0x1c0)]===0x0&&(delete _0x5ba8f1['apps'],delete _0x5ba8f1[_0x2b3e7b(0x1b0)]);writeConfig(_0x5ba8f1,_0x23edac);const _0x334d26=_0x4fcad5===_0x2b3e7b(0x1bc)?'\x20Note:\x20app\x20\x22'+_0x5528eb+_0x2b3e7b(0x1b2)+(_0x334d51===_0x2b3e7b(0x1b4)?_0x2b3e7b(0x1d0):'project')+_0x2b3e7b(0x1b8):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x5528eb+'\x22'+scopeLabel(_0x23edac)+'.'+_0x47834e+_0x334d26};}export const appRemoveDefinition={'service':a22_0x59f42c(0x1b5),'command':a22_0x59f42c(0x1bf),'description':a22_0x59f42c(0x1ab),'risk':a22_0x59f42c(0x1cc),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a22_0x59f42c(0x1c7),'description':a22_0x59f42c(0x1af),'required':!![]}],'flags':[{'name':a22_0x59f42c(0x1d0),'type':a22_0x59f42c(0x1bd),'description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};function a22_0x2442(){const _0x3a8a82=['Usage:\x20','1212610kcoycs','\x20config.','Missing\x20app\x20name.','28385kmgJpR','keys','both','boolean','\x22\x20not\x20found.','remove','length','2459897yXgGdL','validation','App\x20\x22','globalConfig','6320LoiQMd','956614GkZcOz','name','32JawmzG','1368RNNJGA','projectConfig','apps','high-risk-write','\x20app\x20remove\x20<name>\x20[--global]','654aGdljv','72TYkRzn','global','2085946xXXKsM','1364447ZysvGB','Remove\x20an\x20app\x20from\x20config','object','args','trim','App\x20profile\x20name\x20to\x20remove','defaultApp','inherit','\x22\x20still\x20defined\x20in\x20','bool','project','app'];a22_0x2442=function(){return _0x3a8a82;};return a22_0x2442();}
1
+ function a22_0x2d55(_0x1e319f,_0x52f279){_0x1e319f=_0x1e319f-0x161;const _0x2b7203=a22_0x2b72();let _0x2d5599=_0x2b7203[_0x1e319f];return _0x2d5599;}const a22_0x30aaae=a22_0x2d55;(function(_0x2f47c3,_0x4ac627){const _0x4c1375=a22_0x2d55,_0x3fd691=_0x2f47c3();while(!![]){try{const _0x29f6d0=-parseInt(_0x4c1375(0x187))/0x1*(parseInt(_0x4c1375(0x185))/0x2)+parseInt(_0x4c1375(0x170))/0x3+parseInt(_0x4c1375(0x174))/0x4*(-parseInt(_0x4c1375(0x164))/0x5)+parseInt(_0x4c1375(0x166))/0x6*(-parseInt(_0x4c1375(0x16d))/0x7)+parseInt(_0x4c1375(0x16a))/0x8*(parseInt(_0x4c1375(0x173))/0x9)+parseInt(_0x4c1375(0x179))/0xa+parseInt(_0x4c1375(0x163))/0xb;if(_0x29f6d0===_0x4ac627)break;else _0x3fd691['push'](_0x3fd691['shift']());}catch(_0x5ad55d){_0x3fd691['push'](_0x3fd691['shift']());}}}(a22_0x2b72,0x742ce));import{CliErrors}from'../../errors.js';function a22_0x2b72(){const _0x56c22a=['object','args','Removed\x20app\x20\x22','App\x20\x22','validation','\x20config.','globalConfig','\x22\x20not\x20found.','103498gowCnF','apps','2qpAfBt','trim','\x20Note:\x20app\x20\x22','2419813FTYvWa','5mzAxPw','global','6yJnLgA','project','defaultApp','both','8YDqfei','app','keys','3875312JXcFzL','remove','bool','771180pAPGWt','projectConfig','\x20app\x20remove\x20<name>\x20[--global]','5083803XcaQiB','844040kGyKYA','App\x20profile\x20name\x20to\x20remove','name','Use\x20global\x20config\x20scope','Missing\x20app\x20name.','3020680GLvCjX','Remove\x20an\x20app\x20from\x20config','Usage:\x20','length'];a22_0x2b72=function(){return _0x56c22a;};return a22_0x2b72();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';async function validateArgs(_0x2c8be9){const _0x36f008=a22_0x2d55,_0x33a1c8=_0x2c8be9[_0x36f008(0x17e)][0x0]?.['trim']();if(!_0x33a1c8)throw CliErrors[_0x36f008(0x181)]('Missing\x20app\x20name.',_0x36f008(0x17b)+CLI_BIN_NAME+_0x36f008(0x172));}async function execute(_0x44eefe){const _0xccb31b=a22_0x2d55,_0x148469=_0x44eefe[_0xccb31b(0x17e)][0x0]?.[_0xccb31b(0x161)]();if(!_0x148469)throw CliErrors[_0xccb31b(0x181)](_0xccb31b(0x178),_0xccb31b(0x17b)+CLI_BIN_NAME+_0xccb31b(0x172));const _0x17819d=_0x44eefe[_0xccb31b(0x16f)](_0xccb31b(0x165)),{config:_0x4f90b1,layers:_0xcb4057}=readRawConfigWithLayers(),_0x2f932c=_0x4f90b1[_0xccb31b(0x186)]??{};if(!_0x2f932c[_0x148469])throw CliErrors[_0xccb31b(0x181)](_0xccb31b(0x180)+_0x148469+_0xccb31b(0x184));const _0x2814d2=_0xcb4057[_0xccb31b(0x183)]['apps']&&typeof _0xcb4057[_0xccb31b(0x183)][_0xccb31b(0x186)]===_0xccb31b(0x17d)?_0xcb4057[_0xccb31b(0x183)]['apps']:{},_0x554c07=_0xcb4057[_0xccb31b(0x171)]['apps']&&typeof _0xcb4057[_0xccb31b(0x171)][_0xccb31b(0x186)]===_0xccb31b(0x17d)?_0xcb4057[_0xccb31b(0x171)][_0xccb31b(0x186)]:{},_0x553350=appDefinedIn(_0x148469,_0x2814d2,_0x554c07,_0xcb4057[_0xccb31b(0x171)]['inherit']===![]),_0x1f4c2e=resolveAppScopeForWrite(_0x148469,_0x17819d,_0xcb4057),_0x134aba={'global':_0x1f4c2e===_0xccb31b(0x165)},_0x1ab8c8=readConfig(_0x134aba),_0x4f921a=_0x1ab8c8[_0xccb31b(0x186)];if(!_0x4f921a||!_0x4f921a[_0x148469])throw CliErrors[_0xccb31b(0x181)](_0xccb31b(0x180)+_0x148469+_0xccb31b(0x184));delete _0x4f921a[_0x148469];let _0x240fc5='';if(_0x1ab8c8[_0xccb31b(0x168)]===_0x148469){const _0x43059f=Object[_0xccb31b(0x16c)](_0x4f921a);_0x1ab8c8[_0xccb31b(0x168)]=_0x43059f[_0xccb31b(0x17c)]>0x0?_0x43059f[0x0]:undefined,_0x1ab8c8['defaultApp']?_0x240fc5='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x1ab8c8['defaultApp']+'\x22.':delete _0x1ab8c8[_0xccb31b(0x168)];}Object[_0xccb31b(0x16c)](_0x4f921a)['length']===0x0&&(delete _0x1ab8c8[_0xccb31b(0x186)],delete _0x1ab8c8[_0xccb31b(0x168)]);writeConfig(_0x1ab8c8,_0x134aba);const _0x3e2957=_0x553350===_0xccb31b(0x169)?_0xccb31b(0x162)+_0x148469+'\x22\x20still\x20defined\x20in\x20'+(_0x1f4c2e===_0xccb31b(0x167)?'global':'project')+_0xccb31b(0x182):'';return{'ok':!![],'message':_0xccb31b(0x17f)+_0x148469+'\x22'+scopeLabel(_0x134aba)+'.'+_0x240fc5+_0x3e2957};}export const appRemoveDefinition={'service':a22_0x30aaae(0x16b),'command':a22_0x30aaae(0x16e),'description':a22_0x30aaae(0x17a),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a22_0x30aaae(0x176),'description':a22_0x30aaae(0x175),'required':!![]}],'flags':[{'name':a22_0x30aaae(0x165),'type':'boolean','description':a22_0x30aaae(0x177),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- function a23_0x364c(_0x59152a,_0x129b81){_0x59152a=_0x59152a-0x86;const _0xa4eea4=a23_0xa4ee();let _0x364cd4=_0xa4eea4[_0x59152a];return _0x364cd4;}(function(_0x15298e,_0x19fb5c){const _0x2cf201=a23_0x364c,_0x343d27=_0x15298e();while(!![]){try{const _0x14d72e=parseInt(_0x2cf201(0x92))/0x1*(-parseInt(_0x2cf201(0xa3))/0x2)+parseInt(_0x2cf201(0x91))/0x3+parseInt(_0x2cf201(0x8a))/0x4*(parseInt(_0x2cf201(0x96))/0x5)+-parseInt(_0x2cf201(0x99))/0x6*(parseInt(_0x2cf201(0x8f))/0x7)+-parseInt(_0x2cf201(0xa2))/0x8+-parseInt(_0x2cf201(0x9f))/0x9*(parseInt(_0x2cf201(0x95))/0xa)+parseInt(_0x2cf201(0x86))/0xb;if(_0x14d72e===_0x19fb5c)break;else _0x343d27['push'](_0x343d27['shift']());}catch(_0x20e3ed){_0x343d27['push'](_0x343d27['shift']());}}}(a23_0xa4ee,0x45dee));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x48f35f,_0x1e6540){const _0x2353fb=a23_0x364c;if(!_0x1e6540)return;const _0x3f12a2=_0x1e6540[_0x2353fb(0x8d)]&&typeof _0x1e6540[_0x2353fb(0x8d)]===_0x2353fb(0x9a)?_0x1e6540['apps']:{},_0x5c6a50=Object[_0x2353fb(0xa0)](_0x3f12a2)[_0x2353fb(0x8e)]>0x0;for(const _0x22a07c of _0x48f35f){_0x22a07c[_0x2353fb(0x93)]=![];}const _0x3a84c8=_0x1e6540[_0x2353fb(0x90)]!=null?String(_0x1e6540[_0x2353fb(0x90)])['trim']():'';if(_0x5c6a50){const _0x5a71d5=_0x1e6540[_0x2353fb(0x88)]??_0x1e6540[_0x2353fb(0x89)];if(_0x5a71d5)for(const _0x34d0e4 of _0x48f35f){_0x34d0e4['named']===!![]&&_0x34d0e4[_0x2353fb(0xa1)]===_0x5a71d5&&(_0x34d0e4[_0x2353fb(0x93)]=!![]);}for(const _0x338407 of _0x48f35f){if(_0x338407[_0x2353fb(0x9e)]!==![])continue;if(_0x1e6540[_0x2353fb(0x89)])continue;_0x3a84c8&&String(_0x338407[_0x2353fb(0x97)]??'')[_0x2353fb(0x94)]()===_0x3a84c8&&(_0x338407[_0x2353fb(0x93)]=!![]);}return;}if(!_0x3a84c8)return;for(const _0xc87f7e of _0x48f35f){String(_0xc87f7e[_0x2353fb(0x97)]??'')['trim']()===_0x3a84c8&&(_0xc87f7e[_0x2353fb(0x93)]=!![]);}}export function resolveAppScopeForWrite(_0x523766,_0x43c3ad,_0x16e9e5){const _0x86f486=a23_0x364c;if(_0x43c3ad)return _0x86f486(0x9d);const _0x5067f9=_0x16e9e5['projectConfig']['apps']&&typeof _0x16e9e5['projectConfig'][_0x86f486(0x8d)]===_0x86f486(0x9a)?_0x16e9e5['projectConfig'][_0x86f486(0x8d)]:{},_0x524e5a=_0x16e9e5['globalConfig'][_0x86f486(0x8d)]&&typeof _0x16e9e5['globalConfig'][_0x86f486(0x8d)]==='object'?_0x16e9e5[_0x86f486(0x8c)][_0x86f486(0x8d)]:{};if(Object[_0x86f486(0x87)][_0x86f486(0x9c)][_0x86f486(0x9b)](_0x5067f9,_0x523766))return _0x86f486(0x98);if(Object[_0x86f486(0x87)]['hasOwnProperty']['call'](_0x524e5a,_0x523766))return _0x86f486(0x9d);return _0x86f486(0x98);}export function appDefinedIn(_0x3798ae,_0x420ce8,_0x1c18a4,_0x55363c){const _0x38a7d7=a23_0x364c;if(_0x55363c)return Object[_0x38a7d7(0x87)][_0x38a7d7(0x9c)][_0x38a7d7(0x9b)](_0x1c18a4,_0x3798ae)?'project':_0x38a7d7(0x9d);const _0x20c186=Object[_0x38a7d7(0x87)][_0x38a7d7(0x9c)][_0x38a7d7(0x9b)](_0x420ce8,_0x3798ae),_0x20aa74=Object[_0x38a7d7(0x87)][_0x38a7d7(0x9c)][_0x38a7d7(0x9b)](_0x1c18a4,_0x3798ae);if(_0x20c186&&_0x20aa74)return'both';if(_0x20aa74)return _0x38a7d7(0x98);return _0x38a7d7(0x9d);}function a23_0xa4ee(){const _0x1e5271=['projectConfig','7217232ShGbiB','prototype','currentApp','defaultApp','15944FdzgnN','inherit','globalConfig','apps','length','259UZMxgx','appCode','1431981JBKMHW','1kTSGUw','isCurrent','trim','115370JzOSBK','95tjAjYu','appcode','project','27678AEzQjx','object','call','hasOwnProperty','global','named','342LpHbdS','keys','name','1456GXcGGc','627428WeMYLE'];a23_0xa4ee=function(){return _0x1e5271;};return a23_0xa4ee();}export function resolveDefaultAppSource(_0xdbfdb1){const _0x43fdf4=a23_0x364c,_0xdfd63b=_0xdbfdb1[_0x43fdf4(0xa4)]['apps']&&typeof _0xdbfdb1[_0x43fdf4(0xa4)][_0x43fdf4(0x8d)]===_0x43fdf4(0x9a)?_0xdbfdb1[_0x43fdf4(0xa4)][_0x43fdf4(0x8d)]:{};if(_0x43fdf4(0x89)in _0xdbfdb1[_0x43fdf4(0xa4)])return _0x43fdf4(0x98);if(Object[_0x43fdf4(0xa0)](_0xdfd63b)['length']>0x0)return _0x43fdf4(0x98);if(_0xdbfdb1[_0x43fdf4(0xa4)][_0x43fdf4(0x8b)]===![])return null;if(_0xdbfdb1[_0x43fdf4(0x8c)][_0x43fdf4(0x89)])return _0x43fdf4(0x9d);return null;}export function getConfigPath(_0x4e30d0={}){const _0x274ae4=a23_0x364c,_0x268f13=_0x4e30d0[_0x274ae4(0x9d)]?_0x274ae4(0x9d):_0x274ae4(0x98);return resolveWriteConfigPath(_0x268f13);}export function readConfig(_0x53fabe={}){return readConfigFile(getConfigPath(_0x53fabe));}export function writeConfig(_0x4db50e,_0x196ccc={}){writeConfigFile(getConfigPath(_0x196ccc),_0x4db50e);}export function scopeLabel(_0x39bbb6){const _0x2d123e=a23_0x364c;return _0x39bbb6[_0x2d123e(0x9d)]?'\x20(global)':'';}
1
+ (function(_0x559244,_0x3e3ce9){const _0x5d6150=a23_0x1731,_0x4a7060=_0x559244();while(!![]){try{const _0x27f502=-parseInt(_0x5d6150(0x149))/0x1*(parseInt(_0x5d6150(0x158))/0x2)+-parseInt(_0x5d6150(0x153))/0x3+-parseInt(_0x5d6150(0x15a))/0x4*(parseInt(_0x5d6150(0x156))/0x5)+parseInt(_0x5d6150(0x14b))/0x6+parseInt(_0x5d6150(0x13d))/0x7*(-parseInt(_0x5d6150(0x13e))/0x8)+-parseInt(_0x5d6150(0x145))/0x9+parseInt(_0x5d6150(0x154))/0xa;if(_0x27f502===_0x3e3ce9)break;else _0x4a7060['push'](_0x4a7060['shift']());}catch(_0x153e09){_0x4a7060['push'](_0x4a7060['shift']());}}}(a23_0x497a,0x4ab9e));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x27c7bf,_0x1d679d){const _0x17bdff=a23_0x1731;if(!_0x1d679d)return;const _0x253022=_0x1d679d[_0x17bdff(0x151)]&&typeof _0x1d679d[_0x17bdff(0x151)]==='object'?_0x1d679d[_0x17bdff(0x151)]:{},_0x58a2ce=Object[_0x17bdff(0x159)](_0x253022)[_0x17bdff(0x141)]>0x0;for(const _0x39c93b of _0x27c7bf){_0x39c93b[_0x17bdff(0x14a)]=![];}const _0x225da5=_0x1d679d[_0x17bdff(0x144)]!=null?String(_0x1d679d[_0x17bdff(0x144)])[_0x17bdff(0x155)]():'';if(_0x58a2ce){const _0x55caf2=_0x1d679d['currentApp']??_0x1d679d[_0x17bdff(0x14f)];if(_0x55caf2)for(const _0x6e0935 of _0x27c7bf){_0x6e0935['named']===!![]&&_0x6e0935['name']===_0x55caf2&&(_0x6e0935[_0x17bdff(0x14a)]=!![]);}for(const _0x105769 of _0x27c7bf){if(_0x105769[_0x17bdff(0x14c)]!==![])continue;if(_0x1d679d[_0x17bdff(0x14f)])continue;_0x225da5&&String(_0x105769['appcode']??'')[_0x17bdff(0x155)]()===_0x225da5&&(_0x105769[_0x17bdff(0x14a)]=!![]);}return;}if(!_0x225da5)return;for(const _0x38ccdc of _0x27c7bf){String(_0x38ccdc[_0x17bdff(0x150)]??'')[_0x17bdff(0x155)]()===_0x225da5&&(_0x38ccdc[_0x17bdff(0x14a)]=!![]);}}export function resolveAppScopeForWrite(_0x24fa9c,_0x2d9d2f,_0x905434){const _0x2a9ca1=a23_0x1731;if(_0x2d9d2f)return _0x2a9ca1(0x147);const _0xe143ec=_0x905434[_0x2a9ca1(0x142)][_0x2a9ca1(0x151)]&&typeof _0x905434[_0x2a9ca1(0x142)][_0x2a9ca1(0x151)]===_0x2a9ca1(0x146)?_0x905434[_0x2a9ca1(0x142)][_0x2a9ca1(0x151)]:{},_0x56c2bb=_0x905434[_0x2a9ca1(0x148)][_0x2a9ca1(0x151)]&&typeof _0x905434[_0x2a9ca1(0x148)][_0x2a9ca1(0x151)]===_0x2a9ca1(0x146)?_0x905434[_0x2a9ca1(0x148)][_0x2a9ca1(0x151)]:{};if(Object[_0x2a9ca1(0x152)][_0x2a9ca1(0x143)]['call'](_0xe143ec,_0x24fa9c))return'project';if(Object[_0x2a9ca1(0x152)]['hasOwnProperty']['call'](_0x56c2bb,_0x24fa9c))return _0x2a9ca1(0x147);return'project';}export function appDefinedIn(_0x20dcce,_0x13b893,_0x2742f5,_0x20fbe0){const _0x35724e=a23_0x1731;if(_0x20fbe0)return Object[_0x35724e(0x152)]['hasOwnProperty'][_0x35724e(0x13f)](_0x2742f5,_0x20dcce)?'project':'global';const _0x569eab=Object[_0x35724e(0x152)][_0x35724e(0x143)][_0x35724e(0x13f)](_0x13b893,_0x20dcce),_0x483151=Object[_0x35724e(0x152)][_0x35724e(0x143)][_0x35724e(0x13f)](_0x2742f5,_0x20dcce);if(_0x569eab&&_0x483151)return _0x35724e(0x140);if(_0x483151)return'project';return _0x35724e(0x147);}export function resolveDefaultAppSource(_0x5472c6){const _0x5d6f7a=a23_0x1731,_0x42b55d=_0x5472c6[_0x5d6f7a(0x142)]['apps']&&typeof _0x5472c6[_0x5d6f7a(0x142)][_0x5d6f7a(0x151)]==='object'?_0x5472c6[_0x5d6f7a(0x142)][_0x5d6f7a(0x151)]:{};if(_0x5d6f7a(0x14f)in _0x5472c6[_0x5d6f7a(0x142)])return _0x5d6f7a(0x14d);if(Object[_0x5d6f7a(0x159)](_0x42b55d)[_0x5d6f7a(0x141)]>0x0)return _0x5d6f7a(0x14d);if(_0x5472c6[_0x5d6f7a(0x142)][_0x5d6f7a(0x157)]===![])return null;if(_0x5472c6['globalConfig'][_0x5d6f7a(0x14f)])return _0x5d6f7a(0x147);return null;}export function getConfigPath(_0x56dbb8={}){const _0x4c12e5=a23_0x1731,_0x1edc01=_0x56dbb8[_0x4c12e5(0x147)]?'global':_0x4c12e5(0x14d);return resolveWriteConfigPath(_0x1edc01);}export function readConfig(_0x4317cc={}){return readConfigFile(getConfigPath(_0x4317cc));}function a23_0x497a(){const _0x415a8b=['object','global','globalConfig','6167VHsHtE','isCurrent','2956812gmfUFM','named','project','\x20(global)','defaultApp','appcode','apps','prototype','983685HSrWMf','18501490EisfLV','trim','1595PmxBMj','inherit','94tBZVQz','keys','7060ievJHc','4445ZMWSCq','6440SEXoXy','call','both','length','projectConfig','hasOwnProperty','appCode','3104271WuiYtb'];a23_0x497a=function(){return _0x415a8b;};return a23_0x497a();}function a23_0x1731(_0x56c144,_0x53a2e0){_0x56c144=_0x56c144-0x13d;const _0x497ab3=a23_0x497a();let _0x173151=_0x497ab3[_0x56c144];return _0x173151;}export function writeConfig(_0x16c9fc,_0x22ae81={}){writeConfigFile(getConfigPath(_0x22ae81),_0x16c9fc);}export function scopeLabel(_0x5e6d4b){const _0x260517=a23_0x1731;return _0x5e6d4b[_0x260517(0x147)]?_0x260517(0x14e):'';}
@@ -1 +1 @@
1
- const a24_0x5b5aee=a24_0x149d;(function(_0x2284dd,_0x461de3){const _0xc535a5=a24_0x149d,_0xc1e32=_0x2284dd();while(!![]){try{const _0x37e4a9=parseInt(_0xc535a5(0x1c0))/0x1+parseInt(_0xc535a5(0x1c6))/0x2+parseInt(_0xc535a5(0x1ba))/0x3*(parseInt(_0xc535a5(0x1c1))/0x4)+-parseInt(_0xc535a5(0x1b3))/0x5*(-parseInt(_0xc535a5(0x1b2))/0x6)+-parseInt(_0xc535a5(0x1af))/0x7+-parseInt(_0xc535a5(0x1bd))/0x8*(-parseInt(_0xc535a5(0x1b9))/0x9)+-parseInt(_0xc535a5(0x1bf))/0xa*(parseInt(_0xc535a5(0x1ac))/0xb);if(_0x37e4a9===_0x461de3)break;else _0xc1e32['push'](_0xc1e32['shift']());}catch(_0x157dd0){_0xc1e32['push'](_0xc1e32['shift']());}}}(a24_0x2525,0x50374));function a24_0x2525(){const _0x42fc4a=['use','4191WtJGjS','validation','Missing\x20app\x20name.','2101743QPHHJl','\x22\x20not\x20found.','\x22\x20(appcode:\x20','18QMvaUh','957050vxnKuM','Available:\x20','\x20app\x20add\x20','Usage:\x20','boolean','global','1350TNNfOW','3XIoozp','Switch\x20the\x20default\x20app','call','16056xfNFcV','App\x20\x22','41180oyEDpC','92154JXVluq','2609276PdzRFd','prototype','write','trim','\x20app\x20use\x20<name>\x20[--global]','1156036gQsVTC','join','Use\x20`','keys','bool','appcode','projectPath','App\x20profile\x20name\x20to\x20activate','app','apps','Default\x20app\x20set\x20to\x20\x22','projectConfig','args'];a24_0x2525=function(){return _0x42fc4a;};return a24_0x2525();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers,isInProject}from'../../context.js';import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x36a5a6){const _0x7340e6=a24_0x149d,_0x325e01=_0x36a5a6[_0x7340e6(0x1aa)][0x0]?.[_0x7340e6(0x1c4)]();if(!_0x325e01)throw CliErrors[_0x7340e6(0x1ad)](_0x7340e6(0x1ae),_0x7340e6(0x1b6)+CLI_BIN_NAME+_0x7340e6(0x1c5));}async function execute(_0x1a76a0){const _0x553e85=a24_0x149d,_0x5bda41=_0x1a76a0[_0x553e85(0x1aa)][0x0]?.['trim']();if(!_0x5bda41)throw CliErrors[_0x553e85(0x1ad)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x553e85(0x1c5));const _0x4a1507=_0x1a76a0[_0x553e85(0x1ca)](_0x553e85(0x1b8)),{config:_0x510014,layers:_0x2520d2}=readRawConfigWithLayers(),_0x295932=_0x510014[_0x553e85(0x1cf)]??{};if(!_0x295932[_0x5bda41]){const _0x12fd29=Object[_0x553e85(0x1c9)](_0x295932),_0x711d24=_0x12fd29['length']===0x0?_0x553e85(0x1c8)+CLI_BIN_NAME+_0x553e85(0x1b5)+_0x5bda41+'\x20--appcode\x20<code>`\x20first.':_0x553e85(0x1b4)+_0x12fd29[_0x553e85(0x1c7)](',\x20');throw CliErrors['validation'](_0x553e85(0x1be)+_0x5bda41+_0x553e85(0x1b0),_0x711d24);}let _0xedd006,_0xac5cbe='';if(_0x4a1507)_0xedd006={'global':!![]};else{const _0x4b8012=isInProject()&&!!_0x2520d2[_0x553e85(0x1cc)];_0xedd006={'global':!_0x4b8012};if(_0x4b8012){const _0x45b9fd=_0x2520d2[_0x553e85(0x1d1)][_0x553e85(0x1cf)]&&typeof _0x2520d2[_0x553e85(0x1d1)]['apps']==='object'?_0x2520d2[_0x553e85(0x1d1)][_0x553e85(0x1cf)]:{};!Object[_0x553e85(0x1c2)]['hasOwnProperty'][_0x553e85(0x1bc)](_0x45b9fd,_0x5bda41)&&(_0xac5cbe='\x0aNote:\x20\x22'+_0x5bda41+'\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.');}}const _0x4ee739=readConfig(_0xedd006);return _0x4ee739['defaultApp']=_0x5bda41,writeConfig(_0x4ee739,_0xedd006),{'ok':!![],'message':_0x553e85(0x1d0)+_0x5bda41+_0x553e85(0x1b1)+_0x295932[_0x5bda41][_0x553e85(0x1cb)]+')'+scopeLabel(_0xedd006)+_0xac5cbe};}function a24_0x149d(_0x6228d5,_0x2c95fa){_0x6228d5=_0x6228d5-0x1aa;const _0x252557=a24_0x2525();let _0x149df3=_0x252557[_0x6228d5];return _0x149df3;}export const appUseDefinition={'service':a24_0x5b5aee(0x1ce),'command':a24_0x5b5aee(0x1ab),'description':a24_0x5b5aee(0x1bb),'risk':a24_0x5b5aee(0x1c3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a24_0x5b5aee(0x1cd),'required':!![]}],'flags':[{'name':a24_0x5b5aee(0x1b8),'type':a24_0x5b5aee(0x1b7),'description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};
1
+ const a24_0x3f3c8e=a24_0xb215;(function(_0x19e118,_0x55ede5){const _0x5d6f09=a24_0xb215,_0x15a8bd=_0x19e118();while(!![]){try{const _0x149ff9=parseInt(_0x5d6f09(0x15e))/0x1*(parseInt(_0x5d6f09(0x173))/0x2)+-parseInt(_0x5d6f09(0x169))/0x3*(-parseInt(_0x5d6f09(0x161))/0x4)+-parseInt(_0x5d6f09(0x160))/0x5+parseInt(_0x5d6f09(0x163))/0x6+-parseInt(_0x5d6f09(0x155))/0x7+-parseInt(_0x5d6f09(0x170))/0x8+-parseInt(_0x5d6f09(0x164))/0x9*(-parseInt(_0x5d6f09(0x15d))/0xa);if(_0x149ff9===_0x55ede5)break;else _0x15a8bd['push'](_0x15a8bd['shift']());}catch(_0x5f93b2){_0x15a8bd['push'](_0x15a8bd['shift']());}}}(a24_0x2695,0x33422));function a24_0xb215(_0x2c0c35,_0x15d17f){_0x2c0c35=_0x2c0c35-0x155;const _0x269519=a24_0x2695();let _0xb215cf=_0x269519[_0x2c0c35];return _0xb215cf;}function a24_0x2695(){const _0x18fbf5=['app','\x20app\x20use\x20<name>\x20[--global]','App\x20profile\x20name\x20to\x20activate','675740SjEsae','2LuJGNk','Missing\x20app\x20name.','1061310ingXoq','405068Kcjahy','Usage:\x20','2244720cOAtKS','36SZmpWK','projectConfig','prototype','object','appcode','6lacNeT','\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.','join','Switch\x20the\x20default\x20app','args','Use\x20`','call','2895912rikCyH','Default\x20app\x20set\x20to\x20\x22','\x20app\x20add\x20','180508kgHDtX','\x22\x20(appcode:\x20','App\x20\x22','projectPath','\x22\x20not\x20found.','\x20--appcode\x20<code>`\x20first.','boolean','apps','hasOwnProperty','trim','1702771JLXOOj','validation','use','length','keys'];a24_0x2695=function(){return _0x18fbf5;};return a24_0x2695();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers,isInProject}from'../../context.js';import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';async function validateArgs(_0x49b075){const _0x10fcc8=a24_0xb215,_0x3baca0=_0x49b075[_0x10fcc8(0x16d)][0x0]?.[_0x10fcc8(0x17c)]();if(!_0x3baca0)throw CliErrors[_0x10fcc8(0x156)](_0x10fcc8(0x15f),_0x10fcc8(0x162)+CLI_BIN_NAME+_0x10fcc8(0x15b));}async function execute(_0x484654){const _0x3a4103=a24_0xb215,_0xf2093e=_0x484654[_0x3a4103(0x16d)][0x0]?.[_0x3a4103(0x17c)]();if(!_0xf2093e)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x3a4103(0x15b));const _0x50834a=_0x484654['bool']('global'),{config:_0x5b2416,layers:_0x2acfbb}=readRawConfigWithLayers(),_0x33b773=_0x5b2416['apps']??{};if(!_0x33b773[_0xf2093e]){const _0x341f25=Object[_0x3a4103(0x159)](_0x33b773),_0x2dd91a=_0x341f25[_0x3a4103(0x158)]===0x0?_0x3a4103(0x16e)+CLI_BIN_NAME+_0x3a4103(0x172)+_0xf2093e+_0x3a4103(0x178):'Available:\x20'+_0x341f25[_0x3a4103(0x16b)](',\x20');throw CliErrors[_0x3a4103(0x156)](_0x3a4103(0x175)+_0xf2093e+_0x3a4103(0x177),_0x2dd91a);}let _0x193a17,_0x4323f6='';if(_0x50834a)_0x193a17={'global':!![]};else{const _0xb185fa=isInProject()&&!!_0x2acfbb[_0x3a4103(0x176)];_0x193a17={'global':!_0xb185fa};if(_0xb185fa){const _0x5964b2=_0x2acfbb[_0x3a4103(0x165)][_0x3a4103(0x17a)]&&typeof _0x2acfbb['projectConfig'][_0x3a4103(0x17a)]===_0x3a4103(0x167)?_0x2acfbb[_0x3a4103(0x165)]['apps']:{};!Object[_0x3a4103(0x166)][_0x3a4103(0x17b)][_0x3a4103(0x16f)](_0x5964b2,_0xf2093e)&&(_0x4323f6='\x0aNote:\x20\x22'+_0xf2093e+_0x3a4103(0x16a));}}const _0x2c7815=readConfig(_0x193a17);return _0x2c7815['defaultApp']=_0xf2093e,writeConfig(_0x2c7815,_0x193a17),{'ok':!![],'message':_0x3a4103(0x171)+_0xf2093e+_0x3a4103(0x174)+_0x33b773[_0xf2093e][_0x3a4103(0x168)]+')'+scopeLabel(_0x193a17)+_0x4323f6};}export const appUseDefinition={'service':a24_0x3f3c8e(0x15a),'command':a24_0x3f3c8e(0x157),'description':a24_0x3f3c8e(0x16c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a24_0x3f3c8e(0x15c),'required':!![]}],'flags':[{'name':'global','type':a24_0x3f3c8e(0x179),'description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- const a25_0x2c168b=a25_0x337f;(function(_0x515760,_0x3f002d){const _0x4eef95=a25_0x337f,_0x59af78=_0x515760();while(!![]){try{const _0xf3055a=-parseInt(_0x4eef95(0xa2))/0x1*(parseInt(_0x4eef95(0xa5))/0x2)+-parseInt(_0x4eef95(0xb0))/0x3*(-parseInt(_0x4eef95(0xac))/0x4)+parseInt(_0x4eef95(0xae))/0x5*(-parseInt(_0x4eef95(0xb7))/0x6)+parseInt(_0x4eef95(0xab))/0x7*(parseInt(_0x4eef95(0xb5))/0x8)+-parseInt(_0x4eef95(0xb6))/0x9*(-parseInt(_0x4eef95(0xb2))/0xa)+-parseInt(_0x4eef95(0xaf))/0xb*(-parseInt(_0x4eef95(0xb3))/0xc)+parseInt(_0x4eef95(0xad))/0xd*(-parseInt(_0x4eef95(0xa1))/0xe);if(_0xf3055a===_0x3f002d)break;else _0x59af78['push'](_0x59af78['shift']());}catch(_0x2593e8){_0x59af78['push'](_0x59af78['shift']());}}}(a25_0x5435,0x88e49));function a25_0x5435(){const _0x5222d0=['write','!\x20Not\x20logged\x20in','auth','login','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','7vLVUcP','148340xbkOhN','143793mlstuN','1336805tjBddg','88SWtNbk','69Dnwpfo','Clear\x20login\x20session','2230KBwLbM','1666236edneyH','yes','1437256LzEJHp','18783ArBysx','6WRCaNF','✓\x20Logged\x20out','Login\x20via\x20browser','bool','882tKfulK','3985RgRQQg','nonInteractive','log','544FRsHLN'];a25_0x5435=function(){return _0x5222d0;};return a25_0x5435();}function a25_0x337f(_0x18f000,_0x4d34b4){_0x18f000=_0x18f000-0xa0;const _0x543596=a25_0x5435();let _0x337f20=_0x543596[_0x18f000];return _0x337f20;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a25_0x2c168b(0xa8),'command':a25_0x2c168b(0xa9),'description':a25_0x2c168b(0xb9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a25_0x2c168b(0xb4),'type':'boolean','description':a25_0x2c168b(0xaa),'default':![]}],async 'execute'(_0x4d375d){const _0x5ef860=a25_0x2c168b,{runAuthServer:_0x119b27}=await import('../../auth/auth-server-ui.js');return await _0x119b27({'autoYes':_0x4d375d[_0x5ef860(0xa0)]('yes'),'nonInteractive':_0x4d375d[_0x5ef860(0xa3)]}),{'ok':!![]};}},{'service':'auth','command':'logout','description':a25_0x2c168b(0xb1),'risk':a25_0x2c168b(0xa6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x452b50){const _0x11b776=a25_0x2c168b;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x11b776(0xa4)](_0x11b776(0xb8))):console[_0x11b776(0xa4)](_0x11b776(0xa7)),{'ok':!![]};}}];
1
+ const a25_0x14e08d=a25_0x7b53;(function(_0x4e1c89,_0x28ad69){const _0xd84a33=a25_0x7b53,_0x5a3902=_0x4e1c89();while(!![]){try{const _0x151e36=parseInt(_0xd84a33(0xa2))/0x1*(parseInt(_0xd84a33(0x96))/0x2)+-parseInt(_0xd84a33(0xa4))/0x3+parseInt(_0xd84a33(0x99))/0x4*(parseInt(_0xd84a33(0xa6))/0x5)+-parseInt(_0xd84a33(0xa3))/0x6+parseInt(_0xd84a33(0x9e))/0x7+-parseInt(_0xd84a33(0x9d))/0x8+parseInt(_0xd84a33(0xa5))/0x9*(-parseInt(_0xd84a33(0xa1))/0xa);if(_0x151e36===_0x28ad69)break;else _0x5a3902['push'](_0x5a3902['shift']());}catch(_0x12a698){_0x5a3902['push'](_0x5a3902['shift']());}}}(a25_0x1aa0,0x1f492));import{unlinkSync,existsSync}from'node:fs';function a25_0x1aa0(){const _0x274994=['nonInteractive','862420pRflRk','login','read','bool','523760uMblZV','641298DqHIAT','Login\x20via\x20browser','yes','257060pRAIiM','3axTxJo','964986bZsfHA','70341LZBSId','9TBVSHp','5QdEidB','Clear\x20login\x20session','write','auth','boolean','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','64254gbnnBo','log'];a25_0x1aa0=function(){return _0x274994;};return a25_0x1aa0();}function a25_0x7b53(_0x3ce31e,_0x2d8222){_0x3ce31e=_0x3ce31e-0x92;const _0x1aa0c9=a25_0x1aa0();let _0x7b532a=_0x1aa0c9[_0x3ce31e];return _0x7b532a;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a25_0x14e08d(0x93),'command':a25_0x14e08d(0x9a),'description':a25_0x14e08d(0x9f),'risk':a25_0x14e08d(0x9b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a25_0x14e08d(0xa0),'type':a25_0x14e08d(0x94),'description':a25_0x14e08d(0x95),'default':![]}],async 'execute'(_0x150899){const _0x19e720=a25_0x14e08d,{runAuthServer:_0x1bb54c}=await import('../../auth/auth-server-ui.js');return await _0x1bb54c({'autoYes':_0x150899[_0x19e720(0x9c)](_0x19e720(0xa0)),'nonInteractive':_0x150899[_0x19e720(0x98)]}),{'ok':!![]};}},{'service':a25_0x14e08d(0x93),'command':'logout','description':a25_0x14e08d(0xa7),'risk':a25_0x14e08d(0x92),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x52541d){const _0x418fed=a25_0x14e08d;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x418fed(0x97)]('✓\x20Logged\x20out')):console['log']('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a26_0x347fd2=a26_0xb46f;(function(_0x215cb6,_0x3a88a2){const _0x4236cd=a26_0xb46f,_0x4d9411=_0x215cb6();while(!![]){try{const _0x5828fd=parseInt(_0x4236cd(0x1d7))/0x1+parseInt(_0x4236cd(0x19c))/0x2+parseInt(_0x4236cd(0x1b9))/0x3+parseInt(_0x4236cd(0x1e0))/0x4*(parseInt(_0x4236cd(0x1aa))/0x5)+parseInt(_0x4236cd(0x1b7))/0x6+-parseInt(_0x4236cd(0x1b3))/0x7+parseInt(_0x4236cd(0x1c9))/0x8*(-parseInt(_0x4236cd(0x1a3))/0x9);if(_0x5828fd===_0x3a88a2)break;else _0x4d9411['push'](_0x4d9411['shift']());}catch(_0x10e06c){_0x4d9411['push'](_0x4d9411['shift']());}}}(a26_0x469f,0x44b50));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a26_0xb46f(_0x44b907,_0x5632ff){_0x44b907=_0x44b907-0x195;const _0x469fff=a26_0x469f();let _0xb46f76=_0x469fff[_0x44b907];return _0xb46f76;}function a26_0x469f(){const _0x3cc40c=['utf8','datasetCode','scriptsRootDir','question','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','stderr','function-node','\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','Trigger\x20node\x20(HOOK\x20only)','includes','Alias\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','198342GQNOao','Invalid\x20function\x20name\x20\x22','Select\x20dataset:','tableName','stdin','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','18INooYx','COMMON','Dataset\x20not\x20found\x20for\x20code\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','trim','Script\x20type','after','62710KiPQGT','Select\x20trigger\x20node:','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Script\x20description','parseInt','before','functionNode','code','Available:\x20','3023629JfzZut','operationType','Invalid\x20dataset\x20selection.','join','3364626HyTSbf','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','1603614WIypeT','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','apiDir','.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','write','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','name','map','validation','ENDPOINT','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','close','string','Operation\x20type\x20(HOOK\x20only)','No\x20datasets\x20found\x20for\x20this\x20app.','length','3045048JAhXmT','Function\x20name\x20(valid\x20JS\x20identifier)','\x0a\x20*\x20[脚本名称]\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','description','TODO:\x20add\x20script\x20description','.js','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Created\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','appCode','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','\x20api\x20pull`\x20to\x20refresh.','204901fISWec','find','HOOK','No\x20operation\x20types\x20found\x20for\x20dataset\x20','No\x20api.ts\x20found.\x20Run\x20`','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','type','str','operation-type','24ZezxPa','nonInteractive','Operation\x20type\x20\x22','alias','keys','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.'];a26_0x469f=function(){return _0x3cc40c;};return a26_0x469f();}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':'bff','command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a26_0x347fd2(0x1bd),'flags':[{'name':a26_0x347fd2(0x1dd),'type':a26_0x347fd2(0x1c5),'required':!![],'enum':[a26_0x347fd2(0x1a4),a26_0x347fd2(0x1c2),a26_0x347fd2(0x1d9)],'description':a26_0x347fd2(0x1a8)},{'name':a26_0x347fd2(0x1bf),'type':'string','required':!![],'description':a26_0x347fd2(0x1ca)},{'name':a26_0x347fd2(0x1ce),'type':a26_0x347fd2(0x1c5),'description':a26_0x347fd2(0x1ad)},{'name':a26_0x347fd2(0x1e3),'type':a26_0x347fd2(0x1c5),'description':a26_0x347fd2(0x1ba)},{'name':'datasetcode','type':a26_0x347fd2(0x1c5),'description':a26_0x347fd2(0x1d3)},{'name':a26_0x347fd2(0x1df),'type':'string','description':a26_0x347fd2(0x1c6)},{'name':a26_0x347fd2(0x196),'type':'string','description':a26_0x347fd2(0x198),'enum':[a26_0x347fd2(0x1af),a26_0x347fd2(0x1a9)]}],async 'validate'(_0x4f307f){const _0x41c2c4=a26_0x347fd2,_0x48faef=_0x4f307f['str']('name');if(!isValidBffFunctionName(_0x48faef))throw CliErrors[_0x41c2c4(0x1c1)](_0x41c2c4(0x19d)+_0x48faef+_0x41c2c4(0x1d1));},async 'execute'(_0x2d8bcb){const _0x5ba7ef=a26_0x347fd2,_0x3be1df=loadBffProjectConfig(_0x2d8bcb[_0x5ba7ef(0x1d4)]),_0x46ffd6=_0x2d8bcb[_0x5ba7ef(0x1de)]('type'),_0x4b7729=_0x2d8bcb[_0x5ba7ef(0x1de)](_0x5ba7ef(0x1bf)),_0x42ea00=_0x2d8bcb[_0x5ba7ef(0x1de)](_0x5ba7ef(0x1ce))||undefined,_0x4617de=_0x46ffd6==='HOOK'?await resolveHookOptions(_0x3be1df,_0x2d8bcb):undefined,_0x20a6b0=buildFilePath(_0x3be1df,_0x46ffd6,_0x4b7729,_0x4617de);if(await fileExists(_0x20a6b0))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x20a6b0);await mkdir(dirname(_0x20a6b0),{'recursive':!![]});const _0xedf75c=generateTemplate(_0x46ffd6,_0x4b7729,_0x2d8bcb['appCode'],_0x42ea00,_0x4617de);await writeFile(_0x20a6b0,_0xedf75c,_0x5ba7ef(0x1e6));const _0x215ff7={'type':_0x46ffd6,'name':_0x4b7729,'path':_0x20a6b0};if(_0x42ea00)_0x215ff7['description']=_0x42ea00;if(_0x4617de){if(_0x4617de[_0x5ba7ef(0x1e3)])_0x215ff7['alias']=_0x4617de[_0x5ba7ef(0x1e3)];_0x215ff7[_0x5ba7ef(0x1e7)]=_0x4617de[_0x5ba7ef(0x1e7)],_0x215ff7[_0x5ba7ef(0x1b4)]=_0x4617de[_0x5ba7ef(0x1b4)],_0x215ff7[_0x5ba7ef(0x1b0)]=_0x4617de['functionNode'];}return{'ok':!![],'data':_0x215ff7,'message':_0x5ba7ef(0x1d2)+_0x46ffd6+'\x20function:\x20'+_0x4b7729};}};async function resolveHookOptions(_0x208833,_0x3470f9){const _0x8c1ff3=a26_0x347fd2,_0x544569=loadAliasMap(_0x3470f9[_0x8c1ff3(0x1bb)],undefined,resolveApiFilePath(_0x3470f9[_0x8c1ff3(0x1bb)],_0x3470f9[_0x8c1ff3(0x1d4)])),_0x36299b=_0x544569[_0x8c1ff3(0x1c8)]>0x0;let _0x15c645,_0x56e28c,_0x4adc3a;const _0x5a8dc8=_0x3470f9[_0x8c1ff3(0x1de)](_0x8c1ff3(0x1e3)),_0x30e1ec=_0x3470f9[_0x8c1ff3(0x1de)]('datasetcode');if(_0x5a8dc8){const _0x2ef05d=resolveAlias(_0x3470f9[_0x8c1ff3(0x1bb)],_0x5a8dc8,undefined,resolveApiFilePath(_0x3470f9['apiDir'],_0x3470f9['appCode']));if(!_0x2ef05d){const _0xea3d6b=_0x36299b?'Available\x20aliases:\x20'+_0x544569[_0x8c1ff3(0x1c0)](_0x17ab47=>_0x17ab47[_0x8c1ff3(0x1e3)])[_0x8c1ff3(0x1b6)](',\x20'):_0x8c1ff3(0x1db)+CLI_BIN_NAME+_0x8c1ff3(0x1be);throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x19a)+_0x5a8dc8+'\x22\x20not\x20found.\x20'+_0xea3d6b);}_0x15c645=_0x5a8dc8,_0x56e28c=_0x2ef05d;}else{if(_0x30e1ec){_0x56e28c=_0x30e1ec;const _0x3c270e=_0x544569[_0x8c1ff3(0x1d8)](_0x12ca25=>_0x12ca25[_0x8c1ff3(0x1e7)]===_0x30e1ec);_0x15c645=_0x3c270e?.['alias'];}else{if(_0x3470f9['nonInteractive'])throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1ea));else{if(_0x36299b){const _0x557fb1=_0x544569[_0x8c1ff3(0x1c0)](_0x4e71a9=>_0x4e71a9[_0x8c1ff3(0x1e3)]+'\x20('+_0x4e71a9[_0x8c1ff3(0x19f)]+')'),_0x1db8fd=await promptSelect(_0x8c1ff3(0x19e),_0x557fb1),_0x303e45=_0x544569[_0x1db8fd];if(!_0x303e45)throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1b5));_0x15c645=_0x303e45[_0x8c1ff3(0x1e3)],_0x56e28c=_0x303e45[_0x8c1ff3(0x1e7)];}else{const _0x1d16b7=await listDatasets(_0x3470f9['appCode']);if(_0x1d16b7[_0x8c1ff3(0x1c8)]===0x0)throw CliErrors['validation'](_0x8c1ff3(0x1c7));const _0x37a0c3=_0x1d16b7[_0x8c1ff3(0x1c0)](_0x1c0031=>_0x1c0031['name']+'\x20('+_0x1c0031['code']+')'),_0x1e6589=await promptSelect(_0x8c1ff3(0x19e),_0x37a0c3),_0x1d47fa=_0x1d16b7[_0x1e6589];if(!_0x1d47fa)throw CliErrors['validation'](_0x8c1ff3(0x1b5));_0x56e28c=_0x1d47fa[_0x8c1ff3(0x1b1)],_0x15c645=undefined;}}}}const _0x50c60a=await listDatasets(_0x3470f9[_0x8c1ff3(0x1d4)]),_0x14eea0=_0x50c60a[_0x8c1ff3(0x1d8)](_0x5923a2=>_0x5923a2[_0x8c1ff3(0x1b1)]===_0x56e28c);if(!_0x14eea0)throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1a5)+_0x56e28c+'\x22.\x20'+(_0x15c645?_0x8c1ff3(0x1a1)+CLI_BIN_NAME+_0x8c1ff3(0x1d6):''));_0x4adc3a=_0x14eea0['id'];const _0x2901f6=_0x15c645??_0x56e28c,_0x48615f=await listBffDatasetOperations(_0x3470f9['appCode'],_0x4adc3a),_0x13a7c2=_0x48615f?Object[_0x8c1ff3(0x1e4)](_0x48615f):[];if(_0x13a7c2[_0x8c1ff3(0x1c8)]===0x0)throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1da)+_0x2901f6+'.');let _0x5ca240;const _0x1c36aa=_0x3470f9[_0x8c1ff3(0x1de)](_0x8c1ff3(0x1df));if(_0x1c36aa){if(!_0x13a7c2[_0x8c1ff3(0x199)](_0x1c36aa))throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1e2)+_0x1c36aa+_0x8c1ff3(0x1a6)+_0x2901f6+'.\x20'+(_0x8c1ff3(0x1b2)+_0x13a7c2[_0x8c1ff3(0x1b6)](',\x20')));_0x5ca240=_0x1c36aa;}else{if(_0x3470f9[_0x8c1ff3(0x1e1)])throw CliErrors[_0x8c1ff3(0x1c1)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x39d16=await promptSelect('Select\x20operation\x20type:',_0x13a7c2);_0x5ca240=_0x13a7c2[_0x39d16]??_0x13a7c2[0x0];}let _0x8e030d=normalizeHookFunctionNode(_0x3470f9[_0x8c1ff3(0x1de)](_0x8c1ff3(0x196)));if(!_0x8e030d){if(_0x3470f9[_0x8c1ff3(0x1de)]('function-node'))throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1dc));if(_0x3470f9['nonInteractive'])throw CliErrors[_0x8c1ff3(0x1c1)](_0x8c1ff3(0x1b8));const _0x5cc36e=await promptSelect(_0x8c1ff3(0x1ab),['before',_0x8c1ff3(0x1a9)]);_0x8e030d=[_0x8c1ff3(0x1af),_0x8c1ff3(0x1a9)][_0x5cc36e]??'before';}return{'alias':_0x15c645,'datasetCode':_0x56e28c,'datasetId':_0x4adc3a,'operationType':_0x5ca240,'functionNode':_0x8e030d};}async function promptSelect(_0x1172c0,_0x3a27fd){const _0x51b7b8=a26_0x347fd2;if(_0x3a27fd[_0x51b7b8(0x1c8)]===0x1)return 0x0;for(const [_0xd9019e,_0x16371f]of _0x3a27fd['entries']()){process[_0x51b7b8(0x195)][_0x51b7b8(0x1bd)]('\x20\x20'+(_0xd9019e+0x1)+'.\x20'+_0x16371f+'\x0a');}const _0x14a87c=createInterface({'input':process[_0x51b7b8(0x1a0)],'output':process[_0x51b7b8(0x195)]});while(!![]){const _0x134f92=await new Promise(_0x483c4e=>{const _0x92e9d0=_0x51b7b8;_0x14a87c[_0x92e9d0(0x1e9)](_0x1172c0+'\x20',_0x483c4e);}),_0x21a8c0=Number[_0x51b7b8(0x1ae)](_0x134f92[_0x51b7b8(0x1a7)](),0xa);if(Number['isInteger'](_0x21a8c0)&&_0x21a8c0>=0x1&&_0x21a8c0<=_0x3a27fd[_0x51b7b8(0x1c8)])return _0x14a87c[_0x51b7b8(0x1c4)](),_0x21a8c0-0x1;process[_0x51b7b8(0x195)]['write']('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x3a27fd['length']+'.\x0a');}}function buildFilePath(_0x27887d,_0x5c98dd,_0xd15031,_0x3e46ac){const _0xac8364=a26_0x347fd2;if(_0x5c98dd===_0xac8364(0x1d9)){if(!_0x3e46ac)throw CliErrors[_0xac8364(0x1c1)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x4a8733=_0x3e46ac[_0xac8364(0x1e3)]??_0x3e46ac[_0xac8364(0x1e7)];return join(_0x27887d[_0xac8364(0x1e8)],'HOOK',_0x4a8733,_0x3e46ac[_0xac8364(0x1b4)],_0x3e46ac[_0xac8364(0x1b0)],_0xd15031+'.js');}return join(_0x27887d[_0xac8364(0x1e8)],_0x5c98dd,_0xd15031+_0xac8364(0x1d0));}export function generateTemplate(_0x5a44f5,_0x4b33e4,_0x357f75,_0x12f880,_0x44f786){const _0x4fb141=a26_0x347fd2,_0x81018c=_0x12f880?.['trim']()||_0x4fb141(0x1cf);if(_0x5a44f5==='COMMON')return _0x4fb141(0x1cc)+_0x81018c+_0x4fb141(0x1cb)+_0x4b33e4+_0x4fb141(0x1d5)+_0x4b33e4+_0x4fb141(0x1bc)+_0x4b33e4+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x5a44f5===_0x4fb141(0x1c2))return _0x4fb141(0x1c3)+_0x81018c+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x357f75+'/'+_0x4b33e4+_0x4fb141(0x1a2)+_0x4b33e4+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x44f786)throw CliErrors[_0x4fb141(0x1c1)](_0x4fb141(0x1e5));return _0x4fb141(0x1ac)+_0x81018c+_0x4fb141(0x19b)+_0x357f75+'/'+_0x44f786[_0x4fb141(0x1e7)]+'/'+_0x44f786[_0x4fb141(0x1b4)]+'\x0a\x20*\x20[触发节点]\x20'+_0x44f786[_0x4fb141(0x1b0)]+_0x4fb141(0x197)+_0x4b33e4+_0x4fb141(0x1cd);}
1
+ function a26_0x30f1(){const _0x37ae01=['COMMON','trim','after','functionNode','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','utf8','length','operationType','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','bff','alias','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','4620gfYByI','type','File\x20already\x20exists:\x20','apiDir','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','name','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','create','str','5083904efxtmm','\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','Trigger\x20node\x20(HOOK\x20only)','.js','No\x20api.ts\x20found.\x20Run\x20`','Invalid\x20dataset\x20selection.','ENDPOINT','Select\x20dataset:','code','before','isInteger','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','15658146lkHwBN','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Operation\x20type\x20\x22','118317eEshgK','9300NTYumb','datasetcode','datasetCode','Available\x20aliases:\x20','\x22\x20not\x20found\x20for\x20dataset\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','76855GpKshB','scriptsRootDir','function-node','validation','HOOK','description','Function\x20name\x20(valid\x20JS\x20identifier)','\x20function:\x20','stderr','164zKJMvm','appCode','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\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','nonInteractive','string','join','parseInt','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','map','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Alias\x20\x22','720748oktSSN','No\x20datasets\x20found\x20for\x20this\x20app.','operation-type','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','stdin','\x22\x20not\x20found.\x20','Available:\x20','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','9947288uTGTrD','\x20api\x20pull`\x20to\x20refresh.','close','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','write','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','Script\x20type','find'];a26_0x30f1=function(){return _0x37ae01;};return a26_0x30f1();}const a26_0x490b47=a26_0x128f;(function(_0x1da032,_0x514c23){const _0x295dcf=a26_0x128f,_0x344ae6=_0x1da032();while(!![]){try{const _0x407006=parseInt(_0x295dcf(0x12c))/0x1+parseInt(_0x295dcf(0xee))/0x2+-parseInt(_0x295dcf(0x125))/0x3*(-parseInt(_0x295dcf(0xe2))/0x4)+parseInt(_0x295dcf(0x126))/0x5*(-parseInt(_0x295dcf(0x10b))/0x6)+parseInt(_0x295dcf(0x114))/0x7+parseInt(_0x295dcf(0xf6))/0x8+-parseInt(_0x295dcf(0x122))/0x9;if(_0x407006===_0x514c23)break;else _0x344ae6['push'](_0x344ae6['shift']());}catch(_0x2f9932){_0x344ae6['push'](_0x344ae6['shift']());}}}(a26_0x30f1,0xcffcd));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';function a26_0x128f(_0x59f90a,_0x2b8b2e){_0x59f90a=_0x59f90a-0xda;const _0x30f11b=a26_0x30f1();let _0x128f4f=_0x30f11b[_0x59f90a];return _0x128f4f;}import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a26_0x490b47(0x108),'command':a26_0x490b47(0x112),'description':a26_0x490b47(0xfa),'risk':'write','flags':[{'name':a26_0x490b47(0x10c),'type':'string','required':!![],'enum':[a26_0x490b47(0xff),a26_0x490b47(0x11a),a26_0x490b47(0xdd)],'description':a26_0x490b47(0xfd)},{'name':'name','type':a26_0x490b47(0xe7),'required':!![],'description':a26_0x490b47(0xdf)},{'name':a26_0x490b47(0xde),'type':a26_0x490b47(0xe7),'description':'Script\x20description'},{'name':a26_0x490b47(0x109),'type':a26_0x490b47(0xe7),'description':a26_0x490b47(0x107)},{'name':'datasetcode','type':'string','description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':a26_0x490b47(0xe7),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a26_0x490b47(0xdb),'type':a26_0x490b47(0xe7),'description':a26_0x490b47(0x116),'enum':[a26_0x490b47(0x11d),a26_0x490b47(0x101)]}],async 'validate'(_0x1140c1){const _0x438784=a26_0x490b47,_0x436915=_0x1140c1[_0x438784(0x113)](_0x438784(0x110));if(!isValidBffFunctionName(_0x436915))throw CliErrors[_0x438784(0xdc)]('Invalid\x20function\x20name\x20\x22'+_0x436915+_0x438784(0x111));},async 'execute'(_0x14029b){const _0x5016e8=a26_0x490b47,_0x5df287=loadBffProjectConfig(_0x14029b[_0x5016e8(0xe3)]),_0x2fb1cf=_0x14029b[_0x5016e8(0x113)]('type'),_0xb7b951=_0x14029b[_0x5016e8(0x113)](_0x5016e8(0x110)),_0x343b79=_0x14029b['str'](_0x5016e8(0xde))||undefined,_0x5dc177=_0x2fb1cf==='HOOK'?await resolveHookOptions(_0x5df287,_0x14029b):undefined,_0x4a6d79=buildFilePath(_0x5df287,_0x2fb1cf,_0xb7b951,_0x5dc177);if(await fileExists(_0x4a6d79))throw CliErrors[_0x5016e8(0xdc)](_0x5016e8(0x10d)+_0x4a6d79);await mkdir(dirname(_0x4a6d79),{'recursive':!![]});const _0x305468=generateTemplate(_0x2fb1cf,_0xb7b951,_0x14029b[_0x5016e8(0xe3)],_0x343b79,_0x5dc177);await writeFile(_0x4a6d79,_0x305468,_0x5016e8(0x104));const _0x57850d={'type':_0x2fb1cf,'name':_0xb7b951,'path':_0x4a6d79};if(_0x343b79)_0x57850d[_0x5016e8(0xde)]=_0x343b79;if(_0x5dc177){if(_0x5dc177['alias'])_0x57850d['alias']=_0x5dc177['alias'];_0x57850d['datasetCode']=_0x5dc177['datasetCode'],_0x57850d['operationType']=_0x5dc177[_0x5016e8(0x106)],_0x57850d['functionNode']=_0x5dc177[_0x5016e8(0x102)];}return{'ok':!![],'data':_0x57850d,'message':'Created\x20'+_0x2fb1cf+_0x5016e8(0xe0)+_0xb7b951};}};async function resolveHookOptions(_0x52dfbf,_0x4982c1){const _0x280dc6=a26_0x490b47,_0x387141=loadAliasMap(_0x4982c1['apiDir'],undefined,resolveApiFilePath(_0x4982c1[_0x280dc6(0x10e)],_0x4982c1[_0x280dc6(0xe3)])),_0x3b54d2=_0x387141[_0x280dc6(0x105)]>0x0;let _0x44d002,_0x322823,_0x404a09;const _0x544b78=_0x4982c1['str']('alias'),_0x40acc7=_0x4982c1[_0x280dc6(0x113)](_0x280dc6(0x127));if(_0x544b78){const _0x4f2599=resolveAlias(_0x4982c1[_0x280dc6(0x10e)],_0x544b78,undefined,resolveApiFilePath(_0x4982c1[_0x280dc6(0x10e)],_0x4982c1[_0x280dc6(0xe3)]));if(!_0x4f2599){const _0x41eae8=_0x3b54d2?_0x280dc6(0x129)+_0x387141[_0x280dc6(0xeb)](_0x10df1f=>_0x10df1f['alias'])[_0x280dc6(0xe8)](',\x20'):_0x280dc6(0x118)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0xed)+_0x544b78+_0x280dc6(0xf3)+_0x41eae8);}_0x44d002=_0x544b78,_0x322823=_0x4f2599;}else{if(_0x40acc7){_0x322823=_0x40acc7;const _0x3e922b=_0x387141[_0x280dc6(0xfe)](_0x43d7d8=>_0x43d7d8[_0x280dc6(0x128)]===_0x40acc7);_0x44d002=_0x3e922b?.['alias'];}else{if(_0x4982c1[_0x280dc6(0xe6)])throw CliErrors['validation'](_0x280dc6(0x103));else{if(_0x3b54d2){const _0x401ae5=_0x387141[_0x280dc6(0xeb)](_0x2be684=>_0x2be684[_0x280dc6(0x109)]+'\x20('+_0x2be684['tableName']+')'),_0x14cc48=await promptSelect(_0x280dc6(0x11b),_0x401ae5),_0x61fc7=_0x387141[_0x14cc48];if(!_0x61fc7)throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0x119));_0x44d002=_0x61fc7[_0x280dc6(0x109)],_0x322823=_0x61fc7['datasetCode'];}else{const _0x2d034e=await listDatasets(_0x4982c1['appCode']);if(_0x2d034e[_0x280dc6(0x105)]===0x0)throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0xef));const _0x32d514=_0x2d034e[_0x280dc6(0xeb)](_0x29ebc9=>_0x29ebc9[_0x280dc6(0x110)]+'\x20('+_0x29ebc9[_0x280dc6(0x11c)]+')'),_0x3f0553=await promptSelect('Select\x20dataset:',_0x32d514),_0x1edc30=_0x2d034e[_0x3f0553];if(!_0x1edc30)throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0x119));_0x322823=_0x1edc30[_0x280dc6(0x11c)],_0x44d002=undefined;}}}}const _0x56f1bd=await listDatasets(_0x4982c1[_0x280dc6(0xe3)]),_0x383c7c=_0x56f1bd[_0x280dc6(0xfe)](_0x1b17d7=>_0x1b17d7[_0x280dc6(0x11c)]===_0x322823);if(!_0x383c7c)throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0x12b)+_0x322823+'\x22.\x20'+(_0x44d002?_0x280dc6(0x121)+CLI_BIN_NAME+_0x280dc6(0xf7):''));_0x404a09=_0x383c7c['id'];const _0x289e41=_0x44d002??_0x322823,_0x4e5ef6=await listBffDatasetOperations(_0x4982c1['appCode'],_0x404a09),_0x4ebc98=_0x4e5ef6?Object['keys'](_0x4e5ef6):[];if(_0x4ebc98[_0x280dc6(0x105)]===0x0)throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0xec)+_0x289e41+'.');let _0x39a1ec;const _0x13dfb3=_0x4982c1[_0x280dc6(0x113)](_0x280dc6(0xf0));if(_0x13dfb3){if(!_0x4ebc98['includes'](_0x13dfb3))throw CliErrors['validation'](_0x280dc6(0x124)+_0x13dfb3+_0x280dc6(0x12a)+_0x289e41+'.\x20'+(_0x280dc6(0xf4)+_0x4ebc98[_0x280dc6(0xe8)](',\x20')));_0x39a1ec=_0x13dfb3;}else{if(_0x4982c1[_0x280dc6(0xe6)])throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0x120));const _0x5b64cb=await promptSelect('Select\x20operation\x20type:',_0x4ebc98);_0x39a1ec=_0x4ebc98[_0x5b64cb]??_0x4ebc98[0x0];}let _0x2c4a30=normalizeHookFunctionNode(_0x4982c1[_0x280dc6(0x113)]('function-node'));if(!_0x2c4a30){if(_0x4982c1['str']('function-node'))throw CliErrors[_0x280dc6(0xdc)](_0x280dc6(0x123));if(_0x4982c1[_0x280dc6(0xe6)])throw CliErrors[_0x280dc6(0xdc)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x5837c7=await promptSelect('Select\x20trigger\x20node:',['before',_0x280dc6(0x101)]);_0x2c4a30=[_0x280dc6(0x11d),_0x280dc6(0x101)][_0x5837c7]??_0x280dc6(0x11d);}return{'alias':_0x44d002,'datasetCode':_0x322823,'datasetId':_0x404a09,'operationType':_0x39a1ec,'functionNode':_0x2c4a30};}async function promptSelect(_0x476b37,_0x5dc616){const _0x5bd357=a26_0x490b47;if(_0x5dc616[_0x5bd357(0x105)]===0x1)return 0x0;for(const [_0x58766e,_0x19d24c]of _0x5dc616['entries']()){process['stderr'][_0x5bd357(0xfb)]('\x20\x20'+(_0x58766e+0x1)+'.\x20'+_0x19d24c+'\x0a');}const _0x3ce4de=createInterface({'input':process[_0x5bd357(0xf2)],'output':process[_0x5bd357(0xe1)]});while(!![]){const _0x33bc24=await new Promise(_0x46541b=>{_0x3ce4de['question'](_0x476b37+'\x20',_0x46541b);}),_0x5c3e23=Number[_0x5bd357(0xe9)](_0x33bc24[_0x5bd357(0x100)](),0xa);if(Number[_0x5bd357(0x11e)](_0x5c3e23)&&_0x5c3e23>=0x1&&_0x5c3e23<=_0x5dc616[_0x5bd357(0x105)])return _0x3ce4de[_0x5bd357(0xf8)](),_0x5c3e23-0x1;process[_0x5bd357(0xe1)][_0x5bd357(0xfb)](_0x5bd357(0x10a)+_0x5dc616[_0x5bd357(0x105)]+'.\x0a');}}function buildFilePath(_0x428c89,_0x60b844,_0x1051d2,_0x38cf15){const _0x307729=a26_0x490b47;if(_0x60b844===_0x307729(0xdd)){if(!_0x38cf15)throw CliErrors[_0x307729(0xdc)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x57307e=_0x38cf15[_0x307729(0x109)]??_0x38cf15[_0x307729(0x128)];return join(_0x428c89['scriptsRootDir'],'HOOK',_0x57307e,_0x38cf15[_0x307729(0x106)],_0x38cf15[_0x307729(0x102)],_0x1051d2+_0x307729(0x117));}return join(_0x428c89[_0x307729(0xda)],_0x60b844,_0x1051d2+_0x307729(0x117));}export function generateTemplate(_0x9ea2fe,_0x577ca5,_0x103b0a,_0x2126a0,_0x5bf44a){const _0x139b6f=a26_0x490b47,_0x384468=_0x2126a0?.[_0x139b6f(0x100)]()||'TODO:\x20add\x20script\x20description';if(_0x9ea2fe===_0x139b6f(0xff))return _0x139b6f(0x10f)+_0x384468+'\x0a\x20*\x20[脚本名称]\x20'+_0x577ca5+_0x139b6f(0xfc)+_0x577ca5+_0x139b6f(0x11f)+_0x577ca5+_0x139b6f(0xf1);if(_0x9ea2fe===_0x139b6f(0x11a))return _0x139b6f(0xea)+_0x384468+_0x139b6f(0xf9)+_0x103b0a+'/'+_0x577ca5+_0x139b6f(0x115)+_0x577ca5+_0x139b6f(0xf1);if(!_0x5bf44a)throw CliErrors[_0x139b6f(0xdc)](_0x139b6f(0xe4));return _0x139b6f(0xf5)+_0x384468+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x103b0a+'/'+_0x5bf44a[_0x139b6f(0x128)]+'/'+_0x5bf44a[_0x139b6f(0x106)]+'\x0a\x20*\x20[触发节点]\x20'+_0x5bf44a[_0x139b6f(0x102)]+_0x139b6f(0xe5)+_0x577ca5+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
1
- const a27_0x354861=a27_0x33d5;function a27_0x33d5(_0x36fbcf,_0x29b308){_0x36fbcf=_0x36fbcf-0x1a4;const _0x32e63c=a27_0x32e6();let _0x33d5fb=_0x32e63c[_0x36fbcf];return _0x33d5fb;}(function(_0x3b476a,_0x39317e){const _0x3944ff=a27_0x33d5,_0x70e073=_0x3b476a();while(!![]){try{const _0x2affc0=-parseInt(_0x3944ff(0x1c6))/0x1*(-parseInt(_0x3944ff(0x1d2))/0x2)+-parseInt(_0x3944ff(0x1ce))/0x3*(parseInt(_0x3944ff(0x1ba))/0x4)+parseInt(_0x3944ff(0x1ae))/0x5+-parseInt(_0x3944ff(0x1b0))/0x6*(-parseInt(_0x3944ff(0x1cb))/0x7)+parseInt(_0x3944ff(0x1b4))/0x8*(-parseInt(_0x3944ff(0x1b8))/0x9)+-parseInt(_0x3944ff(0x1c0))/0xa*(-parseInt(_0x3944ff(0x1a4))/0xb)+-parseInt(_0x3944ff(0x1a9))/0xc;if(_0x2affc0===_0x39317e)break;else _0x70e073['push'](_0x70e073['shift']());}catch(_0x54cff7){_0x70e073['push'](_0x70e073['shift']());}}}(a27_0x32e6,0x3f4c2));function a27_0x32e6(){const _0x37e7d4=['11jUfdDs','functions','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','Multiple\x20functions\x20match\x20\x22','str','6911088vBczKn','trashDir','trashedTo','BFF\x20lock\x20file\x20not\x20found.','join','1335305WeCKrP','No\x20lock\x20entry\x20found\x20for\x20\x22','6vUuCwk','Deleted\x20','appCode','/api/management/library/scripts/delete','668144mLCUXW','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','find','includes','36aPiAAT','projectRoot','21064SKYZiW','length','target','Would\x20delete\x20','scriptsRoot','remoteId','3838790NaAbZU','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','\x20\x20-\x20','POST','high-risk-write','1wPVbGn','validation','bff','keys','lockFilePath','2116219RTxpMT','lastSync','delete','6BPQTgr','string','map','Function\x20not\x20found:\x20','453074XqWKNs','toISOString','scriptsRootDir'];a27_0x32e6=function(){return _0x37e7d4;};return a27_0x32e6();}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';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':a27_0x354861(0x1c8),'command':'delete','description':a27_0x354861(0x1c1),'risk':a27_0x354861(0x1c5),'flags':[{'name':a27_0x354861(0x1bc),'type':a27_0x354861(0x1cf),'required':!![],'description':a27_0x354861(0x1a6)}],async 'validate'(_0x10d08e){const _0x595d3d=a27_0x354861,_0x5f040=loadBffProjectConfig(_0x10d08e[_0x595d3d(0x1b2)]),_0x59cf9f=await readBffLockFile(_0x5f040[_0x595d3d(0x1ca)]);if(!_0x59cf9f)throw CliErrors['validation'](_0x595d3d(0x1c2));},async 'dryRun'(_0x331e03){const _0x754026=a27_0x354861,_0x120480=loadBffProjectConfig(_0x331e03[_0x754026(0x1b2)]),_0x5630b6=await readBffLockFile(_0x120480['lockFilePath']);if(!_0x5630b6)throw CliErrors[_0x754026(0x1c7)](_0x754026(0x1ac));const {appLock:_0xb3a995}=ensureLockScope(_0x5630b6,_0x331e03[_0x754026(0x1b2)],_0x120480[_0x754026(0x1be)],_0x754026(0x1cd)),_0x4e2a8f=_0x331e03[_0x754026(0x1a8)](_0x754026(0x1bc)),_0x130471=Object[_0x754026(0x1c9)](_0xb3a995[_0x754026(0x1a5)]),_0x1225b8=resolveDeleteTarget(_0x4e2a8f,_0x130471),_0x133720=_0xb3a995[_0x754026(0x1a5)][_0x1225b8];if(!_0x133720)throw CliErrors['validation'](_0x754026(0x1af)+_0x1225b8+'\x22.');const _0x23d34d=resolveLocalFilePathFromLockKey(_0x120480,_0x1225b8),_0x3aa51f=relative(_0x120480[_0x754026(0x1b9)],_0x23d34d),_0x1afe9f=join(_0x120480[_0x754026(0x1aa)],'<timestamp>',_0x3aa51f);return{'method':_0x754026(0x1c4),'url':_0x754026(0x1b3),'body':{'appCode':_0x331e03[_0x754026(0x1b2)],'target':_0x1225b8,'remoteId':_0x133720[_0x754026(0x1bf)],'localFilePath':_0x23d34d,'trashedPath':_0x1afe9f},'description':_0x754026(0x1bd)+_0x1225b8+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x293b86){const _0x1543d1=a27_0x354861,_0x116560=loadBffProjectConfig(_0x293b86[_0x1543d1(0x1b2)]),_0x10b753=await readBffLockFile(_0x116560['lockFilePath']);if(!_0x10b753)throw CliErrors[_0x1543d1(0x1c7)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x5ecc9b,appLock:_0x2386ae}=ensureLockScope(_0x10b753,_0x293b86[_0x1543d1(0x1b2)],_0x116560[_0x1543d1(0x1be)],_0x1543d1(0x1cd)),_0x259171=_0x293b86[_0x1543d1(0x1a8)](_0x1543d1(0x1bc)),_0x107a40=Object[_0x1543d1(0x1c9)](_0x2386ae[_0x1543d1(0x1a5)]),_0x4ba57b=resolveDeleteTarget(_0x259171,_0x107a40),_0x45d5be=_0x2386ae[_0x1543d1(0x1a5)][_0x4ba57b];if(!_0x45d5be)throw CliErrors[_0x1543d1(0x1c7)](_0x1543d1(0x1af)+_0x4ba57b+'\x22.');await deleteBffScript(_0x45d5be[_0x1543d1(0x1bf)]),delete _0x2386ae[_0x1543d1(0x1a5)][_0x4ba57b],_0x2386ae[_0x1543d1(0x1cc)]=new Date()[_0x1543d1(0x1d3)](),await writeBffLockFile(_0x116560[_0x1543d1(0x1ca)],_0x5ecc9b);const _0x4cd827=resolveLocalFilePathFromLockKey(_0x116560,_0x4ba57b);let _0x4d32ae;await fileExists(_0x4cd827)&&(_0x4d32ae=await moveToTrash(_0x116560[_0x1543d1(0x1b9)],_0x116560['trashDir'],_0x4cd827),await cleanupEmptyDirectories(dirname(_0x4cd827),_0x116560[_0x1543d1(0x1d4)]));const _0x46d866={'deleted':_0x4ba57b,'remoteId':_0x45d5be[_0x1543d1(0x1bf)]};if(_0x4d32ae)_0x46d866[_0x1543d1(0x1ab)]=_0x4d32ae;return{'ok':!![],'data':_0x46d866,'message':_0x1543d1(0x1b1)+_0x4ba57b+(_0x4d32ae?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x2142c6,_0x4ab2df){const _0x108fba=a27_0x354861;if(_0x2142c6[_0x108fba(0x1b7)]('/')){const _0x19e633=_0x4ab2df[_0x108fba(0x1b6)](_0x56d2e2=>_0x56d2e2===_0x2142c6);if(!_0x19e633)throw CliErrors[_0x108fba(0x1c7)](_0x108fba(0x1d1)+_0x2142c6);return _0x19e633;}const _0x3bc805=_0x4ab2df['filter'](_0x16878a=>_0x16878a['split']('/')['at'](-0x1)===_0x2142c6);if(_0x3bc805['length']===0x0)throw CliErrors[_0x108fba(0x1c7)](_0x108fba(0x1d1)+_0x2142c6);if(_0x3bc805[_0x108fba(0x1bb)]>0x1)throw CliErrors[_0x108fba(0x1c7)](_0x108fba(0x1a7)+_0x2142c6+_0x108fba(0x1b5)+_0x3bc805[_0x108fba(0x1d0)](_0x55852e=>_0x108fba(0x1c3)+_0x55852e)[_0x108fba(0x1ad)]('\x0a'));return _0x3bc805[0x0];}async function moveToTrash(_0x40be85,_0x4153b4,_0x3b3229){const _0x450478=a27_0x354861,_0x9d2a57=new Date()[_0x450478(0x1d3)]()['replace'](/[:.]/g,'-'),_0x4b3388=relative(_0x40be85,_0x3b3229),_0x3769d9=join(_0x4153b4,_0x9d2a57,_0x4b3388);return await mkdir(dirname(_0x3769d9),{'recursive':!![]}),await rename(_0x3b3229,_0x3769d9),_0x3769d9;}async function cleanupEmptyDirectories(_0x30978b,_0xcec1ba){const _0x43a4bb=a27_0x354861;let _0x3ea6a2=resolve(_0x30978b);const _0x101da1=resolve(_0xcec1ba);while(_0x3ea6a2['startsWith'](''+_0x101da1+sep)||_0x3ea6a2===_0x101da1){if(_0x3ea6a2===_0x101da1)return;try{const _0x4c8d6c=await readdir(_0x3ea6a2);if(_0x4c8d6c[_0x43a4bb(0x1bb)]>0x0)return;await rmdir(_0x3ea6a2);}catch{return;}_0x3ea6a2=dirname(_0x3ea6a2);}}
1
+ function a27_0x1149(){const _0xbac52d=['/api/management/library/scripts/delete','projectRoot','36aBlAPh','high-risk-write','appCode','includes','remoteId','\x20\x20-\x20','join','POST','validation','12jVMpfV','functions','329272tEMIbF','lockFilePath','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','find','\x20(local\x20file\x20moved\x20to\x20trash)','6rQbXFw','1181075iBDswG','Function\x20not\x20found:\x20','1021559DfgMXv','filter','Would\x20delete\x20','8383688aLkxhd','BFF\x20lock\x20file\x20not\x20found.','2350831sJlLVa','str','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','17024423vqWpms','toISOString','scriptsRootDir','677462uxbYfD','trashedTo','length','split','100sdUHIh','No\x20lock\x20entry\x20found\x20for\x20\x22','<timestamp>','Multiple\x20functions\x20match\x20\x22','2hcJSIf','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','9rhATeY','bff','keys','delete','target','trashDir','map','replace','scriptsRoot','startsWith'];a27_0x1149=function(){return _0xbac52d;};return a27_0x1149();}const a27_0x5671e0=a27_0x499d;function a27_0x499d(_0x12d0c8,_0x432bc2){_0x12d0c8=_0x12d0c8-0xca;const _0x1149fa=a27_0x1149();let _0x499dec=_0x1149fa[_0x12d0c8];return _0x499dec;}(function(_0x28bf75,_0x3a9f1f){const _0x4c6601=a27_0x499d,_0x30afb3=_0x28bf75();while(!![]){try{const _0x2b2636=parseInt(_0x4c6601(0xf7))/0x1*(parseInt(_0x4c6601(0xef))/0x2)+parseInt(_0x4c6601(0xd1))/0x3*(parseInt(_0x4c6601(0xdc))/0x4)+-parseInt(_0x4c6601(0xe2))/0x5+-parseInt(_0x4c6601(0xe1))/0x6*(-parseInt(_0x4c6601(0xe9))/0x7)+-parseInt(_0x4c6601(0xe7))/0x8*(-parseInt(_0x4c6601(0xf9))/0x9)+-parseInt(_0x4c6601(0xf3))/0xa*(parseInt(_0x4c6601(0xe4))/0xb)+parseInt(_0x4c6601(0xda))/0xc*(-parseInt(_0x4c6601(0xec))/0xd);if(_0x2b2636===_0x3a9f1f)break;else _0x30afb3['push'](_0x30afb3['shift']());}catch(_0x3d1eef){_0x30afb3['push'](_0x30afb3['shift']());}}}(a27_0x1149,0x8c484));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';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':a27_0x5671e0(0xfa),'command':a27_0x5671e0(0xfc),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a27_0x5671e0(0xd2),'flags':[{'name':a27_0x5671e0(0xfd),'type':'string','required':!![],'description':a27_0x5671e0(0xf8)}],async 'validate'(_0x58235b){const _0x4f9cca=a27_0x5671e0,_0x571742=loadBffProjectConfig(_0x58235b[_0x4f9cca(0xd3)]),_0x1b9e87=await readBffLockFile(_0x571742[_0x4f9cca(0xdd)]);if(!_0x1b9e87)throw CliErrors[_0x4f9cca(0xd9)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0xe07bf2){const _0x42d60f=a27_0x5671e0,_0x59d1bf=loadBffProjectConfig(_0xe07bf2[_0x42d60f(0xd3)]),_0x4a1a15=await readBffLockFile(_0x59d1bf[_0x42d60f(0xdd)]);if(!_0x4a1a15)throw CliErrors['validation'](_0x42d60f(0xe8));const {appLock:_0x328385}=ensureLockScope(_0x4a1a15,_0xe07bf2[_0x42d60f(0xd3)],_0x59d1bf[_0x42d60f(0xcd)],_0x42d60f(0xfc)),_0x34aebe=_0xe07bf2[_0x42d60f(0xea)](_0x42d60f(0xfd)),_0x3073f9=Object['keys'](_0x328385[_0x42d60f(0xdb)]),_0x239880=resolveDeleteTarget(_0x34aebe,_0x3073f9),_0x3e83e9=_0x328385[_0x42d60f(0xdb)][_0x239880];if(!_0x3e83e9)throw CliErrors['validation'](_0x42d60f(0xf4)+_0x239880+'\x22.');const _0x2943d6=resolveLocalFilePathFromLockKey(_0x59d1bf,_0x239880),_0x283c9d=relative(_0x59d1bf[_0x42d60f(0xd0)],_0x2943d6),_0x393bdd=join(_0x59d1bf['trashDir'],_0x42d60f(0xf5),_0x283c9d);return{'method':_0x42d60f(0xd8),'url':_0x42d60f(0xcf),'body':{'appCode':_0xe07bf2[_0x42d60f(0xd3)],'target':_0x239880,'remoteId':_0x3e83e9[_0x42d60f(0xd5)],'localFilePath':_0x2943d6,'trashedPath':_0x393bdd},'description':_0x42d60f(0xe6)+_0x239880+_0x42d60f(0xde)};},async 'execute'(_0x562063){const _0x322ad6=a27_0x5671e0,_0x4274fa=loadBffProjectConfig(_0x562063[_0x322ad6(0xd3)]),_0x2b229c=await readBffLockFile(_0x4274fa[_0x322ad6(0xdd)]);if(!_0x2b229c)throw CliErrors[_0x322ad6(0xd9)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x367731,appLock:_0x3ae0ee}=ensureLockScope(_0x2b229c,_0x562063[_0x322ad6(0xd3)],_0x4274fa[_0x322ad6(0xcd)],'delete'),_0x33b172=_0x562063[_0x322ad6(0xea)](_0x322ad6(0xfd)),_0x2946b4=Object[_0x322ad6(0xfb)](_0x3ae0ee[_0x322ad6(0xdb)]),_0x3a6778=resolveDeleteTarget(_0x33b172,_0x2946b4),_0x5042dc=_0x3ae0ee['functions'][_0x3a6778];if(!_0x5042dc)throw CliErrors[_0x322ad6(0xd9)](_0x322ad6(0xf4)+_0x3a6778+'\x22.');await deleteBffScript(_0x5042dc[_0x322ad6(0xd5)]),delete _0x3ae0ee[_0x322ad6(0xdb)][_0x3a6778],_0x3ae0ee['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x4274fa[_0x322ad6(0xdd)],_0x367731);const _0x6b4f64=resolveLocalFilePathFromLockKey(_0x4274fa,_0x3a6778);let _0x5a7d61;await fileExists(_0x6b4f64)&&(_0x5a7d61=await moveToTrash(_0x4274fa[_0x322ad6(0xd0)],_0x4274fa[_0x322ad6(0xca)],_0x6b4f64),await cleanupEmptyDirectories(dirname(_0x6b4f64),_0x4274fa[_0x322ad6(0xee)]));const _0x51c779={'deleted':_0x3a6778,'remoteId':_0x5042dc[_0x322ad6(0xd5)]};if(_0x5a7d61)_0x51c779[_0x322ad6(0xf0)]=_0x5a7d61;return{'ok':!![],'data':_0x51c779,'message':'Deleted\x20'+_0x3a6778+(_0x5a7d61?_0x322ad6(0xe0):'')};}};function resolveDeleteTarget(_0x1a45f0,_0x18dfa8){const _0x144a71=a27_0x5671e0;if(_0x1a45f0[_0x144a71(0xd4)]('/')){const _0x34fc7c=_0x18dfa8[_0x144a71(0xdf)](_0xa50a02=>_0xa50a02===_0x1a45f0);if(!_0x34fc7c)throw CliErrors['validation'](_0x144a71(0xe3)+_0x1a45f0);return _0x34fc7c;}const _0x216d02=_0x18dfa8[_0x144a71(0xe5)](_0x4f357c=>_0x4f357c[_0x144a71(0xf2)]('/')['at'](-0x1)===_0x1a45f0);if(_0x216d02[_0x144a71(0xf1)]===0x0)throw CliErrors[_0x144a71(0xd9)](_0x144a71(0xe3)+_0x1a45f0);if(_0x216d02[_0x144a71(0xf1)]>0x1)throw CliErrors['validation'](_0x144a71(0xf6)+_0x1a45f0+_0x144a71(0xeb)+_0x216d02[_0x144a71(0xcb)](_0x175d6f=>_0x144a71(0xd6)+_0x175d6f)[_0x144a71(0xd7)]('\x0a'));return _0x216d02[0x0];}async function moveToTrash(_0x4ab0e5,_0xd938c4,_0x1c1836){const _0x8bc304=a27_0x5671e0,_0x168a8a=new Date()[_0x8bc304(0xed)]()[_0x8bc304(0xcc)](/[:.]/g,'-'),_0x1c5888=relative(_0x4ab0e5,_0x1c1836),_0x5c0320=join(_0xd938c4,_0x168a8a,_0x1c5888);return await mkdir(dirname(_0x5c0320),{'recursive':!![]}),await rename(_0x1c1836,_0x5c0320),_0x5c0320;}async function cleanupEmptyDirectories(_0x5da73c,_0x2d75b5){const _0x3145f8=a27_0x5671e0;let _0x43bd1f=resolve(_0x5da73c);const _0xb4afea=resolve(_0x2d75b5);while(_0x43bd1f[_0x3145f8(0xce)](''+_0xb4afea+sep)||_0x43bd1f===_0xb4afea){if(_0x43bd1f===_0xb4afea)return;try{const _0x3827e0=await readdir(_0x43bd1f);if(_0x3827e0[_0x3145f8(0xf1)]>0x0)return;await rmdir(_0x43bd1f);}catch{return;}_0x43bd1f=dirname(_0x43bd1f);}}
@@ -1 +1 @@
1
- function a28_0x5cca(_0x2c5172,_0x3b8967){_0x2c5172=_0x2c5172-0x10a;const _0x4a3f66=a28_0x4a3f();let _0x5cca12=_0x4a3f66[_0x2c5172];return _0x5cca12;}const a28_0x1e90d6=a28_0x5cca;(function(_0x44c984,_0xcc637b){const _0x4c699a=a28_0x5cca,_0x3d54ce=_0x44c984();while(!![]){try{const _0x18e06e=parseInt(_0x4c699a(0x117))/0x1+-parseInt(_0x4c699a(0x10a))/0x2*(-parseInt(_0x4c699a(0x116))/0x3)+-parseInt(_0x4c699a(0x119))/0x4+-parseInt(_0x4c699a(0x111))/0x5*(-parseInt(_0x4c699a(0x11a))/0x6)+-parseInt(_0x4c699a(0x11f))/0x7*(-parseInt(_0x4c699a(0x11c))/0x8)+parseInt(_0x4c699a(0x11e))/0x9*(-parseInt(_0x4c699a(0x120))/0xa)+-parseInt(_0x4c699a(0x121))/0xb*(-parseInt(_0x4c699a(0x122))/0xc);if(_0x18e06e===_0xcc637b)break;else _0x3d54ce['push'](_0x3d54ce['shift']());}catch(_0x32e8b4){_0x3d54ce['push'](_0x3d54ce['shift']());}}}(a28_0x4a3f,0x49c74));import{getBffScriptInfo}from'../../core/api-client.js';function a28_0x4a3f(){const _0x1eb06f=['Script\x20ID','4430efavIP','scriptContent','appCode','number','description','detail','createdTime','177575kujpyx','bool','num','bff','(none)','279YahpId','343599fRZgeS','boolean','875472dBeeKX','6neCbIO','Return\x20full\x20raw\x20script\x20object','600bzqiOG','verbose','365319yAPufP','14399GJkUBC','130fWamyB','1111oNrorj','36756uxDHkR','Get\x20BFF\x20script\x20details\x20by\x20ID','updatedTime','read'];a28_0x4a3f=function(){return _0x1eb06f;};return a28_0x4a3f();}export const bffDetail={'service':a28_0x1e90d6(0x114),'command':a28_0x1e90d6(0x10f),'description':a28_0x1e90d6(0x123),'risk':a28_0x1e90d6(0x125),'flags':[{'name':'id','type':a28_0x1e90d6(0x10d),'required':!![],'description':a28_0x1e90d6(0x126)},{'name':a28_0x1e90d6(0x11d),'type':a28_0x1e90d6(0x118),'description':a28_0x1e90d6(0x11b)}],async 'execute'(_0x46354b){const _0x39fcb7=a28_0x1e90d6,_0xb0e9cd=await getBffScriptInfo(_0x46354b[_0x39fcb7(0x113)]('id')),_0x2fc77f=_0x46354b[_0x39fcb7(0x112)]('verbose');if(_0x2fc77f)return{'ok':!![],'data':_0xb0e9cd};return{'ok':!![],'data':{'id':_0xb0e9cd['id'],'appCode':_0xb0e9cd[_0x39fcb7(0x10c)],'scriptType':_0xb0e9cd['scriptType'],'description':_0xb0e9cd[_0x39fcb7(0x10e)]||_0x39fcb7(0x115),'createdTime':_0xb0e9cd[_0x39fcb7(0x110)]??'','updatedTime':_0xb0e9cd[_0x39fcb7(0x124)]??'','scriptContent':_0xb0e9cd[_0x39fcb7(0x10b)]??''}};}};
1
+ const a28_0x2f8295=a28_0x1903;function a28_0xab6a(){const _0x890f3e=['4527010YMmRTN','4vjMaUy','boolean','Script\x20ID','2682897uTboom','scriptType','Get\x20BFF\x20script\x20details\x20by\x20ID','description','2eLKqkT','verbose','Return\x20full\x20raw\x20script\x20object','detail','num','4083156alyniP','110683LVLSxi','scriptContent','appCode','6614608trrxRS','number','10860430sLFvgy','32892pbVqvT','updatedTime','1148nMNQGr','read','bff'];a28_0xab6a=function(){return _0x890f3e;};return a28_0xab6a();}(function(_0x399723,_0x2187c2){const _0x283b91=a28_0x1903,_0x3f9a24=_0x399723();while(!![]){try{const _0x156c23=parseInt(_0x283b91(0xda))/0x1*(-parseInt(_0x283b91(0xd4))/0x2)+parseInt(_0x283b91(0xd0))/0x3+parseInt(_0x283b91(0xcd))/0x4*(parseInt(_0x283b91(0xcc))/0x5)+-parseInt(_0x283b91(0xc7))/0x6*(parseInt(_0x283b91(0xc9))/0x7)+-parseInt(_0x283b91(0xc4))/0x8+-parseInt(_0x283b91(0xd9))/0x9+parseInt(_0x283b91(0xc6))/0xa;if(_0x156c23===_0x2187c2)break;else _0x3f9a24['push'](_0x3f9a24['shift']());}catch(_0x291097){_0x3f9a24['push'](_0x3f9a24['shift']());}}}(a28_0xab6a,0x9162f));function a28_0x1903(_0x3ac42f,_0x2823f7){_0x3ac42f=_0x3ac42f-0xc3;const _0xab6ad0=a28_0xab6a();let _0x1903cb=_0xab6ad0[_0x3ac42f];return _0x1903cb;}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a28_0x2f8295(0xcb),'command':a28_0x2f8295(0xd7),'description':a28_0x2f8295(0xd2),'risk':a28_0x2f8295(0xca),'flags':[{'name':'id','type':a28_0x2f8295(0xc5),'required':!![],'description':a28_0x2f8295(0xcf)},{'name':a28_0x2f8295(0xd5),'type':a28_0x2f8295(0xce),'description':a28_0x2f8295(0xd6)}],async 'execute'(_0x2b31c2){const _0x277cb8=a28_0x2f8295,_0x28e968=await getBffScriptInfo(_0x2b31c2[_0x277cb8(0xd8)]('id')),_0x5b175f=_0x2b31c2['bool']('verbose');if(_0x5b175f)return{'ok':!![],'data':_0x28e968};return{'ok':!![],'data':{'id':_0x28e968['id'],'appCode':_0x28e968[_0x277cb8(0xc3)],'scriptType':_0x28e968[_0x277cb8(0xd1)],'description':_0x28e968[_0x277cb8(0xd3)]||'(none)','createdTime':_0x28e968['createdTime']??'','updatedTime':_0x28e968[_0x277cb8(0xc8)]??'','scriptContent':_0x28e968[_0x277cb8(0xdb)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x2bc67a,_0xf7d606){const _0x5ae972=a29_0x20d1,_0x5d2fca=_0x2bc67a();while(!![]){try{const _0x187ec5=parseInt(_0x5ae972(0x111))/0x1*(-parseInt(_0x5ae972(0x10f))/0x2)+-parseInt(_0x5ae972(0x10c))/0x3+parseInt(_0x5ae972(0x10e))/0x4*(parseInt(_0x5ae972(0x10b))/0x5)+-parseInt(_0x5ae972(0x110))/0x6+-parseInt(_0x5ae972(0x109))/0x7*(-parseInt(_0x5ae972(0x10d))/0x8)+parseInt(_0x5ae972(0x10a))/0x9+-parseInt(_0x5ae972(0x112))/0xa;if(_0x187ec5===_0xf7d606)break;else _0x5d2fca['push'](_0x5d2fca['shift']());}catch(_0x42c53f){_0x5d2fca['push'](_0x5d2fca['shift']());}}}(a29_0x1994,0x57df2));function a29_0x20d1(_0x339f98,_0x119b24){_0x339f98=_0x339f98-0x109;const _0x19945c=a29_0x1994();let _0x20d1a0=_0x19945c[_0x339f98];return _0x20d1a0;}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a29_0x1994(){const _0x133bea=['2999115iMjgqJ','10LXiOiX','756990WpgwDI','8notkNA','906344uNMJYP','164OgsiOw','885084sThdBA','727dbbhmV','5689320QQdzmt','4213335VLuWrx'];a29_0x1994=function(){return _0x133bea;};return a29_0x1994();}
1
+ function a29_0x2984(){const _0x4d89b2=['233isUNrH','3726610Htpwut','205DKhSyV','423hdDCXw','514llrrYJ','4267592AqwpIj','23656qlVkAn','9676139QJQFdA','98358pkEKVS','1158ICEXrD','8112aQwOQT'];a29_0x2984=function(){return _0x4d89b2;};return a29_0x2984();}function a29_0x26e8(_0xa0d3f,_0xad8b7){_0xa0d3f=_0xa0d3f-0xbd;const _0x29844a=a29_0x2984();let _0x26e8e5=_0x29844a[_0xa0d3f];return _0x26e8e5;}(function(_0x2fbe6c,_0x4317e9){const _0xcea71c=a29_0x26e8,_0x487f06=_0x2fbe6c();while(!![]){try{const _0x4a1df4=-parseInt(_0xcea71c(0xc0))/0x1*(-parseInt(_0xcea71c(0xc4))/0x2)+parseInt(_0xcea71c(0xbe))/0x3*(parseInt(_0xcea71c(0xbf))/0x4)+parseInt(_0xcea71c(0xc2))/0x5*(parseInt(_0xcea71c(0xbd))/0x6)+-parseInt(_0xcea71c(0xc5))/0x7+parseInt(_0xcea71c(0xc6))/0x8*(parseInt(_0xcea71c(0xc3))/0x9)+parseInt(_0xcea71c(0xc1))/0xa+-parseInt(_0xcea71c(0xc7))/0xb;if(_0x4a1df4===_0x4317e9)break;else _0x487f06['push'](_0x487f06['shift']());}catch(_0x3835ce){_0x487f06['push'](_0x487f06['shift']());}}}(a29_0x2984,0x83231));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a30_0x46ed47=a30_0x5d23;(function(_0x3da0cc,_0x2d76c9){const _0x139cb7=a30_0x5d23,_0x1036f1=_0x3da0cc();while(!![]){try{const _0x5588ae=-parseInt(_0x139cb7(0xee))/0x1*(-parseInt(_0x139cb7(0xef))/0x2)+parseInt(_0x139cb7(0xe2))/0x3*(-parseInt(_0x139cb7(0xe5))/0x4)+-parseInt(_0x139cb7(0xed))/0x5*(parseInt(_0x139cb7(0xf6))/0x6)+-parseInt(_0x139cb7(0xe0))/0x7*(-parseInt(_0x139cb7(0xfa))/0x8)+-parseInt(_0x139cb7(0xf2))/0x9*(parseInt(_0x139cb7(0xe3))/0xa)+parseInt(_0x139cb7(0xe7))/0xb+-parseInt(_0x139cb7(0xe4))/0xc*(-parseInt(_0x139cb7(0xfb))/0xd);if(_0x5588ae===_0x2d76c9)break;else _0x1036f1['push'](_0x1036f1['shift']());}catch(_0x457feb){_0x1036f1['push'](_0x1036f1['shift']());}}}(a30_0x1096,0xd37af));function a30_0x1096(){const _0x136809=['8VqtQwR','14183PWhggS','str','bff','type','Filter\x20by\x20script\x20name','map','1442630RFOeQS','read','12XJVCMJ','16450QEgYXy','22884qKYzvW','1710988PpqWTz','List\x20BFF\x20scripts','13577553BGJGAI','string','name','list','length','description','120MrVJeh','3QFBTjv','44248RpMehU','functionName','ENDPOINT','2907eDereJ','Return\x20full\x20script\x20objects','No\x20BFF\x20scripts\x20found.','bool','119694NZhxnV','(unnamed)','verbose','appCode'];a30_0x1096=function(){return _0x136809;};return a30_0x1096();}import{listBffScripts}from'../../core/api-client.js';function a30_0x5d23(_0x62907a,_0xc5912c){_0x62907a=_0x62907a-0xdc;const _0x109697=a30_0x1096();let _0x5d23d7=_0x109697[_0x62907a];return _0x5d23d7;}export const bffList={'service':a30_0x46ed47(0xdc),'command':a30_0x46ed47(0xea),'description':a30_0x46ed47(0xe6),'risk':a30_0x46ed47(0xe1),'flags':[{'name':a30_0x46ed47(0xdd),'type':'string','description':'Script\x20type\x20filter','default':'ENDPOINT','enum':[a30_0x46ed47(0xf1),'COMMON']},{'name':a30_0x46ed47(0xe9),'type':a30_0x46ed47(0xe8),'description':a30_0x46ed47(0xde)},{'name':a30_0x46ed47(0xf8),'type':'boolean','description':a30_0x46ed47(0xf3)}],async 'execute'(_0x276763){const _0x2dda52=a30_0x46ed47,_0x4074a1=await listBffScripts(_0x276763[_0x2dda52(0xf9)],_0x276763[_0x2dda52(0xfc)](_0x2dda52(0xdd)),{'scriptName':_0x276763[_0x2dda52(0xfc)]('name')||undefined}),_0x456fc7=_0x276763[_0x2dda52(0xf5)]('verbose');return{'ok':!![],'data':_0x456fc7?_0x4074a1:_0x4074a1[_0x2dda52(0xdf)](_0x19133d=>({'id':_0x19133d['id'],'functionName':_0x19133d[_0x2dda52(0xf0)]??'','description':_0x19133d[_0x2dda52(0xec)]||_0x2dda52(0xf7),'scriptType':_0x19133d['scriptType']})),'message':_0x4074a1[_0x2dda52(0xeb)]===0x0?_0x2dda52(0xf4):undefined};}};
1
+ function a30_0x5c9c(){const _0x43f2f3=['scriptType','514362PSiSgj','length','name','Script\x20type\x20filter','No\x20BFF\x20scripts\x20found.','5TsTghQ','str','Return\x20full\x20script\x20objects','appCode','type','boolean','map','bff','functionName','2199lUqZsm','description','list','2xIcxTz','COMMON','verbose','bool','212758vQAWNK','128dHIshV','63pAVpgc','34531zDstJl','Filter\x20by\x20script\x20name','string','1676UlegyH','103799ofTybn','55WGYVGI','read','38316YsHASz','14120yNUkaM','ENDPOINT'];a30_0x5c9c=function(){return _0x43f2f3;};return a30_0x5c9c();}const a30_0x37a231=a30_0x28a6;(function(_0xc32306,_0x2fa27a){const _0x1abd95=a30_0x28a6,_0x3472ea=_0xc32306();while(!![]){try{const _0x3bc6ba=parseInt(_0x1abd95(0x16e))/0x1*(-parseInt(_0x1abd95(0x163))/0x2)+-parseInt(_0x1abd95(0x160))/0x3*(-parseInt(_0x1abd95(0x16d))/0x4)+-parseInt(_0x1abd95(0x17a))/0x5*(parseInt(_0x1abd95(0x175))/0x6)+parseInt(_0x1abd95(0x16a))/0x7*(parseInt(_0x1abd95(0x168))/0x8)+-parseInt(_0x1abd95(0x169))/0x9*(-parseInt(_0x1abd95(0x172))/0xa)+parseInt(_0x1abd95(0x16f))/0xb*(-parseInt(_0x1abd95(0x171))/0xc)+-parseInt(_0x1abd95(0x167))/0xd;if(_0x3bc6ba===_0x2fa27a)break;else _0x3472ea['push'](_0x3472ea['shift']());}catch(_0x29171a){_0x3472ea['push'](_0x3472ea['shift']());}}}(a30_0x5c9c,0x2a802));import{listBffScripts}from'../../core/api-client.js';function a30_0x28a6(_0x1738d4,_0x2be541){_0x1738d4=_0x1738d4-0x15f;const _0x5c9cd4=a30_0x5c9c();let _0x28a667=_0x5c9cd4[_0x1738d4];return _0x28a667;}export const bffList={'service':a30_0x37a231(0x181),'command':a30_0x37a231(0x162),'description':'List\x20BFF\x20scripts','risk':a30_0x37a231(0x170),'flags':[{'name':a30_0x37a231(0x17e),'type':a30_0x37a231(0x16c),'description':a30_0x37a231(0x178),'default':a30_0x37a231(0x173),'enum':['ENDPOINT',a30_0x37a231(0x164)]},{'name':a30_0x37a231(0x177),'type':a30_0x37a231(0x16c),'description':a30_0x37a231(0x16b)},{'name':'verbose','type':a30_0x37a231(0x17f),'description':a30_0x37a231(0x17c)}],async 'execute'(_0x58cc8a){const _0x3863c4=a30_0x37a231,_0x1aa776=await listBffScripts(_0x58cc8a[_0x3863c4(0x17d)],_0x58cc8a[_0x3863c4(0x17b)]('type'),{'scriptName':_0x58cc8a[_0x3863c4(0x17b)](_0x3863c4(0x177))||undefined}),_0x303d49=_0x58cc8a[_0x3863c4(0x166)](_0x3863c4(0x165));return{'ok':!![],'data':_0x303d49?_0x1aa776:_0x1aa776[_0x3863c4(0x180)](_0x222562=>({'id':_0x222562['id'],'functionName':_0x222562[_0x3863c4(0x15f)]??'','description':_0x222562[_0x3863c4(0x161)]||'(unnamed)','scriptType':_0x222562[_0x3863c4(0x174)]})),'message':_0x1aa776[_0x3863c4(0x176)]===0x0?_0x3863c4(0x179):undefined};}};
@@ -1 +1 @@
1
- const a31_0x1affc9=a31_0x45f7;(function(_0x594c24,_0x3bd004){const _0x3da8ac=a31_0x45f7,_0x196709=_0x594c24();while(!![]){try{const _0xd1df88=-parseInt(_0x3da8ac(0x1ff))/0x1+-parseInt(_0x3da8ac(0x1f2))/0x2+parseInt(_0x3da8ac(0x1ef))/0x3*(parseInt(_0x3da8ac(0x1fe))/0x4)+parseInt(_0x3da8ac(0x1f8))/0x5+-parseInt(_0x3da8ac(0x1ec))/0x6+parseInt(_0x3da8ac(0x1d7))/0x7+-parseInt(_0x3da8ac(0x1f0))/0x8*(-parseInt(_0x3da8ac(0x1ea))/0x9);if(_0xd1df88===_0x3bd004)break;else _0x196709['push'](_0x196709['shift']());}catch(_0x279d9d){_0x196709['push'](_0x196709['shift']());}}}(a31_0x5680,0x7980b));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';function a31_0x5680(){const _0x26d27f=['boolean','1810170PXQHLn','includes','Would\x20inspect\x20','validation','would_pull','yes','9008wFACRS','768193CZeShu','operationType','bff','type','toLowerCase','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','conflict','nonInteractive','local\x20unsynced\x20changes','\x20skipped,\x20','pull','all','utf8','scriptType','length','COMMON','appCode','stdin','close','Pull\x20only\x20this\x20script\x20type','bool','question','version','/api/management/library/scripts/list?appCode=','lockKey','HOOK','\x20pulled,\x20','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','No\x20remote\x20BFF\x20scripts\x20found.','Remote\x20script\x20missing\x20content.','functionNode','push','4243442FXqGnj','Lock\x20scope\x20for\x20app\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','lockFilePath','\x20remote\x20BFF\x20script(s)\x20for\x20pull','hookLocation','scriptContent','unresolvable\x20target\x20path','string','Force\x20overwrite\x20local\x20unsynced\x20changes','force','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','message','scriptsRoot','apps','ENDPOINT','Remote\x20script\x20missing\x20id.','Pull\x20complete:\x20','5092749DGhALE','datasetCode','5922834phcBbo','functionName','functions','438yqVTpn','24HVQjWk','Force\x20pull\x20cancelled.','1483216xEVYcN','apiDir','filePath','str','alias'];a31_0x5680=function(){return _0x26d27f;};return a31_0x5680();}function a31_0x45f7(_0x3e4a38,_0x3d8b81){_0x3e4a38=_0x3e4a38-0x1c5;const _0x568093=a31_0x5680();let _0x45f70b=_0x568093[_0x3e4a38];return _0x45f70b;}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':a31_0x1affc9(0x201),'command':a31_0x1affc9(0x209),'description':a31_0x1affc9(0x1d2),'risk':'write','flags':[{'name':a31_0x1affc9(0x202),'type':a31_0x1affc9(0x1e0),'description':a31_0x1affc9(0x1ca),'enum':[a31_0x1affc9(0x1c6),a31_0x1affc9(0x1e7),a31_0x1affc9(0x1d0)]},{'name':a31_0x1affc9(0x1e2),'type':a31_0x1affc9(0x1f7),'description':a31_0x1affc9(0x1e1)}],async 'dryRun'(_0x367299){const _0x593761=a31_0x1affc9,_0x1150b7=loadBffProjectConfig(_0x367299[_0x593761(0x1c7)]),_0x2fc562=await readBffLockFile(_0x1150b7[_0x593761(0x1db)]),{appLock:_0x51c956}=ensureLockScope(_0x2fc562??createEmptyBffLock(),_0x367299[_0x593761(0x1c7)],_0x1150b7[_0x593761(0x1e5)],_0x593761(0x209)),_0x20172a=normalizeBffType(_0x367299[_0x593761(0x1f5)]('type'))??undefined,_0x4f9084=buildDatasetCodeToAliasMap(_0x367299[_0x593761(0x1f3)],_0x367299[_0x593761(0x1c7)]),[_0x13d839,_0x3b78a6]=await Promise[_0x593761(0x20a)]([listBffScripts(_0x367299[_0x593761(0x1c7)],_0x20172a),getBffScriptStatistics(_0x367299['appCode'])]),_0x19fe05=createHookLocationMap(_0x3b78a6),_0x3e2bec=[];for(const _0x38706e of _0x13d839){const _0x588a90=resolveRemoteScriptTarget(_0x1150b7,_0x38706e,_0x19fe05,_0x51c956['functions'],_0x4f9084);if(!_0x588a90){_0x3e2bec[_0x593761(0x1d6)]({'scriptType':_0x38706e[_0x593761(0x20c)],'functionName':_0x38706e[_0x593761(0x1ed)]??'','status':'skipped','reason':_0x593761(0x1df)});continue;}const _0x3c94ed=_0x51c956['functions'][_0x588a90[_0x593761(0x1cf)]],_0x136fcd=_0x38706e[_0x593761(0x1de)]!=null?computeContentHash(_0x38706e[_0x593761(0x1de)]):undefined,_0x2402c9=await hasUnsyncedLocalChanges(_0x588a90[_0x593761(0x1f4)],_0x3c94ed,_0x136fcd);_0x3e2bec[_0x593761(0x1d6)]({'lockKey':_0x588a90['lockKey'],'filePath':_0x588a90[_0x593761(0x1f4)],'remoteId':_0x38706e['id']??null,'status':_0x2402c9?_0x593761(0x205):_0x593761(0x1fc)});}return{'method':'GET','url':_0x593761(0x1ce)+_0x367299['appCode']+(_0x20172a?'&type='+_0x20172a:''),'body':{'appCode':_0x367299[_0x593761(0x1c7)],'filterType':_0x20172a??null,'files':_0x3e2bec},'description':_0x593761(0x1fa)+_0x3e2bec[_0x593761(0x1c5)]+_0x593761(0x1dc)};},async 'execute'(_0x3f756b){const _0x25e457=a31_0x1affc9,_0x50d8b9=loadBffProjectConfig(_0x3f756b['appCode']),_0x25e4af=await readBffLockFile(_0x50d8b9[_0x25e457(0x1db)]),{lockData:_0x3bb724,appLock:_0x393d96}=ensureLockScope(_0x25e4af??createEmptyBffLock(),_0x3f756b[_0x25e457(0x1c7)],_0x50d8b9['scriptsRoot'],_0x25e457(0x209)),_0x832fc2=normalizeBffType(_0x3f756b[_0x25e457(0x1f5)](_0x25e457(0x202)))??undefined;if(_0x3f756b['str']('type')&&!_0x832fc2)throw CliErrors[_0x25e457(0x1fb)](_0x25e457(0x1e3));const [_0x3a8ba2,_0x6d74f9]=await Promise['all']([listBffScripts(_0x3f756b['appCode'],_0x832fc2),getBffScriptStatistics(_0x3f756b['appCode'])]);if(_0x3a8ba2[_0x25e457(0x1c5)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x25e457(0x1d3)};const _0x4d9a7b=_0x3f756b[_0x25e457(0x1cb)](_0x25e457(0x1e2));if(_0x4d9a7b&&!_0x3f756b[_0x25e457(0x206)]){const _0x37a748=await confirmForce();if(!_0x37a748)throw CliErrors['cancelled'](_0x25e457(0x1f1));}if(_0x4d9a7b&&_0x3f756b['nonInteractive']){}const _0xb193de=buildDatasetCodeToAliasMap(_0x3f756b[_0x25e457(0x1f3)],_0x3f756b[_0x25e457(0x1c7)]),_0x2bd20e=createHookLocationMap(_0x6d74f9),_0x23e965=JSON['parse'](JSON['stringify'](_0x3bb724)),_0x17b896=_0x3f756b[_0x25e457(0x1c7)],_0x3567d0=_0x23e965[_0x25e457(0x1e6)][_0x17b896];if(!_0x3567d0)throw new Error(_0x25e457(0x1d8)+_0x17b896+_0x25e457(0x1d9));const _0x5d3a9c=[],_0x1115d7=[],_0x50c3e3=[];for(const _0x195827 of _0x3a8ba2){const _0x34fac2=resolveRemoteScriptTarget(_0x50d8b9,_0x195827,_0x2bd20e,_0x393d96[_0x25e457(0x1ee)],_0xb193de);if(!_0x34fac2){_0x1115d7[_0x25e457(0x1d6)]({'lockKey':_0x195827[_0x25e457(0x20c)]+'/'+_0x195827['functionName'],'reason':_0x25e457(0x1df)});continue;}const _0x4f71c3=_0x393d96['functions'][_0x34fac2[_0x25e457(0x1cf)]];try{if(!_0x195827['id'])throw new Error(_0x25e457(0x1e8));if(_0x195827['scriptContent']==null)throw new Error(_0x25e457(0x1d4));const _0x33f42f=_0x195827['scriptContent'],_0x1d688c=computeContentHash(_0x33f42f);if(!_0x4d9a7b){const _0x5b8283=await hasUnsyncedLocalChanges(_0x34fac2[_0x25e457(0x1f4)],_0x4f71c3,_0x1d688c);if(_0x5b8283){_0x1115d7['push']({'lockKey':_0x34fac2[_0x25e457(0x1cf)],'reason':_0x25e457(0x207)});continue;}}await ensureParentDirectory(_0x34fac2['filePath']),await writeFile(_0x34fac2[_0x25e457(0x1f4)],_0x33f42f,_0x25e457(0x20b));const _0x29d01d={'hash':_0x1d688c,'remoteId':_0x195827['id'],'version':_0x195827[_0x25e457(0x1cd)]};_0x34fac2[_0x25e457(0x202)]===_0x25e457(0x1d0)&&_0x34fac2[_0x25e457(0x1dd)]&&(_0x29d01d[_0x25e457(0x1f6)]=_0x34fac2['hookLocation'][_0x25e457(0x1f6)],_0x29d01d[_0x25e457(0x1eb)]=_0x34fac2[_0x25e457(0x1dd)][_0x25e457(0x1eb)],_0x29d01d[_0x25e457(0x200)]=_0x34fac2[_0x25e457(0x1dd)]['operationType'],_0x29d01d[_0x25e457(0x1d5)]=_0x34fac2[_0x25e457(0x1dd)][_0x25e457(0x1d5)]),_0x3567d0['functions'][_0x34fac2[_0x25e457(0x1cf)]]=_0x29d01d,_0x5d3a9c[_0x25e457(0x1d6)]({'lockKey':_0x34fac2[_0x25e457(0x1cf)],'remoteId':_0x195827['id']});}catch(_0x589492){_0x50c3e3[_0x25e457(0x1d6)]({'lockKey':_0x34fac2[_0x25e457(0x1cf)],'error':_0x589492 instanceof Error?_0x589492[_0x25e457(0x1e4)]:String(_0x589492)});}}return _0x3567d0['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x50d8b9[_0x25e457(0x1db)],_0x23e965),{'ok':_0x50c3e3['length']===0x0,'data':{'pulled':_0x5d3a9c,'skipped':_0x1115d7,'failed':_0x50c3e3},'message':_0x25e457(0x1e9)+_0x5d3a9c['length']+_0x25e457(0x1d1)+_0x1115d7['length']+_0x25e457(0x208)+_0x50c3e3[_0x25e457(0x1c5)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x10f475,_0x572464,_0x270ddd){if(!await fileExists(_0x10f475))return![];const _0x352cf4=await computeFileHash(_0x10f475);if(!_0x572464)return _0x270ddd?_0x352cf4!==_0x270ddd:!![];return _0x352cf4!==_0x572464['hash'];}function buildDatasetCodeToAliasMap(_0xe2af54,_0x294766){const _0x385a2=a31_0x1affc9,_0x1a01d0=loadAliasMap(_0xe2af54,undefined,resolveApiFilePath(_0xe2af54,_0x294766));return new Map(_0x1a01d0[_0x385a2(0x1da)](_0x6a9532=>[_0x6a9532[_0x385a2(0x1eb)],_0x6a9532[_0x385a2(0x1f6)]]));}async function confirmForce(){const _0x321f2e=a31_0x1affc9,_0x501217=createInterface({'input':process[_0x321f2e(0x1c8)],'output':process['stderr']}),_0x4c9855=await new Promise(_0x16f5ea=>{const _0x3cf2d5=_0x321f2e;_0x501217[_0x3cf2d5(0x1cc)](_0x3cf2d5(0x204),_0x16f5ea);});return _0x501217[_0x321f2e(0x1c9)](),['y',_0x321f2e(0x1fd)][_0x321f2e(0x1f9)](_0x4c9855['trim']()[_0x321f2e(0x203)]());}
1
+ const a31_0x133f96=a31_0x4499;(function(_0x14e58c,_0x5e4ba8){const _0x5ee55f=a31_0x4499,_0x1e629a=_0x14e58c();while(!![]){try{const _0x5d4402=-parseInt(_0x5ee55f(0xc0))/0x1+parseInt(_0x5ee55f(0xbc))/0x2+-parseInt(_0x5ee55f(0xc1))/0x3*(-parseInt(_0x5ee55f(0xd4))/0x4)+-parseInt(_0x5ee55f(0xec))/0x5*(parseInt(_0x5ee55f(0xdc))/0x6)+parseInt(_0x5ee55f(0xc9))/0x7*(-parseInt(_0x5ee55f(0xdb))/0x8)+-parseInt(_0x5ee55f(0xd0))/0x9+parseInt(_0x5ee55f(0xde))/0xa;if(_0x5d4402===_0x5e4ba8)break;else _0x1e629a['push'](_0x1e629a['shift']());}catch(_0x44c947){_0x1e629a['push'](_0x1e629a['shift']());}}}(a31_0x34af,0x37e10));import{createInterface}from'node:readline';function a31_0x34af(){const _0x55405c=['length','Force\x20pull\x20cancelled.','validation','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','stderr','stdin','Force\x20overwrite\x20local\x20unsynced\x20changes','filePath','lockFilePath','Remote\x20script\x20missing\x20id.','functions','\x20skipped,\x20','unresolvable\x20target\x20path','message','scriptContent','722992CAhQQC','pull','cancelled','operationType','125162xIAbXc','5790SbstPA','toISOString','/api/management/library/scripts/list?appCode=','\x20failed','includes','utf8','yes','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','7lUqBLq','parse','all','would_pull','write','No\x20remote\x20BFF\x20scripts\x20found.','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','514602XFslKT','Lock\x20scope\x20for\x20app\x20\x22','Pull\x20only\x20this\x20script\x20type','push','116gmwpwu','\x20pulled,\x20','GET','nonInteractive','alias','apiDir','Would\x20inspect\x20','2063784CJmfFn','740466aGgAUr','close','6219600AYrjvp','hookLocation','stringify','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptType','toLowerCase','COMMON','&type=','type','lockKey','boolean','question','str','datasetCode','15Bzctrx','appCode','skipped','functionName','ENDPOINT','bool','HOOK'];a31_0x34af=function(){return _0x55405c;};return a31_0x34af();}function a31_0x4499(_0x3d0521,_0x3eb67f){_0x3d0521=_0x3d0521-0xb2;const _0x34af05=a31_0x34af();let _0x449933=_0x34af05[_0x3d0521];return _0x449933;}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':'bff','command':a31_0x133f96(0xbd),'description':a31_0x133f96(0xcf),'risk':a31_0x133f96(0xcd),'flags':[{'name':a31_0x133f96(0xe6),'type':'string','description':a31_0x133f96(0xd2),'enum':[a31_0x133f96(0xe4),a31_0x133f96(0xf0),a31_0x133f96(0xf2)]},{'name':'force','type':a31_0x133f96(0xe8),'description':a31_0x133f96(0xb3)}],async 'dryRun'(_0x4d253a){const _0x1f989d=a31_0x133f96,_0x4c56a7=loadBffProjectConfig(_0x4d253a[_0x1f989d(0xed)]),_0x5ca7ab=await readBffLockFile(_0x4c56a7[_0x1f989d(0xb5)]),{appLock:_0x50896f}=ensureLockScope(_0x5ca7ab??createEmptyBffLock(),_0x4d253a[_0x1f989d(0xed)],_0x4c56a7['scriptsRoot'],'pull'),_0x853e80=normalizeBffType(_0x4d253a[_0x1f989d(0xea)](_0x1f989d(0xe6)))??undefined,_0x4c4e3e=buildDatasetCodeToAliasMap(_0x4d253a['apiDir'],_0x4d253a[_0x1f989d(0xed)]),[_0x4a56c3,_0xffd4b7]=await Promise['all']([listBffScripts(_0x4d253a[_0x1f989d(0xed)],_0x853e80),getBffScriptStatistics(_0x4d253a[_0x1f989d(0xed)])]),_0x2da794=createHookLocationMap(_0xffd4b7),_0x2e0c59=[];for(const _0x43733e of _0x4a56c3){const _0x4b3eef=resolveRemoteScriptTarget(_0x4c56a7,_0x43733e,_0x2da794,_0x50896f[_0x1f989d(0xb7)],_0x4c4e3e);if(!_0x4b3eef){_0x2e0c59[_0x1f989d(0xd3)]({'scriptType':_0x43733e[_0x1f989d(0xe2)],'functionName':_0x43733e[_0x1f989d(0xef)]??'','status':_0x1f989d(0xee),'reason':_0x1f989d(0xb9)});continue;}const _0x4c4192=_0x50896f[_0x1f989d(0xb7)][_0x4b3eef[_0x1f989d(0xe7)]],_0x1aee2d=_0x43733e['scriptContent']!=null?computeContentHash(_0x43733e[_0x1f989d(0xbb)]):undefined,_0x1f40bc=await hasUnsyncedLocalChanges(_0x4b3eef[_0x1f989d(0xb4)],_0x4c4192,_0x1aee2d);_0x2e0c59[_0x1f989d(0xd3)]({'lockKey':_0x4b3eef[_0x1f989d(0xe7)],'filePath':_0x4b3eef[_0x1f989d(0xb4)],'remoteId':_0x43733e['id']??null,'status':_0x1f40bc?'conflict':_0x1f989d(0xcc)});}return{'method':_0x1f989d(0xd6),'url':_0x1f989d(0xc3)+_0x4d253a[_0x1f989d(0xed)]+(_0x853e80?_0x1f989d(0xe5)+_0x853e80:''),'body':{'appCode':_0x4d253a['appCode'],'filterType':_0x853e80??null,'files':_0x2e0c59},'description':_0x1f989d(0xda)+_0x2e0c59['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x190b39){const _0x2a2da8=a31_0x133f96,_0x43d752=loadBffProjectConfig(_0x190b39['appCode']),_0x2e456c=await readBffLockFile(_0x43d752[_0x2a2da8(0xb5)]),{lockData:_0x5567fb,appLock:_0xb3d8f4}=ensureLockScope(_0x2e456c??createEmptyBffLock(),_0x190b39['appCode'],_0x43d752['scriptsRoot'],_0x2a2da8(0xbd)),_0x58b352=normalizeBffType(_0x190b39[_0x2a2da8(0xea)](_0x2a2da8(0xe6)))??undefined;if(_0x190b39[_0x2a2da8(0xea)](_0x2a2da8(0xe6))&&!_0x58b352)throw CliErrors[_0x2a2da8(0xf5)](_0x2a2da8(0xc8));const [_0x4d9cdb,_0x9dddf3]=await Promise[_0x2a2da8(0xcb)]([listBffScripts(_0x190b39[_0x2a2da8(0xed)],_0x58b352),getBffScriptStatistics(_0x190b39['appCode'])]);if(_0x4d9cdb[_0x2a2da8(0xf3)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x2a2da8(0xce)};const _0x2417de=_0x190b39[_0x2a2da8(0xf1)]('force');if(_0x2417de&&!_0x190b39[_0x2a2da8(0xd7)]){const _0x506a80=await confirmForce();if(!_0x506a80)throw CliErrors[_0x2a2da8(0xbe)](_0x2a2da8(0xf4));}if(_0x2417de&&_0x190b39['nonInteractive']){}const _0x2cf848=buildDatasetCodeToAliasMap(_0x190b39[_0x2a2da8(0xd9)],_0x190b39[_0x2a2da8(0xed)]),_0x40a9fc=createHookLocationMap(_0x9dddf3),_0x470643=JSON[_0x2a2da8(0xca)](JSON[_0x2a2da8(0xe0)](_0x5567fb)),_0x66b701=_0x190b39[_0x2a2da8(0xed)],_0x2c58e1=_0x470643['apps'][_0x66b701];if(!_0x2c58e1)throw new Error(_0x2a2da8(0xd1)+_0x66b701+_0x2a2da8(0xe1));const _0x2858d7=[],_0x16a046=[],_0x1821be=[];for(const _0x1c3ce5 of _0x4d9cdb){const _0x31f033=resolveRemoteScriptTarget(_0x43d752,_0x1c3ce5,_0x40a9fc,_0xb3d8f4[_0x2a2da8(0xb7)],_0x2cf848);if(!_0x31f033){_0x16a046[_0x2a2da8(0xd3)]({'lockKey':_0x1c3ce5[_0x2a2da8(0xe2)]+'/'+_0x1c3ce5['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x18f0bf=_0xb3d8f4[_0x2a2da8(0xb7)][_0x31f033[_0x2a2da8(0xe7)]];try{if(!_0x1c3ce5['id'])throw new Error(_0x2a2da8(0xb6));if(_0x1c3ce5[_0x2a2da8(0xbb)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x24e938=_0x1c3ce5[_0x2a2da8(0xbb)],_0x500ddd=computeContentHash(_0x24e938);if(!_0x2417de){const _0x1a4e2f=await hasUnsyncedLocalChanges(_0x31f033[_0x2a2da8(0xb4)],_0x18f0bf,_0x500ddd);if(_0x1a4e2f){_0x16a046[_0x2a2da8(0xd3)]({'lockKey':_0x31f033[_0x2a2da8(0xe7)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x31f033[_0x2a2da8(0xb4)]),await writeFile(_0x31f033[_0x2a2da8(0xb4)],_0x24e938,_0x2a2da8(0xc6));const _0x48f487={'hash':_0x500ddd,'remoteId':_0x1c3ce5['id'],'version':_0x1c3ce5['version']};_0x31f033[_0x2a2da8(0xe6)]===_0x2a2da8(0xf2)&&_0x31f033['hookLocation']&&(_0x48f487['alias']=_0x31f033[_0x2a2da8(0xdf)][_0x2a2da8(0xd8)],_0x48f487[_0x2a2da8(0xeb)]=_0x31f033[_0x2a2da8(0xdf)][_0x2a2da8(0xeb)],_0x48f487[_0x2a2da8(0xbf)]=_0x31f033[_0x2a2da8(0xdf)]['operationType'],_0x48f487['functionNode']=_0x31f033[_0x2a2da8(0xdf)]['functionNode']),_0x2c58e1['functions'][_0x31f033[_0x2a2da8(0xe7)]]=_0x48f487,_0x2858d7[_0x2a2da8(0xd3)]({'lockKey':_0x31f033['lockKey'],'remoteId':_0x1c3ce5['id']});}catch(_0x198b00){_0x1821be[_0x2a2da8(0xd3)]({'lockKey':_0x31f033[_0x2a2da8(0xe7)],'error':_0x198b00 instanceof Error?_0x198b00[_0x2a2da8(0xba)]:String(_0x198b00)});}}return _0x2c58e1['lastSync']=new Date()[_0x2a2da8(0xc2)](),await writeBffLockFile(_0x43d752[_0x2a2da8(0xb5)],_0x470643),{'ok':_0x1821be[_0x2a2da8(0xf3)]===0x0,'data':{'pulled':_0x2858d7,'skipped':_0x16a046,'failed':_0x1821be},'message':'Pull\x20complete:\x20'+_0x2858d7[_0x2a2da8(0xf3)]+_0x2a2da8(0xd5)+_0x16a046[_0x2a2da8(0xf3)]+_0x2a2da8(0xb8)+_0x1821be[_0x2a2da8(0xf3)]+_0x2a2da8(0xc4)};}};async function hasUnsyncedLocalChanges(_0x3502f3,_0x1f017e,_0x53740a){if(!await fileExists(_0x3502f3))return![];const _0x1107bb=await computeFileHash(_0x3502f3);if(!_0x1f017e)return _0x53740a?_0x1107bb!==_0x53740a:!![];return _0x1107bb!==_0x1f017e['hash'];}function buildDatasetCodeToAliasMap(_0x245bad,_0x3138ea){const _0x5c59fc=a31_0x133f96,_0x22d148=loadAliasMap(_0x245bad,undefined,resolveApiFilePath(_0x245bad,_0x3138ea));return new Map(_0x22d148['map'](_0x55cbff=>[_0x55cbff[_0x5c59fc(0xeb)],_0x55cbff['alias']]));}async function confirmForce(){const _0x53bd70=a31_0x133f96,_0x16f2d6=createInterface({'input':process[_0x53bd70(0xb2)],'output':process[_0x53bd70(0xf7)]}),_0x590b7b=await new Promise(_0x21bc0e=>{const _0x2ef7fe=_0x53bd70;_0x16f2d6[_0x2ef7fe(0xe9)](_0x2ef7fe(0xf6),_0x21bc0e);});return _0x16f2d6[_0x53bd70(0xdd)](),['y',_0x53bd70(0xc7)][_0x53bd70(0xc5)](_0x590b7b['trim']()[_0x53bd70(0xe3)]());}
@@ -1 +1 @@
1
- const a32_0x347b62=a32_0xdf49;(function(_0x15d7b2,_0x357d48){const _0x48477e=a32_0xdf49,_0x15695f=_0x15d7b2();while(!![]){try{const _0x24f574=-parseInt(_0x48477e(0x149))/0x1*(parseInt(_0x48477e(0x15b))/0x2)+-parseInt(_0x48477e(0x151))/0x3*(-parseInt(_0x48477e(0x131))/0x4)+parseInt(_0x48477e(0x144))/0x5+parseInt(_0x48477e(0x150))/0x6*(parseInt(_0x48477e(0x135))/0x7)+-parseInt(_0x48477e(0x13b))/0x8+parseInt(_0x48477e(0x143))/0x9*(-parseInt(_0x48477e(0x138))/0xa)+parseInt(_0x48477e(0x12b))/0xb;if(_0x24f574===_0x357d48)break;else _0x15695f['push'](_0x15695f['shift']());}catch(_0x46f7cc){_0x15695f['push'](_0x15695f['shift']());}}}(a32_0x5b35,0x9300e));import{readFile}from'node:fs/promises';function a32_0x5b35(){const _0x4c2127=['datasetCode','boolean','ENDPOINT','get','hash','filter','filePath','bool',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','values','aliasToDatasetCode','force','operationType','Cannot\x20resolve\x20dataset\x20for\x20\x22','has','push','validation','functions','map','5092120ukxaRS','set','update','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20skipped,\x20','Push\x20only\x20this\x20script\x20type','48844KyaCZj','No\x20local\x20BFF\x20functions\x20found.','utf8','lockKey','32466VqlZWo','alias','lastSync','2492510qlRxNM','type','unchanged','9375528VHuLXj','some','create','POST','remoteId','\x20local\x20BFF\x20script(s)\x20for\x20push','script','scriptsRoot','18ErcQoO','4832160YEfxpn','COMMON','HOOK','bff','appCode','285pjTSZs','str','datasetCodeToId','length','Would\x20inspect\x20','\x22.\x20','name','1494MRIvJL','165ZHBuUV','/api/management/library/scripts/save','version','\x20uploaded,\x20','datasetId','would_push','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','string','Run\x20`','description','6900zZxXcS','\x20failed','functionNode'];a32_0x5b35=function(){return _0x4c2127;};return a32_0x5b35();}import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a32_0xdf49(_0x381de7,_0x2c48d8){_0x381de7=_0x381de7-0x11b;const _0x5b3573=a32_0x5b35();let _0xdf49e5=_0x5b3573[_0x381de7];return _0xdf49e5;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a32_0x347b62(0x147),'command':'push','description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':'high-risk-write','flags':[{'name':a32_0x347b62(0x139),'type':'string','description':a32_0x347b62(0x130),'enum':[a32_0x347b62(0x145),a32_0x347b62(0x160),a32_0x347b62(0x146)]},{'name':a32_0x347b62(0x14f),'type':a32_0x347b62(0x158),'description':a32_0x347b62(0x12e)},{'name':a32_0x347b62(0x123),'type':a32_0x347b62(0x15f),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x12fa24){const _0x53ab32=a32_0x347b62,_0x983922=loadBffProjectConfig(_0x12fa24[_0x53ab32(0x148)]),_0x2f4903=await readBffLockFile(_0x983922['lockFilePath']),{appLock:_0xf44704}=ensureLockScope(_0x2f4903??createEmptyBffLock(),_0x12fa24['appCode'],_0x983922[_0x53ab32(0x142)],'push'),_0x47ccae=await getTargetFunctions(_0x983922,_0x12fa24),_0x3d67cc=_0x12fa24[_0x53ab32(0x11f)](_0x53ab32(0x123)),_0x1eb496=[];for(const _0x4af684 of _0x47ccae){const _0x51f5fc=await computeFileHash(_0x4af684[_0x53ab32(0x11e)]),_0x571029=_0xf44704['functions'][_0x4af684[_0x53ab32(0x134)]],_0x4903e4=!!_0x571029&&_0x571029[_0x53ab32(0x11c)]===_0x51f5fc;_0x1eb496['push']({'lockKey':_0x4af684['lockKey'],'filePath':_0x4af684[_0x53ab32(0x11e)],'remoteId':_0x571029?.[_0x53ab32(0x13f)]??null,'mode':_0x571029?.[_0x53ab32(0x13f)]?_0x53ab32(0x12d):_0x53ab32(0x13d),'status':!_0x3d67cc&&_0x4903e4?_0x53ab32(0x13a):_0x53ab32(0x156)});}return{'method':_0x53ab32(0x13e),'url':_0x53ab32(0x152),'body':{'appCode':_0x12fa24[_0x53ab32(0x148)],'force':_0x3d67cc,'files':_0x1eb496},'description':_0x53ab32(0x14d)+_0x1eb496[_0x53ab32(0x14c)]+_0x53ab32(0x140)};},async 'execute'(_0x33616f){const _0xa78295=a32_0x347b62,_0x5a9158=loadBffProjectConfig(_0x33616f[_0xa78295(0x148)]),_0x54cf07=await readBffLockFile(_0x5a9158['lockFilePath']),{lockData:_0x4cadd1,appLock:_0x8e2bff}=ensureLockScope(_0x54cf07??createEmptyBffLock(),_0x33616f[_0xa78295(0x148)],_0x5a9158['scriptsRoot'],_0xa78295(0x127)),_0xcfce95=await getTargetFunctions(_0x5a9158,_0x33616f);if(_0xcfce95[_0xa78295(0x14c)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xa78295(0x132)};const _0xedd661=_0x33616f[_0xa78295(0x11f)](_0xa78295(0x123)),_0x1a6d7f=await buildHookMaps(_0x33616f[_0xa78295(0x148)],_0x33616f['apiDir'],_0xcfce95,_0x8e2bff),_0x48696b=[],_0x251bd7=[],_0x55f598=[];for(const _0x28fece of _0xcfce95){const _0x13e960=await computeFileHash(_0x28fece[_0xa78295(0x11e)]),_0x351cd4=_0x8e2bff[_0xa78295(0x129)][_0x28fece[_0xa78295(0x134)]];if(!_0xedd661&&_0x351cd4&&_0x351cd4['hash']===_0x13e960){_0x251bd7[_0xa78295(0x127)]({'lockKey':_0x28fece[_0xa78295(0x134)],'reason':_0xa78295(0x13a)});continue;}try{await uploadSingleFunction(_0x33616f[_0xa78295(0x148)],_0x28fece,_0x8e2bff,_0x1a6d7f);const _0x838a24=_0x8e2bff[_0xa78295(0x129)][_0x28fece[_0xa78295(0x134)]];_0x48696b[_0xa78295(0x127)]({'lockKey':_0x28fece['lockKey'],'remoteId':_0x838a24?.[_0xa78295(0x13f)]??0x0});}catch(_0x5bb246){_0x55f598['push']({'lockKey':_0x28fece['lockKey'],'error':_0x5bb246 instanceof Error?_0x5bb246['message']:String(_0x5bb246)});}}return _0x8e2bff[_0xa78295(0x137)]=new Date()['toISOString'](),await writeBffLockFile(_0x5a9158['lockFilePath'],_0x4cadd1),{'ok':_0x55f598['length']===0x0,'data':{'uploaded':_0x48696b,'skipped':_0x251bd7,'failed':_0x55f598},'message':'Push\x20complete:\x20'+_0x48696b[_0xa78295(0x14c)]+_0xa78295(0x154)+_0x251bd7['length']+_0xa78295(0x12f)+_0x55f598[_0xa78295(0x14c)]+_0xa78295(0x15c)};}};async function getTargetFunctions(_0x5f01d8,_0xb39a37){const _0x3d473f=a32_0x347b62,_0x2fd860=_0xb39a37[_0x3d473f(0x14a)](_0x3d473f(0x139)),_0x424b20=_0xb39a37[_0x3d473f(0x14a)](_0x3d473f(0x14f)),_0x4bf4f0=normalizeBffType(_0x2fd860)??undefined;if(_0x424b20&&!_0x4bf4f0)throw CliErrors[_0x3d473f(0x128)](_0x3d473f(0x157));const _0x3cce43=await scanLocalBffFunctions(_0x5f01d8,_0x4bf4f0);if(_0x424b20){const _0x89cfdd=_0x3cce43[_0x3d473f(0x11d)](_0x140683=>_0x140683[_0x3d473f(0x14f)]===_0x424b20);if(_0x89cfdd[_0x3d473f(0x14c)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x4bf4f0+'/'+_0x424b20);return _0x89cfdd;}return _0x3cce43;}async function buildHookMaps(_0x2f05d7,_0x3127d7,_0x33037d,_0x1edbc4){const _0x54f4d9=a32_0x347b62,_0x846e5e=_0x33037d[_0x54f4d9(0x13c)](_0x66c1e9=>_0x66c1e9[_0x54f4d9(0x139)]==='HOOK');if(!_0x846e5e)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x421d95=loadAliasMap(_0x3127d7,undefined,resolveApiFilePath(_0x3127d7,_0x2f05d7)),_0x217282=new Map(_0x421d95[_0x54f4d9(0x12a)](_0x14cc33=>[_0x14cc33[_0x54f4d9(0x136)],_0x14cc33[_0x54f4d9(0x15e)]]));for(const _0x10bf6c of Object[_0x54f4d9(0x121)](_0x1edbc4[_0x54f4d9(0x129)])){_0x10bf6c[_0x54f4d9(0x136)]&&_0x10bf6c[_0x54f4d9(0x15e)]&&!_0x217282[_0x54f4d9(0x126)](_0x10bf6c[_0x54f4d9(0x136)])&&_0x217282[_0x54f4d9(0x12c)](_0x10bf6c[_0x54f4d9(0x136)],_0x10bf6c[_0x54f4d9(0x15e)]);}const _0x534092=await listDatasets(_0x2f05d7),_0x29ca78=new Map(_0x534092[_0x54f4d9(0x12a)](_0x312b55=>[_0x312b55['code'],_0x312b55['id']]));return{'aliasToDatasetCode':_0x217282,'datasetCodeToId':_0x29ca78};}async function uploadSingleFunction(_0x5ce0e7,_0x22ce77,_0x517280,_0x54523e){const _0x3bf955=a32_0x347b62,_0x2143b0=await readFile(_0x22ce77['filePath'],_0x3bf955(0x133)),_0x3a42be=await computeFileHash(_0x22ce77['filePath']),_0x2fcff5=_0x517280[_0x3bf955(0x129)][_0x22ce77[_0x3bf955(0x134)]];if(_0x2fcff5?.['remoteId']&&_0x2fcff5[_0x3bf955(0x153)]==null)throw CliErrors['validation'](_0x22ce77[_0x3bf955(0x134)]+_0x3bf955(0x120));let _0x48e984=extractScriptDescription(_0x2143b0);if(!_0x48e984&&_0x2fcff5?.[_0x3bf955(0x13f)]){const _0x28b38f=await getBffScriptInfo(_0x2fcff5['remoteId']);_0x48e984=_0x28b38f[_0x3bf955(0x15a)]||undefined;}const _0x31b674={'appCode':_0x5ce0e7,'functionName':_0x22ce77[_0x3bf955(0x14f)],'scriptType':_0x22ce77[_0x3bf955(0x139)],'scriptContent':_0x2143b0};if(_0x2fcff5?.[_0x3bf955(0x13f)])_0x31b674['id']=_0x2fcff5[_0x3bf955(0x13f)];if(_0x2fcff5?.[_0x3bf955(0x153)]!=null)_0x31b674[_0x3bf955(0x153)]=_0x2fcff5[_0x3bf955(0x153)];if(_0x48e984)_0x31b674[_0x3bf955(0x15a)]=_0x48e984;if(_0x22ce77['type']===_0x3bf955(0x146)){const _0x37e210=_0x22ce77[_0x3bf955(0x136)];if(!_0x37e210||!_0x22ce77[_0x3bf955(0x124)]||!_0x22ce77[_0x3bf955(0x15d)])throw CliErrors[_0x3bf955(0x128)]('Incomplete\x20HOOK\x20path:\x20'+_0x22ce77[_0x3bf955(0x134)]);const _0x44ea52=_0x54523e['aliasToDatasetCode']['get'](_0x37e210)??_0x2fcff5?.['datasetCode']??_0x37e210,_0x18effb=_0x54523e[_0x3bf955(0x14b)]['get'](_0x44ea52);if(!_0x18effb)throw CliErrors[_0x3bf955(0x128)](_0x3bf955(0x125)+_0x37e210+_0x3bf955(0x14e)+(_0x3bf955(0x159)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x31b674[_0x3bf955(0x155)]=_0x18effb,_0x31b674[_0x3bf955(0x124)]=_0x22ce77[_0x3bf955(0x124)],_0x31b674[_0x3bf955(0x15d)]=_0x22ce77[_0x3bf955(0x15d)];}const _0x22a090=await saveBffScript(_0x31b674),_0x30e8fe=_0x22a090['id'],_0x40f099=_0x22a090[_0x3bf955(0x141)]??await getBffScriptInfo(_0x30e8fe),_0x38aefa={'hash':_0x3a42be,'remoteId':_0x30e8fe,'version':_0x40f099[_0x3bf955(0x153)]};if(_0x22ce77[_0x3bf955(0x139)]===_0x3bf955(0x146)){const _0x60e4e4=_0x22ce77[_0x3bf955(0x136)],_0x29edca=_0x54523e['aliasToDatasetCode'][_0x3bf955(0x11b)](_0x60e4e4)??_0x2fcff5?.[_0x3bf955(0x15e)]??_0x60e4e4;_0x54523e[_0x3bf955(0x122)]['has'](_0x60e4e4)?_0x38aefa[_0x3bf955(0x136)]=_0x60e4e4:_0x38aefa['alias']=_0x2fcff5?.[_0x3bf955(0x136)],_0x38aefa[_0x3bf955(0x15e)]=_0x29edca,_0x38aefa[_0x3bf955(0x124)]=_0x22ce77[_0x3bf955(0x124)],_0x38aefa[_0x3bf955(0x15d)]=_0x22ce77['functionNode'];}_0x517280['functions'][_0x22ce77['lockKey']]=_0x38aefa;}
1
+ const a32_0x185b03=a32_0x7e91;(function(_0x298363,_0x30f35a){const _0x52dd63=a32_0x7e91,_0x38a73f=_0x298363();while(!![]){try{const _0x3104c7=-parseInt(_0x52dd63(0xf7))/0x1*(parseInt(_0x52dd63(0xd7))/0x2)+parseInt(_0x52dd63(0xd6))/0x3*(-parseInt(_0x52dd63(0x107))/0x4)+-parseInt(_0x52dd63(0xd4))/0x5+parseInt(_0x52dd63(0x106))/0x6+-parseInt(_0x52dd63(0xf8))/0x7+parseInt(_0x52dd63(0xec))/0x8+-parseInt(_0x52dd63(0x10f))/0x9*(-parseInt(_0x52dd63(0x109))/0xa);if(_0x3104c7===_0x30f35a)break;else _0x38a73f['push'](_0x38a73f['shift']());}catch(_0x6737dd){_0x38a73f['push'](_0x38a73f['shift']());}}}(a32_0x5b22,0x9034b));import{readFile}from'node:fs/promises';function a32_0x7e91(_0xf458ae,_0x40ff3d){_0xf458ae=_0xf458ae-0xcf;const _0x5b2227=a32_0x5b22();let _0x7e913=_0x5b2227[_0xf458ae];return _0x7e913;}import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a32_0x5b22(){const _0x4fbb6a=['Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','alias','unchanged','ENDPOINT','36ybRlvm','name','push',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','type','script','version','\x20local\x20BFF\x20script(s)\x20for\x20push','lockFilePath','COMMON','5196220NknRDa','functionNode','3PVNvnn','430clQfYm','force','operationType','map','hash','filePath','scriptsRoot','string','datasetCode','functions','description','Push\x20local\x20BFF\x20scripts\x20to\x20remote','HOOK','POST','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','\x20uploaded,\x20','would_push','datasetId','bff','Local\x20function\x20not\x20found:\x20','remoteId','7783624uajdUx','validation','get','Push\x20complete:\x20','boolean','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Incomplete\x20HOOK\x20path:\x20','Run\x20`','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x20skipped,\x20','Force\x20push\x20ignoring\x20hash\x20protection','3278mDEcyT','1158108CUJzhL','update','message','appCode','values','length','lockKey','has','str','set','toISOString','/api/management/library/scripts/save','create','bool','1403790quNgeo','2852468nhHXmn','aliasToDatasetCode','5015810tNzaba','apiDir'];a32_0x5b22=function(){return _0x4fbb6a;};return a32_0x5b22();}export const bffPush={'service':a32_0x185b03(0xe9),'command':'push','description':a32_0x185b03(0xe2),'risk':'high-risk-write','flags':[{'name':a32_0x185b03(0x113),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a32_0x185b03(0xd3),a32_0x185b03(0x10e),a32_0x185b03(0xe3)]},{'name':a32_0x185b03(0x110),'type':a32_0x185b03(0xde),'description':a32_0x185b03(0x10b)},{'name':'force','type':a32_0x185b03(0xf0),'description':a32_0x185b03(0xf6)}],async 'dryRun'(_0x3ad171){const _0x27e469=a32_0x185b03,_0x1eca51=loadBffProjectConfig(_0x3ad171[_0x27e469(0xfb)]),_0x332b9d=await readBffLockFile(_0x1eca51[_0x27e469(0xd2)]),{appLock:_0x714aca}=ensureLockScope(_0x332b9d??createEmptyBffLock(),_0x3ad171['appCode'],_0x1eca51['scriptsRoot'],_0x27e469(0x111)),_0x23be3e=await getTargetFunctions(_0x1eca51,_0x3ad171),_0x267a38=_0x3ad171['bool']('force'),_0x2fc905=[];for(const _0x4b3d92 of _0x23be3e){const _0x12211f=await computeFileHash(_0x4b3d92[_0x27e469(0xdc)]),_0x37ed7d=_0x714aca[_0x27e469(0xe0)][_0x4b3d92['lockKey']],_0x1f4458=!!_0x37ed7d&&_0x37ed7d[_0x27e469(0xdb)]===_0x12211f;_0x2fc905[_0x27e469(0x111)]({'lockKey':_0x4b3d92[_0x27e469(0xfe)],'filePath':_0x4b3d92[_0x27e469(0xdc)],'remoteId':_0x37ed7d?.[_0x27e469(0xeb)]??null,'mode':_0x37ed7d?.['remoteId']?_0x27e469(0xf9):_0x27e469(0x104),'status':!_0x267a38&&_0x1f4458?_0x27e469(0x10d):_0x27e469(0xe7)});}return{'method':_0x27e469(0xe4),'url':_0x27e469(0x103),'body':{'appCode':_0x3ad171['appCode'],'force':_0x267a38,'files':_0x2fc905},'description':'Would\x20inspect\x20'+_0x2fc905[_0x27e469(0xfd)]+_0x27e469(0xd1)};},async 'execute'(_0x364924){const _0x386a8a=a32_0x185b03,_0x4a2107=loadBffProjectConfig(_0x364924[_0x386a8a(0xfb)]),_0x4286dc=await readBffLockFile(_0x4a2107['lockFilePath']),{lockData:_0x345ac8,appLock:_0x2364b9}=ensureLockScope(_0x4286dc??createEmptyBffLock(),_0x364924['appCode'],_0x4a2107[_0x386a8a(0xdd)],_0x386a8a(0x111)),_0x394612=await getTargetFunctions(_0x4a2107,_0x364924);if(_0x394612['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0xeabcb4=_0x364924[_0x386a8a(0x105)](_0x386a8a(0xd8)),_0x456347=await buildHookMaps(_0x364924['appCode'],_0x364924[_0x386a8a(0x10a)],_0x394612,_0x2364b9),_0x1b98f6=[],_0x57376a=[],_0xe8ea79=[];for(const _0x21985e of _0x394612){const _0x1f9aa5=await computeFileHash(_0x21985e[_0x386a8a(0xdc)]),_0x45e5f1=_0x2364b9[_0x386a8a(0xe0)][_0x21985e['lockKey']];if(!_0xeabcb4&&_0x45e5f1&&_0x45e5f1[_0x386a8a(0xdb)]===_0x1f9aa5){_0x57376a[_0x386a8a(0x111)]({'lockKey':_0x21985e[_0x386a8a(0xfe)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x364924['appCode'],_0x21985e,_0x2364b9,_0x456347);const _0x10d36b=_0x2364b9['functions'][_0x21985e[_0x386a8a(0xfe)]];_0x1b98f6[_0x386a8a(0x111)]({'lockKey':_0x21985e['lockKey'],'remoteId':_0x10d36b?.[_0x386a8a(0xeb)]??0x0});}catch(_0x2c8c53){_0xe8ea79['push']({'lockKey':_0x21985e[_0x386a8a(0xfe)],'error':_0x2c8c53 instanceof Error?_0x2c8c53[_0x386a8a(0xfa)]:String(_0x2c8c53)});}}return _0x2364b9['lastSync']=new Date()[_0x386a8a(0x102)](),await writeBffLockFile(_0x4a2107[_0x386a8a(0xd2)],_0x345ac8),{'ok':_0xe8ea79[_0x386a8a(0xfd)]===0x0,'data':{'uploaded':_0x1b98f6,'skipped':_0x57376a,'failed':_0xe8ea79},'message':_0x386a8a(0xef)+_0x1b98f6[_0x386a8a(0xfd)]+_0x386a8a(0xe6)+_0x57376a[_0x386a8a(0xfd)]+_0x386a8a(0xf5)+_0xe8ea79['length']+'\x20failed'};}};async function getTargetFunctions(_0x2fbbc8,_0x12c432){const _0x4a4a93=a32_0x185b03,_0x58969d=_0x12c432[_0x4a4a93(0x100)](_0x4a4a93(0x113)),_0x285b5e=_0x12c432[_0x4a4a93(0x100)](_0x4a4a93(0x110)),_0x8955e2=normalizeBffType(_0x58969d)??undefined;if(_0x285b5e&&!_0x8955e2)throw CliErrors['validation'](_0x4a4a93(0xf1));const _0x12ea19=await scanLocalBffFunctions(_0x2fbbc8,_0x8955e2);if(_0x285b5e){const _0x3b08aa=_0x12ea19['filter'](_0x384820=>_0x384820[_0x4a4a93(0x110)]===_0x285b5e);if(_0x3b08aa[_0x4a4a93(0xfd)]===0x0)throw CliErrors[_0x4a4a93(0xed)](_0x4a4a93(0xea)+_0x8955e2+'/'+_0x285b5e);return _0x3b08aa;}return _0x12ea19;}async function buildHookMaps(_0x5192bf,_0x39a87d,_0x1d9cbe,_0x4e4cb7){const _0x338c08=a32_0x185b03,_0x5d1b5a=_0x1d9cbe['some'](_0x200cd4=>_0x200cd4[_0x338c08(0x113)]===_0x338c08(0xe3));if(!_0x5d1b5a)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x20f4ac=loadAliasMap(_0x39a87d,undefined,resolveApiFilePath(_0x39a87d,_0x5192bf)),_0x3b0abd=new Map(_0x20f4ac['map'](_0x14e40c=>[_0x14e40c[_0x338c08(0x10c)],_0x14e40c[_0x338c08(0xdf)]]));for(const _0x4c4a05 of Object[_0x338c08(0xfc)](_0x4e4cb7['functions'])){_0x4c4a05[_0x338c08(0x10c)]&&_0x4c4a05['datasetCode']&&!_0x3b0abd[_0x338c08(0xff)](_0x4c4a05[_0x338c08(0x10c)])&&_0x3b0abd[_0x338c08(0x101)](_0x4c4a05[_0x338c08(0x10c)],_0x4c4a05['datasetCode']);}const _0x4b2012=await listDatasets(_0x5192bf),_0x448fb8=new Map(_0x4b2012[_0x338c08(0xda)](_0x374cb8=>[_0x374cb8['code'],_0x374cb8['id']]));return{'aliasToDatasetCode':_0x3b0abd,'datasetCodeToId':_0x448fb8};}async function uploadSingleFunction(_0x1ef898,_0x1e057a,_0x522453,_0x4b0230){const _0x3ec668=a32_0x185b03,_0x1bbf78=await readFile(_0x1e057a[_0x3ec668(0xdc)],'utf8'),_0x3e2d77=await computeFileHash(_0x1e057a[_0x3ec668(0xdc)]),_0x571843=_0x522453['functions'][_0x1e057a[_0x3ec668(0xfe)]];if(_0x571843?.[_0x3ec668(0xeb)]&&_0x571843[_0x3ec668(0xd0)]==null)throw CliErrors[_0x3ec668(0xed)](_0x1e057a[_0x3ec668(0xfe)]+_0x3ec668(0x112));let _0x5d5461=extractScriptDescription(_0x1bbf78);if(!_0x5d5461&&_0x571843?.[_0x3ec668(0xeb)]){const _0x31d1fa=await getBffScriptInfo(_0x571843['remoteId']);_0x5d5461=_0x31d1fa[_0x3ec668(0xe1)]||undefined;}const _0x40ba69={'appCode':_0x1ef898,'functionName':_0x1e057a[_0x3ec668(0x110)],'scriptType':_0x1e057a['type'],'scriptContent':_0x1bbf78};if(_0x571843?.[_0x3ec668(0xeb)])_0x40ba69['id']=_0x571843[_0x3ec668(0xeb)];if(_0x571843?.[_0x3ec668(0xd0)]!=null)_0x40ba69[_0x3ec668(0xd0)]=_0x571843[_0x3ec668(0xd0)];if(_0x5d5461)_0x40ba69['description']=_0x5d5461;if(_0x1e057a[_0x3ec668(0x113)]===_0x3ec668(0xe3)){const _0x6b63db=_0x1e057a[_0x3ec668(0x10c)];if(!_0x6b63db||!_0x1e057a['operationType']||!_0x1e057a[_0x3ec668(0xd5)])throw CliErrors[_0x3ec668(0xed)](_0x3ec668(0xf2)+_0x1e057a[_0x3ec668(0xfe)]);const _0x365f79=_0x4b0230['aliasToDatasetCode'][_0x3ec668(0xee)](_0x6b63db)??_0x571843?.[_0x3ec668(0xdf)]??_0x6b63db,_0x5d016e=_0x4b0230['datasetCodeToId'][_0x3ec668(0xee)](_0x365f79);if(!_0x5d016e)throw CliErrors[_0x3ec668(0xed)](_0x3ec668(0xf4)+_0x6b63db+'\x22.\x20'+(_0x3ec668(0xf3)+CLI_BIN_NAME+_0x3ec668(0xe5)));_0x40ba69[_0x3ec668(0xe8)]=_0x5d016e,_0x40ba69['operationType']=_0x1e057a['operationType'],_0x40ba69[_0x3ec668(0xd5)]=_0x1e057a['functionNode'];}const _0xf1e3c5=await saveBffScript(_0x40ba69),_0x3ea91c=_0xf1e3c5['id'],_0xcbeb1a=_0xf1e3c5[_0x3ec668(0xcf)]??await getBffScriptInfo(_0x3ea91c),_0x54b53c={'hash':_0x3e2d77,'remoteId':_0x3ea91c,'version':_0xcbeb1a[_0x3ec668(0xd0)]};if(_0x1e057a[_0x3ec668(0x113)]==='HOOK'){const _0x158324=_0x1e057a['alias'],_0x25d4bc=_0x4b0230[_0x3ec668(0x108)]['get'](_0x158324)??_0x571843?.[_0x3ec668(0xdf)]??_0x158324;_0x4b0230['aliasToDatasetCode'][_0x3ec668(0xff)](_0x158324)?_0x54b53c['alias']=_0x158324:_0x54b53c[_0x3ec668(0x10c)]=_0x571843?.[_0x3ec668(0x10c)],_0x54b53c[_0x3ec668(0xdf)]=_0x25d4bc,_0x54b53c[_0x3ec668(0xd9)]=_0x1e057a['operationType'],_0x54b53c[_0x3ec668(0xd5)]=_0x1e057a['functionNode'];}_0x522453[_0x3ec668(0xe0)][_0x1e057a[_0x3ec668(0xfe)]]=_0x54b53c;}