@lovrabet/rabetbase-cli 2.1.4 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) 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/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/page/generate-start.js +1 -1
  81. package/lib/commands/page/generate-status.js +1 -1
  82. package/lib/commands/page/index.js +1 -1
  83. package/lib/commands/page/pull.js +1 -1
  84. package/lib/commands/page/push.js +1 -1
  85. package/lib/commands/page/shared.js +1 -1
  86. package/lib/commands/page/standard-page-status.js +1 -1
  87. package/lib/commands/page/sync.js +1 -1
  88. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  89. package/lib/commands/project/create/format-elapsed.js +1 -1
  90. package/lib/commands/project/create/main.js +1 -1
  91. package/lib/commands/project/create/non-interactive.js +1 -1
  92. package/lib/commands/project/create/project-template-path.js +1 -1
  93. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  94. package/lib/commands/project/create/use-format-code.js +1 -1
  95. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  96. package/lib/commands/project/index.js +1 -1
  97. package/lib/commands/project/init.js +1 -1
  98. package/lib/commands/project/upgrade.js +1 -1
  99. package/lib/commands/registry.js +1 -1
  100. package/lib/commands/run/index.js +1 -1
  101. package/lib/commands/schema.js +1 -1
  102. package/lib/commands/skill/index.js +1 -1
  103. package/lib/commands/sql/create.js +1 -1
  104. package/lib/commands/sql/delete.js +1 -1
  105. package/lib/commands/sql/detail.js +1 -1
  106. package/lib/commands/sql/exec.js +1 -1
  107. package/lib/commands/sql/index.js +1 -1
  108. package/lib/commands/sql/list.js +1 -1
  109. package/lib/commands/sql/pull.js +1 -1
  110. package/lib/commands/sql/push.js +1 -1
  111. package/lib/commands/sql/save.js +1 -1
  112. package/lib/commands/sql/shared.js +1 -1
  113. package/lib/commands/sql/status.js +1 -1
  114. package/lib/commands/sql/validate.js +1 -1
  115. package/lib/config/schema.js +1 -1
  116. package/lib/constant/cdn.js +1 -1
  117. package/lib/constant/cli.js +1 -1
  118. package/lib/constant/defaults.js +1 -1
  119. package/lib/constant/domain.js +1 -1
  120. package/lib/constant/env.js +1 -1
  121. package/lib/constant/output.js +1 -1
  122. package/lib/constant/paths.js +1 -1
  123. package/lib/constant/risk.js +1 -1
  124. package/lib/context.js +1 -1
  125. package/lib/core/alias-resolver.js +1 -1
  126. package/lib/core/api-client.js +1 -1
  127. package/lib/core/bff/config.js +1 -1
  128. package/lib/core/bff/file-system.js +1 -1
  129. package/lib/core/bff/hash.js +1 -1
  130. package/lib/core/bff/lock.js +1 -1
  131. package/lib/core/bff/utils.js +1 -1
  132. package/lib/core/db-resolver.js +1 -1
  133. package/lib/core/page/file-system.js +1 -1
  134. package/lib/core/page/hash.js +1 -1
  135. package/lib/core/page/lock.js +1 -1
  136. package/lib/core/sql-sync/config.js +1 -1
  137. package/lib/core/sql-sync/file-system.js +1 -1
  138. package/lib/core/sql-sync/hash.js +1 -1
  139. package/lib/core/sql-sync/lock.js +1 -1
  140. package/lib/core/sql-sync/utils.js +1 -1
  141. package/lib/core/sql-validator.js +1 -1
  142. package/lib/errors.js +1 -1
  143. package/lib/framework/build-all-flags.js +1 -1
  144. package/lib/framework/flags.js +1 -1
  145. package/lib/framework/help.js +1 -1
  146. package/lib/framework/index.js +1 -1
  147. package/lib/framework/output.js +1 -1
  148. package/lib/framework/response.js +1 -1
  149. package/lib/framework/runner-alias.js +1 -1
  150. package/lib/framework/runner.js +1 -1
  151. package/lib/framework/schema-export.js +1 -1
  152. package/lib/framework/types.js +1 -1
  153. package/lib/generated/build-info.js +1 -1
  154. package/lib/help.js +1 -1
  155. package/lib/skills/main.js +1 -1
  156. package/lib/skills/npx-skills-add.js +1 -1
  157. package/lib/telemetry/cli-command-trace.js +1 -1
  158. package/lib/telemetry/cli-help-trace.js +1 -1
  159. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  160. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  161. package/lib/telemetry/send-cli-trace-log.js +1 -1
  162. package/lib/utils/ai_config.js +1 -1
  163. package/lib/utils/apply-jq-filter.js +1 -1
  164. package/lib/utils/cdn-config.js +1 -1
  165. package/lib/utils/check-sdk-version.js +1 -1
  166. package/lib/utils/cli-version-check.js +1 -1
  167. package/lib/utils/cli-version-policy.js +1 -1
  168. package/lib/utils/config.js +1 -1
  169. package/lib/utils/copy-directory.js +1 -1
  170. package/lib/utils/entity-with-id.js +1 -1
  171. package/lib/utils/file-utils.js +1 -1
  172. package/lib/utils/guides-cdn.js +1 -1
  173. package/lib/utils/http-client.js +1 -1
  174. package/lib/utils/is-non-interactive.js +1 -1
  175. package/lib/utils/logger.js +1 -1
  176. package/lib/utils/platform.js +1 -1
  177. package/lib/utils/rules-cdn.js +1 -1
  178. package/lib/utils/sleep.js +1 -1
  179. package/lib/utils/template-replacer.js +1 -1
  180. package/lib/utils/version.js +1 -1
  181. package/lib/utils/with-active-cookie.js +1 -1
  182. package/lib/utils/write-cli-side-channel.js +1 -1
  183. package/package.json +1 -1
  184. package/templates/skill/SKILL.md.tpl +1 -1
@@ -1 +1 @@
1
- const a19_0x311308=a19_0x93d1;(function(_0x54c636,_0x22de33){const _0x404118=a19_0x93d1,_0x249eb7=_0x54c636();while(!![]){try{const _0x13bcd5=parseInt(_0x404118(0xb5))/0x1+parseInt(_0x404118(0xaf))/0x2+parseInt(_0x404118(0xab))/0x3*(parseInt(_0x404118(0xb6))/0x4)+-parseInt(_0x404118(0xb3))/0x5+-parseInt(_0x404118(0xb1))/0x6*(-parseInt(_0x404118(0xa7))/0x7)+-parseInt(_0x404118(0xb4))/0x8+-parseInt(_0x404118(0xa9))/0x9;if(_0x13bcd5===_0x22de33)break;else _0x249eb7['push'](_0x249eb7['shift']());}catch(_0x221b29){_0x249eb7['push'](_0x249eb7['shift']());}}}(a19_0x31ec,0x7843c));import{listRemoteApps}from'../../core/api-client.js';function a19_0x93d1(_0x1259d0,_0x48ba3b){_0x1259d0=_0x1259d0-0xa7;const _0x31ec7b=a19_0x31ec();let _0x93d106=_0x31ec7b[_0x1259d0];return _0x93d106;}function a19_0x31ec(){const _0x580579=['List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','1831595hjIXUz','6126248welEjO','543436gLSIFX','4ezuCFH','remote','app','7ZkLlwv','appDesc','794268QvErRJ','platform','1710417AHgzFP','appCode','appName','../../core/api-client.js','29304WZCQnF','cookie','3508374lzetna'];a19_0x31ec=function(){return _0x580579;};return a19_0x31ec();}async function execute(_0x36c6d5){const _0x5c5bc3=a19_0x93d1,{setActiveCookie:_0x368bc2}=await import(_0x5c5bc3(0xae));_0x368bc2(_0x36c6d5[_0x5c5bc3(0xb0)]);const _0xc74d6f=await listRemoteApps();return{'ok':!![],'data':{'items':_0xc74d6f['map'](_0x35b0e5=>({..._0x35b0e5['id']!=null?{'id':_0x35b0e5['id']}:{},'appCode':_0x35b0e5[_0x5c5bc3(0xac)],'appName':_0x35b0e5[_0x5c5bc3(0xad)],..._0x35b0e5[_0x5c5bc3(0xa8)]!=null?{'appDesc':_0x35b0e5[_0x5c5bc3(0xa8)]}:{}})),'meta':{'source':_0x5c5bc3(0xaa)}}};}export const appRemoteDefinition={'service':a19_0x311308(0xb8),'command':a19_0x311308(0xb7),'description':a19_0x311308(0xb2),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ const a19_0x326e3a=a19_0x6e75;(function(_0xdcea39,_0x4bb7d8){const _0x4cf534=a19_0x6e75,_0x3b332a=_0xdcea39();while(!![]){try{const _0x1bdbe6=parseInt(_0x4cf534(0x1f3))/0x1+parseInt(_0x4cf534(0x1f4))/0x2*(-parseInt(_0x4cf534(0x1f6))/0x3)+-parseInt(_0x4cf534(0x1f0))/0x4+parseInt(_0x4cf534(0x1ee))/0x5+-parseInt(_0x4cf534(0x1fa))/0x6+parseInt(_0x4cf534(0x1f1))/0x7+-parseInt(_0x4cf534(0x1f5))/0x8*(-parseInt(_0x4cf534(0x1ea))/0x9);if(_0x1bdbe6===_0x4bb7d8)break;else _0x3b332a['push'](_0x3b332a['shift']());}catch(_0x28424d){_0x3b332a['push'](_0x3b332a['shift']());}}}(a19_0x190a,0xd72e1));import{listRemoteApps}from'../../core/api-client.js';function a19_0x6e75(_0x57fb01,_0x5e91dd){_0x57fb01=_0x57fb01-0x1ea;const _0x190acc=a19_0x190a();let _0x6e75f7=_0x190acc[_0x57fb01];return _0x6e75f7;}async function execute(_0x4dd07f){const _0xc41be5=a19_0x6e75,{setActiveCookie:_0x1ff66f}=await import(_0xc41be5(0x1f9));_0x1ff66f(_0x4dd07f['cookie']);const _0x370de6=await listRemoteApps();return{'ok':!![],'data':{'items':_0x370de6['map'](_0x42547a=>({..._0x42547a['id']!=null?{'id':_0x42547a['id']}:{},'appCode':_0x42547a[_0xc41be5(0x1ec)],'appName':_0x42547a['appName'],..._0x42547a[_0xc41be5(0x1ef)]!=null?{'appDesc':_0x42547a[_0xc41be5(0x1ef)]}:{}})),'meta':{'source':_0xc41be5(0x1f8)}}};}export const appRemoteDefinition={'service':a19_0x326e3a(0x1f7),'command':a19_0x326e3a(0x1ed),'description':a19_0x326e3a(0x1f2),'risk':a19_0x326e3a(0x1eb),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};function a19_0x190a(){const _0x30aa38=['remote','2473725fulrKU','appDesc','3163908HxfZyJ','768726LQttew','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','597484vtiGfH','2THrAfS','68088WbPKtu','4286148PMsldU','app','platform','../../core/api-client.js','2342616IUASaD','2421mkOvci','read','appCode'];a19_0x190a=function(){return _0x30aa38;};return a19_0x190a();}
@@ -1 +1 @@
1
- (function(_0x57bacd,_0x50b119){const _0x5cc759=a20_0x2289,_0x12b7a9=_0x57bacd();while(!![]){try{const _0x33685b=parseInt(_0x5cc759(0x169))/0x1*(-parseInt(_0x5cc759(0x167))/0x2)+parseInt(_0x5cc759(0x166))/0x3*(-parseInt(_0x5cc759(0x16c))/0x4)+parseInt(_0x5cc759(0x16b))/0x5+parseInt(_0x5cc759(0x170))/0x6*(-parseInt(_0x5cc759(0x16d))/0x7)+-parseInt(_0x5cc759(0x16e))/0x8*(parseInt(_0x5cc759(0x168))/0x9)+-parseInt(_0x5cc759(0x165))/0xa+parseInt(_0x5cc759(0x16a))/0xb*(parseInt(_0x5cc759(0x16f))/0xc);if(_0x33685b===_0x50b119)break;else _0x12b7a9['push'](_0x12b7a9['shift']());}catch(_0x4578f2){_0x12b7a9['push'](_0x12b7a9['shift']());}}}(a20_0x2b95,0xb03af));function a20_0x2b95(){const _0x2a98e1=['1436qVaWnU','205499ayqNWx','235256zsdMiL','486360cZUUMq','48CqSOVp','2688340rwzfyp','9885SdKGgO','197048RmOpNx','315bAtEGA','11lzvpSY','1111GcUUyG','2139565uJcRVO'];a20_0x2b95=function(){return _0x2a98e1;};return a20_0x2b95();}function a20_0x2289(_0x46316f,_0x372be6){_0x46316f=_0x46316f-0x165;const _0x2b95ab=a20_0x2b95();let _0x22893e=_0x2b95ab[_0x46316f];return _0x22893e;}import{appListDefinition}from'../../commands/app/list.js';import{appRemoteDefinition}from'../../commands/app/discover.js';import{appUseDefinition}from'../../commands/app/use.js';import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
1
+ (function(_0x1be77b,_0x2b724d){const _0x34ece5=a20_0x1c69,_0x26b0a4=_0x1be77b();while(!![]){try{const _0x2c37f1=-parseInt(_0x34ece5(0x133))/0x1*(parseInt(_0x34ece5(0x134))/0x2)+parseInt(_0x34ece5(0x131))/0x3+parseInt(_0x34ece5(0x12f))/0x4+parseInt(_0x34ece5(0x132))/0x5*(parseInt(_0x34ece5(0x12e))/0x6)+parseInt(_0x34ece5(0x130))/0x7+parseInt(_0x34ece5(0x135))/0x8*(-parseInt(_0x34ece5(0x12d))/0x9)+-parseInt(_0x34ece5(0x136))/0xa;if(_0x2c37f1===_0x2b724d)break;else _0x26b0a4['push'](_0x26b0a4['shift']());}catch(_0x1540e9){_0x26b0a4['push'](_0x26b0a4['shift']());}}}(a20_0x283b,0x87ec1));import{appListDefinition}from'../../commands/app/list.js';function a20_0x283b(){const _0x565b32=['455931GeaemH','6crZAmr','1257336KgsgZK','3733387PSYwvb','1953201EfqBwK','415070vNXxWl','1544LdQmMv','424lGvyhQ','16PgRfTP','5963730gqUmvQ'];a20_0x283b=function(){return _0x565b32;};return a20_0x283b();}import{appRemoteDefinition}from'../../commands/app/discover.js';import{appUseDefinition}from'../../commands/app/use.js';import{appAddDefinition}from'../../commands/app/add.js';function a20_0x1c69(_0x2757c3,_0x4ba978){_0x2757c3=_0x2757c3-0x12d;const _0x283b5e=a20_0x283b();let _0x1c690e=_0x283b5e[_0x2757c3];return _0x1c690e;}import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
@@ -1 +1 @@
1
- const a21_0x29576a=a21_0x38d6;(function(_0xd1d2fb,_0x4d166c){const _0x4a9bdf=a21_0x38d6,_0x3f6e52=_0xd1d2fb();while(!![]){try{const _0x3a7cc2=parseInt(_0x4a9bdf(0x176))/0x1+-parseInt(_0x4a9bdf(0x175))/0x2*(parseInt(_0x4a9bdf(0x159))/0x3)+-parseInt(_0x4a9bdf(0x177))/0x4*(parseInt(_0x4a9bdf(0x16c))/0x5)+parseInt(_0x4a9bdf(0x16b))/0x6*(-parseInt(_0x4a9bdf(0x162))/0x7)+parseInt(_0x4a9bdf(0x161))/0x8*(-parseInt(_0x4a9bdf(0x15f))/0x9)+-parseInt(_0x4a9bdf(0x174))/0xa*(-parseInt(_0x4a9bdf(0x17c))/0xb)+parseInt(_0x4a9bdf(0x156))/0xc*(parseInt(_0x4a9bdf(0x163))/0xd);if(_0x3a7cc2===_0x4d166c)break;else _0x3f6e52['push'](_0x3f6e52['shift']());}catch(_0x29a324){_0x3f6e52['push'](_0x3f6e52['shift']());}}}(a21_0x2273,0x6177e));function a21_0x38d6(_0x49958e,_0x531905){_0x49958e=_0x49958e-0x154;const _0x22738c=a21_0x2273();let _0x38d665=_0x22738c[_0x49958e];return _0x38d665;}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function a21_0x2273(){const _0x5754e2=['projectPath','8zTmPQg','852439exggFn','334893eOiQug','.\x20Use\x20`','merged','inherit','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','length','apps','map','30gXNWbl','15660FtspFC','\x20config','globalPath','No\x20apps\x20configured','\x20in\x20','projectConfig','defaultApp','mergedCli','1230sneKsf','6ySTNSe','685353ksUnHl','268iXkKVW','global','bool','entries','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','31460PcIaxg','globalConfig','object','636ZHHwuJ','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','boolean','456813HmzFxp','push','isCurrent','list','appcode','project','6549246mawefo'];a21_0x2273=function(){return _0x5754e2;};return a21_0x2273();}function buildItemsFromLayer(_0x3e2eed,_0x3debfb){const _0x222b6e=a21_0x38d6,_0x3a4ba3=[],_0x22ffdb=_0x3e2eed[_0x222b6e(0x169)]&&typeof _0x3e2eed['apps']===_0x222b6e(0x155)?_0x3e2eed[_0x222b6e(0x169)]:{},_0x46e2d9=_0x3e2eed[_0x222b6e(0x172)]||undefined;for(const [_0x4aacb0,_0x5de40c]of Object[_0x222b6e(0x17a)](_0x22ffdb)){if(!_0x5de40c||typeof _0x5de40c!==_0x222b6e(0x155)||!_0x5de40c[_0x222b6e(0x15d)])continue;_0x3a4ba3[_0x222b6e(0x15a)]({'name':_0x4aacb0,'appcode':_0x5de40c[_0x222b6e(0x15d)],'named':!![],'definedIn':_0x3debfb,'isDefault':_0x4aacb0===_0x46e2d9,...buildAppProfileListFields(_0x5de40c)});}return _0x3a4ba3;}function buildMergedItems(_0x31601b,_0x54ead4){const _0x2a59dd=a21_0x38d6,{apps:apps={},defaultApp:_0x361f87}=_0x31601b,_0x5e30b8=_0x54ead4[_0x2a59dd(0x154)]['apps']&&typeof _0x54ead4[_0x2a59dd(0x154)][_0x2a59dd(0x169)]===_0x2a59dd(0x155)?_0x54ead4['globalConfig'][_0x2a59dd(0x169)]:{},_0x5b296a=_0x54ead4[_0x2a59dd(0x171)]['apps']&&typeof _0x54ead4[_0x2a59dd(0x171)][_0x2a59dd(0x169)]===_0x2a59dd(0x155)?_0x54ead4['projectConfig'][_0x2a59dd(0x169)]:{},_0x4f2777=_0x54ead4[_0x2a59dd(0x171)][_0x2a59dd(0x166)]===![],_0x596d17=Object[_0x2a59dd(0x17a)](apps),_0x397576=_0x596d17[_0x2a59dd(0x16a)](([_0x4b1e6c,_0x2be6e0])=>({'name':_0x4b1e6c,'appcode':_0x2be6e0[_0x2a59dd(0x15d)],'named':!![],'definedIn':appDefinedIn(_0x4b1e6c,_0x5e30b8,_0x5b296a,_0x4f2777),'isDefault':_0x4b1e6c===_0x361f87,...buildAppProfileListFields(_0x2be6e0)}));return _0x397576;}async function execute(_0x43b376){const _0x5c91d9=a21_0x38d6,_0x2c6cbf=_0x43b376[_0x5c91d9(0x179)](_0x5c91d9(0x178)),_0x865b6a=_0x43b376[_0x5c91d9(0x179)]('project'),_0xc608f3=_0x2c6cbf?'global':_0x865b6a?_0x5c91d9(0x15e):_0x5c91d9(0x165),{config:_0x76b3ed,layers:_0x26ec11}=readRawConfigWithLayers(),_0x4ff0f3=resolveDefaultAppSource(_0x26ec11),{defaultApp:_0x31bd25}=_0x76b3ed;let _0x588498,_0x4a2538;switch(_0xc608f3){case _0x5c91d9(0x178):_0x588498=buildItemsFromLayer(_0x26ec11[_0x5c91d9(0x154)],'global'),_0x4a2538=_0x26ec11[_0x5c91d9(0x16e)];break;case _0x5c91d9(0x15e):_0x588498=buildItemsFromLayer(_0x26ec11[_0x5c91d9(0x171)],_0x5c91d9(0x15e)),_0x4a2538=_0x26ec11['projectPath'];break;default:_0x588498=buildMergedItems(_0x76b3ed,_0x26ec11);break;}enrichAppListItemsWithMergedSelection(_0x588498,_0x43b376[_0x5c91d9(0x173)]);if(_0x588498[_0x5c91d9(0x168)]===0x0){const _0x5062e5=_0xc608f3==='merged'?'':_0x5c91d9(0x170)+_0xc608f3+_0x5c91d9(0x16d);return{'ok':!![],'data':[],'message':_0x5c91d9(0x16f)+_0x5062e5+_0x5c91d9(0x164)+CLI_BIN_NAME+_0x5c91d9(0x157)};}const _0x5bfbdd=_0x588498['find'](_0x2abadd=>_0x2abadd[_0x5c91d9(0x15b)]===!![]),_0x3c888c=_0x31bd25??_0x5bfbdd?.[_0x5c91d9(0x15d)]??null,_0x464228=_0xc608f3===_0x5c91d9(0x165)?{'globalPath':_0x26ec11[_0x5c91d9(0x16e)]??null,'projectPath':_0x26ec11[_0x5c91d9(0x160)]??null,'defaultApp':_0x3c888c,'defaultAppSource':_0x31bd25!=null?_0x4ff0f3:null}:{'scope':_0xc608f3,'configPath':_0x4a2538??null};return{'ok':!![],'data':{'items':_0x588498,'meta':_0x464228}};}export const appListDefinition={'service':'app','command':a21_0x29576a(0x15c),'description':'List\x20all\x20configured\x20apps','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x29576a(0x178),'type':a21_0x29576a(0x158),'description':a21_0x29576a(0x167),'default':![]},{'name':'project','type':a21_0x29576a(0x158),'description':a21_0x29576a(0x17b),'default':![]}],'execute':execute};
1
+ const a21_0x53c091=a21_0x352b;(function(_0x5057d2,_0x4d4d9a){const _0xdc8976=a21_0x352b,_0x3ee42d=_0x5057d2();while(!![]){try{const _0x221f0f=-parseInt(_0xdc8976(0xe4))/0x1*(-parseInt(_0xdc8976(0xde))/0x2)+parseInt(_0xdc8976(0xf5))/0x3+-parseInt(_0xdc8976(0x100))/0x4+-parseInt(_0xdc8976(0x102))/0x5+parseInt(_0xdc8976(0xfb))/0x6*(parseInt(_0xdc8976(0xe9))/0x7)+-parseInt(_0xdc8976(0xff))/0x8*(parseInt(_0xdc8976(0xfd))/0x9)+parseInt(_0xdc8976(0xf2))/0xa;if(_0x221f0f===_0x4d4d9a)break;else _0x3ee42d['push'](_0x3ee42d['shift']());}catch(_0x2e3a22){_0x3ee42d['push'](_0x3ee42d['shift']());}}}(a21_0x44a2,0xf3c19));function a21_0x44a2(){const _0x114a15=['5180793zFyXyC','bool','app','merged','list','inherit','42fhBsaU','push','1154313AcJAxe','isCurrent','48UACOeg','2933504zglxRL','mergedCli','4203970CHNpeL','\x20config','project','projectConfig','195874TaFicx','No\x20apps\x20configured','object','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','.\x20Use\x20`','map','3oZektn','List\x20all\x20configured\x20apps','global','apps','globalPath','749161ElEDZm','appcode','defaultApp','globalConfig','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','length','entries','boolean','5722340wMNktZ','find','\x20in\x20'];a21_0x44a2=function(){return _0x114a15;};return a21_0x44a2();}function a21_0x352b(_0x434048,_0x9b92f3){_0x434048=_0x434048-0xdc;const _0x44a29c=a21_0x44a2();let _0x352b3e=_0x44a29c[_0x434048];return _0x352b3e;}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function buildItemsFromLayer(_0x594042,_0x14807b){const _0x1a6ac7=a21_0x352b,_0xb407f5=[],_0xe68c53=_0x594042[_0x1a6ac7(0xe7)]&&typeof _0x594042[_0x1a6ac7(0xe7)]==='object'?_0x594042[_0x1a6ac7(0xe7)]:{},_0x370202=_0x594042[_0x1a6ac7(0xeb)]||undefined;for(const [_0x39eb4b,_0x12f42a]of Object[_0x1a6ac7(0xf0)](_0xe68c53)){if(!_0x12f42a||typeof _0x12f42a!==_0x1a6ac7(0xe0)||!_0x12f42a[_0x1a6ac7(0xea)])continue;_0xb407f5[_0x1a6ac7(0xfc)]({'name':_0x39eb4b,'appcode':_0x12f42a[_0x1a6ac7(0xea)],'named':!![],'definedIn':_0x14807b,'isDefault':_0x39eb4b===_0x370202,...buildAppProfileListFields(_0x12f42a)});}return _0xb407f5;}function buildMergedItems(_0x22045a,_0x4fa61b){const _0x5775f3=a21_0x352b,{apps:apps={},defaultApp:_0x2b653e}=_0x22045a,_0x2cf8b5=_0x4fa61b[_0x5775f3(0xec)][_0x5775f3(0xe7)]&&typeof _0x4fa61b[_0x5775f3(0xec)][_0x5775f3(0xe7)]===_0x5775f3(0xe0)?_0x4fa61b[_0x5775f3(0xec)][_0x5775f3(0xe7)]:{},_0x13bd7b=_0x4fa61b[_0x5775f3(0xdd)][_0x5775f3(0xe7)]&&typeof _0x4fa61b[_0x5775f3(0xdd)][_0x5775f3(0xe7)]===_0x5775f3(0xe0)?_0x4fa61b[_0x5775f3(0xdd)][_0x5775f3(0xe7)]:{},_0x556d93=_0x4fa61b[_0x5775f3(0xdd)][_0x5775f3(0xfa)]===![],_0x5dd0a5=Object['entries'](apps),_0x5ac111=_0x5dd0a5[_0x5775f3(0xe3)](([_0x1a0e96,_0x47e9ab])=>({'name':_0x1a0e96,'appcode':_0x47e9ab[_0x5775f3(0xea)],'named':!![],'definedIn':appDefinedIn(_0x1a0e96,_0x2cf8b5,_0x13bd7b,_0x556d93),'isDefault':_0x1a0e96===_0x2b653e,...buildAppProfileListFields(_0x47e9ab)}));return _0x5ac111;}async function execute(_0x15cdbb){const _0x4924af=a21_0x352b,_0x523ad4=_0x15cdbb['bool'](_0x4924af(0xe6)),_0x569f76=_0x15cdbb[_0x4924af(0xf6)](_0x4924af(0xdc)),_0x10488f=_0x523ad4?_0x4924af(0xe6):_0x569f76?_0x4924af(0xdc):_0x4924af(0xf8),{config:_0x20cfd7,layers:_0x23156a}=readRawConfigWithLayers(),_0x2ede32=resolveDefaultAppSource(_0x23156a),{defaultApp:_0x1cf5d6}=_0x20cfd7;let _0x3b6b5c,_0x2c25a5;switch(_0x10488f){case _0x4924af(0xe6):_0x3b6b5c=buildItemsFromLayer(_0x23156a[_0x4924af(0xec)],'global'),_0x2c25a5=_0x23156a[_0x4924af(0xe8)];break;case _0x4924af(0xdc):_0x3b6b5c=buildItemsFromLayer(_0x23156a[_0x4924af(0xdd)],_0x4924af(0xdc)),_0x2c25a5=_0x23156a['projectPath'];break;default:_0x3b6b5c=buildMergedItems(_0x20cfd7,_0x23156a);break;}enrichAppListItemsWithMergedSelection(_0x3b6b5c,_0x15cdbb[_0x4924af(0x101)]);if(_0x3b6b5c[_0x4924af(0xef)]===0x0){const _0x344bcf=_0x10488f==='merged'?'':_0x4924af(0xf4)+_0x10488f+_0x4924af(0x103);return{'ok':!![],'data':[],'message':_0x4924af(0xdf)+_0x344bcf+_0x4924af(0xe2)+CLI_BIN_NAME+_0x4924af(0xe1)};}const _0x381d32=_0x3b6b5c[_0x4924af(0xf3)](_0x25a701=>_0x25a701[_0x4924af(0xfe)]===!![]),_0x15ffa3=_0x1cf5d6??_0x381d32?.[_0x4924af(0xea)]??null,_0x528281=_0x10488f===_0x4924af(0xf8)?{'globalPath':_0x23156a['globalPath']??null,'projectPath':_0x23156a['projectPath']??null,'defaultApp':_0x15ffa3,'defaultAppSource':_0x1cf5d6!=null?_0x2ede32:null}:{'scope':_0x10488f,'configPath':_0x2c25a5??null};return{'ok':!![],'data':{'items':_0x3b6b5c,'meta':_0x528281}};}export const appListDefinition={'service':a21_0x53c091(0xf7),'command':a21_0x53c091(0xf9),'description':a21_0x53c091(0xe5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a21_0x53c091(0xe6),'type':a21_0x53c091(0xf1),'description':a21_0x53c091(0xee),'default':![]},{'name':a21_0x53c091(0xdc),'type':a21_0x53c091(0xf1),'description':a21_0x53c091(0xed),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a22_0x85a928=a22_0x2c41;(function(_0x19b16f,_0x5cb977){const _0x1a9941=a22_0x2c41,_0x583b30=_0x19b16f();while(!![]){try{const _0x25d3fc=parseInt(_0x1a9941(0x91))/0x1*(parseInt(_0x1a9941(0x8d))/0x2)+-parseInt(_0x1a9941(0xab))/0x3*(parseInt(_0x1a9941(0xb0))/0x4)+parseInt(_0x1a9941(0xae))/0x5*(parseInt(_0x1a9941(0xa4))/0x6)+parseInt(_0x1a9941(0x9f))/0x7*(-parseInt(_0x1a9941(0x98))/0x8)+parseInt(_0x1a9941(0x8a))/0x9*(parseInt(_0x1a9941(0xaf))/0xa)+parseInt(_0x1a9941(0x93))/0xb+-parseInt(_0x1a9941(0x9e))/0xc;if(_0x25d3fc===_0x5cb977)break;else _0x583b30['push'](_0x583b30['shift']());}catch(_0x18820a){_0x583b30['push'](_0x583b30['shift']());}}}(a22_0x2e90,0x40a8f));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x2e90(){const _0x2df8fe=['args','trim','2841798sBXFHA','Remove\x20an\x20app\x20from\x20config','\x20config.','defaultApp','both','\x20Default\x20app\x20changed\x20to\x20\x22','globalConfig','5376KnFbCz','\x22\x20still\x20defined\x20in\x20','length','5zzasaH','1719700ANNudN','1012yWFkkz','object','\x22\x20not\x20found.','27pSqwTz','App\x20profile\x20name\x20to\x20remove','projectConfig','2856sKchdY','\x20Note:\x20app\x20\x22','project','\x20app\x20remove\x20<name>\x20[--global]','53NBfAqU','keys','2163964BCNmgk','apps','inherit','high-risk-write','Usage:\x20','626064QjxDrM','global','validation','Missing\x20app\x20name.','remove','app','3707448ftNkaB','21Ogngbj','Removed\x20app\x20\x22','App\x20\x22'];a22_0x2e90=function(){return _0x2df8fe;};return a22_0x2e90();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';async function validateArgs(_0x5a313b){const _0x3ad093=a22_0x2c41,_0x154503=_0x5a313b[_0x3ad093(0xa2)][0x0]?.['trim']();if(!_0x154503)throw CliErrors[_0x3ad093(0x9a)](_0x3ad093(0x9b),_0x3ad093(0x97)+CLI_BIN_NAME+'\x20app\x20remove\x20<name>\x20[--global]');}function a22_0x2c41(_0x5623ed,_0x824920){_0x5623ed=_0x5623ed-0x88;const _0x2e9022=a22_0x2e90();let _0x2c41db=_0x2e9022[_0x5623ed];return _0x2c41db;}async function execute(_0x5b2e1d){const _0x241508=a22_0x2c41,_0x1bfcb7=_0x5b2e1d[_0x241508(0xa2)][0x0]?.[_0x241508(0xa3)]();if(!_0x1bfcb7)throw CliErrors[_0x241508(0x9a)]('Missing\x20app\x20name.',_0x241508(0x97)+CLI_BIN_NAME+_0x241508(0x90));const _0x4e8ccb=_0x5b2e1d['bool'](_0x241508(0x99)),{config:_0x328589,layers:_0x5c57b7}=readRawConfigWithLayers(),_0x3f0d28=_0x328589[_0x241508(0x94)]??{};if(!_0x3f0d28[_0x1bfcb7])throw CliErrors['validation'](_0x241508(0xa1)+_0x1bfcb7+_0x241508(0x89));const _0x53f2c9=_0x5c57b7[_0x241508(0xaa)][_0x241508(0x94)]&&typeof _0x5c57b7[_0x241508(0xaa)][_0x241508(0x94)]===_0x241508(0x88)?_0x5c57b7[_0x241508(0xaa)][_0x241508(0x94)]:{},_0x1d7144=_0x5c57b7[_0x241508(0x8c)][_0x241508(0x94)]&&typeof _0x5c57b7['projectConfig'][_0x241508(0x94)]==='object'?_0x5c57b7['projectConfig']['apps']:{},_0x23a932=appDefinedIn(_0x1bfcb7,_0x53f2c9,_0x1d7144,_0x5c57b7[_0x241508(0x8c)][_0x241508(0x95)]===![]),_0x368307=resolveAppScopeForWrite(_0x1bfcb7,_0x4e8ccb,_0x5c57b7),_0x34332a={'global':_0x368307==='global'},_0x356201=readConfig(_0x34332a),_0x218210=_0x356201['apps'];if(!_0x218210||!_0x218210[_0x1bfcb7])throw CliErrors[_0x241508(0x9a)](_0x241508(0xa1)+_0x1bfcb7+_0x241508(0x89));delete _0x218210[_0x1bfcb7];let _0x3972a7='';if(_0x356201[_0x241508(0xa7)]===_0x1bfcb7){const _0x53cf03=Object[_0x241508(0x92)](_0x218210);_0x356201[_0x241508(0xa7)]=_0x53cf03[_0x241508(0xad)]>0x0?_0x53cf03[0x0]:undefined,_0x356201[_0x241508(0xa7)]?_0x3972a7=_0x241508(0xa9)+_0x356201[_0x241508(0xa7)]+'\x22.':delete _0x356201[_0x241508(0xa7)];}Object[_0x241508(0x92)](_0x218210)[_0x241508(0xad)]===0x0&&(delete _0x356201[_0x241508(0x94)],delete _0x356201[_0x241508(0xa7)]);writeConfig(_0x356201,_0x34332a);const _0x58f6e5=_0x23a932===_0x241508(0xa8)?_0x241508(0x8e)+_0x1bfcb7+_0x241508(0xac)+(_0x368307===_0x241508(0x8f)?_0x241508(0x99):_0x241508(0x8f))+_0x241508(0xa6):'';return{'ok':!![],'message':_0x241508(0xa0)+_0x1bfcb7+'\x22'+scopeLabel(_0x34332a)+'.'+_0x3972a7+_0x58f6e5};}export const appRemoveDefinition={'service':a22_0x85a928(0x9d),'command':a22_0x85a928(0x9c),'description':a22_0x85a928(0xa5),'risk':a22_0x85a928(0x96),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a22_0x85a928(0x8b),'required':!![]}],'flags':[{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};
1
+ const a22_0x79907d=a22_0x511c;(function(_0x2f9d78,_0x11ca8d){const _0x45f4b9=a22_0x511c,_0x4cb5d0=_0x2f9d78();while(!![]){try{const _0x53784c=-parseInt(_0x45f4b9(0x13c))/0x1+-parseInt(_0x45f4b9(0x12d))/0x2*(-parseInt(_0x45f4b9(0x130))/0x3)+-parseInt(_0x45f4b9(0x122))/0x4+-parseInt(_0x45f4b9(0x131))/0x5*(parseInt(_0x45f4b9(0x138))/0x6)+parseInt(_0x45f4b9(0x11e))/0x7*(-parseInt(_0x45f4b9(0x12e))/0x8)+-parseInt(_0x45f4b9(0x127))/0x9+parseInt(_0x45f4b9(0x123))/0xa*(parseInt(_0x45f4b9(0x125))/0xb);if(_0x53784c===_0x11ca8d)break;else _0x4cb5d0['push'](_0x4cb5d0['shift']());}catch(_0x246c92){_0x4cb5d0['push'](_0x4cb5d0['shift']());}}}(a22_0x420a,0xd17ec));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x511c(_0x209464,_0x367aaf){_0x209464=_0x209464-0x11a;const _0x420a87=a22_0x420a();let _0x511c4b=_0x420a87[_0x209464];return _0x511c4b;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a22_0x420a(){const _0x2b8188=['\x22\x20still\x20defined\x20in\x20','globalConfig','363776JKYNez','\x20config.','both','args','projectConfig','Remove\x20an\x20app\x20from\x20config','App\x20\x22','\x22\x20not\x20found.','7bkEEVm','Missing\x20app\x20name.','\x20app\x20remove\x20<name>\x20[--global]','boolean','5044812cMBlOG','10lXPdQC','apps','45918499APMIHR','validation','9534078sPcneU','global','length','trim','\x20Default\x20app\x20changed\x20to\x20\x22','name','58bJicPA','8752624NSyyne','high-risk-write','82191mcGoSV','151105mstiAh','\x20Note:\x20app\x20\x22','project','inherit','remove','Usage:\x20','defaultApp','66HcsweH','app'];a22_0x420a=function(){return _0x2b8188;};return a22_0x420a();}async function validateArgs(_0x858d65){const _0x1a3ea3=a22_0x511c,_0x47345a=_0x858d65[_0x1a3ea3(0x13f)][0x0]?.['trim']();if(!_0x47345a)throw CliErrors['validation'](_0x1a3ea3(0x11f),_0x1a3ea3(0x136)+CLI_BIN_NAME+'\x20app\x20remove\x20<name>\x20[--global]');}async function execute(_0x5dca36){const _0x43d68b=a22_0x511c,_0x2990e8=_0x5dca36[_0x43d68b(0x13f)][0x0]?.[_0x43d68b(0x12a)]();if(!_0x2990e8)throw CliErrors[_0x43d68b(0x126)](_0x43d68b(0x11f),_0x43d68b(0x136)+CLI_BIN_NAME+_0x43d68b(0x120));const _0x2b005b=_0x5dca36['bool'](_0x43d68b(0x128)),{config:_0x31aa11,layers:_0xb62fa2}=readRawConfigWithLayers(),_0x86a5b4=_0x31aa11['apps']??{};if(!_0x86a5b4[_0x2990e8])throw CliErrors['validation'](_0x43d68b(0x11c)+_0x2990e8+_0x43d68b(0x11d));const _0x5cb019=_0xb62fa2['globalConfig'][_0x43d68b(0x124)]&&typeof _0xb62fa2[_0x43d68b(0x13b)][_0x43d68b(0x124)]==='object'?_0xb62fa2[_0x43d68b(0x13b)][_0x43d68b(0x124)]:{},_0x4e9ca7=_0xb62fa2['projectConfig']['apps']&&typeof _0xb62fa2['projectConfig'][_0x43d68b(0x124)]==='object'?_0xb62fa2[_0x43d68b(0x11a)][_0x43d68b(0x124)]:{},_0x117c15=appDefinedIn(_0x2990e8,_0x5cb019,_0x4e9ca7,_0xb62fa2[_0x43d68b(0x11a)][_0x43d68b(0x134)]===![]),_0x43e3cd=resolveAppScopeForWrite(_0x2990e8,_0x2b005b,_0xb62fa2),_0x2cd5c1={'global':_0x43e3cd==='global'},_0x1d3362=readConfig(_0x2cd5c1),_0x15cd33=_0x1d3362[_0x43d68b(0x124)];if(!_0x15cd33||!_0x15cd33[_0x2990e8])throw CliErrors[_0x43d68b(0x126)](_0x43d68b(0x11c)+_0x2990e8+_0x43d68b(0x11d));delete _0x15cd33[_0x2990e8];let _0x5ccf80='';if(_0x1d3362[_0x43d68b(0x137)]===_0x2990e8){const _0x3a51b0=Object['keys'](_0x15cd33);_0x1d3362[_0x43d68b(0x137)]=_0x3a51b0['length']>0x0?_0x3a51b0[0x0]:undefined,_0x1d3362[_0x43d68b(0x137)]?_0x5ccf80=_0x43d68b(0x12b)+_0x1d3362[_0x43d68b(0x137)]+'\x22.':delete _0x1d3362[_0x43d68b(0x137)];}Object['keys'](_0x15cd33)[_0x43d68b(0x129)]===0x0&&(delete _0x1d3362[_0x43d68b(0x124)],delete _0x1d3362[_0x43d68b(0x137)]);writeConfig(_0x1d3362,_0x2cd5c1);const _0x3e94cb=_0x117c15===_0x43d68b(0x13e)?_0x43d68b(0x132)+_0x2990e8+_0x43d68b(0x13a)+(_0x43e3cd===_0x43d68b(0x133)?_0x43d68b(0x128):'project')+_0x43d68b(0x13d):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x2990e8+'\x22'+scopeLabel(_0x2cd5c1)+'.'+_0x5ccf80+_0x3e94cb};}export const appRemoveDefinition={'service':a22_0x79907d(0x139),'command':a22_0x79907d(0x135),'description':a22_0x79907d(0x11b),'risk':a22_0x79907d(0x12f),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a22_0x79907d(0x12c),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':[{'name':a22_0x79907d(0x128),'type':a22_0x79907d(0x121),'description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x161b90,_0xbd0192){const _0x750a84=a23_0x1779,_0x26e64b=_0x161b90();while(!![]){try{const _0x30dd97=parseInt(_0x750a84(0x73))/0x1+parseInt(_0x750a84(0x7e))/0x2+-parseInt(_0x750a84(0x85))/0x3+-parseInt(_0x750a84(0x80))/0x4+parseInt(_0x750a84(0x81))/0x5*(-parseInt(_0x750a84(0x71))/0x6)+parseInt(_0x750a84(0x7d))/0x7+parseInt(_0x750a84(0x7c))/0x8;if(_0x30dd97===_0xbd0192)break;else _0x26e64b['push'](_0x26e64b['shift']());}catch(_0x3704e1){_0x26e64b['push'](_0x26e64b['shift']());}}}(a23_0x4080,0x1925c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x264f61,_0x31ba9f){const _0x1012ff=a23_0x1779;if(!_0x31ba9f)return;const _0x4a1873=_0x31ba9f[_0x1012ff(0x6c)]&&typeof _0x31ba9f[_0x1012ff(0x6c)]===_0x1012ff(0x79)?_0x31ba9f[_0x1012ff(0x6c)]:{},_0x4a129d=Object[_0x1012ff(0x82)](_0x4a1873)[_0x1012ff(0x89)]>0x0;for(const _0x7a511d of _0x264f61){_0x7a511d[_0x1012ff(0x7f)]=![];}const _0x233d7c=_0x31ba9f[_0x1012ff(0x72)]!=null?String(_0x31ba9f['appCode'])[_0x1012ff(0x84)]():'';if(_0x4a129d){const _0x1b0ac1=_0x31ba9f[_0x1012ff(0x87)]??_0x31ba9f[_0x1012ff(0x6f)];if(_0x1b0ac1)for(const _0x2165ab of _0x264f61){_0x2165ab[_0x1012ff(0x6d)]===!![]&&_0x2165ab[_0x1012ff(0x7a)]===_0x1b0ac1&&(_0x2165ab[_0x1012ff(0x7f)]=!![]);}for(const _0x3ea4fb of _0x264f61){if(_0x3ea4fb[_0x1012ff(0x6d)]!==![])continue;if(_0x31ba9f[_0x1012ff(0x6f)])continue;_0x233d7c&&String(_0x3ea4fb['appcode']??'')['trim']()===_0x233d7c&&(_0x3ea4fb['isCurrent']=!![]);}return;}if(!_0x233d7c)return;for(const _0xe3d116 of _0x264f61){String(_0xe3d116[_0x1012ff(0x88)]??'')[_0x1012ff(0x84)]()===_0x233d7c&&(_0xe3d116[_0x1012ff(0x7f)]=!![]);}}function a23_0x1779(_0xd5b138,_0x34dabd){_0xd5b138=_0xd5b138-0x6c;const _0x4080d9=a23_0x4080();let _0x1779ec=_0x4080d9[_0xd5b138];return _0x1779ec;}export function resolveAppScopeForWrite(_0x565ff3,_0x2e0d3b,_0x353c18){const _0x2759e8=a23_0x1779;if(_0x2e0d3b)return _0x2759e8(0x6e);const _0x340c1c=_0x353c18[_0x2759e8(0x70)][_0x2759e8(0x6c)]&&typeof _0x353c18[_0x2759e8(0x70)]['apps']===_0x2759e8(0x79)?_0x353c18[_0x2759e8(0x70)]['apps']:{},_0x2d0aa6=_0x353c18['globalConfig'][_0x2759e8(0x6c)]&&typeof _0x353c18[_0x2759e8(0x75)][_0x2759e8(0x6c)]===_0x2759e8(0x79)?_0x353c18[_0x2759e8(0x75)][_0x2759e8(0x6c)]:{};if(Object[_0x2759e8(0x78)][_0x2759e8(0x74)][_0x2759e8(0x7b)](_0x340c1c,_0x565ff3))return'project';if(Object['prototype'][_0x2759e8(0x74)][_0x2759e8(0x7b)](_0x2d0aa6,_0x565ff3))return _0x2759e8(0x6e);return _0x2759e8(0x86);}export function appDefinedIn(_0x3f7295,_0x543f4a,_0x301a7e,_0x45bef9){const _0x2a25b3=a23_0x1779;if(_0x45bef9)return Object[_0x2a25b3(0x78)][_0x2a25b3(0x74)]['call'](_0x301a7e,_0x3f7295)?'project':_0x2a25b3(0x6e);const _0x586304=Object['prototype'][_0x2a25b3(0x74)]['call'](_0x543f4a,_0x3f7295),_0x17810=Object[_0x2a25b3(0x78)][_0x2a25b3(0x74)][_0x2a25b3(0x7b)](_0x301a7e,_0x3f7295);if(_0x586304&&_0x17810)return _0x2a25b3(0x83);if(_0x17810)return _0x2a25b3(0x86);return _0x2a25b3(0x6e);}function a23_0x4080(){const _0x4aab10=['globalConfig','\x20(global)','inherit','prototype','object','name','call','613616iviUhB','47005itNWOZ','199318AyQOpv','isCurrent','154832UJZtgM','865oGmkPo','keys','both','trim','76527OIwUgB','project','currentApp','appcode','length','apps','named','global','defaultApp','projectConfig','3198XkfHeS','appCode','76354BvdtHu','hasOwnProperty'];a23_0x4080=function(){return _0x4aab10;};return a23_0x4080();}export function resolveDefaultAppSource(_0x35e5bf){const _0x537c80=a23_0x1779,_0x4edf16=_0x35e5bf[_0x537c80(0x70)][_0x537c80(0x6c)]&&typeof _0x35e5bf[_0x537c80(0x70)][_0x537c80(0x6c)]==='object'?_0x35e5bf[_0x537c80(0x70)]['apps']:{};if(_0x537c80(0x6f)in _0x35e5bf[_0x537c80(0x70)])return _0x537c80(0x86);if(Object['keys'](_0x4edf16)[_0x537c80(0x89)]>0x0)return _0x537c80(0x86);if(_0x35e5bf[_0x537c80(0x70)][_0x537c80(0x77)]===![])return null;if(_0x35e5bf[_0x537c80(0x75)][_0x537c80(0x6f)])return'global';return null;}export function getConfigPath(_0x4d83f8={}){const _0x6f3f4c=a23_0x1779,_0x5cceff=_0x4d83f8[_0x6f3f4c(0x6e)]?'global':_0x6f3f4c(0x86);return resolveWriteConfigPath(_0x5cceff);}export function readConfig(_0x59fa38={}){return readConfigFile(getConfigPath(_0x59fa38));}export function writeConfig(_0xcadc96,_0x5acd18={}){writeConfigFile(getConfigPath(_0x5acd18),_0xcadc96);}export function scopeLabel(_0x47a6f1){const _0x3bdc63=a23_0x1779;return _0x47a6f1[_0x3bdc63(0x6e)]?_0x3bdc63(0x76):'';}
1
+ (function(_0x4a7219,_0x4c19ab){const _0x3b3031=a23_0x4d61,_0x5bb8cd=_0x4a7219();while(!![]){try{const _0xbca843=parseInt(_0x3b3031(0x160))/0x1+parseInt(_0x3b3031(0x153))/0x2+parseInt(_0x3b3031(0x14c))/0x3*(-parseInt(_0x3b3031(0x162))/0x4)+parseInt(_0x3b3031(0x157))/0x5*(parseInt(_0x3b3031(0x150))/0x6)+parseInt(_0x3b3031(0x15d))/0x7+-parseInt(_0x3b3031(0x15f))/0x8+-parseInt(_0x3b3031(0x14b))/0x9;if(_0xbca843===_0x4c19ab)break;else _0x5bb8cd['push'](_0x5bb8cd['shift']());}catch(_0x5e2862){_0x5bb8cd['push'](_0x5bb8cd['shift']());}}}(a23_0x168f,0xbd527));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x179e29,_0x2b1922){const _0x349964=a23_0x4d61;if(!_0x2b1922)return;const _0x1530c9=_0x2b1922[_0x349964(0x156)]&&typeof _0x2b1922['apps']===_0x349964(0x166)?_0x2b1922[_0x349964(0x156)]:{},_0x451ab6=Object[_0x349964(0x163)](_0x1530c9)['length']>0x0;for(const _0x93775 of _0x179e29){_0x93775[_0x349964(0x15c)]=![];}const _0x3484d7=_0x2b1922[_0x349964(0x154)]!=null?String(_0x2b1922[_0x349964(0x154)])['trim']():'';if(_0x451ab6){const _0x2efa89=_0x2b1922['currentApp']??_0x2b1922[_0x349964(0x164)];if(_0x2efa89)for(const _0x53be6e of _0x179e29){_0x53be6e[_0x349964(0x159)]===!![]&&_0x53be6e['name']===_0x2efa89&&(_0x53be6e[_0x349964(0x15c)]=!![]);}for(const _0xe54b84 of _0x179e29){if(_0xe54b84[_0x349964(0x159)]!==![])continue;if(_0x2b1922['defaultApp'])continue;_0x3484d7&&String(_0xe54b84[_0x349964(0x161)]??'')[_0x349964(0x15b)]()===_0x3484d7&&(_0xe54b84[_0x349964(0x15c)]=!![]);}return;}if(!_0x3484d7)return;for(const _0x211763 of _0x179e29){String(_0x211763[_0x349964(0x161)]??'')['trim']()===_0x3484d7&&(_0x211763[_0x349964(0x15c)]=!![]);}}export function resolveAppScopeForWrite(_0x3e9802,_0x46f9e7,_0x2c9258){const _0x19d851=a23_0x4d61;if(_0x46f9e7)return _0x19d851(0x14f);const _0x21eab7=_0x2c9258[_0x19d851(0x165)][_0x19d851(0x156)]&&typeof _0x2c9258[_0x19d851(0x165)][_0x19d851(0x156)]==='object'?_0x2c9258[_0x19d851(0x165)][_0x19d851(0x156)]:{},_0x393c63=_0x2c9258[_0x19d851(0x151)][_0x19d851(0x156)]&&typeof _0x2c9258[_0x19d851(0x151)]['apps']==='object'?_0x2c9258[_0x19d851(0x151)][_0x19d851(0x156)]:{};if(Object[_0x19d851(0x14d)][_0x19d851(0x14a)]['call'](_0x21eab7,_0x3e9802))return'project';if(Object[_0x19d851(0x14d)][_0x19d851(0x14a)]['call'](_0x393c63,_0x3e9802))return'global';return _0x19d851(0x15e);}export function appDefinedIn(_0x45c6d3,_0x310edb,_0x7bccc5,_0x374a81){const _0x47da8f=a23_0x4d61;if(_0x374a81)return Object['prototype'][_0x47da8f(0x14a)][_0x47da8f(0x15a)](_0x7bccc5,_0x45c6d3)?_0x47da8f(0x15e):'global';const _0x326312=Object[_0x47da8f(0x14d)]['hasOwnProperty'][_0x47da8f(0x15a)](_0x310edb,_0x45c6d3),_0x30b190=Object[_0x47da8f(0x14d)]['hasOwnProperty']['call'](_0x7bccc5,_0x45c6d3);if(_0x326312&&_0x30b190)return _0x47da8f(0x158);if(_0x30b190)return _0x47da8f(0x15e);return _0x47da8f(0x14f);}function a23_0x4d61(_0x56d26b,_0x442233){_0x56d26b=_0x56d26b-0x14a;const _0x168f85=a23_0x168f();let _0x4d61a9=_0x168f85[_0x56d26b];return _0x4d61a9;}function a23_0x168f(){const _0x402a90=['4065AcbQnZ','both','named','call','trim','isCurrent','2034669jqWGbU','project','1800688vioOGr','1138180UmrfHM','appcode','12WrlQxD','keys','defaultApp','projectConfig','object','hasOwnProperty','3413223CRWUTN','1549290FVMgAb','prototype','\x20(global)','global','9624dQNCeK','globalConfig','length','392374sCVpfP','appCode','inherit','apps'];a23_0x168f=function(){return _0x402a90;};return a23_0x168f();}export function resolveDefaultAppSource(_0x219512){const _0x2d8a0a=a23_0x4d61,_0x128942=_0x219512[_0x2d8a0a(0x165)]['apps']&&typeof _0x219512[_0x2d8a0a(0x165)][_0x2d8a0a(0x156)]===_0x2d8a0a(0x166)?_0x219512[_0x2d8a0a(0x165)][_0x2d8a0a(0x156)]:{};if(_0x2d8a0a(0x164)in _0x219512[_0x2d8a0a(0x165)])return _0x2d8a0a(0x15e);if(Object['keys'](_0x128942)[_0x2d8a0a(0x152)]>0x0)return _0x2d8a0a(0x15e);if(_0x219512[_0x2d8a0a(0x165)][_0x2d8a0a(0x155)]===![])return null;if(_0x219512[_0x2d8a0a(0x151)]['defaultApp'])return _0x2d8a0a(0x14f);return null;}export function getConfigPath(_0xd50e9c={}){const _0x57bd83=a23_0x4d61,_0x46482b=_0xd50e9c['global']?_0x57bd83(0x14f):'project';return resolveWriteConfigPath(_0x46482b);}export function readConfig(_0x529319={}){return readConfigFile(getConfigPath(_0x529319));}export function writeConfig(_0x137ecd,_0x1afc28={}){writeConfigFile(getConfigPath(_0x1afc28),_0x137ecd);}export function scopeLabel(_0x2d0a50){const _0x42467f=a23_0x4d61;return _0x2d0a50[_0x42467f(0x14f)]?_0x42467f(0x14e):'';}
@@ -1 +1 @@
1
- function a24_0x3ea3(){const _0x4a0c8f=['args','204088WUtyyC','Available:\x20','9ETxfMX','use','128496NZVuDM','679AjmvTT','keys','trim','prototype','Switch\x20the\x20default\x20app','hasOwnProperty','12WRRYrb','Missing\x20app\x20name.','2564738LljFuS','join','apps','app','App\x20\x22','\x20app\x20add\x20','projectConfig','length','defaultApp','call','write','name','boolean','2305960JjokRg','\x0aNote:\x20\x22','bool','12trtFbt','App\x20profile\x20name\x20to\x20activate','\x22\x20not\x20found.','validation','Default\x20app\x20set\x20to\x20\x22','Usage:\x20','406292ZHDabo','global','\x20app\x20use\x20<name>\x20[--global]','\x20--appcode\x20<code>`\x20first.','302665pYeCGA','appcode','3936ncXoSx','Use\x20`','3infjqs'];a24_0x3ea3=function(){return _0x4a0c8f;};return a24_0x3ea3();}const a24_0x49d44d=a24_0x236c;function a24_0x236c(_0x43774a,_0x2fe1fc){_0x43774a=_0x43774a-0x171;const _0x3ea332=a24_0x3ea3();let _0x236c8f=_0x3ea332[_0x43774a];return _0x236c8f;}(function(_0x267671,_0x294067){const _0x8c5170=a24_0x236c,_0x531738=_0x267671();while(!![]){try{const _0x37e820=parseInt(_0x8c5170(0x196))/0x1*(parseInt(_0x8c5170(0x198))/0x2)+parseInt(_0x8c5170(0x19c))/0x3+parseInt(_0x8c5170(0x18e))/0x4+-parseInt(_0x8c5170(0x192))/0x5*(-parseInt(_0x8c5170(0x188))/0x6)+-parseInt(_0x8c5170(0x19d))/0x7*(-parseInt(_0x8c5170(0x194))/0x8)+-parseInt(_0x8c5170(0x19a))/0x9*(parseInt(_0x8c5170(0x185))/0xa)+-parseInt(_0x8c5170(0x178))/0xb*(parseInt(_0x8c5170(0x176))/0xc);if(_0x37e820===_0x294067)break;else _0x531738['push'](_0x531738['shift']());}catch(_0x3889c0){_0x531738['push'](_0x531738['shift']());}}}(a24_0x3ea3,0x25fb5));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(_0x2ea9e5){const _0x238022=a24_0x236c,_0x3ade77=_0x2ea9e5[_0x238022(0x197)][0x0]?.[_0x238022(0x172)]();if(!_0x3ade77)throw CliErrors[_0x238022(0x18b)](_0x238022(0x177),_0x238022(0x18d)+CLI_BIN_NAME+_0x238022(0x190));}async function execute(_0x40af52){const _0x2cb267=a24_0x236c,_0x3e75e0=_0x40af52[_0x2cb267(0x197)][0x0]?.[_0x2cb267(0x172)]();if(!_0x3e75e0)throw CliErrors[_0x2cb267(0x18b)](_0x2cb267(0x177),_0x2cb267(0x18d)+CLI_BIN_NAME+_0x2cb267(0x190));const _0x308dbb=_0x40af52[_0x2cb267(0x187)](_0x2cb267(0x18f)),{config:_0xa26a7b,layers:_0x4611f2}=readRawConfigWithLayers(),_0x1d5462=_0xa26a7b[_0x2cb267(0x17a)]??{};if(!_0x1d5462[_0x3e75e0]){const _0x43bebb=Object[_0x2cb267(0x171)](_0x1d5462),_0xeb1cea=_0x43bebb[_0x2cb267(0x17f)]===0x0?_0x2cb267(0x195)+CLI_BIN_NAME+_0x2cb267(0x17d)+_0x3e75e0+_0x2cb267(0x191):_0x2cb267(0x199)+_0x43bebb[_0x2cb267(0x179)](',\x20');throw CliErrors[_0x2cb267(0x18b)](_0x2cb267(0x17c)+_0x3e75e0+_0x2cb267(0x18a),_0xeb1cea);}let _0x4c1470,_0x226dac='';if(_0x308dbb)_0x4c1470={'global':!![]};else{const _0x2d6769=isInProject()&&!!_0x4611f2['projectPath'];_0x4c1470={'global':!_0x2d6769};if(_0x2d6769){const _0xdedcc9=_0x4611f2[_0x2cb267(0x17e)][_0x2cb267(0x17a)]&&typeof _0x4611f2[_0x2cb267(0x17e)][_0x2cb267(0x17a)]==='object'?_0x4611f2[_0x2cb267(0x17e)][_0x2cb267(0x17a)]:{};!Object[_0x2cb267(0x173)][_0x2cb267(0x175)][_0x2cb267(0x181)](_0xdedcc9,_0x3e75e0)&&(_0x226dac=_0x2cb267(0x186)+_0x3e75e0+'\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.');}}const _0xbfa3ca=readConfig(_0x4c1470);return _0xbfa3ca[_0x2cb267(0x180)]=_0x3e75e0,writeConfig(_0xbfa3ca,_0x4c1470),{'ok':!![],'message':_0x2cb267(0x18c)+_0x3e75e0+'\x22\x20(appcode:\x20'+_0x1d5462[_0x3e75e0][_0x2cb267(0x193)]+')'+scopeLabel(_0x4c1470)+_0x226dac};}export const appUseDefinition={'service':a24_0x49d44d(0x17b),'command':a24_0x49d44d(0x19b),'description':a24_0x49d44d(0x174),'risk':a24_0x49d44d(0x182),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a24_0x49d44d(0x183),'description':a24_0x49d44d(0x189),'required':!![]}],'flags':[{'name':a24_0x49d44d(0x18f),'type':a24_0x49d44d(0x184),'description':'Use\x20global\x20config\x20scope','default':![]}],'validate':validateArgs,'execute':execute};
1
+ const a24_0x22833a=a24_0xf0cf;(function(_0x6174b7,_0x44fe18){const _0x3c9768=a24_0xf0cf,_0x4ca55b=_0x6174b7();while(!![]){try{const _0x3444b3=parseInt(_0x3c9768(0xf4))/0x1+-parseInt(_0x3c9768(0xea))/0x2*(parseInt(_0x3c9768(0xeb))/0x3)+parseInt(_0x3c9768(0xe9))/0x4*(parseInt(_0x3c9768(0x10d))/0x5)+parseInt(_0x3c9768(0xfc))/0x6*(parseInt(_0x3c9768(0xe7))/0x7)+-parseInt(_0x3c9768(0xf1))/0x8+-parseInt(_0x3c9768(0x10a))/0x9*(parseInt(_0x3c9768(0xf0))/0xa)+-parseInt(_0x3c9768(0xf7))/0xb*(-parseInt(_0x3c9768(0xf2))/0xc);if(_0x3444b3===_0x44fe18)break;else _0x4ca55b['push'](_0x4ca55b['shift']());}catch(_0x220fbb){_0x4ca55b['push'](_0x4ca55b['shift']());}}}(a24_0x2bf8,0x3a40d));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(_0x5a24e7){const _0x3c07b8=a24_0xf0cf,_0x1b336f=_0x5a24e7[_0x3c07b8(0xf5)][0x0]?.['trim']();if(!_0x1b336f)throw CliErrors[_0x3c07b8(0xff)](_0x3c07b8(0xed),_0x3c07b8(0x108)+CLI_BIN_NAME+_0x3c07b8(0xfb));}function a24_0x2bf8(){const _0x91dc80=['24iSEpps','projectConfig','8206MICDXp','args','bool','1034627VCgRbx','appcode','boolean','defaultApp','\x20app\x20use\x20<name>\x20[--global]','6XAEaFH','\x22\x20is\x20defined\x20in\x20global\x20config;\x20defaultApp\x20written\x20to\x20project\x20to\x20take\x20effect\x20in\x20merged\x20view.','\x20--appcode\x20<code>`\x20first.','validation','keys','write','Use\x20global\x20config\x20scope','\x22\x20not\x20found.','Available:\x20','prototype','Switch\x20the\x20default\x20app','App\x20profile\x20name\x20to\x20activate','Usage:\x20','global','189171ctpfWr','App\x20\x22','length','13375DDwvmI','1984381hinqGS','projectPath','616GvJjBA','4902TvLfzI','429uYBkkC','object','Missing\x20app\x20name.','use','apps','50ShyDJm','1580480aBJQmR'];a24_0x2bf8=function(){return _0x91dc80;};return a24_0x2bf8();}function a24_0xf0cf(_0x3831e8,_0x2bacfc){_0x3831e8=_0x3831e8-0xe7;const _0x2bf81c=a24_0x2bf8();let _0xf0cf6c=_0x2bf81c[_0x3831e8];return _0xf0cf6c;}async function execute(_0x289b76){const _0x425ce0=a24_0xf0cf,_0x1dc471=_0x289b76['args'][0x0]?.['trim']();if(!_0x1dc471)throw CliErrors['validation'](_0x425ce0(0xed),'Usage:\x20'+CLI_BIN_NAME+_0x425ce0(0xfb));const _0x3bbf=_0x289b76[_0x425ce0(0xf6)](_0x425ce0(0x109)),{config:_0x4cd61a,layers:_0x4c76ff}=readRawConfigWithLayers(),_0x28d504=_0x4cd61a['apps']??{};if(!_0x28d504[_0x1dc471]){const _0x38636e=Object[_0x425ce0(0x100)](_0x28d504),_0x36e8c7=_0x38636e[_0x425ce0(0x10c)]===0x0?'Use\x20`'+CLI_BIN_NAME+'\x20app\x20add\x20'+_0x1dc471+_0x425ce0(0xfe):_0x425ce0(0x104)+_0x38636e['join'](',\x20');throw CliErrors[_0x425ce0(0xff)](_0x425ce0(0x10b)+_0x1dc471+_0x425ce0(0x103),_0x36e8c7);}let _0x4ee7d8,_0x1e0616='';if(_0x3bbf)_0x4ee7d8={'global':!![]};else{const _0x5b4881=isInProject()&&!!_0x4c76ff[_0x425ce0(0xe8)];_0x4ee7d8={'global':!_0x5b4881};if(_0x5b4881){const _0x25405a=_0x4c76ff[_0x425ce0(0xf3)][_0x425ce0(0xef)]&&typeof _0x4c76ff[_0x425ce0(0xf3)]['apps']===_0x425ce0(0xec)?_0x4c76ff[_0x425ce0(0xf3)][_0x425ce0(0xef)]:{};!Object[_0x425ce0(0x105)]['hasOwnProperty']['call'](_0x25405a,_0x1dc471)&&(_0x1e0616='\x0aNote:\x20\x22'+_0x1dc471+_0x425ce0(0xfd));}}const _0x4c3cdb=readConfig(_0x4ee7d8);return _0x4c3cdb[_0x425ce0(0xfa)]=_0x1dc471,writeConfig(_0x4c3cdb,_0x4ee7d8),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0x1dc471+'\x22\x20(appcode:\x20'+_0x28d504[_0x1dc471][_0x425ce0(0xf8)]+')'+scopeLabel(_0x4ee7d8)+_0x1e0616};}export const appUseDefinition={'service':'app','command':a24_0x22833a(0xee),'description':a24_0x22833a(0x106),'risk':a24_0x22833a(0x101),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a24_0x22833a(0x107),'required':!![]}],'flags':[{'name':a24_0x22833a(0x109),'type':a24_0x22833a(0xf9),'description':a24_0x22833a(0x102),'default':![]}],'validate':validateArgs,'execute':execute};
@@ -1 +1 @@
1
- const a25_0x549139=a25_0x6733;function a25_0x6733(_0x3d5912,_0x39b11d){_0x3d5912=_0x3d5912-0x1d4;const _0x1cfb65=a25_0x1cfb();let _0x673397=_0x1cfb65[_0x3d5912];return _0x673397;}(function(_0x59df65,_0x494a0c){const _0x647a7d=a25_0x6733,_0x528260=_0x59df65();while(!![]){try{const _0x3559e9=-parseInt(_0x647a7d(0x1d8))/0x1+parseInt(_0x647a7d(0x1df))/0x2+parseInt(_0x647a7d(0x1e5))/0x3+parseInt(_0x647a7d(0x1d9))/0x4*(-parseInt(_0x647a7d(0x1e1))/0x5)+-parseInt(_0x647a7d(0x1e3))/0x6*(-parseInt(_0x647a7d(0x1db))/0x7)+-parseInt(_0x647a7d(0x1e2))/0x8*(parseInt(_0x647a7d(0x1dc))/0x9)+parseInt(_0x647a7d(0x1da))/0xa*(parseInt(_0x647a7d(0x1e0))/0xb);if(_0x3559e9===_0x494a0c)break;else _0x528260['push'](_0x528260['shift']());}catch(_0x4a614f){_0x528260['push'](_0x528260['shift']());}}}(a25_0x1cfb,0x19930));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';function a25_0x1cfb(){const _0x109c01=['114954xRQRBY','read','258435qbDAiw','write','login','Login\x20via\x20browser','✓\x20Logged\x20out','!\x20Not\x20logged\x20in','logout','../../auth/auth-server-ui.js','154259KZUZbj','455272diRNAz','910JCzfKy','70RIlMUY','5013NrYsBl','log','auth','95568hMRWNG','8008oGoCOZ','5OQoyYs','272Qbtita'];a25_0x1cfb=function(){return _0x109c01;};return a25_0x1cfb();}export const authDefinitions=[{'service':'auth','command':a25_0x549139(0x1e7),'description':a25_0x549139(0x1e8),'risk':a25_0x549139(0x1e4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3608fd){const _0x198780=a25_0x549139,{runAuthServer:_0x2753f3}=await import(_0x198780(0x1d7));return await _0x2753f3(),{'ok':!![]};}},{'service':a25_0x549139(0x1de),'command':a25_0x549139(0x1d6),'description':'Clear\x20login\x20session','risk':a25_0x549139(0x1e6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x14eb4b){const _0x1d63ac=a25_0x549139;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1d63ac(0x1dd)](_0x1d63ac(0x1d4))):console[_0x1d63ac(0x1dd)](_0x1d63ac(0x1d5)),{'ok':!![]};}}];
1
+ function a25_0x2179(_0x17a8bd,_0x56c3c8){_0x17a8bd=_0x17a8bd-0xca;const _0x734409=a25_0x7344();let _0x21791e=_0x734409[_0x17a8bd];return _0x21791e;}const a25_0x21f7fb=a25_0x2179;(function(_0x5e2e38,_0x83d655){const _0x486475=a25_0x2179,_0x926abc=_0x5e2e38();while(!![]){try{const _0x31d647=parseInt(_0x486475(0xda))/0x1*(-parseInt(_0x486475(0xdd))/0x2)+parseInt(_0x486475(0xd1))/0x3+-parseInt(_0x486475(0xd0))/0x4+parseInt(_0x486475(0xcd))/0x5+parseInt(_0x486475(0xd2))/0x6*(parseInt(_0x486475(0xd7))/0x7)+-parseInt(_0x486475(0xd3))/0x8*(parseInt(_0x486475(0xcc))/0x9)+parseInt(_0x486475(0xd8))/0xa*(parseInt(_0x486475(0xce))/0xb);if(_0x31d647===_0x83d655)break;else _0x926abc['push'](_0x926abc['shift']());}catch(_0x1e230){_0x926abc['push'](_0x926abc['shift']());}}}(a25_0x7344,0xaf7a0));function a25_0x7344(){const _0x629fdd=['2199716EGrvio','22512vqqiSG','30jUyWhV','1175920KTlRBM','Clear\x20login\x20session','read','auth','1121379tuHGsg','102710xkEjHM','write','29BQgDpa','login','log','51602tKZSYR','Login\x20via\x20browser','logout','27qiLibT','2546550nApBTD','1221sothXn','✓\x20Logged\x20out'];a25_0x7344=function(){return _0x629fdd;};return a25_0x7344();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a25_0x21f7fb(0xd6),'command':a25_0x21f7fb(0xdb),'description':a25_0x21f7fb(0xca),'risk':a25_0x21f7fb(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a21e2){const {runAuthServer:_0x3ae7e4}=await import('../../auth/auth-server-ui.js');return await _0x3ae7e4(),{'ok':!![]};}},{'service':'auth','command':a25_0x21f7fb(0xcb),'description':a25_0x21f7fb(0xd4),'risk':a25_0x21f7fb(0xd9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1ac8a4){const _0xcec0ff=a25_0x21f7fb;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0xcec0ff(0xdc)](_0xcec0ff(0xcf))):console['log']('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a26_0x3be201=a26_0x10b1;(function(_0x83c061,_0x1e3d1c){const _0x2e25c3=a26_0x10b1,_0x173c70=_0x83c061();while(!![]){try{const _0x14bc2a=-parseInt(_0x2e25c3(0x18a))/0x1*(parseInt(_0x2e25c3(0x143))/0x2)+parseInt(_0x2e25c3(0x16a))/0x3+-parseInt(_0x2e25c3(0x18e))/0x4*(parseInt(_0x2e25c3(0x184))/0x5)+parseInt(_0x2e25c3(0x18b))/0x6+parseInt(_0x2e25c3(0x16f))/0x7*(-parseInt(_0x2e25c3(0x183))/0x8)+-parseInt(_0x2e25c3(0x14d))/0x9+parseInt(_0x2e25c3(0x190))/0xa;if(_0x14bc2a===_0x1e3d1c)break;else _0x173c70['push'](_0x173c70['shift']());}catch(_0xdbebb8){_0x173c70['push'](_0x173c70['shift']());}}}(a26_0xf334,0x6ebf4));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';function a26_0xf334(){const _0x3a21bd=['--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','write','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','length','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Script\x20description','parseInt','stdin','alias','.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','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','utf8','COMMON','stderr','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','function-node','\x22\x20not\x20found.\x20','Function\x20name\x20(valid\x20JS\x20identifier)','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','5106296VbXGHY','136870HTWiqe','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','close','create','tableName','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','155VKYYCQ','955908CNCBAA','datasetcode','operationType','52NsTspF','\x22.\x20','16438990qCzbFX','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','bff','\x20api\x20pull`\x20to\x20refresh.','\x0a\x20*\x20[触发节点]\x20','appCode','HOOK','Select\x20dataset:','description','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','functionNode','includes','Select\x20operation\x20type:','.js','string','3462hGNUbw','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','nonInteractive','Available\x20aliases:\x20','entries','before','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Invalid\x20function\x20name\x20\x22','Trigger\x20node\x20(HOOK\x20only)','join','6518250aKtDzV','\x20function:\x20','Created\x20','scriptsRootDir','Operation\x20type\x20\x22','find','No\x20operation\x20types\x20found\x20for\x20dataset\x20','keys','name','Dataset\x20not\x20found\x20for\x20code\x20\x22','File\x20already\x20exists:\x20','Script\x20type','datasetCode','\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','validation','after','apiDir','No\x20api.ts\x20found.\x20Run\x20`','question','Available:\x20','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','ENDPOINT','Invalid\x20dataset\x20selection.','map','trim','code','Operation\x20type\x20(HOOK\x20only)','Select\x20trigger\x20node:','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','1911321glBzzS','str','Alias\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','TODO:\x20add\x20script\x20description','7XGMxgX'];a26_0xf334=function(){return _0x3a21bd;};return a26_0xf334();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a26_0x3be201(0x192),'command':a26_0x3be201(0x187),'description':a26_0x3be201(0x199),'risk':a26_0x3be201(0x171),'flags':[{'name':'type','type':a26_0x3be201(0x142),'required':!![],'enum':[a26_0x3be201(0x17c),a26_0x3be201(0x162),a26_0x3be201(0x196)],'description':a26_0x3be201(0x158)},{'name':a26_0x3be201(0x155),'type':a26_0x3be201(0x142),'required':!![],'description':a26_0x3be201(0x181)},{'name':a26_0x3be201(0x198),'type':'string','description':a26_0x3be201(0x175)},{'name':a26_0x3be201(0x178),'type':a26_0x3be201(0x142),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a26_0x3be201(0x18c),'type':a26_0x3be201(0x142),'description':a26_0x3be201(0x149)},{'name':'operation-type','type':a26_0x3be201(0x142),'description':a26_0x3be201(0x167)},{'name':'function-node','type':a26_0x3be201(0x142),'description':a26_0x3be201(0x14b),'enum':[a26_0x3be201(0x148),'after']}],async 'validate'(_0x40fd15){const _0xa515c5=a26_0x3be201,_0x5ed8c8=_0x40fd15['str']('name');if(!isValidBffFunctionName(_0x5ed8c8))throw CliErrors[_0xa515c5(0x15b)](_0xa515c5(0x14a)+_0x5ed8c8+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x1efb88){const _0x27adec=a26_0x3be201,_0x316302=loadBffProjectConfig(_0x1efb88['appCode']),_0x3edfd7=_0x1efb88[_0x27adec(0x16b)]('type'),_0x28abbc=_0x1efb88['str'](_0x27adec(0x155)),_0x5cf320=_0x1efb88['str'](_0x27adec(0x198))||undefined,_0x35f56d=_0x3edfd7==='HOOK'?await resolveHookOptions(_0x316302,_0x1efb88):undefined,_0x275416=buildFilePath(_0x316302,_0x3edfd7,_0x28abbc,_0x35f56d);if(await fileExists(_0x275416))throw CliErrors['validation'](_0x27adec(0x157)+_0x275416);await mkdir(dirname(_0x275416),{'recursive':!![]});const _0x4b5394=generateTemplate(_0x3edfd7,_0x28abbc,_0x1efb88[_0x27adec(0x195)],_0x5cf320,_0x35f56d);await writeFile(_0x275416,_0x4b5394,_0x27adec(0x17b));const _0x15de42={'type':_0x3edfd7,'name':_0x28abbc,'path':_0x275416};if(_0x5cf320)_0x15de42[_0x27adec(0x198)]=_0x5cf320;if(_0x35f56d){if(_0x35f56d[_0x27adec(0x178)])_0x15de42[_0x27adec(0x178)]=_0x35f56d[_0x27adec(0x178)];_0x15de42[_0x27adec(0x159)]=_0x35f56d[_0x27adec(0x159)],_0x15de42[_0x27adec(0x18d)]=_0x35f56d[_0x27adec(0x18d)],_0x15de42['functionNode']=_0x35f56d[_0x27adec(0x19a)];}return{'ok':!![],'data':_0x15de42,'message':_0x27adec(0x14f)+_0x3edfd7+_0x27adec(0x14e)+_0x28abbc};}};async function resolveHookOptions(_0x3e1ded,_0xbc3cce){const _0x13a070=a26_0x3be201,_0x4367e5=loadAliasMap(_0xbc3cce['apiDir'],undefined,resolveApiFilePath(_0xbc3cce[_0x13a070(0x15d)],_0xbc3cce['appCode'])),_0x9108c=_0x4367e5[_0x13a070(0x173)]>0x0;let _0x2582c2,_0x1a2632,_0x3a9ac5;const _0x11d001=_0xbc3cce['str']('alias'),_0xa24bf4=_0xbc3cce[_0x13a070(0x16b)](_0x13a070(0x18c));if(_0x11d001){const _0x2826e9=resolveAlias(_0xbc3cce[_0x13a070(0x15d)],_0x11d001,undefined,resolveApiFilePath(_0xbc3cce[_0x13a070(0x15d)],_0xbc3cce['appCode']));if(!_0x2826e9){const _0x494771=_0x9108c?_0x13a070(0x146)+_0x4367e5[_0x13a070(0x164)](_0x2723da=>_0x2723da['alias'])[_0x13a070(0x14c)](',\x20'):_0x13a070(0x15e)+CLI_BIN_NAME+_0x13a070(0x169);throw CliErrors['validation'](_0x13a070(0x16c)+_0x11d001+_0x13a070(0x180)+_0x494771);}_0x2582c2=_0x11d001,_0x1a2632=_0x2826e9;}else{if(_0xa24bf4){_0x1a2632=_0xa24bf4;const _0x5f4e5f=_0x4367e5[_0x13a070(0x152)](_0x5e024a=>_0x5e024a['datasetCode']===_0xa24bf4);_0x2582c2=_0x5f4e5f?.[_0x13a070(0x178)];}else{if(_0xbc3cce[_0x13a070(0x145)])throw CliErrors['validation'](_0x13a070(0x170));else{if(_0x9108c){const _0x140dd4=_0x4367e5['map'](_0x36bec6=>_0x36bec6[_0x13a070(0x178)]+'\x20('+_0x36bec6[_0x13a070(0x188)]+')'),_0x2c8ddb=await promptSelect(_0x13a070(0x197),_0x140dd4),_0x16fe36=_0x4367e5[_0x2c8ddb];if(!_0x16fe36)throw CliErrors[_0x13a070(0x15b)](_0x13a070(0x163));_0x2582c2=_0x16fe36[_0x13a070(0x178)],_0x1a2632=_0x16fe36[_0x13a070(0x159)];}else{const _0x1ef0f1=await listDatasets(_0xbc3cce[_0x13a070(0x195)]);if(_0x1ef0f1[_0x13a070(0x173)]===0x0)throw CliErrors['validation']('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x2dfb5f=_0x1ef0f1[_0x13a070(0x164)](_0x8ae992=>_0x8ae992[_0x13a070(0x155)]+'\x20('+_0x8ae992[_0x13a070(0x166)]+')'),_0x41d013=await promptSelect(_0x13a070(0x197),_0x2dfb5f),_0x6cc9c5=_0x1ef0f1[_0x41d013];if(!_0x6cc9c5)throw CliErrors[_0x13a070(0x15b)](_0x13a070(0x163));_0x1a2632=_0x6cc9c5['code'],_0x2582c2=undefined;}}}}const _0xfa5eed=await listDatasets(_0xbc3cce[_0x13a070(0x195)]),_0x1ddaa0=_0xfa5eed[_0x13a070(0x152)](_0x51f677=>_0x51f677[_0x13a070(0x166)]===_0x1a2632);if(!_0x1ddaa0)throw CliErrors[_0x13a070(0x15b)](_0x13a070(0x156)+_0x1a2632+_0x13a070(0x18f)+(_0x2582c2?_0x13a070(0x17e)+CLI_BIN_NAME+_0x13a070(0x193):''));_0x3a9ac5=_0x1ddaa0['id'];const _0xfbbafa=_0x2582c2??_0x1a2632,_0x180e33=await listBffDatasetOperations(_0xbc3cce[_0x13a070(0x195)],_0x3a9ac5),_0x5c00ed=_0x180e33?Object[_0x13a070(0x154)](_0x180e33):[];if(_0x5c00ed[_0x13a070(0x173)]===0x0)throw CliErrors[_0x13a070(0x15b)](_0x13a070(0x153)+_0xfbbafa+'.');let _0x1fad6d;const _0x3ead22=_0xbc3cce[_0x13a070(0x16b)]('operation-type');if(_0x3ead22){if(!_0x5c00ed[_0x13a070(0x19b)](_0x3ead22))throw CliErrors['validation'](_0x13a070(0x151)+_0x3ead22+_0x13a070(0x16d)+_0xfbbafa+'.\x20'+(_0x13a070(0x160)+_0x5c00ed['join'](',\x20')));_0x1fad6d=_0x3ead22;}else{if(_0xbc3cce[_0x13a070(0x145)])throw CliErrors['validation'](_0x13a070(0x185));const _0x4afbf4=await promptSelect(_0x13a070(0x140),_0x5c00ed);_0x1fad6d=_0x5c00ed[_0x4afbf4]??_0x5c00ed[0x0];}let _0x21d487=normalizeHookFunctionNode(_0xbc3cce[_0x13a070(0x16b)](_0x13a070(0x17f)));if(!_0x21d487){if(_0xbc3cce[_0x13a070(0x16b)](_0x13a070(0x17f)))throw CliErrors['validation']('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0xbc3cce[_0x13a070(0x145)])throw CliErrors[_0x13a070(0x15b)](_0x13a070(0x161));const _0x530f7b=await promptSelect(_0x13a070(0x168),[_0x13a070(0x148),_0x13a070(0x15c)]);_0x21d487=[_0x13a070(0x148),'after'][_0x530f7b]??'before';}return{'alias':_0x2582c2,'datasetCode':_0x1a2632,'datasetId':_0x3a9ac5,'operationType':_0x1fad6d,'functionNode':_0x21d487};}async function promptSelect(_0x4395bb,_0x490ced){const _0x2f7e21=a26_0x3be201;if(_0x490ced[_0x2f7e21(0x173)]===0x1)return 0x0;for(const [_0x156d6b,_0x5eb319]of _0x490ced[_0x2f7e21(0x147)]()){process[_0x2f7e21(0x17d)][_0x2f7e21(0x171)]('\x20\x20'+(_0x156d6b+0x1)+'.\x20'+_0x5eb319+'\x0a');}const _0x219fbf=createInterface({'input':process[_0x2f7e21(0x177)],'output':process['stderr']});while(!![]){const _0x3bc3cf=await new Promise(_0x2853bb=>{const _0x2e4d11=_0x2f7e21;_0x219fbf[_0x2e4d11(0x15f)](_0x4395bb+'\x20',_0x2853bb);}),_0x53125a=Number[_0x2f7e21(0x176)](_0x3bc3cf[_0x2f7e21(0x165)](),0xa);if(Number['isInteger'](_0x53125a)&&_0x53125a>=0x1&&_0x53125a<=_0x490ced[_0x2f7e21(0x173)])return _0x219fbf[_0x2f7e21(0x186)](),_0x53125a-0x1;process[_0x2f7e21(0x17d)][_0x2f7e21(0x171)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x490ced[_0x2f7e21(0x173)]+'.\x0a');}}function a26_0x10b1(_0x5f2444,_0x2536de){_0x5f2444=_0x5f2444-0x140;const _0xf334e8=a26_0xf334();let _0x10b153=_0xf334e8[_0x5f2444];return _0x10b153;}function buildFilePath(_0x4d098b,_0x4e3613,_0x3e462b,_0x137884){const _0x293f77=a26_0x3be201;if(_0x4e3613===_0x293f77(0x196)){if(!_0x137884)throw CliErrors[_0x293f77(0x15b)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x189e8b=_0x137884[_0x293f77(0x178)]??_0x137884[_0x293f77(0x159)];return join(_0x4d098b[_0x293f77(0x150)],'HOOK',_0x189e8b,_0x137884[_0x293f77(0x18d)],_0x137884['functionNode'],_0x3e462b+_0x293f77(0x141));}return join(_0x4d098b[_0x293f77(0x150)],_0x4e3613,_0x3e462b+_0x293f77(0x141));}export function generateTemplate(_0x3c5a2e,_0x2db0b3,_0xc5550,_0x4c015c,_0x2ac850){const _0x2ca4c5=a26_0x3be201,_0x293aec=_0x4c015c?.[_0x2ca4c5(0x165)]()||_0x2ca4c5(0x16e);if(_0x3c5a2e===_0x2ca4c5(0x17c))return _0x2ca4c5(0x174)+_0x293aec+'\x0a\x20*\x20[脚本名称]\x20'+_0x2db0b3+_0x2ca4c5(0x189)+_0x2db0b3+_0x2ca4c5(0x179)+_0x2db0b3+_0x2ca4c5(0x182);if(_0x3c5a2e===_0x2ca4c5(0x162))return _0x2ca4c5(0x17a)+_0x293aec+_0x2ca4c5(0x172)+_0xc5550+'/'+_0x2db0b3+_0x2ca4c5(0x15a)+_0x2db0b3+_0x2ca4c5(0x182);if(!_0x2ac850)throw CliErrors['validation'](_0x2ca4c5(0x144));return _0x2ca4c5(0x191)+_0x293aec+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0xc5550+'/'+_0x2ac850[_0x2ca4c5(0x159)]+'/'+_0x2ac850[_0x2ca4c5(0x18d)]+_0x2ca4c5(0x194)+_0x2ac850[_0x2ca4c5(0x19a)]+'\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'+_0x2db0b3+_0x2ca4c5(0x182);}
1
+ const a26_0x41385e=a26_0x1f0b;(function(_0x1f9c93,_0x555e05){const _0x277c07=a26_0x1f0b,_0x3f607c=_0x1f9c93();while(!![]){try{const _0x887133=parseInt(_0x277c07(0xbf))/0x1+parseInt(_0x277c07(0xfa))/0x2+parseInt(_0x277c07(0xaa))/0x3+-parseInt(_0x277c07(0xb5))/0x4*(parseInt(_0x277c07(0xc1))/0x5)+-parseInt(_0x277c07(0xc4))/0x6*(parseInt(_0x277c07(0xff))/0x7)+-parseInt(_0x277c07(0xf7))/0x8*(-parseInt(_0x277c07(0xd0))/0x9)+parseInt(_0x277c07(0xc0))/0xa*(-parseInt(_0x277c07(0xc8))/0xb);if(_0x887133===_0x555e05)break;else _0x3f607c['push'](_0x3f607c['shift']());}catch(_0x234240){_0x3f607c['push'](_0x3f607c['shift']());}}}(a26_0x12d8,0xdc95e));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a26_0x1f0b(_0x2b0b79,_0x4777f6){_0x2b0b79=_0x2b0b79-0xa6;const _0x12d85e=a26_0x12d8();let _0x1f0bc4=_0x12d85e[_0x2b0b79];return _0x1f0bc4;}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a26_0x12d8(){const _0x245828=['Select\x20operation\x20type:','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','\x22\x20not\x20found.\x20','Script\x20type','Alias\x20\x22','datasetCode','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','40zgJFQX','Invalid\x20function\x20name\x20\x22','map','File\x20already\x20exists:\x20','bff','close','Operation\x20type\x20\x22','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','question','join','793423MgdPvp','13900kENNYP','786215NpptBK','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','stderr','22980AaBkRo','Available\x20aliases:\x20','\x22.\x20','keys','7469fNezdQ','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','validation','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','ENDPOINT','\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','\x22\x20not\x20found\x20for\x20dataset\x20','1688139McUBvn','operation-type','.js','HOOK','Invalid\x20dataset\x20selection.','trim','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','length','Dataset\x20not\x20found\x20for\x20code\x20\x22','TODO:\x20add\x20script\x20description','tableName','create','\x0a\x20*\x20[触发节点]\x20','Script\x20description','operationType','name','functionNode','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','datasetcode','isInteger','\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','.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','\x20api\x20pull`\x20to\x20refresh.','Created\x20','type','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','No\x20datasets\x20found\x20for\x20this\x20app.','code','appCode','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','includes','alias','\x20function:\x20','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','utf8','parseInt','nonInteractive','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','apiDir','8FHwtuR','Select\x20dataset:','description','3376348jfjCEo','function-node','write','str','before','1673xrfgyK','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','after','Select\x20trigger\x20node:','scriptsRootDir','4997880kQhMJp','Trigger\x20node\x20(HOOK\x20only)','string'];a26_0x12d8=function(){return _0x245828;};return a26_0x12d8();}export const bffCreate={'service':a26_0x41385e(0xb9),'command':a26_0x41385e(0xdb),'description':a26_0x41385e(0xbc),'risk':a26_0x41385e(0xfc),'flags':[{'name':a26_0x41385e(0xe8),'type':'string','required':!![],'enum':['COMMON',a26_0x41385e(0xcd),'HOOK'],'description':a26_0x41385e(0xb0)},{'name':a26_0x41385e(0xdf),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a26_0x41385e(0xac),'description':a26_0x41385e(0xdd)},{'name':a26_0x41385e(0xef),'type':'string','description':a26_0x41385e(0xcc)},{'name':'datasetcode','type':a26_0x41385e(0xac),'description':a26_0x41385e(0xc2)},{'name':a26_0x41385e(0xd1),'type':'string','description':'Operation\x20type\x20(HOOK\x20only)'},{'name':'function-node','type':a26_0x41385e(0xac),'description':a26_0x41385e(0xab),'enum':[a26_0x41385e(0xfe),a26_0x41385e(0xa7)]}],async 'validate'(_0x5d7bc0){const _0x236538=a26_0x41385e,_0x3a47fb=_0x5d7bc0['str']('name');if(!isValidBffFunctionName(_0x3a47fb))throw CliErrors[_0x236538(0xca)](_0x236538(0xb6)+_0x3a47fb+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x1cc758){const _0x174c0b=a26_0x41385e,_0x1cb9fa=loadBffProjectConfig(_0x1cc758[_0x174c0b(0xec)]),_0x41ae7e=_0x1cc758[_0x174c0b(0xfd)]('type'),_0x52373b=_0x1cc758[_0x174c0b(0xfd)]('name'),_0x2f14c0=_0x1cc758[_0x174c0b(0xfd)](_0x174c0b(0xf9))||undefined,_0x4479c1=_0x41ae7e===_0x174c0b(0xd3)?await resolveHookOptions(_0x1cb9fa,_0x1cc758):undefined,_0x578e2c=buildFilePath(_0x1cb9fa,_0x41ae7e,_0x52373b,_0x4479c1);if(await fileExists(_0x578e2c))throw CliErrors[_0x174c0b(0xca)](_0x174c0b(0xb8)+_0x578e2c);await mkdir(dirname(_0x578e2c),{'recursive':!![]});const _0x3c54b1=generateTemplate(_0x41ae7e,_0x52373b,_0x1cc758[_0x174c0b(0xec)],_0x2f14c0,_0x4479c1);await writeFile(_0x578e2c,_0x3c54b1,_0x174c0b(0xf2));const _0x2d2301={'type':_0x41ae7e,'name':_0x52373b,'path':_0x578e2c};if(_0x2f14c0)_0x2d2301['description']=_0x2f14c0;if(_0x4479c1){if(_0x4479c1[_0x174c0b(0xef)])_0x2d2301['alias']=_0x4479c1['alias'];_0x2d2301[_0x174c0b(0xb2)]=_0x4479c1[_0x174c0b(0xb2)],_0x2d2301[_0x174c0b(0xde)]=_0x4479c1[_0x174c0b(0xde)],_0x2d2301[_0x174c0b(0xe0)]=_0x4479c1[_0x174c0b(0xe0)];}return{'ok':!![],'data':_0x2d2301,'message':_0x174c0b(0xe7)+_0x41ae7e+_0x174c0b(0xf0)+_0x52373b};}};async function resolveHookOptions(_0x3ad416,_0x492927){const _0x1ad090=a26_0x41385e,_0x3bb811=loadAliasMap(_0x492927[_0x1ad090(0xf6)],undefined,resolveApiFilePath(_0x492927[_0x1ad090(0xf6)],_0x492927[_0x1ad090(0xec)])),_0x3c84c6=_0x3bb811['length']>0x0;let _0x5c3611,_0xaa65f2,_0x2d2577;const _0x21169a=_0x492927[_0x1ad090(0xfd)]('alias'),_0x2905e5=_0x492927[_0x1ad090(0xfd)](_0x1ad090(0xe2));if(_0x21169a){const _0x19bc20=resolveAlias(_0x492927[_0x1ad090(0xf6)],_0x21169a,undefined,resolveApiFilePath(_0x492927[_0x1ad090(0xf6)],_0x492927[_0x1ad090(0xec)]));if(!_0x19bc20){const _0x24a708=_0x3c84c6?_0x1ad090(0xc5)+_0x3bb811['map'](_0x2039cf=>_0x2039cf[_0x1ad090(0xef)])[_0x1ad090(0xbe)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x1ad090(0xa6);throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xb1)+_0x21169a+_0x1ad090(0xaf)+_0x24a708);}_0x5c3611=_0x21169a,_0xaa65f2=_0x19bc20;}else{if(_0x2905e5){_0xaa65f2=_0x2905e5;const _0x179288=_0x3bb811['find'](_0x1866c6=>_0x1866c6[_0x1ad090(0xb2)]===_0x2905e5);_0x5c3611=_0x179288?.[_0x1ad090(0xef)];}else{if(_0x492927[_0x1ad090(0xf4)])throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xe1));else{if(_0x3c84c6){const _0x43911e=_0x3bb811[_0x1ad090(0xb7)](_0x444937=>_0x444937['alias']+'\x20('+_0x444937[_0x1ad090(0xda)]+')'),_0x34d165=await promptSelect(_0x1ad090(0xf8),_0x43911e),_0x5a51a2=_0x3bb811[_0x34d165];if(!_0x5a51a2)throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xd4));_0x5c3611=_0x5a51a2[_0x1ad090(0xef)],_0xaa65f2=_0x5a51a2['datasetCode'];}else{const _0x57c372=await listDatasets(_0x492927[_0x1ad090(0xec)]);if(_0x57c372[_0x1ad090(0xd7)]===0x0)throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xea));const _0x421f79=_0x57c372[_0x1ad090(0xb7)](_0x2aa0c3=>_0x2aa0c3['name']+'\x20('+_0x2aa0c3[_0x1ad090(0xeb)]+')'),_0x52ee66=await promptSelect('Select\x20dataset:',_0x421f79),_0x343295=_0x57c372[_0x52ee66];if(!_0x343295)throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xd4));_0xaa65f2=_0x343295[_0x1ad090(0xeb)],_0x5c3611=undefined;}}}}const _0x3d9b5a=await listDatasets(_0x492927[_0x1ad090(0xec)]),_0x154b21=_0x3d9b5a['find'](_0x72249e=>_0x72249e['code']===_0xaa65f2);if(!_0x154b21)throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xd8)+_0xaa65f2+_0x1ad090(0xc6)+(_0x5c3611?_0x1ad090(0xb4)+CLI_BIN_NAME+_0x1ad090(0xe6):''));_0x2d2577=_0x154b21['id'];const _0x1b13d0=_0x5c3611??_0xaa65f2,_0x4e3384=await listBffDatasetOperations(_0x492927[_0x1ad090(0xec)],_0x2d2577),_0x5daad2=_0x4e3384?Object[_0x1ad090(0xc7)](_0x4e3384):[];if(_0x5daad2[_0x1ad090(0xd7)]===0x0)throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xcb)+_0x1b13d0+'.');let _0x12da86;const _0x382ecf=_0x492927[_0x1ad090(0xfd)](_0x1ad090(0xd1));if(_0x382ecf){if(!_0x5daad2[_0x1ad090(0xee)](_0x382ecf))throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xbb)+_0x382ecf+_0x1ad090(0xcf)+_0x1b13d0+'.\x20'+('Available:\x20'+_0x5daad2[_0x1ad090(0xbe)](',\x20')));_0x12da86=_0x382ecf;}else{if(_0x492927[_0x1ad090(0xf4)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0xe4c811=await promptSelect(_0x1ad090(0xad),_0x5daad2);_0x12da86=_0x5daad2[_0xe4c811]??_0x5daad2[0x0];}let _0x4d80e3=normalizeHookFunctionNode(_0x492927[_0x1ad090(0xfd)](_0x1ad090(0xfb)));if(!_0x4d80e3){if(_0x492927[_0x1ad090(0xfd)](_0x1ad090(0xfb)))throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xc9));if(_0x492927[_0x1ad090(0xf4)])throw CliErrors[_0x1ad090(0xca)](_0x1ad090(0xd6));const _0x5d8001=await promptSelect(_0x1ad090(0xa8),[_0x1ad090(0xfe),_0x1ad090(0xa7)]);_0x4d80e3=['before',_0x1ad090(0xa7)][_0x5d8001]??_0x1ad090(0xfe);}return{'alias':_0x5c3611,'datasetCode':_0xaa65f2,'datasetId':_0x2d2577,'operationType':_0x12da86,'functionNode':_0x4d80e3};}async function promptSelect(_0x501d2e,_0x4a1d00){const _0x3cdee3=a26_0x41385e;if(_0x4a1d00[_0x3cdee3(0xd7)]===0x1)return 0x0;for(const [_0x360f9f,_0x5150d7]of _0x4a1d00['entries']()){process[_0x3cdee3(0xc3)][_0x3cdee3(0xfc)]('\x20\x20'+(_0x360f9f+0x1)+'.\x20'+_0x5150d7+'\x0a');}const _0x14d168=createInterface({'input':process['stdin'],'output':process[_0x3cdee3(0xc3)]});while(!![]){const _0xec0b5d=await new Promise(_0x3be029=>{const _0x46a1e3=_0x3cdee3;_0x14d168[_0x46a1e3(0xbd)](_0x501d2e+'\x20',_0x3be029);}),_0x279ca1=Number[_0x3cdee3(0xf3)](_0xec0b5d[_0x3cdee3(0xd5)](),0xa);if(Number[_0x3cdee3(0xe3)](_0x279ca1)&&_0x279ca1>=0x1&&_0x279ca1<=_0x4a1d00[_0x3cdee3(0xd7)])return _0x14d168[_0x3cdee3(0xba)](),_0x279ca1-0x1;process[_0x3cdee3(0xc3)][_0x3cdee3(0xfc)](_0x3cdee3(0xae)+_0x4a1d00[_0x3cdee3(0xd7)]+'.\x0a');}}function buildFilePath(_0x10f367,_0x17feb4,_0x2777d8,_0x4aeaa3){const _0x3d991d=a26_0x41385e;if(_0x17feb4==='HOOK'){if(!_0x4aeaa3)throw CliErrors['validation']('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x169acf=_0x4aeaa3['alias']??_0x4aeaa3[_0x3d991d(0xb2)];return join(_0x10f367[_0x3d991d(0xa9)],_0x3d991d(0xd3),_0x169acf,_0x4aeaa3[_0x3d991d(0xde)],_0x4aeaa3[_0x3d991d(0xe0)],_0x2777d8+_0x3d991d(0xd2));}return join(_0x10f367['scriptsRootDir'],_0x17feb4,_0x2777d8+_0x3d991d(0xd2));}export function generateTemplate(_0x560f1d,_0x4ffbfc,_0x3c80e7,_0x251d84,_0x408ae0){const _0x59dde9=a26_0x41385e,_0x132279=_0x251d84?.[_0x59dde9(0xd5)]()||_0x59dde9(0xd9);if(_0x560f1d==='COMMON')return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x132279+'\x0a\x20*\x20[脚本名称]\x20'+_0x4ffbfc+_0x59dde9(0xf1)+_0x4ffbfc+_0x59dde9(0xe5)+_0x4ffbfc+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x560f1d===_0x59dde9(0xcd))return _0x59dde9(0xe9)+_0x132279+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x3c80e7+'/'+_0x4ffbfc+_0x59dde9(0xe4)+_0x4ffbfc+_0x59dde9(0xed);if(!_0x408ae0)throw CliErrors[_0x59dde9(0xca)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x59dde9(0xb3)+_0x132279+_0x59dde9(0xf5)+_0x3c80e7+'/'+_0x408ae0['datasetCode']+'/'+_0x408ae0['operationType']+_0x59dde9(0xdc)+_0x408ae0[_0x59dde9(0xe0)]+_0x59dde9(0xce)+_0x4ffbfc+_0x59dde9(0xed);}
@@ -1 +1 @@
1
- const a27_0x2666f7=a27_0x426f;(function(_0xf6f7b6,_0x4fe904){const _0x3c7a23=a27_0x426f,_0x376b9e=_0xf6f7b6();while(!![]){try{const _0x2a4677=parseInt(_0x3c7a23(0xd0))/0x1*(parseInt(_0x3c7a23(0xba))/0x2)+-parseInt(_0x3c7a23(0xcb))/0x3+parseInt(_0x3c7a23(0xb5))/0x4*(parseInt(_0x3c7a23(0xb9))/0x5)+parseInt(_0x3c7a23(0xbc))/0x6+-parseInt(_0x3c7a23(0xbb))/0x7+-parseInt(_0x3c7a23(0xbf))/0x8+parseInt(_0x3c7a23(0xcd))/0x9*(parseInt(_0x3c7a23(0xb4))/0xa);if(_0x2a4677===_0x4fe904)break;else _0x376b9e['push'](_0x376b9e['shift']());}catch(_0x5585ed){_0x376b9e['push'](_0x376b9e['shift']());}}}(a27_0x211e,0x9a25f));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a27_0x211e(){const _0x41766a=['trashedTo','map','functions','830LteRif','1004YzNCMe','scriptsRoot','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','Multiple\x20functions\x20match\x20\x22','365vsMHcE','260mQcQTe','3244801lLmEGI','1155036kByEOJ','toISOString','split','1738112TtMPQx','Function\x20not\x20found:\x20','str','lockFilePath','Deleted\x20','keys','BFF\x20lock\x20file\x20not\x20found.','projectRoot','includes','delete','lastSync','remoteId','2790171OSkGqg','join','162198NvhZbr','target','appCode','4120cRLVEh','length','trashDir','\x20(local\x20file\x20moved\x20to\x20trash)','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','POST','string','replace','No\x20lock\x20entry\x20found\x20for\x20\x22','validation','Would\x20delete\x20','/api/management/library/scripts/delete','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','scriptsRootDir'];a27_0x211e=function(){return _0x41766a;};return a27_0x211e();}import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':'bff','command':a27_0x2666f7(0xc8),'description':a27_0x2666f7(0xdc),'risk':'high-risk-write','flags':[{'name':a27_0x2666f7(0xce),'type':a27_0x2666f7(0xd6),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x5f2e86){const _0xbbce0e=a27_0x2666f7,_0x24cb78=loadBffProjectConfig(_0x5f2e86[_0xbbce0e(0xcf)]),_0x29ccd4=await readBffLockFile(_0x24cb78[_0xbbce0e(0xc2)]);if(!_0x29ccd4)throw CliErrors[_0xbbce0e(0xd9)](_0xbbce0e(0xb7));},async 'dryRun'(_0x27551e){const _0x54c4d0=a27_0x2666f7,_0x43413d=loadBffProjectConfig(_0x27551e[_0x54c4d0(0xcf)]),_0x37ee29=await readBffLockFile(_0x43413d[_0x54c4d0(0xc2)]);if(!_0x37ee29)throw CliErrors[_0x54c4d0(0xd9)](_0x54c4d0(0xc5));const {appLock:_0x2cb7d2}=ensureLockScope(_0x37ee29,_0x27551e['appCode'],_0x43413d[_0x54c4d0(0xb6)],_0x54c4d0(0xc8)),_0x67110=_0x27551e[_0x54c4d0(0xc1)](_0x54c4d0(0xce)),_0x43dd49=Object['keys'](_0x2cb7d2[_0x54c4d0(0xe0)]),_0x5df8d0=resolveDeleteTarget(_0x67110,_0x43dd49),_0x4682d0=_0x2cb7d2[_0x54c4d0(0xe0)][_0x5df8d0];if(!_0x4682d0)throw CliErrors[_0x54c4d0(0xd9)](_0x54c4d0(0xd8)+_0x5df8d0+'\x22.');const _0x404e39=resolveLocalFilePathFromLockKey(_0x43413d,_0x5df8d0),_0x5d7080=relative(_0x43413d[_0x54c4d0(0xc6)],_0x404e39),_0xb136e5=join(_0x43413d[_0x54c4d0(0xd2)],'<timestamp>',_0x5d7080);return{'method':_0x54c4d0(0xd5),'url':_0x54c4d0(0xdb),'body':{'appCode':_0x27551e[_0x54c4d0(0xcf)],'target':_0x5df8d0,'remoteId':_0x4682d0[_0x54c4d0(0xca)],'localFilePath':_0x404e39,'trashedPath':_0xb136e5},'description':_0x54c4d0(0xda)+_0x5df8d0+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x3a1fb2){const _0xac8e4=a27_0x2666f7,_0x4c2e44=loadBffProjectConfig(_0x3a1fb2[_0xac8e4(0xcf)]),_0x3730df=await readBffLockFile(_0x4c2e44[_0xac8e4(0xc2)]);if(!_0x3730df)throw CliErrors[_0xac8e4(0xd9)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x49e47a,appLock:_0x2c4a88}=ensureLockScope(_0x3730df,_0x3a1fb2[_0xac8e4(0xcf)],_0x4c2e44['scriptsRoot'],_0xac8e4(0xc8)),_0x39d532=_0x3a1fb2['str'](_0xac8e4(0xce)),_0x3beafc=Object[_0xac8e4(0xc4)](_0x2c4a88['functions']),_0x29cc96=resolveDeleteTarget(_0x39d532,_0x3beafc),_0x2ccfc5=_0x2c4a88[_0xac8e4(0xe0)][_0x29cc96];if(!_0x2ccfc5)throw CliErrors['validation'](_0xac8e4(0xd8)+_0x29cc96+'\x22.');await deleteBffScript(_0x2ccfc5[_0xac8e4(0xca)]),delete _0x2c4a88[_0xac8e4(0xe0)][_0x29cc96],_0x2c4a88[_0xac8e4(0xc9)]=new Date()[_0xac8e4(0xbd)](),await writeBffLockFile(_0x4c2e44[_0xac8e4(0xc2)],_0x49e47a);const _0x461161=resolveLocalFilePathFromLockKey(_0x4c2e44,_0x29cc96);let _0x22897a;await fileExists(_0x461161)&&(_0x22897a=await moveToTrash(_0x4c2e44[_0xac8e4(0xc6)],_0x4c2e44['trashDir'],_0x461161),await cleanupEmptyDirectories(dirname(_0x461161),_0x4c2e44[_0xac8e4(0xdd)]));const _0x13cc2e={'deleted':_0x29cc96,'remoteId':_0x2ccfc5[_0xac8e4(0xca)]};if(_0x22897a)_0x13cc2e[_0xac8e4(0xde)]=_0x22897a;return{'ok':!![],'data':_0x13cc2e,'message':_0xac8e4(0xc3)+_0x29cc96+(_0x22897a?_0xac8e4(0xd3):'')};}};function a27_0x426f(_0x3a63bb,_0x32261a){_0x3a63bb=_0x3a63bb-0xb4;const _0x211e79=a27_0x211e();let _0x426f68=_0x211e79[_0x3a63bb];return _0x426f68;}function resolveDeleteTarget(_0x222eef,_0x5d2090){const _0x99bd27=a27_0x2666f7;if(_0x222eef[_0x99bd27(0xc7)]('/')){const _0x1a5a95=_0x5d2090['find'](_0x19f141=>_0x19f141===_0x222eef);if(!_0x1a5a95)throw CliErrors[_0x99bd27(0xd9)](_0x99bd27(0xc0)+_0x222eef);return _0x1a5a95;}const _0x1997d1=_0x5d2090['filter'](_0x5c84aa=>_0x5c84aa[_0x99bd27(0xbe)]('/')['at'](-0x1)===_0x222eef);if(_0x1997d1[_0x99bd27(0xd1)]===0x0)throw CliErrors[_0x99bd27(0xd9)](_0x99bd27(0xc0)+_0x222eef);if(_0x1997d1[_0x99bd27(0xd1)]>0x1)throw CliErrors[_0x99bd27(0xd9)](_0x99bd27(0xb8)+_0x222eef+_0x99bd27(0xd4)+_0x1997d1[_0x99bd27(0xdf)](_0x1f7172=>'\x20\x20-\x20'+_0x1f7172)[_0x99bd27(0xcc)]('\x0a'));return _0x1997d1[0x0];}async function moveToTrash(_0x44bfb7,_0x368cbe,_0x725e3c){const _0x5d8bc3=a27_0x2666f7,_0x5730c8=new Date()[_0x5d8bc3(0xbd)]()[_0x5d8bc3(0xd7)](/[:.]/g,'-'),_0x1611e2=relative(_0x44bfb7,_0x725e3c),_0x407aaf=join(_0x368cbe,_0x5730c8,_0x1611e2);return await mkdir(dirname(_0x407aaf),{'recursive':!![]}),await rename(_0x725e3c,_0x407aaf),_0x407aaf;}async function cleanupEmptyDirectories(_0x23a16c,_0x34411c){const _0x125482=a27_0x2666f7;let _0x57886c=resolve(_0x23a16c);const _0x141c6b=resolve(_0x34411c);while(_0x57886c['startsWith'](''+_0x141c6b+sep)||_0x57886c===_0x141c6b){if(_0x57886c===_0x141c6b)return;try{const _0x591521=await readdir(_0x57886c);if(_0x591521[_0x125482(0xd1)]>0x0)return;await rmdir(_0x57886c);}catch{return;}_0x57886c=dirname(_0x57886c);}}
1
+ const a27_0x1b8cf4=a27_0x443f;(function(_0x17bff3,_0x2d5c5f){const _0x15a855=a27_0x443f,_0x4852d2=_0x17bff3();while(!![]){try{const _0x373419=parseInt(_0x15a855(0x115))/0x1*(parseInt(_0x15a855(0xee))/0x2)+-parseInt(_0x15a855(0xfa))/0x3*(parseInt(_0x15a855(0xe9))/0x4)+-parseInt(_0x15a855(0x114))/0x5*(-parseInt(_0x15a855(0xf7))/0x6)+-parseInt(_0x15a855(0x10f))/0x7*(parseInt(_0x15a855(0x109))/0x8)+parseInt(_0x15a855(0xf5))/0x9*(-parseInt(_0x15a855(0xef))/0xa)+parseInt(_0x15a855(0x108))/0xb+-parseInt(_0x15a855(0xf9))/0xc*(parseInt(_0x15a855(0x103))/0xd);if(_0x373419===_0x2d5c5f)break;else _0x4852d2['push'](_0x4852d2['shift']());}catch(_0x157082){_0x4852d2['push'](_0x4852d2['shift']());}}}(a27_0x2e1e,0xa8616));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_0x443f(_0x1caf9f,_0xfeae42){_0x1caf9f=_0x1caf9f-0xe6;const _0x2e1e7e=a27_0x2e1e();let _0x443ffb=_0x2e1e7e[_0x1caf9f];return _0x443ffb;}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a27_0x2e1e(){const _0x343b1e=['Multiple\x20functions\x20match\x20\x22','12984851hwnTHH','8pAcPiy','trashedTo','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','functions','includes','map','5335309wYEdzP','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','length','scriptsRoot','startsWith','968450CSveRy','35dQjWzp','No\x20lock\x20entry\x20found\x20for\x20\x22','filter','\x20\x20-\x20','string','toISOString','103592YUapsJ','\x20(local\x20file\x20moved\x20to\x20trash)','POST','lastSync','projectRoot','34898enoCza','10290lIkldX','Deleted\x20','appCode','remoteId','join','high-risk-write','6093PETxml','trashDir','30cLdTOs','validation','24qQyCqX','3UoCdVc','scriptsRootDir','find','str','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','bff','BFF\x20lock\x20file\x20not\x20found.','lockFilePath','keys','3803813IrcVpo','target','delete','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'];a27_0x2e1e=function(){return _0x343b1e;};return a27_0x2e1e();}export const bffDelete={'service':a27_0x1b8cf4(0xff),'command':a27_0x1b8cf4(0x105),'description':a27_0x1b8cf4(0x110),'risk':a27_0x1b8cf4(0xf4),'flags':[{'name':a27_0x1b8cf4(0x104),'type':a27_0x1b8cf4(0xe7),'required':!![],'description':a27_0x1b8cf4(0x106)}],async 'validate'(_0x7bfca2){const _0x477a5c=a27_0x1b8cf4,_0x196a58=loadBffProjectConfig(_0x7bfca2[_0x477a5c(0xf1)]),_0xfb8d59=await readBffLockFile(_0x196a58[_0x477a5c(0x101)]);if(!_0xfb8d59)throw CliErrors[_0x477a5c(0xf8)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x31d756){const _0x35c979=a27_0x1b8cf4,_0x121f3a=loadBffProjectConfig(_0x31d756[_0x35c979(0xf1)]),_0x4da090=await readBffLockFile(_0x121f3a[_0x35c979(0x101)]);if(!_0x4da090)throw CliErrors['validation'](_0x35c979(0x100));const {appLock:_0x2aae32}=ensureLockScope(_0x4da090,_0x31d756['appCode'],_0x121f3a['scriptsRoot'],_0x35c979(0x105)),_0x4899d2=_0x31d756['str'](_0x35c979(0x104)),_0x28ced6=Object[_0x35c979(0x102)](_0x2aae32[_0x35c979(0x10c)]),_0x21f300=resolveDeleteTarget(_0x4899d2,_0x28ced6),_0x1af966=_0x2aae32[_0x35c979(0x10c)][_0x21f300];if(!_0x1af966)throw CliErrors[_0x35c979(0xf8)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x21f300+'\x22.');const _0x566270=resolveLocalFilePathFromLockKey(_0x121f3a,_0x21f300),_0x3dcc49=relative(_0x121f3a[_0x35c979(0xed)],_0x566270),_0x33de37=join(_0x121f3a[_0x35c979(0xf6)],'<timestamp>',_0x3dcc49);return{'method':_0x35c979(0xeb),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x31d756[_0x35c979(0xf1)],'target':_0x21f300,'remoteId':_0x1af966[_0x35c979(0xf2)],'localFilePath':_0x566270,'trashedPath':_0x33de37},'description':'Would\x20delete\x20'+_0x21f300+_0x35c979(0x10b)};},async 'execute'(_0x2defd8){const _0x345f5f=a27_0x1b8cf4,_0x1cd97f=loadBffProjectConfig(_0x2defd8[_0x345f5f(0xf1)]),_0x18c5ad=await readBffLockFile(_0x1cd97f['lockFilePath']);if(!_0x18c5ad)throw CliErrors[_0x345f5f(0xf8)](_0x345f5f(0x100));const {lockData:_0x3d3535,appLock:_0x4c9d7b}=ensureLockScope(_0x18c5ad,_0x2defd8[_0x345f5f(0xf1)],_0x1cd97f[_0x345f5f(0x112)],'delete'),_0xa56f4a=_0x2defd8[_0x345f5f(0xfd)](_0x345f5f(0x104)),_0x59ad3a=Object[_0x345f5f(0x102)](_0x4c9d7b[_0x345f5f(0x10c)]),_0x376d8c=resolveDeleteTarget(_0xa56f4a,_0x59ad3a),_0x523527=_0x4c9d7b[_0x345f5f(0x10c)][_0x376d8c];if(!_0x523527)throw CliErrors[_0x345f5f(0xf8)](_0x345f5f(0x116)+_0x376d8c+'\x22.');await deleteBffScript(_0x523527[_0x345f5f(0xf2)]),delete _0x4c9d7b['functions'][_0x376d8c],_0x4c9d7b[_0x345f5f(0xec)]=new Date()[_0x345f5f(0xe8)](),await writeBffLockFile(_0x1cd97f[_0x345f5f(0x101)],_0x3d3535);const _0x1d03c6=resolveLocalFilePathFromLockKey(_0x1cd97f,_0x376d8c);let _0x5fc5ff;await fileExists(_0x1d03c6)&&(_0x5fc5ff=await moveToTrash(_0x1cd97f[_0x345f5f(0xed)],_0x1cd97f[_0x345f5f(0xf6)],_0x1d03c6),await cleanupEmptyDirectories(dirname(_0x1d03c6),_0x1cd97f[_0x345f5f(0xfb)]));const _0x575415={'deleted':_0x376d8c,'remoteId':_0x523527[_0x345f5f(0xf2)]};if(_0x5fc5ff)_0x575415[_0x345f5f(0x10a)]=_0x5fc5ff;return{'ok':!![],'data':_0x575415,'message':_0x345f5f(0xf0)+_0x376d8c+(_0x5fc5ff?_0x345f5f(0xea):'')};}};function resolveDeleteTarget(_0x366e7b,_0x12d2c2){const _0x3d2315=a27_0x1b8cf4;if(_0x366e7b[_0x3d2315(0x10d)]('/')){const _0x39bdb5=_0x12d2c2[_0x3d2315(0xfc)](_0x124f75=>_0x124f75===_0x366e7b);if(!_0x39bdb5)throw CliErrors[_0x3d2315(0xf8)]('Function\x20not\x20found:\x20'+_0x366e7b);return _0x39bdb5;}const _0x488e3e=_0x12d2c2[_0x3d2315(0x117)](_0x231abb=>_0x231abb['split']('/')['at'](-0x1)===_0x366e7b);if(_0x488e3e['length']===0x0)throw CliErrors[_0x3d2315(0xf8)]('Function\x20not\x20found:\x20'+_0x366e7b);if(_0x488e3e['length']>0x1)throw CliErrors[_0x3d2315(0xf8)](_0x3d2315(0x107)+_0x366e7b+_0x3d2315(0xfe)+_0x488e3e[_0x3d2315(0x10e)](_0x505583=>_0x3d2315(0xe6)+_0x505583)[_0x3d2315(0xf3)]('\x0a'));return _0x488e3e[0x0];}async function moveToTrash(_0x189465,_0xbd78db,_0x1fcbbc){const _0x57c7ec=a27_0x1b8cf4,_0x437d32=new Date()[_0x57c7ec(0xe8)]()['replace'](/[:.]/g,'-'),_0x5e865d=relative(_0x189465,_0x1fcbbc),_0x22440e=join(_0xbd78db,_0x437d32,_0x5e865d);return await mkdir(dirname(_0x22440e),{'recursive':!![]}),await rename(_0x1fcbbc,_0x22440e),_0x22440e;}async function cleanupEmptyDirectories(_0x4e1684,_0x1f1f80){const _0x354fda=a27_0x1b8cf4;let _0x411276=resolve(_0x4e1684);const _0x3b021e=resolve(_0x1f1f80);while(_0x411276[_0x354fda(0x113)](''+_0x3b021e+sep)||_0x411276===_0x3b021e){if(_0x411276===_0x3b021e)return;try{const _0x4f89e0=await readdir(_0x411276);if(_0x4f89e0[_0x354fda(0x111)]>0x0)return;await rmdir(_0x411276);}catch{return;}_0x411276=dirname(_0x411276);}}
@@ -1 +1 @@
1
- function a28_0x586e(_0x3dfb39,_0x4e8dfa){_0x3dfb39=_0x3dfb39-0xf6;const _0x3256a7=a28_0x3256();let _0x586e22=_0x3256a7[_0x3dfb39];return _0x586e22;}const a28_0x279e90=a28_0x586e;function a28_0x3256(){const _0x2fd251=['scriptType','Script\x20ID','description','570MGfqFE','appCode','159425zHNeFg','8BxZziF','scriptContent','read','12045XMDYPQ','287720wpxlyy','bff','verbose','3pfStEn','number','286752xXVvPR','653470kiadFB','4634LkSNNU','392328xnKWQp','num','createdTime','bool','(none)','detail','updatedTime'];a28_0x3256=function(){return _0x2fd251;};return a28_0x3256();}(function(_0x2df618,_0x5cb19d){const _0x1a58c4=a28_0x586e,_0x2fbaed=_0x2df618();while(!![]){try{const _0x8939c2=parseInt(_0x1a58c4(0x10e))/0x1*(-parseInt(_0x1a58c4(0x103))/0x2)+-parseInt(_0x1a58c4(0x10a))/0x3*(parseInt(_0x1a58c4(0x107))/0x4)+-parseInt(_0x1a58c4(0x106))/0x5*(-parseInt(_0x1a58c4(0x100))/0x6)+-parseInt(_0x1a58c4(0x102))/0x7+parseInt(_0x1a58c4(0x10c))/0x8+parseInt(_0x1a58c4(0xf6))/0x9+-parseInt(_0x1a58c4(0x10d))/0xa;if(_0x8939c2===_0x5cb19d)break;else _0x2fbaed['push'](_0x2fbaed['shift']());}catch(_0x39ad7e){_0x2fbaed['push'](_0x2fbaed['shift']());}}}(a28_0x3256,0x1faa7));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a28_0x279e90(0x108),'command':a28_0x279e90(0xfb),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a28_0x279e90(0x105),'flags':[{'name':'id','type':a28_0x279e90(0x10b),'required':!![],'description':a28_0x279e90(0xfe)},{'name':'verbose','type':'boolean','description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x1df99a){const _0x4702fd=a28_0x279e90,_0x2db63c=await getBffScriptInfo(_0x1df99a[_0x4702fd(0xf7)]('id')),_0xbd3a3=_0x1df99a[_0x4702fd(0xf9)](_0x4702fd(0x109));if(_0xbd3a3)return{'ok':!![],'data':_0x2db63c};return{'ok':!![],'data':{'id':_0x2db63c['id'],'appCode':_0x2db63c[_0x4702fd(0x101)],'scriptType':_0x2db63c[_0x4702fd(0xfd)],'description':_0x2db63c[_0x4702fd(0xff)]||_0x4702fd(0xfa),'createdTime':_0x2db63c[_0x4702fd(0xf8)]??'','updatedTime':_0x2db63c[_0x4702fd(0xfc)]??'','scriptContent':_0x2db63c[_0x4702fd(0x104)]??''}};}};
1
+ const a28_0x412b33=a28_0x19a3;(function(_0x320494,_0x25391e){const _0x31c0d6=a28_0x19a3,_0xafcc81=_0x320494();while(!![]){try{const _0xf4388f=parseInt(_0x31c0d6(0x16a))/0x1+parseInt(_0x31c0d6(0x167))/0x2*(-parseInt(_0x31c0d6(0x15c))/0x3)+-parseInt(_0x31c0d6(0x173))/0x4*(-parseInt(_0x31c0d6(0x165))/0x5)+-parseInt(_0x31c0d6(0x16c))/0x6*(-parseInt(_0x31c0d6(0x175))/0x7)+parseInt(_0x31c0d6(0x15d))/0x8+-parseInt(_0x31c0d6(0x171))/0x9*(-parseInt(_0x31c0d6(0x16d))/0xa)+-parseInt(_0x31c0d6(0x162))/0xb;if(_0xf4388f===_0x25391e)break;else _0xafcc81['push'](_0xafcc81['shift']());}catch(_0xedee47){_0xafcc81['push'](_0xafcc81['shift']());}}}(a28_0x4e47,0xbd566));function a28_0x4e47(){const _0x12862a=['Return\x20full\x20raw\x20script\x20object','description','3DHwxIa','10641408pEFpBH','read','bff','boolean','scriptContent','59567750skTqnL','(none)','scriptType','3548405cToAfT','bool','30458hgytFl','detail','verbose','1179093apiuDz','updatedTime','138vgfsAI','10LIPWxc','num','createdTime','number','10487295mKmNHj','Get\x20BFF\x20script\x20details\x20by\x20ID','8CzfEGA','appCode','338471BmciGg','Script\x20ID'];a28_0x4e47=function(){return _0x12862a;};return a28_0x4e47();}import{getBffScriptInfo}from'../../core/api-client.js';function a28_0x19a3(_0x2c829c,_0x3124ef){_0x2c829c=_0x2c829c-0x15b;const _0x4e47f3=a28_0x4e47();let _0x19a394=_0x4e47f3[_0x2c829c];return _0x19a394;}export const bffDetail={'service':a28_0x412b33(0x15f),'command':a28_0x412b33(0x168),'description':a28_0x412b33(0x172),'risk':a28_0x412b33(0x15e),'flags':[{'name':'id','type':a28_0x412b33(0x170),'required':!![],'description':a28_0x412b33(0x176)},{'name':'verbose','type':a28_0x412b33(0x160),'description':a28_0x412b33(0x177)}],async 'execute'(_0x4a6d38){const _0x15b33e=a28_0x412b33,_0x8c37b9=await getBffScriptInfo(_0x4a6d38[_0x15b33e(0x16e)]('id')),_0x4ba384=_0x4a6d38[_0x15b33e(0x166)](_0x15b33e(0x169));if(_0x4ba384)return{'ok':!![],'data':_0x8c37b9};return{'ok':!![],'data':{'id':_0x8c37b9['id'],'appCode':_0x8c37b9[_0x15b33e(0x174)],'scriptType':_0x8c37b9[_0x15b33e(0x164)],'description':_0x8c37b9[_0x15b33e(0x15b)]||_0x15b33e(0x163),'createdTime':_0x8c37b9[_0x15b33e(0x16f)]??'','updatedTime':_0x8c37b9[_0x15b33e(0x16b)]??'','scriptContent':_0x8c37b9[_0x15b33e(0x161)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x1483f0,_0x3fd3b7){const _0x1b68a3=a29_0x5a84,_0x188425=_0x1483f0();while(!![]){try{const _0x4f096f=parseInt(_0x1b68a3(0x7f))/0x1+-parseInt(_0x1b68a3(0x81))/0x2*(parseInt(_0x1b68a3(0x79))/0x3)+-parseInt(_0x1b68a3(0x7e))/0x4*(parseInt(_0x1b68a3(0x7a))/0x5)+-parseInt(_0x1b68a3(0x82))/0x6+parseInt(_0x1b68a3(0x78))/0x7*(parseInt(_0x1b68a3(0x7d))/0x8)+parseInt(_0x1b68a3(0x7c))/0x9+-parseInt(_0x1b68a3(0x7b))/0xa*(-parseInt(_0x1b68a3(0x80))/0xb);if(_0x4f096f===_0x3fd3b7)break;else _0x188425['push'](_0x188425['shift']());}catch(_0x51d4be){_0x188425['push'](_0x188425['shift']());}}}(a29_0x10aa,0xbee71));function a29_0x10aa(){const _0x4685aa=['65770xfkioh','10272321ulULme','174992QLCbIv','7984uRRLCL','1225941RDnWIT','1199xuxBpc','162BpDOwk','6741156DdMnKd','7nQGtbp','17706VSoxVJ','1810bBLsAB'];a29_0x10aa=function(){return _0x4685aa;};return a29_0x10aa();}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';function a29_0x5a84(_0x3272af,_0x5d8e7a){_0x3272af=_0x3272af-0x78;const _0x10aa84=a29_0x10aa();let _0x5a848e=_0x10aa84[_0x3272af];return _0x5a848e;}import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x228d37,_0x5734b1){const _0xb970ca=a29_0x39a6,_0x5ba479=_0x228d37();while(!![]){try{const _0x4bce63=-parseInt(_0xb970ca(0xd8))/0x1+parseInt(_0xb970ca(0xd5))/0x2+-parseInt(_0xb970ca(0xd6))/0x3*(parseInt(_0xb970ca(0xda))/0x4)+-parseInt(_0xb970ca(0xd7))/0x5+parseInt(_0xb970ca(0xdb))/0x6*(parseInt(_0xb970ca(0xd9))/0x7)+-parseInt(_0xb970ca(0xdd))/0x8*(parseInt(_0xb970ca(0xdc))/0x9)+parseInt(_0xb970ca(0xd4))/0xa*(parseInt(_0xb970ca(0xde))/0xb);if(_0x4bce63===_0x5734b1)break;else _0x5ba479['push'](_0x5ba479['shift']());}catch(_0x4704e2){_0x5ba479['push'](_0x5ba479['shift']());}}}(a29_0x537a,0xbd54b));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a29_0x39a6(_0x5ae4a3,_0x30f4a3){_0x5ae4a3=_0x5ae4a3-0xd4;const _0x537a97=a29_0x537a();let _0x39a6b3=_0x537a97[_0x5ae4a3];return _0x39a6b3;}function a29_0x537a(){const _0x35a985=['8WIHJmC','957ZcGCBB','311420kECIxD','1062752kJXOsg','7416AAwRhK','6679705SOZCVK','1078974JCGgqT','2793DiAAPp','168JuJoOw','16242rjIbSk','9239265pvtCvV'];a29_0x537a=function(){return _0x35a985;};return a29_0x537a();}
@@ -1 +1 @@
1
- function a30_0x3a52(_0x1e0902,_0x58a73f){_0x1e0902=_0x1e0902-0x110;const _0x59ed35=a30_0x59ed();let _0x3a52fc=_0x59ed35[_0x1e0902];return _0x3a52fc;}const a30_0x408dc0=a30_0x3a52;(function(_0x272c77,_0x353371){const _0x5a2826=a30_0x3a52,_0x41288d=_0x272c77();while(!![]){try{const _0x30832c=parseInt(_0x5a2826(0x125))/0x1*(-parseInt(_0x5a2826(0x11d))/0x2)+-parseInt(_0x5a2826(0x119))/0x3+-parseInt(_0x5a2826(0x12c))/0x4*(-parseInt(_0x5a2826(0x113))/0x5)+parseInt(_0x5a2826(0x123))/0x6+parseInt(_0x5a2826(0x121))/0x7+parseInt(_0x5a2826(0x12a))/0x8+parseInt(_0x5a2826(0x128))/0x9*(-parseInt(_0x5a2826(0x124))/0xa);if(_0x30832c===_0x353371)break;else _0x41288d['push'](_0x41288d['shift']());}catch(_0x7a4e64){_0x41288d['push'](_0x41288d['shift']());}}}(a30_0x59ed,0x4e2bc));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a30_0x408dc0(0x110),'command':a30_0x408dc0(0x118),'description':a30_0x408dc0(0x129),'risk':a30_0x408dc0(0x127),'flags':[{'name':a30_0x408dc0(0x111),'type':a30_0x408dc0(0x120),'description':a30_0x408dc0(0x112),'default':a30_0x408dc0(0x115),'enum':[a30_0x408dc0(0x115),a30_0x408dc0(0x116)]},{'name':'name','type':'string','description':a30_0x408dc0(0x11a)},{'name':'verbose','type':a30_0x408dc0(0x11e),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x4b9a7c){const _0x2ad499=a30_0x408dc0,_0x2282c7=await listBffScripts(_0x4b9a7c[_0x2ad499(0x11f)],_0x4b9a7c[_0x2ad499(0x12b)](_0x2ad499(0x111)),{'scriptName':_0x4b9a7c[_0x2ad499(0x12b)](_0x2ad499(0x11b))||undefined}),_0x4d30bc=_0x4b9a7c[_0x2ad499(0x11c)](_0x2ad499(0x114));return{'ok':!![],'data':_0x4d30bc?_0x2282c7:_0x2282c7[_0x2ad499(0x126)](_0x28084d=>({'id':_0x28084d['id'],'functionName':_0x28084d[_0x2ad499(0x117)]??'','description':_0x28084d[_0x2ad499(0x122)]||'(unnamed)','scriptType':_0x28084d['scriptType']})),'message':_0x2282c7['length']===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};function a30_0x59ed(){const _0x4d9879=['ENDPOINT','COMMON','functionName','list','1020651uJUEFl','Filter\x20by\x20script\x20name','name','bool','1251308DbcgvO','boolean','appCode','string','3666789JQpNNq','description','2219688YJzxPD','2500HcXjgS','1dnWwCv','map','read','8361smsjlP','List\x20BFF\x20scripts','1887640XkvNGW','str','292uRyRNZ','bff','type','Script\x20type\x20filter','26615lpUmJl','verbose'];a30_0x59ed=function(){return _0x4d9879;};return a30_0x59ed();}
1
+ const a30_0x2940b0=a30_0x4f49;function a30_0x4f49(_0xf20949,_0x4e0b15){_0xf20949=_0xf20949-0x69;const _0x847826=a30_0x8478();let _0x4f49ef=_0x847826[_0xf20949];return _0x4f49ef;}(function(_0x2857bd,_0x47445d){const _0x4f1516=a30_0x4f49,_0x401e97=_0x2857bd();while(!![]){try{const _0x2cf51e=-parseInt(_0x4f1516(0x86))/0x1*(parseInt(_0x4f1516(0x7c))/0x2)+parseInt(_0x4f1516(0x6c))/0x3*(-parseInt(_0x4f1516(0x70))/0x4)+parseInt(_0x4f1516(0x80))/0x5+parseInt(_0x4f1516(0x6b))/0x6+-parseInt(_0x4f1516(0x7b))/0x7*(parseInt(_0x4f1516(0x6e))/0x8)+parseInt(_0x4f1516(0x81))/0x9*(-parseInt(_0x4f1516(0x6f))/0xa)+-parseInt(_0x4f1516(0x7f))/0xb*(-parseInt(_0x4f1516(0x78))/0xc);if(_0x2cf51e===_0x47445d)break;else _0x401e97['push'](_0x401e97['shift']());}catch(_0xe6ec9c){_0x401e97['push'](_0x401e97['shift']());}}}(a30_0x8478,0x849d4));import{listBffScripts}from'../../core/api-client.js';function a30_0x8478(){const _0x199825=['str','No\x20BFF\x20scripts\x20found.','length','List\x20BFF\x20scripts','appCode','31039032pTaoOg','boolean','type','84lTzbsy','2MNzaaJ','list','functionName','11TiQqCv','1253985LAGUAf','9RoBbty','Return\x20full\x20script\x20objects','bool','string','verbose','655974Dffxem','description','map','ENDPOINT','name','COMMON','5327940BvqgAv','6Aidsiw','bff','564328qScMyO','10248610GgQNaj','1309716wuWoZZ','scriptType','read'];a30_0x8478=function(){return _0x199825;};return a30_0x8478();}export const bffList={'service':a30_0x2940b0(0x6d),'command':a30_0x2940b0(0x7d),'description':a30_0x2940b0(0x76),'risk':a30_0x2940b0(0x72),'flags':[{'name':a30_0x2940b0(0x7a),'type':'string','description':'Script\x20type\x20filter','default':a30_0x2940b0(0x89),'enum':['ENDPOINT',a30_0x2940b0(0x6a)]},{'name':a30_0x2940b0(0x69),'type':a30_0x2940b0(0x84),'description':'Filter\x20by\x20script\x20name'},{'name':a30_0x2940b0(0x85),'type':a30_0x2940b0(0x79),'description':a30_0x2940b0(0x82)}],async 'execute'(_0x41696d){const _0x5349c1=a30_0x2940b0,_0x457b1f=await listBffScripts(_0x41696d[_0x5349c1(0x77)],_0x41696d[_0x5349c1(0x73)](_0x5349c1(0x7a)),{'scriptName':_0x41696d[_0x5349c1(0x73)](_0x5349c1(0x69))||undefined}),_0x4f4325=_0x41696d[_0x5349c1(0x83)](_0x5349c1(0x85));return{'ok':!![],'data':_0x4f4325?_0x457b1f:_0x457b1f[_0x5349c1(0x88)](_0x565a52=>({'id':_0x565a52['id'],'functionName':_0x565a52[_0x5349c1(0x7e)]??'','description':_0x565a52[_0x5349c1(0x87)]||'(unnamed)','scriptType':_0x565a52[_0x5349c1(0x71)]})),'message':_0x457b1f[_0x5349c1(0x75)]===0x0?_0x5349c1(0x74):undefined};}};
@@ -1 +1 @@
1
- const a31_0xad98a=a31_0x2667;(function(_0x2c8804,_0x476c28){const _0x42b374=a31_0x2667,_0x1a1874=_0x2c8804();while(!![]){try{const _0x12e64d=parseInt(_0x42b374(0x191))/0x1+-parseInt(_0x42b374(0x1a7))/0x2+-parseInt(_0x42b374(0x1a4))/0x3*(parseInt(_0x42b374(0x175))/0x4)+parseInt(_0x42b374(0x17b))/0x5*(parseInt(_0x42b374(0x196))/0x6)+parseInt(_0x42b374(0x171))/0x7*(-parseInt(_0x42b374(0x18b))/0x8)+parseInt(_0x42b374(0x187))/0x9*(-parseInt(_0x42b374(0x16d))/0xa)+-parseInt(_0x42b374(0x186))/0xb*(-parseInt(_0x42b374(0x161))/0xc);if(_0x12e64d===_0x476c28)break;else _0x1a1874['push'](_0x1a1874['shift']());}catch(_0x1a4dda){_0x1a1874['push'](_0x1a1874['shift']());}}}(a31_0x25af,0xe56d7));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a31_0x25af(){const _0x435648=['toISOString','962137PUstGx','27APcbZt','apiDir','datasetCode','str','1548520nolOLl','functions','close','pull','write','Lock\x20scope\x20for\x20app\x20\x22','15192ztIzbv','GET','scriptContent','toLowerCase','lockKey','24708RVuNOE','appCode','Remote\x20script\x20missing\x20content.','Pull\x20complete:\x20','functionName','scriptType','alias','utf8','lockFilePath','skipped','lastSync','Remote\x20script\x20missing\x20id.','hookLocation','yes','517938xFjtlX','bool','local\x20unsynced\x20changes','788322ZWsXsV','operationType','hash','map','parse','force','No\x20remote\x20BFF\x20scripts\x20found.','300yerfex','message','type','Would\x20inspect\x20','nonInteractive','cancelled','Force\x20overwrite\x20local\x20unsynced\x20changes','\x22\x20not\x20found\x20after\x20ensureLockScope.','ENDPOINT','/api/management/library/scripts/list?appCode=','\x20failed','conflict','3005770kiPmmR','bff','HOOK','\x20skipped,\x20','42PVHCqj','push','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','validation','12BkbONi','would_pull','\x20remote\x20BFF\x20script(s)\x20for\x20pull','length','stderr','boolean','2080UYcrfQ','scriptsRoot','version','COMMON','filePath','stringify','Pull\x20only\x20this\x20script\x20type','functionNode','apps','\x20pulled,\x20'];a31_0x25af=function(){return _0x435648;};return a31_0x25af();}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_0xad98a(0x16e),'command':a31_0xad98a(0x18e),'description':a31_0xad98a(0x173),'risk':a31_0xad98a(0x18f),'flags':[{'name':a31_0xad98a(0x163),'type':'string','description':a31_0xad98a(0x181),'enum':[a31_0xad98a(0x17e),a31_0xad98a(0x169),a31_0xad98a(0x16f)]},{'name':'force','type':a31_0xad98a(0x17a),'description':a31_0xad98a(0x167)}],async 'dryRun'(_0xa5723f){const _0x502ec3=a31_0xad98a,_0x2ed859=loadBffProjectConfig(_0xa5723f[_0x502ec3(0x197)]),_0x188bb0=await readBffLockFile(_0x2ed859[_0x502ec3(0x19e)]),{appLock:_0x5f1ed9}=ensureLockScope(_0x188bb0??createEmptyBffLock(),_0xa5723f['appCode'],_0x2ed859[_0x502ec3(0x17c)],'pull'),_0x3ff5eb=normalizeBffType(_0xa5723f['str'](_0x502ec3(0x163)))??undefined,_0x31d929=buildDatasetCodeToAliasMap(_0xa5723f[_0x502ec3(0x188)],_0xa5723f[_0x502ec3(0x197)]),[_0x47791d,_0x243750]=await Promise['all']([listBffScripts(_0xa5723f[_0x502ec3(0x197)],_0x3ff5eb),getBffScriptStatistics(_0xa5723f[_0x502ec3(0x197)])]),_0x206e04=createHookLocationMap(_0x243750),_0x4284c4=[];for(const _0x3d4074 of _0x47791d){const _0x418f9a=resolveRemoteScriptTarget(_0x2ed859,_0x3d4074,_0x206e04,_0x5f1ed9[_0x502ec3(0x18c)],_0x31d929);if(!_0x418f9a){_0x4284c4[_0x502ec3(0x172)]({'scriptType':_0x3d4074[_0x502ec3(0x19b)],'functionName':_0x3d4074[_0x502ec3(0x19a)]??'','status':_0x502ec3(0x19f),'reason':'unresolvable\x20target\x20path'});continue;}const _0x1ec885=_0x5f1ed9[_0x502ec3(0x18c)][_0x418f9a[_0x502ec3(0x195)]],_0xc99dec=_0x3d4074['scriptContent']!=null?computeContentHash(_0x3d4074[_0x502ec3(0x193)]):undefined,_0xd0497e=await hasUnsyncedLocalChanges(_0x418f9a[_0x502ec3(0x17f)],_0x1ec885,_0xc99dec);_0x4284c4[_0x502ec3(0x172)]({'lockKey':_0x418f9a['lockKey'],'filePath':_0x418f9a[_0x502ec3(0x17f)],'remoteId':_0x3d4074['id']??null,'status':_0xd0497e?_0x502ec3(0x16c):_0x502ec3(0x176)});}return{'method':_0x502ec3(0x192),'url':_0x502ec3(0x16a)+_0xa5723f[_0x502ec3(0x197)]+(_0x3ff5eb?'&type='+_0x3ff5eb:''),'body':{'appCode':_0xa5723f['appCode'],'filterType':_0x3ff5eb??null,'files':_0x4284c4},'description':_0x502ec3(0x164)+_0x4284c4[_0x502ec3(0x178)]+_0x502ec3(0x177)};},async 'execute'(_0x5d4bb0){const _0x3c0ef7=a31_0xad98a,_0x138953=loadBffProjectConfig(_0x5d4bb0['appCode']),_0x59138a=await readBffLockFile(_0x138953[_0x3c0ef7(0x19e)]),{lockData:_0x2bcf0d,appLock:_0x5b64af}=ensureLockScope(_0x59138a??createEmptyBffLock(),_0x5d4bb0[_0x3c0ef7(0x197)],_0x138953[_0x3c0ef7(0x17c)],_0x3c0ef7(0x18e)),_0x9a751a=normalizeBffType(_0x5d4bb0[_0x3c0ef7(0x18a)](_0x3c0ef7(0x163)))??undefined;if(_0x5d4bb0[_0x3c0ef7(0x18a)](_0x3c0ef7(0x163))&&!_0x9a751a)throw CliErrors[_0x3c0ef7(0x174)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x3d8a67,_0x3b926f]=await Promise['all']([listBffScripts(_0x5d4bb0[_0x3c0ef7(0x197)],_0x9a751a),getBffScriptStatistics(_0x5d4bb0[_0x3c0ef7(0x197)])]);if(_0x3d8a67[_0x3c0ef7(0x178)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x3c0ef7(0x160)};const _0x1b2b56=_0x5d4bb0[_0x3c0ef7(0x1a5)](_0x3c0ef7(0x15f));if(_0x1b2b56&&!_0x5d4bb0['nonInteractive']){const _0xc2b761=await confirmForce();if(!_0xc2b761)throw CliErrors[_0x3c0ef7(0x166)]('Force\x20pull\x20cancelled.');}if(_0x1b2b56&&_0x5d4bb0[_0x3c0ef7(0x165)]){}const _0x1d37db=buildDatasetCodeToAliasMap(_0x5d4bb0['apiDir'],_0x5d4bb0[_0x3c0ef7(0x197)]),_0xf24bdd=createHookLocationMap(_0x3b926f),_0x1e6146=JSON[_0x3c0ef7(0x1ab)](JSON[_0x3c0ef7(0x180)](_0x2bcf0d)),_0xa46bac=_0x5d4bb0[_0x3c0ef7(0x197)],_0x538e67=_0x1e6146[_0x3c0ef7(0x183)][_0xa46bac];if(!_0x538e67)throw new Error(_0x3c0ef7(0x190)+_0xa46bac+_0x3c0ef7(0x168));const _0xb9223b=[],_0x5353f2=[],_0x58277a=[];for(const _0x1ef934 of _0x3d8a67){const _0x389fe7=resolveRemoteScriptTarget(_0x138953,_0x1ef934,_0xf24bdd,_0x5b64af[_0x3c0ef7(0x18c)],_0x1d37db);if(!_0x389fe7){_0x5353f2[_0x3c0ef7(0x172)]({'lockKey':_0x1ef934[_0x3c0ef7(0x19b)]+'/'+_0x1ef934['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x2417b1=_0x5b64af[_0x3c0ef7(0x18c)][_0x389fe7[_0x3c0ef7(0x195)]];try{if(!_0x1ef934['id'])throw new Error(_0x3c0ef7(0x1a1));if(_0x1ef934[_0x3c0ef7(0x193)]==null)throw new Error(_0x3c0ef7(0x198));const _0x180913=_0x1ef934[_0x3c0ef7(0x193)],_0x50aa4b=computeContentHash(_0x180913);if(!_0x1b2b56){const _0x51a00d=await hasUnsyncedLocalChanges(_0x389fe7[_0x3c0ef7(0x17f)],_0x2417b1,_0x50aa4b);if(_0x51a00d){_0x5353f2[_0x3c0ef7(0x172)]({'lockKey':_0x389fe7[_0x3c0ef7(0x195)],'reason':_0x3c0ef7(0x1a6)});continue;}}await ensureParentDirectory(_0x389fe7[_0x3c0ef7(0x17f)]),await writeFile(_0x389fe7[_0x3c0ef7(0x17f)],_0x180913,_0x3c0ef7(0x19d));const _0x90f11e={'hash':_0x50aa4b,'remoteId':_0x1ef934['id'],'version':_0x1ef934[_0x3c0ef7(0x17d)]};_0x389fe7[_0x3c0ef7(0x163)]===_0x3c0ef7(0x16f)&&_0x389fe7['hookLocation']&&(_0x90f11e['alias']=_0x389fe7[_0x3c0ef7(0x1a2)]['alias'],_0x90f11e['datasetCode']=_0x389fe7[_0x3c0ef7(0x1a2)]['datasetCode'],_0x90f11e[_0x3c0ef7(0x1a8)]=_0x389fe7[_0x3c0ef7(0x1a2)][_0x3c0ef7(0x1a8)],_0x90f11e['functionNode']=_0x389fe7[_0x3c0ef7(0x1a2)][_0x3c0ef7(0x182)]),_0x538e67[_0x3c0ef7(0x18c)][_0x389fe7[_0x3c0ef7(0x195)]]=_0x90f11e,_0xb9223b[_0x3c0ef7(0x172)]({'lockKey':_0x389fe7['lockKey'],'remoteId':_0x1ef934['id']});}catch(_0x237891){_0x58277a[_0x3c0ef7(0x172)]({'lockKey':_0x389fe7['lockKey'],'error':_0x237891 instanceof Error?_0x237891[_0x3c0ef7(0x162)]:String(_0x237891)});}}return _0x538e67[_0x3c0ef7(0x1a0)]=new Date()[_0x3c0ef7(0x185)](),await writeBffLockFile(_0x138953[_0x3c0ef7(0x19e)],_0x1e6146),{'ok':_0x58277a[_0x3c0ef7(0x178)]===0x0,'data':{'pulled':_0xb9223b,'skipped':_0x5353f2,'failed':_0x58277a},'message':_0x3c0ef7(0x199)+_0xb9223b[_0x3c0ef7(0x178)]+_0x3c0ef7(0x184)+_0x5353f2[_0x3c0ef7(0x178)]+_0x3c0ef7(0x170)+_0x58277a[_0x3c0ef7(0x178)]+_0x3c0ef7(0x16b)};}};function a31_0x2667(_0x5175a2,_0x16acc1){_0x5175a2=_0x5175a2-0x15f;const _0x25af02=a31_0x25af();let _0x266776=_0x25af02[_0x5175a2];return _0x266776;}async function hasUnsyncedLocalChanges(_0x484885,_0x1450e6,_0x2c68c3){const _0x427acb=a31_0xad98a;if(!await fileExists(_0x484885))return![];const _0x49c202=await computeFileHash(_0x484885);if(!_0x1450e6)return _0x2c68c3?_0x49c202!==_0x2c68c3:!![];return _0x49c202!==_0x1450e6[_0x427acb(0x1a9)];}function buildDatasetCodeToAliasMap(_0x1ff5ab,_0xb2c864){const _0x2733b2=a31_0xad98a,_0x4f6ea4=loadAliasMap(_0x1ff5ab,undefined,resolveApiFilePath(_0x1ff5ab,_0xb2c864));return new Map(_0x4f6ea4[_0x2733b2(0x1aa)](_0x5bb173=>[_0x5bb173[_0x2733b2(0x189)],_0x5bb173[_0x2733b2(0x19c)]]));}async function confirmForce(){const _0x1d4f5a=a31_0xad98a,_0x3f76cd=createInterface({'input':process['stdin'],'output':process[_0x1d4f5a(0x179)]}),_0x39045d=await new Promise(_0xa3e0b4=>{_0x3f76cd['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0xa3e0b4);});return _0x3f76cd[_0x1d4f5a(0x18d)](),['y',_0x1d4f5a(0x1a3)]['includes'](_0x39045d['trim']()[_0x1d4f5a(0x194)]());}
1
+ const a31_0x5be275=a31_0x2f47;(function(_0x1357ac,_0x461e03){const _0x48b726=a31_0x2f47,_0x2728bc=_0x1357ac();while(!![]){try{const _0x54f3d5=-parseInt(_0x48b726(0x18f))/0x1*(parseInt(_0x48b726(0x1cf))/0x2)+parseInt(_0x48b726(0x1c3))/0x3*(-parseInt(_0x48b726(0x19a))/0x4)+parseInt(_0x48b726(0x1a3))/0x5*(parseInt(_0x48b726(0x1bc))/0x6)+parseInt(_0x48b726(0x1ae))/0x7*(parseInt(_0x48b726(0x1c8))/0x8)+parseInt(_0x48b726(0x1b2))/0x9*(parseInt(_0x48b726(0x18c))/0xa)+parseInt(_0x48b726(0x1b6))/0xb+-parseInt(_0x48b726(0x1a1))/0xc;if(_0x54f3d5===_0x461e03)break;else _0x2728bc['push'](_0x2728bc['shift']());}catch(_0x110da8){_0x2728bc['push'](_0x2728bc['shift']());}}}(a31_0x2c59,0x3d4da));function a31_0x2c59(){const _0x4c56b7=['skipped','Would\x20inspect\x20','1352dssOKz','functionName','stderr','hookLocation','20cKAWfK','bff','toLowerCase','451wWkArl','unresolvable\x20target\x20path','operationType','nonInteractive','ENDPOINT','write','hash','length','No\x20remote\x20BFF\x20scripts\x20found.','string','trim','508TeENAR','lastSync','Force\x20pull\x20cancelled.','type','functions','close','Pull\x20only\x20this\x20script\x20type','7419780IARBUb','filePath','10YYkwbP','GET','scriptsRoot','yes','apps','conflict','pull','Pull\x20complete:\x20','COMMON','lockFilePath','alias','7XmNaAZ','parse','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','would_pull','1952073VqOgkM','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','scriptContent','appCode','3054733FpQZBW','functionNode','validation','str','version','includes','1163262QAtlEb','push','scriptType','Force\x20overwrite\x20local\x20unsynced\x20changes','apiDir','HOOK','force','7680eEjqdg','Remote\x20script\x20missing\x20content.','toISOString','bool','local\x20unsynced\x20changes','3201264mqlpYB','lockKey','all','boolean','datasetCode'];a31_0x2c59=function(){return _0x4c56b7;};return a31_0x2c59();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a31_0x2f47(_0x3151a0,_0x916d50){_0x3151a0=_0x3151a0-0x18b;const _0x2c5965=a31_0x2c59();let _0x2f4706=_0x2c5965[_0x3151a0];return _0x2f4706;}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_0x5be275(0x18d),'command':a31_0x5be275(0x1a9),'description':a31_0x5be275(0x1b3),'risk':a31_0x5be275(0x194),'flags':[{'name':'type','type':a31_0x5be275(0x198),'description':a31_0x5be275(0x1a0),'enum':[a31_0x5be275(0x1ab),a31_0x5be275(0x193),a31_0x5be275(0x1c1)]},{'name':a31_0x5be275(0x1c2),'type':a31_0x5be275(0x1cb),'description':a31_0x5be275(0x1bf)}],async 'dryRun'(_0x3d7004){const _0x43efa4=a31_0x5be275,_0x3b389e=loadBffProjectConfig(_0x3d7004[_0x43efa4(0x1b5)]),_0x3bb143=await readBffLockFile(_0x3b389e[_0x43efa4(0x1ac)]),{appLock:_0x25a7c6}=ensureLockScope(_0x3bb143??createEmptyBffLock(),_0x3d7004[_0x43efa4(0x1b5)],_0x3b389e[_0x43efa4(0x1a5)],_0x43efa4(0x1a9)),_0xad0fa=normalizeBffType(_0x3d7004[_0x43efa4(0x1b9)]('type'))??undefined,_0x46b9c4=buildDatasetCodeToAliasMap(_0x3d7004[_0x43efa4(0x1c0)],_0x3d7004['appCode']),[_0x1b54c2,_0x2cf3c7]=await Promise[_0x43efa4(0x1ca)]([listBffScripts(_0x3d7004[_0x43efa4(0x1b5)],_0xad0fa),getBffScriptStatistics(_0x3d7004[_0x43efa4(0x1b5)])]),_0x59e732=createHookLocationMap(_0x2cf3c7),_0x2848b1=[];for(const _0x5d9d34 of _0x1b54c2){const _0x47fc31=resolveRemoteScriptTarget(_0x3b389e,_0x5d9d34,_0x59e732,_0x25a7c6[_0x43efa4(0x19e)],_0x46b9c4);if(!_0x47fc31){_0x2848b1[_0x43efa4(0x1bd)]({'scriptType':_0x5d9d34['scriptType'],'functionName':_0x5d9d34[_0x43efa4(0x1d0)]??'','status':_0x43efa4(0x1cd),'reason':_0x43efa4(0x190)});continue;}const _0xb6ab5b=_0x25a7c6[_0x43efa4(0x19e)][_0x47fc31[_0x43efa4(0x1c9)]],_0x2d4ea6=_0x5d9d34[_0x43efa4(0x1b4)]!=null?computeContentHash(_0x5d9d34[_0x43efa4(0x1b4)]):undefined,_0x124bb3=await hasUnsyncedLocalChanges(_0x47fc31[_0x43efa4(0x1a2)],_0xb6ab5b,_0x2d4ea6);_0x2848b1['push']({'lockKey':_0x47fc31['lockKey'],'filePath':_0x47fc31[_0x43efa4(0x1a2)],'remoteId':_0x5d9d34['id']??null,'status':_0x124bb3?_0x43efa4(0x1a8):_0x43efa4(0x1b1)});}return{'method':_0x43efa4(0x1a4),'url':'/api/management/library/scripts/list?appCode='+_0x3d7004['appCode']+(_0xad0fa?'&type='+_0xad0fa:''),'body':{'appCode':_0x3d7004[_0x43efa4(0x1b5)],'filterType':_0xad0fa??null,'files':_0x2848b1},'description':_0x43efa4(0x1ce)+_0x2848b1['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x30edac){const _0x5d3017=a31_0x5be275,_0x48e217=loadBffProjectConfig(_0x30edac[_0x5d3017(0x1b5)]),_0x25c78d=await readBffLockFile(_0x48e217[_0x5d3017(0x1ac)]),{lockData:_0x3543be,appLock:_0x1a7e53}=ensureLockScope(_0x25c78d??createEmptyBffLock(),_0x30edac['appCode'],_0x48e217[_0x5d3017(0x1a5)],_0x5d3017(0x1a9)),_0x3d93f4=normalizeBffType(_0x30edac['str']('type'))??undefined;if(_0x30edac['str'](_0x5d3017(0x19d))&&!_0x3d93f4)throw CliErrors[_0x5d3017(0x1b8)](_0x5d3017(0x1b0));const [_0x29ac79,_0x25f774]=await Promise[_0x5d3017(0x1ca)]([listBffScripts(_0x30edac[_0x5d3017(0x1b5)],_0x3d93f4),getBffScriptStatistics(_0x30edac[_0x5d3017(0x1b5)])]);if(_0x29ac79[_0x5d3017(0x196)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5d3017(0x197)};const _0x34153f=_0x30edac[_0x5d3017(0x1c6)](_0x5d3017(0x1c2));if(_0x34153f&&!_0x30edac['nonInteractive']){const _0x3ed372=await confirmForce();if(!_0x3ed372)throw CliErrors['cancelled'](_0x5d3017(0x19c));}if(_0x34153f&&_0x30edac[_0x5d3017(0x192)]){}const _0x17ce82=buildDatasetCodeToAliasMap(_0x30edac[_0x5d3017(0x1c0)],_0x30edac[_0x5d3017(0x1b5)]),_0x50598f=createHookLocationMap(_0x25f774),_0x5b9c07=JSON[_0x5d3017(0x1af)](JSON['stringify'](_0x3543be)),_0x4e315d=_0x30edac['appCode'],_0x518d31=_0x5b9c07[_0x5d3017(0x1a7)][_0x4e315d];if(!_0x518d31)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x4e315d+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x316faf=[],_0xff450f=[],_0x173f2c=[];for(const _0xca71e6 of _0x29ac79){const _0x1febc3=resolveRemoteScriptTarget(_0x48e217,_0xca71e6,_0x50598f,_0x1a7e53[_0x5d3017(0x19e)],_0x17ce82);if(!_0x1febc3){_0xff450f['push']({'lockKey':_0xca71e6[_0x5d3017(0x1be)]+'/'+_0xca71e6[_0x5d3017(0x1d0)],'reason':_0x5d3017(0x190)});continue;}const _0x576c64=_0x1a7e53[_0x5d3017(0x19e)][_0x1febc3[_0x5d3017(0x1c9)]];try{if(!_0xca71e6['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0xca71e6[_0x5d3017(0x1b4)]==null)throw new Error(_0x5d3017(0x1c4));const _0x4390d3=_0xca71e6['scriptContent'],_0x2dda63=computeContentHash(_0x4390d3);if(!_0x34153f){const _0x546316=await hasUnsyncedLocalChanges(_0x1febc3['filePath'],_0x576c64,_0x2dda63);if(_0x546316){_0xff450f['push']({'lockKey':_0x1febc3['lockKey'],'reason':_0x5d3017(0x1c7)});continue;}}await ensureParentDirectory(_0x1febc3[_0x5d3017(0x1a2)]),await writeFile(_0x1febc3['filePath'],_0x4390d3,'utf8');const _0x3cbc88={'hash':_0x2dda63,'remoteId':_0xca71e6['id'],'version':_0xca71e6[_0x5d3017(0x1ba)]};_0x1febc3[_0x5d3017(0x19d)]===_0x5d3017(0x1c1)&&_0x1febc3[_0x5d3017(0x18b)]&&(_0x3cbc88['alias']=_0x1febc3[_0x5d3017(0x18b)][_0x5d3017(0x1ad)],_0x3cbc88[_0x5d3017(0x1cc)]=_0x1febc3[_0x5d3017(0x18b)][_0x5d3017(0x1cc)],_0x3cbc88[_0x5d3017(0x191)]=_0x1febc3[_0x5d3017(0x18b)][_0x5d3017(0x191)],_0x3cbc88[_0x5d3017(0x1b7)]=_0x1febc3[_0x5d3017(0x18b)][_0x5d3017(0x1b7)]),_0x518d31[_0x5d3017(0x19e)][_0x1febc3[_0x5d3017(0x1c9)]]=_0x3cbc88,_0x316faf['push']({'lockKey':_0x1febc3[_0x5d3017(0x1c9)],'remoteId':_0xca71e6['id']});}catch(_0x1f8478){_0x173f2c[_0x5d3017(0x1bd)]({'lockKey':_0x1febc3[_0x5d3017(0x1c9)],'error':_0x1f8478 instanceof Error?_0x1f8478['message']:String(_0x1f8478)});}}return _0x518d31[_0x5d3017(0x19b)]=new Date()[_0x5d3017(0x1c5)](),await writeBffLockFile(_0x48e217[_0x5d3017(0x1ac)],_0x5b9c07),{'ok':_0x173f2c[_0x5d3017(0x196)]===0x0,'data':{'pulled':_0x316faf,'skipped':_0xff450f,'failed':_0x173f2c},'message':_0x5d3017(0x1aa)+_0x316faf[_0x5d3017(0x196)]+'\x20pulled,\x20'+_0xff450f[_0x5d3017(0x196)]+'\x20skipped,\x20'+_0x173f2c[_0x5d3017(0x196)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x3df45a,_0x4fca56,_0x56fd14){const _0x4c1d84=a31_0x5be275;if(!await fileExists(_0x3df45a))return![];const _0xd88026=await computeFileHash(_0x3df45a);if(!_0x4fca56)return _0x56fd14?_0xd88026!==_0x56fd14:!![];return _0xd88026!==_0x4fca56[_0x4c1d84(0x195)];}function buildDatasetCodeToAliasMap(_0x160aee,_0x5c4494){const _0x31e9db=a31_0x5be275,_0x5407d6=loadAliasMap(_0x160aee,undefined,resolveApiFilePath(_0x160aee,_0x5c4494));return new Map(_0x5407d6['map'](_0x5339ad=>[_0x5339ad['datasetCode'],_0x5339ad[_0x31e9db(0x1ad)]]));}async function confirmForce(){const _0x5bf09a=a31_0x5be275,_0x474a4a=createInterface({'input':process['stdin'],'output':process[_0x5bf09a(0x1d1)]}),_0x3f9eed=await new Promise(_0x338082=>{_0x474a4a['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x338082);});return _0x474a4a[_0x5bf09a(0x19f)](),['y',_0x5bf09a(0x1a6)][_0x5bf09a(0x1bb)](_0x3f9eed[_0x5bf09a(0x199)]()[_0x5bf09a(0x18e)]());}
@@ -1 +1 @@
1
- const a32_0x3d19fa=a32_0x24d8;(function(_0x2714b2,_0xa37383){const _0x1eeb3c=a32_0x24d8,_0x55ef39=_0x2714b2();while(!![]){try{const _0x49a1d9=-parseInt(_0x1eeb3c(0x10a))/0x1*(parseInt(_0x1eeb3c(0x113))/0x2)+parseInt(_0x1eeb3c(0x12e))/0x3+parseInt(_0x1eeb3c(0x109))/0x4*(parseInt(_0x1eeb3c(0x12f))/0x5)+-parseInt(_0x1eeb3c(0x106))/0x6*(parseInt(_0x1eeb3c(0x133))/0x7)+parseInt(_0x1eeb3c(0x13a))/0x8*(-parseInt(_0x1eeb3c(0x122))/0x9)+parseInt(_0x1eeb3c(0x111))/0xa+-parseInt(_0x1eeb3c(0x130))/0xb*(-parseInt(_0x1eeb3c(0xfa))/0xc);if(_0x49a1d9===_0xa37383)break;else _0x55ef39['push'](_0x55ef39['shift']());}catch(_0xdd68b3){_0x55ef39['push'](_0x55ef39['shift']());}}}(a32_0xf594,0xb61f0));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';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_0x3d19fa(0x12d),'command':'push','description':a32_0x3d19fa(0x11a),'risk':a32_0x3d19fa(0xf6),'flags':[{'name':'type','type':a32_0x3d19fa(0x121),'description':a32_0x3d19fa(0x110),'enum':[a32_0x3d19fa(0x128),a32_0x3d19fa(0xff),'HOOK']},{'name':a32_0x3d19fa(0x103),'type':a32_0x3d19fa(0x121),'description':a32_0x3d19fa(0x108)},{'name':a32_0x3d19fa(0x124),'type':a32_0x3d19fa(0x107),'description':a32_0x3d19fa(0x10b)}],async 'dryRun'(_0x39a1b8){const _0x42ab24=a32_0x3d19fa,_0x96710e=loadBffProjectConfig(_0x39a1b8[_0x42ab24(0x104)]),_0x1b4c30=await readBffLockFile(_0x96710e[_0x42ab24(0x132)]),{appLock:_0x149c37}=ensureLockScope(_0x1b4c30??createEmptyBffLock(),_0x39a1b8[_0x42ab24(0x104)],_0x96710e[_0x42ab24(0x11c)],_0x42ab24(0x129)),_0xfd5947=await getTargetFunctions(_0x96710e,_0x39a1b8),_0x255cd9=_0x39a1b8['bool'](_0x42ab24(0x124)),_0x246004=[];for(const _0x59121d of _0xfd5947){const _0x181225=await computeFileHash(_0x59121d[_0x42ab24(0x13d)]),_0x55d082=_0x149c37[_0x42ab24(0xfc)][_0x59121d[_0x42ab24(0x12b)]],_0x17ef96=!!_0x55d082&&_0x55d082[_0x42ab24(0x10f)]===_0x181225;_0x246004[_0x42ab24(0x129)]({'lockKey':_0x59121d[_0x42ab24(0x12b)],'filePath':_0x59121d[_0x42ab24(0x13d)],'remoteId':_0x55d082?.['remoteId']??null,'mode':_0x55d082?.['remoteId']?_0x42ab24(0x127):_0x42ab24(0x131),'status':!_0x255cd9&&_0x17ef96?'unchanged':_0x42ab24(0x10d)});}return{'method':_0x42ab24(0xfb),'url':_0x42ab24(0xf1),'body':{'appCode':_0x39a1b8[_0x42ab24(0x104)],'force':_0x255cd9,'files':_0x246004},'description':'Would\x20inspect\x20'+_0x246004[_0x42ab24(0x13b)]+_0x42ab24(0xf5)};},async 'execute'(_0xf510b3){const _0x50c836=a32_0x3d19fa,_0x597d2c=loadBffProjectConfig(_0xf510b3[_0x50c836(0x104)]),_0x3b35d9=await readBffLockFile(_0x597d2c[_0x50c836(0x132)]),{lockData:_0x27c97c,appLock:_0x2b0e91}=ensureLockScope(_0x3b35d9??createEmptyBffLock(),_0xf510b3[_0x50c836(0x104)],_0x597d2c[_0x50c836(0x11c)],_0x50c836(0x129)),_0x2220bb=await getTargetFunctions(_0x597d2c,_0xf510b3);if(_0x2220bb[_0x50c836(0x13b)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x50c836(0x119)};const _0x1e4c6d=_0xf510b3[_0x50c836(0x105)](_0x50c836(0x124)),_0x4b470d=await buildHookMaps(_0xf510b3[_0x50c836(0x104)],_0xf510b3['apiDir'],_0x2220bb,_0x2b0e91),_0xdd7fe8=[],_0x272da3=[],_0x1b007d=[];for(const _0x4dda6e of _0x2220bb){const _0x216639=await computeFileHash(_0x4dda6e[_0x50c836(0x13d)]),_0xb7cc7a=_0x2b0e91['functions'][_0x4dda6e[_0x50c836(0x12b)]];if(!_0x1e4c6d&&_0xb7cc7a&&_0xb7cc7a[_0x50c836(0x10f)]===_0x216639){_0x272da3[_0x50c836(0x129)]({'lockKey':_0x4dda6e['lockKey'],'reason':_0x50c836(0x135)});continue;}try{await uploadSingleFunction(_0xf510b3[_0x50c836(0x104)],_0x4dda6e,_0x2b0e91,_0x4b470d);const _0x5d2a98=_0x2b0e91[_0x50c836(0xfc)][_0x4dda6e['lockKey']];_0xdd7fe8[_0x50c836(0x129)]({'lockKey':_0x4dda6e[_0x50c836(0x12b)],'remoteId':_0x5d2a98?.[_0x50c836(0x116)]??0x0});}catch(_0x299f76){_0x1b007d[_0x50c836(0x129)]({'lockKey':_0x4dda6e[_0x50c836(0x12b)],'error':_0x299f76 instanceof Error?_0x299f76[_0x50c836(0x101)]:String(_0x299f76)});}}return _0x2b0e91[_0x50c836(0xf4)]=new Date()[_0x50c836(0x118)](),await writeBffLockFile(_0x597d2c[_0x50c836(0x132)],_0x27c97c),{'ok':_0x1b007d[_0x50c836(0x13b)]===0x0,'data':{'uploaded':_0xdd7fe8,'skipped':_0x272da3,'failed':_0x1b007d},'message':_0x50c836(0x13c)+_0xdd7fe8[_0x50c836(0x13b)]+_0x50c836(0x100)+_0x272da3[_0x50c836(0x13b)]+_0x50c836(0x115)+_0x1b007d[_0x50c836(0x13b)]+'\x20failed'};}};function a32_0xf594(){const _0x5d9140=['set','unchanged','\x22.\x20','has','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','utf8','60776apLcrJ','length','Push\x20complete:\x20','filePath','Incomplete\x20HOOK\x20path:\x20','/api/management/library/scripts/save','version','datasetId','lastSync','\x20local\x20BFF\x20script(s)\x20for\x20push','high-risk-write','HOOK','type','map','12mYEmCK','POST','functions','operationType','datasetCode','ENDPOINT','\x20uploaded,\x20','message','aliasToDatasetCode','name','appCode','bool','13218pfsNXu','boolean','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','4gZvRZS','16350NyJfzD','Force\x20push\x20ignoring\x20hash\x20protection','filter','would_push',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','hash','Push\x20only\x20this\x20script\x20type','5292900hXWwdk','get','40Kywlxo','code','\x20skipped,\x20','remoteId','str','toISOString','No\x20local\x20BFF\x20functions\x20found.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCodeToId','scriptsRoot','functionNode','values','validation','Cannot\x20resolve\x20dataset\x20for\x20\x22','string','828lzOclz','script','force','Run\x20`','description','update','COMMON','push','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','lockKey','alias','bff','3007086STzZDV','1218535YqdrJd','15252886ADvsFR','create','lockFilePath','4417qJCBCP'];a32_0xf594=function(){return _0x5d9140;};return a32_0xf594();}async function getTargetFunctions(_0x441542,_0x4ed22f){const _0x728d0a=a32_0x3d19fa,_0xe47e20=_0x4ed22f[_0x728d0a(0x117)]('type'),_0x1e2242=_0x4ed22f[_0x728d0a(0x117)](_0x728d0a(0x103)),_0x187dca=normalizeBffType(_0xe47e20)??undefined;if(_0x1e2242&&!_0x187dca)throw CliErrors['validation'](_0x728d0a(0x138));const _0x382af3=await scanLocalBffFunctions(_0x441542,_0x187dca);if(_0x1e2242){const _0x5542ce=_0x382af3[_0x728d0a(0x10c)](_0x458b79=>_0x458b79[_0x728d0a(0x103)]===_0x1e2242);if(_0x5542ce[_0x728d0a(0x13b)]===0x0)throw CliErrors[_0x728d0a(0x11f)]('Local\x20function\x20not\x20found:\x20'+_0x187dca+'/'+_0x1e2242);return _0x5542ce;}return _0x382af3;}function a32_0x24d8(_0x3028b2,_0x466897){_0x3028b2=_0x3028b2-0xf1;const _0xf59433=a32_0xf594();let _0x24d88a=_0xf59433[_0x3028b2];return _0x24d88a;}async function buildHookMaps(_0x326a92,_0x1a4584,_0x65adef,_0x445f9c){const _0x515d84=a32_0x3d19fa,_0x99462f=_0x65adef['some'](_0x7f8f17=>_0x7f8f17[_0x515d84(0xf8)]===_0x515d84(0xf7));if(!_0x99462f)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x4fe448=loadAliasMap(_0x1a4584,undefined,resolveApiFilePath(_0x1a4584,_0x326a92)),_0x238a96=new Map(_0x4fe448[_0x515d84(0xf9)](_0x2d34ac=>[_0x2d34ac[_0x515d84(0x12c)],_0x2d34ac['datasetCode']]));for(const _0x1bb573 of Object[_0x515d84(0x11e)](_0x445f9c[_0x515d84(0xfc)])){_0x1bb573['alias']&&_0x1bb573[_0x515d84(0xfe)]&&!_0x238a96['has'](_0x1bb573[_0x515d84(0x12c)])&&_0x238a96[_0x515d84(0x134)](_0x1bb573[_0x515d84(0x12c)],_0x1bb573['datasetCode']);}const _0x516687=await listDatasets(_0x326a92),_0x1ba2f6=new Map(_0x516687[_0x515d84(0xf9)](_0x232040=>[_0x232040[_0x515d84(0x114)],_0x232040['id']]));return{'aliasToDatasetCode':_0x238a96,'datasetCodeToId':_0x1ba2f6};}async function uploadSingleFunction(_0x42c0c0,_0x581181,_0x22ff24,_0x2c8a75){const _0x3e4632=a32_0x3d19fa,_0x49f066=await readFile(_0x581181[_0x3e4632(0x13d)],_0x3e4632(0x139)),_0xdb22aa=await computeFileHash(_0x581181[_0x3e4632(0x13d)]),_0x11bd06=_0x22ff24[_0x3e4632(0xfc)][_0x581181[_0x3e4632(0x12b)]];if(_0x11bd06?.[_0x3e4632(0x116)]&&_0x11bd06['version']==null)throw CliErrors[_0x3e4632(0x11f)](_0x581181[_0x3e4632(0x12b)]+_0x3e4632(0x10e));let _0x58c578=extractScriptDescription(_0x49f066);if(!_0x58c578&&_0x11bd06?.[_0x3e4632(0x116)]){const _0x198ae3=await getBffScriptInfo(_0x11bd06['remoteId']);_0x58c578=_0x198ae3[_0x3e4632(0x126)]||undefined;}const _0x3e3705={'appCode':_0x42c0c0,'functionName':_0x581181[_0x3e4632(0x103)],'scriptType':_0x581181[_0x3e4632(0xf8)],'scriptContent':_0x49f066};if(_0x11bd06?.[_0x3e4632(0x116)])_0x3e3705['id']=_0x11bd06['remoteId'];if(_0x11bd06?.[_0x3e4632(0xf2)]!=null)_0x3e3705[_0x3e4632(0xf2)]=_0x11bd06['version'];if(_0x58c578)_0x3e3705['description']=_0x58c578;if(_0x581181[_0x3e4632(0xf8)]===_0x3e4632(0xf7)){const _0x31eee2=_0x581181[_0x3e4632(0x12c)];if(!_0x31eee2||!_0x581181['operationType']||!_0x581181[_0x3e4632(0x11d)])throw CliErrors[_0x3e4632(0x11f)](_0x3e4632(0x13e)+_0x581181[_0x3e4632(0x12b)]);const _0x3e3764=_0x2c8a75[_0x3e4632(0x102)][_0x3e4632(0x112)](_0x31eee2)??_0x11bd06?.[_0x3e4632(0xfe)]??_0x31eee2,_0x230a4d=_0x2c8a75[_0x3e4632(0x11b)][_0x3e4632(0x112)](_0x3e3764);if(!_0x230a4d)throw CliErrors['validation'](_0x3e4632(0x120)+_0x31eee2+_0x3e4632(0x136)+(_0x3e4632(0x125)+CLI_BIN_NAME+_0x3e4632(0x12a)));_0x3e3705[_0x3e4632(0xf3)]=_0x230a4d,_0x3e3705[_0x3e4632(0xfd)]=_0x581181[_0x3e4632(0xfd)],_0x3e3705[_0x3e4632(0x11d)]=_0x581181[_0x3e4632(0x11d)];}const _0x33dae6=await saveBffScript(_0x3e3705),_0x4eeb5a=_0x33dae6['id'],_0x191430=_0x33dae6[_0x3e4632(0x123)]??await getBffScriptInfo(_0x4eeb5a),_0x2e403c={'hash':_0xdb22aa,'remoteId':_0x4eeb5a,'version':_0x191430[_0x3e4632(0xf2)]};if(_0x581181[_0x3e4632(0xf8)]===_0x3e4632(0xf7)){const _0x50e155=_0x581181[_0x3e4632(0x12c)],_0x4b7bc6=_0x2c8a75[_0x3e4632(0x102)][_0x3e4632(0x112)](_0x50e155)??_0x11bd06?.[_0x3e4632(0xfe)]??_0x50e155;_0x2c8a75[_0x3e4632(0x102)][_0x3e4632(0x137)](_0x50e155)?_0x2e403c[_0x3e4632(0x12c)]=_0x50e155:_0x2e403c[_0x3e4632(0x12c)]=_0x11bd06?.[_0x3e4632(0x12c)],_0x2e403c['datasetCode']=_0x4b7bc6,_0x2e403c[_0x3e4632(0xfd)]=_0x581181['operationType'],_0x2e403c[_0x3e4632(0x11d)]=_0x581181['functionNode'];}_0x22ff24[_0x3e4632(0xfc)][_0x581181['lockKey']]=_0x2e403c;}
1
+ const a32_0x5cb23b=a32_0x35b0;(function(_0x15c476,_0x5ae063){const _0x17a6b4=a32_0x35b0,_0x9fe826=_0x15c476();while(!![]){try{const _0x2f9b6a=-parseInt(_0x17a6b4(0xf8))/0x1+parseInt(_0x17a6b4(0xe2))/0x2+-parseInt(_0x17a6b4(0xb8))/0x3+parseInt(_0x17a6b4(0xd6))/0x4*(-parseInt(_0x17a6b4(0xbc))/0x5)+parseInt(_0x17a6b4(0xf5))/0x6*(-parseInt(_0x17a6b4(0xe0))/0x7)+parseInt(_0x17a6b4(0xf1))/0x8*(parseInt(_0x17a6b4(0xec))/0x9)+parseInt(_0x17a6b4(0xfb))/0xa;if(_0x2f9b6a===_0x5ae063)break;else _0x9fe826['push'](_0x9fe826['shift']());}catch(_0x398c02){_0x9fe826['push'](_0x9fe826['shift']());}}}(a32_0x148a,0x8ef0c));function a32_0x148a(){const _0x1c5616=['has','Would\x20inspect\x20','set','string','script','HOOK','operationType','type','description','utf8','Run\x20`','boolean','high-risk-write','alias','filter','name','apiDir',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','2025580wpabcz','Incomplete\x20HOOK\x20path:\x20','datasetCode','get','\x20local\x20BFF\x20script(s)\x20for\x20push','/api/management/library/scripts/save','str','hash','update','Push\x20complete:\x20','7872718pHcDHg','functionNode','236090KaBolV','Local\x20function\x20not\x20found:\x20','\x20uploaded,\x20','COMMON','\x20skipped,\x20','No\x20local\x20BFF\x20functions\x20found.','appCode','bool','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','252lviPMM','force','lockFilePath','code','version','239696KlfPsw','Force\x20push\x20ignoring\x20hash\x20protection','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','scriptsRoot','6dVdCoX','map','filePath','1069490FBjjHo','Cannot\x20resolve\x20dataset\x20for\x20\x22','remoteId','31033830zGEzYb','aliasToDatasetCode','POST','validation','ENDPOINT','\x20failed','2322963wKqWOX','lastSync','functions','some','5NndLZb','lockKey','datasetId','datasetCodeToId','push','message','length','\x22.\x20'];a32_0x148a=function(){return _0x1c5616;};return a32_0x148a();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a32_0x35b0(_0x5b5618,_0x6b340){_0x5b5618=_0x5b5618-0xb7;const _0x148ab1=a32_0x148a();let _0x35b017=_0x148ab1[_0x5b5618];return _0x35b017;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':'bff','command':'push','description':a32_0x5cb23b(0xeb),'risk':a32_0x5cb23b(0xd0),'flags':[{'name':a32_0x5cb23b(0xcb),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a32_0x5cb23b(0xe5),a32_0x5cb23b(0xff),'HOOK']},{'name':'name','type':a32_0x5cb23b(0xc7),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a32_0x5cb23b(0xed),'type':a32_0x5cb23b(0xcf),'description':a32_0x5cb23b(0xf2)}],async 'dryRun'(_0x30d9cb){const _0x190f6d=a32_0x5cb23b,_0x4e2738=loadBffProjectConfig(_0x30d9cb['appCode']),_0x16271e=await readBffLockFile(_0x4e2738[_0x190f6d(0xee)]),{appLock:_0x273d35}=ensureLockScope(_0x16271e??createEmptyBffLock(),_0x30d9cb['appCode'],_0x4e2738[_0x190f6d(0xf4)],'push'),_0x5a3008=await getTargetFunctions(_0x4e2738,_0x30d9cb),_0x2e4ba1=_0x30d9cb[_0x190f6d(0xe9)](_0x190f6d(0xed)),_0x4bd6a0=[];for(const _0x486e38 of _0x5a3008){const _0x23280f=await computeFileHash(_0x486e38[_0x190f6d(0xf7)]),_0x5c98e4=_0x273d35[_0x190f6d(0xba)][_0x486e38[_0x190f6d(0xbd)]],_0x20cd25=!!_0x5c98e4&&_0x5c98e4[_0x190f6d(0xdd)]===_0x23280f;_0x4bd6a0['push']({'lockKey':_0x486e38[_0x190f6d(0xbd)],'filePath':_0x486e38['filePath'],'remoteId':_0x5c98e4?.[_0x190f6d(0xfa)]??null,'mode':_0x5c98e4?.[_0x190f6d(0xfa)]?_0x190f6d(0xde):'create','status':!_0x2e4ba1&&_0x20cd25?'unchanged':'would_push'});}return{'method':_0x190f6d(0xfd),'url':_0x190f6d(0xdb),'body':{'appCode':_0x30d9cb[_0x190f6d(0xe8)],'force':_0x2e4ba1,'files':_0x4bd6a0},'description':_0x190f6d(0xc5)+_0x4bd6a0[_0x190f6d(0xc2)]+_0x190f6d(0xda)};},async 'execute'(_0x1e8e66){const _0x34b289=a32_0x5cb23b,_0x2cd680=loadBffProjectConfig(_0x1e8e66[_0x34b289(0xe8)]),_0x58aab3=await readBffLockFile(_0x2cd680['lockFilePath']),{lockData:_0xd64b07,appLock:_0x38a561}=ensureLockScope(_0x58aab3??createEmptyBffLock(),_0x1e8e66['appCode'],_0x2cd680['scriptsRoot'],_0x34b289(0xc0)),_0x4f1f16=await getTargetFunctions(_0x2cd680,_0x1e8e66);if(_0x4f1f16[_0x34b289(0xc2)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x34b289(0xe7)};const _0x4abc49=_0x1e8e66[_0x34b289(0xe9)]('force'),_0x220e7e=await buildHookMaps(_0x1e8e66[_0x34b289(0xe8)],_0x1e8e66[_0x34b289(0xd4)],_0x4f1f16,_0x38a561),_0x3642a9=[],_0x2ad28d=[],_0x51cf44=[];for(const _0x2b4de5 of _0x4f1f16){const _0x1c2d13=await computeFileHash(_0x2b4de5[_0x34b289(0xf7)]),_0x564f0d=_0x38a561[_0x34b289(0xba)][_0x2b4de5[_0x34b289(0xbd)]];if(!_0x4abc49&&_0x564f0d&&_0x564f0d['hash']===_0x1c2d13){_0x2ad28d[_0x34b289(0xc0)]({'lockKey':_0x2b4de5[_0x34b289(0xbd)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x1e8e66[_0x34b289(0xe8)],_0x2b4de5,_0x38a561,_0x220e7e);const _0x5825b5=_0x38a561[_0x34b289(0xba)][_0x2b4de5[_0x34b289(0xbd)]];_0x3642a9[_0x34b289(0xc0)]({'lockKey':_0x2b4de5[_0x34b289(0xbd)],'remoteId':_0x5825b5?.[_0x34b289(0xfa)]??0x0});}catch(_0x1d48f9){_0x51cf44[_0x34b289(0xc0)]({'lockKey':_0x2b4de5[_0x34b289(0xbd)],'error':_0x1d48f9 instanceof Error?_0x1d48f9[_0x34b289(0xc1)]:String(_0x1d48f9)});}}return _0x38a561[_0x34b289(0xb9)]=new Date()['toISOString'](),await writeBffLockFile(_0x2cd680[_0x34b289(0xee)],_0xd64b07),{'ok':_0x51cf44[_0x34b289(0xc2)]===0x0,'data':{'uploaded':_0x3642a9,'skipped':_0x2ad28d,'failed':_0x51cf44},'message':_0x34b289(0xdf)+_0x3642a9['length']+_0x34b289(0xe4)+_0x2ad28d[_0x34b289(0xc2)]+_0x34b289(0xe6)+_0x51cf44[_0x34b289(0xc2)]+_0x34b289(0xb7)};}};async function getTargetFunctions(_0xdcf3bb,_0x4670b7){const _0x26e6ef=a32_0x5cb23b,_0x59d640=_0x4670b7[_0x26e6ef(0xdc)](_0x26e6ef(0xcb)),_0x557182=_0x4670b7[_0x26e6ef(0xdc)]('name'),_0x4bd1d0=normalizeBffType(_0x59d640)??undefined;if(_0x557182&&!_0x4bd1d0)throw CliErrors[_0x26e6ef(0xfe)](_0x26e6ef(0xea));const _0x3f7d70=await scanLocalBffFunctions(_0xdcf3bb,_0x4bd1d0);if(_0x557182){const _0x5efe00=_0x3f7d70[_0x26e6ef(0xd2)](_0x3a9931=>_0x3a9931[_0x26e6ef(0xd3)]===_0x557182);if(_0x5efe00[_0x26e6ef(0xc2)]===0x0)throw CliErrors[_0x26e6ef(0xfe)](_0x26e6ef(0xe3)+_0x4bd1d0+'/'+_0x557182);return _0x5efe00;}return _0x3f7d70;}async function buildHookMaps(_0x178e2a,_0x6b19c8,_0x3621be,_0xf3ab11){const _0xfd4ee5=a32_0x5cb23b,_0x24260e=_0x3621be[_0xfd4ee5(0xbb)](_0x2ea5a2=>_0x2ea5a2[_0xfd4ee5(0xcb)]===_0xfd4ee5(0xc9));if(!_0x24260e)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x119823=loadAliasMap(_0x6b19c8,undefined,resolveApiFilePath(_0x6b19c8,_0x178e2a)),_0x244d51=new Map(_0x119823['map'](_0x54a257=>[_0x54a257[_0xfd4ee5(0xd1)],_0x54a257[_0xfd4ee5(0xd8)]]));for(const _0x12cb7a of Object['values'](_0xf3ab11[_0xfd4ee5(0xba)])){_0x12cb7a['alias']&&_0x12cb7a[_0xfd4ee5(0xd8)]&&!_0x244d51[_0xfd4ee5(0xc4)](_0x12cb7a[_0xfd4ee5(0xd1)])&&_0x244d51[_0xfd4ee5(0xc6)](_0x12cb7a[_0xfd4ee5(0xd1)],_0x12cb7a[_0xfd4ee5(0xd8)]);}const _0x4c2432=await listDatasets(_0x178e2a),_0x448bc7=new Map(_0x4c2432[_0xfd4ee5(0xf6)](_0x3c1f1f=>[_0x3c1f1f[_0xfd4ee5(0xef)],_0x3c1f1f['id']]));return{'aliasToDatasetCode':_0x244d51,'datasetCodeToId':_0x448bc7};}async function uploadSingleFunction(_0xaf2a97,_0x257372,_0x2af230,_0x13d96b){const _0x4fe4cd=a32_0x5cb23b,_0x47bf10=await readFile(_0x257372[_0x4fe4cd(0xf7)],_0x4fe4cd(0xcd)),_0xc3d9e9=await computeFileHash(_0x257372[_0x4fe4cd(0xf7)]),_0x5d4056=_0x2af230[_0x4fe4cd(0xba)][_0x257372['lockKey']];if(_0x5d4056?.[_0x4fe4cd(0xfa)]&&_0x5d4056[_0x4fe4cd(0xf0)]==null)throw CliErrors[_0x4fe4cd(0xfe)](_0x257372['lockKey']+_0x4fe4cd(0xd5));let _0x5a4857=extractScriptDescription(_0x47bf10);if(!_0x5a4857&&_0x5d4056?.[_0x4fe4cd(0xfa)]){const _0x482479=await getBffScriptInfo(_0x5d4056[_0x4fe4cd(0xfa)]);_0x5a4857=_0x482479[_0x4fe4cd(0xcc)]||undefined;}const _0xdd9e8b={'appCode':_0xaf2a97,'functionName':_0x257372['name'],'scriptType':_0x257372[_0x4fe4cd(0xcb)],'scriptContent':_0x47bf10};if(_0x5d4056?.[_0x4fe4cd(0xfa)])_0xdd9e8b['id']=_0x5d4056['remoteId'];if(_0x5d4056?.['version']!=null)_0xdd9e8b[_0x4fe4cd(0xf0)]=_0x5d4056[_0x4fe4cd(0xf0)];if(_0x5a4857)_0xdd9e8b[_0x4fe4cd(0xcc)]=_0x5a4857;if(_0x257372['type']==='HOOK'){const _0x445456=_0x257372['alias'];if(!_0x445456||!_0x257372[_0x4fe4cd(0xca)]||!_0x257372[_0x4fe4cd(0xe1)])throw CliErrors['validation'](_0x4fe4cd(0xd7)+_0x257372[_0x4fe4cd(0xbd)]);const _0x19f84d=_0x13d96b[_0x4fe4cd(0xfc)]['get'](_0x445456)??_0x5d4056?.['datasetCode']??_0x445456,_0x30315c=_0x13d96b[_0x4fe4cd(0xbf)]['get'](_0x19f84d);if(!_0x30315c)throw CliErrors[_0x4fe4cd(0xfe)](_0x4fe4cd(0xf9)+_0x445456+_0x4fe4cd(0xc3)+(_0x4fe4cd(0xce)+CLI_BIN_NAME+_0x4fe4cd(0xf3)));_0xdd9e8b[_0x4fe4cd(0xbe)]=_0x30315c,_0xdd9e8b[_0x4fe4cd(0xca)]=_0x257372[_0x4fe4cd(0xca)],_0xdd9e8b['functionNode']=_0x257372['functionNode'];}const _0x10788d=await saveBffScript(_0xdd9e8b),_0x5ba606=_0x10788d['id'],_0x8b1c07=_0x10788d[_0x4fe4cd(0xc8)]??await getBffScriptInfo(_0x5ba606),_0x277ec6={'hash':_0xc3d9e9,'remoteId':_0x5ba606,'version':_0x8b1c07[_0x4fe4cd(0xf0)]};if(_0x257372[_0x4fe4cd(0xcb)]===_0x4fe4cd(0xc9)){const _0x4c5394=_0x257372[_0x4fe4cd(0xd1)],_0x554f99=_0x13d96b['aliasToDatasetCode'][_0x4fe4cd(0xd9)](_0x4c5394)??_0x5d4056?.[_0x4fe4cd(0xd8)]??_0x4c5394;_0x13d96b['aliasToDatasetCode'][_0x4fe4cd(0xc4)](_0x4c5394)?_0x277ec6[_0x4fe4cd(0xd1)]=_0x4c5394:_0x277ec6[_0x4fe4cd(0xd1)]=_0x5d4056?.[_0x4fe4cd(0xd1)],_0x277ec6['datasetCode']=_0x554f99,_0x277ec6[_0x4fe4cd(0xca)]=_0x257372[_0x4fe4cd(0xca)],_0x277ec6['functionNode']=_0x257372['functionNode'];}_0x2af230[_0x4fe4cd(0xba)][_0x257372['lockKey']]=_0x277ec6;}