@lovrabet/rabetbase-cli 2.3.10-beta.1 → 2.3.10

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 (259) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -0
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/regroup-start.js +1 -1
  109. package/lib/commands/menu/shared/compare-table.js +1 -1
  110. package/lib/commands/menu/shared/delete-plan.js +1 -1
  111. package/lib/commands/menu/shared/facts.js +1 -1
  112. package/lib/commands/menu/shared/index.js +1 -1
  113. package/lib/commands/menu/shared/inquirer.js +1 -1
  114. package/lib/commands/menu/shared/local-pages.js +1 -1
  115. package/lib/commands/menu/shared/logic.js +1 -1
  116. package/lib/commands/menu/shared/mutations.js +1 -1
  117. package/lib/commands/menu/shared/service.js +1 -1
  118. package/lib/commands/menu/shared/sync-core.js +1 -1
  119. package/lib/commands/menu/shared/update-core.js +1 -1
  120. package/lib/commands/menu/shared/valid-url.js +1 -1
  121. package/lib/commands/menu/sync.js +1 -1
  122. package/lib/commands/menu/update.js +1 -1
  123. package/lib/commands/notification/config-list.js +1 -1
  124. package/lib/commands/notification/index.js +1 -1
  125. package/lib/commands/page/generate-start.js +1 -1
  126. package/lib/commands/page/generate-status.js +1 -1
  127. package/lib/commands/page/index.js +1 -1
  128. package/lib/commands/page/pull.js +1 -1
  129. package/lib/commands/page/push.js +1 -1
  130. package/lib/commands/page/relation-audit.js +1 -1
  131. package/lib/commands/page/shared.js +1 -1
  132. package/lib/commands/page/standard-page-status.js +1 -1
  133. package/lib/commands/page/sync.js +1 -1
  134. package/lib/commands/permit/index.js +1 -1
  135. package/lib/commands/permit/page-get.js +1 -1
  136. package/lib/commands/permit/page-set.js +1 -1
  137. package/lib/commands/permit/role-apis-set.js +1 -1
  138. package/lib/commands/permit/role-menus-set.js +1 -1
  139. package/lib/commands/permit/role-menus.js +1 -1
  140. package/lib/commands/permit/shared.js +1 -1
  141. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  142. package/lib/commands/project/create/format-elapsed.js +1 -1
  143. package/lib/commands/project/create/main.js +1 -1
  144. package/lib/commands/project/create/non-interactive.js +1 -1
  145. package/lib/commands/project/create/project-template-path.js +1 -1
  146. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  147. package/lib/commands/project/create/use-format-code.js +1 -1
  148. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  149. package/lib/commands/project/index.js +1 -1
  150. package/lib/commands/project/init.js +1 -1
  151. package/lib/commands/project/upgrade.js +1 -1
  152. package/lib/commands/registry.js +1 -1
  153. package/lib/commands/role/create.js +1 -1
  154. package/lib/commands/role/delete.js +1 -1
  155. package/lib/commands/role/detail.js +1 -1
  156. package/lib/commands/role/index.js +1 -1
  157. package/lib/commands/role/list.js +1 -1
  158. package/lib/commands/role/shared.js +1 -1
  159. package/lib/commands/role/update.js +1 -1
  160. package/lib/commands/role/user-add.js +1 -1
  161. package/lib/commands/role/user-remove.js +1 -1
  162. package/lib/commands/role/user-resolve.js +1 -1
  163. package/lib/commands/run/index.js +1 -1
  164. package/lib/commands/schema.js +1 -1
  165. package/lib/commands/sql/create.js +1 -1
  166. package/lib/commands/sql/delete.js +1 -1
  167. package/lib/commands/sql/detail.js +1 -1
  168. package/lib/commands/sql/exec.js +1 -1
  169. package/lib/commands/sql/index.js +1 -1
  170. package/lib/commands/sql/list.js +1 -1
  171. package/lib/commands/sql/pull.js +1 -1
  172. package/lib/commands/sql/push.js +1 -1
  173. package/lib/commands/sql/save.js +1 -1
  174. package/lib/commands/sql/shared.js +1 -1
  175. package/lib/commands/sql/status.js +1 -1
  176. package/lib/commands/sql/validate.js +1 -1
  177. package/lib/commands/task/index.js +1 -1
  178. package/lib/commands/task/status.js +1 -1
  179. package/lib/commands/workspace/add.js +1 -1
  180. package/lib/commands/workspace/index.js +1 -1
  181. package/lib/commands/workspace/remove.js +1 -1
  182. package/lib/config/schema.js +1 -1
  183. package/lib/constant/cdn.js +1 -1
  184. package/lib/constant/cli.js +1 -1
  185. package/lib/constant/defaults.js +1 -1
  186. package/lib/constant/domain.js +1 -1
  187. package/lib/constant/env.js +1 -1
  188. package/lib/constant/output.js +1 -1
  189. package/lib/constant/paths.js +1 -1
  190. package/lib/constant/risk.js +1 -1
  191. package/lib/context/app-resolver.js +1 -1
  192. package/lib/context/auth-resolver.js +1 -1
  193. package/lib/context/config-loader.js +1 -1
  194. package/lib/context.js +1 -1
  195. package/lib/core/alias-resolver.js +1 -1
  196. package/lib/core/api-client.js +1 -1
  197. package/lib/core/bff/config.js +1 -1
  198. package/lib/core/bff/file-system.js +1 -1
  199. package/lib/core/bff/hash.js +1 -1
  200. package/lib/core/bff/lock.js +1 -1
  201. package/lib/core/bff/utils.js +1 -1
  202. package/lib/core/db-resolver.js +1 -1
  203. package/lib/core/page/file-system.js +1 -1
  204. package/lib/core/page/hash.js +1 -1
  205. package/lib/core/page/lock.js +1 -1
  206. package/lib/core/sql-index-auditor.js +1 -1
  207. package/lib/core/sql-sync/config.js +1 -1
  208. package/lib/core/sql-sync/file-system.js +1 -1
  209. package/lib/core/sql-sync/hash.js +1 -1
  210. package/lib/core/sql-sync/lock.js +1 -1
  211. package/lib/core/sql-sync/utils.js +1 -1
  212. package/lib/core/sql-validator.js +1 -1
  213. package/lib/errors.js +1 -1
  214. package/lib/framework/build-all-flags.js +1 -1
  215. package/lib/framework/error-output.js +1 -1
  216. package/lib/framework/explicit-yes.js +1 -1
  217. package/lib/framework/flags.js +1 -1
  218. package/lib/framework/help.js +1 -1
  219. package/lib/framework/index.js +1 -1
  220. package/lib/framework/output.js +1 -1
  221. package/lib/framework/response.js +1 -1
  222. package/lib/framework/runner-alias.js +1 -1
  223. package/lib/framework/runner.js +1 -1
  224. package/lib/framework/schema-export.js +1 -1
  225. package/lib/framework/types.js +1 -1
  226. package/lib/generated/build-info.js +1 -1
  227. package/lib/help.js +1 -1
  228. package/lib/skills/main.js +1 -1
  229. package/lib/skills/npx-skills-add.js +1 -1
  230. package/lib/telemetry/cli-command-trace.js +1 -1
  231. package/lib/telemetry/cli-help-trace.js +1 -1
  232. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  233. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  234. package/lib/telemetry/send-cli-trace-log.js +1 -1
  235. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  236. package/lib/utils/ai_config.js +1 -1
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/cdn-config.js +1 -1
  239. package/lib/utils/check-sdk-version.js +1 -1
  240. package/lib/utils/cli-version-check.js +1 -1
  241. package/lib/utils/cli-version-policy.js +1 -1
  242. package/lib/utils/config.js +1 -1
  243. package/lib/utils/copy-directory.js +1 -1
  244. package/lib/utils/entity-with-id.js +1 -1
  245. package/lib/utils/file-utils.js +1 -1
  246. package/lib/utils/guides-cdn.js +1 -1
  247. package/lib/utils/http-client.js +1 -1
  248. package/lib/utils/is-non-interactive.js +1 -1
  249. package/lib/utils/logger.js +1 -1
  250. package/lib/utils/params.js +1 -1
  251. package/lib/utils/platform.js +1 -1
  252. package/lib/utils/rules-cdn.js +1 -1
  253. package/lib/utils/sleep.js +1 -1
  254. package/lib/utils/template-replacer.js +1 -1
  255. package/lib/utils/update-notice.js +1 -1
  256. package/lib/utils/version.js +1 -1
  257. package/lib/utils/with-active-cookie.js +1 -1
  258. package/lib/utils/write-cli-side-channel.js +1 -1
  259. package/package.json +1 -1
@@ -1 +1 @@
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
+ function a93_0xc4d4(_0x4c4df6,_0x238134){_0x4c4df6=_0x4c4df6-0x129;const _0x2b8c27=a93_0x2b8c();let _0xc4d4f9=_0x2b8c27[_0x4c4df6];return _0xc4d4f9;}const a93_0x1137ab=a93_0xc4d4;(function(_0x112a98,_0x3addcc){const _0x2be37f=a93_0xc4d4,_0xb2b4ae=_0x112a98();while(!![]){try{const _0x1c6a89=parseInt(_0x2be37f(0x14d))/0x1*(-parseInt(_0x2be37f(0x168))/0x2)+-parseInt(_0x2be37f(0x14b))/0x3+parseInt(_0x2be37f(0x134))/0x4+parseInt(_0x2be37f(0x143))/0x5+-parseInt(_0x2be37f(0x12d))/0x6+-parseInt(_0x2be37f(0x13d))/0x7+parseInt(_0x2be37f(0x163))/0x8;if(_0x1c6a89===_0x3addcc)break;else _0xb2b4ae['push'](_0xb2b4ae['shift']());}catch(_0xdeb0bf){_0xb2b4ae['push'](_0xb2b4ae['shift']());}}}(a93_0x2b8c,0x3fc27));import a93_0x520745 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';function a93_0x2b8c(){const _0x1fcf03=['\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(missing)','platform','log','1411638TtVstw','keys','148138wIAWbw','(not\x20set)','\x20\x20─','\x20←\x20current','\x20\x20explicitAppName:\x20','\x20\x20\x20\x20accessKey:\x20\x20','doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','✗\x20Not\x20logged\x20in','✓\x20Valid','red','(set,\x20length=','yellow','accessKey','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','empty','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','9986616YtHkYg','✗\x20Expired','apiDir','✓\x20Valid\x20JSON','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','6pnMmWY','message','source','\x20\x20Merged\x20Config','(none)','status','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','locale','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','value','format','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','length','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','env','✗\x20Invalid\x20JSON','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20(default)','Project','\x20\x20Auth','appcode','raw','(default:\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','bold','defaultApp','1583910OXGCmA','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','repeat','currentApp','\x20\x20runtimeDomain:\x20\x20\x20','green','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','1781352WvstbU','apps','⚠\x20Empty\x20(treated\x20as\x20{})','gray','(set\x20via\x20file,\x20length=','Global','cookie','padEnd','read','3078712esqZlH','(not\x20found)','(no\x20file)','check','version','(default)','931275eJJbII','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','slice'];a93_0x2b8c=function(){return _0x1fcf03;};return a93_0x2b8c();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x132cf9){const _0xd876ba=a93_0xc4d4,_0x4a69f2=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xd876ba(0x146)](0x0,0xa)+')':VERSION,_0x75173d=buildConfigFromFlags({}),_0x4d0647=getCookie();console[_0xd876ba(0x14a)](),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x12b)](CLI_BIN_NAME+'\x20doctor')),console['log'](a93_0x520745[_0xd876ba(0x137)]('─'[_0xd876ba(0x12f)](0x32))),console[_0xd876ba(0x14a)](_0xd876ba(0x178)+_0x4a69f2),console[_0xd876ba(0x14a)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xd876ba(0x141)]),console[_0xd876ba(0x14a)](_0xd876ba(0x160)+process[_0xd876ba(0x149)]+'\x20'+process['arch']),console[_0xd876ba(0x14a)](),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x12b)]('\x20\x20Config\x20Files')),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x14f)['repeat'](0x1e)));const _0xb27d7b=getGlobalConfigPath(),_0x3e95f2=getProjectConfigPath();console[_0xd876ba(0x14a)](_0xd876ba(0x155)+(_0xb27d7b||a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x13e)))),console[_0xd876ba(0x14a)](_0xd876ba(0x15d)+(_0x3e95f2||a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x13e)))),console[_0xd876ba(0x14a)](),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x12b)]('\x20\x20Config\x20JSON')),console[_0xd876ba(0x14a)](a93_0x520745['gray'](_0xd876ba(0x14f)[_0xd876ba(0x12f)](0x1e)));const _0x1366ce=(_0x56051f,_0xf96ee7)=>{const _0x456d91=_0xd876ba;if(!_0xf96ee7){console[_0x456d91(0x14a)]('\x20\x20'+_0x56051f[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745['gray'](_0x456d91(0x13f)));return;}const _0x402626=inspectCliConfigJsonFile(_0xf96ee7);if(_0x402626[_0x456d91(0x16d)]==='ok')console[_0x456d91(0x14a)]('\x20\x20'+_0x56051f[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745[_0x456d91(0x132)](_0x456d91(0x166)));else{if(_0x402626[_0x456d91(0x16d)]===_0x456d91(0x161))console['log']('\x20\x20'+_0x56051f[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745[_0x456d91(0x15b)](_0x456d91(0x136)));else _0x402626[_0x456d91(0x16d)]==='missing'?console[_0x456d91(0x14a)]('\x20\x20'+_0x56051f[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745[_0x456d91(0x137)](_0x456d91(0x148))):(console[_0x456d91(0x14a)]('\x20\x20'+_0x56051f[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745[_0x456d91(0x159)](_0x456d91(0x177))),console[_0x456d91(0x14a)]('\x20\x20'+''[_0x456d91(0x13b)](0x11)+'\x20'+a93_0x520745[_0x456d91(0x159)](_0x402626[_0x456d91(0x169)])));}};_0x1366ce(_0xd876ba(0x139),_0xb27d7b),_0x1366ce(_0xd876ba(0x17a),_0x3e95f2),console[_0xd876ba(0x14a)](),console['log'](a93_0x520745[_0xd876ba(0x12b)](_0xd876ba(0x16b))),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x14f)['repeat'](0x1e))),console[_0xd876ba(0x14a)](_0xd876ba(0x133)+(_0x75173d['appCode']||a93_0x520745[_0xd876ba(0x159)](_0xd876ba(0x14e)))),console[_0xd876ba(0x14a)](_0xd876ba(0x15f)+_0x75173d[_0xd876ba(0x176)]),console[_0xd876ba(0x14a)](_0xd876ba(0x144)+_0x75173d[_0xd876ba(0x16f)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x75173d[_0xd876ba(0x165)]),console[_0xd876ba(0x14a)](_0xd876ba(0x167)+(_0x75173d['defaultApp']||a93_0x520745['gray'](_0xd876ba(0x16c)))),console[_0xd876ba(0x14a)](_0xd876ba(0x170)+(_0x75173d[_0xd876ba(0x130)]||a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x16c)))),console['log'](_0xd876ba(0x151)+(_0x75173d['explicitAppName']||a93_0x520745['gray'](_0xd876ba(0x16c)))),console[_0xd876ba(0x14a)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x75173d[_0xd876ba(0x172)]||a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x129)+DEFAULT_CONFIG_VALUES[_0xd876ba(0x172)]+')'))),console[_0xd876ba(0x14a)](_0xd876ba(0x145)+(_0x75173d['pageSize']??a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x142)))),console['log'](_0xd876ba(0x175)+_0x75173d['riskLevel']),console[_0xd876ba(0x14a)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x75173d['verbose']),console[_0xd876ba(0x14a)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x75173d[_0xd876ba(0x13a)]?a93_0x520745[_0xd876ba(0x132)]('(set,\x20length='+_0x75173d[_0xd876ba(0x13a)][_0xd876ba(0x174)]+')'):_0x4d0647?a93_0x520745[_0xd876ba(0x132)](_0xd876ba(0x138)+_0x4d0647[_0xd876ba(0x174)]+')'):a93_0x520745['gray'](_0xd876ba(0x16c))));const _0x2868c8=Object[_0xd876ba(0x14c)](_0x75173d[_0xd876ba(0x135)]);if(_0x2868c8[_0xd876ba(0x174)]>0x0){console[_0xd876ba(0x14a)](),console['log'](a93_0x520745[_0xd876ba(0x12b)]('\x20\x20Apps')),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x14f)['repeat'](0x1e)));for(const _0x2cf3c8 of _0x2868c8){const _0x52f6d8=_0x75173d[_0xd876ba(0x135)][_0x2cf3c8],_0x149a41=_0x2cf3c8===_0x75173d[_0xd876ba(0x12c)],_0x29f1a1=_0x2cf3c8===_0x75173d[_0xd876ba(0x130)],_0x323e69=_0x29f1a1?a93_0x520745[_0xd876ba(0x132)](_0xd876ba(0x150)):'',_0x33cd4a=_0x149a41?_0xd876ba(0x179):'';console[_0xd876ba(0x14a)]('\x20\x20'+_0x2cf3c8+_0x33cd4a+_0x323e69),console[_0xd876ba(0x14a)](_0xd876ba(0x15e)+_0x52f6d8[_0xd876ba(0x17c)]);const _0x31c044=buildAppDoctorFields(_0x52f6d8,{'env':_0x75173d[_0xd876ba(0x176)],'apiDir':_0x75173d[_0xd876ba(0x17d)][_0xd876ba(0x165)]||DEFAULT_CONFIG_VALUES[_0xd876ba(0x165)],'cookie':_0x75173d[_0xd876ba(0x13a)]||_0x4d0647||undefined,'accessKey':_0x75173d[_0xd876ba(0x15c)]});console[_0xd876ba(0x14a)](_0xd876ba(0x12e)+_0x31c044[_0xd876ba(0x176)][_0xd876ba(0x171)]+'\x20\x20'+a93_0x520745[_0xd876ba(0x137)]('('+_0x31c044[_0xd876ba(0x176)][_0xd876ba(0x16a)]+')')),console['log'](_0xd876ba(0x162)+_0x31c044[_0xd876ba(0x165)][_0xd876ba(0x171)]+'\x20\x20'+a93_0x520745['gray']('('+_0x31c044['apiDir'][_0xd876ba(0x16a)]+')'));const _0x54b71f=_0x31c044[_0xd876ba(0x13a)]['value']?a93_0x520745[_0xd876ba(0x132)](_0xd876ba(0x15a)+_0x31c044[_0xd876ba(0x13a)][_0xd876ba(0x171)][_0xd876ba(0x174)]+')'):a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x16c));console[_0xd876ba(0x14a)](_0xd876ba(0x173)+_0x54b71f+'\x20\x20'+a93_0x520745[_0xd876ba(0x137)]('('+_0x31c044[_0xd876ba(0x13a)][_0xd876ba(0x16a)]+')'));const _0x1ebbf7=_0x31c044[_0xd876ba(0x15c)][_0xd876ba(0x171)]?a93_0x520745['green'](_0xd876ba(0x15a)+_0x31c044['accessKey'][_0xd876ba(0x171)]['length']+')'):a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x16c));console['log'](_0xd876ba(0x152)+_0x1ebbf7+'\x20\x20'+a93_0x520745[_0xd876ba(0x137)]('('+_0x31c044[_0xd876ba(0x15c)][_0xd876ba(0x16a)]+')'));}}console[_0xd876ba(0x14a)](),console[_0xd876ba(0x14a)](a93_0x520745[_0xd876ba(0x12b)](_0xd876ba(0x156))),console['log'](a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x14f)[_0xd876ba(0x12f)](0x1e))),console[_0xd876ba(0x14a)](_0xd876ba(0x12a)+getApiDomain()),console[_0xd876ba(0x14a)](_0xd876ba(0x147)+getUserDomain()),console[_0xd876ba(0x14a)](_0xd876ba(0x131)+getRuntimeDomain()),console['log'](),console[_0xd876ba(0x14a)](a93_0x520745['bold'](_0xd876ba(0x17b))),console['log'](a93_0x520745[_0xd876ba(0x137)](_0xd876ba(0x14f)[_0xd876ba(0x12f)](0x1e)));if(_0x4d0647){const _0x5d9d6d=await getIsSessionValid();console[_0xd876ba(0x14a)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5d9d6d?a93_0x520745[_0xd876ba(0x132)](_0xd876ba(0x158)):a93_0x520745['red'](_0xd876ba(0x164))));}else console[_0xd876ba(0x14a)](_0xd876ba(0x154)+a93_0x520745['red'](_0xd876ba(0x157)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x1137ab(0x153),'command':a93_0x1137ab(0x140),'description':a93_0x1137ab(0x16e),'risk':a93_0x1137ab(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
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
+ const a94_0x5b0686=a94_0x13f1;(function(_0x3a95af,_0xb4f402){const _0x374ac4=a94_0x13f1,_0x5cc2c2=_0x3a95af();while(!![]){try{const _0x5084bb=-parseInt(_0x374ac4(0x90))/0x1*(-parseInt(_0x374ac4(0x8e))/0x2)+parseInt(_0x374ac4(0x9a))/0x3+-parseInt(_0x374ac4(0xa9))/0x4*(-parseInt(_0x374ac4(0x82))/0x5)+parseInt(_0x374ac4(0x83))/0x6*(-parseInt(_0x374ac4(0x92))/0x7)+parseInt(_0x374ac4(0x94))/0x8*(-parseInt(_0x374ac4(0x97))/0x9)+parseInt(_0x374ac4(0xa7))/0xa*(parseInt(_0x374ac4(0x96))/0xb)+-parseInt(_0x374ac4(0x84))/0xc;if(_0x5084bb===_0xb4f402)break;else _0x5cc2c2['push'](_0x5cc2c2['shift']());}catch(_0x787c69){_0x5cc2c2['push'](_0x5cc2c2['shift']());}}}(a94_0x540b,0x686bb));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x540b(){const _0x4de1d1=['bool','38408GvfOtX','filePath','335QwIXuC','102KHDrDw','6381612eKfWoe','POST','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','filePath\x20is\x20required.','write','download','validation','Uploaded\x20file:\x20','query-url','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','1518598fqfpCL','\x20to\x20development\x20app\x20','1NKmZtz','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','99659ssjkBF','File','2569048VowShZ','upload','90541jgeWax','9deJRBG','trim','filepath','261333EXFkPG','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.','boolean','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','str','appCode','path','string','long-term','file','/smartapi/common/uploadFile','Preview:\x20upload\x20','40cNtuGZ'];a94_0x540b=function(){return _0x4de1d1;};return a94_0x540b();}function a94_0x13f1(_0x55cf71,_0x57f107){_0x55cf71=_0x55cf71-0x81;const _0x540b91=a94_0x540b();let _0x13f151=_0x540b91[_0x55cf71];return _0x13f151;}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x5b0686(0xa4),'type':a94_0x5b0686(0xa2),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a94_0x5b0686(0x99),'type':'string','required':!![],'description':a94_0x5b0686(0x9b)},DOWNLOAD_FLAG={'name':'download','type':a94_0x5b0686(0x9d),'description':a94_0x5b0686(0x91)},LONG_TERM_FLAG={'name':a94_0x5b0686(0xa3),'type':a94_0x5b0686(0x9d),'description':a94_0x5b0686(0x8d)};function requireFilePath(_0x58d7b8){const _0x249ca4=a94_0x5b0686,_0xfe91b8=_0x58d7b8[_0x249ca4(0x98)]();if(!_0xfe91b8)throw CliErrors[_0x249ca4(0x8a)](_0x249ca4(0x87));return _0xfe91b8;}const fileUpload={'service':a94_0x5b0686(0xa4),'command':a94_0x5b0686(0x95),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a94_0x5b0686(0x88),'flags':[FILE_FLAG],async 'dryRun'(_0x23373c){const _0x1473ce=a94_0x5b0686,_0x235a1d=requireDevelopmentUploadFile(_0x23373c[_0x1473ce(0x9f)](_0x1473ce(0xa4)),_0x1473ce(0x93));return{'method':_0x1473ce(0x85),'url':_0x1473ce(0xa5),'body':{'appCode':_0x23373c[_0x1473ce(0xa0)],'multipart':{'file':_0x235a1d}},'description':_0x1473ce(0xa6)+_0x235a1d[_0x1473ce(0xa1)]+_0x1473ce(0x8f)+_0x23373c[_0x1473ce(0xa0)]};},async 'execute'(_0x5da682){const _0x45d037=a94_0x5b0686,_0x4234c0=requireDevelopmentUploadFile(_0x5da682[_0x45d037(0x9f)](_0x45d037(0xa4)),_0x45d037(0x93)),_0x4afc3d=await uploadDevelopmentFile(_0x5da682[_0x45d037(0xa0)],_0x4234c0[_0x45d037(0xa1)]);return{'ok':!![],'data':_0x4afc3d,'message':_0x4afc3d[_0x45d037(0x81)]?_0x45d037(0x8b)+_0x4afc3d[_0x45d037(0x81)]+_0x45d037(0x9e):_0x45d037(0x9c)};}},fileQueryUrl={'service':a94_0x5b0686(0xa4),'command':a94_0x5b0686(0x8c),'description':a94_0x5b0686(0x86),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x5284fb){const _0x1d05ed=a94_0x5b0686,_0x351a6c=requireFilePath(_0x5284fb[_0x1d05ed(0x9f)](_0x1d05ed(0x99))),_0x2d5f8c=await queryDevelopmentFileUrl(_0x351a6c,{'download':_0x5284fb[_0x1d05ed(0xa8)](_0x1d05ed(0x89)),'longTerm':_0x5284fb[_0x1d05ed(0xa8)]('long-term')});return{'ok':!![],'data':_0x2d5f8c};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
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
+ const a95_0x5da5ef=a95_0x3ecf;function a95_0x3ecf(_0x5486f5,_0x50b50d){_0x5486f5=_0x5486f5-0x198;const _0x2cf897=a95_0x2cf8();let _0x3ecf57=_0x2cf897[_0x5486f5];return _0x3ecf57;}(function(_0x5ca210,_0x2cd775){const _0x4c91a5=a95_0x3ecf,_0x522767=_0x5ca210();while(!![]){try{const _0x42542e=parseInt(_0x4c91a5(0x1bd))/0x1*(-parseInt(_0x4c91a5(0x1c4))/0x2)+-parseInt(_0x4c91a5(0x1ca))/0x3*(-parseInt(_0x4c91a5(0x1a3))/0x4)+parseInt(_0x4c91a5(0x1b5))/0x5*(parseInt(_0x4c91a5(0x199))/0x6)+-parseInt(_0x4c91a5(0x1a8))/0x7*(parseInt(_0x4c91a5(0x1a5))/0x8)+parseInt(_0x4c91a5(0x1c2))/0x9+parseInt(_0x4c91a5(0x1c3))/0xa*(parseInt(_0x4c91a5(0x19d))/0xb)+parseInt(_0x4c91a5(0x1ac))/0xc*(parseInt(_0x4c91a5(0x1b6))/0xd);if(_0x42542e===_0x2cd775)break;else _0x522767['push'](_0x522767['shift']());}catch(_0x15683e){_0x522767['push'](_0x522767['shift']());}}}(a95_0x2cf8,0xb3f37));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x288a0c){return{'appCode':_0x288a0c,'appName':_0x288a0c};}function writeInitConfig(_0x535fa7,_0x2bdfbb,_0xb4541){const _0x2c2576=a95_0x3ecf,_0x4d1287=resolveWriteConfigPath(_0x535fa7),_0x41f8e6=buildCanonicalProjectConfig({},{'appCodes':_0x2bdfbb[_0x2c2576(0x1aa)](_0x153eda=>_0x153eda['appCode']),'env':_0xb4541,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x2c2576(0x1b1)]()}});writeConfigFile(_0x4d1287,_0x41f8e6);const _0x2a2164=_0x535fa7===_0x2c2576(0x1c1)?_0x2c2576(0x1c1):_0x2c2576(0x1a1);console[_0x2c2576(0x19f)](_0x2c2576(0x1b3)+_0x2a2164+_0x2c2576(0x1bf)),console[_0x2c2576(0x19f)](_0x2c2576(0x1b2)+_0x2bdfbb[_0x2c2576(0x1aa)](_0x4e78ab=>_0x4e78ab['appCode'])[_0x2c2576(0x1b4)](',\x20')),console[_0x2c2576(0x19f)]('\x20\x20Default:\x20'+_0x41f8e6['defaultApp']),console[_0x2c2576(0x19f)](_0x2c2576(0x1ae)+_0x41f8e6[_0x2c2576(0x1af)]),console[_0x2c2576(0x19f)](_0x2c2576(0x1b7)+_0x4d1287);}async function runSmartInit(_0x4eba21){const _0x54747a=a95_0x3ecf,_0x54dc8f=process[_0x54747a(0x1a0)](),_0x21f6db=_0x4eba21[_0x54747a(0x1a9)](_0x54747a(0x1c1))?'global':_0x54747a(0x1a1),_0x6b6a5a=_0x4eba21[_0x54747a(0x1c6)](_0x54747a(0x1af))||_0x54747a(0x1c8),_0x2f8726=_0x4eba21[_0x54747a(0x1c6)](_0x54747a(0x19e))||undefined,_0x5493d0=_0x4eba21[_0x54747a(0x1a9)]('project');if(_0x5493d0){const {initConfig:_0x1ed3fa}=await import(_0x54747a(0x1b0));return _0x1ed3fa({'appcode':_0x2f8726,'env':_0x6b6a5a,'autoYes':_0x4eba21['bool']('yes')});}if(_0x21f6db===_0x54747a(0x1a1)){const _0x714b1b=existsSync(resolve(_0x54dc8f,NEW_CONFIG_NAME)),_0x355497=LEGACY_CONFIG_NAMES[_0x54747a(0x1ba)](_0x5e7d4d=>existsSync(resolve(_0x54dc8f,_0x5e7d4d)));if(_0x355497&&!_0x714b1b)return console[_0x54747a(0x19f)](_0x54747a(0x19b)),upgradeApp(_0x4eba21[_0x54747a(0x1ab)],{'yes':_0x4eba21[_0x54747a(0x1a9)](_0x54747a(0x198))});if(_0x714b1b)throw CliErrors[_0x54747a(0x1b8)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x54747a(0x1a2)+CLI_BIN_NAME+_0x54747a(0x1a7));}if(_0x2f8726){const _0x2313a0=validateAppcode(_0x2f8726);if(!_0x2313a0[_0x54747a(0x1c5)])throw CliErrors[_0x54747a(0x1b8)](_0x2313a0[_0x54747a(0x1c9)]);writeInitConfig(_0x21f6db,[syntheticApp(_0x2f8726)],_0x6b6a5a);return;}if(_0x4eba21[_0x54747a(0x1ab)])throw CliErrors[_0x54747a(0x1bc)](_0x54747a(0x19e),'Usage:\x20'+CLI_BIN_NAME+_0x54747a(0x1a6));const _0x1a1d61=getCookie(),_0x5d33b4=await selectMultipleApps(_0x1a1d61),_0x4abcce=_0x5d33b4==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x5d33b4;writeInitConfig(_0x21f6db,_0x4abcce,_0x6b6a5a);}const initFlags=[{'name':'global','type':a95_0x5da5ef(0x1ad),'description':a95_0x5da5ef(0x1bb),'default':![]},{'name':a95_0x5da5ef(0x1af),'type':'string','description':a95_0x5da5ef(0x19a),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x5da5ef(0x19e),'type':a95_0x5da5ef(0x19c),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':a95_0x5da5ef(0x1a1),'type':'boolean','description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a95_0x5da5ef(0x198),'type':a95_0x5da5ef(0x1ad),'description':a95_0x5da5ef(0x1c7),'default':![]}];export const initDefinitions=[{'service':a95_0x5da5ef(0x1be),'command':a95_0x5da5ef(0x1c0),'description':a95_0x5da5ef(0x1a4),'risk':a95_0x5da5ef(0x1b9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5d0b01){return await runSmartInit(_0x5d0b01),{'ok':!![]};}}];function a95_0x2cf8(){const _0x108503=['\x0a✓\x20Successfully\x20initialized\x20','join','5dquHnM','4771BtetYZ','\x20\x20Config:\x20','validation','write','some','Write\x20to\x20global\x20config\x20instead\x20of\x20project','flagMissing','869uGAhbs','init','\x20config','run','global','4910958uSEiXQ','30TntUuL','1402wUEkPN','valid','str','Auto-confirm\x20prompts','production','message','576372ckLPiW','yes','4664166TCIuEY','Target\x20environment','检测到旧配置文件,正在自动升级...\x0a','string','44231ACAUre','appcode','log','cwd','project','Use\x20`','12udneFn','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','99112yvlFiy','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','777qUNcQE','bool','map','nonInteractive','26484lwtQVy','boolean','\x20\x20Env:\x20','env','../../commands/project/init.js','toLocaleString','\x20\x20Apps:\x20'];a95_0x2cf8=function(){return _0x108503;};return a95_0x2cf8();}
@@ -1 +1 @@
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
+ (function(_0x5a7e2,_0x6e738f){const _0x36f399=a96_0x59e3,_0x138e82=_0x5a7e2();while(!![]){try{const _0x14aa05=parseInt(_0x36f399(0x139))/0x1*(parseInt(_0x36f399(0x138))/0x2)+-parseInt(_0x36f399(0x13a))/0x3*(-parseInt(_0x36f399(0x13b))/0x4)+-parseInt(_0x36f399(0x13f))/0x5+-parseInt(_0x36f399(0x140))/0x6+-parseInt(_0x36f399(0x136))/0x7*(-parseInt(_0x36f399(0x135))/0x8)+parseInt(_0x36f399(0x13c))/0x9*(-parseInt(_0x36f399(0x137))/0xa)+parseInt(_0x36f399(0x13d))/0xb*(parseInt(_0x36f399(0x13e))/0xc);if(_0x14aa05===_0x6e738f)break;else _0x138e82['push'](_0x138e82['shift']());}catch(_0x5efc7f){_0x138e82['push'](_0x138e82['shift']());}}}(a96_0xbfbe,0xb8bdd));import{issueReport}from'../../commands/issue/report.js';function a96_0xbfbe(){const _0x4f6bd4=['46iEOegT','8167SvzRna','57YvrMiK','61356vXqBWa','9XskVrN','5962374bGWsGo','12vEfNnC','1322400BpyvVk','978642ZXStfL','30536GMLBip','329EXKZMn','164270COBcmN'];a96_0xbfbe=function(){return _0x4f6bd4;};return a96_0xbfbe();}function a96_0x59e3(_0x59c4c5,_0x3e3d2c){_0x59c4c5=_0x59c4c5-0x135;const _0xbfbea9=a96_0xbfbe();let _0x59e3f9=_0xbfbea9[_0x59c4c5];return _0x59e3f9;}export const issueDefinitions=[issueReport];
@@ -1 +1 @@
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
+ const a97_0x28a030=a97_0x2e80;function a97_0x2e80(_0x429742,_0x270074){_0x429742=_0x429742-0x18f;const _0x369ee7=a97_0x369e();let _0x2e801f=_0x369ee7[_0x429742];return _0x2e801f;}(function(_0x88215f,_0x3bace9){const _0x4680c0=a97_0x2e80,_0x494835=_0x88215f();while(!![]){try{const _0x285526=parseInt(_0x4680c0(0x1a9))/0x1*(-parseInt(_0x4680c0(0x1a8))/0x2)+-parseInt(_0x4680c0(0x19d))/0x3+parseInt(_0x4680c0(0x190))/0x4+-parseInt(_0x4680c0(0x1ac))/0x5+-parseInt(_0x4680c0(0x195))/0x6*(parseInt(_0x4680c0(0x1a6))/0x7)+-parseInt(_0x4680c0(0x19b))/0x8*(-parseInt(_0x4680c0(0x19e))/0x9)+parseInt(_0x4680c0(0x1ae))/0xa;if(_0x285526===_0x3bace9)break;else _0x494835['push'](_0x494835['shift']());}catch(_0x24ec07){_0x494835['push'](_0x494835['shift']());}}}(a97_0x369e,0x2d54a));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x28a030(0x199);const NUDGE_SUPPRESSED_CODES=new Set([a97_0x28a030(0x196),'auth_required',a97_0x28a030(0x1a7),a97_0x28a030(0x1ad),a97_0x28a030(0x192),a97_0x28a030(0x193),'validation_error',a97_0x28a030(0x194)]),defaultWriter=_0x5e9b11=>{const _0x3ff302=a97_0x28a030;process['stderr'][_0x3ff302(0x191)](_0x5e9b11);};export function shouldNudgeForError(_0x21b85c,_0x2e8aea){const _0x1a01da=a97_0x28a030;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x2e8aea['service']==='issue'&&_0x2e8aea[_0x1a01da(0x1a5)]===_0x1a01da(0x19c))return![];if(_0x21b85c instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x21b85c[_0x1a01da(0x1a0)]);return!![];}export function printIssueReportNudgeForError(_0x350d5c,_0x2c80d9,_0x3d3703=defaultWriter){if(!shouldNudgeForError(_0x350d5c,_0x2c80d9))return;const _0x5467d2=buildSuggestedTitle(_0x350d5c,_0x2c80d9);_0x3d3703(formatNudge(_0x5467d2));}function buildSuggestedTitle(_0x25d8d5,_0x8cf8b4){const _0x4cf786=a97_0x28a030,_0x10dabe=_0x25d8d5 instanceof Error?_0x25d8d5[_0x4cf786(0x18f)]:String(_0x25d8d5),_0x2fe8aa=_0x10dabe[_0x4cf786(0x1a3)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()[_0x4cf786(0x197)](0x0,0x78)[_0x4cf786(0x1a3)](/"/g,'\x5c\x22'),_0x53c25a=CLI_BIN_NAME+'\x20'+_0x8cf8b4['service']+'\x20'+_0x8cf8b4[_0x4cf786(0x1a5)];return _0x2fe8aa['length']>0x0?_0x53c25a+':\x20'+_0x2fe8aa:_0x53c25a;}function formatNudge(_0x4ab5e0){const _0x3b3976=a97_0x28a030;return['',_0x3b3976(0x1a1)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+_0x3b3976(0x1ab),_0x3b3976(0x19f)+_0x4ab5e0+_0x3b3976(0x19a),_0x3b3976(0x198),_0x3b3976(0x1a2),_0x3b3976(0x1a4)+NUDGE_OPT_OUT_ENV+_0x3b3976(0x1aa),'']['join']('\x0a');}function a97_0x369e(){const _0x409928=['14772iRtPqk','46ANxDSv','=1\x20to\x20silence\x20this\x20hint.','\x20issue\x20report\x20\x5c','1152190AtmoIB','not_in_project','5997490oQXEjk','message','430824enSsDx','write','unknown_command','flag_missing','network_error','6pRdNKu','cancelled','slice','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','RABETBASE_DISABLE_ISSUE_NUDGE','\x22\x20\x5c','1354744nwvQnK','report','131016pIZgbx','9IrjPQX','\x20\x20\x20\x20--title\x20\x22','code','Hit\x20a\x20','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','replace','\x20\x20Set\x20','command','540806fhhHED','config_missing'];a97_0x369e=function(){return _0x409928;};return a97_0x369e();}
@@ -1 +1 @@
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
+ const a98_0x1ed42b=a98_0xdc7b;(function(_0x292131,_0x3697c5){const _0x494ce0=a98_0xdc7b,_0x41ca97=_0x292131();while(!![]){try{const _0x3425ac=-parseInt(_0x494ce0(0x178))/0x1+parseInt(_0x494ce0(0x176))/0x2*(parseInt(_0x494ce0(0x16e))/0x3)+-parseInt(_0x494ce0(0x156))/0x4+parseInt(_0x494ce0(0x15e))/0x5*(-parseInt(_0x494ce0(0x182))/0x6)+-parseInt(_0x494ce0(0x189))/0x7*(parseInt(_0x494ce0(0x14f))/0x8)+-parseInt(_0x494ce0(0x165))/0x9*(-parseInt(_0x494ce0(0x170))/0xa)+-parseInt(_0x494ce0(0x183))/0xb*(-parseInt(_0x494ce0(0x187))/0xc);if(_0x3425ac===_0x3697c5)break;else _0x41ca97['push'](_0x41ca97['shift']());}catch(_0x1173d6){_0x41ca97['push'](_0x41ca97['shift']());}}}(a98_0x5017,0x4bbc2));function a98_0x5017(){const _0x5c0228=['inline','flagMissing','POST','File\x20not\x20found:\x20','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','descriptionFilePath','499740oojHBm','110wsnQgo','compress','redactionKinds','Failed\x20to\x20report\x20platform\x20issue:\x20','2520444cnjPOt','issue.description_redaction_kinds','203zWXSsq','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','issue.description_truncated','trim','157456dijsTk','report','redactions:\x20','redactionCount','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','truncated\x20from\x20','2004284jayDko','redacted\x20','length','cwd','Platform\x20issue\x20reported\x20(','file','filter','One-line\x20issue\x20summary','35UdvmNJ','string','title','\x20secret(s):\x20','originalBytes','sanitize','str','63omhIrU','issue.description','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','descriptionSource','join','message','apiError','Issue\x20description\x20file\x20is\x20empty:\x20','Platform\x20issue\x20reported','27vyiMgD','otel://','91910PrgFvt','utf8','validation','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','truncated','description','83434wkOpam','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','575071SPqXfD','truncated:\x20original\x20','\x20bytes','issue.description_redactions'];a98_0x5017=function(){return _0x5c0228;};return a98_0x5017();}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';function a98_0xdc7b(_0x29d3f,_0x1c7a52){_0x29d3f=_0x29d3f-0x14d;const _0x50171f=a98_0x5017();let _0xdc7bc2=_0x50171f[_0x29d3f];return _0xdc7bc2;}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':'issue','command':a98_0x1ed42b(0x150),'description':a98_0x1ed42b(0x180),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x1ed42b(0x184),'flags':[{'name':a98_0x1ed42b(0x160),'type':'string','required':!![],'description':a98_0x1ed42b(0x15d)},{'name':'description','type':a98_0x1ed42b(0x15f),'description':a98_0x1ed42b(0x18a)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x1ed42b(0x15f),'description':a98_0x1ed42b(0x173)}],async 'validate'(_0xc1ae26){const _0x4cd558=a98_0x1ed42b,_0x19f775=_0xc1ae26[_0x4cd558(0x164)](_0x4cd558(0x160))[_0x4cd558(0x14e)](),_0x47608f=_0xc1ae26[_0x4cd558(0x164)](_0x4cd558(0x175))[_0x4cd558(0x14e)](),_0x2da4de=_0xc1ae26[_0x4cd558(0x164)](DESCRIPTION_FILE_FLAG)[_0x4cd558(0x14e)]();if(!_0x19f775)throw CliErrors[_0x4cd558(0x17d)](_0x4cd558(0x160),_0x4cd558(0x177));const _0x4b3811=_0x47608f[_0x4cd558(0x158)]>0x0,_0xc56ae4=_0x2da4de[_0x4cd558(0x158)]>0x0;if(_0x4b3811===_0xc56ae4)throw CliErrors[_0x4cd558(0x172)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x4cd558(0x18b));if(_0xc56ae4){const _0x48a727=resolve(process[_0x4cd558(0x159)](),_0x2da4de);if(!existsSync(_0x48a727))throw CliErrors['validation'](_0x4cd558(0x17f)+_0x48a727);}},async 'dryRun'(_0xa47de2){const _0x404e21=a98_0x1ed42b,_0x923472=await prepareIssueReport(_0xa47de2);return{'method':_0x404e21(0x17e),'url':_0x404e21(0x16f)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x923472[_0x404e21(0x160)],'issue.description':_0x923472[_0x404e21(0x175)],'issue.description_original_bytes':_0x923472[_0x404e21(0x163)][_0x404e21(0x162)],'issue.description_truncated':_0x923472[_0x404e21(0x163)][_0x404e21(0x174)],'issue.description_redactions':_0x923472[_0x404e21(0x163)][_0x404e21(0x152)],'issue.description_redaction_kinds':_0x923472['sanitize'][_0x404e21(0x185)]['join'](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x923472[_0x404e21(0x168)],_0x923472[_0x404e21(0x181)]?'descriptionFile:\x20'+_0x923472[_0x404e21(0x181)]:null,_0x923472['sanitize']['truncated']?_0x404e21(0x179)+_0x923472['sanitize'][_0x404e21(0x162)]+'\x20bytes':null,_0x923472[_0x404e21(0x163)][_0x404e21(0x152)]>0x0?_0x404e21(0x151)+_0x923472['sanitize'][_0x404e21(0x152)]+'\x20('+_0x923472[_0x404e21(0x163)][_0x404e21(0x185)]['join'](',\x20')+')':null][_0x404e21(0x15c)](Boolean)[_0x404e21(0x169)]('\x0a')};},async 'execute'(_0x48c697){const _0x4b3996=a98_0x1ed42b,_0x502f0d=await prepareIssueReport(_0x48c697);try{await sendPlatformIssueCollectLog({'title':_0x502f0d[_0x4b3996(0x160)],'description':_0x502f0d[_0x4b3996(0x175)],'sanitize':{'originalBytes':_0x502f0d[_0x4b3996(0x163)][_0x4b3996(0x162)],'truncated':_0x502f0d[_0x4b3996(0x163)]['truncated'],'redactionCount':_0x502f0d[_0x4b3996(0x163)][_0x4b3996(0x152)],'redactionKinds':_0x502f0d[_0x4b3996(0x163)][_0x4b3996(0x185)]}});}catch(_0xe54eed){throw CliErrors[_0x4b3996(0x16b)](_0x4b3996(0x186)+(_0xe54eed instanceof Error?_0xe54eed[_0x4b3996(0x16a)]:String(_0xe54eed)),_0x4b3996(0x167));}return{'ok':!![],'message':buildResultMessage(_0x502f0d[_0x4b3996(0x163)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0x4b3996(0x166),'issue.description_original_bytes',_0x4b3996(0x14d),_0x4b3996(0x17b),_0x4b3996(0x188)],'issue':{'title':_0x502f0d[_0x4b3996(0x160)],'descriptionLength':_0x502f0d[_0x4b3996(0x175)][_0x4b3996(0x158)],'descriptionSource':_0x502f0d['descriptionSource'],..._0x502f0d[_0x4b3996(0x181)]?{'descriptionFile':_0x502f0d['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x502f0d[_0x4b3996(0x163)][_0x4b3996(0x162)],'truncated':_0x502f0d['sanitize'][_0x4b3996(0x174)],'redactions':_0x502f0d[_0x4b3996(0x163)][_0x4b3996(0x152)],'redactionKinds':_0x502f0d['sanitize'][_0x4b3996(0x185)]}}}};}};function buildResultMessage(_0x575d66){const _0x39c4eb=a98_0x1ed42b,_0x926a5c=[];return _0x575d66['truncated']&&_0x926a5c['push'](_0x39c4eb(0x155)+_0x575d66[_0x39c4eb(0x162)]+_0x39c4eb(0x17a)),_0x575d66[_0x39c4eb(0x152)]>0x0&&_0x926a5c['push'](_0x39c4eb(0x157)+_0x575d66['redactionCount']+_0x39c4eb(0x161)+_0x575d66[_0x39c4eb(0x185)][_0x39c4eb(0x169)](',\x20')),_0x926a5c[_0x39c4eb(0x158)]===0x0?_0x39c4eb(0x16d):_0x39c4eb(0x15a)+_0x926a5c[_0x39c4eb(0x169)](';\x20')+')';}async function prepareIssueReport(_0x3522f4){const _0x3407a9=a98_0x1ed42b,_0x5ad2c0=_0x3522f4[_0x3407a9(0x164)](_0x3407a9(0x160))['trim'](),_0x141723=_0x3522f4[_0x3407a9(0x164)]('description'),_0x464598=_0x3522f4[_0x3407a9(0x164)](DESCRIPTION_FILE_FLAG)[_0x3407a9(0x14e)]();if(!_0x464598){const _0x1947d1=_0x141723;if(!_0x1947d1[_0x3407a9(0x14e)]())throw CliErrors[_0x3407a9(0x172)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x3407a9(0x154));const _0x39eb65=sanitizeIssueDescription(_0x1947d1);return{'title':_0x5ad2c0,'description':_0x39eb65[_0x3407a9(0x175)],'descriptionSource':_0x3407a9(0x17c),'sanitize':_0x39eb65};}const _0x37279c=resolve(process[_0x3407a9(0x159)](),_0x464598),_0x151221=await readFile(_0x37279c,_0x3407a9(0x171));if(!_0x151221[_0x3407a9(0x14e)]())throw CliErrors[_0x3407a9(0x172)](_0x3407a9(0x16c)+_0x37279c,_0x3407a9(0x153));const _0x12d489=sanitizeIssueDescription(_0x151221);return{'title':_0x5ad2c0,'description':_0x12d489[_0x3407a9(0x175)],'descriptionSource':_0x3407a9(0x15b),'descriptionFilePath':_0x37279c,'sanitize':_0x12d489};}
@@ -1 +1 @@
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
+ const a99_0x246c48=a99_0x1634;(function(_0x2fc2e6,_0x1be67){const _0xe2a29=a99_0x1634,_0x1cc16e=_0x2fc2e6();while(!![]){try{const _0x1ddeac=-parseInt(_0xe2a29(0x1fd))/0x1+parseInt(_0xe2a29(0x1e3))/0x2*(parseInt(_0xe2a29(0x1f9))/0x3)+-parseInt(_0xe2a29(0x1f7))/0x4*(-parseInt(_0xe2a29(0x206))/0x5)+parseInt(_0xe2a29(0x1fe))/0x6*(-parseInt(_0xe2a29(0x1ea))/0x7)+parseInt(_0xe2a29(0x1e7))/0x8+-parseInt(_0xe2a29(0x1f6))/0x9+-parseInt(_0xe2a29(0x204))/0xa;if(_0x1ddeac===_0x1be67)break;else _0x1cc16e['push'](_0x1cc16e['shift']());}catch(_0x2ab462){_0x1cc16e['push'](_0x1cc16e['shift']());}}}(a99_0x13e7,0xe157e));function a99_0x13e7(){const _0x4a7b90=['6cCWwax','label','slice','byteLength','313935TlwLZu','469662ZPqfyl','REDACTED:cookie','kind','REDACTED:bearer-jwt','utf8','REDACTED:access-key','9502700EjyFKY','description','35ElmAhP','bearer-jwt','max','925678OmUhFh','string','REDACTED:authorization','replace','10489672dNyDgj','from','REDACTED:password','91yxzBgW','access-key','push','password','restore','length','subarray','includes','authorization','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','toString','__RB_OSS_ID_','1583442wDIEuZ','653636uIqYMV','pattern'];a99_0x13e7=function(){return _0x4a7b90;};return a99_0x13e7();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x246c48(0x1f3),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x246c48(0x1ff)},{'kind':a99_0x246c48(0x1f2),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x246c48(0x1e5)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a99_0x246c48(0x1eb),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x246c48(0x203)},{'kind':a99_0x246c48(0x1ed),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x246c48(0x1e9)},{'kind':a99_0x246c48(0x207),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x246c48(0x201)}];export function sanitizeIssueDescription(_0x1fcea7){const _0x3de671=a99_0x246c48,_0x3e3ee8=Buffer[_0x3de671(0x1fc)](_0x1fcea7,_0x3de671(0x202)),_0x15a5d3=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xd6719f=_0x1fcea7,_0x5b31fc=0x0;const _0x8adb74=[];if(!_0x15a5d3){const _0xb97037=protectOssAccessKeyIds(_0xd6719f);_0xd6719f=_0xb97037[_0x3de671(0x205)];for(const _0xe9432a of REDACTION_RULES){let _0xf41f8a=0x0;_0xd6719f=_0xd6719f[_0x3de671(0x1e6)](_0xe9432a[_0x3de671(0x1f8)],(_0x2406d4,_0x2e9e10)=>{const _0x465ae6=_0x3de671;_0xf41f8a+=0x1;const _0x30c673=typeof _0x2e9e10===_0x465ae6(0x1e4)?_0x2e9e10:'';return _0x30c673+'['+_0xe9432a[_0x465ae6(0x1fa)]+']';}),_0xf41f8a>0x0&&(_0x5b31fc+=_0xf41f8a,!_0x8adb74[_0x3de671(0x1f1)](_0xe9432a[_0x3de671(0x200)])&&_0x8adb74[_0x3de671(0x1ec)](_0xe9432a[_0x3de671(0x200)]));}_0xd6719f=_0xb97037[_0x3de671(0x1ee)](_0xd6719f);}let _0x4ff7fa=![];if(Buffer[_0x3de671(0x1fc)](_0xd6719f,_0x3de671(0x202))>ISSUE_DESCRIPTION_MAX_BYTES){_0x4ff7fa=!![];const _0x268277=Buffer['byteLength'](TRUNCATION_NOTICE,_0x3de671(0x202)),_0x2b9af1=Math[_0x3de671(0x208)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x268277);_0xd6719f=sliceUtf8Bytes(_0xd6719f,_0x2b9af1)+TRUNCATION_NOTICE;}return{'description':_0xd6719f,'originalBytes':_0x3e3ee8,'truncated':_0x4ff7fa,'redactionCount':_0x5b31fc,'redactionKinds':_0x8adb74};}function a99_0x1634(_0x1fb83e,_0x4a1d01){_0x1fb83e=_0x1fb83e-0x1e3;const _0x13e701=a99_0x13e7();let _0x163493=_0x13e701[_0x1fb83e];return _0x163493;}function protectOssAccessKeyIds(_0x596c6c){const _0x2d64a5=a99_0x246c48,_0xd6045b=[],_0xb500b1=_0x596c6c[_0x2d64a5(0x1e6)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x706f5b,_0x520c79)=>{const _0x4d6c98=_0x2d64a5,_0xf98551=_0xd6045b[_0x4d6c98(0x1ec)](_0x706f5b[_0x4d6c98(0x1fb)](_0x520c79[_0x4d6c98(0x1ef)]))-0x1;return _0x520c79+_0x4d6c98(0x1f5)+_0xf98551+'__';});return{'description':_0xb500b1,'restore':_0x5f05ff=>_0x5f05ff['replace'](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x1c5211,_0x562f43,_0x3f5247)=>{const _0x58f456=_0xd6045b[Number(_0x3f5247)];return _0x58f456===undefined?_0x1c5211:''+_0x562f43+_0x58f456;})};}function sliceUtf8Bytes(_0x142325,_0x1957e5){const _0x41ac75=a99_0x246c48;if(_0x1957e5<=0x0)return'';const _0x12bc6a=Buffer[_0x41ac75(0x1e8)](_0x142325,_0x41ac75(0x202));if(_0x12bc6a[_0x41ac75(0x1fc)]<=_0x1957e5)return _0x142325;let _0x52b300=_0x1957e5;while(_0x52b300>0x0){const _0x152a80=_0x12bc6a[_0x52b300];if(_0x152a80===undefined||(_0x152a80&0xc0)!==0x80)break;_0x52b300-=0x1;}return _0x12bc6a[_0x41ac75(0x1f0)](0x0,_0x52b300)[_0x41ac75(0x1f4)](_0x41ac75(0x202));}
@@ -1 +1 @@
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
+ const a100_0x83891e=a100_0x5b14;function a100_0x2d60(){const _0x4b6741=['details','View\x20command\x20history\x20logs','message','forEach','25733elmIea','46TpQGcK','172284VPWYxR','logs','log','level','34821kjKLCW','keys','Clear\x20command\x20history\x20logs','warn','write','5VnHOGV','success','4850304PiUPMV','101458PGsfDh','*\x20Lovrabet\x20CLI\x20logs:\x0a','command','length','9YJgKtY','2213668jATiLz','20942800SufABK','show','readLogs','\x20\x20\x20Time:\x20','stringify','*\x20No\x20logs\x20found','duration','*\x20Logs\x20cleared','error'];a100_0x2d60=function(){return _0x4b6741;};return a100_0x2d60();}(function(_0x384c4e,_0x1e3bf8){const _0x523e6c=a100_0x5b14,_0x1699f3=_0x384c4e();while(!![]){try{const _0x44aa9a=-parseInt(_0x523e6c(0x1f7))/0x1*(parseInt(_0x523e6c(0x1f8))/0x2)+parseInt(_0x523e6c(0x1fd))/0x3+-parseInt(_0x523e6c(0x20a))/0x4*(parseInt(_0x523e6c(0x202))/0x5)+-parseInt(_0x523e6c(0x1f9))/0x6+parseInt(_0x523e6c(0x205))/0x7+-parseInt(_0x523e6c(0x204))/0x8+parseInt(_0x523e6c(0x209))/0x9*(parseInt(_0x523e6c(0x20b))/0xa);if(_0x44aa9a===_0x1e3bf8)break;else _0x1699f3['push'](_0x1699f3['shift']());}catch(_0x1d9d47){_0x1699f3['push'](_0x1699f3['shift']());}}}(a100_0x2d60,0x53087));import{logger}from'../../utils/logger.js';function printLogs(_0x20f564){const _0x460436=a100_0x5b14;if(_0x20f564[_0x460436(0x208)]===0x0){console[_0x460436(0x1fb)](_0x460436(0x1ef));return;}console['log'](_0x460436(0x206)),_0x20f564[_0x460436(0x1f6)]((_0x25ba87,_0x598a23)=>{const _0x43d288=_0x460436,_0x223b3c=new Date(_0x25ba87['timestamp'])['toLocaleString']('en-US'),_0x5e2664=_0x25ba87['level']===_0x43d288(0x203)?'√':_0x25ba87['level']===_0x43d288(0x1f2)?'×':_0x25ba87[_0x43d288(0x1fc)]===_0x43d288(0x200)?'!':'i';console[_0x43d288(0x1fb)](_0x598a23+0x1+'.\x20'+_0x5e2664+'\x20['+_0x25ba87[_0x43d288(0x207)]+']\x20'+_0x25ba87[_0x43d288(0x1f5)]),console[_0x43d288(0x1fb)](_0x43d288(0x1ed)+_0x223b3c),_0x25ba87[_0x43d288(0x1f0)]&&console[_0x43d288(0x1fb)]('\x20\x20\x20Duration:\x20'+_0x25ba87[_0x43d288(0x1f0)]+'ms'),_0x25ba87['details']&&Object[_0x43d288(0x1fe)](_0x25ba87[_0x43d288(0x1f3)])[_0x43d288(0x208)]>0x0&&console[_0x43d288(0x1fb)]('\x20\x20\x20Details:\x20'+JSON[_0x43d288(0x1ee)](_0x25ba87['details'],null,0x2)),console[_0x43d288(0x1fb)]('');});}function a100_0x5b14(_0x512e10,_0x403397){_0x512e10=_0x512e10-0x1eb;const _0x2d6054=a100_0x2d60();let _0x5b1462=_0x2d6054[_0x512e10];return _0x5b1462;}export const logsDefinitions=[{'service':a100_0x83891e(0x1fa),'command':a100_0x83891e(0x1eb),'description':a100_0x83891e(0x1f4),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x23fac6){const _0xc7d237=a100_0x83891e;return printLogs(logger[_0xc7d237(0x1ec)]()),{'ok':!![]};}},{'service':a100_0x83891e(0x1fa),'command':'clear','description':a100_0x83891e(0x1ff),'risk':a100_0x83891e(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x44510f){const _0x8abec6=a100_0x83891e;return logger['clearLogs'](),console[_0x8abec6(0x1fb)](_0x8abec6(0x1f1)),{'ok':!![]};}}];
@@ -1 +1 @@
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
+ const a101_0xe2ffdf=a101_0x4b8d;(function(_0x2c364f,_0x4837b2){const _0x5bdef3=a101_0x4b8d,_0x231d56=_0x2c364f();while(!![]){try{const _0x28eef3=-parseInt(_0x5bdef3(0x15e))/0x1+parseInt(_0x5bdef3(0x17a))/0x2*(parseInt(_0x5bdef3(0x158))/0x3)+parseInt(_0x5bdef3(0x168))/0x4*(-parseInt(_0x5bdef3(0x175))/0x5)+-parseInt(_0x5bdef3(0x197))/0x6+parseInt(_0x5bdef3(0x18b))/0x7*(parseInt(_0x5bdef3(0x180))/0x8)+-parseInt(_0x5bdef3(0x163))/0x9+parseInt(_0x5bdef3(0x185))/0xa*(parseInt(_0x5bdef3(0x173))/0xb);if(_0x28eef3===_0x4837b2)break;else _0x231d56['push'](_0x231d56['shift']());}catch(_0x13027d){_0x231d56['push'](_0x231d56['shift']());}}}(a101_0x1bfe,0xb30ef));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';function a101_0x1bfe(){const _0x4c1b13=['expiresAt','Exact\x20empty\x20folder\x20id\x20(required\x20with\x20--dry-run)','plan-validation','stringify','7981704rmZcMf','Menu\x20delete\x20plan\x20cascade\x20does\x20not\x20match\x20the\x20reviewed\x20target\x20page\x20facts.','path','Menu\x20','menu_folder_resources_invalid','420304yOQyBH','validation','The\x20delete\x20request\x20was\x20accepted,\x20but\x20its\x20final\x20online\x20state\x20is\x20unconfirmed.','\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20absence','expect-path','--plan\x20is\x20required\x20for\x20menu\x20delete\x20execution.','Delete\x20one\x20empty\x20folder\x20from\x20a\x20reviewed\x20plan','delete','Menu\x20delete\x20execution\x20consumes\x20only\x20--plan;\x20remove\x20','/smartapi/menu/delete','length','212509AptRhM','str','20cOkbrp','plan\x20delete','byId','verify\x20delete','menu_delete_page_bound','439778bMBcbB','\x20has\x20','Run\x20menu\x20list\x20to\x20check\x20whether\x20the\x20menu\x20still\x20exists\x20before\x20retrying.','unconfirmed','plan-out','filter','512dCrzBy','\x20still\x20references\x20','has','Delete\x20request\x20for\x20menu\x20','folder','830DQyjCX','target','menu_folder_has_resources','menu_delete_unsupported_type','bool','execute\x20reviewed\x20delete\x20plan','72282GAWwjF','childrenIds','dry-run','cascade','Deleted\x20menu\x20','\x20is\x20type\x20\x22','resources','Handle\x20child\x20ids\x20in\x20the\x20platform\x20first:\x20','Use\x20the\x20platform\x20UI\x20for\x20non-folder\x20menu\x20deletion.','--plan\x20cannot\x20be\x20combined\x20with\x20--dry-run;\x20use\x20--plan-out.','type','POST','6617730OqzePm','pageId','Required\x20for\x20execution;\x20consume\x20an\x20unexpired\x20plan\x20created\x20by\x20--plan-out','flagMissing','menu_plan_invalid','plan','rabetbase\x20menu\x20list\x20--format\x20json','\x20and\x20cannot\x20be\x20deleted\x20by\x20the\x20CLI.','selector',';\x20execution\x20must\x20consume\x20','snapshotHash','trim','appCode','string','expect-parent-id','message','unknown','resourcesValid','15uDrGCM','menu\x20list','expected-children-count','childrenCount','join','menu','220248TpausE'];a101_0x1bfe=function(){return _0x4c1b13;};return a101_0x1bfe();}import{CliError,CliErrors}from'../../errors.js';const BACKEND=[{'method':a101_0xe2ffdf(0x196),'path':a101_0xe2ffdf(0x171)}],MENU_DELETE_ID_FLAG={...MENU_ID_FLAG,'required':![],'description':a101_0xe2ffdf(0x160)},MENU_DELETE_PLAN_OUT_FLAG={'name':a101_0xe2ffdf(0x17e),'type':'string','description':'Required\x20with\x20--dry-run;\x20write\x20the\x20reviewed\x20plan\x20to\x20a\x20new\x20local\x20JSON\x20file'},MENU_DELETE_PLAN_FLAG={'name':'plan','type':a101_0xe2ffdf(0x153),'description':a101_0xe2ffdf(0x199)};export const menuDelete={'service':a101_0xe2ffdf(0x15d),'command':a101_0xe2ffdf(0x16f),'description':a101_0xe2ffdf(0x16e),'risk':'high-risk-write','structuredErrors':!![],'flags':[MENU_DELETE_ID_FLAG,MENU_DELETE_PLAN_OUT_FLAG,MENU_DELETE_PLAN_FLAG,...MENU_EXPECT_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3c17e3){const _0x116dc3=a101_0xe2ffdf;_0x3c17e3[_0x116dc3(0x189)](_0x116dc3(0x18d))?validateDeleteDryRunInput(_0x3c17e3):validateDeleteExecuteInput(_0x3c17e3),requireExplicitYes(_0x3c17e3);},async 'dryRun'(_0x19ab38){const _0x20378a=a101_0xe2ffdf;validateDeleteDryRunInput(_0x19ab38);const _0x458246=await buildDeletePlan(_0x19ab38),_0x17dd17=createMenuDeletePlanFile(_0x19ab38[_0x20378a(0x152)],_0x458246),_0x5dc1ef=await writeMenuDeletePlan(_0x19ab38[_0x20378a(0x174)](_0x20378a(0x17e)),_0x17dd17),_0x2f0990=mutationResult({..._0x458246,'planFile':{'path':_0x5dc1ef,'createdAt':_0x17dd17['createdAt'],'expiresAt':_0x17dd17[_0x20378a(0x15f)]}});return menuDryRunResult(_0x2f0990,{'method':'POST','url':_0x20378a(0x171),'body':{'id':_0x2f0990[_0x20378a(0x19f)]['id'],'plan':_0x5dc1ef,'snapshotHash':_0x2f0990[_0x20378a(0x1a1)]},'description':'Would\x20delete\x20menu\x20'+_0x2f0990['selector']['id']+_0x20378a(0x1a0)+_0x5dc1ef+'.'});},async 'execute'(_0xab7ee6){const _0x5b8a55=a101_0xe2ffdf;requireExplicitYes(_0xab7ee6),validateDeleteExecuteInput(_0xab7ee6);const _0x34b5cc=await readMenuDeletePlan(_0xab7ee6[_0x5b8a55(0x174)](_0x5b8a55(0x19c))),_0x582a9b=mutationPlanFromDeleteFile(_0x34b5cc[_0x5b8a55(0x19c)],_0x34b5cc[_0x5b8a55(0x165)]),_0x53a937=_0x34b5cc[_0x5b8a55(0x19c)][_0x5b8a55(0x186)]['id'];try{assertMenuDeletePlanExecutable(_0x34b5cc['plan'],_0xab7ee6[_0x5b8a55(0x152)]);}catch(_0x8f7f37){throw menuFailure(asMenuError(_0x8f7f37),_0x582a9b,{'stage':_0x5b8a55(0x161),'failed':{'id':_0x53a937}});}let _0x1e8c82,_0x42eed1;try{_0x1e8c82=await fetchMutationSnapshot(_0xab7ee6,_0x5b8a55(0x18a),_0x53a937),_0x42eed1=assertMenuDeletePlanCurrent(_0x34b5cc[_0x5b8a55(0x19c)],_0xab7ee6[_0x5b8a55(0x152)],_0x1e8c82),assertDeleteSafety(_0x42eed1),assertCascadeMatchesPlan(_0x582a9b,_0x42eed1);}catch(_0x4fb646){throw menuFailure(asMenuError(_0x4fb646),_0x582a9b,{'stage':'pre-write-plan-validation','failed':{'id':_0x53a937}});}try{const _0x3b8dcf=await deleteMenuEntity(_0xab7ee6['cookie'],_0x53a937);if(!_0x3b8dcf)throw menuError('menu_delete_failed','Backend\x20did\x20not\x20confirm\x20deletion\x20of\x20menu\x20'+_0x53a937+'.',_0x5b8a55(0x17c));}catch(_0x12d92b){const _0x420d35=mapMenuApiError(_0x12d92b,'delete',_0x53a937);throw menuFailure(_0x420d35,_0x582a9b,{'stage':_0x5b8a55(0x16f),'failed':{'id':_0x53a937}});}let _0x2f1999;try{_0x2f1999=await fetchMenuSnapshot(_0xab7ee6[_0x5b8a55(0x152)],_0xab7ee6['cookie']),assertVerified(!_0x2f1999[_0x5b8a55(0x177)][_0x5b8a55(0x182)](_0x53a937),'Menu\x20'+_0x53a937+'\x20is\x20still\x20present\x20after\x20the\x20delete\x20request.');}catch(_0x535274){const _0x32f0f1=describeMenuErrorCause(_0x535274,_0x5b8a55(0x178),_0x53a937),_0x3ec978=asVerificationError(_0x535274,_0x5b8a55(0x183)+_0x53a937+_0x5b8a55(0x16b));throw menuFailure(_0x3ec978,_0x582a9b,{'stage':'verification','succeeded':[{'id':_0x53a937,'deleteRequested':!![]}],'failed':{'id':_0x53a937,'targetAbsent':_0x5b8a55(0x17d),..._0x32f0f1},'warnings':[_0x5b8a55(0x16a)],'verification':{'status':'failed','lookupCommand':_0x5b8a55(0x19d),'targetId':_0x53a937}});}const _0x14ecba=mutationResult({..._0x582a9b,'dryRun':![],'succeeded':[{'id':_0x53a937,'deleted':!![]}],'verification':{'checkedBy':_0x5b8a55(0x159),'plannedSnapshotHash':_0x582a9b[_0x5b8a55(0x1a1)],'finalSnapshotHash':_0x2f1999['hash'],'targetAbsent':!![]}});return{'ok':!![],'data':_0x14ecba,'message':_0x5b8a55(0x18f)+_0x53a937+'.'};}};function validateDeleteDryRunInput(_0x44f30d){const _0x149a38=a101_0xe2ffdf;validateExactId(_0x44f30d);if(!hasFlag(_0x44f30d,_0x149a38(0x17e))||!_0x44f30d['str'](_0x149a38(0x17e))[_0x149a38(0x151)]())throw CliErrors[_0x149a38(0x19a)](_0x149a38(0x17e),'--plan-out\x20is\x20required\x20for\x20menu\x20delete\x20dry-run\x20so\x20execution\x20can\x20consume\x20the\x20reviewed\x20plan.');if(hasFlag(_0x44f30d,_0x149a38(0x19c)))throw CliErrors[_0x149a38(0x169)](_0x149a38(0x194));}function validateDeleteExecuteInput(_0x5adb96){const _0x33aacd=a101_0xe2ffdf;if(!hasFlag(_0x5adb96,_0x33aacd(0x19c))||!_0x5adb96[_0x33aacd(0x174)](_0x33aacd(0x19c))['trim']())throw CliErrors[_0x33aacd(0x19a)]('plan',_0x33aacd(0x16d));const _0x495905=['id',_0x33aacd(0x17e),_0x33aacd(0x154),_0x33aacd(0x16c),_0x33aacd(0x15a)][_0x33aacd(0x17f)](_0x50f9d7=>hasFlag(_0x5adb96,_0x50f9d7));if(_0x495905[_0x33aacd(0x172)]>0x0)throw CliErrors[_0x33aacd(0x169)](_0x33aacd(0x170)+_0x495905['map'](_0x375389=>'--'+_0x375389)[_0x33aacd(0x15c)](',\x20')+'.');}async function buildDeletePlan(_0x206fd1){const _0x1a09fd=a101_0xe2ffdf,_0x48bcda=validateExactId(_0x206fd1),_0x29986a=await fetchMutationSnapshot(_0x206fd1,_0x1a09fd(0x176),_0x48bcda),_0x44cd34=requireMenu(_0x29986a,_0x48bcda);return assertExpectedState(_0x206fd1,_0x44cd34),assertDeleteSafety(_0x44cd34),mutationResult({'operation':_0x1a09fd(0x16f),'selector':{'id':_0x48bcda},'before':_0x44cd34,'after':null,'dryRun':!![],'backend':[...BACKEND],'snapshotHash':_0x29986a['hash'],'cascade':cascadeFor(_0x44cd34),'warnings':[]});}function assertDeleteSafety(_0x575c45){const _0x595927=a101_0xe2ffdf;if(_0x575c45[_0x595927(0x15b)]>0x0)throw menuError('menu_non_empty',_0x595927(0x166)+_0x575c45['id']+_0x595927(0x17b)+_0x575c45[_0x595927(0x15b)]+'\x20direct\x20child\x20menu(s)\x20and\x20cannot\x20be\x20deleted.',_0x595927(0x192)+_0x575c45[_0x595927(0x18c)][_0x595927(0x15c)](',\x20'));if(_0x575c45[_0x595927(0x198)]!=null)throw menuError(_0x595927(0x179),_0x595927(0x166)+_0x575c45['id']+'\x20is\x20bound\x20to\x20page\x20'+_0x575c45[_0x595927(0x198)]+_0x595927(0x19e),'Use\x20the\x20platform\x20UI,\x20which\x20owns\x20the\x20page\x20and\x20PageSchema\x20cascade.');if(_0x575c45[_0x595927(0x195)][_0x595927(0x151)]()['toLowerCase']()!==_0x595927(0x184))throw menuError(_0x595927(0x188),'Menu\x20'+_0x575c45['id']+_0x595927(0x190)+(_0x575c45[_0x595927(0x195)]||_0x595927(0x156))+'\x22;\x20CLI\x20deletion\x20is\x20limited\x20to\x20empty\x20folders.',_0x595927(0x193));if(!_0x575c45[_0x595927(0x157)])throw menuError(_0x595927(0x167),'Folder\x20'+_0x575c45['id']+'\x20has\x20an\x20unreadable\x20extend.resources\x20value\x20and\x20cannot\x20be\x20proven\x20empty.','Inspect\x20and\x20repair\x20the\x20folder\x20resource\x20binding\x20in\x20the\x20platform\x20before\x20deleting\x20it.');if(_0x575c45['resources']['length']>0x0)throw menuError(_0x595927(0x187),'Folder\x20'+_0x575c45['id']+_0x595927(0x181)+_0x575c45[_0x595927(0x191)][_0x595927(0x172)]+'\x20resource\x20URL(s).','Remove\x20or\x20verify\x20the\x20resource\x20bindings\x20in\x20the\x20platform\x20before\x20deleting\x20the\x20folder.');}function a101_0x4b8d(_0x55d960,_0x5f28bc){_0x55d960=_0x55d960-0x151;const _0x1bfe57=a101_0x1bfe();let _0x4b8d0d=_0x1bfe57[_0x55d960];return _0x4b8d0d;}function assertCascadeMatchesPlan(_0x113ae6,_0x1ee1d0){const _0x343cc1=a101_0xe2ffdf,_0x527c54=cascadeFor(_0x1ee1d0);if(JSON[_0x343cc1(0x162)](_0x113ae6[_0x343cc1(0x18e)])!==JSON[_0x343cc1(0x162)](_0x527c54))throw menuError('menu_plan_invalid',_0x343cc1(0x164));}function cascadeFor(_0x594888){const _0x2a2d08=a101_0xe2ffdf;return{'pages':_0x594888[_0x2a2d08(0x198)]==null?[]:[_0x594888[_0x2a2d08(0x198)]],'pageSchemaAffected':_0x594888[_0x2a2d08(0x198)]!=null};}function asMenuError(_0x273f0d){const _0x27bad7=a101_0xe2ffdf;return _0x273f0d instanceof CliError?_0x273f0d:menuError(_0x27bad7(0x19b),_0x273f0d instanceof Error?_0x273f0d[_0x27bad7(0x155)]:String(_0x273f0d));}
@@ -0,0 +1 @@
1
+ const a102_0x23ac5e=a102_0x3461;(function(_0x464bbb,_0x3f50fe){const _0x4d90e4=a102_0x3461,_0x343e31=_0x464bbb();while(!![]){try{const _0x30b6e0=parseInt(_0x4d90e4(0x1e7))/0x1*(-parseInt(_0x4d90e4(0x19d))/0x2)+-parseInt(_0x4d90e4(0x1cf))/0x3*(parseInt(_0x4d90e4(0x1a3))/0x4)+-parseInt(_0x4d90e4(0x1df))/0x5+-parseInt(_0x4d90e4(0x1ab))/0x6*(parseInt(_0x4d90e4(0x1d4))/0x7)+parseInt(_0x4d90e4(0x1de))/0x8+-parseInt(_0x4d90e4(0x205))/0x9*(-parseInt(_0x4d90e4(0x1d7))/0xa)+parseInt(_0x4d90e4(0x19f))/0xb*(parseInt(_0x4d90e4(0x187))/0xc);if(_0x30b6e0===_0x3f50fe)break;else _0x343e31['push'](_0x343e31['shift']());}catch(_0x2e7640){_0x343e31['push'](_0x343e31['shift']());}}}(a102_0x3831,0xe5454));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a102_0x3461(_0x27b880,_0x3d321f){_0x27b880=_0x27b880-0x180;const _0x383141=a102_0x3831();let _0x3461b7=_0x383141[_0x27b880];return _0x3461b7;}import{MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,fetchMutationSnapshot,menuDryRunResult,menuError,menuFailure,mapMenuApiError,mutationResult,nextSiblingSort,parseParentId,recheckMutationSnapshot,requireExplicitYes,requireFolder,toApiParentId,validateSort}from'../../commands/menu/shared/mutations.js';import{createMenuEntity}from'../../commands/menu/shared/service.js';import{CliError,CliErrors}from'../../errors.js';const EXTERNAL_MENU_TYPES_BY_OPEN_MODE={'embedded':a102_0x23ac5e(0x1cb),'new-window':a102_0x23ac5e(0x1ad)};export function validateExternalMenuUrl(_0x6933fc){const _0x5cb7ea=a102_0x23ac5e,_0xeca4c5=_0x6933fc[_0x5cb7ea(0x18b)]();let _0x264343;try{_0x264343=new URL(_0xeca4c5);}catch{throw menuError(_0x5cb7ea(0x1c5),'External\x20menu\x20URL\x20must\x20be\x20a\x20valid\x20absolute\x20URL.',_0x5cb7ea(0x1e2));}if(_0x264343[_0x5cb7ea(0x1b3)]!==_0x5cb7ea(0x1be))throw menuError(_0x5cb7ea(0x207),_0x5cb7ea(0x183),'Provide\x20an\x20HTTPS\x20URL.');if(_0x264343['username']||_0x264343['password'])throw menuError(_0x5cb7ea(0x1ca),_0x5cb7ea(0x1db),_0x5cb7ea(0x1d1));return _0xeca4c5;}export const menuExternalLinkCreate={'service':a102_0x23ac5e(0x18e),'command':a102_0x23ac5e(0x1a7),'description':a102_0x23ac5e(0x18a),'risk':a102_0x23ac5e(0x192),'structuredErrors':!![],'flags':[{'name':'label','type':a102_0x23ac5e(0x1e8),'required':!![],'description':a102_0x23ac5e(0x1e9)},{'name':a102_0x23ac5e(0x1b0),'type':a102_0x23ac5e(0x1e8),'required':!![],'enum':[a102_0x23ac5e(0x1dc),'new-window'],'description':'How\x20to\x20open\x20the\x20external\x20website'},{'name':a102_0x23ac5e(0x1e4),'type':a102_0x23ac5e(0x1e8),'required':!![],'description':'External\x20HTTPS\x20URL'},MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,{'name':a102_0x23ac5e(0x1c6),'type':a102_0x23ac5e(0x1c1),'default':!![],'description':a102_0x23ac5e(0x1ef)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e6562){validateAddInput(_0x2e6562),requireExplicitYes(_0x2e6562);},async 'dryRun'(_0x1aedc4){const _0x1db1d8=a102_0x23ac5e;validateAddInput(_0x1aedc4);const {plan:_0x59b15d}=await buildSafeAddPlan(_0x1aedc4,!![]),_0x458b6f=_0x59b15d[_0x1db1d8(0x191)],_0xe808f5=createBody(_0x458b6f);return menuDryRunResult(_0x59b15d,{'method':'POST','url':_0x1db1d8(0x1d3),'body':_0xe808f5,'description':_0x1db1d8(0x1ed)+JSON[_0x1db1d8(0x1d9)](_0x458b6f[_0x1db1d8(0x1c8)])+_0x1db1d8(0x1fd)+_0x1aedc4['str'](_0x1db1d8(0x1b0))+'\x20opening\x20mode\x20and\x20a\x20platform-generated\x20path.'});},async 'execute'(_0x5a97c7){const _0xc50890=a102_0x23ac5e;validateAddInput(_0x5a97c7),requireExplicitYes(_0x5a97c7);const _0x7cbffd=await buildSafeAddPlan(_0x5a97c7,![]),{plan:_0x5bb1d2,snapshot:_0x120021}=_0x7cbffd,_0x4c3d6f=_0x5bb1d2[_0xc50890(0x191)],_0x1080cf=buildMenuLookupCommand(_0x5a97c7[_0xc50890(0x1bf)]);await recheckAddSnapshot(_0x5a97c7,_0x5bb1d2);let _0xbe446;try{_0xbe446=await createMenuEntity(_0x5a97c7['appCode'],_0x5a97c7[_0xc50890(0x19c)],createBody(_0x4c3d6f));}catch(_0x90be3d){const _0xd60fe=mapMenuApiError(_0x90be3d,_0xc50890(0x182));if(!isResponseLoss(_0x90be3d)||_0xd60fe['code']===_0xc50890(0x1b1))throw externalLinkCreateFailure(_0xd60fe,_0x5bb1d2,{'stage':_0xc50890(0x1f1),'failed':{},'verification':{'status':_0xc50890(0x1f9),'lookupCommand':_0x1080cf}});return recoverAfterResponseLoss(_0x5a97c7,_0x7cbffd,_0x1080cf);}const _0x27aad6=Number(_0xbe446?.['id']),_0x1ba413=typeof _0xbe446?.[_0xc50890(0x20b)]===_0xc50890(0x1e8)?_0xbe446['path']:'';if(!Number[_0xc50890(0x1a9)](_0x27aad6)||_0x27aad6<=0x0||!_0x1ba413[_0xc50890(0x18b)]()){const _0xba4871=menuError(_0xc50890(0x1a5),_0xc50890(0x181),_0xc50890(0x1e5)+_0x1080cf+_0xc50890(0x1ff));throw externalLinkCreateFailure(_0xba4871,_0x5bb1d2,{'stage':_0xc50890(0x1b4),'succeeded':Number['isSafeInteger'](_0x27aad6)&&_0x27aad6>0x0?[{'id':_0x27aad6,'created':!![]}]:[],'failed':{'createdId':Number['isSafeInteger'](_0x27aad6)?_0x27aad6:null,'generatedPathConfirmed':Boolean(_0x1ba413[_0xc50890(0x18b)]())},'warnings':['The\x20create\x20request\x20may\x20have\x20succeeded;\x20inspect\x20current\x20menu\x20facts\x20before\x20any\x20retry.'],'after':Number['isSafeInteger'](_0x27aad6)&&_0x27aad6>0x0?{..._0x4c3d6f,'id':_0x27aad6,'path':_0x1ba413}:_0x4c3d6f,'verification':{'status':_0xc50890(0x1f9),'lookupCommand':_0x1080cf,...Number[_0xc50890(0x1a9)](_0x27aad6)&&_0x27aad6>0x0?{'targetId':_0x27aad6}:{}}});}const _0x1aac54=await readAndVerifyCreatedMenu({'appCode':_0x5a97c7[_0xc50890(0x1bf)],'cookie':_0x5a97c7[_0xc50890(0x19c)],'plan':_0x5bb1d2,'afterPlan':_0x4c3d6f,'createdId':_0x27aad6,'expectedPath':_0x1ba413,'lookupCommand':_0x1080cf,'recovered':![]});return creationSuccess(_0x5bb1d2,_0x1aac54[_0xc50890(0x1bc)],_0x1aac54[_0xc50890(0x1cc)],![]);}};function validateAddInput(_0x39bc1c){const _0x4c4c11=a102_0x23ac5e;if(!_0x39bc1c['str']('label')[_0x4c4c11(0x18b)]())throw CliErrors[_0x4c4c11(0x1ac)](_0x4c4c11(0x1c8));resolveExternalMenuType(_0x39bc1c),validateExternalMenuUrl(_0x39bc1c[_0x4c4c11(0x1af)](_0x4c4c11(0x1e4))),parseParentId(_0x39bc1c,'parent-id'),validateSort(_0x39bc1c);}function resolveExternalMenuType(_0x209ec8){const _0x2faff7=a102_0x23ac5e,_0x21cfd8=_0x209ec8['str'](_0x2faff7(0x1b0))['trim']();if(!_0x21cfd8)throw CliErrors[_0x2faff7(0x1ac)](_0x2faff7(0x1b0));const _0x337f64=EXTERNAL_MENU_TYPES_BY_OPEN_MODE[_0x21cfd8];if(!_0x337f64)throw menuError('menu_open_mode_invalid','--open-mode\x20must\x20be\x20embedded\x20or\x20new-window.',_0x2faff7(0x1a1));return _0x337f64;}async function buildAddPlan(_0x3e006f,_0x8e0558){const _0x3df414=a102_0x23ac5e,_0x558707=await fetchMutationSnapshot(_0x3e006f,'create\x20external\x20menu'),_0x21d8bd=parseParentId(_0x3e006f,_0x3df414(0x1f0))??null;if(_0x21d8bd!=null)requireFolder(_0x558707,_0x21d8bd);const _0x1eca9a=validateSort(_0x3e006f),_0x17aa62=_0x1eca9a??nextSiblingSort(_0x558707,_0x21d8bd,_0x3df414(0x18e)),_0x4d5980=_0x3e006f[_0x3df414(0x1af)](_0x3df414(0x1c8))[_0x3df414(0x18b)](),_0x124675=resolveExternalMenuType(_0x3e006f),_0x1128c9=validateExternalMenuUrl(_0x3e006f[_0x3df414(0x1af)](_0x3df414(0x1e4))),_0x4a88ea=Object['prototype']['hasOwnProperty']['call'](_0x3e006f['rawFlags'],_0x3df414(0x1c6))?_0x3e006f[_0x3df414(0x1eb)]('visible'):!![],_0x3661bd={'id':null,'parentId':_0x21d8bd,'label':_0x4d5980,'path':'<platform-generated>','url':_0x1128c9,'type':_0x124675,'visible':_0x4a88ea,'sort':_0x17aa62},_0x472282=buildMenuLookupCommand(_0x3e006f[_0x3df414(0x1bf)]),_0x120f2d=mutationResult({'operation':'add','selector':{'parentId':_0x21d8bd,'type':_0x124675,'label':_0x4d5980,'url':_0x1128c9},'before':null,'after':_0x3661bd,'dryRun':_0x8e0558,'backend':[{'method':_0x3df414(0x1c0),'path':_0x3df414(0x1d3)}],'plannedActions':[{'stage':_0x3df414(0x1bb),'method':_0x3df414(0x1c0),'path':'/smartapi/menu/create','body':createBody(_0x3661bd)}],'snapshotHash':_0x558707[_0x3df414(0x20c)],'warnings':[_0x3df414(0x1c2)],'verification':{'lookupCommand':_0x472282}});return{'plan':_0x120f2d,'snapshot':_0x558707};}async function buildSafeAddPlan(_0x54b19f,_0x2c444d){try{return await buildAddPlan(_0x54b19f,_0x2c444d);}catch(_0x4a1a0e){throw safeMenuAddError(_0x4a1a0e);}}async function recheckAddSnapshot(_0xf45b26,_0x34ef62){const _0xc18af=a102_0x23ac5e;try{await recheckMutationSnapshot(_0xf45b26,_0x34ef62,_0xc18af(0x182));}catch(_0x466ad0){const _0x5cce2b=getFailureRecord(_0x466ad0);throw externalLinkCreateFailure(_0x466ad0,_0x34ef62,{'stage':_0xc18af(0x1fc),'failed':{..._0x5cce2b?.[_0xc18af(0x193)]?{'expectedSnapshotHash':_0x5cce2b['expectedSnapshotHash']}:{},..._0x5cce2b?.[_0xc18af(0x1b9)]?{'currentSnapshotHash':_0x5cce2b[_0xc18af(0x1b9)]}:{}}});}}function createBody(_0x4da080){const _0x3c0db5=a102_0x23ac5e;return{'parentId':toApiParentId(_0x4da080[_0x3c0db5(0x1c9)]),'label':String(_0x4da080['label']),'type':String(_0x4da080[_0x3c0db5(0x1c7)]),'url':String(_0x4da080[_0x3c0db5(0x1e4)]),'visible':Boolean(_0x4da080[_0x3c0db5(0x1c6)]),'sort':Number(_0x4da080['sort']),'extend':{}};}function buildMenuLookupCommand(_0x514cc2){const _0x12bfd2=a102_0x23ac5e,_0x1c6566='\x27'+_0x514cc2[_0x12bfd2(0x195)](/'/g,'\x27\x5c\x27\x27')+'\x27';return _0x12bfd2(0x1f5)+_0x1c6566+'\x20--format\x20compress';}async function recoverAfterResponseLoss(_0x2474cd,_0x2f9cf2,_0x1b8fc2){const _0x1fc70e=a102_0x23ac5e,{plan:_0x1870bd,snapshot:_0x5159cd}=_0x2f9cf2,_0x4ea688=_0x1870bd[_0x1fc70e(0x191)];let _0x1b2588;try{_0x1b2588=await fetchMenuSnapshot(_0x2474cd[_0x1fc70e(0x1bf)],_0x2474cd[_0x1fc70e(0x19c)]);}catch(_0x352665){throw recoveryRequiredFailure(_0x1870bd,_0x1b8fc2,{'matchCount':null,'newMatchCount':null,'preexistingMatchCount':null,'readbackFailed':!![]});}const _0x4a688a=_0x1b2588[_0x1fc70e(0x1fa)][_0x1fc70e(0x202)](_0x4001c7=>_0x4001c7[_0x1fc70e(0x1c9)]===_0x4ea688[_0x1fc70e(0x1c9)]&&_0x4001c7[_0x1fc70e(0x1c7)]===_0x4ea688[_0x1fc70e(0x1c7)]&&_0x4001c7['label']===_0x4ea688[_0x1fc70e(0x1c8)]&&_0x4001c7[_0x1fc70e(0x1e4)]===_0x4ea688[_0x1fc70e(0x1e4)]),_0xbb506c=_0x4a688a[_0x1fc70e(0x202)](_0x148804=>!_0x5159cd['byId']['has'](_0x148804['id'])),_0x1d90b0=_0x4a688a['filter'](_0x3b29d5=>_0x5159cd['byId'][_0x1fc70e(0x184)](_0x3b29d5['id']));if(_0x4a688a['length']!==0x1||_0xbb506c[_0x1fc70e(0x1f8)]!==0x1)throw recoveryRequiredFailure(_0x1870bd,_0x1b8fc2,{'matchCount':_0x4a688a[_0x1fc70e(0x1f8)],'newMatchCount':_0xbb506c['length'],'preexistingMatchCount':_0x1d90b0[_0x1fc70e(0x1f8)]});const _0x25b1d9=_0xbb506c[0x0];try{verifyCreatedFact(_0x25b1d9,_0x25b1d9['id'],_0x4ea688,null);}catch(_0x43b940){const _0xcd838b=_0x43b940 instanceof Error&&_0x1fc70e(0x1f4)in _0x43b940?_0x43b940:menuError('menu_verification_failed',_0x1fc70e(0x1b6)+_0x25b1d9['id']+'\x20could\x20not\x20be\x20verified.',_0x1fc70e(0x1e5)+_0x1b8fc2+_0x1fc70e(0x201));throw externalLinkCreateFailure(_0xcd838b,_0x1870bd,{'stage':_0x1fc70e(0x198),'succeeded':[{'id':_0x25b1d9['id'],'created':!![],'recovered':!![]}],'failed':{'id':_0x25b1d9['id'],'finalFactsConfirmed':![]},'after':_0x25b1d9,'warnings':[_0x1fc70e(0x1d8)+_0x25b1d9['id']+'\x20was\x20observed\x20after\x20response\x20loss;\x20inspect\x20it\x20before\x20any\x20retry.'],'verification':{'status':_0x1fc70e(0x1f9),'targetId':_0x25b1d9['id'],'recovered':!![],'lookupCommand':_0x1b8fc2}});}return creationSuccess(_0x1870bd,_0x1b2588,_0x25b1d9,!![]);}function recoveryRequiredFailure(_0x419491,_0x12346c,_0x464b70){const _0x5243c3=a102_0x23ac5e,_0x358b54=menuError('menu_create_recovery_required',_0x5243c3(0x1e3),_0x5243c3(0x1e5)+_0x12346c+_0x5243c3(0x1b8));return externalLinkCreateFailure(_0x358b54,_0x419491,{'stage':_0x5243c3(0x1f6),'failed':_0x464b70,'warnings':['The\x20create\x20request\x20may\x20have\x20succeeded.\x20Automatic\x20retry\x20is\x20disabled\x20to\x20prevent\x20duplicates.'],'verification':{'status':_0x5243c3(0x1f9),..._0x464b70,'lookupCommand':_0x12346c}});}async function readAndVerifyCreatedMenu(_0x440deb){const _0x42b73e=a102_0x23ac5e;let _0x47a7c0;try{_0x47a7c0=await fetchMenuSnapshot(_0x440deb[_0x42b73e(0x1bf)],_0x440deb[_0x42b73e(0x19c)]);}catch(_0x4f3b99){const _0x407d2f=menuError(_0x42b73e(0x1ec),_0x42b73e(0x1d8)+_0x440deb[_0x42b73e(0x1ae)]+_0x42b73e(0x1d2),_0x42b73e(0x1e5)+_0x440deb[_0x42b73e(0x199)]+'\x20and\x20inspect\x20the\x20created\x20id\x20before\x20retrying.');throw externalLinkCreateFailure(_0x407d2f,_0x440deb['plan'],{'stage':'verification','succeeded':[{'id':_0x440deb[_0x42b73e(0x1ae)],'created':!![]}],'failed':{'id':_0x440deb[_0x42b73e(0x1ae)],'finalFactsConfirmed':![],'readbackFailed':!![]},'after':{..._0x440deb[_0x42b73e(0x1a4)],'id':_0x440deb['createdId'],'path':_0x440deb[_0x42b73e(0x196)]},'warnings':[_0x42b73e(0x1d8)+_0x440deb['createdId']+_0x42b73e(0x186)],'verification':{'status':'failed','targetId':_0x440deb[_0x42b73e(0x1ae)],'lookupCommand':_0x440deb[_0x42b73e(0x199)]}});}const _0x4b9d4e=_0x47a7c0[_0x42b73e(0x1f2)][_0x42b73e(0x1ba)](_0x440deb[_0x42b73e(0x1ae)]);try{if(!_0x4b9d4e)throw menuError(_0x42b73e(0x1ec),_0x42b73e(0x1c3)+_0x440deb[_0x42b73e(0x1ae)]+'\x20is\x20missing\x20from\x20final\x20menu\x20facts.','Run\x20'+_0x440deb['lookupCommand']+_0x42b73e(0x197));verifyCreatedFact(_0x4b9d4e,_0x440deb['createdId'],_0x440deb[_0x42b73e(0x1a4)],_0x440deb[_0x42b73e(0x196)]);}catch(_0x410193){const _0x2f4862=_0x410193 instanceof Error&&'code'in _0x410193?_0x410193:menuError(_0x42b73e(0x1ec),'Created\x20menu\x20'+_0x440deb[_0x42b73e(0x1ae)]+_0x42b73e(0x180),_0x42b73e(0x1e5)+_0x440deb['lookupCommand']+_0x42b73e(0x197));throw externalLinkCreateFailure(_0x2f4862,_0x440deb['plan'],{'stage':_0x42b73e(0x198),'succeeded':[{'id':_0x440deb[_0x42b73e(0x1ae)],'created':!![]}],'failed':{'id':_0x440deb[_0x42b73e(0x1ae)],'finalFactsConfirmed':![]},'after':_0x4b9d4e??{..._0x440deb[_0x42b73e(0x1a4)],'id':_0x440deb[_0x42b73e(0x1ae)],'path':_0x440deb[_0x42b73e(0x196)]},'warnings':[_0x42b73e(0x1d8)+_0x440deb['createdId']+_0x42b73e(0x1f7)],'verification':{'status':_0x42b73e(0x1f9),'targetId':_0x440deb[_0x42b73e(0x1ae)],'recovered':_0x440deb[_0x42b73e(0x204)],'lookupCommand':_0x440deb[_0x42b73e(0x199)]}});}return{'snapshot':_0x47a7c0,'fact':_0x4b9d4e};}function verifyCreatedFact(_0x4b1f60,_0x32c4f0,_0x663765,_0x4137f4){const _0xa06fe7=a102_0x23ac5e;if(!Number['isSafeInteger'](_0x4b1f60['id'])||_0x4b1f60['id']<=0x0||_0x4b1f60['id']!==_0x32c4f0)throw menuError('menu_verification_failed',_0xa06fe7(0x1dd),_0xa06fe7(0x1d5));const _0x451b6b=[['parent',_0x4b1f60['parentId'],_0x663765[_0xa06fe7(0x1c9)]],[_0xa06fe7(0x1c7),_0x4b1f60[_0xa06fe7(0x1c7)],_0x663765['type']],[_0xa06fe7(0x1c8),_0x4b1f60[_0xa06fe7(0x1c8)],_0x663765[_0xa06fe7(0x1c8)]],['URL',_0x4b1f60[_0xa06fe7(0x1e4)],_0x663765[_0xa06fe7(0x1e4)]],[_0xa06fe7(0x194),_0x4b1f60[_0xa06fe7(0x1c6)],_0x663765['visible']],[_0xa06fe7(0x18d),_0x4b1f60[_0xa06fe7(0x18d)],_0x663765[_0xa06fe7(0x18d)]]];for(const [_0x25a395,_0x3f7e14,_0x98cdfd]of _0x451b6b){if(_0x3f7e14!==_0x98cdfd)throw menuError(_0xa06fe7(0x1ec),_0xa06fe7(0x1c3)+_0x4b1f60['id']+_0xa06fe7(0x203)+_0x25a395+'.',_0xa06fe7(0x19a));}if(!_0x4b1f60[_0xa06fe7(0x20b)][_0xa06fe7(0x18b)]()||_0x4137f4!==null&&_0x4b1f60[_0xa06fe7(0x20b)]!==_0x4137f4)throw menuError('menu_verification_failed','Created\x20menu\x20'+_0x4b1f60['id']+_0xa06fe7(0x1a8),_0xa06fe7(0x19a));}function a102_0x3831(){const _0xe18afa=['label','parentId','menu_url_credentials_forbidden','iframe','fact','Use\x20the\x20structured\x20verification\x20lookup\x20command\x20and\x20do\x20not\x20retry\x20blindly.','cause','1805034kOlkFh','Created\x20menu\x20facts\x20could\x20not\x20be\x20verified\x20safely.','Remove\x20credentials\x20from\x20the\x20URL\x20and\x20use\x20platform-managed\x20authentication.','\x20was\x20created\x20but\x20final\x20facts\x20could\x20not\x20be\x20read.','/smartapi/menu/create','7Inztwj','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20the\x20operation.','test','1210jJzZyV','Menu\x20','stringify','\x20after\x20response\x20loss.','External\x20menu\x20URL\x20must\x20not\x20contain\x20embedded\x20credentials.','embedded','Created\x20menu\x20has\x20an\x20invalid\x20or\x20unexpected\x20id.','3157072erkNwm','7030345IxVdCt','object','Menu\x20create\x20response\x20could\x20not\x20be\x20verified\x20safely.','Provide\x20an\x20absolute\x20HTTPS\x20URL\x20without\x20embedded\x20credentials.','The\x20create\x20response\x20was\x20lost\x20and\x20the\x20created\x20menu\x20cannot\x20be\x20identified\x20safely.','url','Run\x20','The\x20external\x20menu\x20create\x20outcome\x20could\x20not\x20be\x20recovered\x20safely.','386CzVPhA','string','Menu\x20label','Recovered\x20created\x20external\x20menu\x20','bool','menu_verification_failed','Would\x20create\x20external\x20website\x20link\x20menu\x20','isArray','Whether\x20the\x20menu\x20is\x20visible','parent-id','create','byId','data','code','rabetbase\x20menu\x20list\x20--appcode\x20','create-recovery','\x20remains\x20available\x20for\x20manual\x20inspection;\x20do\x20not\x20retry\x20blindly.','length','failed','menus','Created\x20external\x20menu\x20','pre-write-recheck','\x20with\x20','map','\x20before\x20retrying;\x20the\x20menu\x20may\x20already\x20exist.','succeeded','\x20and\x20inspect\x20the\x20recovered\x20id\x20before\x20retrying.','filter','\x20has\x20an\x20unexpected\x20','recovered','136809LlZLjP','menu_sort_invalid','menu_url_https_required','before','message','menu\x20list','path','hash','\x20failed\x20final\x20verification.','Menu\x20create\x20response\x20did\x20not\x20contain\x20a\x20valid\x20id\x20and\x20non-empty\x20generated\x20path.','create\x20external\x20menu','External\x20menu\x20URL\x20must\x20use\x20HTTPS.','has','readbackerror','\x20may\x20exist\x20online;\x20inspect\x20it\x20before\x20any\x20retry.','48OvDnwl','External\x20menu\x20creation\x20failed.','menu_sort_overflow','Create\x20an\x20external\x20website\x20link\x20menu','trim','Online\x20menu\x20state\x20changed\x20before\x20external\x20menu\x20creation.','sort','menu','menu_create_recovery_required','Permission\x20denied\x20while\x20creating\x20the\x20external\x20menu.','after','high-risk-write','expectedSnapshotHash','visibility','replace','expectedPath','\x20and\x20inspect\x20the\x20created\x20id\x20before\x20retrying.','verification','lookupCommand','Inspect\x20the\x20created\x20menu\x20before\x20retrying\x20the\x20operation.','toLowerCase','cookie','406sqLFtF','menu_parent_not_folder','10104908qEXENY','menu_mutation_failed','Choose\x20embedded\x20to\x20keep\x20the\x20application\x20shell,\x20or\x20new-window\x20to\x20open\x20the\x20website\x20separately.','body','12ouUGpF','afterPlan','menu_create_response_invalid','fromEntries','external-link-create','\x20has\x20an\x20unexpected\x20generated\x20path.','isSafeInteger','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','10079484IVkUZk','flagMissing','link','createdId','str','open-mode','menu_permission_denied','Use\x20the\x20structured\x20verification\x20lookup\x20command\x20before\x20retrying.','protocol','create-response-validation','selector','Recovered\x20menu\x20','rawerror','\x20and\x20inspect\x20current\x20menu\x20facts;\x20do\x20not\x20retry\x20creation\x20while\x20the\x20outcome\x20is\x20uncertain.','currentSnapshotHash','get','create-menu','snapshot','<redacted>','https:','appCode','POST','boolean','The\x20platform\x20assigns\x20the\x20menu\x20a\x20non-empty\x20path\x20used\x20by\x20menu\x20routing\x20and\x20keys.','Created\x20menu\x20','entries','menu_url_invalid','visible','type'];a102_0x3831=function(){return _0xe18afa;};return a102_0x3831();}function creationSuccess(_0x2e6a18,_0x1726e8,_0x5b729a,_0x133a5b){const _0x24b4ce=a102_0x23ac5e,_0x241a10=mutationResult({..._0x2e6a18,'after':_0x5b729a,'dryRun':![],'succeeded':[{'id':_0x5b729a['id'],'created':!![],'recovered':_0x133a5b}],'verification':{'checkedBy':_0x24b4ce(0x20a),'snapshotHash':_0x1726e8[_0x24b4ce(0x20c)],'targetId':_0x5b729a['id'],'recovered':_0x133a5b,'path':_0x5b729a['path']}});return{'ok':!![],'message':_0x133a5b?_0x24b4ce(0x1ea)+_0x5b729a['id']+_0x24b4ce(0x1da):_0x24b4ce(0x1fb)+_0x5b729a['id']+'.','data':{..._0x241a10,'recovered':_0x133a5b}};}function isResponseLoss(_0x25ecd5){const _0x406761=a102_0x23ac5e,_0x87d1f0=_0x25ecd5 instanceof Error?_0x25ecd5[_0x406761(0x209)]:String(_0x25ecd5);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted/i[_0x406761(0x1d6)](_0x87d1f0);}function externalLinkCreateFailure(_0x384951,_0x1691b2,_0x1e189e){const _0x19327c=a102_0x23ac5e;return menuFailure(safeMenuAddError(_0x384951),redactFailurePlan(_0x1691b2),{..._0x1e189e,'succeeded':_0x1e189e[_0x19327c(0x200)]?.[_0x19327c(0x1fe)](redactFailureRecord),'failed':_0x1e189e[_0x19327c(0x1f9)]?redactFailureRecord(_0x1e189e['failed']):undefined,'verification':_0x1e189e[_0x19327c(0x198)]?redactFailureRecord(_0x1e189e[_0x19327c(0x198)]):undefined,'after':_0x1e189e[_0x19327c(0x191)]===undefined?undefined:redactFailureValue(_0x1e189e[_0x19327c(0x191)])});}function redactFailurePlan(_0x23ffc7){const _0x4dc5cd=a102_0x23ac5e;return{..._0x23ffc7,'selector':redactFailureRecord(_0x23ffc7[_0x4dc5cd(0x1b5)]),'before':redactFailureValue(_0x23ffc7[_0x4dc5cd(0x208)]),'after':redactFailureValue(_0x23ffc7[_0x4dc5cd(0x191)]),'plannedActions':_0x23ffc7['plannedActions']?.[_0x4dc5cd(0x1fe)](_0x4e0d1a=>({..._0x4e0d1a,'body':redactFailureRecord(_0x4e0d1a[_0x4dc5cd(0x1a2)])})),'succeeded':_0x23ffc7[_0x4dc5cd(0x200)][_0x4dc5cd(0x1fe)](redactFailureRecord),'failed':_0x23ffc7[_0x4dc5cd(0x1f9)][_0x4dc5cd(0x1fe)](redactFailureRecord),'verification':_0x23ffc7[_0x4dc5cd(0x198)]?redactFailureRecord(_0x23ffc7[_0x4dc5cd(0x198)]):undefined};}function redactFailureRecord(_0x43ae9c){return redactFailureValue(_0x43ae9c);}function redactFailureValue(_0x585000,_0x31bb7d=''){const _0x227ac0=a102_0x23ac5e,_0x52b52e=_0x31bb7d[_0x227ac0(0x19b)]()[_0x227ac0(0x195)](/[^a-z0-9]/g,'');if([_0x227ac0(0x1ce),'causemessage',_0x227ac0(0x185),_0x227ac0(0x1b7)]['includes'](_0x52b52e))return _0x227ac0(0x1bd);if(Array[_0x227ac0(0x1ee)](_0x585000))return _0x585000[_0x227ac0(0x1fe)](_0x430b4f=>redactFailureValue(_0x430b4f));if(_0x585000&&typeof _0x585000===_0x227ac0(0x1e0))return Object[_0x227ac0(0x1a6)](Object[_0x227ac0(0x1c4)](_0x585000)[_0x227ac0(0x1fe)](([_0x419d54,_0x140f64])=>[_0x419d54,redactFailureValue(_0x140f64,_0x419d54)]));return _0x585000;}function safeMenuAddError(_0x2cdc13){const _0x3d912a=a102_0x23ac5e,_0x5e25d5=_0x2cdc13 instanceof CliError?_0x2cdc13[_0x3d912a(0x1f4)]:_0x3d912a(0x1a0);switch(_0x5e25d5){case'menu_state_drift':return menuError(_0x5e25d5,_0x3d912a(0x18c),'Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot.');case _0x3d912a(0x1b1):return menuError(_0x5e25d5,_0x3d912a(0x190),_0x3d912a(0x1aa));case _0x3d912a(0x1a5):return menuError(_0x5e25d5,_0x3d912a(0x1e1),_0x3d912a(0x1b2));case _0x3d912a(0x1ec):return menuError(_0x5e25d5,_0x3d912a(0x1d0),_0x3d912a(0x1b2));case _0x3d912a(0x18f):return menuError(_0x5e25d5,_0x3d912a(0x1e6),_0x3d912a(0x1cd));case'menu_mutation_failed':case'menu_not_found':case _0x3d912a(0x19e):case _0x3d912a(0x206):case _0x3d912a(0x189):return menuError(_0x5e25d5,'External\x20menu\x20creation\x20failed.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying.');default:return menuError(_0x3d912a(0x1a0),_0x3d912a(0x188),'Inspect\x20current\x20menu\x20facts\x20before\x20retrying.');}}function getFailureRecord(_0x149bed){const _0x6bb0b3=a102_0x23ac5e;if(!(_0x149bed instanceof Error)||!('data'in _0x149bed))return undefined;const _0xb8e4b4=_0x149bed[_0x6bb0b3(0x1f3)];if(!_0xb8e4b4||typeof _0xb8e4b4!=='object')return undefined;const _0x103239=_0xb8e4b4[_0x6bb0b3(0x1f9)];if(!Array[_0x6bb0b3(0x1ee)](_0x103239)||!_0x103239[0x0]||typeof _0x103239[0x0]!==_0x6bb0b3(0x1e0))return undefined;return _0x103239[0x0];}
@@ -1 +1 @@
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
+ const a103_0x314f33=a103_0x12d3;(function(_0x5742b3,_0x578604){const _0x46dec9=a103_0x12d3,_0x2a92c9=_0x5742b3();while(!![]){try{const _0x2f5549=-parseInt(_0x46dec9(0x16c))/0x1+parseInt(_0x46dec9(0x18e))/0x2+-parseInt(_0x46dec9(0x178))/0x3+-parseInt(_0x46dec9(0x17c))/0x4+-parseInt(_0x46dec9(0x165))/0x5*(parseInt(_0x46dec9(0x14c))/0x6)+-parseInt(_0x46dec9(0x16e))/0x7+parseInt(_0x46dec9(0x18a))/0x8*(parseInt(_0x46dec9(0x17f))/0x9);if(_0x2f5549===_0x578604)break;else _0x2a92c9['push'](_0x2a92c9['shift']());}catch(_0x38d1e6){_0x2a92c9['push'](_0x2a92c9['shift']());}}}(a103_0xe536,0x2dcbf));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,nextSiblingSort,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 a103_0xe536(){const _0x5b04c0=['get','\x20has\x20an\x20unexpected\x20sort.','failed','string','create\x20folder','path','Created\x20folder\x20','pageId','cookie','isSafeInteger','40FOblMs','create','\x20has\x20an\x20unexpected\x20label.','after','menu_create_response_invalid','depth','folder','46509MQkHok','parentId','2291968fVSLhH','verification','high-risk-write','hash','parent-id','\x20was\x20created\x20but\x20readback\x20could\x20not\x20load\x20its\x20final\x20facts','\x20may\x20exist\x20online\x20at\x20path\x20','/smartapi/menu/create','Menu\x20create\x20response\x20did\x20not\x20contain\x20a\x20valid\x20menu\x20id.','POST','36384XRTtCg','type','\x20path\x20does\x20not\x20match\x20the\x20platform-generated\x20path.','The\x20create\x20request\x20may\x20have\x20succeeded;\x20verify\x20the\x20online\x20menu\x20list\x20before\x20retrying.','518368tkyQwW','length','Folder\x20','1525392GdYPhx','menu\x20list','\x20has\x20resources.','visible','create-response-validation','\x20depth\x20does\x20not\x20match\x20its\x20final\x20parent\x20hierarchy.','\x22\x20with\x20a\x20platform-generated\x20path.','root','create-folder','flagMissing','childrenCount','24BPcnmF','<platform-generated>','Menu\x20create\x20response\x20for\x20folder\x20','\x20may\x20exist\x20online;\x20verify\x20it\x20by\x20id\x20before\x20retrying.','697688ktYGTG','sort','trim','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20before\x20retrying;\x20the\x20folder\x20may\x20already\x20exist.','Create\x20an\x20empty\x20folder\x20menu\x20at\x20root\x20or\x20under\x20another\x20folder','label','115554soMtHB','verify\x20folder\x20creation','group-create','Inspect\x20the\x20created\x20id\x20with\x20`rabetbase\x20menu\x20list\x20--format\x20json`;\x20do\x20not\x20retry\x20creation\x20until\x20its\x20state\x20is\x20known.','byId','rabetbase\x20menu\x20list\x20--format\x20json','appCode','stringify','\x20remains\x20online;\x20inspect\x20its\x20final\x20facts\x20before\x20any\x20retry.','Created\x20menu\x20folder\x20','Would\x20create\x20empty\x20folder\x20\x22','resources','\x20has\x20unexpected\x20parent\x20','str','\x20is\x20not\x20empty.'];a103_0xe536=function(){return _0x5b04c0;};return a103_0xe536();}const BACKEND=[{'method':a103_0x314f33(0x177),'path':a103_0x314f33(0x175)}];function a103_0x12d3(_0x4007ed,_0x45bf25){_0x4007ed=_0x4007ed-0x149;const _0xe536e=a103_0xe536();let _0x12d31d=_0xe536e[_0x4007ed];return _0x12d31d;}export const menuGroupCreate={'service':'menu','command':a103_0x314f33(0x14e),'description':a103_0x314f33(0x14a),'risk':a103_0x314f33(0x170),'structuredErrors':!![],'flags':[{'name':a103_0x314f33(0x14b),'type':a103_0x314f33(0x15e),'required':!![],'description':'Folder\x20label'},MENU_PARENT_ID_FLAG,MENU_SORT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x9845f1){validateCreateInput(_0x9845f1),requireExplicitYes(_0x9845f1);},async 'dryRun'(_0x51852c){const _0x43e132=a103_0x314f33,_0x401cc1=await buildCreatePlan(_0x51852c,!![]),_0x257a94=_0x401cc1[_0x43e132(0x168)];return menuDryRunResult(_0x401cc1,{'method':_0x43e132(0x177),'url':_0x43e132(0x175),'body':{'parentId':toApiParentId(_0x257a94[_0x43e132(0x16d)]),'label':_0x257a94[_0x43e132(0x14b)],'type':_0x43e132(0x16b),'visible':!![],'sort':_0x257a94['sort'],'extend':{}},'description':_0x43e132(0x156)+String(_0x257a94[_0x43e132(0x14b)])+_0x43e132(0x185)});},async 'execute'(_0xa2e84d){const _0x533c2f=a103_0x314f33;validateCreateInput(_0xa2e84d),requireExplicitYes(_0xa2e84d);const _0x586210=await buildCreatePlan(_0xa2e84d,![]),_0x2e9f7b=_0x586210[_0x533c2f(0x168)];await recheckMutationSnapshot(_0xa2e84d,_0x586210,_0x533c2f(0x15f));let _0x196e6e;try{_0x196e6e=await createMenuEntity(_0xa2e84d[_0x533c2f(0x152)],_0xa2e84d[_0x533c2f(0x163)],{'parentId':toApiParentId(_0x2e9f7b['parentId']),'label':String(_0x2e9f7b[_0x533c2f(0x14b)]),'type':_0x533c2f(0x16b),'visible':!![],'sort':Number(_0x2e9f7b[_0x533c2f(0x18f)]),'extend':{}});}catch(_0x96183c){const _0x709069=mapMenuApiError(_0x96183c,_0x533c2f(0x15f));throw menuFailure(_0x709069,_0x586210,{'stage':_0x533c2f(0x166),'failed':{}});}const _0xbd4ff0=Number(_0x196e6e['id']);if(!Number[_0x533c2f(0x164)](_0xbd4ff0)||_0xbd4ff0<=0x0){const _0x2640e2=menuError(_0x533c2f(0x169),_0x533c2f(0x176),_0x533c2f(0x149));throw menuFailure(_0x2640e2,_0x586210,{'stage':_0x533c2f(0x183),'failed':{'createdId':_0x196e6e['id']??null},'warnings':[_0x533c2f(0x17b)],'verification':{'status':_0x533c2f(0x15d),'lookupCommand':_0x533c2f(0x151)}});}const _0x263d7d=typeof _0x196e6e[_0x533c2f(0x160)]==='string'?_0x196e6e['path']:'';if(!_0x263d7d['trim']()){const _0x1815ec=menuError('menu_create_response_invalid',_0x533c2f(0x18c)+_0xbd4ff0+'\x20did\x20not\x20contain\x20a\x20non-empty\x20generated\x20path.',_0x533c2f(0x14f));throw menuFailure(_0x1815ec,_0x586210,{'stage':_0x533c2f(0x183),'succeeded':[{'id':_0xbd4ff0,'created':!![]}],'failed':{'id':_0xbd4ff0,'generatedPathConfirmed':![]},'warnings':[_0x533c2f(0x17e)+_0xbd4ff0+_0x533c2f(0x18d)],'after':{..._0x2e9f7b,'id':_0xbd4ff0,'path':_0x263d7d},'verification':{'status':_0x533c2f(0x15d),'lookupCommand':_0x533c2f(0x151),'targetId':_0xbd4ff0}});}let _0x1b255e;try{_0x1b255e=await fetchMenuSnapshot(_0xa2e84d[_0x533c2f(0x152)],_0xa2e84d[_0x533c2f(0x163)]);}catch(_0xf250be){const _0x2423a3=describeMenuErrorCause(_0xf250be,_0x533c2f(0x14d),_0xbd4ff0),_0x413295=asVerificationError(_0xf250be,'Folder\x20'+_0xbd4ff0+_0x533c2f(0x173));throw menuFailure(_0x413295,_0x586210,{'stage':'verification','succeeded':[{'id':_0xbd4ff0,'created':!![],'path':_0x263d7d}],'failed':{'id':_0xbd4ff0,'finalFactsConfirmed':![],..._0x2423a3},'warnings':['Folder\x20'+_0xbd4ff0+_0x533c2f(0x174)+JSON[_0x533c2f(0x153)](_0x263d7d)+';\x20verify\x20it\x20before\x20retrying.'],'after':{..._0x2e9f7b,'id':_0xbd4ff0,'path':_0x263d7d},'verification':{'status':'failed','lookupCommand':_0x533c2f(0x151),'targetId':_0xbd4ff0}});}const _0x311484=_0x1b255e[_0x533c2f(0x150)][_0x533c2f(0x15b)](_0xbd4ff0);let _0x84869e;try{assertVerified(Boolean(_0x311484),_0x533c2f(0x161)+_0xbd4ff0+'\x20is\x20missing\x20from\x20menu\x20list.'),_0x84869e=_0x311484,assertVerified(_0x84869e[_0x533c2f(0x179)]==='folder','Created\x20menu\x20'+_0xbd4ff0+'\x20is\x20not\x20type\x20folder.'),assertVerified(_0x84869e['label']===_0x2e9f7b[_0x533c2f(0x14b)],_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x167)),assertVerified(_0x84869e[_0x533c2f(0x160)]===_0x263d7d&&Boolean(_0x84869e['path'][_0x533c2f(0x190)]()),_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x17a)),assertVerified(_0x84869e[_0x533c2f(0x182)]===!![],'Created\x20folder\x20'+_0xbd4ff0+'\x20is\x20not\x20visible.'),assertVerified(_0x84869e[_0x533c2f(0x157)][_0x533c2f(0x17d)]===0x0,'Created\x20folder\x20'+_0xbd4ff0+_0x533c2f(0x181)),assertVerified(_0x84869e[_0x533c2f(0x189)]===0x0,_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x15a)),assertVerified(_0x84869e[_0x533c2f(0x18f)]===_0x2e9f7b[_0x533c2f(0x18f)],_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x15c)),assertVerified(_0x84869e['parentId']===_0x2e9f7b['parentId'],_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x158)+(_0x84869e[_0x533c2f(0x16d)]??_0x533c2f(0x186))+'.'),assertVerified(_0x84869e[_0x533c2f(0x162)]==null,_0x533c2f(0x161)+_0xbd4ff0+'\x20unexpectedly\x20owns\x20a\x20page.');const _0x149559=_0x84869e[_0x533c2f(0x16d)]==null?undefined:requireFolder(_0x1b255e,_0x84869e[_0x533c2f(0x16d)]);assertVerified(_0x84869e[_0x533c2f(0x16a)]===(_0x149559?_0x149559[_0x533c2f(0x16a)]+0x1:0x0),_0x533c2f(0x161)+_0xbd4ff0+_0x533c2f(0x184));}catch(_0x2adf66){const _0x38429d=describeMenuErrorCause(_0x2adf66,_0x533c2f(0x14d),_0xbd4ff0),_0x435358=asVerificationError(_0x2adf66,_0x533c2f(0x17e)+_0xbd4ff0+'\x20was\x20created\x20but\x20its\x20final\x20facts\x20violate\x20the\x20folder\x20contract');throw menuFailure(_0x435358,_0x586210,{'stage':_0x533c2f(0x16f),'succeeded':[{'id':_0xbd4ff0,'created':!![],'path':_0x263d7d}],'failed':{'id':_0xbd4ff0,'finalFactsConfirmed':![],..._0x38429d},'warnings':[_0x533c2f(0x17e)+_0xbd4ff0+_0x533c2f(0x154)],'after':_0x311484??{..._0x2e9f7b,'id':_0xbd4ff0,'path':_0x263d7d},'verification':{'status':'failed','lookupCommand':_0x533c2f(0x151),'targetId':_0xbd4ff0}});}const _0x2ef576=mutationResult({..._0x586210,'after':_0x84869e,'dryRun':![],'succeeded':[{'id':_0xbd4ff0,'type':_0x533c2f(0x16b),'path':_0x263d7d}],'verification':{'checkedBy':_0x533c2f(0x180),'snapshotHash':_0x1b255e[_0x533c2f(0x171)],'folder':!![],'path':_0x263d7d,'emptyResources':!![]}});return{'ok':!![],'data':_0x2ef576,'message':_0x533c2f(0x155)+_0xbd4ff0+'.'};}};function validateCreateInput(_0x2bdc09){const _0x47da07=a103_0x314f33,_0x5a374d=_0x2bdc09[_0x47da07(0x159)](_0x47da07(0x14b))['trim']();if(!_0x5a374d)throw CliErrors[_0x47da07(0x188)](_0x47da07(0x14b));parseParentId(_0x2bdc09,_0x47da07(0x172)),validateSort(_0x2bdc09);}async function buildCreatePlan(_0x44572b,_0x3d9af2){const _0x55838a=a103_0x314f33,_0x5b3496=await fetchMutationSnapshot(_0x44572b,_0x55838a(0x15f)),_0x3fe549=parseParentId(_0x44572b,'parent-id')??null;if(_0x3fe549!=null)requireFolder(_0x5b3496,_0x3fe549);const _0x36c900=validateSort(_0x44572b),_0x57ff15=_0x36c900??nextSiblingSort(_0x5b3496,_0x3fe549,_0x55838a(0x16b)),_0x4fc3b7=_0x44572b[_0x55838a(0x159)](_0x55838a(0x14b))[_0x55838a(0x190)]();return mutationResult({'operation':_0x55838a(0x14e),'selector':{'label':_0x4fc3b7,'parentId':_0x3fe549},'before':null,'after':{'id':null,'parentId':_0x3fe549,'label':_0x4fc3b7,'path':_0x55838a(0x18b),'type':_0x55838a(0x16b),'visible':!![],'sort':_0x57ff15,'resources':[],'childrenIds':[],'childrenCount':0x0},'dryRun':_0x3d9af2,'backend':[...BACKEND],'plannedActions':[{'stage':_0x55838a(0x187),'method':'POST','path':_0x55838a(0x175),'body':{'parentId':toApiParentId(_0x3fe549),'label':_0x4fc3b7,'type':_0x55838a(0x16b),'visible':!![],'sort':_0x57ff15,'extend':{}}}],'snapshotHash':_0x5b3496[_0x55838a(0x171)],'warnings':['The\x20platform\x20assigns\x20the\x20folder\x20a\x20non-empty\x20path\x20used\x20by\x20menu\x20routing\x20and\x20keys.']});}