@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.10-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 (258) 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/group-create.js +1 -1
  104. package/lib/commands/menu/group-update.js +1 -1
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -1
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -1
  110. package/lib/commands/menu/shared/facts.js +1 -1
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -1
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -1
  177. package/lib/commands/task/status.js +1 -1
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -1
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -1
  215. package/lib/framework/explicit-yes.js +1 -1
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- const a93_0x2a7f31=a93_0x536f;(function(_0x4f176e,_0x28af01){const _0x157c86=a93_0x536f,_0xa3c83f=_0x4f176e();while(!![]){try{const _0x329bfd=-parseInt(_0x157c86(0x1b6))/0x1+parseInt(_0x157c86(0x1ce))/0x2*(-parseInt(_0x157c86(0x1cf))/0x3)+parseInt(_0x157c86(0x1c2))/0x4*(-parseInt(_0x157c86(0x1e5))/0x5)+parseInt(_0x157c86(0x1f1))/0x6+parseInt(_0x157c86(0x1de))/0x7+-parseInt(_0x157c86(0x1e1))/0x8+parseInt(_0x157c86(0x1c6))/0x9;if(_0x329bfd===_0x28af01)break;else _0xa3c83f['push'](_0xa3c83f['shift']());}catch(_0x368cda){_0xa3c83f['push'](_0xa3c83f['shift']());}}}(a93_0x1eed,0xb8493));import a93_0x27a773 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a93_0x536f(_0x540550,_0x4125c6){_0x540550=_0x540550-0x19e;const _0x1eedc9=a93_0x1eed();let _0x536fcc=_0x1eedc9[_0x540550];return _0x536fcc;}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';function a93_0x1eed(){const _0x4bc793=['repeat','apps','raw','appcode','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','1098982LgljTH','(none)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','source','padEnd','(no\x20file)','status','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4hNwCOz','(not\x20found)','length','cookie','3743262gigoMl','log','✓\x20Valid\x20JSON','slice','value','arch','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','18PLCRXR','41766TtcRro','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(set,\x20length=','bold','verbose','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','message','Project','explicitAppName','apiDir','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20─','⚠\x20Empty\x20(treated\x20as\x20{})','10146906TCfkkw','\x20←\x20current','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1137032uqhJDb','empty','(default)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','3843685yRGbOM','\x20\x20Config\x20JSON','doctor','\x20\x20Merged\x20Config','\x20doctor','missing','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','gray','pageSize','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','6147030ywuSgF','\x20\x20explicitAppName:\x20','✗\x20Invalid\x20JSON','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','check','defaultApp','read','Global','(set\x20via\x20file,\x20length=','red','format','\x20\x20API\x20Endpoints','accessKey','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','keys','green','(missing)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files'];a93_0x1eed=function(){return _0x4bc793;};return a93_0x1eed();}import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x2b27f4){const _0x492dc6=a93_0x536f,_0x33623f=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x492dc6(0x1c9)](0x0,0xa)+')':VERSION,_0x4669a7=buildConfigFromFlags({}),_0x4728dd=getCookie();console[_0x492dc6(0x1c7)](),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1d2)](CLI_BIN_NAME+_0x492dc6(0x1e9))),console['log'](a93_0x27a773[_0x492dc6(0x1ec)]('─'[_0x492dc6(0x1ae)](0x32))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1d0)+_0x33623f),console['log'](_0x492dc6(0x1b2)+process['version']),console[_0x492dc6(0x1c7)](_0x492dc6(0x1d4)+process['platform']+'\x20'+process[_0x492dc6(0x1cb)]),console['log'](),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1d2)](_0x492dc6(0x1ad))),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1ec)]('\x20\x20─'[_0x492dc6(0x1ae)](0x1e)));const _0xdbe8a=getGlobalConfigPath(),_0x3e0df2=getProjectConfigPath();console[_0x492dc6(0x1c7)](_0x492dc6(0x1c1)+(_0xdbe8a||a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1c3)))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1e4)+(_0x3e0df2||a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1c3)))),console['log'](),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1d2)](_0x492dc6(0x1e6))),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1dc)[_0x492dc6(0x1ae)](0x1e)));const _0x20b15e=(_0x43aefd,_0x22a9cf)=>{const _0x22d512=_0x492dc6;if(!_0x22a9cf){console[_0x22d512(0x1c7)]('\x20\x20'+_0x43aefd[_0x22d512(0x1be)](0x11)+'\x20'+a93_0x27a773['gray'](_0x22d512(0x1bf)));return;}const _0x4b1e05=inspectCliConfigJsonFile(_0x22a9cf);if(_0x4b1e05[_0x22d512(0x1c0)]==='ok')console[_0x22d512(0x1c7)]('\x20\x20'+_0x43aefd[_0x22d512(0x1be)](0x11)+'\x20'+a93_0x27a773[_0x22d512(0x1aa)](_0x22d512(0x1c8)));else{if(_0x4b1e05[_0x22d512(0x1c0)]===_0x22d512(0x1e2))console[_0x22d512(0x1c7)]('\x20\x20'+_0x43aefd[_0x22d512(0x1be)](0x11)+'\x20'+a93_0x27a773[_0x22d512(0x1a8)](_0x22d512(0x1dd)));else _0x4b1e05[_0x22d512(0x1c0)]===_0x22d512(0x1ea)?console[_0x22d512(0x1c7)]('\x20\x20'+_0x43aefd[_0x22d512(0x1be)](0x11)+'\x20'+a93_0x27a773['gray'](_0x22d512(0x1ab))):(console[_0x22d512(0x1c7)]('\x20\x20'+_0x43aefd['padEnd'](0x11)+'\x20'+a93_0x27a773[_0x22d512(0x1a3)](_0x22d512(0x1f3))),console[_0x22d512(0x1c7)]('\x20\x20'+''[_0x22d512(0x1be)](0x11)+'\x20'+a93_0x27a773['red'](_0x4b1e05[_0x22d512(0x1d6)])));}};_0x20b15e(_0x492dc6(0x1a1),_0xdbe8a),_0x20b15e(_0x492dc6(0x1d7),_0x3e0df2),console[_0x492dc6(0x1c7)](),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1d2)](_0x492dc6(0x1e8))),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1dc)[_0x492dc6(0x1ae)](0x1e))),console['log'](_0x492dc6(0x1ac)+(_0x4669a7['appCode']||a93_0x27a773[_0x492dc6(0x1a3)]('(not\x20set)'))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1ee)+_0x4669a7['env']),console['log'](_0x492dc6(0x1bb)+_0x4669a7['locale']),console[_0x492dc6(0x1c7)](_0x492dc6(0x1b8)+_0x4669a7[_0x492dc6(0x1d9)]),console[_0x492dc6(0x1c7)](_0x492dc6(0x1cd)+(_0x4669a7[_0x492dc6(0x19f)]||a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1b7)))),console[_0x492dc6(0x1c7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x4669a7[_0x492dc6(0x1b3)]||a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1b7)))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1f2)+(_0x4669a7[_0x492dc6(0x1d8)]||a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1b7)))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1da)+(_0x4669a7[_0x492dc6(0x1a4)]||a93_0x27a773[_0x492dc6(0x1ec)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x492dc6(0x1a4)]+')'))),console[_0x492dc6(0x1c7)](_0x492dc6(0x1bc)+(_0x4669a7[_0x492dc6(0x1ed)]??a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1e3)))),console[_0x492dc6(0x1c7)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x4669a7['riskLevel']),console[_0x492dc6(0x1c7)](_0x492dc6(0x1f0)+_0x4669a7[_0x492dc6(0x1d3)]),console['log'](_0x492dc6(0x1a7)+(_0x4669a7[_0x492dc6(0x1c5)]?a93_0x27a773['green']('(set,\x20length='+_0x4669a7[_0x492dc6(0x1c5)]['length']+')'):_0x4728dd?a93_0x27a773[_0x492dc6(0x1aa)](_0x492dc6(0x1a2)+_0x4728dd[_0x492dc6(0x1c4)]+')'):a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1b7))));const _0xea0168=Object[_0x492dc6(0x1a9)](_0x4669a7[_0x492dc6(0x1af)]);if(_0xea0168[_0x492dc6(0x1c4)]>0x0){console[_0x492dc6(0x1c7)](),console['log'](a93_0x27a773['bold'](_0x492dc6(0x1ba))),console[_0x492dc6(0x1c7)](a93_0x27a773['gray'](_0x492dc6(0x1dc)[_0x492dc6(0x1ae)](0x1e)));for(const _0x1cb007 of _0xea0168){const _0xe2a7de=_0x4669a7['apps'][_0x1cb007],_0x12615c=_0x1cb007===_0x4669a7[_0x492dc6(0x19f)],_0x2001b4=_0x1cb007===_0x4669a7[_0x492dc6(0x1b3)],_0x7cf5b5=_0x2001b4?a93_0x27a773[_0x492dc6(0x1aa)](_0x492dc6(0x1df)):'',_0x57e6be=_0x12615c?'\x20(default)':'';console[_0x492dc6(0x1c7)]('\x20\x20'+_0x1cb007+_0x57e6be+_0x7cf5b5),console[_0x492dc6(0x1c7)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0xe2a7de[_0x492dc6(0x1b1)]);const _0x3b3950=buildAppDoctorFields(_0xe2a7de,{'env':_0x4669a7[_0x492dc6(0x1ef)],'apiDir':_0x4669a7[_0x492dc6(0x1b0)][_0x492dc6(0x1d9)]||DEFAULT_CONFIG_VALUES[_0x492dc6(0x1d9)],'cookie':_0x4669a7[_0x492dc6(0x1c5)]||_0x4728dd||undefined,'accessKey':_0x4669a7[_0x492dc6(0x1a6)]});console[_0x492dc6(0x1c7)](_0x492dc6(0x1b9)+_0x3b3950[_0x492dc6(0x1ef)][_0x492dc6(0x1ca)]+'\x20\x20'+a93_0x27a773['gray']('('+_0x3b3950['env']['source']+')')),console[_0x492dc6(0x1c7)](_0x492dc6(0x1f4)+_0x3b3950[_0x492dc6(0x1d9)]['value']+'\x20\x20'+a93_0x27a773[_0x492dc6(0x1ec)]('('+_0x3b3950[_0x492dc6(0x1d9)][_0x492dc6(0x1bd)]+')'));const _0x547710=_0x3b3950['cookie'][_0x492dc6(0x1ca)]?a93_0x27a773[_0x492dc6(0x1aa)](_0x492dc6(0x1d1)+_0x3b3950['cookie']['value'][_0x492dc6(0x1c4)]+')'):a93_0x27a773[_0x492dc6(0x1ec)](_0x492dc6(0x1b7));console[_0x492dc6(0x1c7)](_0x492dc6(0x1b4)+_0x547710+'\x20\x20'+a93_0x27a773[_0x492dc6(0x1ec)]('('+_0x3b3950[_0x492dc6(0x1c5)][_0x492dc6(0x1bd)]+')'));const _0x295849=_0x3b3950[_0x492dc6(0x1a6)][_0x492dc6(0x1ca)]?a93_0x27a773[_0x492dc6(0x1aa)](_0x492dc6(0x1d1)+_0x3b3950[_0x492dc6(0x1a6)]['value'][_0x492dc6(0x1c4)]+')'):a93_0x27a773['gray'](_0x492dc6(0x1b7));console[_0x492dc6(0x1c7)](_0x492dc6(0x1cc)+_0x295849+'\x20\x20'+a93_0x27a773[_0x492dc6(0x1ec)]('('+_0x3b3950[_0x492dc6(0x1a6)]['source']+')'));}}console[_0x492dc6(0x1c7)](),console['log'](a93_0x27a773[_0x492dc6(0x1d2)](_0x492dc6(0x1a5))),console[_0x492dc6(0x1c7)](a93_0x27a773[_0x492dc6(0x1ec)]('\x20\x20─'['repeat'](0x1e))),console[_0x492dc6(0x1c7)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x492dc6(0x1eb)+getUserDomain()),console[_0x492dc6(0x1c7)](_0x492dc6(0x1db)+getRuntimeDomain()),console[_0x492dc6(0x1c7)](),console['log'](a93_0x27a773[_0x492dc6(0x1d2)]('\x20\x20Auth')),console[_0x492dc6(0x1c7)](a93_0x27a773['gray'](_0x492dc6(0x1dc)[_0x492dc6(0x1ae)](0x1e)));if(_0x4728dd){const _0x159e80=await getIsSessionValid();console['log'](_0x492dc6(0x1e0)+(_0x159e80?a93_0x27a773[_0x492dc6(0x1aa)](_0x492dc6(0x1d5)):a93_0x27a773['red']('✗\x20Expired')));}else console[_0x492dc6(0x1c7)](_0x492dc6(0x1e0)+a93_0x27a773['red'](_0x492dc6(0x1b5)));return console[_0x492dc6(0x1c7)](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x2a7f31(0x1e7),'command':a93_0x2a7f31(0x19e),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a93_0x2a7f31(0x1a0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a93_0x2175(){const _0x14bd4d=['593316wUvWSD','1267644xJtNZl','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','appCode','(no\x20file)','riskLevel','currentApp','71294gQKmFw','locale','(not\x20set)','\x20\x20\x20\x20accessKey:\x20\x20','(not\x20found)','✗\x20Not\x20logged\x20in','\x20\x20Auth','read','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','red','\x20\x20Apps','bold','174tnQyFd','empty','apiDir','\x20\x20Config\x20Files','defaultApp','✓\x20Valid\x20JSON','(default)','unknown','(set\x20via\x20file,\x20length=','slice','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','raw','\x20←\x20current','\x20(default)','✗\x20Invalid\x20JSON','\x20\x20explicitAppName:\x20','402104FCYURQ','green','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','apps','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','explicitAppName','33ggmKVz','✓\x20Valid','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','132517OpDQfY','status','keys','appcode','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(missing)','40mymORo','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','87xzgsvo','355064gMXCzT','\x20\x20Merged\x20Config','env','repeat','source','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','message','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','cookie','check','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','log','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','format','(set,\x20length=','length','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','verbose','(none)','25OmgeZH','missing','value','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','yellow','accessKey','\x20\x20Config\x20JSON','✗\x20Expired','1066410GTMQwq'];a93_0x2175=function(){return _0x14bd4d;};return a93_0x2175();}const a93_0xb968f6=a93_0x9970;(function(_0x3dbf0e,_0x2201b4){const _0x1a2416=a93_0x9970,_0x195dcd=_0x3dbf0e();while(!![]){try{const _0x7b10b9=-parseInt(_0x1a2416(0x8c))/0x1+-parseInt(_0x1a2416(0xb3))/0x2*(-parseInt(_0x1a2416(0x8b))/0x3)+parseInt(_0x1a2416(0xcf))/0x4*(parseInt(_0x1a2416(0xa2))/0x5)+parseInt(_0x1a2416(0xbf))/0x6*(-parseInt(_0x1a2416(0x82))/0x7)+parseInt(_0x1a2416(0x88))/0x8*(-parseInt(_0x1a2416(0xab))/0x9)+parseInt(_0x1a2416(0xaa))/0xa*(parseInt(_0x1a2416(0x7e))/0xb)+parseInt(_0x1a2416(0xac))/0xc;if(_0x7b10b9===_0x2201b4)break;else _0x195dcd['push'](_0x195dcd['shift']());}catch(_0x5f43c0){_0x195dcd['push'](_0x195dcd['shift']());}}}(a93_0x2175,0xb1cce));import a93_0xd52201 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a93_0x9970(_0x45ad6a,_0x22578a){_0x45ad6a=_0x45ad6a-0x7a;const _0x217549=a93_0x2175();let _0x997081=_0x217549[_0x45ad6a];return _0x997081;}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x2264d0){const _0x5111f0=a93_0x9970,_0x173477=GIT_COMMIT!==_0x5111f0(0xc6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5111f0(0xc8)](0x0,0xa)+')':VERSION,_0x129307=buildConfigFromFlags({}),_0x2482e6=getCookie();console[_0x5111f0(0x99)](),console[_0x5111f0(0x99)](a93_0xd52201['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x5111f0(0x99)](a93_0xd52201['gray']('─'[_0x5111f0(0x8f)](0x32))),console[_0x5111f0(0x99)](_0x5111f0(0x81)+_0x173477),console[_0x5111f0(0x99)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console['log'](_0x5111f0(0x80)+process['platform']+'\x20'+process[_0x5111f0(0x98)]),console['log'](),console['log'](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0xc2))),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xae)]('\x20\x20─'['repeat'](0x1e)));const _0x2fd988=getGlobalConfigPath(),_0x35d607=getProjectConfigPath();console['log'](_0x5111f0(0xc9)+(_0x2fd988||a93_0xd52201[_0x5111f0(0xae)]('(not\x20found)'))),console[_0x5111f0(0x99)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x35d607||a93_0xd52201['gray'](_0x5111f0(0xb7)))),console[_0x5111f0(0x99)](),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0xa8))),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xae)]('\x20\x20─'['repeat'](0x1e)));const _0x149092=(_0x35dfee,_0x4924e8)=>{const _0x13362e=_0x5111f0;if(!_0x4924e8){console[_0x13362e(0x99)]('\x20\x20'+_0x35dfee[_0x13362e(0x7c)](0x11)+'\x20'+a93_0xd52201['gray'](_0x13362e(0xb0)));return;}const _0x158b9f=inspectCliConfigJsonFile(_0x4924e8);if(_0x158b9f[_0x13362e(0x83)]==='ok')console[_0x13362e(0x99)]('\x20\x20'+_0x35dfee['padEnd'](0x11)+'\x20'+a93_0xd52201['green'](_0x13362e(0xc4)));else{if(_0x158b9f[_0x13362e(0x83)]===_0x13362e(0xc0))console[_0x13362e(0x99)]('\x20\x20'+_0x35dfee[_0x13362e(0x7c)](0x11)+'\x20'+a93_0xd52201[_0x13362e(0xa6)](_0x13362e(0x89)));else _0x158b9f['status']===_0x13362e(0xa3)?console['log']('\x20\x20'+_0x35dfee[_0x13362e(0x7c)](0x11)+'\x20'+a93_0xd52201[_0x13362e(0xae)](_0x13362e(0x87))):(console[_0x13362e(0x99)]('\x20\x20'+_0x35dfee[_0x13362e(0x7c)](0x11)+'\x20'+a93_0xd52201[_0x13362e(0xbc)](_0x13362e(0xcd))),console['log']('\x20\x20'+''[_0x13362e(0x7c)](0x11)+'\x20'+a93_0xd52201[_0x13362e(0xbc)](_0x158b9f[_0x13362e(0x93)])));}};_0x149092('Global',_0x2fd988),_0x149092('Project',_0x35d607),console['log'](),console['log'](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0x8d))),console[_0x5111f0(0x99)](a93_0xd52201['gray'](_0x5111f0(0x92)[_0x5111f0(0x8f)](0x1e))),console[_0x5111f0(0x99)](_0x5111f0(0x9e)+(_0x129307[_0x5111f0(0xaf)]||a93_0xd52201[_0x5111f0(0xbc)](_0x5111f0(0xb5)))),console[_0x5111f0(0x99)](_0x5111f0(0x8a)+_0x129307['env']),console[_0x5111f0(0x99)](_0x5111f0(0xd1)+_0x129307[_0x5111f0(0xb4)]),console[_0x5111f0(0x99)](_0x5111f0(0xd2)+_0x129307['apiDir']),console[_0x5111f0(0x99)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x129307[_0x5111f0(0xc3)]||a93_0xd52201['gray'](_0x5111f0(0xa1)))),console['log'](_0x5111f0(0x86)+(_0x129307[_0x5111f0(0xb2)]||a93_0xd52201[_0x5111f0(0xae)](_0x5111f0(0xa1)))),console['log'](_0x5111f0(0xce)+(_0x129307[_0x5111f0(0x7d)]||a93_0xd52201[_0x5111f0(0xae)]('(none)'))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x129307[_0x5111f0(0x9b)]||a93_0xd52201[_0x5111f0(0xae)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x5111f0(0x9b)]+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x129307['pageSize']??a93_0xd52201[_0x5111f0(0xae)](_0x5111f0(0xc5)))),console[_0x5111f0(0x99)](_0x5111f0(0x91)+_0x129307[_0x5111f0(0xb1)]),console[_0x5111f0(0x99)](_0x5111f0(0xad)+_0x129307[_0x5111f0(0xa0)]),console[_0x5111f0(0x99)](_0x5111f0(0x7b)+(_0x129307['cookie']?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0x9c)+_0x129307[_0x5111f0(0x95)][_0x5111f0(0x9d)]+')'):_0x2482e6?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0xc7)+_0x2482e6[_0x5111f0(0x9d)]+')'):a93_0xd52201['gray'](_0x5111f0(0xa1))));const _0x2b5dc8=Object[_0x5111f0(0x84)](_0x129307[_0x5111f0(0x7a)]);if(_0x2b5dc8[_0x5111f0(0x9d)]>0x0){console['log'](),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0xbd))),console[_0x5111f0(0x99)](a93_0xd52201['gray'](_0x5111f0(0x92)[_0x5111f0(0x8f)](0x1e)));for(const _0x262acb of _0x2b5dc8){const _0x51c122=_0x129307[_0x5111f0(0x7a)][_0x262acb],_0x545a3f=_0x262acb===_0x129307[_0x5111f0(0xc3)],_0x509ed0=_0x262acb===_0x129307[_0x5111f0(0xb2)],_0x1dff08=_0x509ed0?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0xcb)):'',_0x491c9d=_0x545a3f?_0x5111f0(0xcc):'';console[_0x5111f0(0x99)]('\x20\x20'+_0x262acb+_0x491c9d+_0x1dff08),console[_0x5111f0(0x99)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x51c122[_0x5111f0(0x85)]);const _0xd505ac=buildAppDoctorFields(_0x51c122,{'env':_0x129307[_0x5111f0(0x8e)],'apiDir':_0x129307[_0x5111f0(0xca)][_0x5111f0(0xc1)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x129307[_0x5111f0(0x95)]||_0x2482e6||undefined,'accessKey':_0x129307[_0x5111f0(0xa7)]});console[_0x5111f0(0x99)](_0x5111f0(0x9a)+_0xd505ac[_0x5111f0(0x8e)]['value']+'\x20\x20'+a93_0xd52201[_0x5111f0(0xae)]('('+_0xd505ac[_0x5111f0(0x8e)][_0x5111f0(0x90)]+')')),console['log'](_0x5111f0(0xa5)+_0xd505ac['apiDir'][_0x5111f0(0xa4)]+'\x20\x20'+a93_0xd52201[_0x5111f0(0xae)]('('+_0xd505ac[_0x5111f0(0xc1)][_0x5111f0(0x90)]+')'));const _0x4f7b71=_0xd505ac[_0x5111f0(0x95)]['value']?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0x9c)+_0xd505ac[_0x5111f0(0x95)]['value'][_0x5111f0(0x9d)]+')'):a93_0xd52201['gray'](_0x5111f0(0xa1));console[_0x5111f0(0x99)](_0x5111f0(0xbb)+_0x4f7b71+'\x20\x20'+a93_0xd52201[_0x5111f0(0xae)]('('+_0xd505ac[_0x5111f0(0x95)][_0x5111f0(0x90)]+')'));const _0x483450=_0xd505ac[_0x5111f0(0xa7)]['value']?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0x9c)+_0xd505ac[_0x5111f0(0xa7)]['value'][_0x5111f0(0x9d)]+')'):a93_0xd52201[_0x5111f0(0xae)]('(none)');console[_0x5111f0(0x99)](_0x5111f0(0xb6)+_0x483450+'\x20\x20'+a93_0xd52201[_0x5111f0(0xae)]('('+_0xd505ac[_0x5111f0(0xa7)][_0x5111f0(0x90)]+')'));}}console[_0x5111f0(0x99)](),console['log'](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0xd3))),console['log'](a93_0xd52201['gray']('\x20\x20─'[_0x5111f0(0x8f)](0x1e))),console[_0x5111f0(0x99)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5111f0(0x99)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x5111f0(0x99)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5111f0(0x99)](),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xbe)](_0x5111f0(0xb9))),console[_0x5111f0(0x99)](a93_0xd52201[_0x5111f0(0xae)](_0x5111f0(0x92)['repeat'](0x1e)));if(_0x2482e6){const _0x42b115=await getIsSessionValid();console[_0x5111f0(0x99)](_0x5111f0(0x97)+(_0x42b115?a93_0xd52201[_0x5111f0(0xd0)](_0x5111f0(0x7f)):a93_0xd52201[_0x5111f0(0xbc)](_0x5111f0(0xa9))));}else console[_0x5111f0(0x99)](_0x5111f0(0x97)+a93_0xd52201[_0x5111f0(0xbc)](_0x5111f0(0xb8)));return console[_0x5111f0(0x99)](),{'ok':!![]};}export const doctorDefinition={'service':a93_0xb968f6(0x9f),'command':a93_0xb968f6(0x96),'description':a93_0xb968f6(0x94),'risk':a93_0xb968f6(0xba),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a94_0x2f0914=a94_0x23cd;(function(_0x844780,_0x36a2e2){const _0x595cee=a94_0x23cd,_0x21cc51=_0x844780();while(!![]){try{const _0x28df16=parseInt(_0x595cee(0x8c))/0x1+parseInt(_0x595cee(0xa9))/0x2+parseInt(_0x595cee(0x95))/0x3+parseInt(_0x595cee(0x99))/0x4+parseInt(_0x595cee(0x9b))/0x5*(-parseInt(_0x595cee(0x88))/0x6)+-parseInt(_0x595cee(0x9c))/0x7*(-parseInt(_0x595cee(0x8d))/0x8)+parseInt(_0x595cee(0x8f))/0x9*(-parseInt(_0x595cee(0x98))/0xa);if(_0x28df16===_0x36a2e2)break;else _0x21cc51['push'](_0x21cc51['shift']());}catch(_0x430738){_0x21cc51['push'](_0x21cc51['shift']());}}}(a94_0x36cc,0x8a617));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a94_0x23cd(_0x4096c4,_0x1975fd){_0x4096c4=_0x4096c4-0x88;const _0x36cc7d=a94_0x36cc();let _0x23cdf6=_0x36cc7d[_0x4096c4];return _0x23cdf6;}import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x2f0914(0x94),'type':a94_0x2f0914(0xa4),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a94_0x2f0914(0x90),'type':'string','required':!![],'description':a94_0x2f0914(0x9f)},DOWNLOAD_FLAG={'name':'download','type':a94_0x2f0914(0x8e),'description':a94_0x2f0914(0xa2)},LONG_TERM_FLAG={'name':a94_0x2f0914(0x8a),'type':a94_0x2f0914(0x8e),'description':a94_0x2f0914(0xa7)};function requireFilePath(_0x50f8ba){const _0x1a6089=a94_0x2f0914,_0xf56115=_0x50f8ba[_0x1a6089(0xa3)]();if(!_0xf56115)throw CliErrors[_0x1a6089(0x8b)](_0x1a6089(0x89));return _0xf56115;}const fileUpload={'service':a94_0x2f0914(0x94),'command':a94_0x2f0914(0x97),'description':a94_0x2f0914(0x92),'risk':a94_0x2f0914(0x9e),'flags':[FILE_FLAG],async 'dryRun'(_0x2d82f8){const _0x57db5d=a94_0x2f0914,_0x555eaa=requireDevelopmentUploadFile(_0x2d82f8[_0x57db5d(0xa6)](_0x57db5d(0x94)),_0x57db5d(0xa5));return{'method':'POST','url':_0x57db5d(0x93),'body':{'appCode':_0x2d82f8[_0x57db5d(0x96)],'multipart':{'file':_0x555eaa}},'description':_0x57db5d(0xac)+_0x555eaa[_0x57db5d(0xa1)]+_0x57db5d(0xa8)+_0x2d82f8[_0x57db5d(0x96)]};},async 'execute'(_0x2fabc8){const _0x2927fd=a94_0x2f0914,_0x3e1922=requireDevelopmentUploadFile(_0x2fabc8[_0x2927fd(0xa6)](_0x2927fd(0x94)),_0x2927fd(0xa5)),_0x25736e=await uploadDevelopmentFile(_0x2fabc8['appCode'],_0x3e1922[_0x2927fd(0xa1)]);return{'ok':!![],'data':_0x25736e,'message':_0x25736e[_0x2927fd(0x9d)]?'Uploaded\x20file:\x20'+_0x25736e[_0x2927fd(0x9d)]+_0x2927fd(0xab):_0x2927fd(0xa0)};}},fileQueryUrl={'service':a94_0x2f0914(0x94),'command':'query-url','description':a94_0x2f0914(0x91),'risk':a94_0x2f0914(0x9a),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x46f8a7){const _0x5e03cc=a94_0x2f0914,_0x13f7fc=requireFilePath(_0x46f8a7['str'](_0x5e03cc(0x90))),_0x317c20=await queryDevelopmentFileUrl(_0x13f7fc,{'download':_0x46f8a7[_0x5e03cc(0xaa)]('download'),'longTerm':_0x46f8a7[_0x5e03cc(0xaa)](_0x5e03cc(0x8a))});return{'ok':!![],'data':_0x317c20};}};function a94_0x36cc(){const _0x3283f4=['str','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','\x20to\x20development\x20app\x20','326258FMinHr','bool','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Preview:\x20upload\x20','78GIowGH','filePath\x20is\x20required.','long-term','validation','610336zkbePO','343352rvpTxt','boolean','1150569DbnjzH','filepath','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','/smartapi/common/uploadFile','file','872379VUYJuy','appCode','upload','160IKkhrP','4356964yYROLr','read','236235yoOPzh','175ybQBec','filePath','write','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','path','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','trim','string','File'];a94_0x36cc=function(){return _0x3283f4;};return a94_0x36cc();}export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a94_0xa72979=a94_0x5ed0;(function(_0x5ccdf6,_0x5942b9){const _0x288071=a94_0x5ed0,_0x49c90b=_0x5ccdf6();while(!![]){try{const _0x46fed6=parseInt(_0x288071(0x17d))/0x1*(parseInt(_0x288071(0x184))/0x2)+parseInt(_0x288071(0x179))/0x3*(parseInt(_0x288071(0x186))/0x4)+parseInt(_0x288071(0x187))/0x5+parseInt(_0x288071(0x17a))/0x6*(parseInt(_0x288071(0x182))/0x7)+-parseInt(_0x288071(0x176))/0x8+-parseInt(_0x288071(0x17c))/0x9*(parseInt(_0x288071(0x18b))/0xa)+-parseInt(_0x288071(0x16e))/0xb;if(_0x46fed6===_0x5942b9)break;else _0x49c90b['push'](_0x49c90b['shift']());}catch(_0x4d7180){_0x49c90b['push'](_0x49c90b['shift']());}}}(a94_0x2b55,0x5fbec));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x5ed0(_0x4fd595,_0x2f54a5){_0x4fd595=_0x4fd595-0x16e;const _0x2b55d6=a94_0x2b55();let _0x5ed0f3=_0x2b55d6[_0x4fd595];return _0x5ed0f3;}function a94_0x2b55(){const _0x4d8ff0=['query-url','6332161isCjPh','filePath','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','str','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','file','Preview:\x20upload\x20','1911128LEYqmT','path','trim','9qouIdl','624924CbybLO','POST','72TWlCAT','19ZFsMFd','read','bool','validation','File','42pbpaWB','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','11852HuuQMt','appCode','219380SqLdtH','2854905DlsKNC','string','filepath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','332900TGaBlC','long-term','download','boolean'];a94_0x2b55=function(){return _0x4d8ff0;};return a94_0x2b55();}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0xa72979(0x174),'type':a94_0xa72979(0x188),'required':!![],'description':a94_0xa72979(0x18a)},FILEPATH_FLAG={'name':a94_0xa72979(0x189),'type':'string','required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a94_0xa72979(0x18d),'type':'boolean','description':a94_0xa72979(0x173)},LONG_TERM_FLAG={'name':a94_0xa72979(0x18c),'type':a94_0xa72979(0x18e),'description':a94_0xa72979(0x183)};function requireFilePath(_0xe1b875){const _0x410fa6=a94_0xa72979,_0xa5b252=_0xe1b875[_0x410fa6(0x178)]();if(!_0xa5b252)throw CliErrors[_0x410fa6(0x180)]('filePath\x20is\x20required.');return _0xa5b252;}const fileUpload={'service':a94_0xa72979(0x174),'command':'upload','description':a94_0xa72979(0x171),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x37798d){const _0x3d6186=a94_0xa72979,_0x4d0534=requireDevelopmentUploadFile(_0x37798d[_0x3d6186(0x172)](_0x3d6186(0x174)),_0x3d6186(0x181));return{'method':_0x3d6186(0x17b),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x37798d[_0x3d6186(0x185)],'multipart':{'file':_0x4d0534}},'description':_0x3d6186(0x175)+_0x4d0534['path']+'\x20to\x20development\x20app\x20'+_0x37798d[_0x3d6186(0x185)]};},async 'execute'(_0x5708df){const _0x854d0a=a94_0xa72979,_0x376d62=requireDevelopmentUploadFile(_0x5708df[_0x854d0a(0x172)](_0x854d0a(0x174)),_0x854d0a(0x181)),_0x3840fa=await uploadDevelopmentFile(_0x5708df['appCode'],_0x376d62[_0x854d0a(0x177)]);return{'ok':!![],'data':_0x3840fa,'message':_0x3840fa[_0x854d0a(0x16f)]?'Uploaded\x20file:\x20'+_0x3840fa[_0x854d0a(0x16f)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x854d0a(0x170)};}},fileQueryUrl={'service':a94_0xa72979(0x174),'command':a94_0xa72979(0x18f),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a94_0xa72979(0x17e),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x5307ae){const _0x35cbb0=a94_0xa72979,_0x1aa2eb=requireFilePath(_0x5307ae[_0x35cbb0(0x172)](_0x35cbb0(0x189))),_0x2f1021=await queryDevelopmentFileUrl(_0x1aa2eb,{'download':_0x5307ae[_0x35cbb0(0x17f)](_0x35cbb0(0x18d)),'longTerm':_0x5307ae[_0x35cbb0(0x17f)](_0x35cbb0(0x18c))});return{'ok':!![],'data':_0x2f1021};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- function a95_0x18ca(){const _0x567009=['21315GcIhfx','\x20\x20Default:\x20','flagMissing','1144sQbSsx','24WWLZCs','bool','yes','\x20\x20Apps:\x20','Target\x20environment','defaultApp','9TWJvjI','../../commands/project/init.js','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','cwd','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','nonInteractive','env','Auto-confirm\x20prompts','log','map','run','project','valid','\x20\x20Config:\x20','2407794HBlOAj','join','string','5997yMmCKP','5091860HEqmsW','write','56HNgbsL','Usage:\x20','\x20\x20Env:\x20','global','message','init','appcode','Write\x20to\x20global\x20config\x20instead\x20of\x20project','production','custom','some','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','boolean','validation','346738bkctBa','str','7770499iXymXg','112365SuOgEL','\x20config'];a95_0x18ca=function(){return _0x567009;};return a95_0x18ca();}const a95_0x384ada=a95_0x3e5e;(function(_0x1a5f85,_0x112575){const _0x2155c7=a95_0x3e5e,_0x3fcd8f=_0x1a5f85();while(!![]){try{const _0x1074b4=parseInt(_0x2155c7(0x153))/0x1+-parseInt(_0x2155c7(0x145))/0x2*(parseInt(_0x2155c7(0x142))/0x3)+-parseInt(_0x2155c7(0x12b))/0x4*(parseInt(_0x2155c7(0x156))/0x5)+parseInt(_0x2155c7(0x13f))/0x6+-parseInt(_0x2155c7(0x127))/0x7*(parseInt(_0x2155c7(0x12a))/0x8)+parseInt(_0x2155c7(0x131))/0x9*(-parseInt(_0x2155c7(0x143))/0xa)+parseInt(_0x2155c7(0x155))/0xb;if(_0x1074b4===_0x112575)break;else _0x3fcd8f['push'](_0x3fcd8f['shift']());}catch(_0x46550a){_0x3fcd8f['push'](_0x3fcd8f['shift']());}}}(a95_0x18ca,0x4de27));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';function a95_0x3e5e(_0x40f747,_0xcbf27f){_0x40f747=_0x40f747-0x127;const _0x18ca6a=a95_0x18ca();let _0x3e5e0b=_0x18ca6a[_0x40f747];return _0x3e5e0b;}import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x4b2a3f){return{'appCode':_0x4b2a3f,'appName':_0x4b2a3f};}function writeInitConfig(_0x215631,_0xc74bba,_0x2bc9ee){const _0xa29ad=a95_0x3e5e,_0x34d6d2=resolveWriteConfigPath(_0x215631),_0x174e1c=buildCanonicalProjectConfig({},{'appCodes':_0xc74bba[_0xa29ad(0x13a)](_0x5d45c1=>_0x5d45c1['appCode']),'env':_0x2bc9ee,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x34d6d2,_0x174e1c);const _0x509dca=_0x215631===_0xa29ad(0x148)?_0xa29ad(0x148):'project';console['log']('\x0a✓\x20Successfully\x20initialized\x20'+_0x509dca+_0xa29ad(0x157)),console['log'](_0xa29ad(0x12e)+_0xc74bba[_0xa29ad(0x13a)](_0xc147ff=>_0xc147ff['appCode'])[_0xa29ad(0x140)](',\x20')),console['log'](_0xa29ad(0x128)+_0x174e1c[_0xa29ad(0x130)]),console[_0xa29ad(0x139)](_0xa29ad(0x147)+_0x174e1c[_0xa29ad(0x137)]),console[_0xa29ad(0x139)](_0xa29ad(0x13e)+_0x34d6d2);}async function runSmartInit(_0xfb599e){const _0x255af7=a95_0x3e5e,_0x47ffb5=process[_0x255af7(0x134)](),_0x2e3aad=_0xfb599e[_0x255af7(0x12c)](_0x255af7(0x148))?'global':_0x255af7(0x13c),_0x494da2=_0xfb599e[_0x255af7(0x154)](_0x255af7(0x137))||_0x255af7(0x14d),_0x5f2087=_0xfb599e[_0x255af7(0x154)](_0x255af7(0x14b))||undefined,_0x42e9d1=_0xfb599e[_0x255af7(0x12c)]('project');if(_0x42e9d1){const {initConfig:_0x56d59d}=await import(_0x255af7(0x132));return _0x56d59d({'appcode':_0x5f2087,'env':_0x494da2,'autoYes':_0xfb599e['bool'](_0x255af7(0x12d))});}if(_0x2e3aad===_0x255af7(0x13c)){const _0x5f58a5=existsSync(resolve(_0x47ffb5,NEW_CONFIG_NAME)),_0x404f5e=LEGACY_CONFIG_NAMES[_0x255af7(0x14f)](_0x45aed6=>existsSync(resolve(_0x47ffb5,_0x45aed6)));if(_0x404f5e&&!_0x5f58a5)return console[_0x255af7(0x139)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0xfb599e[_0x255af7(0x136)],{'yes':_0xfb599e[_0x255af7(0x12c)](_0x255af7(0x12d))});if(_0x5f58a5)throw CliErrors[_0x255af7(0x152)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Use\x20`'+CLI_BIN_NAME+_0x255af7(0x150));}if(_0x5f2087){const _0x320344=validateAppcode(_0x5f2087);if(!_0x320344[_0x255af7(0x13d)])throw CliErrors[_0x255af7(0x152)](_0x320344[_0x255af7(0x149)]);writeInitConfig(_0x2e3aad,[syntheticApp(_0x5f2087)],_0x494da2);return;}if(_0xfb599e[_0x255af7(0x136)])throw CliErrors[_0x255af7(0x129)](_0x255af7(0x14b),_0x255af7(0x146)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x49fdc5=getCookie(),_0x56e0d8=await selectMultipleApps(_0x49fdc5),_0x47db37=_0x56e0d8===_0x255af7(0x14e)?[syntheticApp(await promptCustomAppcode())]:_0x56e0d8;writeInitConfig(_0x2e3aad,_0x47db37,_0x494da2);}const initFlags=[{'name':a95_0x384ada(0x148),'type':a95_0x384ada(0x151),'description':a95_0x384ada(0x14c),'default':![]},{'name':a95_0x384ada(0x137),'type':a95_0x384ada(0x141),'description':a95_0x384ada(0x12f),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x384ada(0x14b),'type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a95_0x384ada(0x13c),'type':a95_0x384ada(0x151),'description':a95_0x384ada(0x133),'default':![]},{'name':a95_0x384ada(0x12d),'type':a95_0x384ada(0x151),'description':a95_0x384ada(0x138),'default':![]}];export const initDefinitions=[{'service':a95_0x384ada(0x14a),'command':a95_0x384ada(0x13b),'description':a95_0x384ada(0x135),'risk':a95_0x384ada(0x144),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x550703){return await runSmartInit(_0x550703),{'ok':!![]};}}];
1
+ const a95_0x31d31e=a95_0x4d39;(function(_0x331041,_0x266936){const _0x52371d=a95_0x4d39,_0x4f8964=_0x331041();while(!![]){try{const _0x50fa93=-parseInt(_0x52371d(0x1d0))/0x1*(-parseInt(_0x52371d(0x1de))/0x2)+-parseInt(_0x52371d(0x1df))/0x3*(-parseInt(_0x52371d(0x1c3))/0x4)+-parseInt(_0x52371d(0x1c9))/0x5+-parseInt(_0x52371d(0x1ba))/0x6+parseInt(_0x52371d(0x1ca))/0x7*(parseInt(_0x52371d(0x1cc))/0x8)+-parseInt(_0x52371d(0x1c4))/0x9*(-parseInt(_0x52371d(0x1c5))/0xa)+-parseInt(_0x52371d(0x1da))/0xb;if(_0x50fa93===_0x266936)break;else _0x4f8964['push'](_0x4f8964['shift']());}catch(_0x45b617){_0x4f8964['push'](_0x4f8964['shift']());}}}(a95_0xd897,0x58652));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';function a95_0xd897(){const _0x9decc1=['1147105ntXeOB','35EryutA','Auto-confirm\x20prompts','485288igMOla','message','flagMissing','\x0a✓\x20Successfully\x20initialized\x20','2cskVOt','str','\x20config','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','production','project','Use\x20`','appcode','write','appCode','1172655xEiJPx','init','Usage:\x20','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','185568GHFhlH','3fwiIir','valid','string','join','env','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','nonInteractive','Target\x20environment','4109478NxHhFH','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','yes','bool','boolean','run','Write\x20to\x20global\x20config\x20instead\x20of\x20project','log','custom','1412084APRLKU','423BMHkIN','115130PuXwpN','检测到旧配置文件,正在自动升级...\x0a','defaultApp','global'];a95_0xd897=function(){return _0x9decc1;};return a95_0xd897();}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(_0x3a1171){return{'appCode':_0x3a1171,'appName':_0x3a1171};}function a95_0x4d39(_0x10d05e,_0x1f93ac){_0x10d05e=_0x10d05e-0x1b3;const _0xd897be=a95_0xd897();let _0x4d39af=_0xd897be[_0x10d05e];return _0x4d39af;}function writeInitConfig(_0x5cbb5b,_0x37f493,_0x448be1){const _0x1d0e45=a95_0x4d39,_0x40f21a=resolveWriteConfigPath(_0x5cbb5b),_0x4d98be=buildCanonicalProjectConfig({},{'appCodes':_0x37f493['map'](_0x528d84=>_0x528d84[_0x1d0e45(0x1d9)]),'env':_0x448be1,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x40f21a,_0x4d98be);const _0x326344=_0x5cbb5b===_0x1d0e45(0x1c8)?_0x1d0e45(0x1c8):_0x1d0e45(0x1d5);console[_0x1d0e45(0x1c1)](_0x1d0e45(0x1cf)+_0x326344+_0x1d0e45(0x1d2)),console[_0x1d0e45(0x1c1)]('\x20\x20Apps:\x20'+_0x37f493['map'](_0x3e29fa=>_0x3e29fa[_0x1d0e45(0x1d9)])[_0x1d0e45(0x1b5)](',\x20')),console['log']('\x20\x20Default:\x20'+_0x4d98be[_0x1d0e45(0x1c7)]),console[_0x1d0e45(0x1c1)]('\x20\x20Env:\x20'+_0x4d98be[_0x1d0e45(0x1b6)]),console['log']('\x20\x20Config:\x20'+_0x40f21a);}async function runSmartInit(_0x2a673a){const _0x4682ef=a95_0x4d39,_0x393fa5=process['cwd'](),_0x2ce58e=_0x2a673a[_0x4682ef(0x1bd)](_0x4682ef(0x1c8))?_0x4682ef(0x1c8):_0x4682ef(0x1d5),_0x2765b5=_0x2a673a[_0x4682ef(0x1d1)](_0x4682ef(0x1b6))||_0x4682ef(0x1d4),_0x58f8cb=_0x2a673a['str'](_0x4682ef(0x1d7))||undefined,_0x2526bb=_0x2a673a['bool']('project');if(_0x2526bb){const {initConfig:_0x5a9413}=await import('../../commands/project/init.js');return _0x5a9413({'appcode':_0x58f8cb,'env':_0x2765b5,'autoYes':_0x2a673a[_0x4682ef(0x1bd)]('yes')});}if(_0x2ce58e===_0x4682ef(0x1d5)){const _0x18957f=existsSync(resolve(_0x393fa5,NEW_CONFIG_NAME)),_0x4fa9bc=LEGACY_CONFIG_NAMES['some'](_0x47f7be=>existsSync(resolve(_0x393fa5,_0x47f7be)));if(_0x4fa9bc&&!_0x18957f)return console[_0x4682ef(0x1c1)](_0x4682ef(0x1c6)),upgradeApp(_0x2a673a[_0x4682ef(0x1b8)],{'yes':_0x2a673a[_0x4682ef(0x1bd)]('yes')});if(_0x18957f)throw CliErrors['validation'](_0x4682ef(0x1bb),_0x4682ef(0x1d6)+CLI_BIN_NAME+_0x4682ef(0x1dd));}if(_0x58f8cb){const _0xacea1d=validateAppcode(_0x58f8cb);if(!_0xacea1d[_0x4682ef(0x1b3)])throw CliErrors['validation'](_0xacea1d[_0x4682ef(0x1cd)]);writeInitConfig(_0x2ce58e,[syntheticApp(_0x58f8cb)],_0x2765b5);return;}if(_0x2a673a[_0x4682ef(0x1b8)])throw CliErrors[_0x4682ef(0x1ce)](_0x4682ef(0x1d7),_0x4682ef(0x1dc)+CLI_BIN_NAME+_0x4682ef(0x1d3));const _0x443652=getCookie(),_0x366853=await selectMultipleApps(_0x443652),_0x48ff58=_0x366853===_0x4682ef(0x1c2)?[syntheticApp(await promptCustomAppcode())]:_0x366853;writeInitConfig(_0x2ce58e,_0x48ff58,_0x2765b5);}const initFlags=[{'name':'global','type':a95_0x31d31e(0x1be),'description':a95_0x31d31e(0x1c0),'default':![]},{'name':'env','type':a95_0x31d31e(0x1b4),'description':a95_0x31d31e(0x1b9),'default':a95_0x31d31e(0x1d4),'enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x31d31e(0x1d7),'type':a95_0x31d31e(0x1b4),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':'project','type':a95_0x31d31e(0x1be),'description':a95_0x31d31e(0x1b7),'default':![]},{'name':a95_0x31d31e(0x1bc),'type':'boolean','description':a95_0x31d31e(0x1cb),'default':![]}];export const initDefinitions=[{'service':a95_0x31d31e(0x1db),'command':a95_0x31d31e(0x1bf),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':a95_0x31d31e(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3fa3df){return await runSmartInit(_0x3fa3df),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a96_0xb2f4(){const _0x4a87ed=['2597GYGqpq','2032512nqqnIx','2TYFTsU','44996UIaSzo','100431KzYcXY','456349UjHhMA','2098440FHoBFN','30lBVYWl','1597515Euzwde','1626nJcmom'];a96_0xb2f4=function(){return _0x4a87ed;};return a96_0xb2f4();}function a96_0x4d58(_0x10fce3,_0x14a2a2){_0x10fce3=_0x10fce3-0x11d;const _0xb2f48=a96_0xb2f4();let _0x4d5884=_0xb2f48[_0x10fce3];return _0x4d5884;}(function(_0x1eb3b4,_0x2e7f2c){const _0x477e0e=a96_0x4d58,_0x57282f=_0x1eb3b4();while(!![]){try{const _0x48a821=-parseInt(_0x477e0e(0x11f))/0x1*(-parseInt(_0x477e0e(0x126))/0x2)+parseInt(_0x477e0e(0x122))/0x3+parseInt(_0x477e0e(0x11d))/0x4+-parseInt(_0x477e0e(0x120))/0x5+parseInt(_0x477e0e(0x123))/0x6*(parseInt(_0x477e0e(0x124))/0x7)+-parseInt(_0x477e0e(0x125))/0x8+parseInt(_0x477e0e(0x11e))/0x9*(-parseInt(_0x477e0e(0x121))/0xa);if(_0x48a821===_0x2e7f2c)break;else _0x57282f['push'](_0x57282f['shift']());}catch(_0x362ff0){_0x57282f['push'](_0x57282f['shift']());}}}(a96_0xb2f4,0x600c7));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
1
+ function a96_0x5a38(_0x5eb991,_0x2b987b){_0x5eb991=_0x5eb991-0x65;const _0x6ca656=a96_0x6ca6();let _0x5a38ee=_0x6ca656[_0x5eb991];return _0x5a38ee;}function a96_0x6ca6(){const _0x473359=['932100AoQZDn','1798800wJKsuI','4081490crUZCT','1576590AJOLUn','29609PMAjvt','5WHaEiK','872332MvHskC','7605728uHEYye'];a96_0x6ca6=function(){return _0x473359;};return a96_0x6ca6();}(function(_0x20b49c,_0x40478e){const _0x4b3414=a96_0x5a38,_0x1a8e75=_0x20b49c();while(!![]){try{const _0x403a82=parseInt(_0x4b3414(0x69))/0x1+-parseInt(_0x4b3414(0x65))/0x2+parseInt(_0x4b3414(0x68))/0x3+parseInt(_0x4b3414(0x6b))/0x4*(parseInt(_0x4b3414(0x6a))/0x5)+-parseInt(_0x4b3414(0x66))/0x6+-parseInt(_0x4b3414(0x67))/0x7+parseInt(_0x4b3414(0x6c))/0x8;if(_0x403a82===_0x40478e)break;else _0x1a8e75['push'](_0x1a8e75['shift']());}catch(_0x5e3b2c){_0x1a8e75['push'](_0x1a8e75['shift']());}}}(a96_0x6ca6,0x5b8ea));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -1 +1 @@
1
- const a97_0x600130=a97_0x2892;(function(_0x43c67a,_0x274be3){const _0x7986f7=a97_0x2892,_0x2c16c8=_0x43c67a();while(!![]){try{const _0x11118f=parseInt(_0x7986f7(0x147))/0x1*(-parseInt(_0x7986f7(0x143))/0x2)+-parseInt(_0x7986f7(0x141))/0x3+parseInt(_0x7986f7(0x130))/0x4*(-parseInt(_0x7986f7(0x149))/0x5)+-parseInt(_0x7986f7(0x151))/0x6+-parseInt(_0x7986f7(0x140))/0x7+parseInt(_0x7986f7(0x14b))/0x8+parseInt(_0x7986f7(0x133))/0x9;if(_0x11118f===_0x274be3)break;else _0x2c16c8['push'](_0x2c16c8['shift']());}catch(_0xdd3d81){_0x2c16c8['push'](_0x2c16c8['shift']());}}}(a97_0x7afd,0x75694));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x600130(0x12e);function a97_0x7afd(){const _0x2e3a2a=['unknown_command','\x20bug?\x20Help\x20us\x20fix\x20it:','27169290AuOnSk','Hit\x20a\x20','trim','cancelled','\x20issue\x20report\x20\x5c','flag_missing','config_missing','join','replace','auth_required','issue','command','validation_error','5113689kjgOnK','1220631zKCrdZ','\x20\x20\x20\x20--title\x20\x22','254460OojUVY','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x22\x20\x5c','stderr','2jtkcPm','service','425gyXXtx','write','804856gogUSg','has','code','not_in_project','network_error','message','2690412HcIFji','=1\x20to\x20silence\x20this\x20hint.','RABETBASE_DISABLE_ISSUE_NUDGE','\x20\x20Set\x20','37564hBzYvF'];a97_0x7afd=function(){return _0x2e3a2a;};return a97_0x7afd();}const NUDGE_SUPPRESSED_CODES=new Set([a97_0x600130(0x136),a97_0x600130(0x13c),a97_0x600130(0x139),a97_0x600130(0x14e),a97_0x600130(0x131),a97_0x600130(0x138),a97_0x600130(0x13f),a97_0x600130(0x14f)]),defaultWriter=_0x26dcdc=>{const _0x3db5ac=a97_0x600130;process[_0x3db5ac(0x146)][_0x3db5ac(0x14a)](_0x26dcdc);};export function shouldNudgeForError(_0x56a1c4,_0x6266c9){const _0x48fcf8=a97_0x600130;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x6266c9[_0x48fcf8(0x148)]===_0x48fcf8(0x13d)&&_0x6266c9[_0x48fcf8(0x13e)]==='report')return![];if(_0x56a1c4 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x48fcf8(0x14c)](_0x56a1c4[_0x48fcf8(0x14d)]);return!![];}export function printIssueReportNudgeForError(_0x5e1f14,_0x48a17a,_0x3d4edc=defaultWriter){if(!shouldNudgeForError(_0x5e1f14,_0x48a17a))return;const _0x3c5f6a=buildSuggestedTitle(_0x5e1f14,_0x48a17a);_0x3d4edc(formatNudge(_0x3c5f6a));}function a97_0x2892(_0x434020,_0x1e5d0e){_0x434020=_0x434020-0x12d;const _0x7afd08=a97_0x7afd();let _0x289299=_0x7afd08[_0x434020];return _0x289299;}function buildSuggestedTitle(_0x2b1ed2,_0x28ac9f){const _0x357130=a97_0x600130,_0x3d0c58=_0x2b1ed2 instanceof Error?_0x2b1ed2[_0x357130(0x150)]:String(_0x2b1ed2),_0x4c1b94=_0x3d0c58['replace'](/[\r\n]+/g,'\x20')[_0x357130(0x13b)](/\s+/g,'\x20')[_0x357130(0x135)]()['slice'](0x0,0x78)[_0x357130(0x13b)](/"/g,'\x5c\x22'),_0x37c747=CLI_BIN_NAME+'\x20'+_0x28ac9f[_0x357130(0x148)]+'\x20'+_0x28ac9f[_0x357130(0x13e)];return _0x4c1b94['length']>0x0?_0x37c747+':\x20'+_0x4c1b94:_0x37c747;}function formatNudge(_0x4817c5){const _0x48a248=a97_0x600130;return['',_0x48a248(0x134)+CLI_BIN_NAME+_0x48a248(0x132),'\x20\x20'+CLI_BIN_NAME+_0x48a248(0x137),_0x48a248(0x142)+_0x4817c5+_0x48a248(0x145),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x48a248(0x144),_0x48a248(0x12f)+NUDGE_OPT_OUT_ENV+_0x48a248(0x12d),''][_0x48a248(0x13a)]('\x0a');}
1
+ const a97_0x367124=a97_0xb173;(function(_0x1ab7e2,_0x4ac429){const _0x160786=a97_0xb173,_0x57b6f0=_0x1ab7e2();while(!![]){try{const _0x556d6a=parseInt(_0x160786(0x167))/0x1+parseInt(_0x160786(0x15f))/0x2*(-parseInt(_0x160786(0x164))/0x3)+-parseInt(_0x160786(0x169))/0x4+parseInt(_0x160786(0x179))/0x5+-parseInt(_0x160786(0x168))/0x6+-parseInt(_0x160786(0x165))/0x7+parseInt(_0x160786(0x173))/0x8;if(_0x556d6a===_0x4ac429)break;else _0x57b6f0['push'](_0x57b6f0['shift']());}catch(_0x19fc84){_0x57b6f0['push'](_0x57b6f0['shift']());}}}(a97_0x3d83,0x627dc));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x367124(0x16e);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required',a97_0x367124(0x178),'not_in_project',a97_0x367124(0x16d),'flag_missing',a97_0x367124(0x161),a97_0x367124(0x15e)]),defaultWriter=_0x5f2c6e=>{const _0x2dad5a=a97_0x367124;process[_0x2dad5a(0x170)][_0x2dad5a(0x16a)](_0x5f2c6e);};function a97_0x3d83(){const _0x10d8ce=['8754IbIeNt','service','validation_error','\x22\x20\x5c','\x20bug?\x20Help\x20us\x20fix\x20it:','510YmJknN','3743796TCxKvT','\x20\x20Set\x20','784710vniNYI','3947652RFupDy','2355652fUjYgA','write','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','length','unknown_command','RABETBASE_DISABLE_ISSUE_NUDGE','command','stderr','Hit\x20a\x20','\x20\x20\x20\x20--title\x20\x22','13138560cPCSuY','=1\x20to\x20silence\x20this\x20hint.','issue','replace','\x20issue\x20report\x20\x5c','config_missing','2510815FvHtbE','report','network_error'];a97_0x3d83=function(){return _0x10d8ce;};return a97_0x3d83();}export function shouldNudgeForError(_0x36823a,_0x5ba3b9){const _0x2691ea=a97_0x367124;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x5ba3b9[_0x2691ea(0x160)]===_0x2691ea(0x175)&&_0x5ba3b9[_0x2691ea(0x16f)]===_0x2691ea(0x17a))return![];if(_0x36823a instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x36823a['code']);return!![];}export function printIssueReportNudgeForError(_0x24e112,_0x29991c,_0x5d4df6=defaultWriter){if(!shouldNudgeForError(_0x24e112,_0x29991c))return;const _0x5f2cb6=buildSuggestedTitle(_0x24e112,_0x29991c);_0x5d4df6(formatNudge(_0x5f2cb6));}function buildSuggestedTitle(_0x368814,_0x31295c){const _0x11eca4=a97_0x367124,_0x4d930f=_0x368814 instanceof Error?_0x368814['message']:String(_0x368814),_0x409f7b=_0x4d930f[_0x11eca4(0x176)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()['slice'](0x0,0x78)[_0x11eca4(0x176)](/"/g,'\x5c\x22'),_0x1dc6d2=CLI_BIN_NAME+'\x20'+_0x31295c[_0x11eca4(0x160)]+'\x20'+_0x31295c[_0x11eca4(0x16f)];return _0x409f7b[_0x11eca4(0x16c)]>0x0?_0x1dc6d2+':\x20'+_0x409f7b:_0x1dc6d2;}function a97_0xb173(_0x1160e9,_0x3a3e0e){_0x1160e9=_0x1160e9-0x15e;const _0x3d833a=a97_0x3d83();let _0xb1737a=_0x3d833a[_0x1160e9];return _0xb1737a;}function formatNudge(_0x404a9d){const _0x120b17=a97_0x367124;return['',_0x120b17(0x171)+CLI_BIN_NAME+_0x120b17(0x163),'\x20\x20'+CLI_BIN_NAME+_0x120b17(0x177),_0x120b17(0x172)+_0x404a9d+_0x120b17(0x162),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x120b17(0x16b),_0x120b17(0x166)+NUDGE_OPT_OUT_ENV+_0x120b17(0x174),'']['join']('\x0a');}
@@ -1 +1 @@
1
- const a98_0x2b502c=a98_0x8f71;(function(_0x30b04e,_0x2e702e){const _0x4c3b50=a98_0x8f71,_0x5f4be9=_0x30b04e();while(!![]){try{const _0x19321d=-parseInt(_0x4c3b50(0x1a6))/0x1+parseInt(_0x4c3b50(0x194))/0x2*(parseInt(_0x4c3b50(0x19b))/0x3)+-parseInt(_0x4c3b50(0x1b5))/0x4+parseInt(_0x4c3b50(0x18f))/0x5+parseInt(_0x4c3b50(0x19c))/0x6*(-parseInt(_0x4c3b50(0x1a4))/0x7)+-parseInt(_0x4c3b50(0x186))/0x8*(parseInt(_0x4c3b50(0x199))/0x9)+parseInt(_0x4c3b50(0x181))/0xa;if(_0x19321d===_0x2e702e)break;else _0x5f4be9['push'](_0x5f4be9['shift']());}catch(_0x5e2818){_0x5f4be9['push'](_0x5f4be9['shift']());}}}(a98_0x13ae,0x794df));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x2b502c(0x18d);export const issueReport={'service':a98_0x2b502c(0x19f),'command':a98_0x2b502c(0x1a1),'description':a98_0x2b502c(0x196),'risk':a98_0x2b502c(0x18a),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x2b502c(0x1b1),'flags':[{'name':'title','type':a98_0x2b502c(0x188),'required':!![],'description':a98_0x2b502c(0x195)},{'name':'description','type':a98_0x2b502c(0x188),'description':a98_0x2b502c(0x187)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x2b502c(0x188),'description':a98_0x2b502c(0x1b6)}],async 'validate'(_0x5c2696){const _0x3258a8=a98_0x2b502c,_0x376786=_0x5c2696[_0x3258a8(0x190)](_0x3258a8(0x189))[_0x3258a8(0x19e)](),_0x1b899b=_0x5c2696[_0x3258a8(0x190)](_0x3258a8(0x1af))['trim'](),_0x527a79=_0x5c2696[_0x3258a8(0x190)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x376786)throw CliErrors['flagMissing']('title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0xe0e2e9=_0x1b899b[_0x3258a8(0x182)]>0x0,_0x35f393=_0x527a79[_0x3258a8(0x182)]>0x0;if(_0xe0e2e9===_0x35f393)throw CliErrors[_0x3258a8(0x192)](_0x3258a8(0x18e),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x35f393){const _0xc537d7=resolve(process[_0x3258a8(0x1aa)](),_0x527a79);if(!existsSync(_0xc537d7))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0xc537d7);}},async 'dryRun'(_0x1d7aab){const _0x4e29b2=a98_0x2b502c,_0x27b7e1=await prepareIssueReport(_0x1d7aab);return{'method':_0x4e29b2(0x1b8),'url':_0x4e29b2(0x183)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x27b7e1[_0x4e29b2(0x189)],'issue.description':_0x27b7e1[_0x4e29b2(0x1af)],'issue.description_original_bytes':_0x27b7e1['sanitize']['originalBytes'],'issue.description_truncated':_0x27b7e1[_0x4e29b2(0x180)]['truncated'],'issue.description_redactions':_0x27b7e1[_0x4e29b2(0x180)][_0x4e29b2(0x18b)],'issue.description_redaction_kinds':_0x27b7e1[_0x4e29b2(0x180)][_0x4e29b2(0x1a7)][_0x4e29b2(0x1a5)](',')}},'description':[_0x4e29b2(0x1ad),_0x4e29b2(0x1ac)+_0x27b7e1[_0x4e29b2(0x1ae)],_0x27b7e1['descriptionFilePath']?'descriptionFile:\x20'+_0x27b7e1[_0x4e29b2(0x1b0)]:null,_0x27b7e1[_0x4e29b2(0x180)]['truncated']?_0x4e29b2(0x1a3)+_0x27b7e1[_0x4e29b2(0x180)][_0x4e29b2(0x193)]+_0x4e29b2(0x1a8):null,_0x27b7e1['sanitize'][_0x4e29b2(0x18b)]>0x0?_0x4e29b2(0x1a2)+_0x27b7e1[_0x4e29b2(0x180)][_0x4e29b2(0x18b)]+'\x20('+_0x27b7e1[_0x4e29b2(0x180)][_0x4e29b2(0x1a7)][_0x4e29b2(0x1a5)](',\x20')+')':null][_0x4e29b2(0x198)](Boolean)[_0x4e29b2(0x1a5)]('\x0a')};},async 'execute'(_0x531afa){const _0x1ce7fe=a98_0x2b502c,_0x490c85=await prepareIssueReport(_0x531afa);try{await sendPlatformIssueCollectLog({'title':_0x490c85[_0x1ce7fe(0x189)],'description':_0x490c85[_0x1ce7fe(0x1af)],'sanitize':{'originalBytes':_0x490c85[_0x1ce7fe(0x180)][_0x1ce7fe(0x193)],'truncated':_0x490c85[_0x1ce7fe(0x180)]['truncated'],'redactionCount':_0x490c85[_0x1ce7fe(0x180)]['redactionCount'],'redactionKinds':_0x490c85[_0x1ce7fe(0x180)][_0x1ce7fe(0x1a7)]}});}catch(_0x3db4d5){throw CliErrors[_0x1ce7fe(0x197)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x3db4d5 instanceof Error?_0x3db4d5['message']:String(_0x3db4d5)),_0x1ce7fe(0x1b2));}return{'ok':!![],'message':buildResultMessage(_0x490c85[_0x1ce7fe(0x180)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x1ce7fe(0x185),_0x1ce7fe(0x1ab),_0x1ce7fe(0x1b3),_0x1ce7fe(0x18c),'issue.description_redactions',_0x1ce7fe(0x19a)],'issue':{'title':_0x490c85[_0x1ce7fe(0x189)],'descriptionLength':_0x490c85['description'][_0x1ce7fe(0x182)],'descriptionSource':_0x490c85['descriptionSource'],..._0x490c85[_0x1ce7fe(0x1b0)]?{'descriptionFile':_0x490c85['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x490c85[_0x1ce7fe(0x180)]['originalBytes'],'truncated':_0x490c85[_0x1ce7fe(0x180)][_0x1ce7fe(0x17f)],'redactions':_0x490c85[_0x1ce7fe(0x180)][_0x1ce7fe(0x18b)],'redactionKinds':_0x490c85[_0x1ce7fe(0x180)]['redactionKinds']}}}};}};function a98_0x8f71(_0x1ed9ff,_0xadb93a){_0x1ed9ff=_0x1ed9ff-0x17f;const _0x13ae48=a98_0x13ae();let _0x8f710b=_0x13ae48[_0x1ed9ff];return _0x8f710b;}function a98_0x13ae(){const _0x4d1a23=['Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','string','title','write','redactionCount','issue.description_truncated','description-file','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','887825MfVvvX','str','redacted\x20','validation','originalBytes','2KwwKHz','One-line\x20issue\x20summary','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','apiError','filter','87327pjoQEQ','issue.description_redaction_kinds','2311905KyAcVV','342azJirJ','Issue\x20description\x20file\x20is\x20empty:\x20','trim','issue','file','report','redactions:\x20','truncated:\x20original\x20','51177HrkKPo','join','56444eQsVXQ','redactionKinds','\x20bytes','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','cwd','issue.description','descriptionSource:\x20','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource','description','descriptionFilePath','compress','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','issue.description_original_bytes','Platform\x20issue\x20reported\x20(','3325924hMSzVf','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','inline','POST','\x20secret(s):\x20','truncated','sanitize','13287620qSDvzW','length','otel://','push','issue.title','392gazGBC'];a98_0x13ae=function(){return _0x4d1a23;};return a98_0x13ae();}function buildResultMessage(_0x1d4a9b){const _0x17a522=a98_0x2b502c,_0xecef8d=[];return _0x1d4a9b[_0x17a522(0x17f)]&&_0xecef8d[_0x17a522(0x184)]('truncated\x20from\x20'+_0x1d4a9b[_0x17a522(0x193)]+_0x17a522(0x1a8)),_0x1d4a9b[_0x17a522(0x18b)]>0x0&&_0xecef8d[_0x17a522(0x184)](_0x17a522(0x191)+_0x1d4a9b[_0x17a522(0x18b)]+_0x17a522(0x1b9)+_0x1d4a9b['redactionKinds']['join'](',\x20')),_0xecef8d[_0x17a522(0x182)]===0x0?'Platform\x20issue\x20reported':_0x17a522(0x1b4)+_0xecef8d[_0x17a522(0x1a5)](';\x20')+')';}async function prepareIssueReport(_0x44607d){const _0x5c4c9a=a98_0x2b502c,_0x535c88=_0x44607d[_0x5c4c9a(0x190)](_0x5c4c9a(0x189))[_0x5c4c9a(0x19e)](),_0x2c0e0d=_0x44607d[_0x5c4c9a(0x190)](_0x5c4c9a(0x1af)),_0xd5f585=_0x44607d[_0x5c4c9a(0x190)](DESCRIPTION_FILE_FLAG)[_0x5c4c9a(0x19e)]();if(!_0xd5f585){const _0x5647b3=_0x2c0e0d;if(!_0x5647b3[_0x5c4c9a(0x19e)]())throw CliErrors[_0x5c4c9a(0x192)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x5c4c9a(0x1a9));const _0x510cfb=sanitizeIssueDescription(_0x5647b3);return{'title':_0x535c88,'description':_0x510cfb['description'],'descriptionSource':_0x5c4c9a(0x1b7),'sanitize':_0x510cfb};}const _0x37138d=resolve(process['cwd'](),_0xd5f585),_0x62b9b2=await readFile(_0x37138d,'utf8');if(!_0x62b9b2[_0x5c4c9a(0x19e)]())throw CliErrors[_0x5c4c9a(0x192)](_0x5c4c9a(0x19d)+_0x37138d,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x43ac0a=sanitizeIssueDescription(_0x62b9b2);return{'title':_0x535c88,'description':_0x43ac0a['description'],'descriptionSource':_0x5c4c9a(0x1a0),'descriptionFilePath':_0x37138d,'sanitize':_0x43ac0a};}
1
+ const a98_0x3a60e8=a98_0x138c;(function(_0x36557c,_0x28f2a4){const _0x1cecea=a98_0x138c,_0x583751=_0x36557c();while(!![]){try{const _0x187ed3=parseInt(_0x1cecea(0x119))/0x1+-parseInt(_0x1cecea(0xeb))/0x2*(parseInt(_0x1cecea(0xf5))/0x3)+-parseInt(_0x1cecea(0xf1))/0x4+-parseInt(_0x1cecea(0x110))/0x5*(parseInt(_0x1cecea(0xef))/0x6)+-parseInt(_0x1cecea(0xe9))/0x7+-parseInt(_0x1cecea(0xfd))/0x8+parseInt(_0x1cecea(0xea))/0x9*(parseInt(_0x1cecea(0xf0))/0xa);if(_0x187ed3===_0x28f2a4)break;else _0x583751['push'](_0x583751['shift']());}catch(_0x25c6ad){_0x583751['push'](_0x583751['shift']());}}}(a98_0x23cd,0x1dc68));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_0x23cd(){const _0x17a820=['descriptionFilePath','truncated:\x20original\x20','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','issue.description_original_bytes','descriptionFile:\x20','string','5jSygUG','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','redactions:\x20','description','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','redactionCount','file','validation','110484wVQvkI','\x20secret(s):\x20','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','issue','utf8','flagMissing','\x20bytes','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','description-file','inline','originalBytes','741552pkIGih','1197wsEEKV','36hkBqMv','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Issue\x20description\x20file\x20is\x20empty:\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','628926NBcwTw','31970lcwlqm','348708MJZdFN','issue.description_redactions','sanitize','compress','14943TgRSfm','str','truncated','trim','otel://','title','File\x20not\x20found:\x20','descriptionSource:\x20','209064QDjico','Failed\x20to\x20report\x20platform\x20issue:\x20','write','truncated\x20from\x20','POST','redactionKinds','apiError','length','cwd','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','join','push','report'];a98_0x23cd=function(){return _0x17a820;};return a98_0x23cd();}const DESCRIPTION_FILE_FLAG=a98_0x3a60e8(0x121);export const issueReport={'service':a98_0x3a60e8(0x11c),'command':a98_0x3a60e8(0x109),'description':a98_0x3a60e8(0x11b),'risk':a98_0x3a60e8(0xff),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x3a60e8(0xf4),'flags':[{'name':a98_0x3a60e8(0xfa),'type':a98_0x3a60e8(0x10f),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':'description','type':'string','description':a98_0x3a60e8(0xee)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x3a60e8(0x10f),'description':a98_0x3a60e8(0x10c)}],async 'validate'(_0xc5140b){const _0x23b14e=a98_0x3a60e8,_0x3e4d90=_0xc5140b[_0x23b14e(0xf6)](_0x23b14e(0xfa))[_0x23b14e(0xf8)](),_0x391596=_0xc5140b[_0x23b14e(0xf6)](_0x23b14e(0x113))[_0x23b14e(0xf8)](),_0x446a3a=_0xc5140b[_0x23b14e(0xf6)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x3e4d90)throw CliErrors[_0x23b14e(0x11e)](_0x23b14e(0xfa),_0x23b14e(0x114));const _0x490e7f=_0x391596[_0x23b14e(0x104)]>0x0,_0x285660=_0x446a3a[_0x23b14e(0x104)]>0x0;if(_0x490e7f===_0x285660)throw CliErrors[_0x23b14e(0x118)](_0x23b14e(0x115),_0x23b14e(0x106));if(_0x285660){const _0x43ce5c=resolve(process[_0x23b14e(0x105)](),_0x446a3a);if(!existsSync(_0x43ce5c))throw CliErrors['validation'](_0x23b14e(0xfb)+_0x43ce5c);}},async 'dryRun'(_0x939835){const _0x444335=a98_0x3a60e8,_0x2511f9=await prepareIssueReport(_0x939835);return{'method':_0x444335(0x101),'url':_0x444335(0xf9)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2511f9['title'],'issue.description':_0x2511f9[_0x444335(0x113)],'issue.description_original_bytes':_0x2511f9[_0x444335(0xf3)]['originalBytes'],'issue.description_truncated':_0x2511f9[_0x444335(0xf3)][_0x444335(0xf7)],'issue.description_redactions':_0x2511f9[_0x444335(0xf3)][_0x444335(0x116)],'issue.description_redaction_kinds':_0x2511f9[_0x444335(0xf3)][_0x444335(0x102)][_0x444335(0x107)](',')}},'description':[_0x444335(0x120),_0x444335(0xfc)+_0x2511f9['descriptionSource'],_0x2511f9[_0x444335(0x10a)]?_0x444335(0x10e)+_0x2511f9['descriptionFilePath']:null,_0x2511f9[_0x444335(0xf3)][_0x444335(0xf7)]?_0x444335(0x10b)+_0x2511f9[_0x444335(0xf3)][_0x444335(0xe8)]+'\x20bytes':null,_0x2511f9['sanitize'][_0x444335(0x116)]>0x0?_0x444335(0x112)+_0x2511f9[_0x444335(0xf3)]['redactionCount']+'\x20('+_0x2511f9[_0x444335(0xf3)][_0x444335(0x102)][_0x444335(0x107)](',\x20')+')':null]['filter'](Boolean)[_0x444335(0x107)]('\x0a')};},async 'execute'(_0x596b08){const _0x109228=a98_0x3a60e8,_0x4df541=await prepareIssueReport(_0x596b08);try{await sendPlatformIssueCollectLog({'title':_0x4df541['title'],'description':_0x4df541[_0x109228(0x113)],'sanitize':{'originalBytes':_0x4df541[_0x109228(0xf3)]['originalBytes'],'truncated':_0x4df541['sanitize'][_0x109228(0xf7)],'redactionCount':_0x4df541[_0x109228(0xf3)][_0x109228(0x116)],'redactionKinds':_0x4df541[_0x109228(0xf3)][_0x109228(0x102)]}});}catch(_0x2e77d4){throw CliErrors[_0x109228(0x103)](_0x109228(0xfe)+(_0x2e77d4 instanceof Error?_0x2e77d4['message']:String(_0x2e77d4)),'Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.');}return{'ok':!![],'message':buildResultMessage(_0x4df541[_0x109228(0xf3)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title','issue.description',_0x109228(0x10d),'issue.description_truncated',_0x109228(0xf2),'issue.description_redaction_kinds'],'issue':{'title':_0x4df541[_0x109228(0xfa)],'descriptionLength':_0x4df541[_0x109228(0x113)][_0x109228(0x104)],'descriptionSource':_0x4df541['descriptionSource'],..._0x4df541[_0x109228(0x10a)]?{'descriptionFile':_0x4df541[_0x109228(0x10a)]}:{},'sanitize':{'originalBytes':_0x4df541['sanitize'][_0x109228(0xe8)],'truncated':_0x4df541[_0x109228(0xf3)][_0x109228(0xf7)],'redactions':_0x4df541['sanitize'][_0x109228(0x116)],'redactionKinds':_0x4df541[_0x109228(0xf3)]['redactionKinds']}}}};}};function a98_0x138c(_0x3bb905,_0x58311f){_0x3bb905=_0x3bb905-0xe7;const _0x23cd53=a98_0x23cd();let _0x138ccf=_0x23cd53[_0x3bb905];return _0x138ccf;}function buildResultMessage(_0x444c66){const _0x30ce62=a98_0x3a60e8,_0x53da65=[];return _0x444c66[_0x30ce62(0xf7)]&&_0x53da65[_0x30ce62(0x108)](_0x30ce62(0x100)+_0x444c66['originalBytes']+_0x30ce62(0x11f)),_0x444c66[_0x30ce62(0x116)]>0x0&&_0x53da65['push']('redacted\x20'+_0x444c66['redactionCount']+_0x30ce62(0x11a)+_0x444c66[_0x30ce62(0x102)]['join'](',\x20')),_0x53da65[_0x30ce62(0x104)]===0x0?'Platform\x20issue\x20reported':'Platform\x20issue\x20reported\x20('+_0x53da65[_0x30ce62(0x107)](';\x20')+')';}async function prepareIssueReport(_0x3198ad){const _0x4e6cac=a98_0x3a60e8,_0x1934db=_0x3198ad['str']('title')['trim'](),_0x48da95=_0x3198ad['str'](_0x4e6cac(0x113)),_0x93c185=_0x3198ad[_0x4e6cac(0xf6)](DESCRIPTION_FILE_FLAG)[_0x4e6cac(0xf8)]();if(!_0x93c185){const _0x38984b=_0x48da95;if(!_0x38984b[_0x4e6cac(0xf8)]())throw CliErrors[_0x4e6cac(0x118)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x4e6cac(0xec));const _0x4d4c06=sanitizeIssueDescription(_0x38984b);return{'title':_0x1934db,'description':_0x4d4c06[_0x4e6cac(0x113)],'descriptionSource':_0x4e6cac(0xe7),'sanitize':_0x4d4c06};}const _0x5a591f=resolve(process['cwd'](),_0x93c185),_0x4d7fb6=await readFile(_0x5a591f,_0x4e6cac(0x11d));if(!_0x4d7fb6[_0x4e6cac(0xf8)]())throw CliErrors[_0x4e6cac(0x118)](_0x4e6cac(0xed)+_0x5a591f,_0x4e6cac(0x111));const _0x5e19d7=sanitizeIssueDescription(_0x4d7fb6);return{'title':_0x1934db,'description':_0x5e19d7[_0x4e6cac(0x113)],'descriptionSource':_0x4e6cac(0x117),'descriptionFilePath':_0x5a591f,'sanitize':_0x5e19d7};}
@@ -1 +1 @@
1
- const a99_0x1e487e=a99_0x52a4;(function(_0x28e5cb,_0x559c1f){const _0x2e2034=a99_0x52a4,_0x2e0df7=_0x28e5cb();while(!![]){try{const _0x43e24f=-parseInt(_0x2e2034(0x93))/0x1+parseInt(_0x2e2034(0x95))/0x2*(parseInt(_0x2e2034(0x8c))/0x3)+-parseInt(_0x2e2034(0x91))/0x4*(parseInt(_0x2e2034(0x83))/0x5)+parseInt(_0x2e2034(0x80))/0x6*(parseInt(_0x2e2034(0x89))/0x7)+parseInt(_0x2e2034(0x88))/0x8*(-parseInt(_0x2e2034(0x9a))/0x9)+parseInt(_0x2e2034(0x98))/0xa*(parseInt(_0x2e2034(0x7b))/0xb)+parseInt(_0x2e2034(0x84))/0xc*(parseInt(_0x2e2034(0x8a))/0xd);if(_0x43e24f===_0x559c1f)break;else _0x2e0df7['push'](_0x2e0df7['shift']());}catch(_0x5c998){_0x2e0df7['push'](_0x2e0df7['shift']());}}}(a99_0x3201,0x3b443));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a99_0x1e487e(0x86),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x1e487e(0xa1)},{'kind':a99_0x1e487e(0xa0),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x1e487e(0x85)},{'kind':a99_0x1e487e(0x99),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x1e487e(0x82)},{'kind':a99_0x1e487e(0x8e),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x1e487e(0x94)},{'kind':a99_0x1e487e(0x9b),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x1e487e(0x9c)},{'kind':a99_0x1e487e(0x96),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x1e487e(0x81)}];function a99_0x3201(){const _0x4db7be=['slice','620MOMpRw','private-key','6498xZZmnx','password','REDACTED:password','length','utf8','max','authorization','REDACTED:cookie','1342CYwuDV','replace','byteLength','pattern','toString','42ihklCt','REDACTED:bearer-jwt','REDACTED:private-key','60hKoPgZ','67548tylOOY','REDACTED:authorization','cookie','includes','824tDUquT','24241qVJRBe','1378WdYPrb','from','54ypUTpG','label','access-key','restore','string','87344IqWQbO','push','81978iMZnOB','REDACTED:access-key','3628fPoArg','bearer-jwt'];a99_0x3201=function(){return _0x4db7be;};return a99_0x3201();}export function sanitizeIssueDescription(_0x402d2c){const _0x5ce4b0=a99_0x1e487e,_0x2c6338=Buffer[_0x5ce4b0(0x7d)](_0x402d2c,_0x5ce4b0(0x9e)),_0x580c36=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5a4681=_0x402d2c,_0x21f670=0x0;const _0x3932a1=[];if(!_0x580c36){const _0x1e9dba=protectOssAccessKeyIds(_0x5a4681);_0x5a4681=_0x1e9dba['description'];for(const _0x5175f8 of REDACTION_RULES){let _0x5727e1=0x0;_0x5a4681=_0x5a4681['replace'](_0x5175f8[_0x5ce4b0(0x7e)],(_0x4d8ffe,_0x3724f3)=>{const _0x124ff8=_0x5ce4b0;_0x5727e1+=0x1;const _0x1fc79d=typeof _0x3724f3===_0x124ff8(0x90)?_0x3724f3:'';return _0x1fc79d+'['+_0x5175f8[_0x124ff8(0x8d)]+']';}),_0x5727e1>0x0&&(_0x21f670+=_0x5727e1,!_0x3932a1[_0x5ce4b0(0x87)](_0x5175f8['kind'])&&_0x3932a1[_0x5ce4b0(0x92)](_0x5175f8['kind']));}_0x5a4681=_0x1e9dba[_0x5ce4b0(0x8f)](_0x5a4681);}let _0x43ef51=![];if(Buffer['byteLength'](_0x5a4681,_0x5ce4b0(0x9e))>ISSUE_DESCRIPTION_MAX_BYTES){_0x43ef51=!![];const _0x572410=Buffer['byteLength'](TRUNCATION_NOTICE,_0x5ce4b0(0x9e)),_0x29c190=Math[_0x5ce4b0(0x9f)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x572410);_0x5a4681=sliceUtf8Bytes(_0x5a4681,_0x29c190)+TRUNCATION_NOTICE;}return{'description':_0x5a4681,'originalBytes':_0x2c6338,'truncated':_0x43ef51,'redactionCount':_0x21f670,'redactionKinds':_0x3932a1};}function protectOssAccessKeyIds(_0x5d5d3c){const _0x4f8623=a99_0x1e487e,_0x1d7808=[],_0x2dc722=_0x5d5d3c[_0x4f8623(0x7c)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x182848,_0x39e8fe)=>{const _0x3cc350=_0x4f8623,_0x41892d=_0x1d7808[_0x3cc350(0x92)](_0x182848[_0x3cc350(0x97)](_0x39e8fe[_0x3cc350(0x9d)]))-0x1;return _0x39e8fe+'__RB_OSS_ID_'+_0x41892d+'__';});return{'description':_0x2dc722,'restore':_0x16b64f=>_0x16b64f[_0x4f8623(0x7c)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x47f8b9,_0x5866d3,_0x1e0f2e)=>{const _0xbc1a01=_0x1d7808[Number(_0x1e0f2e)];return _0xbc1a01===undefined?_0x47f8b9:''+_0x5866d3+_0xbc1a01;})};}function a99_0x52a4(_0x3c4322,_0x1005e8){_0x3c4322=_0x3c4322-0x7b;const _0x32012f=a99_0x3201();let _0x52a471=_0x32012f[_0x3c4322];return _0x52a471;}function sliceUtf8Bytes(_0x500562,_0x50e175){const _0x3ddef7=a99_0x1e487e;if(_0x50e175<=0x0)return'';const _0x372a3e=Buffer[_0x3ddef7(0x8b)](_0x500562,'utf8');if(_0x372a3e['byteLength']<=_0x50e175)return _0x500562;let _0x454721=_0x50e175;while(_0x454721>0x0){const _0x103880=_0x372a3e[_0x454721];if(_0x103880===undefined||(_0x103880&0xc0)!==0x80)break;_0x454721-=0x1;}return _0x372a3e['subarray'](0x0,_0x454721)[_0x3ddef7(0x7f)](_0x3ddef7(0x9e));}
1
+ function a99_0xa575(_0x4b414e,_0x399b2d){_0x4b414e=_0x4b414e-0x7c;const _0x4bb655=a99_0x4bb6();let _0xa575b0=_0x4bb655[_0x4b414e];return _0xa575b0;}function a99_0x4bb6(){const _0x5b3bb5=['utf8','push','slice','bearer-jwt','includes','replace','cookie','pattern','REDACTED:private-key','641624vXdtPd','1174344NleYds','10RgeeNv','subarray','max','68651iuZFcU','5Ompiwc','2217393JcLKbX','toString','__RB_OSS_ID_','REDACTED:authorization','3zfxatG','private-key','from','859560UZTyBA','byteLength','16IpPuJX','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','string','restore','REDACTED:access-key','authorization','REDACTED:bearer-jwt','password','access-key','REDACTED:password','3585974uPSlut','146148hUDDMV'];a99_0x4bb6=function(){return _0x5b3bb5;};return a99_0x4bb6();}const a99_0x1d8587=a99_0xa575;(function(_0x3e7dbc,_0x4a11fb){const _0x4c450c=a99_0xa575,_0xf2878=_0x3e7dbc();while(!![]){try{const _0x16adad=parseInt(_0x4c450c(0x7d))/0x1+parseInt(_0x4c450c(0x7e))/0x2*(parseInt(_0x4c450c(0x88))/0x3)+-parseInt(_0x4c450c(0x8b))/0x4*(-parseInt(_0x4c450c(0x83))/0x5)+parseInt(_0x4c450c(0x98))/0x6+-parseInt(_0x4c450c(0x97))/0x7+-parseInt(_0x4c450c(0x8d))/0x8*(parseInt(_0x4c450c(0x84))/0x9)+-parseInt(_0x4c450c(0x7f))/0xa*(parseInt(_0x4c450c(0x82))/0xb);if(_0x16adad===_0x4a11fb)break;else _0xf2878['push'](_0xf2878['shift']());}catch(_0x5023cb){_0xf2878['push'](_0xf2878['shift']());}}}(a99_0x4bb6,0x6f83f));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x1d8587(0x8e),REDACTION_RULES=[{'kind':a99_0x1d8587(0x9f),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a99_0x1d8587(0x92),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x1d8587(0x87)},{'kind':a99_0x1d8587(0x89),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x1d8587(0x7c)},{'kind':a99_0x1d8587(0x95),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x1d8587(0x91)},{'kind':a99_0x1d8587(0x94),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x1d8587(0x96)},{'kind':a99_0x1d8587(0x9c),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x1d8587(0x93)}];export function sanitizeIssueDescription(_0xfc711c){const _0x593638=a99_0x1d8587,_0x5a81c7=Buffer[_0x593638(0x8c)](_0xfc711c,_0x593638(0x99)),_0x1ecb62=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x42e7d3=_0xfc711c,_0x23715a=0x0;const _0x1575f5=[];if(!_0x1ecb62){const _0x340dfc=protectOssAccessKeyIds(_0x42e7d3);_0x42e7d3=_0x340dfc['description'];for(const _0x189f21 of REDACTION_RULES){let _0xd4a736=0x0;_0x42e7d3=_0x42e7d3[_0x593638(0x9e)](_0x189f21[_0x593638(0xa0)],(_0x5a9db1,_0x21171c)=>{const _0x577c7e=_0x593638;_0xd4a736+=0x1;const _0x5dbe15=typeof _0x21171c===_0x577c7e(0x8f)?_0x21171c:'';return _0x5dbe15+'['+_0x189f21['label']+']';}),_0xd4a736>0x0&&(_0x23715a+=_0xd4a736,!_0x1575f5[_0x593638(0x9d)](_0x189f21['kind'])&&_0x1575f5['push'](_0x189f21['kind']));}_0x42e7d3=_0x340dfc[_0x593638(0x90)](_0x42e7d3);}let _0xceee06=![];if(Buffer['byteLength'](_0x42e7d3,_0x593638(0x99))>ISSUE_DESCRIPTION_MAX_BYTES){_0xceee06=!![];const _0x223cee=Buffer[_0x593638(0x8c)](TRUNCATION_NOTICE,_0x593638(0x99)),_0x22d43d=Math[_0x593638(0x81)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x223cee);_0x42e7d3=sliceUtf8Bytes(_0x42e7d3,_0x22d43d)+TRUNCATION_NOTICE;}return{'description':_0x42e7d3,'originalBytes':_0x5a81c7,'truncated':_0xceee06,'redactionCount':_0x23715a,'redactionKinds':_0x1575f5};}function protectOssAccessKeyIds(_0xfcd558){const _0x1695f6=a99_0x1d8587,_0x2c587c=[],_0x7e0a7d=_0xfcd558['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x383986,_0x1af3a4)=>{const _0x3497ab=a99_0xa575,_0x3b318d=_0x2c587c[_0x3497ab(0x9a)](_0x383986[_0x3497ab(0x9b)](_0x1af3a4['length']))-0x1;return _0x1af3a4+_0x3497ab(0x86)+_0x3b318d+'__';});return{'description':_0x7e0a7d,'restore':_0x349c92=>_0x349c92[_0x1695f6(0x9e)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x5be10a,_0x506ce3,_0x350e71)=>{const _0xc962b5=_0x2c587c[Number(_0x350e71)];return _0xc962b5===undefined?_0x5be10a:''+_0x506ce3+_0xc962b5;})};}function sliceUtf8Bytes(_0x4e9240,_0xf8bfb8){const _0x533a26=a99_0x1d8587;if(_0xf8bfb8<=0x0)return'';const _0xf1c5fe=Buffer[_0x533a26(0x8a)](_0x4e9240,_0x533a26(0x99));if(_0xf1c5fe[_0x533a26(0x8c)]<=_0xf8bfb8)return _0x4e9240;let _0x1755d3=_0xf8bfb8;while(_0x1755d3>0x0){const _0x3d58f5=_0xf1c5fe[_0x1755d3];if(_0x3d58f5===undefined||(_0x3d58f5&0xc0)!==0x80)break;_0x1755d3-=0x1;}return _0xf1c5fe[_0x533a26(0x80)](0x0,_0x1755d3)[_0x533a26(0x85)]('utf8');}
@@ -1 +1 @@
1
- const a100_0x575774=a100_0x5ab4;function a100_0xcd0d(){const _0x79a6a=['3VVJQBl','7443ErWDiq','7OFLThv','478400HPeSDc','timestamp','success','length','1670BAxsmc','keys','level','272218YMJBXW','\x20\x20\x20Details:\x20','en-US','3014430iNMSKS','toLocaleString','read','2927820xUqYQg','clear','error','write','*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','warn','Clear\x20command\x20history\x20logs','1288888sWijtD','stringify','logs','duration','show','details','952462zgQapW','log'];a100_0xcd0d=function(){return _0x79a6a;};return a100_0xcd0d();}function a100_0x5ab4(_0x1c270c,_0x27ec43){_0x1c270c=_0x1c270c-0xb6;const _0xcd0d34=a100_0xcd0d();let _0x5ab453=_0xcd0d34[_0x1c270c];return _0x5ab453;}(function(_0x19b08d,_0x1961fc){const _0x312e58=a100_0x5ab4,_0x12a29c=_0x19b08d();while(!![]){try{const _0x19aabe=parseInt(_0x312e58(0xb7))/0x1+parseInt(_0x312e58(0xcb))/0x2*(parseInt(_0x312e58(0xcd))/0x3)+-parseInt(_0x312e58(0xd0))/0x4+parseInt(_0x312e58(0xbd))/0x5+-parseInt(_0x312e58(0xba))/0x6+-parseInt(_0x312e58(0xcf))/0x7*(parseInt(_0x312e58(0xc5))/0x8)+parseInt(_0x312e58(0xce))/0x9*(-parseInt(_0x312e58(0xd4))/0xa);if(_0x19aabe===_0x1961fc)break;else _0x12a29c['push'](_0x12a29c['shift']());}catch(_0x1b7d0a){_0x12a29c['push'](_0x12a29c['shift']());}}}(a100_0xcd0d,0x64c74));import{logger}from'../../utils/logger.js';function printLogs(_0x10e86b){const _0x5600d7=a100_0x5ab4;if(_0x10e86b[_0x5600d7(0xd3)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x5600d7(0xcc)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x10e86b['forEach']((_0x2a1103,_0x2cfc51)=>{const _0x7b1d5a=_0x5600d7,_0x406084=new Date(_0x2a1103[_0x7b1d5a(0xd1)])[_0x7b1d5a(0xbb)](_0x7b1d5a(0xb9)),_0x4890a8=_0x2a1103[_0x7b1d5a(0xb6)]===_0x7b1d5a(0xd2)?'√':_0x2a1103[_0x7b1d5a(0xb6)]===_0x7b1d5a(0xbf)?'×':_0x2a1103[_0x7b1d5a(0xb6)]===_0x7b1d5a(0xc3)?'!':'i';console[_0x7b1d5a(0xcc)](_0x2cfc51+0x1+'.\x20'+_0x4890a8+'\x20['+_0x2a1103['command']+']\x20'+_0x2a1103['message']),console['log']('\x20\x20\x20Time:\x20'+_0x406084),_0x2a1103[_0x7b1d5a(0xc8)]&&console[_0x7b1d5a(0xcc)](_0x7b1d5a(0xc2)+_0x2a1103['duration']+'ms'),_0x2a1103[_0x7b1d5a(0xca)]&&Object[_0x7b1d5a(0xd5)](_0x2a1103[_0x7b1d5a(0xca)])[_0x7b1d5a(0xd3)]>0x0&&console['log'](_0x7b1d5a(0xb8)+JSON[_0x7b1d5a(0xc6)](_0x2a1103['details'],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a100_0x575774(0xc7),'command':a100_0x575774(0xc9),'description':'View\x20command\x20history\x20logs','risk':a100_0x575774(0xbc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x30a10a){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a100_0x575774(0xc7),'command':a100_0x575774(0xbe),'description':a100_0x575774(0xc4),'risk':a100_0x575774(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1cf7dc){const _0x5909a7=a100_0x575774;return logger['clearLogs'](),console[_0x5909a7(0xcc)](_0x5909a7(0xc1)),{'ok':!![]};}}];
1
+ const a100_0x1ff5d7=a100_0x108f;function a100_0x108f(_0x35ee9b,_0xcb91c7){_0x35ee9b=_0x35ee9b-0x1b2;const _0x1154d4=a100_0x1154();let _0x108f6b=_0x1154d4[_0x35ee9b];return _0x108f6b;}(function(_0x20750e,_0xefb471){const _0x47df6c=a100_0x108f,_0x4f4ab9=_0x20750e();while(!![]){try{const _0x23a284=parseInt(_0x47df6c(0x1cb))/0x1+parseInt(_0x47df6c(0x1bf))/0x2*(-parseInt(_0x47df6c(0x1b8))/0x3)+-parseInt(_0x47df6c(0x1b6))/0x4*(-parseInt(_0x47df6c(0x1ca))/0x5)+-parseInt(_0x47df6c(0x1c0))/0x6*(-parseInt(_0x47df6c(0x1bc))/0x7)+parseInt(_0x47df6c(0x1c7))/0x8*(-parseInt(_0x47df6c(0x1ce))/0x9)+parseInt(_0x47df6c(0x1c2))/0xa+-parseInt(_0x47df6c(0x1c9))/0xb;if(_0x23a284===_0xefb471)break;else _0x4f4ab9['push'](_0x4f4ab9['shift']());}catch(_0x1b06b7){_0x4f4ab9['push'](_0x4f4ab9['shift']());}}}(a100_0x1154,0xc69a4));import{logger}from'../../utils/logger.js';function printLogs(_0x3f83b8){const _0x1442fa=a100_0x108f;if(_0x3f83b8[_0x1442fa(0x1c8)]===0x0){console[_0x1442fa(0x1c6)]('*\x20No\x20logs\x20found');return;}console[_0x1442fa(0x1c6)](_0x1442fa(0x1b3)),_0x3f83b8[_0x1442fa(0x1bd)]((_0x3b20f4,_0x4672b0)=>{const _0x509b91=_0x1442fa,_0x47551a=new Date(_0x3b20f4['timestamp'])[_0x509b91(0x1cc)](_0x509b91(0x1c4)),_0x42b15c=_0x3b20f4[_0x509b91(0x1bb)]==='success'?'√':_0x3b20f4[_0x509b91(0x1bb)]==='error'?'×':_0x3b20f4['level']==='warn'?'!':'i';console['log'](_0x4672b0+0x1+'.\x20'+_0x42b15c+'\x20['+_0x3b20f4[_0x509b91(0x1be)]+']\x20'+_0x3b20f4['message']),console['log']('\x20\x20\x20Time:\x20'+_0x47551a),_0x3b20f4['duration']&&console[_0x509b91(0x1c6)](_0x509b91(0x1cd)+_0x3b20f4[_0x509b91(0x1c1)]+'ms'),_0x3b20f4[_0x509b91(0x1cf)]&&Object[_0x509b91(0x1b4)](_0x3b20f4[_0x509b91(0x1cf)])[_0x509b91(0x1c8)]>0x0&&console['log'](_0x509b91(0x1b5)+JSON['stringify'](_0x3b20f4[_0x509b91(0x1cf)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a100_0x1ff5d7(0x1ba),'command':'show','description':'View\x20command\x20history\x20logs','risk':a100_0x1ff5d7(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xd439b7){const _0x499898=a100_0x1ff5d7;return printLogs(logger[_0x499898(0x1b2)]()),{'ok':!![]};}},{'service':'logs','command':a100_0x1ff5d7(0x1c3),'description':'Clear\x20command\x20history\x20logs','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x87d4d5){const _0x11a1bd=a100_0x1ff5d7;return logger[_0x11a1bd(0x1b7)](),console[_0x11a1bd(0x1c6)](_0x11a1bd(0x1b9)),{'ok':!![]};}}];function a100_0x1154(){const _0x22f60f=['9aJBHCH','details','readLogs','*\x20Lovrabet\x20CLI\x20logs:\x0a','keys','\x20\x20\x20Details:\x20','3525100YKMltA','clearLogs','201hbvJDn','*\x20Logs\x20cleared','logs','level','756MRDqxf','forEach','command','40814YFEBjv','82878VyxKUM','duration','7454600dswqpq','clear','en-US','read','log','9436104AOjYZV','length','11861949cskjWE','5cNItlQ','1320078LtQRHj','toLocaleString','\x20\x20\x20Duration:\x20'];a100_0x1154=function(){return _0x22f60f;};return a100_0x1154();}
@@ -1 +1 @@
1
- const a101_0x18e27f=a101_0x19ee;(function(_0x478f85,_0x40e3e2){const _0x420536=a101_0x19ee,_0x3c98e1=_0x478f85();while(!![]){try{const _0x5083dd=parseInt(_0x420536(0xe4))/0x1+parseInt(_0x420536(0x126))/0x2+parseInt(_0x420536(0x123))/0x3+-parseInt(_0x420536(0x127))/0x4*(-parseInt(_0x420536(0xff))/0x5)+-parseInt(_0x420536(0xfd))/0x6+-parseInt(_0x420536(0xf0))/0x7+-parseInt(_0x420536(0x121))/0x8;if(_0x5083dd===_0x40e3e2)break;else _0x3c98e1['push'](_0x3c98e1['shift']());}catch(_0xe9c359){_0x3c98e1['push'](_0x3c98e1['shift']());}}}(a101_0x1dc2,0x3eb15));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,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';import{deleteMenuEntity}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x18e27f(0x105),'path':a101_0x18e27f(0xd3)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0x18e27f(0xd1)},MENU_DELETE_PLAN_OUT_FLAG={'name':a101_0x18e27f(0xeb),'type':'string','description':a101_0x18e27f(0x117)},MENU_DELETE_PLAN_FLAG={'name':a101_0x18e27f(0x111),'type':a101_0x18e27f(0x115),'description':a101_0x18e27f(0xd4)};export const menuDelete={'service':a101_0x18e27f(0x125),'command':a101_0x18e27f(0xfa),'description':a101_0x18e27f(0x100),'risk':a101_0x18e27f(0xe1),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c6e10){_0x4c6e10['bool']('dry-run')?validateDeleteDryRunInput(_0x4c6e10):validateDeleteExecuteInput(_0x4c6e10),requireExplicitYes(_0x4c6e10);},async 'dryRun'(_0x2f0d66){const _0x596563=a101_0x18e27f;validateDeleteDryRunInput(_0x2f0d66);const _0x24c202=await buildDeletePlan(_0x2f0d66),_0x3e76e8=createMenuDeletePlanFile(_0x2f0d66[_0x596563(0xde)],_0x24c202),_0x43380e=await writeMenuDeletePlan(_0x2f0d66['str'](_0x596563(0xeb)),_0x3e76e8),_0x116809=mutationResult({..._0x24c202,'planFile':{'path':_0x43380e,'createdAt':_0x3e76e8['createdAt'],'expiresAt':_0x3e76e8['expiresAt']}});return menuDryRunResult(_0x116809,{'method':_0x596563(0x105),'url':_0x596563(0xd3),'body':{'id':_0x116809[_0x596563(0xd5)]['id'],'plan':_0x43380e,'snapshotHash':_0x116809['snapshotHash']},'description':_0x596563(0x11c)+_0x116809[_0x596563(0xd5)]['id']+_0x596563(0x114)+_0x43380e+'.'});},async 'execute'(_0x4d0b87){const _0x1e30d5=a101_0x18e27f;requireExplicitYes(_0x4d0b87),validateDeleteExecuteInput(_0x4d0b87);const _0x532597=await readMenuDeletePlan(_0x4d0b87[_0x1e30d5(0x112)]('plan')),_0x55bd71=mutationPlanFromDeleteFile(_0x532597[_0x1e30d5(0x111)],_0x532597[_0x1e30d5(0x108)]),_0x14e0b1=_0x532597[_0x1e30d5(0x111)][_0x1e30d5(0xe9)]['id'];try{assertMenuDeletePlanExecutable(_0x532597[_0x1e30d5(0x111)],_0x4d0b87[_0x1e30d5(0xde)]);}catch(_0x4f1cc0){throw menuFailure(asMenuError(_0x4f1cc0),_0x55bd71,{'stage':_0x1e30d5(0xe8),'failed':{'id':_0x14e0b1}});}let _0x29fd62,_0xcd1932;try{_0x29fd62=await fetchMutationSnapshot(_0x4d0b87,_0x1e30d5(0x10d),_0x14e0b1),_0xcd1932=assertMenuDeletePlanCurrent(_0x532597[_0x1e30d5(0x111)],_0x4d0b87[_0x1e30d5(0xde)],_0x29fd62),assertDeleteSafety(_0xcd1932),assertCascadeMatchesPlan(_0x55bd71,_0xcd1932);}catch(_0x1c941f){throw menuFailure(asMenuError(_0x1c941f),_0x55bd71,{'stage':_0x1e30d5(0xfe),'failed':{'id':_0x14e0b1}});}try{const _0x370867=await deleteMenuEntity(_0x4d0b87['cookie'],_0x14e0b1);if(!_0x370867)throw menuError(_0x1e30d5(0xe3),_0x1e30d5(0x119)+_0x14e0b1+'.',_0x1e30d5(0xdc));}catch(_0x3684eb){const _0x57e21e=mapMenuApiError(_0x3684eb,_0x1e30d5(0xfa),_0x14e0b1);throw menuFailure(_0x57e21e,_0x55bd71,{'stage':_0x1e30d5(0xfa),'failed':{'id':_0x14e0b1}});}let _0x43dde6;try{_0x43dde6=await fetchMenuSnapshot(_0x4d0b87[_0x1e30d5(0xde)],_0x4d0b87[_0x1e30d5(0x129)]),assertVerified(!_0x43dde6[_0x1e30d5(0xe5)][_0x1e30d5(0xe0)](_0x14e0b1),_0x1e30d5(0xd0)+_0x14e0b1+_0x1e30d5(0xed));}catch(_0x12eccf){const _0x33e5d1=describeMenuErrorCause(_0x12eccf,_0x1e30d5(0x10c),_0x14e0b1),_0x488893=asVerificationError(_0x12eccf,_0x1e30d5(0x10e)+_0x14e0b1+_0x1e30d5(0xd8));throw menuFailure(_0x488893,_0x55bd71,{'stage':_0x1e30d5(0xfc),'succeeded':[{'id':_0x14e0b1,'deleteRequested':!![]}],'failed':{'id':_0x14e0b1,'targetAbsent':_0x1e30d5(0x11d),..._0x33e5d1},'warnings':[_0x1e30d5(0xf7)],'verification':{'status':_0x1e30d5(0xe7),'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetId':_0x14e0b1}});}const _0x90b952=mutationResult({..._0x55bd71,'dryRun':![],'succeeded':[{'id':_0x14e0b1,'deleted':!![]}],'verification':{'checkedBy':'menu\x20list','plannedSnapshotHash':_0x55bd71[_0x1e30d5(0xd2)],'finalSnapshotHash':_0x43dde6['hash'],'targetAbsent':!![]}});return{'ok':!![],'data':_0x90b952,'message':_0x1e30d5(0x102)+_0x14e0b1+'.'};}};function validateDeleteDryRunInput(_0x3a1a81){const _0x246135=a101_0x18e27f;validateExactId(_0x3a1a81);if(!hasFlag(_0x3a1a81,_0x246135(0xeb))||!_0x3a1a81[_0x246135(0x112)](_0x246135(0xeb))[_0x246135(0x124)]())throw CliErrors[_0x246135(0x11e)](_0x246135(0xeb),_0x246135(0xea));if(hasFlag(_0x3a1a81,'plan'))throw CliErrors['validation'](_0x246135(0x120));}function a101_0x1dc2(){const _0x2a7550=['byId','map','failed','plan-validation','target','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','plan-out','\x22;\x20CLI\x20deletion\x20is\x20limited\x20to\x20empty\x20folders.','\x20is\x20still\x20present\x20after\x20the\x20delete\x20request.','menu_delete_unsupported_type','toLowerCase','1970647tlBEPh','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','cascade','Use\x20the\x20platform\x20UI\x20for\x20non-folder\x20menu\x20deletion.','validation','expect-parent-id','menu_folder_resources_invalid','The\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','resources','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','delete','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','verification','1619256xZHQPk','pre-write-plan-validation','20YqHLof','Delete\x20one\x20empty\x20folder\x20from\x20a\x20reviewed\x20plan','menu_non_empty','Deleted\x20menu\x20','folder','resourcesValid','POST','\x20has\x20','type','path','expected-children-count','\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.','\x20is\x20bound\x20to\x20page\x20','verify\x20delete','execute\x20reviewed\x20delete\x20plan','Delete\x20request\x20for\x20menu\x20','stringify','\x20and\x20cannot\x20be\x20deleted\x20by\x20the\x20CLI.','plan','str','length',';\x20execution\x20must\x20consume\x20','string','childrenCount','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','Backend\x20did\x20not\x20confirm\x20deletion\x20of\x20menu\x20','pageId','Folder\x20','Would\x20delete\x20menu\x20','unconfirmed','flagMissing','join','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','194336izNQvE','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','548529fozOVn','trim','menu','929110RdqIqA','67676CMxuMB','Use\x20the\x20platform\x20UI,\x20which\x20owns\x20the\x20page\x20and\x20PageSchema\x20cascade.','cookie','Menu\x20','Exact\x20empty\x20folder\x20id\x20(required\x20with\x20--dry-run)','snapshotHash','/smartapi/menu/delete','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','selector','unknown','filter','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','menu_plan_invalid','\x20still\x20references\x20','\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','Run\x20menu\x20list\x20to\x20check\x20whether\x20the\x20menu\x20still\x20exists\x20before\x20retrying.','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','appCode','menu_delete_page_bound','has','high-risk-write','childrenIds','menu_delete_failed','117404YcmbJf'];a101_0x1dc2=function(){return _0x2a7550;};return a101_0x1dc2();}function validateDeleteExecuteInput(_0x2d1af1){const _0x2b775e=a101_0x18e27f;if(!hasFlag(_0x2d1af1,'plan')||!_0x2d1af1['str'](_0x2b775e(0x111))[_0x2b775e(0x124)]())throw CliErrors['flagMissing'](_0x2b775e(0x111),_0x2b775e(0xfb));const _0x540ccd=['id',_0x2b775e(0xeb),_0x2b775e(0xf5),'expect-path',_0x2b775e(0x109)][_0x2b775e(0xd7)](_0x383e93=>hasFlag(_0x2d1af1,_0x383e93));if(_0x540ccd[_0x2b775e(0x113)]>0x0)throw CliErrors[_0x2b775e(0xf4)](_0x2b775e(0xdd)+_0x540ccd[_0x2b775e(0xe6)](_0x343879=>'--'+_0x343879)[_0x2b775e(0x11f)](',\x20')+'.');}async function buildDeletePlan(_0x6ffdf1){const _0x16ec26=a101_0x18e27f,_0x3bdacd=validateExactId(_0x6ffdf1),_0x15a939=await fetchMutationSnapshot(_0x6ffdf1,'plan\x20delete',_0x3bdacd),_0x313ad7=requireMenu(_0x15a939,_0x3bdacd);return assertExpectedState(_0x6ffdf1,_0x313ad7),assertDeleteSafety(_0x313ad7),mutationResult({'operation':_0x16ec26(0xfa),'selector':{'id':_0x3bdacd},'before':_0x313ad7,'after':null,'dryRun':!![],'backend':[...BACKEND],'snapshotHash':_0x15a939['hash'],'cascade':cascadeFor(_0x313ad7),'warnings':[]});}function assertDeleteSafety(_0x2ee2ee){const _0x4e0469=a101_0x18e27f;if(_0x2ee2ee['childrenCount']>0x0)throw menuError(_0x4e0469(0x101),_0x4e0469(0xd0)+_0x2ee2ee['id']+_0x4e0469(0x106)+_0x2ee2ee[_0x4e0469(0x116)]+_0x4e0469(0x10a),_0x4e0469(0x118)+_0x2ee2ee[_0x4e0469(0xe2)]['join'](',\x20'));if(_0x2ee2ee[_0x4e0469(0x11a)]!=null)throw menuError(_0x4e0469(0xdf),_0x4e0469(0xd0)+_0x2ee2ee['id']+_0x4e0469(0x10b)+_0x2ee2ee['pageId']+_0x4e0469(0x110),_0x4e0469(0x128));if(_0x2ee2ee[_0x4e0469(0x107)]['trim']()[_0x4e0469(0xef)]()!==_0x4e0469(0x103))throw menuError(_0x4e0469(0xee),'Menu\x20'+_0x2ee2ee['id']+'\x20is\x20type\x20\x22'+(_0x2ee2ee[_0x4e0469(0x107)]||_0x4e0469(0xd6))+_0x4e0469(0xec),_0x4e0469(0xf3));if(!_0x2ee2ee[_0x4e0469(0x104)])throw menuError(_0x4e0469(0xf6),_0x4e0469(0x11b)+_0x2ee2ee['id']+_0x4e0469(0xdb),_0x4e0469(0x122));if(_0x2ee2ee[_0x4e0469(0xf8)][_0x4e0469(0x113)]>0x0)throw menuError('menu_folder_has_resources',_0x4e0469(0x11b)+_0x2ee2ee['id']+_0x4e0469(0xda)+_0x2ee2ee[_0x4e0469(0xf8)][_0x4e0469(0x113)]+'\x20resource\x20URL(s).',_0x4e0469(0xf1));}function assertCascadeMatchesPlan(_0x22cfef,_0x545d5f){const _0x2775b6=a101_0x18e27f,_0x5e44b6=cascadeFor(_0x545d5f);if(JSON['stringify'](_0x22cfef[_0x2775b6(0xf2)])!==JSON[_0x2775b6(0x10f)](_0x5e44b6))throw menuError('menu_plan_invalid',_0x2775b6(0xf9));}function a101_0x19ee(_0x19c2a9,_0x1d9e36){_0x19c2a9=_0x19c2a9-0xd0;const _0x1dc23a=a101_0x1dc2();let _0x19eeb5=_0x1dc23a[_0x19c2a9];return _0x19eeb5;}function cascadeFor(_0x1e434e){const _0x55fa54=a101_0x18e27f;return{'pages':_0x1e434e[_0x55fa54(0x11a)]==null?[]:[_0x1e434e[_0x55fa54(0x11a)]],'pageSchemaAffected':_0x1e434e[_0x55fa54(0x11a)]!=null};}function asMenuError(_0x3515eb){const _0x13dbe5=a101_0x18e27f;return _0x3515eb instanceof CliError?_0x3515eb:menuError(_0x13dbe5(0xd9),_0x3515eb instanceof Error?_0x3515eb['message']:String(_0x3515eb));}
1
+ const a101_0x155acc=a101_0x2254;(function(_0x4ee36c,_0x211310){const _0x428ecd=a101_0x2254,_0x186128=_0x4ee36c();while(!![]){try{const _0x374bff=-parseInt(_0x428ecd(0x177))/0x1*(parseInt(_0x428ecd(0x158))/0x2)+-parseInt(_0x428ecd(0x171))/0x3*(-parseInt(_0x428ecd(0x196))/0x4)+-parseInt(_0x428ecd(0x19d))/0x5*(parseInt(_0x428ecd(0x153))/0x6)+parseInt(_0x428ecd(0x180))/0x7+-parseInt(_0x428ecd(0x15c))/0x8+parseInt(_0x428ecd(0x152))/0x9+-parseInt(_0x428ecd(0x18d))/0xa*(-parseInt(_0x428ecd(0x17c))/0xb);if(_0x374bff===_0x211310)break;else _0x186128['push'](_0x186128['shift']());}catch(_0x5f56d3){_0x186128['push'](_0x186128['shift']());}}}(a101_0x59ab,0x439ef));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,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,requireExplicitYes,requireMenu,validateExactId}from'../../commands/menu/shared/mutations.js';function a101_0x2254(_0xbaeb02,_0x251db6){_0xbaeb02=_0xbaeb02-0x152;const _0x59ab29=a101_0x59ab();let _0x225497=_0x59ab29[_0xbaeb02];return _0x225497;}function a101_0x59ab(){const _0x2a05f3=['has','expect-parent-id','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','31HKbqKP','flagMissing','Menu\x20','hash','Run\x20menu\x20list\x20to\x20check\x20whether\x20the\x20menu\x20still\x20exists\x20before\x20retrying.','22DBcozv','menu_non_empty','menu_plan_invalid','plan-out','572474mZQQQr','folder','Would\x20delete\x20menu\x20','--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.','\x20still\x20references\x20','expiresAt','str','POST','unconfirmed','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','pageId','cascade','\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','1458920AXKNjb','menu_delete_failed','plan-validation','snapshotHash','\x20is\x20still\x20present\x20after\x20the\x20delete\x20request.','map','Deleted\x20menu\x20','high-risk-write','plan','108NWXGln','Folder\x20','Use\x20the\x20platform\x20UI,\x20which\x20owns\x20the\x20page\x20and\x20PageSchema\x20cascade.','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','Exact\x20empty\x20folder\x20id\x20(required\x20with\x20--dry-run)','menu_folder_has_resources','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.','10HzHZyD','createdAt','menu_delete_page_bound','\x20resource\x20URL(s).','type','delete','\x22;\x20CLI\x20deletion\x20is\x20limited\x20to\x20empty\x20folders.','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','unknown','appCode','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','filter','cookie','\x20has\x20','menu_folder_resources_invalid','1901079pFNQSb','694662jbEmNF','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.','Use\x20the\x20platform\x20UI\x20for\x20non-folder\x20menu\x20deletion.','menu_delete_unsupported_type','dry-run','25106eZAxoC','/smartapi/menu/delete','execute\x20reviewed\x20delete\x20plan','validation','1326464ZNmnKI','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','failed','bool','string','childrenCount','\x20is\x20type\x20\x22',';\x20execution\x20must\x20consume\x20','join','\x20and\x20cannot\x20be\x20deleted\x20by\x20the\x20CLI.','stringify','verification','pre-write-plan-validation','resources','Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file','Delete\x20one\x20empty\x20folder\x20from\x20a\x20reviewed\x20plan','plan\x20delete','selector','trim','target','menu','53187aHYHxh','Backend\x20did\x20not\x20confirm\x20deletion\x20of\x20menu\x20','path'];a101_0x59ab=function(){return _0x2a05f3;};return a101_0x59ab();}import{deleteMenuEntity}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0x155acc(0x187),'path':a101_0x155acc(0x159)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0x155acc(0x19a)},MENU_DELETE_PLAN_OUT_FLAG={'name':'plan-out','type':a101_0x155acc(0x160),'description':a101_0x155acc(0x16a)},MENU_DELETE_PLAN_FLAG={'name':'plan','type':'string','description':a101_0x155acc(0x189)};export const menuDelete={'service':a101_0x155acc(0x170),'command':a101_0x155acc(0x1a2),'description':a101_0x155acc(0x16b),'risk':a101_0x155acc(0x194),'structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x57d436){const _0x49944a=a101_0x155acc;_0x57d436[_0x49944a(0x15f)](_0x49944a(0x157))?validateDeleteDryRunInput(_0x57d436):validateDeleteExecuteInput(_0x57d436),requireExplicitYes(_0x57d436);},async 'dryRun'(_0x2b8203){const _0x218f29=a101_0x155acc;validateDeleteDryRunInput(_0x2b8203);const _0xf351db=await buildDeletePlan(_0x2b8203),_0x1d4406=createMenuDeletePlanFile(_0x2b8203['appCode'],_0xf351db),_0x122ff9=await writeMenuDeletePlan(_0x2b8203[_0x218f29(0x186)](_0x218f29(0x17f)),_0x1d4406),_0x3e040f=mutationResult({..._0xf351db,'planFile':{'path':_0x122ff9,'createdAt':_0x1d4406[_0x218f29(0x19e)],'expiresAt':_0x1d4406[_0x218f29(0x185)]}});return menuDryRunResult(_0x3e040f,{'method':'POST','url':_0x218f29(0x159),'body':{'id':_0x3e040f['selector']['id'],'plan':_0x122ff9,'snapshotHash':_0x3e040f['snapshotHash']},'description':_0x218f29(0x182)+_0x3e040f[_0x218f29(0x16d)]['id']+_0x218f29(0x163)+_0x122ff9+'.'});},async 'execute'(_0x1261ce){const _0x895b20=a101_0x155acc;requireExplicitYes(_0x1261ce),validateDeleteExecuteInput(_0x1261ce);const _0x54ce76=await readMenuDeletePlan(_0x1261ce[_0x895b20(0x186)]('plan')),_0x50e5f6=mutationPlanFromDeleteFile(_0x54ce76[_0x895b20(0x195)],_0x54ce76[_0x895b20(0x173)]),_0x3bf33f=_0x54ce76[_0x895b20(0x195)][_0x895b20(0x16f)]['id'];try{assertMenuDeletePlanExecutable(_0x54ce76['plan'],_0x1261ce[_0x895b20(0x1a6)]);}catch(_0x5ad438){throw menuFailure(asMenuError(_0x5ad438),_0x50e5f6,{'stage':_0x895b20(0x18f),'failed':{'id':_0x3bf33f}});}let _0x2b01f5,_0xee7a8e;try{_0x2b01f5=await fetchMutationSnapshot(_0x1261ce,_0x895b20(0x15a),_0x3bf33f),_0xee7a8e=assertMenuDeletePlanCurrent(_0x54ce76[_0x895b20(0x195)],_0x1261ce[_0x895b20(0x1a6)],_0x2b01f5),assertDeleteSafety(_0xee7a8e),assertCascadeMatchesPlan(_0x50e5f6,_0xee7a8e);}catch(_0x337d31){throw menuFailure(asMenuError(_0x337d31),_0x50e5f6,{'stage':_0x895b20(0x168),'failed':{'id':_0x3bf33f}});}try{const _0x177271=await deleteMenuEntity(_0x1261ce[_0x895b20(0x1a9)],_0x3bf33f);if(!_0x177271)throw menuError(_0x895b20(0x18e),_0x895b20(0x172)+_0x3bf33f+'.',_0x895b20(0x17b));}catch(_0x3d451b){const _0x2489e4=mapMenuApiError(_0x3d451b,_0x895b20(0x1a2),_0x3bf33f);throw menuFailure(_0x2489e4,_0x50e5f6,{'stage':_0x895b20(0x1a2),'failed':{'id':_0x3bf33f}});}let _0x5bc5b8;try{_0x5bc5b8=await fetchMenuSnapshot(_0x1261ce[_0x895b20(0x1a6)],_0x1261ce[_0x895b20(0x1a9)]),assertVerified(!_0x5bc5b8['byId'][_0x895b20(0x174)](_0x3bf33f),'Menu\x20'+_0x3bf33f+_0x895b20(0x191));}catch(_0x342aa3){const _0xf8dfd5=describeMenuErrorCause(_0x342aa3,'verify\x20delete',_0x3bf33f),_0x5b5947=asVerificationError(_0x342aa3,'Delete\x20request\x20for\x20menu\x20'+_0x3bf33f+'\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence');throw menuFailure(_0x5b5947,_0x50e5f6,{'stage':_0x895b20(0x167),'succeeded':[{'id':_0x3bf33f,'deleteRequested':!![]}],'failed':{'id':_0x3bf33f,'targetAbsent':_0x895b20(0x188),..._0xf8dfd5},'warnings':['The\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.'],'verification':{'status':_0x895b20(0x15e),'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetId':_0x3bf33f}});}const _0x1a4d06=mutationResult({..._0x50e5f6,'dryRun':![],'succeeded':[{'id':_0x3bf33f,'deleted':!![]}],'verification':{'checkedBy':'menu\x20list','plannedSnapshotHash':_0x50e5f6[_0x895b20(0x190)],'finalSnapshotHash':_0x5bc5b8['hash'],'targetAbsent':!![]}});return{'ok':!![],'data':_0x1a4d06,'message':_0x895b20(0x193)+_0x3bf33f+'.'};}};function validateDeleteDryRunInput(_0x217b7a){const _0x4eaaf8=a101_0x155acc;validateExactId(_0x217b7a);if(!hasFlag(_0x217b7a,'plan-out')||!_0x217b7a[_0x4eaaf8(0x186)](_0x4eaaf8(0x17f))['trim']())throw CliErrors[_0x4eaaf8(0x178)](_0x4eaaf8(0x17f),_0x4eaaf8(0x183));if(hasFlag(_0x217b7a,'plan'))throw CliErrors[_0x4eaaf8(0x15b)](_0x4eaaf8(0x1a7));}function validateDeleteExecuteInput(_0x3d6352){const _0xaede90=a101_0x155acc;if(!hasFlag(_0x3d6352,_0xaede90(0x195))||!_0x3d6352['str'](_0xaede90(0x195))['trim']())throw CliErrors[_0xaede90(0x178)]('plan',_0xaede90(0x15d));const _0x24c161=['id',_0xaede90(0x17f),_0xaede90(0x175),'expect-path','expected-children-count'][_0xaede90(0x1a8)](_0x254828=>hasFlag(_0x3d6352,_0x254828));if(_0x24c161['length']>0x0)throw CliErrors[_0xaede90(0x15b)](_0xaede90(0x199)+_0x24c161[_0xaede90(0x192)](_0x34d120=>'--'+_0x34d120)[_0xaede90(0x164)](',\x20')+'.');}async function buildDeletePlan(_0x3a7007){const _0x51daaa=a101_0x155acc,_0x4f0f71=validateExactId(_0x3a7007),_0x473633=await fetchMutationSnapshot(_0x3a7007,_0x51daaa(0x16c),_0x4f0f71),_0x4bb886=requireMenu(_0x473633,_0x4f0f71);return assertExpectedState(_0x3a7007,_0x4bb886),assertDeleteSafety(_0x4bb886),mutationResult({'operation':'delete','selector':{'id':_0x4f0f71},'before':_0x4bb886,'after':null,'dryRun':!![],'backend':[...BACKEND],'snapshotHash':_0x473633[_0x51daaa(0x17a)],'cascade':cascadeFor(_0x4bb886),'warnings':[]});}function assertDeleteSafety(_0xc77b93){const _0x1de5b7=a101_0x155acc;if(_0xc77b93[_0x1de5b7(0x161)]>0x0)throw menuError(_0x1de5b7(0x17d),_0x1de5b7(0x179)+_0xc77b93['id']+_0x1de5b7(0x1aa)+_0xc77b93[_0x1de5b7(0x161)]+'\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.',_0x1de5b7(0x1a4)+_0xc77b93['childrenIds'][_0x1de5b7(0x164)](',\x20'));if(_0xc77b93[_0x1de5b7(0x18a)]!=null)throw menuError(_0x1de5b7(0x19f),'Menu\x20'+_0xc77b93['id']+'\x20is\x20bound\x20to\x20page\x20'+_0xc77b93[_0x1de5b7(0x18a)]+_0x1de5b7(0x165),_0x1de5b7(0x198));if(_0xc77b93[_0x1de5b7(0x1a1)][_0x1de5b7(0x16e)]()['toLowerCase']()!==_0x1de5b7(0x181))throw menuError(_0x1de5b7(0x156),'Menu\x20'+_0xc77b93['id']+_0x1de5b7(0x162)+(_0xc77b93[_0x1de5b7(0x1a1)]||_0x1de5b7(0x1a5))+_0x1de5b7(0x1a3),_0x1de5b7(0x155));if(!_0xc77b93['resourcesValid'])throw menuError(_0x1de5b7(0x1ab),_0x1de5b7(0x197)+_0xc77b93['id']+_0x1de5b7(0x18c),_0x1de5b7(0x154));if(_0xc77b93[_0x1de5b7(0x169)]['length']>0x0)throw menuError(_0x1de5b7(0x19b),_0x1de5b7(0x197)+_0xc77b93['id']+_0x1de5b7(0x184)+_0xc77b93[_0x1de5b7(0x169)]['length']+_0x1de5b7(0x1a0),_0x1de5b7(0x19c));}function assertCascadeMatchesPlan(_0x35ef0d,_0x388a2d){const _0x9a27aa=a101_0x155acc,_0x2fb594=cascadeFor(_0x388a2d);if(JSON[_0x9a27aa(0x166)](_0x35ef0d[_0x9a27aa(0x18b)])!==JSON[_0x9a27aa(0x166)](_0x2fb594))throw menuError(_0x9a27aa(0x17e),_0x9a27aa(0x176));}function cascadeFor(_0x4dd5a0){const _0x30130c=a101_0x155acc;return{'pages':_0x4dd5a0[_0x30130c(0x18a)]==null?[]:[_0x4dd5a0['pageId']],'pageSchemaAffected':_0x4dd5a0[_0x30130c(0x18a)]!=null};}function asMenuError(_0x309b14){return _0x309b14 instanceof CliError?_0x309b14:menuError('menu_plan_invalid',_0x309b14 instanceof Error?_0x309b14['message']:String(_0x309b14));}
@@ -1 +1 @@
1
- const a102_0x34f57e=a102_0x26db;(function(_0x563599,_0x595366){const _0x9d249a=a102_0x26db,_0x88877e=_0x563599();while(!![]){try{const _0x36429f=-parseInt(_0x9d249a(0x14e))/0x1+parseInt(_0x9d249a(0x114))/0x2+-parseInt(_0x9d249a(0x12f))/0x3*(-parseInt(_0x9d249a(0x113))/0x4)+parseInt(_0x9d249a(0x11e))/0x5+-parseInt(_0x9d249a(0x154))/0x6*(-parseInt(_0x9d249a(0x12c))/0x7)+parseInt(_0x9d249a(0x158))/0x8+-parseInt(_0x9d249a(0x12a))/0x9;if(_0x36429f===_0x595366)break;else _0x88877e['push'](_0x88877e['shift']());}catch(_0x4ca1bf){_0x88877e['push'](_0x88877e['shift']());}}}(a102_0x3a40,0xed927));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot,getChildren}from'../../commands/menu/shared/facts.js';import{MAX_MENU_SORT,MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,parseParentId,recheckMutationSnapshot,requireExplicitYes,requireFolder,toApiParentId,validateSort}from'../../commands/menu/shared/mutations.js';import{createMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a102_0x34f57e(0x13d),'path':'/smartapi/menu/create'}];export const menuGroupCreate={'service':'menu','command':a102_0x34f57e(0x124),'description':a102_0x34f57e(0x150),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a102_0x34f57e(0x138),'type':a102_0x34f57e(0x127),'required':!![],'description':a102_0x34f57e(0x131)},MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3e6023){validateCreateInput(_0x3e6023),requireExplicitYes(_0x3e6023);},async 'dryRun'(_0x370d5a){const _0xf0a6a6=a102_0x34f57e,_0xa08204=await buildCreatePlan(_0x370d5a,!![]),_0x92af1=_0xa08204[_0xf0a6a6(0x14b)];return menuDryRunResult(_0xa08204,{'method':_0xf0a6a6(0x13d),'url':'/smartapi/menu/create','body':{'parentId':toApiParentId(_0x92af1[_0xf0a6a6(0x139)]),'label':_0x92af1['label'],'type':_0xf0a6a6(0x115),'visible':!![],'sort':_0x92af1['sort'],'extend':{}},'description':_0xf0a6a6(0x116)+String(_0x92af1[_0xf0a6a6(0x138)])+'\x22\x20with\x20a\x20platform-generated\x20path.'});},async 'execute'(_0x11c550){const _0x55710=a102_0x34f57e;validateCreateInput(_0x11c550),requireExplicitYes(_0x11c550);const _0x5d80af=await buildCreatePlan(_0x11c550,![]),_0x385e88=_0x5d80af[_0x55710(0x14b)];await recheckMutationSnapshot(_0x11c550,_0x5d80af,_0x55710(0x130));let _0x4968ab;try{_0x4968ab=await createMenuEntity(_0x11c550['appCode'],_0x11c550[_0x55710(0x126)],{'parentId':toApiParentId(_0x385e88['parentId']),'label':String(_0x385e88[_0x55710(0x138)]),'type':'folder','visible':!![],'sort':Number(_0x385e88['sort']),'extend':{}});}catch(_0xadb85b){const _0x207e4d=mapMenuApiError(_0xadb85b,'create\x20folder');throw menuFailure(_0x207e4d,_0x5d80af,{'stage':_0x55710(0x157),'failed':{}});}const _0x243a4b=Number(_0x4968ab['id']);if(!Number['isSafeInteger'](_0x243a4b)||_0x243a4b<=0x0){const _0x233030=menuError(_0x55710(0x132),_0x55710(0x13a),_0x55710(0x128));throw menuFailure(_0x233030,_0x5d80af,{'stage':_0x55710(0x13e),'failed':{'createdId':_0x4968ab['id']??null},'warnings':[_0x55710(0x146)],'verification':{'status':_0x55710(0x153),'lookupCommand':_0x55710(0x149)}});}const _0x4d378e=typeof _0x4968ab['path']===_0x55710(0x127)?_0x4968ab[_0x55710(0x13b)]:'';if(!_0x4d378e['trim']()){const _0x17588f=menuError(_0x55710(0x132),_0x55710(0x14a)+_0x243a4b+'\x20did\x20not\x20contain\x20a\x20non-empty\x20generated\x20path.',_0x55710(0x13f));throw menuFailure(_0x17588f,_0x5d80af,{'stage':'create-response-validation','succeeded':[{'id':_0x243a4b,'created':!![]}],'failed':{'id':_0x243a4b,'generatedPathConfirmed':![]},'warnings':[_0x55710(0x147)+_0x243a4b+'\x20may\x20exist\x20online;\x20verify\x20it\x20by\x20id\x20before\x20retrying.'],'after':{..._0x385e88,'id':_0x243a4b,'path':_0x4d378e},'verification':{'status':_0x55710(0x153),'lookupCommand':_0x55710(0x149),'targetId':_0x243a4b}});}let _0x3b1991;try{_0x3b1991=await fetchMenuSnapshot(_0x11c550[_0x55710(0x145)],_0x11c550['cookie']);}catch(_0x4d7750){const _0x3131f7=describeMenuErrorCause(_0x4d7750,_0x55710(0x120),_0x243a4b),_0x4a88ff=asVerificationError(_0x4d7750,_0x55710(0x147)+_0x243a4b+_0x55710(0x134));throw menuFailure(_0x4a88ff,_0x5d80af,{'stage':_0x55710(0x14d),'succeeded':[{'id':_0x243a4b,'created':!![],'path':_0x4d378e}],'failed':{'id':_0x243a4b,'finalFactsConfirmed':![],..._0x3131f7},'warnings':['Folder\x20'+_0x243a4b+_0x55710(0x123)+JSON[_0x55710(0x148)](_0x4d378e)+';\x20verify\x20it\x20before\x20retrying.'],'after':{..._0x385e88,'id':_0x243a4b,'path':_0x4d378e},'verification':{'status':_0x55710(0x153),'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20json','targetId':_0x243a4b}});}const _0x4df432=_0x3b1991[_0x55710(0x11c)][_0x55710(0x14c)](_0x243a4b);let _0x526290;try{assertVerified(Boolean(_0x4df432),_0x55710(0x151)+_0x243a4b+_0x55710(0x14f)),_0x526290=_0x4df432,assertVerified(_0x526290['type']===_0x55710(0x115),'Created\x20menu\x20'+_0x243a4b+_0x55710(0x12b)),assertVerified(_0x526290['label']===_0x385e88['label'],'Created\x20folder\x20'+_0x243a4b+_0x55710(0x12d)),assertVerified(_0x526290[_0x55710(0x13b)]===_0x4d378e&&Boolean(_0x526290[_0x55710(0x13b)][_0x55710(0x144)]()),_0x55710(0x151)+_0x243a4b+'\x20path\x20does\x20not\x20match\x20the\x20platform-generated\x20path.'),assertVerified(_0x526290[_0x55710(0x125)]===!![],'Created\x20folder\x20'+_0x243a4b+_0x55710(0x135)),assertVerified(_0x526290[_0x55710(0x141)][_0x55710(0x117)]===0x0,_0x55710(0x151)+_0x243a4b+'\x20has\x20resources.'),assertVerified(_0x526290['childrenCount']===0x0,_0x55710(0x151)+_0x243a4b+_0x55710(0x137)),assertVerified(_0x526290[_0x55710(0x129)]===_0x385e88['sort'],_0x55710(0x151)+_0x243a4b+_0x55710(0x11a)),assertVerified(_0x526290['parentId']===_0x385e88['parentId'],_0x55710(0x151)+_0x243a4b+_0x55710(0x12e)+(_0x526290[_0x55710(0x139)]??_0x55710(0x152))+'.'),assertVerified(_0x526290[_0x55710(0x142)]==null,_0x55710(0x151)+_0x243a4b+_0x55710(0x11d));const _0x114418=_0x526290[_0x55710(0x139)]==null?undefined:requireFolder(_0x3b1991,_0x526290[_0x55710(0x139)]);assertVerified(_0x526290[_0x55710(0x118)]===(_0x114418?_0x114418['depth']+0x1:0x0),'Created\x20folder\x20'+_0x243a4b+_0x55710(0x13c));}catch(_0x3ddcac){const _0x1b0f6=describeMenuErrorCause(_0x3ddcac,'verify\x20folder\x20creation',_0x243a4b),_0x5ece96=asVerificationError(_0x3ddcac,'Folder\x20'+_0x243a4b+'\x20was\x20created\x20but\x20its\x20final\x20facts\x20violate\x20the\x20folder\x20contract');throw menuFailure(_0x5ece96,_0x5d80af,{'stage':_0x55710(0x14d),'succeeded':[{'id':_0x243a4b,'created':!![],'path':_0x4d378e}],'failed':{'id':_0x243a4b,'finalFactsConfirmed':![],..._0x1b0f6},'warnings':[_0x55710(0x147)+_0x243a4b+_0x55710(0x11f)],'after':_0x4df432??{..._0x385e88,'id':_0x243a4b,'path':_0x4d378e},'verification':{'status':_0x55710(0x153),'lookupCommand':_0x55710(0x149),'targetId':_0x243a4b}});}const _0x15c926=mutationResult({..._0x5d80af,'after':_0x526290,'dryRun':![],'succeeded':[{'id':_0x243a4b,'type':_0x55710(0x115),'path':_0x4d378e}],'verification':{'checkedBy':_0x55710(0x136),'snapshotHash':_0x3b1991['hash'],'folder':!![],'path':_0x4d378e,'emptyResources':!![]}});return{'ok':!![],'data':_0x15c926,'message':_0x55710(0x121)+_0x243a4b+'.'};}};function validateCreateInput(_0x5a7936){const _0x4a478b=a102_0x34f57e,_0x566f72=_0x5a7936[_0x4a478b(0x143)](_0x4a478b(0x138))['trim']();if(!_0x566f72)throw CliErrors['flagMissing']('label');parseParentId(_0x5a7936,_0x4a478b(0x119)),validateSort(_0x5a7936);}function a102_0x26db(_0x5254fb,_0x4e5878){_0x5254fb=_0x5254fb-0x113;const _0x3a4092=a102_0x3a40();let _0x26dbbf=_0x3a4092[_0x5254fb];return _0x26dbbf;}async function buildCreatePlan(_0x183d3e,_0x11b41e){const _0x23fff1=a102_0x34f57e,_0x15e210=await fetchMutationSnapshot(_0x183d3e,_0x23fff1(0x130)),_0x7bd575=parseParentId(_0x183d3e,_0x23fff1(0x119))??null;if(_0x7bd575!=null)requireFolder(_0x15e210,_0x7bd575);const _0x56ceca=validateSort(_0x183d3e),_0x57a2ec=_0x56ceca??nextSiblingSort(_0x15e210,_0x7bd575),_0x47aa8b=_0x183d3e[_0x23fff1(0x143)](_0x23fff1(0x138))[_0x23fff1(0x144)]();return mutationResult({'operation':_0x23fff1(0x124),'selector':{'label':_0x47aa8b,'parentId':_0x7bd575},'before':null,'after':{'id':null,'parentId':_0x7bd575,'label':_0x47aa8b,'path':_0x23fff1(0x122),'type':'folder','visible':!![],'sort':_0x57a2ec,'resources':[],'childrenIds':[],'childrenCount':0x0},'dryRun':_0x11b41e,'backend':[...BACKEND],'plannedActions':[{'stage':_0x23fff1(0x133),'method':_0x23fff1(0x13d),'path':'/smartapi/menu/create','body':{'parentId':toApiParentId(_0x7bd575),'label':_0x47aa8b,'type':_0x23fff1(0x115),'visible':!![],'sort':_0x57a2ec,'extend':{}}}],'snapshotHash':_0x15e210['hash'],'warnings':[_0x23fff1(0x11b)]});}function a102_0x3a40(){const _0x3f71df=['sort','21829617mHJIcQ','\x20is\x20not\x20type\x20folder.','49ZubmuF','\x20has\x20an\x20unexpected\x20label.','\x20has\x20unexpected\x20parent\x20','3PZhfFS','create\x20folder','Folder\x20label','menu_create_response_invalid','create-folder','\x20was\x20created\x20but\x20readback\x20could\x20not\x20load\x20its\x20final\x20facts','\x20is\x20not\x20visible.','menu\x20list','\x20is\x20not\x20empty.','label','parentId','Menu\x20create\x20response\x20did\x20not\x20contain\x20a\x20valid\x20menu\x20id.','path','\x20depth\x20does\x20not\x20match\x20its\x20final\x20parent\x20hierarchy.','POST','create-response-validation','Inspect\x20the\x20created\x20id\x20with\x20`rabetbase\x20menu\x20list\x20--format\x20json`;\x20do\x20not\x20retry\x20creation\x20until\x20its\x20state\x20is\x20known.','menu_sort_overflow','resources','pageId','str','trim','appCode','The\x20create\x20request\x20may\x20have\x20succeeded;\x20verify\x20the\x20online\x20menu\x20list\x20before\x20retrying.','Folder\x20','stringify','rabetbase\x20menu\x20list\x20--format\x20json','Menu\x20create\x20response\x20for\x20folder\x20','after','get','verification','828548UelQkR','\x20is\x20missing\x20from\x20menu\x20list.','Create\x20an\x20empty\x20folder\x20menu\x20at\x20root\x20or\x20under\x20another\x20folder','Created\x20folder\x20','root','failed','600870qLcunh','max','Reorder\x20sibling\x20menus\x20below\x20','create','1832160aNMXKw','4004276HYrqdo','1201788ixcVcS','folder','Would\x20create\x20empty\x20folder\x20\x22','length','depth','parent-id','\x20has\x20an\x20unexpected\x20sort.','The\x20platform\x20assigns\x20the\x20folder\x20a\x20non-empty\x20path\x20used\x20by\x20menu\x20routing\x20and\x20keys.','byId','\x20unexpectedly\x20owns\x20a\x20page.','8475790tkZoAn','\x20remains\x20online;\x20inspect\x20its\x20final\x20facts\x20before\x20any\x20retry.','verify\x20folder\x20creation','Created\x20menu\x20folder\x20','<platform-generated>','\x20may\x20exist\x20online\x20at\x20path\x20','group-create','visible','cookie','string','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20before\x20retrying;\x20the\x20folder\x20may\x20already\x20exist.'];a102_0x3a40=function(){return _0x3f71df;};return a102_0x3a40();}function nextSiblingSort(_0x4fb687,_0x371fb9){const _0x15b568=a102_0x34f57e,_0x337e05=getChildren(_0x4fb687,_0x371fb9)['map'](_0x218b9c=>_0x218b9c[_0x15b568(0x129)])['filter'](_0x6abbd0=>typeof _0x6abbd0==='number');if(_0x337e05[_0x15b568(0x117)]===0x0)return 0x0;const _0x46acf8=Math[_0x15b568(0x155)](..._0x337e05);if(_0x46acf8>=MAX_MENU_SORT)throw menuError(_0x15b568(0x140),'Cannot\x20append\x20a\x20folder\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x46acf8+'.',_0x15b568(0x156)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x46acf8+0x1;}
1
+ const a102_0x47ff91=a102_0x2d69;(function(_0x1627e6,_0x109a4c){const _0x36705d=a102_0x2d69,_0x110c0b=_0x1627e6();while(!![]){try{const _0x4459dd=-parseInt(_0x36705d(0xd1))/0x1*(parseInt(_0x36705d(0xd3))/0x2)+-parseInt(_0x36705d(0xc2))/0x3+-parseInt(_0x36705d(0xd4))/0x4+-parseInt(_0x36705d(0xa6))/0x5+-parseInt(_0x36705d(0x9c))/0x6+-parseInt(_0x36705d(0xba))/0x7+-parseInt(_0x36705d(0xd9))/0x8*(-parseInt(_0x36705d(0xbf))/0x9);if(_0x4459dd===_0x109a4c)break;else _0x110c0b['push'](_0x110c0b['shift']());}catch(_0x6d675f){_0x110c0b['push'](_0x110c0b['shift']());}}}(a102_0x4abe,0x85f74));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot,getChildren}from'../../commands/menu/shared/facts.js';import{MAX_MENU_SORT,MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,parseParentId,recheckMutationSnapshot,requireExplicitYes,requireFolder,toApiParentId,validateSort}from'../../commands/menu/shared/mutations.js';import{createMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a102_0x2d69(_0x340df4,_0x54b039){_0x340df4=_0x340df4-0x92;const _0x4abef0=a102_0x4abe();let _0x2d69d2=_0x4abef0[_0x340df4];return _0x2d69d2;}const BACKEND=[{'method':a102_0x47ff91(0xa1),'path':a102_0x47ff91(0xc9)}];function a102_0x4abe(){const _0x15b562=['root','str','Created\x20menu\x20','\x20may\x20exist\x20online;\x20verify\x20it\x20by\x20id\x20before\x20retrying.','group-create','path','18235KUUCvK','The\x20platform\x20assigns\x20the\x20folder\x20a\x20non-empty\x20path\x20used\x20by\x20menu\x20routing\x20and\x20keys.','50JMoQhm','1702704hXnnsw','\x22\x20with\x20a\x20platform-generated\x20path.','trim','max','type','523504wJoioK','create','hash','<platform-generated>','Menu\x20create\x20response\x20did\x20not\x20contain\x20a\x20valid\x20menu\x20id.','\x20path\x20does\x20not\x20match\x20the\x20platform-generated\x20path.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20before\x20retrying;\x20the\x20folder\x20may\x20already\x20exist.','length','depth','map','Inspect\x20the\x20created\x20id\x20with\x20`rabetbase\x20menu\x20list\x20--format\x20json`;\x20do\x20not\x20retry\x20creation\x20until\x20its\x20state\x20is\x20known.','\x20was\x20created\x20but\x20its\x20final\x20facts\x20violate\x20the\x20folder\x20contract','rabetbase\x20menu\x20list\x20--format\x20json','351552sDQIIa','\x20may\x20exist\x20online\x20at\x20path\x20','sort','\x20remains\x20online;\x20inspect\x20its\x20final\x20facts\x20before\x20any\x20retry.','flagMissing','POST','after','Create\x20an\x20empty\x20folder\x20menu\x20at\x20root\x20or\x20under\x20another\x20folder','\x20unexpectedly\x20owns\x20a\x20page.','appCode','3206090zgGjtU',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','Would\x20create\x20empty\x20folder\x20\x22','isSafeInteger','Menu\x20create\x20response\x20for\x20folder\x20','parentId','folder','menu_create_response_invalid','Folder\x20','menu','Cannot\x20append\x20a\x20folder\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','The\x20create\x20request\x20may\x20have\x20succeeded;\x20verify\x20the\x20online\x20menu\x20list\x20before\x20retrying.','resources','\x20has\x20resources.','Reorder\x20sibling\x20menus\x20below\x20','Created\x20folder\x20','byId','create-folder','failed','parent-id','5378849cTABju','string','label','filter','create\x20folder','477MZaYst','cookie','menu\x20list','1709166NYFqhW','\x20is\x20not\x20visible.','get','Created\x20menu\x20folder\x20','childrenCount',';\x20verify\x20it\x20before\x20retrying.','verify\x20folder\x20creation','/smartapi/menu/create','pageId'];a102_0x4abe=function(){return _0x15b562;};return a102_0x4abe();}export const menuGroupCreate={'service':a102_0x47ff91(0xaf),'command':a102_0x47ff91(0xcf),'description':a102_0x47ff91(0xa3),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a102_0x47ff91(0xbc),'type':a102_0x47ff91(0xbb),'required':!![],'description':'Folder\x20label'},MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f8ac6){validateCreateInput(_0x1f8ac6),requireExplicitYes(_0x1f8ac6);},async 'dryRun'(_0x339f69){const _0x30f80c=a102_0x47ff91,_0x24cc26=await buildCreatePlan(_0x339f69,!![]),_0x4c77e7=_0x24cc26[_0x30f80c(0xa2)];return menuDryRunResult(_0x24cc26,{'method':'POST','url':_0x30f80c(0xc9),'body':{'parentId':toApiParentId(_0x4c77e7[_0x30f80c(0xab)]),'label':_0x4c77e7['label'],'type':_0x30f80c(0xac),'visible':!![],'sort':_0x4c77e7[_0x30f80c(0x9e)],'extend':{}},'description':_0x30f80c(0xa8)+String(_0x4c77e7[_0x30f80c(0xbc)])+_0x30f80c(0xd5)});},async 'execute'(_0x4f33dd){const _0x57bec3=a102_0x47ff91;validateCreateInput(_0x4f33dd),requireExplicitYes(_0x4f33dd);const _0x371f5e=await buildCreatePlan(_0x4f33dd,![]),_0xdad8b9=_0x371f5e[_0x57bec3(0xa2)];await recheckMutationSnapshot(_0x4f33dd,_0x371f5e,_0x57bec3(0xbe));let _0x56ba8c;try{_0x56ba8c=await createMenuEntity(_0x4f33dd['appCode'],_0x4f33dd['cookie'],{'parentId':toApiParentId(_0xdad8b9[_0x57bec3(0xab)]),'label':String(_0xdad8b9[_0x57bec3(0xbc)]),'type':'folder','visible':!![],'sort':Number(_0xdad8b9[_0x57bec3(0x9e)]),'extend':{}});}catch(_0x310376){const _0x355ecb=mapMenuApiError(_0x310376,_0x57bec3(0xbe));throw menuFailure(_0x355ecb,_0x371f5e,{'stage':_0x57bec3(0xda),'failed':{}});}const _0x28f65c=Number(_0x56ba8c['id']);if(!Number[_0x57bec3(0xa9)](_0x28f65c)||_0x28f65c<=0x0){const _0x4200f7=menuError('menu_create_response_invalid',_0x57bec3(0x93),_0x57bec3(0x95));throw menuFailure(_0x4200f7,_0x371f5e,{'stage':'create-response-validation','failed':{'createdId':_0x56ba8c['id']??null},'warnings':[_0x57bec3(0xb1)],'verification':{'status':'failed','lookupCommand':_0x57bec3(0x9b)}});}const _0x3aeeb0=typeof _0x56ba8c['path']==='string'?_0x56ba8c[_0x57bec3(0xd0)]:'';if(!_0x3aeeb0[_0x57bec3(0xd6)]()){const _0x7243a0=menuError(_0x57bec3(0xad),_0x57bec3(0xaa)+_0x28f65c+'\x20did\x20not\x20contain\x20a\x20non-empty\x20generated\x20path.',_0x57bec3(0x99));throw menuFailure(_0x7243a0,_0x371f5e,{'stage':'create-response-validation','succeeded':[{'id':_0x28f65c,'created':!![]}],'failed':{'id':_0x28f65c,'generatedPathConfirmed':![]},'warnings':[_0x57bec3(0xae)+_0x28f65c+_0x57bec3(0xce)],'after':{..._0xdad8b9,'id':_0x28f65c,'path':_0x3aeeb0},'verification':{'status':_0x57bec3(0xb8),'lookupCommand':_0x57bec3(0x9b),'targetId':_0x28f65c}});}let _0x3b1288;try{_0x3b1288=await fetchMenuSnapshot(_0x4f33dd[_0x57bec3(0xa5)],_0x4f33dd[_0x57bec3(0xc0)]);}catch(_0x4979e2){const _0x3987d7=describeMenuErrorCause(_0x4979e2,_0x57bec3(0xc8),_0x28f65c),_0xae9731=asVerificationError(_0x4979e2,_0x57bec3(0xae)+_0x28f65c+'\x20was\x20created\x20but\x20readback\x20could\x20not\x20load\x20its\x20final\x20facts');throw menuFailure(_0xae9731,_0x371f5e,{'stage':'verification','succeeded':[{'id':_0x28f65c,'created':!![],'path':_0x3aeeb0}],'failed':{'id':_0x28f65c,'finalFactsConfirmed':![],..._0x3987d7},'warnings':['Folder\x20'+_0x28f65c+_0x57bec3(0x9d)+JSON['stringify'](_0x3aeeb0)+_0x57bec3(0xc7)],'after':{..._0xdad8b9,'id':_0x28f65c,'path':_0x3aeeb0},'verification':{'status':'failed','lookupCommand':_0x57bec3(0x9b),'targetId':_0x28f65c}});}const _0x22a65e=_0x3b1288[_0x57bec3(0xb6)][_0x57bec3(0xc4)](_0x28f65c);let _0x978784;try{assertVerified(Boolean(_0x22a65e),_0x57bec3(0xb5)+_0x28f65c+'\x20is\x20missing\x20from\x20menu\x20list.'),_0x978784=_0x22a65e,assertVerified(_0x978784[_0x57bec3(0xd8)]===_0x57bec3(0xac),_0x57bec3(0xcd)+_0x28f65c+'\x20is\x20not\x20type\x20folder.'),assertVerified(_0x978784[_0x57bec3(0xbc)]===_0xdad8b9[_0x57bec3(0xbc)],_0x57bec3(0xb5)+_0x28f65c+'\x20has\x20an\x20unexpected\x20label.'),assertVerified(_0x978784[_0x57bec3(0xd0)]===_0x3aeeb0&&Boolean(_0x978784[_0x57bec3(0xd0)][_0x57bec3(0xd6)]()),'Created\x20folder\x20'+_0x28f65c+_0x57bec3(0x94)),assertVerified(_0x978784['visible']===!![],_0x57bec3(0xb5)+_0x28f65c+_0x57bec3(0xc3)),assertVerified(_0x978784[_0x57bec3(0xb2)][_0x57bec3(0x96)]===0x0,_0x57bec3(0xb5)+_0x28f65c+_0x57bec3(0xb3)),assertVerified(_0x978784[_0x57bec3(0xc6)]===0x0,_0x57bec3(0xb5)+_0x28f65c+'\x20is\x20not\x20empty.'),assertVerified(_0x978784[_0x57bec3(0x9e)]===_0xdad8b9[_0x57bec3(0x9e)],'Created\x20folder\x20'+_0x28f65c+'\x20has\x20an\x20unexpected\x20sort.'),assertVerified(_0x978784[_0x57bec3(0xab)]===_0xdad8b9[_0x57bec3(0xab)],'Created\x20folder\x20'+_0x28f65c+'\x20has\x20unexpected\x20parent\x20'+(_0x978784[_0x57bec3(0xab)]??_0x57bec3(0xcb))+'.'),assertVerified(_0x978784[_0x57bec3(0xca)]==null,_0x57bec3(0xb5)+_0x28f65c+_0x57bec3(0xa4));const _0x93b429=_0x978784[_0x57bec3(0xab)]==null?undefined:requireFolder(_0x3b1288,_0x978784[_0x57bec3(0xab)]);assertVerified(_0x978784[_0x57bec3(0x97)]===(_0x93b429?_0x93b429['depth']+0x1:0x0),_0x57bec3(0xb5)+_0x28f65c+'\x20depth\x20does\x20not\x20match\x20its\x20final\x20parent\x20hierarchy.');}catch(_0xf35be8){const _0x13371e=describeMenuErrorCause(_0xf35be8,_0x57bec3(0xc8),_0x28f65c),_0x3534ed=asVerificationError(_0xf35be8,_0x57bec3(0xae)+_0x28f65c+_0x57bec3(0x9a));throw menuFailure(_0x3534ed,_0x371f5e,{'stage':'verification','succeeded':[{'id':_0x28f65c,'created':!![],'path':_0x3aeeb0}],'failed':{'id':_0x28f65c,'finalFactsConfirmed':![],..._0x13371e},'warnings':[_0x57bec3(0xae)+_0x28f65c+_0x57bec3(0x9f)],'after':_0x22a65e??{..._0xdad8b9,'id':_0x28f65c,'path':_0x3aeeb0},'verification':{'status':_0x57bec3(0xb8),'lookupCommand':_0x57bec3(0x9b),'targetId':_0x28f65c}});}const _0x10d3ac=mutationResult({..._0x371f5e,'after':_0x978784,'dryRun':![],'succeeded':[{'id':_0x28f65c,'type':_0x57bec3(0xac),'path':_0x3aeeb0}],'verification':{'checkedBy':_0x57bec3(0xc1),'snapshotHash':_0x3b1288[_0x57bec3(0xdb)],'folder':!![],'path':_0x3aeeb0,'emptyResources':!![]}});return{'ok':!![],'data':_0x10d3ac,'message':_0x57bec3(0xc5)+_0x28f65c+'.'};}};function validateCreateInput(_0x132682){const _0x25f5f3=a102_0x47ff91,_0x2d0b2c=_0x132682[_0x25f5f3(0xcc)](_0x25f5f3(0xbc))['trim']();if(!_0x2d0b2c)throw CliErrors[_0x25f5f3(0xa0)](_0x25f5f3(0xbc));parseParentId(_0x132682,'parent-id'),validateSort(_0x132682);}async function buildCreatePlan(_0x63fe1,_0x369bdc){const _0x5599cc=a102_0x47ff91,_0x339f8a=await fetchMutationSnapshot(_0x63fe1,_0x5599cc(0xbe)),_0x5ccdfd=parseParentId(_0x63fe1,_0x5599cc(0xb9))??null;if(_0x5ccdfd!=null)requireFolder(_0x339f8a,_0x5ccdfd);const _0x3d98ff=validateSort(_0x63fe1),_0x2ad729=_0x3d98ff??nextSiblingSort(_0x339f8a,_0x5ccdfd),_0x39321b=_0x63fe1[_0x5599cc(0xcc)](_0x5599cc(0xbc))[_0x5599cc(0xd6)]();return mutationResult({'operation':'group-create','selector':{'label':_0x39321b,'parentId':_0x5ccdfd},'before':null,'after':{'id':null,'parentId':_0x5ccdfd,'label':_0x39321b,'path':_0x5599cc(0x92),'type':_0x5599cc(0xac),'visible':!![],'sort':_0x2ad729,'resources':[],'childrenIds':[],'childrenCount':0x0},'dryRun':_0x369bdc,'backend':[...BACKEND],'plannedActions':[{'stage':_0x5599cc(0xb7),'method':_0x5599cc(0xa1),'path':_0x5599cc(0xc9),'body':{'parentId':toApiParentId(_0x5ccdfd),'label':_0x39321b,'type':_0x5599cc(0xac),'visible':!![],'sort':_0x2ad729,'extend':{}}}],'snapshotHash':_0x339f8a[_0x5599cc(0xdb)],'warnings':[_0x5599cc(0xd2)]});}function nextSiblingSort(_0x3dfa37,_0x3e4a5d){const _0x431cad=a102_0x47ff91,_0x4f7ec5=getChildren(_0x3dfa37,_0x3e4a5d)[_0x431cad(0x98)](_0x1c7118=>_0x1c7118[_0x431cad(0x9e)])[_0x431cad(0xbd)](_0x4ce84c=>typeof _0x4ce84c==='number');if(_0x4f7ec5[_0x431cad(0x96)]===0x0)return 0x0;const _0x1cdfed=Math[_0x431cad(0xd7)](..._0x4f7ec5);if(_0x1cdfed>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x431cad(0xb0)+_0x1cdfed+'.',_0x431cad(0xb4)+MAX_MENU_SORT+_0x431cad(0xa7));return _0x1cdfed+0x1;}
@@ -1 +1 @@
1
- function a103_0x5d2c(_0x41a008,_0x1f11ab){_0x41a008=_0x41a008-0x115;const _0x25d5ce=a103_0x25d5();let _0x5d2c66=_0x25d5ce[_0x41a008];return _0x5d2c66;}function a103_0x25d5(){const _0x546886=['\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','unknown','Use\x20the\x20platform\x20UI\x20for\x20hierarchy\x20changes.','menu_not_folder','55cYtumP','1801212scGfPI','rabetbase\x20menu\x20list\x20--format\x20json','str','string','parentId','update\x20folder','selector','3355780SODkfm','Update\x20request\x20for\x20folder\x20','New\x20folder\x20label','Would\x20update\x20folder\x20','Rename\x20or\x20reorder\x20one\x20existing\x20folder\x20menu','\x20sort\x20update\x20did\x20not\x20take\x20effect.','group-update','No\x20online\x20fields\x20would\x20change.','\x22,\x20not\x20folder.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20choose\x20an\x20id\x20whose\x20type\x20is\x20folder.','validation','update','600111mIPBrh','--label\x20cannot\x20be\x20empty.','Folder\x20','type','hash','menu','The\x20update\x20request\x20may\x20have\x20taken\x20effect,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','verify\x20folder\x20update','sort','Menu\x20','\x20already\x20matches\x20the\x20requested\x20state.','Menu\x20group-update\x20does\x20not\x20support\x20reparenting;\x20remove\x20--parent-id.','parent-id','8VBEmJH','failed','\x20is\x20type\x20\x22','4IHozlN','\x20is\x20no\x20longer\x20type\x20folder.','332853OaPHpG','2211543UbVLGQ','verification','22VXnRVI','At\x20least\x20one\x20of\x20--label\x20or\x20--sort\x20is\x20required.','folder','trim','1924027RXmHRO','/smartapi/menu/update','appCode','label','349590bCARur','POST'];a103_0x25d5=function(){return _0x546886;};return a103_0x25d5();}const a103_0x3f2268=a103_0x5d2c;(function(_0x4e0dee,_0x494090){const _0x386889=a103_0x5d2c,_0x4be776=_0x4e0dee();while(!![]){try{const _0x28c253=-parseInt(_0x386889(0x127))/0x1*(-parseInt(_0x386889(0x125))/0x2)+-parseInt(_0x386889(0x115))/0x3+-parseInt(_0x386889(0x139))/0x4+-parseInt(_0x386889(0x138))/0x5*(parseInt(_0x386889(0x132))/0x6)+parseInt(_0x386889(0x12e))/0x7*(parseInt(_0x386889(0x122))/0x8)+parseInt(_0x386889(0x128))/0x9+parseInt(_0x386889(0x140))/0xa*(parseInt(_0x386889(0x12a))/0xb);if(_0x28c253===_0x494090)break;else _0x4be776['push'](_0x4be776['shift']());}catch(_0x313457){_0x4be776['push'](_0x4be776['shift']());}}}(a103_0x25d5,0x8a3b3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,MENU_SORT_FLAG,asVerificationError,assertExpectedState,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes,requireFolder,requireMenu,validateExactId,validateSort}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a103_0x3f2268(0x133),'path':a103_0x3f2268(0x12f)}];export const menuGroupUpdate={'service':a103_0x3f2268(0x11a),'command':a103_0x3f2268(0x146),'description':a103_0x3f2268(0x144),'risk':'high-risk-write','structuredErrors':!![],'rejectedFlags':[{'name':a103_0x3f2268(0x121),'message':a103_0x3f2268(0x120),'hint':a103_0x3f2268(0x136)}],'flags':[MENU_ID_FLAG,{'name':a103_0x3f2268(0x131),'type':a103_0x3f2268(0x13c),'description':a103_0x3f2268(0x142)},MENU_SORT_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1576f5){validateUpdateInput(_0x1576f5),requireExplicitYes(_0x1576f5);},async 'dryRun'(_0x3f1a40){const _0x1dcffc=a103_0x3f2268;validateUpdateInput(_0x3f1a40);const {plan:_0x33ead6,patch:_0x1c6ef6}=await buildUpdatePlan(_0x3f1a40,!![]);return menuDryRunResult(_0x33ead6,{'method':_0x1dcffc(0x133),'url':_0x1dcffc(0x12f),'body':_0x1c6ef6,'description':_0x1dcffc(0x143)+_0x33ead6['selector']['id']+'.'});},async 'execute'(_0x4e1dd8){const _0x1e0341=a103_0x3f2268;validateUpdateInput(_0x4e1dd8),requireExplicitYes(_0x4e1dd8);const {plan:_0x217c90,patch:_0x4f036f,noChanges:_0x5e5092}=await buildUpdatePlan(_0x4e1dd8,![]),_0x587545=Number(_0x217c90[_0x1e0341(0x13f)]['id']),_0x329a84=await recheckMutationSnapshot(_0x4e1dd8,_0x217c90,_0x1e0341(0x13e),_0x587545);if(!_0x5e5092)try{await updateMenuEntity(_0x4e1dd8[_0x1e0341(0x130)],_0x4e1dd8['cookie'],_0x4f036f);}catch(_0x27d571){const _0x127553=mapMenuApiError(_0x27d571,_0x1e0341(0x13e),_0x587545);throw menuFailure(_0x127553,_0x217c90,{'stage':_0x1e0341(0x14b),'failed':{'id':_0x587545}});}let _0x420265=_0x329a84,_0x2107b2;try{!_0x5e5092&&(_0x420265=await fetchMenuSnapshot(_0x4e1dd8[_0x1e0341(0x130)],_0x4e1dd8['cookie'])),_0x2107b2=requireMenu(_0x420265,_0x587545),verifyPatch(_0x2107b2,_0x4f036f),_0x2107b2[_0x1e0341(0x13d)]!=null&&requireFolder(_0x420265,_0x2107b2[_0x1e0341(0x13d)]);}catch(_0x55ce0e){const _0x3ec018=describeMenuErrorCause(_0x55ce0e,_0x1e0341(0x11c),_0x587545),_0x3ac626=asVerificationError(_0x55ce0e,_0x1e0341(0x141)+_0x587545+_0x1e0341(0x134));throw menuFailure(_0x3ac626,_0x217c90,{'stage':_0x1e0341(0x129),'succeeded':[{'id':_0x587545,'updateRequested':!_0x5e5092,'skipped':_0x5e5092}],'failed':{'id':_0x587545,'requestedStateConfirmed':![],..._0x3ec018},'warnings':[_0x1e0341(0x11b)],'verification':{'status':_0x1e0341(0x123),'lookupCommand':_0x1e0341(0x13a),'targetId':_0x587545}});}const _0xa7549=mutationResult({..._0x217c90,'after':_0x2107b2,'dryRun':![],'succeeded':[{'id':_0x587545,'updated':!_0x5e5092,'skipped':_0x5e5092}],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x420265[_0x1e0341(0x119)],'matchesRequestedState':!![]}});return{'ok':!![],'data':_0xa7549,'message':_0x5e5092?_0x1e0341(0x117)+_0x587545+_0x1e0341(0x11f):'Updated\x20folder\x20'+_0x587545+'.'};}};function validateUpdateInput(_0x374b2c){const _0x41ab54=a103_0x3f2268;validateExactId(_0x374b2c);if(hasFlag(_0x374b2c,_0x41ab54(0x121)))throw CliErrors[_0x41ab54(0x14a)](_0x41ab54(0x120),_0x41ab54(0x136));if(!hasFlag(_0x374b2c,'label')&&!hasFlag(_0x374b2c,'sort'))throw CliErrors['validation'](_0x41ab54(0x12b));if(hasFlag(_0x374b2c,'label')&&!_0x374b2c['str']('label')[_0x41ab54(0x12d)]())throw CliErrors['validation'](_0x41ab54(0x116));validateSort(_0x374b2c);}async function buildUpdatePlan(_0x5f2e88,_0x2d1a0c){const _0x31afb4=a103_0x3f2268,_0x1e990f=validateExactId(_0x5f2e88),_0x32aaf4=await fetchMutationSnapshot(_0x5f2e88,_0x31afb4(0x13e),_0x1e990f),_0x128505=requireMenu(_0x32aaf4,_0x1e990f);if(_0x128505['type']!==_0x31afb4(0x12c))throw menuError(_0x31afb4(0x137),_0x31afb4(0x11e)+_0x1e990f+_0x31afb4(0x124)+(_0x128505[_0x31afb4(0x118)]||_0x31afb4(0x135))+_0x31afb4(0x148),_0x31afb4(0x149));assertExpectedState(_0x5f2e88,_0x128505);const _0x34e5e9={'id':_0x1e990f},_0x15fad1={..._0x128505};if(hasFlag(_0x5f2e88,_0x31afb4(0x131))){const _0x474451=_0x5f2e88[_0x31afb4(0x13b)](_0x31afb4(0x131))['trim']();_0x34e5e9[_0x31afb4(0x131)]=_0x474451,_0x15fad1[_0x31afb4(0x131)]=_0x474451;}if(hasFlag(_0x5f2e88,_0x31afb4(0x11d))){const _0x15dc34=validateSort(_0x5f2e88);_0x34e5e9[_0x31afb4(0x11d)]=_0x15dc34,_0x15fad1['sort']=_0x15dc34;}const _0x368341=sameRequestedState(_0x128505,_0x15fad1),_0x4c5ba6=_0x368341?[_0x31afb4(0x147)]:[];return{'patch':_0x34e5e9,'noChanges':_0x368341,'plan':mutationResult({'operation':_0x31afb4(0x146),'selector':{'id':_0x1e990f},'before':_0x128505,'after':_0x15fad1,'dryRun':_0x2d1a0c,'backend':[...BACKEND],'snapshotHash':_0x32aaf4[_0x31afb4(0x119)],'warnings':_0x4c5ba6})};}function sameRequestedState(_0xf4b28,_0x4b038c){const _0x8efee2=a103_0x3f2268;return _0xf4b28[_0x8efee2(0x131)]===_0x4b038c[_0x8efee2(0x131)]&&_0xf4b28[_0x8efee2(0x11d)]===_0x4b038c['sort'];}function verifyPatch(_0x3b69af,_0x5a021c){const _0x15eea4=a103_0x3f2268;assertVerified(_0x3b69af[_0x15eea4(0x118)]===_0x15eea4(0x12c),_0x15eea4(0x11e)+_0x3b69af['id']+_0x15eea4(0x126)),_0x5a021c[_0x15eea4(0x131)]!==undefined&&assertVerified(_0x3b69af[_0x15eea4(0x131)]===_0x5a021c[_0x15eea4(0x131)],_0x15eea4(0x117)+_0x3b69af['id']+'\x20label\x20update\x20did\x20not\x20take\x20effect.'),_0x5a021c[_0x15eea4(0x11d)]!==undefined&&assertVerified(_0x3b69af[_0x15eea4(0x11d)]===_0x5a021c[_0x15eea4(0x11d)],'Folder\x20'+_0x3b69af['id']+_0x15eea4(0x145));}
1
+ const a103_0x30246c=a103_0x1dca;(function(_0x403998,_0x55fe52){const _0x5a286b=a103_0x1dca,_0x328528=_0x403998();while(!![]){try{const _0x41eb7d=parseInt(_0x5a286b(0xd0))/0x1+parseInt(_0x5a286b(0xe3))/0x2*(-parseInt(_0x5a286b(0xbf))/0x3)+parseInt(_0x5a286b(0xd5))/0x4*(-parseInt(_0x5a286b(0xd6))/0x5)+parseInt(_0x5a286b(0xe8))/0x6*(parseInt(_0x5a286b(0xb7))/0x7)+-parseInt(_0x5a286b(0xc0))/0x8*(-parseInt(_0x5a286b(0xc7))/0x9)+-parseInt(_0x5a286b(0xde))/0xa*(-parseInt(_0x5a286b(0xd4))/0xb)+-parseInt(_0x5a286b(0xb8))/0xc*(parseInt(_0x5a286b(0xdd))/0xd);if(_0x41eb7d===_0x55fe52)break;else _0x328528['push'](_0x328528['shift']());}catch(_0x1ca4a1){_0x328528['push'](_0x328528['shift']());}}}(a103_0x5e0a,0xf2b42));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_EXPECT_FLAGS,MENU_ID_FLAG,MENU_SORT_FLAG,asVerificationError,assertExpectedState,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes,requireFolder,requireMenu,validateExactId,validateSort}from'../../commands/menu/shared/mutations.js';function a103_0x1dca(_0x4c8890,_0x2aff20){_0x4c8890=_0x4c8890-0xb4;const _0x5e0a33=a103_0x5e0a();let _0x1dcae8=_0x5e0a33[_0x4c8890];return _0x1dcae8;}import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a103_0x30246c(0xe1),'path':a103_0x30246c(0xe6)}];function a103_0x5e0a(){const _0x438d43=['7aXzPhE','228FtDqKf','menu','high-risk-write','rabetbase\x20menu\x20list\x20--format\x20json','cookie','parent-id','type','21QJkgqj','12813016KNKjts','sort','verify\x20folder\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20choose\x20an\x20id\x20whose\x20type\x20is\x20folder.','The\x20update\x20request\x20may\x20have\x20taken\x20effect,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','At\x20least\x20one\x20of\x20--label\x20or\x20--sort\x20is\x20required.','validation','9rTaaNX','str','menu\x20list','New\x20folder\x20label','Menu\x20group-update\x20does\x20not\x20support\x20reparenting;\x20remove\x20--parent-id.','label','folder','trim','appCode','1712631AwfCQD','Menu\x20','\x20is\x20no\x20longer\x20type\x20folder.','Folder\x20','2299iOoHzC','24SgCUHJ','1050955sCdikm','menu_not_folder','verification','\x22,\x20not\x20folder.','Use\x20the\x20platform\x20UI\x20for\x20hierarchy\x20changes.','parentId','update\x20folder','1143805LebvkM','650eGNkUU','\x20sort\x20update\x20did\x20not\x20take\x20effect.','selector','POST','group-update','274542ohdkGR','\x20already\x20matches\x20the\x20requested\x20state.','hash','/smartapi/menu/update','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','9360174XdqkJX','update','string','Update\x20request\x20for\x20folder\x20'];a103_0x5e0a=function(){return _0x438d43;};return a103_0x5e0a();}export const menuGroupUpdate={'service':a103_0x30246c(0xb9),'command':'group-update','description':'Rename\x20or\x20reorder\x20one\x20existing\x20folder\x20menu','risk':a103_0x30246c(0xba),'structuredErrors':!![],'rejectedFlags':[{'name':a103_0x30246c(0xbd),'message':a103_0x30246c(0xcb),'hint':a103_0x30246c(0xda)}],'flags':[MENU_ID_FLAG,{'name':'label','type':a103_0x30246c(0xb5),'description':a103_0x30246c(0xca)},MENU_SORT_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x547849){validateUpdateInput(_0x547849),requireExplicitYes(_0x547849);},async 'dryRun'(_0x4ee6d8){const _0x4cb486=a103_0x30246c;validateUpdateInput(_0x4ee6d8);const {plan:_0x3353e4,patch:_0x1849e5}=await buildUpdatePlan(_0x4ee6d8,!![]);return menuDryRunResult(_0x3353e4,{'method':'POST','url':'/smartapi/menu/update','body':_0x1849e5,'description':'Would\x20update\x20folder\x20'+_0x3353e4[_0x4cb486(0xe0)]['id']+'.'});},async 'execute'(_0x19498e){const _0x40e5ef=a103_0x30246c;validateUpdateInput(_0x19498e),requireExplicitYes(_0x19498e);const {plan:_0x42d9bf,patch:_0x5e2102,noChanges:_0x17d9fa}=await buildUpdatePlan(_0x19498e,![]),_0xe73227=Number(_0x42d9bf[_0x40e5ef(0xe0)]['id']),_0x26ae6e=await recheckMutationSnapshot(_0x19498e,_0x42d9bf,_0x40e5ef(0xdc),_0xe73227);if(!_0x17d9fa)try{await updateMenuEntity(_0x19498e[_0x40e5ef(0xcf)],_0x19498e['cookie'],_0x5e2102);}catch(_0x31f4c3){const _0x413af=mapMenuApiError(_0x31f4c3,_0x40e5ef(0xdc),_0xe73227);throw menuFailure(_0x413af,_0x42d9bf,{'stage':_0x40e5ef(0xb4),'failed':{'id':_0xe73227}});}let _0x24edeb=_0x26ae6e,_0x2ed9bf;try{!_0x17d9fa&&(_0x24edeb=await fetchMenuSnapshot(_0x19498e[_0x40e5ef(0xcf)],_0x19498e[_0x40e5ef(0xbc)])),_0x2ed9bf=requireMenu(_0x24edeb,_0xe73227),verifyPatch(_0x2ed9bf,_0x5e2102),_0x2ed9bf[_0x40e5ef(0xdb)]!=null&&requireFolder(_0x24edeb,_0x2ed9bf['parentId']);}catch(_0xe5490a){const _0x396ff0=describeMenuErrorCause(_0xe5490a,_0x40e5ef(0xc2),_0xe73227),_0x5e674e=asVerificationError(_0xe5490a,_0x40e5ef(0xb6)+_0xe73227+_0x40e5ef(0xe7));throw menuFailure(_0x5e674e,_0x42d9bf,{'stage':_0x40e5ef(0xd8),'succeeded':[{'id':_0xe73227,'updateRequested':!_0x17d9fa,'skipped':_0x17d9fa}],'failed':{'id':_0xe73227,'requestedStateConfirmed':![],..._0x396ff0},'warnings':[_0x40e5ef(0xc4)],'verification':{'status':'failed','lookupCommand':_0x40e5ef(0xbb),'targetId':_0xe73227}});}const _0x3a1d25=mutationResult({..._0x42d9bf,'after':_0x2ed9bf,'dryRun':![],'succeeded':[{'id':_0xe73227,'updated':!_0x17d9fa,'skipped':_0x17d9fa}],'verification':{'checkedBy':_0x40e5ef(0xc9),'snapshotHash':_0x24edeb[_0x40e5ef(0xe5)],'matchesRequestedState':!![]}});return{'ok':!![],'data':_0x3a1d25,'message':_0x17d9fa?_0x40e5ef(0xd3)+_0xe73227+_0x40e5ef(0xe4):'Updated\x20folder\x20'+_0xe73227+'.'};}};function validateUpdateInput(_0x3159db){const _0x33929f=a103_0x30246c;validateExactId(_0x3159db);if(hasFlag(_0x3159db,_0x33929f(0xbd)))throw CliErrors[_0x33929f(0xc6)]('Menu\x20group-update\x20does\x20not\x20support\x20reparenting;\x20remove\x20--parent-id.',_0x33929f(0xda));if(!hasFlag(_0x3159db,_0x33929f(0xcc))&&!hasFlag(_0x3159db,_0x33929f(0xc1)))throw CliErrors[_0x33929f(0xc6)](_0x33929f(0xc5));if(hasFlag(_0x3159db,_0x33929f(0xcc))&&!_0x3159db['str'](_0x33929f(0xcc))[_0x33929f(0xce)]())throw CliErrors[_0x33929f(0xc6)]('--label\x20cannot\x20be\x20empty.');validateSort(_0x3159db);}async function buildUpdatePlan(_0x3079da,_0x3dfd63){const _0x66b9b=a103_0x30246c,_0x3fb97e=validateExactId(_0x3079da),_0x327ab1=await fetchMutationSnapshot(_0x3079da,_0x66b9b(0xdc),_0x3fb97e),_0x48a09e=requireMenu(_0x327ab1,_0x3fb97e);if(_0x48a09e[_0x66b9b(0xbe)]!=='folder')throw menuError(_0x66b9b(0xd7),'Menu\x20'+_0x3fb97e+'\x20is\x20type\x20\x22'+(_0x48a09e['type']||'unknown')+_0x66b9b(0xd9),_0x66b9b(0xc3));assertExpectedState(_0x3079da,_0x48a09e);const _0x168b41={'id':_0x3fb97e},_0x44c21b={..._0x48a09e};if(hasFlag(_0x3079da,'label')){const _0x41bc3e=_0x3079da[_0x66b9b(0xc8)](_0x66b9b(0xcc))['trim']();_0x168b41['label']=_0x41bc3e,_0x44c21b[_0x66b9b(0xcc)]=_0x41bc3e;}if(hasFlag(_0x3079da,_0x66b9b(0xc1))){const _0x20c771=validateSort(_0x3079da);_0x168b41[_0x66b9b(0xc1)]=_0x20c771,_0x44c21b[_0x66b9b(0xc1)]=_0x20c771;}const _0x4b9179=sameRequestedState(_0x48a09e,_0x44c21b),_0x49e13d=_0x4b9179?['No\x20online\x20fields\x20would\x20change.']:[];return{'patch':_0x168b41,'noChanges':_0x4b9179,'plan':mutationResult({'operation':_0x66b9b(0xe2),'selector':{'id':_0x3fb97e},'before':_0x48a09e,'after':_0x44c21b,'dryRun':_0x3dfd63,'backend':[...BACKEND],'snapshotHash':_0x327ab1[_0x66b9b(0xe5)],'warnings':_0x49e13d})};}function sameRequestedState(_0x34a349,_0x9244dd){const _0x3ce92c=a103_0x30246c;return _0x34a349['label']===_0x9244dd[_0x3ce92c(0xcc)]&&_0x34a349[_0x3ce92c(0xc1)]===_0x9244dd['sort'];}function verifyPatch(_0x279815,_0x216077){const _0x449b83=a103_0x30246c;assertVerified(_0x279815[_0x449b83(0xbe)]===_0x449b83(0xcd),_0x449b83(0xd1)+_0x279815['id']+_0x449b83(0xd2)),_0x216077['label']!==undefined&&assertVerified(_0x279815[_0x449b83(0xcc)]===_0x216077[_0x449b83(0xcc)],_0x449b83(0xd3)+_0x279815['id']+'\x20label\x20update\x20did\x20not\x20take\x20effect.'),_0x216077[_0x449b83(0xc1)]!==undefined&&assertVerified(_0x279815[_0x449b83(0xc1)]===_0x216077[_0x449b83(0xc1)],_0x449b83(0xd3)+_0x279815['id']+_0x449b83(0xdf));}
@@ -1 +1 @@
1
- (function(_0x2842c6,_0x1dc063){const _0x7b0df7=a104_0x13f8,_0x129ddf=_0x2842c6();while(!![]){try{const _0x430315=-parseInt(_0x7b0df7(0x186))/0x1+-parseInt(_0x7b0df7(0x182))/0x2+-parseInt(_0x7b0df7(0x180))/0x3*(parseInt(_0x7b0df7(0x185))/0x4)+-parseInt(_0x7b0df7(0x17f))/0x5+parseInt(_0x7b0df7(0x184))/0x6+-parseInt(_0x7b0df7(0x181))/0x7*(-parseInt(_0x7b0df7(0x187))/0x8)+parseInt(_0x7b0df7(0x183))/0x9;if(_0x430315===_0x1dc063)break;else _0x129ddf['push'](_0x129ddf['shift']());}catch(_0x96d3d4){_0x129ddf['push'](_0x129ddf['shift']());}}}(a104_0x45b2,0xbdbee));import{menuList}from'../../commands/menu/list.js';import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a104_0x45b2(){const _0x12f50e=['8967648UTGvAO','14796QeGlub','25502TZLAWI','5766320ByquMv','6893715EsCsZg','255NvUziG','14YvKEaO','1904094snkRPi','4605453aLUtnk'];a104_0x45b2=function(){return _0x12f50e;};return a104_0x45b2();}import{menuDelete}from'../../commands/menu/delete.js';function a104_0x13f8(_0x3fb167,_0x2c0814){_0x3fb167=_0x3fb167-0x17f;const _0x45b2a7=a104_0x45b2();let _0x13f8c0=_0x45b2a7[_0x3fb167];return _0x13f8c0;}import{menuGroupCreate}from'../../commands/menu/group-create.js';import{menuGroupUpdate}from'../../commands/menu/group-update.js';import{menuRegroupStart}from'../../commands/menu/regroup-start.js';export const menuDefinitions=[menuList,menuSync,menuUpdate,menuDelete,menuGroupCreate,menuGroupUpdate,menuRegroupStart];
1
+ (function(_0x33b859,_0x3a4f06){const _0x23e1bc=a104_0x14c4,_0x1970f9=_0x33b859();while(!![]){try{const _0x37855d=-parseInt(_0x23e1bc(0x197))/0x1*(parseInt(_0x23e1bc(0x18f))/0x2)+-parseInt(_0x23e1bc(0x192))/0x3+-parseInt(_0x23e1bc(0x193))/0x4+parseInt(_0x23e1bc(0x196))/0x5*(-parseInt(_0x23e1bc(0x195))/0x6)+parseInt(_0x23e1bc(0x194))/0x7*(-parseInt(_0x23e1bc(0x18c))/0x8)+-parseInt(_0x23e1bc(0x191))/0x9*(parseInt(_0x23e1bc(0x18d))/0xa)+-parseInt(_0x23e1bc(0x190))/0xb*(-parseInt(_0x23e1bc(0x18e))/0xc);if(_0x37855d===_0x3a4f06)break;else _0x1970f9['push'](_0x1970f9['shift']());}catch(_0x541875){_0x1970f9['push'](_0x1970f9['shift']());}}}(a104_0x1550,0xa0c24));import{menuList}from'../../commands/menu/list.js';function a104_0x14c4(_0x5b2c4d,_0xaf830c){_0x5b2c4d=_0x5b2c4d-0x18c;const _0x1550c3=a104_0x1550();let _0x14c4af=_0x1550c3[_0x5b2c4d];return _0x14c4af;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';import{menuDelete}from'../../commands/menu/delete.js';import{menuGroupCreate}from'../../commands/menu/group-create.js';import{menuGroupUpdate}from'../../commands/menu/group-update.js';import{menuRegroupStart}from'../../commands/menu/regroup-start.js';function a104_0x1550(){const _0x29fdaf=['883816BuauVd','341490PqHYGv','156jjGSUr','26eLRZtc','1636437BenFnD','27oxGmUT','271707YtHjQI','489084GIRHwx','7XmIgoQ','42wzrAts','495695aTdYoJ','11982EaSdcT'];a104_0x1550=function(){return _0x29fdaf;};return a104_0x1550();}export const menuDefinitions=[menuList,menuSync,menuUpdate,menuDelete,menuGroupCreate,menuGroupUpdate,menuRegroupStart];
@@ -1 +1 @@
1
- const a105_0x138740=a105_0x164e;function a105_0x164e(_0x1f488c,_0x5af0a8){_0x1f488c=_0x1f488c-0x9b;const _0x11a734=a105_0x11a7();let _0x164eef=_0x11a734[_0x1f488c];return _0x164eef;}(function(_0x3424f8,_0x4782ba){const _0x5aefce=a105_0x164e,_0x1b18c5=_0x3424f8();while(!![]){try{const _0x3bd1a2=-parseInt(_0x5aefce(0x9d))/0x1*(-parseInt(_0x5aefce(0xac))/0x2)+-parseInt(_0x5aefce(0xa8))/0x3+-parseInt(_0x5aefce(0xab))/0x4*(-parseInt(_0x5aefce(0xaa))/0x5)+-parseInt(_0x5aefce(0xb1))/0x6+parseInt(_0x5aefce(0xad))/0x7+-parseInt(_0x5aefce(0xae))/0x8*(-parseInt(_0x5aefce(0xb0))/0x9)+-parseInt(_0x5aefce(0xa0))/0xa;if(_0x3bd1a2===_0x4782ba)break;else _0x1b18c5['push'](_0x1b18c5['shift']());}catch(_0x1c8738){_0x1b18c5['push'](_0x1b18c5['shift']());}}}(a105_0x11a7,0xb48da));function a105_0x11a7(){const _0x2791e0=['List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','614111zEXcll','\x20menu(s)','menu','8398290cmPSyx','map','list','read','menus','total','Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing','bool','3383253xtaBQP','verbose','682250NGvKYD','8efgAnX','4uqyyzD','10094098yFZNtR','8dqDVEK','appCode','3159279aJQuCu','3522246hhPRMw','boolean','cookie'];a105_0x11a7=function(){return _0x2791e0;};return a105_0x11a7();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot,toMenuListItem}from'../../commands/menu/shared/facts.js';export const menuList={'service':a105_0x138740(0x9f),'command':a105_0x138740(0xa2),'description':a105_0x138740(0x9c),'risk':a105_0x138740(0xa3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a105_0x138740(0xa9),'type':a105_0x138740(0xb2),'description':a105_0x138740(0xa6)}],async 'execute'(_0x1cabb5){const _0x237af1=a105_0x138740,_0x224fe2=_0x1cabb5[_0x237af1(0xa7)](_0x237af1(0xa9)),_0x45727d=await fetchMenuSnapshot(_0x1cabb5[_0x237af1(0xaf)],_0x1cabb5[_0x237af1(0x9b)],{'verbose':_0x224fe2});return{'ok':!![],'data':{'total':_0x45727d['total'],'snapshotHash':_0x45727d['hash'],'menus':_0x45727d[_0x237af1(0xa4)][_0x237af1(0xa1)](toMenuListItem)},'message':_0x45727d[_0x237af1(0xa5)]===0x0?'No\x20menus\x20found.':'Found\x20'+_0x45727d[_0x237af1(0xa5)]+_0x237af1(0x9e)};}};
1
+ const a105_0x2a2d5d=a105_0x2ec2;(function(_0x2caa0f,_0x35e53d){const _0x5ed73e=a105_0x2ec2,_0x209602=_0x2caa0f();while(!![]){try{const _0x49502a=-parseInt(_0x5ed73e(0xc3))/0x1*(-parseInt(_0x5ed73e(0xcc))/0x2)+parseInt(_0x5ed73e(0xd1))/0x3+parseInt(_0x5ed73e(0xcf))/0x4+-parseInt(_0x5ed73e(0xd0))/0x5+parseInt(_0x5ed73e(0xd2))/0x6*(parseInt(_0x5ed73e(0xc2))/0x7)+parseInt(_0x5ed73e(0xcd))/0x8+-parseInt(_0x5ed73e(0xc4))/0x9;if(_0x49502a===_0x35e53d)break;else _0x209602['push'](_0x209602['shift']());}catch(_0x306272){_0x209602['push'](_0x209602['shift']());}}}(a105_0x1ae3,0x1bd8f));function a105_0x2ec2(_0x500ec6,_0x36fcc2){_0x500ec6=_0x500ec6-0xbd;const _0x1ae38b=a105_0x1ae3();let _0x2ec252=_0x1ae38b[_0x500ec6];return _0x2ec252;}function a105_0x1ae3(){const _0x319c45=['boolean','cookie','menu','\x20menu(s)','appCode','Found\x20','verbose','341786kRnTVm','475808oqItZr','read','216028FpMZBw','277985PyQHwC','585189ODZfAF','126yBBByh','menus','hash','list','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','bool','No\x20menus\x20found.','total','9653SAMUSx','1cHmiVZ','3048642tnghaM'];a105_0x1ae3=function(){return _0x319c45;};return a105_0x1ae3();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot,toMenuListItem}from'../../commands/menu/shared/facts.js';export const menuList={'service':a105_0x2a2d5d(0xc7),'command':a105_0x2a2d5d(0xbd),'description':a105_0x2a2d5d(0xbe),'risk':a105_0x2a2d5d(0xce),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a105_0x2a2d5d(0xcb),'type':a105_0x2a2d5d(0xc5),'description':'Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing'}],async 'execute'(_0x4c36d1){const _0x2303ed=a105_0x2a2d5d,_0x1e7727=_0x4c36d1[_0x2303ed(0xbf)](_0x2303ed(0xcb)),_0x13c26d=await fetchMenuSnapshot(_0x4c36d1[_0x2303ed(0xc9)],_0x4c36d1[_0x2303ed(0xc6)],{'verbose':_0x1e7727});return{'ok':!![],'data':{'total':_0x13c26d[_0x2303ed(0xc1)],'snapshotHash':_0x13c26d[_0x2303ed(0xd4)],'menus':_0x13c26d[_0x2303ed(0xd3)]['map'](toMenuListItem)},'message':_0x13c26d[_0x2303ed(0xc1)]===0x0?_0x2303ed(0xc0):_0x2303ed(0xca)+_0x13c26d['total']+_0x2303ed(0xc8)};}};