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

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 (277) hide show
  1. package/README.md +8 -3
  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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -0
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -0
  102. package/lib/commands/kb/delete.js +1 -0
  103. package/lib/commands/kb/detail.js +1 -0
  104. package/lib/commands/kb/index.js +1 -0
  105. package/lib/commands/kb/list.js +1 -0
  106. package/lib/commands/kb/shared.js +1 -0
  107. package/lib/commands/kb/update.js +1 -0
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/init.js +1 -1
  163. package/lib/commands/project/upgrade.js +1 -1
  164. package/lib/commands/registry.js +1 -1
  165. package/lib/commands/role/create.js +1 -1
  166. package/lib/commands/role/delete.js +1 -1
  167. package/lib/commands/role/detail.js +1 -1
  168. package/lib/commands/role/index.js +1 -1
  169. package/lib/commands/role/list.js +1 -1
  170. package/lib/commands/role/shared.js +1 -1
  171. package/lib/commands/role/update.js +1 -1
  172. package/lib/commands/role/user-add.js +1 -1
  173. package/lib/commands/role/user-remove.js +1 -1
  174. package/lib/commands/role/user-resolve.js +1 -1
  175. package/lib/commands/run/index.js +1 -1
  176. package/lib/commands/schema.js +1 -1
  177. package/lib/commands/sql/create.js +1 -1
  178. package/lib/commands/sql/delete.js +1 -1
  179. package/lib/commands/sql/detail.js +1 -1
  180. package/lib/commands/sql/exec.js +1 -1
  181. package/lib/commands/sql/index.js +1 -1
  182. package/lib/commands/sql/list.js +1 -1
  183. package/lib/commands/sql/pull.js +1 -1
  184. package/lib/commands/sql/push.js +1 -1
  185. package/lib/commands/sql/save.js +1 -1
  186. package/lib/commands/sql/shared.js +1 -1
  187. package/lib/commands/sql/status.js +1 -1
  188. package/lib/commands/sql/validate.js +1 -1
  189. package/lib/commands/task/index.js +1 -1
  190. package/lib/commands/task/status.js +1 -1
  191. package/lib/commands/tenant/index.js +1 -0
  192. package/lib/commands/tenant/members-list.js +1 -0
  193. package/lib/commands/tenant/shared.js +1 -0
  194. package/lib/commands/workspace/add.js +1 -1
  195. package/lib/commands/workspace/index.js +1 -1
  196. package/lib/commands/workspace/remove.js +1 -1
  197. package/lib/config/schema.js +1 -1
  198. package/lib/constant/cdn.js +1 -1
  199. package/lib/constant/cli.js +1 -1
  200. package/lib/constant/defaults.js +1 -1
  201. package/lib/constant/domain.js +1 -1
  202. package/lib/constant/env.js +1 -1
  203. package/lib/constant/output.js +1 -1
  204. package/lib/constant/paths.js +1 -1
  205. package/lib/constant/risk.js +1 -1
  206. package/lib/context/app-resolver.js +1 -1
  207. package/lib/context/auth-resolver.js +1 -1
  208. package/lib/context/config-loader.js +1 -1
  209. package/lib/context.js +1 -1
  210. package/lib/core/alias-resolver.js +1 -1
  211. package/lib/core/api-client.js +1 -1
  212. package/lib/core/bff/config.js +1 -1
  213. package/lib/core/bff/file-system.js +1 -1
  214. package/lib/core/bff/hash.js +1 -1
  215. package/lib/core/bff/lock.js +1 -1
  216. package/lib/core/bff/utils.js +1 -1
  217. package/lib/core/db-resolver.js +1 -1
  218. package/lib/core/page/file-system.js +1 -1
  219. package/lib/core/page/hash.js +1 -1
  220. package/lib/core/page/lock.js +1 -1
  221. package/lib/core/sql-index-auditor.js +1 -1
  222. package/lib/core/sql-sync/config.js +1 -1
  223. package/lib/core/sql-sync/file-system.js +1 -1
  224. package/lib/core/sql-sync/hash.js +1 -1
  225. package/lib/core/sql-sync/lock.js +1 -1
  226. package/lib/core/sql-sync/utils.js +1 -1
  227. package/lib/core/sql-validator.js +1 -1
  228. package/lib/errors.js +1 -1
  229. package/lib/framework/build-all-flags.js +1 -1
  230. package/lib/framework/error-output.js +1 -1
  231. package/lib/framework/explicit-yes.js +1 -1
  232. package/lib/framework/flags.js +1 -1
  233. package/lib/framework/help.js +1 -1
  234. package/lib/framework/index.js +1 -1
  235. package/lib/framework/output.js +1 -1
  236. package/lib/framework/response.js +1 -1
  237. package/lib/framework/runner-alias.js +1 -1
  238. package/lib/framework/runner.js +1 -1
  239. package/lib/framework/schema-export.js +1 -1
  240. package/lib/framework/types.js +1 -1
  241. package/lib/generated/build-info.js +1 -1
  242. package/lib/help.js +1 -1
  243. package/lib/skills/main.js +1 -1
  244. package/lib/skills/npx-skills-add.js +1 -1
  245. package/lib/skills/skill-presence.js +1 -0
  246. package/lib/telemetry/cli-command-trace.js +1 -1
  247. package/lib/telemetry/cli-help-trace.js +1 -1
  248. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  249. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  250. package/lib/telemetry/send-cli-trace-log.js +1 -1
  251. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  252. package/lib/utils/ai_config.js +1 -1
  253. package/lib/utils/apply-jq-filter.js +1 -1
  254. package/lib/utils/cdn-config.js +1 -1
  255. package/lib/utils/check-sdk-version.js +1 -1
  256. package/lib/utils/cli-version-check.js +1 -1
  257. package/lib/utils/cli-version-policy.js +1 -1
  258. package/lib/utils/config.js +1 -1
  259. package/lib/utils/copy-directory.js +1 -1
  260. package/lib/utils/entity-with-id.js +1 -1
  261. package/lib/utils/file-utils.js +1 -1
  262. package/lib/utils/guides-cdn.js +1 -1
  263. package/lib/utils/http-client.js +1 -1
  264. package/lib/utils/is-non-interactive.js +1 -1
  265. package/lib/utils/logger.js +1 -1
  266. package/lib/utils/params.js +1 -1
  267. package/lib/utils/platform.js +1 -1
  268. package/lib/utils/rules-cdn.js +1 -1
  269. package/lib/utils/sleep.js +1 -1
  270. package/lib/utils/template-replacer.js +1 -1
  271. package/lib/utils/update-notice.js +1 -1
  272. package/lib/utils/version.js +1 -1
  273. package/lib/utils/with-active-cookie.js +1 -1
  274. package/lib/utils/write-cli-side-channel.js +1 -1
  275. package/package.json +2 -2
  276. package/lib/commands/app/add.js +0 -1
  277. package/lib/commands/app/remove.js +0 -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 a91_0x474218=a91_0x50b8;(function(_0x2c607a,_0x57fbdd){const _0x563c27=a91_0x50b8,_0x1475a5=_0x2c607a();while(!![]){try{const _0x28e439=-parseInt(_0x563c27(0x117))/0x1*(-parseInt(_0x563c27(0xef))/0x2)+parseInt(_0x563c27(0x107))/0x3*(-parseInt(_0x563c27(0x106))/0x4)+-parseInt(_0x563c27(0x10e))/0x5*(-parseInt(_0x563c27(0xf3))/0x6)+parseInt(_0x563c27(0x101))/0x7*(-parseInt(_0x563c27(0xf6))/0x8)+parseInt(_0x563c27(0xfb))/0x9*(parseInt(_0x563c27(0x113))/0xa)+-parseInt(_0x563c27(0xff))/0xb+parseInt(_0x563c27(0x111))/0xc*(parseInt(_0x563c27(0x10d))/0xd);if(_0x28e439===_0x57fbdd)break;else _0x1475a5['push'](_0x1475a5['shift']());}catch(_0x2e78fc){_0x1475a5['push'](_0x1475a5['shift']());}}}(a91_0x3c92,0xcf412));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a91_0x50b8(_0x56991e,_0x4b01ad){_0x56991e=_0x56991e-0xef;const _0x3c92a3=a91_0x3c92();let _0x50b894=_0x3c92a3[_0x56991e];return _0x50b894;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a91_0x3c92(){const _0x3317c4=['New\x20host:port','dburl','str','6YDJMad','dbname','POST','328CpJlrp','New\x20connection\x20parameter\x20string','write','New\x20description','has','27nDsfAw','string','/smartapi/dblink/update','******','2355056cdxBbo','dbUrl','147434SgmpjT','num','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','dbparam','dbParam','80oqEvhm','174129FWnxwG','username','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dbdesc','New\x20username','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','713011MIOuDk','5264765WRaKNQ','New\x20database\x20name','password','180eJBMqk','[redacted]','1085790eobIfe','validation','Updated\x20db\x20link\x20','trim','295339BJNqkf','update','6fnEgQh'];a91_0x3c92=function(){return _0x3317c4;};return a91_0x3c92();}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a91_0x474218(0xfe),a91_0x474218(0x112)]);function mergeDbLinkUpdate(_0x47665c,_0x83c13d){const _0x257f6b=a91_0x474218,_0x4978f4={..._0x47665c},_0xe031da=_0x83c13d[_0x257f6b(0xf2)](_0x257f6b(0x110));if(_0xe031da&&MASKED_PASSWORD_VALUES[_0x257f6b(0xfa)](_0xe031da))throw CliErrors[_0x257f6b(0x114)](_0x257f6b(0x103));if(!_0xe031da&&MASKED_PASSWORD_VALUES[_0x257f6b(0xfa)](String(_0x47665c[_0x257f6b(0x110)]??'')))throw CliErrors[_0x257f6b(0x114)](_0x257f6b(0x109));const _0x22eb4b=_0x83c13d[_0x257f6b(0xf2)](_0x257f6b(0xf4));if(_0x22eb4b)_0x4978f4['dbName']=_0x22eb4b;const _0x3c463d=_0x83c13d['str']('dburl');if(_0x3c463d)_0x4978f4[_0x257f6b(0x100)]=_0x3c463d[_0x257f6b(0x116)]();const _0x48e7f8=_0x83c13d['str'](_0x257f6b(0x108));if(_0x48e7f8)_0x4978f4['username']=_0x48e7f8;if(_0xe031da)_0x4978f4[_0x257f6b(0x110)]=_0xe031da;const _0x1c4218=_0x83c13d[_0x257f6b(0xf2)](_0x257f6b(0x104));if(_0x1c4218)_0x4978f4[_0x257f6b(0x105)]=_0x1c4218;const _0x55b882=_0x83c13d[_0x257f6b(0xf2)](_0x257f6b(0x10a));if(_0x55b882)_0x4978f4['dbDesc']=_0x55b882;return _0x4978f4;}export const dbUpdate={'service':'db','command':a91_0x474218(0x118),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a91_0x474218(0xf8),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a91_0x474218(0xf4),'type':a91_0x474218(0xfc),'description':a91_0x474218(0x10f)},{'name':a91_0x474218(0xf1),'type':a91_0x474218(0xfc),'description':a91_0x474218(0xf0)},{'name':a91_0x474218(0x108),'type':a91_0x474218(0xfc),'description':a91_0x474218(0x10b)},{'name':a91_0x474218(0x110),'type':a91_0x474218(0xfc),'description':a91_0x474218(0x10c)},{'name':a91_0x474218(0x104),'type':a91_0x474218(0xfc),'description':a91_0x474218(0xf7)},{'name':'dbdesc','type':a91_0x474218(0xfc),'description':a91_0x474218(0xf9)}],async 'validate'(_0xb7e9ce){const _0x2deb43=a91_0x474218,_0x7c8116=_0xb7e9ce[_0x2deb43(0xf2)](_0x2deb43(0xf1));if(_0x7c8116&&!validateDbUrl(_0x7c8116['trim']()))throw CliErrors[_0x2deb43(0x114)]('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x7c8116+'\x22');},async 'dryRun'(_0x28c676){const _0x9a66e4=a91_0x474218,_0xebd4e0=_0x28c676[_0x9a66e4(0x102)]('id'),_0x1666d9=await getDbLinkInfo(_0xebd4e0),_0x27f4f9=mergeDbLinkUpdate(_0x1666d9,_0x28c676),_0x1d2052=sanitizeDbLinkForOutput(_0x27f4f9);return{'method':_0x9a66e4(0xf5),'url':_0x9a66e4(0xfd),'body':_0x1d2052,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x780d3b){const _0x2fd442=a91_0x474218,_0x1c47ac=_0x780d3b[_0x2fd442(0x102)]('id'),_0x33a9f1=await getDbLinkInfo(_0x1c47ac),_0x2938d9=mergeDbLinkUpdate(_0x33a9f1,_0x780d3b),{id:_0x369ea6,entity:_0x4e9027}=normalizeEntityWithIdResponse(await updateDbLink(_0x2938d9));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x4e9027),'message':_0x2fd442(0x115)+(_0x369ea6??_0x1c47ac)};}};
@@ -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 a92_0x221142=a92_0x53cc;(function(_0x27ebd5,_0x5649e4){const _0x1a1204=a92_0x53cc,_0x265bb6=_0x27ebd5();while(!![]){try{const _0x1e12f7=parseInt(_0x1a1204(0x99))/0x1*(parseInt(_0x1a1204(0x9c))/0x2)+parseInt(_0x1a1204(0x9b))/0x3*(-parseInt(_0x1a1204(0xaf))/0x4)+parseInt(_0x1a1204(0x91))/0x5+parseInt(_0x1a1204(0x81))/0x6+parseInt(_0x1a1204(0x89))/0x7+-parseInt(_0x1a1204(0xce))/0x8*(-parseInt(_0x1a1204(0xcc))/0x9)+parseInt(_0x1a1204(0x97))/0xa*(-parseInt(_0x1a1204(0x9f))/0xb);if(_0x1e12f7===_0x5649e4)break;else _0x265bb6['push'](_0x265bb6['shift']());}catch(_0x10ca58){_0x265bb6['push'](_0x265bb6['shift']());}}}(a92_0x37d0,0xabf73));import a92_0x4daab from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a92_0x53cc(_0x574d56,_0xea4629){_0x574d56=_0x574d56-0x7d;const _0x37d065=a92_0x37d0();let _0x53cc91=_0x37d065[_0x574d56];return _0x53cc91;}async function execute(_0x29b518){const _0x3977de=a92_0x53cc,_0x17100c=GIT_COMMIT!==_0x3977de(0x7e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3977de(0x87)](0x0,0xa)+')':VERSION,_0x4c1719=buildConfigFromFlags({}),_0x46c900=getCookie();console[_0x3977de(0xcb)](),console['log'](a92_0x4daab[_0x3977de(0xb1)](CLI_BIN_NAME+_0x3977de(0xc2))),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xd1)]('─'['repeat'](0x32))),console[_0x3977de(0xcb)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x17100c),console[_0x3977de(0xcb)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console['log'](_0x3977de(0x86)+process[_0x3977de(0xa5)]+'\x20'+process[_0x3977de(0x8a)]),console[_0x3977de(0xcb)](),console['log'](a92_0x4daab[_0x3977de(0xb1)]('\x20\x20Config\x20Files')),console[_0x3977de(0xcb)](a92_0x4daab['gray'](_0x3977de(0xa6)[_0x3977de(0x93)](0x1e)));const _0x468ea6=getGlobalConfigPath(),_0x7872d6=getProjectConfigPath();console['log'](_0x3977de(0x9d)+(_0x468ea6||a92_0x4daab['gray'](_0x3977de(0xaa)))),console[_0x3977de(0xcb)](_0x3977de(0xb5)+(_0x7872d6||a92_0x4daab['gray']('(not\x20found)'))),console[_0x3977de(0xcb)](),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xb1)](_0x3977de(0xca))),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xd1)]('\x20\x20─'[_0x3977de(0x93)](0x1e)));const _0x584893=(_0x44c269,_0x439a26)=>{const _0x394b09=_0x3977de;if(!_0x439a26){console[_0x394b09(0xcb)]('\x20\x20'+_0x44c269[_0x394b09(0x96)](0x11)+'\x20'+a92_0x4daab['gray'](_0x394b09(0xbf)));return;}const _0x537a3a=inspectCliConfigJsonFile(_0x439a26);if(_0x537a3a[_0x394b09(0x8f)]==='ok')console['log']('\x20\x20'+_0x44c269[_0x394b09(0x96)](0x11)+'\x20'+a92_0x4daab[_0x394b09(0xc9)](_0x394b09(0x8d)));else{if(_0x537a3a['status']===_0x394b09(0xc5))console[_0x394b09(0xcb)]('\x20\x20'+_0x44c269[_0x394b09(0x96)](0x11)+'\x20'+a92_0x4daab[_0x394b09(0x98)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x537a3a[_0x394b09(0x8f)]===_0x394b09(0xae)?console[_0x394b09(0xcb)]('\x20\x20'+_0x44c269[_0x394b09(0x96)](0x11)+'\x20'+a92_0x4daab[_0x394b09(0xd1)](_0x394b09(0xb0))):(console[_0x394b09(0xcb)]('\x20\x20'+_0x44c269['padEnd'](0x11)+'\x20'+a92_0x4daab[_0x394b09(0xb3)](_0x394b09(0xcd))),console[_0x394b09(0xcb)]('\x20\x20'+''[_0x394b09(0x96)](0x11)+'\x20'+a92_0x4daab['red'](_0x537a3a['message'])));}};_0x584893(_0x3977de(0xc3),_0x468ea6),_0x584893(_0x3977de(0xc8),_0x7872d6),console[_0x3977de(0xcb)](),console[_0x3977de(0xcb)](a92_0x4daab['bold'](_0x3977de(0xb6))),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xa6)['repeat'](0x1e))),console['log'](_0x3977de(0xb8)+(_0x4c1719[_0x3977de(0xa2)]||a92_0x4daab[_0x3977de(0xb3)](_0x3977de(0xa3)))),console[_0x3977de(0xcb)](_0x3977de(0x7d)+_0x4c1719[_0x3977de(0xbd)]),console['log'](_0x3977de(0x83)+_0x4c1719[_0x3977de(0xb9)]),console['log'](_0x3977de(0x84)+_0x4c1719['apiDir']),console[_0x3977de(0xcb)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x4c1719['defaultApp']||a92_0x4daab['gray'](_0x3977de(0xd0)))),console[_0x3977de(0xcb)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x4c1719[_0x3977de(0x9e)]||a92_0x4daab[_0x3977de(0xd1)]('(none)'))),console[_0x3977de(0xcb)](_0x3977de(0xc4)+(_0x4c1719['explicitAppName']||a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xd0)))),console[_0x3977de(0xcb)](_0x3977de(0x8e)+(_0x4c1719['format']||a92_0x4daab[_0x3977de(0xd1)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x3977de(0xa4)]+')'))),console[_0x3977de(0xcb)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4c1719['pageSize']??a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xac)))),console['log'](_0x3977de(0x95)+_0x4c1719['riskLevel']),console[_0x3977de(0xcb)](_0x3977de(0xba)+_0x4c1719['verbose']),console[_0x3977de(0xcb)](_0x3977de(0xb2)+(_0x4c1719[_0x3977de(0xbb)]?a92_0x4daab[_0x3977de(0xc9)](_0x3977de(0xa1)+_0x4c1719['cookie'][_0x3977de(0xa8)]+')'):_0x46c900?a92_0x4daab[_0x3977de(0xc9)](_0x3977de(0x88)+_0x46c900['length']+')'):a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xd0))));const _0x5d277b=Object['keys'](_0x4c1719[_0x3977de(0xcf)]);if(_0x5d277b[_0x3977de(0xa8)]>0x0){console[_0x3977de(0xcb)](),console[_0x3977de(0xcb)](a92_0x4daab['bold']('\x20\x20Apps')),console['log'](a92_0x4daab[_0x3977de(0xd1)]('\x20\x20─'[_0x3977de(0x93)](0x1e)));for(const _0xf77b87 of _0x5d277b){const _0x5d8d25=_0x4c1719[_0x3977de(0xcf)][_0xf77b87],_0x2022aa=_0xf77b87===_0x4c1719[_0x3977de(0xc7)],_0xca19f3=_0xf77b87===_0x4c1719[_0x3977de(0x9e)],_0x57a4b7=_0xca19f3?a92_0x4daab['green'](_0x3977de(0x85)):'',_0x176f48=_0x2022aa?_0x3977de(0xc6):'';console[_0x3977de(0xcb)]('\x20\x20'+_0xf77b87+_0x176f48+_0x57a4b7),console['log'](_0x3977de(0xad)+_0x5d8d25[_0x3977de(0xbc)]);const _0x1c4d17=buildAppDoctorFields(_0x5d8d25,{'env':_0x4c1719[_0x3977de(0xbd)],'apiDir':_0x4c1719[_0x3977de(0xa9)][_0x3977de(0xc1)]||DEFAULT_CONFIG_VALUES[_0x3977de(0xc1)],'cookie':_0x4c1719[_0x3977de(0xbb)]||_0x46c900||undefined,'accessKey':_0x4c1719[_0x3977de(0x8c)]});console['log'](_0x3977de(0xab)+_0x1c4d17[_0x3977de(0xbd)][_0x3977de(0x8b)]+'\x20\x20'+a92_0x4daab[_0x3977de(0xd1)]('('+_0x1c4d17[_0x3977de(0xbd)]['source']+')')),console[_0x3977de(0xcb)](_0x3977de(0x92)+_0x1c4d17['apiDir'][_0x3977de(0x8b)]+'\x20\x20'+a92_0x4daab[_0x3977de(0xd1)]('('+_0x1c4d17[_0x3977de(0xc1)][_0x3977de(0x90)]+')'));const _0x586a8a=_0x1c4d17[_0x3977de(0xbb)][_0x3977de(0x8b)]?a92_0x4daab['green'](_0x3977de(0xa1)+_0x1c4d17[_0x3977de(0xbb)][_0x3977de(0x8b)][_0x3977de(0xa8)]+')'):a92_0x4daab['gray']('(none)');console[_0x3977de(0xcb)](_0x3977de(0xa0)+_0x586a8a+'\x20\x20'+a92_0x4daab[_0x3977de(0xd1)]('('+_0x1c4d17[_0x3977de(0xbb)]['source']+')'));const _0x2d49ba=_0x1c4d17[_0x3977de(0x8c)][_0x3977de(0x8b)]?a92_0x4daab[_0x3977de(0xc9)](_0x3977de(0xa1)+_0x1c4d17[_0x3977de(0x8c)][_0x3977de(0x8b)][_0x3977de(0xa8)]+')'):a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xd0));console[_0x3977de(0xcb)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x2d49ba+'\x20\x20'+a92_0x4daab[_0x3977de(0xd1)]('('+_0x1c4d17[_0x3977de(0x8c)]['source']+')'));}}console[_0x3977de(0xcb)](),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xb1)](_0x3977de(0xc0))),console['log'](a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xa6)['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x3977de(0xb4)+getUserDomain()),console[_0x3977de(0xcb)](_0x3977de(0xbe)+getRuntimeDomain()),console['log'](),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xb1)](_0x3977de(0x7f))),console[_0x3977de(0xcb)](a92_0x4daab[_0x3977de(0xd1)](_0x3977de(0xa6)[_0x3977de(0x93)](0x1e)));if(_0x46c900){const _0x3f7c04=await getIsSessionValid();console[_0x3977de(0xcb)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3f7c04?a92_0x4daab[_0x3977de(0xc9)](_0x3977de(0xa7)):a92_0x4daab[_0x3977de(0xb3)](_0x3977de(0x80))));}else console[_0x3977de(0xcb)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a92_0x4daab['red'](_0x3977de(0x82)));return console['log'](),{'ok':!![]};}function a92_0x37d0(){const _0x125c6d=['(default)','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','missing','137704WVWVAZ','(missing)','bold','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','doctor','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','cookie','appcode','env','\x20\x20runtimeDomain:\x20\x20\x20','(no\x20file)','\x20\x20API\x20Endpoints','apiDir','\x20doctor','Global','\x20\x20explicitAppName:\x20','empty','\x20(default)','defaultApp','Project','green','\x20\x20Config\x20JSON','log','2846115lloZxP','✗\x20Invalid\x20JSON','8fEArTB','apps','(none)','gray','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20Auth','✗\x20Expired','3222810iwUHTE','✗\x20Not\x20logged\x20in','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','slice','(set\x20via\x20file,\x20length=','4686892DLUxaI','arch','value','accessKey','✓\x20Valid\x20JSON','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','source','1231165xWVlCh','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','repeat','read','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','padEnd','1070XzzddB','yellow','2193OEYuDj','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','24SvePbe','378EqslWq','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','123761LBkDPS','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','(set,\x20length=','appCode','(not\x20set)','format','platform','\x20\x20─','✓\x20Valid','length','raw','(not\x20found)','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'];a92_0x37d0=function(){return _0x125c6d;};return a92_0x37d0();}export const doctorDefinition={'service':a92_0x221142(0xb7),'command':'check','description':a92_0x221142(0x9a),'risk':a92_0x221142(0x94),'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
+ function a93_0x4667(){const _0xa09372=['\x20to\x20development\x20app\x20','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Preview:\x20upload\x20','1662xWUUYW','string','2413050JAxCrH','2CFazZv','query-url','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','Uploaded\x20file:\x20','validation','filePath','str','path','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','282633XudMNl','/smartapi/common/uploadFile','48nheZrA','1972400uaSeFN','filePath\x20is\x20required.','POST','long-term','11683xdBOws','53639421uwznMP','appCode','read','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','boolean','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','download','File','23643kczALt','file','Path\x20to\x20the\x20local\x20file\x20to\x20upload','trim','upload','714694sdQWIB','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','4610tuzDNR'];a93_0x4667=function(){return _0xa09372;};return a93_0x4667();}const a93_0x2df10b=a93_0x21eb;(function(_0x57a7d9,_0x4b28ba){const _0x2cb4b8=a93_0x21eb,_0xcc837f=_0x57a7d9();while(!![]){try{const _0x5e7911=-parseInt(_0x2cb4b8(0x1cb))/0x1*(parseInt(_0x2cb4b8(0x1d5))/0x2)+parseInt(_0x2cb4b8(0x1b6))/0x3*(-parseInt(_0x2cb4b8(0x1b8))/0x4)+-parseInt(_0x2cb4b8(0x1d4))/0x5+-parseInt(_0x2cb4b8(0x1d2))/0x6*(parseInt(_0x2cb4b8(0x1bd))/0x7)+-parseInt(_0x2cb4b8(0x1b9))/0x8+parseInt(_0x2cb4b8(0x1c6))/0x9*(-parseInt(_0x2cb4b8(0x1ce))/0xa)+parseInt(_0x2cb4b8(0x1be))/0xb;if(_0x5e7911===_0x4b28ba)break;else _0xcc837f['push'](_0xcc837f['shift']());}catch(_0xd87390){_0xcc837f['push'](_0xcc837f['shift']());}}}(a93_0x4667,0x99755));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':'file','type':a93_0x2df10b(0x1d3),'required':!![],'description':a93_0x2df10b(0x1c8)},FILEPATH_FLAG={'name':'filepath','type':'string','required':!![],'description':a93_0x2df10b(0x1c1)},DOWNLOAD_FLAG={'name':'download','type':'boolean','description':a93_0x2df10b(0x1b5)},LONG_TERM_FLAG={'name':a93_0x2df10b(0x1bc),'type':a93_0x2df10b(0x1c2),'description':a93_0x2df10b(0x1d7)};function a93_0x21eb(_0x27e217,_0x3b0794){_0x27e217=_0x27e217-0x1b1;const _0x46671c=a93_0x4667();let _0x21eb60=_0x46671c[_0x27e217];return _0x21eb60;}function requireFilePath(_0x7eac24){const _0x256f0d=a93_0x2df10b,_0x2e5a96=_0x7eac24[_0x256f0d(0x1c9)]();if(!_0x2e5a96)throw CliErrors[_0x256f0d(0x1b1)](_0x256f0d(0x1ba));return _0x2e5a96;}const fileUpload={'service':a93_0x2df10b(0x1c7),'command':a93_0x2df10b(0x1ca),'description':a93_0x2df10b(0x1c3),'risk':a93_0x2df10b(0x1c0),'flags':[FILE_FLAG],async 'dryRun'(_0x1f64bc){const _0x561afb=a93_0x2df10b,_0x416011=requireDevelopmentUploadFile(_0x1f64bc[_0x561afb(0x1b3)](_0x561afb(0x1c7)),_0x561afb(0x1c5));return{'method':_0x561afb(0x1bb),'url':_0x561afb(0x1b7),'body':{'appCode':_0x1f64bc[_0x561afb(0x1bf)],'multipart':{'file':_0x416011}},'description':_0x561afb(0x1d1)+_0x416011['path']+_0x561afb(0x1cf)+_0x1f64bc[_0x561afb(0x1bf)]};},async 'execute'(_0xe7fd3a){const _0x223a38=a93_0x2df10b,_0x506704=requireDevelopmentUploadFile(_0xe7fd3a[_0x223a38(0x1b3)]('file'),_0x223a38(0x1c5)),_0x217ced=await uploadDevelopmentFile(_0xe7fd3a[_0x223a38(0x1bf)],_0x506704[_0x223a38(0x1b4)]);return{'ok':!![],'data':_0x217ced,'message':_0x217ced[_0x223a38(0x1b2)]?_0x223a38(0x1d8)+_0x217ced['filePath']+_0x223a38(0x1d0):_0x223a38(0x1cc)};}},fileQueryUrl={'service':a93_0x2df10b(0x1c7),'command':a93_0x2df10b(0x1d6),'description':a93_0x2df10b(0x1cd),'risk':a93_0x2df10b(0x1c0),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x47672b){const _0x4e876d=a93_0x2df10b,_0x4dc9ff=requireFilePath(_0x47672b[_0x4e876d(0x1b3)]('filepath')),_0x42a2c1=await queryDevelopmentFileUrl(_0x4dc9ff,{'download':_0x47672b['bool'](_0x4e876d(0x1c4)),'longTerm':_0x47672b['bool'](_0x4e876d(0x1bc))});return{'ok':!![],'data':_0x42a2c1};}};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 a94_0x128c67=a94_0x5aec;(function(_0x1840f5,_0xda856a){const _0x4966ff=a94_0x5aec,_0x5c395f=_0x1840f5();while(!![]){try{const _0x8ee346=-parseInt(_0x4966ff(0xa8))/0x1+-parseInt(_0x4966ff(0x9f))/0x2*(parseInt(_0x4966ff(0xb1))/0x3)+-parseInt(_0x4966ff(0xb7))/0x4*(-parseInt(_0x4966ff(0xa2))/0x5)+parseInt(_0x4966ff(0xc6))/0x6+parseInt(_0x4966ff(0xae))/0x7*(parseInt(_0x4966ff(0xb8))/0x8)+-parseInt(_0x4966ff(0xba))/0x9*(parseInt(_0x4966ff(0xa3))/0xa)+parseInt(_0x4966ff(0xa0))/0xb;if(_0x8ee346===_0xda856a)break;else _0x5c395f['push'](_0x5c395f['shift']());}catch(_0x3b68d5){_0x5c395f['push'](_0x5c395f['shift']());}}}(a94_0x356a,0x787f5));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';function a94_0x5aec(_0x452093,_0x2442c9){_0x452093=_0x452093-0x9b;const _0x356a68=a94_0x356a();let _0x5aecc9=_0x356a68[_0x452093];return _0x5aecc9;}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(_0x18f775){return{'appCode':_0x18f775,'appName':_0x18f775};}function a94_0x356a(){const _0x3cc824=['Target\x20environment','boolean','6iOCSif','5635861KCGKHt','Usage:\x20','70YcVvGD','775210tKxoOr','../../commands/project/init.js','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','map','defaultApp','604795cwPzMs','run','validation','\x0a✓\x20Successfully\x20initialized\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','2287859HAytAM','production','nonInteractive','279975ErXFZZ','env','\x20\x20Default:\x20','App\x20code\x20to\x20initialize\x20with','global','custom','5756heYECv','24QAIUWQ','\x20\x20Apps:\x20','18jjOfVn','appcode','string','write','bool','message','yes','join','\x20config','log','project','\x20\x20Env:\x20','122166OhUzXW','\x20\x20Config:\x20','Use\x20`','flagMissing','Write\x20to\x20global\x20config\x20instead\x20of\x20project','valid','appCode'];a94_0x356a=function(){return _0x3cc824;};return a94_0x356a();}function writeInitConfig(_0x1b61aa,_0x38ade8,_0xef248a){const _0x402368=a94_0x5aec,_0xc758d5=resolveWriteConfigPath(_0x1b61aa),_0x2167db=buildCanonicalProjectConfig({},{'appCodes':_0x38ade8[_0x402368(0xa6)](_0x19465d=>_0x19465d[_0x402368(0x9c)]),'env':_0xef248a,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0xc758d5,_0x2167db);const _0x483c78=_0x1b61aa===_0x402368(0xb5)?_0x402368(0xb5):_0x402368(0xc4);console['log'](_0x402368(0xab)+_0x483c78+_0x402368(0xc2)),console['log'](_0x402368(0xb9)+_0x38ade8[_0x402368(0xa6)](_0x1bb6c7=>_0x1bb6c7['appCode'])[_0x402368(0xc1)](',\x20')),console['log'](_0x402368(0xb3)+_0x2167db[_0x402368(0xa7)]),console[_0x402368(0xc3)](_0x402368(0xc5)+_0x2167db[_0x402368(0xb2)]),console['log'](_0x402368(0xc7)+_0xc758d5);}async function runSmartInit(_0x4ea9c3){const _0x1c1e78=a94_0x5aec,_0x482efb=process['cwd'](),_0xa6198a=_0x4ea9c3[_0x1c1e78(0xbe)](_0x1c1e78(0xb5))?_0x1c1e78(0xb5):_0x1c1e78(0xc4),_0x416dfa=_0x4ea9c3['str'](_0x1c1e78(0xb2))||'production',_0x3abc38=_0x4ea9c3['str'](_0x1c1e78(0xbb))||undefined,_0x12b3c5=_0x4ea9c3[_0x1c1e78(0xbe)](_0x1c1e78(0xc4));if(_0x12b3c5){const {initConfig:_0x56aee8}=await import(_0x1c1e78(0xa4));return _0x56aee8({'appcode':_0x3abc38,'env':_0x416dfa,'autoYes':_0x4ea9c3[_0x1c1e78(0xbe)](_0x1c1e78(0xc0))});}if(_0xa6198a===_0x1c1e78(0xc4)){const _0x1d2d2f=existsSync(resolve(_0x482efb,NEW_CONFIG_NAME)),_0x4c286b=LEGACY_CONFIG_NAMES['some'](_0x3ddd31=>existsSync(resolve(_0x482efb,_0x3ddd31)));if(_0x4c286b&&!_0x1d2d2f)return console['log']('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4ea9c3[_0x1c1e78(0xb0)],{'yes':_0x4ea9c3[_0x1c1e78(0xbe)](_0x1c1e78(0xc0))});if(_0x1d2d2f)throw CliErrors[_0x1c1e78(0xaa)](_0x1c1e78(0xa5),_0x1c1e78(0xc8)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x3abc38){const _0x2558b7=validateAppcode(_0x3abc38);if(!_0x2558b7[_0x1c1e78(0x9b)])throw CliErrors['validation'](_0x2558b7[_0x1c1e78(0xbf)]);writeInitConfig(_0xa6198a,[syntheticApp(_0x3abc38)],_0x416dfa);return;}if(_0x4ea9c3[_0x1c1e78(0xb0)])throw CliErrors[_0x1c1e78(0xc9)]('appcode',_0x1c1e78(0xa1)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x71620c=getCookie(),_0x1b8b4d=await selectMultipleApps(_0x71620c),_0x41cc71=_0x1b8b4d===_0x1c1e78(0xb6)?[syntheticApp(await promptCustomAppcode())]:_0x1b8b4d;writeInitConfig(_0xa6198a,_0x41cc71,_0x416dfa);}const initFlags=[{'name':a94_0x128c67(0xb5),'type':a94_0x128c67(0x9e),'description':a94_0x128c67(0xca),'default':![]},{'name':a94_0x128c67(0xb2),'type':a94_0x128c67(0xbc),'description':a94_0x128c67(0x9d),'default':a94_0x128c67(0xaf),'enum':[...RABETBASE_ENV_VALUES]},{'name':a94_0x128c67(0xbb),'type':'string','description':a94_0x128c67(0xb4)},{'name':'project','type':'boolean','description':a94_0x128c67(0xac),'default':![]},{'name':a94_0x128c67(0xc0),'type':a94_0x128c67(0x9e),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':'init','command':a94_0x128c67(0xa9),'description':a94_0x128c67(0xad),'risk':a94_0x128c67(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x1d78c3){return await runSmartInit(_0x1d78c3),{'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 a95_0x2463(){const _0x5ca56f=['34156TgqzmS','1351458VAigmU','304ELERmD','203690SDIiKG','722532RwvtDX','129766iJTbWD','49xaLdyL','309sMJnqI','27NeRuMg','33278LtUqub','247uPWmYp','9028316LVezwC','5zAdFfl'];a95_0x2463=function(){return _0x5ca56f;};return a95_0x2463();}function a95_0x12e1(_0x54aa82,_0x2ac83a){_0x54aa82=_0x54aa82-0xc3;const _0x246351=a95_0x2463();let _0x12e181=_0x246351[_0x54aa82];return _0x12e181;}(function(_0x31a041,_0x5246d3){const _0x5ace1d=a95_0x12e1,_0x3fc48e=_0x31a041();while(!![]){try{const _0x55a90a=parseInt(_0x5ace1d(0xc3))/0x1*(parseInt(_0x5ace1d(0xc6))/0x2)+parseInt(_0x5ace1d(0xc4))/0x3*(parseInt(_0x5ace1d(0xca))/0x4)+-parseInt(_0x5ace1d(0xc9))/0x5*(parseInt(_0x5ace1d(0xcb))/0x6)+parseInt(_0x5ace1d(0xcf))/0x7*(-parseInt(_0x5ace1d(0xcc))/0x8)+-parseInt(_0x5ace1d(0xc5))/0x9*(-parseInt(_0x5ace1d(0xcd))/0xa)+parseInt(_0x5ace1d(0xc8))/0xb+parseInt(_0x5ace1d(0xce))/0xc*(-parseInt(_0x5ace1d(0xc7))/0xd);if(_0x55a90a===_0x5246d3)break;else _0x3fc48e['push'](_0x3fc48e['shift']());}catch(_0x445741){_0x3fc48e['push'](_0x3fc48e['shift']());}}}(a95_0x2463,0x7acd3));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -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 a96_0x463cb3=a96_0x51e4;(function(_0x126d29,_0x137afe){const _0x779843=a96_0x51e4,_0x45ae87=_0x126d29();while(!![]){try{const _0x34da24=parseInt(_0x779843(0xd2))/0x1*(-parseInt(_0x779843(0xdc))/0x2)+-parseInt(_0x779843(0xf0))/0x3*(-parseInt(_0x779843(0xe8))/0x4)+parseInt(_0x779843(0xe0))/0x5+parseInt(_0x779843(0xde))/0x6+-parseInt(_0x779843(0xe2))/0x7*(parseInt(_0x779843(0xed))/0x8)+parseInt(_0x779843(0xea))/0x9*(parseInt(_0x779843(0xdd))/0xa)+-parseInt(_0x779843(0xd8))/0xb*(-parseInt(_0x779843(0xf1))/0xc);if(_0x34da24===_0x137afe)break;else _0x45ae87['push'](_0x45ae87['shift']());}catch(_0x387fa5){_0x45ae87['push'](_0x45ae87['shift']());}}}(a96_0x10d7,0x1bdab));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a96_0x463cb3(0xd3);const NUDGE_SUPPRESSED_CODES=new Set([a96_0x463cb3(0xce),a96_0x463cb3(0xe1),'config_missing',a96_0x463cb3(0xdf),a96_0x463cb3(0xec),a96_0x463cb3(0xeb),a96_0x463cb3(0xd6),a96_0x463cb3(0xcf)]),defaultWriter=_0x2bbcd1=>{const _0x12f540=a96_0x463cb3;process[_0x12f540(0xe4)][_0x12f540(0xe3)](_0x2bbcd1);};export function shouldNudgeForError(_0xf6a879,_0x39d004){const _0x252ad3=a96_0x463cb3;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x39d004['service']===_0x252ad3(0xd7)&&_0x39d004[_0x252ad3(0xe6)]===_0x252ad3(0xd9))return![];if(_0xf6a879 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0xf6a879[_0x252ad3(0xef)]);return!![];}export function printIssueReportNudgeForError(_0x45799c,_0x1403ce,_0x1daa6d=defaultWriter){if(!shouldNudgeForError(_0x45799c,_0x1403ce))return;const _0xc7b6e1=buildSuggestedTitle(_0x45799c,_0x1403ce);_0x1daa6d(formatNudge(_0xc7b6e1));}function buildSuggestedTitle(_0x431b22,_0x203a36){const _0x1abbb9=a96_0x463cb3,_0x5d7323=_0x431b22 instanceof Error?_0x431b22[_0x1abbb9(0xd5)]:String(_0x431b22),_0x258bf4=_0x5d7323['replace'](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x1abbb9(0xf2)]()[_0x1abbb9(0xd1)](0x0,0x78)[_0x1abbb9(0xe9)](/"/g,'\x5c\x22'),_0x2ba306=CLI_BIN_NAME+'\x20'+_0x203a36[_0x1abbb9(0xdb)]+'\x20'+_0x203a36['command'];return _0x258bf4[_0x1abbb9(0xe5)]>0x0?_0x2ba306+':\x20'+_0x258bf4:_0x2ba306;}function a96_0x51e4(_0x53fbe7,_0x4879d0){_0x53fbe7=_0x53fbe7-0xce;const _0x10d70b=a96_0x10d7();let _0x51e4f5=_0x10d70b[_0x53fbe7];return _0x51e4f5;}function a96_0x10d7(){const _0x31b132=['write','stderr','length','command','join','20584LzGPhT','replace','9iPzOYX','flag_missing','unknown_command','136NqMLul','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','code','27cYvaLu','2238708BBfQVU','trim','cancelled','network_error','\x20\x20Set\x20','slice','171956TGXyqT','RABETBASE_DISABLE_ISSUE_NUDGE','Hit\x20a\x20','message','validation_error','issue','11JxNeQs','report','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','service','2ivBPvi','500700YYXJUa','191478irhUhX','not_in_project','543350ZqXyLz','auth_required','56609RhiSqe'];a96_0x10d7=function(){return _0x31b132;};return a96_0x10d7();}function formatNudge(_0x5ac53a){const _0x3b3558=a96_0x463cb3;return['',_0x3b3558(0xd4)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c','\x20\x20\x20\x20--title\x20\x22'+_0x5ac53a+'\x22\x20\x5c',_0x3b3558(0xda),_0x3b3558(0xee),_0x3b3558(0xd0)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x3b3558(0xe7)]('\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 a97_0x4125c5=a97_0x171f;(function(_0x48e05f,_0x541a59){const _0x3b13c4=a97_0x171f,_0x1b1382=_0x48e05f();while(!![]){try{const _0x117531=-parseInt(_0x3b13c4(0x1f1))/0x1+-parseInt(_0x3b13c4(0x1c0))/0x2+parseInt(_0x3b13c4(0x1c1))/0x3+-parseInt(_0x3b13c4(0x1f4))/0x4+-parseInt(_0x3b13c4(0x1e8))/0x5*(-parseInt(_0x3b13c4(0x1e4))/0x6)+parseInt(_0x3b13c4(0x1c9))/0x7*(parseInt(_0x3b13c4(0x1ee))/0x8)+parseInt(_0x3b13c4(0x1cd))/0x9;if(_0x117531===_0x541a59)break;else _0x1b1382['push'](_0x1b1382['shift']());}catch(_0x4f89bd){_0x1b1382['push'](_0x1b1382['shift']());}}}(a97_0x10e5,0xb97ec));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';function a97_0x10e5(){const _0x42e0e8=['217vPjWsn','sanitize','issue.description_redactions','Platform\x20issue\x20reported','7535871vCkfSC','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','Issue\x20description\x20file\x20is\x20empty:\x20','report','One-line\x20issue\x20summary','issue.description_redaction_kinds','descriptionFilePath','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','string','Issue\x20description\x20cannot\x20be\x20empty.','push','description','issue.description_original_bytes','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','trim','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','length','compress','flagMissing','message','truncated\x20from\x20','originalBytes','issue.description','30OvaiAx','redactionCount','title','redacted\x20','1454305JAzzWq','join','File\x20not\x20found:\x20','str','redactions:\x20','redactionKinds','183472TYNhjP','descriptionFile:\x20','\x20bytes','1324312qIPLNR','descriptionSource','issue.description_truncated','5787924PtvUli','descriptionSource:\x20','truncated','\x20secret(s):\x20','cwd','inline','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','1227072NfIkTM','3426117SOWlhG','validation','otel://','Platform\x20issue\x20reported\x20(','utf8','write','POST','filter'];a97_0x10e5=function(){return _0x42e0e8;};return a97_0x10e5();}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';export const issueReport={'service':'issue','command':a97_0x4125c5(0x1d0),'description':a97_0x4125c5(0x1ce),'risk':a97_0x4125c5(0x1c6),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x4125c5(0x1de),'flags':[{'name':a97_0x4125c5(0x1e6),'type':a97_0x4125c5(0x1d5),'required':!![],'description':a97_0x4125c5(0x1d1)},{'name':a97_0x4125c5(0x1d8),'type':'string','description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x4125c5(0x1d5),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x50b34e){const _0x204388=a97_0x4125c5,_0x4ea076=_0x50b34e[_0x204388(0x1eb)](_0x204388(0x1e6))[_0x204388(0x1db)](),_0x3a7e50=_0x50b34e[_0x204388(0x1eb)]('description')[_0x204388(0x1db)](),_0x105962=_0x50b34e['str'](DESCRIPTION_FILE_FLAG)[_0x204388(0x1db)]();if(!_0x4ea076)throw CliErrors[_0x204388(0x1df)](_0x204388(0x1e6),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0xd36730=_0x3a7e50[_0x204388(0x1dd)]>0x0,_0x18106b=_0x105962[_0x204388(0x1dd)]>0x0;if(_0xd36730===_0x18106b)throw CliErrors['validation'](_0x204388(0x1d4),_0x204388(0x1dc));if(_0x18106b){const _0x33afe6=resolve(process[_0x204388(0x1f8)](),_0x105962);if(!existsSync(_0x33afe6))throw CliErrors[_0x204388(0x1c2)](_0x204388(0x1ea)+_0x33afe6);}},async 'dryRun'(_0x438609){const _0xc5b67b=a97_0x4125c5,_0x27029c=await prepareIssueReport(_0x438609);return{'method':_0xc5b67b(0x1c7),'url':_0xc5b67b(0x1c3)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x27029c[_0xc5b67b(0x1e6)],'issue.description':_0x27029c['description'],'issue.description_original_bytes':_0x27029c[_0xc5b67b(0x1ca)][_0xc5b67b(0x1e2)],'issue.description_truncated':_0x27029c[_0xc5b67b(0x1ca)]['truncated'],'issue.description_redactions':_0x27029c['sanitize'][_0xc5b67b(0x1e5)],'issue.description_redaction_kinds':_0x27029c[_0xc5b67b(0x1ca)]['redactionKinds'][_0xc5b67b(0x1e9)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0xc5b67b(0x1f5)+_0x27029c[_0xc5b67b(0x1f2)],_0x27029c[_0xc5b67b(0x1d3)]?_0xc5b67b(0x1ef)+_0x27029c['descriptionFilePath']:null,_0x27029c[_0xc5b67b(0x1ca)][_0xc5b67b(0x1f6)]?'truncated:\x20original\x20'+_0x27029c[_0xc5b67b(0x1ca)]['originalBytes']+_0xc5b67b(0x1f0):null,_0x27029c[_0xc5b67b(0x1ca)]['redactionCount']>0x0?_0xc5b67b(0x1ec)+_0x27029c[_0xc5b67b(0x1ca)][_0xc5b67b(0x1e5)]+'\x20('+_0x27029c[_0xc5b67b(0x1ca)]['redactionKinds'][_0xc5b67b(0x1e9)](',\x20')+')':null][_0xc5b67b(0x1c8)](Boolean)['join']('\x0a')};},async 'execute'(_0x36e795){const _0x557723=a97_0x4125c5,_0x5d5e24=await prepareIssueReport(_0x36e795);try{await sendPlatformIssueCollectLog({'title':_0x5d5e24['title'],'description':_0x5d5e24['description'],'sanitize':{'originalBytes':_0x5d5e24[_0x557723(0x1ca)][_0x557723(0x1e2)],'truncated':_0x5d5e24[_0x557723(0x1ca)][_0x557723(0x1f6)],'redactionCount':_0x5d5e24['sanitize'][_0x557723(0x1e5)],'redactionKinds':_0x5d5e24[_0x557723(0x1ca)]['redactionKinds']}});}catch(_0x396465){throw CliErrors['apiError']('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x396465 instanceof Error?_0x396465[_0x557723(0x1e0)]:String(_0x396465)),_0x557723(0x1da));}return{'ok':!![],'message':buildResultMessage(_0x5d5e24[_0x557723(0x1ca)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0x557723(0x1e3),_0x557723(0x1d9),_0x557723(0x1f3),_0x557723(0x1cb),_0x557723(0x1d2)],'issue':{'title':_0x5d5e24[_0x557723(0x1e6)],'descriptionLength':_0x5d5e24[_0x557723(0x1d8)][_0x557723(0x1dd)],'descriptionSource':_0x5d5e24[_0x557723(0x1f2)],..._0x5d5e24['descriptionFilePath']?{'descriptionFile':_0x5d5e24[_0x557723(0x1d3)]}:{},'sanitize':{'originalBytes':_0x5d5e24[_0x557723(0x1ca)][_0x557723(0x1e2)],'truncated':_0x5d5e24['sanitize'][_0x557723(0x1f6)],'redactions':_0x5d5e24['sanitize']['redactionCount'],'redactionKinds':_0x5d5e24[_0x557723(0x1ca)]['redactionKinds']}}}};}};function a97_0x171f(_0x1c1e47,_0x1bbc3c){_0x1c1e47=_0x1c1e47-0x1bf;const _0x10e507=a97_0x10e5();let _0x171f40=_0x10e507[_0x1c1e47];return _0x171f40;}function buildResultMessage(_0x1b9d6b){const _0x2905fc=a97_0x4125c5,_0x8f187d=[];return _0x1b9d6b[_0x2905fc(0x1f6)]&&_0x8f187d[_0x2905fc(0x1d7)](_0x2905fc(0x1e1)+_0x1b9d6b['originalBytes']+_0x2905fc(0x1f0)),_0x1b9d6b[_0x2905fc(0x1e5)]>0x0&&_0x8f187d[_0x2905fc(0x1d7)](_0x2905fc(0x1e7)+_0x1b9d6b['redactionCount']+_0x2905fc(0x1f7)+_0x1b9d6b[_0x2905fc(0x1ed)][_0x2905fc(0x1e9)](',\x20')),_0x8f187d[_0x2905fc(0x1dd)]===0x0?_0x2905fc(0x1cc):_0x2905fc(0x1c4)+_0x8f187d[_0x2905fc(0x1e9)](';\x20')+')';}async function prepareIssueReport(_0xddc462){const _0x29bb57=a97_0x4125c5,_0x4e608c=_0xddc462['str']('title')[_0x29bb57(0x1db)](),_0xd0fbaf=_0xddc462[_0x29bb57(0x1eb)](_0x29bb57(0x1d8)),_0x1a6bc9=_0xddc462[_0x29bb57(0x1eb)](DESCRIPTION_FILE_FLAG)[_0x29bb57(0x1db)]();if(!_0x1a6bc9){const _0x11da55=_0xd0fbaf;if(!_0x11da55['trim']())throw CliErrors['validation'](_0x29bb57(0x1d6),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x12efc5=sanitizeIssueDescription(_0x11da55);return{'title':_0x4e608c,'description':_0x12efc5['description'],'descriptionSource':_0x29bb57(0x1f9),'sanitize':_0x12efc5};}const _0x352f24=resolve(process[_0x29bb57(0x1f8)](),_0x1a6bc9),_0x57dde0=await readFile(_0x352f24,_0x29bb57(0x1c5));if(!_0x57dde0[_0x29bb57(0x1db)]())throw CliErrors[_0x29bb57(0x1c2)](_0x29bb57(0x1cf)+_0x352f24,_0x29bb57(0x1bf));const _0x5afc91=sanitizeIssueDescription(_0x57dde0);return{'title':_0x4e608c,'description':_0x5afc91[_0x29bb57(0x1d8)],'descriptionSource':'file','descriptionFilePath':_0x352f24,'sanitize':_0x5afc91};}
@@ -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 a98_0x14e7a3=a98_0x4799;(function(_0x2cbdbb,_0x34f442){const _0x34fbe4=a98_0x4799,_0x227c30=_0x2cbdbb();while(!![]){try{const _0x5cbe0b=-parseInt(_0x34fbe4(0x141))/0x1*(-parseInt(_0x34fbe4(0x142))/0x2)+-parseInt(_0x34fbe4(0x143))/0x3*(parseInt(_0x34fbe4(0x145))/0x4)+parseInt(_0x34fbe4(0x138))/0x5+parseInt(_0x34fbe4(0x13e))/0x6+parseInt(_0x34fbe4(0x13b))/0x7+-parseInt(_0x34fbe4(0x154))/0x8+parseInt(_0x34fbe4(0x156))/0x9;if(_0x5cbe0b===_0x34f442)break;else _0x227c30['push'](_0x227c30['shift']());}catch(_0x37968b){_0x227c30['push'](_0x227c30['shift']());}}}(a98_0x544b,0x60dbd));function a98_0x544b(){const _0x503941=['description','byteLength','__RB_OSS_ID_','REDACTED:access-key','utf8','replace','REDACTED:password','push','length','max','includes','6029784VNuMxJ','authorization','1195218SJYKIT','from','kind','1503115bGOTYt','pattern','cookie','3965528QUpahu','slice','bearer-jwt','3561126CcUSLB','REDACTED:bearer-jwt','password','63239kbLpap','10vFexqh','3VwDeLK','REDACTED:private-key','3036756oMEToE','private-key','toString','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]'];a98_0x544b=function(){return _0x503941;};return a98_0x544b();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a98_0x14e7a3(0x148),REDACTION_RULES=[{'kind':a98_0x14e7a3(0x13a),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a98_0x14e7a3(0x155),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a98_0x14e7a3(0x146),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0x14e7a3(0x144)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0x14e7a3(0x14c)},{'kind':a98_0x14e7a3(0x140),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0x14e7a3(0x14f)},{'kind':a98_0x14e7a3(0x13d),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a98_0x14e7a3(0x13f)}];export function sanitizeIssueDescription(_0x97a4bd){const _0x2b45e8=a98_0x14e7a3,_0x231189=Buffer['byteLength'](_0x97a4bd,_0x2b45e8(0x14d)),_0x36e135=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3f2465=_0x97a4bd,_0x822c81=0x0;const _0x4e12d3=[];if(!_0x36e135){const _0x264cad=protectOssAccessKeyIds(_0x3f2465);_0x3f2465=_0x264cad[_0x2b45e8(0x149)];for(const _0x1ba82a of REDACTION_RULES){let _0x74ac1c=0x0;_0x3f2465=_0x3f2465[_0x2b45e8(0x14e)](_0x1ba82a[_0x2b45e8(0x139)],(_0x2d5f35,_0x25a842)=>{_0x74ac1c+=0x1;const _0x13d669=typeof _0x25a842==='string'?_0x25a842:'';return _0x13d669+'['+_0x1ba82a['label']+']';}),_0x74ac1c>0x0&&(_0x822c81+=_0x74ac1c,!_0x4e12d3[_0x2b45e8(0x153)](_0x1ba82a[_0x2b45e8(0x137)])&&_0x4e12d3[_0x2b45e8(0x150)](_0x1ba82a[_0x2b45e8(0x137)]));}_0x3f2465=_0x264cad['restore'](_0x3f2465);}let _0x186649=![];if(Buffer[_0x2b45e8(0x14a)](_0x3f2465,_0x2b45e8(0x14d))>ISSUE_DESCRIPTION_MAX_BYTES){_0x186649=!![];const _0x228582=Buffer['byteLength'](TRUNCATION_NOTICE,_0x2b45e8(0x14d)),_0x5b3780=Math[_0x2b45e8(0x152)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x228582);_0x3f2465=sliceUtf8Bytes(_0x3f2465,_0x5b3780)+TRUNCATION_NOTICE;}return{'description':_0x3f2465,'originalBytes':_0x231189,'truncated':_0x186649,'redactionCount':_0x822c81,'redactionKinds':_0x4e12d3};}function a98_0x4799(_0x29ad6d,_0x10e576){_0x29ad6d=_0x29ad6d-0x137;const _0x544b8d=a98_0x544b();let _0x47998c=_0x544b8d[_0x29ad6d];return _0x47998c;}function protectOssAccessKeyIds(_0x3720bc){const _0x3b3c7b=a98_0x14e7a3,_0x2a5840=[],_0x8eb589=_0x3720bc[_0x3b3c7b(0x14e)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x1f346f,_0x5129bb)=>{const _0x5a28a5=_0x3b3c7b,_0x1c8037=_0x2a5840[_0x5a28a5(0x150)](_0x1f346f[_0x5a28a5(0x13c)](_0x5129bb[_0x5a28a5(0x151)]))-0x1;return _0x5129bb+_0x5a28a5(0x14b)+_0x1c8037+'__';});return{'description':_0x8eb589,'restore':_0x24dcb0=>_0x24dcb0[_0x3b3c7b(0x14e)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x1ace73,_0x512372,_0x1b6e24)=>{const _0x4a2474=_0x2a5840[Number(_0x1b6e24)];return _0x4a2474===undefined?_0x1ace73:''+_0x512372+_0x4a2474;})};}function sliceUtf8Bytes(_0x415a2f,_0x485b8a){const _0x109e93=a98_0x14e7a3;if(_0x485b8a<=0x0)return'';const _0x14f3be=Buffer[_0x109e93(0x157)](_0x415a2f,_0x109e93(0x14d));if(_0x14f3be[_0x109e93(0x14a)]<=_0x485b8a)return _0x415a2f;let _0x5272eb=_0x485b8a;while(_0x5272eb>0x0){const _0x1d30cc=_0x14f3be[_0x5272eb];if(_0x1d30cc===undefined||(_0x1d30cc&0xc0)!==0x80)break;_0x5272eb-=0x1;}return _0x14f3be['subarray'](0x0,_0x5272eb)[_0x109e93(0x147)](_0x109e93(0x14d));}
@@ -0,0 +1 @@
1
+ const a99_0x2be4cd=a99_0x9ba3;(function(_0x3e059f,_0x2f27ca){const _0x1f0891=a99_0x9ba3,_0x2cf21c=_0x3e059f();while(!![]){try{const _0x38041d=-parseInt(_0x1f0891(0x1fc))/0x1+-parseInt(_0x1f0891(0x1fa))/0x2*(-parseInt(_0x1f0891(0x1e2))/0x3)+-parseInt(_0x1f0891(0x1de))/0x4*(parseInt(_0x1f0891(0x1d9))/0x5)+-parseInt(_0x1f0891(0x1ce))/0x6*(-parseInt(_0x1f0891(0x202))/0x7)+-parseInt(_0x1f0891(0x1e8))/0x8+-parseInt(_0x1f0891(0x1fd))/0x9*(-parseInt(_0x1f0891(0x1d0))/0xa)+-parseInt(_0x1f0891(0x1ff))/0xb*(parseInt(_0x1f0891(0x1ef))/0xc);if(_0x38041d===_0x2f27ca)break;else _0x2cf21c['push'](_0x2cf21c['shift']());}catch(_0xc9c772){_0x2cf21c['push'](_0x2cf21c['shift']());}}}(a99_0x5c7b,0x2a840));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';function a99_0x9ba3(_0x104d4a,_0x268c17){_0x104d4a=_0x104d4a-0x1ce;const _0x5c7b16=a99_0x5c7b();let _0x9ba3=_0x5c7b16[_0x104d4a];return _0x9ba3;}function a99_0x5c7b(){const _0x5c84e4=['Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Knowledge-base\x20title','\x20for\x20','539052djrDsh','rabetbase\x20kb\x20detail\x20--id\x20','65809HLemFP','1893285KyzPOp','high-risk-write','583IOwAeS','length','appCode','1015pTgnCX','13740pRwwDJ','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','10BpUEtF','kb_verification_failed','POST','title','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','Created\x20company\x20knowledge\x20base\x20','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_title_required','55atRNJr','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','rabetbase\x20kb\x20list\x20--title\x20','Company\x20knowledge\x20base\x20','company','125640fdmmkD','kb_create_outcome_unknown','/admin/knowledge-base/create','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','3ezqwDZ','--file\x20is\x20required.','create','file','string','cookie','1709640nAbQBa','str','stringify','contentHash','byteSize','\x20--format\x20compress','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','2892hbJsSv','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','\x20--format\x20compress`\x20before\x20choosing\x20update.','kb_file_required','content','\x20with\x20title\x20','trim'];a99_0x5c7b=function(){return _0x5c84e4;};return a99_0x5c7b();}const CREATE_PATH=a99_0x2be4cd(0x1e0);function readCreateInput(_0x220402){const _0x3cd64e=a99_0x2be4cd,_0x3d68d2=_0x220402[_0x3cd64e(0x1e9)](_0x3cd64e(0x1d3))[_0x3cd64e(0x1f5)]();if(!_0x3d68d2)throw kbError(_0x3cd64e(0x1d8),'--title\x20is\x20required.');const _0x13e596=_0x220402[_0x3cd64e(0x1e9)](_0x3cd64e(0x1e5))['trim']();if(!_0x13e596)throw kbError(_0x3cd64e(0x1f2),_0x3cd64e(0x1e3),_0x3cd64e(0x1f0));return{'title':_0x3d68d2,'file':_0x13e596};}async function prepareCreate(_0xd2811b){const _0x27dd1f=a99_0x2be4cd,_0x2f4822=readCreateInput(_0xd2811b),_0x2bb81a=await readKbFile(_0x2f4822['file']),_0x3cf990=await fetchAllCompanyKnowledgeBases(_0xd2811b,{'title':_0x2f4822[_0x27dd1f(0x1d3)]}),_0x145c70=findExactCompanyKnowledgeBases(_0x3cf990,_0xd2811b[_0x27dd1f(0x201)],_0x2f4822[_0x27dd1f(0x1d3)]);if(_0x145c70[_0x27dd1f(0x200)]>0x0)throw kbError('kb_already_exists',_0x27dd1f(0x1ee)+_0xd2811b['appCode']+_0x27dd1f(0x1f4)+_0x2f4822[_0x27dd1f(0x1d3)]+'.',_0x27dd1f(0x1d4)+_0x145c70[0x0]['id']+_0x27dd1f(0x1f1));return{..._0x2f4822,'content':_0x2bb81a};}function plannedAfter(_0x41c78e,_0x4d7406){const _0x1d5db5=a99_0x2be4cd;return{'scope':'company','appCode':_0x41c78e[_0x1d5db5(0x201)],'title':_0x4d7406[_0x1d5db5(0x1d3)],'contentByteSize':_0x4d7406[_0x1d5db5(0x1f3)][_0x1d5db5(0x1ec)],'contentHash':_0x4d7406[_0x1d5db5(0x1f3)]['contentHash']};}function verifyCreatedState(_0x49ef14,_0x2dfd2a,_0x39e984){const _0x45727d=a99_0x2be4cd;assertCompanyKnowledgeBase(_0x39e984,_0x49ef14[_0x45727d(0x201)],_0x39e984['id']);const _0x2c1226=inspectKbContent(_0x39e984[_0x45727d(0x1f3)]);if(_0x39e984[_0x45727d(0x1d3)]!==_0x2dfd2a['title']||_0x2c1226['contentHash']!==_0x2dfd2a['content'][_0x45727d(0x1eb)])throw kbError(_0x45727d(0x1d1),_0x45727d(0x1dc)+_0x39e984['id']+_0x45727d(0x1d6),_0x45727d(0x1d7)+_0x39e984['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x39e984);}export const kbCreate={'service':'kb','command':'create','description':a99_0x2be4cd(0x1f6),'risk':a99_0x2be4cd(0x1fe),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a99_0x2be4cd(0x1d3),'type':a99_0x2be4cd(0x1e6),'required':!![],'description':a99_0x2be4cd(0x1f8)},{'name':'file','type':a99_0x2be4cd(0x1e6),'required':!![],'description':a99_0x2be4cd(0x1cf)}],async 'validate'(_0x1b7228){readCreateInput(_0x1b7228),requireKbExplicitYes(_0x1b7228);},async 'dryRun'(_0x11b197){const _0x3de373=a99_0x2be4cd,_0x4e347f=await prepareCreate(_0x11b197);return asDryRunResult({'operation':'create','selector':{'scope':_0x3de373(0x1dd),'appCode':_0x11b197[_0x3de373(0x201)],'title':_0x4e347f['title']},'before':null,'after':plannedAfter(_0x11b197,_0x4e347f),'dryRun':!![],'backend':{'method':_0x3de373(0x1d2),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x3de373(0x1db)+JSON[_0x3de373(0x1ea)](_0x4e347f[_0x3de373(0x1d3)])+_0x3de373(0x1ed)}},{'method':_0x3de373(0x1d2),'url':CREATE_PATH});},async 'execute'(_0x40ec86){const _0x3133ae=a99_0x2be4cd;requireKbExplicitYes(_0x40ec86);const _0x34046e=await prepareCreate(_0x40ec86);let _0x5d49e0,_0x4359bf=![];try{const _0x54492e=await createEnterpriseKnowledgeBase(_0x40ec86[_0x3133ae(0x1e7)],{'appCode':_0x40ec86[_0x3133ae(0x201)],'title':_0x34046e[_0x3133ae(0x1d3)],'content':_0x34046e[_0x3133ae(0x1f3)]['content']});assertCompanyKnowledgeBase(_0x54492e,_0x40ec86[_0x3133ae(0x201)],_0x54492e['id']),_0x5d49e0=_0x54492e['id'];}catch(_0x410030){if(!isPlatformTransportFailure(_0x410030))throw _0x410030;_0x4359bf=!![];}if(_0x5d49e0===undefined){const _0x337178=await verifyKbMutationReadback(_0x3133ae(0x1e4),!![],()=>fetchAllCompanyKnowledgeBases(_0x40ec86,{'title':_0x34046e[_0x3133ae(0x1d3)]})),_0x65ebf8=findExactCompanyKnowledgeBases(_0x337178,_0x40ec86[_0x3133ae(0x201)],_0x34046e[_0x3133ae(0x1d3)]);if(_0x65ebf8[_0x3133ae(0x200)]!==0x1)throw kbError(_0x3133ae(0x1df),_0x3133ae(0x1e1)+_0x65ebf8[_0x3133ae(0x200)]+'.',_0x3133ae(0x1f7));_0x5d49e0=_0x65ebf8[0x0]['id'];}const _0x4df8f5=await verifyKbMutationReadback(_0x3133ae(0x1e4),_0x4359bf,()=>requireKb(_0x40ec86,_0x5d49e0)),_0x15adb4=verifyCreatedState(_0x40ec86,_0x34046e,_0x4df8f5),_0x28cfe0=_0x4359bf?[_0x3133ae(0x1da)]:[];return{'ok':!![],'data':{'operation':'create','selector':{'id':_0x15adb4['id'],'scope':_0x3133ae(0x1dd),'appCode':_0x15adb4['appCode']},'before':null,'after':_0x15adb4,'dryRun':![],'backend':{'method':_0x3133ae(0x1d2),'path':CREATE_PATH},'warnings':_0x28cfe0,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x4359bf,'lookupCommand':_0x3133ae(0x1fb)+_0x15adb4['id']+_0x3133ae(0x1ed)}},'message':_0x3133ae(0x1d5)+_0x15adb4['id']+_0x3133ae(0x1f9)+_0x15adb4[_0x3133ae(0x201)]};}};
@@ -0,0 +1 @@
1
+ const a100_0x5c07ba=a100_0x1e06;(function(_0x1cddbb,_0x2b49e3){const _0x2908a9=a100_0x1e06,_0x4aa903=_0x1cddbb();while(!![]){try{const _0x30b219=parseInt(_0x2908a9(0x106))/0x1*(parseInt(_0x2908a9(0x10d))/0x2)+-parseInt(_0x2908a9(0xfb))/0x3*(parseInt(_0x2908a9(0x103))/0x4)+parseInt(_0x2908a9(0x10f))/0x5+parseInt(_0x2908a9(0x10c))/0x6*(-parseInt(_0x2908a9(0xfe))/0x7)+-parseInt(_0x2908a9(0x116))/0x8*(-parseInt(_0x2908a9(0xf7))/0x9)+-parseInt(_0x2908a9(0x117))/0xa+parseInt(_0x2908a9(0x114))/0xb;if(_0x30b219===_0x2b49e3)break;else _0x4aa903['push'](_0x4aa903['shift']());}catch(_0x59fe4c){_0x4aa903['push'](_0x4aa903['shift']());}}}(a100_0xb9bb,0xe2eeb));function a100_0xb9bb(){const _0x279384=['no_op','delete','high-risk-write','\x20--format\x20compress','1893753AMJAsT','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','rabetbase\x20kb\x20detail\x20--id\x20','unshift','489qyAgMq','Soft-deleted\x20company\x20knowledge\x20base\x20','isSafeInteger','602RfXRnO','kb_expected_version_invalid','snapshotHash','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','21404hiDQxK','POST','\x20remains\x20readable\x20after\x20delete.','792iifgfe','already_absent','cookie','company','Company\x20knowledge-base\x20id','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','83766XYvqvr','1212uqtTCf','flag','4366615hrRZBn','appCode','Company\x20knowledge\x20base\x20','kb_delete_outcome_unknown','expected-version','15266383dNgeJB','number','48fFAJrJ','10012560hWRYjD'];a100_0xb9bb=function(){return _0x279384;};return a100_0xb9bb();}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';function a100_0x1e06(_0xfb4275,_0x4468b1){_0xfb4275=_0xfb4275-0xf4;const _0xb9bbcc=a100_0xb9bb();let _0x1e0668=_0xb9bbcc[_0xfb4275];return _0x1e0668;}const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a100_0x5c07ba(0xf8),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x4e4e0f){const _0x44d47a=a100_0x5c07ba,_0x298b85=_0x4e4e0f[_0x44d47a(0x10e)](_0x44d47a(0x113));if(_0x298b85===undefined)return undefined;const _0x1f4f34=Number(_0x298b85);if(!Number[_0x44d47a(0xfd)](_0x1f4f34)||_0x1f4f34<0x0)throw kbError(_0x44d47a(0xff),_0x44d47a(0x10b));return _0x1f4f34;}function noOpData(_0x5772b3,_0x4a3108,_0x2d60f7){const _0xf92ef2=a100_0x5c07ba;return{'operation':_0xf92ef2(0x118),'selector':{'id':_0x4a3108,'scope':'company','appCode':_0x5772b3[_0xf92ef2(0x110)]},'before':null,'after':null,'dryRun':_0x2d60f7,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0xf92ef2(0x107),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a100_0x5c07ba(0xf4),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a100_0x5c07ba(0xf5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a100_0x5c07ba(0x115),'required':!![],'description':a100_0x5c07ba(0x10a)},{'name':'expected-version','type':a100_0x5c07ba(0x115),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x1a6908){readKbId(_0x1a6908),readExpectedVersion(_0x1a6908),requireKbExplicitYes(_0x1a6908);},async 'dryRun'(_0x558945){const _0xe47630=a100_0x5c07ba,_0x27116d=readKbId(_0x558945),_0x6e32e4=readExpectedVersion(_0x558945),_0x4e8825=await getKbOrNull(_0x558945,_0x27116d);if(!_0x4e8825)return asDryRunResult(noOpData(_0x558945,_0x27116d,!![]),{'method':_0xe47630(0x104),'url':DELETE_PATH});assertExpectedKbVersion(_0x4e8825,_0x6e32e4);const _0x1b91cd=projectKb(_0x4e8825),_0x4a3093=[RAG_WARNING];if(_0x6e32e4!==undefined)_0x4a3093['unshift'](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0xe47630(0xf4),'selector':{'id':_0x1b91cd['id'],'scope':_0xe47630(0x109),'appCode':_0x1b91cd[_0xe47630(0x110)]},'before':_0x1b91cd,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0xe47630(0x104),'path':DELETE_PATH},'warnings':_0x4a3093,'verification':{'expectedVersion':_0x6e32e4??null,'atomicCompareAndSet':![],'snapshotHash':_0x1b91cd[_0xe47630(0x100)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0xe47630(0xf9)+_0x1b91cd['id']+_0xe47630(0xf6)}},{'method':_0xe47630(0x104),'url':DELETE_PATH});},async 'execute'(_0x15d0ef){const _0x230de8=a100_0x5c07ba;requireKbExplicitYes(_0x15d0ef);const _0x26750f=readKbId(_0x15d0ef),_0x10f4bd=readExpectedVersion(_0x15d0ef),_0x13b504=await getKbOrNull(_0x15d0ef,_0x26750f);if(!_0x13b504)return{'ok':!![],'data':noOpData(_0x15d0ef,_0x26750f,![]),'message':_0x230de8(0x111)+_0x26750f+_0x230de8(0x101)};assertExpectedKbVersion(_0x13b504,_0x10f4bd);const _0x14c377=projectKb(_0x13b504);let _0x4ee86a=![];try{await deleteEnterpriseKnowledgeBase(_0x15d0ef[_0x230de8(0x108)],_0x26750f);}catch(_0x4e3766){if(!isPlatformTransportFailure(_0x4e3766))throw _0x4e3766;_0x4ee86a=!![];}const _0x13cf72=await verifyKbMutationReadback('delete',_0x4ee86a,()=>getKbOrNull(_0x15d0ef,_0x26750f));if(_0x13cf72)throw kbError(_0x4ee86a?_0x230de8(0x112):'kb_verification_failed',_0x230de8(0x111)+_0x26750f+_0x230de8(0x105),_0x230de8(0x102)+_0x26750f+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x14c10e=[RAG_WARNING];if(_0x10f4bd!==undefined)_0x14c10e[_0x230de8(0xfa)](NON_ATOMIC_WARNING);return _0x4ee86a&&_0x14c10e[_0x230de8(0xfa)]('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x230de8(0xf4),'selector':{'id':_0x14c377['id'],'scope':_0x230de8(0x109),'appCode':_0x14c377['appCode']},'before':_0x14c377,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x230de8(0x104),'path':DELETE_PATH},'warnings':_0x14c10e,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x4ee86a,'lookupCommand':_0x230de8(0xf9)+_0x14c377['id']+'\x20--format\x20compress'}},'message':_0x230de8(0xfc)+_0x14c377['id']};}};
@@ -0,0 +1 @@
1
+ const a101_0x22ccba=a101_0x580c;(function(_0xc48907,_0xfd8c50){const _0x27dcaa=a101_0x580c,_0x128038=_0xc48907();while(!![]){try{const _0x20e9ab=-parseInt(_0x27dcaa(0x1fa))/0x1*(-parseInt(_0x27dcaa(0x1f2))/0x2)+-parseInt(_0x27dcaa(0x1f5))/0x3*(-parseInt(_0x27dcaa(0x1f0))/0x4)+-parseInt(_0x27dcaa(0x1f6))/0x5+parseInt(_0x27dcaa(0x1f4))/0x6+-parseInt(_0x27dcaa(0x1f1))/0x7*(parseInt(_0x27dcaa(0x1f3))/0x8)+-parseInt(_0x27dcaa(0x1f9))/0x9+parseInt(_0x27dcaa(0x1ef))/0xa;if(_0x20e9ab===_0xfd8c50)break;else _0x128038['push'](_0x128038['shift']());}catch(_0x4c9a71){_0x128038['push'](_0x128038['shift']());}}}(a101_0xfb71,0x20e77));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a101_0x580c(_0x5b9cbe,_0x4f0bd1){_0x5b9cbe=_0x5b9cbe-0x1ee;const _0xfb7178=a101_0xfb71();let _0x580cd2=_0xfb7178[_0x5b9cbe];return _0x580cd2;}function a101_0xfb71(){const _0x2fc4b2=['Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','2003346lPoCVE','3343BMhuBt','Loaded\x20company\x20knowledge\x20base\x20','6516530yyrFrQ','16pFhqmO','1560629BHcCqq','2HZaDhI','8fudhHj','202824kKoJyf','14559DOlFiF','639480wiTqEQ','detail'];a101_0xfb71=function(){return _0x2fc4b2;};return a101_0xfb71();}export const kbDetail={'service':'kb','command':a101_0x22ccba(0x1f7),'description':a101_0x22ccba(0x1f8),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x2e65cd){readKbId(_0x2e65cd);},async 'execute'(_0x18fec9){const _0x54c84f=a101_0x22ccba,_0x3aabf4=readKbId(_0x18fec9),_0xeb09e2=await requireKb(_0x18fec9,_0x3aabf4);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0xeb09e2)},'message':_0x54c84f(0x1ee)+_0x3aabf4};}};
@@ -0,0 +1 @@
1
+ (function(_0x4ed561,_0x5c4ff5){const _0x254d18=a102_0xe031,_0x1a1e1d=_0x4ed561();while(!![]){try{const _0x577814=-parseInt(_0x254d18(0x6b))/0x1*(parseInt(_0x254d18(0x6c))/0x2)+parseInt(_0x254d18(0x68))/0x3*(-parseInt(_0x254d18(0x70))/0x4)+parseInt(_0x254d18(0x6f))/0x5*(-parseInt(_0x254d18(0x72))/0x6)+-parseInt(_0x254d18(0x6d))/0x7*(parseInt(_0x254d18(0x6a))/0x8)+-parseInt(_0x254d18(0x6e))/0x9+-parseInt(_0x254d18(0x69))/0xa+-parseInt(_0x254d18(0x67))/0xb*(-parseInt(_0x254d18(0x71))/0xc);if(_0x577814===_0x5c4ff5)break;else _0x1a1e1d['push'](_0x1a1e1d['shift']());}catch(_0x570126){_0x1a1e1d['push'](_0x1a1e1d['shift']());}}}(a102_0x579e,0x90eb5));import{kbList}from'../../commands/kb/list.js';function a102_0x579e(){const _0xc86484=['231WsmdBc','9850TqPKiU','7AOBRAt','6523416xwuBvQ','1313505buUrJr','1083404mIcYMR','26543568nDdcjR','6svPlrK','22WhDedV','6JTUNDW','7948580zGRRLF','2948632lFLQJq'];a102_0x579e=function(){return _0xc86484;};return a102_0x579e();}import{kbDetail}from'../../commands/kb/detail.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';function a102_0xe031(_0x501ced,_0x51afd7){_0x501ced=_0x501ced-0x67;const _0x579e78=a102_0x579e();let _0xe03195=_0x579e78[_0x501ced];return _0xe03195;}import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];
@@ -0,0 +1 @@
1
+ function a103_0x4e9f(){const _0x1a2210=['2670EOMcVl','49890TeVIvw','list','trim','4743lDCbjI','read','3LkVyda','string','286834iCfCZr','Filter\x20by\x20knowledge-base\x20title','6353226lLtboG','687472JxZDqG','6624PtfWwI','161YZYJkO','title','90490XECXTj','str','605WIHxPt','map','Found\x20','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app'];a103_0x4e9f=function(){return _0x1a2210;};return a103_0x4e9f();}const a103_0x31361b=a103_0x2c44;(function(_0xda7620,_0x1ffa98){const _0x2781ba=a103_0x2c44,_0x3047af=_0xda7620();while(!![]){try{const _0x9b3892=-parseInt(_0x2781ba(0x15b))/0x1+parseInt(_0x2781ba(0x154))/0x2*(-parseInt(_0x2781ba(0x152))/0x3)+parseInt(_0x2781ba(0x158))/0x4*(-parseInt(_0x2781ba(0x15d))/0x5)+-parseInt(_0x2781ba(0x162))/0x6*(-parseInt(_0x2781ba(0x159))/0x7)+-parseInt(_0x2781ba(0x157))/0x8+parseInt(_0x2781ba(0x150))/0x9*(-parseInt(_0x2781ba(0x161))/0xa)+parseInt(_0x2781ba(0x156))/0xb;if(_0x9b3892===_0x1ffa98)break;else _0x3047af['push'](_0x3047af['shift']());}catch(_0x1b7371){_0x3047af['push'](_0x3047af['shift']());}}}(a103_0x4e9f,0x1a56d));function a103_0x2c44(_0xf3b742,_0x45bc3a){_0xf3b742=_0xf3b742-0x14e;const _0x4e9f96=a103_0x4e9f();let _0x2c448a=_0x4e9f96[_0xf3b742];return _0x2c448a;}import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a103_0x31361b(0x14e),'description':a103_0x31361b(0x160),'risk':a103_0x31361b(0x151),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a103_0x31361b(0x153),'required':![],'description':a103_0x31361b(0x155)}],async 'execute'(_0x4a64ec){const _0x3fe682=a103_0x31361b,_0x5db6b7=_0x4a64ec[_0x3fe682(0x15c)](_0x3fe682(0x15a))[_0x3fe682(0x14f)](),_0x5b762e=await fetchAllCompanyKnowledgeBases(_0x4a64ec,{..._0x5db6b7?{'title':_0x5db6b7}:{}}),_0x46eabf=_0x5b762e[_0x3fe682(0x15e)](projectKb);return{'ok':!![],'data':{'total':_0x46eabf['length'],'knowledgeBases':_0x46eabf},'message':_0x3fe682(0x15f)+_0x46eabf['length']+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x4a64ec['appCode']};}};
@@ -0,0 +1 @@
1
+ const a104_0x4115e2=a104_0x4e77;(function(_0x5726e6,_0x20621c){const _0x19b385=a104_0x4e77,_0xbd89df=_0x5726e6();while(!![]){try{const _0x5a1a83=parseInt(_0x19b385(0xd4))/0x1*(parseInt(_0x19b385(0x126))/0x2)+parseInt(_0x19b385(0xe3))/0x3*(parseInt(_0x19b385(0xd2))/0x4)+-parseInt(_0x19b385(0xf3))/0x5+parseInt(_0x19b385(0xf2))/0x6*(parseInt(_0x19b385(0xfc))/0x7)+-parseInt(_0x19b385(0x100))/0x8+parseInt(_0x19b385(0xe9))/0x9+parseInt(_0x19b385(0xf7))/0xa*(-parseInt(_0x19b385(0x115))/0xb);if(_0x5a1a83===_0x20621c)break;else _0xbd89df['push'](_0xbd89df['shift']());}catch(_0x5042a7){_0xbd89df['push'](_0xbd89df['shift']());}}}(a104_0x2552,0xee963));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=a104_0x4115e2(0xe6);export function kbError(_0xbf5de3,_0x4db1a9,_0x86ade3){return new CliError(_0xbf5de3,0x1,_0x4db1a9,_0x86ade3);}export function readKbId(_0x5ef6c6){const _0xc31e7=a104_0x4115e2,_0xf220e5=_0x5ef6c6[_0xc31e7(0x122)]('id');if(!Number[_0xc31e7(0xe5)](_0xf220e5)||_0xf220e5<=0x0)throw kbError(_0xc31e7(0x114),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0xf220e5;}export function requireKbExplicitYes(_0x313a92){const _0x55c6b4=a104_0x4115e2;if(_0x313a92[_0x55c6b4(0x10b)](_0x55c6b4(0x11e))||_0x313a92['bool'](_0x55c6b4(0xfb)))return;throw kbError(_0x55c6b4(0xec),_0x55c6b4(0x117),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0xdb81ac){const _0x1db00d=a104_0x4115e2;return'sha256:'+createHash('sha256')[_0x1db00d(0x11a)](_0xdb81ac)[_0x1db00d(0xdb)](_0x1db00d(0x107));}export function inspectKbContent(_0x1022d7){const _0x33e5b6=a104_0x4115e2,_0x16100f=Buffer[_0x33e5b6(0xe7)](_0x1022d7,_0x33e5b6(0xed));return{'content':_0x1022d7,'byteSize':_0x16100f[_0x33e5b6(0x106)],'contentHash':sha256(_0x16100f)};}export async function readKbFile(_0x2d5f09){const _0xd9f441=a104_0x4115e2,_0x14b2c4=_0x2d5f09[_0xd9f441(0x118)]();if(!_0x14b2c4)throw kbError(_0xd9f441(0xeb),'Knowledge-base\x20content\x20file\x20path\x20is\x20required.',_0xd9f441(0x116));const _0x2af149=resolve(_0x14b2c4);let _0x5eed44;try{_0x5eed44=await stat(_0x2af149);}catch(_0x36c659){throw kbError(_0xd9f441(0x101),_0xd9f441(0x103)+_0x14b2c4,_0x36c659 instanceof Error?_0x36c659[_0xd9f441(0x109)]:String(_0x36c659));}if(!_0x5eed44[_0xd9f441(0xd3)]())throw kbError(_0xd9f441(0x110),'Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x14b2c4);let _0x2b0ce6;try{_0x2b0ce6=await readFile(_0x2af149);}catch(_0x4aef3f){throw kbError(_0xd9f441(0x101),_0xd9f441(0xe8)+_0x14b2c4,_0x4aef3f instanceof Error?_0x4aef3f[_0xd9f441(0x109)]:String(_0x4aef3f));}let _0x297d4d;try{_0x297d4d=new TextDecoder(_0xd9f441(0x120),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x2b0ce6);}catch{throw kbError('kb_content_invalid',_0xd9f441(0x111)+_0x14b2c4);}if(!_0x297d4d[_0xd9f441(0x118)]())throw kbError(_0xd9f441(0xfe),_0xd9f441(0x112)+_0x14b2c4);return inspectKbContent(_0x297d4d);}export async function verifyKbMutationReadback(_0x3abbb6,_0x2fd88a,_0x59597f){const _0x33bb96=a104_0x4115e2;try{return await _0x59597f();}catch(_0x559916){const _0xddccc6=kbError(_0x33bb96(0x10c)+_0x3abbb6+'_'+(_0x2fd88a?_0x33bb96(0xf0):_0x33bb96(0xd9)),'The\x20'+_0x3abbb6+_0x33bb96(0x129),_0x33bb96(0xe2));Object[_0x33bb96(0x10d)](_0xddccc6,_0x33bb96(0xf5),{'value':_0x559916,'enumerable':![]});throw _0xddccc6;}}function requireRecordText(_0x3a2656,_0x1bd1ad,_0x3bf039,_0x3118f3={}){const _0x1649bd=a104_0x4115e2;if(typeof _0x3a2656==='string'&&(_0x3118f3['allowEmpty']||_0x3a2656['trim']()))return _0x3a2656;throw kbError(_0x1649bd(0x128),_0x1649bd(0x108)+String(_0x3bf039)+'\x20response\x20is\x20missing\x20'+_0x1bd1ad+'.');}function a104_0x2552(){const _0x2eba5e=['kb_confirmation_required','utf8','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','paging','outcome_unknown','string','12niOJvN','3450065CNTWYS','\x20was\x20requested.','cause','createTime','70hnladk','number','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','\x20while\x20page\x20','yes','1704955GpHYhw','stringify','kb_content_invalid','totalCount','10809760VtPNdh','kb_file_unreadable','has','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','\x20response\x20contains\x20an\x20invalid\x20version.','length','byteLength','hex','Knowledge\x20base\x20','message','content','bool','kb_','defineProperty','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','add','kb_file_invalid','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','scope','kb_id_invalid','1024782YyxxBm','Pass\x20--file\x20<knowledge.md>.','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','trim','company','update','\x20records.','appCode','Knowledge-base\x20list\x20stopped\x20at\x20','dry-run','byteSize','utf-8','version','num','currentPage','kb_list_contract_invalid','updateTime','2ovOsLd','\x20of\x20','kb_response_invalid','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','cookie','4uVIWqS','isFile','16271UBnKty','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','\x20while\x20id\x20','title','\x20during\x20paging.','verification_unavailable','filter','digest','kb_not_found','kb_state_drift',',\x20current\x20','\x20to\x20','contentHash','Knowledge-base\x20list\x20returned\x20page\x20','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','5297817dgHJRX','Knowledge-base\x20list\x20total\x20changed\x20from\x20','isSafeInteger','306','from','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','12611502MTzOyZ','items','kb_file_required'];a104_0x2552=function(){return _0x2eba5e;};return a104_0x2552();}export function projectKb(_0x4c234f){const _0x49adaf=a104_0x4115e2;if(!Number[_0x49adaf(0xe5)](_0x4c234f['id'])||_0x4c234f['id']<=0x0)throw kbError(_0x49adaf(0x128),_0x49adaf(0xee));if(!Number[_0x49adaf(0xe5)](_0x4c234f[_0x49adaf(0x121)])||_0x4c234f[_0x49adaf(0x121)]<0x0)throw kbError(_0x49adaf(0x128),_0x49adaf(0x108)+_0x4c234f['id']+_0x49adaf(0x104));if(_0x4c234f[_0x49adaf(0x113)]!==_0x49adaf(0x119))throw kbError('kb_scope_mismatch',_0x49adaf(0x108)+_0x4c234f['id']+'\x20is\x20not\x20company-scoped.');const _0x10cb70=requireRecordText(_0x4c234f[_0x49adaf(0x11c)],_0x49adaf(0x11c),_0x4c234f['id']),_0x30a6e3=requireRecordText(_0x4c234f[_0x49adaf(0xd7)],_0x49adaf(0xd7),_0x4c234f['id']),_0x4deb1d=inspectKbContent(requireRecordText(_0x4c234f[_0x49adaf(0x10a)],'content',_0x4c234f['id'],{'allowEmpty':!![]})),_0x106422=typeof _0x4c234f[_0x49adaf(0xf6)]===_0x49adaf(0xf1)||typeof _0x4c234f['createTime']==='number'?_0x4c234f[_0x49adaf(0xf6)]:undefined,_0x4479fc=typeof _0x4c234f[_0x49adaf(0x125)]===_0x49adaf(0xf1)||typeof _0x4c234f['updateTime']===_0x49adaf(0xf8)?_0x4c234f[_0x49adaf(0x125)]:undefined,_0x2684bf=sha256(JSON[_0x49adaf(0xfd)]({'id':_0x4c234f['id'],'scope':_0x4c234f[_0x49adaf(0x113)],'appCode':_0x10cb70,'title':_0x30a6e3,'version':_0x4c234f[_0x49adaf(0x121)],'contentHash':_0x4deb1d[_0x49adaf(0xe0)],'createTime':_0x106422,'updateTime':_0x4479fc}));return{'id':_0x4c234f['id'],'scope':_0x49adaf(0x119),'appCode':_0x10cb70,'title':_0x30a6e3,'version':_0x4c234f['version'],'contentByteSize':_0x4deb1d[_0x49adaf(0x11f)],'contentHash':_0x4deb1d[_0x49adaf(0xe0)],'snapshotHash':_0x2684bf,..._0x106422!==undefined?{'createTime':_0x106422}:{},..._0x4479fc!==undefined?{'updateTime':_0x4479fc}:{}};}export function assertCompanyKnowledgeBase(_0x2b32bd,_0x1083ff,_0x220487){const _0x4ab3b1=a104_0x4115e2;if(_0x220487!==undefined&&_0x2b32bd['id']!==_0x220487)throw kbError(_0x4ab3b1(0x128),'Knowledge-base\x20get-one\x20returned\x20id\x20'+_0x2b32bd['id']+_0x4ab3b1(0xd6)+_0x220487+_0x4ab3b1(0xf4));if(_0x2b32bd['scope']!=='company'||_0x2b32bd[_0x4ab3b1(0x11c)]!==_0x1083ff)throw kbError('kb_scope_mismatch',_0x4ab3b1(0x108)+_0x2b32bd['id']+_0x4ab3b1(0x10e)+_0x1083ff+'.');}export async function fetchAllCompanyKnowledgeBases(_0x379f85,_0x599a09){const _0x108895=a104_0x4115e2,_0x3c45c3=[],_0x4903f8=new Set();let _0xdb33a=0x1,_0x320bc5=0x0,_0x18a22c;while(!![]){const _0x570faa=await listEnterpriseKnowledgeBases(_0x379f85[_0x108895(0x12b)],{'currentPage':_0xdb33a,'pageSize':LIST_PAGE_SIZE,'appCode':_0x379f85[_0x108895(0x11c)],..._0x599a09}),_0x57185d=_0x570faa[_0x108895(0xef)]?.[_0x108895(0xff)];if(_0x570faa[_0x108895(0xef)]?.[_0x108895(0x123)]!==undefined&&_0x570faa[_0x108895(0xef)][_0x108895(0x123)]!==_0xdb33a)throw kbError('kb_list_contract_invalid',_0x108895(0xe1)+_0x570faa[_0x108895(0xef)][_0x108895(0x123)]+_0x108895(0xfa)+_0xdb33a+_0x108895(0xf4));if(_0x57185d!==undefined){if(_0x18a22c!==undefined&&_0x57185d!==_0x18a22c)throw kbError(_0x108895(0x124),_0x108895(0xe4)+_0x18a22c+_0x108895(0xdf)+_0x57185d+_0x108895(0xd8),_0x108895(0xd5));_0x18a22c=_0x57185d;}for(const _0x59c04d of _0x570faa[_0x108895(0xea)]){if(!Number[_0x108895(0xe5)](_0x59c04d['id'])||_0x4903f8[_0x108895(0x102)](_0x59c04d['id']))throw kbError(_0x108895(0x124),_0x108895(0xf9)+String(_0x59c04d['id'])+'.');_0x4903f8[_0x108895(0x10f)](_0x59c04d['id']),_0x59c04d[_0x108895(0x113)]===_0x108895(0x119)&&_0x59c04d[_0x108895(0x11c)]===_0x379f85[_0x108895(0x11c)]&&_0x3c45c3['push'](_0x59c04d);}_0x320bc5+=_0x570faa[_0x108895(0xea)][_0x108895(0x105)];if(_0x57185d!==undefined&&_0x320bc5>=_0x57185d)break;if(_0x570faa[_0x108895(0xea)][_0x108895(0x105)]<LIST_PAGE_SIZE){if(_0x57185d!==undefined&&_0x320bc5<_0x57185d)throw kbError(_0x108895(0x124),_0x108895(0x11d)+_0x320bc5+_0x108895(0x127)+_0x57185d+_0x108895(0x11b));break;}_0xdb33a+=0x1;}return _0x3c45c3;}export function findExactCompanyKnowledgeBases(_0x452b26,_0x2ae0a3,_0x52e578){const _0x335c9b=a104_0x4115e2;return _0x452b26[_0x335c9b(0xda)](_0x478b72=>_0x478b72[_0x335c9b(0x113)]==='company'&&_0x478b72[_0x335c9b(0x11c)]===_0x2ae0a3&&_0x478b72[_0x335c9b(0xd7)]===_0x52e578);}export async function getKbOrNull(_0x53f259,_0x202d6a){const _0x343c15=a104_0x4115e2;try{const _0x25b3a1=await getEnterpriseKnowledgeBase(_0x53f259[_0x343c15(0x12b)],_0x202d6a);return assertCompanyKnowledgeBase(_0x25b3a1,_0x53f259[_0x343c15(0x11c)],_0x202d6a),_0x25b3a1;}catch(_0xe534a1){if(getPlatformErrorCode(_0xe534a1)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0xe534a1;}}function a104_0x4e77(_0x4d03f7,_0x5d5ca2){_0x4d03f7=_0x4d03f7-0xd2;const _0x255211=a104_0x2552();let _0x4e77da=_0x255211[_0x4d03f7];return _0x4e77da;}export async function requireKb(_0xcf9614,_0x3eb062){const _0x2e2c3e=a104_0x4115e2,_0x30376b=await getKbOrNull(_0xcf9614,_0x3eb062);if(!_0x30376b)throw kbError(_0x2e2c3e(0xdc),'Company\x20knowledge\x20base\x20not\x20found:\x20'+_0x3eb062,'Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.');return _0x30376b;}export function assertExpectedKbVersion(_0x2a358f,_0x195163){const _0x3d2e89=a104_0x4115e2;if(_0x195163===undefined||_0x2a358f['version']===_0x195163)return;throw kbError(_0x3d2e89(0xdd),_0x3d2e89(0x108)+_0x2a358f['id']+'\x20version\x20changed:\x20expected\x20'+_0x195163+_0x3d2e89(0xde)+_0x2a358f[_0x3d2e89(0x121)]+'.',_0x3d2e89(0x12a));}
@@ -0,0 +1 @@
1
+ const a105_0x4f7c8b=a105_0x1549;(function(_0x1c3f07,_0x575933){const _0x940a47=a105_0x1549,_0x511eed=_0x1c3f07();while(!![]){try{const _0x4284c0=-parseInt(_0x940a47(0xef))/0x1+-parseInt(_0x940a47(0x112))/0x2*(parseInt(_0x940a47(0x111))/0x3)+parseInt(_0x940a47(0x102))/0x4*(parseInt(_0x940a47(0xe1))/0x5)+parseInt(_0x940a47(0xf7))/0x6+-parseInt(_0x940a47(0x101))/0x7*(-parseInt(_0x940a47(0xdd))/0x8)+parseInt(_0x940a47(0xe0))/0x9*(-parseInt(_0x940a47(0xf4))/0xa)+parseInt(_0x940a47(0xe5))/0xb;if(_0x4284c0===_0x575933)break;else _0x511eed['push'](_0x511eed['shift']());}catch(_0x4df33f){_0x511eed['push'](_0x511eed['shift']());}}}(a105_0x23c1,0x1be34));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';function a105_0x1549(_0x5a0c03,_0x295aae){_0x5a0c03=_0x5a0c03-0xdd;const _0x23c1e6=a105_0x23c1();let _0x1549ef=_0x23c1e6[_0x5a0c03];return _0x1549ef;}function a105_0x23c1(){const _0xeef417=['kb_verification_failed','expectedVersion','2198CxunBg','268uNFMWm','appCode','--file\x20cannot\x20be\x20empty.','isSafeInteger','number','flag','trim','version','Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.','patch','Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','replacement','Company\x20knowledge-base\x20id','rabetbase\x20kb\x20detail\x20--id\x20','3918BAcHNY','256ztTeDT','kb_file_required','beforeRecord','POST','4280eQwdsl','expected-version','Company\x20knowledge\x20base\x20','63iHLGkq','4235NefqIG','/admin/knowledge-base/update','Updated\x20company\x20knowledge\x20base\x20','kb_update_empty','796928DAAiTU','kb_title_invalid','update','push','verified','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20update\x20contract\x20has\x20no\x20version\x20predicate.','content','company','cookie','--title\x20cannot\x20be\x20empty.','168125oxwGsS','file','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','kb_expected_version_invalid','Nothing\x20to\x20update.','74480cRiIEK','string','high-risk-write','1226820mwJhxL','kb_update_outcome_unknown','\x20--format\x20compress','title','contentHash','before','snapshotHash','New\x20knowledge-base\x20title'];a105_0x23c1=function(){return _0xeef417;};return a105_0x23c1();}const UPDATE_PATH=a105_0x4f7c8b(0xe2),NON_ATOMIC_WARNING=a105_0x4f7c8b(0xea);function readUpdatePatch(_0x8f4f2a){const _0x3d0190=a105_0x4f7c8b,_0x2139da=readKbId(_0x8f4f2a),_0x233502=_0x8f4f2a['flag'](_0x3d0190(0xfa)),_0x3d75ac=_0x8f4f2a[_0x3d0190(0x107)](_0x3d0190(0xf0)),_0x5262d1=_0x8f4f2a[_0x3d0190(0x107)](_0x3d0190(0xde)),_0x135fa8=_0x233502===undefined?undefined:String(_0x233502)[_0x3d0190(0x108)]();if(_0x233502!==undefined&&!_0x135fa8)throw kbError(_0x3d0190(0xe6),_0x3d0190(0xee));const _0x2d0bc5=_0x3d75ac===undefined?undefined:String(_0x3d75ac)[_0x3d0190(0x108)]();if(_0x3d75ac!==undefined&&!_0x2d0bc5)throw kbError(_0x3d0190(0x113),_0x3d0190(0x104));if(_0x135fa8===undefined&&_0x2d0bc5===undefined)throw kbError(_0x3d0190(0xe4),_0x3d0190(0xf3),_0x3d0190(0x10d));let _0x2035d6;if(_0x5262d1!==undefined){_0x2035d6=Number(_0x5262d1);if(!Number[_0x3d0190(0x105)](_0x2035d6)||_0x2035d6<0x0)throw kbError(_0x3d0190(0xf2),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'id':_0x2139da,'title':_0x135fa8,'file':_0x2d0bc5,'expectedVersion':_0x2035d6};}async function prepareUpdate(_0x309e3d){const _0x569a4f=a105_0x4f7c8b,_0x448f3d=readUpdatePatch(_0x309e3d),_0x5482f1=await requireKb(_0x309e3d,_0x448f3d['id']);assertExpectedKbVersion(_0x5482f1,_0x448f3d['expectedVersion']);const _0x10370a=_0x448f3d[_0x569a4f(0xf0)]?await readKbFile(_0x448f3d[_0x569a4f(0xf0)]):undefined,_0x384843=projectKb(_0x5482f1),_0x37b959=projectKb({..._0x5482f1,..._0x448f3d[_0x569a4f(0xfa)]!==undefined?{'title':_0x448f3d[_0x569a4f(0xfa)]}:{},..._0x10370a?{'content':_0x10370a[_0x569a4f(0xeb)]}:{}});return{'patch':_0x448f3d,'beforeRecord':_0x5482f1,'before':_0x384843,'planned':_0x37b959,'replacement':_0x10370a};}export const kbUpdate={'service':'kb','command':a105_0x4f7c8b(0xe7),'description':a105_0x4f7c8b(0x10c),'risk':a105_0x4f7c8b(0xf6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a105_0x4f7c8b(0x106),'required':!![],'description':a105_0x4f7c8b(0x10f)},{'name':a105_0x4f7c8b(0xfa),'type':a105_0x4f7c8b(0xf5),'required':![],'description':a105_0x4f7c8b(0xfe)},{'name':'file','type':a105_0x4f7c8b(0xf5),'required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':'expected-version','type':a105_0x4f7c8b(0x106),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x14a339){readUpdatePatch(_0x14a339),requireKbExplicitYes(_0x14a339);},async 'dryRun'(_0x12a0f6){const _0x590644=a105_0x4f7c8b,_0xefc889=await prepareUpdate(_0x12a0f6),_0x2d3e68=_0xefc889['patch'][_0x590644(0x100)]!==undefined?[NON_ATOMIC_WARNING]:[];return asDryRunResult({'operation':'update','selector':{'id':_0xefc889[_0x590644(0xfc)]['id'],'scope':'company','appCode':_0xefc889['before']['appCode']},'before':_0xefc889['before'],'after':_0xefc889['planned'],'dryRun':!![],'backend':{'method':_0x590644(0x115),'path':UPDATE_PATH},'warnings':_0x2d3e68,'verification':{'expectedVersion':_0xefc889['patch'][_0x590644(0x100)]??null,'atomicCompareAndSet':![],'plannedSnapshotHash':_0xefc889['before'][_0x590644(0xfd)],'lookupCommand':_0x590644(0x110)+_0xefc889[_0x590644(0xfc)]['id']+_0x590644(0xf9)}},{'method':_0x590644(0x115),'url':UPDATE_PATH});},async 'execute'(_0x193ffa){const _0x432259=a105_0x4f7c8b;requireKbExplicitYes(_0x193ffa);const _0x2e81fa=await prepareUpdate(_0x193ffa),_0xeb604e={'id':_0x2e81fa['patch']['id'],..._0x2e81fa[_0x432259(0x10b)][_0x432259(0xfa)]!==undefined?{'title':_0x2e81fa[_0x432259(0x10b)][_0x432259(0xfa)]}:{},..._0x2e81fa[_0x432259(0x10e)]?{'content':_0x2e81fa[_0x432259(0x10e)][_0x432259(0xeb)]}:{}};let _0x331938=![];try{const _0x5d8521=await updateEnterpriseKnowledgeBase(_0x193ffa[_0x432259(0xed)],_0xeb604e);assertCompanyKnowledgeBase(_0x5d8521,_0x193ffa[_0x432259(0x103)],_0x2e81fa[_0x432259(0x10b)]['id']);}catch(_0x5330f3){if(!isPlatformTransportFailure(_0x5330f3))throw _0x5330f3;_0x331938=!![];}const _0x28b35=await verifyKbMutationReadback(_0x432259(0xe7),_0x331938,()=>requireKb(_0x193ffa,_0x2e81fa[_0x432259(0x10b)]['id'])),_0x4ff130=projectKb(_0x28b35),_0x4e001f=_0x2e81fa[_0x432259(0x10b)][_0x432259(0xfa)]===undefined||_0x28b35[_0x432259(0xfa)]===_0x2e81fa[_0x432259(0x10b)]['title'],_0x2f0603=!_0x2e81fa[_0x432259(0x10e)]||inspectKbContent(_0x28b35['content'])[_0x432259(0xfb)]===_0x2e81fa[_0x432259(0x10e)]['contentHash'],_0x597277=!_0x2e81fa[_0x432259(0x10e)]||_0x28b35[_0x432259(0x109)]>_0x2e81fa[_0x432259(0x114)][_0x432259(0x109)],_0x4a08b4=!_0x331938||_0x2e81fa['replacement']!==undefined||_0x2e81fa[_0x432259(0x10b)][_0x432259(0xfa)]===undefined||_0x2e81fa['beforeRecord']['title']!==_0x2e81fa['patch']['title'];if(!_0x4e001f||!_0x2f0603||!_0x597277||!_0x4a08b4)throw kbError(_0x331938?_0x432259(0xf8):_0x432259(0xff),_0x432259(0xdf)+_0x2e81fa[_0x432259(0x10b)]['id']+_0x432259(0xf1),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x2e81fa[_0x432259(0x10b)]['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x36e72f=[];return _0x2e81fa[_0x432259(0x10b)]['expectedVersion']!==undefined&&_0x36e72f[_0x432259(0xe8)](NON_ATOMIC_WARNING),_0x331938&&_0x36e72f['push'](_0x432259(0x10a)),{'ok':!![],'data':{'operation':_0x432259(0xe7),'selector':{'id':_0x4ff130['id'],'scope':_0x432259(0xec),'appCode':_0x4ff130['appCode']},'before':_0x2e81fa[_0x432259(0xfc)],'after':_0x4ff130,'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x36e72f,'verification':{'status':_0x432259(0xe9),'recoveredAfterUnknownResponse':_0x331938,'expectedVersion':_0x2e81fa[_0x432259(0x10b)][_0x432259(0x100)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x432259(0x110)+_0x4ff130['id']+_0x432259(0xf9)}},'message':_0x432259(0xe3)+_0x4ff130['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 a106_0x40f04c=a106_0x384c;(function(_0x55a29a,_0x18b1a8){const _0x1560f3=a106_0x384c,_0x2d4255=_0x55a29a();while(!![]){try{const _0x2afe43=-parseInt(_0x1560f3(0xf9))/0x1*(-parseInt(_0x1560f3(0xfe))/0x2)+-parseInt(_0x1560f3(0xfb))/0x3+parseInt(_0x1560f3(0x100))/0x4*(-parseInt(_0x1560f3(0xff))/0x5)+-parseInt(_0x1560f3(0x10f))/0x6*(parseInt(_0x1560f3(0xf7))/0x7)+parseInt(_0x1560f3(0xf6))/0x8+parseInt(_0x1560f3(0x101))/0x9+-parseInt(_0x1560f3(0x102))/0xa*(-parseInt(_0x1560f3(0x10e))/0xb);if(_0x2afe43===_0x18b1a8)break;else _0x2d4255['push'](_0x2d4255['shift']());}catch(_0x62472a){_0x2d4255['push'](_0x2d4255['shift']());}}}(a106_0xcdee,0xd91ae));function a106_0x384c(_0x453e76,_0x17e91e){_0x453e76=_0x453e76-0xf3;const _0xcdee92=a106_0xcdee();let _0x384cc1=_0xcdee92[_0x453e76];return _0x384cc1;}function a106_0xcdee(){const _0x5d0a62=['level','clear','3765952xfZRLa','1205022hxNTPZ','write','46154BsfySl','error','2262252PhAPIn','details','keys','28Yxxgbz','75550zHhElC','448XEmjQB','6517944BhBnZY','4166740rNWGrH','warn','*\x20Logs\x20cleared','length','show','success','View\x20command\x20history\x20logs','timestamp','duration','stringify','en-US','\x20\x20\x20Time:\x20','44TfGOyk','6pGhZFB','Clear\x20command\x20history\x20logs','log','logs'];a106_0xcdee=function(){return _0x5d0a62;};return a106_0xcdee();}import{logger}from'../../utils/logger.js';function printLogs(_0x1fb304){const _0x36d7b0=a106_0x384c;if(_0x1fb304[_0x36d7b0(0x105)]===0x0){console[_0x36d7b0(0x111)]('*\x20No\x20logs\x20found');return;}console[_0x36d7b0(0x111)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x1fb304['forEach']((_0x1d46d0,_0x171b79)=>{const _0x5cc0dd=_0x36d7b0,_0x98cfc2=new Date(_0x1d46d0[_0x5cc0dd(0x109)])['toLocaleString'](_0x5cc0dd(0x10c)),_0x48ff5f=_0x1d46d0[_0x5cc0dd(0xf4)]===_0x5cc0dd(0x107)?'√':_0x1d46d0['level']===_0x5cc0dd(0xfa)?'×':_0x1d46d0[_0x5cc0dd(0xf4)]===_0x5cc0dd(0x103)?'!':'i';console[_0x5cc0dd(0x111)](_0x171b79+0x1+'.\x20'+_0x48ff5f+'\x20['+_0x1d46d0['command']+']\x20'+_0x1d46d0['message']),console[_0x5cc0dd(0x111)](_0x5cc0dd(0x10d)+_0x98cfc2),_0x1d46d0['duration']&&console[_0x5cc0dd(0x111)]('\x20\x20\x20Duration:\x20'+_0x1d46d0[_0x5cc0dd(0x10a)]+'ms'),_0x1d46d0['details']&&Object[_0x5cc0dd(0xfd)](_0x1d46d0[_0x5cc0dd(0xfc)])[_0x5cc0dd(0x105)]>0x0&&console[_0x5cc0dd(0x111)]('\x20\x20\x20Details:\x20'+JSON[_0x5cc0dd(0x10b)](_0x1d46d0[_0x5cc0dd(0xfc)],null,0x2)),console[_0x5cc0dd(0x111)]('');});}export const logsDefinitions=[{'service':a106_0x40f04c(0xf3),'command':a106_0x40f04c(0x106),'description':a106_0x40f04c(0x108),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x54e33d){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a106_0x40f04c(0xf5),'description':a106_0x40f04c(0x110),'risk':a106_0x40f04c(0xf8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1f53d2){const _0x1d2e62=a106_0x40f04c;return logger['clearLogs'](),console[_0x1d2e62(0x111)](_0x1d2e62(0x104)),{'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 a107_0x12cdc0=a107_0x2c77;(function(_0x2cf202,_0x176f1a){const _0x726c59=a107_0x2c77,_0x3dc651=_0x2cf202();while(!![]){try{const _0x2e5f68=parseInt(_0x726c59(0x99))/0x1+parseInt(_0x726c59(0x8d))/0x2+parseInt(_0x726c59(0xa1))/0x3*(parseInt(_0x726c59(0x9e))/0x4)+parseInt(_0x726c59(0xc0))/0x5*(parseInt(_0x726c59(0xa7))/0x6)+parseInt(_0x726c59(0xab))/0x7+-parseInt(_0x726c59(0x98))/0x8*(parseInt(_0x726c59(0xa9))/0x9)+-parseInt(_0x726c59(0x87))/0xa;if(_0x2e5f68===_0x176f1a)break;else _0x3dc651['push'](_0x3dc651['shift']());}catch(_0x38e913){_0x3dc651['push'](_0x3dc651['shift']());}}}(a107_0x3b44,0xaa1d8));import a107_0x11491b 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';function a107_0x2c77(_0x222626,_0x1749b0){_0x222626=_0x222626-0x75;const _0x3b443e=a107_0x3b44();let _0x2c77af=_0x3b443e[_0x222626];return _0x2c77af;}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':a107_0x12cdc0(0x8e),'description':a107_0x12cdc0(0xb7),'risk':a107_0x12cdc0(0x86),'flags':[{'name':a107_0x12cdc0(0x90),'type':a107_0x12cdc0(0x88),'description':a107_0x12cdc0(0x7a)+a107_0x12cdc0(0x9d)},{'name':a107_0x12cdc0(0xc8),'type':'string','description':a107_0x12cdc0(0x8a)+'patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','enum':[a107_0x12cdc0(0x91),a107_0x12cdc0(0xca)],'default':'patch'},{'name':a107_0x12cdc0(0xa2),'type':a107_0x12cdc0(0x8b),'description':a107_0x12cdc0(0xbb)},{'name':a107_0x12cdc0(0x84),'type':a107_0x12cdc0(0x88),'description':a107_0x12cdc0(0x93)},{'name':a107_0x12cdc0(0xb6),'type':a107_0x12cdc0(0x88),'description':a107_0x12cdc0(0x89)},{'name':a107_0x12cdc0(0xc7),'type':'boolean','description':'Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources'},{'name':a107_0x12cdc0(0xaf),'type':'string','enum':['import',a107_0x12cdc0(0xb5),a107_0x12cdc0(0xaa)],'description':a107_0x12cdc0(0xa0)}],async 'dryRun'(_0x348c74){const _0x529ef0=a107_0x12cdc0;ensureRunnableContext(_0x348c74['rawFlags'],_0x348c74[_0x529ef0(0xc2)]);const _0x4af60f=await runMenuUpdateCore(_0x348c74[_0x529ef0(0xb3)],_0x348c74[_0x529ef0(0xb2)],_0x348c74[_0x529ef0(0x7e)]('params'),{'mode':parseMode(_0x348c74[_0x529ef0(0x7e)](_0x529ef0(0xc8))),'dryRun':!![],'force':_0x348c74[_0x529ef0(0xa5)]('force'),'selection':parseSelection(_0x348c74),'loadScriptMode':parseLoadScriptMode(_0x348c74[_0x529ef0(0x7e)](_0x529ef0(0xaf)))});return{'method':_0x529ef0(0xba),'url':_0x529ef0(0xc5),'body':_0x4af60f,'description':_0x4af60f['skipped']?_0x529ef0(0x77):'Would\x20update\x20'+(_0x4af60f[_0x529ef0(0xb9)]?.[_0x529ef0(0x82)]??0x0)+_0x529ef0(0xcb)};},async 'execute'(_0x5504ff){const _0x409782=a107_0x12cdc0;ensureRunnableContext(_0x5504ff[_0x409782(0x7f)],_0x5504ff[_0x409782(0xc2)]);const _0x4683e0=_0x5504ff[_0x409782(0x94)](_0x409782(0xc9)),_0x5be815=_0x5504ff['str'](_0x409782(0x90)),_0x27411f=parseMode(_0x5504ff[_0x409782(0x7e)](_0x409782(0xc8))),_0x4d48fd=_0x5504ff[_0x409782(0xa5)](_0x409782(0xa2)),_0x3433fb=parseLoadScriptMode(_0x5504ff['str'](_0x409782(0xaf))),_0x50817c=parseParams(_0x5be815),_0x548442=!!(_0x50817c[_0x409782(0xcc)]||_0x50817c['cssUrl']);if(_0x4683e0||_0x548442&&!isInteractive()){const _0x57e7d7=await runMenuUpdateCore(_0x5504ff[_0x409782(0xb3)],_0x5504ff['cookie'],_0x5be815,{'mode':_0x27411f,'force':_0x4d48fd,'selection':parseSelection(_0x5504ff),'loadScriptMode':_0x3433fb});return _0x57e7d7[_0x409782(0xc4)]?writeCliSideChannelLine(_0x409782(0x83)):(writeCliSideChannelLine(_0x409782(0xc1)+_0x57e7d7[_0x409782(0x7d)]+_0x409782(0xc6)),_0x57e7d7[_0x409782(0x78)]>0x0&&writeCliSideChannelLine('!\x20'+_0x57e7d7[_0x409782(0x78)]+'\x20menu(s)\x20failed')),{'ok':_0x57e7d7[_0x409782(0x78)]===0x0,'data':_0x57e7d7,'message':_0x57e7d7[_0x409782(0xc4)]?_0x409782(0xb1):_0x409782(0xa4)+_0x57e7d7[_0x409782(0x7d)]+_0x409782(0xbd)+_0x57e7d7[_0x409782(0x78)]+_0x409782(0xa3)};}requireInteractive();const _0x2ad29a=startSpinner(_0x409782(0x81));let _0x1d87c4;try{_0x1d87c4=await fetchOnlineMenuList(_0x5504ff[_0x409782(0xb3)],_0x5504ff[_0x409782(0xb2)]),stopSpinner(_0x2ad29a,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0xe73eb){stopSpinner(_0x2ad29a,_0x409782(0x85),![]);throw CliErrors['validation'](_0xe73eb instanceof Error?_0xe73eb[_0x409782(0xb4)]:_0x409782(0x85));}const _0x49a7f4=filterMenusWithResources(_0x1d87c4),_0x5db03a=parseSelection(_0x5504ff,![]),_0x51482f=_0x5db03a?selectMenusForUpdate(_0x49a7f4,_0x5db03a):_0x49a7f4;if(_0x51482f['length']===0x0)return writeCliSideChannelLine(a107_0x11491b[_0x409782(0x7b)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a107_0x11491b[_0x409782(0x95)](_0x409782(0x9c)+_0x51482f['length']+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x51482f[_0x409782(0xb8)](_0x8c44ca=>_0x8c44ca['label']),[_0x50817c['jsUrl'],_0x50817c[_0x409782(0xae)]])),writeCliSideChannelLine('');let _0x14ea0f=_0x50817c['jsUrl'],_0x414f07=_0x50817c[_0x409782(0xae)];!_0x14ea0f&&(_0x14ea0f=await askJsUrl());!_0x414f07&&(_0x414f07=await askCssUrl());const _0x5764e9=await askConfirm(_0x409782(0xad)+_0x51482f[_0x409782(0x82)]+_0x409782(0x76)+_0x14ea0f+'\x20and\x20CSS:\x20'+_0x414f07+'?');if(!_0x5764e9)return writeCliSideChannelLine(a107_0x11491b['gray'](_0x409782(0xa8))),{'ok':!![]};const _0x118df0=startSpinner('Updating\x20'+_0x51482f[_0x409782(0x82)]+_0x409782(0xbf));try{const _0x402d4d=await runMenuUpdateCore(_0x5504ff[_0x409782(0xb3)],_0x5504ff['cookie'],JSON['stringify']({'jsUrl':_0x14ea0f,'cssUrl':_0x414f07}),{'mode':_0x27411f,'force':_0x4d48fd,'selection':{'all':![],'menuIds':_0x51482f[_0x409782(0xb8)](_0x2f62be=>_0x2f62be['id']),'paths':[]},'loadScriptMode':_0x3433fb});return stopSpinner(_0x118df0,'Updated\x20'+_0x402d4d[_0x409782(0x7d)]+_0x409782(0x8f),_0x402d4d[_0x409782(0x78)]===0x0),{'ok':_0x402d4d['failed']===0x0,'data':_0x402d4d,'message':_0x402d4d[_0x409782(0x78)]>0x0?_0x409782(0xa4)+_0x402d4d[_0x409782(0x7d)]+_0x409782(0xbd)+_0x402d4d[_0x409782(0x78)]+_0x409782(0xa3):'Menu\x20asset\x20update\x20completed:\x20'+_0x402d4d[_0x409782(0x7d)]+_0x409782(0xbc)};}catch(_0x349b36){stopSpinner(_0x118df0,_0x409782(0x80),![]);throw CliErrors[_0x409782(0x7c)](_0x349b36 instanceof Error?_0x349b36['message']:_0x409782(0x80));}}};function ensureRunnableContext(_0x5012fe,_0x1069be){const _0x4ee043=a107_0x12cdc0,_0x2a57bc=_0x5012fe['appcode']?String(_0x5012fe[_0x4ee043(0x9b)])['trim']():'';if(!isInProject()&&!_0x1069be&&!_0x2a57bc)throw CliErrors[_0x4ee043(0x7c)](_0x4ee043(0x8c)+_0x4ee043(0x9a));}function parseMode(_0xf8fbf6){const _0x5e7ead=a107_0x12cdc0;if(!_0xf8fbf6)return _0x5e7ead(0xca);if(_0xf8fbf6===_0x5e7ead(0x91)||_0xf8fbf6==='patch')return _0xf8fbf6;throw CliErrors[_0x5e7ead(0x7c)](_0x5e7ead(0xc3));}function a107_0x3b44(){const _0x178e12=['params','replace','filter','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','flag','cyan','isArray','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','18744shjahF','1391355kJpSgr','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','appcode','\x20\x20Found\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','48276bLQiiZ','Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','150TnarcU','force','\x20failed.','Menu\x20asset\x20update\x20completed:\x20','bool','isSafeInteger','6318Qwrscg','\x20\x20Cancelled.','2052bUOkGm','fetch','3054954WqITbg','trim','\x20\x20Update\x20','cssUrl','load-mode','import','Menu\x20asset\x20update\x20skipped','cookie','appCode','message','script','paths','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','map','diffs','POST','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20updated.','\x20updated,\x20','some','\x20menu(s)...','4595WccBpT','✓\x20Menu\x20asset\x20update\x20completed:\x20','selectedAppName','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','skipped','/smartapi/menu/update','\x20menu(s)\x20updated','all','mode','yes','patch','\x20menu\x20resource\x20set(s).','jsUrl','split','\x20menu(s)\x20with\x20JS:\x20','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','failed','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','yellow','validation','updated','str','rawFlags','Menu\x20asset\x20update\x20failed','Fetching\x20online\x20menu\x20list...','length','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','menu-ids','Failed\x20to\x20fetch\x20online\x20menu\x20list','high-risk-write','24998830aStDrW','string','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','boolean','menu\x20asset-update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','663890kgURbu','asset-update','\x20menu(s)'];a107_0x3b44=function(){return _0x178e12;};return a107_0x3b44();}function parseSelection(_0x1dd558,_0x555bd6=!![]){const _0x4f6b94=a107_0x12cdc0,_0x24e1fb=_0x1dd558[_0x4f6b94(0xa5)](_0x4f6b94(0xc7)),_0x4884e6=parseMenuIds(_0x1dd558[_0x4f6b94(0x7e)](_0x4f6b94(0x84))),_0xa25cb8=parseCsv(_0x1dd558[_0x4f6b94(0x7e)](_0x4f6b94(0xb6))),_0x697d90=_0x4884e6['length']>0x0||_0xa25cb8[_0x4f6b94(0x82)]>0x0;if(_0x24e1fb&&_0x697d90)throw CliErrors[_0x4f6b94(0x7c)](_0x4f6b94(0x97));if(!_0x24e1fb&&!_0x697d90){if(!_0x555bd6)return undefined;throw CliErrors[_0x4f6b94(0x7c)](_0x4f6b94(0x79));}return{'all':_0x24e1fb,'menuIds':_0x4884e6,'paths':_0xa25cb8};}function parseMenuIds(_0x2c8f1b){const _0xb93671=a107_0x12cdc0,_0x5b0a83=parseCsv(_0x2c8f1b),_0x47c56a=_0x5b0a83[_0xb93671(0xb8)](Number);if(_0x47c56a[_0xb93671(0xbe)](_0x5e95ca=>!Number[_0xb93671(0xa6)](_0x5e95ca)||_0x5e95ca<=0x0))throw CliErrors[_0xb93671(0x7c)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x47c56a)];}function parseCsv(_0x2b282f){const _0x1a361a=a107_0x12cdc0;return[...new Set(_0x2b282f[_0x1a361a(0x75)](',')[_0x1a361a(0xb8)](_0x329b3c=>_0x329b3c[_0x1a361a(0xac)]())[_0x1a361a(0x92)](Boolean))];}function parseLoadScriptMode(_0xbf6e06){const _0x2167e8=a107_0x12cdc0;if(!_0xbf6e06)return undefined;if(_0xbf6e06===_0x2167e8(0xb0)||_0xbf6e06===_0x2167e8(0xb5)||_0xbf6e06===_0x2167e8(0xaa))return _0xbf6e06;throw CliErrors[_0x2167e8(0x7c)](_0x2167e8(0x9f));}function parseParams(_0x357238){const _0x139146=a107_0x12cdc0;if(!_0x357238)return{};try{const _0x272f5e=JSON['parse'](_0x357238);if(typeof _0x272f5e!=='object'||_0x272f5e===null||Array[_0x139146(0x96)](_0x272f5e))return{};return{'jsUrl':typeof _0x272f5e[_0x139146(0xcc)]==='string'?_0x272f5e['jsUrl'][_0x139146(0xac)]():undefined,'cssUrl':typeof _0x272f5e[_0x139146(0xae)]===_0x139146(0x88)?_0x272f5e[_0x139146(0xae)][_0x139146(0xac)]():undefined};}catch{return{};}}