@lovrabet/rabetbase-cli 2.5.12 → 2.5.13

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 (380) 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.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
  375. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
  376. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  377. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  378. package/skills/rabetbase.manifest.json +3 -3
  379. package/templates/custom-pages/blank.json +1 -1
  380. package/templates/custom-pages/dashboard.json +1 -1
@@ -1 +1 @@
1
- (function(_0xab35be,_0x16dab9){const _0x4bae48=a225_0x5d52,_0x5b214=_0xab35be();while(!![]){try{const _0x3e11a7=-parseInt(_0x4bae48(0x136))/0x1*(-parseInt(_0x4bae48(0x130))/0x2)+-parseInt(_0x4bae48(0x122))/0x3*(parseInt(_0x4bae48(0x12f))/0x4)+parseInt(_0x4bae48(0x12a))/0x5*(parseInt(_0x4bae48(0x12e))/0x6)+-parseInt(_0x4bae48(0x125))/0x7+parseInt(_0x4bae48(0x129))/0x8*(parseInt(_0x4bae48(0x133))/0x9)+parseInt(_0x4bae48(0x131))/0xa*(-parseInt(_0x4bae48(0x137))/0xb)+-parseInt(_0x4bae48(0x123))/0xc*(-parseInt(_0x4bae48(0x120))/0xd);if(_0x3e11a7===_0x16dab9)break;else _0x5b214['push'](_0x5b214['shift']());}catch(_0x44aee6){_0x5b214['push'](_0x5b214['shift']());}}}(a225_0x2590,0xd6035));import a225_0x480950 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a225_0x5d52(_0x17385a,_0x368db6){_0x17385a=_0x17385a-0x120;const _0x2590c2=a225_0x2590();let _0x5d5296=_0x2590c2[_0x17385a];return _0x5d5296;}import{resolveNpmBin}from'../../../utils/platform.js';function a225_0x2590(){const _0x34c9ce=['933940betAXP','info','81fLzuRx','Code\x20format\x20failed','now','54525moVAcM','110zVHmVr','cwd','14911MqqghK','Starting\x20code\x20format','159249XSktUP','9864WAgYcu','format','5818183MaAtHP','success','--write','Code\x20format\x20completed','1254552aopXaJ','354140HAToYg','prettier','npx','error','54etUvce','88GQVBox','30EQsqTk'];a225_0x2590=function(){return _0x34c9ce;};return a225_0x2590();}export async function formatProjectCode(_0x41b08c){const _0x2e86ef=a225_0x5d52,_0x1e0c74=Date['now'](),_0x8169fb=a225_0x480950['resolve'](process[_0x2e86ef(0x138)](),_0x41b08c);try{logger[_0x2e86ef(0x132)](_0x2e86ef(0x124),_0x2e86ef(0x121),{'projectCode':_0x41b08c}),await execa(resolveNpmBin(_0x2e86ef(0x12c)),[_0x2e86ef(0x12b),_0x2e86ef(0x127),'.'],{'cwd':_0x8169fb});const _0x21d8cb=Date[_0x2e86ef(0x135)]()-_0x1e0c74;logger[_0x2e86ef(0x126)]('format',_0x2e86ef(0x128),_0x21d8cb,{'projectCode':_0x41b08c});}catch(_0x2b2cb0){const _0x1c66ae=Date[_0x2e86ef(0x135)]()-_0x1e0c74;logger[_0x2e86ef(0x12d)](_0x2e86ef(0x124),_0x2e86ef(0x134),{'projectCode':_0x41b08c,'error':_0x2b2cb0 instanceof Error?_0x2b2cb0['message']:String(_0x2b2cb0),'duration':_0x1c66ae});throw _0x2b2cb0;}return formatElapsed(_0x1e0c74);}
1
+ (function(_0x57c3c9,_0x225c11){const _0x3ec55b=a225_0x4ae7,_0x729bd8=_0x57c3c9();while(!![]){try{const _0x954326=-parseInt(_0x3ec55b(0xed))/0x1+-parseInt(_0x3ec55b(0xe0))/0x2*(parseInt(_0x3ec55b(0xde))/0x3)+parseInt(_0x3ec55b(0xf2))/0x4+-parseInt(_0x3ec55b(0xe5))/0x5*(parseInt(_0x3ec55b(0xe8))/0x6)+parseInt(_0x3ec55b(0xea))/0x7*(-parseInt(_0x3ec55b(0xdf))/0x8)+parseInt(_0x3ec55b(0xe7))/0x9*(-parseInt(_0x3ec55b(0xe1))/0xa)+-parseInt(_0x3ec55b(0xe3))/0xb*(-parseInt(_0x3ec55b(0xee))/0xc);if(_0x954326===_0x225c11)break;else _0x729bd8['push'](_0x729bd8['shift']());}catch(_0x36b459){_0x729bd8['push'](_0x729bd8['shift']());}}}(a225_0x1b44,0x29192));function a225_0x1b44(){const _0x3abcba=['success','157729rjMauC','format','5aBkxCu','now','9CVBKSG','1463124LcTCuZ','Code\x20format\x20failed','8862UcJqLm','Code\x20format\x20completed','resolve','213596VDeagS','804ZUOKRR','npx','error','Starting\x20code\x20format','1184348ZfuKFw','prettier','60327MZFssN','1376YINSKR','12THSQGt','2926060UyVLAv'];a225_0x1b44=function(){return _0x3abcba;};return a225_0x1b44();}import a225_0x3a0b22 from'node:path';function a225_0x4ae7(_0x3f2517,_0x2cde86){_0x3f2517=_0x3f2517-0xde;const _0x1b4429=a225_0x1b44();let _0x4ae75b=_0x1b4429[_0x3f2517];return _0x4ae75b;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x413a3e){const _0x40ad85=a225_0x4ae7,_0x3eee33=Date['now'](),_0x50cdf4=a225_0x3a0b22[_0x40ad85(0xec)](process['cwd'](),_0x413a3e);try{logger['info']('format',_0x40ad85(0xf1),{'projectCode':_0x413a3e}),await execa(resolveNpmBin(_0x40ad85(0xef)),[_0x40ad85(0xf3),'--write','.'],{'cwd':_0x50cdf4});const _0x2ac604=Date[_0x40ad85(0xe6)]()-_0x3eee33;logger[_0x40ad85(0xe2)](_0x40ad85(0xe4),_0x40ad85(0xeb),_0x2ac604,{'projectCode':_0x413a3e});}catch(_0x48ee2b){const _0x41deb8=Date[_0x40ad85(0xe6)]()-_0x3eee33;logger[_0x40ad85(0xf0)](_0x40ad85(0xe4),_0x40ad85(0xe9),{'projectCode':_0x413a3e,'error':_0x48ee2b instanceof Error?_0x48ee2b['message']:String(_0x48ee2b),'duration':_0x41deb8});throw _0x48ee2b;}return formatElapsed(_0x3eee33);}
@@ -1 +1 @@
1
- (function(_0x277175,_0x1fcada){const _0x2f0df9=a226_0x4df7,_0x2c264b=_0x277175();while(!![]){try{const _0x433021=parseInt(_0x2f0df9(0x1e7))/0x1*(-parseInt(_0x2f0df9(0x1d8))/0x2)+-parseInt(_0x2f0df9(0x1d3))/0x3*(-parseInt(_0x2f0df9(0x1da))/0x4)+parseInt(_0x2f0df9(0x1d9))/0x5*(-parseInt(_0x2f0df9(0x1df))/0x6)+parseInt(_0x2f0df9(0x1e4))/0x7*(parseInt(_0x2f0df9(0x1e5))/0x8)+-parseInt(_0x2f0df9(0x1d2))/0x9*(-parseInt(_0x2f0df9(0x1eb))/0xa)+parseInt(_0x2f0df9(0x1e1))/0xb*(parseInt(_0x2f0df9(0x1ea))/0xc)+parseInt(_0x2f0df9(0x1d4))/0xd*(-parseInt(_0x2f0df9(0x1d5))/0xe);if(_0x433021===_0x1fcada)break;else _0x2c264b['push'](_0x2c264b['shift']());}catch(_0x390ccd){_0x2c264b['push'](_0x2c264b['shift']());}}}(a226_0x399d,0x5250c));function a226_0x399d(){const _0x19e6c2=['resolve','message','292794bUnssK','--registry','55HkhrQa','Dependency\x20install\x20completed','install','7xbImXL','4666336fxTDrA','info','111Ejtmid','Dependency\x20install\x20failed','now','1312236KUTuMj','24660HcTLDC','1062TkXpFL','15909QoDhKn','7402889jDgVDD','14QgiBwG','success','cwd','10874GyARqi','5cBgXHE','104HdVndU','npm','error'];a226_0x399d=function(){return _0x19e6c2;};return a226_0x399d();}import a226_0x29cf9d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a226_0x4df7(_0x89e841,_0xefa392){_0x89e841=_0x89e841-0x1d2;const _0x399dff=a226_0x399d();let _0x4df7a3=_0x399dff[_0x89e841];return _0x4df7a3;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x9afee2){const _0x491b73=a226_0x4df7,_0x13d061=Date['now'](),_0x441dcb=a226_0x29cf9d[_0x491b73(0x1dd)](process[_0x491b73(0x1d7)](),_0x9afee2);try{logger[_0x491b73(0x1e6)](_0x491b73(0x1e3),'Starting\x20dependency\x20install',{'projectCode':_0x9afee2,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x491b73(0x1db)),['install',_0x491b73(0x1e0),'https://registry.npmmirror.com'],{'cwd':_0x441dcb});const _0x412a58=Date[_0x491b73(0x1e9)]()-_0x13d061;logger[_0x491b73(0x1d6)](_0x491b73(0x1e3),_0x491b73(0x1e2),_0x412a58,{'projectCode':_0x9afee2});}catch(_0x561f5e){const _0x108538=Date[_0x491b73(0x1e9)]()-_0x13d061;logger[_0x491b73(0x1dc)](_0x491b73(0x1e3),_0x491b73(0x1e8),{'projectCode':_0x9afee2,'error':_0x561f5e instanceof Error?_0x561f5e[_0x491b73(0x1de)]:String(_0x561f5e),'duration':_0x108538});throw _0x561f5e;}return formatElapsed(_0x13d061);}
1
+ (function(_0x43c5c0,_0x537d25){const _0xe691f3=a226_0x5cef,_0x3bbe96=_0x43c5c0();while(!![]){try{const _0x43840d=-parseInt(_0xe691f3(0x148))/0x1*(-parseInt(_0xe691f3(0x14b))/0x2)+parseInt(_0xe691f3(0x14f))/0x3+-parseInt(_0xe691f3(0x156))/0x4*(parseInt(_0xe691f3(0x15d))/0x5)+parseInt(_0xe691f3(0x150))/0x6*(-parseInt(_0xe691f3(0x14d))/0x7)+parseInt(_0xe691f3(0x14a))/0x8*(-parseInt(_0xe691f3(0x151))/0x9)+-parseInt(_0xe691f3(0x14e))/0xa+parseInt(_0xe691f3(0x157))/0xb*(parseInt(_0xe691f3(0x154))/0xc);if(_0x43840d===_0x537d25)break;else _0x3bbe96['push'](_0x3bbe96['shift']());}catch(_0x5e76ab){_0x3bbe96['push'](_0x3bbe96['shift']());}}}(a226_0x463a,0x3be65));import a226_0x504ca3 from'node:path';import{execa}from'execa';function a226_0x463a(){const _0xb71def=['1482pXhnhG','https://registry.npmmirror.com','263648HERZof','2671970AENwlH','1385886hJCyrv','48KIETcH','1367559lUVTfG','npm','install','3183048YJXxTR','success','36KLAIgw','11zvEnam','message','Starting\x20dependency\x20install','Dependency\x20install\x20failed','info','resolve','19765CRzDqI','Dependency\x20install\x20completed','--registry','now','370xxSAOF','error','8uMjhER'];a226_0x463a=function(){return _0xb71def;};return a226_0x463a();}function a226_0x5cef(_0x1427a6,_0x5d9f8c){_0x1427a6=_0x1427a6-0x145;const _0x463ab1=a226_0x463a();let _0x5ceffa=_0x463ab1[_0x1427a6];return _0x5ceffa;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4305e7){const _0x4d1baf=a226_0x5cef,_0x1bf0c3=Date[_0x4d1baf(0x147)](),_0x5f1ac6=a226_0x504ca3[_0x4d1baf(0x15c)](process['cwd'](),_0x4305e7);try{logger[_0x4d1baf(0x15b)](_0x4d1baf(0x153),_0x4d1baf(0x159),{'projectCode':_0x4305e7,'registry':_0x4d1baf(0x14c)}),await execa(resolveNpmBin(_0x4d1baf(0x152)),[_0x4d1baf(0x153),_0x4d1baf(0x146),'https://registry.npmmirror.com'],{'cwd':_0x5f1ac6});const _0x31269f=Date['now']()-_0x1bf0c3;logger[_0x4d1baf(0x155)](_0x4d1baf(0x153),_0x4d1baf(0x145),_0x31269f,{'projectCode':_0x4305e7});}catch(_0x328aaf){const _0x374863=Date[_0x4d1baf(0x147)]()-_0x1bf0c3;logger[_0x4d1baf(0x149)](_0x4d1baf(0x153),_0x4d1baf(0x15a),{'projectCode':_0x4305e7,'error':_0x328aaf instanceof Error?_0x328aaf[_0x4d1baf(0x158)]:String(_0x328aaf),'duration':_0x374863});throw _0x328aaf;}return formatElapsed(_0x1bf0c3);}
@@ -1 +1 @@
1
- function a227_0x4ff3(){const _0x49167f=['50VmDqJw','1155MEPCXh','Run\x20','68sfiriu','993936wyrlgm','path','8686706abARtd','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','381265GGDVdD','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','2240919CYkCXL','11868256trCROR','3996KskTqV','project','870822AhrIPw'];a227_0x4ff3=function(){return _0x49167f;};return a227_0x4ff3();}const a227_0x4ebdc2=a227_0x17ac;function a227_0x17ac(_0x1a599d,_0x1b2e7c){_0x1a599d=_0x1a599d-0x78;const _0x4ff3b3=a227_0x4ff3();let _0x17ace4=_0x4ff3b3[_0x1a599d];return _0x17ace4;}(function(_0x47deda,_0x513ba3){const _0x58b07e=a227_0x17ac,_0x442f6a=_0x47deda();while(!![]){try{const _0xdc035b=-parseInt(_0x58b07e(0x84))/0x1+parseInt(_0x58b07e(0x82))/0x2*(-parseInt(_0x58b07e(0x86))/0x3)+parseInt(_0x58b07e(0x79))/0x4*(parseInt(_0x58b07e(0x7e))/0x5)+parseInt(_0x58b07e(0x7a))/0x6+parseInt(_0x58b07e(0x7c))/0x7+-parseInt(_0x58b07e(0x81))/0x8+-parseInt(_0x58b07e(0x80))/0x9*(-parseInt(_0x58b07e(0x85))/0xa);if(_0xdc035b===_0x513ba3)break;else _0x442f6a['push'](_0x442f6a['shift']());}catch(_0xadfdd8){_0x442f6a['push'](_0x442f6a['shift']());}}}(a227_0x4ff3,0xc93de));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x4ebdc2(0x83),'command':'domain-routing-sync','description':a227_0x4ebdc2(0x7f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x1f6909=a227_0x4ebdc2,_0x1b1603=findProjectRootDirectory();if(!resolveConfigPath(_0x1b1603))throw CliErrors['validation'](_0x1f6909(0x7d),_0x1f6909(0x78)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.');const _0x4850c4=writeProjectDomainRoutingManifest(_0x1b1603);return{'ok':!![],'message':'Domain\x20routing\x20synchronized:\x20'+_0x4850c4[_0x1f6909(0x7b)],'data':_0x4850c4};}};
1
+ const a227_0x452f9f=a227_0x208e;(function(_0xf3fe55,_0x528c3e){const _0x12084c=a227_0x208e,_0x4214f9=_0xf3fe55();while(!![]){try{const _0x15e1d5=-parseInt(_0x12084c(0xba))/0x1*(-parseInt(_0x12084c(0xb9))/0x2)+parseInt(_0x12084c(0xb3))/0x3+-parseInt(_0x12084c(0xb5))/0x4*(parseInt(_0x12084c(0xab))/0x5)+-parseInt(_0x12084c(0xb8))/0x6+-parseInt(_0x12084c(0xad))/0x7*(-parseInt(_0x12084c(0xb2))/0x8)+-parseInt(_0x12084c(0xb6))/0x9+-parseInt(_0x12084c(0xb7))/0xa*(-parseInt(_0x12084c(0xb0))/0xb);if(_0x15e1d5===_0x528c3e)break;else _0x4214f9['push'](_0x4214f9['shift']());}catch(_0x5bc37a){_0x4214f9['push'](_0x4214f9['shift']());}}}(a227_0x5eeb,0xe07c6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x208e(_0x12a957,_0x489cff){_0x12a957=_0x12a957-0xaa;const _0x5eebf6=a227_0x5eeb();let _0x208e7b=_0x5eebf6[_0x12a957];return _0x208e7b;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a227_0x5eeb(){const _0xfb631a=['263512VEEkTC','33744darCuw','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','8GHmTkw','16430562GCYusM','18231940Dwuaoc','7752660vFUmEp','46106gYPjGg','47LkKozl','Run\x20','2665585vyAYPS','domain-routing-sync','77ZUykWF','Domain\x20routing\x20synchronized:\x20','path','22HGDanK','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.'];a227_0x5eeb=function(){return _0xfb631a;};return a227_0x5eeb();}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':'project','command':a227_0x452f9f(0xac),'description':a227_0x452f9f(0xb4),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x57df85=a227_0x452f9f,_0x176cc1=findProjectRootDirectory();if(!resolveConfigPath(_0x176cc1))throw CliErrors['validation']('No\x20Rabetbase\x20project\x20configuration\x20was\x20found.',_0x57df85(0xaa)+CLI_BIN_NAME+_0x57df85(0xb1));const _0x1ff3aa=writeProjectDomainRoutingManifest(_0x176cc1);return{'ok':!![],'message':_0x57df85(0xae)+_0x1ff3aa[_0x57df85(0xaf)],'data':_0x1ff3aa};}};
@@ -1 +1 @@
1
- const a228_0x476587=a228_0x279a;function a228_0x4c51(){const _0x3da4da=['trim','Run\x20','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','Skip\x20confirmation\x20prompt','appcode','Usage:\x20','write','Upgrade\x20cancelled.','460385dETRBF','392402dFViFZ','template-source','str','cookie','project','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','name','16353UThPOI','Project\x20upgrade\x20completed.','create','string','PATCH','nonInteractive','1840aBmFxs','project-name','cwd','786HRpHjw','cancelled','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','validation','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','1480140FzXCvG','12148JxxOro','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','args','Create\x20a\x20new\x20project','441twaSmr','../../commands/project/create/main.js','1039745ahMMkJ','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','current-dir','Project\x20name','yes','boolean','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','438NPKbdg','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','Prepared\x20local\x20project\x20template\x20directory','completed'];a228_0x4c51=function(){return _0x3da4da;};return a228_0x4c51();}(function(_0x3a674a,_0x354225){const _0x4e402d=a228_0x279a,_0x1995fb=_0x3a674a();while(!![]){try{const _0x4a68b2=-parseInt(_0x4e402d(0x13b))/0x1+parseInt(_0x4e402d(0x13c))/0x2+parseInt(_0x4e402d(0x12f))/0x3*(parseInt(_0x4e402d(0x121))/0x4)+-parseInt(_0x4e402d(0x127))/0x5+-parseInt(_0x4e402d(0x11a))/0x6*(-parseInt(_0x4e402d(0x125))/0x7)+-parseInt(_0x4e402d(0x117))/0x8*(-parseInt(_0x4e402d(0x111))/0x9)+-parseInt(_0x4e402d(0x120))/0xa;if(_0x4a68b2===_0x354225)break;else _0x1995fb['push'](_0x1995fb['shift']());}catch(_0x1bb6af){_0x1995fb['push'](_0x1995fb['shift']());}}}(a228_0x4c51,0x3ce4a));import{CliErrors}from'../../errors.js';function a228_0x279a(_0xcd506b,_0x209fd8){_0xcd506b=_0xcd506b-0x10b;const _0x4c517b=a228_0x4c51();let _0x279a5e=_0x4c517b[_0xcd506b];return _0x279a5e;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a228_0x476587(0x110),'type':a228_0x476587(0x114),'description':a228_0x476587(0x12b)},{'name':'env','type':a228_0x476587(0x114),'description':'Target\x20environment'},{'name':a228_0x476587(0x137),'type':a228_0x476587(0x114),'description':a228_0x476587(0x10f)},{'name':'current-dir','type':a228_0x476587(0x12d),'description':a228_0x476587(0x12e),'default':![]},{'name':'template-source','type':'string','description':a228_0x476587(0x131)}],upgradeFlags=[{'name':a228_0x476587(0x12c),'type':'boolean','description':a228_0x476587(0x136),'default':![]}];export const projectDefinitions=[{'service':a228_0x476587(0x10e),'command':a228_0x476587(0x113),'description':a228_0x476587(0x124),'risk':a228_0x476587(0x139),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x476587(0x118),'description':a228_0x476587(0x122),'required':![]}],'flags':createFlags,async 'execute'(_0x32ddb1){const _0x284ad8=a228_0x476587,{createApp:_0x260f8d}=await import(_0x284ad8(0x126)),_0x49141d=_0x32ddb1['str'](_0x284ad8(0x110))['trim']()||_0x32ddb1[_0x284ad8(0x123)][0x0]?.[_0x284ad8(0x133)](),_0x12adc8=_0x32ddb1['str']('env')||undefined,_0x48939b=_0x32ddb1[_0x284ad8(0x10c)]('appcode')||undefined,_0x2316dd=_0x32ddb1[_0x284ad8(0x10c)](_0x284ad8(0x10b))[_0x284ad8(0x133)]()||undefined,_0x489af5=_0x32ddb1['bool'](_0x284ad8(0x12a));if(_0x489af5&&_0x49141d)throw CliErrors[_0x284ad8(0x11e)](_0x284ad8(0x129),_0x284ad8(0x134)+CLI_BIN_NAME+_0x284ad8(0x11c));if(_0x32ddb1['nonInteractive']){if(!_0x49141d&&!_0x489af5)throw CliErrors[_0x284ad8(0x11e)](_0x284ad8(0x11f),_0x284ad8(0x138)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x284ad8(0x128));await _0x260f8d({'projectCode':_0x49141d,'appCode':_0x48939b,'env':_0x12adc8,'cookie':_0x32ddb1[_0x284ad8(0x10d)],'currentDir':_0x489af5,'nonInteractive':!![],'templateSource':_0x2316dd});}else await _0x260f8d({'projectCode':_0x49141d,'appCode':_0x48939b,'env':_0x12adc8,'cookie':_0x32ddb1[_0x284ad8(0x10d)],'currentDir':_0x489af5,'templateSource':_0x2316dd});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x476587(0x10e),'command':'upgrade','description':a228_0x476587(0x11d),'risk':a228_0x476587(0x139),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x882607=a228_0x476587,_0xe0d356=analyseProjectUpgrade(process['cwd']());return{'method':_0x882607(0x115),'url':process[_0x882607(0x119)](),'body':_0xe0d356,'description':_0x882607(0x135)};},async 'execute'(_0x3ded48){const _0x41c246=a228_0x476587,_0x2c155d=await upgradeApp(_0x3ded48[_0x41c246(0x116)],{'yes':_0x3ded48['bool'](_0x41c246(0x12c))});return{'ok':_0x2c155d[_0x41c246(0x132)]||_0x2c155d['cancelled']===!![],'message':_0x2c155d[_0x41c246(0x11b)]?_0x41c246(0x13a):_0x2c155d[_0x41c246(0x132)]?_0x41c246(0x112):_0x41c246(0x130),'data':_0x2c155d};}}];
1
+ function a228_0x4535(_0x2ad8f6,_0x1dc8e4){_0x2ad8f6=_0x2ad8f6-0x1ba;const _0x4a7608=a228_0x4a76();let _0x4535be=_0x4a7608[_0x2ad8f6];return _0x4535be;}const a228_0x45c857=a228_0x4535;(function(_0x21fb00,_0x2f2109){const _0x9e79d5=a228_0x4535,_0x34208b=_0x21fb00();while(!![]){try{const _0xe313d7=parseInt(_0x9e79d5(0x1ce))/0x1+-parseInt(_0x9e79d5(0x1e4))/0x2*(parseInt(_0x9e79d5(0x1de))/0x3)+parseInt(_0x9e79d5(0x1e0))/0x4+parseInt(_0x9e79d5(0x1bf))/0x5*(parseInt(_0x9e79d5(0x1da))/0x6)+-parseInt(_0x9e79d5(0x1c2))/0x7+-parseInt(_0x9e79d5(0x1d7))/0x8*(parseInt(_0x9e79d5(0x1e2))/0x9)+-parseInt(_0x9e79d5(0x1d0))/0xa;if(_0xe313d7===_0x2f2109)break;else _0x34208b['push'](_0x34208b['shift']());}catch(_0x2daa1e){_0x34208b['push'](_0x34208b['shift']());}}}(a228_0x4a76,0xd1aeb));function a228_0x4a76(){const _0x139cf2=['project','Skip\x20confirmation\x20prompt','project-name','template-source','trim','cookie','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','yes','11965qUMBPD','Target\x20environment','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','2529121desays','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','bool','Run\x20','cwd','appcode','boolean','cancelled','validation','nonInteractive','completed','name','1413220SaDiUH','write','5008660ZCaFOT','args','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','string','Create\x20a\x20new\x20project','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','384528NEZIbT','Project\x20upgrade\x20completed.','Usage:\x20','2094cLPZYu','str','create','env','101451AcjENf','Project\x20name','1066376FGaryg','Upgrade\x20cancelled.','117afFYhs','current-dir','10qzKhgx','Prepared\x20local\x20project\x20template\x20directory'];a228_0x4a76=function(){return _0x139cf2;};return a228_0x4a76();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':'name','type':a228_0x45c857(0x1d4),'description':a228_0x45c857(0x1df)},{'name':a228_0x45c857(0x1dd),'type':a228_0x45c857(0x1d4),'description':a228_0x45c857(0x1c0)},{'name':a228_0x45c857(0x1c7),'type':a228_0x45c857(0x1d4),'description':a228_0x45c857(0x1bd)},{'name':a228_0x45c857(0x1e3),'type':'boolean','description':'Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','default':![]},{'name':a228_0x45c857(0x1ba),'type':'string','description':a228_0x45c857(0x1e5)}],upgradeFlags=[{'name':a228_0x45c857(0x1be),'type':a228_0x45c857(0x1c8),'description':a228_0x45c857(0x1e7),'default':![]}];export const projectDefinitions=[{'service':a228_0x45c857(0x1e6),'command':a228_0x45c857(0x1dc),'description':a228_0x45c857(0x1d5),'risk':a228_0x45c857(0x1cf),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x45c857(0x1e8),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x10da9c){const _0x24dbde=a228_0x45c857,{createApp:_0x11c05e}=await import('../../commands/project/create/main.js'),_0x16c78a=_0x10da9c['str'](_0x24dbde(0x1cd))[_0x24dbde(0x1bb)]()||_0x10da9c[_0x24dbde(0x1d1)][0x0]?.[_0x24dbde(0x1bb)](),_0x394d81=_0x10da9c['str'](_0x24dbde(0x1dd))||undefined,_0x495896=_0x10da9c[_0x24dbde(0x1db)](_0x24dbde(0x1c7))||undefined,_0x1e052e=_0x10da9c[_0x24dbde(0x1db)]('template-source')[_0x24dbde(0x1bb)]()||undefined,_0x470cf2=_0x10da9c[_0x24dbde(0x1c4)](_0x24dbde(0x1e3));if(_0x470cf2&&_0x16c78a)throw CliErrors[_0x24dbde(0x1ca)](_0x24dbde(0x1c3),_0x24dbde(0x1c5)+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.');if(_0x10da9c[_0x24dbde(0x1cb)]){if(!_0x16c78a&&!_0x470cf2)throw CliErrors[_0x24dbde(0x1ca)](_0x24dbde(0x1c1),_0x24dbde(0x1d9)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x24dbde(0x1d2));await _0x11c05e({'projectCode':_0x16c78a,'appCode':_0x495896,'env':_0x394d81,'cookie':_0x10da9c[_0x24dbde(0x1bc)],'currentDir':_0x470cf2,'nonInteractive':!![],'templateSource':_0x1e052e});}else await _0x11c05e({'projectCode':_0x16c78a,'appCode':_0x495896,'env':_0x394d81,'cookie':_0x10da9c[_0x24dbde(0x1bc)],'currentDir':_0x470cf2,'templateSource':_0x1e052e});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x45c857(0x1e6),'command':'upgrade','description':a228_0x45c857(0x1d6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x3d8980=a228_0x45c857,_0x491a4c=analyseProjectUpgrade(process[_0x3d8980(0x1c6)]());return{'method':'PATCH','url':process[_0x3d8980(0x1c6)](),'body':_0x491a4c,'description':_0x3d8980(0x1d3)};},async 'execute'(_0x4979fa){const _0x3c44bf=a228_0x45c857,_0x417249=await upgradeApp(_0x4979fa[_0x3c44bf(0x1cb)],{'yes':_0x4979fa[_0x3c44bf(0x1c4)](_0x3c44bf(0x1be))});return{'ok':_0x417249[_0x3c44bf(0x1cc)]||_0x417249[_0x3c44bf(0x1c9)]===!![],'message':_0x417249[_0x3c44bf(0x1c9)]?_0x3c44bf(0x1e1):_0x417249[_0x3c44bf(0x1cc)]?_0x3c44bf(0x1d8):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x417249};}}];
@@ -1 +1 @@
1
- (function(_0x13a659,_0x27d2ff){const _0x1519ef=a229_0x342e,_0x2efb6f=_0x13a659();while(!![]){try{const _0x212e48=-parseInt(_0x1519ef(0x227))/0x1+-parseInt(_0x1519ef(0x208))/0x2+parseInt(_0x1519ef(0x1f4))/0x3*(parseInt(_0x1519ef(0x207))/0x4)+-parseInt(_0x1519ef(0x1ed))/0x5+-parseInt(_0x1519ef(0x235))/0x6*(-parseInt(_0x1519ef(0x1eb))/0x7)+parseInt(_0x1519ef(0x1e9))/0x8*(-parseInt(_0x1519ef(0x1ec))/0x9)+-parseInt(_0x1519ef(0x229))/0xa*(-parseInt(_0x1519ef(0x20a))/0xb);if(_0x212e48===_0x27d2ff)break;else _0x2efb6f['push'](_0x2efb6f['shift']());}catch(_0x14df38){_0x2efb6f['push'](_0x2efb6f['shift']());}}}(a229_0x5074,0x7cc18));import a229_0x1184f3 from'chalk';import a229_0x2580b5 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';function a229_0x342e(_0x2a07bb,_0xe5ca40){_0x2a07bb=_0x2a07bb-0x1e7;const _0x50748f=a229_0x5074();let _0x342e14=_0x50748f[_0x2a07bb];return _0x342e14;}import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0xd98890){const _0x138a4e=a229_0x342e;try{const _0x5098bb=JSON['parse'](readFileSync(_0xd98890,'utf8'));return _0x5098bb&&typeof _0x5098bb===_0x138a4e(0x205)?_0x5098bb:{};}catch{return{};}}export function analyseProjectUpgrade(_0x4412d6){const _0x4f9525=a229_0x342e;let _0x4b9c42=null;const _0x9c584c=resolve(_0x4412d6,_0x4f9525(0x1fa));if(existsSync(_0x9c584c))try{const _0xdfc8f8=JSON['parse'](readFileSync(_0x9c584c,_0x4f9525(0x1f5)));for(const _0x217849 of[_0x4f9525(0x1ff),'devDependencies']){const _0x215bca=_0xdfc8f8?.[_0x217849]?.[_0x4f9525(0x1f6)];if(typeof _0x215bca===_0x4f9525(0x22b)){_0x215bca!==_0x4f9525(0x22f)&&(_0x4b9c42={'pkgPath':_0x9c584c,'currentVersion':_0x215bca,'field':_0x217849});break;}}}catch{}const _0x47ab18=resolve(_0x4412d6,NEW_CONFIG_NAME),_0x1b2656=existsSync(_0x47ab18)?readProjectConfig(_0x47ab18):{},_0x57acc6=analyzeProjectApiArchitecture(_0x4412d6,_0x1b2656);return{'sdkUpgrade':_0x4b9c42,'apiArchitecture':_0x57acc6};}function printReport(_0x5d0a4b){const _0x3b07fb=a229_0x342e;console[_0x3b07fb(0x21c)](''),console['log'](a229_0x1184f3[_0x3b07fb(0x220)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x3b07fb(0x21c)](''),console[_0x3b07fb(0x21c)](a229_0x1184f3[_0x3b07fb(0x22e)](_0x3b07fb(0x1fb))+('\x20\x20'+(_0x5d0a4b[_0x3b07fb(0x212)][_0x3b07fb(0x1f0)]?a229_0x1184f3['yellow'](_0x3b07fb(0x206)):a229_0x1184f3[_0x3b07fb(0x1e7)](_0x3b07fb(0x1f7)))));for(const _0x6b24ad of _0x5d0a4b[_0x3b07fb(0x212)]['groups']){console[_0x3b07fb(0x21c)]('\x20\x20'+_0x6b24ad[_0x3b07fb(0x1f3)]+'\x20('+_0x6b24ad[_0x3b07fb(0x234)][_0x3b07fb(0x1fd)](',\x20')+')');for(const _0x1bb3c2 of _0x6b24ad[_0x3b07fb(0x20e)]){console[_0x3b07fb(0x21c)](_0x3b07fb(0x1fe)+_0x1bb3c2[_0x3b07fb(0x237)][_0x3b07fb(0x217)](0x11)+'\x20'+_0x1bb3c2[_0x3b07fb(0x230)]),_0x1bb3c2[_0x3b07fb(0x22c)]&&console[_0x3b07fb(0x21c)](_0x3b07fb(0x1f2)+_0x1bb3c2['candidatePath']);}}_0x5d0a4b[_0x3b07fb(0x212)][_0x3b07fb(0x21f)][_0x3b07fb(0x223)]>0x0&&console[_0x3b07fb(0x21c)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x3b07fb(0x21c)]('');if(_0x5d0a4b[_0x3b07fb(0x20c)]){const {currentVersion:_0x45a4e1,field:_0x26bdc8,pkgPath:_0x58b843}=_0x5d0a4b[_0x3b07fb(0x20c)];console['log'](a229_0x1184f3[_0x3b07fb(0x22e)]('@lovrabet/sdk:')+('\x20\x20'+a229_0x1184f3[_0x3b07fb(0x1ea)](_0x58b843))),console[_0x3b07fb(0x21c)](_0x3b07fb(0x203)+_0x26bdc8+':\x20'+a229_0x1184f3[_0x3b07fb(0x1ea)](_0x45a4e1)+'\x20→\x20'+a229_0x1184f3['green'](_0x3b07fb(0x22f))),console[_0x3b07fb(0x21c)](_0x3b07fb(0x204));}else console[_0x3b07fb(0x21c)](a229_0x1184f3['cyan'](_0x3b07fb(0x201))+'\x20\x20'+a229_0x1184f3[_0x3b07fb(0x221)](_0x3b07fb(0x238)));console['log']('');}function execUpgradeSdk(_0x3f6369){const _0x369700=a229_0x342e;if(!_0x3f6369[_0x369700(0x20c)])return{'step':0x1,'label':_0x369700(0x232),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x11e96e,currentVersion:_0x542654,field:_0x28e7aa}=_0x3f6369[_0x369700(0x20c)];try{const _0x1df6a5=readFileSync(_0x11e96e,_0x369700(0x1f5)),_0x45c602=JSON[_0x369700(0x222)](_0x1df6a5);return _0x45c602[_0x28e7aa]['@lovrabet/sdk']=_0x369700(0x22f),writeFileSync(_0x11e96e,JSON[_0x369700(0x225)](_0x45c602,null,0x2)+'\x0a',_0x369700(0x1f5)),{'step':0x1,'label':_0x369700(0x232),'ok':!![],'detail':_0x28e7aa+_0x369700(0x22a)+_0x542654+'\x20→\x20latest'};}catch(_0x446b64){return{'step':0x1,'label':_0x369700(0x232),'ok':![],'detail':_0x446b64 instanceof Error?_0x446b64[_0x369700(0x215)]:String(_0x446b64)};}}function a229_0x5074(){const _0x2c73e9=['some','green','\x20\x20Step\x20','1784DftDKz','yellow','7UCUaYq','35199oPMSJO','1442140GtziAd','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','needed','\x20\x20npm\x20install','\x20\x20\x20\x20\x20\x20candidate:\x20','apiDir','3065583tgSEWZ','utf8','@lovrabet/sdk','up-to-date','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','white','package.json','Application\x20source:','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','join','\x20\x20\x20\x20','dependencies','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','@lovrabet/sdk:','\x20\x20#\x20or','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','object','upgrade\x20needed','4KNtrVN','1300944twOgje','Proceed\x20with\x20upgrade?','374ynYJkX','label','sdkUpgrade','start','files','Your\x20project\x20is\x20already\x20up-to-date.','failed','FAIL','apiArchitecture','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','manualMergeRequired','message','Upgrade\x20cancelled.','padEnd','\x20\x20\x20\x20\x20\x20\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Upgrade\x20application\x20source','succeed','log','===\x20Upgrade\x20Summary\x20===','source\x20structure\x20is\x20current','skippedLegacyDirectories','bold','gray','parse','length','detail','stringify','yes','563829RorYax','Step\x202/2:\x20Application\x20source\x20—\x20','472400ToJnZF','[\x22@lovrabet/sdk\x22]:\x20','string','candidatePath','done','cyan','latest','path','push','Upgrade\x20@lovrabet/sdk','step','profiles','1547166RLtsQo','CANCEL','action','not\x20found\x20or\x20already\x20at\x20latest'];a229_0x5074=function(){return _0x2c73e9;};return a229_0x5074();}function printSummary(_0xeadb4d){const _0x513d3a=a229_0x342e;console[_0x513d3a(0x21c)](''),console[_0x513d3a(0x21c)](a229_0x1184f3[_0x513d3a(0x220)](_0x513d3a(0x21d))),console[_0x513d3a(0x21c)]('');for(const _0x57c452 of _0xeadb4d){const _0x42d7ca=_0x57c452['ok']?a229_0x1184f3[_0x513d3a(0x1e7)]('OK'):a229_0x1184f3['red'](_0x513d3a(0x211));console[_0x513d3a(0x21c)]('\x20\x20'+_0x42d7ca+_0x513d3a(0x1e8)+_0x57c452[_0x513d3a(0x233)]+':\x20'+_0x57c452[_0x513d3a(0x20b)]);if(_0x57c452[_0x513d3a(0x224)])console[_0x513d3a(0x21c)](_0x513d3a(0x218)+a229_0x1184f3['gray'](_0x57c452[_0x513d3a(0x224)]));}console['log']('');}export async function upgradeApp(_0x916150,_0x250249){const _0x5c3f35=a229_0x342e,_0x40dd0e=process['cwd'](),_0x7f38c5=analyseProjectUpgrade(_0x40dd0e);if(!_0x7f38c5[_0x5c3f35(0x20c)]&&!_0x7f38c5[_0x5c3f35(0x212)][_0x5c3f35(0x1f0)])return console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1e7)](_0x5c3f35(0x20f))),{'analysis':_0x7f38c5,'steps':[],'completed':!![]};printReport(_0x7f38c5);const _0x42c8b7=!!(_0x250249[_0x5c3f35(0x226)]||_0x250249['Y']||_0x916150);if(!_0x42c8b7)try{const _0x6e03f0=await askConfirm(_0x5c3f35(0x209));if(!_0x6e03f0)return console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x221)](_0x5c3f35(0x216))),{'analysis':_0x7f38c5,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x4bd0a0){if(_0x4bd0a0?.[_0x5c3f35(0x215)]===_0x5c3f35(0x236))return console['log'](a229_0x1184f3[_0x5c3f35(0x221)](_0x5c3f35(0x216))),{'analysis':_0x7f38c5,'steps':[],'completed':![],'cancelled':!![]};throw _0x4bd0a0;}const _0x381e7b=[],_0x286542=a229_0x2580b5({'text':_0x5c3f35(0x200),'color':'cyan'})['start'](),_0x219104=execUpgradeSdk(_0x7f38c5);_0x381e7b[_0x5c3f35(0x231)](_0x219104),_0x286542[_0x219104['ok']?_0x5c3f35(0x21b):'fail'](_0x5c3f35(0x1f8)+(_0x219104['detail']??(_0x219104['ok']?_0x5c3f35(0x22d):_0x5c3f35(0x210))));const _0x48ec1a=a229_0x2580b5({'text':_0x5c3f35(0x1fc),'color':'cyan'})[_0x5c3f35(0x20d)]();let _0xe63ff2;try{_0xe63ff2=await upgradeProjectApiArchitecture(_0x40dd0e);const _0x312e6f=_0xe63ff2[_0x5c3f35(0x214)]?'candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required':_0x5c3f35(0x21e);_0x48ec1a['succeed']('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x312e6f),_0x381e7b[_0x5c3f35(0x231)]({'step':0x2,'label':_0x5c3f35(0x21a),'ok':!![],'detail':_0x312e6f});}catch(_0x322e35){const _0x1097fa=_0x322e35 instanceof Error?_0x322e35[_0x5c3f35(0x215)]:String(_0x322e35);_0x48ec1a['fail'](_0x5c3f35(0x228)+_0x1097fa),_0x381e7b['push']({'step':0x2,'label':_0x5c3f35(0x21a),'ok':![],'detail':_0x1097fa});}printSummary(_0x381e7b);const _0x4fd917=_0x381e7b[_0x5c3f35(0x239)](_0x2fe00f=>!_0x2fe00f['ok']);if(_0x4fd917)console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1ea)](_0x5c3f35(0x1ee)));else _0xe63ff2?.[_0x5c3f35(0x214)]?console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1ea)](_0x5c3f35(0x1ef))):console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1e7)]('Upgrade\x20completed\x20successfully!'));return _0x219104['ok']&&_0x7f38c5[_0x5c3f35(0x20c)]&&(console[_0x5c3f35(0x21c)](''),console[_0x5c3f35(0x21c)](a229_0x1184f3['bold'][_0x5c3f35(0x22e)](_0x5c3f35(0x219))),console[_0x5c3f35(0x21c)](a229_0x1184f3['cyan'](_0x5c3f35(0x213))),console[_0x5c3f35(0x21c)](''),console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1f9)](_0x5c3f35(0x1f1))),console['log'](a229_0x1184f3[_0x5c3f35(0x1f9)](_0x5c3f35(0x202))),console[_0x5c3f35(0x21c)](a229_0x1184f3[_0x5c3f35(0x1f9)]('\x20\x20bun\x20install')),console[_0x5c3f35(0x21c)]('')),{'analysis':_0x7f38c5,'steps':_0x381e7b,'apiArchitecture':_0xe63ff2,'completed':!_0x4fd917&&!_0xe63ff2?.[_0x5c3f35(0x214)]};}
1
+ (function(_0x1af83d,_0x271f7c){const _0x562c1c=a229_0x1200,_0x2ebb90=_0x1af83d();while(!![]){try{const _0x2c7067=parseInt(_0x562c1c(0x14d))/0x1+-parseInt(_0x562c1c(0x142))/0x2*(-parseInt(_0x562c1c(0x14a))/0x3)+parseInt(_0x562c1c(0x15b))/0x4+parseInt(_0x562c1c(0x159))/0x5+parseInt(_0x562c1c(0x15f))/0x6*(-parseInt(_0x562c1c(0x16e))/0x7)+-parseInt(_0x562c1c(0x16a))/0x8+parseInt(_0x562c1c(0x18a))/0x9;if(_0x2c7067===_0x271f7c)break;else _0x2ebb90['push'](_0x2ebb90['shift']());}catch(_0x44aa1b){_0x2ebb90['push'](_0x2ebb90['shift']());}}}(a229_0x2617,0x5ee99));import a229_0x23cf4a from'chalk';import a229_0x570ebe from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';function a229_0x1200(_0x5b9e7b,_0xc958bd){_0x5b9e7b=_0x5b9e7b-0x13e;const _0x2617f7=a229_0x2617();let _0x120005=_0x2617f7[_0x5b9e7b];return _0x120005;}import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x1d2755){const _0x2c582a=a229_0x1200;try{const _0x6123ac=JSON[_0x2c582a(0x143)](readFileSync(_0x1d2755,_0x2c582a(0x170)));return _0x6123ac&&typeof _0x6123ac===_0x2c582a(0x191)?_0x6123ac:{};}catch{return{};}}export function analyseProjectUpgrade(_0x583fa2){const _0x5a277b=a229_0x1200;let _0x523b39=null;const _0x25a7bf=resolve(_0x583fa2,_0x5a277b(0x186));if(existsSync(_0x25a7bf))try{const _0xeb1c02=JSON[_0x5a277b(0x143)](readFileSync(_0x25a7bf,_0x5a277b(0x170)));for(const _0x23c7dd of[_0x5a277b(0x18f),_0x5a277b(0x145)]){const _0x1e9671=_0xeb1c02?.[_0x23c7dd]?.[_0x5a277b(0x14b)];if(typeof _0x1e9671===_0x5a277b(0x173)){_0x1e9671!=='latest'&&(_0x523b39={'pkgPath':_0x25a7bf,'currentVersion':_0x1e9671,'field':_0x23c7dd});break;}}}catch{}const _0x17e5f=resolve(_0x583fa2,NEW_CONFIG_NAME),_0x281986=existsSync(_0x17e5f)?readProjectConfig(_0x17e5f):{},_0x2428fb=analyzeProjectApiArchitecture(_0x583fa2,_0x281986);return{'sdkUpgrade':_0x523b39,'apiArchitecture':_0x2428fb};}function printReport(_0x12bec1){const _0x42456f=a229_0x1200;console['log'](''),console[_0x42456f(0x168)](a229_0x23cf4a[_0x42456f(0x192)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x42456f(0x168)](''),console[_0x42456f(0x168)](a229_0x23cf4a[_0x42456f(0x140)](_0x42456f(0x152))+('\x20\x20'+(_0x12bec1['apiArchitecture'][_0x42456f(0x16c)]?a229_0x23cf4a[_0x42456f(0x163)](_0x42456f(0x166)):a229_0x23cf4a[_0x42456f(0x162)](_0x42456f(0x148)))));for(const _0x2c69ae of _0x12bec1[_0x42456f(0x180)][_0x42456f(0x190)]){console['log']('\x20\x20'+_0x2c69ae['apiDir']+'\x20('+_0x2c69ae['profiles'][_0x42456f(0x16b)](',\x20')+')');for(const _0x3b6275 of _0x2c69ae[_0x42456f(0x16d)]){console[_0x42456f(0x168)](_0x42456f(0x17d)+_0x3b6275['action'][_0x42456f(0x150)](0x11)+'\x20'+_0x3b6275[_0x42456f(0x17b)]),_0x3b6275[_0x42456f(0x151)]&&console[_0x42456f(0x168)](_0x42456f(0x164)+_0x3b6275[_0x42456f(0x151)]);}}_0x12bec1['apiArchitecture'][_0x42456f(0x15c)][_0x42456f(0x174)]>0x0&&console[_0x42456f(0x168)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x42456f(0x168)]('');if(_0x12bec1['sdkUpgrade']){const {currentVersion:_0x198e4b,field:_0xe2b95f,pkgPath:_0x288698}=_0x12bec1[_0x42456f(0x16f)];console[_0x42456f(0x168)](a229_0x23cf4a['cyan'](_0x42456f(0x185))+('\x20\x20'+a229_0x23cf4a[_0x42456f(0x163)](_0x288698))),console[_0x42456f(0x168)](_0x42456f(0x176)+_0xe2b95f+':\x20'+a229_0x23cf4a[_0x42456f(0x163)](_0x198e4b)+_0x42456f(0x172)+a229_0x23cf4a[_0x42456f(0x162)]('latest')),console['log'](_0x42456f(0x165));}else console[_0x42456f(0x168)](a229_0x23cf4a[_0x42456f(0x140)](_0x42456f(0x185))+'\x20\x20'+a229_0x23cf4a[_0x42456f(0x18e)](_0x42456f(0x181)));console[_0x42456f(0x168)]('');}function execUpgradeSdk(_0x6d84e6){const _0x433809=a229_0x1200;if(!_0x6d84e6['sdkUpgrade'])return{'step':0x1,'label':_0x433809(0x183),'ok':!![],'detail':_0x433809(0x175)};const {pkgPath:_0x4de5c4,currentVersion:_0xabc21b,field:_0x409cda}=_0x6d84e6['sdkUpgrade'];try{const _0xa3b0f3=readFileSync(_0x4de5c4,'utf8'),_0x26068e=JSON[_0x433809(0x143)](_0xa3b0f3);return _0x26068e[_0x409cda][_0x433809(0x14b)]=_0x433809(0x15d),writeFileSync(_0x4de5c4,JSON[_0x433809(0x18b)](_0x26068e,null,0x2)+'\x0a',_0x433809(0x170)),{'step':0x1,'label':_0x433809(0x183),'ok':!![],'detail':_0x409cda+'[\x22@lovrabet/sdk\x22]:\x20'+_0xabc21b+_0x433809(0x156)};}catch(_0x113f75){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x113f75 instanceof Error?_0x113f75[_0x433809(0x157)]:String(_0x113f75)};}}function printSummary(_0x573b3a){const _0x5b8f9c=a229_0x1200;console[_0x5b8f9c(0x168)](''),console[_0x5b8f9c(0x168)](a229_0x23cf4a[_0x5b8f9c(0x192)]('===\x20Upgrade\x20Summary\x20===')),console[_0x5b8f9c(0x168)]('');for(const _0x4230f0 of _0x573b3a){const _0x41b478=_0x4230f0['ok']?a229_0x23cf4a[_0x5b8f9c(0x162)]('OK'):a229_0x23cf4a['red'](_0x5b8f9c(0x13f));console[_0x5b8f9c(0x168)]('\x20\x20'+_0x41b478+_0x5b8f9c(0x161)+_0x4230f0[_0x5b8f9c(0x147)]+':\x20'+_0x4230f0[_0x5b8f9c(0x14e)]);if(_0x4230f0[_0x5b8f9c(0x149)])console['log'](_0x5b8f9c(0x155)+a229_0x23cf4a['gray'](_0x4230f0[_0x5b8f9c(0x149)]));}console[_0x5b8f9c(0x168)]('');}export async function upgradeApp(_0x2d7223,_0x1783bb){const _0x22ef6f=a229_0x1200,_0x3143ef=process[_0x22ef6f(0x189)](),_0xb74e71=analyseProjectUpgrade(_0x3143ef);if(!_0xb74e71['sdkUpgrade']&&!_0xb74e71[_0x22ef6f(0x180)][_0x22ef6f(0x16c)])return console['log'](a229_0x23cf4a[_0x22ef6f(0x162)](_0x22ef6f(0x141))),{'analysis':_0xb74e71,'steps':[],'completed':!![]};printReport(_0xb74e71);const _0x38b092=!!(_0x1783bb[_0x22ef6f(0x158)]||_0x1783bb['Y']||_0x2d7223);if(!_0x38b092)try{const _0x4576a0=await askConfirm(_0x22ef6f(0x17f));if(!_0x4576a0)return console[_0x22ef6f(0x168)](a229_0x23cf4a[_0x22ef6f(0x18e)](_0x22ef6f(0x17e))),{'analysis':_0xb74e71,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x372713){if(_0x372713?.[_0x22ef6f(0x157)]===_0x22ef6f(0x144))return console[_0x22ef6f(0x168)](a229_0x23cf4a['gray'](_0x22ef6f(0x17e))),{'analysis':_0xb74e71,'steps':[],'completed':![],'cancelled':!![]};throw _0x372713;}const _0x4c43bf=[],_0x1d4c44=a229_0x570ebe({'text':_0x22ef6f(0x177),'color':_0x22ef6f(0x140)})[_0x22ef6f(0x187)](),_0x172405=execUpgradeSdk(_0xb74e71);_0x4c43bf[_0x22ef6f(0x17c)](_0x172405),_0x1d4c44[_0x172405['ok']?_0x22ef6f(0x18c):_0x22ef6f(0x15a)](_0x22ef6f(0x178)+(_0x172405[_0x22ef6f(0x149)]??(_0x172405['ok']?_0x22ef6f(0x146):_0x22ef6f(0x15e))));const _0x53914f=a229_0x570ebe({'text':_0x22ef6f(0x17a),'color':_0x22ef6f(0x140)})[_0x22ef6f(0x187)]();let _0x1e192a;try{_0x1e192a=await upgradeProjectApiArchitecture(_0x3143ef);const _0x460903=_0x1e192a[_0x22ef6f(0x171)]?'candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required':_0x22ef6f(0x154);_0x53914f['succeed']('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x460903),_0x4c43bf[_0x22ef6f(0x17c)]({'step':0x2,'label':_0x22ef6f(0x167),'ok':!![],'detail':_0x460903});}catch(_0x1645ef){const _0x47f218=_0x1645ef instanceof Error?_0x1645ef[_0x22ef6f(0x157)]:String(_0x1645ef);_0x53914f[_0x22ef6f(0x15a)](_0x22ef6f(0x169)+_0x47f218),_0x4c43bf[_0x22ef6f(0x17c)]({'step':0x2,'label':_0x22ef6f(0x167),'ok':![],'detail':_0x47f218});}printSummary(_0x4c43bf);const _0x52a0ae=_0x4c43bf[_0x22ef6f(0x188)](_0x49a9e1=>!_0x49a9e1['ok']);if(_0x52a0ae)console[_0x22ef6f(0x168)](a229_0x23cf4a[_0x22ef6f(0x163)](_0x22ef6f(0x14f)));else _0x1e192a?.[_0x22ef6f(0x171)]?console[_0x22ef6f(0x168)](a229_0x23cf4a[_0x22ef6f(0x163)](_0x22ef6f(0x184))):console['log'](a229_0x23cf4a[_0x22ef6f(0x162)](_0x22ef6f(0x18d)));return _0x172405['ok']&&_0xb74e71[_0x22ef6f(0x16f)]&&(console[_0x22ef6f(0x168)](''),console[_0x22ef6f(0x168)](a229_0x23cf4a['bold'][_0x22ef6f(0x140)](_0x22ef6f(0x13e))),console['log'](a229_0x23cf4a[_0x22ef6f(0x140)](_0x22ef6f(0x14c))),console[_0x22ef6f(0x168)](''),console[_0x22ef6f(0x168)](a229_0x23cf4a['white'](_0x22ef6f(0x160))),console[_0x22ef6f(0x168)](a229_0x23cf4a[_0x22ef6f(0x179)](_0x22ef6f(0x182))),console[_0x22ef6f(0x168)](a229_0x23cf4a[_0x22ef6f(0x179)](_0x22ef6f(0x153))),console['log']('')),{'analysis':_0xb74e71,'steps':_0x4c43bf,'apiArchitecture':_0x1e192a,'completed':!_0x52a0ae&&!_0x1e192a?.['manualMergeRequired']};}function a229_0x2617(){const _0x1580b1=['Step\x202/2:\x20Application\x20source\x20—\x20','5377352daHSBH','join','needed','files','1393QAnIAt','sdkUpgrade','utf8','manualMergeRequired','\x20→\x20','string','length','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20\x20Current\x20version\x20in\x20','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','white','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','path','push','\x20\x20\x20\x20','Upgrade\x20cancelled.','Proceed\x20with\x20upgrade?','apiArchitecture','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20#\x20or','Upgrade\x20@lovrabet/sdk','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','@lovrabet/sdk:','package.json','start','some','cwd','1356552EkZRNV','stringify','succeed','Upgrade\x20completed\x20successfully!','gray','dependencies','groups','object','bold','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','FAIL','cyan','Your\x20project\x20is\x20already\x20up-to-date.','114MNphht','parse','CANCEL','devDependencies','done','step','up-to-date','detail','8727lZGzCC','@lovrabet/sdk','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','334761oDnuuP','label','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','padEnd','candidatePath','Application\x20source:','\x20\x20bun\x20install','source\x20structure\x20is\x20current','\x20\x20\x20\x20\x20\x20\x20','\x20→\x20latest','message','yes','3570025uFThpb','fail','930896YixRLH','skippedLegacyDirectories','latest','failed','16194ZdJIrG','\x20\x20npm\x20install','\x20\x20Step\x20','green','yellow','\x20\x20\x20\x20\x20\x20candidate:\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','upgrade\x20needed','Upgrade\x20application\x20source','log'];a229_0x2617=function(){return _0x1580b1;};return a229_0x2617();}
@@ -1 +1 @@
1
- const a230_0x3e0587=a230_0x2e68;(function(_0x18114e,_0x16c97d){const _0xa706f9=a230_0x2e68,_0x3c6d13=_0x18114e();while(!![]){try{const _0x3d5129=-parseInt(_0xa706f9(0x15d))/0x1+parseInt(_0xa706f9(0x141))/0x2+-parseInt(_0xa706f9(0x138))/0x3+parseInt(_0xa706f9(0x12f))/0x4*(parseInt(_0xa706f9(0x14b))/0x5)+-parseInt(_0xa706f9(0x13d))/0x6*(parseInt(_0xa706f9(0x14a))/0x7)+-parseInt(_0xa706f9(0x11c))/0x8*(parseInt(_0xa706f9(0x112))/0x9)+parseInt(_0xa706f9(0x110))/0xa*(parseInt(_0xa706f9(0x116))/0xb);if(_0x3d5129===_0x16c97d)break;else _0x3c6d13['push'](_0x3c6d13['shift']());}catch(_0x2713e9){_0x3c6d13['push'](_0x3c6d13['shift']());}}}(a230_0x649e,0x96a19));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';function a230_0x2e68(_0x5cccbc,_0x49af1a){_0x5cccbc=_0x5cccbc-0xf7;const _0x649e1a=a230_0x649e();let _0x2e68fe=_0x649e1a[_0x5cccbc];return _0x2e68fe;}import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x50b803){const _0x5df6d2=a230_0x2e68;for(const _0x25274a of _0x50b803){definitions[_0x5df6d2(0x117)](_0x25274a['service']+':'+_0x25274a[_0x5df6d2(0x15a)],_0x25274a);let _0x377bef=serviceGroups[_0x5df6d2(0x153)](_0x25274a[_0x5df6d2(0x12b)]);!_0x377bef&&(_0x377bef=[],serviceGroups[_0x5df6d2(0x117)](_0x25274a['service'],_0x377bef)),_0x377bef[_0x5df6d2(0x148)](_0x25274a);}}function registerDeclarativeService(_0x4972be,_0x1b2ad8,_0x195995){const _0x1b6d34=a230_0x2e68;registerDefinitions(_0x1b2ad8);_0x195995?.['wildcardDef']&&registerDefinitions([_0x195995[_0x1b6d34(0x151)]]);const _0x17d747=_0x351b63=>_0x351b63===_0x1b6d34(0x114)?'':_0x351b63===_0x1b6d34(0x136)?_0x1b6d34(0x15c):_0x1b6d34(0xfa),_0x49dcfc={'service':_0x1b2ad8[0x0][_0x1b6d34(0x12b)],'label':_0x4972be,'commands':_0x1b2ad8[_0x1b6d34(0x104)](_0x25ad50=>!_0x25ad50[_0x1b6d34(0x107)])[_0x1b6d34(0x131)](_0x53b3a4=>({'command':_0x53b3a4[_0x1b6d34(0x15a)],'description':_0x53b3a4[_0x1b6d34(0x106)],'tag':_0x17d747(_0x53b3a4[_0x1b6d34(0x160)])})),'declarative':!![],'defaultCommand':_0x195995?.['defaultCommand']??(_0x195995?.[_0x1b6d34(0x105)]?_0x1b2ad8[0x0][_0x1b6d34(0x15a)]:undefined),'wildcardDef':_0x195995?.[_0x1b6d34(0x151)],'isSingleCommand':_0x195995?.[_0x1b6d34(0x105)]};serviceRegistry['push'](_0x49dcfc),serviceByName[_0x1b6d34(0x117)](_0x49dcfc['service'],_0x49dcfc);}registerDeclarativeService(a230_0x3e0587(0x11f),projectDefinitions),registerDeclarativeService(a230_0x3e0587(0x10b),workspaceDefinitions),registerDeclarativeService(a230_0x3e0587(0x127),appDefinitions),registerDeclarativeService(a230_0x3e0587(0x165),authDefinitions,{'defaultCommand':a230_0x3e0587(0x156)}),registerDeclarativeService(a230_0x3e0587(0xf7),tenantDefinitions),registerDeclarativeService(a230_0x3e0587(0x14c),userAccountDefinitions),registerDeclarativeService(a230_0x3e0587(0x12c),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a230_0x3e0587(0x142),apiDefinitions),registerDeclarativeService(a230_0x3e0587(0x13f),bffDefinitions),registerDeclarativeService('Instant\x20API\x20Policy',instantApiPolicyDefinitions),registerDeclarativeService(a230_0x3e0587(0xfd),notificationDefinitions),registerDeclarativeService(a230_0x3e0587(0x13e),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a230_0x3e0587(0x11d),deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a230_0x3e0587(0x143),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a230_0x3e0587(0xfe),appConfigDefinitions),registerDeclarativeService(a230_0x3e0587(0x123),kbDefinitions),registerDeclarativeService(a230_0x3e0587(0x13b),ruleDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a230_0x3e0587(0x146),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a230_0x3e0587(0x10c),configDefinitions),registerDeclarativeService(a230_0x3e0587(0x122),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x3e0587(0x147),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a230_0x3e0587(0x13c),flowDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a230_0x3e0587(0x158)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x3e0587(0x130)]-0x1];last['commands']=[{'command':a230_0x3e0587(0x10a),'description':a230_0x3e0587(0x12d),'tag':a230_0x3e0587(0x134)+runDefinition['risk']+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x3e0587(0x12a),'rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>'],[a230_0x3e0587(0x149),'rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>'],[a230_0x3e0587(0x15f),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],['bff:new',a230_0x3e0587(0xff)],[a230_0x3e0587(0x124),a230_0x3e0587(0x103)],[a230_0x3e0587(0x145),a230_0x3e0587(0x161)],[a230_0x3e0587(0x126),a230_0x3e0587(0x166)],['skill:',a230_0x3e0587(0xfb)],[a230_0x3e0587(0x100),'rabetbase\x20cli-skill\x20install'],[a230_0x3e0587(0x111),'rabetbase\x20cli-skill\x20install'],[a230_0x3e0587(0x121),a230_0x3e0587(0xfb)],['app:assets-status',a230_0x3e0587(0x133)],[a230_0x3e0587(0x119),'rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27'],[a230_0x3e0587(0x128),'rabetbase\x20app\x20list\x20--remote'],[a230_0x3e0587(0x118),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a230_0x3e0587(0x109),a230_0x3e0587(0x120)],[a230_0x3e0587(0x113),a230_0x3e0587(0xf9)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a230_0x3e0587(0x14d),'rabetbase\x20kb\x20detail'],[a230_0x3e0587(0x135),a230_0x3e0587(0x10f)],[a230_0x3e0587(0x10e),'rabetbase\x20kb\x20update'],[a230_0x3e0587(0x157),a230_0x3e0587(0x164)],[a230_0x3e0587(0x15b),a230_0x3e0587(0x144)],[a230_0x3e0587(0x14e),a230_0x3e0587(0x102)],['data:getOne','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],['page:standard-page-status','rabetbase\x20page\x20data-list-status'],['page:react-create',a230_0x3e0587(0x137)],[a230_0x3e0587(0x12e),a230_0x3e0587(0x137)],['page:react-list',a230_0x3e0587(0x140)],['page:react-detail',a230_0x3e0587(0x155)],[a230_0x3e0587(0x125),'rabetbase\x20page\x20custom-update'],[a230_0x3e0587(0x154),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a230_0x3e0587(0x150),a230_0x3e0587(0x11e)],[a230_0x3e0587(0x101),a230_0x3e0587(0x11e)],[a230_0x3e0587(0xfc),a230_0x3e0587(0x13a)],[a230_0x3e0587(0x162),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x3e0587(0x14f),a230_0x3e0587(0x129)],[a230_0x3e0587(0x139),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x3e0587(0x10d),a230_0x3e0587(0x129)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x3e0587(0x11a),a230_0x3e0587(0x115)],['start','rabetbase\x20run\x20start'],['build','rabetbase\x20run\x20build'],[a230_0x3e0587(0x15e),a230_0x3e0587(0xf8)],[a230_0x3e0587(0x132),a230_0x3e0587(0x159)]]);export function resolveRemovedCommand(_0x1e151b,_0x10bfed){const _0x58b1b8=a230_0x3e0587;if(!_0x1e151b)return undefined;const _0x12b326=REMOVED_COMMAND_REPLACEMENTS['get'](_0x1e151b+':'+(_0x10bfed??'')),_0x210660=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x1e151b),_0x373c53=_0x12b326??_0x210660,_0x39f197=REMOVED_COMMAND_HINTS[_0x58b1b8(0x153)](_0x1e151b+':'+(_0x10bfed??''));if(!_0x373c53&&!_0x39f197)return undefined;const _0x245367=_0x210660?_0x1e151b:_0x10bfed?_0x1e151b+'\x20'+_0x10bfed:_0x1e151b;return{'command':_0x245367,'message':'`rabetbase\x20'+_0x245367+_0x58b1b8(0x163),'hint':_0x39f197??_0x58b1b8(0x108)+_0x373c53+_0x58b1b8(0x167)};}export function findDefinition(_0x108b49,_0xafc8f1){const _0x15505f=a230_0x3e0587;return definitions[_0x15505f(0x153)](_0x108b49+':'+_0xafc8f1);}function a230_0x649e(){const _0x2c0aae=['knowledge-base:update','rabetbase\x20kb\x20create','30OMvFVi','skills:','9nKpedo','app:remove','read','rabetbase\x20project\x20create\x20<project-name>','3610266eqgBww','set','app:use','app:assets-update','create','from','2082904gRxJTb','Deployment','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','Project','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','skills:install','Diagnostics','Company\x20Knowledge\x20Base','sql:new','page:react-update','project:init','App\x20Management','app:remote','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','dataset:generate-start','service','Dataset\x20&\x20Operations','Run\x20any\x20package.json\x20script','page:custom-create','564VribUr','length','map','logout','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','\x20\x20[','knowledge-base:create','write','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','393975IzLiuD','permit:role-menus','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','Agent\x20Context\x20Rules','Approval\x20Flows','998556DukDjf','SQL\x20Queries','Backend\x20Function\x20Scripts','rabetbase\x20page\x20custom-list','1041626JQRnUh','API\x20Development','Async\x20Tasks','rabetbase\x20role\x20list','menu:update','OCR','Schema','push','dataset:generate-status','7ofaqoK','18530lPnzRr','User\x20Accounts','knowledge-base:detail','data:filter','permit:page-set','flow:enable','wildcardDef','has','get','page:react-publish','rabetbase\x20page\x20custom-detail','login','knowledge-base:delete','show','rabetbase\x20auth\x20logout','command','role:create','\x20\x20[write]','852878TKkUqX','preview','sql:save','risk','rabetbase\x20menu\x20asset-update','permit:page-get','`\x20has\x20been\x20removed.','rabetbase\x20kb\x20delete','Authentication','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','`\x20instead.','Tenant\x20Members','rabetbase\x20run\x20preview','rabetbase\x20workspace\x20remove\x20<name>','\x20\x20[high-risk-write]','rabetbase\x20cli-skill\x20install','deployment:sync','Notification\x20Configuration','Runtime\x20App\x20Config\x20Management','rabetbase\x20bff\x20create','skill:install','flow:disable','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20sql\x20create','filter','isSingleCommand','description','hidden','Use\x20`','app:add','<script>','Workspace','Configuration','permit:role-apis-set'];a230_0x649e=function(){return _0x2c0aae;};return a230_0x649e();}export function isKnownService(_0x9e40e6){const _0x355222=a230_0x3e0587;return serviceByName[_0x355222(0x152)](_0x9e40e6);}export function isDeclarativeService(_0xe3e90c){const _0x150d37=a230_0x3e0587;return serviceGroups[_0x150d37(0x152)](_0xe3e90c)||serviceByName[_0x150d37(0x153)](_0xe3e90c)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x4f8748){const _0x27e577=a230_0x3e0587;return serviceByName[_0x27e577(0x153)](_0x4f8748);}export function getLegacyHandler(_0x4d06c8,_0x1a3163){return undefined;}export function getAllDefinitions(){const _0x44e07a=a230_0x3e0587;return Array[_0x44e07a(0x11b)](definitions['values']());}
1
+ const a230_0xf89c42=a230_0x2361;(function(_0x4edd3f,_0x120ca1){const _0x3598de=a230_0x2361,_0x586cbd=_0x4edd3f();while(!![]){try{const _0xacbf0d=parseInt(_0x3598de(0xe7))/0x1*(-parseInt(_0x3598de(0xe0))/0x2)+parseInt(_0x3598de(0xd9))/0x3*(parseInt(_0x3598de(0xe1))/0x4)+parseInt(_0x3598de(0x139))/0x5+-parseInt(_0x3598de(0x138))/0x6*(parseInt(_0x3598de(0xdf))/0x7)+-parseInt(_0x3598de(0x117))/0x8*(-parseInt(_0x3598de(0xd7))/0x9)+-parseInt(_0x3598de(0xdb))/0xa+-parseInt(_0x3598de(0xc9))/0xb;if(_0xacbf0d===_0x120ca1)break;else _0x586cbd['push'](_0x586cbd['shift']());}catch(_0x1ee91b){_0x586cbd['push'](_0x586cbd['shift']());}}}(a230_0xc703,0x78a2b));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';function a230_0x2361(_0x42ad1e,_0xd7cde6){_0x42ad1e=_0x42ad1e-0xc8;const _0xc703f1=a230_0xc703();let _0x23612a=_0xc703f1[_0x42ad1e];return _0x23612a;}import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x32aa63){const _0x4fdd9b=a230_0x2361;for(const _0x4da679 of _0x32aa63){definitions[_0x4fdd9b(0xfc)](_0x4da679[_0x4fdd9b(0xfb)]+':'+_0x4da679[_0x4fdd9b(0xee)],_0x4da679);let _0x43519b=serviceGroups[_0x4fdd9b(0xf0)](_0x4da679[_0x4fdd9b(0xfb)]);!_0x43519b&&(_0x43519b=[],serviceGroups[_0x4fdd9b(0xfc)](_0x4da679['service'],_0x43519b)),_0x43519b[_0x4fdd9b(0xd4)](_0x4da679);}}function registerDeclarativeService(_0x5d04af,_0x5883c2,_0x34215c){const _0x40f11f=a230_0x2361;registerDefinitions(_0x5883c2);_0x34215c?.[_0x40f11f(0xea)]&&registerDefinitions([_0x34215c['wildcardDef']]);const _0x527cf3=_0x405ea=>_0x405ea===_0x40f11f(0x12f)?'':_0x405ea==='write'?_0x40f11f(0x137):_0x40f11f(0x13b),_0x401b45={'service':_0x5883c2[0x0]['service'],'label':_0x5d04af,'commands':_0x5883c2[_0x40f11f(0x116)](_0x124467=>!_0x124467[_0x40f11f(0x111)])['map'](_0x309d6e=>({'command':_0x309d6e[_0x40f11f(0xee)],'description':_0x309d6e['description'],'tag':_0x527cf3(_0x309d6e[_0x40f11f(0xff)])})),'declarative':!![],'defaultCommand':_0x34215c?.[_0x40f11f(0x126)]??(_0x34215c?.[_0x40f11f(0xda)]?_0x5883c2[0x0][_0x40f11f(0xee)]:undefined),'wildcardDef':_0x34215c?.['wildcardDef'],'isSingleCommand':_0x34215c?.[_0x40f11f(0xda)]};serviceRegistry['push'](_0x401b45),serviceByName[_0x40f11f(0xfc)](_0x401b45[_0x40f11f(0xfb)],_0x401b45);}registerDeclarativeService(a230_0xf89c42(0xf7),projectDefinitions),registerDeclarativeService(a230_0xf89c42(0xd8),workspaceDefinitions),registerDeclarativeService(a230_0xf89c42(0x100),appDefinitions),registerDeclarativeService(a230_0xf89c42(0xe5),authDefinitions,{'defaultCommand':a230_0xf89c42(0x108)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a230_0xf89c42(0x130),userAccountDefinitions),registerDeclarativeService(a230_0xf89c42(0x103),datasetDefinitions),registerDeclarativeService(a230_0xf89c42(0x135),pageDefinitions),registerDeclarativeService(a230_0xf89c42(0xd6),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a230_0xf89c42(0x12b),instantApiPolicyDefinitions),registerDeclarativeService(a230_0xf89c42(0xf8),notificationDefinitions),registerDeclarativeService(a230_0xf89c42(0x110),sqlDefinitions),registerDeclarativeService(a230_0xf89c42(0x12e),dbDefinitions),registerDeclarativeService(a230_0xf89c42(0xf4),deploymentDefinitions),registerDeclarativeService(a230_0xf89c42(0xd1),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a230_0xf89c42(0xcf),appConfigDefinitions),registerDeclarativeService(a230_0xf89c42(0xdc),kbDefinitions),registerDeclarativeService(a230_0xf89c42(0x123),ruleDefinitions),registerDeclarativeService(a230_0xf89c42(0x13d),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a230_0xf89c42(0x120),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a230_0xf89c42(0x136),configDefinitions),registerDeclarativeService(a230_0xf89c42(0xf5),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xf89c42(0xcb),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xf89c42(0x11a),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xf89c42(0x129),cliSkillDefinitions,{'defaultCommand':a230_0xf89c42(0x11e)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a230_0xf89c42(0x125),logsDefinitions,{'defaultCommand':a230_0xf89c42(0x13c)}),registerDeclarativeService(a230_0xf89c42(0xe9),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0xf89c42(0xce)]-0x1];last[a230_0xf89c42(0x112)]=[{'command':'<script>','description':a230_0xf89c42(0x109),'tag':a230_0xf89c42(0x124)+runDefinition[a230_0xf89c42(0xff)]+']'}];}function a230_0xc703(){const _0x1ae17d=['This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','Authentication','rabetbase\x20kb\x20delete','4426EbTHUK','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','Run\x20Scripts','wildcardDef','permit:page-set','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20run\x20preview','command','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','get','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','knowledge-base:update','permit:role-menus','Deployment','Diagnostics','app:assets-status','Project','Notification\x20Configuration','sql:save','app:remove','service','set','sql:new','page:react-update','risk','App\x20Management','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20page\x20custom-update','Dataset\x20&\x20Operations','rabetbase\x20page\x20custom-publish','project:init','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','rabetbase\x20kb\x20list','login','Run\x20any\x20package.json\x20script','page:react-publish','bff:new','rabetbase\x20run\x20build','`\x20has\x20been\x20removed.','rabetbase\x20menu\x20asset-update','from','SQL\x20Queries','hidden','commands','flow:disable','rabetbase\x20run\x20start','flow:enable','filter','13432zlEhiH','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','permit:role-apis-set','Self\x20Update','knowledge-base:detail','logout','values','install','page:react-detail','OCR','rabetbase\x20cli-skill\x20install','rabetbase\x20project\x20create\x20<project-name>','Agent\x20Context\x20Rules','\x20\x20[','Logs','defaultCommand','knowledge-base:create','permit:page-get','CLI\x20Built-in\x20Skill','rabetbase\x20page\x20custom-detail','Instant\x20API\x20Policy','app:remote','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Database\x20Connections','read','User\x20Accounts','deployment:sync','app:assets-update','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20workspace\x20remove\x20<name>','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Configuration','\x20\x20[write]','6kqahfX','923035bvCJuv','has','\x20\x20[high-risk-write]','show','Platform\x20Issue','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','app:add','rabetbase\x20workspace\x20use\x20--app\x20<name>','1183963cUTwKK','rabetbase\x20kb\x20update','Schema','skill:','build','length','Runtime\x20App\x20Config\x20Management','Use\x20`','Menu','data:getOne','rabetbase\x20bff\x20create','push','skills:install','API\x20Development','747PbpfHu','Workspace','89685NQKDHF','isSingleCommand','2945040mCdyBi','Company\x20Knowledge\x20Base','page:react-create','rabetbase\x20kb\x20create','792351ovmkDm','82JyFmry','116noeAMo','role:create','page:standard-page-status'];a230_0xc703=function(){return _0x1ae17d;};return a230_0xc703();}const REMOVED_COMMAND_REPLACEMENTS=new Map([['dataset:generate-start',a230_0xf89c42(0xe8)],['dataset:generate-status',a230_0xf89c42(0x13e)],[a230_0xf89c42(0xf9),a230_0xf89c42(0x106)],[a230_0xf89c42(0x10b),a230_0xf89c42(0xd3)],[a230_0xf89c42(0xfd),'rabetbase\x20sql\x20create'],['menu:update',a230_0xf89c42(0x10e)],[a230_0xf89c42(0x105),a230_0xf89c42(0x118)],[a230_0xf89c42(0xcc),a230_0xf89c42(0x121)],['skill:install',a230_0xf89c42(0x121)],['skills:',a230_0xf89c42(0x121)],[a230_0xf89c42(0xd5),a230_0xf89c42(0x121)],[a230_0xf89c42(0xf6),'rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>'],[a230_0xf89c42(0x132),a230_0xf89c42(0xf1)],[a230_0xf89c42(0x12c),'rabetbase\x20app\x20list\x20--remote'],['app:use',a230_0xf89c42(0xc8)],[a230_0xf89c42(0x13f),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a230_0xf89c42(0xfa),a230_0xf89c42(0x134)],['knowledge-base:list',a230_0xf89c42(0x107)],[a230_0xf89c42(0x11b),'rabetbase\x20kb\x20detail'],[a230_0xf89c42(0x127),a230_0xf89c42(0xde)],[a230_0xf89c42(0xf2),a230_0xf89c42(0xca)],['knowledge-base:delete',a230_0xf89c42(0xe6)],[a230_0xf89c42(0xe2),'rabetbase\x20role\x20list'],['data:filter',a230_0xf89c42(0x133)],[a230_0xf89c42(0xd2),a230_0xf89c42(0xec)],[a230_0xf89c42(0xe3),'rabetbase\x20page\x20data-list-status'],[a230_0xf89c42(0xdd),a230_0xf89c42(0x12d)],['page:custom-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],['page:react-list','rabetbase\x20page\x20custom-list'],[a230_0xf89c42(0x11f),a230_0xf89c42(0x12a)],[a230_0xf89c42(0xfe),a230_0xf89c42(0x102)],[a230_0xf89c42(0x10a),a230_0xf89c42(0x104)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0xf89c42(0x115),a230_0xf89c42(0xe4)],[a230_0xf89c42(0x113),a230_0xf89c42(0xe4)],[a230_0xf89c42(0x131),a230_0xf89c42(0xef)],[a230_0xf89c42(0x128),a230_0xf89c42(0x101)],[a230_0xf89c42(0xeb),a230_0xf89c42(0x101)],[a230_0xf89c42(0xf3),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus-set',a230_0xf89c42(0x101)],[a230_0xf89c42(0x119),a230_0xf89c42(0x101)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a230_0xf89c42(0x122)],['start',a230_0xf89c42(0x114)],[a230_0xf89c42(0xcd),a230_0xf89c42(0x10c)],['preview',a230_0xf89c42(0xed)],[a230_0xf89c42(0x11c),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x185bb8,_0x1da3cc){const _0x4b8353=a230_0xf89c42;if(!_0x185bb8)return undefined;const _0x1abbdf=REMOVED_COMMAND_REPLACEMENTS[_0x4b8353(0xf0)](_0x185bb8+':'+(_0x1da3cc??'')),_0x3b1bc6=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x185bb8),_0x32b3f9=_0x1abbdf??_0x3b1bc6,_0x4be687=REMOVED_COMMAND_HINTS[_0x4b8353(0xf0)](_0x185bb8+':'+(_0x1da3cc??''));if(!_0x32b3f9&&!_0x4be687)return undefined;const _0x453e68=_0x3b1bc6?_0x185bb8:_0x1da3cc?_0x185bb8+'\x20'+_0x1da3cc:_0x185bb8;return{'command':_0x453e68,'message':'`rabetbase\x20'+_0x453e68+_0x4b8353(0x10d),'hint':_0x4be687??_0x4b8353(0xd0)+_0x32b3f9+'`\x20instead.'};}export function findDefinition(_0x247427,_0x1c53f7){const _0x1288fd=a230_0xf89c42;return definitions[_0x1288fd(0xf0)](_0x247427+':'+_0x1c53f7);}export function isKnownService(_0x74dec0){const _0x3ba158=a230_0xf89c42;return serviceByName[_0x3ba158(0x13a)](_0x74dec0);}export function isDeclarativeService(_0x3ec4eb){const _0x3284b4=a230_0xf89c42;return serviceGroups[_0x3284b4(0x13a)](_0x3ec4eb)||serviceByName[_0x3284b4(0xf0)](_0x3ec4eb)?.[_0x3284b4(0xea)]!==undefined;}export function getServiceEntry(_0x501b3d){const _0x132c3d=a230_0xf89c42;return serviceByName[_0x132c3d(0xf0)](_0x501b3d);}export function getLegacyHandler(_0x198ad6,_0x17b623){return undefined;}export function getAllDefinitions(){const _0x94e48=a230_0xf89c42;return Array[_0x94e48(0x10f)](definitions[_0x94e48(0x11d)]());}
@@ -1 +1 @@
1
- const a231_0x1d08f2=a231_0x451b;(function(_0x5cfbd2,_0x24e058){const _0x335a45=a231_0x451b,_0x394495=_0x5cfbd2();while(!![]){try{const _0x56fb9a=-parseInt(_0x335a45(0x14d))/0x1+-parseInt(_0x335a45(0x145))/0x2+parseInt(_0x335a45(0x143))/0x3+parseInt(_0x335a45(0x156))/0x4*(parseInt(_0x335a45(0x14c))/0x5)+parseInt(_0x335a45(0x14b))/0x6*(parseInt(_0x335a45(0x158))/0x7)+parseInt(_0x335a45(0x14a))/0x8+-parseInt(_0x335a45(0x147))/0x9;if(_0x56fb9a===_0x24e058)break;else _0x394495['push'](_0x394495['shift']());}catch(_0x4710bc){_0x394495['push'](_0x394495['shift']());}}}(a231_0x5a96,0x27d3e));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_0x451b(_0x4795f5,_0x5ee773){_0x4795f5=_0x4795f5-0x143;const _0x5a9695=a231_0x5a96();let _0x451be5=_0x5a9695[_0x4795f5];return _0x451be5;}const DELETE_PATH='/smartapi/permit/role/delete';function a231_0x5a96(){const _0x1bb6ac=['\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','delete','1244248SkykeD','num','23758Unnxyk','252354DYbrqy','Role\x20still\x20has\x20','536434PtTgPE','high-risk-write','2604618KwfrCW','roleName','Deleted\x20role\x20','1722720lbLOZZ','300tDKNmx','5eyLYPM','59467VuyLcF','dev','userCount','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','appCode','role'];a231_0x5a96=function(){return _0x1bb6ac;};return a231_0x5a96();}export const roleDelete={'service':a231_0x1d08f2(0x152),'command':a231_0x1d08f2(0x155),'description':a231_0x1d08f2(0x150),'risk':a231_0x1d08f2(0x146),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x178af3){const _0x4f676a=a231_0x1d08f2,_0x4691d1=_0x178af3[_0x4f676a(0x157)]('id'),_0x160c62=await getRoleById(_0x178af3[_0x4f676a(0x151)],_0x4691d1);return assertCustomRole(_0x160c62,_0x4f676a(0x155)),asDryRunResult({'scope':_0x4f676a(0x14e),'operation':'delete','selector':{'appCode':_0x178af3['appCode'],'roleId':_0x4691d1,'roleName':_0x160c62[_0x4f676a(0x148)]},'before':projectRole(_0x160c62),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x160c62[_0x4f676a(0x14f)]>0x0?[_0x4f676a(0x144)+_0x160c62['userCount']+_0x4f676a(0x153)]:[]},{'method':_0x4f676a(0x154),'url':DELETE_PATH});},async 'execute'(_0x2db50d){const _0x50b8c5=a231_0x1d08f2,_0x2db351=_0x2db50d[_0x50b8c5(0x157)]('id'),_0x7b98c9=await getRoleById(_0x2db50d[_0x50b8c5(0x151)],_0x2db351);return assertCustomRole(_0x7b98c9,_0x50b8c5(0x155)),await deleteAppRole(_0x2db351),{'ok':!![],'data':{'scope':_0x50b8c5(0x14e),'operation':_0x50b8c5(0x155),'selector':{'appCode':_0x2db50d['appCode'],'roleId':_0x2db351,'roleName':_0x7b98c9[_0x50b8c5(0x148)]},'before':projectRole(_0x7b98c9),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x50b8c5(0x149)+_0x7b98c9['roleName']+'\x20(id='+_0x2db351+')'};}};
1
+ function a231_0x3241(){const _0x2e7b59=['1166250ehmNaq','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','\x20(id=','appCode','userCount','1qYaokz','/smartapi/permit/role/delete','10466072lkacpC','18NTzOQr','632942EFUQOj','681792VchFSJ','roleName','high-risk-write','delete','Deleted\x20role\x20','dev','2219955IHvrpU','POST','num','Role\x20still\x20has\x20','3627340YhxbTx','4967865GZMLMn'];a231_0x3241=function(){return _0x2e7b59;};return a231_0x3241();}const a231_0xe5b0e9=a231_0x3887;(function(_0x58093b,_0x29fa3c){const _0x20a0d2=a231_0x3887,_0x298c39=_0x58093b();while(!![]){try{const _0x2fa37a=-parseInt(_0x20a0d2(0xc1))/0x1*(-parseInt(_0x20a0d2(0xaf))/0x2)+-parseInt(_0x20a0d2(0xb6))/0x3+parseInt(_0x20a0d2(0xb0))/0x4+-parseInt(_0x20a0d2(0xba))/0x5+-parseInt(_0x20a0d2(0xbc))/0x6+-parseInt(_0x20a0d2(0xbb))/0x7+parseInt(_0x20a0d2(0xad))/0x8*(parseInt(_0x20a0d2(0xae))/0x9);if(_0x2fa37a===_0x29fa3c)break;else _0x298c39['push'](_0x298c39['shift']());}catch(_0x3412b5){_0x298c39['push'](_0x298c39['shift']());}}}(a231_0x3241,0xb32da));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a231_0xe5b0e9(0xc2);function a231_0x3887(_0x27f87a,_0x1463d5){_0x27f87a=_0x27f87a-0xad;const _0x3241eb=a231_0x3241();let _0x3887e8=_0x3241eb[_0x27f87a];return _0x3887e8;}export const roleDelete={'service':'role','command':a231_0xe5b0e9(0xb3),'description':a231_0xe5b0e9(0xbd),'risk':a231_0xe5b0e9(0xb2),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x27a0a3){const _0x388573=a231_0xe5b0e9,_0x21c501=_0x27a0a3[_0x388573(0xb8)]('id'),_0x1f785a=await getRoleById(_0x27a0a3[_0x388573(0xbf)],_0x21c501);return assertCustomRole(_0x1f785a,_0x388573(0xb3)),asDryRunResult({'scope':_0x388573(0xb5),'operation':'delete','selector':{'appCode':_0x27a0a3[_0x388573(0xbf)],'roleId':_0x21c501,'roleName':_0x1f785a['roleName']},'before':projectRole(_0x1f785a),'after':null,'dryRun':!![],'backend':{'method':_0x388573(0xb7),'path':DELETE_PATH},'warnings':_0x1f785a[_0x388573(0xc0)]>0x0?[_0x388573(0xb9)+_0x1f785a[_0x388573(0xc0)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x388573(0xb7),'url':DELETE_PATH});},async 'execute'(_0x2fd285){const _0x21c936=a231_0xe5b0e9,_0x18a222=_0x2fd285[_0x21c936(0xb8)]('id'),_0x42deb0=await getRoleById(_0x2fd285[_0x21c936(0xbf)],_0x18a222);return assertCustomRole(_0x42deb0,_0x21c936(0xb3)),await deleteAppRole(_0x18a222),{'ok':!![],'data':{'scope':_0x21c936(0xb5),'operation':'delete','selector':{'appCode':_0x2fd285['appCode'],'roleId':_0x18a222,'roleName':_0x42deb0['roleName']},'before':projectRole(_0x42deb0),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x21c936(0xb4)+_0x42deb0[_0x21c936(0xb1)]+_0x21c936(0xbe)+_0x18a222+')'};}};
@@ -1 +1 @@
1
- const a232_0x3f8c6b=a232_0x550f;(function(_0x4659d4,_0x1cacf8){const _0xdca87e=a232_0x550f,_0x17cac8=_0x4659d4();while(!![]){try{const _0x12bd46=parseInt(_0xdca87e(0xc3))/0x1*(parseInt(_0xdca87e(0xc6))/0x2)+parseInt(_0xdca87e(0xc4))/0x3+-parseInt(_0xdca87e(0xca))/0x4+parseInt(_0xdca87e(0xcc))/0x5+parseInt(_0xdca87e(0xcf))/0x6+parseInt(_0xdca87e(0xcd))/0x7+-parseInt(_0xdca87e(0xc2))/0x8;if(_0x12bd46===_0x1cacf8)break;else _0x17cac8['push'](_0x17cac8['shift']());}catch(_0x549242){_0x17cac8['push'](_0x17cac8['shift']());}}}(a232_0x33f2,0x7d286));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a232_0x33f2(){const _0x319faa=['detail','num','3313348fZmRXK','Show\x20a\x20single\x20role\x27s\x20detail','2577230TOnDWf','6749218KlOxTK','role','2080500JDDEzv','12631984VcpGVd','160258snUiTn','396189NjwCvK','roleType','12sGpVwa','Role\x20'];a232_0x33f2=function(){return _0x319faa;};return a232_0x33f2();}function a232_0x550f(_0x28b83e,_0xc01b98){_0x28b83e=_0x28b83e-0xc2;const _0x33f24e=a232_0x33f2();let _0x550f14=_0x33f24e[_0x28b83e];return _0x550f14;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x3f8c6b(0xce),'command':a232_0x3f8c6b(0xc8),'description':a232_0x3f8c6b(0xcb),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4a0f86){const _0x27375d=a232_0x3f8c6b,_0x54a92a=_0x4a0f86[_0x27375d(0xc9)]('id'),_0xd33523=await getRoleById(_0x4a0f86['appCode'],_0x54a92a);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0xd33523)},'message':_0x27375d(0xc7)+_0xd33523['roleName']+'\x20('+_0xd33523[_0x27375d(0xc5)]+')'};}};
1
+ const a232_0x4e4b08=a232_0x3e55;(function(_0x27428b,_0x51f1c0){const _0x203967=a232_0x3e55,_0x3e46d6=_0x27428b();while(!![]){try{const _0x408114=-parseInt(_0x203967(0x161))/0x1*(-parseInt(_0x203967(0x157))/0x2)+-parseInt(_0x203967(0x160))/0x3*(-parseInt(_0x203967(0x162))/0x4)+-parseInt(_0x203967(0x165))/0x5*(-parseInt(_0x203967(0x159))/0x6)+parseInt(_0x203967(0x164))/0x7*(parseInt(_0x203967(0x168))/0x8)+-parseInt(_0x203967(0x15c))/0x9+parseInt(_0x203967(0x167))/0xa+parseInt(_0x203967(0x166))/0xb*(-parseInt(_0x203967(0x163))/0xc);if(_0x408114===_0x51f1c0)break;else _0x3e46d6['push'](_0x3e46d6['shift']());}catch(_0x1bd570){_0x3e46d6['push'](_0x3e46d6['shift']());}}}(a232_0x1ead,0xaca9d));function a232_0x3e55(_0x3c41c3,_0x12161d){_0x3c41c3=_0x3c41c3-0x157;const _0x1eadcf=a232_0x1ead();let _0x3e5554=_0x1eadcf[_0x3c41c3];return _0x3e5554;}function a232_0x1ead(){const _0xec8ecc=['1ejcTPC','4wEWBkh','22563804UPbRmm','8987916mEyMYc','33980AJNSuc','11TqExmr','1776030wGSvax','8QiaPnD','detail','1598648DQaVyb','Show\x20a\x20single\x20role\x27s\x20detail','72YPvDjj','dev','role','5716053NcggJU','roleName','roleType','appCode','2640588gICbaZ'];a232_0x1ead=function(){return _0xec8ecc;};return a232_0x1ead();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x4e4b08(0x15b),'command':a232_0x4e4b08(0x169),'description':a232_0x4e4b08(0x158),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xcc70ae){const _0x48a38d=a232_0x4e4b08,_0x8ce034=_0xcc70ae['num']('id'),_0x310c8c=await getRoleById(_0xcc70ae[_0x48a38d(0x15f)],_0x8ce034);return{'ok':!![],'data':{'scope':_0x48a38d(0x15a),'role':projectRole(_0x310c8c)},'message':'Role\x20'+_0x310c8c[_0x48a38d(0x15d)]+'\x20('+_0x310c8c[_0x48a38d(0x15e)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x3505e1,_0x2903f6){const _0x42bfe0=a233_0xf881,_0x559d30=_0x3505e1();while(!![]){try{const _0x3a7c11=parseInt(_0x42bfe0(0xe7))/0x1*(-parseInt(_0x42bfe0(0xf2))/0x2)+-parseInt(_0x42bfe0(0xee))/0x3+parseInt(_0x42bfe0(0xec))/0x4+parseInt(_0x42bfe0(0xf0))/0x5*(-parseInt(_0x42bfe0(0xef))/0x6)+-parseInt(_0x42bfe0(0xf1))/0x7*(-parseInt(_0x42bfe0(0xed))/0x8)+parseInt(_0x42bfe0(0xeb))/0x9*(parseInt(_0x42bfe0(0xea))/0xa)+-parseInt(_0x42bfe0(0xe8))/0xb*(parseInt(_0x42bfe0(0xe9))/0xc);if(_0x3a7c11===_0x2903f6)break;else _0x559d30['push'](_0x559d30['shift']());}catch(_0x9be29){_0x559d30['push'](_0x559d30['shift']());}}}(a233_0x12be,0xa9893));import{roleList}from'../../commands/role/list.js';function a233_0x12be(){const _0x3a6a19=['2UgNhcA','1052447HuevHA','166705YImQKX','12YtsFJf','10OcOYwr','5236299UkfZfG','1448664CLjNPY','864cInIKn','477702bEmzDL','750zWccBC','1910ZTDepy','66437kquqaO'];a233_0x12be=function(){return _0x3a6a19;};return a233_0x12be();}function a233_0xf881(_0x2dba13,_0x4b991a){_0x2dba13=_0x2dba13-0xe7;const _0x12be8d=a233_0x12be();let _0xf88179=_0x12be8d[_0x2dba13];return _0xf88179;}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x78ada,_0x43c2e8){const _0xeb4bac=a233_0x5433,_0x5e7611=_0x78ada();while(!![]){try{const _0x3f3a9b=-parseInt(_0xeb4bac(0xf2))/0x1+parseInt(_0xeb4bac(0xf3))/0x2*(-parseInt(_0xeb4bac(0xf1))/0x3)+-parseInt(_0xeb4bac(0xee))/0x4*(-parseInt(_0xeb4bac(0xec))/0x5)+-parseInt(_0xeb4bac(0xed))/0x6*(parseInt(_0xeb4bac(0xea))/0x7)+-parseInt(_0xeb4bac(0xf0))/0x8+-parseInt(_0xeb4bac(0xef))/0x9+parseInt(_0xeb4bac(0xeb))/0xa;if(_0x3f3a9b===_0x43c2e8)break;else _0x5e7611['push'](_0x5e7611['shift']());}catch(_0x54a09e){_0x5e7611['push'](_0x5e7611['shift']());}}}(a233_0x40d5,0x2dc27));import{roleList}from'../../commands/role/list.js';function a233_0x5433(_0x26956a,_0x2c30d7){_0x26956a=_0x26956a-0xea;const _0x40d5aa=a233_0x40d5();let _0x5433fd=_0x40d5aa[_0x26956a];return _0x5433fd;}import{roleDetail}from'../../commands/role/detail.js';function a233_0x40d5(){const _0x56250b=['226505leEIVq','3382HWooir','7343pVZrsc','6020050cPYkOx','560yboUaj','396FptAWZ','1996ZpGhta','644031VRMsWh','608864uVlhIG','48WhwhQE'];a233_0x40d5=function(){return _0x56250b;};return a233_0x40d5();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a234_0x15b8a3=a234_0x31e7;(function(_0x2e0a00,_0x468ad9){const _0x250bbf=a234_0x31e7,_0x343bf5=_0x2e0a00();while(!![]){try{const _0x133329=parseInt(_0x250bbf(0xdb))/0x1*(parseInt(_0x250bbf(0xf4))/0x2)+parseInt(_0x250bbf(0xd0))/0x3*(-parseInt(_0x250bbf(0xe2))/0x4)+-parseInt(_0x250bbf(0xd4))/0x5+parseInt(_0x250bbf(0xee))/0x6*(-parseInt(_0x250bbf(0xec))/0x7)+parseInt(_0x250bbf(0xd9))/0x8*(parseInt(_0x250bbf(0xef))/0x9)+-parseInt(_0x250bbf(0xe5))/0xa+parseInt(_0x250bbf(0xdf))/0xb;if(_0x133329===_0x468ad9)break;else _0x343bf5['push'](_0x343bf5['shift']());}catch(_0x1e6366){_0x343bf5['push'](_0x343bf5['shift']());}}}(a234_0x3999,0xc15b0));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a234_0x31e7(_0x3733b9,_0x129f06){_0x3733b9=_0x3733b9-0xce;const _0x399943=a234_0x3999();let _0x31e780=_0x399943[_0x3733b9];return _0x31e780;}function a234_0x3999(){const _0x32d9de=['includes','num','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','303BYUPQq','appCode','str','page','7531025hlUefy','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','\x20role(s)','read','toUpperCase','3416JZGjCK','map','136199NATcXr','type','number','Use\x20one\x20of:\x20','64539761jVAXtp','trim','filter','60172froHbo','dev','role','14544050kCmwMX','validation','Page\x20size\x20(1-100)','join','pagesize','length','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','1785oaNnbp','ADMIN','33066LseOIc','11331NIfUBL','list','Filter\x20by\x20role\x20type','OWNER','Page\x20index\x20(1-based)','4PXLUeA'];a234_0x3999=function(){return _0x32d9de;};return a234_0x3999();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x15b8a3(0xed),'DEV',a234_0x15b8a3(0xf2),'CUSTOM'];export const roleList={'service':a234_0x15b8a3(0xe4),'command':a234_0x15b8a3(0xf0),'description':a234_0x15b8a3(0xeb),'risk':a234_0x15b8a3(0xd7),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x15b8a3(0xdc),'type':'string','required':![],'description':a234_0x15b8a3(0xf1),'enum':ROLE_TYPES},{'name':'page','type':a234_0x15b8a3(0xdd),'description':a234_0x15b8a3(0xf3),'default':0x1},{'name':a234_0x15b8a3(0xe9),'type':'number','description':a234_0x15b8a3(0xe7),'default':0x64}],async 'validate'(_0x5a1004){const _0x49ff82=a234_0x15b8a3,_0x31e81d=_0x5a1004[_0x49ff82(0xd2)](_0x49ff82(0xdc))['trim']();if(_0x31e81d&&!ROLE_TYPES[_0x49ff82(0xf5)](_0x31e81d[_0x49ff82(0xd8)]()))throw CliErrors['validation']('Invalid\x20--type\x20\x22'+_0x31e81d+'\x22.',_0x49ff82(0xde)+ROLE_TYPES[_0x49ff82(0xe8)](',\x20')+'.');const _0x3c1442=_0x5a1004[_0x49ff82(0xce)](_0x49ff82(0xd3),0x1),_0x2a5dbc=_0x5a1004[_0x49ff82(0xce)](_0x49ff82(0xe9),0x64);if(_0x3c1442<0x1)throw CliErrors['validation'](_0x49ff82(0xcf));if(_0x2a5dbc<0x1||_0x2a5dbc>0x64)throw CliErrors[_0x49ff82(0xe6)](_0x49ff82(0xd5));},async 'execute'(_0x1e7020){const _0x585e30=a234_0x15b8a3,_0x110fa1=_0x1e7020['num'](_0x585e30(0xd3),0x1)||0x1,_0x18a15d=_0x1e7020[_0x585e30(0xce)](_0x585e30(0xe9),0x64)||0x64,_0x4c160d=_0x1e7020[_0x585e30(0xd2)](_0x585e30(0xdc))[_0x585e30(0xe0)]()['toUpperCase'](),{items:_0x9e5892,paging:_0x96768d}=await listAppRoles(_0x1e7020[_0x585e30(0xd1)],{'currentPage':_0x110fa1,'pageSize':_0x18a15d}),_0x1022d0=_0x4c160d?_0x9e5892[_0x585e30(0xe1)](_0x2e517d=>_0x2e517d['roleType']===_0x4c160d):_0x9e5892,_0xc84f44=_0x1022d0[_0x585e30(0xda)](projectRole);return{'ok':!![],'data':{'scope':_0x585e30(0xe3),'roles':_0xc84f44,'paging':_0x96768d},'message':'Found\x20'+_0xc84f44[_0x585e30(0xea)]+_0x585e30(0xd6)};}};
1
+ const a234_0x59f164=a234_0x19da;(function(_0xb45bb7,_0x1af4eb){const _0x437953=a234_0x19da,_0x3b5647=_0xb45bb7();while(!![]){try{const _0x33f741=parseInt(_0x437953(0x17f))/0x1+parseInt(_0x437953(0x184))/0x2+parseInt(_0x437953(0x17d))/0x3*(parseInt(_0x437953(0x17b))/0x4)+-parseInt(_0x437953(0x18f))/0x5*(parseInt(_0x437953(0x18a))/0x6)+parseInt(_0x437953(0x186))/0x7*(parseInt(_0x437953(0x176))/0x8)+-parseInt(_0x437953(0x16b))/0x9+parseInt(_0x437953(0x18c))/0xa*(-parseInt(_0x437953(0x18d))/0xb);if(_0x33f741===_0x1af4eb)break;else _0x3b5647['push'](_0x3b5647['shift']());}catch(_0x2ab219){_0x3b5647['push'](_0x3b5647['shift']());}}}(a234_0x1e1b,0x3acf9));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a234_0x19da(_0x2485a7,_0x1cfdb6){_0x2485a7=_0x2485a7-0x169;const _0x1e1bd7=a234_0x1e1b();let _0x19da3b=_0x1e1bd7[_0x2485a7];return _0x19da3b;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a234_0x1e1b(){const _0x2b4721=['86382arwutC','CUSTOM','9394WfHgVR','join','read','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','12zfRQpv','Invalid\x20--type\x20\x22','74350maZLIB','209ZCtKIO','validation','467655khHQzf','type','appCode','includes','3650058yOTaWF','dev','map','string','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20index\x20(1-based)','number','Page\x20size\x20(1-100)','role','trim','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','776lNqRDu','page','pagesize','OWNER','DEV','1356412KBIgaU','Use\x20one\x20of:\x20','3XwVRqc','\x20role(s)','462310jdybmW','ADMIN','str','num','Found\x20'];a234_0x1e1b=function(){return _0x2b4721;};return a234_0x1e1b();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x59f164(0x180),a234_0x59f164(0x17a),a234_0x59f164(0x179),a234_0x59f164(0x185)];export const roleList={'service':a234_0x59f164(0x173),'command':'list','description':a234_0x59f164(0x175),'risk':a234_0x59f164(0x188),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x59f164(0x190),'type':a234_0x59f164(0x16e),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a234_0x59f164(0x177),'type':a234_0x59f164(0x171),'description':a234_0x59f164(0x170),'default':0x1},{'name':'pagesize','type':a234_0x59f164(0x171),'description':a234_0x59f164(0x172),'default':0x64}],async 'validate'(_0x122bb9){const _0x1096df=a234_0x59f164,_0x2fea7b=_0x122bb9[_0x1096df(0x181)]('type')['trim']();if(_0x2fea7b&&!ROLE_TYPES[_0x1096df(0x16a)](_0x2fea7b['toUpperCase']()))throw CliErrors['validation'](_0x1096df(0x18b)+_0x2fea7b+'\x22.',_0x1096df(0x17c)+ROLE_TYPES[_0x1096df(0x187)](',\x20')+'.');const _0x26d29c=_0x122bb9['num'](_0x1096df(0x177),0x1),_0x3f4121=_0x122bb9[_0x1096df(0x182)](_0x1096df(0x178),0x64);if(_0x26d29c<0x1)throw CliErrors[_0x1096df(0x18e)](_0x1096df(0x189));if(_0x3f4121<0x1||_0x3f4121>0x64)throw CliErrors[_0x1096df(0x18e)](_0x1096df(0x16f));},async 'execute'(_0x29cc08){const _0x56a6c7=a234_0x59f164,_0x59e26d=_0x29cc08[_0x56a6c7(0x182)](_0x56a6c7(0x177),0x1)||0x1,_0x3fd5f9=_0x29cc08[_0x56a6c7(0x182)](_0x56a6c7(0x178),0x64)||0x64,_0x5cfccd=_0x29cc08[_0x56a6c7(0x181)](_0x56a6c7(0x190))[_0x56a6c7(0x174)]()['toUpperCase'](),{items:_0x5ccdda,paging:_0x1bf4ec}=await listAppRoles(_0x29cc08[_0x56a6c7(0x169)],{'currentPage':_0x59e26d,'pageSize':_0x3fd5f9}),_0x76fe3e=_0x5cfccd?_0x5ccdda['filter'](_0x3fd61a=>_0x3fd61a['roleType']===_0x5cfccd):_0x5ccdda,_0x4d1a49=_0x76fe3e[_0x56a6c7(0x16d)](projectRole);return{'ok':!![],'data':{'scope':_0x56a6c7(0x16c),'roles':_0x4d1a49,'paging':_0x1bf4ec},'message':_0x56a6c7(0x183)+_0x4d1a49['length']+_0x56a6c7(0x17e)};}};
@@ -1 +1 @@
1
- const a235_0x147a6d=a235_0x3f49;(function(_0x20a7b5,_0x230073){const _0x4ff615=a235_0x3f49,_0x4fe60d=_0x20a7b5();while(!![]){try{const _0x2efe41=-parseInt(_0x4ff615(0xf9))/0x1*(-parseInt(_0x4ff615(0x122))/0x2)+parseInt(_0x4ff615(0x128))/0x3+parseInt(_0x4ff615(0xff))/0x4*(parseInt(_0x4ff615(0x114))/0x5)+parseInt(_0x4ff615(0x126))/0x6+-parseInt(_0x4ff615(0x134))/0x7+-parseInt(_0x4ff615(0xf7))/0x8*(parseInt(_0x4ff615(0x109))/0x9)+-parseInt(_0x4ff615(0x102))/0xa;if(_0x2efe41===_0x230073)break;else _0x4fe60d['push'](_0x4fe60d['shift']());}catch(_0x3ad014){_0x4fe60d['push'](_0x4fe60d['shift']());}}}(a235_0x1e07,0xe029b));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_0x147a6d(0x132),'required':!![],'description':a235_0x147a6d(0x145)};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};function a235_0x3f49(_0x3e2cf0,_0x41631f){_0x3e2cf0=_0x3e2cf0-0xf6;const _0x1e0746=a235_0x1e07();let _0x3f49be=_0x1e0746[_0x3e2cf0];return _0x3f49be;}export const USER_REF_FLAG={'name':a235_0x147a6d(0x13c),'type':a235_0x147a6d(0x137),'required':!![],'description':a235_0x147a6d(0x139)};export const NAME_FLAG={'name':a235_0x147a6d(0xf6),'type':a235_0x147a6d(0x137),'required':!![],'description':a235_0x147a6d(0xfa)};export const USER_NAME_FLAG={'name':a235_0x147a6d(0xf6),'type':'string','required':!![],'description':a235_0x147a6d(0x10c)};export const REMARK_FLAG={'name':a235_0x147a6d(0x108),'type':a235_0x147a6d(0x137),'required':![],'description':a235_0x147a6d(0x105)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x147a6d(0x110),'type':a235_0x147a6d(0x132),'required':![],'description':a235_0x147a6d(0x111)};export const BUILTIN_ROLE_TYPES=[a235_0x147a6d(0x146),a235_0x147a6d(0x10e),a235_0x147a6d(0xfe)];export function isBuiltinRole(_0x2edce7){const _0x4a8d39=a235_0x147a6d;return BUILTIN_ROLE_TYPES[_0x4a8d39(0x13b)](_0x2edce7);}export function assertCustomRole(_0x45c284,_0x275c85){const _0x55be6d=a235_0x147a6d;if(_0x45c284['roleType']!==_0x55be6d(0x10f))throw CliErrors[_0x55be6d(0x101)](_0x55be6d(0x138)+_0x275c85+'\x20built-in\x20role\x20'+_0x45c284[_0x55be6d(0x13a)]+'\x20('+_0x45c284[_0x55be6d(0x10a)]+').',_0x55be6d(0x115));}export function projectRole(_0x1293c3){const _0x5b8710=a235_0x147a6d;return{'id':_0x1293c3['id'],'roleName':_0x1293c3['roleName'],'roleType':_0x1293c3[_0x5b8710(0x10a)],'remark':_0x1293c3[_0x5b8710(0x108)],'userCount':_0x1293c3[_0x5b8710(0x11c)],'permitCount':_0x1293c3[_0x5b8710(0x13d)],'builtin':isBuiltinRole(_0x1293c3[_0x5b8710(0x10a)])};}function a235_0x1e07(){const _0x563921=['3098583KUboqz','totalCount','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','find','\x20duplicate\x20memberships\x20for\x20user\x20','User\x20','test','push','\x22:\x20','flagMissing','number','map','4290552hdpTpF','appCode','str','string','Cannot\x20','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','roleName','includes','user','permitCount','join','length','Pass\x20--role\x20<id|name>.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','expectUserCount','\x20is\x20not\x20a\x20member\x20of\x20role\x20','dev','Role\x20id\x20(from\x20`role\x20list`)','ADMIN','/smartapi/permit/user-role/create','flag','Pass\x20--user\x20<id>.','username','name','3665224ircPUb','dryRun','2nSsSMe','Role\x20name','Check\x20the\x20nickname/username.\x20','No\x20tenant\x20member\x20matches\x20\x22','POST','OWNER','928iOFWMx','role','validation','19638080KTyTEg','\x20member(s)\x20but\x20role\x20has\x20','toLowerCase','Optional\x20role\x20remark/description','tenant','Pass\x20--user\x20<id|name>.','remark','36BbUIxp','roleType','Anti-drift\x20check\x20failed:\x20expected\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20is\x20already\x20a\x20member\x20of\x20role\x20','DEV','CUSTOM','expect-user-count','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x22\x20not\x20found\x20in\x20app\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','33710FbtdMu','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','user-add','\x22\x20is\x20ambiguous\x20(ids:\x20',';\x20no\x20change.','nickname','Removed\x20','Missing\x20role\x20reference.','userCount','Multiple\x20tenant\x20members\x20match\x20\x22','userId','\x20not\x20found\x20in\x20app\x20','Role\x20name\x20\x22','\x20members\x20of\x20the\x20OWNER\x20role.','1802778cugOGj','Disambiguate\x20with\x20--role\x20<id>.','authRequired','filter','5566464elfABs','trim'];a235_0x1e07=function(){return _0x563921;};return a235_0x1e07();}export async function resolveRoleRef(_0x5cb23e,_0x2c0e29){const _0x1bf107=a235_0x147a6d,_0x45ea59=_0x2c0e29[_0x1bf107(0x127)]();if(!_0x45ea59)throw CliErrors['validation'](_0x1bf107(0x11b),_0x1bf107(0x140));if(/^\d+$/[_0x1bf107(0x12e)](_0x45ea59))return getRoleById(_0x5cb23e,Number(_0x45ea59));const _0x5dc394=await listAllAppRoles(_0x5cb23e),_0x2fa60b=_0x5dc394[_0x1bf107(0x125)](_0x59952c=>_0x59952c['roleName']===_0x45ea59);if(_0x2fa60b[_0x1bf107(0x13f)]===0x0)throw CliErrors[_0x1bf107(0x101)](_0x1bf107(0x120)+_0x45ea59+_0x1bf107(0x112)+_0x5cb23e+'.',_0x1bf107(0x141));if(_0x2fa60b[_0x1bf107(0x13f)]>0x1){const _0x4d402e=_0x2fa60b['map'](_0x50bd40=>_0x50bd40['id'])[_0x1bf107(0x13e)](',\x20');throw CliErrors[_0x1bf107(0x101)]('Role\x20name\x20\x22'+_0x45ea59+_0x1bf107(0x117)+_0x4d402e+').',_0x1bf107(0x123));}return _0x2fa60b[0x0];}export async function getRoleById(_0x5b9129,_0x147c58){const _0x9fc84=a235_0x147a6d,_0x5cac0b=await listAllAppRoles(_0x5b9129),_0x5d50ba=_0x5cac0b[_0x9fc84(0x125)](_0x54c47e=>_0x54c47e['id']===_0x147c58&&(!_0x54c47e['appCode']||_0x54c47e[_0x9fc84(0x135)]===_0x5b9129));if(_0x5d50ba[_0x9fc84(0x13f)]!==0x1)throw CliErrors[_0x9fc84(0x101)]('Role\x20id\x20'+_0x147c58+_0x9fc84(0x11f)+_0x5b9129+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x5d50ba[0x0];}async function listAllAppRoles(_0x9cefbd){const _0x20f022=a235_0x147a6d,_0x2f5f14=0x64,_0x3e997f=[];for(let _0x1db7d9=0x1;;_0x1db7d9+=0x1){const {items:_0x1bba9d,paging:_0x2cd245}=await listAppRoles(_0x9cefbd,{'currentPage':_0x1db7d9,'pageSize':_0x2f5f14});_0x3e997f[_0x20f022(0x12f)](..._0x1bba9d);if(_0x1bba9d[_0x20f022(0x13f)]<_0x2f5f14||_0x2cd245&&_0x3e997f['length']>=_0x2cd245[_0x20f022(0x129)])return _0x3e997f;}}export async function resolveTenantCode(){const _0x5e852b=a235_0x147a6d,_0x2b0951=await getSessionUserInfo(),_0x17eeb9=_0x2b0951?.[_0x5e852b(0x13c)]?.[_0x5e852b(0x106)]?.['tenant_code'];if(!_0x17eeb9)throw CliErrors[_0x5e852b(0x124)](_0x5e852b(0x12a));return _0x17eeb9;}function matchMember(_0x45927e,_0x11ad49){const _0x2f8ffd=a235_0x147a6d,_0x3dc09e=_0x11ad49[_0x2f8ffd(0x127)]()[_0x2f8ffd(0x104)]();return(_0x45927e[_0x2f8ffd(0x119)]??'')[_0x2f8ffd(0x104)]()===_0x3dc09e||(_0x45927e['username']??'')[_0x2f8ffd(0x104)]()===_0x3dc09e;}export async function resolveUserRef(_0x539bd4,_0x1cb7a5=a235_0x147a6d(0x149)){const _0xdf2318=a235_0x147a6d,_0x37febf=_0x539bd4[_0xdf2318(0x127)]();if(!_0x37febf)throw CliErrors[_0xdf2318(0x101)]('Missing\x20user\x20reference.',_0xdf2318(0x107));const _0x394f16=await resolveTenantCode(),_0x59c8ac=await getTenantMembers(_0x394f16);if(/^\d+$/[_0xdf2318(0x12e)](_0x37febf)){const _0x30acdc=Number(_0x37febf),_0x5b666f=_0x59c8ac[_0xdf2318(0x12b)](_0x32fb45=>_0x32fb45[_0xdf2318(0x11e)]===_0x30acdc);return{'userId':_0x30acdc,'username':_0x5b666f?.[_0xdf2318(0x14a)]??String(_0x30acdc),'nickname':_0x5b666f?.[_0xdf2318(0x119)],'matchedBy':'id'};}const _0x517b60=_0x59c8ac[_0xdf2318(0x125)](_0x5c5c0c=>matchMember(_0x5c5c0c,_0x37febf));if(_0x517b60[_0xdf2318(0x13f)]===0x0)throw CliErrors[_0xdf2318(0x101)](_0xdf2318(0xfc)+_0x37febf+'\x22.',_0xdf2318(0xfb)+_0x1cb7a5);if(_0x517b60[_0xdf2318(0x13f)]>0x1){const _0x29bef5=_0x517b60['map'](_0x270c7c=>(_0x270c7c[_0xdf2318(0x119)]??_0x270c7c[_0xdf2318(0x14a)]??'?')+'('+_0x270c7c[_0xdf2318(0x11e)]+')')[_0xdf2318(0x13e)](',\x20');throw CliErrors[_0xdf2318(0x101)](_0xdf2318(0x11d)+_0x37febf+_0xdf2318(0x130)+_0x29bef5+'.',_0x1cb7a5);}const _0x226e5b=_0x517b60[0x0];return{'userId':_0x226e5b[_0xdf2318(0x11e)],'username':_0x226e5b[_0xdf2318(0x14a)]??String(_0x226e5b[_0xdf2318(0x11e)]),'nickname':_0x226e5b['nickname'],'matchedBy':_0xdf2318(0xf6)};}export const CREATE_USER_ROLE_PATH=a235_0x147a6d(0x147);export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';export function computeRoleUserMutation(_0x1d0b3d){const _0x46ef02=a235_0x147a6d,{operation:_0x497f81,appCode:_0x5a27cb,role:_0x3708ca,relations:_0xe9b0e5,user:_0x4e714a}=_0x1d0b3d,_0x4c3b03=[...new Set(_0xe9b0e5[_0x46ef02(0x133)](_0x5b8a72=>_0x5b8a72['userId']))],_0x17339d=[];if(_0x1d0b3d['expectUserCount']!==undefined&&_0x1d0b3d[_0x46ef02(0x142)]!==_0x4c3b03[_0x46ef02(0x13f)])throw CliErrors[_0x46ef02(0x101)](_0x46ef02(0x10b)+_0x1d0b3d['expectUserCount']+_0x46ef02(0x103)+_0x4c3b03[_0x46ef02(0x13f)]+'.',_0x46ef02(0x113));const _0x25d724=_0x4c3b03[_0x46ef02(0x13b)](_0x4e714a[_0x46ef02(0x11e)]),_0x3fae52=_0xe9b0e5[_0x46ef02(0x125)](_0x392634=>_0x392634[_0x46ef02(0x11e)]===_0x4e714a[_0x46ef02(0x11e)])['map'](_0x18a083=>_0x18a083['id']),_0x2f9d91=_0x497f81==='user-add'?!_0x25d724:_0x25d724;let _0x5911dc=_0x4c3b03;_0x497f81==='user-add'?_0x25d724?_0x17339d[_0x46ef02(0x12f)](_0x46ef02(0x12d)+_0x4e714a[_0x46ef02(0x11e)]+_0x46ef02(0x10d)+_0x3708ca[_0x46ef02(0x13a)]+_0x46ef02(0x118)):_0x5911dc=[..._0x4c3b03,_0x4e714a['userId']]:!_0x25d724?_0x17339d['push'](_0x46ef02(0x12d)+_0x4e714a[_0x46ef02(0x11e)]+_0x46ef02(0x143)+_0x3708ca[_0x46ef02(0x13a)]+_0x46ef02(0x118)):(_0x5911dc=_0x4c3b03[_0x46ef02(0x125)](_0x2f5499=>_0x2f5499!==_0x4e714a['userId']),_0x3fae52[_0x46ef02(0x13f)]>0x1&&_0x17339d['push'](_0x46ef02(0x11a)+_0x3fae52['length']+_0x46ef02(0x12c)+_0x4e714a[_0x46ef02(0x11e)]+'.'));const _0x2d51fa={'scope':_0x46ef02(0x144),'operation':_0x497f81,'selector':{'appCode':_0x5a27cb,'roleId':_0x3708ca['id'],'roleName':_0x3708ca[_0x46ef02(0x13a)],'userId':_0x4e714a[_0x46ef02(0x11e)]},'before':{'userIds':_0x4c3b03},'after':{'userIds':_0x5911dc},'dryRun':_0x1d0b3d[_0x46ef02(0xf8)],'backend':{'method':_0x46ef02(0xfd),'path':_0x497f81===_0x46ef02(0x116)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x17339d};return{'mutation':_0x2d51fa,'changed':_0x2f9d91,'matchingRelationIds':_0x3fae52};}export async function loadDevRoleRelations(_0x58f143,_0xcb4046){const _0x44f0f3=a235_0x147a6d,_0x211464=0x64,_0x552ce4=[];for(let _0x545550=0x1;;_0x545550+=0x1){const {items:_0x896494,paging:_0x260964}=await listDevUserRoleRelations(_0x58f143,{'roleId':_0xcb4046,'currentPage':_0x545550,'pageSize':_0x211464});_0x552ce4['push'](..._0x896494);if(_0x896494[_0x44f0f3(0x13f)]<_0x211464||_0x260964&&_0x552ce4[_0x44f0f3(0x13f)]>=_0x260964[_0x44f0f3(0x129)])return _0x552ce4;}}export function readRoleRef(_0x2a4c78){const _0x23f7f8=a235_0x147a6d,_0x314794=_0x2a4c78['str'](_0x23f7f8(0x100))[_0x23f7f8(0x127)]();if(!_0x314794)throw CliErrors[_0x23f7f8(0x131)]('role',_0x23f7f8(0x140));return _0x314794;}export async function prepareUserMutation(_0x430539,_0x27c846,_0x16d5c1){const _0xc3feb=a235_0x147a6d,_0x270e0c=readRoleRef(_0x430539),_0x215cda=_0x430539[_0xc3feb(0x136)](_0xc3feb(0x13c))[_0xc3feb(0x127)]();if(!_0x215cda)throw CliErrors[_0xc3feb(0x131)](_0xc3feb(0x13c),_0xc3feb(0x107));const _0x402d15=_0x430539[_0xc3feb(0x148)](_0xc3feb(0x110)),_0x2a20a3=_0x402d15===undefined||_0x402d15===null?undefined:Number(_0x402d15),_0x3a7da7=await resolveRoleRef(_0x430539['appCode'],_0x270e0c);if(_0x3a7da7[_0xc3feb(0x10a)]==='OWNER')throw CliErrors[_0xc3feb(0x101)](_0xc3feb(0x138)+_0x27c846+_0xc3feb(0x121),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x47e4c6=await resolveUserRef(_0x215cda),_0x105016=await loadDevRoleRelations(_0x430539[_0xc3feb(0x135)],_0x3a7da7['id']);return{...computeRoleUserMutation({'operation':_0x27c846,'appCode':_0x430539[_0xc3feb(0x135)],'role':_0x3a7da7,'relations':_0x105016,'user':{'userId':_0x47e4c6[_0xc3feb(0x11e)],'username':_0x47e4c6[_0xc3feb(0x14a)],'nickname':_0x47e4c6[_0xc3feb(0x119)]},'dryRun':_0x16d5c1,..._0x2a20a3!==undefined?{'expectUserCount':_0x2a20a3}:{}}),'role':_0x3a7da7,'user':_0x47e4c6};}
1
+ const a235_0x18cccf=a235_0x55ea;function a235_0x2714(){const _0x15c2c2=['username','totalCount','Optional\x20role\x20remark/description','Role\x20id\x20','Role\x20id\x20(from\x20`role\x20list`)','Removed\x20','userId','roleType','authRequired','\x20duplicate\x20memberships\x20for\x20user\x20',';\x20no\x20change.','nickname','validation','expect-user-count','Cannot\x20','Missing\x20user\x20reference.','Role\x20id\x20or\x20exact\x20role\x20name','join','includes','Pass\x20--role\x20<id|name>.','16028FzSYDS','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','name','userCount','Role\x20name','User\x20','appCode','DEV','245kbPClG','\x20not\x20found\x20in\x20app\x20','length','\x22\x20not\x20found\x20in\x20app\x20','/smartapi/permit/user-role/create','Pass\x20--user\x20<id|name>.','Disambiguate\x20with\x20--role\x20<id>.','121286ANUZFx','ADMIN','map','Check\x20the\x20nickname/username.\x20','push','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','str','toLowerCase','number','14367240wPvPDv','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','user-add','remark','CUSTOM','filter','/smartapi/permit/user-role/delete','dev','tenant','\x22\x20is\x20ambiguous\x20(ids:\x20','36glThuY','Missing\x20role\x20reference.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','trim','test','\x20is\x20already\x20a\x20member\x20of\x20role\x20','OWNER','user','3088848hzBjjI','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x22:\x20','\x20is\x20not\x20a\x20member\x20of\x20role\x20','\x20members\x20of\x20the\x20OWNER\x20role.','flag','Role\x20name\x20\x22','Anti-drift\x20check\x20failed:\x20expected\x20','No\x20tenant\x20member\x20matches\x20\x22','string','roleName','194356DHrufv','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','2248112kpApVv','role','Multiple\x20tenant\x20members\x20match\x20\x22','permitCount','tenant_code','3480750HYBluX','flagMissing'];a235_0x2714=function(){return _0x15c2c2;};return a235_0x2714();}(function(_0x33114b,_0x4841f6){const _0x2d9823=a235_0x55ea,_0x4fd3fc=_0x33114b();while(!![]){try{const _0x209383=-parseInt(_0x2d9823(0xc2))/0x1+parseInt(_0x2d9823(0xee))/0x2*(parseInt(_0x2d9823(0x102))/0x3)+-parseInt(_0x2d9823(0xdf))/0x4*(-parseInt(_0x2d9823(0xe7))/0x5)+parseInt(_0x2d9823(0xb7))/0x6+parseInt(_0x2d9823(0xc9))/0x7+parseInt(_0x2d9823(0xc4))/0x8+-parseInt(_0x2d9823(0xf7))/0x9;if(_0x209383===_0x4841f6)break;else _0x4fd3fc['push'](_0x4fd3fc['shift']());}catch(_0x165619){_0x4fd3fc['push'](_0x4fd3fc['shift']());}}}(a235_0x2714,0x681af));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_0x18cccf(0xf6),'required':!![],'description':a235_0x18cccf(0xcf)};export const ROLE_REF_FLAG={'name':a235_0x18cccf(0xc5),'type':a235_0x18cccf(0xc0),'required':!![],'description':a235_0x18cccf(0xdb)};export const USER_REF_FLAG={'name':a235_0x18cccf(0xb6),'type':a235_0x18cccf(0xc0),'required':!![],'description':a235_0x18cccf(0xf9)};export const NAME_FLAG={'name':a235_0x18cccf(0xe1),'type':a235_0x18cccf(0xc0),'required':!![],'description':a235_0x18cccf(0xe3)};export const USER_NAME_FLAG={'name':'name','type':a235_0x18cccf(0xc0),'required':!![],'description':a235_0x18cccf(0xe0)};export const REMARK_FLAG={'name':'remark','type':a235_0x18cccf(0xc0),'required':![],'description':a235_0x18cccf(0xcd)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x18cccf(0xd8),'type':'number','required':![],'description':a235_0x18cccf(0xb8)};export const BUILTIN_ROLE_TYPES=[a235_0x18cccf(0xef),a235_0x18cccf(0xe6),a235_0x18cccf(0xb5)];export function isBuiltinRole(_0xc0e65e){const _0xb535a1=a235_0x18cccf;return BUILTIN_ROLE_TYPES[_0xb535a1(0xdd)](_0xc0e65e);}export function assertCustomRole(_0x439acb,_0x367c1d){const _0x327d3b=a235_0x18cccf;if(_0x439acb[_0x327d3b(0xd2)]!==_0x327d3b(0xfc))throw CliErrors[_0x327d3b(0xd7)](_0x327d3b(0xd9)+_0x367c1d+'\x20built-in\x20role\x20'+_0x439acb[_0x327d3b(0xc1)]+'\x20('+_0x439acb['roleType']+').',_0x327d3b(0xc3));}export function projectRole(_0x5a6bf4){const _0xbfc086=a235_0x18cccf;return{'id':_0x5a6bf4['id'],'roleName':_0x5a6bf4[_0xbfc086(0xc1)],'roleType':_0x5a6bf4[_0xbfc086(0xd2)],'remark':_0x5a6bf4[_0xbfc086(0xfb)],'userCount':_0x5a6bf4[_0xbfc086(0xe2)],'permitCount':_0x5a6bf4[_0xbfc086(0xc7)],'builtin':isBuiltinRole(_0x5a6bf4[_0xbfc086(0xd2)])};}export async function resolveRoleRef(_0x4902a6,_0x50c9f3){const _0x22addf=a235_0x18cccf,_0x381eb5=_0x50c9f3[_0x22addf(0x105)]();if(!_0x381eb5)throw CliErrors['validation'](_0x22addf(0x103),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x22addf(0x106)](_0x381eb5))return getRoleById(_0x4902a6,Number(_0x381eb5));const _0x37e053=await listAllAppRoles(_0x4902a6),_0x47e2cb=_0x37e053['filter'](_0x32b4d4=>_0x32b4d4['roleName']===_0x381eb5);if(_0x47e2cb[_0x22addf(0xe9)]===0x0)throw CliErrors[_0x22addf(0xd7)](_0x22addf(0xbd)+_0x381eb5+_0x22addf(0xea)+_0x4902a6+'.',_0x22addf(0xf3));if(_0x47e2cb['length']>0x1){const _0x4740fd=_0x47e2cb[_0x22addf(0xf0)](_0x43bd2b=>_0x43bd2b['id'])[_0x22addf(0xdc)](',\x20');throw CliErrors[_0x22addf(0xd7)](_0x22addf(0xbd)+_0x381eb5+_0x22addf(0x101)+_0x4740fd+').',_0x22addf(0xed));}return _0x47e2cb[0x0];}export async function getRoleById(_0x134042,_0x31b939){const _0x2c4c71=a235_0x18cccf,_0x5cf222=await listAllAppRoles(_0x134042),_0x353813=_0x5cf222[_0x2c4c71(0xfd)](_0x23d773=>_0x23d773['id']===_0x31b939&&(!_0x23d773[_0x2c4c71(0xe5)]||_0x23d773[_0x2c4c71(0xe5)]===_0x134042));if(_0x353813[_0x2c4c71(0xe9)]!==0x1)throw CliErrors[_0x2c4c71(0xd7)](_0x2c4c71(0xce)+_0x31b939+_0x2c4c71(0xe8)+_0x134042+'.',_0x2c4c71(0xf8));return _0x353813[0x0];}async function listAllAppRoles(_0x302988){const _0x1b7c34=a235_0x18cccf,_0x5ae4cd=0x64,_0x4da93e=[];for(let _0x49f67e=0x1;;_0x49f67e+=0x1){const {items:_0x545112,paging:_0x5ecbc3}=await listAppRoles(_0x302988,{'currentPage':_0x49f67e,'pageSize':_0x5ae4cd});_0x4da93e[_0x1b7c34(0xf2)](..._0x545112);if(_0x545112[_0x1b7c34(0xe9)]<_0x5ae4cd||_0x5ecbc3&&_0x4da93e[_0x1b7c34(0xe9)]>=_0x5ecbc3[_0x1b7c34(0xcc)])return _0x4da93e;}}export async function resolveTenantCode(){const _0x32f656=a235_0x18cccf,_0x1b3a9b=await getSessionUserInfo(),_0x3a2631=_0x1b3a9b?.[_0x32f656(0xb6)]?.[_0x32f656(0x100)]?.[_0x32f656(0xc8)];if(!_0x3a2631)throw CliErrors[_0x32f656(0xd3)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x3a2631;}function matchMember(_0x21618e,_0x30c9a6){const _0x519d98=a235_0x18cccf,_0x16ea86=_0x30c9a6['trim']()['toLowerCase']();return(_0x21618e['nickname']??'')[_0x519d98(0xf5)]()===_0x16ea86||(_0x21618e[_0x519d98(0xcb)]??'')[_0x519d98(0xf5)]()===_0x16ea86;}export async function resolveUserRef(_0x288b6b,_0x41b655='Pass\x20--user\x20<id>.'){const _0x4665a0=a235_0x18cccf,_0x44b2fa=_0x288b6b[_0x4665a0(0x105)]();if(!_0x44b2fa)throw CliErrors[_0x4665a0(0xd7)](_0x4665a0(0xda),'Pass\x20--user\x20<id|name>.');const _0x15803b=await resolveTenantCode(),_0x7f3297=await getTenantMembers(_0x15803b);if(/^\d+$/['test'](_0x44b2fa)){const _0x482872=Number(_0x44b2fa),_0x52d766=_0x7f3297['find'](_0x4ded4a=>_0x4ded4a['userId']===_0x482872);return{'userId':_0x482872,'username':_0x52d766?.[_0x4665a0(0xcb)]??String(_0x482872),'nickname':_0x52d766?.['nickname'],'matchedBy':'id'};}const _0x4d64eb=_0x7f3297[_0x4665a0(0xfd)](_0xb4e5a8=>matchMember(_0xb4e5a8,_0x44b2fa));if(_0x4d64eb[_0x4665a0(0xe9)]===0x0)throw CliErrors[_0x4665a0(0xd7)](_0x4665a0(0xbf)+_0x44b2fa+'\x22.',_0x4665a0(0xf1)+_0x41b655);if(_0x4d64eb[_0x4665a0(0xe9)]>0x1){const _0x663e89=_0x4d64eb[_0x4665a0(0xf0)](_0x1ddb8f=>(_0x1ddb8f[_0x4665a0(0xd6)]??_0x1ddb8f[_0x4665a0(0xcb)]??'?')+'('+_0x1ddb8f[_0x4665a0(0xd1)]+')')['join'](',\x20');throw CliErrors['validation'](_0x4665a0(0xc6)+_0x44b2fa+_0x4665a0(0xb9)+_0x663e89+'.',_0x41b655);}const _0xdaad72=_0x4d64eb[0x0];return{'userId':_0xdaad72[_0x4665a0(0xd1)],'username':_0xdaad72['username']??String(_0xdaad72['userId']),'nickname':_0xdaad72['nickname'],'matchedBy':_0x4665a0(0xe1)};}export const CREATE_USER_ROLE_PATH=a235_0x18cccf(0xeb);export const DELETE_USER_ROLE_PATH=a235_0x18cccf(0xfe);export function computeRoleUserMutation(_0x54fdf8){const _0x2e1081=a235_0x18cccf,{operation:_0x4ea097,appCode:_0x5df8d0,role:_0x443367,relations:_0x430dd5,user:_0xc9d420}=_0x54fdf8,_0x289617=[...new Set(_0x430dd5[_0x2e1081(0xf0)](_0x36a321=>_0x36a321[_0x2e1081(0xd1)]))],_0x4d056d=[];if(_0x54fdf8['expectUserCount']!==undefined&&_0x54fdf8['expectUserCount']!==_0x289617['length'])throw CliErrors[_0x2e1081(0xd7)](_0x2e1081(0xbe)+_0x54fdf8['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x289617['length']+'.',_0x2e1081(0x104));const _0x23633b=_0x289617[_0x2e1081(0xdd)](_0xc9d420['userId']),_0x5430e6=_0x430dd5['filter'](_0x2ab7d3=>_0x2ab7d3[_0x2e1081(0xd1)]===_0xc9d420['userId'])[_0x2e1081(0xf0)](_0x17fb8e=>_0x17fb8e['id']),_0x2cd77b=_0x4ea097===_0x2e1081(0xfa)?!_0x23633b:_0x23633b;let _0x58af32=_0x289617;_0x4ea097==='user-add'?_0x23633b?_0x4d056d['push']('User\x20'+_0xc9d420[_0x2e1081(0xd1)]+_0x2e1081(0xb4)+_0x443367[_0x2e1081(0xc1)]+_0x2e1081(0xd5)):_0x58af32=[..._0x289617,_0xc9d420['userId']]:!_0x23633b?_0x4d056d[_0x2e1081(0xf2)](_0x2e1081(0xe4)+_0xc9d420['userId']+_0x2e1081(0xba)+_0x443367['roleName']+_0x2e1081(0xd5)):(_0x58af32=_0x289617['filter'](_0x31a4c3=>_0x31a4c3!==_0xc9d420[_0x2e1081(0xd1)]),_0x5430e6['length']>0x1&&_0x4d056d[_0x2e1081(0xf2)](_0x2e1081(0xd0)+_0x5430e6[_0x2e1081(0xe9)]+_0x2e1081(0xd4)+_0xc9d420['userId']+'.'));const _0x3259dd={'scope':_0x2e1081(0xff),'operation':_0x4ea097,'selector':{'appCode':_0x5df8d0,'roleId':_0x443367['id'],'roleName':_0x443367['roleName'],'userId':_0xc9d420['userId']},'before':{'userIds':_0x289617},'after':{'userIds':_0x58af32},'dryRun':_0x54fdf8['dryRun'],'backend':{'method':'POST','path':_0x4ea097===_0x2e1081(0xfa)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x4d056d};return{'mutation':_0x3259dd,'changed':_0x2cd77b,'matchingRelationIds':_0x5430e6};}export async function loadDevRoleRelations(_0x32a331,_0x430072){const _0x3f80eb=a235_0x18cccf,_0x2990b5=0x64,_0x3ffde7=[];for(let _0x4001c6=0x1;;_0x4001c6+=0x1){const {items:_0x5d15cf,paging:_0x3ceda8}=await listDevUserRoleRelations(_0x32a331,{'roleId':_0x430072,'currentPage':_0x4001c6,'pageSize':_0x2990b5});_0x3ffde7[_0x3f80eb(0xf2)](..._0x5d15cf);if(_0x5d15cf[_0x3f80eb(0xe9)]<_0x2990b5||_0x3ceda8&&_0x3ffde7[_0x3f80eb(0xe9)]>=_0x3ceda8[_0x3f80eb(0xcc)])return _0x3ffde7;}}function a235_0x55ea(_0x1702c7,_0x4ccec1){_0x1702c7=_0x1702c7-0xb4;const _0x271493=a235_0x2714();let _0x55ea65=_0x271493[_0x1702c7];return _0x55ea65;}export function readRoleRef(_0x5e252){const _0x296031=a235_0x18cccf,_0x18f419=_0x5e252['str']('role')[_0x296031(0x105)]();if(!_0x18f419)throw CliErrors[_0x296031(0xca)]('role',_0x296031(0xde));return _0x18f419;}export async function prepareUserMutation(_0x178054,_0x30de4d,_0x1276f6){const _0x35fed2=a235_0x18cccf,_0x20468f=readRoleRef(_0x178054),_0x54449c=_0x178054[_0x35fed2(0xf4)](_0x35fed2(0xb6))['trim']();if(!_0x54449c)throw CliErrors['flagMissing'](_0x35fed2(0xb6),_0x35fed2(0xec));const _0x49c19e=_0x178054[_0x35fed2(0xbc)](_0x35fed2(0xd8)),_0x4dc37b=_0x49c19e===undefined||_0x49c19e===null?undefined:Number(_0x49c19e),_0x44fcf7=await resolveRoleRef(_0x178054['appCode'],_0x20468f);if(_0x44fcf7[_0x35fed2(0xd2)]===_0x35fed2(0xb5))throw CliErrors[_0x35fed2(0xd7)](_0x35fed2(0xd9)+_0x30de4d+_0x35fed2(0xbb),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x14c100=await resolveUserRef(_0x54449c),_0x2702a1=await loadDevRoleRelations(_0x178054['appCode'],_0x44fcf7['id']);return{...computeRoleUserMutation({'operation':_0x30de4d,'appCode':_0x178054[_0x35fed2(0xe5)],'role':_0x44fcf7,'relations':_0x2702a1,'user':{'userId':_0x14c100['userId'],'username':_0x14c100[_0x35fed2(0xcb)],'nickname':_0x14c100[_0x35fed2(0xd6)]},'dryRun':_0x1276f6,..._0x4dc37b!==undefined?{'expectUserCount':_0x4dc37b}:{}}),'role':_0x44fcf7,'user':_0x14c100};}
@@ -1 +1 @@
1
- const a236_0x529773=a236_0x5559;(function(_0x543cf0,_0x2ab2d3){const _0x5795b1=a236_0x5559,_0xb05bae=_0x543cf0();while(!![]){try{const _0xad785a=parseInt(_0x5795b1(0xd2))/0x1+-parseInt(_0x5795b1(0xc9))/0x2*(parseInt(_0x5795b1(0xd6))/0x3)+-parseInt(_0x5795b1(0xd3))/0x4*(parseInt(_0x5795b1(0xdc))/0x5)+parseInt(_0x5795b1(0xe2))/0x6+-parseInt(_0x5795b1(0xcb))/0x7*(-parseInt(_0x5795b1(0xda))/0x8)+parseInt(_0x5795b1(0xe0))/0x9*(-parseInt(_0x5795b1(0xc8))/0xa)+-parseInt(_0x5795b1(0xd9))/0xb*(-parseInt(_0x5795b1(0xde))/0xc);if(_0xad785a===_0x2ab2d3)break;else _0xb05bae['push'](_0xb05bae['shift']());}catch(_0x102afb){_0xb05bae['push'](_0xb05bae['shift']());}}}(a236_0x203c,0xae7c5));import{updateAppRole}from'../../core/api-client.js';function a236_0x203c(){const _0x27e60e=['New\x20role\x20name','trim','string','\x20(id=','POST','flag','39150KSeHBB','15076ydYIhW','remark','98zsJvqA','Updated\x20role\x20','dev','num','--name\x20cannot\x20be\x20empty.','name','role','1261944RTjOyP','1249372KMuaki','/smartapi/permit/role/update','validation','168MbhdGy','Nothing\x20to\x20update.','roleName','1506956tQkvfA','733384qGhnyx','length','20ERCmKT','write','48uUsHKi','appCode','1755FHnTVC','update','337608JuUXSY'];a236_0x203c=function(){return _0x27e60e;};return a236_0x203c();}import{CliErrors}from'../../errors.js';function a236_0x5559(_0x36fa6b,_0x498d5e){_0x36fa6b=_0x36fa6b-0xc4;const _0x203cd9=a236_0x203c();let _0x555978=_0x203cd9[_0x36fa6b];return _0x555978;}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_0x529773(0xd4);function readPatch(_0x409507){const _0x8073de=a236_0x529773,_0x5d362f=_0x409507[_0x8073de(0xc7)](_0x8073de(0xd0)),_0x18eeeb=_0x409507[_0x8073de(0xc7)]('remark'),_0x2bb1b9={};if(_0x5d362f!==undefined&&_0x5d362f!==null){const _0x197033=String(_0x5d362f)[_0x8073de(0xe4)]();if(!_0x197033)throw CliErrors[_0x8073de(0xd5)](_0x8073de(0xcf));if(_0x197033[_0x8073de(0xdb)]>0x40)throw CliErrors[_0x8073de(0xd5)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x2bb1b9[_0x8073de(0xd8)]=_0x197033;}_0x18eeeb!==undefined&&_0x18eeeb!==null&&(_0x2bb1b9[_0x8073de(0xca)]=String(_0x18eeeb));if(_0x2bb1b9[_0x8073de(0xd8)]===undefined&&_0x2bb1b9['remark']===undefined)throw CliErrors[_0x8073de(0xd5)](_0x8073de(0xd7),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x2bb1b9;}export const roleUpdate={'service':a236_0x529773(0xd1),'command':a236_0x529773(0xe1),'description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','risk':a236_0x529773(0xdd),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':a236_0x529773(0xc4),'required':![],'description':a236_0x529773(0xe3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x19a7c0){readPatch(_0x19a7c0);},async 'dryRun'(_0x3ff9e8){const _0x707487=a236_0x529773,_0x535ee3=_0x3ff9e8[_0x707487(0xce)]('id'),_0x1f4255=readPatch(_0x3ff9e8),_0x23a1f7=await getRoleById(_0x3ff9e8['appCode'],_0x535ee3);return assertCustomRole(_0x23a1f7,_0x707487(0xe1)),asDryRunResult({'scope':_0x707487(0xcd),'operation':_0x707487(0xe1),'selector':{'appCode':_0x3ff9e8[_0x707487(0xdf)],'roleId':_0x535ee3,'roleName':_0x23a1f7[_0x707487(0xd8)]},'before':projectRole(_0x23a1f7),'after':projectRole({..._0x23a1f7,..._0x1f4255['roleName']!==undefined?{'roleName':_0x1f4255[_0x707487(0xd8)]}:{},..._0x1f4255[_0x707487(0xca)]!==undefined?{'remark':_0x1f4255[_0x707487(0xca)]}:{}}),'dryRun':!![],'backend':{'method':_0x707487(0xc6),'path':UPDATE_PATH},'warnings':[]},{'method':_0x707487(0xc6),'url':UPDATE_PATH});},async 'execute'(_0x34e289){const _0x53b478=a236_0x529773,_0x1e0616=_0x34e289[_0x53b478(0xce)]('id'),_0x19d403=readPatch(_0x34e289),_0x5a7787=await getRoleById(_0x34e289[_0x53b478(0xdf)],_0x1e0616);assertCustomRole(_0x5a7787,'update'),await updateAppRole({'id':_0x1e0616,'appCode':_0x34e289[_0x53b478(0xdf)],..._0x19d403[_0x53b478(0xd8)]!==undefined?{'roleName':_0x19d403[_0x53b478(0xd8)]}:{},..._0x19d403['remark']!==undefined?{'remark':_0x19d403[_0x53b478(0xca)]}:{}});const _0x36ba35=await getRoleById(_0x34e289[_0x53b478(0xdf)],_0x1e0616);return{'ok':!![],'data':{'scope':_0x53b478(0xcd),'operation':_0x53b478(0xe1),'selector':{'appCode':_0x34e289[_0x53b478(0xdf)],'roleId':_0x1e0616,'roleName':_0x36ba35[_0x53b478(0xd8)]},'before':projectRole(_0x5a7787),'after':projectRole(_0x36ba35),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x53b478(0xcc)+_0x36ba35[_0x53b478(0xd8)]+_0x53b478(0xc5)+_0x1e0616+')'};}};
1
+ function a236_0x3048(){const _0x22292e=['num','1988928tPoBIA','validation','188rpEuZC','remark','update','dev','2046255XUKlin','--name\x20cannot\x20be\x20empty.','flag','trim','appCode','Updated\x20role\x20','Nothing\x20to\x20update.','1596VWmhMG','5129634ngdOcj','18416OiSsJB','/smartapi/permit/role/update','POST','write','roleName','name','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','23478318oXeBqr','842324WjCISB','89631IofdKZ','New\x20role\x20name'];a236_0x3048=function(){return _0x22292e;};return a236_0x3048();}const a236_0x349557=a236_0x320a;(function(_0x3ec7c9,_0x3d07e7){const _0x590f16=a236_0x320a,_0x574c4c=_0x3ec7c9();while(!![]){try{const _0x3dbe95=parseInt(_0x590f16(0x80))/0x1+-parseInt(_0x590f16(0x84))/0x2+parseInt(_0x590f16(0x81))/0x3*(-parseInt(_0x590f16(0x86))/0x4)+-parseInt(_0x590f16(0x8a))/0x5+parseInt(_0x590f16(0x92))/0x6+parseInt(_0x590f16(0x91))/0x7*(-parseInt(_0x590f16(0x93))/0x8)+parseInt(_0x590f16(0x7f))/0x9;if(_0x3dbe95===_0x3d07e7)break;else _0x574c4c['push'](_0x574c4c['shift']());}catch(_0x54d8ed){_0x574c4c['push'](_0x574c4c['shift']());}}}(a236_0x3048,0xed977));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_0x349557(0x94);function a236_0x320a(_0x13b47e,_0x1d2870){_0x13b47e=_0x13b47e-0x7c;const _0x30489c=a236_0x3048();let _0x320ab7=_0x30489c[_0x13b47e];return _0x320ab7;}function readPatch(_0x4bd21c){const _0xdea676=a236_0x349557,_0x1b403c=_0x4bd21c[_0xdea676(0x8c)](_0xdea676(0x7d)),_0x5658bf=_0x4bd21c[_0xdea676(0x8c)]('remark'),_0x399228={};if(_0x1b403c!==undefined&&_0x1b403c!==null){const _0x61a182=String(_0x1b403c)[_0xdea676(0x8d)]();if(!_0x61a182)throw CliErrors[_0xdea676(0x85)](_0xdea676(0x8b));if(_0x61a182['length']>0x40)throw CliErrors[_0xdea676(0x85)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x399228[_0xdea676(0x7c)]=_0x61a182;}_0x5658bf!==undefined&&_0x5658bf!==null&&(_0x399228[_0xdea676(0x87)]=String(_0x5658bf));if(_0x399228[_0xdea676(0x7c)]===undefined&&_0x399228[_0xdea676(0x87)]===undefined)throw CliErrors[_0xdea676(0x85)](_0xdea676(0x90),_0xdea676(0x7e));return _0x399228;}export const roleUpdate={'service':'role','command':a236_0x349557(0x88),'description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','risk':a236_0x349557(0x96),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':'string','required':![],'description':a236_0x349557(0x82)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x341493){readPatch(_0x341493);},async 'dryRun'(_0x312ab8){const _0x3890ed=a236_0x349557,_0x4af490=_0x312ab8[_0x3890ed(0x83)]('id'),_0x5b0335=readPatch(_0x312ab8),_0xd4622f=await getRoleById(_0x312ab8[_0x3890ed(0x8e)],_0x4af490);return assertCustomRole(_0xd4622f,_0x3890ed(0x88)),asDryRunResult({'scope':_0x3890ed(0x89),'operation':_0x3890ed(0x88),'selector':{'appCode':_0x312ab8['appCode'],'roleId':_0x4af490,'roleName':_0xd4622f[_0x3890ed(0x7c)]},'before':projectRole(_0xd4622f),'after':projectRole({..._0xd4622f,..._0x5b0335[_0x3890ed(0x7c)]!==undefined?{'roleName':_0x5b0335[_0x3890ed(0x7c)]}:{},..._0x5b0335['remark']!==undefined?{'remark':_0x5b0335['remark']}:{}}),'dryRun':!![],'backend':{'method':_0x3890ed(0x95),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x49d0e0){const _0x42e550=a236_0x349557,_0x4c8a88=_0x49d0e0[_0x42e550(0x83)]('id'),_0x492600=readPatch(_0x49d0e0),_0x5eb8d5=await getRoleById(_0x49d0e0[_0x42e550(0x8e)],_0x4c8a88);assertCustomRole(_0x5eb8d5,'update'),await updateAppRole({'id':_0x4c8a88,'appCode':_0x49d0e0['appCode'],..._0x492600[_0x42e550(0x7c)]!==undefined?{'roleName':_0x492600[_0x42e550(0x7c)]}:{},..._0x492600[_0x42e550(0x87)]!==undefined?{'remark':_0x492600['remark']}:{}});const _0x168efe=await getRoleById(_0x49d0e0[_0x42e550(0x8e)],_0x4c8a88);return{'ok':!![],'data':{'scope':'dev','operation':_0x42e550(0x88),'selector':{'appCode':_0x49d0e0['appCode'],'roleId':_0x4c8a88,'roleName':_0x168efe[_0x42e550(0x7c)]},'before':projectRole(_0x5eb8d5),'after':projectRole(_0x168efe),'dryRun':![],'backend':{'method':_0x42e550(0x95),'path':UPDATE_PATH},'warnings':[]},'message':_0x42e550(0x8f)+_0x168efe[_0x42e550(0x7c)]+'\x20(id='+_0x4c8a88+')'};}};
@@ -1 +1 @@
1
- const a237_0x29baf4=a237_0x1f8e;(function(_0x227139,_0x259da2){const _0x3a5773=a237_0x1f8e,_0xe29e47=_0x227139();while(!![]){try{const _0x16c196=parseInt(_0x3a5773(0x10b))/0x1+parseInt(_0x3a5773(0x114))/0x2*(parseInt(_0x3a5773(0x106))/0x3)+parseInt(_0x3a5773(0x105))/0x4*(parseInt(_0x3a5773(0x119))/0x5)+-parseInt(_0x3a5773(0x103))/0x6*(parseInt(_0x3a5773(0x100))/0x7)+-parseInt(_0x3a5773(0x115))/0x8*(-parseInt(_0x3a5773(0x108))/0x9)+parseInt(_0x3a5773(0xff))/0xa*(-parseInt(_0x3a5773(0x109))/0xb)+parseInt(_0x3a5773(0x110))/0xc*(-parseInt(_0x3a5773(0x101))/0xd);if(_0x16c196===_0x259da2)break;else _0xe29e47['push'](_0xe29e47['shift']());}catch(_0x46f7f3){_0xe29e47['push'](_0xe29e47['shift']());}}}(a237_0x5aee,0xc8566));import{createDevUserRole}from'../../core/api-client.js';function a237_0x1f8e(_0x27a710,_0x3fd203){_0x27a710=_0x27a710-0xff;const _0x5aee2a=a237_0x5aee();let _0x1f8ec1=_0x5aee2a[_0x27a710];return _0x1f8ec1;}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_0x29baf4(0x102),'command':'user-add','description':a237_0x29baf4(0x10f),'risk':a237_0x29baf4(0x112),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4fc9d2){const _0xb46a3=a237_0x29baf4,{mutation:_0x22788f}=await prepareUserMutation(_0x4fc9d2,_0xb46a3(0x117),!![]);return asDryRunResult(_0x22788f,{'method':_0xb46a3(0x113),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x96768e){const _0x297176=a237_0x29baf4,{mutation:_0x26a234,changed:_0x46f157,role:_0x5a55f3,user:_0x228651}=await prepareUserMutation(_0x96768e,_0x297176(0x117),![]);return _0x46f157&&await createDevUserRole({'appCode':_0x96768e[_0x297176(0x111)],'userId':_0x228651['userId'],'username':_0x228651[_0x297176(0x10d)],'roleType':_0x5a55f3[_0x297176(0x118)],'roleId':_0x26a234[_0x297176(0x116)][_0x297176(0x10c)]}),{'ok':!![],'data':_0x26a234,'message':_0x46f157?_0x297176(0x10a)+_0x26a234[_0x297176(0x116)]['userId']+_0x297176(0x10e)+_0x26a234[_0x297176(0x116)][_0x297176(0x104)]:_0x297176(0x107)+_0x26a234[_0x297176(0x116)]['userId']+'\x20already\x20in\x20role\x20'+_0x26a234[_0x297176(0x116)][_0x297176(0x104)]};}};function a237_0x5aee(){const _0x1e6e5a=['No\x20change:\x20user\x20','18DbtiIG','33AMKWgC','Added\x20user\x20','1132834LwKcGg','roleId','username','\x20to\x20role\x20','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','156kxLCgH','appCode','high-risk-write','POST','218DiPMUy','123672DGGKRB','selector','user-add','roleType','4346165mCZXrv','967060pRDJks','7149611iOxKxs','561561UxyvCj','role','6kTYqMA','roleName','4NZkmsB','18183xusIlY'];a237_0x5aee=function(){return _0x1e6e5a;};return a237_0x5aee();}
1
+ const a237_0x41c2f0=a237_0x1e67;(function(_0x36d3c1,_0x406cd2){const _0x34e174=a237_0x1e67,_0x263f07=_0x36d3c1();while(!![]){try{const _0x50a6f0=parseInt(_0x34e174(0xe0))/0x1*(parseInt(_0x34e174(0xe1))/0x2)+parseInt(_0x34e174(0xe4))/0x3+-parseInt(_0x34e174(0xea))/0x4+parseInt(_0x34e174(0xef))/0x5*(-parseInt(_0x34e174(0xde))/0x6)+parseInt(_0x34e174(0xe9))/0x7*(-parseInt(_0x34e174(0xe6))/0x8)+parseInt(_0x34e174(0xed))/0x9*(-parseInt(_0x34e174(0xee))/0xa)+parseInt(_0x34e174(0xe8))/0xb*(parseInt(_0x34e174(0xd9))/0xc);if(_0x50a6f0===_0x406cd2)break;else _0x263f07['push'](_0x263f07['shift']());}catch(_0x170eae){_0x263f07['push'](_0x263f07['shift']());}}}(a237_0x5e94,0x7b688));function a237_0x1e67(_0x4ce3d1,_0x475822){_0x4ce3d1=_0x4ce3d1-0xd9;const _0x5e94f0=a237_0x5e94();let _0x1e67c8=_0x5e94f0[_0x4ce3d1];return _0x1e67c8;}import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a237_0x5e94(){const _0x5040dd=['846BqVYjZ','590xWoVtP','39265fatSDq','4478484NeTWdR','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','\x20already\x20in\x20role\x20','\x20to\x20role\x20','appCode','30JzWkNF','No\x20change:\x20user\x20','671841QPLfSI','2dSxmpO','Added\x20user\x20','selector','1011606UPTnRj','userId','1879536JVsugy','user-add','11IzbuaZ','21QzMHgd','508532niTdno','roleName','high-risk-write'];a237_0x5e94=function(){return _0x5040dd;};return a237_0x5e94();}export const roleUserAdd={'service':'role','command':'user-add','description':a237_0x41c2f0(0xda),'risk':a237_0x41c2f0(0xec),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x492f8b){const _0xa32424=a237_0x41c2f0,{mutation:_0x50edd2}=await prepareUserMutation(_0x492f8b,_0xa32424(0xe7),!![]);return asDryRunResult(_0x50edd2,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x34c4bc){const _0x359bba=a237_0x41c2f0,{mutation:_0x43ee7b,changed:_0x2548f3,role:_0x408ec4,user:_0x33c4e6}=await prepareUserMutation(_0x34c4bc,_0x359bba(0xe7),![]);return _0x2548f3&&await createDevUserRole({'appCode':_0x34c4bc[_0x359bba(0xdd)],'userId':_0x33c4e6[_0x359bba(0xe5)],'username':_0x33c4e6['username'],'roleType':_0x408ec4['roleType'],'roleId':_0x43ee7b[_0x359bba(0xe3)]['roleId']}),{'ok':!![],'data':_0x43ee7b,'message':_0x2548f3?_0x359bba(0xe2)+_0x43ee7b['selector'][_0x359bba(0xe5)]+_0x359bba(0xdc)+_0x43ee7b[_0x359bba(0xe3)][_0x359bba(0xeb)]:_0x359bba(0xdf)+_0x43ee7b[_0x359bba(0xe3)][_0x359bba(0xe5)]+_0x359bba(0xdb)+_0x43ee7b[_0x359bba(0xe3)]['roleName']};}};
@@ -1 +1 @@
1
- const a238_0x3dbcfb=a238_0x2d77;(function(_0x100dcc,_0x5d24e8){const _0x579a1c=a238_0x2d77,_0x2031fc=_0x100dcc();while(!![]){try{const _0x4482e0=parseInt(_0x579a1c(0x16a))/0x1*(parseInt(_0x579a1c(0x16d))/0x2)+-parseInt(_0x579a1c(0x16f))/0x3+parseInt(_0x579a1c(0x16e))/0x4+parseInt(_0x579a1c(0x175))/0x5*(-parseInt(_0x579a1c(0x174))/0x6)+-parseInt(_0x579a1c(0x177))/0x7*(parseInt(_0x579a1c(0x16c))/0x8)+-parseInt(_0x579a1c(0x17a))/0x9*(-parseInt(_0x579a1c(0x179))/0xa)+parseInt(_0x579a1c(0x171))/0xb;if(_0x4482e0===_0x5d24e8)break;else _0x2031fc['push'](_0x2031fc['shift']());}catch(_0x1fd24f){_0x2031fc['push'](_0x2031fc['shift']());}}}(a238_0x2410,0x661de));function a238_0x2d77(_0x1e8881,_0x1dcffd){_0x1e8881=_0x1e8881-0x168;const _0x24104d=a238_0x2410();let _0x2d774d=_0x24104d[_0x1e8881];return _0x2d774d;}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a238_0x3dbcfb(0x168),'command':a238_0x3dbcfb(0x170),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a238_0x3dbcfb(0x169),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x47e2a5){const _0x332dbd=a238_0x3dbcfb,{mutation:_0x2fe507}=await prepareUserMutation(_0x47e2a5,_0x332dbd(0x170),!![]);return asDryRunResult(_0x2fe507,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x309391){const _0x4f7a37=a238_0x3dbcfb,{matchingRelationIds:_0x247f11,mutation:_0x25eebe,changed:_0x3eb0e1}=await prepareUserMutation(_0x309391,_0x4f7a37(0x170),![]);if(_0x3eb0e1)for(const _0x477e29 of _0x247f11){await deleteDevUserRole(_0x477e29);}return{'ok':!![],'data':_0x25eebe,'message':_0x3eb0e1?_0x4f7a37(0x173)+_0x25eebe[_0x4f7a37(0x178)]['userId']+_0x4f7a37(0x176)+_0x25eebe[_0x4f7a37(0x178)]['roleName']:_0x4f7a37(0x16b)+_0x25eebe[_0x4f7a37(0x178)]['userId']+'\x20not\x20in\x20role\x20'+_0x25eebe[_0x4f7a37(0x178)][_0x4f7a37(0x172)]};}};function a238_0x2410(){const _0x105110=['524251fxKOUY','selector','60EQtjDz','822573vHHAad','role','high-risk-write','46SUjeBA','No\x20change:\x20user\x20','80gRbaEz','10832MzwWfe','2094740SLxfCf','1183107VQLtjZ','user-remove','7237230BqMAel','roleName','Removed\x20user\x20','119304jLsxZv','105GElMhx','\x20from\x20role\x20'];a238_0x2410=function(){return _0x105110;};return a238_0x2410();}
1
+ const a238_0x3963e5=a238_0x14b8;(function(_0xead39b,_0x9637ee){const _0x299508=a238_0x14b8,_0xcb9ea9=_0xead39b();while(!![]){try{const _0x153a8e=-parseInt(_0x299508(0xd6))/0x1+-parseInt(_0x299508(0xdd))/0x2*(parseInt(_0x299508(0xdb))/0x3)+-parseInt(_0x299508(0xd9))/0x4+parseInt(_0x299508(0xdc))/0x5+parseInt(_0x299508(0xd2))/0x6+parseInt(_0x299508(0xd5))/0x7+parseInt(_0x299508(0xd7))/0x8;if(_0x153a8e===_0x9637ee)break;else _0xcb9ea9['push'](_0xcb9ea9['shift']());}catch(_0x41acbb){_0xcb9ea9['push'](_0xcb9ea9['shift']());}}}(a238_0x59be,0x4ae4b));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a238_0x14b8(_0x170ee7,_0x321f74){_0x170ee7=_0x170ee7-0xd1;const _0x59be28=a238_0x59be();let _0x14b866=_0x59be28[_0x170ee7];return _0x14b866;}export const roleUserRemove={'service':a238_0x3963e5(0xdf),'command':a238_0x3963e5(0xd4),'description':a238_0x3963e5(0xd8),'risk':a238_0x3963e5(0xda),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5d1e7a){const _0xc025c1=a238_0x3963e5,{mutation:_0x4c2052}=await prepareUserMutation(_0x5d1e7a,_0xc025c1(0xd4),!![]);return asDryRunResult(_0x4c2052,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x213980){const _0x430e34=a238_0x3963e5,{matchingRelationIds:_0x1b9459,mutation:_0x250375,changed:_0x3b17e7}=await prepareUserMutation(_0x213980,_0x430e34(0xd4),![]);if(_0x3b17e7)for(const _0x507876 of _0x1b9459){await deleteDevUserRole(_0x507876);}return{'ok':!![],'data':_0x250375,'message':_0x3b17e7?'Removed\x20user\x20'+_0x250375[_0x430e34(0xd1)]['userId']+_0x430e34(0xd3)+_0x250375[_0x430e34(0xd1)]['roleName']:_0x430e34(0xe1)+_0x250375[_0x430e34(0xd1)]['userId']+_0x430e34(0xe0)+_0x250375[_0x430e34(0xd1)][_0x430e34(0xde)]};}};function a238_0x59be(){const _0x45246f=['No\x20change:\x20user\x20','selector','2617266PnsDdz','\x20from\x20role\x20','user-remove','930993eOlzoy','115183qBfeDp','4412504cretSe','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','1850888SjegXy','high-risk-write','916323lMXXTk','1873885qPXXzc','4BnrXQg','roleName','role','\x20not\x20in\x20role\x20'];a238_0x59be=function(){return _0x45246f;};return a238_0x59be();}
@@ -1 +1 @@
1
- const a239_0x40866c=a239_0x4636;function a239_0x2927(){const _0x5f4813=['234lZUwZJ','nickname','2EmmpcF','1065956STmAje','\x22\x20→\x20userId\x20','matchedBy','Resolved\x20\x22','Pass\x20--name\x20<nickname|username>.','read','110LKLvpU','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','388362oEqsiG','name','userId','flagMissing','trim','891500YxdWtn','5168705ROpihT','username','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','1039599hsRvgs','6986Qfktrf','user-resolve','2089504dnBsez'];a239_0x2927=function(){return _0x5f4813;};return a239_0x2927();}(function(_0x47839c,_0x3945d9){const _0x38f553=a239_0x4636,_0x45acf7=_0x47839c();while(!![]){try{const _0x429104=-parseInt(_0x38f553(0x165))/0x1*(-parseInt(_0x38f553(0x14e))/0x2)+-parseInt(_0x38f553(0x156))/0x3+-parseInt(_0x38f553(0x15b))/0x4+parseInt(_0x38f553(0x15c))/0x5+-parseInt(_0x38f553(0x163))/0x6*(parseInt(_0x38f553(0x160))/0x7)+parseInt(_0x38f553(0x162))/0x8+-parseInt(_0x38f553(0x15f))/0x9*(parseInt(_0x38f553(0x154))/0xa);if(_0x429104===_0x3945d9)break;else _0x45acf7['push'](_0x45acf7['shift']());}catch(_0x44300f){_0x45acf7['push'](_0x45acf7['shift']());}}}(a239_0x2927,0xaaa85));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a239_0x4636(_0xd397be,_0xe3bf70){_0xd397be=_0xd397be-0x14e;const _0x29278d=a239_0x2927();let _0x4636cd=_0x29278d[_0xd397be];return _0x4636cd;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':a239_0x40866c(0x161),'description':a239_0x40866c(0x155),'risk':a239_0x40866c(0x153),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b6e06){const _0x1b10c8=a239_0x40866c;if(!_0x4b6e06['str'](_0x1b10c8(0x157))[_0x1b10c8(0x15a)]())throw CliErrors[_0x1b10c8(0x159)]('name',_0x1b10c8(0x152));},async 'execute'(_0x1b244b){const _0x4754d8=a239_0x40866c,_0x2d1121=_0x1b244b['str'](_0x4754d8(0x157))['trim'](),_0x366fec=await resolveUserRef(_0x2d1121,_0x4754d8(0x15e));return{'ok':!![],'data':{'user':{'userId':_0x366fec[_0x4754d8(0x158)],'username':_0x366fec[_0x4754d8(0x15d)],'nickname':_0x366fec[_0x4754d8(0x164)],'matchedBy':_0x366fec[_0x4754d8(0x150)]}},'message':_0x4754d8(0x151)+_0x2d1121+_0x4754d8(0x14f)+_0x366fec[_0x4754d8(0x158)]};}};
1
+ const a239_0x12a347=a239_0x67c8;function a239_0x67c8(_0x797d60,_0xfc1832){_0x797d60=_0x797d60-0x1f3;const _0x5893a7=a239_0x5893();let _0x67c881=_0x5893a7[_0x797d60];return _0x67c881;}function a239_0x5893(){const _0x144c04=['nickname','username','2540654iYkihu','role','1HCBDnS','str','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','\x22\x20→\x20userId\x20','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','827982zPaOXj','Resolved\x20\x22','8935816koCHjQ','26855433UaYZUH','name','user-resolve','Pass\x20--name\x20<nickname|username>.','1124207ZtqBFr','1049277yAVcrv','read','trim','40gKPacK','userId','306652hmFVbR','flagMissing'];a239_0x5893=function(){return _0x144c04;};return a239_0x5893();}(function(_0x8c29c7,_0x50dc5a){const _0x48a8e3=a239_0x67c8,_0x4adcef=_0x8c29c7();while(!![]){try{const _0xffbd93=parseInt(_0x48a8e3(0x1fc))/0x1*(parseInt(_0x48a8e3(0x1fa))/0x2)+parseInt(_0x48a8e3(0x209))/0x3+parseInt(_0x48a8e3(0x1f6))/0x4+parseInt(_0x48a8e3(0x1f4))/0x5*(parseInt(_0x48a8e3(0x201))/0x6)+-parseInt(_0x48a8e3(0x208))/0x7+parseInt(_0x48a8e3(0x203))/0x8+-parseInt(_0x48a8e3(0x204))/0x9;if(_0xffbd93===_0x50dc5a)break;else _0x4adcef['push'](_0x4adcef['shift']());}catch(_0x310e2e){_0x4adcef['push'](_0x4adcef['shift']());}}}(a239_0x5893,0xbcc2c));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x12a347(0x1fb),'command':a239_0x12a347(0x206),'description':a239_0x12a347(0x200),'risk':a239_0x12a347(0x20a),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x31b4da){const _0x4195fd=a239_0x12a347;if(!_0x31b4da[_0x4195fd(0x1fd)](_0x4195fd(0x205))[_0x4195fd(0x1f3)]())throw CliErrors[_0x4195fd(0x1f7)](_0x4195fd(0x205),_0x4195fd(0x207));},async 'execute'(_0x520c2f){const _0x2fdc3c=a239_0x12a347,_0x2b88d3=_0x520c2f['str'](_0x2fdc3c(0x205))[_0x2fdc3c(0x1f3)](),_0x4b55d6=await resolveUserRef(_0x2b88d3,_0x2fdc3c(0x1fe));return{'ok':!![],'data':{'user':{'userId':_0x4b55d6[_0x2fdc3c(0x1f5)],'username':_0x4b55d6[_0x2fdc3c(0x1f9)],'nickname':_0x4b55d6[_0x2fdc3c(0x1f8)],'matchedBy':_0x4b55d6['matchedBy']}},'message':_0x2fdc3c(0x202)+_0x2b88d3+_0x2fdc3c(0x1ff)+_0x4b55d6[_0x2fdc3c(0x1f5)]};}};
@@ -1 +1 @@
1
- function a240_0x3880(_0x4c39ac,_0x5f4619){_0x4c39ac=_0x4c39ac-0x15d;const _0xa80e68=a240_0xa80e();let _0x38808a=_0xa80e68[_0x4c39ac];return _0x38808a;}const a240_0xe5bcb3=a240_0x3880;(function(_0x188944,_0x4b6684){const _0x5ec592=a240_0x3880,_0x54fc5c=_0x188944();while(!![]){try{const _0x2c6ed3=-parseInt(_0x5ec592(0x168))/0x1+-parseInt(_0x5ec592(0x164))/0x2+-parseInt(_0x5ec592(0x16b))/0x3+-parseInt(_0x5ec592(0x161))/0x4*(-parseInt(_0x5ec592(0x170))/0x5)+-parseInt(_0x5ec592(0x15e))/0x6+-parseInt(_0x5ec592(0x16f))/0x7*(parseInt(_0x5ec592(0x160))/0x8)+parseInt(_0x5ec592(0x15d))/0x9*(parseInt(_0x5ec592(0x167))/0xa);if(_0x2c6ed3===_0x4b6684)break;else _0x54fc5c['push'](_0x54fc5c['shift']());}catch(_0x1581f0){_0x54fc5c['push'](_0x54fc5c['shift']());}}}(a240_0xa80e,0x83db2));import{getAppRule}from'../../core/api-client.js';function a240_0xa80e(){const _0x594cec=['content','Loaded\x20','get','21UKtljP','15RzyNBl','appCode','16365519dPnLQG','3281520kVpBJr','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','20392OzNPbE','353356kjdYaK','\x20for\x20','rule','326910tkrRNn','app_rule_not_found','cookie','10zGpSbo','464955snDJcY','\x20is\x20not\x20configured\x20for\x20app\x20','read','1081047pciaAP'];a240_0xa80e=function(){return _0x594cec;};return a240_0xa80e();}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0xe5bcb3(0x163),'command':a240_0xe5bcb3(0x16e),'description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':a240_0xe5bcb3(0x16a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x5ab2e2){readAppRuleType(_0x5ab2e2);},async 'execute'(_0x2f481b){const _0x240451=a240_0xe5bcb3,_0x5309ac=readAppRuleType(_0x2f481b),_0x446065=await getAppRule(_0x2f481b[_0x240451(0x166)],{'appCode':_0x2f481b[_0x240451(0x171)],'type':_0x5309ac});if(!_0x446065)throw appRuleError(_0x240451(0x165),appRuleFileName(_0x5309ac)+_0x240451(0x169)+_0x2f481b['appCode']+'.',_0x240451(0x15f)+_0x5309ac+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x5309ac,_0x446065),'content':_0x446065[_0x240451(0x16c)]}},'message':_0x240451(0x16d)+appRuleFileName(_0x5309ac)+_0x240451(0x162)+_0x2f481b[_0x240451(0x171)]};}};
1
+ const a240_0xa2bc1a=a240_0x1198;(function(_0x579738,_0x3d9202){const _0x3821f4=a240_0x1198,_0x85cda=_0x579738();while(!![]){try{const _0x22345e=parseInt(_0x3821f4(0xa4))/0x1+parseInt(_0x3821f4(0xae))/0x2+parseInt(_0x3821f4(0xb4))/0x3+parseInt(_0x3821f4(0xa6))/0x4+-parseInt(_0x3821f4(0xac))/0x5+parseInt(_0x3821f4(0xa5))/0x6*(-parseInt(_0x3821f4(0xa9))/0x7)+-parseInt(_0x3821f4(0xa7))/0x8;if(_0x22345e===_0x3d9202)break;else _0x85cda['push'](_0x85cda['shift']());}catch(_0x378712){_0x85cda['push'](_0x85cda['shift']());}}}(a240_0x2267,0x35d4b));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a240_0x1198(_0x4af37a,_0x3940dc){_0x4af37a=_0x4af37a-0xa4;const _0x22670f=a240_0x2267();let _0x11987c=_0x22670f[_0x4af37a];return _0x11987c;}export const ruleGet={'service':a240_0xa2bc1a(0xb1),'command':a240_0xa2bc1a(0xaf),'description':a240_0xa2bc1a(0xab),'risk':a240_0xa2bc1a(0xb5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x3e2f7c){readAppRuleType(_0x3e2f7c);},async 'execute'(_0x15fcc6){const _0x5e6e8a=a240_0xa2bc1a,_0x1258ba=readAppRuleType(_0x15fcc6),_0x1bcf0b=await getAppRule(_0x15fcc6[_0x5e6e8a(0xb2)],{'appCode':_0x15fcc6[_0x5e6e8a(0xaa)],'type':_0x1258ba});if(!_0x1bcf0b)throw appRuleError('app_rule_not_found',appRuleFileName(_0x1258ba)+_0x5e6e8a(0xad)+_0x15fcc6[_0x5e6e8a(0xaa)]+'.',_0x5e6e8a(0xa8)+_0x1258ba+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x1258ba,_0x1bcf0b),'content':_0x1bcf0b[_0x5e6e8a(0xb3)]}},'message':_0x5e6e8a(0xb0)+appRuleFileName(_0x1258ba)+'\x20for\x20'+_0x15fcc6[_0x5e6e8a(0xaa)]};}};function a240_0x2267(){const _0x2d5a5d=['223230lHyTfg','\x20is\x20not\x20configured\x20for\x20app\x20','260346mzzCBJ','get','Loaded\x20','rule','cookie','content','892989eCXELA','read','177231vHCWeM','783708YXAZiu','1677664HpBdQK','3984880mYGOhY','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','14zHQndr','appCode','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app'];a240_0x2267=function(){return _0x2d5a5d;};return a240_0x2267();}
@@ -1 +1 @@
1
- const a241_0x3bafa4=a241_0x11ff;(function(_0x4dbc2e,_0x96ac3e){const _0x13f338=a241_0x11ff,_0x119680=_0x4dbc2e();while(!![]){try{const _0x213de6=-parseInt(_0x13f338(0x164))/0x1*(parseInt(_0x13f338(0x166))/0x2)+parseInt(_0x13f338(0x16a))/0x3+-parseInt(_0x13f338(0x16f))/0x4*(-parseInt(_0x13f338(0x16c))/0x5)+-parseInt(_0x13f338(0x16b))/0x6*(parseInt(_0x13f338(0x171))/0x7)+parseInt(_0x13f338(0x16e))/0x8+-parseInt(_0x13f338(0x169))/0x9*(parseInt(_0x13f338(0x16d))/0xa)+parseInt(_0x13f338(0x163))/0xb;if(_0x213de6===_0x96ac3e)break;else _0x119680['push'](_0x119680['shift']());}catch(_0x1754bf){_0x119680['push'](_0x119680['shift']());}}}(a241_0x4683,0x76c56));import{withKbManagementSession}from'../../core/kb-management-client.js';function a241_0x11ff(_0x3f2637,_0x26ce2e){_0x3f2637=_0x3f2637-0x163;const _0x4683c0=a241_0x4683();let _0x11ff3b=_0x4683c0[_0x3f2637];return _0x11ff3b;}import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x3bafa4(0x165)](_0x5ae2ea=>({..._0x5ae2ea,'execute':_0x2b8898=>withKbManagementSession(_0x2b8898[a241_0x3bafa4(0x167)],()=>_0x5ae2ea[a241_0x3bafa4(0x168)](_0x2b8898)),..._0x5ae2ea[a241_0x3bafa4(0x170)]?{'dryRun':_0x11c915=>withKbManagementSession(_0x11c915[a241_0x3bafa4(0x167)],()=>_0x5ae2ea[a241_0x3bafa4(0x170)](_0x11c915))}:{}}));function a241_0x4683(){const _0x587184=['9npMxIB','231354ivKxlk','444MQyqUS','26905KaParF','1510570GaywKL','5335664IGHkMM','4GmEHzq','dryRun','11410yOGJPu','8807942CLfiZJ','6712TPelyB','map','236sivwKO','signal','execute'];a241_0x4683=function(){return _0x587184;};return a241_0x4683();}
1
+ const a241_0x4a9737=a241_0x28db;(function(_0x1ac2b3,_0x34fb21){const _0x1e8879=a241_0x28db,_0x189bd3=_0x1ac2b3();while(!![]){try{const _0x1d9594=parseInt(_0x1e8879(0xf9))/0x1+parseInt(_0x1e8879(0xf6))/0x2+parseInt(_0x1e8879(0xfb))/0x3*(-parseInt(_0x1e8879(0xfe))/0x4)+parseInt(_0x1e8879(0xfa))/0x5+parseInt(_0x1e8879(0xfc))/0x6*(parseInt(_0x1e8879(0xfd))/0x7)+parseInt(_0x1e8879(0xf8))/0x8*(-parseInt(_0x1e8879(0xff))/0x9)+parseInt(_0x1e8879(0xf7))/0xa;if(_0x1d9594===_0x34fb21)break;else _0x189bd3['push'](_0x189bd3['shift']());}catch(_0x1b6676){_0x189bd3['push'](_0x189bd3['shift']());}}}(a241_0x3621,0x946c9));import{withKbManagementSession}from'../../core/kb-management-client.js';function a241_0x28db(_0x52715d,_0x205ffa){_0x52715d=_0x52715d-0xf4;const _0x3621bf=a241_0x3621();let _0x28dbb8=_0x3621bf[_0x52715d];return _0x28dbb8;}import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x4a9737(0xf4)](_0x531153=>({..._0x531153,'execute':_0x2a067f=>withKbManagementSession(_0x2a067f[a241_0x4a9737(0xf5)],()=>_0x531153['execute'](_0x2a067f)),..._0x531153[a241_0x4a9737(0x100)]?{'dryRun':_0x3aa138=>withKbManagementSession(_0x3aa138['signal'],()=>_0x531153['dryRun'](_0x3aa138))}:{}}));function a241_0x3621(){const _0x104bf8=['4FyTAvu','18LFkARu','dryRun','map','signal','1527462VuvTqT','10767630GuXqYM','4863392tpeEAq','190391WMapJI','794845uoktBq','3139377vcIDPS','140772LyJpDb','203VpdyFH'];a241_0x3621=function(){return _0x104bf8;};return a241_0x3621();}