@lovrabet/rabetbase-cli 2.5.6 → 2.5.7-beta.1

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 (395) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.d.ts +2 -0
  132. package/lib/commands/flow/page-list.js +1 -0
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.d.ts +1 -1
  135. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  136. package/lib/commands/flow/runtime-role-list.js +1 -1
  137. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  138. package/lib/commands/flow/runtime-user-search.js +1 -1
  139. package/lib/commands/flow/shared.d.ts +6 -2
  140. package/lib/commands/flow/shared.js +1 -1
  141. package/lib/commands/flow/update.js +1 -1
  142. package/lib/commands/flow/validate.js +1 -1
  143. package/lib/commands/instant-api-policy/current.js +1 -1
  144. package/lib/commands/instant-api-policy/index.js +1 -1
  145. package/lib/commands/instant-api-policy/init.js +1 -1
  146. package/lib/commands/instant-api-policy/publish.js +1 -1
  147. package/lib/commands/instant-api-policy/pull.js +1 -1
  148. package/lib/commands/instant-api-policy/revision.js +1 -1
  149. package/lib/commands/instant-api-policy/revisions.js +1 -1
  150. package/lib/commands/instant-api-policy/rollback.js +1 -1
  151. package/lib/commands/instant-api-policy/shared.js +1 -1
  152. package/lib/commands/instant-api-policy/validate.js +1 -1
  153. package/lib/commands/issue/index.js +1 -1
  154. package/lib/commands/issue/nudge.js +1 -1
  155. package/lib/commands/issue/report.js +1 -1
  156. package/lib/commands/issue/shared.js +1 -1
  157. package/lib/commands/kb/create.js +1 -1
  158. package/lib/commands/kb/delete.js +1 -1
  159. package/lib/commands/kb/detail.js +1 -1
  160. package/lib/commands/kb/index.js +1 -1
  161. package/lib/commands/kb/list.js +1 -1
  162. package/lib/commands/kb/search.js +1 -1
  163. package/lib/commands/kb/shared.js +1 -1
  164. package/lib/commands/kb/update.js +1 -1
  165. package/lib/commands/logs/index.js +1 -1
  166. package/lib/commands/menu/asset-update.js +1 -1
  167. package/lib/commands/menu/delete.js +1 -1
  168. package/lib/commands/menu/external-link-create.js +1 -1
  169. package/lib/commands/menu/external-link-update.js +1 -1
  170. package/lib/commands/menu/group-create.js +1 -1
  171. package/lib/commands/menu/group-update.js +1 -1
  172. package/lib/commands/menu/index.js +1 -1
  173. package/lib/commands/menu/list.js +1 -1
  174. package/lib/commands/menu/move.js +1 -1
  175. package/lib/commands/menu/regroup-start.js +1 -1
  176. package/lib/commands/menu/rename.js +1 -1
  177. package/lib/commands/menu/shared/compare-table.js +1 -1
  178. package/lib/commands/menu/shared/delete-plan.js +1 -1
  179. package/lib/commands/menu/shared/facts.js +1 -1
  180. package/lib/commands/menu/shared/index.js +1 -1
  181. package/lib/commands/menu/shared/inquirer.js +1 -1
  182. package/lib/commands/menu/shared/local-pages.js +1 -1
  183. package/lib/commands/menu/shared/logic.js +1 -1
  184. package/lib/commands/menu/shared/mutations.js +1 -1
  185. package/lib/commands/menu/shared/path.js +1 -1
  186. package/lib/commands/menu/shared/service.js +1 -1
  187. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  188. package/lib/commands/menu/shared/sync-core.js +1 -1
  189. package/lib/commands/menu/shared/update-core.js +1 -1
  190. package/lib/commands/menu/shared/valid-url.js +1 -1
  191. package/lib/commands/menu/subapp-assets-status.js +1 -1
  192. package/lib/commands/menu/subapp-assets-update.js +1 -1
  193. package/lib/commands/menu/sync.js +1 -1
  194. package/lib/commands/menu/visibility-update.js +1 -1
  195. package/lib/commands/notification/config-create.js +1 -1
  196. package/lib/commands/notification/config-delete.js +1 -1
  197. package/lib/commands/notification/config-list.js +1 -1
  198. package/lib/commands/notification/config-update.js +1 -1
  199. package/lib/commands/notification/index.js +1 -1
  200. package/lib/commands/notification/shared.js +1 -1
  201. package/lib/commands/ocr/index.js +1 -1
  202. package/lib/commands/page/create.js +1 -1
  203. package/lib/commands/page/custom/detail.js +1 -1
  204. package/lib/commands/page/custom/list.js +1 -1
  205. package/lib/commands/page/custom/publish.js +1 -1
  206. package/lib/commands/page/custom/shared.js +1 -1
  207. package/lib/commands/page/custom/syntax.js +1 -1
  208. package/lib/commands/page/custom/update.js +1 -1
  209. package/lib/commands/page/data-list-status.js +1 -1
  210. package/lib/commands/page/generate-start.js +1 -1
  211. package/lib/commands/page/generate-status.js +1 -1
  212. package/lib/commands/page/index.js +1 -1
  213. package/lib/commands/page/pull.js +1 -1
  214. package/lib/commands/page/push.js +1 -1
  215. package/lib/commands/page/relation-audit.js +1 -1
  216. package/lib/commands/page/restore.js +1 -1
  217. package/lib/commands/page/shared.js +1 -1
  218. package/lib/commands/page/sync.js +1 -1
  219. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  220. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  221. package/lib/commands/project/create/format-elapsed.js +1 -1
  222. package/lib/commands/project/create/main.js +1 -1
  223. package/lib/commands/project/create/materialize-project-template.js +1 -1
  224. package/lib/commands/project/create/project-name.js +1 -1
  225. package/lib/commands/project/create/project-template-archive.js +1 -1
  226. package/lib/commands/project/create/project-template-path.js +1 -1
  227. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  228. package/lib/commands/project/create/use-format-code.js +1 -1
  229. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  230. package/lib/commands/project/domain-routing-sync.js +1 -1
  231. package/lib/commands/project/index.js +1 -1
  232. package/lib/commands/project/upgrade.js +1 -1
  233. package/lib/commands/registry.js +1 -1
  234. package/lib/commands/role/delete.js +1 -1
  235. package/lib/commands/role/detail.js +1 -1
  236. package/lib/commands/role/index.js +1 -1
  237. package/lib/commands/role/list.js +1 -1
  238. package/lib/commands/role/shared.js +1 -1
  239. package/lib/commands/role/update.js +1 -1
  240. package/lib/commands/role/user-add.js +1 -1
  241. package/lib/commands/role/user-remove.js +1 -1
  242. package/lib/commands/role/user-resolve.js +1 -1
  243. package/lib/commands/rule/get.js +1 -1
  244. package/lib/commands/rule/index.js +1 -1
  245. package/lib/commands/rule/list.js +1 -1
  246. package/lib/commands/rule/set.js +1 -1
  247. package/lib/commands/rule/shared.js +1 -1
  248. package/lib/commands/run/index.js +1 -1
  249. package/lib/commands/schema.js +1 -1
  250. package/lib/commands/sql/create.js +1 -1
  251. package/lib/commands/sql/delete.js +1 -1
  252. package/lib/commands/sql/detail.js +1 -1
  253. package/lib/commands/sql/exec.js +1 -1
  254. package/lib/commands/sql/index.js +1 -1
  255. package/lib/commands/sql/list.js +1 -1
  256. package/lib/commands/sql/pull.js +1 -1
  257. package/lib/commands/sql/push.js +1 -1
  258. package/lib/commands/sql/shared.js +1 -1
  259. package/lib/commands/sql/status.js +1 -1
  260. package/lib/commands/sql/validate.js +1 -1
  261. package/lib/commands/task/index.js +1 -1
  262. package/lib/commands/task/status.js +1 -1
  263. package/lib/commands/tenant/index.js +1 -1
  264. package/lib/commands/tenant/members-list.js +1 -1
  265. package/lib/commands/tenant/shared.js +1 -1
  266. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  267. package/lib/commands/user-account/feishu-bind.js +1 -1
  268. package/lib/commands/user-account/index.js +1 -1
  269. package/lib/commands/workspace/add.js +1 -1
  270. package/lib/commands/workspace/index.js +1 -1
  271. package/lib/commands/workspace/remove.js +1 -1
  272. package/lib/config/domain-config.js +1 -1
  273. package/lib/config/project-domain-routing.js +1 -1
  274. package/lib/config/region-config.js +1 -1
  275. package/lib/config/schema.js +1 -1
  276. package/lib/constant/cdn.js +1 -1
  277. package/lib/constant/cli.js +1 -1
  278. package/lib/constant/defaults.js +1 -1
  279. package/lib/constant/domain.js +1 -1
  280. package/lib/constant/env.js +1 -1
  281. package/lib/constant/output.js +1 -1
  282. package/lib/constant/paths.js +1 -1
  283. package/lib/constant/region.js +1 -1
  284. package/lib/constant/risk.js +1 -1
  285. package/lib/constant/routing-profile.js +1 -1
  286. package/lib/context/app-resolver.js +1 -1
  287. package/lib/context/auth-resolver.js +1 -1
  288. package/lib/context/config-loader.js +1 -1
  289. package/lib/context.js +1 -1
  290. package/lib/core/alias-resolver.js +1 -1
  291. package/lib/core/api-client.d.ts +26 -6
  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.d.ts +12 -0
  303. package/lib/core/flow-config.js +1 -1
  304. package/lib/core/instant-api-policy/config.js +1 -1
  305. package/lib/core/kb-search-client.js +1 -1
  306. package/lib/core/page/file-system.js +1 -1
  307. package/lib/core/page/hash.js +1 -1
  308. package/lib/core/page/lock.js +1 -1
  309. package/lib/core/page/lr-smart-jsx.js +1 -1
  310. package/lib/core/sql-index-auditor.js +1 -1
  311. package/lib/core/sql-sync/config.js +1 -1
  312. package/lib/core/sql-sync/file-system.js +1 -1
  313. package/lib/core/sql-sync/hash.js +1 -1
  314. package/lib/core/sql-sync/lock.js +1 -1
  315. package/lib/core/sql-sync/utils.js +1 -1
  316. package/lib/core/sql-validator.js +1 -1
  317. package/lib/errors.js +1 -1
  318. package/lib/framework/build-all-flags.js +1 -1
  319. package/lib/framework/error-output.js +1 -1
  320. package/lib/framework/explicit-yes.js +1 -1
  321. package/lib/framework/flags.js +1 -1
  322. package/lib/framework/help.js +1 -1
  323. package/lib/framework/index.js +1 -1
  324. package/lib/framework/output.js +1 -1
  325. package/lib/framework/response.js +1 -1
  326. package/lib/framework/runner-alias.js +1 -1
  327. package/lib/framework/runner.js +1 -1
  328. package/lib/framework/schema-export.js +1 -1
  329. package/lib/framework/supported-flags.js +1 -1
  330. package/lib/framework/types.js +1 -1
  331. package/lib/generated/build-info.d.ts +4 -4
  332. package/lib/generated/build-info.js +1 -1
  333. package/lib/generated/official-routing.js +1 -1
  334. package/lib/generated/routing-contract.js +1 -1
  335. package/lib/help.js +1 -1
  336. package/lib/postinstall.js +1 -1
  337. package/lib/runtime/confirmation.js +1 -1
  338. package/lib/runtime/event.js +1 -1
  339. package/lib/runtime/index.js +1 -1
  340. package/lib/runtime/queue.js +1 -1
  341. package/lib/runtime/resolve.js +1 -1
  342. package/lib/services/dataset-design/checkpoint.js +1 -1
  343. package/lib/services/dataset-design/commands.js +1 -1
  344. package/lib/services/dataset-design/contract.js +1 -1
  345. package/lib/skills/builtin-skill.js +1 -1
  346. package/lib/skills/main.js +1 -1
  347. package/lib/skills/npx-skills-add.js +1 -1
  348. package/lib/skills/skill-presence.js +1 -1
  349. package/lib/telemetry/cli-command-trace.js +1 -1
  350. package/lib/telemetry/cli-help-trace.js +1 -1
  351. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  352. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  353. package/lib/telemetry/send-cli-trace-log.js +1 -1
  354. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  355. package/lib/utils/ai_config.js +1 -1
  356. package/lib/utils/apply-jq-filter.js +1 -1
  357. package/lib/utils/cdn-config.js +1 -1
  358. package/lib/utils/check-sdk-version.js +1 -1
  359. package/lib/utils/cli-version-check.js +1 -1
  360. package/lib/utils/cli-version-policy.js +1 -1
  361. package/lib/utils/config.js +1 -1
  362. package/lib/utils/entity-with-id.js +1 -1
  363. package/lib/utils/file-utils.js +1 -1
  364. package/lib/utils/guides-cdn.js +1 -1
  365. package/lib/utils/http-client.js +1 -1
  366. package/lib/utils/is-non-interactive.js +1 -1
  367. package/lib/utils/logger.js +1 -1
  368. package/lib/utils/params.js +1 -1
  369. package/lib/utils/platform.js +1 -1
  370. package/lib/utils/sleep.js +1 -1
  371. package/lib/utils/template-replacer.js +1 -1
  372. package/lib/utils/update-notice.js +1 -1
  373. package/lib/utils/version.js +1 -1
  374. package/lib/utils/with-active-cookie.js +1 -1
  375. package/lib/utils/write-cli-side-channel.js +1 -1
  376. package/package.json +1 -1
  377. package/skills/rabetbase/SKILL.md +8 -4
  378. package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
  379. package/skills/rabetbase/guides/backend-function.md +26 -4
  380. package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
  381. package/skills/rabetbase/guides/cross-database-bff.md +1 -0
  382. package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
  383. package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
  384. package/skills/rabetbase/guides/flow-config-examples.md +75 -0
  385. package/skills/rabetbase/guides/form-flow-start.md +61 -0
  386. package/skills/rabetbase/guides/typescript-sdk.md +1 -1
  387. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
  388. package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
  389. package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
  390. package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
  391. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
  392. package/skills/rabetbase/references/rabetbase-kb.md +4 -1
  393. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  394. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  395. package/skills/rabetbase.manifest.json +5 -3
@@ -1 +1 @@
1
- const a230_0x20d4e5=a230_0x4509;(function(_0x1f2db1,_0x1fdbfd){const _0x77037b=a230_0x4509,_0x319f8e=_0x1f2db1();while(!![]){try{const _0x4b9bb7=parseInt(_0x77037b(0x15c))/0x1*(-parseInt(_0x77037b(0x14f))/0x2)+-parseInt(_0x77037b(0x149))/0x3*(-parseInt(_0x77037b(0x154))/0x4)+-parseInt(_0x77037b(0x157))/0x5+parseInt(_0x77037b(0x15a))/0x6+parseInt(_0x77037b(0x14d))/0x7+-parseInt(_0x77037b(0x160))/0x8+-parseInt(_0x77037b(0x14b))/0x9*(-parseInt(_0x77037b(0x151))/0xa);if(_0x4b9bb7===_0x1fdbfd)break;else _0x319f8e['push'](_0x319f8e['shift']());}catch(_0x4ccae0){_0x319f8e['push'](_0x319f8e['shift']());}}}(a230_0x2b2f,0x1bfac));import{deleteAppRole}from'../../core/api-client.js';function a230_0x4509(_0x409d01,_0x232a08){_0x409d01=_0x409d01-0x149;const _0x2b2f9c=a230_0x2b2f();let _0x45093c=_0x2b2f9c[_0x409d01];return _0x45093c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a230_0x2b2f(){const _0x18c3db=['Role\x20still\x20has\x20','306270NdeYso','\x20(id=','appCode','84876xdhJou','Deleted\x20role\x20','24445lQKTYA','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','delete','POST','1257688paZNVC','3WZSOEu','num','36684uRKRWg','roleName','1277325IVdkxe','role','6RDEIqM','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','470QEeYzd','dev','userCount','72844MvRStr','high-risk-write'];a230_0x2b2f=function(){return _0x18c3db;};return a230_0x2b2f();}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a230_0x20d4e5(0x14e),'command':a230_0x20d4e5(0x15e),'description':a230_0x20d4e5(0x15d),'risk':a230_0x20d4e5(0x155),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4850ad){const _0x37f8e4=a230_0x20d4e5,_0x782f52=_0x4850ad[_0x37f8e4(0x14a)]('id'),_0x3c6028=await getRoleById(_0x4850ad[_0x37f8e4(0x159)],_0x782f52);return assertCustomRole(_0x3c6028,_0x37f8e4(0x15e)),asDryRunResult({'scope':_0x37f8e4(0x152),'operation':_0x37f8e4(0x15e),'selector':{'appCode':_0x4850ad[_0x37f8e4(0x159)],'roleId':_0x782f52,'roleName':_0x3c6028[_0x37f8e4(0x14c)]},'before':projectRole(_0x3c6028),'after':null,'dryRun':!![],'backend':{'method':_0x37f8e4(0x15f),'path':DELETE_PATH},'warnings':_0x3c6028[_0x37f8e4(0x153)]>0x0?[_0x37f8e4(0x156)+_0x3c6028[_0x37f8e4(0x153)]+_0x37f8e4(0x150)]:[]},{'method':_0x37f8e4(0x15f),'url':DELETE_PATH});},async 'execute'(_0x14d71e){const _0x231028=a230_0x20d4e5,_0x5562b0=_0x14d71e[_0x231028(0x14a)]('id'),_0xd65dd6=await getRoleById(_0x14d71e[_0x231028(0x159)],_0x5562b0);return assertCustomRole(_0xd65dd6,_0x231028(0x15e)),await deleteAppRole(_0x5562b0),{'ok':!![],'data':{'scope':_0x231028(0x152),'operation':_0x231028(0x15e),'selector':{'appCode':_0x14d71e[_0x231028(0x159)],'roleId':_0x5562b0,'roleName':_0xd65dd6[_0x231028(0x14c)]},'before':projectRole(_0xd65dd6),'after':null,'dryRun':![],'backend':{'method':_0x231028(0x15f),'path':DELETE_PATH},'warnings':[]},'message':_0x231028(0x15b)+_0xd65dd6[_0x231028(0x14c)]+_0x231028(0x158)+_0x5562b0+')'};}};
1
+ function a231_0x1de4(_0x3e1381,_0x2f6e52){_0x3e1381=_0x3e1381-0x160;const _0x4f5861=a231_0x4f58();let _0x1de4cc=_0x4f5861[_0x3e1381];return _0x1de4cc;}const a231_0x11dc2d=a231_0x1de4;(function(_0x13fa11,_0x2a5559){const _0x4a1019=a231_0x1de4,_0x5b9c89=_0x13fa11();while(!![]){try{const _0x3e4220=-parseInt(_0x4a1019(0x167))/0x1+parseInt(_0x4a1019(0x16a))/0x2*(-parseInt(_0x4a1019(0x164))/0x3)+-parseInt(_0x4a1019(0x16e))/0x4*(-parseInt(_0x4a1019(0x177))/0x5)+parseInt(_0x4a1019(0x175))/0x6*(parseInt(_0x4a1019(0x171))/0x7)+-parseInt(_0x4a1019(0x16f))/0x8+parseInt(_0x4a1019(0x178))/0x9*(parseInt(_0x4a1019(0x174))/0xa)+parseInt(_0x4a1019(0x162))/0xb;if(_0x3e4220===_0x2a5559)break;else _0x5b9c89['push'](_0x5b9c89['shift']());}catch(_0x1020af){_0x5b9c89['push'](_0x5b9c89['shift']());}}}(a231_0x4f58,0x65741));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a231_0x4f58(){const _0x13f296=['role','393GeVrWH','num','high-risk-write','136551YDdVER','delete','Role\x20still\x20has\x20','2258RFwsNd','appCode','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','/smartapi/permit/role/delete','195476GFiWjD','4528544spBOeR','POST','35ClItHH','\x20(id=','Deleted\x20role\x20','169430oZGIQY','182274MElSKH','dev','5DWtGZs','171qfRqEe','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','userCount','roleName','8177290KolAdX'];a231_0x4f58=function(){return _0x13f296;};return a231_0x4f58();}const DELETE_PATH=a231_0x11dc2d(0x16d);export const roleDelete={'service':a231_0x11dc2d(0x163),'command':'delete','description':a231_0x11dc2d(0x179),'risk':a231_0x11dc2d(0x166),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xfd5e5e){const _0x3bc2f2=a231_0x11dc2d,_0x19b88c=_0xfd5e5e[_0x3bc2f2(0x165)]('id'),_0x412a5e=await getRoleById(_0xfd5e5e['appCode'],_0x19b88c);return assertCustomRole(_0x412a5e,_0x3bc2f2(0x168)),asDryRunResult({'scope':'dev','operation':_0x3bc2f2(0x168),'selector':{'appCode':_0xfd5e5e[_0x3bc2f2(0x16b)],'roleId':_0x19b88c,'roleName':_0x412a5e[_0x3bc2f2(0x161)]},'before':projectRole(_0x412a5e),'after':null,'dryRun':!![],'backend':{'method':_0x3bc2f2(0x170),'path':DELETE_PATH},'warnings':_0x412a5e[_0x3bc2f2(0x160)]>0x0?[_0x3bc2f2(0x169)+_0x412a5e[_0x3bc2f2(0x160)]+_0x3bc2f2(0x16c)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x38e900){const _0x3f6e7e=a231_0x11dc2d,_0x46bff3=_0x38e900[_0x3f6e7e(0x165)]('id'),_0x54a2ff=await getRoleById(_0x38e900[_0x3f6e7e(0x16b)],_0x46bff3);return assertCustomRole(_0x54a2ff,_0x3f6e7e(0x168)),await deleteAppRole(_0x46bff3),{'ok':!![],'data':{'scope':_0x3f6e7e(0x176),'operation':_0x3f6e7e(0x168),'selector':{'appCode':_0x38e900[_0x3f6e7e(0x16b)],'roleId':_0x46bff3,'roleName':_0x54a2ff[_0x3f6e7e(0x161)]},'before':projectRole(_0x54a2ff),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x3f6e7e(0x173)+_0x54a2ff[_0x3f6e7e(0x161)]+_0x3f6e7e(0x172)+_0x46bff3+')'};}};
@@ -1 +1 @@
1
- function a231_0x5e3e(_0x3ada04,_0x411167){_0x3ada04=_0x3ada04-0x1ce;const _0x3c4424=a231_0x3c44();let _0x5e3e07=_0x3c4424[_0x3ada04];return _0x5e3e07;}const a231_0x4f07bb=a231_0x5e3e;(function(_0x263733,_0x1598b9){const _0x20c786=a231_0x5e3e,_0x362586=_0x263733();while(!![]){try{const _0x29006e=parseInt(_0x20c786(0x1d1))/0x1*(parseInt(_0x20c786(0x1dd))/0x2)+-parseInt(_0x20c786(0x1de))/0x3*(parseInt(_0x20c786(0x1d4))/0x4)+parseInt(_0x20c786(0x1d2))/0x5+-parseInt(_0x20c786(0x1d3))/0x6+parseInt(_0x20c786(0x1d0))/0x7*(-parseInt(_0x20c786(0x1ce))/0x8)+parseInt(_0x20c786(0x1d9))/0x9+-parseInt(_0x20c786(0x1d5))/0xa*(parseInt(_0x20c786(0x1d7))/0xb);if(_0x29006e===_0x1598b9)break;else _0x362586['push'](_0x362586['shift']());}catch(_0x3a4fb0){_0x362586['push'](_0x362586['shift']());}}}(a231_0x3c44,0xaed7e));function a231_0x3c44(){const _0x5039a7=['16984SiSObp','num','1484lRujXz','1327IXgFxl','4762615lFHAbs','2500104jgGXpR','20bvrFZf','10pWzzUh','appCode','4659479xhetPK','roleType','6409890HeGQcN','dev','Role\x20','role','1904CuUctP','552918zekAMv'];a231_0x3c44=function(){return _0x5039a7;};return a231_0x3c44();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a231_0x4f07bb(0x1dc),'command':'detail','description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x570bb9){const _0x310e67=a231_0x4f07bb,_0x42b164=_0x570bb9[_0x310e67(0x1cf)]('id'),_0x1c4a2f=await getRoleById(_0x570bb9[_0x310e67(0x1d6)],_0x42b164);return{'ok':!![],'data':{'scope':_0x310e67(0x1da),'role':projectRole(_0x1c4a2f)},'message':_0x310e67(0x1db)+_0x1c4a2f['roleName']+'\x20('+_0x1c4a2f[_0x310e67(0x1d8)]+')'};}};
1
+ const a232_0x4a9a40=a232_0x4363;function a232_0x25f4(){const _0x354b7c=['Show\x20a\x20single\x20role\x27s\x20detail','roleType','4880880BhScHL','role','7501912PDrHUF','12hioJYt','roleName','123590gXXvsL','24IcJGYb','800454rgCNrB','2970759AHYkIf','2601886MpEYVo','num','Role\x20','1354060aKFfgo'];a232_0x25f4=function(){return _0x354b7c;};return a232_0x25f4();}(function(_0x859500,_0x1c19dd){const _0x2b3d46=a232_0x4363,_0x5e3529=_0x859500();while(!![]){try{const _0x2c74c8=parseInt(_0x2b3d46(0xe6))/0x1+-parseInt(_0x2b3d46(0xeb))/0x2+parseInt(_0x2b3d46(0xe7))/0x3+-parseInt(_0x2b3d46(0xe5))/0x4*(-parseInt(_0x2b3d46(0xe4))/0x5)+parseInt(_0x2b3d46(0xf1))/0x6*(parseInt(_0x2b3d46(0xe8))/0x7)+-parseInt(_0x2b3d46(0xf0))/0x8+-parseInt(_0x2b3d46(0xee))/0x9;if(_0x2c74c8===_0x1c19dd)break;else _0x5e3529['push'](_0x5e3529['shift']());}catch(_0x3f87a5){_0x5e3529['push'](_0x5e3529['shift']());}}}(a232_0x25f4,0x8040a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a232_0x4363(_0x4ae885,_0x35b69d){_0x4ae885=_0x4ae885-0xe4;const _0x25f44c=a232_0x25f4();let _0x436336=_0x25f44c[_0x4ae885];return _0x436336;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x4a9a40(0xef),'command':'detail','description':a232_0x4a9a40(0xec),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x31c2ae){const _0x20233a=a232_0x4a9a40,_0x503c5e=_0x31c2ae[_0x20233a(0xe9)]('id'),_0x7da80b=await getRoleById(_0x31c2ae['appCode'],_0x503c5e);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x7da80b)},'message':_0x20233a(0xea)+_0x7da80b[_0x20233a(0xf2)]+'\x20('+_0x7da80b[_0x20233a(0xed)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x534acd,_0x2b65c1){const _0x2c20f9=a232_0x1dbc,_0x2b111b=_0x534acd();while(!![]){try{const _0x21dc5a=parseInt(_0x2c20f9(0x173))/0x1+parseInt(_0x2c20f9(0x175))/0x2*(parseInt(_0x2c20f9(0x172))/0x3)+parseInt(_0x2c20f9(0x174))/0x4*(-parseInt(_0x2c20f9(0x16e))/0x5)+-parseInt(_0x2c20f9(0x16f))/0x6+-parseInt(_0x2c20f9(0x177))/0x7+-parseInt(_0x2c20f9(0x171))/0x8*(-parseInt(_0x2c20f9(0x176))/0x9)+parseInt(_0x2c20f9(0x170))/0xa;if(_0x21dc5a===_0x2b65c1)break;else _0x2b111b['push'](_0x2b111b['shift']());}catch(_0x15d928){_0x2b111b['push'](_0x2b111b['shift']());}}}(a232_0x4467,0x74906));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a232_0x1dbc(_0xe34c16,_0xfdfe9d){_0xe34c16=_0xe34c16-0x16e;const _0x4467a6=a232_0x4467();let _0x1dbc71=_0x4467a6[_0xe34c16];return _0x1dbc71;}import{roleUserResolve}from'../../commands/role/user-resolve.js';function a232_0x4467(){const _0x59d70f=['752848LFdueU','654pwhfSs','255254DVyGSA','21116OrhGMo','2586FGTTXO','90vPults','6509454cFEBoX','15eTYllj','2162928lVVIAj','3055050nZHaBS'];a232_0x4467=function(){return _0x59d70f;};return a232_0x4467();}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(_0x3dfbe4,_0x31379f){const _0x277f85=a233_0x2d5d,_0x2bdf76=_0x3dfbe4();while(!![]){try{const _0x3810d4=parseInt(_0x277f85(0x1c3))/0x1+parseInt(_0x277f85(0x1c0))/0x2+parseInt(_0x277f85(0x1bc))/0x3*(-parseInt(_0x277f85(0x1c2))/0x4)+-parseInt(_0x277f85(0x1bd))/0x5*(parseInt(_0x277f85(0x1c5))/0x6)+-parseInt(_0x277f85(0x1c4))/0x7*(-parseInt(_0x277f85(0x1bf))/0x8)+parseInt(_0x277f85(0x1be))/0x9+parseInt(_0x277f85(0x1c1))/0xa;if(_0x3810d4===_0x31379f)break;else _0x2bdf76['push'](_0x2bdf76['shift']());}catch(_0x2360f2){_0x2bdf76['push'](_0x2bdf76['shift']());}}}(a233_0x12e5,0x4c003));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a233_0x2d5d(_0x6503a0,_0xd9558a){_0x6503a0=_0x6503a0-0x1bc;const _0x12e520=a233_0x12e5();let _0x2d5d76=_0x12e520[_0x6503a0];return _0x2d5d76;}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a233_0x12e5(){const _0x50b618=['19911dKQktQ','652195VLmgys','3501972LtsZKD','9376JwOKBs','321896yxTlTE','674720hHTLxw','364UFciRU','285193NwvstG','854naxbbH','6krLvFQ'];a233_0x12e5=function(){return _0x50b618;};return a233_0x12e5();}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a233_0x3f7142=a233_0x4d81;function a233_0x4d81(_0x2507bb,_0x1ac6fb){_0x2507bb=_0x2507bb-0x7a;const _0xe02f39=a233_0xe02f();let _0x4d8182=_0xe02f39[_0x2507bb];return _0x4d8182;}(function(_0x111bef,_0x4839fd){const _0x4660e3=a233_0x4d81,_0x54f46d=_0x111bef();while(!![]){try{const _0x340303=-parseInt(_0x4660e3(0x90))/0x1+parseInt(_0x4660e3(0x95))/0x2*(parseInt(_0x4660e3(0x89))/0x3)+-parseInt(_0x4660e3(0x83))/0x4*(-parseInt(_0x4660e3(0x9a))/0x5)+parseInt(_0x4660e3(0x8b))/0x6*(-parseInt(_0x4660e3(0x96))/0x7)+parseInt(_0x4660e3(0x91))/0x8+-parseInt(_0x4660e3(0x99))/0x9*(-parseInt(_0x4660e3(0x8e))/0xa)+parseInt(_0x4660e3(0x84))/0xb*(parseInt(_0x4660e3(0x88))/0xc);if(_0x340303===_0x4839fd)break;else _0x54f46d['push'](_0x54f46d['shift']());}catch(_0x2012c0){_0x54f46d['push'](_0x54f46d['shift']());}}}(a233_0xe02f,0xd201b));function a233_0xe02f(){const _0x16407f=['num','6929487Kbhrrt','25dfPmTG','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','str','page','Page\x20size\x20(1-100)','type','length','CUSTOM','Found\x20','trim','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','pagesize','appCode','number','join','578876SHYnQv','670043udxExz','Filter\x20by\x20role\x20type','Invalid\x20--type\x20\x22','filter','36Ojgwng','3749496ntNqhP','DEV','109038trNKxl','validation','\x20role(s)','10NIuUnZ','roleType','1260949FsVNRY','5627088zJpyIT','Use\x20one\x20of:\x20','toUpperCase','role','2ytDGJF','581RNwPVS','Page\x20index\x20(1-based)'];a233_0xe02f=function(){return _0x16407f;};return a233_0xe02f();}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=['ADMIN',a233_0x3f7142(0x8a),'OWNER',a233_0x3f7142(0x7b)];export const roleList={'service':a233_0x3f7142(0x94),'command':'list','description':a233_0x3f7142(0x7e),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a233_0x3f7142(0xa0),'type':'string','required':![],'description':a233_0x3f7142(0x85),'enum':ROLE_TYPES},{'name':a233_0x3f7142(0x9e),'type':a233_0x3f7142(0x81),'description':a233_0x3f7142(0x97),'default':0x1},{'name':a233_0x3f7142(0x7f),'type':a233_0x3f7142(0x81),'description':a233_0x3f7142(0x9f),'default':0x64}],async 'validate'(_0x4554b2){const _0x2211a6=a233_0x3f7142,_0x52a487=_0x4554b2[_0x2211a6(0x9d)](_0x2211a6(0xa0))[_0x2211a6(0x7d)]();if(_0x52a487&&!ROLE_TYPES['includes'](_0x52a487[_0x2211a6(0x93)]()))throw CliErrors['validation'](_0x2211a6(0x86)+_0x52a487+'\x22.',_0x2211a6(0x92)+ROLE_TYPES[_0x2211a6(0x82)](',\x20')+'.');const _0x1e2828=_0x4554b2[_0x2211a6(0x98)](_0x2211a6(0x9e),0x1),_0x580fa1=_0x4554b2[_0x2211a6(0x98)](_0x2211a6(0x7f),0x64);if(_0x1e2828<0x1)throw CliErrors[_0x2211a6(0x8c)](_0x2211a6(0x9c));if(_0x580fa1<0x1||_0x580fa1>0x64)throw CliErrors[_0x2211a6(0x8c)](_0x2211a6(0x9b));},async 'execute'(_0x51f2de){const _0x250f05=a233_0x3f7142,_0x129afa=_0x51f2de[_0x250f05(0x98)](_0x250f05(0x9e),0x1)||0x1,_0x1d0beb=_0x51f2de['num'](_0x250f05(0x7f),0x64)||0x64,_0x1bb01a=_0x51f2de[_0x250f05(0x9d)](_0x250f05(0xa0))[_0x250f05(0x7d)]()[_0x250f05(0x93)](),{items:_0x3c67f6,paging:_0x32cd84}=await listAppRoles(_0x51f2de[_0x250f05(0x80)],{'currentPage':_0x129afa,'pageSize':_0x1d0beb}),_0x436f43=_0x1bb01a?_0x3c67f6[_0x250f05(0x87)](_0x183ca1=>_0x183ca1[_0x250f05(0x8f)]===_0x1bb01a):_0x3c67f6,_0x4ed13e=_0x436f43['map'](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x4ed13e,'paging':_0x32cd84},'message':_0x250f05(0x7c)+_0x4ed13e[_0x250f05(0x7a)]+_0x250f05(0x8d)};}};
1
+ function a234_0x1b59(_0x2e0537,_0x33b5ce){_0x2e0537=_0x2e0537-0xc8;const _0x35d679=a234_0x35d6();let _0x1b59ea=_0x35d679[_0x2e0537];return _0x1b59ea;}const a234_0x3d3b7a=a234_0x1b59;(function(_0x264ce9,_0x3dcd61){const _0x43a82c=a234_0x1b59,_0x1fd1e7=_0x264ce9();while(!![]){try{const _0x1d2988=-parseInt(_0x43a82c(0xd2))/0x1+-parseInt(_0x43a82c(0xe7))/0x2+parseInt(_0x43a82c(0xdb))/0x3+parseInt(_0x43a82c(0xe4))/0x4+-parseInt(_0x43a82c(0xe8))/0x5+-parseInt(_0x43a82c(0xce))/0x6*(-parseInt(_0x43a82c(0xd8))/0x7)+-parseInt(_0x43a82c(0xcb))/0x8*(parseInt(_0x43a82c(0xef))/0x9);if(_0x1d2988===_0x3dcd61)break;else _0x1fd1e7['push'](_0x1fd1e7['shift']());}catch(_0x438a3b){_0x1fd1e7['push'](_0x1fd1e7['shift']());}}}(a234_0x35d6,0x33766));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_0x3d3b7a(0xc9),a234_0x3d3b7a(0xdc),a234_0x3d3b7a(0xd9),a234_0x3d3b7a(0xd3)];function a234_0x35d6(){const _0x5cdeb7=['\x20role(s)','includes','trim','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','toUpperCase','9lUHKlR','pagesize','ADMIN','Use\x20one\x20of:\x20','1894232nVEaDX','roleType','page','2498604tgmkml','number','string','map','112613JjNEHs','CUSTOM','type','validation','role','appCode','7ImbOPq','OWNER','dev','759795lWUqQY','DEV','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','Filter\x20by\x20role\x20type','Invalid\x20--type\x20\x22','join','num','str','Page\x20size\x20(1-100)','743660oKDyBu','length','list','220386lejSoq','926195GSxWTH','Page\x20index\x20(1-based)'];a234_0x35d6=function(){return _0x5cdeb7;};return a234_0x35d6();}export const roleList={'service':a234_0x3d3b7a(0xd6),'command':a234_0x3d3b7a(0xe6),'description':a234_0x3d3b7a(0xdd),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x3d3b7a(0xd4),'type':a234_0x3d3b7a(0xd0),'required':![],'description':a234_0x3d3b7a(0xde),'enum':ROLE_TYPES},{'name':a234_0x3d3b7a(0xcd),'type':a234_0x3d3b7a(0xcf),'description':a234_0x3d3b7a(0xe9),'default':0x1},{'name':a234_0x3d3b7a(0xc8),'type':a234_0x3d3b7a(0xcf),'description':a234_0x3d3b7a(0xe3),'default':0x64}],async 'validate'(_0x5c7efa){const _0x4dbda5=a234_0x3d3b7a,_0x5b793f=_0x5c7efa[_0x4dbda5(0xe2)]('type')[_0x4dbda5(0xec)]();if(_0x5b793f&&!ROLE_TYPES[_0x4dbda5(0xeb)](_0x5b793f[_0x4dbda5(0xee)]()))throw CliErrors['validation'](_0x4dbda5(0xdf)+_0x5b793f+'\x22.',_0x4dbda5(0xca)+ROLE_TYPES[_0x4dbda5(0xe0)](',\x20')+'.');const _0x4d366b=_0x5c7efa[_0x4dbda5(0xe1)](_0x4dbda5(0xcd),0x1),_0xbd5720=_0x5c7efa[_0x4dbda5(0xe1)](_0x4dbda5(0xc8),0x64);if(_0x4d366b<0x1)throw CliErrors['validation'](_0x4dbda5(0xed));if(_0xbd5720<0x1||_0xbd5720>0x64)throw CliErrors[_0x4dbda5(0xd5)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x2e53ff){const _0x4231bd=a234_0x3d3b7a,_0x520aad=_0x2e53ff[_0x4231bd(0xe1)](_0x4231bd(0xcd),0x1)||0x1,_0x4dcdc8=_0x2e53ff[_0x4231bd(0xe1)]('pagesize',0x64)||0x64,_0x251756=_0x2e53ff['str'](_0x4231bd(0xd4))[_0x4231bd(0xec)]()['toUpperCase'](),{items:_0x212ca1,paging:_0x36681a}=await listAppRoles(_0x2e53ff[_0x4231bd(0xd7)],{'currentPage':_0x520aad,'pageSize':_0x4dcdc8}),_0x2e6413=_0x251756?_0x212ca1['filter'](_0x1e6029=>_0x1e6029[_0x4231bd(0xcc)]===_0x251756):_0x212ca1,_0x5f033f=_0x2e6413[_0x4231bd(0xd1)](projectRole);return{'ok':!![],'data':{'scope':_0x4231bd(0xda),'roles':_0x5f033f,'paging':_0x36681a},'message':'Found\x20'+_0x5f033f[_0x4231bd(0xe5)]+_0x4231bd(0xea)};}};
@@ -1 +1 @@
1
- const a234_0x19aec3=a234_0x40e1;(function(_0x49dc2d,_0x47c580){const _0x275b43=a234_0x40e1,_0x537b98=_0x49dc2d();while(!![]){try{const _0x1c30b2=parseInt(_0x275b43(0x21e))/0x1+-parseInt(_0x275b43(0x216))/0x2+-parseInt(_0x275b43(0x1ee))/0x3+-parseInt(_0x275b43(0x1f8))/0x4+-parseInt(_0x275b43(0x20f))/0x5*(-parseInt(_0x275b43(0x1e1))/0x6)+-parseInt(_0x275b43(0x1e0))/0x7+parseInt(_0x275b43(0x213))/0x8;if(_0x1c30b2===_0x47c580)break;else _0x537b98['push'](_0x537b98['shift']());}catch(_0x287118){_0x537b98['push'](_0x537b98['shift']());}}}(a234_0x15d8,0x212bd));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':a234_0x19aec3(0x212),'required':!![],'description':a234_0x19aec3(0x1fe)};export const ROLE_REF_FLAG={'name':a234_0x19aec3(0x215),'type':a234_0x19aec3(0x203),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':a234_0x19aec3(0x224),'type':a234_0x19aec3(0x203),'required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':a234_0x19aec3(0x22a),'type':a234_0x19aec3(0x203),'required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':a234_0x19aec3(0x22a),'type':a234_0x19aec3(0x203),'required':!![],'description':a234_0x19aec3(0x20d)};export const REMARK_FLAG={'name':'remark','type':a234_0x19aec3(0x203),'required':![],'description':a234_0x19aec3(0x219)};function a234_0x40e1(_0x350914,_0x2adbb2){_0x350914=_0x350914-0x1db;const _0x15d85c=a234_0x15d8();let _0x40e115=_0x15d85c[_0x350914];return _0x40e115;}export const EXPECT_USER_COUNT_FLAG={'name':a234_0x19aec3(0x205),'type':'number','required':![],'description':a234_0x19aec3(0x221)};export const BUILTIN_ROLE_TYPES=[a234_0x19aec3(0x226),a234_0x19aec3(0x20e),a234_0x19aec3(0x21a)];export function isBuiltinRole(_0x21675a){const _0x34153d=a234_0x19aec3;return BUILTIN_ROLE_TYPES[_0x34153d(0x220)](_0x21675a);}export function assertCustomRole(_0x3a1739,_0x5c1595){const _0x52cf02=a234_0x19aec3;if(_0x3a1739[_0x52cf02(0x200)]!==_0x52cf02(0x1e4))throw CliErrors[_0x52cf02(0x1f4)](_0x52cf02(0x1fd)+_0x5c1595+_0x52cf02(0x202)+_0x3a1739[_0x52cf02(0x227)]+'\x20('+_0x3a1739['roleType']+').',_0x52cf02(0x222));}export function projectRole(_0x333f76){const _0x2e33f3=a234_0x19aec3;return{'id':_0x333f76['id'],'roleName':_0x333f76[_0x2e33f3(0x227)],'roleType':_0x333f76[_0x2e33f3(0x200)],'remark':_0x333f76[_0x2e33f3(0x1ff)],'userCount':_0x333f76[_0x2e33f3(0x1e3)],'permitCount':_0x333f76[_0x2e33f3(0x1f2)],'builtin':isBuiltinRole(_0x333f76[_0x2e33f3(0x200)])};}export async function resolveRoleRef(_0x2aa7bd,_0x3277a7){const _0x4928fb=a234_0x19aec3,_0x39c57f=_0x3277a7[_0x4928fb(0x1f3)]();if(!_0x39c57f)throw CliErrors[_0x4928fb(0x1f4)](_0x4928fb(0x1dc),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x39c57f))return getRoleById(_0x2aa7bd,Number(_0x39c57f));const _0x73e994=await listAllAppRoles(_0x2aa7bd),_0x38275a=_0x73e994[_0x4928fb(0x1f6)](_0x47326d=>_0x47326d['roleName']===_0x39c57f);if(_0x38275a['length']===0x0)throw CliErrors[_0x4928fb(0x1f4)]('Role\x20name\x20\x22'+_0x39c57f+_0x4928fb(0x225)+_0x2aa7bd+'.',_0x4928fb(0x1db));if(_0x38275a[_0x4928fb(0x20b)]>0x1){const _0x32e10e=_0x38275a[_0x4928fb(0x1e9)](_0x3dbe81=>_0x3dbe81['id'])[_0x4928fb(0x1f0)](',\x20');throw CliErrors[_0x4928fb(0x1f4)]('Role\x20name\x20\x22'+_0x39c57f+_0x4928fb(0x217)+_0x32e10e+').',_0x4928fb(0x209));}return _0x38275a[0x0];}export async function getRoleById(_0x5f5291,_0x1df92b){const _0x3ef223=a234_0x19aec3,_0x9ba36a=await listAllAppRoles(_0x5f5291),_0x4cb56f=_0x9ba36a['filter'](_0x24800b=>_0x24800b['id']===_0x1df92b&&(!_0x24800b[_0x3ef223(0x1f5)]||_0x24800b[_0x3ef223(0x1f5)]===_0x5f5291));if(_0x4cb56f[_0x3ef223(0x20b)]!==0x1)throw CliErrors[_0x3ef223(0x1f4)](_0x3ef223(0x1f1)+_0x1df92b+_0x3ef223(0x1f9)+_0x5f5291+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x4cb56f[0x0];}async function listAllAppRoles(_0x32cb4b){const _0x467324=a234_0x19aec3,_0x22fd7d=0x64,_0x3982f1=[];for(let _0x357fc6=0x1;;_0x357fc6+=0x1){const {items:_0x28640d,paging:_0x590fba}=await listAppRoles(_0x32cb4b,{'currentPage':_0x357fc6,'pageSize':_0x22fd7d});_0x3982f1[_0x467324(0x214)](..._0x28640d);if(_0x28640d[_0x467324(0x20b)]<_0x22fd7d||_0x590fba&&_0x3982f1['length']>=_0x590fba['totalCount'])return _0x3982f1;}}function a234_0x15d8(){const _0x24d46f=['string','Pass\x20--user\x20<id>.','expect-user-count','flag','user-add','nickname','Disambiguate\x20with\x20--role\x20<id>.','expectUserCount','length','Pass\x20--user\x20<id|name>.','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','DEV','735adwrDr','Missing\x20user\x20reference.','totalCount','number','4490536tahQGc','push','role','315152ExbSJa','\x22\x20is\x20ambiguous\x20(ids:\x20','\x20members\x20of\x20the\x20OWNER\x20role.','Optional\x20role\x20remark/description','OWNER','test','str','tenant','212797oqVtwT','Multiple\x20tenant\x20members\x20match\x20\x22','includes','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','dryRun','user','\x22\x20not\x20found\x20in\x20app\x20','ADMIN','roleName','/smartapi/permit/user-role/create','Check\x20the\x20nickname/username.\x20','name','User\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','Missing\x20role\x20reference.','toLowerCase','POST','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','1522808PgxwWG','3978ewBTPU','\x20member(s)\x20but\x20role\x20has\x20','userCount','CUSTOM','\x20is\x20not\x20a\x20member\x20of\x20role\x20','\x20is\x20already\x20a\x20member\x20of\x20role\x20','No\x20tenant\x20member\x20matches\x20\x22','userId','map','username','Anti-drift\x20check\x20failed:\x20expected\x20','Removed\x20',';\x20no\x20change.','678039IwXfrm','\x20duplicate\x20memberships\x20for\x20user\x20','join','Role\x20id\x20','permitCount','trim','validation','appCode','filter','Pass\x20--role\x20<id|name>.','538292SQHgwv','\x20not\x20found\x20in\x20app\x20','/smartapi/permit/user-role/delete','find','\x22:\x20','Cannot\x20','Role\x20id\x20(from\x20`role\x20list`)','remark','roleType','dev','\x20built-in\x20role\x20'];a234_0x15d8=function(){return _0x24d46f;};return a234_0x15d8();}export async function resolveTenantCode(){const _0x41466e=a234_0x19aec3,_0xc33fb9=await getSessionUserInfo(),_0x114ba9=_0xc33fb9?.[_0x41466e(0x224)]?.[_0x41466e(0x21d)]?.['tenant_code'];if(!_0x114ba9)throw CliErrors['authRequired']('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x114ba9;}function matchMember(_0x4c3b14,_0xa3b914){const _0x15dea5=a234_0x19aec3,_0x467c3c=_0xa3b914[_0x15dea5(0x1f3)]()[_0x15dea5(0x1dd)]();return(_0x4c3b14[_0x15dea5(0x208)]??'')[_0x15dea5(0x1dd)]()===_0x467c3c||(_0x4c3b14[_0x15dea5(0x1ea)]??'')[_0x15dea5(0x1dd)]()===_0x467c3c;}export async function resolveUserRef(_0x2a6928,_0x40e7ee=a234_0x19aec3(0x204)){const _0x530e32=a234_0x19aec3,_0x3de12a=_0x2a6928['trim']();if(!_0x3de12a)throw CliErrors[_0x530e32(0x1f4)](_0x530e32(0x210),_0x530e32(0x20c));const _0x1218da=await resolveTenantCode(),_0x569c9e=await getTenantMembers(_0x1218da);if(/^\d+$/[_0x530e32(0x21b)](_0x3de12a)){const _0x363617=Number(_0x3de12a),_0x3ccd70=_0x569c9e[_0x530e32(0x1fb)](_0x4b80f4=>_0x4b80f4[_0x530e32(0x1e8)]===_0x363617);return{'userId':_0x363617,'username':_0x3ccd70?.[_0x530e32(0x1ea)]??String(_0x363617),'nickname':_0x3ccd70?.[_0x530e32(0x208)],'matchedBy':'id'};}const _0xb923a=_0x569c9e['filter'](_0x4f91d5=>matchMember(_0x4f91d5,_0x3de12a));if(_0xb923a[_0x530e32(0x20b)]===0x0)throw CliErrors[_0x530e32(0x1f4)](_0x530e32(0x1e7)+_0x3de12a+'\x22.',_0x530e32(0x229)+_0x40e7ee);if(_0xb923a[_0x530e32(0x20b)]>0x1){const _0x295837=_0xb923a[_0x530e32(0x1e9)](_0x4e381a=>(_0x4e381a[_0x530e32(0x208)]??_0x4e381a[_0x530e32(0x1ea)]??'?')+'('+_0x4e381a['userId']+')')['join'](',\x20');throw CliErrors['validation'](_0x530e32(0x21f)+_0x3de12a+_0x530e32(0x1fc)+_0x295837+'.',_0x40e7ee);}const _0x1d5993=_0xb923a[0x0];return{'userId':_0x1d5993[_0x530e32(0x1e8)],'username':_0x1d5993[_0x530e32(0x1ea)]??String(_0x1d5993[_0x530e32(0x1e8)]),'nickname':_0x1d5993[_0x530e32(0x208)],'matchedBy':_0x530e32(0x22a)};}export const CREATE_USER_ROLE_PATH=a234_0x19aec3(0x228);export const DELETE_USER_ROLE_PATH=a234_0x19aec3(0x1fa);export function computeRoleUserMutation(_0x75137d){const _0x4c7a7e=a234_0x19aec3,{operation:_0x19b3c0,appCode:_0x1a92d9,role:_0x535d4a,relations:_0x58128a,user:_0x3ec54a}=_0x75137d,_0x379fc0=[...new Set(_0x58128a[_0x4c7a7e(0x1e9)](_0xd09749=>_0xd09749['userId']))],_0x285b0d=[];if(_0x75137d[_0x4c7a7e(0x20a)]!==undefined&&_0x75137d[_0x4c7a7e(0x20a)]!==_0x379fc0[_0x4c7a7e(0x20b)])throw CliErrors[_0x4c7a7e(0x1f4)](_0x4c7a7e(0x1eb)+_0x75137d[_0x4c7a7e(0x20a)]+_0x4c7a7e(0x1e2)+_0x379fc0[_0x4c7a7e(0x20b)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x3f704c=_0x379fc0[_0x4c7a7e(0x220)](_0x3ec54a['userId']),_0x158baf=_0x58128a[_0x4c7a7e(0x1f6)](_0xd01dcb=>_0xd01dcb[_0x4c7a7e(0x1e8)]===_0x3ec54a[_0x4c7a7e(0x1e8)])['map'](_0x2b3129=>_0x2b3129['id']),_0x7d87a9=_0x19b3c0===_0x4c7a7e(0x207)?!_0x3f704c:_0x3f704c;let _0x264e0a=_0x379fc0;_0x19b3c0===_0x4c7a7e(0x207)?_0x3f704c?_0x285b0d[_0x4c7a7e(0x214)](_0x4c7a7e(0x22b)+_0x3ec54a[_0x4c7a7e(0x1e8)]+_0x4c7a7e(0x1e6)+_0x535d4a[_0x4c7a7e(0x227)]+_0x4c7a7e(0x1ed)):_0x264e0a=[..._0x379fc0,_0x3ec54a[_0x4c7a7e(0x1e8)]]:!_0x3f704c?_0x285b0d['push'](_0x4c7a7e(0x22b)+_0x3ec54a[_0x4c7a7e(0x1e8)]+_0x4c7a7e(0x1e5)+_0x535d4a[_0x4c7a7e(0x227)]+_0x4c7a7e(0x1ed)):(_0x264e0a=_0x379fc0[_0x4c7a7e(0x1f6)](_0x1db304=>_0x1db304!==_0x3ec54a['userId']),_0x158baf[_0x4c7a7e(0x20b)]>0x1&&_0x285b0d[_0x4c7a7e(0x214)](_0x4c7a7e(0x1ec)+_0x158baf[_0x4c7a7e(0x20b)]+_0x4c7a7e(0x1ef)+_0x3ec54a['userId']+'.'));const _0x487f68={'scope':_0x4c7a7e(0x201),'operation':_0x19b3c0,'selector':{'appCode':_0x1a92d9,'roleId':_0x535d4a['id'],'roleName':_0x535d4a[_0x4c7a7e(0x227)],'userId':_0x3ec54a[_0x4c7a7e(0x1e8)]},'before':{'userIds':_0x379fc0},'after':{'userIds':_0x264e0a},'dryRun':_0x75137d[_0x4c7a7e(0x223)],'backend':{'method':_0x4c7a7e(0x1de),'path':_0x19b3c0==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x285b0d};return{'mutation':_0x487f68,'changed':_0x7d87a9,'matchingRelationIds':_0x158baf};}export async function loadDevRoleRelations(_0x24e042,_0x363e0f){const _0x4acd64=a234_0x19aec3,_0x81151b=0x64,_0x16f4fb=[];for(let _0x44c828=0x1;;_0x44c828+=0x1){const {items:_0x2040d6,paging:_0x10530e}=await listDevUserRoleRelations(_0x24e042,{'roleId':_0x363e0f,'currentPage':_0x44c828,'pageSize':_0x81151b});_0x16f4fb[_0x4acd64(0x214)](..._0x2040d6);if(_0x2040d6[_0x4acd64(0x20b)]<_0x81151b||_0x10530e&&_0x16f4fb['length']>=_0x10530e[_0x4acd64(0x211)])return _0x16f4fb;}}export function readRoleRef(_0x1dff46){const _0x3a39d1=a234_0x19aec3,_0x14acc5=_0x1dff46[_0x3a39d1(0x21c)](_0x3a39d1(0x215))['trim']();if(!_0x14acc5)throw CliErrors['flagMissing']('role',_0x3a39d1(0x1f7));return _0x14acc5;}export async function prepareUserMutation(_0x2b5fdb,_0x139760,_0x4beb70){const _0x5c7d2f=a234_0x19aec3,_0x17f7d1=readRoleRef(_0x2b5fdb),_0x1986ba=_0x2b5fdb[_0x5c7d2f(0x21c)](_0x5c7d2f(0x224))[_0x5c7d2f(0x1f3)]();if(!_0x1986ba)throw CliErrors['flagMissing']('user',_0x5c7d2f(0x20c));const _0x3c41cd=_0x2b5fdb[_0x5c7d2f(0x206)]('expect-user-count'),_0x327a9b=_0x3c41cd===undefined||_0x3c41cd===null?undefined:Number(_0x3c41cd),_0x282001=await resolveRoleRef(_0x2b5fdb['appCode'],_0x17f7d1);if(_0x282001[_0x5c7d2f(0x200)]===_0x5c7d2f(0x21a))throw CliErrors[_0x5c7d2f(0x1f4)](_0x5c7d2f(0x1fd)+_0x139760+_0x5c7d2f(0x218),_0x5c7d2f(0x1df));const _0x1d3447=await resolveUserRef(_0x1986ba),_0x56b2e1=await loadDevRoleRelations(_0x2b5fdb[_0x5c7d2f(0x1f5)],_0x282001['id']);return{...computeRoleUserMutation({'operation':_0x139760,'appCode':_0x2b5fdb[_0x5c7d2f(0x1f5)],'role':_0x282001,'relations':_0x56b2e1,'user':{'userId':_0x1d3447[_0x5c7d2f(0x1e8)],'username':_0x1d3447[_0x5c7d2f(0x1ea)],'nickname':_0x1d3447[_0x5c7d2f(0x208)]},'dryRun':_0x4beb70,..._0x327a9b!==undefined?{'expectUserCount':_0x327a9b}:{}}),'role':_0x282001,'user':_0x1d3447};}
1
+ const a235_0x5c3421=a235_0x3e24;(function(_0xd20ecd,_0x14260f){const _0x5d84c1=a235_0x3e24,_0x3b1e2b=_0xd20ecd();while(!![]){try{const _0x28c11a=-parseInt(_0x5d84c1(0x110))/0x1+parseInt(_0x5d84c1(0x133))/0x2*(parseInt(_0x5d84c1(0x102))/0x3)+parseInt(_0x5d84c1(0xec))/0x4+-parseInt(_0x5d84c1(0xf0))/0x5+parseInt(_0x5d84c1(0x10d))/0x6*(-parseInt(_0x5d84c1(0x139))/0x7)+parseInt(_0x5d84c1(0x10c))/0x8+parseInt(_0x5d84c1(0x11f))/0x9*(parseInt(_0x5d84c1(0x124))/0xa);if(_0x28c11a===_0x14260f)break;else _0x3b1e2b['push'](_0x3b1e2b['shift']());}catch(_0x2fcd95){_0x3b1e2b['push'](_0x3b1e2b['shift']());}}}(a235_0x48f7,0x8620e));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a235_0x5c3421(0x112),'required':!![],'description':a235_0x5c3421(0x106)};export const ROLE_REF_FLAG={'name':a235_0x5c3421(0x104),'type':a235_0x5c3421(0xf8),'required':!![],'description':a235_0x5c3421(0x12f)};export const USER_REF_FLAG={'name':a235_0x5c3421(0x113),'type':a235_0x5c3421(0xf8),'required':!![],'description':a235_0x5c3421(0xf1)};export const NAME_FLAG={'name':a235_0x5c3421(0x122),'type':a235_0x5c3421(0xf8),'required':!![],'description':a235_0x5c3421(0x115)};export const USER_NAME_FLAG={'name':a235_0x5c3421(0x122),'type':a235_0x5c3421(0xf8),'required':!![],'description':a235_0x5c3421(0x132)};export const REMARK_FLAG={'name':a235_0x5c3421(0x135),'type':a235_0x5c3421(0xf8),'required':![],'description':a235_0x5c3421(0x11c)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x5c3421(0x12e),'type':a235_0x5c3421(0x112),'required':![],'description':a235_0x5c3421(0x10f)};export const BUILTIN_ROLE_TYPES=[a235_0x5c3421(0xee),a235_0x5c3421(0xfa),'OWNER'];export function isBuiltinRole(_0x1460f2){const _0xc8377=a235_0x5c3421;return BUILTIN_ROLE_TYPES[_0xc8377(0x116)](_0x1460f2);}export function assertCustomRole(_0x295968,_0x53a2ed){const _0x205206=a235_0x5c3421;if(_0x295968[_0x205206(0x117)]!==_0x205206(0xff))throw CliErrors[_0x205206(0x107)]('Cannot\x20'+_0x53a2ed+_0x205206(0xf2)+_0x295968[_0x205206(0x111)]+'\x20('+_0x295968[_0x205206(0x117)]+').',_0x205206(0x136));}export function projectRole(_0x717dbd){const _0x296096=a235_0x5c3421;return{'id':_0x717dbd['id'],'roleName':_0x717dbd[_0x296096(0x111)],'roleType':_0x717dbd[_0x296096(0x117)],'remark':_0x717dbd[_0x296096(0x135)],'userCount':_0x717dbd[_0x296096(0x11e)],'permitCount':_0x717dbd[_0x296096(0xea)],'builtin':isBuiltinRole(_0x717dbd[_0x296096(0x117)])};}export async function resolveRoleRef(_0x782472,_0x50afe5){const _0xf536f5=a235_0x5c3421,_0x12d5bc=_0x50afe5[_0xf536f5(0x134)]();if(!_0x12d5bc)throw CliErrors[_0xf536f5(0x107)](_0xf536f5(0x127),_0xf536f5(0x123));if(/^\d+$/[_0xf536f5(0x138)](_0x12d5bc))return getRoleById(_0x782472,Number(_0x12d5bc));const _0x48a1cd=await listAllAppRoles(_0x782472),_0x25fba8=_0x48a1cd[_0xf536f5(0x120)](_0x5e5810=>_0x5e5810[_0xf536f5(0x111)]===_0x12d5bc);if(_0x25fba8[_0xf536f5(0xf4)]===0x0)throw CliErrors['validation'](_0xf536f5(0xfb)+_0x12d5bc+_0xf536f5(0x137)+_0x782472+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x25fba8[_0xf536f5(0xf4)]>0x1){const _0x2c93ea=_0x25fba8[_0xf536f5(0xe9)](_0x1dd860=>_0x1dd860['id'])[_0xf536f5(0xf9)](',\x20');throw CliErrors[_0xf536f5(0x107)](_0xf536f5(0xfb)+_0x12d5bc+_0xf536f5(0x105)+_0x2c93ea+').',_0xf536f5(0xef));}return _0x25fba8[0x0];}export async function getRoleById(_0x18646b,_0x5bc8b2){const _0x2f586=a235_0x5c3421,_0x5f1423=await listAllAppRoles(_0x18646b),_0x345576=_0x5f1423[_0x2f586(0x120)](_0x89eeaf=>_0x89eeaf['id']===_0x5bc8b2&&(!_0x89eeaf[_0x2f586(0xf6)]||_0x89eeaf['appCode']===_0x18646b));if(_0x345576[_0x2f586(0xf4)]!==0x1)throw CliErrors[_0x2f586(0x107)](_0x2f586(0x11b)+_0x5bc8b2+'\x20not\x20found\x20in\x20app\x20'+_0x18646b+'.',_0x2f586(0x12a));return _0x345576[0x0];}async function listAllAppRoles(_0x23dd8c){const _0x7d40d2=a235_0x5c3421,_0x5ae477=0x64,_0x2fcc0e=[];for(let _0x566456=0x1;;_0x566456+=0x1){const {items:_0x46e402,paging:_0x3a7039}=await listAppRoles(_0x23dd8c,{'currentPage':_0x566456,'pageSize':_0x5ae477});_0x2fcc0e[_0x7d40d2(0x119)](..._0x46e402);if(_0x46e402[_0x7d40d2(0xf4)]<_0x5ae477||_0x3a7039&&_0x2fcc0e[_0x7d40d2(0xf4)]>=_0x3a7039[_0x7d40d2(0x129)])return _0x2fcc0e;}}export async function resolveTenantCode(){const _0x113d74=a235_0x5c3421,_0x5c5803=await getSessionUserInfo(),_0x43a129=_0x5c5803?.['user']?.[_0x113d74(0x11a)]?.['tenant_code'];if(!_0x43a129)throw CliErrors['authRequired'](_0x113d74(0x114));return _0x43a129;}function matchMember(_0x4fb9e6,_0x3ee9e4){const _0x2d0ed7=a235_0x5c3421,_0x361107=_0x3ee9e4[_0x2d0ed7(0x134)]()[_0x2d0ed7(0x128)]();return(_0x4fb9e6['nickname']??'')[_0x2d0ed7(0x128)]()===_0x361107||(_0x4fb9e6[_0x2d0ed7(0x101)]??'')['toLowerCase']()===_0x361107;}function a235_0x3e24(_0x10ea9c,_0xc4048c){_0x10ea9c=_0x10ea9c-0xe9;const _0x48f76e=a235_0x48f7();let _0x3e2461=_0x48f76e[_0x10ea9c];return _0x3e2461;}export async function resolveUserRef(_0xf2134b,_0x64eb04=a235_0x5c3421(0xf3)){const _0x23d2bd=a235_0x5c3421,_0x19c2c3=_0xf2134b['trim']();if(!_0x19c2c3)throw CliErrors[_0x23d2bd(0x107)]('Missing\x20user\x20reference.',_0x23d2bd(0xfc));const _0x95730d=await resolveTenantCode(),_0xb8a9b3=await getTenantMembers(_0x95730d);if(/^\d+$/[_0x23d2bd(0x138)](_0x19c2c3)){const _0x382f18=Number(_0x19c2c3),_0x1ea5e8=_0xb8a9b3[_0x23d2bd(0x130)](_0x4d7ed7=>_0x4d7ed7[_0x23d2bd(0xf7)]===_0x382f18);return{'userId':_0x382f18,'username':_0x1ea5e8?.[_0x23d2bd(0x101)]??String(_0x382f18),'nickname':_0x1ea5e8?.['nickname'],'matchedBy':'id'};}const _0x36924c=_0xb8a9b3[_0x23d2bd(0x120)](_0x12603b=>matchMember(_0x12603b,_0x19c2c3));if(_0x36924c[_0x23d2bd(0xf4)]===0x0)throw CliErrors[_0x23d2bd(0x107)](_0x23d2bd(0xfe)+_0x19c2c3+'\x22.',_0x23d2bd(0x12d)+_0x64eb04);if(_0x36924c[_0x23d2bd(0xf4)]>0x1){const _0x200bfe=_0x36924c['map'](_0x57d44=>(_0x57d44[_0x23d2bd(0x126)]??_0x57d44[_0x23d2bd(0x101)]??'?')+'('+_0x57d44[_0x23d2bd(0xf7)]+')')[_0x23d2bd(0xf9)](',\x20');throw CliErrors[_0x23d2bd(0x107)](_0x23d2bd(0x103)+_0x19c2c3+_0x23d2bd(0x125)+_0x200bfe+'.',_0x64eb04);}const _0x8ff251=_0x36924c[0x0];return{'userId':_0x8ff251[_0x23d2bd(0xf7)],'username':_0x8ff251[_0x23d2bd(0x101)]??String(_0x8ff251['userId']),'nickname':_0x8ff251['nickname'],'matchedBy':_0x23d2bd(0x122)};}export const CREATE_USER_ROLE_PATH=a235_0x5c3421(0x100);export const DELETE_USER_ROLE_PATH=a235_0x5c3421(0x10e);function a235_0x48f7(){const _0xf388a2=['OWNER','User\x20','4325056fXYnno','144chimGS','/smartapi/permit/user-role/delete','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','66953KCPDtn','roleName','number','user','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Role\x20name','includes','roleType','expectUserCount','push','tenant','Role\x20id\x20','Optional\x20role\x20remark/description','Anti-drift\x20check\x20failed:\x20expected\x20','userCount','110502ChpYIR','filter','Cannot\x20','name','Pass\x20--role\x20<id|name>.','470qVeiKE','\x22:\x20','nickname','Missing\x20role\x20reference.','toLowerCase','totalCount','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','\x20member(s)\x20but\x20role\x20has\x20','str','Check\x20the\x20nickname/username.\x20','expect-user-count','Role\x20id\x20or\x20exact\x20role\x20name','find','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','10ewfrap','trim','remark','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','\x22\x20not\x20found\x20in\x20app\x20','test','190897ZhhvmF','map','permitCount','\x20is\x20not\x20a\x20member\x20of\x20role\x20','3108160WImSRi',';\x20no\x20change.','ADMIN','Disambiguate\x20with\x20--role\x20<id>.','3344255mMwZUn','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x20built-in\x20role\x20','Pass\x20--user\x20<id>.','length','\x20duplicate\x20memberships\x20for\x20user\x20','appCode','userId','string','join','DEV','Role\x20name\x20\x22','Pass\x20--user\x20<id|name>.','flagMissing','No\x20tenant\x20member\x20matches\x20\x22','CUSTOM','/smartapi/permit/user-role/create','username','26976qkpEWG','Multiple\x20tenant\x20members\x20match\x20\x22','role','\x22\x20is\x20ambiguous\x20(ids:\x20','Role\x20id\x20(from\x20`role\x20list`)','validation','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','POST'];a235_0x48f7=function(){return _0xf388a2;};return a235_0x48f7();}export function computeRoleUserMutation(_0x20100c){const _0x2b0ad8=a235_0x5c3421,{operation:_0x1ba0bd,appCode:_0x303ae8,role:_0x3f3c23,relations:_0x5a1c08,user:_0x206e9e}=_0x20100c,_0xdcf4fd=[...new Set(_0x5a1c08[_0x2b0ad8(0xe9)](_0x53a83f=>_0x53a83f[_0x2b0ad8(0xf7)]))],_0x3a73fd=[];if(_0x20100c[_0x2b0ad8(0x118)]!==undefined&&_0x20100c['expectUserCount']!==_0xdcf4fd[_0x2b0ad8(0xf4)])throw CliErrors[_0x2b0ad8(0x107)](_0x2b0ad8(0x11d)+_0x20100c[_0x2b0ad8(0x118)]+_0x2b0ad8(0x12b)+_0xdcf4fd['length']+'.',_0x2b0ad8(0x108));const _0x4496ce=_0xdcf4fd[_0x2b0ad8(0x116)](_0x206e9e[_0x2b0ad8(0xf7)]),_0x2a1036=_0x5a1c08['filter'](_0x461995=>_0x461995[_0x2b0ad8(0xf7)]===_0x206e9e[_0x2b0ad8(0xf7)])[_0x2b0ad8(0xe9)](_0x3aa872=>_0x3aa872['id']),_0x23005c=_0x1ba0bd==='user-add'?!_0x4496ce:_0x4496ce;let _0x463763=_0xdcf4fd;_0x1ba0bd==='user-add'?_0x4496ce?_0x3a73fd[_0x2b0ad8(0x119)](_0x2b0ad8(0x10b)+_0x206e9e[_0x2b0ad8(0xf7)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x3f3c23[_0x2b0ad8(0x111)]+_0x2b0ad8(0xed)):_0x463763=[..._0xdcf4fd,_0x206e9e['userId']]:!_0x4496ce?_0x3a73fd[_0x2b0ad8(0x119)](_0x2b0ad8(0x10b)+_0x206e9e['userId']+_0x2b0ad8(0xeb)+_0x3f3c23[_0x2b0ad8(0x111)]+_0x2b0ad8(0xed)):(_0x463763=_0xdcf4fd[_0x2b0ad8(0x120)](_0x5c62a1=>_0x5c62a1!==_0x206e9e['userId']),_0x2a1036[_0x2b0ad8(0xf4)]>0x1&&_0x3a73fd[_0x2b0ad8(0x119)]('Removed\x20'+_0x2a1036[_0x2b0ad8(0xf4)]+_0x2b0ad8(0xf5)+_0x206e9e[_0x2b0ad8(0xf7)]+'.'));const _0x1ca347={'scope':'dev','operation':_0x1ba0bd,'selector':{'appCode':_0x303ae8,'roleId':_0x3f3c23['id'],'roleName':_0x3f3c23[_0x2b0ad8(0x111)],'userId':_0x206e9e[_0x2b0ad8(0xf7)]},'before':{'userIds':_0xdcf4fd},'after':{'userIds':_0x463763},'dryRun':_0x20100c['dryRun'],'backend':{'method':_0x2b0ad8(0x109),'path':_0x1ba0bd==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x3a73fd};return{'mutation':_0x1ca347,'changed':_0x23005c,'matchingRelationIds':_0x2a1036};}export async function loadDevRoleRelations(_0x595d64,_0x49dadd){const _0x2f2c5e=a235_0x5c3421,_0x103611=0x64,_0x2715ab=[];for(let _0x2976e9=0x1;;_0x2976e9+=0x1){const {items:_0x2ed5ab,paging:_0x37321d}=await listDevUserRoleRelations(_0x595d64,{'roleId':_0x49dadd,'currentPage':_0x2976e9,'pageSize':_0x103611});_0x2715ab[_0x2f2c5e(0x119)](..._0x2ed5ab);if(_0x2ed5ab['length']<_0x103611||_0x37321d&&_0x2715ab[_0x2f2c5e(0xf4)]>=_0x37321d[_0x2f2c5e(0x129)])return _0x2715ab;}}export function readRoleRef(_0x13e228){const _0x116500=a235_0x5c3421,_0x50a1ce=_0x13e228['str']('role')[_0x116500(0x134)]();if(!_0x50a1ce)throw CliErrors[_0x116500(0xfd)](_0x116500(0x104),_0x116500(0x123));return _0x50a1ce;}export async function prepareUserMutation(_0x3a3471,_0x173804,_0x1dfa04){const _0x29ba72=a235_0x5c3421,_0x3c3f62=readRoleRef(_0x3a3471),_0x7a7824=_0x3a3471[_0x29ba72(0x12c)](_0x29ba72(0x113))[_0x29ba72(0x134)]();if(!_0x7a7824)throw CliErrors['flagMissing'](_0x29ba72(0x113),'Pass\x20--user\x20<id|name>.');const _0x43f9d1=_0x3a3471['flag'](_0x29ba72(0x12e)),_0x412f4b=_0x43f9d1===undefined||_0x43f9d1===null?undefined:Number(_0x43f9d1),_0x5846cd=await resolveRoleRef(_0x3a3471[_0x29ba72(0xf6)],_0x3c3f62);if(_0x5846cd[_0x29ba72(0x117)]===_0x29ba72(0x10a))throw CliErrors[_0x29ba72(0x107)](_0x29ba72(0x121)+_0x173804+'\x20members\x20of\x20the\x20OWNER\x20role.',_0x29ba72(0x131));const _0x43a470=await resolveUserRef(_0x7a7824),_0x59c828=await loadDevRoleRelations(_0x3a3471['appCode'],_0x5846cd['id']);return{...computeRoleUserMutation({'operation':_0x173804,'appCode':_0x3a3471[_0x29ba72(0xf6)],'role':_0x5846cd,'relations':_0x59c828,'user':{'userId':_0x43a470[_0x29ba72(0xf7)],'username':_0x43a470['username'],'nickname':_0x43a470[_0x29ba72(0x126)]},'dryRun':_0x1dfa04,..._0x412f4b!==undefined?{'expectUserCount':_0x412f4b}:{}}),'role':_0x5846cd,'user':_0x43a470};}
@@ -1 +1 @@
1
- const a235_0x21d812=a235_0x152d;(function(_0x2685d6,_0x186607){const _0x4dcd34=a235_0x152d,_0xbb8807=_0x2685d6();while(!![]){try{const _0x281300=-parseInt(_0x4dcd34(0x9a))/0x1+parseInt(_0x4dcd34(0x99))/0x2+-parseInt(_0x4dcd34(0x91))/0x3+-parseInt(_0x4dcd34(0x96))/0x4+-parseInt(_0x4dcd34(0x8e))/0x5+-parseInt(_0x4dcd34(0x94))/0x6+parseInt(_0x4dcd34(0x97))/0x7;if(_0x281300===_0x186607)break;else _0xbb8807['push'](_0xbb8807['shift']());}catch(_0x287df7){_0xbb8807['push'](_0xbb8807['shift']());}}}(a235_0x15ad,0x40601));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a235_0x15ad(){const _0x347cf3=['update','validation','dev','Updated\x20role\x20','POST','/smartapi/permit/role/update','flag','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','422230RkGGxW','Nothing\x20to\x20update.','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','1282227RveoCz','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','name','1248822vuTszr','num','28336rklsYz','6489994MddMVv','New\x20role\x20name','345170aLJSeq','108970AYnlOb','appCode','--name\x20cannot\x20be\x20empty.','roleName','remark'];a235_0x15ad=function(){return _0x347cf3;};return a235_0x15ad();}function a235_0x152d(_0x50c9ff,_0x350236){_0x50c9ff=_0x50c9ff-0x84;const _0x15ada0=a235_0x15ad();let _0x152d43=_0x15ada0[_0x50c9ff];return _0x152d43;}const UPDATE_PATH=a235_0x21d812(0x8b);function readPatch(_0x1f6422){const _0xb4be41=a235_0x21d812,_0x299f53=_0x1f6422[_0xb4be41(0x8c)](_0xb4be41(0x93)),_0x4e51d8=_0x1f6422[_0xb4be41(0x8c)](_0xb4be41(0x85)),_0x2fde24={};if(_0x299f53!==undefined&&_0x299f53!==null){const _0x50086c=String(_0x299f53)['trim']();if(!_0x50086c)throw CliErrors['validation'](_0xb4be41(0x9c));if(_0x50086c['length']>0x40)throw CliErrors[_0xb4be41(0x87)](_0xb4be41(0x92));_0x2fde24[_0xb4be41(0x84)]=_0x50086c;}_0x4e51d8!==undefined&&_0x4e51d8!==null&&(_0x2fde24[_0xb4be41(0x85)]=String(_0x4e51d8));if(_0x2fde24[_0xb4be41(0x84)]===undefined&&_0x2fde24['remark']===undefined)throw CliErrors[_0xb4be41(0x87)](_0xb4be41(0x8f),_0xb4be41(0x8d));return _0x2fde24;}export const roleUpdate={'service':'role','command':a235_0x21d812(0x86),'description':a235_0x21d812(0x90),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a235_0x21d812(0x93),'type':'string','required':![],'description':a235_0x21d812(0x98)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x221f3b){readPatch(_0x221f3b);},async 'dryRun'(_0x12e50d){const _0x2469ca=a235_0x21d812,_0x4dd2ba=_0x12e50d[_0x2469ca(0x95)]('id'),_0x4a41ac=readPatch(_0x12e50d),_0x32a9da=await getRoleById(_0x12e50d[_0x2469ca(0x9b)],_0x4dd2ba);return assertCustomRole(_0x32a9da,_0x2469ca(0x86)),asDryRunResult({'scope':_0x2469ca(0x88),'operation':_0x2469ca(0x86),'selector':{'appCode':_0x12e50d['appCode'],'roleId':_0x4dd2ba,'roleName':_0x32a9da[_0x2469ca(0x84)]},'before':projectRole(_0x32a9da),'after':projectRole({..._0x32a9da,..._0x4a41ac[_0x2469ca(0x84)]!==undefined?{'roleName':_0x4a41ac[_0x2469ca(0x84)]}:{},..._0x4a41ac[_0x2469ca(0x85)]!==undefined?{'remark':_0x4a41ac[_0x2469ca(0x85)]}:{}}),'dryRun':!![],'backend':{'method':_0x2469ca(0x8a),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0xb90f23){const _0x1e076c=a235_0x21d812,_0x1b6cbd=_0xb90f23[_0x1e076c(0x95)]('id'),_0x2b20e1=readPatch(_0xb90f23),_0x21e68c=await getRoleById(_0xb90f23[_0x1e076c(0x9b)],_0x1b6cbd);assertCustomRole(_0x21e68c,'update'),await updateAppRole({'id':_0x1b6cbd,'appCode':_0xb90f23[_0x1e076c(0x9b)],..._0x2b20e1[_0x1e076c(0x84)]!==undefined?{'roleName':_0x2b20e1[_0x1e076c(0x84)]}:{},..._0x2b20e1['remark']!==undefined?{'remark':_0x2b20e1[_0x1e076c(0x85)]}:{}});const _0x11a671=await getRoleById(_0xb90f23[_0x1e076c(0x9b)],_0x1b6cbd);return{'ok':!![],'data':{'scope':_0x1e076c(0x88),'operation':'update','selector':{'appCode':_0xb90f23['appCode'],'roleId':_0x1b6cbd,'roleName':_0x11a671['roleName']},'before':projectRole(_0x21e68c),'after':projectRole(_0x11a671),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x1e076c(0x89)+_0x11a671[_0x1e076c(0x84)]+'\x20(id='+_0x1b6cbd+')'};}};
1
+ const a236_0x2dce3e=a236_0xbdeb;(function(_0x4dc4f7,_0x1988b1){const _0x4ad79a=a236_0xbdeb,_0x562b80=_0x4dc4f7();while(!![]){try{const _0x41cfe7=parseInt(_0x4ad79a(0x1d6))/0x1*(-parseInt(_0x4ad79a(0x1d2))/0x2)+-parseInt(_0x4ad79a(0x1ca))/0x3+parseInt(_0x4ad79a(0x1da))/0x4+parseInt(_0x4ad79a(0x1cb))/0x5+parseInt(_0x4ad79a(0x1d5))/0x6*(parseInt(_0x4ad79a(0x1db))/0x7)+parseInt(_0x4ad79a(0x1d0))/0x8+parseInt(_0x4ad79a(0x1cd))/0x9*(-parseInt(_0x4ad79a(0x1de))/0xa);if(_0x41cfe7===_0x1988b1)break;else _0x562b80['push'](_0x562b80['shift']());}catch(_0x55077a){_0x562b80['push'](_0x562b80['shift']());}}}(a236_0x361c,0xbcb6e));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a236_0x2dce3e(0x1df);function a236_0x361c(){const _0x48a913=['dev','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','3341946kEewAC','7534805ZgYBrd','validation','9IzPqdg','string','POST','2403776WDtekg','num','43146vXUziu','write','name','174tdKwNZ','39WEzHCD','roleName','Updated\x20role\x20','flag','2963136EDzlAm','140749KjCXXO','Nothing\x20to\x20update.','trim','4030170BLvAza','/smartapi/permit/role/update','--name\x20cannot\x20be\x20empty.','remark','update','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','appCode'];a236_0x361c=function(){return _0x48a913;};return a236_0x361c();}function readPatch(_0xf92e9a){const _0x22c38b=a236_0x2dce3e,_0x5babac=_0xf92e9a[_0x22c38b(0x1d9)]('name'),_0x44cf8a=_0xf92e9a[_0x22c38b(0x1d9)](_0x22c38b(0x1c4)),_0x47f496={};if(_0x5babac!==undefined&&_0x5babac!==null){const _0x3043da=String(_0x5babac)[_0x22c38b(0x1dd)]();if(!_0x3043da)throw CliErrors[_0x22c38b(0x1cc)](_0x22c38b(0x1c3));if(_0x3043da['length']>0x40)throw CliErrors[_0x22c38b(0x1cc)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x47f496[_0x22c38b(0x1d7)]=_0x3043da;}_0x44cf8a!==undefined&&_0x44cf8a!==null&&(_0x47f496[_0x22c38b(0x1c4)]=String(_0x44cf8a));if(_0x47f496['roleName']===undefined&&_0x47f496[_0x22c38b(0x1c4)]===undefined)throw CliErrors[_0x22c38b(0x1cc)](_0x22c38b(0x1dc),_0x22c38b(0x1c6));return _0x47f496;}function a236_0xbdeb(_0x48e654,_0x461bf4){_0x48e654=_0x48e654-0x1c3;const _0x361cbe=a236_0x361c();let _0xbdebdc=_0x361cbe[_0x48e654];return _0xbdebdc;}export const roleUpdate={'service':'role','command':a236_0x2dce3e(0x1c5),'description':a236_0x2dce3e(0x1c9),'risk':a236_0x2dce3e(0x1d3),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x2dce3e(0x1d4),'type':a236_0x2dce3e(0x1ce),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5c476f){readPatch(_0x5c476f);},async 'dryRun'(_0x31fd3b){const _0x2ac6bb=a236_0x2dce3e,_0x232bb4=_0x31fd3b[_0x2ac6bb(0x1d1)]('id'),_0x1cb888=readPatch(_0x31fd3b),_0x2c91e2=await getRoleById(_0x31fd3b[_0x2ac6bb(0x1c7)],_0x232bb4);return assertCustomRole(_0x2c91e2,_0x2ac6bb(0x1c5)),asDryRunResult({'scope':_0x2ac6bb(0x1c8),'operation':_0x2ac6bb(0x1c5),'selector':{'appCode':_0x31fd3b[_0x2ac6bb(0x1c7)],'roleId':_0x232bb4,'roleName':_0x2c91e2[_0x2ac6bb(0x1d7)]},'before':projectRole(_0x2c91e2),'after':projectRole({..._0x2c91e2,..._0x1cb888[_0x2ac6bb(0x1d7)]!==undefined?{'roleName':_0x1cb888[_0x2ac6bb(0x1d7)]}:{},..._0x1cb888['remark']!==undefined?{'remark':_0x1cb888[_0x2ac6bb(0x1c4)]}:{}}),'dryRun':!![],'backend':{'method':_0x2ac6bb(0x1cf),'path':UPDATE_PATH},'warnings':[]},{'method':_0x2ac6bb(0x1cf),'url':UPDATE_PATH});},async 'execute'(_0x1af3b2){const _0x223466=a236_0x2dce3e,_0x54f501=_0x1af3b2[_0x223466(0x1d1)]('id'),_0x57f4ce=readPatch(_0x1af3b2),_0x173a48=await getRoleById(_0x1af3b2[_0x223466(0x1c7)],_0x54f501);assertCustomRole(_0x173a48,_0x223466(0x1c5)),await updateAppRole({'id':_0x54f501,'appCode':_0x1af3b2[_0x223466(0x1c7)],..._0x57f4ce[_0x223466(0x1d7)]!==undefined?{'roleName':_0x57f4ce[_0x223466(0x1d7)]}:{},..._0x57f4ce[_0x223466(0x1c4)]!==undefined?{'remark':_0x57f4ce[_0x223466(0x1c4)]}:{}});const _0x455aaf=await getRoleById(_0x1af3b2[_0x223466(0x1c7)],_0x54f501);return{'ok':!![],'data':{'scope':_0x223466(0x1c8),'operation':_0x223466(0x1c5),'selector':{'appCode':_0x1af3b2[_0x223466(0x1c7)],'roleId':_0x54f501,'roleName':_0x455aaf[_0x223466(0x1d7)]},'before':projectRole(_0x173a48),'after':projectRole(_0x455aaf),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x223466(0x1d8)+_0x455aaf[_0x223466(0x1d7)]+'\x20(id='+_0x54f501+')'};}};
@@ -1 +1 @@
1
- const a236_0x57a938=a236_0x1719;function a236_0x516f(){const _0x514a56=['user-add','POST','3003483ntsmCs','8lMsINm','1489499QfhMGi','high-risk-write','\x20already\x20in\x20role\x20','626157BWswFq','\x20to\x20role\x20','20DUqwpH','userId','1775818lECzyB','roleId','selector','39247029xhZDjW','username','8544954ZDAqzS','roleType','role','4116220gKmfMA'];a236_0x516f=function(){return _0x514a56;};return a236_0x516f();}(function(_0x46412c,_0x35120f){const _0xf44c40=a236_0x1719,_0x4f3c24=_0x46412c();while(!![]){try{const _0x165acc=-parseInt(_0xf44c40(0x188))/0x1+-parseInt(_0xf44c40(0x18f))/0x2+parseInt(_0xf44c40(0x18b))/0x3*(-parseInt(_0xf44c40(0x18d))/0x4)+parseInt(_0xf44c40(0x183))/0x5+-parseInt(_0xf44c40(0x194))/0x6+parseInt(_0xf44c40(0x186))/0x7+-parseInt(_0xf44c40(0x187))/0x8*(-parseInt(_0xf44c40(0x192))/0x9);if(_0x165acc===_0x35120f)break;else _0x4f3c24['push'](_0x4f3c24['shift']());}catch(_0xe2f7eb){_0x4f3c24['push'](_0x4f3c24['shift']());}}}(a236_0x516f,0xbb7bc));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a236_0x1719(_0x1e6c33,_0x4e7fc0){_0x1e6c33=_0x1e6c33-0x181;const _0x516f82=a236_0x516f();let _0x171931=_0x516f82[_0x1e6c33];return _0x171931;}export const roleUserAdd={'service':a236_0x57a938(0x182),'command':a236_0x57a938(0x184),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a236_0x57a938(0x189),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5cc9ac){const _0x2ee05c=a236_0x57a938,{mutation:_0x4248ed}=await prepareUserMutation(_0x5cc9ac,_0x2ee05c(0x184),!![]);return asDryRunResult(_0x4248ed,{'method':_0x2ee05c(0x185),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x8fcabf){const _0xddddbd=a236_0x57a938,{mutation:_0x437443,changed:_0x5bb742,role:_0x37951f,user:_0x4691bf}=await prepareUserMutation(_0x8fcabf,'user-add',![]);return _0x5bb742&&await createDevUserRole({'appCode':_0x8fcabf['appCode'],'userId':_0x4691bf['userId'],'username':_0x4691bf[_0xddddbd(0x193)],'roleType':_0x37951f[_0xddddbd(0x181)],'roleId':_0x437443['selector'][_0xddddbd(0x190)]}),{'ok':!![],'data':_0x437443,'message':_0x5bb742?'Added\x20user\x20'+_0x437443[_0xddddbd(0x191)][_0xddddbd(0x18e)]+_0xddddbd(0x18c)+_0x437443[_0xddddbd(0x191)]['roleName']:'No\x20change:\x20user\x20'+_0x437443[_0xddddbd(0x191)][_0xddddbd(0x18e)]+_0xddddbd(0x18a)+_0x437443[_0xddddbd(0x191)]['roleName']};}};
1
+ function a237_0x3d1c(){const _0x3793e5=['8BkwJgE','8sgoAst','18823541lIHEsc','20pvbYoY','user-add','93576qGKLOR','selector','userId','5895533ABdNRa','9544140kOHIkv','No\x20change:\x20user\x20','roleName','1166140cjzJoC','username','roleId','Added\x20user\x20','82130ddafzA','403032GbbofG','POST','high-risk-write','roleType','appCode','role','348NpBNEx'];a237_0x3d1c=function(){return _0x3793e5;};return a237_0x3d1c();}const a237_0x47bb0a=a237_0x55d0;function a237_0x55d0(_0x473989,_0x1fb8e8){_0x473989=_0x473989-0x1d6;const _0x3d1cbf=a237_0x3d1c();let _0x55d0f8=_0x3d1cbf[_0x473989];return _0x55d0f8;}(function(_0x3f821d,_0x3d305e){const _0x517e2b=a237_0x55d0,_0x4fd267=_0x3f821d();while(!![]){try{const _0x17aa68=parseInt(_0x517e2b(0x1df))/0x1*(-parseInt(_0x517e2b(0x1e4))/0x2)+parseInt(_0x517e2b(0x1d8))/0x3+parseInt(_0x517e2b(0x1eb))/0x4+parseInt(_0x517e2b(0x1d7))/0x5*(-parseInt(_0x517e2b(0x1de))/0x6)+parseInt(_0x517e2b(0x1e7))/0x7*(-parseInt(_0x517e2b(0x1e0))/0x8)+-parseInt(_0x517e2b(0x1e8))/0x9+parseInt(_0x517e2b(0x1e2))/0xa*(parseInt(_0x517e2b(0x1e1))/0xb);if(_0x17aa68===_0x3d305e)break;else _0x4fd267['push'](_0x4fd267['shift']());}catch(_0x3608c4){_0x4fd267['push'](_0x4fd267['shift']());}}}(a237_0x3d1c,0x9709a));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x47bb0a(0x1dd),'command':a237_0x47bb0a(0x1e3),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a237_0x47bb0a(0x1da),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4d2f9a){const _0x33a2a6=a237_0x47bb0a,{mutation:_0x3f5e28}=await prepareUserMutation(_0x4d2f9a,_0x33a2a6(0x1e3),!![]);return asDryRunResult(_0x3f5e28,{'method':_0x33a2a6(0x1d9),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x39d148){const _0x25410c=a237_0x47bb0a,{mutation:_0x10bcd5,changed:_0xcba870,role:_0x535ca9,user:_0x444204}=await prepareUserMutation(_0x39d148,_0x25410c(0x1e3),![]);return _0xcba870&&await createDevUserRole({'appCode':_0x39d148[_0x25410c(0x1dc)],'userId':_0x444204[_0x25410c(0x1e6)],'username':_0x444204[_0x25410c(0x1ec)],'roleType':_0x535ca9[_0x25410c(0x1db)],'roleId':_0x10bcd5[_0x25410c(0x1e5)][_0x25410c(0x1ed)]}),{'ok':!![],'data':_0x10bcd5,'message':_0xcba870?_0x25410c(0x1d6)+_0x10bcd5[_0x25410c(0x1e5)]['userId']+'\x20to\x20role\x20'+_0x10bcd5[_0x25410c(0x1e5)][_0x25410c(0x1ea)]:_0x25410c(0x1e9)+_0x10bcd5[_0x25410c(0x1e5)]['userId']+'\x20already\x20in\x20role\x20'+_0x10bcd5[_0x25410c(0x1e5)][_0x25410c(0x1ea)]};}};
@@ -1 +1 @@
1
- const a237_0x3bae0a=a237_0x494e;function a237_0x492d(){const _0x3b83d9=['259480wafMib','3yJOKqP','230990hkIhLC','190337ARdZSB','\x20from\x20role\x20','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','1158916dEGuQq','selector','82882OTpnYU','userId','121mUNLnu','Removed\x20user\x20','63COuLOt','No\x20change:\x20user\x20','31074ZbfcWP','role','\x20not\x20in\x20role\x20','5JRlOxL','10411848rxsIvy','245wqiRts','roleName','user-remove'];a237_0x492d=function(){return _0x3b83d9;};return a237_0x492d();}(function(_0xa3e25c,_0x226254){const _0x269987=a237_0x494e,_0x2611e3=_0xa3e25c();while(!![]){try{const _0xbf685a=parseInt(_0x269987(0x1c7))/0x1*(-parseInt(_0x269987(0x1be))/0x2)+parseInt(_0x269987(0x1b7))/0x3*(-parseInt(_0x269987(0x1bc))/0x4)+parseInt(_0x269987(0x1b3))/0x5*(parseInt(_0x269987(0x1c4))/0x6)+parseInt(_0x269987(0x1b9))/0x7+parseInt(_0x269987(0x1b6))/0x8*(-parseInt(_0x269987(0x1c2))/0x9)+parseInt(_0x269987(0x1b8))/0xa*(-parseInt(_0x269987(0x1c0))/0xb)+parseInt(_0x269987(0x1b2))/0xc;if(_0xbf685a===_0x226254)break;else _0x2611e3['push'](_0x2611e3['shift']());}catch(_0x53a37e){_0x2611e3['push'](_0x2611e3['shift']());}}}(a237_0x492d,0x29a34));function a237_0x494e(_0x365a32,_0x293ac0){_0x365a32=_0x365a32-0x1b2;const _0x492ddc=a237_0x492d();let _0x494e6f=_0x492ddc[_0x365a32];return _0x494e6f;}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a237_0x3bae0a(0x1c5),'command':a237_0x3bae0a(0x1b5),'description':a237_0x3bae0a(0x1bb),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3f6c4f){const _0x103d07=a237_0x3bae0a,{mutation:_0x4dd125}=await prepareUserMutation(_0x3f6c4f,_0x103d07(0x1b5),!![]);return asDryRunResult(_0x4dd125,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x393246){const _0x487ffe=a237_0x3bae0a,{matchingRelationIds:_0x34ac7c,mutation:_0x127d8b,changed:_0x365bdb}=await prepareUserMutation(_0x393246,_0x487ffe(0x1b5),![]);if(_0x365bdb)for(const _0x5e2a0a of _0x34ac7c){await deleteDevUserRole(_0x5e2a0a);}return{'ok':!![],'data':_0x127d8b,'message':_0x365bdb?_0x487ffe(0x1c1)+_0x127d8b[_0x487ffe(0x1bd)][_0x487ffe(0x1bf)]+_0x487ffe(0x1ba)+_0x127d8b['selector'][_0x487ffe(0x1b4)]:_0x487ffe(0x1c3)+_0x127d8b[_0x487ffe(0x1bd)][_0x487ffe(0x1bf)]+_0x487ffe(0x1c6)+_0x127d8b[_0x487ffe(0x1bd)]['roleName']};}};
1
+ const a238_0x351d24=a238_0x237c;(function(_0x27c63d,_0x6164e3){const _0x3af86e=a238_0x237c,_0x52aa9a=_0x27c63d();while(!![]){try{const _0x111aa6=parseInt(_0x3af86e(0x6b))/0x1+-parseInt(_0x3af86e(0x77))/0x2*(-parseInt(_0x3af86e(0x76))/0x3)+-parseInt(_0x3af86e(0x6c))/0x4*(parseInt(_0x3af86e(0x70))/0x5)+-parseInt(_0x3af86e(0x6d))/0x6*(parseInt(_0x3af86e(0x78))/0x7)+parseInt(_0x3af86e(0x79))/0x8*(parseInt(_0x3af86e(0x6e))/0x9)+parseInt(_0x3af86e(0x6f))/0xa+-parseInt(_0x3af86e(0x7a))/0xb;if(_0x111aa6===_0x6164e3)break;else _0x52aa9a['push'](_0x52aa9a['shift']());}catch(_0xd00df8){_0x52aa9a['push'](_0x52aa9a['shift']());}}}(a238_0x41bd,0xb0df8));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a238_0x237c(_0x2ab349,_0x5d52e0){_0x2ab349=_0x2ab349-0x6a;const _0x41bda1=a238_0x41bd();let _0x237cbc=_0x41bda1[_0x2ab349];return _0x237cbc;}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_0x41bd(){const _0x44fc3f=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','high-risk-write','1368165MowxIe','1842124SafAyh','12tcbMLJ','958077HpGdzt','4022340xQldvS','5EslTve','role','roleName','userId','user-remove','selector','2709651HpVmkP','2TLvUEe','4621442CvVirx','104jdwNiw','17072990LruxyA','No\x20change:\x20user\x20'];a238_0x41bd=function(){return _0x44fc3f;};return a238_0x41bd();}export const roleUserRemove={'service':a238_0x351d24(0x71),'command':a238_0x351d24(0x74),'description':a238_0x351d24(0x7c),'risk':a238_0x351d24(0x6a),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2f3972){const _0x253617=a238_0x351d24,{mutation:_0x326e37}=await prepareUserMutation(_0x2f3972,_0x253617(0x74),!![]);return asDryRunResult(_0x326e37,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x430c9c){const _0xb2e832=a238_0x351d24,{matchingRelationIds:_0x2eb8ae,mutation:_0x3db4ff,changed:_0x373f30}=await prepareUserMutation(_0x430c9c,_0xb2e832(0x74),![]);if(_0x373f30)for(const _0xc9bfc of _0x2eb8ae){await deleteDevUserRole(_0xc9bfc);}return{'ok':!![],'data':_0x3db4ff,'message':_0x373f30?'Removed\x20user\x20'+_0x3db4ff[_0xb2e832(0x75)]['userId']+'\x20from\x20role\x20'+_0x3db4ff[_0xb2e832(0x75)]['roleName']:_0xb2e832(0x7b)+_0x3db4ff[_0xb2e832(0x75)][_0xb2e832(0x73)]+'\x20not\x20in\x20role\x20'+_0x3db4ff['selector'][_0xb2e832(0x72)]};}};
@@ -1 +1 @@
1
- function a238_0xb6d6(_0x4c4f4f,_0x393492){_0x4c4f4f=_0x4c4f4f-0x19a;const _0x198bd1=a238_0x198b();let _0xb6d6cf=_0x198bd1[_0x4c4f4f];return _0xb6d6cf;}const a238_0xa4bacc=a238_0xb6d6;function a238_0x198b(){const _0x534d15=['175MMMOid','read','user-resolve','132cIfMoh','matchedBy','role','1342vYabFj','1617434GUiVkO','nickname','770477oqOsXD','791796jvwvhm','1268aOEPtb','112sHvisf','Resolved\x20\x22','str','Pass\x20--name\x20<nickname|username>.','386344YahMHc','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','396954ngQqFo','flagMissing','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','userId','username','9230wZDtrl','name','\x22\x20→\x20userId\x20','trim'];a238_0x198b=function(){return _0x534d15;};return a238_0x198b();}(function(_0x3408b6,_0x292a5f){const _0x46e981=a238_0xb6d6,_0x4232fd=_0x3408b6();while(!![]){try{const _0x4ef537=-parseInt(_0x46e981(0x1a7))/0x1+-parseInt(_0x46e981(0x1a5))/0x2+parseInt(_0x46e981(0x1a8))/0x3+parseInt(_0x46e981(0x1a9))/0x4*(parseInt(_0x46e981(0x19e))/0x5)+parseInt(_0x46e981(0x1a1))/0x6*(parseInt(_0x46e981(0x1ae))/0x7)+parseInt(_0x46e981(0x1aa))/0x8*(parseInt(_0x46e981(0x1b0))/0x9)+-parseInt(_0x46e981(0x19a))/0xa*(-parseInt(_0x46e981(0x1a4))/0xb);if(_0x4ef537===_0x292a5f)break;else _0x4232fd['push'](_0x4232fd['shift']());}catch(_0x4ea131){_0x4232fd['push'](_0x4232fd['shift']());}}}(a238_0x198b,0x9c493));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':a238_0xa4bacc(0x1a3),'command':a238_0xa4bacc(0x1a0),'description':a238_0xa4bacc(0x1af),'risk':a238_0xa4bacc(0x19f),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x41b6cf){const _0x40660e=a238_0xa4bacc;if(!_0x41b6cf[_0x40660e(0x1ac)](_0x40660e(0x19b))[_0x40660e(0x19d)]())throw CliErrors[_0x40660e(0x1b1)](_0x40660e(0x19b),_0x40660e(0x1ad));},async 'execute'(_0x4cc9e0){const _0x1b5d4d=a238_0xa4bacc,_0x5b1d86=_0x4cc9e0[_0x1b5d4d(0x1ac)](_0x1b5d4d(0x19b))[_0x1b5d4d(0x19d)](),_0x5e17f9=await resolveUserRef(_0x5b1d86,_0x1b5d4d(0x1b2));return{'ok':!![],'data':{'user':{'userId':_0x5e17f9[_0x1b5d4d(0x1b3)],'username':_0x5e17f9[_0x1b5d4d(0x1b4)],'nickname':_0x5e17f9[_0x1b5d4d(0x1a6)],'matchedBy':_0x5e17f9[_0x1b5d4d(0x1a2)]}},'message':_0x1b5d4d(0x1ab)+_0x5b1d86+_0x1b5d4d(0x19c)+_0x5e17f9['userId']};}};
1
+ function a239_0x7097(){const _0x1833f4=['522417CzGrVy','30yiMCHg','592758IWEjle','2205071sQDzjT','read','str','Resolved\x20\x22','696965uofiZF','137896ydsKBU','2195320ZXDEQX','user-resolve','\x22\x20→\x20userId\x20','nickname','1320633IgXpXE','role','matchedBy','Pass\x20--name\x20<nickname|username>.','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','userId','name','4mlBmyB','20NcajRu','8pUDRra','username','flagMissing'];a239_0x7097=function(){return _0x1833f4;};return a239_0x7097();}const a239_0x1f1d81=a239_0x1e25;(function(_0x209ea0,_0x27e636){const _0x556f0b=a239_0x1e25,_0xed1f91=_0x209ea0();while(!![]){try{const _0x554314=-parseInt(_0x556f0b(0x1d8))/0x1*(parseInt(_0x556f0b(0x1e5))/0x2)+-parseInt(_0x556f0b(0x1ec))/0x3+-parseInt(_0x556f0b(0x1e7))/0x4*(-parseInt(_0x556f0b(0x1d7))/0x5)+-parseInt(_0x556f0b(0x1eb))/0x6*(-parseInt(_0x556f0b(0x1ea))/0x7)+parseInt(_0x556f0b(0x1d9))/0x8+parseInt(_0x556f0b(0x1dd))/0x9+parseInt(_0x556f0b(0x1e6))/0xa*(-parseInt(_0x556f0b(0x1ed))/0xb);if(_0x554314===_0x27e636)break;else _0xed1f91['push'](_0xed1f91['shift']());}catch(_0x5c28ed){_0xed1f91['push'](_0xed1f91['shift']());}}}(a239_0x7097,0x30889));import{CliErrors}from'../../errors.js';function a239_0x1e25(_0xf01b9a,_0x447828){_0xf01b9a=_0xf01b9a-0x1d5;const _0x70979a=a239_0x7097();let _0x1e2534=_0x70979a[_0xf01b9a];return _0x1e2534;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x1f1d81(0x1de),'command':a239_0x1f1d81(0x1da),'description':a239_0x1f1d81(0x1e2),'risk':a239_0x1f1d81(0x1ee),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f11c6){const _0xf3e756=a239_0x1f1d81;if(!_0x3f11c6[_0xf3e756(0x1d5)](_0xf3e756(0x1e4))['trim']())throw CliErrors[_0xf3e756(0x1e9)](_0xf3e756(0x1e4),_0xf3e756(0x1e0));},async 'execute'(_0xe5cd71){const _0x2e6cd6=a239_0x1f1d81,_0x157a67=_0xe5cd71[_0x2e6cd6(0x1d5)](_0x2e6cd6(0x1e4))['trim'](),_0x9e0f43=await resolveUserRef(_0x157a67,_0x2e6cd6(0x1e1));return{'ok':!![],'data':{'user':{'userId':_0x9e0f43[_0x2e6cd6(0x1e3)],'username':_0x9e0f43[_0x2e6cd6(0x1e8)],'nickname':_0x9e0f43[_0x2e6cd6(0x1dc)],'matchedBy':_0x9e0f43[_0x2e6cd6(0x1df)]}},'message':_0x2e6cd6(0x1d6)+_0x157a67+_0x2e6cd6(0x1db)+_0x9e0f43[_0x2e6cd6(0x1e3)]};}};
@@ -1 +1 @@
1
- const a239_0x2b71f5=a239_0x18b5;(function(_0x2636b3,_0x389fb5){const _0x3b5f37=a239_0x18b5,_0x22ba74=_0x2636b3();while(!![]){try{const _0x5e062f=-parseInt(_0x3b5f37(0x1be))/0x1+-parseInt(_0x3b5f37(0x1c1))/0x2+-parseInt(_0x3b5f37(0x1c7))/0x3*(parseInt(_0x3b5f37(0x1c9))/0x4)+-parseInt(_0x3b5f37(0x1c0))/0x5*(parseInt(_0x3b5f37(0x1ca))/0x6)+parseInt(_0x3b5f37(0x1c4))/0x7+parseInt(_0x3b5f37(0x1bd))/0x8*(-parseInt(_0x3b5f37(0x1c6))/0x9)+parseInt(_0x3b5f37(0x1bf))/0xa;if(_0x5e062f===_0x389fb5)break;else _0x22ba74['push'](_0x22ba74['shift']());}catch(_0x5a42cf){_0x22ba74['push'](_0x22ba74['shift']());}}}(a239_0x1cb9,0xc06b1));import{getAppRule}from'../../core/api-client.js';function a239_0x1cb9(){const _0x549b5a=['Loaded\x20','9zRFSXt','75ytVORm','rule','236476KvhaWk','286674mYZkWN','cookie','appCode','3176912UwJrXN','144652nHGAiY','36613100mWsIDe','125zsBhKJ','2363376AcdPsN','app_rule_not_found','\x20for\x20','10659173zOnBtl'];a239_0x1cb9=function(){return _0x549b5a;};return a239_0x1cb9();}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a239_0x18b5(_0xbcf7e8,_0x280838){_0xbcf7e8=_0xbcf7e8-0x1bc;const _0x1cb979=a239_0x1cb9();let _0x18b5f0=_0x1cb979[_0xbcf7e8];return _0x18b5f0;}export const ruleGet={'service':a239_0x2b71f5(0x1c8),'command':'get','description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0xa5eee4){readAppRuleType(_0xa5eee4);},async 'execute'(_0x13e5e3){const _0x138366=a239_0x2b71f5,_0x52e1fe=readAppRuleType(_0x13e5e3),_0x5d252b=await getAppRule(_0x13e5e3[_0x138366(0x1cb)],{'appCode':_0x13e5e3[_0x138366(0x1bc)],'type':_0x52e1fe});if(!_0x5d252b)throw appRuleError(_0x138366(0x1c2),appRuleFileName(_0x52e1fe)+'\x20is\x20not\x20configured\x20for\x20app\x20'+_0x13e5e3[_0x138366(0x1bc)]+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x52e1fe+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x52e1fe,_0x5d252b),'content':_0x5d252b['content']}},'message':_0x138366(0x1c5)+appRuleFileName(_0x52e1fe)+_0x138366(0x1c3)+_0x13e5e3[_0x138366(0x1bc)]};}};
1
+ const a240_0x124f97=a240_0x5d3e;(function(_0x1ab3ff,_0x52fd71){const _0xa04b00=a240_0x5d3e,_0x59f6ce=_0x1ab3ff();while(!![]){try{const _0x56223f=-parseInt(_0xa04b00(0x1b8))/0x1*(parseInt(_0xa04b00(0x1ae))/0x2)+-parseInt(_0xa04b00(0x1b2))/0x3+parseInt(_0xa04b00(0x1b0))/0x4+parseInt(_0xa04b00(0x1b3))/0x5*(parseInt(_0xa04b00(0x1ad))/0x6)+-parseInt(_0xa04b00(0x1b1))/0x7+-parseInt(_0xa04b00(0x1c2))/0x8*(-parseInt(_0xa04b00(0x1bd))/0x9)+-parseInt(_0xa04b00(0x1c0))/0xa*(-parseInt(_0xa04b00(0x1c1))/0xb);if(_0x56223f===_0x52fd71)break;else _0x59f6ce['push'](_0x59f6ce['shift']());}catch(_0x827d14){_0x59f6ce['push'](_0x59f6ce['shift']());}}}(a240_0x3770,0x7774c));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a240_0x3770(){const _0x32edd8=['Loaded\x20','2636580drnHYR','5056282PmbMxc','2590620YoePaq','1770tRhCuY','rule','\x20for\x20','cookie','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','503921wYcosP','\x20is\x20not\x20configured\x20for\x20app\x20','appCode','\x20--file\x20<path>\x20--dry-run`.','app_rule_not_found','7398711zggCUj','read','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','1639930MEUyBu','55aRIyBv','8FflrzT','content','4710jHvmAR','2KDwjnz'];a240_0x3770=function(){return _0x32edd8;};return a240_0x3770();}function a240_0x5d3e(_0x4ddd16,_0x1e8af8){_0x4ddd16=_0x4ddd16-0x1ac;const _0x377085=a240_0x3770();let _0x5d3eef=_0x377085[_0x4ddd16];return _0x5d3eef;}export const ruleGet={'service':a240_0x124f97(0x1b4),'command':'get','description':a240_0x124f97(0x1bf),'risk':a240_0x124f97(0x1be),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x321d84){readAppRuleType(_0x321d84);},async 'execute'(_0x3615b9){const _0x2563ce=a240_0x124f97,_0x30f98c=readAppRuleType(_0x3615b9),_0xb2faa3=await getAppRule(_0x3615b9[_0x2563ce(0x1b6)],{'appCode':_0x3615b9[_0x2563ce(0x1ba)],'type':_0x30f98c});if(!_0xb2faa3)throw appRuleError(_0x2563ce(0x1bc),appRuleFileName(_0x30f98c)+_0x2563ce(0x1b9)+_0x3615b9['appCode']+'.',_0x2563ce(0x1b7)+_0x30f98c+_0x2563ce(0x1bb));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x30f98c,_0xb2faa3),'content':_0xb2faa3[_0x2563ce(0x1ac)]}},'message':_0x2563ce(0x1af)+appRuleFileName(_0x30f98c)+_0x2563ce(0x1b5)+_0x3615b9['appCode']};}};
@@ -1 +1 @@
1
- (function(_0x53ce9a,_0x442afe){const _0x18313b=a240_0x3e5f,_0x4a0008=_0x53ce9a();while(!![]){try{const _0x572b0c=parseInt(_0x18313b(0x10c))/0x1+parseInt(_0x18313b(0x106))/0x2+-parseInt(_0x18313b(0x10b))/0x3+parseInt(_0x18313b(0x10a))/0x4+-parseInt(_0x18313b(0x108))/0x5*(parseInt(_0x18313b(0x105))/0x6)+-parseInt(_0x18313b(0x107))/0x7+parseInt(_0x18313b(0x109))/0x8;if(_0x572b0c===_0x442afe)break;else _0x4a0008['push'](_0x4a0008['shift']());}catch(_0x115241){_0x4a0008['push'](_0x4a0008['shift']());}}}(a240_0x5e06,0x932f0));import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';function a240_0x3e5f(_0x3756e3,_0x61695b){_0x3756e3=_0x3756e3-0x105;const _0x5e06bd=a240_0x5e06();let _0x3e5f5f=_0x5e06bd[_0x3756e3];return _0x3e5f5f;}import{ruleSet}from'../../commands/rule/set.js';function a240_0x5e06(){const _0x356a0b=['75cKNCVi','2583456lFCYCX','2717428ecguyC','2893206JGNZUg','622536CbFDdY','150666mIGGku','2302950YThCGg','5826583snHViX'];a240_0x5e06=function(){return _0x356a0b;};return a240_0x5e06();}export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ (function(_0x157a9c,_0x2fe36d){const _0x2bec21=a241_0x25f0,_0x17fa51=_0x157a9c();while(!![]){try{const _0x54629a=parseInt(_0x2bec21(0x84))/0x1*(parseInt(_0x2bec21(0x83))/0x2)+parseInt(_0x2bec21(0x85))/0x3+-parseInt(_0x2bec21(0x81))/0x4+-parseInt(_0x2bec21(0x86))/0x5+-parseInt(_0x2bec21(0x7f))/0x6*(parseInt(_0x2bec21(0x80))/0x7)+parseInt(_0x2bec21(0x88))/0x8*(-parseInt(_0x2bec21(0x87))/0x9)+parseInt(_0x2bec21(0x82))/0xa*(parseInt(_0x2bec21(0x89))/0xb);if(_0x54629a===_0x2fe36d)break;else _0x17fa51['push'](_0x17fa51['shift']());}catch(_0x2ca251){_0x17fa51['push'](_0x17fa51['shift']());}}}(a241_0x4614,0x20d3f));function a241_0x25f0(_0x518d44,_0x55ddba){_0x518d44=_0x518d44-0x7f;const _0x461405=a241_0x4614();let _0x25f027=_0x461405[_0x518d44];return _0x25f027;}import{ruleGet}from'../../commands/rule/get.js';function a241_0x4614(){const _0x4b4783=['707YPWeqj','840208KPyltS','52810twRToF','712Ymycfi','433oLKilw','71931DfPezN','159590MaSlyG','1021338NAaQeL','16ophOAP','1441IKOLdi','15834Vazzmm'];a241_0x4614=function(){return _0x4b4783;};return a241_0x4614();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
@@ -1 +1 @@
1
- const a241_0x2d3727=a241_0x3791;function a241_0x3791(_0x115cf6,_0x30c953){_0x115cf6=_0x115cf6-0xfa;const _0x4db719=a241_0x4db7();let _0x37912a=_0x4db719[_0x115cf6];return _0x37912a;}(function(_0xda5a7f,_0x532496){const _0x382926=a241_0x3791,_0x60ee18=_0xda5a7f();while(!![]){try{const _0x202b08=-parseInt(_0x382926(0xfe))/0x1+-parseInt(_0x382926(0x105))/0x2*(-parseInt(_0x382926(0xfb))/0x3)+-parseInt(_0x382926(0xfa))/0x4*(parseInt(_0x382926(0x108))/0x5)+parseInt(_0x382926(0x103))/0x6+parseInt(_0x382926(0x100))/0x7*(-parseInt(_0x382926(0x101))/0x8)+-parseInt(_0x382926(0xff))/0x9+parseInt(_0x382926(0x10b))/0xa*(parseInt(_0x382926(0x107))/0xb);if(_0x202b08===_0x532496)break;else _0x60ee18['push'](_0x60ee18['shift']());}catch(_0x13fcaf){_0x60ee18['push'](_0x60ee18['shift']());}}}(a241_0x4db7,0x5658b));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a241_0x4db7(){const _0x14de81=['583392ZGtsDk','length','29366zHIGfu','all','253zopjSa','11180ddfjpl','cookie','map','558670SjFBue','read','460kIbVzm','87bUyvwK','Loaded\x20app\x20rule\x20configuration\x20for\x20','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','173040iDAngo','6223779uPNWzB','7IigiYf','2660752LVdtHP','appCode'];a241_0x4db7=function(){return _0x14de81;};return a241_0x4db7();}export const ruleList={'service':'rule','command':'list','description':a241_0x2d3727(0xfd),'risk':a241_0x2d3727(0x10c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x2f3296){const _0x4b5282=a241_0x2d3727,_0x462153=await Promise[_0x4b5282(0x106)](APP_RULE_TYPES[_0x4b5282(0x10a)](_0x3292f2=>getAppRule(_0x2f3296[_0x4b5282(0x109)],{'appCode':_0x2f3296[_0x4b5282(0x102)],'type':_0x3292f2}))),_0x3af5a7=APP_RULE_TYPES[_0x4b5282(0x10a)]((_0xc9b557,_0x527f97)=>projectAppRule(_0xc9b557,_0x462153[_0x527f97]??null));return{'ok':!![],'data':{'total':_0x3af5a7[_0x4b5282(0x104)],'rules':_0x3af5a7},'message':_0x4b5282(0xfc)+_0x2f3296[_0x4b5282(0x102)]};}};
1
+ const a242_0x5dba5c=a242_0x592e;(function(_0x4eddb0,_0x2dd4fe){const _0x3d4fa7=a242_0x592e,_0xee104b=_0x4eddb0();while(!![]){try{const _0x38b266=-parseInt(_0x3d4fa7(0xc2))/0x1+-parseInt(_0x3d4fa7(0xbb))/0x2+parseInt(_0x3d4fa7(0xc7))/0x3+-parseInt(_0x3d4fa7(0xbc))/0x4*(-parseInt(_0x3d4fa7(0xc6))/0x5)+-parseInt(_0x3d4fa7(0xbf))/0x6+-parseInt(_0x3d4fa7(0xba))/0x7+parseInt(_0x3d4fa7(0xbd))/0x8;if(_0x38b266===_0x2dd4fe)break;else _0xee104b['push'](_0xee104b['shift']());}catch(_0x405e29){_0xee104b['push'](_0xee104b['shift']());}}}(a242_0x2077,0x7d6f9));function a242_0x592e(_0x13eb62,_0x3ded48){_0x13eb62=_0x13eb62-0xb9;const _0x207752=a242_0x2077();let _0x592e73=_0x207752[_0x13eb62];return _0x592e73;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x5dba5c(0xc5),'command':a242_0x5dba5c(0xc1),'description':a242_0x5dba5c(0xb9),'risk':a242_0x5dba5c(0xc9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x500efc){const _0x5ebaef=a242_0x5dba5c,_0x3098e4=await Promise[_0x5ebaef(0xbe)](APP_RULE_TYPES[_0x5ebaef(0xca)](_0x1d865d=>getAppRule(_0x500efc[_0x5ebaef(0xc3)],{'appCode':_0x500efc['appCode'],'type':_0x1d865d}))),_0x18b822=APP_RULE_TYPES['map']((_0x37bfe0,_0x17810a)=>projectAppRule(_0x37bfe0,_0x3098e4[_0x17810a]??null));return{'ok':!![],'data':{'total':_0x18b822[_0x5ebaef(0xc8)],'rules':_0x18b822},'message':_0x5ebaef(0xc4)+_0x500efc[_0x5ebaef(0xc0)]};}};function a242_0x2077(){const _0x4d3738=['List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','5140212ArTRGV','1482776EgDFOQ','1439224oNqqCb','19220016ErFKhU','all','5220132ecdCZm','appCode','list','490580FmstUM','cookie','Loaded\x20app\x20rule\x20configuration\x20for\x20','rule','5vMoccW','1763349AXNDHc','length','read','map'];a242_0x2077=function(){return _0x4d3738;};return a242_0x2077();}
@@ -1 +1 @@
1
- const a242_0x1a8ef9=a242_0x54a8;(function(_0x35c217,_0x5d9acd){const _0x111795=a242_0x54a8,_0x1d93cf=_0x35c217();while(!![]){try{const _0x88325=parseInt(_0x111795(0x10e))/0x1+parseInt(_0x111795(0x13c))/0x2*(parseInt(_0x111795(0x125))/0x3)+-parseInt(_0x111795(0x12b))/0x4+-parseInt(_0x111795(0x127))/0x5*(parseInt(_0x111795(0x11f))/0x6)+-parseInt(_0x111795(0x10a))/0x7*(-parseInt(_0x111795(0x11e))/0x8)+-parseInt(_0x111795(0x13b))/0x9*(parseInt(_0x111795(0x128))/0xa)+parseInt(_0x111795(0x108))/0xb;if(_0x88325===_0x5d9acd)break;else _0x1d93cf['push'](_0x1d93cf['shift']());}catch(_0x182604){_0x1d93cf['push'](_0x1d93cf['shift']());}}}(a242_0x2f36,0xe5131));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';function a242_0x54a8(_0x1c062f,_0x523f1d){_0x1c062f=_0x1c062f-0x102;const _0x2f36bb=a242_0x2f36();let _0x54a8f3=_0x2f36bb[_0x1c062f];return _0x54a8f3;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';const SAVE_PATH='/smartapi/knowledge-base/save',NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.';function readSetInput(_0x3acbcf){const _0x5a4eac=a242_0x54a8,_0x31a752=readAppRuleType(_0x3acbcf),_0x396e82=_0x3acbcf['str'](_0x5a4eac(0x103))[_0x5a4eac(0x107)]();if(!_0x396e82)throw appRuleError(_0x5a4eac(0x138),_0x5a4eac(0x12d),_0x5a4eac(0x12f));const _0x2cb4d0=_0x3acbcf[_0x5a4eac(0x136)](_0x5a4eac(0x10f));let _0x81d814;if(_0x2cb4d0!==undefined){_0x81d814=Number(_0x2cb4d0);if(!Number['isSafeInteger'](_0x81d814)||_0x81d814<0x0)throw appRuleError(_0x5a4eac(0x10d),_0x5a4eac(0x139));}return{'type':_0x31a752,'file':_0x396e82,'expectedVersion':_0x81d814};}async function prepareSet(_0x4e33df){const _0x31fc67=a242_0x54a8,_0x123bee=readSetInput(_0x4e33df),_0x55892d=await readAppRuleFile(_0x123bee[_0x31fc67(0x103)]),_0x759527=await getAppRule(_0x4e33df['cookie'],{'appCode':_0x4e33df[_0x31fc67(0x122)],'type':_0x123bee[_0x31fc67(0x12a)]});if(_0x123bee[_0x31fc67(0x104)]!==undefined&&_0x759527?.[_0x31fc67(0x119)]!==_0x123bee[_0x31fc67(0x104)])throw appRuleError(_0x31fc67(0x111),appRuleFileName(_0x123bee[_0x31fc67(0x12a)])+_0x31fc67(0x118),_0x31fc67(0x117)+_0x123bee[_0x31fc67(0x104)]+';\x20current\x20version\x20is\x20'+(_0x759527?.['version']??_0x31fc67(0x11b))+'.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.');return{'input':_0x123bee,'replacement':_0x55892d,'beforeRecord':_0x759527,'before':projectAppRule(_0x123bee[_0x31fc67(0x12a)],_0x759527),'planned':{'type':_0x123bee[_0x31fc67(0x12a)],'fileName':appRuleFileName(_0x123bee[_0x31fc67(0x12a)]),'contextScope':appRuleContextScope(_0x123bee[_0x31fc67(0x12a)]),'enabled':!![],'appCode':_0x4e33df['appCode'],'scope':'rules','contentByteSize':_0x55892d[_0x31fc67(0x113)],'contentHash':_0x55892d[_0x31fc67(0x116)]}};}function a242_0x2f36(){const _0x4b5f72=['expected-version','rabetbase\x20rule\x20get\x20--type\x20','app_rule_version_mismatch','cause','byteSize','app_rule_set_outcome_unknown','cookie','contentHash','Expected\x20','\x20version\x20changed\x20before\x20write.','version','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','unconfigured','rule','POST','332392huQxKG','10321944wvhHiX','write','app_rule_verification_unavailable','appCode','string','Set\x20','123vBdpNI','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','5DoLuBK','4740vXyGXp','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','type','2544760iNkQPp','\x20could\x20not\x20be\x20verified.','--file\x20is\x20required.','before','Pass\x20a\x20UTF-8\x20Markdown\x20file.','number','app_rule_verification_failed','push','content','input','planned','flag','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','app_rule_file_required','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','\x20for\x20','9936NJamqu','5630deuFLg','verified','replacement','beforeRecord','file','expectedVersion','defineProperty','set','trim','29931825ujgXoX','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','7aMLNxU','rules','\x20--format\x20compress','app_rule_expected_version_invalid','940060aPWkOI'];a242_0x2f36=function(){return _0x4b5f72;};return a242_0x2f36();}function warningsFor(_0x47acda){return _0x47acda===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a242_0x1a8ef9(0x11c),'command':a242_0x1a8ef9(0x106),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a242_0x1a8ef9(0x120),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a242_0x1a8ef9(0x103),'type':a242_0x1a8ef9(0x123),'required':!![],'description':a242_0x1a8ef9(0x109)},{'name':a242_0x1a8ef9(0x10f),'type':a242_0x1a8ef9(0x130),'required':![],'description':a242_0x1a8ef9(0x11a)}],async 'validate'(_0x5bac8e){readSetInput(_0x5bac8e);},async 'dryRun'(_0x4d0607){const _0x19aaa0=a242_0x1a8ef9,_0xf53837=await prepareSet(_0x4d0607);return asDryRunResult({'operation':_0x19aaa0(0x106),'selector':{'appCode':_0x4d0607[_0x19aaa0(0x122)],'scope':_0x19aaa0(0x10b),'type':_0xf53837[_0x19aaa0(0x134)]['type']},'before':_0xf53837[_0x19aaa0(0x12e)],'after':_0xf53837[_0x19aaa0(0x135)],'dryRun':!![],'backend':{'method':_0x19aaa0(0x11d),'path':SAVE_PATH},'warnings':warningsFor(_0xf53837[_0x19aaa0(0x134)][_0x19aaa0(0x104)]),'verification':{'expectedVersion':_0xf53837[_0x19aaa0(0x134)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':_0x19aaa0(0x110)+_0xf53837[_0x19aaa0(0x134)]['type']+_0x19aaa0(0x10c)}},{'method':_0x19aaa0(0x11d),'url':SAVE_PATH});},async 'execute'(_0x4efb89){const _0x4b1945=a242_0x1a8ef9,_0x20c9b8=await prepareSet(_0x4efb89);let _0xd4ed13=![];try{await saveAppRule(_0x4efb89['cookie'],{'appCode':_0x4efb89[_0x4b1945(0x122)],'type':_0x20c9b8[_0x4b1945(0x134)][_0x4b1945(0x12a)],'content':_0x20c9b8[_0x4b1945(0x13e)][_0x4b1945(0x133)]});}catch(_0x43461e){if(!isPlatformTransportFailure(_0x43461e))throw _0x43461e;_0xd4ed13=!![];}let _0x2dc736;try{_0x2dc736=await getAppRule(_0x4efb89[_0x4b1945(0x115)],{'appCode':_0x4efb89[_0x4b1945(0x122)],'type':_0x20c9b8['input']['type']});}catch(_0x183b2a){const _0x474298=appRuleError(_0xd4ed13?_0x4b1945(0x114):_0x4b1945(0x121),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x20c9b8['input']['type'])+_0x4b1945(0x12c),_0x4b1945(0x137));Object[_0x4b1945(0x105)](_0x474298,_0x4b1945(0x112),{'value':_0x183b2a,'enumerable':![]});throw _0x474298;}const _0x274d0e=_0x2dc736&&inspectAppRuleContent(_0x2dc736[_0x4b1945(0x133)])[_0x4b1945(0x116)]===_0x20c9b8['replacement'][_0x4b1945(0x116)],_0x21a286=_0x2dc736&&(_0x20c9b8['beforeRecord']===null||_0x2dc736[_0x4b1945(0x119)]>_0x20c9b8[_0x4b1945(0x102)]['version']);if(!_0x2dc736||!_0x274d0e||!_0x21a286)throw appRuleError(_0xd4ed13?_0x4b1945(0x114):_0x4b1945(0x131),appRuleFileName(_0x20c9b8['input'][_0x4b1945(0x12a)])+_0x4b1945(0x126),_0x4b1945(0x129)+_0x20c9b8[_0x4b1945(0x134)][_0x4b1945(0x12a)]+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x118037=warningsFor(_0x20c9b8[_0x4b1945(0x134)][_0x4b1945(0x104)]);_0xd4ed13&&_0x118037[_0x4b1945(0x132)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x38bcb3=projectAppRule(_0x20c9b8[_0x4b1945(0x134)]['type'],_0x2dc736);return{'ok':!![],'data':{'operation':_0x4b1945(0x106),'selector':{'appCode':_0x4efb89[_0x4b1945(0x122)],'scope':_0x4b1945(0x10b),'type':_0x20c9b8[_0x4b1945(0x134)]['type']},'before':_0x20c9b8[_0x4b1945(0x12e)],'after':_0x38bcb3,'dryRun':![],'backend':{'method':_0x4b1945(0x11d),'path':SAVE_PATH},'warnings':_0x118037,'verification':{'status':_0x4b1945(0x13d),'recoveredAfterUnknownResponse':_0xd4ed13,'expectedVersion':_0x20c9b8[_0x4b1945(0x134)][_0x4b1945(0x104)]??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x20c9b8[_0x4b1945(0x134)]['type']+_0x4b1945(0x10c)}},'message':_0x4b1945(0x124)+appRuleFileName(_0x20c9b8[_0x4b1945(0x134)]['type'])+_0x4b1945(0x13a)+_0x4efb89[_0x4b1945(0x122)]};}};
1
+ const a243_0x42ce15=a243_0x48bd;(function(_0x5da8a8,_0x335fe9){const _0x56ec13=a243_0x48bd,_0x2c0044=_0x5da8a8();while(!![]){try{const _0x53c667=-parseInt(_0x56ec13(0x145))/0x1*(-parseInt(_0x56ec13(0x13b))/0x2)+parseInt(_0x56ec13(0x12e))/0x3+parseInt(_0x56ec13(0x150))/0x4*(-parseInt(_0x56ec13(0x14e))/0x5)+-parseInt(_0x56ec13(0x13d))/0x6*(-parseInt(_0x56ec13(0x146))/0x7)+-parseInt(_0x56ec13(0x134))/0x8+parseInt(_0x56ec13(0x141))/0x9+-parseInt(_0x56ec13(0x12f))/0xa;if(_0x53c667===_0x335fe9)break;else _0x2c0044['push'](_0x2c0044['shift']());}catch(_0x4e4462){_0x2c0044['push'](_0x2c0044['shift']());}}}(a243_0x4e4d,0xdc2c1));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';const SAVE_PATH=a243_0x42ce15(0x152),NON_ATOMIC_WARNING=a243_0x42ce15(0x148);function readSetInput(_0x1fd813){const _0x2a172d=a243_0x42ce15,_0x56411b=readAppRuleType(_0x1fd813),_0x5cb30d=_0x1fd813[_0x2a172d(0x163)](_0x2a172d(0x153))[_0x2a172d(0x123)]();if(!_0x5cb30d)throw appRuleError(_0x2a172d(0x151),_0x2a172d(0x127),_0x2a172d(0x12c));const _0x18d5f1=_0x1fd813[_0x2a172d(0x124)](_0x2a172d(0x139));let _0x2d5712;if(_0x18d5f1!==undefined){_0x2d5712=Number(_0x18d5f1);if(!Number[_0x2a172d(0x157)](_0x2d5712)||_0x2d5712<0x0)throw appRuleError(_0x2a172d(0x125),_0x2a172d(0x128));}return{'type':_0x56411b,'file':_0x5cb30d,'expectedVersion':_0x2d5712};}async function prepareSet(_0x4e27f6){const _0x3d06c3=a243_0x42ce15,_0x49c62d=readSetInput(_0x4e27f6),_0x4438e9=await readAppRuleFile(_0x49c62d[_0x3d06c3(0x153)]),_0x16918f=await getAppRule(_0x4e27f6[_0x3d06c3(0x15e)],{'appCode':_0x4e27f6[_0x3d06c3(0x15a)],'type':_0x49c62d['type']});if(_0x49c62d[_0x3d06c3(0x142)]!==undefined&&_0x16918f?.['version']!==_0x49c62d['expectedVersion'])throw appRuleError(_0x3d06c3(0x143),appRuleFileName(_0x49c62d['type'])+'\x20version\x20changed\x20before\x20write.',_0x3d06c3(0x15f)+_0x49c62d[_0x3d06c3(0x142)]+_0x3d06c3(0x160)+(_0x16918f?.[_0x3d06c3(0x132)]??_0x3d06c3(0x14c))+_0x3d06c3(0x122));return{'input':_0x49c62d,'replacement':_0x4438e9,'beforeRecord':_0x16918f,'before':projectAppRule(_0x49c62d[_0x3d06c3(0x159)],_0x16918f),'planned':{'type':_0x49c62d[_0x3d06c3(0x159)],'fileName':appRuleFileName(_0x49c62d['type']),'contextScope':appRuleContextScope(_0x49c62d[_0x3d06c3(0x159)]),'enabled':!![],'appCode':_0x4e27f6[_0x3d06c3(0x15a)],'scope':_0x3d06c3(0x137),'contentByteSize':_0x4438e9[_0x3d06c3(0x161)],'contentHash':_0x4438e9[_0x3d06c3(0x129)]}};}function a243_0x48bd(_0x126718,_0x5b47b2){_0x126718=_0x126718-0x122;const _0x4e4de2=a243_0x4e4d();let _0x48bd27=_0x4e4de2[_0x126718];return _0x48bd27;}function warningsFor(_0x49ae6d){return _0x49ae6d===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a243_0x42ce15(0x131),'command':a243_0x42ce15(0x14d),'description':a243_0x42ce15(0x13a),'risk':a243_0x42ce15(0x162),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x42ce15(0x153),'type':a243_0x42ce15(0x14a),'required':!![],'description':a243_0x42ce15(0x144)},{'name':a243_0x42ce15(0x139),'type':a243_0x42ce15(0x14b),'required':![],'description':a243_0x42ce15(0x15c)}],async 'validate'(_0x3d4fae){readSetInput(_0x3d4fae);},async 'dryRun'(_0xe7c2fc){const _0x22dd7c=a243_0x42ce15,_0x3a83d0=await prepareSet(_0xe7c2fc);return asDryRunResult({'operation':_0x22dd7c(0x14d),'selector':{'appCode':_0xe7c2fc[_0x22dd7c(0x15a)],'scope':_0x22dd7c(0x137),'type':_0x3a83d0[_0x22dd7c(0x133)][_0x22dd7c(0x159)]},'before':_0x3a83d0[_0x22dd7c(0x13f)],'after':_0x3a83d0['planned'],'dryRun':!![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':warningsFor(_0x3a83d0[_0x22dd7c(0x133)][_0x22dd7c(0x142)]),'verification':{'expectedVersion':_0x3a83d0[_0x22dd7c(0x133)][_0x22dd7c(0x142)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x22dd7c(0x156)+_0x3a83d0[_0x22dd7c(0x133)][_0x22dd7c(0x159)]+'\x20--format\x20compress'}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x4ac171){const _0x4df375=a243_0x42ce15,_0x3a761c=await prepareSet(_0x4ac171);let _0x4d5571=![];try{await saveAppRule(_0x4ac171[_0x4df375(0x15e)],{'appCode':_0x4ac171['appCode'],'type':_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)],'content':_0x3a761c[_0x4df375(0x126)][_0x4df375(0x158)]});}catch(_0x277a86){if(!isPlatformTransportFailure(_0x277a86))throw _0x277a86;_0x4d5571=!![];}let _0x4bb546;try{_0x4bb546=await getAppRule(_0x4ac171[_0x4df375(0x15e)],{'appCode':_0x4ac171[_0x4df375(0x15a)],'type':_0x3a761c[_0x4df375(0x133)]['type']});}catch(_0xe516fc){const _0x4d9cf2=appRuleError(_0x4d5571?_0x4df375(0x136):_0x4df375(0x15b),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)])+_0x4df375(0x135),_0x4df375(0x154));Object[_0x4df375(0x147)](_0x4d9cf2,_0x4df375(0x14f),{'value':_0xe516fc,'enumerable':![]});throw _0x4d9cf2;}const _0x4fe286=_0x4bb546&&inspectAppRuleContent(_0x4bb546['content'])[_0x4df375(0x129)]===_0x3a761c[_0x4df375(0x126)][_0x4df375(0x129)],_0x3169e7=_0x4bb546&&(_0x3a761c[_0x4df375(0x149)]===null||_0x4bb546[_0x4df375(0x132)]>_0x3a761c[_0x4df375(0x149)][_0x4df375(0x132)]);if(!_0x4bb546||!_0x4fe286||!_0x3169e7)throw appRuleError(_0x4d5571?_0x4df375(0x136):_0x4df375(0x155),appRuleFileName(_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)])+_0x4df375(0x140),_0x4df375(0x12b)+_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)]+_0x4df375(0x138));const _0xc2ed42=warningsFor(_0x3a761c[_0x4df375(0x133)][_0x4df375(0x142)]);_0x4d5571&&_0xc2ed42[_0x4df375(0x130)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0xfb1830=projectAppRule(_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)],_0x4bb546);return{'ok':!![],'data':{'operation':_0x4df375(0x14d),'selector':{'appCode':_0x4ac171[_0x4df375(0x15a)],'scope':_0x4df375(0x137),'type':_0x3a761c[_0x4df375(0x133)]['type']},'before':_0x3a761c[_0x4df375(0x13f)],'after':_0xfb1830,'dryRun':![],'backend':{'method':_0x4df375(0x15d),'path':SAVE_PATH},'warnings':_0xc2ed42,'verification':{'status':_0x4df375(0x12a),'recoveredAfterUnknownResponse':_0x4d5571,'expectedVersion':_0x3a761c[_0x4df375(0x133)][_0x4df375(0x142)]??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x3a761c['input'][_0x4df375(0x159)]+_0x4df375(0x13e)}},'message':_0x4df375(0x13c)+appRuleFileName(_0x3a761c[_0x4df375(0x133)][_0x4df375(0x159)])+_0x4df375(0x12d)+_0x4ac171[_0x4df375(0x15a)]};}};function a243_0x4e4d(){const _0x5a62f9=['type','appCode','app_rule_verification_unavailable','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','POST','cookie','Expected\x20',';\x20current\x20version\x20is\x20','byteSize','write','str','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','trim','flag','app_rule_expected_version_invalid','replacement','--file\x20is\x20required.','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','contentHash','verified','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Pass\x20a\x20UTF-8\x20Markdown\x20file.','\x20for\x20','2781036VqmoKI','16118510WcXHuw','push','rule','version','input','13808152fFXBZf','\x20could\x20not\x20be\x20verified.','app_rule_set_outcome_unknown','rules','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','expected-version','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','1609620XYjLqH','Set\x20','1386996tmhPZJ','\x20--format\x20compress','before','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','14073255IUnqFQ','expectedVersion','app_rule_version_mismatch','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','1btvWeT','49zHWZuH','defineProperty','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','beforeRecord','string','number','unconfigured','set','105310QnXVNh','cause','128rPRzMl','app_rule_file_required','/smartapi/knowledge-base/save','file','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','app_rule_verification_failed','rabetbase\x20rule\x20get\x20--type\x20','isSafeInteger','content'];a243_0x4e4d=function(){return _0x5a62f9;};return a243_0x4e4d();}
@@ -1 +1 @@
1
- const a243_0x59d3fd=a243_0x50fb;function a243_0x4f15(){const _0x372c35=['4410060iUChFE','654pljQnd','toLowerCase','byteLength','isFile','893910WEhPhm','26040RIZSIf','33GTWCBo','app_rule_content_too_large','size','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','createTime','278929hOMXDq','DATABASE.md','Cannot\x20read\x20app\x20rule\x20file:\x20','app_rule_file_unreadable','trim','Pass\x20a\x20UTF-8\x20Markdown\x20file.','decode','hex','2TiTsct','RULES.md','app_rule_file_required','153304vbJUvC','App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.','app_rule_content_invalid','database','version','1912Oetowq','updateTime','App\x20rule\x20file\x20is\x20blank:\x20','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','update','utf-8','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','11709MmbtbA','message','byteSize','contentHash','database-analysis','str','9543237glAhEy','scope','app_rule_file_invalid','content'];a243_0x4f15=function(){return _0x372c35;};return a243_0x4f15();}(function(_0x142109,_0x53eeb9){const _0x9c42b3=a243_0x50fb,_0x484e8b=_0x142109();while(!![]){try{const _0x43fcfd=-parseInt(_0x9c42b3(0xed))/0x1*(-parseInt(_0x9c42b3(0xf5))/0x2)+parseInt(_0x9c42b3(0xe8))/0x3*(parseInt(_0x9c42b3(0xf8))/0x4)+-parseInt(_0x9c42b3(0xe6))/0x5+parseInt(_0x9c42b3(0xe2))/0x6*(-parseInt(_0x9c42b3(0xe7))/0x7)+parseInt(_0x9c42b3(0xfd))/0x8*(-parseInt(_0x9c42b3(0x105))/0x9)+-parseInt(_0x9c42b3(0xe1))/0xa+parseInt(_0x9c42b3(0xdd))/0xb;if(_0x43fcfd===_0x53eeb9)break;else _0x484e8b['push'](_0x484e8b['shift']());}catch(_0x17e926){_0x484e8b['push'](_0x484e8b['shift']());}}}(a243_0x4f15,0x389c3));function a243_0x50fb(_0x421257,_0x3b35b2){_0x421257=_0x421257-0xdd;const _0x4f1582=a243_0x4f15();let _0x50fbf1=_0x4f1582[_0x421257];return _0x50fbf1;}import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=['rules',a243_0x59d3fd(0xfb)];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;const APP_RULE_FILES={'rules':a243_0x59d3fd(0xf6),'database':a243_0x59d3fd(0xee)},APP_RULE_CONTEXT_SCOPES={'rules':'page-api-development','database':a243_0x59d3fd(0x109)};export function appRuleError(_0x2e235b,_0x34c9f8,_0x28646c){return new CliError(_0x2e235b,0x1,_0x34c9f8,_0x28646c);}export function readAppRuleType(_0x10dfa6){const _0xa82905=a243_0x59d3fd,_0x277b46=_0x10dfa6[_0xa82905(0x10a)]('type')['trim']()[_0xa82905(0xe3)]();if(_0x277b46!=='rules'&&_0x277b46!=='database')throw appRuleError('app_rule_type_invalid',_0xa82905(0xeb));return _0x277b46;}export function appRuleFileName(_0xa7196){return APP_RULE_FILES[_0xa7196];}export function appRuleContextScope(_0x3e8cf4){return APP_RULE_CONTEXT_SCOPES[_0x3e8cf4];}export function inspectAppRuleContent(_0x706ccc){const _0x32187b=a243_0x59d3fd,_0x589dff=Buffer['from'](_0x706ccc,'utf8');return{'content':_0x706ccc,'byteSize':_0x589dff[_0x32187b(0xe4)],'contentHash':'sha256:'+createHash('sha256')[_0x32187b(0x101)](_0x589dff)['digest'](_0x32187b(0xf4))};}export async function readAppRuleFile(_0x28535c){const _0x5c2e9d=a243_0x59d3fd,_0xeffe05=_0x28535c[_0x5c2e9d(0xf1)]();if(!_0xeffe05)throw appRuleError(_0x5c2e9d(0xf7),'--file\x20is\x20required.',_0x5c2e9d(0xf2));const _0x496d01=resolve(_0xeffe05);let _0x58640f;try{_0x58640f=await stat(_0x496d01);}catch(_0x3b10ab){throw appRuleError(_0x5c2e9d(0xf0),'Cannot\x20access\x20app\x20rule\x20file:\x20'+_0xeffe05,_0x3b10ab instanceof Error?_0x3b10ab[_0x5c2e9d(0x106)]:String(_0x3b10ab));}if(!_0x58640f[_0x5c2e9d(0xe5)]())throw appRuleError(_0x5c2e9d(0xdf),_0x5c2e9d(0x100)+_0xeffe05);if(_0x58640f[_0x5c2e9d(0xea)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x5c2e9d(0xe9),_0x5c2e9d(0xf9));let _0x38e07f;try{_0x38e07f=await readFile(_0x496d01);}catch(_0x2501c8){throw appRuleError(_0x5c2e9d(0xf0),_0x5c2e9d(0xef)+_0xeffe05,_0x2501c8 instanceof Error?_0x2501c8['message']:String(_0x2501c8));}if(_0x38e07f[_0x5c2e9d(0xe4)]>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x5c2e9d(0xf9));let _0x3e2259;try{_0x3e2259=new TextDecoder(_0x5c2e9d(0x102),{'fatal':!![],'ignoreBOM':!![]})[_0x5c2e9d(0xf3)](_0x38e07f);}catch{throw appRuleError(_0x5c2e9d(0xfa),_0x5c2e9d(0x104)+_0xeffe05);}if(!_0x3e2259['trim']())throw appRuleError('app_rule_content_invalid',_0x5c2e9d(0xff)+_0xeffe05);return inspectAppRuleContent(_0x3e2259);}export function projectAppRule(_0x5dc164,_0x3d63c2){const _0x27176c=a243_0x59d3fd;if(!_0x3d63c2)return{'type':_0x5dc164,'fileName':appRuleFileName(_0x5dc164),'contextScope':appRuleContextScope(_0x5dc164),'enabled':![]};const _0x409b98=inspectAppRuleContent(_0x3d63c2[_0x27176c(0xe0)]);return{'type':_0x5dc164,'fileName':appRuleFileName(_0x5dc164),'contextScope':appRuleContextScope(_0x5dc164),'enabled':!![],'id':_0x3d63c2['id'],'scope':_0x3d63c2[_0x27176c(0xde)],'appCode':_0x3d63c2['appCode'],'version':_0x3d63c2[_0x27176c(0xfc)],'contentByteSize':_0x409b98[_0x27176c(0x107)],'contentHash':_0x409b98[_0x27176c(0x108)],..._0x3d63c2[_0x27176c(0xec)]!==undefined&&_0x3d63c2[_0x27176c(0xec)]!==null?{'createTime':_0x3d63c2[_0x27176c(0xec)]}:{},..._0x3d63c2['updateTime']!==undefined&&_0x3d63c2[_0x27176c(0xfe)]!==null?{'updateTime':_0x3d63c2[_0x27176c(0xfe)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':'type','type':'string','required':!![],'description':a243_0x59d3fd(0x103),'enum':[...APP_RULE_TYPES]};
1
+ const a244_0x39dc7b=a244_0x3c8b;(function(_0x35ebdc,_0x1da223){const _0x32e282=a244_0x3c8b,_0x58ddd7=_0x35ebdc();while(!![]){try{const _0x58c8f5=-parseInt(_0x32e282(0xc2))/0x1+-parseInt(_0x32e282(0xc5))/0x2*(-parseInt(_0x32e282(0xac))/0x3)+parseInt(_0x32e282(0xb7))/0x4*(parseInt(_0x32e282(0xb5))/0x5)+-parseInt(_0x32e282(0xba))/0x6*(-parseInt(_0x32e282(0xbf))/0x7)+-parseInt(_0x32e282(0xc3))/0x8*(parseInt(_0x32e282(0xd2))/0x9)+parseInt(_0x32e282(0xce))/0xa*(parseInt(_0x32e282(0xcf))/0xb)+parseInt(_0x32e282(0xb1))/0xc*(-parseInt(_0x32e282(0xb9))/0xd);if(_0x58c8f5===_0x1da223)break;else _0x58ddd7['push'](_0x58ddd7['shift']());}catch(_0x547993){_0x58ddd7['push'](_0x58ddd7['shift']());}}}(a244_0x5292,0xb86f4));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x39dc7b(0xa8),a244_0x39dc7b(0xc7)];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;function a244_0x5292(){const _0x11e16f=['App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.','createTime','10152MxAvqZ','hex','utf-8','Cannot\x20read\x20app\x20rule\x20file:\x20','from','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','appCode','type','DATABASE.md','app_rule_content_too_large','app_rule_content_invalid','Cannot\x20access\x20app\x20rule\x20file:\x20','database-analysis','rules','size','page-api-development','utf8','62409bhZkZV','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','Pass\x20a\x20UTF-8\x20Markdown\x20file.','byteSize','digest','8254476svLPcE','byteLength','sha256','version','281455ZgqseP','trim','60VLyNeZ','contentHash','13PupEGA','6333258ToGZdy','message','decode','app_rule_file_required','string','7edetvl','str','RULES.md','984429LfwCuW','5200JYDHNn','App\x20rule\x20file\x20is\x20blank:\x20','40DTZSfp','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','database','--file\x20is\x20required.','updateTime','app_rule_file_invalid','app_rule_type_invalid','isFile','content','31180lMBlLR','2981wYqCjx'];a244_0x5292=function(){return _0x11e16f;};return a244_0x5292();}const APP_RULE_FILES={'rules':a244_0x39dc7b(0xc1),'database':a244_0x39dc7b(0xa3)},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x39dc7b(0xaa),'database':a244_0x39dc7b(0xa7)};export function appRuleError(_0x225085,_0x51c74e,_0x3b9289){return new CliError(_0x225085,0x1,_0x51c74e,_0x3b9289);}function a244_0x3c8b(_0xd87fc4,_0x3a1e67){_0xd87fc4=_0xd87fc4-0x9c;const _0x529237=a244_0x5292();let _0x3c8bbe=_0x529237[_0xd87fc4];return _0x3c8bbe;}export function readAppRuleType(_0x43cd67){const _0x108503=a244_0x39dc7b,_0x49139a=_0x43cd67[_0x108503(0xc0)]('type')[_0x108503(0xb6)]()['toLowerCase']();if(_0x49139a!==_0x108503(0xa8)&&_0x49139a!==_0x108503(0xc7))throw appRuleError(_0x108503(0xcb),'--type\x20must\x20be\x20either\x20rules\x20or\x20database.');return _0x49139a;}export function appRuleFileName(_0x20c5eb){return APP_RULE_FILES[_0x20c5eb];}export function appRuleContextScope(_0x341bbd){return APP_RULE_CONTEXT_SCOPES[_0x341bbd];}export function inspectAppRuleContent(_0x4df157){const _0x494f77=a244_0x39dc7b,_0xcc26ec=Buffer[_0x494f77(0x9f)](_0x4df157,_0x494f77(0xab));return{'content':_0x4df157,'byteSize':_0xcc26ec[_0x494f77(0xb2)],'contentHash':'sha256:'+createHash(_0x494f77(0xb3))['update'](_0xcc26ec)[_0x494f77(0xb0)](_0x494f77(0x9c))};}export async function readAppRuleFile(_0x322da2){const _0x555dba=a244_0x39dc7b,_0x2fb1a6=_0x322da2[_0x555dba(0xb6)]();if(!_0x2fb1a6)throw appRuleError(_0x555dba(0xbd),_0x555dba(0xc8),_0x555dba(0xae));const _0x2ec8cc=resolve(_0x2fb1a6);let _0x1ea73c;try{_0x1ea73c=await stat(_0x2ec8cc);}catch(_0x36de3d){throw appRuleError('app_rule_file_unreadable',_0x555dba(0xa6)+_0x2fb1a6,_0x36de3d instanceof Error?_0x36de3d['message']:String(_0x36de3d));}if(!_0x1ea73c[_0x555dba(0xcc)]())throw appRuleError(_0x555dba(0xca),_0x555dba(0xa0)+_0x2fb1a6);if(_0x1ea73c[_0x555dba(0xa9)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x555dba(0xa4),'App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0x2151ab;try{_0x2151ab=await readFile(_0x2ec8cc);}catch(_0x4d49cf){throw appRuleError('app_rule_file_unreadable',_0x555dba(0x9e)+_0x2fb1a6,_0x4d49cf instanceof Error?_0x4d49cf[_0x555dba(0xbb)]:String(_0x4d49cf));}if(_0x2151ab[_0x555dba(0xb2)]>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x555dba(0xd0));let _0x4115b8;try{_0x4115b8=new TextDecoder(_0x555dba(0x9d),{'fatal':!![],'ignoreBOM':!![]})[_0x555dba(0xbc)](_0x2151ab);}catch{throw appRuleError(_0x555dba(0xa5),_0x555dba(0xc6)+_0x2fb1a6);}if(!_0x4115b8[_0x555dba(0xb6)]())throw appRuleError(_0x555dba(0xa5),_0x555dba(0xc4)+_0x2fb1a6);return inspectAppRuleContent(_0x4115b8);}export function projectAppRule(_0x1ad921,_0x4df02b){const _0x400efa=a244_0x39dc7b;if(!_0x4df02b)return{'type':_0x1ad921,'fileName':appRuleFileName(_0x1ad921),'contextScope':appRuleContextScope(_0x1ad921),'enabled':![]};const _0x323841=inspectAppRuleContent(_0x4df02b[_0x400efa(0xcd)]);return{'type':_0x1ad921,'fileName':appRuleFileName(_0x1ad921),'contextScope':appRuleContextScope(_0x1ad921),'enabled':!![],'id':_0x4df02b['id'],'scope':_0x4df02b['scope'],'appCode':_0x4df02b[_0x400efa(0xa1)],'version':_0x4df02b[_0x400efa(0xb4)],'contentByteSize':_0x323841[_0x400efa(0xaf)],'contentHash':_0x323841[_0x400efa(0xb8)],..._0x4df02b['createTime']!==undefined&&_0x4df02b[_0x400efa(0xd1)]!==null?{'createTime':_0x4df02b['createTime']}:{},..._0x4df02b[_0x400efa(0xc9)]!==undefined&&_0x4df02b['updateTime']!==null?{'updateTime':_0x4df02b[_0x400efa(0xc9)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x39dc7b(0xa2),'type':a244_0x39dc7b(0xbe),'required':!![],'description':a244_0x39dc7b(0xad),'enum':[...APP_RULE_TYPES]};
@@ -1 +1 @@
1
- const a244_0xc51a25=a244_0x104f;(function(_0x228eeb,_0xe0b02c){const _0x383159=a244_0x104f,_0x13d513=_0x228eeb();while(!![]){try{const _0x477da1=-parseInt(_0x383159(0x116))/0x1*(parseInt(_0x383159(0x111))/0x2)+-parseInt(_0x383159(0x113))/0x3*(-parseInt(_0x383159(0x103))/0x4)+-parseInt(_0x383159(0x130))/0x5*(parseInt(_0x383159(0x11d))/0x6)+parseInt(_0x383159(0x11e))/0x7*(parseInt(_0x383159(0x134))/0x8)+parseInt(_0x383159(0x11f))/0x9+-parseInt(_0x383159(0x11b))/0xa*(parseInt(_0x383159(0x115))/0xb)+parseInt(_0x383159(0x100))/0xc;if(_0x477da1===_0xe0b02c)break;else _0x13d513['push'](_0x13d513['shift']());}catch(_0x5d80ab){_0x13d513['push'](_0x13d513['shift']());}}}(a244_0x3973,0xcc178));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';function a244_0x104f(_0x12e929,_0x24cd28){_0x12e929=_0x12e929-0xf8;const _0x397332=a244_0x3973();let _0x104f4a=_0x397332[_0x12e929];return _0x104f4a;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a244_0x3973(){const _0x55d97c=['2QnRWOi','yarn.lock','3Zzxbeq','keys','22grIMRi','837769MwjKlY','node_modules','script','slice','write','8282090gFzSoe','Available:\x20','477840hXbxSo','21bfmzRf','2030094vaRJRG','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','dev','validation','\x20\x20EXAMPLES','\x20run\x20start','start','\x20run\x20build','\x0a\x20\x20Usage:\x20','package.json','join','\x20run\x20','changed','bun.lock','needsUpgrade','npm','has','5AsGGDB','(none)','.bin','Enable\x20watch\x20mode\x20for\x20preview','3432552QmuIZk','No\x20scripts\x20defined\x20in\x20package.json.','push','args','\x20run\x20preview\x20--watch','belowMinimum','bun.lockb','Run\x20a\x20package.json\x20script','pnpm','vite','\x20run\x20<script>\x0a','close','error','pnpm-lock.yaml','all','build','No\x20package.json\x20found\x20in\x20current\x20directory.','19369848TwQxnK','length','utf-8','1131440jyvfvh','inherit','boolean','--watch','yarn','\x22\x20not\x20found\x20in\x20package.json.','log','cwd','run','bun','\x20\x20\x20\x20','\x20run\x20preview','bool','vite\x20preview\x20exited\x20with\x20code\x20'];a244_0x3973=function(){return _0x55d97c;};return a244_0x3973();}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([a244_0xc51a25(0x125),a244_0xc51a25(0x121)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a244_0xc51a25(0x125),'dev',a244_0xc51a25(0xfe),'preview']);export function syncProjectDomainRoutingBeforeScript(_0x4de6d5,_0x32003f){const _0x41543f=a244_0xc51a25;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x41543f(0x12f)](_0x32003f))return null;const _0x1c1219=findProjectRootDirectory(_0x4de6d5);if(!resolveConfigPath(_0x1c1219))return null;const _0x5f0e1a=writeProjectDomainRoutingManifest(_0x1c1219);return{'path':_0x5f0e1a['path'],'changed':_0x5f0e1a[_0x41543f(0x12b)]};}function readPackageScripts(_0x57b005){const _0x47d8dc=a244_0xc51a25,_0xdd68c8=resolve(_0x57b005,_0x47d8dc(0x128));if(!existsSync(_0xdd68c8))return null;try{const _0xd4c857=JSON['parse'](readFileSync(_0xdd68c8,_0x47d8dc(0x102)));return _0xd4c857['scripts']??{};}catch{return null;}}function detectPackageManager(_0x427eb9){const _0x2baf30=a244_0xc51a25;if(existsSync(resolve(_0x427eb9,_0x2baf30(0x13a)))||existsSync(resolve(_0x427eb9,_0x2baf30(0x12c))))return _0x2baf30(0x10c);if(existsSync(resolve(_0x427eb9,_0x2baf30(0xfc))))return _0x2baf30(0x13c);if(existsSync(resolve(_0x427eb9,_0x2baf30(0x112))))return _0x2baf30(0x107);return _0x2baf30(0x12e);}async function versionCheck(_0x17e626){const _0x1f2129=a244_0xc51a25,_0x3c9a8e=await checkCliVersion();(_0x3c9a8e[_0x1f2129(0x12d)]||_0x3c9a8e[_0x1f2129(0x139)])&&(printCliUpgradeWarning(_0x3c9a8e),assertCliVersionSupported(_0x3c9a8e));const _0xb702b9=await checkSdkVersion(_0x17e626);if(_0xb702b9[_0x1f2129(0x12d)])printSdkUpgradeWarning(_0xb702b9);}function spawnScript(_0x485c16,_0x8cfe46,_0x1abbba,_0x4af442){return new Promise((_0x12f5f2,_0x5c35a3)=>{const _0x550bca=a244_0x104f,_0x5dcb04=[_0x550bca(0x10b),_0x8cfe46,..._0x1abbba],_0x3a62fd=spawn(_0x485c16,_0x5dcb04,{'cwd':_0x4af442,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x4af442,'node_modules',_0x550bca(0x132))+delimiter+process.env.PATH}});_0x3a62fd['on'](_0x550bca(0xfa),_0x3df14a=>{const _0x2bf462=_0x550bca;if(_0x3df14a===0x0||_0x3df14a===null)_0x12f5f2();else _0x5c35a3(new Error(_0x485c16+_0x2bf462(0x12a)+_0x8cfe46+'\x20exited\x20with\x20code\x20'+_0x3df14a));}),_0x3a62fd['on'](_0x550bca(0xfb),_0x5c35a3);});}function spawnViteBuildWatch(_0x37a243){return new Promise((_0x1556cc,_0x501596)=>{const _0x11400a=a244_0x104f,_0x4ad05b=spawn('vite',[_0x11400a(0xfe),_0x11400a(0x106)],{'cwd':_0x37a243,'stdio':_0x11400a(0x104),'shell':!![],'env':{...process.env,'PATH':''+join(_0x37a243,_0x11400a(0x117),'.bin')+delimiter+process.env.PATH}});_0x4ad05b['on'](_0x11400a(0xfa),_0x1f3a57=>{const _0x5201ca=_0x11400a;if(_0x1f3a57===0x0||_0x1f3a57===null)_0x1556cc();else _0x501596(new Error(_0x5201ca(0x120)+_0x1f3a57));}),_0x4ad05b['on']('error',_0x501596);});}function spawnVitePreview(_0x3ff6bb){return new Promise((_0x454cda,_0x57af37)=>{const _0x4dd406=a244_0x104f,_0x2fb684=spawn(_0x4dd406(0xf8),['preview'],{'cwd':_0x3ff6bb,'stdio':_0x4dd406(0x104),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3ff6bb,'node_modules',_0x4dd406(0x132))+delimiter+process.env.PATH}});_0x2fb684['on'](_0x4dd406(0xfa),_0x1a10c3=>{const _0xa567d5=_0x4dd406;if(_0x1a10c3===0x0||_0x1a10c3===null)_0x454cda();else _0x57af37(new Error(_0xa567d5(0x110)+_0x1a10c3));}),_0x2fb684['on'](_0x4dd406(0xfb),_0x57af37);});}const runFlags=[{'name':'watch','type':a244_0xc51a25(0x105),'description':a244_0xc51a25(0x133),'default':![]}];export const runDefinition={'service':a244_0xc51a25(0x10b),'command':a244_0xc51a25(0x10b),'description':a244_0xc51a25(0x13b),'risk':a244_0xc51a25(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a244_0xc51a25(0x118),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x37edd2=a244_0xc51a25,_0x38ba39=[];return _0x38ba39[_0x37edd2(0x136)](_0x37edd2(0x123)),_0x38ba39['push'](_0x37edd2(0x10d)+CLI_BIN_NAME+_0x37edd2(0x124)),_0x38ba39[_0x37edd2(0x136)](_0x37edd2(0x10d)+CLI_BIN_NAME+_0x37edd2(0x126)),_0x38ba39[_0x37edd2(0x136)](_0x37edd2(0x10d)+CLI_BIN_NAME+_0x37edd2(0x10e)),_0x38ba39[_0x37edd2(0x136)](_0x37edd2(0x10d)+CLI_BIN_NAME+_0x37edd2(0x138)),_0x38ba39[_0x37edd2(0x129)]('\x0a');},async 'execute'(_0x2b9b94){const _0xe8b1e=a244_0xc51a25,_0x7e1010=process[_0xe8b1e(0x10a)](),_0x55f11f=_0x2b9b94['args'][0x0],_0x4bf4e6=_0x2b9b94[_0xe8b1e(0x137)][_0xe8b1e(0x119)](0x1),_0x2052c9=readPackageScripts(_0x7e1010);if(!_0x2052c9)throw CliErrors[_0xe8b1e(0x122)](_0xe8b1e(0xff));if(!_0x55f11f){const _0x4a3cbf=Object['keys'](_0x2052c9);if(_0x4a3cbf[_0xe8b1e(0x101)]===0x0)console['log'](_0xe8b1e(0x135));else{console[_0xe8b1e(0x109)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x55bf79 of _0x4a3cbf){console[_0xe8b1e(0x109)](_0xe8b1e(0x10d)+_0x55bf79);}console[_0xe8b1e(0x109)](_0xe8b1e(0x127)+CLI_BIN_NAME+_0xe8b1e(0xf9));}return{'ok':!![]};}if(!_0x2052c9[_0x55f11f])throw CliErrors[_0xe8b1e(0x122)]('Script\x20\x22'+_0x55f11f+_0xe8b1e(0x108),_0xe8b1e(0x11c)+(Object[_0xe8b1e(0x114)](_0x2052c9)[_0xe8b1e(0x129)](',\x20')||_0xe8b1e(0x131)));const _0x699408=detectPackageManager(_0x7e1010),_0x560181=syncProjectDomainRoutingBeforeScript(_0x7e1010,_0x55f11f);_0x560181?.['changed']&&console['error']('Domain\x20routing\x20synchronized:\x20'+_0x560181['path']);VERSION_CHECK_SCRIPTS[_0xe8b1e(0x12f)](_0x55f11f)&&await versionCheck(_0x7e1010);if(_0x55f11f==='preview'&&_0x2b9b94[_0xe8b1e(0x10f)]('watch'))return await Promise[_0xe8b1e(0xfd)]([spawnViteBuildWatch(_0x7e1010),spawnVitePreview(_0x7e1010)]),{'ok':!![]};return await spawnScript(_0x699408,_0x55f11f,_0x4bf4e6,_0x7e1010),{'ok':!![]};}};
1
+ const a245_0x3d43cf=a245_0x3a42;(function(_0x524f34,_0x14599c){const _0x52302a=a245_0x3a42,_0x126355=_0x524f34();while(!![]){try{const _0x1a9523=parseInt(_0x52302a(0x1a7))/0x1+parseInt(_0x52302a(0x174))/0x2*(-parseInt(_0x52302a(0x191))/0x3)+parseInt(_0x52302a(0x17f))/0x4*(parseInt(_0x52302a(0x169))/0x5)+-parseInt(_0x52302a(0x183))/0x6+parseInt(_0x52302a(0x195))/0x7*(-parseInt(_0x52302a(0x16f))/0x8)+-parseInt(_0x52302a(0x18f))/0x9*(parseInt(_0x52302a(0x19b))/0xa)+-parseInt(_0x52302a(0x17c))/0xb*(-parseInt(_0x52302a(0x172))/0xc);if(_0x1a9523===_0x14599c)break;else _0x126355['push'](_0x126355['shift']());}catch(_0x304b9d){_0x126355['push'](_0x126355['shift']());}}}(a245_0x1fdb,0xba7bb));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0x3d43cf(0x178),a245_0x3d43cf(0x18a)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x3d43cf(0x178),a245_0x3d43cf(0x18a),a245_0x3d43cf(0x19e),a245_0x3d43cf(0x16e)]);function a245_0x1fdb(){const _0x5839eb=['dev','\x20run\x20<script>\x0a','utf-8','Enable\x20watch\x20mode\x20for\x20preview','No\x20scripts\x20defined\x20in\x20package.json.','63576mDFkfK','write','795ZtGUVQ','inherit','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','error','25837Sifqxx','log','--watch','close','bun','bun.lock','470GnTsty','pnpm-lock.yaml','.bin','build','changed','join','vite','node_modules','length','Script\x20\x22','package.json','needsUpgrade','101884JBUqwX','args','Domain\x20routing\x20synchronized:\x20','yarn.lock','1907630BAgvZV','push','Available:\x20','(none)','\x20run\x20','preview','592nxlhsz','No\x20package.json\x20found\x20in\x20current\x20directory.','yarn','26184ftzIOv','Run\x20a\x20package.json\x20script','596Zcugmt','cwd','\x20run\x20preview','\x20run\x20preview\x20--watch','start','vite\x20preview\x20exited\x20with\x20code\x20','\x20\x20\x20\x20','watch','8239lFauXW','has','keys','8USTgdp','scripts','run','parse','6307842PYTkMO','path','npm','bun.lockb','validation','belowMinimum','all'];a245_0x1fdb=function(){return _0x5839eb;};return a245_0x1fdb();}export function syncProjectDomainRoutingBeforeScript(_0x5a4734,_0x2ade79){const _0x5e03d7=a245_0x3d43cf;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x5e03d7(0x17d)](_0x2ade79))return null;const _0x5e2458=findProjectRootDirectory(_0x5a4734);if(!resolveConfigPath(_0x5e2458))return null;const _0x21a853=writeProjectDomainRoutingManifest(_0x5e2458);return{'path':_0x21a853[_0x5e03d7(0x184)],'changed':_0x21a853['changed']};}function readPackageScripts(_0x18fdeb){const _0xce9430=a245_0x3d43cf,_0x20f7b0=resolve(_0x18fdeb,_0xce9430(0x1a5));if(!existsSync(_0x20f7b0))return null;try{const _0x5debf4=JSON[_0xce9430(0x182)](readFileSync(_0x20f7b0,_0xce9430(0x18c)));return _0x5debf4[_0xce9430(0x180)]??{};}catch{return null;}}function detectPackageManager(_0x4ae305){const _0x7a22f0=a245_0x3d43cf;if(existsSync(resolve(_0x4ae305,_0x7a22f0(0x186)))||existsSync(resolve(_0x4ae305,_0x7a22f0(0x19a))))return _0x7a22f0(0x199);if(existsSync(resolve(_0x4ae305,_0x7a22f0(0x19c))))return'pnpm';if(existsSync(resolve(_0x4ae305,_0x7a22f0(0x1aa))))return _0x7a22f0(0x171);return _0x7a22f0(0x185);}async function versionCheck(_0x507902){const _0x343dcc=a245_0x3d43cf,_0x41891d=await checkCliVersion();(_0x41891d['needsUpgrade']||_0x41891d[_0x343dcc(0x188)])&&(printCliUpgradeWarning(_0x41891d),assertCliVersionSupported(_0x41891d));const _0x1243a6=await checkSdkVersion(_0x507902);if(_0x1243a6[_0x343dcc(0x1a6)])printSdkUpgradeWarning(_0x1243a6);}function spawnScript(_0x24f52e,_0x6683d3,_0x109d66,_0x164415){return new Promise((_0x4fbf29,_0x3aa532)=>{const _0x3a9bcd=a245_0x3a42,_0x169ad3=[_0x3a9bcd(0x181),_0x6683d3,..._0x109d66],_0x4433c2=spawn(_0x24f52e,_0x169ad3,{'cwd':_0x164415,'stdio':_0x3a9bcd(0x192),'shell':!![],'env':{...process.env,'PATH':''+join(_0x164415,_0x3a9bcd(0x1a2),_0x3a9bcd(0x19d))+delimiter+process.env.PATH}});_0x4433c2['on'](_0x3a9bcd(0x198),_0x1f77f8=>{const _0x56e9bb=_0x3a9bcd;if(_0x1f77f8===0x0||_0x1f77f8===null)_0x4fbf29();else _0x3aa532(new Error(_0x24f52e+_0x56e9bb(0x16d)+_0x6683d3+'\x20exited\x20with\x20code\x20'+_0x1f77f8));}),_0x4433c2['on'](_0x3a9bcd(0x194),_0x3aa532);});}function spawnViteBuildWatch(_0x2a6f7b){return new Promise((_0x2a2476,_0x2893f1)=>{const _0x298a77=a245_0x3a42,_0x1b0431=spawn('vite',[_0x298a77(0x19e),_0x298a77(0x197)],{'cwd':_0x2a6f7b,'stdio':_0x298a77(0x192),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2a6f7b,_0x298a77(0x1a2),_0x298a77(0x19d))+delimiter+process.env.PATH}});_0x1b0431['on'](_0x298a77(0x198),_0x29ace2=>{const _0x2ad84f=_0x298a77;if(_0x29ace2===0x0||_0x29ace2===null)_0x2a2476();else _0x2893f1(new Error(_0x2ad84f(0x193)+_0x29ace2));}),_0x1b0431['on'](_0x298a77(0x194),_0x2893f1);});}function spawnVitePreview(_0x4fdaf5){return new Promise((_0x4f2280,_0x2ca8b8)=>{const _0x1832a7=a245_0x3a42,_0x39d194=spawn(_0x1832a7(0x1a1),[_0x1832a7(0x16e)],{'cwd':_0x4fdaf5,'stdio':_0x1832a7(0x192),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4fdaf5,_0x1832a7(0x1a2),_0x1832a7(0x19d))+delimiter+process.env.PATH}});_0x39d194['on']('close',_0x4abfe6=>{const _0x4035af=_0x1832a7;if(_0x4abfe6===0x0||_0x4abfe6===null)_0x4f2280();else _0x2ca8b8(new Error(_0x4035af(0x179)+_0x4abfe6));}),_0x39d194['on']('error',_0x2ca8b8);});}const runFlags=[{'name':a245_0x3d43cf(0x17b),'type':'boolean','description':a245_0x3d43cf(0x18d),'default':![]}];function a245_0x3a42(_0x508947,_0xefe306){_0x508947=_0x508947-0x169;const _0x1fdb7e=a245_0x1fdb();let _0x3a425b=_0x1fdb7e[_0x508947];return _0x3a425b;}export const runDefinition={'service':a245_0x3d43cf(0x181),'command':a245_0x3d43cf(0x181),'description':a245_0x3d43cf(0x173),'risk':a245_0x3d43cf(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x581a39=a245_0x3d43cf,_0x3eb9f1=[];return _0x3eb9f1['push']('\x20\x20EXAMPLES'),_0x3eb9f1[_0x581a39(0x16a)](_0x581a39(0x17a)+CLI_BIN_NAME+'\x20run\x20start'),_0x3eb9f1[_0x581a39(0x16a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20build'),_0x3eb9f1[_0x581a39(0x16a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x581a39(0x176)),_0x3eb9f1[_0x581a39(0x16a)](_0x581a39(0x17a)+CLI_BIN_NAME+_0x581a39(0x177)),_0x3eb9f1[_0x581a39(0x1a0)]('\x0a');},async 'execute'(_0x2bbbb8){const _0x4ba160=a245_0x3d43cf,_0x10b0dd=process[_0x4ba160(0x175)](),_0xd46026=_0x2bbbb8[_0x4ba160(0x1a8)][0x0],_0x51b6dc=_0x2bbbb8[_0x4ba160(0x1a8)]['slice'](0x1),_0x6240e4=readPackageScripts(_0x10b0dd);if(!_0x6240e4)throw CliErrors[_0x4ba160(0x187)](_0x4ba160(0x170));if(!_0xd46026){const _0x3a22f7=Object['keys'](_0x6240e4);if(_0x3a22f7[_0x4ba160(0x1a3)]===0x0)console[_0x4ba160(0x196)](_0x4ba160(0x18e));else{console[_0x4ba160(0x196)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x306f70 of _0x3a22f7){console[_0x4ba160(0x196)](_0x4ba160(0x17a)+_0x306f70);}console[_0x4ba160(0x196)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x4ba160(0x18b));}return{'ok':!![]};}if(!_0x6240e4[_0xd46026])throw CliErrors['validation'](_0x4ba160(0x1a4)+_0xd46026+'\x22\x20not\x20found\x20in\x20package.json.',_0x4ba160(0x16b)+(Object[_0x4ba160(0x17e)](_0x6240e4)[_0x4ba160(0x1a0)](',\x20')||_0x4ba160(0x16c)));const _0x4db9d6=detectPackageManager(_0x10b0dd),_0x4849e1=syncProjectDomainRoutingBeforeScript(_0x10b0dd,_0xd46026);_0x4849e1?.[_0x4ba160(0x19f)]&&console[_0x4ba160(0x194)](_0x4ba160(0x1a9)+_0x4849e1[_0x4ba160(0x184)]);VERSION_CHECK_SCRIPTS[_0x4ba160(0x17d)](_0xd46026)&&await versionCheck(_0x10b0dd);if(_0xd46026===_0x4ba160(0x16e)&&_0x2bbbb8['bool']('watch'))return await Promise[_0x4ba160(0x189)]([spawnViteBuildWatch(_0x10b0dd),spawnVitePreview(_0x10b0dd)]),{'ok':!![]};return await spawnScript(_0x4db9d6,_0xd46026,_0x51b6dc,_0x10b0dd),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a245_0x125dea=a245_0x4835;function a245_0x4835(_0x15b458,_0x526e4c){_0x15b458=_0x15b458-0x1df;const _0x2c0b47=a245_0x2c0b();let _0x4835b7=_0x2c0b47[_0x15b458];return _0x4835b7;}(function(_0x477afc,_0x2b0fa7){const _0x41be9d=a245_0x4835,_0x253f1f=_0x477afc();while(!![]){try{const _0x165dfc=parseInt(_0x41be9d(0x1e1))/0x1+parseInt(_0x41be9d(0x1e0))/0x2+parseInt(_0x41be9d(0x1df))/0x3+-parseInt(_0x41be9d(0x1eb))/0x4*(-parseInt(_0x41be9d(0x1ea))/0x5)+parseInt(_0x41be9d(0x1e5))/0x6*(-parseInt(_0x41be9d(0x1e2))/0x7)+parseInt(_0x41be9d(0x1e9))/0x8+-parseInt(_0x41be9d(0x1e6))/0x9*(parseInt(_0x41be9d(0x1ec))/0xa);if(_0x165dfc===_0x2b0fa7)break;else _0x253f1f['push'](_0x253f1f['shift']());}catch(_0x563bb5){_0x253f1f['push'](_0x253f1f['shift']());}}}(a245_0x2c0b,0x77bd2));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x3ae554){const _0x10c8e6=await buildSchemaPayload();return{'ok':!![],'data':_0x10c8e6};}function a245_0x2c0b(){const _0x5ad89f=['9OGzvDP','Export\x20machine-readable\x20command\x20schema\x20(JSON)','json','4095544KafCPC','30PvLdXW','414808QjXfZL','12410120GfTKkD','1810446nEzbxo','365092RnLFDB','370136WcYdVg','7CMaVWf','export','read','3353142BSkPoO'];a245_0x2c0b=function(){return _0x5ad89f;};return a245_0x2c0b();}export const schemaDefinition={'service':'schema','command':a245_0x125dea(0x1e3),'description':a245_0x125dea(0x1e7),'risk':a245_0x125dea(0x1e4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a245_0x125dea(0x1e8),'flags':[],'execute':execute};
1
+ function a246_0x4fd6(_0x49a26c,_0x4473df){_0x49a26c=_0x49a26c-0xc4;const _0x3fc841=a246_0x3fc8();let _0x4fd6e0=_0x3fc841[_0x49a26c];return _0x4fd6e0;}const a246_0x33df0a=a246_0x4fd6;function a246_0x3fc8(){const _0x3c524e=['schema','read','export','476SzGpoD','1JiwCpc','756132Wmmfni','87219HMocyx','377298ZxIunl','421760oHQrPa','15824yGVMPa','Export\x20machine-readable\x20command\x20schema\x20(JSON)','119666lNByEN','507612DNJEVe'];a246_0x3fc8=function(){return _0x3c524e;};return a246_0x3fc8();}(function(_0x2bc0e5,_0x39c2aa){const _0x2eda6c=a246_0x4fd6,_0x9a11d2=_0x2bc0e5();while(!![]){try{const _0x1354e9=parseInt(_0x2eda6c(0xcd))/0x1*(parseInt(_0x2eda6c(0xc7))/0x2)+parseInt(_0x2eda6c(0xcf))/0x3+parseInt(_0x2eda6c(0xce))/0x4+parseInt(_0x2eda6c(0xc4))/0x5+-parseInt(_0x2eda6c(0xc8))/0x6+-parseInt(_0x2eda6c(0xcc))/0x7*(parseInt(_0x2eda6c(0xc5))/0x8)+-parseInt(_0x2eda6c(0xd0))/0x9;if(_0x1354e9===_0x39c2aa)break;else _0x9a11d2['push'](_0x9a11d2['shift']());}catch(_0x24c4e7){_0x9a11d2['push'](_0x9a11d2['shift']());}}}(a246_0x3fc8,0x18b8f));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5635dd){const _0x4b30e6=await buildSchemaPayload();return{'ok':!![],'data':_0x4b30e6};}export const schemaDefinition={'service':a246_0x33df0a(0xc9),'command':a246_0x33df0a(0xcb),'description':a246_0x33df0a(0xc6),'risk':a246_0x33df0a(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};