@lovrabet/rabetbase-cli 2.3.15 → 2.3.16-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +7 -2
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -0
  103. package/lib/commands/kb/delete.js +1 -0
  104. package/lib/commands/kb/detail.js +1 -0
  105. package/lib/commands/kb/index.js +1 -0
  106. package/lib/commands/kb/list.js +1 -0
  107. package/lib/commands/kb/shared.js +1 -0
  108. package/lib/commands/kb/update.js +1 -0
  109. package/lib/commands/logs/index.js +1 -1
  110. package/lib/commands/menu/asset-update.js +1 -1
  111. package/lib/commands/menu/delete.js +1 -1
  112. package/lib/commands/menu/external-link-create.js +1 -1
  113. package/lib/commands/menu/external-link-update.js +1 -1
  114. package/lib/commands/menu/group-create.js +1 -1
  115. package/lib/commands/menu/group-update.js +1 -1
  116. package/lib/commands/menu/index.js +1 -1
  117. package/lib/commands/menu/list.js +1 -1
  118. package/lib/commands/menu/move.js +1 -1
  119. package/lib/commands/menu/regroup-start.js +1 -1
  120. package/lib/commands/menu/rename.js +1 -1
  121. package/lib/commands/menu/shared/compare-table.js +1 -1
  122. package/lib/commands/menu/shared/delete-plan.js +1 -1
  123. package/lib/commands/menu/shared/facts.js +1 -1
  124. package/lib/commands/menu/shared/index.js +1 -1
  125. package/lib/commands/menu/shared/inquirer.js +1 -1
  126. package/lib/commands/menu/shared/local-pages.js +1 -1
  127. package/lib/commands/menu/shared/logic.js +1 -1
  128. package/lib/commands/menu/shared/mutations.js +1 -1
  129. package/lib/commands/menu/shared/service.js +1 -1
  130. package/lib/commands/menu/shared/sync-core.js +1 -1
  131. package/lib/commands/menu/shared/update-core.js +1 -1
  132. package/lib/commands/menu/shared/valid-url.js +1 -1
  133. package/lib/commands/menu/sync.js +1 -1
  134. package/lib/commands/notification/config-list.js +1 -1
  135. package/lib/commands/notification/index.js +1 -1
  136. package/lib/commands/ocr/index.js +1 -1
  137. package/lib/commands/page/generate-start.js +1 -1
  138. package/lib/commands/page/generate-status.js +1 -1
  139. package/lib/commands/page/index.js +1 -1
  140. package/lib/commands/page/pull.js +1 -1
  141. package/lib/commands/page/push.js +1 -1
  142. package/lib/commands/page/relation-audit.js +1 -1
  143. package/lib/commands/page/restore.js +1 -1
  144. package/lib/commands/page/shared.js +1 -1
  145. package/lib/commands/page/standard-page-status.js +1 -1
  146. package/lib/commands/page/sync.js +1 -1
  147. package/lib/commands/permit/index.js +1 -1
  148. package/lib/commands/permit/page-get.js +1 -1
  149. package/lib/commands/permit/page-set.js +1 -1
  150. package/lib/commands/permit/role-apis-set.js +1 -1
  151. package/lib/commands/permit/role-menus-set.js +1 -1
  152. package/lib/commands/permit/role-menus.js +1 -1
  153. package/lib/commands/permit/shared.js +1 -1
  154. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  155. package/lib/commands/project/create/format-elapsed.js +1 -1
  156. package/lib/commands/project/create/main.js +1 -1
  157. package/lib/commands/project/create/non-interactive.js +1 -1
  158. package/lib/commands/project/create/project-template-path.js +1 -1
  159. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  160. package/lib/commands/project/create/use-format-code.js +1 -1
  161. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  162. package/lib/commands/project/index.js +1 -1
  163. package/lib/commands/project/init.js +1 -1
  164. package/lib/commands/project/upgrade.js +1 -1
  165. package/lib/commands/registry.js +1 -1
  166. package/lib/commands/role/create.js +1 -1
  167. package/lib/commands/role/delete.js +1 -1
  168. package/lib/commands/role/detail.js +1 -1
  169. package/lib/commands/role/index.js +1 -1
  170. package/lib/commands/role/list.js +1 -1
  171. package/lib/commands/role/shared.js +1 -1
  172. package/lib/commands/role/update.js +1 -1
  173. package/lib/commands/role/user-add.js +1 -1
  174. package/lib/commands/role/user-remove.js +1 -1
  175. package/lib/commands/role/user-resolve.js +1 -1
  176. package/lib/commands/run/index.js +1 -1
  177. package/lib/commands/schema.js +1 -1
  178. package/lib/commands/sql/create.js +1 -1
  179. package/lib/commands/sql/delete.js +1 -1
  180. package/lib/commands/sql/detail.js +1 -1
  181. package/lib/commands/sql/exec.js +1 -1
  182. package/lib/commands/sql/index.js +1 -1
  183. package/lib/commands/sql/list.js +1 -1
  184. package/lib/commands/sql/pull.js +1 -1
  185. package/lib/commands/sql/push.js +1 -1
  186. package/lib/commands/sql/save.js +1 -1
  187. package/lib/commands/sql/shared.js +1 -1
  188. package/lib/commands/sql/status.js +1 -1
  189. package/lib/commands/sql/validate.js +1 -1
  190. package/lib/commands/task/index.js +1 -1
  191. package/lib/commands/task/status.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -0
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
@@ -1 +1 @@
1
- const a92_0x31ce41=a92_0x58d5;(function(_0x74bd3e,_0x43181a){const _0x3fb459=a92_0x58d5,_0x26f27a=_0x74bd3e();while(!![]){try{const _0x228b22=parseInt(_0x3fb459(0x1bc))/0x1+-parseInt(_0x3fb459(0x1b5))/0x2*(parseInt(_0x3fb459(0x1a2))/0x3)+parseInt(_0x3fb459(0x1a1))/0x4+-parseInt(_0x3fb459(0x1a5))/0x5+parseInt(_0x3fb459(0x1b0))/0x6*(-parseInt(_0x3fb459(0x1c2))/0x7)+parseInt(_0x3fb459(0x1b3))/0x8+parseInt(_0x3fb459(0x19e))/0x9;if(_0x228b22===_0x43181a)break;else _0x26f27a['push'](_0x26f27a['shift']());}catch(_0x997914){_0x26f27a['push'](_0x26f27a['shift']());}}}(a92_0x29bb,0xc4a45));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a92_0x58d5(_0x56c6ba,_0x24063f){_0x56c6ba=_0x56c6ba-0x19b;const _0x29bbc3=a92_0x29bb();let _0x58d5d6=_0x29bbc3[_0x56c6ba];return _0x58d5d6;}const MASKED_PASSWORD_VALUES=new Set([a92_0x31ce41(0x1a6),a92_0x31ce41(0x1a3)]);function a92_0x29bb(){const _0x3b115f=['dbdesc','dbDesc','POST','dbParam','trim','New\x20host:port','string','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','New\x20database\x20name','552MFagjR','username','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','9390112QlUJjH','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','14KKoDsB','dbparam','password','str','Updated\x20db\x20link\x20','write','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','257887WcWxLh','has','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','dbName','validation','New\x20connection\x20parameter\x20string','106078MJyYgC','dbname','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','num','24751296ehmNuS','dbUrl','dburl','2246744MZTAof','475713HvlDfF','[redacted]','New\x20description','7169355jJcJMj','******'];a92_0x29bb=function(){return _0x3b115f;};return a92_0x29bb();}function mergeDbLinkUpdate(_0x531a8d,_0x3c23b5){const _0x338af7=a92_0x31ce41,_0x1a1e32={..._0x531a8d},_0x5477af=_0x3c23b5[_0x338af7(0x1b8)](_0x338af7(0x1b7));if(_0x5477af&&MASKED_PASSWORD_VALUES[_0x338af7(0x1bd)](_0x5477af))throw CliErrors[_0x338af7(0x1c0)](_0x338af7(0x1bb));if(!_0x5477af&&MASKED_PASSWORD_VALUES[_0x338af7(0x1bd)](String(_0x531a8d[_0x338af7(0x1b7)]??'')))throw CliErrors['validation'](_0x338af7(0x1b4));const _0x45df74=_0x3c23b5[_0x338af7(0x1b8)](_0x338af7(0x19b));if(_0x45df74)_0x1a1e32[_0x338af7(0x1bf)]=_0x45df74;const _0x5de0ce=_0x3c23b5[_0x338af7(0x1b8)](_0x338af7(0x1a0));if(_0x5de0ce)_0x1a1e32[_0x338af7(0x19f)]=_0x5de0ce['trim']();const _0x934171=_0x3c23b5[_0x338af7(0x1b8)]('username');if(_0x934171)_0x1a1e32[_0x338af7(0x1b1)]=_0x934171;if(_0x5477af)_0x1a1e32['password']=_0x5477af;const _0x455be1=_0x3c23b5[_0x338af7(0x1b8)](_0x338af7(0x1b6));if(_0x455be1)_0x1a1e32[_0x338af7(0x1aa)]=_0x455be1;const _0x594de4=_0x3c23b5[_0x338af7(0x1b8)](_0x338af7(0x1a7));if(_0x594de4)_0x1a1e32[_0x338af7(0x1a8)]=_0x594de4;return _0x1a1e32;}export const dbUpdate={'service':'db','command':'update','description':a92_0x31ce41(0x1b2),'risk':a92_0x31ce41(0x1ba),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x31ce41(0x19b),'type':a92_0x31ce41(0x1ad),'description':a92_0x31ce41(0x1af)},{'name':a92_0x31ce41(0x1a0),'type':a92_0x31ce41(0x1ad),'description':a92_0x31ce41(0x1ac)},{'name':a92_0x31ce41(0x1b1),'type':a92_0x31ce41(0x1ad),'description':'New\x20username'},{'name':a92_0x31ce41(0x1b7),'type':a92_0x31ce41(0x1ad),'description':a92_0x31ce41(0x1ae)},{'name':a92_0x31ce41(0x1b6),'type':a92_0x31ce41(0x1ad),'description':a92_0x31ce41(0x1c1)},{'name':a92_0x31ce41(0x1a7),'type':'string','description':a92_0x31ce41(0x1a4)}],async 'validate'(_0x26293e){const _0x4836f7=a92_0x31ce41,_0x1c618e=_0x26293e[_0x4836f7(0x1b8)]('dburl');if(_0x1c618e&&!validateDbUrl(_0x1c618e[_0x4836f7(0x1ab)]()))throw CliErrors[_0x4836f7(0x1c0)](_0x4836f7(0x19c)+_0x1c618e+'\x22');},async 'dryRun'(_0x27dac9){const _0x54bad7=a92_0x31ce41,_0x53e22f=_0x27dac9[_0x54bad7(0x19d)]('id'),_0x3f6d7f=await getDbLinkInfo(_0x53e22f),_0x5086b5=mergeDbLinkUpdate(_0x3f6d7f,_0x27dac9),_0x5d5361=sanitizeDbLinkForOutput(_0x5086b5);return{'method':_0x54bad7(0x1a9),'url':'/smartapi/dblink/update','body':_0x5d5361,'description':_0x54bad7(0x1be)};},async 'execute'(_0x3532e6){const _0x29f3a4=a92_0x31ce41,_0x535f56=_0x3532e6[_0x29f3a4(0x19d)]('id'),_0x2d5b28=await getDbLinkInfo(_0x535f56),_0x157d43=mergeDbLinkUpdate(_0x2d5b28,_0x3532e6),{id:_0x395c8c,entity:_0x1dd0cc}=normalizeEntityWithIdResponse(await updateDbLink(_0x157d43));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1dd0cc),'message':_0x29f3a4(0x1b9)+(_0x395c8c??_0x535f56)};}};
1
+ const a92_0x1a6d15=a92_0x4888;function a92_0x4888(_0x3180c6,_0x144f02){_0x3180c6=_0x3180c6-0xf3;const _0x2defc2=a92_0x2def();let _0x48881c=_0x2defc2[_0x3180c6];return _0x48881c;}(function(_0x381c18,_0x509ea4){const _0x507d10=a92_0x4888,_0x171007=_0x381c18();while(!![]){try{const _0x466bab=-parseInt(_0x507d10(0x115))/0x1+parseInt(_0x507d10(0xf5))/0x2+parseInt(_0x507d10(0xf7))/0x3+parseInt(_0x507d10(0xf4))/0x4+parseInt(_0x507d10(0x119))/0x5*(parseInt(_0x507d10(0xf9))/0x6)+-parseInt(_0x507d10(0xf6))/0x7+-parseInt(_0x507d10(0x105))/0x8*(parseInt(_0x507d10(0xff))/0x9);if(_0x466bab===_0x509ea4)break;else _0x171007['push'](_0x171007['shift']());}catch(_0x291f95){_0x171007['push'](_0x171007['shift']());}}}(a92_0x2def,0x93740));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a92_0x1a6d15(0x11b),a92_0x1a6d15(0xfe)]);function a92_0x2def(){const _0x1837ae=['username','dbUrl','355gQQfAV','dbName','******','dbname','218296mqGzBl','1795966TdPEYs','1925161leKOjZ','2736936mxfORB','str','8034RRbkpA','num','password','trim','has','[redacted]','4392JERQrt','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dbDesc','New\x20connection\x20parameter\x20string','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','string','352FTqtVK','update','Updated\x20db\x20link\x20','dbParam','dbparam','New\x20username','validation','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','dbdesc','dburl','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','/smartapi/dblink/update','POST','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','New\x20database\x20name','New\x20description','1059475haxNJu','write'];a92_0x2def=function(){return _0x1837ae;};return a92_0x2def();}function mergeDbLinkUpdate(_0x44543b,_0x16479d){const _0x12d426=a92_0x1a6d15,_0x1c361a={..._0x44543b},_0x3aefc1=_0x16479d[_0x12d426(0xf8)](_0x12d426(0xfb));if(_0x3aefc1&&MASKED_PASSWORD_VALUES[_0x12d426(0xfd)](_0x3aefc1))throw CliErrors[_0x12d426(0x10b)](_0x12d426(0x10c));if(!_0x3aefc1&&MASKED_PASSWORD_VALUES[_0x12d426(0xfd)](String(_0x44543b[_0x12d426(0xfb)]??'')))throw CliErrors[_0x12d426(0x10b)](_0x12d426(0x100));const _0x40bb9a=_0x16479d[_0x12d426(0xf8)](_0x12d426(0xf3));if(_0x40bb9a)_0x1c361a[_0x12d426(0x11a)]=_0x40bb9a;const _0xecee0c=_0x16479d[_0x12d426(0xf8)](_0x12d426(0x10e));if(_0xecee0c)_0x1c361a[_0x12d426(0x118)]=_0xecee0c[_0x12d426(0xfc)]();const _0x2a1630=_0x16479d[_0x12d426(0xf8)](_0x12d426(0x117));if(_0x2a1630)_0x1c361a['username']=_0x2a1630;if(_0x3aefc1)_0x1c361a['password']=_0x3aefc1;const _0x48e74b=_0x16479d[_0x12d426(0xf8)](_0x12d426(0x109));if(_0x48e74b)_0x1c361a[_0x12d426(0x108)]=_0x48e74b;const _0x5981ec=_0x16479d[_0x12d426(0xf8)](_0x12d426(0x10d));if(_0x5981ec)_0x1c361a[_0x12d426(0x101)]=_0x5981ec;return _0x1c361a;}export const dbUpdate={'service':'db','command':a92_0x1a6d15(0x106),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a92_0x1a6d15(0x116),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x1a6d15(0xf3),'type':'string','description':a92_0x1a6d15(0x113)},{'name':'dburl','type':a92_0x1a6d15(0x104),'description':'New\x20host:port'},{'name':a92_0x1a6d15(0x117),'type':a92_0x1a6d15(0x104),'description':a92_0x1a6d15(0x10a)},{'name':a92_0x1a6d15(0xfb),'type':a92_0x1a6d15(0x104),'description':a92_0x1a6d15(0x10f)},{'name':a92_0x1a6d15(0x109),'type':a92_0x1a6d15(0x104),'description':a92_0x1a6d15(0x102)},{'name':a92_0x1a6d15(0x10d),'type':a92_0x1a6d15(0x104),'description':a92_0x1a6d15(0x114)}],async 'validate'(_0x27fd25){const _0x3bf5f7=a92_0x1a6d15,_0x238c07=_0x27fd25[_0x3bf5f7(0xf8)](_0x3bf5f7(0x10e));if(_0x238c07&&!validateDbUrl(_0x238c07['trim']()))throw CliErrors[_0x3bf5f7(0x10b)](_0x3bf5f7(0x103)+_0x238c07+'\x22');},async 'dryRun'(_0x3307e4){const _0x4fc6ea=a92_0x1a6d15,_0x11d4a0=_0x3307e4[_0x4fc6ea(0xfa)]('id'),_0x2cef8f=await getDbLinkInfo(_0x11d4a0),_0x129a95=mergeDbLinkUpdate(_0x2cef8f,_0x3307e4),_0x163fbf=sanitizeDbLinkForOutput(_0x129a95);return{'method':_0x4fc6ea(0x111),'url':_0x4fc6ea(0x110),'body':_0x163fbf,'description':_0x4fc6ea(0x112)};},async 'execute'(_0x6c70de){const _0x5bfd84=a92_0x1a6d15,_0x4770c7=_0x6c70de['num']('id'),_0x1d43a4=await getDbLinkInfo(_0x4770c7),_0x2b0672=mergeDbLinkUpdate(_0x1d43a4,_0x6c70de),{id:_0x49d1d3,entity:_0x4c0a22}=normalizeEntityWithIdResponse(await updateDbLink(_0x2b0672));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x4c0a22),'message':_0x5bfd84(0x107)+(_0x49d1d3??_0x4770c7)};}};
@@ -1 +1 @@
1
- const a93_0x254dd0=a93_0x27ba;(function(_0xb54593,_0x34b546){const _0x271dc5=a93_0x27ba,_0x3d13bb=_0xb54593();while(!![]){try{const _0x2395c8=-parseInt(_0x271dc5(0x147))/0x1+parseInt(_0x271dc5(0x138))/0x2*(-parseInt(_0x271dc5(0x155))/0x3)+parseInt(_0x271dc5(0x164))/0x4*(parseInt(_0x271dc5(0x14a))/0x5)+parseInt(_0x271dc5(0x152))/0x6*(parseInt(_0x271dc5(0x118))/0x7)+-parseInt(_0x271dc5(0x145))/0x8*(parseInt(_0x271dc5(0x134))/0x9)+parseInt(_0x271dc5(0x15d))/0xa*(parseInt(_0x271dc5(0x117))/0xb)+parseInt(_0x271dc5(0x128))/0xc;if(_0x2395c8===_0x34b546)break;else _0x3d13bb['push'](_0x3d13bb['shift']());}catch(_0xbfc6a2){_0x3d13bb['push'](_0x3d13bb['shift']());}}}(a93_0x3ddc,0x63366));import a93_0x424eaa 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';function a93_0x27ba(_0x21d625,_0x5a2e03){_0x21d625=_0x21d625-0x113;const _0x3ddc53=a93_0x3ddc();let _0x27bae8=_0x3ddc53[_0x21d625];return _0x27bae8;}function a93_0x3ddc(){const _0x3cb8f1=['Global','version','apps','bold','value','log','red','\x20\x20Apps','2276364AOjVyx','raw','apiDir','currentApp','✗\x20Expired','read','status','yellow','keys','defaultApp','cookie','accessKey','12510BlSBJu','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20API\x20Endpoints','4mxwBkK','\x20\x20Auth','platform','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','format','arch','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','doctor','green','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','(default)','2152hotESH','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','572139YjvoeM','\x20\x20explicitAppName:\x20','verbose','85EimGrG','appCode','(not\x20set)','(no\x20file)','\x20\x20Config\x20JSON','✓\x20Valid\x20JSON','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','54wUxoPm','\x20\x20runtimeDomain:\x20\x20\x20','✗\x20Invalid\x20JSON','74973NBoQNa','length','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','env','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','✓\x20Valid','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','20OCmvYK','✗\x20Not\x20logged\x20in','(none)','\x20\x20Merged\x20Config','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','appcode','31148ejrBvy','source','pageSize','repeat','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','message','gray','padEnd','2405678cqZrxU','500059xtXYla','explicitAppName','\x20\x20─','Project','(set\x20via\x20file,\x20length=','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'];a93_0x3ddc=function(){return _0x3cb8f1;};return a93_0x3ddc();}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(_0x9aeeea){const _0x1b5343=a93_0x27ba,_0x547809=GIT_COMMIT!==_0x1b5343(0x136)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0xbea44=buildConfigFromFlags({}),_0x19c991=getCookie();console['log'](),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x123)](CLI_BIN_NAME+_0x1b5343(0x13c))),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x115)]('─'[_0x1b5343(0x167)](0x32))),console[_0x1b5343(0x125)](_0x1b5343(0x15c)+_0x547809),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x1b5343(0x121)]),console['log'](_0x1b5343(0x15b)+process[_0x1b5343(0x13a)]+'\x20'+process[_0x1b5343(0x13e)]),console['log'](),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x123)](_0x1b5343(0x113))),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x11a)[_0x1b5343(0x167)](0x1e)));const _0x3396da=getGlobalConfigPath(),_0x20b73b=getProjectConfigPath();console['log'](_0x1b5343(0x161)+(_0x3396da||a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x11e)))),console[_0x1b5343(0x125)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x20b73b||a93_0x424eaa['gray'](_0x1b5343(0x11e)))),console['log'](),console['log'](a93_0x424eaa[_0x1b5343(0x123)](_0x1b5343(0x14e))),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x115)]('\x20\x20─'[_0x1b5343(0x167)](0x1e)));const _0x3887dd=(_0x31b4a6,_0x48a0a8)=>{const _0xf9ffe7=_0x1b5343;if(!_0x48a0a8){console[_0xf9ffe7(0x125)]('\x20\x20'+_0x31b4a6['padEnd'](0x11)+'\x20'+a93_0x424eaa['gray'](_0xf9ffe7(0x14d)));return;}const _0x54118d=inspectCliConfigJsonFile(_0x48a0a8);if(_0x54118d[_0xf9ffe7(0x12e)]==='ok')console[_0xf9ffe7(0x125)]('\x20\x20'+_0x31b4a6['padEnd'](0x11)+'\x20'+a93_0x424eaa[_0xf9ffe7(0x141)](_0xf9ffe7(0x14f)));else{if(_0x54118d[_0xf9ffe7(0x12e)]==='empty')console['log']('\x20\x20'+_0x31b4a6[_0xf9ffe7(0x116)](0x11)+'\x20'+a93_0x424eaa[_0xf9ffe7(0x12f)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x54118d[_0xf9ffe7(0x12e)]==='missing'?console[_0xf9ffe7(0x125)]('\x20\x20'+_0x31b4a6[_0xf9ffe7(0x116)](0x11)+'\x20'+a93_0x424eaa[_0xf9ffe7(0x115)]('(missing)')):(console['log']('\x20\x20'+_0x31b4a6['padEnd'](0x11)+'\x20'+a93_0x424eaa[_0xf9ffe7(0x126)](_0xf9ffe7(0x154))),console[_0xf9ffe7(0x125)]('\x20\x20'+''[_0xf9ffe7(0x116)](0x11)+'\x20'+a93_0x424eaa[_0xf9ffe7(0x126)](_0x54118d[_0xf9ffe7(0x114)])));}};_0x3887dd(_0x1b5343(0x120),_0x3396da),_0x3887dd(_0x1b5343(0x11b),_0x20b73b),console[_0x1b5343(0x125)](),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x123)](_0x1b5343(0x160))),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x11a)['repeat'](0x1e))),console['log'](_0x1b5343(0x13b)+(_0xbea44[_0x1b5343(0x14b)]||a93_0x424eaa['red'](_0x1b5343(0x14c)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xbea44[_0x1b5343(0x158)]),console['log']('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xbea44['locale']),console[_0x1b5343(0x125)](_0x1b5343(0x146)+_0xbea44['apiDir']),console[_0x1b5343(0x125)](_0x1b5343(0x159)+(_0xbea44[_0x1b5343(0x131)]||a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x15f)))),console[_0x1b5343(0x125)](_0x1b5343(0x157)+(_0xbea44['currentApp']||a93_0x424eaa[_0x1b5343(0x115)]('(none)'))),console['log'](_0x1b5343(0x148)+(_0xbea44[_0x1b5343(0x119)]||a93_0x424eaa[_0x1b5343(0x115)]('(none)'))),console[_0x1b5343(0x125)](_0x1b5343(0x168)+(_0xbea44[_0x1b5343(0x13d)]||a93_0x424eaa[_0x1b5343(0x115)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x1b5343(0x13d)]+')'))),console[_0x1b5343(0x125)](_0x1b5343(0x11f)+(_0xbea44[_0x1b5343(0x166)]??a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x144)))),console[_0x1b5343(0x125)](_0x1b5343(0x135)+_0xbea44['riskLevel']),console[_0x1b5343(0x125)](_0x1b5343(0x11d)+_0xbea44[_0x1b5343(0x149)]),console[_0x1b5343(0x125)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xbea44[_0x1b5343(0x132)]?a93_0x424eaa[_0x1b5343(0x141)](_0x1b5343(0x143)+_0xbea44['cookie'][_0x1b5343(0x156)]+')'):_0x19c991?a93_0x424eaa[_0x1b5343(0x141)](_0x1b5343(0x11c)+_0x19c991[_0x1b5343(0x156)]+')'):a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x15f))));const _0x5d2d2c=Object[_0x1b5343(0x130)](_0xbea44[_0x1b5343(0x122)]);if(_0x5d2d2c['length']>0x0){console[_0x1b5343(0x125)](),console[_0x1b5343(0x125)](a93_0x424eaa['bold'](_0x1b5343(0x127))),console[_0x1b5343(0x125)](a93_0x424eaa['gray'](_0x1b5343(0x11a)[_0x1b5343(0x167)](0x1e)));for(const _0x1ff71f of _0x5d2d2c){const _0x477e12=_0xbea44[_0x1b5343(0x122)][_0x1ff71f],_0x129fee=_0x1ff71f===_0xbea44[_0x1b5343(0x131)],_0x4099a6=_0x1ff71f===_0xbea44[_0x1b5343(0x12b)],_0x2a68dd=_0x4099a6?a93_0x424eaa[_0x1b5343(0x141)]('\x20←\x20current'):'',_0x265cec=_0x129fee?'\x20(default)':'';console[_0x1b5343(0x125)]('\x20\x20'+_0x1ff71f+_0x265cec+_0x2a68dd),console[_0x1b5343(0x125)](_0x1b5343(0x150)+_0x477e12[_0x1b5343(0x163)]);const _0x25c2ce=buildAppDoctorFields(_0x477e12,{'env':_0xbea44[_0x1b5343(0x158)],'apiDir':_0xbea44[_0x1b5343(0x129)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x1b5343(0x12a)],'cookie':_0xbea44['cookie']||_0x19c991||undefined,'accessKey':_0xbea44[_0x1b5343(0x133)]});console[_0x1b5343(0x125)](_0x1b5343(0x142)+_0x25c2ce[_0x1b5343(0x158)]['value']+'\x20\x20'+a93_0x424eaa['gray']('('+_0x25c2ce[_0x1b5343(0x158)][_0x1b5343(0x165)]+')')),console[_0x1b5343(0x125)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x25c2ce['apiDir']['value']+'\x20\x20'+a93_0x424eaa[_0x1b5343(0x115)]('('+_0x25c2ce[_0x1b5343(0x12a)][_0x1b5343(0x165)]+')'));const _0x549496=_0x25c2ce[_0x1b5343(0x132)][_0x1b5343(0x124)]?a93_0x424eaa[_0x1b5343(0x141)]('(set,\x20length='+_0x25c2ce['cookie']['value']['length']+')'):a93_0x424eaa['gray']('(none)');console[_0x1b5343(0x125)](_0x1b5343(0x13f)+_0x549496+'\x20\x20'+a93_0x424eaa['gray']('('+_0x25c2ce['cookie'][_0x1b5343(0x165)]+')'));const _0x447255=_0x25c2ce[_0x1b5343(0x133)][_0x1b5343(0x124)]?a93_0x424eaa[_0x1b5343(0x141)]('(set,\x20length='+_0x25c2ce[_0x1b5343(0x133)]['value'][_0x1b5343(0x156)]+')'):a93_0x424eaa[_0x1b5343(0x115)](_0x1b5343(0x15f));console['log'](_0x1b5343(0x162)+_0x447255+'\x20\x20'+a93_0x424eaa[_0x1b5343(0x115)]('('+_0x25c2ce[_0x1b5343(0x133)][_0x1b5343(0x165)]+')'));}}console[_0x1b5343(0x125)](),console['log'](a93_0x424eaa[_0x1b5343(0x123)](_0x1b5343(0x137))),console[_0x1b5343(0x125)](a93_0x424eaa['gray'](_0x1b5343(0x11a)[_0x1b5343(0x167)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x1b5343(0x125)](_0x1b5343(0x153)+getRuntimeDomain()),console[_0x1b5343(0x125)](),console[_0x1b5343(0x125)](a93_0x424eaa[_0x1b5343(0x123)](_0x1b5343(0x139))),console[_0x1b5343(0x125)](a93_0x424eaa['gray'](_0x1b5343(0x11a)[_0x1b5343(0x167)](0x1e)));if(_0x19c991){const _0x1f98d3=await getIsSessionValid();console[_0x1b5343(0x125)](_0x1b5343(0x151)+(_0x1f98d3?a93_0x424eaa[_0x1b5343(0x141)](_0x1b5343(0x15a)):a93_0x424eaa[_0x1b5343(0x126)](_0x1b5343(0x12c))));}else console[_0x1b5343(0x125)](_0x1b5343(0x151)+a93_0x424eaa[_0x1b5343(0x126)](_0x1b5343(0x15e)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x254dd0(0x140),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','risk':a93_0x254dd0(0x12d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a93_0x1f1174=a93_0x5e5b;function a93_0x1288(){const _0x7743c2=['\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','\x20\x20Config\x20JSON','\x20\x20API\x20Endpoints','cookie','riskLevel','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','(missing)','✗\x20Expired','10nKoAGq','\x20doctor','Project','Global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','695048VlbFnn','keys','apiDir','18215zRYKeb','empty','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','pageSize','3447189NAZzOi','appCode','gray','accessKey','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','value','(default)','903304IgYFYB','✓\x20Valid','\x20\x20Auth','locale','padEnd','apps','red','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','env','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','check','yellow','✓\x20Valid\x20JSON','\x20\x20explicitAppName:\x20','version','appcode','1552002IAuEJZ','length','✗\x20Invalid\x20JSON','558098quTKBJ','1233594HgMXOk','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','204kFhycI','(not\x20set)','bold','\x20\x20\x20\x20accessKey:\x20\x20','read','defaultApp','(none)','format','unknown','\x20\x20Apps','source','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(set,\x20length=','status','(default:\x20','repeat','⚠\x20Empty\x20(treated\x20as\x20{})','✗\x20Not\x20logged\x20in','log','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','14dhgSlc'];a93_0x1288=function(){return _0x7743c2;};return a93_0x1288();}(function(_0x47fb64,_0x455b9a){const _0x4a9828=a93_0x5e5b,_0x5b5357=_0x47fb64();while(!![]){try{const _0x378ef5=-parseInt(_0x4a9828(0xdc))/0x1+parseInt(_0x4a9828(0xb1))/0x2+-parseInt(_0x4a9828(0xd9))/0x3+parseInt(_0x4a9828(0xdf))/0x4*(parseInt(_0x4a9828(0xb4))/0x5)+parseInt(_0x4a9828(0xdd))/0x6*(parseInt(_0x4a9828(0xf3))/0x7)+parseInt(_0x4a9828(0xc3))/0x8+parseInt(_0x4a9828(0xbb))/0x9*(parseInt(_0x4a9828(0xac))/0xa);if(_0x378ef5===_0x455b9a)break;else _0x5b5357['push'](_0x5b5357['shift']());}catch(_0x546f34){_0x5b5357['push'](_0x5b5357['shift']());}}}(a93_0x1288,0x591d9));import a93_0x15e3ae from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a93_0x5e5b(_0x249d6a,_0x446d06){_0x249d6a=_0x249d6a-0xaa;const _0x128822=a93_0x1288();let _0x5e5b70=_0x128822[_0x249d6a];return _0x5e5b70;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x217811){const _0x31d5b8=a93_0x5e5b,_0x20d556=GIT_COMMIT!==_0x31d5b8(0xe7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x3d612f=buildConfigFromFlags({}),_0x5e655e=getCookie();console['log'](),console['log'](a93_0x15e3ae['bold'](CLI_BIN_NAME+_0x31d5b8(0xad))),console[_0x31d5b8(0xf1)](a93_0x15e3ae['gray']('─'[_0x31d5b8(0xee)](0x32))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xea)+_0x20d556),console[_0x31d5b8(0xf1)](_0x31d5b8(0xce)+process[_0x31d5b8(0xd7)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process['arch']),console['log'](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)]('\x20\x20Config\x20Files')),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)[_0x31d5b8(0xee)](0x1e)));const _0x4d1d8d=getGlobalConfigPath(),_0x44bf6f=getProjectConfigPath();console[_0x31d5b8(0xf1)](_0x31d5b8(0xc0)+(_0x4d1d8d||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xfb)))),console['log'](_0x31d5b8(0xca)+(_0x44bf6f||a93_0x15e3ae['gray'](_0x31d5b8(0xfb)))),console[_0x31d5b8(0xf1)](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xf6))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)[_0x31d5b8(0xee)](0x1e)));const _0x40e240=(_0x3d959e,_0x3cf2ab)=>{const _0x3b015c=_0x31d5b8;if(!_0x3cf2ab){console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae['gray']('(no\x20file)'));return;}const _0x5cdf01=inspectCliConfigJsonFile(_0x3cf2ab);if(_0x5cdf01[_0x3b015c(0xec)]==='ok')console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xcf)](_0x3b015c(0xd5)));else{if(_0x5cdf01[_0x3b015c(0xec)]===_0x3b015c(0xb5))console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xd4)](_0x3b015c(0xef)));else _0x5cdf01['status']==='missing'?console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae['gray'](_0x3b015c(0xaa))):(console[_0x3b015c(0xf1)]('\x20\x20'+_0x3d959e['padEnd'](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xc9)](_0x3b015c(0xdb))),console[_0x3b015c(0xf1)]('\x20\x20'+''[_0x3b015c(0xc7)](0x11)+'\x20'+a93_0x15e3ae[_0x3b015c(0xc9)](_0x5cdf01['message'])));}};_0x40e240(_0x31d5b8(0xaf),_0x4d1d8d),_0x40e240(_0x31d5b8(0xae),_0x44bf6f),console['log'](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)]('\x20\x20Merged\x20Config')),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)]('\x20\x20─'[_0x31d5b8(0xee)](0x1e))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xb7)+(_0x3d612f[_0x31d5b8(0xbc)]||a93_0x15e3ae['red'](_0x31d5b8(0xe0)))),console[_0x31d5b8(0xf1)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f[_0x31d5b8(0xcd)]),console[_0x31d5b8(0xf1)](_0x31d5b8(0xd0)+_0x3d612f[_0x31d5b8(0xc6)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f[_0x31d5b8(0xb3)]),console[_0x31d5b8(0xf1)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x3d612f[_0x31d5b8(0xe4)]||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console['log']('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x3d612f['currentApp']||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xd6)+(_0x3d612f['explicitAppName']||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xfa)+(_0x3d612f[_0x31d5b8(0xe6)]||a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xed)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xbf)+(_0x3d612f[_0x31d5b8(0xba)]??a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xc2)))),console[_0x31d5b8(0xf1)](_0x31d5b8(0xde)+_0x3d612f[_0x31d5b8(0xf9)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d612f['verbose']),console[_0x31d5b8(0xf1)](_0x31d5b8(0xf4)+(_0x3d612f[_0x31d5b8(0xf8)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x3d612f[_0x31d5b8(0xf8)][_0x31d5b8(0xda)]+')'):_0x5e655e?a93_0x15e3ae[_0x31d5b8(0xcf)]('(set\x20via\x20file,\x20length='+_0x5e655e[_0x31d5b8(0xda)]+')'):a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5))));const _0x3bc063=Object[_0x31d5b8(0xb2)](_0x3d612f[_0x31d5b8(0xc8)]);if(_0x3bc063[_0x31d5b8(0xda)]>0x0){console[_0x31d5b8(0xf1)](),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xe8))),console[_0x31d5b8(0xf1)](a93_0x15e3ae['gray']('\x20\x20─'[_0x31d5b8(0xee)](0x1e)));for(const _0x328ed6 of _0x3bc063){const _0x1bc2e4=_0x3d612f['apps'][_0x328ed6],_0xf627b5=_0x328ed6===_0x3d612f[_0x31d5b8(0xe4)],_0xafefc2=_0x328ed6===_0x3d612f['currentApp'],_0x2a0234=_0xafefc2?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xcc)):'',_0xfb230e=_0xf627b5?'\x20(default)':'';console[_0x31d5b8(0xf1)]('\x20\x20'+_0x328ed6+_0xfb230e+_0x2a0234),console[_0x31d5b8(0xf1)](_0x31d5b8(0xb9)+_0x1bc2e4[_0x31d5b8(0xd8)]);const _0x25133a=buildAppDoctorFields(_0x1bc2e4,{'env':_0x3d612f[_0x31d5b8(0xcd)],'apiDir':_0x3d612f['raw'][_0x31d5b8(0xb3)]||DEFAULT_CONFIG_VALUES[_0x31d5b8(0xb3)],'cookie':_0x3d612f[_0x31d5b8(0xf8)]||_0x5e655e||undefined,'accessKey':_0x3d612f[_0x31d5b8(0xbe)]});console['log'](_0x31d5b8(0xb6)+_0x25133a[_0x31d5b8(0xcd)][_0x31d5b8(0xc1)]+'\x20\x20'+a93_0x15e3ae['gray']('('+_0x25133a[_0x31d5b8(0xcd)]['source']+')')),console['log'](_0x31d5b8(0xf2)+_0x25133a[_0x31d5b8(0xb3)][_0x31d5b8(0xc1)]+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xb3)][_0x31d5b8(0xe9)]+')'));const _0x19dfc8=_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xc1)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xc1)]['length']+')'):a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xe5));console['log'](_0x31d5b8(0xd1)+_0x19dfc8+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xf8)][_0x31d5b8(0xe9)]+')'));const _0x519f24=_0x25133a[_0x31d5b8(0xbe)][_0x31d5b8(0xc1)]?a93_0x15e3ae[_0x31d5b8(0xcf)](_0x31d5b8(0xeb)+_0x25133a[_0x31d5b8(0xbe)][_0x31d5b8(0xc1)][_0x31d5b8(0xda)]+')'):a93_0x15e3ae['gray'](_0x31d5b8(0xe5));console[_0x31d5b8(0xf1)](_0x31d5b8(0xe2)+_0x519f24+'\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xbd)]('('+_0x25133a[_0x31d5b8(0xbe)]['source']+')'));}}console[_0x31d5b8(0xf1)](),console['log'](a93_0x15e3ae[_0x31d5b8(0xe1)](_0x31d5b8(0xf7))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)]('\x20\x20─'[_0x31d5b8(0xee)](0x1e))),console[_0x31d5b8(0xf1)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x31d5b8(0xb0)+getUserDomain()),console[_0x31d5b8(0xf1)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console['log'](a93_0x15e3ae['bold'](_0x31d5b8(0xc5))),console[_0x31d5b8(0xf1)](a93_0x15e3ae[_0x31d5b8(0xbd)](_0x31d5b8(0xb8)['repeat'](0x1e)));if(_0x5e655e){const _0x1f7329=await getIsSessionValid();console[_0x31d5b8(0xf1)](_0x31d5b8(0xcb)+(_0x1f7329?a93_0x15e3ae['green'](_0x31d5b8(0xc4)):a93_0x15e3ae[_0x31d5b8(0xc9)](_0x31d5b8(0xab))));}else console[_0x31d5b8(0xf1)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a93_0x15e3ae[_0x31d5b8(0xc9)](_0x31d5b8(0xf0)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a93_0x1f1174(0xf5),'command':a93_0x1f1174(0xd3),'description':a93_0x1f1174(0xd2),'risk':a93_0x1f1174(0xe3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a94_0x115fb8=a94_0x3abc;(function(_0x248d8e,_0xb8b52){const _0x481c7d=a94_0x3abc,_0x653087=_0x248d8e();while(!![]){try{const _0x1fc4ad=parseInt(_0x481c7d(0x1f8))/0x1*(parseInt(_0x481c7d(0x1e6))/0x2)+parseInt(_0x481c7d(0x1e8))/0x3*(parseInt(_0x481c7d(0x1ed))/0x4)+-parseInt(_0x481c7d(0x1f9))/0x5+-parseInt(_0x481c7d(0x1eb))/0x6*(parseInt(_0x481c7d(0x1e3))/0x7)+parseInt(_0x481c7d(0x1e9))/0x8+-parseInt(_0x481c7d(0x1e0))/0x9*(parseInt(_0x481c7d(0x1dc))/0xa)+parseInt(_0x481c7d(0x1da))/0xb;if(_0x1fc4ad===_0xb8b52)break;else _0x653087['push'](_0x653087['shift']());}catch(_0x1f5ed9){_0x653087['push'](_0x653087['shift']());}}}(a94_0x2b95,0x2a31c));function a94_0x3abc(_0x2881f5,_0x1a083b){_0x2881f5=_0x2881f5-0x1d5;const _0x2b95f2=a94_0x2b95();let _0x3abcd2=_0x2b95f2[_0x2881f5];return _0x3abcd2;}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a94_0x115fb8(0x1f6),'type':a94_0x115fb8(0x1ec),'required':!![],'description':a94_0x115fb8(0x1f1)},FILEPATH_FLAG={'name':a94_0x115fb8(0x1d7),'type':'string','required':!![],'description':a94_0x115fb8(0x1f2)},DOWNLOAD_FLAG={'name':a94_0x115fb8(0x1d9),'type':a94_0x115fb8(0x1e4),'description':a94_0x115fb8(0x1de)},LONG_TERM_FLAG={'name':a94_0x115fb8(0x1ef),'type':a94_0x115fb8(0x1e4),'description':a94_0x115fb8(0x1f4)};function requireFilePath(_0x224120){const _0x483b26=a94_0x115fb8,_0x220c8d=_0x224120[_0x483b26(0x1f0)]();if(!_0x220c8d)throw CliErrors[_0x483b26(0x1dd)](_0x483b26(0x1d8));return _0x220c8d;}function a94_0x2b95(){const _0x3df061=['49290yQXUur','2035136zhRQYE','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','136098WdYlSW','string','84aPPWpW','/smartapi/common/uploadFile','long-term','trim','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','query-url','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','appCode','file','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','47EuBfGI','1707790afvNgs','upload','Uploaded\x20file:\x20','path','Preview:\x20upload\x20','read','File','filepath','filePath\x20is\x20required.','download','553421MWFdmI','filePath','10nhlfxx','validation','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','str','721647CBBzhC','bool','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','42VKUUeN','boolean','\x20to\x20development\x20app\x20','3444qpFeND','POST'];a94_0x2b95=function(){return _0x3df061;};return a94_0x2b95();}const fileUpload={'service':a94_0x115fb8(0x1f6),'command':a94_0x115fb8(0x1fa),'description':a94_0x115fb8(0x1f7),'risk':a94_0x115fb8(0x1d5),'flags':[FILE_FLAG],async 'dryRun'(_0x7c15d8){const _0x43470c=a94_0x115fb8,_0x40a818=requireDevelopmentUploadFile(_0x7c15d8[_0x43470c(0x1df)](_0x43470c(0x1f6)),_0x43470c(0x1d6));return{'method':_0x43470c(0x1e7),'url':_0x43470c(0x1ee),'body':{'appCode':_0x7c15d8['appCode'],'multipart':{'file':_0x40a818}},'description':_0x43470c(0x1fd)+_0x40a818[_0x43470c(0x1fc)]+_0x43470c(0x1e5)+_0x7c15d8[_0x43470c(0x1f5)]};},async 'execute'(_0x1127ca){const _0x274b07=a94_0x115fb8,_0x2e3dec=requireDevelopmentUploadFile(_0x1127ca[_0x274b07(0x1df)](_0x274b07(0x1f6)),'File'),_0x58cefd=await uploadDevelopmentFile(_0x1127ca['appCode'],_0x2e3dec['path']);return{'ok':!![],'data':_0x58cefd,'message':_0x58cefd[_0x274b07(0x1db)]?_0x274b07(0x1fb)+_0x58cefd[_0x274b07(0x1db)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x274b07(0x1ea)};}},fileQueryUrl={'service':'file','command':a94_0x115fb8(0x1f3),'description':a94_0x115fb8(0x1e2),'risk':a94_0x115fb8(0x1d5),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x13ad98){const _0x227288=a94_0x115fb8,_0x129bb7=requireFilePath(_0x13ad98[_0x227288(0x1df)](_0x227288(0x1d7))),_0x531040=await queryDevelopmentFileUrl(_0x129bb7,{'download':_0x13ad98[_0x227288(0x1e1)](_0x227288(0x1d9)),'longTerm':_0x13ad98['bool']('long-term')});return{'ok':!![],'data':_0x531040};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a94_0x970f54=a94_0x55f2;(function(_0x4937bc,_0x742b42){const _0x2de7e8=a94_0x55f2,_0x2b383e=_0x4937bc();while(!![]){try{const _0x37a91f=-parseInt(_0x2de7e8(0xe5))/0x1+-parseInt(_0x2de7e8(0xda))/0x2*(-parseInt(_0x2de7e8(0xe7))/0x3)+parseInt(_0x2de7e8(0xe0))/0x4*(parseInt(_0x2de7e8(0xd9))/0x5)+parseInt(_0x2de7e8(0xf1))/0x6*(-parseInt(_0x2de7e8(0xec))/0x7)+-parseInt(_0x2de7e8(0xd5))/0x8+-parseInt(_0x2de7e8(0xdb))/0x9+parseInt(_0x2de7e8(0xe2))/0xa;if(_0x37a91f===_0x742b42)break;else _0x2b383e['push'](_0x2b383e['shift']());}catch(_0x4c6549){_0x2b383e['push'](_0x2b383e['shift']());}}}(a94_0x231a,0x2f876));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a94_0x231a(){const _0x2dc831=['Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','POST','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','273ogAfGM','Preview:\x20upload\x20','filePath\x20is\x20required.','/smartapi/common/uploadFile','bool','51558eWCjjF','validation','filePath','download','query-url','long-term','1121288ipwwvM','boolean','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','103245FFzKaT','11686AyMIfm','1176786fxTrgp','File','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','read','\x20to\x20development\x20app\x20','8BMPITz','string','9235640MFwBbQ','str','file','286845gGpKol','appCode','63uwXpFw','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references'];a94_0x231a=function(){return _0x2dc831;};return a94_0x231a();}import{CliErrors}from'../../errors.js';function a94_0x55f2(_0x2ebefc,_0x159812){_0x2ebefc=_0x2ebefc-0xd5;const _0x231ad2=a94_0x231a();let _0x55f2f9=_0x231ad2[_0x2ebefc];return _0x55f2f9;}const FILE_FLAG={'name':'file','type':'string','required':!![],'description':a94_0x970f54(0xd7)},FILEPATH_FLAG={'name':'filepath','type':a94_0x970f54(0xe1),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a94_0x970f54(0xf4),'type':a94_0x970f54(0xd6),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a94_0x970f54(0xf6),'type':a94_0x970f54(0xd6),'description':a94_0x970f54(0xe9)};function requireFilePath(_0x44ff25){const _0x12b135=a94_0x970f54,_0xc484a0=_0x44ff25['trim']();if(!_0xc484a0)throw CliErrors[_0x12b135(0xf2)](_0x12b135(0xee));return _0xc484a0;}const fileUpload={'service':'file','command':'upload','description':a94_0x970f54(0xe8),'risk':a94_0x970f54(0xde),'flags':[FILE_FLAG],async 'dryRun'(_0x4e4ed4){const _0x5ad62f=a94_0x970f54,_0x2c315d=requireDevelopmentUploadFile(_0x4e4ed4['str'](_0x5ad62f(0xe4)),_0x5ad62f(0xdc));return{'method':_0x5ad62f(0xea),'url':_0x5ad62f(0xef),'body':{'appCode':_0x4e4ed4[_0x5ad62f(0xe6)],'multipart':{'file':_0x2c315d}},'description':_0x5ad62f(0xed)+_0x2c315d['path']+_0x5ad62f(0xdf)+_0x4e4ed4[_0x5ad62f(0xe6)]};},async 'execute'(_0x304065){const _0x586cbb=a94_0x970f54,_0x5586d1=requireDevelopmentUploadFile(_0x304065[_0x586cbb(0xe3)](_0x586cbb(0xe4)),_0x586cbb(0xdc)),_0x1c6421=await uploadDevelopmentFile(_0x304065['appCode'],_0x5586d1['path']);return{'ok':!![],'data':_0x1c6421,'message':_0x1c6421[_0x586cbb(0xf3)]?'Uploaded\x20file:\x20'+_0x1c6421[_0x586cbb(0xf3)]+_0x586cbb(0xeb):_0x586cbb(0xd8)};}},fileQueryUrl={'service':a94_0x970f54(0xe4),'command':a94_0x970f54(0xf5),'description':a94_0x970f54(0xdd),'risk':a94_0x970f54(0xde),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x49ca49){const _0x212f8e=a94_0x970f54,_0x56e564=requireFilePath(_0x49ca49[_0x212f8e(0xe3)]('filepath')),_0x246088=await queryDevelopmentFileUrl(_0x56e564,{'download':_0x49ca49['bool'](_0x212f8e(0xf4)),'longTerm':_0x49ca49[_0x212f8e(0xf0)](_0x212f8e(0xf6))});return{'ok':!![],'data':_0x246088};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a95_0x4fcf9b=a95_0x140e;(function(_0x3c00f3,_0x1b0162){const _0x153c37=a95_0x140e,_0xfab063=_0x3c00f3();while(!![]){try{const _0x316962=-parseInt(_0x153c37(0x17b))/0x1+parseInt(_0x153c37(0x18a))/0x2+parseInt(_0x153c37(0x183))/0x3+-parseInt(_0x153c37(0x181))/0x4+-parseInt(_0x153c37(0x18d))/0x5*(-parseInt(_0x153c37(0x187))/0x6)+parseInt(_0x153c37(0x17c))/0x7+-parseInt(_0x153c37(0x188))/0x8*(-parseInt(_0x153c37(0x18c))/0x9);if(_0x316962===_0x1b0162)break;else _0xfab063['push'](_0xfab063['shift']());}catch(_0x37adb2){_0xfab063['push'](_0xfab063['shift']());}}}(a95_0x51e7,0x3385a));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(_0x73fe63){return{'appCode':_0x73fe63,'appName':_0x73fe63};}function writeInitConfig(_0x43c8cb,_0x3de516,_0x133a61){const _0x4b0e6c=a95_0x140e,_0x1343ab=resolveWriteConfigPath(_0x43c8cb),_0x2a22da=buildCanonicalProjectConfig({},{'appCodes':_0x3de516[_0x4b0e6c(0x16f)](_0x13bef4=>_0x13bef4[_0x4b0e6c(0x16b)]),'env':_0x133a61,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x4b0e6c(0x170)]()}});writeConfigFile(_0x1343ab,_0x2a22da);const _0x169197=_0x43c8cb===_0x4b0e6c(0x165)?'global':_0x4b0e6c(0x179);console[_0x4b0e6c(0x185)](_0x4b0e6c(0x17f)+_0x169197+_0x4b0e6c(0x189)),console[_0x4b0e6c(0x185)](_0x4b0e6c(0x178)+_0x3de516[_0x4b0e6c(0x16f)](_0x2dd217=>_0x2dd217['appCode'])['join'](',\x20')),console[_0x4b0e6c(0x185)](_0x4b0e6c(0x173)+_0x2a22da[_0x4b0e6c(0x18f)]),console[_0x4b0e6c(0x185)](_0x4b0e6c(0x172)+_0x2a22da[_0x4b0e6c(0x192)]),console[_0x4b0e6c(0x185)](_0x4b0e6c(0x166)+_0x1343ab);}async function runSmartInit(_0xca1741){const _0x2f8a49=a95_0x140e,_0x2f6924=process['cwd'](),_0x5dbbf7=_0xca1741[_0x2f8a49(0x16c)](_0x2f8a49(0x165))?'global':_0x2f8a49(0x179),_0x35a5a4=_0xca1741[_0x2f8a49(0x186)](_0x2f8a49(0x192))||'production',_0x47b304=_0xca1741[_0x2f8a49(0x186)](_0x2f8a49(0x17e))||undefined,_0x5f4890=_0xca1741[_0x2f8a49(0x16c)]('project');if(_0x5f4890){const {initConfig:_0x276f7b}=await import(_0x2f8a49(0x168));return _0x276f7b({'appcode':_0x47b304,'env':_0x35a5a4,'autoYes':_0xca1741[_0x2f8a49(0x16c)](_0x2f8a49(0x177))});}if(_0x5dbbf7===_0x2f8a49(0x179)){const _0x252511=existsSync(resolve(_0x2f6924,NEW_CONFIG_NAME)),_0x47e3d1=LEGACY_CONFIG_NAMES[_0x2f8a49(0x174)](_0x4cc742=>existsSync(resolve(_0x2f6924,_0x4cc742)));if(_0x47e3d1&&!_0x252511)return console[_0x2f8a49(0x185)](_0x2f8a49(0x169)),upgradeApp(_0xca1741[_0x2f8a49(0x184)],{'yes':_0xca1741[_0x2f8a49(0x16c)](_0x2f8a49(0x177))});if(_0x252511)throw CliErrors['validation'](_0x2f8a49(0x18e),_0x2f8a49(0x17d)+CLI_BIN_NAME+_0x2f8a49(0x16a));}if(_0x47b304){const _0x4161ac=validateAppcode(_0x47b304);if(!_0x4161ac[_0x2f8a49(0x16e)])throw CliErrors[_0x2f8a49(0x193)](_0x4161ac['message']);writeInitConfig(_0x5dbbf7,[syntheticApp(_0x47b304)],_0x35a5a4);return;}if(_0xca1741[_0x2f8a49(0x184)])throw CliErrors[_0x2f8a49(0x16d)](_0x2f8a49(0x17e),_0x2f8a49(0x167)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x25564d=getCookie(),_0x519bda=await selectMultipleApps(_0x25564d),_0x12b405=_0x519bda===_0x2f8a49(0x180)?[syntheticApp(await promptCustomAppcode())]:_0x519bda;writeInitConfig(_0x5dbbf7,_0x12b405,_0x35a5a4);}const initFlags=[{'name':a95_0x4fcf9b(0x165),'type':a95_0x4fcf9b(0x17a),'description':a95_0x4fcf9b(0x18b),'default':![]},{'name':'env','type':a95_0x4fcf9b(0x191),'description':'Target\x20environment','default':a95_0x4fcf9b(0x176),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':a95_0x4fcf9b(0x182)},{'name':a95_0x4fcf9b(0x179),'type':a95_0x4fcf9b(0x17a),'description':a95_0x4fcf9b(0x164),'default':![]},{'name':a95_0x4fcf9b(0x177),'type':a95_0x4fcf9b(0x17a),'description':a95_0x4fcf9b(0x171),'default':![]}];export const initDefinitions=[{'service':a95_0x4fcf9b(0x190),'command':'run','description':a95_0x4fcf9b(0x175),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5c4460){return await runSmartInit(_0x5c4460),{'ok':!![]};}}];function a95_0x140e(_0x439760,_0x37d642){_0x439760=_0x439760-0x164;const _0x51e78f=a95_0x51e7();let _0x140e55=_0x51e78f[_0x439760];return _0x140e55;}function a95_0x51e7(){const _0x369ae1=['init','string','env','validation','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','global','\x20\x20Config:\x20','Usage:\x20','../../commands/project/init.js','检测到旧配置文件,正在自动升级...\x0a','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','appCode','bool','flagMissing','valid','map','toLocaleString','Auto-confirm\x20prompts','\x20\x20Env:\x20','\x20\x20Default:\x20','some','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','production','yes','\x20\x20Apps:\x20','project','boolean','302012RLmsrn','2320073meNslP','Use\x20`','appcode','\x0a✓\x20Successfully\x20initialized\x20','custom','1425220WeUJsB','App\x20code\x20to\x20initialize\x20with','259956chIItL','nonInteractive','log','str','759918FawUtF','1864qXcSuV','\x20config','624982HZpFax','Write\x20to\x20global\x20config\x20instead\x20of\x20project','468hIbjqZ','5KozROj','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','defaultApp'];a95_0x51e7=function(){return _0x369ae1;};return a95_0x51e7();}
1
+ const a95_0x35e421=a95_0x18aa;(function(_0x54a252,_0x105ed5){const _0x5ce073=a95_0x18aa,_0x4610b0=_0x54a252();while(!![]){try{const _0x1ef9ff=-parseInt(_0x5ce073(0x1db))/0x1*(-parseInt(_0x5ce073(0x202))/0x2)+-parseInt(_0x5ce073(0x1f1))/0x3*(-parseInt(_0x5ce073(0x208))/0x4)+-parseInt(_0x5ce073(0x1e9))/0x5+-parseInt(_0x5ce073(0x1f8))/0x6+-parseInt(_0x5ce073(0x1f0))/0x7+parseInt(_0x5ce073(0x1df))/0x8*(parseInt(_0x5ce073(0x1dd))/0x9)+parseInt(_0x5ce073(0x1fa))/0xa;if(_0x1ef9ff===_0x105ed5)break;else _0x4610b0['push'](_0x4610b0['shift']());}catch(_0x48280f){_0x4610b0['push'](_0x4610b0['shift']());}}}(a95_0x1128,0x28140));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';function a95_0x1128(){const _0xd12b85=['Target\x20environment','map','\x20\x20Default:\x20','string','production','bool','valid','1478545WfKLjQ','message','\x20\x20Config:\x20','cwd','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','init','validation','1194256WsEieo','3UQOSHf','检测到旧配置文件,正在自动升级...\x0a','str','custom','global','\x20\x20Env:\x20','nonInteractive','538656FJQLPl','appcode','501080Oamxzc','some','Auto-confirm\x20prompts','\x0a✓\x20Successfully\x20initialized\x20','boolean','appCode','Use\x20`','../../commands/project/init.js','39012vdwgGh','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','flagMissing','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','join','App\x20code\x20to\x20initialize\x20with','1130212ikpgXL','Write\x20to\x20global\x20config\x20instead\x20of\x20project','toLocaleString','run','16FYFZma','log','9BYDqDC','project','603968PueRCn','env','\x20\x20Apps:\x20'];a95_0x1128=function(){return _0xd12b85;};return a95_0x1128();}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';function a95_0x18aa(_0x1a6b35,_0x262afe){_0x1a6b35=_0x1a6b35-0x1db;const _0x11283c=a95_0x1128();let _0x18aafa=_0x11283c[_0x1a6b35];return _0x18aafa;}import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x15489d){return{'appCode':_0x15489d,'appName':_0x15489d};}function writeInitConfig(_0xe58b9e,_0x37a933,_0x1c9cb4){const _0x2281ca=a95_0x18aa,_0x3e1419=resolveWriteConfigPath(_0xe58b9e),_0x23978a=buildCanonicalProjectConfig({},{'appCodes':_0x37a933[_0x2281ca(0x1e3)](_0xada90c=>_0xada90c[_0x2281ca(0x1ff)]),'env':_0x1c9cb4,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x2281ca(0x20a)]()}});writeConfigFile(_0x3e1419,_0x23978a);const _0x4fc215=_0xe58b9e===_0x2281ca(0x1f5)?_0x2281ca(0x1f5):'project';console[_0x2281ca(0x1dc)](_0x2281ca(0x1fd)+_0x4fc215+'\x20config'),console[_0x2281ca(0x1dc)](_0x2281ca(0x1e1)+_0x37a933[_0x2281ca(0x1e3)](_0x7223b7=>_0x7223b7[_0x2281ca(0x1ff)])[_0x2281ca(0x206)](',\x20')),console[_0x2281ca(0x1dc)](_0x2281ca(0x1e4)+_0x23978a['defaultApp']),console[_0x2281ca(0x1dc)](_0x2281ca(0x1f6)+_0x23978a['env']),console[_0x2281ca(0x1dc)](_0x2281ca(0x1eb)+_0x3e1419);}async function runSmartInit(_0x52188b){const _0x54397f=a95_0x18aa,_0x221fb4=process[_0x54397f(0x1ec)](),_0x2dfd0e=_0x52188b['bool'](_0x54397f(0x1f5))?_0x54397f(0x1f5):'project',_0x57f575=_0x52188b['str'](_0x54397f(0x1e0))||_0x54397f(0x1e6),_0xa74d1=_0x52188b[_0x54397f(0x1f3)]('appcode')||undefined,_0x58d950=_0x52188b[_0x54397f(0x1e7)](_0x54397f(0x1de));if(_0x58d950){const {initConfig:_0x1fdaad}=await import(_0x54397f(0x201));return _0x1fdaad({'appcode':_0xa74d1,'env':_0x57f575,'autoYes':_0x52188b['bool']('yes')});}if(_0x2dfd0e===_0x54397f(0x1de)){const _0x259545=existsSync(resolve(_0x221fb4,NEW_CONFIG_NAME)),_0x27dced=LEGACY_CONFIG_NAMES[_0x54397f(0x1fb)](_0x3e8745=>existsSync(resolve(_0x221fb4,_0x3e8745)));if(_0x27dced&&!_0x259545)return console['log'](_0x54397f(0x1f2)),upgradeApp(_0x52188b[_0x54397f(0x1f7)],{'yes':_0x52188b[_0x54397f(0x1e7)]('yes')});if(_0x259545)throw CliErrors[_0x54397f(0x1ef)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x54397f(0x200)+CLI_BIN_NAME+_0x54397f(0x203));}if(_0xa74d1){const _0x490323=validateAppcode(_0xa74d1);if(!_0x490323[_0x54397f(0x1e8)])throw CliErrors[_0x54397f(0x1ef)](_0x490323[_0x54397f(0x1ea)]);writeInitConfig(_0x2dfd0e,[syntheticApp(_0xa74d1)],_0x57f575);return;}if(_0x52188b[_0x54397f(0x1f7)])throw CliErrors[_0x54397f(0x204)](_0x54397f(0x1f9),'Usage:\x20'+CLI_BIN_NAME+_0x54397f(0x1ed));const _0x5748df=getCookie(),_0x5d80b4=await selectMultipleApps(_0x5748df),_0x234d13=_0x5d80b4===_0x54397f(0x1f4)?[syntheticApp(await promptCustomAppcode())]:_0x5d80b4;writeInitConfig(_0x2dfd0e,_0x234d13,_0x57f575);}const initFlags=[{'name':a95_0x35e421(0x1f5),'type':a95_0x35e421(0x1fe),'description':a95_0x35e421(0x209),'default':![]},{'name':a95_0x35e421(0x1e0),'type':a95_0x35e421(0x1e5),'description':a95_0x35e421(0x1e2),'default':a95_0x35e421(0x1e6),'enum':[...RABETBASE_ENV_VALUES]},{'name':a95_0x35e421(0x1f9),'type':'string','description':a95_0x35e421(0x207)},{'name':a95_0x35e421(0x1de),'type':a95_0x35e421(0x1fe),'description':a95_0x35e421(0x205),'default':![]},{'name':'yes','type':a95_0x35e421(0x1fe),'description':a95_0x35e421(0x1fc),'default':![]}];export const initDefinitions=[{'service':a95_0x35e421(0x1ee),'command':a95_0x35e421(0x20b),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x42fc6c){return await runSmartInit(_0x42fc6c),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x3a4bba,_0x192c2a){const _0x3fd9fb=a96_0x15bb,_0x34d398=_0x3a4bba();while(!![]){try{const _0x121eb7=parseInt(_0x3fd9fb(0x148))/0x1*(parseInt(_0x3fd9fb(0x14e))/0x2)+-parseInt(_0x3fd9fb(0x14d))/0x3*(-parseInt(_0x3fd9fb(0x147))/0x4)+-parseInt(_0x3fd9fb(0x146))/0x5+parseInt(_0x3fd9fb(0x14a))/0x6*(-parseInt(_0x3fd9fb(0x149))/0x7)+parseInt(_0x3fd9fb(0x14b))/0x8+-parseInt(_0x3fd9fb(0x14c))/0x9*(parseInt(_0x3fd9fb(0x144))/0xa)+parseInt(_0x3fd9fb(0x145))/0xb;if(_0x121eb7===_0x192c2a)break;else _0x34d398['push'](_0x34d398['shift']());}catch(_0x4e63a8){_0x34d398['push'](_0x34d398['shift']());}}}(a96_0x3300,0x808e4));function a96_0x15bb(_0x27c380,_0x17d4b8){_0x27c380=_0x27c380-0x144;const _0x330029=a96_0x3300();let _0x15bb45=_0x330029[_0x27c380];return _0x15bb45;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a96_0x3300(){const _0x5e0aa1=['2950508ypWfqo','1578800RYhLFH','3752284xAogKO','17545OKxFOa','674758NIXUsm','24oPJXdW','3581352TuUfPk','261rziGJV','3tQMzGm','46EFbcGe','286070xSIzcb'];a96_0x3300=function(){return _0x5e0aa1;};return a96_0x3300();}
1
+ function a96_0x25b9(_0x4f3c72,_0x35b35b){_0x4f3c72=_0x4f3c72-0x127;const _0x474699=a96_0x4746();let _0x25b9f7=_0x474699[_0x4f3c72];return _0x25b9f7;}(function(_0x1dd4f2,_0x1d957c){const _0x50ef03=a96_0x25b9,_0x2a107e=_0x1dd4f2();while(!![]){try{const _0x1d38d8=-parseInt(_0x50ef03(0x129))/0x1+parseInt(_0x50ef03(0x12d))/0x2+parseInt(_0x50ef03(0x12e))/0x3*(parseInt(_0x50ef03(0x12c))/0x4)+parseInt(_0x50ef03(0x128))/0x5*(parseInt(_0x50ef03(0x127))/0x6)+-parseInt(_0x50ef03(0x12a))/0x7+parseInt(_0x50ef03(0x12b))/0x8+-parseInt(_0x50ef03(0x12f))/0x9;if(_0x1d38d8===_0x1d957c)break;else _0x2a107e['push'](_0x2a107e['shift']());}catch(_0x1946d1){_0x2a107e['push'](_0x2a107e['shift']());}}}(a96_0x4746,0x56238));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a96_0x4746(){const _0x4e69fc=['4017000qOQOAk','28Rorgjw','101978donmak','297186sJttYq','6334047vfrsgy','4260eLRSqL','4400Bmpalz','190502YKhdoG','4369673XMJJvh'];a96_0x4746=function(){return _0x4e69fc;};return a96_0x4746();}
@@ -1 +1 @@
1
- const a97_0x42a8cd=a97_0x1346;(function(_0x5257ea,_0x3b3329){const _0x41375e=a97_0x1346,_0x2d3814=_0x5257ea();while(!![]){try{const _0x338e4a=parseInt(_0x41375e(0x134))/0x1+-parseInt(_0x41375e(0x13e))/0x2+parseInt(_0x41375e(0x139))/0x3*(parseInt(_0x41375e(0x126))/0x4)+-parseInt(_0x41375e(0x13d))/0x5*(-parseInt(_0x41375e(0x133))/0x6)+parseInt(_0x41375e(0x125))/0x7+-parseInt(_0x41375e(0x121))/0x8+-parseInt(_0x41375e(0x128))/0x9;if(_0x338e4a===_0x3b3329)break;else _0x2d3814['push'](_0x2d3814['shift']());}catch(_0x2a6a4f){_0x2d3814['push'](_0x2d3814['shift']());}}}(a97_0x4c52,0xeac42));function a97_0x1346(_0x93c35e,_0x479bee){_0x93c35e=_0x93c35e-0x121;const _0x4c52c0=a97_0x4c52();let _0x1346dc=_0x4c52c0[_0x93c35e];return _0x1346dc;}import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x42a8cd(0x129);const NUDGE_SUPPRESSED_CODES=new Set([a97_0x42a8cd(0x142),a97_0x42a8cd(0x135),a97_0x42a8cd(0x122),a97_0x42a8cd(0x12a),'unknown_command',a97_0x42a8cd(0x140),'validation_error','network_error']),defaultWriter=_0x309734=>{const _0x5e1c58=a97_0x42a8cd;process[_0x5e1c58(0x132)][_0x5e1c58(0x130)](_0x309734);};export function shouldNudgeForError(_0x3ea0d6,_0x5dcc36){const _0x2e62c5=a97_0x42a8cd;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x5dcc36[_0x2e62c5(0x12f)]===_0x2e62c5(0x13c)&&_0x5dcc36['command']===_0x2e62c5(0x13b))return![];if(_0x3ea0d6 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x2e62c5(0x12d)](_0x3ea0d6[_0x2e62c5(0x137)]);return!![];}export function printIssueReportNudgeForError(_0x385ccd,_0x36e494,_0x534930=defaultWriter){if(!shouldNudgeForError(_0x385ccd,_0x36e494))return;const _0x2ea927=buildSuggestedTitle(_0x385ccd,_0x36e494);_0x534930(formatNudge(_0x2ea927));}function buildSuggestedTitle(_0x4ecb22,_0x442f28){const _0x542800=a97_0x42a8cd,_0x41924b=_0x4ecb22 instanceof Error?_0x4ecb22[_0x542800(0x143)]:String(_0x4ecb22),_0x3dcddd=_0x41924b[_0x542800(0x138)](/[\r\n]+/g,'\x20')[_0x542800(0x138)](/\s+/g,'\x20')[_0x542800(0x13f)]()[_0x542800(0x131)](0x0,0x78)[_0x542800(0x138)](/"/g,'\x5c\x22'),_0x296787=CLI_BIN_NAME+'\x20'+_0x442f28['service']+'\x20'+_0x442f28[_0x542800(0x136)];return _0x3dcddd[_0x542800(0x12e)]>0x0?_0x296787+':\x20'+_0x3dcddd:_0x296787;}function a97_0x4c52(){const _0x4e17a1=['report','issue','80rEHWJA','855720hSmrFp','trim','flag_missing','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','cancelled','message','1020872hPgyCN','config_missing','\x22\x20\x5c','\x20issue\x20report\x20\x5c','10096163BjYyLw','414836qcHWTj','\x20\x20\x20\x20--title\x20\x22','26433351LHmGKk','RABETBASE_DISABLE_ISSUE_NUDGE','not_in_project','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','Hit\x20a\x20','has','length','service','write','slice','stderr','577992rbmUyI','1263071UAOUKY','auth_required','command','code','replace','6GmEPXD','\x20\x20Set\x20'];a97_0x4c52=function(){return _0x4e17a1;};return a97_0x4c52();}function formatNudge(_0x42cecc){const _0x14a1fc=a97_0x42a8cd;return['',_0x14a1fc(0x12c)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+_0x14a1fc(0x124),_0x14a1fc(0x127)+_0x42cecc+_0x14a1fc(0x123),_0x14a1fc(0x12b),_0x14a1fc(0x141),_0x14a1fc(0x13a)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.','']['join']('\x0a');}
1
+ const a97_0x315702=a97_0x4d28;(function(_0x38031a,_0x417aa8){const _0xfc014b=a97_0x4d28,_0x29c969=_0x38031a();while(!![]){try{const _0x118140=parseInt(_0xfc014b(0x20d))/0x1*(parseInt(_0xfc014b(0x203))/0x2)+parseInt(_0xfc014b(0x1ee))/0x3*(-parseInt(_0xfc014b(0x211))/0x4)+parseInt(_0xfc014b(0x20b))/0x5*(parseInt(_0xfc014b(0x1ff))/0x6)+parseInt(_0xfc014b(0x20e))/0x7*(-parseInt(_0xfc014b(0x213))/0x8)+-parseInt(_0xfc014b(0x212))/0x9*(parseInt(_0xfc014b(0x1fa))/0xa)+-parseInt(_0xfc014b(0x1fb))/0xb*(parseInt(_0xfc014b(0x1fd))/0xc)+parseInt(_0xfc014b(0x202))/0xd;if(_0x118140===_0x417aa8)break;else _0x29c969['push'](_0x29c969['shift']());}catch(_0x3f8b78){_0x29c969['push'](_0x29c969['shift']());}}}(a97_0x10d4,0x520b9));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a97_0x315702(0x20a);const NUDGE_SUPPRESSED_CODES=new Set([a97_0x315702(0x1ef),a97_0x315702(0x1fc),a97_0x315702(0x207),'not_in_project',a97_0x315702(0x208),'flag_missing',a97_0x315702(0x1f8),'network_error']),defaultWriter=_0x5033c6=>{const _0x1122d4=a97_0x315702;process[_0x1122d4(0x1f1)][_0x1122d4(0x1f7)](_0x5033c6);};export function shouldNudgeForError(_0xb76992,_0x218f35){const _0x5d0d17=a97_0x315702;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x218f35[_0x5d0d17(0x210)]===_0x5d0d17(0x1f4)&&_0x218f35[_0x5d0d17(0x214)]===_0x5d0d17(0x215))return![];if(_0xb76992 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x5d0d17(0x1fe)](_0xb76992[_0x5d0d17(0x209)]);return!![];}function a97_0x10d4(){const _0x382b31=['replace','13086541CmNRVU','1502xnnAan','message','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20bug?\x20Help\x20us\x20fix\x20it:','config_missing','unknown_command','code','RABETBASE_DISABLE_ISSUE_NUDGE','197665GDPsij','Hit\x20a\x20','587jgVFdT','7pCaJGV','length','service','4geEkpt','1089693bhkCkf','3514872iZHUlg','command','report','1577859BNpgLH','cancelled','=1\x20to\x20silence\x20this\x20hint.','stderr','\x20\x20\x20\x20--title\x20\x22','trim','issue','\x22\x20\x5c','slice','write','validation_error','join','10xhVouh','12463KIJGKb','auth_required','684UZPaah','has','6OVymCh','\x20\x20Set\x20'];a97_0x10d4=function(){return _0x382b31;};return a97_0x10d4();}export function printIssueReportNudgeForError(_0x55cb05,_0x166ee3,_0x3cc8c5=defaultWriter){if(!shouldNudgeForError(_0x55cb05,_0x166ee3))return;const _0x6f5e61=buildSuggestedTitle(_0x55cb05,_0x166ee3);_0x3cc8c5(formatNudge(_0x6f5e61));}function buildSuggestedTitle(_0x182b27,_0x22bf7c){const _0xd99f30=a97_0x315702,_0xcf4b31=_0x182b27 instanceof Error?_0x182b27[_0xd99f30(0x204)]:String(_0x182b27),_0x5a448e=_0xcf4b31[_0xd99f30(0x201)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0xd99f30(0x1f3)]()[_0xd99f30(0x1f6)](0x0,0x78)[_0xd99f30(0x201)](/"/g,'\x5c\x22'),_0x5e3b3c=CLI_BIN_NAME+'\x20'+_0x22bf7c[_0xd99f30(0x210)]+'\x20'+_0x22bf7c[_0xd99f30(0x214)];return _0x5a448e[_0xd99f30(0x20f)]>0x0?_0x5e3b3c+':\x20'+_0x5a448e:_0x5e3b3c;}function a97_0x4d28(_0x318191,_0x128e68){_0x318191=_0x318191-0x1ee;const _0x10d42c=a97_0x10d4();let _0x4d28db=_0x10d42c[_0x318191];return _0x4d28db;}function formatNudge(_0x2d0e34){const _0x533ca9=a97_0x315702;return['',_0x533ca9(0x20c)+CLI_BIN_NAME+_0x533ca9(0x206),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x533ca9(0x1f2)+_0x2d0e34+_0x533ca9(0x1f5),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x533ca9(0x205),_0x533ca9(0x200)+NUDGE_OPT_OUT_ENV+_0x533ca9(0x1f0),''][_0x533ca9(0x1f9)]('\x0a');}
@@ -1 +1 @@
1
- const a98_0x3233b2=a98_0x14b7;(function(_0x10ad4,_0x5a2984){const _0x5525e9=a98_0x14b7,_0x329285=_0x10ad4();while(!![]){try{const _0xc27985=parseInt(_0x5525e9(0x186))/0x1*(parseInt(_0x5525e9(0x18d))/0x2)+-parseInt(_0x5525e9(0x19a))/0x3*(-parseInt(_0x5525e9(0x172))/0x4)+-parseInt(_0x5525e9(0x1a2))/0x5+parseInt(_0x5525e9(0x17a))/0x6*(parseInt(_0x5525e9(0x173))/0x7)+-parseInt(_0x5525e9(0x19e))/0x8+-parseInt(_0x5525e9(0x192))/0x9+-parseInt(_0x5525e9(0x179))/0xa;if(_0xc27985===_0x5a2984)break;else _0x329285['push'](_0x329285['shift']());}catch(_0x29cd01){_0x329285['push'](_0x329285['shift']());}}}(a98_0x3c8d,0x40b2e));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';function a98_0x3c8d(){const _0x34ade6=['Failed\x20to\x20report\x20platform\x20issue:\x20','length','2786940OPEdTf','issue.description_redactions','write','\x20bytes','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','issue.description_original_bytes','compress','trim','6BEavIp','descriptionSource','string','redactionCount','2672504fLHQbo','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionFilePath','900985JtzKnR','utf8','flagMissing','truncated\x20from\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','redactionKinds','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','POST','str','originalBytes','Platform\x20issue\x20reported\x20(','title','960180wkTCLM','14MVkuiu','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','issue.title','message','file','redacted\x20','1773540TyTvlj','1478106AeudAH','join','descriptionFile:\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Issue\x20description\x20file\x20is\x20empty:\x20','redactions:\x20','report','truncated','inline','Issue\x20description\x20cannot\x20be\x20empty.','cwd','issue.description_truncated','2DzPMUg','issue.description','description','issue.description_redaction_kinds','validation','descriptionSource:\x20','otel://','293488jSHBWM','sanitize','issue'];a98_0x3c8d=function(){return _0x34ade6;};return a98_0x3c8d();}export const issueReport={'service':a98_0x3233b2(0x18f),'command':a98_0x3233b2(0x180),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a98_0x3233b2(0x194),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x3233b2(0x198),'flags':[{'name':'title','type':a98_0x3233b2(0x19c),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a98_0x3233b2(0x188),'type':'string','description':a98_0x3233b2(0x17d)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x3233b2(0x19c),'description':a98_0x3233b2(0x16c)}],async 'validate'(_0x1d43b2){const _0x12d3e3=a98_0x3233b2,_0x25d421=_0x1d43b2[_0x12d3e3(0x16e)](_0x12d3e3(0x171))[_0x12d3e3(0x199)](),_0x548aeb=_0x1d43b2['str'](_0x12d3e3(0x188))['trim'](),_0x10aab4=_0x1d43b2[_0x12d3e3(0x16e)](DESCRIPTION_FILE_FLAG)[_0x12d3e3(0x199)]();if(!_0x25d421)throw CliErrors[_0x12d3e3(0x1a4)](_0x12d3e3(0x171),_0x12d3e3(0x196));const _0xb0635b=_0x548aeb[_0x12d3e3(0x191)]>0x0,_0x2ef1d8=_0x10aab4['length']>0x0;if(_0xb0635b===_0x2ef1d8)throw CliErrors[_0x12d3e3(0x18a)](_0x12d3e3(0x174),_0x12d3e3(0x169));if(_0x2ef1d8){const _0x14993a=resolve(process[_0x12d3e3(0x184)](),_0x10aab4);if(!existsSync(_0x14993a))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x14993a);}},async 'dryRun'(_0x56bfbd){const _0x5d0d0b=a98_0x3233b2,_0x310dd4=await prepareIssueReport(_0x56bfbd);return{'method':_0x5d0d0b(0x16d),'url':_0x5d0d0b(0x18c)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x310dd4['title'],'issue.description':_0x310dd4['description'],'issue.description_original_bytes':_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x16f)],'issue.description_truncated':_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x181)],'issue.description_redactions':_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x19d)],'issue.description_redaction_kinds':_0x310dd4[_0x5d0d0b(0x18e)]['redactionKinds'][_0x5d0d0b(0x17b)](',')}},'description':[_0x5d0d0b(0x1a0),_0x5d0d0b(0x18b)+_0x310dd4['descriptionSource'],_0x310dd4['descriptionFilePath']?_0x5d0d0b(0x17c)+_0x310dd4['descriptionFilePath']:null,_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x181)]?'truncated:\x20original\x20'+_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x16f)]+_0x5d0d0b(0x195):null,_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x19d)]>0x0?_0x5d0d0b(0x17f)+_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x19d)]+'\x20('+_0x310dd4[_0x5d0d0b(0x18e)][_0x5d0d0b(0x16b)]['join'](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x5bf908){const _0x51c2e3=a98_0x3233b2,_0x25caf4=await prepareIssueReport(_0x5bf908);try{await sendPlatformIssueCollectLog({'title':_0x25caf4[_0x51c2e3(0x171)],'description':_0x25caf4[_0x51c2e3(0x188)],'sanitize':{'originalBytes':_0x25caf4[_0x51c2e3(0x18e)][_0x51c2e3(0x16f)],'truncated':_0x25caf4[_0x51c2e3(0x18e)][_0x51c2e3(0x181)],'redactionCount':_0x25caf4[_0x51c2e3(0x18e)][_0x51c2e3(0x19d)],'redactionKinds':_0x25caf4[_0x51c2e3(0x18e)][_0x51c2e3(0x16b)]}});}catch(_0x4e3a6b){throw CliErrors['apiError'](_0x51c2e3(0x190)+(_0x4e3a6b instanceof Error?_0x4e3a6b[_0x51c2e3(0x176)]:String(_0x4e3a6b)),_0x51c2e3(0x16a));}return{'ok':!![],'message':buildResultMessage(_0x25caf4['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x51c2e3(0x175),_0x51c2e3(0x187),_0x51c2e3(0x197),_0x51c2e3(0x185),_0x51c2e3(0x193),_0x51c2e3(0x189)],'issue':{'title':_0x25caf4['title'],'descriptionLength':_0x25caf4[_0x51c2e3(0x188)][_0x51c2e3(0x191)],'descriptionSource':_0x25caf4[_0x51c2e3(0x19b)],..._0x25caf4[_0x51c2e3(0x1a1)]?{'descriptionFile':_0x25caf4[_0x51c2e3(0x1a1)]}:{},'sanitize':{'originalBytes':_0x25caf4[_0x51c2e3(0x18e)]['originalBytes'],'truncated':_0x25caf4['sanitize'][_0x51c2e3(0x181)],'redactions':_0x25caf4[_0x51c2e3(0x18e)]['redactionCount'],'redactionKinds':_0x25caf4[_0x51c2e3(0x18e)][_0x51c2e3(0x16b)]}}}};}};function a98_0x14b7(_0x3e6a9a,_0x42828d){_0x3e6a9a=_0x3e6a9a-0x169;const _0x3c8da1=a98_0x3c8d();let _0x14b765=_0x3c8da1[_0x3e6a9a];return _0x14b765;}function buildResultMessage(_0x3634e2){const _0x12ee9a=a98_0x3233b2,_0x41329f=[];return _0x3634e2[_0x12ee9a(0x181)]&&_0x41329f['push'](_0x12ee9a(0x1a5)+_0x3634e2[_0x12ee9a(0x16f)]+'\x20bytes'),_0x3634e2[_0x12ee9a(0x19d)]>0x0&&_0x41329f['push'](_0x12ee9a(0x178)+_0x3634e2[_0x12ee9a(0x19d)]+'\x20secret(s):\x20'+_0x3634e2['redactionKinds'][_0x12ee9a(0x17b)](',\x20')),_0x41329f['length']===0x0?'Platform\x20issue\x20reported':_0x12ee9a(0x170)+_0x41329f[_0x12ee9a(0x17b)](';\x20')+')';}async function prepareIssueReport(_0xa18510){const _0x49f823=a98_0x3233b2,_0x2399bd=_0xa18510[_0x49f823(0x16e)](_0x49f823(0x171))[_0x49f823(0x199)](),_0x468663=_0xa18510[_0x49f823(0x16e)](_0x49f823(0x188)),_0x1ab878=_0xa18510[_0x49f823(0x16e)](DESCRIPTION_FILE_FLAG)[_0x49f823(0x199)]();if(!_0x1ab878){const _0x361814=_0x468663;if(!_0x361814[_0x49f823(0x199)]())throw CliErrors['validation'](_0x49f823(0x183),_0x49f823(0x19f));const _0x1c8a31=sanitizeIssueDescription(_0x361814);return{'title':_0x2399bd,'description':_0x1c8a31[_0x49f823(0x188)],'descriptionSource':_0x49f823(0x182),'sanitize':_0x1c8a31};}const _0x54699c=resolve(process[_0x49f823(0x184)](),_0x1ab878),_0x5c6c2d=await readFile(_0x54699c,_0x49f823(0x1a3));if(!_0x5c6c2d[_0x49f823(0x199)]())throw CliErrors[_0x49f823(0x18a)](_0x49f823(0x17e)+_0x54699c,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x275990=sanitizeIssueDescription(_0x5c6c2d);return{'title':_0x2399bd,'description':_0x275990['description'],'descriptionSource':_0x49f823(0x177),'descriptionFilePath':_0x54699c,'sanitize':_0x275990};}
1
+ const a98_0x15abef=a98_0x5d33;function a98_0x8225(){const _0x2baf23=['redactionCount','29GtPvSd','redactionKinds','5433mtLprA','descriptionFilePath','issue','description-file','inline','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','report','Issue\x20description\x20cannot\x20be\x20empty.','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','compress','Failed\x20to\x20report\x20platform\x20issue:\x20','message','issue.description_redaction_kinds','filter','issue.description_original_bytes','redactions:\x20','52310QmEwnn','redacted\x20','16551cGWbxd','originalBytes','truncated:\x20original\x20','descriptionFile:\x20','POST','40vmpTZd','224coGDzE','join','length','utf8','issue.description_truncated','file','Platform\x20issue\x20reported','issue.description_redactions','6963895MLrAgj','4552IzmqBT','307548kUPOiH','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Platform\x20issue\x20reported\x20(','One-line\x20issue\x20summary','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Issue\x20description\x20file\x20is\x20empty:\x20','string','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','trim','File\x20not\x20found:\x20','cwd','truncated\x20from\x20','4328ZcMeXi','str','flagMissing','title','39352428MREmXx','write','sanitize','\x20bytes','validation','push','truncated','apiError','2562087kAtgMA','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','descriptionSource','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','description'];a98_0x8225=function(){return _0x2baf23;};return a98_0x8225();}(function(_0x2fa72a,_0x458602){const _0x43e7fb=a98_0x5d33,_0x33eaf6=_0x2fa72a();while(!![]){try{const _0x339993=parseInt(_0x43e7fb(0x106))/0x1*(parseInt(_0x43e7fb(0x119))/0x2)+-parseInt(_0x43e7fb(0x108))/0x3*(-parseInt(_0x43e7fb(0xf4))/0x4)+-parseInt(_0x43e7fb(0xe6))/0x5+-parseInt(_0x43e7fb(0xe8))/0x6*(parseInt(_0x43e7fb(0x121))/0x7)+-parseInt(_0x43e7fb(0xe7))/0x8*(parseInt(_0x43e7fb(0x11b))/0x9)+parseInt(_0x43e7fb(0x120))/0xa*(-parseInt(_0x43e7fb(0x100))/0xb)+parseInt(_0x43e7fb(0xf8))/0xc;if(_0x339993===_0x458602)break;else _0x33eaf6['push'](_0x33eaf6['shift']());}catch(_0x2d7505){_0x33eaf6['push'](_0x33eaf6['shift']());}}}(a98_0x8225,0xf0ca0));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a98_0x5d33(_0x414316,_0x555310){_0x414316=_0x414316-0xe1;const _0x822505=a98_0x8225();let _0x5d33f2=_0x822505[_0x414316];return _0x5d33f2;}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a98_0x15abef(0x10b);export const issueReport={'service':a98_0x15abef(0x10a),'command':a98_0x15abef(0x10e),'description':a98_0x15abef(0x110),'risk':a98_0x15abef(0xf9),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a98_0x15abef(0x112),'flags':[{'name':a98_0x15abef(0xf7),'type':a98_0x15abef(0xee),'required':!![],'description':a98_0x15abef(0xeb)},{'name':'description','type':a98_0x15abef(0xee),'description':a98_0x15abef(0xef)},{'name':DESCRIPTION_FILE_FLAG,'type':a98_0x15abef(0xee),'description':a98_0x15abef(0x111)}],async 'validate'(_0x39413d){const _0x586be3=a98_0x15abef,_0x26b27d=_0x39413d[_0x586be3(0xf5)](_0x586be3(0xf7))[_0x586be3(0xf0)](),_0x2876ea=_0x39413d[_0x586be3(0xf5)](_0x586be3(0x104))[_0x586be3(0xf0)](),_0x31ca46=_0x39413d['str'](DESCRIPTION_FILE_FLAG)[_0x586be3(0xf0)]();if(!_0x26b27d)throw CliErrors[_0x586be3(0xf6)]('title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x4bd1de=_0x2876ea[_0x586be3(0x123)]>0x0,_0x28e435=_0x31ca46[_0x586be3(0x123)]>0x0;if(_0x4bd1de===_0x28e435)throw CliErrors['validation'](_0x586be3(0xec),_0x586be3(0x103));if(_0x28e435){const _0x6e6d58=resolve(process[_0x586be3(0xf2)](),_0x31ca46);if(!existsSync(_0x6e6d58))throw CliErrors[_0x586be3(0xfc)](_0x586be3(0xf1)+_0x6e6d58);}},async 'dryRun'(_0x5064ee){const _0x32a2b8=a98_0x15abef,_0x21978d=await prepareIssueReport(_0x5064ee);return{'method':_0x32a2b8(0x11f),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x21978d[_0x32a2b8(0xf7)],'issue.description':_0x21978d['description'],'issue.description_original_bytes':_0x21978d['sanitize']['originalBytes'],'issue.description_truncated':_0x21978d[_0x32a2b8(0xfa)][_0x32a2b8(0xfe)],'issue.description_redactions':_0x21978d[_0x32a2b8(0xfa)][_0x32a2b8(0x105)],'issue.description_redaction_kinds':_0x21978d[_0x32a2b8(0xfa)][_0x32a2b8(0x107)][_0x32a2b8(0x122)](',')}},'description':[_0x32a2b8(0x10d),'descriptionSource:\x20'+_0x21978d['descriptionSource'],_0x21978d[_0x32a2b8(0x109)]?_0x32a2b8(0x11e)+_0x21978d[_0x32a2b8(0x109)]:null,_0x21978d['sanitize'][_0x32a2b8(0xfe)]?_0x32a2b8(0x11d)+_0x21978d['sanitize']['originalBytes']+_0x32a2b8(0xfb):null,_0x21978d[_0x32a2b8(0xfa)][_0x32a2b8(0x105)]>0x0?_0x32a2b8(0x118)+_0x21978d[_0x32a2b8(0xfa)]['redactionCount']+'\x20('+_0x21978d[_0x32a2b8(0xfa)][_0x32a2b8(0x107)][_0x32a2b8(0x122)](',\x20')+')':null][_0x32a2b8(0x116)](Boolean)[_0x32a2b8(0x122)]('\x0a')};},async 'execute'(_0x1352a){const _0x35d061=a98_0x15abef,_0x44c3cc=await prepareIssueReport(_0x1352a);try{await sendPlatformIssueCollectLog({'title':_0x44c3cc[_0x35d061(0xf7)],'description':_0x44c3cc['description'],'sanitize':{'originalBytes':_0x44c3cc['sanitize'][_0x35d061(0x11c)],'truncated':_0x44c3cc[_0x35d061(0xfa)][_0x35d061(0xfe)],'redactionCount':_0x44c3cc['sanitize'][_0x35d061(0x105)],'redactionKinds':_0x44c3cc[_0x35d061(0xfa)][_0x35d061(0x107)]}});}catch(_0x496368){throw CliErrors[_0x35d061(0xff)](_0x35d061(0x113)+(_0x496368 instanceof Error?_0x496368[_0x35d061(0x114)]:String(_0x496368)),_0x35d061(0x101));}return{'ok':!![],'message':buildResultMessage(_0x44c3cc[_0x35d061(0xfa)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title','issue.description',_0x35d061(0x117),_0x35d061(0xe2),_0x35d061(0xe5),_0x35d061(0x115)],'issue':{'title':_0x44c3cc['title'],'descriptionLength':_0x44c3cc[_0x35d061(0x104)][_0x35d061(0x123)],'descriptionSource':_0x44c3cc[_0x35d061(0x102)],..._0x44c3cc[_0x35d061(0x109)]?{'descriptionFile':_0x44c3cc[_0x35d061(0x109)]}:{},'sanitize':{'originalBytes':_0x44c3cc[_0x35d061(0xfa)][_0x35d061(0x11c)],'truncated':_0x44c3cc['sanitize'][_0x35d061(0xfe)],'redactions':_0x44c3cc[_0x35d061(0xfa)]['redactionCount'],'redactionKinds':_0x44c3cc[_0x35d061(0xfa)][_0x35d061(0x107)]}}}};}};function buildResultMessage(_0x1ddc97){const _0x462905=a98_0x15abef,_0x16c861=[];return _0x1ddc97['truncated']&&_0x16c861['push'](_0x462905(0xf3)+_0x1ddc97[_0x462905(0x11c)]+_0x462905(0xfb)),_0x1ddc97[_0x462905(0x105)]>0x0&&_0x16c861[_0x462905(0xfd)](_0x462905(0x11a)+_0x1ddc97[_0x462905(0x105)]+'\x20secret(s):\x20'+_0x1ddc97[_0x462905(0x107)]['join'](',\x20')),_0x16c861[_0x462905(0x123)]===0x0?_0x462905(0xe4):_0x462905(0xea)+_0x16c861[_0x462905(0x122)](';\x20')+')';}async function prepareIssueReport(_0x450426){const _0x222de1=a98_0x15abef,_0x3915e8=_0x450426['str'](_0x222de1(0xf7))['trim'](),_0x182aad=_0x450426[_0x222de1(0xf5)]('description'),_0x5a864a=_0x450426['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x5a864a){const _0x2089c8=_0x182aad;if(!_0x2089c8[_0x222de1(0xf0)]())throw CliErrors[_0x222de1(0xfc)](_0x222de1(0x10f),_0x222de1(0xe9));const _0x252ef5=sanitizeIssueDescription(_0x2089c8);return{'title':_0x3915e8,'description':_0x252ef5[_0x222de1(0x104)],'descriptionSource':_0x222de1(0x10c),'sanitize':_0x252ef5};}const _0x11f09f=resolve(process[_0x222de1(0xf2)](),_0x5a864a),_0x4bdfa9=await readFile(_0x11f09f,_0x222de1(0xe1));if(!_0x4bdfa9[_0x222de1(0xf0)]())throw CliErrors[_0x222de1(0xfc)](_0x222de1(0xed)+_0x11f09f,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x220bc7=sanitizeIssueDescription(_0x4bdfa9);return{'title':_0x3915e8,'description':_0x220bc7[_0x222de1(0x104)],'descriptionSource':_0x222de1(0xe3),'descriptionFilePath':_0x11f09f,'sanitize':_0x220bc7};}
@@ -1 +1 @@
1
- const a99_0x5e021c=a99_0x5270;(function(_0xf5785c,_0x142454){const _0x4293ea=a99_0x5270,_0x4d2d60=_0xf5785c();while(!![]){try{const _0x3a9433=parseInt(_0x4293ea(0x157))/0x1+parseInt(_0x4293ea(0x15d))/0x2+parseInt(_0x4293ea(0x15c))/0x3*(parseInt(_0x4293ea(0x164))/0x4)+parseInt(_0x4293ea(0x155))/0x5+-parseInt(_0x4293ea(0x14e))/0x6+-parseInt(_0x4293ea(0x15e))/0x7+-parseInt(_0x4293ea(0x158))/0x8;if(_0x3a9433===_0x142454)break;else _0x4d2d60['push'](_0x4d2d60['shift']());}catch(_0x20b662){_0x4d2d60['push'](_0x4d2d60['shift']());}}}(a99_0x2283,0x9cee8));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;function a99_0x5270(_0x527ec4,_0x3bbf8b){_0x527ec4=_0x527ec4-0x14d;const _0x2283a1=a99_0x2283();let _0x527072=_0x2283a1[_0x527ec4];return _0x527072;}const TRUNCATION_NOTICE=a99_0x5e021c(0x152),REDACTION_RULES=[{'kind':a99_0x5e021c(0x162),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x5e021c(0x16a)},{'kind':a99_0x5e021c(0x160),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a99_0x5e021c(0x15f),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x5e021c(0x15b)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a99_0x5e021c(0x15a),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x5e021c(0x163)},{'kind':a99_0x5e021c(0x156),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];export function sanitizeIssueDescription(_0x58f409){const _0x37b989=a99_0x5e021c,_0x2b21bd=Buffer['byteLength'](_0x58f409,_0x37b989(0x150)),_0x7777ba=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x4152d0=_0x58f409,_0x3f8615=0x0;const _0x1e7355=[];if(!_0x7777ba){const _0x16b94a=protectOssAccessKeyIds(_0x4152d0);_0x4152d0=_0x16b94a['description'];for(const _0x62926c of REDACTION_RULES){let _0x51e10e=0x0;_0x4152d0=_0x4152d0['replace'](_0x62926c[_0x37b989(0x159)],(_0x2a7f33,_0x1373f6)=>{const _0x35218e=_0x37b989;_0x51e10e+=0x1;const _0x13bdb2=typeof _0x1373f6===_0x35218e(0x167)?_0x1373f6:'';return _0x13bdb2+'['+_0x62926c['label']+']';}),_0x51e10e>0x0&&(_0x3f8615+=_0x51e10e,!_0x1e7355[_0x37b989(0x14d)](_0x62926c[_0x37b989(0x151)])&&_0x1e7355[_0x37b989(0x168)](_0x62926c['kind']));}_0x4152d0=_0x16b94a[_0x37b989(0x165)](_0x4152d0);}let _0x590844=![];if(Buffer[_0x37b989(0x161)](_0x4152d0,_0x37b989(0x150))>ISSUE_DESCRIPTION_MAX_BYTES){_0x590844=!![];const _0x3d609d=Buffer[_0x37b989(0x161)](TRUNCATION_NOTICE,'utf8'),_0x2b615e=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x3d609d);_0x4152d0=sliceUtf8Bytes(_0x4152d0,_0x2b615e)+TRUNCATION_NOTICE;}return{'description':_0x4152d0,'originalBytes':_0x2b21bd,'truncated':_0x590844,'redactionCount':_0x3f8615,'redactionKinds':_0x1e7355};}function protectOssAccessKeyIds(_0x5c3d7d){const _0x4714e=a99_0x5e021c,_0x3d3e4c=[],_0x479428=_0x5c3d7d['replace'](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x223d58,_0x1f61e3)=>{const _0x30c412=a99_0x5270,_0x10cb4c=_0x3d3e4c[_0x30c412(0x168)](_0x223d58['slice'](_0x1f61e3[_0x30c412(0x153)]))-0x1;return _0x1f61e3+_0x30c412(0x154)+_0x10cb4c+'__';});return{'description':_0x479428,'restore':_0x280e76=>_0x280e76[_0x4714e(0x14f)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x589a50,_0x3133d4,_0x19b988)=>{const _0x388ddf=_0x3d3e4c[Number(_0x19b988)];return _0x388ddf===undefined?_0x589a50:''+_0x3133d4+_0x388ddf;})};}function a99_0x2283(){const _0x2bb8eb=['private-key','authorization','byteLength','cookie','REDACTED:password','161540FwfnOp','restore','toString','string','push','from','REDACTED:cookie','includes','5431998TeJRAn','replace','utf8','kind','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','length','__RB_OSS_ID_','4645315mcSYao','bearer-jwt','313447wFPprq','4650296cnXHsu','pattern','password','REDACTED:private-key','78cBazUj','1091028tfIIMs','4960354BxSLVa'];a99_0x2283=function(){return _0x2bb8eb;};return a99_0x2283();}function sliceUtf8Bytes(_0x5964be,_0x3a197e){const _0x37d331=a99_0x5e021c;if(_0x3a197e<=0x0)return'';const _0x105ac1=Buffer[_0x37d331(0x169)](_0x5964be,_0x37d331(0x150));if(_0x105ac1['byteLength']<=_0x3a197e)return _0x5964be;let _0x447aa1=_0x3a197e;while(_0x447aa1>0x0){const _0x2ddf5e=_0x105ac1[_0x447aa1];if(_0x2ddf5e===undefined||(_0x2ddf5e&0xc0)!==0x80)break;_0x447aa1-=0x1;}return _0x105ac1['subarray'](0x0,_0x447aa1)[_0x37d331(0x166)](_0x37d331(0x150));}
1
+ const a99_0x131d76=a99_0x2e83;(function(_0x3b003f,_0x2b9284){const _0x1f7c0d=a99_0x2e83,_0x1a7bc6=_0x3b003f();while(!![]){try{const _0x4a440a=parseInt(_0x1f7c0d(0x10b))/0x1+-parseInt(_0x1f7c0d(0x10d))/0x2*(parseInt(_0x1f7c0d(0xe9))/0x3)+-parseInt(_0x1f7c0d(0xea))/0x4+parseInt(_0x1f7c0d(0xf2))/0x5+parseInt(_0x1f7c0d(0x102))/0x6*(-parseInt(_0x1f7c0d(0xf9))/0x7)+-parseInt(_0x1f7c0d(0xfe))/0x8+parseInt(_0x1f7c0d(0xf6))/0x9*(parseInt(_0x1f7c0d(0x10e))/0xa);if(_0x4a440a===_0x2b9284)break;else _0x1a7bc6['push'](_0x1a7bc6['shift']());}catch(_0x3a7575){_0x1a7bc6['push'](_0x1a7bc6['shift']());}}}(a99_0x8cb7,0xb90a8));function a99_0x8cb7(){const _0x31bbe4=['replace','from','REDACTED:authorization','pattern','1491352kBEsYx','REDACTED:access-key','private-key','length','1059126iNCGpk','toString','cookie','kind','utf8','subarray','max','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','REDACTED:cookie','1265749gjWeGv','slice','2234grKwEU','30QQIemO','1620UdXQWY','2864812qBEOcb','access-key','REDACTED:password','includes','description','restore','push','password','3712420PONIfX','REDACTED:private-key','string','byteLength','4473432xFDBuO','label','REDACTED:bearer-jwt','49UMwtvN'];a99_0x8cb7=function(){return _0x31bbe4;};return a99_0x8cb7();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a99_0x131d76(0x109),REDACTION_RULES=[{'kind':a99_0x131d76(0x104),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a99_0x131d76(0x10a)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a99_0x131d76(0xfc)},{'kind':a99_0x131d76(0x100),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a99_0x131d76(0xf3)},{'kind':a99_0x131d76(0xeb),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a99_0x131d76(0xff)},{'kind':a99_0x131d76(0xf1),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a99_0x131d76(0xec)},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a99_0x131d76(0xf8)}];export function sanitizeIssueDescription(_0xb64e7){const _0x46986f=a99_0x131d76,_0x17224c=Buffer[_0x46986f(0xf5)](_0xb64e7,_0x46986f(0x106)),_0xe6e215=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5564c6=_0xb64e7,_0x164a71=0x0;const _0xdf725d=[];if(!_0xe6e215){const _0xa78ccb=protectOssAccessKeyIds(_0x5564c6);_0x5564c6=_0xa78ccb[_0x46986f(0xee)];for(const _0x191009 of REDACTION_RULES){let _0x53afde=0x0;_0x5564c6=_0x5564c6['replace'](_0x191009[_0x46986f(0xfd)],(_0x2240e8,_0x327eb8)=>{const _0x46434d=_0x46986f;_0x53afde+=0x1;const _0x38ce30=typeof _0x327eb8===_0x46434d(0xf4)?_0x327eb8:'';return _0x38ce30+'['+_0x191009[_0x46434d(0xf7)]+']';}),_0x53afde>0x0&&(_0x164a71+=_0x53afde,!_0xdf725d[_0x46986f(0xed)](_0x191009['kind'])&&_0xdf725d[_0x46986f(0xf0)](_0x191009[_0x46986f(0x105)]));}_0x5564c6=_0xa78ccb[_0x46986f(0xef)](_0x5564c6);}let _0x5b60aa=![];if(Buffer['byteLength'](_0x5564c6,_0x46986f(0x106))>ISSUE_DESCRIPTION_MAX_BYTES){_0x5b60aa=!![];const _0x5e478a=Buffer[_0x46986f(0xf5)](TRUNCATION_NOTICE,'utf8'),_0x5ad65f=Math[_0x46986f(0x108)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x5e478a);_0x5564c6=sliceUtf8Bytes(_0x5564c6,_0x5ad65f)+TRUNCATION_NOTICE;}return{'description':_0x5564c6,'originalBytes':_0x17224c,'truncated':_0x5b60aa,'redactionCount':_0x164a71,'redactionKinds':_0xdf725d};}function a99_0x2e83(_0x124b80,_0x4c01a2){_0x124b80=_0x124b80-0xe9;const _0x8cb7b3=a99_0x8cb7();let _0x2e83ae=_0x8cb7b3[_0x124b80];return _0x2e83ae;}function protectOssAccessKeyIds(_0x4e8b34){const _0x2bb19a=a99_0x131d76,_0x114054=[],_0x32a8e3=_0x4e8b34[_0x2bb19a(0xfa)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x2ca086,_0x4f0b2b)=>{const _0xefd6b6=_0x2bb19a,_0x2e298a=_0x114054[_0xefd6b6(0xf0)](_0x2ca086[_0xefd6b6(0x10c)](_0x4f0b2b[_0xefd6b6(0x101)]))-0x1;return _0x4f0b2b+'__RB_OSS_ID_'+_0x2e298a+'__';});return{'description':_0x32a8e3,'restore':_0x2e41dd=>_0x2e41dd[_0x2bb19a(0xfa)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x48fa36,_0x40421e,_0x42dd63)=>{const _0xb7ac3d=_0x114054[Number(_0x42dd63)];return _0xb7ac3d===undefined?_0x48fa36:''+_0x40421e+_0xb7ac3d;})};}function sliceUtf8Bytes(_0x2d032c,_0x3e5c01){const _0x1fe4b7=a99_0x131d76;if(_0x3e5c01<=0x0)return'';const _0x3aad3d=Buffer[_0x1fe4b7(0xfb)](_0x2d032c,_0x1fe4b7(0x106));if(_0x3aad3d[_0x1fe4b7(0xf5)]<=_0x3e5c01)return _0x2d032c;let _0x28cccd=_0x3e5c01;while(_0x28cccd>0x0){const _0x2b8126=_0x3aad3d[_0x28cccd];if(_0x2b8126===undefined||(_0x2b8126&0xc0)!==0x80)break;_0x28cccd-=0x1;}return _0x3aad3d[_0x1fe4b7(0x107)](0x0,_0x28cccd)[_0x1fe4b7(0x103)]('utf8');}
@@ -0,0 +1 @@
1
+ const a100_0xf8d056=a100_0x5ce6;(function(_0xd37274,_0x2dc284){const _0x340770=a100_0x5ce6,_0x5061b1=_0xd37274();while(!![]){try{const _0x34e188=parseInt(_0x340770(0x8b))/0x1*(parseInt(_0x340770(0x97))/0x2)+-parseInt(_0x340770(0xa0))/0x3*(-parseInt(_0x340770(0x9b))/0x4)+parseInt(_0x340770(0x96))/0x5*(parseInt(_0x340770(0x7a))/0x6)+parseInt(_0x340770(0x8e))/0x7+parseInt(_0x340770(0x91))/0x8*(-parseInt(_0x340770(0x82))/0x9)+-parseInt(_0x340770(0x84))/0xa*(parseInt(_0x340770(0x7e))/0xb)+-parseInt(_0x340770(0x77))/0xc;if(_0x34e188===_0x2dc284)break;else _0x5061b1['push'](_0x5061b1['shift']());}catch(_0x21d60f){_0x5061b1['push'](_0x5061b1['shift']());}}}(a100_0x493f,0xee193));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a100_0x493f(){const _0x1f7f8f=['\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','21336UxxfDF','string','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','\x20with\x20title\x20','22uFKmcX','cookie','appCode','\x20--format\x20compress','3551193KcjFql','POST','4893340GHtNRk','length','file','kb_title_required','title','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','verified','1564183PbppBe','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','kb_verification_failed','12382944tpDhgn','contentHash','\x20--format\x20compress`\x20before\x20choosing\x20update.','24knhlJY','kb_already_exists','create','--title\x20is\x20required.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','145VQGrrI','2fJPtYY','content','high-risk-write','byteSize','3116ZwTxTS','Company\x20knowledge\x20base\x20','--file\x20is\x20required.','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','\x20for\x20','5124bgxmIw','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','19550172LWygkE','Knowledge-base\x20title'];a100_0x493f=function(){return _0x1f7f8f;};return a100_0x493f();}import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH='/admin/knowledge-base/create';function readCreateInput(_0x59f9cb){const _0x4ac244=a100_0x5ce6,_0x139cfb=_0x59f9cb['str'](_0x4ac244(0x88))['trim']();if(!_0x139cfb)throw kbError(_0x4ac244(0x87),_0x4ac244(0x94));const _0x359958=_0x59f9cb['str'](_0x4ac244(0x86))['trim']();if(!_0x359958)throw kbError('kb_file_required',_0x4ac244(0x9d),_0x4ac244(0x95));return{'title':_0x139cfb,'file':_0x359958};}async function prepareCreate(_0x4a9a1c){const _0x446b23=a100_0x5ce6,_0x3da71d=readCreateInput(_0x4a9a1c),_0x1fd8ac=await readKbFile(_0x3da71d[_0x446b23(0x86)]),_0x3ab8be=await fetchAllCompanyKnowledgeBases(_0x4a9a1c,{'title':_0x3da71d[_0x446b23(0x88)]}),_0x47b27d=findExactCompanyKnowledgeBases(_0x3ab8be,_0x4a9a1c[_0x446b23(0x80)],_0x3da71d[_0x446b23(0x88)]);if(_0x47b27d[_0x446b23(0x85)]>0x0)throw kbError(_0x446b23(0x92),_0x446b23(0x89)+_0x4a9a1c[_0x446b23(0x80)]+_0x446b23(0x7d)+_0x3da71d[_0x446b23(0x88)]+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x47b27d[0x0]['id']+_0x446b23(0x90));return{..._0x3da71d,'content':_0x1fd8ac};}function plannedAfter(_0x1b5a50,_0x56b43c){const _0x22a004=a100_0x5ce6;return{'scope':'company','appCode':_0x1b5a50[_0x22a004(0x80)],'title':_0x56b43c[_0x22a004(0x88)],'contentByteSize':_0x56b43c[_0x22a004(0x98)][_0x22a004(0x9a)],'contentHash':_0x56b43c[_0x22a004(0x98)]['contentHash']};}function a100_0x5ce6(_0x4950d0,_0x529cf5){_0x4950d0=_0x4950d0-0x76;const _0x493f36=a100_0x493f();let _0x5ce676=_0x493f36[_0x4950d0];return _0x5ce676;}function verifyCreatedState(_0x345141,_0x1c2731,_0x1ba7fd){const _0x59b943=a100_0x5ce6;assertCompanyKnowledgeBase(_0x1ba7fd,_0x345141[_0x59b943(0x80)],_0x1ba7fd['id']);const _0x5bad5f=inspectKbContent(_0x1ba7fd['content']);if(_0x1ba7fd['title']!==_0x1c2731['title']||_0x5bad5f[_0x59b943(0x8f)]!==_0x1c2731[_0x59b943(0x98)][_0x59b943(0x8f)])throw kbError(_0x59b943(0x8d),_0x59b943(0x9c)+_0x1ba7fd['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.',_0x59b943(0x76)+_0x1ba7fd['id']+_0x59b943(0x79));return projectKb(_0x1ba7fd);}export const kbCreate={'service':'kb','command':a100_0xf8d056(0x93),'description':a100_0xf8d056(0x7c),'risk':a100_0xf8d056(0x99),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a100_0xf8d056(0x7b),'required':!![],'description':a100_0xf8d056(0x78)},{'name':a100_0xf8d056(0x86),'type':a100_0xf8d056(0x7b),'required':!![],'description':'UTF-8\x20text\x20or\x20Markdown\x20content\x20file'}],async 'validate'(_0x98aeb5){readCreateInput(_0x98aeb5),requireKbExplicitYes(_0x98aeb5);},async 'dryRun'(_0x4aa155){const _0x545dad=a100_0xf8d056,_0x2d5e09=await prepareCreate(_0x4aa155);return asDryRunResult({'operation':_0x545dad(0x93),'selector':{'scope':'company','appCode':_0x4aa155['appCode'],'title':_0x2d5e09[_0x545dad(0x88)]},'before':null,'after':plannedAfter(_0x4aa155,_0x2d5e09),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':'rabetbase\x20kb\x20list\x20--title\x20'+JSON['stringify'](_0x2d5e09['title'])+_0x545dad(0x81)}},{'method':_0x545dad(0x83),'url':CREATE_PATH});},async 'execute'(_0x5d90eb){const _0xe6a91c=a100_0xf8d056;requireKbExplicitYes(_0x5d90eb);const _0x44f6bf=await prepareCreate(_0x5d90eb);let _0x2f79cd,_0x58981b=![];try{const _0x45a94f=await createEnterpriseKnowledgeBase(_0x5d90eb[_0xe6a91c(0x7f)],{'appCode':_0x5d90eb['appCode'],'title':_0x44f6bf['title'],'content':_0x44f6bf['content']['content']});assertCompanyKnowledgeBase(_0x45a94f,_0x5d90eb['appCode'],_0x45a94f['id']),_0x2f79cd=_0x45a94f['id'];}catch(_0x567326){if(!isPlatformTransportFailure(_0x567326))throw _0x567326;_0x58981b=!![];}if(_0x2f79cd===undefined){const _0xb32eb7=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x5d90eb,{'title':_0x44f6bf[_0xe6a91c(0x88)]})),_0x5e9fa8=findExactCompanyKnowledgeBases(_0xb32eb7,_0x5d90eb[_0xe6a91c(0x80)],_0x44f6bf['title']);if(_0x5e9fa8[_0xe6a91c(0x85)]!==0x1)throw kbError('kb_create_outcome_unknown',_0xe6a91c(0x9e)+_0x5e9fa8[_0xe6a91c(0x85)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x2f79cd=_0x5e9fa8[0x0]['id'];}const _0x9b5ea7=await verifyKbMutationReadback(_0xe6a91c(0x93),_0x58981b,()=>requireKb(_0x5d90eb,_0x2f79cd)),_0x4a9aef=verifyCreatedState(_0x5d90eb,_0x44f6bf,_0x9b5ea7),_0x1b118e=_0x58981b?[_0xe6a91c(0x8c)]:[];return{'ok':!![],'data':{'operation':_0xe6a91c(0x93),'selector':{'id':_0x4a9aef['id'],'scope':'company','appCode':_0x4a9aef[_0xe6a91c(0x80)]},'before':null,'after':_0x4a9aef,'dryRun':![],'backend':{'method':_0xe6a91c(0x83),'path':CREATE_PATH},'warnings':_0x1b118e,'verification':{'status':_0xe6a91c(0x8a),'recoveredAfterUnknownResponse':_0x58981b,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x4a9aef['id']+_0xe6a91c(0x81)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x4a9aef['id']+_0xe6a91c(0x9f)+_0x4a9aef[_0xe6a91c(0x80)]};}};
@@ -0,0 +1 @@
1
+ function a101_0x42ce(_0x1d4d5a,_0x4f0371){_0x1d4d5a=_0x1d4d5a-0xcc;const _0x351b14=a101_0x351b();let _0x42cec0=_0x351b14[_0x1d4d5a];return _0x42cec0;}const a101_0x173468=a101_0x42ce;(function(_0x557f0d,_0x1846bb){const _0x210af9=a101_0x42ce,_0x2d429e=_0x557f0d();while(!![]){try{const _0x567b31=parseInt(_0x210af9(0xd6))/0x1+-parseInt(_0x210af9(0xe5))/0x2*(parseInt(_0x210af9(0xe9))/0x3)+-parseInt(_0x210af9(0xe0))/0x4+-parseInt(_0x210af9(0xea))/0x5*(-parseInt(_0x210af9(0xcd))/0x6)+parseInt(_0x210af9(0xde))/0x7*(-parseInt(_0x210af9(0xf1))/0x8)+-parseInt(_0x210af9(0xd3))/0x9*(parseInt(_0x210af9(0xed))/0xa)+-parseInt(_0x210af9(0xe2))/0xb*(-parseInt(_0x210af9(0xce))/0xc);if(_0x567b31===_0x1846bb)break;else _0x2d429e['push'](_0x2d429e['shift']());}catch(_0x2f6646){_0x2d429e['push'](_0x2d429e['shift']());}}}(a101_0x351b,0xe751a));function a101_0x351b(){const _0x2e23a8=['Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','POST','expected-version','isSafeInteger','9dYqMpE','Company\x20knowledge-base\x20id','snapshotHash','1326313NsllyK','high-risk-write','flag','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','already_absent','unshift','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','5431531cIenPz','Soft-deleted\x20company\x20knowledge\x20base\x20','1938180AqdpiG','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','3121294vFpoql','number','\x20--format\x20compress','6236SjIxRw','verified','cookie','delete','1551GjFKIn','5MnwICs','Company\x20knowledge\x20base\x20','rabetbase\x20kb\x20detail\x20--id\x20','3969830bHFfse','appCode','kb_expected_version_invalid','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','8pXwmoJ','\x20remains\x20readable\x20after\x20delete.','company','318576qQiewC','120RRZNuQ'];a101_0x351b=function(){return _0x2e23a8;};return a101_0x351b();}import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a101_0x173468(0xcf),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x42957e){const _0x232f2b=a101_0x173468,_0x5b5b68=_0x42957e[_0x232f2b(0xd8)](_0x232f2b(0xd1));if(_0x5b5b68===undefined)return undefined;const _0x2a5577=Number(_0x5b5b68);if(!Number[_0x232f2b(0xd2)](_0x2a5577)||_0x2a5577<0x0)throw kbError(_0x232f2b(0xef),_0x232f2b(0xd9));return _0x2a5577;}function noOpData(_0x18a703,_0x2c7eae,_0x21dc75){const _0x326ae1=a101_0x173468;return{'operation':'no_op','selector':{'id':_0x2c7eae,'scope':_0x326ae1(0xcc),'appCode':_0x18a703['appCode']},'before':null,'after':null,'dryRun':_0x21dc75,'deleteCalled':![],'backend':{'method':_0x326ae1(0xd0),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x326ae1(0xda),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a101_0x173468(0xe8),'description':a101_0x173468(0xdd),'risk':a101_0x173468(0xd7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a101_0x173468(0xe3),'required':!![],'description':a101_0x173468(0xd4)},{'name':a101_0x173468(0xd1),'type':a101_0x173468(0xe3),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x4d1941){readKbId(_0x4d1941),readExpectedVersion(_0x4d1941),requireKbExplicitYes(_0x4d1941);},async 'dryRun'(_0x3f75cb){const _0x8f2a1b=a101_0x173468,_0x470a5a=readKbId(_0x3f75cb),_0x2bce37=readExpectedVersion(_0x3f75cb),_0x3f0635=await getKbOrNull(_0x3f75cb,_0x470a5a);if(!_0x3f0635)return asDryRunResult(noOpData(_0x3f75cb,_0x470a5a,!![]),{'method':_0x8f2a1b(0xd0),'url':DELETE_PATH});assertExpectedKbVersion(_0x3f0635,_0x2bce37);const _0x5ac312=projectKb(_0x3f0635),_0x44c21b=[RAG_WARNING];if(_0x2bce37!==undefined)_0x44c21b['unshift'](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0x5ac312['id'],'scope':'company','appCode':_0x5ac312[_0x8f2a1b(0xee)]},'before':_0x5ac312,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x8f2a1b(0xd0),'path':DELETE_PATH},'warnings':_0x44c21b,'verification':{'expectedVersion':_0x2bce37??null,'atomicCompareAndSet':![],'snapshotHash':_0x5ac312[_0x8f2a1b(0xd5)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x8f2a1b(0xec)+_0x5ac312['id']+'\x20--format\x20compress'}},{'method':_0x8f2a1b(0xd0),'url':DELETE_PATH});},async 'execute'(_0x1a5b08){const _0x50e3f1=a101_0x173468;requireKbExplicitYes(_0x1a5b08);const _0x3b3fe5=readKbId(_0x1a5b08),_0x4c52ab=readExpectedVersion(_0x1a5b08),_0x508ea3=await getKbOrNull(_0x1a5b08,_0x3b3fe5);if(!_0x508ea3)return{'ok':!![],'data':noOpData(_0x1a5b08,_0x3b3fe5,![]),'message':_0x50e3f1(0xeb)+_0x3b3fe5+_0x50e3f1(0xf0)};assertExpectedKbVersion(_0x508ea3,_0x4c52ab);const _0x317d4c=projectKb(_0x508ea3);let _0x2bae53=![];try{await deleteEnterpriseKnowledgeBase(_0x1a5b08[_0x50e3f1(0xe7)],_0x3b3fe5);}catch(_0x115b08){if(!isPlatformTransportFailure(_0x115b08))throw _0x115b08;_0x2bae53=!![];}const _0x38a916=await verifyKbMutationReadback('delete',_0x2bae53,()=>getKbOrNull(_0x1a5b08,_0x3b3fe5));if(_0x38a916)throw kbError(_0x2bae53?'kb_delete_outcome_unknown':'kb_verification_failed',_0x50e3f1(0xeb)+_0x3b3fe5+_0x50e3f1(0xf2),_0x50e3f1(0xdc)+_0x3b3fe5+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x18e608=[RAG_WARNING];if(_0x4c52ab!==undefined)_0x18e608[_0x50e3f1(0xdb)](NON_ATOMIC_WARNING);return _0x2bae53&&_0x18e608['unshift'](_0x50e3f1(0xe1)),{'ok':!![],'data':{'operation':_0x50e3f1(0xe8),'selector':{'id':_0x317d4c['id'],'scope':_0x50e3f1(0xcc),'appCode':_0x317d4c[_0x50e3f1(0xee)]},'before':_0x317d4c,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x50e3f1(0xd0),'path':DELETE_PATH},'warnings':_0x18e608,'verification':{'status':_0x50e3f1(0xe6),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x2bae53,'lookupCommand':_0x50e3f1(0xec)+_0x317d4c['id']+_0x50e3f1(0xe4)}},'message':_0x50e3f1(0xdf)+_0x317d4c['id']};}};
@@ -0,0 +1 @@
1
+ const a102_0x294c95=a102_0x1265;function a102_0x1265(_0x8918f9,_0x4e30ca){_0x8918f9=_0x8918f9-0x1e4;const _0x5b590d=a102_0x5b59();let _0x126511=_0x5b590d[_0x8918f9];return _0x126511;}function a102_0x5b59(){const _0x387a0e=['24GoBcMw','175JDldDG','221142ojeAex','detail','814HlbuSy','Loaded\x20company\x20knowledge\x20base\x20','read','10910024bNwBAz','7575939ZPHCIz','21795169xiQwSe','Company\x20knowledge-base\x20id','9711050uEsesf','7WVkzKJ','1483GEvkDF','377586sQzfdl'];a102_0x5b59=function(){return _0x387a0e;};return a102_0x5b59();}(function(_0x428a58,_0x4a5090){const _0xd41e80=a102_0x1265,_0x1eb3c8=_0x428a58();while(!![]){try{const _0x480740=parseInt(_0xd41e80(0x1ed))/0x1*(-parseInt(_0xd41e80(0x1e4))/0x2)+-parseInt(_0xd41e80(0x1ee))/0x3*(-parseInt(_0xd41e80(0x1ef))/0x4)+-parseInt(_0xd41e80(0x1f0))/0x5*(-parseInt(_0xd41e80(0x1f1))/0x6)+parseInt(_0xd41e80(0x1ec))/0x7*(parseInt(_0xd41e80(0x1e7))/0x8)+parseInt(_0xd41e80(0x1e8))/0x9+-parseInt(_0xd41e80(0x1eb))/0xa+-parseInt(_0xd41e80(0x1e9))/0xb;if(_0x480740===_0x4a5090)break;else _0x1eb3c8['push'](_0x1eb3c8['shift']());}catch(_0x3cb946){_0x1eb3c8['push'](_0x1eb3c8['shift']());}}}(a102_0x5b59,0xa9962));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a102_0x294c95(0x1f2),'description':'Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a102_0x294c95(0x1e6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a102_0x294c95(0x1ea)}],async 'validate'(_0x11dd42){readKbId(_0x11dd42);},async 'execute'(_0x4817a3){const _0x439762=a102_0x294c95,_0x4fd60f=readKbId(_0x4817a3),_0x2406f7=await requireKb(_0x4817a3,_0x4fd60f);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x2406f7)},'message':_0x439762(0x1e5)+_0x4fd60f};}};
@@ -0,0 +1 @@
1
+ (function(_0xb74d76,_0x5f44e9){const _0xf17658=a103_0x4bdb,_0x30e41c=_0xb74d76();while(!![]){try{const _0x460757=parseInt(_0xf17658(0x1ea))/0x1+-parseInt(_0xf17658(0x1ee))/0x2*(-parseInt(_0xf17658(0x1ec))/0x3)+parseInt(_0xf17658(0x1ef))/0x4+-parseInt(_0xf17658(0x1f1))/0x5+parseInt(_0xf17658(0x1e9))/0x6*(-parseInt(_0xf17658(0x1e8))/0x7)+parseInt(_0xf17658(0x1f0))/0x8*(parseInt(_0xf17658(0x1f2))/0x9)+parseInt(_0xf17658(0x1ed))/0xa*(-parseInt(_0xf17658(0x1eb))/0xb);if(_0x460757===_0x5f44e9)break;else _0x30e41c['push'](_0x30e41c['shift']());}catch(_0x3b3465){_0x30e41c['push'](_0x30e41c['shift']());}}}(a103_0xf93c,0xcce3f));function a103_0x4bdb(_0x52dd9d,_0x52abf4){_0x52dd9d=_0x52dd9d-0x1e8;const _0xf93c3a=a103_0xf93c();let _0x4bdba8=_0xf93c3a[_0x52dd9d];return _0x4bdba8;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];function a103_0xf93c(){const _0x2addb8=['5966084iNUTOX','376hQFoeL','7954555CthvHB','196605rnoLYN','255913ghAVIT','54AbuUMW','1452738oujcQp','117106FSwCuy','16719EmkBVE','2180OVOUZA','398LMtbJE'];a103_0xf93c=function(){return _0x2addb8;};return a103_0xf93c();}
@@ -0,0 +1 @@
1
+ function a104_0x4011(_0x16bdff,_0x1c125f){_0x16bdff=_0x16bdff-0x1b0;const _0x10babf=a104_0x10ba();let _0x401195=_0x10babf[_0x16bdff];return _0x401195;}const a104_0x23da95=a104_0x4011;function a104_0x10ba(){const _0x1a7f47=['list','\x20company\x20knowledge\x20base(s)\x20for\x20','length','appCode','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','Found\x20','title','map','string','371168LLMSbq','str','138FxWlkU','Filter\x20by\x20knowledge-base\x20title','361951JuGeFS','3963348eUVJhJ','11TukBYW','21mDEvhe','300835jynARI','4733559NWyqAL','10LwJooI','7606510RlILNk','trim','6373899UsxgVs'];a104_0x10ba=function(){return _0x1a7f47;};return a104_0x10ba();}(function(_0x15f1d7,_0x35fa81){const _0x290bfe=a104_0x4011,_0x2304f9=_0x15f1d7();while(!![]){try{const _0x4cb7eb=parseInt(_0x290bfe(0x1bc))/0x1*(parseInt(_0x290bfe(0x1c2))/0x2)+parseInt(_0x290bfe(0x1c1))/0x3+-parseInt(_0x290bfe(0x1bd))/0x4+-parseInt(_0x290bfe(0x1c0))/0x5*(parseInt(_0x290bfe(0x1ba))/0x6)+parseInt(_0x290bfe(0x1bf))/0x7*(-parseInt(_0x290bfe(0x1b8))/0x8)+-parseInt(_0x290bfe(0x1c5))/0x9+-parseInt(_0x290bfe(0x1c3))/0xa*(-parseInt(_0x290bfe(0x1be))/0xb);if(_0x4cb7eb===_0x35fa81)break;else _0x2304f9['push'](_0x2304f9['shift']());}catch(_0x39453a){_0x2304f9['push'](_0x2304f9['shift']());}}}(a104_0x10ba,0xe21e6));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a104_0x23da95(0x1c6),'description':a104_0x23da95(0x1b3),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a104_0x23da95(0x1b5),'type':a104_0x23da95(0x1b7),'required':![],'description':a104_0x23da95(0x1bb)}],async 'execute'(_0x14ac62){const _0x35f7d1=a104_0x23da95,_0x415deb=_0x14ac62[_0x35f7d1(0x1b9)]('title')[_0x35f7d1(0x1c4)](),_0x1b121c=await fetchAllCompanyKnowledgeBases(_0x14ac62,{..._0x415deb?{'title':_0x415deb}:{}}),_0x587fc4=_0x1b121c[_0x35f7d1(0x1b6)](projectKb);return{'ok':!![],'data':{'total':_0x587fc4['length'],'knowledgeBases':_0x587fc4},'message':_0x35f7d1(0x1b4)+_0x587fc4[_0x35f7d1(0x1b1)]+_0x35f7d1(0x1b0)+_0x14ac62[_0x35f7d1(0x1b2)]};}};
@@ -0,0 +1 @@
1
+ const a105_0x5718d8=a105_0x2b92;(function(_0x41cc24,_0x17e3bf){const _0x1e4560=a105_0x2b92,_0x5b0cf5=_0x41cc24();while(!![]){try{const _0x405af4=parseInt(_0x1e4560(0x204))/0x1+parseInt(_0x1e4560(0x23c))/0x2*(-parseInt(_0x1e4560(0x231))/0x3)+parseInt(_0x1e4560(0x203))/0x4+parseInt(_0x1e4560(0x227))/0x5+parseInt(_0x1e4560(0x23b))/0x6*(-parseInt(_0x1e4560(0x1f2))/0x7)+-parseInt(_0x1e4560(0x1f1))/0x8+parseInt(_0x1e4560(0x22d))/0x9;if(_0x405af4===_0x17e3bf)break;else _0x5b0cf5['push'](_0x5b0cf5['shift']());}catch(_0x5e9fc1){_0x5b0cf5['push'](_0x5b0cf5['shift']());}}}(a105_0x1542,0xc5253));function a105_0x1542(){const _0x7e09dd=['appCode','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','totalCount','length','dry-run','kb_response_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','push','defineProperty','string','1692335ivtfWF','byteLength','cause','Company\x20knowledge\x20base\x20not\x20found:\x20','paging','\x20version\x20changed:\x20expected\x20','16192368YJpBMh','Knowledge\x20base\x20','The\x20','filter','808398GTwnbZ','currentPage','sha256:','\x20was\x20requested.','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','content','kb_scope_mismatch','updateTime','kb_file_required','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','6NmZAZz','4SjbNHi','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','bool','Knowledge-base\x20list\x20stopped\x20at\x20','kb_file_unreadable','\x20response\x20is\x20missing\x20','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','utf-8',',\x20current\x20','cookie','12802856NBQhCM','6887013VLepXB','Pass\x20--file\x20<knowledge.md>.','Knowledge-base\x20list\x20total\x20changed\x20from\x20','isFile','\x20to\x20','kb_not_found','digest','outcome_unknown','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','\x20records.','306','isSafeInteger','\x20response\x20contains\x20an\x20invalid\x20version.','kb_file_invalid','decode','number','company','3626904xssvYB','886310fjbVPa','kb_id_invalid','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','createTime','scope','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','items','kb_confirmation_required','stringify','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','Knowledge-base\x20list\x20returned\x20page\x20','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','trim','verification_unavailable','from','kb_list_contract_invalid','add','title','kb_content_invalid','\x20while\x20page\x20','has','yes','version','contentHash'];a105_0x1542=function(){return _0x7e09dd;};return a105_0x1542();}function a105_0x2b92(_0x4a22b9,_0x10b3be){_0x4a22b9=_0x4a22b9-0x1ee;const _0x15420c=a105_0x1542();let _0x2b9290=_0x15420c[_0x4a22b9];return _0x2b9290;}import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a105_0x5718d8(0x1fc);export function kbError(_0x21583d,_0x10df82,_0x5c23b3){return new CliError(_0x21583d,0x1,_0x10df82,_0x5c23b3);}export function readKbId(_0x338c6b){const _0x17e995=a105_0x5718d8,_0x207032=_0x338c6b['num']('id');if(!Number[_0x17e995(0x1fd)](_0x207032)||_0x207032<=0x0)throw kbError(_0x17e995(0x205),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x207032;}export function requireKbExplicitYes(_0x1b79c4){const _0x4dff30=a105_0x5718d8;if(_0x1b79c4['bool'](_0x4dff30(0x221))||_0x1b79c4[_0x4dff30(0x23e)](_0x4dff30(0x219)))return;throw kbError(_0x4dff30(0x20b),_0x4dff30(0x23d),_0x4dff30(0x23a));}function sha256(_0xacbac6){const _0x1a6564=a105_0x5718d8;return _0x1a6564(0x233)+createHash('sha256')['update'](_0xacbac6)[_0x1a6564(0x1f8)]('hex');}export function inspectKbContent(_0x7aef9d){const _0xcaf824=a105_0x5718d8,_0x311f9=Buffer[_0xcaf824(0x212)](_0x7aef9d,'utf8');return{'content':_0x7aef9d,'byteSize':_0x311f9[_0xcaf824(0x228)],'contentHash':sha256(_0x311f9)};}export async function readKbFile(_0x47a07f){const _0x4a0f90=a105_0x5718d8,_0x70a782=_0x47a07f[_0x4a0f90(0x210)]();if(!_0x70a782)throw kbError(_0x4a0f90(0x239),_0x4a0f90(0x20d),_0x4a0f90(0x1f3));const _0x3975a0=resolve(_0x70a782);let _0x54498b;try{_0x54498b=await stat(_0x3975a0);}catch(_0x3f0a3a){throw kbError(_0x4a0f90(0x240),_0x4a0f90(0x20f)+_0x70a782,_0x3f0a3a instanceof Error?_0x3f0a3a['message']:String(_0x3f0a3a));}if(!_0x54498b[_0x4a0f90(0x1f5)]())throw kbError(_0x4a0f90(0x1ff),_0x4a0f90(0x209)+_0x70a782);let _0x5c2d5d;try{_0x5c2d5d=await readFile(_0x3975a0);}catch(_0x1867c7){throw kbError(_0x4a0f90(0x240),_0x4a0f90(0x21e)+_0x70a782,_0x1867c7 instanceof Error?_0x1867c7['message']:String(_0x1867c7));}let _0x3d3c9c;try{_0x3d3c9c=new TextDecoder(_0x4a0f90(0x1ee),{'fatal':!![],'ignoreBOM':!![]})[_0x4a0f90(0x200)](_0x5c2d5d);}catch{throw kbError(_0x4a0f90(0x216),_0x4a0f90(0x242)+_0x70a782);}if(!_0x3d3c9c[_0x4a0f90(0x210)]())throw kbError(_0x4a0f90(0x216),_0x4a0f90(0x223)+_0x70a782);return inspectKbContent(_0x3d3c9c);}export async function verifyKbMutationReadback(_0x64c60,_0xf49dc4,_0x305828){const _0x23fea1=a105_0x5718d8;try{return await _0x305828();}catch(_0x546b1f){const _0x5b272f=kbError('kb_'+_0x64c60+'_'+(_0xf49dc4?_0x23fea1(0x1f9):_0x23fea1(0x211)),_0x23fea1(0x22f)+_0x64c60+_0x23fea1(0x1fa),_0x23fea1(0x235));Object[_0x23fea1(0x225)](_0x5b272f,_0x23fea1(0x229),{'value':_0x546b1f,'enumerable':![]});throw _0x5b272f;}}function requireRecordText(_0x511c00,_0x250c6e,_0x4fef39,_0x13513f={}){const _0x4892c3=a105_0x5718d8;if(typeof _0x511c00===_0x4892c3(0x226)&&(_0x13513f['allowEmpty']||_0x511c00[_0x4892c3(0x210)]()))return _0x511c00;throw kbError(_0x4892c3(0x222),_0x4892c3(0x22e)+String(_0x4fef39)+_0x4892c3(0x241)+_0x250c6e+'.');}export function projectKb(_0x61c2e3){const _0x1a1065=a105_0x5718d8;if(!Number[_0x1a1065(0x1fd)](_0x61c2e3['id'])||_0x61c2e3['id']<=0x0)throw kbError(_0x1a1065(0x222),_0x1a1065(0x21d));if(!Number['isSafeInteger'](_0x61c2e3[_0x1a1065(0x21a)])||_0x61c2e3['version']<0x0)throw kbError('kb_response_invalid','Knowledge\x20base\x20'+_0x61c2e3['id']+_0x1a1065(0x1fe));if(_0x61c2e3[_0x1a1065(0x208)]!==_0x1a1065(0x202))throw kbError(_0x1a1065(0x237),'Knowledge\x20base\x20'+_0x61c2e3['id']+'\x20is\x20not\x20company-scoped.');const _0x1fcfc1=requireRecordText(_0x61c2e3[_0x1a1065(0x21c)],_0x1a1065(0x21c),_0x61c2e3['id']),_0x3875d0=requireRecordText(_0x61c2e3['title'],_0x1a1065(0x215),_0x61c2e3['id']),_0x12c14e=inspectKbContent(requireRecordText(_0x61c2e3[_0x1a1065(0x236)],'content',_0x61c2e3['id'],{'allowEmpty':!![]})),_0x3f86d2=typeof _0x61c2e3[_0x1a1065(0x207)]===_0x1a1065(0x226)||typeof _0x61c2e3[_0x1a1065(0x207)]===_0x1a1065(0x201)?_0x61c2e3[_0x1a1065(0x207)]:undefined,_0x2032a5=typeof _0x61c2e3['updateTime']===_0x1a1065(0x226)||typeof _0x61c2e3[_0x1a1065(0x238)]===_0x1a1065(0x201)?_0x61c2e3['updateTime']:undefined,_0x265d27=sha256(JSON[_0x1a1065(0x20c)]({'id':_0x61c2e3['id'],'scope':_0x61c2e3[_0x1a1065(0x208)],'appCode':_0x1fcfc1,'title':_0x3875d0,'version':_0x61c2e3[_0x1a1065(0x21a)],'contentHash':_0x12c14e['contentHash'],'createTime':_0x3f86d2,'updateTime':_0x2032a5}));return{'id':_0x61c2e3['id'],'scope':_0x1a1065(0x202),'appCode':_0x1fcfc1,'title':_0x3875d0,'version':_0x61c2e3[_0x1a1065(0x21a)],'contentByteSize':_0x12c14e['byteSize'],'contentHash':_0x12c14e[_0x1a1065(0x21b)],'snapshotHash':_0x265d27,..._0x3f86d2!==undefined?{'createTime':_0x3f86d2}:{},..._0x2032a5!==undefined?{'updateTime':_0x2032a5}:{}};}export function assertCompanyKnowledgeBase(_0x61bca7,_0x712c8c,_0x227db4){const _0x4417b2=a105_0x5718d8;if(_0x227db4!==undefined&&_0x61bca7['id']!==_0x227db4)throw kbError('kb_response_invalid','Knowledge-base\x20get-one\x20returned\x20id\x20'+_0x61bca7['id']+'\x20while\x20id\x20'+_0x227db4+_0x4417b2(0x234));if(_0x61bca7['scope']!==_0x4417b2(0x202)||_0x61bca7[_0x4417b2(0x21c)]!==_0x712c8c)throw kbError('kb_scope_mismatch','Knowledge\x20base\x20'+_0x61bca7['id']+'\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'+_0x712c8c+'.');}export async function fetchAllCompanyKnowledgeBases(_0x2a609f,_0x1dc04f){const _0x2e0769=a105_0x5718d8,_0x373a6d=[],_0x199d5b=new Set();let _0x4c62ca=0x1,_0x54d8d7=0x0,_0x2ff8a7;while(!![]){const _0x131c69=await listEnterpriseKnowledgeBases(_0x2a609f[_0x2e0769(0x1f0)],{'currentPage':_0x4c62ca,'pageSize':LIST_PAGE_SIZE,'appCode':_0x2a609f[_0x2e0769(0x21c)],..._0x1dc04f}),_0x140729=_0x131c69['paging']?.[_0x2e0769(0x21f)];if(_0x131c69[_0x2e0769(0x22b)]?.['currentPage']!==undefined&&_0x131c69[_0x2e0769(0x22b)][_0x2e0769(0x232)]!==_0x4c62ca)throw kbError(_0x2e0769(0x213),_0x2e0769(0x20e)+_0x131c69[_0x2e0769(0x22b)][_0x2e0769(0x232)]+_0x2e0769(0x217)+_0x4c62ca+_0x2e0769(0x234));if(_0x140729!==undefined){if(_0x2ff8a7!==undefined&&_0x140729!==_0x2ff8a7)throw kbError('kb_list_contract_invalid',_0x2e0769(0x1f4)+_0x2ff8a7+_0x2e0769(0x1f6)+_0x140729+'\x20during\x20paging.','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x2ff8a7=_0x140729;}for(const _0x409f36 of _0x131c69[_0x2e0769(0x20a)]){if(!Number[_0x2e0769(0x1fd)](_0x409f36['id'])||_0x199d5b[_0x2e0769(0x218)](_0x409f36['id']))throw kbError(_0x2e0769(0x213),'Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20'+String(_0x409f36['id'])+'.');_0x199d5b[_0x2e0769(0x214)](_0x409f36['id']),_0x409f36[_0x2e0769(0x208)]==='company'&&_0x409f36['appCode']===_0x2a609f['appCode']&&_0x373a6d[_0x2e0769(0x224)](_0x409f36);}_0x54d8d7+=_0x131c69[_0x2e0769(0x20a)]['length'];if(_0x140729!==undefined&&_0x54d8d7>=_0x140729)break;if(_0x131c69[_0x2e0769(0x20a)][_0x2e0769(0x220)]<LIST_PAGE_SIZE){if(_0x140729!==undefined&&_0x54d8d7<_0x140729)throw kbError('kb_list_contract_invalid',_0x2e0769(0x23f)+_0x54d8d7+'\x20of\x20'+_0x140729+_0x2e0769(0x1fb));break;}_0x4c62ca+=0x1;}return _0x373a6d;}export function findExactCompanyKnowledgeBases(_0x37060d,_0x19a331,_0x3a8d76){const _0x4b733c=a105_0x5718d8;return _0x37060d[_0x4b733c(0x230)](_0xf6ea47=>_0xf6ea47[_0x4b733c(0x208)]===_0x4b733c(0x202)&&_0xf6ea47['appCode']===_0x19a331&&_0xf6ea47['title']===_0x3a8d76);}export async function getKbOrNull(_0x3462a3,_0x1ce5d4){const _0xc2928d=a105_0x5718d8;try{const _0xb8fb64=await getEnterpriseKnowledgeBase(_0x3462a3['cookie'],_0x1ce5d4);return assertCompanyKnowledgeBase(_0xb8fb64,_0x3462a3[_0xc2928d(0x21c)],_0x1ce5d4),_0xb8fb64;}catch(_0x341b39){if(getPlatformErrorCode(_0x341b39)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x341b39;}}export async function requireKb(_0x12edd4,_0x42a608){const _0x434696=a105_0x5718d8,_0x418f2e=await getKbOrNull(_0x12edd4,_0x42a608);if(!_0x418f2e)throw kbError(_0x434696(0x1f7),_0x434696(0x22a)+_0x42a608,_0x434696(0x206));return _0x418f2e;}export function assertExpectedKbVersion(_0x10592d,_0x3df168){const _0x1561a7=a105_0x5718d8;if(_0x3df168===undefined||_0x10592d[_0x1561a7(0x21a)]===_0x3df168)return;throw kbError('kb_state_drift',_0x1561a7(0x22e)+_0x10592d['id']+_0x1561a7(0x22c)+_0x3df168+_0x1561a7(0x1ef)+_0x10592d[_0x1561a7(0x21a)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.');}
@@ -0,0 +1 @@
1
+ const a106_0x47f6ff=a106_0x74ce;(function(_0x2bbac9,_0x533cf1){const _0xb2426b=a106_0x74ce,_0x3cd630=_0x2bbac9();while(!![]){try{const _0xebdcc4=-parseInt(_0xb2426b(0x1f7))/0x1+-parseInt(_0xb2426b(0x1ec))/0x2*(-parseInt(_0xb2426b(0x1f3))/0x3)+parseInt(_0xb2426b(0x1fb))/0x4+parseInt(_0xb2426b(0x205))/0x5*(-parseInt(_0xb2426b(0x1e1))/0x6)+parseInt(_0xb2426b(0x1e6))/0x7*(-parseInt(_0xb2426b(0x214))/0x8)+-parseInt(_0xb2426b(0x20a))/0x9+-parseInt(_0xb2426b(0x1ea))/0xa*(-parseInt(_0xb2426b(0x1f2))/0xb);if(_0xebdcc4===_0x533cf1)break;else _0x3cd630['push'](_0x3cd630['shift']());}catch(_0x5969e4){_0x3cd630['push'](_0x3cd630['shift']());}}}(a106_0x1274,0xcd03f));function a106_0x74ce(_0x1ca18d,_0x848acf){_0x1ca18d=_0x1ca18d-0x1e1;const _0x127493=a106_0x1274();let _0x74ce9d=_0x127493[_0x1ca18d];return _0x74ce9d;}import{isPlatformTransportFailure,updateEnterpriseKnowledgeBase}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,assertExpectedKbVersion,inspectKbContent,kbError,projectKb,readKbFile,readKbId,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const UPDATE_PATH=a106_0x47f6ff(0x212),NON_ATOMIC_WARNING=a106_0x47f6ff(0x1f9);function readUpdatePatch(_0x33e776){const _0x3a47e7=a106_0x47f6ff,_0x1153ad=readKbId(_0x33e776),_0x500fea=_0x33e776[_0x3a47e7(0x20e)](_0x3a47e7(0x1f1)),_0x3ba35d=_0x33e776['flag'](_0x3a47e7(0x1fe)),_0x5392a4=_0x33e776[_0x3a47e7(0x20e)](_0x3a47e7(0x1e7)),_0x585576=_0x500fea===undefined?undefined:String(_0x500fea)['trim']();if(_0x500fea!==undefined&&!_0x585576)throw kbError(_0x3a47e7(0x201),_0x3a47e7(0x1e5));const _0x5a3728=_0x3ba35d===undefined?undefined:String(_0x3ba35d)[_0x3a47e7(0x213)]();if(_0x3ba35d!==undefined&&!_0x5a3728)throw kbError(_0x3a47e7(0x1f8),'--file\x20cannot\x20be\x20empty.');if(_0x585576===undefined&&_0x5a3728===undefined)throw kbError(_0x3a47e7(0x1fc),_0x3a47e7(0x1fa),_0x3a47e7(0x20c));let _0x5c5ab3;if(_0x5392a4!==undefined){_0x5c5ab3=Number(_0x5392a4);if(!Number[_0x3a47e7(0x1f0)](_0x5c5ab3)||_0x5c5ab3<0x0)throw kbError(_0x3a47e7(0x204),_0x3a47e7(0x1eb));}return{'id':_0x1153ad,'title':_0x585576,'file':_0x5a3728,'expectedVersion':_0x5c5ab3};}function a106_0x1274(){const _0x293d67=['--title\x20cannot\x20be\x20empty.','5151412QVVeYP','expected-version','beforeRecord','cookie','286160yJysMj','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','1218502OPpDfD','\x20--format\x20compress','appCode','contentHash','isSafeInteger','title','1001Yxllsd','3gVLvZY','POST','company','Company\x20knowledge\x20base\x20','1170547gzOgWO','kb_file_required','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20update\x20contract\x20has\x20no\x20version\x20predicate.','Nothing\x20to\x20update.','3742912NYKIKj','kb_update_empty','planned','file','string','replacement','kb_title_invalid','Updated\x20company\x20knowledge\x20base\x20','update','kb_expected_version_invalid','315tGokoh','content','kb_update_outcome_unknown','snapshotHash','number','3771072NmaItK','before','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','expectedVersion','flag','high-risk-write','version','rabetbase\x20kb\x20detail\x20--id\x20','/admin/knowledge-base/update','trim','16CHyOOm','patch','Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','23610gLIAYc','Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','push','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'];a106_0x1274=function(){return _0x293d67;};return a106_0x1274();}async function prepareUpdate(_0x266359){const _0x4ac7ab=a106_0x47f6ff,_0x95ef1e=readUpdatePatch(_0x266359),_0x1bb586=await requireKb(_0x266359,_0x95ef1e['id']);assertExpectedKbVersion(_0x1bb586,_0x95ef1e[_0x4ac7ab(0x20d)]);const _0x1d51c8=_0x95ef1e[_0x4ac7ab(0x1fe)]?await readKbFile(_0x95ef1e[_0x4ac7ab(0x1fe)]):undefined,_0x3ba61d=projectKb(_0x1bb586),_0x395c5e=projectKb({..._0x1bb586,..._0x95ef1e['title']!==undefined?{'title':_0x95ef1e[_0x4ac7ab(0x1f1)]}:{},..._0x1d51c8?{'content':_0x1d51c8['content']}:{}});return{'patch':_0x95ef1e,'beforeRecord':_0x1bb586,'before':_0x3ba61d,'planned':_0x395c5e,'replacement':_0x1d51c8};}export const kbUpdate={'service':'kb','command':a106_0x47f6ff(0x203),'description':a106_0x47f6ff(0x1e2),'risk':a106_0x47f6ff(0x20f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a106_0x47f6ff(0x1f1),'type':'string','required':![],'description':'New\x20knowledge-base\x20title'},{'name':a106_0x47f6ff(0x1fe),'type':a106_0x47f6ff(0x1ff),'required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':'expected-version','type':a106_0x47f6ff(0x209),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x338deb){readUpdatePatch(_0x338deb),requireKbExplicitYes(_0x338deb);},async 'dryRun'(_0xabf390){const _0x116c32=a106_0x47f6ff,_0x8aca34=await prepareUpdate(_0xabf390),_0x1b632d=_0x8aca34[_0x116c32(0x215)][_0x116c32(0x20d)]!==undefined?[NON_ATOMIC_WARNING]:[];return asDryRunResult({'operation':_0x116c32(0x203),'selector':{'id':_0x8aca34[_0x116c32(0x20b)]['id'],'scope':_0x116c32(0x1f5),'appCode':_0x8aca34[_0x116c32(0x20b)][_0x116c32(0x1ee)]},'before':_0x8aca34[_0x116c32(0x20b)],'after':_0x8aca34[_0x116c32(0x1fd)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x1b632d,'verification':{'expectedVersion':_0x8aca34[_0x116c32(0x215)][_0x116c32(0x20d)]??null,'atomicCompareAndSet':![],'plannedSnapshotHash':_0x8aca34['before'][_0x116c32(0x208)],'lookupCommand':_0x116c32(0x211)+_0x8aca34[_0x116c32(0x20b)]['id']+_0x116c32(0x1ed)}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x48d142){const _0x5917e2=a106_0x47f6ff;requireKbExplicitYes(_0x48d142);const _0x1b27b2=await prepareUpdate(_0x48d142),_0x361626={'id':_0x1b27b2[_0x5917e2(0x215)]['id'],..._0x1b27b2['patch']['title']!==undefined?{'title':_0x1b27b2[_0x5917e2(0x215)]['title']}:{},..._0x1b27b2['replacement']?{'content':_0x1b27b2[_0x5917e2(0x200)][_0x5917e2(0x206)]}:{}};let _0x3390e9=![];try{const _0x211e41=await updateEnterpriseKnowledgeBase(_0x48d142[_0x5917e2(0x1e9)],_0x361626);assertCompanyKnowledgeBase(_0x211e41,_0x48d142['appCode'],_0x1b27b2[_0x5917e2(0x215)]['id']);}catch(_0x115f99){if(!isPlatformTransportFailure(_0x115f99))throw _0x115f99;_0x3390e9=!![];}const _0x367d3a=await verifyKbMutationReadback(_0x5917e2(0x203),_0x3390e9,()=>requireKb(_0x48d142,_0x1b27b2['patch']['id'])),_0x5caa3a=projectKb(_0x367d3a),_0x4becc6=_0x1b27b2[_0x5917e2(0x215)][_0x5917e2(0x1f1)]===undefined||_0x367d3a[_0x5917e2(0x1f1)]===_0x1b27b2[_0x5917e2(0x215)]['title'],_0xd52493=!_0x1b27b2[_0x5917e2(0x200)]||inspectKbContent(_0x367d3a[_0x5917e2(0x206)])[_0x5917e2(0x1ef)]===_0x1b27b2[_0x5917e2(0x200)]['contentHash'],_0x3cf1ce=!_0x1b27b2[_0x5917e2(0x200)]||_0x367d3a[_0x5917e2(0x210)]>_0x1b27b2[_0x5917e2(0x1e8)][_0x5917e2(0x210)],_0xbb3817=!_0x3390e9||_0x1b27b2['replacement']!==undefined||_0x1b27b2['patch'][_0x5917e2(0x1f1)]===undefined||_0x1b27b2[_0x5917e2(0x1e8)]['title']!==_0x1b27b2[_0x5917e2(0x215)]['title'];if(!_0x4becc6||!_0xd52493||!_0x3cf1ce||!_0xbb3817)throw kbError(_0x3390e9?_0x5917e2(0x207):'kb_verification_failed',_0x5917e2(0x1f6)+_0x1b27b2[_0x5917e2(0x215)]['id']+_0x5917e2(0x217),_0x5917e2(0x1e4)+_0x1b27b2[_0x5917e2(0x215)]['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x4cef5c=[];return _0x1b27b2[_0x5917e2(0x215)]['expectedVersion']!==undefined&&_0x4cef5c['push'](NON_ATOMIC_WARNING),_0x3390e9&&_0x4cef5c[_0x5917e2(0x1e3)](_0x5917e2(0x216)),{'ok':!![],'data':{'operation':'update','selector':{'id':_0x5caa3a['id'],'scope':_0x5917e2(0x1f5),'appCode':_0x5caa3a[_0x5917e2(0x1ee)]},'before':_0x1b27b2[_0x5917e2(0x20b)],'after':_0x5caa3a,'dryRun':![],'backend':{'method':_0x5917e2(0x1f4),'path':UPDATE_PATH},'warnings':_0x4cef5c,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x3390e9,'expectedVersion':_0x1b27b2[_0x5917e2(0x215)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':_0x5917e2(0x211)+_0x5caa3a['id']+_0x5917e2(0x1ed)}},'message':_0x5917e2(0x202)+_0x5caa3a['id']};}};
@@ -1 +1 @@
1
- function a100_0x290e(_0x19306b,_0x58a3c8){_0x19306b=_0x19306b-0x186;const _0x4dff98=a100_0x4dff();let _0x290ee1=_0x4dff98[_0x19306b];return _0x290ee1;}const a100_0x254ebf=a100_0x290e;(function(_0x5b71cf,_0x334cc6){const _0x1c6e9a=a100_0x290e,_0x2a215e=_0x5b71cf();while(!![]){try{const _0xf64063=-parseInt(_0x1c6e9a(0x1a8))/0x1+parseInt(_0x1c6e9a(0x1a2))/0x2*(parseInt(_0x1c6e9a(0x1a1))/0x3)+parseInt(_0x1c6e9a(0x191))/0x4*(parseInt(_0x1c6e9a(0x18a))/0x5)+-parseInt(_0x1c6e9a(0x195))/0x6*(parseInt(_0x1c6e9a(0x18d))/0x7)+parseInt(_0x1c6e9a(0x1a6))/0x8*(-parseInt(_0x1c6e9a(0x198))/0x9)+-parseInt(_0x1c6e9a(0x19a))/0xa+parseInt(_0x1c6e9a(0x19e))/0xb;if(_0xf64063===_0x334cc6)break;else _0x2a215e['push'](_0x2a215e['shift']());}catch(_0x53009c){_0x2a215e['push'](_0x2a215e['shift']());}}}(a100_0x4dff,0xc691e));import{logger}from'../../utils/logger.js';function a100_0x4dff(){const _0x538e20=['*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','4NKPSKq','forEach','clearLogs','details','3018HVTcOS','level','View\x20command\x20history\x20logs','5154048aeEiOy','show','8521520RXTmow','keys','read','clear','23886676OqZYfH','logs','\x20\x20\x20Time:\x20','1651953uEjCoH','2UzoYdY','duration','stringify','message','8mxHTyg','warn','144435vJVzeP','*\x20No\x20logs\x20found','log','success','en-US','length','3017795ZXLmeu','\x20\x20\x20Details:\x20','toLocaleString','13125zkptbB','command'];a100_0x4dff=function(){return _0x538e20;};return a100_0x4dff();}function printLogs(_0xc1f278){const _0x273c8f=a100_0x290e;if(_0xc1f278[_0x273c8f(0x189)]===0x0){console[_0x273c8f(0x186)](_0x273c8f(0x1a9));return;}console['log']('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0xc1f278[_0x273c8f(0x192)]((_0x32415a,_0x1ccbea)=>{const _0x173a93=_0x273c8f,_0x31f026=new Date(_0x32415a['timestamp'])[_0x173a93(0x18c)](_0x173a93(0x188)),_0x376dda=_0x32415a[_0x173a93(0x196)]===_0x173a93(0x187)?'√':_0x32415a[_0x173a93(0x196)]==='error'?'×':_0x32415a[_0x173a93(0x196)]===_0x173a93(0x1a7)?'!':'i';console[_0x173a93(0x186)](_0x1ccbea+0x1+'.\x20'+_0x376dda+'\x20['+_0x32415a[_0x173a93(0x18e)]+']\x20'+_0x32415a[_0x173a93(0x1a5)]),console[_0x173a93(0x186)](_0x173a93(0x1a0)+_0x31f026),_0x32415a[_0x173a93(0x1a3)]&&console[_0x173a93(0x186)](_0x173a93(0x190)+_0x32415a[_0x173a93(0x1a3)]+'ms'),_0x32415a['details']&&Object[_0x173a93(0x19b)](_0x32415a[_0x173a93(0x194)])[_0x173a93(0x189)]>0x0&&console['log'](_0x173a93(0x18b)+JSON[_0x173a93(0x1a4)](_0x32415a[_0x173a93(0x194)],null,0x2)),console[_0x173a93(0x186)]('');});}export const logsDefinitions=[{'service':a100_0x254ebf(0x19f),'command':a100_0x254ebf(0x199),'description':a100_0x254ebf(0x197),'risk':a100_0x254ebf(0x19c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x42722a){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a100_0x254ebf(0x19f),'command':a100_0x254ebf(0x19d),'description':'Clear\x20command\x20history\x20logs','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2fd237){const _0x3f0650=a100_0x254ebf;return logger[_0x3f0650(0x193)](),console['log'](_0x3f0650(0x18f)),{'ok':!![]};}}];
1
+ const a107_0x422d2f=a107_0x1e3e;(function(_0x500a7b,_0x4deddd){const _0x3f62ea=a107_0x1e3e,_0x3b5f28=_0x500a7b();while(!![]){try{const _0x777772=-parseInt(_0x3f62ea(0x1ca))/0x1+parseInt(_0x3f62ea(0x1c8))/0x2+parseInt(_0x3f62ea(0x1c9))/0x3+parseInt(_0x3f62ea(0x1d8))/0x4*(parseInt(_0x3f62ea(0x1c0))/0x5)+-parseInt(_0x3f62ea(0x1d9))/0x6+parseInt(_0x3f62ea(0x1b7))/0x7+-parseInt(_0x3f62ea(0x1d7))/0x8;if(_0x777772===_0x4deddd)break;else _0x3b5f28['push'](_0x3b5f28['shift']());}catch(_0x3cf8fa){_0x3b5f28['push'](_0x3b5f28['shift']());}}}(a107_0x2dee,0xf1416));function a107_0x2dee(){const _0x3cce51=['readLogs','logs','read','clearLogs','success','Clear\x20command\x20history\x20logs','966614jJzkOD','936069bMkgOk','195745DMjrQH','en-US','command','log','\x20\x20\x20Duration:\x20','message','level','duration','error','toLocaleString','\x20\x20\x20Details:\x20','stringify','details','3978472anhzqF','128vqfPbM','9598800fIwznV','*\x20Logs\x20cleared','3973830cEmgXE','warn','length','View\x20command\x20history\x20logs','*\x20Lovrabet\x20CLI\x20logs:\x0a','*\x20No\x20logs\x20found','show','keys','\x20\x20\x20Time:\x20','299690xqDUyR','forEach'];a107_0x2dee=function(){return _0x3cce51;};return a107_0x2dee();}function a107_0x1e3e(_0x2e61a2,_0x7cd6ae){_0x2e61a2=_0x2e61a2-0x1b7;const _0x2dee9b=a107_0x2dee();let _0x1e3e23=_0x2dee9b[_0x2e61a2];return _0x1e3e23;}import{logger}from'../../utils/logger.js';function printLogs(_0xc1743b){const _0x85d4eb=a107_0x1e3e;if(_0xc1743b['length']===0x0){console[_0x85d4eb(0x1cd)](_0x85d4eb(0x1bc));return;}console[_0x85d4eb(0x1cd)](_0x85d4eb(0x1bb)),_0xc1743b[_0x85d4eb(0x1c1)]((_0x345850,_0x1df20f)=>{const _0x2e9d98=_0x85d4eb,_0x309c5a=new Date(_0x345850['timestamp'])[_0x2e9d98(0x1d3)](_0x2e9d98(0x1cb)),_0x526bca=_0x345850[_0x2e9d98(0x1d0)]===_0x2e9d98(0x1c6)?'√':_0x345850[_0x2e9d98(0x1d0)]===_0x2e9d98(0x1d2)?'×':_0x345850[_0x2e9d98(0x1d0)]===_0x2e9d98(0x1b8)?'!':'i';console[_0x2e9d98(0x1cd)](_0x1df20f+0x1+'.\x20'+_0x526bca+'\x20['+_0x345850[_0x2e9d98(0x1cc)]+']\x20'+_0x345850[_0x2e9d98(0x1cf)]),console[_0x2e9d98(0x1cd)](_0x2e9d98(0x1bf)+_0x309c5a),_0x345850[_0x2e9d98(0x1d1)]&&console[_0x2e9d98(0x1cd)](_0x2e9d98(0x1ce)+_0x345850['duration']+'ms'),_0x345850[_0x2e9d98(0x1d6)]&&Object[_0x2e9d98(0x1be)](_0x345850[_0x2e9d98(0x1d6)])[_0x2e9d98(0x1b9)]>0x0&&console[_0x2e9d98(0x1cd)](_0x2e9d98(0x1d4)+JSON[_0x2e9d98(0x1d5)](_0x345850[_0x2e9d98(0x1d6)],null,0x2)),console[_0x2e9d98(0x1cd)]('');});}export const logsDefinitions=[{'service':a107_0x422d2f(0x1c3),'command':a107_0x422d2f(0x1bd),'description':a107_0x422d2f(0x1ba),'risk':a107_0x422d2f(0x1c4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5b6921){const _0x22e6b4=a107_0x422d2f;return printLogs(logger[_0x22e6b4(0x1c2)]()),{'ok':!![]};}},{'service':'logs','command':'clear','description':a107_0x422d2f(0x1c7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xf77e5c){const _0x17db82=a107_0x422d2f;return logger[_0x17db82(0x1c5)](),console[_0x17db82(0x1cd)](_0x17db82(0x1da)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a101_0x3b49f5=a101_0x3a2c;(function(_0x5a02ab,_0x28560e){const _0x41a383=a101_0x3a2c,_0x1f2aaf=_0x5a02ab();while(!![]){try{const _0x5c983b=-parseInt(_0x41a383(0x18c))/0x1*(parseInt(_0x41a383(0x18b))/0x2)+parseInt(_0x41a383(0x158))/0x3+parseInt(_0x41a383(0x178))/0x4*(parseInt(_0x41a383(0x17d))/0x5)+parseInt(_0x41a383(0x180))/0x6+-parseInt(_0x41a383(0x179))/0x7*(parseInt(_0x41a383(0x190))/0x8)+parseInt(_0x41a383(0x146))/0x9*(parseInt(_0x41a383(0x16f))/0xa)+-parseInt(_0x41a383(0x173))/0xb;if(_0x5c983b===_0x28560e)break;else _0x1f2aaf['push'](_0x1f2aaf['shift']());}catch(_0x589242){_0x1f2aaf['push'](_0x1f2aaf['shift']());}}}(a101_0x22a6,0x3a32e));import a101_0x40300a from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';function a101_0x22a6(){const _0x403de5=['stringify','flag','10KVrRta','91193ndgShZ','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','paths','cssUrl','8eDSxXm','\x20and\x20CSS:\x20','cookie','\x20updated,\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','\x20\x20Found\x20','validation','Menu\x20asset\x20update\x20skipped','trim','rawFlags','Menu\x20asset\x20update\x20failed','params','string','404874sOmzEw','\x20\x20Cancelled.','replace','\x20menu(s)\x20failed','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','parse','object','updated','menu','\x20updated.','Menu\x20asset\x20update\x20completed:\x20','appcode','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','Fetching\x20online\x20menu\x20list...','load-mode','jsUrl','filter','appCode','671124FVEwgC','selectedAppName','asset-update','patch','import','all','some','map','mode','/smartapi/menu/update','length','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','menu-ids','message','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','✓\x20Menu\x20asset\x20update\x20completed:\x20','\x20menu(s)\x20with\x20JS:\x20','split','force','label','bool','\x20menu(s)\x20updated','70tiqdTA','Failed\x20to\x20fetch\x20online\x20menu\x20list','yellow','fetch','4361126JFyfxC','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','script','boolean','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','4CcTszc','621607rNDlIC','str','Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch','yes','1718695XlxWKl','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','\x20menu(s)...','1783590lFnjZt','\x20menu(s)','isSafeInteger','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','skipped','isArray','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','\x20failed.','failed'];a101_0x22a6=function(){return _0x403de5;};return a101_0x22a6();}import{isInProject}from'../../context.js';export const menuAssetUpdate={'service':a101_0x3b49f5(0x14e),'command':a101_0x3b49f5(0x15a),'description':a101_0x3b49f5(0x152),'risk':'high-risk-write','flags':[{'name':a101_0x3b49f5(0x144),'type':a101_0x3b49f5(0x145),'description':a101_0x3b49f5(0x177)+a101_0x3b49f5(0x166)},{'name':a101_0x3b49f5(0x160),'type':'string','description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20'+a101_0x3b49f5(0x18d),'enum':[a101_0x3b49f5(0x148),a101_0x3b49f5(0x15b)],'default':'patch'},{'name':a101_0x3b49f5(0x16b),'type':a101_0x3b49f5(0x176),'description':a101_0x3b49f5(0x183)},{'name':a101_0x3b49f5(0x164),'type':'string','description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':'paths','type':'string','description':a101_0x3b49f5(0x14a)},{'name':a101_0x3b49f5(0x15d),'type':a101_0x3b49f5(0x176),'description':'Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources'},{'name':a101_0x3b49f5(0x154),'type':a101_0x3b49f5(0x145),'enum':[a101_0x3b49f5(0x15c),a101_0x3b49f5(0x175),a101_0x3b49f5(0x172)],'description':'Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode'}],async 'dryRun'(_0x2c86bf){const _0x4ed454=a101_0x3b49f5;ensureRunnableContext(_0x2c86bf[_0x4ed454(0x142)],_0x2c86bf[_0x4ed454(0x159)]);const _0x17b179=await runMenuUpdateCore(_0x2c86bf['appCode'],_0x2c86bf[_0x4ed454(0x13b)],_0x2c86bf['str'](_0x4ed454(0x144)),{'mode':parseMode(_0x2c86bf[_0x4ed454(0x17a)](_0x4ed454(0x160))),'dryRun':!![],'force':_0x2c86bf['bool'](_0x4ed454(0x16b)),'selection':parseSelection(_0x2c86bf),'loadScriptMode':parseLoadScriptMode(_0x2c86bf[_0x4ed454(0x17a)](_0x4ed454(0x154)))});return{'method':'POST','url':_0x4ed454(0x161),'body':_0x17b179,'description':_0x17b179[_0x4ed454(0x184)]?_0x4ed454(0x186):'Would\x20update\x20'+(_0x17b179['diffs']?.[_0x4ed454(0x162)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x17584f){const _0x47f57c=a101_0x3b49f5;ensureRunnableContext(_0x17584f['rawFlags'],_0x17584f[_0x47f57c(0x159)]);const _0xe61dda=_0x17584f[_0x47f57c(0x18a)](_0x47f57c(0x17c)),_0x193e58=_0x17584f[_0x47f57c(0x17a)](_0x47f57c(0x144)),_0x4655f5=parseMode(_0x17584f['str']('mode')),_0x25cccb=_0x17584f[_0x47f57c(0x16d)](_0x47f57c(0x16b)),_0x4e74a7=parseLoadScriptMode(_0x17584f['str'](_0x47f57c(0x154))),_0x134ae9=parseParams(_0x193e58),_0x4f4c3b=!!(_0x134ae9[_0x47f57c(0x155)]||_0x134ae9[_0x47f57c(0x18f)]);if(_0xe61dda||_0x4f4c3b&&!isInteractive()){const _0x459b24=await runMenuUpdateCore(_0x17584f[_0x47f57c(0x157)],_0x17584f[_0x47f57c(0x13b)],_0x193e58,{'mode':_0x4655f5,'force':_0x25cccb,'selection':parseSelection(_0x17584f),'loadScriptMode':_0x4e74a7});return _0x459b24['skipped']?writeCliSideChannelLine(_0x47f57c(0x174)):(writeCliSideChannelLine(_0x47f57c(0x168)+_0x459b24[_0x47f57c(0x14d)]+_0x47f57c(0x16e)),_0x459b24[_0x47f57c(0x188)]>0x0&&writeCliSideChannelLine('!\x20'+_0x459b24[_0x47f57c(0x188)]+_0x47f57c(0x149))),{'ok':_0x459b24[_0x47f57c(0x188)]===0x0,'data':_0x459b24,'message':_0x459b24[_0x47f57c(0x184)]?_0x47f57c(0x140):_0x47f57c(0x150)+_0x459b24[_0x47f57c(0x14d)]+_0x47f57c(0x13c)+_0x459b24['failed']+_0x47f57c(0x187)};}requireInteractive();const _0x32b6a4=startSpinner(_0x47f57c(0x153));let _0x5c4bff;try{_0x5c4bff=await fetchOnlineMenuList(_0x17584f[_0x47f57c(0x157)],_0x17584f['cookie']),stopSpinner(_0x32b6a4,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x34c7b4){stopSpinner(_0x32b6a4,_0x47f57c(0x170),![]);throw CliErrors['validation'](_0x34c7b4 instanceof Error?_0x34c7b4[_0x47f57c(0x165)]:_0x47f57c(0x170));}const _0x181962=filterMenusWithResources(_0x5c4bff),_0x89d9d=parseSelection(_0x17584f,![]),_0x65aac8=_0x89d9d?selectMenusForUpdate(_0x181962,_0x89d9d):_0x181962;if(_0x65aac8[_0x47f57c(0x162)]===0x0)return writeCliSideChannelLine(a101_0x40300a[_0x47f57c(0x171)](_0x47f57c(0x167))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a101_0x40300a['cyan'](_0x47f57c(0x13e)+_0x65aac8[_0x47f57c(0x162)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x65aac8[_0x47f57c(0x15f)](_0x2b89e9=>_0x2b89e9[_0x47f57c(0x16c)]),[_0x134ae9['jsUrl'],_0x134ae9[_0x47f57c(0x18f)]])),writeCliSideChannelLine('');let _0x3d24ec=_0x134ae9[_0x47f57c(0x155)],_0x78979=_0x134ae9['cssUrl'];!_0x3d24ec&&(_0x3d24ec=await askJsUrl());!_0x78979&&(_0x78979=await askCssUrl());const _0x1a1724=await askConfirm('\x20\x20Update\x20'+_0x65aac8[_0x47f57c(0x162)]+_0x47f57c(0x169)+_0x3d24ec+_0x47f57c(0x13a)+_0x78979+'?');if(!_0x1a1724)return writeCliSideChannelLine(a101_0x40300a['gray'](_0x47f57c(0x147))),{'ok':!![]};const _0x487072=startSpinner('Updating\x20'+_0x65aac8['length']+_0x47f57c(0x17f));try{const _0x2b44e1=await runMenuUpdateCore(_0x17584f[_0x47f57c(0x157)],_0x17584f[_0x47f57c(0x13b)],JSON[_0x47f57c(0x189)]({'jsUrl':_0x3d24ec,'cssUrl':_0x78979}),{'mode':_0x4655f5,'force':_0x25cccb,'selection':{'all':![],'menuIds':_0x65aac8[_0x47f57c(0x15f)](_0x5e49e2=>_0x5e49e2['id']),'paths':[]},'loadScriptMode':_0x4e74a7});return stopSpinner(_0x487072,'Updated\x20'+_0x2b44e1[_0x47f57c(0x14d)]+_0x47f57c(0x181),_0x2b44e1[_0x47f57c(0x188)]===0x0),{'ok':_0x2b44e1[_0x47f57c(0x188)]===0x0,'data':_0x2b44e1,'message':_0x2b44e1['failed']>0x0?_0x47f57c(0x150)+_0x2b44e1['updated']+_0x47f57c(0x13c)+_0x2b44e1[_0x47f57c(0x188)]+_0x47f57c(0x187):_0x47f57c(0x150)+_0x2b44e1['updated']+_0x47f57c(0x14f)};}catch(_0x570c0a){stopSpinner(_0x487072,_0x47f57c(0x143),![]);throw CliErrors[_0x47f57c(0x13f)](_0x570c0a instanceof Error?_0x570c0a[_0x47f57c(0x165)]:_0x47f57c(0x143));}}};function ensureRunnableContext(_0x11b600,_0x228e58){const _0x1e7722=a101_0x3b49f5,_0x5e341a=_0x11b600[_0x1e7722(0x151)]?String(_0x11b600[_0x1e7722(0x151)])[_0x1e7722(0x141)]():'';if(!isInProject()&&!_0x228e58&&!_0x5e341a)throw CliErrors[_0x1e7722(0x13f)]('menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x1e7722(0x163));}function parseMode(_0x240430){const _0x13e612=a101_0x3b49f5;if(!_0x240430)return'patch';if(_0x240430==='replace'||_0x240430==='patch')return _0x240430;throw CliErrors['validation'](_0x13e612(0x17e));}function parseSelection(_0x4f5dac,_0xb0bee3=!![]){const _0x34e749=a101_0x3b49f5,_0x19f12e=_0x4f5dac['bool'](_0x34e749(0x15d)),_0x2ad835=parseMenuIds(_0x4f5dac[_0x34e749(0x17a)](_0x34e749(0x164))),_0x37e8b2=parseCsv(_0x4f5dac[_0x34e749(0x17a)](_0x34e749(0x18e))),_0x3d3e7e=_0x2ad835[_0x34e749(0x162)]>0x0||_0x37e8b2[_0x34e749(0x162)]>0x0;if(_0x19f12e&&_0x3d3e7e)throw CliErrors[_0x34e749(0x13f)](_0x34e749(0x13d));if(!_0x19f12e&&!_0x3d3e7e){if(!_0xb0bee3)return undefined;throw CliErrors[_0x34e749(0x13f)]('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}return{'all':_0x19f12e,'menuIds':_0x2ad835,'paths':_0x37e8b2};}function parseMenuIds(_0x4ffe85){const _0x4660ef=a101_0x3b49f5,_0x32e551=parseCsv(_0x4ffe85),_0x3dec09=_0x32e551[_0x4660ef(0x15f)](Number);if(_0x3dec09[_0x4660ef(0x15e)](_0x3aa392=>!Number[_0x4660ef(0x182)](_0x3aa392)||_0x3aa392<=0x0))throw CliErrors[_0x4660ef(0x13f)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x3dec09)];}function parseCsv(_0x5e504a){const _0x43f79c=a101_0x3b49f5;return[...new Set(_0x5e504a[_0x43f79c(0x16a)](',')['map'](_0x45ff37=>_0x45ff37[_0x43f79c(0x141)]())[_0x43f79c(0x156)](Boolean))];}function a101_0x3a2c(_0x2d53dd,_0x129dc2){_0x2d53dd=_0x2d53dd-0x13a;const _0x22a6b1=a101_0x22a6();let _0x3a2c1f=_0x22a6b1[_0x2d53dd];return _0x3a2c1f;}function parseLoadScriptMode(_0x1eab61){const _0xc43ff4=a101_0x3b49f5;if(!_0x1eab61)return undefined;if(_0x1eab61===_0xc43ff4(0x15c)||_0x1eab61===_0xc43ff4(0x175)||_0x1eab61===_0xc43ff4(0x172))return _0x1eab61;throw CliErrors[_0xc43ff4(0x13f)](_0xc43ff4(0x17b));}function parseParams(_0x2e03aa){const _0x26b6c5=a101_0x3b49f5;if(!_0x2e03aa)return{};try{const _0x5586ba=JSON[_0x26b6c5(0x14b)](_0x2e03aa);if(typeof _0x5586ba!==_0x26b6c5(0x14c)||_0x5586ba===null||Array[_0x26b6c5(0x185)](_0x5586ba))return{};return{'jsUrl':typeof _0x5586ba[_0x26b6c5(0x155)]===_0x26b6c5(0x145)?_0x5586ba[_0x26b6c5(0x155)][_0x26b6c5(0x141)]():undefined,'cssUrl':typeof _0x5586ba[_0x26b6c5(0x18f)]==='string'?_0x5586ba[_0x26b6c5(0x18f)][_0x26b6c5(0x141)]():undefined};}catch{return{};}}
1
+ const a108_0x37a3ad=a108_0x524f;(function(_0x19969d,_0x527a7a){const _0x136a7b=a108_0x524f,_0x4dd3a9=_0x19969d();while(!![]){try{const _0x165f82=parseInt(_0x136a7b(0x18f))/0x1*(-parseInt(_0x136a7b(0x161))/0x2)+-parseInt(_0x136a7b(0x14d))/0x3*(-parseInt(_0x136a7b(0x19b))/0x4)+parseInt(_0x136a7b(0x1a2))/0x5*(-parseInt(_0x136a7b(0x189))/0x6)+parseInt(_0x136a7b(0x1aa))/0x7+parseInt(_0x136a7b(0x15f))/0x8*(parseInt(_0x136a7b(0x180))/0x9)+parseInt(_0x136a7b(0x1a7))/0xa*(-parseInt(_0x136a7b(0x154))/0xb)+-parseInt(_0x136a7b(0x179))/0xc*(parseInt(_0x136a7b(0x15e))/0xd);if(_0x165f82===_0x527a7a)break;else _0x4dd3a9['push'](_0x4dd3a9['shift']());}catch(_0x2d7bcf){_0x4dd3a9['push'](_0x4dd3a9['shift']());}}}(a108_0x32ac,0x97358));import a108_0x373b89 from'chalk';function a108_0x32ac(){const _0x26f401=['✓\x20Menu\x20asset\x20update\x20completed:\x20','gray','flag','30mqgOqf','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Online\x20menu\x20list\x20fetched','6271944mxhoki','3rtRVmm','stringify','map','\x20menu(s)...','script','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','3417249CSmmvc','str','trim','\x20menu(s)','failed','Updated\x20','\x20and\x20CSS:\x20','bool','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','jsUrl','615979BKndSw','1616GcROqZ','all','436ChFzQj','params','cssUrl','Menu\x20asset\x20update\x20failed','\x20\x20Cancelled.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','patch','message','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Menu\x20asset\x20update\x20completed:\x20','\x20\x20Found\x20','replace','filter','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','Fetching\x20online\x20menu\x20list...','isSafeInteger','mode','yes','fetch','/smartapi/menu/update','string','paths','menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20failed.','84LSzmqv','isArray','validation','updated','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','diffs','menu-ids','55071pvYuHi','yellow','appcode','Failed\x20to\x20fetch\x20online\x20menu\x20list','length','POST','object','\x20updated,\x20','\x20menu(s)\x20failed','30FzLJMX','cyan','rawFlags','split','asset-update','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','709deWzqs','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','appCode','Would\x20update\x20','boolean','label','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','cookie','selectedAppName','load-mode','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','force','4051588UEQato','\x20updated.','parse','import','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','\x20menu(s)\x20with\x20existing\x20resources','1107355qVeKfR','some'];a108_0x32ac=function(){return _0x26f401;};return a108_0x32ac();}import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a108_0x524f(_0x9364dd,_0x1bbca0){_0x9364dd=_0x9364dd-0x14d;const _0x32acd3=a108_0x32ac();let _0x524f4f=_0x32acd3[_0x9364dd];return _0x524f4f;}import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuAssetUpdate={'service':'menu','command':a108_0x37a3ad(0x18d),'description':a108_0x37a3ad(0x153),'risk':'high-risk-write','flags':[{'name':a108_0x37a3ad(0x162),'type':'string','description':a108_0x37a3ad(0x1a0)+a108_0x37a3ad(0x169)},{'name':a108_0x37a3ad(0x171),'type':a108_0x37a3ad(0x175),'description':a108_0x37a3ad(0x17d)+a108_0x37a3ad(0x199),'enum':[a108_0x37a3ad(0x16c),a108_0x37a3ad(0x167)],'default':'patch'},{'name':'force','type':'boolean','description':a108_0x37a3ad(0x18e)},{'name':a108_0x37a3ad(0x17f),'type':'string','description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a108_0x37a3ad(0x176),'type':'string','description':a108_0x37a3ad(0x190)},{'name':a108_0x37a3ad(0x160),'type':a108_0x37a3ad(0x193),'description':'Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources'},{'name':'load-mode','type':a108_0x37a3ad(0x175),'enum':[a108_0x37a3ad(0x19e),a108_0x37a3ad(0x151),a108_0x37a3ad(0x173)],'description':a108_0x37a3ad(0x19f)}],async 'dryRun'(_0x216519){const _0x19e9d0=a108_0x37a3ad;ensureRunnableContext(_0x216519[_0x19e9d0(0x18b)],_0x216519[_0x19e9d0(0x197)]);const _0x383771=await runMenuUpdateCore(_0x216519[_0x19e9d0(0x191)],_0x216519[_0x19e9d0(0x196)],_0x216519[_0x19e9d0(0x155)](_0x19e9d0(0x162)),{'mode':parseMode(_0x216519[_0x19e9d0(0x155)](_0x19e9d0(0x171))),'dryRun':!![],'force':_0x216519[_0x19e9d0(0x15b)](_0x19e9d0(0x19a)),'selection':parseSelection(_0x216519),'loadScriptMode':parseLoadScriptMode(_0x216519['str']('load-mode'))});return{'method':_0x19e9d0(0x185),'url':_0x19e9d0(0x174),'body':_0x383771,'description':_0x383771['skipped']?_0x19e9d0(0x15c):_0x19e9d0(0x192)+(_0x383771[_0x19e9d0(0x17e)]?.[_0x19e9d0(0x184)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x3f8a37){const _0x59ca0e=a108_0x37a3ad;ensureRunnableContext(_0x3f8a37[_0x59ca0e(0x18b)],_0x3f8a37[_0x59ca0e(0x197)]);const _0x3da54a=_0x3f8a37[_0x59ca0e(0x1a6)](_0x59ca0e(0x172)),_0x20e5d5=_0x3f8a37[_0x59ca0e(0x155)](_0x59ca0e(0x162)),_0x19f4e9=parseMode(_0x3f8a37[_0x59ca0e(0x155)]('mode')),_0x1f3165=_0x3f8a37[_0x59ca0e(0x15b)]('force'),_0x5a02da=parseLoadScriptMode(_0x3f8a37[_0x59ca0e(0x155)](_0x59ca0e(0x198))),_0x2f49ad=parseParams(_0x20e5d5),_0x3c541a=!!(_0x2f49ad['jsUrl']||_0x2f49ad['cssUrl']);if(_0x3da54a||_0x3c541a&&!isInteractive()){const _0xa34036=await runMenuUpdateCore(_0x3f8a37[_0x59ca0e(0x191)],_0x3f8a37[_0x59ca0e(0x196)],_0x20e5d5,{'mode':_0x19f4e9,'force':_0x1f3165,'selection':parseSelection(_0x3f8a37),'loadScriptMode':_0x5a02da});return _0xa34036['skipped']?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0x59ca0e(0x1a4)+_0xa34036[_0x59ca0e(0x17c)]+'\x20menu(s)\x20updated'),_0xa34036['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0xa34036[_0x59ca0e(0x158)]+_0x59ca0e(0x188))),{'ok':_0xa34036[_0x59ca0e(0x158)]===0x0,'data':_0xa34036,'message':_0xa34036['skipped']?'Menu\x20asset\x20update\x20skipped':_0x59ca0e(0x16a)+_0xa34036['updated']+_0x59ca0e(0x187)+_0xa34036[_0x59ca0e(0x158)]+_0x59ca0e(0x178)};}requireInteractive();const _0x2a098e=startSpinner(_0x59ca0e(0x16f));let _0x1ca4e6;try{_0x1ca4e6=await fetchOnlineMenuList(_0x3f8a37[_0x59ca0e(0x191)],_0x3f8a37[_0x59ca0e(0x196)]),stopSpinner(_0x2a098e,_0x59ca0e(0x1a9),!![]);}catch(_0x5adf69){stopSpinner(_0x2a098e,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x5adf69 instanceof Error?_0x5adf69[_0x59ca0e(0x168)]:_0x59ca0e(0x183));}const _0x3f400e=filterMenusWithResources(_0x1ca4e6),_0x197320=parseSelection(_0x3f8a37,![]),_0x57d76f=_0x197320?selectMenusForUpdate(_0x3f400e,_0x197320):_0x3f400e;if(_0x57d76f['length']===0x0)return writeCliSideChannelLine(a108_0x373b89[_0x59ca0e(0x181)](_0x59ca0e(0x195))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a108_0x373b89[_0x59ca0e(0x18a)](_0x59ca0e(0x16b)+_0x57d76f['length']+_0x59ca0e(0x1a1))),writeCliSideChannelLine(renderUpdateSummary(_0x57d76f[_0x59ca0e(0x14f)](_0x4f455b=>_0x4f455b[_0x59ca0e(0x194)]),[_0x2f49ad['jsUrl'],_0x2f49ad[_0x59ca0e(0x163)]])),writeCliSideChannelLine('');let _0x4ea9dc=_0x2f49ad[_0x59ca0e(0x15d)],_0x4fe8d1=_0x2f49ad[_0x59ca0e(0x163)];!_0x4ea9dc&&(_0x4ea9dc=await askJsUrl());!_0x4fe8d1&&(_0x4fe8d1=await askCssUrl());const _0x22a048=await askConfirm('\x20\x20Update\x20'+_0x57d76f[_0x59ca0e(0x184)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x4ea9dc+_0x59ca0e(0x15a)+_0x4fe8d1+'?');if(!_0x22a048)return writeCliSideChannelLine(a108_0x373b89[_0x59ca0e(0x1a5)](_0x59ca0e(0x165))),{'ok':!![]};const _0x403ffb=startSpinner('Updating\x20'+_0x57d76f[_0x59ca0e(0x184)]+_0x59ca0e(0x150));try{const _0x5941ef=await runMenuUpdateCore(_0x3f8a37[_0x59ca0e(0x191)],_0x3f8a37[_0x59ca0e(0x196)],JSON[_0x59ca0e(0x14e)]({'jsUrl':_0x4ea9dc,'cssUrl':_0x4fe8d1}),{'mode':_0x19f4e9,'force':_0x1f3165,'selection':{'all':![],'menuIds':_0x57d76f[_0x59ca0e(0x14f)](_0x4f4ecb=>_0x4f4ecb['id']),'paths':[]},'loadScriptMode':_0x5a02da});return stopSpinner(_0x403ffb,_0x59ca0e(0x159)+_0x5941ef['updated']+_0x59ca0e(0x157),_0x5941ef[_0x59ca0e(0x158)]===0x0),{'ok':_0x5941ef[_0x59ca0e(0x158)]===0x0,'data':_0x5941ef,'message':_0x5941ef[_0x59ca0e(0x158)]>0x0?_0x59ca0e(0x16a)+_0x5941ef['updated']+'\x20updated,\x20'+_0x5941ef[_0x59ca0e(0x158)]+_0x59ca0e(0x178):_0x59ca0e(0x16a)+_0x5941ef[_0x59ca0e(0x17c)]+_0x59ca0e(0x19c)};}catch(_0x15dd86){stopSpinner(_0x403ffb,_0x59ca0e(0x164),![]);throw CliErrors['validation'](_0x15dd86 instanceof Error?_0x15dd86[_0x59ca0e(0x168)]:'Menu\x20asset\x20update\x20failed');}}};function ensureRunnableContext(_0x1e2019,_0x4b4bcd){const _0xebe9a3=a108_0x37a3ad,_0x1d60b3=_0x1e2019[_0xebe9a3(0x182)]?String(_0x1e2019[_0xebe9a3(0x182)])['trim']():'';if(!isInProject()&&!_0x4b4bcd&&!_0x1d60b3)throw CliErrors[_0xebe9a3(0x17b)](_0xebe9a3(0x177)+_0xebe9a3(0x1a8));}function parseMode(_0x456af4){const _0x539270=a108_0x37a3ad;if(!_0x456af4)return _0x539270(0x167);if(_0x456af4===_0x539270(0x16c)||_0x456af4===_0x539270(0x167))return _0x456af4;throw CliErrors[_0x539270(0x17b)](_0x539270(0x152));}function parseSelection(_0x712f64,_0x4488c7=!![]){const _0x58dd1c=a108_0x37a3ad,_0x39af55=_0x712f64['bool'](_0x58dd1c(0x160)),_0x504f79=parseMenuIds(_0x712f64[_0x58dd1c(0x155)](_0x58dd1c(0x17f))),_0x3e0602=parseCsv(_0x712f64[_0x58dd1c(0x155)]('paths')),_0x3ba406=_0x504f79[_0x58dd1c(0x184)]>0x0||_0x3e0602[_0x58dd1c(0x184)]>0x0;if(_0x39af55&&_0x3ba406)throw CliErrors['validation']('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x39af55&&!_0x3ba406){if(!_0x4488c7)return undefined;throw CliErrors[_0x58dd1c(0x17b)](_0x58dd1c(0x16e));}return{'all':_0x39af55,'menuIds':_0x504f79,'paths':_0x3e0602};}function parseMenuIds(_0x4edae3){const _0x467382=a108_0x37a3ad,_0x4ac775=parseCsv(_0x4edae3),_0x5f4def=_0x4ac775[_0x467382(0x14f)](Number);if(_0x5f4def[_0x467382(0x1a3)](_0x1f0714=>!Number[_0x467382(0x170)](_0x1f0714)||_0x1f0714<=0x0))throw CliErrors[_0x467382(0x17b)](_0x467382(0x166));return[...new Set(_0x5f4def)];}function parseCsv(_0x2f2488){const _0x38ccb7=a108_0x37a3ad;return[...new Set(_0x2f2488[_0x38ccb7(0x18c)](',')[_0x38ccb7(0x14f)](_0x8cea06=>_0x8cea06[_0x38ccb7(0x156)]())[_0x38ccb7(0x16d)](Boolean))];}function parseLoadScriptMode(_0x34b832){const _0x26f308=a108_0x37a3ad;if(!_0x34b832)return undefined;if(_0x34b832===_0x26f308(0x19e)||_0x34b832===_0x26f308(0x151)||_0x34b832==='fetch')return _0x34b832;throw CliErrors['validation']('Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch');}function parseParams(_0x429eaa){const _0x26111a=a108_0x37a3ad;if(!_0x429eaa)return{};try{const _0x3d68d7=JSON[_0x26111a(0x19d)](_0x429eaa);if(typeof _0x3d68d7!==_0x26111a(0x186)||_0x3d68d7===null||Array[_0x26111a(0x17a)](_0x3d68d7))return{};return{'jsUrl':typeof _0x3d68d7[_0x26111a(0x15d)]===_0x26111a(0x175)?_0x3d68d7[_0x26111a(0x15d)][_0x26111a(0x156)]():undefined,'cssUrl':typeof _0x3d68d7[_0x26111a(0x163)]===_0x26111a(0x175)?_0x3d68d7['cssUrl']['trim']():undefined};}catch{return{};}}