@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-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 (384) hide show
  1. package/README.md +10 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +2 -2
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.js +1 -1
  18. package/lib/auth/login-success-html.js +1 -1
  19. package/lib/auth/logout.js +1 -1
  20. package/lib/cli-flags.js +1 -1
  21. package/lib/cli.js +1 -1
  22. package/lib/commands/api/generate.js +1 -1
  23. package/lib/commands/api/index.js +1 -1
  24. package/lib/commands/api/list.js +1 -1
  25. package/lib/commands/api/pull.js +1 -1
  26. package/lib/commands/api/shared.js +1 -1
  27. package/lib/commands/app/detail.js +1 -1
  28. package/lib/commands/app/index.js +1 -1
  29. package/lib/commands/app/list.js +1 -1
  30. package/lib/commands/app/members-list.js +1 -1
  31. package/lib/commands/app/remote-directory.js +1 -1
  32. package/lib/commands/app/shared.js +1 -1
  33. package/lib/commands/app-config/delete.js +1 -1
  34. package/lib/commands/app-config/get.js +1 -1
  35. package/lib/commands/app-config/index.js +1 -1
  36. package/lib/commands/app-config/list.js +1 -1
  37. package/lib/commands/app-config/set.js +1 -1
  38. package/lib/commands/app-config/shared.js +1 -1
  39. package/lib/commands/auth/index.js +1 -1
  40. package/lib/commands/bff/create.js +1 -1
  41. package/lib/commands/bff/delete.js +1 -1
  42. package/lib/commands/bff/detail.js +1 -1
  43. package/lib/commands/bff/index.js +1 -1
  44. package/lib/commands/bff/list.js +1 -1
  45. package/lib/commands/bff/logs.js +1 -1
  46. package/lib/commands/bff/pull.js +1 -1
  47. package/lib/commands/bff/push.js +1 -1
  48. package/lib/commands/bff/status.js +1 -1
  49. package/lib/commands/cli-skill/index.js +1 -1
  50. package/lib/commands/cli-update.js +1 -1
  51. package/lib/commands/codegen/index.js +1 -1
  52. package/lib/commands/codegen/sdk.js +1 -1
  53. package/lib/commands/codegen/sql.js +1 -1
  54. package/lib/commands/common/app-registry.js +1 -1
  55. package/lib/commands/common/app-selector.js +1 -1
  56. package/lib/commands/common/async-task.js +1 -1
  57. package/lib/commands/common/dry-run.js +1 -1
  58. package/lib/commands/common/flags.js +1 -1
  59. package/lib/commands/common/local-file.js +1 -1
  60. package/lib/commands/common/validate.js +1 -1
  61. package/lib/commands/config/delete.js +1 -1
  62. package/lib/commands/config/get.js +1 -1
  63. package/lib/commands/config/index.js +1 -1
  64. package/lib/commands/config/init.js +1 -1
  65. package/lib/commands/config/list.js +1 -1
  66. package/lib/commands/config/set.js +1 -1
  67. package/lib/commands/config/shared.js +1 -1
  68. package/lib/commands/dataset/batch-design.js +1 -1
  69. package/lib/commands/dataset/business-group-update.js +1 -1
  70. package/lib/commands/dataset/business-groups.js +1 -1
  71. package/lib/commands/dataset/capability.js +1 -1
  72. package/lib/commands/dataset/cross-relation-create.js +1 -1
  73. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  74. package/lib/commands/dataset/cross-relation-list.js +1 -1
  75. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  76. package/lib/commands/dataset/cross-relation-update.js +1 -1
  77. package/lib/commands/dataset/delete.js +1 -1
  78. package/lib/commands/dataset/design-context.js +1 -1
  79. package/lib/commands/dataset/design-start.js +1 -1
  80. package/lib/commands/dataset/design-status.js +1 -1
  81. package/lib/commands/dataset/design-sync-retry.js +1 -1
  82. package/lib/commands/dataset/design-sync-status.js +1 -1
  83. package/lib/commands/dataset/design-validate.js +1 -1
  84. package/lib/commands/dataset/detail.js +1 -1
  85. package/lib/commands/dataset/extend-update.js +1 -1
  86. package/lib/commands/dataset/field-restore.js +1 -1
  87. package/lib/commands/dataset/field-update.js +1 -1
  88. package/lib/commands/dataset/generate.js +1 -1
  89. package/lib/commands/dataset/index.js +1 -1
  90. package/lib/commands/dataset/list.js +1 -1
  91. package/lib/commands/dataset/operations.js +1 -1
  92. package/lib/commands/dataset/relation-audit.js +1 -1
  93. package/lib/commands/dataset/relation-create.js +1 -1
  94. package/lib/commands/dataset/relation-delete.js +1 -1
  95. package/lib/commands/dataset/relation-shared.js +1 -1
  96. package/lib/commands/dataset/relation-update.js +1 -1
  97. package/lib/commands/dataset/relations.js +1 -1
  98. package/lib/commands/dataset/rename.js +1 -1
  99. package/lib/commands/dataset/restore.js +1 -1
  100. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  101. package/lib/commands/db/analysis-batching.js +1 -1
  102. package/lib/commands/db/analyze-batch-plan.js +1 -1
  103. package/lib/commands/db/analyze-cancel.js +1 -1
  104. package/lib/commands/db/analyze-start.js +1 -1
  105. package/lib/commands/db/analyze-status.js +1 -1
  106. package/lib/commands/db/create.js +1 -1
  107. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  110. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  111. package/lib/commands/db/delete.js +1 -1
  112. package/lib/commands/db/detail.js +1 -1
  113. package/lib/commands/db/diff-refresh-start.js +1 -1
  114. package/lib/commands/db/diff-refresh-status.js +1 -1
  115. package/lib/commands/db/diff.js +1 -1
  116. package/lib/commands/db/index.js +1 -1
  117. package/lib/commands/db/list.js +1 -1
  118. package/lib/commands/db/shared.js +1 -1
  119. package/lib/commands/db/table-diff-shared.js +1 -1
  120. package/lib/commands/db/tables.js +1 -1
  121. package/lib/commands/db/test.js +1 -1
  122. package/lib/commands/db/update.js +1 -1
  123. package/lib/commands/deployment/index.js +1 -1
  124. package/lib/commands/deployment/sync-all.js +1 -1
  125. package/lib/commands/deployment/sync-jobs.js +1 -1
  126. package/lib/commands/deployment/sync-status.js +1 -1
  127. package/lib/commands/doctor.js +1 -1
  128. package/lib/commands/file/index.js +1 -1
  129. package/lib/commands/flow/create.js +1 -1
  130. package/lib/commands/flow/detail.js +1 -1
  131. package/lib/commands/flow/index.js +1 -1
  132. package/lib/commands/flow/list.js +1 -1
  133. package/lib/commands/flow/page-list.js +1 -1
  134. package/lib/commands/flow/publish.js +1 -1
  135. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  136. package/lib/commands/flow/runtime-role-list.js +1 -1
  137. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  138. package/lib/commands/flow/runtime-user-search.js +1 -1
  139. package/lib/commands/flow/shared.js +1 -1
  140. package/lib/commands/flow/update.js +1 -1
  141. package/lib/commands/flow/validate.js +1 -1
  142. package/lib/commands/instant-api-policy/current.js +1 -1
  143. package/lib/commands/instant-api-policy/index.js +1 -1
  144. package/lib/commands/instant-api-policy/init.js +1 -1
  145. package/lib/commands/instant-api-policy/publish.js +1 -1
  146. package/lib/commands/instant-api-policy/pull.js +1 -1
  147. package/lib/commands/instant-api-policy/revision.js +1 -1
  148. package/lib/commands/instant-api-policy/revisions.js +1 -1
  149. package/lib/commands/instant-api-policy/rollback.js +1 -1
  150. package/lib/commands/instant-api-policy/shared.js +1 -1
  151. package/lib/commands/instant-api-policy/validate.js +1 -1
  152. package/lib/commands/issue/context.d.ts +3 -0
  153. package/lib/commands/issue/context.js +1 -0
  154. package/lib/commands/issue/index.js +1 -1
  155. package/lib/commands/issue/nudge.js +1 -1
  156. package/lib/commands/issue/report.js +1 -1
  157. package/lib/commands/kb/create.js +1 -1
  158. package/lib/commands/kb/delete.js +1 -1
  159. package/lib/commands/kb/detail.js +1 -1
  160. package/lib/commands/kb/index.js +1 -1
  161. package/lib/commands/kb/list.js +1 -1
  162. package/lib/commands/kb/search.js +1 -1
  163. package/lib/commands/kb/shared.js +1 -1
  164. package/lib/commands/kb/update.js +1 -1
  165. package/lib/commands/logs/index.js +1 -1
  166. package/lib/commands/menu/asset-update.js +1 -1
  167. package/lib/commands/menu/delete.js +1 -1
  168. package/lib/commands/menu/external-link-create.js +1 -1
  169. package/lib/commands/menu/external-link-update.js +1 -1
  170. package/lib/commands/menu/group-create.js +1 -1
  171. package/lib/commands/menu/group-update.js +1 -1
  172. package/lib/commands/menu/index.js +1 -1
  173. package/lib/commands/menu/list.js +1 -1
  174. package/lib/commands/menu/move.js +1 -1
  175. package/lib/commands/menu/regroup-start.js +1 -1
  176. package/lib/commands/menu/rename.js +1 -1
  177. package/lib/commands/menu/shared/compare-table.js +1 -1
  178. package/lib/commands/menu/shared/delete-plan.js +1 -1
  179. package/lib/commands/menu/shared/facts.js +1 -1
  180. package/lib/commands/menu/shared/index.js +1 -1
  181. package/lib/commands/menu/shared/inquirer.js +1 -1
  182. package/lib/commands/menu/shared/local-pages.js +1 -1
  183. package/lib/commands/menu/shared/logic.js +1 -1
  184. package/lib/commands/menu/shared/mutations.js +1 -1
  185. package/lib/commands/menu/shared/path.js +1 -1
  186. package/lib/commands/menu/shared/service.js +1 -1
  187. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  188. package/lib/commands/menu/shared/sync-core.js +1 -1
  189. package/lib/commands/menu/shared/update-core.js +1 -1
  190. package/lib/commands/menu/shared/valid-url.js +1 -1
  191. package/lib/commands/menu/subapp-assets-status.js +1 -1
  192. package/lib/commands/menu/subapp-assets-update.js +1 -1
  193. package/lib/commands/menu/sync.js +1 -1
  194. package/lib/commands/menu/visibility-update.js +1 -1
  195. package/lib/commands/notification/config-create.js +1 -1
  196. package/lib/commands/notification/config-delete.js +1 -1
  197. package/lib/commands/notification/config-list.js +1 -1
  198. package/lib/commands/notification/config-update.js +1 -1
  199. package/lib/commands/notification/index.js +1 -1
  200. package/lib/commands/notification/shared.js +1 -1
  201. package/lib/commands/ocr/index.js +1 -1
  202. package/lib/commands/page/create.js +1 -1
  203. package/lib/commands/page/custom/detail.js +1 -1
  204. package/lib/commands/page/custom/list.js +1 -1
  205. package/lib/commands/page/custom/publish.js +1 -1
  206. package/lib/commands/page/custom/shared.js +1 -1
  207. package/lib/commands/page/custom/syntax.js +1 -1
  208. package/lib/commands/page/custom/update.js +1 -1
  209. package/lib/commands/page/data-list-status.js +1 -1
  210. package/lib/commands/page/generate-start.js +1 -1
  211. package/lib/commands/page/generate-status.js +1 -1
  212. package/lib/commands/page/index.js +1 -1
  213. package/lib/commands/page/pull.js +1 -1
  214. package/lib/commands/page/push.js +1 -1
  215. package/lib/commands/page/relation-audit.js +1 -1
  216. package/lib/commands/page/restore.js +1 -1
  217. package/lib/commands/page/shared.js +1 -1
  218. package/lib/commands/page/sync.js +1 -1
  219. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  220. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  221. package/lib/commands/project/create/format-elapsed.js +1 -1
  222. package/lib/commands/project/create/main.js +1 -1
  223. package/lib/commands/project/create/materialize-project-template.js +1 -1
  224. package/lib/commands/project/create/project-name.js +1 -1
  225. package/lib/commands/project/create/project-template-archive.js +1 -1
  226. package/lib/commands/project/create/project-template-path.js +1 -1
  227. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  228. package/lib/commands/project/create/use-format-code.js +1 -1
  229. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  230. package/lib/commands/project/domain-routing-sync.js +1 -1
  231. package/lib/commands/project/index.js +1 -1
  232. package/lib/commands/project/upgrade.js +1 -1
  233. package/lib/commands/registry.js +1 -1
  234. package/lib/commands/role/delete.js +1 -1
  235. package/lib/commands/role/detail.js +1 -1
  236. package/lib/commands/role/index.js +1 -1
  237. package/lib/commands/role/list.js +1 -1
  238. package/lib/commands/role/shared.js +1 -1
  239. package/lib/commands/role/update.js +1 -1
  240. package/lib/commands/role/user-add.js +1 -1
  241. package/lib/commands/role/user-remove.js +1 -1
  242. package/lib/commands/role/user-resolve.js +1 -1
  243. package/lib/commands/rule/get.js +1 -1
  244. package/lib/commands/rule/index.js +1 -1
  245. package/lib/commands/rule/list.js +1 -1
  246. package/lib/commands/rule/set.js +1 -1
  247. package/lib/commands/rule/shared.js +1 -1
  248. package/lib/commands/run/index.js +1 -1
  249. package/lib/commands/schema.js +1 -1
  250. package/lib/commands/sql/create.js +1 -1
  251. package/lib/commands/sql/delete.js +1 -1
  252. package/lib/commands/sql/detail.js +1 -1
  253. package/lib/commands/sql/exec.js +1 -1
  254. package/lib/commands/sql/index.js +1 -1
  255. package/lib/commands/sql/list.js +1 -1
  256. package/lib/commands/sql/pull.js +1 -1
  257. package/lib/commands/sql/push.js +1 -1
  258. package/lib/commands/sql/shared.js +1 -1
  259. package/lib/commands/sql/status.js +1 -1
  260. package/lib/commands/sql/validate.js +1 -1
  261. package/lib/commands/task/index.js +1 -1
  262. package/lib/commands/task/status.js +1 -1
  263. package/lib/commands/tenant/index.js +1 -1
  264. package/lib/commands/tenant/members-list.js +1 -1
  265. package/lib/commands/tenant/shared.js +1 -1
  266. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  267. package/lib/commands/user-account/feishu-bind.js +1 -1
  268. package/lib/commands/user-account/index.js +1 -1
  269. package/lib/commands/workspace/add.js +1 -1
  270. package/lib/commands/workspace/index.js +1 -1
  271. package/lib/commands/workspace/remove.js +1 -1
  272. package/lib/config/domain-config.js +1 -1
  273. package/lib/config/project-domain-routing.js +1 -1
  274. package/lib/config/region-config.js +1 -1
  275. package/lib/config/schema.js +1 -1
  276. package/lib/constant/cdn.js +1 -1
  277. package/lib/constant/cli.js +1 -1
  278. package/lib/constant/defaults.js +1 -1
  279. package/lib/constant/domain.js +1 -1
  280. package/lib/constant/env.js +1 -1
  281. package/lib/constant/output.js +1 -1
  282. package/lib/constant/paths.js +1 -1
  283. package/lib/constant/region.js +1 -1
  284. package/lib/constant/risk.js +1 -1
  285. package/lib/constant/routing-profile.js +1 -1
  286. package/lib/context/app-resolver.js +1 -1
  287. package/lib/context/auth-resolver.js +1 -1
  288. package/lib/context/config-loader.js +1 -1
  289. package/lib/context.js +1 -1
  290. package/lib/core/alias-resolver.js +1 -1
  291. package/lib/core/api-client.js +1 -1
  292. package/lib/core/bff/config.js +1 -1
  293. package/lib/core/bff/file-system.js +1 -1
  294. package/lib/core/bff/hash.js +1 -1
  295. package/lib/core/bff/hook-directory.js +1 -1
  296. package/lib/core/bff/lock.js +1 -1
  297. package/lib/core/bff/utils.js +1 -1
  298. package/lib/core/cross-db-analysis.js +1 -1
  299. package/lib/core/cross-db-relation.js +1 -1
  300. package/lib/core/db-resolver.js +1 -1
  301. package/lib/core/flow-config.js +1 -1
  302. package/lib/core/instant-api-policy/config.js +1 -1
  303. package/lib/core/instant-api-policy/endpoints.js +1 -1
  304. package/lib/core/kb-management-client.js +1 -1
  305. package/lib/core/kb-search-client.js +1 -1
  306. package/lib/core/page/file-system.js +1 -1
  307. package/lib/core/page/hash.js +1 -1
  308. package/lib/core/page/lock.js +1 -1
  309. package/lib/core/page/lr-smart-jsx.js +1 -1
  310. package/lib/core/sql-index-auditor.js +1 -1
  311. package/lib/core/sql-sync/config.js +1 -1
  312. package/lib/core/sql-sync/file-system.js +1 -1
  313. package/lib/core/sql-sync/hash.js +1 -1
  314. package/lib/core/sql-sync/lock.js +1 -1
  315. package/lib/core/sql-sync/utils.js +1 -1
  316. package/lib/core/sql-validator.js +1 -1
  317. package/lib/errors.js +1 -1
  318. package/lib/framework/build-all-flags.js +1 -1
  319. package/lib/framework/error-output.js +1 -1
  320. package/lib/framework/explicit-yes.js +1 -1
  321. package/lib/framework/flags.js +1 -1
  322. package/lib/framework/help.js +1 -1
  323. package/lib/framework/index.js +1 -1
  324. package/lib/framework/output.js +1 -1
  325. package/lib/framework/response.js +1 -1
  326. package/lib/framework/runner-alias.js +1 -1
  327. package/lib/framework/runner.js +1 -1
  328. package/lib/framework/schema-export.js +1 -1
  329. package/lib/framework/supported-flags.js +1 -1
  330. package/lib/framework/types.js +1 -1
  331. package/lib/generated/build-info.d.ts +4 -4
  332. package/lib/generated/build-info.js +1 -1
  333. package/lib/generated/official-routing.js +1 -1
  334. package/lib/generated/routing-contract.js +1 -1
  335. package/lib/help.js +1 -1
  336. package/lib/postinstall.js +1 -1
  337. package/lib/runtime/confirmation.js +1 -1
  338. package/lib/runtime/event.js +1 -1
  339. package/lib/runtime/index.js +1 -1
  340. package/lib/runtime/queue.js +1 -1
  341. package/lib/runtime/resolve.js +1 -1
  342. package/lib/services/dataset-design/checkpoint.js +1 -1
  343. package/lib/services/dataset-design/commands.js +1 -1
  344. package/lib/services/dataset-design/contract.js +1 -1
  345. package/lib/skills/builtin-skill.js +1 -1
  346. package/lib/skills/main.js +1 -1
  347. package/lib/skills/npx-skills-add.js +1 -1
  348. package/lib/skills/skill-presence.js +1 -1
  349. package/lib/telemetry/cli-command-trace.js +1 -1
  350. package/lib/telemetry/cli-help-trace.js +1 -1
  351. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  352. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  353. package/lib/telemetry/send-cli-trace-log.js +1 -1
  354. package/lib/utils/ai_config.js +1 -1
  355. package/lib/utils/apply-jq-filter.js +1 -1
  356. package/lib/utils/cdn-config.js +1 -1
  357. package/lib/utils/check-sdk-version.js +1 -1
  358. package/lib/utils/cli-version-check.js +1 -1
  359. package/lib/utils/cli-version-policy.js +1 -1
  360. package/lib/utils/config.js +1 -1
  361. package/lib/utils/entity-with-id.js +1 -1
  362. package/lib/utils/file-utils.js +1 -1
  363. package/lib/utils/guides-cdn.js +1 -1
  364. package/lib/utils/http-client.js +1 -1
  365. package/lib/utils/is-non-interactive.js +1 -1
  366. package/lib/utils/logger.js +1 -1
  367. package/lib/utils/params.js +1 -1
  368. package/lib/utils/platform.js +1 -1
  369. package/lib/utils/sleep.js +1 -1
  370. package/lib/utils/template-replacer.js +1 -1
  371. package/lib/utils/update-notice.js +1 -1
  372. package/lib/utils/version.js +1 -1
  373. package/lib/utils/with-active-cookie.js +1 -1
  374. package/lib/utils/write-cli-side-channel.js +1 -1
  375. package/package.json +2 -2
  376. package/skills/rabetbase/SKILL.md +2 -2
  377. package/skills/rabetbase/references/rabetbase-issue-report.md +4 -1
  378. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  379. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  380. package/skills/rabetbase.manifest.json +3 -3
  381. package/lib/commands/issue/shared.d.ts +0 -32
  382. package/lib/commands/issue/shared.js +0 -1
  383. package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
  384. package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
@@ -1 +1 @@
1
- const a231_0x4c4302=a231_0xa0ec;(function(_0x11f8b8,_0x42222d){const _0x32e82a=a231_0xa0ec,_0x513bb1=_0x11f8b8();while(!![]){try{const _0x379190=parseInt(_0x32e82a(0x1f1))/0x1*(parseInt(_0x32e82a(0x1e3))/0x2)+-parseInt(_0x32e82a(0x1e5))/0x3+parseInt(_0x32e82a(0x1e8))/0x4*(-parseInt(_0x32e82a(0x1f0))/0x5)+-parseInt(_0x32e82a(0x1ef))/0x6*(-parseInt(_0x32e82a(0x1f5))/0x7)+-parseInt(_0x32e82a(0x1ee))/0x8+-parseInt(_0x32e82a(0x1f3))/0x9*(parseInt(_0x32e82a(0x1ec))/0xa)+parseInt(_0x32e82a(0x1e1))/0xb;if(_0x379190===_0x42222d)break;else _0x513bb1['push'](_0x513bb1['shift']());}catch(_0x42e324){_0x513bb1['push'](_0x513bb1['shift']());}}}(a231_0x51bd,0x4f2d3));function a231_0xa0ec(_0x28d65a,_0x5eca19){_0x28d65a=_0x28d65a-0x1df;const _0x51bd20=a231_0x51bd();let _0xa0ecd6=_0x51bd20[_0x28d65a];return _0xa0ecd6;}import{deleteAppRole}from'../../core/api-client.js';function a231_0x51bd(){const _0x165482=['appCode','high-risk-write','4mrqABv','userCount','POST','role','1030LSxaCK','dev','2682376SHtRjk','426996mXjRLw','1171490NWONth','37568PmNelm','\x20(id=','32949hHGEIQ','delete','35Rxpuce','roleName','/smartapi/permit/role/delete','9550365KXgzqM','Role\x20still\x20has\x20','8MQpcxb','num','309996VQazzl'];a231_0x51bd=function(){return _0x165482;};return a231_0x51bd();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a231_0x4c4302(0x1e0);export const roleDelete={'service':a231_0x4c4302(0x1eb),'command':a231_0x4c4302(0x1f4),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a231_0x4c4302(0x1e7),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3a9257){const _0x78e944=a231_0x4c4302,_0x3ea0a9=_0x3a9257[_0x78e944(0x1e4)]('id'),_0x69549c=await getRoleById(_0x3a9257['appCode'],_0x3ea0a9);return assertCustomRole(_0x69549c,_0x78e944(0x1f4)),asDryRunResult({'scope':'dev','operation':_0x78e944(0x1f4),'selector':{'appCode':_0x3a9257[_0x78e944(0x1e6)],'roleId':_0x3ea0a9,'roleName':_0x69549c[_0x78e944(0x1df)]},'before':projectRole(_0x69549c),'after':null,'dryRun':!![],'backend':{'method':_0x78e944(0x1ea),'path':DELETE_PATH},'warnings':_0x69549c['userCount']>0x0?[_0x78e944(0x1e2)+_0x69549c[_0x78e944(0x1e9)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x78e944(0x1ea),'url':DELETE_PATH});},async 'execute'(_0x3b8e2f){const _0x3becae=a231_0x4c4302,_0x3393a5=_0x3b8e2f['num']('id'),_0x23b364=await getRoleById(_0x3b8e2f[_0x3becae(0x1e6)],_0x3393a5);return assertCustomRole(_0x23b364,_0x3becae(0x1f4)),await deleteAppRole(_0x3393a5),{'ok':!![],'data':{'scope':_0x3becae(0x1ed),'operation':_0x3becae(0x1f4),'selector':{'appCode':_0x3b8e2f[_0x3becae(0x1e6)],'roleId':_0x3393a5,'roleName':_0x23b364[_0x3becae(0x1df)]},'before':projectRole(_0x23b364),'after':null,'dryRun':![],'backend':{'method':_0x3becae(0x1ea),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x23b364[_0x3becae(0x1df)]+_0x3becae(0x1f2)+_0x3393a5+')'};}};
1
+ const a231_0x10083b=a231_0x1862;(function(_0x5854ac,_0x4bf3be){const _0x194210=a231_0x1862,_0x1fa13c=_0x5854ac();while(!![]){try{const _0x5ae440=-parseInt(_0x194210(0x103))/0x1+-parseInt(_0x194210(0x111))/0x2+parseInt(_0x194210(0x10c))/0x3+parseInt(_0x194210(0x10f))/0x4+-parseInt(_0x194210(0x117))/0x5+-parseInt(_0x194210(0x106))/0x6+-parseInt(_0x194210(0x10b))/0x7*(-parseInt(_0x194210(0x118))/0x8);if(_0x5ae440===_0x4bf3be)break;else _0x1fa13c['push'](_0x1fa13c['shift']());}catch(_0x1e24fd){_0x1fa13c['push'](_0x1fa13c['shift']());}}}(a231_0x273d,0xc7b3f));function a231_0x1862(_0x523f80,_0x1fc4da){_0x523f80=_0x523f80-0x103;const _0x273d52=a231_0x273d();let _0x18629e=_0x273d52[_0x523f80];return _0x18629e;}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=a231_0x10083b(0x10d);function a231_0x273d(){const _0x590403=['num','delete','roleName','\x20(id=','1503915YioNkq','8nWTDcy','1585987aGMAUY','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','9173784iZrgpu','POST','Deleted\x20role\x20','dev','appCode','29713614vJAXvV','1398177eRxFdP','/smartapi/permit/role/delete','role','4431932lvBxld','high-risk-write','3170254MDkzeP','Role\x20still\x20has\x20'];a231_0x273d=function(){return _0x590403;};return a231_0x273d();}export const roleDelete={'service':a231_0x10083b(0x10e),'command':a231_0x10083b(0x114),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a231_0x10083b(0x110),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4a78a8){const _0x4f1c3f=a231_0x10083b,_0x186f19=_0x4a78a8['num']('id'),_0x1aade5=await getRoleById(_0x4a78a8[_0x4f1c3f(0x10a)],_0x186f19);return assertCustomRole(_0x1aade5,_0x4f1c3f(0x114)),asDryRunResult({'scope':'dev','operation':_0x4f1c3f(0x114),'selector':{'appCode':_0x4a78a8['appCode'],'roleId':_0x186f19,'roleName':_0x1aade5['roleName']},'before':projectRole(_0x1aade5),'after':null,'dryRun':!![],'backend':{'method':_0x4f1c3f(0x107),'path':DELETE_PATH},'warnings':_0x1aade5[_0x4f1c3f(0x104)]>0x0?[_0x4f1c3f(0x112)+_0x1aade5[_0x4f1c3f(0x104)]+_0x4f1c3f(0x105)]:[]},{'method':_0x4f1c3f(0x107),'url':DELETE_PATH});},async 'execute'(_0x395782){const _0x56ecf0=a231_0x10083b,_0x174fec=_0x395782[_0x56ecf0(0x113)]('id'),_0x1674d3=await getRoleById(_0x395782['appCode'],_0x174fec);return assertCustomRole(_0x1674d3,_0x56ecf0(0x114)),await deleteAppRole(_0x174fec),{'ok':!![],'data':{'scope':_0x56ecf0(0x109),'operation':_0x56ecf0(0x114),'selector':{'appCode':_0x395782['appCode'],'roleId':_0x174fec,'roleName':_0x1674d3['roleName']},'before':projectRole(_0x1674d3),'after':null,'dryRun':![],'backend':{'method':_0x56ecf0(0x107),'path':DELETE_PATH},'warnings':[]},'message':_0x56ecf0(0x108)+_0x1674d3[_0x56ecf0(0x115)]+_0x56ecf0(0x116)+_0x174fec+')'};}};
@@ -1 +1 @@
1
- function a232_0x1b46(_0x4805bb,_0x1ce8df){_0x4805bb=_0x4805bb-0xd6;const _0x58bb24=a232_0x58bb();let _0x1b469b=_0x58bb24[_0x4805bb];return _0x1b469b;}const a232_0x2b4ce6=a232_0x1b46;(function(_0x39cc10,_0x279e0d){const _0xf01062=a232_0x1b46,_0x7b25da=_0x39cc10();while(!![]){try{const _0x3fbfa3=parseInt(_0xf01062(0xd6))/0x1*(parseInt(_0xf01062(0xe0))/0x2)+parseInt(_0xf01062(0xdb))/0x3*(parseInt(_0xf01062(0xde))/0x4)+-parseInt(_0xf01062(0xe1))/0x5*(-parseInt(_0xf01062(0xe5))/0x6)+parseInt(_0xf01062(0xe2))/0x7*(parseInt(_0xf01062(0xe3))/0x8)+-parseInt(_0xf01062(0xd7))/0x9+parseInt(_0xf01062(0xe6))/0xa+-parseInt(_0xf01062(0xd9))/0xb*(parseInt(_0xf01062(0xdd))/0xc);if(_0x3fbfa3===_0x279e0d)break;else _0x7b25da['push'](_0x7b25da['shift']());}catch(_0x542333){_0x7b25da['push'](_0x7b25da['shift']());}}}(a232_0x58bb,0xe60e0));function a232_0x58bb(){const _0x5b9a6b=['Role\x20','37861MrDSvn','9507069DxOBGE','read','210122ZHtJpc','role','603JIHzDF','appCode','1572QDMaIO','37384uwhoaX','num','6iAXcEi','2230eShiNe','7nCtUyO','13021632bOKMzp','roleName','4566iIDyuw','5417680LkiAxK','detail'];a232_0x58bb=function(){return _0x5b9a6b;};return a232_0x58bb();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x2b4ce6(0xda),'command':a232_0x2b4ce6(0xe7),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a232_0x2b4ce6(0xd8),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1ce672){const _0x4d09b3=a232_0x2b4ce6,_0x5ce034=_0x1ce672[_0x4d09b3(0xdf)]('id'),_0x2b695e=await getRoleById(_0x1ce672[_0x4d09b3(0xdc)],_0x5ce034);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x2b695e)},'message':_0x4d09b3(0xe8)+_0x2b695e[_0x4d09b3(0xe4)]+'\x20('+_0x2b695e['roleType']+')'};}};
1
+ const a232_0x2fee02=a232_0x4125;function a232_0x4125(_0x34d6e3,_0x574bb7){_0x34d6e3=_0x34d6e3-0xcc;const _0x14bbe1=a232_0x14bb();let _0x412548=_0x14bbe1[_0x34d6e3];return _0x412548;}(function(_0x4a0a3a,_0x388a9d){const _0x1733c9=a232_0x4125,_0xa1d772=_0x4a0a3a();while(!![]){try{const _0x271102=-parseInt(_0x1733c9(0xd0))/0x1*(parseInt(_0x1733c9(0xd5))/0x2)+parseInt(_0x1733c9(0xd8))/0x3*(parseInt(_0x1733c9(0xcf))/0x4)+-parseInt(_0x1733c9(0xcd))/0x5*(-parseInt(_0x1733c9(0xce))/0x6)+-parseInt(_0x1733c9(0xd1))/0x7+-parseInt(_0x1733c9(0xda))/0x8+parseInt(_0x1733c9(0xd4))/0x9+-parseInt(_0x1733c9(0xd3))/0xa;if(_0x271102===_0x388a9d)break;else _0xa1d772['push'](_0xa1d772['shift']());}catch(_0x28c255){_0xa1d772['push'](_0xa1d772['shift']());}}}(a232_0x14bb,0x3f9dd));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a232_0x14bb(){const _0x319fc9=['role','36jymnLF','Role\x20','606488oJNWNM','num','read','dev','roleName','205BcDnMq','34716eZkysC','149588OmpgWR','149239xeHrnP','3494876JFglfw','Show\x20a\x20single\x20role\x27s\x20detail','941350omCOkX','3537324oZJymk','2pUxSAX','appCode'];a232_0x14bb=function(){return _0x319fc9;};return a232_0x14bb();}export const roleDetail={'service':a232_0x2fee02(0xd7),'command':'detail','description':a232_0x2fee02(0xd2),'risk':a232_0x2fee02(0xdc),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4994dc){const _0x2129f6=a232_0x2fee02,_0x122a61=_0x4994dc[_0x2129f6(0xdb)]('id'),_0x7b50a8=await getRoleById(_0x4994dc[_0x2129f6(0xd6)],_0x122a61);return{'ok':!![],'data':{'scope':_0x2129f6(0xdd),'role':projectRole(_0x7b50a8)},'message':_0x2129f6(0xd9)+_0x7b50a8[_0x2129f6(0xcc)]+'\x20('+_0x7b50a8['roleType']+')'};}};
@@ -1 +1 @@
1
- (function(_0x119071,_0x494bc7){const _0x1bd7d7=a233_0x2085,_0x1af5ba=_0x119071();while(!![]){try{const _0x5a13c9=-parseInt(_0x1bd7d7(0x194))/0x1+-parseInt(_0x1bd7d7(0x19c))/0x2+parseInt(_0x1bd7d7(0x198))/0x3*(-parseInt(_0x1bd7d7(0x19b))/0x4)+parseInt(_0x1bd7d7(0x193))/0x5*(-parseInt(_0x1bd7d7(0x195))/0x6)+parseInt(_0x1bd7d7(0x196))/0x7+parseInt(_0x1bd7d7(0x197))/0x8+parseInt(_0x1bd7d7(0x19a))/0x9*(parseInt(_0x1bd7d7(0x199))/0xa);if(_0x5a13c9===_0x494bc7)break;else _0x1af5ba['push'](_0x1af5ba['shift']());}catch(_0x5ccbba){_0x1af5ba['push'](_0x1af5ba['shift']());}}}(a233_0x70a8,0x2bbba));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a233_0x70a8(){const _0x3ff5e2=['13410UcTffq','1314sclBND','433084jReePj','119510HyhVKu','115cYuqoC','80466bCcFIX','46842TgGppI','1278494HKVyeu','2696208KwDbKG','6GJPocJ'];a233_0x70a8=function(){return _0x3ff5e2;};return a233_0x70a8();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';function a233_0x2085(_0x47af1c,_0x3808d6){_0x47af1c=_0x47af1c-0x193;const _0x70a83d=a233_0x70a8();let _0x208539=_0x70a83d[_0x47af1c];return _0x208539;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x59e9e6,_0x4f4e08){const _0x1771a9=a233_0x3468,_0x1f32b0=_0x59e9e6();while(!![]){try{const _0x14220f=parseInt(_0x1771a9(0xc0))/0x1*(parseInt(_0x1771a9(0xbf))/0x2)+parseInt(_0x1771a9(0xc2))/0x3*(parseInt(_0x1771a9(0xbc))/0x4)+parseInt(_0x1771a9(0xb9))/0x5+-parseInt(_0x1771a9(0xba))/0x6+-parseInt(_0x1771a9(0xbe))/0x7+parseInt(_0x1771a9(0xc1))/0x8+-parseInt(_0x1771a9(0xbb))/0x9*(parseInt(_0x1771a9(0xbd))/0xa);if(_0x14220f===_0x4f4e08)break;else _0x1f32b0['push'](_0x1f32b0['shift']());}catch(_0x5b47b0){_0x1f32b0['push'](_0x1f32b0['shift']());}}}(a233_0xd4ed,0xd7f55));import{roleList}from'../../commands/role/list.js';function a233_0x3468(_0x24a69e,_0x54dea1){_0x24a69e=_0x24a69e-0xb9;const _0xd4eda4=a233_0xd4ed();let _0x3468aa=_0xd4eda4[_0x24a69e];return _0x3468aa;}import{roleDetail}from'../../commands/role/detail.js';function a233_0xd4ed(){const _0x4d5b5c=['16206PPqbuw','3091745eCWGQl','3669666TafpxO','828OxWqgW','1292mBsBDG','245620Aflgmq','1981168Dtdpij','1762spjBBJ','181xVsWaC','12129984KYQdWQ'];a233_0xd4ed=function(){return _0x4d5b5c;};return a233_0xd4ed();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a234_0x382da7=a234_0x3884;(function(_0x15e2b1,_0x329c1b){const _0x2a0a81=a234_0x3884,_0xf7592f=_0x15e2b1();while(!![]){try{const _0x542d10=-parseInt(_0x2a0a81(0x1bc))/0x1+-parseInt(_0x2a0a81(0x1b7))/0x2+parseInt(_0x2a0a81(0x1b4))/0x3+-parseInt(_0x2a0a81(0x1c3))/0x4*(-parseInt(_0x2a0a81(0x1c6))/0x5)+-parseInt(_0x2a0a81(0x1ba))/0x6*(-parseInt(_0x2a0a81(0x1c5))/0x7)+parseInt(_0x2a0a81(0x1be))/0x8+-parseInt(_0x2a0a81(0x1b0))/0x9*(parseInt(_0x2a0a81(0x1b9))/0xa);if(_0x542d10===_0x329c1b)break;else _0xf7592f['push'](_0xf7592f['shift']());}catch(_0x1ccb9e){_0xf7592f['push'](_0xf7592f['shift']());}}}(a234_0x2f9a,0xeff64));function a234_0x3884(_0x383f5c,_0x40a450){_0x383f5c=_0x383f5c-0x1a7;const _0x2f9a4c=a234_0x2f9a();let _0x388452=_0x2f9a4c[_0x383f5c];return _0x388452;}import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a234_0x2f9a(){const _0x2a055c=['22782rkJEQa','includes','497134btFlSR','number','7940520nOAQPy','join','pagesize','toUpperCase','\x20role(s)','1053736AnXrka','page','1946pMctwm','5mfSYjA','validation','dev','Use\x20one\x20of:\x20','type','num','map','ADMIN','roleType','read','length','string','17152083jkLWwK','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','trim','Page\x20size\x20(1-100)','4027224euRKOz','Found\x20','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','536336ILcWXy','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','10UIMPZg'];a234_0x2f9a=function(){return _0x2a055c;};return a234_0x2f9a();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x382da7(0x1ab),'DEV','OWNER','CUSTOM'];export const roleList={'service':'role','command':'list','description':a234_0x382da7(0x1b6),'risk':a234_0x382da7(0x1ad),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x382da7(0x1a8),'type':a234_0x382da7(0x1af),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':'page','type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':a234_0x382da7(0x1c0),'type':a234_0x382da7(0x1bd),'description':a234_0x382da7(0x1b3),'default':0x64}],async 'validate'(_0x22e455){const _0x55d51c=a234_0x382da7,_0x36cbe4=_0x22e455['str'](_0x55d51c(0x1a8))[_0x55d51c(0x1b2)]();if(_0x36cbe4&&!ROLE_TYPES[_0x55d51c(0x1bb)](_0x36cbe4[_0x55d51c(0x1c1)]()))throw CliErrors[_0x55d51c(0x1c7)]('Invalid\x20--type\x20\x22'+_0x36cbe4+'\x22.',_0x55d51c(0x1a7)+ROLE_TYPES[_0x55d51c(0x1bf)](',\x20')+'.');const _0x55ded9=_0x22e455[_0x55d51c(0x1a9)](_0x55d51c(0x1c4),0x1),_0x2d8137=_0x22e455['num'](_0x55d51c(0x1c0),0x64);if(_0x55ded9<0x1)throw CliErrors['validation'](_0x55d51c(0x1b1));if(_0x2d8137<0x1||_0x2d8137>0x64)throw CliErrors['validation'](_0x55d51c(0x1b8));},async 'execute'(_0x279004){const _0x35c0f8=a234_0x382da7,_0x982f33=_0x279004[_0x35c0f8(0x1a9)](_0x35c0f8(0x1c4),0x1)||0x1,_0x5110c4=_0x279004[_0x35c0f8(0x1a9)](_0x35c0f8(0x1c0),0x64)||0x64,_0x285bf0=_0x279004['str'](_0x35c0f8(0x1a8))[_0x35c0f8(0x1b2)]()[_0x35c0f8(0x1c1)](),{items:_0x8c2052,paging:_0x2770ab}=await listAppRoles(_0x279004['appCode'],{'currentPage':_0x982f33,'pageSize':_0x5110c4}),_0x2a8987=_0x285bf0?_0x8c2052['filter'](_0x1ce987=>_0x1ce987[_0x35c0f8(0x1ac)]===_0x285bf0):_0x8c2052,_0x3f38e2=_0x2a8987[_0x35c0f8(0x1aa)](projectRole);return{'ok':!![],'data':{'scope':_0x35c0f8(0x1c8),'roles':_0x3f38e2,'paging':_0x2770ab},'message':_0x35c0f8(0x1b5)+_0x3f38e2[_0x35c0f8(0x1ae)]+_0x35c0f8(0x1c2)};}};
1
+ function a234_0x4b57(){const _0xe4e00=['811812ZvckiR','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','pagesize','filter','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','DEV','str','type','1335246WAJITp','page','read','dev','string','Filter\x20by\x20role\x20type','map','748776bLEvBu','8GrWVXd','includes','appCode','list','ADMIN','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','1292755AipAUT','5393605IUbmTt','\x20role(s)','number','validation','Invalid\x20--type\x20\x22','Found\x20','roleType','role','num','21578744qQfoJD','1033704BXavTU','Page\x20index\x20(1-based)','CUSTOM','OWNER','Use\x20one\x20of:\x20'];a234_0x4b57=function(){return _0xe4e00;};return a234_0x4b57();}const a234_0x2fdcc5=a234_0x5068;(function(_0x6a0274,_0x3f8f6f){const _0x18d6ae=a234_0x5068,_0x3b6740=_0x6a0274();while(!![]){try{const _0x257ffe=-parseInt(_0x18d6ae(0x172))/0x1+-parseInt(_0x18d6ae(0x151))/0x2+-parseInt(_0x18d6ae(0x160))/0x3+parseInt(_0x18d6ae(0x161))/0x4*(parseInt(_0x18d6ae(0x167))/0x5)+-parseInt(_0x18d6ae(0x159))/0x6+-parseInt(_0x18d6ae(0x168))/0x7+parseInt(_0x18d6ae(0x171))/0x8;if(_0x257ffe===_0x3f8f6f)break;else _0x3b6740['push'](_0x3b6740['shift']());}catch(_0x2c1144){_0x3b6740['push'](_0x3b6740['shift']());}}}(a234_0x4b57,0x81edb));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';function a234_0x5068(_0x1be0d9,_0x454f1f){_0x1be0d9=_0x1be0d9-0x14f;const _0x4b572b=a234_0x4b57();let _0x506808=_0x4b572b[_0x1be0d9];return _0x506808;}const ROLE_TYPES=[a234_0x2fdcc5(0x165),a234_0x2fdcc5(0x156),a234_0x2fdcc5(0x14f),a234_0x2fdcc5(0x174)];export const roleList={'service':a234_0x2fdcc5(0x16f),'command':a234_0x2fdcc5(0x164),'description':a234_0x2fdcc5(0x152),'risk':a234_0x2fdcc5(0x15b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x2fdcc5(0x158),'type':a234_0x2fdcc5(0x15d),'required':![],'description':a234_0x2fdcc5(0x15e),'enum':ROLE_TYPES},{'name':a234_0x2fdcc5(0x15a),'type':a234_0x2fdcc5(0x16a),'description':a234_0x2fdcc5(0x173),'default':0x1},{'name':a234_0x2fdcc5(0x153),'type':a234_0x2fdcc5(0x16a),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x33d440){const _0x127eff=a234_0x2fdcc5,_0x47a8a4=_0x33d440[_0x127eff(0x157)](_0x127eff(0x158))['trim']();if(_0x47a8a4&&!ROLE_TYPES[_0x127eff(0x162)](_0x47a8a4['toUpperCase']()))throw CliErrors['validation'](_0x127eff(0x16c)+_0x47a8a4+'\x22.',_0x127eff(0x150)+ROLE_TYPES['join'](',\x20')+'.');const _0x24ead6=_0x33d440[_0x127eff(0x170)]('page',0x1),_0xaea1f6=_0x33d440[_0x127eff(0x170)]('pagesize',0x64);if(_0x24ead6<0x1)throw CliErrors[_0x127eff(0x16b)](_0x127eff(0x166));if(_0xaea1f6<0x1||_0xaea1f6>0x64)throw CliErrors[_0x127eff(0x16b)](_0x127eff(0x155));},async 'execute'(_0x1b215e){const _0x17e38e=a234_0x2fdcc5,_0xfb1430=_0x1b215e[_0x17e38e(0x170)](_0x17e38e(0x15a),0x1)||0x1,_0x443b45=_0x1b215e[_0x17e38e(0x170)](_0x17e38e(0x153),0x64)||0x64,_0x39005c=_0x1b215e[_0x17e38e(0x157)]('type')['trim']()['toUpperCase'](),{items:_0x33e0f9,paging:_0x487483}=await listAppRoles(_0x1b215e[_0x17e38e(0x163)],{'currentPage':_0xfb1430,'pageSize':_0x443b45}),_0x532ca6=_0x39005c?_0x33e0f9[_0x17e38e(0x154)](_0x35f4a5=>_0x35f4a5[_0x17e38e(0x16e)]===_0x39005c):_0x33e0f9,_0x1fa5a7=_0x532ca6[_0x17e38e(0x15f)](projectRole);return{'ok':!![],'data':{'scope':_0x17e38e(0x15c),'roles':_0x1fa5a7,'paging':_0x487483},'message':_0x17e38e(0x16d)+_0x1fa5a7['length']+_0x17e38e(0x169)};}};
@@ -1 +1 @@
1
- function a235_0x1d92(_0x50d2f3,_0x4c9964){_0x50d2f3=_0x50d2f3-0x89;const _0x631f9d=a235_0x631f();let _0x1d9240=_0x631f9d[_0x50d2f3];return _0x1d9240;}const a235_0x166d90=a235_0x1d92;(function(_0xf617f9,_0x5f2cc7){const _0x2f7d0f=a235_0x1d92,_0x504785=_0xf617f9();while(!![]){try{const _0x54dfe7=parseInt(_0x2f7d0f(0xad))/0x1+-parseInt(_0x2f7d0f(0xaa))/0x2*(-parseInt(_0x2f7d0f(0x8f))/0x3)+parseInt(_0x2f7d0f(0x93))/0x4+-parseInt(_0x2f7d0f(0xd0))/0x5+parseInt(_0x2f7d0f(0xc5))/0x6*(-parseInt(_0x2f7d0f(0xab))/0x7)+-parseInt(_0x2f7d0f(0xcf))/0x8*(-parseInt(_0x2f7d0f(0xc4))/0x9)+-parseInt(_0x2f7d0f(0xd8))/0xa;if(_0x54dfe7===_0x5f2cc7)break;else _0x504785['push'](_0x504785['shift']());}catch(_0x3ba0d7){_0x504785['push'](_0x504785['shift']());}}}(a235_0x631f,0xb3159));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x166d90(0x9b),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a235_0x166d90(0xc7)};export const USER_REF_FLAG={'name':'user','type':a235_0x166d90(0xc9),'required':!![],'description':a235_0x166d90(0xa5)};export const NAME_FLAG={'name':a235_0x166d90(0xa2),'type':a235_0x166d90(0xc9),'required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':'name','type':a235_0x166d90(0xc9),'required':!![],'description':a235_0x166d90(0xa3)};export const REMARK_FLAG={'name':'remark','type':a235_0x166d90(0xc9),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x166d90(0x9f),'type':'number','required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=[a235_0x166d90(0xbf),a235_0x166d90(0xb9),'OWNER'];export function isBuiltinRole(_0x25bc26){const _0x480808=a235_0x166d90;return BUILTIN_ROLE_TYPES[_0x480808(0xb1)](_0x25bc26);}export function assertCustomRole(_0x33d62d,_0x469f93){const _0x1c95c4=a235_0x166d90;if(_0x33d62d[_0x1c95c4(0xb7)]!==_0x1c95c4(0x8a))throw CliErrors[_0x1c95c4(0xa7)]('Cannot\x20'+_0x469f93+_0x1c95c4(0xb8)+_0x33d62d[_0x1c95c4(0xd9)]+'\x20('+_0x33d62d[_0x1c95c4(0xb7)]+').',_0x1c95c4(0x92));}export function projectRole(_0x30e993){const _0x8351ac=a235_0x166d90;return{'id':_0x30e993['id'],'roleName':_0x30e993[_0x8351ac(0xd9)],'roleType':_0x30e993['roleType'],'remark':_0x30e993['remark'],'userCount':_0x30e993[_0x8351ac(0xcd)],'permitCount':_0x30e993[_0x8351ac(0xd2)],'builtin':isBuiltinRole(_0x30e993[_0x8351ac(0xb7)])};}export async function resolveRoleRef(_0x3edba0,_0x5791fe){const _0x452a32=a235_0x166d90,_0x4974d0=_0x5791fe[_0x452a32(0xb3)]();if(!_0x4974d0)throw CliErrors[_0x452a32(0xa7)](_0x452a32(0xb0),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x452a32(0xba)](_0x4974d0))return getRoleById(_0x3edba0,Number(_0x4974d0));const _0x46ed05=await listAllAppRoles(_0x3edba0),_0x15b229=_0x46ed05[_0x452a32(0xb5)](_0x5875e4=>_0x5875e4[_0x452a32(0xd9)]===_0x4974d0);if(_0x15b229['length']===0x0)throw CliErrors[_0x452a32(0xa7)](_0x452a32(0xcc)+_0x4974d0+_0x452a32(0xd5)+_0x3edba0+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x15b229[_0x452a32(0xc8)]>0x1){const _0xb4afec=_0x15b229[_0x452a32(0xa9)](_0x13eb99=>_0x13eb99['id'])[_0x452a32(0x8b)](',\x20');throw CliErrors[_0x452a32(0xa7)](_0x452a32(0xcc)+_0x4974d0+_0x452a32(0x8d)+_0xb4afec+').',_0x452a32(0xaf));}return _0x15b229[0x0];}export async function getRoleById(_0x4e7537,_0x415039){const _0x40378c=a235_0x166d90,_0x2a068e=await listAllAppRoles(_0x4e7537),_0x3cb3f7=_0x2a068e[_0x40378c(0xb5)](_0x41ca6b=>_0x41ca6b['id']===_0x415039&&(!_0x41ca6b['appCode']||_0x41ca6b[_0x40378c(0x8e)]===_0x4e7537));if(_0x3cb3f7[_0x40378c(0xc8)]!==0x1)throw CliErrors[_0x40378c(0xa7)](_0x40378c(0x94)+_0x415039+'\x20not\x20found\x20in\x20app\x20'+_0x4e7537+'.',_0x40378c(0xbe));return _0x3cb3f7[0x0];}async function listAllAppRoles(_0x176af8){const _0xa205a8=a235_0x166d90,_0x59110b=0x64,_0x47bc19=[];for(let _0x4a6efc=0x1;;_0x4a6efc+=0x1){const {items:_0x146c98,paging:_0x1ee05d}=await listAppRoles(_0x176af8,{'currentPage':_0x4a6efc,'pageSize':_0x59110b});_0x47bc19[_0xa205a8(0xa6)](..._0x146c98);if(_0x146c98[_0xa205a8(0xc8)]<_0x59110b||_0x1ee05d&&_0x47bc19[_0xa205a8(0xc8)]>=_0x1ee05d[_0xa205a8(0xa8)])return _0x47bc19;}}export async function resolveTenantCode(){const _0x52f6ea=a235_0x166d90,_0x4f08ff=await getSessionUserInfo(),_0x3be4d4=_0x4f08ff?.['user']?.[_0x52f6ea(0x95)]?.[_0x52f6ea(0xc3)];if(!_0x3be4d4)throw CliErrors['authRequired'](_0x52f6ea(0xd4));return _0x3be4d4;}function matchMember(_0xe67eca,_0x25734f){const _0x3e97a4=a235_0x166d90,_0x1b8435=_0x25734f[_0x3e97a4(0xb3)]()[_0x3e97a4(0xd1)]();return(_0xe67eca[_0x3e97a4(0x96)]??'')['toLowerCase']()===_0x1b8435||(_0xe67eca[_0x3e97a4(0x9e)]??'')[_0x3e97a4(0xd1)]()===_0x1b8435;}export async function resolveUserRef(_0x54a16f,_0xf9244f=a235_0x166d90(0x9a)){const _0x20f75d=a235_0x166d90,_0x31add0=_0x54a16f[_0x20f75d(0xb3)]();if(!_0x31add0)throw CliErrors[_0x20f75d(0xa7)](_0x20f75d(0x99),_0x20f75d(0xb6));const _0x5e2f1d=await resolveTenantCode(),_0x3ccab8=await getTenantMembers(_0x5e2f1d);if(/^\d+$/[_0x20f75d(0xba)](_0x31add0)){const _0xfb408=Number(_0x31add0),_0x851d87=_0x3ccab8[_0x20f75d(0x8c)](_0x53b5b9=>_0x53b5b9['userId']===_0xfb408);return{'userId':_0xfb408,'username':_0x851d87?.[_0x20f75d(0x9e)]??String(_0xfb408),'nickname':_0x851d87?.[_0x20f75d(0x96)],'matchedBy':'id'};}const _0x54849a=_0x3ccab8[_0x20f75d(0xb5)](_0x460e94=>matchMember(_0x460e94,_0x31add0));if(_0x54849a[_0x20f75d(0xc8)]===0x0)throw CliErrors[_0x20f75d(0xa7)]('No\x20tenant\x20member\x20matches\x20\x22'+_0x31add0+'\x22.',_0x20f75d(0xae)+_0xf9244f);if(_0x54849a[_0x20f75d(0xc8)]>0x1){const _0x3742b8=_0x54849a[_0x20f75d(0xa9)](_0x59dc4a=>(_0x59dc4a[_0x20f75d(0x96)]??_0x59dc4a[_0x20f75d(0x9e)]??'?')+'('+_0x59dc4a[_0x20f75d(0x89)]+')')[_0x20f75d(0x8b)](',\x20');throw CliErrors[_0x20f75d(0xa7)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x31add0+_0x20f75d(0xac)+_0x3742b8+'.',_0xf9244f);}const _0x4a8003=_0x54849a[0x0];return{'userId':_0x4a8003['userId'],'username':_0x4a8003[_0x20f75d(0x9e)]??String(_0x4a8003['userId']),'nickname':_0x4a8003[_0x20f75d(0x96)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x166d90(0xb4);export const DELETE_USER_ROLE_PATH=a235_0x166d90(0x97);function a235_0x631f(){const _0x26d94c=['769432LsyDEI','4360980wDtZCO','toLowerCase','permitCount','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','\x22\x20not\x20found\x20in\x20app\x20','POST','flag','19887950vnBBeo','roleName','userId','CUSTOM','join','find','\x22\x20is\x20ambiguous\x20(ids:\x20','appCode','3LbzpxR','\x20duplicate\x20memberships\x20for\x20user\x20','User\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','4971072cAQWfu','Role\x20id\x20','tenant','nickname','/smartapi/permit/user-role/delete','Anti-drift\x20check\x20failed:\x20expected\x20','Missing\x20user\x20reference.','Pass\x20--user\x20<id>.','number','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Cannot\x20','username','expect-user-count','OWNER','flagMissing','name','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','expectUserCount','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','push','validation','totalCount','map','1039146Qvxzjf','1844836FyGZnL','\x22:\x20','1443686jtDhfH','Check\x20the\x20nickname/username.\x20','Disambiguate\x20with\x20--role\x20<id>.','Missing\x20role\x20reference.','includes','\x20is\x20already\x20a\x20member\x20of\x20role\x20','trim','/smartapi/permit/user-role/create','filter','Pass\x20--user\x20<id|name>.','roleType','\x20built-in\x20role\x20','DEV','test','dev','dryRun','user-add','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','ADMIN','\x20members\x20of\x20the\x20OWNER\x20role.','\x20is\x20not\x20a\x20member\x20of\x20role\x20','str','tenant_code','135exRcVS','24uzNNXd','user','Role\x20id\x20or\x20exact\x20role\x20name','length','string','role',';\x20no\x20change.','Role\x20name\x20\x22','userCount','\x20member(s)\x20but\x20role\x20has\x20'];a235_0x631f=function(){return _0x26d94c;};return a235_0x631f();}export function computeRoleUserMutation(_0x395bfb){const _0x28c0ed=a235_0x166d90,{operation:_0x18d905,appCode:_0x3fffd8,role:_0x37ffa9,relations:_0x1ac5ba,user:_0x2f23c5}=_0x395bfb,_0x234c64=[...new Set(_0x1ac5ba[_0x28c0ed(0xa9)](_0xcf9fc0=>_0xcf9fc0[_0x28c0ed(0x89)]))],_0x1b9b33=[];if(_0x395bfb[_0x28c0ed(0xa4)]!==undefined&&_0x395bfb[_0x28c0ed(0xa4)]!==_0x234c64[_0x28c0ed(0xc8)])throw CliErrors[_0x28c0ed(0xa7)](_0x28c0ed(0x98)+_0x395bfb[_0x28c0ed(0xa4)]+_0x28c0ed(0xce)+_0x234c64[_0x28c0ed(0xc8)]+'.',_0x28c0ed(0x9c));const _0x10c6a5=_0x234c64[_0x28c0ed(0xb1)](_0x2f23c5[_0x28c0ed(0x89)]),_0x1a160c=_0x1ac5ba['filter'](_0x1be26e=>_0x1be26e[_0x28c0ed(0x89)]===_0x2f23c5[_0x28c0ed(0x89)])['map'](_0x2adbee=>_0x2adbee['id']),_0x585083=_0x18d905===_0x28c0ed(0xbd)?!_0x10c6a5:_0x10c6a5;let _0x3905d0=_0x234c64;_0x18d905===_0x28c0ed(0xbd)?_0x10c6a5?_0x1b9b33[_0x28c0ed(0xa6)](_0x28c0ed(0x91)+_0x2f23c5['userId']+_0x28c0ed(0xb2)+_0x37ffa9[_0x28c0ed(0xd9)]+';\x20no\x20change.'):_0x3905d0=[..._0x234c64,_0x2f23c5[_0x28c0ed(0x89)]]:!_0x10c6a5?_0x1b9b33[_0x28c0ed(0xa6)](_0x28c0ed(0x91)+_0x2f23c5[_0x28c0ed(0x89)]+_0x28c0ed(0xc1)+_0x37ffa9[_0x28c0ed(0xd9)]+_0x28c0ed(0xcb)):(_0x3905d0=_0x234c64[_0x28c0ed(0xb5)](_0x4af92d=>_0x4af92d!==_0x2f23c5[_0x28c0ed(0x89)]),_0x1a160c[_0x28c0ed(0xc8)]>0x1&&_0x1b9b33[_0x28c0ed(0xa6)]('Removed\x20'+_0x1a160c[_0x28c0ed(0xc8)]+_0x28c0ed(0x90)+_0x2f23c5[_0x28c0ed(0x89)]+'.'));const _0x1e53c3={'scope':_0x28c0ed(0xbb),'operation':_0x18d905,'selector':{'appCode':_0x3fffd8,'roleId':_0x37ffa9['id'],'roleName':_0x37ffa9['roleName'],'userId':_0x2f23c5[_0x28c0ed(0x89)]},'before':{'userIds':_0x234c64},'after':{'userIds':_0x3905d0},'dryRun':_0x395bfb[_0x28c0ed(0xbc)],'backend':{'method':_0x28c0ed(0xd6),'path':_0x18d905===_0x28c0ed(0xbd)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x1b9b33};return{'mutation':_0x1e53c3,'changed':_0x585083,'matchingRelationIds':_0x1a160c};}export async function loadDevRoleRelations(_0x13f877,_0x15927e){const _0x35fe7b=a235_0x166d90,_0x4c6d4d=0x64,_0x5f58b0=[];for(let _0x14b8a0=0x1;;_0x14b8a0+=0x1){const {items:_0x3ba842,paging:_0x43f0a2}=await listDevUserRoleRelations(_0x13f877,{'roleId':_0x15927e,'currentPage':_0x14b8a0,'pageSize':_0x4c6d4d});_0x5f58b0[_0x35fe7b(0xa6)](..._0x3ba842);if(_0x3ba842['length']<_0x4c6d4d||_0x43f0a2&&_0x5f58b0[_0x35fe7b(0xc8)]>=_0x43f0a2['totalCount'])return _0x5f58b0;}}export function readRoleRef(_0x580f78){const _0x3b25c4=a235_0x166d90,_0x2f4113=_0x580f78[_0x3b25c4(0xc2)](_0x3b25c4(0xca))[_0x3b25c4(0xb3)]();if(!_0x2f4113)throw CliErrors[_0x3b25c4(0xa1)](_0x3b25c4(0xca),'Pass\x20--role\x20<id|name>.');return _0x2f4113;}export async function prepareUserMutation(_0x534889,_0x124f4b,_0x2ee37a){const _0x15e6c8=a235_0x166d90,_0x12c92d=readRoleRef(_0x534889),_0x51f0f4=_0x534889[_0x15e6c8(0xc2)](_0x15e6c8(0xc6))[_0x15e6c8(0xb3)]();if(!_0x51f0f4)throw CliErrors[_0x15e6c8(0xa1)](_0x15e6c8(0xc6),_0x15e6c8(0xb6));const _0x2f025a=_0x534889[_0x15e6c8(0xd7)](_0x15e6c8(0x9f)),_0x20ea89=_0x2f025a===undefined||_0x2f025a===null?undefined:Number(_0x2f025a),_0x48fd32=await resolveRoleRef(_0x534889[_0x15e6c8(0x8e)],_0x12c92d);if(_0x48fd32['roleType']===_0x15e6c8(0xa0))throw CliErrors[_0x15e6c8(0xa7)](_0x15e6c8(0x9d)+_0x124f4b+_0x15e6c8(0xc0),_0x15e6c8(0xd3));const _0x48dc57=await resolveUserRef(_0x51f0f4),_0x2c8738=await loadDevRoleRelations(_0x534889[_0x15e6c8(0x8e)],_0x48fd32['id']);return{...computeRoleUserMutation({'operation':_0x124f4b,'appCode':_0x534889[_0x15e6c8(0x8e)],'role':_0x48fd32,'relations':_0x2c8738,'user':{'userId':_0x48dc57[_0x15e6c8(0x89)],'username':_0x48dc57[_0x15e6c8(0x9e)],'nickname':_0x48dc57[_0x15e6c8(0x96)]},'dryRun':_0x2ee37a,..._0x20ea89!==undefined?{'expectUserCount':_0x20ea89}:{}}),'role':_0x48fd32,'user':_0x48dc57};}
1
+ const a235_0x25a3ea=a235_0x182d;(function(_0x524186,_0x4213ae){const _0x3d6690=a235_0x182d,_0x3477c7=_0x524186();while(!![]){try{const _0x2d46bd=parseInt(_0x3d6690(0x1b8))/0x1*(-parseInt(_0x3d6690(0x1ca))/0x2)+parseInt(_0x3d6690(0x1ab))/0x3+parseInt(_0x3d6690(0x1a8))/0x4*(parseInt(_0x3d6690(0x1ad))/0x5)+-parseInt(_0x3d6690(0x1d8))/0x6*(-parseInt(_0x3d6690(0x19e))/0x7)+parseInt(_0x3d6690(0x1d1))/0x8+parseInt(_0x3d6690(0x1b5))/0x9+-parseInt(_0x3d6690(0x19b))/0xa*(parseInt(_0x3d6690(0x1c6))/0xb);if(_0x2d46bd===_0x4213ae)break;else _0x3477c7['push'](_0x3477c7['shift']());}catch(_0x402ed2){_0x3477c7['push'](_0x3477c7['shift']());}}}(a235_0x123d,0xde7e4));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x25a3ea(0x1dc),'required':!![],'description':a235_0x25a3ea(0x193)};export const ROLE_REF_FLAG={'name':'role','type':a235_0x25a3ea(0x1be),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};function a235_0x182d(_0xa76495,_0x1c28a9){_0xa76495=_0xa76495-0x190;const _0x123d19=a235_0x123d();let _0x182dc3=_0x123d19[_0xa76495];return _0x182dc3;}export const USER_REF_FLAG={'name':a235_0x25a3ea(0x1b4),'type':'string','required':!![],'description':a235_0x25a3ea(0x1cd)};export const NAME_FLAG={'name':'name','type':a235_0x25a3ea(0x1be),'required':!![],'description':'Role\x20name'};function a235_0x123d(){const _0x5593cd=['push','name','expect-user-count','Role\x20name\x20\x22','5847368ETIitU','username','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','2491608DXhCUj','validation','5upqaGr','\x20built-in\x20role\x20','DEV','dryRun','\x22\x20not\x20found\x20in\x20app\x20','\x22\x20is\x20ambiguous\x20(ids:\x20','Disambiguate\x20with\x20--role\x20<id>.','user','16205913MrfxrY','Anti-drift\x20check\x20failed:\x20expected\x20','find','1TZqrqt','\x22:\x20','permitCount','User\x20','expectUserCount','Pass\x20--user\x20<id|name>.','string','user-add','Multiple\x20tenant\x20members\x20match\x20\x22','Missing\x20role\x20reference.','roleType','\x20is\x20already\x20a\x20member\x20of\x20role\x20','toLowerCase','remark','253IeqaJm','Cannot\x20','roleName','/smartapi/permit/user-role/delete','1994086Uvyjkp','OWNER','length','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','/smartapi/permit/user-role/create','role','Removed\x20','6032264BNwLIb','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Role\x20id\x20','Pass\x20--role\x20<id|name>.','map','tenant_code','flag','88470oXEwda','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','appCode','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','number','dev','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Missing\x20user\x20reference.','Role\x20id\x20(from\x20`role\x20list`)','\x20members\x20of\x20the\x20OWNER\x20role.','userId','totalCount',';\x20no\x20change.','flagMissing','filter','nickname','1700810OJMmeT','trim','join','462sXYdiZ','includes','\x20member(s)\x20but\x20role\x20has\x20','Optional\x20role\x20remark/description','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','test'];a235_0x123d=function(){return _0x5593cd;};return a235_0x123d();}export const USER_NAME_FLAG={'name':'name','type':a235_0x25a3ea(0x1be),'required':!![],'description':a235_0x25a3ea(0x191)};export const REMARK_FLAG={'name':a235_0x25a3ea(0x1c5),'type':a235_0x25a3ea(0x1be),'required':![],'description':a235_0x25a3ea(0x1a1)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x25a3ea(0x1a6),'type':a235_0x25a3ea(0x1dc),'required':![],'description':a235_0x25a3ea(0x1d9)};export const BUILTIN_ROLE_TYPES=['ADMIN',a235_0x25a3ea(0x1af),a235_0x25a3ea(0x1cb)];export function isBuiltinRole(_0x430868){return BUILTIN_ROLE_TYPES['includes'](_0x430868);}export function assertCustomRole(_0x3c7360,_0x26b96b){const _0x4e95c5=a235_0x25a3ea;if(_0x3c7360[_0x4e95c5(0x1c2)]!=='CUSTOM')throw CliErrors['validation'](_0x4e95c5(0x1c7)+_0x26b96b+_0x4e95c5(0x1ae)+_0x3c7360['roleName']+'\x20('+_0x3c7360[_0x4e95c5(0x1c2)]+').',_0x4e95c5(0x1d2));}export function projectRole(_0x3466cf){const _0x304295=a235_0x25a3ea;return{'id':_0x3466cf['id'],'roleName':_0x3466cf[_0x304295(0x1c8)],'roleType':_0x3466cf[_0x304295(0x1c2)],'remark':_0x3466cf[_0x304295(0x1c5)],'userCount':_0x3466cf['userCount'],'permitCount':_0x3466cf[_0x304295(0x1ba)],'builtin':isBuiltinRole(_0x3466cf[_0x304295(0x1c2)])};}export async function resolveRoleRef(_0x125869,_0x9ea3c4){const _0x557d94=a235_0x25a3ea,_0x5391c1=_0x9ea3c4[_0x557d94(0x19c)]();if(!_0x5391c1)throw CliErrors['validation'](_0x557d94(0x1c1),_0x557d94(0x1d4));if(/^\d+$/[_0x557d94(0x1a3)](_0x5391c1))return getRoleById(_0x125869,Number(_0x5391c1));const _0x161344=await listAllAppRoles(_0x125869),_0x36e8ce=_0x161344[_0x557d94(0x199)](_0x2c7259=>_0x2c7259[_0x557d94(0x1c8)]===_0x5391c1);if(_0x36e8ce[_0x557d94(0x1cc)]===0x0)throw CliErrors[_0x557d94(0x1ac)](_0x557d94(0x1a7)+_0x5391c1+_0x557d94(0x1b1)+_0x125869+'.',_0x557d94(0x1aa));if(_0x36e8ce[_0x557d94(0x1cc)]>0x1){const _0x41f43a=_0x36e8ce['map'](_0x39978b=>_0x39978b['id'])[_0x557d94(0x19d)](',\x20');throw CliErrors[_0x557d94(0x1ac)](_0x557d94(0x1a7)+_0x5391c1+_0x557d94(0x1b2)+_0x41f43a+').',_0x557d94(0x1b3));}return _0x36e8ce[0x0];}export async function getRoleById(_0x5f5ab3,_0x54d36f){const _0x4fff0e=a235_0x25a3ea,_0x506253=await listAllAppRoles(_0x5f5ab3),_0x2dbbf9=_0x506253[_0x4fff0e(0x199)](_0x9e418b=>_0x9e418b['id']===_0x54d36f&&(!_0x9e418b['appCode']||_0x9e418b[_0x4fff0e(0x1da)]===_0x5f5ab3));if(_0x2dbbf9['length']!==0x1)throw CliErrors['validation'](_0x4fff0e(0x1d3)+_0x54d36f+'\x20not\x20found\x20in\x20app\x20'+_0x5f5ab3+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x2dbbf9[0x0];}async function listAllAppRoles(_0x122146){const _0x385314=a235_0x25a3ea,_0x5c720d=0x64,_0x107252=[];for(let _0x551ef2=0x1;;_0x551ef2+=0x1){const {items:_0x483d31,paging:_0x5c7e57}=await listAppRoles(_0x122146,{'currentPage':_0x551ef2,'pageSize':_0x5c720d});_0x107252[_0x385314(0x1a4)](..._0x483d31);if(_0x483d31[_0x385314(0x1cc)]<_0x5c720d||_0x5c7e57&&_0x107252['length']>=_0x5c7e57[_0x385314(0x196)])return _0x107252;}}export async function resolveTenantCode(){const _0x5a845d=a235_0x25a3ea,_0x30848a=await getSessionUserInfo(),_0x264f7e=_0x30848a?.[_0x5a845d(0x1b4)]?.['tenant']?.[_0x5a845d(0x1d6)];if(!_0x264f7e)throw CliErrors['authRequired']('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x264f7e;}function matchMember(_0x393e5b,_0xb2c4ab){const _0x379081=a235_0x25a3ea,_0x12c6a2=_0xb2c4ab[_0x379081(0x19c)]()[_0x379081(0x1c4)]();return(_0x393e5b[_0x379081(0x19a)]??'')['toLowerCase']()===_0x12c6a2||(_0x393e5b[_0x379081(0x1a9)]??'')[_0x379081(0x1c4)]()===_0x12c6a2;}export async function resolveUserRef(_0x1a1c18,_0x3adb06='Pass\x20--user\x20<id>.'){const _0x34770e=a235_0x25a3ea,_0x2c5bbb=_0x1a1c18[_0x34770e(0x19c)]();if(!_0x2c5bbb)throw CliErrors[_0x34770e(0x1ac)](_0x34770e(0x192),_0x34770e(0x1bd));const _0x408c28=await resolveTenantCode(),_0x47fc1c=await getTenantMembers(_0x408c28);if(/^\d+$/[_0x34770e(0x1a3)](_0x2c5bbb)){const _0x24ec9e=Number(_0x2c5bbb),_0x5c4ed1=_0x47fc1c[_0x34770e(0x1b7)](_0x293ccd=>_0x293ccd['userId']===_0x24ec9e);return{'userId':_0x24ec9e,'username':_0x5c4ed1?.[_0x34770e(0x1a9)]??String(_0x24ec9e),'nickname':_0x5c4ed1?.[_0x34770e(0x19a)],'matchedBy':'id'};}const _0x393300=_0x47fc1c[_0x34770e(0x199)](_0x1d1470=>matchMember(_0x1d1470,_0x2c5bbb));if(_0x393300[_0x34770e(0x1cc)]===0x0)throw CliErrors['validation']('No\x20tenant\x20member\x20matches\x20\x22'+_0x2c5bbb+'\x22.','Check\x20the\x20nickname/username.\x20'+_0x3adb06);if(_0x393300[_0x34770e(0x1cc)]>0x1){const _0x594f3b=_0x393300[_0x34770e(0x1d5)](_0x5de014=>(_0x5de014[_0x34770e(0x19a)]??_0x5de014[_0x34770e(0x1a9)]??'?')+'('+_0x5de014[_0x34770e(0x195)]+')')[_0x34770e(0x19d)](',\x20');throw CliErrors[_0x34770e(0x1ac)](_0x34770e(0x1c0)+_0x2c5bbb+_0x34770e(0x1b9)+_0x594f3b+'.',_0x3adb06);}const _0x39b5e8=_0x393300[0x0];return{'userId':_0x39b5e8[_0x34770e(0x195)],'username':_0x39b5e8['username']??String(_0x39b5e8[_0x34770e(0x195)]),'nickname':_0x39b5e8[_0x34770e(0x19a)],'matchedBy':_0x34770e(0x1a5)};}export const CREATE_USER_ROLE_PATH=a235_0x25a3ea(0x1ce);export const DELETE_USER_ROLE_PATH=a235_0x25a3ea(0x1c9);export function computeRoleUserMutation(_0x51123e){const _0x532238=a235_0x25a3ea,{operation:_0x2c30b5,appCode:_0x58026d,role:_0x1347ce,relations:_0x5a9eeb,user:_0x1ce200}=_0x51123e,_0x3eea1e=[...new Set(_0x5a9eeb[_0x532238(0x1d5)](_0x103600=>_0x103600[_0x532238(0x195)]))],_0x383a0e=[];if(_0x51123e[_0x532238(0x1bc)]!==undefined&&_0x51123e['expectUserCount']!==_0x3eea1e[_0x532238(0x1cc)])throw CliErrors[_0x532238(0x1ac)](_0x532238(0x1b6)+_0x51123e[_0x532238(0x1bc)]+_0x532238(0x1a0)+_0x3eea1e['length']+'.',_0x532238(0x1a2));const _0x237c1c=_0x3eea1e[_0x532238(0x19f)](_0x1ce200[_0x532238(0x195)]),_0x1a92f5=_0x5a9eeb[_0x532238(0x199)](_0x410edf=>_0x410edf['userId']===_0x1ce200[_0x532238(0x195)])[_0x532238(0x1d5)](_0x1606da=>_0x1606da['id']),_0x3d71ca=_0x2c30b5===_0x532238(0x1bf)?!_0x237c1c:_0x237c1c;let _0x38131b=_0x3eea1e;_0x2c30b5===_0x532238(0x1bf)?_0x237c1c?_0x383a0e[_0x532238(0x1a4)](_0x532238(0x1bb)+_0x1ce200['userId']+_0x532238(0x1c3)+_0x1347ce['roleName']+_0x532238(0x197)):_0x38131b=[..._0x3eea1e,_0x1ce200[_0x532238(0x195)]]:!_0x237c1c?_0x383a0e[_0x532238(0x1a4)](_0x532238(0x1bb)+_0x1ce200['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x1347ce[_0x532238(0x1c8)]+_0x532238(0x197)):(_0x38131b=_0x3eea1e[_0x532238(0x199)](_0x286f93=>_0x286f93!==_0x1ce200[_0x532238(0x195)]),_0x1a92f5['length']>0x1&&_0x383a0e[_0x532238(0x1a4)](_0x532238(0x1d0)+_0x1a92f5[_0x532238(0x1cc)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x1ce200[_0x532238(0x195)]+'.'));const _0x2f7a7b={'scope':_0x532238(0x190),'operation':_0x2c30b5,'selector':{'appCode':_0x58026d,'roleId':_0x1347ce['id'],'roleName':_0x1347ce[_0x532238(0x1c8)],'userId':_0x1ce200['userId']},'before':{'userIds':_0x3eea1e},'after':{'userIds':_0x38131b},'dryRun':_0x51123e[_0x532238(0x1b0)],'backend':{'method':'POST','path':_0x2c30b5===_0x532238(0x1bf)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x383a0e};return{'mutation':_0x2f7a7b,'changed':_0x3d71ca,'matchingRelationIds':_0x1a92f5};}export async function loadDevRoleRelations(_0x586198,_0x31be67){const _0x7a1f5e=a235_0x25a3ea,_0x3f21a2=0x64,_0x251cd8=[];for(let _0x2684b4=0x1;;_0x2684b4+=0x1){const {items:_0x5ba088,paging:_0x187fe2}=await listDevUserRoleRelations(_0x586198,{'roleId':_0x31be67,'currentPage':_0x2684b4,'pageSize':_0x3f21a2});_0x251cd8[_0x7a1f5e(0x1a4)](..._0x5ba088);if(_0x5ba088[_0x7a1f5e(0x1cc)]<_0x3f21a2||_0x187fe2&&_0x251cd8['length']>=_0x187fe2[_0x7a1f5e(0x196)])return _0x251cd8;}}export function readRoleRef(_0x23c2ba){const _0x21b340=a235_0x25a3ea,_0x2ba071=_0x23c2ba['str'](_0x21b340(0x1cf))[_0x21b340(0x19c)]();if(!_0x2ba071)throw CliErrors[_0x21b340(0x198)]('role',_0x21b340(0x1d4));return _0x2ba071;}export async function prepareUserMutation(_0x3602e0,_0x1814b6,_0x4e7e3c){const _0x2c2462=a235_0x25a3ea,_0x3b6d57=readRoleRef(_0x3602e0),_0x1da6be=_0x3602e0['str']('user')[_0x2c2462(0x19c)]();if(!_0x1da6be)throw CliErrors[_0x2c2462(0x198)]('user',_0x2c2462(0x1bd));const _0x1fa456=_0x3602e0[_0x2c2462(0x1d7)]('expect-user-count'),_0x475958=_0x1fa456===undefined||_0x1fa456===null?undefined:Number(_0x1fa456),_0x32e256=await resolveRoleRef(_0x3602e0['appCode'],_0x3b6d57);if(_0x32e256[_0x2c2462(0x1c2)]===_0x2c2462(0x1cb))throw CliErrors[_0x2c2462(0x1ac)](_0x2c2462(0x1c7)+_0x1814b6+_0x2c2462(0x194),_0x2c2462(0x1db));const _0x28f5c5=await resolveUserRef(_0x1da6be),_0x3fcd84=await loadDevRoleRelations(_0x3602e0[_0x2c2462(0x1da)],_0x32e256['id']);return{...computeRoleUserMutation({'operation':_0x1814b6,'appCode':_0x3602e0['appCode'],'role':_0x32e256,'relations':_0x3fcd84,'user':{'userId':_0x28f5c5[_0x2c2462(0x195)],'username':_0x28f5c5[_0x2c2462(0x1a9)],'nickname':_0x28f5c5[_0x2c2462(0x19a)]},'dryRun':_0x4e7e3c,..._0x475958!==undefined?{'expectUserCount':_0x475958}:{}}),'role':_0x32e256,'user':_0x28f5c5};}
@@ -1 +1 @@
1
- function a236_0x27a7(_0x29e97e,_0x477ba5){_0x29e97e=_0x29e97e-0x19b;const _0x548350=a236_0x5483();let _0x27a7ec=_0x548350[_0x29e97e];return _0x27a7ec;}const a236_0xfed65d=a236_0x27a7;(function(_0x39a551,_0x4a6338){const _0x4e675a=a236_0x27a7,_0x257068=_0x39a551();while(!![]){try{const _0x49593e=parseInt(_0x4e675a(0x1af))/0x1+-parseInt(_0x4e675a(0x1a7))/0x2*(-parseInt(_0x4e675a(0x1b0))/0x3)+-parseInt(_0x4e675a(0x1b1))/0x4+-parseInt(_0x4e675a(0x1ae))/0x5*(parseInt(_0x4e675a(0x1b9))/0x6)+parseInt(_0x4e675a(0x1a5))/0x7*(-parseInt(_0x4e675a(0x1b4))/0x8)+-parseInt(_0x4e675a(0x1ab))/0x9*(-parseInt(_0x4e675a(0x19f))/0xa)+-parseInt(_0x4e675a(0x1a0))/0xb;if(_0x49593e===_0x4a6338)break;else _0x257068['push'](_0x257068['shift']());}catch(_0x3a13a8){_0x257068['push'](_0x257068['shift']());}}}(a236_0x5483,0xb6f81));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a236_0x5483(){const _0x17a0bd=['name','5877pOduDn','dev','appCode','2011155bImJXY','1320712vzKAjX','125841UnoQBH','189020cIlScJ','POST','validation','192GdCzCY','\x20(id=','Nothing\x20to\x20update.','/smartapi/permit/role/update','--name\x20cannot\x20be\x20empty.','12CvwOuq','update','flag','roleName','role','10940FoHsjk','16595623cjfVvw','remark','Updated\x20role\x20','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','65800kkAany','num','62uegwyc','New\x20role\x20name','write'];a236_0x5483=function(){return _0x17a0bd;};return a236_0x5483();}const UPDATE_PATH=a236_0xfed65d(0x1b7);function readPatch(_0x598887){const _0x5695bc=a236_0xfed65d,_0x2a2413=_0x598887['flag'](_0x5695bc(0x1aa)),_0x4d14cf=_0x598887[_0x5695bc(0x19c)](_0x5695bc(0x1a1)),_0x1836ac={};if(_0x2a2413!==undefined&&_0x2a2413!==null){const _0xdb1231=String(_0x2a2413)['trim']();if(!_0xdb1231)throw CliErrors['validation'](_0x5695bc(0x1b8));if(_0xdb1231['length']>0x40)throw CliErrors['validation'](_0x5695bc(0x1a4));_0x1836ac[_0x5695bc(0x19d)]=_0xdb1231;}_0x4d14cf!==undefined&&_0x4d14cf!==null&&(_0x1836ac[_0x5695bc(0x1a1)]=String(_0x4d14cf));if(_0x1836ac[_0x5695bc(0x19d)]===undefined&&_0x1836ac['remark']===undefined)throw CliErrors[_0x5695bc(0x1b3)](_0x5695bc(0x1b6),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x1836ac;}export const roleUpdate={'service':a236_0xfed65d(0x19e),'command':'update','description':a236_0xfed65d(0x1a3),'risk':a236_0xfed65d(0x1a9),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0xfed65d(0x1aa),'type':'string','required':![],'description':a236_0xfed65d(0x1a8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2cd8a2){readPatch(_0x2cd8a2);},async 'dryRun'(_0x4c0fb2){const _0x470b00=a236_0xfed65d,_0x2525a5=_0x4c0fb2[_0x470b00(0x1a6)]('id'),_0x107119=readPatch(_0x4c0fb2),_0x4c5689=await getRoleById(_0x4c0fb2[_0x470b00(0x1ad)],_0x2525a5);return assertCustomRole(_0x4c5689,_0x470b00(0x19b)),asDryRunResult({'scope':_0x470b00(0x1ac),'operation':_0x470b00(0x19b),'selector':{'appCode':_0x4c0fb2[_0x470b00(0x1ad)],'roleId':_0x2525a5,'roleName':_0x4c5689[_0x470b00(0x19d)]},'before':projectRole(_0x4c5689),'after':projectRole({..._0x4c5689,..._0x107119[_0x470b00(0x19d)]!==undefined?{'roleName':_0x107119[_0x470b00(0x19d)]}:{},..._0x107119[_0x470b00(0x1a1)]!==undefined?{'remark':_0x107119['remark']}:{}}),'dryRun':!![],'backend':{'method':_0x470b00(0x1b2),'path':UPDATE_PATH},'warnings':[]},{'method':_0x470b00(0x1b2),'url':UPDATE_PATH});},async 'execute'(_0x2c8627){const _0x1a24e6=a236_0xfed65d,_0x423ad5=_0x2c8627[_0x1a24e6(0x1a6)]('id'),_0x493c52=readPatch(_0x2c8627),_0x58a36e=await getRoleById(_0x2c8627['appCode'],_0x423ad5);assertCustomRole(_0x58a36e,_0x1a24e6(0x19b)),await updateAppRole({'id':_0x423ad5,'appCode':_0x2c8627[_0x1a24e6(0x1ad)],..._0x493c52[_0x1a24e6(0x19d)]!==undefined?{'roleName':_0x493c52[_0x1a24e6(0x19d)]}:{},..._0x493c52['remark']!==undefined?{'remark':_0x493c52[_0x1a24e6(0x1a1)]}:{}});const _0xd0af3f=await getRoleById(_0x2c8627[_0x1a24e6(0x1ad)],_0x423ad5);return{'ok':!![],'data':{'scope':_0x1a24e6(0x1ac),'operation':'update','selector':{'appCode':_0x2c8627[_0x1a24e6(0x1ad)],'roleId':_0x423ad5,'roleName':_0xd0af3f[_0x1a24e6(0x19d)]},'before':projectRole(_0x58a36e),'after':projectRole(_0xd0af3f),'dryRun':![],'backend':{'method':_0x1a24e6(0x1b2),'path':UPDATE_PATH},'warnings':[]},'message':_0x1a24e6(0x1a2)+_0xd0af3f[_0x1a24e6(0x19d)]+_0x1a24e6(0x1b5)+_0x423ad5+')'};}};
1
+ const a236_0x125633=a236_0x4922;(function(_0x55bd49,_0xe1e988){const _0x363500=a236_0x4922,_0x2bb96e=_0x55bd49();while(!![]){try{const _0x5b476a=parseInt(_0x363500(0x116))/0x1+-parseInt(_0x363500(0x118))/0x2+parseInt(_0x363500(0x123))/0x3*(-parseInt(_0x363500(0x109))/0x4)+-parseInt(_0x363500(0x11a))/0x5*(-parseInt(_0x363500(0x110))/0x6)+parseInt(_0x363500(0x112))/0x7*(parseInt(_0x363500(0x108))/0x8)+-parseInt(_0x363500(0x114))/0x9*(-parseInt(_0x363500(0x10c))/0xa)+-parseInt(_0x363500(0x10e))/0xb;if(_0x5b476a===_0xe1e988)break;else _0x2bb96e['push'](_0x2bb96e['shift']());}catch(_0x20aaac){_0x2bb96e['push'](_0x2bb96e['shift']());}}}(a236_0x486f,0x42a77));import{updateAppRole}from'../../core/api-client.js';function a236_0x486f(){const _0x1e55b4=['appCode','943281aeUCkX','length','434504SjXaCk','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','424776nhpltl','Updated\x20role\x20','345kWhUnT','validation','--name\x20cannot\x20be\x20empty.','roleName','POST','role','New\x20role\x20name','remark','write','3LOjWvN','num','Nothing\x20to\x20update.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','16LAKNpj','1770884iqlnLq','dev','\x20(id=','20JlnvRH','name','654236LShMjo','/smartapi/permit/role/update','2076vbNtaK','update','1118614FAzWrc'];a236_0x486f=function(){return _0x1e55b4;};return a236_0x486f();}function a236_0x4922(_0x1a7a97,_0x46728a){_0x1a7a97=_0x1a7a97-0x108;const _0x486f64=a236_0x486f();let _0x49221e=_0x486f64[_0x1a7a97];return _0x49221e;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x125633(0x10f);function readPatch(_0x4d0e73){const _0x381cb2=a236_0x125633,_0x5f3756=_0x4d0e73['flag'](_0x381cb2(0x10d)),_0x147762=_0x4d0e73['flag'](_0x381cb2(0x121)),_0x3316b5={};if(_0x5f3756!==undefined&&_0x5f3756!==null){const _0x1b5240=String(_0x5f3756)['trim']();if(!_0x1b5240)throw CliErrors[_0x381cb2(0x11b)](_0x381cb2(0x11c));if(_0x1b5240[_0x381cb2(0x115)]>0x40)throw CliErrors[_0x381cb2(0x11b)](_0x381cb2(0x126));_0x3316b5[_0x381cb2(0x11d)]=_0x1b5240;}_0x147762!==undefined&&_0x147762!==null&&(_0x3316b5[_0x381cb2(0x121)]=String(_0x147762));if(_0x3316b5[_0x381cb2(0x11d)]===undefined&&_0x3316b5[_0x381cb2(0x121)]===undefined)throw CliErrors[_0x381cb2(0x11b)](_0x381cb2(0x125),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x3316b5;}export const roleUpdate={'service':a236_0x125633(0x11f),'command':a236_0x125633(0x111),'description':a236_0x125633(0x117),'risk':a236_0x125633(0x122),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x125633(0x10d),'type':'string','required':![],'description':a236_0x125633(0x120)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2cff00){readPatch(_0x2cff00);},async 'dryRun'(_0x1fce7b){const _0x2355fb=a236_0x125633,_0x4de9cb=_0x1fce7b[_0x2355fb(0x124)]('id'),_0x3565b8=readPatch(_0x1fce7b),_0xb0f9d9=await getRoleById(_0x1fce7b[_0x2355fb(0x113)],_0x4de9cb);return assertCustomRole(_0xb0f9d9,_0x2355fb(0x111)),asDryRunResult({'scope':'dev','operation':_0x2355fb(0x111),'selector':{'appCode':_0x1fce7b[_0x2355fb(0x113)],'roleId':_0x4de9cb,'roleName':_0xb0f9d9[_0x2355fb(0x11d)]},'before':projectRole(_0xb0f9d9),'after':projectRole({..._0xb0f9d9,..._0x3565b8[_0x2355fb(0x11d)]!==undefined?{'roleName':_0x3565b8[_0x2355fb(0x11d)]}:{},..._0x3565b8[_0x2355fb(0x121)]!==undefined?{'remark':_0x3565b8[_0x2355fb(0x121)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x2355fb(0x11e),'url':UPDATE_PATH});},async 'execute'(_0x369aaf){const _0x35c2fb=a236_0x125633,_0x2d6eae=_0x369aaf[_0x35c2fb(0x124)]('id'),_0x50607e=readPatch(_0x369aaf),_0x3f59e8=await getRoleById(_0x369aaf[_0x35c2fb(0x113)],_0x2d6eae);assertCustomRole(_0x3f59e8,_0x35c2fb(0x111)),await updateAppRole({'id':_0x2d6eae,'appCode':_0x369aaf['appCode'],..._0x50607e[_0x35c2fb(0x11d)]!==undefined?{'roleName':_0x50607e[_0x35c2fb(0x11d)]}:{},..._0x50607e[_0x35c2fb(0x121)]!==undefined?{'remark':_0x50607e[_0x35c2fb(0x121)]}:{}});const _0x56f06b=await getRoleById(_0x369aaf[_0x35c2fb(0x113)],_0x2d6eae);return{'ok':!![],'data':{'scope':_0x35c2fb(0x10a),'operation':_0x35c2fb(0x111),'selector':{'appCode':_0x369aaf['appCode'],'roleId':_0x2d6eae,'roleName':_0x56f06b[_0x35c2fb(0x11d)]},'before':projectRole(_0x3f59e8),'after':projectRole(_0x56f06b),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x35c2fb(0x119)+_0x56f06b['roleName']+_0x35c2fb(0x10b)+_0x2d6eae+')'};}};
@@ -1 +1 @@
1
- const a237_0x5a59d3=a237_0x5c84;function a237_0x5c84(_0x3a0cf4,_0x7c5af8){_0x3a0cf4=_0x3a0cf4-0x75;const _0x1349f7=a237_0x1349();let _0x5c8431=_0x1349f7[_0x3a0cf4];return _0x5c8431;}(function(_0x47950e,_0x1897f1){const _0x4beea4=a237_0x5c84,_0x2e2def=_0x47950e();while(!![]){try{const _0x3b84f7=-parseInt(_0x4beea4(0x80))/0x1*(parseInt(_0x4beea4(0x83))/0x2)+parseInt(_0x4beea4(0x87))/0x3*(parseInt(_0x4beea4(0x7f))/0x4)+parseInt(_0x4beea4(0x81))/0x5*(-parseInt(_0x4beea4(0x85))/0x6)+-parseInt(_0x4beea4(0x8e))/0x7*(-parseInt(_0x4beea4(0x8d))/0x8)+-parseInt(_0x4beea4(0x76))/0x9*(-parseInt(_0x4beea4(0x7a))/0xa)+parseInt(_0x4beea4(0x88))/0xb+-parseInt(_0x4beea4(0x86))/0xc;if(_0x3b84f7===_0x1897f1)break;else _0x2e2def['push'](_0x2e2def['shift']());}catch(_0x27c684){_0x2e2def['push'](_0x2e2def['shift']());}}}(a237_0x1349,0xd4603));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a237_0x1349(){const _0x2c45e6=['\x20already\x20in\x20role\x20','POST','12MclFhZ','14437HzQmJF','2584675LkdLBm','\x20to\x20role\x20','22nlZGXo','No\x20change:\x20user\x20','6sSTIlm','25977528Rsxwdh','718173IeAizm','14948956thIJqA','userId','appCode','selector','high-risk-write','8VWxQnM','4609045YnxMZQ','role','8773407sRVqzI','Added\x20user\x20','roleName','user-add','10ahJfDp','username','roleType'];a237_0x1349=function(){return _0x2c45e6;};return a237_0x1349();}export const roleUserAdd={'service':a237_0x5a59d3(0x75),'command':a237_0x5a59d3(0x79),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a237_0x5a59d3(0x8c),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xbd61f8){const _0x77fd38=a237_0x5a59d3,{mutation:_0x149fe0}=await prepareUserMutation(_0xbd61f8,'user-add',!![]);return asDryRunResult(_0x149fe0,{'method':_0x77fd38(0x7e),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x1b52ae){const _0x4ae38d=a237_0x5a59d3,{mutation:_0x35dbff,changed:_0x3dd12e,role:_0x784608,user:_0x43c57a}=await prepareUserMutation(_0x1b52ae,_0x4ae38d(0x79),![]);return _0x3dd12e&&await createDevUserRole({'appCode':_0x1b52ae[_0x4ae38d(0x8a)],'userId':_0x43c57a[_0x4ae38d(0x89)],'username':_0x43c57a[_0x4ae38d(0x7b)],'roleType':_0x784608[_0x4ae38d(0x7c)],'roleId':_0x35dbff['selector']['roleId']}),{'ok':!![],'data':_0x35dbff,'message':_0x3dd12e?_0x4ae38d(0x77)+_0x35dbff['selector'][_0x4ae38d(0x89)]+_0x4ae38d(0x82)+_0x35dbff[_0x4ae38d(0x8b)][_0x4ae38d(0x78)]:_0x4ae38d(0x84)+_0x35dbff[_0x4ae38d(0x8b)][_0x4ae38d(0x89)]+_0x4ae38d(0x7d)+_0x35dbff[_0x4ae38d(0x8b)][_0x4ae38d(0x78)]};}};
1
+ const a237_0x577eeb=a237_0x18af;(function(_0x11d5ed,_0x29583f){const _0x2931ba=a237_0x18af,_0x182a05=_0x11d5ed();while(!![]){try{const _0x47085b=-parseInt(_0x2931ba(0xbb))/0x1*(-parseInt(_0x2931ba(0xb9))/0x2)+-parseInt(_0x2931ba(0xaf))/0x3*(parseInt(_0x2931ba(0xb1))/0x4)+-parseInt(_0x2931ba(0xa7))/0x5*(-parseInt(_0x2931ba(0xa8))/0x6)+-parseInt(_0x2931ba(0xae))/0x7+-parseInt(_0x2931ba(0xad))/0x8+parseInt(_0x2931ba(0xba))/0x9*(-parseInt(_0x2931ba(0xb6))/0xa)+parseInt(_0x2931ba(0xa9))/0xb;if(_0x47085b===_0x29583f)break;else _0x182a05['push'](_0x182a05['shift']());}catch(_0x11aed1){_0x182a05['push'](_0x182a05['shift']());}}}(a237_0xc9c5,0x43600));import{createDevUserRole}from'../../core/api-client.js';function a237_0xc9c5(){const _0x5e6646=['112zAIZpe','appCode','roleId','Added\x20user\x20','roleType','470600MjUHGD','POST','roleName','2FoRBES','90hSAbzT','110270AMxSqE','\x20already\x20in\x20role\x20','\x20to\x20role\x20','role','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','461255OjafRB','12qszgjq','20936806JBrome','No\x20change:\x20user\x20','user-add','selector','4129720tttiZu','3095393ZMKtRE','52836SGzPNk','userId'];a237_0xc9c5=function(){return _0x5e6646;};return a237_0xc9c5();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a237_0x18af(_0x2fc3f1,_0x16afdb){_0x2fc3f1=_0x2fc3f1-0xa4;const _0xc9c58e=a237_0xc9c5();let _0x18af55=_0xc9c58e[_0x2fc3f1];return _0x18af55;}export const roleUserAdd={'service':a237_0x577eeb(0xa5),'command':'user-add','description':a237_0x577eeb(0xa6),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x130eac){const _0x103fb1=a237_0x577eeb,{mutation:_0x3760d7}=await prepareUserMutation(_0x130eac,_0x103fb1(0xab),!![]);return asDryRunResult(_0x3760d7,{'method':_0x103fb1(0xb7),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x4fa35e){const _0x1b3353=a237_0x577eeb,{mutation:_0x442578,changed:_0x2719e4,role:_0x35aebf,user:_0x144e30}=await prepareUserMutation(_0x4fa35e,_0x1b3353(0xab),![]);return _0x2719e4&&await createDevUserRole({'appCode':_0x4fa35e[_0x1b3353(0xb2)],'userId':_0x144e30[_0x1b3353(0xb0)],'username':_0x144e30['username'],'roleType':_0x35aebf[_0x1b3353(0xb5)],'roleId':_0x442578['selector'][_0x1b3353(0xb3)]}),{'ok':!![],'data':_0x442578,'message':_0x2719e4?_0x1b3353(0xb4)+_0x442578[_0x1b3353(0xac)]['userId']+_0x1b3353(0xa4)+_0x442578[_0x1b3353(0xac)][_0x1b3353(0xb8)]:_0x1b3353(0xaa)+_0x442578[_0x1b3353(0xac)]['userId']+_0x1b3353(0xbc)+_0x442578[_0x1b3353(0xac)][_0x1b3353(0xb8)]};}};
@@ -1 +1 @@
1
- function a238_0xd290(_0x5ef776,_0x361343){_0x5ef776=_0x5ef776-0xb2;const _0x4c4291=a238_0x4c42();let _0xd2902c=_0x4c4291[_0x5ef776];return _0xd2902c;}function a238_0x4c42(){const _0xf14151=['72PKLcLY','user-remove','POST','29334822gxUwfb','117fvrJrS','5QrZocy','roleName','3044764CrdxZQ','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','349722UkRVRv','No\x20change:\x20user\x20','541583bfVaYf','31630zgzbUQ','2RmYHbx','userId','selector','2994693UYakPg','549707xozdUz','role'];a238_0x4c42=function(){return _0xf14151;};return a238_0x4c42();}const a238_0xc489c2=a238_0xd290;(function(_0x5e6779,_0x158da4){const _0x59f62c=a238_0xd290,_0x57c923=_0x5e6779();while(!![]){try{const _0x55faa5=-parseInt(_0x59f62c(0xb9))/0x1*(-parseInt(_0x59f62c(0xb5))/0x2)+-parseInt(_0x59f62c(0xb8))/0x3+-parseInt(_0x59f62c(0xc2))/0x4+-parseInt(_0x59f62c(0xc0))/0x5*(-parseInt(_0x59f62c(0xc4))/0x6)+parseInt(_0x59f62c(0xb3))/0x7*(-parseInt(_0x59f62c(0xbb))/0x8)+parseInt(_0x59f62c(0xbf))/0x9*(-parseInt(_0x59f62c(0xb4))/0xa)+parseInt(_0x59f62c(0xbe))/0xb;if(_0x55faa5===_0x158da4)break;else _0x57c923['push'](_0x57c923['shift']());}catch(_0x8cc630){_0x57c923['push'](_0x57c923['shift']());}}}(a238_0x4c42,0xbdece));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0xc489c2(0xba),'command':a238_0xc489c2(0xbc),'description':a238_0xc489c2(0xc3),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2b47a6){const _0x27d369=a238_0xc489c2,{mutation:_0x216757}=await prepareUserMutation(_0x2b47a6,_0x27d369(0xbc),!![]);return asDryRunResult(_0x216757,{'method':_0x27d369(0xbd),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5a5394){const _0x33c565=a238_0xc489c2,{matchingRelationIds:_0x188327,mutation:_0x47d610,changed:_0x4cca2c}=await prepareUserMutation(_0x5a5394,'user-remove',![]);if(_0x4cca2c)for(const _0x5ef420 of _0x188327){await deleteDevUserRole(_0x5ef420);}return{'ok':!![],'data':_0x47d610,'message':_0x4cca2c?'Removed\x20user\x20'+_0x47d610[_0x33c565(0xb7)]['userId']+'\x20from\x20role\x20'+_0x47d610['selector'][_0x33c565(0xc1)]:_0x33c565(0xb2)+_0x47d610[_0x33c565(0xb7)][_0x33c565(0xb6)]+'\x20not\x20in\x20role\x20'+_0x47d610[_0x33c565(0xb7)][_0x33c565(0xc1)]};}};
1
+ const a238_0x223347=a238_0xcf35;(function(_0x41758d,_0x5be8aa){const _0x3f91f7=a238_0xcf35,_0x3d2a2c=_0x41758d();while(!![]){try{const _0xbf5738=-parseInt(_0x3f91f7(0x1c5))/0x1*(-parseInt(_0x3f91f7(0x1cb))/0x2)+-parseInt(_0x3f91f7(0x1da))/0x3*(parseInt(_0x3f91f7(0x1ce))/0x4)+-parseInt(_0x3f91f7(0x1c9))/0x5*(-parseInt(_0x3f91f7(0x1d1))/0x6)+parseInt(_0x3f91f7(0x1d3))/0x7+parseInt(_0x3f91f7(0x1c8))/0x8+parseInt(_0x3f91f7(0x1d0))/0x9+parseInt(_0x3f91f7(0x1d8))/0xa*(parseInt(_0x3f91f7(0x1d2))/0xb);if(_0xbf5738===_0x5be8aa)break;else _0x3d2a2c['push'](_0x3d2a2c['shift']());}catch(_0x4932f3){_0x3d2a2c['push'](_0x3d2a2c['shift']());}}}(a238_0x4047,0x3eda7));function a238_0x4047(){const _0x1d6400=['userId','role','4iTrkBm','high-risk-write','1342845UTzSGf','1130124adQuxw','1382722oAseBz','241822xmhuKE','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','POST','selector','No\x20change:\x20user\x20','10gkLLdq','\x20not\x20in\x20role\x20','1023441oNLwYP','27LXFwae','user-remove','roleName','160888GEgrNz','5YPzqAL','\x20from\x20role\x20','5976eFgZgz'];a238_0x4047=function(){return _0x1d6400;};return a238_0x4047();}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a238_0xcf35(_0x25c955,_0x5d0847){_0x25c955=_0x25c955-0x1c5;const _0x4047a8=a238_0x4047();let _0xcf3571=_0x4047a8[_0x25c955];return _0xcf3571;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0x223347(0x1cd),'command':'user-remove','description':a238_0x223347(0x1d4),'risk':a238_0x223347(0x1cf),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x99573){const _0x2b7d5f=a238_0x223347,{mutation:_0x367d79}=await prepareUserMutation(_0x99573,_0x2b7d5f(0x1c6),!![]);return asDryRunResult(_0x367d79,{'method':_0x2b7d5f(0x1d5),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5681f3){const _0x5808a5=a238_0x223347,{matchingRelationIds:_0x5e4851,mutation:_0x322cf9,changed:_0x3eb92a}=await prepareUserMutation(_0x5681f3,_0x5808a5(0x1c6),![]);if(_0x3eb92a)for(const _0x404097 of _0x5e4851){await deleteDevUserRole(_0x404097);}return{'ok':!![],'data':_0x322cf9,'message':_0x3eb92a?'Removed\x20user\x20'+_0x322cf9['selector'][_0x5808a5(0x1cc)]+_0x5808a5(0x1ca)+_0x322cf9[_0x5808a5(0x1d6)][_0x5808a5(0x1c7)]:_0x5808a5(0x1d7)+_0x322cf9['selector'][_0x5808a5(0x1cc)]+_0x5808a5(0x1d9)+_0x322cf9[_0x5808a5(0x1d6)][_0x5808a5(0x1c7)]};}};
@@ -1 +1 @@
1
- const a239_0x2fb4ba=a239_0x1b5e;(function(_0x13c649,_0x409e8c){const _0x581d8a=a239_0x1b5e,_0x2cc054=_0x13c649();while(!![]){try{const _0x3d3397=-parseInt(_0x581d8a(0xbe))/0x1+parseInt(_0x581d8a(0xc7))/0x2+-parseInt(_0x581d8a(0xcc))/0x3+-parseInt(_0x581d8a(0xb8))/0x4*(parseInt(_0x581d8a(0xcb))/0x5)+parseInt(_0x581d8a(0xbf))/0x6*(parseInt(_0x581d8a(0xc3))/0x7)+-parseInt(_0x581d8a(0xc8))/0x8*(parseInt(_0x581d8a(0xc6))/0x9)+parseInt(_0x581d8a(0xbc))/0xa*(parseInt(_0x581d8a(0xc2))/0xb);if(_0x3d3397===_0x409e8c)break;else _0x2cc054['push'](_0x2cc054['shift']());}catch(_0x4bec1e){_0x2cc054['push'](_0x2cc054['shift']());}}}(a239_0x375e,0x4fc5b));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a239_0x375e(){const _0x297513=['name','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','638xaRlQA','14EsNFoa','\x22\x20→\x20userId\x20','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','9eLGdHM','225940tMqbsG','1786696yBXSMU','matchedBy','trim','2360ompipQ','1605453zxDUmO','4596tMwiqu','userId','str','flagMissing','256510ZaXNCs','user-resolve','312409PBdobq','1017732mWSLWQ'];a239_0x375e=function(){return _0x297513;};return a239_0x375e();}function a239_0x1b5e(_0x115b7a,_0x30149d){_0x115b7a=_0x115b7a-0xb8;const _0x375eb4=a239_0x375e();let _0x1b5e5e=_0x375eb4[_0x115b7a];return _0x1b5e5e;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':a239_0x2fb4ba(0xbd),'description':a239_0x2fb4ba(0xc5),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x28f268){const _0x1c1daa=a239_0x2fb4ba;if(!_0x28f268[_0x1c1daa(0xba)]('name')[_0x1c1daa(0xca)]())throw CliErrors[_0x1c1daa(0xbb)](_0x1c1daa(0xc0),'Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0xee2862){const _0x4d223b=a239_0x2fb4ba,_0x1f9420=_0xee2862[_0x4d223b(0xba)](_0x4d223b(0xc0))['trim'](),_0x5bd558=await resolveUserRef(_0x1f9420,_0x4d223b(0xc1));return{'ok':!![],'data':{'user':{'userId':_0x5bd558['userId'],'username':_0x5bd558['username'],'nickname':_0x5bd558['nickname'],'matchedBy':_0x5bd558[_0x4d223b(0xc9)]}},'message':'Resolved\x20\x22'+_0x1f9420+_0x4d223b(0xc4)+_0x5bd558[_0x4d223b(0xb9)]};}};
1
+ function a239_0x14bf(_0x15fec1,_0x30d634){_0x15fec1=_0x15fec1-0xf2;const _0x5a91cb=a239_0x5a91();let _0x14bf73=_0x5a91cb[_0x15fec1];return _0x14bf73;}function a239_0x5a91(){const _0x327ee5=['13715046bvikaC','55567900xfBSDe','userId','user-resolve','18grdHqe','148LQAnrH','role','68182SPuVrO','559118wRZBnP','name','24QWdVey','Pass\x20--name\x20<nickname|username>.','\x22\x20→\x20userId\x20','read','194205gzXocA','281920RDzBQQ','matchedBy','Resolved\x20\x22','str','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','8191904afplYO','username'];a239_0x5a91=function(){return _0x327ee5;};return a239_0x5a91();}const a239_0x2409cd=a239_0x14bf;(function(_0x4a257a,_0x21911c){const _0x571af7=a239_0x14bf,_0x2aeeea=_0x4a257a();while(!![]){try{const _0x359a78=-parseInt(_0x571af7(0xf4))/0x1+-parseInt(_0x571af7(0x102))/0x2*(parseInt(_0x571af7(0x105))/0x3)+-parseInt(_0x571af7(0x100))/0x4*(parseInt(_0x571af7(0xf3))/0x5)+-parseInt(_0x571af7(0xff))/0x6*(parseInt(_0x571af7(0x103))/0x7)+-parseInt(_0x571af7(0xf9))/0x8+-parseInt(_0x571af7(0xfb))/0x9+parseInt(_0x571af7(0xfc))/0xa;if(_0x359a78===_0x21911c)break;else _0x2aeeea['push'](_0x2aeeea['shift']());}catch(_0x126d9e){_0x2aeeea['push'](_0x2aeeea['shift']());}}}(a239_0x5a91,0xbdd31));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x2409cd(0x101),'command':a239_0x2409cd(0xfe),'description':a239_0x2409cd(0xf8),'risk':a239_0x2409cd(0xf2),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x417484){const _0x34956a=a239_0x2409cd;if(!_0x417484[_0x34956a(0xf7)]('name')['trim']())throw CliErrors['flagMissing']('name',_0x34956a(0x106));},async 'execute'(_0x839c23){const _0x251c9c=a239_0x2409cd,_0x5daa29=_0x839c23[_0x251c9c(0xf7)](_0x251c9c(0x104))['trim'](),_0x2a3174=await resolveUserRef(_0x5daa29,'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':_0x2a3174['userId'],'username':_0x2a3174[_0x251c9c(0xfa)],'nickname':_0x2a3174['nickname'],'matchedBy':_0x2a3174[_0x251c9c(0xf5)]}},'message':_0x251c9c(0xf6)+_0x5daa29+_0x251c9c(0x107)+_0x2a3174[_0x251c9c(0xfd)]};}};
@@ -1 +1 @@
1
- const a240_0x9ee366=a240_0x21b1;function a240_0x21b1(_0x5b6648,_0x2c1eb6){_0x5b6648=_0x5b6648-0x18a;const _0x1f23c5=a240_0x1f23();let _0x21b1ce=_0x1f23c5[_0x5b6648];return _0x21b1ce;}(function(_0x1d34bd,_0x4d8b18){const _0x2b0f6b=a240_0x21b1,_0x45e927=_0x1d34bd();while(!![]){try{const _0x4068e1=-parseInt(_0x2b0f6b(0x199))/0x1*(parseInt(_0x2b0f6b(0x190))/0x2)+parseInt(_0x2b0f6b(0x18e))/0x3*(parseInt(_0x2b0f6b(0x18f))/0x4)+-parseInt(_0x2b0f6b(0x194))/0x5*(parseInt(_0x2b0f6b(0x191))/0x6)+-parseInt(_0x2b0f6b(0x195))/0x7*(parseInt(_0x2b0f6b(0x193))/0x8)+parseInt(_0x2b0f6b(0x18b))/0x9+-parseInt(_0x2b0f6b(0x18c))/0xa+parseInt(_0x2b0f6b(0x18d))/0xb*(parseInt(_0x2b0f6b(0x19b))/0xc);if(_0x4068e1===_0x4d8b18)break;else _0x45e927['push'](_0x45e927['shift']());}catch(_0x45c3e3){_0x45e927['push'](_0x45e927['shift']());}}}(a240_0x1f23,0x4b099));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':'get','description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':a240_0x9ee366(0x19d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x59f0a9){readAppRuleType(_0x59f0a9);},async 'execute'(_0x6b0df7){const _0x4852d0=a240_0x9ee366,_0x344297=readAppRuleType(_0x6b0df7),_0x40e253=await getAppRule(_0x6b0df7[_0x4852d0(0x19a)],{'appCode':_0x6b0df7[_0x4852d0(0x197)],'type':_0x344297});if(!_0x40e253)throw appRuleError('app_rule_not_found',appRuleFileName(_0x344297)+_0x4852d0(0x18a)+_0x6b0df7[_0x4852d0(0x197)]+'.',_0x4852d0(0x19c)+_0x344297+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x344297,_0x40e253),'content':_0x40e253[_0x4852d0(0x192)]}},'message':_0x4852d0(0x196)+appRuleFileName(_0x344297)+_0x4852d0(0x198)+_0x6b0df7[_0x4852d0(0x197)]};}};function a240_0x1f23(){const _0x21e1c5=['47407BOkddt','cookie','6038676ldFqma','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','read','\x20is\x20not\x20configured\x20for\x20app\x20','383220hhwequ','844670TVIKQU','11ARmPXv','5820vjrybG','1132vPvzBg','6UkDHAs','2406QpzcYO','content','88OHTkpa','4215XWsosh','141743BUvphd','Loaded\x20','appCode','\x20for\x20'];a240_0x1f23=function(){return _0x21e1c5;};return a240_0x1f23();}
1
+ const a240_0xefb1ab=a240_0x19e8;(function(_0xd3665b,_0x30f1a8){const _0x4c194f=a240_0x19e8,_0x36db62=_0xd3665b();while(!![]){try{const _0x55a2f8=parseInt(_0x4c194f(0xb7))/0x1*(parseInt(_0x4c194f(0xb5))/0x2)+parseInt(_0x4c194f(0xb3))/0x3+-parseInt(_0x4c194f(0xbb))/0x4+parseInt(_0x4c194f(0xb4))/0x5+-parseInt(_0x4c194f(0xb8))/0x6+parseInt(_0x4c194f(0xb2))/0x7+-parseInt(_0x4c194f(0xba))/0x8;if(_0x55a2f8===_0x30f1a8)break;else _0x36db62['push'](_0x36db62['shift']());}catch(_0x1018a3){_0x36db62['push'](_0x36db62['shift']());}}}(a240_0x14cf,0xb5c54));function a240_0x14cf(){const _0x9ad917=['rule','\x20for\x20','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','read','cookie','content','7355761HGixxs','3443145bUngPI','2316020BdDbiy','4vZOtjO','\x20--file\x20<path>\x20--dry-run`.','462556hMlCPw','2619522YYGXyn','appCode','17836872CgWqGN','704504VpdfNL','\x20is\x20not\x20configured\x20for\x20app\x20','Loaded\x20','app_rule_not_found','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app'];a240_0x14cf=function(){return _0x9ad917;};return a240_0x14cf();}function a240_0x19e8(_0x1c9a12,_0x71349b){_0x1c9a12=_0x1c9a12-0xac;const _0x14cf09=a240_0x14cf();let _0x19e8bd=_0x14cf09[_0x1c9a12];return _0x19e8bd;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0xefb1ab(0xac),'command':'get','description':a240_0xefb1ab(0xbf),'risk':a240_0xefb1ab(0xaf),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x4d6f64){readAppRuleType(_0x4d6f64);},async 'execute'(_0x5cc216){const _0x38cf12=a240_0xefb1ab,_0x32cd24=readAppRuleType(_0x5cc216),_0x98a628=await getAppRule(_0x5cc216[_0x38cf12(0xb0)],{'appCode':_0x5cc216[_0x38cf12(0xb9)],'type':_0x32cd24});if(!_0x98a628)throw appRuleError(_0x38cf12(0xbe),appRuleFileName(_0x32cd24)+_0x38cf12(0xbc)+_0x5cc216[_0x38cf12(0xb9)]+'.',_0x38cf12(0xae)+_0x32cd24+_0x38cf12(0xb6));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x32cd24,_0x98a628),'content':_0x98a628[_0x38cf12(0xb1)]}},'message':_0x38cf12(0xbd)+appRuleFileName(_0x32cd24)+_0x38cf12(0xad)+_0x5cc216[_0x38cf12(0xb9)]};}};
@@ -1 +1 @@
1
- function a241_0x5d25(_0x5b98da,_0x147554){_0x5b98da=_0x5b98da-0x7b;const _0x27fe3f=a241_0x27fe();let _0x5d256b=_0x27fe3f[_0x5b98da];return _0x5d256b;}const a241_0x689b2b=a241_0x5d25;(function(_0x1c73cc,_0x141bb2){const _0x1b1b7f=a241_0x5d25,_0x48345d=_0x1c73cc();while(!![]){try{const _0x38f3f9=-parseInt(_0x1b1b7f(0x85))/0x1+parseInt(_0x1b1b7f(0x84))/0x2*(-parseInt(_0x1b1b7f(0x86))/0x3)+parseInt(_0x1b1b7f(0x88))/0x4*(-parseInt(_0x1b1b7f(0x81))/0x5)+parseInt(_0x1b1b7f(0x83))/0x6+-parseInt(_0x1b1b7f(0x7d))/0x7*(parseInt(_0x1b1b7f(0x82))/0x8)+parseInt(_0x1b1b7f(0x7f))/0x9+parseInt(_0x1b1b7f(0x7b))/0xa;if(_0x38f3f9===_0x141bb2)break;else _0x48345d['push'](_0x48345d['shift']());}catch(_0x2429df){_0x48345d['push'](_0x48345d['shift']());}}}(a241_0x27fe,0xc95e1));import{withKbManagementSession}from'../../core/kb-management-client.js';function a241_0x27fe(){const _0x38fd01=['2997828hHIcHN','execute','2095924vlwONZ','28252720amROrB','dryRun','343wqMKlE','signal','8072082UDObcZ','map','5suqhmA','195536ajcwNs','7602276lkdnkm','2EeEsQb','1443500sanWzj'];a241_0x27fe=function(){return _0x38fd01;};return a241_0x27fe();}import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x689b2b(0x80)](_0x53ec3e=>({..._0x53ec3e,'execute':_0x57afdd=>withKbManagementSession(_0x57afdd[a241_0x689b2b(0x7e)],()=>_0x53ec3e[a241_0x689b2b(0x87)](_0x57afdd)),..._0x53ec3e[a241_0x689b2b(0x7c)]?{'dryRun':_0x38c239=>withKbManagementSession(_0x38c239['signal'],()=>_0x53ec3e[a241_0x689b2b(0x7c)](_0x38c239))}:{}}));
1
+ const a241_0x5a01d1=a241_0x4513;(function(_0x29057b,_0x530efd){const _0x37bfa9=a241_0x4513,_0x40c2bd=_0x29057b();while(!![]){try{const _0x444bf8=parseInt(_0x37bfa9(0x1b6))/0x1*(-parseInt(_0x37bfa9(0x1bd))/0x2)+-parseInt(_0x37bfa9(0x1be))/0x3*(-parseInt(_0x37bfa9(0x1b2))/0x4)+-parseInt(_0x37bfa9(0x1b5))/0x5*(parseInt(_0x37bfa9(0x1b1))/0x6)+parseInt(_0x37bfa9(0x1b9))/0x7+-parseInt(_0x37bfa9(0x1b8))/0x8*(-parseInt(_0x37bfa9(0x1bc))/0x9)+-parseInt(_0x37bfa9(0x1b4))/0xa*(parseInt(_0x37bfa9(0x1ba))/0xb)+-parseInt(_0x37bfa9(0x1b0))/0xc*(-parseInt(_0x37bfa9(0x1bb))/0xd);if(_0x444bf8===_0x530efd)break;else _0x40c2bd['push'](_0x40c2bd['shift']());}catch(_0x37e282){_0x40c2bd['push'](_0x40c2bd['shift']());}}}(a241_0x1d07,0xdf841));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';function a241_0x4513(_0x1432a4,_0x59e8ea){_0x1432a4=_0x1432a4-0x1ae;const _0x1d0736=a241_0x1d07();let _0x451380=_0x1d0736[_0x1432a4];return _0x451380;}function a241_0x1d07(){const _0x2acd12=['execute','dryRun','5820bwIHSK','6nTSlUZ','16UGUBgs','signal','5841140oGOWYM','1727295uhPmqX','96349KbHcoS','map','1215352rfnRoU','6607839tKMxng','33zVFLoa','28691ZHIcvL','45ViISFZ','2XNciZQ','251778DBqmqy'];a241_0x1d07=function(){return _0x2acd12;};return a241_0x1d07();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x5a01d1(0x1b7)](_0x1ef5b9=>({..._0x1ef5b9,'execute':_0x1ac6c7=>withKbManagementSession(_0x1ac6c7['signal'],()=>_0x1ef5b9[a241_0x5a01d1(0x1ae)](_0x1ac6c7)),..._0x1ef5b9[a241_0x5a01d1(0x1af)]?{'dryRun':_0x102617=>withKbManagementSession(_0x102617[a241_0x5a01d1(0x1b3)],()=>_0x1ef5b9[a241_0x5a01d1(0x1af)](_0x102617))}:{}}));
@@ -1 +1 @@
1
- const a242_0x1f562a=a242_0x18c1;(function(_0xa0fc95,_0x1494e1){const _0x4134db=a242_0x18c1,_0x4f0478=_0xa0fc95();while(!![]){try{const _0x1b1db7=-parseInt(_0x4134db(0xfa))/0x1*(parseInt(_0x4134db(0xf0))/0x2)+-parseInt(_0x4134db(0xfe))/0x3+parseInt(_0x4134db(0xf9))/0x4+-parseInt(_0x4134db(0xfb))/0x5+-parseInt(_0x4134db(0xff))/0x6+-parseInt(_0x4134db(0xfd))/0x7*(parseInt(_0x4134db(0xef))/0x8)+parseInt(_0x4134db(0xf6))/0x9;if(_0x1b1db7===_0x1494e1)break;else _0x4f0478['push'](_0x4f0478['shift']());}catch(_0x228918){_0x4f0478['push'](_0x4f0478['shift']());}}}(a242_0x3c0b,0xa2123));function a242_0x3c0b(){const _0x24fc21=['8278JgUIGr','5093905ELegch','list','7JAtRTk','3469080DSlegr','1578906xfwXxs','6669304iUitIz','286gEGCvS','cookie','map','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','length','appCode','41469831Etbkic','Loaded\x20app\x20rule\x20configuration\x20for\x20','rule','2047172DKloaq'];a242_0x3c0b=function(){return _0x24fc21;};return a242_0x3c0b();}function a242_0x18c1(_0x1b8e05,_0x1cc2b4){_0x1b8e05=_0x1b8e05-0xef;const _0x3c0b47=a242_0x3c0b();let _0x18c16a=_0x3c0b47[_0x1b8e05];return _0x18c16a;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x1f562a(0xf8),'command':a242_0x1f562a(0xfc),'description':a242_0x1f562a(0xf3),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x23557e){const _0xa93b10=a242_0x1f562a,_0x1b2650=await Promise['all'](APP_RULE_TYPES[_0xa93b10(0xf2)](_0x4f8fe6=>getAppRule(_0x23557e[_0xa93b10(0xf1)],{'appCode':_0x23557e[_0xa93b10(0xf5)],'type':_0x4f8fe6}))),_0x491d49=APP_RULE_TYPES[_0xa93b10(0xf2)]((_0xf1411e,_0x138246)=>projectAppRule(_0xf1411e,_0x1b2650[_0x138246]??null));return{'ok':!![],'data':{'total':_0x491d49[_0xa93b10(0xf4)],'rules':_0x491d49},'message':_0xa93b10(0xf7)+_0x23557e[_0xa93b10(0xf5)]};}};
1
+ const a242_0x4da0da=a242_0x2212;function a242_0x4ab4(){const _0xf2973a=['rule','cookie','762081EbgumW','16wsHHcs','read','6137256mEDREe','list','all','59717kLNfTd','Loaded\x20app\x20rule\x20configuration\x20for\x20','877108wstNGr','882wFzhsP','length','14319891obioPd','1162554EONIMR','appCode','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','map','1883885xqMzML'];a242_0x4ab4=function(){return _0xf2973a;};return a242_0x4ab4();}function a242_0x2212(_0x57e359,_0x54666a){_0x57e359=_0x57e359-0x1ca;const _0x4ab433=a242_0x4ab4();let _0x221253=_0x4ab433[_0x57e359];return _0x221253;}(function(_0x3dd2fa,_0x1b2ee4){const _0x326477=a242_0x2212,_0x251242=_0x3dd2fa();while(!![]){try{const _0x2496fc=parseInt(_0x326477(0x1cb))/0x1+-parseInt(_0x326477(0x1da))/0x2+parseInt(_0x326477(0x1d2))/0x3+parseInt(_0x326477(0x1d5))/0x4+parseInt(_0x326477(0x1cf))/0x5+-parseInt(_0x326477(0x1db))/0x6*(-parseInt(_0x326477(0x1d8))/0x7)+parseInt(_0x326477(0x1d3))/0x8*(-parseInt(_0x326477(0x1ca))/0x9);if(_0x2496fc===_0x1b2ee4)break;else _0x251242['push'](_0x251242['shift']());}catch(_0x4c2547){_0x251242['push'](_0x251242['shift']());}}}(a242_0x4ab4,0xea9d1));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x4da0da(0x1d0),'command':a242_0x4da0da(0x1d6),'description':a242_0x4da0da(0x1cd),'risk':a242_0x4da0da(0x1d4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x3e02db){const _0x41e2fb=a242_0x4da0da,_0x58e48a=await Promise[_0x41e2fb(0x1d7)](APP_RULE_TYPES[_0x41e2fb(0x1ce)](_0x1aa2bd=>getAppRule(_0x3e02db[_0x41e2fb(0x1d1)],{'appCode':_0x3e02db['appCode'],'type':_0x1aa2bd}))),_0x3907af=APP_RULE_TYPES['map']((_0x26c9b6,_0x5183cb)=>projectAppRule(_0x26c9b6,_0x58e48a[_0x5183cb]??null));return{'ok':!![],'data':{'total':_0x3907af[_0x41e2fb(0x1dc)],'rules':_0x3907af},'message':_0x41e2fb(0x1d9)+_0x3e02db[_0x41e2fb(0x1cc)]};}};
@@ -1 +1 @@
1
- function a243_0x4c1c(){const _0x207ae0=['Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','file','expected-version','12zWghQS','app_rule_verification_failed','cookie',';\x20current\x20version\x20is\x20','\x20version\x20changed\x20before\x20write.','flag','460884IlTMRY','POST','before','The\x20set\x20request\x20was\x20sent,\x20but\x20','DATABASE','5825865GBQfAO','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','unconfigured','create','type','version','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','set','defineProperty','716588StjGsB','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','rabetbase\x20rule\x20get\x20--type\x20','--file\x20is\x20required.','replacement','app_rule_set_outcome_unknown','app_rule_content_too_large','trim','2OkxlEu','app_rule_verification_unavailable','expectedVersion','\x20could\x20not\x20be\x20verified.','contentHash','string','UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)','write','input','19481LVqBhP','isSafeInteger','update','appCode','beforeRecord','verified','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','28EdLxjK','byteSize','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','18228wJvbZm','content','1685994qLvUrk','13350490liLoCI','RULES','9431472LMqvQT','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','rules','\x20for\x20','Pass\x20a\x20UTF-8\x20Markdown\x20file.','Expected\x20','app_rule_file_required','9mHtvod','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set'];a243_0x4c1c=function(){return _0x207ae0;};return a243_0x4c1c();}const a243_0x29ae8e=a243_0x484f;(function(_0x5acf1d,_0x5b9b7f){const _0x1e5724=a243_0x484f,_0x35f800=_0x5acf1d();while(!![]){try{const _0xc69b78=-parseInt(_0x1e5724(0x19d))/0x1*(-parseInt(_0x1e5724(0x1a6))/0x2)+parseInt(_0x1e5724(0x18f))/0x3*(-parseInt(_0x1e5724(0x189))/0x4)+-parseInt(_0x1e5724(0x194))/0x5+-parseInt(_0x1e5724(0x1bb))/0x6*(parseInt(_0x1e5724(0x1b6))/0x7)+-parseInt(_0x1e5724(0x1be))/0x8+-parseInt(_0x1e5724(0x184))/0x9*(-parseInt(_0x1e5724(0x1bc))/0xa)+parseInt(_0x1e5724(0x1af))/0xb*(parseInt(_0x1e5724(0x1b9))/0xc);if(_0xc69b78===_0x5b9b7f)break;else _0x35f800['push'](_0x35f800['shift']());}catch(_0x3a10a5){_0x35f800['push'](_0x35f800['shift']());}}}(a243_0x4c1c,0xc66ff));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0x3c185f){const _0x1e825e=a243_0x484f,_0xf852d1=readAppRuleType(_0x3c185f),_0x2dea44=_0x3c185f['str'](_0x1e825e(0x187))[_0x1e825e(0x1a5)]();if(!_0x2dea44)throw appRuleError(_0x1e825e(0x183),_0x1e825e(0x1a1),_0x1e825e(0x1c2));const _0x5ae5d4=_0x3c185f[_0x1e825e(0x18e)]('expected-version');let _0x62a1dc;if(_0x5ae5d4!==undefined){_0x62a1dc=Number(_0x5ae5d4);if(!Number[_0x1e825e(0x1b0)](_0x62a1dc)||_0x62a1dc<0x0)throw appRuleError('app_rule_expected_version_invalid',_0x1e825e(0x1b8));}return{'type':_0xf852d1,'file':_0x2dea44,'expectedVersion':_0x62a1dc};}async function prepareSet(_0x51ecd0){const _0x38b423=a243_0x484f,_0x218674=readSetInput(_0x51ecd0),_0x43941c=await readAppRuleFile(_0x218674['file']);if(_0x218674[_0x38b423(0x198)]===_0x38b423(0x1c0)&&_0x43941c[_0x38b423(0x1ba)]['length']>0x7d0)throw appRuleError(_0x38b423(0x1a4),_0x38b423(0x19e));const _0x5de74a=await getAppRule(_0x51ecd0['cookie'],{'appCode':_0x51ecd0['appCode'],'type':_0x218674[_0x38b423(0x198)]});if(_0x218674[_0x38b423(0x1a8)]!==undefined&&(_0x5de74a?.[_0x38b423(0x199)]??0x0)!==_0x218674[_0x38b423(0x1a8)])throw appRuleError('app_rule_version_mismatch',appRuleFileName(_0x218674[_0x38b423(0x198)])+_0x38b423(0x18d),_0x38b423(0x1c3)+_0x218674[_0x38b423(0x1a8)]+_0x38b423(0x18c)+(_0x5de74a?.[_0x38b423(0x199)]??_0x38b423(0x196))+'.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.');return{'input':_0x218674,'replacement':_0x43941c,'beforeRecord':_0x5de74a,'before':projectAppRule(_0x218674[_0x38b423(0x198)],_0x5de74a),'planned':{'type':_0x218674['type'],'fileName':appRuleFileName(_0x218674[_0x38b423(0x198)]),'contextScope':appRuleContextScope(_0x218674[_0x38b423(0x198)]),'enabled':!![],'appCode':_0x51ecd0[_0x38b423(0x1b2)],'scope':_0x38b423(0x1c0),'contentByteSize':_0x43941c[_0x38b423(0x1b7)],'contentHash':_0x43941c[_0x38b423(0x1aa)]}};}function warningsFor(_0x47e968){return[];}function a243_0x484f(_0x4d3fe0,_0x98d6ba){_0x4d3fe0=_0x4d3fe0-0x183;const _0x4c1cf9=a243_0x4c1c();let _0x484f9c=_0x4c1cf9[_0x4d3fe0];return _0x484f9c;}export const ruleSet={'service':'rule','command':a243_0x29ae8e(0x19b),'description':a243_0x29ae8e(0x186),'risk':a243_0x29ae8e(0x1ad),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x29ae8e(0x187),'type':a243_0x29ae8e(0x1ab),'required':!![],'description':a243_0x29ae8e(0x1ac)},{'name':a243_0x29ae8e(0x188),'type':'number','required':![],'description':a243_0x29ae8e(0x185)}],async 'validate'(_0x505a81){readSetInput(_0x505a81);},async 'dryRun'(_0x241b68){const _0x146ad1=a243_0x29ae8e,_0x5aca7c=await prepareSet(_0x241b68);return asDryRunResult({'operation':_0x146ad1(0x19b),'selector':{'appCode':_0x241b68[_0x146ad1(0x1b2)],'scope':_0x146ad1(0x1c0),'type':_0x5aca7c['input'][_0x146ad1(0x198)]},'before':_0x5aca7c[_0x146ad1(0x191)],'after':_0x5aca7c['planned'],'dryRun':!![],'backend':{'method':_0x146ad1(0x190),'path':knowledgeDocumentsPath('rules',_0x5aca7c[_0x146ad1(0x1b3)]?_0x146ad1(0x1b1):_0x146ad1(0x197)),'body':{'appCode':_0x241b68[_0x146ad1(0x1b2)],..._0x5aca7c['beforeRecord']?{'id':_0x5aca7c['beforeRecord']['id']}:{},'title':_0x5aca7c[_0x146ad1(0x1ae)]['type']===_0x146ad1(0x1c0)?_0x146ad1(0x1bd):_0x146ad1(0x193),'contentHash':_0x5aca7c[_0x146ad1(0x1a2)][_0x146ad1(0x1aa)],'contentByteSize':_0x5aca7c['replacement'][_0x146ad1(0x1b7)],..._0x5aca7c[_0x146ad1(0x1b3)]?{'expectedVersion':_0x5aca7c['beforeRecord']['version']}:{}}},'warnings':warningsFor(_0x5aca7c[_0x146ad1(0x1ae)]['expectedVersion']),'verification':{'expectedVersion':_0x5aca7c[_0x146ad1(0x1b3)]?.[_0x146ad1(0x199)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x146ad1(0x1a0)+_0x5aca7c['input'][_0x146ad1(0x198)]+'\x20--format\x20compress'}},{'method':_0x146ad1(0x190),'url':knowledgeDocumentsPath(_0x146ad1(0x1c0),_0x5aca7c[_0x146ad1(0x1b3)]?_0x146ad1(0x1b1):_0x146ad1(0x197))});},async 'execute'(_0x4ede9f){const _0x26f7dc=a243_0x29ae8e,_0xbc2c2b=await prepareSet(_0x4ede9f),_0x26065f=_0xbc2c2b[_0x26f7dc(0x1b3)]===null?0x1:_0xbc2c2b[_0x26f7dc(0x1b3)]['version']+(_0xbc2c2b[_0x26f7dc(0x1b3)][_0x26f7dc(0x1ba)]===_0xbc2c2b[_0x26f7dc(0x1a2)]['content']?0x0:0x1);let _0x35a2df,_0x1400fc=![];try{_0x35a2df=await saveAppRule(_0x4ede9f['cookie'],{'appCode':_0x4ede9f[_0x26f7dc(0x1b2)],'type':_0xbc2c2b[_0x26f7dc(0x1ae)][_0x26f7dc(0x198)],'content':_0xbc2c2b[_0x26f7dc(0x1a2)][_0x26f7dc(0x1ba)],'expectedVersion':_0xbc2c2b[_0x26f7dc(0x1b3)]?.[_0x26f7dc(0x199)]??0x0,..._0xbc2c2b[_0x26f7dc(0x1b3)]?{'id':_0xbc2c2b[_0x26f7dc(0x1b3)]['id']}:{}});if(_0x35a2df[_0x26f7dc(0x199)]!==_0x26065f||_0x35a2df[_0x26f7dc(0x1ba)]!==_0xbc2c2b['replacement']['content']||_0xbc2c2b['beforeRecord']!==null&&_0x35a2df['id']!==_0xbc2c2b[_0x26f7dc(0x1b3)]['id'])throw appRuleError('app_rule_verification_failed',_0x26f7dc(0x19a),'Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.');}catch(_0x3b00d6){if(!isPlatformTransportFailure(_0x3b00d6))throw _0x3b00d6;_0x1400fc=!![];}let _0x31ddd6;try{_0x31ddd6=await getAppRule(_0x4ede9f[_0x26f7dc(0x18b)],{'appCode':_0x4ede9f['appCode'],'type':_0xbc2c2b[_0x26f7dc(0x1ae)]['type']});}catch(_0x5b0e19){const _0x576e26=appRuleError(_0x1400fc?_0x26f7dc(0x1a3):_0x26f7dc(0x1a7),_0x26f7dc(0x192)+appRuleFileName(_0xbc2c2b[_0x26f7dc(0x1ae)]['type'])+_0x26f7dc(0x1a9),_0x26f7dc(0x1b5));Object[_0x26f7dc(0x19c)](_0x576e26,'cause',{'value':_0x5b0e19,'enumerable':![]});throw _0x576e26;}const _0x599817=_0x31ddd6&&inspectAppRuleContent(_0x31ddd6[_0x26f7dc(0x1ba)])['contentHash']===_0xbc2c2b[_0x26f7dc(0x1a2)][_0x26f7dc(0x1aa)],_0x312d3f=_0x31ddd6&&_0x31ddd6[_0x26f7dc(0x199)]===_0x26065f&&(!_0x35a2df||_0x31ddd6['id']===_0x35a2df['id']&&_0x31ddd6[_0x26f7dc(0x199)]===_0x35a2df[_0x26f7dc(0x199)]);if(!_0x31ddd6||!_0x599817||!_0x312d3f||_0xbc2c2b[_0x26f7dc(0x1b3)]!==null&&_0x31ddd6['id']!==_0xbc2c2b[_0x26f7dc(0x1b3)]['id'])throw appRuleError(_0x1400fc?'app_rule_set_outcome_unknown':_0x26f7dc(0x18a),appRuleFileName(_0xbc2c2b['input'][_0x26f7dc(0x198)])+'\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.',_0x26f7dc(0x1bf)+_0xbc2c2b[_0x26f7dc(0x1ae)][_0x26f7dc(0x198)]+_0x26f7dc(0x195));const _0x320160=warningsFor(_0xbc2c2b['input']['expectedVersion']);_0x1400fc&&_0x320160['push'](_0x26f7dc(0x19f));const _0x5ae8dc=projectAppRule(_0xbc2c2b['input'][_0x26f7dc(0x198)],_0x31ddd6);return{'ok':!![],'data':{'operation':_0x26f7dc(0x19b),'selector':{'appCode':_0x4ede9f[_0x26f7dc(0x1b2)],'scope':_0x26f7dc(0x1c0),'type':_0xbc2c2b[_0x26f7dc(0x1ae)]['type']},'before':_0xbc2c2b[_0x26f7dc(0x191)],'after':_0x5ae8dc,'dryRun':![],'backend':{'method':'POST','path':knowledgeDocumentsPath('rules',_0xbc2c2b[_0x26f7dc(0x1b3)]?_0x26f7dc(0x1b1):'create')},'warnings':_0x320160,'verification':{'status':_0x26f7dc(0x1b4),'recoveredAfterUnknownResponse':_0x1400fc,'expectedVersion':_0xbc2c2b[_0x26f7dc(0x1b3)]?.[_0x26f7dc(0x199)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x26f7dc(0x1a0)+_0xbc2c2b[_0x26f7dc(0x1ae)][_0x26f7dc(0x198)]+'\x20--format\x20compress'}},'message':'Set\x20'+appRuleFileName(_0xbc2c2b[_0x26f7dc(0x1ae)][_0x26f7dc(0x198)])+_0x26f7dc(0x1c1)+_0x4ede9f[_0x26f7dc(0x1b2)]};}};
1
+ const a243_0x3f3639=a243_0x3d3c;(function(_0x456dd0,_0x19fcf9){const _0x5d082f=a243_0x3d3c,_0x468181=_0x456dd0();while(!![]){try{const _0x448c86=parseInt(_0x5d082f(0x142))/0x1*(-parseInt(_0x5d082f(0x145))/0x2)+-parseInt(_0x5d082f(0x11a))/0x3+parseInt(_0x5d082f(0x129))/0x4+-parseInt(_0x5d082f(0x148))/0x5*(-parseInt(_0x5d082f(0x14c))/0x6)+-parseInt(_0x5d082f(0x127))/0x7+parseInt(_0x5d082f(0x115))/0x8*(-parseInt(_0x5d082f(0x12c))/0x9)+parseInt(_0x5d082f(0x125))/0xa;if(_0x448c86===_0x19fcf9)break;else _0x468181['push'](_0x468181['shift']());}catch(_0x4ce1bb){_0x468181['push'](_0x468181['shift']());}}}(a243_0x4119,0x43e5b));function a243_0x4119(){const _0x196a3b=['\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','file','string',';\x20current\x20version\x20is\x20','\x20for\x20','number','Expected\x20','cookie','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','app_rule_expected_version_invalid','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','content','app_rule_verification_failed','rules','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','str','push','2399DEZOYn','unconfigured','planned','88XGLTOP','appCode','expectedVersion','11945drfVfF','\x20--format\x20compress','type','before','1050xMzSEO','replacement','contentHash','trim','beforeRecord','version','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','2592536VtmQTN','UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)','POST','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','rule','1525797zwnzqe','expected-version','The\x20set\x20request\x20was\x20sent,\x20but\x20','create','\x20version\x20changed\x20before\x20write.','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','byteSize','--file\x20is\x20required.','app_rule_set_outcome_unknown','flag','input','8533170SAElHG','rabetbase\x20rule\x20get\x20--type\x20','1518076OxJBMX','isSafeInteger','647220rgEhFh','Set\x20','update','9CvmZqO','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','DATABASE'];a243_0x4119=function(){return _0x196a3b;};return a243_0x4119();}import{knowledgeDocumentsPath}from'../../core/api-client.js';function a243_0x3d3c(_0x58f1d5,_0xed2b65){_0x58f1d5=_0x58f1d5-0x112;const _0x411923=a243_0x4119();let _0x3d3cfb=_0x411923[_0x58f1d5];return _0x3d3cfb;}import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0x34d28a){const _0x23088a=a243_0x3d3c,_0x3d35f6=readAppRuleType(_0x34d28a),_0x53f610=_0x34d28a[_0x23088a(0x140)](_0x23088a(0x130))[_0x23088a(0x14f)]();if(!_0x53f610)throw appRuleError('app_rule_file_required',_0x23088a(0x121),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x43f723=_0x34d28a[_0x23088a(0x123)](_0x23088a(0x11b));let _0x4c171d;if(_0x43f723!==undefined){_0x4c171d=Number(_0x43f723);if(!Number[_0x23088a(0x128)](_0x4c171d)||_0x4c171d<0x0)throw appRuleError(_0x23088a(0x139),_0x23088a(0x12d));}return{'type':_0x3d35f6,'file':_0x53f610,'expectedVersion':_0x4c171d};}async function prepareSet(_0x30fa3e){const _0x591296=a243_0x3d3c,_0x283801=readSetInput(_0x30fa3e),_0x22f8b7=await readAppRuleFile(_0x283801[_0x591296(0x130)]);if(_0x283801[_0x591296(0x14a)]===_0x591296(0x13e)&&_0x22f8b7[_0x591296(0x13c)]['length']>0x7d0)throw appRuleError('app_rule_content_too_large',_0x591296(0x137));const _0x458f09=await getAppRule(_0x30fa3e[_0x591296(0x136)],{'appCode':_0x30fa3e[_0x591296(0x146)],'type':_0x283801[_0x591296(0x14a)]});if(_0x283801['expectedVersion']!==undefined&&(_0x458f09?.[_0x591296(0x113)]??0x0)!==_0x283801[_0x591296(0x147)])throw appRuleError('app_rule_version_mismatch',appRuleFileName(_0x283801[_0x591296(0x14a)])+_0x591296(0x11e),_0x591296(0x135)+_0x283801[_0x591296(0x147)]+_0x591296(0x132)+(_0x458f09?.[_0x591296(0x113)]??_0x591296(0x143))+_0x591296(0x11f));return{'input':_0x283801,'replacement':_0x22f8b7,'beforeRecord':_0x458f09,'before':projectAppRule(_0x283801['type'],_0x458f09),'planned':{'type':_0x283801[_0x591296(0x14a)],'fileName':appRuleFileName(_0x283801[_0x591296(0x14a)]),'contextScope':appRuleContextScope(_0x283801[_0x591296(0x14a)]),'enabled':!![],'appCode':_0x30fa3e[_0x591296(0x146)],'scope':'rules','contentByteSize':_0x22f8b7[_0x591296(0x120)],'contentHash':_0x22f8b7[_0x591296(0x14e)]}};}function warningsFor(_0x37a4ea){return[];}export const ruleSet={'service':a243_0x3f3639(0x119),'command':'set','description':a243_0x3f3639(0x118),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x3f3639(0x130),'type':a243_0x3f3639(0x131),'required':!![],'description':a243_0x3f3639(0x116)},{'name':a243_0x3f3639(0x11b),'type':a243_0x3f3639(0x134),'required':![],'description':'Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set'}],async 'validate'(_0x41defa){readSetInput(_0x41defa);},async 'dryRun'(_0x1bc78c){const _0x4a515e=a243_0x3f3639,_0x486958=await prepareSet(_0x1bc78c);return asDryRunResult({'operation':'set','selector':{'appCode':_0x1bc78c[_0x4a515e(0x146)],'scope':'rules','type':_0x486958[_0x4a515e(0x124)][_0x4a515e(0x14a)]},'before':_0x486958[_0x4a515e(0x14b)],'after':_0x486958[_0x4a515e(0x144)],'dryRun':!![],'backend':{'method':_0x4a515e(0x117),'path':knowledgeDocumentsPath('rules',_0x486958[_0x4a515e(0x112)]?_0x4a515e(0x12b):_0x4a515e(0x11d)),'body':{'appCode':_0x1bc78c[_0x4a515e(0x146)],..._0x486958['beforeRecord']?{'id':_0x486958[_0x4a515e(0x112)]['id']}:{},'title':_0x486958[_0x4a515e(0x124)][_0x4a515e(0x14a)]===_0x4a515e(0x13e)?'RULES':_0x4a515e(0x12e),'contentHash':_0x486958['replacement'][_0x4a515e(0x14e)],'contentByteSize':_0x486958['replacement'][_0x4a515e(0x120)],..._0x486958['beforeRecord']?{'expectedVersion':_0x486958[_0x4a515e(0x112)][_0x4a515e(0x113)]}:{}}},'warnings':warningsFor(_0x486958[_0x4a515e(0x124)][_0x4a515e(0x147)]),'verification':{'expectedVersion':_0x486958[_0x4a515e(0x112)]?.[_0x4a515e(0x113)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x4a515e(0x126)+_0x486958[_0x4a515e(0x124)]['type']+_0x4a515e(0x149)}},{'method':'POST','url':knowledgeDocumentsPath(_0x4a515e(0x13e),_0x486958[_0x4a515e(0x112)]?_0x4a515e(0x12b):_0x4a515e(0x11d))});},async 'execute'(_0x37293a){const _0x29652c=a243_0x3f3639,_0x18e20a=await prepareSet(_0x37293a),_0x5e0335=_0x18e20a[_0x29652c(0x112)]===null?0x1:_0x18e20a[_0x29652c(0x112)][_0x29652c(0x113)]+(_0x18e20a[_0x29652c(0x112)][_0x29652c(0x13c)]===_0x18e20a['replacement']['content']?0x0:0x1);let _0x718a8e,_0x3fe441=![];try{_0x718a8e=await saveAppRule(_0x37293a[_0x29652c(0x136)],{'appCode':_0x37293a[_0x29652c(0x146)],'type':_0x18e20a['input'][_0x29652c(0x14a)],'content':_0x18e20a[_0x29652c(0x14d)][_0x29652c(0x13c)],'expectedVersion':_0x18e20a['beforeRecord']?.['version']??0x0,..._0x18e20a[_0x29652c(0x112)]?{'id':_0x18e20a[_0x29652c(0x112)]['id']}:{}});if(_0x718a8e[_0x29652c(0x113)]!==_0x5e0335||_0x718a8e['content']!==_0x18e20a[_0x29652c(0x14d)][_0x29652c(0x13c)]||_0x18e20a[_0x29652c(0x112)]!==null&&_0x718a8e['id']!==_0x18e20a[_0x29652c(0x112)]['id'])throw appRuleError(_0x29652c(0x13d),'The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.',_0x29652c(0x138));}catch(_0x3f4804){if(!isPlatformTransportFailure(_0x3f4804))throw _0x3f4804;_0x3fe441=!![];}let _0x1e18e0;try{_0x1e18e0=await getAppRule(_0x37293a[_0x29652c(0x136)],{'appCode':_0x37293a[_0x29652c(0x146)],'type':_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)]});}catch(_0x1ac9bc){const _0xe7d65e=appRuleError(_0x3fe441?_0x29652c(0x122):'app_rule_verification_unavailable',_0x29652c(0x11c)+appRuleFileName(_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)])+'\x20could\x20not\x20be\x20verified.',_0x29652c(0x13b));Object['defineProperty'](_0xe7d65e,'cause',{'value':_0x1ac9bc,'enumerable':![]});throw _0xe7d65e;}const _0x1d0c9a=_0x1e18e0&&inspectAppRuleContent(_0x1e18e0[_0x29652c(0x13c)])[_0x29652c(0x14e)]===_0x18e20a[_0x29652c(0x14d)][_0x29652c(0x14e)],_0x73c373=_0x1e18e0&&_0x1e18e0[_0x29652c(0x113)]===_0x5e0335&&(!_0x718a8e||_0x1e18e0['id']===_0x718a8e['id']&&_0x1e18e0[_0x29652c(0x113)]===_0x718a8e[_0x29652c(0x113)]);if(!_0x1e18e0||!_0x1d0c9a||!_0x73c373||_0x18e20a[_0x29652c(0x112)]!==null&&_0x1e18e0['id']!==_0x18e20a['beforeRecord']['id'])throw appRuleError(_0x3fe441?_0x29652c(0x122):'app_rule_verification_failed',appRuleFileName(_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)])+_0x29652c(0x12f),_0x29652c(0x13a)+_0x18e20a[_0x29652c(0x124)]['type']+_0x29652c(0x114));const _0x42fa75=warningsFor(_0x18e20a['input'][_0x29652c(0x147)]);_0x3fe441&&_0x42fa75[_0x29652c(0x141)](_0x29652c(0x13f));const _0x46218e=projectAppRule(_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)],_0x1e18e0);return{'ok':!![],'data':{'operation':'set','selector':{'appCode':_0x37293a[_0x29652c(0x146)],'scope':_0x29652c(0x13e),'type':_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)]},'before':_0x18e20a[_0x29652c(0x14b)],'after':_0x46218e,'dryRun':![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x29652c(0x13e),_0x18e20a[_0x29652c(0x112)]?_0x29652c(0x12b):_0x29652c(0x11d))},'warnings':_0x42fa75,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x3fe441,'expectedVersion':_0x18e20a[_0x29652c(0x112)]?.['version']??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x29652c(0x126)+_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)]+'\x20--format\x20compress'}},'message':_0x29652c(0x12a)+appRuleFileName(_0x18e20a[_0x29652c(0x124)][_0x29652c(0x14a)])+_0x29652c(0x133)+_0x37293a[_0x29652c(0x146)]};}};
@@ -1 +1 @@
1
- const a244_0x535b2f=a244_0x41eb;(function(_0x53c17f,_0x2cec4d){const _0x25e2b5=a244_0x41eb,_0x125ded=_0x53c17f();while(!![]){try{const _0x2e252=-parseInt(_0x25e2b5(0x117))/0x1+-parseInt(_0x25e2b5(0x12b))/0x2*(parseInt(_0x25e2b5(0x12e))/0x3)+parseInt(_0x25e2b5(0x122))/0x4+parseInt(_0x25e2b5(0x102))/0x5+-parseInt(_0x25e2b5(0x100))/0x6+-parseInt(_0x25e2b5(0x107))/0x7+-parseInt(_0x25e2b5(0x10e))/0x8*(-parseInt(_0x25e2b5(0x106))/0x9);if(_0x2e252===_0x2cec4d)break;else _0x125ded['push'](_0x125ded['shift']());}catch(_0x1406ef){_0x125ded['push'](_0x125ded['shift']());}}}(a244_0x1ed9,0x79760));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x535b2f(0x118),a244_0x535b2f(0x114)];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x535b2f(0x108),'database':a244_0x535b2f(0x101)},APP_RULE_CONTEXT_SCOPES={'rules':'page-api-development','database':a244_0x535b2f(0x123)};export function appRuleError(_0x45e3b0,_0xe82f7b,_0x209dab){return new CliError(_0x45e3b0,0x1,_0xe82f7b,_0x209dab);}export function readAppRuleType(_0x449e6e){const _0x162ae2=a244_0x535b2f,_0x2f1b16=_0x449e6e[_0x162ae2(0x126)](_0x162ae2(0x10d))[_0x162ae2(0x111)]()[_0x162ae2(0x116)]();if(_0x2f1b16!=='rules'&&_0x2f1b16!==_0x162ae2(0x114))throw appRuleError(_0x162ae2(0x12d),'--type\x20must\x20be\x20either\x20rules\x20or\x20database.');return _0x2f1b16;}export function appRuleFileName(_0x1184bb){return APP_RULE_FILES[_0x1184bb];}export function appRuleContextScope(_0x7c8689){return APP_RULE_CONTEXT_SCOPES[_0x7c8689];}export function inspectAppRuleContent(_0x15761e){const _0x35e18f=a244_0x535b2f,_0x4522ab=Buffer[_0x35e18f(0x120)](_0x15761e,_0x35e18f(0x119));return{'content':_0x15761e,'byteSize':_0x4522ab[_0x35e18f(0x112)],'contentHash':'sha256:'+createHash(_0x35e18f(0x121))[_0x35e18f(0x115)](_0x4522ab)[_0x35e18f(0x11d)]('hex')};}export async function readAppRuleFile(_0x31acd1){const _0x3dac62=a244_0x535b2f,_0x43a809=_0x31acd1[_0x3dac62(0x111)]();if(!_0x43a809)throw appRuleError('app_rule_file_required',_0x3dac62(0x128),_0x3dac62(0x105));const _0x5936dc=resolve(_0x43a809);let _0x4cdf6a;try{_0x4cdf6a=await stat(_0x5936dc);}catch(_0x1d6eb7){throw appRuleError('app_rule_file_unreadable',_0x3dac62(0x113)+_0x43a809,_0x1d6eb7 instanceof Error?_0x1d6eb7[_0x3dac62(0x125)]:String(_0x1d6eb7));}if(!_0x4cdf6a[_0x3dac62(0x127)]())throw appRuleError(_0x3dac62(0x109),_0x3dac62(0x103)+_0x43a809);if(_0x4cdf6a[_0x3dac62(0x10f)]>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x3dac62(0x11e));let _0xda9611;try{_0xda9611=await readFile(_0x5936dc);}catch(_0x2bee0b){throw appRuleError(_0x3dac62(0x110),'Cannot\x20read\x20app\x20rule\x20file:\x20'+_0x43a809,_0x2bee0b instanceof Error?_0x2bee0b['message']:String(_0x2bee0b));}if(_0xda9611[_0x3dac62(0x112)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x3dac62(0x11f),_0x3dac62(0x11e));let _0x38adab;try{_0x38adab=new TextDecoder(_0x3dac62(0x104),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0xda9611);}catch{throw appRuleError(_0x3dac62(0x11c),_0x3dac62(0x10b)+_0x43a809);}if(_0x38adab['length']>MAX_APP_RULE_UNITS)throw appRuleError(_0x3dac62(0x11f),_0x3dac62(0x10c));if(!_0x38adab[_0x3dac62(0x111)]())throw appRuleError(_0x3dac62(0x11c),'App\x20rule\x20file\x20is\x20blank:\x20'+_0x43a809);return inspectAppRuleContent(_0x38adab);}export function projectAppRule(_0xfca9f8,_0x41edc6){const _0x49ea44=a244_0x535b2f;if(!_0x41edc6)return{'type':_0xfca9f8,'fileName':appRuleFileName(_0xfca9f8),'contextScope':appRuleContextScope(_0xfca9f8),'enabled':![]};const _0x57c990=inspectAppRuleContent(_0x41edc6[_0x49ea44(0x129)]);return{'type':_0xfca9f8,'fileName':appRuleFileName(_0xfca9f8),'contextScope':appRuleContextScope(_0xfca9f8),'enabled':!![],'id':_0x41edc6['id'],'scope':_0x41edc6[_0x49ea44(0x11a)],'appCode':_0x41edc6[_0x49ea44(0x10a)],'version':_0x41edc6['version'],..._0x41edc6[_0x49ea44(0x12a)]!==undefined?{'indexStatus':_0x41edc6['indexStatus']}:{},'contentByteSize':_0x57c990['byteSize'],'contentHash':_0x57c990[_0x49ea44(0x12c)],..._0x41edc6[_0x49ea44(0x124)]!==undefined&&_0x41edc6[_0x49ea44(0x124)]!==null?{'createTime':_0x41edc6[_0x49ea44(0x124)]}:{},..._0x41edc6[_0x49ea44(0x12f)]!==undefined&&_0x41edc6[_0x49ea44(0x12f)]!==null?{'updateTime':_0x41edc6[_0x49ea44(0x12f)]}:{}};}function a244_0x1ed9(){const _0x1877a7=['from','sha256','3703524hhKqEb','database-analysis','createTime','message','str','isFile','--file\x20is\x20required.','content','indexStatus','358pSScLl','contentHash','app_rule_type_invalid','12306SKKkoO','updateTime','string','4201416iIHKrZ','DATABASE.md','1675790KUsziY','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','utf-8','Pass\x20a\x20UTF-8\x20Markdown\x20file.','17619957eJqXhW','2410142CEoNnQ','RULES.md','app_rule_file_invalid','appCode','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','type','8YFyVdC','size','app_rule_file_unreadable','trim','byteLength','Cannot\x20access\x20app\x20rule\x20file:\x20','database','update','toLowerCase','942508NBcXGI','rules','utf8','scope','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','app_rule_content_invalid','digest','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','app_rule_content_too_large'];a244_0x1ed9=function(){return _0x1877a7;};return a244_0x1ed9();}function a244_0x41eb(_0x4e38e7,_0x1bd9f7){_0x4e38e7=_0x4e38e7-0x100;const _0x1ed9b4=a244_0x1ed9();let _0x41ebd4=_0x1ed9b4[_0x4e38e7];return _0x41ebd4;}export const APP_RULE_TYPE_FLAG={'name':'type','type':a244_0x535b2f(0x130),'required':!![],'description':a244_0x535b2f(0x11b),'enum':[...APP_RULE_TYPES]};
1
+ const a244_0x3d4fe3=a244_0x8735;(function(_0x5b8359,_0x40172d){const _0x111fd2=a244_0x8735,_0x146c8c=_0x5b8359();while(!![]){try{const _0x58dbd0=-parseInt(_0x111fd2(0xd8))/0x1*(-parseInt(_0x111fd2(0xed))/0x2)+parseInt(_0x111fd2(0xd9))/0x3+parseInt(_0x111fd2(0xf2))/0x4*(parseInt(_0x111fd2(0xe0))/0x5)+parseInt(_0x111fd2(0xcd))/0x6+parseInt(_0x111fd2(0xf6))/0x7*(-parseInt(_0x111fd2(0xde))/0x8)+parseInt(_0x111fd2(0xce))/0x9*(-parseInt(_0x111fd2(0xf3))/0xa)+parseInt(_0x111fd2(0xe2))/0xb*(parseInt(_0x111fd2(0xeb))/0xc);if(_0x58dbd0===_0x40172d)break;else _0x146c8c['push'](_0x146c8c['shift']());}catch(_0x295f51){_0x146c8c['push'](_0x146c8c['shift']());}}}(a244_0x59d7,0x71805));function a244_0x8735(_0x4f31ae,_0x1712e8){_0x4f31ae=_0x4f31ae-0xc7;const _0x59d7f3=a244_0x59d7();let _0x8735aa=_0x59d7f3[_0x4f31ae];return _0x8735aa;}import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x3d4fe3(0xcb),a244_0x3d4fe3(0xf0)];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x3d4fe3(0xcf),'database':'DATABASE.md'},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x3d4fe3(0xe9),'database':a244_0x3d4fe3(0xd1)};function a244_0x59d7(){const _0x16d24b=['653986frFeia','string','indexStatus','database','hex','533164HgVEJU','540490GbubMc','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','str','1082291BEeDav','app_rule_content_invalid','createTime','utf8','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','app_rule_content_too_large','toLowerCase','updateTime','sha256','update','rules','utf-8','794958NUgEYI','135sRAinO','RULES.md','appCode','database-analysis','App\x20rule\x20file\x20is\x20blank:\x20','length','app_rule_file_unreadable','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','app_rule_type_invalid','1Rgdqwj','402330qUcaeB','decode','byteLength','contentHash','--file\x20is\x20required.','8VhNvjH','message','10QyfArK','byteSize','11BRGRxL','type','sha256:','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','digest','scope','trim','page-api-development','size','6840852CkHVCk','version'];a244_0x59d7=function(){return _0x16d24b;};return a244_0x59d7();}export function appRuleError(_0x2c8b0a,_0x37482c,_0x59d9f4){return new CliError(_0x2c8b0a,0x1,_0x37482c,_0x59d9f4);}export function readAppRuleType(_0x500071){const _0x168d3b=a244_0x3d4fe3,_0x7bc338=_0x500071[_0x168d3b(0xf5)]('type')[_0x168d3b(0xe8)]()[_0x168d3b(0xc7)]();if(_0x7bc338!==_0x168d3b(0xcb)&&_0x7bc338!==_0x168d3b(0xf0))throw appRuleError(_0x168d3b(0xd7),_0x168d3b(0xe5));return _0x7bc338;}export function appRuleFileName(_0x3bb6fa){return APP_RULE_FILES[_0x3bb6fa];}export function appRuleContextScope(_0x5b0f32){return APP_RULE_CONTEXT_SCOPES[_0x5b0f32];}export function inspectAppRuleContent(_0x59172c){const _0x37f576=a244_0x3d4fe3,_0x3d1c79=Buffer['from'](_0x59172c,_0x37f576(0xf9));return{'content':_0x59172c,'byteSize':_0x3d1c79[_0x37f576(0xdb)],'contentHash':_0x37f576(0xe4)+createHash(_0x37f576(0xc9))[_0x37f576(0xca)](_0x3d1c79)[_0x37f576(0xe6)](_0x37f576(0xf1))};}export async function readAppRuleFile(_0x5de938){const _0x1c1231=a244_0x3d4fe3,_0x338e08=_0x5de938[_0x1c1231(0xe8)]();if(!_0x338e08)throw appRuleError('app_rule_file_required',_0x1c1231(0xdd),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x396773=resolve(_0x338e08);let _0x115795;try{_0x115795=await stat(_0x396773);}catch(_0x54d22d){throw appRuleError(_0x1c1231(0xd4),'Cannot\x20access\x20app\x20rule\x20file:\x20'+_0x338e08,_0x54d22d instanceof Error?_0x54d22d[_0x1c1231(0xdf)]:String(_0x54d22d));}if(!_0x115795['isFile']())throw appRuleError('app_rule_file_invalid',_0x1c1231(0xd6)+_0x338e08);if(_0x115795[_0x1c1231(0xea)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x1c1231(0xfb),'App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.');let _0x3343ba;try{_0x3343ba=await readFile(_0x396773);}catch(_0x12cb19){throw appRuleError(_0x1c1231(0xd4),'Cannot\x20read\x20app\x20rule\x20file:\x20'+_0x338e08,_0x12cb19 instanceof Error?_0x12cb19[_0x1c1231(0xdf)]:String(_0x12cb19));}if(_0x3343ba['byteLength']>MAX_APP_RULE_BYTES)throw appRuleError(_0x1c1231(0xfb),_0x1c1231(0xfa));let _0x5c1abd;try{_0x5c1abd=new TextDecoder(_0x1c1231(0xcc),{'fatal':!![],'ignoreBOM':!![]})[_0x1c1231(0xda)](_0x3343ba);}catch{throw appRuleError(_0x1c1231(0xf7),_0x1c1231(0xd5)+_0x338e08);}if(_0x5c1abd[_0x1c1231(0xd3)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x1c1231(0xfb),_0x1c1231(0xf4));if(!_0x5c1abd[_0x1c1231(0xe8)]())throw appRuleError('app_rule_content_invalid',_0x1c1231(0xd2)+_0x338e08);return inspectAppRuleContent(_0x5c1abd);}export function projectAppRule(_0x4179b7,_0x50d91e){const _0x246246=a244_0x3d4fe3;if(!_0x50d91e)return{'type':_0x4179b7,'fileName':appRuleFileName(_0x4179b7),'contextScope':appRuleContextScope(_0x4179b7),'enabled':![]};const _0x2d72d4=inspectAppRuleContent(_0x50d91e['content']);return{'type':_0x4179b7,'fileName':appRuleFileName(_0x4179b7),'contextScope':appRuleContextScope(_0x4179b7),'enabled':!![],'id':_0x50d91e['id'],'scope':_0x50d91e[_0x246246(0xe7)],'appCode':_0x50d91e[_0x246246(0xd0)],'version':_0x50d91e[_0x246246(0xec)],..._0x50d91e['indexStatus']!==undefined?{'indexStatus':_0x50d91e[_0x246246(0xef)]}:{},'contentByteSize':_0x2d72d4[_0x246246(0xe1)],'contentHash':_0x2d72d4[_0x246246(0xdc)],..._0x50d91e[_0x246246(0xf8)]!==undefined&&_0x50d91e['createTime']!==null?{'createTime':_0x50d91e[_0x246246(0xf8)]}:{},..._0x50d91e[_0x246246(0xc8)]!==undefined&&_0x50d91e[_0x246246(0xc8)]!==null?{'updateTime':_0x50d91e[_0x246246(0xc8)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x3d4fe3(0xe3),'type':a244_0x3d4fe3(0xee),'required':!![],'description':'Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','enum':[...APP_RULE_TYPES]};
@@ -1 +1 @@
1
- const a245_0x1c223f=a245_0xc861;(function(_0xa508c,_0x442a77){const _0x1f76e5=a245_0xc861,_0x44e515=_0xa508c();while(!![]){try{const _0xd1f8fc=-parseInt(_0x1f76e5(0xfd))/0x1*(-parseInt(_0x1f76e5(0xdf))/0x2)+-parseInt(_0x1f76e5(0xd3))/0x3+-parseInt(_0x1f76e5(0xeb))/0x4*(-parseInt(_0x1f76e5(0xea))/0x5)+-parseInt(_0x1f76e5(0xe6))/0x6+-parseInt(_0x1f76e5(0xfa))/0x7*(parseInt(_0x1f76e5(0xc4))/0x8)+-parseInt(_0x1f76e5(0xc5))/0x9*(-parseInt(_0x1f76e5(0xd1))/0xa)+-parseInt(_0x1f76e5(0xf6))/0xb*(-parseInt(_0x1f76e5(0xcb))/0xc);if(_0xd1f8fc===_0x442a77)break;else _0x44e515['push'](_0x44e515['shift']());}catch(_0x1b355a){_0x44e515['push'](_0x44e515['shift']());}}}(a245_0x13cb,0x1c789));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';function a245_0xc861(_0x4df541,_0x48a59d){_0x4df541=_0x4df541-0xbc;const _0x13cbe1=a245_0x13cb();let _0xc861b7=_0x13cbe1[_0x4df541];return _0xc861b7;}import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0x1c223f(0xe2),a245_0x1c223f(0xf5)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x1c223f(0xe2),a245_0x1c223f(0xf5),'build','preview']);function a245_0x13cb(){const _0x1b0a69=['\x20run\x20<script>\x0a','utf-8','No\x20scripts\x20defined\x20in\x20package.json.','\x22\x20not\x20found\x20in\x20package.json.','Available:\x20','1488csVAbh','watch','all','build','\x20\x20\x20\x20','script','84130eNTFLF','path','128397oVIhPN','close','\x20run\x20build','join','\x20run\x20start','error','Run\x20a\x20package.json\x20script','\x20run\x20preview\x20--watch','Script\x20\x22','npm','pnpm-lock.yaml','keys','288974OQgyZH','\x20run\x20','\x0a\x20\x20Available\x20scripts:\x0a','start','bun','\x20\x20EXAMPLES','\x20exited\x20with\x20code\x20','710724NajmDq','preview','Domain\x20routing\x20synchronized:\x20','yarn','5fjtres','23452zWZtMR','parse','cwd','inherit','bun.lockb','(none)','No\x20package.json\x20found\x20in\x20current\x20directory.','--watch','write','vite\x20preview\x20exited\x20with\x20code\x20','dev','16841qbSaXm','has','needsUpgrade','bun.lock','44513hYPLjI','vite','slice','1hhBIWt','push','run','changed','Enable\x20watch\x20mode\x20for\x20preview','belowMinimum','.bin','node_modules','log','validation','216ouWPog','117inVorS'];a245_0x13cb=function(){return _0x1b0a69;};return a245_0x13cb();}export function syncProjectDomainRoutingBeforeScript(_0x28b49d,_0x23499a){const _0x43781b=a245_0x1c223f;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x43781b(0xf7)](_0x23499a))return null;const _0x322982=findProjectRootDirectory(_0x28b49d);if(!resolveConfigPath(_0x322982))return null;const _0x2a0305=writeProjectDomainRoutingManifest(_0x322982);return{'path':_0x2a0305[_0x43781b(0xd2)],'changed':_0x2a0305[_0x43781b(0xbd)]};}function readPackageScripts(_0x25def5){const _0x316710=a245_0x1c223f,_0x15238a=resolve(_0x25def5,'package.json');if(!existsSync(_0x15238a))return null;try{const _0x522621=JSON[_0x316710(0xec)](readFileSync(_0x15238a,_0x316710(0xc7)));return _0x522621['scripts']??{};}catch{return null;}}function detectPackageManager(_0x52c647){const _0x5f0a05=a245_0x1c223f;if(existsSync(resolve(_0x52c647,_0x5f0a05(0xef)))||existsSync(resolve(_0x52c647,_0x5f0a05(0xf9))))return _0x5f0a05(0xe3);if(existsSync(resolve(_0x52c647,_0x5f0a05(0xdd))))return'pnpm';if(existsSync(resolve(_0x52c647,'yarn.lock')))return _0x5f0a05(0xe9);return _0x5f0a05(0xdc);}async function versionCheck(_0x4c1e79){const _0x5496b0=a245_0x1c223f,_0x58764a=await checkCliVersion();(_0x58764a['needsUpgrade']||_0x58764a[_0x5496b0(0xbf)])&&(printCliUpgradeWarning(_0x58764a),assertCliVersionSupported(_0x58764a));const _0x54c0d2=await checkSdkVersion(_0x4c1e79);if(_0x54c0d2[_0x5496b0(0xf8)])printSdkUpgradeWarning(_0x54c0d2);}function spawnScript(_0x3ab1bd,_0x3b593b,_0x328b4f,_0x397f0f){return new Promise((_0x701202,_0x5022ae)=>{const _0x3ece45=a245_0xc861,_0x46ba0a=[_0x3ece45(0xbc),_0x3b593b,..._0x328b4f],_0x268df9=spawn(_0x3ab1bd,_0x46ba0a,{'cwd':_0x397f0f,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x397f0f,_0x3ece45(0xc1),_0x3ece45(0xc0))+delimiter+process.env.PATH}});_0x268df9['on'](_0x3ece45(0xd4),_0x77e9c2=>{const _0x5d5f41=_0x3ece45;if(_0x77e9c2===0x0||_0x77e9c2===null)_0x701202();else _0x5022ae(new Error(_0x3ab1bd+_0x5d5f41(0xe0)+_0x3b593b+_0x5d5f41(0xe5)+_0x77e9c2));}),_0x268df9['on'](_0x3ece45(0xd8),_0x5022ae);});}function spawnViteBuildWatch(_0x1d3c7a){return new Promise((_0x4e97e6,_0x386d2a)=>{const _0x2761bd=a245_0xc861,_0x4a8d34=spawn(_0x2761bd(0xfb),[_0x2761bd(0xce),_0x2761bd(0xf2)],{'cwd':_0x1d3c7a,'stdio':_0x2761bd(0xee),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1d3c7a,_0x2761bd(0xc1),'.bin')+delimiter+process.env.PATH}});_0x4a8d34['on'](_0x2761bd(0xd4),_0x52900f=>{if(_0x52900f===0x0||_0x52900f===null)_0x4e97e6();else _0x386d2a(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x52900f));}),_0x4a8d34['on'](_0x2761bd(0xd8),_0x386d2a);});}function spawnVitePreview(_0x313701){return new Promise((_0x1480c5,_0x39cbc0)=>{const _0x22a237=a245_0xc861,_0xb70005=spawn('vite',[_0x22a237(0xe7)],{'cwd':_0x313701,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x313701,_0x22a237(0xc1),'.bin')+delimiter+process.env.PATH}});_0xb70005['on']('close',_0x273ee8=>{const _0x13cf14=_0x22a237;if(_0x273ee8===0x0||_0x273ee8===null)_0x1480c5();else _0x39cbc0(new Error(_0x13cf14(0xf4)+_0x273ee8));}),_0xb70005['on'](_0x22a237(0xd8),_0x39cbc0);});}const runFlags=[{'name':a245_0x1c223f(0xcc),'type':'boolean','description':a245_0x1c223f(0xbe),'default':![]}];export const runDefinition={'service':a245_0x1c223f(0xbc),'command':a245_0x1c223f(0xbc),'description':a245_0x1c223f(0xd9),'risk':a245_0x1c223f(0xf3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0x1c223f(0xd0),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x120d1f=a245_0x1c223f,_0x5a62c8=[];return _0x5a62c8[_0x120d1f(0xfe)](_0x120d1f(0xe4)),_0x5a62c8[_0x120d1f(0xfe)](_0x120d1f(0xcf)+CLI_BIN_NAME+_0x120d1f(0xd7)),_0x5a62c8[_0x120d1f(0xfe)](_0x120d1f(0xcf)+CLI_BIN_NAME+_0x120d1f(0xd5)),_0x5a62c8[_0x120d1f(0xfe)](_0x120d1f(0xcf)+CLI_BIN_NAME+'\x20run\x20preview'),_0x5a62c8[_0x120d1f(0xfe)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x120d1f(0xda)),_0x5a62c8[_0x120d1f(0xd6)]('\x0a');},async 'execute'(_0x4c1f95){const _0x567278=a245_0x1c223f,_0x1077e=process[_0x567278(0xed)](),_0xcff2d0=_0x4c1f95['args'][0x0],_0x51ef88=_0x4c1f95['args'][_0x567278(0xfc)](0x1),_0xbe331e=readPackageScripts(_0x1077e);if(!_0xbe331e)throw CliErrors[_0x567278(0xc3)](_0x567278(0xf1));if(!_0xcff2d0){const _0x47272e=Object['keys'](_0xbe331e);if(_0x47272e['length']===0x0)console[_0x567278(0xc2)](_0x567278(0xc8));else{console[_0x567278(0xc2)](_0x567278(0xe1));for(const _0x4db9f3 of _0x47272e){console['log'](_0x567278(0xcf)+_0x4db9f3);}console[_0x567278(0xc2)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x567278(0xc6));}return{'ok':!![]};}if(!_0xbe331e[_0xcff2d0])throw CliErrors[_0x567278(0xc3)](_0x567278(0xdb)+_0xcff2d0+_0x567278(0xc9),_0x567278(0xca)+(Object[_0x567278(0xde)](_0xbe331e)['join'](',\x20')||_0x567278(0xf0)));const _0x461446=detectPackageManager(_0x1077e),_0x27c1ef=syncProjectDomainRoutingBeforeScript(_0x1077e,_0xcff2d0);_0x27c1ef?.[_0x567278(0xbd)]&&console[_0x567278(0xd8)](_0x567278(0xe8)+_0x27c1ef[_0x567278(0xd2)]);VERSION_CHECK_SCRIPTS['has'](_0xcff2d0)&&await versionCheck(_0x1077e);if(_0xcff2d0===_0x567278(0xe7)&&_0x4c1f95['bool'](_0x567278(0xcc)))return await Promise[_0x567278(0xcd)]([spawnViteBuildWatch(_0x1077e),spawnVitePreview(_0x1077e)]),{'ok':!![]};return await spawnScript(_0x461446,_0xcff2d0,_0x51ef88,_0x1077e),{'ok':!![]};}};
1
+ function a245_0x19ec(_0x459ab9,_0x33298c){_0x459ab9=_0x459ab9-0x15b;const _0x518ac5=a245_0x518a();let _0x19ec5a=_0x518ac5[_0x459ab9];return _0x19ec5a;}const a245_0x517c89=a245_0x19ec;(function(_0xb681e0,_0x1f8a97){const _0x41bf5c=a245_0x19ec,_0x51e0b7=_0xb681e0();while(!![]){try{const _0x5e0dc7=-parseInt(_0x41bf5c(0x197))/0x1+-parseInt(_0x41bf5c(0x18c))/0x2+parseInt(_0x41bf5c(0x191))/0x3*(-parseInt(_0x41bf5c(0x18b))/0x4)+-parseInt(_0x41bf5c(0x176))/0x5+-parseInt(_0x41bf5c(0x193))/0x6+parseInt(_0x41bf5c(0x18d))/0x7*(parseInt(_0x41bf5c(0x18a))/0x8)+parseInt(_0x41bf5c(0x188))/0x9*(parseInt(_0x41bf5c(0x181))/0xa);if(_0x5e0dc7===_0x1f8a97)break;else _0x51e0b7['push'](_0x51e0b7['shift']());}catch(_0x4df994){_0x51e0b7['push'](_0x51e0b7['shift']());}}}(a245_0x518a,0x350f8));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0x517c89(0x19c),'dev']),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x517c89(0x19c),'dev',a245_0x517c89(0x172),'preview']);export function syncProjectDomainRoutingBeforeScript(_0x63ff05,_0xb1e2f4){const _0x2fffad=a245_0x517c89;if(!DOMAIN_ROUTING_SYNC_SCRIPTS['has'](_0xb1e2f4))return null;const _0x518ba3=findProjectRootDirectory(_0x63ff05);if(!resolveConfigPath(_0x518ba3))return null;const _0x58d5c4=writeProjectDomainRoutingManifest(_0x518ba3);return{'path':_0x58d5c4[_0x2fffad(0x16c)],'changed':_0x58d5c4[_0x2fffad(0x16d)]};}function readPackageScripts(_0x3327af){const _0x432092=a245_0x517c89,_0x1e5d2e=resolve(_0x3327af,_0x432092(0x15d));if(!existsSync(_0x1e5d2e))return null;try{const _0x20ac76=JSON[_0x432092(0x195)](readFileSync(_0x1e5d2e,_0x432092(0x19f)));return _0x20ac76[_0x432092(0x179)]??{};}catch{return null;}}function detectPackageManager(_0x105ec4){const _0x480bd9=a245_0x517c89;if(existsSync(resolve(_0x105ec4,_0x480bd9(0x17c)))||existsSync(resolve(_0x105ec4,_0x480bd9(0x17d))))return _0x480bd9(0x185);if(existsSync(resolve(_0x105ec4,_0x480bd9(0x167))))return'pnpm';if(existsSync(resolve(_0x105ec4,_0x480bd9(0x199))))return _0x480bd9(0x17f);return _0x480bd9(0x19a);}async function versionCheck(_0x2b273a){const _0x2ba757=a245_0x517c89,_0x2673ea=await checkCliVersion();(_0x2673ea['needsUpgrade']||_0x2673ea[_0x2ba757(0x15e)])&&(printCliUpgradeWarning(_0x2673ea),assertCliVersionSupported(_0x2673ea));const _0x39085d=await checkSdkVersion(_0x2b273a);if(_0x39085d[_0x2ba757(0x16e)])printSdkUpgradeWarning(_0x39085d);}function spawnScript(_0x15e656,_0x5127bc,_0x4e7f76,_0xd24219){return new Promise((_0x1ff958,_0x20851a)=>{const _0x2b0236=a245_0x19ec,_0x3131e1=[_0x2b0236(0x18e),_0x5127bc,..._0x4e7f76],_0xd78585=spawn(_0x15e656,_0x3131e1,{'cwd':_0xd24219,'stdio':_0x2b0236(0x183),'shell':!![],'env':{...process.env,'PATH':''+join(_0xd24219,_0x2b0236(0x164),'.bin')+delimiter+process.env.PATH}});_0xd78585['on'](_0x2b0236(0x19e),_0x103e0b=>{const _0x1aafcf=_0x2b0236;if(_0x103e0b===0x0||_0x103e0b===null)_0x1ff958();else _0x20851a(new Error(_0x15e656+_0x1aafcf(0x171)+_0x5127bc+'\x20exited\x20with\x20code\x20'+_0x103e0b));}),_0xd78585['on'](_0x2b0236(0x173),_0x20851a);});}function spawnViteBuildWatch(_0x34b9ac){return new Promise((_0x11d18b,_0x166b23)=>{const _0x5ca0a7=a245_0x19ec,_0x14a6ea=spawn(_0x5ca0a7(0x168),[_0x5ca0a7(0x172),_0x5ca0a7(0x190)],{'cwd':_0x34b9ac,'stdio':_0x5ca0a7(0x183),'shell':!![],'env':{...process.env,'PATH':''+join(_0x34b9ac,_0x5ca0a7(0x164),_0x5ca0a7(0x18f))+delimiter+process.env.PATH}});_0x14a6ea['on'](_0x5ca0a7(0x19e),_0x7b7496=>{const _0x361653=_0x5ca0a7;if(_0x7b7496===0x0||_0x7b7496===null)_0x11d18b();else _0x166b23(new Error(_0x361653(0x19b)+_0x7b7496));}),_0x14a6ea['on'](_0x5ca0a7(0x173),_0x166b23);});}function spawnVitePreview(_0x4e3d04){return new Promise((_0x1562ec,_0x2e625a)=>{const _0x1ca6f7=a245_0x19ec,_0x558450=spawn(_0x1ca6f7(0x168),[_0x1ca6f7(0x163)],{'cwd':_0x4e3d04,'stdio':_0x1ca6f7(0x183),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4e3d04,_0x1ca6f7(0x164),_0x1ca6f7(0x18f))+delimiter+process.env.PATH}});_0x558450['on'](_0x1ca6f7(0x19e),_0x2bd7f0=>{const _0x256668=_0x1ca6f7;if(_0x2bd7f0===0x0||_0x2bd7f0===null)_0x1562ec();else _0x2e625a(new Error(_0x256668(0x174)+_0x2bd7f0));}),_0x558450['on'](_0x1ca6f7(0x173),_0x2e625a);});}const runFlags=[{'name':a245_0x517c89(0x17e),'type':a245_0x517c89(0x162),'description':a245_0x517c89(0x16a),'default':![]}];export const runDefinition={'service':a245_0x517c89(0x18e),'command':a245_0x517c89(0x18e),'description':a245_0x517c89(0x196),'risk':a245_0x517c89(0x186),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0x517c89(0x182),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x8b90fa=a245_0x517c89,_0x394de5=[];return _0x394de5[_0x8b90fa(0x194)](_0x8b90fa(0x198)),_0x394de5[_0x8b90fa(0x194)](_0x8b90fa(0x161)+CLI_BIN_NAME+_0x8b90fa(0x189)),_0x394de5[_0x8b90fa(0x194)](_0x8b90fa(0x161)+CLI_BIN_NAME+_0x8b90fa(0x170)),_0x394de5[_0x8b90fa(0x194)](_0x8b90fa(0x161)+CLI_BIN_NAME+_0x8b90fa(0x169)),_0x394de5['push'](_0x8b90fa(0x161)+CLI_BIN_NAME+_0x8b90fa(0x19d)),_0x394de5[_0x8b90fa(0x17b)]('\x0a');},async 'execute'(_0x1ce304){const _0x45cdd7=a245_0x517c89,_0x4e5a97=process[_0x45cdd7(0x175)](),_0x2fb32d=_0x1ce304[_0x45cdd7(0x178)][0x0],_0x554550=_0x1ce304[_0x45cdd7(0x178)]['slice'](0x1),_0x58be1b=readPackageScripts(_0x4e5a97);if(!_0x58be1b)throw CliErrors[_0x45cdd7(0x165)](_0x45cdd7(0x16b));if(!_0x2fb32d){const _0x5b3f8b=Object['keys'](_0x58be1b);if(_0x5b3f8b[_0x45cdd7(0x15b)]===0x0)console[_0x45cdd7(0x166)](_0x45cdd7(0x177));else{console[_0x45cdd7(0x166)](_0x45cdd7(0x16f));for(const _0x2ee6df of _0x5b3f8b){console[_0x45cdd7(0x166)](_0x45cdd7(0x161)+_0x2ee6df);}console[_0x45cdd7(0x166)](_0x45cdd7(0x160)+CLI_BIN_NAME+_0x45cdd7(0x187));}return{'ok':!![]};}if(!_0x58be1b[_0x2fb32d])throw CliErrors[_0x45cdd7(0x165)](_0x45cdd7(0x17a)+_0x2fb32d+_0x45cdd7(0x180),_0x45cdd7(0x184)+(Object[_0x45cdd7(0x15f)](_0x58be1b)[_0x45cdd7(0x17b)](',\x20')||'(none)'));const _0x112386=detectPackageManager(_0x4e5a97),_0x498b2f=syncProjectDomainRoutingBeforeScript(_0x4e5a97,_0x2fb32d);_0x498b2f?.[_0x45cdd7(0x16d)]&&console['error']('Domain\x20routing\x20synchronized:\x20'+_0x498b2f[_0x45cdd7(0x16c)]);VERSION_CHECK_SCRIPTS['has'](_0x2fb32d)&&await versionCheck(_0x4e5a97);if(_0x2fb32d===_0x45cdd7(0x163)&&_0x1ce304[_0x45cdd7(0x15c)](_0x45cdd7(0x17e)))return await Promise[_0x45cdd7(0x192)]([spawnViteBuildWatch(_0x4e5a97),spawnVitePreview(_0x4e5a97)]),{'ok':!![]};return await spawnScript(_0x112386,_0x2fb32d,_0x554550,_0x4e5a97),{'ok':!![]};}};function a245_0x518a(){const _0x379553=['utf-8','length','bool','package.json','belowMinimum','keys','\x0a\x20\x20Usage:\x20','\x20\x20\x20\x20','boolean','preview','node_modules','validation','log','pnpm-lock.yaml','vite','\x20run\x20preview','Enable\x20watch\x20mode\x20for\x20preview','No\x20package.json\x20found\x20in\x20current\x20directory.','path','changed','needsUpgrade','\x0a\x20\x20Available\x20scripts:\x0a','\x20run\x20build','\x20run\x20','build','error','vite\x20preview\x20exited\x20with\x20code\x20','cwd','2080090KWFpCD','No\x20scripts\x20defined\x20in\x20package.json.','args','scripts','Script\x20\x22','join','bun.lockb','bun.lock','watch','yarn','\x22\x20not\x20found\x20in\x20package.json.','280LuNSJO','script','inherit','Available:\x20','bun','write','\x20run\x20<script>\x0a','348363IrZbzO','\x20run\x20start','264lCeBWZ','20kDNhkb','482926qrgivn','79464djNnfW','run','.bin','--watch','209037gAbcXA','all','373368OllDPw','push','parse','Run\x20a\x20package.json\x20script','172972toSnkN','\x20\x20EXAMPLES','yarn.lock','npm','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','start','\x20run\x20preview\x20--watch','close'];a245_0x518a=function(){return _0x379553;};return a245_0x518a();}
@@ -1 +1 @@
1
- function a246_0x134b(_0x3688fa,_0x4eeca1){_0x3688fa=_0x3688fa-0x1c0;const _0x36ec7b=a246_0x36ec();let _0x134b5b=_0x36ec7b[_0x3688fa];return _0x134b5b;}const a246_0x4bc652=a246_0x134b;(function(_0x40e6cd,_0xf2c737){const _0x51128f=a246_0x134b,_0x550f9a=_0x40e6cd();while(!![]){try{const _0x20fb1f=-parseInt(_0x51128f(0x1c7))/0x1*(-parseInt(_0x51128f(0x1c2))/0x2)+parseInt(_0x51128f(0x1c1))/0x3+parseInt(_0x51128f(0x1cc))/0x4+-parseInt(_0x51128f(0x1ca))/0x5+parseInt(_0x51128f(0x1c4))/0x6+-parseInt(_0x51128f(0x1c8))/0x7*(parseInt(_0x51128f(0x1c0))/0x8)+-parseInt(_0x51128f(0x1cb))/0x9;if(_0x20fb1f===_0xf2c737)break;else _0x550f9a['push'](_0x550f9a['shift']());}catch(_0x5db6b1){_0x550f9a['push'](_0x550f9a['shift']());}}}(a246_0x36ec,0x820a9));function a246_0x36ec(){const _0x536496=['15658119zchDNk','4224532LDWVzl','1510752IPPeMR','2620899PDzDcj','26296ZfUMmo','json','482172qpmttD','Export\x20machine-readable\x20command\x20schema\x20(JSON)','read','58KqVrBz','14YLfpWf','schema','612920IfLRgD'];a246_0x36ec=function(){return _0x536496;};return a246_0x36ec();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x50ab76){const _0x3b422d=await buildSchemaPayload();return{'ok':!![],'data':_0x3b422d};}export const schemaDefinition={'service':a246_0x4bc652(0x1c9),'command':'export','description':a246_0x4bc652(0x1c5),'risk':a246_0x4bc652(0x1c6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x4bc652(0x1c3),'flags':[],'execute':execute};
1
+ const a246_0x3caf3d=a246_0x39e7;function a246_0x2591(){const _0x1326c9=['4509603vLiViO','6101809jGeehq','1578EiWhXk','8DTyIIc','read','36NHALOG','915920WBvgwY','schema','export','36790zumsLX','187uINyJV','190131FibaCD','json','3023rdncnk','5529927tVnumC','438xEtdmT','84KtaWIv'];a246_0x2591=function(){return _0x1326c9;};return a246_0x2591();}(function(_0x3253c8,_0x463b7d){const _0xfc726b=a246_0x39e7,_0x4b1cce=_0x3253c8();while(!![]){try{const _0x15c375=-parseInt(_0xfc726b(0xbf))/0x1*(-parseInt(_0xfc726b(0xb0))/0x2)+-parseInt(_0xfc726b(0xbd))/0x3*(parseInt(_0xfc726b(0xb7))/0x4)+-parseInt(_0xfc726b(0xbb))/0x5*(-parseInt(_0xfc726b(0xb4))/0x6)+parseInt(_0xfc726b(0xb3))/0x7+parseInt(_0xfc726b(0xb5))/0x8*(-parseInt(_0xfc726b(0xb2))/0x9)+-parseInt(_0xfc726b(0xb8))/0xa*(-parseInt(_0xfc726b(0xbc))/0xb)+-parseInt(_0xfc726b(0xb1))/0xc*(parseInt(_0xfc726b(0xaf))/0xd);if(_0x15c375===_0x463b7d)break;else _0x4b1cce['push'](_0x4b1cce['shift']());}catch(_0x48947c){_0x4b1cce['push'](_0x4b1cce['shift']());}}}(a246_0x2591,0xee7bd));import{buildSchemaPayload}from'../framework/schema-export.js';function a246_0x39e7(_0x208a16,_0x8da7c2){_0x208a16=_0x208a16-0xaf;const _0x2591d0=a246_0x2591();let _0x39e75c=_0x2591d0[_0x208a16];return _0x39e75c;}async function execute(_0x114725){const _0x119d6d=await buildSchemaPayload();return{'ok':!![],'data':_0x119d6d};}export const schemaDefinition={'service':a246_0x3caf3d(0xb9),'command':a246_0x3caf3d(0xba),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a246_0x3caf3d(0xb6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x3caf3d(0xbe),'flags':[],'execute':execute};