@lovrabet/rabetbase-cli 2.5.8 → 2.5.9

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 +6 -6
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.d.ts +8 -5
  162. package/lib/commands/kb/shared.js +1 -1
  163. package/lib/commands/kb/update.js +1 -1
  164. package/lib/commands/logs/index.js +1 -1
  165. package/lib/commands/menu/asset-update.js +1 -1
  166. package/lib/commands/menu/delete.js +1 -1
  167. package/lib/commands/menu/external-link-create.js +1 -1
  168. package/lib/commands/menu/external-link-update.js +1 -1
  169. package/lib/commands/menu/group-create.js +1 -1
  170. package/lib/commands/menu/group-update.js +1 -1
  171. package/lib/commands/menu/index.js +1 -1
  172. package/lib/commands/menu/list.js +1 -1
  173. package/lib/commands/menu/move.js +1 -1
  174. package/lib/commands/menu/regroup-start.js +1 -1
  175. package/lib/commands/menu/rename.js +1 -1
  176. package/lib/commands/menu/shared/compare-table.js +1 -1
  177. package/lib/commands/menu/shared/delete-plan.js +1 -1
  178. package/lib/commands/menu/shared/facts.js +1 -1
  179. package/lib/commands/menu/shared/index.js +1 -1
  180. package/lib/commands/menu/shared/inquirer.js +1 -1
  181. package/lib/commands/menu/shared/local-pages.js +1 -1
  182. package/lib/commands/menu/shared/logic.js +1 -1
  183. package/lib/commands/menu/shared/mutations.js +1 -1
  184. package/lib/commands/menu/shared/path.js +1 -1
  185. package/lib/commands/menu/shared/service.js +1 -1
  186. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  187. package/lib/commands/menu/shared/sync-core.js +1 -1
  188. package/lib/commands/menu/shared/update-core.js +1 -1
  189. package/lib/commands/menu/shared/valid-url.js +1 -1
  190. package/lib/commands/menu/subapp-assets-status.js +1 -1
  191. package/lib/commands/menu/subapp-assets-update.js +1 -1
  192. package/lib/commands/menu/sync.js +1 -1
  193. package/lib/commands/menu/visibility-update.js +1 -1
  194. package/lib/commands/notification/config-create.js +1 -1
  195. package/lib/commands/notification/config-delete.js +1 -1
  196. package/lib/commands/notification/config-list.js +1 -1
  197. package/lib/commands/notification/config-update.js +1 -1
  198. package/lib/commands/notification/index.js +1 -1
  199. package/lib/commands/notification/shared.js +1 -1
  200. package/lib/commands/ocr/index.js +1 -1
  201. package/lib/commands/page/create.js +1 -1
  202. package/lib/commands/page/custom/detail.js +1 -1
  203. package/lib/commands/page/custom/list.js +1 -1
  204. package/lib/commands/page/custom/publish.js +1 -1
  205. package/lib/commands/page/custom/shared.js +1 -1
  206. package/lib/commands/page/custom/syntax.js +1 -1
  207. package/lib/commands/page/custom/update.js +1 -1
  208. package/lib/commands/page/data-list-status.js +1 -1
  209. package/lib/commands/page/generate-start.js +1 -1
  210. package/lib/commands/page/generate-status.js +1 -1
  211. package/lib/commands/page/index.js +1 -1
  212. package/lib/commands/page/pull.js +1 -1
  213. package/lib/commands/page/push.js +1 -1
  214. package/lib/commands/page/relation-audit.js +1 -1
  215. package/lib/commands/page/restore.js +1 -1
  216. package/lib/commands/page/shared.js +1 -1
  217. package/lib/commands/page/sync.js +1 -1
  218. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  219. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  220. package/lib/commands/project/create/format-elapsed.js +1 -1
  221. package/lib/commands/project/create/main.js +1 -1
  222. package/lib/commands/project/create/materialize-project-template.js +1 -1
  223. package/lib/commands/project/create/project-name.js +1 -1
  224. package/lib/commands/project/create/project-template-archive.js +1 -1
  225. package/lib/commands/project/create/project-template-path.js +1 -1
  226. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  227. package/lib/commands/project/create/use-format-code.js +1 -1
  228. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  229. package/lib/commands/project/domain-routing-sync.js +1 -1
  230. package/lib/commands/project/index.js +1 -1
  231. package/lib/commands/project/upgrade.js +1 -1
  232. package/lib/commands/registry.js +1 -1
  233. package/lib/commands/role/delete.js +1 -1
  234. package/lib/commands/role/detail.js +1 -1
  235. package/lib/commands/role/index.js +1 -1
  236. package/lib/commands/role/list.js +1 -1
  237. package/lib/commands/role/shared.js +1 -1
  238. package/lib/commands/role/update.js +1 -1
  239. package/lib/commands/role/user-add.js +1 -1
  240. package/lib/commands/role/user-remove.js +1 -1
  241. package/lib/commands/role/user-resolve.js +1 -1
  242. package/lib/commands/rule/get.js +1 -1
  243. package/lib/commands/rule/index.js +1 -1
  244. package/lib/commands/rule/list.js +1 -1
  245. package/lib/commands/rule/set.js +1 -1
  246. package/lib/commands/rule/shared.d.ts +5 -3
  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.d.ts +14 -11
  292. package/lib/core/api-client.js +1 -1
  293. package/lib/core/bff/config.js +1 -1
  294. package/lib/core/bff/file-system.js +1 -1
  295. package/lib/core/bff/hash.js +1 -1
  296. package/lib/core/bff/hook-directory.js +1 -1
  297. package/lib/core/bff/lock.js +1 -1
  298. package/lib/core/bff/utils.js +1 -1
  299. package/lib/core/cross-db-analysis.js +1 -1
  300. package/lib/core/cross-db-relation.js +1 -1
  301. package/lib/core/db-resolver.js +1 -1
  302. package/lib/core/flow-config.js +1 -1
  303. package/lib/core/instant-api-policy/config.js +1 -1
  304. package/lib/core/kb-management-client.d.ts +2 -2
  305. package/lib/core/kb-management-client.js +1 -1
  306. package/lib/core/kb-search-client.d.ts +3 -1
  307. package/lib/core/kb-search-client.js +1 -1
  308. package/lib/core/page/file-system.js +1 -1
  309. package/lib/core/page/hash.js +1 -1
  310. package/lib/core/page/lock.js +1 -1
  311. package/lib/core/page/lr-smart-jsx.js +1 -1
  312. package/lib/core/sql-index-auditor.js +1 -1
  313. package/lib/core/sql-sync/config.js +1 -1
  314. package/lib/core/sql-sync/file-system.js +1 -1
  315. package/lib/core/sql-sync/hash.js +1 -1
  316. package/lib/core/sql-sync/lock.js +1 -1
  317. package/lib/core/sql-sync/utils.js +1 -1
  318. package/lib/core/sql-validator.js +1 -1
  319. package/lib/errors.js +1 -1
  320. package/lib/framework/build-all-flags.js +1 -1
  321. package/lib/framework/error-output.js +1 -1
  322. package/lib/framework/explicit-yes.js +1 -1
  323. package/lib/framework/flags.js +1 -1
  324. package/lib/framework/help.js +1 -1
  325. package/lib/framework/index.js +1 -1
  326. package/lib/framework/output.js +1 -1
  327. package/lib/framework/response.js +1 -1
  328. package/lib/framework/runner-alias.js +1 -1
  329. package/lib/framework/runner.js +1 -1
  330. package/lib/framework/schema-export.js +1 -1
  331. package/lib/framework/supported-flags.js +1 -1
  332. package/lib/framework/types.js +1 -1
  333. package/lib/generated/build-info.d.ts +4 -4
  334. package/lib/generated/build-info.js +1 -1
  335. package/lib/generated/official-routing.js +1 -1
  336. package/lib/generated/routing-contract.js +1 -1
  337. package/lib/help.js +1 -1
  338. package/lib/postinstall.js +1 -1
  339. package/lib/runtime/confirmation.js +1 -1
  340. package/lib/runtime/event.js +1 -1
  341. package/lib/runtime/index.js +1 -1
  342. package/lib/runtime/queue.js +1 -1
  343. package/lib/runtime/resolve.js +1 -1
  344. package/lib/services/dataset-design/checkpoint.js +1 -1
  345. package/lib/services/dataset-design/commands.js +1 -1
  346. package/lib/services/dataset-design/contract.js +1 -1
  347. package/lib/skills/builtin-skill.js +1 -1
  348. package/lib/skills/main.js +1 -1
  349. package/lib/skills/npx-skills-add.js +1 -1
  350. package/lib/skills/skill-presence.js +1 -1
  351. package/lib/telemetry/cli-command-trace.js +1 -1
  352. package/lib/telemetry/cli-help-trace.js +1 -1
  353. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  354. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  355. package/lib/telemetry/send-cli-trace-log.js +1 -1
  356. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  357. package/lib/utils/ai_config.js +1 -1
  358. package/lib/utils/apply-jq-filter.js +1 -1
  359. package/lib/utils/cdn-config.js +1 -1
  360. package/lib/utils/check-sdk-version.js +1 -1
  361. package/lib/utils/cli-version-check.js +1 -1
  362. package/lib/utils/cli-version-policy.js +1 -1
  363. package/lib/utils/config.js +1 -1
  364. package/lib/utils/entity-with-id.js +1 -1
  365. package/lib/utils/file-utils.js +1 -1
  366. package/lib/utils/guides-cdn.js +1 -1
  367. package/lib/utils/http-client.js +1 -1
  368. package/lib/utils/is-non-interactive.js +1 -1
  369. package/lib/utils/logger.js +1 -1
  370. package/lib/utils/params.js +1 -1
  371. package/lib/utils/platform.js +1 -1
  372. package/lib/utils/sleep.js +1 -1
  373. package/lib/utils/template-replacer.js +1 -1
  374. package/lib/utils/update-notice.js +1 -1
  375. package/lib/utils/version.js +1 -1
  376. package/lib/utils/with-active-cookie.js +1 -1
  377. package/lib/utils/write-cli-side-channel.js +1 -1
  378. package/package.json +1 -1
  379. package/skills/rabetbase/SKILL.md +1 -1
  380. package/skills/rabetbase/references/rabetbase-kb.md +17 -15
  381. package/skills/rabetbase/references/rabetbase-rule.md +8 -6
  382. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  383. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  384. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a232_0x4299d3=a232_0x453d;(function(_0x31e2bf,_0x47572e){const _0x4310f2=a232_0x453d,_0xd310ec=_0x31e2bf();while(!![]){try{const _0x2b84ee=parseInt(_0x4310f2(0x8b))/0x1+parseInt(_0x4310f2(0x85))/0x2+-parseInt(_0x4310f2(0x8f))/0x3+parseInt(_0x4310f2(0x90))/0x4+parseInt(_0x4310f2(0x84))/0x5*(-parseInt(_0x4310f2(0x92))/0x6)+-parseInt(_0x4310f2(0x88))/0x7+parseInt(_0x4310f2(0x86))/0x8;if(_0x2b84ee===_0x47572e)break;else _0xd310ec['push'](_0xd310ec['shift']());}catch(_0x4f4ccf){_0xd310ec['push'](_0xd310ec['shift']());}}}(a232_0x2be6,0xb95a9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a232_0x2be6(){const _0x59ec62=['Show\x20a\x20single\x20role\x27s\x20detail','2649945aThvqn','3886112rUgkFF','roleName','7248euUDBi','4735zGMIij','614354pCtXst','8801432kEVukm','appCode','1831550xaKuvx','detail','dev','669266JSfQXM','read','Role\x20'];a232_0x2be6=function(){return _0x59ec62;};return a232_0x2be6();}function a232_0x453d(_0x1525b1,_0x3d5cdf){_0x1525b1=_0x1525b1-0x84;const _0x2be69d=a232_0x2be6();let _0x453d58=_0x2be69d[_0x1525b1];return _0x453d58;}export const roleDetail={'service':'role','command':a232_0x4299d3(0x89),'description':a232_0x4299d3(0x8e),'risk':a232_0x4299d3(0x8c),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4031ee){const _0x1d8e08=a232_0x4299d3,_0xabc550=_0x4031ee['num']('id'),_0x4c5472=await getRoleById(_0x4031ee[_0x1d8e08(0x87)],_0xabc550);return{'ok':!![],'data':{'scope':_0x1d8e08(0x8a),'role':projectRole(_0x4c5472)},'message':_0x1d8e08(0x8d)+_0x4c5472[_0x1d8e08(0x91)]+'\x20('+_0x4c5472['roleType']+')'};}};
1
+ const a232_0x5814e9=a232_0xb8e5;(function(_0x294114,_0x1e43a7){const _0x147981=a232_0xb8e5,_0x37ea5a=_0x294114();while(!![]){try{const _0x312827=parseInt(_0x147981(0x18f))/0x1*(parseInt(_0x147981(0x198))/0x2)+-parseInt(_0x147981(0x18c))/0x3*(-parseInt(_0x147981(0x191))/0x4)+-parseInt(_0x147981(0x19b))/0x5*(-parseInt(_0x147981(0x199))/0x6)+parseInt(_0x147981(0x197))/0x7*(-parseInt(_0x147981(0x193))/0x8)+-parseInt(_0x147981(0x18b))/0x9+parseInt(_0x147981(0x18a))/0xa+parseInt(_0x147981(0x192))/0xb*(-parseInt(_0x147981(0x196))/0xc);if(_0x312827===_0x1e43a7)break;else _0x37ea5a['push'](_0x37ea5a['shift']());}catch(_0x49cc1d){_0x37ea5a['push'](_0x37ea5a['shift']());}}}(a232_0x2167,0xe512d));function a232_0xb8e5(_0x7023a8,_0x574a3e){_0x7023a8=_0x7023a8-0x189;const _0x21677d=a232_0x2167();let _0xb8e52d=_0x21677d[_0x7023a8];return _0xb8e52d;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a232_0x2167(){const _0x1820a0=['17350152qZCkmN','497mrdJdc','14usDXCG','11009472dAkRJK','roleName','5CEoTej','Show\x20a\x20single\x20role\x27s\x20detail','dev','roleType','1173820fyyMwq','11909925JuXmen','10677obehEE','role','appCode','197431ReoLid','read','996OBigeV','11qKBflq','57808YXnCdZ','Role\x20','detail'];a232_0x2167=function(){return _0x1820a0;};return a232_0x2167();}export const roleDetail={'service':a232_0x5814e9(0x18d),'command':a232_0x5814e9(0x195),'description':a232_0x5814e9(0x19c),'risk':a232_0x5814e9(0x190),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x11484d){const _0x155b66=a232_0x5814e9,_0x416d84=_0x11484d['num']('id'),_0x2fab7f=await getRoleById(_0x11484d[_0x155b66(0x18e)],_0x416d84);return{'ok':!![],'data':{'scope':_0x155b66(0x19d),'role':projectRole(_0x2fab7f)},'message':_0x155b66(0x194)+_0x2fab7f[_0x155b66(0x19a)]+'\x20('+_0x2fab7f[_0x155b66(0x189)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x241420,_0x5ddd8){const _0x56bc7e=a233_0x2862,_0x206212=_0x241420();while(!![]){try{const _0x6e3731=-parseInt(_0x56bc7e(0x7e))/0x1+parseInt(_0x56bc7e(0x81))/0x2*(-parseInt(_0x56bc7e(0x7a))/0x3)+parseInt(_0x56bc7e(0x7d))/0x4*(parseInt(_0x56bc7e(0x7b))/0x5)+-parseInt(_0x56bc7e(0x80))/0x6*(-parseInt(_0x56bc7e(0x84))/0x7)+parseInt(_0x56bc7e(0x82))/0x8+-parseInt(_0x56bc7e(0x7c))/0x9+-parseInt(_0x56bc7e(0x7f))/0xa*(parseInt(_0x56bc7e(0x83))/0xb);if(_0x6e3731===_0x5ddd8)break;else _0x206212['push'](_0x206212['shift']());}catch(_0x4a8726){_0x206212['push'](_0x206212['shift']());}}}(a233_0x2bb9,0x885d8));import{roleList}from'../../commands/role/list.js';function a233_0x2862(_0x26bb6e,_0x328009){_0x26bb6e=_0x26bb6e-0x7a;const _0x2bb98b=a233_0x2bb9();let _0x286224=_0x2bb98b[_0x26bb6e];return _0x286224;}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a233_0x2bb9(){const _0x44a484=['44JRANln','261367pQvFoS','65290XCVheI','6thNBOI','2GcdRYw','3024624mISBKH','22oyQsAA','2358804nNYCrH','2216703cOYqKo','415355jUPtEW','512577IhhsHK'];a233_0x2bb9=function(){return _0x44a484;};return a233_0x2bb9();}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x135853,_0x2f66b3){const _0x16cd9a=a233_0x3c2d,_0x106168=_0x135853();while(!![]){try{const _0x2ca844=parseInt(_0x16cd9a(0x99))/0x1+parseInt(_0x16cd9a(0x94))/0x2+parseInt(_0x16cd9a(0x95))/0x3*(parseInt(_0x16cd9a(0x9c))/0x4)+-parseInt(_0x16cd9a(0x9a))/0x5*(parseInt(_0x16cd9a(0x92))/0x6)+-parseInt(_0x16cd9a(0x9b))/0x7*(-parseInt(_0x16cd9a(0x98))/0x8)+parseInt(_0x16cd9a(0x96))/0x9*(-parseInt(_0x16cd9a(0x9d))/0xa)+parseInt(_0x16cd9a(0x97))/0xb*(-parseInt(_0x16cd9a(0x93))/0xc);if(_0x2ca844===_0x2f66b3)break;else _0x106168['push'](_0x106168['shift']());}catch(_0x88ffff){_0x106168['push'](_0x106168['shift']());}}}(a233_0x14c5,0x7c526));import{roleList}from'../../commands/role/list.js';function a233_0x14c5(){const _0x55b6a1=['1723445jYBgTs','7BgJxzz','24UaucIh','93080jewpnv','6DPyTfx','1092972RihxYX','1372058VIJCUS','463881XMadhH','909gRrvjS','77PfpDlG','5474864pHqCFu','133437Ebndfn'];a233_0x14c5=function(){return _0x55b6a1;};return a233_0x14c5();}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';function a233_0x3c2d(_0x2ab53a,_0x4f2f4f){_0x2ab53a=_0x2ab53a-0x92;const _0x14c558=a233_0x14c5();let _0x3c2dc4=_0x14c558[_0x2ab53a];return _0x3c2dc4;}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_0x1cabde=a234_0x3065;function a234_0x299c(){const _0xd71074=['9qLWWiR','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','12IPUorA','370DhibtU','Page\x20size\x20(1-100)','1247631KAEESV','str','179rDqbRY','11333rAxSqe','4129016LKvnJl','ADMIN','num','Filter\x20by\x20role\x20type','2724640exsVfy','2323945dWAoWL','CUSTOM','pagesize','list','5947106hWbIwT','type','filter','OWNER','2322VbWDGt','map','4onUutj','Found\x20','dev','page','DEV','toUpperCase','roleType','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Invalid\x20--type\x20\x22','Use\x20one\x20of:\x20','validation','string','number','Page\x20index\x20(1-based)','role','length','join'];a234_0x299c=function(){return _0xd71074;};return a234_0x299c();}(function(_0x51ffb5,_0x3e8ee6){const _0x4a5549=a234_0x3065,_0x5dd5f9=_0x51ffb5();while(!![]){try{const _0x5e4a77=-parseInt(_0x4a5549(0xa3))/0x1*(parseInt(_0x4a5549(0x9f))/0x2)+-parseInt(_0x4a5549(0xa1))/0x3+-parseInt(_0x4a5549(0x8b))/0x4*(-parseInt(_0x4a5549(0xaa))/0x5)+-parseInt(_0x4a5549(0x89))/0x6*(parseInt(_0x4a5549(0xa4))/0x7)+parseInt(_0x4a5549(0xa5))/0x8*(parseInt(_0x4a5549(0x9c))/0x9)+parseInt(_0x4a5549(0xa9))/0xa+-parseInt(_0x4a5549(0x85))/0xb*(-parseInt(_0x4a5549(0x9e))/0xc);if(_0x5e4a77===_0x3e8ee6)break;else _0x5dd5f9['push'](_0x5dd5f9['shift']());}catch(_0x4dd6bc){_0x5dd5f9['push'](_0x5dd5f9['shift']());}}}(a234_0x299c,0xaf691));function a234_0x3065(_0x4d90bd,_0x462a62){_0x4d90bd=_0x4d90bd-0x85;const _0x299ce2=a234_0x299c();let _0x3065d0=_0x299ce2[_0x4d90bd];return _0x3065d0;}import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x1cabde(0xa6),a234_0x1cabde(0x8f),a234_0x1cabde(0x88),a234_0x1cabde(0xab)];export const roleList={'service':a234_0x1cabde(0x99),'command':a234_0x1cabde(0xad),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x1cabde(0x86),'type':a234_0x1cabde(0x96),'required':![],'description':a234_0x1cabde(0xa8),'enum':ROLE_TYPES},{'name':a234_0x1cabde(0x8e),'type':a234_0x1cabde(0x97),'description':a234_0x1cabde(0x98),'default':0x1},{'name':'pagesize','type':'number','description':a234_0x1cabde(0xa0),'default':0x64}],async 'validate'(_0x464f4f){const _0x38eee7=a234_0x1cabde,_0x1bc5a3=_0x464f4f[_0x38eee7(0xa2)](_0x38eee7(0x86))['trim']();if(_0x1bc5a3&&!ROLE_TYPES['includes'](_0x1bc5a3[_0x38eee7(0x90)]()))throw CliErrors[_0x38eee7(0x95)](_0x38eee7(0x93)+_0x1bc5a3+'\x22.',_0x38eee7(0x94)+ROLE_TYPES[_0x38eee7(0x9b)](',\x20')+'.');const _0x24fe44=_0x464f4f[_0x38eee7(0xa7)](_0x38eee7(0x8e),0x1),_0x2493c2=_0x464f4f[_0x38eee7(0xa7)](_0x38eee7(0xac),0x64);if(_0x24fe44<0x1)throw CliErrors[_0x38eee7(0x95)](_0x38eee7(0x9d));if(_0x2493c2<0x1||_0x2493c2>0x64)throw CliErrors[_0x38eee7(0x95)](_0x38eee7(0x92));},async 'execute'(_0x3ecdb0){const _0x580774=a234_0x1cabde,_0x3343f3=_0x3ecdb0[_0x580774(0xa7)]('page',0x1)||0x1,_0x4a4c0c=_0x3ecdb0[_0x580774(0xa7)]('pagesize',0x64)||0x64,_0x587503=_0x3ecdb0[_0x580774(0xa2)](_0x580774(0x86))['trim']()[_0x580774(0x90)](),{items:_0x5bea27,paging:_0x372c7e}=await listAppRoles(_0x3ecdb0['appCode'],{'currentPage':_0x3343f3,'pageSize':_0x4a4c0c}),_0x2de471=_0x587503?_0x5bea27[_0x580774(0x87)](_0x572ce1=>_0x572ce1[_0x580774(0x91)]===_0x587503):_0x5bea27,_0x29e9b5=_0x2de471[_0x580774(0x8a)](projectRole);return{'ok':!![],'data':{'scope':_0x580774(0x8d),'roles':_0x29e9b5,'paging':_0x372c7e},'message':_0x580774(0x8c)+_0x29e9b5[_0x580774(0x9a)]+'\x20role(s)'};}};
1
+ const a234_0x3a13cd=a234_0x2278;function a234_0x1d6f(){const _0x39159d=['1204116dHNgTy','toUpperCase','list','Use\x20one\x20of:\x20','roleType','34753UykZTD','num','3020AfppGm','Filter\x20by\x20role\x20type','DEV','pagesize','length','Page\x20index\x20(1-based)','ADMIN','774720MmHQGt','30KrehcH','type','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','2SGPUMm','string','appCode','4517755VinBJY','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','str','validation','join','Invalid\x20--type\x20\x22','1389czAhvs','7sCzPcs','role','452775ZHDNzj','read','includes','\x20role(s)','dev','CUSTOM','number','OWNER','trim','page','3052368XImCUC'];a234_0x1d6f=function(){return _0x39159d;};return a234_0x1d6f();}(function(_0x48a4cb,_0x246c5e){const _0x5c7c3e=a234_0x2278,_0xcfc66b=_0x48a4cb();while(!![]){try{const _0x212fbb=-parseInt(_0x5c7c3e(0x1ee))/0x1*(-parseInt(_0x5c7c3e(0x1fb))/0x2)+-parseInt(_0x5c7c3e(0x204))/0x3*(parseInt(_0x5c7c3e(0x1f0))/0x4)+-parseInt(_0x5c7c3e(0x207))/0x5+parseInt(_0x5c7c3e(0x212))/0x6*(-parseInt(_0x5c7c3e(0x205))/0x7)+-parseInt(_0x5c7c3e(0x1f7))/0x8+-parseInt(_0x5c7c3e(0x211))/0x9+-parseInt(_0x5c7c3e(0x1f8))/0xa*(-parseInt(_0x5c7c3e(0x1fe))/0xb);if(_0x212fbb===_0x246c5e)break;else _0xcfc66b['push'](_0xcfc66b['shift']());}catch(_0x2a9134){_0xcfc66b['push'](_0xcfc66b['shift']());}}}(a234_0x1d6f,0x2e676));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x3a13cd(0x1f6),a234_0x3a13cd(0x1f2),a234_0x3a13cd(0x20e),a234_0x3a13cd(0x20c)];function a234_0x2278(_0x3a8350,_0x10f0ba){_0x3a8350=_0x3a8350-0x1ee;const _0x1d6f20=a234_0x1d6f();let _0x2278f6=_0x1d6f20[_0x3a8350];return _0x2278f6;}export const roleList={'service':a234_0x3a13cd(0x206),'command':a234_0x3a13cd(0x214),'description':a234_0x3a13cd(0x1fa),'risk':a234_0x3a13cd(0x208),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a234_0x3a13cd(0x1fc),'required':![],'description':a234_0x3a13cd(0x1f1),'enum':ROLE_TYPES},{'name':a234_0x3a13cd(0x210),'type':a234_0x3a13cd(0x20d),'description':a234_0x3a13cd(0x1f5),'default':0x1},{'name':a234_0x3a13cd(0x1f3),'type':'number','description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x4095df){const _0x1834cf=a234_0x3a13cd,_0x1a6e79=_0x4095df[_0x1834cf(0x200)](_0x1834cf(0x1f9))[_0x1834cf(0x20f)]();if(_0x1a6e79&&!ROLE_TYPES[_0x1834cf(0x209)](_0x1a6e79[_0x1834cf(0x213)]()))throw CliErrors[_0x1834cf(0x201)](_0x1834cf(0x203)+_0x1a6e79+'\x22.',_0x1834cf(0x215)+ROLE_TYPES[_0x1834cf(0x202)](',\x20')+'.');const _0x460a4e=_0x4095df[_0x1834cf(0x1ef)]('page',0x1),_0x1fcfd0=_0x4095df[_0x1834cf(0x1ef)](_0x1834cf(0x1f3),0x64);if(_0x460a4e<0x1)throw CliErrors[_0x1834cf(0x201)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x1fcfd0<0x1||_0x1fcfd0>0x64)throw CliErrors[_0x1834cf(0x201)](_0x1834cf(0x1ff));},async 'execute'(_0x32b55a){const _0x562e78=a234_0x3a13cd,_0x4e0764=_0x32b55a['num'](_0x562e78(0x210),0x1)||0x1,_0x422330=_0x32b55a[_0x562e78(0x1ef)](_0x562e78(0x1f3),0x64)||0x64,_0x211919=_0x32b55a['str'](_0x562e78(0x1f9))[_0x562e78(0x20f)]()[_0x562e78(0x213)](),{items:_0xa44b65,paging:_0x113587}=await listAppRoles(_0x32b55a[_0x562e78(0x1fd)],{'currentPage':_0x4e0764,'pageSize':_0x422330}),_0x3a9029=_0x211919?_0xa44b65['filter'](_0x2b06fa=>_0x2b06fa[_0x562e78(0x216)]===_0x211919):_0xa44b65,_0x3f3f58=_0x3a9029['map'](projectRole);return{'ok':!![],'data':{'scope':_0x562e78(0x20b),'roles':_0x3f3f58,'paging':_0x113587},'message':'Found\x20'+_0x3f3f58[_0x562e78(0x1f4)]+_0x562e78(0x20a)};}};
@@ -1 +1 @@
1
- const a235_0x278682=a235_0x2021;(function(_0x3131a1,_0x5659fc){const _0x1ee2c4=a235_0x2021,_0x31285f=_0x3131a1();while(!![]){try{const _0x4e1fc4=-parseInt(_0x1ee2c4(0x11a))/0x1*(parseInt(_0x1ee2c4(0x108))/0x2)+-parseInt(_0x1ee2c4(0x120))/0x3*(-parseInt(_0x1ee2c4(0x116))/0x4)+parseInt(_0x1ee2c4(0x119))/0x5*(-parseInt(_0x1ee2c4(0xdb))/0x6)+parseInt(_0x1ee2c4(0xdd))/0x7*(parseInt(_0x1ee2c4(0xf6))/0x8)+-parseInt(_0x1ee2c4(0x11b))/0x9+parseInt(_0x1ee2c4(0xfc))/0xa*(parseInt(_0x1ee2c4(0x109))/0xb)+parseInt(_0x1ee2c4(0xf1))/0xc;if(_0x4e1fc4===_0x5659fc)break;else _0x31285f['push'](_0x31285f['shift']());}catch(_0x421a9a){_0x31285f['push'](_0x31285f['shift']());}}}(a235_0x2329,0x54120));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':'number','required':!![],'description':a235_0x278682(0x103)};export const ROLE_REF_FLAG={'name':a235_0x278682(0x104),'type':a235_0x278682(0xf5),'required':!![],'description':a235_0x278682(0xd2)};export const USER_REF_FLAG={'name':a235_0x278682(0xec),'type':a235_0x278682(0xf5),'required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':a235_0x278682(0xe5),'type':'string','required':!![],'description':a235_0x278682(0x10e)};export const USER_NAME_FLAG={'name':a235_0x278682(0xe5),'type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x278682(0x11d),'type':'string','required':![],'description':a235_0x278682(0x107)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x278682(0xe3),'type':a235_0x278682(0x10d),'required':![],'description':a235_0x278682(0xdf)};export const BUILTIN_ROLE_TYPES=[a235_0x278682(0xe1),'DEV',a235_0x278682(0xed)];export function isBuiltinRole(_0x56de95){const _0x425141=a235_0x278682;return BUILTIN_ROLE_TYPES[_0x425141(0x117)](_0x56de95);}export function assertCustomRole(_0x17cf93,_0x3537e2){const _0x574307=a235_0x278682;if(_0x17cf93[_0x574307(0xfd)]!==_0x574307(0xe8))throw CliErrors[_0x574307(0x115)](_0x574307(0x123)+_0x3537e2+_0x574307(0xff)+_0x17cf93['roleName']+'\x20('+_0x17cf93[_0x574307(0xfd)]+').',_0x574307(0xd8));}export function projectRole(_0x58cb29){const _0xc6ac67=a235_0x278682;return{'id':_0x58cb29['id'],'roleName':_0x58cb29['roleName'],'roleType':_0x58cb29['roleType'],'remark':_0x58cb29[_0xc6ac67(0x11d)],'userCount':_0x58cb29[_0xc6ac67(0xe0)],'permitCount':_0x58cb29[_0xc6ac67(0xf3)],'builtin':isBuiltinRole(_0x58cb29[_0xc6ac67(0xfd)])};}export async function resolveRoleRef(_0x38f1e3,_0x1ff57c){const _0x52c546=a235_0x278682,_0x41b191=_0x1ff57c[_0x52c546(0xea)]();if(!_0x41b191)throw CliErrors[_0x52c546(0x115)](_0x52c546(0xf0),_0x52c546(0xe9));if(/^\d+$/[_0x52c546(0xf8)](_0x41b191))return getRoleById(_0x38f1e3,Number(_0x41b191));const _0x251419=await listAllAppRoles(_0x38f1e3),_0x1fe1b3=_0x251419[_0x52c546(0xd7)](_0x26a61c=>_0x26a61c[_0x52c546(0x118)]===_0x41b191);if(_0x1fe1b3['length']===0x0)throw CliErrors[_0x52c546(0x115)](_0x52c546(0x113)+_0x41b191+'\x22\x20not\x20found\x20in\x20app\x20'+_0x38f1e3+'.',_0x52c546(0xfb));if(_0x1fe1b3[_0x52c546(0x111)]>0x1){const _0x76764f=_0x1fe1b3[_0x52c546(0x114)](_0x4f5eb2=>_0x4f5eb2['id'])['join'](',\x20');throw CliErrors['validation'](_0x52c546(0x113)+_0x41b191+_0x52c546(0x100)+_0x76764f+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x1fe1b3[0x0];}function a235_0x2021(_0x1766f2,_0x48a041){_0x1766f2=_0x1766f2-0xd1;const _0x23293e=a235_0x2329();let _0x202110=_0x23293e[_0x1766f2];return _0x202110;}export async function getRoleById(_0x528042,_0x4432b5){const _0x34f35b=a235_0x278682,_0x14f015=await listAllAppRoles(_0x528042),_0x336290=_0x14f015[_0x34f35b(0xd7)](_0x5754fc=>_0x5754fc['id']===_0x4432b5&&(!_0x5754fc['appCode']||_0x5754fc[_0x34f35b(0x110)]===_0x528042));if(_0x336290[_0x34f35b(0x111)]!==0x1)throw CliErrors[_0x34f35b(0x115)](_0x34f35b(0xee)+_0x4432b5+'\x20not\x20found\x20in\x20app\x20'+_0x528042+'.',_0x34f35b(0x101));return _0x336290[0x0];}async function listAllAppRoles(_0x2ddc48){const _0x193cd2=a235_0x278682,_0x21592e=0x64,_0x586014=[];for(let _0x970b08=0x1;;_0x970b08+=0x1){const {items:_0x54a536,paging:_0x13eb00}=await listAppRoles(_0x2ddc48,{'currentPage':_0x970b08,'pageSize':_0x21592e});_0x586014['push'](..._0x54a536);if(_0x54a536[_0x193cd2(0x111)]<_0x21592e||_0x13eb00&&_0x586014[_0x193cd2(0x111)]>=_0x13eb00['totalCount'])return _0x586014;}}export async function resolveTenantCode(){const _0x13f024=a235_0x278682,_0x168ed6=await getSessionUserInfo(),_0x218fd3=_0x168ed6?.[_0x13f024(0xec)]?.[_0x13f024(0xf9)]?.[_0x13f024(0x11e)];if(!_0x218fd3)throw CliErrors[_0x13f024(0xf7)](_0x13f024(0xd4));return _0x218fd3;}function matchMember(_0x396edc,_0x2aea9b){const _0x3b028d=a235_0x278682,_0x589f02=_0x2aea9b['trim']()[_0x3b028d(0x10b)]();return(_0x396edc[_0x3b028d(0xe7)]??'')[_0x3b028d(0x10b)]()===_0x589f02||(_0x396edc[_0x3b028d(0xe6)]??'')[_0x3b028d(0x10b)]()===_0x589f02;}export async function resolveUserRef(_0x2c6faf,_0x2b718f=a235_0x278682(0xda)){const _0xc27edd=a235_0x278682,_0x4698a6=_0x2c6faf[_0xc27edd(0xea)]();if(!_0x4698a6)throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0xfe),_0xc27edd(0x10c));const _0x107234=await resolveTenantCode(),_0x30fd0e=await getTenantMembers(_0x107234);if(/^\d+$/[_0xc27edd(0xf8)](_0x4698a6)){const _0x4130d6=Number(_0x4698a6),_0x5d137e=_0x30fd0e[_0xc27edd(0x121)](_0x27fa04=>_0x27fa04[_0xc27edd(0xe2)]===_0x4130d6);return{'userId':_0x4130d6,'username':_0x5d137e?.[_0xc27edd(0xe6)]??String(_0x4130d6),'nickname':_0x5d137e?.[_0xc27edd(0xe7)],'matchedBy':'id'};}const _0x44d887=_0x30fd0e[_0xc27edd(0xd7)](_0x407d8f=>matchMember(_0x407d8f,_0x4698a6));if(_0x44d887[_0xc27edd(0x111)]===0x0)throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0xd9)+_0x4698a6+'\x22.','Check\x20the\x20nickname/username.\x20'+_0x2b718f);if(_0x44d887['length']>0x1){const _0x2d6a0d=_0x44d887['map'](_0x238351=>(_0x238351[_0xc27edd(0xe7)]??_0x238351[_0xc27edd(0xe6)]??'?')+'('+_0x238351[_0xc27edd(0xe2)]+')')[_0xc27edd(0xd6)](',\x20');throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0x11f)+_0x4698a6+'\x22:\x20'+_0x2d6a0d+'.',_0x2b718f);}const _0x48597b=_0x44d887[0x0];return{'userId':_0x48597b[_0xc27edd(0xe2)],'username':_0x48597b['username']??String(_0x48597b[_0xc27edd(0xe2)]),'nickname':_0x48597b['nickname'],'matchedBy':_0xc27edd(0xe5)};}export const CREATE_USER_ROLE_PATH=a235_0x278682(0xf2);function a235_0x2329(){const _0x53e7f6=['Pass\x20--user\x20<id>.','726hgtgGv','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','11074urRktI','user-add','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','userCount','ADMIN','userId','expect-user-count','\x20is\x20not\x20a\x20member\x20of\x20role\x20','name','username','nickname','CUSTOM','Pass\x20--role\x20<id|name>.','trim','expectUserCount','user','OWNER','Role\x20id\x20','totalCount','Missing\x20role\x20reference.','8487204VTUnHe','/smartapi/permit/user-role/create','permitCount','\x20duplicate\x20memberships\x20for\x20user\x20','string','2928ykclNm','authRequired','test','tenant','/smartapi/permit/user-role/delete','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','5390bKohQS','roleType','Missing\x20user\x20reference.','\x20built-in\x20role\x20','\x22\x20is\x20ambiguous\x20(ids:\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','str','Role\x20id\x20(from\x20`role\x20list`)','role','push','User\x20','Optional\x20role\x20remark/description','502vOjrry','4829JHBUGJ',';\x20no\x20change.','toLowerCase','Pass\x20--user\x20<id|name>.','number','Role\x20name','POST','appCode','length','\x20members\x20of\x20the\x20OWNER\x20role.','Role\x20name\x20\x22','map','validation','1257868yIMWwu','includes','roleName','7315TBpQuX','2673hqGUJr','5805621DpcEkx','flag','remark','tenant_code','Multiple\x20tenant\x20members\x20match\x20\x22','3WXPWKk','find','Removed\x20','Cannot\x20','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Role\x20id\x20or\x20exact\x20role\x20name','flagMissing','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','join','filter','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','No\x20tenant\x20member\x20matches\x20\x22'];a235_0x2329=function(){return _0x53e7f6;};return a235_0x2329();}export const DELETE_USER_ROLE_PATH=a235_0x278682(0xfa);export function computeRoleUserMutation(_0x1acd57){const _0x28b4f2=a235_0x278682,{operation:_0x3b8065,appCode:_0x16e491,role:_0x5050ba,relations:_0x8072f4,user:_0x427d73}=_0x1acd57,_0x234327=[...new Set(_0x8072f4[_0x28b4f2(0x114)](_0x40f09c=>_0x40f09c[_0x28b4f2(0xe2)]))],_0xa018fe=[];if(_0x1acd57[_0x28b4f2(0xeb)]!==undefined&&_0x1acd57[_0x28b4f2(0xeb)]!==_0x234327[_0x28b4f2(0x111)])throw CliErrors[_0x28b4f2(0x115)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x1acd57['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x234327[_0x28b4f2(0x111)]+'.',_0x28b4f2(0xd5));const _0x113c7d=_0x234327[_0x28b4f2(0x117)](_0x427d73[_0x28b4f2(0xe2)]),_0x2f0b08=_0x8072f4['filter'](_0x2e11a4=>_0x2e11a4['userId']===_0x427d73[_0x28b4f2(0xe2)])[_0x28b4f2(0x114)](_0x8e2c97=>_0x8e2c97['id']),_0x353a72=_0x3b8065==='user-add'?!_0x113c7d:_0x113c7d;let _0x312076=_0x234327;_0x3b8065==='user-add'?_0x113c7d?_0xa018fe['push']('User\x20'+_0x427d73[_0x28b4f2(0xe2)]+_0x28b4f2(0xd1)+_0x5050ba['roleName']+_0x28b4f2(0x10a)):_0x312076=[..._0x234327,_0x427d73[_0x28b4f2(0xe2)]]:!_0x113c7d?_0xa018fe['push'](_0x28b4f2(0x106)+_0x427d73['userId']+_0x28b4f2(0xe4)+_0x5050ba['roleName']+_0x28b4f2(0x10a)):(_0x312076=_0x234327[_0x28b4f2(0xd7)](_0x4ae4d1=>_0x4ae4d1!==_0x427d73['userId']),_0x2f0b08[_0x28b4f2(0x111)]>0x1&&_0xa018fe[_0x28b4f2(0x105)](_0x28b4f2(0x122)+_0x2f0b08['length']+_0x28b4f2(0xf4)+_0x427d73[_0x28b4f2(0xe2)]+'.'));const _0x5e15f9={'scope':'dev','operation':_0x3b8065,'selector':{'appCode':_0x16e491,'roleId':_0x5050ba['id'],'roleName':_0x5050ba['roleName'],'userId':_0x427d73[_0x28b4f2(0xe2)]},'before':{'userIds':_0x234327},'after':{'userIds':_0x312076},'dryRun':_0x1acd57['dryRun'],'backend':{'method':_0x28b4f2(0x10f),'path':_0x3b8065===_0x28b4f2(0xde)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0xa018fe};return{'mutation':_0x5e15f9,'changed':_0x353a72,'matchingRelationIds':_0x2f0b08};}export async function loadDevRoleRelations(_0x5989bf,_0x6c9c40){const _0x32d70f=a235_0x278682,_0x360fcc=0x64,_0x58be30=[];for(let _0x33ea17=0x1;;_0x33ea17+=0x1){const {items:_0x476743,paging:_0x43f334}=await listDevUserRoleRelations(_0x5989bf,{'roleId':_0x6c9c40,'currentPage':_0x33ea17,'pageSize':_0x360fcc});_0x58be30[_0x32d70f(0x105)](..._0x476743);if(_0x476743[_0x32d70f(0x111)]<_0x360fcc||_0x43f334&&_0x58be30['length']>=_0x43f334[_0x32d70f(0xef)])return _0x58be30;}}export function readRoleRef(_0x1d4239){const _0x181417=a235_0x278682,_0x2c0f01=_0x1d4239[_0x181417(0x102)](_0x181417(0x104))[_0x181417(0xea)]();if(!_0x2c0f01)throw CliErrors[_0x181417(0xd3)](_0x181417(0x104),_0x181417(0xe9));return _0x2c0f01;}export async function prepareUserMutation(_0x433553,_0x189966,_0x1eafe7){const _0x5ab9db=a235_0x278682,_0x192a1d=readRoleRef(_0x433553),_0x1ba22d=_0x433553[_0x5ab9db(0x102)]('user')['trim']();if(!_0x1ba22d)throw CliErrors['flagMissing'](_0x5ab9db(0xec),_0x5ab9db(0x10c));const _0x33d9a9=_0x433553[_0x5ab9db(0x11c)]('expect-user-count'),_0x94da6f=_0x33d9a9===undefined||_0x33d9a9===null?undefined:Number(_0x33d9a9),_0x2f3117=await resolveRoleRef(_0x433553['appCode'],_0x192a1d);if(_0x2f3117[_0x5ab9db(0xfd)]===_0x5ab9db(0xed))throw CliErrors['validation']('Cannot\x20'+_0x189966+_0x5ab9db(0x112),_0x5ab9db(0xdc));const _0x1e2c92=await resolveUserRef(_0x1ba22d),_0x261891=await loadDevRoleRelations(_0x433553[_0x5ab9db(0x110)],_0x2f3117['id']);return{...computeRoleUserMutation({'operation':_0x189966,'appCode':_0x433553[_0x5ab9db(0x110)],'role':_0x2f3117,'relations':_0x261891,'user':{'userId':_0x1e2c92[_0x5ab9db(0xe2)],'username':_0x1e2c92[_0x5ab9db(0xe6)],'nickname':_0x1e2c92[_0x5ab9db(0xe7)]},'dryRun':_0x1eafe7,..._0x94da6f!==undefined?{'expectUserCount':_0x94da6f}:{}}),'role':_0x2f3117,'user':_0x1e2c92};}
1
+ const a235_0x26e15b=a235_0x1f9c;(function(_0x20bf64,_0x9c3507){const _0x4cc996=a235_0x1f9c,_0x421441=_0x20bf64();while(!![]){try{const _0xf41a5d=-parseInt(_0x4cc996(0x1a2))/0x1*(parseInt(_0x4cc996(0x19b))/0x2)+parseInt(_0x4cc996(0x1a3))/0x3*(-parseInt(_0x4cc996(0x197))/0x4)+parseInt(_0x4cc996(0x169))/0x5+-parseInt(_0x4cc996(0x177))/0x6+-parseInt(_0x4cc996(0x168))/0x7*(-parseInt(_0x4cc996(0x15f))/0x8)+-parseInt(_0x4cc996(0x19f))/0x9+-parseInt(_0x4cc996(0x160))/0xa*(-parseInt(_0x4cc996(0x1a8))/0xb);if(_0xf41a5d===_0x9c3507)break;else _0x421441['push'](_0x421441['shift']());}catch(_0x309e18){_0x421441['push'](_0x421441['shift']());}}}(a235_0x37e4,0xc4ef6));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';function a235_0x37e4(){const _0x587727=['\x20duplicate\x20memberships\x20for\x20user\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','push','role','Disambiguate\x20with\x20--role\x20<id>.','authRequired','roleName','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','join','tenant_code','Anti-drift\x20check\x20failed:\x20expected\x20','7916058CghJqv','user','name','Role\x20id\x20(from\x20`role\x20list`)','toLowerCase','CUSTOM','\x20member(s)\x20but\x20role\x20has\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Pass\x20--user\x20<id>.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x20built-in\x20role\x20','userCount','Missing\x20role\x20reference.','filter','number','\x20is\x20not\x20a\x20member\x20of\x20role\x20','OWNER','\x22\x20not\x20found\x20in\x20app\x20','length','Role\x20id\x20or\x20exact\x20role\x20name','\x20members\x20of\x20the\x20OWNER\x20role.','Pass\x20--user\x20<id|name>.','nickname','Missing\x20user\x20reference.','trim','User\x20','DEV','username','Multiple\x20tenant\x20members\x20match\x20\x22','expectUserCount','totalCount','POST','4eypSuG','ADMIN','\x20not\x20found\x20in\x20app\x20','str','21642KqQySz','flagMissing','string','roleType','7176555eIoWdt','map','userId','8DNuMIj','358257vvgYKn','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Optional\x20role\x20remark/description','appCode','remark','174350razgVV','dryRun','Check\x20the\x20nickname/username.\x20','includes','\x22:\x20','/smartapi/permit/user-role/delete',';\x20no\x20change.','expect-user-count','Cannot\x20','user-add','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','/smartapi/permit/user-role/create','373328weYLWn','1010nzJjyg','Role\x20name\x20\x22','validation','Pass\x20--role\x20<id|name>.','test','No\x20tenant\x20member\x20matches\x20\x22','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Role\x20name','35oYpFiH','6475955QaJtpK','flag','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.'];a235_0x37e4=function(){return _0x587727;};return a235_0x37e4();}export const ROLE_ID_FLAG={'name':'id','type':a235_0x26e15b(0x185),'required':!![],'description':a235_0x26e15b(0x17a)};export const ROLE_REF_FLAG={'name':a235_0x26e15b(0x16f),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x18a)};export const USER_REF_FLAG={'name':a235_0x26e15b(0x178),'type':'string','required':!![],'description':a235_0x26e15b(0x180)};export const NAME_FLAG={'name':a235_0x26e15b(0x179),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x167)};export const USER_NAME_FLAG={'name':a235_0x26e15b(0x179),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x17e)};export const REMARK_FLAG={'name':a235_0x26e15b(0x1a7),'type':a235_0x26e15b(0x19d),'required':![],'description':a235_0x26e15b(0x1a5)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x26e15b(0x15a),'type':a235_0x26e15b(0x185),'required':![],'description':a235_0x26e15b(0x16d)};export const BUILTIN_ROLE_TYPES=[a235_0x26e15b(0x198),a235_0x26e15b(0x191),a235_0x26e15b(0x187)];export function isBuiltinRole(_0x14295b){const _0xffec26=a235_0x26e15b;return BUILTIN_ROLE_TYPES[_0xffec26(0x1ab)](_0x14295b);}export function assertCustomRole(_0x320a1b,_0x233346){const _0x147c95=a235_0x26e15b;if(_0x320a1b[_0x147c95(0x19e)]!==_0x147c95(0x17c))throw CliErrors[_0x147c95(0x162)](_0x147c95(0x15b)+_0x233346+_0x147c95(0x181)+_0x320a1b[_0x147c95(0x172)]+'\x20('+_0x320a1b[_0x147c95(0x19e)]+').',_0x147c95(0x16b));}export function projectRole(_0x4ef16e){const _0x18800d=a235_0x26e15b;return{'id':_0x4ef16e['id'],'roleName':_0x4ef16e['roleName'],'roleType':_0x4ef16e[_0x18800d(0x19e)],'remark':_0x4ef16e[_0x18800d(0x1a7)],'userCount':_0x4ef16e[_0x18800d(0x182)],'permitCount':_0x4ef16e['permitCount'],'builtin':isBuiltinRole(_0x4ef16e[_0x18800d(0x19e)])};}export async function resolveRoleRef(_0x9d0b3b,_0x181f2b){const _0x39a9da=a235_0x26e15b,_0x3035b6=_0x181f2b[_0x39a9da(0x18f)]();if(!_0x3035b6)throw CliErrors[_0x39a9da(0x162)](_0x39a9da(0x183),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x3035b6))return getRoleById(_0x9d0b3b,Number(_0x3035b6));const _0x5bd63e=await listAllAppRoles(_0x9d0b3b),_0x486a57=_0x5bd63e[_0x39a9da(0x184)](_0x2b67d5=>_0x2b67d5[_0x39a9da(0x172)]===_0x3035b6);if(_0x486a57[_0x39a9da(0x189)]===0x0)throw CliErrors['validation'](_0x39a9da(0x161)+_0x3035b6+_0x39a9da(0x188)+_0x9d0b3b+'.',_0x39a9da(0x173));if(_0x486a57[_0x39a9da(0x189)]>0x1){const _0x4ec671=_0x486a57[_0x39a9da(0x1a0)](_0x578cbd=>_0x578cbd['id'])[_0x39a9da(0x174)](',\x20');throw CliErrors[_0x39a9da(0x162)]('Role\x20name\x20\x22'+_0x3035b6+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x4ec671+').',_0x39a9da(0x170));}return _0x486a57[0x0];}export async function getRoleById(_0x47c840,_0x31a6df){const _0x2ccc76=a235_0x26e15b,_0x179b23=await listAllAppRoles(_0x47c840),_0x4f1155=_0x179b23['filter'](_0xcb4fde=>_0xcb4fde['id']===_0x31a6df&&(!_0xcb4fde['appCode']||_0xcb4fde[_0x2ccc76(0x1a6)]===_0x47c840));if(_0x4f1155[_0x2ccc76(0x189)]!==0x1)throw CliErrors[_0x2ccc76(0x162)]('Role\x20id\x20'+_0x31a6df+_0x2ccc76(0x199)+_0x47c840+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x4f1155[0x0];}async function listAllAppRoles(_0x1269e4){const _0x35df30=a235_0x26e15b,_0x4a7329=0x64,_0x119e74=[];for(let _0xae60b2=0x1;;_0xae60b2+=0x1){const {items:_0x29fb5e,paging:_0x27a8b5}=await listAppRoles(_0x1269e4,{'currentPage':_0xae60b2,'pageSize':_0x4a7329});_0x119e74[_0x35df30(0x16e)](..._0x29fb5e);if(_0x29fb5e[_0x35df30(0x189)]<_0x4a7329||_0x27a8b5&&_0x119e74['length']>=_0x27a8b5[_0x35df30(0x195)])return _0x119e74;}}export async function resolveTenantCode(){const _0x20f84c=a235_0x26e15b,_0x47086e=await getSessionUserInfo(),_0x163ddc=_0x47086e?.[_0x20f84c(0x178)]?.['tenant']?.[_0x20f84c(0x175)];if(!_0x163ddc)throw CliErrors[_0x20f84c(0x171)](_0x20f84c(0x166));return _0x163ddc;}function matchMember(_0x577c10,_0x1ffa07){const _0x48dbee=a235_0x26e15b,_0x36e6d8=_0x1ffa07[_0x48dbee(0x18f)]()[_0x48dbee(0x17b)]();return(_0x577c10['nickname']??'')[_0x48dbee(0x17b)]()===_0x36e6d8||(_0x577c10[_0x48dbee(0x192)]??'')[_0x48dbee(0x17b)]()===_0x36e6d8;}export async function resolveUserRef(_0x49cc9e,_0x3f8c54=a235_0x26e15b(0x17f)){const _0xc5b986=a235_0x26e15b,_0x4dd48d=_0x49cc9e[_0xc5b986(0x18f)]();if(!_0x4dd48d)throw CliErrors[_0xc5b986(0x162)](_0xc5b986(0x18e),_0xc5b986(0x18c));const _0x1c0f40=await resolveTenantCode(),_0x11a0ee=await getTenantMembers(_0x1c0f40);if(/^\d+$/[_0xc5b986(0x164)](_0x4dd48d)){const _0x40e2fb=Number(_0x4dd48d),_0x5db90b=_0x11a0ee['find'](_0x3ad589=>_0x3ad589[_0xc5b986(0x1a1)]===_0x40e2fb);return{'userId':_0x40e2fb,'username':_0x5db90b?.[_0xc5b986(0x192)]??String(_0x40e2fb),'nickname':_0x5db90b?.[_0xc5b986(0x18d)],'matchedBy':'id'};}const _0x13fbe3=_0x11a0ee[_0xc5b986(0x184)](_0x22d5fe=>matchMember(_0x22d5fe,_0x4dd48d));if(_0x13fbe3[_0xc5b986(0x189)]===0x0)throw CliErrors['validation'](_0xc5b986(0x165)+_0x4dd48d+'\x22.',_0xc5b986(0x1aa)+_0x3f8c54);if(_0x13fbe3[_0xc5b986(0x189)]>0x1){const _0xcdac24=_0x13fbe3[_0xc5b986(0x1a0)](_0x139f45=>(_0x139f45['nickname']??_0x139f45[_0xc5b986(0x192)]??'?')+'('+_0x139f45[_0xc5b986(0x1a1)]+')')[_0xc5b986(0x174)](',\x20');throw CliErrors[_0xc5b986(0x162)](_0xc5b986(0x193)+_0x4dd48d+_0xc5b986(0x1ac)+_0xcdac24+'.',_0x3f8c54);}const _0x4e89b9=_0x13fbe3[0x0];return{'userId':_0x4e89b9['userId'],'username':_0x4e89b9['username']??String(_0x4e89b9[_0xc5b986(0x1a1)]),'nickname':_0x4e89b9[_0xc5b986(0x18d)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x26e15b(0x15e);export const DELETE_USER_ROLE_PATH=a235_0x26e15b(0x1ad);export function computeRoleUserMutation(_0x49d817){const _0x3934be=a235_0x26e15b,{operation:_0x296c41,appCode:_0x59a597,role:_0x264d43,relations:_0x56c804,user:_0x25a20d}=_0x49d817,_0x550322=[...new Set(_0x56c804[_0x3934be(0x1a0)](_0x25c3e4=>_0x25c3e4[_0x3934be(0x1a1)]))],_0x65bc56=[];if(_0x49d817[_0x3934be(0x194)]!==undefined&&_0x49d817[_0x3934be(0x194)]!==_0x550322[_0x3934be(0x189)])throw CliErrors[_0x3934be(0x162)](_0x3934be(0x176)+_0x49d817[_0x3934be(0x194)]+_0x3934be(0x17d)+_0x550322[_0x3934be(0x189)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x5e93c8=_0x550322['includes'](_0x25a20d[_0x3934be(0x1a1)]),_0x2e6db8=_0x56c804[_0x3934be(0x184)](_0x561777=>_0x561777[_0x3934be(0x1a1)]===_0x25a20d['userId'])[_0x3934be(0x1a0)](_0x4a5b8a=>_0x4a5b8a['id']),_0x384a1d=_0x296c41===_0x3934be(0x15c)?!_0x5e93c8:_0x5e93c8;let _0x54e2e5=_0x550322;_0x296c41==='user-add'?_0x5e93c8?_0x65bc56[_0x3934be(0x16e)](_0x3934be(0x190)+_0x25a20d[_0x3934be(0x1a1)]+_0x3934be(0x1a4)+_0x264d43[_0x3934be(0x172)]+_0x3934be(0x159)):_0x54e2e5=[..._0x550322,_0x25a20d[_0x3934be(0x1a1)]]:!_0x5e93c8?_0x65bc56[_0x3934be(0x16e)](_0x3934be(0x190)+_0x25a20d[_0x3934be(0x1a1)]+_0x3934be(0x186)+_0x264d43[_0x3934be(0x172)]+';\x20no\x20change.'):(_0x54e2e5=_0x550322[_0x3934be(0x184)](_0x370d51=>_0x370d51!==_0x25a20d['userId']),_0x2e6db8[_0x3934be(0x189)]>0x1&&_0x65bc56[_0x3934be(0x16e)]('Removed\x20'+_0x2e6db8[_0x3934be(0x189)]+_0x3934be(0x16c)+_0x25a20d['userId']+'.'));const _0x4eae55={'scope':'dev','operation':_0x296c41,'selector':{'appCode':_0x59a597,'roleId':_0x264d43['id'],'roleName':_0x264d43[_0x3934be(0x172)],'userId':_0x25a20d['userId']},'before':{'userIds':_0x550322},'after':{'userIds':_0x54e2e5},'dryRun':_0x49d817[_0x3934be(0x1a9)],'backend':{'method':_0x3934be(0x196),'path':_0x296c41===_0x3934be(0x15c)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x65bc56};return{'mutation':_0x4eae55,'changed':_0x384a1d,'matchingRelationIds':_0x2e6db8};}function a235_0x1f9c(_0x2e41aa,_0x5e8592){_0x2e41aa=_0x2e41aa-0x159;const _0x37e4b8=a235_0x37e4();let _0x1f9c80=_0x37e4b8[_0x2e41aa];return _0x1f9c80;}export async function loadDevRoleRelations(_0x5c5218,_0xf0239b){const _0x5bbba3=a235_0x26e15b,_0x587f14=0x64,_0x1ff562=[];for(let _0x189cea=0x1;;_0x189cea+=0x1){const {items:_0xfc0e03,paging:_0x11ed23}=await listDevUserRoleRelations(_0x5c5218,{'roleId':_0xf0239b,'currentPage':_0x189cea,'pageSize':_0x587f14});_0x1ff562[_0x5bbba3(0x16e)](..._0xfc0e03);if(_0xfc0e03['length']<_0x587f14||_0x11ed23&&_0x1ff562[_0x5bbba3(0x189)]>=_0x11ed23[_0x5bbba3(0x195)])return _0x1ff562;}}export function readRoleRef(_0x301dc0){const _0x524ee1=a235_0x26e15b,_0x565b8c=_0x301dc0['str'](_0x524ee1(0x16f))[_0x524ee1(0x18f)]();if(!_0x565b8c)throw CliErrors['flagMissing']('role',_0x524ee1(0x163));return _0x565b8c;}export async function prepareUserMutation(_0x1bb38d,_0x239d8f,_0x5c26a4){const _0x353318=a235_0x26e15b,_0x57fb3d=readRoleRef(_0x1bb38d),_0x4101cf=_0x1bb38d[_0x353318(0x19a)](_0x353318(0x178))[_0x353318(0x18f)]();if(!_0x4101cf)throw CliErrors[_0x353318(0x19c)]('user',_0x353318(0x18c));const _0x5331c9=_0x1bb38d[_0x353318(0x16a)](_0x353318(0x15a)),_0x5daf2d=_0x5331c9===undefined||_0x5331c9===null?undefined:Number(_0x5331c9),_0x21e307=await resolveRoleRef(_0x1bb38d[_0x353318(0x1a6)],_0x57fb3d);if(_0x21e307['roleType']===_0x353318(0x187))throw CliErrors['validation'](_0x353318(0x15b)+_0x239d8f+_0x353318(0x18b),_0x353318(0x15d));const _0x316dd8=await resolveUserRef(_0x4101cf),_0x414ba4=await loadDevRoleRelations(_0x1bb38d[_0x353318(0x1a6)],_0x21e307['id']);return{...computeRoleUserMutation({'operation':_0x239d8f,'appCode':_0x1bb38d[_0x353318(0x1a6)],'role':_0x21e307,'relations':_0x414ba4,'user':{'userId':_0x316dd8[_0x353318(0x1a1)],'username':_0x316dd8['username'],'nickname':_0x316dd8[_0x353318(0x18d)]},'dryRun':_0x5c26a4,..._0x5daf2d!==undefined?{'expectUserCount':_0x5daf2d}:{}}),'role':_0x21e307,'user':_0x316dd8};}
@@ -1 +1 @@
1
- const a236_0x107bd8=a236_0x1ad1;function a236_0x226c(){const _0x553d5b=['dev','role','validation','roleName','786196pkSpUH','Nothing\x20to\x20update.','flag','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','24xVwszJ','remark','5eLQOeK','197796IONUIj','num','241123eBoBFF','/smartapi/permit/role/update','1195638RfdkDQ','appCode','name','\x20(id=','6748308uflbXY','string','--name\x20cannot\x20be\x20empty.','update','875538RvzXBM','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','trim','158298XjJBzZ','POST'];a236_0x226c=function(){return _0x553d5b;};return a236_0x226c();}(function(_0x858f7,_0x270f86){const _0x1ecd11=a236_0x1ad1,_0x3a1e5a=_0x858f7();while(!![]){try{const _0x4e9227=parseInt(_0x1ecd11(0x19c))/0x1+-parseInt(_0x1ecd11(0x19a))/0x2+parseInt(_0x1ecd11(0x18a))/0x3+parseInt(_0x1ecd11(0x193))/0x4*(parseInt(_0x1ecd11(0x199))/0x5)+parseInt(_0x1ecd11(0x19e))/0x6+-parseInt(_0x1ecd11(0x18d))/0x7*(-parseInt(_0x1ecd11(0x197))/0x8)+-parseInt(_0x1ecd11(0x1a2))/0x9;if(_0x4e9227===_0x270f86)break;else _0x3a1e5a['push'](_0x3a1e5a['shift']());}catch(_0x385136){_0x3a1e5a['push'](_0x3a1e5a['shift']());}}}(a236_0x226c,0x241d3));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';function a236_0x1ad1(_0x2d2566,_0x3e884e){_0x2d2566=_0x2d2566-0x189;const _0x226c19=a236_0x226c();let _0x1ad1d8=_0x226c19[_0x2d2566];return _0x1ad1d8;}import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x107bd8(0x19d);function readPatch(_0x3a8f07){const _0x4e4981=a236_0x107bd8,_0x28b358=_0x3a8f07[_0x4e4981(0x195)](_0x4e4981(0x1a0)),_0x3b2f21=_0x3a8f07[_0x4e4981(0x195)](_0x4e4981(0x198)),_0x235015={};if(_0x28b358!==undefined&&_0x28b358!==null){const _0x13fe0d=String(_0x28b358)[_0x4e4981(0x18c)]();if(!_0x13fe0d)throw CliErrors['validation'](_0x4e4981(0x1a4));if(_0x13fe0d['length']>0x40)throw CliErrors['validation']('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x235015[_0x4e4981(0x192)]=_0x13fe0d;}_0x3b2f21!==undefined&&_0x3b2f21!==null&&(_0x235015[_0x4e4981(0x198)]=String(_0x3b2f21));if(_0x235015[_0x4e4981(0x192)]===undefined&&_0x235015[_0x4e4981(0x198)]===undefined)throw CliErrors[_0x4e4981(0x191)](_0x4e4981(0x194),_0x4e4981(0x18b));return _0x235015;}export const roleUpdate={'service':a236_0x107bd8(0x190),'command':a236_0x107bd8(0x189),'description':a236_0x107bd8(0x196),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x107bd8(0x1a0),'type':a236_0x107bd8(0x1a3),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x107e75){readPatch(_0x107e75);},async 'dryRun'(_0x799057){const _0x282e97=a236_0x107bd8,_0xc4cfad=_0x799057[_0x282e97(0x19b)]('id'),_0x363a40=readPatch(_0x799057),_0x18cb1e=await getRoleById(_0x799057[_0x282e97(0x19f)],_0xc4cfad);return assertCustomRole(_0x18cb1e,'update'),asDryRunResult({'scope':_0x282e97(0x18f),'operation':_0x282e97(0x189),'selector':{'appCode':_0x799057['appCode'],'roleId':_0xc4cfad,'roleName':_0x18cb1e[_0x282e97(0x192)]},'before':projectRole(_0x18cb1e),'after':projectRole({..._0x18cb1e,..._0x363a40[_0x282e97(0x192)]!==undefined?{'roleName':_0x363a40['roleName']}:{},..._0x363a40[_0x282e97(0x198)]!==undefined?{'remark':_0x363a40[_0x282e97(0x198)]}:{}}),'dryRun':!![],'backend':{'method':_0x282e97(0x18e),'path':UPDATE_PATH},'warnings':[]},{'method':_0x282e97(0x18e),'url':UPDATE_PATH});},async 'execute'(_0x127162){const _0x512037=a236_0x107bd8,_0x34ec00=_0x127162[_0x512037(0x19b)]('id'),_0xab05d9=readPatch(_0x127162),_0xc2f0eb=await getRoleById(_0x127162[_0x512037(0x19f)],_0x34ec00);assertCustomRole(_0xc2f0eb,_0x512037(0x189)),await updateAppRole({'id':_0x34ec00,'appCode':_0x127162[_0x512037(0x19f)],..._0xab05d9[_0x512037(0x192)]!==undefined?{'roleName':_0xab05d9[_0x512037(0x192)]}:{},..._0xab05d9[_0x512037(0x198)]!==undefined?{'remark':_0xab05d9['remark']}:{}});const _0x7563fc=await getRoleById(_0x127162['appCode'],_0x34ec00);return{'ok':!![],'data':{'scope':'dev','operation':_0x512037(0x189),'selector':{'appCode':_0x127162[_0x512037(0x19f)],'roleId':_0x34ec00,'roleName':_0x7563fc['roleName']},'before':projectRole(_0xc2f0eb),'after':projectRole(_0x7563fc),'dryRun':![],'backend':{'method':_0x512037(0x18e),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x7563fc[_0x512037(0x192)]+_0x512037(0x1a1)+_0x34ec00+')'};}};
1
+ const a236_0x6d2ef2=a236_0xf707;(function(_0x288473,_0x575f39){const _0x498a54=a236_0xf707,_0x3a0d78=_0x288473();while(!![]){try{const _0x5c2f85=-parseInt(_0x498a54(0x15a))/0x1*(parseInt(_0x498a54(0x14e))/0x2)+-parseInt(_0x498a54(0x154))/0x3+parseInt(_0x498a54(0x15f))/0x4+parseInt(_0x498a54(0x148))/0x5+parseInt(_0x498a54(0x14b))/0x6+parseInt(_0x498a54(0x161))/0x7*(-parseInt(_0x498a54(0x152))/0x8)+-parseInt(_0x498a54(0x151))/0x9*(-parseInt(_0x498a54(0x153))/0xa);if(_0x5c2f85===_0x575f39)break;else _0x3a0d78['push'](_0x3a0d78['shift']());}catch(_0x3a4e55){_0x3a0d78['push'](_0x3a0d78['shift']());}}}(a236_0x1869,0x4e462));function a236_0xf707(_0x12b6e1,_0x50a8bc){_0x12b6e1=_0x12b6e1-0x145;const _0x186952=a236_0x1869();let _0xf707ec=_0x186952[_0x12b6e1];return _0xf707ec;}function a236_0x1869(){const _0x7ba67a=['1728816oFlVRZ','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','406PcWVDY','dev','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','name','909815CuyLip','\x20(id=','validation','3222096dqvhHG','update','flag','21224pqpGJm','--name\x20cannot\x20be\x20empty.','Updated\x20role\x20','45KXrABI','25240CgJfJV','259140jdHbxN','1503723elPcBE','trim','write','remark','appCode','length','26VhAzZA','POST','roleName','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','num'];a236_0x1869=function(){return _0x7ba67a;};return a236_0x1869();}import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function readPatch(_0x289194){const _0x34e3b4=a236_0xf707,_0x2912cd=_0x289194[_0x34e3b4(0x14d)](_0x34e3b4(0x147)),_0x4092b5=_0x289194[_0x34e3b4(0x14d)]('remark'),_0x58bad8={};if(_0x2912cd!==undefined&&_0x2912cd!==null){const _0x5d4d5a=String(_0x2912cd)[_0x34e3b4(0x155)]();if(!_0x5d4d5a)throw CliErrors[_0x34e3b4(0x14a)](_0x34e3b4(0x14f));if(_0x5d4d5a[_0x34e3b4(0x159)]>0x40)throw CliErrors[_0x34e3b4(0x14a)](_0x34e3b4(0x160));_0x58bad8[_0x34e3b4(0x15c)]=_0x5d4d5a;}_0x4092b5!==undefined&&_0x4092b5!==null&&(_0x58bad8[_0x34e3b4(0x157)]=String(_0x4092b5));if(_0x58bad8[_0x34e3b4(0x15c)]===undefined&&_0x58bad8[_0x34e3b4(0x157)]===undefined)throw CliErrors[_0x34e3b4(0x14a)]('Nothing\x20to\x20update.',_0x34e3b4(0x146));return _0x58bad8;}export const roleUpdate={'service':'role','command':'update','description':a236_0x6d2ef2(0x15d),'risk':a236_0x6d2ef2(0x156),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x6d2ef2(0x147),'type':'string','required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5c64d2){readPatch(_0x5c64d2);},async 'dryRun'(_0x306ae6){const _0x4f9fa9=a236_0x6d2ef2,_0x5c706f=_0x306ae6[_0x4f9fa9(0x15e)]('id'),_0x4f72da=readPatch(_0x306ae6),_0x2715be=await getRoleById(_0x306ae6[_0x4f9fa9(0x158)],_0x5c706f);return assertCustomRole(_0x2715be,'update'),asDryRunResult({'scope':_0x4f9fa9(0x145),'operation':'update','selector':{'appCode':_0x306ae6['appCode'],'roleId':_0x5c706f,'roleName':_0x2715be[_0x4f9fa9(0x15c)]},'before':projectRole(_0x2715be),'after':projectRole({..._0x2715be,..._0x4f72da[_0x4f9fa9(0x15c)]!==undefined?{'roleName':_0x4f72da[_0x4f9fa9(0x15c)]}:{},..._0x4f72da[_0x4f9fa9(0x157)]!==undefined?{'remark':_0x4f72da[_0x4f9fa9(0x157)]}:{}}),'dryRun':!![],'backend':{'method':_0x4f9fa9(0x15b),'path':UPDATE_PATH},'warnings':[]},{'method':_0x4f9fa9(0x15b),'url':UPDATE_PATH});},async 'execute'(_0x2bf65a){const _0x4d7553=a236_0x6d2ef2,_0x19642f=_0x2bf65a[_0x4d7553(0x15e)]('id'),_0xd41dbc=readPatch(_0x2bf65a),_0x2f1761=await getRoleById(_0x2bf65a[_0x4d7553(0x158)],_0x19642f);assertCustomRole(_0x2f1761,_0x4d7553(0x14c)),await updateAppRole({'id':_0x19642f,'appCode':_0x2bf65a[_0x4d7553(0x158)],..._0xd41dbc[_0x4d7553(0x15c)]!==undefined?{'roleName':_0xd41dbc[_0x4d7553(0x15c)]}:{},..._0xd41dbc[_0x4d7553(0x157)]!==undefined?{'remark':_0xd41dbc[_0x4d7553(0x157)]}:{}});const _0x548d0a=await getRoleById(_0x2bf65a['appCode'],_0x19642f);return{'ok':!![],'data':{'scope':_0x4d7553(0x145),'operation':_0x4d7553(0x14c),'selector':{'appCode':_0x2bf65a[_0x4d7553(0x158)],'roleId':_0x19642f,'roleName':_0x548d0a[_0x4d7553(0x15c)]},'before':projectRole(_0x2f1761),'after':projectRole(_0x548d0a),'dryRun':![],'backend':{'method':_0x4d7553(0x15b),'path':UPDATE_PATH},'warnings':[]},'message':_0x4d7553(0x150)+_0x548d0a[_0x4d7553(0x15c)]+_0x4d7553(0x149)+_0x19642f+')'};}};
@@ -1 +1 @@
1
- const a237_0x24bcf6=a237_0x344e;(function(_0x3004eb,_0x4ea057){const _0x5cf43c=a237_0x344e,_0x2bd5e7=_0x3004eb();while(!![]){try{const _0x22d39d=-parseInt(_0x5cf43c(0x1e5))/0x1*(parseInt(_0x5cf43c(0x1d1))/0x2)+-parseInt(_0x5cf43c(0x1e4))/0x3*(-parseInt(_0x5cf43c(0x1cf))/0x4)+parseInt(_0x5cf43c(0x1d2))/0x5+parseInt(_0x5cf43c(0x1db))/0x6*(-parseInt(_0x5cf43c(0x1da))/0x7)+-parseInt(_0x5cf43c(0x1d4))/0x8+parseInt(_0x5cf43c(0x1de))/0x9+parseInt(_0x5cf43c(0x1d5))/0xa;if(_0x22d39d===_0x4ea057)break;else _0x2bd5e7['push'](_0x2bd5e7['shift']());}catch(_0x516f7a){_0x2bd5e7['push'](_0x2bd5e7['shift']());}}}(a237_0x9b86,0x77dc0));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x344e(_0x3c39dd,_0x1c21b5){_0x3c39dd=_0x3c39dd-0x1ce;const _0x9b861e=a237_0x9b86();let _0x344e19=_0x9b861e[_0x3c39dd];return _0x344e19;}function a237_0x9b86(){const _0x4c49b0=['906125EufsRG','username','4364920ItXEIV','10931430MnXTxi','role','selector','POST','Added\x20user\x20','2377543loOzvI','6XIBkja','roleType','roleId','2917728ZmfYHY','No\x20change:\x20user\x20','high-risk-write','\x20to\x20role\x20','userId','user-add','23385wujsak','526wNoQFO','\x20already\x20in\x20role\x20','16dfzLjp','roleName','964nhCwqR'];a237_0x9b86=function(){return _0x4c49b0;};return a237_0x9b86();}import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x24bcf6(0x1d6),'command':a237_0x24bcf6(0x1e3),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a237_0x24bcf6(0x1e0),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2a2e70){const _0x5adcb2=a237_0x24bcf6,{mutation:_0x528b4f}=await prepareUserMutation(_0x2a2e70,_0x5adcb2(0x1e3),!![]);return asDryRunResult(_0x528b4f,{'method':_0x5adcb2(0x1d8),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0xf0ffde){const _0x48900b=a237_0x24bcf6,{mutation:_0x2499c3,changed:_0x4a4a9b,role:_0x2f1ae3,user:_0x9c325}=await prepareUserMutation(_0xf0ffde,'user-add',![]);return _0x4a4a9b&&await createDevUserRole({'appCode':_0xf0ffde['appCode'],'userId':_0x9c325[_0x48900b(0x1e2)],'username':_0x9c325[_0x48900b(0x1d3)],'roleType':_0x2f1ae3[_0x48900b(0x1dc)],'roleId':_0x2499c3[_0x48900b(0x1d7)][_0x48900b(0x1dd)]}),{'ok':!![],'data':_0x2499c3,'message':_0x4a4a9b?_0x48900b(0x1d9)+_0x2499c3[_0x48900b(0x1d7)][_0x48900b(0x1e2)]+_0x48900b(0x1e1)+_0x2499c3['selector'][_0x48900b(0x1d0)]:_0x48900b(0x1df)+_0x2499c3[_0x48900b(0x1d7)][_0x48900b(0x1e2)]+_0x48900b(0x1ce)+_0x2499c3[_0x48900b(0x1d7)][_0x48900b(0x1d0)]};}};
1
+ function a237_0x2d91(){const _0x13aecb=['userId','roleName','6707310dkKrGe','user-add','selector','roleId','11940RPgIdF','No\x20change:\x20user\x20','\x20to\x20role\x20','148oflrNh','roleType','607920MlumDu','role','Added\x20user\x20','appCode','108LXSJFx','POST','3367712ELVdvL','5075028EltrLd','2172YVHkhd','965499dTliYW','high-risk-write','username','31413oxRfjX'];a237_0x2d91=function(){return _0x13aecb;};return a237_0x2d91();}const a237_0x3eca58=a237_0xa8b4;(function(_0x4b05a6,_0x171523){const _0x4043e0=a237_0xa8b4,_0x2a4b34=_0x4b05a6();while(!![]){try{const _0xc68105=-parseInt(_0x4043e0(0xc2))/0x1+-parseInt(_0x4043e0(0xcf))/0x2*(parseInt(_0x4043e0(0xc5))/0x3)+parseInt(_0x4043e0(0xbf))/0x4+parseInt(_0x4043e0(0xcc))/0x5*(-parseInt(_0x4043e0(0xc1))/0x6)+parseInt(_0x4043e0(0xc0))/0x7+-parseInt(_0x4043e0(0xd1))/0x8*(-parseInt(_0x4043e0(0xbd))/0x9)+parseInt(_0x4043e0(0xc8))/0xa;if(_0xc68105===_0x171523)break;else _0x2a4b34['push'](_0x2a4b34['shift']());}catch(_0x58676c){_0x2a4b34['push'](_0x2a4b34['shift']());}}}(a237_0x2d91,0x84fde));import{createDevUserRole}from'../../core/api-client.js';function a237_0xa8b4(_0x4f824a,_0x371c74){_0x4f824a=_0x4f824a-0xbc;const _0x2d9101=a237_0x2d91();let _0xa8b48a=_0x2d9101[_0x4f824a];return _0xa8b48a;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x3eca58(0xd2),'command':'user-add','description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a237_0x3eca58(0xc3),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x527389){const _0x1bca18=a237_0x3eca58,{mutation:_0x38d201}=await prepareUserMutation(_0x527389,_0x1bca18(0xc9),!![]);return asDryRunResult(_0x38d201,{'method':_0x1bca18(0xbe),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x2bd2c4){const _0x36b8ac=a237_0x3eca58,{mutation:_0x174cdb,changed:_0x162ec1,role:_0x46f3a3,user:_0x4f5f31}=await prepareUserMutation(_0x2bd2c4,_0x36b8ac(0xc9),![]);return _0x162ec1&&await createDevUserRole({'appCode':_0x2bd2c4[_0x36b8ac(0xbc)],'userId':_0x4f5f31[_0x36b8ac(0xc6)],'username':_0x4f5f31[_0x36b8ac(0xc4)],'roleType':_0x46f3a3[_0x36b8ac(0xd0)],'roleId':_0x174cdb['selector'][_0x36b8ac(0xcb)]}),{'ok':!![],'data':_0x174cdb,'message':_0x162ec1?_0x36b8ac(0xd3)+_0x174cdb[_0x36b8ac(0xca)][_0x36b8ac(0xc6)]+_0x36b8ac(0xce)+_0x174cdb[_0x36b8ac(0xca)]['roleName']:_0x36b8ac(0xcd)+_0x174cdb[_0x36b8ac(0xca)][_0x36b8ac(0xc6)]+'\x20already\x20in\x20role\x20'+_0x174cdb['selector'][_0x36b8ac(0xc7)]};}};
@@ -1 +1 @@
1
- const a238_0xcd9513=a238_0x2ec4;(function(_0x1ac8d2,_0x32e9e5){const _0x1ec2c5=a238_0x2ec4,_0x56eca6=_0x1ac8d2();while(!![]){try{const _0x29d008=-parseInt(_0x1ec2c5(0x165))/0x1*(-parseInt(_0x1ec2c5(0x160))/0x2)+parseInt(_0x1ec2c5(0x15d))/0x3*(-parseInt(_0x1ec2c5(0x162))/0x4)+parseInt(_0x1ec2c5(0x158))/0x5+parseInt(_0x1ec2c5(0x161))/0x6+-parseInt(_0x1ec2c5(0x15a))/0x7+parseInt(_0x1ec2c5(0x159))/0x8*(parseInt(_0x1ec2c5(0x164))/0x9)+-parseInt(_0x1ec2c5(0x15b))/0xa;if(_0x29d008===_0x32e9e5)break;else _0x56eca6['push'](_0x56eca6['shift']());}catch(_0x42041e){_0x56eca6['push'](_0x56eca6['shift']());}}}(a238_0x5807,0xc22b2));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a238_0x2ec4(_0x29a93c,_0x38f8be){_0x29a93c=_0x29a93c-0x154;const _0x580739=a238_0x5807();let _0x2ec48f=_0x580739[_0x29a93c];return _0x2ec48f;}import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a238_0x5807(){const _0xe27872=['role','3774700BdqnjT','5048216JgWKFO','5049366XvXmpm','7670380VvsnfJ','userId','733914qImedW','\x20from\x20role\x20','roleName','10052yykzvD','1818822ZBBMyn','16LZuCis','No\x20change:\x20user\x20','9xdEEAJ','313yKnByp','Removed\x20user\x20','selector','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','user-remove'];a238_0x5807=function(){return _0xe27872;};return a238_0x5807();}export const roleUserRemove={'service':a238_0xcd9513(0x157),'command':'user-remove','description':a238_0xcd9513(0x155),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x25e10b){const _0x49e56a=a238_0xcd9513,{mutation:_0x559a27}=await prepareUserMutation(_0x25e10b,_0x49e56a(0x156),!![]);return asDryRunResult(_0x559a27,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xf350f0){const _0x7c1e89=a238_0xcd9513,{matchingRelationIds:_0xef3167,mutation:_0x25253e,changed:_0x56d11d}=await prepareUserMutation(_0xf350f0,_0x7c1e89(0x156),![]);if(_0x56d11d)for(const _0xed4165 of _0xef3167){await deleteDevUserRole(_0xed4165);}return{'ok':!![],'data':_0x25253e,'message':_0x56d11d?_0x7c1e89(0x166)+_0x25253e[_0x7c1e89(0x154)][_0x7c1e89(0x15c)]+_0x7c1e89(0x15e)+_0x25253e['selector'][_0x7c1e89(0x15f)]:_0x7c1e89(0x163)+_0x25253e['selector'][_0x7c1e89(0x15c)]+'\x20not\x20in\x20role\x20'+_0x25253e[_0x7c1e89(0x154)][_0x7c1e89(0x15f)]};}};
1
+ const a238_0x111590=a238_0xe242;(function(_0xcf61bd,_0x32047c){const _0x23ea9f=a238_0xe242,_0x4aba28=_0xcf61bd();while(!![]){try{const _0x84183f=parseInt(_0x23ea9f(0x127))/0x1*(parseInt(_0x23ea9f(0x123))/0x2)+parseInt(_0x23ea9f(0x11a))/0x3*(parseInt(_0x23ea9f(0x125))/0x4)+parseInt(_0x23ea9f(0x11b))/0x5*(-parseInt(_0x23ea9f(0x128))/0x6)+-parseInt(_0x23ea9f(0x129))/0x7*(parseInt(_0x23ea9f(0x11d))/0x8)+parseInt(_0x23ea9f(0x11e))/0x9+parseInt(_0x23ea9f(0x124))/0xa+-parseInt(_0x23ea9f(0x121))/0xb*(-parseInt(_0x23ea9f(0x11f))/0xc);if(_0x84183f===_0x32047c)break;else _0x4aba28['push'](_0x4aba28['shift']());}catch(_0x3474fb){_0x4aba28['push'](_0x4aba28['shift']());}}}(a238_0x5d11,0xec8ef));import{deleteDevUserRole}from'../../core/api-client.js';function a238_0x5d11(){const _0x58c1fb=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','Removed\x20user\x20','36jKTgtb','8441695MDPiLb','userId','64ovsyzL','5626944ANsuXC','276CFyZfv','roleName','364254yBGuwF','selector','787134nVFTDm','11466020mquSjt','143124dTCEdI','\x20from\x20role\x20','2wFrnJn','6Iuiwjt','956081xGrhnO','user-remove'];a238_0x5d11=function(){return _0x58c1fb;};return a238_0x5d11();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a238_0xe242(_0x48490b,_0x5e4c0a){_0x48490b=_0x48490b-0x11a;const _0x5d11df=a238_0x5d11();let _0xe242ea=_0x5d11df[_0x48490b];return _0xe242ea;}export const roleUserRemove={'service':'role','command':a238_0x111590(0x12a),'description':a238_0x111590(0x12b),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x29cb56){const _0x1cb238=a238_0x111590,{mutation:_0x437e9b}=await prepareUserMutation(_0x29cb56,_0x1cb238(0x12a),!![]);return asDryRunResult(_0x437e9b,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xecaf4a){const _0x42041f=a238_0x111590,{matchingRelationIds:_0x43c7fa,mutation:_0x4ef214,changed:_0x1e5d06}=await prepareUserMutation(_0xecaf4a,_0x42041f(0x12a),![]);if(_0x1e5d06)for(const _0x235398 of _0x43c7fa){await deleteDevUserRole(_0x235398);}return{'ok':!![],'data':_0x4ef214,'message':_0x1e5d06?_0x42041f(0x12c)+_0x4ef214['selector'][_0x42041f(0x11c)]+_0x42041f(0x126)+_0x4ef214[_0x42041f(0x122)]['roleName']:'No\x20change:\x20user\x20'+_0x4ef214[_0x42041f(0x122)][_0x42041f(0x11c)]+'\x20not\x20in\x20role\x20'+_0x4ef214[_0x42041f(0x122)][_0x42041f(0x120)]};}};
@@ -1 +1 @@
1
- function a239_0x51c8(){const _0x1eaa5a=['Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','7obCmSt','matchedBy','Resolved\x20\x22','nickname','2380164VcdrpB','Pass\x20--name\x20<nickname|username>.','flagMissing','12hrkHDN','438082vCuqxK','621ieldnR','255900jIqevd','37928UdMQdQ','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','286aIcKhl','role','read','trim','5676384LnxcfS','name','str','227968WSFTpB','userId','172052yFHCgq','10Kluqqy','\x22\x20→\x20userId\x20'];a239_0x51c8=function(){return _0x1eaa5a;};return a239_0x51c8();}const a239_0x3e173c=a239_0x2952;(function(_0x5d41cf,_0x36a267){const _0x524ddb=a239_0x2952,_0x3fff0d=_0x5d41cf();while(!![]){try{const _0x42b3fb=parseInt(_0x524ddb(0xb9))/0x1+-parseInt(_0x524ddb(0xad))/0x2*(parseInt(_0x524ddb(0xc6))/0x3)+-parseInt(_0x524ddb(0xbb))/0x4*(-parseInt(_0x524ddb(0xbc))/0x5)+parseInt(_0x524ddb(0xc3))/0x6*(-parseInt(_0x524ddb(0xbf))/0x7)+-parseInt(_0x524ddb(0xb0))/0x8*(-parseInt(_0x524ddb(0xae))/0x9)+-parseInt(_0x524ddb(0xaf))/0xa*(-parseInt(_0x524ddb(0xb2))/0xb)+parseInt(_0x524ddb(0xb6))/0xc;if(_0x42b3fb===_0x36a267)break;else _0x3fff0d['push'](_0x3fff0d['shift']());}catch(_0x5296d5){_0x3fff0d['push'](_0x3fff0d['shift']());}}}(a239_0x51c8,0x7bb0d));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a239_0x2952(_0x3a7351,_0x682e8e){_0x3a7351=_0x3a7351-0xad;const _0x51c89a=a239_0x51c8();let _0x295240=_0x51c89a[_0x3a7351];return _0x295240;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x3e173c(0xb3),'command':'user-resolve','description':a239_0x3e173c(0xbe),'risk':a239_0x3e173c(0xb4),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2dbc85){const _0x45eda3=a239_0x3e173c;if(!_0x2dbc85[_0x45eda3(0xb8)](_0x45eda3(0xb7))[_0x45eda3(0xb5)]())throw CliErrors[_0x45eda3(0xc5)](_0x45eda3(0xb7),_0x45eda3(0xc4));},async 'execute'(_0x223177){const _0x25f023=a239_0x3e173c,_0x36ab1b=_0x223177[_0x25f023(0xb8)]('name')[_0x25f023(0xb5)](),_0x3d51c1=await resolveUserRef(_0x36ab1b,_0x25f023(0xb1));return{'ok':!![],'data':{'user':{'userId':_0x3d51c1[_0x25f023(0xba)],'username':_0x3d51c1['username'],'nickname':_0x3d51c1[_0x25f023(0xc2)],'matchedBy':_0x3d51c1[_0x25f023(0xc0)]}},'message':_0x25f023(0xc1)+_0x36ab1b+_0x25f023(0xbd)+_0x3d51c1[_0x25f023(0xba)]};}};
1
+ function a239_0x1417(_0x35fc89,_0x318dfa){_0x35fc89=_0x35fc89-0x126;const _0x3db590=a239_0x3db5();let _0x1417d0=_0x3db590[_0x35fc89];return _0x1417d0;}function a239_0x3db5(){const _0x19c223=['flagMissing','1652IKeioW','5vbCrUf','\x22\x20→\x20userId\x20','read','3215660WAyTjT','userId','username','nickname','role','41759Jafora','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','3141831dSdijZ','13815LJmeUe','matchedBy','str','3011388XJyeqI','3693XNdqub','344XyYxDG','name','2915704AGKSTU','22Xxfxud'];a239_0x3db5=function(){return _0x19c223;};return a239_0x3db5();}const a239_0x38c886=a239_0x1417;(function(_0x3ef846,_0x46fcf0){const _0x3a0677=a239_0x1417,_0x4b7141=_0x3ef846();while(!![]){try{const _0x2b45ed=parseInt(_0x3a0677(0x12a))/0x1*(parseInt(_0x3a0677(0x135))/0x2)+-parseInt(_0x3a0677(0x131))/0x3*(-parseInt(_0x3a0677(0x137))/0x4)+-parseInt(_0x3a0677(0x138))/0x5*(parseInt(_0x3a0677(0x130))/0x6)+parseInt(_0x3a0677(0x12c))/0x7+-parseInt(_0x3a0677(0x132))/0x8*(parseInt(_0x3a0677(0x12d))/0x9)+-parseInt(_0x3a0677(0x13b))/0xa+-parseInt(_0x3a0677(0x134))/0xb;if(_0x2b45ed===_0x46fcf0)break;else _0x4b7141['push'](_0x4b7141['shift']());}catch(_0x46afa8){_0x4b7141['push'](_0x4b7141['shift']());}}}(a239_0x3db5,0x3ffa4));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_0x38c886(0x129),'command':'user-resolve','description':a239_0x38c886(0x12b),'risk':a239_0x38c886(0x13a),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bbdef){const _0x5d68eb=a239_0x38c886;if(!_0x2bbdef[_0x5d68eb(0x12f)](_0x5d68eb(0x133))['trim']())throw CliErrors[_0x5d68eb(0x136)](_0x5d68eb(0x133),'Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0x2e0bca){const _0x31d31c=a239_0x38c886,_0x32c00f=_0x2e0bca[_0x31d31c(0x12f)](_0x31d31c(0x133))['trim'](),_0x311d20=await resolveUserRef(_0x32c00f,'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':_0x311d20[_0x31d31c(0x126)],'username':_0x311d20[_0x31d31c(0x127)],'nickname':_0x311d20[_0x31d31c(0x128)],'matchedBy':_0x311d20[_0x31d31c(0x12e)]}},'message':'Resolved\x20\x22'+_0x32c00f+_0x31d31c(0x139)+_0x311d20[_0x31d31c(0x126)]};}};
@@ -1 +1 @@
1
- const a240_0xc87980=a240_0x116e;(function(_0x52162e,_0x26bdc5){const _0x142214=a240_0x116e,_0xd10a41=_0x52162e();while(!![]){try{const _0x3bf097=-parseInt(_0x142214(0x18c))/0x1*(-parseInt(_0x142214(0x191))/0x2)+-parseInt(_0x142214(0x192))/0x3*(parseInt(_0x142214(0x180))/0x4)+parseInt(_0x142214(0x189))/0x5+parseInt(_0x142214(0x184))/0x6+parseInt(_0x142214(0x181))/0x7+-parseInt(_0x142214(0x188))/0x8*(-parseInt(_0x142214(0x190))/0x9)+-parseInt(_0x142214(0x18e))/0xa*(parseInt(_0x142214(0x18f))/0xb);if(_0x3bf097===_0x26bdc5)break;else _0xd10a41['push'](_0xd10a41['shift']());}catch(_0x59b479){_0xd10a41['push'](_0xd10a41['shift']());}}}(a240_0x3e41,0x3307f));function a240_0x3e41(){const _0x1f23f1=['793374Lhrjjk','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','content','Loaded\x20','8fmsQqg','1705755TnSGLl','\x20--file\x20<path>\x20--dry-run`.','appCode','1VmMmzZ','app_rule_not_found','2012820XSonAl','33iSGjue','1771137IHUHHA','445198IMzdof','75kSQbdl','rule','61100kwpnLE','2113804hBASSv','read','\x20for\x20'];a240_0x3e41=function(){return _0x1f23f1;};return a240_0x3e41();}function a240_0x116e(_0x5d956a,_0x3b597c){_0x5d956a=_0x5d956a-0x17f;const _0x3e41ed=a240_0x3e41();let _0x116e20=_0x3e41ed[_0x5d956a];return _0x116e20;}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_0xc87980(0x17f),'command':'get','description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':a240_0xc87980(0x182),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x28d9df){readAppRuleType(_0x28d9df);},async 'execute'(_0x54fde1){const _0x40d6df=a240_0xc87980,_0x1b20e2=readAppRuleType(_0x54fde1),_0x58f860=await getAppRule(_0x54fde1['cookie'],{'appCode':_0x54fde1[_0x40d6df(0x18b)],'type':_0x1b20e2});if(!_0x58f860)throw appRuleError(_0x40d6df(0x18d),appRuleFileName(_0x1b20e2)+'\x20is\x20not\x20configured\x20for\x20app\x20'+_0x54fde1[_0x40d6df(0x18b)]+'.',_0x40d6df(0x185)+_0x1b20e2+_0x40d6df(0x18a));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x1b20e2,_0x58f860),'content':_0x58f860[_0x40d6df(0x186)]}},'message':_0x40d6df(0x187)+appRuleFileName(_0x1b20e2)+_0x40d6df(0x183)+_0x54fde1[_0x40d6df(0x18b)]};}};
1
+ const a240_0x388d98=a240_0x5ae8;function a240_0x39eb(){const _0x3ed288=['read','175680JOsHlh','Loaded\x20','1cMnDTe','app_rule_not_found','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','605114FIFDpN','6ZeShMm','rule','1809304VpxMMP','1384062qqMxoH','\x20--file\x20<path>\x20--dry-run`.','cookie','24uBtOBa','1351071lnYAxy','appCode','1076ukRQlL','\x20is\x20not\x20configured\x20for\x20app\x20','8734jATlZL','1670gjoXJO','4310eIFijE'];a240_0x39eb=function(){return _0x3ed288;};return a240_0x39eb();}(function(_0x38ac29,_0x569034){const _0x419251=a240_0x5ae8,_0x4cf961=_0x38ac29();while(!![]){try{const _0x3e3b53=parseInt(_0x419251(0x1be))/0x1*(-parseInt(_0x419251(0x1c1))/0x2)+parseInt(_0x419251(0x1b0))/0x3+parseInt(_0x419251(0x1b6))/0x4*(-parseInt(_0x419251(0x1b9))/0x5)+-parseInt(_0x419251(0x1ad))/0x6*(-parseInt(_0x419251(0x1af))/0x7)+parseInt(_0x419251(0x1b3))/0x8*(-parseInt(_0x419251(0x1b4))/0x9)+parseInt(_0x419251(0x1ba))/0xa*(parseInt(_0x419251(0x1b8))/0xb)+parseInt(_0x419251(0x1bc))/0xc;if(_0x3e3b53===_0x569034)break;else _0x4cf961['push'](_0x4cf961['shift']());}catch(_0x3874da){_0x4cf961['push'](_0x4cf961['shift']());}}}(a240_0x39eb,0x391c0));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a240_0x5ae8(_0x3cf40,_0x21da96){_0x3cf40=_0x3cf40-0x1ad;const _0x39eb8a=a240_0x39eb();let _0x5ae88e=_0x39eb8a[_0x3cf40];return _0x5ae88e;}export const ruleGet={'service':a240_0x388d98(0x1ae),'command':'get','description':a240_0x388d98(0x1c0),'risk':a240_0x388d98(0x1bb),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x4f737f){readAppRuleType(_0x4f737f);},async 'execute'(_0x48c333){const _0x5072b0=a240_0x388d98,_0x24dddd=readAppRuleType(_0x48c333),_0x4ae783=await getAppRule(_0x48c333[_0x5072b0(0x1b2)],{'appCode':_0x48c333['appCode'],'type':_0x24dddd});if(!_0x4ae783)throw appRuleError(_0x5072b0(0x1bf),appRuleFileName(_0x24dddd)+_0x5072b0(0x1b7)+_0x48c333['appCode']+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x24dddd+_0x5072b0(0x1b1));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x24dddd,_0x4ae783),'content':_0x4ae783['content']}},'message':_0x5072b0(0x1bd)+appRuleFileName(_0x24dddd)+'\x20for\x20'+_0x48c333[_0x5072b0(0x1b5)]};}};
@@ -1 +1 @@
1
- (function(_0x5cef9f,_0x65b8c3){const _0x2fc2e4=a241_0x33e1,_0x12c127=_0x5cef9f();while(!![]){try{const _0x4f68ad=parseInt(_0x2fc2e4(0x164))/0x1+parseInt(_0x2fc2e4(0x165))/0x2+parseInt(_0x2fc2e4(0x16b))/0x3*(-parseInt(_0x2fc2e4(0x169))/0x4)+parseInt(_0x2fc2e4(0x16a))/0x5+parseInt(_0x2fc2e4(0x163))/0x6*(parseInt(_0x2fc2e4(0x166))/0x7)+parseInt(_0x2fc2e4(0x168))/0x8*(-parseInt(_0x2fc2e4(0x162))/0x9)+-parseInt(_0x2fc2e4(0x167))/0xa*(parseInt(_0x2fc2e4(0x161))/0xb);if(_0x4f68ad===_0x65b8c3)break;else _0x12c127['push'](_0x12c127['shift']());}catch(_0x2140c6){_0x12c127['push'](_0x12c127['shift']());}}}(a241_0xb480,0x25649));import{ruleGet}from'../../commands/rule/get.js';function a241_0xb480(){const _0x3af227=['3537RhqCHn','6HWmtKu','88246MyEVkS','486940XjdvCV','105581slGjHt','519300gMtKdu','8flmyiF','28BsvMav','1113860THICgD','22503NrHeCB','77hWvYni'];a241_0xb480=function(){return _0x3af227;};return a241_0xb480();}import{ruleList}from'../../commands/rule/list.js';function a241_0x33e1(_0x3e49c9,_0x31ef6d){_0x3e49c9=_0x3e49c9-0x161;const _0xb48093=a241_0xb480();let _0x33e1de=_0xb48093[_0x3e49c9];return _0x33e1de;}import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ function a241_0x534e(){const _0x4c9525=['20tbhAIN','6165365Lcgvpc','signal','dryRun','4006064oBTOpd','1132338ZMATHf','70956GDUWlw','5497452DDJjOj','1217574Nhhufw','42khQAYT','91lkufMV','107028DhkTjF'];a241_0x534e=function(){return _0x4c9525;};return a241_0x534e();}const a241_0x44310d=a241_0x2868;(function(_0x87f405,_0x32092a){const _0x16e300=a241_0x2868,_0x30662f=_0x87f405();while(!![]){try{const _0x127665=parseInt(_0x16e300(0x156))/0x1+parseInt(_0x16e300(0x159))/0x2+-parseInt(_0x16e300(0x15a))/0x3*(parseInt(_0x16e300(0x15c))/0x4)+parseInt(_0x16e300(0x15e))/0x5+-parseInt(_0x16e300(0x157))/0x6*(parseInt(_0x16e300(0x15b))/0x7)+-parseInt(_0x16e300(0x155))/0x8+-parseInt(_0x16e300(0x158))/0x9*(parseInt(_0x16e300(0x15d))/0xa);if(_0x127665===_0x32092a)break;else _0x30662f['push'](_0x30662f['shift']());}catch(_0x98404b){_0x30662f['push'](_0x30662f['shift']());}}}(a241_0x534e,0xb09f8));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';function a241_0x2868(_0x2d1282,_0x3c93d6){_0x2d1282=_0x2d1282-0x155;const _0x534e6b=a241_0x534e();let _0x286814=_0x534e6b[_0x2d1282];return _0x286814;}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet]['map'](_0x4227c3=>({..._0x4227c3,'execute':_0x4799cc=>withKbManagementSession(_0x4799cc[a241_0x44310d(0x15f)],()=>_0x4227c3['execute'](_0x4799cc)),..._0x4227c3['dryRun']?{'dryRun':_0x3c3a9=>withKbManagementSession(_0x3c3a9['signal'],()=>_0x4227c3[a241_0x44310d(0x160)](_0x3c3a9))}:{}}));
@@ -1 +1 @@
1
- function a242_0xd9c1(_0x6cfa51,_0x2f3bef){_0x6cfa51=_0x6cfa51-0x191;const _0x1d4729=a242_0x1d47();let _0xd9c1e8=_0x1d4729[_0x6cfa51];return _0xd9c1e8;}function a242_0x1d47(){const _0x1510f7=['34232pFVlCe','length','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','map','all','list','Loaded\x20app\x20rule\x20configuration\x20for\x20','827994DteKvC','rule','26761gKFECy','appCode','read','709510XIVOma','cookie','253VVxdlF','700820zXZuOF','144504NbgbnG','9cyDvBa','1164HMqXwq','1791AtCSOz','504428DjmXgs'];a242_0x1d47=function(){return _0x1510f7;};return a242_0x1d47();}const a242_0x2fc47d=a242_0xd9c1;(function(_0x16fcf4,_0x3efdf6){const _0x169043=a242_0xd9c1,_0x25dafd=_0x16fcf4();while(!![]){try{const _0x4aa2ed=-parseInt(_0x169043(0x199))/0x1+parseInt(_0x169043(0x1a5))/0x2+-parseInt(_0x169043(0x19a))/0x3*(-parseInt(_0x169043(0x19d))/0x4)+-parseInt(_0x169043(0x195))/0x5+parseInt(_0x169043(0x19b))/0x6*(parseInt(_0x169043(0x192))/0x7)+parseInt(_0x169043(0x19e))/0x8*(parseInt(_0x169043(0x19c))/0x9)+parseInt(_0x169043(0x198))/0xa*(-parseInt(_0x169043(0x197))/0xb);if(_0x4aa2ed===_0x3efdf6)break;else _0x25dafd['push'](_0x25dafd['shift']());}catch(_0x422055){_0x25dafd['push'](_0x25dafd['shift']());}}}(a242_0x1d47,0x76f29));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x2fc47d(0x191),'command':a242_0x2fc47d(0x1a3),'description':a242_0x2fc47d(0x1a0),'risk':a242_0x2fc47d(0x194),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x4ed024){const _0x42b57d=a242_0x2fc47d,_0x44bcc3=await Promise[_0x42b57d(0x1a2)](APP_RULE_TYPES[_0x42b57d(0x1a1)](_0x37c2b7=>getAppRule(_0x4ed024[_0x42b57d(0x196)],{'appCode':_0x4ed024[_0x42b57d(0x193)],'type':_0x37c2b7}))),_0x5e3ccd=APP_RULE_TYPES[_0x42b57d(0x1a1)]((_0x2a19c8,_0x91d8b8)=>projectAppRule(_0x2a19c8,_0x44bcc3[_0x91d8b8]??null));return{'ok':!![],'data':{'total':_0x5e3ccd[_0x42b57d(0x19f)],'rules':_0x5e3ccd},'message':_0x42b57d(0x1a4)+_0x4ed024[_0x42b57d(0x193)]};}};
1
+ const a242_0x5485a4=a242_0x4cc1;(function(_0x1c4ae6,_0x4ee4e9){const _0x3c5c81=a242_0x4cc1,_0x5058a1=_0x1c4ae6();while(!![]){try{const _0x3c628f=parseInt(_0x3c5c81(0x104))/0x1*(-parseInt(_0x3c5c81(0xf4))/0x2)+-parseInt(_0x3c5c81(0xf7))/0x3+-parseInt(_0x3c5c81(0xf6))/0x4*(parseInt(_0x3c5c81(0x100))/0x5)+parseInt(_0x3c5c81(0x105))/0x6+-parseInt(_0x3c5c81(0xfc))/0x7*(-parseInt(_0x3c5c81(0xfb))/0x8)+-parseInt(_0x3c5c81(0x107))/0x9+-parseInt(_0x3c5c81(0x101))/0xa*(-parseInt(_0x3c5c81(0xfd))/0xb);if(_0x3c628f===_0x4ee4e9)break;else _0x5058a1['push'](_0x5058a1['shift']());}catch(_0x35746a){_0x5058a1['push'](_0x5058a1['shift']());}}}(a242_0x3a7a,0x1a4b3));import{getAppRule}from'../../core/api-client.js';function a242_0x4cc1(_0x4fc0a5,_0x19a1ea){_0x4fc0a5=_0x4fc0a5-0xf4;const _0x3a7acd=a242_0x3a7a();let _0x4cc1c6=_0x3a7acd[_0x4fc0a5];return _0x4cc1c6;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a242_0x3a7a(){const _0x472843=['read','19JdKWMt','230412parwrp','cookie','25965FPORZG','2824njjgXL','map','4QKFteU','624600hZcimf','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','list','rule','224bgOylw','7483BYxExy','11ygyKCV','appCode','Loaded\x20app\x20rule\x20configuration\x20for\x20','642865SmNlOh','4058510mxBpdP','length'];a242_0x3a7a=function(){return _0x472843;};return a242_0x3a7a();}export const ruleList={'service':a242_0x5485a4(0xfa),'command':a242_0x5485a4(0xf9),'description':a242_0x5485a4(0xf8),'risk':a242_0x5485a4(0x103),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x44c419){const _0x7c76a6=a242_0x5485a4,_0xab2457=await Promise['all'](APP_RULE_TYPES[_0x7c76a6(0xf5)](_0x3b1563=>getAppRule(_0x44c419[_0x7c76a6(0x106)],{'appCode':_0x44c419['appCode'],'type':_0x3b1563}))),_0x594500=APP_RULE_TYPES[_0x7c76a6(0xf5)]((_0x576fa3,_0x4e3ad4)=>projectAppRule(_0x576fa3,_0xab2457[_0x4e3ad4]??null));return{'ok':!![],'data':{'total':_0x594500[_0x7c76a6(0x102)],'rules':_0x594500},'message':_0x7c76a6(0xff)+_0x44c419[_0x7c76a6(0xfe)]};}};
@@ -1 +1 @@
1
- function a243_0x2e71(_0x168652,_0x21c32a){_0x168652=_0x168652-0x1e5;const _0x5b37ef=a243_0x5b37();let _0x2e7129=_0x5b37ef[_0x168652];return _0x2e7129;}const a243_0x320ad0=a243_0x2e71;(function(_0x2c3295,_0x3b44d7){const _0xc80f34=a243_0x2e71,_0x37f308=_0x2c3295();while(!![]){try{const _0x1713c1=-parseInt(_0xc80f34(0x1fb))/0x1+-parseInt(_0xc80f34(0x219))/0x2*(-parseInt(_0xc80f34(0x21d))/0x3)+-parseInt(_0xc80f34(0x217))/0x4*(-parseInt(_0xc80f34(0x20c))/0x5)+-parseInt(_0xc80f34(0x212))/0x6*(parseInt(_0xc80f34(0x1e8))/0x7)+parseInt(_0xc80f34(0x1f0))/0x8*(parseInt(_0xc80f34(0x211))/0x9)+parseInt(_0xc80f34(0x20d))/0xa*(-parseInt(_0xc80f34(0x1e9))/0xb)+parseInt(_0xc80f34(0x213))/0xc;if(_0x1713c1===_0x3b44d7)break;else _0x37f308['push'](_0x37f308['shift']());}catch(_0x1a71a5){_0x37f308['push'](_0x37f308['shift']());}}}(a243_0x5b37,0xb4fc9));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function a243_0x5b37(){const _0x5b2c45=['29018TWjwvN','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','rabetbase\x20rule\x20get\x20--type\x20',';\x20current\x20version\x20is\x20','byteSize','str','expectedVersion','80vGXLHS','app_rule_verification_failed','flag','\x20--format\x20compress','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','contentHash','before','file','rules','isSafeInteger','\x20could\x20not\x20be\x20verified.','828872AetNfE','set','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','/smartapi/knowledge-base/save','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','cause','write','appCode','input','\x20for\x20','number','POST','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','app_rule_set_outcome_unknown','type','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','185HmNQTF','2270RhKGBX','beforeRecord','unconfigured','Set\x20','329175MlzeCp','1146pDNdEM','18265584kJdbYh','content','defineProperty','cookie','14240Bhboaj','string','1094922wvxvRn','version','Expected\x20','push','3CJZKGC','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','app_rule_version_mismatch','replacement','The\x20set\x20request\x20was\x20sent,\x20but\x20','rule','14588LaYvvo'];a243_0x5b37=function(){return _0x5b2c45;};return a243_0x5b37();}const SAVE_PATH=a243_0x320ad0(0x1fe),NON_ATOMIC_WARNING=a243_0x320ad0(0x1ea);function readSetInput(_0x1ee7be){const _0x48a522=a243_0x320ad0,_0x52d2e4=readAppRuleType(_0x1ee7be),_0x47e3ca=_0x1ee7be[_0x48a522(0x1ee)](_0x48a522(0x1f7))['trim']();if(!_0x47e3ca)throw appRuleError('app_rule_file_required','--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x51a21d=_0x1ee7be[_0x48a522(0x1f2)]('expected-version');let _0x5bbbab;if(_0x51a21d!==undefined){_0x5bbbab=Number(_0x51a21d);if(!Number[_0x48a522(0x1f9)](_0x5bbbab)||_0x5bbbab<0x0)throw appRuleError('app_rule_expected_version_invalid','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x52d2e4,'file':_0x47e3ca,'expectedVersion':_0x5bbbab};}async function prepareSet(_0x22fa02){const _0x12d484=a243_0x320ad0,_0x5541cc=readSetInput(_0x22fa02),_0x2de77e=await readAppRuleFile(_0x5541cc[_0x12d484(0x1f7)]),_0x3587ce=await getAppRule(_0x22fa02[_0x12d484(0x216)],{'appCode':_0x22fa02[_0x12d484(0x203)],'type':_0x5541cc['type']});if(_0x5541cc[_0x12d484(0x1ef)]!==undefined&&_0x3587ce?.[_0x12d484(0x21a)]!==_0x5541cc[_0x12d484(0x1ef)])throw appRuleError(_0x12d484(0x21f),appRuleFileName(_0x5541cc[_0x12d484(0x20a)])+'\x20version\x20changed\x20before\x20write.',_0x12d484(0x21b)+_0x5541cc['expectedVersion']+_0x12d484(0x1ec)+(_0x3587ce?.['version']??_0x12d484(0x20f))+_0x12d484(0x20b));return{'input':_0x5541cc,'replacement':_0x2de77e,'beforeRecord':_0x3587ce,'before':projectAppRule(_0x5541cc[_0x12d484(0x20a)],_0x3587ce),'planned':{'type':_0x5541cc[_0x12d484(0x20a)],'fileName':appRuleFileName(_0x5541cc['type']),'contextScope':appRuleContextScope(_0x5541cc['type']),'enabled':!![],'appCode':_0x22fa02[_0x12d484(0x203)],'scope':_0x12d484(0x1f8),'contentByteSize':_0x2de77e[_0x12d484(0x1ed)],'contentHash':_0x2de77e['contentHash']}};}function warningsFor(_0x4bc74b){return _0x4bc74b===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a243_0x320ad0(0x1e7),'command':a243_0x320ad0(0x1fc),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a243_0x320ad0(0x202),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x320ad0(0x1f7),'type':a243_0x320ad0(0x218),'required':!![],'description':a243_0x320ad0(0x21e)},{'name':'expected-version','type':a243_0x320ad0(0x206),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x3d4341){readSetInput(_0x3d4341);},async 'dryRun'(_0x5055b0){const _0x3af4b2=a243_0x320ad0,_0x3ee623=await prepareSet(_0x5055b0);return asDryRunResult({'operation':_0x3af4b2(0x1fc),'selector':{'appCode':_0x5055b0[_0x3af4b2(0x203)],'scope':_0x3af4b2(0x1f8),'type':_0x3ee623[_0x3af4b2(0x204)]['type']},'before':_0x3ee623[_0x3af4b2(0x1f6)],'after':_0x3ee623['planned'],'dryRun':!![],'backend':{'method':_0x3af4b2(0x207),'path':SAVE_PATH},'warnings':warningsFor(_0x3ee623['input'][_0x3af4b2(0x1ef)]),'verification':{'expectedVersion':_0x3ee623[_0x3af4b2(0x204)][_0x3af4b2(0x1ef)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x3af4b2(0x1eb)+_0x3ee623[_0x3af4b2(0x204)]['type']+_0x3af4b2(0x1f3)}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x18bc1e){const _0x5be0d5=a243_0x320ad0,_0x3b1a13=await prepareSet(_0x18bc1e);let _0x394255=![];try{await saveAppRule(_0x18bc1e[_0x5be0d5(0x216)],{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)],'content':_0x3b1a13[_0x5be0d5(0x1e5)][_0x5be0d5(0x214)]});}catch(_0x524ccf){if(!isPlatformTransportFailure(_0x524ccf))throw _0x524ccf;_0x394255=!![];}let _0x1b698f;try{_0x1b698f=await getAppRule(_0x18bc1e[_0x5be0d5(0x216)],{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]});}catch(_0x25ada8){const _0x339867=appRuleError(_0x394255?_0x5be0d5(0x209):'app_rule_verification_unavailable',_0x5be0d5(0x1e6)+appRuleFileName(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)])+_0x5be0d5(0x1fa),_0x5be0d5(0x200));Object[_0x5be0d5(0x215)](_0x339867,_0x5be0d5(0x201),{'value':_0x25ada8,'enumerable':![]});throw _0x339867;}const _0x54d141=_0x1b698f&&inspectAppRuleContent(_0x1b698f[_0x5be0d5(0x214)])[_0x5be0d5(0x1f5)]===_0x3b1a13['replacement'][_0x5be0d5(0x1f5)],_0x503dea=_0x1b698f&&(_0x3b1a13[_0x5be0d5(0x20e)]===null||_0x1b698f[_0x5be0d5(0x21a)]>_0x3b1a13['beforeRecord'][_0x5be0d5(0x21a)]);if(!_0x1b698f||!_0x54d141||!_0x503dea)throw appRuleError(_0x394255?_0x5be0d5(0x209):_0x5be0d5(0x1f1),appRuleFileName(_0x3b1a13['input']['type'])+_0x5be0d5(0x1f4),_0x5be0d5(0x1ff)+_0x3b1a13['input'][_0x5be0d5(0x20a)]+_0x5be0d5(0x208));const _0x32f2b7=warningsFor(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x1ef)]);_0x394255&&_0x32f2b7[_0x5be0d5(0x21c)](_0x5be0d5(0x1fd));const _0x3acb3f=projectAppRule(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)],_0x1b698f);return{'ok':!![],'data':{'operation':_0x5be0d5(0x1fc),'selector':{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'scope':_0x5be0d5(0x1f8),'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]},'before':_0x3b1a13['before'],'after':_0x3acb3f,'dryRun':![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x32f2b7,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x394255,'expectedVersion':_0x3b1a13[_0x5be0d5(0x204)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]+_0x5be0d5(0x1f3)}},'message':_0x5be0d5(0x210)+appRuleFileName(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)])+_0x5be0d5(0x205)+_0x18bc1e[_0x5be0d5(0x203)]};}};
1
+ const a243_0xa3a42e=a243_0x4584;(function(_0x304c49,_0x3b679f){const _0x4b528f=a243_0x4584,_0x48e93d=_0x304c49();while(!![]){try{const _0x742ed9=parseInt(_0x4b528f(0x157))/0x1*(parseInt(_0x4b528f(0x12c))/0x2)+-parseInt(_0x4b528f(0x170))/0x3*(parseInt(_0x4b528f(0x161))/0x4)+parseInt(_0x4b528f(0x158))/0x5*(parseInt(_0x4b528f(0x15d))/0x6)+parseInt(_0x4b528f(0x164))/0x7*(-parseInt(_0x4b528f(0x149))/0x8)+parseInt(_0x4b528f(0x151))/0x9+-parseInt(_0x4b528f(0x16d))/0xa*(parseInt(_0x4b528f(0x137))/0xb)+-parseInt(_0x4b528f(0x140))/0xc;if(_0x742ed9===_0x3b679f)break;else _0x48e93d['push'](_0x48e93d['shift']());}catch(_0x1cb4a2){_0x48e93d['push'](_0x48e93d['shift']());}}}(a243_0x4a9c,0x40093));function a243_0x4a9c(){const _0x438e91=['type','str','content','app_rule_expected_version_invalid','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20for\x20','unconfigured','1529XZHvIi','number','contentHash','write','DATABASE','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','version','beforeRecord','5727636KHCZAs','file','input','cause','update','appCode','app_rule_verification_failed','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','17336DNhyGS','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)','expected-version','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','Set\x20','POST','4204890lYNkZZ','\x20--format\x20compress','isSafeInteger','before','\x20could\x20not\x20be\x20verified.','cookie','63843PGltbD','20fPyNhA','app_rule_file_required','expectedVersion','app_rule_set_outcome_unknown','create','751164SQYxDf','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','app_rule_version_mismatch','24obKAMp','app_rule_verification_unavailable','push','763PBttGx','rule','The\x20set\x20request\x20was\x20sent,\x20but\x20','trim','--file\x20is\x20required.','rules','byteSize','Pass\x20a\x20UTF-8\x20Markdown\x20file.','replacement','1060dLtNbb','string','rabetbase\x20rule\x20get\x20--type\x20','148335DnDVfO','set','10UCPzgH','Expected\x20','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.'];a243_0x4a9c=function(){return _0x438e91;};return a243_0x4a9c();}function a243_0x4584(_0x431eeb,_0x17a0ee){_0x431eeb=_0x431eeb-0x12b;const _0x4a9c88=a243_0x4a9c();let _0x45844c=_0x4a9c88[_0x431eeb];return _0x45844c;}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(_0x1c56ca){const _0x27f4fb=a243_0x4584,_0x30d34a=readAppRuleType(_0x1c56ca),_0x5a8e0=_0x1c56ca[_0x27f4fb(0x131)](_0x27f4fb(0x141))[_0x27f4fb(0x167)]();if(!_0x5a8e0)throw appRuleError(_0x27f4fb(0x159),_0x27f4fb(0x168),_0x27f4fb(0x16b));const _0x55e273=_0x1c56ca['flag'](_0x27f4fb(0x14d));let _0x121099;if(_0x55e273!==undefined){_0x121099=Number(_0x55e273);if(!Number[_0x27f4fb(0x153)](_0x121099)||_0x121099<0x0)throw appRuleError(_0x27f4fb(0x133),_0x27f4fb(0x12f));}return{'type':_0x30d34a,'file':_0x5a8e0,'expectedVersion':_0x121099};}async function prepareSet(_0x5ea188){const _0x34cced=a243_0x4584,_0x284dbe=readSetInput(_0x5ea188),_0x5a0667=await readAppRuleFile(_0x284dbe[_0x34cced(0x141)]);if(_0x284dbe[_0x34cced(0x130)]===_0x34cced(0x169)&&_0x5a0667[_0x34cced(0x132)]['length']>0x7d0)throw appRuleError('app_rule_content_too_large',_0x34cced(0x15f));const _0x3ffcc6=await getAppRule(_0x5ea188[_0x34cced(0x156)],{'appCode':_0x5ea188[_0x34cced(0x145)],'type':_0x284dbe[_0x34cced(0x130)]});if(_0x284dbe[_0x34cced(0x15a)]!==undefined&&(_0x3ffcc6?.[_0x34cced(0x13e)]??0x0)!==_0x284dbe['expectedVersion'])throw appRuleError(_0x34cced(0x160),appRuleFileName(_0x284dbe[_0x34cced(0x130)])+'\x20version\x20changed\x20before\x20write.',_0x34cced(0x12d)+_0x284dbe['expectedVersion']+';\x20current\x20version\x20is\x20'+(_0x3ffcc6?.[_0x34cced(0x13e)]??_0x34cced(0x136))+_0x34cced(0x148));return{'input':_0x284dbe,'replacement':_0x5a0667,'beforeRecord':_0x3ffcc6,'before':projectAppRule(_0x284dbe[_0x34cced(0x130)],_0x3ffcc6),'planned':{'type':_0x284dbe[_0x34cced(0x130)],'fileName':appRuleFileName(_0x284dbe[_0x34cced(0x130)]),'contextScope':appRuleContextScope(_0x284dbe[_0x34cced(0x130)]),'enabled':!![],'appCode':_0x5ea188['appCode'],'scope':_0x34cced(0x169),'contentByteSize':_0x5a0667['byteSize'],'contentHash':_0x5a0667[_0x34cced(0x139)]}};}function warningsFor(_0x26b829){return[];}export const ruleSet={'service':a243_0xa3a42e(0x165),'command':a243_0xa3a42e(0x12b),'description':a243_0xa3a42e(0x13c),'risk':a243_0xa3a42e(0x13a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0xa3a42e(0x141),'type':a243_0xa3a42e(0x16e),'required':!![],'description':a243_0xa3a42e(0x14c)},{'name':a243_0xa3a42e(0x14d),'type':a243_0xa3a42e(0x138),'required':![],'description':a243_0xa3a42e(0x14b)}],async 'validate'(_0xa8827f){readSetInput(_0xa8827f);},async 'dryRun'(_0x54e349){const _0x30c0c7=a243_0xa3a42e,_0x31294d=await prepareSet(_0x54e349);return asDryRunResult({'operation':_0x30c0c7(0x12b),'selector':{'appCode':_0x54e349[_0x30c0c7(0x145)],'scope':'rules','type':_0x31294d[_0x30c0c7(0x142)]['type']},'before':_0x31294d[_0x30c0c7(0x154)],'after':_0x31294d['planned'],'dryRun':!![],'backend':{'method':_0x30c0c7(0x150),'path':knowledgeDocumentsPath(_0x30c0c7(0x169),_0x31294d[_0x30c0c7(0x13f)]?_0x30c0c7(0x144):'create'),'body':{'appCode':_0x54e349['appCode'],..._0x31294d['beforeRecord']?{'id':_0x31294d[_0x30c0c7(0x13f)]['id']}:{},'title':_0x31294d['input'][_0x30c0c7(0x130)]==='rules'?'RULES':_0x30c0c7(0x13b),'contentHash':_0x31294d[_0x30c0c7(0x16c)][_0x30c0c7(0x139)],'contentByteSize':_0x31294d[_0x30c0c7(0x16c)][_0x30c0c7(0x16a)],..._0x31294d[_0x30c0c7(0x13f)]?{'expectedVersion':_0x31294d[_0x30c0c7(0x13f)]['version']}:{}}},'warnings':warningsFor(_0x31294d['input']['expectedVersion']),'verification':{'expectedVersion':_0x31294d[_0x30c0c7(0x13f)]?.[_0x30c0c7(0x13e)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x31294d['input'][_0x30c0c7(0x130)]+_0x30c0c7(0x152)}},{'method':_0x30c0c7(0x150),'url':knowledgeDocumentsPath(_0x30c0c7(0x169),_0x31294d[_0x30c0c7(0x13f)]?_0x30c0c7(0x144):_0x30c0c7(0x15c))});},async 'execute'(_0x2cbba7){const _0x5b56cc=a243_0xa3a42e,_0x3d90a6=await prepareSet(_0x2cbba7),_0x40a18e=_0x3d90a6[_0x5b56cc(0x13f)]===null?0x1:_0x3d90a6[_0x5b56cc(0x13f)][_0x5b56cc(0x13e)]+(_0x3d90a6[_0x5b56cc(0x13f)][_0x5b56cc(0x132)]===_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)]?0x0:0x1);let _0x17259d,_0x3cba7a=![];try{_0x17259d=await saveAppRule(_0x2cbba7[_0x5b56cc(0x156)],{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'type':_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)],'content':_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)],'expectedVersion':_0x3d90a6[_0x5b56cc(0x13f)]?.['version']??0x0,..._0x3d90a6[_0x5b56cc(0x13f)]?{'id':_0x3d90a6[_0x5b56cc(0x13f)]['id']}:{}});if(_0x17259d[_0x5b56cc(0x13e)]!==_0x40a18e||_0x17259d[_0x5b56cc(0x132)]!==_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)]||_0x3d90a6[_0x5b56cc(0x13f)]!==null&&_0x17259d['id']!==_0x3d90a6[_0x5b56cc(0x13f)]['id'])throw appRuleError(_0x5b56cc(0x146),_0x5b56cc(0x13d),_0x5b56cc(0x14e));}catch(_0x1cef00){if(!isPlatformTransportFailure(_0x1cef00))throw _0x1cef00;_0x3cba7a=!![];}let _0x51fdfb;try{_0x51fdfb=await getAppRule(_0x2cbba7['cookie'],{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'type':_0x3d90a6[_0x5b56cc(0x142)]['type']});}catch(_0x493874){const _0x2bf56e=appRuleError(_0x3cba7a?_0x5b56cc(0x15b):_0x5b56cc(0x162),_0x5b56cc(0x166)+appRuleFileName(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)])+_0x5b56cc(0x155),_0x5b56cc(0x14a));Object['defineProperty'](_0x2bf56e,_0x5b56cc(0x143),{'value':_0x493874,'enumerable':![]});throw _0x2bf56e;}const _0x17a9f9=_0x51fdfb&&inspectAppRuleContent(_0x51fdfb[_0x5b56cc(0x132)])['contentHash']===_0x3d90a6[_0x5b56cc(0x16c)]['contentHash'],_0x127cc0=_0x51fdfb&&_0x51fdfb['version']===_0x40a18e&&(!_0x17259d||_0x51fdfb['id']===_0x17259d['id']&&_0x51fdfb[_0x5b56cc(0x13e)]===_0x17259d[_0x5b56cc(0x13e)]);if(!_0x51fdfb||!_0x17a9f9||!_0x127cc0||_0x3d90a6[_0x5b56cc(0x13f)]!==null&&_0x51fdfb['id']!==_0x3d90a6[_0x5b56cc(0x13f)]['id'])throw appRuleError(_0x3cba7a?_0x5b56cc(0x15b):_0x5b56cc(0x146),appRuleFileName(_0x3d90a6['input'][_0x5b56cc(0x130)])+_0x5b56cc(0x15e),_0x5b56cc(0x147)+_0x3d90a6[_0x5b56cc(0x142)]['type']+_0x5b56cc(0x134));const _0x297047=warningsFor(_0x3d90a6['input'][_0x5b56cc(0x15a)]);_0x3cba7a&&_0x297047[_0x5b56cc(0x163)](_0x5b56cc(0x12e));const _0xd4bbc4=projectAppRule(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)],_0x51fdfb);return{'ok':!![],'data':{'operation':_0x5b56cc(0x12b),'selector':{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'scope':'rules','type':_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)]},'before':_0x3d90a6['before'],'after':_0xd4bbc4,'dryRun':![],'backend':{'method':_0x5b56cc(0x150),'path':knowledgeDocumentsPath('rules',_0x3d90a6[_0x5b56cc(0x13f)]?_0x5b56cc(0x144):_0x5b56cc(0x15c))},'warnings':_0x297047,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x3cba7a,'expectedVersion':_0x3d90a6[_0x5b56cc(0x13f)]?.[_0x5b56cc(0x13e)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x5b56cc(0x16f)+_0x3d90a6[_0x5b56cc(0x142)]['type']+_0x5b56cc(0x152)}},'message':_0x5b56cc(0x14f)+appRuleFileName(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)])+_0x5b56cc(0x135)+_0x2cbba7[_0x5b56cc(0x145)]};}};
@@ -2,6 +2,7 @@ import type { AppRuleRecord, AppRuleType } from "../../core/api-client.js";
2
2
  import { CliError } from "../../errors.js";
3
3
  import type { RuntimeContext } from "../../framework/types.js";
4
4
  export declare const APP_RULE_TYPES: readonly AppRuleType[];
5
+ export declare const MAX_APP_RULE_UNITS: number;
5
6
  export declare const MAX_APP_RULE_BYTES: number;
6
7
  export type AppRuleContextScope = "page-api-development" | "database-analysis";
7
8
  export declare function appRuleError(code: string, message: string, hint?: string): CliError;
@@ -23,16 +24,17 @@ export declare function projectAppRule(type: AppRuleType, record: AppRuleRecord
23
24
  } | {
24
25
  updateTime?: string | number | undefined;
25
26
  createTime?: string | number | undefined;
27
+ contentByteSize: number;
28
+ contentHash: string;
29
+ indexStatus?: import("../../core/api-client.js").KnowledgeIndexStatus | undefined;
26
30
  type: AppRuleType;
27
31
  fileName: "RULES.md" | "DATABASE.md";
28
32
  contextScope: AppRuleContextScope;
29
33
  enabled: boolean;
30
- id: number;
34
+ id: string;
31
35
  scope: "rules";
32
36
  appCode: string;
33
37
  version: number;
34
- contentByteSize: number;
35
- contentHash: string;
36
38
  };
37
39
  export declare const APP_RULE_TYPE_FLAG: {
38
40
  name: string;
@@ -1 +1 @@
1
- const a244_0x5a0a74=a244_0x3f4e;(function(_0x1787ea,_0x49fb30){const _0x26f2ad=a244_0x3f4e,_0x10d406=_0x1787ea();while(!![]){try{const _0x902f4b=-parseInt(_0x26f2ad(0xb4))/0x1*(-parseInt(_0x26f2ad(0xaa))/0x2)+parseInt(_0x26f2ad(0xac))/0x3+parseInt(_0x26f2ad(0xca))/0x4*(-parseInt(_0x26f2ad(0xc7))/0x5)+-parseInt(_0x26f2ad(0xa3))/0x6*(-parseInt(_0x26f2ad(0xa7))/0x7)+parseInt(_0x26f2ad(0xa5))/0x8*(parseInt(_0x26f2ad(0xa6))/0x9)+-parseInt(_0x26f2ad(0xaf))/0xa*(-parseInt(_0x26f2ad(0x9e))/0xb)+-parseInt(_0x26f2ad(0xab))/0xc;if(_0x902f4b===_0x49fb30)break;else _0x10d406['push'](_0x10d406['shift']());}catch(_0x1bf622){_0x10d406['push'](_0x10d406['shift']());}}}(a244_0x5edf,0xaf73e));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';function a244_0x5edf(){const _0x26d2fe=['Cannot\x20access\x20app\x20rule\x20file:\x20','4268uDEhzQ','trim','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','app_rule_content_too_large','app_rule_file_unreadable','page-api-development','1195106rzhSda','digest','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','type','isFile','12hEoadF','contentHash','6909536kvsrid','9jcXwRu','1311933QFqRDd','updateTime','sha256:','2338jIJGgm','20044920dHIWhD','4134744qlkVQn','toLowerCase','string','50NTMulY','byteSize','scope','Cannot\x20read\x20app\x20rule\x20file:\x20','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','371fkLpfD','version','database','App\x20rule\x20file\x20is\x20blank:\x20','utf-8','update','DATABASE.md','database-analysis','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','createTime','size','RULES.md','content','rules','--file\x20is\x20required.','sha256','byteLength','Pass\x20a\x20UTF-8\x20Markdown\x20file.','utf8','5645tMotGq','decode'];a244_0x5edf=function(){return _0x26d2fe;};return a244_0x5edf();}import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x5a0a74(0xc1),a244_0x5a0a74(0xb6)];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;const APP_RULE_FILES={'rules':a244_0x5a0a74(0xbf),'database':a244_0x5a0a74(0xba)},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x5a0a74(0x9d),'database':a244_0x5a0a74(0xbb)};function a244_0x3f4e(_0x31bd2d,_0x13cf24){_0x31bd2d=_0x31bd2d-0x9a;const _0x5edf79=a244_0x5edf();let _0x3f4e49=_0x5edf79[_0x31bd2d];return _0x3f4e49;}export function appRuleError(_0x361468,_0x4a080b,_0x5a4a25){return new CliError(_0x361468,0x1,_0x4a080b,_0x5a4a25);}export function readAppRuleType(_0x5cf872){const _0x44d241=a244_0x5a0a74,_0x570e7f=_0x5cf872['str']('type')[_0x44d241(0xcb)]()[_0x44d241(0xad)]();if(_0x570e7f!==_0x44d241(0xc1)&&_0x570e7f!==_0x44d241(0xb6))throw appRuleError('app_rule_type_invalid',_0x44d241(0xa0));return _0x570e7f;}export function appRuleFileName(_0xfe0b7d){return APP_RULE_FILES[_0xfe0b7d];}export function appRuleContextScope(_0x32a997){return APP_RULE_CONTEXT_SCOPES[_0x32a997];}export function inspectAppRuleContent(_0x574383){const _0x33fb3c=a244_0x5a0a74,_0x4b6e9a=Buffer['from'](_0x574383,_0x33fb3c(0xc6));return{'content':_0x574383,'byteSize':_0x4b6e9a['byteLength'],'contentHash':_0x33fb3c(0xa9)+createHash(_0x33fb3c(0xc3))[_0x33fb3c(0xb9)](_0x4b6e9a)[_0x33fb3c(0x9f)]('hex')};}export async function readAppRuleFile(_0x3a7ba){const _0x130bfe=a244_0x5a0a74,_0x5b7691=_0x3a7ba[_0x130bfe(0xcb)]();if(!_0x5b7691)throw appRuleError('app_rule_file_required',_0x130bfe(0xc2),_0x130bfe(0xc5));const _0x4a7392=resolve(_0x5b7691);let _0x5cd8ad;try{_0x5cd8ad=await stat(_0x4a7392);}catch(_0x540c7c){throw appRuleError(_0x130bfe(0x9c),_0x130bfe(0xc9)+_0x5b7691,_0x540c7c instanceof Error?_0x540c7c['message']:String(_0x540c7c));}if(!_0x5cd8ad[_0x130bfe(0xa2)]())throw appRuleError('app_rule_file_invalid',_0x130bfe(0x9a)+_0x5b7691);if(_0x5cd8ad[_0x130bfe(0xbe)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x130bfe(0x9b),'App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0x4a506b;try{_0x4a506b=await readFile(_0x4a7392);}catch(_0x344af1){throw appRuleError('app_rule_file_unreadable',_0x130bfe(0xb2)+_0x5b7691,_0x344af1 instanceof Error?_0x344af1['message']:String(_0x344af1));}if(_0x4a506b[_0x130bfe(0xc4)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x130bfe(0x9b),'App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0x100f8c;try{_0x100f8c=new TextDecoder(_0x130bfe(0xb8),{'fatal':!![],'ignoreBOM':!![]})[_0x130bfe(0xc8)](_0x4a506b);}catch{throw appRuleError('app_rule_content_invalid',_0x130bfe(0xb3)+_0x5b7691);}if(!_0x100f8c[_0x130bfe(0xcb)]())throw appRuleError('app_rule_content_invalid',_0x130bfe(0xb7)+_0x5b7691);return inspectAppRuleContent(_0x100f8c);}export function projectAppRule(_0x54b579,_0x275d85){const _0x2a7ff0=a244_0x5a0a74;if(!_0x275d85)return{'type':_0x54b579,'fileName':appRuleFileName(_0x54b579),'contextScope':appRuleContextScope(_0x54b579),'enabled':![]};const _0x5e17a5=inspectAppRuleContent(_0x275d85[_0x2a7ff0(0xc0)]);return{'type':_0x54b579,'fileName':appRuleFileName(_0x54b579),'contextScope':appRuleContextScope(_0x54b579),'enabled':!![],'id':_0x275d85['id'],'scope':_0x275d85[_0x2a7ff0(0xb1)],'appCode':_0x275d85['appCode'],'version':_0x275d85[_0x2a7ff0(0xb5)],'contentByteSize':_0x5e17a5[_0x2a7ff0(0xb0)],'contentHash':_0x5e17a5[_0x2a7ff0(0xa4)],..._0x275d85[_0x2a7ff0(0xbd)]!==undefined&&_0x275d85[_0x2a7ff0(0xbd)]!==null?{'createTime':_0x275d85['createTime']}:{},..._0x275d85[_0x2a7ff0(0xa8)]!==undefined&&_0x275d85['updateTime']!==null?{'updateTime':_0x275d85[_0x2a7ff0(0xa8)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x5a0a74(0xa1),'type':a244_0x5a0a74(0xae),'required':!![],'description':a244_0x5a0a74(0xbc),'enum':[...APP_RULE_TYPES]};
1
+ const a244_0x268a4c=a244_0x1180;(function(_0x1f09ab,_0x1f40af){const _0x3b84a8=a244_0x1180,_0x1d48b6=_0x1f09ab();while(!![]){try{const _0xf422a2=-parseInt(_0x3b84a8(0x145))/0x1+parseInt(_0x3b84a8(0x141))/0x2+-parseInt(_0x3b84a8(0x14a))/0x3*(-parseInt(_0x3b84a8(0x14d))/0x4)+-parseInt(_0x3b84a8(0x146))/0x5+-parseInt(_0x3b84a8(0x143))/0x6+parseInt(_0x3b84a8(0x156))/0x7*(parseInt(_0x3b84a8(0x13f))/0x8)+-parseInt(_0x3b84a8(0x13d))/0x9;if(_0xf422a2===_0x1f40af)break;else _0x1d48b6['push'](_0x1d48b6['shift']());}catch(_0x50c8e1){_0x1d48b6['push'](_0x1d48b6['shift']());}}}(a244_0x3094,0x95ee8));import{createHash}from'node:crypto';function a244_0x3094(){const _0x4b27c2=['length','contentHash','database','App\x20rule\x20file\x20is\x20blank:\x20','1065969Bvzqsy','app_rule_content_too_large','6334288WufAvp','scope','604994LMumgU','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','2304900hxSnGW','message','296266zPLdVQ','1690880wGAxQG','str','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','digest','15lVipsd','Cannot\x20read\x20app\x20rule\x20file:\x20','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','525496gJDEgw','appCode','page-api-development','RULES.md','app_rule_file_invalid','rules','content','byteLength','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','7HRDjGn','app_rule_file_required','string','app_rule_content_invalid','createTime','Pass\x20a\x20UTF-8\x20Markdown\x20file.','Cannot\x20access\x20app\x20rule\x20file:\x20','size','sha256:','--file\x20is\x20required.','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','byteSize','decode','app_rule_file_unreadable','utf8','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','updateTime','trim','type','indexStatus','update'];a244_0x3094=function(){return _0x4b27c2;};return a244_0x3094();}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=['rules',a244_0x268a4c(0x13b)];function a244_0x1180(_0x4366bd,_0x30c51f){_0x4366bd=_0x4366bd-0x125;const _0x3094fe=a244_0x3094();let _0x11808d=_0x3094fe[_0x4366bd];return _0x11808d;}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_0x268a4c(0x150),'database':'DATABASE.md'},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x268a4c(0x14f),'database':'database-analysis'};export function appRuleError(_0x5590f2,_0x24fbf5,_0x58a643){return new CliError(_0x5590f2,0x1,_0x24fbf5,_0x58a643);}export function readAppRuleType(_0x2edaed){const _0x3fe0c9=a244_0x268a4c,_0x10b373=_0x2edaed[_0x3fe0c9(0x147)](_0x3fe0c9(0x136))['trim']()['toLowerCase']();if(_0x10b373!==_0x3fe0c9(0x152)&&_0x10b373!==_0x3fe0c9(0x13b))throw appRuleError('app_rule_type_invalid',_0x3fe0c9(0x12e));return _0x10b373;}export function appRuleFileName(_0x5e7197){return APP_RULE_FILES[_0x5e7197];}export function appRuleContextScope(_0x4c801e){return APP_RULE_CONTEXT_SCOPES[_0x4c801e];}export function inspectAppRuleContent(_0x4214e5){const _0x57f3c7=a244_0x268a4c,_0x368e3a=Buffer['from'](_0x4214e5,_0x57f3c7(0x132));return{'content':_0x4214e5,'byteSize':_0x368e3a[_0x57f3c7(0x154)],'contentHash':_0x57f3c7(0x12c)+createHash('sha256')[_0x57f3c7(0x138)](_0x368e3a)[_0x57f3c7(0x149)]('hex')};}export async function readAppRuleFile(_0x493ed2){const _0x4fe0d6=a244_0x268a4c,_0x3f7124=_0x493ed2[_0x4fe0d6(0x135)]();if(!_0x3f7124)throw appRuleError(_0x4fe0d6(0x125),_0x4fe0d6(0x12d),_0x4fe0d6(0x129));const _0x4f8f6a=resolve(_0x3f7124);let _0x652393;try{_0x652393=await stat(_0x4f8f6a);}catch(_0x4ae365){throw appRuleError('app_rule_file_unreadable',_0x4fe0d6(0x12a)+_0x3f7124,_0x4ae365 instanceof Error?_0x4ae365['message']:String(_0x4ae365));}if(!_0x652393['isFile']())throw appRuleError(_0x4fe0d6(0x151),_0x4fe0d6(0x148)+_0x3f7124);if(_0x652393[_0x4fe0d6(0x12b)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x4fe0d6(0x13e),_0x4fe0d6(0x133));let _0x53bd8c;try{_0x53bd8c=await readFile(_0x4f8f6a);}catch(_0x1a271e){throw appRuleError(_0x4fe0d6(0x131),_0x4fe0d6(0x14b)+_0x3f7124,_0x1a271e instanceof Error?_0x1a271e[_0x4fe0d6(0x144)]:String(_0x1a271e));}if(_0x53bd8c['byteLength']>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x4fe0d6(0x133));let _0xe419da;try{_0xe419da=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x4fe0d6(0x130)](_0x53bd8c);}catch{throw appRuleError(_0x4fe0d6(0x127),_0x4fe0d6(0x155)+_0x3f7124);}if(_0xe419da[_0x4fe0d6(0x139)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x4fe0d6(0x13e),_0x4fe0d6(0x14c));if(!_0xe419da[_0x4fe0d6(0x135)]())throw appRuleError(_0x4fe0d6(0x127),_0x4fe0d6(0x13c)+_0x3f7124);return inspectAppRuleContent(_0xe419da);}export function projectAppRule(_0x453fa7,_0x2e58e5){const _0x1131c8=a244_0x268a4c;if(!_0x2e58e5)return{'type':_0x453fa7,'fileName':appRuleFileName(_0x453fa7),'contextScope':appRuleContextScope(_0x453fa7),'enabled':![]};const _0x2dfab3=inspectAppRuleContent(_0x2e58e5[_0x1131c8(0x153)]);return{'type':_0x453fa7,'fileName':appRuleFileName(_0x453fa7),'contextScope':appRuleContextScope(_0x453fa7),'enabled':!![],'id':_0x2e58e5['id'],'scope':_0x2e58e5[_0x1131c8(0x140)],'appCode':_0x2e58e5[_0x1131c8(0x14e)],'version':_0x2e58e5['version'],..._0x2e58e5['indexStatus']!==undefined?{'indexStatus':_0x2e58e5[_0x1131c8(0x137)]}:{},'contentByteSize':_0x2dfab3[_0x1131c8(0x12f)],'contentHash':_0x2dfab3[_0x1131c8(0x13a)],..._0x2e58e5[_0x1131c8(0x128)]!==undefined&&_0x2e58e5[_0x1131c8(0x128)]!==null?{'createTime':_0x2e58e5['createTime']}:{},..._0x2e58e5['updateTime']!==undefined&&_0x2e58e5[_0x1131c8(0x134)]!==null?{'updateTime':_0x2e58e5[_0x1131c8(0x134)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x268a4c(0x136),'type':a244_0x268a4c(0x126),'required':!![],'description':a244_0x268a4c(0x142),'enum':[...APP_RULE_TYPES]};
@@ -1 +1 @@
1
- const a245_0xf841e8=a245_0x5000;(function(_0x32ec9e,_0x3a7ec4){const _0x59a742=a245_0x5000,_0x865815=_0x32ec9e();while(!![]){try{const _0x5a10d4=-parseInt(_0x59a742(0xae))/0x1*(-parseInt(_0x59a742(0xc9))/0x2)+-parseInt(_0x59a742(0xb6))/0x3+parseInt(_0x59a742(0xc1))/0x4+parseInt(_0x59a742(0x94))/0x5*(-parseInt(_0x59a742(0xba))/0x6)+-parseInt(_0x59a742(0x9b))/0x7+-parseInt(_0x59a742(0x95))/0x8*(parseInt(_0x59a742(0xc7))/0x9)+-parseInt(_0x59a742(0xa5))/0xa*(-parseInt(_0x59a742(0xa1))/0xb);if(_0x5a10d4===_0x3a7ec4)break;else _0x865815['push'](_0x865815['shift']());}catch(_0x555c49){_0x865815['push'](_0x865815['shift']());}}}(a245_0x28f3,0x4c75f));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';function a245_0x28f3(){const _0x393dfb=['Enable\x20watch\x20mode\x20for\x20preview','scripts','has','Script\x20\x22','bun.lock','\x20\x20\x20\x20','args','changed','1gSyfMj','dev','No\x20package.json\x20found\x20in\x20current\x20directory.','close','start','log','all','\x20run\x20','701889WsTClC','yarn.lock','No\x20scripts\x20defined\x20in\x20package.json.','slice','2238iBowpf','build','package.json','\x22\x20not\x20found\x20in\x20package.json.','--watch','bun.lockb','preview','470836keOjEe','\x20run\x20preview\x20--watch','\x0a\x20\x20Usage:\x20','validation','keys','\x20run\x20start','168633eOCnzW','write','910492nIaLdb','\x20run\x20<script>\x0a','\x20run\x20preview','parse','needsUpgrade','vite','inherit','\x20exited\x20with\x20code\x20','yarn','join','Run\x20a\x20package.json\x20script','1605UkYELq','24kzoLVv','vite\x20preview\x20exited\x20with\x20code\x20','Available:\x20','(none)','run','pnpm-lock.yaml','1774395gLqOTT','pnpm','path','error','bool','Script\x20name\x20defined\x20in\x20package.json','385HjCsBt','push','node_modules','cwd','115320pWGnjM'];a245_0x28f3=function(){return _0x393dfb;};return a245_0x28f3();}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_0xf841e8(0xb2),a245_0xf841e8(0xaf)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set(['start','dev',a245_0xf841e8(0xbb),a245_0xf841e8(0xc0)]);export function syncProjectDomainRoutingBeforeScript(_0x37df4e,_0x381cd0){const _0x429329=a245_0xf841e8;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x429329(0xa8)](_0x381cd0))return null;const _0x4d0ff0=findProjectRootDirectory(_0x37df4e);if(!resolveConfigPath(_0x4d0ff0))return null;const _0x188de4=writeProjectDomainRoutingManifest(_0x4d0ff0);return{'path':_0x188de4[_0x429329(0x9d)],'changed':_0x188de4['changed']};}function readPackageScripts(_0x4046b9){const _0x445ec1=a245_0xf841e8,_0x59aac5=resolve(_0x4046b9,_0x445ec1(0xbc));if(!existsSync(_0x59aac5))return null;try{const _0x339cb1=JSON[_0x445ec1(0x8c)](readFileSync(_0x59aac5,'utf-8'));return _0x339cb1[_0x445ec1(0xa7)]??{};}catch{return null;}}function detectPackageManager(_0x58ae5a){const _0x37c81e=a245_0xf841e8;if(existsSync(resolve(_0x58ae5a,_0x37c81e(0xbf)))||existsSync(resolve(_0x58ae5a,_0x37c81e(0xaa))))return'bun';if(existsSync(resolve(_0x58ae5a,_0x37c81e(0x9a))))return _0x37c81e(0x9c);if(existsSync(resolve(_0x58ae5a,_0x37c81e(0xb7))))return _0x37c81e(0x91);return'npm';}async function versionCheck(_0x12f4a0){const _0x49807f=a245_0xf841e8,_0x21a445=await checkCliVersion();(_0x21a445[_0x49807f(0x8d)]||_0x21a445['belowMinimum'])&&(printCliUpgradeWarning(_0x21a445),assertCliVersionSupported(_0x21a445));const _0x1fc6fa=await checkSdkVersion(_0x12f4a0);if(_0x1fc6fa[_0x49807f(0x8d)])printSdkUpgradeWarning(_0x1fc6fa);}function a245_0x5000(_0x41e05f,_0x10f5e5){_0x41e05f=_0x41e05f-0x8c;const _0x28f39d=a245_0x28f3();let _0x500069=_0x28f39d[_0x41e05f];return _0x500069;}function spawnScript(_0x4d708d,_0xb02ea9,_0x25dfc7,_0x43fe7d){return new Promise((_0x2178f7,_0x2a17d1)=>{const _0x3e8e54=a245_0x5000,_0x19cef9=[_0x3e8e54(0x99),_0xb02ea9,..._0x25dfc7],_0x36c345=spawn(_0x4d708d,_0x19cef9,{'cwd':_0x43fe7d,'stdio':_0x3e8e54(0x8f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x43fe7d,_0x3e8e54(0xa3),'.bin')+delimiter+process.env.PATH}});_0x36c345['on'](_0x3e8e54(0xb1),_0x1721c6=>{const _0x58cc5b=_0x3e8e54;if(_0x1721c6===0x0||_0x1721c6===null)_0x2178f7();else _0x2a17d1(new Error(_0x4d708d+_0x58cc5b(0xb5)+_0xb02ea9+_0x58cc5b(0x90)+_0x1721c6));}),_0x36c345['on'](_0x3e8e54(0x9e),_0x2a17d1);});}function spawnViteBuildWatch(_0x3c186f){return new Promise((_0x299d88,_0x4a7f91)=>{const _0x4a81bf=a245_0x5000,_0x1dfb44=spawn(_0x4a81bf(0x8e),[_0x4a81bf(0xbb),_0x4a81bf(0xbe)],{'cwd':_0x3c186f,'stdio':_0x4a81bf(0x8f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3c186f,_0x4a81bf(0xa3),'.bin')+delimiter+process.env.PATH}});_0x1dfb44['on']('close',_0x3e5963=>{if(_0x3e5963===0x0||_0x3e5963===null)_0x299d88();else _0x4a7f91(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x3e5963));}),_0x1dfb44['on'](_0x4a81bf(0x9e),_0x4a7f91);});}function spawnVitePreview(_0x117a40){return new Promise((_0x33f0bb,_0xb11f86)=>{const _0x50bb04=a245_0x5000,_0x26fc42=spawn('vite',[_0x50bb04(0xc0)],{'cwd':_0x117a40,'stdio':_0x50bb04(0x8f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x117a40,'node_modules','.bin')+delimiter+process.env.PATH}});_0x26fc42['on']('close',_0x33c5c8=>{const _0x54e387=_0x50bb04;if(_0x33c5c8===0x0||_0x33c5c8===null)_0x33f0bb();else _0xb11f86(new Error(_0x54e387(0x96)+_0x33c5c8));}),_0x26fc42['on'](_0x50bb04(0x9e),_0xb11f86);});}const runFlags=[{'name':'watch','type':'boolean','description':a245_0xf841e8(0xa6),'default':![]}];export const runDefinition={'service':a245_0xf841e8(0x99),'command':a245_0xf841e8(0x99),'description':a245_0xf841e8(0x93),'risk':a245_0xf841e8(0xc8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a245_0xf841e8(0xa0),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x48a98d=a245_0xf841e8,_0x350e2d=[];return _0x350e2d['push']('\x20\x20EXAMPLES'),_0x350e2d[_0x48a98d(0xa2)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x48a98d(0xc6)),_0x350e2d['push'](_0x48a98d(0xab)+CLI_BIN_NAME+'\x20run\x20build'),_0x350e2d['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x48a98d(0xcb)),_0x350e2d[_0x48a98d(0xa2)](_0x48a98d(0xab)+CLI_BIN_NAME+_0x48a98d(0xc2)),_0x350e2d[_0x48a98d(0x92)]('\x0a');},async 'execute'(_0x226f61){const _0x434a0f=a245_0xf841e8,_0x5f34f1=process[_0x434a0f(0xa4)](),_0x197be6=_0x226f61[_0x434a0f(0xac)][0x0],_0xb1a63a=_0x226f61[_0x434a0f(0xac)][_0x434a0f(0xb9)](0x1),_0x4a9740=readPackageScripts(_0x5f34f1);if(!_0x4a9740)throw CliErrors['validation'](_0x434a0f(0xb0));if(!_0x197be6){const _0x287812=Object[_0x434a0f(0xc5)](_0x4a9740);if(_0x287812['length']===0x0)console[_0x434a0f(0xb3)](_0x434a0f(0xb8));else{console[_0x434a0f(0xb3)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x1a8d03 of _0x287812){console['log'](_0x434a0f(0xab)+_0x1a8d03);}console[_0x434a0f(0xb3)](_0x434a0f(0xc3)+CLI_BIN_NAME+_0x434a0f(0xca));}return{'ok':!![]};}if(!_0x4a9740[_0x197be6])throw CliErrors[_0x434a0f(0xc4)](_0x434a0f(0xa9)+_0x197be6+_0x434a0f(0xbd),_0x434a0f(0x97)+(Object[_0x434a0f(0xc5)](_0x4a9740)[_0x434a0f(0x92)](',\x20')||_0x434a0f(0x98)));const _0x232421=detectPackageManager(_0x5f34f1),_0xfe8f26=syncProjectDomainRoutingBeforeScript(_0x5f34f1,_0x197be6);_0xfe8f26?.[_0x434a0f(0xad)]&&console[_0x434a0f(0x9e)]('Domain\x20routing\x20synchronized:\x20'+_0xfe8f26[_0x434a0f(0x9d)]);VERSION_CHECK_SCRIPTS[_0x434a0f(0xa8)](_0x197be6)&&await versionCheck(_0x5f34f1);if(_0x197be6===_0x434a0f(0xc0)&&_0x226f61[_0x434a0f(0x9f)]('watch'))return await Promise[_0x434a0f(0xb4)]([spawnViteBuildWatch(_0x5f34f1),spawnVitePreview(_0x5f34f1)]),{'ok':!![]};return await spawnScript(_0x232421,_0x197be6,_0xb1a63a,_0x5f34f1),{'ok':!![]};}};
1
+ const a245_0xcfc987=a245_0x4995;(function(_0x53ed89,_0xf6312){const _0x2e25b0=a245_0x4995,_0x57bd3d=_0x53ed89();while(!![]){try{const _0x12f0fc=parseInt(_0x2e25b0(0xb8))/0x1*(-parseInt(_0x2e25b0(0xc2))/0x2)+parseInt(_0x2e25b0(0xe0))/0x3+parseInt(_0x2e25b0(0xb9))/0x4+parseInt(_0x2e25b0(0xb2))/0x5*(parseInt(_0x2e25b0(0xdd))/0x6)+-parseInt(_0x2e25b0(0xd7))/0x7*(-parseInt(_0x2e25b0(0xc8))/0x8)+parseInt(_0x2e25b0(0xd3))/0x9+-parseInt(_0x2e25b0(0xd2))/0xa;if(_0x12f0fc===_0xf6312)break;else _0x57bd3d['push'](_0x57bd3d['shift']());}catch(_0xa4bf08){_0x57bd3d['push'](_0x57bd3d['shift']());}}}(a245_0x367c,0x85279));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';function a245_0x367c(){const _0x587248=['pnpm','slice','all','belowMinimum','preview','vite\x20preview\x20exited\x20with\x20code\x20','watch','21777880CvEvTQ','6985773qyKEFZ','No\x20scripts\x20defined\x20in\x20package.json.','has','bun.lock','371805rFMQip','keys','vite','inherit','run','Run\x20a\x20package.json\x20script','84ENPslV','bun','\x20run\x20<script>\x0a','1753809THRypK','push','bun.lockb','bool','\x20run\x20preview','write','\x20exited\x20with\x20code\x20','args','log','parse','\x20\x20EXAMPLES','Script\x20\x22','pnpm-lock.yaml','boolean','\x20\x20\x20\x20','yarn.lock','dev','length','cwd','changed','path','Available:\x20','error','start','\x20run\x20start','285525BLlbfF','scripts','script','validation','.bin','Domain\x20routing\x20synchronized:\x20','643vQBnJc','813800gcRscq','\x20run\x20preview\x20--watch','\x22\x20not\x20found\x20in\x20package.json.','package.json','npm','needsUpgrade','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','node_modules','No\x20package.json\x20found\x20in\x20current\x20directory.','534VEXocE','Enable\x20watch\x20mode\x20for\x20preview','yarn','close','utf-8','--watch','80HJMZgN','\x0a\x20\x20Available\x20scripts:\x0a','\x20run\x20build'];a245_0x367c=function(){return _0x587248;};return a245_0x367c();}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_0xcfc987(0xb0),a245_0xcfc987(0xa9)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0xcfc987(0xb0),a245_0xcfc987(0xa9),'build','preview']);export function syncProjectDomainRoutingBeforeScript(_0xbd3e87,_0x3a6ef2){const _0x28f692=a245_0xcfc987;if(!DOMAIN_ROUTING_SYNC_SCRIPTS['has'](_0x3a6ef2))return null;const _0x5b95e4=findProjectRootDirectory(_0xbd3e87);if(!resolveConfigPath(_0x5b95e4))return null;const _0x20c14f=writeProjectDomainRoutingManifest(_0x5b95e4);return{'path':_0x20c14f[_0x28f692(0xad)],'changed':_0x20c14f[_0x28f692(0xac)]};}function readPackageScripts(_0x20f684){const _0x2a2e20=a245_0xcfc987,_0x459930=resolve(_0x20f684,_0x2a2e20(0xbc));if(!existsSync(_0x459930))return null;try{const _0x15dd68=JSON[_0x2a2e20(0xa2)](readFileSync(_0x459930,_0x2a2e20(0xc6)));return _0x15dd68[_0x2a2e20(0xb3)]??{};}catch{return null;}}function detectPackageManager(_0x3bcb4b){const _0x423c68=a245_0xcfc987;if(existsSync(resolve(_0x3bcb4b,_0x423c68(0x9b)))||existsSync(resolve(_0x3bcb4b,_0x423c68(0xd6))))return _0x423c68(0xde);if(existsSync(resolve(_0x3bcb4b,_0x423c68(0xa5))))return _0x423c68(0xcb);if(existsSync(resolve(_0x3bcb4b,_0x423c68(0xa8))))return _0x423c68(0xc4);return _0x423c68(0xbd);}async function versionCheck(_0x4f7c34){const _0xba911=a245_0xcfc987,_0x28d042=await checkCliVersion();(_0x28d042[_0xba911(0xbe)]||_0x28d042[_0xba911(0xce)])&&(printCliUpgradeWarning(_0x28d042),assertCliVersionSupported(_0x28d042));const _0x908c25=await checkSdkVersion(_0x4f7c34);if(_0x908c25[_0xba911(0xbe)])printSdkUpgradeWarning(_0x908c25);}function spawnScript(_0x120022,_0x1df2c3,_0x34b2c0,_0xc1f762){return new Promise((_0x325e15,_0x1a521a)=>{const _0x384579=a245_0x4995,_0x4fb08a=['run',_0x1df2c3,..._0x34b2c0],_0x10f50b=spawn(_0x120022,_0x4fb08a,{'cwd':_0xc1f762,'stdio':_0x384579(0xda),'shell':!![],'env':{...process.env,'PATH':''+join(_0xc1f762,_0x384579(0xc0),_0x384579(0xb6))+delimiter+process.env.PATH}});_0x10f50b['on'](_0x384579(0xc5),_0x5607fa=>{const _0x33b564=_0x384579;if(_0x5607fa===0x0||_0x5607fa===null)_0x325e15();else _0x1a521a(new Error(_0x120022+'\x20run\x20'+_0x1df2c3+_0x33b564(0x9f)+_0x5607fa));}),_0x10f50b['on']('error',_0x1a521a);});}function spawnViteBuildWatch(_0x359bfa){return new Promise((_0x36368f,_0x3384d5)=>{const _0x1a54a4=a245_0x4995,_0x2b108f=spawn(_0x1a54a4(0xd9),['build',_0x1a54a4(0xc7)],{'cwd':_0x359bfa,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x359bfa,_0x1a54a4(0xc0),_0x1a54a4(0xb6))+delimiter+process.env.PATH}});_0x2b108f['on']('close',_0x4fd2f3=>{const _0x70a893=_0x1a54a4;if(_0x4fd2f3===0x0||_0x4fd2f3===null)_0x36368f();else _0x3384d5(new Error(_0x70a893(0xbf)+_0x4fd2f3));}),_0x2b108f['on']('error',_0x3384d5);});}function spawnVitePreview(_0x4d7343){return new Promise((_0x457ac2,_0x30a974)=>{const _0x5c3607=a245_0x4995,_0x386eb7=spawn('vite',[_0x5c3607(0xcf)],{'cwd':_0x4d7343,'stdio':_0x5c3607(0xda),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4d7343,_0x5c3607(0xc0),_0x5c3607(0xb6))+delimiter+process.env.PATH}});_0x386eb7['on'](_0x5c3607(0xc5),_0x50bff0=>{const _0x1ca49f=_0x5c3607;if(_0x50bff0===0x0||_0x50bff0===null)_0x457ac2();else _0x30a974(new Error(_0x1ca49f(0xd0)+_0x50bff0));}),_0x386eb7['on'](_0x5c3607(0xaf),_0x30a974);});}function a245_0x4995(_0x5f8104,_0x2d31b0){_0x5f8104=_0x5f8104-0x9a;const _0x367c73=a245_0x367c();let _0x4995ce=_0x367c73[_0x5f8104];return _0x4995ce;}const runFlags=[{'name':a245_0xcfc987(0xd1),'type':a245_0xcfc987(0xa6),'description':a245_0xcfc987(0xc3),'default':![]}];export const runDefinition={'service':a245_0xcfc987(0xdb),'command':a245_0xcfc987(0xdb),'description':a245_0xcfc987(0xdc),'risk':a245_0xcfc987(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0xcfc987(0xb4),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x117cfb=a245_0xcfc987,_0x2743bd=[];return _0x2743bd[_0x117cfb(0x9a)](_0x117cfb(0xa3)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0xb1)),_0x2743bd[_0x117cfb(0x9a)](_0x117cfb(0xa7)+CLI_BIN_NAME+_0x117cfb(0xca)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0x9d)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0xba)),_0x2743bd['join']('\x0a');},async 'execute'(_0x2d7802){const _0x52ffce=a245_0xcfc987,_0x34d0bd=process[_0x52ffce(0xab)](),_0x224c5f=_0x2d7802['args'][0x0],_0x318abb=_0x2d7802[_0x52ffce(0xa0)][_0x52ffce(0xcc)](0x1),_0x250b7b=readPackageScripts(_0x34d0bd);if(!_0x250b7b)throw CliErrors['validation'](_0x52ffce(0xc1));if(!_0x224c5f){const _0x51866e=Object[_0x52ffce(0xd8)](_0x250b7b);if(_0x51866e[_0x52ffce(0xaa)]===0x0)console[_0x52ffce(0xa1)](_0x52ffce(0xd4));else{console['log'](_0x52ffce(0xc9));for(const _0x1ed839 of _0x51866e){console[_0x52ffce(0xa1)](_0x52ffce(0xa7)+_0x1ed839);}console[_0x52ffce(0xa1)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x52ffce(0xdf));}return{'ok':!![]};}if(!_0x250b7b[_0x224c5f])throw CliErrors[_0x52ffce(0xb5)](_0x52ffce(0xa4)+_0x224c5f+_0x52ffce(0xbb),_0x52ffce(0xae)+(Object['keys'](_0x250b7b)['join'](',\x20')||'(none)'));const _0x4a7da9=detectPackageManager(_0x34d0bd),_0x3bcd09=syncProjectDomainRoutingBeforeScript(_0x34d0bd,_0x224c5f);_0x3bcd09?.[_0x52ffce(0xac)]&&console[_0x52ffce(0xaf)](_0x52ffce(0xb7)+_0x3bcd09[_0x52ffce(0xad)]);VERSION_CHECK_SCRIPTS[_0x52ffce(0xd5)](_0x224c5f)&&await versionCheck(_0x34d0bd);if(_0x224c5f===_0x52ffce(0xcf)&&_0x2d7802[_0x52ffce(0x9c)](_0x52ffce(0xd1)))return await Promise[_0x52ffce(0xcd)]([spawnViteBuildWatch(_0x34d0bd),spawnVitePreview(_0x34d0bd)]),{'ok':!![]};return await spawnScript(_0x4a7da9,_0x224c5f,_0x318abb,_0x34d0bd),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a246_0x541124=a246_0x311b;(function(_0x4d6f0f,_0x552e68){const _0xb98283=a246_0x311b,_0x463770=_0x4d6f0f();while(!![]){try{const _0x27f447=-parseInt(_0xb98283(0xaa))/0x1*(-parseInt(_0xb98283(0xad))/0x2)+parseInt(_0xb98283(0xb3))/0x3*(parseInt(_0xb98283(0xb1))/0x4)+parseInt(_0xb98283(0xac))/0x5*(-parseInt(_0xb98283(0xb4))/0x6)+-parseInt(_0xb98283(0xab))/0x7+-parseInt(_0xb98283(0xa6))/0x8+-parseInt(_0xb98283(0xa8))/0x9*(parseInt(_0xb98283(0xaf))/0xa)+parseInt(_0xb98283(0xa5))/0xb;if(_0x27f447===_0x552e68)break;else _0x463770['push'](_0x463770['shift']());}catch(_0x5c8630){_0x463770['push'](_0x463770['shift']());}}}(a246_0x4daf,0xc4336));import{buildSchemaPayload}from'../framework/schema-export.js';function a246_0x4daf(){const _0x1157a8=['10122926KKRQUB','3344072cRyqgU','schema','3177SwZvTd','read','17kXiCNR','1013929JMFoxU','5JefJbf','39622ARWnbV','json','5630ROnfKy','export','844TeJOLl','Export\x20machine-readable\x20command\x20schema\x20(JSON)','6051PXONBf','704442MvrVmL'];a246_0x4daf=function(){return _0x1157a8;};return a246_0x4daf();}async function execute(_0x32fcc0){const _0x448b93=await buildSchemaPayload();return{'ok':!![],'data':_0x448b93};}function a246_0x311b(_0xf9423,_0x4f1e07){_0xf9423=_0xf9423-0xa5;const _0x4daf93=a246_0x4daf();let _0x311b1e=_0x4daf93[_0xf9423];return _0x311b1e;}export const schemaDefinition={'service':a246_0x541124(0xa7),'command':a246_0x541124(0xb0),'description':a246_0x541124(0xb2),'risk':a246_0x541124(0xa9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x541124(0xae),'flags':[],'execute':execute};
1
+ const a246_0x2d46ed=a246_0x2648;(function(_0x5b2f17,_0x4a56b4){const _0x3f2588=a246_0x2648,_0x5bf3b8=_0x5b2f17();while(!![]){try{const _0x5ae167=parseInt(_0x3f2588(0x1e8))/0x1+-parseInt(_0x3f2588(0x1e0))/0x2*(parseInt(_0x3f2588(0x1e9))/0x3)+parseInt(_0x3f2588(0x1df))/0x4*(parseInt(_0x3f2588(0x1e2))/0x5)+-parseInt(_0x3f2588(0x1dc))/0x6+-parseInt(_0x3f2588(0x1e7))/0x7+parseInt(_0x3f2588(0x1eb))/0x8*(parseInt(_0x3f2588(0x1e5))/0x9)+parseInt(_0x3f2588(0x1e6))/0xa*(parseInt(_0x3f2588(0x1e3))/0xb);if(_0x5ae167===_0x4a56b4)break;else _0x5bf3b8['push'](_0x5bf3b8['shift']());}catch(_0x210aae){_0x5bf3b8['push'](_0x5bf3b8['shift']());}}}(a246_0x556e,0xc1845));import{buildSchemaPayload}from'../framework/schema-export.js';function a246_0x2648(_0x56e51c,_0x302088){_0x56e51c=_0x56e51c-0x1dc;const _0x556ef4=a246_0x556e();let _0x2648f2=_0x556ef4[_0x56e51c];return _0x2648f2;}async function execute(_0xb1d17e){const _0x1800b9=await buildSchemaPayload();return{'ok':!![],'data':_0x1800b9};}export const schemaDefinition={'service':a246_0x2d46ed(0x1ea),'command':a246_0x2d46ed(0x1de),'description':a246_0x2d46ed(0x1e1),'risk':a246_0x2d46ed(0x1dd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x2d46ed(0x1e4),'flags':[],'execute':execute};function a246_0x556e(){const _0x55a659=['export','200seTLyg','24qbCYLA','Export\x20machine-readable\x20command\x20schema\x20(JSON)','117470HlfHaN','3327247VyPDXB','json','99lnVllt','20OZUMBz','10064439BnVlQo','695552fHXEgF','207228cLROeH','schema','1009016hbJkeH','4819614YteDuT','read'];a246_0x556e=function(){return _0x55a659;};return a246_0x556e();}