@lovrabet/rabetbase-cli 2.3.13-beta.2 → 2.3.13-beta.3

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 (263) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.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/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/logs/index.js +1 -1
  103. package/lib/commands/menu/asset-update.js +1 -0
  104. package/lib/commands/menu/delete.js +1 -1
  105. package/lib/commands/menu/external-link-create.js +1 -1
  106. package/lib/commands/menu/external-link-update.js +1 -0
  107. package/lib/commands/menu/group-create.js +1 -1
  108. package/lib/commands/menu/group-update.js +1 -1
  109. package/lib/commands/menu/index.js +1 -1
  110. package/lib/commands/menu/list.js +1 -1
  111. package/lib/commands/menu/move.js +1 -1
  112. package/lib/commands/menu/regroup-start.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/shared.js +1 -1
  135. package/lib/commands/page/standard-page-status.js +1 -1
  136. package/lib/commands/page/sync.js +1 -1
  137. package/lib/commands/permit/index.js +1 -1
  138. package/lib/commands/permit/page-get.js +1 -1
  139. package/lib/commands/permit/page-set.js +1 -1
  140. package/lib/commands/permit/role-apis-set.js +1 -1
  141. package/lib/commands/permit/role-menus-set.js +1 -1
  142. package/lib/commands/permit/role-menus.js +1 -1
  143. package/lib/commands/permit/shared.js +1 -1
  144. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  145. package/lib/commands/project/create/format-elapsed.js +1 -1
  146. package/lib/commands/project/create/main.js +1 -1
  147. package/lib/commands/project/create/non-interactive.js +1 -1
  148. package/lib/commands/project/create/project-template-path.js +1 -1
  149. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  150. package/lib/commands/project/create/use-format-code.js +1 -1
  151. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  152. package/lib/commands/project/index.js +1 -1
  153. package/lib/commands/project/init.js +1 -1
  154. package/lib/commands/project/upgrade.js +1 -1
  155. package/lib/commands/registry.js +1 -1
  156. package/lib/commands/role/create.js +1 -1
  157. package/lib/commands/role/delete.js +1 -1
  158. package/lib/commands/role/detail.js +1 -1
  159. package/lib/commands/role/index.js +1 -1
  160. package/lib/commands/role/list.js +1 -1
  161. package/lib/commands/role/shared.js +1 -1
  162. package/lib/commands/role/update.js +1 -1
  163. package/lib/commands/role/user-add.js +1 -1
  164. package/lib/commands/role/user-remove.js +1 -1
  165. package/lib/commands/role/user-resolve.js +1 -1
  166. package/lib/commands/run/index.js +1 -1
  167. package/lib/commands/schema.js +1 -1
  168. package/lib/commands/sql/create.js +1 -1
  169. package/lib/commands/sql/delete.js +1 -1
  170. package/lib/commands/sql/detail.js +1 -1
  171. package/lib/commands/sql/exec.js +1 -1
  172. package/lib/commands/sql/index.js +1 -1
  173. package/lib/commands/sql/list.js +1 -1
  174. package/lib/commands/sql/pull.js +1 -1
  175. package/lib/commands/sql/push.js +1 -1
  176. package/lib/commands/sql/save.js +1 -1
  177. package/lib/commands/sql/shared.js +1 -1
  178. package/lib/commands/sql/status.js +1 -1
  179. package/lib/commands/sql/validate.js +1 -1
  180. package/lib/commands/task/index.js +1 -1
  181. package/lib/commands/task/status.js +1 -1
  182. package/lib/commands/workspace/add.js +1 -1
  183. package/lib/commands/workspace/index.js +1 -1
  184. package/lib/commands/workspace/remove.js +1 -1
  185. package/lib/config/schema.js +1 -1
  186. package/lib/constant/cdn.js +1 -1
  187. package/lib/constant/cli.js +1 -1
  188. package/lib/constant/defaults.js +1 -1
  189. package/lib/constant/domain.js +1 -1
  190. package/lib/constant/env.js +1 -1
  191. package/lib/constant/output.js +1 -1
  192. package/lib/constant/paths.js +1 -1
  193. package/lib/constant/risk.js +1 -1
  194. package/lib/context/app-resolver.js +1 -1
  195. package/lib/context/auth-resolver.js +1 -1
  196. package/lib/context/config-loader.js +1 -1
  197. package/lib/context.js +1 -1
  198. package/lib/core/alias-resolver.js +1 -1
  199. package/lib/core/api-client.js +1 -1
  200. package/lib/core/bff/config.js +1 -1
  201. package/lib/core/bff/file-system.js +1 -1
  202. package/lib/core/bff/hash.js +1 -1
  203. package/lib/core/bff/lock.js +1 -1
  204. package/lib/core/bff/utils.js +1 -1
  205. package/lib/core/db-resolver.js +1 -1
  206. package/lib/core/page/file-system.js +1 -1
  207. package/lib/core/page/hash.js +1 -1
  208. package/lib/core/page/lock.js +1 -1
  209. package/lib/core/sql-index-auditor.js +1 -1
  210. package/lib/core/sql-sync/config.js +1 -1
  211. package/lib/core/sql-sync/file-system.js +1 -1
  212. package/lib/core/sql-sync/hash.js +1 -1
  213. package/lib/core/sql-sync/lock.js +1 -1
  214. package/lib/core/sql-sync/utils.js +1 -1
  215. package/lib/core/sql-validator.js +1 -1
  216. package/lib/errors.js +1 -1
  217. package/lib/framework/build-all-flags.js +1 -1
  218. package/lib/framework/error-output.js +1 -1
  219. package/lib/framework/explicit-yes.js +1 -1
  220. package/lib/framework/flags.js +1 -1
  221. package/lib/framework/help.js +1 -1
  222. package/lib/framework/index.js +1 -1
  223. package/lib/framework/output.js +1 -1
  224. package/lib/framework/response.js +1 -1
  225. package/lib/framework/runner-alias.js +1 -1
  226. package/lib/framework/runner.js +1 -1
  227. package/lib/framework/schema-export.js +1 -1
  228. package/lib/framework/types.js +1 -1
  229. package/lib/generated/build-info.js +1 -1
  230. package/lib/help.js +1 -1
  231. package/lib/skills/main.js +1 -1
  232. package/lib/skills/npx-skills-add.js +1 -1
  233. package/lib/telemetry/cli-command-trace.js +1 -1
  234. package/lib/telemetry/cli-help-trace.js +1 -1
  235. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  236. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  237. package/lib/telemetry/send-cli-trace-log.js +1 -1
  238. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  239. package/lib/utils/ai_config.js +1 -1
  240. package/lib/utils/apply-jq-filter.js +1 -1
  241. package/lib/utils/cdn-config.js +1 -1
  242. package/lib/utils/check-sdk-version.js +1 -1
  243. package/lib/utils/cli-version-check.js +1 -1
  244. package/lib/utils/cli-version-policy.js +1 -1
  245. package/lib/utils/config.js +1 -1
  246. package/lib/utils/copy-directory.js +1 -1
  247. package/lib/utils/entity-with-id.js +1 -1
  248. package/lib/utils/file-utils.js +1 -1
  249. package/lib/utils/guides-cdn.js +1 -1
  250. package/lib/utils/http-client.js +1 -1
  251. package/lib/utils/is-non-interactive.js +1 -1
  252. package/lib/utils/logger.js +1 -1
  253. package/lib/utils/params.js +1 -1
  254. package/lib/utils/platform.js +1 -1
  255. package/lib/utils/rules-cdn.js +1 -1
  256. package/lib/utils/sleep.js +1 -1
  257. package/lib/utils/template-replacer.js +1 -1
  258. package/lib/utils/update-notice.js +1 -1
  259. package/lib/utils/version.js +1 -1
  260. package/lib/utils/with-active-cookie.js +1 -1
  261. package/lib/utils/write-cli-side-channel.js +1 -1
  262. package/package.json +1 -1
  263. package/lib/commands/menu/update.js +0 -1
@@ -1 +1 @@
1
- const a93_0x1c397f=a93_0x3a68;(function(_0xe37577,_0x2a4584){const _0x117111=a93_0x3a68,_0x4b0cb2=_0xe37577();while(!![]){try{const _0x53fdef=parseInt(_0x117111(0x18a))/0x1*(parseInt(_0x117111(0x180))/0x2)+-parseInt(_0x117111(0x177))/0x3*(parseInt(_0x117111(0x1c1))/0x4)+-parseInt(_0x117111(0x1cc))/0x5+parseInt(_0x117111(0x197))/0x6*(-parseInt(_0x117111(0x1b7))/0x7)+parseInt(_0x117111(0x1a6))/0x8*(parseInt(_0x117111(0x18e))/0x9)+-parseInt(_0x117111(0x1ca))/0xa+parseInt(_0x117111(0x1c8))/0xb;if(_0x53fdef===_0x2a4584)break;else _0x4b0cb2['push'](_0x4b0cb2['shift']());}catch(_0x331c92){_0x4b0cb2['push'](_0x4b0cb2['shift']());}}}(a93_0x5ab3,0x46371));import a93_0xd8aaec from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';function a93_0x5ab3(){const _0x27fc7c=['\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','locale','value','version','128dtGjeZ','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','empty','✗\x20Invalid\x20JSON','red','8075870yvUwFu','appcode','837260GjGISB','✗\x20Not\x20logged\x20in','2839490ROlktg','\x20\x20─','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','Project','gray','(none)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','currentApp','3822aTxmRy','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20Config\x20Files','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','padEnd','2lqAtKY','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','accessKey','repeat','slice','defaultApp','✗\x20Expired','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(default)','448013Sumfkk','Global','pageSize','appCode','18gjmGtQ','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','apiDir','cookie','apps','env','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','204EXmgyx','(not\x20found)','bold','\x20\x20Auth','missing','(set,\x20length=','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','(not\x20set)','message','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','1205808neTRsG','length','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','(missing)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','✓\x20Valid','status','check','green','raw','(set\x20via\x20file,\x20length=','read','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','103691erzpwE','source','✓\x20Valid\x20JSON','\x20\x20Apps','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity'];a93_0x5ab3=function(){return _0x27fc7c;};return a93_0x5ab3();}function a93_0x3a68(_0x4120d5,_0x3f6950){_0x4120d5=_0x4120d5-0x172;const _0x5ab374=a93_0x5ab3();let _0x3a68e2=_0x5ab374[_0x4120d5];return _0x3a68e2;}import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x26322e){const _0x1b909a=a93_0x3a68,_0x405005=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1b909a(0x185)](0x0,0xa)+')':VERSION,_0x481626=buildConfigFromFlags({}),_0x22b44b=getCookie();console['log'](),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x199)](CLI_BIN_NAME+_0x1b909a(0x191))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)]('─'[_0x1b909a(0x184)](0x32))),console[_0x1b909a(0x19e)](_0x1b909a(0x1bd)+_0x405005),console[_0x1b909a(0x19e)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x1b909a(0x1c0)]),console[_0x1b909a(0x19e)](_0x1b909a(0x19f)+process['platform']+'\x20'+process['arch']),console['log'](),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x199)](_0x1b909a(0x17d))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1cd)[_0x1b909a(0x184)](0x1e)));const _0xc9f938=getGlobalConfigPath(),_0x44a2d8=getProjectConfigPath();console['log'](_0x1b909a(0x17b)+(_0xc9f938||a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x198)))),console[_0x1b909a(0x19e)](_0x1b909a(0x1bb)+(_0x44a2d8||a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x198)))),console[_0x1b909a(0x19e)](),console[_0x1b909a(0x19e)](a93_0xd8aaec['bold'](_0x1b909a(0x1ac))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1cd)[_0x1b909a(0x184)](0x1e)));const _0x59dd2=(_0xfba436,_0x1b3df6)=>{const _0x40df2e=_0x1b909a;if(!_0x1b3df6){console[_0x40df2e(0x19e)]('\x20\x20'+_0xfba436['padEnd'](0x11)+'\x20'+a93_0xd8aaec['gray']('(no\x20file)'));return;}const _0x21892d=inspectCliConfigJsonFile(_0x1b3df6);if(_0x21892d[_0x40df2e(0x1b0)]==='ok')console['log']('\x20\x20'+_0xfba436[_0x40df2e(0x17f)](0x11)+'\x20'+a93_0xd8aaec[_0x40df2e(0x1b2)](_0x40df2e(0x1b9)));else{if(_0x21892d[_0x40df2e(0x1b0)]===_0x40df2e(0x1c5))console[_0x40df2e(0x19e)]('\x20\x20'+_0xfba436[_0x40df2e(0x17f)](0x11)+'\x20'+a93_0xd8aaec[_0x40df2e(0x1a9)](_0x40df2e(0x1c2)));else _0x21892d[_0x40df2e(0x1b0)]===_0x40df2e(0x19b)?console[_0x40df2e(0x19e)]('\x20\x20'+_0xfba436['padEnd'](0x11)+'\x20'+a93_0xd8aaec[_0x40df2e(0x173)](_0x40df2e(0x1aa))):(console[_0x40df2e(0x19e)]('\x20\x20'+_0xfba436[_0x40df2e(0x17f)](0x11)+'\x20'+a93_0xd8aaec[_0x40df2e(0x1c7)](_0x40df2e(0x1c6))),console[_0x40df2e(0x19e)]('\x20\x20'+''[_0x40df2e(0x17f)](0x11)+'\x20'+a93_0xd8aaec[_0x40df2e(0x1c7)](_0x21892d[_0x40df2e(0x1a2)])));}};_0x59dd2(_0x1b909a(0x18b),_0xc9f938),_0x59dd2(_0x1b909a(0x172),_0x44a2d8),console['log'](),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x199)](_0x1b909a(0x179))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1cd)[_0x1b909a(0x184)](0x1e))),console[_0x1b909a(0x19e)](_0x1b909a(0x18f)+(_0x481626[_0x1b909a(0x18d)]||a93_0xd8aaec[_0x1b909a(0x1c7)](_0x1b909a(0x1a1)))),console['log'](_0x1b909a(0x1a8)+_0x481626[_0x1b909a(0x195)]),console[_0x1b909a(0x19e)](_0x1b909a(0x1a3)+_0x481626[_0x1b909a(0x1be)]),console[_0x1b909a(0x19e)](_0x1b909a(0x17a)+_0x481626[_0x1b909a(0x192)]),console[_0x1b909a(0x19e)](_0x1b909a(0x1ce)+(_0x481626['defaultApp']||a93_0xd8aaec['gray'](_0x1b909a(0x174)))),console[_0x1b909a(0x19e)](_0x1b909a(0x175)+(_0x481626[_0x1b909a(0x176)]||a93_0xd8aaec['gray'](_0x1b909a(0x174)))),console['log']('\x20\x20explicitAppName:\x20'+(_0x481626['explicitAppName']||a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x174)))),console[_0x1b909a(0x19e)](_0x1b909a(0x1c3)+(_0x481626['format']||a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1a0)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x1b909a(0x19e)](_0x1b909a(0x19d)+(_0x481626[_0x1b909a(0x18c)]??a93_0xd8aaec[_0x1b909a(0x173)]('(default)'))),console['log'](_0x1b909a(0x1ab)+_0x481626[_0x1b909a(0x1c4)]),console[_0x1b909a(0x19e)](_0x1b909a(0x1a4)+_0x481626[_0x1b909a(0x1a5)]),console['log'](_0x1b909a(0x188)+(_0x481626['cookie']?a93_0xd8aaec[_0x1b909a(0x1b2)](_0x1b909a(0x19c)+_0x481626[_0x1b909a(0x193)][_0x1b909a(0x1a7)]+')'):_0x22b44b?a93_0xd8aaec['green'](_0x1b909a(0x1b4)+_0x22b44b[_0x1b909a(0x1a7)]+')'):a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x174))));const _0x397353=Object['keys'](_0x481626['apps']);if(_0x397353['length']>0x0){console[_0x1b909a(0x19e)](),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x199)](_0x1b909a(0x1ba))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1cd)[_0x1b909a(0x184)](0x1e)));for(const _0x144ea5 of _0x397353){const _0x3abd39=_0x481626[_0x1b909a(0x194)][_0x144ea5],_0x244bcf=_0x144ea5===_0x481626[_0x1b909a(0x186)],_0x4af80f=_0x144ea5===_0x481626[_0x1b909a(0x176)],_0xd1228f=_0x4af80f?a93_0xd8aaec[_0x1b909a(0x1b2)](_0x1b909a(0x17c)):'',_0x8ab5b3=_0x244bcf?_0x1b909a(0x189):'';console['log']('\x20\x20'+_0x144ea5+_0x8ab5b3+_0xd1228f),console[_0x1b909a(0x19e)](_0x1b909a(0x181)+_0x3abd39[_0x1b909a(0x1c9)]);const _0x5d6fca=buildAppDoctorFields(_0x3abd39,{'env':_0x481626[_0x1b909a(0x195)],'apiDir':_0x481626[_0x1b909a(0x1b3)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x1b909a(0x192)],'cookie':_0x481626['cookie']||_0x22b44b||undefined,'accessKey':_0x481626[_0x1b909a(0x183)]});console['log'](_0x1b909a(0x1b6)+_0x5d6fca[_0x1b909a(0x195)][_0x1b909a(0x1bf)]+'\x20\x20'+a93_0xd8aaec[_0x1b909a(0x173)]('('+_0x5d6fca['env'][_0x1b909a(0x1b8)]+')')),console[_0x1b909a(0x19e)](_0x1b909a(0x182)+_0x5d6fca['apiDir'][_0x1b909a(0x1bf)]+'\x20\x20'+a93_0xd8aaec[_0x1b909a(0x173)]('('+_0x5d6fca[_0x1b909a(0x192)][_0x1b909a(0x1b8)]+')'));const _0x4177d5=_0x5d6fca[_0x1b909a(0x193)][_0x1b909a(0x1bf)]?a93_0xd8aaec[_0x1b909a(0x1b2)](_0x1b909a(0x19c)+_0x5d6fca[_0x1b909a(0x193)]['value'][_0x1b909a(0x1a7)]+')'):a93_0xd8aaec['gray'](_0x1b909a(0x174));console['log'](_0x1b909a(0x196)+_0x4177d5+'\x20\x20'+a93_0xd8aaec[_0x1b909a(0x173)]('('+_0x5d6fca[_0x1b909a(0x193)][_0x1b909a(0x1b8)]+')'));const _0x1134f9=_0x5d6fca['accessKey'][_0x1b909a(0x1bf)]?a93_0xd8aaec[_0x1b909a(0x1b2)](_0x1b909a(0x19c)+_0x5d6fca['accessKey'][_0x1b909a(0x1bf)]['length']+')'):a93_0xd8aaec['gray'](_0x1b909a(0x174));console[_0x1b909a(0x19e)](_0x1b909a(0x1ad)+_0x1134f9+'\x20\x20'+a93_0xd8aaec[_0x1b909a(0x173)]('('+_0x5d6fca['accessKey'][_0x1b909a(0x1b8)]+')'));}}console[_0x1b909a(0x19e)](),console[_0x1b909a(0x19e)](a93_0xd8aaec['bold']('\x20\x20API\x20Endpoints')),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)](_0x1b909a(0x1cd)['repeat'](0x1e))),console[_0x1b909a(0x19e)](_0x1b909a(0x17e)+getApiDomain()),console[_0x1b909a(0x19e)](_0x1b909a(0x1ae)+getUserDomain()),console['log'](_0x1b909a(0x178)+getRuntimeDomain()),console[_0x1b909a(0x19e)](),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x199)](_0x1b909a(0x19a))),console[_0x1b909a(0x19e)](a93_0xd8aaec[_0x1b909a(0x173)]('\x20\x20─'[_0x1b909a(0x184)](0x1e)));if(_0x22b44b){const _0x2db4ad=await getIsSessionValid();console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2db4ad?a93_0xd8aaec[_0x1b909a(0x1b2)](_0x1b909a(0x1af)):a93_0xd8aaec['red'](_0x1b909a(0x187))));}else console[_0x1b909a(0x19e)](_0x1b909a(0x190)+a93_0xd8aaec['red'](_0x1b909a(0x1cb)));return console[_0x1b909a(0x19e)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a93_0x1c397f(0x1b1),'description':a93_0x1c397f(0x1bc),'risk':a93_0x1c397f(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a93_0x10fe(){const _0x2366b6=['slice','red','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','gray','11512kJjXpc','repeat','✓\x20Valid\x20JSON','\x20\x20Merged\x20Config','37815eyzPpG','yellow','Global','format','platform','raw','4574255wCfddR','message','Project','defaultApp','\x20doctor','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','\x20\x20Apps','\x20(default)','(none)','verbose','4214470TnEiQv','2493kJuLzJ','accessKey','status','missing','1062874ahTZHq','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','36562840fWDUsQ','env','(default)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','green','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','keys','doctor','locale','\x20\x20─','source','apps','1181780LPiCZj','riskLevel','\x20\x20API\x20Endpoints','padEnd','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','pageSize','(missing)','appCode','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','268SFoarQ','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20←\x20current','✗\x20Invalid\x20JSON','apiDir','cookie','length','log','read','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6aJmUZi','✗\x20Not\x20logged\x20in','version','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(default:\x20','bold','✗\x20Expired','(not\x20found)','value','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a93_0x10fe=function(){return _0x2366b6;};return a93_0x10fe();}const a93_0x16114e=a93_0xea4f;(function(_0x1594c9,_0x30a9a7){const _0x142ed9=a93_0xea4f,_0xcca15a=_0x1594c9();while(!![]){try{const _0x4a27c3=-parseInt(_0x142ed9(0x10c))/0x1+-parseInt(_0x142ed9(0x11f))/0x2+parseInt(_0x142ed9(0x14a))/0x3*(-parseInt(_0x142ed9(0x12a))/0x4)+-parseInt(_0x142ed9(0x107))/0x5+-parseInt(_0x142ed9(0x138))/0x6*(-parseInt(_0x142ed9(0x150))/0x7)+parseInt(_0x142ed9(0x146))/0x8*(-parseInt(_0x142ed9(0x108))/0x9)+parseInt(_0x142ed9(0x10f))/0xa;if(_0x4a27c3===_0x30a9a7)break;else _0xcca15a['push'](_0xcca15a['shift']());}catch(_0x56100f){_0xcca15a['push'](_0xcca15a['shift']());}}}(a93_0x10fe,0x8b261));function a93_0xea4f(_0x17c9b6,_0x1fea33){_0x17c9b6=_0x17c9b6-0x102;const _0x10fe35=a93_0x10fe();let _0xea4f33=_0x10fe35[_0x17c9b6];return _0xea4f33;}import a93_0x3842be from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x20c2dc){const _0x508329=a93_0xea4f,_0xb6acd=GIT_COMMIT!==_0x508329(0x116)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x508329(0x142)](0x0,0xa)+')':VERSION,_0x421792=buildConfigFromFlags({}),_0x5c348c=getCookie();console['log'](),console['log'](a93_0x3842be[_0x508329(0x13d)](CLI_BIN_NAME+_0x508329(0x154))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)]('─'['repeat'](0x32))),console['log'](_0x508329(0x136)+_0xb6acd),console[_0x508329(0x133)](_0x508329(0x155)+process[_0x508329(0x13a)]),console[_0x508329(0x133)](_0x508329(0x12b)+process[_0x508329(0x14e)]+'\x20'+process['arch']),console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)]('\x20\x20Config\x20Files')),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));const _0x214178=getGlobalConfigPath(),_0x4bb57d=getProjectConfigPath();console['log'](_0x508329(0x115)+(_0x214178||a93_0x3842be[_0x508329(0x145)]('(not\x20found)'))),console[_0x508329(0x133)](_0x508329(0x129)+(_0x4bb57d||a93_0x3842be[_0x508329(0x145)](_0x508329(0x13f)))),console[_0x508329(0x133)](),console['log'](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x156))),console['log'](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));const _0x9b995e=(_0x2e389f,_0x345780)=>{const _0x1b500d=_0x508329;if(!_0x345780){console['log']('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x145)]('(no\x20file)'));return;}const _0x29f11b=inspectCliConfigJsonFile(_0x345780);if(_0x29f11b[_0x1b500d(0x10a)]==='ok')console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x117)](_0x1b500d(0x148)));else{if(_0x29f11b[_0x1b500d(0x10a)]===_0x1b500d(0x114))console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f['padEnd'](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x14b)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x29f11b[_0x1b500d(0x10a)]===_0x1b500d(0x10b)?console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f['padEnd'](0x11)+'\x20'+a93_0x3842be['gray'](_0x1b500d(0x126))):(console[_0x1b500d(0x133)]('\x20\x20'+_0x2e389f[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x143)](_0x1b500d(0x12f))),console[_0x1b500d(0x133)]('\x20\x20'+''[_0x1b500d(0x122)](0x11)+'\x20'+a93_0x3842be[_0x1b500d(0x143)](_0x29f11b[_0x1b500d(0x151)])));}};_0x9b995e(_0x508329(0x14c),_0x214178),_0x9b995e(_0x508329(0x152),_0x4bb57d),console['log'](),console['log'](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x149))),console[_0x508329(0x133)](a93_0x3842be['gray'](_0x508329(0x11c)[_0x508329(0x147)](0x1e))),console[_0x508329(0x133)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x421792[_0x508329(0x127)]||a93_0x3842be['red']('(not\x20set)'))),console[_0x508329(0x133)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x110)]),console[_0x508329(0x133)](_0x508329(0x141)+_0x421792[_0x508329(0x11b)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x130)]),console[_0x508329(0x133)](_0x508329(0x113)+(_0x421792['defaultApp']||a93_0x3842be[_0x508329(0x145)](_0x508329(0x105)))),console[_0x508329(0x133)](_0x508329(0x124)+(_0x421792['currentApp']||a93_0x3842be[_0x508329(0x145)]('(none)'))),console[_0x508329(0x133)](_0x508329(0x102)+(_0x421792[_0x508329(0x10e)]||a93_0x3842be[_0x508329(0x145)](_0x508329(0x105)))),console[_0x508329(0x133)](_0x508329(0x10d)+(_0x421792[_0x508329(0x14d)]||a93_0x3842be['gray'](_0x508329(0x13c)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x508329(0x133)](_0x508329(0x157)+(_0x421792[_0x508329(0x125)]??a93_0x3842be['gray'](_0x508329(0x111)))),console[_0x508329(0x133)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x421792[_0x508329(0x120)]),console[_0x508329(0x133)](_0x508329(0x112)+_0x421792[_0x508329(0x106)]),console[_0x508329(0x133)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x421792[_0x508329(0x131)]?a93_0x3842be[_0x508329(0x117)]('(set,\x20length='+_0x421792[_0x508329(0x131)][_0x508329(0x132)]+')'):_0x5c348c?a93_0x3842be['green']('(set\x20via\x20file,\x20length='+_0x5c348c[_0x508329(0x132)]+')'):a93_0x3842be['gray']('(none)')));const _0x34151a=Object[_0x508329(0x119)](_0x421792[_0x508329(0x11e)]);if(_0x34151a[_0x508329(0x132)]>0x0){console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be['bold'](_0x508329(0x103))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));for(const _0xb21f36 of _0x34151a){const _0x199a43=_0x421792[_0x508329(0x11e)][_0xb21f36],_0x193d3e=_0xb21f36===_0x421792[_0x508329(0x153)],_0x38843d=_0xb21f36===_0x421792['currentApp'],_0x596111=_0x38843d?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12e)):'',_0x215b75=_0x193d3e?_0x508329(0x104):'';console['log']('\x20\x20'+_0xb21f36+_0x215b75+_0x596111),console[_0x508329(0x133)](_0x508329(0x13b)+_0x199a43['appcode']);const _0x304540=buildAppDoctorFields(_0x199a43,{'env':_0x421792[_0x508329(0x110)],'apiDir':_0x421792[_0x508329(0x14f)][_0x508329(0x130)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x421792[_0x508329(0x131)]||_0x5c348c||undefined,'accessKey':_0x421792['accessKey']});console[_0x508329(0x133)](_0x508329(0x135)+_0x304540[_0x508329(0x110)]['value']+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x110)][_0x508329(0x11d)]+')')),console[_0x508329(0x133)](_0x508329(0x12d)+_0x304540['apiDir'][_0x508329(0x140)]+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x130)][_0x508329(0x11d)]+')'));const _0x500cfc=_0x304540[_0x508329(0x131)][_0x508329(0x140)]?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12c)+_0x304540[_0x508329(0x131)][_0x508329(0x140)]['length']+')'):a93_0x3842be['gray']('(none)');console[_0x508329(0x133)](_0x508329(0x118)+_0x500cfc+'\x20\x20'+a93_0x3842be[_0x508329(0x145)]('('+_0x304540[_0x508329(0x131)][_0x508329(0x11d)]+')'));const _0x548e5f=_0x304540['accessKey']['value']?a93_0x3842be[_0x508329(0x117)](_0x508329(0x12c)+_0x304540[_0x508329(0x109)][_0x508329(0x140)][_0x508329(0x132)]+')'):a93_0x3842be[_0x508329(0x145)]('(none)');console[_0x508329(0x133)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x548e5f+'\x20\x20'+a93_0x3842be['gray']('('+_0x304540[_0x508329(0x109)][_0x508329(0x11d)]+')'));}}console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)](_0x508329(0x121))),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e))),console['log'](_0x508329(0x144)+getApiDomain()),console[_0x508329(0x133)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x508329(0x133)](_0x508329(0x123)+getRuntimeDomain()),console[_0x508329(0x133)](),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x13d)]('\x20\x20Auth')),console[_0x508329(0x133)](a93_0x3842be[_0x508329(0x145)](_0x508329(0x11c)[_0x508329(0x147)](0x1e)));if(_0x5c348c){const _0x12d0e1=await getIsSessionValid();console[_0x508329(0x133)](_0x508329(0x137)+(_0x12d0e1?a93_0x3842be[_0x508329(0x117)]('✓\x20Valid'):a93_0x3842be[_0x508329(0x143)](_0x508329(0x13e))));}else console[_0x508329(0x133)](_0x508329(0x137)+a93_0x3842be[_0x508329(0x143)](_0x508329(0x139)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x16114e(0x11a),'command':'check','description':a93_0x16114e(0x128),'risk':a93_0x16114e(0x134),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a94_0x59bb64=a94_0x58fc;(function(_0x54f713,_0xd8b768){const _0x48449f=a94_0x58fc,_0x5a507c=_0x54f713();while(!![]){try{const _0x415994=-parseInt(_0x48449f(0x1d1))/0x1*(-parseInt(_0x48449f(0x1ef))/0x2)+parseInt(_0x48449f(0x1c7))/0x3*(-parseInt(_0x48449f(0x1e1))/0x4)+-parseInt(_0x48449f(0x1cc))/0x5*(parseInt(_0x48449f(0x1f0))/0x6)+-parseInt(_0x48449f(0x1e9))/0x7*(-parseInt(_0x48449f(0x1d3))/0x8)+parseInt(_0x48449f(0x1cf))/0x9*(-parseInt(_0x48449f(0x1c9))/0xa)+parseInt(_0x48449f(0x1c8))/0xb*(-parseInt(_0x48449f(0x1ee))/0xc)+parseInt(_0x48449f(0x1d6))/0xd*(parseInt(_0x48449f(0x1da))/0xe);if(_0x415994===_0xd8b768)break;else _0x5a507c['push'](_0x5a507c['shift']());}catch(_0x413e4c){_0x5a507c['push'](_0x5a507c['shift']());}}}(a94_0x25b4,0x8a1be));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a94_0x58fc(_0x3810cc,_0x3d42f3){_0x3810cc=_0x3810cc-0x1c7;const _0x25b41f=a94_0x25b4();let _0x58fc03=_0x25b41f[_0x3810cc];return _0x58fc03;}const FILE_FLAG={'name':a94_0x59bb64(0x1d9),'type':a94_0x59bb64(0x1db),'required':!![],'description':a94_0x59bb64(0x1e2)},FILEPATH_FLAG={'name':a94_0x59bb64(0x1e8),'type':a94_0x59bb64(0x1db),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a94_0x59bb64(0x1de),'type':a94_0x59bb64(0x1d4),'description':a94_0x59bb64(0x1f1)},LONG_TERM_FLAG={'name':a94_0x59bb64(0x1d2),'type':a94_0x59bb64(0x1d4),'description':a94_0x59bb64(0x1e7)};function a94_0x25b4(){const _0x10c0b6=['str','appCode','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filepath','7dlyBLV','Preview:\x20upload\x20','filePath','read','File','359532csuZcR','6UXAXfG','33684rdhnlp','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','393Strxkv','253EWHIEw','7497850bVffTj','\x20to\x20development\x20app\x20','/smartapi/common/uploadFile','870ydMXGR','upload','Uploaded\x20file:\x20','9RqYqVh','validation','173408jLVsET','long-term','156952DaPCkE','boolean','POST','52quVKDI','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','write','file','9938894IXkzzH','string','trim','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','download','bool','filePath\x20is\x20required.','12156xZySss','Path\x20to\x20the\x20local\x20file\x20to\x20upload','path'];a94_0x25b4=function(){return _0x10c0b6;};return a94_0x25b4();}function requireFilePath(_0x1eb07b){const _0x3b8261=a94_0x59bb64,_0x2b4661=_0x1eb07b[_0x3b8261(0x1dc)]();if(!_0x2b4661)throw CliErrors[_0x3b8261(0x1d0)](_0x3b8261(0x1e0));return _0x2b4661;}const fileUpload={'service':a94_0x59bb64(0x1d9),'command':a94_0x59bb64(0x1cd),'description':a94_0x59bb64(0x1dd),'risk':a94_0x59bb64(0x1d8),'flags':[FILE_FLAG],async 'dryRun'(_0x5f2b01){const _0x5325be=a94_0x59bb64,_0x4e5314=requireDevelopmentUploadFile(_0x5f2b01[_0x5325be(0x1e4)](_0x5325be(0x1d9)),_0x5325be(0x1ed));return{'method':_0x5325be(0x1d5),'url':_0x5325be(0x1cb),'body':{'appCode':_0x5f2b01[_0x5325be(0x1e5)],'multipart':{'file':_0x4e5314}},'description':_0x5325be(0x1ea)+_0x4e5314[_0x5325be(0x1e3)]+_0x5325be(0x1ca)+_0x5f2b01[_0x5325be(0x1e5)]};},async 'execute'(_0x9bc445){const _0xbc683c=a94_0x59bb64,_0x55181f=requireDevelopmentUploadFile(_0x9bc445['str'](_0xbc683c(0x1d9)),_0xbc683c(0x1ed)),_0x4681a0=await uploadDevelopmentFile(_0x9bc445[_0xbc683c(0x1e5)],_0x55181f[_0xbc683c(0x1e3)]);return{'ok':!![],'data':_0x4681a0,'message':_0x4681a0[_0xbc683c(0x1eb)]?_0xbc683c(0x1ce)+_0x4681a0['filePath']+_0xbc683c(0x1e6):_0xbc683c(0x1d7)};}},fileQueryUrl={'service':a94_0x59bb64(0x1d9),'command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a94_0x59bb64(0x1ec),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4da45e){const _0x322b22=a94_0x59bb64,_0x329966=requireFilePath(_0x4da45e[_0x322b22(0x1e4)]('filepath')),_0x5b4a54=await queryDevelopmentFileUrl(_0x329966,{'download':_0x4da45e[_0x322b22(0x1df)](_0x322b22(0x1de)),'longTerm':_0x4da45e[_0x322b22(0x1df)]('long-term')});return{'ok':!![],'data':_0x5b4a54};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a94_0x32138c=a94_0x7fec;function a94_0x7fec(_0xe2329a,_0x4954bd){_0xe2329a=_0xe2329a-0xc6;const _0x4f43d1=a94_0x4f43();let _0x7fec0=_0x4f43d1[_0xe2329a];return _0x7fec0;}(function(_0x165529,_0x5f2959){const _0x58eef4=a94_0x7fec,_0x55a87f=_0x165529();while(!![]){try{const _0x53438b=-parseInt(_0x58eef4(0xce))/0x1*(parseInt(_0x58eef4(0xe8))/0x2)+-parseInt(_0x58eef4(0xd2))/0x3+-parseInt(_0x58eef4(0xdf))/0x4+parseInt(_0x58eef4(0xc9))/0x5+-parseInt(_0x58eef4(0xe6))/0x6+-parseInt(_0x58eef4(0xd6))/0x7+parseInt(_0x58eef4(0xda))/0x8;if(_0x53438b===_0x5f2959)break;else _0x55a87f['push'](_0x55a87f['shift']());}catch(_0x5b8741){_0x55a87f['push'](_0x55a87f['shift']());}}}(a94_0x4f43,0x39f12));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x32138c(0xe2),'type':a94_0x32138c(0xd7),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a94_0x32138c(0xc8),'type':a94_0x32138c(0xd7),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a94_0x32138c(0xe5),'type':a94_0x32138c(0xdd),'description':a94_0x32138c(0xe7)},LONG_TERM_FLAG={'name':a94_0x32138c(0xd4),'type':a94_0x32138c(0xdd),'description':a94_0x32138c(0xcd)};function a94_0x4f43(){const _0x5890e6=['filePath\x20is\x20required.','boolean','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','1849904jzWWvF','POST','Uploaded\x20file:\x20','file','appCode','read','download','2009262eXMCiu','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','4EtMNeV','Preview:\x20upload\x20','File','filepath','1556990xqvwQO','filePath','validation','query-url','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','223477NWWQfr','\x20to\x20development\x20app\x20','bool','/smartapi/common/uploadFile','1265673lBAAJf','upload','long-term','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','2076508oRTyWO','string','path','str','15110192fOXXUp','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references'];a94_0x4f43=function(){return _0x5890e6;};return a94_0x4f43();}function requireFilePath(_0x50b872){const _0x4d4a28=a94_0x32138c,_0x309532=_0x50b872['trim']();if(!_0x309532)throw CliErrors[_0x4d4a28(0xcb)](_0x4d4a28(0xdc));return _0x309532;}const fileUpload={'service':a94_0x32138c(0xe2),'command':a94_0x32138c(0xd3),'description':a94_0x32138c(0xdb),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x49f004){const _0xccc271=a94_0x32138c,_0x381a66=requireDevelopmentUploadFile(_0x49f004[_0xccc271(0xd9)](_0xccc271(0xe2)),_0xccc271(0xc7));return{'method':_0xccc271(0xe0),'url':_0xccc271(0xd1),'body':{'appCode':_0x49f004[_0xccc271(0xe3)],'multipart':{'file':_0x381a66}},'description':_0xccc271(0xc6)+_0x381a66[_0xccc271(0xd8)]+_0xccc271(0xcf)+_0x49f004[_0xccc271(0xe3)]};},async 'execute'(_0x1843f8){const _0x12d34e=a94_0x32138c,_0x2d91e0=requireDevelopmentUploadFile(_0x1843f8['str'](_0x12d34e(0xe2)),_0x12d34e(0xc7)),_0x190b20=await uploadDevelopmentFile(_0x1843f8[_0x12d34e(0xe3)],_0x2d91e0[_0x12d34e(0xd8)]);return{'ok':!![],'data':_0x190b20,'message':_0x190b20[_0x12d34e(0xca)]?_0x12d34e(0xe1)+_0x190b20['filePath']+_0x12d34e(0xd5):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a94_0x32138c(0xe2),'command':a94_0x32138c(0xcc),'description':a94_0x32138c(0xde),'risk':a94_0x32138c(0xe4),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x51cb06){const _0x381a6e=a94_0x32138c,_0x4eda8b=requireFilePath(_0x51cb06['str'](_0x381a6e(0xc8))),_0x1ccdde=await queryDevelopmentFileUrl(_0x4eda8b,{'download':_0x51cb06[_0x381a6e(0xd0)](_0x381a6e(0xe5)),'longTerm':_0x51cb06[_0x381a6e(0xd0)]('long-term')});return{'ok':!![],'data':_0x1ccdde};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- function a95_0x479e(_0x1ec2d1,_0x34da8a){_0x1ec2d1=_0x1ec2d1-0x8a;const _0x31bbb5=a95_0x31bb();let _0x479e8a=_0x31bbb5[_0x1ec2d1];return _0x479e8a;}function a95_0x31bb(){const _0x3cfab8=['8eplafg','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','96XLFwGB','7813140EGJrJE','string','11TtEklg','132IEsPKO','write','flagMissing','log','env','yes','Use\x20`','App\x20code\x20to\x20initialize\x20with','nonInteractive','validation','map','boolean','Target\x20environment','2672556DTAcVE','4103911MEWZWB','Write\x20to\x20global\x20config\x20instead\x20of\x20project','custom','10JJZxiv','Auto-confirm\x20prompts','message','run','\x20config','valid','5297211COfNgk','toLocaleString','34728JfCSTu','join','str','global','production','\x20\x20Default:\x20','181440FTndiP','appcode','project','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','94125fUBnuT','bool','\x0a✓\x20Successfully\x20initialized\x20','init','\x20\x20Apps:\x20','appCode'];a95_0x31bb=function(){return _0x3cfab8;};return a95_0x31bb();}const a95_0x29bced=a95_0x479e;(function(_0x4c7bfe,_0x6efc9a){const _0x539837=a95_0x479e,_0x3f13d7=_0x4c7bfe();while(!![]){try{const _0x40b470=parseInt(_0x539837(0xb2))/0x1+-parseInt(_0x539837(0xa7))/0x2*(parseInt(_0x539837(0x8a))/0x3)+parseInt(_0x539837(0x8e))/0x4*(parseInt(_0x539837(0xad))/0x5)+parseInt(_0x539837(0x9b))/0x6+-parseInt(_0x539837(0x9c))/0x7*(parseInt(_0x539837(0xb8))/0x8)+parseInt(_0x539837(0xa5))/0x9*(-parseInt(_0x539837(0x9f))/0xa)+-parseInt(_0x539837(0x8d))/0xb*(-parseInt(_0x539837(0x8b))/0xc);if(_0x40b470===_0x6efc9a)break;else _0x3f13d7['push'](_0x3f13d7['shift']());}catch(_0x3cb281){_0x3f13d7['push'](_0x3f13d7['shift']());}}}(a95_0x31bb,0xa08f2));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x5df673){return{'appCode':_0x5df673,'appName':_0x5df673};}function writeInitConfig(_0x5547a3,_0x529e02,_0x2bd931){const _0x730df7=a95_0x479e,_0x39f0b6=resolveWriteConfigPath(_0x5547a3),_0x537211=buildCanonicalProjectConfig({},{'appCodes':_0x529e02['map'](_0x156d58=>_0x156d58[_0x730df7(0xb7)]),'env':_0x2bd931,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x730df7(0xa6)]()}});writeConfigFile(_0x39f0b6,_0x537211);const _0x5ce85b=_0x5547a3===_0x730df7(0xaa)?_0x730df7(0xaa):_0x730df7(0xaf);console[_0x730df7(0x91)](_0x730df7(0xb4)+_0x5ce85b+_0x730df7(0xa3)),console[_0x730df7(0x91)](_0x730df7(0xb6)+_0x529e02[_0x730df7(0x98)](_0x39f9e6=>_0x39f9e6[_0x730df7(0xb7)])[_0x730df7(0xa8)](',\x20')),console[_0x730df7(0x91)](_0x730df7(0xac)+_0x537211['defaultApp']),console[_0x730df7(0x91)]('\x20\x20Env:\x20'+_0x537211[_0x730df7(0x92)]),console['log']('\x20\x20Config:\x20'+_0x39f0b6);}async function runSmartInit(_0x3a3692){const _0x485df5=a95_0x479e,_0x5bfaad=process['cwd'](),_0x2f5f43=_0x3a3692[_0x485df5(0xb3)](_0x485df5(0xaa))?'global':_0x485df5(0xaf),_0x5de307=_0x3a3692[_0x485df5(0xa9)](_0x485df5(0x92))||_0x485df5(0xab),_0x225ad7=_0x3a3692[_0x485df5(0xa9)](_0x485df5(0xae))||undefined,_0x402b90=_0x3a3692[_0x485df5(0xb3)]('project');if(_0x402b90){const {initConfig:_0x4cb774}=await import('../../commands/project/init.js');return _0x4cb774({'appcode':_0x225ad7,'env':_0x5de307,'autoYes':_0x3a3692[_0x485df5(0xb3)](_0x485df5(0x93))});}if(_0x2f5f43===_0x485df5(0xaf)){const _0x2747c7=existsSync(resolve(_0x5bfaad,NEW_CONFIG_NAME)),_0x165db0=LEGACY_CONFIG_NAMES['some'](_0x2dde2c=>existsSync(resolve(_0x5bfaad,_0x2dde2c)));if(_0x165db0&&!_0x2747c7)return console[_0x485df5(0x91)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x3a3692[_0x485df5(0x96)],{'yes':_0x3a3692['bool'](_0x485df5(0x93))});if(_0x2747c7)throw CliErrors[_0x485df5(0x97)](_0x485df5(0xba),_0x485df5(0x94)+CLI_BIN_NAME+_0x485df5(0xb0));}if(_0x225ad7){const _0x50082e=validateAppcode(_0x225ad7);if(!_0x50082e[_0x485df5(0xa4)])throw CliErrors[_0x485df5(0x97)](_0x50082e[_0x485df5(0xa1)]);writeInitConfig(_0x2f5f43,[syntheticApp(_0x225ad7)],_0x5de307);return;}if(_0x3a3692[_0x485df5(0x96)])throw CliErrors[_0x485df5(0x90)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x457110=getCookie(),_0x58e4b4=await selectMultipleApps(_0x457110),_0x2d5642=_0x58e4b4===_0x485df5(0x9e)?[syntheticApp(await promptCustomAppcode())]:_0x58e4b4;writeInitConfig(_0x2f5f43,_0x2d5642,_0x5de307);}const initFlags=[{'name':a95_0x29bced(0xaa),'type':a95_0x29bced(0x99),'description':a95_0x29bced(0x9d),'default':![]},{'name':a95_0x29bced(0x92),'type':'string','description':a95_0x29bced(0x9a),'default':a95_0x29bced(0xab),'enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x29bced(0xae),'type':a95_0x29bced(0x8c),'description':a95_0x29bced(0x95)},{'name':a95_0x29bced(0xaf),'type':a95_0x29bced(0x99),'description':a95_0x29bced(0xb9),'default':![]},{'name':a95_0x29bced(0x93),'type':'boolean','description':a95_0x29bced(0xa0),'default':![]}];export const initDefinitions=[{'service':a95_0x29bced(0xb5),'command':a95_0x29bced(0xa2),'description':a95_0x29bced(0xb1),'risk':a95_0x29bced(0x8f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x359e2a){return await runSmartInit(_0x359e2a),{'ok':!![]};}}];
1
+ const a95_0x2ddf86=a95_0xdd7f;(function(_0x4d1eee,_0x213216){const _0x3b3c35=a95_0xdd7f,_0x24788e=_0x4d1eee();while(!![]){try{const _0x153982=-parseInt(_0x3b3c35(0xd7))/0x1*(-parseInt(_0x3b3c35(0xee))/0x2)+-parseInt(_0x3b3c35(0xdd))/0x3+-parseInt(_0x3b3c35(0xd3))/0x4+-parseInt(_0x3b3c35(0xd2))/0x5*(-parseInt(_0x3b3c35(0xe6))/0x6)+parseInt(_0x3b3c35(0xf9))/0x7*(parseInt(_0x3b3c35(0xfb))/0x8)+-parseInt(_0x3b3c35(0xf2))/0x9+parseInt(_0x3b3c35(0xde))/0xa;if(_0x153982===_0x213216)break;else _0x24788e['push'](_0x24788e['shift']());}catch(_0x1a8566){_0x24788e['push'](_0x24788e['shift']());}}}(a95_0x4134,0xf0891));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a95_0x4134(){const _0x4a26fe=['project','join','write','str','\x20\x20Env:\x20','some','boolean','868026xRnBdX','Usage:\x20','global','run','log','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','Target\x20environment','appcode','1646DGpkRB','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','message','13706136FiWWsd','App\x20code\x20to\x20initialize\x20with','flagMissing','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','init','validation','env','259uknycI','../../commands/project/init.js','375784lCnOKo','toLocaleString','nonInteractive','\x0a✓\x20Successfully\x20initialized\x20','appCode','defaultApp','string','5BgKaNZ','1350080ZcScja','bool','production','Write\x20to\x20global\x20config\x20instead\x20of\x20project','1436tjjiCh','custom','Use\x20`','yes','map','\x20config','3843471QADNvq','10623140bYVsgg'];a95_0x4134=function(){return _0x4a26fe;};return a95_0x4134();}import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x615aee){return{'appCode':_0x615aee,'appName':_0x615aee};}function writeInitConfig(_0x61c64b,_0x24b217,_0x51432c){const _0x4a4619=a95_0xdd7f,_0x2bc273=resolveWriteConfigPath(_0x61c64b),_0x214a90=buildCanonicalProjectConfig({},{'appCodes':_0x24b217['map'](_0x5c7d90=>_0x5c7d90['appCode']),'env':_0x51432c,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x4a4619(0xfc)]()}});writeConfigFile(_0x2bc273,_0x214a90);const _0x39b3af=_0x61c64b==='global'?_0x4a4619(0xe8):_0x4a4619(0xdf);console[_0x4a4619(0xea)](_0x4a4619(0xfe)+_0x39b3af+_0x4a4619(0xdc)),console[_0x4a4619(0xea)]('\x20\x20Apps:\x20'+_0x24b217[_0x4a4619(0xdb)](_0xc056c6=>_0xc056c6[_0x4a4619(0xff)])[_0x4a4619(0xe0)](',\x20')),console['log']('\x20\x20Default:\x20'+_0x214a90[_0x4a4619(0x100)]),console[_0x4a4619(0xea)](_0x4a4619(0xe3)+_0x214a90[_0x4a4619(0xf8)]),console[_0x4a4619(0xea)]('\x20\x20Config:\x20'+_0x2bc273);}async function runSmartInit(_0x391267){const _0x52c302=a95_0xdd7f,_0x2dcb4d=process['cwd'](),_0x23a5ec=_0x391267['bool']('global')?_0x52c302(0xe8):_0x52c302(0xdf),_0x356478=_0x391267[_0x52c302(0xe2)]('env')||_0x52c302(0xd5),_0x3801e0=_0x391267['str'](_0x52c302(0xed))||undefined,_0x2b94e4=_0x391267[_0x52c302(0xd4)](_0x52c302(0xdf));if(_0x2b94e4){const {initConfig:_0x424398}=await import(_0x52c302(0xfa));return _0x424398({'appcode':_0x3801e0,'env':_0x356478,'autoYes':_0x391267[_0x52c302(0xd4)](_0x52c302(0xda))});}if(_0x23a5ec===_0x52c302(0xdf)){const _0x3a253b=existsSync(resolve(_0x2dcb4d,NEW_CONFIG_NAME)),_0x1fcd86=LEGACY_CONFIG_NAMES[_0x52c302(0xe4)](_0x58bdcb=>existsSync(resolve(_0x2dcb4d,_0x58bdcb)));if(_0x1fcd86&&!_0x3a253b)return console['log']('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x391267[_0x52c302(0xfd)],{'yes':_0x391267['bool']('yes')});if(_0x3a253b)throw CliErrors[_0x52c302(0xf7)](_0x52c302(0xf0),_0x52c302(0xd9)+CLI_BIN_NAME+_0x52c302(0xf5));}if(_0x3801e0){const _0x48a7d8=validateAppcode(_0x3801e0);if(!_0x48a7d8['valid'])throw CliErrors[_0x52c302(0xf7)](_0x48a7d8[_0x52c302(0xf1)]);writeInitConfig(_0x23a5ec,[syntheticApp(_0x3801e0)],_0x356478);return;}if(_0x391267[_0x52c302(0xfd)])throw CliErrors[_0x52c302(0xf4)](_0x52c302(0xed),_0x52c302(0xe7)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0xdad917=getCookie(),_0x2f8ecd=await selectMultipleApps(_0xdad917),_0x22c51e=_0x2f8ecd===_0x52c302(0xd8)?[syntheticApp(await promptCustomAppcode())]:_0x2f8ecd;writeInitConfig(_0x23a5ec,_0x22c51e,_0x356478);}function a95_0xdd7f(_0x41cdee,_0x3cd909){_0x41cdee=_0x41cdee-0xd2;const _0x41343e=a95_0x4134();let _0xdd7f10=_0x41343e[_0x41cdee];return _0xdd7f10;}const initFlags=[{'name':a95_0x2ddf86(0xe8),'type':a95_0x2ddf86(0xe5),'description':a95_0x2ddf86(0xd6),'default':![]},{'name':a95_0x2ddf86(0xf8),'type':'string','description':a95_0x2ddf86(0xec),'default':a95_0x2ddf86(0xd5),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a95_0x2ddf86(0x101),'description':a95_0x2ddf86(0xf3)},{'name':a95_0x2ddf86(0xdf),'type':a95_0x2ddf86(0xe5),'description':a95_0x2ddf86(0xef),'default':![]},{'name':'yes','type':a95_0x2ddf86(0xe5),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a95_0x2ddf86(0xf6),'command':a95_0x2ddf86(0xe9),'description':a95_0x2ddf86(0xeb),'risk':a95_0x2ddf86(0xe1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x505ffb){return await runSmartInit(_0x505ffb),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x25cb76,_0x1448ca){const _0x303d18=a96_0x6b3c,_0x349a6a=_0x25cb76();while(!![]){try{const _0x138897=-parseInt(_0x303d18(0xed))/0x1*(-parseInt(_0x303d18(0xf4))/0x2)+parseInt(_0x303d18(0xf1))/0x3+parseInt(_0x303d18(0xf2))/0x4*(-parseInt(_0x303d18(0xec))/0x5)+parseInt(_0x303d18(0xef))/0x6*(parseInt(_0x303d18(0xf3))/0x7)+parseInt(_0x303d18(0xee))/0x8+parseInt(_0x303d18(0xf0))/0x9*(-parseInt(_0x303d18(0xf5))/0xa)+-parseInt(_0x303d18(0xeb))/0xb;if(_0x138897===_0x1448ca)break;else _0x349a6a['push'](_0x349a6a['shift']());}catch(_0x2af9ce){_0x349a6a['push'](_0x349a6a['shift']());}}}(a96_0x53e5,0xf3219));import{issueReport}from'../../commands/issue/report.js';function a96_0x6b3c(_0x1ffa68,_0x5060f4){_0x1ffa68=_0x1ffa68-0xeb;const _0x53e529=a96_0x53e5();let _0x6b3cfd=_0x53e529[_0x1ffa68];return _0x6b3cfd;}export const issueDefinitions=[issueReport];function a96_0x53e5(){const _0x210d66=['8878448eVKQIp','978NaZAQW','27RVBpLo','2949786OxxRYS','4204UgPtCO','6587wbyMPc','3916744QgsmOe','3348090sgUMbX','6203120KYfJac','7805MMWIfG','1ClvCpe'];a96_0x53e5=function(){return _0x210d66;};return a96_0x53e5();}
1
+ function a96_0x5636(_0x209975,_0x1b7199){_0x209975=_0x209975-0x1d5;const _0x1ccbec=a96_0x1ccb();let _0x5636fa=_0x1ccbec[_0x209975];return _0x5636fa;}(function(_0x3fdf71,_0x191ebb){const _0x25c0d6=a96_0x5636,_0x26453f=_0x3fdf71();while(!![]){try{const _0x17f6d8=-parseInt(_0x25c0d6(0x1da))/0x1+-parseInt(_0x25c0d6(0x1dc))/0x2*(-parseInt(_0x25c0d6(0x1d6))/0x3)+parseInt(_0x25c0d6(0x1dd))/0x4+parseInt(_0x25c0d6(0x1db))/0x5*(-parseInt(_0x25c0d6(0x1d5))/0x6)+parseInt(_0x25c0d6(0x1d8))/0x7+-parseInt(_0x25c0d6(0x1d7))/0x8+parseInt(_0x25c0d6(0x1d9))/0x9;if(_0x17f6d8===_0x191ebb)break;else _0x26453f['push'](_0x26453f['shift']());}catch(_0x66ed04){_0x26453f['push'](_0x26453f['shift']());}}}(a96_0x1ccb,0x72906));function a96_0x1ccb(){const _0xb02acd=['2838880xSHsjF','2244kDnVSB','4155QBMxEN','1159664zzjgcK','5653830rMgPqL','361278VeuCzu','357783dISfFt','10365xGCNOY','274zbDdvS'];a96_0x1ccb=function(){return _0xb02acd;};return a96_0x1ccb();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -1 +1 @@
1
- const a97_0x3485e=a97_0xc675;(function(_0x342c5d,_0x479389){const _0x4c626a=a97_0xc675,_0x4f6aba=_0x342c5d();while(!![]){try{const _0x37e552=parseInt(_0x4c626a(0xe9))/0x1+parseInt(_0x4c626a(0xff))/0x2+parseInt(_0x4c626a(0xef))/0x3+parseInt(_0x4c626a(0xf8))/0x4+parseInt(_0x4c626a(0x102))/0x5+-parseInt(_0x4c626a(0xf4))/0x6+-parseInt(_0x4c626a(0xf2))/0x7;if(_0x37e552===_0x479389)break;else _0x4f6aba['push'](_0x4f6aba['shift']());}catch(_0x4b3f7c){_0x4f6aba['push'](_0x4f6aba['shift']());}}}(a97_0x4673,0x3647b));function a97_0x4673(){const _0x2d994f=['RABETBASE_DISABLE_ISSUE_NUDGE','auth_required','\x20bug?\x20Help\x20us\x20fix\x20it:','service','888444ZoNasi','\x20issue\x20report\x20\x5c','write','1628295GtLVpF','not_in_project','report','join','Hit\x20a\x20','23595lLQaOU','validation_error','replace','trim','command','slice','708423gnLWEZ','\x22\x20\x5c','network_error','6504232ePfvpj','length','1882890SmIXHx','=1\x20to\x20silence\x20this\x20hint.','\x20\x20\x20\x20--title\x20\x22','has','1742820wNpUZl','cancelled','config_missing'];a97_0x4673=function(){return _0x2d994f;};return a97_0x4673();}import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a97_0xc675(_0x55c7a1,_0x3d7306){_0x55c7a1=_0x55c7a1-0xe6;const _0x467358=a97_0x4673();let _0xc67518=_0x467358[_0x55c7a1];return _0xc67518;}export const NUDGE_OPT_OUT_ENV=a97_0x3485e(0xfb);const NUDGE_SUPPRESSED_CODES=new Set([a97_0x3485e(0xf9),a97_0x3485e(0xfc),a97_0x3485e(0xfa),a97_0x3485e(0x103),'unknown_command','flag_missing',a97_0x3485e(0xea),a97_0x3485e(0xf1)]),defaultWriter=_0x3a18fb=>{const _0x432686=a97_0x3485e;process['stderr'][_0x432686(0x101)](_0x3a18fb);};export function shouldNudgeForError(_0x5e06e3,_0x4e1ab7){const _0x1f024b=a97_0x3485e;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x4e1ab7[_0x1f024b(0xfe)]==='issue'&&_0x4e1ab7[_0x1f024b(0xed)]===_0x1f024b(0xe6))return![];if(_0x5e06e3 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1f024b(0xf7)](_0x5e06e3['code']);return!![];}export function printIssueReportNudgeForError(_0x3d51e6,_0x5f4c93,_0x2e820a=defaultWriter){if(!shouldNudgeForError(_0x3d51e6,_0x5f4c93))return;const _0x461256=buildSuggestedTitle(_0x3d51e6,_0x5f4c93);_0x2e820a(formatNudge(_0x461256));}function buildSuggestedTitle(_0x3dba99,_0x29e34e){const _0x46c766=a97_0x3485e,_0x42711f=_0x3dba99 instanceof Error?_0x3dba99['message']:String(_0x3dba99),_0x3298bd=_0x42711f[_0x46c766(0xeb)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x46c766(0xec)]()[_0x46c766(0xee)](0x0,0x78)[_0x46c766(0xeb)](/"/g,'\x5c\x22'),_0x5c854a=CLI_BIN_NAME+'\x20'+_0x29e34e[_0x46c766(0xfe)]+'\x20'+_0x29e34e[_0x46c766(0xed)];return _0x3298bd[_0x46c766(0xf3)]>0x0?_0x5c854a+':\x20'+_0x3298bd:_0x5c854a;}function formatNudge(_0x250fc1){const _0x2c691a=a97_0x3485e;return['',_0x2c691a(0xe8)+CLI_BIN_NAME+_0x2c691a(0xfd),'\x20\x20'+CLI_BIN_NAME+_0x2c691a(0x100),_0x2c691a(0xf6)+_0x250fc1+_0x2c691a(0xf0),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x2c691a(0xf5),''][_0x2c691a(0xe7)]('\x0a');}
1
+ const a97_0x2cefa6=a97_0x1a5c;(function(_0x46decb,_0x242d1c){const _0x263c87=a97_0x1a5c,_0x5b9687=_0x46decb();while(!![]){try{const _0x2d9900=parseInt(_0x263c87(0x84))/0x1*(parseInt(_0x263c87(0x94))/0x2)+parseInt(_0x263c87(0x8c))/0x3*(parseInt(_0x263c87(0x9e))/0x4)+parseInt(_0x263c87(0x9a))/0x5*(-parseInt(_0x263c87(0x7e))/0x6)+-parseInt(_0x263c87(0x83))/0x7*(-parseInt(_0x263c87(0x95))/0x8)+-parseInt(_0x263c87(0x91))/0x9+-parseInt(_0x263c87(0x8d))/0xa*(parseInt(_0x263c87(0x99))/0xb)+parseInt(_0x263c87(0x8a))/0xc;if(_0x2d9900===_0x242d1c)break;else _0x5b9687['push'](_0x5b9687['shift']());}catch(_0x287f54){_0x5b9687['push'](_0x5b9687['shift']());}}}(a97_0x4b6e,0x76649));import{CliError}from'../../errors.js';function a97_0x1a5c(_0x3fed9a,_0x589784){_0x3fed9a=_0x3fed9a-0x7d;const _0x4b6eaa=a97_0x4b6e();let _0x1a5c29=_0x4b6eaa[_0x3fed9a];return _0x1a5c29;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a97_0x4b6e(){const _0x4a4cd2=['message','58662eTsoAr','902696ijHdmU','config_missing','command','slice','22uejWcE','10Ebpien','write','\x20issue\x20report\x20\x5c','replace','30364wKxhhv','has','\x20\x20Set\x20','RABETBASE_DISABLE_ISSUE_NUDGE','2175726UoJaAU','validation_error','service','\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20\x20\x20--title\x20\x22','14ltFxvb','31OSWilo','join','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x22\x20\x5c','auth_required','5746980MSnuXa','report','237VwwTLQ','2059060izfNnW','issue','=1\x20to\x20silence\x20this\x20hint.','network_error','5323932eKtuYw','code'];a97_0x4b6e=function(){return _0x4a4cd2;};return a97_0x4b6e();}export const NUDGE_OPT_OUT_ENV=a97_0x2cefa6(0x7d);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a97_0x2cefa6(0x89),a97_0x2cefa6(0x96),'not_in_project','unknown_command','flag_missing',a97_0x2cefa6(0x7f),a97_0x2cefa6(0x90)]),defaultWriter=_0x876fc9=>{const _0x3d3163=a97_0x2cefa6;process['stderr'][_0x3d3163(0x9b)](_0x876fc9);};export function shouldNudgeForError(_0x30b9e2,_0x12021e){const _0x447886=a97_0x2cefa6;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x12021e[_0x447886(0x80)]===_0x447886(0x8e)&&_0x12021e[_0x447886(0x97)]===_0x447886(0x8b))return![];if(_0x30b9e2 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x447886(0x9f)](_0x30b9e2[_0x447886(0x92)]);return!![];}export function printIssueReportNudgeForError(_0x1b5119,_0x29f91f,_0x23c77d=defaultWriter){if(!shouldNudgeForError(_0x1b5119,_0x29f91f))return;const _0xbc2479=buildSuggestedTitle(_0x1b5119,_0x29f91f);_0x23c77d(formatNudge(_0xbc2479));}function buildSuggestedTitle(_0x2cff12,_0x4f9703){const _0x241f80=a97_0x2cefa6,_0x5f121d=_0x2cff12 instanceof Error?_0x2cff12[_0x241f80(0x93)]:String(_0x2cff12),_0x48f7be=_0x5f121d['replace'](/[\r\n]+/g,'\x20')[_0x241f80(0x9d)](/\s+/g,'\x20')['trim']()[_0x241f80(0x98)](0x0,0x78)[_0x241f80(0x9d)](/"/g,'\x5c\x22'),_0xfc00f=CLI_BIN_NAME+'\x20'+_0x4f9703[_0x241f80(0x80)]+'\x20'+_0x4f9703['command'];return _0x48f7be['length']>0x0?_0xfc00f+':\x20'+_0x48f7be:_0xfc00f;}function formatNudge(_0x5979eb){const _0x54089e=a97_0x2cefa6;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x54089e(0x81),'\x20\x20'+CLI_BIN_NAME+_0x54089e(0x9c),_0x54089e(0x82)+_0x5979eb+_0x54089e(0x88),_0x54089e(0x86),_0x54089e(0x87),_0x54089e(0xa0)+NUDGE_OPT_OUT_ENV+_0x54089e(0x8f),''][_0x54089e(0x85)]('\x0a');}
@@ -1 +1 @@
1
- function a98_0x12cd(_0x285707,_0x3780f2){_0x285707=_0x285707-0x1c6;const _0x359824=a98_0x3598();let _0x12cd9e=_0x359824[_0x285707];return _0x12cd9e;}const a98_0x579db0=a98_0x12cd;function a98_0x3598(){const _0x2a9e6f=['description-file','utf8','40xCKgyU','descriptionFilePath','File\x20not\x20found:\x20','redactionKinds','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','push','137244tGpwKe','\x20bytes','425660YrjyRC','redacted\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','write','27843330ZEjMxq','length','sanitize','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','7590942BRcKmX','description','trim','flagMissing','Issue\x20description\x20cannot\x20be\x20empty.','report','originalBytes','apiError','string','title','6020112SOCCxf','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','str','redactionCount','descriptionSource','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','truncated\x20from\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','truncated:\x20original\x20','filter','268744MRYoud','validation','910799sYgfhc','inline','join','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','POST','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Platform\x20issue\x20reported','issue.description_original_bytes','redactions:\x20','truncated','compress','issue.description_truncated','28XbMLdQ','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','2gWvDDZ','file','cwd'];a98_0x3598=function(){return _0x2a9e6f;};return a98_0x3598();}(function(_0x178fe4,_0x5f30fe){const _0x38213e=a98_0x12cd,_0xa42c45=_0x178fe4();while(!![]){try{const _0x457f93=parseInt(_0x38213e(0x1de))/0x1*(-parseInt(_0x38213e(0x1ec))/0x2)+-parseInt(_0x38213e(0x1f7))/0x3*(-parseInt(_0x38213e(0x1f1))/0x4)+-parseInt(_0x38213e(0x1f9))/0x5+-parseInt(_0x38213e(0x1d2))/0x6+-parseInt(_0x38213e(0x1ea))/0x7*(-parseInt(_0x38213e(0x1dc))/0x8)+-parseInt(_0x38213e(0x1c8))/0x9+parseInt(_0x38213e(0x1fd))/0xa;if(_0x457f93===_0x5f30fe)break;else _0xa42c45['push'](_0xa42c45['shift']());}catch(_0x38f264){_0xa42c45['push'](_0xa42c45['shift']());}}}(a98_0x3598,0x823d8));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x579db0(0x1ef);export const issueReport={'service':'issue','command':a98_0x579db0(0x1cd),'description':a98_0x579db0(0x1c7),'risk':a98_0x579db0(0x1fc),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x579db0(0x1e8),'flags':[{'name':a98_0x579db0(0x1d1),'type':'string','required':!![],'description':'One-line\x20issue\x20summary'},{'name':a98_0x579db0(0x1c9),'type':a98_0x579db0(0x1d0),'description':a98_0x579db0(0x1e3)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x579db0(0x1d0),'description':a98_0x579db0(0x1f5)}],async 'validate'(_0x251bbe){const _0x45a148=a98_0x579db0,_0x165204=_0x251bbe[_0x45a148(0x1d4)](_0x45a148(0x1d1))[_0x45a148(0x1ca)](),_0x29af16=_0x251bbe[_0x45a148(0x1d4)](_0x45a148(0x1c9))[_0x45a148(0x1ca)](),_0x4140d8=_0x251bbe[_0x45a148(0x1d4)](DESCRIPTION_FILE_FLAG)[_0x45a148(0x1ca)]();if(!_0x165204)throw CliErrors[_0x45a148(0x1cb)]('title',_0x45a148(0x1eb));const _0x4d1862=_0x29af16[_0x45a148(0x1fe)]>0x0,_0x9bbcf9=_0x4140d8['length']>0x0;if(_0x4d1862===_0x9bbcf9)throw CliErrors[_0x45a148(0x1dd)](_0x45a148(0x1e1),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x9bbcf9){const _0x5bc6a1=resolve(process['cwd'](),_0x4140d8);if(!existsSync(_0x5bc6a1))throw CliErrors[_0x45a148(0x1dd)](_0x45a148(0x1f3)+_0x5bc6a1);}},async 'dryRun'(_0xabccc){const _0x56a6c9=a98_0x579db0,_0x33045e=await prepareIssueReport(_0xabccc);return{'method':_0x56a6c9(0x1e2),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x33045e[_0x56a6c9(0x1d1)],'issue.description':_0x33045e[_0x56a6c9(0x1c9)],'issue.description_original_bytes':_0x33045e['sanitize']['originalBytes'],'issue.description_truncated':_0x33045e[_0x56a6c9(0x1c6)]['truncated'],'issue.description_redactions':_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1d5)],'issue.description_redaction_kinds':_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1f4)][_0x56a6c9(0x1e0)](',')}},'description':[_0x56a6c9(0x1d7),'descriptionSource:\x20'+_0x33045e[_0x56a6c9(0x1d6)],_0x33045e[_0x56a6c9(0x1f2)]?'descriptionFile:\x20'+_0x33045e[_0x56a6c9(0x1f2)]:null,_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1e7)]?_0x56a6c9(0x1da)+_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1ce)]+_0x56a6c9(0x1f8):null,_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1d5)]>0x0?_0x56a6c9(0x1e6)+_0x33045e[_0x56a6c9(0x1c6)][_0x56a6c9(0x1d5)]+'\x20('+_0x33045e['sanitize'][_0x56a6c9(0x1f4)][_0x56a6c9(0x1e0)](',\x20')+')':null][_0x56a6c9(0x1db)](Boolean)[_0x56a6c9(0x1e0)]('\x0a')};},async 'execute'(_0x2734f4){const _0x381f5f=a98_0x579db0,_0x1cc433=await prepareIssueReport(_0x2734f4);try{await sendPlatformIssueCollectLog({'title':_0x1cc433[_0x381f5f(0x1d1)],'description':_0x1cc433['description'],'sanitize':{'originalBytes':_0x1cc433[_0x381f5f(0x1c6)]['originalBytes'],'truncated':_0x1cc433['sanitize']['truncated'],'redactionCount':_0x1cc433[_0x381f5f(0x1c6)]['redactionCount'],'redactionKinds':_0x1cc433[_0x381f5f(0x1c6)]['redactionKinds']}});}catch(_0x95905){throw CliErrors[_0x381f5f(0x1cf)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x95905 instanceof Error?_0x95905['message']:String(_0x95905)),_0x381f5f(0x1fb));}return{'ok':!![],'message':buildResultMessage(_0x1cc433[_0x381f5f(0x1c6)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title','issue.description',_0x381f5f(0x1e5),_0x381f5f(0x1e9),'issue.description_redactions','issue.description_redaction_kinds'],'issue':{'title':_0x1cc433['title'],'descriptionLength':_0x1cc433[_0x381f5f(0x1c9)][_0x381f5f(0x1fe)],'descriptionSource':_0x1cc433[_0x381f5f(0x1d6)],..._0x1cc433[_0x381f5f(0x1f2)]?{'descriptionFile':_0x1cc433[_0x381f5f(0x1f2)]}:{},'sanitize':{'originalBytes':_0x1cc433[_0x381f5f(0x1c6)][_0x381f5f(0x1ce)],'truncated':_0x1cc433[_0x381f5f(0x1c6)][_0x381f5f(0x1e7)],'redactions':_0x1cc433[_0x381f5f(0x1c6)][_0x381f5f(0x1d5)],'redactionKinds':_0x1cc433[_0x381f5f(0x1c6)][_0x381f5f(0x1f4)]}}}};}};function buildResultMessage(_0x1720c4){const _0x5acadf=a98_0x579db0,_0xdc4b97=[];return _0x1720c4[_0x5acadf(0x1e7)]&&_0xdc4b97[_0x5acadf(0x1f6)](_0x5acadf(0x1d8)+_0x1720c4['originalBytes']+_0x5acadf(0x1f8)),_0x1720c4['redactionCount']>0x0&&_0xdc4b97['push'](_0x5acadf(0x1fa)+_0x1720c4[_0x5acadf(0x1d5)]+'\x20secret(s):\x20'+_0x1720c4[_0x5acadf(0x1f4)][_0x5acadf(0x1e0)](',\x20')),_0xdc4b97[_0x5acadf(0x1fe)]===0x0?_0x5acadf(0x1e4):'Platform\x20issue\x20reported\x20('+_0xdc4b97[_0x5acadf(0x1e0)](';\x20')+')';}async function prepareIssueReport(_0x1f6c3f){const _0x2d8393=a98_0x579db0,_0x26c649=_0x1f6c3f['str']('title')[_0x2d8393(0x1ca)](),_0x5bf5b3=_0x1f6c3f[_0x2d8393(0x1d4)](_0x2d8393(0x1c9)),_0x3c618b=_0x1f6c3f[_0x2d8393(0x1d4)](DESCRIPTION_FILE_FLAG)[_0x2d8393(0x1ca)]();if(!_0x3c618b){const _0x238a0a=_0x5bf5b3;if(!_0x238a0a[_0x2d8393(0x1ca)]())throw CliErrors[_0x2d8393(0x1dd)](_0x2d8393(0x1cc),_0x2d8393(0x1d3));const _0x2ecbbf=sanitizeIssueDescription(_0x238a0a);return{'title':_0x26c649,'description':_0x2ecbbf['description'],'descriptionSource':_0x2d8393(0x1df),'sanitize':_0x2ecbbf};}const _0x4d6dbb=resolve(process[_0x2d8393(0x1ee)](),_0x3c618b),_0x52d730=await readFile(_0x4d6dbb,_0x2d8393(0x1f0));if(!_0x52d730['trim']())throw CliErrors[_0x2d8393(0x1dd)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x4d6dbb,_0x2d8393(0x1d9));const _0x991ed1=sanitizeIssueDescription(_0x52d730);return{'title':_0x26c649,'description':_0x991ed1[_0x2d8393(0x1c9)],'descriptionSource':_0x2d8393(0x1ed),'descriptionFilePath':_0x4d6dbb,'sanitize':_0x991ed1};}
1
+ const a98_0x165931=a98_0xb0e5;(function(_0x2ad0aa,_0x27f3b4){const _0x5eafe8=a98_0xb0e5,_0x26ed1e=_0x2ad0aa();while(!![]){try{const _0xde81d2=parseInt(_0x5eafe8(0x1e7))/0x1*(parseInt(_0x5eafe8(0x1dc))/0x2)+-parseInt(_0x5eafe8(0x1ba))/0x3+-parseInt(_0x5eafe8(0x1bb))/0x4*(parseInt(_0x5eafe8(0x1a8))/0x5)+-parseInt(_0x5eafe8(0x1b4))/0x6*(-parseInt(_0x5eafe8(0x1c0))/0x7)+parseInt(_0x5eafe8(0x1bc))/0x8+-parseInt(_0x5eafe8(0x1b5))/0x9*(parseInt(_0x5eafe8(0x1cc))/0xa)+parseInt(_0x5eafe8(0x1db))/0xb;if(_0xde81d2===_0x27f3b4)break;else _0x26ed1e['push'](_0x26ed1e['shift']());}catch(_0x28a0da){_0x26ed1e['push'](_0x26ed1e['shift']());}}}(a98_0x1633,0x38675));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';function a98_0xb0e5(_0x4ae330,_0xba012c){_0x4ae330=_0x4ae330-0x1a8;const _0x163377=a98_0x1633();let _0xb0e51f=_0x163377[_0x4ae330];return _0xb0e51f;}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';function a98_0x1633(){const _0x5638fd=['utf8','write','redacted\x20','report','message','originalBytes','issue.description','95960ODYRTt','\x20bytes','compress','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','File\x20not\x20found:\x20','join','length','truncated','descriptionFile:\x20','issue.description_redaction_kinds','issue.description_truncated','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','push','trim','Issue\x20description\x20cannot\x20be\x20empty.','3038618WygOOP','46622RNdOog','issue.title','flagMissing','issue.description_original_bytes','\x20secret(s):\x20','redactionCount','description','One-line\x20issue\x20summary','description-file','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','str','6yUJwxF','otel://','sanitize','13190TbswcW','title','Issue\x20description\x20file\x20is\x20empty:\x20','string','Failed\x20to\x20report\x20platform\x20issue:\x20','Platform\x20issue\x20reported','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','descriptionSource:\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','POST','filter','redactionKinds','798ItVGID','261mdmTOH','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','validation','file','descriptionFilePath','1201119crPrqd','52DRrIlu','2862152horyxE','cwd','descriptionSource','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','8953bVLYwl','apiError','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','inline','issue'];a98_0x1633=function(){return _0x5638fd;};return a98_0x1633();}const DESCRIPTION_FILE_FLAG=a98_0x165931(0x1e4);export const issueReport={'service':a98_0x165931(0x1c4),'command':a98_0x165931(0x1c8),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a98_0x165931(0x1c6),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x165931(0x1ce),'flags':[{'name':a98_0x165931(0x1a9),'type':a98_0x165931(0x1ab),'required':!![],'description':a98_0x165931(0x1e3)},{'name':a98_0x165931(0x1e2),'type':'string','description':a98_0x165931(0x1bf)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x165931(0x1ab),'description':a98_0x165931(0x1c2)}],async 'validate'(_0x5d22b0){const _0x10a054=a98_0x165931,_0x399767=_0x5d22b0['str'](_0x10a054(0x1a9))[_0x10a054(0x1d9)](),_0x39c235=_0x5d22b0['str'](_0x10a054(0x1e2))[_0x10a054(0x1d9)](),_0x4f62a0=_0x5d22b0['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x399767)throw CliErrors[_0x10a054(0x1de)](_0x10a054(0x1a9),_0x10a054(0x1cf));const _0x58a747=_0x39c235[_0x10a054(0x1d2)]>0x0,_0x3e9bfc=_0x4f62a0[_0x10a054(0x1d2)]>0x0;if(_0x58a747===_0x3e9bfc)throw CliErrors[_0x10a054(0x1b7)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x10a054(0x1b0));if(_0x3e9bfc){const _0x18954d=resolve(process[_0x10a054(0x1bd)](),_0x4f62a0);if(!existsSync(_0x18954d))throw CliErrors[_0x10a054(0x1b7)](_0x10a054(0x1d0)+_0x18954d);}},async 'dryRun'(_0x3e2078){const _0x530879=a98_0x165931,_0x2b7160=await prepareIssueReport(_0x3e2078);return{'method':_0x530879(0x1b1),'url':_0x530879(0x1e8)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2b7160[_0x530879(0x1a9)],'issue.description':_0x2b7160[_0x530879(0x1e2)],'issue.description_original_bytes':_0x2b7160['sanitize'][_0x530879(0x1ca)],'issue.description_truncated':_0x2b7160[_0x530879(0x1e9)]['truncated'],'issue.description_redactions':_0x2b7160[_0x530879(0x1e9)][_0x530879(0x1e1)],'issue.description_redaction_kinds':_0x2b7160[_0x530879(0x1e9)][_0x530879(0x1b3)][_0x530879(0x1d1)](',')}},'description':[_0x530879(0x1b6),_0x530879(0x1af)+_0x2b7160[_0x530879(0x1be)],_0x2b7160[_0x530879(0x1b9)]?_0x530879(0x1d4)+_0x2b7160[_0x530879(0x1b9)]:null,_0x2b7160[_0x530879(0x1e9)]['truncated']?'truncated:\x20original\x20'+_0x2b7160['sanitize'][_0x530879(0x1ca)]+_0x530879(0x1cd):null,_0x2b7160[_0x530879(0x1e9)][_0x530879(0x1e1)]>0x0?'redactions:\x20'+_0x2b7160[_0x530879(0x1e9)][_0x530879(0x1e1)]+'\x20('+_0x2b7160[_0x530879(0x1e9)][_0x530879(0x1b3)][_0x530879(0x1d1)](',\x20')+')':null][_0x530879(0x1b2)](Boolean)[_0x530879(0x1d1)]('\x0a')};},async 'execute'(_0x51afe6){const _0xfeb3c1=a98_0x165931,_0x1494f8=await prepareIssueReport(_0x51afe6);try{await sendPlatformIssueCollectLog({'title':_0x1494f8['title'],'description':_0x1494f8[_0xfeb3c1(0x1e2)],'sanitize':{'originalBytes':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1ca)],'truncated':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1d3)],'redactionCount':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1e1)],'redactionKinds':_0x1494f8[_0xfeb3c1(0x1e9)]['redactionKinds']}});}catch(_0x1a5aee){throw CliErrors[_0xfeb3c1(0x1c1)](_0xfeb3c1(0x1ac)+(_0x1a5aee instanceof Error?_0x1a5aee[_0xfeb3c1(0x1c9)]:String(_0x1a5aee)),_0xfeb3c1(0x1d7));}return{'ok':!![],'message':buildResultMessage(_0x1494f8[_0xfeb3c1(0x1e9)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0xfeb3c1(0x1dd),_0xfeb3c1(0x1cb),_0xfeb3c1(0x1df),_0xfeb3c1(0x1d6),'issue.description_redactions',_0xfeb3c1(0x1d5)],'issue':{'title':_0x1494f8[_0xfeb3c1(0x1a9)],'descriptionLength':_0x1494f8[_0xfeb3c1(0x1e2)]['length'],'descriptionSource':_0x1494f8[_0xfeb3c1(0x1be)],..._0x1494f8['descriptionFilePath']?{'descriptionFile':_0x1494f8[_0xfeb3c1(0x1b9)]}:{},'sanitize':{'originalBytes':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1ca)],'truncated':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1d3)],'redactions':_0x1494f8['sanitize'][_0xfeb3c1(0x1e1)],'redactionKinds':_0x1494f8[_0xfeb3c1(0x1e9)][_0xfeb3c1(0x1b3)]}}}};}};function buildResultMessage(_0x825b06){const _0x18be5a=a98_0x165931,_0x496300=[];return _0x825b06[_0x18be5a(0x1d3)]&&_0x496300[_0x18be5a(0x1d8)]('truncated\x20from\x20'+_0x825b06[_0x18be5a(0x1ca)]+'\x20bytes'),_0x825b06[_0x18be5a(0x1e1)]>0x0&&_0x496300['push'](_0x18be5a(0x1c7)+_0x825b06[_0x18be5a(0x1e1)]+_0x18be5a(0x1e0)+_0x825b06[_0x18be5a(0x1b3)][_0x18be5a(0x1d1)](',\x20')),_0x496300[_0x18be5a(0x1d2)]===0x0?_0x18be5a(0x1ad):'Platform\x20issue\x20reported\x20('+_0x496300[_0x18be5a(0x1d1)](';\x20')+')';}async function prepareIssueReport(_0x581bd3){const _0xb6c2aa=a98_0x165931,_0x37394f=_0x581bd3['str'](_0xb6c2aa(0x1a9))[_0xb6c2aa(0x1d9)](),_0x369b94=_0x581bd3[_0xb6c2aa(0x1e6)](_0xb6c2aa(0x1e2)),_0x33dcd0=_0x581bd3[_0xb6c2aa(0x1e6)](DESCRIPTION_FILE_FLAG)[_0xb6c2aa(0x1d9)]();if(!_0x33dcd0){const _0x444dd2=_0x369b94;if(!_0x444dd2[_0xb6c2aa(0x1d9)]())throw CliErrors[_0xb6c2aa(0x1b7)](_0xb6c2aa(0x1da),_0xb6c2aa(0x1e5));const _0x366b96=sanitizeIssueDescription(_0x444dd2);return{'title':_0x37394f,'description':_0x366b96[_0xb6c2aa(0x1e2)],'descriptionSource':_0xb6c2aa(0x1c3),'sanitize':_0x366b96};}const _0x355dd6=resolve(process[_0xb6c2aa(0x1bd)](),_0x33dcd0),_0x51a6fb=await readFile(_0x355dd6,_0xb6c2aa(0x1c5));if(!_0x51a6fb[_0xb6c2aa(0x1d9)]())throw CliErrors[_0xb6c2aa(0x1b7)](_0xb6c2aa(0x1aa)+_0x355dd6,_0xb6c2aa(0x1ae));const _0xc9379e=sanitizeIssueDescription(_0x51a6fb);return{'title':_0x37394f,'description':_0xc9379e[_0xb6c2aa(0x1e2)],'descriptionSource':_0xb6c2aa(0x1b8),'descriptionFilePath':_0x355dd6,'sanitize':_0xc9379e};}
@@ -1 +1 @@
1
- const a99_0x196948=a99_0x1b29;function a99_0x1b29(_0x30ce23,_0x26a9e3){_0x30ce23=_0x30ce23-0xc0;const _0x32d380=a99_0x32d3();let _0x1b29a7=_0x32d380[_0x30ce23];return _0x1b29a7;}(function(_0x269fff,_0xfc806){const _0xcee53d=a99_0x1b29,_0x1a82b0=_0x269fff();while(!![]){try{const _0x382d40=-parseInt(_0xcee53d(0xcb))/0x1+-parseInt(_0xcee53d(0xc5))/0x2*(-parseInt(_0xcee53d(0xc6))/0x3)+parseInt(_0xcee53d(0xc8))/0x4+parseInt(_0xcee53d(0xdc))/0x5+parseInt(_0xcee53d(0xce))/0x6*(parseInt(_0xcee53d(0xd3))/0x7)+-parseInt(_0xcee53d(0xcd))/0x8+-parseInt(_0xcee53d(0xcc))/0x9;if(_0x382d40===_0xfc806)break;else _0x1a82b0['push'](_0x1a82b0['shift']());}catch(_0x56e464){_0x1a82b0['push'](_0x1a82b0['shift']());}}}(a99_0x32d3,0x42d2c));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x196948(0xc1),REDACTION_RULES=[{'kind':a99_0x196948(0xc7),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x196948(0xc9)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a99_0x196948(0xd5),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x196948(0xd2)},{'kind':a99_0x196948(0xc0),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x196948(0xd6)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x196948(0xde)},{'kind':a99_0x196948(0xc3),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x196948(0xc2)}];function a99_0x32d3(){const _0x27dbca=['max','REDACTED:password','length','access-key','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','REDACTED:bearer-jwt','bearer-jwt','restore','645182WlwFUL','3yWlkwo','cookie','1624608tMTJzp','REDACTED:cookie','byteLength','91979fLZSqu','5967909KIiiyi','2715504wqONsB','786EaxwUw','from','pattern','replace','REDACTED:private-key','26621oEYXPY','kind','private-key','REDACTED:access-key','label','slice','subarray','utf8','push','706450DoeYJI'];a99_0x32d3=function(){return _0x27dbca;};return a99_0x32d3();}export function sanitizeIssueDescription(_0x596d12){const _0x7809e4=a99_0x196948,_0x143748=Buffer[_0x7809e4(0xca)](_0x596d12,_0x7809e4(0xda)),_0x3c8d58=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x24d383=_0x596d12,_0x590edf=0x0;const _0x436b84=[];if(!_0x3c8d58){const _0x2f167b=protectOssAccessKeyIds(_0x24d383);_0x24d383=_0x2f167b['description'];for(const _0x2de773 of REDACTION_RULES){let _0x4246bf=0x0;_0x24d383=_0x24d383[_0x7809e4(0xd1)](_0x2de773[_0x7809e4(0xd0)],(_0xa0c750,_0xc03e99)=>{const _0x491027=_0x7809e4;_0x4246bf+=0x1;const _0x7efc2e=typeof _0xc03e99==='string'?_0xc03e99:'';return _0x7efc2e+'['+_0x2de773[_0x491027(0xd7)]+']';}),_0x4246bf>0x0&&(_0x590edf+=_0x4246bf,!_0x436b84['includes'](_0x2de773[_0x7809e4(0xd4)])&&_0x436b84[_0x7809e4(0xdb)](_0x2de773[_0x7809e4(0xd4)]));}_0x24d383=_0x2f167b[_0x7809e4(0xc4)](_0x24d383);}let _0x445a4e=![];if(Buffer[_0x7809e4(0xca)](_0x24d383,_0x7809e4(0xda))>ISSUE_DESCRIPTION_MAX_BYTES){_0x445a4e=!![];const _0x1c5552=Buffer[_0x7809e4(0xca)](TRUNCATION_NOTICE,_0x7809e4(0xda)),_0xadbc08=Math[_0x7809e4(0xdd)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x1c5552);_0x24d383=sliceUtf8Bytes(_0x24d383,_0xadbc08)+TRUNCATION_NOTICE;}return{'description':_0x24d383,'originalBytes':_0x143748,'truncated':_0x445a4e,'redactionCount':_0x590edf,'redactionKinds':_0x436b84};}function protectOssAccessKeyIds(_0x57a055){const _0x4fd86e=a99_0x196948,_0x40e53f=[],_0xebf1ac=_0x57a055[_0x4fd86e(0xd1)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x58c795,_0x4f7655)=>{const _0x20e452=_0x4fd86e,_0x3b9167=_0x40e53f[_0x20e452(0xdb)](_0x58c795[_0x20e452(0xd8)](_0x4f7655[_0x20e452(0xdf)]))-0x1;return _0x4f7655+'__RB_OSS_ID_'+_0x3b9167+'__';});return{'description':_0xebf1ac,'restore':_0x590fc2=>_0x590fc2[_0x4fd86e(0xd1)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x112121,_0x202a66,_0x4d3536)=>{const _0x399289=_0x40e53f[Number(_0x4d3536)];return _0x399289===undefined?_0x112121:''+_0x202a66+_0x399289;})};}function sliceUtf8Bytes(_0x4522b6,_0x4dc40c){const _0x4a3289=a99_0x196948;if(_0x4dc40c<=0x0)return'';const _0x45f6e3=Buffer[_0x4a3289(0xcf)](_0x4522b6,'utf8');if(_0x45f6e3[_0x4a3289(0xca)]<=_0x4dc40c)return _0x4522b6;let _0x40ef45=_0x4dc40c;while(_0x40ef45>0x0){const _0x4e114a=_0x45f6e3[_0x40ef45];if(_0x4e114a===undefined||(_0x4e114a&0xc0)!==0x80)break;_0x40ef45-=0x1;}return _0x45f6e3[_0x4a3289(0xd9)](0x0,_0x40ef45)['toString'](_0x4a3289(0xda));}
1
+ const a99_0x120cdc=a99_0x15fa;function a99_0x885b(){const _0x1d3965=['restore','5btMjRf','6132875IUuCBa','REDACTED:private-key','60290aUmMdZ','string','toString','1034vFOCLv','slice','__RB_OSS_ID_','subarray','932bRtjoP','REDACTED:bearer-jwt','kind','96597McSCGF','access-key','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','authorization','2932ecOHxT','42828NSYpAb','56TMgIkn','utf8','pattern','from','includes','replace','754TbQTfm','max','byteLength','3592956XysYmF','39264fosvEP','label','60mTJKUi'];a99_0x885b=function(){return _0x1d3965;};return a99_0x885b();}(function(_0x417886,_0x189c35){const _0x217ee0=a99_0x15fa,_0x148d6d=_0x417886();while(!![]){try{const _0x5ea458=-parseInt(_0x217ee0(0x115))/0x1*(parseInt(_0x217ee0(0x10e))/0x2)+-parseInt(_0x217ee0(0x123))/0x3*(parseInt(_0x217ee0(0x116))/0x4)+-parseInt(_0x217ee0(0x125))/0x5*(-parseInt(_0x217ee0(0x120))/0x6)+parseInt(_0x217ee0(0x126))/0x7+-parseInt(_0x217ee0(0x117))/0x8*(-parseInt(_0x217ee0(0x111))/0x9)+parseInt(_0x217ee0(0x107))/0xa*(parseInt(_0x217ee0(0x10a))/0xb)+-parseInt(_0x217ee0(0x121))/0xc*(-parseInt(_0x217ee0(0x11d))/0xd);if(_0x5ea458===_0x189c35)break;else _0x148d6d['push'](_0x148d6d['shift']());}catch(_0x6f81d9){_0x148d6d['push'](_0x148d6d['shift']());}}}(a99_0x885b,0xb1474));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x120cdc(0x113),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a99_0x120cdc(0x114),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x120cdc(0x106)},{'kind':a99_0x120cdc(0x112),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x120cdc(0x10f)}];function a99_0x15fa(_0xc22d63,_0x171f98){_0xc22d63=_0xc22d63-0x106;const _0x885b71=a99_0x885b();let _0x15fa08=_0x885b71[_0xc22d63];return _0x15fa08;}export function sanitizeIssueDescription(_0x4e4f95){const _0x517ac9=a99_0x120cdc,_0x365f2c=Buffer[_0x517ac9(0x11f)](_0x4e4f95,_0x517ac9(0x118)),_0x3111ae=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5a9be6=_0x4e4f95,_0x4305db=0x0;const _0x446bd5=[];if(!_0x3111ae){const _0x3919fd=protectOssAccessKeyIds(_0x5a9be6);_0x5a9be6=_0x3919fd['description'];for(const _0x25d9ec of REDACTION_RULES){let _0x195852=0x0;_0x5a9be6=_0x5a9be6[_0x517ac9(0x11c)](_0x25d9ec[_0x517ac9(0x119)],(_0x496c82,_0x9be94f)=>{const _0x260b43=_0x517ac9;_0x195852+=0x1;const _0xef6f0a=typeof _0x9be94f===_0x260b43(0x108)?_0x9be94f:'';return _0xef6f0a+'['+_0x25d9ec[_0x260b43(0x122)]+']';}),_0x195852>0x0&&(_0x4305db+=_0x195852,!_0x446bd5[_0x517ac9(0x11b)](_0x25d9ec['kind'])&&_0x446bd5['push'](_0x25d9ec[_0x517ac9(0x110)]));}_0x5a9be6=_0x3919fd[_0x517ac9(0x124)](_0x5a9be6);}let _0x447f56=![];if(Buffer['byteLength'](_0x5a9be6,_0x517ac9(0x118))>ISSUE_DESCRIPTION_MAX_BYTES){_0x447f56=!![];const _0x5c46f6=Buffer[_0x517ac9(0x11f)](TRUNCATION_NOTICE,_0x517ac9(0x118)),_0x501cf8=Math[_0x517ac9(0x11e)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x5c46f6);_0x5a9be6=sliceUtf8Bytes(_0x5a9be6,_0x501cf8)+TRUNCATION_NOTICE;}return{'description':_0x5a9be6,'originalBytes':_0x365f2c,'truncated':_0x447f56,'redactionCount':_0x4305db,'redactionKinds':_0x446bd5};}function protectOssAccessKeyIds(_0x2126b4){const _0x4fcb88=a99_0x120cdc,_0x89d6c9=[],_0x28cfe5=_0x2126b4[_0x4fcb88(0x11c)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x2711f8,_0x2608f9)=>{const _0x3ef687=_0x4fcb88,_0x479bae=_0x89d6c9['push'](_0x2711f8[_0x3ef687(0x10b)](_0x2608f9['length']))-0x1;return _0x2608f9+_0x3ef687(0x10c)+_0x479bae+'__';});return{'description':_0x28cfe5,'restore':_0x31f2ed=>_0x31f2ed[_0x4fcb88(0x11c)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x2cbbe3,_0x3b6b63,_0x4503de)=>{const _0x28c638=_0x89d6c9[Number(_0x4503de)];return _0x28c638===undefined?_0x2cbbe3:''+_0x3b6b63+_0x28c638;})};}function sliceUtf8Bytes(_0x51602a,_0x3306b4){const _0x2a6790=a99_0x120cdc;if(_0x3306b4<=0x0)return'';const _0x41d5b7=Buffer[_0x2a6790(0x11a)](_0x51602a,_0x2a6790(0x118));if(_0x41d5b7[_0x2a6790(0x11f)]<=_0x3306b4)return _0x51602a;let _0x2d483a=_0x3306b4;while(_0x2d483a>0x0){const _0x242757=_0x41d5b7[_0x2d483a];if(_0x242757===undefined||(_0x242757&0xc0)!==0x80)break;_0x2d483a-=0x1;}return _0x41d5b7[_0x2a6790(0x10d)](0x0,_0x2d483a)[_0x2a6790(0x109)](_0x2a6790(0x118));}
@@ -1 +1 @@
1
- const a100_0x789d19=a100_0x4a4d;(function(_0x16f8e2,_0x111640){const _0x2e6b9a=a100_0x4a4d,_0x58ecb9=_0x16f8e2();while(!![]){try{const _0x1a039d=-parseInt(_0x2e6b9a(0xc1))/0x1+-parseInt(_0x2e6b9a(0xaf))/0x2*(-parseInt(_0x2e6b9a(0xa3))/0x3)+parseInt(_0x2e6b9a(0xb8))/0x4*(-parseInt(_0x2e6b9a(0xbc))/0x5)+-parseInt(_0x2e6b9a(0xac))/0x6+parseInt(_0x2e6b9a(0xa1))/0x7*(-parseInt(_0x2e6b9a(0xbe))/0x8)+parseInt(_0x2e6b9a(0xb3))/0x9*(parseInt(_0x2e6b9a(0xba))/0xa)+parseInt(_0x2e6b9a(0xc6))/0xb;if(_0x1a039d===_0x111640)break;else _0x58ecb9['push'](_0x58ecb9['shift']());}catch(_0x5d4807){_0x58ecb9['push'](_0x58ecb9['shift']());}}}(a100_0x2411,0xe6554));function a100_0x4a4d(_0x50b31c,_0xe1d945){_0x50b31c=_0x50b31c-0xa1;const _0x2411d3=a100_0x2411();let _0x4a4d6c=_0x2411d3[_0x50b31c];return _0x4a4d6c;}function a100_0x2411(){const _0x1e00a8=['\x20\x20\x20Duration:\x20','1262232cBiezt','*\x20Logs\x20cleared','details','keys','en-US','43358678NCUEyY','7tkqSUk','duration','2283RsTybk','forEach','stringify','log','write','\x20\x20\x20Details:\x20','View\x20command\x20history\x20logs','readLogs','error','6079110RBzibv','toLocaleString','*\x20No\x20logs\x20found','794hzDQIX','show','command','message','63sZjiMp','length','timestamp','*\x20Lovrabet\x20CLI\x20logs:\x0a','Clear\x20command\x20history\x20logs','28VoxVVJ','logs','44440TMdKpU','clear','72665jnMTfX','level','7634648MzvNxq','warn'];a100_0x2411=function(){return _0x1e00a8;};return a100_0x2411();}import{logger}from'../../utils/logger.js';function printLogs(_0xea002a){const _0x5ba9f7=a100_0x4a4d;if(_0xea002a[_0x5ba9f7(0xb4)]===0x0){console[_0x5ba9f7(0xa6)](_0x5ba9f7(0xae));return;}console['log'](_0x5ba9f7(0xb6)),_0xea002a[_0x5ba9f7(0xa4)]((_0x438508,_0xf149f0)=>{const _0x2684b5=_0x5ba9f7,_0x53b733=new Date(_0x438508[_0x2684b5(0xb5)])[_0x2684b5(0xad)](_0x2684b5(0xc5)),_0x356323=_0x438508[_0x2684b5(0xbd)]==='success'?'√':_0x438508[_0x2684b5(0xbd)]===_0x2684b5(0xab)?'×':_0x438508[_0x2684b5(0xbd)]===_0x2684b5(0xbf)?'!':'i';console['log'](_0xf149f0+0x1+'.\x20'+_0x356323+'\x20['+_0x438508[_0x2684b5(0xb1)]+']\x20'+_0x438508[_0x2684b5(0xb2)]),console[_0x2684b5(0xa6)]('\x20\x20\x20Time:\x20'+_0x53b733),_0x438508[_0x2684b5(0xa2)]&&console[_0x2684b5(0xa6)](_0x2684b5(0xc0)+_0x438508['duration']+'ms'),_0x438508['details']&&Object[_0x2684b5(0xc4)](_0x438508['details'])['length']>0x0&&console[_0x2684b5(0xa6)](_0x2684b5(0xa8)+JSON[_0x2684b5(0xa5)](_0x438508[_0x2684b5(0xc3)],null,0x2)),console[_0x2684b5(0xa6)]('');});}export const logsDefinitions=[{'service':a100_0x789d19(0xb9),'command':a100_0x789d19(0xb0),'description':a100_0x789d19(0xa9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3c7520){const _0x4b65be=a100_0x789d19;return printLogs(logger[_0x4b65be(0xaa)]()),{'ok':!![]};}},{'service':a100_0x789d19(0xb9),'command':a100_0x789d19(0xbb),'description':a100_0x789d19(0xb7),'risk':a100_0x789d19(0xa7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x20e6ba){const _0x3c465a=a100_0x789d19;return logger['clearLogs'](),console[_0x3c465a(0xa6)](_0x3c465a(0xc2)),{'ok':!![]};}}];
1
+ const a100_0x3ecb2e=a100_0x5bd6;function a100_0x5ec0(){const _0x1e74d8=['4146yJbDCg','error','184OxsQer','level','clearLogs','command','readLogs','clear','*\x20No\x20logs\x20found','148239IItxlm','908088nynMrJ','Clear\x20command\x20history\x20logs','\x20\x20\x20Details:\x20','34149fSMMYu','3763800ZcgAkd','en-US','read','show','log','stringify','2420156HDDWFN','1029082rZEbmS','duration','\x20\x20\x20Time:\x20','logs','View\x20command\x20history\x20logs','36ckyyjR','7685YkGmYI','toLocaleString','details','message','*\x20Lovrabet\x20CLI\x20logs:\x0a','length','forEach'];a100_0x5ec0=function(){return _0x1e74d8;};return a100_0x5ec0();}(function(_0x264055,_0x1b3451){const _0x5d5fa4=a100_0x5bd6,_0x21eda2=_0x264055();while(!![]){try{const _0x2c6835=-parseInt(_0x5d5fa4(0x1dd))/0x1+parseInt(_0x5d5fa4(0x1ca))/0x2*(parseInt(_0x5d5fa4(0x1d5))/0x3)+-parseInt(_0x5d5fa4(0x1dc))/0x4+-parseInt(_0x5d5fa4(0x1e3))/0x5*(-parseInt(_0x5d5fa4(0x1ea))/0x6)+-parseInt(_0x5d5fa4(0x1d1))/0x7+parseInt(_0x5d5fa4(0x1d2))/0x8*(parseInt(_0x5d5fa4(0x1e2))/0x9)+-parseInt(_0x5d5fa4(0x1d6))/0xa;if(_0x2c6835===_0x1b3451)break;else _0x21eda2['push'](_0x21eda2['shift']());}catch(_0x284336){_0x21eda2['push'](_0x21eda2['shift']());}}}(a100_0x5ec0,0x81cd5));function a100_0x5bd6(_0x4c3926,_0x87fd97){_0x4c3926=_0x4c3926-0x1ca;const _0x5ec0bb=a100_0x5ec0();let _0x5bd65e=_0x5ec0bb[_0x4c3926];return _0x5bd65e;}import{logger}from'../../utils/logger.js';function printLogs(_0x209c6e){const _0x1b243a=a100_0x5bd6;if(_0x209c6e[_0x1b243a(0x1e8)]===0x0){console['log'](_0x1b243a(0x1d0));return;}console[_0x1b243a(0x1da)](_0x1b243a(0x1e7)),_0x209c6e[_0x1b243a(0x1e9)]((_0x4dcf65,_0x292471)=>{const _0x4e304b=_0x1b243a,_0x5d8ebd=new Date(_0x4dcf65['timestamp'])[_0x4e304b(0x1e4)](_0x4e304b(0x1d7)),_0x3125ac=_0x4dcf65[_0x4e304b(0x1cb)]==='success'?'√':_0x4dcf65[_0x4e304b(0x1cb)]===_0x4e304b(0x1eb)?'×':_0x4dcf65[_0x4e304b(0x1cb)]==='warn'?'!':'i';console[_0x4e304b(0x1da)](_0x292471+0x1+'.\x20'+_0x3125ac+'\x20['+_0x4dcf65[_0x4e304b(0x1cd)]+']\x20'+_0x4dcf65[_0x4e304b(0x1e6)]),console[_0x4e304b(0x1da)](_0x4e304b(0x1df)+_0x5d8ebd),_0x4dcf65[_0x4e304b(0x1de)]&&console[_0x4e304b(0x1da)]('\x20\x20\x20Duration:\x20'+_0x4dcf65[_0x4e304b(0x1de)]+'ms'),_0x4dcf65[_0x4e304b(0x1e5)]&&Object['keys'](_0x4dcf65['details'])['length']>0x0&&console[_0x4e304b(0x1da)](_0x4e304b(0x1d4)+JSON[_0x4e304b(0x1db)](_0x4dcf65['details'],null,0x2)),console[_0x4e304b(0x1da)]('');});}export const logsDefinitions=[{'service':a100_0x3ecb2e(0x1e0),'command':a100_0x3ecb2e(0x1d9),'description':a100_0x3ecb2e(0x1e1),'risk':a100_0x3ecb2e(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4dfa82){const _0x5e0cf1=a100_0x3ecb2e;return printLogs(logger[_0x5e0cf1(0x1ce)]()),{'ok':!![]};}},{'service':'logs','command':a100_0x3ecb2e(0x1cf),'description':a100_0x3ecb2e(0x1d3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c7f4c){const _0x473ecb=a100_0x3ecb2e;return logger[_0x473ecb(0x1cc)](),console[_0x473ecb(0x1da)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -0,0 +1 @@
1
+ const a101_0x39c2f1=a101_0x264d;(function(_0x300c8d,_0x2f0c5d){const _0xbfae89=a101_0x264d,_0x6977ef=_0x300c8d();while(!![]){try{const _0xf75f61=-parseInt(_0xbfae89(0xd1))/0x1*(parseInt(_0xbfae89(0xda))/0x2)+parseInt(_0xbfae89(0xe2))/0x3*(-parseInt(_0xbfae89(0xe9))/0x4)+parseInt(_0xbfae89(0x10a))/0x5*(-parseInt(_0xbfae89(0xe1))/0x6)+parseInt(_0xbfae89(0xde))/0x7*(-parseInt(_0xbfae89(0xfb))/0x8)+-parseInt(_0xbfae89(0x126))/0x9+-parseInt(_0xbfae89(0xf7))/0xa+parseInt(_0xbfae89(0xfd))/0xb;if(_0xf75f61===_0x2f0c5d)break;else _0x6977ef['push'](_0x6977ef['shift']());}catch(_0x51bf00){_0x6977ef['push'](_0x6977ef['shift']());}}}(a101_0x314a,0x3bf19));import a101_0xa87ba6 from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a101_0x264d(_0x13124f,_0x1dd4da){_0x13124f=_0x13124f-0xce;const _0x314aec=a101_0x314a();let _0x264d01=_0x314aec[_0x13124f];return _0x264d01;}export const menuAssetUpdate={'service':a101_0x39c2f1(0x11c),'command':a101_0x39c2f1(0x122),'description':a101_0x39c2f1(0xf5),'risk':a101_0x39c2f1(0x105),'flags':[{'name':a101_0x39c2f1(0x115),'type':a101_0x39c2f1(0x102),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a101_0x39c2f1(0xe3)},{'name':a101_0x39c2f1(0xdd),'type':a101_0x39c2f1(0x102),'description':a101_0x39c2f1(0xf0)+a101_0x39c2f1(0xeb),'enum':['replace',a101_0x39c2f1(0x11e)],'default':a101_0x39c2f1(0x11e)},{'name':a101_0x39c2f1(0x107),'type':a101_0x39c2f1(0x125),'description':a101_0x39c2f1(0xd3)},{'name':a101_0x39c2f1(0xf1),'type':a101_0x39c2f1(0x102),'description':a101_0x39c2f1(0x123)},{'name':'paths','type':a101_0x39c2f1(0x102),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a101_0x39c2f1(0x11f),'type':'boolean','description':a101_0x39c2f1(0xd7)},{'name':a101_0x39c2f1(0xd8),'type':a101_0x39c2f1(0x102),'enum':[a101_0x39c2f1(0xfc),'script',a101_0x39c2f1(0xe4)],'description':a101_0x39c2f1(0xd9)}],async 'dryRun'(_0xf6c621){const _0x2283c1=a101_0x39c2f1;ensureRunnableContext(_0xf6c621[_0x2283c1(0x10f)],_0xf6c621[_0x2283c1(0xfe)]);const _0x32a16d=await runMenuUpdateCore(_0xf6c621[_0x2283c1(0x114)],_0xf6c621['cookie'],_0xf6c621[_0x2283c1(0x103)](_0x2283c1(0x115)),{'mode':parseMode(_0xf6c621['str']('mode')),'dryRun':!![],'force':_0xf6c621[_0x2283c1(0x109)]('force'),'selection':parseSelection(_0xf6c621),'loadScriptMode':parseLoadScriptMode(_0xf6c621[_0x2283c1(0x103)]('load-mode'))});return{'method':_0x2283c1(0xf8),'url':_0x2283c1(0x124),'body':_0x32a16d,'description':_0x32a16d[_0x2283c1(0x10d)]?_0x2283c1(0x120):_0x2283c1(0x118)+(_0x32a16d['diffs']?.[_0x2283c1(0xe5)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x30a9cd){const _0x4dc292=a101_0x39c2f1;ensureRunnableContext(_0x30a9cd[_0x4dc292(0x10f)],_0x30a9cd[_0x4dc292(0xfe)]);const _0xce7747=_0x30a9cd[_0x4dc292(0x119)]('yes'),_0x241423=_0x30a9cd[_0x4dc292(0x103)](_0x4dc292(0x115)),_0x20d452=parseMode(_0x30a9cd[_0x4dc292(0x103)]('mode')),_0xf319d6=_0x30a9cd[_0x4dc292(0x109)](_0x4dc292(0x107)),_0x24b496=parseLoadScriptMode(_0x30a9cd[_0x4dc292(0x103)](_0x4dc292(0xd8))),_0x5d1d28=parseParams(_0x241423),_0x386dc3=!!(_0x5d1d28[_0x4dc292(0x117)]||_0x5d1d28[_0x4dc292(0x11d)]);if(_0xce7747||_0x386dc3&&!isInteractive()){const _0x298226=await runMenuUpdateCore(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)],_0x241423,{'mode':_0x20d452,'force':_0xf319d6,'selection':parseSelection(_0x30a9cd),'loadScriptMode':_0x24b496});return _0x298226[_0x4dc292(0x10d)]?writeCliSideChannelLine(_0x4dc292(0xec)):(writeCliSideChannelLine('✓\x20Menu\x20asset\x20update\x20completed:\x20'+_0x298226[_0x4dc292(0x116)]+_0x4dc292(0xd0)),_0x298226[_0x4dc292(0x10c)]>0x0&&writeCliSideChannelLine('!\x20'+_0x298226[_0x4dc292(0x10c)]+_0x4dc292(0xd2))),{'ok':_0x298226['failed']===0x0,'data':_0x298226,'message':_0x298226[_0x4dc292(0x10d)]?_0x4dc292(0xf4):_0x4dc292(0x121)+_0x298226[_0x4dc292(0x116)]+_0x4dc292(0x111)+_0x298226[_0x4dc292(0x10c)]+'\x20failed.'};}requireInteractive();const _0x1735b0=startSpinner(_0x4dc292(0x11b));let _0x65deba;try{_0x65deba=await fetchOnlineMenuList(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)]),stopSpinner(_0x1735b0,_0x4dc292(0x100),!![]);}catch(_0x16d1d3){stopSpinner(_0x1735b0,_0x4dc292(0xf3),![]);throw CliErrors['validation'](_0x16d1d3 instanceof Error?_0x16d1d3['message']:_0x4dc292(0xf3));}const _0x2d7066=filterMenusWithResources(_0x65deba),_0x39a853=parseSelection(_0x30a9cd,![]),_0x28f676=_0x39a853?selectMenusForUpdate(_0x2d7066,_0x39a853):_0x2d7066;if(_0x28f676[_0x4dc292(0xe5)]===0x0)return writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xdc)](_0x4dc292(0x110))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xef)](_0x4dc292(0xd6)+_0x28f676[_0x4dc292(0xe5)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x28f676[_0x4dc292(0xee)](_0x43439e=>_0x43439e[_0x4dc292(0xcf)]),[_0x5d1d28[_0x4dc292(0x117)],_0x5d1d28[_0x4dc292(0x11d)]])),writeCliSideChannelLine('');let _0x285799=_0x5d1d28[_0x4dc292(0x117)],_0x4613ec=_0x5d1d28[_0x4dc292(0x11d)];!_0x285799&&(_0x285799=await askJsUrl());!_0x4613ec&&(_0x4613ec=await askCssUrl());const _0x5565d4=await askConfirm(_0x4dc292(0xd4)+_0x28f676['length']+_0x4dc292(0xf9)+_0x285799+'\x20and\x20CSS:\x20'+_0x4613ec+'?');if(!_0x5565d4)return writeCliSideChannelLine(a101_0xa87ba6[_0x4dc292(0xed)](_0x4dc292(0xe7))),{'ok':!![]};const _0x104f5a=startSpinner(_0x4dc292(0x106)+_0x28f676[_0x4dc292(0xe5)]+'\x20menu(s)...');try{const _0x50bbfa=await runMenuUpdateCore(_0x30a9cd[_0x4dc292(0x114)],_0x30a9cd[_0x4dc292(0xff)],JSON[_0x4dc292(0x101)]({'jsUrl':_0x285799,'cssUrl':_0x4613ec}),{'mode':_0x20d452,'force':_0xf319d6,'selection':{'all':![],'menuIds':_0x28f676[_0x4dc292(0xee)](_0x474354=>_0x474354['id']),'paths':[]},'loadScriptMode':_0x24b496});return stopSpinner(_0x104f5a,_0x4dc292(0x11a)+_0x50bbfa[_0x4dc292(0x116)]+_0x4dc292(0x113),_0x50bbfa['failed']===0x0),{'ok':_0x50bbfa[_0x4dc292(0x10c)]===0x0,'data':_0x50bbfa,'message':_0x50bbfa['failed']>0x0?_0x4dc292(0x121)+_0x50bbfa['updated']+'\x20updated,\x20'+_0x50bbfa[_0x4dc292(0x10c)]+_0x4dc292(0xe8):_0x4dc292(0x121)+_0x50bbfa['updated']+_0x4dc292(0xd5)};}catch(_0x33d143){stopSpinner(_0x104f5a,'Menu\x20asset\x20update\x20failed',![]);throw CliErrors[_0x4dc292(0xf6)](_0x33d143 instanceof Error?_0x33d143[_0x4dc292(0x104)]:'Menu\x20asset\x20update\x20failed');}}};function ensureRunnableContext(_0x25a03c,_0x526a48){const _0x56261e=a101_0x39c2f1,_0x5d80a7=_0x25a03c[_0x56261e(0x10b)]?String(_0x25a03c[_0x56261e(0x10b)])[_0x56261e(0xe0)]():'';if(!isInProject()&&!_0x526a48&&!_0x5d80a7)throw CliErrors[_0x56261e(0xf6)](_0x56261e(0xdb)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parseMode(_0x1d88fe){const _0x24376a=a101_0x39c2f1;if(!_0x1d88fe)return _0x24376a(0x11e);if(_0x1d88fe===_0x24376a(0xe6)||_0x1d88fe===_0x24376a(0x11e))return _0x1d88fe;throw CliErrors['validation'](_0x24376a(0x10e));}function parseSelection(_0x4f4870,_0xabe8b2=!![]){const _0x4af086=a101_0x39c2f1,_0x701963=_0x4f4870[_0x4af086(0x109)](_0x4af086(0x11f)),_0x29c177=parseMenuIds(_0x4f4870[_0x4af086(0x103)]('menu-ids')),_0x18b39b=parseCsv(_0x4f4870['str']('paths')),_0x39ae8d=_0x29c177[_0x4af086(0xe5)]>0x0||_0x18b39b[_0x4af086(0xe5)]>0x0;if(_0x701963&&_0x39ae8d)throw CliErrors[_0x4af086(0xf6)](_0x4af086(0x112));if(!_0x701963&&!_0x39ae8d){if(!_0xabe8b2)return undefined;throw CliErrors['validation'](_0x4af086(0xea));}return{'all':_0x701963,'menuIds':_0x29c177,'paths':_0x18b39b};}function a101_0x314a(){const _0x901495=['validation','1232620xmMllN','POST','\x20menu(s)\x20with\x20JS:\x20','script','112HiLYnJ','import','10757593CeRZqW','selectedAppName','cookie','Online\x20menu\x20list\x20fetched','stringify','string','str','message','high-risk-write','Updating\x20','force','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','bool','5JtIZYd','appcode','failed','skipped','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','rawFlags','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20updated,\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','\x20menu(s)','appCode','params','updated','jsUrl','Would\x20update\x20','flag','Updated\x20','Fetching\x20online\x20menu\x20list...','menu','cssUrl','patch','all','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','Menu\x20asset\x20update\x20completed:\x20','asset-update','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','/smartapi/menu/update','boolean','1156509Aqbbzc','parse','label','\x20menu(s)\x20updated','23irDOsl','\x20menu(s)\x20failed','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20\x20Update\x20','\x20updated.','\x20\x20Found\x20','Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources','load-mode','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','3702QKUHyz','menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yellow','mode','7805btdhuh','isArray','trim','860802GMkvZB','51XjCeSU','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','fetch','length','replace','\x20\x20Cancelled.','\x20failed.','65652JUcJid','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','gray','map','cyan','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','menu-ids','isSafeInteger','Failed\x20to\x20fetch\x20online\x20menu\x20list','Menu\x20asset\x20update\x20skipped','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources'];a101_0x314a=function(){return _0x901495;};return a101_0x314a();}function parseMenuIds(_0x13fbb1){const _0x5e49bc=a101_0x39c2f1,_0xf6609b=parseCsv(_0x13fbb1),_0x5349ec=_0xf6609b[_0x5e49bc(0xee)](Number);if(_0x5349ec['some'](_0x4be87e=>!Number[_0x5e49bc(0xf2)](_0x4be87e)||_0x4be87e<=0x0))throw CliErrors[_0x5e49bc(0xf6)](_0x5e49bc(0x108));return[...new Set(_0x5349ec)];}function parseCsv(_0x572ae6){const _0x5b7e1d=a101_0x39c2f1;return[...new Set(_0x572ae6['split'](',')[_0x5b7e1d(0xee)](_0xe22a63=>_0xe22a63[_0x5b7e1d(0xe0)]())['filter'](Boolean))];}function parseLoadScriptMode(_0x10423b){const _0x21ba04=a101_0x39c2f1;if(!_0x10423b)return undefined;if(_0x10423b===_0x21ba04(0xfc)||_0x10423b===_0x21ba04(0xfa)||_0x10423b==='fetch')return _0x10423b;throw CliErrors['validation']('Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch');}function parseParams(_0x35cdd7){const _0x121b3c=a101_0x39c2f1;if(!_0x35cdd7)return{};try{const _0x586f3c=JSON[_0x121b3c(0xce)](_0x35cdd7);if(typeof _0x586f3c!=='object'||_0x586f3c===null||Array[_0x121b3c(0xdf)](_0x586f3c))return{};return{'jsUrl':typeof _0x586f3c[_0x121b3c(0x117)]===_0x121b3c(0x102)?_0x586f3c[_0x121b3c(0x117)][_0x121b3c(0xe0)]():undefined,'cssUrl':typeof _0x586f3c[_0x121b3c(0x11d)]===_0x121b3c(0x102)?_0x586f3c[_0x121b3c(0x11d)][_0x121b3c(0xe0)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a101_0x4f4633=a101_0x25c5;(function(_0x241ff5,_0x16efd3){const _0x576ef7=a101_0x25c5,_0x1f0cd6=_0x241ff5();while(!![]){try{const _0x3d730f=-parseInt(_0x576ef7(0x188))/0x1+-parseInt(_0x576ef7(0x17d))/0x2*(parseInt(_0x576ef7(0x173))/0x3)+-parseInt(_0x576ef7(0x196))/0x4*(parseInt(_0x576ef7(0x140))/0x5)+parseInt(_0x576ef7(0x14b))/0x6*(-parseInt(_0x576ef7(0x169))/0x7)+-parseInt(_0x576ef7(0x130))/0x8+-parseInt(_0x576ef7(0x148))/0x9*(parseInt(_0x576ef7(0x17b))/0xa)+parseInt(_0x576ef7(0x16b))/0xb;if(_0x3d730f===_0x16efd3)break;else _0x1f0cd6['push'](_0x1f0cd6['shift']());}catch(_0x48cf6f){_0x1f0cd6['push'](_0x1f0cd6['shift']());}}}(a101_0x5820,0xb1505));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x4f4633(0x151),'path':'/smartapi/menu/batchDelete'}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0x4f4633(0x16f)},MENU_DELETE_RECURSIVE_FLAG={'name':a101_0x4f4633(0x19b),'type':a101_0x4f4633(0x18a),'description':a101_0x4f4633(0x178)},MENU_DELETE_PLAN_OUT_FLAG={'name':a101_0x4f4633(0x185),'type':a101_0x4f4633(0x197),'description':a101_0x4f4633(0x145)},MENU_DELETE_PLAN_FLAG={'name':'plan','type':a101_0x4f4633(0x197),'description':a101_0x4f4633(0x126)};function a101_0x5820(){const _0x5d656e=['absentIds','plan-validation','\x20menu(s)\x20under\x20exact\x20id\x20','menu\x20list','menu_non_empty','\x20resource\x20URL(s).','Post-mismatch\x20menu\x20readback\x20failed\x20(','batch-delete-menu','28jPRoUQ','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','67648911qOebKs','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','join','byId','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','bool','deleteOrder','pre-write-plan-validation','45861LBVKmY','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','str','remainingIds','Batch\x20delete\x20request\x20for\x20menu\x20','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first','Menu\x20','pages','2873960fxsggL','target','190dDnsEb','cascade','batch\x20delete','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.','\x20is\x20type\x20\x22','menu_folder_has_resources','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','plan-out','type','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','21131VuMdbd','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','boolean','Post-failure\x20menu\x20readback\x20failed\x20(','delete','add','map','menu_plan_invalid','verify\x20batch\x20delete','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','push','unknown','forEach','135244hlLvnu','string','Would\x20batch\x20delete\x20','createdAt','\x20->\x20menu\x20','recursive','get','\x20is\x20unexpectedly\x20bound\x20to\x20page\x20','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','Deleted\x20','snapshot','dry-run','\x20references\x20missing\x20child\x20','Backend\x20reported\x20','batch-delete','resources','menus','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','Folder\x20','menu_batch_delete_count_mismatch','high-risk-write','cookie','message','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','flagMissing','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','expected-children-count','2388296yubFPx','rabetbase\x20menu\x20list\x20--format\x20json','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','/smartapi/menu/batchDelete','size','toLowerCase','appCode','The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.','causeMessage','expect-parent-id','stringify','\x20and\x20cannot\x20be\x20deleted\x20safely.','childrenCount','\x20still\x20references\x20','menu','menu_tree_invalid','125sgPrML','has','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','trim','folder','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','plan','Recursive\x20menu\x20delete\x20plan\x20root\x20','45twDyGR','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','expiresAt','2054154LGPuAI','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','resourcesValid','unconfirmed','\x20deleted\x20menus;\x20expected\x20','validation','POST','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','childrenIds','\x20is\x20not\x20a\x20folder.','failed','Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','length','pageId','execute\x20reviewed\x20delete\x20plan','):\x20','causeCode','filter','menu_recursive_requires_folder','verification','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.'];a101_0x5820=function(){return _0x5d656e;};return a101_0x5820();}export const menuDelete={'service':a101_0x4f4633(0x13e),'command':'delete','description':a101_0x4f4633(0x187),'risk':a101_0x4f4633(0x129),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2cca94){const _0x6089ac=a101_0x4f4633;_0x2cca94[_0x6089ac(0x170)](_0x6089ac(0x120))?validateDeleteDryRunInput(_0x2cca94):validateDeleteExecuteInput(_0x2cca94),requireExplicitYes(_0x2cca94);},async 'dryRun'(_0x163d6d){const _0x593288=a101_0x4f4633;validateDeleteDryRunInput(_0x163d6d);const _0x186533=await buildDeletePlan(_0x163d6d),_0x3b9ebb=createMenuDeletePlanFile(_0x163d6d[_0x593288(0x136)],_0x186533),_0x566f92=await writeMenuDeletePlan(_0x163d6d['str'](_0x593288(0x185)),_0x3b9ebb),_0x4a995a=mutationResult({..._0x186533,'planFile':{'path':_0x566f92,'createdAt':_0x3b9ebb[_0x593288(0x199)],'expiresAt':_0x3b9ebb[_0x593288(0x14a)]}});return menuDryRunResult(_0x4a995a,{'method':_0x593288(0x151),'url':'/smartapi/menu/batchDelete','body':{'idList':_0x4a995a['deleteOrder']},'description':_0x593288(0x198)+(_0x4a995a['deleteOrder']?.[_0x593288(0x158)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x4a995a['selector']['id']+';\x20execution\x20must\x20consume\x20'+_0x566f92+'.'});},async 'execute'(_0x16cee0){const _0x28c4c7=a101_0x4f4633;requireExplicitYes(_0x16cee0),validateDeleteExecuteInput(_0x16cee0);const _0x434fa5=await readMenuDeletePlan(_0x16cee0[_0x28c4c7(0x175)](_0x28c4c7(0x146))),_0x482fe5=mutationPlanFromDeleteFile(_0x434fa5[_0x28c4c7(0x146)],_0x434fa5['path']),_0x493fba=_0x434fa5[_0x28c4c7(0x146)]['target']['id'];try{assertMenuDeletePlanExecutable(_0x434fa5[_0x28c4c7(0x146)],_0x16cee0[_0x28c4c7(0x136)]);}catch(_0x47c545){throw menuFailure(asMenuError(_0x47c545),_0x482fe5,{'stage':_0x28c4c7(0x162),'failed':{'id':_0x493fba}});}let _0x35172f,_0xefcfa0;try{_0x35172f=await fetchMutationSnapshot(_0x16cee0,_0x28c4c7(0x15a),_0x493fba),_0xefcfa0=assertMenuDeletePlanCurrent(_0x434fa5[_0x28c4c7(0x146)],_0x16cee0[_0x28c4c7(0x136)],_0x35172f),assertDeleteTargetsComplete(_0x434fa5[_0x28c4c7(0x146)],_0x35172f),_0xefcfa0[_0x28c4c7(0x195)](_0x2ebcc9=>assertDeleteSafety(_0x2ebcc9,_0x434fa5[_0x28c4c7(0x146)][_0x28c4c7(0x19b)])),assertNoSharedPages(_0x35172f,_0xefcfa0),assertCascadeMatchesPlan(_0x482fe5,_0xefcfa0);}catch(_0x4882d2){throw menuFailure(asMenuError(_0x4882d2),_0x482fe5,{'stage':_0x28c4c7(0x172),'failed':{'id':_0x493fba}});}const _0x5a6a3e=_0x434fa5['plan']['deleteOrder'];let _0x8b4f7a;try{_0x8b4f7a=await batchDeleteMenuEntities(_0x16cee0[_0x28c4c7(0x12a)],_0x5a6a3e);}catch(_0xe8f56){const _0x2eb75f=mapMenuApiError(_0xe8f56,_0x28c4c7(0x17f)),_0x192b24=[_0x28c4c7(0x137)];let _0x3a4b95;try{_0x3a4b95=await readDeleteOutcome(_0x16cee0,_0x5a6a3e);}catch(_0x181381){const _0x1d2652=describeMenuErrorCause(_0x181381,_0x28c4c7(0x14c),_0x493fba);_0x192b24['push'](_0x28c4c7(0x18b)+_0x1d2652[_0x28c4c7(0x15c)]+'):\x20'+_0x1d2652[_0x28c4c7(0x138)]);throw menuFailure(_0x2eb75f,_0x482fe5,{'stage':_0x28c4c7(0x123),'failed':{'targetIds':_0x5a6a3e,'targetIdsAbsent':_0x28c4c7(0x14e),..._0x1d2652},'warnings':_0x192b24,'verification':{'status':_0x28c4c7(0x155),'lookupCommand':_0x28c4c7(0x131),'targetIds':_0x5a6a3e}});}throw menuFailure(_0x2eb75f,_0x482fe5,{'stage':'batch-delete','succeeded':_0x3a4b95[_0x28c4c7(0x161)][_0x28c4c7(0x18e)](_0x502e67=>({'id':_0x502e67,'deleted':!![]})),'failed':{'targetIds':_0x5a6a3e,'absentIds':_0x3a4b95[_0x28c4c7(0x161)],'remainingIds':_0x3a4b95[_0x28c4c7(0x176)]},'warnings':_0x192b24,'verification':verificationFromOutcome(_0x3a4b95)});}if(_0x8b4f7a!==_0x5a6a3e['length']){const _0x4da562=menuError(_0x28c4c7(0x128),_0x28c4c7(0x122)+_0x8b4f7a+_0x28c4c7(0x14f)+_0x5a6a3e[_0x28c4c7(0x158)]+'.',_0x28c4c7(0x19e)),_0x45d128=[_0x28c4c7(0x191)];let _0x16e95e;try{_0x16e95e=await readDeleteOutcome(_0x16cee0,_0x5a6a3e);}catch(_0x419b53){const _0x339116=describeMenuErrorCause(_0x419b53,_0x28c4c7(0x132),_0x493fba);_0x45d128[_0x28c4c7(0x193)](_0x28c4c7(0x167)+_0x339116[_0x28c4c7(0x15c)]+_0x28c4c7(0x15b)+_0x339116[_0x28c4c7(0x138)]);throw menuFailure(_0x4da562,_0x482fe5,{'stage':'batch-delete','failed':{'targetIds':_0x5a6a3e,'expectedCount':_0x5a6a3e[_0x28c4c7(0x158)],'reportedDeletedCount':_0x8b4f7a,'targetIdsAbsent':_0x28c4c7(0x14e),..._0x339116},'warnings':_0x45d128,'verification':{'status':'failed','lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetIds':_0x5a6a3e}});}throw menuFailure(_0x4da562,_0x482fe5,{'stage':_0x28c4c7(0x123),'succeeded':_0x16e95e[_0x28c4c7(0x161)][_0x28c4c7(0x18e)](_0x230271=>({'id':_0x230271,'deleted':!![]})),'failed':{'targetIds':_0x5a6a3e,'expectedCount':_0x5a6a3e[_0x28c4c7(0x158)],'reportedDeletedCount':_0x8b4f7a,'absentIds':_0x16e95e[_0x28c4c7(0x161)],'remainingIds':_0x16e95e[_0x28c4c7(0x176)]},'warnings':_0x45d128,'verification':verificationFromOutcome(_0x16e95e)});}let _0x510e79;try{_0x510e79=await readDeleteOutcome(_0x16cee0,_0x5a6a3e);}catch(_0x530392){const _0x9b0265=describeMenuErrorCause(_0x530392,_0x28c4c7(0x190),_0x493fba),_0x1dd381=asVerificationError(_0x530392,_0x28c4c7(0x177)+_0x493fba+_0x28c4c7(0x189));throw menuFailure(_0x1dd381,_0x482fe5,{'stage':_0x28c4c7(0x15f),'succeeded':_0x5a6a3e[_0x28c4c7(0x18e)](_0x232c2c=>({'id':_0x232c2c,'deleteRequested':!![]})),'failed':{'id':_0x493fba,'targetIds':_0x5a6a3e,'targetIdsAbsent':_0x28c4c7(0x14e),..._0x9b0265},'warnings':[_0x28c4c7(0x149)],'verification':{'status':_0x28c4c7(0x155),'lookupCommand':_0x28c4c7(0x131),'targetIds':_0x5a6a3e}});}if(_0x510e79[_0x28c4c7(0x176)][_0x28c4c7(0x158)]>0x0){const _0x23eef3=menuError('menu_verification_failed',_0x28c4c7(0x174)+_0x510e79[_0x28c4c7(0x176)][_0x28c4c7(0x16d)](',\x20')+'.',_0x28c4c7(0x19e));throw menuFailure(_0x23eef3,_0x482fe5,{'stage':_0x28c4c7(0x15f),'succeeded':_0x5a6a3e[_0x28c4c7(0x18e)](_0x1c26c6=>({'id':_0x1c26c6,'deleteRequested':!![]})),'failed':{'id':_0x493fba,'targetIds':_0x5a6a3e,'absentIds':_0x510e79[_0x28c4c7(0x161)],'remainingIds':_0x510e79[_0x28c4c7(0x176)]},'warnings':[_0x28c4c7(0x12e)],'verification':verificationFromOutcome(_0x510e79)});}const _0x1c7d52=_0x5a6a3e[_0x28c4c7(0x18e)](_0xa1be3f=>({'id':_0xa1be3f,'deleted':!![]})),_0x42e2ef=mutationResult({..._0x482fe5,'dryRun':![],'succeeded':_0x1c7d52,'verification':{'checkedBy':_0x28c4c7(0x164),'plannedSnapshotHash':_0x482fe5['snapshotHash'],'finalSnapshotHash':_0x510e79[_0x28c4c7(0x11f)]['hash'],'reportedDeletedCount':_0x8b4f7a,'targetAbsent':!_0x510e79[_0x28c4c7(0x11f)][_0x28c4c7(0x16e)][_0x28c4c7(0x141)](_0x493fba),'allTargetsAbsent':!![],'targetIds':_0x5a6a3e}});return{'ok':!![],'data':_0x42e2ef,'message':_0x28c4c7(0x19f)+_0x1c7d52['length']+_0x28c4c7(0x163)+_0x493fba+'.'};}};async function readDeleteOutcome(_0x19d677,_0x25cea9){const _0x3b0223=a101_0x4f4633,_0x469234=await fetchMenuSnapshot(_0x19d677[_0x3b0223(0x136)],_0x19d677[_0x3b0223(0x12a)]);return{'snapshot':_0x469234,'absentIds':_0x25cea9[_0x3b0223(0x15d)](_0x17160f=>!_0x469234[_0x3b0223(0x16e)][_0x3b0223(0x141)](_0x17160f)),'remainingIds':_0x25cea9['filter'](_0x33d511=>_0x469234[_0x3b0223(0x16e)][_0x3b0223(0x141)](_0x33d511))};}function verificationFromOutcome(_0x1f7be8){const _0x39d4b0=a101_0x4f4633;return{'checkedBy':_0x39d4b0(0x164),'absentIds':_0x1f7be8['absentIds'],'remainingIds':_0x1f7be8['remainingIds']};}function validateDeleteDryRunInput(_0x43dd99){const _0x5e1bc8=a101_0x4f4633;validateExactId(_0x43dd99);if(!hasFlag(_0x43dd99,'plan-out')||!_0x43dd99[_0x5e1bc8(0x175)]('plan-out')[_0x5e1bc8(0x143)]())throw CliErrors[_0x5e1bc8(0x12d)](_0x5e1bc8(0x185),'--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.');if(hasFlag(_0x43dd99,_0x5e1bc8(0x146)))throw CliErrors[_0x5e1bc8(0x150)]('--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.');}function validateDeleteExecuteInput(_0x162191){const _0x15870b=a101_0x4f4633;if(!hasFlag(_0x162191,_0x15870b(0x146))||!_0x162191[_0x15870b(0x175)](_0x15870b(0x146))['trim']())throw CliErrors[_0x15870b(0x12d)](_0x15870b(0x146),_0x15870b(0x16a));const _0x4a4f63=['id',_0x15870b(0x19b),_0x15870b(0x185),_0x15870b(0x139),'expect-path',_0x15870b(0x12f)][_0x15870b(0x15d)](_0x4f98d0=>hasFlag(_0x162191,_0x4f98d0));if(_0x4a4f63['length']>0x0)throw CliErrors[_0x15870b(0x150)](_0x15870b(0x16c)+_0x4a4f63[_0x15870b(0x18e)](_0x1cb0ef=>'--'+_0x1cb0ef)[_0x15870b(0x16d)](',\x20')+'.');}async function buildDeletePlan(_0x519144){const _0x21fd9f=a101_0x4f4633,_0x5d00d1=validateExactId(_0x519144),_0xb6d43=await fetchMutationSnapshot(_0x519144,'plan\x20delete',_0x5d00d1),_0x1f4015=requireMenu(_0xb6d43,_0x5d00d1);assertExpectedState(_0x519144,_0x1f4015);const _0x1b0e51=_0x519144[_0x21fd9f(0x170)]('recursive');let _0xc3163e;if(_0x1b0e51){if(_0x1f4015[_0x21fd9f(0x186)][_0x21fd9f(0x143)]()[_0x21fd9f(0x135)]()!==_0x21fd9f(0x144))throw menuError(_0x21fd9f(0x15e),'Menu\x20'+_0x1f4015['id']+_0x21fd9f(0x182)+(_0x1f4015['type']||_0x21fd9f(0x194))+_0x21fd9f(0x142));_0xc3163e=collectDeleteTargets(_0xb6d43,_0x1f4015),_0xc3163e['forEach'](_0x3d754d=>assertDeleteSafety(_0x3d754d,!![]));}else assertDeleteSafety(_0x1f4015),_0xc3163e=[_0x1f4015];assertNoSharedPages(_0xb6d43,_0xc3163e);const _0x53613f=_0xc3163e[_0x21fd9f(0x18e)](_0x378d0d=>_0x378d0d['id']),_0x5a2458=cascadeForTargets(_0xc3163e),_0x47bbf8=_0x5a2458[_0x21fd9f(0x17a)][_0x21fd9f(0x158)]>0x0?[_0x21fd9f(0x12c)]:[];return mutationResult({'operation':_0x21fd9f(0x18c),'selector':{'id':_0x5d00d1,'recursive':_0x1b0e51},'before':_0x1f4015,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x21fd9f(0x168),'method':_0x21fd9f(0x151),'path':_0x21fd9f(0x133),'body':{'idList':_0x53613f}}],'targets':_0xc3163e,'deleteOrder':_0x53613f,'snapshotHash':_0xb6d43['hash'],'cascade':_0x5a2458,'warnings':_0x47bbf8});}function assertDeleteSafety(_0x19f73b,_0x236375=![]){const _0x4b4428=a101_0x4f4633,_0x5b8016=_0x19f73b[_0x4b4428(0x186)]['trim']()['toLowerCase']()===_0x4b4428(0x144);if(_0x19f73b[_0x4b4428(0x13c)]>0x0&&(!_0x236375||!_0x5b8016))throw menuError(_0x4b4428(0x165),_0x4b4428(0x179)+_0x19f73b['id']+'\x20has\x20'+_0x19f73b[_0x4b4428(0x13c)]+'\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.',_0x4b4428(0x157)+_0x19f73b[_0x4b4428(0x153)][_0x4b4428(0x16d)](',\x20'));if(_0x5b8016&&_0x19f73b[_0x4b4428(0x159)]!=null)throw menuError('menu_delete_page_bound',_0x4b4428(0x127)+_0x19f73b['id']+_0x4b4428(0x19d)+_0x19f73b[_0x4b4428(0x159)]+_0x4b4428(0x13b),_0x4b4428(0x160));if(!_0x5b8016)return;if(!_0x19f73b[_0x4b4428(0x14d)])throw menuError('menu_folder_resources_invalid',_0x4b4428(0x127)+_0x19f73b['id']+'\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.',_0x4b4428(0x192));if(_0x19f73b[_0x4b4428(0x124)]['length']>0x0)throw menuError(_0x4b4428(0x183),_0x4b4428(0x127)+_0x19f73b['id']+_0x4b4428(0x13d)+_0x19f73b['resources'][_0x4b4428(0x158)]+_0x4b4428(0x166),_0x4b4428(0x152));}function collectDeleteTargets(_0x3bb2ba,_0x1864ab){const _0x2896e5=[],_0x442156=new Set(),_0x203680=new Set(),_0x3608b3=_0x50094b=>{const _0x28eecc=a101_0x25c5;if(_0x442156[_0x28eecc(0x141)](_0x50094b['id']))throw menuError(_0x28eecc(0x13f),_0x28eecc(0x184)+_0x50094b['id']+'.');if(_0x203680[_0x28eecc(0x141)](_0x50094b['id']))return;_0x442156[_0x28eecc(0x18d)](_0x50094b['id']);for(const _0x21c53d of _0x50094b[_0x28eecc(0x153)]){const _0x5204eb=_0x3bb2ba[_0x28eecc(0x16e)][_0x28eecc(0x19c)](_0x21c53d);if(!_0x5204eb)throw menuError(_0x28eecc(0x13f),'Menu\x20'+_0x50094b['id']+_0x28eecc(0x121)+_0x21c53d+'.');_0x3608b3(_0x5204eb);}_0x442156['delete'](_0x50094b['id']),_0x203680['add'](_0x50094b['id']),_0x2896e5[_0x28eecc(0x193)](_0x50094b);};return _0x3608b3(_0x1864ab),_0x2896e5;}function assertDeleteTargetsComplete(_0x7a7e5c,_0x433a94){const _0x43da98=a101_0x4f4633,_0x251ab6=requireMenu(_0x433a94,_0x7a7e5c[_0x43da98(0x17c)]['id']);if(_0x7a7e5c['recursive']&&_0x251ab6[_0x43da98(0x186)]['trim']()[_0x43da98(0x135)]()!==_0x43da98(0x144))throw menuError('menu_plan_invalid',_0x43da98(0x147)+_0x251ab6['id']+_0x43da98(0x154));const _0x52acd7=_0x7a7e5c[_0x43da98(0x19b)]?collectDeleteTargets(_0x433a94,_0x251ab6)['map'](_0x411f29=>_0x411f29['id']):[_0x251ab6['id']];if(JSON[_0x43da98(0x13a)](_0x7a7e5c[_0x43da98(0x171)])!==JSON[_0x43da98(0x13a)](_0x52acd7))throw menuError(_0x43da98(0x18f),_0x43da98(0x156),_0x43da98(0x181));}function assertNoSharedPages(_0x40fc67,_0x4e918b){const _0x53a966=a101_0x4f4633,_0x2216c4=new Set(_0x4e918b[_0x53a966(0x18e)](_0x169dec=>_0x169dec['id'])),_0x1a25f5=new Set(_0x4e918b[_0x53a966(0x18e)](_0x3791ab=>_0x3791ab['pageId'])[_0x53a966(0x15d)](_0x16a305=>_0x16a305!=null));if(_0x1a25f5[_0x53a966(0x134)]===0x0)return;const _0x3fb8f6=_0x40fc67[_0x53a966(0x125)]['filter'](_0x513af1=>!_0x2216c4[_0x53a966(0x141)](_0x513af1['id'])&&_0x513af1[_0x53a966(0x159)]!=null&&_0x1a25f5[_0x53a966(0x141)](_0x513af1[_0x53a966(0x159)]));if(_0x3fb8f6[_0x53a966(0x158)]===0x0)return;const _0x4ba7e2=_0x3fb8f6[_0x53a966(0x18e)](_0xbf9b3d=>'page\x20'+_0xbf9b3d[_0x53a966(0x159)]+_0x53a966(0x19a)+_0xbf9b3d['id'])[_0x53a966(0x16d)](',\x20');throw menuError('menu_page_shared','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20'+_0x4ba7e2+'.',_0x53a966(0x180));}function assertCascadeMatchesPlan(_0x7300bd,_0x370f74){const _0xda1b64=a101_0x4f4633,_0x40d6c4=cascadeForTargets(_0x370f74);if(JSON[_0xda1b64(0x13a)](_0x7300bd[_0xda1b64(0x17e)])!==JSON[_0xda1b64(0x13a)](_0x40d6c4))throw menuError('menu_plan_invalid','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.');}function cascadeForTargets(_0x4b07f2){const _0x1e7cc9=a101_0x4f4633,_0x4118b8=_0x4b07f2[_0x1e7cc9(0x18e)](_0x5bbf0=>_0x5bbf0['pageId'])[_0x1e7cc9(0x15d)](_0x5193c6=>_0x5193c6!=null)[_0x1e7cc9(0x15d)]((_0x35f8c9,_0x5194c0,_0x31f1e8)=>_0x31f1e8['indexOf'](_0x35f8c9)===_0x5194c0);return{'pages':_0x4118b8,'pageSchemaAffected':_0x4118b8[_0x1e7cc9(0x158)]>0x0};}function a101_0x25c5(_0x2c66f9,_0x1483d4){_0x2c66f9=_0x2c66f9-0x11f;const _0x582025=a101_0x5820();let _0x25c558=_0x582025[_0x2c66f9];return _0x25c558;}function asMenuError(_0x425633){const _0x3488de=a101_0x4f4633;return _0x425633 instanceof CliError?_0x425633:menuError(_0x3488de(0x18f),_0x425633 instanceof Error?_0x425633[_0x3488de(0x12b)]:String(_0x425633));}
1
+ const a102_0x45adbd=a102_0x2a24;(function(_0x3f8016,_0x50ffc2){const _0x56ed37=a102_0x2a24,_0x4eb955=_0x3f8016();while(!![]){try{const _0x54a30c=-parseInt(_0x56ed37(0x1a7))/0x1*(-parseInt(_0x56ed37(0x14a))/0x2)+parseInt(_0x56ed37(0x199))/0x3+parseInt(_0x56ed37(0x196))/0x4+parseInt(_0x56ed37(0x184))/0x5+-parseInt(_0x56ed37(0x180))/0x6+-parseInt(_0x56ed37(0x168))/0x7*(-parseInt(_0x56ed37(0x149))/0x8)+-parseInt(_0x56ed37(0x1a5))/0x9;if(_0x54a30c===_0x50ffc2)break;else _0x4eb955['push'](_0x4eb955['shift']());}catch(_0x27a58c){_0x4eb955['push'](_0x4eb955['shift']());}}}(a102_0x157d,0x80a7d));function a102_0x157d(){const _0x57bdcf=['plan','path','bool','selector','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','add','dry-run','8833329CmctxX','unconfirmed','35JInsus',';\x20execution\x20must\x20consume\x20','message','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','\x20is\x20type\x20\x22','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','boolean','plan-validation','length','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','filter','rabetbase\x20menu\x20list\x20--format\x20json','stringify','appCode','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','has','resources','byId','batch-delete-menu','delete','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.','menu_batch_delete_count_mismatch','\x20and\x20cannot\x20be\x20deleted\x20safely.','folder','8XqXakf','25086sQGAmE','menu_plan_invalid','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','push','causeMessage','deleteOrder','type','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','menu\x20list','Deleted\x20','absentIds','unknown','\x20has\x20','resourcesValid','plan-out','validation','POST','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','target','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','verification','str','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','Folder\x20','childrenIds','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','\x20is\x20not\x20a\x20folder.','batch\x20delete','menu_folder_has_resources','snapshotHash','2770971EYDLjX','menu','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','map','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','remainingIds','menu_tree_invalid','menu_delete_page_bound','pre-write-plan-validation','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first','string','size','createdAt','Menu\x20','failed','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','Would\x20batch\x20delete\x20','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','pageId','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','toLowerCase','5937228ZcqulY','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','expect-path','trim','2676090vXnzxC','flagMissing','indexOf','Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','cookie','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','cascade','):\x20','join','batch-delete','expiresAt','childrenCount','/smartapi/menu/batchDelete','Post-failure\x20menu\x20readback\x20failed\x20(','menu_verification_failed','recursive','\x20deleted\x20menus;\x20expected\x20','\x20references\x20missing\x20child\x20','2830536XIhxrd','Post-mismatch\x20menu\x20readback\x20failed\x20(','plan\x20delete','1260846RVLRmE','causeCode','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','verify\x20batch\x20delete','forEach'];a102_0x157d=function(){return _0x57bdcf;};return a102_0x157d();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertMenuDeletePlanCurrent,assertMenuDeletePlanExecutable,createMenuDeletePlanFile,mutationPlanFromDeleteFile,readMenuDeletePlan,writeMenuDeletePlan}from'../../commands/menu/shared/delete-plan.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,asVerificationError,assertExpectedState,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';function a102_0x2a24(_0x9f7c96,_0xebe4b6){_0x9f7c96=_0x9f7c96-0x138;const _0x157ded=a102_0x157d();let _0x2a24df=_0x157ded[_0x9f7c96];return _0x2a24df;}const BACKEND=[{'method':a102_0x45adbd(0x15a),'path':a102_0x45adbd(0x190)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a102_0x45adbd(0x16c)},MENU_DELETE_RECURSIVE_FLAG={'name':a102_0x45adbd(0x193),'type':a102_0x45adbd(0x1ae),'description':a102_0x45adbd(0x172)},MENU_DELETE_PLAN_OUT_FLAG={'name':a102_0x45adbd(0x158),'type':a102_0x45adbd(0x173),'description':a102_0x45adbd(0x189)},MENU_DELETE_PLAN_FLAG={'name':a102_0x45adbd(0x19e),'type':a102_0x45adbd(0x173),'description':a102_0x45adbd(0x15d)};export const menuDelete={'service':a102_0x45adbd(0x169),'command':a102_0x45adbd(0x144),'description':a102_0x45adbd(0x178),'risk':'high-risk-write','structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_RECURSIVE_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17b4c4){const _0x1b593b=a102_0x45adbd;_0x17b4c4[_0x1b593b(0x1a0)](_0x1b593b(0x1a4))?validateDeleteDryRunInput(_0x17b4c4):validateDeleteExecuteInput(_0x17b4c4),requireExplicitYes(_0x17b4c4);},async 'dryRun'(_0xe89c8a){const _0x224bc2=a102_0x45adbd;validateDeleteDryRunInput(_0xe89c8a);const _0x1cf7c4=await buildDeletePlan(_0xe89c8a),_0x229d20=createMenuDeletePlanFile(_0xe89c8a[_0x224bc2(0x13e)],_0x1cf7c4),_0x186038=await writeMenuDeletePlan(_0xe89c8a[_0x224bc2(0x15f)](_0x224bc2(0x158)),_0x229d20),_0x55b448=mutationResult({..._0x1cf7c4,'planFile':{'path':_0x186038,'createdAt':_0x229d20[_0x224bc2(0x175)],'expiresAt':_0x229d20[_0x224bc2(0x18e)]}});return menuDryRunResult(_0x55b448,{'method':_0x224bc2(0x15a),'url':_0x224bc2(0x190),'body':{'idList':_0x55b448[_0x224bc2(0x14f)]},'description':_0x224bc2(0x17a)+(_0x55b448[_0x224bc2(0x14f)]?.[_0x224bc2(0x139)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x55b448[_0x224bc2(0x1a1)]['id']+_0x224bc2(0x1a8)+_0x186038+'.'});},async 'execute'(_0x1fe02e){const _0x3963f5=a102_0x45adbd;requireExplicitYes(_0x1fe02e),validateDeleteExecuteInput(_0x1fe02e);const _0x55299d=await readMenuDeletePlan(_0x1fe02e[_0x3963f5(0x15f)]('plan')),_0x4ff36f=mutationPlanFromDeleteFile(_0x55299d[_0x3963f5(0x19e)],_0x55299d[_0x3963f5(0x19f)]),_0x478be3=_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x15c)]['id'];try{assertMenuDeletePlanExecutable(_0x55299d[_0x3963f5(0x19e)],_0x1fe02e[_0x3963f5(0x13e)]);}catch(_0x5763e8){throw menuFailure(asMenuError(_0x5763e8),_0x4ff36f,{'stage':_0x3963f5(0x138),'failed':{'id':_0x478be3}});}let _0x2f1e02,_0x406d1f;try{_0x2f1e02=await fetchMutationSnapshot(_0x1fe02e,'execute\x20reviewed\x20delete\x20plan',_0x478be3),_0x406d1f=assertMenuDeletePlanCurrent(_0x55299d[_0x3963f5(0x19e)],_0x1fe02e['appCode'],_0x2f1e02),assertDeleteTargetsComplete(_0x55299d['plan'],_0x2f1e02),_0x406d1f[_0x3963f5(0x19d)](_0xfe9809=>assertDeleteSafety(_0xfe9809,_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x193)])),assertNoSharedPages(_0x2f1e02,_0x406d1f),assertCascadeMatchesPlan(_0x4ff36f,_0x406d1f);}catch(_0x5c7967){throw menuFailure(asMenuError(_0x5c7967),_0x4ff36f,{'stage':_0x3963f5(0x170),'failed':{'id':_0x478be3}});}const _0x572130=_0x55299d[_0x3963f5(0x19e)][_0x3963f5(0x14f)];let _0x19ba5e;try{_0x19ba5e=await batchDeleteMenuEntities(_0x1fe02e[_0x3963f5(0x188)],_0x572130);}catch(_0x55eecb){const _0xa3646b=mapMenuApiError(_0x55eecb,_0x3963f5(0x165)),_0x392238=['The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.'];let _0x3b1f80;try{_0x3b1f80=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x3537d3){const _0x5d5339=describeMenuErrorCause(_0x3537d3,_0x3963f5(0x16a),_0x478be3);_0x392238[_0x3963f5(0x14d)](_0x3963f5(0x191)+_0x5d5339[_0x3963f5(0x19a)]+_0x3963f5(0x18b)+_0x5d5339[_0x3963f5(0x14e)]);throw menuFailure(_0xa3646b,_0x4ff36f,{'stage':_0x3963f5(0x18d),'failed':{'targetIds':_0x572130,'targetIdsAbsent':'unconfirmed',..._0x5d5339},'warnings':_0x392238,'verification':{'status':_0x3963f5(0x177),'lookupCommand':_0x3963f5(0x13c),'targetIds':_0x572130}});}throw menuFailure(_0xa3646b,_0x4ff36f,{'stage':_0x3963f5(0x18d),'succeeded':_0x3b1f80[_0x3963f5(0x154)][_0x3963f5(0x16b)](_0x25f0f0=>({'id':_0x25f0f0,'deleted':!![]})),'failed':{'targetIds':_0x572130,'absentIds':_0x3b1f80[_0x3963f5(0x154)],'remainingIds':_0x3b1f80[_0x3963f5(0x16d)]},'warnings':_0x392238,'verification':verificationFromOutcome(_0x3b1f80)});}if(_0x19ba5e!==_0x572130[_0x3963f5(0x139)]){const _0x41ba09=menuError(_0x3963f5(0x146),'Backend\x20reported\x20'+_0x19ba5e+_0x3963f5(0x194)+_0x572130['length']+'.',_0x3963f5(0x14c)),_0x1a0451=[_0x3963f5(0x181)];let _0x266247;try{_0x266247=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x44b484){const _0x233f05=describeMenuErrorCause(_0x44b484,_0x3963f5(0x13a),_0x478be3);_0x1a0451[_0x3963f5(0x14d)](_0x3963f5(0x197)+_0x233f05[_0x3963f5(0x19a)]+_0x3963f5(0x18b)+_0x233f05[_0x3963f5(0x14e)]);throw menuFailure(_0x41ba09,_0x4ff36f,{'stage':_0x3963f5(0x18d),'failed':{'targetIds':_0x572130,'expectedCount':_0x572130[_0x3963f5(0x139)],'reportedDeletedCount':_0x19ba5e,'targetIdsAbsent':_0x3963f5(0x1a6),..._0x233f05},'warnings':_0x1a0451,'verification':{'status':'failed','lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetIds':_0x572130}});}throw menuFailure(_0x41ba09,_0x4ff36f,{'stage':_0x3963f5(0x18d),'succeeded':_0x266247['absentIds']['map'](_0xacfaab=>({'id':_0xacfaab,'deleted':!![]})),'failed':{'targetIds':_0x572130,'expectedCount':_0x572130[_0x3963f5(0x139)],'reportedDeletedCount':_0x19ba5e,'absentIds':_0x266247[_0x3963f5(0x154)],'remainingIds':_0x266247[_0x3963f5(0x16d)]},'warnings':_0x1a0451,'verification':verificationFromOutcome(_0x266247)});}let _0x4b8516;try{_0x4b8516=await readDeleteOutcome(_0x1fe02e,_0x572130);}catch(_0x3d14ad){const _0x187d65=describeMenuErrorCause(_0x3d14ad,_0x3963f5(0x19c),_0x478be3),_0x4fb2a7=asVerificationError(_0x3d14ad,'Batch\x20delete\x20request\x20for\x20menu\x20'+_0x478be3+_0x3963f5(0x15b));throw menuFailure(_0x4fb2a7,_0x4ff36f,{'stage':_0x3963f5(0x15e),'succeeded':_0x572130[_0x3963f5(0x16b)](_0x53ce29=>({'id':_0x53ce29,'deleteRequested':!![]})),'failed':{'id':_0x478be3,'targetIds':_0x572130,'targetIdsAbsent':_0x3963f5(0x1a6),..._0x187d65},'warnings':[_0x3963f5(0x17d)],'verification':{'status':'failed','lookupCommand':_0x3963f5(0x13c),'targetIds':_0x572130}});}if(_0x4b8516[_0x3963f5(0x16d)][_0x3963f5(0x139)]>0x0){const _0x227941=menuError(_0x3963f5(0x192),_0x3963f5(0x19b)+_0x4b8516[_0x3963f5(0x16d)][_0x3963f5(0x18c)](',\x20')+'.',_0x3963f5(0x14c));throw menuFailure(_0x227941,_0x4ff36f,{'stage':'verification','succeeded':_0x572130[_0x3963f5(0x16b)](_0x27c3ef=>({'id':_0x27c3ef,'deleteRequested':!![]})),'failed':{'id':_0x478be3,'targetIds':_0x572130,'absentIds':_0x4b8516[_0x3963f5(0x154)],'remainingIds':_0x4b8516[_0x3963f5(0x16d)]},'warnings':[_0x3963f5(0x1a2)],'verification':verificationFromOutcome(_0x4b8516)});}const _0x380ce0=_0x572130[_0x3963f5(0x16b)](_0x1b2c59=>({'id':_0x1b2c59,'deleted':!![]})),_0x37b33c=mutationResult({..._0x4ff36f,'dryRun':![],'succeeded':_0x380ce0,'verification':{'checkedBy':_0x3963f5(0x152),'plannedSnapshotHash':_0x4ff36f[_0x3963f5(0x167)],'finalSnapshotHash':_0x4b8516['snapshot']['hash'],'reportedDeletedCount':_0x19ba5e,'targetAbsent':!_0x4b8516['snapshot'][_0x3963f5(0x142)][_0x3963f5(0x140)](_0x478be3),'allTargetsAbsent':!![],'targetIds':_0x572130}});return{'ok':!![],'data':_0x37b33c,'message':_0x3963f5(0x153)+_0x380ce0[_0x3963f5(0x139)]+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x478be3+'.'};}};async function readDeleteOutcome(_0x378328,_0x2b0d3c){const _0x143ca2=a102_0x45adbd,_0x37e321=await fetchMenuSnapshot(_0x378328[_0x143ca2(0x13e)],_0x378328[_0x143ca2(0x188)]);return{'snapshot':_0x37e321,'absentIds':_0x2b0d3c[_0x143ca2(0x13b)](_0x201f03=>!_0x37e321[_0x143ca2(0x142)][_0x143ca2(0x140)](_0x201f03)),'remainingIds':_0x2b0d3c['filter'](_0x31158e=>_0x37e321['byId'][_0x143ca2(0x140)](_0x31158e))};}function verificationFromOutcome(_0x41ca47){const _0x190e5b=a102_0x45adbd;return{'checkedBy':_0x190e5b(0x152),'absentIds':_0x41ca47[_0x190e5b(0x154)],'remainingIds':_0x41ca47['remainingIds']};}function validateDeleteDryRunInput(_0x11e896){const _0x2a2fa1=a102_0x45adbd;validateExactId(_0x11e896);if(!hasFlag(_0x11e896,_0x2a2fa1(0x158))||!_0x11e896[_0x2a2fa1(0x15f)](_0x2a2fa1(0x158))['trim']())throw CliErrors['flagMissing'](_0x2a2fa1(0x158),_0x2a2fa1(0x163));if(hasFlag(_0x11e896,'plan'))throw CliErrors[_0x2a2fa1(0x159)]('--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.');}function validateDeleteExecuteInput(_0xbb0680){const _0x52b3d9=a102_0x45adbd;if(!hasFlag(_0xbb0680,_0x52b3d9(0x19e))||!_0xbb0680[_0x52b3d9(0x15f)]('plan')[_0x52b3d9(0x183)]())throw CliErrors[_0x52b3d9(0x185)](_0x52b3d9(0x19e),'--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.');const _0x1b6919=['id',_0x52b3d9(0x193),_0x52b3d9(0x158),'expect-parent-id',_0x52b3d9(0x182),'expected-children-count'][_0x52b3d9(0x13b)](_0x34df39=>hasFlag(_0xbb0680,_0x34df39));if(_0x1b6919[_0x52b3d9(0x139)]>0x0)throw CliErrors[_0x52b3d9(0x159)](_0x52b3d9(0x1ad)+_0x1b6919[_0x52b3d9(0x16b)](_0x2c4005=>'--'+_0x2c4005)[_0x52b3d9(0x18c)](',\x20')+'.');}async function buildDeletePlan(_0xed320a){const _0x24e1a6=a102_0x45adbd,_0x2e8bf1=validateExactId(_0xed320a),_0x1e0b68=await fetchMutationSnapshot(_0xed320a,_0x24e1a6(0x198),_0x2e8bf1),_0x52e9d4=requireMenu(_0x1e0b68,_0x2e8bf1);assertExpectedState(_0xed320a,_0x52e9d4);const _0x5cc6b1=_0xed320a[_0x24e1a6(0x1a0)](_0x24e1a6(0x193));let _0x4cc959;if(_0x5cc6b1){if(_0x52e9d4[_0x24e1a6(0x150)][_0x24e1a6(0x183)]()['toLowerCase']()!=='folder')throw menuError('menu_recursive_requires_folder',_0x24e1a6(0x176)+_0x52e9d4['id']+_0x24e1a6(0x1ab)+(_0x52e9d4[_0x24e1a6(0x150)]||_0x24e1a6(0x155))+_0x24e1a6(0x1aa));_0x4cc959=collectDeleteTargets(_0x1e0b68,_0x52e9d4),_0x4cc959[_0x24e1a6(0x19d)](_0x397dd3=>assertDeleteSafety(_0x397dd3,!![]));}else assertDeleteSafety(_0x52e9d4),_0x4cc959=[_0x52e9d4];assertNoSharedPages(_0x1e0b68,_0x4cc959);const _0x2c402e=_0x4cc959['map'](_0x482152=>_0x482152['id']),_0x3def5a=cascadeForTargets(_0x4cc959),_0x1920a6=_0x3def5a['pages'][_0x24e1a6(0x139)]>0x0?[_0x24e1a6(0x160)]:[];return mutationResult({'operation':_0x24e1a6(0x144),'selector':{'id':_0x2e8bf1,'recursive':_0x5cc6b1},'before':_0x52e9d4,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x24e1a6(0x143),'method':_0x24e1a6(0x15a),'path':_0x24e1a6(0x190),'body':{'idList':_0x2c402e}}],'targets':_0x4cc959,'deleteOrder':_0x2c402e,'snapshotHash':_0x1e0b68['hash'],'cascade':_0x3def5a,'warnings':_0x1920a6});}function assertDeleteSafety(_0x4108d5,_0x2f1b65=![]){const _0x4ba1bc=a102_0x45adbd,_0x518808=_0x4108d5[_0x4ba1bc(0x150)][_0x4ba1bc(0x183)]()[_0x4ba1bc(0x17f)]()===_0x4ba1bc(0x148);if(_0x4108d5[_0x4ba1bc(0x18f)]>0x0&&(!_0x2f1b65||!_0x518808))throw menuError('menu_non_empty',_0x4ba1bc(0x176)+_0x4108d5['id']+_0x4ba1bc(0x156)+_0x4108d5[_0x4ba1bc(0x18f)]+_0x4ba1bc(0x17b),_0x4ba1bc(0x17e)+_0x4108d5[_0x4ba1bc(0x162)][_0x4ba1bc(0x18c)](',\x20'));if(_0x518808&&_0x4108d5[_0x4ba1bc(0x17c)]!=null)throw menuError(_0x4ba1bc(0x16f),_0x4ba1bc(0x161)+_0x4108d5['id']+'\x20is\x20unexpectedly\x20bound\x20to\x20page\x20'+_0x4108d5['pageId']+_0x4ba1bc(0x147),_0x4ba1bc(0x179));if(!_0x518808)return;if(!_0x4108d5[_0x4ba1bc(0x157)])throw menuError('menu_folder_resources_invalid','Folder\x20'+_0x4108d5['id']+'\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.');if(_0x4108d5[_0x4ba1bc(0x141)][_0x4ba1bc(0x139)]>0x0)throw menuError(_0x4ba1bc(0x166),'Folder\x20'+_0x4108d5['id']+'\x20still\x20references\x20'+_0x4108d5[_0x4ba1bc(0x141)][_0x4ba1bc(0x139)]+'\x20resource\x20URL(s).',_0x4ba1bc(0x13f));}function collectDeleteTargets(_0x4f5170,_0x1b390){const _0x46068c=[],_0x3ae863=new Set(),_0x14935f=new Set(),_0x25230b=_0x59f536=>{const _0x14e985=a102_0x2a24;if(_0x3ae863[_0x14e985(0x140)](_0x59f536['id']))throw menuError(_0x14e985(0x16e),_0x14e985(0x151)+_0x59f536['id']+'.');if(_0x14935f['has'](_0x59f536['id']))return;_0x3ae863[_0x14e985(0x1a3)](_0x59f536['id']);for(const _0x1ea4a6 of _0x59f536['childrenIds']){const _0x40353e=_0x4f5170[_0x14e985(0x142)]['get'](_0x1ea4a6);if(!_0x40353e)throw menuError('menu_tree_invalid',_0x14e985(0x176)+_0x59f536['id']+_0x14e985(0x195)+_0x1ea4a6+'.');_0x25230b(_0x40353e);}_0x3ae863[_0x14e985(0x144)](_0x59f536['id']),_0x14935f['add'](_0x59f536['id']),_0x46068c[_0x14e985(0x14d)](_0x59f536);};return _0x25230b(_0x1b390),_0x46068c;}function assertDeleteTargetsComplete(_0x8913ab,_0x1c171e){const _0x43d508=a102_0x45adbd,_0x1c1ae3=requireMenu(_0x1c171e,_0x8913ab[_0x43d508(0x15c)]['id']);if(_0x8913ab[_0x43d508(0x193)]&&_0x1c1ae3[_0x43d508(0x150)][_0x43d508(0x183)]()['toLowerCase']()!==_0x43d508(0x148))throw menuError('menu_plan_invalid','Recursive\x20menu\x20delete\x20plan\x20root\x20'+_0x1c1ae3['id']+_0x43d508(0x164));const _0x500319=_0x8913ab['recursive']?collectDeleteTargets(_0x1c171e,_0x1c1ae3)['map'](_0x4b2e5a=>_0x4b2e5a['id']):[_0x1c1ae3['id']];if(JSON[_0x43d508(0x13d)](_0x8913ab[_0x43d508(0x14f)])!==JSON[_0x43d508(0x13d)](_0x500319))throw menuError('menu_plan_invalid',_0x43d508(0x187),_0x43d508(0x145));}function assertNoSharedPages(_0xfb8348,_0x1c00e8){const _0xb9f5e4=a102_0x45adbd,_0x155897=new Set(_0x1c00e8[_0xb9f5e4(0x16b)](_0x31b97c=>_0x31b97c['id'])),_0x24478b=new Set(_0x1c00e8[_0xb9f5e4(0x16b)](_0x4e7585=>_0x4e7585[_0xb9f5e4(0x17c)])[_0xb9f5e4(0x13b)](_0x31500a=>_0x31500a!=null));if(_0x24478b[_0xb9f5e4(0x174)]===0x0)return;const _0x10812e=_0xfb8348['menus'][_0xb9f5e4(0x13b)](_0x3605d7=>!_0x155897[_0xb9f5e4(0x140)](_0x3605d7['id'])&&_0x3605d7[_0xb9f5e4(0x17c)]!=null&&_0x24478b['has'](_0x3605d7[_0xb9f5e4(0x17c)]));if(_0x10812e[_0xb9f5e4(0x139)]===0x0)return;const _0x117b7f=_0x10812e['map'](_0x1ab10e=>'page\x20'+_0x1ab10e['pageId']+'\x20->\x20menu\x20'+_0x1ab10e['id'])[_0xb9f5e4(0x18c)](',\x20');throw menuError('menu_page_shared',_0xb9f5e4(0x1ac)+_0x117b7f+'.',_0xb9f5e4(0x171));}function assertCascadeMatchesPlan(_0x3cb3cd,_0x20cb3a){const _0xc41866=a102_0x45adbd,_0x492259=cascadeForTargets(_0x20cb3a);if(JSON[_0xc41866(0x13d)](_0x3cb3cd[_0xc41866(0x18a)])!==JSON[_0xc41866(0x13d)](_0x492259))throw menuError(_0xc41866(0x14b),'Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.');}function cascadeForTargets(_0xb7509f){const _0x1f62e4=a102_0x45adbd,_0x6c0e82=_0xb7509f['map'](_0x58c697=>_0x58c697['pageId'])['filter'](_0x1c2562=>_0x1c2562!=null)['filter']((_0x594869,_0x19c834,_0x5b0277)=>_0x5b0277[_0x1f62e4(0x186)](_0x594869)===_0x19c834);return{'pages':_0x6c0e82,'pageSchemaAffected':_0x6c0e82[_0x1f62e4(0x139)]>0x0};}function asMenuError(_0x116495){const _0x4971d7=a102_0x45adbd;return _0x116495 instanceof CliError?_0x116495:menuError(_0x4971d7(0x14b),_0x116495 instanceof Error?_0x116495[_0x4971d7(0x1a9)]:String(_0x116495));}