@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.3

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 (372) hide show
  1. package/README.md +4 -3
  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/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.d.ts +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/detail.js +1 -1
  78. package/lib/commands/dataset/extend-update.js +1 -1
  79. package/lib/commands/dataset/field-restore.js +1 -1
  80. package/lib/commands/dataset/field-update.js +1 -1
  81. package/lib/commands/dataset/generate.js +1 -1
  82. package/lib/commands/dataset/index.js +1 -1
  83. package/lib/commands/dataset/list.js +1 -1
  84. package/lib/commands/dataset/operations.js +1 -1
  85. package/lib/commands/dataset/relation-audit.js +1 -1
  86. package/lib/commands/dataset/relation-create.js +1 -1
  87. package/lib/commands/dataset/relation-delete.js +1 -1
  88. package/lib/commands/dataset/relation-shared.js +1 -1
  89. package/lib/commands/dataset/relation-update.js +1 -1
  90. package/lib/commands/dataset/relations.js +1 -1
  91. package/lib/commands/dataset/rename.js +1 -1
  92. package/lib/commands/dataset/restore.js +1 -1
  93. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  94. package/lib/commands/db/analysis-batching.js +1 -1
  95. package/lib/commands/db/analyze-batch-plan.js +1 -1
  96. package/lib/commands/db/analyze-cancel.js +1 -1
  97. package/lib/commands/db/analyze-start.js +1 -1
  98. package/lib/commands/db/analyze-status.js +1 -1
  99. package/lib/commands/db/create.js +1 -1
  100. package/lib/commands/db/delete.js +1 -1
  101. package/lib/commands/db/detail.js +1 -1
  102. package/lib/commands/db/diff-refresh-start.js +1 -1
  103. package/lib/commands/db/diff-refresh-status.js +1 -1
  104. package/lib/commands/db/diff.js +1 -1
  105. package/lib/commands/db/index.js +1 -1
  106. package/lib/commands/db/list.js +1 -1
  107. package/lib/commands/db/shared.js +1 -1
  108. package/lib/commands/db/table-diff-shared.js +1 -1
  109. package/lib/commands/db/tables.js +1 -1
  110. package/lib/commands/db/test.js +1 -1
  111. package/lib/commands/db/update.js +1 -1
  112. package/lib/commands/deployment/index.js +1 -1
  113. package/lib/commands/deployment/sync-all.js +1 -1
  114. package/lib/commands/deployment/sync-jobs.js +1 -1
  115. package/lib/commands/deployment/sync-status.js +1 -1
  116. package/lib/commands/doctor.js +1 -1
  117. package/lib/commands/file/index.js +1 -1
  118. package/lib/commands/flow/create.js +1 -1
  119. package/lib/commands/flow/detail.js +1 -1
  120. package/lib/commands/flow/index.js +1 -1
  121. package/lib/commands/flow/list.js +1 -1
  122. package/lib/commands/flow/publish.js +1 -1
  123. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  124. package/lib/commands/flow/runtime-role-list.js +1 -1
  125. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  126. package/lib/commands/flow/runtime-user-search.js +1 -1
  127. package/lib/commands/flow/shared.js +1 -1
  128. package/lib/commands/flow/update.js +1 -1
  129. package/lib/commands/flow/validate.js +1 -1
  130. package/lib/commands/instant-api-policy/current.js +1 -1
  131. package/lib/commands/instant-api-policy/index.js +1 -1
  132. package/lib/commands/instant-api-policy/init.js +1 -1
  133. package/lib/commands/instant-api-policy/publish.js +1 -1
  134. package/lib/commands/instant-api-policy/pull.js +1 -1
  135. package/lib/commands/instant-api-policy/revision.js +1 -1
  136. package/lib/commands/instant-api-policy/revisions.js +1 -1
  137. package/lib/commands/instant-api-policy/rollback.js +1 -1
  138. package/lib/commands/instant-api-policy/shared.js +1 -1
  139. package/lib/commands/instant-api-policy/validate.js +1 -1
  140. package/lib/commands/issue/index.js +1 -1
  141. package/lib/commands/issue/nudge.js +1 -1
  142. package/lib/commands/issue/report.js +1 -1
  143. package/lib/commands/issue/shared.js +1 -1
  144. package/lib/commands/kb/create.js +1 -1
  145. package/lib/commands/kb/delete.js +1 -1
  146. package/lib/commands/kb/detail.js +1 -1
  147. package/lib/commands/kb/index.js +1 -1
  148. package/lib/commands/kb/list.js +1 -1
  149. package/lib/commands/kb/search.js +1 -1
  150. package/lib/commands/kb/shared.js +1 -1
  151. package/lib/commands/kb/update.js +1 -1
  152. package/lib/commands/logs/index.js +1 -1
  153. package/lib/commands/menu/asset-update.js +1 -1
  154. package/lib/commands/menu/delete.js +1 -1
  155. package/lib/commands/menu/external-link-create.js +1 -1
  156. package/lib/commands/menu/external-link-update.js +1 -1
  157. package/lib/commands/menu/group-create.js +1 -1
  158. package/lib/commands/menu/group-update.js +1 -1
  159. package/lib/commands/menu/index.js +1 -1
  160. package/lib/commands/menu/list.js +1 -1
  161. package/lib/commands/menu/move.js +1 -1
  162. package/lib/commands/menu/regroup-start.js +1 -1
  163. package/lib/commands/menu/rename.js +1 -1
  164. package/lib/commands/menu/shared/compare-table.js +1 -1
  165. package/lib/commands/menu/shared/delete-plan.js +1 -1
  166. package/lib/commands/menu/shared/facts.js +1 -1
  167. package/lib/commands/menu/shared/index.js +1 -1
  168. package/lib/commands/menu/shared/inquirer.js +1 -1
  169. package/lib/commands/menu/shared/local-pages.js +1 -1
  170. package/lib/commands/menu/shared/logic.js +1 -1
  171. package/lib/commands/menu/shared/mutations.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/sync-core.js +1 -1
  174. package/lib/commands/menu/shared/update-core.js +1 -1
  175. package/lib/commands/menu/shared/valid-url.js +1 -1
  176. package/lib/commands/menu/sync.js +1 -1
  177. package/lib/commands/menu/visibility-update.js +1 -1
  178. package/lib/commands/notification/config-create.js +1 -1
  179. package/lib/commands/notification/config-delete.js +1 -1
  180. package/lib/commands/notification/config-list.js +1 -1
  181. package/lib/commands/notification/config-update.js +1 -1
  182. package/lib/commands/notification/index.js +1 -1
  183. package/lib/commands/notification/shared.js +1 -1
  184. package/lib/commands/ocr/index.js +1 -1
  185. package/lib/commands/page/create.js +1 -1
  186. package/lib/commands/page/custom/detail.js +1 -1
  187. package/lib/commands/page/custom/list.js +1 -1
  188. package/lib/commands/page/custom/publish.js +1 -1
  189. package/lib/commands/page/custom/shared.js +1 -1
  190. package/lib/commands/page/custom/syntax.js +1 -1
  191. package/lib/commands/page/custom/update.js +1 -1
  192. package/lib/commands/page/data-list-status.js +1 -1
  193. package/lib/commands/page/generate-start.js +1 -1
  194. package/lib/commands/page/generate-status.js +1 -1
  195. package/lib/commands/page/index.js +1 -1
  196. package/lib/commands/page/pull.js +1 -1
  197. package/lib/commands/page/push.js +1 -1
  198. package/lib/commands/page/relation-audit.js +1 -1
  199. package/lib/commands/page/restore.js +1 -1
  200. package/lib/commands/page/shared.js +1 -1
  201. package/lib/commands/page/sync.js +1 -1
  202. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  203. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  204. package/lib/commands/project/create/format-elapsed.js +1 -1
  205. package/lib/commands/project/create/main.js +1 -1
  206. package/lib/commands/project/create/materialize-project-template.js +1 -1
  207. package/lib/commands/project/create/project-name.js +1 -1
  208. package/lib/commands/project/create/project-template-archive.js +1 -1
  209. package/lib/commands/project/create/project-template-path.js +1 -1
  210. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  211. package/lib/commands/project/create/use-format-code.js +1 -1
  212. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  213. package/lib/commands/project/domain-routing-sync.js +1 -1
  214. package/lib/commands/project/index.js +1 -1
  215. package/lib/commands/project/upgrade.js +1 -1
  216. package/lib/commands/registry.js +1 -1
  217. package/lib/commands/role/delete.js +1 -1
  218. package/lib/commands/role/detail.js +1 -1
  219. package/lib/commands/role/index.js +1 -1
  220. package/lib/commands/role/list.js +1 -1
  221. package/lib/commands/role/shared.js +1 -1
  222. package/lib/commands/role/update.js +1 -1
  223. package/lib/commands/role/user-add.js +1 -1
  224. package/lib/commands/role/user-remove.js +1 -1
  225. package/lib/commands/role/user-resolve.js +1 -1
  226. package/lib/commands/rule/get.js +1 -1
  227. package/lib/commands/rule/index.js +1 -1
  228. package/lib/commands/rule/list.js +1 -1
  229. package/lib/commands/rule/set.js +1 -1
  230. package/lib/commands/rule/shared.js +1 -1
  231. package/lib/commands/run/index.js +1 -1
  232. package/lib/commands/schema.js +1 -1
  233. package/lib/commands/sql/create.js +1 -1
  234. package/lib/commands/sql/delete.js +1 -1
  235. package/lib/commands/sql/detail.js +1 -1
  236. package/lib/commands/sql/exec.js +1 -1
  237. package/lib/commands/sql/index.js +1 -1
  238. package/lib/commands/sql/list.js +1 -1
  239. package/lib/commands/sql/pull.js +1 -1
  240. package/lib/commands/sql/push.js +1 -1
  241. package/lib/commands/sql/shared.js +1 -1
  242. package/lib/commands/sql/status.js +1 -1
  243. package/lib/commands/sql/validate.js +1 -1
  244. package/lib/commands/task/index.js +1 -1
  245. package/lib/commands/task/status.js +1 -1
  246. package/lib/commands/tenant/index.js +1 -1
  247. package/lib/commands/tenant/members-list.js +1 -1
  248. package/lib/commands/tenant/shared.js +1 -1
  249. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  250. package/lib/commands/user-account/feishu-bind.d.ts +2 -0
  251. package/lib/commands/user-account/feishu-bind.js +1 -0
  252. package/lib/commands/user-account/index.js +1 -1
  253. package/lib/commands/workspace/add.js +1 -1
  254. package/lib/commands/workspace/index.js +1 -1
  255. package/lib/commands/workspace/remove.js +1 -1
  256. package/lib/config/domain-config.d.ts +1 -1
  257. package/lib/config/domain-config.js +1 -1
  258. package/lib/config/project-domain-routing.js +1 -1
  259. package/lib/config/region-config.js +1 -1
  260. package/lib/config/schema.d.ts +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.d.ts +4 -0
  266. package/lib/constant/domain.js +1 -1
  267. package/lib/constant/env.js +1 -1
  268. package/lib/constant/output.js +1 -1
  269. package/lib/constant/paths.js +1 -1
  270. package/lib/constant/region.d.ts +1 -1
  271. package/lib/constant/region.js +1 -1
  272. package/lib/constant/risk.js +1 -1
  273. package/lib/constant/routing-profile.d.ts +14 -1
  274. package/lib/constant/routing-profile.js +1 -1
  275. package/lib/context/app-resolver.d.ts +1 -0
  276. package/lib/context/app-resolver.js +1 -1
  277. package/lib/context/auth-resolver.js +1 -1
  278. package/lib/context/config-loader.js +1 -1
  279. package/lib/context.js +1 -1
  280. package/lib/core/alias-resolver.js +1 -1
  281. package/lib/core/api-client.d.ts +2 -0
  282. package/lib/core/api-client.js +1 -1
  283. package/lib/core/bff/config.js +1 -1
  284. package/lib/core/bff/file-system.js +1 -1
  285. package/lib/core/bff/hash.js +1 -1
  286. package/lib/core/bff/hook-directory.js +1 -1
  287. package/lib/core/bff/lock.js +1 -1
  288. package/lib/core/bff/utils.js +1 -1
  289. package/lib/core/cross-db-relation.js +1 -1
  290. package/lib/core/db-resolver.js +1 -1
  291. package/lib/core/flow-config.js +1 -1
  292. package/lib/core/instant-api-policy/config.js +1 -1
  293. package/lib/core/kb-search-client.js +1 -1
  294. package/lib/core/page/file-system.js +1 -1
  295. package/lib/core/page/hash.js +1 -1
  296. package/lib/core/page/lock.js +1 -1
  297. package/lib/core/page/lr-smart-jsx.js +1 -1
  298. package/lib/core/sql-index-auditor.js +1 -1
  299. package/lib/core/sql-sync/config.js +1 -1
  300. package/lib/core/sql-sync/file-system.js +1 -1
  301. package/lib/core/sql-sync/hash.js +1 -1
  302. package/lib/core/sql-sync/lock.js +1 -1
  303. package/lib/core/sql-sync/utils.js +1 -1
  304. package/lib/core/sql-validator.js +1 -1
  305. package/lib/errors.js +1 -1
  306. package/lib/framework/build-all-flags.js +1 -1
  307. package/lib/framework/error-output.js +1 -1
  308. package/lib/framework/explicit-yes.js +1 -1
  309. package/lib/framework/flags.js +1 -1
  310. package/lib/framework/help.js +1 -1
  311. package/lib/framework/index.js +1 -1
  312. package/lib/framework/output.js +1 -1
  313. package/lib/framework/response.js +1 -1
  314. package/lib/framework/runner-alias.js +1 -1
  315. package/lib/framework/runner.js +1 -1
  316. package/lib/framework/schema-export.js +1 -1
  317. package/lib/framework/supported-flags.js +1 -1
  318. package/lib/framework/types.js +1 -1
  319. package/lib/generated/build-info.d.ts +4 -4
  320. package/lib/generated/build-info.js +1 -1
  321. package/lib/generated/official-routing.d.ts +15 -3
  322. package/lib/generated/official-routing.js +1 -1
  323. package/lib/generated/routing-contract.d.ts +2 -2
  324. package/lib/generated/routing-contract.js +1 -1
  325. package/lib/help.js +1 -1
  326. package/lib/postinstall.js +1 -1
  327. package/lib/runtime/confirmation.js +1 -1
  328. package/lib/runtime/event.js +1 -1
  329. package/lib/runtime/index.js +1 -1
  330. package/lib/runtime/queue.js +1 -1
  331. package/lib/runtime/resolve.js +1 -1
  332. package/lib/skills/builtin-skill.js +1 -1
  333. package/lib/skills/main.js +1 -1
  334. package/lib/skills/npx-skills-add.d.ts +5 -0
  335. package/lib/skills/npx-skills-add.js +1 -1
  336. package/lib/skills/skill-presence.js +1 -1
  337. package/lib/telemetry/cli-command-trace.js +1 -1
  338. package/lib/telemetry/cli-help-trace.js +1 -1
  339. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  340. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  341. package/lib/telemetry/send-cli-trace-log.js +1 -1
  342. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  343. package/lib/utils/ai_config.js +1 -1
  344. package/lib/utils/apply-jq-filter.js +1 -1
  345. package/lib/utils/cdn-config.js +1 -1
  346. package/lib/utils/check-sdk-version.js +1 -1
  347. package/lib/utils/cli-version-check.js +1 -1
  348. package/lib/utils/cli-version-policy.js +1 -1
  349. package/lib/utils/config.js +1 -1
  350. package/lib/utils/entity-with-id.js +1 -1
  351. package/lib/utils/file-utils.js +1 -1
  352. package/lib/utils/guides-cdn.js +1 -1
  353. package/lib/utils/http-client.js +1 -1
  354. package/lib/utils/is-non-interactive.js +1 -1
  355. package/lib/utils/logger.js +1 -1
  356. package/lib/utils/params.js +1 -1
  357. package/lib/utils/platform.js +1 -1
  358. package/lib/utils/sleep.js +1 -1
  359. package/lib/utils/template-replacer.js +1 -1
  360. package/lib/utils/update-notice.js +1 -1
  361. package/lib/utils/version.js +1 -1
  362. package/lib/utils/with-active-cookie.js +1 -1
  363. package/lib/utils/write-cli-side-channel.js +1 -1
  364. package/package.json +1 -1
  365. package/skills/rabetbase/SKILL.md +4 -3
  366. package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
  367. package/skills/rabetbase/guides/sql-mybatis.md +12 -8
  368. package/skills/rabetbase/references/rabetbase-config.md +6 -4
  369. package/skills/rabetbase/references/rabetbase-init.md +7 -5
  370. package/skills/rabetbase/references/rabetbase-kb.md +8 -6
  371. package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
  372. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x4ed021,_0x1f104b){const _0x30c902=a213_0x9470,_0x541e66=_0x4ed021();while(!![]){try{const _0x389e99=-parseInt(_0x30c902(0xe1))/0x1+parseInt(_0x30c902(0x9f))/0x2*(parseInt(_0x30c902(0x9e))/0x3)+-parseInt(_0x30c902(0xc8))/0x4*(-parseInt(_0x30c902(0xe2))/0x5)+parseInt(_0x30c902(0xc7))/0x6*(parseInt(_0x30c902(0xb2))/0x7)+-parseInt(_0x30c902(0xdb))/0x8*(parseInt(_0x30c902(0xc5))/0x9)+parseInt(_0x30c902(0xca))/0xa+-parseInt(_0x30c902(0xa8))/0xb;if(_0x389e99===_0x1f104b)break;else _0x541e66['push'](_0x541e66['shift']());}catch(_0x5921b4){_0x541e66['push'](_0x541e66['shift']());}}}(a213_0xb2ed,0xa2916));import a213_0x58369f from'chalk';import a213_0x2416b5 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a213_0xb2ed(){const _0x45f3da=['FAIL','cwd','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','log','yes','cyan','fail','length','\x20\x20\x20\x20','step','green','not\x20found\x20or\x20already\x20at\x20latest','42099BGrCkT','174OVjDnR','failed','profiles','\x20→\x20','Upgrade\x20application\x20source','@lovrabet/sdk:','Upgrade\x20@lovrabet/sdk','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','33242143eUGcnS','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','bold','apiArchitecture','\x20\x20#\x20or','===\x20Upgrade\x20Summary\x20===','package.json','gray','label','detail','6814682FsuBEV','white','source\x20structure\x20is\x20current','needed','\x20\x20bun\x20install','string','Your\x20project\x20is\x20already\x20up-to-date.','upgrade\x20needed','path','manualMergeRequired','\x20\x20Step\x20','latest','object','CANCEL','Step\x202/2:\x20Application\x20source\x20—\x20','Upgrade\x20completed\x20successfully!','utf8','push','Upgrade\x20cancelled.','4122SYiTJh','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','6YxiZzC','4wKqUzw','===\x20Upgrade\x20Analysis\x20===','2994880hYScnk','parse','message','skippedLegacyDirectories','\x20\x20\x20\x20\x20\x20candidate:\x20','succeed','yellow','start','@lovrabet/sdk','groups','action','\x20\x20npm\x20install','sdkUpgrade','apiDir','\x20\x20\x20\x20\x20\x20\x20','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','up-to-date','1024jOSXiV','padEnd','stringify','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','candidatePath','1211vSAIgi','6269205EybHZV'];a213_0xb2ed=function(){return _0x45f3da;};return a213_0xb2ed();}import{resolve}from'node:path';function a213_0x9470(_0x4502b6,_0x28c0bd){_0x4502b6=_0x4502b6-0x97;const _0xb2ed81=a213_0xb2ed();let _0x947023=_0xb2ed81[_0x4502b6];return _0x947023;}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(_0x372d49){const _0x52770a=a213_0x9470;try{const _0x595928=JSON[_0x52770a(0xcb)](readFileSync(_0x372d49,'utf8'));return _0x595928&&typeof _0x595928===_0x52770a(0xbe)?_0x595928:{};}catch{return{};}}export function analyseProjectUpgrade(_0x271f64){const _0x39d333=a213_0x9470;let _0x2926a9=null;const _0x221c28=resolve(_0x271f64,_0x39d333(0xae));if(existsSync(_0x221c28))try{const _0x2bff1e=JSON[_0x39d333(0xcb)](readFileSync(_0x221c28,_0x39d333(0xc2)));for(const _0x3e6617 of['dependencies','devDependencies']){const _0x323099=_0x2bff1e?.[_0x3e6617]?.[_0x39d333(0xd2)];if(typeof _0x323099===_0x39d333(0xb7)){_0x323099!==_0x39d333(0xbd)&&(_0x2926a9={'pkgPath':_0x221c28,'currentVersion':_0x323099,'field':_0x3e6617});break;}}}catch{}const _0x37aa8b=resolve(_0x271f64,NEW_CONFIG_NAME),_0x3b4f00=existsSync(_0x37aa8b)?readProjectConfig(_0x37aa8b):{},_0x43502d=analyzeProjectApiArchitecture(_0x271f64,_0x3b4f00);return{'sdkUpgrade':_0x2926a9,'apiArchitecture':_0x43502d};}function printReport(_0x13827a){const _0x1c7c5a=a213_0x9470;console['log'](''),console[_0x1c7c5a(0xe7)](a213_0x58369f[_0x1c7c5a(0xaa)](_0x1c7c5a(0xc9))),console['log'](''),console['log'](a213_0x58369f[_0x1c7c5a(0x97)]('Application\x20source:')+('\x20\x20'+(_0x13827a[_0x1c7c5a(0xab)]['needed']?a213_0x58369f[_0x1c7c5a(0xd0)](_0x1c7c5a(0xb9)):a213_0x58369f[_0x1c7c5a(0x9c)](_0x1c7c5a(0xda)))));for(const _0x438ff6 of _0x13827a[_0x1c7c5a(0xab)][_0x1c7c5a(0xd3)]){console[_0x1c7c5a(0xe7)]('\x20\x20'+_0x438ff6[_0x1c7c5a(0xd7)]+'\x20('+_0x438ff6[_0x1c7c5a(0xa1)]['join'](',\x20')+')');for(const _0x4c1e7b of _0x438ff6['files']){console[_0x1c7c5a(0xe7)](_0x1c7c5a(0x9a)+_0x4c1e7b[_0x1c7c5a(0xd4)][_0x1c7c5a(0xdc)](0x11)+'\x20'+_0x4c1e7b[_0x1c7c5a(0xba)]),_0x4c1e7b[_0x1c7c5a(0xe0)]&&console['log'](_0x1c7c5a(0xce)+_0x4c1e7b['candidatePath']);}}_0x13827a['apiArchitecture'][_0x1c7c5a(0xcd)][_0x1c7c5a(0x99)]>0x0&&console[_0x1c7c5a(0xe7)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x1c7c5a(0xe7)]('');if(_0x13827a['sdkUpgrade']){const {currentVersion:_0x397cef,field:_0x232794,pkgPath:_0x3b036f}=_0x13827a[_0x1c7c5a(0xd6)];console[_0x1c7c5a(0xe7)](a213_0x58369f[_0x1c7c5a(0x97)]('@lovrabet/sdk:')+('\x20\x20'+a213_0x58369f['yellow'](_0x3b036f))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0x232794+':\x20'+a213_0x58369f[_0x1c7c5a(0xd0)](_0x397cef)+_0x1c7c5a(0xa2)+a213_0x58369f['green'](_0x1c7c5a(0xbd))),console[_0x1c7c5a(0xe7)](_0x1c7c5a(0xe6));}else console[_0x1c7c5a(0xe7)](a213_0x58369f[_0x1c7c5a(0x97)](_0x1c7c5a(0xa4))+'\x20\x20'+a213_0x58369f['gray'](_0x1c7c5a(0x9d)));console['log']('');}function execUpgradeSdk(_0x1a028d){const _0x39c007=a213_0x9470;if(!_0x1a028d[_0x39c007(0xd6)])return{'step':0x1,'label':_0x39c007(0xa5),'ok':!![],'detail':_0x39c007(0xde)};const {pkgPath:_0x1298ef,currentVersion:_0x15ffa4,field:_0xfade4f}=_0x1a028d[_0x39c007(0xd6)];try{const _0x2489a4=readFileSync(_0x1298ef,_0x39c007(0xc2)),_0x4995f4=JSON[_0x39c007(0xcb)](_0x2489a4);return _0x4995f4[_0xfade4f]['@lovrabet/sdk']=_0x39c007(0xbd),writeFileSync(_0x1298ef,JSON[_0x39c007(0xdd)](_0x4995f4,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':_0x39c007(0xa5),'ok':!![],'detail':_0xfade4f+'[\x22@lovrabet/sdk\x22]:\x20'+_0x15ffa4+'\x20→\x20latest'};}catch(_0x2e4ed2){return{'step':0x1,'label':_0x39c007(0xa5),'ok':![],'detail':_0x2e4ed2 instanceof Error?_0x2e4ed2[_0x39c007(0xcc)]:String(_0x2e4ed2)};}}function printSummary(_0x46d623){const _0xdb56a9=a213_0x9470;console[_0xdb56a9(0xe7)](''),console[_0xdb56a9(0xe7)](a213_0x58369f[_0xdb56a9(0xaa)](_0xdb56a9(0xad))),console[_0xdb56a9(0xe7)]('');for(const _0x49b539 of _0x46d623){const _0x2bcc4c=_0x49b539['ok']?a213_0x58369f[_0xdb56a9(0x9c)]('OK'):a213_0x58369f['red'](_0xdb56a9(0xe3));console[_0xdb56a9(0xe7)]('\x20\x20'+_0x2bcc4c+_0xdb56a9(0xbc)+_0x49b539[_0xdb56a9(0x9b)]+':\x20'+_0x49b539[_0xdb56a9(0xb0)]);if(_0x49b539['detail'])console[_0xdb56a9(0xe7)](_0xdb56a9(0xd8)+a213_0x58369f[_0xdb56a9(0xaf)](_0x49b539[_0xdb56a9(0xb1)]));}console[_0xdb56a9(0xe7)]('');}export async function upgradeApp(_0x3df3e0,_0x1fae65){const _0x577cde=a213_0x9470,_0xf068d8=process[_0x577cde(0xe4)](),_0x188d78=analyseProjectUpgrade(_0xf068d8);if(!_0x188d78[_0x577cde(0xd6)]&&!_0x188d78[_0x577cde(0xab)][_0x577cde(0xb5)])return console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0x9c)](_0x577cde(0xb8))),{'analysis':_0x188d78,'steps':[],'completed':!![]};printReport(_0x188d78);const _0x1713b0=!!(_0x1fae65[_0x577cde(0xe8)]||_0x1fae65['Y']||_0x3df3e0);if(!_0x1713b0)try{const _0x2baf6d=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x2baf6d)return console['log'](a213_0x58369f['gray'](_0x577cde(0xc4))),{'analysis':_0x188d78,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x55e470){if(_0x55e470?.['message']===_0x577cde(0xbf))return console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xaf)](_0x577cde(0xc4))),{'analysis':_0x188d78,'steps':[],'completed':![],'cancelled':!![]};throw _0x55e470;}const _0x540d58=[],_0x2d7b00=a213_0x2416b5({'text':_0x577cde(0xc6),'color':_0x577cde(0x97)})[_0x577cde(0xd1)](),_0x42e460=execUpgradeSdk(_0x188d78);_0x540d58[_0x577cde(0xc3)](_0x42e460),_0x2d7b00[_0x42e460['ok']?_0x577cde(0xcf):'fail'](_0x577cde(0xdf)+(_0x42e460[_0x577cde(0xb1)]??(_0x42e460['ok']?'done':_0x577cde(0xa0))));const _0x11e27d=a213_0x2416b5({'text':_0x577cde(0xd9),'color':_0x577cde(0x97)})[_0x577cde(0xd1)]();let _0x5d2144;try{_0x5d2144=await upgradeProjectApiArchitecture(_0xf068d8);const _0x336acc=_0x5d2144[_0x577cde(0xbb)]?_0x577cde(0xa6):_0x577cde(0xb4);_0x11e27d[_0x577cde(0xcf)](_0x577cde(0xc0)+_0x336acc),_0x540d58[_0x577cde(0xc3)]({'step':0x2,'label':_0x577cde(0xa3),'ok':!![],'detail':_0x336acc});}catch(_0x1b04a5){const _0x19aa7e=_0x1b04a5 instanceof Error?_0x1b04a5[_0x577cde(0xcc)]:String(_0x1b04a5);_0x11e27d[_0x577cde(0x98)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x19aa7e),_0x540d58['push']({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0x19aa7e});}printSummary(_0x540d58);const _0x157c66=_0x540d58['some'](_0x1fb0e2=>!_0x1fb0e2['ok']);if(_0x157c66)console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xd0)](_0x577cde(0xe5)));else _0x5d2144?.[_0x577cde(0xbb)]?console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xd0)]('Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.')):console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0x9c)](_0x577cde(0xc1)));return _0x42e460['ok']&&_0x188d78[_0x577cde(0xd6)]&&(console[_0x577cde(0xe7)](''),console['log'](a213_0x58369f[_0x577cde(0xaa)][_0x577cde(0x97)](_0x577cde(0xa7))),console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0x97)](_0x577cde(0xa9))),console[_0x577cde(0xe7)](''),console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xb3)](_0x577cde(0xd5))),console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xb3)](_0x577cde(0xac))),console[_0x577cde(0xe7)](a213_0x58369f[_0x577cde(0xb3)](_0x577cde(0xb6))),console[_0x577cde(0xe7)]('')),{'analysis':_0x188d78,'steps':_0x540d58,'apiArchitecture':_0x5d2144,'completed':!_0x157c66&&!_0x5d2144?.[_0x577cde(0xbb)]};}
1
+ (function(_0x867f0d,_0x3ab1d5){const _0x3d15a6=a213_0x2df8,_0x4c2fb2=_0x867f0d();while(!![]){try{const _0x172cc8=parseInt(_0x3d15a6(0xdd))/0x1*(-parseInt(_0x3d15a6(0x108))/0x2)+parseInt(_0x3d15a6(0xcc))/0x3*(parseInt(_0x3d15a6(0xc4))/0x4)+parseInt(_0x3d15a6(0xf3))/0x5*(-parseInt(_0x3d15a6(0xe6))/0x6)+parseInt(_0x3d15a6(0x10f))/0x7*(parseInt(_0x3d15a6(0xe4))/0x8)+parseInt(_0x3d15a6(0xcd))/0x9+-parseInt(_0x3d15a6(0x104))/0xa+parseInt(_0x3d15a6(0xe5))/0xb*(-parseInt(_0x3d15a6(0xe3))/0xc);if(_0x172cc8===_0x3ab1d5)break;else _0x4c2fb2['push'](_0x4c2fb2['shift']());}catch(_0x4157de){_0x4c2fb2['push'](_0x4c2fb2['shift']());}}}(a213_0x5a60,0x29dfa));import a213_0x503330 from'chalk';function a213_0x5a60(){const _0x13f442=['cwd','cyan','label','message','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','manualMergeRequired','35138TGyHpw','utf8','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','\x20\x20npm\x20install','@lovrabet/sdk:','latest','324OAEVsq','10792QNrYEE','63789biLRDb','749874RmzOAr','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','detail','===\x20Upgrade\x20Summary\x20===','action','done','step','files','Upgrade\x20cancelled.','profiles','package.json','padEnd','\x20\x20Step\x20','5aCERKE','bold','\x20→\x20','stringify','yellow','apiDir','white','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','@lovrabet/sdk','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','Proceed\x20with\x20upgrade?','apiArchitecture','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','candidatePath','skippedLegacyDirectories','join','1587830KZOLoa','Application\x20source:','[\x22@lovrabet/sdk\x22]:\x20','dependencies','8iFslgV','source\x20structure\x20is\x20current','push','object','Step\x202/2:\x20Application\x20source\x20—\x20','yes','\x20\x20\x20\x20','1386RJiZjZ','up-to-date','sdkUpgrade','log','gray','succeed','needed','4GrOkyH','start','green','\x20→\x20latest','failed','Upgrade\x20@lovrabet/sdk','groups','===\x20Upgrade\x20Analysis\x20===','706983LXTcwp','2246742rsfPZW','FAIL','\x20\x20\x20\x20\x20\x20candidate:\x20','devDependencies','Upgrade\x20application\x20source','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','upgrade\x20needed','parse','\x20\x20Current\x20version\x20in\x20','CANCEL'];a213_0x5a60=function(){return _0x13f442;};return a213_0x5a60();}import a213_0x599c15 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(_0xce117a){const _0x329f9a=a213_0x2df8;try{const _0xa6e9a5=JSON[_0x329f9a(0xd4)](readFileSync(_0xce117a,'utf8'));return _0xa6e9a5&&typeof _0xa6e9a5===_0x329f9a(0x10b)?_0xa6e9a5:{};}catch{return{};}}export function analyseProjectUpgrade(_0x10236b){const _0x143af3=a213_0x2df8;let _0x52020a=null;const _0x2a6522=resolve(_0x10236b,_0x143af3(0xf0));if(existsSync(_0x2a6522))try{const _0x4ec0a4=JSON['parse'](readFileSync(_0x2a6522,_0x143af3(0xde)));for(const _0x4234dc of[_0x143af3(0x107),_0x143af3(0xd0)]){const _0x3fb954=_0x4ec0a4?.[_0x4234dc]?.[_0x143af3(0xfb)];if(typeof _0x3fb954==='string'){_0x3fb954!=='latest'&&(_0x52020a={'pkgPath':_0x2a6522,'currentVersion':_0x3fb954,'field':_0x4234dc});break;}}}catch{}const _0x41fb98=resolve(_0x10236b,NEW_CONFIG_NAME),_0x34bf11=existsSync(_0x41fb98)?readProjectConfig(_0x41fb98):{},_0x1f7fd2=analyzeProjectApiArchitecture(_0x10236b,_0x34bf11);return{'sdkUpgrade':_0x52020a,'apiArchitecture':_0x1f7fd2};}function printReport(_0x29985d){const _0x4b87eb=a213_0x2df8;console[_0x4b87eb(0xc0)](''),console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xf4)](_0x4b87eb(0xcb))),console['log'](''),console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xd8)](_0x4b87eb(0x105))+('\x20\x20'+(_0x29985d['apiArchitecture'][_0x4b87eb(0xc3)]?a213_0x503330[_0x4b87eb(0xf7)](_0x4b87eb(0xd3)):a213_0x503330[_0x4b87eb(0xc6)](_0x4b87eb(0x110)))));for(const _0x22a7e5 of _0x29985d[_0x4b87eb(0xfe)][_0x4b87eb(0xca)]){console['log']('\x20\x20'+_0x22a7e5[_0x4b87eb(0xf8)]+'\x20('+_0x22a7e5[_0x4b87eb(0xef)][_0x4b87eb(0x103)](',\x20')+')');for(const _0x354ba9 of _0x22a7e5[_0x4b87eb(0xed)]){console[_0x4b87eb(0xc0)](_0x4b87eb(0x10e)+_0x354ba9[_0x4b87eb(0xea)][_0x4b87eb(0xf1)](0x11)+'\x20'+_0x354ba9['path']),_0x354ba9[_0x4b87eb(0x101)]&&console[_0x4b87eb(0xc0)](_0x4b87eb(0xcf)+_0x354ba9[_0x4b87eb(0x101)]);}}_0x29985d[_0x4b87eb(0xfe)][_0x4b87eb(0x102)]['length']>0x0&&console[_0x4b87eb(0xc0)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x4b87eb(0xc0)]('');if(_0x29985d[_0x4b87eb(0xbf)]){const {currentVersion:_0x4e8aa9,field:_0x306fed,pkgPath:_0x33aa3b}=_0x29985d[_0x4b87eb(0xbf)];console['log'](a213_0x503330[_0x4b87eb(0xd8)](_0x4b87eb(0xe1))+('\x20\x20'+a213_0x503330[_0x4b87eb(0xf7)](_0x33aa3b))),console[_0x4b87eb(0xc0)](_0x4b87eb(0xd5)+_0x306fed+':\x20'+a213_0x503330['yellow'](_0x4e8aa9)+_0x4b87eb(0xf5)+a213_0x503330[_0x4b87eb(0xc6)](_0x4b87eb(0xe2))),console[_0x4b87eb(0xc0)](_0x4b87eb(0xfa));}else console[_0x4b87eb(0xc0)](a213_0x503330[_0x4b87eb(0xd8)]('@lovrabet/sdk:')+'\x20\x20'+a213_0x503330['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function execUpgradeSdk(_0x3c47c0){const _0x28dc6f=a213_0x2df8;if(!_0x3c47c0[_0x28dc6f(0xbf)])return{'step':0x1,'label':_0x28dc6f(0xc9),'ok':!![],'detail':_0x28dc6f(0xe7)};const {pkgPath:_0x13877c,currentVersion:_0x44ff3e,field:_0x8925e5}=_0x3c47c0[_0x28dc6f(0xbf)];try{const _0x45b0b5=readFileSync(_0x13877c,_0x28dc6f(0xde)),_0x1cd712=JSON['parse'](_0x45b0b5);return _0x1cd712[_0x8925e5][_0x28dc6f(0xfb)]='latest',writeFileSync(_0x13877c,JSON[_0x28dc6f(0xf6)](_0x1cd712,null,0x2)+'\x0a',_0x28dc6f(0xde)),{'step':0x1,'label':_0x28dc6f(0xc9),'ok':!![],'detail':_0x8925e5+_0x28dc6f(0x106)+_0x44ff3e+_0x28dc6f(0xc7)};}catch(_0x44adf4){return{'step':0x1,'label':_0x28dc6f(0xc9),'ok':![],'detail':_0x44adf4 instanceof Error?_0x44adf4[_0x28dc6f(0xda)]:String(_0x44adf4)};}}function printSummary(_0x285dac){const _0x4163d8=a213_0x2df8;console[_0x4163d8(0xc0)](''),console[_0x4163d8(0xc0)](a213_0x503330[_0x4163d8(0xf4)](_0x4163d8(0xe9))),console['log']('');for(const _0x330a9b of _0x285dac){const _0x173c1b=_0x330a9b['ok']?a213_0x503330[_0x4163d8(0xc6)]('OK'):a213_0x503330['red'](_0x4163d8(0xce));console[_0x4163d8(0xc0)]('\x20\x20'+_0x173c1b+_0x4163d8(0xf2)+_0x330a9b[_0x4163d8(0xec)]+':\x20'+_0x330a9b[_0x4163d8(0xd9)]);if(_0x330a9b['detail'])console[_0x4163d8(0xc0)]('\x20\x20\x20\x20\x20\x20\x20'+a213_0x503330['gray'](_0x330a9b[_0x4163d8(0xe8)]));}console['log']('');}function a213_0x2df8(_0x1947ec,_0x4bfb23){_0x1947ec=_0x1947ec-0xbf;const _0x5a60e4=a213_0x5a60();let _0x2df87c=_0x5a60e4[_0x1947ec];return _0x2df87c;}export async function upgradeApp(_0x21b55e,_0x3c767a){const _0x17c196=a213_0x2df8,_0x29424e=process[_0x17c196(0xd7)](),_0x18683f=analyseProjectUpgrade(_0x29424e);if(!_0x18683f['sdkUpgrade']&&!_0x18683f['apiArchitecture'][_0x17c196(0xc3)])return console['log'](a213_0x503330[_0x17c196(0xc6)]('Your\x20project\x20is\x20already\x20up-to-date.')),{'analysis':_0x18683f,'steps':[],'completed':!![]};printReport(_0x18683f);const _0x15d86c=!!(_0x3c767a[_0x17c196(0x10d)]||_0x3c767a['Y']||_0x21b55e);if(!_0x15d86c)try{const _0x1230e2=await askConfirm(_0x17c196(0xfd));if(!_0x1230e2)return console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc1)](_0x17c196(0xee))),{'analysis':_0x18683f,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x1b4c11){if(_0x1b4c11?.['message']===_0x17c196(0xd6))return console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc1)](_0x17c196(0xee))),{'analysis':_0x18683f,'steps':[],'completed':![],'cancelled':!![]};throw _0x1b4c11;}const _0x453082=[],_0x442f2e=a213_0x599c15({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x17c196(0xd8)})[_0x17c196(0xc5)](),_0x3a54a2=execUpgradeSdk(_0x18683f);_0x453082[_0x17c196(0x10a)](_0x3a54a2),_0x442f2e[_0x3a54a2['ok']?_0x17c196(0xc2):'fail'](_0x17c196(0xdf)+(_0x3a54a2['detail']??(_0x3a54a2['ok']?_0x17c196(0xeb):_0x17c196(0xc8))));const _0x17232f=a213_0x599c15({'text':_0x17c196(0xfc),'color':_0x17c196(0xd8)})[_0x17c196(0xc5)]();let _0x4b7015;try{_0x4b7015=await upgradeProjectApiArchitecture(_0x29424e);const _0x35c118=_0x4b7015['manualMergeRequired']?_0x17c196(0x100):_0x17c196(0x109);_0x17232f[_0x17c196(0xc2)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x35c118),_0x453082['push']({'step':0x2,'label':_0x17c196(0xd1),'ok':!![],'detail':_0x35c118});}catch(_0x582ecb){const _0x34572f=_0x582ecb instanceof Error?_0x582ecb[_0x17c196(0xda)]:String(_0x582ecb);_0x17232f['fail'](_0x17c196(0x10c)+_0x34572f),_0x453082['push']({'step':0x2,'label':_0x17c196(0xd1),'ok':![],'detail':_0x34572f});}printSummary(_0x453082);const _0x568775=_0x453082['some'](_0x1014c7=>!_0x1014c7['ok']);if(_0x568775)console[_0x17c196(0xc0)](a213_0x503330['yellow'](_0x17c196(0xdb)));else _0x4b7015?.[_0x17c196(0xdc)]?console['log'](a213_0x503330[_0x17c196(0xf7)](_0x17c196(0xd2))):console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xc6)]('Upgrade\x20completed\x20successfully!'));return _0x3a54a2['ok']&&_0x18683f[_0x17c196(0xbf)]&&(console[_0x17c196(0xc0)](''),console['log'](a213_0x503330[_0x17c196(0xf4)]['cyan'](_0x17c196(0xff))),console['log'](a213_0x503330[_0x17c196(0xd8)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x17c196(0xc0)](''),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)](_0x17c196(0xe0))),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)]('\x20\x20#\x20or')),console[_0x17c196(0xc0)](a213_0x503330[_0x17c196(0xf9)]('\x20\x20bun\x20install')),console[_0x17c196(0xc0)]('')),{'analysis':_0x18683f,'steps':_0x453082,'apiArchitecture':_0x4b7015,'completed':!_0x568775&&!_0x4b7015?.[_0x17c196(0xdc)]};}
@@ -1 +1 @@
1
- const a214_0xe642d9=a214_0x78ae;(function(_0x1b568e,_0x39187f){const _0x9a7278=a214_0x78ae,_0x510d59=_0x1b568e();while(!![]){try{const _0x3d9466=-parseInt(_0x9a7278(0x174))/0x1+-parseInt(_0x9a7278(0x168))/0x2*(-parseInt(_0x9a7278(0x14b))/0x3)+-parseInt(_0x9a7278(0x11e))/0x4*(-parseInt(_0x9a7278(0x167))/0x5)+-parseInt(_0x9a7278(0x16a))/0x6+-parseInt(_0x9a7278(0x164))/0x7+parseInt(_0x9a7278(0x135))/0x8*(parseInt(_0x9a7278(0x154))/0x9)+-parseInt(_0x9a7278(0x11f))/0xa*(-parseInt(_0x9a7278(0x124))/0xb);if(_0x3d9466===_0x39187f)break;else _0x510d59['push'](_0x510d59['shift']());}catch(_0x15b14b){_0x510d59['push'](_0x510d59['shift']());}}}(a214_0x5c94,0x94673));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';function a214_0x5c94(){const _0x1f6144=['data:filter','Dataset\x20&\x20Operations','knowledge-base:create','permit:page-get','Workspace','Run\x20any\x20package.json\x20script','rabetbase\x20run\x20preview','Self\x20Update','page:react-create','skill:','page:react-update','5097184nMtLao','start','rabetbase\x20page\x20custom-publish','page:react-list','rabetbase\x20page\x20data-list-status','Approval\x20Flows','Authentication','rabetbase\x20kb\x20create','rabetbase\x20sql\x20create','deployment:sync','values','has','Database\x20Connections','flow:disable','rabetbase\x20kb\x20list','rabetbase\x20workspace\x20use\x20--app\x20<name>','rabetbase\x20bff\x20create','skills:','Configuration','\x20\x20[','Diagnostics','command','9tpnkCr','rabetbase\x20page\x20custom-list','page:react-publish','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','wildcardDef','rabetbase\x20cli-skill\x20install','SQL\x20Queries','rabetbase\x20kb\x20delete','rabetbase\x20run\x20start','9KQEpdV','Company\x20Knowledge\x20Base','install','File','permit:role-menus','push','Run\x20Scripts','app:remote','`\x20has\x20been\x20removed.','rabetbase\x20kb\x20detail','defaultCommand','page:standard-page-status','skill:install','Schema','menu:update','rabetbase\x20menu\x20asset-update','2598316oiYOqg','role:create','User\x20Accounts','1036915QGaVJn','87730dBwApC','page:react-detail','3871686RqCoSB','show','login','filter','`\x20instead.','flow:enable','Instant\x20API\x20Policy','Runtime\x20App\x20Config\x20Management','Deployment','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','404167ZIfUqf','service','rabetbase\x20auth\x20logout','app:add','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','Logs','\x20\x20[high-risk-write]','get','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','permit:page-set','logout','rabetbase\x20kb\x20update','risk','bff:new','permit:role-apis-set','commands','hidden','sql:save','Menu','rabetbase\x20role\x20list','data:getOne','app:use','knowledge-base:delete','Backend\x20Function\x20Scripts','Use\x20`','\x20\x20[write]','knowledge-base:update','rabetbase\x20page\x20custom-update','knowledge-base:detail','16mXwPKc','1400ytbPGP','Async\x20Tasks','CLI\x20Built-in\x20Skill','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','rabetbase\x20page\x20custom-detail','33803pexQYv','`rabetbase\x20','permit:role-menus-set','Project','rabetbase\x20workspace\x20remove\x20<name>','length'];a214_0x5c94=function(){return _0x1f6144;};return a214_0x5c94();}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 a214_0x78ae(_0x3f55c2,_0xa88235){_0x3f55c2=_0x3f55c2-0x109;const _0x5c94a3=a214_0x5c94();let _0x78ae43=_0x5c94a3[_0x3f55c2];return _0x78ae43;}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';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(_0x1b520f){const _0x1db5d7=a214_0x78ae;for(const _0xc2af4e of _0x1b520f){definitions['set'](_0xc2af4e[_0x1db5d7(0x175)]+':'+_0xc2af4e[_0x1db5d7(0x14a)],_0xc2af4e);let _0x544447=serviceGroups[_0x1db5d7(0x17b)](_0xc2af4e[_0x1db5d7(0x175)]);!_0x544447&&(_0x544447=[],serviceGroups['set'](_0xc2af4e[_0x1db5d7(0x175)],_0x544447)),_0x544447[_0x1db5d7(0x159)](_0xc2af4e);}}function registerDeclarativeService(_0x525517,_0x52f2bd,_0x3816a5){const _0x2a3421=a214_0x78ae;registerDefinitions(_0x52f2bd);_0x3816a5?.['wildcardDef']&&registerDefinitions([_0x3816a5[_0x2a3421(0x14f)]]);const _0x213f18=_0x438cb8=>_0x438cb8==='read'?'':_0x438cb8==='write'?_0x2a3421(0x11a):_0x2a3421(0x17a),_0x5d95d8={'service':_0x52f2bd[0x0]['service'],'label':_0x525517,'commands':_0x52f2bd[_0x2a3421(0x16d)](_0x3e5dcd=>!_0x3e5dcd[_0x2a3421(0x111)])['map'](_0x45dd55=>({'command':_0x45dd55[_0x2a3421(0x14a)],'description':_0x45dd55['description'],'tag':_0x213f18(_0x45dd55[_0x2a3421(0x10d)])})),'declarative':!![],'defaultCommand':_0x3816a5?.[_0x2a3421(0x15e)]??(_0x3816a5?.['isSingleCommand']?_0x52f2bd[0x0][_0x2a3421(0x14a)]:undefined),'wildcardDef':_0x3816a5?.[_0x2a3421(0x14f)],'isSingleCommand':_0x3816a5?.['isSingleCommand']};serviceRegistry[_0x2a3421(0x159)](_0x5d95d8),serviceByName['set'](_0x5d95d8[_0x2a3421(0x175)],_0x5d95d8);}registerDeclarativeService(a214_0xe642d9(0x127),projectDefinitions),registerDeclarativeService(a214_0xe642d9(0x12e),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a214_0xe642d9(0x13b),authDefinitions,{'defaultCommand':a214_0xe642d9(0x16c)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a214_0xe642d9(0x166),userAccountDefinitions),registerDeclarativeService(a214_0xe642d9(0x12b),datasetDefinitions),registerDeclarativeService(a214_0xe642d9(0x14e),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a214_0xe642d9(0x118),bffDefinitions),registerDeclarativeService(a214_0xe642d9(0x170),instantApiPolicyDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a214_0xe642d9(0x151),sqlDefinitions),registerDeclarativeService(a214_0xe642d9(0x141),dbDefinitions),registerDeclarativeService(a214_0xe642d9(0x172),deploymentDefinitions),registerDeclarativeService(a214_0xe642d9(0x113),menuDefinitions),registerDeclarativeService(a214_0xe642d9(0x120),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a214_0xe642d9(0x171),appConfigDefinitions),registerDeclarativeService(a214_0xe642d9(0x155),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a214_0xe642d9(0x157),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a214_0xe642d9(0x147),configDefinitions),registerDeclarativeService(a214_0xe642d9(0x149),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0xe642d9(0x161),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0xe642d9(0x131),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0xe642d9(0x121),cliSkillDefinitions,{'defaultCommand':a214_0xe642d9(0x156)}),registerDeclarativeService(a214_0xe642d9(0x13a),flowDefinitions),registerDeclarativeService(a214_0xe642d9(0x179),logsDefinitions,{'defaultCommand':a214_0xe642d9(0x16b)}),registerDeclarativeService(a214_0xe642d9(0x15a),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a214_0xe642d9(0x129)]-0x1];last[a214_0xe642d9(0x110)]=[{'command':'<script>','description':a214_0xe642d9(0x12f),'tag':a214_0xe642d9(0x148)+runDefinition[a214_0xe642d9(0x10d)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a214_0xe642d9(0x112),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a214_0xe642d9(0x10e),a214_0xe642d9(0x145)],['sql:new',a214_0xe642d9(0x13d)],[a214_0xe642d9(0x162),a214_0xe642d9(0x163)],['project:init','rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a214_0xe642d9(0x133),a214_0xe642d9(0x150)],[a214_0xe642d9(0x160),a214_0xe642d9(0x150)],[a214_0xe642d9(0x146),a214_0xe642d9(0x150)],['skills:install',a214_0xe642d9(0x150)],[a214_0xe642d9(0x15b),'rabetbase\x20app\x20list\x20--remote'],[a214_0xe642d9(0x116),a214_0xe642d9(0x144)],[a214_0xe642d9(0x177),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],['app:remove',a214_0xe642d9(0x128)],['knowledge-base:list',a214_0xe642d9(0x143)],[a214_0xe642d9(0x11d),a214_0xe642d9(0x15d)],[a214_0xe642d9(0x12c),a214_0xe642d9(0x13c)],[a214_0xe642d9(0x11b),a214_0xe642d9(0x10c)],[a214_0xe642d9(0x117),a214_0xe642d9(0x152)],[a214_0xe642d9(0x165),a214_0xe642d9(0x114)],[a214_0xe642d9(0x12a),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],[a214_0xe642d9(0x115),a214_0xe642d9(0x173)],[a214_0xe642d9(0x15f),a214_0xe642d9(0x139)],[a214_0xe642d9(0x132),a214_0xe642d9(0x122)],['page:custom-create',a214_0xe642d9(0x122)],[a214_0xe642d9(0x138),a214_0xe642d9(0x14c)],[a214_0xe642d9(0x169),a214_0xe642d9(0x123)],[a214_0xe642d9(0x134),a214_0xe642d9(0x11c)],[a214_0xe642d9(0x14d),a214_0xe642d9(0x137)]]),REMOVED_COMMAND_HINTS=new Map([[a214_0xe642d9(0x16f),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a214_0xe642d9(0x142),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a214_0xe642d9(0x13e),a214_0xe642d9(0x109)],[a214_0xe642d9(0x12d),a214_0xe642d9(0x178)],[a214_0xe642d9(0x10a),a214_0xe642d9(0x178)],[a214_0xe642d9(0x158),a214_0xe642d9(0x178)],[a214_0xe642d9(0x126),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a214_0xe642d9(0x10f),a214_0xe642d9(0x178)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create','rabetbase\x20project\x20create\x20<project-name>'],[a214_0xe642d9(0x136),a214_0xe642d9(0x153)],['build','rabetbase\x20run\x20build'],['preview',a214_0xe642d9(0x130)],[a214_0xe642d9(0x10b),a214_0xe642d9(0x176)]]);export function resolveRemovedCommand(_0x349424,_0x54d731){const _0x295adf=a214_0xe642d9;if(!_0x349424)return undefined;const _0x546184=REMOVED_COMMAND_REPLACEMENTS[_0x295adf(0x17b)](_0x349424+':'+(_0x54d731??'')),_0x29508b=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x349424),_0x14f556=_0x546184??_0x29508b,_0x535e54=REMOVED_COMMAND_HINTS[_0x295adf(0x17b)](_0x349424+':'+(_0x54d731??''));if(!_0x14f556&&!_0x535e54)return undefined;const _0x59b5b5=_0x29508b?_0x349424:_0x54d731?_0x349424+'\x20'+_0x54d731:_0x349424;return{'command':_0x59b5b5,'message':_0x295adf(0x125)+_0x59b5b5+_0x295adf(0x15c),'hint':_0x535e54??_0x295adf(0x119)+_0x14f556+_0x295adf(0x16e)};}export function findDefinition(_0x15b006,_0x5b77e7){const _0x581b85=a214_0xe642d9;return definitions[_0x581b85(0x17b)](_0x15b006+':'+_0x5b77e7);}export function isKnownService(_0x3d2729){const _0xdbd40f=a214_0xe642d9;return serviceByName[_0xdbd40f(0x140)](_0x3d2729);}export function isDeclarativeService(_0x2709c3){const _0x245c84=a214_0xe642d9;return serviceGroups[_0x245c84(0x140)](_0x2709c3)||serviceByName['get'](_0x2709c3)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x3ccbe5){return serviceByName['get'](_0x3ccbe5);}export function getLegacyHandler(_0x33d518,_0x13606b){return undefined;}export function getAllDefinitions(){const _0x556b6c=a214_0xe642d9;return Array['from'](definitions[_0x556b6c(0x13f)]());}
1
+ const a214_0x1c9491=a214_0x3495;(function(_0x27375e,_0x18e11d){const _0x1a8a05=a214_0x3495,_0x31be0c=_0x27375e();while(!![]){try{const _0x59f518=-parseInt(_0x1a8a05(0x193))/0x1*(parseInt(_0x1a8a05(0x1ca))/0x2)+-parseInt(_0x1a8a05(0x188))/0x3+-parseInt(_0x1a8a05(0x17f))/0x4*(parseInt(_0x1a8a05(0x191))/0x5)+-parseInt(_0x1a8a05(0x196))/0x6*(-parseInt(_0x1a8a05(0x1b9))/0x7)+-parseInt(_0x1a8a05(0x176))/0x8*(-parseInt(_0x1a8a05(0x1b0))/0x9)+parseInt(_0x1a8a05(0x1ba))/0xa+-parseInt(_0x1a8a05(0x1d5))/0xb*(-parseInt(_0x1a8a05(0x1c0))/0xc);if(_0x59f518===_0x18e11d)break;else _0x31be0c['push'](_0x31be0c['shift']());}catch(_0x280c7d){_0x31be0c['push'](_0x31be0c['shift']());}}}(a214_0x1475,0x71fab));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';import{roleDefinitions}from'../commands/role/index.js';function a214_0x1475(){const _0x5c92fa=['rabetbase\x20page\x20custom-list','app:use','knowledge-base:create','page:react-update','rabetbase\x20workspace\x20remove\x20<name>','permit:role-menus-set','filter','length','User\x20Accounts','\x20\x20[high-risk-write]','Deployment','rabetbase\x20page\x20custom-publish','File','rabetbase\x20run\x20build','show','skills:install','project:init','502101lgvCDV','rabetbase\x20kb\x20create','Schema','values','push','Run\x20Scripts','`\x20instead.','Run\x20any\x20package.json\x20script','sql:save','6424152lpxreq','3981390lfPbwd','page:standard-page-status','permit:role-apis-set','wildcardDef','risk','rabetbase\x20project\x20create\x20<project-name>','3121884wVpggu','has','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Use\x20`','rabetbase\x20kb\x20detail','app:remote','rabetbase\x20role\x20list','Roles','rabetbase\x20cli-skill\x20install','rabetbase\x20bff\x20create','200258wbBMfT','rabetbase\x20kb\x20delete','rabetbase\x20kb\x20update','\x20\x20[','install','menu:update','SQL\x20Queries','hidden','page:react-detail','Async\x20Tasks','knowledge-base:list','11QowNQO','set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','flow:enable','Backend\x20Function\x20Scripts','service','Database\x20Connections','rabetbase\x20page\x20data-list-status','data:filter','read','Menu','rabetbase\x20auth\x20logout','rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','rabetbase\x20app\x20list\x20--remote','`\x20has\x20been\x20removed.','Diagnostics','knowledge-base:delete','rabetbase\x20run\x20preview','8XAqmhc','start','page:react-create','knowledge-base:detail','isSingleCommand','Self\x20Update','Dataset\x20&\x20Operations','Code\x20Generation','skills:','23624rswwfu','skill:install','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','rabetbase\x20sql\x20create','permit:page-get','Authentication','page:react-list','rabetbase\x20page\x20custom-update','Logs','1617597kgMMMo','sql:new','data:getOne','page:custom-create','login','get','write','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','bff:new','445MsEmtf','rabetbase\x20kb\x20list','1bLTkGS','app:add','Runtime\x20App\x20Config\x20Management','6DIKzDM','permit:page-set','logout','Project','Platform\x20Issue','map','Workspace','command','defaultCommand'];a214_0x1475=function(){return _0x5c92fa;};return a214_0x1475();}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';function a214_0x3495(_0x6fdc72,_0xbd60a2){_0x6fdc72=_0x6fdc72-0x173;const _0x1475c9=a214_0x1475();let _0x349516=_0x1475c9[_0x6fdc72];return _0x349516;}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(_0x122f77){const _0x1b3321=a214_0x3495;for(const _0x418962 of _0x122f77){definitions[_0x1b3321(0x1d6)](_0x418962[_0x1b3321(0x1da)]+':'+_0x418962[_0x1b3321(0x19d)],_0x418962);let _0x29d430=serviceGroups[_0x1b3321(0x18d)](_0x418962[_0x1b3321(0x1da)]);!_0x29d430&&(_0x29d430=[],serviceGroups[_0x1b3321(0x1d6)](_0x418962['service'],_0x29d430)),_0x29d430[_0x1b3321(0x1b4)](_0x418962);}}function registerDeclarativeService(_0x28c2de,_0x16332e,_0x3538da){const _0x8912b4=a214_0x3495;registerDefinitions(_0x16332e);_0x3538da?.[_0x8912b4(0x1bd)]&&registerDefinitions([_0x3538da[_0x8912b4(0x1bd)]]);const _0x3a357b=_0xa51049=>_0xa51049===_0x8912b4(0x1de)?'':_0xa51049===_0x8912b4(0x18e)?'\x20\x20[write]':_0x8912b4(0x1a8),_0x6b1b82={'service':_0x16332e[0x0][_0x8912b4(0x1da)],'label':_0x28c2de,'commands':_0x16332e[_0x8912b4(0x1a5)](_0x2e6843=>!_0x2e6843[_0x8912b4(0x1d1)])[_0x8912b4(0x19b)](_0x440769=>({'command':_0x440769[_0x8912b4(0x19d)],'description':_0x440769['description'],'tag':_0x3a357b(_0x440769[_0x8912b4(0x1be)])})),'declarative':!![],'defaultCommand':_0x3538da?.[_0x8912b4(0x19e)]??(_0x3538da?.['isSingleCommand']?_0x16332e[0x0][_0x8912b4(0x19d)]:undefined),'wildcardDef':_0x3538da?.[_0x8912b4(0x1bd)],'isSingleCommand':_0x3538da?.[_0x8912b4(0x17a)]};serviceRegistry[_0x8912b4(0x1b4)](_0x6b1b82),serviceByName[_0x8912b4(0x1d6)](_0x6b1b82[_0x8912b4(0x1da)],_0x6b1b82);}registerDeclarativeService(a214_0x1c9491(0x199),projectDefinitions),registerDeclarativeService(a214_0x1c9491(0x19c),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a214_0x1c9491(0x184),authDefinitions,{'defaultCommand':a214_0x1c9491(0x18c)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a214_0x1c9491(0x1a7),userAccountDefinitions),registerDeclarativeService(a214_0x1c9491(0x17c),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d9),bffDefinitions),registerDeclarativeService('Instant\x20API\x20Policy',instantApiPolicyDefinitions),registerDeclarativeService(a214_0x1c9491(0x1e2),notificationDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d0),sqlDefinitions),registerDeclarativeService(a214_0x1c9491(0x1db),dbDefinitions),registerDeclarativeService(a214_0x1c9491(0x1a9),deploymentDefinitions),registerDeclarativeService(a214_0x1c9491(0x1df),menuDefinitions),registerDeclarativeService(a214_0x1c9491(0x1d3),taskDefinitions),registerDeclarativeService(a214_0x1c9491(0x1c7),roleDefinitions),registerDeclarativeService(a214_0x1c9491(0x195),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a214_0x1c9491(0x19a),issueDefinitions),registerDeclarativeService(a214_0x1c9491(0x1ab),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a214_0x1c9491(0x17d),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a214_0x1c9491(0x173),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x1c9491(0x1b2),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x1c9491(0x17b),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a214_0x1c9491(0x1ce)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a214_0x1c9491(0x187),logsDefinitions,{'defaultCommand':a214_0x1c9491(0x1ad)}),registerDeclarativeService(a214_0x1c9491(0x1b5),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a214_0x1c9491(0x1a6)]-0x1];last['commands']=[{'command':'<script>','description':a214_0x1c9491(0x1b7),'tag':a214_0x1c9491(0x1cd)+runDefinition[a214_0x1c9491(0x1be)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a214_0x1c9491(0x1b8),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a214_0x1c9491(0x190),a214_0x1c9491(0x1c9)],[a214_0x1c9491(0x189),a214_0x1c9491(0x182)],[a214_0x1c9491(0x1cf),'rabetbase\x20menu\x20asset-update'],[a214_0x1c9491(0x1af),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],['skill:',a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x180),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x17e),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x1ae),a214_0x1c9491(0x1c8)],[a214_0x1c9491(0x1c5),a214_0x1c9491(0x1e3)],[a214_0x1c9491(0x1a0),a214_0x1c9491(0x1e1)],[a214_0x1c9491(0x194),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],['app:remove',a214_0x1c9491(0x1a3)],[a214_0x1c9491(0x1d4),a214_0x1c9491(0x192)],[a214_0x1c9491(0x179),a214_0x1c9491(0x1c4)],[a214_0x1c9491(0x1a1),a214_0x1c9491(0x1b1)],['knowledge-base:update',a214_0x1c9491(0x1cc)],[a214_0x1c9491(0x174),a214_0x1c9491(0x1cb)],['role:create',a214_0x1c9491(0x1c6)],[a214_0x1c9491(0x1dd),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],[a214_0x1c9491(0x18a),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a214_0x1c9491(0x1bb),a214_0x1c9491(0x1dc)],[a214_0x1c9491(0x178),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a214_0x1c9491(0x18b),a214_0x1c9491(0x1c2)],[a214_0x1c9491(0x185),a214_0x1c9491(0x19f)],[a214_0x1c9491(0x1d2),'rabetbase\x20page\x20custom-detail'],[a214_0x1c9491(0x1a2),a214_0x1c9491(0x186)],['page:react-publish',a214_0x1c9491(0x1aa)]]),REMOVED_COMMAND_HINTS=new Map([[a214_0x1c9491(0x1d8),a214_0x1c9491(0x18f)],['flow:disable',a214_0x1c9491(0x18f)],['deployment:sync',a214_0x1c9491(0x181)],[a214_0x1c9491(0x183),a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x197),a214_0x1c9491(0x1d7)],['permit:role-menus',a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x1a4),a214_0x1c9491(0x1d7)],[a214_0x1c9491(0x1bc),a214_0x1c9491(0x1d7)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a214_0x1c9491(0x1bf)],[a214_0x1c9491(0x177),'rabetbase\x20run\x20start'],['build',a214_0x1c9491(0x1ac)],['preview',a214_0x1c9491(0x175)],[a214_0x1c9491(0x198),a214_0x1c9491(0x1e0)]]);export function resolveRemovedCommand(_0x2a97e6,_0x5e4208){const _0x1cc728=a214_0x1c9491;if(!_0x2a97e6)return undefined;const _0x3ad60e=REMOVED_COMMAND_REPLACEMENTS['get'](_0x2a97e6+':'+(_0x5e4208??'')),_0x2c6e7f=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x1cc728(0x18d)](_0x2a97e6),_0x17599b=_0x3ad60e??_0x2c6e7f,_0x115344=REMOVED_COMMAND_HINTS['get'](_0x2a97e6+':'+(_0x5e4208??''));if(!_0x17599b&&!_0x115344)return undefined;const _0xed8c3=_0x2c6e7f?_0x2a97e6:_0x5e4208?_0x2a97e6+'\x20'+_0x5e4208:_0x2a97e6;return{'command':_0xed8c3,'message':'`rabetbase\x20'+_0xed8c3+_0x1cc728(0x1e4),'hint':_0x115344??_0x1cc728(0x1c3)+_0x17599b+_0x1cc728(0x1b6)};}export function findDefinition(_0x46a2f3,_0x46a1a5){const _0x13fc8e=a214_0x1c9491;return definitions[_0x13fc8e(0x18d)](_0x46a2f3+':'+_0x46a1a5);}export function isKnownService(_0x3951e0){const _0x553609=a214_0x1c9491;return serviceByName[_0x553609(0x1c1)](_0x3951e0);}export function isDeclarativeService(_0x3b3165){return serviceGroups['has'](_0x3b3165)||serviceByName['get'](_0x3b3165)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x5f58c3){const _0x5c222d=a214_0x1c9491;return serviceByName[_0x5c222d(0x18d)](_0x5f58c3);}export function getLegacyHandler(_0x591318,_0xa58352){return undefined;}export function getAllDefinitions(){const _0x1c2767=a214_0x1c9491;return Array['from'](definitions[_0x1c2767(0x1b3)]());}
@@ -1 +1 @@
1
- const a215_0x41b802=a215_0x2082;(function(_0x5ba3ca,_0x3a5545){const _0x57c0b0=a215_0x2082,_0x3a29cb=_0x5ba3ca();while(!![]){try{const _0x275b35=parseInt(_0x57c0b0(0x8e))/0x1+-parseInt(_0x57c0b0(0x9a))/0x2*(parseInt(_0x57c0b0(0xa0))/0x3)+parseInt(_0x57c0b0(0x9c))/0x4*(parseInt(_0x57c0b0(0x93))/0x5)+-parseInt(_0x57c0b0(0x9f))/0x6+-parseInt(_0x57c0b0(0x8f))/0x7*(parseInt(_0x57c0b0(0xa2))/0x8)+-parseInt(_0x57c0b0(0x92))/0x9+parseInt(_0x57c0b0(0x90))/0xa;if(_0x275b35===_0x3a5545)break;else _0x3a29cb['push'](_0x3a29cb['shift']());}catch(_0x39f4ea){_0x3a29cb['push'](_0x3a29cb['shift']());}}}(a215_0x51eb,0x3a4f9));import{deleteAppRole}from'../../core/api-client.js';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=a215_0x41b802(0x96);function a215_0x51eb(){const _0x4333d0=['Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','Role\x20still\x20has\x20','roleName','168482GZeqWS','\x20(id=','250064nQkroR','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','delete','2506134FiFiiO','6RNOwvj','userCount','8yyIbNZ','225533IkZwyC','688478DDQqne','7531080AIGxMx','dev','2185407QWQvAj','15fmBAyg','POST','appCode','/smartapi/permit/role/delete'];a215_0x51eb=function(){return _0x4333d0;};return a215_0x51eb();}function a215_0x2082(_0x2e953f,_0x53db32){_0x2e953f=_0x2e953f-0x8e;const _0x51ebc5=a215_0x51eb();let _0x2082fa=_0x51ebc5[_0x2e953f];return _0x2082fa;}export const roleDelete={'service':'role','command':a215_0x41b802(0x9e),'description':a215_0x41b802(0x97),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2f83ca){const _0x455d6d=a215_0x41b802,_0x1adb67=_0x2f83ca['num']('id'),_0x3869f0=await getRoleById(_0x2f83ca[_0x455d6d(0x95)],_0x1adb67);return assertCustomRole(_0x3869f0,_0x455d6d(0x9e)),asDryRunResult({'scope':'dev','operation':_0x455d6d(0x9e),'selector':{'appCode':_0x2f83ca[_0x455d6d(0x95)],'roleId':_0x1adb67,'roleName':_0x3869f0[_0x455d6d(0x99)]},'before':projectRole(_0x3869f0),'after':null,'dryRun':!![],'backend':{'method':_0x455d6d(0x94),'path':DELETE_PATH},'warnings':_0x3869f0['userCount']>0x0?[_0x455d6d(0x98)+_0x3869f0[_0x455d6d(0xa1)]+_0x455d6d(0x9d)]:[]},{'method':_0x455d6d(0x94),'url':DELETE_PATH});},async 'execute'(_0x15a8d6){const _0x292980=a215_0x41b802,_0x341237=_0x15a8d6['num']('id'),_0xdb3e1e=await getRoleById(_0x15a8d6[_0x292980(0x95)],_0x341237);return assertCustomRole(_0xdb3e1e,'delete'),await deleteAppRole(_0x341237),{'ok':!![],'data':{'scope':_0x292980(0x91),'operation':_0x292980(0x9e),'selector':{'appCode':_0x15a8d6['appCode'],'roleId':_0x341237,'roleName':_0xdb3e1e[_0x292980(0x99)]},'before':projectRole(_0xdb3e1e),'after':null,'dryRun':![],'backend':{'method':_0x292980(0x94),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xdb3e1e[_0x292980(0x99)]+_0x292980(0x9b)+_0x341237+')'};}};
1
+ const a215_0x466381=a215_0x59c3;(function(_0x14f210,_0x390e8a){const _0x49a56=a215_0x59c3,_0x2ac250=_0x14f210();while(!![]){try{const _0x583094=parseInt(_0x49a56(0x1ac))/0x1+-parseInt(_0x49a56(0x1b2))/0x2*(parseInt(_0x49a56(0x1a2))/0x3)+-parseInt(_0x49a56(0x1a4))/0x4+parseInt(_0x49a56(0x1af))/0x5*(parseInt(_0x49a56(0x1a1))/0x6)+-parseInt(_0x49a56(0x1ae))/0x7*(-parseInt(_0x49a56(0x1aa))/0x8)+-parseInt(_0x49a56(0x1b0))/0x9*(-parseInt(_0x49a56(0x1a5))/0xa)+parseInt(_0x49a56(0x1b1))/0xb*(-parseInt(_0x49a56(0x1a8))/0xc);if(_0x583094===_0x390e8a)break;else _0x2ac250['push'](_0x2ac250['shift']());}catch(_0x346a78){_0x2ac250['push'](_0x2ac250['shift']());}}}(a215_0x23e2,0xe1134));import{deleteAppRole}from'../../core/api-client.js';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';function a215_0x59c3(_0x23ab93,_0x5823c3){_0x23ab93=_0x23ab93-0x1a1;const _0x23e249=a215_0x23e2();let _0x59c39e=_0x23e249[_0x23ab93];return _0x59c39e;}function a215_0x23e2(){const _0x5ee5f7=['5215kaqgRC','1055nhcOsc','67833QYPXiG','2893gjrJRF','2anluuv','userCount','appCode','roleName','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','role','/smartapi/permit/role/delete','49944rOIPTI','2171625eqNJRB','Deleted\x20role\x20','6170128LTqiak','1720BLIrmo','dev','delete','81948rgeyht','\x20(id=','3208weFrsO','num','1632869zNidKZ','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes'];a215_0x23e2=function(){return _0x5ee5f7;};return a215_0x23e2();}const DELETE_PATH=a215_0x466381(0x1b9);export const roleDelete={'service':a215_0x466381(0x1b8),'command':'delete','description':a215_0x466381(0x1ad),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x333ce0){const _0x166e3e=a215_0x466381,_0x5916b0=_0x333ce0[_0x166e3e(0x1ab)]('id'),_0x1dc2ac=await getRoleById(_0x333ce0['appCode'],_0x5916b0);return assertCustomRole(_0x1dc2ac,_0x166e3e(0x1a7)),asDryRunResult({'scope':_0x166e3e(0x1a6),'operation':_0x166e3e(0x1a7),'selector':{'appCode':_0x333ce0[_0x166e3e(0x1b4)],'roleId':_0x5916b0,'roleName':_0x1dc2ac['roleName']},'before':projectRole(_0x1dc2ac),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1dc2ac[_0x166e3e(0x1b3)]>0x0?['Role\x20still\x20has\x20'+_0x1dc2ac[_0x166e3e(0x1b3)]+_0x166e3e(0x1b6)]:[]},{'method':_0x166e3e(0x1b7),'url':DELETE_PATH});},async 'execute'(_0xf13eea){const _0x54eb47=a215_0x466381,_0x14206a=_0xf13eea[_0x54eb47(0x1ab)]('id'),_0x18d3be=await getRoleById(_0xf13eea['appCode'],_0x14206a);return assertCustomRole(_0x18d3be,_0x54eb47(0x1a7)),await deleteAppRole(_0x14206a),{'ok':!![],'data':{'scope':_0x54eb47(0x1a6),'operation':_0x54eb47(0x1a7),'selector':{'appCode':_0xf13eea[_0x54eb47(0x1b4)],'roleId':_0x14206a,'roleName':_0x18d3be[_0x54eb47(0x1b5)]},'before':projectRole(_0x18d3be),'after':null,'dryRun':![],'backend':{'method':_0x54eb47(0x1b7),'path':DELETE_PATH},'warnings':[]},'message':_0x54eb47(0x1a3)+_0x18d3be['roleName']+_0x54eb47(0x1a9)+_0x14206a+')'};}};
@@ -1 +1 @@
1
- const a216_0x580f64=a216_0x5955;(function(_0x13f55a,_0x5f4797){const _0x25410e=a216_0x5955,_0x869fa6=_0x13f55a();while(!![]){try{const _0x2c31c6=-parseInt(_0x25410e(0x9a))/0x1+-parseInt(_0x25410e(0x9f))/0x2+parseInt(_0x25410e(0x9e))/0x3+-parseInt(_0x25410e(0x96))/0x4+-parseInt(_0x25410e(0x95))/0x5*(-parseInt(_0x25410e(0x98))/0x6)+parseInt(_0x25410e(0x9c))/0x7*(parseInt(_0x25410e(0x97))/0x8)+-parseInt(_0x25410e(0x9b))/0x9*(parseInt(_0x25410e(0x91))/0xa);if(_0x2c31c6===_0x5f4797)break;else _0x869fa6['push'](_0x869fa6['shift']());}catch(_0xf96692){_0x869fa6['push'](_0x869fa6['shift']());}}}(a216_0x2284,0xf2b9f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a216_0x5955(_0x276e83,_0x59f27b){_0x276e83=_0x276e83-0x91;const _0x228441=a216_0x2284();let _0x5955b0=_0x228441[_0x276e83];return _0x5955b0;}function a216_0x2284(){const _0x35053b=['10OpPpaq','num','role','roleType','1555jShkgy','1202588gywOMl','198464ktFMLG','12066psjtyW','read','862482TFMEvQ','1367721CsJDPK','483VEBdTZ','dev','3267087nTfVCR','2233794oYYYFM'];a216_0x2284=function(){return _0x35053b;};return a216_0x2284();}export const roleDetail={'service':a216_0x580f64(0x93),'command':'detail','description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a216_0x580f64(0x99),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x13c590){const _0x2ed0b1=a216_0x580f64,_0x679b72=_0x13c590[_0x2ed0b1(0x92)]('id'),_0x39af79=await getRoleById(_0x13c590['appCode'],_0x679b72);return{'ok':!![],'data':{'scope':_0x2ed0b1(0x9d),'role':projectRole(_0x39af79)},'message':'Role\x20'+_0x39af79['roleName']+'\x20('+_0x39af79[_0x2ed0b1(0x94)]+')'};}};
1
+ const a216_0x2d44de=a216_0x212c;function a216_0x212c(_0x4f4baf,_0x38cd41){_0x4f4baf=_0x4f4baf-0x1d7;const _0x1d1050=a216_0x1d10();let _0x212c87=_0x1d1050[_0x4f4baf];return _0x212c87;}(function(_0x30243d,_0x92879c){const _0x4aadba=a216_0x212c,_0x5e1107=_0x30243d();while(!![]){try{const _0x3c617f=parseInt(_0x4aadba(0x1da))/0x1*(parseInt(_0x4aadba(0x1db))/0x2)+-parseInt(_0x4aadba(0x1d8))/0x3*(parseInt(_0x4aadba(0x1e1))/0x4)+-parseInt(_0x4aadba(0x1d9))/0x5*(-parseInt(_0x4aadba(0x1e0))/0x6)+parseInt(_0x4aadba(0x1dd))/0x7+-parseInt(_0x4aadba(0x1e5))/0x8+-parseInt(_0x4aadba(0x1e9))/0x9+-parseInt(_0x4aadba(0x1e4))/0xa*(-parseInt(_0x4aadba(0x1ea))/0xb);if(_0x3c617f===_0x92879c)break;else _0x5e1107['push'](_0x5e1107['shift']());}catch(_0x1d0931){_0x5e1107['push'](_0x5e1107['shift']());}}}(a216_0x1d10,0x486ad));function a216_0x1d10(){const _0x47c28d=['role','3000wuSBVt','3184aJbmgm','Role\x20','num','2630WWtpdR','3333320cVyqmS','roleName','appCode','roleType','2504637vRlHhZ','10318nrFWup','read','1197XsrXBS','3755nrtvhq','1yMeUME','1150946Iejulr','dev','780612CvZpsZ','detail'];a216_0x1d10=function(){return _0x47c28d;};return a216_0x1d10();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a216_0x2d44de(0x1df),'command':a216_0x2d44de(0x1de),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a216_0x2d44de(0x1d7),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x347ac6){const _0x3c5dc1=a216_0x2d44de,_0x174d6e=_0x347ac6[_0x3c5dc1(0x1e3)]('id'),_0xeb6291=await getRoleById(_0x347ac6[_0x3c5dc1(0x1e7)],_0x174d6e);return{'ok':!![],'data':{'scope':_0x3c5dc1(0x1dc),'role':projectRole(_0xeb6291)},'message':_0x3c5dc1(0x1e2)+_0xeb6291[_0x3c5dc1(0x1e6)]+'\x20('+_0xeb6291[_0x3c5dc1(0x1e8)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x2f488d,_0x5a2d6a){const _0x111dc7=a217_0x2a73,_0x1a68fa=_0x2f488d();while(!![]){try{const _0x308be1=-parseInt(_0x111dc7(0x89))/0x1+-parseInt(_0x111dc7(0x86))/0x2+-parseInt(_0x111dc7(0x87))/0x3+parseInt(_0x111dc7(0x8e))/0x4*(parseInt(_0x111dc7(0x88))/0x5)+parseInt(_0x111dc7(0x85))/0x6*(-parseInt(_0x111dc7(0x8d))/0x7)+parseInt(_0x111dc7(0x8b))/0x8+-parseInt(_0x111dc7(0x8c))/0x9*(-parseInt(_0x111dc7(0x8a))/0xa);if(_0x308be1===_0x5a2d6a)break;else _0x1a68fa['push'](_0x1a68fa['shift']());}catch(_0x3403d7){_0x1a68fa['push'](_0x1a68fa['shift']());}}}(a217_0x394e,0xc8321));function a217_0x2a73(_0x317d05,_0x1c0eb2){_0x317d05=_0x317d05-0x85;const _0x394e5c=a217_0x394e();let _0x2a7309=_0x394e5c[_0x317d05];return _0x2a7309;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a217_0x394e(){const _0x505c98=['4569267UEFNOC','15755XPeIMp','335001OPGQBv','20vDFWIE','5519472wmvgcE','13936455MFLKun','1098391PzjnrM','764WQmkDv','18iJdEUv','2479870LSTMvb'];a217_0x394e=function(){return _0x505c98;};return a217_0x394e();}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(_0x2c6420,_0x27040d){const _0x17989f=a217_0x150b,_0x531c16=_0x2c6420();while(!![]){try{const _0x191371=-parseInt(_0x17989f(0xb4))/0x1+-parseInt(_0x17989f(0xb1))/0x2+parseInt(_0x17989f(0xb6))/0x3*(-parseInt(_0x17989f(0xb7))/0x4)+parseInt(_0x17989f(0xb5))/0x5+-parseInt(_0x17989f(0xb8))/0x6*(-parseInt(_0x17989f(0xba))/0x7)+parseInt(_0x17989f(0xb9))/0x8+-parseInt(_0x17989f(0xb2))/0x9*(-parseInt(_0x17989f(0xb3))/0xa);if(_0x191371===_0x27040d)break;else _0x531c16['push'](_0x531c16['shift']());}catch(_0x28da08){_0x531c16['push'](_0x531c16['shift']());}}}(a217_0x1441,0x36dac));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a217_0x1441(){const _0x157f75=['319708RlmHWS','261500fKxJpQ','3nnMpjB','1455224vrHhWm','7440RvYexJ','265608zFNLJr','2275PEgMzh','62600YfQwUf','4058973nxelNz','10AvOULR'];a217_0x1441=function(){return _0x157f75;};return a217_0x1441();}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';function a217_0x150b(_0x22badd,_0x3967ac){_0x22badd=_0x22badd-0xb1;const _0x14411c=a217_0x1441();let _0x150ba1=_0x14411c[_0x22badd];return _0x150ba1;}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a218_0x3c6d2f=a218_0x3337;(function(_0x539e6e,_0x428b03){const _0x17b0f4=a218_0x3337,_0x57c77c=_0x539e6e();while(!![]){try{const _0x305ad3=parseInt(_0x17b0f4(0xb2))/0x1*(-parseInt(_0x17b0f4(0xc4))/0x2)+-parseInt(_0x17b0f4(0xa7))/0x3*(parseInt(_0x17b0f4(0xb6))/0x4)+parseInt(_0x17b0f4(0xbc))/0x5*(parseInt(_0x17b0f4(0x9c))/0x6)+-parseInt(_0x17b0f4(0xa3))/0x7*(parseInt(_0x17b0f4(0x9a))/0x8)+parseInt(_0x17b0f4(0xb3))/0x9*(parseInt(_0x17b0f4(0xaf))/0xa)+parseInt(_0x17b0f4(0xac))/0xb+-parseInt(_0x17b0f4(0xa9))/0xc*(parseInt(_0x17b0f4(0xa4))/0xd);if(_0x305ad3===_0x428b03)break;else _0x57c77c['push'](_0x57c77c['shift']());}catch(_0x2ad78c){_0x57c77c['push'](_0x57c77c['shift']());}}}(a218_0x4636,0x8e185));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a218_0x3337(_0x1890ea,_0x2a694b){_0x1890ea=_0x1890ea-0x9a;const _0x4636ea=a218_0x4636();let _0x333746=_0x4636ea[_0x1890ea];return _0x333746;}function a218_0x4636(){const _0x15cd5d=['4lgxOnP','map','validation','\x20role(s)','length','join','89165aXIQDN','page','Page\x20size\x20(1-100)','toUpperCase','ADMIN','type','number','read','94KfnrrX','43280qYjClD','Found\x20','102pVXZza','pagesize','string','DEV','filter','Invalid\x20--type\x20\x22','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','49VDAQhQ','6773LuJzmA','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','trim','643758yfShxK','role','17796FQHkhO','roleType','num','12661858tpiCNB','dev','includes','203630mkJfKu','CUSTOM','str','20143gYIiRS','486XLPFYc','list','Use\x20one\x20of:\x20'];a218_0x4636=function(){return _0x15cd5d;};return a218_0x4636();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a218_0x3c6d2f(0xc0),a218_0x3c6d2f(0x9f),'OWNER',a218_0x3c6d2f(0xb0)];export const roleList={'service':a218_0x3c6d2f(0xa8),'command':a218_0x3c6d2f(0xb4),'description':a218_0x3c6d2f(0xa2),'risk':a218_0x3c6d2f(0xc3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a218_0x3c6d2f(0x9e),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a218_0x3c6d2f(0xbd),'type':a218_0x3c6d2f(0xc2),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a218_0x3c6d2f(0x9d),'type':a218_0x3c6d2f(0xc2),'description':a218_0x3c6d2f(0xbe),'default':0x64}],async 'validate'(_0x248911){const _0x155b64=a218_0x3c6d2f,_0x5cb0a8=_0x248911[_0x155b64(0xb1)](_0x155b64(0xc1))[_0x155b64(0xa6)]();if(_0x5cb0a8&&!ROLE_TYPES[_0x155b64(0xae)](_0x5cb0a8['toUpperCase']()))throw CliErrors[_0x155b64(0xb8)](_0x155b64(0xa1)+_0x5cb0a8+'\x22.',_0x155b64(0xb5)+ROLE_TYPES[_0x155b64(0xbb)](',\x20')+'.');const _0x822681=_0x248911['num'](_0x155b64(0xbd),0x1),_0x3eb665=_0x248911[_0x155b64(0xab)](_0x155b64(0x9d),0x64);if(_0x822681<0x1)throw CliErrors[_0x155b64(0xb8)](_0x155b64(0xa5));if(_0x3eb665<0x1||_0x3eb665>0x64)throw CliErrors['validation']('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x1e71ce){const _0x38fa82=a218_0x3c6d2f,_0x897b44=_0x1e71ce[_0x38fa82(0xab)](_0x38fa82(0xbd),0x1)||0x1,_0x108a80=_0x1e71ce['num'](_0x38fa82(0x9d),0x64)||0x64,_0x4c5119=_0x1e71ce[_0x38fa82(0xb1)]('type')['trim']()[_0x38fa82(0xbf)](),{items:_0xd707f0,paging:_0x4bdebc}=await listAppRoles(_0x1e71ce['appCode'],{'currentPage':_0x897b44,'pageSize':_0x108a80}),_0x416800=_0x4c5119?_0xd707f0[_0x38fa82(0xa0)](_0x573093=>_0x573093[_0x38fa82(0xaa)]===_0x4c5119):_0xd707f0,_0x552e50=_0x416800[_0x38fa82(0xb7)](projectRole);return{'ok':!![],'data':{'scope':_0x38fa82(0xad),'roles':_0x552e50,'paging':_0x4bdebc},'message':_0x38fa82(0x9b)+_0x552e50[_0x38fa82(0xba)]+_0x38fa82(0xb9)};}};
1
+ const a218_0x26a7ab=a218_0x14a7;(function(_0xa72e39,_0x39b26d){const _0x38a6da=a218_0x14a7,_0x5a4853=_0xa72e39();while(!![]){try{const _0x1597fb=parseInt(_0x38a6da(0x116))/0x1+parseInt(_0x38a6da(0x104))/0x2+-parseInt(_0x38a6da(0x117))/0x3+parseInt(_0x38a6da(0x10d))/0x4*(-parseInt(_0x38a6da(0x101))/0x5)+-parseInt(_0x38a6da(0x109))/0x6+-parseInt(_0x38a6da(0x107))/0x7*(parseInt(_0x38a6da(0x112))/0x8)+parseInt(_0x38a6da(0x118))/0x9*(parseInt(_0x38a6da(0x110))/0xa);if(_0x1597fb===_0x39b26d)break;else _0x5a4853['push'](_0x5a4853['shift']());}catch(_0x5f58fb){_0x5a4853['push'](_0x5a4853['shift']());}}}(a218_0x3ca5,0xdd2c7));import{listAppRoles}from'../../core/api-client.js';function a218_0x3ca5(){const _0x3db69e=['ADMIN','appCode','1891460aEGcov','toUpperCase','trim','807972FEaaEm','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','Found\x20','190078uOpFDI','DEV','8577678hsxsSc','join','type','length','16AHYsfS','Page\x20size\x20(1-100)','\x20role(s)','20MWwSFz','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','8qVOtyt','list','OWNER','str','140571taoynX','1963887asgLII','17936703CdnQys','Invalid\x20--type\x20\x22','number','Filter\x20by\x20role\x20type','validation','page','role','includes','dev','num','pagesize'];a218_0x3ca5=function(){return _0x3db69e;};return a218_0x3ca5();}function a218_0x14a7(_0xf821a9,_0x54bde3){_0xf821a9=_0xf821a9-0xf7;const _0x3ca532=a218_0x3ca5();let _0x14a7ef=_0x3ca532[_0xf821a9];return _0x14a7ef;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a218_0x26a7ab(0xff),a218_0x26a7ab(0x108),a218_0x26a7ab(0x114),'CUSTOM'];export const roleList={'service':a218_0x26a7ab(0xfa),'command':a218_0x26a7ab(0x113),'description':a218_0x26a7ab(0x105),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a218_0x26a7ab(0x10b),'type':'string','required':![],'description':a218_0x26a7ab(0xf7),'enum':ROLE_TYPES},{'name':a218_0x26a7ab(0xf9),'type':a218_0x26a7ab(0x11a),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a218_0x26a7ab(0xfe),'type':'number','description':a218_0x26a7ab(0x10e),'default':0x64}],async 'validate'(_0x2c809a){const _0x1b5aae=a218_0x26a7ab,_0x52a043=_0x2c809a[_0x1b5aae(0x115)](_0x1b5aae(0x10b))[_0x1b5aae(0x103)]();if(_0x52a043&&!ROLE_TYPES[_0x1b5aae(0xfb)](_0x52a043['toUpperCase']()))throw CliErrors[_0x1b5aae(0xf8)](_0x1b5aae(0x119)+_0x52a043+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x1b5aae(0x10a)](',\x20')+'.');const _0x4b50c5=_0x2c809a['num']('page',0x1),_0x149ced=_0x2c809a[_0x1b5aae(0xfd)](_0x1b5aae(0xfe),0x64);if(_0x4b50c5<0x1)throw CliErrors[_0x1b5aae(0xf8)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x149ced<0x1||_0x149ced>0x64)throw CliErrors[_0x1b5aae(0xf8)](_0x1b5aae(0x111));},async 'execute'(_0x305dbe){const _0x3e5fe4=a218_0x26a7ab,_0x5a35a2=_0x305dbe[_0x3e5fe4(0xfd)](_0x3e5fe4(0xf9),0x1)||0x1,_0x47c081=_0x305dbe[_0x3e5fe4(0xfd)](_0x3e5fe4(0xfe),0x64)||0x64,_0x5b5022=_0x305dbe[_0x3e5fe4(0x115)](_0x3e5fe4(0x10b))[_0x3e5fe4(0x103)]()[_0x3e5fe4(0x102)](),{items:_0x31a533,paging:_0xaf3ba6}=await listAppRoles(_0x305dbe[_0x3e5fe4(0x100)],{'currentPage':_0x5a35a2,'pageSize':_0x47c081}),_0x1a9e51=_0x5b5022?_0x31a533['filter'](_0x20611b=>_0x20611b['roleType']===_0x5b5022):_0x31a533,_0x2e2fb8=_0x1a9e51['map'](projectRole);return{'ok':!![],'data':{'scope':_0x3e5fe4(0xfc),'roles':_0x2e2fb8,'paging':_0xaf3ba6},'message':_0x3e5fe4(0x106)+_0x2e2fb8[_0x3e5fe4(0x10c)]+_0x3e5fe4(0x10f)};}};
@@ -1 +1 @@
1
- function a219_0x483b(){const _0x55d713=['toLowerCase','Role\x20id\x20(from\x20`role\x20list`)','Disambiguate\x20with\x20--role\x20<id>.','map','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20is\x20not\x20a\x20member\x20of\x20role\x20','appCode','user','length','push','trim','user-add','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','expectUserCount','\x20member(s)\x20but\x20role\x20has\x20','number','700zRODYW','remark','tenant_code','Pass\x20--role\x20<id|name>.','8SttcYi','authRequired','Pass\x20--user\x20<id|name>.','Pass\x20--user\x20<id>.','\x20built-in\x20role\x20','DEV','username','name','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Role\x20id\x20or\x20exact\x20role\x20name',';\x20no\x20change.','Cannot\x20','filter','flagMissing','/smartapi/permit/user-role/create','Multiple\x20tenant\x20members\x20match\x20\x22','\x22:\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','8410100zduZpo','/smartapi/permit/user-role/delete','Role\x20name\x20\x22','CUSTOM','Role\x20name','2485202hJLjJH','POST','string','4070325IbfAnH','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','roleName','1DcKiZk','ADMIN','Missing\x20user\x20reference.','find','OWNER','\x20is\x20already\x20a\x20member\x20of\x20role\x20','nickname','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','dev','\x22\x20is\x20ambiguous\x20(ids:\x20','\x20duplicate\x20memberships\x20for\x20user\x20','userId','7015836DRMXZC','join','includes','flag','permitCount','expect-user-count','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Role\x20id\x20','\x22\x20not\x20found\x20in\x20app\x20','\x20not\x20found\x20in\x20app\x20','User\x20','totalCount','test','4863231MEVUfR','str','10098ewsGvX','Check\x20the\x20nickname/username.\x20','roleType','2203145rLnckE','validation'];a219_0x483b=function(){return _0x55d713;};return a219_0x483b();}const a219_0x8608e=a219_0x429e;(function(_0x15eb29,_0xa233f7){const _0x48c601=a219_0x429e,_0x4a1a2a=_0x15eb29();while(!![]){try{const _0x3e9dbc=parseInt(_0x48c601(0xa9))/0x1*(-parseInt(_0x48c601(0xa3))/0x2)+parseInt(_0x48c601(0xc4))/0x3*(parseInt(_0x48c601(0x88))/0x4)+parseInt(_0x48c601(0xc7))/0x5+parseInt(_0x48c601(0xb5))/0x6+-parseInt(_0x48c601(0xa6))/0x7+parseInt(_0x48c601(0x8c))/0x8*(-parseInt(_0x48c601(0xc2))/0x9)+parseInt(_0x48c601(0x9e))/0xa;if(_0x3e9dbc===_0xa233f7)break;else _0x4a1a2a['push'](_0x4a1a2a['shift']());}catch(_0x53c6f1){_0x4a1a2a['push'](_0x4a1a2a['shift']());}}}(a219_0x483b,0xa4ee8));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':a219_0x8608e(0x87),'required':!![],'description':a219_0x8608e(0xca)};function a219_0x429e(_0x101e06,_0xc2005){_0x101e06=_0x101e06-0x7b;const _0x483b17=a219_0x483b();let _0x429e4d=_0x483b17[_0x101e06];return _0x429e4d;}export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a219_0x8608e(0x95)};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a219_0x8608e(0xa7)};export const NAME_FLAG={'name':a219_0x8608e(0x93),'type':'string','required':!![],'description':a219_0x8608e(0xa2)};export const USER_NAME_FLAG={'name':'name','type':a219_0x8608e(0xa5),'required':!![],'description':a219_0x8608e(0x7b)};export const REMARK_FLAG={'name':a219_0x8608e(0x89),'type':a219_0x8608e(0xa5),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a219_0x8608e(0xba),'type':a219_0x8608e(0x87),'required':![],'description':a219_0x8608e(0x83)};export const BUILTIN_ROLE_TYPES=[a219_0x8608e(0xaa),a219_0x8608e(0x91),a219_0x8608e(0xad)];export function isBuiltinRole(_0x4bccbb){const _0x254825=a219_0x8608e;return BUILTIN_ROLE_TYPES[_0x254825(0xb7)](_0x4bccbb);}export function assertCustomRole(_0x3ddb87,_0x2c8a01){const _0x554116=a219_0x8608e;if(_0x3ddb87[_0x554116(0xc6)]!==_0x554116(0xa1))throw CliErrors[_0x554116(0xc8)](_0x554116(0x97)+_0x2c8a01+_0x554116(0x90)+_0x3ddb87[_0x554116(0xa8)]+'\x20('+_0x3ddb87[_0x554116(0xc6)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x21f71e){const _0x1571e8=a219_0x8608e;return{'id':_0x21f71e['id'],'roleName':_0x21f71e[_0x1571e8(0xa8)],'roleType':_0x21f71e['roleType'],'remark':_0x21f71e[_0x1571e8(0x89)],'userCount':_0x21f71e['userCount'],'permitCount':_0x21f71e[_0x1571e8(0xb9)],'builtin':isBuiltinRole(_0x21f71e[_0x1571e8(0xc6)])};}export async function resolveRoleRef(_0x35fc71,_0x3df6d4){const _0x4cc278=a219_0x8608e,_0xdacecf=_0x3df6d4[_0x4cc278(0x81)]();if(!_0xdacecf)throw CliErrors[_0x4cc278(0xc8)]('Missing\x20role\x20reference.',_0x4cc278(0x8b));if(/^\d+$/['test'](_0xdacecf))return getRoleById(_0x35fc71,Number(_0xdacecf));const _0x288ffd=await listAllAppRoles(_0x35fc71),_0x36d4d3=_0x288ffd[_0x4cc278(0x98)](_0x2902de=>_0x2902de[_0x4cc278(0xa8)]===_0xdacecf);if(_0x36d4d3['length']===0x0)throw CliErrors[_0x4cc278(0xc8)](_0x4cc278(0xa0)+_0xdacecf+_0x4cc278(0xbd)+_0x35fc71+'.',_0x4cc278(0x9d));if(_0x36d4d3['length']>0x1){const _0x468e35=_0x36d4d3['map'](_0x3cf571=>_0x3cf571['id'])['join'](',\x20');throw CliErrors[_0x4cc278(0xc8)](_0x4cc278(0xa0)+_0xdacecf+_0x4cc278(0xb2)+_0x468e35+').',_0x4cc278(0xcb));}return _0x36d4d3[0x0];}export async function getRoleById(_0x600f9d,_0x4274e8){const _0x257fc2=a219_0x8608e,_0x12537e=await listAllAppRoles(_0x600f9d),_0x406926=_0x12537e[_0x257fc2(0x98)](_0x15b3fc=>_0x15b3fc['id']===_0x4274e8&&(!_0x15b3fc[_0x257fc2(0x7d)]||_0x15b3fc['appCode']===_0x600f9d));if(_0x406926[_0x257fc2(0x7f)]!==0x1)throw CliErrors['validation'](_0x257fc2(0xbc)+_0x4274e8+_0x257fc2(0xbe)+_0x600f9d+'.',_0x257fc2(0x84));return _0x406926[0x0];}async function listAllAppRoles(_0x3b2840){const _0x212152=a219_0x8608e,_0x8beaf3=0x64,_0x2a30d7=[];for(let _0x51bdc7=0x1;;_0x51bdc7+=0x1){const {items:_0x271283,paging:_0x220536}=await listAppRoles(_0x3b2840,{'currentPage':_0x51bdc7,'pageSize':_0x8beaf3});_0x2a30d7[_0x212152(0x80)](..._0x271283);if(_0x271283['length']<_0x8beaf3||_0x220536&&_0x2a30d7['length']>=_0x220536[_0x212152(0xc0)])return _0x2a30d7;}}export async function resolveTenantCode(){const _0x314d88=a219_0x8608e,_0x5efe99=await getSessionUserInfo(),_0x1d222a=_0x5efe99?.['user']?.['tenant']?.[_0x314d88(0x8a)];if(!_0x1d222a)throw CliErrors[_0x314d88(0x8d)](_0x314d88(0xbb));return _0x1d222a;}function matchMember(_0x5d5388,_0x3ddcfa){const _0x1f4280=a219_0x8608e,_0xd22ebf=_0x3ddcfa[_0x1f4280(0x81)]()[_0x1f4280(0xc9)]();return(_0x5d5388[_0x1f4280(0xaf)]??'')['toLowerCase']()===_0xd22ebf||(_0x5d5388[_0x1f4280(0x92)]??'')[_0x1f4280(0xc9)]()===_0xd22ebf;}export async function resolveUserRef(_0x48de46,_0x2f2891=a219_0x8608e(0x8f)){const _0x5901df=a219_0x8608e,_0x299c64=_0x48de46[_0x5901df(0x81)]();if(!_0x299c64)throw CliErrors['validation'](_0x5901df(0xab),_0x5901df(0x8e));const _0x453fbc=await resolveTenantCode(),_0x32e05e=await getTenantMembers(_0x453fbc);if(/^\d+$/[_0x5901df(0xc1)](_0x299c64)){const _0x5a40b8=Number(_0x299c64),_0x4a9135=_0x32e05e[_0x5901df(0xac)](_0x4f3ebb=>_0x4f3ebb[_0x5901df(0xb4)]===_0x5a40b8);return{'userId':_0x5a40b8,'username':_0x4a9135?.[_0x5901df(0x92)]??String(_0x5a40b8),'nickname':_0x4a9135?.[_0x5901df(0xaf)],'matchedBy':'id'};}const _0x11627f=_0x32e05e['filter'](_0x6c57ed=>matchMember(_0x6c57ed,_0x299c64));if(_0x11627f[_0x5901df(0x7f)]===0x0)throw CliErrors['validation']('No\x20tenant\x20member\x20matches\x20\x22'+_0x299c64+'\x22.',_0x5901df(0xc5)+_0x2f2891);if(_0x11627f[_0x5901df(0x7f)]>0x1){const _0x2539c9=_0x11627f['map'](_0x4571b6=>(_0x4571b6[_0x5901df(0xaf)]??_0x4571b6[_0x5901df(0x92)]??'?')+'('+_0x4571b6[_0x5901df(0xb4)]+')')[_0x5901df(0xb6)](',\x20');throw CliErrors[_0x5901df(0xc8)](_0x5901df(0x9b)+_0x299c64+_0x5901df(0x9c)+_0x2539c9+'.',_0x2f2891);}const _0xd87790=_0x11627f[0x0];return{'userId':_0xd87790[_0x5901df(0xb4)],'username':_0xd87790['username']??String(_0xd87790['userId']),'nickname':_0xd87790[_0x5901df(0xaf)],'matchedBy':_0x5901df(0x93)};}export const CREATE_USER_ROLE_PATH=a219_0x8608e(0x9a);export const DELETE_USER_ROLE_PATH=a219_0x8608e(0x9f);export function computeRoleUserMutation(_0x3dd85c){const _0x550c1c=a219_0x8608e,{operation:_0x48e9d3,appCode:_0xde0842,role:_0x27fef7,relations:_0x16995c,user:_0x58cb49}=_0x3dd85c,_0x2944cc=[...new Set(_0x16995c['map'](_0x114789=>_0x114789[_0x550c1c(0xb4)]))],_0x1c841f=[];if(_0x3dd85c[_0x550c1c(0x85)]!==undefined&&_0x3dd85c[_0x550c1c(0x85)]!==_0x2944cc['length'])throw CliErrors[_0x550c1c(0xc8)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x3dd85c[_0x550c1c(0x85)]+_0x550c1c(0x86)+_0x2944cc['length']+'.',_0x550c1c(0x94));const _0x3258e8=_0x2944cc[_0x550c1c(0xb7)](_0x58cb49[_0x550c1c(0xb4)]),_0x2d58b2=_0x16995c[_0x550c1c(0x98)](_0x3e79b7=>_0x3e79b7[_0x550c1c(0xb4)]===_0x58cb49['userId'])[_0x550c1c(0xcc)](_0xd38355=>_0xd38355['id']),_0x1504ed=_0x48e9d3===_0x550c1c(0x82)?!_0x3258e8:_0x3258e8;let _0x236060=_0x2944cc;_0x48e9d3===_0x550c1c(0x82)?_0x3258e8?_0x1c841f[_0x550c1c(0x80)](_0x550c1c(0xbf)+_0x58cb49[_0x550c1c(0xb4)]+_0x550c1c(0xae)+_0x27fef7[_0x550c1c(0xa8)]+_0x550c1c(0x96)):_0x236060=[..._0x2944cc,_0x58cb49['userId']]:!_0x3258e8?_0x1c841f[_0x550c1c(0x80)](_0x550c1c(0xbf)+_0x58cb49[_0x550c1c(0xb4)]+_0x550c1c(0x7c)+_0x27fef7[_0x550c1c(0xa8)]+_0x550c1c(0x96)):(_0x236060=_0x2944cc[_0x550c1c(0x98)](_0x2aec3=>_0x2aec3!==_0x58cb49[_0x550c1c(0xb4)]),_0x2d58b2['length']>0x1&&_0x1c841f[_0x550c1c(0x80)]('Removed\x20'+_0x2d58b2[_0x550c1c(0x7f)]+_0x550c1c(0xb3)+_0x58cb49[_0x550c1c(0xb4)]+'.'));const _0x488d40={'scope':_0x550c1c(0xb1),'operation':_0x48e9d3,'selector':{'appCode':_0xde0842,'roleId':_0x27fef7['id'],'roleName':_0x27fef7[_0x550c1c(0xa8)],'userId':_0x58cb49['userId']},'before':{'userIds':_0x2944cc},'after':{'userIds':_0x236060},'dryRun':_0x3dd85c['dryRun'],'backend':{'method':_0x550c1c(0xa4),'path':_0x48e9d3===_0x550c1c(0x82)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x1c841f};return{'mutation':_0x488d40,'changed':_0x1504ed,'matchingRelationIds':_0x2d58b2};}export async function loadDevRoleRelations(_0x45b251,_0x266fdb){const _0x3fd86b=a219_0x8608e,_0x1412e5=0x64,_0x146645=[];for(let _0x24feab=0x1;;_0x24feab+=0x1){const {items:_0x408f56,paging:_0x2508da}=await listDevUserRoleRelations(_0x45b251,{'roleId':_0x266fdb,'currentPage':_0x24feab,'pageSize':_0x1412e5});_0x146645[_0x3fd86b(0x80)](..._0x408f56);if(_0x408f56[_0x3fd86b(0x7f)]<_0x1412e5||_0x2508da&&_0x146645[_0x3fd86b(0x7f)]>=_0x2508da['totalCount'])return _0x146645;}}export function readRoleRef(_0x3ea8eb){const _0x4f0e6b=a219_0x8608e,_0x2933b3=_0x3ea8eb[_0x4f0e6b(0xc3)]('role')['trim']();if(!_0x2933b3)throw CliErrors[_0x4f0e6b(0x99)]('role',_0x4f0e6b(0x8b));return _0x2933b3;}export async function prepareUserMutation(_0x70256a,_0x220c96,_0x153da1){const _0x19b1af=a219_0x8608e,_0x254564=readRoleRef(_0x70256a),_0x32d38a=_0x70256a[_0x19b1af(0xc3)](_0x19b1af(0x7e))[_0x19b1af(0x81)]();if(!_0x32d38a)throw CliErrors['flagMissing'](_0x19b1af(0x7e),_0x19b1af(0x8e));const _0x316934=_0x70256a[_0x19b1af(0xb8)](_0x19b1af(0xba)),_0xffc054=_0x316934===undefined||_0x316934===null?undefined:Number(_0x316934),_0x1b7018=await resolveRoleRef(_0x70256a['appCode'],_0x254564);if(_0x1b7018[_0x19b1af(0xc6)]==='OWNER')throw CliErrors[_0x19b1af(0xc8)](_0x19b1af(0x97)+_0x220c96+'\x20members\x20of\x20the\x20OWNER\x20role.',_0x19b1af(0xb0));const _0x1d5fd5=await resolveUserRef(_0x32d38a),_0x2a1781=await loadDevRoleRelations(_0x70256a[_0x19b1af(0x7d)],_0x1b7018['id']);return{...computeRoleUserMutation({'operation':_0x220c96,'appCode':_0x70256a[_0x19b1af(0x7d)],'role':_0x1b7018,'relations':_0x2a1781,'user':{'userId':_0x1d5fd5[_0x19b1af(0xb4)],'username':_0x1d5fd5[_0x19b1af(0x92)],'nickname':_0x1d5fd5['nickname']},'dryRun':_0x153da1,..._0xffc054!==undefined?{'expectUserCount':_0xffc054}:{}}),'role':_0x1b7018,'user':_0x1d5fd5};}
1
+ const a219_0x120286=a219_0xc230;(function(_0x482296,_0x496138){const _0x12f744=a219_0xc230,_0x11ff7d=_0x482296();while(!![]){try{const _0x3d472d=-parseInt(_0x12f744(0xab))/0x1+-parseInt(_0x12f744(0xc3))/0x2*(parseInt(_0x12f744(0xb1))/0x3)+-parseInt(_0x12f744(0xbf))/0x4+-parseInt(_0x12f744(0xb3))/0x5+-parseInt(_0x12f744(0xc5))/0x6*(parseInt(_0x12f744(0xc1))/0x7)+parseInt(_0x12f744(0xdf))/0x8*(-parseInt(_0x12f744(0xaf))/0x9)+parseInt(_0x12f744(0xc8))/0xa;if(_0x3d472d===_0x496138)break;else _0x11ff7d['push'](_0x11ff7d['shift']());}catch(_0x3b0c6d){_0x11ff7d['push'](_0x11ff7d['shift']());}}}(a219_0x2f1b,0x3bae7));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':a219_0x120286(0xd5),'required':!![],'description':a219_0x120286(0xe6)};export const ROLE_REF_FLAG={'name':a219_0x120286(0xbc),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xa4)};function a219_0xc230(_0x3f0b2a,_0x39c580){_0x3f0b2a=_0x3f0b2a-0x96;const _0x2f1b1a=a219_0x2f1b();let _0xc2305d=_0x2f1b1a[_0x3f0b2a];return _0xc2305d;}export const USER_REF_FLAG={'name':a219_0x120286(0xcc),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xd7)};export const NAME_FLAG={'name':a219_0x120286(0xbe),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0xc7)};export const USER_NAME_FLAG={'name':a219_0x120286(0xbe),'type':a219_0x120286(0xdc),'required':!![],'description':a219_0x120286(0x9f)};export const REMARK_FLAG={'name':a219_0x120286(0x9e),'type':a219_0x120286(0xdc),'required':![],'description':a219_0x120286(0xa9)};export const EXPECT_USER_COUNT_FLAG={'name':a219_0x120286(0xd3),'type':'number','required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=['ADMIN',a219_0x120286(0x97),a219_0x120286(0xdb)];export function isBuiltinRole(_0x42ff50){const _0x528a05=a219_0x120286;return BUILTIN_ROLE_TYPES[_0x528a05(0xb8)](_0x42ff50);}export function assertCustomRole(_0x12782f,_0x384f5f){const _0x35d13d=a219_0x120286;if(_0x12782f[_0x35d13d(0xa6)]!==_0x35d13d(0xb0))throw CliErrors[_0x35d13d(0xb5)](_0x35d13d(0xa7)+_0x384f5f+_0x35d13d(0xe7)+_0x12782f['roleName']+'\x20('+_0x12782f[_0x35d13d(0xa6)]+').',_0x35d13d(0xde));}export function projectRole(_0x42b9d1){const _0x49c713=a219_0x120286;return{'id':_0x42b9d1['id'],'roleName':_0x42b9d1['roleName'],'roleType':_0x42b9d1[_0x49c713(0xa6)],'remark':_0x42b9d1[_0x49c713(0x9e)],'userCount':_0x42b9d1[_0x49c713(0xc2)],'permitCount':_0x42b9d1[_0x49c713(0xaa)],'builtin':isBuiltinRole(_0x42b9d1[_0x49c713(0xa6)])};}export async function resolveRoleRef(_0x43ad0a,_0x243ac6){const _0x561010=a219_0x120286,_0x1f283c=_0x243ac6[_0x561010(0xe4)]();if(!_0x1f283c)throw CliErrors[_0x561010(0xb5)](_0x561010(0xce),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x1f283c))return getRoleById(_0x43ad0a,Number(_0x1f283c));const _0x58c80f=await listAllAppRoles(_0x43ad0a),_0x35d43f=_0x58c80f[_0x561010(0xcb)](_0x3742b0=>_0x3742b0['roleName']===_0x1f283c);if(_0x35d43f[_0x561010(0xa2)]===0x0)throw CliErrors[_0x561010(0xb5)]('Role\x20name\x20\x22'+_0x1f283c+_0x561010(0xb4)+_0x43ad0a+'.',_0x561010(0xa1));if(_0x35d43f[_0x561010(0xa2)]>0x1){const _0x3353aa=_0x35d43f[_0x561010(0xac)](_0x140995=>_0x140995['id'])['join'](',\x20');throw CliErrors[_0x561010(0xb5)](_0x561010(0x99)+_0x1f283c+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x3353aa+').',_0x561010(0xda));}return _0x35d43f[0x0];}export async function getRoleById(_0x360641,_0x15337a){const _0xed5c73=a219_0x120286,_0x4f82a2=await listAllAppRoles(_0x360641),_0x33d257=_0x4f82a2['filter'](_0x1ccc4b=>_0x1ccc4b['id']===_0x15337a&&(!_0x1ccc4b[_0xed5c73(0xd4)]||_0x1ccc4b['appCode']===_0x360641));if(_0x33d257[_0xed5c73(0xa2)]!==0x1)throw CliErrors[_0xed5c73(0xb5)](_0xed5c73(0x9b)+_0x15337a+_0xed5c73(0x9d)+_0x360641+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x33d257[0x0];}function a219_0x2f1b(){const _0x32fd5d=['appCode','number','Anti-drift\x20check\x20failed:\x20expected\x20','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','POST','userId','Disambiguate\x20with\x20--role\x20<id>.','OWNER','string','\x20duplicate\x20memberships\x20for\x20user\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','6824pCjOnR','Removed\x20','push','Pass\x20--user\x20<id|name>.','username','trim','flag','Role\x20id\x20(from\x20`role\x20list`)','\x20built-in\x20role\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','str','DEV','Pass\x20--role\x20<id|name>.','Role\x20name\x20\x22','join','Role\x20id\x20','authRequired','\x20not\x20found\x20in\x20app\x20','remark','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','nickname','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','length','expectUserCount','Role\x20id\x20or\x20exact\x20role\x20name','dev','roleType','Cannot\x20','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Optional\x20role\x20remark/description','permitCount','170190elFJJV','map','/smartapi/permit/user-role/delete','tenant','4203iOFcZi','CUSTOM','635961NUaSXl','user-add','1836840GpsdZK','\x22\x20not\x20found\x20in\x20app\x20','validation','User\x20','roleName','includes','Pass\x20--user\x20<id>.','\x20member(s)\x20but\x20role\x20has\x20','find','role','\x22:\x20','name','1799068IkIBse','/smartapi/permit/user-role/create','133vDcyyS','userCount','2MUiKAz','toLowerCase','72138KewlBK',';\x20no\x20change.','Role\x20name','20705550MhFATw','tenant_code','flagMissing','filter','user','totalCount','Missing\x20role\x20reference.','Multiple\x20tenant\x20members\x20match\x20\x22','Check\x20the\x20nickname/username.\x20','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','dryRun','expect-user-count'];a219_0x2f1b=function(){return _0x32fd5d;};return a219_0x2f1b();}async function listAllAppRoles(_0x159237){const _0x1da8c4=a219_0x120286,_0x19633=0x64,_0x102f1c=[];for(let _0x7106fb=0x1;;_0x7106fb+=0x1){const {items:_0x48c5b8,paging:_0x14fe31}=await listAppRoles(_0x159237,{'currentPage':_0x7106fb,'pageSize':_0x19633});_0x102f1c[_0x1da8c4(0xe1)](..._0x48c5b8);if(_0x48c5b8[_0x1da8c4(0xa2)]<_0x19633||_0x14fe31&&_0x102f1c[_0x1da8c4(0xa2)]>=_0x14fe31[_0x1da8c4(0xcd)])return _0x102f1c;}}export async function resolveTenantCode(){const _0x114c23=a219_0x120286,_0x504e06=await getSessionUserInfo(),_0xfefb24=_0x504e06?.[_0x114c23(0xcc)]?.[_0x114c23(0xae)]?.[_0x114c23(0xc9)];if(!_0xfefb24)throw CliErrors[_0x114c23(0x9c)](_0x114c23(0xd1));return _0xfefb24;}function matchMember(_0x3c2dc6,_0x59b853){const _0x122ba9=a219_0x120286,_0x3055c9=_0x59b853[_0x122ba9(0xe4)]()[_0x122ba9(0xc4)]();return(_0x3c2dc6[_0x122ba9(0xa0)]??'')[_0x122ba9(0xc4)]()===_0x3055c9||(_0x3c2dc6['username']??'')[_0x122ba9(0xc4)]()===_0x3055c9;}export async function resolveUserRef(_0x16d545,_0x1b7a0f=a219_0x120286(0xb9)){const _0x230bdc=a219_0x120286,_0x37430d=_0x16d545[_0x230bdc(0xe4)]();if(!_0x37430d)throw CliErrors[_0x230bdc(0xb5)]('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x4c85da=await resolveTenantCode(),_0x323fcd=await getTenantMembers(_0x4c85da);if(/^\d+$/['test'](_0x37430d)){const _0x418179=Number(_0x37430d),_0xa921f2=_0x323fcd[_0x230bdc(0xbb)](_0x5d66b4=>_0x5d66b4[_0x230bdc(0xd9)]===_0x418179);return{'userId':_0x418179,'username':_0xa921f2?.['username']??String(_0x418179),'nickname':_0xa921f2?.[_0x230bdc(0xa0)],'matchedBy':'id'};}const _0x57e574=_0x323fcd[_0x230bdc(0xcb)](_0x41f788=>matchMember(_0x41f788,_0x37430d));if(_0x57e574['length']===0x0)throw CliErrors[_0x230bdc(0xb5)]('No\x20tenant\x20member\x20matches\x20\x22'+_0x37430d+'\x22.',_0x230bdc(0xd0)+_0x1b7a0f);if(_0x57e574[_0x230bdc(0xa2)]>0x1){const _0x719f97=_0x57e574[_0x230bdc(0xac)](_0x3bba03=>(_0x3bba03[_0x230bdc(0xa0)]??_0x3bba03[_0x230bdc(0xe3)]??'?')+'('+_0x3bba03['userId']+')')[_0x230bdc(0x9a)](',\x20');throw CliErrors[_0x230bdc(0xb5)](_0x230bdc(0xcf)+_0x37430d+_0x230bdc(0xbd)+_0x719f97+'.',_0x1b7a0f);}const _0x254f54=_0x57e574[0x0];return{'userId':_0x254f54[_0x230bdc(0xd9)],'username':_0x254f54['username']??String(_0x254f54[_0x230bdc(0xd9)]),'nickname':_0x254f54[_0x230bdc(0xa0)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a219_0x120286(0xc0);export const DELETE_USER_ROLE_PATH=a219_0x120286(0xad);export function computeRoleUserMutation(_0x33dd16){const _0x27cef8=a219_0x120286,{operation:_0x1ca31d,appCode:_0x5428a2,role:_0x411a60,relations:_0x4b38a7,user:_0x56c138}=_0x33dd16,_0x423130=[...new Set(_0x4b38a7[_0x27cef8(0xac)](_0x3c7d61=>_0x3c7d61['userId']))],_0x554bf6=[];if(_0x33dd16[_0x27cef8(0xa3)]!==undefined&&_0x33dd16[_0x27cef8(0xa3)]!==_0x423130['length'])throw CliErrors['validation'](_0x27cef8(0xd6)+_0x33dd16[_0x27cef8(0xa3)]+_0x27cef8(0xba)+_0x423130[_0x27cef8(0xa2)]+'.',_0x27cef8(0xe8));const _0x2bf3a6=_0x423130[_0x27cef8(0xb8)](_0x56c138[_0x27cef8(0xd9)]),_0x51dbf0=_0x4b38a7[_0x27cef8(0xcb)](_0x573921=>_0x573921[_0x27cef8(0xd9)]===_0x56c138[_0x27cef8(0xd9)])[_0x27cef8(0xac)](_0x5e58cd=>_0x5e58cd['id']),_0x25fe15=_0x1ca31d===_0x27cef8(0xb2)?!_0x2bf3a6:_0x2bf3a6;let _0x4f64ae=_0x423130;_0x1ca31d===_0x27cef8(0xb2)?_0x2bf3a6?_0x554bf6['push'](_0x27cef8(0xb6)+_0x56c138[_0x27cef8(0xd9)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x411a60[_0x27cef8(0xb7)]+_0x27cef8(0xc6)):_0x4f64ae=[..._0x423130,_0x56c138['userId']]:!_0x2bf3a6?_0x554bf6[_0x27cef8(0xe1)](_0x27cef8(0xb6)+_0x56c138[_0x27cef8(0xd9)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x411a60[_0x27cef8(0xb7)]+_0x27cef8(0xc6)):(_0x4f64ae=_0x423130[_0x27cef8(0xcb)](_0x390689=>_0x390689!==_0x56c138[_0x27cef8(0xd9)]),_0x51dbf0[_0x27cef8(0xa2)]>0x1&&_0x554bf6['push'](_0x27cef8(0xe0)+_0x51dbf0[_0x27cef8(0xa2)]+_0x27cef8(0xdd)+_0x56c138[_0x27cef8(0xd9)]+'.'));const _0x1afe0d={'scope':_0x27cef8(0xa5),'operation':_0x1ca31d,'selector':{'appCode':_0x5428a2,'roleId':_0x411a60['id'],'roleName':_0x411a60['roleName'],'userId':_0x56c138['userId']},'before':{'userIds':_0x423130},'after':{'userIds':_0x4f64ae},'dryRun':_0x33dd16[_0x27cef8(0xd2)],'backend':{'method':_0x27cef8(0xd8),'path':_0x1ca31d==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x554bf6};return{'mutation':_0x1afe0d,'changed':_0x25fe15,'matchingRelationIds':_0x51dbf0};}export async function loadDevRoleRelations(_0x1aeaec,_0x58d463){const _0x3c2170=a219_0x120286,_0x3136f0=0x64,_0x4e37b8=[];for(let _0x49e9c1=0x1;;_0x49e9c1+=0x1){const {items:_0x1bc7f9,paging:_0xd66052}=await listDevUserRoleRelations(_0x1aeaec,{'roleId':_0x58d463,'currentPage':_0x49e9c1,'pageSize':_0x3136f0});_0x4e37b8[_0x3c2170(0xe1)](..._0x1bc7f9);if(_0x1bc7f9['length']<_0x3136f0||_0xd66052&&_0x4e37b8[_0x3c2170(0xa2)]>=_0xd66052['totalCount'])return _0x4e37b8;}}export function readRoleRef(_0x486dcc){const _0x29ae69=a219_0x120286,_0x1a2fc9=_0x486dcc[_0x29ae69(0x96)](_0x29ae69(0xbc))[_0x29ae69(0xe4)]();if(!_0x1a2fc9)throw CliErrors[_0x29ae69(0xca)](_0x29ae69(0xbc),_0x29ae69(0x98));return _0x1a2fc9;}export async function prepareUserMutation(_0x1c0af1,_0x3a9c65,_0x2c809b){const _0x3bc380=a219_0x120286,_0x11a3e3=readRoleRef(_0x1c0af1),_0x36c5f2=_0x1c0af1['str']('user')[_0x3bc380(0xe4)]();if(!_0x36c5f2)throw CliErrors[_0x3bc380(0xca)]('user',_0x3bc380(0xe2));const _0x1e106b=_0x1c0af1[_0x3bc380(0xe5)](_0x3bc380(0xd3)),_0x44daee=_0x1e106b===undefined||_0x1e106b===null?undefined:Number(_0x1e106b),_0x35f2c0=await resolveRoleRef(_0x1c0af1[_0x3bc380(0xd4)],_0x11a3e3);if(_0x35f2c0[_0x3bc380(0xa6)]===_0x3bc380(0xdb))throw CliErrors[_0x3bc380(0xb5)]('Cannot\x20'+_0x3a9c65+'\x20members\x20of\x20the\x20OWNER\x20role.',_0x3bc380(0xa8));const _0x16f436=await resolveUserRef(_0x36c5f2),_0x540887=await loadDevRoleRelations(_0x1c0af1[_0x3bc380(0xd4)],_0x35f2c0['id']);return{...computeRoleUserMutation({'operation':_0x3a9c65,'appCode':_0x1c0af1[_0x3bc380(0xd4)],'role':_0x35f2c0,'relations':_0x540887,'user':{'userId':_0x16f436[_0x3bc380(0xd9)],'username':_0x16f436['username'],'nickname':_0x16f436['nickname']},'dryRun':_0x2c809b,..._0x44daee!==undefined?{'expectUserCount':_0x44daee}:{}}),'role':_0x35f2c0,'user':_0x16f436};}
@@ -1 +1 @@
1
- const a220_0x5108d4=a220_0xd967;(function(_0x516a1d,_0x9f48ed){const _0x5d66d4=a220_0xd967,_0x10b67a=_0x516a1d();while(!![]){try{const _0xc90189=parseInt(_0x5d66d4(0xa0))/0x1+parseInt(_0x5d66d4(0xad))/0x2*(-parseInt(_0x5d66d4(0xb4))/0x3)+-parseInt(_0x5d66d4(0x9d))/0x4+parseInt(_0x5d66d4(0x9c))/0x5+-parseInt(_0x5d66d4(0xb3))/0x6+parseInt(_0x5d66d4(0x9b))/0x7*(parseInt(_0x5d66d4(0xb2))/0x8)+parseInt(_0x5d66d4(0xa4))/0x9*(parseInt(_0x5d66d4(0x9f))/0xa);if(_0xc90189===_0x9f48ed)break;else _0x10b67a['push'](_0x10b67a['shift']());}catch(_0x5db7ec){_0x10b67a['push'](_0x10b67a['shift']());}}}(a220_0x1c9f,0xd9a74));import{updateAppRole}from'../../core/api-client.js';function a220_0x1c9f(){const _0x48b665=['2442456TVGiGL','135uPJyII','766584TjgbtR','3622315OBQTtt','6137140cKneCu','remark','59750yFEIrN','125562kYplkY','update','/smartapi/permit/role/update','num','2187scIYra','appCode','length','New\x20role\x20name','validation','trim','string','dev','Nothing\x20to\x20update.','34810YItPxw','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','name','roleName','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','96AfDmLk'];a220_0x1c9f=function(){return _0x48b665;};return a220_0x1c9f();}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=a220_0x5108d4(0xa2);function a220_0xd967(_0x2c3835,_0x437eac){_0x2c3835=_0x2c3835-0x9b;const _0x1c9fea=a220_0x1c9f();let _0xd96771=_0x1c9fea[_0x2c3835];return _0xd96771;}function readPatch(_0x5bddf4){const _0x42742f=a220_0x5108d4,_0x5af515=_0x5bddf4['flag']('name'),_0x3750a6=_0x5bddf4['flag']('remark'),_0x57a4dc={};if(_0x5af515!==undefined&&_0x5af515!==null){const _0x5b4756=String(_0x5af515)[_0x42742f(0xa9)]();if(!_0x5b4756)throw CliErrors['validation']('--name\x20cannot\x20be\x20empty.');if(_0x5b4756[_0x42742f(0xa6)]>0x40)throw CliErrors['validation'](_0x42742f(0xae));_0x57a4dc[_0x42742f(0xb0)]=_0x5b4756;}_0x3750a6!==undefined&&_0x3750a6!==null&&(_0x57a4dc['remark']=String(_0x3750a6));if(_0x57a4dc['roleName']===undefined&&_0x57a4dc[_0x42742f(0x9e)]===undefined)throw CliErrors[_0x42742f(0xa8)](_0x42742f(0xac),_0x42742f(0xb1));return _0x57a4dc;}export const roleUpdate={'service':'role','command':a220_0x5108d4(0xa1),'description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a220_0x5108d4(0xaf),'type':a220_0x5108d4(0xaa),'required':![],'description':a220_0x5108d4(0xa7)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51ca23){readPatch(_0x51ca23);},async 'dryRun'(_0x267a4b){const _0x1011b5=a220_0x5108d4,_0x45ce19=_0x267a4b[_0x1011b5(0xa3)]('id'),_0x15acfd=readPatch(_0x267a4b),_0x40ca55=await getRoleById(_0x267a4b[_0x1011b5(0xa5)],_0x45ce19);return assertCustomRole(_0x40ca55,_0x1011b5(0xa1)),asDryRunResult({'scope':_0x1011b5(0xab),'operation':_0x1011b5(0xa1),'selector':{'appCode':_0x267a4b['appCode'],'roleId':_0x45ce19,'roleName':_0x40ca55[_0x1011b5(0xb0)]},'before':projectRole(_0x40ca55),'after':projectRole({..._0x40ca55,..._0x15acfd['roleName']!==undefined?{'roleName':_0x15acfd[_0x1011b5(0xb0)]}:{},..._0x15acfd['remark']!==undefined?{'remark':_0x15acfd[_0x1011b5(0x9e)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x392229){const _0x17b207=a220_0x5108d4,_0x465b72=_0x392229['num']('id'),_0x5878e2=readPatch(_0x392229),_0x3fce87=await getRoleById(_0x392229[_0x17b207(0xa5)],_0x465b72);assertCustomRole(_0x3fce87,_0x17b207(0xa1)),await updateAppRole({'id':_0x465b72,'appCode':_0x392229[_0x17b207(0xa5)],..._0x5878e2[_0x17b207(0xb0)]!==undefined?{'roleName':_0x5878e2['roleName']}:{},..._0x5878e2[_0x17b207(0x9e)]!==undefined?{'remark':_0x5878e2[_0x17b207(0x9e)]}:{}});const _0x5e0854=await getRoleById(_0x392229[_0x17b207(0xa5)],_0x465b72);return{'ok':!![],'data':{'scope':_0x17b207(0xab),'operation':_0x17b207(0xa1),'selector':{'appCode':_0x392229['appCode'],'roleId':_0x465b72,'roleName':_0x5e0854[_0x17b207(0xb0)]},'before':projectRole(_0x3fce87),'after':projectRole(_0x5e0854),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x5e0854['roleName']+'\x20(id='+_0x465b72+')'};}};
1
+ const a220_0x15254d=a220_0x1462;function a220_0x1462(_0x37bda2,_0xc631b8){_0x37bda2=_0x37bda2-0xe6;const _0xa94a6=a220_0xa94a();let _0x1462c8=_0xa94a6[_0x37bda2];return _0x1462c8;}(function(_0x867647,_0x56b665){const _0xc84419=a220_0x1462,_0x2445c2=_0x867647();while(!![]){try{const _0x5a85ea=parseInt(_0xc84419(0xea))/0x1+parseInt(_0xc84419(0xff))/0x2*(parseInt(_0xc84419(0xf8))/0x3)+parseInt(_0xc84419(0xec))/0x4+parseInt(_0xc84419(0xfb))/0x5+parseInt(_0xc84419(0xf1))/0x6+-parseInt(_0xc84419(0x102))/0x7*(parseInt(_0xc84419(0xfc))/0x8)+-parseInt(_0xc84419(0xe9))/0x9*(parseInt(_0xc84419(0xf9))/0xa);if(_0x5a85ea===_0x56b665)break;else _0x2445c2['push'](_0x2445c2['shift']());}catch(_0x42f178){_0x2445c2['push'](_0x2445c2['shift']());}}}(a220_0xa94a,0x9615b));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=a220_0x15254d(0xeb);function a220_0xa94a(){const _0x5cbd76=['/smartapi/permit/role/update','1135948UzGqwk','length','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','num','Nothing\x20to\x20update.','829008QsHvFg','dev','name','New\x20role\x20name','update','trim','remark','49047QGjXlq','68230ozXFpy','flag','3044955iXfVAB','16DwJnjK','validation','POST','94SQRZvr','string','appCode','2109142dQZVnF','Updated\x20role\x20','--name\x20cannot\x20be\x20empty.','roleName','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','1953KQqGFz','898401pdbXYD'];a220_0xa94a=function(){return _0x5cbd76;};return a220_0xa94a();}function readPatch(_0x35673e){const _0x34f4e3=a220_0x15254d,_0x53d26f=_0x35673e[_0x34f4e3(0xfa)](_0x34f4e3(0xf3)),_0x3366b4=_0x35673e[_0x34f4e3(0xfa)](_0x34f4e3(0xf7)),_0x5712c5={};if(_0x53d26f!==undefined&&_0x53d26f!==null){const _0x58738f=String(_0x53d26f)[_0x34f4e3(0xf6)]();if(!_0x58738f)throw CliErrors['validation'](_0x34f4e3(0xe6));if(_0x58738f[_0x34f4e3(0xed)]>0x40)throw CliErrors[_0x34f4e3(0xfd)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x5712c5['roleName']=_0x58738f;}_0x3366b4!==undefined&&_0x3366b4!==null&&(_0x5712c5['remark']=String(_0x3366b4));if(_0x5712c5[_0x34f4e3(0xe7)]===undefined&&_0x5712c5['remark']===undefined)throw CliErrors['validation'](_0x34f4e3(0xf0),_0x34f4e3(0xe8));return _0x5712c5;}export const roleUpdate={'service':'role','command':a220_0x15254d(0xf5),'description':a220_0x15254d(0xee),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a220_0x15254d(0xf3),'type':a220_0x15254d(0x100),'required':![],'description':a220_0x15254d(0xf4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x35c6b6){readPatch(_0x35c6b6);},async 'dryRun'(_0x334589){const _0x13a95d=a220_0x15254d,_0x4f75c0=_0x334589['num']('id'),_0x2d8686=readPatch(_0x334589),_0x54e9e1=await getRoleById(_0x334589[_0x13a95d(0x101)],_0x4f75c0);return assertCustomRole(_0x54e9e1,_0x13a95d(0xf5)),asDryRunResult({'scope':_0x13a95d(0xf2),'operation':_0x13a95d(0xf5),'selector':{'appCode':_0x334589[_0x13a95d(0x101)],'roleId':_0x4f75c0,'roleName':_0x54e9e1[_0x13a95d(0xe7)]},'before':projectRole(_0x54e9e1),'after':projectRole({..._0x54e9e1,..._0x2d8686[_0x13a95d(0xe7)]!==undefined?{'roleName':_0x2d8686['roleName']}:{},..._0x2d8686[_0x13a95d(0xf7)]!==undefined?{'remark':_0x2d8686[_0x13a95d(0xf7)]}:{}}),'dryRun':!![],'backend':{'method':_0x13a95d(0xfe),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x1bdad8){const _0xd9b1cc=a220_0x15254d,_0x1039bd=_0x1bdad8[_0xd9b1cc(0xef)]('id'),_0x18ee28=readPatch(_0x1bdad8),_0x20bd38=await getRoleById(_0x1bdad8[_0xd9b1cc(0x101)],_0x1039bd);assertCustomRole(_0x20bd38,_0xd9b1cc(0xf5)),await updateAppRole({'id':_0x1039bd,'appCode':_0x1bdad8['appCode'],..._0x18ee28[_0xd9b1cc(0xe7)]!==undefined?{'roleName':_0x18ee28[_0xd9b1cc(0xe7)]}:{},..._0x18ee28[_0xd9b1cc(0xf7)]!==undefined?{'remark':_0x18ee28['remark']}:{}});const _0xe58a02=await getRoleById(_0x1bdad8[_0xd9b1cc(0x101)],_0x1039bd);return{'ok':!![],'data':{'scope':_0xd9b1cc(0xf2),'operation':_0xd9b1cc(0xf5),'selector':{'appCode':_0x1bdad8[_0xd9b1cc(0x101)],'roleId':_0x1039bd,'roleName':_0xe58a02[_0xd9b1cc(0xe7)]},'before':projectRole(_0x20bd38),'after':projectRole(_0xe58a02),'dryRun':![],'backend':{'method':_0xd9b1cc(0xfe),'path':UPDATE_PATH},'warnings':[]},'message':_0xd9b1cc(0x103)+_0xe58a02[_0xd9b1cc(0xe7)]+'\x20(id='+_0x1039bd+')'};}};
@@ -1 +1 @@
1
- const a221_0x2b3309=a221_0x4b44;function a221_0x4b44(_0x23ac9d,_0x4039b1){_0x23ac9d=_0x23ac9d-0x98;const _0x29f780=a221_0x29f7();let _0x4b44f1=_0x29f780[_0x23ac9d];return _0x4b44f1;}(function(_0x4d0efd,_0x3052ac){const _0x40b8cc=a221_0x4b44,_0x104373=_0x4d0efd();while(!![]){try{const _0x5d95c3=parseInt(_0x40b8cc(0xad))/0x1+parseInt(_0x40b8cc(0x9d))/0x2*(-parseInt(_0x40b8cc(0x99))/0x3)+-parseInt(_0x40b8cc(0x9b))/0x4*(parseInt(_0x40b8cc(0xa5))/0x5)+parseInt(_0x40b8cc(0xa0))/0x6+parseInt(_0x40b8cc(0xa8))/0x7*(parseInt(_0x40b8cc(0x98))/0x8)+-parseInt(_0x40b8cc(0xa7))/0x9+parseInt(_0x40b8cc(0xa3))/0xa;if(_0x5d95c3===_0x3052ac)break;else _0x104373['push'](_0x104373['shift']());}catch(_0xcf6cb2){_0x104373['push'](_0x104373['shift']());}}}(a221_0x29f7,0x6072e));import{createDevUserRole}from'../../core/api-client.js';function a221_0x29f7(){const _0x39a567=['high-risk-write','roleType','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','418256EidNxd','userId','8FjzNVt','11871TgHnRv','appCode','158284sGheGn','role','158WxbzdG','username','user-add','44202tjpSBJ','Added\x20user\x20','\x20already\x20in\x20role\x20','4464390ccrrWc','No\x20change:\x20user\x20','5IhmYcg','selector','6193287xxvolf','3943163lZMlxc','roleName'];a221_0x29f7=function(){return _0x39a567;};return a221_0x29f7();}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';export const roleUserAdd={'service':a221_0x2b3309(0x9c),'command':a221_0x2b3309(0x9f),'description':a221_0x2b3309(0xac),'risk':a221_0x2b3309(0xaa),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x21a923){const _0x10fcc0=a221_0x2b3309,{mutation:_0x499216}=await prepareUserMutation(_0x21a923,_0x10fcc0(0x9f),!![]);return asDryRunResult(_0x499216,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x10188d){const _0x47d94c=a221_0x2b3309,{mutation:_0xcfee77,changed:_0x41581b,role:_0x18b6c1,user:_0x3d7f37}=await prepareUserMutation(_0x10188d,_0x47d94c(0x9f),![]);return _0x41581b&&await createDevUserRole({'appCode':_0x10188d[_0x47d94c(0x9a)],'userId':_0x3d7f37[_0x47d94c(0xae)],'username':_0x3d7f37[_0x47d94c(0x9e)],'roleType':_0x18b6c1[_0x47d94c(0xab)],'roleId':_0xcfee77[_0x47d94c(0xa6)]['roleId']}),{'ok':!![],'data':_0xcfee77,'message':_0x41581b?_0x47d94c(0xa1)+_0xcfee77[_0x47d94c(0xa6)][_0x47d94c(0xae)]+'\x20to\x20role\x20'+_0xcfee77[_0x47d94c(0xa6)][_0x47d94c(0xa9)]:_0x47d94c(0xa4)+_0xcfee77[_0x47d94c(0xa6)][_0x47d94c(0xae)]+_0x47d94c(0xa2)+_0xcfee77[_0x47d94c(0xa6)][_0x47d94c(0xa9)]};}};
1
+ function a221_0x330f(){const _0x4aa7c2=['selector','\x20already\x20in\x20role\x20','7AJBeGN','2395ugdvdU','role','2947879EisKvS','552080Ernwos','roleName','24561vOsGbd','Added\x20user\x20','userId','336456mtVPoH','roleId','POST','user-add','19959bZuDll','1048krZQFq','730wJKHmo','No\x20change:\x20user\x20','high-risk-write','134WhxZgF','136195dUuJRg','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','48hUCvpP'];a221_0x330f=function(){return _0x4aa7c2;};return a221_0x330f();}function a221_0x3763(_0x2afdd5,_0x475c04){_0x2afdd5=_0x2afdd5-0x12f;const _0x330f5b=a221_0x330f();let _0x376333=_0x330f5b[_0x2afdd5];return _0x376333;}const a221_0x4b8856=a221_0x3763;(function(_0x2ef4a4,_0x1b5540){const _0x37608e=a221_0x3763,_0x1be897=_0x2ef4a4();while(!![]){try{const _0x3e494f=-parseInt(_0x37608e(0x144))/0x1+-parseInt(_0x37608e(0x143))/0x2*(parseInt(_0x37608e(0x13e))/0x3)+-parseInt(_0x37608e(0x13f))/0x4*(parseInt(_0x37608e(0x132))/0x5)+parseInt(_0x37608e(0x13a))/0x6+parseInt(_0x37608e(0x131))/0x7*(parseInt(_0x37608e(0x135))/0x8)+parseInt(_0x37608e(0x137))/0x9*(-parseInt(_0x37608e(0x140))/0xa)+parseInt(_0x37608e(0x134))/0xb*(parseInt(_0x37608e(0x146))/0xc);if(_0x3e494f===_0x1b5540)break;else _0x1be897['push'](_0x1be897['shift']());}catch(_0x4fdc15){_0x1be897['push'](_0x1be897['shift']());}}}(a221_0x330f,0x46e4d));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';export const roleUserAdd={'service':a221_0x4b8856(0x133),'command':a221_0x4b8856(0x13d),'description':a221_0x4b8856(0x145),'risk':a221_0x4b8856(0x142),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3462a7){const _0x2eb08d=a221_0x4b8856,{mutation:_0x57e016}=await prepareUserMutation(_0x3462a7,_0x2eb08d(0x13d),!![]);return asDryRunResult(_0x57e016,{'method':_0x2eb08d(0x13c),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x2b954c){const _0x5f3845=a221_0x4b8856,{mutation:_0x1c546a,changed:_0x34b7c4,role:_0x42632d,user:_0x355fff}=await prepareUserMutation(_0x2b954c,'user-add',![]);return _0x34b7c4&&await createDevUserRole({'appCode':_0x2b954c['appCode'],'userId':_0x355fff[_0x5f3845(0x139)],'username':_0x355fff['username'],'roleType':_0x42632d['roleType'],'roleId':_0x1c546a[_0x5f3845(0x12f)][_0x5f3845(0x13b)]}),{'ok':!![],'data':_0x1c546a,'message':_0x34b7c4?_0x5f3845(0x138)+_0x1c546a[_0x5f3845(0x12f)]['userId']+'\x20to\x20role\x20'+_0x1c546a[_0x5f3845(0x12f)][_0x5f3845(0x136)]:_0x5f3845(0x141)+_0x1c546a['selector']['userId']+_0x5f3845(0x130)+_0x1c546a['selector']['roleName']};}};
@@ -1 +1 @@
1
- (function(_0x1e5187,_0x24533a){const _0x31e76e=a222_0x125c,_0x3888a6=_0x1e5187();while(!![]){try{const _0x25bc4c=-parseInt(_0x31e76e(0x7d))/0x1*(-parseInt(_0x31e76e(0x7a))/0x2)+parseInt(_0x31e76e(0x76))/0x3*(parseInt(_0x31e76e(0x84))/0x4)+parseInt(_0x31e76e(0x87))/0x5*(-parseInt(_0x31e76e(0x77))/0x6)+-parseInt(_0x31e76e(0x80))/0x7+-parseInt(_0x31e76e(0x7f))/0x8+parseInt(_0x31e76e(0x85))/0x9+-parseInt(_0x31e76e(0x82))/0xa;if(_0x25bc4c===_0x24533a)break;else _0x3888a6['push'](_0x3888a6['shift']());}catch(_0x5a9309){_0x3888a6['push'](_0x3888a6['shift']());}}}(a222_0x54cc,0xdc092));function a222_0x125c(_0x557038,_0xd26dba){_0x557038=_0x557038-0x76;const _0x54cc1a=a222_0x54cc();let _0x125c3e=_0x54cc1a[_0x557038];return _0x125c3e;}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a222_0x54cc(){const _0x5c62b6=['81644ryNjBD','13966407JTOzNU','user-remove','38965GkltFP','198ZVjzYv','888zPFFmS','No\x20change:\x20user\x20','\x20from\x20role\x20','111728TJhaVL','POST','roleName','1aqnjcD','selector','2222440glHVOm','3150840cyzCYO','userId','1722580orvOjW','Removed\x20user\x20'];a222_0x54cc=function(){return _0x5c62b6;};return a222_0x54cc();}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':'role','command':'user-remove','description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1cf0ce){const _0x46a49a=a222_0x125c,{mutation:_0x522455}=await prepareUserMutation(_0x1cf0ce,_0x46a49a(0x86),!![]);return asDryRunResult(_0x522455,{'method':_0x46a49a(0x7b),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x3cf6e2){const _0x11dc78=a222_0x125c,{matchingRelationIds:_0x5da6ef,mutation:_0x5bbec8,changed:_0x2f2c50}=await prepareUserMutation(_0x3cf6e2,_0x11dc78(0x86),![]);if(_0x2f2c50)for(const _0x2d161c of _0x5da6ef){await deleteDevUserRole(_0x2d161c);}return{'ok':!![],'data':_0x5bbec8,'message':_0x2f2c50?_0x11dc78(0x83)+_0x5bbec8['selector'][_0x11dc78(0x81)]+_0x11dc78(0x79)+_0x5bbec8[_0x11dc78(0x7e)][_0x11dc78(0x7c)]:_0x11dc78(0x78)+_0x5bbec8[_0x11dc78(0x7e)]['userId']+'\x20not\x20in\x20role\x20'+_0x5bbec8[_0x11dc78(0x7e)]['roleName']};}};
1
+ function a222_0x5d2a(_0x4e07c4,_0x52ea99){_0x4e07c4=_0x4e07c4-0x112;const _0x107968=a222_0x1079();let _0x5d2ac5=_0x107968[_0x4e07c4];return _0x5d2ac5;}const a222_0x48b2a0=a222_0x5d2a;(function(_0x132e9a,_0x5682c3){const _0x2032bc=a222_0x5d2a,_0x441f9a=_0x132e9a();while(!![]){try{const _0x17965d=-parseInt(_0x2032bc(0x11f))/0x1*(parseInt(_0x2032bc(0x124))/0x2)+parseInt(_0x2032bc(0x116))/0x3*(parseInt(_0x2032bc(0x119))/0x4)+-parseInt(_0x2032bc(0x125))/0x5+-parseInt(_0x2032bc(0x11c))/0x6*(-parseInt(_0x2032bc(0x118))/0x7)+parseInt(_0x2032bc(0x120))/0x8*(-parseInt(_0x2032bc(0x115))/0x9)+-parseInt(_0x2032bc(0x126))/0xa*(-parseInt(_0x2032bc(0x123))/0xb)+parseInt(_0x2032bc(0x113))/0xc;if(_0x17965d===_0x5682c3)break;else _0x441f9a['push'](_0x441f9a['shift']());}catch(_0x1dc32e){_0x441f9a['push'](_0x441f9a['shift']());}}}(a222_0x1079,0xee614));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':a222_0x48b2a0(0x122),'command':a222_0x48b2a0(0x11d),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a222_0x48b2a0(0x121),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x45e80d){const _0x530ce7=a222_0x48b2a0,{mutation:_0x4714bc}=await prepareUserMutation(_0x45e80d,_0x530ce7(0x11d),!![]);return asDryRunResult(_0x4714bc,{'method':_0x530ce7(0x11e),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5aeeeb){const _0x383c66=a222_0x48b2a0,{matchingRelationIds:_0x57f8fa,mutation:_0x995fcb,changed:_0xc509b3}=await prepareUserMutation(_0x5aeeeb,_0x383c66(0x11d),![]);if(_0xc509b3)for(const _0x1c36b1 of _0x57f8fa){await deleteDevUserRole(_0x1c36b1);}return{'ok':!![],'data':_0x995fcb,'message':_0xc509b3?_0x383c66(0x127)+_0x995fcb['selector'][_0x383c66(0x112)]+_0x383c66(0x114)+_0x995fcb['selector']['roleName']:'No\x20change:\x20user\x20'+_0x995fcb[_0x383c66(0x117)]['userId']+_0x383c66(0x11b)+_0x995fcb[_0x383c66(0x117)][_0x383c66(0x11a)]};}};function a222_0x1079(){const _0x3a1490=['753208iakoKU','high-risk-write','role','22TEPFcZ','34dOjlEv','5674200sWfweA','6150670QHlsNg','Removed\x20user\x20','userId','4885716KxtGce','\x20from\x20role\x20','63RkYJEx','2788293XKGLfu','selector','2524900KfTtGn','8LpYWLO','roleName','\x20not\x20in\x20role\x20','6nxtxCZ','user-remove','POST','63914OhcUjo'];a222_0x1079=function(){return _0x3a1490;};return a222_0x1079();}
@@ -1 +1 @@
1
- const a223_0x5a5727=a223_0x2ecf;(function(_0x2382ae,_0x45d1a2){const _0x3ecb90=a223_0x2ecf,_0x475749=_0x2382ae();while(!![]){try{const _0x87479e=-parseInt(_0x3ecb90(0x1d6))/0x1*(parseInt(_0x3ecb90(0x1d9))/0x2)+parseInt(_0x3ecb90(0x1d8))/0x3+-parseInt(_0x3ecb90(0x1de))/0x4*(-parseInt(_0x3ecb90(0x1c9))/0x5)+parseInt(_0x3ecb90(0x1c5))/0x6*(-parseInt(_0x3ecb90(0x1d5))/0x7)+parseInt(_0x3ecb90(0x1cd))/0x8+parseInt(_0x3ecb90(0x1cb))/0x9*(-parseInt(_0x3ecb90(0x1d0))/0xa)+parseInt(_0x3ecb90(0x1da))/0xb*(parseInt(_0x3ecb90(0x1cf))/0xc);if(_0x87479e===_0x45d1a2)break;else _0x475749['push'](_0x475749['shift']());}catch(_0x5824c2){_0x475749['push'](_0x475749['shift']());}}}(a223_0x804b,0x47341));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a223_0x804b(){const _0x16a1ff=['28qmLMBp','1yKyqTb','nickname','1149099srEoLk','192034DbPIQT','11HLznRq','Pass\x20--name\x20<nickname|username>.','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','username','357844GCGAvz','287298dWVzFQ','flagMissing','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','trim','10qtfaWF','user-resolve','3467277lFAdwT','role','2946888sllWpC','matchedBy','409620QpEhzv','10SNHzYf','\x22\x20→\x20userId\x20','userId','name','Resolved\x20\x22'];a223_0x804b=function(){return _0x16a1ff;};return a223_0x804b();}function a223_0x2ecf(_0x18ec5b,_0x523f6d){_0x18ec5b=_0x18ec5b-0x1c5;const _0x804b0b=a223_0x804b();let _0x2ecf05=_0x804b0b[_0x18ec5b];return _0x2ecf05;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a223_0x5a5727(0x1cc),'command':a223_0x5a5727(0x1ca),'description':a223_0x5a5727(0x1dc),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5c5ff1){const _0x137591=a223_0x5a5727;if(!_0x5c5ff1['str'](_0x137591(0x1d3))['trim']())throw CliErrors[_0x137591(0x1c6)](_0x137591(0x1d3),_0x137591(0x1db));},async 'execute'(_0x47d511){const _0x93d950=a223_0x5a5727,_0x2ee0ea=_0x47d511['str'](_0x93d950(0x1d3))[_0x93d950(0x1c8)](),_0xc3b6c8=await resolveUserRef(_0x2ee0ea,_0x93d950(0x1c7));return{'ok':!![],'data':{'user':{'userId':_0xc3b6c8[_0x93d950(0x1d2)],'username':_0xc3b6c8[_0x93d950(0x1dd)],'nickname':_0xc3b6c8[_0x93d950(0x1d7)],'matchedBy':_0xc3b6c8[_0x93d950(0x1ce)]}},'message':_0x93d950(0x1d4)+_0x2ee0ea+_0x93d950(0x1d1)+_0xc3b6c8['userId']};}};
1
+ function a223_0x5dcb(){const _0x5dd181=['username','Pass\x20--name\x20<nickname|username>.','userId','517200pyFIfQ','396wXXLCs','13848FrAzWM','flagMissing','name','read','156759lRdPwM','Resolved\x20\x22','52456FsyDEb','str','11866lzJpWw','matchedBy','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','143290BeCIqz','nickname','trim','2466Qpoknn','702YTUied','12nwwGOZ','215DisSMU','306ocQDBT','1117907ATaCBC'];a223_0x5dcb=function(){return _0x5dd181;};return a223_0x5dcb();}const a223_0x4b90c3=a223_0x33e0;(function(_0x12aa4f,_0x5c48e7){const _0x1c7719=a223_0x33e0,_0x3f4847=_0x12aa4f();while(!![]){try{const _0x5d7da3=-parseInt(_0x1c7719(0xb2))/0x1+parseInt(_0x1c7719(0xb6))/0x2*(-parseInt(_0x1c7719(0xa7))/0x3)+parseInt(_0x1c7719(0xb4))/0x4*(-parseInt(_0x1c7719(0xa6))/0x5)+-parseInt(_0x1c7719(0xa5))/0x6*(-parseInt(_0x1c7719(0xa8))/0x7)+-parseInt(_0x1c7719(0xae))/0x8*(parseInt(_0x1c7719(0xa3))/0x9)+-parseInt(_0x1c7719(0xa0))/0xa*(parseInt(_0x1c7719(0xad))/0xb)+parseInt(_0x1c7719(0xac))/0xc*(parseInt(_0x1c7719(0xa4))/0xd);if(_0x5d7da3===_0x5c48e7)break;else _0x3f4847['push'](_0x3f4847['shift']());}catch(_0x2f6b8b){_0x3f4847['push'](_0x3f4847['shift']());}}}(a223_0x5dcb,0x50c55));import{CliErrors}from'../../errors.js';function a223_0x33e0(_0x3e0a55,_0x37fa36){_0x3e0a55=_0x3e0a55-0x9e;const _0x5dcb45=a223_0x5dcb();let _0x33e04a=_0x5dcb45[_0x3e0a55];return _0x33e04a;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':'user-resolve','description':a223_0x4b90c3(0x9f),'risk':a223_0x4b90c3(0xb1),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13f1e2){const _0x4537a3=a223_0x4b90c3;if(!_0x13f1e2[_0x4537a3(0xb5)](_0x4537a3(0xb0))[_0x4537a3(0xa2)]())throw CliErrors[_0x4537a3(0xaf)]('name',_0x4537a3(0xaa));},async 'execute'(_0x51cda9){const _0x1adcdc=a223_0x4b90c3,_0x581cc6=_0x51cda9['str']('name')['trim'](),_0x255ce8=await resolveUserRef(_0x581cc6,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x255ce8[_0x1adcdc(0xab)],'username':_0x255ce8[_0x1adcdc(0xa9)],'nickname':_0x255ce8[_0x1adcdc(0xa1)],'matchedBy':_0x255ce8[_0x1adcdc(0x9e)]}},'message':_0x1adcdc(0xb3)+_0x581cc6+'\x22\x20→\x20userId\x20'+_0x255ce8[_0x1adcdc(0xab)]};}};
@@ -1 +1 @@
1
- const a224_0x5551b9=a224_0x194f;(function(_0x1e6e24,_0x411308){const _0x421da4=a224_0x194f,_0x4d2c7b=_0x1e6e24();while(!![]){try{const _0x44e430=parseInt(_0x421da4(0xaa))/0x1*(-parseInt(_0x421da4(0xa9))/0x2)+-parseInt(_0x421da4(0xae))/0x3+parseInt(_0x421da4(0xbb))/0x4*(parseInt(_0x421da4(0xb2))/0x5)+-parseInt(_0x421da4(0xba))/0x6+-parseInt(_0x421da4(0xb3))/0x7*(parseInt(_0x421da4(0xb0))/0x8)+-parseInt(_0x421da4(0xbd))/0x9+-parseInt(_0x421da4(0xb4))/0xa*(-parseInt(_0x421da4(0xb1))/0xb);if(_0x44e430===_0x411308)break;else _0x4d2c7b['push'](_0x4d2c7b['shift']());}catch(_0x434d6c){_0x4d2c7b['push'](_0x4d2c7b['shift']());}}}(a224_0x5436,0x9a0e6));function a224_0x194f(_0x528a2f,_0xf1fb1b){_0x528a2f=_0x528a2f-0xa9;const _0x543664=a224_0x5436();let _0x194f9e=_0x543664[_0x528a2f];return _0x194f9e;}function a224_0x5436(){const _0x268a21=['appCode','2068326lobEfU','52Ebyvub','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','10157922pApSJo','1482YRATAJ','1421twBUfy','\x20is\x20not\x20configured\x20for\x20app\x20','\x20--file\x20<path>\x20--dry-run`.','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','3403095JmMLet','\x20for\x20','443824SOEQnq','11WVmpdr','317860LSLElM','14Xpxntx','35762390BrLRRs','Loaded\x20','get','content','app_rule_not_found'];a224_0x5436=function(){return _0x268a21;};return a224_0x5436();}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':'rule','command':a224_0x5551b9(0xb6),'description':a224_0x5551b9(0xad),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0xe552bd){readAppRuleType(_0xe552bd);},async 'execute'(_0x575247){const _0x3d2656=a224_0x5551b9,_0x123125=readAppRuleType(_0x575247),_0x5c2c11=await getAppRule(_0x575247['cookie'],{'appCode':_0x575247[_0x3d2656(0xb9)],'type':_0x123125});if(!_0x5c2c11)throw appRuleError(_0x3d2656(0xb8),appRuleFileName(_0x123125)+_0x3d2656(0xab)+_0x575247[_0x3d2656(0xb9)]+'.',_0x3d2656(0xbc)+_0x123125+_0x3d2656(0xac));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x123125,_0x5c2c11),'content':_0x5c2c11[_0x3d2656(0xb7)]}},'message':_0x3d2656(0xb5)+appRuleFileName(_0x123125)+_0x3d2656(0xaf)+_0x575247[_0x3d2656(0xb9)]};}};
1
+ const a224_0x225ee7=a224_0x51d9;(function(_0x4a3e0b,_0x3a30ea){const _0x13142e=a224_0x51d9,_0x2147e8=_0x4a3e0b();while(!![]){try{const _0x56631e=-parseInt(_0x13142e(0xcc))/0x1+-parseInt(_0x13142e(0xbf))/0x2+parseInt(_0x13142e(0xce))/0x3+parseInt(_0x13142e(0xc7))/0x4*(-parseInt(_0x13142e(0xcb))/0x5)+-parseInt(_0x13142e(0xc3))/0x6*(-parseInt(_0x13142e(0xc1))/0x7)+-parseInt(_0x13142e(0xc4))/0x8*(parseInt(_0x13142e(0xc5))/0x9)+parseInt(_0x13142e(0xd2))/0xa*(parseInt(_0x13142e(0xc6))/0xb);if(_0x56631e===_0x3a30ea)break;else _0x2147e8['push'](_0x2147e8['shift']());}catch(_0x36ae07){_0x2147e8['push'](_0x2147e8['shift']());}}}(a224_0x32f1,0x7f4ab));import{getAppRule}from'../../core/api-client.js';function a224_0x32f1(){const _0x27f5e3=['get','content','cookie','16385620yNrvui','1303086xtVnjw','\x20--file\x20<path>\x20--dry-run`.','863023MmCWeO','rule','36yyuLuH','552OeSogb','118215ztnXLZ','11YqfVHx','827324txpDMr','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','\x20is\x20not\x20configured\x20for\x20app\x20','app_rule_not_found','5jldisj','189999Sioanb','appCode','293337cpvbqY'];a224_0x32f1=function(){return _0x27f5e3;};return a224_0x32f1();}function a224_0x51d9(_0xa3eb42,_0x4786b2){_0xa3eb42=_0xa3eb42-0xbf;const _0x32f1c8=a224_0x32f1();let _0x51d9ff=_0x32f1c8[_0xa3eb42];return _0x51d9ff;}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a224_0x225ee7(0xc2),'command':a224_0x225ee7(0xcf),'description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x1cc82e){readAppRuleType(_0x1cc82e);},async 'execute'(_0x516f69){const _0x4a51eb=a224_0x225ee7,_0x26745f=readAppRuleType(_0x516f69),_0x22b5fb=await getAppRule(_0x516f69[_0x4a51eb(0xd1)],{'appCode':_0x516f69[_0x4a51eb(0xcd)],'type':_0x26745f});if(!_0x22b5fb)throw appRuleError(_0x4a51eb(0xca),appRuleFileName(_0x26745f)+_0x4a51eb(0xc9)+_0x516f69[_0x4a51eb(0xcd)]+'.',_0x4a51eb(0xc8)+_0x26745f+_0x4a51eb(0xc0));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x26745f,_0x22b5fb),'content':_0x22b5fb[_0x4a51eb(0xd0)]}},'message':'Loaded\x20'+appRuleFileName(_0x26745f)+'\x20for\x20'+_0x516f69[_0x4a51eb(0xcd)]};}};
@@ -1 +1 @@
1
- function a225_0x24f8(_0x1ec560,_0x4b2f4f){_0x1ec560=_0x1ec560-0x154;const _0x244b1d=a225_0x244b();let _0x24f896=_0x244b1d[_0x1ec560];return _0x24f896;}(function(_0x53f85d,_0x4bd0f4){const _0xa4facc=a225_0x24f8,_0x1703cd=_0x53f85d();while(!![]){try{const _0x15fb1a=parseInt(_0xa4facc(0x155))/0x1*(-parseInt(_0xa4facc(0x159))/0x2)+parseInt(_0xa4facc(0x15b))/0x3+-parseInt(_0xa4facc(0x154))/0x4*(-parseInt(_0xa4facc(0x156))/0x5)+parseInt(_0xa4facc(0x15e))/0x6*(parseInt(_0xa4facc(0x15f))/0x7)+-parseInt(_0xa4facc(0x15c))/0x8*(parseInt(_0xa4facc(0x15d))/0x9)+parseInt(_0xa4facc(0x15a))/0xa*(parseInt(_0xa4facc(0x157))/0xb)+-parseInt(_0xa4facc(0x158))/0xc*(parseInt(_0xa4facc(0x160))/0xd);if(_0x15fb1a===_0x4bd0f4)break;else _0x1703cd['push'](_0x1703cd['shift']());}catch(_0x4da059){_0x1703cd['push'](_0x1703cd['shift']());}}}(a225_0x244b,0xf0eca));import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';function a225_0x244b(){const _0x165237=['35590hmulZQ','110FLGGfh','264LbEIcv','12INhPOO','697090DqWaAV','1567329ceRXPo','8xcaUhE','7596783vhrbGX','24aXeyAu','406462YRoCOA','8333xlOoNH','328bJunQU','31743fWlJJn'];a225_0x244b=function(){return _0x165237;};return a225_0x244b();}import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ (function(_0x3915d5,_0x276877){const _0x4991f8=a225_0x307a,_0x348f92=_0x3915d5();while(!![]){try{const _0x4b9efc=-parseInt(_0x4991f8(0xd7))/0x1+-parseInt(_0x4991f8(0xd9))/0x2*(-parseInt(_0x4991f8(0xd4))/0x3)+-parseInt(_0x4991f8(0xda))/0x4+-parseInt(_0x4991f8(0xd6))/0x5*(-parseInt(_0x4991f8(0xd5))/0x6)+-parseInt(_0x4991f8(0xdc))/0x7+parseInt(_0x4991f8(0xdd))/0x8+parseInt(_0x4991f8(0xd8))/0x9*(parseInt(_0x4991f8(0xdb))/0xa);if(_0x4b9efc===_0x276877)break;else _0x348f92['push'](_0x348f92['shift']());}catch(_0x2dd17d){_0x348f92['push'](_0x348f92['shift']());}}}(a225_0x3d94,0xd6dee));function a225_0x3d94(){const _0x447752=['298304FJkNsk','10AsZqSa','1862532saiwaq','321712DbLBSk','6XAvyFI','156DyCLgs','199585bplzvC','1234845bvgSWK','11592981KJexvA','89442hBZuzK'];a225_0x3d94=function(){return _0x447752;};return a225_0x3d94();}import{ruleGet}from'../../commands/rule/get.js';function a225_0x307a(_0x3670d4,_0x35d833){_0x3670d4=_0x3670d4-0xd4;const _0x3d9431=a225_0x3d94();let _0x307ab2=_0x3d9431[_0x3670d4];return _0x307ab2;}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
@@ -1 +1 @@
1
- function a226_0x10a3(_0x50e95d,_0x18e900){_0x50e95d=_0x50e95d-0x156;const _0x449c3e=a226_0x449c();let _0x10a366=_0x449c3e[_0x50e95d];return _0x10a366;}const a226_0xc10b14=a226_0x10a3;(function(_0x44f094,_0x387bbd){const _0x513e77=a226_0x10a3,_0x1f3c53=_0x44f094();while(!![]){try{const _0x4c4296=parseInt(_0x513e77(0x166))/0x1*(parseInt(_0x513e77(0x15b))/0x2)+-parseInt(_0x513e77(0x156))/0x3*(-parseInt(_0x513e77(0x15c))/0x4)+-parseInt(_0x513e77(0x168))/0x5*(parseInt(_0x513e77(0x15f))/0x6)+parseInt(_0x513e77(0x160))/0x7*(-parseInt(_0x513e77(0x157))/0x8)+parseInt(_0x513e77(0x15a))/0x9*(parseInt(_0x513e77(0x158))/0xa)+-parseInt(_0x513e77(0x167))/0xb*(parseInt(_0x513e77(0x163))/0xc)+parseInt(_0x513e77(0x161))/0xd;if(_0x4c4296===_0x387bbd)break;else _0x1f3c53['push'](_0x1f3c53['shift']());}catch(_0x59b42d){_0x1f3c53['push'](_0x1f3c53['shift']());}}}(a226_0x449c,0xc4582));function a226_0x449c(){const _0x5b128f=['176965wfoRfM','Loaded\x20app\x20rule\x20configuration\x20for\x20','18OiDZNe','104JgmxxR','6874150RIVKKc','rule','9biqnkE','19606bpUWnG','488456OSFfvP','all','map','222mODbXu','35077FtSyAQ','23086089JcuLSN','list','12BZKiBo','appCode','read','41wQINtH','15608615QJENQg'];a226_0x449c=function(){return _0x5b128f;};return a226_0x449c();}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a226_0xc10b14(0x159),'command':a226_0xc10b14(0x162),'description':'List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','risk':a226_0xc10b14(0x165),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x41b829){const _0x2d1d49=a226_0xc10b14,_0x1eb0f8=await Promise[_0x2d1d49(0x15d)](APP_RULE_TYPES['map'](_0x54c347=>getAppRule(_0x41b829['cookie'],{'appCode':_0x41b829[_0x2d1d49(0x164)],'type':_0x54c347}))),_0x95172a=APP_RULE_TYPES[_0x2d1d49(0x15e)]((_0x27ede8,_0x23d44c)=>projectAppRule(_0x27ede8,_0x1eb0f8[_0x23d44c]??null));return{'ok':!![],'data':{'total':_0x95172a['length'],'rules':_0x95172a},'message':_0x2d1d49(0x169)+_0x41b829[_0x2d1d49(0x164)]};}};
1
+ function a226_0x522f(_0x2b79fb,_0x34f2b4){_0x2b79fb=_0x2b79fb-0x1da;const _0x27ad13=a226_0x27ad();let _0x522f81=_0x27ad13[_0x2b79fb];return _0x522f81;}const a226_0x4b1e20=a226_0x522f;(function(_0x550426,_0x457d6f){const _0x5a6823=a226_0x522f,_0x4ee9c5=_0x550426();while(!![]){try{const _0x3b2a2d=parseInt(_0x5a6823(0x1de))/0x1*(-parseInt(_0x5a6823(0x1e0))/0x2)+parseInt(_0x5a6823(0x1df))/0x3*(-parseInt(_0x5a6823(0x1e6))/0x4)+parseInt(_0x5a6823(0x1ed))/0x5*(parseInt(_0x5a6823(0x1dd))/0x6)+-parseInt(_0x5a6823(0x1e5))/0x7+-parseInt(_0x5a6823(0x1db))/0x8+parseInt(_0x5a6823(0x1da))/0x9*(parseInt(_0x5a6823(0x1e2))/0xa)+parseInt(_0x5a6823(0x1ee))/0xb*(parseInt(_0x5a6823(0x1e7))/0xc);if(_0x3b2a2d===_0x457d6f)break;else _0x4ee9c5['push'](_0x4ee9c5['shift']());}catch(_0x21e319){_0x4ee9c5['push'](_0x4ee9c5['shift']());}}}(a226_0x27ad,0xe0d64));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a226_0x4b1e20(0x1e4),'command':a226_0x4b1e20(0x1e9),'description':a226_0x4b1e20(0x1e3),'risk':a226_0x4b1e20(0x1ec),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x59d8d7){const _0x11dc49=a226_0x4b1e20,_0x725b30=await Promise[_0x11dc49(0x1dc)](APP_RULE_TYPES[_0x11dc49(0x1e1)](_0x32437b=>getAppRule(_0x59d8d7[_0x11dc49(0x1ea)],{'appCode':_0x59d8d7[_0x11dc49(0x1eb)],'type':_0x32437b}))),_0x1d13f7=APP_RULE_TYPES[_0x11dc49(0x1e1)]((_0x361da6,_0x10d07f)=>projectAppRule(_0x361da6,_0x725b30[_0x10d07f]??null));return{'ok':!![],'data':{'total':_0x1d13f7[_0x11dc49(0x1e8)],'rules':_0x1d13f7},'message':'Loaded\x20app\x20rule\x20configuration\x20for\x20'+_0x59d8d7['appCode']};}};function a226_0x27ad(){const _0x37191d=['map','10CAVMlu','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','rule','6604724UhhfOQ','3449728uuWCiO','60YrlLsQ','length','list','cookie','appCode','read','6425mnqcot','8628499umatoU','8726715IUvhhA','11137168oSCcbm','all','8202kohrTr','523FccVWU','6wvSTUM','6374saJvlE'];a226_0x27ad=function(){return _0x37191d;};return a226_0x27ad();}
@@ -1 +1 @@
1
- const a227_0x406d50=a227_0x1b3e;(function(_0x4fbdf3,_0x39d77f){const _0x50a1c8=a227_0x1b3e,_0x5d1cb7=_0x4fbdf3();while(!![]){try{const _0x3d1f5c=parseInt(_0x50a1c8(0x207))/0x1*(parseInt(_0x50a1c8(0x201))/0x2)+-parseInt(_0x50a1c8(0x20f))/0x3+-parseInt(_0x50a1c8(0x223))/0x4*(parseInt(_0x50a1c8(0x1ea))/0x5)+parseInt(_0x50a1c8(0x1f9))/0x6+parseInt(_0x50a1c8(0x221))/0x7*(parseInt(_0x50a1c8(0x1e9))/0x8)+-parseInt(_0x50a1c8(0x216))/0x9+-parseInt(_0x50a1c8(0x1f7))/0xa*(-parseInt(_0x50a1c8(0x21b))/0xb);if(_0x3d1f5c===_0x39d77f)break;else _0x5d1cb7['push'](_0x5d1cb7['shift']());}catch(_0x1fd5c5){_0x5d1cb7['push'](_0x5d1cb7['shift']());}}}(a227_0x4b00,0x96625));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a227_0x1b3e(_0x460543,_0x524d7b){_0x460543=_0x460543-0x1e7;const _0x4b003a=a227_0x4b00();let _0x1b3ed0=_0x4b003a[_0x460543];return _0x1b3ed0;}import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';const SAVE_PATH=a227_0x406d50(0x20b),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.';function a227_0x4b00(){const _0x40cbbf=['\x20--format\x20compress','320JOzYJr','365iLKgVA','write','string','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','flag','app_rule_verification_failed','app_rule_expected_version_invalid','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','\x20for\x20','app_rule_file_required','rules','planned','beforeRecord','2077120lqWJDZ','cause','5841042xzHOzA','app_rule_version_mismatch','appCode','expectedVersion','--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20Markdown\x20file.','Expected\x20',';\x20current\x20version\x20is\x20','478SqbHin','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','The\x20set\x20request\x20was\x20sent,\x20but\x20','POST','type','version','5132wsQiiB','before','content','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','/smartapi/knowledge-base/save','input','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','rule','1298541RPpQnU','file','app_rule_set_outcome_unknown','byteSize','verified','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','rabetbase\x20rule\x20get\x20--type\x20','4035006cNgTIN','number','replacement','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','Set\x20','22fhXjTt','app_rule_verification_unavailable','trim','cookie','set','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','7735zZIPcF','\x20version\x20changed\x20before\x20write.','63700VhIZkh','contentHash'];a227_0x4b00=function(){return _0x40cbbf;};return a227_0x4b00();}function readSetInput(_0x4570ad){const _0x5a5907=a227_0x406d50,_0x15b93b=readAppRuleType(_0x4570ad),_0x15c074=_0x4570ad['str'](_0x5a5907(0x210))[_0x5a5907(0x21d)]();if(!_0x15c074)throw appRuleError(_0x5a5907(0x1f3),_0x5a5907(0x1fd),_0x5a5907(0x1fe));const _0x3efbc=_0x4570ad[_0x5a5907(0x1ee)]('expected-version');let _0x2ee1a5;if(_0x3efbc!==undefined){_0x2ee1a5=Number(_0x3efbc);if(!Number['isSafeInteger'](_0x2ee1a5)||_0x2ee1a5<0x0)throw appRuleError(_0x5a5907(0x1f0),_0x5a5907(0x220));}return{'type':_0x15b93b,'file':_0x15c074,'expectedVersion':_0x2ee1a5};}async function prepareSet(_0x2ee01e){const _0x8300db=a227_0x406d50,_0x1dd5c7=readSetInput(_0x2ee01e),_0x4c0461=await readAppRuleFile(_0x1dd5c7[_0x8300db(0x210)]),_0x32dccb=await getAppRule(_0x2ee01e[_0x8300db(0x21e)],{'appCode':_0x2ee01e[_0x8300db(0x1fb)],'type':_0x1dd5c7[_0x8300db(0x205)]});if(_0x1dd5c7['expectedVersion']!==undefined&&_0x32dccb?.[_0x8300db(0x206)]!==_0x1dd5c7['expectedVersion'])throw appRuleError(_0x8300db(0x1fa),appRuleFileName(_0x1dd5c7[_0x8300db(0x205)])+_0x8300db(0x222),_0x8300db(0x1ff)+_0x1dd5c7['expectedVersion']+_0x8300db(0x200)+(_0x32dccb?.[_0x8300db(0x206)]??'unconfigured')+_0x8300db(0x219));return{'input':_0x1dd5c7,'replacement':_0x4c0461,'beforeRecord':_0x32dccb,'before':projectAppRule(_0x1dd5c7[_0x8300db(0x205)],_0x32dccb),'planned':{'type':_0x1dd5c7[_0x8300db(0x205)],'fileName':appRuleFileName(_0x1dd5c7[_0x8300db(0x205)]),'contextScope':appRuleContextScope(_0x1dd5c7[_0x8300db(0x205)]),'enabled':!![],'appCode':_0x2ee01e[_0x8300db(0x1fb)],'scope':_0x8300db(0x1f4),'contentByteSize':_0x4c0461[_0x8300db(0x212)],'contentHash':_0x4c0461[_0x8300db(0x1e7)]}};}function warningsFor(_0x561022){return _0x561022===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a227_0x406d50(0x20e),'command':a227_0x406d50(0x21f),'description':a227_0x406d50(0x1f1),'risk':a227_0x406d50(0x1eb),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a227_0x406d50(0x210),'type':a227_0x406d50(0x1ec),'required':!![],'description':a227_0x406d50(0x214)},{'name':'expected-version','type':a227_0x406d50(0x217),'required':![],'description':a227_0x406d50(0x1ed)}],async 'validate'(_0x206325){readSetInput(_0x206325);},async 'dryRun'(_0x157b36){const _0xbff611=a227_0x406d50,_0x5c4498=await prepareSet(_0x157b36);return asDryRunResult({'operation':_0xbff611(0x21f),'selector':{'appCode':_0x157b36[_0xbff611(0x1fb)],'scope':'rules','type':_0x5c4498[_0xbff611(0x20c)]['type']},'before':_0x5c4498[_0xbff611(0x208)],'after':_0x5c4498[_0xbff611(0x1f5)],'dryRun':!![],'backend':{'method':_0xbff611(0x204),'path':SAVE_PATH},'warnings':warningsFor(_0x5c4498[_0xbff611(0x20c)][_0xbff611(0x1fc)]),'verification':{'expectedVersion':_0x5c4498[_0xbff611(0x20c)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x5c4498[_0xbff611(0x20c)][_0xbff611(0x205)]+_0xbff611(0x1e8)}},{'method':_0xbff611(0x204),'url':SAVE_PATH});},async 'execute'(_0x10d58c){const _0x5a1fe9=a227_0x406d50,_0x4cb819=await prepareSet(_0x10d58c);let _0x19e36d=![];try{await saveAppRule(_0x10d58c['cookie'],{'appCode':_0x10d58c['appCode'],'type':_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x205)],'content':_0x4cb819[_0x5a1fe9(0x218)][_0x5a1fe9(0x209)]});}catch(_0x3a3b6e){if(!isPlatformTransportFailure(_0x3a3b6e))throw _0x3a3b6e;_0x19e36d=!![];}let _0x51184c;try{_0x51184c=await getAppRule(_0x10d58c[_0x5a1fe9(0x21e)],{'appCode':_0x10d58c[_0x5a1fe9(0x1fb)],'type':_0x4cb819[_0x5a1fe9(0x20c)]['type']});}catch(_0x50e99b){const _0x3cd49c=appRuleError(_0x19e36d?'app_rule_set_outcome_unknown':_0x5a1fe9(0x21c),_0x5a1fe9(0x203)+appRuleFileName(_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x205)])+'\x20could\x20not\x20be\x20verified.',_0x5a1fe9(0x20d));Object['defineProperty'](_0x3cd49c,_0x5a1fe9(0x1f8),{'value':_0x50e99b,'enumerable':![]});throw _0x3cd49c;}const _0x5539dc=_0x51184c&&inspectAppRuleContent(_0x51184c[_0x5a1fe9(0x209)])[_0x5a1fe9(0x1e7)]===_0x4cb819[_0x5a1fe9(0x218)][_0x5a1fe9(0x1e7)],_0xc61e92=_0x51184c&&(_0x4cb819[_0x5a1fe9(0x1f6)]===null||_0x51184c[_0x5a1fe9(0x206)]>_0x4cb819['beforeRecord'][_0x5a1fe9(0x206)]);if(!_0x51184c||!_0x5539dc||!_0xc61e92)throw appRuleError(_0x19e36d?_0x5a1fe9(0x211):_0x5a1fe9(0x1ef),appRuleFileName(_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x205)])+'\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.',_0x5a1fe9(0x202)+_0x4cb819['input'][_0x5a1fe9(0x205)]+_0x5a1fe9(0x20a));const _0x18de3d=warningsFor(_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x1fc)]);_0x19e36d&&_0x18de3d['push']('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x108cb1=projectAppRule(_0x4cb819['input']['type'],_0x51184c);return{'ok':!![],'data':{'operation':_0x5a1fe9(0x21f),'selector':{'appCode':_0x10d58c[_0x5a1fe9(0x1fb)],'scope':_0x5a1fe9(0x1f4),'type':_0x4cb819['input'][_0x5a1fe9(0x205)]},'before':_0x4cb819[_0x5a1fe9(0x208)],'after':_0x108cb1,'dryRun':![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x18de3d,'verification':{'status':_0x5a1fe9(0x213),'recoveredAfterUnknownResponse':_0x19e36d,'expectedVersion':_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x1fc)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x5a1fe9(0x215)+_0x4cb819[_0x5a1fe9(0x20c)][_0x5a1fe9(0x205)]+_0x5a1fe9(0x1e8)}},'message':_0x5a1fe9(0x21a)+appRuleFileName(_0x4cb819[_0x5a1fe9(0x20c)]['type'])+_0x5a1fe9(0x1f2)+_0x10d58c[_0x5a1fe9(0x1fb)]};}};
1
+ function a227_0x1212(_0x2beb2d,_0x3e5617){_0x2beb2d=_0x2beb2d-0xe1;const _0x7d763c=a227_0x7d76();let _0x121292=_0x7d763c[_0x2beb2d];return _0x121292;}const a227_0x59d6f2=a227_0x1212;(function(_0x277e79,_0x1e7d7b){const _0x1e3a43=a227_0x1212,_0x4a24a6=_0x277e79();while(!![]){try{const _0x454120=-parseInt(_0x1e3a43(0x105))/0x1*(parseInt(_0x1e3a43(0x117))/0x2)+parseInt(_0x1e3a43(0x104))/0x3+-parseInt(_0x1e3a43(0xe4))/0x4+parseInt(_0x1e3a43(0x10c))/0x5*(-parseInt(_0x1e3a43(0xf7))/0x6)+parseInt(_0x1e3a43(0xf8))/0x7*(parseInt(_0x1e3a43(0x100))/0x8)+parseInt(_0x1e3a43(0xe5))/0x9*(parseInt(_0x1e3a43(0x11b))/0xa)+parseInt(_0x1e3a43(0x10d))/0xb*(parseInt(_0x1e3a43(0x109))/0xc);if(_0x454120===_0x1e7d7b)break;else _0x4a24a6['push'](_0x4a24a6['shift']());}catch(_0x3ab3b1){_0x4a24a6['push'](_0x4a24a6['shift']());}}}(a227_0x7d76,0x97e04));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';const SAVE_PATH=a227_0x59d6f2(0x113),NON_ATOMIC_WARNING=a227_0x59d6f2(0x11d);function readSetInput(_0xb9b80b){const _0x26fa23=a227_0x59d6f2,_0x4bc076=readAppRuleType(_0xb9b80b),_0x48578f=_0xb9b80b['str'](_0x26fa23(0x114))[_0x26fa23(0xf3)]();if(!_0x48578f)throw appRuleError(_0x26fa23(0xfd),_0x26fa23(0x107),_0x26fa23(0x102));const _0x479357=_0xb9b80b[_0x26fa23(0x11e)](_0x26fa23(0xea));let _0x1b366a;if(_0x479357!==undefined){_0x1b366a=Number(_0x479357);if(!Number[_0x26fa23(0xf1)](_0x1b366a)||_0x1b366a<0x0)throw appRuleError(_0x26fa23(0xef),_0x26fa23(0x10b));}return{'type':_0x4bc076,'file':_0x48578f,'expectedVersion':_0x1b366a};}function a227_0x7d76(){const _0x52881d=['isSafeInteger','app_rule_verification_failed','trim','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','The\x20set\x20request\x20was\x20sent,\x20but\x20','expectedVersion','5132202Taainq','119eASNoZ','version','beforeRecord','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','byteSize','app_rule_file_required','replacement','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','61944DjtMOO','cause','Pass\x20a\x20UTF-8\x20Markdown\x20file.','app_rule_set_outcome_unknown','484755DpvtQV','41293mjnsvm','cookie','--file\x20is\x20required.','rules','2184zgrRjQ','\x20for\x20','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','5ZIqhSw','119823gpWfGM','Expected\x20','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','unconfigured','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','rule','/smartapi/knowledge-base/save','file','appCode','app_rule_version_mismatch','42siVCrN','content','number','\x20version\x20changed\x20before\x20write.','251430lpqbyS','rabetbase\x20rule\x20get\x20--type\x20','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','flag','type','app_rule_verification_unavailable','POST','2339424YuGspD','234bkQfcR','Set\x20','before','string','planned','expected-version','set','contentHash','\x20--format\x20compress','input','app_rule_expected_version_invalid','defineProperty'];a227_0x7d76=function(){return _0x52881d;};return a227_0x7d76();}async function prepareSet(_0x409733){const _0x1c76ae=a227_0x59d6f2,_0x3c23b5=readSetInput(_0x409733),_0x3501f0=await readAppRuleFile(_0x3c23b5[_0x1c76ae(0x114)]),_0x498db2=await getAppRule(_0x409733[_0x1c76ae(0x106)],{'appCode':_0x409733[_0x1c76ae(0x115)],'type':_0x3c23b5[_0x1c76ae(0xe1)]});if(_0x3c23b5[_0x1c76ae(0xf6)]!==undefined&&_0x498db2?.[_0x1c76ae(0xf9)]!==_0x3c23b5['expectedVersion'])throw appRuleError(_0x1c76ae(0x116),appRuleFileName(_0x3c23b5[_0x1c76ae(0xe1)])+_0x1c76ae(0x11a),_0x1c76ae(0x10e)+_0x3c23b5[_0x1c76ae(0xf6)]+';\x20current\x20version\x20is\x20'+(_0x498db2?.[_0x1c76ae(0xf9)]??_0x1c76ae(0x110))+_0x1c76ae(0xf4));return{'input':_0x3c23b5,'replacement':_0x3501f0,'beforeRecord':_0x498db2,'before':projectAppRule(_0x3c23b5[_0x1c76ae(0xe1)],_0x498db2),'planned':{'type':_0x3c23b5[_0x1c76ae(0xe1)],'fileName':appRuleFileName(_0x3c23b5[_0x1c76ae(0xe1)]),'contextScope':appRuleContextScope(_0x3c23b5[_0x1c76ae(0xe1)]),'enabled':!![],'appCode':_0x409733[_0x1c76ae(0x115)],'scope':_0x1c76ae(0x108),'contentByteSize':_0x3501f0[_0x1c76ae(0xfc)],'contentHash':_0x3501f0[_0x1c76ae(0xec)]}};}function warningsFor(_0x366901){return _0x366901===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a227_0x59d6f2(0x112),'command':a227_0x59d6f2(0xeb),'description':a227_0x59d6f2(0xff),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':'file','type':a227_0x59d6f2(0xe8),'required':!![],'description':a227_0x59d6f2(0x10f)},{'name':a227_0x59d6f2(0xea),'type':a227_0x59d6f2(0x119),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x518062){readSetInput(_0x518062);},async 'dryRun'(_0x20d63c){const _0x1f90bb=a227_0x59d6f2,_0x1e0f7b=await prepareSet(_0x20d63c);return asDryRunResult({'operation':_0x1f90bb(0xeb),'selector':{'appCode':_0x20d63c[_0x1f90bb(0x115)],'scope':_0x1f90bb(0x108),'type':_0x1e0f7b['input']['type']},'before':_0x1e0f7b['before'],'after':_0x1e0f7b[_0x1f90bb(0xe9)],'dryRun':!![],'backend':{'method':_0x1f90bb(0xe3),'path':SAVE_PATH},'warnings':warningsFor(_0x1e0f7b[_0x1f90bb(0xee)]['expectedVersion']),'verification':{'expectedVersion':_0x1e0f7b[_0x1f90bb(0xee)][_0x1f90bb(0xf6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x1f90bb(0x11c)+_0x1e0f7b['input'][_0x1f90bb(0xe1)]+'\x20--format\x20compress'}},{'method':_0x1f90bb(0xe3),'url':SAVE_PATH});},async 'execute'(_0x535409){const _0x3192a4=a227_0x59d6f2,_0x1204a9=await prepareSet(_0x535409);let _0x14e995=![];try{await saveAppRule(_0x535409['cookie'],{'appCode':_0x535409[_0x3192a4(0x115)],'type':_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)],'content':_0x1204a9[_0x3192a4(0xfe)][_0x3192a4(0x118)]});}catch(_0x1da1fc){if(!isPlatformTransportFailure(_0x1da1fc))throw _0x1da1fc;_0x14e995=!![];}let _0x10b362;try{_0x10b362=await getAppRule(_0x535409[_0x3192a4(0x106)],{'appCode':_0x535409[_0x3192a4(0x115)],'type':_0x1204a9['input'][_0x3192a4(0xe1)]});}catch(_0x2e3206){const _0x9dffd0=appRuleError(_0x14e995?_0x3192a4(0x103):_0x3192a4(0xe2),_0x3192a4(0xf5)+appRuleFileName(_0x1204a9['input'][_0x3192a4(0xe1)])+'\x20could\x20not\x20be\x20verified.','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.');Object[_0x3192a4(0xf0)](_0x9dffd0,_0x3192a4(0x101),{'value':_0x2e3206,'enumerable':![]});throw _0x9dffd0;}const _0x1f331e=_0x10b362&&inspectAppRuleContent(_0x10b362['content'])[_0x3192a4(0xec)]===_0x1204a9[_0x3192a4(0xfe)]['contentHash'],_0x1a2abc=_0x10b362&&(_0x1204a9['beforeRecord']===null||_0x10b362[_0x3192a4(0xf9)]>_0x1204a9[_0x3192a4(0xfa)][_0x3192a4(0xf9)]);if(!_0x10b362||!_0x1f331e||!_0x1a2abc)throw appRuleError(_0x14e995?_0x3192a4(0x103):_0x3192a4(0xf2),appRuleFileName(_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)])+'\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.',_0x3192a4(0xfb)+_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)]+_0x3192a4(0x111));const _0x349317=warningsFor(_0x1204a9['input'][_0x3192a4(0xf6)]);_0x14e995&&_0x349317['push']('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x426fa4=projectAppRule(_0x1204a9[_0x3192a4(0xee)]['type'],_0x10b362);return{'ok':!![],'data':{'operation':_0x3192a4(0xeb),'selector':{'appCode':_0x535409['appCode'],'scope':_0x3192a4(0x108),'type':_0x1204a9['input'][_0x3192a4(0xe1)]},'before':_0x1204a9[_0x3192a4(0xe7)],'after':_0x426fa4,'dryRun':![],'backend':{'method':_0x3192a4(0xe3),'path':SAVE_PATH},'warnings':_0x349317,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x14e995,'expectedVersion':_0x1204a9['input'][_0x3192a4(0xf6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x3192a4(0x11c)+_0x1204a9[_0x3192a4(0xee)][_0x3192a4(0xe1)]+_0x3192a4(0xed)}},'message':_0x3192a4(0xe6)+appRuleFileName(_0x1204a9[_0x3192a4(0xee)]['type'])+_0x3192a4(0x10a)+_0x535409[_0x3192a4(0x115)]};}};