@lovrabet/rabetbase-cli 2.1.7-beta.5 → 2.1.7-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) 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
  197. package/templates/projects/sub-app-react-demo/README.md +1 -1
@@ -1 +1 @@
1
- const a19_0x53213a=a19_0x3a99;(function(_0x5d0fe1,_0x1f8195){const _0x1d9dcc=a19_0x3a99,_0x1d37c0=_0x5d0fe1();while(!![]){try{const _0x1e1a1c=-parseInt(_0x1d9dcc(0x1b3))/0x1*(parseInt(_0x1d9dcc(0x1ac))/0x2)+-parseInt(_0x1d9dcc(0x1be))/0x3*(-parseInt(_0x1d9dcc(0x1ad))/0x4)+-parseInt(_0x1d9dcc(0x1af))/0x5+parseInt(_0x1d9dcc(0x1ab))/0x6+-parseInt(_0x1d9dcc(0x1b6))/0x7*(-parseInt(_0x1d9dcc(0x1bb))/0x8)+-parseInt(_0x1d9dcc(0x1b4))/0x9*(parseInt(_0x1d9dcc(0x1ae))/0xa)+parseInt(_0x1d9dcc(0x1ba))/0xb;if(_0x1e1a1c===_0x1f8195)break;else _0x1d37c0['push'](_0x1d37c0['shift']());}catch(_0x4a78d9){_0x1d37c0['push'](_0x1d37c0['shift']());}}}(a19_0x2add,0xdd92c));import{listRemoteApps}from'../../core/api-client.js';function a19_0x2add(){const _0x49912a=['327292fTvYwj','11024EnryWq','10jbhHPs','5418000HznuRD','appName','appCode','read','8VWEfTc','943065FHyQVH','platform','28483LeaSGR','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','remote','map','20049766WQqfMN','96uqrXQl','cookie','appDesc','438jZawto','../../core/api-client.js','6787242iFIYmJ'];a19_0x2add=function(){return _0x49912a;};return a19_0x2add();}function a19_0x3a99(_0x290ac9,_0x45fa08){_0x290ac9=_0x290ac9-0x1ab;const _0x2adde7=a19_0x2add();let _0x3a9936=_0x2adde7[_0x290ac9];return _0x3a9936;}async function execute(_0x1db2ec){const _0x17a6be=a19_0x3a99,{setActiveCookie:_0xb46e0c}=await import(_0x17a6be(0x1bf));_0xb46e0c(_0x1db2ec[_0x17a6be(0x1bc)]);const _0x33cc29=await listRemoteApps();return{'ok':!![],'data':{'items':_0x33cc29[_0x17a6be(0x1b9)](_0x419588=>({..._0x419588['id']!=null?{'id':_0x419588['id']}:{},'appCode':_0x419588[_0x17a6be(0x1b1)],'appName':_0x419588[_0x17a6be(0x1b0)],..._0x419588[_0x17a6be(0x1bd)]!=null?{'appDesc':_0x419588[_0x17a6be(0x1bd)]}:{}})),'meta':{'source':_0x17a6be(0x1b5)}}};}export const appRemoteDefinition={'service':'app','command':a19_0x53213a(0x1b8),'description':a19_0x53213a(0x1b7),'risk':a19_0x53213a(0x1b2),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ const a19_0x87ecf2=a19_0x583e;(function(_0x1ecb3c,_0x13e80d){const _0x3642d6=a19_0x583e,_0x54b181=_0x1ecb3c();while(!![]){try{const _0x16380d=parseInt(_0x3642d6(0x14d))/0x1*(parseInt(_0x3642d6(0x15b))/0x2)+parseInt(_0x3642d6(0x153))/0x3+parseInt(_0x3642d6(0x152))/0x4+parseInt(_0x3642d6(0x158))/0x5+parseInt(_0x3642d6(0x14f))/0x6+parseInt(_0x3642d6(0x151))/0x7*(parseInt(_0x3642d6(0x14b))/0x8)+-parseInt(_0x3642d6(0x155))/0x9*(parseInt(_0x3642d6(0x154))/0xa);if(_0x16380d===_0x13e80d)break;else _0x54b181['push'](_0x54b181['shift']());}catch(_0xc7e023){_0x54b181['push'](_0x54b181['shift']());}}}(a19_0x1ed0,0x6ffdb));import{listRemoteApps}from'../../core/api-client.js';function a19_0x583e(_0x5405d3,_0x2c1d89){_0x5405d3=_0x5405d3-0x14b;const _0x1ed05c=a19_0x1ed0();let _0x583e2e=_0x1ed05c[_0x5405d3];return _0x583e2e;}async function execute(_0x1bc6a1){const _0x580d56=a19_0x583e,{setActiveCookie:_0x584c67}=await import('../../core/api-client.js');_0x584c67(_0x1bc6a1['cookie']);const _0x36ce09=await listRemoteApps();return{'ok':!![],'data':{'items':_0x36ce09['map'](_0x2d4221=>({..._0x2d4221['id']!=null?{'id':_0x2d4221['id']}:{},'appCode':_0x2d4221[_0x580d56(0x14e)],'appName':_0x2d4221[_0x580d56(0x15a)],..._0x2d4221[_0x580d56(0x14c)]!=null?{'appDesc':_0x2d4221[_0x580d56(0x14c)]}:{}})),'meta':{'source':_0x580d56(0x159)}}};}function a19_0x1ed0(){const _0x4e77f3=['986816lYdgeq','appDesc','234517xmZFve','appCode','3366300ZGCbdD','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','7GZotLx','2008152UnLJrf','1328187wjtNoJ','10WUJnGo','13270401hFzylg','remote','read','347590iUQyWz','platform','appName','2skOTdM'];a19_0x1ed0=function(){return _0x4e77f3;};return a19_0x1ed0();}export const appRemoteDefinition={'service':'app','command':a19_0x87ecf2(0x156),'description':a19_0x87ecf2(0x150),'risk':a19_0x87ecf2(0x157),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a20_0x23b7(){const _0xd784f1=['3124kFeIxT','23083125EujrkT','674tTatzq','39228MMUjMo','12BtXldG','316ZQqBXq','8070534xkMlTM','10zCvGgV','1049224OlJUZY','64JGPvCw','1851445zltvMt','21JLsPZm','177267yrRivE'];a20_0x23b7=function(){return _0xd784f1;};return a20_0x23b7();}(function(_0x5af35b,_0x371f49){const _0x1398c4=a20_0x5ce3,_0x53db22=_0x5af35b();while(!![]){try{const _0x4aeb48=parseInt(_0x1398c4(0xde))/0x1*(parseInt(_0x1398c4(0xe8))/0x2)+-parseInt(_0x1398c4(0xe5))/0x3*(parseInt(_0x1398c4(0xe2))/0x4)+parseInt(_0x1398c4(0xe3))/0x5*(-parseInt(_0x1398c4(0xdd))/0x6)+parseInt(_0x1398c4(0xe4))/0x7*(parseInt(_0x1398c4(0xe1))/0x8)+parseInt(_0x1398c4(0xdf))/0x9*(parseInt(_0x1398c4(0xe0))/0xa)+parseInt(_0x1398c4(0xe6))/0xb*(-parseInt(_0x1398c4(0xe9))/0xc)+parseInt(_0x1398c4(0xe7))/0xd;if(_0x4aeb48===_0x371f49)break;else _0x53db22['push'](_0x53db22['shift']());}catch(_0x5c761a){_0x53db22['push'](_0x53db22['shift']());}}}(a20_0x23b7,0x88350));import{appListDefinition}from'../../commands/app/list.js';import{appRemoteDefinition}from'../../commands/app/discover.js';function a20_0x5ce3(_0xa2453,_0x10013a){_0xa2453=_0xa2453-0xdd;const _0x23b72f=a20_0x23b7();let _0x5ce3fa=_0x23b72f[_0xa2453];return _0x5ce3fa;}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(_0x4f5878,_0x2d9e33){const _0x2519c1=a20_0x11fd,_0x5f3b86=_0x4f5878();while(!![]){try{const _0x5e7fb4=-parseInt(_0x2519c1(0x1a7))/0x1+parseInt(_0x2519c1(0x1a4))/0x2+-parseInt(_0x2519c1(0x1a6))/0x3+parseInt(_0x2519c1(0x1ac))/0x4+-parseInt(_0x2519c1(0x1a9))/0x5*(-parseInt(_0x2519c1(0x1ad))/0x6)+-parseInt(_0x2519c1(0x1ab))/0x7*(-parseInt(_0x2519c1(0x1a5))/0x8)+parseInt(_0x2519c1(0x1a8))/0x9*(-parseInt(_0x2519c1(0x1aa))/0xa);if(_0x5e7fb4===_0x2d9e33)break;else _0x5f3b86['push'](_0x5f3b86['shift']());}catch(_0x42b8a4){_0x5f3b86['push'](_0x5f3b86['shift']());}}}(a20_0x4e86,0x82159));import{appListDefinition}from'../../commands/app/list.js';function a20_0x4e86(){const _0x4e2566=['85673uMGxxH','3630400SjlsYd','6EJxNGO','1996968Pxvjgl','464IFGkXU','611661nrWqgK','665988HWqYLP','7848OeBYcD','1079810vpoVOQ','16390kxvVVQ'];a20_0x4e86=function(){return _0x4e2566;};return a20_0x4e86();}function a20_0x11fd(_0x43d23f,_0x40cfa6){_0x43d23f=_0x43d23f-0x1a4;const _0x4e86b7=a20_0x4e86();let _0x11fd76=_0x4e86b7[_0x43d23f];return _0x11fd76;}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 +1 @@
1
- const a21_0x21c4ca=a21_0x5472;(function(_0x3120e0,_0x5e399c){const _0x430d2a=a21_0x5472,_0x3467a0=_0x3120e0();while(!![]){try{const _0x51dfc4=parseInt(_0x430d2a(0x1f9))/0x1*(parseInt(_0x430d2a(0x211))/0x2)+parseInt(_0x430d2a(0x1f1))/0x3*(parseInt(_0x430d2a(0x1ec))/0x4)+-parseInt(_0x430d2a(0x1f2))/0x5+parseInt(_0x430d2a(0x201))/0x6*(parseInt(_0x430d2a(0x208))/0x7)+parseInt(_0x430d2a(0x1ff))/0x8+parseInt(_0x430d2a(0x203))/0x9*(-parseInt(_0x430d2a(0x1f8))/0xa)+-parseInt(_0x430d2a(0x1fe))/0xb*(parseInt(_0x430d2a(0x1f4))/0xc);if(_0x51dfc4===_0x5e399c)break;else _0x3467a0['push'](_0x3467a0['shift']());}catch(_0x2be58d){_0x3467a0['push'](_0x3467a0['shift']());}}}(a21_0x3161,0xc4b21));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';function a21_0x5472(_0x25a860,_0x39e4ba){_0x25a860=_0x25a860-0x1ec;const _0x316106=a21_0x3161();let _0x5472c1=_0x316106[_0x25a860];return _0x5472c1;}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function buildItemsFromLayer(_0x26fcfb,_0x1bb3de){const _0x3f2011=a21_0x5472,_0x4332af=[],_0x335c34=_0x26fcfb[_0x3f2011(0x20a)]&&typeof _0x26fcfb[_0x3f2011(0x20a)]==='object'?_0x26fcfb['apps']:{},_0x2a14ec=_0x26fcfb[_0x3f2011(0x1fc)]||undefined;for(const [_0x144719,_0x328eb9]of Object[_0x3f2011(0x202)](_0x335c34)){if(!_0x328eb9||typeof _0x328eb9!==_0x3f2011(0x20d)||!_0x328eb9['appcode'])continue;_0x4332af[_0x3f2011(0x207)]({'name':_0x144719,'appcode':_0x328eb9[_0x3f2011(0x214)],'named':!![],'definedIn':_0x1bb3de,'isDefault':_0x144719===_0x2a14ec,...buildAppProfileListFields(_0x328eb9)});}return _0x4332af;}function buildMergedItems(_0xea55ae,_0xa5c603){const _0xfd099=a21_0x5472,{apps:apps={},defaultApp:_0x48a8f9}=_0xea55ae,_0x3600cb=_0xa5c603['globalConfig'][_0xfd099(0x20a)]&&typeof _0xa5c603[_0xfd099(0x212)][_0xfd099(0x20a)]===_0xfd099(0x20d)?_0xa5c603[_0xfd099(0x212)][_0xfd099(0x20a)]:{},_0x14d64d=_0xa5c603[_0xfd099(0x1fb)][_0xfd099(0x20a)]&&typeof _0xa5c603[_0xfd099(0x1fb)][_0xfd099(0x20a)]===_0xfd099(0x20d)?_0xa5c603[_0xfd099(0x1fb)]['apps']:{},_0x35b2ab=_0xa5c603[_0xfd099(0x1fb)][_0xfd099(0x20e)]===![],_0x287dac=Object[_0xfd099(0x202)](apps),_0x5c6bea=_0x287dac[_0xfd099(0x1f5)](([_0x53c2bb,_0x5ae2f4])=>({'name':_0x53c2bb,'appcode':_0x5ae2f4['appcode'],'named':!![],'definedIn':appDefinedIn(_0x53c2bb,_0x3600cb,_0x14d64d,_0x35b2ab),'isDefault':_0x53c2bb===_0x48a8f9,...buildAppProfileListFields(_0x5ae2f4)}));return _0x5c6bea;}function a21_0x3161(){const _0x4e6c37=['entries','1503OlJrxC','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','merged','No\x20apps\x20configured','push','14wyLXra','global','apps','length','app','object','inherit','\x20in\x20','read','1966oRVLgc','globalConfig','globalPath','appcode','\x20config','6772vACUfo','boolean','projectPath','find','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','2853XpSKpA','5118820MXheFn','project','600jHzbWk','map','isCurrent','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','84520tBDqZY','398NLxpxy','bool','projectConfig','defaultApp','List\x20all\x20configured\x20apps','91652KpNKdZ','11280176ggOVia','.\x20Use\x20`','738642TCTaan'];a21_0x3161=function(){return _0x4e6c37;};return a21_0x3161();}async function execute(_0x535b37){const _0x366ec9=a21_0x5472,_0x27f2ff=_0x535b37[_0x366ec9(0x1fa)](_0x366ec9(0x209)),_0x1773cc=_0x535b37[_0x366ec9(0x1fa)]('project'),_0x439b02=_0x27f2ff?_0x366ec9(0x209):_0x1773cc?_0x366ec9(0x1f3):_0x366ec9(0x205),{config:_0x2fec8c,layers:_0x187ce8}=readRawConfigWithLayers(),_0x2d5823=resolveDefaultAppSource(_0x187ce8),{defaultApp:_0x3d85a6}=_0x2fec8c;let _0x19fc54,_0x4a3b0f;switch(_0x439b02){case _0x366ec9(0x209):_0x19fc54=buildItemsFromLayer(_0x187ce8[_0x366ec9(0x212)],'global'),_0x4a3b0f=_0x187ce8[_0x366ec9(0x213)];break;case _0x366ec9(0x1f3):_0x19fc54=buildItemsFromLayer(_0x187ce8['projectConfig'],'project'),_0x4a3b0f=_0x187ce8[_0x366ec9(0x1ee)];break;default:_0x19fc54=buildMergedItems(_0x2fec8c,_0x187ce8);break;}enrichAppListItemsWithMergedSelection(_0x19fc54,_0x535b37['mergedCli']);if(_0x19fc54[_0x366ec9(0x20b)]===0x0){const _0x11358a=_0x439b02===_0x366ec9(0x205)?'':_0x366ec9(0x20f)+_0x439b02+_0x366ec9(0x215);return{'ok':!![],'data':[],'message':_0x366ec9(0x206)+_0x11358a+_0x366ec9(0x200)+CLI_BIN_NAME+_0x366ec9(0x1f0)};}const _0x25b569=_0x19fc54[_0x366ec9(0x1ef)](_0x4e034d=>_0x4e034d[_0x366ec9(0x1f6)]===!![]),_0x4b2037=_0x3d85a6??_0x25b569?.[_0x366ec9(0x214)]??null,_0x333fd7=_0x439b02===_0x366ec9(0x205)?{'globalPath':_0x187ce8[_0x366ec9(0x213)]??null,'projectPath':_0x187ce8[_0x366ec9(0x1ee)]??null,'defaultApp':_0x4b2037,'defaultAppSource':_0x3d85a6!=null?_0x2d5823:null}:{'scope':_0x439b02,'configPath':_0x4a3b0f??null};return{'ok':!![],'data':{'items':_0x19fc54,'meta':_0x333fd7}};}export const appListDefinition={'service':a21_0x21c4ca(0x20c),'command':'list','description':a21_0x21c4ca(0x1fd),'risk':a21_0x21c4ca(0x210),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x21c4ca(0x209),'type':a21_0x21c4ca(0x1ed),'description':a21_0x21c4ca(0x204),'default':![]},{'name':'project','type':a21_0x21c4ca(0x1ed),'description':a21_0x21c4ca(0x1f7),'default':![]}],'execute':execute};
1
+ const a21_0x36c21e=a21_0x23cf;(function(_0x1aa1a0,_0x567156){const _0x2d5d2a=a21_0x23cf,_0x1f537c=_0x1aa1a0();while(!![]){try{const _0x3aabcd=-parseInt(_0x2d5d2a(0x7f))/0x1*(-parseInt(_0x2d5d2a(0x8b))/0x2)+parseInt(_0x2d5d2a(0x83))/0x3*(parseInt(_0x2d5d2a(0x74))/0x4)+parseInt(_0x2d5d2a(0x93))/0x5+-parseInt(_0x2d5d2a(0x80))/0x6+parseInt(_0x2d5d2a(0x70))/0x7*(-parseInt(_0x2d5d2a(0x8e))/0x8)+-parseInt(_0x2d5d2a(0x81))/0x9*(-parseInt(_0x2d5d2a(0x7d))/0xa)+parseInt(_0x2d5d2a(0x7c))/0xb*(parseInt(_0x2d5d2a(0x99))/0xc);if(_0x3aabcd===_0x567156)break;else _0x1f537c['push'](_0x1f537c['shift']());}catch(_0x59fc74){_0x1f537c['push'](_0x1f537c['shift']());}}}(a21_0x34e5,0x62007));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';function a21_0x23cf(_0x3af0d8,_0x812f63){_0x3af0d8=_0x3af0d8-0x70;const _0x34e536=a21_0x34e5();let _0x23cfcb=_0x34e536[_0x3af0d8];return _0x23cfcb;}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function buildItemsFromLayer(_0x4bad3e,_0x1fcdae){const _0x3c6774=a21_0x23cf,_0x390af8=[],_0x18ff9e=_0x4bad3e['apps']&&typeof _0x4bad3e[_0x3c6774(0x88)]===_0x3c6774(0x8a)?_0x4bad3e[_0x3c6774(0x88)]:{},_0x19c8e9=_0x4bad3e[_0x3c6774(0x90)]||undefined;for(const [_0x454d28,_0x504e1d]of Object[_0x3c6774(0x7a)](_0x18ff9e)){if(!_0x504e1d||typeof _0x504e1d!==_0x3c6774(0x8a)||!_0x504e1d[_0x3c6774(0x89)])continue;_0x390af8[_0x3c6774(0x76)]({'name':_0x454d28,'appcode':_0x504e1d[_0x3c6774(0x89)],'named':!![],'definedIn':_0x1fcdae,'isDefault':_0x454d28===_0x19c8e9,...buildAppProfileListFields(_0x504e1d)});}return _0x390af8;}function a21_0x34e5(){const _0x17dae7=['2LSxzZU','\x20config','length','76968pBKwWV','map','defaultApp','merged','project','1093200YucQYT','read','bool','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','globalConfig','No\x20apps\x20configured','257844PqzeSY','497kGMGdD','mergedCli','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','inherit','19120JfLZtE','List\x20all\x20configured\x20apps','push','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','projectConfig','app','entries','find','385urttwL','10DLWzpE','global','512947fUGrjC','3938388criWQm','2100348cZHIUV','list','15rpKber','\x20in\x20','boolean','projectPath','globalPath','apps','appcode','object'];a21_0x34e5=function(){return _0x17dae7;};return a21_0x34e5();}function buildMergedItems(_0x20f9af,_0x214d82){const _0x278cb4=a21_0x23cf,{apps:apps={},defaultApp:_0x157907}=_0x20f9af,_0x1c7fd9=_0x214d82[_0x278cb4(0x97)][_0x278cb4(0x88)]&&typeof _0x214d82['globalConfig'][_0x278cb4(0x88)]===_0x278cb4(0x8a)?_0x214d82['globalConfig'][_0x278cb4(0x88)]:{},_0x1843a3=_0x214d82['projectConfig']['apps']&&typeof _0x214d82[_0x278cb4(0x78)]['apps']===_0x278cb4(0x8a)?_0x214d82['projectConfig'][_0x278cb4(0x88)]:{},_0x4aeccc=_0x214d82[_0x278cb4(0x78)][_0x278cb4(0x73)]===![],_0x276afc=Object[_0x278cb4(0x7a)](apps),_0x2a5f8a=_0x276afc[_0x278cb4(0x8f)](([_0x57ef38,_0x7b0e5f])=>({'name':_0x57ef38,'appcode':_0x7b0e5f['appcode'],'named':!![],'definedIn':appDefinedIn(_0x57ef38,_0x1c7fd9,_0x1843a3,_0x4aeccc),'isDefault':_0x57ef38===_0x157907,...buildAppProfileListFields(_0x7b0e5f)}));return _0x2a5f8a;}async function execute(_0x5d09aa){const _0x45c42d=a21_0x23cf,_0x1bf3f0=_0x5d09aa['bool'](_0x45c42d(0x7e)),_0x32c4ef=_0x5d09aa[_0x45c42d(0x95)]('project'),_0x624267=_0x1bf3f0?_0x45c42d(0x7e):_0x32c4ef?'project':_0x45c42d(0x91),{config:_0x2320b5,layers:_0x23085f}=readRawConfigWithLayers(),_0x33d0bc=resolveDefaultAppSource(_0x23085f),{defaultApp:_0x1af38d}=_0x2320b5;let _0x51bd85,_0x1a696c;switch(_0x624267){case _0x45c42d(0x7e):_0x51bd85=buildItemsFromLayer(_0x23085f[_0x45c42d(0x97)],'global'),_0x1a696c=_0x23085f['globalPath'];break;case _0x45c42d(0x92):_0x51bd85=buildItemsFromLayer(_0x23085f[_0x45c42d(0x78)],_0x45c42d(0x92)),_0x1a696c=_0x23085f[_0x45c42d(0x86)];break;default:_0x51bd85=buildMergedItems(_0x2320b5,_0x23085f);break;}enrichAppListItemsWithMergedSelection(_0x51bd85,_0x5d09aa[_0x45c42d(0x71)]);if(_0x51bd85[_0x45c42d(0x8d)]===0x0){const _0x25aa12=_0x624267===_0x45c42d(0x91)?'':_0x45c42d(0x84)+_0x624267+_0x45c42d(0x8c);return{'ok':!![],'data':[],'message':_0x45c42d(0x98)+_0x25aa12+'.\x20Use\x20`'+CLI_BIN_NAME+_0x45c42d(0x96)};}const _0x40ebe4=_0x51bd85[_0x45c42d(0x7b)](_0x328fbd=>_0x328fbd['isCurrent']===!![]),_0x365796=_0x1af38d??_0x40ebe4?.[_0x45c42d(0x89)]??null,_0x50f7b6=_0x624267===_0x45c42d(0x91)?{'globalPath':_0x23085f[_0x45c42d(0x87)]??null,'projectPath':_0x23085f['projectPath']??null,'defaultApp':_0x365796,'defaultAppSource':_0x1af38d!=null?_0x33d0bc:null}:{'scope':_0x624267,'configPath':_0x1a696c??null};return{'ok':!![],'data':{'items':_0x51bd85,'meta':_0x50f7b6}};}export const appListDefinition={'service':a21_0x36c21e(0x79),'command':a21_0x36c21e(0x82),'description':a21_0x36c21e(0x75),'risk':a21_0x36c21e(0x94),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x36c21e(0x7e),'type':a21_0x36c21e(0x85),'description':a21_0x36c21e(0x77),'default':![]},{'name':'project','type':a21_0x36c21e(0x85),'description':a21_0x36c21e(0x72),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a22_0x384971=a22_0xe179;(function(_0x43449b,_0x592bcc){const _0x9363d5=a22_0xe179,_0x1f39d7=_0x43449b();while(!![]){try{const _0x450429=-parseInt(_0x9363d5(0x121))/0x1*(parseInt(_0x9363d5(0x136))/0x2)+parseInt(_0x9363d5(0x12b))/0x3+parseInt(_0x9363d5(0x11a))/0x4+-parseInt(_0x9363d5(0x138))/0x5+-parseInt(_0x9363d5(0x127))/0x6*(-parseInt(_0x9363d5(0x124))/0x7)+parseInt(_0x9363d5(0x117))/0x8*(-parseInt(_0x9363d5(0x12d))/0x9)+-parseInt(_0x9363d5(0x119))/0xa;if(_0x450429===_0x592bcc)break;else _0x1f39d7['push'](_0x1f39d7['shift']());}catch(_0x55213a){_0x1f39d7['push'](_0x1f39d7['shift']());}}}(a22_0x4c9d,0x78a51));import{CliErrors}from'../../errors.js';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(_0x20c8e9){const _0x3f92ec=a22_0xe179,_0x442aa9=_0x20c8e9[_0x3f92ec(0x125)][0x0]?.['trim']();if(!_0x442aa9)throw CliErrors['validation']('Missing\x20app\x20name.',_0x3f92ec(0x135)+CLI_BIN_NAME+_0x3f92ec(0x137));}function a22_0x4c9d(){const _0x5bd6b2=['35196SPFHUS','defaultApp','\x22\x20still\x20defined\x20in\x20','Removed\x20app\x20\x22','2646957WmnPfL','Use\x20global\x20config\x20scope','75249pbDElB','both','bool','name','\x20Note:\x20app\x20\x22','project','Remove\x20an\x20app\x20from\x20config','App\x20\x22','Usage:\x20','2QIsWmT','\x20app\x20remove\x20<name>\x20[--global]','932530EdDixF','boolean','\x22\x20not\x20found.','\x20config.','projectConfig','object','56Vgaevh','remove','3300280ouOBNl','239568FUEVFf','global','high-risk-write','\x20Default\x20app\x20changed\x20to\x20\x22','App\x20profile\x20name\x20to\x20remove','inherit','length','705961LTqjEb','trim','globalConfig','994paecUb','args','apps'];a22_0x4c9d=function(){return _0x5bd6b2;};return a22_0x4c9d();}async function execute(_0x48baf1){const _0x2f9bd5=a22_0xe179,_0x4eb70f=_0x48baf1[_0x2f9bd5(0x125)][0x0]?.[_0x2f9bd5(0x122)]();if(!_0x4eb70f)throw CliErrors['validation']('Missing\x20app\x20name.',_0x2f9bd5(0x135)+CLI_BIN_NAME+_0x2f9bd5(0x137));const _0x2ae976=_0x48baf1[_0x2f9bd5(0x12f)]('global'),{config:_0x5d9bf6,layers:_0x452142}=readRawConfigWithLayers(),_0xb4b5e7=_0x5d9bf6[_0x2f9bd5(0x126)]??{};if(!_0xb4b5e7[_0x4eb70f])throw CliErrors['validation'](_0x2f9bd5(0x134)+_0x4eb70f+_0x2f9bd5(0x13a));const _0x4a15bf=_0x452142[_0x2f9bd5(0x123)]['apps']&&typeof _0x452142[_0x2f9bd5(0x123)][_0x2f9bd5(0x126)]===_0x2f9bd5(0x13d)?_0x452142[_0x2f9bd5(0x123)]['apps']:{},_0x429bfe=_0x452142[_0x2f9bd5(0x13c)][_0x2f9bd5(0x126)]&&typeof _0x452142[_0x2f9bd5(0x13c)]['apps']==='object'?_0x452142['projectConfig']['apps']:{},_0x1a276e=appDefinedIn(_0x4eb70f,_0x4a15bf,_0x429bfe,_0x452142[_0x2f9bd5(0x13c)][_0x2f9bd5(0x11f)]===![]),_0x1c45c9=resolveAppScopeForWrite(_0x4eb70f,_0x2ae976,_0x452142),_0xa7665c={'global':_0x1c45c9===_0x2f9bd5(0x11b)},_0x104dee=readConfig(_0xa7665c),_0xf0bebc=_0x104dee[_0x2f9bd5(0x126)];if(!_0xf0bebc||!_0xf0bebc[_0x4eb70f])throw CliErrors['validation']('App\x20\x22'+_0x4eb70f+'\x22\x20not\x20found.');delete _0xf0bebc[_0x4eb70f];let _0x127c1b='';if(_0x104dee['defaultApp']===_0x4eb70f){const _0x16a5fe=Object['keys'](_0xf0bebc);_0x104dee[_0x2f9bd5(0x128)]=_0x16a5fe[_0x2f9bd5(0x120)]>0x0?_0x16a5fe[0x0]:undefined,_0x104dee[_0x2f9bd5(0x128)]?_0x127c1b=_0x2f9bd5(0x11d)+_0x104dee[_0x2f9bd5(0x128)]+'\x22.':delete _0x104dee[_0x2f9bd5(0x128)];}Object['keys'](_0xf0bebc)[_0x2f9bd5(0x120)]===0x0&&(delete _0x104dee[_0x2f9bd5(0x126)],delete _0x104dee[_0x2f9bd5(0x128)]);writeConfig(_0x104dee,_0xa7665c);const _0x14217b=_0x1a276e===_0x2f9bd5(0x12e)?_0x2f9bd5(0x131)+_0x4eb70f+_0x2f9bd5(0x129)+(_0x1c45c9===_0x2f9bd5(0x132)?_0x2f9bd5(0x11b):_0x2f9bd5(0x132))+_0x2f9bd5(0x13b):'';return{'ok':!![],'message':_0x2f9bd5(0x12a)+_0x4eb70f+'\x22'+scopeLabel(_0xa7665c)+'.'+_0x127c1b+_0x14217b};}function a22_0xe179(_0x488a2b,_0x111942){_0x488a2b=_0x488a2b-0x117;const _0x4c9d59=a22_0x4c9d();let _0xe179ee=_0x4c9d59[_0x488a2b];return _0xe179ee;}export const appRemoveDefinition={'service':'app','command':a22_0x384971(0x118),'description':a22_0x384971(0x133),'risk':a22_0x384971(0x11c),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a22_0x384971(0x130),'description':a22_0x384971(0x11e),'required':!![]}],'flags':[{'name':'global','type':a22_0x384971(0x139),'description':a22_0x384971(0x12c),'default':![]}],'validate':validateArgs,'execute':execute};
1
+ const a22_0x210686=a22_0x1385;(function(_0x453915,_0x17732d){const _0xca2522=a22_0x1385,_0x27f258=_0x453915();while(!![]){try{const _0x13994d=-parseInt(_0xca2522(0xea))/0x1*(parseInt(_0xca2522(0xe4))/0x2)+parseInt(_0xca2522(0xe2))/0x3+parseInt(_0xca2522(0xe3))/0x4+-parseInt(_0xca2522(0x103))/0x5+parseInt(_0xca2522(0xfa))/0x6*(-parseInt(_0xca2522(0xee))/0x7)+parseInt(_0xca2522(0xfe))/0x8*(-parseInt(_0xca2522(0xf4))/0x9)+parseInt(_0xca2522(0xe0))/0xa;if(_0x13994d===_0x17732d)break;else _0x27f258['push'](_0x27f258['shift']());}catch(_0x489bd7){_0x27f258['push'](_0x27f258['shift']());}}}(a22_0x5390,0x30435));function a22_0x1385(_0x3472d2,_0x3796cd){_0x3472d2=_0x3472d2-0xdf;const _0x53902e=a22_0x5390();let _0x138584=_0x53902e[_0x3472d2];return _0x138584;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers}from'../../context.js';function a22_0x5390(){const _0x1964c5=['remove','trim','76005TjLstT','name','args','app','\x22\x20not\x20found.','defaultApp','1961016HBgICN','object','apps','projectConfig','248AHEBqv','bool','globalConfig','Remove\x20an\x20app\x20from\x20config','\x22\x20still\x20defined\x20in\x20','898900gDelMB','\x20Note:\x20app\x20\x22','Use\x20global\x20config\x20scope','Missing\x20app\x20name.','6776050msqdhY','boolean','657654MiBdNo','479880Nbcblo','33798TnAQAa','keys','high-risk-write','validation','\x20app\x20remove\x20<name>\x20[--global]','App\x20profile\x20name\x20to\x20remove','3OFOVSg','length','project','global','7zDxMhx','Removed\x20app\x20\x22','inherit','Usage:\x20'];a22_0x5390=function(){return _0x1964c5;};return a22_0x5390();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';async function validateArgs(_0x527b6b){const _0x59ee9f=a22_0x1385,_0x215799=_0x527b6b[_0x59ee9f(0xf6)][0x0]?.['trim']();if(!_0x215799)throw CliErrors[_0x59ee9f(0xe7)](_0x59ee9f(0xdf),_0x59ee9f(0xf1)+CLI_BIN_NAME+_0x59ee9f(0xe8));}async function execute(_0x44601f){const _0x305e25=a22_0x1385,_0x8acd0d=_0x44601f[_0x305e25(0xf6)][0x0]?.[_0x305e25(0xf3)]();if(!_0x8acd0d)throw CliErrors[_0x305e25(0xe7)](_0x305e25(0xdf),_0x305e25(0xf1)+CLI_BIN_NAME+_0x305e25(0xe8));const _0x3d4ed5=_0x44601f[_0x305e25(0xff)](_0x305e25(0xed)),{config:_0x64865d,layers:_0x36c34f}=readRawConfigWithLayers(),_0x2abf3f=_0x64865d[_0x305e25(0xfc)]??{};if(!_0x2abf3f[_0x8acd0d])throw CliErrors[_0x305e25(0xe7)]('App\x20\x22'+_0x8acd0d+_0x305e25(0xf8));const _0x4607df=_0x36c34f[_0x305e25(0x100)]['apps']&&typeof _0x36c34f[_0x305e25(0x100)]['apps']==='object'?_0x36c34f[_0x305e25(0x100)]['apps']:{},_0x29a32b=_0x36c34f[_0x305e25(0xfd)][_0x305e25(0xfc)]&&typeof _0x36c34f[_0x305e25(0xfd)][_0x305e25(0xfc)]===_0x305e25(0xfb)?_0x36c34f[_0x305e25(0xfd)][_0x305e25(0xfc)]:{},_0x949e9f=appDefinedIn(_0x8acd0d,_0x4607df,_0x29a32b,_0x36c34f[_0x305e25(0xfd)][_0x305e25(0xf0)]===![]),_0x1e752d=resolveAppScopeForWrite(_0x8acd0d,_0x3d4ed5,_0x36c34f),_0x2b0966={'global':_0x1e752d===_0x305e25(0xed)},_0x1dee59=readConfig(_0x2b0966),_0x519a57=_0x1dee59[_0x305e25(0xfc)];if(!_0x519a57||!_0x519a57[_0x8acd0d])throw CliErrors[_0x305e25(0xe7)]('App\x20\x22'+_0x8acd0d+_0x305e25(0xf8));delete _0x519a57[_0x8acd0d];let _0x2349a5='';if(_0x1dee59['defaultApp']===_0x8acd0d){const _0x3ea05a=Object[_0x305e25(0xe5)](_0x519a57);_0x1dee59[_0x305e25(0xf9)]=_0x3ea05a[_0x305e25(0xeb)]>0x0?_0x3ea05a[0x0]:undefined,_0x1dee59[_0x305e25(0xf9)]?_0x2349a5='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x1dee59[_0x305e25(0xf9)]+'\x22.':delete _0x1dee59[_0x305e25(0xf9)];}Object[_0x305e25(0xe5)](_0x519a57)[_0x305e25(0xeb)]===0x0&&(delete _0x1dee59[_0x305e25(0xfc)],delete _0x1dee59[_0x305e25(0xf9)]);writeConfig(_0x1dee59,_0x2b0966);const _0x43cb73=_0x949e9f==='both'?_0x305e25(0x104)+_0x8acd0d+_0x305e25(0x102)+(_0x1e752d===_0x305e25(0xec)?'global':_0x305e25(0xec))+'\x20config.':'';return{'ok':!![],'message':_0x305e25(0xef)+_0x8acd0d+'\x22'+scopeLabel(_0x2b0966)+'.'+_0x2349a5+_0x43cb73};}export const appRemoveDefinition={'service':a22_0x210686(0xf7),'command':a22_0x210686(0xf2),'description':a22_0x210686(0x101),'risk':a22_0x210686(0xe6),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a22_0x210686(0xf5),'description':a22_0x210686(0xe9),'required':!![]}],'flags':[{'name':a22_0x210686(0xed),'type':a22_0x210686(0xe1),'description':a22_0x210686(0x105),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- function a23_0x15b4(_0x1b2e6c,_0x8ce26){_0x1b2e6c=_0x1b2e6c-0x6b;const _0x682108=a23_0x6821();let _0x15b4cd=_0x682108[_0x1b2e6c];return _0x15b4cd;}(function(_0x273255,_0x163411){const _0x5eb96b=a23_0x15b4,_0x5cec04=_0x273255();while(!![]){try{const _0x3bbfff=-parseInt(_0x5eb96b(0x6f))/0x1+-parseInt(_0x5eb96b(0x76))/0x2*(-parseInt(_0x5eb96b(0x85))/0x3)+-parseInt(_0x5eb96b(0x84))/0x4*(parseInt(_0x5eb96b(0x74))/0x5)+-parseInt(_0x5eb96b(0x7e))/0x6*(-parseInt(_0x5eb96b(0x89))/0x7)+parseInt(_0x5eb96b(0x73))/0x8+parseInt(_0x5eb96b(0x88))/0x9+parseInt(_0x5eb96b(0x70))/0xa*(-parseInt(_0x5eb96b(0x7a))/0xb);if(_0x3bbfff===_0x163411)break;else _0x5cec04['push'](_0x5cec04['shift']());}catch(_0x3f3d50){_0x5cec04['push'](_0x5cec04['shift']());}}}(a23_0x6821,0x55da4));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x224b2a,_0x6e3bac){const _0x193903=a23_0x15b4;if(!_0x6e3bac)return;const _0x5a763e=_0x6e3bac[_0x193903(0x82)]&&typeof _0x6e3bac[_0x193903(0x82)]==='object'?_0x6e3bac[_0x193903(0x82)]:{},_0x4b3860=Object[_0x193903(0x86)](_0x5a763e)[_0x193903(0x6e)]>0x0;for(const _0x4f3588 of _0x224b2a){_0x4f3588[_0x193903(0x83)]=![];}const _0x5068f0=_0x6e3bac[_0x193903(0x6b)]!=null?String(_0x6e3bac[_0x193903(0x6b)])[_0x193903(0x71)]():'';if(_0x4b3860){const _0x55ba63=_0x6e3bac[_0x193903(0x77)]??_0x6e3bac['defaultApp'];if(_0x55ba63)for(const _0x294642 of _0x224b2a){_0x294642[_0x193903(0x75)]===!![]&&_0x294642[_0x193903(0x80)]===_0x55ba63&&(_0x294642[_0x193903(0x83)]=!![]);}for(const _0x2ec861 of _0x224b2a){if(_0x2ec861[_0x193903(0x75)]!==![])continue;if(_0x6e3bac[_0x193903(0x72)])continue;_0x5068f0&&String(_0x2ec861[_0x193903(0x7d)]??'')['trim']()===_0x5068f0&&(_0x2ec861[_0x193903(0x83)]=!![]);}return;}if(!_0x5068f0)return;for(const _0x4719e2 of _0x224b2a){String(_0x4719e2[_0x193903(0x7d)]??'')['trim']()===_0x5068f0&&(_0x4719e2[_0x193903(0x83)]=!![]);}}function a23_0x6821(){const _0xa44e44=['hasOwnProperty','call','length','132382ioLDct','41190zlJhkw','trim','defaultApp','1766168cspxcu','5mWCPTW','named','6258JcJgSQ','currentApp','globalConfig','projectConfig','1177PxnQvg','project','\x20(global)','appcode','4007202MiyBrb','global','name','object','apps','isCurrent','967540CVpWwh','258YGUeVn','keys','prototype','80280IrSOdL','7rJFrDG','appCode'];a23_0x6821=function(){return _0xa44e44;};return a23_0x6821();}export function resolveAppScopeForWrite(_0x338b92,_0x505d6c,_0x19e0d6){const _0x35380e=a23_0x15b4;if(_0x505d6c)return _0x35380e(0x7f);const _0x41d6e2=_0x19e0d6[_0x35380e(0x79)]['apps']&&typeof _0x19e0d6[_0x35380e(0x79)]['apps']==='object'?_0x19e0d6['projectConfig'][_0x35380e(0x82)]:{},_0x2381f7=_0x19e0d6[_0x35380e(0x78)][_0x35380e(0x82)]&&typeof _0x19e0d6['globalConfig'][_0x35380e(0x82)]===_0x35380e(0x81)?_0x19e0d6['globalConfig'][_0x35380e(0x82)]:{};if(Object[_0x35380e(0x87)]['hasOwnProperty'][_0x35380e(0x6d)](_0x41d6e2,_0x338b92))return _0x35380e(0x7b);if(Object[_0x35380e(0x87)][_0x35380e(0x6c)][_0x35380e(0x6d)](_0x2381f7,_0x338b92))return _0x35380e(0x7f);return _0x35380e(0x7b);}export function appDefinedIn(_0x4093f5,_0x2a010c,_0x4eb9bc,_0x4acac8){const _0x148951=a23_0x15b4;if(_0x4acac8)return Object[_0x148951(0x87)][_0x148951(0x6c)][_0x148951(0x6d)](_0x4eb9bc,_0x4093f5)?'project':_0x148951(0x7f);const _0x2fa07d=Object[_0x148951(0x87)]['hasOwnProperty'][_0x148951(0x6d)](_0x2a010c,_0x4093f5),_0x284aed=Object[_0x148951(0x87)]['hasOwnProperty']['call'](_0x4eb9bc,_0x4093f5);if(_0x2fa07d&&_0x284aed)return'both';if(_0x284aed)return _0x148951(0x7b);return _0x148951(0x7f);}export function resolveDefaultAppSource(_0x4d043a){const _0x49c897=a23_0x15b4,_0x2ebec3=_0x4d043a[_0x49c897(0x79)]['apps']&&typeof _0x4d043a[_0x49c897(0x79)][_0x49c897(0x82)]===_0x49c897(0x81)?_0x4d043a[_0x49c897(0x79)]['apps']:{};if('defaultApp'in _0x4d043a['projectConfig'])return _0x49c897(0x7b);if(Object[_0x49c897(0x86)](_0x2ebec3)[_0x49c897(0x6e)]>0x0)return _0x49c897(0x7b);if(_0x4d043a[_0x49c897(0x79)]['inherit']===![])return null;if(_0x4d043a['globalConfig'][_0x49c897(0x72)])return _0x49c897(0x7f);return null;}export function getConfigPath(_0x3194ae={}){const _0x78da30=a23_0x15b4,_0x70079=_0x3194ae[_0x78da30(0x7f)]?_0x78da30(0x7f):'project';return resolveWriteConfigPath(_0x70079);}export function readConfig(_0x5aa660={}){return readConfigFile(getConfigPath(_0x5aa660));}export function writeConfig(_0x235b8c,_0x187b12={}){writeConfigFile(getConfigPath(_0x187b12),_0x235b8c);}export function scopeLabel(_0x16e282){const _0x5adc8e=a23_0x15b4;return _0x16e282['global']?_0x5adc8e(0x7c):'';}
1
+ (function(_0x5b4693,_0xcf9365){const _0x4b4ad6=a23_0x1a8c,_0x30a701=_0x5b4693();while(!![]){try{const _0x49a900=-parseInt(_0x4b4ad6(0x167))/0x1+-parseInt(_0x4b4ad6(0x160))/0x2+parseInt(_0x4b4ad6(0x168))/0x3*(parseInt(_0x4b4ad6(0x15c))/0x4)+-parseInt(_0x4b4ad6(0x157))/0x5*(-parseInt(_0x4b4ad6(0x171))/0x6)+-parseInt(_0x4b4ad6(0x174))/0x7*(-parseInt(_0x4b4ad6(0x16c))/0x8)+-parseInt(_0x4b4ad6(0x15f))/0x9*(-parseInt(_0x4b4ad6(0x16e))/0xa)+parseInt(_0x4b4ad6(0x164))/0xb*(parseInt(_0x4b4ad6(0x169))/0xc);if(_0x49a900===_0xcf9365)break;else _0x30a701['push'](_0x30a701['shift']());}catch(_0x4643db){_0x30a701['push'](_0x30a701['shift']());}}}(a23_0xd68c,0x1bc6c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x5a8d4c,_0x5a1471){const _0x3e295f=a23_0x1a8c;if(!_0x5a1471)return;const _0x14b5f4=_0x5a1471[_0x3e295f(0x15d)]&&typeof _0x5a1471['apps']===_0x3e295f(0x176)?_0x5a1471[_0x3e295f(0x15d)]:{},_0x52a30b=Object[_0x3e295f(0x165)](_0x14b5f4)[_0x3e295f(0x170)]>0x0;for(const _0x36eaed of _0x5a8d4c){_0x36eaed[_0x3e295f(0x15b)]=![];}const _0x4680fa=_0x5a1471['appCode']!=null?String(_0x5a1471[_0x3e295f(0x15a)])[_0x3e295f(0x159)]():'';if(_0x52a30b){const _0x25add1=_0x5a1471[_0x3e295f(0x162)]??_0x5a1471[_0x3e295f(0x172)];if(_0x25add1)for(const _0x479ad5 of _0x5a8d4c){_0x479ad5['named']===!![]&&_0x479ad5[_0x3e295f(0x15e)]===_0x25add1&&(_0x479ad5['isCurrent']=!![]);}for(const _0x1b89c1 of _0x5a8d4c){if(_0x1b89c1[_0x3e295f(0x158)]!==![])continue;if(_0x5a1471['defaultApp'])continue;_0x4680fa&&String(_0x1b89c1[_0x3e295f(0x163)]??'')['trim']()===_0x4680fa&&(_0x1b89c1[_0x3e295f(0x15b)]=!![]);}return;}if(!_0x4680fa)return;for(const _0x24d7fb of _0x5a8d4c){String(_0x24d7fb['appcode']??'')[_0x3e295f(0x159)]()===_0x4680fa&&(_0x24d7fb['isCurrent']=!![]);}}function a23_0x1a8c(_0x5cbc9b,_0x18eedd){_0x5cbc9b=_0x5cbc9b-0x155;const _0xd68c43=a23_0xd68c();let _0x1a8c9c=_0xd68c43[_0x5cbc9b];return _0x1a8c9c;}function a23_0xd68c(){const _0x4dc395=['prototype','9620ZKHFRV','call','length','756kxQcLi','defaultApp','hasOwnProperty','729407ArwFzH','both','object','\x20(global)','inherit','575KeyRRn','named','trim','appCode','isCurrent','4wSoWGN','apps','name','909jzlodX','454384KandCY','project','currentApp','appcode','99CWbnjX','keys','projectConfig','41057qpIXJN','174858zxcmba','4908UdvtVu','globalConfig','global','16KMcepc'];a23_0xd68c=function(){return _0x4dc395;};return a23_0xd68c();}export function resolveAppScopeForWrite(_0x20ed68,_0x157cc9,_0x3690fd){const _0x3502fe=a23_0x1a8c;if(_0x157cc9)return _0x3502fe(0x16b);const _0x7ee8df=_0x3690fd[_0x3502fe(0x166)][_0x3502fe(0x15d)]&&typeof _0x3690fd[_0x3502fe(0x166)][_0x3502fe(0x15d)]===_0x3502fe(0x176)?_0x3690fd['projectConfig'][_0x3502fe(0x15d)]:{},_0x31629b=_0x3690fd[_0x3502fe(0x16a)][_0x3502fe(0x15d)]&&typeof _0x3690fd[_0x3502fe(0x16a)][_0x3502fe(0x15d)]===_0x3502fe(0x176)?_0x3690fd[_0x3502fe(0x16a)]['apps']:{};if(Object[_0x3502fe(0x16d)][_0x3502fe(0x173)][_0x3502fe(0x16f)](_0x7ee8df,_0x20ed68))return _0x3502fe(0x161);if(Object[_0x3502fe(0x16d)][_0x3502fe(0x173)][_0x3502fe(0x16f)](_0x31629b,_0x20ed68))return _0x3502fe(0x16b);return _0x3502fe(0x161);}export function appDefinedIn(_0xb63348,_0x5e4169,_0x5e88df,_0x507e71){const _0x248c07=a23_0x1a8c;if(_0x507e71)return Object[_0x248c07(0x16d)]['hasOwnProperty'][_0x248c07(0x16f)](_0x5e88df,_0xb63348)?_0x248c07(0x161):'global';const _0x274fa2=Object[_0x248c07(0x16d)][_0x248c07(0x173)]['call'](_0x5e4169,_0xb63348),_0x26d1f5=Object[_0x248c07(0x16d)]['hasOwnProperty'][_0x248c07(0x16f)](_0x5e88df,_0xb63348);if(_0x274fa2&&_0x26d1f5)return _0x248c07(0x175);if(_0x26d1f5)return _0x248c07(0x161);return _0x248c07(0x16b);}export function resolveDefaultAppSource(_0x4caa29){const _0x373c63=a23_0x1a8c,_0x5aa3e3=_0x4caa29[_0x373c63(0x166)][_0x373c63(0x15d)]&&typeof _0x4caa29[_0x373c63(0x166)][_0x373c63(0x15d)]==='object'?_0x4caa29[_0x373c63(0x166)][_0x373c63(0x15d)]:{};if(_0x373c63(0x172)in _0x4caa29[_0x373c63(0x166)])return _0x373c63(0x161);if(Object[_0x373c63(0x165)](_0x5aa3e3)[_0x373c63(0x170)]>0x0)return _0x373c63(0x161);if(_0x4caa29['projectConfig'][_0x373c63(0x156)]===![])return null;if(_0x4caa29[_0x373c63(0x16a)][_0x373c63(0x172)])return _0x373c63(0x16b);return null;}export function getConfigPath(_0x1cafcb={}){const _0x5ef05a=_0x1cafcb['global']?'global':'project';return resolveWriteConfigPath(_0x5ef05a);}export function readConfig(_0x8fe89a={}){return readConfigFile(getConfigPath(_0x8fe89a));}export function writeConfig(_0x17f880,_0x55a52e={}){writeConfigFile(getConfigPath(_0x55a52e),_0x17f880);}export function scopeLabel(_0x13fc76){const _0x30d2c0=a23_0x1a8c;return _0x13fc76[_0x30d2c0(0x16b)]?_0x30d2c0(0x155):'';}
@@ -1 +1 @@
1
- const a24_0x24a55a=a24_0x5a02;(function(_0x2d308f,_0x560a6b){const _0x5314e6=a24_0x5a02,_0x234e2a=_0x2d308f();while(!![]){try{const _0x472b0a=-parseInt(_0x5314e6(0x133))/0x1*(-parseInt(_0x5314e6(0x138))/0x2)+-parseInt(_0x5314e6(0x14b))/0x3*(parseInt(_0x5314e6(0x12d))/0x4)+-parseInt(_0x5314e6(0x137))/0x5*(parseInt(_0x5314e6(0x144))/0x6)+-parseInt(_0x5314e6(0x140))/0x7*(parseInt(_0x5314e6(0x145))/0x8)+-parseInt(_0x5314e6(0x132))/0x9+parseInt(_0x5314e6(0x147))/0xa+-parseInt(_0x5314e6(0x149))/0xb*(-parseInt(_0x5314e6(0x128))/0xc);if(_0x472b0a===_0x560a6b)break;else _0x234e2a['push'](_0x234e2a['shift']());}catch(_0x15c74b){_0x234e2a['push'](_0x234e2a['shift']());}}}(a24_0x1ad5,0x9b5eb));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readRawConfigWithLayers,isInProject}from'../../context.js';function a24_0x1ad5(){const _0x271e61=['\x20--appcode\x20<code>`\x20first.','trim','30WbnBTm','490712AtLSCj','\x20app\x20use\x20<name>\x20[--global]','10179760IbLRrI','object','81455CnLsPr','use','48Qltsnn','keys','args','Use\x20global\x20config\x20scope','24OYpbSg','App\x20profile\x20name\x20to\x20activate','App\x20\x22','length','call','44916entznD','global','join','\x22\x20not\x20found.','Switch\x20the\x20default\x20app','9374157iyodnE','1313ayVWDp','validation','Missing\x20app\x20name.','Usage:\x20','65740vCXinU','1450HwQgfs','projectPath','app','appcode','prototype','apps','\x20app\x20add\x20','write','7hBvrJk','boolean'];a24_0x1ad5=function(){return _0x271e61;};return a24_0x1ad5();}import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';function a24_0x5a02(_0x1720f9,_0x1a10ad){_0x1720f9=_0x1720f9-0x127;const _0x1ad5f9=a24_0x1ad5();let _0x5a026e=_0x1ad5f9[_0x1720f9];return _0x5a026e;}async function validateArgs(_0xa23d03){const _0x1bfdde=a24_0x5a02,_0x33c213=_0xa23d03[_0x1bfdde(0x14d)][0x0]?.[_0x1bfdde(0x143)]();if(!_0x33c213)throw CliErrors['validation'](_0x1bfdde(0x135),_0x1bfdde(0x136)+CLI_BIN_NAME+_0x1bfdde(0x146));}async function execute(_0x5ef0f6){const _0x5c6b22=a24_0x5a02,_0xc1ce5b=_0x5ef0f6['args'][0x0]?.[_0x5c6b22(0x143)]();if(!_0xc1ce5b)throw CliErrors[_0x5c6b22(0x134)](_0x5c6b22(0x135),_0x5c6b22(0x136)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const _0x400504=_0x5ef0f6['bool'](_0x5c6b22(0x12e)),{config:_0x5d0a16,layers:_0x1eb9f3}=readRawConfigWithLayers(),_0x5f3a64=_0x5d0a16[_0x5c6b22(0x13d)]??{};if(!_0x5f3a64[_0xc1ce5b]){const _0x1af3de=Object[_0x5c6b22(0x14c)](_0x5f3a64),_0x9d23=_0x1af3de[_0x5c6b22(0x12b)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x5c6b22(0x13e)+_0xc1ce5b+_0x5c6b22(0x142):'Available:\x20'+_0x1af3de[_0x5c6b22(0x12f)](',\x20');throw CliErrors[_0x5c6b22(0x134)](_0x5c6b22(0x12a)+_0xc1ce5b+_0x5c6b22(0x130),_0x9d23);}let _0x825f2f,_0x4b9bb5='';if(_0x400504)_0x825f2f={'global':!![]};else{const _0x2cade1=isInProject()&&!!_0x1eb9f3[_0x5c6b22(0x139)];_0x825f2f={'global':!_0x2cade1};if(_0x2cade1){const _0x67930c=_0x1eb9f3['projectConfig']['apps']&&typeof _0x1eb9f3['projectConfig'][_0x5c6b22(0x13d)]===_0x5c6b22(0x148)?_0x1eb9f3['projectConfig'][_0x5c6b22(0x13d)]:{};!Object[_0x5c6b22(0x13c)]['hasOwnProperty'][_0x5c6b22(0x12c)](_0x67930c,_0xc1ce5b)&&(_0x4b9bb5='\x0aNote:\x20\x22'+_0xc1ce5b+'\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.');}}const _0x31379f=readConfig(_0x825f2f);return _0x31379f['defaultApp']=_0xc1ce5b,writeConfig(_0x31379f,_0x825f2f),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0xc1ce5b+'\x22\x20(appcode:\x20'+_0x5f3a64[_0xc1ce5b][_0x5c6b22(0x13b)]+')'+scopeLabel(_0x825f2f)+_0x4b9bb5};}export const appUseDefinition={'service':a24_0x24a55a(0x13a),'command':a24_0x24a55a(0x14a),'description':a24_0x24a55a(0x131),'risk':a24_0x24a55a(0x13f),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a24_0x24a55a(0x129),'required':!![]}],'flags':[{'name':a24_0x24a55a(0x12e),'type':a24_0x24a55a(0x141),'description':a24_0x24a55a(0x127),'default':![]}],'validate':validateArgs,'execute':execute};
1
+ const a24_0x335656=a24_0x2b5a;function a24_0x2b5a(_0x564355,_0xc5878b){_0x564355=_0x564355-0x188;const _0x474c6f=a24_0x474c();let _0x2b5aeb=_0x474c6f[_0x564355];return _0x2b5aeb;}(function(_0x28a15f,_0x175ea5){const _0x2c07e4=a24_0x2b5a,_0x519875=_0x28a15f();while(!![]){try{const _0x1fbeaf=parseInt(_0x2c07e4(0x1a1))/0x1*(parseInt(_0x2c07e4(0x19a))/0x2)+parseInt(_0x2c07e4(0x18b))/0x3*(-parseInt(_0x2c07e4(0x19e))/0x4)+-parseInt(_0x2c07e4(0x198))/0x5*(parseInt(_0x2c07e4(0x1a8))/0x6)+parseInt(_0x2c07e4(0x18f))/0x7*(parseInt(_0x2c07e4(0x1a4))/0x8)+-parseInt(_0x2c07e4(0x18d))/0x9*(-parseInt(_0x2c07e4(0x1a5))/0xa)+-parseInt(_0x2c07e4(0x1ae))/0xb*(-parseInt(_0x2c07e4(0x196))/0xc)+parseInt(_0x2c07e4(0x1ac))/0xd*(parseInt(_0x2c07e4(0x1ad))/0xe);if(_0x1fbeaf===_0x175ea5)break;else _0x519875['push'](_0x519875['shift']());}catch(_0x5474b){_0x519875['push'](_0x519875['shift']());}}}(a24_0x474c,0xf3014));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(_0x26b723){const _0x4f9acb=a24_0x2b5a,_0x13ba92=_0x26b723[_0x4f9acb(0x18e)][0x0]?.['trim']();if(!_0x13ba92)throw CliErrors[_0x4f9acb(0x18c)](_0x4f9acb(0x1af),'Usage:\x20'+CLI_BIN_NAME+_0x4f9acb(0x1b0));}async function execute(_0x55c12a){const _0x4e9d8c=a24_0x2b5a,_0x318dbe=_0x55c12a[_0x4e9d8c(0x18e)][0x0]?.[_0x4e9d8c(0x1a3)]();if(!_0x318dbe)throw CliErrors[_0x4e9d8c(0x18c)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x4e9d8c(0x1b0));const _0x567ab7=_0x55c12a['bool'](_0x4e9d8c(0x1a7)),{config:_0x1eec94,layers:_0x2d6e52}=readRawConfigWithLayers(),_0x143126=_0x1eec94[_0x4e9d8c(0x1a6)]??{};if(!_0x143126[_0x318dbe]){const _0x16ef29=Object[_0x4e9d8c(0x195)](_0x143126),_0x152b9e=_0x16ef29[_0x4e9d8c(0x19b)]===0x0?_0x4e9d8c(0x1aa)+CLI_BIN_NAME+'\x20app\x20add\x20'+_0x318dbe+_0x4e9d8c(0x191):_0x4e9d8c(0x194)+_0x16ef29[_0x4e9d8c(0x1a2)](',\x20');throw CliErrors['validation']('App\x20\x22'+_0x318dbe+_0x4e9d8c(0x19d),_0x152b9e);}let _0x296192,_0x506b2f='';if(_0x567ab7)_0x296192={'global':!![]};else{const _0x4bb389=isInProject()&&!!_0x2d6e52[_0x4e9d8c(0x1a0)];_0x296192={'global':!_0x4bb389};if(_0x4bb389){const _0x1c4b79=_0x2d6e52[_0x4e9d8c(0x18a)][_0x4e9d8c(0x1a6)]&&typeof _0x2d6e52['projectConfig'][_0x4e9d8c(0x1a6)]===_0x4e9d8c(0x1ab)?_0x2d6e52[_0x4e9d8c(0x18a)][_0x4e9d8c(0x1a6)]:{};!Object[_0x4e9d8c(0x1b1)]['hasOwnProperty'][_0x4e9d8c(0x192)](_0x1c4b79,_0x318dbe)&&(_0x506b2f=_0x4e9d8c(0x199)+_0x318dbe+'\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.');}}const _0x7c9149=readConfig(_0x296192);return _0x7c9149['defaultApp']=_0x318dbe,writeConfig(_0x7c9149,_0x296192),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0x318dbe+_0x4e9d8c(0x190)+_0x143126[_0x318dbe][_0x4e9d8c(0x1a9)]+')'+scopeLabel(_0x296192)+_0x506b2f};}function a24_0x474c(){const _0x4335ff=['appcode','Use\x20`','object','26SDLRuM','1717800XKISHW','16905449QhNkWc','Missing\x20app\x20name.','\x20app\x20use\x20<name>\x20[--global]','prototype','name','Use\x20global\x20config\x20scope','projectConfig','93wtqIgu','validation','90qNYalh','args','7EqjSJo','\x22\x20(appcode:\x20','\x20--appcode\x20<code>`\x20first.','call','App\x20profile\x20name\x20to\x20activate','Available:\x20','keys','12nVLJsK','Switch\x20the\x20default\x20app','9057995GDhCoC','\x0aNote:\x20\x22','4ggeCLe','length','use','\x22\x20not\x20found.','35256YvOAxa','write','projectPath','1978vlJeMH','join','trim','7243088maRDSq','388580WyCDXd','apps','global','6pvgQXp'];a24_0x474c=function(){return _0x4335ff;};return a24_0x474c();}export const appUseDefinition={'service':'app','command':a24_0x335656(0x19c),'description':a24_0x335656(0x197),'risk':a24_0x335656(0x19f),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a24_0x335656(0x188),'description':a24_0x335656(0x193),'required':!![]}],'flags':[{'name':a24_0x335656(0x1a7),'type':'boolean','description':a24_0x335656(0x189),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- function a25_0x487b(){const _0x3e3b8b=['logout','auth','../../auth/auth-server-ui.js','write','4HiAGTN','boolean','Clear\x20login\x20session','4567959pUNyrj','2EzxdTs','read','yes','665378ITyZMw','bool','8581050jtHXia','3057315Trgtcu','!\x20Not\x20logged\x20in','3936792DEyTXP','818721IjHFUq','log','nonInteractive','1246854JPvjog','40VAigmq','48uuOYXA'];a25_0x487b=function(){return _0x3e3b8b;};return a25_0x487b();}const a25_0x10726a=a25_0x1ac9;(function(_0x281efa,_0x176516){const _0x2250cf=a25_0x1ac9,_0x421d0a=_0x281efa();while(!![]){try{const _0x539418=-parseInt(_0x2250cf(0x100))/0x1+parseInt(_0x2250cf(0xf4))/0x2*(parseInt(_0x2250cf(0xfc))/0x3)+parseInt(_0x2250cf(0xf0))/0x4*(parseInt(_0x2250cf(0xfa))/0x5)+parseInt(_0x2250cf(0x102))/0x6*(-parseInt(_0x2250cf(0xf7))/0x7)+-parseInt(_0x2250cf(0x101))/0x8*(parseInt(_0x2250cf(0xfd))/0x9)+parseInt(_0x2250cf(0xf9))/0xa+parseInt(_0x2250cf(0xf3))/0xb;if(_0x539418===_0x176516)break;else _0x421d0a['push'](_0x421d0a['shift']());}catch(_0x5d4010){_0x421d0a['push'](_0x421d0a['shift']());}}}(a25_0x487b,0xb36fa));function a25_0x1ac9(_0x4973db,_0x4251c9){_0x4973db=_0x4973db-0xed;const _0x487b0f=a25_0x487b();let _0x1ac9e8=_0x487b0f[_0x4973db];return _0x1ac9e8;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a25_0x10726a(0xed),'command':'login','description':'Login\x20via\x20browser','risk':a25_0x10726a(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a25_0x10726a(0xf6),'type':a25_0x10726a(0xf1),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0xbaa911){const _0xffd414=a25_0x10726a,{runAuthServer:_0x59eef1}=await import(_0xffd414(0xee));return await _0x59eef1({'autoYes':_0xbaa911[_0xffd414(0xf8)](_0xffd414(0xf6)),'nonInteractive':_0xbaa911[_0xffd414(0xff)]}),{'ok':!![]};}},{'service':a25_0x10726a(0xed),'command':a25_0x10726a(0x103),'description':a25_0x10726a(0xf2),'risk':a25_0x10726a(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x193173){const _0x1bcf75=a25_0x10726a;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1bcf75(0xfe)]('✓\x20Logged\x20out')):console[_0x1bcf75(0xfe)](_0x1bcf75(0xfb)),{'ok':!![]};}}];
1
+ const a25_0x46bc44=a25_0x1e74;function a25_0x1e74(_0x27ff4d,_0x2dc1cc){_0x27ff4d=_0x27ff4d-0x1a1;const _0x1ddfd1=a25_0x1ddf();let _0x1e748e=_0x1ddfd1[_0x27ff4d];return _0x1e748e;}(function(_0x3a19c7,_0x1acadb){const _0x459e06=a25_0x1e74,_0x5da2f4=_0x3a19c7();while(!![]){try{const _0x25a2c1=parseInt(_0x459e06(0x1b1))/0x1*(-parseInt(_0x459e06(0x1b0))/0x2)+-parseInt(_0x459e06(0x1a9))/0x3+parseInt(_0x459e06(0x1a2))/0x4+-parseInt(_0x459e06(0x1b3))/0x5*(-parseInt(_0x459e06(0x1b6))/0x6)+parseInt(_0x459e06(0x1ad))/0x7+-parseInt(_0x459e06(0x1b2))/0x8+parseInt(_0x459e06(0x1ac))/0x9;if(_0x25a2c1===_0x1acadb)break;else _0x5da2f4['push'](_0x5da2f4['shift']());}catch(_0x49f30b){_0x5da2f4['push'](_0x5da2f4['shift']());}}}(a25_0x1ddf,0x389a4));import{unlinkSync,existsSync}from'node:fs';function a25_0x1ddf(){const _0x4e8124=['!\x20Not\x20logged\x20in','529641iZLBYJ','676571USYAPA','✓\x20Logged\x20out','login','78CmNnaq','4517mRefST','900648xInzoN','5275pSbGHi','boolean','auth','2586afVozZ','yes','1150516aEVIts','nonInteractive','../../auth/auth-server-ui.js','Clear\x20login\x20session','log','bool','logout','1131744TRYszy','Login\x20via\x20browser'];a25_0x1ddf=function(){return _0x4e8124;};return a25_0x1ddf();}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a25_0x46bc44(0x1b5),'command':a25_0x46bc44(0x1af),'description':a25_0x46bc44(0x1aa),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a25_0x46bc44(0x1a1),'type':a25_0x46bc44(0x1b4),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0xf6eab6){const _0x441ce2=a25_0x46bc44,{runAuthServer:_0x507fe6}=await import(_0x441ce2(0x1a4));return await _0x507fe6({'autoYes':_0xf6eab6[_0x441ce2(0x1a7)]('yes'),'nonInteractive':_0xf6eab6[_0x441ce2(0x1a3)]}),{'ok':!![]};}},{'service':a25_0x46bc44(0x1b5),'command':a25_0x46bc44(0x1a8),'description':a25_0x46bc44(0x1a5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x21f0cb){const _0x2ecab5=a25_0x46bc44;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2ecab5(0x1a6)](_0x2ecab5(0x1ae))):console[_0x2ecab5(0x1a6)](_0x2ecab5(0x1ab)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a26_0x5dc2dd=a26_0x1f26;(function(_0x38a838,_0x2b54f4){const _0x4e6234=a26_0x1f26,_0x111a2e=_0x38a838();while(!![]){try{const _0x351fc6=parseInt(_0x4e6234(0x14d))/0x1*(parseInt(_0x4e6234(0x17e))/0x2)+-parseInt(_0x4e6234(0x18b))/0x3*(parseInt(_0x4e6234(0x184))/0x4)+-parseInt(_0x4e6234(0x157))/0x5*(-parseInt(_0x4e6234(0x14e))/0x6)+parseInt(_0x4e6234(0x148))/0x7*(parseInt(_0x4e6234(0x175))/0x8)+parseInt(_0x4e6234(0x17b))/0x9+parseInt(_0x4e6234(0x149))/0xa+-parseInt(_0x4e6234(0x189))/0xb;if(_0x351fc6===_0x2b54f4)break;else _0x111a2e['push'](_0x111a2e['shift']());}catch(_0x16cd32){_0x111a2e['push'](_0x111a2e['shift']());}}}(a26_0x5ccb,0xd0649));function a26_0x1f26(_0xb6c314,_0x46286a){_0xb6c314=_0xb6c314-0x13e;const _0x5ccbb0=a26_0x5ccb();let _0x1f2619=_0x5ccbb0[_0xb6c314];return _0x1f2619;}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_0x5ccb(){const _0x4137b4=['tableName','1knGndR','12780QKaaHa','\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','name','Invalid\x20function\x20name\x20\x22','Operation\x20type\x20(HOOK\x20only)','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','COMMON','write','No\x20datasets\x20found\x20for\x20this\x20app.','130uNCVCl','string','find','after','\x0a\x20*\x20[触发节点]\x20','isInteger','Select\x20operation\x20type:','Alias\x20\x22','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','stderr','apiDir','join','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','HOOK\x20requires\x20alias/operation/node\x20options.','create','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','length','\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','datasetCode','Dataset\x20not\x20found\x20for\x20code\x20\x22','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','\x0a\x20*\x20[脚本名称]\x20','Operation\x20type\x20\x22','code','operation-type','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','parseInt','Available\x20aliases:\x20','Select\x20dataset:','6107656CfsXLN','validation','includes','Select\x20trigger\x20node:','\x22.\x20','\x20function:\x20','6550119CJSwTb','alias','Invalid\x20dataset\x20selection.','2693836YRawKG','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','operationType','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','str','before','548RKilvj','scriptsRootDir','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','HOOK','18893787VDJZga','Script\x20type','18339oFEPBK','question','datasetcode','No\x20operation\x20types\x20found\x20for\x20dataset\x20','close','functionNode','ENDPOINT','Available:\x20','utf8','map','bff','stdin','appCode','nonInteractive','trim','File\x20already\x20exists:\x20','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x22\x20not\x20found\x20for\x20dataset\x20','\x22\x20not\x20found.\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','function-node','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','7ErrGCM','5151290FmvjmB','Trigger\x20node\x20(HOOK\x20only)','keys'];a26_0x5ccb=function(){return _0x4137b4;};return a26_0x5ccb();}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_0x5dc2dd(0x195),'command':a26_0x5dc2dd(0x165),'description':a26_0x5dc2dd(0x144),'risk':a26_0x5dc2dd(0x155),'flags':[{'name':'type','type':'string','required':!![],'enum':['COMMON',a26_0x5dc2dd(0x191),a26_0x5dc2dd(0x188)],'description':a26_0x5dc2dd(0x18a)},{'name':'name','type':a26_0x5dc2dd(0x158),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a26_0x5dc2dd(0x170),'type':a26_0x5dc2dd(0x158),'description':'Script\x20description'},{'name':'alias','type':a26_0x5dc2dd(0x158),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a26_0x5dc2dd(0x18d),'type':a26_0x5dc2dd(0x158),'description':a26_0x5dc2dd(0x15f)},{'name':a26_0x5dc2dd(0x16f),'type':'string','description':a26_0x5dc2dd(0x152)},{'name':a26_0x5dc2dd(0x146),'type':a26_0x5dc2dd(0x158),'description':a26_0x5dc2dd(0x14a),'enum':[a26_0x5dc2dd(0x183),'after']}],async 'validate'(_0x3cf762){const _0x367721=a26_0x5dc2dd,_0x25acb9=_0x3cf762[_0x367721(0x182)](_0x367721(0x150));if(!isValidBffFunctionName(_0x25acb9))throw CliErrors['validation'](_0x367721(0x151)+_0x25acb9+_0x367721(0x16b));},async 'execute'(_0x3659ac){const _0x3268d9=a26_0x5dc2dd,_0xfa34e9=loadBffProjectConfig(_0x3659ac['appCode']),_0x2eca1d=_0x3659ac[_0x3268d9(0x182)]('type'),_0x2c3dc3=_0x3659ac['str'](_0x3268d9(0x150)),_0x29a83c=_0x3659ac[_0x3268d9(0x182)](_0x3268d9(0x170))||undefined,_0x16b330=_0x2eca1d===_0x3268d9(0x188)?await resolveHookOptions(_0xfa34e9,_0x3659ac):undefined,_0x48a70d=buildFilePath(_0xfa34e9,_0x2eca1d,_0x2c3dc3,_0x16b330);if(await fileExists(_0x48a70d))throw CliErrors[_0x3268d9(0x176)](_0x3268d9(0x13f)+_0x48a70d);await mkdir(dirname(_0x48a70d),{'recursive':!![]});const _0x251c5e=generateTemplate(_0x2eca1d,_0x2c3dc3,_0x3659ac[_0x3268d9(0x197)],_0x29a83c,_0x16b330);await writeFile(_0x48a70d,_0x251c5e,_0x3268d9(0x193));const _0x42ceaa={'type':_0x2eca1d,'name':_0x2c3dc3,'path':_0x48a70d};if(_0x29a83c)_0x42ceaa['description']=_0x29a83c;if(_0x16b330){if(_0x16b330[_0x3268d9(0x17c)])_0x42ceaa[_0x3268d9(0x17c)]=_0x16b330[_0x3268d9(0x17c)];_0x42ceaa[_0x3268d9(0x169)]=_0x16b330[_0x3268d9(0x169)],_0x42ceaa['operationType']=_0x16b330['operationType'],_0x42ceaa['functionNode']=_0x16b330[_0x3268d9(0x190)];}return{'ok':!![],'data':_0x42ceaa,'message':'Created\x20'+_0x2eca1d+_0x3268d9(0x17a)+_0x2c3dc3};}};async function resolveHookOptions(_0x152d55,_0x33ad79){const _0x586761=a26_0x5dc2dd,_0x1f6b0c=loadAliasMap(_0x33ad79[_0x586761(0x161)],undefined,resolveApiFilePath(_0x33ad79[_0x586761(0x161)],_0x33ad79[_0x586761(0x197)])),_0x2a4942=_0x1f6b0c[_0x586761(0x167)]>0x0;let _0x3b6556,_0x5103df,_0xf83685;const _0x5d9fd4=_0x33ad79[_0x586761(0x182)]('alias'),_0x458882=_0x33ad79[_0x586761(0x182)](_0x586761(0x18d));if(_0x5d9fd4){const _0x1babdb=resolveAlias(_0x33ad79[_0x586761(0x161)],_0x5d9fd4,undefined,resolveApiFilePath(_0x33ad79['apiDir'],_0x33ad79[_0x586761(0x197)]));if(!_0x1babdb){const _0x578913=_0x2a4942?_0x586761(0x173)+_0x1f6b0c[_0x586761(0x194)](_0x22bcb5=>_0x22bcb5['alias'])[_0x586761(0x162)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x586761(0x163);throw CliErrors[_0x586761(0x176)](_0x586761(0x15e)+_0x5d9fd4+_0x586761(0x142)+_0x578913);}_0x3b6556=_0x5d9fd4,_0x5103df=_0x1babdb;}else{if(_0x458882){_0x5103df=_0x458882;const _0x2b50fa=_0x1f6b0c[_0x586761(0x159)](_0x10bc9b=>_0x10bc9b[_0x586761(0x169)]===_0x458882);_0x3b6556=_0x2b50fa?.['alias'];}else{if(_0x33ad79[_0x586761(0x198)])throw CliErrors[_0x586761(0x176)](_0x586761(0x187));else{if(_0x2a4942){const _0x56ab08=_0x1f6b0c[_0x586761(0x194)](_0xf7d270=>_0xf7d270[_0x586761(0x17c)]+'\x20('+_0xf7d270[_0x586761(0x14c)]+')'),_0x4d9593=await promptSelect(_0x586761(0x174),_0x56ab08),_0x25b174=_0x1f6b0c[_0x4d9593];if(!_0x25b174)throw CliErrors[_0x586761(0x176)](_0x586761(0x17d));_0x3b6556=_0x25b174[_0x586761(0x17c)],_0x5103df=_0x25b174[_0x586761(0x169)];}else{const _0x4fb2bb=await listDatasets(_0x33ad79['appCode']);if(_0x4fb2bb[_0x586761(0x167)]===0x0)throw CliErrors[_0x586761(0x176)](_0x586761(0x156));const _0x441fe3=_0x4fb2bb[_0x586761(0x194)](_0x442c33=>_0x442c33[_0x586761(0x150)]+'\x20('+_0x442c33[_0x586761(0x16e)]+')'),_0x26754c=await promptSelect(_0x586761(0x174),_0x441fe3),_0xf6f27f=_0x4fb2bb[_0x26754c];if(!_0xf6f27f)throw CliErrors[_0x586761(0x176)]('Invalid\x20dataset\x20selection.');_0x5103df=_0xf6f27f[_0x586761(0x16e)],_0x3b6556=undefined;}}}}const _0x39a11c=await listDatasets(_0x33ad79['appCode']),_0x330e5b=_0x39a11c[_0x586761(0x159)](_0x64ad83=>_0x64ad83['code']===_0x5103df);if(!_0x330e5b)throw CliErrors[_0x586761(0x176)](_0x586761(0x16a)+_0x5103df+_0x586761(0x179)+(_0x3b6556?_0x586761(0x181)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0xf83685=_0x330e5b['id'];const _0x1ac797=_0x3b6556??_0x5103df,_0xbc342f=await listBffDatasetOperations(_0x33ad79[_0x586761(0x197)],_0xf83685),_0x3d5444=_0xbc342f?Object[_0x586761(0x14b)](_0xbc342f):[];if(_0x3d5444[_0x586761(0x167)]===0x0)throw CliErrors[_0x586761(0x176)](_0x586761(0x18e)+_0x1ac797+'.');let _0xc80b31;const _0x5c37b6=_0x33ad79[_0x586761(0x182)](_0x586761(0x16f));if(_0x5c37b6){if(!_0x3d5444[_0x586761(0x177)](_0x5c37b6))throw CliErrors['validation'](_0x586761(0x16d)+_0x5c37b6+_0x586761(0x141)+_0x1ac797+'.\x20'+(_0x586761(0x192)+_0x3d5444[_0x586761(0x162)](',\x20')));_0xc80b31=_0x5c37b6;}else{if(_0x33ad79['nonInteractive'])throw CliErrors[_0x586761(0x176)](_0x586761(0x153));const _0x1d60a7=await promptSelect(_0x586761(0x15d),_0x3d5444);_0xc80b31=_0x3d5444[_0x1d60a7]??_0x3d5444[0x0];}let _0x32daac=normalizeHookFunctionNode(_0x33ad79[_0x586761(0x182)](_0x586761(0x146)));if(!_0x32daac){if(_0x33ad79[_0x586761(0x182)](_0x586761(0x146)))throw CliErrors[_0x586761(0x176)](_0x586761(0x143));if(_0x33ad79[_0x586761(0x198)])throw CliErrors[_0x586761(0x176)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x310c2a=await promptSelect(_0x586761(0x178),[_0x586761(0x183),_0x586761(0x15a)]);_0x32daac=[_0x586761(0x183),'after'][_0x310c2a]??_0x586761(0x183);}return{'alias':_0x3b6556,'datasetCode':_0x5103df,'datasetId':_0xf83685,'operationType':_0xc80b31,'functionNode':_0x32daac};}async function promptSelect(_0x4b4f97,_0x37cec8){const _0x26419a=a26_0x5dc2dd;if(_0x37cec8[_0x26419a(0x167)]===0x1)return 0x0;for(const [_0x3f7e6c,_0x1dd158]of _0x37cec8['entries']()){process[_0x26419a(0x160)][_0x26419a(0x155)]('\x20\x20'+(_0x3f7e6c+0x1)+'.\x20'+_0x1dd158+'\x0a');}const _0x2a95fd=createInterface({'input':process[_0x26419a(0x196)],'output':process[_0x26419a(0x160)]});while(!![]){const _0x2ed256=await new Promise(_0x28ffd8=>{const _0x3e94a8=_0x26419a;_0x2a95fd[_0x3e94a8(0x18c)](_0x4b4f97+'\x20',_0x28ffd8);}),_0x4f2ffd=Number[_0x26419a(0x172)](_0x2ed256[_0x26419a(0x13e)](),0xa);if(Number[_0x26419a(0x15c)](_0x4f2ffd)&&_0x4f2ffd>=0x1&&_0x4f2ffd<=_0x37cec8[_0x26419a(0x167)])return _0x2a95fd[_0x26419a(0x18f)](),_0x4f2ffd-0x1;process[_0x26419a(0x160)][_0x26419a(0x155)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x37cec8['length']+'.\x0a');}}function buildFilePath(_0x557660,_0xefee05,_0x476b8c,_0x44da9f){const _0x26b518=a26_0x5dc2dd;if(_0xefee05===_0x26b518(0x188)){if(!_0x44da9f)throw CliErrors['validation'](_0x26b518(0x164));const _0x3a291d=_0x44da9f[_0x26b518(0x17c)]??_0x44da9f[_0x26b518(0x169)];return join(_0x557660[_0x26b518(0x185)],_0x26b518(0x188),_0x3a291d,_0x44da9f['operationType'],_0x44da9f['functionNode'],_0x476b8c+'.js');}return join(_0x557660[_0x26b518(0x185)],_0xefee05,_0x476b8c+'.js');}export function generateTemplate(_0x13673c,_0x53e7bc,_0x582eb9,_0x316b96,_0x14cbf9){const _0x4d0464=a26_0x5dc2dd,_0xdc371=_0x316b96?.['trim']()||'TODO:\x20add\x20script\x20description';if(_0x13673c===_0x4d0464(0x154))return _0x4d0464(0x17f)+_0xdc371+_0x4d0464(0x16c)+_0x53e7bc+_0x4d0464(0x186)+_0x53e7bc+'.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'+_0x53e7bc+_0x4d0464(0x171);if(_0x13673c===_0x4d0464(0x191))return _0x4d0464(0x147)+_0xdc371+_0x4d0464(0x145)+_0x582eb9+'/'+_0x53e7bc+_0x4d0464(0x14f)+_0x53e7bc+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x14cbf9)throw CliErrors[_0x4d0464(0x176)](_0x4d0464(0x140));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0xdc371+_0x4d0464(0x166)+_0x582eb9+'/'+_0x14cbf9[_0x4d0464(0x169)]+'/'+_0x14cbf9[_0x4d0464(0x180)]+_0x4d0464(0x15b)+_0x14cbf9['functionNode']+_0x4d0464(0x168)+_0x53e7bc+_0x4d0464(0x171);}
1
+ const a26_0x10fe75=a26_0x5f5c;(function(_0xe7b47b,_0x25f474){const _0x318f5c=a26_0x5f5c,_0xdfcaf5=_0xe7b47b();while(!![]){try{const _0x4b5802=-parseInt(_0x318f5c(0x92))/0x1*(-parseInt(_0x318f5c(0xc8))/0x2)+parseInt(_0x318f5c(0xc1))/0x3+parseInt(_0x318f5c(0xa7))/0x4+parseInt(_0x318f5c(0xa1))/0x5*(-parseInt(_0x318f5c(0xb7))/0x6)+parseInt(_0x318f5c(0xb1))/0x7+parseInt(_0x318f5c(0xa2))/0x8*(-parseInt(_0x318f5c(0x8f))/0x9)+-parseInt(_0x318f5c(0xe2))/0xa;if(_0x4b5802===_0x25f474)break;else _0xdfcaf5['push'](_0xdfcaf5['shift']());}catch(_0x1a8198){_0xdfcaf5['push'](_0xdfcaf5['shift']());}}}(a26_0x4b61,0xde341));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';function a26_0x4b61(){const _0x14030e=['close','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','question','find','create','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','\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','before','Select\x20dataset:','HOOK','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','isInteger','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','trim','26429000zDSxUn','Operation\x20type\x20(HOOK\x20only)','code','datasetCode','appCode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','.js','HOOK\x20requires\x20alias/operation/node\x20options.','functionNode','datasetcode','45cmvqIU','\x22\x20not\x20found.\x20','\x0a\x20*\x20[脚本名称]\x20','281GUEYEJ','alias','scriptsRootDir','stderr','Trigger\x20node\x20(HOOK\x20only)','stdin','Created\x20','string','Select\x20operation\x20type:','bff','keys','validation','name','\x20function:\x20','str','2015dnAWqk','92328egCLGh','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','entries','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','map','3600616taoJFH','TODO:\x20add\x20script\x20description','parseInt','Invalid\x20function\x20name\x20\x22','join','tableName','Available:\x20','length','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[触发节点]\x20','8202019devNNo','operationType','Script\x20type','type','Available\x20aliases:\x20','operation-type','11706CvrLkN','apiDir','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','nonInteractive','COMMON','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','description','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','No\x20api.ts\x20found.\x20Run\x20`','.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','4486017ZjpCyS','ENDPOINT','\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','No\x20datasets\x20found\x20for\x20this\x20app.','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','after','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','5906AiGMmo','\x20api\x20pull`\x20to\x20refresh.','Alias\x20\x22','write','utf8','Select\x20trigger\x20node:','Operation\x20type\x20\x22','function-node','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a'];a26_0x4b61=function(){return _0x14030e;};return a26_0x4b61();}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';function a26_0x5f5c(_0x1fa6a1,_0xa4de2e){_0x1fa6a1=_0x1fa6a1-0x8f;const _0x4b61c2=a26_0x4b61();let _0x5f5cfd=_0x4b61c2[_0x1fa6a1];return _0x5f5cfd;}export const bffCreate={'service':a26_0x10fe75(0x9b),'command':a26_0x10fe75(0xd5),'description':a26_0x10fe75(0xa5),'risk':'write','flags':[{'name':'type','type':'string','required':!![],'enum':[a26_0x10fe75(0xbb),a26_0x10fe75(0xc2),a26_0x10fe75(0xda)],'description':a26_0x10fe75(0xb3)},{'name':a26_0x10fe75(0x9e),'type':a26_0x10fe75(0x99),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a26_0x10fe75(0x99),'description':'Script\x20description'},{'name':a26_0x10fe75(0x93),'type':a26_0x10fe75(0x99),'description':a26_0x10fe75(0xbe)},{'name':a26_0x10fe75(0xec),'type':a26_0x10fe75(0x99),'description':a26_0x10fe75(0xbc)},{'name':a26_0x10fe75(0xb6),'type':'string','description':a26_0x10fe75(0xe3)},{'name':a26_0x10fe75(0xcf),'type':a26_0x10fe75(0x99),'description':a26_0x10fe75(0x96),'enum':[a26_0x10fe75(0xd8),a26_0x10fe75(0xc6)]}],async 'validate'(_0x36ca9a){const _0x229b92=a26_0x10fe75,_0x5ca9d5=_0x36ca9a['str'](_0x229b92(0x9e));if(!isValidBffFunctionName(_0x5ca9d5))throw CliErrors[_0x229b92(0x9d)](_0x229b92(0xaa)+_0x5ca9d5+_0x229b92(0xc5));},async 'execute'(_0x3f8a72){const _0x40d8a4=a26_0x10fe75,_0x1d3c70=loadBffProjectConfig(_0x3f8a72[_0x40d8a4(0xe6)]),_0x25c366=_0x3f8a72[_0x40d8a4(0xa0)](_0x40d8a4(0xb4)),_0x49148a=_0x3f8a72[_0x40d8a4(0xa0)](_0x40d8a4(0x9e)),_0x10c999=_0x3f8a72[_0x40d8a4(0xa0)](_0x40d8a4(0xbd))||undefined,_0x1f279a=_0x25c366==='HOOK'?await resolveHookOptions(_0x1d3c70,_0x3f8a72):undefined,_0x5faf0a=buildFilePath(_0x1d3c70,_0x25c366,_0x49148a,_0x1f279a);if(await fileExists(_0x5faf0a))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x5faf0a);await mkdir(dirname(_0x5faf0a),{'recursive':!![]});const _0x4b752c=generateTemplate(_0x25c366,_0x49148a,_0x3f8a72[_0x40d8a4(0xe6)],_0x10c999,_0x1f279a);await writeFile(_0x5faf0a,_0x4b752c,_0x40d8a4(0xcc));const _0x4f6094={'type':_0x25c366,'name':_0x49148a,'path':_0x5faf0a};if(_0x10c999)_0x4f6094[_0x40d8a4(0xbd)]=_0x10c999;if(_0x1f279a){if(_0x1f279a[_0x40d8a4(0x93)])_0x4f6094[_0x40d8a4(0x93)]=_0x1f279a[_0x40d8a4(0x93)];_0x4f6094[_0x40d8a4(0xe5)]=_0x1f279a[_0x40d8a4(0xe5)],_0x4f6094[_0x40d8a4(0xb2)]=_0x1f279a[_0x40d8a4(0xb2)],_0x4f6094[_0x40d8a4(0xeb)]=_0x1f279a[_0x40d8a4(0xeb)];}return{'ok':!![],'data':_0x4f6094,'message':_0x40d8a4(0x98)+_0x25c366+_0x40d8a4(0x9f)+_0x49148a};}};async function resolveHookOptions(_0x3d69c6,_0x313f1e){const _0xa53888=a26_0x10fe75,_0x2f285d=loadAliasMap(_0x313f1e['apiDir'],undefined,resolveApiFilePath(_0x313f1e['apiDir'],_0x313f1e['appCode'])),_0x5500d2=_0x2f285d['length']>0x0;let _0x2c1700,_0x3966ba,_0xbcdecb;const _0x4cf9f0=_0x313f1e[_0xa53888(0xa0)](_0xa53888(0x93)),_0x59acda=_0x313f1e[_0xa53888(0xa0)]('datasetcode');if(_0x4cf9f0){const _0x3fc1c2=resolveAlias(_0x313f1e['apiDir'],_0x4cf9f0,undefined,resolveApiFilePath(_0x313f1e[_0xa53888(0xb8)],_0x313f1e[_0xa53888(0xe6)]));if(!_0x3fc1c2){const _0x5b6d64=_0x5500d2?_0xa53888(0xb5)+_0x2f285d[_0xa53888(0xa6)](_0x2f52eb=>_0x2f52eb[_0xa53888(0x93)])['join'](',\x20'):_0xa53888(0xbf)+CLI_BIN_NAME+_0xa53888(0xdb);throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xca)+_0x4cf9f0+_0xa53888(0x90)+_0x5b6d64);}_0x2c1700=_0x4cf9f0,_0x3966ba=_0x3fc1c2;}else{if(_0x59acda){_0x3966ba=_0x59acda;const _0x54e844=_0x2f285d['find'](_0xcf5aa3=>_0xcf5aa3[_0xa53888(0xe5)]===_0x59acda);_0x2c1700=_0x54e844?.[_0xa53888(0x93)];}else{if(_0x313f1e[_0xa53888(0xba)])throw CliErrors[_0xa53888(0x9d)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x5500d2){const _0x5eb180=_0x2f285d[_0xa53888(0xa6)](_0x593493=>_0x593493[_0xa53888(0x93)]+'\x20('+_0x593493[_0xa53888(0xac)]+')'),_0x41cc5b=await promptSelect('Select\x20dataset:',_0x5eb180),_0xc139f0=_0x2f285d[_0x41cc5b];if(!_0xc139f0)throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xaf));_0x2c1700=_0xc139f0[_0xa53888(0x93)],_0x3966ba=_0xc139f0[_0xa53888(0xe5)];}else{const _0x54239d=await listDatasets(_0x313f1e[_0xa53888(0xe6)]);if(_0x54239d[_0xa53888(0xae)]===0x0)throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xc4));const _0x3ce240=_0x54239d['map'](_0xfb2ad1=>_0xfb2ad1['name']+'\x20('+_0xfb2ad1[_0xa53888(0xe4)]+')'),_0xcbcf9b=await promptSelect(_0xa53888(0xd9),_0x3ce240),_0x4ae4cd=_0x54239d[_0xcbcf9b];if(!_0x4ae4cd)throw CliErrors['validation'](_0xa53888(0xaf));_0x3966ba=_0x4ae4cd[_0xa53888(0xe4)],_0x2c1700=undefined;}}}}const _0x5230c7=await listDatasets(_0x313f1e[_0xa53888(0xe6)]),_0x49d8cf=_0x5230c7[_0xa53888(0xd4)](_0x1222fa=>_0x1222fa[_0xa53888(0xe4)]===_0x3966ba);if(!_0x49d8cf)throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xdf)+_0x3966ba+'\x22.\x20'+(_0x2c1700?_0xa53888(0xd6)+CLI_BIN_NAME+_0xa53888(0xc9):''));_0xbcdecb=_0x49d8cf['id'];const _0x26d17f=_0x2c1700??_0x3966ba,_0xa71b2e=await listBffDatasetOperations(_0x313f1e[_0xa53888(0xe6)],_0xbcdecb),_0xb7daa8=_0xa71b2e?Object[_0xa53888(0x9c)](_0xa71b2e):[];if(_0xb7daa8[_0xa53888(0xae)]===0x0)throw CliErrors['validation']('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x26d17f+'.');let _0x13b415;const _0x432d4f=_0x313f1e[_0xa53888(0xa0)]('operation-type');if(_0x432d4f){if(!_0xb7daa8['includes'](_0x432d4f))throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xce)+_0x432d4f+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x26d17f+'.\x20'+(_0xa53888(0xad)+_0xb7daa8[_0xa53888(0xab)](',\x20')));_0x13b415=_0x432d4f;}else{if(_0x313f1e[_0xa53888(0xba)])throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xa3));const _0x2d0ca0=await promptSelect(_0xa53888(0x9a),_0xb7daa8);_0x13b415=_0xb7daa8[_0x2d0ca0]??_0xb7daa8[0x0];}let _0x5a240c=normalizeHookFunctionNode(_0x313f1e[_0xa53888(0xa0)]('function-node'));if(!_0x5a240c){if(_0x313f1e[_0xa53888(0xa0)](_0xa53888(0xcf)))throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xe0));if(_0x313f1e[_0xa53888(0xba)])throw CliErrors[_0xa53888(0x9d)](_0xa53888(0xc7));const _0x442da9=await promptSelect(_0xa53888(0xcd),['before','after']);_0x5a240c=[_0xa53888(0xd8),_0xa53888(0xc6)][_0x442da9]??_0xa53888(0xd8);}return{'alias':_0x2c1700,'datasetCode':_0x3966ba,'datasetId':_0xbcdecb,'operationType':_0x13b415,'functionNode':_0x5a240c};}async function promptSelect(_0x58b268,_0x408497){const _0x27fde8=a26_0x10fe75;if(_0x408497['length']===0x1)return 0x0;for(const [_0x468ede,_0xff3da6]of _0x408497[_0x27fde8(0xa4)]()){process[_0x27fde8(0x95)][_0x27fde8(0xcb)]('\x20\x20'+(_0x468ede+0x1)+'.\x20'+_0xff3da6+'\x0a');}const _0x1250b8=createInterface({'input':process[_0x27fde8(0x97)],'output':process[_0x27fde8(0x95)]});while(!![]){const _0x2831e4=await new Promise(_0x27dc44=>{const _0x3b56f1=_0x27fde8;_0x1250b8[_0x3b56f1(0xd3)](_0x58b268+'\x20',_0x27dc44);}),_0x13da37=Number[_0x27fde8(0xa9)](_0x2831e4[_0x27fde8(0xe1)](),0xa);if(Number[_0x27fde8(0xdc)](_0x13da37)&&_0x13da37>=0x1&&_0x13da37<=_0x408497[_0x27fde8(0xae)])return _0x1250b8[_0x27fde8(0xd1)](),_0x13da37-0x1;process['stderr'][_0x27fde8(0xcb)](_0x27fde8(0xd2)+_0x408497[_0x27fde8(0xae)]+'.\x0a');}}function buildFilePath(_0x24ec42,_0x1595a5,_0x862085,_0x47b4a0){const _0x1aedca=a26_0x10fe75;if(_0x1595a5===_0x1aedca(0xda)){if(!_0x47b4a0)throw CliErrors[_0x1aedca(0x9d)](_0x1aedca(0xea));const _0x412cd8=_0x47b4a0[_0x1aedca(0x93)]??_0x47b4a0[_0x1aedca(0xe5)];return join(_0x24ec42[_0x1aedca(0x94)],'HOOK',_0x412cd8,_0x47b4a0[_0x1aedca(0xb2)],_0x47b4a0[_0x1aedca(0xeb)],_0x862085+_0x1aedca(0xe9));}return join(_0x24ec42['scriptsRootDir'],_0x1595a5,_0x862085+_0x1aedca(0xe9));}export function generateTemplate(_0x2a6c83,_0x5b8af9,_0x575be5,_0x135907,_0x42fc06){const _0x569276=a26_0x10fe75,_0x40450a=_0x135907?.[_0x569276(0xe1)]()||_0x569276(0xa8);if(_0x2a6c83===_0x569276(0xbb))return _0x569276(0xde)+_0x40450a+_0x569276(0x91)+_0x5b8af9+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x5b8af9+_0x569276(0xc0)+_0x5b8af9+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x2a6c83===_0x569276(0xc2))return _0x569276(0xe8)+_0x40450a+_0x569276(0xdd)+_0x575be5+'/'+_0x5b8af9+_0x569276(0xc3)+_0x5b8af9+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x42fc06)throw CliErrors[_0x569276(0x9d)](_0x569276(0xb9));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x40450a+_0x569276(0xe7)+_0x575be5+'/'+_0x42fc06[_0x569276(0xe5)]+'/'+_0x42fc06[_0x569276(0xb2)]+_0x569276(0xb0)+_0x42fc06[_0x569276(0xeb)]+_0x569276(0xd7)+_0x5b8af9+_0x569276(0xd0);}
@@ -1 +1 @@
1
- const a27_0x316209=a27_0x5f04;(function(_0x334dd4,_0x28795f){const _0x59412d=a27_0x5f04,_0x4daeef=_0x334dd4();while(!![]){try{const _0x3f8a3e=parseInt(_0x59412d(0xc3))/0x1*(-parseInt(_0x59412d(0xb6))/0x2)+parseInt(_0x59412d(0xae))/0x3*(parseInt(_0x59412d(0xce))/0x4)+parseInt(_0x59412d(0xb2))/0x5*(parseInt(_0x59412d(0xcb))/0x6)+parseInt(_0x59412d(0xbc))/0x7+parseInt(_0x59412d(0xbf))/0x8+parseInt(_0x59412d(0xb0))/0x9*(-parseInt(_0x59412d(0xcd))/0xa)+-parseInt(_0x59412d(0xd3))/0xb;if(_0x3f8a3e===_0x28795f)break;else _0x4daeef['push'](_0x4daeef['shift']());}catch(_0x109919){_0x4daeef['push'](_0x4daeef['shift']());}}}(a27_0x206c,0xa0392));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a27_0x5f04(_0x3c68b6,_0x375281){_0x3c68b6=_0x3c68b6-0xa8;const _0x206c38=a27_0x206c();let _0x5f0439=_0x206c38[_0x3c68b6];return _0x5f0439;}import{dirname,join,relative,resolve,sep}from'node:path';function a27_0x206c(){const _0x32cf29=['BFF\x20lock\x20file\x20not\x20found.','string','appCode','POST','trashedTo','startsWith','lockFilePath','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','includes','1706535Aueyvm','\x20(local\x20file\x20moved\x20to\x20trash)','126fFsEXv','Multiple\x20functions\x20match\x20\x22','6136975kgXMKx','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','Function\x20not\x20found:\x20','Deleted\x20','4OAzUxS','lastSync','bff','toISOString','No\x20lock\x20entry\x20found\x20for\x20\x22','keys','847595UBaota','find','target','7962136IrfBvV','\x20\x20-\x20','replace','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','353469LFDQnD','Would\x20delete\x20','filter','remoteId','length','projectRoot','high-risk-write','map','6fPUvwS','/api/management/library/scripts/delete','769480fBnwPK','4xBdbKf','str','join','delete','scriptsRoot','5193188KYUAHz','validation','functions'];a27_0x206c=function(){return _0x32cf29;};return a27_0x206c();}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_0x316209(0xb8),'command':a27_0x316209(0xd1),'description':a27_0x316209(0xb3),'risk':a27_0x316209(0xc9),'flags':[{'name':a27_0x316209(0xbe),'type':a27_0x316209(0xd7),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x4ed699){const _0x7846da=a27_0x316209,_0x4da494=loadBffProjectConfig(_0x4ed699[_0x7846da(0xd8)]),_0x31f021=await readBffLockFile(_0x4da494[_0x7846da(0xab)]);if(!_0x31f021)throw CliErrors['validation'](_0x7846da(0xc2));},async 'dryRun'(_0x56c3d1){const _0x20c805=a27_0x316209,_0x422e9c=loadBffProjectConfig(_0x56c3d1[_0x20c805(0xd8)]),_0x1df746=await readBffLockFile(_0x422e9c[_0x20c805(0xab)]);if(!_0x1df746)throw CliErrors['validation'](_0x20c805(0xd6));const {appLock:_0x5c6b00}=ensureLockScope(_0x1df746,_0x56c3d1['appCode'],_0x422e9c[_0x20c805(0xd2)],_0x20c805(0xd1)),_0x1bd7de=_0x56c3d1[_0x20c805(0xcf)](_0x20c805(0xbe)),_0xd79378=Object[_0x20c805(0xbb)](_0x5c6b00[_0x20c805(0xd5)]),_0x1c3bf9=resolveDeleteTarget(_0x1bd7de,_0xd79378),_0x37a4b0=_0x5c6b00['functions'][_0x1c3bf9];if(!_0x37a4b0)throw CliErrors[_0x20c805(0xd4)](_0x20c805(0xba)+_0x1c3bf9+'\x22.');const _0x3018d6=resolveLocalFilePathFromLockKey(_0x422e9c,_0x1c3bf9),_0x496601=relative(_0x422e9c[_0x20c805(0xc8)],_0x3018d6),_0x262899=join(_0x422e9c['trashDir'],'<timestamp>',_0x496601);return{'method':_0x20c805(0xa8),'url':_0x20c805(0xcc),'body':{'appCode':_0x56c3d1[_0x20c805(0xd8)],'target':_0x1c3bf9,'remoteId':_0x37a4b0[_0x20c805(0xc6)],'localFilePath':_0x3018d6,'trashedPath':_0x262899},'description':_0x20c805(0xc4)+_0x1c3bf9+_0x20c805(0xac)};},async 'execute'(_0x20b0bd){const _0x55f775=a27_0x316209,_0x18fd28=loadBffProjectConfig(_0x20b0bd[_0x55f775(0xd8)]),_0x3278d0=await readBffLockFile(_0x18fd28[_0x55f775(0xab)]);if(!_0x3278d0)throw CliErrors['validation'](_0x55f775(0xd6));const {lockData:_0x341434,appLock:_0x295c78}=ensureLockScope(_0x3278d0,_0x20b0bd[_0x55f775(0xd8)],_0x18fd28[_0x55f775(0xd2)],_0x55f775(0xd1)),_0x51fda6=_0x20b0bd[_0x55f775(0xcf)](_0x55f775(0xbe)),_0x4cd544=Object['keys'](_0x295c78['functions']),_0x1e0b89=resolveDeleteTarget(_0x51fda6,_0x4cd544),_0x367d72=_0x295c78[_0x55f775(0xd5)][_0x1e0b89];if(!_0x367d72)throw CliErrors[_0x55f775(0xd4)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x1e0b89+'\x22.');await deleteBffScript(_0x367d72[_0x55f775(0xc6)]),delete _0x295c78[_0x55f775(0xd5)][_0x1e0b89],_0x295c78[_0x55f775(0xb7)]=new Date()[_0x55f775(0xb9)](),await writeBffLockFile(_0x18fd28['lockFilePath'],_0x341434);const _0x11eb1b=resolveLocalFilePathFromLockKey(_0x18fd28,_0x1e0b89);let _0x185dd9;await fileExists(_0x11eb1b)&&(_0x185dd9=await moveToTrash(_0x18fd28['projectRoot'],_0x18fd28['trashDir'],_0x11eb1b),await cleanupEmptyDirectories(dirname(_0x11eb1b),_0x18fd28['scriptsRootDir']));const _0x592ee7={'deleted':_0x1e0b89,'remoteId':_0x367d72['remoteId']};if(_0x185dd9)_0x592ee7[_0x55f775(0xa9)]=_0x185dd9;return{'ok':!![],'data':_0x592ee7,'message':_0x55f775(0xb5)+_0x1e0b89+(_0x185dd9?_0x55f775(0xaf):'')};}};function resolveDeleteTarget(_0x432b38,_0x42bb8d){const _0x30d135=a27_0x316209;if(_0x432b38[_0x30d135(0xad)]('/')){const _0x2b7988=_0x42bb8d[_0x30d135(0xbd)](_0x18cd01=>_0x18cd01===_0x432b38);if(!_0x2b7988)throw CliErrors[_0x30d135(0xd4)](_0x30d135(0xb4)+_0x432b38);return _0x2b7988;}const _0x1be576=_0x42bb8d[_0x30d135(0xc5)](_0x10c5e2=>_0x10c5e2['split']('/')['at'](-0x1)===_0x432b38);if(_0x1be576[_0x30d135(0xc7)]===0x0)throw CliErrors[_0x30d135(0xd4)](_0x30d135(0xb4)+_0x432b38);if(_0x1be576[_0x30d135(0xc7)]>0x1)throw CliErrors[_0x30d135(0xd4)](_0x30d135(0xb1)+_0x432b38+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x1be576[_0x30d135(0xca)](_0x57c65d=>_0x30d135(0xc0)+_0x57c65d)[_0x30d135(0xd0)]('\x0a'));return _0x1be576[0x0];}async function moveToTrash(_0x3821f1,_0x575aa0,_0x57c17e){const _0xf14ec4=a27_0x316209,_0x3480b0=new Date()['toISOString']()[_0xf14ec4(0xc1)](/[:.]/g,'-'),_0x3ea525=relative(_0x3821f1,_0x57c17e),_0x42db3c=join(_0x575aa0,_0x3480b0,_0x3ea525);return await mkdir(dirname(_0x42db3c),{'recursive':!![]}),await rename(_0x57c17e,_0x42db3c),_0x42db3c;}async function cleanupEmptyDirectories(_0x4b72c7,_0x180082){const _0x71d00f=a27_0x316209;let _0x431d83=resolve(_0x4b72c7);const _0x1a59de=resolve(_0x180082);while(_0x431d83[_0x71d00f(0xaa)](''+_0x1a59de+sep)||_0x431d83===_0x1a59de){if(_0x431d83===_0x1a59de)return;try{const _0x52e775=await readdir(_0x431d83);if(_0x52e775[_0x71d00f(0xc7)]>0x0)return;await rmdir(_0x431d83);}catch{return;}_0x431d83=dirname(_0x431d83);}}
1
+ const a27_0xbee0aa=a27_0x3226;(function(_0x4698f1,_0x51c583){const _0x3c35cc=a27_0x3226,_0x347e09=_0x4698f1();while(!![]){try{const _0x520f50=-parseInt(_0x3c35cc(0xed))/0x1+parseInt(_0x3c35cc(0xc3))/0x2+-parseInt(_0x3c35cc(0xea))/0x3*(parseInt(_0x3c35cc(0xe9))/0x4)+parseInt(_0x3c35cc(0xe3))/0x5*(parseInt(_0x3c35cc(0xd0))/0x6)+parseInt(_0x3c35cc(0xd3))/0x7+parseInt(_0x3c35cc(0xdb))/0x8+-parseInt(_0x3c35cc(0xc5))/0x9*(parseInt(_0x3c35cc(0xce))/0xa);if(_0x520f50===_0x51c583)break;else _0x347e09['push'](_0x347e09['shift']());}catch(_0x3a4a7b){_0x347e09['push'](_0x347e09['shift']());}}}(a27_0x4820,0xee663));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';function a27_0x3226(_0x27904c,_0x267903){_0x27904c=_0x27904c-0xc3;const _0x482005=a27_0x4820();let _0x3226b4=_0x482005[_0x27904c];return _0x3226b4;}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a27_0x4820(){const _0x5ea9f5=['appCode','/api/management/library/scripts/delete','length','5VUXbun','trashDir','map','Deleted\x20','projectRoot','Would\x20delete\x20','4GnMNML','1877256gQeoJo','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','target','1464348atAQCO','Function\x20not\x20found:\x20','1568268LdnUFr','toISOString','9TXjnYj','bff','validation','find','replace','POST','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','functions','BFF\x20lock\x20file\x20not\x20found.','16536350tjyMgr','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','6018762BJwIxw','high-risk-write','<timestamp>','8296260MtUvKm','scriptsRootDir','str','lastSync','delete','string','includes','lockFilePath','13982216miCEVb','remoteId','keys','startsWith','\x20(local\x20file\x20moved\x20to\x20trash)'];a27_0x4820=function(){return _0x5ea9f5;};return a27_0x4820();}import{CliErrors}from'../../errors.js';export const bffDelete={'service':a27_0xbee0aa(0xc6),'command':'delete','description':a27_0xbee0aa(0xcf),'risk':a27_0xbee0aa(0xd1),'flags':[{'name':'target','type':a27_0xbee0aa(0xd8),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x41b82b){const _0x311e05=a27_0xbee0aa,_0x523fbb=loadBffProjectConfig(_0x41b82b['appCode']),_0x364a13=await readBffLockFile(_0x523fbb[_0x311e05(0xda)]);if(!_0x364a13)throw CliErrors[_0x311e05(0xc7)](_0x311e05(0xcb));},async 'dryRun'(_0x2b0711){const _0x1ec0d8=a27_0xbee0aa,_0x2f4440=loadBffProjectConfig(_0x2b0711['appCode']),_0x510220=await readBffLockFile(_0x2f4440[_0x1ec0d8(0xda)]);if(!_0x510220)throw CliErrors[_0x1ec0d8(0xc7)]('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x53df7b}=ensureLockScope(_0x510220,_0x2b0711[_0x1ec0d8(0xe0)],_0x2f4440['scriptsRoot'],'delete'),_0x9f954b=_0x2b0711[_0x1ec0d8(0xd5)](_0x1ec0d8(0xec)),_0x1da9e4=Object[_0x1ec0d8(0xdd)](_0x53df7b[_0x1ec0d8(0xcc)]),_0x232064=resolveDeleteTarget(_0x9f954b,_0x1da9e4),_0x3c1b18=_0x53df7b[_0x1ec0d8(0xcc)][_0x232064];if(!_0x3c1b18)throw CliErrors[_0x1ec0d8(0xc7)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x232064+'\x22.');const _0x28499a=resolveLocalFilePathFromLockKey(_0x2f4440,_0x232064),_0x17f563=relative(_0x2f4440[_0x1ec0d8(0xe7)],_0x28499a),_0x1a3efe=join(_0x2f4440[_0x1ec0d8(0xe4)],_0x1ec0d8(0xd2),_0x17f563);return{'method':_0x1ec0d8(0xca),'url':_0x1ec0d8(0xe1),'body':{'appCode':_0x2b0711['appCode'],'target':_0x232064,'remoteId':_0x3c1b18['remoteId'],'localFilePath':_0x28499a,'trashedPath':_0x1a3efe},'description':_0x1ec0d8(0xe8)+_0x232064+_0x1ec0d8(0xeb)};},async 'execute'(_0x281c13){const _0x35b354=a27_0xbee0aa,_0x485b21=loadBffProjectConfig(_0x281c13['appCode']),_0x271a10=await readBffLockFile(_0x485b21['lockFilePath']);if(!_0x271a10)throw CliErrors['validation'](_0x35b354(0xcd));const {lockData:_0x19cccc,appLock:_0x461ada}=ensureLockScope(_0x271a10,_0x281c13[_0x35b354(0xe0)],_0x485b21['scriptsRoot'],_0x35b354(0xd7)),_0x5d33b5=_0x281c13[_0x35b354(0xd5)](_0x35b354(0xec)),_0x33595a=Object[_0x35b354(0xdd)](_0x461ada[_0x35b354(0xcc)]),_0x41d7f9=resolveDeleteTarget(_0x5d33b5,_0x33595a),_0x5c230e=_0x461ada[_0x35b354(0xcc)][_0x41d7f9];if(!_0x5c230e)throw CliErrors[_0x35b354(0xc7)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x41d7f9+'\x22.');await deleteBffScript(_0x5c230e[_0x35b354(0xdc)]),delete _0x461ada[_0x35b354(0xcc)][_0x41d7f9],_0x461ada[_0x35b354(0xd6)]=new Date()[_0x35b354(0xc4)](),await writeBffLockFile(_0x485b21[_0x35b354(0xda)],_0x19cccc);const _0x18bf90=resolveLocalFilePathFromLockKey(_0x485b21,_0x41d7f9);let _0x23b360;await fileExists(_0x18bf90)&&(_0x23b360=await moveToTrash(_0x485b21['projectRoot'],_0x485b21['trashDir'],_0x18bf90),await cleanupEmptyDirectories(dirname(_0x18bf90),_0x485b21[_0x35b354(0xd4)]));const _0x1569a7={'deleted':_0x41d7f9,'remoteId':_0x5c230e[_0x35b354(0xdc)]};if(_0x23b360)_0x1569a7['trashedTo']=_0x23b360;return{'ok':!![],'data':_0x1569a7,'message':_0x35b354(0xe6)+_0x41d7f9+(_0x23b360?_0x35b354(0xdf):'')};}};function resolveDeleteTarget(_0x4be972,_0x2e8017){const _0x1d046a=a27_0xbee0aa;if(_0x4be972[_0x1d046a(0xd9)]('/')){const _0x156cc8=_0x2e8017[_0x1d046a(0xc8)](_0x31bc01=>_0x31bc01===_0x4be972);if(!_0x156cc8)throw CliErrors[_0x1d046a(0xc7)](_0x1d046a(0xee)+_0x4be972);return _0x156cc8;}const _0x3ad944=_0x2e8017['filter'](_0x235cf0=>_0x235cf0['split']('/')['at'](-0x1)===_0x4be972);if(_0x3ad944[_0x1d046a(0xe2)]===0x0)throw CliErrors['validation']('Function\x20not\x20found:\x20'+_0x4be972);if(_0x3ad944['length']>0x1)throw CliErrors[_0x1d046a(0xc7)]('Multiple\x20functions\x20match\x20\x22'+_0x4be972+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x3ad944[_0x1d046a(0xe5)](_0x2b591b=>'\x20\x20-\x20'+_0x2b591b)['join']('\x0a'));return _0x3ad944[0x0];}async function moveToTrash(_0x43328e,_0x19b18d,_0x44c931){const _0x2079d6=a27_0xbee0aa,_0x2d3c53=new Date()['toISOString']()[_0x2079d6(0xc9)](/[:.]/g,'-'),_0x41ffed=relative(_0x43328e,_0x44c931),_0x4b2c8f=join(_0x19b18d,_0x2d3c53,_0x41ffed);return await mkdir(dirname(_0x4b2c8f),{'recursive':!![]}),await rename(_0x44c931,_0x4b2c8f),_0x4b2c8f;}async function cleanupEmptyDirectories(_0xc673cf,_0x25fe93){const _0x158d86=a27_0xbee0aa;let _0x2febd5=resolve(_0xc673cf);const _0x441620=resolve(_0x25fe93);while(_0x2febd5[_0x158d86(0xde)](''+_0x441620+sep)||_0x2febd5===_0x441620){if(_0x2febd5===_0x441620)return;try{const _0x13ec25=await readdir(_0x2febd5);if(_0x13ec25[_0x158d86(0xe2)]>0x0)return;await rmdir(_0x2febd5);}catch{return;}_0x2febd5=dirname(_0x2febd5);}}
@@ -1 +1 @@
1
- const a28_0x2b5be3=a28_0xdbca;(function(_0x177172,_0xc5d97){const _0x411009=a28_0xdbca,_0x249bad=_0x177172();while(!![]){try{const _0x2aa51a=-parseInt(_0x411009(0xe5))/0x1*(parseInt(_0x411009(0xef))/0x2)+-parseInt(_0x411009(0xfb))/0x3+parseInt(_0x411009(0xf0))/0x4*(parseInt(_0x411009(0xf2))/0x5)+parseInt(_0x411009(0xed))/0x6+-parseInt(_0x411009(0xea))/0x7+parseInt(_0x411009(0xf3))/0x8*(parseInt(_0x411009(0xec))/0x9)+parseInt(_0x411009(0xe6))/0xa;if(_0x2aa51a===_0xc5d97)break;else _0x249bad['push'](_0x249bad['shift']());}catch(_0x697786){_0x249bad['push'](_0x249bad['shift']());}}}(a28_0x3e73,0x1b5b7));import{getBffScriptInfo}from'../../core/api-client.js';function a28_0x3e73(){const _0x122d25=['Return\x20full\x20raw\x20script\x20object','createdTime','scriptType','335568bksTDq','5dlxsNY','1480420FlKLii','read','verbose','detail','1086057HvmdRy','num','18ZcwcLy','484992tICKOo','(none)','76366DEEBcr','51012kCAQRz','appCode','75ZzHGMz','599232ChaTCW','number','scriptContent','boolean','description'];a28_0x3e73=function(){return _0x122d25;};return a28_0x3e73();}function a28_0xdbca(_0x46c363,_0x1b9a73){_0x46c363=_0x46c363-0xe5;const _0x3e73ab=a28_0x3e73();let _0xdbca21=_0x3e73ab[_0x46c363];return _0xdbca21;}export const bffDetail={'service':'bff','command':a28_0x2b5be3(0xe9),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a28_0x2b5be3(0xe7),'flags':[{'name':'id','type':a28_0x2b5be3(0xf4),'required':!![],'description':'Script\x20ID'},{'name':a28_0x2b5be3(0xe8),'type':a28_0x2b5be3(0xf6),'description':a28_0x2b5be3(0xf8)}],async 'execute'(_0x515cea){const _0x569ef7=a28_0x2b5be3,_0x3c4d16=await getBffScriptInfo(_0x515cea[_0x569ef7(0xeb)]('id')),_0x4926ce=_0x515cea['bool'](_0x569ef7(0xe8));if(_0x4926ce)return{'ok':!![],'data':_0x3c4d16};return{'ok':!![],'data':{'id':_0x3c4d16['id'],'appCode':_0x3c4d16[_0x569ef7(0xf1)],'scriptType':_0x3c4d16[_0x569ef7(0xfa)],'description':_0x3c4d16[_0x569ef7(0xf7)]||_0x569ef7(0xee),'createdTime':_0x3c4d16[_0x569ef7(0xf9)]??'','updatedTime':_0x3c4d16['updatedTime']??'','scriptContent':_0x3c4d16[_0x569ef7(0xf5)]??''}};}};
1
+ const a28_0x2edf88=a28_0x5f15;(function(_0xf18485,_0x5b2e6d){const _0x2ac8a=a28_0x5f15,_0x12e48d=_0xf18485();while(!![]){try{const _0x5c487c=parseInt(_0x2ac8a(0x120))/0x1*(-parseInt(_0x2ac8a(0x111))/0x2)+-parseInt(_0x2ac8a(0x126))/0x3+-parseInt(_0x2ac8a(0x116))/0x4+parseInt(_0x2ac8a(0x121))/0x5*(parseInt(_0x2ac8a(0x123))/0x6)+-parseInt(_0x2ac8a(0x11d))/0x7*(parseInt(_0x2ac8a(0x117))/0x8)+-parseInt(_0x2ac8a(0x11c))/0x9+parseInt(_0x2ac8a(0x127))/0xa;if(_0x5c487c===_0x5b2e6d)break;else _0x12e48d['push'](_0x12e48d['shift']());}catch(_0x2ffa1c){_0x12e48d['push'](_0x12e48d['shift']());}}}(a28_0x5ef9,0x6fe5a));import{getBffScriptInfo}from'../../core/api-client.js';function a28_0x5ef9(){const _0x4c8114=['updatedTime','(none)','4664673ukPMfQ','62923mvOTWu','createdTime','verbose','17LbkXnk','36870iEAdIp','num','534GasTde','scriptType','read','181152pPNccX','12877250iCCwdl','20984lhWKaY','scriptContent','Return\x20full\x20raw\x20script\x20object','boolean','number','1871820aLtCXD','232QKunHi','appCode','Get\x20BFF\x20script\x20details\x20by\x20ID'];a28_0x5ef9=function(){return _0x4c8114;};return a28_0x5ef9();}function a28_0x5f15(_0x4ed4f9,_0x235670){_0x4ed4f9=_0x4ed4f9-0x111;const _0x5ef985=a28_0x5ef9();let _0x5f1532=_0x5ef985[_0x4ed4f9];return _0x5f1532;}export const bffDetail={'service':'bff','command':'detail','description':a28_0x2edf88(0x119),'risk':a28_0x2edf88(0x125),'flags':[{'name':'id','type':a28_0x2edf88(0x115),'required':!![],'description':'Script\x20ID'},{'name':a28_0x2edf88(0x11f),'type':a28_0x2edf88(0x114),'description':a28_0x2edf88(0x113)}],async 'execute'(_0x279a7f){const _0x176a13=a28_0x2edf88,_0x50522f=await getBffScriptInfo(_0x279a7f[_0x176a13(0x122)]('id')),_0xd98d8b=_0x279a7f['bool'](_0x176a13(0x11f));if(_0xd98d8b)return{'ok':!![],'data':_0x50522f};return{'ok':!![],'data':{'id':_0x50522f['id'],'appCode':_0x50522f[_0x176a13(0x118)],'scriptType':_0x50522f[_0x176a13(0x124)],'description':_0x50522f['description']||_0x176a13(0x11b),'createdTime':_0x50522f[_0x176a13(0x11e)]??'','updatedTime':_0x50522f[_0x176a13(0x11a)]??'','scriptContent':_0x50522f[_0x176a13(0x112)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x541e12,_0x4ce811){const _0x446f65=a29_0x1ab1,_0x3b5c35=_0x541e12();while(!![]){try{const _0x97c72b=parseInt(_0x446f65(0x1b9))/0x1*(parseInt(_0x446f65(0x1b6))/0x2)+parseInt(_0x446f65(0x1b1))/0x3+parseInt(_0x446f65(0x1b5))/0x4*(parseInt(_0x446f65(0x1b2))/0x5)+parseInt(_0x446f65(0x1b0))/0x6*(parseInt(_0x446f65(0x1b4))/0x7)+-parseInt(_0x446f65(0x1af))/0x8+-parseInt(_0x446f65(0x1b3))/0x9+-parseInt(_0x446f65(0x1b7))/0xa*(parseInt(_0x446f65(0x1b8))/0xb);if(_0x97c72b===_0x4ce811)break;else _0x3b5c35['push'](_0x3b5c35['shift']());}catch(_0x1266e8){_0x3b5c35['push'](_0x3b5c35['shift']());}}}(a29_0x3c87,0x5dc16));import{bffList}from'../../commands/bff/list.js';function a29_0x3c87(){const _0x328b59=['3720015iVEjOz','14ctrYBs','14892zTgPfV','884IObKDK','13670jUXCFD','1067dNrLzB','993oiOMxw','5882888SzBBsz','344766ENORZz','2016525JreBYC','590MBnRsW'];a29_0x3c87=function(){return _0x328b59;};return a29_0x3c87();}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';function a29_0x1ab1(_0x3b32da,_0x73bf3c){_0x3b32da=_0x3b32da-0x1af;const _0x3c8701=a29_0x3c87();let _0x1ab112=_0x3c8701[_0x3b32da];return _0x1ab112;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x5ae798,_0x521e46){const _0x4f70f7=a29_0xe05c,_0x6b5f25=_0x5ae798();while(!![]){try{const _0x2e87a5=-parseInt(_0x4f70f7(0x1df))/0x1+parseInt(_0x4f70f7(0x1e6))/0x2+-parseInt(_0x4f70f7(0x1e3))/0x3*(parseInt(_0x4f70f7(0x1e4))/0x4)+parseInt(_0x4f70f7(0x1e1))/0x5+-parseInt(_0x4f70f7(0x1e5))/0x6*(-parseInt(_0x4f70f7(0x1e7))/0x7)+-parseInt(_0x4f70f7(0x1e0))/0x8+parseInt(_0x4f70f7(0x1e2))/0x9;if(_0x2e87a5===_0x521e46)break;else _0x6b5f25['push'](_0x6b5f25['shift']());}catch(_0x797222){_0x6b5f25['push'](_0x6b5f25['shift']());}}}(a29_0xa7ce,0xd0f92));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a29_0xe05c(_0x4720cc,_0x10900e){_0x4720cc=_0x4720cc-0x1df;const _0xa7ce30=a29_0xa7ce();let _0xe05ce=_0xa7ce30[_0x4720cc];return _0xe05ce;}import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a29_0xa7ce(){const _0x3316a9=['6WaSjDk','2439988tLmyAv','7380042ieqyjb','1559498XIOaXs','7myFIom','1349340OSceyv','10459736ydXemy','1107445VrpvzP','22513590mMHDUY'];a29_0xa7ce=function(){return _0x3316a9;};return a29_0xa7ce();}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_0x78ccc=a30_0x3f2e;(function(_0x424631,_0x13032e){const _0x4c1928=a30_0x3f2e,_0x1d119b=_0x424631();while(!![]){try{const _0x422c7f=-parseInt(_0x4c1928(0x1b4))/0x1+-parseInt(_0x4c1928(0x19e))/0x2*(parseInt(_0x4c1928(0x1a4))/0x3)+parseInt(_0x4c1928(0x1b0))/0x4*(parseInt(_0x4c1928(0x1a6))/0x5)+parseInt(_0x4c1928(0x1ae))/0x6*(-parseInt(_0x4c1928(0x1b2))/0x7)+-parseInt(_0x4c1928(0x197))/0x8*(-parseInt(_0x4c1928(0x1a7))/0x9)+parseInt(_0x4c1928(0x1a9))/0xa*(-parseInt(_0x4c1928(0x199))/0xb)+-parseInt(_0x4c1928(0x1a0))/0xc*(-parseInt(_0x4c1928(0x1a3))/0xd);if(_0x422c7f===_0x13032e)break;else _0x1d119b['push'](_0x1d119b['shift']());}catch(_0x35b17f){_0x1d119b['push'](_0x1d119b['shift']());}}}(a30_0x2d10,0x261ee));function a30_0x2d10(){const _0x209622=['name','31402QVvFdW','List\x20BFF\x20scripts','273533TaYjOp','description','type','functionName','1079080bTsgUR','str','3707ZocSgn','string','length','list','Return\x20full\x20script\x20objects','40fTzSru','scriptType','84VvkaWh','ENDPOINT','Filter\x20by\x20script\x20name','1179269ZEiQCb','20112YUbzoP','(unnamed)','15yDoBDA','9UufGtf','map','7340AHDvAP','appCode','boolean','No\x20BFF\x20scripts\x20found.','verbose','78aPzMGQ','COMMON','132740CIClLi'];a30_0x2d10=function(){return _0x209622;};return a30_0x2d10();}import{listBffScripts}from'../../core/api-client.js';function a30_0x3f2e(_0xe833ab,_0x1e5522){_0xe833ab=_0xe833ab-0x195;const _0x2d100a=a30_0x2d10();let _0x3f2eae=_0x2d100a[_0xe833ab];return _0x3f2eae;}export const bffList={'service':'bff','command':a30_0x78ccc(0x19c),'description':a30_0x78ccc(0x1b3),'risk':'read','flags':[{'name':a30_0x78ccc(0x195),'type':a30_0x78ccc(0x19a),'description':'Script\x20type\x20filter','default':a30_0x78ccc(0x1a1),'enum':['ENDPOINT',a30_0x78ccc(0x1af)]},{'name':a30_0x78ccc(0x1b1),'type':a30_0x78ccc(0x19a),'description':a30_0x78ccc(0x1a2)},{'name':a30_0x78ccc(0x1ad),'type':a30_0x78ccc(0x1ab),'description':a30_0x78ccc(0x19d)}],async 'execute'(_0x497128){const _0x6c9b57=a30_0x78ccc,_0x48e07d=await listBffScripts(_0x497128[_0x6c9b57(0x1aa)],_0x497128[_0x6c9b57(0x198)](_0x6c9b57(0x195)),{'scriptName':_0x497128[_0x6c9b57(0x198)]('name')||undefined}),_0x34d6d9=_0x497128['bool'](_0x6c9b57(0x1ad));return{'ok':!![],'data':_0x34d6d9?_0x48e07d:_0x48e07d[_0x6c9b57(0x1a8)](_0x350eda=>({'id':_0x350eda['id'],'functionName':_0x350eda[_0x6c9b57(0x196)]??'','description':_0x350eda[_0x6c9b57(0x1b5)]||_0x6c9b57(0x1a5),'scriptType':_0x350eda[_0x6c9b57(0x19f)]})),'message':_0x48e07d[_0x6c9b57(0x19b)]===0x0?_0x6c9b57(0x1ac):undefined};}};
1
+ const a30_0x42f2a1=a30_0x23a9;function a30_0x3af6(){const _0x1eac78=['2996966chyVWV','map','name','(unnamed)','bff','1546712eHRFhR','boolean','functionName','length','appCode','Script\x20type\x20filter','verbose','Return\x20full\x20script\x20objects','No\x20BFF\x20scripts\x20found.','580046MbQHOt','description','1368750fVDfii','scriptType','314334RbwmKQ','List\x20BFF\x20scripts','ENDPOINT','string','1341856Tvhrim','3225390YqWKgN','6wPKomL','read','list','str'];a30_0x3af6=function(){return _0x1eac78;};return a30_0x3af6();}(function(_0x379dad,_0x581f0f){const _0x1af86c=a30_0x23a9,_0x5129e3=_0x379dad();while(!![]){try{const _0x76a3cc=-parseInt(_0x1af86c(0x103))/0x1+parseInt(_0x1af86c(0x107))/0x2+-parseInt(_0x1af86c(0x105))/0x3+parseInt(_0x1af86c(0x116))/0x4+parseInt(_0x1af86c(0x10c))/0x5+parseInt(_0x1af86c(0x10d))/0x6*(parseInt(_0x1af86c(0x111))/0x7)+-parseInt(_0x1af86c(0x10b))/0x8;if(_0x76a3cc===_0x581f0f)break;else _0x5129e3['push'](_0x5129e3['shift']());}catch(_0x58d181){_0x5129e3['push'](_0x5129e3['shift']());}}}(a30_0x3af6,0x64d69));function a30_0x23a9(_0x505672,_0x2a8272){_0x505672=_0x505672-0xfc;const _0x3af6b7=a30_0x3af6();let _0x23a9d7=_0x3af6b7[_0x505672];return _0x23a9d7;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a30_0x42f2a1(0x115),'command':a30_0x42f2a1(0x10f),'description':a30_0x42f2a1(0x108),'risk':a30_0x42f2a1(0x10e),'flags':[{'name':'type','type':'string','description':a30_0x42f2a1(0xff),'default':'ENDPOINT','enum':[a30_0x42f2a1(0x109),'COMMON']},{'name':a30_0x42f2a1(0x113),'type':a30_0x42f2a1(0x10a),'description':'Filter\x20by\x20script\x20name'},{'name':a30_0x42f2a1(0x100),'type':a30_0x42f2a1(0x117),'description':a30_0x42f2a1(0x101)}],async 'execute'(_0x386361){const _0x58ffe9=a30_0x42f2a1,_0x484332=await listBffScripts(_0x386361[_0x58ffe9(0xfe)],_0x386361[_0x58ffe9(0x110)]('type'),{'scriptName':_0x386361[_0x58ffe9(0x110)](_0x58ffe9(0x113))||undefined}),_0xa57ead=_0x386361['bool']('verbose');return{'ok':!![],'data':_0xa57ead?_0x484332:_0x484332[_0x58ffe9(0x112)](_0x3c1e10=>({'id':_0x3c1e10['id'],'functionName':_0x3c1e10[_0x58ffe9(0xfc)]??'','description':_0x3c1e10[_0x58ffe9(0x104)]||_0x58ffe9(0x114),'scriptType':_0x3c1e10[_0x58ffe9(0x106)]})),'message':_0x484332[_0x58ffe9(0xfd)]===0x0?_0x58ffe9(0x102):undefined};}};
@@ -1 +1 @@
1
- const a31_0x4a63bb=a31_0x181e;(function(_0x5ce1db,_0x237a5d){const _0x18b183=a31_0x181e,_0x2aaade=_0x5ce1db();while(!![]){try{const _0x1bdaac=parseInt(_0x18b183(0x6f))/0x1*(-parseInt(_0x18b183(0x8e))/0x2)+-parseInt(_0x18b183(0x9b))/0x3*(parseInt(_0x18b183(0x7b))/0x4)+-parseInt(_0x18b183(0xa7))/0x5+-parseInt(_0x18b183(0x8b))/0x6*(parseInt(_0x18b183(0x7d))/0x7)+-parseInt(_0x18b183(0xa4))/0x8+parseInt(_0x18b183(0x7f))/0x9+parseInt(_0x18b183(0x73))/0xa;if(_0x1bdaac===_0x237a5d)break;else _0x2aaade['push'](_0x2aaade['shift']());}catch(_0x54a51c){_0x2aaade['push'](_0x2aaade['shift']());}}}(a31_0x2f35,0x27e21));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a31_0x181e(_0x3dffcf,_0x4656c7){_0x3dffcf=_0x3dffcf-0x6a;const _0x2f35d5=a31_0x2f35();let _0x181ef5=_0x2f35d5[_0x3dffcf];return _0x181ef5;}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_0x4a63bb(0x96),'command':a31_0x4a63bb(0x77),'description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a31_0x4a63bb(0x6c),'flags':[{'name':a31_0x4a63bb(0x91),'type':'string','description':a31_0x4a63bb(0xa2),'enum':[a31_0x4a63bb(0x87),a31_0x4a63bb(0xae),a31_0x4a63bb(0x82)]},{'name':'force','type':a31_0x4a63bb(0x95),'description':a31_0x4a63bb(0x88)}],async 'dryRun'(_0x2ddeb5){const _0x2bf1c7=a31_0x4a63bb,_0x5eaae1=loadBffProjectConfig(_0x2ddeb5[_0x2bf1c7(0xa1)]),_0x43fd4c=await readBffLockFile(_0x5eaae1[_0x2bf1c7(0x74)]),{appLock:_0x382c70}=ensureLockScope(_0x43fd4c??createEmptyBffLock(),_0x2ddeb5[_0x2bf1c7(0xa1)],_0x5eaae1[_0x2bf1c7(0x8c)],_0x2bf1c7(0x77)),_0x54a6c5=normalizeBffType(_0x2ddeb5[_0x2bf1c7(0x76)](_0x2bf1c7(0x91)))??undefined,_0x2ed74b=buildDatasetCodeToAliasMap(_0x2ddeb5[_0x2bf1c7(0xb1)],_0x2ddeb5[_0x2bf1c7(0xa1)]),[_0x4a4db8,_0x4387f7]=await Promise[_0x2bf1c7(0xa8)]([listBffScripts(_0x2ddeb5[_0x2bf1c7(0xa1)],_0x54a6c5),getBffScriptStatistics(_0x2ddeb5[_0x2bf1c7(0xa1)])]),_0x2e6eba=createHookLocationMap(_0x4387f7),_0x1c8ad5=[];for(const _0x1b5a3d of _0x4a4db8){const _0x555ea4=resolveRemoteScriptTarget(_0x5eaae1,_0x1b5a3d,_0x2e6eba,_0x382c70[_0x2bf1c7(0x9a)],_0x2ed74b);if(!_0x555ea4){_0x1c8ad5[_0x2bf1c7(0x93)]({'scriptType':_0x1b5a3d['scriptType'],'functionName':_0x1b5a3d[_0x2bf1c7(0xa9)]??'','status':_0x2bf1c7(0x70),'reason':_0x2bf1c7(0x85)});continue;}const _0x5ea7ce=_0x382c70[_0x2bf1c7(0x9a)][_0x555ea4[_0x2bf1c7(0x6d)]],_0x1040d5=_0x1b5a3d['scriptContent']!=null?computeContentHash(_0x1b5a3d['scriptContent']):undefined,_0x455fa7=await hasUnsyncedLocalChanges(_0x555ea4[_0x2bf1c7(0xa0)],_0x5ea7ce,_0x1040d5);_0x1c8ad5[_0x2bf1c7(0x93)]({'lockKey':_0x555ea4[_0x2bf1c7(0x6d)],'filePath':_0x555ea4[_0x2bf1c7(0xa0)],'remoteId':_0x1b5a3d['id']??null,'status':_0x455fa7?_0x2bf1c7(0xa5):_0x2bf1c7(0x6a)});}return{'method':'GET','url':_0x2bf1c7(0x71)+_0x2ddeb5['appCode']+(_0x54a6c5?_0x2bf1c7(0x6e)+_0x54a6c5:''),'body':{'appCode':_0x2ddeb5['appCode'],'filterType':_0x54a6c5??null,'files':_0x1c8ad5},'description':_0x2bf1c7(0x9e)+_0x1c8ad5[_0x2bf1c7(0x6b)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x58b582){const _0x11770a=a31_0x4a63bb,_0x108a94=loadBffProjectConfig(_0x58b582['appCode']),_0x4c258a=await readBffLockFile(_0x108a94[_0x11770a(0x74)]),{lockData:_0x30a36d,appLock:_0x5e1d23}=ensureLockScope(_0x4c258a??createEmptyBffLock(),_0x58b582[_0x11770a(0xa1)],_0x108a94[_0x11770a(0x8c)],_0x11770a(0x77)),_0x3d538f=normalizeBffType(_0x58b582['str'](_0x11770a(0x91)))??undefined;if(_0x58b582['str'](_0x11770a(0x91))&&!_0x3d538f)throw CliErrors['validation'](_0x11770a(0x7e));const [_0x46cbec,_0x85e691]=await Promise[_0x11770a(0xa8)]([listBffScripts(_0x58b582['appCode'],_0x3d538f),getBffScriptStatistics(_0x58b582[_0x11770a(0xa1)])]);if(_0x46cbec[_0x11770a(0x6b)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x11770a(0xa3)};const _0x10bfdf=_0x58b582[_0x11770a(0x8f)](_0x11770a(0xb3));if(_0x10bfdf&&!_0x58b582[_0x11770a(0x80)]){const _0x2cdde1=await confirmForce();if(!_0x2cdde1)throw CliErrors[_0x11770a(0x81)]('Force\x20pull\x20cancelled.');}if(_0x10bfdf&&_0x58b582[_0x11770a(0x80)]){}const _0x321fc7=buildDatasetCodeToAliasMap(_0x58b582[_0x11770a(0xb1)],_0x58b582[_0x11770a(0xa1)]),_0x42a107=createHookLocationMap(_0x85e691),_0x282277=JSON[_0x11770a(0x79)](JSON[_0x11770a(0xb5)](_0x30a36d)),_0x8ada73=_0x58b582['appCode'],_0x2dffe1=_0x282277[_0x11770a(0xb2)][_0x8ada73];if(!_0x2dffe1)throw new Error(_0x11770a(0x83)+_0x8ada73+_0x11770a(0x94));const _0x3afa45=[],_0x446de4=[],_0x453f3a=[];for(const _0x3299c8 of _0x46cbec){const _0x5331dc=resolveRemoteScriptTarget(_0x108a94,_0x3299c8,_0x42a107,_0x5e1d23[_0x11770a(0x9a)],_0x321fc7);if(!_0x5331dc){_0x446de4[_0x11770a(0x93)]({'lockKey':_0x3299c8[_0x11770a(0xab)]+'/'+_0x3299c8[_0x11770a(0xa9)],'reason':_0x11770a(0x85)});continue;}const _0x4c63d1=_0x5e1d23['functions'][_0x5331dc['lockKey']];try{if(!_0x3299c8['id'])throw new Error(_0x11770a(0x86));if(_0x3299c8['scriptContent']==null)throw new Error(_0x11770a(0x7c));const _0x39a2c9=_0x3299c8[_0x11770a(0x9f)],_0x144ab8=computeContentHash(_0x39a2c9);if(!_0x10bfdf){const _0x1e2e4b=await hasUnsyncedLocalChanges(_0x5331dc[_0x11770a(0xa0)],_0x4c63d1,_0x144ab8);if(_0x1e2e4b){_0x446de4['push']({'lockKey':_0x5331dc[_0x11770a(0x6d)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x5331dc['filePath']),await writeFile(_0x5331dc['filePath'],_0x39a2c9,_0x11770a(0x8d));const _0xef54f7={'hash':_0x144ab8,'remoteId':_0x3299c8['id'],'version':_0x3299c8[_0x11770a(0xac)]};_0x5331dc[_0x11770a(0x91)]==='HOOK'&&_0x5331dc[_0x11770a(0x84)]&&(_0xef54f7['alias']=_0x5331dc[_0x11770a(0x84)][_0x11770a(0x89)],_0xef54f7[_0x11770a(0x92)]=_0x5331dc[_0x11770a(0x84)][_0x11770a(0x92)],_0xef54f7['operationType']=_0x5331dc['hookLocation'][_0x11770a(0x97)],_0xef54f7[_0x11770a(0x9c)]=_0x5331dc[_0x11770a(0x84)][_0x11770a(0x9c)]),_0x2dffe1['functions'][_0x5331dc[_0x11770a(0x6d)]]=_0xef54f7,_0x3afa45[_0x11770a(0x93)]({'lockKey':_0x5331dc[_0x11770a(0x6d)],'remoteId':_0x3299c8['id']});}catch(_0xa50987){_0x453f3a[_0x11770a(0x93)]({'lockKey':_0x5331dc['lockKey'],'error':_0xa50987 instanceof Error?_0xa50987[_0x11770a(0x7a)]:String(_0xa50987)});}}return _0x2dffe1[_0x11770a(0x75)]=new Date()[_0x11770a(0xb4)](),await writeBffLockFile(_0x108a94[_0x11770a(0x74)],_0x282277),{'ok':_0x453f3a['length']===0x0,'data':{'pulled':_0x3afa45,'skipped':_0x446de4,'failed':_0x453f3a},'message':'Pull\x20complete:\x20'+_0x3afa45[_0x11770a(0x6b)]+_0x11770a(0xa6)+_0x446de4['length']+_0x11770a(0x99)+_0x453f3a['length']+_0x11770a(0xad)};}};async function hasUnsyncedLocalChanges(_0x363fb4,_0x3dc404,_0x5e0477){const _0x1bf98b=a31_0x4a63bb;if(!await fileExists(_0x363fb4))return![];const _0x377f55=await computeFileHash(_0x363fb4);if(!_0x3dc404)return _0x5e0477?_0x377f55!==_0x5e0477:!![];return _0x377f55!==_0x3dc404[_0x1bf98b(0x78)];}function buildDatasetCodeToAliasMap(_0x55519f,_0x46d5d2){const _0x3a9db9=a31_0x4a63bb,_0x898803=loadAliasMap(_0x55519f,undefined,resolveApiFilePath(_0x55519f,_0x46d5d2));return new Map(_0x898803[_0x3a9db9(0x8a)](_0x1b88ad=>[_0x1b88ad[_0x3a9db9(0x92)],_0x1b88ad[_0x3a9db9(0x89)]]));}async function confirmForce(){const _0x3bf190=a31_0x4a63bb,_0x450e22=createInterface({'input':process[_0x3bf190(0x98)],'output':process[_0x3bf190(0xaa)]}),_0x59d737=await new Promise(_0x45c581=>{const _0x395cfd=_0x3bf190;_0x450e22[_0x395cfd(0x9d)](_0x395cfd(0x72),_0x45c581);});return _0x450e22[_0x3bf190(0xaf)](),['y',_0x3bf190(0xb0)]['includes'](_0x59d737['trim']()[_0x3bf190(0x90)]());}function a31_0x2f35(){const _0x4cf57d=['skipped','/api/management/library/scripts/list?appCode=','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','6559890mzceib','lockFilePath','lastSync','str','pull','hash','parse','message','8ugYDtS','Remote\x20script\x20missing\x20content.','6811RNFsBK','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','1734966WWPgKT','nonInteractive','cancelled','HOOK','Lock\x20scope\x20for\x20app\x20\x22','hookLocation','unresolvable\x20target\x20path','Remote\x20script\x20missing\x20id.','COMMON','Force\x20overwrite\x20local\x20unsynced\x20changes','alias','map','1434AuSrJi','scriptsRoot','utf8','6MBtWhv','bool','toLowerCase','type','datasetCode','push','\x22\x20not\x20found\x20after\x20ensureLockScope.','boolean','bff','operationType','stdin','\x20skipped,\x20','functions','103029JHaLdH','functionNode','question','Would\x20inspect\x20','scriptContent','filePath','appCode','Pull\x20only\x20this\x20script\x20type','No\x20remote\x20BFF\x20scripts\x20found.','1002488lfEhys','conflict','\x20pulled,\x20','484095XMZAkk','all','functionName','stderr','scriptType','version','\x20failed','ENDPOINT','close','yes','apiDir','apps','force','toISOString','stringify','would_pull','length','write','lockKey','&type=','54013caUuSp'];a31_0x2f35=function(){return _0x4cf57d;};return a31_0x2f35();}
1
+ const a31_0xe37ac4=a31_0x2d2b;(function(_0x540bc9,_0x61d29d){const _0x14f1fc=a31_0x2d2b,_0x530986=_0x540bc9();while(!![]){try{const _0x3d6ed2=-parseInt(_0x14f1fc(0x170))/0x1+parseInt(_0x14f1fc(0x191))/0x2*(parseInt(_0x14f1fc(0x151))/0x3)+-parseInt(_0x14f1fc(0x181))/0x4+parseInt(_0x14f1fc(0x174))/0x5*(-parseInt(_0x14f1fc(0x178))/0x6)+parseInt(_0x14f1fc(0x16b))/0x7+parseInt(_0x14f1fc(0x163))/0x8*(parseInt(_0x14f1fc(0x150))/0x9)+parseInt(_0x14f1fc(0x187))/0xa;if(_0x3d6ed2===_0x61d29d)break;else _0x530986['push'](_0x530986['shift']());}catch(_0x5d78a3){_0x530986['push'](_0x530986['shift']());}}}(a31_0x9522,0x98e09));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';function a31_0x2d2b(_0x4e658f,_0x51c350){_0x4e658f=_0x4e658f-0x14e;const _0x952223=a31_0x9522();let _0x2d2b33=_0x952223[_0x4e658f];return _0x2d2b33;}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':a31_0xe37ac4(0x15f),'command':a31_0xe37ac4(0x159),'description':a31_0xe37ac4(0x162),'risk':a31_0xe37ac4(0x18b),'flags':[{'name':a31_0xe37ac4(0x156),'type':a31_0xe37ac4(0x192),'description':a31_0xe37ac4(0x180),'enum':[a31_0xe37ac4(0x17b),a31_0xe37ac4(0x18d),a31_0xe37ac4(0x172)]},{'name':a31_0xe37ac4(0x152),'type':a31_0xe37ac4(0x15c),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x360f81){const _0x2d16a0=a31_0xe37ac4,_0x50bc33=loadBffProjectConfig(_0x360f81['appCode']),_0x391038=await readBffLockFile(_0x50bc33['lockFilePath']),{appLock:_0x71ca94}=ensureLockScope(_0x391038??createEmptyBffLock(),_0x360f81[_0x2d16a0(0x164)],_0x50bc33[_0x2d16a0(0x154)],'pull'),_0x590dcc=normalizeBffType(_0x360f81[_0x2d16a0(0x199)]('type'))??undefined,_0x439413=buildDatasetCodeToAliasMap(_0x360f81[_0x2d16a0(0x188)],_0x360f81['appCode']),[_0x51da08,_0x1c481e]=await Promise[_0x2d16a0(0x161)]([listBffScripts(_0x360f81[_0x2d16a0(0x164)],_0x590dcc),getBffScriptStatistics(_0x360f81[_0x2d16a0(0x164)])]),_0x687fa3=createHookLocationMap(_0x1c481e),_0x266fa7=[];for(const _0x541e4f of _0x51da08){const _0x22d0bd=resolveRemoteScriptTarget(_0x50bc33,_0x541e4f,_0x687fa3,_0x71ca94[_0x2d16a0(0x158)],_0x439413);if(!_0x22d0bd){_0x266fa7[_0x2d16a0(0x14e)]({'scriptType':_0x541e4f[_0x2d16a0(0x16d)],'functionName':_0x541e4f['functionName']??'','status':_0x2d16a0(0x194),'reason':_0x2d16a0(0x16f)});continue;}const _0x4fa314=_0x71ca94[_0x2d16a0(0x158)][_0x22d0bd['lockKey']],_0x290eb4=_0x541e4f[_0x2d16a0(0x197)]!=null?computeContentHash(_0x541e4f['scriptContent']):undefined,_0x3fef3b=await hasUnsyncedLocalChanges(_0x22d0bd[_0x2d16a0(0x182)],_0x4fa314,_0x290eb4);_0x266fa7[_0x2d16a0(0x14e)]({'lockKey':_0x22d0bd['lockKey'],'filePath':_0x22d0bd[_0x2d16a0(0x182)],'remoteId':_0x541e4f['id']??null,'status':_0x3fef3b?_0x2d16a0(0x18c):_0x2d16a0(0x16e)});}return{'method':_0x2d16a0(0x193),'url':_0x2d16a0(0x16a)+_0x360f81[_0x2d16a0(0x164)]+(_0x590dcc?_0x2d16a0(0x15d)+_0x590dcc:''),'body':{'appCode':_0x360f81[_0x2d16a0(0x164)],'filterType':_0x590dcc??null,'files':_0x266fa7},'description':_0x2d16a0(0x183)+_0x266fa7[_0x2d16a0(0x167)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x52b870){const _0x4d551a=a31_0xe37ac4,_0x459df4=loadBffProjectConfig(_0x52b870[_0x4d551a(0x164)]),_0x230127=await readBffLockFile(_0x459df4[_0x4d551a(0x15e)]),{lockData:_0x2be58a,appLock:_0x1d74f7}=ensureLockScope(_0x230127??createEmptyBffLock(),_0x52b870[_0x4d551a(0x164)],_0x459df4[_0x4d551a(0x154)],_0x4d551a(0x159)),_0x505ae9=normalizeBffType(_0x52b870['str'](_0x4d551a(0x156)))??undefined;if(_0x52b870['str'](_0x4d551a(0x156))&&!_0x505ae9)throw CliErrors[_0x4d551a(0x196)](_0x4d551a(0x185));const [_0x473ee1,_0x5162ce]=await Promise[_0x4d551a(0x161)]([listBffScripts(_0x52b870[_0x4d551a(0x164)],_0x505ae9),getBffScriptStatistics(_0x52b870[_0x4d551a(0x164)])]);if(_0x473ee1[_0x4d551a(0x167)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4d551a(0x195)};const _0x8b5085=_0x52b870['bool'](_0x4d551a(0x152));if(_0x8b5085&&!_0x52b870['nonInteractive']){const _0x2bcf2b=await confirmForce();if(!_0x2bcf2b)throw CliErrors[_0x4d551a(0x189)](_0x4d551a(0x153));}if(_0x8b5085&&_0x52b870[_0x4d551a(0x17e)]){}const _0x2e7849=buildDatasetCodeToAliasMap(_0x52b870[_0x4d551a(0x188)],_0x52b870[_0x4d551a(0x164)]),_0x240534=createHookLocationMap(_0x5162ce),_0x18f9ea=JSON[_0x4d551a(0x166)](JSON[_0x4d551a(0x14f)](_0x2be58a)),_0x23ccd4=_0x52b870[_0x4d551a(0x164)],_0x166491=_0x18f9ea[_0x4d551a(0x173)][_0x23ccd4];if(!_0x166491)throw new Error(_0x4d551a(0x15a)+_0x23ccd4+_0x4d551a(0x190));const _0x19f63f=[],_0xb62d1=[],_0x2d5e9c=[];for(const _0x5958e9 of _0x473ee1){const _0x47a7e4=resolveRemoteScriptTarget(_0x459df4,_0x5958e9,_0x240534,_0x1d74f7[_0x4d551a(0x158)],_0x2e7849);if(!_0x47a7e4){_0xb62d1[_0x4d551a(0x14e)]({'lockKey':_0x5958e9[_0x4d551a(0x16d)]+'/'+_0x5958e9['functionName'],'reason':_0x4d551a(0x16f)});continue;}const _0x566f4d=_0x1d74f7[_0x4d551a(0x158)][_0x47a7e4[_0x4d551a(0x17a)]];try{if(!_0x5958e9['id'])throw new Error(_0x4d551a(0x160));if(_0x5958e9[_0x4d551a(0x197)]==null)throw new Error(_0x4d551a(0x165));const _0x5f16cf=_0x5958e9[_0x4d551a(0x197)],_0x55d091=computeContentHash(_0x5f16cf);if(!_0x8b5085){const _0x4ee05a=await hasUnsyncedLocalChanges(_0x47a7e4[_0x4d551a(0x182)],_0x566f4d,_0x55d091);if(_0x4ee05a){_0xb62d1[_0x4d551a(0x14e)]({'lockKey':_0x47a7e4[_0x4d551a(0x17a)],'reason':_0x4d551a(0x198)});continue;}}await ensureParentDirectory(_0x47a7e4[_0x4d551a(0x182)]),await writeFile(_0x47a7e4[_0x4d551a(0x182)],_0x5f16cf,_0x4d551a(0x18a));const _0x5c0b60={'hash':_0x55d091,'remoteId':_0x5958e9['id'],'version':_0x5958e9[_0x4d551a(0x155)]};_0x47a7e4[_0x4d551a(0x156)]===_0x4d551a(0x172)&&_0x47a7e4['hookLocation']&&(_0x5c0b60['alias']=_0x47a7e4[_0x4d551a(0x186)][_0x4d551a(0x15b)],_0x5c0b60[_0x4d551a(0x17c)]=_0x47a7e4['hookLocation']['datasetCode'],_0x5c0b60[_0x4d551a(0x169)]=_0x47a7e4[_0x4d551a(0x186)][_0x4d551a(0x169)],_0x5c0b60[_0x4d551a(0x157)]=_0x47a7e4[_0x4d551a(0x186)][_0x4d551a(0x157)]),_0x166491[_0x4d551a(0x158)][_0x47a7e4[_0x4d551a(0x17a)]]=_0x5c0b60,_0x19f63f['push']({'lockKey':_0x47a7e4['lockKey'],'remoteId':_0x5958e9['id']});}catch(_0x1efbba){_0x2d5e9c['push']({'lockKey':_0x47a7e4['lockKey'],'error':_0x1efbba instanceof Error?_0x1efbba[_0x4d551a(0x17d)]:String(_0x1efbba)});}}return _0x166491['lastSync']=new Date()[_0x4d551a(0x177)](),await writeBffLockFile(_0x459df4[_0x4d551a(0x15e)],_0x18f9ea),{'ok':_0x2d5e9c[_0x4d551a(0x167)]===0x0,'data':{'pulled':_0x19f63f,'skipped':_0xb62d1,'failed':_0x2d5e9c},'message':_0x4d551a(0x184)+_0x19f63f[_0x4d551a(0x167)]+_0x4d551a(0x18f)+_0xb62d1[_0x4d551a(0x167)]+'\x20skipped,\x20'+_0x2d5e9c[_0x4d551a(0x167)]+_0x4d551a(0x18e)};}};async function hasUnsyncedLocalChanges(_0x1cbb45,_0x3c3781,_0x541eee){const _0x1c36f1=a31_0xe37ac4;if(!await fileExists(_0x1cbb45))return![];const _0x2b11e3=await computeFileHash(_0x1cbb45);if(!_0x3c3781)return _0x541eee?_0x2b11e3!==_0x541eee:!![];return _0x2b11e3!==_0x3c3781[_0x1c36f1(0x179)];}function buildDatasetCodeToAliasMap(_0x73f2,_0x1fd947){const _0x4a28e2=a31_0xe37ac4,_0x3554df=loadAliasMap(_0x73f2,undefined,resolveApiFilePath(_0x73f2,_0x1fd947));return new Map(_0x3554df[_0x4a28e2(0x17f)](_0x269394=>[_0x269394[_0x4a28e2(0x17c)],_0x269394['alias']]));}function a31_0x9522(){const _0x51be18=['bff','Remote\x20script\x20missing\x20id.','all','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','536ZBcsip','appCode','Remote\x20script\x20missing\x20content.','parse','length','toLowerCase','operationType','/api/management/library/scripts/list?appCode=','945273TtPELj','includes','scriptType','would_pull','unresolvable\x20target\x20path','334790gVUamB','stdin','HOOK','apps','5ahGCeQ','stderr','question','toISOString','1439058FqUWxu','hash','lockKey','COMMON','datasetCode','message','nonInteractive','map','Pull\x20only\x20this\x20script\x20type','4070236ojRFgR','filePath','Would\x20inspect\x20','Pull\x20complete:\x20','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','hookLocation','11269810NQzpvh','apiDir','cancelled','utf8','write','conflict','ENDPOINT','\x20failed','\x20pulled,\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','2IBMUwJ','string','GET','skipped','No\x20remote\x20BFF\x20scripts\x20found.','validation','scriptContent','local\x20unsynced\x20changes','str','push','stringify','124263xeLIma','93864JxdonS','force','Force\x20pull\x20cancelled.','scriptsRoot','version','type','functionNode','functions','pull','Lock\x20scope\x20for\x20app\x20\x22','alias','boolean','&type=','lockFilePath'];a31_0x9522=function(){return _0x51be18;};return a31_0x9522();}async function confirmForce(){const _0x3a57d7=a31_0xe37ac4,_0x351e70=createInterface({'input':process[_0x3a57d7(0x171)],'output':process[_0x3a57d7(0x175)]}),_0x3bb745=await new Promise(_0x7c2dad=>{const _0x56b65e=_0x3a57d7;_0x351e70[_0x56b65e(0x176)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x7c2dad);});return _0x351e70['close'](),['y','yes'][_0x3a57d7(0x16c)](_0x3bb745['trim']()[_0x3a57d7(0x168)]());}
@@ -1 +1 @@
1
- const a32_0x365b4d=a32_0x5f59;(function(_0x2a09ed,_0x47138a){const _0x3628b7=a32_0x5f59,_0x52e5b2=_0x2a09ed();while(!![]){try{const _0x5018d4=-parseInt(_0x3628b7(0x9b))/0x1*(parseInt(_0x3628b7(0x82))/0x2)+-parseInt(_0x3628b7(0x8c))/0x3+-parseInt(_0x3628b7(0x81))/0x4+parseInt(_0x3628b7(0xa2))/0x5+-parseInt(_0x3628b7(0x83))/0x6+-parseInt(_0x3628b7(0xad))/0x7*(parseInt(_0x3628b7(0xb7))/0x8)+parseInt(_0x3628b7(0x75))/0x9*(parseInt(_0x3628b7(0xa4))/0xa);if(_0x5018d4===_0x47138a)break;else _0x52e5b2['push'](_0x52e5b2['shift']());}catch(_0x50f957){_0x52e5b2['push'](_0x52e5b2['shift']());}}}(a32_0x1591,0x1ea3f));import{readFile}from'node:fs/promises';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';function a32_0x1591(){const _0x2c4a09=['datasetCode','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','validation','datasetCodeToId','type','Cannot\x20resolve\x20dataset\x20for\x20\x22','9667gfyxIo','remoteId','POST','set','string','description','aliasToDatasetCode','Local\x20function\x20not\x20found:\x20','lastSync','functionNode','1128yvECZY','bff','datasetId','alias','operationType','6675507ZQDSLs','apiDir','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','has','Run\x20`','lockKey','map','bool','values','script','some','ENDPOINT','437260rLzDEH','3106MMSjBz','179058XpRoKV','name','message','code','update','Would\x20inspect\x20','would_push','create','get','481977wFjDmz','\x20failed','\x22.\x20','appCode','Push\x20complete:\x20','Incomplete\x20HOOK\x20path:\x20','push','\x20uploaded,\x20','/api/management/library/scripts/save','lockFilePath','functions','toISOString','version','No\x20local\x20BFF\x20functions\x20found.','filePath','103NrisRN','force','\x20skipped,\x20','hash','filter','scriptsRoot','unchanged','191385pnQqno','length','10ZFTRjp','HOOK','high-risk-write'];a32_0x1591=function(){return _0x2c4a09;};return a32_0x1591();}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a32_0x5f59(_0x19f88f,_0x5d025f){_0x19f88f=_0x19f88f-0x74;const _0x159179=a32_0x1591();let _0x5f591c=_0x159179[_0x19f88f];return _0x5f591c;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a32_0x365b4d(0xb8),'command':'push','description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a32_0x365b4d(0xa6),'flags':[{'name':a32_0x365b4d(0xab),'type':a32_0x365b4d(0xb1),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a32_0x365b4d(0x80),a32_0x365b4d(0xa5)]},{'name':'name','type':a32_0x365b4d(0xb1),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a32_0x365b4d(0x9c),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x50e052){const _0x5d6da8=a32_0x365b4d,_0x46aa96=loadBffProjectConfig(_0x50e052[_0x5d6da8(0x8f)]),_0x446cb6=await readBffLockFile(_0x46aa96[_0x5d6da8(0x95)]),{appLock:_0x3116c6}=ensureLockScope(_0x446cb6??createEmptyBffLock(),_0x50e052[_0x5d6da8(0x8f)],_0x46aa96[_0x5d6da8(0xa0)],_0x5d6da8(0x92)),_0xe7f0b8=await getTargetFunctions(_0x46aa96,_0x50e052),_0x1a618c=_0x50e052['bool']('force'),_0x31215a=[];for(const _0x6b644d of _0xe7f0b8){const _0xbc7237=await computeFileHash(_0x6b644d[_0x5d6da8(0x9a)]),_0x15c3e2=_0x3116c6[_0x5d6da8(0x96)][_0x6b644d['lockKey']],_0x554338=!!_0x15c3e2&&_0x15c3e2[_0x5d6da8(0x9e)]===_0xbc7237;_0x31215a['push']({'lockKey':_0x6b644d[_0x5d6da8(0x7a)],'filePath':_0x6b644d[_0x5d6da8(0x9a)],'remoteId':_0x15c3e2?.[_0x5d6da8(0xae)]??null,'mode':_0x15c3e2?.[_0x5d6da8(0xae)]?_0x5d6da8(0x87):_0x5d6da8(0x8a),'status':!_0x1a618c&&_0x554338?_0x5d6da8(0xa1):_0x5d6da8(0x89)});}return{'method':_0x5d6da8(0xaf),'url':_0x5d6da8(0x94),'body':{'appCode':_0x50e052[_0x5d6da8(0x8f)],'force':_0x1a618c,'files':_0x31215a},'description':_0x5d6da8(0x88)+_0x31215a[_0x5d6da8(0xa3)]+'\x20local\x20BFF\x20script(s)\x20for\x20push'};},async 'execute'(_0x4d3b61){const _0x54ef6c=a32_0x365b4d,_0x4c805c=loadBffProjectConfig(_0x4d3b61[_0x54ef6c(0x8f)]),_0x47d472=await readBffLockFile(_0x4c805c[_0x54ef6c(0x95)]),{lockData:_0x38112a,appLock:_0x42ad36}=ensureLockScope(_0x47d472??createEmptyBffLock(),_0x4d3b61[_0x54ef6c(0x8f)],_0x4c805c['scriptsRoot'],_0x54ef6c(0x92)),_0xd6c88b=await getTargetFunctions(_0x4c805c,_0x4d3b61);if(_0xd6c88b['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x54ef6c(0x99)};const _0x276025=_0x4d3b61[_0x54ef6c(0x7c)](_0x54ef6c(0x9c)),_0x3cc557=await buildHookMaps(_0x4d3b61[_0x54ef6c(0x8f)],_0x4d3b61[_0x54ef6c(0x76)],_0xd6c88b,_0x42ad36),_0x292c1f=[],_0x24f06b=[],_0x4bd4f1=[];for(const _0x505508 of _0xd6c88b){const _0x552f76=await computeFileHash(_0x505508['filePath']),_0x202177=_0x42ad36['functions'][_0x505508[_0x54ef6c(0x7a)]];if(!_0x276025&&_0x202177&&_0x202177[_0x54ef6c(0x9e)]===_0x552f76){_0x24f06b[_0x54ef6c(0x92)]({'lockKey':_0x505508['lockKey'],'reason':_0x54ef6c(0xa1)});continue;}try{await uploadSingleFunction(_0x4d3b61['appCode'],_0x505508,_0x42ad36,_0x3cc557);const _0x17b149=_0x42ad36[_0x54ef6c(0x96)][_0x505508[_0x54ef6c(0x7a)]];_0x292c1f[_0x54ef6c(0x92)]({'lockKey':_0x505508[_0x54ef6c(0x7a)],'remoteId':_0x17b149?.[_0x54ef6c(0xae)]??0x0});}catch(_0x238cbd){_0x4bd4f1[_0x54ef6c(0x92)]({'lockKey':_0x505508['lockKey'],'error':_0x238cbd instanceof Error?_0x238cbd[_0x54ef6c(0x85)]:String(_0x238cbd)});}}return _0x42ad36[_0x54ef6c(0xb5)]=new Date()[_0x54ef6c(0x97)](),await writeBffLockFile(_0x4c805c[_0x54ef6c(0x95)],_0x38112a),{'ok':_0x4bd4f1[_0x54ef6c(0xa3)]===0x0,'data':{'uploaded':_0x292c1f,'skipped':_0x24f06b,'failed':_0x4bd4f1},'message':_0x54ef6c(0x90)+_0x292c1f['length']+_0x54ef6c(0x93)+_0x24f06b[_0x54ef6c(0xa3)]+_0x54ef6c(0x9d)+_0x4bd4f1['length']+_0x54ef6c(0x8d)};}};async function getTargetFunctions(_0x3442d7,_0x3a7768){const _0x575d5b=a32_0x365b4d,_0x31d664=_0x3a7768['str'](_0x575d5b(0xab)),_0x50291b=_0x3a7768['str'](_0x575d5b(0x84)),_0x584f42=normalizeBffType(_0x31d664)??undefined;if(_0x50291b&&!_0x584f42)throw CliErrors[_0x575d5b(0xa9)](_0x575d5b(0x77));const _0x5ec8d7=await scanLocalBffFunctions(_0x3442d7,_0x584f42);if(_0x50291b){const _0x4e72d=_0x5ec8d7[_0x575d5b(0x9f)](_0xae4ee=>_0xae4ee[_0x575d5b(0x84)]===_0x50291b);if(_0x4e72d[_0x575d5b(0xa3)]===0x0)throw CliErrors[_0x575d5b(0xa9)](_0x575d5b(0xb4)+_0x584f42+'/'+_0x50291b);return _0x4e72d;}return _0x5ec8d7;}async function buildHookMaps(_0x5b4d00,_0x100e26,_0x348724,_0x972808){const _0x1a97f6=a32_0x365b4d,_0x36ec5f=_0x348724[_0x1a97f6(0x7f)](_0x2c2920=>_0x2c2920[_0x1a97f6(0xab)]===_0x1a97f6(0xa5));if(!_0x36ec5f)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0xefaf8d=loadAliasMap(_0x100e26,undefined,resolveApiFilePath(_0x100e26,_0x5b4d00)),_0x4cfe46=new Map(_0xefaf8d[_0x1a97f6(0x7b)](_0x21a977=>[_0x21a977[_0x1a97f6(0xba)],_0x21a977[_0x1a97f6(0xa7)]]));for(const _0x1e3876 of Object[_0x1a97f6(0x7d)](_0x972808[_0x1a97f6(0x96)])){_0x1e3876[_0x1a97f6(0xba)]&&_0x1e3876['datasetCode']&&!_0x4cfe46[_0x1a97f6(0x78)](_0x1e3876['alias'])&&_0x4cfe46[_0x1a97f6(0xb0)](_0x1e3876['alias'],_0x1e3876[_0x1a97f6(0xa7)]);}const _0xf4fe03=await listDatasets(_0x5b4d00),_0x527335=new Map(_0xf4fe03[_0x1a97f6(0x7b)](_0xb5aed6=>[_0xb5aed6[_0x1a97f6(0x86)],_0xb5aed6['id']]));return{'aliasToDatasetCode':_0x4cfe46,'datasetCodeToId':_0x527335};}async function uploadSingleFunction(_0x21a398,_0x1fae8c,_0x5b2746,_0x429684){const _0x3c7179=a32_0x365b4d,_0x1f0a80=await readFile(_0x1fae8c['filePath'],'utf8'),_0x580d59=await computeFileHash(_0x1fae8c[_0x3c7179(0x9a)]),_0x5a0700=_0x5b2746[_0x3c7179(0x96)][_0x1fae8c[_0x3c7179(0x7a)]];if(_0x5a0700?.['remoteId']&&_0x5a0700[_0x3c7179(0x98)]==null)throw CliErrors['validation'](_0x1fae8c[_0x3c7179(0x7a)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x41c7a2=extractScriptDescription(_0x1f0a80);if(!_0x41c7a2&&_0x5a0700?.[_0x3c7179(0xae)]){const _0x5b6afa=await getBffScriptInfo(_0x5a0700['remoteId']);_0x41c7a2=_0x5b6afa[_0x3c7179(0xb2)]||undefined;}const _0x360b57={'appCode':_0x21a398,'functionName':_0x1fae8c[_0x3c7179(0x84)],'scriptType':_0x1fae8c['type'],'scriptContent':_0x1f0a80};if(_0x5a0700?.['remoteId'])_0x360b57['id']=_0x5a0700['remoteId'];if(_0x5a0700?.['version']!=null)_0x360b57[_0x3c7179(0x98)]=_0x5a0700[_0x3c7179(0x98)];if(_0x41c7a2)_0x360b57[_0x3c7179(0xb2)]=_0x41c7a2;if(_0x1fae8c[_0x3c7179(0xab)]===_0x3c7179(0xa5)){const _0x27ea63=_0x1fae8c['alias'];if(!_0x27ea63||!_0x1fae8c['operationType']||!_0x1fae8c[_0x3c7179(0xb6)])throw CliErrors[_0x3c7179(0xa9)](_0x3c7179(0x91)+_0x1fae8c[_0x3c7179(0x7a)]);const _0xa296ff=_0x429684['aliasToDatasetCode'][_0x3c7179(0x8b)](_0x27ea63)??_0x5a0700?.[_0x3c7179(0xa7)]??_0x27ea63,_0x24c611=_0x429684[_0x3c7179(0xaa)][_0x3c7179(0x8b)](_0xa296ff);if(!_0x24c611)throw CliErrors['validation'](_0x3c7179(0xac)+_0x27ea63+_0x3c7179(0x8e)+(_0x3c7179(0x79)+CLI_BIN_NAME+_0x3c7179(0xa8)));_0x360b57[_0x3c7179(0xb9)]=_0x24c611,_0x360b57['operationType']=_0x1fae8c[_0x3c7179(0x74)],_0x360b57[_0x3c7179(0xb6)]=_0x1fae8c[_0x3c7179(0xb6)];}const _0x1f0139=await saveBffScript(_0x360b57),_0x4952fa=_0x1f0139['id'],_0x4f8549=_0x1f0139[_0x3c7179(0x7e)]??await getBffScriptInfo(_0x4952fa),_0x38588f={'hash':_0x580d59,'remoteId':_0x4952fa,'version':_0x4f8549[_0x3c7179(0x98)]};if(_0x1fae8c[_0x3c7179(0xab)]===_0x3c7179(0xa5)){const _0x382e8a=_0x1fae8c[_0x3c7179(0xba)],_0x4f040d=_0x429684[_0x3c7179(0xb3)][_0x3c7179(0x8b)](_0x382e8a)??_0x5a0700?.[_0x3c7179(0xa7)]??_0x382e8a;_0x429684[_0x3c7179(0xb3)]['has'](_0x382e8a)?_0x38588f[_0x3c7179(0xba)]=_0x382e8a:_0x38588f[_0x3c7179(0xba)]=_0x5a0700?.['alias'],_0x38588f['datasetCode']=_0x4f040d,_0x38588f[_0x3c7179(0x74)]=_0x1fae8c[_0x3c7179(0x74)],_0x38588f[_0x3c7179(0xb6)]=_0x1fae8c[_0x3c7179(0xb6)];}_0x5b2746['functions'][_0x1fae8c[_0x3c7179(0x7a)]]=_0x38588f;}
1
+ const a32_0x108264=a32_0x30e1;function a32_0x30e1(_0x4faa4f,_0x2d9b1b){_0x4faa4f=_0x4faa4f-0xb8;const _0x34f82d=a32_0x34f8();let _0x30e15a=_0x34f82d[_0x4faa4f];return _0x30e15a;}(function(_0x3e8636,_0x33d1d0){const _0x3c6d5e=a32_0x30e1,_0x546cc1=_0x3e8636();while(!![]){try{const _0x3ca0c7=parseInt(_0x3c6d5e(0xf8))/0x1+parseInt(_0x3c6d5e(0xf5))/0x2*(parseInt(_0x3c6d5e(0xcb))/0x3)+-parseInt(_0x3c6d5e(0xf7))/0x4+-parseInt(_0x3c6d5e(0xec))/0x5*(-parseInt(_0x3c6d5e(0xf6))/0x6)+parseInt(_0x3c6d5e(0xcf))/0x7*(-parseInt(_0x3c6d5e(0xed))/0x8)+-parseInt(_0x3c6d5e(0xe8))/0x9+parseInt(_0x3c6d5e(0xca))/0xa*(parseInt(_0x3c6d5e(0xd3))/0xb);if(_0x3ca0c7===_0x33d1d0)break;else _0x546cc1['push'](_0x546cc1['shift']());}catch(_0x2142ac){_0x546cc1['push'](_0x546cc1['shift']());}}}(a32_0x34f8,0xededc));import{readFile}from'node:fs/promises';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';function a32_0x34f8(){const _0x14c0ff=['352DWPixX','\x22.\x20','POST','str','code','\x20skipped,\x20','\x20failed','functionNode','HOOK','name','appCode','filter','push','get','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','unchanged','apiDir','toISOString','hash','map','Local\x20function\x20not\x20found:\x20','11165247jCUiPw','create','lockFilePath','Force\x20push\x20ignoring\x20hash\x20protection','2219655fMXAsT','230720IxgzJS','Push\x20complete:\x20','description','scriptsRoot','datasetCode','length','update','aliasToDatasetCode','46896eUbCrG','6fWJfZb','5694440wlUeWj','1869418YnAHqO','lockKey','string','bool','force','Push\x20only\x20this\x20script\x20type','script','bff','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','would_push','functions','ENDPOINT','Run\x20`','Incomplete\x20HOOK\x20path:\x20','set','alias','values','high-risk-write','operationType','utf8','datasetCodeToId','remoteId','COMMON','Would\x20inspect\x20','version','866420QSFwPL','51eUgfXh','validation','/api/management/library/scripts/save','type','448wvUfrG','message','filePath','has'];a32_0x34f8=function(){return _0x14c0ff;};return a32_0x34f8();}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a32_0x108264(0xb8),'command':a32_0x108264(0xdf),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a32_0x108264(0xc2),'flags':[{'name':'type','type':a32_0x108264(0xfa),'description':a32_0x108264(0xfd),'enum':[a32_0x108264(0xc7),a32_0x108264(0xbc),'HOOK']},{'name':a32_0x108264(0xdc),'type':'string','description':a32_0x108264(0xe1)},{'name':a32_0x108264(0xfc),'type':'boolean','description':a32_0x108264(0xeb)}],async 'dryRun'(_0x50cc50){const _0x559315=a32_0x108264,_0x4d9c19=loadBffProjectConfig(_0x50cc50[_0x559315(0xdd)]),_0x31c65f=await readBffLockFile(_0x4d9c19[_0x559315(0xea)]),{appLock:_0x4be7bb}=ensureLockScope(_0x31c65f??createEmptyBffLock(),_0x50cc50[_0x559315(0xdd)],_0x4d9c19[_0x559315(0xf0)],'push'),_0x48c63c=await getTargetFunctions(_0x4d9c19,_0x50cc50),_0x26d36c=_0x50cc50[_0x559315(0xfb)]('force'),_0x5ef37f=[];for(const _0x298f23 of _0x48c63c){const _0xb47be7=await computeFileHash(_0x298f23['filePath']),_0x433509=_0x4be7bb['functions'][_0x298f23[_0x559315(0xf9)]],_0x2ba050=!!_0x433509&&_0x433509[_0x559315(0xe5)]===_0xb47be7;_0x5ef37f['push']({'lockKey':_0x298f23[_0x559315(0xf9)],'filePath':_0x298f23[_0x559315(0xd1)],'remoteId':_0x433509?.[_0x559315(0xc6)]??null,'mode':_0x433509?.['remoteId']?_0x559315(0xf3):_0x559315(0xe9),'status':!_0x26d36c&&_0x2ba050?'unchanged':_0x559315(0xba)});}return{'method':_0x559315(0xd5),'url':_0x559315(0xcd),'body':{'appCode':_0x50cc50['appCode'],'force':_0x26d36c,'files':_0x5ef37f},'description':_0x559315(0xc8)+_0x5ef37f[_0x559315(0xf2)]+'\x20local\x20BFF\x20script(s)\x20for\x20push'};},async 'execute'(_0x2b367a){const _0x294645=a32_0x108264,_0x7225c=loadBffProjectConfig(_0x2b367a[_0x294645(0xdd)]),_0x32bb0c=await readBffLockFile(_0x7225c[_0x294645(0xea)]),{lockData:_0xe50a25,appLock:_0x6e0030}=ensureLockScope(_0x32bb0c??createEmptyBffLock(),_0x2b367a['appCode'],_0x7225c[_0x294645(0xf0)],_0x294645(0xdf)),_0x6a132b=await getTargetFunctions(_0x7225c,_0x2b367a);if(_0x6a132b[_0x294645(0xf2)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x1622ab=_0x2b367a['bool'](_0x294645(0xfc)),_0x1897f0=await buildHookMaps(_0x2b367a[_0x294645(0xdd)],_0x2b367a[_0x294645(0xe3)],_0x6a132b,_0x6e0030),_0x162b20=[],_0x1d3219=[],_0x1f2f7a=[];for(const _0x49fb75 of _0x6a132b){const _0x198f1e=await computeFileHash(_0x49fb75[_0x294645(0xd1)]),_0xa9dcf9=_0x6e0030['functions'][_0x49fb75[_0x294645(0xf9)]];if(!_0x1622ab&&_0xa9dcf9&&_0xa9dcf9[_0x294645(0xe5)]===_0x198f1e){_0x1d3219[_0x294645(0xdf)]({'lockKey':_0x49fb75[_0x294645(0xf9)],'reason':_0x294645(0xe2)});continue;}try{await uploadSingleFunction(_0x2b367a[_0x294645(0xdd)],_0x49fb75,_0x6e0030,_0x1897f0);const _0x108a25=_0x6e0030['functions'][_0x49fb75[_0x294645(0xf9)]];_0x162b20[_0x294645(0xdf)]({'lockKey':_0x49fb75[_0x294645(0xf9)],'remoteId':_0x108a25?.[_0x294645(0xc6)]??0x0});}catch(_0x1e7fbe){_0x1f2f7a[_0x294645(0xdf)]({'lockKey':_0x49fb75[_0x294645(0xf9)],'error':_0x1e7fbe instanceof Error?_0x1e7fbe[_0x294645(0xd0)]:String(_0x1e7fbe)});}}return _0x6e0030['lastSync']=new Date()[_0x294645(0xe4)](),await writeBffLockFile(_0x7225c[_0x294645(0xea)],_0xe50a25),{'ok':_0x1f2f7a[_0x294645(0xf2)]===0x0,'data':{'uploaded':_0x162b20,'skipped':_0x1d3219,'failed':_0x1f2f7a},'message':_0x294645(0xee)+_0x162b20[_0x294645(0xf2)]+'\x20uploaded,\x20'+_0x1d3219[_0x294645(0xf2)]+_0x294645(0xd8)+_0x1f2f7a[_0x294645(0xf2)]+_0x294645(0xd9)};}};async function getTargetFunctions(_0x1da9a5,_0x3b2b2d){const _0x15c690=a32_0x108264,_0x28f352=_0x3b2b2d[_0x15c690(0xd6)](_0x15c690(0xce)),_0x11ce91=_0x3b2b2d[_0x15c690(0xd6)]('name'),_0x89a854=normalizeBffType(_0x28f352)??undefined;if(_0x11ce91&&!_0x89a854)throw CliErrors[_0x15c690(0xcc)](_0x15c690(0xb9));const _0x32ec94=await scanLocalBffFunctions(_0x1da9a5,_0x89a854);if(_0x11ce91){const _0x5dd18b=_0x32ec94[_0x15c690(0xde)](_0x19ebcd=>_0x19ebcd['name']===_0x11ce91);if(_0x5dd18b[_0x15c690(0xf2)]===0x0)throw CliErrors[_0x15c690(0xcc)](_0x15c690(0xe7)+_0x89a854+'/'+_0x11ce91);return _0x5dd18b;}return _0x32ec94;}async function buildHookMaps(_0x55271e,_0x581e74,_0x9d1858,_0x589f07){const _0x5e9644=a32_0x108264,_0x462c76=_0x9d1858['some'](_0x5ce6e4=>_0x5ce6e4['type']===_0x5e9644(0xdb));if(!_0x462c76)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x3f4ea1=loadAliasMap(_0x581e74,undefined,resolveApiFilePath(_0x581e74,_0x55271e)),_0x5ae4bb=new Map(_0x3f4ea1[_0x5e9644(0xe6)](_0x7605d4=>[_0x7605d4[_0x5e9644(0xc0)],_0x7605d4[_0x5e9644(0xf1)]]));for(const _0x2f822a of Object[_0x5e9644(0xc1)](_0x589f07[_0x5e9644(0xbb)])){_0x2f822a[_0x5e9644(0xc0)]&&_0x2f822a[_0x5e9644(0xf1)]&&!_0x5ae4bb['has'](_0x2f822a['alias'])&&_0x5ae4bb[_0x5e9644(0xbf)](_0x2f822a[_0x5e9644(0xc0)],_0x2f822a[_0x5e9644(0xf1)]);}const _0x22532f=await listDatasets(_0x55271e),_0x41903d=new Map(_0x22532f[_0x5e9644(0xe6)](_0x3b4f77=>[_0x3b4f77[_0x5e9644(0xd7)],_0x3b4f77['id']]));return{'aliasToDatasetCode':_0x5ae4bb,'datasetCodeToId':_0x41903d};}async function uploadSingleFunction(_0x2735c4,_0x438b7d,_0x5427c3,_0x4514f4){const _0x5b472c=a32_0x108264,_0x100d59=await readFile(_0x438b7d['filePath'],_0x5b472c(0xc4)),_0x141a02=await computeFileHash(_0x438b7d[_0x5b472c(0xd1)]),_0x34e7fb=_0x5427c3['functions'][_0x438b7d[_0x5b472c(0xf9)]];if(_0x34e7fb?.['remoteId']&&_0x34e7fb[_0x5b472c(0xc9)]==null)throw CliErrors[_0x5b472c(0xcc)](_0x438b7d[_0x5b472c(0xf9)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x44941a=extractScriptDescription(_0x100d59);if(!_0x44941a&&_0x34e7fb?.['remoteId']){const _0x5dce5f=await getBffScriptInfo(_0x34e7fb[_0x5b472c(0xc6)]);_0x44941a=_0x5dce5f[_0x5b472c(0xef)]||undefined;}const _0x126ccb={'appCode':_0x2735c4,'functionName':_0x438b7d[_0x5b472c(0xdc)],'scriptType':_0x438b7d[_0x5b472c(0xce)],'scriptContent':_0x100d59};if(_0x34e7fb?.['remoteId'])_0x126ccb['id']=_0x34e7fb[_0x5b472c(0xc6)];if(_0x34e7fb?.[_0x5b472c(0xc9)]!=null)_0x126ccb[_0x5b472c(0xc9)]=_0x34e7fb[_0x5b472c(0xc9)];if(_0x44941a)_0x126ccb[_0x5b472c(0xef)]=_0x44941a;if(_0x438b7d['type']===_0x5b472c(0xdb)){const _0x32aa8d=_0x438b7d['alias'];if(!_0x32aa8d||!_0x438b7d[_0x5b472c(0xc3)]||!_0x438b7d['functionNode'])throw CliErrors[_0x5b472c(0xcc)](_0x5b472c(0xbe)+_0x438b7d['lockKey']);const _0x2f4473=_0x4514f4['aliasToDatasetCode']['get'](_0x32aa8d)??_0x34e7fb?.[_0x5b472c(0xf1)]??_0x32aa8d,_0x545d30=_0x4514f4[_0x5b472c(0xc5)][_0x5b472c(0xe0)](_0x2f4473);if(!_0x545d30)throw CliErrors[_0x5b472c(0xcc)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x32aa8d+_0x5b472c(0xd4)+(_0x5b472c(0xbd)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x126ccb['datasetId']=_0x545d30,_0x126ccb[_0x5b472c(0xc3)]=_0x438b7d[_0x5b472c(0xc3)],_0x126ccb[_0x5b472c(0xda)]=_0x438b7d[_0x5b472c(0xda)];}const _0x4e92ac=await saveBffScript(_0x126ccb),_0x2f2a24=_0x4e92ac['id'],_0x2363a8=_0x4e92ac[_0x5b472c(0xfe)]??await getBffScriptInfo(_0x2f2a24),_0x22c82d={'hash':_0x141a02,'remoteId':_0x2f2a24,'version':_0x2363a8[_0x5b472c(0xc9)]};if(_0x438b7d['type']===_0x5b472c(0xdb)){const _0xca2962=_0x438b7d[_0x5b472c(0xc0)],_0x29c9cf=_0x4514f4[_0x5b472c(0xf4)][_0x5b472c(0xe0)](_0xca2962)??_0x34e7fb?.[_0x5b472c(0xf1)]??_0xca2962;_0x4514f4[_0x5b472c(0xf4)][_0x5b472c(0xd2)](_0xca2962)?_0x22c82d[_0x5b472c(0xc0)]=_0xca2962:_0x22c82d[_0x5b472c(0xc0)]=_0x34e7fb?.['alias'],_0x22c82d[_0x5b472c(0xf1)]=_0x29c9cf,_0x22c82d[_0x5b472c(0xc3)]=_0x438b7d[_0x5b472c(0xc3)],_0x22c82d[_0x5b472c(0xda)]=_0x438b7d[_0x5b472c(0xda)];}_0x5427c3['functions'][_0x438b7d[_0x5b472c(0xf9)]]=_0x22c82d;}