@lovrabet/rabetbase-cli 2.3.11-beta.1 → 2.3.12-beta.1

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 (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a93_0x4ac47d=a93_0x3dc5;function a93_0x3dc5(_0x2233db,_0x5deb64){_0x2233db=_0x2233db-0x120;const _0x1fe08e=a93_0x1fe0();let _0x3dc580=_0x1fe08e[_0x2233db];return _0x3dc580;}(function(_0x331e2f,_0x3f5822){const _0x46d5c3=a93_0x3dc5,_0x3b4073=_0x331e2f();while(!![]){try{const _0x59ee72=parseInt(_0x46d5c3(0x166))/0x1*(parseInt(_0x46d5c3(0x122))/0x2)+parseInt(_0x46d5c3(0x165))/0x3+-parseInt(_0x46d5c3(0x157))/0x4*(parseInt(_0x46d5c3(0x132))/0x5)+-parseInt(_0x46d5c3(0x139))/0x6+-parseInt(_0x46d5c3(0x174))/0x7*(parseInt(_0x46d5c3(0x15c))/0x8)+-parseInt(_0x46d5c3(0x123))/0x9*(-parseInt(_0x46d5c3(0x124))/0xa)+parseInt(_0x46d5c3(0x137))/0xb;if(_0x59ee72===_0x3f5822)break;else _0x3b4073['push'](_0x3b4073['shift']());}catch(_0x371967){_0x3b4073['push'](_0x3b4073['shift']());}}}(a93_0x1fe0,0x2e502));import a93_0x5ef091 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';function a93_0x1fe0(){const _0x5eaa9a=['\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','arch','445GzilUT','riskLevel','missing','format','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','2338853dmlGgV','log','1862340gIEzLu','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(none)','accessKey','currentApp','env','(no\x20file)','status','empty','✗\x20Expired','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','cookie','gray','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20doctor','(set\x20via\x20file,\x20length=','\x20\x20Merged\x20Config','(set,\x20length=','read','defaultApp','(default)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','keys','(not\x20set)','yellow','⚠\x20Empty\x20(treated\x20as\x20{})','message','length','108eEmUBW','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','apiDir','explicitAppName','\x20\x20Apps','632dWcGSO','\x20\x20Config\x20Files','\x20\x20Config\x20JSON','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','✗\x20Invalid\x20JSON','green','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','405873WYkEQZ','4VkpSHv','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','Project','\x20\x20─','pageSize','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','✗\x20Not\x20logged\x20in','appCode','\x20←\x20current','red','value','\x20\x20explicitAppName:\x20','12082TYuXiI','\x20(default)','slice','✓\x20Valid\x20JSON','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appcode','Global','\x20\x20runtimeDomain:\x20\x20\x20','109666xwUIaG','2277qsTGwY','2830sKnKzy','bold','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','✓\x20Valid','padEnd','apps','platform','locale','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source'];a93_0x1fe0=function(){return _0x5eaa9a;};return a93_0x1fe0();}import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x4b6235){const _0x3f1634=a93_0x3dc5,_0x147077=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3f1634(0x176)](0x0,0xa)+')':VERSION,_0x59d439=buildConfigFromFlags({}),_0x2fcef8=getCookie();console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x125)](CLI_BIN_NAME+_0x3f1634(0x149))),console[_0x3f1634(0x138)](a93_0x5ef091['gray']('─'[_0x3f1634(0x145)](0x32))),console[_0x3f1634(0x138)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x147077),console['log'](_0x3f1634(0x179)+process['version']),console[_0x3f1634(0x138)](_0x3f1634(0x136)+process[_0x3f1634(0x12b)]+'\x20'+process[_0x3f1634(0x131)]),console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x125)](_0x3f1634(0x15d))),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)[_0x3f1634(0x145)](0x1e)));const _0xed0f73=getGlobalConfigPath(),_0x10e5de=getProjectConfigPath();console[_0x3f1634(0x138)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xed0f73||a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x161)))),console[_0x3f1634(0x138)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x10e5de||a93_0x5ef091['gray'](_0x3f1634(0x161)))),console[_0x3f1634(0x138)](),console['log'](a93_0x5ef091[_0x3f1634(0x125)](_0x3f1634(0x15e))),console['log'](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)[_0x3f1634(0x145)](0x1e)));const _0x584056=(_0x3e78d3,_0x516924)=>{const _0x12f39d=_0x3f1634;if(!_0x516924){console[_0x12f39d(0x138)]('\x20\x20'+_0x3e78d3['padEnd'](0x11)+'\x20'+a93_0x5ef091[_0x12f39d(0x147)](_0x12f39d(0x140)));return;}const _0x526f43=inspectCliConfigJsonFile(_0x516924);if(_0x526f43[_0x12f39d(0x141)]==='ok')console[_0x12f39d(0x138)]('\x20\x20'+_0x3e78d3[_0x12f39d(0x129)](0x11)+'\x20'+a93_0x5ef091[_0x12f39d(0x163)](_0x12f39d(0x177)));else{if(_0x526f43[_0x12f39d(0x141)]===_0x12f39d(0x142))console[_0x12f39d(0x138)]('\x20\x20'+_0x3e78d3['padEnd'](0x11)+'\x20'+a93_0x5ef091[_0x12f39d(0x153)](_0x12f39d(0x154)));else _0x526f43[_0x12f39d(0x141)]===_0x12f39d(0x134)?console['log']('\x20\x20'+_0x3e78d3[_0x12f39d(0x129)](0x11)+'\x20'+a93_0x5ef091[_0x12f39d(0x147)]('(missing)')):(console[_0x12f39d(0x138)]('\x20\x20'+_0x3e78d3[_0x12f39d(0x129)](0x11)+'\x20'+a93_0x5ef091['red'](_0x12f39d(0x162))),console[_0x12f39d(0x138)]('\x20\x20'+''[_0x12f39d(0x129)](0x11)+'\x20'+a93_0x5ef091[_0x12f39d(0x171)](_0x526f43[_0x12f39d(0x155)])));}};_0x584056(_0x3f1634(0x120),_0xed0f73),_0x584056(_0x3f1634(0x169),_0x10e5de),console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x125)](_0x3f1634(0x14b))),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)['repeat'](0x1e))),console['log'](_0x3f1634(0x160)+(_0x59d439[_0x3f1634(0x16f)]||a93_0x5ef091['red'](_0x3f1634(0x152)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x59d439['env']),console[_0x3f1634(0x138)](_0x3f1634(0x167)+_0x59d439[_0x3f1634(0x12c)]),console['log'](_0x3f1634(0x126)+_0x59d439[_0x3f1634(0x159)]),console[_0x3f1634(0x138)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x59d439[_0x3f1634(0x14e)]||a93_0x5ef091['gray'](_0x3f1634(0x13c)))),console[_0x3f1634(0x138)](_0x3f1634(0x15f)+(_0x59d439[_0x3f1634(0x13e)]||a93_0x5ef091[_0x3f1634(0x147)]('(none)'))),console[_0x3f1634(0x138)](_0x3f1634(0x173)+(_0x59d439[_0x3f1634(0x15a)]||a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x13c)))),console[_0x3f1634(0x138)](_0x3f1634(0x12d)+(_0x59d439[_0x3f1634(0x135)]||a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16d)+DEFAULT_CONFIG_VALUES[_0x3f1634(0x135)]+')'))),console[_0x3f1634(0x138)](_0x3f1634(0x13b)+(_0x59d439[_0x3f1634(0x16b)]??a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x14f)))),console['log'](_0x3f1634(0x150)+_0x59d439[_0x3f1634(0x133)]),console[_0x3f1634(0x138)](_0x3f1634(0x164)+_0x59d439['verbose']),console['log'](_0x3f1634(0x144)+(_0x59d439[_0x3f1634(0x146)]?a93_0x5ef091[_0x3f1634(0x163)](_0x3f1634(0x14c)+_0x59d439[_0x3f1634(0x146)][_0x3f1634(0x156)]+')'):_0x2fcef8?a93_0x5ef091[_0x3f1634(0x163)](_0x3f1634(0x14a)+_0x2fcef8['length']+')'):a93_0x5ef091['gray']('(none)')));const _0x5a6e88=Object[_0x3f1634(0x151)](_0x59d439[_0x3f1634(0x12a)]);if(_0x5a6e88['length']>0x0){console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x125)](_0x3f1634(0x15b))),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)[_0x3f1634(0x145)](0x1e)));for(const _0x2d6c84 of _0x5a6e88){const _0x4a9df1=_0x59d439[_0x3f1634(0x12a)][_0x2d6c84],_0x396559=_0x2d6c84===_0x59d439[_0x3f1634(0x14e)],_0x34016f=_0x2d6c84===_0x59d439[_0x3f1634(0x13e)],_0x34ebf9=_0x34016f?a93_0x5ef091['green'](_0x3f1634(0x170)):'',_0x4af031=_0x396559?_0x3f1634(0x175):'';console['log']('\x20\x20'+_0x2d6c84+_0x4af031+_0x34ebf9),console['log'](_0x3f1634(0x13a)+_0x4a9df1[_0x3f1634(0x17a)]);const _0x2064b0=buildAppDoctorFields(_0x4a9df1,{'env':_0x59d439[_0x3f1634(0x13f)],'apiDir':_0x59d439['raw'][_0x3f1634(0x159)]||DEFAULT_CONFIG_VALUES[_0x3f1634(0x159)],'cookie':_0x59d439[_0x3f1634(0x146)]||_0x2fcef8||undefined,'accessKey':_0x59d439[_0x3f1634(0x13d)]});console[_0x3f1634(0x138)](_0x3f1634(0x16c)+_0x2064b0['env'][_0x3f1634(0x172)]+'\x20\x20'+a93_0x5ef091[_0x3f1634(0x147)]('('+_0x2064b0['env']['source']+')')),console[_0x3f1634(0x138)](_0x3f1634(0x130)+_0x2064b0[_0x3f1634(0x159)]['value']+'\x20\x20'+a93_0x5ef091['gray']('('+_0x2064b0[_0x3f1634(0x159)][_0x3f1634(0x12e)]+')'));const _0x447693=_0x2064b0['cookie'][_0x3f1634(0x172)]?a93_0x5ef091['green'](_0x3f1634(0x14c)+_0x2064b0[_0x3f1634(0x146)][_0x3f1634(0x172)][_0x3f1634(0x156)]+')'):a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x13c));console[_0x3f1634(0x138)](_0x3f1634(0x158)+_0x447693+'\x20\x20'+a93_0x5ef091['gray']('('+_0x2064b0[_0x3f1634(0x146)]['source']+')'));const _0x392c0d=_0x2064b0['accessKey'][_0x3f1634(0x172)]?a93_0x5ef091['green'](_0x3f1634(0x14c)+_0x2064b0[_0x3f1634(0x13d)]['value'][_0x3f1634(0x156)]+')'):a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x13c));console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x392c0d+'\x20\x20'+a93_0x5ef091[_0x3f1634(0x147)]('('+_0x2064b0['accessKey'][_0x3f1634(0x12e)]+')'));}}console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091['bold']('\x20\x20API\x20Endpoints')),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)['repeat'](0x1e))),console['log'](_0x3f1634(0x178)+getApiDomain()),console[_0x3f1634(0x138)](_0x3f1634(0x148)+getUserDomain()),console[_0x3f1634(0x138)](_0x3f1634(0x121)+getRuntimeDomain()),console[_0x3f1634(0x138)](),console[_0x3f1634(0x138)](a93_0x5ef091[_0x3f1634(0x125)]('\x20\x20Auth')),console['log'](a93_0x5ef091[_0x3f1634(0x147)](_0x3f1634(0x16a)[_0x3f1634(0x145)](0x1e)));if(_0x2fcef8){const _0x595a19=await getIsSessionValid();console[_0x3f1634(0x138)](_0x3f1634(0x12f)+(_0x595a19?a93_0x5ef091[_0x3f1634(0x163)](_0x3f1634(0x128)):a93_0x5ef091[_0x3f1634(0x171)](_0x3f1634(0x143))));}else console[_0x3f1634(0x138)](_0x3f1634(0x12f)+a93_0x5ef091[_0x3f1634(0x171)](_0x3f1634(0x16e)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x4ac47d(0x127),'command':'check','description':a93_0x4ac47d(0x168),'risk':a93_0x4ac47d(0x14d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a93_0x1f07cb=a93_0x36f4;(function(_0x464cf1,_0x510c3a){const _0x221862=a93_0x36f4,_0x29d27f=_0x464cf1();while(!![]){try{const _0x5bc851=-parseInt(_0x221862(0x1ea))/0x1*(parseInt(_0x221862(0x1b9))/0x2)+parseInt(_0x221862(0x1b2))/0x3*(-parseInt(_0x221862(0x1ef))/0x4)+parseInt(_0x221862(0x1db))/0x5+parseInt(_0x221862(0x1ee))/0x6*(-parseInt(_0x221862(0x1d0))/0x7)+-parseInt(_0x221862(0x1c4))/0x8*(parseInt(_0x221862(0x1b0))/0x9)+parseInt(_0x221862(0x1e9))/0xa*(parseInt(_0x221862(0x1ce))/0xb)+parseInt(_0x221862(0x1e2))/0xc;if(_0x5bc851===_0x510c3a)break;else _0x29d27f['push'](_0x29d27f['shift']());}catch(_0x4bd67c){_0x29d27f['push'](_0x29d27f['shift']());}}}(a93_0x5494,0x2286d));import a93_0x23fdcc from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a93_0x36f4(_0x2938dd,_0x40d519){_0x2938dd=_0x2938dd-0x199;const _0x549487=a93_0x5494();let _0x36f474=_0x549487[_0x2938dd];return _0x36f474;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a93_0x5494(){const _0x42ad5d=['21UNNwbr','gray','accessKey','riskLevel','locale','✗\x20Invalid\x20JSON','defaultApp','env','message','Global','\x20\x20explicitAppName:\x20','1392570UFVcPg','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','cookie','✓\x20Valid\x20JSON','doctor','\x20\x20Config\x20Files','appCode','2190444tiHEdP','missing','source','status','(none)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','yellow','40hMfAER','1MgGZjG','red','(not\x20set)','bold','404862NyyptV','627244IKEazh','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','repeat','format','(set\x20via\x20file,\x20length=','(set,\x20length=','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','raw','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','version','verbose','explicitAppName','\x20←\x20current','padEnd','\x20\x20\x20\x20accessKey:\x20\x20','platform','arch','(not\x20found)','length','101997nrVvrV','(default:\x20','3zwuiGu','green','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20(default)','311698oJWvie','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','✗\x20Expired','value','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','keys','24Lgntqv','log','\x20\x20Auth','check','unknown','\x20\x20Apps','\x20\x20Merged\x20Config','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20─','slice','631015hSfUnP','currentApp'];a93_0x5494=function(){return _0x42ad5d;};return a93_0x5494();}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(_0x164d5e){const _0x3befd2=a93_0x36f4,_0x3d18c1=GIT_COMMIT!==_0x3befd2(0x1c8)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3befd2(0x1cd)](0x0,0xa)+')':VERSION,_0x153215=buildConfigFromFlags({}),_0xccb00b=getCookie();console[_0x3befd2(0x1c5)](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](CLI_BIN_NAME+'\x20doctor')),console[_0x3befd2(0x1c5)](a93_0x23fdcc['gray']('─'[_0x3befd2(0x19d)](0x32))),console[_0x3befd2(0x1c5)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x3d18c1),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3befd2(0x1a6)]),console[_0x3befd2(0x1c5)](_0x3befd2(0x1a1)+process[_0x3befd2(0x1ac)]+'\x20'+process[_0x3befd2(0x1ad)]),console[_0x3befd2(0x1c5)](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1e0))),console['log'](a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e)));const _0x92bb25=getGlobalConfigPath(),_0x3bd432=getProjectConfigPath();console['log'](_0x3befd2(0x1a4)+(_0x92bb25||a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1ae)))),console[_0x3befd2(0x1c5)](_0x3befd2(0x1b5)+(_0x3bd432||a93_0x23fdcc['gray'](_0x3befd2(0x1ae)))),console[_0x3befd2(0x1c5)](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1bf))),console['log'](a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e)));const _0x23dbe2=(_0x14f925,_0x39cce9)=>{const _0x1c7ee3=_0x3befd2;if(!_0x39cce9){console['log']('\x20\x20'+_0x14f925[_0x1c7ee3(0x1aa)](0x11)+'\x20'+a93_0x23fdcc[_0x1c7ee3(0x1d1)]('(no\x20file)'));return;}const _0x5f2d15=inspectCliConfigJsonFile(_0x39cce9);if(_0x5f2d15[_0x1c7ee3(0x1e5)]==='ok')console[_0x1c7ee3(0x1c5)]('\x20\x20'+_0x14f925['padEnd'](0x11)+'\x20'+a93_0x23fdcc[_0x1c7ee3(0x1b3)](_0x1c7ee3(0x1de)));else{if(_0x5f2d15[_0x1c7ee3(0x1e5)]==='empty')console[_0x1c7ee3(0x1c5)]('\x20\x20'+_0x14f925[_0x1c7ee3(0x1aa)](0x11)+'\x20'+a93_0x23fdcc[_0x1c7ee3(0x1e8)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x5f2d15[_0x1c7ee3(0x1e5)]===_0x1c7ee3(0x1e3)?console['log']('\x20\x20'+_0x14f925[_0x1c7ee3(0x1aa)](0x11)+'\x20'+a93_0x23fdcc[_0x1c7ee3(0x1d1)]('(missing)')):(console['log']('\x20\x20'+_0x14f925[_0x1c7ee3(0x1aa)](0x11)+'\x20'+a93_0x23fdcc['red'](_0x1c7ee3(0x1d5))),console[_0x1c7ee3(0x1c5)]('\x20\x20'+''[_0x1c7ee3(0x1aa)](0x11)+'\x20'+a93_0x23fdcc[_0x1c7ee3(0x1eb)](_0x5f2d15[_0x1c7ee3(0x1d8)])));}};_0x23dbe2(_0x3befd2(0x1d9),_0x92bb25),_0x23dbe2('Project',_0x3bd432),console[_0x3befd2(0x1c5)](),console['log'](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1ca))),console[_0x3befd2(0x1c5)](a93_0x23fdcc['gray'](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e))),console[_0x3befd2(0x1c5)](_0x3befd2(0x1be)+(_0x153215[_0x3befd2(0x1e1)]||a93_0x23fdcc[_0x3befd2(0x1eb)](_0x3befd2(0x1ec)))),console['log'](_0x3befd2(0x1a2)+_0x153215[_0x3befd2(0x1d7)]),console['log'](_0x3befd2(0x19a)+_0x153215[_0x3befd2(0x1d4)]),console[_0x3befd2(0x1c5)](_0x3befd2(0x1b6)+_0x153215[_0x3befd2(0x1bb)]),console[_0x3befd2(0x1c5)](_0x3befd2(0x199)+(_0x153215[_0x3befd2(0x1d6)]||a93_0x23fdcc[_0x3befd2(0x1d1)]('(none)'))),console[_0x3befd2(0x1c5)](_0x3befd2(0x1e7)+(_0x153215[_0x3befd2(0x1cf)]||a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1e6)))),console['log'](_0x3befd2(0x1da)+(_0x153215[_0x3befd2(0x1a8)]||a93_0x23fdcc['gray'](_0x3befd2(0x1e6)))),console[_0x3befd2(0x1c5)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x153215[_0x3befd2(0x19e)]||a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1b1)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x3befd2(0x1c2)+(_0x153215['pageSize']??a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1bd)))),console[_0x3befd2(0x1c5)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x153215[_0x3befd2(0x1d3)]),console[_0x3befd2(0x1c5)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x153215[_0x3befd2(0x1a7)]),console[_0x3befd2(0x1c5)](_0x3befd2(0x1bc)+(_0x153215[_0x3befd2(0x1dd)]?a93_0x23fdcc[_0x3befd2(0x1b3)](_0x3befd2(0x1a0)+_0x153215[_0x3befd2(0x1dd)]['length']+')'):_0xccb00b?a93_0x23fdcc[_0x3befd2(0x1b3)](_0x3befd2(0x19f)+_0xccb00b[_0x3befd2(0x1af)]+')'):a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1e6))));const _0x4a51dc=Object[_0x3befd2(0x1c3)](_0x153215[_0x3befd2(0x1a5)]);if(_0x4a51dc['length']>0x0){console['log'](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1c9))),console['log'](a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e)));for(const _0x54cc56 of _0x4a51dc){const _0x3f8d6d=_0x153215[_0x3befd2(0x1a5)][_0x54cc56],_0x47e414=_0x54cc56===_0x153215[_0x3befd2(0x1d6)],_0x521904=_0x54cc56===_0x153215['currentApp'],_0x42fb77=_0x521904?a93_0x23fdcc['green'](_0x3befd2(0x1a9)):'',_0x72ec40=_0x47e414?_0x3befd2(0x1b8):'';console[_0x3befd2(0x1c5)]('\x20\x20'+_0x54cc56+_0x72ec40+_0x42fb77),console[_0x3befd2(0x1c5)](_0x3befd2(0x1f0)+_0x3f8d6d['appcode']);const _0x3702dc=buildAppDoctorFields(_0x3f8d6d,{'env':_0x153215[_0x3befd2(0x1d7)],'apiDir':_0x153215[_0x3befd2(0x1a3)][_0x3befd2(0x1bb)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x153215[_0x3befd2(0x1dd)]||_0xccb00b||undefined,'accessKey':_0x153215[_0x3befd2(0x1d2)]});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3702dc[_0x3befd2(0x1d7)]['value']+'\x20\x20'+a93_0x23fdcc[_0x3befd2(0x1d1)]('('+_0x3702dc['env'][_0x3befd2(0x1e4)]+')')),console[_0x3befd2(0x1c5)](_0x3befd2(0x1cb)+_0x3702dc[_0x3befd2(0x1bb)][_0x3befd2(0x1c1)]+'\x20\x20'+a93_0x23fdcc[_0x3befd2(0x1d1)]('('+_0x3702dc[_0x3befd2(0x1bb)][_0x3befd2(0x1e4)]+')'));const _0x51fbfb=_0x3702dc[_0x3befd2(0x1dd)][_0x3befd2(0x1c1)]?a93_0x23fdcc[_0x3befd2(0x1b3)](_0x3befd2(0x1a0)+_0x3702dc[_0x3befd2(0x1dd)][_0x3befd2(0x1c1)]['length']+')'):a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1e6));console[_0x3befd2(0x1c5)](_0x3befd2(0x19c)+_0x51fbfb+'\x20\x20'+a93_0x23fdcc[_0x3befd2(0x1d1)]('('+_0x3702dc[_0x3befd2(0x1dd)][_0x3befd2(0x1e4)]+')'));const _0x2c1b7d=_0x3702dc['accessKey']['value']?a93_0x23fdcc[_0x3befd2(0x1b3)](_0x3befd2(0x1a0)+_0x3702dc[_0x3befd2(0x1d2)][_0x3befd2(0x1c1)][_0x3befd2(0x1af)]+')'):a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1e6));console[_0x3befd2(0x1c5)](_0x3befd2(0x1ab)+_0x2c1b7d+'\x20\x20'+a93_0x23fdcc[_0x3befd2(0x1d1)]('('+_0x3702dc[_0x3befd2(0x1d2)][_0x3befd2(0x1e4)]+')'));}}console['log'](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1b7))),console['log'](a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e))),console[_0x3befd2(0x1c5)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x3befd2(0x1c5)](_0x3befd2(0x1dc)+getUserDomain()),console[_0x3befd2(0x1c5)](_0x3befd2(0x1b4)+getRuntimeDomain()),console[_0x3befd2(0x1c5)](),console[_0x3befd2(0x1c5)](a93_0x23fdcc[_0x3befd2(0x1ed)](_0x3befd2(0x1c6))),console['log'](a93_0x23fdcc[_0x3befd2(0x1d1)](_0x3befd2(0x1cc)[_0x3befd2(0x19d)](0x1e)));if(_0xccb00b){const _0x1ee6a5=await getIsSessionValid();console[_0x3befd2(0x1c5)](_0x3befd2(0x1ba)+(_0x1ee6a5?a93_0x23fdcc[_0x3befd2(0x1b3)]('✓\x20Valid'):a93_0x23fdcc[_0x3befd2(0x1eb)](_0x3befd2(0x1c0))));}else console['log'](_0x3befd2(0x1ba)+a93_0x23fdcc[_0x3befd2(0x1eb)](_0x3befd2(0x19b)));return console[_0x3befd2(0x1c5)](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x1f07cb(0x1df),'command':a93_0x1f07cb(0x1c7),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a94_0x4c7c00=a94_0x8c48;(function(_0x14fb75,_0x1aa6b6){const _0x196f63=a94_0x8c48,_0x1ceb45=_0x14fb75();while(!![]){try{const _0x3db051=parseInt(_0x196f63(0x1b0))/0x1+parseInt(_0x196f63(0x1c9))/0x2+-parseInt(_0x196f63(0x1cc))/0x3+parseInt(_0x196f63(0x1be))/0x4+-parseInt(_0x196f63(0x1ae))/0x5*(-parseInt(_0x196f63(0x1ac))/0x6)+-parseInt(_0x196f63(0x1c5))/0x7+-parseInt(_0x196f63(0x1af))/0x8*(-parseInt(_0x196f63(0x1cd))/0x9);if(_0x3db051===_0x1aa6b6)break;else _0x1ceb45['push'](_0x1ceb45['shift']());}catch(_0xb929d1){_0x1ceb45['push'](_0x1ceb45['shift']());}}}(a94_0x2bcd,0x2214b));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x8c48(_0x4bd69d,_0x262b64){_0x4bd69d=_0x4bd69d-0x1ac;const _0x2bcdf3=a94_0x2bcd();let _0x8c48d8=_0x2bcdf3[_0x4bd69d];return _0x8c48d8;}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x4c7c00(0x1b5),'type':a94_0x4c7c00(0x1c3),'required':!![],'description':a94_0x4c7c00(0x1b4)},FILEPATH_FLAG={'name':a94_0x4c7c00(0x1ce),'type':a94_0x4c7c00(0x1c3),'required':!![],'description':a94_0x4c7c00(0x1c0)},DOWNLOAD_FLAG={'name':a94_0x4c7c00(0x1ba),'type':a94_0x4c7c00(0x1b9),'description':a94_0x4c7c00(0x1ca)},LONG_TERM_FLAG={'name':a94_0x4c7c00(0x1bf),'type':a94_0x4c7c00(0x1b9),'description':a94_0x4c7c00(0x1b8)};function requireFilePath(_0x1165ff){const _0x32d05f=a94_0x4c7c00,_0x38e86c=_0x1165ff[_0x32d05f(0x1c4)]();if(!_0x38e86c)throw CliErrors['validation'](_0x32d05f(0x1bd));return _0x38e86c;}const fileUpload={'service':a94_0x4c7c00(0x1b5),'command':a94_0x4c7c00(0x1cb),'description':a94_0x4c7c00(0x1c7),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x57863a){const _0x44c14f=a94_0x4c7c00,_0x4384bd=requireDevelopmentUploadFile(_0x57863a[_0x44c14f(0x1b2)](_0x44c14f(0x1b5)),_0x44c14f(0x1c2));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x57863a[_0x44c14f(0x1bb)],'multipart':{'file':_0x4384bd}},'description':_0x44c14f(0x1c8)+_0x4384bd['path']+_0x44c14f(0x1c6)+_0x57863a[_0x44c14f(0x1bb)]};},async 'execute'(_0x1c2dd3){const _0x4b3268=a94_0x4c7c00,_0x12f1c5=requireDevelopmentUploadFile(_0x1c2dd3['str'](_0x4b3268(0x1b5)),'File'),_0xb7cf50=await uploadDevelopmentFile(_0x1c2dd3[_0x4b3268(0x1bb)],_0x12f1c5[_0x4b3268(0x1b1)]);return{'ok':!![],'data':_0xb7cf50,'message':_0xb7cf50[_0x4b3268(0x1ad)]?_0x4b3268(0x1c1)+_0xb7cf50['filePath']+_0x4b3268(0x1bc):_0x4b3268(0x1b3)};}},fileQueryUrl={'service':a94_0x4c7c00(0x1b5),'command':a94_0x4c7c00(0x1b7),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1f37c1){const _0x4b3212=a94_0x4c7c00,_0x16808e=requireFilePath(_0x1f37c1['str'](_0x4b3212(0x1ce))),_0x2491b0=await queryDevelopmentFileUrl(_0x16808e,{'download':_0x1f37c1[_0x4b3212(0x1b6)](_0x4b3212(0x1ba)),'longTerm':_0x1f37c1['bool']('long-term')});return{'ok':!![],'data':_0x2491b0};}};function a94_0x2bcd(){const _0x3f4853=['.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filePath\x20is\x20required.','848868qZXVOK','long-term','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Uploaded\x20file:\x20','File','string','trim','1796963ZTjuxN','\x20to\x20development\x20app\x20','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Preview:\x20upload\x20','242614WfzdWg','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','upload','575163DeJyig','9erLRgC','filepath','725430lyWSNk','filePath','5ELvJZA','384712aoTPXQ','85507GIFipF','path','str','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','bool','query-url','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','boolean','download','appCode'];a94_0x2bcd=function(){return _0x3f4853;};return a94_0x2bcd();}export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ function a94_0x360f(_0x6a4dcd,_0x22d30a){_0x6a4dcd=_0x6a4dcd-0x198;const _0x5d60dd=a94_0x5d60();let _0x360fb1=_0x5d60dd[_0x6a4dcd];return _0x360fb1;}const a94_0x1dffe5=a94_0x360f;(function(_0x593dc4,_0x1c4cf7){const _0x42b15e=a94_0x360f,_0x54196c=_0x593dc4();while(!![]){try{const _0x22f7dd=parseInt(_0x42b15e(0x1a2))/0x1+parseInt(_0x42b15e(0x19c))/0x2+parseInt(_0x42b15e(0x1a8))/0x3+-parseInt(_0x42b15e(0x1ac))/0x4*(parseInt(_0x42b15e(0x1ad))/0x5)+-parseInt(_0x42b15e(0x19b))/0x6+-parseInt(_0x42b15e(0x1b3))/0x7+-parseInt(_0x42b15e(0x198))/0x8*(parseInt(_0x42b15e(0x1a5))/0x9);if(_0x22f7dd===_0x1c4cf7)break;else _0x54196c['push'](_0x54196c['shift']());}catch(_0x217fb5){_0x54196c['push'](_0x54196c['shift']());}}}(a94_0x5d60,0x83125));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x5d60(){const _0x4840d5=['3151368UDOTTZ','1950496qJmOLj','/smartapi/common/uploadFile','path','validation','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filepath','881329JQbRSP','filePath','string','38169MRKiib','query-url','upload','696276PLMtwc','appCode','File','read','380eNIlpL','875mFZOaY','file','trim','POST','boolean','bool','4724356TqLOdP','long-term','632BVnGKV','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references'];a94_0x5d60=function(){return _0x4840d5;};return a94_0x5d60();}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x1dffe5(0x1ae),'type':a94_0x1dffe5(0x1a4),'required':!![],'description':a94_0x1dffe5(0x199)},FILEPATH_FLAG={'name':a94_0x1dffe5(0x1a1),'type':a94_0x1dffe5(0x1a4),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':'download','type':'boolean','description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a94_0x1dffe5(0x1b4),'type':a94_0x1dffe5(0x1b1),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x15f717){const _0x582e4c=a94_0x1dffe5,_0x270764=_0x15f717[_0x582e4c(0x1af)]();if(!_0x270764)throw CliErrors[_0x582e4c(0x19f)]('filePath\x20is\x20required.');return _0x270764;}const fileUpload={'service':'file','command':a94_0x1dffe5(0x1a7),'description':a94_0x1dffe5(0x19a),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x21b3cc){const _0x3e5fb9=a94_0x1dffe5,_0x164875=requireDevelopmentUploadFile(_0x21b3cc['str'](_0x3e5fb9(0x1ae)),'File');return{'method':_0x3e5fb9(0x1b0),'url':_0x3e5fb9(0x19d),'body':{'appCode':_0x21b3cc[_0x3e5fb9(0x1a9)],'multipart':{'file':_0x164875}},'description':'Preview:\x20upload\x20'+_0x164875[_0x3e5fb9(0x19e)]+'\x20to\x20development\x20app\x20'+_0x21b3cc[_0x3e5fb9(0x1a9)]};},async 'execute'(_0x2f51e4){const _0x59af9c=a94_0x1dffe5,_0x253b17=requireDevelopmentUploadFile(_0x2f51e4['str']('file'),_0x59af9c(0x1aa)),_0x689d4d=await uploadDevelopmentFile(_0x2f51e4[_0x59af9c(0x1a9)],_0x253b17[_0x59af9c(0x19e)]);return{'ok':!![],'data':_0x689d4d,'message':_0x689d4d['filePath']?'Uploaded\x20file:\x20'+_0x689d4d[_0x59af9c(0x1a3)]+_0x59af9c(0x1a0):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a94_0x1dffe5(0x1ae),'command':a94_0x1dffe5(0x1a6),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a94_0x1dffe5(0x1ab),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x22f034){const _0xe98d12=a94_0x1dffe5,_0x42b06e=requireFilePath(_0x22f034['str'](_0xe98d12(0x1a1))),_0x305bde=await queryDevelopmentFileUrl(_0x42b06e,{'download':_0x22f034['bool']('download'),'longTerm':_0x22f034[_0xe98d12(0x1b2)](_0xe98d12(0x1b4))});return{'ok':!![],'data':_0x305bde};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a95_0x539664=a95_0x4349;function a95_0x4349(_0x57dabe,_0x48effd){_0x57dabe=_0x57dabe-0x1aa;const _0x1ae413=a95_0x1ae4();let _0x43494f=_0x1ae413[_0x57dabe];return _0x43494f;}(function(_0x1e09b9,_0x1ed08e){const _0x37b0ae=a95_0x4349,_0x23452b=_0x1e09b9();while(!![]){try{const _0x1ce456=-parseInt(_0x37b0ae(0x1d8))/0x1+parseInt(_0x37b0ae(0x1d6))/0x2+parseInt(_0x37b0ae(0x1b5))/0x3+-parseInt(_0x37b0ae(0x1c9))/0x4+parseInt(_0x37b0ae(0x1ce))/0x5*(-parseInt(_0x37b0ae(0x1b9))/0x6)+parseInt(_0x37b0ae(0x1cc))/0x7*(parseInt(_0x37b0ae(0x1b0))/0x8)+-parseInt(_0x37b0ae(0x1d2))/0x9;if(_0x1ce456===_0x1ed08e)break;else _0x23452b['push'](_0x23452b['shift']());}catch(_0x24a965){_0x23452b['push'](_0x23452b['shift']());}}}(a95_0x1ae4,0xa928b));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(_0x5dcd31){return{'appCode':_0x5dcd31,'appName':_0x5dcd31};}function writeInitConfig(_0x40df12,_0x539854,_0x5083e7){const _0x3151fa=a95_0x4349,_0x450dc6=resolveWriteConfigPath(_0x40df12),_0x7fb571=buildCanonicalProjectConfig({},{'appCodes':_0x539854['map'](_0x4a82ec=>_0x4a82ec['appCode']),'env':_0x5083e7,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3151fa(0x1d7)]()}});writeConfigFile(_0x450dc6,_0x7fb571);const _0x247b36=_0x40df12===_0x3151fa(0x1d1)?_0x3151fa(0x1d1):'project';console[_0x3151fa(0x1af)](_0x3151fa(0x1c7)+_0x247b36+_0x3151fa(0x1ab)),console[_0x3151fa(0x1af)](_0x3151fa(0x1ad)+_0x539854[_0x3151fa(0x1b4)](_0x47c354=>_0x47c354['appCode'])[_0x3151fa(0x1aa)](',\x20')),console[_0x3151fa(0x1af)](_0x3151fa(0x1bb)+_0x7fb571['defaultApp']),console[_0x3151fa(0x1af)](_0x3151fa(0x1bc)+_0x7fb571[_0x3151fa(0x1bd)]),console[_0x3151fa(0x1af)](_0x3151fa(0x1da)+_0x450dc6);}function a95_0x1ae4(){const _0x5b959f=['validation','string','nonInteractive','Auto-confirm\x20prompts','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','bool','flagMissing','valid','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','\x0a✓\x20Successfully\x20initialized\x20','yes','1879232cDHgQl','appcode','production','53893PCZMXI','some','751885qnenOz','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','../../commands/project/init.js','global','5302674toUIij','Write\x20to\x20global\x20config\x20instead\x20of\x20project','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','str','2242766hSyWLf','toLocaleString','1058974hQJdAy','custom','\x20\x20Config:\x20','join','\x20config','App\x20code\x20to\x20initialize\x20with','\x20\x20Apps:\x20','project','log','1416elvlLN','boolean','message','Usage:\x20','map','3686997wYHVkw','cwd','run','write','36ibCnPt','init','\x20\x20Default:\x20','\x20\x20Env:\x20','env'];a95_0x1ae4=function(){return _0x5b959f;};return a95_0x1ae4();}async function runSmartInit(_0x38be97){const _0x10739e=a95_0x4349,_0x182fa4=process[_0x10739e(0x1b6)](),_0x3d6262=_0x38be97['bool'](_0x10739e(0x1d1))?_0x10739e(0x1d1):'project',_0x21fa0b=_0x38be97[_0x10739e(0x1d5)](_0x10739e(0x1bd))||_0x10739e(0x1cb),_0x1079d9=_0x38be97['str'](_0x10739e(0x1ca))||undefined,_0x33934c=_0x38be97['bool'](_0x10739e(0x1ae));if(_0x33934c){const {initConfig:_0x223bea}=await import(_0x10739e(0x1d0));return _0x223bea({'appcode':_0x1079d9,'env':_0x21fa0b,'autoYes':_0x38be97[_0x10739e(0x1c3)]('yes')});}if(_0x3d6262===_0x10739e(0x1ae)){const _0x2fbc97=existsSync(resolve(_0x182fa4,NEW_CONFIG_NAME)),_0x153ce1=LEGACY_CONFIG_NAMES[_0x10739e(0x1cd)](_0x200111=>existsSync(resolve(_0x182fa4,_0x200111)));if(_0x153ce1&&!_0x2fbc97)return console[_0x10739e(0x1af)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x38be97['nonInteractive'],{'yes':_0x38be97[_0x10739e(0x1c3)](_0x10739e(0x1c8))});if(_0x2fbc97)throw CliErrors[_0x10739e(0x1be)](_0x10739e(0x1c6),'Use\x20`'+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x1079d9){const _0x367ae3=validateAppcode(_0x1079d9);if(!_0x367ae3[_0x10739e(0x1c5)])throw CliErrors[_0x10739e(0x1be)](_0x367ae3[_0x10739e(0x1b2)]);writeInitConfig(_0x3d6262,[syntheticApp(_0x1079d9)],_0x21fa0b);return;}if(_0x38be97[_0x10739e(0x1c0)])throw CliErrors[_0x10739e(0x1c4)]('appcode',_0x10739e(0x1b3)+CLI_BIN_NAME+_0x10739e(0x1c2));const _0x4f53a5=getCookie(),_0x2dafec=await selectMultipleApps(_0x4f53a5),_0x30fdce=_0x2dafec===_0x10739e(0x1d9)?[syntheticApp(await promptCustomAppcode())]:_0x2dafec;writeInitConfig(_0x3d6262,_0x30fdce,_0x21fa0b);}const initFlags=[{'name':a95_0x539664(0x1d1),'type':a95_0x539664(0x1b1),'description':a95_0x539664(0x1d3),'default':![]},{'name':a95_0x539664(0x1bd),'type':'string','description':'Target\x20environment','default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a95_0x539664(0x1bf),'description':a95_0x539664(0x1ac)},{'name':a95_0x539664(0x1ae),'type':a95_0x539664(0x1b1),'description':a95_0x539664(0x1d4),'default':![]},{'name':a95_0x539664(0x1c8),'type':a95_0x539664(0x1b1),'description':a95_0x539664(0x1c1),'default':![]}];export const initDefinitions=[{'service':a95_0x539664(0x1ba),'command':a95_0x539664(0x1b7),'description':a95_0x539664(0x1cf),'risk':a95_0x539664(0x1b8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x46a68f){return await runSmartInit(_0x46a68f),{'ok':!![]};}}];
1
+ const a95_0x22b97a=a95_0x1182;(function(_0x2eddc5,_0x6f44ad){const _0x553638=a95_0x1182,_0x389c60=_0x2eddc5();while(!![]){try{const _0x965fb4=-parseInt(_0x553638(0x1a7))/0x1+parseInt(_0x553638(0x1b6))/0x2*(parseInt(_0x553638(0x1af))/0x3)+parseInt(_0x553638(0x1c6))/0x4+-parseInt(_0x553638(0x1b0))/0x5*(-parseInt(_0x553638(0x1a8))/0x6)+parseInt(_0x553638(0x19e))/0x7+parseInt(_0x553638(0x1a5))/0x8*(-parseInt(_0x553638(0x1bb))/0x9)+-parseInt(_0x553638(0x1c0))/0xa;if(_0x965fb4===_0x6f44ad)break;else _0x389c60['push'](_0x389c60['shift']());}catch(_0x5d3458){_0x389c60['push'](_0x389c60['shift']());}}}(a95_0x3384,0x6e49d));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a95_0x3384(){const _0x4b5c30=['message','log','13580110GvEcGj','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','string','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','检测到旧配置文件,正在自动升级...\x0a','yes','2315352ShasNo','project','Use\x20`','write','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','cwd','appCode','Auto-confirm\x20prompts','some','4791717thhMMj','\x20\x20Env:\x20','appcode','Usage:\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','validation','Write\x20to\x20global\x20config\x20instead\x20of\x20project','16nYJqkF','../../commands/project/init.js','763147DnIVpC','6sQPPEq','toLocaleString','\x20\x20Config:\x20','defaultApp','\x20\x20Apps:\x20','flagMissing','global','213SxehKa','2123815DWSFup','nonInteractive','bool','boolean','valid','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','25006jLOqFz','Target\x20environment','str','map','production','13257OUcLbE','custom','join'];a95_0x3384=function(){return _0x4b5c30;};return a95_0x3384();}import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';function a95_0x1182(_0x29b96a,_0x4a06c3){_0x29b96a=_0x29b96a-0x197;const _0x3384ab=a95_0x3384();let _0x1182a7=_0x3384ab[_0x29b96a];return _0x1182a7;}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(_0x253806){return{'appCode':_0x253806,'appName':_0x253806};}function writeInitConfig(_0x223306,_0x5e64c0,_0x42f0f4){const _0x4639d2=a95_0x1182,_0xfb03dd=resolveWriteConfigPath(_0x223306),_0xe75d9b=buildCanonicalProjectConfig({},{'appCodes':_0x5e64c0[_0x4639d2(0x1b9)](_0x1266a7=>_0x1266a7[_0x4639d2(0x19b)]),'env':_0x42f0f4,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x4639d2(0x1a9)]()}});writeConfigFile(_0xfb03dd,_0xe75d9b);const _0x5c2118=_0x223306==='global'?_0x4639d2(0x1ae):'project';console['log']('\x0a✓\x20Successfully\x20initialized\x20'+_0x5c2118+'\x20config'),console[_0x4639d2(0x1bf)](_0x4639d2(0x1ac)+_0x5e64c0[_0x4639d2(0x1b9)](_0x26a7ea=>_0x26a7ea[_0x4639d2(0x19b)])[_0x4639d2(0x1bd)](',\x20')),console[_0x4639d2(0x1bf)]('\x20\x20Default:\x20'+_0xe75d9b[_0x4639d2(0x1ab)]),console[_0x4639d2(0x1bf)](_0x4639d2(0x19f)+_0xe75d9b['env']),console[_0x4639d2(0x1bf)](_0x4639d2(0x1aa)+_0xfb03dd);}async function runSmartInit(_0x58a0df){const _0x216db6=a95_0x1182,_0x1471e8=process[_0x216db6(0x19a)](),_0x57f607=_0x58a0df['bool'](_0x216db6(0x1ae))?_0x216db6(0x1ae):_0x216db6(0x1c7),_0x3a3fe2=_0x58a0df[_0x216db6(0x1b8)]('env')||'production',_0x277d20=_0x58a0df[_0x216db6(0x1b8)](_0x216db6(0x1a0))||undefined,_0x1b3a1f=_0x58a0df['bool']('project');if(_0x1b3a1f){const {initConfig:_0x48a2e0}=await import(_0x216db6(0x1a6));return _0x48a2e0({'appcode':_0x277d20,'env':_0x3a3fe2,'autoYes':_0x58a0df[_0x216db6(0x1b2)](_0x216db6(0x1c5))});}if(_0x57f607==='project'){const _0x3d6493=existsSync(resolve(_0x1471e8,NEW_CONFIG_NAME)),_0xb1995d=LEGACY_CONFIG_NAMES[_0x216db6(0x19d)](_0x12fb2d=>existsSync(resolve(_0x1471e8,_0x12fb2d)));if(_0xb1995d&&!_0x3d6493)return console[_0x216db6(0x1bf)](_0x216db6(0x1c4)),upgradeApp(_0x58a0df[_0x216db6(0x1b1)],{'yes':_0x58a0df[_0x216db6(0x1b2)](_0x216db6(0x1c5))});if(_0x3d6493)throw CliErrors[_0x216db6(0x1a3)](_0x216db6(0x1c3),_0x216db6(0x197)+CLI_BIN_NAME+_0x216db6(0x1c1));}if(_0x277d20){const _0x2a092b=validateAppcode(_0x277d20);if(!_0x2a092b[_0x216db6(0x1b4)])throw CliErrors[_0x216db6(0x1a3)](_0x2a092b[_0x216db6(0x1be)]);writeInitConfig(_0x57f607,[syntheticApp(_0x277d20)],_0x3a3fe2);return;}if(_0x58a0df['nonInteractive'])throw CliErrors[_0x216db6(0x1ad)](_0x216db6(0x1a0),_0x216db6(0x1a1)+CLI_BIN_NAME+_0x216db6(0x1b5));const _0x1a45b5=getCookie(),_0x416e9e=await selectMultipleApps(_0x1a45b5),_0x12e995=_0x416e9e===_0x216db6(0x1bc)?[syntheticApp(await promptCustomAppcode())]:_0x416e9e;writeInitConfig(_0x57f607,_0x12e995,_0x3a3fe2);}const initFlags=[{'name':'global','type':a95_0x22b97a(0x1b3),'description':a95_0x22b97a(0x1a4),'default':![]},{'name':'env','type':a95_0x22b97a(0x1c2),'description':a95_0x22b97a(0x1b7),'default':a95_0x22b97a(0x1ba),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a95_0x22b97a(0x1c2),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':a95_0x22b97a(0x1c7),'type':a95_0x22b97a(0x1b3),'description':a95_0x22b97a(0x1a2),'default':![]},{'name':a95_0x22b97a(0x1c5),'type':'boolean','description':a95_0x22b97a(0x19c),'default':![]}];export const initDefinitions=[{'service':'init','command':'run','description':a95_0x22b97a(0x199),'risk':a95_0x22b97a(0x198),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x259c0c){return await runSmartInit(_0x259c0c),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x4af1b2,_0x1e0316){const _0x381cbf=a96_0x23b8,_0x550380=_0x4af1b2();while(!![]){try{const _0x2dc552=-parseInt(_0x381cbf(0x96))/0x1*(parseInt(_0x381cbf(0x94))/0x2)+parseInt(_0x381cbf(0x92))/0x3*(parseInt(_0x381cbf(0x93))/0x4)+-parseInt(_0x381cbf(0x91))/0x5+-parseInt(_0x381cbf(0x8d))/0x6+parseInt(_0x381cbf(0x95))/0x7*(-parseInt(_0x381cbf(0x90))/0x8)+parseInt(_0x381cbf(0x97))/0x9*(parseInt(_0x381cbf(0x8f))/0xa)+parseInt(_0x381cbf(0x8e))/0xb;if(_0x2dc552===_0x1e0316)break;else _0x550380['push'](_0x550380['shift']());}catch(_0x39b575){_0x550380['push'](_0x550380['shift']());}}}(a96_0x16e1,0xb7c64));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a96_0x23b8(_0x42429b,_0x54584c){_0x42429b=_0x42429b-0x8d;const _0x16e1e9=a96_0x16e1();let _0x23b8a0=_0x16e1e9[_0x42429b];return _0x23b8a0;}function a96_0x16e1(){const _0x3f3311=['2CyFVaq','9DiCciu','4111482dXJRSP','42384595TnOqqb','3838580pMOdwN','9256fOgKyG','2823905KbhSoi','1403646prSIIs','4bCzyKd','1453714BQlcNC','7553butzsF'];a96_0x16e1=function(){return _0x3f3311;};return a96_0x16e1();}
1
+ (function(_0x5757b3,_0x9e5e6b){const _0x163961=a96_0x34b4,_0x1c43b6=_0x5757b3();while(!![]){try{const _0x4986a9=parseInt(_0x163961(0x8d))/0x1+parseInt(_0x163961(0x92))/0x2*(parseInt(_0x163961(0x8f))/0x3)+parseInt(_0x163961(0x8c))/0x4*(-parseInt(_0x163961(0x91))/0x5)+-parseInt(_0x163961(0x89))/0x6+parseInt(_0x163961(0x8a))/0x7+-parseInt(_0x163961(0x8b))/0x8*(parseInt(_0x163961(0x8e))/0x9)+-parseInt(_0x163961(0x88))/0xa*(-parseInt(_0x163961(0x90))/0xb);if(_0x4986a9===_0x9e5e6b)break;else _0x1c43b6['push'](_0x1c43b6['shift']());}catch(_0x5736e4){_0x1c43b6['push'](_0x1c43b6['shift']());}}}(a96_0x543b,0x9b15c));function a96_0x34b4(_0x6ad7e6,_0x22036a){_0x6ad7e6=_0x6ad7e6-0x88;const _0x543b15=a96_0x543b();let _0x34b4e9=_0x543b15[_0x6ad7e6];return _0x34b4e9;}import{issueReport}from'../../commands/issue/report.js';function a96_0x543b(){const _0x201da3=['810782xdMVzE','40hSscSB','16raedoO','448870XTjGnq','946953NMZMea','3798471lfJVBe','806388LGkYwl','388295mnisul','2lThAyv','80bSfajb','5672208xMGVrp'];a96_0x543b=function(){return _0x201da3;};return a96_0x543b();}export const issueDefinitions=[issueReport];
@@ -1 +1 @@
1
- const a97_0x4587eb=a97_0x5b82;(function(_0x5ebe7d,_0xbf357d){const _0x3b003d=a97_0x5b82,_0x11d3d8=_0x5ebe7d();while(!![]){try{const _0x1a9038=-parseInt(_0x3b003d(0x137))/0x1*(-parseInt(_0x3b003d(0x131))/0x2)+parseInt(_0x3b003d(0x12a))/0x3*(parseInt(_0x3b003d(0x125))/0x4)+-parseInt(_0x3b003d(0x13b))/0x5*(-parseInt(_0x3b003d(0x130))/0x6)+parseInt(_0x3b003d(0x135))/0x7*(parseInt(_0x3b003d(0x143))/0x8)+-parseInt(_0x3b003d(0x134))/0x9+-parseInt(_0x3b003d(0x128))/0xa+parseInt(_0x3b003d(0x123))/0xb*(parseInt(_0x3b003d(0x146))/0xc);if(_0x1a9038===_0xbf357d)break;else _0x11d3d8['push'](_0x11d3d8['shift']());}catch(_0x3a5e1f){_0x11d3d8['push'](_0x11d3d8['shift']());}}}(a97_0x41a4,0xb3c31));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x4587eb(0x142);function a97_0x5b82(_0x12df89,_0x197157){_0x12df89=_0x12df89-0x120;const _0x41a4bd=a97_0x41a4();let _0x5b8234=_0x41a4bd[_0x12df89];return _0x5b8234;}const NUDGE_SUPPRESSED_CODES=new Set([a97_0x4587eb(0x12f),'auth_required','config_missing',a97_0x4587eb(0x127),'unknown_command',a97_0x4587eb(0x13c),a97_0x4587eb(0x138),a97_0x4587eb(0x12e)]),defaultWriter=_0x14522a=>{const _0x1cc1e0=a97_0x4587eb;process[_0x1cc1e0(0x136)][_0x1cc1e0(0x129)](_0x14522a);};export function shouldNudgeForError(_0x268eba,_0x5de9c8){const _0x55914b=a97_0x4587eb;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x5de9c8[_0x55914b(0x139)]===_0x55914b(0x13e)&&_0x5de9c8['command']===_0x55914b(0x13f))return![];if(_0x268eba instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x55914b(0x122)](_0x268eba[_0x55914b(0x120)]);return!![];}export function printIssueReportNudgeForError(_0x246fce,_0x23ae47,_0x583e59=defaultWriter){if(!shouldNudgeForError(_0x246fce,_0x23ae47))return;const _0x5e3429=buildSuggestedTitle(_0x246fce,_0x23ae47);_0x583e59(formatNudge(_0x5e3429));}function buildSuggestedTitle(_0x3819fe,_0x372178){const _0x16d6b6=a97_0x4587eb,_0x1f9ed1=_0x3819fe instanceof Error?_0x3819fe[_0x16d6b6(0x12b)]:String(_0x3819fe),_0x864541=_0x1f9ed1[_0x16d6b6(0x12d)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x16d6b6(0x133)]()[_0x16d6b6(0x12c)](0x0,0x78)[_0x16d6b6(0x12d)](/"/g,'\x5c\x22'),_0x1abfa0=CLI_BIN_NAME+'\x20'+_0x372178['service']+'\x20'+_0x372178[_0x16d6b6(0x121)];return _0x864541[_0x16d6b6(0x132)]>0x0?_0x1abfa0+':\x20'+_0x864541:_0x1abfa0;}function a97_0x41a4(){const _0x30c51d=['write','6kKKxfN','message','slice','replace','network_error','cancelled','222702awwVfl','26nfjzvx','length','trim','12334869ytiZDi','10006381Qjkmph','stderr','12692cWcenD','validation_error','service','\x20bug?\x20Help\x20us\x20fix\x20it:','45pJhIeE','flag_missing','\x20\x20\x20\x20--title\x20\x22','issue','report','\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','RABETBASE_DISABLE_ISSUE_NUDGE','8EfWpzP','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','join','240PBzfBP','code','command','has','293392ZJAaKr','=1\x20to\x20silence\x20this\x20hint.','469924ifyBwu','\x20issue\x20report\x20\x5c','not_in_project','5900880khbKMe'];a97_0x41a4=function(){return _0x30c51d;};return a97_0x41a4();}function formatNudge(_0x4b6233){const _0x3ab501=a97_0x4587eb;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x3ab501(0x13a),'\x20\x20'+CLI_BIN_NAME+_0x3ab501(0x126),_0x3ab501(0x13d)+_0x4b6233+_0x3ab501(0x140),_0x3ab501(0x141),_0x3ab501(0x144),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x3ab501(0x124),''][_0x3ab501(0x145)]('\x0a');}
1
+ const a97_0x246db0=a97_0x13f4;(function(_0x42eea9,_0x593a33){const _0x141680=a97_0x13f4,_0x1e5073=_0x42eea9();while(!![]){try{const _0x41f855=parseInt(_0x141680(0x1a4))/0x1*(parseInt(_0x141680(0x1a6))/0x2)+parseInt(_0x141680(0x19b))/0x3*(parseInt(_0x141680(0x19e))/0x4)+-parseInt(_0x141680(0x1b1))/0x5+parseInt(_0x141680(0x1b0))/0x6*(parseInt(_0x141680(0x1a3))/0x7)+-parseInt(_0x141680(0x1ab))/0x8*(parseInt(_0x141680(0x1aa))/0x9)+-parseInt(_0x141680(0x1ae))/0xa+parseInt(_0x141680(0x1b7))/0xb;if(_0x41f855===_0x593a33)break;else _0x1e5073['push'](_0x1e5073['shift']());}catch(_0x3127a9){_0x1e5073['push'](_0x1e5073['shift']());}}}(a97_0x1a05,0x78c67));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set([a97_0x246db0(0x19d),a97_0x246db0(0x1b8),a97_0x246db0(0x1ad),a97_0x246db0(0x1a1),a97_0x246db0(0x1b9),a97_0x246db0(0x1bb),'validation_error',a97_0x246db0(0x1a5)]),defaultWriter=_0x286057=>{const _0xd4d222=a97_0x246db0;process[_0xd4d222(0x1b6)][_0xd4d222(0x1ba)](_0x286057);};export function shouldNudgeForError(_0x13acc7,_0x56e1d3){const _0x5d8e2d=a97_0x246db0;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x56e1d3[_0x5d8e2d(0x1ac)]===_0x5d8e2d(0x19f)&&_0x56e1d3[_0x5d8e2d(0x1a7)]===_0x5d8e2d(0x1af))return![];if(_0x13acc7 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x13acc7['code']);return!![];}function a97_0x1a05(){const _0x352284=['network_error','98JkAWfC','command','\x20bug?\x20Help\x20us\x20fix\x20it:','\x20issue\x20report\x20\x5c','3743892qkkRwO','16OUewXm','service','config_missing','7944500ihwoHa','report','48gJTMeE','272895uozvhl','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','Hit\x20a\x20','trim','length','stderr','9955341lDmkfW','auth_required','unknown_command','write','flag_missing','1839GfhwVR','\x20\x20\x20\x20--title\x20\x22','cancelled','1676anrDVj','issue','replace','not_in_project','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','615867fydXcf','6326LpBRdr'];a97_0x1a05=function(){return _0x352284;};return a97_0x1a05();}export function printIssueReportNudgeForError(_0x5d5c07,_0x264018,_0x5e3f50=defaultWriter){if(!shouldNudgeForError(_0x5d5c07,_0x264018))return;const _0x34d93b=buildSuggestedTitle(_0x5d5c07,_0x264018);_0x5e3f50(formatNudge(_0x34d93b));}function a97_0x13f4(_0x148638,_0x14599b){_0x148638=_0x148638-0x19b;const _0x1a0533=a97_0x1a05();let _0x13f4fd=_0x1a0533[_0x148638];return _0x13f4fd;}function buildSuggestedTitle(_0x30d49b,_0x453ff5){const _0x328aae=a97_0x246db0,_0x489742=_0x30d49b instanceof Error?_0x30d49b['message']:String(_0x30d49b),_0xe38ad6=_0x489742[_0x328aae(0x1a0)](/[\r\n]+/g,'\x20')[_0x328aae(0x1a0)](/\s+/g,'\x20')[_0x328aae(0x1b4)]()['slice'](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x25c5c1=CLI_BIN_NAME+'\x20'+_0x453ff5[_0x328aae(0x1ac)]+'\x20'+_0x453ff5['command'];return _0xe38ad6[_0x328aae(0x1b5)]>0x0?_0x25c5c1+':\x20'+_0xe38ad6:_0x25c5c1;}function formatNudge(_0x45f332){const _0x21ab67=a97_0x246db0;return['',_0x21ab67(0x1b3)+CLI_BIN_NAME+_0x21ab67(0x1a8),'\x20\x20'+CLI_BIN_NAME+_0x21ab67(0x1a9),_0x21ab67(0x19c)+_0x45f332+'\x22\x20\x5c',_0x21ab67(0x1b2),_0x21ab67(0x1a2),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.','']['join']('\x0a');}
@@ -1 +1 @@
1
- const a98_0x103b6e=a98_0xc9db;(function(_0x401b46,_0x29a5ad){const _0x1e5c61=a98_0xc9db,_0x2d9eaf=_0x401b46();while(!![]){try{const _0xa11371=-parseInt(_0x1e5c61(0xf9))/0x1+parseInt(_0x1e5c61(0xe3))/0x2+-parseInt(_0x1e5c61(0xe8))/0x3*(-parseInt(_0x1e5c61(0xe1))/0x4)+parseInt(_0x1e5c61(0xfa))/0x5+-parseInt(_0x1e5c61(0xe2))/0x6+parseInt(_0x1e5c61(0xf0))/0x7*(parseInt(_0x1e5c61(0xd6))/0x8)+-parseInt(_0x1e5c61(0xe9))/0x9;if(_0xa11371===_0x29a5ad)break;else _0x2d9eaf['push'](_0x2d9eaf['shift']());}catch(_0x4c3789){_0x2d9eaf['push'](_0x2d9eaf['shift']());}}}(a98_0x8d8f,0x9a8f4));function a98_0x8d8f(){const _0x328a4d=['apiError','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','truncated','join','description-file','4576RDvPVs','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','description','descriptionFilePath','redactions:\x20','compress','redactionKinds','truncated\x20from\x20','Issue\x20description\x20cannot\x20be\x20empty.','push','issue.description_redactions','24sRvHJn','7241256dPiPxH','1552672eFwSBb','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','issue.description_truncated','descriptionFile:\x20','issue.title','584049SAAAMw','4181454PBLEFj','length','message','redacted\x20','report','issue.description_redaction_kinds','issue.description','1484SsOgDV','descriptionSource:\x20','Issue\x20description\x20file\x20is\x20empty:\x20','truncated:\x20original\x20','filter','otel://','\x20bytes','trim','string','959173CpFROh','5990165NrHLsO','validation','str','Platform\x20issue\x20reported\x20(','Failed\x20to\x20report\x20platform\x20issue:\x20','file','title','write','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','One-line\x20issue\x20summary','redactionCount','flagMissing','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','originalBytes','POST','sanitize','issue','descriptionSource','\x20secret(s):\x20','issue.description_original_bytes','Platform\x20issue\x20reported'];a98_0x8d8f=function(){return _0x328a4d;};return a98_0x8d8f();}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';function a98_0xc9db(_0xbbe165,_0x570b25){_0xbbe165=_0xbbe165-0xd2;const _0x8d8fba=a98_0x8d8f();let _0xc9db63=_0x8d8fba[_0xbbe165];return _0xc9db63;}const DESCRIPTION_FILE_FLAG=a98_0x103b6e(0xd5);export const issueReport={'service':a98_0x103b6e(0x10a),'command':a98_0x103b6e(0xed),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a98_0x103b6e(0x101),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x103b6e(0xdb),'flags':[{'name':a98_0x103b6e(0x100),'type':a98_0x103b6e(0xf8),'required':!![],'description':a98_0x103b6e(0x103)},{'name':a98_0x103b6e(0xd8),'type':a98_0x103b6e(0xf8),'description':a98_0x103b6e(0x102)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x103b6e(0xf8),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x40f21d){const _0x13ad49=a98_0x103b6e,_0x6029d6=_0x40f21d['str'](_0x13ad49(0x100))['trim'](),_0x124a80=_0x40f21d[_0x13ad49(0xfc)]('description')['trim'](),_0x1ef6d8=_0x40f21d[_0x13ad49(0xfc)](DESCRIPTION_FILE_FLAG)[_0x13ad49(0xf7)]();if(!_0x6029d6)throw CliErrors[_0x13ad49(0x105)](_0x13ad49(0x100),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x58f7c9=_0x124a80[_0x13ad49(0xea)]>0x0,_0x48a485=_0x1ef6d8[_0x13ad49(0xea)]>0x0;if(_0x58f7c9===_0x48a485)throw CliErrors[_0x13ad49(0xfb)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x13ad49(0x110));if(_0x48a485){const _0x71db0f=resolve(process['cwd'](),_0x1ef6d8);if(!existsSync(_0x71db0f))throw CliErrors[_0x13ad49(0xfb)]('File\x20not\x20found:\x20'+_0x71db0f);}},async 'dryRun'(_0x1ef4d2){const _0x33f8a7=a98_0x103b6e,_0x4b229b=await prepareIssueReport(_0x1ef4d2);return{'method':_0x33f8a7(0x108),'url':_0x33f8a7(0xf5)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x4b229b[_0x33f8a7(0x100)],'issue.description':_0x4b229b[_0x33f8a7(0xd8)],'issue.description_original_bytes':_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0x107)],'issue.description_truncated':_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0xd3)],'issue.description_redactions':_0x4b229b[_0x33f8a7(0x109)]['redactionCount'],'issue.description_redaction_kinds':_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0xdc)][_0x33f8a7(0xd4)](',')}},'description':[_0x33f8a7(0xd7),_0x33f8a7(0xf1)+_0x4b229b[_0x33f8a7(0x10b)],_0x4b229b[_0x33f8a7(0xd9)]?_0x33f8a7(0xe6)+_0x4b229b[_0x33f8a7(0xd9)]:null,_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0xd3)]?_0x33f8a7(0xf3)+_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0x107)]+_0x33f8a7(0xf6):null,_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0x104)]>0x0?_0x33f8a7(0xda)+_0x4b229b[_0x33f8a7(0x109)][_0x33f8a7(0x104)]+'\x20('+_0x4b229b['sanitize'][_0x33f8a7(0xdc)][_0x33f8a7(0xd4)](',\x20')+')':null][_0x33f8a7(0xf4)](Boolean)[_0x33f8a7(0xd4)]('\x0a')};},async 'execute'(_0x47d80e){const _0x4fefc2=a98_0x103b6e,_0xfbd69b=await prepareIssueReport(_0x47d80e);try{await sendPlatformIssueCollectLog({'title':_0xfbd69b['title'],'description':_0xfbd69b[_0x4fefc2(0xd8)],'sanitize':{'originalBytes':_0xfbd69b[_0x4fefc2(0x109)][_0x4fefc2(0x107)],'truncated':_0xfbd69b[_0x4fefc2(0x109)][_0x4fefc2(0xd3)],'redactionCount':_0xfbd69b[_0x4fefc2(0x109)]['redactionCount'],'redactionKinds':_0xfbd69b[_0x4fefc2(0x109)][_0x4fefc2(0xdc)]}});}catch(_0x5acc7e){throw CliErrors[_0x4fefc2(0x10f)](_0x4fefc2(0xfe)+(_0x5acc7e instanceof Error?_0x5acc7e[_0x4fefc2(0xeb)]:String(_0x5acc7e)),_0x4fefc2(0x106));}return{'ok':!![],'message':buildResultMessage(_0xfbd69b[_0x4fefc2(0x109)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x4fefc2(0xe7),_0x4fefc2(0xef),_0x4fefc2(0x10d),_0x4fefc2(0xe5),_0x4fefc2(0xe0),_0x4fefc2(0xee)],'issue':{'title':_0xfbd69b[_0x4fefc2(0x100)],'descriptionLength':_0xfbd69b['description']['length'],'descriptionSource':_0xfbd69b[_0x4fefc2(0x10b)],..._0xfbd69b[_0x4fefc2(0xd9)]?{'descriptionFile':_0xfbd69b[_0x4fefc2(0xd9)]}:{},'sanitize':{'originalBytes':_0xfbd69b[_0x4fefc2(0x109)]['originalBytes'],'truncated':_0xfbd69b['sanitize'][_0x4fefc2(0xd3)],'redactions':_0xfbd69b[_0x4fefc2(0x109)][_0x4fefc2(0x104)],'redactionKinds':_0xfbd69b[_0x4fefc2(0x109)][_0x4fefc2(0xdc)]}}}};}};function buildResultMessage(_0x3bea32){const _0x40e8bc=a98_0x103b6e,_0x5f20e8=[];return _0x3bea32[_0x40e8bc(0xd3)]&&_0x5f20e8[_0x40e8bc(0xdf)](_0x40e8bc(0xdd)+_0x3bea32[_0x40e8bc(0x107)]+_0x40e8bc(0xf6)),_0x3bea32['redactionCount']>0x0&&_0x5f20e8[_0x40e8bc(0xdf)](_0x40e8bc(0xec)+_0x3bea32[_0x40e8bc(0x104)]+_0x40e8bc(0x10c)+_0x3bea32[_0x40e8bc(0xdc)]['join'](',\x20')),_0x5f20e8[_0x40e8bc(0xea)]===0x0?_0x40e8bc(0x10e):_0x40e8bc(0xfd)+_0x5f20e8[_0x40e8bc(0xd4)](';\x20')+')';}async function prepareIssueReport(_0x1fc349){const _0x4bb519=a98_0x103b6e,_0x60b474=_0x1fc349[_0x4bb519(0xfc)]('title')['trim'](),_0x21b473=_0x1fc349[_0x4bb519(0xfc)](_0x4bb519(0xd8)),_0x5cbf5f=_0x1fc349[_0x4bb519(0xfc)](DESCRIPTION_FILE_FLAG)[_0x4bb519(0xf7)]();if(!_0x5cbf5f){const _0x2e11ee=_0x21b473;if(!_0x2e11ee[_0x4bb519(0xf7)]())throw CliErrors['validation'](_0x4bb519(0xde),_0x4bb519(0xd2));const _0x1a6730=sanitizeIssueDescription(_0x2e11ee);return{'title':_0x60b474,'description':_0x1a6730[_0x4bb519(0xd8)],'descriptionSource':'inline','sanitize':_0x1a6730};}const _0x1d64ab=resolve(process['cwd'](),_0x5cbf5f),_0x3c92a1=await readFile(_0x1d64ab,'utf8');if(!_0x3c92a1[_0x4bb519(0xf7)]())throw CliErrors['validation'](_0x4bb519(0xf2)+_0x1d64ab,_0x4bb519(0xe4));const _0x2df4ae=sanitizeIssueDescription(_0x3c92a1);return{'title':_0x60b474,'description':_0x2df4ae[_0x4bb519(0xd8)],'descriptionSource':_0x4bb519(0xff),'descriptionFilePath':_0x1d64ab,'sanitize':_0x2df4ae};}
1
+ const a98_0x2f04ee=a98_0x2962;(function(_0x368429,_0x2ab753){const _0x2929a8=a98_0x2962,_0x14a47b=_0x368429();while(!![]){try{const _0x29c368=parseInt(_0x2929a8(0x1b0))/0x1+-parseInt(_0x2929a8(0x1aa))/0x2+-parseInt(_0x2929a8(0x1c0))/0x3*(-parseInt(_0x2929a8(0x1a5))/0x4)+parseInt(_0x2929a8(0x1bc))/0x5*(parseInt(_0x2929a8(0x194))/0x6)+parseInt(_0x2929a8(0x198))/0x7+-parseInt(_0x2929a8(0x1ca))/0x8*(-parseInt(_0x2929a8(0x1a7))/0x9)+-parseInt(_0x2929a8(0x1a3))/0xa;if(_0x29c368===_0x2ab753)break;else _0x14a47b['push'](_0x14a47b['shift']());}catch(_0x2050b6){_0x14a47b['push'](_0x14a47b['shift']());}}}(a98_0x3e71,0x1bb19));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_0x3e71(){const _0x57e94c=['issue.description','redactionKinds','1359760bbnNBQ','descriptionSource:\x20','20rgChew','Issue\x20description\x20cannot\x20be\x20empty.','36kdygDz','issue.description_redaction_kinds','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','436176YpfbsM','redacted\x20','cwd','Failed\x20to\x20report\x20platform\x20issue:\x20','One-line\x20issue\x20summary','Platform\x20issue\x20reported','97619wIFbRE','truncated:\x20original\x20','string','message','truncated\x20from\x20','sanitize','issue.description_redactions','issue','truncated','originalBytes','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Platform\x20issue\x20reported\x20(','73575aWKSNj','inline','write','filter','33486iKwouW','\x20secret(s):\x20','apiError','length','descriptionSource','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','join','str','compress','redactionCount','248328BPeWzC','issue.description_original_bytes','descriptionFilePath','report','title','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','42HblXkE','otel://','description','push','608293KenPzU','trim','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','validation','\x20bytes','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','description-file','File\x20not\x20found:\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'];a98_0x3e71=function(){return _0x57e94c;};return a98_0x3e71();}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x2f04ee(0x19e);function a98_0x2962(_0x4fe087,_0xb0776e){_0x4fe087=_0x4fe087-0x194;const _0x3e7118=a98_0x3e71();let _0x2962fb=_0x3e7118[_0x4fe087];return _0x2962fb;}export const issueReport={'service':a98_0x2f04ee(0x1b7),'command':a98_0x2f04ee(0x1cd),'description':a98_0x2f04ee(0x1cf),'risk':a98_0x2f04ee(0x1be),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x2f04ee(0x1c8),'flags':[{'name':a98_0x2f04ee(0x1ce),'type':a98_0x2f04ee(0x1b2),'required':!![],'description':a98_0x2f04ee(0x1ae)},{'name':a98_0x2f04ee(0x196),'type':a98_0x2f04ee(0x1b2),'description':a98_0x2f04ee(0x1a0)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x2f04ee(0x1b2),'description':a98_0x2f04ee(0x19d)}],async 'validate'(_0x4b0e4f){const _0x633268=a98_0x2f04ee,_0x28b12a=_0x4b0e4f['str']('title')[_0x633268(0x199)](),_0x2c7b22=_0x4b0e4f[_0x633268(0x1c7)](_0x633268(0x196))['trim'](),_0x356216=_0x4b0e4f[_0x633268(0x1c7)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x28b12a)throw CliErrors['flagMissing'](_0x633268(0x1ce),_0x633268(0x1c5));const _0x29005c=_0x2c7b22[_0x633268(0x1c3)]>0x0,_0x373bcc=_0x356216[_0x633268(0x1c3)]>0x0;if(_0x29005c===_0x373bcc)throw CliErrors['validation'](_0x633268(0x1ba),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x373bcc){const _0xd87af=resolve(process[_0x633268(0x1ac)](),_0x356216);if(!existsSync(_0xd87af))throw CliErrors['validation'](_0x633268(0x19f)+_0xd87af);}},async 'dryRun'(_0xfb3b64){const _0xb644e3=a98_0x2f04ee,_0x2132b3=await prepareIssueReport(_0xfb3b64);return{'method':'POST','url':_0xb644e3(0x195)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2132b3[_0xb644e3(0x1ce)],'issue.description':_0x2132b3[_0xb644e3(0x196)],'issue.description_original_bytes':_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1b9)],'issue.description_truncated':_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1b8)],'issue.description_redactions':_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1c9)],'issue.description_redaction_kinds':_0x2132b3['sanitize'][_0xb644e3(0x1a2)][_0xb644e3(0x1c6)](',')}},'description':[_0xb644e3(0x1a9),_0xb644e3(0x1a4)+_0x2132b3[_0xb644e3(0x1c4)],_0x2132b3[_0xb644e3(0x1cc)]?'descriptionFile:\x20'+_0x2132b3[_0xb644e3(0x1cc)]:null,_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1b8)]?_0xb644e3(0x1b1)+_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1b9)]+'\x20bytes':null,_0x2132b3['sanitize'][_0xb644e3(0x1c9)]>0x0?'redactions:\x20'+_0x2132b3['sanitize'][_0xb644e3(0x1c9)]+'\x20('+_0x2132b3[_0xb644e3(0x1b5)][_0xb644e3(0x1a2)][_0xb644e3(0x1c6)](',\x20')+')':null][_0xb644e3(0x1bf)](Boolean)['join']('\x0a')};},async 'execute'(_0xa2b0cf){const _0x4463e0=a98_0x2f04ee,_0x52abd3=await prepareIssueReport(_0xa2b0cf);try{await sendPlatformIssueCollectLog({'title':_0x52abd3['title'],'description':_0x52abd3[_0x4463e0(0x196)],'sanitize':{'originalBytes':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1b9)],'truncated':_0x52abd3['sanitize'][_0x4463e0(0x1b8)],'redactionCount':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1c9)],'redactionKinds':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1a2)]}});}catch(_0x27a4b2){throw CliErrors[_0x4463e0(0x1c2)](_0x4463e0(0x1ad)+(_0x27a4b2 instanceof Error?_0x27a4b2[_0x4463e0(0x1b3)]:String(_0x27a4b2)),'Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.');}return{'ok':!![],'message':buildResultMessage(_0x52abd3[_0x4463e0(0x1b5)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0x4463e0(0x1a1),_0x4463e0(0x1cb),'issue.description_truncated',_0x4463e0(0x1b6),_0x4463e0(0x1a8)],'issue':{'title':_0x52abd3[_0x4463e0(0x1ce)],'descriptionLength':_0x52abd3[_0x4463e0(0x196)][_0x4463e0(0x1c3)],'descriptionSource':_0x52abd3[_0x4463e0(0x1c4)],..._0x52abd3[_0x4463e0(0x1cc)]?{'descriptionFile':_0x52abd3[_0x4463e0(0x1cc)]}:{},'sanitize':{'originalBytes':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1b9)],'truncated':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1b8)],'redactions':_0x52abd3[_0x4463e0(0x1b5)]['redactionCount'],'redactionKinds':_0x52abd3[_0x4463e0(0x1b5)][_0x4463e0(0x1a2)]}}}};}};function buildResultMessage(_0x4c1074){const _0x43e95b=a98_0x2f04ee,_0x5e0c74=[];return _0x4c1074['truncated']&&_0x5e0c74[_0x43e95b(0x197)](_0x43e95b(0x1b4)+_0x4c1074[_0x43e95b(0x1b9)]+_0x43e95b(0x19c)),_0x4c1074['redactionCount']>0x0&&_0x5e0c74['push'](_0x43e95b(0x1ab)+_0x4c1074['redactionCount']+_0x43e95b(0x1c1)+_0x4c1074[_0x43e95b(0x1a2)][_0x43e95b(0x1c6)](',\x20')),_0x5e0c74['length']===0x0?_0x43e95b(0x1af):_0x43e95b(0x1bb)+_0x5e0c74[_0x43e95b(0x1c6)](';\x20')+')';}async function prepareIssueReport(_0x412c17){const _0x439329=a98_0x2f04ee,_0x28b6f1=_0x412c17[_0x439329(0x1c7)](_0x439329(0x1ce))['trim'](),_0x13fdf5=_0x412c17[_0x439329(0x1c7)](_0x439329(0x196)),_0x19ff42=_0x412c17[_0x439329(0x1c7)](DESCRIPTION_FILE_FLAG)[_0x439329(0x199)]();if(!_0x19ff42){const _0x43facf=_0x13fdf5;if(!_0x43facf[_0x439329(0x199)]())throw CliErrors[_0x439329(0x19b)](_0x439329(0x1a6),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x265b76=sanitizeIssueDescription(_0x43facf);return{'title':_0x28b6f1,'description':_0x265b76[_0x439329(0x196)],'descriptionSource':_0x439329(0x1bd),'sanitize':_0x265b76};}const _0x3d997b=resolve(process[_0x439329(0x1ac)](),_0x19ff42),_0x19f693=await readFile(_0x3d997b,'utf8');if(!_0x19f693[_0x439329(0x199)]())throw CliErrors[_0x439329(0x19b)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x3d997b,_0x439329(0x19a));const _0x3a3db3=sanitizeIssueDescription(_0x19f693);return{'title':_0x28b6f1,'description':_0x3a3db3[_0x439329(0x196)],'descriptionSource':'file','descriptionFilePath':_0x3d997b,'sanitize':_0x3a3db3};}
@@ -1 +1 @@
1
- function a99_0x4493(){const _0x5d5949=['__RB_OSS_ID_','private-key','REDACTED:bearer-jwt','3608648KaJbVZ','cookie','authorization','password','REDACTED:password','kind','byteLength','774216gkotCF','bearer-jwt','from','4194342diSLEV','7korpVY','includes','subarray','10qmBwGR','access-key','130GRISKq','description','length','slice','280452PzYBYV','push','2069577qsxbbe','169061uWEeAs','replace','pattern','REDACTED:authorization','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','REDACTED:cookie','utf8','string','101592bbGGgF','REDACTED:private-key'];a99_0x4493=function(){return _0x5d5949;};return a99_0x4493();}const a99_0x2dccff=a99_0x34c4;(function(_0x3b0269,_0x1a4248){const _0x2a71ab=a99_0x34c4,_0x1c3f92=_0x3b0269();while(!![]){try{const _0xc80cf6=parseInt(_0x2a71ab(0x19b))/0x1+-parseInt(_0x2a71ab(0x18b))/0x2+parseInt(_0x2a71ab(0x198))/0x3+parseInt(_0x2a71ab(0x1a3))/0x4*(parseInt(_0x2a71ab(0x194))/0x5)+parseInt(_0x2a71ab(0x18e))/0x6+-parseInt(_0x2a71ab(0x18f))/0x7*(parseInt(_0x2a71ab(0x184))/0x8)+-parseInt(_0x2a71ab(0x19a))/0x9*(parseInt(_0x2a71ab(0x192))/0xa);if(_0xc80cf6===_0x1a4248)break;else _0x1c3f92['push'](_0x1c3f92['shift']());}catch(_0x3e679b){_0x1c3f92['push'](_0x1c3f92['shift']());}}}(a99_0x4493,0x87350));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;function a99_0x34c4(_0x30f936,_0x423eab){_0x30f936=_0x30f936-0x180;const _0x44938d=a99_0x4493();let _0x34c4fa=_0x44938d[_0x30f936];return _0x34c4fa;}const TRUNCATION_NOTICE=a99_0x2dccff(0x19f),REDACTION_RULES=[{'kind':a99_0x2dccff(0x185),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x2dccff(0x1a0)},{'kind':a99_0x2dccff(0x186),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x2dccff(0x19e)},{'kind':a99_0x2dccff(0x182),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x2dccff(0x180)},{'kind':a99_0x2dccff(0x193),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a99_0x2dccff(0x187),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x2dccff(0x188)},{'kind':a99_0x2dccff(0x18c),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x2dccff(0x183)}];export function sanitizeIssueDescription(_0x370581){const _0x3afde2=a99_0x2dccff,_0x39d308=Buffer['byteLength'](_0x370581,_0x3afde2(0x1a1)),_0x54b66c=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x2cf805=_0x370581,_0x55e8be=0x0;const _0xb4cd73=[];if(!_0x54b66c){const _0x452d79=protectOssAccessKeyIds(_0x2cf805);_0x2cf805=_0x452d79[_0x3afde2(0x195)];for(const _0x31eb07 of REDACTION_RULES){let _0x5356c9=0x0;_0x2cf805=_0x2cf805[_0x3afde2(0x19c)](_0x31eb07[_0x3afde2(0x19d)],(_0x4b58e5,_0x2a65eb)=>{const _0x1de6bc=_0x3afde2;_0x5356c9+=0x1;const _0x1aec07=typeof _0x2a65eb===_0x1de6bc(0x1a2)?_0x2a65eb:'';return _0x1aec07+'['+_0x31eb07['label']+']';}),_0x5356c9>0x0&&(_0x55e8be+=_0x5356c9,!_0xb4cd73[_0x3afde2(0x190)](_0x31eb07[_0x3afde2(0x189)])&&_0xb4cd73[_0x3afde2(0x199)](_0x31eb07[_0x3afde2(0x189)]));}_0x2cf805=_0x452d79['restore'](_0x2cf805);}let _0x1e01a2=![];if(Buffer[_0x3afde2(0x18a)](_0x2cf805,_0x3afde2(0x1a1))>ISSUE_DESCRIPTION_MAX_BYTES){_0x1e01a2=!![];const _0xfa01aa=Buffer[_0x3afde2(0x18a)](TRUNCATION_NOTICE,_0x3afde2(0x1a1)),_0x4842c6=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0xfa01aa);_0x2cf805=sliceUtf8Bytes(_0x2cf805,_0x4842c6)+TRUNCATION_NOTICE;}return{'description':_0x2cf805,'originalBytes':_0x39d308,'truncated':_0x1e01a2,'redactionCount':_0x55e8be,'redactionKinds':_0xb4cd73};}function protectOssAccessKeyIds(_0xdaf7d9){const _0x4fde7c=a99_0x2dccff,_0x52c744=[],_0x458e8f=_0xdaf7d9[_0x4fde7c(0x19c)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x57f396,_0x5d56ca)=>{const _0x3c078c=_0x4fde7c,_0xc77e2e=_0x52c744[_0x3c078c(0x199)](_0x57f396[_0x3c078c(0x197)](_0x5d56ca[_0x3c078c(0x196)]))-0x1;return _0x5d56ca+_0x3c078c(0x181)+_0xc77e2e+'__';});return{'description':_0x458e8f,'restore':_0x4f468b=>_0x4f468b[_0x4fde7c(0x19c)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x2e945d,_0x5de305,_0x5478a5)=>{const _0x1509d7=_0x52c744[Number(_0x5478a5)];return _0x1509d7===undefined?_0x2e945d:''+_0x5de305+_0x1509d7;})};}function sliceUtf8Bytes(_0x4a2553,_0x35981d){const _0x21ab85=a99_0x2dccff;if(_0x35981d<=0x0)return'';const _0x35bab6=Buffer[_0x21ab85(0x18d)](_0x4a2553,'utf8');if(_0x35bab6[_0x21ab85(0x18a)]<=_0x35981d)return _0x4a2553;let _0x46682b=_0x35981d;while(_0x46682b>0x0){const _0x582e5c=_0x35bab6[_0x46682b];if(_0x582e5c===undefined||(_0x582e5c&0xc0)!==0x80)break;_0x46682b-=0x1;}return _0x35bab6[_0x21ab85(0x191)](0x0,_0x46682b)['toString']('utf8');}
1
+ const a99_0x476649=a99_0x5ab9;(function(_0x5b4c1d,_0x2eebe4){const _0x4cba5e=a99_0x5ab9,_0x1e04ca=_0x5b4c1d();while(!![]){try{const _0xa54c7=parseInt(_0x4cba5e(0xf0))/0x1+-parseInt(_0x4cba5e(0xfb))/0x2*(parseInt(_0x4cba5e(0x104))/0x3)+-parseInt(_0x4cba5e(0x10c))/0x4*(-parseInt(_0x4cba5e(0xf2))/0x5)+parseInt(_0x4cba5e(0x10d))/0x6*(-parseInt(_0x4cba5e(0x114))/0x7)+parseInt(_0x4cba5e(0xff))/0x8*(-parseInt(_0x4cba5e(0x115))/0x9)+parseInt(_0x4cba5e(0xfa))/0xa*(-parseInt(_0x4cba5e(0xf5))/0xb)+-parseInt(_0x4cba5e(0x10a))/0xc*(-parseInt(_0x4cba5e(0x109))/0xd);if(_0xa54c7===_0x2eebe4)break;else _0x1e04ca['push'](_0x1e04ca['shift']());}catch(_0x503649){_0x1e04ca['push'](_0x1e04ca['shift']());}}}(a99_0x3b8b,0x57724));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x476649(0xfe),REDACTION_RULES=[{'kind':a99_0x476649(0xef),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x476649(0x101)},{'kind':a99_0x476649(0x113),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a99_0x476649(0x10b),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x476649(0x10e)},{'kind':a99_0x476649(0xf6),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x476649(0x106)},{'kind':a99_0x476649(0xf4),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x476649(0xf1)},{'kind':a99_0x476649(0x112),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x476649(0x10f)}];export function sanitizeIssueDescription(_0x2f3ac5){const _0x894cd6=a99_0x476649,_0x35cea1=Buffer[_0x894cd6(0xf3)](_0x2f3ac5,_0x894cd6(0x107)),_0x5c98f6=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5243e3=_0x2f3ac5,_0x37fbad=0x0;const _0xab2cba=[];if(!_0x5c98f6){const _0x2a9670=protectOssAccessKeyIds(_0x5243e3);_0x5243e3=_0x2a9670[_0x894cd6(0xf8)];for(const _0x50efde of REDACTION_RULES){let _0x56cefc=0x0;_0x5243e3=_0x5243e3[_0x894cd6(0xfc)](_0x50efde['pattern'],(_0x3192ec,_0x4f5642)=>{const _0x50dd52=_0x894cd6;_0x56cefc+=0x1;const _0x19190a=typeof _0x4f5642===_0x50dd52(0x108)?_0x4f5642:'';return _0x19190a+'['+_0x50efde[_0x50dd52(0x103)]+']';}),_0x56cefc>0x0&&(_0x37fbad+=_0x56cefc,!_0xab2cba[_0x894cd6(0x110)](_0x50efde[_0x894cd6(0x105)])&&_0xab2cba[_0x894cd6(0xf9)](_0x50efde[_0x894cd6(0x105)]));}_0x5243e3=_0x2a9670[_0x894cd6(0xf7)](_0x5243e3);}let _0x4b40ab=![];if(Buffer[_0x894cd6(0xf3)](_0x5243e3,_0x894cd6(0x107))>ISSUE_DESCRIPTION_MAX_BYTES){_0x4b40ab=!![];const _0x374040=Buffer['byteLength'](TRUNCATION_NOTICE,_0x894cd6(0x107)),_0x5593f8=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x374040);_0x5243e3=sliceUtf8Bytes(_0x5243e3,_0x5593f8)+TRUNCATION_NOTICE;}return{'description':_0x5243e3,'originalBytes':_0x35cea1,'truncated':_0x4b40ab,'redactionCount':_0x37fbad,'redactionKinds':_0xab2cba};}function a99_0x3b8b(){const _0x2e14e3=['slice','REDACTED:cookie','toString','label','3KYnbnF','kind','REDACTED:access-key','utf8','string','130cGPGSs','2545260YHMSbo','private-key','1724pLRcon','10662JsfIzq','REDACTED:private-key','REDACTED:bearer-jwt','includes','subarray','bearer-jwt','authorization','2632OUpIur','9mFrfkA','cookie','234741DCueuA','REDACTED:password','835sJgYFk','byteLength','password','2112iNyLuj','access-key','restore','description','push','25510EEzEfE','931794TpdSbm','replace','from','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','3565976fjdpoW'];a99_0x3b8b=function(){return _0x2e14e3;};return a99_0x3b8b();}function protectOssAccessKeyIds(_0x1f6554){const _0x1060e6=a99_0x476649,_0x25bd5b=[],_0x144dfe=_0x1f6554[_0x1060e6(0xfc)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x54b943,_0x2e29e4)=>{const _0x4a4870=_0x1060e6,_0x5b0731=_0x25bd5b[_0x4a4870(0xf9)](_0x54b943[_0x4a4870(0x100)](_0x2e29e4['length']))-0x1;return _0x2e29e4+'__RB_OSS_ID_'+_0x5b0731+'__';});return{'description':_0x144dfe,'restore':_0x3c6e24=>_0x3c6e24[_0x1060e6(0xfc)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x540788,_0x453262,_0x352b36)=>{const _0x406bb0=_0x25bd5b[Number(_0x352b36)];return _0x406bb0===undefined?_0x540788:''+_0x453262+_0x406bb0;})};}function a99_0x5ab9(_0x1f3732,_0x19aa71){_0x1f3732=_0x1f3732-0xef;const _0x3b8bdc=a99_0x3b8b();let _0x5ab926=_0x3b8bdc[_0x1f3732];return _0x5ab926;}function sliceUtf8Bytes(_0x54f076,_0x235b23){const _0x29f63b=a99_0x476649;if(_0x235b23<=0x0)return'';const _0x30ff1f=Buffer[_0x29f63b(0xfd)](_0x54f076,_0x29f63b(0x107));if(_0x30ff1f[_0x29f63b(0xf3)]<=_0x235b23)return _0x54f076;let _0x19a387=_0x235b23;while(_0x19a387>0x0){const _0x175a57=_0x30ff1f[_0x19a387];if(_0x175a57===undefined||(_0x175a57&0xc0)!==0x80)break;_0x19a387-=0x1;}return _0x30ff1f[_0x29f63b(0x111)](0x0,_0x19a387)[_0x29f63b(0x102)](_0x29f63b(0x107));}
@@ -1 +1 @@
1
- const a100_0x9b5aac=a100_0x4176;(function(_0xfb614a,_0x1b1a9e){const _0x56afd7=a100_0x4176,_0x920aad=_0xfb614a();while(!![]){try{const _0x1bc1c5=parseInt(_0x56afd7(0xf9))/0x1*(-parseInt(_0x56afd7(0xf3))/0x2)+-parseInt(_0x56afd7(0x113))/0x3+parseInt(_0x56afd7(0xf8))/0x4+-parseInt(_0x56afd7(0xff))/0x5*(-parseInt(_0x56afd7(0x112))/0x6)+-parseInt(_0x56afd7(0x10f))/0x7+-parseInt(_0x56afd7(0x111))/0x8+parseInt(_0x56afd7(0x104))/0x9*(parseInt(_0x56afd7(0x108))/0xa);if(_0x1bc1c5===_0x1b1a9e)break;else _0x920aad['push'](_0x920aad['shift']());}catch(_0x43d0b6){_0x920aad['push'](_0x920aad['shift']());}}}(a100_0x28a5,0x5c828));function a100_0x4176(_0x59e51c,_0x3561a0){_0x59e51c=_0x59e51c-0xf1;const _0x28a55c=a100_0x28a5();let _0x417697=_0x28a55c[_0x59e51c];return _0x417697;}import{logger}from'../../utils/logger.js';function a100_0x28a5(){const _0xf9e050=['*\x20No\x20logs\x20found','967528ZsNtvF','21234KUBITD','1460766cYgsSt','Clear\x20command\x20history\x20logs','read','855562ukWbbk','en-US','success','\x20\x20\x20Time:\x20','length','2101160OwmsAj','1nooGiB','View\x20command\x20history\x20logs','readLogs','command','write','forEach','895vPeWGZ','stringify','details','*\x20Lovrabet\x20CLI\x20logs:\x0a','keys','549LJxUeO','clear','log','logs','92810RDCWeI','\x20\x20\x20Details:\x20','duration','message','error','clearLogs','level','2172436mMPXMB'];a100_0x28a5=function(){return _0xf9e050;};return a100_0x28a5();}function printLogs(_0x428d09){const _0x30a672=a100_0x4176;if(_0x428d09['length']===0x0){console[_0x30a672(0x106)](_0x30a672(0x110));return;}console['log'](_0x30a672(0x102)),_0x428d09[_0x30a672(0xfe)]((_0x416f07,_0x4cff45)=>{const _0x30e94a=_0x30a672,_0x593bea=new Date(_0x416f07['timestamp'])['toLocaleString'](_0x30e94a(0xf4)),_0x82da15=_0x416f07[_0x30e94a(0x10e)]===_0x30e94a(0xf5)?'√':_0x416f07[_0x30e94a(0x10e)]===_0x30e94a(0x10c)?'×':_0x416f07[_0x30e94a(0x10e)]==='warn'?'!':'i';console['log'](_0x4cff45+0x1+'.\x20'+_0x82da15+'\x20['+_0x416f07[_0x30e94a(0xfc)]+']\x20'+_0x416f07[_0x30e94a(0x10b)]),console[_0x30e94a(0x106)](_0x30e94a(0xf6)+_0x593bea),_0x416f07[_0x30e94a(0x10a)]&&console[_0x30e94a(0x106)]('\x20\x20\x20Duration:\x20'+_0x416f07['duration']+'ms'),_0x416f07['details']&&Object[_0x30e94a(0x103)](_0x416f07[_0x30e94a(0x101)])[_0x30e94a(0xf7)]>0x0&&console['log'](_0x30e94a(0x109)+JSON[_0x30e94a(0x100)](_0x416f07[_0x30e94a(0x101)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a100_0x9b5aac(0x107),'command':'show','description':a100_0x9b5aac(0xfa),'risk':a100_0x9b5aac(0xf2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c9e5f){const _0x145195=a100_0x9b5aac;return printLogs(logger[_0x145195(0xfb)]()),{'ok':!![]};}},{'service':a100_0x9b5aac(0x107),'command':a100_0x9b5aac(0x105),'description':a100_0x9b5aac(0xf1),'risk':a100_0x9b5aac(0xfd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4da7df){const _0x11e5d3=a100_0x9b5aac;return logger[_0x11e5d3(0x10d)](),console['log']('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ const a100_0x500d98=a100_0x51b4;(function(_0x4856d7,_0x51ebb5){const _0x543072=a100_0x51b4,_0x25192d=_0x4856d7();while(!![]){try{const _0x3f0d31=parseInt(_0x543072(0x15e))/0x1*(parseInt(_0x543072(0x16f))/0x2)+-parseInt(_0x543072(0x164))/0x3+-parseInt(_0x543072(0x173))/0x4*(parseInt(_0x543072(0x170))/0x5)+parseInt(_0x543072(0x15c))/0x6*(-parseInt(_0x543072(0x167))/0x7)+parseInt(_0x543072(0x15a))/0x8*(-parseInt(_0x543072(0x161))/0x9)+parseInt(_0x543072(0x178))/0xa+-parseInt(_0x543072(0x163))/0xb*(-parseInt(_0x543072(0x159))/0xc);if(_0x3f0d31===_0x51ebb5)break;else _0x25192d['push'](_0x25192d['shift']());}catch(_0xd38b4d){_0x25192d['push'](_0x25192d['shift']());}}}(a100_0x1151,0xcd098));function a100_0x51b4(_0x3fae44,_0x2e6a4c){_0x3fae44=_0x3fae44-0x156;const _0x11513d=a100_0x1151();let _0x51b4ba=_0x11513d[_0x3fae44];return _0x51b4ba;}import{logger}from'../../utils/logger.js';function a100_0x1151(){const _0x4f1a66=['4Owwbag','warn','write','\x20\x20\x20Duration:\x20','View\x20command\x20history\x20logs','13405150XiOria','duration','\x20\x20\x20Time:\x20','clear','read','831756FiemsD','8HVYeEF','show','33738htAjEP','clearLogs','1RAvgtC','keys','level','4273596ZHsyrn','readLogs','187SqBCbB','2465910iobSwN','log','Clear\x20command\x20history\x20logs','1036bongPI','length','en-US','command','stringify','*\x20Logs\x20cleared','toLocaleString','success','3224214HdNmYH','5810465UztioK','details','message'];a100_0x1151=function(){return _0x4f1a66;};return a100_0x1151();}function printLogs(_0x28d327){const _0x3565b6=a100_0x51b4;if(_0x28d327[_0x3565b6(0x168)]===0x0){console[_0x3565b6(0x165)]('*\x20No\x20logs\x20found');return;}console[_0x3565b6(0x165)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x28d327['forEach']((_0x21aa89,_0x4820c2)=>{const _0x5e5971=_0x3565b6,_0x54febd=new Date(_0x21aa89['timestamp'])[_0x5e5971(0x16d)](_0x5e5971(0x169)),_0x44df37=_0x21aa89[_0x5e5971(0x160)]===_0x5e5971(0x16e)?'√':_0x21aa89[_0x5e5971(0x160)]==='error'?'×':_0x21aa89[_0x5e5971(0x160)]===_0x5e5971(0x174)?'!':'i';console[_0x5e5971(0x165)](_0x4820c2+0x1+'.\x20'+_0x44df37+'\x20['+_0x21aa89[_0x5e5971(0x16a)]+']\x20'+_0x21aa89[_0x5e5971(0x172)]),console[_0x5e5971(0x165)](_0x5e5971(0x156)+_0x54febd),_0x21aa89[_0x5e5971(0x179)]&&console[_0x5e5971(0x165)](_0x5e5971(0x176)+_0x21aa89['duration']+'ms'),_0x21aa89['details']&&Object[_0x5e5971(0x15f)](_0x21aa89['details'])[_0x5e5971(0x168)]>0x0&&console[_0x5e5971(0x165)]('\x20\x20\x20Details:\x20'+JSON[_0x5e5971(0x16b)](_0x21aa89[_0x5e5971(0x171)],null,0x2)),console[_0x5e5971(0x165)]('');});}export const logsDefinitions=[{'service':'logs','command':a100_0x500d98(0x15b),'description':a100_0x500d98(0x177),'risk':a100_0x500d98(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xf7914a){const _0x87744c=a100_0x500d98;return printLogs(logger[_0x87744c(0x162)]()),{'ok':!![]};}},{'service':'logs','command':a100_0x500d98(0x157),'description':a100_0x500d98(0x166),'risk':a100_0x500d98(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1d4601){const _0x350784=a100_0x500d98;return logger[_0x350784(0x15d)](),console[_0x350784(0x165)](_0x350784(0x16c)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a101_0x33afb0=a101_0x43ff;(function(_0x5b9f5a,_0x592578){const _0x3d598d=a101_0x43ff,_0x800228=_0x5b9f5a();while(!![]){try{const _0x9fc0f6=parseInt(_0x3d598d(0x108))/0x1+parseInt(_0x3d598d(0x134))/0x2*(parseInt(_0x3d598d(0xde))/0x3)+-parseInt(_0x3d598d(0x122))/0x4+parseInt(_0x3d598d(0x102))/0x5+-parseInt(_0x3d598d(0x142))/0x6*(parseInt(_0x3d598d(0x11f))/0x7)+parseInt(_0x3d598d(0x132))/0x8+-parseInt(_0x3d598d(0x148))/0x9;if(_0x9fc0f6===_0x592578)break;else _0x800228['push'](_0x800228['shift']());}catch(_0x6069d6){_0x800228['push'](_0x800228['shift']());}}}(a101_0x64b6,0x3eb2e));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';function a101_0x43ff(_0x432181,_0x3ec280){_0x432181=_0x432181-0xdc;const _0x64b68d=a101_0x64b6();let _0x43ffa8=_0x64b68d[_0x432181];return _0x43ffa8;}import{batchDeleteMenuEntities}from'../../commands/menu/shared/service.js';function a101_0x64b6(){const _0xb5638d=['map','expect-parent-id','forEach','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','batch-delete','menu','Deleted\x20','\x20references\x20missing\x20child\x20','plan-validation','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','absentIds','resources','message',';\x20execution\x20must\x20consume\x20','Folder\x20','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','dry-run','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','causeMessage','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','menu_page_shared','Post-failure\x20menu\x20readback\x20failed\x20(','menu_folder_resources_invalid','\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.','expect-path','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','createdAt','\x20resource\x20URL(s).','delete','plan-out','The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.','length','/smartapi/menu/batchDelete','2236930xIHjlM','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','childrenCount','menu_batch_delete_count_mismatch','remainingIds','size','2777fZhiyu','menu_recursive_requires_folder','target','snapshot','Would\x20batch\x20delete\x20','Recursive\x20menu\x20delete\x20plan\x20root\x20','failed','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','push','byId','flagMissing','string','POST','unconfirmed','menus','Backend\x20reported\x20','deleteOrder','bool','folder','snapshotHash','recursive','join','menu_non_empty','211498gGPgqu','unknown','path','1169624DlAztG','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','str','verification','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.','batch-delete-menu','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','verify\x20batch\x20delete','plan','\x20and\x20cannot\x20be\x20deleted\x20safely.','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','Menu\x20','Post-mismatch\x20menu\x20readback\x20failed\x20(','menu_verification_failed','3816936GhnaQL','add','81848swDqdn','high-risk-write','toLowerCase','pre-write-plan-validation','childrenIds','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','indexOf','cascade','menu\x20list','plan\x20delete','\x20is\x20type\x20\x22','pages','6SaXKzb','appCode','page\x20','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','\x20still\x20references\x20','rabetbase\x20menu\x20list\x20--format\x20json','3498930khHlnS','type','has','resourcesValid','get','pageId','cookie','stringify','menu_plan_invalid','expected-children-count','filter','):\x20','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.','validation','execute\x20reviewed\x20delete\x20plan','3UvZnbi','trim','hash'];a101_0x64b6=function(){return _0xb5638d;};return a101_0x64b6();}import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x33afb0(0x114),'path':a101_0x33afb0(0x101)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':'Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)'},MENU_DELETE_RECURSIVE_FLAG={'name':a101_0x33afb0(0x11c),'type':'boolean','description':'Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first'},MENU_DELETE_PLAN_OUT_FLAG={'name':a101_0x33afb0(0xfe),'type':a101_0x33afb0(0x113),'description':'Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file'},MENU_DELETE_PLAN_FLAG={'name':a101_0x33afb0(0x12c),'type':a101_0x33afb0(0x113),'description':a101_0x33afb0(0xf2)};export const menuDelete={'service':a101_0x33afb0(0xe6),'command':a101_0x33afb0(0xfd),'description':a101_0x33afb0(0xfa),'risk':a101_0x33afb0(0x135),'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'(_0x550a38){const _0x1b3639=a101_0x33afb0;_0x550a38[_0x1b3639(0x119)](_0x1b3639(0xf1))?validateDeleteDryRunInput(_0x550a38):validateDeleteExecuteInput(_0x550a38),requireExplicitYes(_0x550a38);},async 'dryRun'(_0x5241a3){const _0x367d93=a101_0x33afb0;validateDeleteDryRunInput(_0x5241a3);const _0x4bbedc=await buildDeletePlan(_0x5241a3),_0x53ded0=createMenuDeletePlanFile(_0x5241a3['appCode'],_0x4bbedc),_0x2a59e1=await writeMenuDeletePlan(_0x5241a3['str'](_0x367d93(0xfe)),_0x53ded0),_0x425440=mutationResult({..._0x4bbedc,'planFile':{'path':_0x2a59e1,'createdAt':_0x53ded0[_0x367d93(0xfb)],'expiresAt':_0x53ded0['expiresAt']}});return menuDryRunResult(_0x425440,{'method':_0x367d93(0x114),'url':_0x367d93(0x101),'body':{'idList':_0x425440['deleteOrder']},'description':_0x367d93(0x10c)+(_0x425440[_0x367d93(0x118)]?.[_0x367d93(0x100)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x425440['selector']['id']+_0x367d93(0xee)+_0x2a59e1+'.'});},async 'execute'(_0x3eac2e){const _0xe9ff74=a101_0x33afb0;requireExplicitYes(_0x3eac2e),validateDeleteExecuteInput(_0x3eac2e);const _0x1ee2ac=await readMenuDeletePlan(_0x3eac2e[_0xe9ff74(0x125)]('plan')),_0x5b7761=mutationPlanFromDeleteFile(_0x1ee2ac[_0xe9ff74(0x12c)],_0x1ee2ac[_0xe9ff74(0x121)]),_0x3dee7f=_0x1ee2ac[_0xe9ff74(0x12c)][_0xe9ff74(0x10a)]['id'];try{assertMenuDeletePlanExecutable(_0x1ee2ac[_0xe9ff74(0x12c)],_0x3eac2e[_0xe9ff74(0x143)]);}catch(_0x58b7f5){throw menuFailure(asMenuError(_0x58b7f5),_0x5b7761,{'stage':_0xe9ff74(0xe9),'failed':{'id':_0x3dee7f}});}let _0x215a85,_0x13a075;try{_0x215a85=await fetchMutationSnapshot(_0x3eac2e,_0xe9ff74(0xdd),_0x3dee7f),_0x13a075=assertMenuDeletePlanCurrent(_0x1ee2ac[_0xe9ff74(0x12c)],_0x3eac2e['appCode'],_0x215a85),assertDeleteTargetsComplete(_0x1ee2ac[_0xe9ff74(0x12c)],_0x215a85),_0x13a075['forEach'](_0x4fd264=>assertDeleteSafety(_0x4fd264,_0x1ee2ac[_0xe9ff74(0x12c)]['recursive'])),assertNoSharedPages(_0x215a85,_0x13a075),assertCascadeMatchesPlan(_0x5b7761,_0x13a075);}catch(_0x288248){throw menuFailure(asMenuError(_0x288248),_0x5b7761,{'stage':_0xe9ff74(0x137),'failed':{'id':_0x3dee7f}});}const _0x40a34c=_0x1ee2ac[_0xe9ff74(0x12c)][_0xe9ff74(0x118)];let _0x54fcbf;try{_0x54fcbf=await batchDeleteMenuEntities(_0x3eac2e[_0xe9ff74(0x14e)],_0x40a34c);}catch(_0x13c724){const _0x19eaec=mapMenuApiError(_0x13c724,'batch\x20delete'),_0x1cba5e=[_0xe9ff74(0xff)];let _0x1187c0;try{_0x1187c0=await readDeleteOutcome(_0x3eac2e,_0x40a34c);}catch(_0x45e6ad){const _0x5290a4=describeMenuErrorCause(_0x45e6ad,_0xe9ff74(0xe4),_0x3dee7f);_0x1cba5e[_0xe9ff74(0x110)](_0xe9ff74(0xf6)+_0x5290a4['causeCode']+_0xe9ff74(0x153)+_0x5290a4[_0xe9ff74(0xf3)]);throw menuFailure(_0x19eaec,_0x5b7761,{'stage':_0xe9ff74(0xe5),'failed':{'targetIds':_0x40a34c,'targetIdsAbsent':_0xe9ff74(0x115),..._0x5290a4},'warnings':_0x1cba5e,'verification':{'status':_0xe9ff74(0x10e),'lookupCommand':_0xe9ff74(0x147),'targetIds':_0x40a34c}});}throw menuFailure(_0x19eaec,_0x5b7761,{'stage':_0xe9ff74(0xe5),'succeeded':_0x1187c0['absentIds'][_0xe9ff74(0xe1)](_0x4476e7=>({'id':_0x4476e7,'deleted':!![]})),'failed':{'targetIds':_0x40a34c,'absentIds':_0x1187c0['absentIds'],'remainingIds':_0x1187c0[_0xe9ff74(0x106)]},'warnings':_0x1cba5e,'verification':verificationFromOutcome(_0x1187c0)});}if(_0x54fcbf!==_0x40a34c[_0xe9ff74(0x100)]){const _0x675530=menuError(_0xe9ff74(0x105),_0xe9ff74(0x117)+_0x54fcbf+'\x20deleted\x20menus;\x20expected\x20'+_0x40a34c[_0xe9ff74(0x100)]+'.','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.'),_0x4cc0d0=[_0xe9ff74(0x10f)];let _0xa42c3;try{_0xa42c3=await readDeleteOutcome(_0x3eac2e,_0x40a34c);}catch(_0x41e253){const _0x504fcd=describeMenuErrorCause(_0x41e253,_0xe9ff74(0x12e),_0x3dee7f);_0x4cc0d0[_0xe9ff74(0x110)](_0xe9ff74(0x130)+_0x504fcd['causeCode']+_0xe9ff74(0x153)+_0x504fcd[_0xe9ff74(0xf3)]);throw menuFailure(_0x675530,_0x5b7761,{'stage':_0xe9ff74(0xe5),'failed':{'targetIds':_0x40a34c,'expectedCount':_0x40a34c[_0xe9ff74(0x100)],'reportedDeletedCount':_0x54fcbf,'targetIdsAbsent':_0xe9ff74(0x115),..._0x504fcd},'warnings':_0x4cc0d0,'verification':{'status':'failed','lookupCommand':_0xe9ff74(0x147),'targetIds':_0x40a34c}});}throw menuFailure(_0x675530,_0x5b7761,{'stage':_0xe9ff74(0xe5),'succeeded':_0xa42c3[_0xe9ff74(0xeb)][_0xe9ff74(0xe1)](_0x2eae8a=>({'id':_0x2eae8a,'deleted':!![]})),'failed':{'targetIds':_0x40a34c,'expectedCount':_0x40a34c['length'],'reportedDeletedCount':_0x54fcbf,'absentIds':_0xa42c3[_0xe9ff74(0xeb)],'remainingIds':_0xa42c3[_0xe9ff74(0x106)]},'warnings':_0x4cc0d0,'verification':verificationFromOutcome(_0xa42c3)});}let _0x33d3c6;try{_0x33d3c6=await readDeleteOutcome(_0x3eac2e,_0x40a34c);}catch(_0x536e60){const _0x194176=describeMenuErrorCause(_0x536e60,_0xe9ff74(0x12b),_0x3dee7f),_0x81e02e=asVerificationError(_0x536e60,'Batch\x20delete\x20request\x20for\x20menu\x20'+_0x3dee7f+_0xe9ff74(0x12a));throw menuFailure(_0x81e02e,_0x5b7761,{'stage':_0xe9ff74(0x126),'succeeded':_0x40a34c['map'](_0x5243df=>({'id':_0x5243df,'deleteRequested':!![]})),'failed':{'id':_0x3dee7f,'targetIds':_0x40a34c,'targetIdsAbsent':_0xe9ff74(0x115),..._0x194176},'warnings':[_0xe9ff74(0x123)],'verification':{'status':_0xe9ff74(0x10e),'lookupCommand':_0xe9ff74(0x147),'targetIds':_0x40a34c}});}if(_0x33d3c6[_0xe9ff74(0x106)]['length']>0x0){const _0x23eace=menuError(_0xe9ff74(0x131),_0xe9ff74(0x103)+_0x33d3c6[_0xe9ff74(0x106)][_0xe9ff74(0x11d)](',\x20')+'.',_0xe9ff74(0x13a));throw menuFailure(_0x23eace,_0x5b7761,{'stage':_0xe9ff74(0x126),'succeeded':_0x40a34c['map'](_0x5efb34=>({'id':_0x5efb34,'deleteRequested':!![]})),'failed':{'id':_0x3dee7f,'targetIds':_0x40a34c,'absentIds':_0x33d3c6[_0xe9ff74(0xeb)],'remainingIds':_0x33d3c6['remainingIds']},'warnings':['The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.'],'verification':verificationFromOutcome(_0x33d3c6)});}const _0x3471d3=_0x40a34c[_0xe9ff74(0xe1)](_0x2e8492=>({'id':_0x2e8492,'deleted':!![]})),_0x4e2abf=mutationResult({..._0x5b7761,'dryRun':![],'succeeded':_0x3471d3,'verification':{'checkedBy':_0xe9ff74(0x13e),'plannedSnapshotHash':_0x5b7761[_0xe9ff74(0x11b)],'finalSnapshotHash':_0x33d3c6['snapshot']['hash'],'reportedDeletedCount':_0x54fcbf,'targetAbsent':!_0x33d3c6[_0xe9ff74(0x10b)][_0xe9ff74(0x111)][_0xe9ff74(0x14a)](_0x3dee7f),'allTargetsAbsent':!![],'targetIds':_0x40a34c}});return{'ok':!![],'data':_0x4e2abf,'message':_0xe9ff74(0xe7)+_0x3471d3[_0xe9ff74(0x100)]+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x3dee7f+'.'};}};async function readDeleteOutcome(_0x11bf1a,_0x330d9f){const _0x4d043f=a101_0x33afb0,_0x4c81e6=await fetchMenuSnapshot(_0x11bf1a[_0x4d043f(0x143)],_0x11bf1a[_0x4d043f(0x14e)]);return{'snapshot':_0x4c81e6,'absentIds':_0x330d9f['filter'](_0x133485=>!_0x4c81e6[_0x4d043f(0x111)][_0x4d043f(0x14a)](_0x133485)),'remainingIds':_0x330d9f[_0x4d043f(0x152)](_0x302f7c=>_0x4c81e6[_0x4d043f(0x111)]['has'](_0x302f7c))};}function verificationFromOutcome(_0x8a4f19){const _0x5c55a3=a101_0x33afb0;return{'checkedBy':'menu\x20list','absentIds':_0x8a4f19[_0x5c55a3(0xeb)],'remainingIds':_0x8a4f19[_0x5c55a3(0x106)]};}function validateDeleteDryRunInput(_0x1cb7d1){const _0x5c2bf7=a101_0x33afb0;validateExactId(_0x1cb7d1);if(!hasFlag(_0x1cb7d1,'plan-out')||!_0x1cb7d1[_0x5c2bf7(0x125)](_0x5c2bf7(0xfe))[_0x5c2bf7(0xdf)]())throw CliErrors[_0x5c2bf7(0x112)](_0x5c2bf7(0xfe),_0x5c2bf7(0xea));if(hasFlag(_0x1cb7d1,_0x5c2bf7(0x12c)))throw CliErrors[_0x5c2bf7(0xdc)](_0x5c2bf7(0x139));}function validateDeleteExecuteInput(_0x4f1baa){const _0x1afd46=a101_0x33afb0;if(!hasFlag(_0x4f1baa,_0x1afd46(0x12c))||!_0x4f1baa['str'](_0x1afd46(0x12c))[_0x1afd46(0xdf)]())throw CliErrors[_0x1afd46(0x112)]('plan','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.');const _0x2a78e2=['id',_0x1afd46(0x11c),'plan-out',_0x1afd46(0xe2),_0x1afd46(0xf9),_0x1afd46(0x151)][_0x1afd46(0x152)](_0x307598=>hasFlag(_0x4f1baa,_0x307598));if(_0x2a78e2[_0x1afd46(0x100)]>0x0)throw CliErrors[_0x1afd46(0xdc)](_0x1afd46(0xf0)+_0x2a78e2[_0x1afd46(0xe1)](_0x239f1e=>'--'+_0x239f1e)[_0x1afd46(0x11d)](',\x20')+'.');}async function buildDeletePlan(_0x7d1db7){const _0x1f5631=a101_0x33afb0,_0x1529e8=validateExactId(_0x7d1db7),_0x599356=await fetchMutationSnapshot(_0x7d1db7,_0x1f5631(0x13f),_0x1529e8),_0x5255d1=requireMenu(_0x599356,_0x1529e8);assertExpectedState(_0x7d1db7,_0x5255d1);const _0x8a2e0a=_0x7d1db7[_0x1f5631(0x119)](_0x1f5631(0x11c));let _0x4215f2;if(_0x8a2e0a){if(_0x5255d1['type']['trim']()[_0x1f5631(0x136)]()!==_0x1f5631(0x11a))throw menuError(_0x1f5631(0x109),_0x1f5631(0x12f)+_0x5255d1['id']+_0x1f5631(0x140)+(_0x5255d1[_0x1f5631(0x149)]||_0x1f5631(0x120))+_0x1f5631(0xf8));_0x4215f2=collectDeleteTargets(_0x599356,_0x5255d1),_0x4215f2[_0x1f5631(0xe3)](_0x2c5de9=>assertDeleteSafety(_0x2c5de9,!![]));}else assertDeleteSafety(_0x5255d1),_0x4215f2=[_0x5255d1];assertNoSharedPages(_0x599356,_0x4215f2);const _0x254940=_0x4215f2[_0x1f5631(0xe1)](_0x1c2891=>_0x1c2891['id']),_0x43e32f=cascadeForTargets(_0x4215f2),_0xa05b5=_0x43e32f[_0x1f5631(0x141)]['length']>0x0?[_0x1f5631(0x124)]:[];return mutationResult({'operation':_0x1f5631(0xfd),'selector':{'id':_0x1529e8,'recursive':_0x8a2e0a},'before':_0x5255d1,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':_0x1f5631(0x129),'method':'POST','path':_0x1f5631(0x101),'body':{'idList':_0x254940}}],'targets':_0x4215f2,'deleteOrder':_0x254940,'snapshotHash':_0x599356[_0x1f5631(0xe0)],'cascade':_0x43e32f,'warnings':_0xa05b5});}function assertDeleteSafety(_0x5b9d5d,_0x3a95fd=![]){const _0x476502=a101_0x33afb0,_0x393563=_0x5b9d5d['type'][_0x476502(0xdf)]()['toLowerCase']()==='folder';if(_0x5b9d5d[_0x476502(0x104)]>0x0&&(!_0x3a95fd||!_0x393563))throw menuError(_0x476502(0x11e),'Menu\x20'+_0x5b9d5d['id']+'\x20has\x20'+_0x5b9d5d[_0x476502(0x104)]+_0x476502(0xf4),'Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20'+_0x5b9d5d[_0x476502(0x138)]['join'](',\x20'));if(_0x393563&&_0x5b9d5d['pageId']!=null)throw menuError('menu_delete_page_bound','Folder\x20'+_0x5b9d5d['id']+'\x20is\x20unexpectedly\x20bound\x20to\x20page\x20'+_0x5b9d5d[_0x476502(0x14d)]+_0x476502(0x12d),_0x476502(0x128));if(!_0x393563)return;if(!_0x5b9d5d[_0x476502(0x14b)])throw menuError(_0x476502(0xf7),_0x476502(0xef)+_0x5b9d5d['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(_0x5b9d5d[_0x476502(0xec)][_0x476502(0x100)]>0x0)throw menuError('menu_folder_has_resources',_0x476502(0xef)+_0x5b9d5d['id']+_0x476502(0x146)+_0x5b9d5d[_0x476502(0xec)][_0x476502(0x100)]+_0x476502(0xfc),_0x476502(0x127));}function collectDeleteTargets(_0x4ad625,_0x329845){const _0x2053c6=[],_0xc3acdb=new Set(),_0x2ab104=new Set(),_0x1881fd=_0x114b2c=>{const _0x158bd7=a101_0x43ff;if(_0xc3acdb['has'](_0x114b2c['id']))throw menuError('menu_tree_invalid','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20'+_0x114b2c['id']+'.');if(_0x2ab104[_0x158bd7(0x14a)](_0x114b2c['id']))return;_0xc3acdb[_0x158bd7(0x133)](_0x114b2c['id']);for(const _0xa952e6 of _0x114b2c[_0x158bd7(0x138)]){const _0x5581fa=_0x4ad625[_0x158bd7(0x111)][_0x158bd7(0x14c)](_0xa952e6);if(!_0x5581fa)throw menuError('menu_tree_invalid',_0x158bd7(0x12f)+_0x114b2c['id']+_0x158bd7(0xe8)+_0xa952e6+'.');_0x1881fd(_0x5581fa);}_0xc3acdb['delete'](_0x114b2c['id']),_0x2ab104[_0x158bd7(0x133)](_0x114b2c['id']),_0x2053c6[_0x158bd7(0x110)](_0x114b2c);};return _0x1881fd(_0x329845),_0x2053c6;}function assertDeleteTargetsComplete(_0x1621e9,_0x44367c){const _0x5a3195=a101_0x33afb0,_0x183923=requireMenu(_0x44367c,_0x1621e9[_0x5a3195(0x10a)]['id']);if(_0x1621e9[_0x5a3195(0x11c)]&&_0x183923[_0x5a3195(0x149)][_0x5a3195(0xdf)]()[_0x5a3195(0x136)]()!==_0x5a3195(0x11a))throw menuError(_0x5a3195(0x150),_0x5a3195(0x10d)+_0x183923['id']+'\x20is\x20not\x20a\x20folder.');const _0x14e241=_0x1621e9[_0x5a3195(0x11c)]?collectDeleteTargets(_0x44367c,_0x183923)[_0x5a3195(0xe1)](_0x146a83=>_0x146a83['id']):[_0x183923['id']];if(JSON[_0x5a3195(0x14f)](_0x1621e9['deleteOrder'])!==JSON[_0x5a3195(0x14f)](_0x14e241))throw menuError(_0x5a3195(0x150),'Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.');}function assertNoSharedPages(_0xf5deac,_0x53aadd){const _0x24a2a2=a101_0x33afb0,_0x3c9c8d=new Set(_0x53aadd[_0x24a2a2(0xe1)](_0x87af99=>_0x87af99['id'])),_0x153564=new Set(_0x53aadd['map'](_0x4a1993=>_0x4a1993[_0x24a2a2(0x14d)])[_0x24a2a2(0x152)](_0x47c524=>_0x47c524!=null));if(_0x153564[_0x24a2a2(0x107)]===0x0)return;const _0x2d8a0f=_0xf5deac[_0x24a2a2(0x116)][_0x24a2a2(0x152)](_0x5cc6fa=>!_0x3c9c8d[_0x24a2a2(0x14a)](_0x5cc6fa['id'])&&_0x5cc6fa[_0x24a2a2(0x14d)]!=null&&_0x153564[_0x24a2a2(0x14a)](_0x5cc6fa[_0x24a2a2(0x14d)]));if(_0x2d8a0f[_0x24a2a2(0x100)]===0x0)return;const _0x52989b=_0x2d8a0f['map'](_0x42431a=>_0x24a2a2(0x144)+_0x42431a[_0x24a2a2(0x14d)]+'\x20->\x20menu\x20'+_0x42431a['id'])[_0x24a2a2(0x11d)](',\x20');throw menuError(_0x24a2a2(0xf5),_0x24a2a2(0x145)+_0x52989b+'.',_0x24a2a2(0x154));}function assertCascadeMatchesPlan(_0x5070df,_0x47bb27){const _0x2eac55=a101_0x33afb0,_0x40daa0=cascadeForTargets(_0x47bb27);if(JSON['stringify'](_0x5070df[_0x2eac55(0x13d)])!==JSON[_0x2eac55(0x14f)](_0x40daa0))throw menuError('menu_plan_invalid',_0x2eac55(0x13b));}function cascadeForTargets(_0x51f5df){const _0x575d60=a101_0x33afb0,_0x54e898=_0x51f5df[_0x575d60(0xe1)](_0x521214=>_0x521214[_0x575d60(0x14d)])[_0x575d60(0x152)](_0x36239d=>_0x36239d!=null)['filter']((_0x36ad95,_0x56e81f,_0x16f3f1)=>_0x16f3f1[_0x575d60(0x13c)](_0x36ad95)===_0x56e81f);return{'pages':_0x54e898,'pageSchemaAffected':_0x54e898['length']>0x0};}function asMenuError(_0xc58634){const _0x2f5a67=a101_0x33afb0;return _0xc58634 instanceof CliError?_0xc58634:menuError(_0x2f5a67(0x150),_0xc58634 instanceof Error?_0xc58634[_0x2f5a67(0xed)]:String(_0xc58634));}
1
+ const a101_0x177775=a101_0x3153;function a101_0x3153(_0x4e6ead,_0x237ede){_0x4e6ead=_0x4e6ead-0x153;const _0x3acd56=a101_0x3acd();let _0x315328=_0x3acd56[_0x4e6ead];return _0x315328;}(function(_0x47f29d,_0x2356f2){const _0x77bb5d=a101_0x3153,_0x29f91d=_0x47f29d();while(!![]){try{const _0x469264=-parseInt(_0x77bb5d(0x165))/0x1+parseInt(_0x77bb5d(0x168))/0x2+-parseInt(_0x77bb5d(0x197))/0x3*(parseInt(_0x77bb5d(0x158))/0x4)+parseInt(_0x77bb5d(0x178))/0x5*(parseInt(_0x77bb5d(0x183))/0x6)+-parseInt(_0x77bb5d(0x17b))/0x7*(parseInt(_0x77bb5d(0x15f))/0x8)+parseInt(_0x77bb5d(0x19e))/0x9+-parseInt(_0x77bb5d(0x177))/0xa*(-parseInt(_0x77bb5d(0x193))/0xb);if(_0x469264===_0x2356f2)break;else _0x29f91d['push'](_0x29f91d['shift']());}catch(_0x5372da){_0x29f91d['push'](_0x29f91d['shift']());}}}(a101_0x3acd,0x79457));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_0x177775(0x1c8),'path':'/smartapi/menu/batchDelete'}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0x177775(0x16b)},MENU_DELETE_RECURSIVE_FLAG={'name':a101_0x177775(0x17d),'type':'boolean','description':'Include\x20every\x20descendant\x20of\x20the\x20exact\x20folder\x20id,\x20deleting\x20leaves\x20first'},MENU_DELETE_PLAN_OUT_FLAG={'name':'plan-out','type':a101_0x177775(0x180),'description':'Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file'},MENU_DELETE_PLAN_FLAG={'name':a101_0x177775(0x1a5),'type':a101_0x177775(0x180),'description':'Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out'};export const menuDelete={'service':a101_0x177775(0x18a),'command':a101_0x177775(0x1b8),'description':a101_0x177775(0x182),'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'(_0x2b2598){const _0x1371c1=a101_0x177775;_0x2b2598[_0x1371c1(0x1a1)]('dry-run')?validateDeleteDryRunInput(_0x2b2598):validateDeleteExecuteInput(_0x2b2598),requireExplicitYes(_0x2b2598);},async 'dryRun'(_0x57b8d1){const _0x17beed=a101_0x177775;validateDeleteDryRunInput(_0x57b8d1);const _0x27d6a7=await buildDeletePlan(_0x57b8d1),_0x1704b8=createMenuDeletePlanFile(_0x57b8d1[_0x17beed(0x1c2)],_0x27d6a7),_0x531bd9=await writeMenuDeletePlan(_0x57b8d1[_0x17beed(0x170)](_0x17beed(0x179)),_0x1704b8),_0x3dde15=mutationResult({..._0x27d6a7,'planFile':{'path':_0x531bd9,'createdAt':_0x1704b8[_0x17beed(0x1c0)],'expiresAt':_0x1704b8[_0x17beed(0x1c7)]}});return menuDryRunResult(_0x3dde15,{'method':'POST','url':_0x17beed(0x1a3),'body':{'idList':_0x3dde15[_0x17beed(0x1b7)]},'description':'Would\x20batch\x20delete\x20'+(_0x3dde15[_0x17beed(0x1b7)]?.[_0x17beed(0x187)]??0x1)+'\x20menu(s)\x20under\x20exact\x20id\x20'+_0x3dde15['selector']['id']+';\x20execution\x20must\x20consume\x20'+_0x531bd9+'.'});},async 'execute'(_0x45a7c2){const _0x112992=a101_0x177775;requireExplicitYes(_0x45a7c2),validateDeleteExecuteInput(_0x45a7c2);const _0x4489f1=await readMenuDeletePlan(_0x45a7c2[_0x112992(0x170)]('plan')),_0x4f1708=mutationPlanFromDeleteFile(_0x4489f1[_0x112992(0x1a5)],_0x4489f1[_0x112992(0x19a)]),_0x1eff87=_0x4489f1[_0x112992(0x1a5)][_0x112992(0x174)]['id'];try{assertMenuDeletePlanExecutable(_0x4489f1[_0x112992(0x1a5)],_0x45a7c2[_0x112992(0x1c2)]);}catch(_0x72e5c5){throw menuFailure(asMenuError(_0x72e5c5),_0x4f1708,{'stage':'plan-validation','failed':{'id':_0x1eff87}});}let _0x56d296,_0xed3f04;try{_0x56d296=await fetchMutationSnapshot(_0x45a7c2,_0x112992(0x1c9),_0x1eff87),_0xed3f04=assertMenuDeletePlanCurrent(_0x4489f1[_0x112992(0x1a5)],_0x45a7c2[_0x112992(0x1c2)],_0x56d296),assertDeleteTargetsComplete(_0x4489f1[_0x112992(0x1a5)],_0x56d296),_0xed3f04[_0x112992(0x188)](_0x583435=>assertDeleteSafety(_0x583435,_0x4489f1['plan'][_0x112992(0x17d)])),assertNoSharedPages(_0x56d296,_0xed3f04),assertCascadeMatchesPlan(_0x4f1708,_0xed3f04);}catch(_0x585692){throw menuFailure(asMenuError(_0x585692),_0x4f1708,{'stage':_0x112992(0x16f),'failed':{'id':_0x1eff87}});}const _0x58f954=_0x4489f1[_0x112992(0x1a5)][_0x112992(0x1b7)];let _0x4c8e26;try{_0x4c8e26=await batchDeleteMenuEntities(_0x45a7c2[_0x112992(0x191)],_0x58f954);}catch(_0x554825){const _0x3df46c=mapMenuApiError(_0x554825,_0x112992(0x171)),_0x145268=[_0x112992(0x1bd)];let _0x581397;try{_0x581397=await readDeleteOutcome(_0x45a7c2,_0x58f954);}catch(_0x286486){const _0x52b14e=describeMenuErrorCause(_0x286486,_0x112992(0x159),_0x1eff87);_0x145268['push'](_0x112992(0x164)+_0x52b14e[_0x112992(0x189)]+_0x112992(0x1c6)+_0x52b14e[_0x112992(0x1c5)]);throw menuFailure(_0x3df46c,_0x4f1708,{'stage':_0x112992(0x16d),'failed':{'targetIds':_0x58f954,'targetIdsAbsent':_0x112992(0x15c),..._0x52b14e},'warnings':_0x145268,'verification':{'status':_0x112992(0x1a6),'lookupCommand':_0x112992(0x18b),'targetIds':_0x58f954}});}throw menuFailure(_0x3df46c,_0x4f1708,{'stage':_0x112992(0x16d),'succeeded':_0x581397[_0x112992(0x1b9)]['map'](_0x1d2f47=>({'id':_0x1d2f47,'deleted':!![]})),'failed':{'targetIds':_0x58f954,'absentIds':_0x581397[_0x112992(0x1b9)],'remainingIds':_0x581397[_0x112992(0x1aa)]},'warnings':_0x145268,'verification':verificationFromOutcome(_0x581397)});}if(_0x4c8e26!==_0x58f954['length']){const _0x1a5522=menuError(_0x112992(0x1b5),_0x112992(0x192)+_0x4c8e26+_0x112992(0x198)+_0x58f954[_0x112992(0x187)]+'.',_0x112992(0x18c)),_0x24a53b=[_0x112992(0x1a0)];let _0x4147ed;try{_0x4147ed=await readDeleteOutcome(_0x45a7c2,_0x58f954);}catch(_0x54f9b5){const _0x6950d7=describeMenuErrorCause(_0x54f9b5,_0x112992(0x18d),_0x1eff87);_0x24a53b[_0x112992(0x1ba)](_0x112992(0x1a8)+_0x6950d7[_0x112992(0x189)]+'):\x20'+_0x6950d7[_0x112992(0x1c5)]);throw menuFailure(_0x1a5522,_0x4f1708,{'stage':'batch-delete','failed':{'targetIds':_0x58f954,'expectedCount':_0x58f954[_0x112992(0x187)],'reportedDeletedCount':_0x4c8e26,'targetIdsAbsent':_0x112992(0x15c),..._0x6950d7},'warnings':_0x24a53b,'verification':{'status':_0x112992(0x1a6),'lookupCommand':_0x112992(0x18b),'targetIds':_0x58f954}});}throw menuFailure(_0x1a5522,_0x4f1708,{'stage':'batch-delete','succeeded':_0x4147ed[_0x112992(0x1b9)][_0x112992(0x184)](_0x2e92b7=>({'id':_0x2e92b7,'deleted':!![]})),'failed':{'targetIds':_0x58f954,'expectedCount':_0x58f954[_0x112992(0x187)],'reportedDeletedCount':_0x4c8e26,'absentIds':_0x4147ed[_0x112992(0x1b9)],'remainingIds':_0x4147ed[_0x112992(0x1aa)]},'warnings':_0x24a53b,'verification':verificationFromOutcome(_0x4147ed)});}let _0x5a644f;try{_0x5a644f=await readDeleteOutcome(_0x45a7c2,_0x58f954);}catch(_0x2dea86){const _0x5ad0da=describeMenuErrorCause(_0x2dea86,_0x112992(0x15a),_0x1eff87),_0x56ebed=asVerificationError(_0x2dea86,_0x112992(0x1b3)+_0x1eff87+_0x112992(0x17f));throw menuFailure(_0x56ebed,_0x4f1708,{'stage':_0x112992(0x172),'succeeded':_0x58f954[_0x112992(0x184)](_0x59749d=>({'id':_0x59749d,'deleteRequested':!![]})),'failed':{'id':_0x1eff87,'targetIds':_0x58f954,'targetIdsAbsent':'unconfirmed',..._0x5ad0da},'warnings':[_0x112992(0x1bf)],'verification':{'status':_0x112992(0x1a6),'lookupCommand':_0x112992(0x18b),'targetIds':_0x58f954}});}if(_0x5a644f['remainingIds'][_0x112992(0x187)]>0x0){const _0x21f3fe=menuError(_0x112992(0x1ad),_0x112992(0x176)+_0x5a644f[_0x112992(0x1aa)]['join'](',\x20')+'.','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.');throw menuFailure(_0x21f3fe,_0x4f1708,{'stage':_0x112992(0x172),'succeeded':_0x58f954['map'](_0x23512c=>({'id':_0x23512c,'deleteRequested':!![]})),'failed':{'id':_0x1eff87,'targetIds':_0x58f954,'absentIds':_0x5a644f[_0x112992(0x1b9)],'remainingIds':_0x5a644f[_0x112992(0x1aa)]},'warnings':[_0x112992(0x1a7)],'verification':verificationFromOutcome(_0x5a644f)});}const _0x2f87a6=_0x58f954['map'](_0x155264=>({'id':_0x155264,'deleted':!![]})),_0x3c2803=mutationResult({..._0x4f1708,'dryRun':![],'succeeded':_0x2f87a6,'verification':{'checkedBy':_0x112992(0x15b),'plannedSnapshotHash':_0x4f1708['snapshotHash'],'finalSnapshotHash':_0x5a644f[_0x112992(0x1af)]['hash'],'reportedDeletedCount':_0x4c8e26,'targetAbsent':!_0x5a644f[_0x112992(0x1af)]['byId'][_0x112992(0x18e)](_0x1eff87),'allTargetsAbsent':!![],'targetIds':_0x58f954}});return{'ok':!![],'data':_0x3c2803,'message':'Deleted\x20'+_0x2f87a6[_0x112992(0x187)]+_0x112992(0x185)+_0x1eff87+'.'};}};async function readDeleteOutcome(_0x35c32e,_0x475706){const _0x423104=a101_0x177775,_0x3d013e=await fetchMenuSnapshot(_0x35c32e[_0x423104(0x1c2)],_0x35c32e[_0x423104(0x191)]);return{'snapshot':_0x3d013e,'absentIds':_0x475706[_0x423104(0x173)](_0x540f66=>!_0x3d013e['byId']['has'](_0x540f66)),'remainingIds':_0x475706['filter'](_0x2667d4=>_0x3d013e['byId'][_0x423104(0x18e)](_0x2667d4))};}function verificationFromOutcome(_0x5458b4){const _0x532fef=a101_0x177775;return{'checkedBy':_0x532fef(0x15b),'absentIds':_0x5458b4[_0x532fef(0x1b9)],'remainingIds':_0x5458b4['remainingIds']};}function a101_0x3acd(){const _0x33ab3c=['trim','menu_folder_resources_invalid','The\x20batch\x20delete\x20may\x20have\x20partially\x20applied;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20creating\x20a\x20new\x20plan.','hash','The\x20batch\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','createdAt','menu_recursive_requires_folder','appCode','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','causeMessage','):\x20','expiresAt','POST','execute\x20reviewed\x20delete\x20plan','childrenIds','menus','toLowerCase','childrenCount','Recursive\x20menu\x20delete\x20plan\x20root\x20','flagMissing','436lCMrLk','read\x20menu\x20state\x20after\x20batch\x20delete\x20failure','verify\x20batch\x20delete','menu\x20list','unconfirmed','stringify','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','48QomjiR','size','message','menu_plan_invalid','join','Post-failure\x20menu\x20readback\x20failed\x20(','465922ndRCwN','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','Menu\x20tree\x20contains\x20a\x20cycle\x20at\x20menu\x20','1679414kKiGHJ','menu_tree_invalid','page\x20','Exact\x20menu\x20id\x20(required\x20with\x20--dry-run)','\x20and\x20cannot\x20be\x20deleted\x20safely.','batch-delete','Folder\x20','pre-write-plan-validation','str','batch\x20delete','verification','filter','target','byId','One\x20or\x20more\x20planned\x20menus\x20are\x20still\x20present\x20after\x20the\x20batch\x20delete\x20request:\x20','270muqmrn','65035KALbRx','plan-out','menu_non_empty','1114477IVKnpe','\x20is\x20type\x20\x22','recursive','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','string','resources','Delete\x20an\x20exact\x20menu\x20or\x20a\x20folder\x20subtree\x20from\x20a\x20reviewed\x20plan','258APGnoH','map','\x20menu(s)\x20under\x20exact\x20id\x20','\x20is\x20not\x20a\x20folder.','length','forEach','causeCode','menu','rabetbase\x20menu\x20list\x20--format\x20json','Inspect\x20the\x20latest\x20menu\x20facts\x20and\x20generate\x20a\x20new\x20delete\x20plan;\x20do\x20not\x20retry\x20this\x20plan.','read\x20menu\x20state\x20after\x20batch\x20delete\x20count\x20mismatch','has','indexOf','type','cookie','Backend\x20reported\x20','40601QcxxbT','\x20->\x20menu\x20','Deleting\x20page-bound\x20menus\x20invokes\x20the\x20platform\x27s\x20existing\x20page\x20and\x20PageSchema\x20cascade;\x20listed\x20page\x20ids\x20are\x20direct\x20menu\x20bindings.','menu_folder_has_resources','8196JOkcXU','\x20deleted\x20menus;\x20expected\x20','expect-parent-id','path','resourcesValid','get','\x20is\x20unexpectedly\x20bound\x20to\x20page\x20','6453342UsUdFP','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','The\x20batch\x20response\x20count\x20did\x20not\x20match\x20the\x20reviewed\x20target\x20count;\x20do\x20not\x20retry\x20the\x20same\x20plan.','bool','\x20still\x20references\x20','/smartapi/menu/batchDelete','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','plan','failed','The\x20backend\x20acknowledged\x20the\x20batch\x20request,\x20but\x20final\x20menu\x20facts\x20did\x20not\x20confirm\x20every\x20deletion.','Post-mismatch\x20menu\x20readback\x20failed\x20(','\x20has\x20','remainingIds','Page\x20bindings\x20are\x20referenced\x20by\x20menus\x20outside\x20the\x20delete\x20plan:\x20','add','menu_verification_failed','expect-path','snapshot','Menu\x20','folder','pageId','Batch\x20delete\x20request\x20for\x20menu\x20','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','menu_batch_delete_count_mismatch','menu_delete_page_bound','deleteOrder','delete','absentIds','push'];a101_0x3acd=function(){return _0x33ab3c;};return a101_0x3acd();}function validateDeleteDryRunInput(_0x30484d){const _0x3f54b3=a101_0x177775;validateExactId(_0x30484d);if(!hasFlag(_0x30484d,_0x3f54b3(0x179))||!_0x30484d[_0x3f54b3(0x170)](_0x3f54b3(0x179))['trim']())throw CliErrors['flagMissing'](_0x3f54b3(0x179),_0x3f54b3(0x1b4));if(hasFlag(_0x30484d,_0x3f54b3(0x1a5)))throw CliErrors['validation'](_0x3f54b3(0x17e));}function validateDeleteExecuteInput(_0x9aa46c){const _0x21d4e1=a101_0x177775;if(!hasFlag(_0x9aa46c,_0x21d4e1(0x1a5))||!_0x9aa46c[_0x21d4e1(0x170)](_0x21d4e1(0x1a5))[_0x21d4e1(0x1bb)]())throw CliErrors[_0x21d4e1(0x157)]('plan',_0x21d4e1(0x166));const _0x1c3802=['id','recursive',_0x21d4e1(0x179),_0x21d4e1(0x199),_0x21d4e1(0x1ae),'expected-children-count'][_0x21d4e1(0x173)](_0x544769=>hasFlag(_0x9aa46c,_0x544769));if(_0x1c3802[_0x21d4e1(0x187)]>0x0)throw CliErrors['validation'](_0x21d4e1(0x15e)+_0x1c3802[_0x21d4e1(0x184)](_0x25c95f=>'--'+_0x25c95f)[_0x21d4e1(0x163)](',\x20')+'.');}async function buildDeletePlan(_0x447dc4){const _0x46f2dc=a101_0x177775,_0xb5af60=validateExactId(_0x447dc4),_0x55a9e7=await fetchMutationSnapshot(_0x447dc4,'plan\x20delete',_0xb5af60),_0x386aeb=requireMenu(_0x55a9e7,_0xb5af60);assertExpectedState(_0x447dc4,_0x386aeb);const _0x3bba12=_0x447dc4[_0x46f2dc(0x1a1)](_0x46f2dc(0x17d));let _0x3bfbc7;if(_0x3bba12){if(_0x386aeb[_0x46f2dc(0x190)][_0x46f2dc(0x1bb)]()['toLowerCase']()!==_0x46f2dc(0x1b1))throw menuError(_0x46f2dc(0x1c1),_0x46f2dc(0x1b0)+_0x386aeb['id']+_0x46f2dc(0x17c)+(_0x386aeb[_0x46f2dc(0x190)]||'unknown')+'\x22;\x20--recursive\x20requires\x20a\x20folder\x20root.');_0x3bfbc7=collectDeleteTargets(_0x55a9e7,_0x386aeb),_0x3bfbc7['forEach'](_0x1fd88c=>assertDeleteSafety(_0x1fd88c,!![]));}else assertDeleteSafety(_0x386aeb),_0x3bfbc7=[_0x386aeb];assertNoSharedPages(_0x55a9e7,_0x3bfbc7);const _0x5dad8b=_0x3bfbc7[_0x46f2dc(0x184)](_0x25ce9c=>_0x25ce9c['id']),_0x238ef5=cascadeForTargets(_0x3bfbc7),_0x5c7cc8=_0x238ef5['pages'][_0x46f2dc(0x187)]>0x0?[_0x46f2dc(0x195)]:[];return mutationResult({'operation':'delete','selector':{'id':_0xb5af60,'recursive':_0x3bba12},'before':_0x386aeb,'after':null,'dryRun':!![],'backend':[...BACKEND],'plannedActions':[{'stage':'batch-delete-menu','method':_0x46f2dc(0x1c8),'path':_0x46f2dc(0x1a3),'body':{'idList':_0x5dad8b}}],'targets':_0x3bfbc7,'deleteOrder':_0x5dad8b,'snapshotHash':_0x55a9e7[_0x46f2dc(0x1be)],'cascade':_0x238ef5,'warnings':_0x5c7cc8});}function assertDeleteSafety(_0x11b170,_0x545b20=![]){const _0x3576b6=a101_0x177775,_0x15b70a=_0x11b170[_0x3576b6(0x190)][_0x3576b6(0x1bb)]()['toLowerCase']()===_0x3576b6(0x1b1);if(_0x11b170[_0x3576b6(0x155)]>0x0&&(!_0x545b20||!_0x15b70a))throw menuError(_0x3576b6(0x17a),_0x3576b6(0x1b0)+_0x11b170['id']+_0x3576b6(0x1a9)+_0x11b170[_0x3576b6(0x155)]+_0x3576b6(0x1c4),_0x3576b6(0x1a4)+_0x11b170['childrenIds'][_0x3576b6(0x163)](',\x20'));if(_0x15b70a&&_0x11b170[_0x3576b6(0x1b2)]!=null)throw menuError(_0x3576b6(0x1b6),_0x3576b6(0x16e)+_0x11b170['id']+_0x3576b6(0x19d)+_0x11b170[_0x3576b6(0x1b2)]+_0x3576b6(0x16c),'Inspect\x20the\x20folder\x20in\x20the\x20platform\x20before\x20deleting\x20it.');if(!_0x15b70a)return;if(!_0x11b170[_0x3576b6(0x19b)])throw menuError(_0x3576b6(0x1bc),_0x3576b6(0x16e)+_0x11b170['id']+'\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.',_0x3576b6(0x19f));if(_0x11b170[_0x3576b6(0x181)][_0x3576b6(0x187)]>0x0)throw menuError(_0x3576b6(0x196),_0x3576b6(0x16e)+_0x11b170['id']+_0x3576b6(0x1a2)+_0x11b170[_0x3576b6(0x181)][_0x3576b6(0x187)]+'\x20resource\x20URL(s).','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.');}function collectDeleteTargets(_0x1085d5,_0x3aa5aa){const _0x181357=[],_0x1d887f=new Set(),_0x51e6fe=new Set(),_0x2cea98=_0x49cc5d=>{const _0x5378f2=a101_0x3153;if(_0x1d887f['has'](_0x49cc5d['id']))throw menuError(_0x5378f2(0x169),_0x5378f2(0x167)+_0x49cc5d['id']+'.');if(_0x51e6fe['has'](_0x49cc5d['id']))return;_0x1d887f['add'](_0x49cc5d['id']);for(const _0x4bb755 of _0x49cc5d[_0x5378f2(0x1ca)]){const _0x1726c0=_0x1085d5[_0x5378f2(0x175)][_0x5378f2(0x19c)](_0x4bb755);if(!_0x1726c0)throw menuError(_0x5378f2(0x169),_0x5378f2(0x1b0)+_0x49cc5d['id']+'\x20references\x20missing\x20child\x20'+_0x4bb755+'.');_0x2cea98(_0x1726c0);}_0x1d887f[_0x5378f2(0x1b8)](_0x49cc5d['id']),_0x51e6fe[_0x5378f2(0x1ac)](_0x49cc5d['id']),_0x181357['push'](_0x49cc5d);};return _0x2cea98(_0x3aa5aa),_0x181357;}function assertDeleteTargetsComplete(_0x4effd1,_0x5e9268){const _0x160541=a101_0x177775,_0x426885=requireMenu(_0x5e9268,_0x4effd1['target']['id']);if(_0x4effd1['recursive']&&_0x426885[_0x160541(0x190)]['trim']()[_0x160541(0x154)]()!==_0x160541(0x1b1))throw menuError(_0x160541(0x162),_0x160541(0x156)+_0x426885['id']+_0x160541(0x186));const _0x5cc55d=_0x4effd1['recursive']?collectDeleteTargets(_0x5e9268,_0x426885)[_0x160541(0x184)](_0x2f0e31=>_0x2f0e31['id']):[_0x426885['id']];if(JSON[_0x160541(0x15d)](_0x4effd1[_0x160541(0x1b7)])!==JSON[_0x160541(0x15d)](_0x5cc55d))throw menuError(_0x160541(0x162),'Menu\x20delete\x20plan\x20does\x20not\x20contain\x20the\x20complete\x20current\x20subtree\x20in\x20leaf-first\x20order.','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20do\x20not\x20remove\x20or\x20reorder\x20targets.');}function assertNoSharedPages(_0x1d8cf5,_0x49d1f8){const _0x5ac025=a101_0x177775,_0x477a8e=new Set(_0x49d1f8[_0x5ac025(0x184)](_0x5a216f=>_0x5a216f['id'])),_0x439cc9=new Set(_0x49d1f8[_0x5ac025(0x184)](_0x4334a9=>_0x4334a9[_0x5ac025(0x1b2)])[_0x5ac025(0x173)](_0x52b639=>_0x52b639!=null));if(_0x439cc9[_0x5ac025(0x160)]===0x0)return;const _0x36d447=_0x1d8cf5[_0x5ac025(0x153)][_0x5ac025(0x173)](_0x4612b8=>!_0x477a8e[_0x5ac025(0x18e)](_0x4612b8['id'])&&_0x4612b8[_0x5ac025(0x1b2)]!=null&&_0x439cc9['has'](_0x4612b8['pageId']));if(_0x36d447[_0x5ac025(0x187)]===0x0)return;const _0x3d4528=_0x36d447[_0x5ac025(0x184)](_0x4e3d57=>_0x5ac025(0x16a)+_0x4e3d57[_0x5ac025(0x1b2)]+_0x5ac025(0x194)+_0x4e3d57['id'])[_0x5ac025(0x163)](',\x20');throw menuError('menu_page_shared',_0x5ac025(0x1ab)+_0x3d4528+'.','Keep\x20every\x20shared\x20page\x20reference\x20outside\x20this\x20operation,\x20or\x20choose\x20a\x20folder\x20whose\x20complete\x20subtree\x20contains\x20all\x20references.');}function assertCascadeMatchesPlan(_0x3e5836,_0x193498){const _0x3ce5e7=a101_0x177775,_0x3e0cf8=cascadeForTargets(_0x193498);if(JSON['stringify'](_0x3e5836['cascade'])!==JSON[_0x3ce5e7(0x15d)](_0x3e0cf8))throw menuError(_0x3ce5e7(0x162),_0x3ce5e7(0x1c3));}function cascadeForTargets(_0x41a57d){const _0x15ae1a=a101_0x177775,_0x2e04b8=_0x41a57d[_0x15ae1a(0x184)](_0x345e6d=>_0x345e6d['pageId'])[_0x15ae1a(0x173)](_0x44c656=>_0x44c656!=null)['filter']((_0xd597da,_0xb34bd8,_0x5b1624)=>_0x5b1624[_0x15ae1a(0x18f)](_0xd597da)===_0xb34bd8);return{'pages':_0x2e04b8,'pageSchemaAffected':_0x2e04b8[_0x15ae1a(0x187)]>0x0};}function asMenuError(_0x49721a){const _0x4859eb=a101_0x177775;return _0x49721a instanceof CliError?_0x49721a:menuError('menu_plan_invalid',_0x49721a instanceof Error?_0x49721a[_0x4859eb(0x161)]:String(_0x49721a));}