@lovrabet/rabetbase-cli 2.5.7 → 2.5.8-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 (381) hide show
  1. package/README.md +7 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.js +1 -1
  162. package/lib/commands/kb/update.js +1 -1
  163. package/lib/commands/logs/index.js +1 -1
  164. package/lib/commands/menu/asset-update.js +1 -1
  165. package/lib/commands/menu/delete.js +1 -1
  166. package/lib/commands/menu/external-link-create.js +1 -1
  167. package/lib/commands/menu/external-link-update.js +1 -1
  168. package/lib/commands/menu/group-create.js +1 -1
  169. package/lib/commands/menu/group-update.js +1 -1
  170. package/lib/commands/menu/index.js +1 -1
  171. package/lib/commands/menu/list.js +1 -1
  172. package/lib/commands/menu/move.js +1 -1
  173. package/lib/commands/menu/regroup-start.js +1 -1
  174. package/lib/commands/menu/rename.js +1 -1
  175. package/lib/commands/menu/shared/compare-table.js +1 -1
  176. package/lib/commands/menu/shared/delete-plan.js +1 -1
  177. package/lib/commands/menu/shared/facts.js +1 -1
  178. package/lib/commands/menu/shared/index.js +1 -1
  179. package/lib/commands/menu/shared/inquirer.js +1 -1
  180. package/lib/commands/menu/shared/local-pages.js +1 -1
  181. package/lib/commands/menu/shared/logic.js +1 -1
  182. package/lib/commands/menu/shared/mutations.js +1 -1
  183. package/lib/commands/menu/shared/path.js +1 -1
  184. package/lib/commands/menu/shared/service.js +1 -1
  185. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  186. package/lib/commands/menu/shared/sync-core.js +1 -1
  187. package/lib/commands/menu/shared/update-core.js +1 -1
  188. package/lib/commands/menu/shared/valid-url.js +1 -1
  189. package/lib/commands/menu/subapp-assets-status.js +1 -1
  190. package/lib/commands/menu/subapp-assets-update.js +1 -1
  191. package/lib/commands/menu/sync.js +1 -1
  192. package/lib/commands/menu/visibility-update.js +1 -1
  193. package/lib/commands/notification/config-create.js +1 -1
  194. package/lib/commands/notification/config-delete.js +1 -1
  195. package/lib/commands/notification/config-list.js +1 -1
  196. package/lib/commands/notification/config-update.js +1 -1
  197. package/lib/commands/notification/index.js +1 -1
  198. package/lib/commands/notification/shared.js +1 -1
  199. package/lib/commands/ocr/index.js +1 -1
  200. package/lib/commands/page/create.js +1 -1
  201. package/lib/commands/page/custom/detail.js +1 -1
  202. package/lib/commands/page/custom/list.js +1 -1
  203. package/lib/commands/page/custom/publish.js +1 -1
  204. package/lib/commands/page/custom/shared.js +1 -1
  205. package/lib/commands/page/custom/syntax.js +1 -1
  206. package/lib/commands/page/custom/update.js +1 -1
  207. package/lib/commands/page/data-list-status.js +1 -1
  208. package/lib/commands/page/generate-start.js +1 -1
  209. package/lib/commands/page/generate-status.js +1 -1
  210. package/lib/commands/page/index.js +1 -1
  211. package/lib/commands/page/pull.js +1 -1
  212. package/lib/commands/page/push.js +1 -1
  213. package/lib/commands/page/relation-audit.js +1 -1
  214. package/lib/commands/page/restore.js +1 -1
  215. package/lib/commands/page/shared.js +1 -1
  216. package/lib/commands/page/sync.js +1 -1
  217. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  218. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  219. package/lib/commands/project/create/format-elapsed.js +1 -1
  220. package/lib/commands/project/create/main.js +1 -1
  221. package/lib/commands/project/create/materialize-project-template.js +1 -1
  222. package/lib/commands/project/create/project-name.js +1 -1
  223. package/lib/commands/project/create/project-template-archive.js +1 -1
  224. package/lib/commands/project/create/project-template-path.js +1 -1
  225. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  226. package/lib/commands/project/create/use-format-code.js +1 -1
  227. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  228. package/lib/commands/project/domain-routing-sync.js +1 -1
  229. package/lib/commands/project/index.js +1 -1
  230. package/lib/commands/project/upgrade.js +1 -1
  231. package/lib/commands/registry.js +1 -1
  232. package/lib/commands/role/delete.js +1 -1
  233. package/lib/commands/role/detail.js +1 -1
  234. package/lib/commands/role/index.js +1 -1
  235. package/lib/commands/role/list.js +1 -1
  236. package/lib/commands/role/shared.js +1 -1
  237. package/lib/commands/role/update.js +1 -1
  238. package/lib/commands/role/user-add.js +1 -1
  239. package/lib/commands/role/user-remove.js +1 -1
  240. package/lib/commands/role/user-resolve.js +1 -1
  241. package/lib/commands/rule/get.js +1 -1
  242. package/lib/commands/rule/index.js +1 -1
  243. package/lib/commands/rule/list.js +1 -1
  244. package/lib/commands/rule/set.js +1 -1
  245. package/lib/commands/rule/shared.js +1 -1
  246. package/lib/commands/run/index.js +1 -1
  247. package/lib/commands/schema.js +1 -1
  248. package/lib/commands/sql/create.js +1 -1
  249. package/lib/commands/sql/delete.js +1 -1
  250. package/lib/commands/sql/detail.js +1 -1
  251. package/lib/commands/sql/exec.js +1 -1
  252. package/lib/commands/sql/index.js +1 -1
  253. package/lib/commands/sql/list.js +1 -1
  254. package/lib/commands/sql/pull.js +1 -1
  255. package/lib/commands/sql/push.js +1 -1
  256. package/lib/commands/sql/shared.js +1 -1
  257. package/lib/commands/sql/status.js +1 -1
  258. package/lib/commands/sql/validate.js +1 -1
  259. package/lib/commands/task/index.js +1 -1
  260. package/lib/commands/task/status.js +1 -1
  261. package/lib/commands/tenant/index.js +1 -1
  262. package/lib/commands/tenant/members-list.js +1 -1
  263. package/lib/commands/tenant/shared.js +1 -1
  264. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  265. package/lib/commands/user-account/feishu-bind.js +1 -1
  266. package/lib/commands/user-account/index.js +1 -1
  267. package/lib/commands/workspace/add.js +1 -1
  268. package/lib/commands/workspace/index.js +1 -1
  269. package/lib/commands/workspace/remove.js +1 -1
  270. package/lib/config/domain-config.js +1 -1
  271. package/lib/config/project-domain-routing.js +1 -1
  272. package/lib/config/region-config.js +1 -1
  273. package/lib/config/schema.js +1 -1
  274. package/lib/constant/cdn.js +1 -1
  275. package/lib/constant/cli.js +1 -1
  276. package/lib/constant/defaults.js +1 -1
  277. package/lib/constant/domain.d.ts +1 -1
  278. package/lib/constant/domain.js +1 -1
  279. package/lib/constant/env.js +1 -1
  280. package/lib/constant/output.js +1 -1
  281. package/lib/constant/paths.js +1 -1
  282. package/lib/constant/region.js +1 -1
  283. package/lib/constant/risk.js +1 -1
  284. package/lib/constant/routing-profile.js +1 -1
  285. package/lib/context/app-resolver.js +1 -1
  286. package/lib/context/auth-resolver.js +1 -1
  287. package/lib/context/config-loader.js +1 -1
  288. package/lib/context.js +1 -1
  289. package/lib/core/alias-resolver.js +1 -1
  290. package/lib/core/api-client.d.ts +2 -2
  291. package/lib/core/api-client.js +1 -1
  292. package/lib/core/bff/config.js +1 -1
  293. package/lib/core/bff/file-system.js +1 -1
  294. package/lib/core/bff/hash.js +1 -1
  295. package/lib/core/bff/hook-directory.js +1 -1
  296. package/lib/core/bff/lock.js +1 -1
  297. package/lib/core/bff/utils.js +1 -1
  298. package/lib/core/cross-db-analysis.js +1 -1
  299. package/lib/core/cross-db-relation.js +1 -1
  300. package/lib/core/db-resolver.js +1 -1
  301. package/lib/core/flow-config.js +1 -1
  302. package/lib/core/instant-api-policy/config.js +1 -1
  303. package/lib/core/kb-management-client.d.ts +19 -0
  304. package/lib/core/kb-management-client.js +1 -0
  305. package/lib/core/kb-search-client.js +1 -1
  306. package/lib/core/page/file-system.js +1 -1
  307. package/lib/core/page/hash.js +1 -1
  308. package/lib/core/page/lock.js +1 -1
  309. package/lib/core/page/lr-smart-jsx.js +1 -1
  310. package/lib/core/sql-index-auditor.js +1 -1
  311. package/lib/core/sql-sync/config.js +1 -1
  312. package/lib/core/sql-sync/file-system.js +1 -1
  313. package/lib/core/sql-sync/hash.js +1 -1
  314. package/lib/core/sql-sync/lock.js +1 -1
  315. package/lib/core/sql-sync/utils.js +1 -1
  316. package/lib/core/sql-validator.js +1 -1
  317. package/lib/errors.js +1 -1
  318. package/lib/framework/build-all-flags.js +1 -1
  319. package/lib/framework/error-output.js +1 -1
  320. package/lib/framework/explicit-yes.js +1 -1
  321. package/lib/framework/flags.js +1 -1
  322. package/lib/framework/help.js +1 -1
  323. package/lib/framework/index.js +1 -1
  324. package/lib/framework/output.js +1 -1
  325. package/lib/framework/response.js +1 -1
  326. package/lib/framework/runner-alias.js +1 -1
  327. package/lib/framework/runner.js +1 -1
  328. package/lib/framework/schema-export.js +1 -1
  329. package/lib/framework/supported-flags.js +1 -1
  330. package/lib/framework/types.js +1 -1
  331. package/lib/generated/build-info.d.ts +4 -4
  332. package/lib/generated/build-info.js +1 -1
  333. package/lib/generated/official-routing.js +1 -1
  334. package/lib/generated/routing-contract.js +1 -1
  335. package/lib/help.js +1 -1
  336. package/lib/postinstall.js +1 -1
  337. package/lib/runtime/confirmation.js +1 -1
  338. package/lib/runtime/event.js +1 -1
  339. package/lib/runtime/index.js +1 -1
  340. package/lib/runtime/queue.js +1 -1
  341. package/lib/runtime/resolve.js +1 -1
  342. package/lib/services/dataset-design/checkpoint.js +1 -1
  343. package/lib/services/dataset-design/commands.js +1 -1
  344. package/lib/services/dataset-design/contract.js +1 -1
  345. package/lib/skills/builtin-skill.js +1 -1
  346. package/lib/skills/main.js +1 -1
  347. package/lib/skills/npx-skills-add.js +1 -1
  348. package/lib/skills/skill-presence.js +1 -1
  349. package/lib/telemetry/cli-command-trace.js +1 -1
  350. package/lib/telemetry/cli-help-trace.js +1 -1
  351. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  352. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  353. package/lib/telemetry/send-cli-trace-log.js +1 -1
  354. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  355. package/lib/utils/ai_config.js +1 -1
  356. package/lib/utils/apply-jq-filter.js +1 -1
  357. package/lib/utils/cdn-config.js +1 -1
  358. package/lib/utils/check-sdk-version.js +1 -1
  359. package/lib/utils/cli-version-check.js +1 -1
  360. package/lib/utils/cli-version-policy.js +1 -1
  361. package/lib/utils/config.js +1 -1
  362. package/lib/utils/entity-with-id.js +1 -1
  363. package/lib/utils/file-utils.js +1 -1
  364. package/lib/utils/guides-cdn.js +1 -1
  365. package/lib/utils/http-client.js +1 -1
  366. package/lib/utils/is-non-interactive.js +1 -1
  367. package/lib/utils/logger.js +1 -1
  368. package/lib/utils/params.js +1 -1
  369. package/lib/utils/platform.js +1 -1
  370. package/lib/utils/sleep.js +1 -1
  371. package/lib/utils/template-replacer.js +1 -1
  372. package/lib/utils/update-notice.js +1 -1
  373. package/lib/utils/version.js +1 -1
  374. package/lib/utils/with-active-cookie.js +1 -1
  375. package/lib/utils/write-cli-side-channel.js +1 -1
  376. package/package.json +1 -1
  377. package/skills/rabetbase/SKILL.md +2 -2
  378. package/skills/rabetbase/references/rabetbase-kb.md +7 -6
  379. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  380. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  381. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x55d2c6,_0x5777c7){const _0x4adf94=a229_0x267c,_0x485801=_0x55d2c6();while(!![]){try{const _0x48c1e9=-parseInt(_0x4adf94(0x141))/0x1*(-parseInt(_0x4adf94(0x115))/0x2)+parseInt(_0x4adf94(0x149))/0x3*(parseInt(_0x4adf94(0x118))/0x4)+-parseInt(_0x4adf94(0x14c))/0x5*(parseInt(_0x4adf94(0x15d))/0x6)+parseInt(_0x4adf94(0x12e))/0x7*(parseInt(_0x4adf94(0x15f))/0x8)+-parseInt(_0x4adf94(0x121))/0x9+-parseInt(_0x4adf94(0x134))/0xa*(parseInt(_0x4adf94(0x151))/0xb)+parseInt(_0x4adf94(0x159))/0xc*(parseInt(_0x4adf94(0x14b))/0xd);if(_0x48c1e9===_0x5777c7)break;else _0x485801['push'](_0x485801['shift']());}catch(_0x7e81fc){_0x485801['push'](_0x485801['shift']());}}}(a229_0x1246,0x31de8));import a229_0x2d86af from'chalk';import a229_0x5b4dc9 from'ora';function a229_0x1246(){const _0x4b6aa2=['devDependencies','yellow','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','action','6IJUspK','length','13LITqRB','130VmmENE','some','\x20\x20\x20\x20','bold','Proceed\x20with\x20upgrade?','2409THgbSA','string','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','cyan','FAIL','source\x20structure\x20is\x20current','\x20\x20Current\x20version\x20in\x20','parse','600924BsNplH','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','path','89928kfeSKA','needed','644792srGRuR','message','profiles','start','gray','@lovrabet/sdk','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','object','sdkUpgrade','338962IYPReb','Step\x202/2:\x20Application\x20source\x20—\x20','white','694704dbQOEz','Upgrade\x20cancelled.','groups','up-to-date','succeed','utf8','Upgrade\x20@lovrabet/sdk','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','Upgrade\x20application\x20source','1501209SeTWen','skippedLegacyDirectories','detail','step','label','manualMergeRequired','push','files','package.json','done','\x20\x20bun\x20install','[\x22@lovrabet/sdk\x22]:\x20','failed','28otCzQg','apiDir','apiArchitecture','dependencies','\x20\x20#\x20or','\x20\x20npm\x20install','5870asrdog','\x20→\x20','latest','log','join','green','@lovrabet/sdk:','fail','upgrade\x20needed','\x20\x20Step\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20→\x20latest','\x20\x20\x20\x20\x20\x20candidate:\x20','1tAKkkz','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Your\x20project\x20is\x20already\x20up-to-date.','===\x20Upgrade\x20Analysis\x20==='];a229_0x1246=function(){return _0x4b6aa2;};return a229_0x1246();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a229_0x267c(_0x31187b,_0x595c90){_0x31187b=_0x31187b-0x111;const _0x124629=a229_0x1246();let _0x267c66=_0x124629[_0x31187b];return _0x267c66;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x139d7e){const _0x105a3b=a229_0x267c;try{const _0x4da154=JSON['parse'](readFileSync(_0x139d7e,_0x105a3b(0x11d)));return _0x4da154&&typeof _0x4da154===_0x105a3b(0x113)?_0x4da154:{};}catch{return{};}}export function analyseProjectUpgrade(_0x4f2aef){const _0x51b3e4=a229_0x267c;let _0x3a854e=null;const _0x4b4f54=resolve(_0x4f2aef,_0x51b3e4(0x129));if(existsSync(_0x4b4f54))try{const _0x4f9985=JSON[_0x51b3e4(0x158)](readFileSync(_0x4b4f54,_0x51b3e4(0x11d)));for(const _0xa022f9 of[_0x51b3e4(0x131),_0x51b3e4(0x145)]){const _0x1d9f76=_0x4f9985?.[_0xa022f9]?.[_0x51b3e4(0x111)];if(typeof _0x1d9f76===_0x51b3e4(0x152)){_0x1d9f76!==_0x51b3e4(0x136)&&(_0x3a854e={'pkgPath':_0x4b4f54,'currentVersion':_0x1d9f76,'field':_0xa022f9});break;}}}catch{}const _0xb1ac8b=resolve(_0x4f2aef,NEW_CONFIG_NAME),_0x41e7df=existsSync(_0xb1ac8b)?readProjectConfig(_0xb1ac8b):{},_0xd87ecb=analyzeProjectApiArchitecture(_0x4f2aef,_0x41e7df);return{'sdkUpgrade':_0x3a854e,'apiArchitecture':_0xd87ecb};}function printReport(_0x39bd72){const _0x14497a=a229_0x267c;console[_0x14497a(0x137)](''),console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x14f)](_0x14497a(0x144))),console[_0x14497a(0x137)](''),console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)]('Application\x20source:')+('\x20\x20'+(_0x39bd72['apiArchitecture'][_0x14497a(0x15e)]?a229_0x2d86af[_0x14497a(0x146)](_0x14497a(0x13c)):a229_0x2d86af['green'](_0x14497a(0x11b)))));for(const _0x4a254a of _0x39bd72[_0x14497a(0x130)][_0x14497a(0x11a)]){console[_0x14497a(0x137)]('\x20\x20'+_0x4a254a[_0x14497a(0x12f)]+'\x20('+_0x4a254a[_0x14497a(0x161)][_0x14497a(0x138)](',\x20')+')');for(const _0x3abcb3 of _0x4a254a[_0x14497a(0x128)]){console[_0x14497a(0x137)](_0x14497a(0x14e)+_0x3abcb3[_0x14497a(0x148)]['padEnd'](0x11)+'\x20'+_0x3abcb3[_0x14497a(0x15c)]),_0x3abcb3['candidatePath']&&console['log'](_0x14497a(0x140)+_0x3abcb3['candidatePath']);}}_0x39bd72[_0x14497a(0x130)][_0x14497a(0x122)][_0x14497a(0x14a)]>0x0&&console['log'](_0x14497a(0x15b));console['log']('');if(_0x39bd72[_0x14497a(0x114)]){const {currentVersion:_0x1132f7,field:_0xdf490b,pkgPath:_0x28c2f7}=_0x39bd72[_0x14497a(0x114)];console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)](_0x14497a(0x13a))+('\x20\x20'+a229_0x2d86af['yellow'](_0x28c2f7))),console['log'](_0x14497a(0x157)+_0xdf490b+':\x20'+a229_0x2d86af[_0x14497a(0x146)](_0x1132f7)+_0x14497a(0x135)+a229_0x2d86af[_0x14497a(0x139)](_0x14497a(0x136))),console[_0x14497a(0x137)](_0x14497a(0x13e));}else console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)]('@lovrabet/sdk:')+'\x20\x20'+a229_0x2d86af[_0x14497a(0x163)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x14497a(0x137)]('');}function execUpgradeSdk(_0x2d0ee0){const _0x4c8b5a=a229_0x267c;if(!_0x2d0ee0[_0x4c8b5a(0x114)])return{'step':0x1,'label':_0x4c8b5a(0x11e),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x42a4e4,currentVersion:_0x5558b2,field:_0x3aae87}=_0x2d0ee0[_0x4c8b5a(0x114)];try{const _0x17ba89=readFileSync(_0x42a4e4,'utf8'),_0x875cd3=JSON[_0x4c8b5a(0x158)](_0x17ba89);return _0x875cd3[_0x3aae87][_0x4c8b5a(0x111)]=_0x4c8b5a(0x136),writeFileSync(_0x42a4e4,JSON['stringify'](_0x875cd3,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3aae87+_0x4c8b5a(0x12c)+_0x5558b2+_0x4c8b5a(0x13f)};}catch(_0x15f08e){return{'step':0x1,'label':_0x4c8b5a(0x11e),'ok':![],'detail':_0x15f08e instanceof Error?_0x15f08e['message']:String(_0x15f08e)};}}function printSummary(_0x138d45){const _0x4e2e4a=a229_0x267c;console[_0x4e2e4a(0x137)](''),console[_0x4e2e4a(0x137)](a229_0x2d86af[_0x4e2e4a(0x14f)]('===\x20Upgrade\x20Summary\x20===')),console[_0x4e2e4a(0x137)]('');for(const _0x1c6b2d of _0x138d45){const _0x1f3c61=_0x1c6b2d['ok']?a229_0x2d86af[_0x4e2e4a(0x139)]('OK'):a229_0x2d86af['red'](_0x4e2e4a(0x155));console[_0x4e2e4a(0x137)]('\x20\x20'+_0x1f3c61+_0x4e2e4a(0x13d)+_0x1c6b2d[_0x4e2e4a(0x124)]+':\x20'+_0x1c6b2d[_0x4e2e4a(0x125)]);if(_0x1c6b2d['detail'])console[_0x4e2e4a(0x137)]('\x20\x20\x20\x20\x20\x20\x20'+a229_0x2d86af[_0x4e2e4a(0x163)](_0x1c6b2d[_0x4e2e4a(0x123)]));}console[_0x4e2e4a(0x137)]('');}export async function upgradeApp(_0x5b6516,_0xe24933){const _0x469f63=a229_0x267c,_0x3e6cb0=process['cwd'](),_0xa1ee86=analyseProjectUpgrade(_0x3e6cb0);if(!_0xa1ee86[_0x469f63(0x114)]&&!_0xa1ee86[_0x469f63(0x130)][_0x469f63(0x15e)])return console['log'](a229_0x2d86af[_0x469f63(0x139)](_0x469f63(0x143))),{'analysis':_0xa1ee86,'steps':[],'completed':!![]};printReport(_0xa1ee86);const _0x3e2412=!!(_0xe24933['yes']||_0xe24933['Y']||_0x5b6516);if(!_0x3e2412)try{const _0x36bcf8=await askConfirm(_0x469f63(0x150));if(!_0x36bcf8)return console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x163)](_0x469f63(0x119))),{'analysis':_0xa1ee86,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x27ccdf){if(_0x27ccdf?.[_0x469f63(0x160)]==='CANCEL')return console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x163)](_0x469f63(0x119))),{'analysis':_0xa1ee86,'steps':[],'completed':![],'cancelled':!![]};throw _0x27ccdf;}const _0x35a918=[],_0x353200=a229_0x5b4dc9({'text':_0x469f63(0x112),'color':'cyan'})[_0x469f63(0x162)](),_0x4783c1=execUpgradeSdk(_0xa1ee86);_0x35a918[_0x469f63(0x127)](_0x4783c1),_0x353200[_0x4783c1['ok']?_0x469f63(0x11c):_0x469f63(0x13b)]('Step\x201/2:\x20@lovrabet/sdk\x20—\x20'+(_0x4783c1[_0x469f63(0x123)]??(_0x4783c1['ok']?_0x469f63(0x12a):_0x469f63(0x12d))));const _0x297585=a229_0x5b4dc9({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x469f63(0x154)})[_0x469f63(0x162)]();let _0x3c448f;try{_0x3c448f=await upgradeProjectApiArchitecture(_0x3e6cb0);const _0xf112dc=_0x3c448f[_0x469f63(0x126)]?_0x469f63(0x11f):_0x469f63(0x156);_0x297585['succeed'](_0x469f63(0x116)+_0xf112dc),_0x35a918[_0x469f63(0x127)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':!![],'detail':_0xf112dc});}catch(_0x22f7ba){const _0xeac11f=_0x22f7ba instanceof Error?_0x22f7ba['message']:String(_0x22f7ba);_0x297585[_0x469f63(0x13b)](_0x469f63(0x116)+_0xeac11f),_0x35a918[_0x469f63(0x127)]({'step':0x2,'label':_0x469f63(0x120),'ok':![],'detail':_0xeac11f});}printSummary(_0x35a918);const _0x128e44=_0x35a918[_0x469f63(0x14d)](_0x513b84=>!_0x513b84['ok']);if(_0x128e44)console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x146)](_0x469f63(0x142)));else _0x3c448f?.['manualMergeRequired']?console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x146)](_0x469f63(0x15a))):console[_0x469f63(0x137)](a229_0x2d86af['green']('Upgrade\x20completed\x20successfully!'));return _0x4783c1['ok']&&_0xa1ee86[_0x469f63(0x114)]&&(console[_0x469f63(0x137)](''),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x14f)]['cyan'](_0x469f63(0x153))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x154)](_0x469f63(0x147))),console[_0x469f63(0x137)](''),console['log'](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x133))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x132))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x12b))),console[_0x469f63(0x137)]('')),{'analysis':_0xa1ee86,'steps':_0x35a918,'apiArchitecture':_0x3c448f,'completed':!_0x128e44&&!_0x3c448f?.[_0x469f63(0x126)]};}
1
+ (function(_0x1120c0,_0x348f2d){const _0x1f70a1=a229_0x4869,_0xc11ab4=_0x1120c0();while(!![]){try{const _0x28a1ca=-parseInt(_0x1f70a1(0x200))/0x1+parseInt(_0x1f70a1(0x1f5))/0x2*(parseInt(_0x1f70a1(0x20c))/0x3)+-parseInt(_0x1f70a1(0x1ed))/0x4+-parseInt(_0x1f70a1(0x1e7))/0x5*(-parseInt(_0x1f70a1(0x1f6))/0x6)+-parseInt(_0x1f70a1(0x1d3))/0x7*(parseInt(_0x1f70a1(0x212))/0x8)+parseInt(_0x1f70a1(0x204))/0x9+parseInt(_0x1f70a1(0x1d5))/0xa;if(_0x28a1ca===_0x348f2d)break;else _0xc11ab4['push'](_0xc11ab4['shift']());}catch(_0x3d859c){_0xc11ab4['push'](_0xc11ab4['shift']());}}}(a229_0x19ed,0x6b81d));import a229_0x2a1714 from'chalk';import a229_0x5c9faa from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0xcbc28f){const _0x4d8195=a229_0x4869;try{const _0x53639f=JSON[_0x4d8195(0x21b)](readFileSync(_0xcbc28f,_0x4d8195(0x216)));return _0x53639f&&typeof _0x53639f===_0x4d8195(0x1ea)?_0x53639f:{};}catch{return{};}}function a229_0x4869(_0x45ff12,_0x1c6e4b){_0x45ff12=_0x45ff12-0x1d2;const _0x19ed6c=a229_0x19ed();let _0x486939=_0x19ed6c[_0x45ff12];return _0x486939;}export function analyseProjectUpgrade(_0x3776ca){const _0x2cd834=a229_0x4869;let _0x2c3ef9=null;const _0x49ff51=resolve(_0x3776ca,_0x2cd834(0x213));if(existsSync(_0x49ff51))try{const _0x20c6de=JSON[_0x2cd834(0x21b)](readFileSync(_0x49ff51,_0x2cd834(0x216)));for(const _0x291a2a of[_0x2cd834(0x1d4),_0x2cd834(0x21d)]){const _0x440169=_0x20c6de?.[_0x291a2a]?.[_0x2cd834(0x1f1)];if(typeof _0x440169==='string'){_0x440169!==_0x2cd834(0x206)&&(_0x2c3ef9={'pkgPath':_0x49ff51,'currentVersion':_0x440169,'field':_0x291a2a});break;}}}catch{}const _0x13e65c=resolve(_0x3776ca,NEW_CONFIG_NAME),_0x2b5d81=existsSync(_0x13e65c)?readProjectConfig(_0x13e65c):{},_0x1950b6=analyzeProjectApiArchitecture(_0x3776ca,_0x2b5d81);return{'sdkUpgrade':_0x2c3ef9,'apiArchitecture':_0x1950b6};}function printReport(_0x4b4f15){const _0x166f1f=a229_0x4869;console[_0x166f1f(0x1dd)](''),console[_0x166f1f(0x1dd)](a229_0x2a1714[_0x166f1f(0x1e2)](_0x166f1f(0x210))),console[_0x166f1f(0x1dd)](''),console[_0x166f1f(0x1dd)](a229_0x2a1714['cyan']('Application\x20source:')+('\x20\x20'+(_0x4b4f15[_0x166f1f(0x1e1)][_0x166f1f(0x1d8)]?a229_0x2a1714[_0x166f1f(0x1dc)](_0x166f1f(0x1ec)):a229_0x2a1714['green'](_0x166f1f(0x1ef)))));for(const _0x59ad33 of _0x4b4f15[_0x166f1f(0x1e1)]['groups']){console[_0x166f1f(0x1dd)]('\x20\x20'+_0x59ad33[_0x166f1f(0x1e5)]+'\x20('+_0x59ad33[_0x166f1f(0x1d7)]['join'](',\x20')+')');for(const _0x66b603 of _0x59ad33[_0x166f1f(0x1fe)]){console[_0x166f1f(0x1dd)]('\x20\x20\x20\x20'+_0x66b603[_0x166f1f(0x20d)]['padEnd'](0x11)+'\x20'+_0x66b603[_0x166f1f(0x1f3)]),_0x66b603['candidatePath']&&console[_0x166f1f(0x1dd)]('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x66b603[_0x166f1f(0x201)]);}}_0x4b4f15[_0x166f1f(0x1e1)][_0x166f1f(0x21f)][_0x166f1f(0x1df)]>0x0&&console[_0x166f1f(0x1dd)](_0x166f1f(0x1e8));console[_0x166f1f(0x1dd)]('');if(_0x4b4f15[_0x166f1f(0x214)]){const {currentVersion:_0x4e270e,field:_0x5f53d2,pkgPath:_0x320ec2}=_0x4b4f15[_0x166f1f(0x214)];console[_0x166f1f(0x1dd)](a229_0x2a1714['cyan'](_0x166f1f(0x1fb))+('\x20\x20'+a229_0x2a1714[_0x166f1f(0x1dc)](_0x320ec2))),console[_0x166f1f(0x1dd)](_0x166f1f(0x21c)+_0x5f53d2+':\x20'+a229_0x2a1714[_0x166f1f(0x1dc)](_0x4e270e)+_0x166f1f(0x1f8)+a229_0x2a1714[_0x166f1f(0x1f0)](_0x166f1f(0x206))),console[_0x166f1f(0x1dd)](_0x166f1f(0x1f9));}else console[_0x166f1f(0x1dd)](a229_0x2a1714[_0x166f1f(0x1e0)](_0x166f1f(0x1fb))+'\x20\x20'+a229_0x2a1714[_0x166f1f(0x1e9)](_0x166f1f(0x1ff)));console[_0x166f1f(0x1dd)]('');}function a229_0x19ed(){const _0x3d3192=['Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','32fwoOfC','1278TdkaaC','stringify','\x20→\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','failed','@lovrabet/sdk:','manualMergeRequired','Proceed\x20with\x20upgrade?','files','not\x20found\x20or\x20already\x20at\x20latest','714393SSWrlT','candidatePath','FAIL','\x20\x20\x20\x20\x20\x20\x20','5836239BTYUKQ','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','latest','Upgrade\x20application\x20source','yes','source\x20structure\x20is\x20current','fail','Step\x202/2:\x20Application\x20source\x20—\x20','89577shOxVw','action','succeed','white','===\x20Upgrade\x20Analysis\x20===','\x20\x20bun\x20install','5031464TwKjwI','package.json','sdkUpgrade','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','utf8','===\x20Upgrade\x20Summary\x20===','\x20\x20#\x20or','step','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','parse','\x20\x20Current\x20version\x20in\x20','devDependencies','Your\x20project\x20is\x20already\x20up-to-date.','skippedLegacyDirectories','\x20\x20npm\x20install','some','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','7lrEBIJ','dependencies','8728960ohRUdH','message','profiles','needed','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Upgrade\x20cancelled.','Upgrade\x20completed\x20successfully!','yellow','log','CANCEL','length','cyan','apiArchitecture','bold','red','push','apiDir','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','9805wxNNjL','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','gray','object','Upgrade\x20@lovrabet/sdk','upgrade\x20needed','2532516xxvQBM','done','up-to-date','green','@lovrabet/sdk','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','path'];a229_0x19ed=function(){return _0x3d3192;};return a229_0x19ed();}function execUpgradeSdk(_0xc7a0ac){const _0x1bfffc=a229_0x4869;if(!_0xc7a0ac['sdkUpgrade'])return{'step':0x1,'label':_0x1bfffc(0x1eb),'ok':!![],'detail':_0x1bfffc(0x1e6)};const {pkgPath:_0x4b9baf,currentVersion:_0xbd3b9d,field:_0x5442f3}=_0xc7a0ac[_0x1bfffc(0x214)];try{const _0x3a2bb4=readFileSync(_0x4b9baf,_0x1bfffc(0x216)),_0x5c542c=JSON[_0x1bfffc(0x21b)](_0x3a2bb4);return _0x5c542c[_0x5442f3][_0x1bfffc(0x1f1)]=_0x1bfffc(0x206),writeFileSync(_0x4b9baf,JSON[_0x1bfffc(0x1f7)](_0x5c542c,null,0x2)+'\x0a',_0x1bfffc(0x216)),{'step':0x1,'label':_0x1bfffc(0x1eb),'ok':!![],'detail':_0x5442f3+'[\x22@lovrabet/sdk\x22]:\x20'+_0xbd3b9d+'\x20→\x20latest'};}catch(_0x1f3c4f){return{'step':0x1,'label':_0x1bfffc(0x1eb),'ok':![],'detail':_0x1f3c4f instanceof Error?_0x1f3c4f[_0x1bfffc(0x1d6)]:String(_0x1f3c4f)};}}function printSummary(_0xdf220e){const _0x227ed8=a229_0x4869;console[_0x227ed8(0x1dd)](''),console['log'](a229_0x2a1714[_0x227ed8(0x1e2)](_0x227ed8(0x217))),console[_0x227ed8(0x1dd)]('');for(const _0x1971a1 of _0xdf220e){const _0x3fa4e1=_0x1971a1['ok']?a229_0x2a1714['green']('OK'):a229_0x2a1714[_0x227ed8(0x1e3)](_0x227ed8(0x202));console['log']('\x20\x20'+_0x3fa4e1+'\x20\x20Step\x20'+_0x1971a1[_0x227ed8(0x219)]+':\x20'+_0x1971a1['label']);if(_0x1971a1['detail'])console['log'](_0x227ed8(0x203)+a229_0x2a1714[_0x227ed8(0x1e9)](_0x1971a1['detail']));}console['log']('');}export async function upgradeApp(_0x582c9b,_0x1d6c6a){const _0x5770e3=a229_0x4869,_0x3347cb=process['cwd'](),_0xde6587=analyseProjectUpgrade(_0x3347cb);if(!_0xde6587[_0x5770e3(0x214)]&&!_0xde6587[_0x5770e3(0x1e1)]['needed'])return console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x1f0)](_0x5770e3(0x21e))),{'analysis':_0xde6587,'steps':[],'completed':!![]};printReport(_0xde6587);const _0x13fdb4=!!(_0x1d6c6a[_0x5770e3(0x208)]||_0x1d6c6a['Y']||_0x582c9b);if(!_0x13fdb4)try{const _0x2f12b9=await askConfirm(_0x5770e3(0x1fd));if(!_0x2f12b9)return console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x1e9)]('Upgrade\x20cancelled.')),{'analysis':_0xde6587,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x265241){if(_0x265241?.[_0x5770e3(0x1d6)]===_0x5770e3(0x1de))return console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x1e9)](_0x5770e3(0x1da))),{'analysis':_0xde6587,'steps':[],'completed':![],'cancelled':!![]};throw _0x265241;}const _0x7f900f=[],_0xcd639c=a229_0x5c9faa({'text':_0x5770e3(0x1f2),'color':'cyan'})['start'](),_0x44c46b=execUpgradeSdk(_0xde6587);_0x7f900f[_0x5770e3(0x1e4)](_0x44c46b),_0xcd639c[_0x44c46b['ok']?_0x5770e3(0x20e):_0x5770e3(0x20a)](_0x5770e3(0x1d2)+(_0x44c46b['detail']??(_0x44c46b['ok']?_0x5770e3(0x1ee):_0x5770e3(0x1fa))));const _0x19bfdd=a229_0x5c9faa({'text':_0x5770e3(0x205),'color':_0x5770e3(0x1e0)})['start']();let _0x49ca39;try{_0x49ca39=await upgradeProjectApiArchitecture(_0x3347cb);const _0x2b062d=_0x49ca39['manualMergeRequired']?_0x5770e3(0x21a):_0x5770e3(0x209);_0x19bfdd[_0x5770e3(0x20e)](_0x5770e3(0x20b)+_0x2b062d),_0x7f900f[_0x5770e3(0x1e4)]({'step':0x2,'label':_0x5770e3(0x207),'ok':!![],'detail':_0x2b062d});}catch(_0x1458e8){const _0xd52982=_0x1458e8 instanceof Error?_0x1458e8[_0x5770e3(0x1d6)]:String(_0x1458e8);_0x19bfdd[_0x5770e3(0x20a)](_0x5770e3(0x20b)+_0xd52982),_0x7f900f[_0x5770e3(0x1e4)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0xd52982});}printSummary(_0x7f900f);const _0x4d3db3=_0x7f900f[_0x5770e3(0x221)](_0x14444b=>!_0x14444b['ok']);if(_0x4d3db3)console[_0x5770e3(0x1dd)](a229_0x2a1714['yellow'](_0x5770e3(0x215)));else _0x49ca39?.['manualMergeRequired']?console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x1dc)](_0x5770e3(0x1f4))):console['log'](a229_0x2a1714[_0x5770e3(0x1f0)](_0x5770e3(0x1db)));return _0x44c46b['ok']&&_0xde6587[_0x5770e3(0x214)]&&(console[_0x5770e3(0x1dd)](''),console['log'](a229_0x2a1714['bold'][_0x5770e3(0x1e0)](_0x5770e3(0x1d9))),console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x1e0)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x5770e3(0x1dd)](''),console[_0x5770e3(0x1dd)](a229_0x2a1714['white'](_0x5770e3(0x220))),console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x20f)](_0x5770e3(0x218))),console[_0x5770e3(0x1dd)](a229_0x2a1714[_0x5770e3(0x20f)](_0x5770e3(0x211))),console['log']('')),{'analysis':_0xde6587,'steps':_0x7f900f,'apiArchitecture':_0x49ca39,'completed':!_0x4d3db3&&!_0x49ca39?.[_0x5770e3(0x1fc)]};}
@@ -1 +1 @@
1
- const a230_0x40f642=a230_0x1f90;(function(_0x123dcf,_0x5b4a4a){const _0x4f427e=a230_0x1f90,_0x1b52cf=_0x123dcf();while(!![]){try{const _0x1a5834=-parseInt(_0x4f427e(0x193))/0x1*(-parseInt(_0x4f427e(0x172))/0x2)+parseInt(_0x4f427e(0x16a))/0x3*(parseInt(_0x4f427e(0x143))/0x4)+parseInt(_0x4f427e(0x19d))/0x5*(parseInt(_0x4f427e(0x18b))/0x6)+parseInt(_0x4f427e(0x190))/0x7+parseInt(_0x4f427e(0x175))/0x8+parseInt(_0x4f427e(0x15c))/0x9+parseInt(_0x4f427e(0x176))/0xa*(-parseInt(_0x4f427e(0x17f))/0xb);if(_0x1a5834===_0x5b4a4a)break;else _0x1b52cf['push'](_0x1b52cf['shift']());}catch(_0x57532c){_0x1b52cf['push'](_0x1b52cf['shift']());}}}(a230_0x2331,0xf1537));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';function a230_0x1f90(_0x3488ac,_0x30ea5f){_0x3488ac=_0x3488ac-0x13a;const _0x233192=a230_0x2331();let _0x1f9087=_0x233192[_0x3488ac];return _0x1f9087;}import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';function a230_0x2331(){const _0x182e25=['rabetbase\x20menu\x20asset-update','permit:role-apis-set','data:getOne','rabetbase\x20page\x20custom-update','knowledge-base:detail','app:assets-update','project:init','start','preview','12602574Thjuzg','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','create','description','Notification\x20Configuration','has','Instant\x20API\x20Policy','data:filter','Async\x20Tasks','page:react-publish','Platform\x20Issue','page:custom-create','rabetbase\x20app\x20list\x20--remote','59673jdYJtJ','skill:','rabetbase\x20kb\x20update','rabetbase\x20kb\x20create','User\x20Accounts','push','Approval\x20Flows','Menu','439384SOKSlK','app:remove','Deployment','11019856MaSCLE','427240TkXeBw','get','knowledge-base:delete','`\x20has\x20been\x20removed.','app:use','login','page:react-update','rabetbase\x20kb\x20detail','Database\x20Connections','1177kUuaHs','app:remote','rabetbase\x20page\x20custom-detail','rabetbase\x20auth\x20logout','Run\x20Scripts','Tenant\x20Members','rabetbase\x20page\x20custom-publish','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','rabetbase\x20run\x20preview','permit:page-get','Diagnostics','rabetbase\x20workspace\x20remove\x20<name>','1860618EWvLRo','rabetbase\x20kb\x20list','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','rabetbase\x20sql\x20create','Authentication','583562hCuOtf','CLI\x20Built-in\x20Skill','Schema','2vuIcmB','knowledge-base:update','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Configuration','Workspace','from','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','service','SQL\x20Queries','5lRCSSs','risk','rabetbase\x20role\x20list','read','Project','build','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','wildcardDef','role:create','map','\x20\x20[high-risk-write]','command','Run\x20any\x20package.json\x20script','flow:disable','API\x20Development','Company\x20Knowledge\x20Base','defaultCommand','skills:','filter','app:assets-status','rabetbase\x20cli-skill\x20install','menu:update','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','Code\x20Generation','write','\x20\x20[','rabetbase\x20kb\x20delete','rabetbase\x20run\x20build','dataset:generate-start','rabetbase\x20bff\x20create','Runtime\x20App\x20Config\x20Management','skill:install','Dataset\x20&\x20Operations','rabetbase\x20page\x20data-list-status','deployment:sync','bff:new','page:react-list','dataset:generate-status','392LcuQpF','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','App\x20Management','set','Roles','isSingleCommand','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','sql:save','Self\x20Update','permit:page-set','permit:role-menus-set','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','length','knowledge-base:create','Agent\x20Context\x20Rules'];a230_0x2331=function(){return _0x182e25;};return a230_0x2331();}import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x575ac2){const _0x4a9489=a230_0x1f90;for(const _0x5ca8dc of _0x575ac2){definitions[_0x4a9489(0x146)](_0x5ca8dc[_0x4a9489(0x19b)]+':'+_0x5ca8dc[_0x4a9489(0x1a8)],_0x5ca8dc);let _0x3010fc=serviceGroups['get'](_0x5ca8dc[_0x4a9489(0x19b)]);!_0x3010fc&&(_0x3010fc=[],serviceGroups['set'](_0x5ca8dc[_0x4a9489(0x19b)],_0x3010fc)),_0x3010fc[_0x4a9489(0x16f)](_0x5ca8dc);}}function registerDeclarativeService(_0x52923b,_0x31be19,_0x3cad2d){const _0x320479=a230_0x1f90;registerDefinitions(_0x31be19);_0x3cad2d?.[_0x320479(0x1a4)]&&registerDefinitions([_0x3cad2d['wildcardDef']]);const _0x451c1d=_0x15d393=>_0x15d393===_0x320479(0x1a0)?'':_0x15d393===_0x320479(0x1b5)?'\x20\x20[write]':_0x320479(0x1a7),_0x32279f={'service':_0x31be19[0x0][_0x320479(0x19b)],'label':_0x52923b,'commands':_0x31be19[_0x320479(0x1af)](_0x456f6a=>!_0x456f6a['hidden'])[_0x320479(0x1a6)](_0x8c2dab=>({'command':_0x8c2dab[_0x320479(0x1a8)],'description':_0x8c2dab[_0x320479(0x160)],'tag':_0x451c1d(_0x8c2dab[_0x320479(0x19e)])})),'declarative':!![],'defaultCommand':_0x3cad2d?.[_0x320479(0x1ad)]??(_0x3cad2d?.[_0x320479(0x148)]?_0x31be19[0x0][_0x320479(0x1a8)]:undefined),'wildcardDef':_0x3cad2d?.['wildcardDef'],'isSingleCommand':_0x3cad2d?.['isSingleCommand']};serviceRegistry[_0x320479(0x16f)](_0x32279f),serviceByName[_0x320479(0x146)](_0x32279f[_0x320479(0x19b)],_0x32279f);}registerDeclarativeService(a230_0x40f642(0x1a1),projectDefinitions),registerDeclarativeService(a230_0x40f642(0x197),workspaceDefinitions),registerDeclarativeService(a230_0x40f642(0x145),appDefinitions),registerDeclarativeService(a230_0x40f642(0x18f),authDefinitions,{'defaultCommand':a230_0x40f642(0x17b)}),registerDeclarativeService(a230_0x40f642(0x184),tenantDefinitions),registerDeclarativeService(a230_0x40f642(0x16e),userAccountDefinitions),registerDeclarativeService(a230_0x40f642(0x13d),datasetDefinitions),registerDeclarativeService(a230_0x40f642(0x195),pageDefinitions),registerDeclarativeService(a230_0x40f642(0x1ab),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a230_0x40f642(0x163),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x40f642(0x161),notificationDefinitions),registerDeclarativeService(a230_0x40f642(0x19c),sqlDefinitions),registerDeclarativeService(a230_0x40f642(0x17e),dbDefinitions),registerDeclarativeService(a230_0x40f642(0x174),deploymentDefinitions),registerDeclarativeService(a230_0x40f642(0x171),menuDefinitions),registerDeclarativeService(a230_0x40f642(0x165),taskDefinitions),registerDeclarativeService(a230_0x40f642(0x147),roleDefinitions),registerDeclarativeService(a230_0x40f642(0x13b),appConfigDefinitions),registerDeclarativeService(a230_0x40f642(0x1ac),kbDefinitions),registerDeclarativeService(a230_0x40f642(0x152),ruleDefinitions),registerDeclarativeService(a230_0x40f642(0x167),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a230_0x40f642(0x1b4),codegenDefinitions),registerDeclarativeService(a230_0x40f642(0x196),configDefinitions),registerDeclarativeService(a230_0x40f642(0x189),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x192),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x14c),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x191),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a230_0x40f642(0x170),flowDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a230_0x40f642(0x183),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x40f642(0x150)]-0x1];last['commands']=[{'command':'<script>','description':a230_0x40f642(0x1a9),'tag':a230_0x40f642(0x1b6)+runDefinition['risk']+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x40f642(0x1b9),a230_0x40f642(0x1b3)],[a230_0x40f642(0x142),'rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>'],[a230_0x40f642(0x14b),a230_0x40f642(0x144)],[a230_0x40f642(0x140),a230_0x40f642(0x13a)],['sql:new',a230_0x40f642(0x18e)],[a230_0x40f642(0x1b2),a230_0x40f642(0x153)],[a230_0x40f642(0x159),a230_0x40f642(0x14f)],[a230_0x40f642(0x16b),'rabetbase\x20cli-skill\x20install'],[a230_0x40f642(0x13c),'rabetbase\x20cli-skill\x20install'],[a230_0x40f642(0x1ae),'rabetbase\x20cli-skill\x20install'],['skills:install',a230_0x40f642(0x1b1)],[a230_0x40f642(0x1b0),a230_0x40f642(0x199)],[a230_0x40f642(0x158),a230_0x40f642(0x18d)],[a230_0x40f642(0x180),a230_0x40f642(0x169)],[a230_0x40f642(0x17a),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add',a230_0x40f642(0x15d)],[a230_0x40f642(0x173),a230_0x40f642(0x18a)],['knowledge-base:list',a230_0x40f642(0x18c)],[a230_0x40f642(0x157),a230_0x40f642(0x17d)],[a230_0x40f642(0x151),a230_0x40f642(0x16d)],[a230_0x40f642(0x194),a230_0x40f642(0x16c)],[a230_0x40f642(0x178),a230_0x40f642(0x1b7)],[a230_0x40f642(0x1a5),a230_0x40f642(0x19f)],[a230_0x40f642(0x164),a230_0x40f642(0x19a)],[a230_0x40f642(0x155),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],['page:standard-page-status',a230_0x40f642(0x13e)],['page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a230_0x40f642(0x168),a230_0x40f642(0x14a)],[a230_0x40f642(0x141),'rabetbase\x20page\x20custom-list'],['page:react-detail',a230_0x40f642(0x181)],[a230_0x40f642(0x17c),a230_0x40f642(0x156)],[a230_0x40f642(0x166),a230_0x40f642(0x185)]]),REMOVED_COMMAND_HINTS=new Map([['flow:enable',a230_0x40f642(0x15e)],[a230_0x40f642(0x1aa),a230_0x40f642(0x15e)],[a230_0x40f642(0x13f),a230_0x40f642(0x186)],[a230_0x40f642(0x188),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x40f642(0x14d),a230_0x40f642(0x1a3)],['permit:role-menus','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x40f642(0x14e),a230_0x40f642(0x1a3)],[a230_0x40f642(0x154),a230_0x40f642(0x1a3)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x40f642(0x15f),a230_0x40f642(0x149)],[a230_0x40f642(0x15a),'rabetbase\x20run\x20start'],[a230_0x40f642(0x1a2),a230_0x40f642(0x1b8)],[a230_0x40f642(0x15b),a230_0x40f642(0x187)],['logout',a230_0x40f642(0x182)]]);export function resolveRemovedCommand(_0x32a55f,_0x3dfe84){const _0x18587a=a230_0x40f642;if(!_0x32a55f)return undefined;const _0x44ca2=REMOVED_COMMAND_REPLACEMENTS[_0x18587a(0x177)](_0x32a55f+':'+(_0x3dfe84??'')),_0x41b3f7=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x32a55f),_0x398086=_0x44ca2??_0x41b3f7,_0x38716d=REMOVED_COMMAND_HINTS[_0x18587a(0x177)](_0x32a55f+':'+(_0x3dfe84??''));if(!_0x398086&&!_0x38716d)return undefined;const _0x35fe6=_0x41b3f7?_0x32a55f:_0x3dfe84?_0x32a55f+'\x20'+_0x3dfe84:_0x32a55f;return{'command':_0x35fe6,'message':'`rabetbase\x20'+_0x35fe6+_0x18587a(0x179),'hint':_0x38716d??'Use\x20`'+_0x398086+'`\x20instead.'};}export function findDefinition(_0x226bbb,_0x9f7b84){const _0x482b41=a230_0x40f642;return definitions[_0x482b41(0x177)](_0x226bbb+':'+_0x9f7b84);}export function isKnownService(_0x2a32e9){const _0x401f34=a230_0x40f642;return serviceByName[_0x401f34(0x162)](_0x2a32e9);}export function isDeclarativeService(_0x17de4d){const _0x439cf8=a230_0x40f642;return serviceGroups[_0x439cf8(0x162)](_0x17de4d)||serviceByName[_0x439cf8(0x177)](_0x17de4d)?.[_0x439cf8(0x1a4)]!==undefined;}export function getServiceEntry(_0x3d28e0){const _0x3a7c62=a230_0x40f642;return serviceByName[_0x3a7c62(0x177)](_0x3d28e0);}export function getLegacyHandler(_0x26e00d,_0x52d751){return undefined;}export function getAllDefinitions(){const _0x35dcaf=a230_0x40f642;return Array[_0x35dcaf(0x198)](definitions['values']());}
1
+ const a230_0x1902a0=a230_0x4022;(function(_0x2180f6,_0xd621e6){const _0x2dfc20=a230_0x4022,_0x44f875=_0x2180f6();while(!![]){try{const _0x90828e=parseInt(_0x2dfc20(0xde))/0x1+parseInt(_0x2dfc20(0xe8))/0x2*(parseInt(_0x2dfc20(0xfa))/0x3)+parseInt(_0x2dfc20(0x116))/0x4*(-parseInt(_0x2dfc20(0x123))/0x5)+parseInt(_0x2dfc20(0x11d))/0x6*(-parseInt(_0x2dfc20(0x145))/0x7)+parseInt(_0x2dfc20(0x117))/0x8*(parseInt(_0x2dfc20(0xfc))/0x9)+parseInt(_0x2dfc20(0x144))/0xa+parseInt(_0x2dfc20(0x146))/0xb*(-parseInt(_0x2dfc20(0xf0))/0xc);if(_0x90828e===_0xd621e6)break;else _0x44f875['push'](_0x44f875['shift']());}catch(_0x101d8f){_0x44f875['push'](_0x44f875['shift']());}}}(a230_0x4d4b,0x649ee));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';function a230_0x4d4b(){const _0x5be7db=['map','rabetbase\x20kb\x20list','rabetbase\x20kb\x20delete','page:custom-create','`\x20instead.','459014caIYSG','dataset:generate-start','project:init','User\x20Accounts','login','build','\x20\x20[write]','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','1704QoRTWT','wildcardDef','Run\x20any\x20package.json\x20script','`rabetbase\x20','rabetbase\x20cli-skill\x20install','role:create','rabetbase\x20page\x20data-list-status','get','knowledge-base:create','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','6MmgQBF','app:assets-update','53379cYjgku','has','rabetbase\x20sql\x20create','rabetbase\x20auth\x20logout','knowledge-base:list','rabetbase\x20run\x20start','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','length','rabetbase\x20app\x20list\x20--remote','App\x20Management','rabetbase\x20kb\x20update','<script>','description','`\x20has\x20been\x20removed.','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','start','permit:role-menus','Roles','Self\x20Update','page:standard-page-status','permit:role-apis-set','Notification\x20Configuration','rabetbase\x20workspace\x20use\x20--app\x20<name>','Platform\x20Issue','app:remove','page:react-detail','4XslMas','440gDGAFl','app:assets-status','show','CLI\x20Built-in\x20Skill','defaultCommand','SQL\x20Queries','96wNXsgg','Approval\x20Flows','Company\x20Knowledge\x20Base','flow:disable','page:react-create','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','1279295TBkoks','bff:new','rabetbase\x20page\x20custom-update','Tenant\x20Members','sql:new','app:use','skill:','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','Diagnostics','\x20\x20[high-risk-write]','service','Instant\x20API\x20Policy','isSingleCommand','rabetbase\x20kb\x20detail','Workspace','knowledge-base:delete','command','Agent\x20Context\x20Rules','permit:role-menus-set','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','OCR','create','Authentication','app:remote','rabetbase\x20run\x20preview','\x20\x20[','set','deployment:sync','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','Project','rabetbase\x20page\x20custom-publish','rabetbase\x20role\x20list','logout','2630090tuxVAJ','286503OrYAPp','39182cFQRfG','filter','rabetbase\x20page\x20custom-list','values','hidden','rabetbase\x20kb\x20create','sql:save','rabetbase\x20bff\x20create','data:filter','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','skill:install','preview','skills:install','API\x20Development','read','permit:page-set','permit:page-get','Async\x20Tasks','rabetbase\x20menu\x20asset-update','page:react-list','risk','Dataset\x20&\x20Operations','rabetbase\x20project\x20create\x20<project-name>','Backend\x20Function\x20Scripts','780441QGubYJ','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','Code\x20Generation','flow:enable','Use\x20`'];a230_0x4d4b=function(){return _0x5be7db;};return a230_0x4d4b();}import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';function a230_0x4022(_0x2fee3f,_0x398b02){_0x2fee3f=_0x2fee3f-0xd0;const _0x4d4b8d=a230_0x4d4b();let _0x402225=_0x4d4b8d[_0x2fee3f];return _0x402225;}import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x23e173){const _0x59237b=a230_0x4022;for(const _0x4809f8 of _0x23e173){definitions[_0x59237b(0x13d)](_0x4809f8[_0x59237b(0x12d)]+':'+_0x4809f8['command'],_0x4809f8);let _0x17219e=serviceGroups[_0x59237b(0xf7)](_0x4809f8[_0x59237b(0x12d)]);!_0x17219e&&(_0x17219e=[],serviceGroups[_0x59237b(0x13d)](_0x4809f8[_0x59237b(0x12d)],_0x17219e)),_0x17219e['push'](_0x4809f8);}}function registerDeclarativeService(_0x46f541,_0x490148,_0x22695a){const _0xc51ea8=a230_0x4022;registerDefinitions(_0x490148);_0x22695a?.[_0xc51ea8(0xf1)]&&registerDefinitions([_0x22695a['wildcardDef']]);const _0x387601=_0x446c49=>_0x446c49===_0xc51ea8(0xd4)?'':_0x446c49==='write'?_0xc51ea8(0xee):_0xc51ea8(0x12c),_0x5d7d9a={'service':_0x490148[0x0][_0xc51ea8(0x12d)],'label':_0x46f541,'commands':_0x490148[_0xc51ea8(0x147)](_0x3d7894=>!_0x3d7894[_0xc51ea8(0x14a)])[_0xc51ea8(0xe3)](_0x2f9413=>({'command':_0x2f9413[_0xc51ea8(0x133)],'description':_0x2f9413[_0xc51ea8(0x108)],'tag':_0x387601(_0x2f9413[_0xc51ea8(0xda)])})),'declarative':!![],'defaultCommand':_0x22695a?.[_0xc51ea8(0x11b)]??(_0x22695a?.[_0xc51ea8(0x12f)]?_0x490148[0x0][_0xc51ea8(0x133)]:undefined),'wildcardDef':_0x22695a?.[_0xc51ea8(0xf1)],'isSingleCommand':_0x22695a?.[_0xc51ea8(0x12f)]};serviceRegistry['push'](_0x5d7d9a),serviceByName[_0xc51ea8(0x13d)](_0x5d7d9a[_0xc51ea8(0x12d)],_0x5d7d9a);}registerDeclarativeService(a230_0x1902a0(0x140),projectDefinitions),registerDeclarativeService(a230_0x1902a0(0x131),workspaceDefinitions),registerDeclarativeService(a230_0x1902a0(0x105),appDefinitions),registerDeclarativeService(a230_0x1902a0(0x139),authDefinitions,{'defaultCommand':a230_0x1902a0(0xec)}),registerDeclarativeService(a230_0x1902a0(0x126),tenantDefinitions),registerDeclarativeService(a230_0x1902a0(0xeb),userAccountDefinitions),registerDeclarativeService(a230_0x1902a0(0xdb),datasetDefinitions),registerDeclarativeService(a230_0x1902a0(0xf9),pageDefinitions),registerDeclarativeService(a230_0x1902a0(0xd3),apiDefinitions),registerDeclarativeService(a230_0x1902a0(0xdd),bffDefinitions),registerDeclarativeService(a230_0x1902a0(0x12e),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x1902a0(0x111),notificationDefinitions),registerDeclarativeService(a230_0x1902a0(0x11c),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a230_0x1902a0(0xd7),taskDefinitions),registerDeclarativeService(a230_0x1902a0(0x10d),roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a230_0x1902a0(0x11f),kbDefinitions),registerDeclarativeService(a230_0x1902a0(0x134),ruleDefinitions),registerDeclarativeService(a230_0x1902a0(0x113),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a230_0x1902a0(0x137),ocrDefinitions),registerDeclarativeService(a230_0x1902a0(0xe0),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a230_0x1902a0(0x12b),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x1902a0(0x10e),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x1902a0(0x11a),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a230_0x1902a0(0x11e),flowDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a230_0x1902a0(0x119)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x1902a0(0x103)]-0x1];last['commands']=[{'command':a230_0x1902a0(0x107),'description':a230_0x1902a0(0xf2),'tag':a230_0x1902a0(0x13c)+runDefinition[a230_0x1902a0(0xda)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x1902a0(0xe9),'rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>'],['dataset:generate-status',a230_0x1902a0(0x102)],[a230_0x1902a0(0x14c),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a230_0x1902a0(0x124),a230_0x1902a0(0x14d)],[a230_0x1902a0(0x127),a230_0x1902a0(0xfe)],['menu:update',a230_0x1902a0(0xd8)],[a230_0x1902a0(0xea),a230_0x1902a0(0x12a)],[a230_0x1902a0(0x129),a230_0x1902a0(0xf4)],[a230_0x1902a0(0xd0),a230_0x1902a0(0xf4)],['skills:','rabetbase\x20cli-skill\x20install'],[a230_0x1902a0(0xd2),a230_0x1902a0(0xf4)],[a230_0x1902a0(0x118),a230_0x1902a0(0x122)],[a230_0x1902a0(0xfb),a230_0x1902a0(0xdf)],[a230_0x1902a0(0x13a),a230_0x1902a0(0x104)],[a230_0x1902a0(0x128),a230_0x1902a0(0x112)],['app:add','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a230_0x1902a0(0x114),'rabetbase\x20workspace\x20remove\x20<name>'],[a230_0x1902a0(0x100),a230_0x1902a0(0xe4)],['knowledge-base:detail',a230_0x1902a0(0x130)],[a230_0x1902a0(0xf8),a230_0x1902a0(0x14b)],['knowledge-base:update',a230_0x1902a0(0x106)],[a230_0x1902a0(0x132),a230_0x1902a0(0xe5)],[a230_0x1902a0(0xf5),a230_0x1902a0(0x142)],[a230_0x1902a0(0x14e),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],['data:getOne',a230_0x1902a0(0xef)],[a230_0x1902a0(0x10f),a230_0x1902a0(0xf6)],[a230_0x1902a0(0x121),a230_0x1902a0(0x14f)],[a230_0x1902a0(0xe6),a230_0x1902a0(0x14f)],[a230_0x1902a0(0xd9),a230_0x1902a0(0x148)],[a230_0x1902a0(0x115),'rabetbase\x20page\x20custom-detail'],['page:react-update',a230_0x1902a0(0x125)],['page:react-publish',a230_0x1902a0(0x141)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0x1902a0(0xe1),a230_0x1902a0(0x13f)],[a230_0x1902a0(0x120),a230_0x1902a0(0x13f)],[a230_0x1902a0(0x13e),a230_0x1902a0(0x136)],[a230_0x1902a0(0xd6),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x1902a0(0xd5),a230_0x1902a0(0x10a)],[a230_0x1902a0(0x10c),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x1902a0(0x135),a230_0x1902a0(0x10a)],[a230_0x1902a0(0x110),a230_0x1902a0(0x10a)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x1902a0(0x138),a230_0x1902a0(0xdc)],[a230_0x1902a0(0x10b),a230_0x1902a0(0x101)],[a230_0x1902a0(0xed),'rabetbase\x20run\x20build'],[a230_0x1902a0(0xd1),a230_0x1902a0(0x13b)],[a230_0x1902a0(0x143),a230_0x1902a0(0xff)]]);export function resolveRemovedCommand(_0xb5a99b,_0x346203){const _0x32421e=a230_0x1902a0;if(!_0xb5a99b)return undefined;const _0x2532e6=REMOVED_COMMAND_REPLACEMENTS[_0x32421e(0xf7)](_0xb5a99b+':'+(_0x346203??'')),_0x514829=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x32421e(0xf7)](_0xb5a99b),_0x3089ef=_0x2532e6??_0x514829,_0x2ae73b=REMOVED_COMMAND_HINTS[_0x32421e(0xf7)](_0xb5a99b+':'+(_0x346203??''));if(!_0x3089ef&&!_0x2ae73b)return undefined;const _0x656bd8=_0x514829?_0xb5a99b:_0x346203?_0xb5a99b+'\x20'+_0x346203:_0xb5a99b;return{'command':_0x656bd8,'message':_0x32421e(0xf3)+_0x656bd8+_0x32421e(0x109),'hint':_0x2ae73b??_0x32421e(0xe2)+_0x3089ef+_0x32421e(0xe7)};}export function findDefinition(_0x4e2fd5,_0x51f2eb){const _0x426259=a230_0x1902a0;return definitions[_0x426259(0xf7)](_0x4e2fd5+':'+_0x51f2eb);}export function isKnownService(_0xa6876b){const _0x4b570d=a230_0x1902a0;return serviceByName[_0x4b570d(0xfd)](_0xa6876b);}export function isDeclarativeService(_0x552b7a){const _0x5b0af9=a230_0x1902a0;return serviceGroups[_0x5b0af9(0xfd)](_0x552b7a)||serviceByName['get'](_0x552b7a)?.[_0x5b0af9(0xf1)]!==undefined;}export function getServiceEntry(_0xfcbb28){const _0x3d9524=a230_0x1902a0;return serviceByName[_0x3d9524(0xf7)](_0xfcbb28);}export function getLegacyHandler(_0x5e8516,_0x332a4f){return undefined;}export function getAllDefinitions(){const _0x3ae166=a230_0x1902a0;return Array['from'](definitions[_0x3ae166(0x149)]());}
@@ -1 +1 @@
1
- const a231_0x174704=a231_0x51ac;(function(_0x30741e,_0x3c4e45){const _0x3290eb=a231_0x51ac,_0x384b89=_0x30741e();while(!![]){try{const _0x3904c9=-parseInt(_0x3290eb(0xc7))/0x1*(parseInt(_0x3290eb(0xc2))/0x2)+-parseInt(_0x3290eb(0xc6))/0x3+parseInt(_0x3290eb(0xc0))/0x4*(parseInt(_0x3290eb(0xbd))/0x5)+-parseInt(_0x3290eb(0xbc))/0x6+parseInt(_0x3290eb(0xce))/0x7+parseInt(_0x3290eb(0xd2))/0x8*(parseInt(_0x3290eb(0xd1))/0x9)+-parseInt(_0x3290eb(0xc4))/0xa*(-parseInt(_0x3290eb(0xd0))/0xb);if(_0x3904c9===_0x3c4e45)break;else _0x384b89['push'](_0x384b89['shift']());}catch(_0x141f93){_0x384b89['push'](_0x384b89['shift']());}}}(a231_0x2173,0xcbb61));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a231_0x51ac(_0x293adb,_0x3a3cc1){_0x293adb=_0x293adb-0xba;const _0x217352=a231_0x2173();let _0x51ac75=_0x217352[_0x293adb];return _0x51ac75;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a231_0x2173(){const _0x4a6cbd=['num','roleName','dev','705824UfLsGs','high-risk-write','106315arXrWd','10050813pumVQG','8yTKPkJ','appCode','role','874926VdlXQp','848270jdkBoA','Deleted\x20role\x20','userCount','20vlUxZw','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','1564636FSojED','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','660jCpcbx','POST','476673lxkkpi','2FqyakG','\x20(id=','Role\x20still\x20has\x20','delete'];a231_0x2173=function(){return _0x4a6cbd;};return a231_0x2173();}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a231_0x174704(0xbb),'command':a231_0x174704(0xca),'description':a231_0x174704(0xc3),'risk':a231_0x174704(0xcf),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x125180){const _0x1972a5=a231_0x174704,_0x2ed68e=_0x125180[_0x1972a5(0xcb)]('id'),_0x19bd60=await getRoleById(_0x125180['appCode'],_0x2ed68e);return assertCustomRole(_0x19bd60,'delete'),asDryRunResult({'scope':'dev','operation':_0x1972a5(0xca),'selector':{'appCode':_0x125180[_0x1972a5(0xba)],'roleId':_0x2ed68e,'roleName':_0x19bd60[_0x1972a5(0xcc)]},'before':projectRole(_0x19bd60),'after':null,'dryRun':!![],'backend':{'method':_0x1972a5(0xc5),'path':DELETE_PATH},'warnings':_0x19bd60[_0x1972a5(0xbf)]>0x0?[_0x1972a5(0xc9)+_0x19bd60['userCount']+_0x1972a5(0xc1)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0xb05b10){const _0x5b9c8a=a231_0x174704,_0x37c480=_0xb05b10['num']('id'),_0x35da55=await getRoleById(_0xb05b10['appCode'],_0x37c480);return assertCustomRole(_0x35da55,'delete'),await deleteAppRole(_0x37c480),{'ok':!![],'data':{'scope':_0x5b9c8a(0xcd),'operation':'delete','selector':{'appCode':_0xb05b10['appCode'],'roleId':_0x37c480,'roleName':_0x35da55[_0x5b9c8a(0xcc)]},'before':projectRole(_0x35da55),'after':null,'dryRun':![],'backend':{'method':_0x5b9c8a(0xc5),'path':DELETE_PATH},'warnings':[]},'message':_0x5b9c8a(0xbe)+_0x35da55[_0x5b9c8a(0xcc)]+_0x5b9c8a(0xc8)+_0x37c480+')'};}};
1
+ const a231_0x1a26bf=a231_0x29b2;(function(_0x4933ca,_0x31fbda){const _0x189bb5=a231_0x29b2,_0x50b243=_0x4933ca();while(!![]){try{const _0x4d2f6c=-parseInt(_0x189bb5(0x184))/0x1+-parseInt(_0x189bb5(0x186))/0x2+-parseInt(_0x189bb5(0x193))/0x3*(-parseInt(_0x189bb5(0x188))/0x4)+-parseInt(_0x189bb5(0x191))/0x5*(-parseInt(_0x189bb5(0x18c))/0x6)+-parseInt(_0x189bb5(0x187))/0x7*(parseInt(_0x189bb5(0x18f))/0x8)+parseInt(_0x189bb5(0x189))/0x9*(-parseInt(_0x189bb5(0x183))/0xa)+parseInt(_0x189bb5(0x18a))/0xb;if(_0x4d2f6c===_0x31fbda)break;else _0x50b243['push'](_0x50b243['shift']());}catch(_0x227c9c){_0x50b243['push'](_0x50b243['shift']());}}}(a231_0x52df,0x74da0));function a231_0x52df(){const _0x3a267c=['num','role','23216loToOW','\x20(id=','10RQcfef','dev','1152504ArplAZ','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','Role\x20still\x20has\x20','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','Deleted\x20role\x20','appCode','delete','/smartapi/permit/role/delete','202390kjOkAj','739360aGiGuq','POST','643448fdpuuw','2086csBmko','8vXUHVh','252STYhiI','18827270mQsObL','roleName','1473870NvaBEG'];a231_0x52df=function(){return _0x3a267c;};return a231_0x52df();}import{deleteAppRole}from'../../core/api-client.js';function a231_0x29b2(_0x36e564,_0x28df0e){_0x36e564=_0x36e564-0x181;const _0x52df51=a231_0x52df();let _0x29b2da=_0x52df51[_0x36e564];return _0x29b2da;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a231_0x1a26bf(0x182);export const roleDelete={'service':a231_0x1a26bf(0x18e),'command':a231_0x1a26bf(0x181),'description':a231_0x1a26bf(0x197),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x594984){const _0x4de943=a231_0x1a26bf,_0x16723e=_0x594984[_0x4de943(0x18d)]('id'),_0x31492b=await getRoleById(_0x594984[_0x4de943(0x199)],_0x16723e);return assertCustomRole(_0x31492b,'delete'),asDryRunResult({'scope':_0x4de943(0x192),'operation':_0x4de943(0x181),'selector':{'appCode':_0x594984['appCode'],'roleId':_0x16723e,'roleName':_0x31492b['roleName']},'before':projectRole(_0x31492b),'after':null,'dryRun':!![],'backend':{'method':_0x4de943(0x185),'path':DELETE_PATH},'warnings':_0x31492b[_0x4de943(0x194)]>0x0?[_0x4de943(0x196)+_0x31492b[_0x4de943(0x194)]+_0x4de943(0x195)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x23518a){const _0xffccce=a231_0x1a26bf,_0x24388a=_0x23518a[_0xffccce(0x18d)]('id'),_0x3cf178=await getRoleById(_0x23518a[_0xffccce(0x199)],_0x24388a);return assertCustomRole(_0x3cf178,_0xffccce(0x181)),await deleteAppRole(_0x24388a),{'ok':!![],'data':{'scope':_0xffccce(0x192),'operation':_0xffccce(0x181),'selector':{'appCode':_0x23518a[_0xffccce(0x199)],'roleId':_0x24388a,'roleName':_0x3cf178[_0xffccce(0x18b)]},'before':projectRole(_0x3cf178),'after':null,'dryRun':![],'backend':{'method':_0xffccce(0x185),'path':DELETE_PATH},'warnings':[]},'message':_0xffccce(0x198)+_0x3cf178[_0xffccce(0x18b)]+_0xffccce(0x190)+_0x24388a+')'};}};
@@ -1 +1 @@
1
- const a232_0x56c3dd=a232_0x4980;function a232_0x4980(_0x389e26,_0x3dcc21){_0x389e26=_0x389e26-0x19b;const _0x5574ee=a232_0x5574();let _0x4980a0=_0x5574ee[_0x389e26];return _0x4980a0;}(function(_0x55ac1a,_0x4c2e03){const _0x52502e=a232_0x4980,_0x275e0f=_0x55ac1a();while(!![]){try{const _0x4550de=-parseInt(_0x52502e(0x1a7))/0x1+parseInt(_0x52502e(0x19d))/0x2*(parseInt(_0x52502e(0x1a5))/0x3)+parseInt(_0x52502e(0x19c))/0x4+-parseInt(_0x52502e(0x1aa))/0x5*(parseInt(_0x52502e(0x19e))/0x6)+parseInt(_0x52502e(0x1ab))/0x7*(-parseInt(_0x52502e(0x1a3))/0x8)+-parseInt(_0x52502e(0x1a0))/0x9*(-parseInt(_0x52502e(0x1a6))/0xa)+parseInt(_0x52502e(0x19b))/0xb*(parseInt(_0x52502e(0x1a1))/0xc);if(_0x4550de===_0x4c2e03)break;else _0x275e0f['push'](_0x275e0f['shift']());}catch(_0x2d4ee6){_0x275e0f['push'](_0x275e0f['shift']());}}}(a232_0x5574,0x48ad1));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a232_0x5574(){const _0x389e86=['roleName','17811nrSdMz','1185020BeUDSE','465366XiUNTk','role','Show\x20a\x20single\x20role\x27s\x20detail','770mWSmkp','10563zVjpjN','3275349mWPEGf','1830632HKQyOw','2Tdndqb','22818sUsMem','read','27miLvNs','36BvmBKX','num','1928eBfWzr'];a232_0x5574=function(){return _0x389e86;};return a232_0x5574();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x56c3dd(0x1a8),'command':'detail','description':a232_0x56c3dd(0x1a9),'risk':a232_0x56c3dd(0x19f),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x295c3a){const _0x3de477=a232_0x56c3dd,_0x1730f6=_0x295c3a[_0x3de477(0x1a2)]('id'),_0x1f836c=await getRoleById(_0x295c3a['appCode'],_0x1730f6);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x1f836c)},'message':'Role\x20'+_0x1f836c[_0x3de477(0x1a4)]+'\x20('+_0x1f836c['roleType']+')'};}};
1
+ function a232_0x3410(_0x491fd9,_0x45844b){_0x491fd9=_0x491fd9-0x194;const _0x4ee679=a232_0x4ee6();let _0x34103c=_0x4ee679[_0x491fd9];return _0x34103c;}const a232_0x1df017=a232_0x3410;function a232_0x4ee6(){const _0x29f152=['2dlPwCq','14295630IZcNGp','50639732mWPwJJ','Role\x20','550446WwiVly','722143iRowwC','dev','detail','4GwLCoZ','651VgPYnG','roleName','140904bVSIFp','95GiENuV','appCode','3482658xZbbXw','3338067KrVTpF','read'];a232_0x4ee6=function(){return _0x29f152;};return a232_0x4ee6();}(function(_0x299b88,_0x252f85){const _0x280680=a232_0x3410,_0x44c7f9=_0x299b88();while(!![]){try{const _0x47d8d4=parseInt(_0x280680(0x199))/0x1*(-parseInt(_0x280680(0x194))/0x2)+parseInt(_0x280680(0x1a3))/0x3*(parseInt(_0x280680(0x19c))/0x4)+parseInt(_0x280680(0x1a0))/0x5*(parseInt(_0x280680(0x198))/0x6)+-parseInt(_0x280680(0x19d))/0x7*(-parseInt(_0x280680(0x19f))/0x8)+parseInt(_0x280680(0x1a2))/0x9+parseInt(_0x280680(0x195))/0xa+-parseInt(_0x280680(0x196))/0xb;if(_0x47d8d4===_0x252f85)break;else _0x44c7f9['push'](_0x44c7f9['shift']());}catch(_0x5db1a0){_0x44c7f9['push'](_0x44c7f9['shift']());}}}(a232_0x4ee6,0xf05e3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a232_0x1df017(0x19b),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a232_0x1df017(0x1a4),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x292e49){const _0x2a7753=a232_0x1df017,_0x5e8878=_0x292e49['num']('id'),_0x45a314=await getRoleById(_0x292e49[_0x2a7753(0x1a1)],_0x5e8878);return{'ok':!![],'data':{'scope':_0x2a7753(0x19a),'role':projectRole(_0x45a314)},'message':_0x2a7753(0x197)+_0x45a314[_0x2a7753(0x19e)]+'\x20('+_0x45a314['roleType']+')'};}};
@@ -1 +1 @@
1
- (function(_0x27fb7c,_0x1ebd2a){const _0x1b1623=a233_0x3123,_0x12eaf3=_0x27fb7c();while(!![]){try{const _0x38b2a1=parseInt(_0x1b1623(0xf4))/0x1*(parseInt(_0x1b1623(0xf6))/0x2)+-parseInt(_0x1b1623(0xf7))/0x3*(parseInt(_0x1b1623(0xf1))/0x4)+parseInt(_0x1b1623(0xf0))/0x5+-parseInt(_0x1b1623(0xf2))/0x6+parseInt(_0x1b1623(0xf5))/0x7+parseInt(_0x1b1623(0xef))/0x8*(-parseInt(_0x1b1623(0xf3))/0x9)+-parseInt(_0x1b1623(0xf8))/0xa;if(_0x38b2a1===_0x1ebd2a)break;else _0x12eaf3['push'](_0x12eaf3['shift']());}catch(_0x13a886){_0x12eaf3['push'](_0x12eaf3['shift']());}}}(a233_0x2404,0x64192));import{roleList}from'../../commands/role/list.js';function a233_0x3123(_0x2eefd8,_0x5ce8b7){_0x2eefd8=_0x2eefd8-0xef;const _0x24047a=a233_0x2404();let _0x31230c=_0x24047a[_0x2eefd8];return _0x31230c;}import{roleDetail}from'../../commands/role/detail.js';function a233_0x2404(){const _0x23cd4b=['434WiJQAj','3yMTOZI','2137040GSWSQw','8hOUzqV','598185oFBeSp','825152lqwUbC','622824BOHzWa','1647819jtwrBg','2721YObuzB','2847565ovgNjR'];a233_0x2404=function(){return _0x23cd4b;};return a233_0x2404();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x24d172,_0x14ccef){const _0x4a41dc=a233_0xfd6a,_0x2fb8f8=_0x24d172();while(!![]){try{const _0x3a3036=parseInt(_0x4a41dc(0xc8))/0x1+parseInt(_0x4a41dc(0xc9))/0x2*(-parseInt(_0x4a41dc(0xc6))/0x3)+-parseInt(_0x4a41dc(0xc5))/0x4*(parseInt(_0x4a41dc(0xcc))/0x5)+parseInt(_0x4a41dc(0xc4))/0x6+-parseInt(_0x4a41dc(0xc7))/0x7*(-parseInt(_0x4a41dc(0xca))/0x8)+parseInt(_0x4a41dc(0xcb))/0x9+parseInt(_0x4a41dc(0xc3))/0xa;if(_0x3a3036===_0x14ccef)break;else _0x2fb8f8['push'](_0x2fb8f8['shift']());}catch(_0x4eafe1){_0x2fb8f8['push'](_0x2fb8f8['shift']());}}}(a233_0x4a48,0x63582));function a233_0xfd6a(_0x5a371d,_0x426ea4){_0x5a371d=_0x5a371d-0xc3;const _0x4a48c=a233_0x4a48();let _0xfd6a8e=_0x4a48c[_0x5a371d];return _0xfd6a8e;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a233_0x4a48(){const _0xc5f504=['3674IRAXuv','40lgQpjI','5290569DaUGpF','535ZyQtVq','849890VECJbC','124920mMbyBV','17092uhgHzq','915StXzjj','478877SkQyMa','388705jzncOh'];a233_0x4a48=function(){return _0xc5f504;};return a233_0x4a48();}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a234_0x41a1a6=a234_0x3c0f;(function(_0x184054,_0x45ece2){const _0x556a47=a234_0x3c0f,_0x4b9f2c=_0x184054();while(!![]){try{const _0x18c559=-parseInt(_0x556a47(0x1ac))/0x1*(parseInt(_0x556a47(0x1b4))/0x2)+parseInt(_0x556a47(0x1bb))/0x3*(parseInt(_0x556a47(0x1cb))/0x4)+-parseInt(_0x556a47(0x1c7))/0x5*(-parseInt(_0x556a47(0x1ca))/0x6)+-parseInt(_0x556a47(0x1c5))/0x7+-parseInt(_0x556a47(0x1bd))/0x8+parseInt(_0x556a47(0x1c9))/0x9+parseInt(_0x556a47(0x1b3))/0xa;if(_0x18c559===_0x45ece2)break;else _0x4b9f2c['push'](_0x4b9f2c['shift']());}catch(_0x2a5ad1){_0x4b9f2c['push'](_0x4b9f2c['shift']());}}}(a234_0x560b,0xb1153));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a234_0x3c0f(_0x585719,_0x7bfcd9){_0x585719=_0x585719-0x1a9;const _0x560bb5=a234_0x560b();let _0x3c0f7d=_0x560bb5[_0x585719];return _0x3c0f7d;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x41a1a6(0x1c0),'DEV','OWNER',a234_0x41a1a6(0x1b6)];function a234_0x560b(){const _0x5a6c59=['toUpperCase','3SLuKis','page','7916632MJXvRf','number','length','ADMIN','Invalid\x20--type\x20\x22','num','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20index\x20(1-based)','9601123oxFoBg','list','2195iAzJxC','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','12565242vLlZQU','6474SZkpCK','3591932VePmXh','pagesize','type','validation','67874UAzmzp','str','role','Filter\x20by\x20role\x20type','Use\x20one\x20of:\x20','filter','trim','9974370izsjty','20Hnfjvu','read','CUSTOM','map','Found\x20','appCode'];a234_0x560b=function(){return _0x5a6c59;};return a234_0x560b();}export const roleList={'service':a234_0x41a1a6(0x1ae),'command':a234_0x41a1a6(0x1c6),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a234_0x41a1a6(0x1b5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x41a1a6(0x1aa),'type':'string','required':![],'description':a234_0x41a1a6(0x1af),'enum':ROLE_TYPES},{'name':a234_0x41a1a6(0x1bc),'type':a234_0x41a1a6(0x1be),'description':a234_0x41a1a6(0x1c4),'default':0x1},{'name':a234_0x41a1a6(0x1a9),'type':a234_0x41a1a6(0x1be),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x4344a1){const _0x29b18f=a234_0x41a1a6,_0x41289c=_0x4344a1[_0x29b18f(0x1ad)](_0x29b18f(0x1aa))[_0x29b18f(0x1b2)]();if(_0x41289c&&!ROLE_TYPES['includes'](_0x41289c[_0x29b18f(0x1ba)]()))throw CliErrors['validation'](_0x29b18f(0x1c1)+_0x41289c+'\x22.',_0x29b18f(0x1b0)+ROLE_TYPES['join'](',\x20')+'.');const _0x21e495=_0x4344a1[_0x29b18f(0x1c2)](_0x29b18f(0x1bc),0x1),_0x196a7f=_0x4344a1[_0x29b18f(0x1c2)]('pagesize',0x64);if(_0x21e495<0x1)throw CliErrors[_0x29b18f(0x1ab)](_0x29b18f(0x1c8));if(_0x196a7f<0x1||_0x196a7f>0x64)throw CliErrors[_0x29b18f(0x1ab)](_0x29b18f(0x1c3));},async 'execute'(_0xff2a29){const _0x59014c=a234_0x41a1a6,_0x27c4fb=_0xff2a29[_0x59014c(0x1c2)](_0x59014c(0x1bc),0x1)||0x1,_0xec843e=_0xff2a29[_0x59014c(0x1c2)](_0x59014c(0x1a9),0x64)||0x64,_0x399730=_0xff2a29['str']('type')['trim']()[_0x59014c(0x1ba)](),{items:_0x5eeaaa,paging:_0x1ce6f9}=await listAppRoles(_0xff2a29[_0x59014c(0x1b9)],{'currentPage':_0x27c4fb,'pageSize':_0xec843e}),_0x35eced=_0x399730?_0x5eeaaa[_0x59014c(0x1b1)](_0x83b26c=>_0x83b26c['roleType']===_0x399730):_0x5eeaaa,_0x2d838f=_0x35eced[_0x59014c(0x1b7)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x2d838f,'paging':_0x1ce6f9},'message':_0x59014c(0x1b8)+_0x2d838f[_0x59014c(0x1bf)]+'\x20role(s)'};}};
1
+ function a234_0x38bd(_0x402f8e,_0x27ed8c){_0x402f8e=_0x402f8e-0x16b;const _0x205056=a234_0x2050();let _0x38bd45=_0x205056[_0x402f8e];return _0x38bd45;}const a234_0x17de73=a234_0x38bd;(function(_0x27b3e6,_0x2df8ac){const _0x5dd33a=a234_0x38bd,_0x3af4c9=_0x27b3e6();while(!![]){try{const _0xb83c98=-parseInt(_0x5dd33a(0x16d))/0x1*(parseInt(_0x5dd33a(0x175))/0x2)+-parseInt(_0x5dd33a(0x176))/0x3+-parseInt(_0x5dd33a(0x187))/0x4*(parseInt(_0x5dd33a(0x188))/0x5)+-parseInt(_0x5dd33a(0x185))/0x6+-parseInt(_0x5dd33a(0x184))/0x7*(-parseInt(_0x5dd33a(0x16e))/0x8)+-parseInt(_0x5dd33a(0x18d))/0x9+-parseInt(_0x5dd33a(0x171))/0xa*(-parseInt(_0x5dd33a(0x179))/0xb);if(_0xb83c98===_0x2df8ac)break;else _0x3af4c9['push'](_0x3af4c9['shift']());}catch(_0x30b432){_0x3af4c9['push'](_0x3af4c9['shift']());}}}(a234_0x2050,0x91ddb));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x17de73(0x18a),a234_0x17de73(0x183),'OWNER',a234_0x17de73(0x17d)];function a234_0x2050(){const _0x5b92e1=['appCode','101gpeGQI','24cTUTPW','trim','str','30AJCVZt','\x20role(s)','toUpperCase','roleType','982ODOclp','3343338YuUdaV','filter','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','6564085yxmSPY','pagesize','Found\x20','validation','CUSTOM','Page\x20index\x20(1-based)','Use\x20one\x20of:\x20','read','num','number','DEV','1368962UQsYux','522654DYZUfh','Invalid\x20--type\x20\x22','32nbqnXG','152445YoOKDp','page','ADMIN','list','dev','2559402bWfSuy','includes','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','map'];a234_0x2050=function(){return _0x5b92e1;};return a234_0x2050();}export const roleList={'service':'role','command':a234_0x17de73(0x18b),'description':a234_0x17de73(0x18f),'risk':a234_0x17de73(0x180),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a234_0x17de73(0x189),'type':a234_0x17de73(0x182),'description':a234_0x17de73(0x17e),'default':0x1},{'name':a234_0x17de73(0x17a),'type':a234_0x17de73(0x182),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x535779){const _0x5d9721=a234_0x17de73,_0x38ab7d=_0x535779[_0x5d9721(0x170)]('type')[_0x5d9721(0x16f)]();if(_0x38ab7d&&!ROLE_TYPES[_0x5d9721(0x18e)](_0x38ab7d[_0x5d9721(0x173)]()))throw CliErrors[_0x5d9721(0x17c)](_0x5d9721(0x186)+_0x38ab7d+'\x22.',_0x5d9721(0x17f)+ROLE_TYPES['join'](',\x20')+'.');const _0x4f73df=_0x535779[_0x5d9721(0x181)]('page',0x1),_0x1f724c=_0x535779[_0x5d9721(0x181)](_0x5d9721(0x17a),0x64);if(_0x4f73df<0x1)throw CliErrors[_0x5d9721(0x17c)](_0x5d9721(0x178));if(_0x1f724c<0x1||_0x1f724c>0x64)throw CliErrors[_0x5d9721(0x17c)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x31b302){const _0x430bd8=a234_0x17de73,_0x497363=_0x31b302[_0x430bd8(0x181)]('page',0x1)||0x1,_0x54a2bf=_0x31b302['num']('pagesize',0x64)||0x64,_0x3d3df3=_0x31b302[_0x430bd8(0x170)]('type')['trim']()[_0x430bd8(0x173)](),{items:_0x4316e3,paging:_0x23a48f}=await listAppRoles(_0x31b302[_0x430bd8(0x16c)],{'currentPage':_0x497363,'pageSize':_0x54a2bf}),_0x4f901c=_0x3d3df3?_0x4316e3[_0x430bd8(0x177)](_0x29c1b9=>_0x29c1b9[_0x430bd8(0x174)]===_0x3d3df3):_0x4316e3,_0xfbf341=_0x4f901c[_0x430bd8(0x16b)](projectRole);return{'ok':!![],'data':{'scope':_0x430bd8(0x18c),'roles':_0xfbf341,'paging':_0x23a48f},'message':_0x430bd8(0x17b)+_0xfbf341['length']+_0x430bd8(0x172)};}};
@@ -1 +1 @@
1
- const a235_0x33f649=a235_0x12cd;(function(_0x323245,_0x170c30){const _0x5d1179=a235_0x12cd,_0x3838d7=_0x323245();while(!![]){try{const _0x4bc158=-parseInt(_0x5d1179(0x151))/0x1*(parseInt(_0x5d1179(0x163))/0x2)+-parseInt(_0x5d1179(0x154))/0x3+parseInt(_0x5d1179(0x16c))/0x4*(parseInt(_0x5d1179(0x126))/0x5)+-parseInt(_0x5d1179(0x168))/0x6+parseInt(_0x5d1179(0x170))/0x7+-parseInt(_0x5d1179(0x165))/0x8*(-parseInt(_0x5d1179(0x155))/0x9)+parseInt(_0x5d1179(0x13c))/0xa;if(_0x4bc158===_0x170c30)break;else _0x3838d7['push'](_0x3838d7['shift']());}catch(_0x58f709){_0x3838d7['push'](_0x3838d7['shift']());}}}(a235_0x5e39,0x9bbe1));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x33f649(0x130),'required':!![],'description':a235_0x33f649(0x124)};function a235_0x5e39(){const _0x37ae3b=['roleName','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','\x20member(s)\x20but\x20role\x20has\x20','join','test','find','str','Role\x20id\x20or\x20exact\x20role\x20name','Role\x20id\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','role','934294aaoFTd','length','80aPFVnw','\x20members\x20of\x20the\x20OWNER\x20role.','user-add','5623230KTmVAw','\x22:\x20','roleType','\x20duplicate\x20memberships\x20for\x20user\x20','12BASJDr','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','toLowerCase','2919434KrEdOJ','expectUserCount','Role\x20name','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','authRequired','Role\x20id\x20(from\x20`role\x20list`)','flagMissing','82435vkJcSP','userId','Missing\x20user\x20reference.','Cannot\x20','Check\x20the\x20nickname/username.\x20','dev','filter','validation','remark','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','number','User\x20','string','Multiple\x20tenant\x20members\x20match\x20\x22',';\x20no\x20change.','Removed\x20','push','totalCount','Pass\x20--user\x20<id|name>.','trim','appCode','\x20is\x20already\x20a\x20member\x20of\x20role\x20','22524010XvoWiq','includes','username','user','map','permitCount','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x22\x20is\x20ambiguous\x20(ids:\x20','name','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Optional\x20role\x20remark/description','DEV','CUSTOM','Pass\x20--user\x20<id>.','No\x20tenant\x20member\x20matches\x20\x22','tenant_code','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Role\x20name\x20\x22','userCount','expect-user-count','/smartapi/permit/user-role/delete','2QhPwXF','OWNER','flag','1346862pBkfER','215505kucAJM','nickname','/smartapi/permit/user-role/create'];a235_0x5e39=function(){return _0x37ae3b;};return a235_0x5e39();}export const ROLE_REF_FLAG={'name':a235_0x33f649(0x162),'type':'string','required':!![],'description':a235_0x33f649(0x15f)};export const USER_REF_FLAG={'name':a235_0x33f649(0x13f),'type':a235_0x33f649(0x132),'required':!![],'description':a235_0x33f649(0x142)};export const NAME_FLAG={'name':'name','type':a235_0x33f649(0x132),'required':!![],'description':a235_0x33f649(0x172)};export const USER_NAME_FLAG={'name':'name','type':a235_0x33f649(0x132),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x33f649(0x12e),'type':a235_0x33f649(0x132),'required':![],'description':a235_0x33f649(0x146)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':'number','required':![],'description':a235_0x33f649(0x161)};export const BUILTIN_ROLE_TYPES=['ADMIN',a235_0x33f649(0x147),a235_0x33f649(0x152)];export function isBuiltinRole(_0x255413){return BUILTIN_ROLE_TYPES['includes'](_0x255413);}export function assertCustomRole(_0x4e0d0b,_0x1ce7e7){const _0x41337c=a235_0x33f649;if(_0x4e0d0b[_0x41337c(0x16a)]!==_0x41337c(0x148))throw CliErrors[_0x41337c(0x12d)](_0x41337c(0x129)+_0x1ce7e7+'\x20built-in\x20role\x20'+_0x4e0d0b[_0x41337c(0x158)]+'\x20('+_0x4e0d0b[_0x41337c(0x16a)]+').',_0x41337c(0x16e));}export function projectRole(_0xfef809){const _0x746767=a235_0x33f649;return{'id':_0xfef809['id'],'roleName':_0xfef809[_0x746767(0x158)],'roleType':_0xfef809[_0x746767(0x16a)],'remark':_0xfef809[_0x746767(0x12e)],'userCount':_0xfef809[_0x746767(0x14e)],'permitCount':_0xfef809[_0x746767(0x141)],'builtin':isBuiltinRole(_0xfef809[_0x746767(0x16a)])};}export async function resolveRoleRef(_0x2eb882,_0x135f49){const _0x44de88=a235_0x33f649,_0x21f72c=_0x135f49[_0x44de88(0x139)]();if(!_0x21f72c)throw CliErrors[_0x44de88(0x12d)]('Missing\x20role\x20reference.','Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x44de88(0x15c)](_0x21f72c))return getRoleById(_0x2eb882,Number(_0x21f72c));const _0x3bb640=await listAllAppRoles(_0x2eb882),_0x5e036f=_0x3bb640[_0x44de88(0x12c)](_0x117dae=>_0x117dae[_0x44de88(0x158)]===_0x21f72c);if(_0x5e036f[_0x44de88(0x164)]===0x0)throw CliErrors[_0x44de88(0x12d)](_0x44de88(0x14d)+_0x21f72c+'\x22\x20not\x20found\x20in\x20app\x20'+_0x2eb882+'.',_0x44de88(0x159));if(_0x5e036f[_0x44de88(0x164)]>0x1){const _0x2b4307=_0x5e036f[_0x44de88(0x140)](_0x2471c=>_0x2471c['id'])[_0x44de88(0x15b)](',\x20');throw CliErrors[_0x44de88(0x12d)](_0x44de88(0x14d)+_0x21f72c+_0x44de88(0x143)+_0x2b4307+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x5e036f[0x0];}export async function getRoleById(_0x3407fb,_0x52d368){const _0x95b281=a235_0x33f649,_0x217b7c=await listAllAppRoles(_0x3407fb),_0x3ff3b5=_0x217b7c[_0x95b281(0x12c)](_0x3affe1=>_0x3affe1['id']===_0x52d368&&(!_0x3affe1[_0x95b281(0x13a)]||_0x3affe1[_0x95b281(0x13a)]===_0x3407fb));if(_0x3ff3b5[_0x95b281(0x164)]!==0x1)throw CliErrors[_0x95b281(0x12d)](_0x95b281(0x160)+_0x52d368+'\x20not\x20found\x20in\x20app\x20'+_0x3407fb+'.',_0x95b281(0x145));return _0x3ff3b5[0x0];}async function listAllAppRoles(_0x528822){const _0x11a0e3=a235_0x33f649,_0x4ab2da=0x64,_0x4113a=[];for(let _0x674a28=0x1;;_0x674a28+=0x1){const {items:_0x602515,paging:_0x510f8e}=await listAppRoles(_0x528822,{'currentPage':_0x674a28,'pageSize':_0x4ab2da});_0x4113a[_0x11a0e3(0x136)](..._0x602515);if(_0x602515[_0x11a0e3(0x164)]<_0x4ab2da||_0x510f8e&&_0x4113a[_0x11a0e3(0x164)]>=_0x510f8e['totalCount'])return _0x4113a;}}export async function resolveTenantCode(){const _0x58596b=a235_0x33f649,_0x1efbd8=await getSessionUserInfo(),_0xf78495=_0x1efbd8?.[_0x58596b(0x13f)]?.['tenant']?.[_0x58596b(0x14b)];if(!_0xf78495)throw CliErrors[_0x58596b(0x123)](_0x58596b(0x173));return _0xf78495;}function matchMember(_0xd57a2c,_0x56a8c8){const _0x388d91=a235_0x33f649,_0x78e218=_0x56a8c8['trim']()[_0x388d91(0x16f)]();return(_0xd57a2c[_0x388d91(0x156)]??'')[_0x388d91(0x16f)]()===_0x78e218||(_0xd57a2c['username']??'')[_0x388d91(0x16f)]()===_0x78e218;}export async function resolveUserRef(_0x1f6e62,_0x18bc71=a235_0x33f649(0x149)){const _0x32478e=a235_0x33f649,_0x39983d=_0x1f6e62[_0x32478e(0x139)]();if(!_0x39983d)throw CliErrors['validation'](_0x32478e(0x128),_0x32478e(0x138));const _0x3509cc=await resolveTenantCode(),_0x290e54=await getTenantMembers(_0x3509cc);if(/^\d+$/[_0x32478e(0x15c)](_0x39983d)){const _0x2e8236=Number(_0x39983d),_0x2c6b89=_0x290e54[_0x32478e(0x15d)](_0xe9e43f=>_0xe9e43f['userId']===_0x2e8236);return{'userId':_0x2e8236,'username':_0x2c6b89?.[_0x32478e(0x13e)]??String(_0x2e8236),'nickname':_0x2c6b89?.[_0x32478e(0x156)],'matchedBy':'id'};}const _0x19bc87=_0x290e54['filter'](_0x54ab08=>matchMember(_0x54ab08,_0x39983d));if(_0x19bc87[_0x32478e(0x164)]===0x0)throw CliErrors['validation'](_0x32478e(0x14a)+_0x39983d+'\x22.',_0x32478e(0x12a)+_0x18bc71);if(_0x19bc87['length']>0x1){const _0x367bbc=_0x19bc87['map'](_0x2869ea=>(_0x2869ea[_0x32478e(0x156)]??_0x2869ea[_0x32478e(0x13e)]??'?')+'('+_0x2869ea[_0x32478e(0x127)]+')')['join'](',\x20');throw CliErrors[_0x32478e(0x12d)](_0x32478e(0x133)+_0x39983d+_0x32478e(0x169)+_0x367bbc+'.',_0x18bc71);}const _0x9637c7=_0x19bc87[0x0];return{'userId':_0x9637c7['userId'],'username':_0x9637c7[_0x32478e(0x13e)]??String(_0x9637c7['userId']),'nickname':_0x9637c7[_0x32478e(0x156)],'matchedBy':_0x32478e(0x144)};}export const CREATE_USER_ROLE_PATH=a235_0x33f649(0x157);export const DELETE_USER_ROLE_PATH=a235_0x33f649(0x150);function a235_0x12cd(_0x309356,_0x3f6edc){_0x309356=_0x309356-0x123;const _0x5e3978=a235_0x5e39();let _0x12cd78=_0x5e3978[_0x309356];return _0x12cd78;}export function computeRoleUserMutation(_0x52089f){const _0x5f00ed=a235_0x33f649,{operation:_0x337bd0,appCode:_0x4a894e,role:_0x3171ce,relations:_0x49e356,user:_0x494c35}=_0x52089f,_0x5d5040=[...new Set(_0x49e356['map'](_0x54f456=>_0x54f456['userId']))],_0x357514=[];if(_0x52089f[_0x5f00ed(0x171)]!==undefined&&_0x52089f[_0x5f00ed(0x171)]!==_0x5d5040['length'])throw CliErrors['validation']('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x52089f[_0x5f00ed(0x171)]+_0x5f00ed(0x15a)+_0x5d5040[_0x5f00ed(0x164)]+'.',_0x5f00ed(0x12f));const _0x1bfe33=_0x5d5040[_0x5f00ed(0x13d)](_0x494c35['userId']),_0x42cfaa=_0x49e356['filter'](_0x4a42fb=>_0x4a42fb['userId']===_0x494c35[_0x5f00ed(0x127)])[_0x5f00ed(0x140)](_0x53b9b3=>_0x53b9b3['id']),_0x536553=_0x337bd0==='user-add'?!_0x1bfe33:_0x1bfe33;let _0xfeeaf9=_0x5d5040;_0x337bd0===_0x5f00ed(0x167)?_0x1bfe33?_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x131)+_0x494c35['userId']+_0x5f00ed(0x13b)+_0x3171ce[_0x5f00ed(0x158)]+_0x5f00ed(0x134)):_0xfeeaf9=[..._0x5d5040,_0x494c35[_0x5f00ed(0x127)]]:!_0x1bfe33?_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x131)+_0x494c35[_0x5f00ed(0x127)]+_0x5f00ed(0x14c)+_0x3171ce[_0x5f00ed(0x158)]+';\x20no\x20change.'):(_0xfeeaf9=_0x5d5040['filter'](_0x4063bb=>_0x4063bb!==_0x494c35[_0x5f00ed(0x127)]),_0x42cfaa[_0x5f00ed(0x164)]>0x1&&_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x135)+_0x42cfaa[_0x5f00ed(0x164)]+_0x5f00ed(0x16b)+_0x494c35[_0x5f00ed(0x127)]+'.'));const _0x266cba={'scope':_0x5f00ed(0x12b),'operation':_0x337bd0,'selector':{'appCode':_0x4a894e,'roleId':_0x3171ce['id'],'roleName':_0x3171ce[_0x5f00ed(0x158)],'userId':_0x494c35[_0x5f00ed(0x127)]},'before':{'userIds':_0x5d5040},'after':{'userIds':_0xfeeaf9},'dryRun':_0x52089f['dryRun'],'backend':{'method':'POST','path':_0x337bd0===_0x5f00ed(0x167)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x357514};return{'mutation':_0x266cba,'changed':_0x536553,'matchingRelationIds':_0x42cfaa};}export async function loadDevRoleRelations(_0x47046e,_0x2e00f2){const _0x2468f2=a235_0x33f649,_0x16ba5e=0x64,_0x3465f2=[];for(let _0x5860d4=0x1;;_0x5860d4+=0x1){const {items:_0x59a61c,paging:_0x5f8439}=await listDevUserRoleRelations(_0x47046e,{'roleId':_0x2e00f2,'currentPage':_0x5860d4,'pageSize':_0x16ba5e});_0x3465f2[_0x2468f2(0x136)](..._0x59a61c);if(_0x59a61c[_0x2468f2(0x164)]<_0x16ba5e||_0x5f8439&&_0x3465f2['length']>=_0x5f8439[_0x2468f2(0x137)])return _0x3465f2;}}export function readRoleRef(_0x507e12){const _0x5c8daa=a235_0x33f649,_0x4dae85=_0x507e12[_0x5c8daa(0x15e)](_0x5c8daa(0x162))[_0x5c8daa(0x139)]();if(!_0x4dae85)throw CliErrors['flagMissing']('role','Pass\x20--role\x20<id|name>.');return _0x4dae85;}export async function prepareUserMutation(_0x258131,_0x1a78c1,_0x479b47){const _0x3c3ccb=a235_0x33f649,_0x317f85=readRoleRef(_0x258131),_0x31ee5a=_0x258131[_0x3c3ccb(0x15e)](_0x3c3ccb(0x13f))[_0x3c3ccb(0x139)]();if(!_0x31ee5a)throw CliErrors[_0x3c3ccb(0x125)](_0x3c3ccb(0x13f),_0x3c3ccb(0x138));const _0xb925c5=_0x258131[_0x3c3ccb(0x153)](_0x3c3ccb(0x14f)),_0x3ab232=_0xb925c5===undefined||_0xb925c5===null?undefined:Number(_0xb925c5),_0x5efe18=await resolveRoleRef(_0x258131[_0x3c3ccb(0x13a)],_0x317f85);if(_0x5efe18[_0x3c3ccb(0x16a)]===_0x3c3ccb(0x152))throw CliErrors['validation']('Cannot\x20'+_0x1a78c1+_0x3c3ccb(0x166),_0x3c3ccb(0x16d));const _0x34337c=await resolveUserRef(_0x31ee5a),_0x4f6cc1=await loadDevRoleRelations(_0x258131[_0x3c3ccb(0x13a)],_0x5efe18['id']);return{...computeRoleUserMutation({'operation':_0x1a78c1,'appCode':_0x258131[_0x3c3ccb(0x13a)],'role':_0x5efe18,'relations':_0x4f6cc1,'user':{'userId':_0x34337c[_0x3c3ccb(0x127)],'username':_0x34337c[_0x3c3ccb(0x13e)],'nickname':_0x34337c[_0x3c3ccb(0x156)]},'dryRun':_0x479b47,..._0x3ab232!==undefined?{'expectUserCount':_0x3ab232}:{}}),'role':_0x5efe18,'user':_0x34337c};}
1
+ const a235_0x4fcd1e=a235_0x2d1c;(function(_0xea40b7,_0x1917fd){const _0x55873b=a235_0x2d1c,_0x1852c2=_0xea40b7();while(!![]){try{const _0xd73d03=parseInt(_0x55873b(0xb3))/0x1*(parseInt(_0x55873b(0xc7))/0x2)+parseInt(_0x55873b(0xb7))/0x3*(-parseInt(_0x55873b(0xd8))/0x4)+parseInt(_0x55873b(0xa8))/0x5*(-parseInt(_0x55873b(0xdc))/0x6)+-parseInt(_0x55873b(0xad))/0x7*(parseInt(_0x55873b(0xc3))/0x8)+-parseInt(_0x55873b(0xe5))/0x9*(parseInt(_0x55873b(0xbd))/0xa)+parseInt(_0x55873b(0x9b))/0xb+-parseInt(_0x55873b(0xca))/0xc*(-parseInt(_0x55873b(0xe6))/0xd);if(_0xd73d03===_0x1917fd)break;else _0x1852c2['push'](_0x1852c2['shift']());}catch(_0x3aa8fd){_0x1852c2['push'](_0x1852c2['shift']());}}}(a235_0x4e72,0x68fb7));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';function a235_0x2d1c(_0x2a1295,_0x568072){_0x2a1295=_0x2a1295-0x97;const _0x4e72c1=a235_0x4e72();let _0x2d1c49=_0x4e72c1[_0x2a1295];return _0x2d1c49;}import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x4fcd1e(0xc5),'required':!![],'description':a235_0x4fcd1e(0xa0)};export const ROLE_REF_FLAG={'name':a235_0x4fcd1e(0xc9),'type':a235_0x4fcd1e(0xd1),'required':!![],'description':a235_0x4fcd1e(0xc4)};export const USER_REF_FLAG={'name':a235_0x4fcd1e(0x9a),'type':'string','required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':'name','type':a235_0x4fcd1e(0xd1),'required':!![],'description':a235_0x4fcd1e(0x98)};export const USER_NAME_FLAG={'name':a235_0x4fcd1e(0xda),'type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':'remark','type':a235_0x4fcd1e(0xd1),'required':![],'description':a235_0x4fcd1e(0xb8)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x4fcd1e(0xd5),'type':a235_0x4fcd1e(0xc5),'required':![],'description':a235_0x4fcd1e(0xc1)};export const BUILTIN_ROLE_TYPES=[a235_0x4fcd1e(0xe7),a235_0x4fcd1e(0xa1),'OWNER'];export function isBuiltinRole(_0x5bafd9){const _0x4c586c=a235_0x4fcd1e;return BUILTIN_ROLE_TYPES[_0x4c586c(0xe4)](_0x5bafd9);}export function assertCustomRole(_0x2645c9,_0x20b402){const _0x3b0c6b=a235_0x4fcd1e;if(_0x2645c9['roleType']!=='CUSTOM')throw CliErrors[_0x3b0c6b(0xd9)](_0x3b0c6b(0xde)+_0x20b402+_0x3b0c6b(0xb4)+_0x2645c9['roleName']+'\x20('+_0x2645c9[_0x3b0c6b(0xa9)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x1e7211){const _0x4e6500=a235_0x4fcd1e;return{'id':_0x1e7211['id'],'roleName':_0x1e7211['roleName'],'roleType':_0x1e7211[_0x4e6500(0xa9)],'remark':_0x1e7211['remark'],'userCount':_0x1e7211[_0x4e6500(0xa6)],'permitCount':_0x1e7211['permitCount'],'builtin':isBuiltinRole(_0x1e7211['roleType'])};}export async function resolveRoleRef(_0x4c9650,_0x2aae0e){const _0x396481=a235_0x4fcd1e,_0x4a7871=_0x2aae0e[_0x396481(0x9d)]();if(!_0x4a7871)throw CliErrors['validation'](_0x396481(0xc0),_0x396481(0xa3));if(/^\d+$/['test'](_0x4a7871))return getRoleById(_0x4c9650,Number(_0x4a7871));const _0xc433a8=await listAllAppRoles(_0x4c9650),_0x5ebd4c=_0xc433a8[_0x396481(0xb0)](_0x3d77e1=>_0x3d77e1['roleName']===_0x4a7871);if(_0x5ebd4c[_0x396481(0xd0)]===0x0)throw CliErrors['validation'](_0x396481(0xb2)+_0x4a7871+_0x396481(0xdd)+_0x4c9650+'.',_0x396481(0xb1));if(_0x5ebd4c[_0x396481(0xd0)]>0x1){const _0x41e88a=_0x5ebd4c['map'](_0x597b6d=>_0x597b6d['id'])['join'](',\x20');throw CliErrors[_0x396481(0xd9)]('Role\x20name\x20\x22'+_0x4a7871+_0x396481(0xa4)+_0x41e88a+').',_0x396481(0xae));}return _0x5ebd4c[0x0];}export async function getRoleById(_0x561003,_0x1d8ad9){const _0x16aaf4=a235_0x4fcd1e,_0x13e409=await listAllAppRoles(_0x561003),_0x40cbcc=_0x13e409[_0x16aaf4(0xb0)](_0x56a737=>_0x56a737['id']===_0x1d8ad9&&(!_0x56a737[_0x16aaf4(0xb6)]||_0x56a737[_0x16aaf4(0xb6)]===_0x561003));if(_0x40cbcc[_0x16aaf4(0xd0)]!==0x1)throw CliErrors['validation'](_0x16aaf4(0xe2)+_0x1d8ad9+'\x20not\x20found\x20in\x20app\x20'+_0x561003+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x40cbcc[0x0];}async function listAllAppRoles(_0x12d98b){const _0xbc2052=a235_0x4fcd1e,_0x52fd70=0x64,_0x27bede=[];for(let _0xeb4ce=0x1;;_0xeb4ce+=0x1){const {items:_0x22a11f,paging:_0x521cde}=await listAppRoles(_0x12d98b,{'currentPage':_0xeb4ce,'pageSize':_0x52fd70});_0x27bede[_0xbc2052(0x97)](..._0x22a11f);if(_0x22a11f[_0xbc2052(0xd0)]<_0x52fd70||_0x521cde&&_0x27bede[_0xbc2052(0xd0)]>=_0x521cde[_0xbc2052(0xd2)])return _0x27bede;}}export async function resolveTenantCode(){const _0x5b09b1=a235_0x4fcd1e,_0x56a05c=await getSessionUserInfo(),_0x371971=_0x56a05c?.[_0x5b09b1(0x9a)]?.['tenant']?.['tenant_code'];if(!_0x371971)throw CliErrors[_0x5b09b1(0xcd)](_0x5b09b1(0xcb));return _0x371971;}function matchMember(_0x28c5ea,_0x59b060){const _0xa19266=a235_0x4fcd1e,_0x14953b=_0x59b060[_0xa19266(0x9d)]()[_0xa19266(0x9c)]();return(_0x28c5ea[_0xa19266(0xdf)]??'')[_0xa19266(0x9c)]()===_0x14953b||(_0x28c5ea[_0xa19266(0xd3)]??'')[_0xa19266(0x9c)]()===_0x14953b;}export async function resolveUserRef(_0x3ed862,_0x31d9f1=a235_0x4fcd1e(0xc6)){const _0x20daa9=a235_0x4fcd1e,_0x322637=_0x3ed862['trim']();if(!_0x322637)throw CliErrors['validation'](_0x20daa9(0xcf),'Pass\x20--user\x20<id|name>.');const _0x3e6395=await resolveTenantCode(),_0x47bd00=await getTenantMembers(_0x3e6395);if(/^\d+$/[_0x20daa9(0xe3)](_0x322637)){const _0x4bc6f9=Number(_0x322637),_0x1d7320=_0x47bd00[_0x20daa9(0xd7)](_0x5484df=>_0x5484df['userId']===_0x4bc6f9);return{'userId':_0x4bc6f9,'username':_0x1d7320?.[_0x20daa9(0xd3)]??String(_0x4bc6f9),'nickname':_0x1d7320?.[_0x20daa9(0xdf)],'matchedBy':'id'};}const _0x17cf83=_0x47bd00[_0x20daa9(0xb0)](_0x4a950c=>matchMember(_0x4a950c,_0x322637));if(_0x17cf83['length']===0x0)throw CliErrors[_0x20daa9(0xd9)](_0x20daa9(0xaf)+_0x322637+'\x22.',_0x20daa9(0xba)+_0x31d9f1);if(_0x17cf83[_0x20daa9(0xd0)]>0x1){const _0x5d0b6e=_0x17cf83['map'](_0x55c327=>(_0x55c327['nickname']??_0x55c327[_0x20daa9(0xd3)]??'?')+'('+_0x55c327[_0x20daa9(0x9f)]+')')[_0x20daa9(0xb9)](',\x20');throw CliErrors['validation'](_0x20daa9(0xb5)+_0x322637+_0x20daa9(0xac)+_0x5d0b6e+'.',_0x31d9f1);}const _0x502870=_0x17cf83[0x0];return{'userId':_0x502870[_0x20daa9(0x9f)],'username':_0x502870[_0x20daa9(0xd3)]??String(_0x502870['userId']),'nickname':_0x502870[_0x20daa9(0xdf)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x4fcd1e(0xaa);export const DELETE_USER_ROLE_PATH=a235_0x4fcd1e(0xe1);export function computeRoleUserMutation(_0x3cd694){const _0xb2f011=a235_0x4fcd1e,{operation:_0x2ff57d,appCode:_0x24357d,role:_0x5e9441,relations:_0xab6b2c,user:_0x293095}=_0x3cd694,_0x2fbbca=[...new Set(_0xab6b2c[_0xb2f011(0xa5)](_0x494dbf=>_0x494dbf[_0xb2f011(0x9f)]))],_0xafee61=[];if(_0x3cd694[_0xb2f011(0xa2)]!==undefined&&_0x3cd694[_0xb2f011(0xa2)]!==_0x2fbbca[_0xb2f011(0xd0)])throw CliErrors[_0xb2f011(0xd9)](_0xb2f011(0xbe)+_0x3cd694[_0xb2f011(0xa2)]+_0xb2f011(0xab)+_0x2fbbca[_0xb2f011(0xd0)]+'.',_0xb2f011(0xa7));const _0x1befce=_0x2fbbca['includes'](_0x293095['userId']),_0x3d38bd=_0xab6b2c[_0xb2f011(0xb0)](_0x200609=>_0x200609['userId']===_0x293095['userId'])[_0xb2f011(0xa5)](_0x31a081=>_0x31a081['id']),_0x4a8683=_0x2ff57d===_0xb2f011(0xe0)?!_0x1befce:_0x1befce;let _0x3ecd3c=_0x2fbbca;_0x2ff57d===_0xb2f011(0xe0)?_0x1befce?_0xafee61[_0xb2f011(0x97)]('User\x20'+_0x293095[_0xb2f011(0x9f)]+_0xb2f011(0xd6)+_0x5e9441[_0xb2f011(0xd4)]+_0xb2f011(0xce)):_0x3ecd3c=[..._0x2fbbca,_0x293095[_0xb2f011(0x9f)]]:!_0x1befce?_0xafee61['push'](_0xb2f011(0x99)+_0x293095[_0xb2f011(0x9f)]+_0xb2f011(0xbf)+_0x5e9441[_0xb2f011(0xd4)]+_0xb2f011(0xce)):(_0x3ecd3c=_0x2fbbca[_0xb2f011(0xb0)](_0x20a9e3=>_0x20a9e3!==_0x293095['userId']),_0x3d38bd[_0xb2f011(0xd0)]>0x1&&_0xafee61[_0xb2f011(0x97)]('Removed\x20'+_0x3d38bd[_0xb2f011(0xd0)]+_0xb2f011(0xdb)+_0x293095[_0xb2f011(0x9f)]+'.'));const _0x592546={'scope':'dev','operation':_0x2ff57d,'selector':{'appCode':_0x24357d,'roleId':_0x5e9441['id'],'roleName':_0x5e9441['roleName'],'userId':_0x293095[_0xb2f011(0x9f)]},'before':{'userIds':_0x2fbbca},'after':{'userIds':_0x3ecd3c},'dryRun':_0x3cd694['dryRun'],'backend':{'method':_0xb2f011(0xcc),'path':_0x2ff57d===_0xb2f011(0xe0)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0xafee61};return{'mutation':_0x592546,'changed':_0x4a8683,'matchingRelationIds':_0x3d38bd};}export async function loadDevRoleRelations(_0x50768b,_0x1c2673){const _0x3ac475=a235_0x4fcd1e,_0x5e0e95=0x64,_0x360932=[];for(let _0x2bfad2=0x1;;_0x2bfad2+=0x1){const {items:_0x5f499a,paging:_0x24e267}=await listDevUserRoleRelations(_0x50768b,{'roleId':_0x1c2673,'currentPage':_0x2bfad2,'pageSize':_0x5e0e95});_0x360932[_0x3ac475(0x97)](..._0x5f499a);if(_0x5f499a[_0x3ac475(0xd0)]<_0x5e0e95||_0x24e267&&_0x360932[_0x3ac475(0xd0)]>=_0x24e267[_0x3ac475(0xd2)])return _0x360932;}}function a235_0x4e72(){const _0x552ea6=['Role\x20name','User\x20','user','3881328aHdQNm','toLowerCase','trim','\x20members\x20of\x20the\x20OWNER\x20role.','userId','Role\x20id\x20(from\x20`role\x20list`)','DEV','expectUserCount','Pass\x20--role\x20<id|name>.','\x22\x20is\x20ambiguous\x20(ids:\x20','map','userCount','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','450pRQkol','roleType','/smartapi/permit/user-role/create','\x20member(s)\x20but\x20role\x20has\x20','\x22:\x20','665IuMzWp','Disambiguate\x20with\x20--role\x20<id>.','No\x20tenant\x20member\x20matches\x20\x22','filter','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','Role\x20name\x20\x22','63088GqybuU','\x20built-in\x20role\x20','Multiple\x20tenant\x20members\x20match\x20\x22','appCode','66XfokVY','Optional\x20role\x20remark/description','join','Check\x20the\x20nickname/username.\x20','Pass\x20--user\x20<id|name>.','str','20bPjfsH','Anti-drift\x20check\x20failed:\x20expected\x20','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Missing\x20role\x20reference.','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','flagMissing','71256JOtojP','Role\x20id\x20or\x20exact\x20role\x20name','number','Pass\x20--user\x20<id>.','22VjJlOt','OWNER','role','24TwzIMk','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','POST','authRequired',';\x20no\x20change.','Missing\x20user\x20reference.','length','string','totalCount','username','roleName','expect-user-count','\x20is\x20already\x20a\x20member\x20of\x20role\x20','find','97284brWwGY','validation','name','\x20duplicate\x20memberships\x20for\x20user\x20','8844HBEFds','\x22\x20not\x20found\x20in\x20app\x20','Cannot\x20','nickname','user-add','/smartapi/permit/user-role/delete','Role\x20id\x20','test','includes','833103hUVNsW','7034378nVgEPP','ADMIN','push'];a235_0x4e72=function(){return _0x552ea6;};return a235_0x4e72();}export function readRoleRef(_0x4e1b57){const _0x391340=a235_0x4fcd1e,_0x2b87cb=_0x4e1b57['str'](_0x391340(0xc9))[_0x391340(0x9d)]();if(!_0x2b87cb)throw CliErrors[_0x391340(0xc2)]('role',_0x391340(0xa3));return _0x2b87cb;}export async function prepareUserMutation(_0xc24b9,_0x26baa0,_0x1cbe28){const _0x245fbc=a235_0x4fcd1e,_0x2a619d=readRoleRef(_0xc24b9),_0x34f633=_0xc24b9[_0x245fbc(0xbc)](_0x245fbc(0x9a))['trim']();if(!_0x34f633)throw CliErrors['flagMissing'](_0x245fbc(0x9a),_0x245fbc(0xbb));const _0x22056d=_0xc24b9['flag']('expect-user-count'),_0x3527b2=_0x22056d===undefined||_0x22056d===null?undefined:Number(_0x22056d),_0x1c4485=await resolveRoleRef(_0xc24b9['appCode'],_0x2a619d);if(_0x1c4485[_0x245fbc(0xa9)]===_0x245fbc(0xc8))throw CliErrors[_0x245fbc(0xd9)](_0x245fbc(0xde)+_0x26baa0+_0x245fbc(0x9e),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x192d8f=await resolveUserRef(_0x34f633),_0x4a20e6=await loadDevRoleRelations(_0xc24b9['appCode'],_0x1c4485['id']);return{...computeRoleUserMutation({'operation':_0x26baa0,'appCode':_0xc24b9[_0x245fbc(0xb6)],'role':_0x1c4485,'relations':_0x4a20e6,'user':{'userId':_0x192d8f['userId'],'username':_0x192d8f[_0x245fbc(0xd3)],'nickname':_0x192d8f[_0x245fbc(0xdf)]},'dryRun':_0x1cbe28,..._0x3527b2!==undefined?{'expectUserCount':_0x3527b2}:{}}),'role':_0x1c4485,'user':_0x192d8f};}
@@ -1 +1 @@
1
- const a236_0x295c6f=a236_0x2f36;function a236_0xee2b(){const _0x41043e=['remark','27736foPGGq','name','/smartapi/permit/role/update','string','dev','validation','2648088FQySnO','flag','appCode','Updated\x20role\x20','572AKvGaF','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','250gHjqkh','45CipLTB','\x20(id=','num','roleName','POST','2357792crmPFV','write','1435698nMKmHF','202190JMlAJE','length','1037930XQeRGO','New\x20role\x20name','7LeayKX','2268UkCnLy','--name\x20cannot\x20be\x20empty.','update'];a236_0xee2b=function(){return _0x41043e;};return a236_0xee2b();}(function(_0x502ddd,_0x7c8c55){const _0x39b5ac=a236_0x2f36,_0x5569c6=_0x502ddd();while(!![]){try{const _0x3c33dc=-parseInt(_0x39b5ac(0x8c))/0x1*(-parseInt(_0x39b5ac(0x9a))/0x2)+parseInt(_0x39b5ac(0x8d))/0x3*(-parseInt(_0x39b5ac(0x7f))/0x4)+parseInt(_0x39b5ac(0x97))/0x5+parseInt(_0x39b5ac(0x94))/0x6+-parseInt(_0x39b5ac(0x99))/0x7*(-parseInt(_0x39b5ac(0x92))/0x8)+parseInt(_0x39b5ac(0x85))/0x9+parseInt(_0x39b5ac(0x95))/0xa*(-parseInt(_0x39b5ac(0x89))/0xb);if(_0x3c33dc===_0x7c8c55)break;else _0x5569c6['push'](_0x5569c6['shift']());}catch(_0x599e43){_0x5569c6['push'](_0x5569c6['shift']());}}}(a236_0xee2b,0x28057));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x295c6f(0x81);function readPatch(_0x4f87c6){const _0x5441e7=a236_0x295c6f,_0x4fbd29=_0x4f87c6[_0x5441e7(0x86)](_0x5441e7(0x80)),_0x596b91=_0x4f87c6[_0x5441e7(0x86)](_0x5441e7(0x7e)),_0x410de4={};if(_0x4fbd29!==undefined&&_0x4fbd29!==null){const _0x3ada25=String(_0x4fbd29)['trim']();if(!_0x3ada25)throw CliErrors['validation'](_0x5441e7(0x7c));if(_0x3ada25[_0x5441e7(0x96)]>0x40)throw CliErrors[_0x5441e7(0x84)](_0x5441e7(0x8b));_0x410de4[_0x5441e7(0x90)]=_0x3ada25;}_0x596b91!==undefined&&_0x596b91!==null&&(_0x410de4[_0x5441e7(0x7e)]=String(_0x596b91));if(_0x410de4[_0x5441e7(0x90)]===undefined&&_0x410de4[_0x5441e7(0x7e)]===undefined)throw CliErrors[_0x5441e7(0x84)]('Nothing\x20to\x20update.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x410de4;}function a236_0x2f36(_0xc007d5,_0xef9979){_0xc007d5=_0xc007d5-0x7c;const _0xee2b44=a236_0xee2b();let _0x2f361b=_0xee2b44[_0xc007d5];return _0x2f361b;}export const roleUpdate={'service':'role','command':'update','description':a236_0x295c6f(0x8a),'risk':a236_0x295c6f(0x93),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x295c6f(0x80),'type':a236_0x295c6f(0x82),'required':![],'description':a236_0x295c6f(0x98)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f1d03){readPatch(_0x2f1d03);},async 'dryRun'(_0x304210){const _0x391b91=a236_0x295c6f,_0xd218e1=_0x304210['num']('id'),_0x2e8ea1=readPatch(_0x304210),_0x26922e=await getRoleById(_0x304210[_0x391b91(0x87)],_0xd218e1);return assertCustomRole(_0x26922e,_0x391b91(0x7d)),asDryRunResult({'scope':_0x391b91(0x83),'operation':_0x391b91(0x7d),'selector':{'appCode':_0x304210[_0x391b91(0x87)],'roleId':_0xd218e1,'roleName':_0x26922e[_0x391b91(0x90)]},'before':projectRole(_0x26922e),'after':projectRole({..._0x26922e,..._0x2e8ea1['roleName']!==undefined?{'roleName':_0x2e8ea1[_0x391b91(0x90)]}:{},..._0x2e8ea1['remark']!==undefined?{'remark':_0x2e8ea1['remark']}:{}}),'dryRun':!![],'backend':{'method':_0x391b91(0x91),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x4aeebf){const _0x1f58bc=a236_0x295c6f,_0x400e18=_0x4aeebf[_0x1f58bc(0x8f)]('id'),_0x30e0c1=readPatch(_0x4aeebf),_0x2e4cd1=await getRoleById(_0x4aeebf[_0x1f58bc(0x87)],_0x400e18);assertCustomRole(_0x2e4cd1,'update'),await updateAppRole({'id':_0x400e18,'appCode':_0x4aeebf[_0x1f58bc(0x87)],..._0x30e0c1[_0x1f58bc(0x90)]!==undefined?{'roleName':_0x30e0c1[_0x1f58bc(0x90)]}:{},..._0x30e0c1['remark']!==undefined?{'remark':_0x30e0c1['remark']}:{}});const _0x1df2b5=await getRoleById(_0x4aeebf[_0x1f58bc(0x87)],_0x400e18);return{'ok':!![],'data':{'scope':_0x1f58bc(0x83),'operation':'update','selector':{'appCode':_0x4aeebf[_0x1f58bc(0x87)],'roleId':_0x400e18,'roleName':_0x1df2b5[_0x1f58bc(0x90)]},'before':projectRole(_0x2e4cd1),'after':projectRole(_0x1df2b5),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x1f58bc(0x88)+_0x1df2b5['roleName']+_0x1f58bc(0x8e)+_0x400e18+')'};}};
1
+ const a236_0x1dbdee=a236_0x4f47;(function(_0x2afe06,_0x5b907b){const _0x312dbf=a236_0x4f47,_0x38ae02=_0x2afe06();while(!![]){try{const _0x3ee5f8=-parseInt(_0x312dbf(0x1c1))/0x1*(parseInt(_0x312dbf(0x1d8))/0x2)+parseInt(_0x312dbf(0x1cb))/0x3*(parseInt(_0x312dbf(0x1d1))/0x4)+-parseInt(_0x312dbf(0x1d6))/0x5*(-parseInt(_0x312dbf(0x1d2))/0x6)+-parseInt(_0x312dbf(0x1d5))/0x7*(-parseInt(_0x312dbf(0x1d7))/0x8)+parseInt(_0x312dbf(0x1c7))/0x9*(parseInt(_0x312dbf(0x1d0))/0xa)+parseInt(_0x312dbf(0x1c0))/0xb*(parseInt(_0x312dbf(0x1c8))/0xc)+-parseInt(_0x312dbf(0x1be))/0xd;if(_0x3ee5f8===_0x5b907b)break;else _0x38ae02['push'](_0x38ae02['shift']());}catch(_0x398e29){_0x38ae02['push'](_0x38ae02['shift']());}}}(a236_0x1cd5,0x82650));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a236_0x1cd5(){const _0x129f44=['num','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','length','219267tdnhuA','6320796gxcWEJ','remark','trim','2540139NqhWcB','name','Updated\x20role\x20','New\x20role\x20name','--name\x20cannot\x20be\x20empty.','410UVAQWS','4ejyYwX','28278sQIHbw','role','POST','193697gAnvuE','965SiisZX','32qGdvEp','106yJkRyd','roleName','\x20(id=','/smartapi/permit/role/update','update','dev','35197877oyUKtB','write','11okZBgv','2849MYhqmg','appCode','flag'];a236_0x1cd5=function(){return _0x129f44;};return a236_0x1cd5();}const UPDATE_PATH=a236_0x1dbdee(0x1db);function a236_0x4f47(_0x502816,_0x2eaf8a){_0x502816=_0x502816-0x1be;const _0x1cd59b=a236_0x1cd5();let _0x4f4722=_0x1cd59b[_0x502816];return _0x4f4722;}function readPatch(_0xcca71e){const _0x3c5417=a236_0x1dbdee,_0x1ddfe9=_0xcca71e[_0x3c5417(0x1c3)](_0x3c5417(0x1cc)),_0x2eaf04=_0xcca71e[_0x3c5417(0x1c3)](_0x3c5417(0x1c9)),_0xc1d052={};if(_0x1ddfe9!==undefined&&_0x1ddfe9!==null){const _0x317277=String(_0x1ddfe9)[_0x3c5417(0x1ca)]();if(!_0x317277)throw CliErrors['validation'](_0x3c5417(0x1cf));if(_0x317277[_0x3c5417(0x1c6)]>0x40)throw CliErrors['validation']('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0xc1d052[_0x3c5417(0x1d9)]=_0x317277;}_0x2eaf04!==undefined&&_0x2eaf04!==null&&(_0xc1d052[_0x3c5417(0x1c9)]=String(_0x2eaf04));if(_0xc1d052[_0x3c5417(0x1d9)]===undefined&&_0xc1d052[_0x3c5417(0x1c9)]===undefined)throw CliErrors['validation']('Nothing\x20to\x20update.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0xc1d052;}export const roleUpdate={'service':a236_0x1dbdee(0x1d3),'command':a236_0x1dbdee(0x1dc),'description':a236_0x1dbdee(0x1c5),'risk':a236_0x1dbdee(0x1bf),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x1dbdee(0x1cc),'type':'string','required':![],'description':a236_0x1dbdee(0x1ce)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3e9662){readPatch(_0x3e9662);},async 'dryRun'(_0x31e4e4){const _0x256c3f=a236_0x1dbdee,_0x206b9a=_0x31e4e4[_0x256c3f(0x1c4)]('id'),_0xead21d=readPatch(_0x31e4e4),_0x4dffbf=await getRoleById(_0x31e4e4['appCode'],_0x206b9a);return assertCustomRole(_0x4dffbf,'update'),asDryRunResult({'scope':_0x256c3f(0x1dd),'operation':_0x256c3f(0x1dc),'selector':{'appCode':_0x31e4e4[_0x256c3f(0x1c2)],'roleId':_0x206b9a,'roleName':_0x4dffbf[_0x256c3f(0x1d9)]},'before':projectRole(_0x4dffbf),'after':projectRole({..._0x4dffbf,..._0xead21d['roleName']!==undefined?{'roleName':_0xead21d[_0x256c3f(0x1d9)]}:{},..._0xead21d[_0x256c3f(0x1c9)]!==undefined?{'remark':_0xead21d[_0x256c3f(0x1c9)]}:{}}),'dryRun':!![],'backend':{'method':_0x256c3f(0x1d4),'path':UPDATE_PATH},'warnings':[]},{'method':_0x256c3f(0x1d4),'url':UPDATE_PATH});},async 'execute'(_0x2de6ba){const _0x13f5c8=a236_0x1dbdee,_0x282c81=_0x2de6ba['num']('id'),_0x1fc0dd=readPatch(_0x2de6ba),_0x3a45ba=await getRoleById(_0x2de6ba[_0x13f5c8(0x1c2)],_0x282c81);assertCustomRole(_0x3a45ba,_0x13f5c8(0x1dc)),await updateAppRole({'id':_0x282c81,'appCode':_0x2de6ba['appCode'],..._0x1fc0dd[_0x13f5c8(0x1d9)]!==undefined?{'roleName':_0x1fc0dd[_0x13f5c8(0x1d9)]}:{},..._0x1fc0dd['remark']!==undefined?{'remark':_0x1fc0dd[_0x13f5c8(0x1c9)]}:{}});const _0x3ddf22=await getRoleById(_0x2de6ba['appCode'],_0x282c81);return{'ok':!![],'data':{'scope':_0x13f5c8(0x1dd),'operation':_0x13f5c8(0x1dc),'selector':{'appCode':_0x2de6ba[_0x13f5c8(0x1c2)],'roleId':_0x282c81,'roleName':_0x3ddf22[_0x13f5c8(0x1d9)]},'before':projectRole(_0x3a45ba),'after':projectRole(_0x3ddf22),'dryRun':![],'backend':{'method':_0x13f5c8(0x1d4),'path':UPDATE_PATH},'warnings':[]},'message':_0x13f5c8(0x1cd)+_0x3ddf22[_0x13f5c8(0x1d9)]+_0x13f5c8(0x1da)+_0x282c81+')'};}};
@@ -1 +1 @@
1
- const a237_0x2901a9=a237_0x18f1;function a237_0x3dc0(){const _0x4df742=['user-add','313058oXOUXc','role','roleName','328832rQhGLm','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','appCode','\x20to\x20role\x20','userId','\x20already\x20in\x20role\x20','81EIgIol','1319490BFrSpl','246771SdfaSE','username','2dYxNRf','1371080qXOEpN','roleType','POST','2408466mQLUeB','high-risk-write','298983QLYwZS','Added\x20user\x20','selector','No\x20change:\x20user\x20','roleId'];a237_0x3dc0=function(){return _0x4df742;};return a237_0x3dc0();}(function(_0x96a1f6,_0x23c370){const _0x3f5455=a237_0x18f1,_0x52a60c=_0x96a1f6();while(!![]){try{const _0x175df0=-parseInt(_0x3f5455(0xf6))/0x1*(-parseInt(_0x3f5455(0xe9))/0x2)+parseInt(_0x3f5455(0xe3))/0x3+parseInt(_0x3f5455(0xf7))/0x4+parseInt(_0x3f5455(0xf3))/0x5+-parseInt(_0x3f5455(0xe1))/0x6+-parseInt(_0x3f5455(0xf4))/0x7+parseInt(_0x3f5455(0xec))/0x8*(-parseInt(_0x3f5455(0xf2))/0x9);if(_0x175df0===_0x23c370)break;else _0x52a60c['push'](_0x52a60c['shift']());}catch(_0x398133){_0x52a60c['push'](_0x52a60c['shift']());}}}(a237_0x3dc0,0x33f33));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x18f1(_0x1fa703,_0x19b3e8){_0x1fa703=_0x1fa703-0xe1;const _0x3dc087=a237_0x3dc0();let _0x18f1d1=_0x3dc087[_0x1fa703];return _0x18f1d1;}import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x2901a9(0xea),'command':a237_0x2901a9(0xe8),'description':a237_0x2901a9(0xed),'risk':a237_0x2901a9(0xe2),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1f8656){const _0x3faa36=a237_0x2901a9,{mutation:_0x1bb841}=await prepareUserMutation(_0x1f8656,'user-add',!![]);return asDryRunResult(_0x1bb841,{'method':_0x3faa36(0xf9),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x407f6){const _0x1bf72a=a237_0x2901a9,{mutation:_0xd48151,changed:_0x468ef2,role:_0x329b4f,user:_0x17507d}=await prepareUserMutation(_0x407f6,_0x1bf72a(0xe8),![]);return _0x468ef2&&await createDevUserRole({'appCode':_0x407f6[_0x1bf72a(0xee)],'userId':_0x17507d[_0x1bf72a(0xf0)],'username':_0x17507d[_0x1bf72a(0xf5)],'roleType':_0x329b4f[_0x1bf72a(0xf8)],'roleId':_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xe7)]}),{'ok':!![],'data':_0xd48151,'message':_0x468ef2?_0x1bf72a(0xe4)+_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xf0)]+_0x1bf72a(0xef)+_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xeb)]:_0x1bf72a(0xe6)+_0xd48151['selector'][_0x1bf72a(0xf0)]+_0x1bf72a(0xf1)+_0xd48151[_0x1bf72a(0xe5)]['roleName']};}};
1
+ const a237_0x832a5f=a237_0x52d0;function a237_0x5129(){const _0x57f939=['\x20to\x20role\x20','1656176qKBhPZ','5XEHgoo','high-risk-write','1170588fDmSmF','381958EHlXga','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','roleType','No\x20change:\x20user\x20','roleId','selector','role','Added\x20user\x20','571720TfjKlg','32031kFMeJQ','username','roleName','852544OZJTXO','user-add','POST','userId','20949kCXlPC'];a237_0x5129=function(){return _0x57f939;};return a237_0x5129();}(function(_0x3649e6,_0xf6b831){const _0x3c7d97=a237_0x52d0,_0xd57bda=_0x3649e6();while(!![]){try{const _0x2ef648=parseInt(_0x3c7d97(0x1cb))/0x1+-parseInt(_0x3c7d97(0x1d1))/0x2+parseInt(_0x3c7d97(0x1da))/0x3+-parseInt(_0x3c7d97(0x1d9))/0x4*(-parseInt(_0x3c7d97(0x1ce))/0x5)+-parseInt(_0x3c7d97(0x1d0))/0x6+parseInt(_0x3c7d97(0x1dd))/0x7+parseInt(_0x3c7d97(0x1cd))/0x8;if(_0x2ef648===_0xf6b831)break;else _0xd57bda['push'](_0xd57bda['shift']());}catch(_0xf5277f){_0xd57bda['push'](_0xd57bda['shift']());}}}(a237_0x5129,0x1ca2d));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a237_0x52d0(_0x285d65,_0x31fe62){_0x285d65=_0x285d65-0x1c8;const _0x5129f1=a237_0x5129();let _0x52d0ca=_0x5129f1[_0x285d65];return _0x52d0ca;}export const roleUserAdd={'service':a237_0x832a5f(0x1d7),'command':a237_0x832a5f(0x1c8),'description':a237_0x832a5f(0x1d2),'risk':a237_0x832a5f(0x1cf),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3f73e7){const _0x4958af=a237_0x832a5f,{mutation:_0x13f8ec}=await prepareUserMutation(_0x3f73e7,_0x4958af(0x1c8),!![]);return asDryRunResult(_0x13f8ec,{'method':_0x4958af(0x1c9),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x50aa5c){const _0xd594d2=a237_0x832a5f,{mutation:_0x3f5cb7,changed:_0x21e7fe,role:_0x75145d,user:_0x42179e}=await prepareUserMutation(_0x50aa5c,_0xd594d2(0x1c8),![]);return _0x21e7fe&&await createDevUserRole({'appCode':_0x50aa5c['appCode'],'userId':_0x42179e[_0xd594d2(0x1ca)],'username':_0x42179e[_0xd594d2(0x1db)],'roleType':_0x75145d[_0xd594d2(0x1d3)],'roleId':_0x3f5cb7[_0xd594d2(0x1d6)][_0xd594d2(0x1d5)]}),{'ok':!![],'data':_0x3f5cb7,'message':_0x21e7fe?_0xd594d2(0x1d8)+_0x3f5cb7[_0xd594d2(0x1d6)][_0xd594d2(0x1ca)]+_0xd594d2(0x1cc)+_0x3f5cb7[_0xd594d2(0x1d6)][_0xd594d2(0x1dc)]:_0xd594d2(0x1d4)+_0x3f5cb7[_0xd594d2(0x1d6)][_0xd594d2(0x1ca)]+'\x20already\x20in\x20role\x20'+_0x3f5cb7[_0xd594d2(0x1d6)][_0xd594d2(0x1dc)]};}};
@@ -1 +1 @@
1
- function a238_0x25dc(_0xe8b66b,_0x18cd83){_0xe8b66b=_0xe8b66b-0x182;const _0x3315ad=a238_0x3315();let _0x25dc12=_0x3315ad[_0xe8b66b];return _0x25dc12;}const a238_0x178d49=a238_0x25dc;(function(_0xec51c6,_0x25245f){const _0x559f0e=a238_0x25dc,_0x6dfc50=_0xec51c6();while(!![]){try{const _0x3c4d6c=-parseInt(_0x559f0e(0x185))/0x1*(-parseInt(_0x559f0e(0x18c))/0x2)+-parseInt(_0x559f0e(0x184))/0x3*(-parseInt(_0x559f0e(0x193))/0x4)+-parseInt(_0x559f0e(0x18f))/0x5+-parseInt(_0x559f0e(0x186))/0x6+-parseInt(_0x559f0e(0x18a))/0x7+-parseInt(_0x559f0e(0x189))/0x8*(parseInt(_0x559f0e(0x188))/0x9)+-parseInt(_0x559f0e(0x194))/0xa*(-parseInt(_0x559f0e(0x187))/0xb);if(_0x3c4d6c===_0x25245f)break;else _0x6dfc50['push'](_0x6dfc50['shift']());}catch(_0x41c491){_0x6dfc50['push'](_0x6dfc50['shift']());}}}(a238_0x3315,0x63922));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0x178d49(0x191),'command':'user-remove','description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a238_0x178d49(0x192),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x418e85){const {mutation:_0x45569a}=await prepareUserMutation(_0x418e85,'user-remove',!![]);return asDryRunResult(_0x45569a,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5ba7d0){const _0x40d8b2=a238_0x178d49,{matchingRelationIds:_0x5ee6c7,mutation:_0x8fc0da,changed:_0xcf49ad}=await prepareUserMutation(_0x5ba7d0,_0x40d8b2(0x18b),![]);if(_0xcf49ad)for(const _0x979014 of _0x5ee6c7){await deleteDevUserRole(_0x979014);}return{'ok':!![],'data':_0x8fc0da,'message':_0xcf49ad?_0x40d8b2(0x18d)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x182)]+_0x40d8b2(0x190)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x195)]:_0x40d8b2(0x18e)+_0x8fc0da['selector']['userId']+_0x40d8b2(0x183)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x195)]};}};function a238_0x3315(){const _0x10f8b5=['5613qOpTOa','91456UWTWUg','2476098vFNoCG','15004UMHOZu','7243389YcOXNq','8KtdWRq','1877960kBSVJm','user-remove','2aiVqCw','Removed\x20user\x20','No\x20change:\x20user\x20','2055295xxqZdD','\x20from\x20role\x20','role','high-risk-write','28GHqmMO','16130muVwBa','roleName','selector','userId','\x20not\x20in\x20role\x20'];a238_0x3315=function(){return _0x10f8b5;};return a238_0x3315();}
1
+ const a238_0x456945=a238_0x1199;(function(_0x3c49b3,_0x3e96c4){const _0x169d62=a238_0x1199,_0x351bd0=_0x3c49b3();while(!![]){try{const _0x43b953=parseInt(_0x169d62(0xb7))/0x1+-parseInt(_0x169d62(0xa7))/0x2+parseInt(_0x169d62(0xa4))/0x3+-parseInt(_0x169d62(0xa6))/0x4*(parseInt(_0x169d62(0xb4))/0x5)+parseInt(_0x169d62(0xaf))/0x6+parseInt(_0x169d62(0xb6))/0x7+-parseInt(_0x169d62(0xb5))/0x8*(parseInt(_0x169d62(0xa8))/0x9);if(_0x43b953===_0x3e96c4)break;else _0x351bd0['push'](_0x351bd0['shift']());}catch(_0x377250){_0x351bd0['push'](_0x351bd0['shift']());}}}(a238_0x3a9f,0x8e5ae));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a238_0x3a9f(){const _0xee4bd7=['high-risk-write','user-remove','1380FKZQTZ','168eZfjQi','7465780gQSDDo','406597VbSphe','roleName','1023408YJXmRD','Removed\x20user\x20','8940dkUYZG','945994RSdviO','486882xPUHKM','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','No\x20change:\x20user\x20','role','selector','\x20from\x20role\x20','\x20not\x20in\x20role\x20','5968368XnwrNt','POST','userId'];a238_0x3a9f=function(){return _0xee4bd7;};return a238_0x3a9f();}function a238_0x1199(_0x51be60,_0x3d0b40){_0x51be60=_0x51be60-0xa4;const _0x3a9f4f=a238_0x3a9f();let _0x119999=_0x3a9f4f[_0x51be60];return _0x119999;}export const roleUserRemove={'service':a238_0x456945(0xab),'command':a238_0x456945(0xb3),'description':a238_0x456945(0xa9),'risk':a238_0x456945(0xb2),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x13e54b){const _0x234096=a238_0x456945,{mutation:_0x3fa166}=await prepareUserMutation(_0x13e54b,_0x234096(0xb3),!![]);return asDryRunResult(_0x3fa166,{'method':_0x234096(0xb0),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x403151){const _0x4f8539=a238_0x456945,{matchingRelationIds:_0x3bc561,mutation:_0x1edf35,changed:_0x58a788}=await prepareUserMutation(_0x403151,_0x4f8539(0xb3),![]);if(_0x58a788)for(const _0x5bfdf3 of _0x3bc561){await deleteDevUserRole(_0x5bfdf3);}return{'ok':!![],'data':_0x1edf35,'message':_0x58a788?_0x4f8539(0xa5)+_0x1edf35[_0x4f8539(0xac)][_0x4f8539(0xb1)]+_0x4f8539(0xad)+_0x1edf35[_0x4f8539(0xac)][_0x4f8539(0xb8)]:_0x4f8539(0xaa)+_0x1edf35[_0x4f8539(0xac)][_0x4f8539(0xb1)]+_0x4f8539(0xae)+_0x1edf35['selector']['roleName']};}};
@@ -1 +1 @@
1
- function a239_0x2622(_0x15fff0,_0x2f96b0){_0x15fff0=_0x15fff0-0x8d;const _0x27ce34=a239_0x27ce();let _0x262298=_0x27ce34[_0x15fff0];return _0x262298;}function a239_0x27ce(){const _0x37fbe1=['matchedBy','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','3592986emqUXp','2041944pfpodj','591273Fzaegx','Pass\x20--name\x20<nickname|username>.','582736abvCxM','user-resolve','trim','3154744hoPlCF','2075293qDvmEy','name','8ZkXTTz','read','role','\x22\x20→\x20userId\x20','userId','18FDVEld','131592CtmTQy','str','Resolved\x20\x22','flagMissing','username','5gcuHCo','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','40uCKHck','nickname'];a239_0x27ce=function(){return _0x37fbe1;};return a239_0x27ce();}const a239_0x45d839=a239_0x2622;(function(_0x5d078e,_0x5b017f){const _0x5ad83f=a239_0x2622,_0x7ef4fc=_0x5d078e();while(!![]){try{const _0x37d47b=parseInt(_0x5ad83f(0x9b))/0x1+parseInt(_0x5ad83f(0x95))/0x2*(-parseInt(_0x5ad83f(0x8d))/0x3)+parseInt(_0x5ad83f(0x92))/0x4+-parseInt(_0x5ad83f(0xa0))/0x5*(-parseInt(_0x5ad83f(0xa6))/0x6)+-parseInt(_0x5ad83f(0x8f))/0x7+-parseInt(_0x5ad83f(0xa7))/0x8*(-parseInt(_0x5ad83f(0x9a))/0x9)+-parseInt(_0x5ad83f(0xa2))/0xa*(parseInt(_0x5ad83f(0x93))/0xb);if(_0x37d47b===_0x5b017f)break;else _0x7ef4fc['push'](_0x7ef4fc['shift']());}catch(_0x386c22){_0x7ef4fc['push'](_0x7ef4fc['shift']());}}}(a239_0x27ce,0x62783));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x45d839(0x97),'command':a239_0x45d839(0x90),'description':a239_0x45d839(0xa1),'risk':a239_0x45d839(0x96),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a1bcb){const _0x5a3245=a239_0x45d839;if(!_0x3a1bcb[_0x5a3245(0x9c)]('name')[_0x5a3245(0x91)]())throw CliErrors[_0x5a3245(0x9e)](_0x5a3245(0x94),_0x5a3245(0x8e));},async 'execute'(_0x4a7738){const _0x1038c6=a239_0x45d839,_0xffeb74=_0x4a7738[_0x1038c6(0x9c)](_0x1038c6(0x94))[_0x1038c6(0x91)](),_0x1fdfdb=await resolveUserRef(_0xffeb74,_0x1038c6(0xa5));return{'ok':!![],'data':{'user':{'userId':_0x1fdfdb[_0x1038c6(0x99)],'username':_0x1fdfdb[_0x1038c6(0x9f)],'nickname':_0x1fdfdb[_0x1038c6(0xa3)],'matchedBy':_0x1fdfdb[_0x1038c6(0xa4)]}},'message':_0x1038c6(0x9d)+_0xffeb74+_0x1038c6(0x98)+_0x1fdfdb[_0x1038c6(0x99)]};}};
1
+ const a239_0x1e6a67=a239_0x3eca;(function(_0x447045,_0x3f5e2f){const _0x5d3a6d=a239_0x3eca,_0x23e098=_0x447045();while(!![]){try{const _0x31548d=-parseInt(_0x5d3a6d(0x18e))/0x1*(-parseInt(_0x5d3a6d(0x18b))/0x2)+parseInt(_0x5d3a6d(0x193))/0x3*(-parseInt(_0x5d3a6d(0x18d))/0x4)+parseInt(_0x5d3a6d(0x190))/0x5+parseInt(_0x5d3a6d(0x197))/0x6+parseInt(_0x5d3a6d(0x18a))/0x7*(-parseInt(_0x5d3a6d(0x192))/0x8)+parseInt(_0x5d3a6d(0x185))/0x9+parseInt(_0x5d3a6d(0x199))/0xa;if(_0x31548d===_0x3f5e2f)break;else _0x23e098['push'](_0x23e098['shift']());}catch(_0x2acb84){_0x23e098['push'](_0x23e098['shift']());}}}(a239_0x472a,0x4d0b0));import{CliErrors}from'../../errors.js';function a239_0x472a(){const _0x4819e0=['matchedBy','951455DwLTLY','\x22\x20→\x20userId\x20','3040640IQFuEl','22164gRkfzh','role','userId','name','2945646fYMrBy','str','1453520RqGCqp','user-resolve','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','read','2883105MvNPaf','username','Pass\x20--name\x20<nickname|username>.','trim','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','7FsSwbF','2NgPPyV','nickname','316SYuoft','132371WZtVyH'];a239_0x472a=function(){return _0x4819e0;};return a239_0x472a();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';function a239_0x3eca(_0x507dc0,_0x28947a){_0x507dc0=_0x507dc0-0x183;const _0x472af9=a239_0x472a();let _0x3ecac6=_0x472af9[_0x507dc0];return _0x3ecac6;}export const roleUserResolve={'service':a239_0x1e6a67(0x194),'command':a239_0x1e6a67(0x19a),'description':a239_0x1e6a67(0x183),'risk':a239_0x1e6a67(0x184),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5086d4){const _0x20d7dd=a239_0x1e6a67;if(!_0x5086d4[_0x20d7dd(0x198)](_0x20d7dd(0x196))[_0x20d7dd(0x188)]())throw CliErrors['flagMissing'](_0x20d7dd(0x196),_0x20d7dd(0x187));},async 'execute'(_0x1e3de1){const _0x354a1e=a239_0x1e6a67,_0x297ead=_0x1e3de1[_0x354a1e(0x198)](_0x354a1e(0x196))[_0x354a1e(0x188)](),_0xd49504=await resolveUserRef(_0x297ead,_0x354a1e(0x189));return{'ok':!![],'data':{'user':{'userId':_0xd49504['userId'],'username':_0xd49504[_0x354a1e(0x186)],'nickname':_0xd49504[_0x354a1e(0x18c)],'matchedBy':_0xd49504[_0x354a1e(0x18f)]}},'message':'Resolved\x20\x22'+_0x297ead+_0x354a1e(0x191)+_0xd49504[_0x354a1e(0x195)]};}};
@@ -1 +1 @@
1
- function a240_0x123a(_0x35c71c,_0x25b7b2){_0x35c71c=_0x35c71c-0x151;const _0x3508ea=a240_0x3508();let _0x123ad1=_0x3508ea[_0x35c71c];return _0x123ad1;}const a240_0x3fa191=a240_0x123a;(function(_0x21d9b0,_0xc30c99){const _0xc1c5a2=a240_0x123a,_0xea5347=_0x21d9b0();while(!![]){try{const _0x237dcb=parseInt(_0xc1c5a2(0x165))/0x1*(-parseInt(_0xc1c5a2(0x15a))/0x2)+parseInt(_0xc1c5a2(0x15c))/0x3*(parseInt(_0xc1c5a2(0x166))/0x4)+-parseInt(_0xc1c5a2(0x158))/0x5+parseInt(_0xc1c5a2(0x161))/0x6+parseInt(_0xc1c5a2(0x164))/0x7*(parseInt(_0xc1c5a2(0x162))/0x8)+-parseInt(_0xc1c5a2(0x152))/0x9+parseInt(_0xc1c5a2(0x160))/0xa*(parseInt(_0xc1c5a2(0x15b))/0xb);if(_0x237dcb===_0xc30c99)break;else _0xea5347['push'](_0xea5347['shift']());}catch(_0x3a3514){_0xea5347['push'](_0xea5347['shift']());}}}(a240_0x3508,0x5acc7));function a240_0x3508(){const _0x2b1c49=['cookie','6483735KiuURb','content','\x20--file\x20<path>\x20--dry-run`.','read','\x20is\x20not\x20configured\x20for\x20app\x20','appCode','2264745tAxgRs','rule','268xyJcab','13010932gbiPnZ','99xxZRrd','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','\x20for\x20','Loaded\x20','10SnNKMI','2666538hnAHnk','268808zflqDI','get','7rphjen','1070GuLJYI','3372sZLoQf'];a240_0x3508=function(){return _0x2b1c49;};return a240_0x3508();}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x3fa191(0x159),'command':a240_0x3fa191(0x163),'description':a240_0x3fa191(0x15d),'risk':a240_0x3fa191(0x155),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x442680){readAppRuleType(_0x442680);},async 'execute'(_0x447ec0){const _0x311f1f=a240_0x3fa191,_0x3be4d1=readAppRuleType(_0x447ec0),_0x2b79b1=await getAppRule(_0x447ec0[_0x311f1f(0x151)],{'appCode':_0x447ec0[_0x311f1f(0x157)],'type':_0x3be4d1});if(!_0x2b79b1)throw appRuleError('app_rule_not_found',appRuleFileName(_0x3be4d1)+_0x311f1f(0x156)+_0x447ec0[_0x311f1f(0x157)]+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x3be4d1+_0x311f1f(0x154));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x3be4d1,_0x2b79b1),'content':_0x2b79b1[_0x311f1f(0x153)]}},'message':_0x311f1f(0x15f)+appRuleFileName(_0x3be4d1)+_0x311f1f(0x15e)+_0x447ec0[_0x311f1f(0x157)]};}};
1
+ function a240_0x24d6(){const _0x518390=['1171860pHiAEX','19416555brytTg','2021514TLghGK','appCode','cookie','4160760ixHLpJ','7367394yalxdy','read','\x20--file\x20<path>\x20--dry-run`.','content','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','\x20for\x20','3totKLj','get','app_rule_not_found','798237NeYUka','7GYegjb','Loaded\x20','\x20is\x20not\x20configured\x20for\x20app\x20','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','4485388EUvHGm','rule'];a240_0x24d6=function(){return _0x518390;};return a240_0x24d6();}const a240_0xd19bb3=a240_0x403a;(function(_0x4ac8e0,_0x25d046){const _0x3a7b4f=a240_0x403a,_0x4f17a8=_0x4ac8e0();while(!![]){try{const _0x2adfa6=parseInt(_0x3a7b4f(0xbb))/0x1+parseInt(_0x3a7b4f(0xc4))/0x2+-parseInt(_0x3a7b4f(0xb8))/0x3*(parseInt(_0x3a7b4f(0xc0))/0x4)+-parseInt(_0x3a7b4f(0xc2))/0x5+parseInt(_0x3a7b4f(0xb2))/0x6*(-parseInt(_0x3a7b4f(0xbc))/0x7)+-parseInt(_0x3a7b4f(0xb1))/0x8+parseInt(_0x3a7b4f(0xc3))/0x9;if(_0x2adfa6===_0x25d046)break;else _0x4f17a8['push'](_0x4f17a8['shift']());}catch(_0x2946b1){_0x4f17a8['push'](_0x4f17a8['shift']());}}}(a240_0x24d6,0xd29d4));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a240_0x403a(_0x57f88c,_0x359c84){_0x57f88c=_0x57f88c-0xb0;const _0x24d6df=a240_0x24d6();let _0x403aa3=_0x24d6df[_0x57f88c];return _0x403aa3;}export const ruleGet={'service':a240_0xd19bb3(0xc1),'command':a240_0xd19bb3(0xb9),'description':a240_0xd19bb3(0xbf),'risk':a240_0xd19bb3(0xb3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x15c21e){readAppRuleType(_0x15c21e);},async 'execute'(_0x235ab6){const _0x3aad07=a240_0xd19bb3,_0x3c5466=readAppRuleType(_0x235ab6),_0x6448a=await getAppRule(_0x235ab6[_0x3aad07(0xb0)],{'appCode':_0x235ab6[_0x3aad07(0xc5)],'type':_0x3c5466});if(!_0x6448a)throw appRuleError(_0x3aad07(0xba),appRuleFileName(_0x3c5466)+_0x3aad07(0xbe)+_0x235ab6[_0x3aad07(0xc5)]+'.',_0x3aad07(0xb6)+_0x3c5466+_0x3aad07(0xb4));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x3c5466,_0x6448a),'content':_0x6448a[_0x3aad07(0xb5)]}},'message':_0x3aad07(0xbd)+appRuleFileName(_0x3c5466)+_0x3aad07(0xb7)+_0x235ab6['appCode']};}};
@@ -1 +1 @@
1
- (function(_0x3e5c93,_0x1db9c8){const _0x31f13e=a241_0x13cf,_0x46cf3b=_0x3e5c93();while(!![]){try{const _0x5c10ad=parseInt(_0x31f13e(0xc0))/0x1*(parseInt(_0x31f13e(0xc6))/0x2)+parseInt(_0x31f13e(0xc4))/0x3+-parseInt(_0x31f13e(0xca))/0x4+-parseInt(_0x31f13e(0xc7))/0x5*(-parseInt(_0x31f13e(0xc9))/0x6)+parseInt(_0x31f13e(0xc2))/0x7*(-parseInt(_0x31f13e(0xc1))/0x8)+parseInt(_0x31f13e(0xc5))/0x9*(parseInt(_0x31f13e(0xc8))/0xa)+parseInt(_0x31f13e(0xcb))/0xb*(-parseInt(_0x31f13e(0xc3))/0xc);if(_0x5c10ad===_0x1db9c8)break;else _0x46cf3b['push'](_0x46cf3b['shift']());}catch(_0x500c87){_0x46cf3b['push'](_0x46cf3b['shift']());}}}(a241_0x2806,0xe46b7));function a241_0x13cf(_0x207a73,_0x2f51a8){_0x207a73=_0x207a73-0xc0;const _0x2806cd=a241_0x2806();let _0x13cfa4=_0x2806cd[_0x207a73];return _0x13cfa4;}import{ruleGet}from'../../commands/rule/get.js';function a241_0x2806(){const _0x4caffb=['1092384MBkUMB','21QFknZk','4067916uLZnpi','2731032PozuAq','13374ttcSfc','52858biNUvZ','493770lmJMFc','2510vrCQqF','72ZommYt','6625164LDZVMf','11dRuPIQ','33kDdFsi'];a241_0x2806=function(){return _0x4caffb;};return a241_0x2806();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ function a241_0x455b(_0x552871,_0x10bd14){_0x552871=_0x552871-0x19a;const _0x4a7139=a241_0x4a71();let _0x455b74=_0x4a7139[_0x552871];return _0x455b74;}function a241_0x4a71(){const _0x159b38=['630873VxmhQb','457740qRITpM','1481095lYUTBB','2430912OXmktG','749616fnLgIf','241698USImhU','91lqSUFg','15208UMqecw','729idPpTE'];a241_0x4a71=function(){return _0x159b38;};return a241_0x4a71();}(function(_0x3452e4,_0x5ac291){const _0x5ab829=a241_0x455b,_0x467522=_0x3452e4();while(!![]){try{const _0x42fd5b=parseInt(_0x5ab829(0x19d))/0x1+parseInt(_0x5ab829(0x1a1))/0x2+-parseInt(_0x5ab829(0x19e))/0x3+-parseInt(_0x5ab829(0x1a0))/0x4+-parseInt(_0x5ab829(0x19f))/0x5+-parseInt(_0x5ab829(0x1a2))/0x6*(-parseInt(_0x5ab829(0x19a))/0x7)+parseInt(_0x5ab829(0x19b))/0x8*(-parseInt(_0x5ab829(0x19c))/0x9);if(_0x42fd5b===_0x5ac291)break;else _0x467522['push'](_0x467522['shift']());}catch(_0x1392ea){_0x467522['push'](_0x467522['shift']());}}}(a241_0x4a71,0x4dd84));import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
@@ -1 +1 @@
1
- function a242_0x46fb(){const _0x2e0666=['12JjsUsO','rule','1208aWIpiv','17493QEwOHv','read','appCode','map','863DuwHix','6utrTXb','7443CnGOol','1257080xTSbBl','2279460JKbkFB','Loaded\x20app\x20rule\x20configuration\x20for\x20','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','2586518VnPyVi','cookie','4177062qemLTZ','length','1214OtvORn'];a242_0x46fb=function(){return _0x2e0666;};return a242_0x46fb();}const a242_0x3089d4=a242_0x307a;(function(_0x311c4c,_0x395d92){const _0x3c924d=a242_0x307a,_0x57a865=_0x311c4c();while(!![]){try{const _0x399024=-parseInt(_0x3c924d(0x16b))/0x1*(-parseInt(_0x3c924d(0x176))/0x2)+-parseInt(_0x3c924d(0x16d))/0x3*(-parseInt(_0x3c924d(0x177))/0x4)+-parseInt(_0x3c924d(0x16f))/0x5*(parseInt(_0x3c924d(0x16c))/0x6)+-parseInt(_0x3c924d(0x167))/0x7*(-parseInt(_0x3c924d(0x166))/0x8)+-parseInt(_0x3c924d(0x174))/0x9+parseInt(_0x3c924d(0x16e))/0xa+parseInt(_0x3c924d(0x172))/0xb;if(_0x399024===_0x395d92)break;else _0x57a865['push'](_0x57a865['shift']());}catch(_0x4ff6b6){_0x57a865['push'](_0x57a865['shift']());}}}(a242_0x46fb,0x5551d));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a242_0x307a(_0x2d2ec7,_0x2a24a0){_0x2d2ec7=_0x2d2ec7-0x165;const _0x46fb77=a242_0x46fb();let _0x307ad7=_0x46fb77[_0x2d2ec7];return _0x307ad7;}export const ruleList={'service':a242_0x3089d4(0x165),'command':'list','description':a242_0x3089d4(0x171),'risk':a242_0x3089d4(0x168),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x354026){const _0x5eb69e=a242_0x3089d4,_0x12875e=await Promise['all'](APP_RULE_TYPES[_0x5eb69e(0x16a)](_0x556d05=>getAppRule(_0x354026[_0x5eb69e(0x173)],{'appCode':_0x354026[_0x5eb69e(0x169)],'type':_0x556d05}))),_0x62f985=APP_RULE_TYPES['map']((_0x395988,_0x23ddd1)=>projectAppRule(_0x395988,_0x12875e[_0x23ddd1]??null));return{'ok':!![],'data':{'total':_0x62f985[_0x5eb69e(0x175)],'rules':_0x62f985},'message':_0x5eb69e(0x170)+_0x354026[_0x5eb69e(0x169)]};}};
1
+ const a242_0x45a412=a242_0x103f;(function(_0x1752b0,_0x3ccc57){const _0x42345b=a242_0x103f,_0x38ed5c=_0x1752b0();while(!![]){try{const _0x2743b9=-parseInt(_0x42345b(0x1ae))/0x1+-parseInt(_0x42345b(0x1bd))/0x2+-parseInt(_0x42345b(0x1b0))/0x3+parseInt(_0x42345b(0x1b8))/0x4+-parseInt(_0x42345b(0x1b1))/0x5*(-parseInt(_0x42345b(0x1b2))/0x6)+parseInt(_0x42345b(0x1ba))/0x7+parseInt(_0x42345b(0x1b4))/0x8*(parseInt(_0x42345b(0x1b3))/0x9);if(_0x2743b9===_0x3ccc57)break;else _0x38ed5c['push'](_0x38ed5c['shift']());}catch(_0x29a8eb){_0x38ed5c['push'](_0x38ed5c['shift']());}}}(a242_0x5131,0xf2362));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a242_0x103f(_0x5a7018,_0x432f7f){_0x5a7018=_0x5a7018-0x1ae;const _0x513185=a242_0x5131();let _0x103f0a=_0x513185[_0x5a7018];return _0x103f0a;}export const ruleList={'service':a242_0x45a412(0x1b7),'command':a242_0x45a412(0x1b5),'description':'List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x2d7fb9){const _0x59c138=a242_0x45a412,_0x396c4f=await Promise[_0x59c138(0x1b6)](APP_RULE_TYPES[_0x59c138(0x1bc)](_0x1c62fd=>getAppRule(_0x2d7fb9[_0x59c138(0x1bb)],{'appCode':_0x2d7fb9['appCode'],'type':_0x1c62fd}))),_0x1a2d9a=APP_RULE_TYPES['map']((_0x4388a2,_0x5449f3)=>projectAppRule(_0x4388a2,_0x396c4f[_0x5449f3]??null));return{'ok':!![],'data':{'total':_0x1a2d9a[_0x59c138(0x1af)],'rules':_0x1a2d9a},'message':'Loaded\x20app\x20rule\x20configuration\x20for\x20'+_0x2d7fb9[_0x59c138(0x1b9)]};}};function a242_0x5131(){const _0x376082=['422326HpwCGo','length','1578570hyadQH','261085SJnPJm','6NBUefa','9JWERaX','3187424ULleVt','list','all','rule','4697440pdbJGp','appCode','12147527yhEYnb','cookie','map','2839504XGDxjn'];a242_0x5131=function(){return _0x376082;};return a242_0x5131();}
@@ -1 +1 @@
1
- const a243_0xada9bc=a243_0x2601;function a243_0x1bae(){const _0x439b89=['number','write','Expected\x20','contentHash','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Pass\x20a\x20UTF-8\x20Markdown\x20file.','rule','version','flag','\x20for\x20','expectedVersion','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','\x20--format\x20compress','app_rule_version_mismatch','412948OIahnK','--file\x20is\x20required.','/smartapi/knowledge-base/save','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','4543506bzLDSd','push','cookie','beforeRecord','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','str','isSafeInteger','app_rule_set_outcome_unknown','type','rules','before','content','POST','appCode','Set\x20','byteSize','4984QjBcua','input',';\x20current\x20version\x20is\x20','replacement','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','trim','set','533093meJvIz','verified','5736960jGisKx','defineProperty','file','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','3952SroWWz','12383RUBnpB','410nVjCtr','60YnLdQc','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','string','\x20version\x20changed\x20before\x20write.','1002ADPfWr','rabetbase\x20rule\x20get\x20--type\x20','cause','43768zetZkk','app_rule_expected_version_invalid','unconfigured'];a243_0x1bae=function(){return _0x439b89;};return a243_0x1bae();}(function(_0x22d2a7,_0x52bca5){const _0x17f47c=a243_0x2601,_0x5dec2d=_0x22d2a7();while(!![]){try{const _0x28f370=-parseInt(_0x17f47c(0x16f))/0x1+parseInt(_0x17f47c(0x183))/0x2*(-parseInt(_0x17f47c(0x197))/0x3)+-parseInt(_0x17f47c(0x15e))/0x4*(parseInt(_0x17f47c(0x192))/0x5)+parseInt(_0x17f47c(0x18c))/0x6+-parseInt(_0x17f47c(0x191))/0x7*(-parseInt(_0x17f47c(0x190))/0x8)+parseInt(_0x17f47c(0x173))/0x9+parseInt(_0x17f47c(0x193))/0xa*(parseInt(_0x17f47c(0x18a))/0xb);if(_0x28f370===_0x52bca5)break;else _0x5dec2d['push'](_0x5dec2d['shift']());}catch(_0xacb31e){_0x5dec2d['push'](_0x5dec2d['shift']());}}}(a243_0x1bae,0x75f42));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function a243_0x2601(_0x412ede,_0x2c3489){_0x412ede=_0x412ede-0x15d;const _0x1bae4d=a243_0x1bae();let _0x260110=_0x1bae4d[_0x412ede];return _0x260110;}const SAVE_PATH=a243_0xada9bc(0x171),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.';function readSetInput(_0x2772cd){const _0x12e1f6=a243_0xada9bc,_0x398bd3=readAppRuleType(_0x2772cd),_0x42953c=_0x2772cd[_0x12e1f6(0x178)](_0x12e1f6(0x18e))[_0x12e1f6(0x188)]();if(!_0x42953c)throw appRuleError('app_rule_file_required',_0x12e1f6(0x170),_0x12e1f6(0x166));const _0x8273c0=_0x2772cd[_0x12e1f6(0x169)]('expected-version');let _0x485e35;if(_0x8273c0!==undefined){_0x485e35=Number(_0x8273c0);if(!Number[_0x12e1f6(0x179)](_0x485e35)||_0x485e35<0x0)throw appRuleError(_0x12e1f6(0x15f),_0x12e1f6(0x194));}return{'type':_0x398bd3,'file':_0x42953c,'expectedVersion':_0x485e35};}async function prepareSet(_0x53d0e0){const _0x38ba87=a243_0xada9bc,_0x120463=readSetInput(_0x53d0e0),_0x1b067a=await readAppRuleFile(_0x120463[_0x38ba87(0x18e)]),_0x599fe7=await getAppRule(_0x53d0e0[_0x38ba87(0x175)],{'appCode':_0x53d0e0[_0x38ba87(0x180)],'type':_0x120463['type']});if(_0x120463[_0x38ba87(0x16b)]!==undefined&&_0x599fe7?.[_0x38ba87(0x168)]!==_0x120463[_0x38ba87(0x16b)])throw appRuleError(_0x38ba87(0x16e),appRuleFileName(_0x120463[_0x38ba87(0x17b)])+_0x38ba87(0x196),_0x38ba87(0x163)+_0x120463[_0x38ba87(0x16b)]+_0x38ba87(0x185)+(_0x599fe7?.[_0x38ba87(0x168)]??_0x38ba87(0x160))+_0x38ba87(0x187));return{'input':_0x120463,'replacement':_0x1b067a,'beforeRecord':_0x599fe7,'before':projectAppRule(_0x120463['type'],_0x599fe7),'planned':{'type':_0x120463[_0x38ba87(0x17b)],'fileName':appRuleFileName(_0x120463[_0x38ba87(0x17b)]),'contextScope':appRuleContextScope(_0x120463[_0x38ba87(0x17b)]),'enabled':!![],'appCode':_0x53d0e0[_0x38ba87(0x180)],'scope':_0x38ba87(0x17c),'contentByteSize':_0x1b067a[_0x38ba87(0x182)],'contentHash':_0x1b067a[_0x38ba87(0x164)]}};}function warningsFor(_0x4364a2){return _0x4364a2===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a243_0xada9bc(0x167),'command':'set','description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a243_0xada9bc(0x162),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0xada9bc(0x18e),'type':a243_0xada9bc(0x195),'required':!![],'description':'UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)'},{'name':'expected-version','type':a243_0xada9bc(0x161),'required':![],'description':a243_0xada9bc(0x172)}],async 'validate'(_0x12260b){readSetInput(_0x12260b);},async 'dryRun'(_0x1aa3a5){const _0x85bcf4=a243_0xada9bc,_0x1207ad=await prepareSet(_0x1aa3a5);return asDryRunResult({'operation':_0x85bcf4(0x189),'selector':{'appCode':_0x1aa3a5[_0x85bcf4(0x180)],'scope':_0x85bcf4(0x17c),'type':_0x1207ad[_0x85bcf4(0x184)]['type']},'before':_0x1207ad[_0x85bcf4(0x17d)],'after':_0x1207ad['planned'],'dryRun':!![],'backend':{'method':_0x85bcf4(0x17f),'path':SAVE_PATH},'warnings':warningsFor(_0x1207ad[_0x85bcf4(0x184)][_0x85bcf4(0x16b)]),'verification':{'expectedVersion':_0x1207ad[_0x85bcf4(0x184)][_0x85bcf4(0x16b)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x85bcf4(0x198)+_0x1207ad['input'][_0x85bcf4(0x17b)]+_0x85bcf4(0x16d)}},{'method':_0x85bcf4(0x17f),'url':SAVE_PATH});},async 'execute'(_0x404106){const _0x3704cd=a243_0xada9bc,_0x273114=await prepareSet(_0x404106);let _0x2ee331=![];try{await saveAppRule(_0x404106[_0x3704cd(0x175)],{'appCode':_0x404106[_0x3704cd(0x180)],'type':_0x273114[_0x3704cd(0x184)]['type'],'content':_0x273114['replacement'][_0x3704cd(0x17e)]});}catch(_0x42aa79){if(!isPlatformTransportFailure(_0x42aa79))throw _0x42aa79;_0x2ee331=!![];}let _0x2f9d12;try{_0x2f9d12=await getAppRule(_0x404106[_0x3704cd(0x175)],{'appCode':_0x404106[_0x3704cd(0x180)],'type':_0x273114[_0x3704cd(0x184)][_0x3704cd(0x17b)]});}catch(_0x4e2302){const _0x45c2cc=appRuleError(_0x2ee331?_0x3704cd(0x17a):'app_rule_verification_unavailable','The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x273114['input'][_0x3704cd(0x17b)])+'\x20could\x20not\x20be\x20verified.',_0x3704cd(0x16c));Object[_0x3704cd(0x18d)](_0x45c2cc,_0x3704cd(0x15d),{'value':_0x4e2302,'enumerable':![]});throw _0x45c2cc;}const _0x128312=_0x2f9d12&&inspectAppRuleContent(_0x2f9d12[_0x3704cd(0x17e)])[_0x3704cd(0x164)]===_0x273114[_0x3704cd(0x186)][_0x3704cd(0x164)],_0x2af342=_0x2f9d12&&(_0x273114[_0x3704cd(0x176)]===null||_0x2f9d12[_0x3704cd(0x168)]>_0x273114[_0x3704cd(0x176)][_0x3704cd(0x168)]);if(!_0x2f9d12||!_0x128312||!_0x2af342)throw appRuleError(_0x2ee331?_0x3704cd(0x17a):'app_rule_verification_failed',appRuleFileName(_0x273114[_0x3704cd(0x184)]['type'])+_0x3704cd(0x177),_0x3704cd(0x165)+_0x273114['input']['type']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x38af85=warningsFor(_0x273114[_0x3704cd(0x184)][_0x3704cd(0x16b)]);_0x2ee331&&_0x38af85[_0x3704cd(0x174)](_0x3704cd(0x18f));const _0x27aa73=projectAppRule(_0x273114['input']['type'],_0x2f9d12);return{'ok':!![],'data':{'operation':_0x3704cd(0x189),'selector':{'appCode':_0x404106['appCode'],'scope':_0x3704cd(0x17c),'type':_0x273114[_0x3704cd(0x184)][_0x3704cd(0x17b)]},'before':_0x273114['before'],'after':_0x27aa73,'dryRun':![],'backend':{'method':_0x3704cd(0x17f),'path':SAVE_PATH},'warnings':_0x38af85,'verification':{'status':_0x3704cd(0x18b),'recoveredAfterUnknownResponse':_0x2ee331,'expectedVersion':_0x273114[_0x3704cd(0x184)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':_0x3704cd(0x198)+_0x273114[_0x3704cd(0x184)]['type']+'\x20--format\x20compress'}},'message':_0x3704cd(0x181)+appRuleFileName(_0x273114[_0x3704cd(0x184)][_0x3704cd(0x17b)])+_0x3704cd(0x16a)+_0x404106[_0x3704cd(0x180)]};}};
1
+ const a243_0x109f86=a243_0x18eb;(function(_0x71b966,_0x23ee6a){const _0x257bc9=a243_0x18eb,_0xbfb3e5=_0x71b966();while(!![]){try{const _0x3d9c65=parseInt(_0x257bc9(0x1c1))/0x1*(parseInt(_0x257bc9(0x1af))/0x2)+-parseInt(_0x257bc9(0x1b6))/0x3*(-parseInt(_0x257bc9(0x193))/0x4)+-parseInt(_0x257bc9(0x1a3))/0x5*(-parseInt(_0x257bc9(0x186))/0x6)+-parseInt(_0x257bc9(0x18b))/0x7+-parseInt(_0x257bc9(0x1ba))/0x8*(parseInt(_0x257bc9(0x188))/0x9)+-parseInt(_0x257bc9(0x1bd))/0xa*(parseInt(_0x257bc9(0x190))/0xb)+-parseInt(_0x257bc9(0x1a6))/0xc*(-parseInt(_0x257bc9(0x1a2))/0xd);if(_0x3d9c65===_0x23ee6a)break;else _0xbfb3e5['push'](_0xbfb3e5['shift']());}catch(_0x25efa4){_0xbfb3e5['push'](_0xbfb3e5['shift']());}}}(a243_0xb501,0xab060));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function a243_0x18eb(_0x523c4f,_0x368383){_0x523c4f=_0x523c4f-0x186;const _0xb501df=a243_0xb501();let _0x18eb10=_0xb501df[_0x523c4f];return _0x18eb10;}const SAVE_PATH=a243_0x109f86(0x18a),NON_ATOMIC_WARNING=a243_0x109f86(0x1b2);function readSetInput(_0x420963){const _0x1208c7=a243_0x109f86,_0x5ed411=readAppRuleType(_0x420963),_0x2ded44=_0x420963[_0x1208c7(0x191)]('file')[_0x1208c7(0x1bc)]();if(!_0x2ded44)throw appRuleError('app_rule_file_required','--file\x20is\x20required.',_0x1208c7(0x1b5));const _0x5dcb78=_0x420963[_0x1208c7(0x1b9)](_0x1208c7(0x1b1));let _0x57affb;if(_0x5dcb78!==undefined){_0x57affb=Number(_0x5dcb78);if(!Number[_0x1208c7(0x19b)](_0x57affb)||_0x57affb<0x0)throw appRuleError('app_rule_expected_version_invalid',_0x1208c7(0x199));}return{'type':_0x5ed411,'file':_0x2ded44,'expectedVersion':_0x57affb};}async function prepareSet(_0xf60765){const _0x202fd4=a243_0x109f86,_0x4a4166=readSetInput(_0xf60765),_0x259c75=await readAppRuleFile(_0x4a4166[_0x202fd4(0x1bf)]),_0x1625e4=await getAppRule(_0xf60765[_0x202fd4(0x1a1)],{'appCode':_0xf60765[_0x202fd4(0x1ab)],'type':_0x4a4166[_0x202fd4(0x1aa)]});if(_0x4a4166[_0x202fd4(0x19d)]!==undefined&&_0x1625e4?.[_0x202fd4(0x18f)]!==_0x4a4166[_0x202fd4(0x19d)])throw appRuleError(_0x202fd4(0x1b0),appRuleFileName(_0x4a4166[_0x202fd4(0x1aa)])+_0x202fd4(0x1b8),_0x202fd4(0x1ac)+_0x4a4166[_0x202fd4(0x19d)]+_0x202fd4(0x1ad)+(_0x1625e4?.['version']??'unconfigured')+_0x202fd4(0x18c));return{'input':_0x4a4166,'replacement':_0x259c75,'beforeRecord':_0x1625e4,'before':projectAppRule(_0x4a4166[_0x202fd4(0x1aa)],_0x1625e4),'planned':{'type':_0x4a4166[_0x202fd4(0x1aa)],'fileName':appRuleFileName(_0x4a4166[_0x202fd4(0x1aa)]),'contextScope':appRuleContextScope(_0x4a4166[_0x202fd4(0x1aa)]),'enabled':!![],'appCode':_0xf60765[_0x202fd4(0x1ab)],'scope':_0x202fd4(0x19c),'contentByteSize':_0x259c75[_0x202fd4(0x194)],'contentHash':_0x259c75[_0x202fd4(0x18d)]}};}function warningsFor(_0x101987){return _0x101987===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':'rule','command':a243_0x109f86(0x1a5),'description':a243_0x109f86(0x189),'risk':a243_0x109f86(0x19f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x109f86(0x1bf),'type':a243_0x109f86(0x1b7),'required':!![],'description':a243_0x109f86(0x1bb)},{'name':'expected-version','type':a243_0x109f86(0x1b4),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x966779){readSetInput(_0x966779);},async 'dryRun'(_0x55e06d){const _0x35cf14=a243_0x109f86,_0x820052=await prepareSet(_0x55e06d);return asDryRunResult({'operation':_0x35cf14(0x1a5),'selector':{'appCode':_0x55e06d[_0x35cf14(0x1ab)],'scope':_0x35cf14(0x19c),'type':_0x820052[_0x35cf14(0x19e)][_0x35cf14(0x1aa)]},'before':_0x820052[_0x35cf14(0x187)],'after':_0x820052[_0x35cf14(0x1a8)],'dryRun':!![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':warningsFor(_0x820052[_0x35cf14(0x19e)][_0x35cf14(0x19d)]),'verification':{'expectedVersion':_0x820052[_0x35cf14(0x19e)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x820052[_0x35cf14(0x19e)][_0x35cf14(0x1aa)]+'\x20--format\x20compress'}},{'method':_0x35cf14(0x1c0),'url':SAVE_PATH});},async 'execute'(_0x136530){const _0xf6a130=a243_0x109f86,_0x4fa50c=await prepareSet(_0x136530);let _0x1f934b=![];try{await saveAppRule(_0x136530['cookie'],{'appCode':_0x136530[_0xf6a130(0x1ab)],'type':_0x4fa50c[_0xf6a130(0x19e)]['type'],'content':_0x4fa50c[_0xf6a130(0x198)]['content']});}catch(_0x2661d6){if(!isPlatformTransportFailure(_0x2661d6))throw _0x2661d6;_0x1f934b=!![];}let _0x107569;try{_0x107569=await getAppRule(_0x136530['cookie'],{'appCode':_0x136530[_0xf6a130(0x1ab)],'type':_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x1aa)]});}catch(_0x151710){const _0x1a6949=appRuleError(_0x1f934b?'app_rule_set_outcome_unknown':_0xf6a130(0x192),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x4fa50c['input'][_0xf6a130(0x1aa)])+_0xf6a130(0x1b3),_0xf6a130(0x1a9));Object[_0xf6a130(0x19a)](_0x1a6949,_0xf6a130(0x1a0),{'value':_0x151710,'enumerable':![]});throw _0x1a6949;}const _0x498526=_0x107569&&inspectAppRuleContent(_0x107569['content'])['contentHash']===_0x4fa50c[_0xf6a130(0x198)][_0xf6a130(0x18d)],_0x156abe=_0x107569&&(_0x4fa50c['beforeRecord']===null||_0x107569[_0xf6a130(0x18f)]>_0x4fa50c[_0xf6a130(0x197)][_0xf6a130(0x18f)]);if(!_0x107569||!_0x498526||!_0x156abe)throw appRuleError(_0x1f934b?_0xf6a130(0x18e):'app_rule_verification_failed',appRuleFileName(_0x4fa50c[_0xf6a130(0x19e)]['type'])+_0xf6a130(0x195),_0xf6a130(0x1a7)+_0x4fa50c['input'][_0xf6a130(0x1aa)]+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x55e0d9=warningsFor(_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x19d)]);_0x1f934b&&_0x55e0d9['push']('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x2754c5=projectAppRule(_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x1aa)],_0x107569);return{'ok':!![],'data':{'operation':_0xf6a130(0x1a5),'selector':{'appCode':_0x136530['appCode'],'scope':_0xf6a130(0x19c),'type':_0x4fa50c['input'][_0xf6a130(0x1aa)]},'before':_0x4fa50c['before'],'after':_0x2754c5,'dryRun':![],'backend':{'method':_0xf6a130(0x1c0),'path':SAVE_PATH},'warnings':_0x55e0d9,'verification':{'status':_0xf6a130(0x1c2),'recoveredAfterUnknownResponse':_0x1f934b,'expectedVersion':_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x19d)]??null,'atomicCompareAndSet':![],'lookupCommand':_0xf6a130(0x1a4)+_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x1aa)]+_0xf6a130(0x1ae)}},'message':_0xf6a130(0x196)+appRuleFileName(_0x4fa50c[_0xf6a130(0x19e)][_0xf6a130(0x1aa)])+_0xf6a130(0x1be)+_0x136530['appCode']};}};function a243_0xb501(){const _0x2b60f2=['app_rule_version_mismatch','expected-version','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','\x20could\x20not\x20be\x20verified.','number','Pass\x20a\x20UTF-8\x20Markdown\x20file.','9SsBAUl','string','\x20version\x20changed\x20before\x20write.','flag','4752shgBJI','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','trim','1344670BKHRDf','\x20for\x20','file','POST','24524WeRALO','verified','282SrMOYe','before','6363hKhDDT','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','/smartapi/knowledge-base/save','7671846kdotDq','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','contentHash','app_rule_set_outcome_unknown','version','66rjYxUd','str','app_rule_verification_unavailable','1863032AABCUt','byteSize','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','Set\x20','beforeRecord','replacement','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','defineProperty','isSafeInteger','rules','expectedVersion','input','write','cause','cookie','9828442ygvsUK','11670lJcUqh','rabetbase\x20rule\x20get\x20--type\x20','set','12HDOXrm','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','planned','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','type','appCode','Expected\x20',';\x20current\x20version\x20is\x20','\x20--format\x20compress','62weayTg'];a243_0xb501=function(){return _0x2b60f2;};return a243_0xb501();}